/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { RowRuns } from "@elaraai/east-ui-components/internal"; /** Where a virtual view rests: its top row, by key, and the px scrolled into it. */ export interface RowAnchor { readonly key: string; readonly offset: number; } /** A view's resting place, as storage keeps it. */ export declare const readRowAnchor: import("@elaraai/east-ui-components/internal").KeptReader; /** The narrowing a builder's rows are under, and whether its rows are in. */ export interface RowNarrowing { /** The narrowing, as text: a new one keeps the view's place. */ readonly query: string; /** Whether its rows are in: its membership read, the last no longer standing in. */ readonly settled: boolean; } /** * A virtual view's place (see the module docs). * * @param rows - The view's rows, each by its key * @param saved - Where it last rested * @param save - Told where it rests as its scroll settles * @param ready - Whether the rows are placed as they will be — a builder whose rows' estimate is measured from its first * rows waits for that measure, so the rows above the one brought back stand where they will * @param narrowing - The narrowing the rows are under, where one chooses them: across a new one the view keeps the row it * rested on where the narrowing holds it, else starts at the top * @param runs - Where the rows it has not read stand, where it draws them as runs: a view resting in one rests on the row * there, and comes back to it there while the run holds it * @returns What its frame restores, and what it reports a settle to */ export declare function useRowAnchor(rows: readonly { readonly key: string; }[], saved: RowAnchor | undefined, save: ((at: RowAnchor) => void) | undefined, ready?: boolean, narrowing?: RowNarrowing, runs?: RowRuns): { restore: { index: number; offset: number; } | undefined; onAnchorChange: (at: { index: number; offset: number; }) => void; }; //# sourceMappingURL=row-anchor.d.ts.map