@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.0.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 (142) hide show
  1. package/index.d.ts +3 -1
  2. package/index.js +110 -1
  3. package/package.json +64 -10
  4. package/service-override/tools/editorAssets.d.ts +1 -0
  5. package/service-override/tools/editorAssets.js +5 -0
  6. package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
  7. package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
  8. package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
  9. package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
  10. package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
  11. package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
  12. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
  13. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
  14. package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
  15. package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
  16. package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
  17. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
  18. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
  19. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
  20. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
  21. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
  22. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
  23. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
  24. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
  25. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
  26. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
  27. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
  28. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
  29. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
  30. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
  32. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
  33. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
  34. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
  35. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
  36. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
  37. package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
  39. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
  40. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
  41. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
  42. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
  43. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
  44. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
  45. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
  46. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
  47. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
  48. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
  49. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
  50. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
  51. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
  52. package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
  54. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
  55. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
  56. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
  57. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
  58. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
  59. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
  60. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
  61. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
  62. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
  63. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
  64. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
  65. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
  66. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
  67. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
  68. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
  69. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
  70. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
  71. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
  72. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
  73. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
  74. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
  75. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
  76. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
  77. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
  78. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
  79. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
  80. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
  81. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
  82. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
  83. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
  84. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
  85. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
  86. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
  87. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
  88. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
  89. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
  90. package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
  91. package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
  92. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
  94. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
  95. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
  96. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
  97. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
  98. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
  99. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
  100. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
  101. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
  102. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
  103. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
  104. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
  105. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
  106. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
  107. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
  108. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
  109. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
  110. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
  111. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
  112. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
  113. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
  114. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
  115. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
  116. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
  117. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
  118. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
  119. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
  120. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
  121. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
  122. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
  123. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
  124. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
  125. package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
  126. package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
  127. package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
  128. package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
  129. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
  130. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
  131. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
  132. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
  133. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
  134. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
  135. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
  136. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
  137. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
  138. package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
  139. package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
  140. package/tools/editorAssets.js +0 -4
  141. package/tools/url.js +0 -10
  142. package/viewCommon.js +0 -109
@@ -1,7 +1,9 @@
1
+
1
2
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
2
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { localize } from 'vscode/vscode/vs/nls';
4
- import { Memento } from 'vscode/vscode/vs/workbench/common/memento';
5
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
6
+ import { Memento } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/common/memento';
5
7
  import { CustomEditorInfo } from './customEditor.js';
6
8
  import { customEditorsExtensionPoint } from './extensionPoint.js';
7
9
  import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
