/** * CustomScrollbar - attaches a rendered scrollbar (vertical and/or horizontal) * to any scrollable element. Overlay approach: native overflow:auto is kept for * scroll physics, the native scrollbar is hidden via CSS, and custom track/thumb * elements are synced on top. Append `trackY`/`trackX` to your DOM; `destroy()` * cleans up. Classes: `.ty-scrollbar-{track,thumb}-{y,x}` plus state classes * `.has-overflow`, `.dragging`, `.scrolling` (brief auto-hide after scroll). */ export interface CustomScrollbarOptions { vertical?: boolean; horizontal?: boolean; autoHideDelay?: number; } /** * Check if custom scrollbar is enabled globally. * Default: true (custom scrollbar on). * Set data-ty-scrollbar="native" on to opt out. */ export declare function isCustomScrollbarEnabled(): boolean; export declare class CustomScrollbar { private _scrollEl; private _vertical; private _horizontal; private _autoHideDelay; readonly trackY: HTMLElement | null; readonly thumbY: HTMLElement | null; readonly trackX: HTMLElement | null; readonly thumbX: HTMLElement | null; private _isDragging; private _dragAxis; private _dragStartPos; private _dragStartScroll; private _rafId; private _hideTimeout; private _resizeObserver; private _onScroll; private _onThumbYDown; private _onThumbXDown; private _onTrackYDown; private _onTrackXDown; private _onDragMove; private _onDragEnd; constructor(scrollEl: HTMLElement, options?: CustomScrollbarOptions); private _createTrack; private _createThumb; /** Force update thumb size and position */ update(): void; /** Reset scroll position */ scrollToTop(smooth?: boolean): void; scrollToBottom(smooth?: boolean): void; scrollToLeft(smooth?: boolean): void; scrollToRight(smooth?: boolean): void; /** Cleanup all listeners and observers */ destroy(): void; private _handleScroll; private _updateVertical; private _updateHorizontal; private _updateThumbPositions; private _updateThumbY; private _updateThumbX; private _showScrollbars; private _handleThumbYDown; private _handleThumbXDown; private _handleDragMove; private _handleDragEnd; private _handleTrackYDown; private _handleTrackXDown; }