@codingame/monaco-vscode-api 1.69.3 → 1.69.6

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.
@@ -5,7 +5,7 @@ import { ProgressBar as ProgressBar$1 } from 'monaco-editor/esm/vs/base/browser/
5
5
  import { mixin, equals, deepClone, deepFreeze } from 'monaco-editor/esm/vs/base/common/objects.js';
6
6
  import { RunOnceScheduler, Promises, timeout } from 'monaco-editor/esm/vs/base/common/async.js';
7
7
  import { trackFocus, show, hide, createStyleSheet } from 'monaco-editor/esm/vs/base/browser/dom.js';
8
- import { isNumber, isObject as isObject$1, isUndefinedOrNull as isUndefinedOrNull$1 } from 'monaco-editor/esm/vs/base/common/types.js';
8
+ import { isNumber, isObject, isUndefinedOrNull } from 'monaco-editor/esm/vs/base/common/types.js';
9
9
  import { Color as Color$1 } from 'monaco-editor/esm/vs/base/common/color.js';
10
10
  import { LanguageService as LanguageService$1 } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
11
11
  import { LanguagesRegistry as LanguagesRegistry$1 } from 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
@@ -13,20 +13,20 @@ import { firstOrDefault, distinct, equals as equals$1, binarySearch, range } fro
13
13
  import { PLAINTEXT_LANGUAGE_ID, ModesRegistry } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
14
14
  import { TokenizationRegistry } from 'monaco-editor/esm/vs/editor/common/languages.js';
15
15
  import { NoOpNotification } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
