@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
@@ -1,6 +1,6 @@
1
1
  import * as monaco from 'monaco-editor';
2
2
  import * as vscode from 'vscode';
3
- import { IGrammar as IGrammar$1 } from 'vscode-textmate';
3
+ import { IGrammar } from 'vscode-textmate';
4
4
 
5
5
  /**
6
6
  * Identifies a service of type `T`.
@@ -272,484 +272,13 @@ declare namespace Event {
272
272
  function fromObservable<T>(obs: IObservable<T, any>, store?: DisposableStore): Event<T>;
273
273
  }
274
274
 
275
- /**
276
- * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
277
- * This class is a simple parser which creates the basic component parts
278
- * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
279
- * and encoding.
280
- *
281
- * ```txt
282
- * foo://example.com:8042/over/there?name=ferret#nose
283
- * \_/ \______________/\_________/ \_________/ \__/
284
- * | | | | |
285
- * scheme authority path query fragment
286
- * | _____________________|__
287
- * / \ / \
288
- * urn:example:animal:ferret:nose
289
- * ```
290
- */
291
- declare class URI implements UriComponents {
292
- static isUri(thing: any): thing is URI;
293
- /**
294
- * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
295
- * The part before the first colon.
296
- */
297
- readonly scheme: string;
298
- /**
299
- * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.
300
- * The part between the first double slashes and the next slash.
301
- */
302
- readonly authority: string;
303
- /**
304
- * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.
305
- */
306
- readonly path: string;
307
- /**
308
- * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.
309
- */
310
- readonly query: string;
311
- /**
312
- * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.
313
- */
314
- readonly fragment: string;
315
- /**
316
- * @internal
317
- */
318
- protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);
319
- /**
320
- * @internal
321
- */
322
- protected constructor(components: UriComponents);
323
- /**
324
- * Returns a string representing the corresponding file system path of this URI.
325
- * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
326
- * platform specific path separator.
327
- *
328
- * * Will *not* validate the path for invalid characters and semantics.
329
- * * Will *not* look at the scheme of this URI.
330
- * * The result shall *not* be used for display purposes but for accessing a file on disk.
331
- *
332
- *
333
- * The *difference* to `URI#path` is the use of the platform specific separator and the handling
334
- * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
335
- *
336
- * ```ts
337
- const u = URI.parse('file://server/c$/folder/file.txt')
338
- u.authority === 'server'
339
- u.path === '/shares/c$/file.txt'
340
- u.fsPath === '\\server\c$\folder\file.txt'
341
- ```
342
- *
343
- * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
344
- * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
345
- * with URIs that represent files on disk (`file` scheme).
346
- */
347
- get fsPath(): string;
348
- with(change: {
349
- scheme?: string;
350
- authority?: string | null;
351
- path?: string | null;
352
- query?: string | null;
353
- fragment?: string | null;
354
- }): URI;
355
- /**
356
- * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,
357
- * `file:///usr/home`, or `scheme:with/path`.
358
- *
359
- * @param value A string which represents an URI (see `URI#toString`).
360
- */
361
- static parse(value: string, _strict?: boolean): URI;
362
- /**
363
- * Creates a new URI from a file system path, e.g. `c:\my\files`,
364
- * `/usr/home`, or `\\server\share\some\path`.
365
- *
366
- * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
367
- * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
368
- * `URI.parse('file://' + path)` because the path might contain characters that are
369
- * interpreted (# and ?). See the following sample:
370
- * ```ts
371
- const good = URI.file('/coding/c#/project1');
372
- good.scheme === 'file';
373
- good.path === '/coding/c#/project1';
374
- good.fragment === '';
375
- const bad = URI.parse('file://' + '/coding/c#/project1');
376
- bad.scheme === 'file';
377
- bad.path === '/coding/c'; // path is now broken
378
- bad.fragment === '/project1';
379
- ```
380
- *
381
- * @param path A file system path (see `URI#fsPath`)
382
- */
383
- static file(path: string): URI;
384
- static from(components: {
385
- scheme: string;
386
- authority?: string;
387
- path?: string;
388
- query?: string;
389
- fragment?: string;
390
- }): URI;
391
- /**
392
- * Join a URI path with path fragments and normalizes the resulting path.
393
- *
394
- * @param uri The input URI.
395
- * @param pathFragment The path fragment to add to the URI path.
396
- * @returns The resulting URI.
397
- */
398
- static joinPath(uri: URI, ...pathFragment: string[]): URI;
399
- /**
400
- * Creates a string representation for this URI. It's guaranteed that calling
401
- * `URI.parse` with the result of this function creates an URI which is equal
402
- * to this URI.
403
- *
404
- * * The result shall *not* be used for display purposes but for externalization or transport.
405
- * * The result will be encoded using the percentage encoding and encoding happens mostly
406
- * ignore the scheme-specific encoding rules.
407
- *
408
- * @param skipEncoding Do not encode the result, default is `false`
409
- */
410
- toString(skipEncoding?: boolean): string;
411
- toJSON(): UriComponents;
412
- static revive(data: UriComponents | URI): URI;
413
- static revive(data: UriComponents | URI | undefined): URI | undefined;
414
- static revive(data: UriComponents | URI | null): URI | null;
415
- static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
416
- }
417
- interface UriComponents {
418
- scheme: string;
419
- authority: string;
420
- path: string;
421
- query: string;
422
- fragment: string;
423
- }
424
-
425
- interface ILocalizedString {
426
- /**
427
- * The localized value of the string.
428
- */
429
- value: string;
430
- /**
431
- * The original (non localized value of the string)
432
- */
433
- original: string;
434
- }
435
-
436
- /**
437
- * Type of extension.
438
- *
439
- * **NOTE**: This is defined in `platform/environment` because it can appear as a CLI argument.
440
- */
441
- type ExtensionKind = 'ui' | 'workspace' | 'web';
442
-
443
- interface ICommand {
444
- command: string;
445
- title: string | ILocalizedString;
446
- category?: string | ILocalizedString;
447
- }
448
- interface IConfigurationProperty {
449
- description: string;
450
- type: string | string[];
451
- default?: any;
452
- }
453
- interface IConfiguration {
454
- id?: string;
455
- order?: number;
456
- title?: string;
457
- properties: {
458
- [key: string]: IConfigurationProperty;
459
- };
460
- }
461
- interface IDebugger {
462
- label?: string;
463
- type: string;
464
- runtime?: string;
465
- }
466
- interface IGrammar {
467
- language: string;
468
- }
469
- interface IJSONValidation {
470
- fileMatch: string | string[];
471
- url: string;
472
- }
473
- interface IKeyBinding {
474
- command: string;
475
- key: string;
476
- when?: string;
477
- mac?: string;
478
- linux?: string;
479
- win?: string;
480
- }
481
- interface ILanguage {
482
- id: string;
483
- extensions: string[];
484
- aliases: string[];
485
- }
486
- interface IMenu {
487
- command: string;
488
- alt?: string;
489
- when?: string;
490
- group?: string;
491
- }
492
- interface ISnippet {
493
- language: string;
494
- }
495
- interface ITheme {
496
- label: string;
497
- }
498
- interface IViewContainer {
499
- id: string;
500
- title: string;
501
- }
502
- interface IView {
503
- id: string;
504
- name: string;
505
- }
506
- interface IColor {
507
- id: string;
508
- description: string;
509
- defaults: {
510
- light: string;
511
- dark: string;
512
- highContrast: string;
513
- };
514
- }
515
- interface IWebviewEditor {
516
- readonly viewType: string;
517
- readonly priority: string;
518
- readonly selector: readonly {
519
- readonly filenamePattern?: string;
520
- }[];
521
- }
522
- interface ICodeActionContributionAction {
523
- readonly kind: string;
524
- readonly title: string;
525
- readonly description?: string;
526
- }
527
- interface ICodeActionContribution {
528
- readonly languages: readonly string[];
529
- readonly actions: readonly ICodeActionContributionAction[];
530
- }
531
- interface IAuthenticationContribution {
532
- readonly id: string;
533
- readonly label: string;
534
- }
535
- interface IWalkthroughStep {
536
- readonly id: string;
537
- readonly title: string;
538
- readonly description: string | undefined;
539
- readonly media: {
540
- image: string | {
541
- dark: string;
542
- light: string;
543
- hc: string;
544
- };
545
- altText: string;
546
- markdown?: never;
547
- svg?: never;
548
- } | {
549
- markdown: string;
550
- image?: never;
551
- svg?: never;
552
- } | {
553
- svg: string;
554
- altText: string;
555
- markdown?: never;
556
- image?: never;
557
- };
558
- readonly completionEvents?: string[];
559
- /** @deprecated use `completionEvents: 'onCommand:...'` */
560
- readonly doneOn?: {
561
- command: string;
562
- };
563
- readonly when?: string;
564
- }
565
- interface IWalkthrough {
566
- readonly id: string;
567
- readonly title: string;
568
- readonly icon?: string;
569
- readonly description: string;
570
- readonly steps: IWalkthroughStep[];
571
- readonly featuredFor: string[] | undefined;
572
- readonly when?: string;
573
- }
574
- interface IStartEntry {
575
- readonly title: string;
576
- readonly description: string;
577
- readonly command: string;
578
- readonly when?: string;
579
- readonly category: 'file' | 'folder' | 'notebook';
580
- }
581
- interface INotebookEntry {
582
- readonly type: string;
583
- readonly displayName: string;
584
- }
585
- interface INotebookRendererContribution {
586
- readonly id: string;
587
- readonly displayName: string;
588
- readonly mimeTypes: string[];
589
- }
590
- interface ITranslation {
591
- id: string;
592
- path: string;
593
- }
594
- interface ILocalizationContribution {
595
- languageId: string;
596
- languageName?: string;
597
- localizedLanguageName?: string;
598
- translations: ITranslation[];
599
- minimalTranslations?: {
600
- [key: string]: string;
601
- };
602
- }
603
- interface IExtensionContributions {
604
- commands?: ICommand[];
605
- configuration?: IConfiguration | IConfiguration[];
606
- debuggers?: IDebugger[];
607
- grammars?: IGrammar[];
608
- jsonValidation?: IJSONValidation[];
609
- keybindings?: IKeyBinding[];
610
- languages?: ILanguage[];
611
- menus?: {
612
- [context: string]: IMenu[];
613
- };
614
- snippets?: ISnippet[];
615
- themes?: ITheme[];
616
- iconThemes?: ITheme[];
617
- productIconThemes?: ITheme[];
618
- viewsContainers?: {
619
- [location: string]: IViewContainer[];
620
- };
621
- views?: {
622
- [location: string]: IView[];
623
- };
624
- colors?: IColor[];
625
- localizations?: ILocalizationContribution[];
626
- readonly customEditors?: readonly IWebviewEditor[];
627
- readonly codeActions?: readonly ICodeActionContribution[];
628
- authentication?: IAuthenticationContribution[];
629
- walkthroughs?: IWalkthrough[];
630
- startEntries?: IStartEntry[];
631
- readonly notebooks?: INotebookEntry[];
632
- readonly notebookRenderer?: INotebookRendererContribution[];
633
- }
634
- interface IExtensionCapabilities {
635
- readonly virtualWorkspaces?: ExtensionVirtualWorkspaceSupport;
636
- readonly untrustedWorkspaces?: ExtensionUntrustedWorkspaceSupport;
637
- }
638
- type LimitedWorkspaceSupportType = 'limited';
639
- type ExtensionUntrustedWorkspaceSupport = {
640
- supported: true;
641
- } | {
642
- supported: false;
643
- description: string;
644
- } | {
645
- supported: LimitedWorkspaceSupportType;
646
- description: string;
647
- restrictedConfigurations?: string[];
648
- };
649
- type ExtensionVirtualWorkspaceSupport = boolean | {
650
- supported: true;
651
- } | {
652
- supported: false | LimitedWorkspaceSupportType;
653
- description: string;
654
- };
655
- interface IRelaxedExtensionManifest {
656
- name: string;
657
- displayName?: string;
658
- publisher: string;
659
- version: string;
660
- engines: {
661
- readonly vscode: string;
662
- };
663
- description?: string;
664
- main?: string;
665
- browser?: string;
666
- preview?: boolean;
667
- l10n?: string;
668
- icon?: string;
669
- categories?: string[];
670
- keywords?: string[];
671
- activationEvents?: string[];
672
- extensionDependencies?: string[];
673
- extensionPack?: string[];
674
- extensionKind?: ExtensionKind | ExtensionKind[];
675
- contributes?: IExtensionContributions;
676
- repository?: {
677
- url: string;
678
- };
679
- bugs?: {
680
- url: string;
681
- };
682
- enabledApiProposals?: readonly string[];
683
- api?: string;
684
- scripts?: {
685
- [key: string]: string;
686
- };
687
- capabilities?: IExtensionCapabilities;
688
- }
689
- declare const enum TargetPlatform {
690
- WIN32_X64 = "win32-x64",
691
- WIN32_IA32 = "win32-ia32",
692
- WIN32_ARM64 = "win32-arm64",
693
- LINUX_X64 = "linux-x64",
694
- LINUX_ARM64 = "linux-arm64",
695
- LINUX_ARMHF = "linux-armhf",
696
- ALPINE_X64 = "alpine-x64",
697
- ALPINE_ARM64 = "alpine-arm64",
698
- DARWIN_X64 = "darwin-x64",
699
- DARWIN_ARM64 = "darwin-arm64",
700
- WEB = "web",
701
- UNIVERSAL = "universal",
702
- UNKNOWN = "unknown",
703
- UNDEFINED = "undefined"
704
- }
705
- /**
706
- * **!Do not construct directly!**
707
- *
708
- * **!Only static methods because it gets serialized!**
709
- *
710
- * This represents the "canonical" version for an extension identifier. Extension ids
711
- * have to be case-insensitive (due to the marketplace), but we must ensure case
712
- * preservation because the extension API is already public at this time.
713
- *
714
- * For example, given an extension with the publisher `"Hello"` and the name `"World"`,
715
- * its canonical extension identifier is `"Hello.World"`. This extension could be
716
- * referenced in some other extension's dependencies using the string `"hello.world"`.
717
- *
718
- * To make matters more complicated, an extension can optionally have an UUID. When two
719
- * extensions have the same UUID, they are considered equal even if their identifier is different.
720
- */
721
- declare class ExtensionIdentifier {
722
- readonly value: string;
723
- private readonly _lower;
724
- constructor(value: string);
725
- static equals(a: ExtensionIdentifier | string | null | undefined, b: ExtensionIdentifier | string | null | undefined): boolean;
726
- /**
727
- * Gives the value by which to index (for equality).
728
- */
729
- static toKey(id: ExtensionIdentifier | string): string;
730
- }
731
- interface IRelaxedExtensionDescription extends IRelaxedExtensionManifest {
732
- id?: string;
733
- identifier: ExtensionIdentifier;
734
- uuid?: string;
735
- targetPlatform: TargetPlatform;
736
- isBuiltin: boolean;
737
- isUserBuiltin: boolean;
738
- isUnderDevelopment: boolean;
739
- extensionLocation: URI;
740
- browserNlsBundleUris?: {
741
- [language: string]: URI;
742
- };
743
- }
744
- type IExtensionDescription = Readonly<IRelaxedExtensionDescription>;
745
-
746
275
  type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
