import type { WalkontableInstance, DomBindings } from './types'; import type Settings from './settings'; import type Table from './table'; import type { Overlay } from './overlay/_base'; import type EventManager from '../../../eventManager'; interface OverlaysLike { wot: WalkontableInstance; wtTable: Table; wtSettings: Settings; domBindings: DomBindings; eventManager: EventManager; scrollableElement: HTMLElement | Window; topOverlay: Overlay; bottomOverlay: Overlay; inlineStartOverlay: Overlay; refreshAll(): void; applyToDOM(): void; } /** * Manages the sticky-scroll optimization during native scrollbar drag. * * When the user grabs the native scrollbar and drags, the master spreader * (and overlay clone spreaders in element-scroll mode) switch to * `position: sticky` so the browser keeps them visible in the viewport. * Row/column content still updates via `refreshAll()` on each scroll event, * but the spreader positioning is handled by CSS rather than JS, eliminating * visual flickering. * * The class owns the full lifecycle: detection, activation, offset updates, * deactivation, and scroll position correction on release. * * @class StickyScrollStrategy */ export declare class StickyScrollStrategy { #private; /** * @param {Overlays} overlays The parent Overlays instance. */ constructor(overlays: OverlaysLike); /** * Registers mousedown/mouseup listeners for scrollbar drag detection. * Called from `Overlays.registerListeners()`. */ registerListeners(): void; /** * Checks whether sticky-scroll should activate based on the current state. * Called from `Overlays.syncScrollPositions()` after scroll direction is determined. * * @param {boolean} verticalScrolling Whether vertical scrolling occurred. * @param {boolean} horizontalScrolling Whether horizontal scrolling occurred. */ tryActivate(verticalScrolling: boolean, horizontalScrolling: boolean): void; /** * Recalculates and applies sticky offsets on all spreaders. Called after * every render (both full and fast draws) to keep the sticky offset in * sync with the current scroll position. */ syncOffsets(): void; /** * Cleans up on destroy. */ destroy(): void; /** * Deactivates sticky-scroll mode: captures the current offsets, adjusts * the scroll position to match, then restores `position: relative` and * triggers a final full render. */ deactivate(): void; } export {};