@codingame/monaco-vscode-api 1.69.0 → 1.69.3
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/README.md +24 -0
- package/dist/configuration.js +179 -6
- package/dist/contextkey.js +387 -0
- package/dist/extHost.js +3 -2
- package/dist/files.js +226 -226
- package/dist/keybindings.js +2 -2
- package/dist/languageConfiguration.d.ts +1 -151
- package/dist/languageConfiguration.js +7 -11
- package/dist/languageService.js +2 -2
- package/dist/messages.js +6 -6
- package/dist/missing-services.js +507 -378
- package/dist/modelEditor.js +2 -2
- package/dist/monaco.d.ts +236 -99
- package/dist/monaco.js +25 -6
- package/dist/services.d.ts +19 -1
- package/dist/services.js +1 -0
- package/dist/services2.js +1 -1
- package/dist/snippets.js +10 -49
- package/dist/textmate.d.ts +3 -2
- package/dist/textmate.js +8 -9
- package/dist/theme.d.ts +4 -3
- package/dist/theme.js +2 -2
- package/dist/tokenClassification.js +5 -7
- package/dist/tools.js +16 -2
- package/dist/workspaceContext.js +49 -0
- package/package.json +7 -7
- package/dist/tslib.es6.js +0 -21
package/dist/theme.d.ts
CHANGED
|
@@ -15,8 +15,9 @@ interface IThemeExtensionPoint {
|
|
|
15
15
|
|
|
16
16
|
type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
|
|
17
17
|
|
|
18
|
-
declare
|
|
19
|
-
declare function
|
|
18
|
+
declare type PartialIThemeExtensionPoint = Partial<IThemeExtensionPoint> & Pick<IThemeExtensionPoint, 'id' | 'path'>;
|
|
19
|
+
declare function setThemes<T extends PartialIThemeExtensionPoint>(_themes: T[], getContent: (theme: T) => Promise<string>): void;
|
|
20
|
+
declare function setDefaultThemes<T extends PartialIThemeExtensionPoint>(_themes: T[], getContent: (theme: T) => Promise<string>): void;
|
|
20
21
|
declare function getServiceOverride(): IEditorOverrideServices;
|
|
21
22
|
|
|
22
|
-
export { IThemeExtensionPoint, getServiceOverride as default, setDefaultThemes, setThemes };
|
|
23
|
+
export { PartialIThemeExtensionPoint as IThemeExtensionPoint, getServiceOverride as default, setDefaultThemes, setThemes };
|
package/dist/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IExtensionService, T as IBrowserWorkbenchEnvironmentService, V as IHostColorSchemeService, W as IUserDataInitializationService,
|
|
2
|
-
import { _ as __decorate, a as __param } from './
|
|
1
|
+
import { I as IExtensionService, T as IBrowserWorkbenchEnvironmentService, V as IHostColorSchemeService, W as IUserDataInitializationService, h as ExtensionsRegistry, E as Emitter, X as Sequencer, O as ExtensionMessageCollector, P as parse$1, S as getNodeType } from './missing-services.js';
|
|
2
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
3
3
|
import { V as VS_DARK_THEME, a as VS_LIGHT_THEME, b as VS_HC_THEME, c as VS_HC_LIGHT_THEME, T as ThemeSettings, E as ExtensionData, d as THEME_SCOPE_OPEN_PAREN, e as THEME_SCOPE_CLOSE_PAREN, f as THEME_SCOPE_WILDCARD, t as themeScopeRegex } from './workbenchThemeService.js';
|
|
4
4
|
import { workbenchColorsSchemaId, editorBackground, editorForeground, editorSelectionBackground, editorInactiveSelection, editorSelectionHighlight, editorFindMatchHighlight, editorFindMatch, editorHoverHighlight, editorFindRangeHighlight, asCssVariableName, Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
5
5
|
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as ExtensionsRegistry, O as ExtensionMessageCollector } from './missing-services.js';
|
|
2
2
|
import { g as getTokenClassificationRegistry, a as typeAndModifierIdPattern } from './tokenClassificationRegistry.js';
|
|
3
3
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
-
import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
|
|
4
|
+
import { g as getExtensionPoint, c as consoleExtensionMessageHandler, o as onServicesInitialized } from './tools.js';
|
|
5
5
|
import { S as Services } from './services2.js';
|
|
6
6
|
import { bd as DEFAULT_EXTENSION } from './extHost.js';
|
|
7
|
-
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
8
|
-
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
9
7
|
const tokenClassificationRegistry = getTokenClassificationRegistry();
|
|
10
8
|
const tokenTypeExtPoint$1 = ( ExtensionsRegistry.registerExtensionPoint({
|
|
11
9
|
extensionPoint: 'semanticTokenTypes',
|
|
@@ -294,11 +292,11 @@ function setTokenStyleDefaults(tokenStyleDefaults, extension = Services.get().ex
|
|
|
294
292
|
collector: new ExtensionMessageCollector(consoleExtensionMessageHandler, extension, tokenModifierExtPoint.name)
|
|
295
293
|
}]);
|
|
296
294
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
295
|
+
function initialize(instantiationService) {
|
|
296
|
+
instantiationService.createInstance(TokenClassificationExtensionPoints);
|
|
299
297
|
}
|
|
300
298
|
function getServiceOverride() {
|
|
301
|
-
|
|
299
|
+
onServicesInitialized(initialize);
|
|
302
300
|
return {};
|
|
303
301
|
}
|
|
304
302
|
export { getServiceOverride as default, setTokenModifiers, setTokenStyleDefaults, setTokenTypes };
|
package/dist/tools.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as ExtensionsRegistry } from './missing-services.js';
|
|
2
|
+
import { EventEmitter } from 'vscode';
|
|
3
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
2
4
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
3
5
|
function consoleExtensionMessageHandler(msg) {
|
|
4
6
|
if (msg.type === Severity.Error) {
|
|
@@ -14,4 +16,16 @@ function consoleExtensionMessageHandler(msg) {
|
|
|
14
16
|
function getExtensionPoint(extensionPoint) {
|
|
15
17
|
return ExtensionsRegistry.getExtensionPoints().find(ep => ep.name === extensionPoint);
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
const emitter = new EventEmitter();
|
|
20
|
+
const onServicesInitialized = emitter.event;
|
|
21
|
+
let initialized = false;
|
|
22
|
+
const original = StandaloneServices.initialize;
|
|
23
|
+
StandaloneServices.initialize = (overrides) => {
|
|
24
|
+
const instantiationService = original.call(StandaloneServices, overrides);
|
|
25
|
+
if (!initialized) {
|
|
26
|
+
initialized = true;
|
|
27
|
+
emitter.fire(instantiationService);
|
|
28
|
+
}
|
|
29
|
+
return instantiationService;
|
|
30
|
+
};
|
|
31
|
+
export { consoleExtensionMessageHandler as c, getExtensionPoint as g, onServicesInitialized as o };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { u as unsupported } from './missing-services.js';
|
|
2
|
+
import { S as Services } from './services2.js';
|
|
3
|
+
import { IWorkspaceContextService, WorkspaceFolder } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
4
|
+
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
5
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
+
class SimpleWorkspaceContextService {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.onDidChangeWorkspaceName = Event.None;
|
|
9
|
+
this.onWillChangeWorkspaceFolders = Event.None;
|
|
10
|
+
this.onDidChangeWorkspaceFolders = Event.None;
|
|
11
|
+
this.onDidChangeWorkbenchState = Event.None;
|
|
12
|
+
this.isCurrentWorkspace = unsupported;
|
|
13
|
+
}
|
|
14
|
+
getCompleteWorkspace() {
|
|
15
|
+
return Promise.resolve(this.getWorkspace());
|
|
16
|
+
}
|
|
17
|
+
getWorkspace() {
|
|
18
|
+
const workspaceFolders = Services.get().workspace?.workspaceFolders;
|
|
19
|
+
return {
|
|
20
|
+
id: '4064f6ec-cb38-4ad0-af64-ee6467e63c82',
|
|
21
|
+
folders: workspaceFolders?.map(folder => new WorkspaceFolder(folder)) ?? []
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
getWorkbenchState() {
|
|
25
|
+
const workspaceFoldersCount = Services.get().workspace?.workspaceFolders?.length ?? 1;
|
|
26
|
+
if (workspaceFoldersCount === 0) {
|
|
27
|
+
return 1 ;
|
|
28
|
+
}
|
|
29
|
+
else if (workspaceFoldersCount === 1) {
|
|
30
|
+
return 2 ;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return 3 ;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
getWorkspaceFolder(resource) {
|
|
37
|
+
const workspace = this.getWorkspace();
|
|
38
|
+
return workspace.folders.find(folder => folder.uri.scheme === resource.scheme && resource.path.startsWith(folder.uri.path)) ?? null;
|
|
39
|
+
}
|
|
40
|
+
isInsideWorkspace(resource) {
|
|
41
|
+
return this.getWorkspaceFolder(resource) != null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function getServiceOverride() {
|
|
45
|
+
return {
|
|
46
|
+
[( IWorkspaceContextService.toString())]: new SyncDescriptor(SimpleWorkspaceContextService)
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export { getServiceOverride as g };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -134,16 +134,16 @@
|
|
|
134
134
|
"@babel/preset-typescript": "^7.18.6",
|
|
135
135
|
"@codingame/eslint-config": "^1.1.6",
|
|
136
136
|
"@codingame/tsconfig": "^1.1.0",
|
|
137
|
-
"@octokit/rest": "^19.0.
|
|
137
|
+
"@octokit/rest": "^19.0.4",
|
|
138
138
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
139
139
|
"@rollup/plugin-replace": "^4.0.0",
|
|
140
140
|
"@rollup/plugin-typescript": "^8.3.4",
|
|
141
141
|
"@types/babel__core": "^7.1.19",
|
|
142
|
-
"@types/semver": "^7.3.
|
|
142
|
+
"@types/semver": "^7.3.12",
|
|
143
143
|
"@types/vscode": "~1.69.1",
|
|
144
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
145
|
-
"@typescript-eslint/parser": "^5.
|
|
146
|
-
"eslint": "^8.
|
|
144
|
+
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
145
|
+
"@typescript-eslint/parser": "^5.33.1",
|
|
146
|
+
"eslint": "^8.22.0",
|
|
147
147
|
"eslint-config-standard": "^17.0.0",
|
|
148
148
|
"eslint-plugin-import": "^2.26.0",
|
|
149
149
|
"eslint-plugin-n": "^15.2.4",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
152
152
|
"js-cleanup": "^1.2.0",
|
|
153
153
|
"recast": "^0.21.2",
|
|
154
|
-
"rollup": "^2.
|
|
154
|
+
"rollup": "^2.78.1",
|
|
155
155
|
"rollup-plugin-dts": "^4.2.2",
|
|
156
156
|
"rollup-plugin-styles": "^4.0.0",
|
|
157
157
|
"semver": "^7.3.7",
|
package/dist/tslib.es6.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function __decorate(decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
}
|
|
7
|
-
function __param(paramIndex, decorator) {
|
|
8
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
|
-
}
|
|
10
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
11
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
12
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
14
|
-
}
|
|
15
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
16
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
17
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
18
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
19
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
20
|
-
}
|
|
21
|
-
export { __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c };
|