@codingame/monaco-vscode-api 1.69.2 → 1.69.5

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 CHANGED
@@ -49,7 +49,8 @@ StandaloneService.initialize({
49
49
  ```
50
50
 
51
51
  Additionally, this library exposes 10 modules that include the vscode version of some services (with some glue to make it work with monaco):
52
- - Notification / Dialog: `vscode/service-override/messages`
52
+ - Notifications: `vscode/service-override/notifications`
53
+ - Dialogs: `vscode/service-override/dialogs`
53
54
  - Model / Editor: `vscode/service-override/modelEditor`
54
55
  - Configuration: `vscode/service-override/configuration`
55
56
  - Keybindings: `vscode/service-override/keybindings`
@@ -138,6 +139,30 @@ const range = new vscode.Range(...)
138
139
  vscode.languages.registerCompletionItemProvider(...)
139
140
  ```
140
141
 
142
+ ### Demo
143
+
144
+ There is a demo that showcases the service-override features. It allows to register contributions with the same syntaxes as in VSCode.
145
+ It includes:
146
+ - Languages
147
+ - Language configurations
148
+ - VSCode themes
149
+ - Textmate grammars (requires vscode themes)
150
+ - Notifications/Dialogs
151
+ - Model/Editor services
152
+ - Configuration service, with user configuration editor
153
+ - Keybinding service, with user keybindings editor
154
+ - Token classification
155
+ - Snippets (but not working in monaco 0.34)
156
+
157
+ It also uses the `getJsonSchemas` function to register them on the monaco json worker and have autocomplete/hover on settings and keybindings.
158
+
159
+ From CLI run:
160
+ ```bash
161
+ cd demo
162
+ npm ci
163
+ npm start
164
+ ```
165
+
141
166
  ### History
142
167
 
143
168
  This project was mainly created to make the implementation of [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient) more robust and maintainable.
@@ -1,5 +1,6 @@
1
- import { _ as __decorate, a as __param } from './tslib.es6.js';
2
- import { k as IPolicyService, l as IUserDataProfilesService, E as Emitter, m as isEmptyObject, n as NullPolicyService, U as UserSettings } from './missing-services.js';
1
+ import { _ as __decorate, a as __param } from './contextkey.js';
2
+ import { h as IPolicyService, j as IUserDataProfilesService, E as Emitter, k as NullPolicyService, U as UserSettings } from './missing-services.js';
3
+ import { b as isEmptyObject } from './types.js';
3
4
  import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
5
  import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
5
6
  import { Extensions, machineOverridableSettings, windowSettings, resourceSettings, allSettings, OVERRIDE_PROPERTY_PATTERN, resourceLanguageSettingsSchemaId, applicationSettings, machineSettings, OVERRIDE_PROPERTY_REGEX, overrideIdentifiersFromKey } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
@@ -0,0 +1,387 @@
1
+ import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
2
+ function __decorate(decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ }
8
+ function __param(paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ }
11
+ function __classPrivateFieldGet(receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ 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");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ }
16
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
17
+ if (kind === "m") throw new TypeError("Private method is not writable");
18
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
19
+ 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");
20
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
21
+ }
22
+ const CONSTANT_VALUES = ( new Map());
23
+ CONSTANT_VALUES.set('false', false);
24
+ CONSTANT_VALUES.set('true', true);
25
+ CONSTANT_VALUES.set('isMac', isMacintosh);
26
+ CONSTANT_VALUES.set('isLinux', isLinux);
27
+ CONSTANT_VALUES.set('isWindows', isWindows);
28
+ CONSTANT_VALUES.set('isWeb', isWeb);
29
+ CONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);
30
+ CONSTANT_VALUES.set('isEdge', isEdge);
31
+ CONSTANT_VALUES.set('isFirefox', isFirefox);
32
+ CONSTANT_VALUES.set('isChrome', isChrome);
33
+ CONSTANT_VALUES.set('isSafari', isSafari);
34
+ var ContextKeyExprType;
35
+ ( (function(ContextKeyExprType) {
36
+ ContextKeyExprType[ContextKeyExprType["False"] = 0] = "False";
37
+ ContextKeyExprType[ContextKeyExprType["True"] = 1] = "True";
38
+ ContextKeyExprType[ContextKeyExprType["Defined"] = 2] = "Defined";
39
+ ContextKeyExprType[ContextKeyExprType["Not"] = 3] = "Not";
40
+ ContextKeyExprType[ContextKeyExprType["Equals"] = 4] = "Equals";
41
+ ContextKeyExprType[ContextKeyExprType["NotEquals"] = 5] = "NotEquals";
42
+ ContextKeyExprType[ContextKeyExprType["And"] = 6] = "And";
43
+ ContextKeyExprType[ContextKeyExprType["Regex"] = 7] = "Regex";
44
+ ContextKeyExprType[ContextKeyExprType["NotRegex"] = 8] = "NotRegex";
45
+ ContextKeyExprType[ContextKeyExprType["Or"] = 9] = "Or";
46
+ ContextKeyExprType[ContextKeyExprType["In"] = 10] = "In";
47
+ ContextKeyExprType[ContextKeyExprType["NotIn"] = 11] = "NotIn";
48
+ ContextKeyExprType[ContextKeyExprType["Greater"] = 12] = "Greater";
49
+ ContextKeyExprType[ContextKeyExprType["GreaterEquals"] = 13] = "GreaterEquals";
50
+ ContextKeyExprType[ContextKeyExprType["Smaller"] = 14] = "Smaller";
51
+ ContextKeyExprType[ContextKeyExprType["SmallerEquals"] = 15] = "SmallerEquals";
52
+ })(ContextKeyExprType || (ContextKeyExprType = {})));
53
+ class ContextKeyFalseExpr {
54
+ constructor() {
55
+ this.type = 0 ;
56
+ }
57
+ cmp(other) {
58
+ return this.type - other.type;
59
+ }
60
+ equals(other) {
61
+ return (other.type === this.type);
62
+ }
63
+ substituteConstants() {
64
+ return this;
65
+ }
66
+ evaluate(context) {
67
+ return false;
68
+ }
69
+ serialize() {
70
+ return 'false';
71
+ }
72
+ keys() {
73
+ return [];
74
+ }
75
+ map(mapFnc) {
76
+ return this;
77
+ }
78
+ negate() {
79
+ return ContextKeyTrueExpr.INSTANCE;
80
+ }
81
+ }
82
+ ContextKeyFalseExpr.INSTANCE = ( new ContextKeyFalseExpr());
83
+ class ContextKeyTrueExpr {
84
+ constructor() {
85
+ this.type = 1 ;
86
+ }
87
+ cmp(other) {
88
+ return this.type - other.type;
89
+ }
90
+ equals(other) {
91
+ return (other.type === this.type);
92
+ }
93
+ substituteConstants() {
94
+ return this;
95
+ }
96
+ evaluate(context) {
97
+ return true;
98
+ }
99
+ serialize() {
100
+ return 'true';
101
+ }
102
+ keys() {
103
+ return [];
104
+ }
105
+ map(mapFnc) {
106
+ return this;
107
+ }
108
+ negate() {
109
+ return ContextKeyFalseExpr.INSTANCE;
110
+ }
111
+ }
112
+ ContextKeyTrueExpr.INSTANCE = ( new ContextKeyTrueExpr());
113
+ class ContextKeyDefinedExpr {
114
+ constructor(key, negated) {
115
+ this.key = key;
116
+ this.negated = negated;
117
+ this.type = 2 ;
118
+ }
119
+ static create(key, negated = null) {
120
+ const constantValue = CONSTANT_VALUES.get(key);
121
+ if (typeof constantValue === 'boolean') {
122
+ return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
123
+ }
124
+ return ( new ContextKeyDefinedExpr(key, negated));
125
+ }
126
+ cmp(other) {
127
+ if (other.type !== this.type) {
128
+ return this.type - other.type;
129
+ }
130
+ return cmp1(this.key, other.key);
131
+ }
132
+ equals(other) {
133
+ if (other.type === this.type) {
134
+ return (this.key === other.key);
135
+ }
136
+ return false;
137
+ }
138
+ substituteConstants() {
139
+ const constantValue = CONSTANT_VALUES.get(this.key);
140
+ if (typeof constantValue === 'boolean') {
141
+ return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
142
+ }
143
+ return this;
144
+ }
145
+ evaluate(context) {
146
+ return (!!context.getValue(this.key));
147
+ }
148
+ serialize() {
149
+ return this.key;
150
+ }
151
+ keys() {
152
+ return [this.key];
153
+ }
154
+ map(mapFnc) {
155
+ return mapFnc.mapDefined(this.key);
156
+ }
157
+ negate() {
158
+ if (!this.negated) {
159
+ this.negated = ContextKeyNotExpr.create(this.key, this);
160
+ }
161
+ return this.negated;
162
+ }
163
+ }
164
+ class ContextKeyEqualsExpr {
165
+ constructor(key, value, negated) {
166
+ this.key = key;
167
+ this.value = value;
168
+ this.negated = negated;
169
+ this.type = 4 ;
170
+ }
171
+ static create(key, value, negated = null) {
172
+ if (typeof value === 'boolean') {
173
+ return (value ? ContextKeyDefinedExpr.create(key, negated) : ContextKeyNotExpr.create(key, negated));
174
+ }
175
+ const constantValue = CONSTANT_VALUES.get(key);
176
+ if (typeof constantValue === 'boolean') {
177
+ const trueValue = constantValue ? 'true' : 'false';
178
+ return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
179
+ }
180
+ return ( new ContextKeyEqualsExpr(key, value, negated));
181
+ }
182
+ cmp(other) {
183
+ if (other.type !== this.type) {
184
+ return this.type - other.type;
185
+ }
186
+ return cmp2(this.key, this.value, other.key, other.value);
187
+ }
188
+ equals(other) {
189
+ if (other.type === this.type) {
190
+ return (this.key === other.key && this.value === other.value);
191
+ }
192
+ return false;
193
+ }
194
+ substituteConstants() {
195
+ const constantValue = CONSTANT_VALUES.get(this.key);
196
+ if (typeof constantValue === 'boolean') {
197
+ const trueValue = constantValue ? 'true' : 'false';
198
+ return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);
199
+ }
200
+ return this;
201
+ }
202
+ evaluate(context) {
203
+ return (context.getValue(this.key) == this.value);
204
+ }
205
+ serialize() {
206
+ return `${this.key} == '${this.value}'`;
207
+ }
208
+ keys() {
209
+ return [this.key];
210
+ }
211
+ map(mapFnc) {
212
+ return mapFnc.mapEquals(this.key, this.value);
213
+ }
214
+ negate() {
215
+ if (!this.negated) {
216
+ this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);
217
+ }
218
+ return this.negated;
219
+ }
220
+ }
221
+ class ContextKeyNotEqualsExpr {
222
+ constructor(key, value, negated) {
223
+ this.key = key;
224
+ this.value = value;
225
+ this.negated = negated;
226
+ this.type = 5 ;
227
+ }
228
+ static create(key, value, negated = null) {
229
+ if (typeof value === 'boolean') {
230
+ if (value) {
231
+ return ContextKeyNotExpr.create(key, negated);
232
+ }
233
+ return ContextKeyDefinedExpr.create(key, negated);
234
+ }
235
+ const constantValue = CONSTANT_VALUES.get(key);
236
+ if (typeof constantValue === 'boolean') {
237
+ const falseValue = constantValue ? 'true' : 'false';
238
+ return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
239
+ }
240
+ return ( new ContextKeyNotEqualsExpr(key, value, negated));
241
+ }
242
+ cmp(other) {
243
+ if (other.type !== this.type) {
244
+ return this.type - other.type;
245
+ }
246
+ return cmp2(this.key, this.value, other.key, other.value);
247
+ }
248
+ equals(other) {
249
+ if (other.type === this.type) {
250
+ return (this.key === other.key && this.value === other.value);
251
+ }
252
+ return false;
253
+ }
254
+ substituteConstants() {
255
+ const constantValue = CONSTANT_VALUES.get(this.key);
256
+ if (typeof constantValue === 'boolean') {
257
+ const falseValue = constantValue ? 'true' : 'false';
258
+ return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
259
+ }
260
+ return this;
261
+ }
262
+ evaluate(context) {
263
+ return (context.getValue(this.key) != this.value);
264
+ }
265
+ serialize() {
266
+ return `${this.key} != '${this.value}'`;
267
+ }
268
+ keys() {
269
+ return [this.key];
270
+ }
271
+ map(mapFnc) {
272
+ return mapFnc.mapNotEquals(this.key, this.value);
273
+ }
274
+ negate() {
275
+ if (!this.negated) {
276
+ this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);
277
+ }
278
+ return this.negated;
279
+ }
280
+ }
281
+ class ContextKeyNotExpr {
282
+ constructor(key, negated) {
283
+ this.key = key;
284
+ this.negated = negated;
285
+ this.type = 3 ;
286
+ }
287
+ static create(key, negated = null) {
288
+ const constantValue = CONSTANT_VALUES.get(key);
289
+ if (typeof constantValue === 'boolean') {
290
+ return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
291
+ }
292
+ return ( new ContextKeyNotExpr(key, negated));
293
+ }
294
+ cmp(other) {
295
+ if (other.type !== this.type) {
296
+ return this.type - other.type;
297
+ }
298
+ return cmp1(this.key, other.key);
299
+ }
300
+ equals(other) {
301
+ if (other.type === this.type) {
302
+ return (this.key === other.key);
303
+ }
304
+ return false;
305
+ }
306
+ substituteConstants() {
307
+ const constantValue = CONSTANT_VALUES.get(this.key);
308
+ if (typeof constantValue === 'boolean') {
309
+ return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);
310
+ }
311
+ return this;
312
+ }
313
+ evaluate(context) {
314
+ return (!context.getValue(this.key));
315
+ }
316
+ serialize() {
317
+ return `!${this.key}`;
318
+ }
319
+ keys() {
320
+ return [this.key];
321
+ }
322
+ map(mapFnc) {
323
+ return mapFnc.mapNot(this.key);
324
+ }
325
+ negate() {
326
+ if (!this.negated) {
327
+ this.negated = ContextKeyDefinedExpr.create(this.key, this);
328
+ }
329
+ return this.negated;
330
+ }
331
+ }
332
+ class RawContextKey extends ContextKeyDefinedExpr {
333
+ constructor(key, defaultValue, metaOrHide) {
334
+ super(key, null);
335
+ this._defaultValue = defaultValue;
336
+ if (typeof metaOrHide === 'object') {
337
+ RawContextKey._info.push({ ...metaOrHide, key });
338
+ }
339
+ else if (metaOrHide !== true) {
340
+ RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });
341
+ }
342
+ }
343
+ static all() {
344
+ return ( RawContextKey._info.values());
345
+ }
346
+ bindTo(target) {
347
+ return target.createKey(this.key, this._defaultValue);
348
+ }
349
+ getValue(target) {
350
+ return target.getContextKeyValue(this.key);
351
+ }
352
+ toNegated() {
353
+ return this.negate();
354
+ }
355
+ isEqualTo(value) {
356
+ return ContextKeyEqualsExpr.create(this.key, value);
357
+ }
358
+ notEqualsTo(value) {
359
+ return ContextKeyNotEqualsExpr.create(this.key, value);
360
+ }
361
+ }
362
+ RawContextKey._info = [];
363
+ function cmp1(key1, key2) {
364
+ if (key1 < key2) {
365
+ return -1;
366
+ }
367
+ if (key1 > key2) {
368
+ return 1;
369
+ }
370
+ return 0;
371
+ }
372
+ function cmp2(key1, value1, key2, value2) {
373
+ if (key1 < key2) {
374
+ return -1;
375
+ }
376
+ if (key1 > key2) {
377
+ return 1;
378
+ }
379
+ if (value1 < value2) {
380
+ return -1;
381
+ }
382
+ if (value1 > value2) {
383
+ return 1;
384
+ }
385
+ return 0;
386
+ }
387
+ export { ContextKeyExprType as C, RawContextKey as R, __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c };
@@ -0,0 +1,7 @@
1
+ import * as monaco from 'monaco-editor';
2
+
3
+ type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
4
+
5
+ declare function getServiceOverride(container?: HTMLElement): IEditorOverrideServices;
6
+
7
+ export { getServiceOverride as default };
@@ -0,0 +1,97 @@
1
+ import { E as Emitter } from './missing-services.js';
2
+ import { g as getServiceOverride$1, D as DialogHandlerContribution } from './layout.js';
3
+ import { _ as __decorate, a as __param } from './contextkey.js';
4
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
+ import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
6
+ import { g as IWorkbenchEnvironmentService } from './services2.js';
7
+ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
8
+ import { o as onServicesInitialized } from './tools.js';
9
+ import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
10
+ import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
11
+ class DialogsModel extends Disposable {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.dialogs = [];
15
+ this._onWillShowDialog = this._register(( (new Emitter())));
16
+ this.onWillShowDialog = this._onWillShowDialog.event;
17
+ this._onDidShowDialog = this._register(( (new Emitter())));
18
+ this.onDidShowDialog = this._onDidShowDialog.event;
19
+ }
20
+ show(dialog) {
21
+ const promise = ( (new DeferredPromise()));
22
+ const item = {
23
+ args: dialog,
24
+ close: result => {
25
+ this.dialogs.splice(0, 1);
26
+ promise.complete(result);
27
+ this._onDidShowDialog.fire();
28
+ }
29
+ };
30
+ this.dialogs.push(item);
31
+ this._onWillShowDialog.fire();
32
+ return {
33
+ item,
34
+ result: promise.p
35
+ };
36
+ }
37
+ }
38
+ let DialogService = class DialogService extends Disposable {
39
+ constructor(environmentService, logService) {
40
+ super();
41
+ this.environmentService = environmentService;
42
+ this.logService = logService;
43
+ this.model = this._register(( (new DialogsModel())));
44
+ this.onWillShowDialog = this.model.onWillShowDialog;
45
+ this.onDidShowDialog = this.model.onDidShowDialog;
46
+ }
47
+ skipDialogs() {
48
+ if (this.environmentService.isExtensionDevelopment && this.environmentService.extensionTestsLocationURI) {
49
+ return true;
50
+ }
51
+ return !!this.environmentService.enableSmokeTestDriver;
52
+ }
53
+ async confirm(confirmation) {
54
+ if (this.skipDialogs()) {
55
+ this.logService.trace('DialogService: refused to show confirmation dialog in tests.');
56
+ return { confirmed: true };
57
+ }
58
+ const handle = this.model.show({ confirmArgs: { confirmation } });
59
+ return await handle.result;
60
+ }
61
+ async show(severity, message, buttons, options) {
62
+ if (this.skipDialogs()) {
63
+ throw new Error('DialogService: refused to show dialog in tests.');
64
+ }
65
+ const handle = this.model.show({ showArgs: { severity, message, buttons, options } });
66
+ return await handle.result;
67
+ }
68
+ async input(severity, message, buttons, inputs, options) {
69
+ if (this.skipDialogs()) {
70
+ throw new Error('DialogService: refused to show input dialog in tests.');
71
+ }
72
+ const handle = this.model.show({ inputArgs: { severity, message, buttons, inputs, options } });
73
+ return await handle.result;
74
+ }
75
+ async about() {
76
+ if (this.skipDialogs()) {
77
+ throw new Error('DialogService: refused to show about dialog in tests.');
78
+ }
79
+ const handle = this.model.show({});
80
+ await handle.result;
81
+ }
82
+ };
83
+ DialogService = ( (__decorate([
84
+ ( (__param(0, IWorkbenchEnvironmentService))),
85
+ ( (__param(1, ILogService)))
86
+ ], DialogService)));
87
+ function initialize(instantiationService) {
88
+ instantiationService.createInstance(DialogHandlerContribution);
89
+ }
90
+ function getServiceOverride(container) {
91
+ onServicesInitialized(initialize);
92
+ return {
93
+ [( IDialogService.toString())]: new SyncDescriptor(DialogService),
94
+ ...getServiceOverride$1(container)
95
+ };
96
+ }
97
+ export { getServiceOverride as default };
package/dist/extHost.js CHANGED
@@ -1,6 +1,6 @@
1
- import { b as __classPrivateFieldSet, c as __classPrivateFieldGet, _ as __decorate, a as __param } from './tslib.es6.js';
1
+ import { b as __classPrivateFieldSet, c as __classPrivateFieldGet, _ as __decorate, a as __param } from './contextkey.js';
2
2
  import { n as coalesceInPlace, o as markAsFileSystemProviderError, q as FileSystemProviderErrorCode, j as IProductService, c as IEditorService, f as IEditorGroupsService, C as CancellationTokenSource, b as IUriIdentityService, d as IPaneCompositePartService, e as ITextFileService, I as IFileService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, k as ILanguageStatusService, l as IHostService, S as Services, t as mapArrayOrNot, A as ACTIVE_GROUP, u as SIDE_GROUP, v as delta$1 } from './services2.js';
