import { ReactiveController, ReactiveControllerHost } from 'lit'; /** * Options for ScrollController */ export interface ScrollControllerOptions { /** Scroll threshold in pixels for triggering state changes */ threshold?: number; /** Callback when scroll passes threshold (scrolled down) */ onScrolledDown?: () => void; /** Callback when scroll returns above threshold (scrolled up) */ onScrolledUp?: () => void; } /** * Reactive Controller for scroll threshold detection. * * Provides: * - Threshold-based callbacks for scroll state changes * - scrollToTop() utility for navigation * * @example * ```typescript * class MyComponent extends LitElement { * private scrollController = new ScrollController(this, { * threshold: 380, // Teaser height * onScrolledDown: () => this.teaserCollapsed = true, * onScrolledUp: () => this.teaserCollapsed = false, * }); * * render() { * return html` * * `; * } * } * ``` */ export declare class ScrollController implements ReactiveController { private _host; private _options; private _handler; private _ticking; private _isPastThreshold; private _teaserCollapseEnabled; constructor(host: ReactiveControllerHost, options?: ScrollControllerOptions); /** * Whether the scroll position is past the threshold */ get isPastThreshold(): boolean; /** * Scroll to the top of the page smoothly */ scrollToTop(): void; /** * Update the threshold value dynamically */ setThreshold(threshold: number): void; /** * Enable/disable teaser collapse behavior. * When disabled, scroll threshold callbacks are not triggered. * Use this on pages without teaser to prevent scroll events from * incorrectly toggling teaserCollapsed state. */ setTeaserCollapseEnabled(enabled: boolean): void; hostConnected(): void; hostDisconnected(): void; /** * Create the scroll handler with requestAnimationFrame throttling */ private _createScrollHandler; /** * Check if threshold is crossed and trigger callbacks */ private _checkThreshold; } //# sourceMappingURL=ScrollController.d.ts.map