@codingame/monaco-vscode-api 17.1.2 → 17.1.3

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.
package/lifecycle.js CHANGED
@@ -3,7 +3,7 @@ import { Registry } from './vscode/src/vs/platform/registry/common/platform.js';
3
3
  import { Extensions } from './vscode/src/vs/workbench/common/contributions.js';
4
4
  import { LifecyclePhase } from './vscode/src/vs/workbench/services/lifecycle/common/lifecycle.js';
5
5
  import { ILifecycleService } from './vscode/src/vs/workbench/services/lifecycle/common/lifecycle.service.js';
6
- import './vscode/src/vs/platform/instantiation/common/instantiation.js';
6
+ import { IInstantiationService } from './vscode/src/vs/platform/instantiation/common/instantiation.js';
7
7
  import { Barrier, timeout, RunOnceScheduler, _runWhenIdle } from './vscode/src/vs/base/common/async.js';
8
8
  import { Emitter } from './vscode/src/vs/base/common/event.js';
9
9
  import { EditorExtensions } from './vscode/src/vs/workbench/common/editor.js';
@@ -14,6 +14,7 @@ import { setHoverDelegateFactory } from './vscode/src/vs/base/browser/ui/hover/h
14
14
  import { setBaseLayerHoverDelegate } from './vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js';
15
15
  import { WorkbenchHoverDelegate } from './vscode/src/vs/platform/hover/browser/hover.js';
16
16
  import { IHoverService } from './vscode/src/vs/platform/hover/browser/hover.service.js';
17
+ import { WorkbenchContextKeysHandler } from './vscode/src/vs/workbench/browser/contextkeys.js';
17
18
 
18
19
  const layoutEmitter = new Emitter();
19
20
  const onLayout = layoutEmitter.event;
@@ -55,6 +56,7 @@ async function startup(instantiationService) {
55
56
  const lifecycleService = accessor.get(ILifecycleService);
56
57
  Registry.as(Extensions.Workbench).start(accessor);
57
58
  Registry.as(EditorExtensions.EditorFactory).start(accessor);
59
+ accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler);
58
60
  layoutEmitter.fire(accessor);
59
61
  renderWorkbenchEmitter.fire(accessor);
60
62
  await Promise.race([accessor.get(IWorkbenchLayoutService).whenRestored, timeout(2000)]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "17.1.2",
3
+ "version": "17.1.3",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],
@@ -15,13 +15,13 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-base-service-override": "17.1.2",
19
- "@codingame/monaco-vscode-environment-service-override": "17.1.2",
20
- "@codingame/monaco-vscode-extensions-service-override": "17.1.2",
21
- "@codingame/monaco-vscode-files-service-override": "17.1.2",
22
- "@codingame/monaco-vscode-host-service-override": "17.1.2",
23
- "@codingame/monaco-vscode-layout-service-override": "17.1.2",
24
- "@codingame/monaco-vscode-quickaccess-service-override": "17.1.2",
18
+ "@codingame/monaco-vscode-base-service-override": "17.1.3",
19
+ "@codingame/monaco-vscode-environment-service-override": "17.1.3",
20
+ "@codingame/monaco-vscode-extensions-service-override": "17.1.3",
21
+ "@codingame/monaco-vscode-files-service-override": "17.1.3",
22
+ "@codingame/monaco-vscode-host-service-override": "17.1.3",
23
+ "@codingame/monaco-vscode-layout-service-override": "17.1.3",
24
+ "@codingame/monaco-vscode-quickaccess-service-override": "17.1.3",
25
25
  "@vscode/iconv-lite-umd": "0.7.0",
26
26
  "dompurify": "3.2.6",
27
27
  "jschardet": "3.1.4",
package/services.d.ts CHANGED
@@ -97,8 +97,8 @@ export { ILocaleService } from "./vscode/src/vs/workbench/services/localization/
97
97
  export { NoOpNotification, NoOpProgress } from "./vscode/src/vs/platform/notification/common/notification.js";
98
98
  export { NotificationsFilter, NotificationPriority, NeverShowAgainScope } from "./vscode/src/vs/platform/notification/common/notification.js";
99
99
  export type { NotificationMessage, INotificationProperties, INeverShowAgainOptions, INotification, INotificationActions, INotificationProgress, INotificationProgressProperties, INotificationHandle, IPromptChoice, IPromptChoiceWithMenu, IPromptOptions, IStatusMessageOptions } from "./vscode/src/vs/platform/notification/common/notification.js";
