@codingame/monaco-vscode-host-service-override 16.1.1 → 17.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-host-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.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,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common": "17.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "17.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-api": "17.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "17.0.0"
|
|
22
22
|
},
|
|
23
23
|
"main": "index.js",
|
|
24
24
|
"module": "index.js",
|
|
@@ -6,13 +6,15 @@ import { IWindowOpenable, IOpenWindowOptions, IOpenEmptyWindowOptions } from "@c
|
|
|
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-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common/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";
|
|
13
13
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
14
14
|
import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
|
|
15
15
|
import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
|
|
16
|
+
import { VSBuffer } from "@codingame/monaco-vscode-api/vscode/vs/base/common/buffer";
|
|
17
|
+
import { IElementData } from "@codingame/monaco-vscode-api/vscode/vs/platform/native/common/native";
|
|
16
18
|
export declare class BrowserHostService extends Disposable implements IHostService {
|
|
17
19
|
private readonly layoutService;
|
|
18
20
|
private readonly configurationService;
|
|
@@ -58,6 +60,8 @@ export declare class BrowserHostService extends Disposable implements IHostServi
|
|
|
58
60
|
close(): Promise<void>;
|
|
59
61
|
withExpectedShutdown<T>(expectedShutdownTask: () => Promise<T>): Promise<T>;
|
|
60
62
|
private handleExpectedShutdown;
|
|
61
|
-
getScreenshot(): Promise<
|
|
63
|
+
getScreenshot(): Promise<VSBuffer | undefined>;
|
|
64
|
+
getElementData(): Promise<IElementData | undefined>;
|
|
65
|
+
getBrowserId(): Promise<string | undefined>;
|
|
62
66
|
getNativeWindowHandle(_windowId: number): Promise<undefined>;
|
|
63
67
|
}
|
|
@@ -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-d0fb86d3-2a47-594e-955b-9a24631a7124-common/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-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/label/common/label';
|
|
14
14
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
15
15
|
import { ModifierKeyEmitter, onDidRegisterWindow, trackFocus, getActiveDocument, getWindowId, disposableWindowInterval, detectFullscreen, EventType, addDisposableListener, addDisposableThrottledListener } 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-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common/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';
|
|
@@ -34,6 +34,7 @@ import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arr
|
|
|
34
34
|
import { mainWindow, isAuxiliaryWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/window';
|
|
35
35
|
import { isIOS, isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
36
36
|
import { IUserDataProfilesService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
37
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
37
38
|
|
|
38
39
|
var HostShutdownReason;
|
|
39
40
|
(function (HostShutdownReason) {
|
|
@@ -103,7 +104,7 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
103
104
|
this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {
|
|
104
105
|
const focusTracker = disposables.add(trackFocus(window));
|
|
105
106
|
const visibilityTracker = disposables.add(( new DomEmitter(window.document, 'visibilitychange')));
|
|
106
|
-
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));
|
|
107
|
+
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), undefined, disposables);
|
|
107
108
|
}, { window: mainWindow, disposables: this._store }));
|
|
108
109
|
return Event.latch(emitter.event, undefined, this._store);
|
|
109
110
|
}
|
|
@@ -340,10 +341,10 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
340
341
|
const { confirmed } = await this.dialogService.confirm({
|
|
341
342
|
type: Severity.Warning,
|
|
342
343
|
message: ( localize(
|
|
343
|
-
|
|
344
|
+
12408,
|
|
344
345
|
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
345
346
|
)),
|
|
346
|
-
primaryButton: ( localize(
|
|
347
|
+
primaryButton: ( localize(12409, "&&Open"))
|
|
347
348
|
});
|
|
348
349
|
if (confirmed) {
|
|
349
350
|
await this.workspaceProvider.open(workspace, options);
|
|
@@ -442,7 +443,8 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
442
443
|
if (!blob) {
|
|
443
444
|
throw ( new Error('Failed to create blob from canvas'));
|
|
444
445
|
}
|
|
445
|
-
|
|
446
|
+
const buf = await blob.bytes();
|
|
447
|
+
return VSBuffer.wrap(buf);
|
|
446
448
|
}
|
|
447
449
|
catch (error) {
|
|
448
450
|
console.error('Error taking screenshot:', error);
|
|
@@ -457,6 +459,12 @@ let BrowserHostService = class BrowserHostService extends Disposable {
|
|
|
457
459
|
}
|
|
458
460
|
}
|
|
459
461
|
}
|
|
462
|
+
async getElementData() {
|
|
463
|
+
return undefined;
|
|
464
|
+
}
|
|
465
|
+
async getBrowserId() {
|
|
466
|
+
return undefined;
|
|
467
|
+
}
|
|
460
468
|
async getNativeWindowHandle(_windowId) {
|
|
461
469
|
return undefined;
|
|
462
470
|
}
|