@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
@@ -0,0 +1,50 @@
1
+ import { ICodeEditor } from "vscode/vscode/vs/editor/browser/editorBrowser";
2
+ import { IPosition } from "vscode/vscode/vs/editor/common/core/position";
3
+ import { ITextModelService } from "vscode/vscode/vs/editor/common/services/resolverService";
4
+ import * as peekView from "vscode/vscode/vs/editor/contrib/peekView/browser/peekView";
5
+ import { MenuId } from "vscode/vscode/vs/platform/actions/common/actions";
6
+ import { IMenuService } from "vscode/vscode/vs/platform/actions/common/actions.service";
7
+ import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
8
+ import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
9
+ import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
10
+ import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
11
+ import * as typeHTree from "./typeHierarchyTree.js";
12
+ import { TypeHierarchyDirection, TypeHierarchyModel } from "@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy";
13
+ import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
14
+ export declare class TypeHierarchyTreePeekWidget extends peekView.PeekViewWidget {
15
+ private readonly _where;
16
+ private _direction;
17
+ private readonly _peekViewService;
18
+ private readonly _editorService;
19
+ private readonly _textModelService;
20
+ private readonly _storageService;
21
+ private readonly _menuService;
22
+ private readonly _contextKeyService;
23
+ private readonly _instantiationService;
24
+ static readonly TitleMenu: MenuId;
25
+ private _parent;
26
+ private _message;
27
+ private _splitView;
28
+ private _tree;
29
+ private _treeViewStates;
30
+ private _editor;
31
+ private _dim;
32
+ private _layoutInfo;
33
+ private readonly _previewDisposable;
34
+ constructor(editor: ICodeEditor, _where: IPosition, _direction: TypeHierarchyDirection, themeService: IThemeService, _peekViewService: peekView.IPeekViewService, _editorService: IEditorService, _textModelService: ITextModelService, _storageService: IStorageService, _menuService: IMenuService, _contextKeyService: IContextKeyService, _instantiationService: IInstantiationService);
35
+ dispose(): void;
36
+ get direction(): TypeHierarchyDirection;
37
+ private _applyTheme;
38
+ protected _fillHead(container: HTMLElement): void;
39
+ protected _fillBody(parent: HTMLElement): void;
40
+ private _updatePreview;
41
+ showLoading(): void;
42
+ showMessage(message: string): void;
43
+ showModel(model: TypeHierarchyModel): Promise<void>;
44
+ getModel(): TypeHierarchyModel | undefined;
45
+ getFocused(): typeHTree.Type | undefined;
46
+ updateDirection(newDirection: TypeHierarchyDirection): Promise<void>;
47
+ private _show;
48
+ protected _onWidth(width: number): void;
49
+ protected _doLayoutBody(height: number, width: number): void;
50
+ }
@@ -1,4 +1,5 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import './media/typeHierarchy.css.js';
3
4
  import { Dimension, isKeyboardEvent } from 'vscode/vscode/vs/base/browser/dom';
4
5
  import { SplitView, Sizing } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
