import type { EngineContext } from '../wire'; /** * Assembles the Scroll module's dependencies from the engine composition context. * * This factory is the single source of truth for what Scroll depends on: adding or removing a * dependency is a one-line edit here, and the `ScrollDeps` type is inferred from the return value, * so there is no separate hand-written interface to keep in sync. * * @param {EngineContext} ctx The engine composition context. * @returns {object} The Scroll dependency set. */ export declare function createScrollDeps(ctx: EngineContext): { wtSettings: import("../settings").default; rootWindow: Window; geometryReader: import("../domMeasure/geometryReader").GeometryReader; isDrawn: () => boolean; getWtTable: () => import("../table/baseTable").default; getWtViewport: () => import("../viewport/viewport").default; getTopOverlay: () => import("../overlay").Overlay; getInlineStartOverlay: () => import("../overlay").Overlay; }; /** * The Scroll module dependencies, inferred from `createScrollDeps`. */ export type ScrollDeps = ReturnType; /** * @class Scroll */ declare class Scroll { #private; /** * @param {ScrollDeps} deps The Scroll module dependencies. */ constructor(deps: ScrollDeps); /** * Scrolls viewport to a cell. * * @param {CellCoords} coords The cell coordinates. * @param {'auto' | 'start' | 'end'} [horizontalSnap='auto'] If `'start'`, viewport is scrolled to show * the cell on the left of the table. If `'end'`, viewport is scrolled to show the cell on the right of * the table. When `'auto'`, the viewport is scrolled only when the column is outside of the viewport. * @param {'auto' | 'top' | 'bottom'} [verticalSnap='auto'] If `'top'`, viewport is scrolled to show * the cell on the top of the table. If `'bottom'`, viewport is scrolled to show the cell on the bottom of * the table. When `'auto'`, the viewport is scrolled only when the row is outside of the viewport. * @returns {boolean} */ scrollViewport(coords: { row: number; col: number; }, horizontalSnap: string, verticalSnap: string): boolean; /** * Scrolls viewport to a column. * * @param {number} column Visual column index. * @param {'auto' | 'start' | 'end'} [snapping='auto'] If `'start'`, viewport is scrolled to show * the cell on the left of the table. If `'end'`, viewport is scrolled to show the cell on the right of * the table. When `'auto'`, the viewport is scrolled only when the column is outside of the viewport. * @returns {boolean} */ scrollViewportHorizontally(column: number, snapping?: string): boolean; /** * Scrolls viewport to a row. * * @param {number} row Visual row index. * @param {'auto' | 'top' | 'bottom'} [snapping='auto'] If `'top'`, viewport is scrolled to show * the cell on the top of the table. If `'bottom'`, viewport is scrolled to show the cell on * the bottom of the table. When `'auto'`, the viewport is scrolled only when the row is outside of * the viewport. * @returns {boolean} */ scrollViewportVertically(row: number, snapping?: string): boolean; /** * Get first visible row based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getFirstVisibleRow(): number; /** * Get last visible row based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getLastVisibleRow(): number; /** * Get first partially visible row based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getFirstPartiallyVisibleRow(): number; /** * Get last visible row based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getLastPartiallyVisibleRow(): number; /** * Get first visible column based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getFirstVisibleColumn(): number; /** * Get last visible column based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getLastVisibleColumn(): number; /** * Get first partially visible column based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getFirstPartiallyVisibleColumn(): number; /** * Get last partially visible column based on virtual dom and how table is visible in browser window viewport. * * @returns {number} */ getLastPartiallyVisibleColumn(): number; } export default Scroll;