import type { SpanLayout } from "../types.js"; /** * Parameters required to calculate viewport bounds for virtualized content */ export interface ComputeBoundsArgs { /** Width of the visible viewport area in pixels */ viewportWidth: number; /** Height of the visible viewport area in pixels */ viewportHeight: number; /** Current vertical scroll position in pixels */ scrollTop: number; /** Current horizontal scroll position in pixels */ scrollLeft: number; /** Array of cumulative column widths/positions */ xPositions: Uint32Array; /** Array of cumulative row heights/positions */ yPositions: Uint32Array; /** Number of pinned rows at the top */ topCount: number; /** Number of pinned rows at the bottom */ bottomCount: number; /** Number of pinned columns at the start (left) */ startCount: number; /** Number of pinned columns at the end (right) */ endCount: number; /** Number of additional rows to include when determining top bound */ rowOverscanTop?: number; /** Number of additional rows to include when determining bottom bound */ rowOverscanBottom?: number; /** Number of additional columns to include when determining start bound */ colOverscanStart?: number; /** Number of additional columns to include when determining end bound */ colOverscanEnd?: number; } /** * Calculates the visible range of rows and columns in a virtualized grid. * * This function determines which rows and columns should be rendered based on: * 1. Current scroll position * 2. Viewport dimensions * 3. Pinned rows/columns configuration * 4. Overscan settings for smoother scrolling * * The returned bounds include overscan areas (extra rows/columns rendered outside * the visible area) to mitigate flickering during scrolling. * * The bounds returned are of the scrollable rows. The bounds for pinned rows are * always visible and do not need to be computed. */ export declare function computeBounds({ viewportWidth, viewportHeight, scrollTop, scrollLeft, xPositions, yPositions, topCount, bottomCount, startCount, endCount, rowOverscanTop, rowOverscanBottom, colOverscanStart, colOverscanEnd, }: ComputeBoundsArgs): SpanLayout;