@codingame/monaco-vscode-api 1.69.8 → 1.69.9

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.
@@ -1,7 +1,7 @@
1
- import { b as __decorate, d as __param } from './contextkey.js';
1
+ import { _ as __decorate, a as __param } from './contextkey.js';
2
2
  import { E as Emitter } from './polyfill.js';
3
3
  import { d as ILanguageDetectionService, u as unsupported } from './missing-services.js';
4
- import { Disposable, MutableDisposable, dispose, toDisposable, ImmortalReference } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { MutableDisposable, Disposable, ImmortalReference, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
5
  import { w as withUndefinedAsNull } from './types.js';
6
6
  import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
7
7
  import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
@@ -9,7 +9,7 @@ import { localize } from 'monaco-editor/esm/vs/nls.js';
9
9
  import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
10
10
  import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
11
11
  import { IAccessibilityService } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js';
12
- import { d as IFileService, f as IUriIdentityService, I as ITextFileService, c as SIDE_GROUP, A as ACTIVE_GROUP, i as IEditorService, u as isPreferredGroup } from './services2.js';
12
+ import { I as IEditorService, e as SIDE_GROUP, A as ACTIVE_GROUP, i as IFileService, f as IUriIdentityService, s as isPreferredGroup, h as ITextFileService } from './services2.js';
13
13
  import { MultiModelEditStackElement } from 'monaco-editor/esm/vs/editor/common/model/editStack.js';
14
14
  import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js';
15
15
  import { IUndoRedoService } from 'monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js';
@@ -29,7 +29,7 @@ import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
29
29
  import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
30
30
  class ReferenceCollection {
31
31
  constructor() {
32
- this.references = ( new Map());
32
+ this.references = ( (new Map()));
33
33
  }
34
34
  acquire(key, ...args) {
35
35
  let reference = this.references.get(key);
@@ -103,7 +103,7 @@ function isCompositeEditor(thing) {
103
103
  class EditorModel extends Disposable {
104
104
  constructor() {
105
105
  super(...arguments);
106
- this._onWillDispose = this._register(( new Emitter()));
106
+ this._onWillDispose = this._register(( (new Emitter())));
107
107
  this.onWillDispose = this._onWillDispose.event;
108
108
  this.disposed = false;
109
109
  this.resolved = false;
@@ -131,8 +131,8 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
131
131
  this.languageDetectionService = languageDetectionService;
132
132
  this.accessibilityService = accessibilityService;
133
133
  this.textEditorModelHandle = undefined;
134
- this.modelDisposeListener = this._register(( new MutableDisposable()));
135
- this.autoDetectLanguageThrottler = this._register(( new ThrottledDelayer(BaseTextEditorModel.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY)));
134
+ this.modelDisposeListener = this._register(( (new MutableDisposable())));
135
+ this.autoDetectLanguageThrottler = this._register(( (new ThrottledDelayer(BaseTextEditorModel.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY))));
136
136
  this._hasLanguageSetExplicitly = false;
137
137
  if (textEditorModelHandle) {
138
138
  this.handleExistingModel(textEditorModelHandle);
@@ -190,11 +190,11 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
190
190
  this.setLanguageIdInternal(lang);
191
191
  const languageName = this.languageService.getLanguageName(lang);
192
192
  if (languageName) {
193
- this.accessibilityService.alert(( localize(
193
+ this.accessibilityService.alert(( (localize(
194
194
  'languageAutoDetected',
195
195
  "Language {0} was automatically detected and set as the language mode.",
196
196
  languageName
197
- )));
197
+ ))));
198
198
  }
199
199
  }
200
200
  }
@@ -261,12 +261,12 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
261
261
  }
262
262
  };
263
263
  BaseTextEditorModel.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY = 600;
264
- BaseTextEditorModel = ( __decorate([
265
- ( __param(0, IModelService)),
266
- ( __param(1, ILanguageService)),
267
- ( __param(2, ILanguageDetectionService)),
268
- ( __param(3, IAccessibilityService))
269
- ], BaseTextEditorModel));
264
+ BaseTextEditorModel = ( (__decorate([
265
+ ( (__param(0, IModelService))),
266
+ ( (__param(1, ILanguageService))),
267
+ ( (__param(2, ILanguageDetectionService))),
268
+ ( (__param(3, IAccessibilityService)))
269
+ ], BaseTextEditorModel)));
270
270
  let TextResourceEditorModel = class TextResourceEditorModel extends BaseTextEditorModel {
271
271
  constructor(resource, languageService, modelService, languageDetectionService, accessibilityService) {
272
272
  super(modelService, languageService, languageDetectionService, accessibilityService, resource);
@@ -278,12 +278,12 @@ let TextResourceEditorModel = class TextResourceEditorModel extends BaseTextEdit
278
278
  super.dispose();
279
279
  }
280
280
  };
281
- TextResourceEditorModel = ( __decorate([
282
- ( __param(1, ILanguageService)),
283
- ( __param(2, IModelService)),
284
- ( __param(3, ILanguageDetectionService)),
285
- ( __param(4, IAccessibilityService))
286
- ], TextResourceEditorModel));
281
+ TextResourceEditorModel = ( (__decorate([
282
+ ( (__param(1, ILanguageService))),
283
+ ( (__param(2, IModelService))),
284
+ ( (__param(3, ILanguageDetectionService))),
285
+ ( (__param(4, IAccessibilityService)))
286
+ ], TextResourceEditorModel)));
287
287
  class TextFileEditorModel {}
288
288
  let ModelUndoRedoParticipant = class ModelUndoRedoParticipant extends Disposable {
289
289
  constructor(_modelService, _textModelService, _undoRedoService) {
@@ -329,11 +329,11 @@ let ModelUndoRedoParticipant = class ModelUndoRedoParticipant extends Disposable
329
329
  });
330
330
  }
331
331
  };
332
- ModelUndoRedoParticipant = ( __decorate([
333
- ( __param(0, IModelService)),
334
- ( __param(1, ITextModelService)),
335
- ( __param(2, IUndoRedoService))
336
- ], ModelUndoRedoParticipant));
332
+ ModelUndoRedoParticipant = ( (__decorate([
333
+ ( (__param(0, IModelService))),
334
+ ( (__param(1, ITextModelService))),
335
+ ( (__param(2, IUndoRedoService)))
336
+ ], ModelUndoRedoParticipant)));
337
337
  let ResourceModelCollection = class ResourceModelCollection extends ReferenceCollection {
338
338
  constructor(instantiationService, textFileService, fileService, modelService) {
339
339
  super();
@@ -341,15 +341,15 @@ let ResourceModelCollection = class ResourceModelCollection extends ReferenceCol
341
341
  this.textFileService = textFileService;
342
342
  this.fileService = fileService;
343
343
  this.modelService = modelService;
344
- this.providers = ( new Map());
345
- this.modelsToDispose = ( new Set());
344
+ this.providers = ( (new Map()));
345
+ this.modelsToDispose = ( (new Set()));
346
346
  }
347
347
  createReferencedObject(key) {
348
348
  return this.doCreateReferencedObject(key);
349
349
  }
350
350
  async doCreateReferencedObject(key, skipActivateProvider) {
351
351
  this.modelsToDispose.delete(key);
352
- const resource = ( URI.parse(key));
352
+ const resource = ( (URI.parse(key)));
353
353
  if (resource.scheme === Schemas.inMemory) {
354
354
  const cachedModel = this.modelService.getModel(resource);
355
355
  if (!cachedModel) {
@@ -392,7 +392,7 @@ let ResourceModelCollection = class ResourceModelCollection extends ReferenceCol
392
392
  throw new Error(`Unable to resolve resource ${key}`);
393
393
  }
394
394
  destroyReferencedObject(key, modelPromise) {
395
- const resource = ( URI.parse(key));
395
+ const resource = ( (URI.parse(key)));
396
396
  if (resource.scheme === Schemas.untitled || resource.scheme === Schemas.inMemory) {
397
397
  return;
398
398
  }
@@ -444,7 +444,7 @@ let ResourceModelCollection = class ResourceModelCollection extends ReferenceCol
444
444
  return this.providers.get(scheme) !== undefined;
445
445
  }
446
446
  async resolveTextModelContent(key) {
447
- const resource = ( URI.parse(key));
447
+ const resource = ( (URI.parse(key)));
448
448
  const providersForScheme = this.providers.get(resource.scheme) || [];
449
449
  for (const provider of providersForScheme) {
450
450
  const value = await provider.provideTextContent(resource);
@@ -455,12 +455,12 @@ let ResourceModelCollection = class ResourceModelCollection extends ReferenceCol
455
455
  throw new Error(`Unable to resolve text model content for resource ${key}`);
456
456
  }
457
457
  };
458
- ResourceModelCollection = ( __decorate([
459
- ( __param(0, IInstantiationService)),
460
- ( __param(1, ITextFileService)),
461
- ( __param(2, IFileService)),
462
- ( __param(3, IModelService))
463
- ], ResourceModelCollection));
458
+ ResourceModelCollection = ( (__decorate([
459
+ ( (__param(0, IInstantiationService))),
460
+ ( (__param(1, ITextFileService))),
461
+ ( (__param(2, IFileService))),
462
+ ( (__param(3, IModelService)))
463
+ ], ResourceModelCollection)));
464
464
  let TextModelResolverService = class TextModelResolverService extends Disposable {
465
465
  constructor(instantiationService, fileService, undoRedoService, modelService, uriIdentityService) {
466
466
  super();
@@ -470,12 +470,12 @@ let TextModelResolverService = class TextModelResolverService extends Disposable
470
470
  this.modelService = modelService;
471
471
  this.uriIdentityService = uriIdentityService;
472
472
  this.resourceModelCollection = this.instantiationService.createInstance(ResourceModelCollection);
473
- this.asyncModelCollection = ( new AsyncReferenceCollection(this.resourceModelCollection));
474
- this._register(( new ModelUndoRedoParticipant(this.modelService, this, this.undoRedoService)));
473
+ this.asyncModelCollection = ( (new AsyncReferenceCollection(this.resourceModelCollection)));
474
+ this._register(( (new ModelUndoRedoParticipant(this.modelService, this, this.undoRedoService))));
475
475
  }
476
476
  async createModelReference(resource) {
477
477
  resource = this.uriIdentityService.asCanonicalUri(resource);
478
- return await this.asyncModelCollection.acquire(( resource.toString()));
478
+ return await this.asyncModelCollection.acquire(( (resource.toString())));
479
479
  }
480
480
  registerTextModelContentProvider(scheme, provider) {
481
481
  return this.resourceModelCollection.registerTextModelContentProvider(scheme, provider);
@@ -487,13 +487,13 @@ let TextModelResolverService = class TextModelResolverService extends Disposable
487
487
  return this.resourceModelCollection.hasTextModelContentProvider(resource.scheme);
488
488
  }
489
489
  };
490
- TextModelResolverService = ( __decorate([
491
- ( __param(0, IInstantiationService)),
492
- ( __param(1, IFileService)),
493
- ( __param(2, IUndoRedoService)),
494
- ( __param(3, IModelService)),
495
- ( __param(4, IUriIdentityService))
496
- ], TextModelResolverService));
490
+ TextModelResolverService = ( (__decorate([
491
+ ( (__param(0, IInstantiationService))),
492
+ ( (__param(1, IFileService))),
493
+ ( (__param(2, IUndoRedoService))),
494
+ ( (__param(3, IModelService))),
495
+ ( (__param(4, IUriIdentityService)))
496
+ ], TextModelResolverService)));
497
497
  function applyTextEditorOptions(options, editor, scrollType) {
498
498
  let applied = false;
499
499
  const viewState = massageEditorViewState(options);
@@ -606,13 +606,13 @@ let CodeEditorService = class CodeEditorService extends AbstractCodeEditorServic
606
606
  return null;
607
607
  }
608
608
  };
609
- CodeEditorService = ( __decorate([
610
- ( __param(0, IEditorService)),
611
- ( __param(1, IThemeService)),
612
- ( __param(2, IConfigurationService))
613
- ], CodeEditorService));
614
- const DEFAULT_EDITOR_MIN_DIMENSIONS = ( new Dimension(220, 70));
615
- const DEFAULT_EDITOR_MAX_DIMENSIONS = ( new Dimension(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY));
609
+ CodeEditorService = ( (__decorate([
610
+ ( (__param(0, IEditorService))),
611
+ ( (__param(1, IThemeService))),
612
+ ( (__param(2, IConfigurationService)))
613
+ ], CodeEditorService)));
614
+ const DEFAULT_EDITOR_MIN_DIMENSIONS = ( (new Dimension(220, 70)));
615
+ const DEFAULT_EDITOR_MAX_DIMENSIONS = ( (new Dimension(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY)));
616
616
  class SimpleEditorPane {
617
617
  constructor(editor) {
618
618
  this.editor = editor;
@@ -703,9 +703,9 @@ let EditorService = class EditorService {
703
703
  return new SimpleEditorPane(modelEditor);
704
704
  }
705
705
  };
706
- EditorService = __decorate([
707
- __param(1, ITextModelService)
708
- ], EditorService);
706
+ EditorService = ( __decorate([
707
+ ( __param(1, ITextModelService))
708
+ ], EditorService));
709
709
  let CustomTextModelResolverService = class CustomTextModelResolverService extends TextModelResolverService {
710
710
  constructor(_instantiationService, fileService, undoRedoService, _modelService, uriIdentityService) {
711
711
  super(_instantiationService, fileService, undoRedoService, _modelService, uriIdentityService);
@@ -724,18 +724,18 @@ let CustomTextModelResolverService = class CustomTextModelResolverService extend
724
724
  return ref;
725
725
  }
726
726
  };
727
- CustomTextModelResolverService = __decorate([
728
- __param(0, IInstantiationService),
729
- __param(1, IFileService),
730
- __param(2, IUndoRedoService),
731
- __param(3, IModelService),
732
- __param(4, IUriIdentityService)
733
- ], CustomTextModelResolverService);
727
+ CustomTextModelResolverService = ( __decorate([
728
+ ( __param(0, IInstantiationService)),
729
+ ( __param(1, IFileService)),
730
+ ( __param(2, IUndoRedoService)),
731
+ ( __param(3, IModelService)),
732
+ ( __param(4, IUriIdentityService))
733
+ ], CustomTextModelResolverService));
734
734
  function getServiceOverride(openEditor) {
735
735
  return {
736
- [ITextModelService.toString()]: new SyncDescriptor(CustomTextModelResolverService),
737
- [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService),
738
- [IEditorService.toString()]: new SyncDescriptor(EditorService, [openEditor])
736
+ [( ITextModelService.toString())]: new SyncDescriptor(CustomTextModelResolverService),
737
+ [( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService),
738
+ [( IEditorService.toString())]: new SyncDescriptor(EditorService, [openEditor])
739
739
  };
740
740
  }
741
741
  export { getServiceOverride as default };
package/dist/monaco.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as __decorate, d as __param } from './contextkey.js';
1
+ import { _ as __decorate, a as __param } from './contextkey.js';
2
2
  export { C as ContextKeyExprType } from './contextkey.js';
3
3
  import './polyfill.js';
4
4
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
@@ -13,7 +13,7 @@ import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/c
13
13
  import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
14
14
  import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
15
15
  import { Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
16
- import { StandaloneEditor, StandaloneDiffEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
16
+ import { StandaloneDiffEditor, StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
17
17
  import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
18
18
  import { deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
19
19
  export { errorHandler } from 'monaco-editor/esm/vs/base/common/errors.js';
@@ -76,7 +76,7 @@ function distinct(base, target) {
76
76
  if (!base || !target) {
77
77
  return result;
78
78
  }
79
- const targetKeys = ( Object.keys(target));
79
+ const targetKeys = ( (Object.keys(target)));
80
80
  targetKeys.forEach(k => {
81
81
  const baseValue = base[k];
82
82
  const targetValue = target[k];
@@ -120,7 +120,7 @@ class ComputedEditorOptions {
120
120
  }
121
121
  class EditorOptionsUtil {
122
122
  static validateOptions(options) {
123
- const result = ( new ValidatedEditorOptions());
123
+ const result = ( (new ValidatedEditorOptions()));
124
124
  for (const editorOption of editorOptionsRegistry) {
125
125
  const value = (editorOption.name === '_never_' ? undefined : options[editorOption.name]);
126
126
  result._write(editorOption.id, editorOption.validate(value));
@@ -128,7 +128,7 @@ class EditorOptionsUtil {
128
128
  return result;
129
129
  }
130
130
  static computeOptions(options, env) {
131
- const result = ( new ComputedEditorOptions());
131
+ const result = ( (new ComputedEditorOptions()));
132
132
  for (const editorOption of editorOptionsRegistry) {
133
133
  result._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));
134
134
  }
@@ -141,7 +141,7 @@ class EditorOptionsUtil {
141
141
  if (Array.isArray(a) || Array.isArray(b)) {
142
142
  return (Array.isArray(a) && Array.isArray(b) ? equals$1(a, b) : false);
143
143
  }
144
- if (( Object.keys(a)).length !== ( Object.keys(b)).length) {
144
+ if (( (Object.keys(a))).length !== ( (Object.keys(b))).length) {
145
145
  return false;
146
146
  }
147
147
  for (const key in a) {
@@ -161,7 +161,7 @@ class EditorOptionsUtil {
161
161
  somethingChanged = true;
162
162
  }
163
163
  }
164
- return (somethingChanged ? ( new ConfigurationChangedEvent(result)) : null);
164
+ return (somethingChanged ? (new ConfigurationChangedEvent(result)) : null);
165
165
  }
166
166
  static applyUpdate(options, update) {
167
167
  let changed = false;
@@ -211,7 +211,7 @@ let ConfiguredStandaloneEditor = class ConfiguredStandaloneEditor extends create
211
211
  if (this.lastAppliedEditorOptions != null) {
212
212
  editorSettingsToApply = distinct(this.lastAppliedEditorOptions, editorSettingsToApply);
213
213
  }
214
- if (Object.keys(editorSettingsToApply).length > 0) {
214
+ if (( Object.keys(editorSettingsToApply)).length > 0) {
215
215
  this.lastAppliedEditorOptions = editorConfiguration;
216
216
  super.updateOptions(editorSettingsToApply);
217
217
  }
@@ -224,10 +224,10 @@ let ConfiguredStandaloneEditor = class ConfiguredStandaloneEditor extends create
224
224
  this.updateEditorConfiguration();
225
225
  }
226
226
  };
227
- ConfiguredStandaloneEditor = __decorate([
228
- __param(3, IInstantiationService),
229
- __param(4, ITextResourceConfigurationService)
230
- ], ConfiguredStandaloneEditor);
227
+ ConfiguredStandaloneEditor = ( __decorate([
228
+ ( __param(3, IInstantiationService)),
229
+ ( __param(4, ITextResourceConfigurationService))
230
+ ], ConfiguredStandaloneEditor));
231
231
  class ConfiguredStandaloneDiffEditor extends StandaloneDiffEditor {
232
232
  _createInnerEditor(instantiationService, container, options) {
233
233
  return instantiationService.createInstance(ConfiguredStandaloneEditor, container, true, options);
@@ -245,7 +245,7 @@ const Extensions = {
245
245
  ...Extensions$1,
246
246
  ...Extensions$2
247
247
  };
248
- const registry = Registry.as(Extensions.JSONContribution);
248
+ const registry = ( Registry.as(Extensions.JSONContribution));
249
249
  function getJsonSchemas(fileMatchs = {}) {
250
250
  return Object.entries(registry.getSchemaContributions().schemas)
251
251
  .filter(([uri]) => uri !== 'vscode://schemas/vscode-extensions')