3
- import { i as isStringArray, E as Emitter, d as disposed, I as IExtensionService, u as unsupported, B as Barrier, w as withUndefinedAsNull, c as checkProposedApiEnabled, a as isProposedApiEnabled, r as raceCancellationError, b as readonly, N as NotImplementedError, R as ResourceSet } from './missing-services.js';
3
+ import { i as isStringArray, w as withUndefinedAsNull } from './types.js';
4
4
  import { illegalArgument, canceled, transformErrorForSerialization, CancellationError, onUnexpectedError, onUnexpectedExternalError, isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
5
5
  import { URI, uriToFsPath } from 'monaco-editor/esm/vs/base/common/uri.js';
6
6
  import { equals, isNonEmptyArray, coalesce, isFalsyOrEmpty, asArray, distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
@@ -12,6 +12,7 @@ import { ResourceMap, TernarySearchTree } from 'monaco-editor/esm/vs/base/common
12
12
  import { MarkdownString as MarkdownString$2, parseHrefAndDimensions, isMarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
13
13
  import { marked as marked$1 } from 'monaco-editor/esm/vs/base/common/marked/marked.js';
14
14
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
15
+ import { E as Emitter, d as disposed, I as IExtensionService, u as unsupported, B as Barrier, c as checkProposedApiEnabled, i as isProposedApiEnabled, r as raceCancellationError, a as readonly, N as NotImplementedError, R as ResourceSet } from './missing-services.js';
15
16
  import { IMarkerService, MarkerSeverity } from 'monaco-editor/esm/vs/platform/markers/common/markers.js';
16
17
  import { revive, parse } from 'monaco-editor/esm/vs/base/common/marshalling.js';
17
18
  import { equals as equals$1, cloneAndChange, deepFreeze, mixin, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
package/dist/files.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as __decorate, a as __param } from './tslib.es6.js';
2
- import { o as format2, p as getServiceMachineId, E as Emitter, q as ResourceQueue, s as isReadableStream, t as peekStream, v as peekReadable, x as bufferToReadable, y as streamToBuffer, z as consumeStream, A as transform, C as isReadableBufferedStream, D as listenStream, F as bufferedStreamToBuffer, G as readableToBuffer, u as unsupported, H as newWriteableBufferStream, J as newWriteableStream } from './missing-services.js';
1
+ import { _ as __decorate, a as __param } from './contextkey.js';
2
+ import { l as format2, m as getServiceMachineId, E as Emitter, n as ResourceQueue, o as isReadableStream, p as peekStream, q as peekReadable, s as bufferToReadable, t as streamToBuffer, v as consumeStream, w as transform, x as isReadableBufferedStream, y as listenStream, z as bufferedStreamToBuffer, A as readableToBuffer, u as unsupported, C as newWriteableBufferStream, D as newWriteableStream } from './missing-services.js';
3
3
  import { I as IFileService, j as IProductService, S as Services, z as FileSystemProviderError, q as FileSystemProviderErrorCode, B as FileChangesEvent, D as FileOperationError, E as hasOpenReadWriteCloseCapability, G as hasReadWriteCapability, H as hasFileReadStreamCapability, J as toFileSystemProviderErrorCode, K as ensureFileSystemProviderError, F as FileType, a as FilePermission, L as etag, M as FileOperationEvent, O as toFileOperationResult, P as ETAG_DISABLED, Q as hasFileAtomicReadCapability, R as NotModifiedSinceFileOperationError, T as hasFileFolderCopyCapability, U as hasFileCloneCapability, V as createFileSystemProviderError, C as CancellationTokenSource } from './services2.js';
4
4
  import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
5
5
  import { canceled } from 'monaco-editor/esm/vs/base/common/errors.js';
@@ -1305,7 +1305,7 @@ const extensionFileSystemProvider = new ExtensionFileSystemProviderWithFileReadW
1305
1305
  let MemoryFileService = class MemoryFileService extends FileService {
1306
1306
  constructor(logService) {
1307
1307
  super(logService);
1308
- this.registerProvider(Schemas.file, new InMemoryFileSystemProvider());
1308
+ this.registerProvider('user', new InMemoryFileSystemProvider());
1309
1309
  const extension = Services.get().extension ?? DEFAULT_EXTENSION;
1310
1310
  this.registerProvider(extension.extensionLocation.scheme, extensionFileSystemProvider);
1311
1311
  }
@@ -1,5 +1,5 @@
1
- import { _ as __decorate, a as __param } from './tslib.es6.js';
2
- import { a as isProposedApiEnabled, K as IUserDataProfileService, I as IExtensionService, L as IKeyboardLayoutService, M as IPreferencesService, h as ExtensionsRegistry, O as ExtensionMessageCollector, l as IUserDataProfilesService, E as Emitter, P as parse } from './missing-services.js';
1
+ import { _ as __decorate, a as __param } from './contextkey.js';
2
+ import { i as isProposedApiEnabled, F as IUserDataProfileService, I as IExtensionService, G as IKeyboardLayoutService, H as IPreferencesService, f as ExtensionsRegistry, J as ExtensionMessageCollector, j as IUserDataProfilesService, E as Emitter, K as parse } from './missing-services.js';
3
3
  import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
4
4
  import { SimpleKeybinding, ScanCodeBinding, ChordKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
5
5
  import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
@@ -1,5 +1,5 @@
1
- import { Q as ITextMateService, I as IExtensionService, P as parse, S as getNodeType } from './missing-services.js';
2
- import { _ as __decorate, a as __param } from './tslib.es6.js';
1
+ import { L as ITextMateService, I as IExtensionService, K as parse, M as getNodeType } from './missing-services.js';
2
+ import { _ as __decorate, a as __param } from './contextkey.js';
3
3
  import { g as getParseErrorMessage } from './jsonErrorMessages.js';
4
4
  import { I as IExtensionResourceLoaderService, r as registerExtensionFile, g as getServiceOverride$1 } from './files.js';
5
5
  import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
@@ -1,5 +1,5 @@
1
- import { _ as __decorate, a as __param } from './tslib.es6.js';
2
- import { h as ExtensionsRegistry, I as IExtensionService } from './missing-services.js';
1
+ import { _ as __decorate, a as __param } from './contextkey.js';
2
+ import { f as ExtensionsRegistry, I as IExtensionService } from './missing-services.js';
3
3
  import { Y as FILES_ASSOCIATIONS_CONFIG } from './services2.js';
4
4
  import { parse } from 'monaco-editor/esm/vs/base/common/glob.js';
5
5
  import { posix } from 'monaco-editor/esm/vs/base/common/path.js';
package/dist/languages.js CHANGED
@@ -1,4 +1,4 @@
1
- import { O as ExtensionMessageCollector } from './missing-services.js';
1
+ import { J as ExtensionMessageCollector } from './missing-services.js';
2
2
  import { W as WorkbenchLanguageService } from './languageService.js';
3
3
  import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
4
4
  import { bd as DEFAULT_EXTENSION } from './extHost.js';