@codingame/monaco-vscode-api 1.82.2 → 1.82.4-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 (58) hide show
  1. package/README.md +2 -0
  2. package/missing-services.js +23 -6
  3. package/monaco-editor-treemending.patch +1026 -1026
  4. package/package.json +1 -1
  5. package/service-override/keybindings.js +11 -0
  6. package/service-override/quickaccess.js +1 -1
  7. package/service-override/tools/editor.d.ts +1 -1
  8. package/service-override/viewBanner.d.ts +6 -0
  9. package/service-override/viewBanner.js +10 -0
  10. package/service-override/viewStatusBar.d.ts +6 -0
  11. package/service-override/viewStatusBar.js +10 -0
  12. package/service-override/viewTitleBar.d.ts +6 -0
  13. package/service-override/viewTitleBar.js +10 -0
  14. package/service-override/views.d.ts +0 -1
  15. package/service-override/views.js +14 -6
  16. package/service-override/workspaceTrust.d.ts +5 -0
  17. package/service-override/workspaceTrust.js +13 -0
  18. package/services.d.ts +3 -0
  19. package/services.js +3 -0
  20. package/vscode/src/vs/base/common/actions.d.ts +15 -1
  21. package/vscode/src/vs/base/common/async.d.ts +31 -1
  22. package/vscode/src/vs/base/common/htmlContent.d.ts +23 -2
  23. package/vscode/src/vs/platform/backup/common/backup.d.ts +14 -0
  24. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +16 -1
  25. package/vscode/src/vs/platform/label/common/label.d.ts +62 -0
  26. package/vscode/src/vs/platform/opener/browser/link.d.ts +8 -0
  27. package/vscode/src/vs/platform/update/common/update.d.ts +112 -0
  28. package/vscode/src/vs/platform/window/common/window.d.ts +2 -1
  29. package/vscode/src/vs/platform/workspace/common/workspaceTrust.d.ts +34 -1
  30. package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +43 -1
  31. package/vscode/src/vs/workbench/browser/contextkeys.js +249 -0
  32. package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.d.ts +45 -0
  33. package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.js +228 -0
  34. package/vscode/src/vs/workbench/browser/parts/banner/media/bannerpart.css.js +4 -0
  35. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +21 -0
  36. package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +134 -0
  37. package/vscode/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css.js +4 -0
  38. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.d.ts +115 -0
  39. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +77 -0
  40. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js +365 -0
  41. package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +216 -0
  42. package/vscode/src/vs/workbench/common/contextkeys.js +21 -1
  43. package/vscode/src/vs/workbench/common/theme.js +6 -6
  44. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +2 -1
  45. package/vscode/src/vs/workbench/contrib/preferences/browser/preferences.contribution.js +108 -4
  46. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +2 -2
  47. package/vscode/src/vs/workbench/contrib/workspace/browser/media/workspaceTrustEditor.css.js +4 -0
  48. package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +842 -0
  49. package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +1047 -0
  50. package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +14 -0
  51. package/vscode/src/vs/workbench/services/banner/browser/bannerService.d.ts +25 -0
  52. package/vscode/src/vs/workbench/services/banner/browser/bannerService.js +3 -0
  53. package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +10 -10
  54. package/vscode/src/vs/workbench/services/title/common/titleService.d.ts +31 -0
  55. package/vscode/src/vs/workbench/services/title/common/titleService.js +3 -0
  56. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +3 -1
  57. package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +27 -0
  58. package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +649 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.82.2",
3
+ "version": "1.82.4-next.0",
4
4
  "description": "VSCode public API plugged on the monaco editor",
5
5
  "keywords": [],
