ignore lib
This commit is contained in:
parent
9418c8527e
commit
78c98bdb21
@ -16,3 +16,4 @@ resources/**/*.wasm
|
||||
resources/dide-lsp/server
|
||||
tsconfig.json
|
||||
design
|
||||
lib
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -9,6 +9,7 @@
|
||||
"version": "0.4.0",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.7",
|
||||
"bson": "^6.8.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"puppeteer-core": "^19.4.1",
|
||||
"showdown": "^2.1.0",
|
||||
@ -1108,6 +1109,14 @@
|
||||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
}
|
||||
},
|
||||
"node_modules/bson": {
|
||||
"version": "6.8.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz",
|
||||
"integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==",
|
||||
"engines": {
|
||||
"node": ">=16.20.1"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
|
||||
@ -5424,6 +5433,11 @@
|
||||
"update-browserslist-db": "^1.0.13"
|
||||
}
|
||||
},
|
||||
"bson": {
|
||||
"version": "6.8.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz",
|
||||
"integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ=="
|
||||
},
|
||||
"buffer": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
|
||||
|
@ -1191,6 +1191,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.7.7",
|
||||
"bson": "^6.8.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"puppeteer-core": "^19.4.1",
|
||||
"showdown": "^2.1.0",
|
||||
|
7
src/function/dide-viewer/api.ts
Normal file
7
src/function/dide-viewer/api.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import * as fs from 'fs';
|
||||
import { BSON } from 'bson';
|
||||
import { hdlPath } from '../../hdlFs';
|
||||
|
||||
export async function saveView(file: string, payload: any) {
|
||||
|
||||
}
|
@ -18,6 +18,7 @@ function getWebviewContent(panel?: vscode.WebviewPanel): string | undefined {
|
||||
|
||||
class WaveViewer {
|
||||
context: vscode.ExtensionContext;
|
||||
openFileUri?: vscode.Uri;
|
||||
panel?: vscode.WebviewPanel;
|
||||
constructor(context: vscode.ExtensionContext) {
|
||||
this.context = context;
|
||||
@ -28,6 +29,7 @@ class WaveViewer {
|
||||
}
|
||||
|
||||
private create(uri: vscode.Uri) {
|
||||
this.openFileUri = uri;
|
||||
this.panel = vscode.window.createWebviewPanel(
|
||||
'Wave Viewer',
|
||||
'Wave Viewer',
|
||||
@ -64,16 +66,33 @@ class WaveViewer {
|
||||
|
||||
const iconPath = hdlPath.join(opeParam.extensionPath, 'images', 'icon.svg');
|
||||
this.panel.iconPath = vscode.Uri.file(iconPath);
|
||||
this.registerMessageEvent();
|
||||
} else {
|
||||
WaveViewOutput.report('preview html in <WaveViewer.create> is empty', ReportType.Warn);
|
||||
}
|
||||
}
|
||||
|
||||
// vscode 前端向 webview 发送消息
|
||||
public send(uri: vscode.Uri) {
|
||||
this.panel?.webview.postMessage({
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// vscode 前端接受 webview 的消息
|
||||
private registerMessageEvent() {
|
||||
this.panel?.webview.onDidReceiveMessage(message => {
|
||||
const { command, data } = message;
|
||||
|
||||
switch (command) {
|
||||
case 'save-view':
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async function openWaveViewer(context: vscode.ExtensionContext, uri: vscode.Uri) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user