import type { EngineContext } from '../../wire'; import type { default as Overlays } from '../overlays'; import type { Overlay } from '../regions/_base'; /** * Assembles the StickyScrollStrategy's dependencies. Most come from the engine composition context; * the three that drive the Overlays coordinator itself (`refreshAll`/`applyToDOM`/`scrollableElement`) * and the shared `eventManager` come from the owning Overlays instance — so its scrollbar listeners * are tracked on (and torn down with) the same event manager as the rest of the overlays. * * @param {EngineContext} ctx The engine composition context. * @param {Overlays} overlays The owning Overlays coordinator. * @returns {object} The StickyScrollStrategy dependency set. */ export declare function createStickyScrollStrategyDeps(ctx: EngineContext, overlays: Overlays): { wtSettings: import("../../settings").default; rootDocument: Document; rootWindow: Window; eventManager: import("../../../../../eventManager").default; wtTable: import("../../table/baseTable").default; getWtViewport: () => import("../../viewport/viewport").default; getTopOverlay: () => Overlay; getBottomOverlay: () => Overlay; getInlineStartOverlay: () => Overlay; getScrollableElement: () => HTMLElement | Window; refreshAll: () => void; applyToDOM: () => void; }; /** * The StickyScrollStrategy dependencies, inferred from `createStickyScrollStrategyDeps`. */ export type StickyScrollStrategyDeps = ReturnType; /** * 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 {StickyScrollStrategyDeps} deps The StickyScrollStrategy dependencies. */ constructor(deps: StickyScrollStrategyDeps); /** * 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; }