export interface SectionNavHandle { /** The scroller or any box inside it; the hook finds the nearest scrolling ancestor, so a surface that * does not own its scroller hands its root. */ scrollRef: (node: HTMLElement | null) => void; /** The section the scroll sits in (the rail item's `current`); none without sections. */ activeKey: K | undefined; /** The reader has left the head — scrolled, or jumped: a rail marking the work's step marks the reader's place * from then on, so at the head one item stands out. */ moved: boolean; /** `ref={register(key)}` on each section's heading, the jump target and spy's measure; stable per key, * so re-renders never re-attach. */ register: (key: K) => (node: HTMLElement | null) => void; /** The reader's jump, smooth, and the only scroll this hook makes: a section near the end lands as far as * the content reaches, since padding the surface to seat it at the top moves the scroll the reader is * making. */ jumpTo: (key: K) => void; } /** Scroll-spy for a long surface with an outline rail: sections register headings, the rail jumps to them, * and `activeKey` follows the scroll. Pass keys in page order. Jump and highlight read live DOM * positions, so async growth above never stales them; an unmounted section keeps its last offset. It only * reads the scroll, never moves it unasked. `inset` is the px a sticky band (a phone's section strip) * covers at the scroller's top: a jump lands under it, and the spy's line moves down by it. */ export declare function useSectionNav(keys: readonly K[], inset?: number): SectionNavHandle;