6
6
  "author": {
@@ -20,9 +20,17 @@ import { IUserDataProfileService } from '../vscode/src/vs/workbench/services/use
20
20
  import { IHostService } from '../vscode/src/vs/workbench/services/host/browser/host.js';
21
21
  import { IExtensionService } from '../vscode/src/vs/workbench/services/extensions/common/extensions.js';
22
22
  import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
23
+ import { WorkbenchContextKeysHandler } from '../vscode/src/vs/workbench/browser/contextkeys.js';
23
24
  import getServiceOverride$1 from './files.js';
24
25
  import '../vscode/src/vs/workbench/browser/workbench.contribution.js';
25
26
  import '../vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js';
27
+ import { onRenderWorkbench } from '../lifecycle.js';
28
+ import './layout.js';
29
+ import './environment.js';
30
+ import './extensions.js';
31
+ import './quickaccess.js';
32
+ import '../override/vs/platform/dialogs/common/dialogs.js';
33
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
26
34
  async function updateUserKeybindings(keybindingsJson) {
27
35
  const userDataProfilesService = StandaloneServices.get(IUserDataProfilesService);
28
36
  await StandaloneServices.get(IFileService).writeFile(userDataProfilesService.defaultProfile.keybindingsResource, VSBuffer.fromString(keybindingsJson));
@@ -70,6 +78,9 @@ DynamicWorkbenchKeybindingService = __decorate([
70
78
  ( __param(10, ILogService)),
71
79
  ( __param(11, IKeyboardLayoutService))
72
80
  ], DynamicWorkbenchKeybindingService);
81
+ onRenderWorkbench((accessor) => {
82
+ accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler);
83
+ });
73
84
  function getServiceOverride({ shouldUseGlobalKeybindings = () => false } = {}) {
74
85
  return {
75
86
  ...getServiceOverride$1(),
@@ -38,7 +38,7 @@ let DelegateQuickInputService = class DelegateQuickInputService {
38
38
  }
39
39
  get activeService() {
40
40
  const activeCodeEditor = StandaloneServices.get(ICodeEditorService).getFocusedCodeEditor();
41
- if (shouldUseGlobalPicker(activeCodeEditor, activeCodeEditor instanceof StandaloneCodeEditor)) {
41
+ if (activeCodeEditor == null || shouldUseGlobalPicker(activeCodeEditor, activeCodeEditor instanceof StandaloneCodeEditor)) {
42
42
  return this.workbenchQuickInputService;
43
43
  }
44
44
  this.standaloneQuickInputService ?? (this.standaloneQuickInputService = this.instantiationService.createInstance(StandaloneQuickInputService));
@@ -14,8 +14,8 @@ import { PreferredGroup } from '../../vscode/src/vs/workbench/services/editor/co
14
14
  import { IEditorResolverService } from '../../vscode/src/vs/workbench/services/editor/common/editorResolverService.js';
15
15
  import { ITextEditorService } from '../../vscode/src/vs/workbench/services/textfile/common/textEditorService.js';
16
16
  import { IHostService } from '../../vscode/src/vs/workbench/services/host/browser/host.js';
17
- import { EditorService } from '../../vscode/src/vs/workbench/services/editor/browser/editorService.js';
18
17
  import { IWorkspaceTrustRequestService } from '../../vscode/src/vs/platform/workspace/common/workspaceTrust.js';
18
+ import { EditorService } from '../../vscode/src/vs/workbench/services/editor/browser/editorService.js';
19
19
 
20
20
  type OpenEditor = (modelRef: IReference<IResolvedTextEditorModel>, options: IEditorOptions | undefined, sideBySide?: boolean) => Promise<ICodeEditor | undefined>;
21
21
  declare class MonacoEditorService extends EditorService {
@@ -0,0 +1,6 @@
1
+ import { IEditorOverrideServices } from '../vscode/src/vs/editor/standalone/browser/standaloneServices.js';
2
+ export { BannerPart } from '../vscode/src/vs/workbench/browser/parts/banner/bannerPart.js';
3
+
4
+ declare function getServiceOverride(): IEditorOverrideServices;
5
+
6
+ export { getServiceOverride as default };
@@ -0,0 +1,10 @@
1
+ import '../missing-services.js';
2
+ import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
3
+ import { BannerPart } from '../vscode/src/vs/workbench/browser/parts/banner/bannerPart.js';
4
+ import { IBannerService } from '../vscode/src/vs/workbench/services/banner/browser/bannerService.js';
5
+ function getServiceOverride() {
6
+ return {
7
+ [( IBannerService.toString())]: new SyncDescriptor(BannerPart, [], false)
8
+ };
9
+ }
10
+ export { BannerPart, getServiceOverride as default };
@@ -0,0 +1,6 @@
1
+ import { IEditorOverrideServices } from '../vscode/src/vs/editor/standalone/browser/standaloneServices.js';
2
+ export { StatusbarPart } from '../vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js';
3
+
4
+ declare function getServiceOverride(): IEditorOverrideServices;
5
+
6
+ export { getServiceOverride as default };
@@ -0,0 +1,10 @@
1
+ import '../missing-services.js';
2
+ import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
3
+ import { StatusbarPart } from '../vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js';
4
+ import { IStatusbarService } from '../vscode/src/vs/workbench/services/statusbar/browser/statusbar.js';
5
+ function getServiceOverride() {
6
+ return {
7
+ [( IStatusbarService.toString())]: new SyncDescriptor(StatusbarPart, [], false)
8
+ };
9
+ }
10
+ export { StatusbarPart, getServiceOverride as default };
@@ -0,0 +1,6 @@
1
+ import { IEditorOverrideServices } from '../vscode/src/vs/editor/standalone/browser/standaloneServices.js';
2
+ export { TitlebarPart } from '../vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js';
3
+
4
+ declare function getServiceOverride(): IEditorOverrideServices;
5
+
6
+ export { getServiceOverride as default };
@@ -0,0 +1,10 @@
1
+ import '../missing-services.js';
2
+ import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
3
+ import { ITitleService } from '../vscode/src/vs/workbench/services/title/common/titleService.js';
4
+ import { TitlebarPart } from '../vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js';
5
+ function getServiceOverride() {
6
+ return {
7
+ [( ITitleService.toString())]: new SyncDescriptor(TitlebarPart, [], false)
8
+ };
9
+ }
10
+ export { TitlebarPart, getServiceOverride as default };
@@ -13,7 +13,6 @@ export { HoverService } from '../vscode/src/vs/workbench/services/hover/browser/
13
13
  export { PanelPart } from '../vscode/src/vs/workbench/browser/parts/panel/panelPart.js';
14
14
  import { Part } from '../vscode/src/vs/workbench/browser/part.js';
15
15
  import { Codicon } from '../vscode/src/vs/base/common/codicons.js';
16
- export { StatusbarPart } from '../vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js';
17
16
  import { Parts } from '../vscode/src/vs/workbench/services/layout/browser/layoutService.js';
18
17
  export { ConfirmResult } from '../vscode/src/vs/platform/dialogs/common/dialogs.js';
19
18
  import { OpenEditor } from './tools/editor.js';
@@ -24,6 +24,7 @@ import { ViewPane } from '../vscode/src/vs/workbench/browser/parts/views/viewPan
24
24
  import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
25
25
  import { ViewPaneContainer } from '../vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js';
26
26
  import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
27
+ import { Part } from '../vscode/src/vs/workbench/browser/part.js';
27
28
  import { EditorPart } from '../vscode/src/vs/workbench/browser/parts/editor/editorPart.js';
28
29
  import '../vscode/src/vs/workbench/contrib/files/browser/fileCommands.js';
29
30
  import '../vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js';
@@ -58,7 +59,6 @@ import { EditorExtensions } from '../vscode/src/vs/workbench/common/editor.js';
58
59
  import { ITextEditorService, TextEditorService } from '../vscode/src/vs/workbench/services/textfile/common/textEditorService.js';
59
60
  import { CodeEditorService } from '../vscode/src/vs/workbench/services/editor/browser/codeEditorService.js';
60
61
  import { IUntitledTextEditorService, UntitledTextEditorService } from '../vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js';
61
- import { StatusbarPart } from '../vscode/src/vs/workbench/browser/parts/statusbar/statusbarPart.js';
62
62
  import { IStatusbarService } from '../vscode/src/vs/workbench/services/statusbar/browser/statusbar.js';
63
63
  import { IHistoryService } from '../vscode/src/vs/workbench/services/history/common/history.js';
64
64
  import { HistoryService } from '../vscode/src/vs/workbench/services/history/browser/historyService.js';
@@ -84,6 +84,8 @@ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/st
84
84
  import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
85
85
  export { ConfirmResult } from '../override/vs/platform/dialogs/common/dialogs.js';
86
86
  import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
87
+ import { IBannerService } from '../vscode/src/vs/workbench/services/banner/browser/bannerService.js';
88
+ import { ITitleService } from '../vscode/src/vs/workbench/services/title/common/titleService.js';
87
89
  import { MonacoEditorService, MonacoDelegateEditorGroupsService } from './tools/editor.js';
88
90
  import getServiceOverride$2 from './bulkEdit.js';
89
91
  import getServiceOverride$1 from './layout.js';
@@ -438,20 +440,27 @@ registerAssets({
438
440
  registerServiceInitializePostParticipant(async (accessor) => {
439
441
  const paneCompositePartService = accessor.get(IPaneCompositePartService);
440
442
  const viewDescriptorService = accessor.get(IViewDescriptorService);
441
- accessor.get(IStatusbarService);
443
+ const withStatusBar = accessor.get(IStatusbarService) instanceof Part;
444
+ const withBannerPart = accessor.get(IBannerService) instanceof Part;
445
+ const withTitlePart = accessor.get(ITitleService) instanceof Part;
442
446
  paneCompositePartService.getPaneComposites(1 );
443
447
  const layoutService = accessor.get(ILayoutService);
444
448
  const invisibleContainer = document.createElement('div');
445
449
  invisibleContainer.style.display = 'none';
446
450
  document.body.append(invisibleContainer);
447
- for (const { id, role, classes, options } of [
451
+ for (const { id, role, classes, options, enabled = true } of [
452
+ { id: "workbench.parts.titlebar" , role: 'none', classes: ['titlebar'], enabled: withTitlePart },
453
+ { id: "workbench.parts.banner" , role: 'banner', classes: ['banner'], enabled: withBannerPart },
448
454
  { id: "workbench.parts.activitybar" , role: 'none', classes: ['activitybar', 'left'] },
449
455
  { id: "workbench.parts.sidebar" , role: 'none', classes: ['sidebar', 'left'] },
450
456
  { id: "workbench.parts.editor" , role: 'main', classes: ['editor'], options: { restorePreviousState: false } },
451
457
  { id: "workbench.parts.panel" , role: 'none', classes: ['panel', 'basepanel', positionToString(2 )] },
452
458
  { id: "workbench.parts.auxiliarybar" , role: 'none', classes: ['auxiliarybar', 'basepanel', 'right'] },
453
- { id: "workbench.parts.statusbar" , role: 'status', classes: ['statusbar'] }
459
+ { id: "workbench.parts.statusbar" , role: 'status', classes: ['statusbar'], enabled: withStatusBar }
454
460
  ]) {
461
+ if (!enabled) {
462
+ continue;
463
+ }
455
464
  const partContainer = createPart(id, role, classes);
456
465
  const part = layoutService.getPart(id);
457
466
  part.create(partContainer, options);
@@ -485,7 +494,6 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains)
485
494
  [( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService, [], true),
486
495
  [( ITextEditorService.toString())]: new SyncDescriptor(TextEditorService, [], false),
487
496
  [( IEditorGroupsService.toString())]: new SyncDescriptor(MonacoEditorPart, [], false),
488
- [( IStatusbarService.toString())]: new SyncDescriptor(StatusbarPart, [], false),
489
497
  [( IEditorDropService.toString())]: new SyncDescriptor(EditorDropService, [], true),
490
498
  [( IEditorService.toString())]: new SyncDescriptor(MonacoEditorService, [openEditorFallback, isEditorPartVisible], false),
491
499
  [( IEditorResolverService.toString())]: new SyncDescriptor(EditorResolverService, [], false),
@@ -500,4 +508,4 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains)
500
508
  [( IWebviewWorkbenchService.toString())]: new SyncDescriptor(WebviewEditorService, [], true)
501
509
  };
502
510
  }
503
- export { ActivityService, HoverService, StatusbarPart, attachPart, getServiceOverride as default, isEditorPartVisible, isPartVisibile, onPartVisibilityChange, registerCustomView, registerEditorPane, renderActivitybarPar, renderAuxiliaryPart, renderEditorPart, renderPanelPart, renderPart, renderSidebarPart, renderStatusBarPart, setPartVisibility };
511
+ export { ActivityService, HoverService, attachPart, getServiceOverride as default, isEditorPartVisible, isPartVisibile, onPartVisibilityChange, registerCustomView, registerEditorPane, renderActivitybarPar, renderAuxiliaryPart, renderEditorPart, renderPanelPart, renderPart, renderSidebarPart, renderStatusBarPart, setPartVisibility };
@@ -0,0 +1,5 @@
1
+ import { IEditorOverrideServices } from '../vscode/src/vs/editor/standalone/browser/standaloneServices.js';
2
+
3
+ declare function getServiceOverride(): IEditorOverrideServices;
4
+
5
+ export { getServiceOverride as default };
@@ -0,0 +1,13 @@
1
+ import '../missing-services.js';
2
+ import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
3
+ import { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
4
+ import { WorkspaceTrustEnablementService, WorkspaceTrustManagementService, WorkspaceTrustRequestService } from '../vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js';
5
+ import '../vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js';
6
+ function getServiceOverride() {
7
+ return {
8
+ [( IWorkspaceTrustEnablementService.toString())]: new SyncDescriptor(WorkspaceTrustEnablementService),
9
+ [( IWorkspaceTrustManagementService.toString())]: new SyncDescriptor(WorkspaceTrustManagementService),
10
+ [( IWorkspaceTrustRequestService.toString())]: new SyncDescriptor(WorkspaceTrustRequestService)
11
+ };
12
+ }
13
+ export { getServiceOverride as default };
package/services.d.ts CHANGED
@@ -66,6 +66,9 @@ export { IActivityService, IBadge } from './vscode/src/vs/workbench/services/act
66
66
  export { IHoverService } from './vscode/src/vs/workbench/services/hover/browser/hover.js';
67
67
  export { IExplorerService } from './vscode/src/vs/workbench/contrib/files/browser/files.js';
68
68
  export { IStatusbarService } from './vscode/src/vs/workbench/services/statusbar/browser/statusbar.js';
69
+ export { ITitleService } from './vscode/src/vs/workbench/services/title/common/titleService.js';
70
+ export { IBannerService } from './vscode/src/vs/workbench/services/banner/browser/bannerService.js';
71
+ export { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService, IWorkspaceTrustUriInfo } from './vscode/src/vs/platform/workspace/common/workspaceTrust.js';
69
72
 
70
73
  declare function initialize(overrides: IEditorOverrideServices): Promise<void>;
71
74
  declare function getService<T>(identifier: ServiceIdentifier<T>): Promise<T>;
package/services.js CHANGED
@@ -67,6 +67,9 @@ export { IActivityService } from './vscode/src/vs/workbench/services/activity/co
67
67
  export { IHoverService } from './vscode/src/vs/workbench/services/hover/browser/hover.js';
68
68
  export { IExplorerService } from './vscode/src/vs/workbench/contrib/files/browser/files.js';
69
69
  export { IStatusbarService } from './vscode/src/vs/workbench/services/statusbar/browser/statusbar.js';
70
+ export { ITitleService } from './vscode/src/vs/workbench/services/title/common/titleService.js';
71
+ export { IBannerService } from './vscode/src/vs/workbench/services/banner/browser/bannerService.js';
72
+ export { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
70
73
  export { IDialogService, IFileDialogService } from './vscode/src/vs/platform/dialogs/common/dialogs.js';
71
74
  async function initialize(overrides) {
72
75
  const instantiationService = StandaloneServices.initialize({
@@ -19,6 +19,20 @@ interface IRunEvent {
19
19
  readonly action: IAction;
20
20
  readonly error?: Error;
21
21
  }
22
+ declare class Separator implements IAction {
23
+ /**
24
+ * Joins all non-empty lists of actions with separators.
25
+ */
26
+ static join(...actionLists: readonly IAction[][]): IAction[];
27
+ static readonly ID = "vs.actions.separator";
28
+ readonly id: string;
29
+ readonly label: string;
30
+ readonly tooltip: string;
31
+ readonly class: string;
32
+ readonly enabled: boolean;
33
+ readonly checked: boolean;
34
+ run(): Promise<void>;
35
+ }
22
36
  declare class SubmenuAction implements IAction {
23
37
  readonly id: string;
24
38
  readonly label: string;
@@ -32,4 +46,4 @@ declare class SubmenuAction implements IAction {
32
46
  run(): Promise<void>;
33
47
  }
34
48
 
35
- export { type IAction, type IActionRunner, type IRunEvent, SubmenuAction };
49
+ export { type IAction, type IActionRunner, type IRunEvent, Separator, SubmenuAction };
@@ -1,5 +1,35 @@
1
+ import { IDisposable } from './lifecycle.js';
2
+
1
3
  interface CancelablePromise<T> extends Promise<T> {
2
4
  cancel(): void;
3
5
  }
6
+ declare class RunOnceScheduler implements IDisposable {
7
+ protected runner: ((...args: unknown[]) => void) | null;
8
+ private timeoutToken;
9
+ private timeout;
10
+ private timeoutHandler;
11
+ constructor(runner: (...args: any[]) => void, delay: number);
12
+ /**
13
+ * Dispose RunOnceScheduler
14
+ */
15
+ dispose(): void;
16
+ /**
17
+ * Cancel current scheduled runner (if any).
18
+ */
19
+ cancel(): void;
20
+ /**
21
+ * Cancel previous runner (if any) & schedule a new runner.
22
+ */
23
+ schedule(delay?: number): void;
24
+ get delay(): number;
25
+ set delay(value: number);
26
+ /**
27
+ * Returns true if scheduled.
28
+ */
29
+ isScheduled(): boolean;
30
+ flush(): void;
31
+ private onTimeout;
32
+ protected doRun(): void;
33
+ }
4
34
 
5
- export type { CancelablePromise };
35
+ export { type CancelablePromise, RunOnceScheduler };
@@ -1,4 +1,4 @@
1
- import { UriComponents } from './uri.js';
1
+ import { UriComponents, URI } from './uri.js';
2
2
 
3
3
  interface MarkdownStringTrustedOptions {
4
4
  readonly enabledCommands: readonly string[];
@@ -13,5 +13,26 @@ interface IMarkdownString {
13
13
  [href: string]: UriComponents;
14
14
  };
15
15
  }
16
+ declare const enum MarkdownStringTextNewlineStyle {
17
+ Paragraph = 0,
18
+ Break = 1
19
+ }
20
+ declare class MarkdownString implements IMarkdownString {
21
+ value: string;
22
+ isTrusted?: boolean | MarkdownStringTrustedOptions;
23
+ supportThemeIcons?: boolean;
24
+ supportHtml?: boolean;
25
+ baseUri?: URI;
26
+ constructor(value?: string, isTrustedOrOptions?: boolean | {
27
+ isTrusted?: boolean | MarkdownStringTrustedOptions;
28
+ supportThemeIcons?: boolean;
29
+ supportHtml?: boolean;
30
+ });
31
+ appendText(value: string, newlineStyle?: MarkdownStringTextNewlineStyle): MarkdownString;
32
+ appendMarkdown(value: string): MarkdownString;
33
+ appendCodeblock(langId: string, code: string): MarkdownString;
34
+ appendLink(target: URI | string, label: string, title?: string): MarkdownString;
35
+ private _escape;
36
+ }
16
37
 
17
- export type { IMarkdownString, MarkdownStringTrustedOptions };
38
+ export { type IMarkdownString, MarkdownString, MarkdownStringTextNewlineStyle, type MarkdownStringTrustedOptions };
@@ -0,0 +1,14 @@
1
+ import { URI } from '../../../base/common/uri.js';
2
+ import { IWorkspaceIdentifier } from '../../workspace/common/workspace.js';
3
+
4
+ interface IBaseBackupInfo {
5
+ remoteAuthority?: string;
6
+ }
7
+ interface IWorkspaceBackupInfo extends IBaseBackupInfo {
8
+ readonly workspace: IWorkspaceIdentifier;
9
+ }
10
+ interface IFolderBackupInfo extends IBaseBackupInfo {
11
+ readonly folderUri: URI;
12
+ }
13
+
14
+ export type { IBaseBackupInfo, IFolderBackupInfo, IWorkspaceBackupInfo };
@@ -18,4 +18,19 @@ function adoptToGalleryExtensionId(id) {
18
18
  function getGalleryExtensionId(publisher, name) {
19
19
  return adoptToGalleryExtensionId(getExtensionId(publisher ?? UNDEFINED_PUBLISHER, name));
20
20
  }
21
- export { adoptToGalleryExtensionId, areSameExtensions, getExtensionId, getGalleryExtensionId };
21
+ function getExtensionDependencies(installedExtensions, extension) {
22
+ const dependencies = [];
23
+ const extensions = extension.manifest.extensionDependencies?.slice(0) ?? [];
24
+ while (extensions.length) {
25
+ const id = extensions.shift();
26
+ if (id && dependencies.every(e => !areSameExtensions(e.identifier, { id }))) {
27
+ const ext = installedExtensions.filter(e => areSameExtensions(e.identifier, { id }));
28
+ if (ext.length === 1) {
29
+ dependencies.push(ext[0]);
30
+ extensions.push(...(ext[0].manifest.extensionDependencies?.slice(0) ?? []));
31
+ }
32
+ }
33
+ }
34
+ return dependencies;
35
+ }
36
+ export { adoptToGalleryExtensionId, areSameExtensions, getExtensionDependencies, getExtensionId, getGalleryExtensionId };
@@ -0,0 +1,62 @@
1
+ import { ServiceIdentifier } from '../../instantiation/common/instantiation.js';
2
+ import { Event } from '../../../base/common/event.js';
3
+ import { IDisposable } from '../../../base/common/lifecycle.js';
4
+ import { URI } from '../../../base/common/uri.js';
5
+ import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspace } from '../../workspace/common/workspace.js';
6
+
7
+ declare const ILabelService: ServiceIdentifier<ILabelService>;
8
+ interface ILabelService {
9
+ readonly _serviceBrand: undefined;
10
+ /**
11
+ * Gets the human readable label for a uri.
12
+ * If `relative` is passed returns a label relative to the workspace root that the uri belongs to.
13
+ * If `noPrefix` is passed does not tildify the label and also does not prepand the root name for relative labels in a multi root scenario.
14
+ * If `separator` is passed, will use that over the defined path separator of the formatter.
15
+ */
16
+ getUriLabel(resource: URI, options?: {
17
+ relative?: boolean;
18
+ noPrefix?: boolean;
19
+ separator?: '/' | '\\';
20
+ }): string;
21
+ getUriBasenameLabel(resource: URI): string;
22
+ getWorkspaceLabel(workspace: (IWorkspaceIdentifier | ISingleFolderWorkspaceIdentifier | URI | IWorkspace), options?: {
23
+ verbose: Verbosity;
24
+ }): string;
25
+ getHostLabel(scheme: string, authority?: string): string;
26
+ getHostTooltip(scheme: string, authority?: string): string | undefined;
27
+ getSeparator(scheme: string, authority?: string): '/' | '\\';
28
+ registerFormatter(formatter: ResourceLabelFormatter): IDisposable;
29
+ onDidChangeFormatters: Event<IFormatterChangeEvent>;
30
+ /**
31
+ * Registers a formatter that's cached for the machine beyond the lifecycle
32
+ * of the current window. Disposing the formatter _will not_ remove it from
33
+ * the cache.
34
+ */
35
+ registerCachedFormatter(formatter: ResourceLabelFormatter): IDisposable;
36
+ }
37
+ declare const enum Verbosity {
38
+ SHORT = 0,
39
+ MEDIUM = 1,
40
+ LONG = 2
41
+ }
42
+ interface IFormatterChangeEvent {
43
+ scheme: string;
44
+ }
45
+ interface ResourceLabelFormatter {
46
+ scheme: string;
47
+ authority?: string;
48
+ priority?: boolean;
49
+ formatting: ResourceLabelFormatting;
50
+ }
51
+ interface ResourceLabelFormatting {
52
+ label: string;
53
+ separator: '/' | '\\' | '';
54
+ tildify?: boolean;
55
+ normalizeDriveLetter?: boolean;
56
+ workspaceSuffix?: string;
57
+ workspaceTooltip?: string;
58
+ authorityPrefix?: string;
59
+ stripPathStartingSeparator?: boolean;
60
+ }
61
+
62
+ export { type IFormatterChangeEvent, ILabelService, type ResourceLabelFormatter, type ResourceLabelFormatting, Verbosity };
@@ -0,0 +1,8 @@
1
+ interface ILinkDescriptor {
2
+ readonly label: string | HTMLElement;
3
+ readonly href: string;
4
+ readonly title?: string;
5
+ readonly tabIndex?: number;
6
+ }
7
+
8
+ export type { ILinkDescriptor };
@@ -0,0 +1,112 @@
1
+ import { ServiceIdentifier } from '../../instantiation/common/instantiation.js';
2
+ import { Event } from '../../../base/common/event.js';
3
+
4
+ interface IUpdate {
5
+ version: string;
6
+ productVersion: string;
7
+ url?: string;
8
+ hash?: string;
9
+ }
10
+ /**
11
+ * Updates are run as a state machine:
12
+ *
13
+ * Uninitialized
14
+ * ↓
15
+ * Idle
16
+ * ↓ ↑
17
+ * Checking for Updates → Available for Download
18
+ * ↓
19
+ * Downloading → Ready
20
+ * ↓ ↑
21
+ * Downloaded → Updating
22
+ *
23
+ * Available: There is an update available for download (linux).
24
+ * Ready: Code will be updated as soon as it restarts (win32, darwin).
25
+ * Downloaded: There is an update ready to be installed in the background (win32).
26
+ */
27
+ declare const enum StateType {
28
+ Uninitialized = "uninitialized",
29
+ Idle = "idle",
30
+ Disabled = "disabled",
31
+ CheckingForUpdates = "checking for updates",
32
+ AvailableForDownload = "available for download",
33
+ Downloading = "downloading",
34
+ Downloaded = "downloaded",
35
+ Updating = "updating",
36
+ Ready = "ready"
37
+ }
38
+ declare const enum UpdateType {
39
+ Setup = 0,
40
+ Archive = 1,
41
+ Snap = 2
42
+ }
43
+ declare const enum DisablementReason {
44
+ NotBuilt = 0,
45
+ DisabledByEnvironment = 1,
46
+ ManuallyDisabled = 2,
47
+ MissingConfiguration = 3,
48
+ InvalidConfiguration = 4,
49
+ RunningAsAdmin = 5
50
+ }
51
+ type Uninitialized = {
52
+ type: StateType.Uninitialized;
53
+ };
54
+ type Disabled = {
55
+ type: StateType.Disabled;
56
+ reason: DisablementReason;
57
+ };
58
+ type Idle = {
59
+ type: StateType.Idle;
60
+ updateType: UpdateType;
61
+ error?: string;
62
+ };
63
+ type CheckingForUpdates = {
64
+ type: StateType.CheckingForUpdates;
65
+ explicit: boolean;
66
+ };
67
+ type AvailableForDownload = {
68
+ type: StateType.AvailableForDownload;
69
+ update: IUpdate;
70
+ };
71
+ type Downloading = {
72
+ type: StateType.Downloading;
73
+ update: IUpdate;
74
+ };
75
+ type Downloaded = {
76
+ type: StateType.Downloaded;
77
+ update: IUpdate;
78
+ };
79
+ type Updating = {
80
+ type: StateType.Updating;
81
+ update: IUpdate;
82
+ };
83
+ type Ready = {
84
+ type: StateType.Ready;
85
+ update: IUpdate;
86
+ };
87
+ type State = Uninitialized | Disabled | Idle | CheckingForUpdates | AvailableForDownload | Downloading | Downloaded | Updating | Ready;
88
+ declare const State: {
89
+ Uninitialized: Uninitialized;
90
+ Disabled: (reason: DisablementReason) => Disabled;
91
+ Idle: (updateType: UpdateType, error?: string) => Idle;
92
+ CheckingForUpdates: (explicit: boolean) => CheckingForUpdates;
93
+ AvailableForDownload: (update: IUpdate) => AvailableForDownload;
94
+ Downloading: (update: IUpdate) => Downloading;
95
+ Downloaded: (update: IUpdate) => Downloaded;
96
+ Updating: (update: IUpdate) => Updating;
97
+ Ready: (update: IUpdate) => Ready;
98
+ };
99
+ declare const IUpdateService: ServiceIdentifier<IUpdateService>;
100
+ interface IUpdateService {
101
+ readonly _serviceBrand: undefined;
102
+ readonly onStateChange: Event<State>;
103
+ readonly state: State;
104
+ checkForUpdates(explicit: boolean): Promise<void>;
105
+ downloadUpdate(): Promise<void>;
106
+ applyUpdate(): Promise<void>;
107
+ quitAndInstall(): Promise<void>;
108
+ isLatestVersion(): Promise<boolean | undefined>;
109
+ _applySpecificUpdate(packagePath: string): Promise<void>;
110
+ }
111
+
112
+ export { type AvailableForDownload, type CheckingForUpdates, type Disabled, DisablementReason, type Downloaded, type Downloading, type IUpdate, IUpdateService, type Idle, type Ready, State, StateType, type Uninitialized, UpdateType, type Updating };
@@ -43,6 +43,7 @@ interface IFolderToOpen extends IBaseWindowOpenable {
43
43
  interface IFileToOpen extends IBaseWindowOpenable {
44
44
  readonly fileUri: URI;
45
45
  }
46
+ type MenuBarVisibility = 'classic' | 'visible' | 'toggle' | 'hidden' | 'compact';
46
47
  interface IPath<T = IEditorOptions> extends IPathData<T> {
47
48
  /**
48
49
  * The file path to open within the instance
@@ -76,4 +77,4 @@ interface IPathData<T = IEditorOptions> {
76
77
  readonly openOnlyIfExists?: boolean;
77
78
  }
78
79
 
79
- export type { IBaseOpenWindowsOptions, IBaseWindowOpenable, IFileToOpen, IFolderToOpen, IOpenEmptyWindowOptions, IOpenWindowOptions, IPath, IPathData, IWindowOpenable, IWorkspaceToOpen };
80
+ export type { IBaseOpenWindowsOptions, IBaseWindowOpenable, IFileToOpen, IFolderToOpen, IOpenEmptyWindowOptions, IOpenWindowOptions, IPath, IPathData, IWindowOpenable, IWorkspaceToOpen, MenuBarVisibility };
@@ -1,5 +1,6 @@
1
1
  import { ServiceIdentifier } from '../../instantiation/common/instantiation.js';
2
2
  import { Event } from '../../../base/common/event.js';
3
+ import { IDisposable } from '../../../base/common/lifecycle.js';
3
4
  import { URI } from '../../../base/common/uri.js';
4
5
 
5
6
  interface WorkspaceTrustRequestButton {
@@ -10,6 +11,31 @@ interface WorkspaceTrustRequestOptions {
10
11
  readonly buttons?: WorkspaceTrustRequestButton[];
11
12
  readonly message?: string;
12
13
  }
14
+ declare const IWorkspaceTrustEnablementService: ServiceIdentifier<IWorkspaceTrustEnablementService>;
15
+ interface IWorkspaceTrustEnablementService {
16
+ readonly _serviceBrand: undefined;
17
+ isWorkspaceTrustEnabled(): boolean;
18
+ }
19
+ declare const IWorkspaceTrustManagementService: ServiceIdentifier<IWorkspaceTrustManagementService>;
20
+ interface IWorkspaceTrustManagementService {
21
+ readonly _serviceBrand: undefined;
22
+ onDidChangeTrust: Event<boolean>;
23
+ onDidChangeTrustedFolders: Event<void>;
24
+ readonly workspaceResolved: Promise<void>;
25
+ readonly workspaceTrustInitialized: Promise<void>;
26
+ acceptsOutOfWorkspaceFiles: boolean;
27
+ isWorkspaceTrusted(): boolean;
28
+ isWorkspaceTrustForced(): boolean;
29
+ canSetParentFolderTrust(): boolean;
30
+ setParentFolderTrust(trusted: boolean): Promise<void>;
31
+ canSetWorkspaceTrust(): boolean;
32
+ setWorkspaceTrust(trusted: boolean): Promise<void>;
33
+ getUriTrustInfo(uri: URI): Promise<IWorkspaceTrustUriInfo>;
34
+ setUrisTrust(uri: URI[], trusted: boolean): Promise<void>;
35
+ getTrustedUris(): URI[];
36
+ setTrustedUris(uris: URI[]): Promise<void>;
37
+ addWorkspaceTrustTransitionParticipant(participant: IWorkspaceTrustTransitionParticipant): IDisposable;
38
+ }
13
39
  declare const enum WorkspaceTrustUriResponse {
14
40
  Open = 1,
15
41
  OpenInNewWindow = 2,
@@ -28,5 +54,12 @@ interface IWorkspaceTrustRequestService {
28
54
  requestWorkspaceTrust(options?: WorkspaceTrustRequestOptions): Promise<boolean | undefined>;
29
55
  requestWorkspaceTrustOnStartup(): void;
30
56
  }
57
+ interface IWorkspaceTrustTransitionParticipant {
58
+ participate(trusted: boolean): Promise<void>;
59
+ }
60
+ interface IWorkspaceTrustUriInfo {
61
+ uri: URI;
62
+ trusted: boolean;
63
+ }
31
64
 
32
- export { IWorkspaceTrustRequestService, type WorkspaceTrustRequestButton, type WorkspaceTrustRequestOptions, WorkspaceTrustUriResponse };
65
+ export { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService, type IWorkspaceTrustTransitionParticipant, type IWorkspaceTrustUriInfo, type WorkspaceTrustRequestButton, type WorkspaceTrustRequestOptions, WorkspaceTrustUriResponse };