@@ -11,13 +13,13 @@ class ContributedCustomEditors extends Disposable {
11
13
  static { this.CUSTOM_EDITORS_ENTRY_ID = 'editors'; }
12
14
  constructor(storageService) {
13
15
  super();
14
- this._editors = ( (new Map()));
15
- this._onChange = this._register(( (new Emitter())));
16
+ this._editors = ( new Map());
17
+ this._onChange = this._register(( new Emitter()));
16
18
  this.onChange = this._onChange.event;
17
- this._memento = ( (new Memento(ContributedCustomEditors.CUSTOM_EDITORS_STORAGE_ID, storageService)));
18
- const mementoObject = this._memento.getMemento(0 , 1 );
19
+ this._memento = ( new Memento(ContributedCustomEditors.CUSTOM_EDITORS_STORAGE_ID, storageService));
20
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
19
21
  for (const info of (mementoObject[ContributedCustomEditors.CUSTOM_EDITORS_ENTRY_ID] || [])) {
20
- this.add(( (new CustomEditorInfo(info))));
22
+ this.add(( new CustomEditorInfo(info)));
21
23
  }
22
24
  customEditorsExtensionPoint.setHandler(extensions => {
23
25
  this.update(extensions);
@@ -27,34 +29,32 @@ class ContributedCustomEditors extends Disposable {
27
29
  this._editors.clear();
28
30
  for (const extension of extensions) {
29
31
  for (const webviewEditorContribution of extension.value) {
30
- this.add(( (new CustomEditorInfo({
32
+ this.add(( new CustomEditorInfo({
31
33
  id: webviewEditorContribution.viewType,
32
34
  displayName: webviewEditorContribution.displayName,
33
- providerDisplayName: extension.description.isBuiltin ? ( localize(9696, "Built-in")) : extension.description.displayName || extension.description.identifier.value,
35
+ providerDisplayName: extension.description.isBuiltin ? ( localize(4921, "Built-in")) : extension.description.displayName || extension.description.identifier.value,
34
36
  selector: webviewEditorContribution.selector || [],
35
37
  priority: getPriorityFromContribution(webviewEditorContribution, extension.description),
36
- }))));
38
+ })));
37
39
  }
38
40
  }
39
- const mementoObject = this._memento.getMemento(0 , 1 );
40
- mementoObject[ContributedCustomEditors.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( (this._editors.values())));
41
+ const mementoObject = this._memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
42
+ mementoObject[ContributedCustomEditors.CUSTOM_EDITORS_ENTRY_ID] = Array.from(( this._editors.values()));
41
43
  this._memento.saveMemento();
42
44
  this._onChange.fire();
43
45
  }
44
46
  [Symbol.iterator]() {
45
- return (
46
- (this._editors.values())
47
- );
47
+ return ( this._editors.values());
48
48
  }
49
49
  get(viewType) {
50
50
  return this._editors.get(viewType);
51
51
  }
52
52
  getContributedEditors(resource) {
53
- return Array.from(( (this._editors.values())))
53
+ return Array.from(( this._editors.values()))
54
54
  .filter(customEditor => customEditor.matches(resource));
55
55
  }
56
56
  add(info) {
57
- if (( (this._editors.has(info.id)))) {
57
+ if (( this._editors.has(info.id))) {
58
58
  console.error(`Custom editor with id '${info.id}' already registered`);
59
59
  return;
60
60
  }
@@ -0,0 +1,65 @@
1
+ import { Event } from "vscode/vscode/vs/base/common/event";
2
+ import { IMarkdownString } from "vscode/vscode/vs/base/common/htmlContent";
3
+ import { IDisposable, IReference } from "vscode/vscode/vs/base/common/lifecycle";
4
+ import { URI } from "vscode/vscode/vs/base/common/uri";
5
+ import { RawContextKey } from "vscode/vscode/vs/platform/contextkey/common/contextkey";
6
+ import { IRevertOptions, ISaveOptions } from "vscode/vscode/vs/workbench/common/editor";
7
+ import { RegisteredEditorPriority } from "vscode/vscode/vs/workbench/services/editor/common/editorResolverService";
8
+ export declare const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID: RawContextKey<string>;
9
+ export declare const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE: RawContextKey<boolean>;
10
+ export interface CustomEditorCapabilities {
11
+ readonly supportsMultipleEditorsPerDocument?: boolean;
12
+ }
13
+ export interface ICustomEditorModelManager {
14
+ getAllModels(resource: URI): Promise<ICustomEditorModel[]>;
15
+ get(resource: URI, viewType: string): Promise<ICustomEditorModel | undefined>;
16
+ tryRetain(resource: URI, viewType: string): Promise<IReference<ICustomEditorModel>> | undefined;
17
+ add(resource: URI, viewType: string, model: Promise<ICustomEditorModel>): Promise<IReference<ICustomEditorModel>>;
18
+ disposeAllModelsForView(viewType: string): void;
19
+ }
20
+ export interface ICustomEditorModel extends IDisposable {
21
+ readonly viewType: string;
22
+ readonly resource: URI;
23
+ readonly backupId: string | undefined;
24
+ readonly canHotExit: boolean;
25
+ isReadonly(): boolean | IMarkdownString;
26
+ readonly onDidChangeReadonly: Event<void>;
27
+ isOrphaned(): boolean;
28
+ readonly onDidChangeOrphaned: Event<void>;
29
+ isDirty(): boolean;
30
+ readonly onDidChangeDirty: Event<void>;
31
+ revert(options?: IRevertOptions): Promise<void>;
32
+ saveCustomEditor(options?: ISaveOptions): Promise<URI | undefined>;
33
+ saveCustomEditorAs(resource: URI, targetResource: URI, currentOptions?: ISaveOptions): Promise<boolean>;
34
+ }
35
+ export declare enum CustomEditorPriority {
36
+ default = "default",
37
+ builtin = "builtin",
38
+ option = "option"
39
+ }
40
+ export interface CustomEditorSelector {
41
+ readonly filenamePattern?: string;
42
+ }
43
+ export interface CustomEditorDescriptor {
44
+ readonly id: string;
45
+ readonly displayName: string;
46
+ readonly providerDisplayName: string;
47
+ readonly priority: RegisteredEditorPriority;
48
+ readonly selector: readonly CustomEditorSelector[];
49
+ }
50
+ export declare class CustomEditorInfo implements CustomEditorDescriptor {
51
+ readonly id: string;
52
+ readonly displayName: string;
53
+ readonly providerDisplayName: string;
54
+ readonly priority: RegisteredEditorPriority;
55
+ readonly selector: readonly CustomEditorSelector[];
56
+ constructor(descriptor: CustomEditorDescriptor);
57
+ matches(resource: URI): boolean;
58
+ }
59
+ export declare class CustomEditorInfoCollection {
60
+ readonly allEditors: readonly CustomEditorInfo[];
61
+ constructor(editors: readonly CustomEditorInfo[]);
62
+ get length(): number;
63
+ get defaultEditor(): CustomEditorInfo | undefined;
64
+ get bestAvailableEditor(): CustomEditorInfo | undefined;
65
+ }
@@ -1,13 +1,20 @@
1
+
1
2
  import { distinct } from 'vscode/vscode/vs/base/common/arrays';
2
3
  import { localize } from 'vscode/vscode/vs/nls';
3
4
  import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
4
5
  import { globMatchesResource, RegisteredEditorPriority, priorityToRank } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
5
6
 
6
- const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID = ( (new RawContextKey('activeCustomEditorId', '', {
7
+ const CONTEXT_ACTIVE_CUSTOM_EDITOR_ID = ( new RawContextKey('activeCustomEditorId', '', {
7
8
  type: 'string',
8
- description: ( localize(9695, "The viewType of the currently active custom editor.")),
9
- })));
10
- const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE = ( (new RawContextKey('focusedCustomEditorIsEditable', false)));
9
+ description: ( localize(4922, "The viewType of the currently active custom editor.")),
10
+ }));
11
+ const CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE = ( new RawContextKey('focusedCustomEditorIsEditable', false));
12
+ var CustomEditorPriority;
13
+ (function (CustomEditorPriority) {
14
+ CustomEditorPriority["default"] = "default";
15
+ CustomEditorPriority["builtin"] = "builtin";
16
+ CustomEditorPriority["option"] = "option";
17
+ })(CustomEditorPriority || (CustomEditorPriority = {}));
11
18
  class CustomEditorInfo {
12
19
  constructor(descriptor) {
13
20
  this.id = descriptor.id;
@@ -17,11 +24,9 @@ class CustomEditorInfo {
17
24
  this.selector = descriptor.selector;
18
25
  }
19
26
  matches(resource) {
20
- return (
21
- (this.selector.some(
22
- selector => selector.filenamePattern && globMatchesResource(selector.filenamePattern, resource)
23
- ))
24
- );
27
+ return ( this.selector.some(
28
+ selector => selector.filenamePattern && globMatchesResource(selector.filenamePattern, resource)
29
+ ));
25
30
  }
26
31
  }
27
32
  class CustomEditorInfoCollection {
@@ -51,4 +56,4 @@ function isLowerPriority(otherEditor, editor) {
51
56
  return priorityToRank(otherEditor.priority) < priorityToRank(editor.priority);
52
57
  }
53
58
 
54
- export { CONTEXT_ACTIVE_CUSTOM_EDITOR_ID, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorInfo, CustomEditorInfoCollection };
59
+ export { CONTEXT_ACTIVE_CUSTOM_EDITOR_ID, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorInfo, CustomEditorInfoCollection, CustomEditorPriority };
@@ -0,0 +1,12 @@
1
+ import { IReference } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { URI } from "vscode/vscode/vs/base/common/uri";
3
+ import { ICustomEditorModel, ICustomEditorModelManager } from "./customEditor.js";
4
+ export declare class CustomEditorModelManager implements ICustomEditorModelManager {
5
+ private readonly _references;
6
+ getAllModels(resource: URI): Promise<ICustomEditorModel[]>;
7
+ get(resource: URI, viewType: string): Promise<ICustomEditorModel | undefined>;
8
+ tryRetain(resource: URI, viewType: string): Promise<IReference<ICustomEditorModel>> | undefined;
9
+ add(resource: URI, viewType: string, model: Promise<ICustomEditorModel>): Promise<IReference<ICustomEditorModel>>;
10
+ disposeAllModelsForView(viewType: string): void;
11
+ private key;
12
+ }
@@ -1,3 +1,4 @@
1
+
1
2
  import { createSingleCallFunction } from 'vscode/vscode/vs/base/common/functional';
2
3
 
3
4
  class CustomEditorModelManager {
@@ -0,0 +1,15 @@
1
+ import { CustomEditorSelector } from "./customEditor.js";
2
+ declare const Fields: Readonly<{
3
+ viewType: "viewType";
4
+ displayName: "displayName";
5
+ selector: "selector";
6
+ priority: "priority";
7
+ }>;
8
+ export interface ICustomEditorsExtensionPoint {
9
+ readonly [Fields.viewType]: string;
10
+ readonly [Fields.displayName]: string;
11
+ readonly [Fields.selector]?: readonly CustomEditorSelector[];
12
+ readonly [Fields.priority]?: string;
13
+ }
14
+ export declare const customEditorsExtensionPoint: import("vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry").IExtensionPoint<ICustomEditorsExtensionPoint[]>;
15
+ export {};
@@ -1,20 +1,22 @@
1
+
1
2
  import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
2
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { localize } from 'vscode/vscode/vs/nls';
4
5
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
5
6
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
7
+ import { CustomEditorPriority } from './customEditor.js';
6
8
  import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
7
9
  import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
8
10
  import { languagesExtPoint } from 'vscode/vscode/vs/workbench/services/language/common/languageService';
9
11
 
10
- const Fields = ( (Object.freeze({
12
+ const Fields = ( Object.freeze({
11
13
  viewType: 'viewType',
12
14
  displayName: 'displayName',
13
15
  selector: 'selector',
14
16
  priority: 'priority',
15
- })));
17
+ }));
16
18
  const CustomEditorsContribution = {
17
- description: ( localize(11459, 'Contributed custom editors.')),
19
+ description: ( localize(4924, 'Contributed custom editors.')),
18
20
  type: 'array',
19
21
  defaultSnippets: [{
20
22
  body: [{
@@ -36,20 +38,20 @@ const CustomEditorsContribution = {
36
38
  [Fields.viewType]: {
37
39
  type: 'string',
38
40
  markdownDescription: ( localize(
39
- 11460,
41
+ 4925,
40
42
  'Identifier for the custom editor. This must be unique across all custom editors, so we recommend including your extension id as part of `viewType`. The `viewType` is used when registering custom editors with `vscode.registerCustomEditorProvider` and in the `onCustomEditor:${id}` [activation event](https://code.visualstudio.com/api/references/activation-events).'
41
43
  )),
42
44
  },
43
45
  [Fields.displayName]: {
44
46
  type: 'string',
45
47
  description: ( localize(
46
- 11461,
48
+ 4926,
47
49
  'Human readable name of the custom editor. This is displayed to users when selecting which editor to use.'
48
50
  )),
49
51
  },
50
52
  [Fields.selector]: {
51
53
  type: 'array',
52
- description: ( localize(11462, 'Set of globs that the custom editor is enabled for.')),
54
+ description: ( localize(4927, 'Set of globs that the custom editor is enabled for.')),
53
55
  items: {
54
56
  type: 'object',
55
57
  defaultSnippets: [{
@@ -60,7 +62,7 @@ const CustomEditorsContribution = {
60
62
  properties: {
61
63
  filenamePattern: {
62
64
  type: 'string',
63
- description: ( localize(11463, 'Glob that the custom editor is enabled for.')),
65
+ description: ( localize(4928, 'Glob that the custom editor is enabled for.')),
64
66
  },
65
67
  }
66
68
  }
@@ -68,22 +70,22 @@ const CustomEditorsContribution = {
68
70
  [Fields.priority]: {
69
71
  type: 'string',
70
72
  markdownDeprecationMessage: ( localize(
71
- 11464,
73
+ 4929,
72
74
  'Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting.'
73
75
  )),
74
76
  enum: [
75
- "default" ,
76
- "option" ,
77
+ CustomEditorPriority.default,
78
+ CustomEditorPriority.option,
77
79
  ],
78
80
  markdownEnumDescriptions: [
79
81
  ( localize(
80
- 11465,
81
- 'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
82
- )),
82
+ 4930,
83
+ 'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
84
+ )),
83
85
  ( localize(
84
- 11466,
85
- 'The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command.'
86
- )),
86
+ 4931,
87
+ 'The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command.'
88
+ )),
87
89
  ],
88
90
  default: 'default'
89
91
  }
@@ -117,18 +119,18 @@ class CustomEditorsDataRenderer extends Disposable {
117
119
  return { data: { headers: [], rows: [] }, dispose: () => { } };
118
120
  }
119
121
  const headers = [
120
- ( localize(11467, "View Type")),
121
- ( localize(11468, "Priority")),
122
- ( localize(11469, "Filename Pattern")),
122
+ ( localize(4932, "View Type")),
123
+ ( localize(4933, "Priority")),
124
+ ( localize(4934, "Filename Pattern")),
123
125
  ];
124
- const rows = ( (customEditors
126
+ const rows = ( customEditors
125
127
  .map(customEditor => {
126
128
  return [
127
129
  customEditor.viewType,
128
130
  customEditor.priority ?? '',
129
- coalesce(( (customEditor.selector.map(x => x.filenamePattern)))).join(', ')
131
+ coalesce(( customEditor.selector.map(x => x.filenamePattern))).join(', ')
130
132
  ];
131
- })));
133
+ }));
132
134
  return {
133
135
  data: {
134
136
  headers,
@@ -138,13 +140,13 @@ class CustomEditorsDataRenderer extends Disposable {
138
140
  };
139
141
  }
140
142
  }
141
- ( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
143
+ ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
142
144
  id: 'customEditors',
143
- label: ( localize(11470, "Custom Editors")),
145
+ label: ( localize(4935, "Custom Editors")),
144
146
  access: {
145
147
  canToggle: false
146
148
  },
147
- renderer: ( (new SyncDescriptor(CustomEditorsDataRenderer))),
149
+ renderer: ( new SyncDescriptor(CustomEditorsDataRenderer)),
148
150
  });
149
151
 
150
152
  export { customEditorsExtensionPoint };
@@ -1,7 +1,9 @@
1
+
1
2
  import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
3
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
2
4
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
3
- import { externalUriOpenersConfigurationNode } from 'vscode/vscode/vs/workbench/contrib/externalUriOpener/common/configuration';
4
- import 'vscode/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService';
5
+ import { externalUriOpenersConfigurationNode } from '@codingame/monaco-vscode-2a94c04a-b85b-5669-b06b-89c1bfa11cb9-common/vscode/vs/workbench/contrib/externalUriOpener/common/configuration';
6
+ import '@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService';
5
7
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
8
 
7
9
  ( Registry.as(Extensions.Configuration))