@codingame/monaco-vscode-api 1.76.2 → 1.76.3-next.0

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.
Files changed (59) hide show
  1. package/README.md +2 -1
  2. package/dist/api.js +3 -860
  3. package/dist/{extHost.js → api2.js} +16555 -13467
  4. package/dist/async.js +107 -2
  5. package/dist/audioCue.js +105 -103
  6. package/dist/button.js +1 -1
  7. package/dist/cancellation.js +3 -0
  8. package/dist/configuration.js +7 -344
  9. package/dist/configuration2.js +339 -0
  10. package/dist/configurationRegistry.js +441 -0
  11. package/dist/contextkeys.js +211 -0
  12. package/dist/debug.d.ts +22 -0
  13. package/dist/debug.js +15842 -0
  14. package/dist/dialogs.js +855 -9
  15. package/dist/extensionResourceLoader.js +96 -0
  16. package/dist/extensions.d.ts +491 -0
  17. package/dist/extensions.js +70 -0
  18. package/dist/{tools.js → extensionsRegistry.js} +2 -30
  19. package/dist/files.js +1407 -334
  20. package/dist/iconv.js +43 -0
  21. package/dist/injection.js +1 -1
  22. package/dist/jschardet.js +7 -0
  23. package/dist/keybindings.d.ts +1 -485
  24. package/dist/keybindings.js +666 -679
  25. package/dist/labels.js +14 -0
  26. package/dist/languageConfiguration.d.ts +1 -2
  27. package/dist/languageConfiguration.js +9 -16
  28. package/dist/languageService.js +112 -8
  29. package/dist/languages.d.ts +1 -473
  30. package/dist/languages.js +2 -12
  31. package/dist/layout.js +4 -3
  32. package/dist/layoutService.js +1 -1
  33. package/dist/missing-services.js +4710 -74
  34. package/dist/modelEditor.d.ts +324 -2
  35. package/dist/modelEditor.js +15 -228
  36. package/dist/monaco.js +7 -72
  37. package/dist/notifications.js +75 -232
  38. package/dist/polyfill.js +10715 -2459
  39. package/dist/resources.js +197 -0
  40. package/dist/services.d.ts +924 -3
  41. package/dist/services.js +1 -2
  42. package/dist/services2.js +2436 -18
  43. package/dist/snippets.d.ts +1 -473
  44. package/dist/snippets.js +8 -867
  45. package/dist/snippetsService.js +868 -0
  46. package/dist/textFileEditorModel.js +2985 -0
  47. package/dist/textmate.d.ts +3 -475
  48. package/dist/textmate.js +19 -29
  49. package/dist/theme.d.ts +1 -3
  50. package/dist/theme.js +24 -70
  51. package/dist/tokenClassification.d.ts +1 -475
  52. package/dist/tokenClassification.js +11 -37
  53. package/dist/tokenClassificationRegistry.js +8 -4
  54. package/dist/variableResolver.js +1711 -0
  55. package/dist/workbenchThemeService.js +1 -1
  56. package/dist/workspaceContext.js +1 -3
  57. package/package.json +27 -12
  58. package/dist/contextkey.js +0 -419
  59. package/dist/dialog.web.contribution.js +0 -945
package/dist/theme.js CHANGED
@@ -1,6 +1,6 @@
1
- import { p as parse$1, g as getNodeType } from './polyfill.js';
2
- import { c as IExtensionService, h as IBrowserWorkbenchEnvironmentService, j as IHostColorSchemeService, k as IUserDataInitializationService } from './missing-services.js';
3
- import { E as Emitter, _ as __decorate, a as __param } from './contextkey.js';
1
+ import { p as parse$1, j as getNodeType } from './polyfill.js';
2
+ import { bX as getRemoteAuthority, bp as IExtensionService, bY as IBrowserWorkbenchEnvironmentService, bZ as IHostColorSchemeService, b_ as IUserDataInitializationService } from './missing-services.js';
3
+ import { E as Emitter, _ as __decorate, a as __param, n as IFileService } from './services2.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';
6
6
  import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
@@ -17,15 +17,13 @@ import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform
17
17
  import { getIconRegistry, iconsSchemaId, IconFontDefinition } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
