@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,10 +1,10 @@
1
1
  import './polyfill.js';
2
- import { E as ExtensionsRegistry, m as ExtensionMessageCollector } from './missing-services.js';
2
+ import { j as ExtensionMessageCollector, E as ExtensionsRegistry } from './missing-services.js';
3
3
  import { g as getTokenClassificationRegistry, a as typeAndModifierIdPattern } from './tokenClassificationRegistry.js';
4
4
  import { localize } from 'monaco-editor/esm/vs/nls.js';
5
- import { g as getExtensionPoint, o as onServicesInitialized, c as consoleExtensionMessageHandler } from './tools.js';
5
+ import { g as getExtensionPoint, c as consoleExtensionMessageHandler, o as onServicesInitialized } from './tools.js';
6
6
  import { S as Services } from './services2.js';
7
- import { D as DEFAULT_EXTENSION } from './extHost.js';
7
+ import { bd as DEFAULT_EXTENSION } from './extHost.js';
8
8
  const tokenClassificationRegistry = getTokenClassificationRegistry();
9
9
  const tokenTypeExtPoint$1 = ( ExtensionsRegistry.registerExtensionPoint({
10
10
  extensionPoint: 'semanticTokenTypes',
@@ -20,7 +20,7 @@ class TokenStyle {
20
20
  this.italic = italic;
21
21
  }
22
22
  }
23
- ( (function(TokenStyle) {
23
+ ( ((function(TokenStyle) {
24
24
  function toJSONObject(style) {
25
25
  return {
26
26
  _foreground: style.foreground === undefined ? null : Color.Format.CSS.formatHexA(style.foreground, true),
@@ -34,14 +34,16 @@ class TokenStyle {
34
34
  function fromJSONObject(obj) {
35
35
  if (obj) {
36
36
  const boolOrUndef = (b) => (typeof b === 'boolean') ? b : undefined;
37
- const colorOrUndef = (s) => (typeof s === 'string') ? ( Color.fromHex(s)) : undefined;
38
- return ( new TokenStyle(
39
- colorOrUndef(obj._foreground),
40
- boolOrUndef(obj._bold),
41
- boolOrUndef(obj._underline),
42
- boolOrUndef(obj._strikethrough),
43
- boolOrUndef(obj._italic)
44
- ));
37
+ const colorOrUndef = (s) => (typeof s === 'string') ? ( (Color.fromHex(s))) : undefined;
38
+ return (
39
+ (new TokenStyle(
40
+ colorOrUndef(obj._foreground),
41
+ boolOrUndef(obj._bold),
42
+ boolOrUndef(obj._underline),
43
+ boolOrUndef(obj._strikethrough),
44
+ boolOrUndef(obj._italic)
45
+ ))
46
+ );
45
47
  }
46
48
  return undefined;
47
49
  }
@@ -63,19 +65,21 @@ class TokenStyle {
63
65
  }
64
66
  TokenStyle.is = is;
65
67
  function fromData(data) {
66
- return ( new TokenStyle(
67
- data.foreground,
68
- data.bold,
69
- data.underline,
70
- data.strikethrough,
71
- data.italic
72
- ));
68
+ return (
69
+ (new TokenStyle(
70
+ data.foreground,
71
+ data.bold,
72
+ data.underline,
73
+ data.strikethrough,
74
+ data.italic
75
+ ))
76
+ );
73
77
  }
74
78
  TokenStyle.fromData = fromData;
75
79
  function fromSettings(foreground, fontStyle, bold, underline, strikethrough, italic) {
76
80
  let foregroundColor = undefined;
77
81
  if (foreground !== undefined) {
78
- foregroundColor = ( Color.fromHex(foreground));
82
+ foregroundColor = ( (Color.fromHex(foreground)));
79
83
  }
80
84
  if (fontStyle !== undefined) {
81
85
  bold = italic = underline = strikethrough = false;
@@ -98,12 +102,14 @@ class TokenStyle {
98
102
  }
99
103
  }
100
104
  }
101
- return ( new TokenStyle(foregroundColor, bold, underline, strikethrough, italic));
105
+ return (
106
+ (new TokenStyle(foregroundColor, bold, underline, strikethrough, italic))
107
+ );
102
108
  }
103
109
  TokenStyle.fromSettings = fromSettings;
104
- })(TokenStyle || (TokenStyle = {})));
110
+ })(TokenStyle || (TokenStyle = {}))));
105
111
  var SemanticTokenRule;
106
- ( (function(SemanticTokenRule) {
112
+ ( ((function(SemanticTokenRule) {
107
113
  function fromJSONObject(registry, o) {
108
114
  if (o && typeof o._selector === 'string' && o._style) {
109
115
  const style = TokenStyle.fromJSONObject(o._style);
@@ -138,10 +144,10 @@ var SemanticTokenRule;
138
144
  return r && r.selector && typeof r.selector.id === 'string' && TokenStyle.is(r.style);
139
145
  }
140
146
  SemanticTokenRule.is = is;
141
- })(SemanticTokenRule || (SemanticTokenRule = {})));
147
+ })(SemanticTokenRule || (SemanticTokenRule = {}))));
142
148
  class TokenClassificationRegistry {
143
149
  constructor() {
144
- this._onDidChangeSchema = ( new Emitter());
150
+ this._onDidChangeSchema = ( (new Emitter()));
145
151
  this.onDidChangeSchema = this._onDidChangeSchema.event;
146
152
  this.currentTypeNumber = 0;
147
153
  this.currentModifierBit = 1;
@@ -156,34 +162,34 @@ class TokenClassificationRegistry {
156
162
  definitions: {
157
163
  style: {
158
164
  type: 'object',
159
- description: ( localize('schema.token.settings', 'Colors and styles for the token.')),
165
+ description: ( (localize('schema.token.settings', 'Colors and styles for the token.'))),
160
166
  properties: {
161
167
  foreground: {
162
168
  type: 'string',
163
- description: ( localize('schema.token.foreground', 'Foreground color for the token.')),
169
+ description: ( (localize('schema.token.foreground', 'Foreground color for the token.'))),
164
170
  format: 'color-hex',
165
171
  default: '#ff0000'
166
172
  },
167
173
  background: {
168
174
  type: 'string',
169
- deprecationMessage: ( localize(
175
+ deprecationMessage: ( (localize(
170
176
  'schema.token.background.warning',
171
177
  'Token background colors are currently not supported.'
172
- ))
178
+ )))
173
179
  },
174
180
  fontStyle: {
175
181
  type: 'string',
176
- description: ( localize(
182
+ description: ( (localize(
177
183
  'schema.token.fontStyle',
178
184
  'Sets the all font styles of the rule: \'italic\', \'bold\', \'underline\' or \'strikethrough\' or a combination. All styles that are not listed are unset. The empty string unsets all styles.'
179
- )),
185
+ ))),
180
186
  pattern: fontStylePattern,
181
- patternErrorMessage: ( localize(
187
+ patternErrorMessage: ( (localize(
182
188
  'schema.fontStyle.error',
183
189
  'Font style must be \'italic\', \'bold\', \'underline\' or \'strikethrough\' or a combination. The empty string unsets all styles.'
184
- )),
190
+ ))),
185
191
  defaultSnippets: [
186
- { label: ( localize('schema.token.fontStyle.none', 'None (clear inherited style)')), bodyText: '""' },
192
+ { label: ( (localize('schema.token.fontStyle.none', 'None (clear inherited style)'))), bodyText: '""' },
187
193
  { body: 'italic' },
188
194
  { body: 'bold' },
189
195
  { body: 'underline' },
@@ -203,31 +209,31 @@ class TokenClassificationRegistry {
203
209
  },
204
210
  bold: {
205
211
  type: 'boolean',
206
- description: ( localize(
212
+ description: ( (localize(
207
213
  'schema.token.bold',
208
214
  'Sets or unsets the font style to bold. Note, the presence of \'fontStyle\' overrides this setting.'
209
- )),
215
+ ))),
210
216
  },
211
217
  italic: {
212
218
  type: 'boolean',
213
- description: ( localize(
219
+ description: ( (localize(
214
220
  'schema.token.italic',
215
221
  'Sets or unsets the font style to italic. Note, the presence of \'fontStyle\' overrides this setting.'
216
- )),
222
+ ))),
217
223
  },
218
224
  underline: {
219
225
  type: 'boolean',
220
- description: ( localize(
226
+ description: ( (localize(
221
227
  'schema.token.underline',
222
228
  'Sets or unsets the font style to underline. Note, the presence of \'fontStyle\' overrides this setting.'
223
- )),
229
+ ))),
224
230
  },
225
231
  strikethrough: {
226
232
  type: 'boolean',
227
- description: ( localize(
233
+ description: ( (localize(
228
234
  'schema.token.strikethrough',
229
235
  'Sets or unsets the font style to strikethrough. Note, the presence of \'fontStyle\' overrides this setting.'
230
- )),
236
+ ))),
231
237
  }
232
238
  },
233
239
  defaultSnippets: [{ body: { foreground: '${1:#FF0000}', fontStyle: '${2:bold}' } }]
@@ -314,10 +320,10 @@ class TokenClassificationRegistry {
314
320
  delete this.tokenStylingSchema.properties[`*.${id}`];
315
321
  }
316
322
  getTokenTypes() {
317
- return ( Object.keys(this.tokenTypeById)).map(id => this.tokenTypeById[id]);
323
+ return ( (Object.keys(this.tokenTypeById))).map(id => this.tokenTypeById[id]);
318
324
  }
319
325
  getTokenModifiers() {
320
- return ( Object.keys(this.tokenModifierById)).map(id => this.tokenModifierById[id]);
326
+ return ( (Object.keys(this.tokenModifierById))).map(id => this.tokenModifierById[id]);
321
327
  }
322
328
  getTokenStylingSchema() {
323
329
  return this.tokenStylingSchema;
@@ -346,7 +352,7 @@ class TokenClassificationRegistry {
346
352
  }
347
353
  return a.localeCompare(b);
348
354
  };
349
- return ( Object.keys(this.tokenTypeById)).sort(sorter).map(k => `- \`${k}\`: ${this.tokenTypeById[k].description}`).join('\n');
355
+ return ( (Object.keys(this.tokenTypeById))).sort(sorter).map(k => `- \`${k}\`: ${this.tokenTypeById[k].description}`).join('\n');
350
356
  }
351
357
  }
352
358
  const CHAR_LANGUAGE = TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR.charCodeAt(0);
@@ -373,7 +379,7 @@ function parseClassifierString(s, defaultLanguage) {
373
379
  }
374
380
  const tokenClassificationRegistry = createDefaultTokenClassificationRegistry();
375
381
  function createDefaultTokenClassificationRegistry() {
376
- const registry = ( new TokenClassificationRegistry());
382
+ const registry = ( (new TokenClassificationRegistry()));
377
383
  function registerTokenType(id, description, scopesToProbe = [], superType, deprecationMessage) {
378
384
  registry.registerTokenType(id, description, superType, deprecationMessage);
379
385
  if (scopesToProbe) {
@@ -390,38 +396,38 @@ function createDefaultTokenClassificationRegistry() {
390
396
  console.log(e);
391
397
  }
392
398
  }
393
- registerTokenType('comment', ( localize('comment', "Style for comments.")), [['comment']]);
394
- registerTokenType('string', ( localize('string', "Style for strings.")), [['string']]);
395
- registerTokenType('keyword', ( localize('keyword', "Style for keywords.")), [['keyword.control']]);
396
- registerTokenType('number', ( localize('number', "Style for numbers.")), [['constant.numeric']]);
397
- registerTokenType('regexp', ( localize('regexp', "Style for expressions.")), [['constant.regexp']]);
398
- registerTokenType('operator', ( localize('operator', "Style for operators.")), [['keyword.operator']]);
399
- registerTokenType('namespace', ( localize('namespace', "Style for namespaces.")), [['entity.name.namespace']]);
400
- registerTokenType('type', ( localize('type', "Style for types.")), [['entity.name.type'], ['support.type']]);
401
- registerTokenType('struct', ( localize('struct', "Style for structs.")), [['entity.name.type.struct']]);
402
- registerTokenType('class', ( localize('class', "Style for classes.")), [['entity.name.type.class'], ['support.class']]);
403
- registerTokenType('interface', ( localize('interface', "Style for interfaces.")), [['entity.name.type.interface']]);
404
- registerTokenType('enum', ( localize('enum', "Style for enums.")), [['entity.name.type.enum']]);
405
- registerTokenType('typeParameter', ( localize('typeParameter', "Style for type parameters.")), [['entity.name.type.parameter']]);
406
- registerTokenType('function', ( localize('function', "Style for functions")), [['entity.name.function'], ['support.function']]);
407
- registerTokenType('member', ( localize('member', "Style for member functions")), [], 'method', 'Deprecated use `method` instead');
408
- registerTokenType('method', ( localize('method', "Style for method (member functions)")), [['entity.name.function.member'], ['support.function']]);
409
- registerTokenType('macro', ( localize('macro', "Style for macros.")), [['entity.name.function.preprocessor']]);
410
- registerTokenType('variable', ( localize('variable', "Style for variables.")), [['variable.other.readwrite'], ['entity.name.variable']]);
411
- registerTokenType('parameter', ( localize('parameter', "Style for parameters.")), [['variable.parameter']]);
412
- registerTokenType('property', ( localize('property', "Style for properties.")), [['variable.other.property']]);
413
- registerTokenType('enumMember', ( localize('enumMember', "Style for enum members.")), [['variable.other.enummember']]);
414
- registerTokenType('event', ( localize('event', "Style for events.")), [['variable.other.event']]);
415
- registerTokenType('decorator', ( localize('decorator', "Style for decorators & annotations.")), [['entity.name.decorator'], ['entity.name.function']]);
416
- registerTokenType('label', ( localize('labels', "Style for labels. ")), undefined);
417
- registry.registerTokenModifier('declaration', ( localize('declaration', "Style for all symbol declarations.")), undefined);
418
- registry.registerTokenModifier('documentation', ( localize('documentation', "Style to use for references in documentation.")), undefined);
419
- registry.registerTokenModifier('static', ( localize('static', "Style to use for symbols that are static.")), undefined);
420
- registry.registerTokenModifier('abstract', ( localize('abstract', "Style to use for symbols that are abstract.")), undefined);
421
- registry.registerTokenModifier('deprecated', ( localize('deprecated', "Style to use for symbols that are deprecated.")), undefined);
422
- registry.registerTokenModifier('modification', ( localize('modification', "Style to use for write accesses.")), undefined);
423
- registry.registerTokenModifier('async', ( localize('async', "Style to use for symbols that are async.")), undefined);
424
- registry.registerTokenModifier('readonly', ( localize('readonly', "Style to use for symbols that are readonly.")), undefined);
399
+ registerTokenType('comment', ( (localize('comment', "Style for comments."))), [['comment']]);
400
+ registerTokenType('string', ( (localize('string', "Style for strings."))), [['string']]);
401
+ registerTokenType('keyword', ( (localize('keyword', "Style for keywords."))), [['keyword.control']]);
402
+ registerTokenType('number', ( (localize('number', "Style for numbers."))), [['constant.numeric']]);
403
+ registerTokenType('regexp', ( (localize('regexp', "Style for expressions."))), [['constant.regexp']]);
404
+ registerTokenType('operator', ( (localize('operator', "Style for operators."))), [['keyword.operator']]);
405
+ registerTokenType('namespace', ( (localize('namespace', "Style for namespaces."))), [['entity.name.namespace']]);
406
+ registerTokenType('type', ( (localize('type', "Style for types."))), [['entity.name.type'], ['support.type']]);
407
+ registerTokenType('struct', ( (localize('struct', "Style for structs."))), [['entity.name.type.struct']]);
408
+ registerTokenType('class', ( (localize('class', "Style for classes."))), [['entity.name.type.class'], ['support.class']]);
409
+ registerTokenType('interface', ( (localize('interface', "Style for interfaces."))), [['entity.name.type.interface']]);
410
+ registerTokenType('enum', ( (localize('enum', "Style for enums."))), [['entity.name.type.enum']]);
411
+ registerTokenType('typeParameter', ( (localize('typeParameter', "Style for type parameters."))), [['entity.name.type.parameter']]);
412
+ registerTokenType('function', ( (localize('function', "Style for functions"))), [['entity.name.function'], ['support.function']]);
413
+ registerTokenType('member', ( (localize('member', "Style for member functions"))), [], 'method', 'Deprecated use `method` instead');
414
+ registerTokenType('method', ( (localize('method', "Style for method (member functions)"))), [['entity.name.function.member'], ['support.function']]);
415
+ registerTokenType('macro', ( (localize('macro', "Style for macros."))), [['entity.name.function.preprocessor']]);
416
+ registerTokenType('variable', ( (localize('variable', "Style for variables."))), [['variable.other.readwrite'], ['entity.name.variable']]);
417
+ registerTokenType('parameter', ( (localize('parameter', "Style for parameters."))), [['variable.parameter']]);
418
+ registerTokenType('property', ( (localize('property', "Style for properties."))), [['variable.other.property']]);
419
+ registerTokenType('enumMember', ( (localize('enumMember', "Style for enum members."))), [['variable.other.enummember']]);
420
+ registerTokenType('event', ( (localize('event', "Style for events."))), [['variable.other.event']]);
421
+ registerTokenType('decorator', ( (localize('decorator', "Style for decorators & annotations."))), [['entity.name.decorator'], ['entity.name.function']]);
422
+ registerTokenType('label', ( (localize('labels', "Style for labels. "))), undefined);
423
+ registry.registerTokenModifier('declaration', ( (localize('declaration', "Style for all symbol declarations."))), undefined);
424
+ registry.registerTokenModifier('documentation', ( (localize('documentation', "Style to use for references in documentation."))), undefined);
425
+ registry.registerTokenModifier('static', ( (localize('static', "Style to use for symbols that are static."))), undefined);
426
+ registry.registerTokenModifier('abstract', ( (localize('abstract', "Style to use for symbols that are abstract."))), undefined);
427
+ registry.registerTokenModifier('deprecated', ( (localize('deprecated', "Style to use for symbols that are deprecated."))), undefined);
428
+ registry.registerTokenModifier('modification', ( (localize('modification', "Style to use for write accesses."))), undefined);
429
+ registry.registerTokenModifier('async', ( (localize('async', "Style to use for symbols that are async."))), undefined);
430
+ registry.registerTokenModifier('readonly', ( (localize('readonly', "Style to use for symbols that are readonly."))), undefined);
425
431
  registerTokenStyleDefault('variable.readonly', [['variable.other.constant']]);
426
432
  registerTokenStyleDefault('property.readonly', [['variable.other.constant.property']]);
427
433
  registerTokenStyleDefault('type.defaultLibrary', [['support.type']]);
@@ -455,9 +461,9 @@ function getStylingSchemeEntry(description, deprecationMessage) {
455
461
  };
456
462
  }
457
463
  const tokenStylingSchemaId = 'vscode://schemas/token-styling';
458
- const schemaRegistry = Registry.as(Extensions.JSONContribution);
464
+ const schemaRegistry = ( Registry.as(Extensions.JSONContribution));
459
465
  schemaRegistry.registerSchema(tokenStylingSchemaId, tokenClassificationRegistry.getTokenStylingSchema());
460
- const delayer = ( new RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(tokenStylingSchemaId), 200));
466
+ const delayer = ( (new RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(tokenStylingSchemaId), 200)));
461
467
  tokenClassificationRegistry.onDidChangeSchema(() => {
462
468
  if (!delayer.isScheduled()) {
463
469
  delayer.schedule();
@@ -43,4 +43,4 @@ var ExtensionData;
43
43
  }
44
44
  ExtensionData.fromName = fromName;
45
45
  })(ExtensionData || (ExtensionData = {})));
46
- export { ExtensionData as E, IWorkbenchThemeService as I, THEME_SCOPE_OPEN_PAREN as T, VS_HC_LIGHT_THEME as V, THEME_SCOPE_CLOSE_PAREN as a, THEME_SCOPE_WILDCARD as b, VS_HC_THEME as c, VS_LIGHT_THEME as d, VS_DARK_THEME as e, ThemeSettings as f, themeScopeRegex as t };
46
+ export { ExtensionData as E, IWorkbenchThemeService as I, ThemeSettings as T, VS_DARK_THEME as V, VS_LIGHT_THEME as a, VS_HC_THEME as b, VS_HC_LIGHT_THEME as c, THEME_SCOPE_OPEN_PAREN as d, THEME_SCOPE_CLOSE_PAREN as e, THEME_SCOPE_WILDCARD as f, themeScopeRegex as t };
@@ -44,7 +44,7 @@ class SimpleWorkspaceContextService {
44
44
  }
45
45
  function getServiceOverride() {
46
46
  return {
47
- [IWorkspaceContextService.toString()]: new SyncDescriptor(SimpleWorkspaceContextService)
47
+ [( IWorkspaceContextService.toString())]: new SyncDescriptor(SimpleWorkspaceContextService)
48
48
  };
49
49
  }
50
50
  export { getServiceOverride as g };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.69.8",
3
+ "version": "1.69.9",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],