100
- export type { IDialogArgs, DialogType, IDialogResult, IConfirmDialogArgs, IInputDialogArgs, IPromptDialogArgs, IBaseDialogOptions, ICheckbox, ICheckboxResult, IConfirmation, IConfirmationResult, IInput, IInputResult, IInputElement, IPrompt, IPromptResult, IPromptBaseButton, IPromptButton, IPromptCancelButton, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common/vscode/vs/platform/dialogs/common/dialogs";
101
- export type { IDialogHandler, ICustomDialogOptions, ICustomDialogMarkdown } from "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common/vscode/vs/platform/dialogs/common/dialogs";
100
+ export type { IDialogArgs, DialogType, IDialogResult, IConfirmDialogArgs, IInputDialogArgs, IPromptDialogArgs, IBaseDialogOptions, ICheckbox, ICheckboxResult, IConfirmation, IConfirmationResult, IInput, IInputResult, IInputElement, IPrompt, IPromptResult, IPromptBaseButton, IPromptButton, IPromptCancelButton, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/platform/dialogs/common/dialogs";
101
+ export type { IDialogHandler, ICustomDialogOptions, ICustomDialogMarkdown } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/platform/dialogs/common/dialogs";
102
102
  export type { IMarkdownString, MarkdownStringTrustedOptions } from "./vscode/src/vs/base/common/htmlContent.js";
103
103
  export { IActivityService } from "./vscode/src/vs/workbench/services/activity/common/activity.service.js";
104
104
  export type { IBadge } from "@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common/vscode/vs/workbench/services/activity/common/activity";
package/services.js CHANGED
@@ -182,10 +182,10 @@ export { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/k
182
182
  export { ISecretStorageService } from './vscode/src/vs/platform/secrets/common/secrets.service.js';
183
183
  export { ConfigurationTarget } from './vscode/src/vs/platform/configuration/common/configuration.js';
184
184
 
185
- if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.100.2-96059d24-c618-43d0-a4f0-2db455db4fcc") {
186
- throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.100.2-96059d24-c618-43d0-a4f0-2db455db4fcc"}, ${window.monacoVscodeApiBuildId} is already loaded`);
185
+ if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.100.3-02a8a23b-6340-4b94-ae7b-d6a8042935e8") {
186
+ throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.100.3-02a8a23b-6340-4b94-ae7b-d6a8042935e8"}, ${window.monacoVscodeApiBuildId} is already loaded`);
187
187
  }
188
- window.monacoVscodeApiBuildId = "1.100.2-96059d24-c618-43d0-a4f0-2db455db4fcc";
188
+ window.monacoVscodeApiBuildId = "1.100.3-02a8a23b-6340-4b94-ae7b-d6a8042935e8";
189
189
  async function initialize(overrides, container = document.body, configuration = {}, env) {
190
190
  checkServicesNotInitialized();
191
191
  injectCss(container);
@@ -1,6 +1,6 @@
1
1
  import { Event } from "../../../base/common/event.js";
2
2
  import { URI } from "../../../base/common/uri.js";
3
- import { IConfirmation, IConfirmationResult, IPromptWithCustomCancel, IPromptResultWithCancel, IPromptWithDefaultCancel, IPromptResult, IPrompt, IInput, IInputResult, type ConfirmResult, type IOpenDialogOptions, type IPickAndOpenOptions, type ISaveDialogOptions } from "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common/vscode/vs/platform/dialogs/common/dialogs";
3
+ import { IConfirmation, IConfirmationResult, IPromptWithCustomCancel, IPromptResultWithCancel, IPromptWithDefaultCancel, IPromptResult, IPrompt, IInput, IInputResult, type ConfirmResult, type IOpenDialogOptions, type IPickAndOpenOptions, type ISaveDialogOptions } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/platform/dialogs/common/dialogs";
4
4
  export declare const IDialogService: import("../../instantiation/common/instantiation.js").ServiceIdentifier<IDialogService>;
5
5
  export interface IDialogService {
6
6
  readonly _serviceBrand: undefined;
@@ -2,7 +2,7 @@ import { Event } from "../../../base/common/event.js";
2
2
  import { IDisposable } from "../../../base/common/lifecycle.js";
3
3
  import { URI } from "../../../base/common/uri.js";
4
4
  import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspace } from "../../workspace/common/workspace.js";
5
- import { Verbosity, ResourceLabelFormatter, IFormatterChangeEvent } from "@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/label/common/label";
5
+ import { Verbosity, ResourceLabelFormatter, IFormatterChangeEvent } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/label/common/label";
6
6
  export declare const ILabelService: import("../../instantiation/common/instantiation.js").ServiceIdentifier<ILabelService>;
7
7
  export interface ILabelService {
8
8
  readonly _serviceBrand: undefined;
@@ -4,7 +4,7 @@ import { Event } from "../../../base/common/event.js";
4
4
  import { URI } from "../../../base/common/uri.js";
5
5
  import { MessageBoxOptions, MessageBoxReturnValue, OpenDevToolsOptions, OpenDialogOptions, OpenDialogReturnValue, SaveDialogOptions, SaveDialogReturnValue } from "../../../base/parts/sandbox/common/electronTypes.js";
6
6
  import { ISerializableCommandAction } from "../../action/common/action.js";
7
- import { INativeOpenDialogOptions } from "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common/vscode/vs/platform/dialogs/common/dialogs";
7
+ import { INativeOpenDialogOptions } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/platform/dialogs/common/dialogs";
8
8
  import { IV8Profile } from "../../profiling/common/profiling.js";
9
9
  import { AuthInfo, Credentials } from "../../request/common/request.js";
10
10
  import { IPartsSplash } from "../../theme/common/themeService.js";
@@ -4,9 +4,9 @@ import productJson from '../../../../../product.json.js';
4
4
  var product = {
5
5
  ...productJson,
6
6
  quality: 'stable',
7
- version: '1.100.2',
8
- commit: '848b80aeb52026648a8ff9f7c45a9b0a80641e2e',
9
- date: '2025-05-27T15:32:23.832Z',
7
+ version: '1.100.3',
8
+ commit: '258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3',
9
+ date: '2025-06-04T12:35:19.633Z',
10
10
  ...(globalThis._VSCODE_PRODUCT_JSON ?? {})
11
11
  };
12
12
 
@@ -1,7 +1,7 @@
1
1
  import { VSBufferReadableStream } from "../../../base/common/buffer.js";
2
2
  import { IStringDictionary } from "../../../base/common/collections.js";
3
3
  import { Event } from "../../../base/common/event.js";
4
- import { FormattingOptions } from "@codingame/monaco-vscode-407531d3-fdae-5387-8c41-49ba0e9574b5-common/vscode/vs/base/common/jsonFormatter";
4
+ import { FormattingOptions } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/base/common/jsonFormatter";
5
5
  import { URI } from "../../../base/common/uri.js";
6
6
  import { IHeaders } from "@codingame/monaco-vscode-912ff6c1-e6aa-58cf-bd7f-50cf27bdb591-common/vscode/vs/base/parts/request/common/request";
7
7
  import { ILogService } from "../../log/common/log.service.js";
@@ -0,0 +1,10 @@
1
+ import { URI } from "../../../base/common/uri.js";
2
+ import { IWorkspace } from "./workspace.js";
3
+ export declare function isVirtualResource(resource: URI): boolean;
4
+ export declare function getVirtualWorkspaceLocation(workspace: IWorkspace): {
5
+ scheme: string;
6
+ authority: string;
7
+ } | undefined;
8
+ export declare function getVirtualWorkspaceScheme(workspace: IWorkspace): string | undefined;
9
+ export declare function getVirtualWorkspaceAuthority(workspace: IWorkspace): string | undefined;
10
+ export declare function isVirtualWorkspace(workspace: IWorkspace): boolean;
@@ -0,0 +1,26 @@
1
+
2
+ import { Schemas } from '../../../base/common/network.js';
3
+
4
+ function isVirtualResource(resource) {
5
+ return resource.scheme !== Schemas.file && resource.scheme !== Schemas.vscodeRemote;
6
+ }
7
+ function getVirtualWorkspaceLocation(workspace) {
8
+ if (workspace.folders.length) {
9
+ return workspace.folders.every(f => isVirtualResource(f.uri)) ? workspace.folders[0].uri : undefined;
10
+ }
11
+ else if (workspace.configuration && isVirtualResource(workspace.configuration)) {
12
+ return workspace.configuration;
13
+ }
14
+ return undefined;
15
+ }
16
+ function getVirtualWorkspaceScheme(workspace) {
17
+ return getVirtualWorkspaceLocation(workspace)?.scheme;
18
+ }
19
+ function getVirtualWorkspaceAuthority(workspace) {
20
+ return getVirtualWorkspaceLocation(workspace)?.authority;
21
+ }
22
+ function isVirtualWorkspace(workspace) {
23
+ return getVirtualWorkspaceLocation(workspace) !== undefined;
24
+ }
25
+
26
+ export { getVirtualWorkspaceAuthority, getVirtualWorkspaceLocation, getVirtualWorkspaceScheme, isVirtualResource, isVirtualWorkspace };
@@ -1,8 +1,8 @@
1
1
  import { Event } from "../../../base/common/event.js";
2
2
  import { URI } from "../../../base/common/uri.js";
3
- import { IWorkspaceBackupInfo, IFolderBackupInfo } from "@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/backup/common/backup";
3
+ import { IWorkspaceBackupInfo, IFolderBackupInfo } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/backup/common/backup";
4
4
  import { IWorkspaceIdentifier } from "../../workspace/common/workspace.js";
5
- import { IEnterWorkspaceResult, IWorkspaceFolderCreationData, IRecent, IRecentlyOpened } from "@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/workspaces/common/workspaces";
5
+ import { IEnterWorkspaceResult, IWorkspaceFolderCreationData, IRecent, IRecentlyOpened } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/workspaces/common/workspaces";
6
6
  export declare const IWorkspacesService: import("../../instantiation/common/instantiation.js").ServiceIdentifier<IWorkspacesService>;
7
7
  export interface IWorkspacesService {
8
8
  readonly _serviceBrand: undefined;
@@ -29,7 +29,7 @@ import { ConfigurationScope } from "../../../platform/configuration/common/confi
29
29
  import { IExtensionIdWithVersion } from "@codingame/monaco-vscode-a2719803-af40-5ae9-a29f-8a2231c33056-common/vscode/vs/platform/extensionManagement/common/extensionStorage";
30
30
  import { ExtensionIdentifier, IExtensionDescription } from "../../../platform/extensions/common/extensions.js";
31
31
  import * as files from "../../../platform/files/common/files.js";
32
- import { ResourceLabelFormatter } from "@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/label/common/label";
32
+ import { ResourceLabelFormatter } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/label/common/label";
33
33
  import { ILoggerOptions, ILoggerResource, LogLevel } from "../../../platform/log/common/log.js";
34
34
  import { IMarkerData } from "../../../platform/markers/common/markers.js";
35
35
  import { IProgressOptions, IProgressStep } from "../../../platform/progress/common/progress.js";
@@ -1,4 +1,4 @@
1
- import { ResourceLabelFormatter } from "@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/label/common/label";
1
+ import { ResourceLabelFormatter } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/label/common/label";
2
2
  import { IDisposable } from "../../../base/common/lifecycle.js";
3
3
  import { ExtHostLabelServiceShape, IMainContext } from "./extHost.protocol.js";
4
4
  export declare class ExtHostLabelService implements ExtHostLabelServiceShape {
@@ -0,0 +1,67 @@
1
+ import { Disposable } from "../../base/common/lifecycle.js";
2
+ import { IContextKeyService } from "../../platform/contextkey/common/contextkey.service.js";
3
+ import { IEditorGroupsService } from "../services/editor/common/editorGroupsService.service.js";
4
+ import { IConfigurationService } from "../../platform/configuration/common/configuration.service.js";
5
+ import { IWorkbenchEnvironmentService } from "../services/environment/common/environmentService.service.js";
6
+ import { IWorkspaceContextService } from "../../platform/workspace/common/workspace.service.js";
7
+ import { IWorkbenchLayoutService } from "../services/layout/browser/layoutService.service.js";
8
+ import { IWorkingCopyService } from "../services/workingCopy/common/workingCopyService.service.js";
9
+ import { IPaneCompositePartService } from "../services/panecomposite/browser/panecomposite.service.js";
10
+ import { IProductService } from "../../platform/product/common/productService.service.js";
11
+ import { IEditorService } from "../services/editor/common/editorService.service.js";
12
+ export declare class WorkbenchContextKeysHandler extends Disposable {
13
+ private readonly contextKeyService;
14
+ private readonly contextService;
15
+ private readonly configurationService;
16
+ private readonly environmentService;
17
+ private readonly productService;
18
+ private readonly editorGroupService;
19
+ private readonly editorService;
20
+ private readonly layoutService;
21
+ private readonly paneCompositeService;
22
+ private readonly workingCopyService;
23
+ private inputFocusedContext;
24
+ private dirtyWorkingCopiesContext;
25
+ private activeEditorGroupEmpty;
26
+ private activeEditorGroupIndex;
27
+ private activeEditorGroupLast;
28
+ private activeEditorGroupLocked;
29
+ private multipleEditorGroupsContext;
30
+ private editorsVisibleContext;
31
+ private splitEditorsVerticallyContext;
32
+ private workbenchStateContext;
33
+ private workspaceFolderCountContext;
34
+ private openFolderWorkspaceSupportContext;
35
+ private enterMultiRootWorkspaceSupportContext;
36
+ private emptyWorkspaceSupportContext;
37
+ private virtualWorkspaceContext;
38
+ private temporaryWorkspaceContext;
39
+ private inZenModeContext;
40
+ private isMainWindowFullscreenContext;
41
+ private isAuxiliaryWindowFocusedContext;
42
+ private isMainEditorCenteredLayoutContext;
43
+ private sideBarVisibleContext;
44
+ private mainEditorAreaVisibleContext;
45
+ private panelPositionContext;
46
+ private panelVisibleContext;
47
+ private panelAlignmentContext;
48
+ private panelMaximizedContext;
49
+ private auxiliaryBarVisibleContext;
50
+ private editorTabsVisibleContext;
51
+ private titleAreaVisibleContext;
52
+ private titleBarStyleContext;
53
+ constructor(contextKeyService: IContextKeyService, contextService: IWorkspaceContextService, configurationService: IConfigurationService, environmentService: IWorkbenchEnvironmentService, productService: IProductService, editorGroupService: IEditorGroupsService, editorService: IEditorService, layoutService: IWorkbenchLayoutService, paneCompositeService: IPaneCompositePartService, workingCopyService: IWorkingCopyService);
54
+ private registerListeners;
55
+ private updateVisiblePanesContextKeys;
56
+ private updateActiveEditorGroupContextKeys;
57
+ private updateEditorGroupsContextKeys;
58
+ private updateEditorAreaContextKeys;
59
+ private updateInputContextKeys;
60
+ private updateWorkbenchStateContextKey;
61
+ private updateWorkspaceFolderCountContextKey;
62
+ private updateSplitEditorsVerticallyContext;
63
+ private getWorkbenchStateString;
64
+ private updateSideBarContextKeys;
65
+ private updateTitleBarContextKeys;
66
+ private updateWorkspaceContextKeys;
67
+ }
@@ -0,0 +1,241 @@
1
+
2
+ import { __decorate, __param } from '../../../../../external/tslib/tslib.es6.js';
3
+ import { Event } from '../../base/common/event.js';
4
+ import { Disposable } from '../../base/common/lifecycle.js';
5
+ import { setConstant } from '../../platform/contextkey/common/contextkey.js';
6
+ import { IContextKeyService } from '../../platform/contextkey/common/contextkey.service.js';
7
+ import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsIOSContext, IsMobileContext, IsDevelopmentContext, ProductQualityContext, InputFocusedContext } from '../../platform/contextkey/common/contextkeys.js';
8
+ import { RemoteNameContext, VirtualWorkspaceContext, TemporaryWorkspaceContext, HasWebFileSystemAccess, EmbedderIdentifierContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, EditorsVisibleContext, DirtyWorkingCopiesContext, WorkbenchStateContext, WorkspaceFolderCountContext, OpenFolderWorkspaceSupportContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, SplitEditorsVertically, IsMainWindowFullscreenContext, IsAuxiliaryWindowFocusedContext, InEditorZenModeContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, EditorTabsVisibleContext, SideBarVisibleContext, TitleBarVisibleContext, TitleBarStyleContext, PanelPositionContext, PanelVisibleContext, PanelMaximizedContext, PanelAlignmentContext, AuxiliaryBarVisibleContext } from '../common/contextkeys.js';
9
+ import { onDidRegisterWindow, addDisposableListener, EventType, isEditableElement, trackFocus, getActiveWindow } from '../../base/browser/dom.js';
10
+ import { preferredSideBySideGroupDirection, GroupDirection } from '../services/editor/common/editorGroupsService.js';
11
+ import { IEditorGroupsService } from '../services/editor/common/editorGroupsService.service.js';
12
+ import { IConfigurationService } from '../../platform/configuration/common/configuration.service.js';
13
+ import { IWorkbenchEnvironmentService } from '../services/environment/common/environmentService.service.js';
14
+ import { WorkbenchState, isTemporaryWorkspace } from '../../platform/workspace/common/workspace.js';
15
+ import { IWorkspaceContextService } from '../../platform/workspace/common/workspace.service.js';
16
+ import { positionToString, Parts } from '../services/layout/browser/layoutService.js';
17
+ import { IWorkbenchLayoutService } from '../services/layout/browser/layoutService.service.js';
18
+ import { getRemoteName } from '../../platform/remote/common/remoteHosts.js';
19
+ import { getVirtualWorkspaceScheme } from '../../platform/workspace/common/virtualWorkspace.js';
20
+ import { IWorkingCopyService } from '../services/workingCopy/common/workingCopyService.service.js';
21
+ import { isNative } from '../../base/common/platform.js';
22
+ import { IPaneCompositePartService } from '../services/panecomposite/browser/panecomposite.service.js';
23
+ import { WebFileSystemAccess } from '../../platform/files/browser/webFileSystemAccess.js';
24
+ import { IProductService } from '../../platform/product/common/productService.service.js';
25
+ import { getTitleBarStyle } from '../../platform/window/common/window.js';
26
+ import { mainWindow } from '../../base/browser/window.js';
27
+ import { onDidChangeFullscreen, isFullscreen } from '../../base/browser/browser.js';
28
+ import { IEditorService } from '../services/editor/common/editorService.service.js';
29
+
30
+ let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disposable {
31
+ constructor(contextKeyService, contextService, configurationService, environmentService, productService, editorGroupService, editorService, layoutService, paneCompositeService, workingCopyService) {
32
+ super();
33
+ this.contextKeyService = contextKeyService;
34
+ this.contextService = contextService;
35
+ this.configurationService = configurationService;
36
+ this.environmentService = environmentService;
37
+ this.productService = productService;
38
+ this.editorGroupService = editorGroupService;
39
+ this.editorService = editorService;
40
+ this.layoutService = layoutService;
41
+ this.paneCompositeService = paneCompositeService;
42
+ this.workingCopyService = workingCopyService;
43
+ IsMacContext.bindTo(this.contextKeyService);
44
+ IsLinuxContext.bindTo(this.contextKeyService);
45
+ IsWindowsContext.bindTo(this.contextKeyService);
46
+ IsWebContext.bindTo(this.contextKeyService);
47
+ IsMacNativeContext.bindTo(this.contextKeyService);
48
+ IsIOSContext.bindTo(this.contextKeyService);
49
+ IsMobileContext.bindTo(this.contextKeyService);
50
+ RemoteNameContext.bindTo(this.contextKeyService).set(getRemoteName(this.environmentService.remoteAuthority) || '');
51
+ this.virtualWorkspaceContext = VirtualWorkspaceContext.bindTo(this.contextKeyService);
52
+ this.temporaryWorkspaceContext = TemporaryWorkspaceContext.bindTo(this.contextKeyService);
53
+ this.updateWorkspaceContextKeys();
54
+ HasWebFileSystemAccess.bindTo(this.contextKeyService).set(WebFileSystemAccess.supported(mainWindow));
55
+ const isDevelopment = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment;
56
+ IsDevelopmentContext.bindTo(this.contextKeyService).set(isDevelopment);
57
+ setConstant(IsDevelopmentContext.key, isDevelopment);
58
+ ProductQualityContext.bindTo(this.contextKeyService).set(this.productService.quality || '');
59
+ EmbedderIdentifierContext.bindTo(this.contextKeyService).set(productService.embedderIdentifier);
60
+ this.activeEditorGroupEmpty = ActiveEditorGroupEmptyContext.bindTo(this.contextKeyService);
61
+ this.activeEditorGroupIndex = ActiveEditorGroupIndexContext.bindTo(this.contextKeyService);
62
+ this.activeEditorGroupLast = ActiveEditorGroupLastContext.bindTo(this.contextKeyService);
63
+ this.activeEditorGroupLocked = ActiveEditorGroupLockedContext.bindTo(this.contextKeyService);
64
+ this.multipleEditorGroupsContext = MultipleEditorGroupsContext.bindTo(this.contextKeyService);
65
+ this.editorsVisibleContext = EditorsVisibleContext.bindTo(this.contextKeyService);
66
+ this.dirtyWorkingCopiesContext = DirtyWorkingCopiesContext.bindTo(this.contextKeyService);
67
+ this.dirtyWorkingCopiesContext.set(this.workingCopyService.hasDirty);
68
+ this.inputFocusedContext = InputFocusedContext.bindTo(this.contextKeyService);
69
+ this.workbenchStateContext = WorkbenchStateContext.bindTo(this.contextKeyService);
70
+ this.updateWorkbenchStateContextKey();
71
+ this.workspaceFolderCountContext = WorkspaceFolderCountContext.bindTo(this.contextKeyService);
72
+ this.updateWorkspaceFolderCountContextKey();
73
+ this.openFolderWorkspaceSupportContext = OpenFolderWorkspaceSupportContext.bindTo(this.contextKeyService);
74
+ this.openFolderWorkspaceSupportContext.set(isNative || typeof this.environmentService.remoteAuthority === 'string');
75
+ this.emptyWorkspaceSupportContext = EmptyWorkspaceSupportContext.bindTo(this.contextKeyService);
76
+ this.emptyWorkspaceSupportContext.set(isNative || typeof this.environmentService.remoteAuthority === 'string');
77
+ this.enterMultiRootWorkspaceSupportContext = EnterMultiRootWorkspaceSupportContext.bindTo(this.contextKeyService);
78
+ this.enterMultiRootWorkspaceSupportContext.set(isNative || typeof this.environmentService.remoteAuthority === 'string');
79
+ this.splitEditorsVerticallyContext = SplitEditorsVertically.bindTo(this.contextKeyService);
80
+ this.updateSplitEditorsVerticallyContext();
81
+ this.isMainWindowFullscreenContext = IsMainWindowFullscreenContext.bindTo(this.contextKeyService);
82
+ this.isAuxiliaryWindowFocusedContext = IsAuxiliaryWindowFocusedContext.bindTo(this.contextKeyService);
83
+ this.inZenModeContext = InEditorZenModeContext.bindTo(this.contextKeyService);
84
+ this.isMainEditorCenteredLayoutContext = IsMainEditorCenteredLayoutContext.bindTo(this.contextKeyService);
85
+ this.mainEditorAreaVisibleContext = MainEditorAreaVisibleContext.bindTo(this.contextKeyService);
86
+ this.editorTabsVisibleContext = EditorTabsVisibleContext.bindTo(this.contextKeyService);
87
+ this.sideBarVisibleContext = SideBarVisibleContext.bindTo(this.contextKeyService);
88
+ this.titleAreaVisibleContext = TitleBarVisibleContext.bindTo(this.contextKeyService);
89
+ this.titleBarStyleContext = TitleBarStyleContext.bindTo(this.contextKeyService);
90
+ this.updateTitleBarContextKeys();
91
+ this.panelPositionContext = PanelPositionContext.bindTo(this.contextKeyService);
92
+ this.panelPositionContext.set(positionToString(this.layoutService.getPanelPosition()));
93
+ this.panelVisibleContext = PanelVisibleContext.bindTo(this.contextKeyService);
94
+ this.panelVisibleContext.set(this.layoutService.isVisible(Parts.PANEL_PART));
95
+ this.panelMaximizedContext = PanelMaximizedContext.bindTo(this.contextKeyService);
96
+ this.panelMaximizedContext.set(this.layoutService.isPanelMaximized());
97
+ this.panelAlignmentContext = PanelAlignmentContext.bindTo(this.contextKeyService);
98
+ this.panelAlignmentContext.set(this.layoutService.getPanelAlignment());
99
+ this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService);
100
+ this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART));
101
+ this.registerListeners();
102
+ }
103
+ registerListeners() {
104
+ this.editorGroupService.whenReady.then(() => {
105
+ this.updateEditorAreaContextKeys();
106
+ this.updateActiveEditorGroupContextKeys();
107
+ this.updateVisiblePanesContextKeys();
108
+ });
109
+ this._register(this.editorService.onDidActiveEditorChange(() => this.updateActiveEditorGroupContextKeys()));
110
+ this._register(this.editorService.onDidVisibleEditorsChange(() => this.updateVisiblePanesContextKeys()));
111
+ this._register(this.editorGroupService.onDidAddGroup(() => this.updateEditorGroupsContextKeys()));
112
+ this._register(this.editorGroupService.onDidRemoveGroup(() => this.updateEditorGroupsContextKeys()));
113
+ this._register(this.editorGroupService.onDidChangeGroupIndex(() => this.updateActiveEditorGroupContextKeys()));
114
+ this._register(this.editorGroupService.onDidChangeGroupLocked(() => this.updateActiveEditorGroupContextKeys()));
115
+ this._register(this.editorGroupService.onDidChangeEditorPartOptions(() => this.updateEditorAreaContextKeys()));
116
+ this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => disposables.add(addDisposableListener(window, EventType.FOCUS_IN, () => this.updateInputContextKeys(window.document, disposables), true)), { window: mainWindow, disposables: this._store }));
117
+ this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateWorkbenchStateContextKey()));
118
+ this._register(this.contextService.onDidChangeWorkspaceFolders(() => {
119
+ this.updateWorkspaceFolderCountContextKey();
120
+ this.updateWorkspaceContextKeys();
121
+ }));
122
+ this._register(this.configurationService.onDidChangeConfiguration(e => {
123
+ if (e.affectsConfiguration('workbench.editor.openSideBySideDirection')) {
124
+ this.updateSplitEditorsVerticallyContext();
125
+ }
126
+ }));
127
+ this._register(this.layoutService.onDidChangeZenMode(enabled => this.inZenModeContext.set(enabled)));
128
+ this._register(this.layoutService.onDidChangeActiveContainer(() => this.isAuxiliaryWindowFocusedContext.set(this.layoutService.activeContainer !== this.layoutService.mainContainer)));
129
+ this._register(onDidChangeFullscreen(windowId => {
130
+ if (windowId === mainWindow.vscodeWindowId) {
131
+ this.isMainWindowFullscreenContext.set(isFullscreen(mainWindow));
132
+ }
133
+ }));
134
+ this._register(this.layoutService.onDidChangeMainEditorCenteredLayout(centered => this.isMainEditorCenteredLayoutContext.set(centered)));
135
+ this._register(this.layoutService.onDidChangePanelPosition(position => this.panelPositionContext.set(position)));
136
+ this._register(this.layoutService.onDidChangePanelAlignment(alignment => this.panelAlignmentContext.set(alignment)));
137
+ this._register(this.paneCompositeService.onDidPaneCompositeClose(() => this.updateSideBarContextKeys()));
138
+ this._register(this.paneCompositeService.onDidPaneCompositeOpen(() => this.updateSideBarContextKeys()));
139
+ this._register(this.layoutService.onDidChangePartVisibility(() => {
140
+ this.mainEditorAreaVisibleContext.set(this.layoutService.isVisible(Parts.EDITOR_PART, mainWindow));
141
+ this.panelVisibleContext.set(this.layoutService.isVisible(Parts.PANEL_PART));
142
+ this.panelMaximizedContext.set(this.layoutService.isPanelMaximized());
143
+ this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART));
144
+ this.updateTitleBarContextKeys();
145
+ }));
146
+ this._register(this.workingCopyService.onDidChangeDirty(workingCopy => this.dirtyWorkingCopiesContext.set(workingCopy.isDirty() || this.workingCopyService.hasDirty)));
147
+ }
148
+ updateVisiblePanesContextKeys() {
149
+ const visibleEditorPanes = this.editorService.visibleEditorPanes;
150
+ if (visibleEditorPanes.length > 0) {
151
+ this.editorsVisibleContext.set(true);
152
+ }
153
+ else {
154
+ this.editorsVisibleContext.reset();
155
+ }
156
+ }
157
+ updateActiveEditorGroupContextKeys() {
158
+ if (!this.editorService.activeEditor) {
159
+ this.activeEditorGroupEmpty.set(true);
160
+ }
161
+ else {
162
+ this.activeEditorGroupEmpty.reset();
163
+ }
164
+ const activeGroup = this.editorGroupService.activeGroup;
165
+ this.activeEditorGroupIndex.set(activeGroup.index + 1);
166
+ this.activeEditorGroupLocked.set(activeGroup.isLocked);
167
+ this.updateEditorGroupsContextKeys();
168
+ }
169
+ updateEditorGroupsContextKeys() {
170
+ const groupCount = this.editorGroupService.count;
171
+ if (groupCount > 1) {
172
+ this.multipleEditorGroupsContext.set(true);
173
+ }
174
+ else {
175
+ this.multipleEditorGroupsContext.reset();
176
+ }
177
+ const activeGroup = this.editorGroupService.activeGroup;
178
+ this.activeEditorGroupLast.set(activeGroup.index === groupCount - 1);
179
+ }
180
+ updateEditorAreaContextKeys() {
181
+ this.editorTabsVisibleContext.set(this.editorGroupService.partOptions.showTabs === 'multiple');
182
+ }
183
+ updateInputContextKeys(ownerDocument, disposables) {
184
+ function activeElementIsInput() {
185
+ return !!ownerDocument.activeElement && isEditableElement(ownerDocument.activeElement);
186
+ }
187
+ const isInputFocused = activeElementIsInput();
188
+ this.inputFocusedContext.set(isInputFocused);
189
+ if (isInputFocused) {
190
+ const tracker = disposables.add(trackFocus(ownerDocument.activeElement));
191
+ Event.once(tracker.onDidBlur)(() => {
192
+ if (getActiveWindow().document === ownerDocument) {
193
+ this.inputFocusedContext.set(activeElementIsInput());
194
+ }
195
+ tracker.dispose();
196
+ }, undefined, disposables);
197
+ }
198
+ }
199
+ updateWorkbenchStateContextKey() {
200
+ this.workbenchStateContext.set(this.getWorkbenchStateString());
201
+ }
202
+ updateWorkspaceFolderCountContextKey() {
203
+ this.workspaceFolderCountContext.set(this.contextService.getWorkspace().folders.length);
204
+ }
205
+ updateSplitEditorsVerticallyContext() {
206
+ const direction = preferredSideBySideGroupDirection(this.configurationService);
207
+ this.splitEditorsVerticallyContext.set(direction === GroupDirection.DOWN);
208
+ }
209
+ getWorkbenchStateString() {
210
+ switch (this.contextService.getWorkbenchState()) {
211
+ case WorkbenchState.EMPTY: return 'empty';
212
+ case WorkbenchState.FOLDER: return 'folder';
213
+ case WorkbenchState.WORKSPACE: return 'workspace';
214
+ }
215
+ }
216
+ updateSideBarContextKeys() {
217
+ this.sideBarVisibleContext.set(this.layoutService.isVisible(Parts.SIDEBAR_PART));
218
+ }
219
+ updateTitleBarContextKeys() {
220
+ this.titleAreaVisibleContext.set(this.layoutService.isVisible(Parts.TITLEBAR_PART, mainWindow));
221
+ this.titleBarStyleContext.set(getTitleBarStyle(this.configurationService));
222
+ }
223
+ updateWorkspaceContextKeys() {
224
+ this.virtualWorkspaceContext.set(getVirtualWorkspaceScheme(this.contextService.getWorkspace()) || '');
225
+ this.temporaryWorkspaceContext.set(isTemporaryWorkspace(this.contextService.getWorkspace()));
226
+ }
227
+ };
228
+ WorkbenchContextKeysHandler = ( __decorate([
229
+ ( __param(0, IContextKeyService)),
230
+ ( __param(1, IWorkspaceContextService)),
231
+ ( __param(2, IConfigurationService)),
232
+ ( __param(3, IWorkbenchEnvironmentService)),
233
+ ( __param(4, IProductService)),
234
+ ( __param(5, IEditorGroupsService)),
235
+ ( __param(6, IEditorService)),
236
+ ( __param(7, IWorkbenchLayoutService)),
237
+ ( __param(8, IPaneCompositePartService)),
238
+ ( __param(9, IWorkingCopyService))
239
+ ], WorkbenchContextKeysHandler));
240
+
241
+ export { WorkbenchContextKeysHandler };
@@ -1,7 +1,7 @@
1
1
  import { Emitter } from "../../../base/common/event.js";
