import { ReactNode, RefObject } from "react"; //#region src/components/outline-rail.d.ts /** * How prominently an entry reads next to the entries around it. A caller * that ranks its entries (a list of search results) steps the near-misses * back to `secondary`, so the answer it put first is the row the eye lands on. */ export declare const OUTLINE_EMPHASIS: { readonly primary: "primary"; readonly secondary: "secondary"; }; export type OutlineEmphasis = (typeof OUTLINE_EMPHASIS)[keyof typeof OUTLINE_EMPHASIS]; export type OutlineItem = { id: string; label: string; /** What the entry contains, after the label that names it. The label * stays whole; the title is what truncates when the row is narrow. */ title?: string; /** Nesting depth among included items; drives indent + tick taper. */ level: number; /** Optional trailing annotation in the panel (e.g. a page number or a * provision range); never truncated. */ meta?: string; /** Optional CSS custom-property name colouring this entry's tick + chip * (e.g. "--option-blue"). Defaults to the neutral foreground. */ color?: string; /** How prominently the row reads. Defaults to `primary`. */ emphasis?: OutlineEmphasis; }; export type OutlineRailProps = { items: OutlineItem[]; scrollContainerRef: RefObject; /** Vertical position (0–100) of an item's tick. Return null to drop it. */ resolvePct: (id: string, container: HTMLElement) => number | null; /** Caller performs the scroll/navigation. */ onJump: (id: string, container: HTMLElement) => void; /** Controlled active id; when omitted, derived from `resolvePct`. */ activeId?: string | null; /** Pinned at the top of the panel, above the tree (e.g. a jump field). * Supplying one also keeps the panel mounted when `items` is short, so a * filter that narrows the tree to nothing cannot take its own control * away; the caller decides whether the document has an outline at all. */ header?: ReactNode; /** Name a trailing annotation for assistive technology and its tooltip. */ formatMetaLabel?: (meta: string) => string; /** Depth from which entries start collapsed. Their ancestors still open on * their own while one of their descendants is active, so a deep outline * reads as the chain down to where the reader is rather than as every * branch at once. Omitted: everything starts expanded. */ collapsedFromLevel?: number; /** `panel` and `rail` fill a host-owned track; `popover` owns its disclosure. */ presentation?: "panel" | "rail" | "popover"; /** A host that already reserves docked chrome passes zero. */ bottomInset?: number; topOffset?: number; panelWidth?: number; ariaLabel?: string; }; export declare const OUTLINE_CONTROL_MIN_SIZE = 32; /** The entry as one line of text: label, then its title when it has one. */ export declare const outlineEntryText: (item: OutlineItem) => string; export declare const OutlineRail: ({ items, scrollContainerRef, resolvePct, onJump, activeId, header, formatMetaLabel, collapsedFromLevel, presentation, bottomInset, topOffset, panelWidth, ariaLabel }: OutlineRailProps) => import("react").JSX.Element | null; //#endregion