747
276
 
748
277
  declare const ITextMateTokenizationService: ServiceIdentifier<ITextMateTokenizationService>;
749
278
  interface ITextMateTokenizationService {
750
279
  readonly _serviceBrand: undefined;
751
280
  onDidEncounterLanguage: Event<string>;
752
- createGrammar(languageId: string): Promise<IGrammar$1 | null>;
281
+ createGrammar(languageId: string): Promise<IGrammar | null>;
753
282
  startDebugMode(printFn: (str: string) => void, onStop: () => void): void;
754
283
  }
755
284
 
@@ -771,7 +300,6 @@ interface ITMSyntaxExtensionPoint {
771
300
  }
772
301
 
773
302
  type PartialITMSyntaxExtensionPoint = Partial<ITMSyntaxExtensionPoint> & Pick<ITMSyntaxExtensionPoint, 'path' | 'scopeName'>;
774
- declare function setGrammars<T extends PartialITMSyntaxExtensionPoint>(grammars: T[], getContent: (grammar: T) => Promise<string>, extension?: IExtensionDescription): void;
775
303
  declare function getServiceOverride(): IEditorOverrideServices;
776
304
 
777
- export { PartialITMSyntaxExtensionPoint as ITMSyntaxExtensionPoint, ITextMateTokenizationService, getServiceOverride as default, setGrammars };
305
+ export { PartialITMSyntaxExtensionPoint as ITMSyntaxExtensionPoint, ITextMateTokenizationService, getServiceOverride as default };
package/dist/textmate.js CHANGED
@@ -1,9 +1,7 @@
1
- import { h as nodeModulesAsarUnpackedPath, j as nodeModulesPath, k as nodeModulesAsarPath } from './polyfill.js';
2
- import { f as ITextMateTokenizationService } from './missing-services.js';
3
- import { g as getExtensionPoint, a as ExtensionMessageCollector, c as consoleExtensionMessageHandler, o as onServicesInitialized, E as ExtensionsRegistry } from './tools.js';
4
- import { E as Emitter, _ as __decorate, a as __param } from './contextkey.js';
5
- import { r as registerExtensionFile, g as getServiceOverride$1, I as IExtensionResourceLoaderService } from './files.js';
6
- import { S as Services, l as IWorkbenchEnvironmentService } from './services2.js';
1
+ import { o as onServicesInitialized, u as nodeModulesAsarUnpackedPath, v as nodeModulesPath, x as nodeModulesAsarPath } from './polyfill.js';
2
+ import { bW as ITextMateTokenizationService } from './missing-services.js';
3
+ import { E as Emitter, _ as __decorate, a as __param, o as IWorkbenchEnvironmentService } from './services2.js';
4
+ import { I as IExtensionResourceLoaderService } from './extensionResourceLoader.js';
7
5
  import { Disposable, DisposableStore, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
8
6
  import { TokenizationRegistry, EncodedTokenizationResult } from 'monaco-editor/esm/vs/editor/common/languages.js';
9
7
  import { TokenMetadata } from 'monaco-editor/esm/vs/editor/common/encodedTokenAttributes.js';
@@ -24,6 +22,7 @@ import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/c
24
22
  import { FileAccess } from 'monaco-editor/esm/vs/base/common/network.js';
25
23
  import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
26
24
  import { joinPath, isEqualOrParent, isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
25
+ import { E as ExtensionsRegistry } from './extensionsRegistry.js';
27
26
  import { l as languagesExtPoint } from './languageService.js';
28
27
  import { localize } from 'monaco-editor/esm/vs/nls.js';
29
28
  import { I as IWorkbenchThemeService } from './workbenchThemeService.js';
@@ -35,7 +34,7 @@ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
35
34
  import { IProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
36
35
  import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
37
36
  import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
38
- import { bj as DEFAULT_EXTENSION } from './extHost.js';
37
+ import { g as getServiceOverride$1 } from './files.js';
39
38
  import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
40
39
  class TextMateTokenizationSupport extends Disposable {
41
40
  constructor(_grammar, _initialState, _containsEmbeddedLanguages, _createBackgroundTokenizer) {
@@ -164,7 +163,7 @@ class SingleArrayEdit {
164
163
  }
165
164
  class MonotonousIndexTransformer {
166
165
  static fromMany(transformations) {
167
- const transformers = transformations.map(t => ( (new MonotonousIndexTransformer(t))));
166
+ const transformers = ( (transformations.map(t => ( (new MonotonousIndexTransformer(t))))));
168
167
  return (
169
168
  (new CombinedIndexTransformer(transformers))
170
169
  );
@@ -245,11 +244,13 @@ class TextMateWorkerTokenizerController extends Disposable {
245
244
  }
246
245
  let tokens = ContiguousMultilineTokensBuilder.deserialize(( (new Uint8Array(rawTokens))));
247
246
  if (this._pendingChanges.length > 0) {
248
- const curToFutureTransformerTokens = MonotonousIndexTransformer.fromMany(this._pendingChanges.map((c) => ( (new ArrayEdit(c.changes.map((c) => ( (new SingleArrayEdit(
249
- c.range.startLineNumber - 1,
250
- (c.range.endLineNumber - c.range.startLineNumber) + 1,
251
- countEOL(c.text)[0] + 1
252
- )))))))));
247
+ const curToFutureTransformerTokens = MonotonousIndexTransformer.fromMany(( (this._pendingChanges.map(
248
+ (c) => ( (new ArrayEdit( (c.changes.map((c) => ( (new SingleArrayEdit(
249
+ c.range.startLineNumber - 1,
250
+ (c.range.endLineNumber - c.range.startLineNumber) + 1,
251
+ countEOL(c.text)[0] + 1
252
+ ))))))))
253
+ ))));
253
254
  const b = ( (new ContiguousMultilineTokensBuilder()));
254
255
  for (const t of tokens) {
255
256
  for (let i = t.startLineNumber; i <= t.endLineNumber; i++) {
@@ -269,7 +270,7 @@ class TextMateWorkerTokenizerController extends Disposable {
269
270
  }
270
271
  }
271
272
  this._backgroundTokenizationStore.setTokens(tokens);
272
- const curToFutureTransformerStates = MonotonousIndexTransformer.fromMany(this._pendingChanges.map((c) => lineArrayEditFromModelContentChange(c.changes)));
273
+ const curToFutureTransformerStates = MonotonousIndexTransformer.fromMany(( (this._pendingChanges.map((c) => lineArrayEditFromModelContentChange(c.changes)))));
273
274
  for (const d of stateDeltas) {
274
275
  let prevState = d.startLineNumber <= 1 ? this._initialState : this._states.get(d.startLineNumber - 1 - 1);
275
276
  for (let i = 0; i < d.stateDeltas.length; i++) {
@@ -290,11 +291,11 @@ class TextMateWorkerTokenizerController extends Disposable {
290
291
  }
291
292
  function lineArrayEditFromModelContentChange(c) {
292
293
  return (
293
- (new ArrayEdit(c.map((c) => ( (new SingleArrayEdit(
294
+ (new ArrayEdit( (c.map((c) => ( (new SingleArrayEdit(
294
295
  c.range.startLineNumber - 1,
295
296
  c.range.endLineNumber - c.range.startLineNumber,
296
297
  countEOL(c.text)[0]
297
- ))))))
298
+ )))))))
298
299
  );
299
300
  }
300
301
  let TextMateWorkerHost = class TextMateWorkerHost {
@@ -358,7 +359,7 @@ let TextMateWorkerHost = class TextMateWorkerHost {
358
359
  host: this,
359
360
  });
360
361
  this._worker = worker;
361
- const proxy = await worker.getProxy();
362
+ const proxy = await ( (worker.getProxy()));
362
363
  if (this._worker !== worker) {
363
364
  return null;
364
365
  }
@@ -1074,17 +1075,6 @@ function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _la
1074
1075
  }
1075
1076
  return true;
1076
1077
  }
1077
- const extensionPoint = getExtensionPoint('grammars');
1078
- function setGrammars(grammars, getContent, extension = Services.get().extension ?? DEFAULT_EXTENSION) {
1079
- extensionPoint.acceptUsers([{
1080
- description: extension,
1081
- value: grammars,
1082
- collector: new ExtensionMessageCollector(consoleExtensionMessageHandler, extension, extensionPoint.name)
1083
- }]);
1084
- for (const grammar of grammars) {
1085
- registerExtensionFile(joinPath(extension.extensionLocation, grammar.path), () => getContent(grammar));
1086
- }
1087
- }
1088
1078
  function initialize(instantiationService) {
1089
1079
  instantiationService.invokeFunction((accessor) => accessor.get(ITextMateTokenizationService));
1090
1080
  }
@@ -1095,4 +1085,4 @@ function getServiceOverride() {
1095
1085
  [( ITextMateTokenizationService.toString())]: new SyncDescriptor(TextMateTokenizationFeature)
1096
1086
  };
1097
1087
  }
1098
- export { ITextMateTokenizationService, getServiceOverride as default, setGrammars };
1088
+ export { ITextMateTokenizationService, getServiceOverride as default };
package/dist/theme.d.ts CHANGED
@@ -16,8 +16,6 @@ interface IThemeExtensionPoint {
16
16
  type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
17
17
 
18
18
  type PartialIThemeExtensionPoint = Partial<IThemeExtensionPoint> & Pick<IThemeExtensionPoint, 'id' | 'path'>;
19
- declare function setThemes<T extends PartialIThemeExtensionPoint>(_themes: T[], getContent: (theme: T) => Promise<string>): void;
20
- declare function setDefaultThemes<T extends PartialIThemeExtensionPoint>(_themes: T[], getContent: (theme: T) => Promise<string>): void;
21
19
  declare function getServiceOverride(): IEditorOverrideServices;
22
20
 
23
- export { PartialIThemeExtensionPoint as IThemeExtensionPoint, getServiceOverride as default, setDefaultThemes, setThemes };
21
+ export { PartialIThemeExtensionPoint as IThemeExtensionPoint, getServiceOverride as default };