import { type CellCoordinate, type CellRange, type SpreadsheetViewModel } from '@pixerate/editor/spreadsheet'; export interface SpreadsheetViewportSource { view: () => SpreadsheetViewModel; /** `'auto'` (default): virtualise large views only; `true` / `false` force it. */ virtualize?: () => boolean | 'auto' | undefined; /** Merged ranges, rendered whole when they cross the window's edge. */ merges?: () => readonly CellRange[] | undefined; /** Scrolled into view when it changes (virtualised views only). */ activeCell?: () => CellCoordinate | null | undefined; overscanRows?: number; overscanColumns?: number; } /** * Virtualised rendering for `SpreadsheetEditor` (the Svelte counterpart of * React's `useSpreadsheetViewport`): tracks the scroll container passed to * `attach`, works out the window of rows and columns to render, and scrolls * the active cell into view. Call it while a component initialises. */ export declare function createSpreadsheetViewport(source: SpreadsheetViewportSource): { readonly metrics: import("@pixerate/editor").SpreadsheetViewMetrics; /** What to render; `virtual: false` renders every row and column. */ readonly window: import("@pixerate/editor").SpreadsheetViewWindow; onScroll: () => void; attach: (el: HTMLElement | null) => () => void; };