import type * as React from "react"; /** The two props a seam needs on the element it manages. Spread, so a surface * cannot wire half of it. */ export interface DomScrollSeam { ref: React.RefObject; onScroll: React.UIEventHandler; } /** * REMEMBERED SCROLL OFFSETS ACROSS A CONTENT SWAP. * * A scroll container keeps its offset when its children change, because nothing * tells it the content it was holding no longer exists. Swap a drawer's body for * a child record and the new record opens part-way down itself, with its own * heading off-screen above — invisible until the first list long enough to * scroll, which is the same list that makes the swap worth having. * * The seam is the content's IDENTITY: while `scrollKey` holds, the container is * left alone; when it changes, the outgoing key's offset is already recorded and * the incoming one is restored — 0 for a key never seen, so a swap FORWARD opens * at the top, and the remembered offset on the way BACK, so the reader keeps * their place in the list they came from. * * That return leg is the whole reason this is not a React `key` on the scroll * area. A key throws the container away and rebuilds it, which resets the child * correctly and resets the PARENT just as thoroughly. * * No key CHANGE ⇒ no scrolling: a surface that does not swap content behaves * exactly as it did before, whether it names its content or not. An ABSENT key * is the root content's identity (see {@link ROOT_KEY}), not a request to skip * the seam — which is what `scrollKey={openChild?.id}` needs on the leg where * no child is open. */ export declare function useDomScrollSeam(scrollKey: string | undefined): DomScrollSeam;