16
- import { I as IFileService, b as IUriIdentityService, N as NoOpNotification$1, r as refineServiceDecorator, p as productSchemaId, c as IEditorService, d as IPaneCompositePartService, e as ITextFileService, f as IEditorGroupsService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, S as Services, j as IProductService, k as ILanguageStatusService, l as IHostService, m as ISnippetsService, s as shuffle } from './services2.js';
17
- import { StandaloneConfigurationService as StandaloneConfigurationService$1, StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
16
+ import { I as IFileService, b as IUriIdentityService, r as refineServiceDecorator, p as productSchemaId, c as IEditorService, d as IPaneCompositePartService, e as ITextFileService, f as IEditorGroupsService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, S as Services, j as IProductService, k as ILanguageStatusService, l as IHostService, m as ISnippetsService, N as NoOpNotification$1, s as shuffle } from './services2.js';
17
+ import { StandaloneServices, StandaloneConfigurationService as StandaloneConfigurationService$1 } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
18
18
  import { Configuration as Configuration$1, ConfigurationModel as ConfigurationModel$1, ConfigurationChangeEvent } from 'monaco-editor/esm/vs/platform/configuration/common/configurationModels.js';
19
19
  import { DefaultConfigurationModel } from 'monaco-editor/esm/vs/platform/configuration/common/configurations.js';
20
20
  import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
21
21
  import { TernarySearchTree as TernarySearchTree$1, ResourceMap as ResourceMap$1 } from 'monaco-editor/esm/vs/base/common/map.js';
22
22
  import { compare, regExpLeadsToEndlessLoop, compareIgnoreCase, compareSubstring, compareSubstringIgnoreCase } from 'monaco-editor/esm/vs/base/common/strings.js';
23
- import { RawContextKey, ContextKeyExpr, ContextKeyDefinedExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
24
- import { _ as __decorate, a as __param, R as RawContextKey$1 } from './contextkey.js';
25
- import { ErrorHandler as ErrorHandler$1, onUnexpectedError, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
23
+ import { ContextKeyExpr, ContextKeyDefinedExpr, RawContextKey as RawContextKey$1, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
24
+ import { _ as __decorate, a as __param, R as RawContextKey } from './contextkey.js';
25
+ import { onUnexpectedError, ErrorHandler as ErrorHandler$1, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
26
26
  import { clearPlatformLanguageAssociations, registerPlatformLanguageAssociation, getLanguageIds } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
27
27
  import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
28
- import { overrideIdentifiersFromKey, Extensions as Extensions$2, OVERRIDE_PROPERTY_REGEX } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
29
- import { WorkspaceFolder as WorkspaceFolder$1, isSingleFolderWorkspaceIdentifier } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
28
+ import { Extensions as Extensions$2, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
29
+ import { isSingleFolderWorkspaceIdentifier, WorkspaceFolder as WorkspaceFolder$1 } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
30
30
  import { List as List$1 } from 'monaco-editor/esm/vs/base/browser/ui/list/listWidget.js';
31
31
  import { Event, EventBufferer } from 'monaco-editor/esm/vs/base/common/event.js';
32
32
  import { ListView } from 'monaco-editor/esm/vs/base/browser/ui/list/listView.js';
@@ -759,51 +759,6 @@ AmbiguousCharacters.cache = ( (new LRUCachedFunction((locales) => {
759
759
  AmbiguousCharacters._locales = ( (new Lazy(
760
760
  () => ( (Object.keys(AmbiguousCharacters.ambiguousCharacterData.getValue()))).filter((k) => !k.startsWith('_'))
761
761
  )));
762
- function isString(str) {
763
- return (typeof str === 'string');
764
- }
765
- function isStringArray(value) {
766
- return Array.isArray(value) && value.every(elem => isString(elem));
767
- }
768
- function isObject(obj) {
769
- return typeof obj === 'object'
770
- && obj !== null
771
- && !Array.isArray(obj)
772
- && !(obj instanceof RegExp)
773
- && !(obj instanceof Date);
774
- }
775
- function isUndefined(obj) {
776
- return (typeof obj === 'undefined');
777
- }
778
- function isUndefinedOrNull(obj) {
779
- return (isUndefined(obj) || obj === null);
780
- }
781
- function assertAllDefined(...args) {
782
- const result = [];
783
- for (let i = 0; i < args.length; i++) {
784
- const arg = args[i];
785
- if (isUndefinedOrNull(arg)) {
786
- throw new Error(`Assertion Failed: argument at index ${i} is undefined or null`);
787
- }
788
- result.push(arg);
789
- }
790
- return result;
791
- }
792
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
793
- function isEmptyObject(obj) {
794
- if (!isObject(obj)) {
795
- return false;
796
- }
797
- for (const key in obj) {
798
- if (hasOwnProperty$1.call(obj, key)) {
799
- return false;
800
- }
801
- }
802
- return true;
803
- }
804
- function withUndefinedAsNull(x) {
805
- return typeof x === 'undefined' ? null : x;
806
- }
807
762
  function raceCancellationError(promise, token) {
808
763
  return (
809
764
  (new Promise((resolve, reject) => {
@@ -2739,7 +2694,7 @@ class ConfigurationModel {
2739
2694
  mergeContents(source, target) {
2740
2695
  for (const key of ( (Object.keys(target)))) {
2741
2696
  if (key in source) {
2742
- if (isObject$1(source[key]) && isObject$1(target[key])) {
2697
+ if (isObject(source[key]) && isObject(target[key])) {
2743
2698
  this.mergeContents(source[key], target[key]);
2744
2699
  continue;
2745
2700
  }
@@ -2829,7 +2784,7 @@ class ConfigurationModelParser {
2829
2784
  return this._parseErrors;
2830
2785
  }
2831
2786
  parse(content, options) {
2832
- if (!isUndefinedOrNull$1(content)) {
2787
+ if (!isUndefinedOrNull(content)) {
2833
2788
  const raw = this.doParseContent(content);
2834
2789
  this.parseRaw(raw, options);
2835
2790
  }
@@ -5850,19 +5805,30 @@ if (SnippetParser.prototype.text == null) {
5850
5805
  else {
5851
5806
  console.warn('Useless polyfill: SnippetParser');
5852
5807
  }
5853
- Object.defineProperties(Color$1.prototype, Object.getOwnPropertyDescriptors(Color.prototype));
5854
- Object.defineProperties(List$1.prototype, Object.getOwnPropertyDescriptors(List.prototype));
5855
- Object.defineProperties(WorkspaceFolder$1.prototype, Object.getOwnPropertyDescriptors(WorkspaceFolder.prototype));
5856
- Object.defineProperties(LanguagesRegistry$1.prototype, Object.getOwnPropertyDescriptors(LanguagesRegistry.prototype));
5857
- Object.defineProperties(ErrorHandler$1.prototype, Object.getOwnPropertyDescriptors(ErrorHandler.prototype));
5858
- Object.defineProperties(RawContextKey.prototype, Object.getOwnPropertyDescriptors(RawContextKey$1.prototype));
5859
- Object.defineProperties(Configuration$1.prototype, Object.getOwnPropertyDescriptors(Configuration.prototype));
5860
- Object.defineProperties(TernarySearchTree$1.prototype, Object.getOwnPropertyDescriptors(TernarySearchTree.prototype));
5861
- Object.defineProperties(StandaloneConfigurationService$1.prototype, Object.getOwnPropertyDescriptors(StandaloneConfigurationService.prototype));
5862
- Object.defineProperties(LanguageService$1.prototype, Object.getOwnPropertyDescriptors(LanguageService.prototype));
5863
- Object.defineProperties(NoOpNotification.prototype, Object.getOwnPropertyDescriptors(NoOpNotification$1.prototype));
5864
- Object.defineProperties(Themable$1.prototype, Object.getOwnPropertyDescriptors(Themable.prototype));
5865
- Object.defineProperties(ProgressBar$1.prototype, Object.getOwnPropertyDescriptors(ProgressBar.prototype));
5808
+ function polyfillPrototypeSimple(a, b) {
5809
+ Object.defineProperties(a, Object.getOwnPropertyDescriptors(b));
5810
+ }
5811
+ function polyfillPrototype(a, b, toA, toB) {
5812
+ for (const key of Object.getOwnPropertyNames(b)) {
5813
+ if (!Object.hasOwnProperty.call(a, key)) {
5814
+ a[key] = function (...args) {
5815
+ return toA(b[key].call(this, ...args.map(toB)));
5816
+ };
5817
+ }
5818
+ }
5819
+ }
5820
+ polyfillPrototypeSimple(List$1.prototype, List.prototype);
5821
+ polyfillPrototypeSimple(WorkspaceFolder$1.prototype, WorkspaceFolder.prototype);
5822
+ polyfillPrototypeSimple(LanguagesRegistry$1.prototype, LanguagesRegistry.prototype);
5823
+ polyfillPrototypeSimple(ErrorHandler$1.prototype, ErrorHandler.prototype);
5824
+ polyfillPrototypeSimple(RawContextKey$1.prototype, RawContextKey.prototype);
5825
+ polyfillPrototypeSimple(Configuration$1.prototype, Configuration.prototype);
5826
+ polyfillPrototypeSimple(TernarySearchTree$1.prototype, TernarySearchTree.prototype);
5827
+ polyfillPrototypeSimple(StandaloneConfigurationService$1.prototype, StandaloneConfigurationService.prototype);
5828
+ polyfillPrototypeSimple(LanguageService$1.prototype, LanguageService.prototype);
5829
+ polyfillPrototypeSimple(NoOpNotification.prototype, NoOpNotification$1.prototype);
5830
+ polyfillPrototypeSimple(Themable$1.prototype, Themable.prototype);
5831
+ polyfillPrototypeSimple(ProgressBar$1.prototype, ProgressBar.prototype);
5866
5832
  const jsonContributionRegistry = ( Registry.as(Extensions.JSONContribution));
5867
5833
  jsonContributionRegistry.getSchemaContributions ?? (jsonContributionRegistry.getSchemaContributions = () => ({
5868
5834
  schemas: jsonContributionRegistry.schemasById
@@ -5908,13 +5874,20 @@ for (const key of Object.getOwnPropertyNames(VSBuffer)) {
5908
5874
  };
5909
5875
  }
5910
5876
  }
5911
- for (const key of Object.getOwnPropertyNames(VSBuffer.prototype)) {
5912
- if (!Object.hasOwnProperty.call(VSBuffer$1.prototype, key)) {
5913
- VSBuffer$1.prototype[key] = function (...args) {
5914
- return toMonacoVSBuffer(VSBuffer.prototype[key].call(this, ...args.map(toVSCodeVSBuffer)));
5915
- };
5877
+ polyfillPrototype(VSBuffer$1.prototype, VSBuffer.prototype, toMonacoVSBuffer, toVSCodeVSBuffer);
5878
+ function toMonacoColor(value) {
5879
+ if (value instanceof Color) {
5880
+ return new Color$1(value.rgba);
5916
5881
  }
5882
+ return value;
5883
+ }
5884
+ function toVSCodeColor(value) {
5885
+ if (value instanceof Color$1) {
5886
+ return new Color(value.rgba);
5887
+ }
5888
+ return value;
5917
5889
  }
5890
+ polyfillPrototype(Color$1.prototype, Color.prototype, toMonacoColor, toVSCodeColor);
5918
5891
  const EXTENSION_CATEGORIES = [
5919
5892
  'Azure',
5920
5893
  'Data Science',
@@ -7169,7 +7142,7 @@ class WorkbenchEnvironmentService {
7169
7142
  get userRoamingDataHome() { return unsupported(); }
7170
7143
  get keyboardLayoutResource() { return unsupported(); }
7171
7144
  get argvResource() { return unsupported(); }
7172
- get snippetsHome() { return URI.file('/snippets'); }
7145
+ get snippetsHome() { return ( URI.from({ scheme: 'user', path: '/snippets' })); }
7173
7146
  get untitledWorkspacesHome() { return unsupported(); }
7174
7147
  get globalStorageHome() { return unsupported(); }
7175
7148
  get workspaceStorageHome() { return unsupported(); }
@@ -7371,12 +7344,12 @@ const profile = {
7371
7344
  id: 'default',
7372
7345
  isDefault: true,
7373
7346
  name: 'default',
7374
- location: URI.file('settings.json'),
7347
+ location: ( URI.from({ scheme: 'user', path: '/profile.json' })),
7375
7348
  get globalStorageHome() { return unsupported(); },
7376
- settingsResource: URI.file('/settings.json'),
7377
- keybindingsResource: URI.file('/keybindings.json'),
7349
+ settingsResource: ( URI.from({ scheme: 'user', path: '/settings.json' })),
7350
+ keybindingsResource: ( URI.from({ scheme: 'user', path: '/keybindings.json' })),
7378
7351
  get tasksResource() { return unsupported(); },
7379
- get snippetsHome() { return URI.file('/snippets'); },
7352
+ get snippetsHome() { return ( URI.from({ scheme: 'user', path: '/snippets' })); },
7380
7353
  extensionsResource: undefined
7381
7354
  };
7382
7355
  registerSingleton(IUserDataProfilesService, class UserDataProfilesService {
@@ -7419,4 +7392,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
7419
7392
  this.getSnippetsSync = unsupported;
7420
7393
  }
7421
7394
  });
7422
- export { transform as A, Barrier as B, isReadableBufferedStream as C, listenStream as D, Emitter as E, bufferedStreamToBuffer as F, readableToBuffer as G, newWriteableBufferStream as H, IExtensionService as I, newWriteableStream as J, IUserDataProfileService as K, IKeyboardLayoutService as L, IPreferencesService as M, NotImplementedError as N, ExtensionMessageCollector as O, parse as P, ITextMateService as Q, ResourceSet as R, getNodeType as S, IBrowserWorkbenchEnvironmentService as T, UserSettings as U, IHostColorSchemeService as V, IUserDataInitializationService as W, Sequencer as X, isProposedApiEnabled as a, readonly as b, checkProposedApiEnabled as c, disposed as d, ILifecycleService as e, IntervalCounter as f, assertAllDefined as g, ExtensionsRegistry as h, isStringArray as i, ILanguageDetectionService as j, IPolicyService as k, IUserDataProfilesService as l, isEmptyObject as m, NullPolicyService as n, format2 as o, getServiceMachineId as p, ResourceQueue as q, raceCancellationError as r, isReadableStream as s, peekStream as t, unsupported as u, peekReadable as v, withUndefinedAsNull as w, bufferToReadable as x, streamToBuffer as y, consumeStream as z };
7395
+ export { readableToBuffer as A, Barrier as B, newWriteableBufferStream as C, newWriteableStream as D, Emitter as E, IUserDataProfileService as F, IKeyboardLayoutService as G, IPreferencesService as H, IExtensionService as I, ExtensionMessageCollector as J, parse as K, ITextMateService as L, getNodeType as M, NotImplementedError as N, IBrowserWorkbenchEnvironmentService as O, IHostColorSchemeService as P, IUserDataInitializationService as Q, ResourceSet as R, Sequencer as S, UserSettings as U, readonly as a, ILifecycleService as b, checkProposedApiEnabled as c, disposed as d, IntervalCounter as e, ExtensionsRegistry as f, ILanguageDetectionService as g, IPolicyService as h, isProposedApiEnabled as i, IUserDataProfilesService as j, NullPolicyService as k, format2 as l, getServiceMachineId as m, ResourceQueue as n, isReadableStream as o, peekStream as p, peekReadable as q, raceCancellationError as r, bufferToReadable as s, streamToBuffer as t, unsupported as u, consumeStream as v, transform as w, isReadableBufferedStream as x, listenStream as y, bufferedStreamToBuffer as z };
@@ -1,6 +1,7 @@
1
1
  import { _ as __decorate, a as __param } from './contextkey.js';
2
- import { j as ILanguageDetectionService, w as withUndefinedAsNull, E as Emitter, u as unsupported } from './missing-services.js';
2
+ import { g as ILanguageDetectionService, E as Emitter, u as unsupported } from './missing-services.js';
3
3
  import { MutableDisposable, Disposable, toDisposable, ImmortalReference, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { w as withUndefinedAsNull } from './types.js';
4
5
  import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
5
6
  import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
6
7
  import { localize } from 'monaco-editor/esm/vs/nls.js';
@@ -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 };