@@ -8,29 +9,39 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
8
9
  import { DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
9
10
  import { EmbeddedCodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget';
10
11
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
11
- import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
12
+ import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
13
+ import { TrackedRangeStickiness, OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
12
14
  import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
13
15
  import { PeekViewWidget, peekViewBorder, peekViewTitleBackground, peekViewTitleForeground, peekViewTitleInfoForeground, peekViewResultsBackground, peekViewEditorMatchHighlight, IPeekViewService } from 'vscode/vscode/vs/editor/contrib/peekView/browser/peekView';
14
16
  import { localize } from 'vscode/vscode/vs/nls';
15
- import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
17
+ import { getFlatActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
16
18
  import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
17
19
  import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
18
20
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
19
21
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
20
22
  import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
23
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
21
24
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
22
25
  import { themeColorFromId } from 'vscode/vscode/vs/platform/theme/common/themeService';
23
26
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
24
27
  import { Sorter, AccessibilityProvider, IdentityProvider, VirtualDelegate, TypeRenderer, DataSource } from './typeHierarchyTree.js';
28
+ import { TypeHierarchyDirection } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
25
29
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
30
+ import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
26
31
 
27
32
  var TypeHierarchyTreePeekWidget_1;
33
+ var State;
34
+ (function (State) {
35
+ State["Loading"] = "loading";
36
+ State["Message"] = "message";
37
+ State["Data"] = "data";
38
+ })(State || (State = {}));
28
39
  class LayoutInfo {
29
40
  static store(info, storageService) {
30
- storageService.store('typeHierarchyPeekLayout', JSON.stringify(info), 0 , 1 );
41
+ storageService.store('typeHierarchyPeekLayout', JSON.stringify(info), StorageScope.PROFILE, StorageTarget.MACHINE);
31
42
  }
32
43
  static retrieve(storageService) {
33
- const value = storageService.get('typeHierarchyPeekLayout', 0 , '{}');
44
+ const value = storageService.get('typeHierarchyPeekLayout', StorageScope.PROFILE, '{}');
34
45
  const defaultInfo = { ratio: 0.7, height: 17 };
35
46
  try {
36
47
  return { ...defaultInfo, ...JSON.parse(value) };
@@ -48,7 +59,7 @@ class TypeHierarchyTree extends WorkbenchAsyncDataTree {
48
59
  }
49
60
  let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends PeekViewWidget {
50
61
  static { TypeHierarchyTreePeekWidget_1 = this; }
51
- static { this.TitleMenu = ( (new MenuId('typehierarchy/title'))); }
62
+ static { this.TitleMenu = ( new MenuId('typehierarchy/title')); }
52
63
  constructor(editor, _where, _direction, themeService, _peekViewService, _editorService, _textModelService, _storageService, _menuService, _contextKeyService, _instantiationService) {
53
64
  super(editor, { showFrame: true, showArrow: true, isResizeable: true, isAccessible: true }, _instantiationService);
54
65
  this._where = _where;
@@ -60,8 +71,8 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
60
71
  this._menuService = _menuService;
61
72
  this._contextKeyService = _contextKeyService;
62
73
  this._instantiationService = _instantiationService;
63
- this._treeViewStates = ( (new Map()));
64
- this._previewDisposable = ( (new DisposableStore()));
74
+ this._treeViewStates = ( new Map());
75
+ this._previewDisposable = ( new DisposableStore());
65
76
  this.create();
66
77
  this._peekViewService.addExclusiveWidget(editor, this);
67
78
  this._applyTheme(themeService.getColorTheme());
@@ -92,8 +103,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
92
103
  super._fillHead(container, true);
93
104
  const menu = this._menuService.createMenu(TypeHierarchyTreePeekWidget_1.TitleMenu, this._contextKeyService);
94
105
  const updateToolbar = () => {
95
- const actions = [];
96
- createAndFillInActionBarActions(menu, undefined, actions);
106
+ const actions = getFlatActionBarActions(menu.getActions());
97
107
  this._actionbarWidget.clear();
98
108
  this._actionbarWidget.push(actions, { label: false, icon: true });
99
109
  };
@@ -103,7 +113,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
103
113
  }
104
114
  _fillBody(parent) {
105
115
  this._layoutInfo = LayoutInfo.retrieve(this._storageService);
106
- this._dim = ( (new Dimension(0, 0)));
116
+ this._dim = ( new Dimension(0, 0));
107
117
  this._parent = parent;
108
118
  parent.classList.add('type-hierarchy');
109
119
  const message = document.createElement('div');
@@ -114,7 +124,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
114
124
  const container = document.createElement('div');
115
125
  container.classList.add('results');
116
126
  parent.appendChild(container);
117
- this._splitView = ( (new SplitView(container, { orientation: 1 })));
127
+ this._splitView = ( new SplitView(container, { orientation: Orientation.HORIZONTAL }));
118
128
  const editorContainer = document.createElement('div');
119
129
  editorContainer.classList.add('editor');
120
130
  container.appendChild(editorContainer);
@@ -222,7 +232,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
222
232
  this._previewDisposable.clear();
223
233
  const options = {
224
234
  description: 'type-hierarchy-decoration',
225
- stickiness: 1 ,
235
+ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
226
236
  className: 'type-decoration',
227
237
  overviewRuler: {
228
238
  color: themeColorFromId(peekViewEditorMatchHighlight),
@@ -230,7 +240,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
230
240
  },
231
241
  };
232
242
  let previewUri;
233
- if (this._direction === "supertypes" ) {
243
+ if (this._direction === TypeHierarchyDirection.Supertypes) {
234
244
  previewUri = element.parent ? element.parent.item.uri : element.model.root.uri;
235
245
  }
236
246
  else {
@@ -241,28 +251,28 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
241
251
  const decorations = [];
242
252
  let fullRange;
243
253
  const loc = { uri: element.item.uri, range: element.item.selectionRange };
244
- if (( (loc.uri.toString())) === ( (previewUri.toString()))) {
254
+ if (( loc.uri.toString()) === ( previewUri.toString())) {
245
255
  decorations.push({ range: loc.range, options });
246
256
  fullRange = !fullRange ? loc.range : Range.plusRange(loc.range, fullRange);
247
257
  }
248
258
  if (fullRange) {
249
- this._editor.revealRangeInCenter(fullRange, 1 );
259
+ this._editor.revealRangeInCenter(fullRange, ScrollType.Immediate);
250
260
  const decorationsCollection = this._editor.createDecorationsCollection(decorations);
251
261
  this._previewDisposable.add(toDisposable(() => decorationsCollection.clear()));
252
262
  }
253
263
  this._previewDisposable.add(value);
254
- const title = this._direction === "supertypes"
255
- ? ( localize(9713, "Supertypes of '{0}'", element.model.root.name))
256
- : ( localize(9714, "Subtypes of '{0}'", element.model.root.name));
264
+ const title = this._direction === TypeHierarchyDirection.Supertypes
265
+ ? ( localize(10404, "Supertypes of '{0}'", element.model.root.name))
266
+ : ( localize(10405, "Subtypes of '{0}'", element.model.root.name));
257
267
  this.setTitle(title);
258
268
  }
259
269
  showLoading() {
260
- this._parent.dataset['state'] = "loading" ;
261
- this.setTitle(( localize(9715, "Loading...")));
270
+ this._parent.dataset['state'] = State.Loading;
271
+ this.setTitle(( localize(10406, "Loading...")));
262
272
  this._show();
263
273
  }
264
274
  showMessage(message) {
265
- this._parent.dataset['state'] = "message" ;
275
+ this._parent.dataset['state'] = State.Message;
266
276
  this.setTitle('');
267
277
  this.setMetaTitle('');
268
278
  this._message.innerText = message;
@@ -276,12 +286,12 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
276
286
  const root = this._tree.getNode(model).children[0];
277
287
  await this._tree.expand(root.element);
278
288
  if (root.children.length === 0) {
279
- this.showMessage(this._direction === "supertypes"
280
- ? ( localize(9716, "No supertypes of '{0}'", model.root.name))
281
- : ( localize(9717, "No subtypes of '{0}'", model.root.name)));
289
+ this.showMessage(this._direction === TypeHierarchyDirection.Supertypes
290
+ ? ( localize(10407, "No supertypes of '{0}'", model.root.name))
291
+ : ( localize(10408, "No subtypes of '{0}'", model.root.name)));
282
292
  }
283
293
  else {
284
- this._parent.dataset['state'] = "data" ;
294
+ this._parent.dataset['state'] = State.Data;
285
295
  if (!viewState || this._tree.getFocus().length === 0) {
286
296
  this._tree.setFocus([root.children[0].element]);
287
297
  }
@@ -305,7 +315,7 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
305
315
  }
306
316
  _show() {
307
317
  if (!this._isShowing) {
308
- this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber, 0 );
318
+ this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber, ScrollType.Smooth);
309
319
  super.show(Range.fromPositions(this._where), this._layoutInfo.height);
310
320
  }
311
321
  }
@@ -317,22 +327,22 @@ let TypeHierarchyTreePeekWidget = class TypeHierarchyTreePeekWidget extends Peek
317
327
  _doLayoutBody(height, width) {
318
328
  if (this._dim.height !== height || this._dim.width !== width) {
319
329
  super._doLayoutBody(height, width);
320
- this._dim = ( (new Dimension(width, height)));
330
+ this._dim = ( new Dimension(width, height));
321
331
  this._layoutInfo.height = this._viewZone ? this._viewZone.heightInLines : this._layoutInfo.height;
322
332
  this._splitView.layout(width);
323
333
  this._splitView.resizeView(0, width * this._layoutInfo.ratio);
324
334
  }
325
335
  }
326
336
  };
327
- TypeHierarchyTreePeekWidget = TypeHierarchyTreePeekWidget_1 = ( (__decorate([
328
- ( (__param(3, IThemeService))),
329
- ( (__param(4, IPeekViewService))),
330
- ( (__param(5, IEditorService))),
331
- ( (__param(6, ITextModelService))),
332
- ( (__param(7, IStorageService))),
333
- ( (__param(8, IMenuService))),
334
- ( (__param(9, IContextKeyService))),
335
- ( (__param(10, IInstantiationService)))
336
- ], TypeHierarchyTreePeekWidget)));
337
+ TypeHierarchyTreePeekWidget = TypeHierarchyTreePeekWidget_1 = ( __decorate([
338
+ ( __param(3, IThemeService)),
339
+ ( __param(4, IPeekViewService)),
340
+ ( __param(5, IEditorService)),
341
+ ( __param(6, ITextModelService)),
342
+ ( __param(7, IStorageService)),
343
+ ( __param(8, IMenuService)),
344
+ ( __param(9, IContextKeyService)),
345
+ ( __param(10, IInstantiationService))
346
+ ], TypeHierarchyTreePeekWidget));
337
347
 
338
348
  export { TypeHierarchyTreePeekWidget };
@@ -0,0 +1,52 @@
1
+ import { IAsyncDataSource, ITreeRenderer, ITreeNode, ITreeSorter } from "vscode/vscode/vs/base/browser/ui/tree/tree";
2
+ import { TypeHierarchyDirection, TypeHierarchyItem, TypeHierarchyModel } from "@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy";
3
+ import { IIdentityProvider, IListVirtualDelegate } from "vscode/vscode/vs/base/browser/ui/list/list";
4
+ import { FuzzyScore } from "vscode/vscode/vs/base/common/filters";
5
+ import { IconLabel } from "vscode/vscode/vs/base/browser/ui/iconLabel/iconLabel";
6
+ import { IListAccessibilityProvider } from "vscode/vscode/vs/base/browser/ui/list/listWidget";
7
+ export declare class Type {
8
+ readonly item: TypeHierarchyItem;
9
+ readonly model: TypeHierarchyModel;
10
+ readonly parent: Type | undefined;
11
+ constructor(item: TypeHierarchyItem, model: TypeHierarchyModel, parent: Type | undefined);
12
+ static compare(a: Type, b: Type): number;
13
+ }
14
+ export declare class DataSource implements IAsyncDataSource<TypeHierarchyModel, Type> {
15
+ getDirection: () => TypeHierarchyDirection;
16
+ constructor(getDirection: () => TypeHierarchyDirection);
17
+ hasChildren(): boolean;
18
+ getChildren(element: TypeHierarchyModel | Type): Promise<Type[]>;
19
+ }
20
+ export declare class Sorter implements ITreeSorter<Type> {
21
+ compare(element: Type, otherElement: Type): number;
22
+ }
23
+ export declare class IdentityProvider implements IIdentityProvider<Type> {
24
+ getDirection: () => TypeHierarchyDirection;
25
+ constructor(getDirection: () => TypeHierarchyDirection);
26
+ getId(element: Type): {
27
+ toString(): string;
28
+ };
29
+ }
30
+ declare class TypeRenderingTemplate {
31
+ readonly icon: HTMLDivElement;
32
+ readonly label: IconLabel;
33
+ constructor(icon: HTMLDivElement, label: IconLabel);
34
+ }
35
+ export declare class TypeRenderer implements ITreeRenderer<Type, FuzzyScore, TypeRenderingTemplate> {
36
+ static readonly id = "TypeRenderer";
37
+ templateId: string;
38
+ renderTemplate(container: HTMLElement): TypeRenderingTemplate;
39
+ renderElement(node: ITreeNode<Type, FuzzyScore>, _index: number, template: TypeRenderingTemplate): void;
40
+ disposeTemplate(template: TypeRenderingTemplate): void;
41
+ }
42
+ export declare class VirtualDelegate implements IListVirtualDelegate<Type> {
43
+ getHeight(_element: Type): number;
44
+ getTemplateId(_element: Type): string;
45
+ }
46
+ export declare class AccessibilityProvider implements IListAccessibilityProvider<Type> {
47
+ getDirection: () => TypeHierarchyDirection;
48
+ constructor(getDirection: () => TypeHierarchyDirection);
49
+ getWidgetAriaLabel(): string;
50
+ getAriaLabel(element: Type): string | null;
51
+ }
52
+ export {};
@@ -1,8 +1,9 @@
1
- import { TypeHierarchyModel } from 'vscode/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
1
+
2
+ import { TypeHierarchyModel, TypeHierarchyDirection } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
2
3
  import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
3
4
  import { createMatches } from 'vscode/vscode/vs/base/common/filters';
4
5
  import { IconLabel } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabel';
5
- import { SymbolKinds } from 'vscode/vscode/vs/editor/common/languages';
6
+ import { SymbolTag, SymbolKinds } from 'vscode/vscode/vs/editor/common/languages';
6
7
  import { compare } from 'vscode/vscode/vs/base/common/strings';
7
8
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
8
9
  import { localize } from 'vscode/vscode/vs/nls';
@@ -15,7 +16,7 @@ class Type {
15
16
  this.parent = parent;
16
17
  }
17
18
  static compare(a, b) {
18
- let res = compare(( (a.item.uri.toString())), ( (b.item.uri.toString())));
19
+ let res = compare(( a.item.uri.toString()), ( b.item.uri.toString()));
19
20
  if (res === 0) {
20
21
  res = Range.compareRangesUsingStarts(a.item.range, b.item.range);
21
22
  }
@@ -31,28 +32,18 @@ class DataSource {
31
32
  }
32
33
  async getChildren(element) {
33
34
  if (element instanceof TypeHierarchyModel) {
34
- return (
35
- (element.roots.map(root => ( (new Type(root, element, undefined)))))
36
- );
35
+ return ( element.roots.map(root => ( new Type(root, element, undefined))));
37
36
  }
38
37
  const { model, item } = element;
39
- if (this.getDirection() === "supertypes" ) {
40
- return (
41
- ((await model.provideSupertypes(item, CancellationToken.None)).map(item => {
42
- return (
43
- (new Type(item, model, element))
44
- );
45
- }))
46
- );
38
+ if (this.getDirection() === TypeHierarchyDirection.Supertypes) {
39
+ return ( (await model.provideSupertypes(item, CancellationToken.None)).map(item => {
40
+ return ( new Type(item, model, element));
41
+ }));
47
42
  }
48
43
  else {
49
- return (
50
- ((await model.provideSubtypes(item, CancellationToken.None)).map(item => {
51
- return (
52
- (new Type(item, model, element))
53
- );
54
- }))
55
- );
44
+ return ( (await model.provideSubtypes(item, CancellationToken.None)).map(item => {
45
+ return ( new Type(item, model, element));
46
+ }));
56
47
  }
57
48
  }
58
49
  }
@@ -88,14 +79,12 @@ class TypeRenderer {
88
79
  container.classList.add('typehierarchy-element');
89
80
  const icon = document.createElement('div');
90
81
  container.appendChild(icon);
91
- const label = ( (new IconLabel(container, { supportHighlights: true })));
92
- return (
93
- (new TypeRenderingTemplate(icon, label))
94
- );
82
+ const label = ( new IconLabel(container, { supportHighlights: true }));
83
+ return ( new TypeRenderingTemplate(icon, label));
95
84
  }
96
85
  renderElement(node, _index, template) {
97
86
  const { element, filterData } = node;
98
- const deprecated = element.item.tags?.includes(1 );
87
+ const deprecated = element.item.tags?.includes(SymbolTag.Deprecated);
99
88
  template.icon.classList.add('inline', ...ThemeIcon.asClassNameArray(SymbolKinds.toIcon(element.item.kind)));
100
89
  template.label.setLabel(element.item.name, element.item.detail, { labelEscapeNewLines: true, matches: createMatches(filterData), strikethrough: deprecated });
101
90
  }
@@ -116,14 +105,14 @@ class AccessibilityProvider {
116
105
  this.getDirection = getDirection;
117
106
  }
118
107
  getWidgetAriaLabel() {
119
- return ( localize(11474, "Type Hierarchy"));
108
+ return localize(10409, "Type Hierarchy");
120
109
  }
121
110
  getAriaLabel(element) {
122
- if (this.getDirection() === "supertypes" ) {
123
- return ( localize(11475, "supertypes of {0}", element.item.name));
111
+ if (this.getDirection() === TypeHierarchyDirection.Supertypes) {
112
+ return localize(10410, "supertypes of {0}", element.item.name);
124
113
  }
125
114
  else {
126
- return ( localize(11476, "subtypes of {0}", element.item.name));
115
+ return localize(10411, "subtypes of {0}", element.item.name);
127
116
  }
128
117
  }
129
118
  }
@@ -0,0 +1,101 @@
1
+ import { Dimension } from "vscode/vscode/vs/base/browser/dom";
2
+ import { IMouseWheelEvent } from "vscode/vscode/vs/base/browser/mouseEvent";
3
+ import { CodeWindow } from "vscode/vscode/vs/base/browser/window";
4
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
5
+ import { URI } from "vscode/vscode/vs/base/common/uri";
6
+ import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
7
+ import { ExtensionIdentifier } from "vscode/vscode/vs/platform/extensions/common/extensions";
8
+ import { IWorkbenchLayoutService } from "vscode/vscode/vs/workbench/services/layout/browser/layoutService.service";
9
+ import { IOverlayWebview, WebviewContentOptions, WebviewExtensionDescription, WebviewInitInfo, WebviewMessageReceivedEvent, WebviewOptions } from "@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/webview/browser/webview";
10
+ import { IWebviewService } from "vscode/vscode/vs/workbench/contrib/webview/browser/webview.service";
11
+ export declare class OverlayWebview extends Disposable implements IOverlayWebview {
12
+ private readonly _layoutService;
13
+ private readonly _webviewService;
14
+ private readonly _baseContextKeyService;
15
+ private _isFirstLoad;
16
+ private readonly _firstLoadPendingMessages;
17
+ private readonly _webview;
18
+ private readonly _webviewEvents;
19
+ private _html;
20
+ private _title;
21
+ private _initialScrollProgress;
22
+ private _state;
23
+ private _extension;
24
+ private _contentOptions;
25
+ private _options;
26
+ private _owner;
27
+ private _windowId;
28
+ private get window();
29
+ private readonly _scopedContextKeyService;
30
+ private _findWidgetVisible;
31
+ private _findWidgetEnabled;
32
+ private _shouldShowFindWidgetOnRestore;
33
+ readonly providedViewType?: string;
34
+ origin: string;
35
+ private _container;
36
+ constructor(initInfo: WebviewInitInfo, _layoutService: IWorkbenchLayoutService, _webviewService: IWebviewService, _baseContextKeyService: IContextKeyService);
37
+ get isFocused(): boolean;
38
+ private _isDisposed;
39
+ private readonly _onDidDispose;
40
+ onDidDispose: import("vscode/vscode/vs/base/common/event").Event<void>;
41
+ dispose(): void;
42
+ get container(): HTMLElement;
43
+ claim(owner: any, targetWindow: CodeWindow, scopedContextKeyService: IContextKeyService | undefined): void;
44
+ release(owner: any): void;
45
+ layoutWebviewOverElement(element: HTMLElement, dimension?: Dimension, clippingContainer?: HTMLElement): void;
46
+ private doLayoutWebviewOverElement;
47
+ private _show;
48
+ setHtml(html: string): void;
49
+ setTitle(title: string): void;
50
+ get initialScrollProgress(): number;
51
+ set initialScrollProgress(value: number);
52
+ get state(): string | undefined;
53
+ set state(value: string | undefined);
54
+ get extension(): WebviewExtensionDescription | undefined;
55
+ set extension(value: WebviewExtensionDescription | undefined);
56
+ get options(): WebviewOptions;
57
+ set options(value: WebviewOptions);
58
+ get contentOptions(): WebviewContentOptions;
59
+ set contentOptions(value: WebviewContentOptions);
60
+ set localResourcesRoot(resources: URI[]);
61
+ private readonly _onDidFocus;
62
+ readonly onDidFocus: import("vscode/vscode/vs/base/common/event").Event<void>;
63
+ private readonly _onDidBlur;
64
+ readonly onDidBlur: import("vscode/vscode/vs/base/common/event").Event<void>;
65
+ private readonly _onDidClickLink;
66
+ readonly onDidClickLink: import("vscode/vscode/vs/base/common/event").Event<string>;
67
+ private readonly _onDidReload;
68
+ readonly onDidReload: import("vscode/vscode/vs/base/common/event").Event<void>;
69
+ private readonly _onDidScroll;
70
+ readonly onDidScroll: import("vscode/vscode/vs/base/common/event").Event<{
71
+ readonly scrollYPercentage: number;
72
+ }>;
73
+ private readonly _onDidUpdateState;
74
+ readonly onDidUpdateState: import("vscode/vscode/vs/base/common/event").Event<string | undefined>;
75
+ private readonly _onMessage;
76
+ readonly onMessage: import("vscode/vscode/vs/base/common/event").Event<WebviewMessageReceivedEvent>;
77
+ private readonly _onMissingCsp;
78
+ readonly onMissingCsp: import("vscode/vscode/vs/base/common/event").Event<ExtensionIdentifier>;
79
+ private readonly _onDidWheel;
80
+ readonly onDidWheel: import("vscode/vscode/vs/base/common/event").Event<IMouseWheelEvent>;
81
+ private readonly _onFatalError;
82
+ onFatalError: import("vscode/vscode/vs/base/common/event").Event<{
83
+ readonly message: string;
84
+ }>;
85
+ postMessage(message: any, transfer?: readonly ArrayBuffer[]): Promise<boolean>;
86
+ focus(): void;
87
+ reload(): void;
88
+ selectAll(): void;
89
+ copy(): void;
90
+ paste(): void;
91
+ cut(): void;
92
+ undo(): void;
93
+ redo(): void;
94
+ showFind(animated?: boolean): void;
95
+ hideFind(animated?: boolean): void;
96
+ runFindAction(previous: boolean): void;
97
+ private _withWebview;
98
+ windowDidDragStart(): void;
99
+ windowDidDragEnd(): void;
100
+ setContextKeyService(contextKeyService: IContextKeyService): void;
101
+ }
@@ -1,4 +1,5 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { getWindowById } from 'vscode/vscode/vs/base/browser/dom';
3
4
  import { FastDomNode } from 'vscode/vscode/vs/base/browser/fastDomNode';
4
5
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
@@ -6,7 +7,7 @@ import { Disposable, MutableDisposable, DisposableStore } from 'vscode/vscode/vs
6
7
  import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
7
8
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
8
9
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
9
- import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview';
10
+ import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED } from '@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/webview/browser/webview';
10
11
  import { IWebviewService } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview.service';
11
12
 
12
13
  let OverlayWebview = class OverlayWebview extends Disposable {
@@ -0,0 +1,38 @@
1
+ import { VSBufferReadableStream } from "vscode/vscode/vs/base/common/buffer";
2
+ import { CancellationToken } from "vscode/vscode/vs/base/common/cancellation";
3
+ import { URI } from "vscode/vscode/vs/base/common/uri";
4
+ import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
5
+ import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
6
+ export declare namespace WebviewResourceResponse {
7
+ enum Type {
8
+ Success = 0,
9
+ Failed = 1,
10
+ AccessDenied = 2,
11
+ NotModified = 3
12
+ }
13
+ class StreamSuccess {
14
+ readonly stream: VSBufferReadableStream;
15
+ readonly etag: string | undefined;
16
+ readonly mtime: number | undefined;
17
+ readonly mimeType: string;
18
+ readonly type = Type.Success;
19
+ constructor(stream: VSBufferReadableStream, etag: string | undefined, mtime: number | undefined, mimeType: string);
20
+ }
21
+ const Failed: {
22
+ readonly type: Type.Failed;
23
+ };
24
+ const AccessDenied: {
25
+ readonly type: Type.AccessDenied;
26
+ };
27
+ class NotModified {
28
+ readonly mimeType: string;
29
+ readonly mtime: number | undefined;
30
+ readonly type = Type.NotModified;
31
+ constructor(mimeType: string, mtime: number | undefined);
32
+ }
33
+ type StreamResponse = StreamSuccess | typeof Failed | typeof AccessDenied | NotModified;
34
+ }
35
+ export declare function loadLocalResource(requestUri: URI, options: {
36
+ ifNoneMatch: string | undefined;
37
+ roots: ReadonlyArray<URI>;
38
+ }, fileService: IFileService, logService: ILogService, token: CancellationToken): Promise<WebviewResourceResponse.StreamResponse>;
@@ -1,19 +1,20 @@
1
+
1
2
  import { isUNC } from 'vscode/vscode/vs/base/common/extpath';
2
3
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
3
4
  import { normalize, sep } from 'vscode/vscode/vs/base/common/path';
4
5
  import { URI } from 'vscode/vscode/vs/base/common/uri';
5
- import { FileOperationError } from 'vscode/vscode/vs/platform/files/common/files';
6
+ import { FileOperationError, FileOperationResult } from 'vscode/vscode/vs/platform/files/common/files';
6
7
  import { getWebviewContentMimeType } from '../../../../platform/webview/common/mimeTypes.js';
7
8
 
8
9
  var WebviewResourceResponse;
9
- ( (function(WebviewResourceResponse) {
10
+ (function (WebviewResourceResponse) {
10
11
  let Type;
11
- ( (function(Type) {
12
+ (function (Type) {
12
13
  Type[Type["Success"] = 0] = "Success";
13
14
  Type[Type["Failed"] = 1] = "Failed";
14
15
  Type[Type["AccessDenied"] = 2] = "AccessDenied";
15
16
  Type[Type["NotModified"] = 3] = "NotModified";
16
- })(Type = WebviewResourceResponse.Type || (WebviewResourceResponse.Type = {})));
17
+ })(Type = WebviewResourceResponse.Type || (WebviewResourceResponse.Type = {}));
17
18
  class StreamSuccess {
18
19
  constructor(stream, etag, mtime, mimeType) {
19
20
  this.stream = stream;
@@ -34,7 +35,7 @@ var WebviewResourceResponse;
34
35
  }
35
36
  }
36
37
  WebviewResourceResponse.NotModified = NotModified;
37
- })(WebviewResourceResponse || (WebviewResourceResponse = {})));
38
+ })(WebviewResourceResponse || (WebviewResourceResponse = {}));
38
39
  async function loadLocalResource(requestUri, options, fileService, logService, token) {
39
40
  logService.debug(`loadLocalResource - begin. requestUri=${requestUri}`);
40
41
  const resourceToLoad = getResourceToLoad(requestUri, options.roots);
@@ -50,7 +51,7 @@ async function loadLocalResource(requestUri, options, fileService, logService, t
50
51
  catch (err) {
51
52
  if (err instanceof FileOperationError) {
52
53
  const result = err.fileOperationResult;
53
- if (result === 2 ) {
54
+ if (result === FileOperationResult.FILE_NOT_MODIFIED_SINCE) {
54
55
  return new WebviewResourceResponse.NotModified(mime, err.options?.mtime);
55
56
  }
56
57
  }
@@ -0,0 +1,23 @@
1
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { IWorkbenchColorTheme } from "@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService";
4
+ import { IWorkbenchThemeService } from "@codingame/monaco-vscode-3dd5b442-bfbc-5b1d-8f4a-7567530c75f5-common/vscode/vs/workbench/services/themes/common/workbenchThemeService.service";
5
+ import { WebviewStyles } from "@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/webview/browser/webview";
6
+ interface WebviewThemeData {
7
+ readonly activeTheme: string;
8
+ readonly themeLabel: string;
9
+ readonly themeId: string;
10
+ readonly styles: Readonly<WebviewStyles>;
11
+ }
12
+ export declare class WebviewThemeDataProvider extends Disposable {
13
+ private readonly _themeService;
14
+ private readonly _configurationService;
15
+ private _cachedWebViewThemeData;
16
+ private readonly _onThemeDataChanged;
17
+ readonly onThemeDataChanged: import("vscode/vscode/vs/base/common/event").Event<void>;
18
+ constructor(_themeService: IWorkbenchThemeService, _configurationService: IConfigurationService);
19
+ getTheme(): IWorkbenchColorTheme;
20
+ getWebviewThemeData(): WebviewThemeData;
21
+ private _reset;
22
+ }
23
+ export {};