/** * Shell layout — compact utility bar only. * * Kept out of `shell-layout-context.tsx` / `shell-layout-menu.tsx` so those * modules export only React components/hooks. Mixing constants and helpers * with components breaks Vite Fast Refresh and remounts `App` on every edit * (multi‑GB Chrome tabs after a long HMR session). * * Consumer apps on an older package still ship Classic / utility-sidebar / * utility-bar until they upgrade and port shell files. On this package, * every legacy persisted id normalizes to `compact`. */ type ShellLayoutVariant = "compact"; /** * Values that may still sit in localStorage from older packages or the * previous multi-layout picker. Normalized to `compact` on read. */ type LegacyShellLayoutVariant = "sidebar" | "sidebar-classic" | "utility-sidebar" | "utility-bar"; type StoredShellLayoutVariant = ShellLayoutVariant | LegacyShellLayoutVariant; /** * Bumped to v3 when Compact became the only shell so prior Classic / * utility-bar prefs do not keep chrome on retired layouts. */ declare const SHELL_LAYOUT_VARIANT_KEY = "shell:layout-variant:v3"; declare const DEFAULT_SHELL_LAYOUT_VARIANT: ShellLayoutVariant; declare function normalizeShellLayoutVariant(stored: string): ShellLayoutVariant; declare function showsUtilityBar(_variant?: ShellLayoutVariant): boolean; /** Full-width bar owns product; sidebar never shows the product switcher. */ declare function showsProductInSidebar(_variant?: ShellLayoutVariant): boolean; /** Full-width bar owns scope; sidebar never shows the school/site switcher. */ declare function showsScopeInSidebar(_variant?: ShellLayoutVariant): boolean; declare function isFullWidthUtilityBar(_variant?: ShellLayoutVariant): boolean; declare function isCompactShell(_variant?: ShellLayoutVariant): boolean; /** * Flush sidebar (`variant="sidebar"`) instead of the floating inset card. * Also drops the workspace gutter, since the inset margin is what the gutter * was aligning to. */ declare function hasFlushSidebar(_variant?: ShellLayoutVariant): boolean; /** Profile lives on the bar, not in SidebarFooter. */ declare function showsProfileInSidebar(_variant?: ShellLayoutVariant): boolean; /** Bar owns product, scope, and the sidebar toggle. */ declare function movesSidebarHeaderToBar(_variant?: ShellLayoutVariant): boolean; interface ShellLayoutOption { id: ShellLayoutVariant; label: string; /** What actually moves. Not a restatement of the label. */ description: string; iconClass: string; } /** * Single catalog entry — Settings / profile no longer offer a shell picker; * kept for docs and any host that still maps over the list. */ declare const SHELL_LAYOUTS: ReadonlyArray; export { DEFAULT_SHELL_LAYOUT_VARIANT, type LegacyShellLayoutVariant, SHELL_LAYOUTS, SHELL_LAYOUT_VARIANT_KEY, type ShellLayoutOption, type ShellLayoutVariant, type StoredShellLayoutVariant, hasFlushSidebar, isCompactShell, isFullWidthUtilityBar, movesSidebarHeaderToBar, normalizeShellLayoutVariant, showsProductInSidebar, showsProfileInSidebar, showsScopeInSidebar, showsUtilityBar };