/** * Page scroll lock, reference-counted so multiple components can lock at once. * * Two parts: overflow: hidden on (the document scroller), and a guard * for apps that scroll their own container (a full-height layout with an * inner overflow: auto div), which overflow doesn't reach. The guard * cancels wheel, touchmove and scroll keys that would scroll anything outside * the open dialog they come from (every lock holder is a top-layer ): * scrollers inside the dialog keep working until their edge, nothing chains * out of it, and events from the page behind scroll nothing. Keys a control * uses itself (text fields, selects, Space on buttons, arrows in widgets) are * left alone. */ declare global { interface Window { tyScrollDebug?: boolean; } } /** * Lock scrolling for a specific component. * * Multiple components can lock scrolling simultaneously. * Scroll remains locked until ALL components unlock. * * @param componentId - Unique identifier for the component */ export declare function lockScroll(componentId: string): void; /** * Unlock scrolling for a specific component. * * Scroll remains locked if other components still have locks active. * * @param componentId - Unique identifier for the component */ export declare function unlockScroll(componentId: string): void; /** * Emergency unlock - removes all scroll locks immediately. * * Use this for cleanup or error recovery scenarios. */ export declare function forceUnlockAll(): void; /** * Enable scroll lock debugging - useful for testing and development */ export declare function enableDebug(): void; /** * Disable scroll lock debugging */ export declare function disableDebug(): void; /** * Get the set of currently active component locks. * * @returns Set of component IDs that currently have scroll locked */ export declare function getActiveLocks(): Set; /** * Check if scrolling is currently locked. * * @returns true if any component has scroll locked */ export declare function isLocked(): boolean; /** * Check if scrolling is locked by a specific component. * * @param componentId - Component identifier to check * @returns true if this specific component has scroll locked */ export declare function isLockedBy(componentId: string): boolean; /** * Get the complete lock state for debugging. * * @returns Current state including scroll position and active locks */ export declare function getLockState(): Readonly<{ locked: boolean; scrollY: number; activeLocks: string[]; }>;