UNPKG

@laubloch/scrolly-motion

Version:

Advanced scroll animation library with breakpoint support, timeline presets.

22 lines (21 loc) 795 B
/** * ScrollyMotion Helper Functions * Utility functions used throughout the library */ import type { DebouncedFunction } from "../types/index.js"; /** * Debounce function to limit function calls */ export declare function debounce<T extends (...args: any[]) => void>(fn: T, wait: number): DebouncedFunction<T>; /** * Parse class names from string or array format */ export declare function parseClasses(strVal: string | undefined, defaultList: string[]): string[]; /** * Parse size values (pixels, percentages, viewport units) */ export declare function parseSize(raw: string | number | undefined, vh: number): number; /** * Initialize media queries for breakpoints */ export declare function initializeMediaQueries(breakpoints: Record<string, string>): Map<string, MediaQueryList>;