@codingame/monaco-vscode-api 1.82.3 → 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 (27) hide show
  1. package/missing-services.js +6 -6
  2. package/monaco-editor-treemending.patch +1026 -1026
  3. package/package.json +1 -1
  4. package/service-override/keybindings.js +11 -0
  5. package/service-override/viewBanner.d.ts +6 -0
  6. package/service-override/viewBanner.js +10 -0
  7. package/service-override/viewStatusBar.d.ts +6 -0
  8. package/service-override/viewStatusBar.js +10 -0
  9. package/service-override/viewTitleBar.d.ts +6 -0
  10. package/service-override/viewTitleBar.js +10 -0
  11. package/service-override/views.d.ts +0 -1
  12. package/service-override/views.js +12 -14
  13. package/vscode/src/vs/base/common/actions.d.ts +15 -1
  14. package/vscode/src/vs/base/common/async.d.ts +31 -1
  15. package/vscode/src/vs/platform/backup/common/backup.d.ts +14 -0
  16. package/vscode/src/vs/platform/label/common/label.d.ts +62 -0
  17. package/vscode/src/vs/platform/update/common/update.d.ts +112 -0
  18. package/vscode/src/vs/platform/window/common/window.d.ts +2 -1
  19. package/vscode/src/vs/platform/workspaces/common/workspaces.d.ts +43 -1
  20. package/vscode/src/vs/workbench/browser/contextkeys.js +249 -0
  21. package/vscode/src/vs/workbench/browser/parts/banner/bannerPart.d.ts +45 -0
  22. package/vscode/src/vs/workbench/browser/parts/titlebar/commandCenterControl.js +9 -9
  23. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.d.ts +115 -0
  24. package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +77 -0
  25. package/vscode/src/vs/workbench/common/contextkeys.js +20 -1
  26. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +2 -2
  27. package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.82.3",
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(),
@@ -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,10 +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 { BannerPart } from '../vscode/src/vs/workbench/browser/parts/banner/bannerPart.js';
88
87
  import { IBannerService } from '../vscode/src/vs/workbench/services/banner/browser/bannerService.js';
89
88
  import { ITitleService } from '../vscode/src/vs/workbench/services/title/common/titleService.js';
90
- import { TitlebarPart } from '../vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.js';
91
89
  import { MonacoEditorService, MonacoDelegateEditorGroupsService } from './tools/editor.js';
92
90
  import getServiceOverride$2 from './bulkEdit.js';
93
91
  import getServiceOverride$1 from './layout.js';
@@ -442,24 +440,27 @@ registerAssets({
442
440
  registerServiceInitializePostParticipant(async (accessor) => {
443
441
  const paneCompositePartService = accessor.get(IPaneCompositePartService);
444
442
  const viewDescriptorService = accessor.get(IViewDescriptorService);
445
- accessor.get(IStatusbarService);
446
- accessor.get(IBannerService);
447
- accessor.get(ITitleService);
443
+ const withStatusBar = accessor.get(IStatusbarService) instanceof Part;
444
+ const withBannerPart = accessor.get(IBannerService) instanceof Part;
445
+ const withTitlePart = accessor.get(ITitleService) instanceof Part;
448
446
  paneCompositePartService.getPaneComposites(1 );
449
447
  const layoutService = accessor.get(ILayoutService);
450
448
  const invisibleContainer = document.createElement('div');
451
449
  invisibleContainer.style.display = 'none';
452
450
  document.body.append(invisibleContainer);
453
- for (const { id, role, classes, options } of [
454
- { id: "workbench.parts.titlebar" , role: 'none', classes: ['titlebar'] },
455
- { id: "workbench.parts.banner" , role: 'banner', classes: ['banner'] },
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 },
456
454
  { id: "workbench.parts.activitybar" , role: 'none', classes: ['activitybar', 'left'] },
457
455
  { id: "workbench.parts.sidebar" , role: 'none', classes: ['sidebar', 'left'] },
458
456
  { id: "workbench.parts.editor" , role: 'main', classes: ['editor'], options: { restorePreviousState: false } },
459
457
  { id: "workbench.parts.panel" , role: 'none', classes: ['panel', 'basepanel', positionToString(2 )] },
460
458
  { id: "workbench.parts.auxiliarybar" , role: 'none', classes: ['auxiliarybar', 'basepanel', 'right'] },
461
- { id: "workbench.parts.statusbar" , role: 'status', classes: ['statusbar'] }
459
+ { id: "workbench.parts.statusbar" , role: 'status', classes: ['statusbar'], enabled: withStatusBar }
462
460
  ]) {
461
+ if (!enabled) {
462
+ continue;
463
+ }
463
464
  const partContainer = createPart(id, role, classes);
464
465
  const part = layoutService.getPart(id);
465
466
  part.create(partContainer, options);
@@ -493,9 +494,6 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains)
493
494
  [( ICodeEditorService.toString())]: new SyncDescriptor(CodeEditorService, [], true),
494
495
  [( ITextEditorService.toString())]: new SyncDescriptor(TextEditorService, [], false),
495
496
  [( IEditorGroupsService.toString())]: new SyncDescriptor(MonacoEditorPart, [], false),
496
- [( ITitleService.toString())]: new SyncDescriptor(TitlebarPart, [], false),
497
- [( IBannerService.toString())]: new SyncDescriptor(BannerPart, [], false),
498
- [( IStatusbarService.toString())]: new SyncDescriptor(StatusbarPart, [], false),
499
497
  [( IEditorDropService.toString())]: new SyncDescriptor(EditorDropService, [], true),
500
498
  [( IEditorService.toString())]: new SyncDescriptor(MonacoEditorService, [openEditorFallback, isEditorPartVisible], false),
501
499
  [( IEditorResolverService.toString())]: new SyncDescriptor(EditorResolverService, [], false),
@@ -510,4 +508,4 @@ function getServiceOverride(openEditorFallback, _webviewIframeAlternateDomains)
510
508
  [( IWebviewWorkbenchService.toString())]: new SyncDescriptor(WebviewEditorService, [], true)
511
509
  };
512
510
  }
513
- 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 };
@@ -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 };
@@ -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 };
@@ -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,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,8 +1,50 @@
1
+ import { ServiceIdentifier } from '../../instantiation/common/instantiation.js';
2
+ import { Event } from '../../../base/common/event.js';
1
3
  import { URI } from '../../../base/common/uri.js';
