@codingame/monaco-vscode-view-common-service-override 4.5.1 → 5.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/package.json +3 -3
- package/viewCommon.js +3 -6
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +142 -221
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +49 -45
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +25 -38
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/media/auxiliaryBarPart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +20 -34
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +7 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -765
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +54 -19
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +122 -72
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +44 -44
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +25 -26
- package/vscode/src/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +22 -22
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +59 -88
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +39 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +13 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +35 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +41 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +6 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +13 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +5 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +13 -11
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +79 -49
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +9 -7
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
|
@@ -73,7 +73,7 @@ let OverlayWebview = class OverlayWebview extends Disposable {
|
|
|
73
73
|
}
|
|
74
74
|
get container() {
|
|
75
75
|
if (this._isDisposed) {
|
|
76
|
-
throw new Error(`OverlayWebview has been disposed`);
|
|
76
|
+
throw ( new Error(`OverlayWebview has been disposed`));
|
|
77
77
|
}
|
|
78
78
|
if (!this._container) {
|
|
79
79
|
const node = document.createElement('div');
|
|
@@ -163,7 +163,7 @@ let OverlayWebview = class OverlayWebview extends Disposable {
|
|
|
163
163
|
}
|
|
164
164
|
_show(targetWindow) {
|
|
165
165
|
if (this._isDisposed) {
|
|
166
|
-
throw new Error('OverlayWebview is disposed');
|
|
166
|
+
throw ( new Error('OverlayWebview is disposed'));
|
|
167
167
|
}
|
|
168
168
|
if (!this._webview.value) {
|
|
169
169
|
const webview = this._webviewService.createWebviewElement({
|
|
@@ -29,12 +29,13 @@ import { WebviewFindWidget } from './webviewFindWidget.js';
|
|
|
29
29
|
import { decodeAuthority, webviewRootResourceAuthority, webviewGenericCspSource } from 'vscode/vscode/vs/workbench/contrib/webview/common/webview';
|
|
30
30
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
31
31
|
|
|
32
|
+
const _moduleId = "vs/workbench/contrib/webview/browser/webviewElement";
|
|
32
33
|
var WebviewState;
|
|
33
|
-
( (function(WebviewState) {
|
|
34
|
-
( (function(Type) {
|
|
34
|
+
( ((function(WebviewState) {
|
|
35
|
+
( ((function(Type) {
|
|
35
36
|
Type[Type["Initializing"] = 0] = "Initializing";
|
|
36
37
|
Type[Type["Ready"] = 1] = "Ready";
|
|
37
|
-
})(WebviewState.Type || (WebviewState.Type = {})));
|
|
38
|
+
})(WebviewState.Type || (WebviewState.Type = {}))));
|
|
38
39
|
class Initializing {
|
|
39
40
|
constructor(pendingMessages) {
|
|
40
41
|
this.pendingMessages = pendingMessages;
|
|
@@ -43,7 +44,7 @@ var WebviewState;
|
|
|
43
44
|
}
|
|
44
45
|
WebviewState.Initializing = Initializing;
|
|
45
46
|
WebviewState.Ready = { type: 1 };
|
|
46
|
-
})(WebviewState || (WebviewState = {})));
|
|
47
|
+
})(WebviewState || (WebviewState = {}))));
|
|
47
48
|
const webviewIdContext = 'webviewId';
|
|
48
49
|
let WebviewElement = class WebviewElement extends Disposable {
|
|
49
50
|
get window() { return typeof this._windowId === 'number' ? getWindowById(this._windowId)?.window : undefined; }
|
|
@@ -75,39 +76,39 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
75
76
|
this._windowId = undefined;
|
|
76
77
|
this._expectedServiceWorkerVersion = 4;
|
|
77
78
|
this._state = new WebviewState.Initializing([]);
|
|
78
|
-
this._resourceLoadingCts = this._register(( new CancellationTokenSource()));
|
|
79
|
-
this._focusDelayer = this._register(( new ThrottledDelayer(50)));
|
|
80
|
-
this._onDidHtmlChange = this._register(( new Emitter()));
|
|
79
|
+
this._resourceLoadingCts = this._register(( (new CancellationTokenSource())));
|
|
80
|
+
this._focusDelayer = this._register(( (new ThrottledDelayer(50))));
|
|
81
|
+
this._onDidHtmlChange = this._register(( (new Emitter())));
|
|
81
82
|
this.onDidHtmlChange = this._onDidHtmlChange.event;
|
|
82
|
-
this._messageHandlers = ( new Map());
|
|
83
|
+
this._messageHandlers = ( (new Map()));
|
|
83
84
|
this.checkImeCompletionState = true;
|
|
84
85
|
this._disposed = false;
|
|
85
|
-
this._onMissingCsp = this._register(( new Emitter()));
|
|
86
|
+
this._onMissingCsp = this._register(( (new Emitter())));
|
|
86
87
|
this.onMissingCsp = this._onMissingCsp.event;
|
|
87
|
-
this._onDidClickLink = this._register(( new Emitter()));
|
|
88
|
+
this._onDidClickLink = this._register(( (new Emitter())));
|
|
88
89
|
this.onDidClickLink = this._onDidClickLink.event;
|
|
89
|
-
this._onDidReload = this._register(( new Emitter()));
|
|
90
|
+
this._onDidReload = this._register(( (new Emitter())));
|
|
90
91
|
this.onDidReload = this._onDidReload.event;
|
|
91
|
-
this._onMessage = this._register(( new Emitter()));
|
|
92
|
+
this._onMessage = this._register(( (new Emitter())));
|
|
92
93
|
this.onMessage = this._onMessage.event;
|
|
93
|
-
this._onDidScroll = this._register(( new Emitter()));
|
|
94
|
+
this._onDidScroll = this._register(( (new Emitter())));
|
|
94
95
|
this.onDidScroll = this._onDidScroll.event;
|
|
95
|
-
this._onDidWheel = this._register(( new Emitter()));
|
|
96
|
+
this._onDidWheel = this._register(( (new Emitter())));
|
|
96
97
|
this.onDidWheel = this._onDidWheel.event;
|
|
97
|
-
this._onDidUpdateState = this._register(( new Emitter()));
|
|
98
|
+
this._onDidUpdateState = this._register(( (new Emitter())));
|
|
98
99
|
this.onDidUpdateState = this._onDidUpdateState.event;
|
|
99
|
-
this._onDidFocus = this._register(( new Emitter()));
|
|
100
|
+
this._onDidFocus = this._register(( (new Emitter())));
|
|
100
101
|
this.onDidFocus = this._onDidFocus.event;
|
|
101
|
-
this._onDidBlur = this._register(( new Emitter()));
|
|
102
|
+
this._onDidBlur = this._register(( (new Emitter())));
|
|
102
103
|
this.onDidBlur = this._onDidBlur.event;
|
|
103
|
-
this._onFatalError = this._register(( new Emitter()));
|
|
104
|
+
this._onFatalError = this._register(( (new Emitter())));
|
|
104
105
|
this.onFatalError = this._onFatalError.event;
|
|
105
|
-
this._onDidDispose = this._register(( new Emitter()));
|
|
106
|
+
this._onDidDispose = this._register(( (new Emitter())));
|
|
106
107
|
this.onDidDispose = this._onDidDispose.event;
|
|
107
108
|
this._hasAlertedAboutMissingCsp = false;
|
|
108
|
-
this._hasFindResult = this._register(( new Emitter()));
|
|
109
|
+
this._hasFindResult = this._register(( (new Emitter())));
|
|
109
110
|
this.hasFindResult = this._hasFindResult.event;
|
|
110
|
-
this._onDidStopFind = this._register(( new Emitter()));
|
|
111
|
+
this._onDidStopFind = this._register(( (new Emitter())));
|
|
111
112
|
this.onDidStopFind = this._onDidStopFind.event;
|
|
112
113
|
this.providedViewType = initInfo.providedViewType;
|
|
113
114
|
this.origin = initInfo.origin ?? this.id;
|
|
@@ -119,11 +120,11 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
119
120
|
options: initInfo.contentOptions,
|
|
120
121
|
state: undefined
|
|
121
122
|
};
|
|
122
|
-
this._portMappingManager = this._register(( new WebviewPortMappingManager(
|
|
123
|
+
this._portMappingManager = this._register(( (new WebviewPortMappingManager(
|
|
123
124
|
() => this.extension?.location,
|
|
124
125
|
() => this._content.options.portMapping || [],
|
|
125
126
|
this._tunnelService
|
|
126
|
-
)));
|
|
127
|
+
))));
|
|
127
128
|
this._element = this._createElement(initInfo.options, initInfo.contentOptions);
|
|
128
129
|
this._register(this.on('no-csp-found', () => {
|
|
129
130
|
this.handleNoCspFound();
|
|
@@ -157,12 +158,7 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
157
158
|
this._hasFindResult.fire(didFind);
|
|
158
159
|
}));
|
|
159
160
|
this._register(this.on('fatal-error', (e) => {
|
|
160
|
-
notificationService.error(( localizeWithPath(
|
|
161
|
-
'vs/workbench/contrib/webview/browser/webviewElement',
|
|
162
|
-
'fatalErrorMessage',
|
|
163
|
-
"Error loading webview: {0}",
|
|
164
|
-
e.message
|
|
165
|
-
)));
|
|
161
|
+
notificationService.error(( localizeWithPath(_moduleId, 0, "Error loading webview: {0}", e.message)));
|
|
166
162
|
this._onFatalError.fire({ message: e.message });
|
|
167
163
|
}));
|
|
168
164
|
this._register(this.on('did-keydown', (data) => {
|
|
@@ -197,12 +193,12 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
197
193
|
this._register(this.on('load-resource', async (entry) => {
|
|
198
194
|
try {
|
|
199
195
|
const authority = decodeAuthority(entry.authority);
|
|
200
|
-
const uri = ( URI.from({
|
|
196
|
+
const uri = ( (URI.from({
|
|
201
197
|
scheme: entry.scheme,
|
|
202
198
|
authority: authority,
|
|
203
199
|
path: decodeURIComponent(entry.path),
|
|
204
200
|
query: entry.query ? decodeURIComponent(entry.query) : entry.query,
|
|
205
|
-
}));
|
|
201
|
+
})));
|
|
206
202
|
this.loadResource(entry.id, uri, entry.ifNoneMatch);
|
|
207
203
|
}
|
|
208
204
|
catch (e) {
|
|
@@ -303,13 +299,13 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
303
299
|
if (options.purpose) {
|
|
304
300
|
params.purpose = options.purpose;
|
|
305
301
|
}
|
|
306
|
-
params.serviceWorkerUri = ( ( FileAccess.asBrowserUri('vs/workbench/contrib/webview/browser/pre/service-worker.js')).toString(true));
|
|
307
|
-
params.fakeHtmlUri = ( ( FileAccess.asBrowserUri('vs/workbench/contrib/webview/browser/pre/fake.html')).toString(true));
|
|
302
|
+
params.serviceWorkerUri = ( (( (FileAccess.asBrowserUri('vs/workbench/contrib/webview/browser/pre/service-worker.js'))).toString(true)));
|
|
303
|
+
params.fakeHtmlUri = ( (( (FileAccess.asBrowserUri('vs/workbench/contrib/webview/browser/pre/fake.html'))).toString(true)));
|
|
308
304
|
COI.addSearchParam(params, true, true);
|
|
309
|
-
const queryString = ( ( new URLSearchParams(params)).toString());
|
|
305
|
+
const queryString = ( (( (new URLSearchParams(params))).toString()));
|
|
310
306
|
const fileName = isFirefox ? 'index-no-csp.html' : 'index.html';
|
|
311
|
-
const relativeIframeSrc = ( FileAccess.asBrowserUri(`vs/workbench/contrib/webview/browser/pre/${fileName}`));
|
|
312
|
-
this.element.setAttribute('src', `${( relativeIframeSrc.toString(true))}?${queryString}`);
|
|
307
|
+
const relativeIframeSrc = ( (FileAccess.asBrowserUri(`vs/workbench/contrib/webview/browser/pre/${fileName}`)));
|
|
308
|
+
this.element.setAttribute('src', `${( (relativeIframeSrc.toString(true)))}?${queryString}`);
|
|
313
309
|
}
|
|
314
310
|
mountTo(element, targetWindow) {
|
|
315
311
|
if (!this.element) {
|
|
@@ -380,7 +376,9 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
380
376
|
webviewContentEndpoint(encodedWebviewOrigin) {
|
|
381
377
|
const webviewExternalEndpoint = this._environmentService.webviewExternalEndpoint;
|
|
382
378
|
if (!webviewExternalEndpoint) {
|
|
383
|
-
throw new Error(
|
|
379
|
+
throw ( (new Error(
|
|
380
|
+
`'webviewExternalEndpoint' has not been configured. Webviews will not work!`
|
|
381
|
+
)));
|
|
384
382
|
}
|
|
385
383
|
const endpoint = webviewExternalEndpoint.replace('{{uuid}}', encodedWebviewOrigin);
|
|
386
384
|
if (endpoint[endpoint.length - 1] === '/') {
|
|
@@ -398,7 +396,7 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
398
396
|
on(channel, handler) {
|
|
399
397
|
let handlers = this._messageHandlers.get(channel);
|
|
400
398
|
if (!handlers) {
|
|
401
|
-
handlers = ( new Set());
|
|
399
|
+
handlers = ( (new Set()));
|
|
402
400
|
this._messageHandlers.set(channel, handlers);
|
|
403
401
|
}
|
|
404
402
|
handlers.add(handler);
|
|
@@ -492,7 +490,7 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
492
490
|
}
|
|
493
491
|
}
|
|
494
492
|
handleKeyEvent(type, event) {
|
|
495
|
-
const emulatedKeyboardEvent = ( new KeyboardEvent(type, event));
|
|
493
|
+
const emulatedKeyboardEvent = ( (new KeyboardEvent(type, event)));
|
|
496
494
|
Object.defineProperty(emulatedKeyboardEvent, 'target', {
|
|
497
495
|
get: () => this.element,
|
|
498
496
|
});
|
|
@@ -639,18 +637,18 @@ let WebviewElement = class WebviewElement extends Disposable {
|
|
|
639
637
|
this._webviewFindWidget?.find(previous);
|
|
640
638
|
}
|
|
641
639
|
};
|
|
642
|
-
WebviewElement = ( __decorate([
|
|
643
|
-
( __param(2, IConfigurationService)),
|
|
644
|
-
( __param(3, IContextMenuService)),
|
|
645
|
-
( __param(4, INotificationService)),
|
|
646
|
-
( __param(5, IWorkbenchEnvironmentService)),
|
|
647
|
-
( __param(6, IFileService)),
|
|
648
|
-
( __param(7, ILogService)),
|
|
649
|
-
( __param(8, IRemoteAuthorityResolverService)),
|
|
650
|
-
( __param(9, ITelemetryService)),
|
|
651
|
-
( __param(10, ITunnelService)),
|
|
652
|
-
( __param(11, IInstantiationService)),
|
|
653
|
-
( __param(12, IAccessibilityService))
|
|
654
|
-
], WebviewElement));
|
|
640
|
+
WebviewElement = ( (__decorate([
|
|
641
|
+
( (__param(2, IConfigurationService))),
|
|
642
|
+
( (__param(3, IContextMenuService))),
|
|
643
|
+
( (__param(4, INotificationService))),
|
|
644
|
+
( (__param(5, IWorkbenchEnvironmentService))),
|
|
645
|
+
( (__param(6, IFileService))),
|
|
646
|
+
( (__param(7, ILogService))),
|
|
647
|
+
( (__param(8, IRemoteAuthorityResolverService))),
|
|
648
|
+
( (__param(9, ITelemetryService))),
|
|
649
|
+
( (__param(10, ITunnelService))),
|
|
650
|
+
( (__param(11, IInstantiationService))),
|
|
651
|
+
( (__param(12, IAccessibilityService)))
|
|
652
|
+
], WebviewElement)));
|
|
655
653
|
|
|
656
654
|
export { WebviewElement };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
3
3
|
import { IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
4
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
4
5
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
5
6
|
import { SimpleFindWidget } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget';
|
|
6
7
|
import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
@@ -9,12 +10,12 @@ let WebviewFindWidget = class WebviewFindWidget extends SimpleFindWidget {
|
|
|
9
10
|
async _getResultCount(dataChanged) {
|
|
10
11
|
return undefined;
|
|
11
12
|
}
|
|
12
|
-
constructor(_delegate, contextViewService, contextKeyService, keybindingService) {
|
|
13
|
+
constructor(_delegate, contextViewService, contextKeyService, hoverService, keybindingService) {
|
|
13
14
|
super({
|
|
14
15
|
showCommonFindToggles: false,
|
|
15
16
|
checkImeCompletionState: _delegate.checkImeCompletionState,
|
|
16
17
|
enableSash: true,
|
|
17
|
-
}, contextViewService, contextKeyService, keybindingService);
|
|
18
|
+
}, contextViewService, contextKeyService, hoverService, keybindingService);
|
|
18
19
|
this._delegate = _delegate;
|
|
19
20
|
this._findWidgetFocused = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(contextKeyService);
|
|
20
21
|
this._register(_delegate.hasFindResult(hasResult => {
|
|
@@ -59,7 +60,8 @@ let WebviewFindWidget = class WebviewFindWidget extends SimpleFindWidget {
|
|
|
59
60
|
WebviewFindWidget = ( __decorate([
|
|
60
61
|
( __param(1, IContextViewService)),
|
|
61
62
|
( __param(2, IContextKeyService)),
|
|
62
|
-
( __param(3,
|
|
63
|
+
( __param(3, IHoverService)),
|
|
64
|
+
( __param(4, IKeybindingService))
|
|
63
65
|
], WebviewFindWidget));
|
|
64
66
|
|
|
65
67
|
export { WebviewFindWidget };
|
|
@@ -9,23 +9,23 @@ import { WebviewEditor } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/b
|
|
|
9
9
|
import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
10
10
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const _moduleId = "vs/workbench/contrib/webviewPanel/browser/webviewCommands";
|
|
13
|
+
const webviewActiveContextKeyExpr = ( (ContextKeyExpr.and(
|
|
14
|
+
(ContextKeyExpr.equals('activeEditor', WebviewEditor.ID)),
|
|
15
|
+
(EditorContextKeys.focus.toNegated())
|
|
16
|
+
)));
|
|
13
17
|
class ShowWebViewEditorFindWidgetAction extends Action2 {
|
|
14
18
|
static { this.ID = 'editor.action.webvieweditor.showFind'; }
|
|
15
|
-
static { this.LABEL = ( localizeWithPath(
|
|
16
|
-
'vs/workbench/contrib/webviewPanel/browser/webviewCommands',
|
|
17
|
-
'editor.action.webvieweditor.showFind',
|
|
18
|
-
"Show find"
|
|
19
|
-
)); }
|
|
19
|
+
static { this.LABEL = ( localizeWithPath(_moduleId, 0, "Show find")); }
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: ShowWebViewEditorFindWidgetAction.ID,
|
|
23
23
|
title: ShowWebViewEditorFindWidgetAction.LABEL,
|
|
24
24
|
keybinding: {
|
|
25
|
-
when: ( ContextKeyExpr.and(
|
|
25
|
+
when: ( (ContextKeyExpr.and(
|
|
26
26
|
webviewActiveContextKeyExpr,
|
|
27
27
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED
|
|
28
|
-
)),
|
|
28
|
+
))),
|
|
29
29
|
primary: 2048 | 36 ,
|
|
30
30
|
weight: 100
|
|
31
31
|
}
|
|
@@ -37,20 +37,16 @@ class ShowWebViewEditorFindWidgetAction extends Action2 {
|
|
|
37
37
|
}
|
|
38
38
|
class HideWebViewEditorFindCommand extends Action2 {
|
|
39
39
|
static { this.ID = 'editor.action.webvieweditor.hideFind'; }
|
|
40
|
-
static { this.LABEL = ( localizeWithPath(
|
|
41
|
-
'vs/workbench/contrib/webviewPanel/browser/webviewCommands',
|
|
42
|
-
'editor.action.webvieweditor.hideFind',
|
|
43
|
-
"Stop find"
|
|
44
|
-
)); }
|
|
40
|
+
static { this.LABEL = ( localizeWithPath(_moduleId, 1, "Stop find")); }
|
|
45
41
|
constructor() {
|
|
46
42
|
super({
|
|
47
43
|
id: HideWebViewEditorFindCommand.ID,
|
|
48
44
|
title: HideWebViewEditorFindCommand.LABEL,
|
|
49
45
|
keybinding: {
|
|
50
|
-
when: ( ContextKeyExpr.and(
|
|
46
|
+
when: ( (ContextKeyExpr.and(
|
|
51
47
|
webviewActiveContextKeyExpr,
|
|
52
48
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE
|
|
53
|
-
)),
|
|
49
|
+
))),
|
|
54
50
|
primary: 9 ,
|
|
55
51
|
weight: 100
|
|
56
52
|
}
|
|
@@ -62,20 +58,16 @@ class HideWebViewEditorFindCommand extends Action2 {
|
|
|
62
58
|
}
|
|
63
59
|
class WebViewEditorFindNextCommand extends Action2 {
|
|
64
60
|
static { this.ID = 'editor.action.webvieweditor.findNext'; }
|
|
65
|
-
static { this.LABEL = ( localizeWithPath(
|
|
66
|
-
'vs/workbench/contrib/webviewPanel/browser/webviewCommands',
|
|
67
|
-
'editor.action.webvieweditor.findNext',
|
|
68
|
-
'Find next'
|
|
69
|
-
)); }
|
|
61
|
+
static { this.LABEL = ( localizeWithPath(_moduleId, 2, 'Find next')); }
|
|
70
62
|
constructor() {
|
|
71
63
|
super({
|
|
72
64
|
id: WebViewEditorFindNextCommand.ID,
|
|
73
65
|
title: WebViewEditorFindNextCommand.LABEL,
|
|
74
66
|
keybinding: {
|
|
75
|
-
when: ( ContextKeyExpr.and(
|
|
67
|
+
when: ( (ContextKeyExpr.and(
|
|
76
68
|
webviewActiveContextKeyExpr,
|
|
77
69
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED
|
|
78
|
-
)),
|
|
70
|
+
))),
|
|
79
71
|
primary: 3 ,
|
|
80
72
|
weight: 100
|
|
81
73
|
}
|
|
@@ -87,20 +79,16 @@ class WebViewEditorFindNextCommand extends Action2 {
|
|
|
87
79
|
}
|
|
88
80
|
class WebViewEditorFindPreviousCommand extends Action2 {
|
|
89
81
|
static { this.ID = 'editor.action.webvieweditor.findPrevious'; }
|
|
90
|
-
static { this.LABEL = ( localizeWithPath(
|
|
91
|
-
'vs/workbench/contrib/webviewPanel/browser/webviewCommands',
|
|
92
|
-
'editor.action.webvieweditor.findPrevious',
|
|
93
|
-
'Find previous'
|
|
94
|
-
)); }
|
|
82
|
+
static { this.LABEL = ( localizeWithPath(_moduleId, 3, 'Find previous')); }
|
|
95
83
|
constructor() {
|
|
96
84
|
super({
|
|
97
85
|
id: WebViewEditorFindPreviousCommand.ID,
|
|
98
86
|
title: WebViewEditorFindPreviousCommand.LABEL,
|
|
99
87
|
keybinding: {
|
|
100
|
-
when: ( ContextKeyExpr.and(
|
|
88
|
+
when: ( (ContextKeyExpr.and(
|
|
101
89
|
webviewActiveContextKeyExpr,
|
|
102
90
|
KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED
|
|
103
|
-
)),
|
|
91
|
+
))),
|
|
104
92
|
primary: 1024 | 3 ,
|
|
105
93
|
weight: 100
|
|
106
94
|
}
|
|
@@ -112,11 +100,7 @@ class WebViewEditorFindPreviousCommand extends Action2 {
|
|
|
112
100
|
}
|
|
113
101
|
class ReloadWebviewAction extends Action2 {
|
|
114
102
|
static { this.ID = 'workbench.action.webview.reloadWebviewAction'; }
|
|
115
|
-
static { this.LABEL = ( localize2WithPath(
|
|
116
|
-
'vs/workbench/contrib/webviewPanel/browser/webviewCommands',
|
|
117
|
-
'refreshWebviewLabel',
|
|
118
|
-
"Reload Webviews"
|
|
119
|
-
)); }
|
|
103
|
+
static { this.LABEL = ( localize2WithPath(_moduleId, 4, "Reload Webviews")); }
|
|
120
104
|
constructor() {
|
|
121
105
|
super({
|
|
122
106
|
id: ReloadWebviewAction.ID,
|
|
@@ -16,11 +16,8 @@ import 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbench
|
|
|
16
16
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
17
17
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'webview.editor.label',
|
|
22
|
-
"webview editor"
|
|
23
|
-
))), [( new SyncDescriptor(WebviewInput))]);
|
|
19
|
+
const _moduleId = "vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution";
|
|
20
|
+
(( (Registry.as(EditorExtensions.EditorPane)))).registerEditorPane(EditorPaneDescriptor.create(WebviewEditor, WebviewEditor.ID, ( localizeWithPath(_moduleId, 0, "webview editor"))), [( (new SyncDescriptor(WebviewInput)))]);
|
|
24
21
|
let WebviewPanelContribution = class WebviewPanelContribution extends Disposable {
|
|
25
22
|
static { this.ID = 'workbench.contrib.webviewPanel'; }
|
|
26
23
|
constructor(editorService, editorGroupService) {
|
|
@@ -54,12 +51,12 @@ let WebviewPanelContribution = class WebviewPanelContribution extends Disposable
|
|
|
54
51
|
previousGroup.closeEditor(editor);
|
|
55
52
|
}
|
|
56
53
|
};
|
|
57
|
-
WebviewPanelContribution = ( __decorate([
|
|
58
|
-
( __param(0, IEditorService)),
|
|
59
|
-
( __param(1, IEditorGroupsService))
|
|
60
|
-
], WebviewPanelContribution));
|
|
54
|
+
WebviewPanelContribution = ( (__decorate([
|
|
55
|
+
( (__param(0, IEditorService))),
|
|
56
|
+
( (__param(1, IEditorGroupsService)))
|
|
57
|
+
], WebviewPanelContribution)));
|
|
61
58
|
registerWorkbenchContribution2(WebviewPanelContribution.ID, WebviewPanelContribution, 1 );
|
|
62
|
-
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(WebviewEditorInputSerializer.ID, WebviewEditorInputSerializer);
|
|
59
|
+
( (Registry.as(EditorExtensions.EditorFactory))).registerEditorSerializer(WebviewEditorInputSerializer.ID, WebviewEditorInputSerializer);
|
|
63
60
|
registerAction2(ShowWebViewEditorFindWidgetAction);
|
|
64
61
|
registerAction2(HideWebViewEditorFindCommand);
|
|
65
62
|
registerAction2(WebViewEditorFindNextCommand);
|
|
@@ -25,6 +25,7 @@ import { IWebviewViewService } from 'vscode/vscode/vs/workbench/contrib/webviewV
|
|
|
25
25
|
import { NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
|
|
26
26
|
import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
|
|
27
27
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
28
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
28
29
|
|
|
29
30
|
var WebviewViewPane_1;
|
|
30
31
|
const storageKeys = {
|
|
@@ -36,8 +37,8 @@ let WebviewViewPane = class WebviewViewPane extends ViewPane {
|
|
|
36
37
|
this._originStore ??= ( new ExtensionKeyedWebviewOriginStore('webviewViews.origins', storageService));
|
|
37
38
|
return this._originStore;
|
|
38
39
|
}
|
|
39
|
-
constructor(options, configurationService, contextKeyService, contextMenuService, instantiationService, keybindingService, openerService, telemetryService, themeService, viewDescriptorService, activityService, extensionService, progressService, storageService, viewService, webviewService, webviewViewService) {
|
|
40
|
-
super({ ...options, titleMenuId: MenuId.ViewTitle, showActions: ViewPaneShowActions.WhenExpanded }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
40
|
+
constructor(options, configurationService, contextKeyService, contextMenuService, instantiationService, keybindingService, openerService, telemetryService, hoverService, themeService, viewDescriptorService, activityService, extensionService, progressService, storageService, viewService, webviewService, webviewViewService) {
|
|
41
|
+
super({ ...options, titleMenuId: MenuId.ViewTitle, showActions: ViewPaneShowActions.WhenExpanded }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
41
42
|
this.activityService = activityService;
|
|
42
43
|
this.extensionService = extensionService;
|
|
43
44
|
this.progressService = progressService;
|
|
@@ -220,15 +221,16 @@ WebviewViewPane = WebviewViewPane_1 = ( __decorate([
|
|
|
220
221
|
( __param(5, IKeybindingService)),
|
|
221
222
|
( __param(6, IOpenerService)),
|
|
222
223
|
( __param(7, ITelemetryService)),
|
|
223
|
-
( __param(8,
|
|
224
|
-
( __param(9,
|
|
225
|
-
( __param(10,
|
|
226
|
-
( __param(11,
|
|
227
|
-
( __param(12,
|
|
228
|
-
( __param(13,
|
|
229
|
-
( __param(14,
|
|
230
|
-
( __param(15,
|
|
231
|
-
( __param(16,
|
|
224
|
+
( __param(8, IHoverService)),
|
|
225
|
+
( __param(9, IThemeService)),
|
|
226
|
+
( __param(10, IViewDescriptorService)),
|
|
227
|
+
( __param(11, IActivityService)),
|
|
228
|
+
( __param(12, IExtensionService)),
|
|
229
|
+
( __param(13, IProgressService)),
|
|
230
|
+
( __param(14, IStorageService)),
|
|
231
|
+
( __param(15, IViewsService)),
|
|
232
|
+
( __param(16, IWebviewService)),
|
|
233
|
+
( __param(17, IWebviewViewService))
|
|
232
234
|
], WebviewViewPane));
|
|
233
235
|
|
|
234
236
|
export { WebviewViewPane };
|
|
@@ -13,7 +13,7 @@ class WebviewViewService extends Disposable {
|
|
|
13
13
|
}
|
|
14
14
|
register(viewType, resolver) {
|
|
15
15
|
if (( this._resolvers.has(viewType))) {
|
|
16
|
-
throw new Error(`View resolver already registered for ${viewType}`);
|
|
16
|
+
throw ( new Error(`View resolver already registered for ${viewType}`));
|
|
17
17
|
}
|
|
18
18
|
this._resolvers.set(viewType, resolver);
|
|
19
19
|
this._onNewResolverRegistered.fire({ viewType: viewType });
|
|
@@ -32,7 +32,7 @@ class WebviewViewService extends Disposable {
|
|
|
32
32
|
const resolver = this._resolvers.get(viewType);
|
|
33
33
|
if (!resolver) {
|
|
34
34
|
if (( this._awaitingRevival.has(viewType))) {
|
|
35
|
-
throw new Error('View already awaiting revival');
|
|
35
|
+
throw ( new Error('View already awaiting revival'));
|
|
36
36
|
}
|
|
37
37
|
const { promise, resolve } = promiseWithResolvers();
|
|
38
38
|
this._awaitingRevival.set(viewType, { webview, resolve });
|