import { type InjectionKey, type PropType } from "vue"; export type PanelStackShape = "split-primary" | "sticky-item"; /** * Bound ratified by the chat consumer lane: beyond 4 sections, stacking * collapsible regions in a pane capped at 640px makes scrolling unmanageable * and the single-owner rule becomes untenable. Enforced as a dev-time * `console.warn` in `register()` (this package's established convention — * see NavActionStack/WaterfallChart — is to warn and degrade, never throw or * silently truncate); exported here so the bound is also visible through * types/docs to a consumer reading `PanelStackProps`. */ export declare const PANEL_STACK_MAX_SECTIONS = 4; export type PanelStackProps = { /** "sticky-item" (default): one section expanded at a time, all headers stay visible. "split-primary": the `primary` section is always expanded and owns the scroll; the others are content-sized disclosures. */ shape?: PanelStackShape; /** Accessible name for the stack region. */ label?: string; /** sticky-item, controlled: id of the expanded section. */ expanded?: string | null; /** sticky-item, uncontrolled seed. */ defaultExpanded?: string | null; onExpandedChange?: (id: string | null) => void; /** * split-primary: id of the section that owns the scroll. Falls back to the * first EXPANDED section (DOM order) when unset or stale, and — if nothing * is expanded — to the first registered section, so the stack never * degrades to zero scroll owners. */ primary?: string; /** Usable floor for the primary section, in px. While the primary sits above it the primary absorbs overflow; once it would drop below, a secondary auto-collapses instead of compressing the primary further. Default 160. */ primaryMinHeight?: number; class?: string; }; /** * Context contract shared with PanelSection. Every shape-dependent branch * (sticky-item vs split-primary) is decided HERE and only here — PanelSection * never reads `shape`, it only calls these four functions/callback. If the * consumer-lane contract for these two shapes changes, this is the one place * to touch. */ export declare const PANEL_STACK_KEY: InjectionKey; export type PanelStackContext = { /** Is this section the (non-collapsible) primary of a split-primary stack? */ isPrimary: (id: string) => boolean; /** Is this section currently expanded (body visible, content-sized or scrolling)? */ isExpanded: (id: string) => boolean; /** Is this section's body THE single scroll owner right now (flex:1 1 0, overflow:auto)? */ isScrollOwner: (id: string) => boolean; /** Header was activated (click / Space / Enter on the disclosure button). */ toggle: (id: string) => void; /** * Register a section's root AND header element, in mount/DOM order; * returns an unregister callback. NOT just bookkeeping — the stack falls * back to the first registered section as the scroll owner whenever * nothing else designates one (unset/stale `expanded` or `primary`), so * the invariant "exactly one scroll owner whenever the stack has ≥1 * section" holds even for a misconfigured or dynamically-changing stack. * `headerEl` is used only by split-primary's auto-collapse measurement * (the header of whichever section is CURRENTLY primary is observed for * its height); sticky-item ignores it. */ register: (id: string, rootEl: HTMLElement, headerEl: HTMLElement) => () => void; }; export declare const PRIMARY_MIN_BLOCK_SIZE_PX = 160; /** * Stacks several PanelSection children inside ONE panel so a docked chat can * share a pane with other content. The invariant is the whole point: exactly * one element in the stack has `overflow: auto` at any moment, and the stack * itself NEVER scrolls — see PanelStack.svelte (the frozen reference this * component mirrors) and styles.css's `.st-panelStack` rule. */ export declare const PanelStack: import("vue").DefineComponent; default: string; }; label: { type: StringConstructor; default: undefined; }; expanded: { type: PropType; default: undefined; }; defaultExpanded: { type: PropType; default: null; }; onExpandedChange: { type: PropType<(id: string | null) => void>; default: undefined; }; primary: { type: StringConstructor; default: undefined; }; primaryMinHeight: { type: NumberConstructor; default: undefined; }; class: { type: StringConstructor; default: undefined; }; }>, () => import("vue").VNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { expandedChange: (_id: string | null) => true; }, string, import("vue").PublicProps, Readonly; default: string; }; label: { type: StringConstructor; default: undefined; }; expanded: { type: PropType; default: undefined; }; defaultExpanded: { type: PropType; default: null; }; onExpandedChange: { type: PropType<(id: string | null) => void>; default: undefined; }; primary: { type: StringConstructor; default: undefined; }; primaryMinHeight: { type: NumberConstructor; default: undefined; }; class: { type: StringConstructor; default: undefined; }; }>> & Readonly<{ onExpandedChange?: ((_id: string | null) => any) | undefined; }>, { class: string; label: string; shape: PanelStackShape; expanded: string | null; primary: string; defaultExpanded: string | null; onExpandedChange: (id: string | null) => void; primaryMinHeight: number; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; //# sourceMappingURL=PanelStack.d.ts.map