2
2
  import { URI } from "../../../base/common/uri.js";
3
3
  import { EditorInputCapabilities, Verbosity, GroupIdentifier, ISaveOptions, IRevertOptions, IMoveResult, IEditorDescriptor, IEditorPane, IUntypedEditorInput, AbstractEditorInput, IEditorIdentifier } from "../editor.js";
4
- import { ConfirmResult } from "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common/vscode/vs/platform/dialogs/common/dialogs";
4
+ import { ConfirmResult } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/platform/dialogs/common/dialogs";
5
5
  import { IMarkdownString } from "../../../base/common/htmlContent.js";
6
6
  import { IDisposable } from "../../../base/common/lifecycle.js";
7
7
  import { ThemeIcon } from "../../../base/common/themables.js";
@@ -0,0 +1,64 @@
1
+ import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js";
2
+ export declare enum Parts {
3
+ TITLEBAR_PART = "workbench.parts.titlebar",
4
+ BANNER_PART = "workbench.parts.banner",
5
+ ACTIVITYBAR_PART = "workbench.parts.activitybar",
6
+ SIDEBAR_PART = "workbench.parts.sidebar",
7
+ PANEL_PART = "workbench.parts.panel",
8
+ AUXILIARYBAR_PART = "workbench.parts.auxiliarybar",
9
+ EDITOR_PART = "workbench.parts.editor",
10
+ STATUSBAR_PART = "workbench.parts.statusbar"
11
+ }
12
+ export declare enum ZenModeSettings {
13
+ SHOW_TABS = "zenMode.showTabs",
14
+ HIDE_LINENUMBERS = "zenMode.hideLineNumbers",
15
+ HIDE_STATUSBAR = "zenMode.hideStatusBar",
16
+ HIDE_ACTIVITYBAR = "zenMode.hideActivityBar",
17
+ CENTER_LAYOUT = "zenMode.centerLayout",
18
+ FULLSCREEN = "zenMode.fullScreen",
19
+ RESTORE = "zenMode.restore",
20
+ SILENT_NOTIFICATIONS = "zenMode.silentNotifications"
21
+ }
22
+ export declare enum LayoutSettings {
23
+ ACTIVITY_BAR_LOCATION = "workbench.activityBar.location",
24
+ EDITOR_TABS_MODE = "workbench.editor.showTabs",
25
+ EDITOR_ACTIONS_LOCATION = "workbench.editor.editorActionsLocation",
26
+ COMMAND_CENTER = "window.commandCenter",
27
+ LAYOUT_ACTIONS = "workbench.layoutControl.enabled"
28
+ }
29
+ export declare enum ActivityBarPosition {
30
+ DEFAULT = "default",
31
+ TOP = "top",
32
+ BOTTOM = "bottom",
33
+ HIDDEN = "hidden"
34
+ }
35
+ export declare enum EditorTabsMode {
36
+ MULTIPLE = "multiple",
37
+ SINGLE = "single",
38
+ NONE = "none"
39
+ }
40
+ export declare enum EditorActionsLocation {
41
+ DEFAULT = "default",
42
+ TITLEBAR = "titleBar",
43
+ HIDDEN = "hidden"
44
+ }
45
+ export declare enum Position {
46
+ LEFT = 0,
47
+ RIGHT = 1,
48
+ BOTTOM = 2,
49
+ TOP = 3
50
+ }
51
+ export declare function isHorizontal(position: Position): boolean;
52
+ export declare enum PanelOpensMaximizedOptions {
53
+ ALWAYS = 0,
54
+ NEVER = 1,
55
+ REMEMBER_LAST = 2
56
+ }
57
+ export type PanelAlignment = "left" | "center" | "right" | "justify";
58
+ export declare function positionToString(position: Position): string;
59
+ export declare function positionFromString(str: string): Position;
60
+ export declare function panelOpensMaximizedFromString(str: string): PanelOpensMaximizedOptions;
61
+ export type MULTI_WINDOW_PARTS = Parts.EDITOR_PART | Parts.STATUSBAR_PART | Parts.TITLEBAR_PART;
62
+ export type SINGLE_WINDOW_PARTS = Exclude<Parts, MULTI_WINDOW_PARTS>;
63
+ export declare function isMultiWindowPart(part: Parts): part is MULTI_WINDOW_PARTS;
64
+ export declare function shouldShowCustomTitleBar(configurationService: IConfigurationService, window: Window, menuBarToggled?: boolean): boolean;
@@ -0,0 +1,169 @@
1
+
2
+ import { isWeb, isMacintosh, isNative } from '../../../../base/common/platform.js';
3
+ import { isAuxiliaryWindow } from '../../../../base/browser/window.js';
4
+ import { hasNativeTitlebar, TitleBarSetting, CustomTitleBarVisibility, getMenuBarVisibility } from '../../../../platform/window/common/window.js';
5
+ import { isFullscreen, isWCOEnabled } from '../../../../base/browser/browser.js';
6
+
7
+ var Parts;
8
+ (function (Parts) {
9
+ Parts["TITLEBAR_PART"] = "workbench.parts.titlebar";
10
+ Parts["BANNER_PART"] = "workbench.parts.banner";
11
+ Parts["ACTIVITYBAR_PART"] = "workbench.parts.activitybar";
12
+ Parts["SIDEBAR_PART"] = "workbench.parts.sidebar";
13
+ Parts["PANEL_PART"] = "workbench.parts.panel";
14
+ Parts["AUXILIARYBAR_PART"] = "workbench.parts.auxiliarybar";
15
+ Parts["EDITOR_PART"] = "workbench.parts.editor";
16
+ Parts["STATUSBAR_PART"] = "workbench.parts.statusbar";
17
+ })(Parts || (Parts = {}));
18
+ var ZenModeSettings;
19
+ (function (ZenModeSettings) {
20
+ ZenModeSettings["SHOW_TABS"] = "zenMode.showTabs";
21
+ ZenModeSettings["HIDE_LINENUMBERS"] = "zenMode.hideLineNumbers";
22
+ ZenModeSettings["HIDE_STATUSBAR"] = "zenMode.hideStatusBar";
23
+ ZenModeSettings["HIDE_ACTIVITYBAR"] = "zenMode.hideActivityBar";
24
+ ZenModeSettings["CENTER_LAYOUT"] = "zenMode.centerLayout";
25
+ ZenModeSettings["FULLSCREEN"] = "zenMode.fullScreen";
26
+ ZenModeSettings["RESTORE"] = "zenMode.restore";
27
+ ZenModeSettings["SILENT_NOTIFICATIONS"] = "zenMode.silentNotifications";
28
+ })(ZenModeSettings || (ZenModeSettings = {}));
29
+ var LayoutSettings;
30
+ (function (LayoutSettings) {
31
+ LayoutSettings["ACTIVITY_BAR_LOCATION"] = "workbench.activityBar.location";
32
+ LayoutSettings["EDITOR_TABS_MODE"] = "workbench.editor.showTabs";
33
+ LayoutSettings["EDITOR_ACTIONS_LOCATION"] = "workbench.editor.editorActionsLocation";
34
+ LayoutSettings["COMMAND_CENTER"] = "window.commandCenter";
35
+ LayoutSettings["LAYOUT_ACTIONS"] = "workbench.layoutControl.enabled";
36
+ })(LayoutSettings || (LayoutSettings = {}));
37
+ var ActivityBarPosition;
38
+ (function (ActivityBarPosition) {
39
+ ActivityBarPosition["DEFAULT"] = "default";
40
+ ActivityBarPosition["TOP"] = "top";
41
+ ActivityBarPosition["BOTTOM"] = "bottom";
42
+ ActivityBarPosition["HIDDEN"] = "hidden";
43
+ })(ActivityBarPosition || (ActivityBarPosition = {}));
44
+ var EditorTabsMode;
45
+ (function (EditorTabsMode) {
46
+ EditorTabsMode["MULTIPLE"] = "multiple";
47
+ EditorTabsMode["SINGLE"] = "single";
48
+ EditorTabsMode["NONE"] = "none";
49
+ })(EditorTabsMode || (EditorTabsMode = {}));
50
+ var EditorActionsLocation;
51
+ (function (EditorActionsLocation) {
52
+ EditorActionsLocation["DEFAULT"] = "default";
53
+ EditorActionsLocation["TITLEBAR"] = "titleBar";
54
+ EditorActionsLocation["HIDDEN"] = "hidden";
55
+ })(EditorActionsLocation || (EditorActionsLocation = {}));
56
+ var Position;
57
+ (function (Position) {
58
+ Position[Position["LEFT"] = 0] = "LEFT";
59
+ Position[Position["RIGHT"] = 1] = "RIGHT";
60
+ Position[Position["BOTTOM"] = 2] = "BOTTOM";
61
+ Position[Position["TOP"] = 3] = "TOP";
62
+ })(Position || (Position = {}));
63
+ function isHorizontal(position) {
64
+ return position === Position.BOTTOM || position === Position.TOP;
65
+ }
66
+ var PanelOpensMaximizedOptions;
67
+ (function (PanelOpensMaximizedOptions) {
68
+ PanelOpensMaximizedOptions[PanelOpensMaximizedOptions["ALWAYS"] = 0] = "ALWAYS";
69
+ PanelOpensMaximizedOptions[PanelOpensMaximizedOptions["NEVER"] = 1] = "NEVER";
70
+ PanelOpensMaximizedOptions[PanelOpensMaximizedOptions["REMEMBER_LAST"] = 2] = "REMEMBER_LAST";
71
+ })(PanelOpensMaximizedOptions || (PanelOpensMaximizedOptions = {}));
72
+ function positionToString(position) {
73
+ switch (position) {
74
+ case Position.LEFT: return 'left';
75
+ case Position.RIGHT: return 'right';
76
+ case Position.BOTTOM: return 'bottom';
77
+ case Position.TOP: return 'top';
78
+ default: return 'bottom';
79
+ }
80
+ }
81
+ const positionsByString = {
82
+ [positionToString(Position.LEFT)]: Position.LEFT,
83
+ [positionToString(Position.RIGHT)]: Position.RIGHT,
84
+ [positionToString(Position.BOTTOM)]: Position.BOTTOM,
85
+ [positionToString(Position.TOP)]: Position.TOP
86
+ };
87
+ function positionFromString(str) {
88
+ return positionsByString[str];
89
+ }
90
+ function panelOpensMaximizedSettingToString(setting) {
91
+ switch (setting) {
92
+ case PanelOpensMaximizedOptions.ALWAYS: return 'always';
93
+ case PanelOpensMaximizedOptions.NEVER: return 'never';
94
+ case PanelOpensMaximizedOptions.REMEMBER_LAST: return 'preserve';
95
+ default: return 'preserve';
96
+ }
97
+ }
98
+ const panelOpensMaximizedByString = {
99
+ [panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.ALWAYS)]: PanelOpensMaximizedOptions.ALWAYS,
100
+ [panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.NEVER)]: PanelOpensMaximizedOptions.NEVER,
101
+ [panelOpensMaximizedSettingToString(PanelOpensMaximizedOptions.REMEMBER_LAST)]: PanelOpensMaximizedOptions.REMEMBER_LAST
102
+ };
103
+ function panelOpensMaximizedFromString(str) {
104
+ return panelOpensMaximizedByString[str];
105
+ }
106
+ function isMultiWindowPart(part) {
107
+ return part === Parts.EDITOR_PART ||
108
+ part === Parts.STATUSBAR_PART ||
109
+ part === Parts.TITLEBAR_PART;
110
+ }
111
+ function shouldShowCustomTitleBar(configurationService, window, menuBarToggled) {
112
+ const inFullscreen = isFullscreen(window);
113
+ const nativeTitleBarEnabled = hasNativeTitlebar(configurationService);
114
+ if (!isWeb) {
115
+ const showCustomTitleBar = configurationService.getValue(TitleBarSetting.CUSTOM_TITLE_BAR_VISIBILITY);
116
+ if (showCustomTitleBar === CustomTitleBarVisibility.NEVER && nativeTitleBarEnabled || showCustomTitleBar === CustomTitleBarVisibility.WINDOWED && inFullscreen) {
117
+ return false;
118
+ }
119
+ }
120
+ if (!isTitleBarEmpty(configurationService)) {
121
+ return true;
122
+ }
123
+ if (nativeTitleBarEnabled) {
124
+ return false;
125
+ }
126
+ if (isMacintosh && isNative) {
127
+ return !inFullscreen;
128
+ }
129
+ if (isNative && !inFullscreen) {
130
+ return true;
131
+ }
132
+ if (isWCOEnabled() && !inFullscreen) {
133
+ return true;
134
+ }
135
+ const menuBarVisibility = !isAuxiliaryWindow(window) ? getMenuBarVisibility(configurationService) : 'hidden';
136
+ switch (menuBarVisibility) {
137
+ case 'classic':
138
+ return !inFullscreen || !!menuBarToggled;
139
+ case 'compact':
140
+ case 'hidden':
141
+ return false;
142
+ case 'toggle':
143
+ return !!menuBarToggled;
144
+ case 'visible':
145
+ return true;
146
+ default:
147
+ return isWeb ? false : !inFullscreen || !!menuBarToggled;
148
+ }
149
+ }
150
+ function isTitleBarEmpty(configurationService) {
151
+ if (configurationService.getValue(LayoutSettings.COMMAND_CENTER)) {
152
+ return false;
153
+ }
154
+ const activityBarPosition = configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION);
155
+ if (activityBarPosition === ActivityBarPosition.TOP || activityBarPosition === ActivityBarPosition.BOTTOM) {
156
+ return false;
157
+ }
158
+ const editorActionsLocation = configurationService.getValue(LayoutSettings.EDITOR_ACTIONS_LOCATION);
159
+ const editorTabsMode = configurationService.getValue(LayoutSettings.EDITOR_TABS_MODE);
160
+ if (editorActionsLocation === EditorActionsLocation.TITLEBAR || editorActionsLocation === EditorActionsLocation.DEFAULT && editorTabsMode === EditorTabsMode.NONE) {
161
+ return false;
162
+ }
163
+ if (configurationService.getValue(LayoutSettings.LAYOUT_ACTIONS)) {
164
+ return false;
165
+ }
166
+ return true;
167
+ }
168
+
169
+ export { ActivityBarPosition, EditorActionsLocation, EditorTabsMode, LayoutSettings, PanelOpensMaximizedOptions, Parts, Position, ZenModeSettings, isHorizontal, isMultiWindowPart, panelOpensMaximizedFromString, positionFromString, positionToString, shouldShowCustomTitleBar };
@@ -5,7 +5,7 @@ import { Event } from "../../../../base/common/event.js";
5
5
  import { IDisposable } from "../../../../base/common/lifecycle.js";
