export type RowScrollScaling = { /** True when the true content height exceeds the cap and mapping applies. */ readonly active: boolean; /** Height (px) the DOM scroll spacer should occupy - capped at maxDomHeight. */ readonly domTotal: number; /** Map a DOM scrollTop into the virtualizer's logical scroll offset. */ domToLogical(domTop: number): number; /** Map a virtualizer logical offset back into a DOM scrollTop. */ logicalToDom(logical: number): number; }; /** * Resolve the usable max element height from the two raw DOM signals. * * `layoutCap` is a tall probe's clamped `offsetHeight` - the height layout * assigns the element. `scrollCap` is the `scrollHeight` a real `overflow:auto` * container exposes for that same probe - the height the user can actually * scroll through. They differ on mobile / high-DPR engines, which report a * generous `offsetHeight` but then expose a SMALLER scrollable range (the * physical limit is in device px, so a 3x-DPR phone has ~1/3 the CSS-px scroll * cap). Trusting `offsetHeight` alone is exactly what strands the last rows of * a huge grid on a phone, so we take the smaller of the two. * * A junk reading (<= the sanity floor, or so large the browser clearly didn't * clamp) is dropped; if neither signal survives, the caller's conservative * `fallback` is returned unchanged. */ export declare function resolveMaxDomHeight(layoutCap: number, scrollCap: number, fallback: number): number; /** * Build the scaling mapping for one axis. * * @param trueTotal The real content height in logical px (count * rowH, or * the cumulative offset total for variable rows). * @param maxDomHeight The browser's max element height (detected at runtime). * @param viewport The scroll viewport height in px. * * Invariants (verified in scroll-scaling.test.ts): * - Inert when `trueTotal <= maxDomHeight`: both maps are the identity. * - `domTotal <= maxDomHeight` always, so the spacer never exceeds the cap. * - Endpoints line up: domTop 0 -> logical 0, and the DOM max * (`domTotal - viewport`) -> the logical max (`trueTotal - viewport`), so * the very last row is always reachable. * - `logicalToDom` is the inverse of `domToLogical` across the range. * - Both maps are monotonic non-decreasing and clamp out-of-range inputs. */ export declare function createRowScrollScaling(trueTotal: number, maxDomHeight: number, viewport: number): RowScrollScaling;