import { Part } from "../../part.js"; import { Parts } from "../../../services/layout/browser/layoutService.js"; import { IWorkbenchLayoutService } from "../../../services/layout/browser/layoutService.service.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { IThemeService } from "../../../../platform/theme/common/themeService.service.js"; import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js"; import { IAction } from "../../../../base/common/actions.js"; import { IPaneCompositePart } from "../paneCompositePart.js"; import { IPaneCompositeBarOptions, PaneCompositeBar } from "../paneCompositeBar.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; import { IMenuService } from "../../../../platform/actions/common/actions.service.js"; import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js"; import { ViewContainerLocation } from "../../../common/views.js"; import { IViewDescriptorService } from "../../../common/views.service.js"; import { IExtensionService } from "../../../services/extensions/common/extensions.service.js"; import { IWorkbenchEnvironmentService } from "../../../services/environment/common/environmentService.service.js"; import { IViewsService } from "../../../services/views/common/viewsService.service.js"; import { IHostService } from "../../../services/host/browser/host.service.js"; export declare class ActivitybarPart extends Part { private readonly location; private readonly paneCompositePart; private readonly instantiationService; private readonly configurationService; private readonly hostService; static readonly ACTION_HEIGHT = 48; static readonly COMPACT_ACTION_HEIGHT = 28; static readonly ACTIVITYBAR_WIDTH = 48; static readonly COMPACT_ACTIVITYBAR_WIDTH = 36; /** Narrower dimensions used when the floating panels (Modern UI) experiment is enabled. */ static readonly FLOATING_ACTION_HEIGHT = 36; static readonly FLOATING_ACTIVITYBAR_WIDTH = 36; static readonly FLOATING_COMPACT_ACTIVITYBAR_WIDTH = 28; /** * Vertical gap between activity bar items at the default size under the floating * panels experiment. Published to CSS as `--activity-bar-action-gap` so that the * stylesheet and the overflow computation cannot drift apart. */ static readonly FLOATING_ACTION_GAP = 8; /** * The compact Modern UI density tightens that gap to match its denser rhythm. */ static readonly FLOATING_COMPACT_ACTION_GAP = 4; static readonly ICON_SIZE = 24; static readonly COMPACT_ICON_SIZE = 16; /** * Base gutter reserved around the activity bar under the floating panels * experiment. Must match the margins applied in `floatingPanels.css`. */ static readonly FLOATING_MARGIN = 4; /** * The rail's own horizontal padding, doubled: the space inside the card beside the icon * column. Independent of the cluster perimeter so the icons keep their inset whatever the * gutter is. Must match `--modern-ui-activitybar-lane` in `floatingPanels.css`. */ static readonly FLOATING_LANE = 8; static readonly FLOATING_COMPACT_LANE = 4; /** * The card border the activity bar draws on each edge under the floating panels * experiment. Must match the border width applied in `floatingPanels.css`. */ static readonly FLOATING_BORDER = 1; static readonly pinnedViewContainersKey = "workbench.activity.pinnedViewlets2"; static readonly placeholderViewContainersKey = "workbench.activity.placeholderViewlets"; static readonly viewContainersWorkspaceStateKey = "workbench.activity.viewletsWorkspaceState"; get minimumWidth(): number; get maximumWidth(): number; readonly minimumHeight: number; readonly maximumHeight: number; /** The intrinsic activity bar width (excludes any floating gutter). */ private get baseWidth(); /** The action (item) height that drives visible item sizing. */ private get actionHeight(); /** * Vertical gap rendered between two adjacent items. Only the floating panels * experiment separates items, and only at the default activity bar size; the compact * Modern UI density tightens it to match its denser rhythm. */ private get actionGap(); /** * The vertical space a single item occupies in the bar (its height plus the gap that * separates it from the next one). This drives the overflow computation, so it has to * track the current activity bar size, otherwise items collapse into the overflow menu * prematurely. */ private get compositeSize(); private get floatingHorizontalGutter(); /** * Whether the rail has to supply the gap to the card before it. Under this system's * leading-margin convention each card owns the gap on its leading edge, so a rail that * follows the editor — on the right, with no side bar to connect to — reserves one more * margin than it does when it leads. Compact density keeps its cards joined, so it never * needs the gap. Mirrors `.nosidebar .part.activitybar.right` in `floatingPanels.css`. */ private get needsFloatingLeadingGap(); private readonly compositeBar; private content; private _isCompact; private activeWindowId; constructor(location: ViewContainerLocation, paneCompositePart: IPaneCompositePart, instantiationService: IInstantiationService, layoutService: IWorkbenchLayoutService, themeService: IThemeService, storageService: IStorageService, configurationService: IConfigurationService, hostService: IHostService); private updateCompactStyle; private recreateCompositeBar; private createCompositeBar; protected createContentArea(parent: HTMLElement): HTMLElement; getPinnedPaneCompositeIds(): string[]; getVisiblePaneCompositeIds(): string[]; getPaneCompositeIds(): string[]; focus(): void; updateStyles(): void; show(focus?: boolean): void; hide(): void; layout(width: number, height: number): void; /** * Vertical gutters (in pixels) mirroring the margins in `floatingPanels.css`, plus the * card's 1px border on each edge (drawn inside the box, as `.monaco-workbench .part` is * `box-sizing: border-box`). The top is flush with title/banner chrome and doubles only at * an exposed window edge. */ private getFloatingGutters; toJSON(): object; } export declare class ActivityBarCompositeBar extends PaneCompositeBar { private readonly globalActivities; private readonly configurationService; private readonly menuService; private element; private readonly menuBar; private menuBarContainer; private compositeBarContainer; private readonly globalCompositeBar; private lastLayoutDimensions; private readonly keyboardNavigationDisposables; constructor(location: ViewContainerLocation, options: IPaneCompositeBarOptions, part: Parts, paneCompositePart: IPaneCompositePart, globalActivities: { readonly actionHeight: number; readonly actionGap: number; } | undefined, instantiationService: IInstantiationService, storageService: IStorageService, extensionService: IExtensionService, viewDescriptorService: IViewDescriptorService, viewService: IViewsService, contextKeyService: IContextKeyService, environmentService: IWorkbenchEnvironmentService, configurationService: IConfigurationService, menuService: IMenuService, layoutService: IWorkbenchLayoutService); private fillContextMenuActions; private uninstallMenubar; private installMenubar; private registerKeyboardNavigationListeners; create(parent: HTMLElement): HTMLElement; layout(width: number, height: number): void; getActivityBarContextMenuActions(): IAction[]; }