/** * Give each destination on a page its own scroll position. * * Tab panels and hub views share one scrollport (`[data-page-scroll]`), and * nothing about swapping the panel tells the scrollport to move, so the position * you were at simply stays. Whether that reads as a bug depends on the panel you * land on: one tall enough to hold the old offset opens halfway down content you * have never seen, and one too short gets clamped, so the same click either * strands you mid-panel or throws you back past the page header to the top. * * Neither is what was asked for. A destination you have visited opens where you * left it. One you have not opens at its start, which is the top of its own body * rather than the top of the page: the row of tabs is sticky, so it should not * move under a click that lands on it, and the title and KPIs above it belong to * every destination equally. In practice the chrome stays where it is and the new * panel begins under it. * * Recording is synchronous in the scroll handler rather than coalesced into a * frame: the click that changes tabs can land in the same frame as the last * scroll event, and a coalesced write would file that final position under the * wrong destination. * * @param key Identifies the destination, e.g. the selected tab's value or the * active view's id. `undefined` records nothing, for a set with no selection. * @param options.enabled Pass `false` for a tab row that does not own the page * scroll (a row inside a card), where moving the page is the wrong answer. * @param options.node A node inside the surface. Supplies the scrollport (its * nearest, falling back to the page's) and scopes the panel lookup. * @param options.panelSelector Finds the panel body inside `node`, whose top is * where an unvisited destination starts. Without it, an unvisited destination * leaves the scroll alone. */ declare function useRememberedPageScroll(key: string | undefined, { enabled, node, panelSelector, }?: { enabled?: boolean; node?: HTMLElement | null; panelSelector?: string; }): void; export { useRememberedPageScroll };