Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sprotty-vscode

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sprotty-vscode - npm Package Compare versions

Comparing version 0.0.28 to 0.0.29

2

lib/sprotty-vscode-extension.d.ts

@@ -32,4 +32,4 @@ /********************************************************************************

protected getURI(commandArgs: any[]): Promise<vscode.Uri | undefined>;
resourceUri(...segments: string[]): vscode.Uri;
getExtensionFileUri(...segments: string[]): vscode.Uri;
}
//# sourceMappingURL=sprotty-vscode-extension.d.ts.map

@@ -229,3 +229,3 @@ "use strict";

};
SprottyVscodeExtension.prototype.resourceUri = function () {
SprottyVscodeExtension.prototype.getExtensionFileUri = function () {
var segments = [];

@@ -236,4 +236,3 @@ for (var _i = 0; _i < arguments.length; _i++) {

return vscode.Uri
.file(path.join.apply(path, __spread([this.context.extensionPath], segments)))
.with({ scheme: 'vscode-resource' });
.file(path.join.apply(path, __spread([this.context.extensionPath], segments)));
};

@@ -240,0 +239,0 @@ return SprottyVscodeExtension;

@@ -24,4 +24,4 @@ /********************************************************************************

identifier: SprottyDiagramIdentifier;
localResourceRoots: string[];
scriptPath: string;
localResourceRoots: vscode.Uri[];
scriptUri: vscode.Uri;
}

@@ -33,4 +33,4 @@ export declare class SprottyWebview {

readonly diagramIdentifier: SprottyDiagramIdentifier;
readonly localResourceRoots: string[];
readonly scriptPath: string;
readonly localResourceRoots: vscode.Uri[];
readonly scriptUri: vscode.Uri;
readonly title: any;

@@ -46,3 +46,3 @@ readonly diagramPanel: vscode.WebviewPanel;

protected createWebviewPanel(): vscode.WebviewPanel;
protected getWebViewContent(): string;
protected initializeWebview(webview: vscode.Webview): void;
protected connect(): Promise<void>;

@@ -49,0 +49,0 @@ protected setWebviewActiveContext(isActive: boolean): void;

@@ -68,3 +68,3 @@ "use strict";

this.localResourceRoots = options.localResourceRoots;
this.scriptPath = options.scriptPath;
this.scriptUri = options.scriptUri;
this.title = this.createTitle();

@@ -83,15 +83,12 @@ this.diagramPanel = this.createWebviewPanel();

SprottyWebview.prototype.createWebviewPanel = function () {
var _this = this;
var diagramPanel = vscode.window.createWebviewPanel(this.diagramIdentifier.diagramType || 'diagram', this.title, vscode.ViewColumn.Beside, {
localResourceRoots: this.localResourceRoots.map(function (root) {
return _this.extension.resourceUri(root);
}),
localResourceRoots: this.localResourceRoots,
enableScripts: true,
retainContextWhenHidden: true
});
diagramPanel.webview.html = this.getWebViewContent();
this.initializeWebview(diagramPanel.webview);
return diagramPanel;
};
SprottyWebview.prototype.getWebViewContent = function () {
return "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, height=device-height\">\n <title>" + this.title + "</title>\n <link\n rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\"\n crossorigin=\"anonymous\">\n </head>\n <body>\n <div id=\"" + this.diagramIdentifier.clientId + "_container\" style=\"height: 100%;\"></div>\n <script src=\"" + this.extension.resourceUri(this.scriptPath).toString() + "\"></script>\n </body>\n </html>";
SprottyWebview.prototype.initializeWebview = function (webview) {
webview.html = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, height=device-height\">\n <title>" + this.title + "</title>\n <link\n rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\"\n crossorigin=\"anonymous\">\n </head>\n <body>\n <div id=\"" + this.diagramIdentifier.clientId + "_container\" style=\"height: 100%;\"></div>\n <script src=\"" + webview.asWebviewUri(this.scriptUri).toString() + "\"></script>\n </body>\n </html>";
};

@@ -98,0 +95,0 @@ SprottyWebview.prototype.connect = function () {

{
"name": "sprotty-vscode",
"version": "0.0.28",
"version": "0.0.29",
"displayName": "Sprotty VSCode Integration",

@@ -64,3 +64,3 @@ "description": "Glue code to integrate Sprotty diagrams in VSCode extensions (extension part)",

},
"gitHead": "e5284f2d26250e82de52e70705a76af805563bc5"
"gitHead": "cdf9f7f79974e00ed958bf564fb22fac30016272"
}

@@ -125,7 +125,6 @@ /********************************************************************************

resourceUri(...segments: string[]): vscode.Uri {
getExtensionFileUri(...segments: string[]): vscode.Uri {
return vscode.Uri
.file(path.join(this.context.extensionPath, ...segments))
.with({ scheme: 'vscode-resource' });
.file(path.join(this.context.extensionPath, ...segments));
}
}

@@ -34,4 +34,4 @@ /********************************************************************************

identifier: SprottyDiagramIdentifier
localResourceRoots: string[]
scriptPath: string
localResourceRoots: vscode.Uri[]
scriptUri: vscode.Uri
}

@@ -45,4 +45,4 @@

readonly diagramIdentifier: SprottyDiagramIdentifier;
readonly localResourceRoots: string[];
readonly scriptPath: string;
readonly localResourceRoots: vscode.Uri[];
readonly scriptUri: vscode.Uri;
readonly title: any;

@@ -61,3 +61,3 @@ readonly diagramPanel: vscode.WebviewPanel;

this.localResourceRoots = options.localResourceRoots;
this.scriptPath = options.scriptPath;
this.scriptUri = options.scriptUri;
this.title = this.createTitle();

@@ -83,30 +83,28 @@ this.diagramPanel = this.createWebviewPanel();

{
localResourceRoots: this.localResourceRoots.map(root =>
this.extension.resourceUri(root)
),
localResourceRoots: this.localResourceRoots,
enableScripts: true,
retainContextWhenHidden: true
});
diagramPanel.webview.html = this.getWebViewContent();
this.initializeWebview(diagramPanel.webview);
return diagramPanel;
}
protected getWebViewContent() {
return `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height">
<title>${this.title}</title>
<link
rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
crossorigin="anonymous">
</head>
<body>
<div id="${this.diagramIdentifier.clientId}_container" style="height: 100%;"></div>
<script src="${this.extension.resourceUri(this.scriptPath).toString()}"></script>
</body>
</html>`;
protected initializeWebview(webview: vscode.Webview) {
webview.html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height">
<title>${this.title}</title>
<link
rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
crossorigin="anonymous">
</head>
<body>
<div id="${this.diagramIdentifier.clientId}_container" style="height: 100%;"></div>
<script src="${webview.asWebviewUri(this.scriptUri).toString()}"></script>
</body>
</html>`;
}

@@ -113,0 +111,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc