@codingame/monaco-vscode-host-service-override 23.2.2 → 24.1.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
CHANGED
|
@@ -11,7 +11,7 @@ import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
11
11
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
12
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
13
13
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
14
|
-
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-
|
|
14
|
+
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
15
15
|
import { BrowserHostService } from './vscode/src/vs/workbench/services/host/browser/browserHostService.js';
|
|
16
16
|
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
17
17
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-host-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - host service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,10 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.2.2",
|
|
20
|
-
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "23.2.2",
|
|
21
|
-
"@codingame/monaco-vscode-api": "23.2.2"
|
|
18
|
+
"@codingame/monaco-vscode-api": "24.1.0"
|
|
22
19
|
},
|
|
23
20
|
"main": "index.js",
|
|
24
21
|
"module": "index.js",
|
|
@@ -2,11 +2,11 @@ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"
|
|
|
2
2
|
import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
|
|
3
3
|
import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
|
|
4
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
-
import { IWindowOpenable, IOpenWindowOptions, IOpenEmptyWindowOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window";
|
|
5
|
+
import { IWindowOpenable, IOpenWindowOptions, IOpenEmptyWindowOptions, IOpenedMainWindow, IOpenedAuxiliaryWindow } from "@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window";
|
|
6
6
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
7
7
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
8
8
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
9
|
-
import { IBrowserWorkbenchEnvironmentService } from "@codingame/monaco-vscode-
|
|
9
|
+
import { IBrowserWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/browser/environmentService.service";
|
|
10
10
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
11
11
|
import { BrowserLifecycleService } from "@codingame/monaco-vscode-lifecycle-service-override/vscode/vs/workbench/services/lifecycle/browser/lifecycleService";
|
|
12
12
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
@@ -54,6 +54,12 @@ export declare class BrowserHostService extends Disposable implements IHostServi
|
|
|
54
54
|
toggleFullScreen(targetWindow: Window): Promise<void>;
|
|
55
55
|
moveTop(targetWindow: Window): Promise<void>;
|
|
56
56
|
getCursorScreenPoint(): Promise<undefined>;
|
|
57
|
+
getWindows(options: {
|
|
58
|
+
includeAuxiliaryWindows: true;
|
|
59
|
+
}): Promise<Array<IOpenedMainWindow | IOpenedAuxiliaryWindow>>;
|
|
60
|
+
getWindows(options: {
|
|
61
|
+
includeAuxiliaryWindows: false;
|
|
62
|
+
}): Promise<Array<IOpenedMainWindow>>;
|
|
57
63
|
restart(): Promise<void>;
|
|
58
64
|
reload(): Promise<void>;
|
|
59
65
|
close(): Promise<void>;
|
|
@@ -8,13 +8,13 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
|
|
|
8
8
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
9
|
import { isFolderToOpen, isWorkspaceToOpen, isFileToOpen } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
|
|
10
10
|
import { pathsToEditors, isResourceEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
11
|
-
import { whenEditorClosed } from '@codingame/monaco-vscode-
|
|
11
|
+
import { whenEditorClosed } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/editor';
|
|
12
12
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
13
|
-
import { Verbosity } from '@codingame/monaco-vscode-
|
|
13
|
+
import { Verbosity } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label';
|
|
14
14
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
15
|
-
import { ModifierKeyEmitter, onDidRegisterWindow, trackFocus, getActiveDocument, getWindowId, disposableWindowInterval, detectFullscreen, EventType, addDisposableListener, addDisposableThrottledListener, createElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
15
|
+
import { ModifierKeyEmitter, onDidRegisterWindow, trackFocus, getActiveDocument, getWindowId, disposableWindowInterval, detectFullscreen, EventType, addDisposableListener, addDisposableThrottledListener, getActiveWindow, getWindows, createElement } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
16
16
|
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
17
|
-
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-
|
|
17
|
+
import { IBrowserWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/browser/environmentService.service';
|
|
18
18
|
import { memoize } from '@codingame/monaco-vscode-api/vscode/vs/base/common/decorators';
|
|
19
19
|
import { parseLineAndColumnAware } from '@codingame/monaco-vscode-api/vscode/vs/base/common/extpath';
|
|
20
20
|
import { IWorkspaceEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service';
|
|
@@ -27,7 +27,7 @@ import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severit
|
|
|
27
27
|
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
28
28
|
import { DomEmitter } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/event';
|
|
29
29
|
import { isUndefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
30
|
-
import { isTemporaryWorkspace } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
30
|
+
import { isTemporaryWorkspace, toWorkspaceIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
31
31
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
32
32
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
33
33
|
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
@@ -350,24 +350,24 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
350
350
|
type: Severity.Warning,
|
|
351
351
|
message: workspace ?
|
|
352
352
|
( localize(
|
|
353
|
-
|
|
353
|
+
14056,
|
|
354
354
|
"The browser blocked opening a new tab or window for '{0}'. Press 'Retry' to try again.",
|
|
355
355
|
this.getRecentLabel(workspace)
|
|
356
356
|
)) :
|
|
357
357
|
( localize(
|
|
358
|
-
|
|
358
|
+
14057,
|
|
359
359
|
"The browser blocked opening a new tab or window. Press 'Retry' to try again."
|
|
360
360
|
)),
|
|
361
361
|
custom: {
|
|
362
362
|
markdownDetails: [{ markdown: ( new MarkdownString(( localize(
|
|
363
|
-
|
|
363
|
+
14058,
|
|
364
364
|
"Please allow pop-ups for this website in your [browser settings]({0}).",
|
|
365
365
|
'https://aka.ms/allow-vscode-popup'
|
|
366
366
|
)), true)) }]
|
|
367
367
|
},
|
|
368
368
|
buttons: [
|
|
369
369
|
{
|
|
370
|
-
label: ( localize(
|
|
370
|
+
label: ( localize(14059, "&&Retry")),
|
|
371
371
|
run: () => this.workspaceProvider.open(workspace, options)
|
|
372
372
|
}
|
|
373
373
|
],
|
|
@@ -416,6 +416,29 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
416
416
|
async getCursorScreenPoint() {
|
|
417
417
|
return undefined;
|
|
418
418
|
}
|
|
419
|
+
async getWindows(options) {
|
|
420
|
+
const activeWindow = getActiveWindow();
|
|
421
|
+
const activeWindowId = getWindowId(activeWindow);
|
|
422
|
+
const result = [{
|
|
423
|
+
id: activeWindowId,
|
|
424
|
+
title: activeWindow.document.title,
|
|
425
|
+
workspace: toWorkspaceIdentifier(this.contextService.getWorkspace()),
|
|
426
|
+
dirty: false
|
|
427
|
+
}];
|
|
428
|
+
if (options.includeAuxiliaryWindows) {
|
|
429
|
+
for (const { window } of getWindows()) {
|
|
430
|
+
const windowId = getWindowId(window);
|
|
431
|
+
if (windowId !== activeWindowId && isAuxiliaryWindow(window)) {
|
|
432
|
+
result.push({
|
|
433
|
+
id: windowId,
|
|
434
|
+
title: window.document.title,
|
|
435
|
+
parentId: activeWindowId
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return result;
|
|
441
|
+
}
|
|
419
442
|
async restart() {
|
|
420
443
|
this.reload();
|
|
421
444
|
}
|
|
@@ -447,7 +470,7 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
447
470
|
store.add(toDisposable(() => video.remove()));
|
|
448
471
|
let stream;
|
|
449
472
|
try {
|
|
450
|
-
stream = await navigator.mediaDevices.getDisplayMedia({
|
|
473
|
+
stream = await mainWindow.navigator.mediaDevices.getDisplayMedia({
|
|
451
474
|
audio: false,
|
|
452
475
|
video: true
|
|
453
476
|
});
|