import type { ScrollerVideoState } from './state.svelte'; /** * Flattened version of ScrollerVideoState for easier access to all properties. * @typedef {Object} FlattenedScrollerVideoState * @property {string} src - Video source URL. * @property {number} videoPercentage - Current video percentage (0-1). * @property {number} frameRate - Video frame rate. * @property {number} currentTime - Current video time in seconds. * @property {number} totalTime - Total video duration in seconds. * @property {boolean} usingWebCodecs - Whether WebCodecs is used. * @property {string} codec - Video codec string. * @property {number} currentFrame - Current frame index. * @property {number} totalFrames - Total number of frames. * @property {boolean} isAutoPlaying - Whether video is autoplaying. * @property {number} autoplayProgress - Progress of autoplay (0-1). */ type FlattenedScrollerVideoState = { src: string; videoPercentage: number; frameRate: number; currentTime: number; totalTime: number; usingWebCodecs: boolean; codec: string; currentFrame: number; totalFrames: number; isAutoPlaying: boolean; autoplayProgress: number; }; /** * Returns a debounced version of the given function. * @template T * @param {T} func - The function to debounce. * @param {number} [delay=0] - The debounce delay in milliseconds. * @returns {(...args: Parameters) => void} The debounced function. */ export declare function debounce void>(func: T, delay?: number): (...args: Parameters) => void; /** * Checks if the current scroll position is at the target position within a threshold. * @param {number} targetScrollPosition - The target scroll position in pixels. * @param {number} [threshold=1] - The allowed threshold in pixels. * @returns {boolean} True if the current scroll position is within the threshold of the target. */ export declare const isScrollPositionAtTarget: (targetScrollPosition: number, threshold?: number) => boolean; /** * Constrains a number between a lower and upper bound. * @param {number} n - The number to constrain. * @param {number} low - The lower bound. * @param {number} high - The upper bound. * @returns {number} The constrained value. */ export declare function constrain(n: number, low: number, high: number): number; /** * Maps a number from one range to another. * @param {number} n - The number to map. * @param {number} start1 - Lower bound of the value's current range. * @param {number} stop1 - Upper bound of the value's current range. * @param {number} start2 - Lower bound of the value's target range. * @param {number} stop2 - Upper bound of the value's target range. * @param {boolean} [withinBounds=true] - Whether to constrain the result within the target range. * @returns {number} The mapped value. */ export declare function map(n: number, start1: number, stop1: number, start2: number, stop2: number, withinBounds?: boolean): number; /** * Flattens a ScrollerVideoState object into a single-level object for easier access. * @param {ScrollerVideoState} obj - The state object to flatten. * @returns {FlattenedScrollerVideoState} The flattened state object. */ export declare function flattenObject(obj: ScrollerVideoState): FlattenedScrollerVideoState; export {};