/** * Spring physics helpers. * * @module bquery/motion */ import type { Spring, SpringConfig } from './types'; /** * Create a spring-based animation for smooth, physics-based motion. * * Uses variable frame rate timing based on `requestAnimationFrame` timestamps * to ensure consistent animation speed across different devices and frame rates. * Large time deltas (e.g., from tab backgrounding) are clamped to maintain * simulation stability. * * @param initialValue - Starting value for the spring * @param config - Spring physics configuration * @returns Spring instance for controlling the animation * * @example * ```ts * const x = spring(0, { stiffness: 120, damping: 14 }); * x.onChange((value) => { * element.style.transform = `translateX(${value}px)`; * }); * await x.to(100); * ``` */ export declare const spring: (initialValue: number, config?: SpringConfig) => Spring; /** * Preset spring configurations for common use cases. */ export declare const springPresets: { /** Gentle, slow-settling spring */ gentle: SpringConfig; /** Responsive, snappy spring */ snappy: SpringConfig; /** Bouncy, playful spring */ bouncy: SpringConfig; /** Stiff, quick spring with minimal overshoot */ stiff: SpringConfig; }; //# sourceMappingURL=spring.d.ts.map