import type { TableDeps } from '../../table/baseTable'; import TopOverlayTable from '../../table/regions/topTable'; import { Overlay, type OverlayDeps } from './_base'; import type { Selection } from '../../selection'; /** * @class TopOverlay */ export declare class TopOverlay extends Overlay { #private; /** * Cached value which holds the previous value of the `fixedRowsTop` option. * It is used as a comparison value that can be used to detect changes in this value. * * @type {number} */ cachedFixedRowsTop: number; /** */ constructor(deps: OverlayDeps); /** * Factory method to create a subclass of `Table` that is relevant to this overlay. * * @see Table#constructor * @param {...*} args Parameters that will be forwarded to the `Table` constructor. * @returns {TopOverlayTable} */ createTable(deps: TableDeps): TopOverlayTable; /** * Checks if overlay should be fully rendered. * * @returns {boolean} */ shouldBeRendered(): boolean; /** * Updates the top overlay position. * * @returns {boolean} */ resetFixedPosition(): boolean; /** * Sets the main overlay's vertical scroll position. * * @param {number} pos The scroll position. * @returns {boolean} */ setScrollPosition(pos: number): boolean; /** * Triggers onScroll hook callback. */ onScroll(): void; /** * Calculates total sum cells height. Delegates to the viewport's row-height prefix-sum cache * (`Viewport#sumRowHeights`), so a call costs O(1) instead of walking every row in the * `[from, to)` range — `scrollTo` passes ranges that start at row 0, which made keyboard * navigation near the bottom of a large grid re-sum the whole dataset on every keypress. * * @param {number} from Row index which calculates started from. * @param {number} to Row index where calculation is finished. * @returns {number} Height sum. */ sumCellSizes(from: number, to: number): number; /** * Adjust overlay root element, children and master table element sizes (width, height). */ adjustElementsSize(): void; /** * Adjust overlay root element size (width and height). */ adjustRootElementSize(): void; /** * Tells whether the holder must reserve the selection corner's protruding half-height (#6937), * needed only when the selection's bottom-end corner falls within the frozen top rows this overlay * renders — otherwise the reserved strip leaves a leftover top border at the seam. On mobile the * handles always protrude so the range check suffices; on desktop the fill handle must also be * enabled (`cornerVisible` truthy), mirroring `Border#appear`. * * @private * @param {Selection|null} focusSelection The focus Selection instance (or `null` when none). * @returns {boolean} */ shouldReserveSelectionCornerOffset(focusSelection: Selection | null): boolean; /** * Adjust overlay root childs size. */ adjustRootChildrenSize(): void; /** * Adjust the overlay dimensions and position. */ applyToDOM(): void; /** * Synchronize calculated left position to an element. */ syncOverlayOffset(): void; /** * Scrolls vertically to a row. * * @param {number} sourceRow Row index which you want to scroll to. * @param {boolean} [bottomEdge] If `true`, scrolls according to the bottom edge (top edge is by default). * @returns {boolean} */ scrollTo(sourceRow: number, bottomEdge: boolean): boolean; /** * Gets table parent top position. * * @returns {number} */ getTableParentOffset(): number; /** * Gets the main overlay's vertical scroll position. * * @returns {number} Main table's vertical scroll position. */ getScrollPosition(): number; /** * Gets the main overlay's vertical overlay offset. * * @returns {number} Main table's vertical overlay offset. */ getOverlayOffset(): number; /** * Pre-applies the `innerBorderTop` class before the cell render, from the pre-render scroll * position and settings. On the single-pass gated path the border is then already in its final * state when cells render, so the post-render `resetFixedPosition` toggle becomes a no-op * (`positionChanged` stays `false`) and the nested `wot.draw(true)` re-render is never triggered. * Element mode only — the window path resolves the border from post-render geometry * (`getOverlayOffset` + the #7256 guard) and is excluded by the single-pass gate. */ prepareHeaderBorders(): void; /** * Adds css classes to hide the header border's header (cell-selection border hiding issue). * * @param {number} position Header Y position if trimming container is window or scroll top if not. * @param {boolean} [skipInnerBorderAdjusting=false] If `true` the inner border adjusting will be skipped. * @returns {boolean} */ adjustHeaderBordersPosition(position: number, skipInnerBorderAdjusting?: boolean): boolean; }