@codingame/monaco-vscode-api 1.67.9 → 1.67.10

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/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as isStringArray, E as Emitter, u as unsupported$1 } from './missing-services-305b736f.js';
1
+ import { i as isStringArray, E as Emitter, u as unsupported$1 } from './missing-services-8a03a564.js';
2
2
  import { _ as __classPrivateFieldSet, a as __classPrivateFieldGet, b as __decorate, c as coalesceInPlace, m as markAsFileSystemProviderError, F as FileSystemProviderErrorCode, S as SIDE_GROUP, A as ACTIVE_GROUP, d as __param, C as CancellationTokenSource$1, I as IProgressService, r as readonly, e as ITextFileService, f as IFileService, g as IWorkbenchEnvironmentService, h as IUriIdentityService, i as IWorkingCopyFileService, j as IPathService, k as disposed, l as IEditorService, n as IEditorGroupsService, o as IPaneCompositePartService, p as IProductService, q as ILanguageStatusService, s as IHostService, t as Services, u as FileType$1, v as FilePermission$1 } from './services-ac6b4b50.js';
3
3
  import { illegalArgument, onUnexpectedError, canceled, transformErrorForSerialization, isCancellationError, onUnexpectedExternalError, CancellationError as CancellationError$1 } from 'monaco-editor/esm/vs/base/common/errors.js';
4
4
  import { uriToFsPath, URI } from 'monaco-editor/esm/vs/base/common/uri.js';
package/dist/messages.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as Emitter, a as assertAllDefined, I as ILifecycleService, u as unsupported } from './missing-services-305b736f.js';
1
+ import { E as Emitter, a as assertAllDefined, I as ILifecycleService, u as unsupported } from './missing-services-8a03a564.js';
2
2
  import { b as __decorate, d as __param, f as IFileService, w as refineServiceDecorator, n as IEditorGroupsService, s as IHostService, p as IProductService } from './services-ac6b4b50.js';
3
3
  import { editorWidgetBackground, editorWidgetForeground, widgetShadow, contrastBorder, buttonForeground, buttonBackground, buttonSecondaryBackground, buttonSecondaryForeground, buttonSecondaryHoverBackground, buttonHoverBackground, buttonBorder, simpleCheckboxBorder, simpleCheckboxBackground, simpleCheckboxForeground, problemsErrorIconForeground, problemsWarningIconForeground, problemsInfoIconForeground, inputBackground, inputForeground, inputBorder, textLinkForeground, progressBarBackground, resolveColorValue, registerColor, editorBackground, transparent, treeIndentGuidesStroke, focusBorder, listActiveSelectionBackground, darken, listActiveSelectionForeground, editorInfoForeground, errorForeground, editorWarningForeground, activeContrastBorder, lighten, editorErrorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
4
4
  import { localize } from 'monaco-editor/esm/vs/nls.js';
@@ -404,10 +404,10 @@ for (const key of Object.getOwnPropertyNames(VSBuffer.prototype)) {
404
404
  }
405
405
  }
406
406
  const ILifecycleService = createDecorator('lifecycleService');
407
+ const ILanguageDetectionService = createDecorator('ILanguageDetectionService');
407
408
  function unsupported() {
408
409
  throw new Error('unsupported');
409
410
  }
410
- const ILanguageDetectionService = createDecorator('ILanguageDetectionService');
411
411
  registerSingleton(IEditorService, class EditorService {
412
412
  constructor() {
413
413
  this._serviceBrand = undefined;
@@ -1,5 +1,5 @@
1
1
  import { b as __decorate, d as __param, f as IFileService, h as IUriIdentityService, e as ITextFileService, S as SIDE_GROUP, A as ACTIVE_GROUP, l as IEditorService, x as isPreferredGroup } from './services-ac6b4b50.js';
2
- import { E as Emitter, w as withUndefinedAsNull, b as ILanguageDetectionService, u as unsupported } from './missing-services-305b736f.js';
2
+ import { E as Emitter, w as withUndefinedAsNull, b as ILanguageDetectionService, u as unsupported } from './missing-services-8a03a564.js';
3
3
  import { Disposable, MutableDisposable, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
4
  import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
5
5
  import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
@@ -677,9 +677,6 @@ let EditorService = class EditorService {
677
677
  if (model == null) {
678
678
  const modelRef = await this.textModelService.createModelReference(resource);
679
679
  model = modelRef.object.textEditorModel;
680
- model.onWillDispose(() => {
681
- modelRef.dispose();
682
- });
683
680
  }
684
681
  else {
685
682
  const codeEditors = StandaloneServices.get(ICodeEditorService).listCodeEditors();
@@ -701,9 +698,18 @@ let EditorService = class EditorService {
701
698
  EditorService = __decorate([
702
699
  __param(1, ITextModelService)
703
700
  ], EditorService);
701
+ class CustomTextModelResolverService extends TextModelResolverService {
702
+ async createModelReference(resource) {
703
+ const ref = await super.createModelReference(resource);
704
+ ref.object.textEditorModel.onWillDispose(() => {
705
+ ref.dispose();
706
+ });
707
+ return ref;
708
+ }
709
+ }
704
710
  function getServiceOverride(openEditor) {
705
711
  return {
706
- [ITextModelService.toString()]: new SyncDescriptor(TextModelResolverService),
712
+ [ITextModelService.toString()]: new SyncDescriptor(CustomTextModelResolverService),
707
713
  [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService),
708
714
  [IEditorService.toString()]: new SyncDescriptor(EditorService, [openEditor])
709
715
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.67.9",
3
+ "version": "1.67.10",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],