import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { IWorkbenchLayoutService } from "./layoutService.service.js"; export declare enum Parts { TITLEBAR_PART = "workbench.parts.titlebar", BANNER_PART = "workbench.parts.banner", ACTIVITYBAR_PART = "workbench.parts.activitybar", SIDEBAR_PART = "workbench.parts.sidebar", PANEL_PART = "workbench.parts.panel", AUXILIARYBAR_PART = "workbench.parts.auxiliarybar", SESSIONS_PART = "workbench.parts.sessions", CUSTOM_VIEW_GRID_PART = "workbench.parts.customViewGrid", EDITOR_PART = "workbench.parts.editor", STATUSBAR_PART = "workbench.parts.statusbar" } export declare enum ZenModeSettings { SHOW_TABS = "zenMode.showTabs", HIDE_LINENUMBERS = "zenMode.hideLineNumbers", HIDE_STATUSBAR = "zenMode.hideStatusBar", HIDE_ACTIVITYBAR = "zenMode.hideActivityBar", CENTER_LAYOUT = "zenMode.centerLayout", FULLSCREEN = "zenMode.fullScreen", RESTORE = "zenMode.restore", SILENT_NOTIFICATIONS = "zenMode.silentNotifications" } export declare enum LayoutSettings { ACTIVITY_BAR_LOCATION = "workbench.activityBar.location", ACTIVITY_BAR_AUTO_HIDE = "workbench.activityBar.autoHide", ACTIVITY_BAR_COMPACT = "workbench.activityBar.compact", EDITOR_TABS_MODE = "workbench.editor.showTabs", EDITOR_ACTIONS_LOCATION = "workbench.editor.editorActionsLocation", COMMAND_CENTER = "window.commandCenter", LAYOUT_ACTIONS = "workbench.layoutControl.enabled", SHADOWS = "workbench.shadows", MODERN_UI = "workbench.experimental.modernUI", MODERN_UI_DENSITY = "window.density.layout", MODERN_UI_FROSTED_GLASS = "workbench.modernUIFrostedGlass", MODERN_UI_FROSTED_GLASS_OPACITY = "workbench.modernUIFrostedGlassOpacity", MODERN_UI_EDITOR_TAB_STYLE = "workbench.experimental.modernUIEditorTabStyle", MODERN_UI_UPPERCASE_VIEW_HEADERS = "workbench.experimental.modernUIUppercaseViewHeaders" } export declare enum ModernUIFrostedGlassOpacity { Minimum = 50, Maximum = 100, Default = 80 } export declare enum ModernUIEditorTabStyle { Connected = "connected", Pill = "pill" } export declare enum ModernUIDensity { Default = "default", Compact = "compact" } /** * The margin (in pixels) reserved on each side of a part when the Modern UI Update * experiment (`LayoutSettings.MODERN_UI`) is enabled. Parts grow or shrink their * content by this amount to leave room for the margin/border applied in CSS * (`src/vs/workbench/browser/media/floatingPanels.css`, `.floating-panels`). * Keep in sync with the `--vscode-spacing-size40` (4px) token used there. */ export declare const FLOATING_PANEL_MARGIN = 4; /** * Compact Modern UI density removes the gaps between cards. */ export declare const COMPACT_FLOATING_PANEL_MARGIN = 0; /** * Compact Modern UI density connects the card cluster directly to the window chrome. */ export declare const COMPACT_FLOATING_PANEL_OUTER_MARGIN = 0; /** * The trailing card margin (in pixels) when the Modern UI Update experiment is * enabled. Together with the next card's leading {@link FLOATING_PANEL_MARGIN}, * it forms the 4px inter-card gap. Keep in sync with the * `--vscode-spacing-sizeNone` (0px) token used in `floatingPanels.css`. */ export declare const FLOATING_PANEL_INNER_MARGIN = 0; export declare function getFloatingPanelMargin(layoutService: IWorkbenchLayoutService): number; /** * The density-specific perimeter gutter (in pixels) on an edge facing window chrome. Keep in sync with * `--modern-ui-floating-card-outer-margin` in `floatingPanels.css`. */ export declare function getFloatingPanelOuterMargin(layoutService: IWorkbenchLayoutService): number; export declare enum ActivityBarPosition { DEFAULT = "default", TOP = "top", BOTTOM = "bottom", HIDDEN = "hidden" } export declare enum EditorTabsMode { MULTIPLE = "multiple", SINGLE = "single", NONE = "none" } export declare enum EditorActionsLocation { DEFAULT = "default", TITLEBAR = "titleBar", HIDDEN = "hidden" } export declare enum Position { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3 } export declare function isHorizontal(position: Position): boolean; export declare enum PartOpensMaximizedOptions { ALWAYS = 0, NEVER = 1, REMEMBER_LAST = 2 } export type PanelAlignment = "left" | "center" | "right" | "justify"; export declare function positionToString(position: Position): string; /** * Whether the floating cards sit against the top window edge and take the density-specific * outer gutter. Both grid rows above the middle section (title bar and banner) must be hidden. */ export declare function isFloatingTopEdgeExposed(layoutService: IWorkbenchLayoutService, targetWindow: Window): boolean; /** * Determines which horizontal edge of the floating-card cluster is owned by its outermost * card when the Modern UI Update experiment is enabled, and which {@link Parts} owns it. * The owning part receives the density-specific outer gutter. Compact density includes the * default-position Activity Bar in the connected card cluster. * * The horizontal order of the parts is reconstructed from the same inputs the grid * layout uses (mirrors `Layout.adjustPartPositions` in `src/vs/workbench/browser/layout.ts`): the activity bar and primary side bar sit * on `getSideBarPosition()`, the secondary side bar on the opposite side, the editor in * the middle, and a vertical (left/right) panel immediately next to the editor on its * placement side. The outermost *visible* part on each edge wins; a visible Activity Bar is the * outermost card of the side bar cluster. A hidden editor is skipped, so a maximized side bar * (which spans the full content width) is correctly detected as the owner on both edges. * * Consumed by `AbstractPaneCompositePart` (side bars and panel) and `EditorPart` * (main editor) so the outer-gutter decision stays in sync between them. */ export declare function getFloatingOuterEdgeOwners(layoutService: IWorkbenchLayoutService): { left: Parts | undefined; right: Parts | undefined; }; /** * The horizontal cluster edges on which the given part is the outermost floating card and * should therefore receive the density-specific outer gutter. A part can own both edges (notably * a horizontal bottom/top panel that spans the full width when the bars beside it are * hidden or not full-height). Convenience wrapper around {@link getFloatingOuterEdgeOwners}. */ export declare function getFloatingOuterGutterEdges(layoutService: IWorkbenchLayoutService, partId: Parts): { left: boolean; right: boolean; }; /** * Horizontal margins (in pixels) a floating pane composite reserves, mirroring the * margins in `floatingPanels.css`. */ export declare function getFloatingPaneCompositeHorizontalMargins(layoutService: IWorkbenchLayoutService, partId: Parts): { left: number; right: number; }; /** * Whether the primary sidebar and auxiliary bar are each in the same grid row as the * editor (sibling to the editor) for a horizontal panel. A bar that is a sibling is not * full-height; it sits above or below the panel row rather than spanning the full height. * Mirrors the sideBarSiblingToEditor / auxiliaryBarSiblingToEditor formula used in * adjustPartPositions() in layout.ts. */ export declare function getFloatingSidebarSiblingToEditorStatus(layoutService: IWorkbenchLayoutService): { sideBar: boolean; auxBar: boolean; }; /** * Vertical margins (in pixels) a floating pane composite (primary side bar, secondary side * bar or panel) reserves, mirroring the margins in `floatingPanels.css`. Compact density * uses the perimeter gutter whenever the edge faces window chrome rather than another card. */ export declare function getFloatingPaneCompositeVerticalMargins(layoutService: IWorkbenchLayoutService, partId: Parts, targetWindow: Window): { top: number; bottom: number; }; export declare function getFloatingPaneCompositeVerticalOuterEdges(layoutService: IWorkbenchLayoutService, partId: Parts, targetWindow: Window): { top: boolean; bottom: boolean; }; /** * Vertical margins (in pixels) the floating main editor reserves, mirroring the margins in * `floatingPanels.css`. A panel above or below takes the place of the corresponding window edge. */ export declare function getFloatingEditorVerticalMargins(layoutService: IWorkbenchLayoutService, targetWindow: Window): { top: number; bottom: number; }; export declare function getFloatingEditorVerticalOuterEdges(layoutService: IWorkbenchLayoutService): { top: boolean; bottom: boolean; }; export declare function positionFromString(str: string): Position; export declare function partOpensMaximizedFromString(str: string): PartOpensMaximizedOptions; export type MULTI_WINDOW_PARTS = Parts.EDITOR_PART | Parts.STATUSBAR_PART | Parts.TITLEBAR_PART; export type SINGLE_WINDOW_PARTS = Exclude; export declare function isMultiWindowPart(part: Parts): part is MULTI_WINDOW_PARTS; export interface IPartVisibilityChangeEvent { readonly partId: string; readonly visible: boolean; readonly source?: "resize"; } export declare function shouldShowCustomTitleBar(configurationService: IConfigurationService, window: Window, menuBarToggled?: boolean): boolean;