18
18
  import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
19
19
  import { createStyleSheet, asCSSUrl } from 'monaco-editor/esm/vs/base/browser/dom.js';
20
- import { bj as DEFAULT_EXTENSION, br as getRemoteAuthority } from './extHost.js';
21
20
  import { I as IWorkbenchLayoutService } from './layoutService.js';
22
- import { r as registerExtensionFile, g as getServiceOverride$1, I as IExtensionResourceLoaderService } from './files.js';
23
- import { E as ExtensionsRegistry, a as ExtensionMessageCollector, c as consoleExtensionMessageHandler } from './tools.js';
21
+ import { I as IExtensionResourceLoaderService } from './extensionResourceLoader.js';
22
+ import { E as ExtensionsRegistry } from './extensionsRegistry.js';
24
23
  import { Extensions } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
25
24
  import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
26
25
  import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
27
26
  import { S as Sequencer } from './async.js';
28
- import { S as Services, c as IFileService } from './services2.js';
29
27
  import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
30
28
  import { getIconsStyleSheet } from 'monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js';
31
29
  import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
@@ -35,8 +33,7 @@ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
35
33
  import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
36
34
  import { dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
37
35
  import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
38
- import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
39
- import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
36
+ import { g as getServiceOverride$1 } from './files.js';
40
37
  import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
41
38
  function getColorRegistry () {
42
39
  return ( Registry.as(Extensions$2.ColorContribution));
@@ -872,10 +869,10 @@ class ColorThemeData {
872
869
  }
873
870
  resolveScopes(scopes, definitions) {
874
871
  if (!this.themeTokenScopeMatchers) {
875
- this.themeTokenScopeMatchers = this.themeTokenColors.map(getScopeMatcher);
872
+ this.themeTokenScopeMatchers = ( (this.themeTokenColors.map(getScopeMatcher)));
876
873
  }
877
874
  if (!this.customTokenScopeMatchers) {
878
- this.customTokenScopeMatchers = this.customTokenColors.map(getScopeMatcher);
875
+ this.customTokenScopeMatchers = ( (this.customTokenColors.map(getScopeMatcher)));
879
876
  }
880
877
  for (const scope of scopes) {
881
878
  let foreground = undefined;
@@ -1097,8 +1094,8 @@ class ColorThemeData {
1097
1094
  id: this.id,
1098
1095
  label: this.label,
1099
1096
  settingsId: this.settingsId,
1100
- themeTokenColors: this.themeTokenColors.map(tc => ({ settings: tc.settings, scope: tc.scope })),
1101
- semanticTokenRules: this.semanticTokenRules.map(SemanticTokenRule.toJSONObject),
1097
+ themeTokenColors: ( (this.themeTokenColors.map(tc => ({ settings: tc.settings, scope: tc.scope })))),
1098
+ semanticTokenRules: ( (this.semanticTokenRules.map(SemanticTokenRule.toJSONObject))),
1102
1099
  extensionData: ExtensionData.toJSONObject(this.extensionData),
1103
1100
  themeSemanticHighlighting: this.themeSemanticHighlighting,
1104
1101
  colorMap: colorMapData,
@@ -1231,7 +1228,7 @@ async function _loadColorTheme(extensionResourceLoaderService, themeLocation, re
1231
1228
  return Promise.reject(( (new Error( (localize(
1232
1229
  'error.cannotparsejson',
1233
1230
  "Problems parsing JSON theme file: {0}",
1234
- errors.map(e => getParseErrorMessage(e.error)).join(', ')
1231
+ ( (errors.map(e => getParseErrorMessage(e.error)))).join(', ')
1235
1232
  ))))));
1236
1233
  }
1237
1234
  else if (getNodeType(contentValue) !== 'object') {
@@ -2029,7 +2026,7 @@ class FileIconThemeLoader {
2029
2026
  return Promise.reject(( (new Error( (localize(
2030
2027
  'error.cannotparseicontheme',
2031
2028
  "Problems parsing file icons file: {0}",
2032
- errors.map(e => getParseErrorMessage(e.error)).join(', ')
2029
+ ( (errors.map(e => getParseErrorMessage(e.error)))).join(', ')
2033
2030
  ))))));
2034
2031
  }
2035
2032
  else if (getNodeType(contentValue) !== 'object') {
@@ -2175,7 +2172,7 @@ class FileIconThemeLoader {
2175
2172
  if (Array.isArray(fonts)) {
2176
2173
  const defaultFontSize = fonts[0].size || '150%';
2177
2174
  fonts.forEach(font => {
2178
- const src = font.src.map(l => `${asCSSUrl(resolvePath(l.path))} format('${l.format}')`).join(', ');
2175
+ const src = ( (font.src.map(l => `${asCSSUrl(resolvePath(l.path))} format('${l.format}')`))).join(', ');
2179
2176
  cssRules.push(`@font-face { src: ${src}; font-family: '${font.id}'; font-weight: ${font.weight}; font-style: ${font.style}; font-display: block; }`);
2180
2177
  if (font.size !== undefined && font.size !== defaultFontSize) {
2181
2178
  fontSizes.set(font.id, font.size);
@@ -3009,9 +3006,9 @@ const tokenColorCustomizationConfiguration = {
3009
3006
  configurationRegistry.registerConfiguration(tokenColorCustomizationConfiguration);
3010
3007
  function updateColorThemeConfigurationSchemas(themes) {
3011
3008
  themes.sort((a, b) => a.label.localeCompare(b.label));
3012
- colorThemeSettingEnum.splice(0, colorThemeSettingEnum.length, ...themes.map(t => t.settingsId));
3013
- colorThemeSettingEnumDescriptions.splice(0, colorThemeSettingEnumDescriptions.length, ...themes.map(t => t.description || ''));
3014
- colorThemeSettingEnumItemLabels.splice(0, colorThemeSettingEnumItemLabels.length, ...themes.map(t => t.label || ''));
3009
+ colorThemeSettingEnum.splice(0, colorThemeSettingEnum.length, ...( (themes.map(t => t.settingsId))));
3010
+ colorThemeSettingEnumDescriptions.splice(0, colorThemeSettingEnumDescriptions.length, ...( (themes.map(t => t.description || ''))));
3011
+ colorThemeSettingEnumItemLabels.splice(0, colorThemeSettingEnumItemLabels.length, ...( (themes.map(t => t.label || ''))));
3015
3012
  const themeSpecificWorkbenchColors = { properties: {} };
3016
3013
  const themeSpecificTokenColors = { properties: {} };
3017
3014
  const themeSpecificSemanticTokenColors = { properties: {} };
@@ -3032,15 +3029,15 @@ function updateColorThemeConfigurationSchemas(themes) {
3032
3029
  configurationRegistry.notifyConfigurationSchemaUpdated(themeSettingsConfiguration, tokenColorCustomizationConfiguration);
3033
3030
  }
3034
3031
  function updateFileIconThemeConfigurationSchemas(themes) {
3035
- fileIconThemeSettingSchema.enum.splice(1, Number.MAX_VALUE, ...themes.map(t => t.settingsId));
3036
- fileIconThemeSettingSchema.enumItemLabels.splice(1, Number.MAX_VALUE, ...themes.map(t => t.label));
3037
- fileIconThemeSettingSchema.enumDescriptions.splice(1, Number.MAX_VALUE, ...themes.map(t => t.description || ''));
3032
+ fileIconThemeSettingSchema.enum.splice(1, Number.MAX_VALUE, ...( (themes.map(t => t.settingsId))));
3033
+ fileIconThemeSettingSchema.enumItemLabels.splice(1, Number.MAX_VALUE, ...( (themes.map(t => t.label))));
3034
+ fileIconThemeSettingSchema.enumDescriptions.splice(1, Number.MAX_VALUE, ...( (themes.map(t => t.description || ''))));
3038
3035
  configurationRegistry.notifyConfigurationSchemaUpdated(themeSettingsConfiguration);
3039
3036
  }
3040
3037
  function updateProductIconThemeConfigurationSchemas(themes) {
3041
- productIconThemeSettingSchema.enum.splice(1, Number.MAX_VALUE, ...themes.map(t => t.settingsId));
3042
- productIconThemeSettingSchema.enumItemLabels.splice(1, Number.MAX_VALUE, ...themes.map(t => t.label));
3043
- productIconThemeSettingSchema.enumDescriptions.splice(1, Number.MAX_VALUE, ...themes.map(t => t.description || ''));
3038
+ productIconThemeSettingSchema.enum.splice(1, Number.MAX_VALUE, ...( (themes.map(t => t.settingsId))));
3039
+ productIconThemeSettingSchema.enumItemLabels.splice(1, Number.MAX_VALUE, ...( (themes.map(t => t.label))));
3040
+ productIconThemeSettingSchema.enumDescriptions.splice(1, Number.MAX_VALUE, ...( (themes.map(t => t.description || ''))));
3044
3041
  configurationRegistry.notifyConfigurationSchemaUpdated(themeSettingsConfiguration);
3045
3042
  }
3046
3043
  class ThemeConfiguration {
@@ -3274,7 +3271,7 @@ function _loadProductIconThemeDocument(fileService, location, warnings) {
3274
3271
  return Promise.reject(( (new Error( (localize(
3275
3272
  'error.cannotparseicontheme',
3276
3273
  "Problems parsing product icons file: {0}",
3277
- parseErrors.map(e => getParseErrorMessage(e.error)).join(', ')
3274
+ ( (parseErrors.map(e => getParseErrorMessage(e.error)))).join(', ')
3278
3275
  ))))));
3279
3276
  }
3280
3277
  else if (getNodeType(contentValue) !== 'object') {
@@ -4116,53 +4113,10 @@ class StandaloneWorkbenchThemeService extends WorkbenchThemeService {
4116
4113
  });
4117
4114
  }
4118
4115
  }
4119
- const DEFAULT_THEME_EXTENSION = {
4120
- identifier: new ExtensionIdentifier('theme-defaults'),
4121
- isBuiltin: true,
4122
- isUserBuiltin: true,
4123
- isUnderDevelopment: false,
4124
- extensionLocation: ( URI.from({ scheme: 'extension', path: '/' })),
4125
- name: 'theme-defaults',
4126
- publisher: 'vscode',
4127
- version: '1.0.0',
4128
- engines: {
4129
- vscode: "1.76.0"
4130
- },
4131
- targetPlatform: "web"
4132
- };
4133
- const extensionPoint = ExtensionsRegistry.getExtensionPoints().find(ep => ep.name === 'themes');
4134
- let defaultThemes = [];
4135
- let themes = [];
4136
- function updateThemes() {
4137
- extensionPoint.acceptUsers([{
4138
- description: DEFAULT_THEME_EXTENSION,
4139
- value: defaultThemes,
4140
- collector: new ExtensionMessageCollector(consoleExtensionMessageHandler, DEFAULT_THEME_EXTENSION, extensionPoint.name)
4141
- }, {
4142
- description: Services.get().extension ?? DEFAULT_EXTENSION,
4143
- value: themes,
4144
- collector: new ExtensionMessageCollector(consoleExtensionMessageHandler, Services.get().extension ?? DEFAULT_EXTENSION, extensionPoint.name)
4145
- }]);
4146
- }
4147
- function setThemes(_themes, getContent) {
4148
- const extension = Services.get().extension ?? DEFAULT_EXTENSION;
4149
- themes = _themes;
4150
- for (const theme of _themes) {
4151
- registerExtensionFile(joinPath(extension.extensionLocation, theme.path), () => getContent(theme));
4152
- }
4153
- updateThemes();
4154
- }
4155
- function setDefaultThemes(_themes, getContent) {
4156
- defaultThemes = _themes;
4157
- for (const theme of _themes) {
4158
- registerExtensionFile(joinPath(DEFAULT_THEME_EXTENSION.extensionLocation, theme.path), () => getContent(theme));
4159
- }
4160
- updateThemes();
4161
- }
4162
4116
  function getServiceOverride() {
4163
4117
  return {
4164
4118
  ...getServiceOverride$1(),
4165
4119
  [( IThemeService.toString())]: new SyncDescriptor(StandaloneWorkbenchThemeService)
4166
4120
  };
4167
4121
  }
4168
- export { getServiceOverride as default, setDefaultThemes, setThemes };
4122
+ export { getServiceOverride as default };
@@ -1,476 +1,5 @@
1
1
  import * as monaco from 'monaco-editor';
2
2
 
3
- /**
4
- * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
5
- * This class is a simple parser which creates the basic component parts
6
- * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
7
- * and encoding.
8
- *
9
- * ```txt
10
- * foo://example.com:8042/over/there?name=ferret#nose
11
- * \_/ \______________/\_________/ \_________/ \__/
12
- * | | | | |
13
- * scheme authority path query fragment
14
- * | _____________________|__
15
- * / \ / \
16
- * urn:example:animal:ferret:nose
17
- * ```
18
- */
19
- declare class URI implements UriComponents {
20
- static isUri(thing: any): thing is URI;
21
- /**
22
- * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
23
- * The part before the first colon.
24
- */
25
- readonly scheme: string;
26
- /**
27
- * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.
28
- * The part between the first double slashes and the next slash.
29
- */
30
- readonly authority: string;
31
- /**
32
- * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.
33
- */
34
- readonly path: string;
35
- /**
36
- * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.
37
- */
38
- readonly query: string;
39
- /**
40
- * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.
41
- */
42
- readonly fragment: string;
43
- /**
44
- * @internal
45
- */
46
- protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);
47
- /**
48
- * @internal
49
- */
50
- protected constructor(components: UriComponents);
51
- /**
52
- * Returns a string representing the corresponding file system path of this URI.
53
- * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
54
- * platform specific path separator.
55
- *
56
- * * Will *not* validate the path for invalid characters and semantics.
57
- * * Will *not* look at the scheme of this URI.
58
- * * The result shall *not* be used for display purposes but for accessing a file on disk.
59
- *
60
- *
61
- * The *difference* to `URI#path` is the use of the platform specific separator and the handling
62
- * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
63
- *
64
- * ```ts
65
- const u = URI.parse('file://server/c$/folder/file.txt')
66
- u.authority === 'server'
67
- u.path === '/shares/c$/file.txt'
68
- u.fsPath === '\\server\c$\folder\file.txt'
69
- ```
70
- *
71
- * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
72
- * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
73
- * with URIs that represent files on disk (`file` scheme).
74
- */
75
- get fsPath(): string;
76
- with(change: {
77
- scheme?: string;
78
- authority?: string | null;
79
- path?: string | null;
80
- query?: string | null;
81
- fragment?: string | null;
82
- }): URI;
83
- /**
84
- * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,
85
- * `file:///usr/home`, or `scheme:with/path`.
86
- *
87
- * @param value A string which represents an URI (see `URI#toString`).
88
- */
89
- static parse(value: string, _strict?: boolean): URI;
90
- /**
91
- * Creates a new URI from a file system path, e.g. `c:\my\files`,
92
- * `/usr/home`, or `\\server\share\some\path`.
93
- *
94
- * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
95
- * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
96
- * `URI.parse('file://' + path)` because the path might contain characters that are
97
- * interpreted (# and ?). See the following sample:
98
- * ```ts
99
- const good = URI.file('/coding/c#/project1');
100
- good.scheme === 'file';
101
- good.path === '/coding/c#/project1';
102
- good.fragment === '';
103
- const bad = URI.parse('file://' + '/coding/c#/project1');
104
- bad.scheme === 'file';
105
- bad.path === '/coding/c'; // path is now broken
106
- bad.fragment === '/project1';
107
- ```
108
- *
109
- * @param path A file system path (see `URI#fsPath`)
110
- */
111
- static file(path: string): URI;
112
- static from(components: {
113
- scheme: string;
114
- authority?: string;
115
- path?: string;
116
- query?: string;
117
- fragment?: string;
118
- }): URI;
119
- /**
120
- * Join a URI path with path fragments and normalizes the resulting path.
121
- *
122
- * @param uri The input URI.
123
- * @param pathFragment The path fragment to add to the URI path.
124
- * @returns The resulting URI.
125
- */
126
- static joinPath(uri: URI, ...pathFragment: string[]): URI;
127
- /**
128
- * Creates a string representation for this URI. It's guaranteed that calling
129
- * `URI.parse` with the result of this function creates an URI which is equal
130
- * to this URI.
131
- *
132
- * * The result shall *not* be used for display purposes but for externalization or transport.
133
- * * The result will be encoded using the percentage encoding and encoding happens mostly
134
- * ignore the scheme-specific encoding rules.
135
- *
136
- * @param skipEncoding Do not encode the result, default is `false`
137
- */
138
- toString(skipEncoding?: boolean): string;
139
- toJSON(): UriComponents;
140
- static revive(data: UriComponents | URI): URI;
141
- static revive(data: UriComponents | URI | undefined): URI | undefined;
142
- static revive(data: UriComponents | URI | null): URI | null;
143
- static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
144
- }
145
- interface UriComponents {
146
- scheme: string;
147
- authority: string;
148
- path: string;
149
- query: string;
150
- fragment: string;
151
- }
152
-
153
- interface ILocalizedString {
154
- /**
155
- * The localized value of the string.
156
- */
157
- value: string;
158
- /**
159
- * The original (non localized value of the string)
160
- */
161
- original: string;
162
- }
163
-
164
- /**
165
- * Type of extension.
166
- *
167
- * **NOTE**: This is defined in `platform/environment` because it can appear as a CLI argument.
168
- */
169
- type ExtensionKind = 'ui' | 'workspace' | 'web';
170
-
171
- interface ICommand {
172
- command: string;
173
- title: string | ILocalizedString;
174
- category?: string | ILocalizedString;
175
- }
176
- interface IConfigurationProperty {
177
- description: string;
178
- type: string | string[];
179
- default?: any;
180
- }
181
- interface IConfiguration {
182
- id?: string;
183
- order?: number;
184
- title?: string;
185
- properties: {
186
- [key: string]: IConfigurationProperty;
187
- };
188
- }
189
- interface IDebugger {
190
- label?: string;
191
- type: string;
192
- runtime?: string;
193
- }
194
- interface IGrammar {
195
- language: string;
196
- }
197
- interface IJSONValidation {
198
- fileMatch: string | string[];
199
- url: string;
200
- }
201
- interface IKeyBinding {
202
- command: string;
203
- key: string;
204
- when?: string;
205
- mac?: string;
206
- linux?: string;
207
- win?: string;
208
- }
209
- interface ILanguage {
210
- id: string;
211
- extensions: string[];
212
- aliases: string[];
213
- }
214
- interface IMenu {
215
- command: string;
216
- alt?: string;
217
- when?: string;
218
- group?: string;
219
- }
220
- interface ISnippet {
221
- language: string;
222
- }
223
- interface ITheme {
224
- label: string;
225
- }
226
- interface IViewContainer {
227
- id: string;
228
- title: string;
229
- }
230
- interface IView {
231
- id: string;
232
- name: string;
233
- }
234
- interface IColor {
235
- id: string;
236
- description: string;
237
- defaults: {
238
- light: string;
239
- dark: string;
240
- highContrast: string;
241
- };
242
- }
243
- interface IWebviewEditor {
244
- readonly viewType: string;
245
- readonly priority: string;
246
- readonly selector: readonly {
247
- readonly filenamePattern?: string;
248
- }[];
249
- }
250
- interface ICodeActionContributionAction {
251
- readonly kind: string;
252
- readonly title: string;
253
- readonly description?: string;
254
- }
255
- interface ICodeActionContribution {
256
- readonly languages: readonly string[];
257
- readonly actions: readonly ICodeActionContributionAction[];
258
- }
259
- interface IAuthenticationContribution {
260
- readonly id: string;
261
- readonly label: string;
262
- }
263
- interface IWalkthroughStep {
264
- readonly id: string;
265
- readonly title: string;
266
- readonly description: string | undefined;
267
- readonly media: {
268
- image: string | {
269
- dark: string;
270
- light: string;
271
- hc: string;
272
- };
273
- altText: string;
274
- markdown?: never;
275
- svg?: never;
276
- } | {
277
- markdown: string;
278
- image?: never;
279
- svg?: never;
280
- } | {
281
- svg: string;
282
- altText: string;
283
- markdown?: never;
284
- image?: never;
285
- };
286
- readonly completionEvents?: string[];
287
- /** @deprecated use `completionEvents: 'onCommand:...'` */
288
- readonly doneOn?: {
289
- command: string;
290
- };
291
- readonly when?: string;
292
- }
293
- interface IWalkthrough {
294
- readonly id: string;
295
- readonly title: string;
296
- readonly icon?: string;
297
- readonly description: string;
298
- readonly steps: IWalkthroughStep[];
299
- readonly featuredFor: string[] | undefined;
300
- readonly when?: string;
301
- }
302
- interface IStartEntry {
303
- readonly title: string;
304
- readonly description: string;
305
- readonly command: string;
306
- readonly when?: string;
307
- readonly category: 'file' | 'folder' | 'notebook';
308
- }
309
- interface INotebookEntry {
310
- readonly type: string;
311
- readonly displayName: string;
312
- }
313
- interface INotebookRendererContribution {
314
- readonly id: string;
315
- readonly displayName: string;
316
- readonly mimeTypes: string[];
317
- }
318
- interface ITranslation {
319
- id: string;
320
- path: string;
321
- }
322
- interface ILocalizationContribution {
323
- languageId: string;
324
- languageName?: string;
325
- localizedLanguageName?: string;
326
- translations: ITranslation[];
327
- minimalTranslations?: {
328
- [key: string]: string;
329
- };
330
- }
331
- interface IExtensionContributions {
332
- commands?: ICommand[];
333
- configuration?: IConfiguration | IConfiguration[];
334
- debuggers?: IDebugger[];
335
- grammars?: IGrammar[];
336
- jsonValidation?: IJSONValidation[];
337
- keybindings?: IKeyBinding[];
338
- languages?: ILanguage[];
339
- menus?: {
340
- [context: string]: IMenu[];
341
- };
342
- snippets?: ISnippet[];
343
- themes?: ITheme[];
344
- iconThemes?: ITheme[];
345
- productIconThemes?: ITheme[];
346
- viewsContainers?: {
347
- [location: string]: IViewContainer[];
348
- };
349
- views?: {
350
- [location: string]: IView[];
351
- };
352
- colors?: IColor[];
353
- localizations?: ILocalizationContribution[];
354
- readonly customEditors?: readonly IWebviewEditor[];
355
- readonly codeActions?: readonly ICodeActionContribution[];
356
- authentication?: IAuthenticationContribution[];
357
- walkthroughs?: IWalkthrough[];
358
- startEntries?: IStartEntry[];
359
- readonly notebooks?: INotebookEntry[];
360
- readonly notebookRenderer?: INotebookRendererContribution[];
361
- }
362
- interface IExtensionCapabilities {
363
- readonly virtualWorkspaces?: ExtensionVirtualWorkspaceSupport;
364
- readonly untrustedWorkspaces?: ExtensionUntrustedWorkspaceSupport;
365
- }
366
- type LimitedWorkspaceSupportType = 'limited';
367
- type ExtensionUntrustedWorkspaceSupport = {
368
- supported: true;
369
- } | {
370
- supported: false;
371
- description: string;
372
- } | {
373
- supported: LimitedWorkspaceSupportType;
374
- description: string;
375
- restrictedConfigurations?: string[];
376
- };
377
- type ExtensionVirtualWorkspaceSupport = boolean | {
378
- supported: true;
379
- } | {
380
- supported: false | LimitedWorkspaceSupportType;
381
- description: string;
382
- };
383
- interface IRelaxedExtensionManifest {
384
- name: string;
385
- displayName?: string;
386
- publisher: string;
387
- version: string;
388
- engines: {
389
- readonly vscode: string;
390
- };
391
- description?: string;
392
- main?: string;
393
- browser?: string;
394
- preview?: boolean;
395
- l10n?: string;
396
- icon?: string;
397
- categories?: string[];
398
- keywords?: string[];
399
- activationEvents?: string[];
400
- extensionDependencies?: string[];
401
- extensionPack?: string[];
402
- extensionKind?: ExtensionKind | ExtensionKind[];
403
- contributes?: IExtensionContributions;
404
- repository?: {
405
- url: string;
406
- };
407
- bugs?: {
408
- url: string;
409
- };
410
- enabledApiProposals?: readonly string[];
411
- api?: string;
412
- scripts?: {
413
- [key: string]: string;
414
- };
415
- capabilities?: IExtensionCapabilities;
416
- }
417
- declare const enum TargetPlatform {
418
- WIN32_X64 = "win32-x64",
419
- WIN32_IA32 = "win32-ia32",
420
- WIN32_ARM64 = "win32-arm64",
421
- LINUX_X64 = "linux-x64",
422
- LINUX_ARM64 = "linux-arm64",
423
- LINUX_ARMHF = "linux-armhf",
424
- ALPINE_X64 = "alpine-x64",
425
- ALPINE_ARM64 = "alpine-arm64",
426
- DARWIN_X64 = "darwin-x64",
427
- DARWIN_ARM64 = "darwin-arm64",
428
- WEB = "web",
429
- UNIVERSAL = "universal",
430
- UNKNOWN = "unknown",
431
- UNDEFINED = "undefined"
432
- }
433
- /**
434
- * **!Do not construct directly!**
435
- *
436
- * **!Only static methods because it gets serialized!**
437
- *
438
- * This represents the "canonical" version for an extension identifier. Extension ids
439
- * have to be case-insensitive (due to the marketplace), but we must ensure case
440
- * preservation because the extension API is already public at this time.
441
- *
442
- * For example, given an extension with the publisher `"Hello"` and the name `"World"`,
443
- * its canonical extension identifier is `"Hello.World"`. This extension could be
444
- * referenced in some other extension's dependencies using the string `"hello.world"`.
445
- *
446
- * To make matters more complicated, an extension can optionally have an UUID. When two
447
- * extensions have the same UUID, they are considered equal even if their identifier is different.
448
- */
449
- declare class ExtensionIdentifier {
450
- readonly value: string;
451
- private readonly _lower;
452
- constructor(value: string);
453
- static equals(a: ExtensionIdentifier | string | null | undefined, b: ExtensionIdentifier | string | null | undefined): boolean;
454
- /**
455
- * Gives the value by which to index (for equality).
456
- */
457
- static toKey(id: ExtensionIdentifier | string): string;
458
- }
459
- interface IRelaxedExtensionDescription extends IRelaxedExtensionManifest {
460
- id?: string;
461
- identifier: ExtensionIdentifier;
462
- uuid?: string;
463
- targetPlatform: TargetPlatform;
464
- isBuiltin: boolean;
465
- isUserBuiltin: boolean;
466
- isUnderDevelopment: boolean;
467
- extensionLocation: URI;
468
- browserNlsBundleUris?: {
469
- [language: string]: URI;
470
- };
471
- }
472
- type IExtensionDescription = Readonly<IRelaxedExtensionDescription>;
473
-
474
3
  type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
475
4
 
476
5
  interface ITokenTypeExtensionPoint {
@@ -488,9 +17,6 @@ interface ITokenStyleDefaultExtensionPoint {
488
17
  [selector: string]: string[];
489
18
  };
490
19
  }
491
- declare function setTokenTypes(tokenTypes: ITokenTypeExtensionPoint[], extension?: IExtensionDescription): void;
492
- declare function setTokenModifiers(tokenModifiers: ITokenModifierExtensionPoint[], extension?: IExtensionDescription): void;
493
- declare function setTokenStyleDefaults(tokenStyleDefaults: ITokenStyleDefaultExtensionPoint[], extension?: IExtensionDescription): void;
494
20
  declare function getServiceOverride(): IEditorOverrideServices;
495
21
 
496
- export { ITokenModifierExtensionPoint, ITokenStyleDefaultExtensionPoint, ITokenTypeExtensionPoint, getServiceOverride as default, setTokenModifiers, setTokenStyleDefaults, setTokenTypes };
22
+ export { ITokenModifierExtensionPoint, ITokenStyleDefaultExtensionPoint, ITokenTypeExtensionPoint, getServiceOverride as default };