Skip to content

Commit

Permalink
Add types/vscode-webview
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchas116 committed Apr 30, 2023
1 parent b389301 commit 38d84e7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion packages/editor/package.json
Expand Up @@ -31,10 +31,10 @@
"@radix-ui/react-toggle-group": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.5",
"@seanchas116/design-icons": "^1.0.1",
"@uimix/adapter-types": "workspace:*",
"@uimix/foundation": "workspace:*",
"@uimix/model": "workspace:*",
"@uimix/typed-rpc": "workspace:*",
"@uimix/adapter-types": "workspace:*",
"any-base": "^1.1.0",
"ariakit": "2.0.0-next.44",
"buffer": "^6.0.3",
Expand Down Expand Up @@ -91,6 +91,7 @@
"@types/react-dom": "^18.2.1",
"@types/sortablejs": "^1.15.1",
"@types/ua-parser-js": "^0.7.36",
"@types/vscode-webview": "^1.57.1",
"@types/wicg-file-system-access": "^2020.9.6",
"@vitejs/plugin-react": "^3.1.0",
"autoprefixer": "^10.4.14",
Expand Down
6 changes: 0 additions & 6 deletions packages/editor/src/state/IFrameDataConnector.ts
Expand Up @@ -12,18 +12,12 @@ import { ThumbnailTakerHost } from "./ThumbnailTakerHost";
import { viewOptions } from "./ViewOptions";

export function vscodeParentTarget(): Target {
// @ts-ignore
// eslint-disable-next-line
const vscode = acquireVsCodeApi();

return {
// eslint-disable-next-line
post: (message) => vscode.postMessage(message),
subscribe: (handler) => {
const onMessage = (event: MessageEvent) => {
// if (event.source === window || event.source !== window.parent) {
// return;
// }
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
handler(event.data);
};
Expand Down
13 changes: 10 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 comments on commit 38d84e7

@vercel
Copy link

@vercel vercel bot commented on 38d84e7 Apr 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 38d84e7 Apr 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.