@codingame/monaco-vscode-api 1.69.13 → 1.69.15

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.
@@ -3,7 +3,7 @@ import * as monaco from 'monaco-editor';
3
3
  type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
4
4
 
5
5
  /**
6
- * @deprecated
6
+ * @deprecated use `getNotificationServiceOverride` and `getDialogServiceOverride` instead
7
7
  */
8
8
  declare function getServiceOverride(container?: HTMLElement): IEditorOverrideServices;
9
9
 
@@ -315,6 +315,56 @@ const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{
315
315
  function isUUID(value) {
316
316
  return _UUIDPattern.test(value);
317
317
  }
318
+ ((function () {
319
+ if (typeof crypto === 'object' && typeof crypto.randomUUID === 'function') {
320
+ return crypto.randomUUID.bind(crypto);
321
+ }
322
+ let getRandomValues;
323
+ if (typeof crypto === 'object' && typeof crypto.getRandomValues === 'function') {
324
+ getRandomValues = crypto.getRandomValues.bind(crypto);
325
+ }
326
+ else {
327
+ getRandomValues = function (bucket) {
328
+ for (let i = 0; i < bucket.length; i++) {
329
+ bucket[i] = Math.floor(Math.random() * 256);
330
+ }
331
+ return bucket;
332
+ };
333
+ }
334
+ const _data = ( (new Uint8Array(16)));
335
+ const _hex = [];
336
+ for (let i = 0; i < 256; i++) {
337
+ _hex.push(( (i.toString(16))).padStart(2, '0'));
338
+ }
339
+ return function generateUuid() {
340
+ getRandomValues(_data);
341
+ _data[6] = (_data[6] & 0x0f) | 0x40;
342
+ _data[8] = (_data[8] & 0x3f) | 0x80;
343
+ let i = 0;
344
+ let result = '';
345
+ result += _hex[_data[i++]];
346
+ result += _hex[_data[i++]];
347
+ result += _hex[_data[i++]];
348
+ result += _hex[_data[i++]];
349
+ result += '-';
350
+ result += _hex[_data[i++]];
351
+ result += _hex[_data[i++]];
352
+ result += '-';
353
+ result += _hex[_data[i++]];
354
+ result += _hex[_data[i++]];
355
+ result += '-';
356
+ result += _hex[_data[i++]];
357
+ result += _hex[_data[i++]];
358
+ result += '-';
359
+ result += _hex[_data[i++]];
360
+ result += _hex[_data[i++]];
361
+ result += _hex[_data[i++]];
362
+ result += _hex[_data[i++]];
363
+ result += _hex[_data[i++]];
364
+ result += _hex[_data[i++]];
365
+ return result;
366
+ };
367
+ }))();
318
368
  const IPolicyService = ( (createDecorator('policy')));
319
369
  class NullPolicyService {
320
370
  constructor() {
@@ -385,6 +435,15 @@ class NullExtensionService {
385
435
  const ILifecycleService = ( (createDecorator('lifecycleService')));
386
436
  const ILanguageDetectionService = ( (createDecorator('ILanguageDetectionService')));
387
437
  const IKeyboardLayoutService = ( (createDecorator('keyboardLayoutService')));
438
+ function getKeyboardLayoutId(layout) {
439
+ if (layout.name) {
440
+ return layout.name;
441
+ }
442
+ if (layout.id) {
443
+ return layout.id;
444
+ }
445
+ return layout.layout;
446
+ }
388
447
  class MacLinuxFallbackKeyboardMapper {
389
448
  constructor(OS) {
390
449
  this._OS = OS;
@@ -1564,6 +1623,8 @@ class WorkbenchEnvironmentService {
1564
1623
  this.skipWelcome = true;
1565
1624
  this.disableWorkspaceTrust = true;
1566
1625
  this.debugRenderer = false;
1626
+ this.keyboardLayoutResource = ( URI.from({ scheme: 'user', path: '/keyboardLayout.json' }));
1627
+ this.snippetsHome = ( URI.from({ scheme: 'user', path: '/snippets' }));
1567
1628
  this.sync = undefined;
1568
1629
  this.isExtensionDevelopment = false;
1569
1630
  this.disableExtensions = false;
@@ -1576,9 +1637,7 @@ class WorkbenchEnvironmentService {
1576
1637
  get extHostLogsPath() { return unsupported(); }
1577
1638
  get webviewExternalEndpoint() { return unsupported(); }
1578
1639
  get userRoamingDataHome() { return unsupported(); }
1579
- get keyboardLayoutResource() { return unsupported(); }
1580
1640
  get argvResource() { return unsupported(); }
1581
- get snippetsHome() { return ( URI.from({ scheme: 'user', path: '/snippets' })); }
1582
1641
  get untitledWorkspacesHome() { return unsupported(); }
1583
1642
  get globalStorageHome() { return unsupported(); }
1584
1643
  get workspaceStorageHome() { return unsupported(); }
@@ -1828,4 +1887,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
1828
1887
  this.getSnippetsSync = unsupported;
1829
1888
  }
1830
1889
  });
1831
- export { Barrier as B, ExtensionsRegistry as E, IExtensionService as I, NullPolicyService as N, ResourceQueue as R, Sequencer as S, IntervalCounter as a, ILifecycleService as b, checkProposedApiEnabled as c, ILanguageDetectionService as d, IPolicyService as e, format2 as f, getServiceMachineId as g, ExtensionMessageCollector as h, isProposedApiEnabled as i, IPreferencesService as j, IUserDataProfileService as k, IKeyboardLayoutService as l, ITextMateService as m, IBrowserWorkbenchEnvironmentService as n, IHostColorSchemeService as o, IUserDataInitializationService as p, raceCancellationError as r, unsupported as u };
1890
+ export { Barrier as B, ExtensionsRegistry as E, IExtensionService as I, MacLinuxFallbackKeyboardMapper as M, NullPolicyService as N, ResourceQueue as R, Sequencer as S, IntervalCounter as a, ILifecycleService as b, checkProposedApiEnabled as c, ILanguageDetectionService as d, IPolicyService as e, format2 as f, getServiceMachineId as g, ExtensionMessageCollector as h, isProposedApiEnabled as i, IKeyboardLayoutService as j, IPreferencesService as k, getKeyboardLayoutId as l, IUserDataProfileService as m, ITextMateService as n, IBrowserWorkbenchEnvironmentService as o, IHostColorSchemeService as p, IUserDataInitializationService as q, raceCancellationError as r, unsupported as u };
@@ -158,7 +158,7 @@ interface IEditorOptions {
158
158
 
159
159
  type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
160
160
 
161
- declare type OpenEditor = (model: ITextModel, options: IEditorOptions | undefined, sideBySide?: boolean) => Promise<ICodeEditor | undefined>;
161
+ type OpenEditor = (model: ITextModel, options: IEditorOptions | undefined, sideBySide?: boolean) => Promise<ICodeEditor | undefined>;
162
162
  declare function getServiceOverride(openEditor: OpenEditor): IEditorOverrideServices;
163
163
 
164
164
  export { IEditorOptions, OpenEditor, getServiceOverride as default };
package/dist/monaco.d.ts CHANGED
@@ -4925,7 +4925,7 @@ declare const Extensions: {
4925
4925
  Configuration: string;
4926
4926
  JSONContribution: string;
4927
4927
  };
4928
- declare type FileMatch = Partial<Record<string, string[]>>;
4928
+ type FileMatch = Partial<Record<string, string[]>>;
4929
4929
  declare function getJsonSchemas(fileMatchs?: FileMatch): monaco.languages.json.DiagnosticsOptions['schemas'];
4930
4930
  declare const onDidChangeJsonSchema: Event<string>;
4931
4931
 
package/dist/snippets.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { j as parse, k as getNodeType } from './polyfill.js';
2
- import { h as ExtensionMessageCollector, k as IUserDataProfileService, b as ILifecycleService, E as ExtensionsRegistry } from './missing-services.js';
2
+ import { h as ExtensionMessageCollector, m as IUserDataProfileService, b as ILifecycleService, E as ExtensionsRegistry } from './missing-services.js';
3
3
  import { r as ISnippetsService, S as Services, i as IFileService, h as ITextFileService } from './services2.js';
4
4
  import { _ as __decorate, a as __param } from './workspace.js';
5
5
  import * as monacoSuggest from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
@@ -676,7 +676,7 @@ interface ITMSyntaxExtensionPoint {
676
676
  unbalancedBracketScopes: string[];
677
677
  }
678
678
 
679
- declare type PartialITMSyntaxExtensionPoint = Partial<ITMSyntaxExtensionPoint> & Pick<ITMSyntaxExtensionPoint, 'path' | 'scopeName'>;
679
+ type PartialITMSyntaxExtensionPoint = Partial<ITMSyntaxExtensionPoint> & Pick<ITMSyntaxExtensionPoint, 'path' | 'scopeName'>;
680
680
  declare function setGrammars<T extends PartialITMSyntaxExtensionPoint>(grammars: T[], getContent: (grammar: T) => Promise<string>, extension?: IExtensionDescription): void;
681
681
  declare function getServiceOverride(getOnigLib: () => Promise<Response | ArrayBuffer>): IEditorOverrideServices;
682
682
 
package/dist/textmate.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { _ as __decorate, a as __param, E as Emitter } from './workspace.js';
2
2
  import './polyfill.js';
3
- import { h as ExtensionMessageCollector, m as ITextMateService, E as ExtensionsRegistry } from './missing-services.js';
4
- export { m as ITextMateService } from './missing-services.js';
3
+ import { h as ExtensionMessageCollector, n as ITextMateService, E as ExtensionsRegistry } from './missing-services.js';
5
4
  import { l as languagesExtPoint } from './languageService.js';
6
5
  import { localize } from 'monaco-editor/esm/vs/nls.js';
7
6
  import { I as IWorkbenchThemeService } from './workbenchThemeService.js';
@@ -737,4 +736,4 @@ function getServiceOverride(getOnigLib) {
737
736
  [( ITextMateService.toString())]: new SyncDescriptor(TextMateService, [getOnigLib])
738
737
  };
739
738
  }
740
- export { getServiceOverride as default, setGrammars };
739
+ export { ITextMateService, getServiceOverride as default, setGrammars };
package/dist/theme.d.ts CHANGED
@@ -15,7 +15,7 @@ interface IThemeExtensionPoint {
15
15
 
16
16
  type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
17
17
 
18
- declare type PartialIThemeExtensionPoint = Partial<IThemeExtensionPoint> & Pick<IThemeExtensionPoint, 'id' | 'path'>;
18
+ type PartialIThemeExtensionPoint = Partial<IThemeExtensionPoint> & Pick<IThemeExtensionPoint, 'id' | 'path'>;
19
19
  declare function setThemes<T extends PartialIThemeExtensionPoint>(_themes: T[], getContent: (theme: T) => Promise<string>): void;
20
20
  declare function setDefaultThemes<T extends PartialIThemeExtensionPoint>(_themes: T[], getContent: (theme: T) => Promise<string>): void;
21
21
  declare function getServiceOverride(): IEditorOverrideServices;
package/dist/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { j as parse$1, k as getNodeType } from './polyfill.js';
2
- import { E as ExtensionsRegistry, h as ExtensionMessageCollector, S as Sequencer, I as IExtensionService, n as IBrowserWorkbenchEnvironmentService, o as IHostColorSchemeService, p as IUserDataInitializationService } from './missing-services.js';
2
+ import { E as ExtensionsRegistry, h as ExtensionMessageCollector, S as Sequencer, I as IExtensionService, o as IBrowserWorkbenchEnvironmentService, p as IHostColorSchemeService, q as IUserDataInitializationService } from './missing-services.js';
3
3
  import { E as Emitter, _ as __decorate, a as __param } from './workspace.js';
4
4
  import { T as ThemeSettings, E as ExtensionData, V as VS_DARK_THEME, a as VS_LIGHT_THEME, b as VS_HC_THEME, c as VS_HC_LIGHT_THEME, d as THEME_SCOPE_OPEN_PAREN, e as THEME_SCOPE_CLOSE_PAREN, f as THEME_SCOPE_WILDCARD, t as themeScopeRegex } from './workbenchThemeService.js';
5
5
  import { editorBackground, editorForeground, editorSelectionBackground, editorInactiveSelection, editorSelectionHighlight, editorFindMatchHighlight, editorFindMatch, editorHoverHighlight, editorFindRangeHighlight, workbenchColorsSchemaId, asCssVariableName, Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.69.13",
3
+ "version": "1.69.15",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],
@@ -141,43 +141,49 @@
141
141
  }
142
142
  },
143
143
  "devDependencies": {
144
- "@babel/core": "^7.18.10",
144
+ "@babel/core": "^7.20.12",
145
145
  "@babel/plugin-proposal-class-properties": "^7.18.6",
146
- "@babel/plugin-proposal-decorators": "^7.18.10",
147
- "@babel/preset-env": "^7.18.10",
146
+ "@babel/plugin-proposal-decorators": "^7.20.7",
147
+ "@babel/preset-env": "^7.20.2",
148
148
  "@babel/preset-typescript": "^7.18.6",
149
149
  "@codingame/eslint-config": "^1.1.6",
150
- "@codingame/tsconfig": "^1.1.0",
151
- "@octokit/rest": "^19.0.4",
152
- "@rollup/plugin-node-resolve": "^13.3.0",
153
- "@rollup/plugin-replace": "^4.0.0",
154
- "@rollup/plugin-typescript": "^8.3.4",
155
- "@types/babel__core": "^7.1.19",
156
- "@types/semver": "^7.3.12",
150
+ "@codingame/tsconfig": "^1.1.1",
151
+ "@octokit/rest": "^19.0.5",
152
+ "@rollup/plugin-dynamic-import-vars": "^2.0.3",
153
+ "@rollup/plugin-node-resolve": "^15.0.1",
154
+ "@rollup/plugin-replace": "^5.0.2",
155
+ "@rollup/plugin-typescript": "^11.0.0",
156
+ "@types/babel__core": "^7.20.0",
157
+ "@types/semver": "^7.3.13",
157
158
  "@types/vscode": "~1.69.1",
158
- "@typescript-eslint/eslint-plugin": "^5.33.1",
159
- "@typescript-eslint/parser": "^5.33.1",
160
- "eslint": "^8.22.0",
159
+ "@typescript-eslint/eslint-plugin": "^5.48.2",
160
+ "@typescript-eslint/parser": "^5.48.2",
161
+ "eslint": "^8.32.0",
161
162
  "eslint-config-standard": "^17.0.0",
162
- "eslint-plugin-import": "^2.26.0",
163
- "eslint-plugin-n": "^15.2.4",
164
- "eslint-plugin-promise": "^6.0.0",
163
+ "eslint-plugin-import": "^2.27.5",
164
+ "eslint-plugin-n": "^15.6.1",
165
+ "eslint-plugin-promise": "^6.1.1",
165
166
  "eslint-plugin-unused-imports": "^2.0.0",
166
167
  "js-cleanup": "^1.2.0",
167
- "recast": "^0.21.2",
168
- "rollup": "^2.78.1",
169
- "rollup-plugin-dts": "^4.2.2",
168
+ "recast": "^0.22.0",
169
+ "rollup": "^3.10.0",
170
+ "rollup-plugin-dts": "^5.1.1",
170
171
  "rollup-plugin-styles": "^4.0.0",
171
- "semver": "^7.3.7",
172
+ "semver": "^7.3.8",
172
173
  "ts-node": "^10.9.1",
173
- "typescript": "^4.7.4",
174
- "zx": "^7.0.8"
174
+ "typescript": "^4.9.4",
175
+ "zx": "^7.1.1"
175
176
  },
176
177
  "dependencies": {},
177
178
  "peerDependencies": {
178
179
  "monaco-editor": "~0.34.0",
179
- "vscode-textmate": "^7.0.1",
180
- "vscode-oniguruma": "^1.6.2"
180
+ "vscode-oniguruma": "^1.6.2",
181
+ "vscode-textmate": "^7.0.1"
182
+ },
183
+ "overrides": {
184
+ "rollup-plugin-styles": {
185
+ "rollup": "3.10.0"
186
+ }
181
187
  },
182
188
  "volta": {
183
189
  "node": "16.15.0",