@codingame/monaco-vscode-api 16.0.1 → 16.0.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/missing-services.js +2 -2
- package/package.json +8 -8
- package/services.js +5 -5
- package/vscode/src/vs/editor/editor.worker.start.d.ts +2 -0
- package/vscode/src/vs/editor/editor.worker.start.js +27 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionList.d.ts +3 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +7 -4
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +1 -3
- package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.js +7 -5
- package/workers/editor.worker.d.ts +7 -1
- package/workers/editor.worker.js +20 -0
package/missing-services.js
CHANGED
|
@@ -1304,8 +1304,8 @@ registerSingleton(IPathService, PathService, InstantiationType.Delayed);
|
|
|
1304
1304
|
class ProductService {
|
|
1305
1305
|
constructor() {
|
|
1306
1306
|
this._serviceBrand = undefined;
|
|
1307
|
-
this.version = "1.99.
|
|
1308
|
-
this.commit = "
|
|
1307
|
+
this.version = "1.99.2";
|
|
1308
|
+
this.commit = "4949701c880d4bdb949e3c0e6b400288da7f474b";
|
|
1309
1309
|
this.quality = 'oss';
|
|
1310
1310
|
this.nameShort = 'Code - OSS Dev';
|
|
1311
1311
|
this.nameLong = 'Code - OSS Dev';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "16.0.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "16.0.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "16.0.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "16.0.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "16.0.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "16.0.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "16.0.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "16.0.2",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "16.0.2",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "16.0.2",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "16.0.2",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "16.0.2",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "16.0.2",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "16.0.2",
|
|
25
25
|
"marked": "14.0.0"
|
|
26
26
|
},
|
|
27
27
|
"main": "services.js",
|
package/services.js
CHANGED
|
@@ -181,18 +181,18 @@ export { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/k
|
|
|
181
181
|
export { ISecretStorageService } from './vscode/src/vs/platform/secrets/common/secrets.service.js';
|
|
182
182
|
export { ConfigurationTarget } from './vscode/src/vs/platform/configuration/common/configuration.js';
|
|
183
183
|
|
|
184
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.99.
|
|
185
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.99.
|
|
184
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.99.2-b6f55cb7-31f9-4b50-9e8e-df1c373dc578") {
|
|
185
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.99.2-b6f55cb7-31f9-4b50-9e8e-df1c373dc578"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
186
186
|
}
|
|
187
|
-
window.monacoVscodeApiBuildId = "1.99.
|
|
187
|
+
window.monacoVscodeApiBuildId = "1.99.2-b6f55cb7-31f9-4b50-9e8e-df1c373dc578";
|
|
188
188
|
async function initialize(overrides, container = document.body, configuration = {}, env) {
|
|
189
189
|
checkServicesNotInitialized();
|
|
190
190
|
initialize$1(container, configuration, env);
|
|
191
191
|
const instantiationService = StandaloneServices.initialize({
|
|
192
192
|
[IProductService.toString()]: mixin({
|
|
193
|
-
version: "1.99.
|
|
193
|
+
version: "1.99.2",
|
|
194
194
|
quality: 'stable',
|
|
195
|
-
commit: "
|
|
195
|
+
commit: "4949701c880d4bdb949e3c0e6b400288da7f474b",
|
|
196
196
|
nameShort: 'Code - OSS',
|
|
197
197
|
nameLong: 'Code - OSS',
|
|
198
198
|
applicationName: 'code-oss',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
import { initialize } from '../base/common/worker/webWorkerBootstrap.js';
|
|
3
|
+
import { EditorWorker } from './common/services/editorWebWorker.js';
|
|
4
|
+
import { EditorWorkerHost } from './common/services/editorWorkerHost.js';
|
|
5
|
+
|
|
6
|
+
function start(client) {
|
|
7
|
+
const webWorkerServer = initialize(() => ( new EditorWorker(client)));
|
|
8
|
+
const editorWorkerHost = EditorWorkerHost.getChannel(webWorkerServer);
|
|
9
|
+
const host = ( new Proxy({}, {
|
|
10
|
+
get(target, prop, receiver) {
|
|
11
|
+
if (typeof prop !== 'string') {
|
|
12
|
+
throw ( new Error(`Not supported`));
|
|
13
|
+
}
|
|
14
|
+
return (...args) => {
|
|
15
|
+
return editorWorkerHost.$fhr(prop, args);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
return {
|
|
20
|
+
host: host,
|
|
21
|
+
getMirrorModels: () => {
|
|
22
|
+
return webWorkerServer.requestHandler.getModels();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { start };
|
|
@@ -4,6 +4,7 @@ import { Disposable } from "../../../base/common/lifecycle.js";
|
|
|
4
4
|
import { ThemeIcon } from "../../../base/common/themables.js";
|
|
5
5
|
import { IContextViewService } from "../../contextview/browser/contextView.service.js";
|
|
6
6
|
import { IKeybindingService } from "../../keybinding/common/keybinding.service.js";
|
|
7
|
+
import { ILayoutService } from "../../layout/browser/layoutService.service.js";
|
|
7
8
|
export declare const acceptSelectedActionCommand = "acceptSelectedCodeAction";
|
|
8
9
|
export declare const previewSelectedActionCommand = "previewSelectedCodeAction";
|
|
9
10
|
export interface IActionListDelegate<T> {
|
|
@@ -36,13 +37,14 @@ export declare class ActionList<T> extends Disposable {
|
|
|
36
37
|
private readonly _delegate;
|
|
37
38
|
private readonly _contextViewService;
|
|
38
39
|
private readonly _keybindingService;
|
|
40
|
+
private readonly _layoutService;
|
|
39
41
|
readonly domNode: HTMLElement;
|
|
40
42
|
private readonly _list;
|
|
41
43
|
private readonly _actionLineHeight;
|
|
42
44
|
private readonly _headerLineHeight;
|
|
43
45
|
private readonly _allMenuItems;
|
|
44
46
|
private readonly cts;
|
|
45
|
-
constructor(user: string, preview: boolean, items: readonly IActionListItem<T>[], _delegate: IActionListDelegate<T>, _contextViewService: IContextViewService, _keybindingService: IKeybindingService);
|
|
47
|
+
constructor(user: string, preview: boolean, items: readonly IActionListItem<T>[], _delegate: IActionListDelegate<T>, _contextViewService: IContextViewService, _keybindingService: IKeybindingService, _layoutService: ILayoutService);
|
|
46
48
|
private focusCondition;
|
|
47
49
|
hide(didCancel?: boolean): void;
|
|
48
50
|
layout(minWidth: number): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { setVisibility } from '../../../base/browser/dom.js';
|
|
3
|
+
import { setVisibility, getWindow } from '../../../base/browser/dom.js';
|
|
4
4
|
import { KeybindingLabel } from '../../../base/browser/ui/keybindingLabel/keybindingLabel.js';
|
|
5
5
|
import { List } from '../../../base/browser/ui/list/listWidget.js';
|
|
6
6
|
import { CancellationTokenSource } from '../../../base/common/cancellation.js';
|
|
@@ -24,6 +24,7 @@ import '../../theme/common/colors/minimapColors.js';
|
|
|
24
24
|
import '../../theme/common/colors/miscColors.js';
|
|
25
25
|
import '../../theme/common/colors/quickpickColors.js';
|
|
26
26
|
import '../../theme/common/colors/searchColors.js';
|
|
27
|
+
import { ILayoutService } from '../../layout/browser/layoutService.service.js';
|
|
27
28
|
|
|
28
29
|
const acceptSelectedActionCommand = 'acceptSelectedCodeAction';
|
|
29
30
|
const previewSelectedActionCommand = 'previewSelectedCodeAction';
|
|
@@ -119,11 +120,12 @@ function getKeyboardNavigationLabel(item) {
|
|
|
119
120
|
return undefined;
|
|
120
121
|
}
|
|
121
122
|
let ActionList = class ActionList extends Disposable {
|
|
122
|
-
constructor(user, preview, items, _delegate, _contextViewService, _keybindingService) {
|
|
123
|
+
constructor(user, preview, items, _delegate, _contextViewService, _keybindingService, _layoutService) {
|
|
123
124
|
super();
|
|
124
125
|
this._delegate = _delegate;
|
|
125
126
|
this._contextViewService = _contextViewService;
|
|
126
127
|
this._keybindingService = _keybindingService;
|
|
128
|
+
this._layoutService = _layoutService;
|
|
127
129
|
this._actionLineHeight = 24;
|
|
128
130
|
this._headerLineHeight = 26;
|
|
129
131
|
this.cts = this._register(( new CancellationTokenSource()));
|
|
@@ -198,7 +200,7 @@ let ActionList = class ActionList extends Disposable {
|
|
|
198
200
|
maxWidth = Math.max(...itemWidths, minWidth);
|
|
199
201
|
}
|
|
200
202
|
const maxVhPrecentage = 0.7;
|
|
201
|
-
const height = Math.min(heightWithHeaders, this.
|
|
203
|
+
const height = Math.min(heightWithHeaders, this._layoutService.getContainer(getWindow(this.domNode)).clientHeight * maxVhPrecentage);
|
|
202
204
|
this._list.layout(height, maxWidth);
|
|
203
205
|
this.domNode.style.height = `${height}px`;
|
|
204
206
|
this._list.domFocus();
|
|
@@ -265,7 +267,8 @@ let ActionList = class ActionList extends Disposable {
|
|
|
265
267
|
};
|
|
266
268
|
ActionList = ( __decorate([
|
|
267
269
|
( __param(4, IContextViewService)),
|
|
268
|
-
( __param(5, IKeybindingService))
|
|
270
|
+
( __param(5, IKeybindingService)),
|
|
271
|
+
( __param(6, ILayoutService))
|
|
269
272
|
], ActionList));
|
|
270
273
|
function stripNewlines(str) {
|
|
271
274
|
return str.replace(/\r\n|\r|\n/g, ' ');
|
|
@@ -106,9 +106,7 @@ class ExtHostConfigProvider {
|
|
|
106
106
|
}
|
|
107
107
|
getConfiguration(section, scope, extensionDescription) {
|
|
108
108
|
const overrides = scopeToOverrides(scope) || {};
|
|
109
|
-
const config = this._toReadonlyValue(section
|
|
110
|
-
? lookUp(this._configuration.getValue(undefined, overrides, this._extHostWorkspace.workspace), section)
|
|
111
|
-
: this._configuration.getValue(undefined, overrides, this._extHostWorkspace.workspace));
|
|
109
|
+
const config = this._toReadonlyValue(this._configuration.getValue(section, overrides, this._extHostWorkspace.workspace));
|
|
112
110
|
if (section) {
|
|
113
111
|
this._validateConfigurationAccess(section, overrides, extensionDescription?.identifier);
|
|
114
112
|
}
|
|
@@ -55,15 +55,17 @@ function extractCellOutputDetails(uri) {
|
|
|
55
55
|
const outputId = params.get('outputId') ?? undefined;
|
|
56
56
|
const parsedCell = parse(uri.with({ scheme: Schemas.vscodeNotebookCell, query: null }));
|
|
57
57
|
const outputIndex = params.get('outputIndex') ? parseInt(params.get('outputIndex') || '', 10) : undefined;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
const notebookUri = parsedCell ? parsedCell.notebook : uri.with({
|
|
59
|
+
scheme: params.get('notebookScheme') || Schemas.file,
|
|
60
|
+
fragment: null,
|
|
61
|
+
query: null,
|
|
62
|
+
});
|
|
61
63
|
return {
|
|
62
|
-
notebook:
|
|
64
|
+
notebook: notebookUri,
|
|
63
65
|
openIn: openIn,
|
|
64
66
|
outputId: outputId,
|
|
65
67
|
outputIndex: outputIndex,
|
|
66
|
-
cellHandle: parsedCell
|
|
68
|
+
cellHandle: parsedCell?.handle,
|
|
67
69
|
cellFragment: uri.fragment,
|
|
68
70
|
};
|
|
69
71
|
}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IWorkerContext } from "../vscode/src/vs/editor/common/services/editorWebWorker.js";
|
|
2
|
+
/**
|
|
3
|
+
* Make the `initialize` method backward compatible, until the monaco standalone workers are updated
|
|
4
|
+
*/
|
|
5
|
+
type CreateFunction<D, R extends object = object> = (ctx: IWorkerContext<object>, data: D) => R;
|
|
6
|
+
export declare function initialize<D, R extends object>(createFn: CreateFunction<D, R>): void;
|
|
7
|
+
export {};
|
package/workers/editor.worker.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import '../vscode/src/vs/editor/common/services/editorWebWorkerMain.js';
|
|
3
|
+
import { start } from '../vscode/src/vs/editor/editor.worker.start.js';
|
|
4
|
+
|
|
5
|
+
function initialize(createFn) {
|
|
6
|
+
let requestHandler;
|
|
7
|
+
const foreignModule = new Proxy({}, {
|
|
8
|
+
get(_target, propKey) {
|
|
9
|
+
if (propKey === '$initialize') {
|
|
10
|
+
return async (data) => {
|
|
11
|
+
if (!requestHandler) {
|
|
12
|
+
requestHandler = createFn(context, data);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return requestHandler?.[propKey];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const context = start(foreignModule);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { initialize };
|