export type SidebarState = 'expanded' | 'rail' | 'collapsed'; export type InspectorState = 'open' | 'closed'; export type ShellMode = 'compact' | 'medium' | 'expanded' | 'wide'; export interface ShellSnapshot { sidebar: SidebarState; inspector: InspectorState; mode: ShellMode; /** Ephemeral compact/medium drawer (root data-drawer) — never written to the cookie and never read back from it. */ drawer: 'open' | 'closed'; } export interface ControlledHandlers { onSidebarChange?: ((next: SidebarState) => void) | undefined; onInspectorChange?: ((next: InspectorState) => void) | undefined; } /** DOM-root resolution shared by toggles/controller: the nearest shell root. */ export declare function appShellRoot(el: HTMLElement | null): HTMLElement | null; export declare function getSnapshot(root: HTMLElement): ShellSnapshot; /** Hydration-safe: reads the server-rendered attributes (identical markup). */ export declare function getServerSnapshot(root: HTMLElement): ShellSnapshot; export declare function subscribe(root: HTMLElement, cb: () => void): () => void; export declare function setSidebar(root: HTMLElement, next: SidebarState): void; export declare function setDrawer(root: HTMLElement, next: 'open' | 'closed'): void; /** The element to refocus after the drawer closes (null when none). */ export declare function drawerReturnFocus(root: HTMLElement): HTMLElement | null; /** True for Mod+B (Cmd+B / Ctrl+B) with no other modifier, outside editable targets (where Mod+B is the text "bold" command) and not already handled. */ export declare function isSidebarShortcut(e: { key: string; metaKey: boolean; ctrlKey: boolean; altKey: boolean; shiftKey: boolean; defaultPrevented: boolean; target: EventTarget | null; }): boolean; /** Registers the shell's Mod+B action (SURF-32). The binding is scoped to the shell root element — never a document or window listener (SURF-05; global key listeners are owned by the Command layer). Keys pressed inside the portalled drawer reach it through the drawer's React onKeyDown (runSidebarShortcut). Returns the unregister function. */ export declare function registerSidebarShortcut(root: HTMLElement, run: () => void): () => void; /** Runs the registered Mod+B action; false when no toggle opted in. */ export declare function runSidebarShortcut(root: HTMLElement): boolean; export declare function setInspector(root: HTMLElement, next: InspectorState): void; /** Controlled mode (AppShell.Controller): parent keeps state; the store calls handlers only and writes attributes only when props change. */ export declare function registerControlled(root: HTMLElement, handlers: ControlledHandlers, current: { sidebar?: SidebarState | undefined; inspector?: InspectorState | undefined; }): () => void; //# sourceMappingURL=appShellStore.d.ts.map