6
6
  import { ILayoutService } from "../../../../platform/layout/browser/layoutService.service.js";
7
7
  import { Part } from "@codingame/monaco-vscode-85886bdb-61c5-52f1-8eb7-d1d32f6f8cbd-common/vscode/vs/workbench/browser/part";
8
- import { PanelAlignment, Parts, SINGLE_WINDOW_PARTS, MULTI_WINDOW_PARTS, Position } from "@codingame/monaco-vscode-c8227507-8e59-53d6-b50b-71c0ab384cf4-common/vscode/vs/workbench/services/layout/browser/layoutService";
8
+ import { PanelAlignment, Parts, SINGLE_WINDOW_PARTS, MULTI_WINDOW_PARTS, Position } from "./layoutService.js";
9
9
  export declare const IWorkbenchLayoutService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkbenchLayoutService>;
10
10
  export interface IWorkbenchLayoutService extends ILayoutService {
11
11
  readonly _serviceBrand: undefined;
@@ -2,7 +2,7 @@ import { CancellationToken } from "../../../../base/common/cancellation.js";
2
2
  import { Event } from "../../../../base/common/event.js";
3
3
  import { IDisposable } from "../../../../base/common/lifecycle.js";
4
4
  import { IEditorPane } from "../../../common/editor.js";
5
- import { OutlineTarget, IOutline, IOutlineCreator } from "@codingame/monaco-vscode-bed2b49f-41ae-5ed2-b61a-1105500a3f8a-common/vscode/vs/workbench/services/outline/browser/outline";
5
+ import { OutlineTarget, IOutline, IOutlineCreator } from "@codingame/monaco-vscode-0f262ee3-cace-5644-818e-eba5fe007685-common/vscode/vs/workbench/services/outline/browser/outline";
6
6
  export declare const IOutlineService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IOutlineService>;
7
7
  export interface IOutlineService {
8
8
  _serviceBrand: undefined;
@@ -1,6 +1,6 @@
1
1
  import { URI } from "../../../../base/common/uri.js";
2
2
  import { IWorkspaceIdentifier } from "../../../../platform/workspace/common/workspace.js";
3
- import { IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-2cbab29e-9393-5de6-b701-9a9555360b6b-common/vscode/vs/platform/workspaces/common/workspaces";
3
+ import { IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/workspaces/common/workspaces";
4
4
  export declare const IWorkspaceEditingService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkspaceEditingService>;
5
5
  export interface IWorkspaceEditingService {
6
6
  readonly _serviceBrand: undefined;