import { type ScrollEntry } from "./scrollMemory.ts"; /** * Remember where this history entry was scrolled to, and put it back * when the reader returns to it. * * `scrollMemory.ts` says why the browser will not, and what an entry * that has never been seen should do. This is the part that has to * survive the two things a real page does: * * 1. **The content arrives late.** An offset applied against a * 600px skeleton clamps to `0` and looks like it did nothing. A * `ResizeObserver` on the scrollport and on its content column * re-applies the offset every time either grows, until the * offset lands or the window closes. * 2. **The reader scrolls during all that.** Any wheel, touch, key * or pointer press ends the restore immediately. The alternative * is a page that jumps out from under somebody who has already * started reading. * * The save is a passive `scroll` listener, suppressed while a * restore is in flight. Without that suppression the feature eats * itself: writing `scrollTop` on a still-short page clamps to `0` * and fires a `scroll` event reading `0`, which would be saved over * the very offset being restored. * * @param entry The history entry and the page it belongs to. * `null` turns the memory off, which is what an app that renders * no `ScrollMemoryProvider` gets. */ export declare const useScrollMemory: (entry: ScrollEntry | null | undefined) => (node: unknown) => void; //# sourceMappingURL=useScrollMemory.d.ts.map