@codingame/monaco-vscode-simple-browser-default-extension 26.2.2 → 28.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -6
- package/package.json +2 -2
- package/resources/extension.js +51 -2
- package/resources/extension.js.map +7 -1
- package/resources/package.json +1 -1
- package/resources/package.nls.json +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { registerExtension } from '@codingame/monaco-vscode-api/extensions';
|
|
2
2
|
|
|
3
|
-
var manifest = {name:"simple-browser",displayName:"%displayName%",description:"%description%",enabledApiProposals:["externalUriOpener"],version:"
|
|
3
|
+
var manifest = {name:"simple-browser",displayName:"%displayName%",description:"%description%",enabledApiProposals:["externalUriOpener"],version:"10.0.0",icon:"media/icon.png",publisher:"vscode",license:"MIT",aiKey:"0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",engines:{vscode:"^1.70.0"},main:undefined,browser:"./dist/browser/extension",categories:["Other"],extensionKind:["ui","workspace"],activationEvents:["onCommand:simpleBrowser.api.open","onOpenExternalUri:http","onOpenExternalUri:https","onWebviewPanel:simpleBrowser.view"],capabilities:{virtualWorkspaces:true,untrustedWorkspaces:{supported:true}},contributes:{commands:[{command:"simpleBrowser.show",title:"Show",category:"Simple Browser"}],configuration:[{title:"Simple Browser",properties:{"simpleBrowser.focusLockIndicator.enabled":{type:"boolean","default":true,title:"Focus Lock Indicator Enabled",description:"%configuration.focusLockIndicator.enabled.description%"},"simpleBrowser.useIntegratedBrowser":{type:"boolean","default":true,markdownDescription:"%configuration.useIntegratedBrowser.description%",scope:"application"}}}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"}};
|
|
4
4
|
|
|
5
5
|
const { registerFileUrl, whenReady } = registerExtension(manifest, undefined, {"system":true,"readmePath":"README.md"});
|
|
6
6
|
registerFileUrl('README.md', new URL('./resources/README.md', import.meta.url).toString(), {"mimeType":"text/markdown","size":301});
|
|
7
|
-
registerFileUrl('dist/browser/extension', new URL('./resources/extension.js', import.meta.url).toString(), {"mimeType":"text/javascript","size":
|
|
8
|
-
registerFileUrl('dist/browser/extension.js', new URL('./resources/extension.js', import.meta.url).toString(), {"mimeType":"text/javascript","size":
|
|
9
|
-
registerFileUrl('dist/browser/extension.js.map', new URL('./resources/extension.js.map', import.meta.url).toString(), {"mimeType":"application/json","size":
|
|
7
|
+
registerFileUrl('dist/browser/extension', new URL('./resources/extension.js', import.meta.url).toString(), {"mimeType":"text/javascript","size":7110});
|
|
8
|
+
registerFileUrl('dist/browser/extension.js', new URL('./resources/extension.js', import.meta.url).toString(), {"mimeType":"text/javascript","size":7110});
|
|
9
|
+
registerFileUrl('dist/browser/extension.js.map', new URL('./resources/extension.js.map', import.meta.url).toString(), {"mimeType":"application/json","size":22189});
|
|
10
10
|
registerFileUrl('media/codicon.css', new URL('./resources/codicon.css.txt', import.meta.url).toString(), {"mimeType":"text/css","size":133000});
|
|
11
11
|
registerFileUrl('media/icon.png', new URL('./resources/icon.png', import.meta.url).toString(), {"mimeType":"image/png","size":1787});
|
|
12
12
|
registerFileUrl('media/index', new URL('./resources/index.js', import.meta.url).toString(), {"mimeType":"text/javascript","size":1586});
|
|
@@ -14,7 +14,7 @@ registerFileUrl('media/index.js', new URL('./resources/index.js', import.meta.ur
|
|
|
14
14
|
registerFileUrl('media/main.css', new URL('./resources/main.css.txt', import.meta.url).toString(), {"mimeType":"text/css","size":2313});
|
|
15
15
|
registerFileUrl('media/preview-dark.svg', new URL('./resources/preview-dark.svg', import.meta.url).toString(), {"mimeType":"image/svg+xml","size":312});
|
|
16
16
|
registerFileUrl('media/preview-light.svg', new URL('./resources/preview-light.svg', import.meta.url).toString(), {"mimeType":"image/svg+xml","size":312});
|
|
17
|
-
registerFileUrl('package.json', new URL('./resources/package.json', import.meta.url).toString(), {"mimeType":"application/json","size":
|
|
18
|
-
registerFileUrl('package.nls.json', new URL('./resources/package.nls.json', import.meta.url).toString(), {"mimeType":"application/json","size":
|
|
17
|
+
registerFileUrl('package.json', new URL('./resources/package.json', import.meta.url).toString(), {"mimeType":"application/json","size":1266});
|
|
18
|
+
registerFileUrl('package.nls.json', new URL('./resources/package.nls.json', import.meta.url).toString(), {"mimeType":"application/json","size":479});
|
|
19
19
|
|
|
20
20
|
export { whenReady };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-simple-browser-default-extension",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@codingame/monaco-vscode-api": "
|
|
21
|
+
"@codingame/monaco-vscode-api": "28.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/resources/extension.js
CHANGED
|
@@ -1,2 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";var U=Object.create;var l=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var D=(s,i)=>{for(var e in i)l(s,e,{get:i[e],enumerable:!0})},h=(s,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of C(i))!P.call(s,r)&&r!==e&&l(s,r,{get:()=>i[r],enumerable:!(t=x(i,r))||t.enumerable});return s};var b=(s,i,e)=>(e=s!=null?U(_(s)):{},h(i||!s||!s.__esModule?l(e,"default",{value:s,enumerable:!0}):e,s)),S=s=>h(l({},"__esModule",{value:!0}),s);var $={};D($,{activate:()=>L});module.exports=S($);var o=b(require("vscode"));var n=b(require("vscode"));function B(s){for(;s.length;)s.pop()?.dispose()}var p=class{_isDisposed=!1;_disposables=[];dispose(){this._isDisposed||(this._isDisposed=!0,B(this._disposables))}_register(i){return this._isDisposed?i.dispose():this._disposables.push(i),i}get isDisposed(){return this._isDisposed}};function g(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto)();let s=new Uint8Array(16),i=[];for(let r=0;r<256;r++)i.push(r.toString(16).padStart(2,"0"));crypto.getRandomValues(s),s[6]=s[6]&15|64,s[8]=s[8]&63|128;let e=0,t="";return t+=i[s[e++]],t+=i[s[e++]],t+=i[s[e++]],t+=i[s[e++]],t+="-",t+=i[s[e++]],t+=i[s[e++]],t+="-",t+=i[s[e++]],t+=i[s[e++]],t+="-",t+=i[s[e++]],t+=i[s[e++]],t+="-",t+=i[s[e++]],t+=i[s[e++]],t+=i[s[e++]],t+=i[s[e++]],t+=i[s[e++]],t+=i[s[e++]],t}var a=class s extends p{constructor(e,t,r){super();this.extensionUri=e;this._webviewPanel=this._register(r),this._webviewPanel.webview.options=s.getWebviewOptions(e),this._register(this._webviewPanel.webview.onDidReceiveMessage(c=>{switch(c.type){case"openExternal":try{let d=n.Uri.parse(c.url);n.env.openExternal(d)}catch{}break}})),this._register(this._webviewPanel.onDidDispose(()=>{this.dispose()})),this._register(n.workspace.onDidChangeConfiguration(c=>{if(c.affectsConfiguration("simpleBrowser.focusLockIndicator.enabled")){let d=n.workspace.getConfiguration("simpleBrowser");this._webviewPanel.webview.postMessage({type:"didChangeFocusLockIndicatorEnabled",focusLockEnabled:d.get("focusLockIndicator.enabled",!0)})}})),this.show(t)}static viewType="simpleBrowser.view";static title=n.l10n.t("Simple Browser");static getWebviewLocalResourceRoots(e){return[n.Uri.joinPath(e,"media")]}static getWebviewOptions(e){return{enableScripts:!0,enableForms:!0,localResourceRoots:s.getWebviewLocalResourceRoots(e)}}_webviewPanel;_onDidDispose=this._register(new n.EventEmitter);onDispose=this._onDidDispose.event;static create(e,t,r){let c=n.window.createWebviewPanel(s.viewType,s.title,{viewColumn:r?.viewColumn??n.ViewColumn.Active,preserveFocus:r?.preserveFocus},{retainContextWhenHidden:!0,...s.getWebviewOptions(e)});return new s(e,t,c)}static restore(e,t,r){return new s(e,t,r)}dispose(){this._onDidDispose.fire(),super.dispose()}show(e,t){this._webviewPanel.webview.html=this.getHtml(e),this._webviewPanel.reveal(t?.viewColumn,t?.preserveFocus)}getHtml(e){let t=n.workspace.getConfiguration("simpleBrowser"),r=g(),c=this.extensionResourceUrl("media","index.js"),d=this.extensionResourceUrl("media","main.css"),y=this.extensionResourceUrl("media","codicon.css");return`<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
5
|
+
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="
|
|
7
|
+
default-src 'none';
|
|
8
|
+
font-src data:;
|
|
9
|
+
style-src ${this._webviewPanel.webview.cspSource};
|
|
10
|
+
script-src 'nonce-${r}';
|
|
11
|
+
frame-src *;
|
|
12
|
+
">
|
|
13
|
+
|
|
14
|
+
<meta id="simple-browser-settings" data-settings="${V(JSON.stringify({url:e,focusLockEnabled:t.get("focusLockIndicator.enabled",!0)}))}">
|
|
15
|
+
|
|
16
|
+
<link rel="stylesheet" type="text/css" href="${d}">
|
|
17
|
+
<link rel="stylesheet" type="text/css" href="${y}">
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<header class="header">
|
|
21
|
+
<nav class="controls">
|
|
22
|
+
<button
|
|
23
|
+
title="${n.l10n.t("Back")}"
|
|
24
|
+
class="back-button icon"><i class="codicon codicon-arrow-left"></i></button>
|
|
25
|
+
|
|
26
|
+
<button
|
|
27
|
+
title="${n.l10n.t("Forward")}"
|
|
28
|
+
class="forward-button icon"><i class="codicon codicon-arrow-right"></i></button>
|
|
29
|
+
|
|
30
|
+
<button
|
|
31
|
+
title="${n.l10n.t("Reload")}"
|
|
32
|
+
class="reload-button icon"><i class="codicon codicon-refresh"></i></button>
|
|
33
|
+
</nav>
|
|
34
|
+
|
|
35
|
+
<input class="url-input" type="text">
|
|
36
|
+
|
|
37
|
+
<nav class="controls">
|
|
38
|
+
<button
|
|
39
|
+
title="${n.l10n.t("Open in browser")}"
|
|
40
|
+
class="open-external-button icon"><i class="codicon codicon-link-external"></i></button>
|
|
41
|
+
</nav>
|
|
42
|
+
</header>
|
|
43
|
+
<div class="content">
|
|
44
|
+
<div class="iframe-focused-alert">${n.l10n.t("Focus Lock")}</div>
|
|
45
|
+
<iframe sandbox="allow-scripts allow-forms allow-same-origin allow-downloads"></iframe>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<script src="${c}" nonce="${r}"><\/script>
|
|
49
|
+
</body>
|
|
50
|
+
</html>`}extensionResourceUrl(...e){return this._webviewPanel.webview.asWebviewUri(n.Uri.joinPath(this.extensionUri,...e))}};function V(s){return s.toString().replace(/"/g,""")}var w=class{constructor(i){this.extensionUri=i}_activeView;dispose(){this._activeView?.dispose(),this._activeView=void 0}show(i,e){let t=typeof i=="string"?i:i.toString(!0);if(this._activeView)this._activeView.show(t,e);else{let r=a.create(this.extensionUri,t,e);this.registerWebviewListeners(r),this._activeView=r}}restore(i,e){let t=e?.url??"",r=a.restore(this.extensionUri,t,i);this.registerWebviewListeners(r),this._activeView??=r}registerWebviewListeners(i){i.onDispose(()=>{this._activeView===i&&(this._activeView=void 0)})}};var W="simpleBrowser.api.open",k="simpleBrowser.show",f="workbench.action.browser.open",O="simpleBrowser.useIntegratedBrowser",E=new Set(["localhost","127.0.0.1","[0:0:0:0:0:0:0:1]","[::1]","0.0.0.0","[0:0:0:0:0:0:0:0]","[::]"]),R="simpleBrowser.open";async function u(){return o.workspace.getConfiguration().get(O,!0)?(await o.commands.getCommands(!0)).includes(f):!1}async function m(s){await o.commands.executeCommand(f,s)}function L(s){let i=new w(s.extensionUri);s.subscriptions.push(i),s.subscriptions.push(o.window.registerWebviewPanelSerializer(a.viewType,{deserializeWebviewPanel:async(e,t)=>{i.restore(e,t)}})),s.subscriptions.push(o.commands.registerCommand(k,async e=>{if(await u())return m(e);e||(e=await o.window.showInputBox({placeHolder:o.l10n.t("https://example.com"),prompt:o.l10n.t("Enter url to visit")})),e&&i.show(e)})),s.subscriptions.push(o.commands.registerCommand(W,async(e,t)=>{await u()?await m(e.toString(!0)):i.show(e,t)})),s.subscriptions.push(o.window.registerExternalUriOpener(R,{canOpenExternalUri(e){let t=new URL(e.toString(!0));return E.has(t.hostname)?I()?o.ExternalUriOpenerPriority.Default:o.ExternalUriOpenerPriority.Option:o.ExternalUriOpenerPriority.None},async openExternalUri(e){if(await u())await m(e.toString(!0));else return i.show(e,{viewColumn:o.window.activeTextEditor?o.ViewColumn.Beside:o.ViewColumn.Active})}},{schemes:["http","https"],label:o.l10n.t("Open in simple browser")}))}function I(){return!(typeof process=="object"&&process.versions.node)&&o.env.uiKind===o.UIKind.Web}
|
|
51
|
+
//# sourceMappingURL=extension.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","mappings":"03BAwDA,oBAAyBA,GAExB,MAAMC,EAAU,IAAI,EAAAC,qBAAqBF,EAAQG,cACjDH,EAAQI,cAAcC,KAAKJ,GAE3BD,EAAQI,cAAcC,KAAKC,EAAOC,OAAOC,+BAA+B,EAAAC,kBAAkBC,SAAU,CACnGC,wBAAyBC,MAAOC,EAAOC,KACtCb,EAAQc,QAAQF,EAAOC,OAIzBd,EAAQI,cAAcC,KAAKC,EAAOU,SAASC,gBAAgBC,EAAaN,MAAOO,IAC9E,SAAUC,IACT,OAAOC,EAAwBF,GAG3BA,IACJA,QAAYb,EAAOC,OAAOe,aAAa,CACtCC,YAAajB,EAAOkB,KAAKC,EAAE,uBAC3BC,OAAQpB,EAAOkB,KAAKC,EAAE,yBAIpBN,GACHlB,EAAQ0B,KAAKR,MAIfnB,EAAQI,cAAcC,KAAKC,EAAOU,SAASC,gBAAgBW,EAAgBhB,MAAOO,EAAiBU,WAIxFT,UACHC,EAAwBF,EAAIW,UAAS,IAE3C7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EAAS,GAqBb,OApBAA,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAU,IACVA,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAU,IACVA,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAU,IACVA,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAU,IACVA,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACrBG,GAAUJ,EAAKF,EAAMG,MACdG,CACR,C,GCxDIC,EAA2B,CAAC,ECE5BC,EDCJ,SAASC,EAAoBC,GAE5B,IAAIC,EAAeJ,EAAyBG,GAC5C,QAAqBjB,IAAjBkB,EACH,OAAOA,EAAapF,QAGrB,IAAID,EAASiF,EAAyBG,GAAY,CAGjDnF,QAAS,CAAC,GAOX,OAHAqF,EAAoBF,GAAUG,KAAKvF,EAAOC,QAASD,EAAQA,EAAOC,QAASkF,GAGpEnF,EAAOC,OACf,CCnB0BkF,CAAoB,I","sources":["webpack://simple-browser/./src/extension.ts","webpack://simple-browser/external commonjs \"vscode\"","webpack://simple-browser/./src/simpleBrowserView.ts","webpack://simple-browser/./src/dispose.ts","webpack://simple-browser/./src/simpleBrowserManager.ts","webpack://simple-browser/./src/uuid.ts","webpack://simple-browser/webpack/bootstrap","webpack://simple-browser/webpack/startup"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { SimpleBrowserManager } from './simpleBrowserManager';\nimport { SimpleBrowserView } from './simpleBrowserView';\n\ndeclare class URL {\n\tconstructor(input: string, base?: string | URL);\n\thostname: string;\n}\n\nconst openApiCommand = 'simpleBrowser.api.open';\nconst showCommand = 'simpleBrowser.show';\nconst integratedBrowserCommand = 'workbench.action.browser.open';\nconst useIntegratedBrowserSetting = 'simpleBrowser.useIntegratedBrowser';\n\nconst enabledHosts = new Set<string>([\n\t'localhost',\n\t// localhost IPv4\n\t'127.0.0.1',\n\t// localhost IPv6\n\t'[0:0:0:0:0:0:0:1]',\n\t'[::1]',\n\t// all interfaces IPv4\n\t'0.0.0.0',\n\t// all interfaces IPv6\n\t'[0:0:0:0:0:0:0:0]',\n\t'[::]'\n]);\n\nconst openerId = 'simpleBrowser.open';\n\n/**\n * Checks if the integrated browser should be used instead of the simple browser\n */\nasync function shouldUseIntegratedBrowser(): Promise<boolean> {\n\tconst config = vscode.workspace.getConfiguration();\n\tif (!config.get<boolean>(useIntegratedBrowserSetting, false)) {\n\t\treturn false;\n\t}\n\n\t// Verify that the integrated browser command is available\n\tconst commands = await vscode.commands.getCommands(true);\n\treturn commands.includes(integratedBrowserCommand);\n}\n\n/**\n * Opens a URL in the integrated browser\n */\nasync function openInIntegratedBrowser(url?: string): Promise<void> {\n\tawait vscode.commands.executeCommand(integratedBrowserCommand, url);\n}\n\nexport function activate(context: vscode.ExtensionContext) {\n\n\tconst manager = new SimpleBrowserManager(context.extensionUri);\n\tcontext.subscriptions.push(manager);\n\n\tcontext.subscriptions.push(vscode.window.registerWebviewPanelSerializer(SimpleBrowserView.viewType, {\n\t\tdeserializeWebviewPanel: async (panel, state) => {\n\t\t\tmanager.restore(panel, state);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand(showCommand, async (url?: string) => {\n\t\tif (await shouldUseIntegratedBrowser()) {\n\t\t\treturn openInIntegratedBrowser(url);\n\t\t}\n\n\t\tif (!url) {\n\t\t\turl = await vscode.window.showInputBox({\n\t\t\t\tplaceHolder: vscode.l10n.t(\"https://example.com\"),\n\t\t\t\tprompt: vscode.l10n.t(\"Enter url to visit\")\n\t\t\t});\n\t\t}\n\n\t\tif (url) {\n\t\t\tmanager.show(url);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand(openApiCommand, async (url: vscode.Uri, showOptions?: {\n\t\tpreserveFocus?: boolean;\n\t\tviewColumn: vscode.ViewColumn;\n\t}) => {\n\t\tif (await shouldUseIntegratedBrowser()) {\n\t\t\tawait openInIntegratedBrowser(url.toString(true));\n\t\t} else {\n\t\t\tmanager.show(url, showOptions);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.window.registerExternalUriOpener(openerId, {\n\t\tcanOpenExternalUri(uri: vscode.Uri) {\n\t\t\t// We have to replace the IPv6 hosts with IPv4 because URL can't handle IPv6.\n\t\t\tconst originalUri = new URL(uri.toString(true));\n\t\t\tif (enabledHosts.has(originalUri.hostname)) {\n\t\t\t\treturn isWeb()\n\t\t\t\t\t? vscode.ExternalUriOpenerPriority.Default\n\t\t\t\t\t: vscode.ExternalUriOpenerPriority.Option;\n\t\t\t}\n\n\t\t\treturn vscode.ExternalUriOpenerPriority.None;\n\t\t},\n\t\tasync openExternalUri(resolveUri: vscode.Uri) {\n\t\t\tif (await shouldUseIntegratedBrowser()) {\n\t\t\t\tawait openInIntegratedBrowser(resolveUri.toString(true));\n\t\t\t} else {\n\t\t\t\treturn manager.show(resolveUri, {\n\t\t\t\t\tviewColumn: vscode.window.activeTextEditor ? vscode.ViewColumn.Beside : vscode.ViewColumn.Active\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tschemes: ['http', 'https'],\n\t\tlabel: vscode.l10n.t(\"Open in simple browser\"),\n\t}));\n}\n\nfunction isWeb(): boolean {\n\treturn !(typeof process === 'object' && !!process.versions.node) && vscode.env.uiKind === vscode.UIKind.Web;\n}\n","module.exports = require(\"vscode\");","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { Disposable } from './dispose';\nimport { generateUuid } from './uuid';\n\n\nexport interface ShowOptions {\n\treadonly preserveFocus?: boolean;\n\treadonly viewColumn?: vscode.ViewColumn;\n}\n\nexport class SimpleBrowserView extends Disposable {\n\n\tpublic static readonly viewType = 'simpleBrowser.view';\n\tprivate static readonly title = vscode.l10n.t(\"Simple Browser\");\n\n\tprivate static getWebviewLocalResourceRoots(extensionUri: vscode.Uri): readonly vscode.Uri[] {\n\t\treturn [\n\t\t\tvscode.Uri.joinPath(extensionUri, 'media')\n\t\t];\n\t}\n\n\tprivate static getWebviewOptions(extensionUri: vscode.Uri): vscode.WebviewOptions {\n\t\treturn {\n\t\t\tenableScripts: true,\n\t\t\tenableForms: true,\n\t\t\tlocalResourceRoots: SimpleBrowserView.getWebviewLocalResourceRoots(extensionUri),\n\t\t};\n\t}\n\n\tprivate readonly _webviewPanel: vscode.WebviewPanel;\n\n\tprivate readonly _onDidDispose = this._register(new vscode.EventEmitter<void>());\n\tpublic readonly onDispose = this._onDidDispose.event;\n\n\tpublic static create(\n\t\textensionUri: vscode.Uri,\n\t\turl: string,\n\t\tshowOptions?: ShowOptions\n\t): SimpleBrowserView {\n\t\tconst webview = vscode.window.createWebviewPanel(SimpleBrowserView.viewType, SimpleBrowserView.title, {\n\t\t\tviewColumn: showOptions?.viewColumn ?? vscode.ViewColumn.Active,\n\t\t\tpreserveFocus: showOptions?.preserveFocus\n\t\t}, {\n\t\t\tretainContextWhenHidden: true,\n\t\t\t...SimpleBrowserView.getWebviewOptions(extensionUri)\n\t\t});\n\t\treturn new SimpleBrowserView(extensionUri, url, webview);\n\t}\n\n\tpublic static restore(\n\t\textensionUri: vscode.Uri,\n\t\turl: string,\n\t\twebviewPanel: vscode.WebviewPanel,\n\t): SimpleBrowserView {\n\t\treturn new SimpleBrowserView(extensionUri, url, webviewPanel);\n\t}\n\n\tprivate constructor(\n\t\tprivate readonly extensionUri: vscode.Uri,\n\t\turl: string,\n\t\twebviewPanel: vscode.WebviewPanel,\n\t) {\n\t\tsuper();\n\n\t\tthis._webviewPanel = this._register(webviewPanel);\n\t\tthis._webviewPanel.webview.options = SimpleBrowserView.getWebviewOptions(extensionUri);\n\n\t\tthis._register(this._webviewPanel.webview.onDidReceiveMessage(e => {\n\t\t\tswitch (e.type) {\n\t\t\t\tcase 'openExternal':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst url = vscode.Uri.parse(e.url);\n\t\t\t\t\t\tvscode.env.openExternal(url);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Noop\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this._webviewPanel.onDidDispose(() => {\n\t\t\tthis.dispose();\n\t\t}));\n\n\t\tthis._register(vscode.workspace.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration('simpleBrowser.focusLockIndicator.enabled')) {\n\t\t\t\tconst configuration = vscode.workspace.getConfiguration('simpleBrowser');\n\t\t\t\tthis._webviewPanel.webview.postMessage({\n\t\t\t\t\ttype: 'didChangeFocusLockIndicatorEnabled',\n\t\t\t\t\tfocusLockEnabled: configuration.get<boolean>('focusLockIndicator.enabled', true)\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\n\t\tthis.show(url);\n\t}\n\n\tpublic override dispose() {\n\t\tthis._onDidDispose.fire();\n\t\tsuper.dispose();\n\t}\n\n\tpublic show(url: string, options?: ShowOptions) {\n\t\tthis._webviewPanel.webview.html = this.getHtml(url);\n\t\tthis._webviewPanel.reveal(options?.viewColumn, options?.preserveFocus);\n\t}\n\n\tprivate getHtml(url: string) {\n\t\tconst configuration = vscode.workspace.getConfiguration('simpleBrowser');\n\n\t\tconst nonce = generateUuid();\n\n\t\tconst mainJs = this.extensionResourceUrl('media', 'index.js');\n\t\tconst mainCss = this.extensionResourceUrl('media', 'main.css');\n\t\tconst codiconsUri = this.extensionResourceUrl('media', 'codicon.css');\n\n\t\treturn /* html */ `<!DOCTYPE html>\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t\t<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\">\n\n\t\t\t\t<meta http-equiv=\"Content-Security-Policy\" content=\"\n\t\t\t\t\tdefault-src 'none';\n\t\t\t\t\tfont-src data:;\n\t\t\t\t\tstyle-src ${this._webviewPanel.webview.cspSource};\n\t\t\t\t\tscript-src 'nonce-${nonce}';\n\t\t\t\t\tframe-src *;\n\t\t\t\t\t\">\n\n\t\t\t\t<meta id=\"simple-browser-settings\" data-settings=\"${escapeAttribute(JSON.stringify({\n\t\t\turl: url,\n\t\t\tfocusLockEnabled: configuration.get<boolean>('focusLockIndicator.enabled', true)\n\t\t}))}\">\n\n\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"${mainCss}\">\n\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"${codiconsUri}\">\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<header class=\"header\">\n\t\t\t\t\t<nav class=\"controls\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Back\")}\"\n\t\t\t\t\t\t\tclass=\"back-button icon\"><i class=\"codicon codicon-arrow-left\"></i></button>\n\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Forward\")}\"\n\t\t\t\t\t\t\tclass=\"forward-button icon\"><i class=\"codicon codicon-arrow-right\"></i></button>\n\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Reload\")}\"\n\t\t\t\t\t\t\tclass=\"reload-button icon\"><i class=\"codicon codicon-refresh\"></i></button>\n\t\t\t\t\t</nav>\n\n\t\t\t\t\t<input class=\"url-input\" type=\"text\">\n\n\t\t\t\t\t<nav class=\"controls\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Open in browser\")}\"\n\t\t\t\t\t\t\tclass=\"open-external-button icon\"><i class=\"codicon codicon-link-external\"></i></button>\n\t\t\t\t\t</nav>\n\t\t\t\t</header>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<div class=\"iframe-focused-alert\">${vscode.l10n.t(\"Focus Lock\")}</div>\n\t\t\t\t\t<iframe sandbox=\"allow-scripts allow-forms allow-same-origin allow-downloads\"></iframe>\n\t\t\t\t</div>\n\n\t\t\t\t<script src=\"${mainJs}\" nonce=\"${nonce}\"></script>\n\t\t\t</body>\n\t\t\t</html>`;\n\t}\n\n\tprivate extensionResourceUrl(...parts: string[]): vscode.Uri {\n\t\treturn this._webviewPanel.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionUri, ...parts));\n\t}\n}\n\nfunction escapeAttribute(value: string | vscode.Uri): string {\n\treturn value.toString().replace(/\"/g, '"');\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\n\nexport function disposeAll(disposables: vscode.Disposable[]) {\n\twhile (disposables.length) {\n\t\tconst item = disposables.pop();\n\t\titem?.dispose();\n\t}\n}\n\nexport abstract class Disposable {\n\tprivate _isDisposed = false;\n\n\tprotected _disposables: vscode.Disposable[] = [];\n\n\tpublic dispose(): any {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isDisposed = true;\n\t\tdisposeAll(this._disposables);\n\t}\n\n\tprotected _register<T extends vscode.Disposable>(value: T): T {\n\t\tif (this._isDisposed) {\n\t\t\tvalue.dispose();\n\t\t} else {\n\t\t\tthis._disposables.push(value);\n\t\t}\n\t\treturn value;\n\t}\n\n\tprotected get isDisposed() {\n\t\treturn this._isDisposed;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { ShowOptions, SimpleBrowserView } from './simpleBrowserView';\n\nexport class SimpleBrowserManager {\n\n\tprivate _activeView?: SimpleBrowserView;\n\n\tconstructor(\n\t\tprivate readonly extensionUri: vscode.Uri,\n\t) { }\n\n\tdispose() {\n\t\tthis._activeView?.dispose();\n\t\tthis._activeView = undefined;\n\t}\n\n\tpublic show(inputUri: string | vscode.Uri, options?: ShowOptions): void {\n\t\tconst url = typeof inputUri === 'string' ? inputUri : inputUri.toString(true);\n\t\tif (this._activeView) {\n\t\t\tthis._activeView.show(url, options);\n\t\t} else {\n\t\t\tconst view = SimpleBrowserView.create(this.extensionUri, url, options);\n\t\t\tthis.registerWebviewListeners(view);\n\n\t\t\tthis._activeView = view;\n\t\t}\n\t}\n\n\tpublic restore(panel: vscode.WebviewPanel, state: any): void {\n\t\tconst url = state?.url ?? '';\n\t\tconst view = SimpleBrowserView.restore(this.extensionUri, url, panel);\n\t\tthis.registerWebviewListeners(view);\n\t\tthis._activeView ??= view;\n\t}\n\n\tprivate registerWebviewListeners(view: SimpleBrowserView) {\n\t\tview.onDispose(() => {\n\t\t\tif (this._activeView === view) {\n\t\t\t\tthis._activeView = undefined;\n\t\t\t}\n\t\t});\n\t}\n\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Copied from src/vs/base/common/uuid.ts\n */\nexport function generateUuid(): string {\n\t// use `randomUUID` if possible\n\tif (typeof crypto.randomUUID === 'function') {\n\t\t// see https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto\n\t\t// > Although crypto is available on all windows, the returned Crypto object only has one\n\t\t// > usable feature in insecure contexts: the getRandomValues() method.\n\t\t// > In general, you should use this API only in secure contexts.\n\n\t\treturn crypto.randomUUID.bind(crypto)();\n\t}\n\n\t// prep-work\n\tconst _data = new Uint8Array(16);\n\tconst _hex: string[] = [];\n\tfor (let i = 0; i < 256; i++) {\n\t\t_hex.push(i.toString(16).padStart(2, '0'));\n\t}\n\n\t// get data\n\tcrypto.getRandomValues(_data);\n\n\t// set version bits\n\t_data[6] = (_data[6] & 0x0f) | 0x40;\n\t_data[8] = (_data[8] & 0x3f) | 0x80;\n\n\t// print as string\n\tlet i = 0;\n\tlet result = '';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\treturn result;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(15);\n"],"names":["context","manager","SimpleBrowserManager","extensionUri","subscriptions","push","vscode","window","registerWebviewPanelSerializer","SimpleBrowserView","viewType","deserializeWebviewPanel","async","panel","state","restore","commands","registerCommand","showCommand","url","shouldUseIntegratedBrowser","openInIntegratedBrowser","showInputBox","placeHolder","l10n","t","prompt","show","openApiCommand","showOptions","toString","registerExternalUriOpener","openerId","canOpenExternalUri","uri","originalUri","URL","enabledHosts","has","hostname","process","versions","node","env","uiKind","UIKind","Web","ExternalUriOpenerPriority","Option","Default","None","openExternalUri","resolveUri","viewColumn","activeTextEditor","ViewColumn","Beside","Active","schemes","label","integratedBrowserCommand","useIntegratedBrowserSetting","Set","workspace","getConfiguration","get","getCommands","includes","executeCommand","module","exports","require","Disposable","static","getWebviewLocalResourceRoots","Uri","joinPath","getWebviewOptions","enableScripts","enableForms","localResourceRoots","_webviewPanel","_onDidDispose","this","_register","EventEmitter","onDispose","event","create","webview","createWebviewPanel","title","preserveFocus","retainContextWhenHidden","webviewPanel","super","options","onDidReceiveMessage","e","type","parse","openExternal","onDidDispose","dispose","onDidChangeConfiguration","affectsConfiguration","configuration","postMessage","focusLockEnabled","fire","html","getHtml","reveal","nonce","generateUuid","mainJs","extensionResourceUrl","mainCss","codiconsUri","cspSource","value","JSON","stringify","replace","parts","asWebviewUri","disposeAll","disposables","length","item","pop","_isDisposed","_disposables","isDisposed","_activeView","constructor","undefined","inputUri","view","registerWebviewListeners","crypto","randomUUID","bind","_data","Uint8Array","_hex","i","padStart","getRandomValues","result","__webpack_module_cache__","__webpack_exports__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call"],"sourceRoot":""}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/extension.ts", "../../src/simpleBrowserView.ts", "../../src/dispose.ts", "../../src/uuid.ts", "../../src/simpleBrowserManager.ts"],
|
|
4
|
+
"sourcesContent": ["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { SimpleBrowserManager } from './simpleBrowserManager';\nimport { SimpleBrowserView } from './simpleBrowserView';\n\ndeclare class URL {\n\tconstructor(input: string, base?: string | URL);\n\thostname: string;\n}\n\nconst openApiCommand = 'simpleBrowser.api.open';\nconst showCommand = 'simpleBrowser.show';\nconst integratedBrowserCommand = 'workbench.action.browser.open';\nconst useIntegratedBrowserSetting = 'simpleBrowser.useIntegratedBrowser';\n\nconst enabledHosts = new Set<string>([\n\t'localhost',\n\t// localhost IPv4\n\t'127.0.0.1',\n\t// localhost IPv6\n\t'[0:0:0:0:0:0:0:1]',\n\t'[::1]',\n\t// all interfaces IPv4\n\t'0.0.0.0',\n\t// all interfaces IPv6\n\t'[0:0:0:0:0:0:0:0]',\n\t'[::]'\n]);\n\nconst openerId = 'simpleBrowser.open';\n\n/**\n * Checks if the integrated browser should be used instead of the simple browser\n */\nasync function shouldUseIntegratedBrowser(): Promise<boolean> {\n\tconst config = vscode.workspace.getConfiguration();\n\tif (!config.get<boolean>(useIntegratedBrowserSetting, true)) {\n\t\treturn false;\n\t}\n\n\t// Verify that the integrated browser command is available\n\tconst commands = await vscode.commands.getCommands(true);\n\treturn commands.includes(integratedBrowserCommand);\n}\n\n/**\n * Opens a URL in the integrated browser\n */\nasync function openInIntegratedBrowser(url?: string): Promise<void> {\n\tawait vscode.commands.executeCommand(integratedBrowserCommand, url);\n}\n\nexport function activate(context: vscode.ExtensionContext) {\n\n\tconst manager = new SimpleBrowserManager(context.extensionUri);\n\tcontext.subscriptions.push(manager);\n\n\tcontext.subscriptions.push(vscode.window.registerWebviewPanelSerializer(SimpleBrowserView.viewType, {\n\t\tdeserializeWebviewPanel: async (panel, state) => {\n\t\t\tmanager.restore(panel, state);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand(showCommand, async (url?: string) => {\n\t\tif (await shouldUseIntegratedBrowser()) {\n\t\t\treturn openInIntegratedBrowser(url);\n\t\t}\n\n\t\tif (!url) {\n\t\t\turl = await vscode.window.showInputBox({\n\t\t\t\tplaceHolder: vscode.l10n.t(\"https://example.com\"),\n\t\t\t\tprompt: vscode.l10n.t(\"Enter url to visit\")\n\t\t\t});\n\t\t}\n\n\t\tif (url) {\n\t\t\tmanager.show(url);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.commands.registerCommand(openApiCommand, async (url: vscode.Uri, showOptions?: {\n\t\tpreserveFocus?: boolean;\n\t\tviewColumn: vscode.ViewColumn;\n\t}) => {\n\t\tif (await shouldUseIntegratedBrowser()) {\n\t\t\tawait openInIntegratedBrowser(url.toString(true));\n\t\t} else {\n\t\t\tmanager.show(url, showOptions);\n\t\t}\n\t}));\n\n\tcontext.subscriptions.push(vscode.window.registerExternalUriOpener(openerId, {\n\t\tcanOpenExternalUri(uri: vscode.Uri) {\n\t\t\t// We have to replace the IPv6 hosts with IPv4 because URL can't handle IPv6.\n\t\t\tconst originalUri = new URL(uri.toString(true));\n\t\t\tif (enabledHosts.has(originalUri.hostname)) {\n\t\t\t\treturn isWeb()\n\t\t\t\t\t? vscode.ExternalUriOpenerPriority.Default\n\t\t\t\t\t: vscode.ExternalUriOpenerPriority.Option;\n\t\t\t}\n\n\t\t\treturn vscode.ExternalUriOpenerPriority.None;\n\t\t},\n\t\tasync openExternalUri(resolveUri: vscode.Uri) {\n\t\t\tif (await shouldUseIntegratedBrowser()) {\n\t\t\t\tawait openInIntegratedBrowser(resolveUri.toString(true));\n\t\t\t} else {\n\t\t\t\treturn manager.show(resolveUri, {\n\t\t\t\t\tviewColumn: vscode.window.activeTextEditor ? vscode.ViewColumn.Beside : vscode.ViewColumn.Active\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, {\n\t\tschemes: ['http', 'https'],\n\t\tlabel: vscode.l10n.t(\"Open in simple browser\"),\n\t}));\n}\n\nfunction isWeb(): boolean {\n\treturn !(typeof process === 'object' && !!process.versions.node) && vscode.env.uiKind === vscode.UIKind.Web;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { Disposable } from './dispose';\nimport { generateUuid } from './uuid';\n\n\nexport interface ShowOptions {\n\treadonly preserveFocus?: boolean;\n\treadonly viewColumn?: vscode.ViewColumn;\n}\n\nexport class SimpleBrowserView extends Disposable {\n\n\tpublic static readonly viewType = 'simpleBrowser.view';\n\tprivate static readonly title = vscode.l10n.t(\"Simple Browser\");\n\n\tprivate static getWebviewLocalResourceRoots(extensionUri: vscode.Uri): readonly vscode.Uri[] {\n\t\treturn [\n\t\t\tvscode.Uri.joinPath(extensionUri, 'media')\n\t\t];\n\t}\n\n\tprivate static getWebviewOptions(extensionUri: vscode.Uri): vscode.WebviewOptions {\n\t\treturn {\n\t\t\tenableScripts: true,\n\t\t\tenableForms: true,\n\t\t\tlocalResourceRoots: SimpleBrowserView.getWebviewLocalResourceRoots(extensionUri),\n\t\t};\n\t}\n\n\tprivate readonly _webviewPanel: vscode.WebviewPanel;\n\n\tprivate readonly _onDidDispose = this._register(new vscode.EventEmitter<void>());\n\tpublic readonly onDispose = this._onDidDispose.event;\n\n\tpublic static create(\n\t\textensionUri: vscode.Uri,\n\t\turl: string,\n\t\tshowOptions?: ShowOptions\n\t): SimpleBrowserView {\n\t\tconst webview = vscode.window.createWebviewPanel(SimpleBrowserView.viewType, SimpleBrowserView.title, {\n\t\t\tviewColumn: showOptions?.viewColumn ?? vscode.ViewColumn.Active,\n\t\t\tpreserveFocus: showOptions?.preserveFocus\n\t\t}, {\n\t\t\tretainContextWhenHidden: true,\n\t\t\t...SimpleBrowserView.getWebviewOptions(extensionUri)\n\t\t});\n\t\treturn new SimpleBrowserView(extensionUri, url, webview);\n\t}\n\n\tpublic static restore(\n\t\textensionUri: vscode.Uri,\n\t\turl: string,\n\t\twebviewPanel: vscode.WebviewPanel,\n\t): SimpleBrowserView {\n\t\treturn new SimpleBrowserView(extensionUri, url, webviewPanel);\n\t}\n\n\tprivate constructor(\n\t\tprivate readonly extensionUri: vscode.Uri,\n\t\turl: string,\n\t\twebviewPanel: vscode.WebviewPanel,\n\t) {\n\t\tsuper();\n\n\t\tthis._webviewPanel = this._register(webviewPanel);\n\t\tthis._webviewPanel.webview.options = SimpleBrowserView.getWebviewOptions(extensionUri);\n\n\t\tthis._register(this._webviewPanel.webview.onDidReceiveMessage(e => {\n\t\t\tswitch (e.type) {\n\t\t\t\tcase 'openExternal':\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst url = vscode.Uri.parse(e.url);\n\t\t\t\t\t\tvscode.env.openExternal(url);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Noop\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(this._webviewPanel.onDidDispose(() => {\n\t\t\tthis.dispose();\n\t\t}));\n\n\t\tthis._register(vscode.workspace.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration('simpleBrowser.focusLockIndicator.enabled')) {\n\t\t\t\tconst configuration = vscode.workspace.getConfiguration('simpleBrowser');\n\t\t\t\tthis._webviewPanel.webview.postMessage({\n\t\t\t\t\ttype: 'didChangeFocusLockIndicatorEnabled',\n\t\t\t\t\tfocusLockEnabled: configuration.get<boolean>('focusLockIndicator.enabled', true)\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\n\t\tthis.show(url);\n\t}\n\n\tpublic override dispose() {\n\t\tthis._onDidDispose.fire();\n\t\tsuper.dispose();\n\t}\n\n\tpublic show(url: string, options?: ShowOptions) {\n\t\tthis._webviewPanel.webview.html = this.getHtml(url);\n\t\tthis._webviewPanel.reveal(options?.viewColumn, options?.preserveFocus);\n\t}\n\n\tprivate getHtml(url: string) {\n\t\tconst configuration = vscode.workspace.getConfiguration('simpleBrowser');\n\n\t\tconst nonce = generateUuid();\n\n\t\tconst mainJs = this.extensionResourceUrl('media', 'index.js');\n\t\tconst mainCss = this.extensionResourceUrl('media', 'main.css');\n\t\tconst codiconsUri = this.extensionResourceUrl('media', 'codicon.css');\n\n\t\treturn /* html */ `<!DOCTYPE html>\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t\t<meta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\">\n\n\t\t\t\t<meta http-equiv=\"Content-Security-Policy\" content=\"\n\t\t\t\t\tdefault-src 'none';\n\t\t\t\t\tfont-src data:;\n\t\t\t\t\tstyle-src ${this._webviewPanel.webview.cspSource};\n\t\t\t\t\tscript-src 'nonce-${nonce}';\n\t\t\t\t\tframe-src *;\n\t\t\t\t\t\">\n\n\t\t\t\t<meta id=\"simple-browser-settings\" data-settings=\"${escapeAttribute(JSON.stringify({\n\t\t\turl: url,\n\t\t\tfocusLockEnabled: configuration.get<boolean>('focusLockIndicator.enabled', true)\n\t\t}))}\">\n\n\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"${mainCss}\">\n\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"${codiconsUri}\">\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<header class=\"header\">\n\t\t\t\t\t<nav class=\"controls\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Back\")}\"\n\t\t\t\t\t\t\tclass=\"back-button icon\"><i class=\"codicon codicon-arrow-left\"></i></button>\n\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Forward\")}\"\n\t\t\t\t\t\t\tclass=\"forward-button icon\"><i class=\"codicon codicon-arrow-right\"></i></button>\n\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Reload\")}\"\n\t\t\t\t\t\t\tclass=\"reload-button icon\"><i class=\"codicon codicon-refresh\"></i></button>\n\t\t\t\t\t</nav>\n\n\t\t\t\t\t<input class=\"url-input\" type=\"text\">\n\n\t\t\t\t\t<nav class=\"controls\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttitle=\"${vscode.l10n.t(\"Open in browser\")}\"\n\t\t\t\t\t\t\tclass=\"open-external-button icon\"><i class=\"codicon codicon-link-external\"></i></button>\n\t\t\t\t\t</nav>\n\t\t\t\t</header>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<div class=\"iframe-focused-alert\">${vscode.l10n.t(\"Focus Lock\")}</div>\n\t\t\t\t\t<iframe sandbox=\"allow-scripts allow-forms allow-same-origin allow-downloads\"></iframe>\n\t\t\t\t</div>\n\n\t\t\t\t<script src=\"${mainJs}\" nonce=\"${nonce}\"></script>\n\t\t\t</body>\n\t\t\t</html>`;\n\t}\n\n\tprivate extensionResourceUrl(...parts: string[]): vscode.Uri {\n\t\treturn this._webviewPanel.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionUri, ...parts));\n\t}\n}\n\nfunction escapeAttribute(value: string | vscode.Uri): string {\n\treturn value.toString().replace(/\"/g, '"');\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\n\nexport function disposeAll(disposables: vscode.Disposable[]) {\n\twhile (disposables.length) {\n\t\tconst item = disposables.pop();\n\t\titem?.dispose();\n\t}\n}\n\nexport abstract class Disposable {\n\tprivate _isDisposed = false;\n\n\tprotected _disposables: vscode.Disposable[] = [];\n\n\tpublic dispose(): any {\n\t\tif (this._isDisposed) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isDisposed = true;\n\t\tdisposeAll(this._disposables);\n\t}\n\n\tprotected _register<T extends vscode.Disposable>(value: T): T {\n\t\tif (this._isDisposed) {\n\t\t\tvalue.dispose();\n\t\t} else {\n\t\t\tthis._disposables.push(value);\n\t\t}\n\t\treturn value;\n\t}\n\n\tprotected get isDisposed() {\n\t\treturn this._isDisposed;\n\t}\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Copied from src/vs/base/common/uuid.ts\n */\nexport function generateUuid(): string {\n\t// use `randomUUID` if possible\n\tif (typeof crypto.randomUUID === 'function') {\n\t\t// see https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto\n\t\t// > Although crypto is available on all windows, the returned Crypto object only has one\n\t\t// > usable feature in insecure contexts: the getRandomValues() method.\n\t\t// > In general, you should use this API only in secure contexts.\n\n\t\treturn crypto.randomUUID.bind(crypto)();\n\t}\n\n\t// prep-work\n\tconst _data = new Uint8Array(16);\n\tconst _hex: string[] = [];\n\tfor (let i = 0; i < 256; i++) {\n\t\t_hex.push(i.toString(16).padStart(2, '0'));\n\t}\n\n\t// get data\n\tcrypto.getRandomValues(_data);\n\n\t// set version bits\n\t_data[6] = (_data[6] & 0x0f) | 0x40;\n\t_data[8] = (_data[8] & 0x3f) | 0x80;\n\n\t// print as string\n\tlet i = 0;\n\tlet result = '';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += '-';\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\tresult += _hex[_data[i++]];\n\treturn result;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as vscode from 'vscode';\nimport { ShowOptions, SimpleBrowserView } from './simpleBrowserView';\n\nexport class SimpleBrowserManager {\n\n\tprivate _activeView?: SimpleBrowserView;\n\n\tconstructor(\n\t\tprivate readonly extensionUri: vscode.Uri,\n\t) { }\n\n\tdispose() {\n\t\tthis._activeView?.dispose();\n\t\tthis._activeView = undefined;\n\t}\n\n\tpublic show(inputUri: string | vscode.Uri, options?: ShowOptions): void {\n\t\tconst url = typeof inputUri === 'string' ? inputUri : inputUri.toString(true);\n\t\tif (this._activeView) {\n\t\t\tthis._activeView.show(url, options);\n\t\t} else {\n\t\t\tconst view = SimpleBrowserView.create(this.extensionUri, url, options);\n\t\t\tthis.registerWebviewListeners(view);\n\n\t\t\tthis._activeView = view;\n\t\t}\n\t}\n\n\tpublic restore(panel: vscode.WebviewPanel, state: any): void {\n\t\tconst url = state?.url ?? '';\n\t\tconst view = SimpleBrowserView.restore(this.extensionUri, url, panel);\n\t\tthis.registerWebviewListeners(view);\n\t\tthis._activeView ??= view;\n\t}\n\n\tprivate registerWebviewListeners(view: SimpleBrowserView) {\n\t\tview.onDispose(() => {\n\t\t\tif (this._activeView === view) {\n\t\t\t\tthis._activeView = undefined;\n\t\t\t}\n\t\t});\n\t}\n\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,IAAA,eAAAC,EAAAH,GAKA,IAAAI,EAAwB,qBCAxB,IAAAC,EAAwB,qBCEjB,SAASC,EAAWC,EAAkC,CAC5D,KAAOA,EAAY,QACLA,EAAY,IAAI,GACvB,QAAQ,CAEhB,CAEO,IAAeC,EAAf,KAA0B,CACxB,YAAc,GAEZ,aAAoC,CAAC,EAExC,SAAe,CACjB,KAAK,cAGT,KAAK,YAAc,GACnBF,EAAW,KAAK,YAAY,EAC7B,CAEU,UAAuCG,EAAa,CAC7D,OAAI,KAAK,YACRA,EAAM,QAAQ,EAEd,KAAK,aAAa,KAAKA,CAAK,EAEtBA,CACR,CAEA,IAAc,YAAa,CAC1B,OAAO,KAAK,WACb,CACD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AAS,CAAC,OAAQ,OAAO,EACzB,MAAc,OAAK,EAAE,wBAAwB,CAC9C,CAAC,CAAC,CACH,CAEA,SAASD,GAAiB,CACzB,MAAO,EAAE,OAAO,SAAY,UAAc,QAAQ,SAAS,OAAgB,MAAI,SAAkB,SAAO,GACzG",
|
|
6
|
+
"names": ["extension_exports", "__export", "activate", "__toCommonJS", "vscode", "vscode", "disposeAll", "disposables", "Disposable", "value", "generateUuid", "_data", "_hex", "i", "result", "SimpleBrowserView", "_SimpleBrowserView", "Disposable", "extensionUri", "url", "webviewPanel", "e", "configuration", "showOptions", "webview", "options", "nonce", "generateUuid", "mainJs", "mainCss", "codiconsUri", "escapeAttribute", "parts", "value", "SimpleBrowserManager", "extensionUri", "inputUri", "options", "url", "view", "SimpleBrowserView", "panel", "state", "openApiCommand", "showCommand", "integratedBrowserCommand", "useIntegratedBrowserSetting", "enabledHosts", "openerId", "shouldUseIntegratedBrowser", "openInIntegratedBrowser", "url", "activate", "context", "manager", "SimpleBrowserManager", "SimpleBrowserView", "panel", "state", "showOptions", "uri", "originalUri", "isWeb", "resolveUri"]
|
|
7
|
+
}
|
package/resources/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"simple-browser","displayName":"%displayName%","description":"%description%","enabledApiProposals":["externalUriOpener"],"version":"
|
|
1
|
+
{"name":"simple-browser","displayName":"%displayName%","description":"%description%","enabledApiProposals":["externalUriOpener"],"version":"10.0.0","icon":"media/icon.png","publisher":"vscode","license":"MIT","aiKey":"0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255","engines":{"vscode":"^1.70.0"},"main":"./dist/extension","browser":"./dist/browser/extension","categories":["Other"],"extensionKind":["ui","workspace"],"activationEvents":["onCommand:simpleBrowser.api.open","onOpenExternalUri:http","onOpenExternalUri:https","onWebviewPanel:simpleBrowser.view"],"capabilities":{"virtualWorkspaces":true,"untrustedWorkspaces":{"supported":true}},"contributes":{"commands":[{"command":"simpleBrowser.show","title":"Show","category":"Simple Browser"}],"configuration":[{"title":"Simple Browser","properties":{"simpleBrowser.focusLockIndicator.enabled":{"type":"boolean","default":true,"title":"Focus Lock Indicator Enabled","description":"%configuration.focusLockIndicator.enabled.description%"},"simpleBrowser.useIntegratedBrowser":{"type":"boolean","default":true,"markdownDescription":"%configuration.useIntegratedBrowser.description%","scope":"application"}}}]},"repository":{"type":"git","url":"https://github.com/microsoft/vscode.git"}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"displayName":"Simple Browser","description":"A very basic built-in webview for displaying web content.","configuration.focusLockIndicator.enabled.description":"Enable/disable the floating indicator that shows when focused in the simple browser.","configuration.useIntegratedBrowser.description":"When enabled, the `simpleBrowser.show` command will open URLs in the integrated browser instead of the Simple Browser webview. **Note:** This setting is
|
|
1
|
+
{"displayName":"Simple Browser","description":"A very basic built-in webview for displaying web content.","configuration.focusLockIndicator.enabled.description":"Enable/disable the floating indicator that shows when focused in the simple browser.","configuration.useIntegratedBrowser.description":"When enabled, the `simpleBrowser.show` command will open URLs in the integrated browser instead of the Simple Browser webview. **Note:** This setting is only available on desktop."}
|