/** * Scroll depth tracking for autocapture milestone and pageleave modes. */ import type { AutocaptureConfig, ScrollDepthConfig } from "./autocapture-types"; export declare const DEFAULT_SCROLL_DEPTH_THRESHOLDS: readonly [25, 50, 75, 100]; export type ScrollRoot = Window | Element; export interface NormalizedScrollDepth { milestones: boolean; thresholds: number[]; pageleave: boolean; scroll_root_selector?: string | string[]; } export declare function normalizeScrollDepth(raw: ScrollDepthConfig | undefined): NormalizedScrollDepth | null; export declare function scrollDepthModeActive(config: AutocaptureConfig | undefined): boolean; export declare function computeScrollDepthPct(root: ScrollRoot | null): number; export declare function resolveScrollRoot(selectors: string | string[] | undefined): ScrollRoot | null; export type ScrollDepthCaptureFn = (name: string, props: Record) => void; export interface ScrollDepthTrackerOptions { milestones: boolean; pageleave: boolean; thresholds: number[]; scroll_root_selector?: string | string[]; capture: ScrollDepthCaptureFn; isUrlAllowed: () => boolean; onPageview: (cb: () => void) => () => void; } export declare class ScrollDepthTracker { private readonly _options; private _maxPctSeen; private readonly _firedThresholds; private _scrollHandler; private _scrollTarget; private _rafId; private _pageviewUnsub; constructor(_options: ScrollDepthTrackerOptions); start(): void; stop(): void; reset(): void; getMaxPct(): number; private _scheduleScrollUpdate; private _onScroll; }