4
+ import { IWorkspaceBackupInfo, IFolderBackupInfo } from '../../backup/common/backup.js';
5
+ import { IWorkspaceIdentifier } from '../../workspace/common/workspace.js';
2
6
 
7
+ declare const IWorkspacesService: ServiceIdentifier<IWorkspacesService>;
8
+ interface IWorkspacesService {
9
+ readonly _serviceBrand: undefined;
10
+ enterWorkspace(workspaceUri: URI): Promise<IEnterWorkspaceResult | undefined>;
11
+ createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise<IWorkspaceIdentifier>;
12
+ deleteUntitledWorkspace(workspace: IWorkspaceIdentifier): Promise<void>;
13
+ getWorkspaceIdentifier(workspaceUri: URI): Promise<IWorkspaceIdentifier>;
14
+ readonly onDidChangeRecentlyOpened: Event<void>;
15
+ addRecentlyOpened(recents: IRecent[]): Promise<void>;
16
+ removeRecentlyOpened(workspaces: URI[]): Promise<void>;
17
+ clearRecentlyOpened(): Promise<void>;
18
+ getRecentlyOpened(): Promise<IRecentlyOpened>;
19
+ getDirtyWorkspaces(): Promise<Array<IWorkspaceBackupInfo | IFolderBackupInfo>>;
20
+ }
21
+ interface IRecentlyOpened {
22
+ workspaces: Array<IRecentWorkspace | IRecentFolder>;
23
+ files: IRecentFile[];
24
+ }
25
+ type IRecent = IRecentWorkspace | IRecentFolder | IRecentFile;
26
+ interface IRecentWorkspace {
27
+ readonly workspace: IWorkspaceIdentifier;
28
+ label?: string;
29
+ readonly remoteAuthority?: string;
30
+ }
31
+ interface IRecentFolder {
32
+ readonly folderUri: URI;
33
+ label?: string;
34
+ readonly remoteAuthority?: string;
35
+ }
36
+ interface IRecentFile {
37
+ readonly fileUri: URI;
38
+ label?: string;
39
+ readonly remoteAuthority?: string;
40
+ }
3
41
  interface IWorkspaceFolderCreationData {
4
42
  readonly uri: URI;
5
43
  readonly name?: string;
6
44
  }
45
+ interface IEnterWorkspaceResult {
46
+ readonly workspace: IWorkspaceIdentifier;
47
+ readonly backupPath?: string;
48
+ }
7
49
 
8
- export type { IWorkspaceFolderCreationData };
50
+ export { type IEnterWorkspaceResult, type IRecent, type IRecentFile, type IRecentFolder, type IRecentWorkspace, type IRecentlyOpened, type IWorkspaceFolderCreationData, IWorkspacesService };