@codingame/monaco-vscode-api 1.67.17 → 1.67.20
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/README.md +15 -2
- package/dist/api.js +3 -3
- package/dist/{async-c7fd4178.js → async-088c7d8b.js} +1 -1
- package/dist/configuration.d.ts +248 -2
- package/dist/configuration.js +24 -931
- package/dist/messages.js +8 -7
- package/dist/missing-services-9c48c894.js +3177 -0
- package/dist/modelEditor.js +6 -5
- package/dist/{services-9299c4ca.js → services-a8445f52.js} +20 -1
- package/dist/services.js +1 -1
- package/package.json +1 -1
- package/dist/missing-services-597951f0.js +0 -1285
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Usage:
|
|
|
58
58
|
import { StandaloneService } from 'vscode/services'
|
|
59
59
|
import getModelEditorServiceOverride from 'vscode/service-override/modelEditor'
|
|
60
60
|
import getMessageServiceOverride from 'vscode/service-override/messages'
|
|
61
|
-
import getConfigurationServiceOverride from 'vscode/service-override/configuration'
|
|
61
|
+
import getConfigurationServiceOverride, { updateUserConfiguration, configurationRegistry } from 'vscode/service-override/configuration'
|
|
62
62
|
|
|
63
63
|
StandaloneServices.initialize({
|
|
64
64
|
...getModelEditorServiceOverride((model, input, sideBySide) => {
|
|
@@ -66,8 +66,21 @@ StandaloneServices.initialize({
|
|
|
66
66
|
// It will be called when for instance the user ctrl+click on an import
|
|
67
67
|
}),
|
|
68
68
|
...getMessageServiceOverride(document.body),
|
|
69
|
-
...getConfigurationServiceOverride(
|
|
69
|
+
...getConfigurationServiceOverride()
|
|
70
70
|
})
|
|
71
|
+
|
|
72
|
+
configurationRegistry.registerDefaultConfigurations([{
|
|
73
|
+
overrides: {
|
|
74
|
+
'editor.fontSize': 10
|
|
75
|
+
}
|
|
76
|
+
}])
|
|
77
|
+
|
|
78
|
+
updateUserConfiguration(`{
|
|
79
|
+
"editor.fontSize": 12,
|
|
80
|
+
"[java]": {
|
|
81
|
+
"editor.fontSize": 15,
|
|
82
|
+
}
|
|
83
|
+
}`)
|
|
71
84
|
```
|
|
72
85
|
|
|
73
86
|
Note: using `vscode/service-override/modelEditor`, you'll be able to use the `vscode.workspace.registerTextDocumentContentProvider` api
|
package/dist/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as Emitter, u as unsupported$1 } from './missing-services-
|
|
1
|
+
import { E as Emitter, u as unsupported$1 } from './missing-services-9c48c894.js';
|
|
2
2
|
import { _ as __classPrivateFieldSet, a as __classPrivateFieldGet, b as __decorate, c as __param } from './tslib.es6-16b40665.js';
|
|
3
|
-
import { c as coalesceInPlace, m as markAsFileSystemProviderError, F as FileSystemProviderErrorCode, S as SIDE_GROUP, A as ACTIVE_GROUP, C as CancellationTokenSource$1, d as delta$1, a as mapArrayOrNot, I as IProgressService, r as readonly, b as ITextFileService, e as IFileService, f as IWorkbenchEnvironmentService, g as IUriIdentityService, h as IWorkingCopyFileService, i as IPathService, j as disposed, k as IEditorService, l as IEditorGroupsService, n as IPaneCompositePartService, o as IProductService, p as ILanguageStatusService, q as IHostService, s as Services, t as FileType$1, u as FilePermission$1 } from './services-
|
|
3
|
+
import { c as coalesceInPlace, m as markAsFileSystemProviderError, F as FileSystemProviderErrorCode, S as SIDE_GROUP, A as ACTIVE_GROUP, C as CancellationTokenSource$1, d as delta$1, a as mapArrayOrNot, I as IProgressService, r as readonly, b as ITextFileService, e as IFileService, f as IWorkbenchEnvironmentService, g as IUriIdentityService, h as IWorkingCopyFileService, i as IPathService, j as disposed, k as IEditorService, l as IEditorGroupsService, n as IPaneCompositePartService, o as IProductService, p as ILanguageStatusService, q as IHostService, s as Services, t as FileType$1, u as FilePermission$1 } from './services-a8445f52.js';
|
|
4
4
|
import { i as isStringArray, w as withUndefinedAsNull } from './types-371cc315.js';
|
|
5
5
|
import { illegalArgument, onUnexpectedError, canceled, transformErrorForSerialization, isCancellationError, onUnexpectedExternalError, CancellationError as CancellationError$1 } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
6
6
|
import { uriToFsPath, URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
@@ -32,7 +32,7 @@ import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation
|
|
|
32
32
|
import { MirrorTextModel } from 'monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js';
|
|
33
33
|
import { ok } from 'monaco-editor/esm/vs/base/common/assert.js';
|
|
34
34
|
import { getWordAtText, ensureValidWordDefinition } from 'monaco-editor/esm/vs/editor/common/core/wordHelper.js';
|
|
35
|
-
import { a as asPromise, B as Barrier, r as raceCancellationError } from './async-
|
|
35
|
+
import { a as asPromise, B as Barrier, r as raceCancellationError } from './async-088c7d8b.js';
|
|
36
36
|
import { ThemeIcon as ThemeIcon$2 } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
37
37
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
38
38
|
import { Severity as Severity$1, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Emitter } from './missing-services-
|
|
1
|
+
import { E as Emitter } from './missing-services-9c48c894.js';
|
|
2
2
|
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
3
|
import { extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
4
4
|
import { CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
package/dist/configuration.d.ts
CHANGED
|
@@ -285,8 +285,254 @@ interface UriComponents {
|
|
|
285
285
|
fragment: string;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
+
declare type JSONSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'null' | 'array' | 'object';
|
|
289
|
+
interface IJSONSchema {
|
|
290
|
+
id?: string;
|
|
291
|
+
$id?: string;
|
|
292
|
+
$schema?: string;
|
|
293
|
+
type?: JSONSchemaType | JSONSchemaType[];
|
|
294
|
+
title?: string;
|
|
295
|
+
default?: any;
|
|
296
|
+
definitions?: IJSONSchemaMap;
|
|
297
|
+
description?: string;
|
|
298
|
+
properties?: IJSONSchemaMap;
|
|
299
|
+
patternProperties?: IJSONSchemaMap;
|
|
300
|
+
additionalProperties?: boolean | IJSONSchema;
|
|
301
|
+
minProperties?: number;
|
|
302
|
+
maxProperties?: number;
|
|
303
|
+
dependencies?: IJSONSchemaMap | {
|
|
304
|
+
[prop: string]: string[];
|
|
305
|
+
};
|
|
306
|
+
items?: IJSONSchema | IJSONSchema[];
|
|
307
|
+
minItems?: number;
|
|
308
|
+
maxItems?: number;
|
|
309
|
+
uniqueItems?: boolean;
|
|
310
|
+
additionalItems?: boolean | IJSONSchema;
|
|
311
|
+
pattern?: string;
|
|
312
|
+
minLength?: number;
|
|
313
|
+
maxLength?: number;
|
|
314
|
+
minimum?: number;
|
|
315
|
+
maximum?: number;
|
|
316
|
+
exclusiveMinimum?: boolean | number;
|
|
317
|
+
exclusiveMaximum?: boolean | number;
|
|
318
|
+
multipleOf?: number;
|
|
319
|
+
required?: string[];
|
|
320
|
+
$ref?: string;
|
|
321
|
+
anyOf?: IJSONSchema[];
|
|
322
|
+
allOf?: IJSONSchema[];
|
|
323
|
+
oneOf?: IJSONSchema[];
|
|
324
|
+
not?: IJSONSchema;
|
|
325
|
+
enum?: any[];
|
|
326
|
+
format?: string;
|
|
327
|
+
const?: any;
|
|
328
|
+
contains?: IJSONSchema;
|
|
329
|
+
propertyNames?: IJSONSchema;
|
|
330
|
+
$comment?: string;
|
|
331
|
+
if?: IJSONSchema;
|
|
332
|
+
then?: IJSONSchema;
|
|
333
|
+
else?: IJSONSchema;
|
|
334
|
+
defaultSnippets?: IJSONSchemaSnippet[];
|
|
335
|
+
errorMessage?: string;
|
|
336
|
+
patternErrorMessage?: string;
|
|
337
|
+
deprecationMessage?: string;
|
|
338
|
+
markdownDeprecationMessage?: string;
|
|
339
|
+
enumDescriptions?: string[];
|
|
340
|
+
markdownEnumDescriptions?: string[];
|
|
341
|
+
markdownDescription?: string;
|
|
342
|
+
doNotSuggest?: boolean;
|
|
343
|
+
suggestSortText?: string;
|
|
344
|
+
allowComments?: boolean;
|
|
345
|
+
allowTrailingCommas?: boolean;
|
|
346
|
+
}
|
|
347
|
+
interface IJSONSchemaMap {
|
|
348
|
+
[name: string]: IJSONSchema;
|
|
349
|
+
}
|
|
350
|
+
interface IJSONSchemaSnippet {
|
|
351
|
+
label?: string;
|
|
352
|
+
description?: string;
|
|
353
|
+
body?: any;
|
|
354
|
+
bodyText?: string;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* An interface for a JavaScript object that
|
|
359
|
+
* acts a dictionary. The keys are strings.
|
|
360
|
+
*/
|
|
361
|
+
declare type IStringDictionary<V> = Record<string, V>;
|
|
362
|
+
|
|
363
|
+
declare enum EditPresentationTypes {
|
|
364
|
+
Multiline = "multilineText",
|
|
365
|
+
Singleline = "singlelineText"
|
|
366
|
+
}
|
|
367
|
+
interface IConfigurationRegistry {
|
|
368
|
+
/**
|
|
369
|
+
* Register a configuration to the registry.
|
|
370
|
+
*/
|
|
371
|
+
registerConfiguration(configuration: IConfigurationNode): void;
|
|
372
|
+
/**
|
|
373
|
+
* Register multiple configurations to the registry.
|
|
374
|
+
*/
|
|
375
|
+
registerConfigurations(configurations: IConfigurationNode[], validate?: boolean): void;
|
|
376
|
+
/**
|
|
377
|
+
* Deregister multiple configurations from the registry.
|
|
378
|
+
*/
|
|
379
|
+
deregisterConfigurations(configurations: IConfigurationNode[]): void;
|
|
380
|
+
/**
|
|
381
|
+
* update the configuration registry by
|
|
382
|
+
* - registering the configurations to add
|
|
383
|
+
* - dereigstering the configurations to remove
|
|
384
|
+
*/
|
|
385
|
+
updateConfigurations(configurations: {
|
|
386
|
+
add: IConfigurationNode[];
|
|
387
|
+
remove: IConfigurationNode[];
|
|
388
|
+
}): void;
|
|
389
|
+
/**
|
|
390
|
+
* Register multiple default configurations to the registry.
|
|
391
|
+
*/
|
|
392
|
+
registerDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;
|
|
393
|
+
/**
|
|
394
|
+
* Deregister multiple default configurations from the registry.
|
|
395
|
+
*/
|
|
396
|
+
deregisterDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;
|
|
397
|
+
/**
|
|
398
|
+
* Return the registered configuration defaults overrides
|
|
399
|
+
*/
|
|
400
|
+
getConfigurationDefaultsOverrides(): Map<string, IConfigurationDefaultOverride>;
|
|
401
|
+
/**
|
|
402
|
+
* Signal that the schema of a configuration setting has changes. It is currently only supported to change enumeration values.
|
|
403
|
+
* Property or default value changes are not allowed.
|
|
404
|
+
*/
|
|
405
|
+
notifyConfigurationSchemaUpdated(...configurations: IConfigurationNode[]): void;
|
|
406
|
+
/**
|
|
407
|
+
* Event that fires whenever a configuration has been
|
|
408
|
+
* registered.
|
|
409
|
+
*/
|
|
410
|
+
readonly onDidSchemaChange: Event<void>;
|
|
411
|
+
/**
|
|
412
|
+
* Event that fires whenever a configuration has been
|
|
413
|
+
* registered.
|
|
414
|
+
*/
|
|
415
|
+
readonly onDidUpdateConfiguration: Event<{
|
|
416
|
+
properties: string[];
|
|
417
|
+
defaultsOverrides?: boolean;
|
|
418
|
+
}>;
|
|
419
|
+
/**
|
|
420
|
+
* Returns all configuration nodes contributed to this registry.
|
|
421
|
+
*/
|
|
422
|
+
getConfigurations(): IConfigurationNode[];
|
|
423
|
+
/**
|
|
424
|
+
* Returns all configurations settings of all configuration nodes contributed to this registry.
|
|
425
|
+
*/
|
|
426
|
+
getConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;
|
|
427
|
+
/**
|
|
428
|
+
* Returns all excluded configurations settings of all configuration nodes contributed to this registry.
|
|
429
|
+
*/
|
|
430
|
+
getExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;
|
|
431
|
+
/**
|
|
432
|
+
* Register the identifiers for editor configurations
|
|
433
|
+
*/
|
|
434
|
+
registerOverrideIdentifiers(identifiers: string[]): void;
|
|
435
|
+
}
|
|
436
|
+
declare const enum ConfigurationScope {
|
|
437
|
+
/**
|
|
438
|
+
* Application specific configuration, which can be configured only in local user settings.
|
|
439
|
+
*/
|
|
440
|
+
APPLICATION = 1,
|
|
441
|
+
/**
|
|
442
|
+
* Machine specific configuration, which can be configured only in local and remote user settings.
|
|
443
|
+
*/
|
|
444
|
+
MACHINE = 2,
|
|
445
|
+
/**
|
|
446
|
+
* Window specific configuration, which can be configured in the user or workspace settings.
|
|
447
|
+
*/
|
|
448
|
+
WINDOW = 3,
|
|
449
|
+
/**
|
|
450
|
+
* Resource specific configuration, which can be configured in the user, workspace or folder settings.
|
|
451
|
+
*/
|
|
452
|
+
RESOURCE = 4,
|
|
453
|
+
/**
|
|
454
|
+
* Resource specific configuration that can be configured in language specific settings
|
|
455
|
+
*/
|
|
456
|
+
LANGUAGE_OVERRIDABLE = 5,
|
|
457
|
+
/**
|
|
458
|
+
* Machine specific configuration that can also be configured in workspace or folder settings.
|
|
459
|
+
*/
|
|
460
|
+
MACHINE_OVERRIDABLE = 6
|
|
461
|
+
}
|
|
462
|
+
interface IConfigurationPropertySchema extends IJSONSchema {
|
|
463
|
+
scope?: ConfigurationScope;
|
|
464
|
+
/**
|
|
465
|
+
* When restricted, value of this configuration will be read only from trusted sources.
|
|
466
|
+
* For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.
|
|
467
|
+
*/
|
|
468
|
+
restricted?: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* When `false` this property is excluded from the registry. Default is to include.
|
|
471
|
+
*/
|
|
472
|
+
included?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* List of tags associated to the property.
|
|
475
|
+
* - A tag can be used for filtering
|
|
476
|
+
* - Use `experimental` tag for marking the setting as experimental. **Note:** Defaults of experimental settings can be changed by the running experiments.
|
|
477
|
+
*/
|
|
478
|
+
tags?: string[];
|
|
479
|
+
/**
|
|
480
|
+
* When enabled this setting is ignored during sync and user can override this.
|
|
481
|
+
*/
|
|
482
|
+
ignoreSync?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* When enabled this setting is ignored during sync and user cannot override this.
|
|
485
|
+
*/
|
|
486
|
+
disallowSyncIgnore?: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Labels for enumeration items
|
|
489
|
+
*/
|
|
490
|
+
enumItemLabels?: string[];
|
|
491
|
+
/**
|
|
492
|
+
* When specified, controls the presentation format of string settings.
|
|
493
|
+
* Otherwise, the presentation format defaults to `singleline`.
|
|
494
|
+
*/
|
|
495
|
+
editPresentation?: EditPresentationTypes;
|
|
496
|
+
/**
|
|
497
|
+
* When specified, gives an order number for the setting
|
|
498
|
+
* within the settings editor. Otherwise, the setting is placed at the end.
|
|
499
|
+
*/
|
|
500
|
+
order?: number;
|
|
501
|
+
}
|
|
502
|
+
interface IExtensionInfo {
|
|
503
|
+
id: string;
|
|
504
|
+
displayName?: string;
|
|
505
|
+
}
|
|
506
|
+
interface IConfigurationNode {
|
|
507
|
+
id?: string;
|
|
508
|
+
order?: number;
|
|
509
|
+
type?: string | string[];
|
|
510
|
+
title?: string;
|
|
511
|
+
description?: string;
|
|
512
|
+
properties?: IStringDictionary<IConfigurationPropertySchema>;
|
|
513
|
+
allOf?: IConfigurationNode[];
|
|
514
|
+
scope?: ConfigurationScope;
|
|
515
|
+
extensionInfo?: IExtensionInfo;
|
|
516
|
+
restrictedProperties?: string[];
|
|
517
|
+
}
|
|
518
|
+
interface IConfigurationDefaults {
|
|
519
|
+
overrides: IStringDictionary<any>;
|
|
520
|
+
source?: IExtensionInfo | string;
|
|
521
|
+
}
|
|
522
|
+
declare type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & {
|
|
523
|
+
defaultDefaultValue?: any;
|
|
524
|
+
source?: IExtensionInfo;
|
|
525
|
+
defaultValueSource?: IExtensionInfo | string;
|
|
526
|
+
};
|
|
527
|
+
declare type IConfigurationDefaultOverride = {
|
|
528
|
+
value: any;
|
|
529
|
+
source?: IExtensionInfo | string;
|
|
530
|
+
};
|
|
531
|
+
|
|
288
532
|
type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
|
|
289
533
|
|
|
290
|
-
declare function
|
|
534
|
+
declare function updateUserConfiguration(configurationJson: string): void;
|
|
535
|
+
declare const configurationRegistry: IConfigurationRegistry;
|
|
536
|
+
declare function getServiceOverride(settingsResource?: URI): IEditorOverrideServices;
|
|
291
537
|
|
|
292
|
-
export { getServiceOverride as default };
|
|
538
|
+
export { configurationRegistry, getServiceOverride as default, updateUserConfiguration };
|