@codingame/monaco-vscode-host-service-override 4.5.0 → 4.5.2
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.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '
|
|
1
|
+
export { default } from 'vscode/service-override/host';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-host-service-override",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@4.5.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -31,12 +31,13 @@ import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
|
31
31
|
import { mainWindow, isAuxiliaryWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
32
32
|
import { isIOS, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
33
33
|
|
|
34
|
+
const _moduleId = "vs/workbench/services/host/browser/browserHostService";
|
|
34
35
|
var HostShutdownReason;
|
|
35
|
-
( (function(HostShutdownReason) {
|
|
36
|
+
( ((function(HostShutdownReason) {
|
|
36
37
|
HostShutdownReason[HostShutdownReason["Unknown"] = 1] = "Unknown";
|
|
37
38
|
HostShutdownReason[HostShutdownReason["Keyboard"] = 2] = "Keyboard";
|
|
38
39
|
HostShutdownReason[HostShutdownReason["Api"] = 3] = "Api";
|
|
39
|
-
})(HostShutdownReason || (HostShutdownReason = {})));
|
|
40
|
+
})(HostShutdownReason || (HostShutdownReason = {}))));
|
|
40
41
|
let BrowserHostService = class BrowserHostService extends Disposable {
|
|
41
42
|
constructor(layoutService, configurationService, fileService, labelService, environmentService, instantiationService, lifecycleService, logService, dialogService, contextService, userDataProfileService) {
|
|
42
43
|
super();
|
|
@@ -95,11 +96,11 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
get onDidChangeFocus() {
|
|
98
|
-
const emitter = this._register(( new Emitter()));
|
|
99
|
+
const emitter = this._register(( (new Emitter())));
|
|
99
100
|
this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {
|
|
100
101
|
const focusTracker = disposables.add(trackFocus(window));
|
|
101
|
-
const visibilityTracker = disposables.add(( new DomEmitter(window.document, 'visibilitychange')));
|
|
102
|
-
Event.any(( Event.map(focusTracker.onDidFocus, () => this.hasFocus, disposables)), ( Event.map(focusTracker.onDidBlur, () => this.hasFocus, disposables)), ( Event.map(visibilityTracker.event, () => this.hasFocus, disposables)), ( Event.map(this.onDidChangeActiveWindow, () => this.hasFocus, disposables)))(focus => emitter.fire(focus));
|
|
102
|
+
const visibilityTracker = disposables.add(( (new DomEmitter(window.document, 'visibilitychange'))));
|
|
103
|
+
Event.any(( (Event.map(focusTracker.onDidFocus, () => this.hasFocus, disposables))), ( (Event.map(focusTracker.onDidBlur, () => this.hasFocus, disposables))), ( (Event.map(visibilityTracker.event, () => this.hasFocus, disposables))), ( (Event.map(this.onDidChangeActiveWindow, () => this.hasFocus, disposables))))(focus => emitter.fire(focus));
|
|
103
104
|
}, { window: mainWindow, disposables: this._store }));
|
|
104
105
|
return Event.latch(emitter.event, undefined, this._store);
|
|
105
106
|
}
|
|
@@ -113,7 +114,7 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
113
114
|
targetWindow.focus();
|
|
114
115
|
}
|
|
115
116
|
get onDidChangeActiveWindow() {
|
|
116
|
-
const emitter = this._register(( new Emitter()));
|
|
117
|
+
const emitter = this._register(( (new Emitter())));
|
|
117
118
|
this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {
|
|
118
119
|
const windowId = getWindowId(window);
|
|
119
120
|
const focusTracker = disposables.add(trackFocus(window));
|
|
@@ -131,7 +132,7 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
131
132
|
return Event.latch(emitter.event, undefined, this._store);
|
|
132
133
|
}
|
|
133
134
|
get onDidChangeFullScreen() {
|
|
134
|
-
const emitter = this._register(( new Emitter()));
|
|
135
|
+
const emitter = this._register(( (new Emitter())));
|
|
135
136
|
this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {
|
|
136
137
|
const windowId = getWindowId(window);
|
|
137
138
|
const viewport = isIOS && window.visualViewport ? window.visualViewport : window ;
|
|
@@ -197,11 +198,11 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
197
198
|
});
|
|
198
199
|
}
|
|
199
200
|
else {
|
|
200
|
-
const environment = ( new Map());
|
|
201
|
-
environment.set('mergeFile1', ( editors[0].resource.toString()));
|
|
202
|
-
environment.set('mergeFile2', ( editors[1].resource.toString()));
|
|
203
|
-
environment.set('mergeFileBase', ( editors[2].resource.toString()));
|
|
204
|
-
environment.set('mergeFileResult', ( editors[3].resource.toString()));
|
|
201
|
+
const environment = ( (new Map()));
|
|
202
|
+
environment.set('mergeFile1', ( (editors[0].resource.toString())));
|
|
203
|
+
environment.set('mergeFile2', ( (editors[1].resource.toString())));
|
|
204
|
+
environment.set('mergeFileBase', ( (editors[2].resource.toString())));
|
|
205
|
+
environment.set('mergeFileResult', ( (editors[3].resource.toString())));
|
|
205
206
|
this.doOpen(undefined, { payload: Array.from(environment.entries()) });
|
|
206
207
|
}
|
|
207
208
|
}
|
|
@@ -218,9 +219,9 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
221
|
else {
|
|
221
|
-
const environment = ( new Map());
|
|
222
|
-
environment.set('diffFileSecondary', ( editors[0].resource.toString()));
|
|
223
|
-
environment.set('diffFilePrimary', ( editors[1].resource.toString()));
|
|
222
|
+
const environment = ( (new Map()));
|
|
223
|
+
environment.set('diffFileSecondary', ( (editors[0].resource.toString())));
|
|
224
|
+
environment.set('diffFilePrimary', ( (editors[1].resource.toString())));
|
|
224
225
|
this.doOpen(undefined, { payload: Array.from(environment.entries()) });
|
|
225
226
|
}
|
|
226
227
|
}
|
|
@@ -243,8 +244,8 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
243
244
|
editorService.openEditors(coalesce(await pathsToEditors(openables, this.fileService, this.logService)), undefined, { validateTrust: true });
|
|
244
245
|
}
|
|
245
246
|
else {
|
|
246
|
-
const environment = ( new Map());
|
|
247
|
-
environment.set('openFile', ( openable.fileUri.toString()));
|
|
247
|
+
const environment = ( (new Map()));
|
|
248
|
+
environment.set('openFile', ( (openable.fileUri.toString())));
|
|
248
249
|
if (options?.gotoLineMode) {
|
|
249
250
|
environment.set('gotoLineMode', 'true');
|
|
250
251
|
}
|
|
@@ -255,7 +256,7 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
255
256
|
const waitMarkerFileURI = options?.waitMarkerFileURI;
|
|
256
257
|
if (waitMarkerFileURI) {
|
|
257
258
|
(async () => {
|
|
258
|
-
await this.instantiationService.invokeFunction(accessor => whenEditorClosed(accessor, ( fileOpenables.map(fileOpenable => fileOpenable.fileUri))));
|
|
259
|
+
await this.instantiationService.invokeFunction(accessor => whenEditorClosed(accessor, ( (fileOpenables.map(fileOpenable => fileOpenable.fileUri)))));
|
|
259
260
|
await this.fileService.del(waitMarkerFileURI);
|
|
260
261
|
})();
|
|
261
262
|
}
|
|
@@ -266,9 +267,9 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
266
267
|
this.instantiationService.invokeFunction(accessor => fn(accessor));
|
|
267
268
|
}
|
|
268
269
|
preservePayload(isEmptyWindow) {
|
|
269
|
-
const newPayload = ( new Array());
|
|
270
|
+
const newPayload = ( (new Array()));
|
|
270
271
|
if (!isEmptyWindow && this.environmentService.extensionDevelopmentLocationURI) {
|
|
271
|
-
newPayload.push(['extensionDevelopmentPath', ( this.environmentService.extensionDevelopmentLocationURI.toString())]);
|
|
272
|
+
newPayload.push(['extensionDevelopmentPath', ( (this.environmentService.extensionDevelopmentLocationURI.toString()))]);
|
|
272
273
|
if (this.environmentService.debugExtensionHost.debugId) {
|
|
273
274
|
newPayload.push(['debugId', this.environmentService.debugExtensionHost.debugId]);
|
|
274
275
|
}
|
|
@@ -324,15 +325,11 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
324
325
|
const { confirmed } = await this.dialogService.confirm({
|
|
325
326
|
type: Severity$1.Warning,
|
|
326
327
|
message: ( localizeWithPath(
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
_moduleId,
|
|
329
|
+
0,
|
|
329
330
|
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
330
331
|
)),
|
|
331
|
-
primaryButton: ( localizeWithPath(
|
|
332
|
-
'vs/workbench/services/host/browser/browserHostService',
|
|
333
|
-
{ key: 'open', comment: ['&& denotes a mnemonic'] },
|
|
334
|
-
"&&Open"
|
|
335
|
-
))
|
|
332
|
+
primaryButton: ( localizeWithPath(_moduleId, 1, "&&Open"))
|
|
336
333
|
});
|
|
337
334
|
if (confirmed) {
|
|
338
335
|
await this.workspaceProvider.open(workspace, options);
|
|
@@ -404,27 +401,27 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
404
401
|
return this.lifecycleService.withExpectedShutdown(reason);
|
|
405
402
|
}
|
|
406
403
|
};
|
|
407
|
-
BrowserHostService.__decorator = ( __decorate([
|
|
404
|
+
BrowserHostService.__decorator = ( (__decorate([
|
|
408
405
|
memoize
|
|
409
|
-
], BrowserHostService.prototype, "onDidChangeFocus", null));
|
|
410
|
-
BrowserHostService.__decorator = ( __decorate([
|
|
406
|
+
], BrowserHostService.prototype, "onDidChangeFocus", null)));
|
|
407
|
+
BrowserHostService.__decorator = ( (__decorate([
|
|
411
408
|
memoize
|
|
412
|
-
], BrowserHostService.prototype, "onDidChangeActiveWindow", null));
|
|
413
|
-
BrowserHostService.__decorator = ( __decorate([
|
|
409
|
+
], BrowserHostService.prototype, "onDidChangeActiveWindow", null)));
|
|
410
|
+
BrowserHostService.__decorator = ( (__decorate([
|
|
414
411
|
memoize
|
|
415
|
-
], BrowserHostService.prototype, "onDidChangeFullScreen", null));
|
|
416
|
-
BrowserHostService = ( __decorate([
|
|
417
|
-
( __param(0, ILayoutService)),
|
|
418
|
-
( __param(1, IConfigurationService)),
|
|
419
|
-
( __param(2, IFileService)),
|
|
420
|
-
( __param(3, ILabelService)),
|
|
421
|
-
( __param(4, IBrowserWorkbenchEnvironmentService)),
|
|
422
|
-
( __param(5, IInstantiationService)),
|
|
423
|
-
( __param(6, ILifecycleService)),
|
|
424
|
-
( __param(7, ILogService)),
|
|
425
|
-
( __param(8, IDialogService)),
|
|
426
|
-
( __param(9, IWorkspaceContextService)),
|
|
427
|
-
( __param(10, IUserDataProfileService))
|
|
428
|
-
], BrowserHostService));
|
|
412
|
+
], BrowserHostService.prototype, "onDidChangeFullScreen", null)));
|
|
413
|
+
BrowserHostService = ( (__decorate([
|
|
414
|
+
( (__param(0, ILayoutService))),
|
|
415
|
+
( (__param(1, IConfigurationService))),
|
|
416
|
+
( (__param(2, IFileService))),
|
|
417
|
+
( (__param(3, ILabelService))),
|
|
418
|
+
( (__param(4, IBrowserWorkbenchEnvironmentService))),
|
|
419
|
+
( (__param(5, IInstantiationService))),
|
|
420
|
+
( (__param(6, ILifecycleService))),
|
|
421
|
+
( (__param(7, ILogService))),
|
|
422
|
+
( (__param(8, IDialogService))),
|
|
423
|
+
( (__param(9, IWorkspaceContextService))),
|
|
424
|
+
( (__param(10, IUserDataProfileService)))
|
|
425
|
+
], BrowserHostService)));
|
|
429
426
|
|
|
430
427
|
export { BrowserHostService };
|