/** * slowmo - Universal slow-motion control for web animations * * This library intercepts time at multiple levels to slow down (or speed up) * all animations on a web page. * * ## How it works: * * 1. **requestAnimationFrame patching**: We replace window.requestAnimationFrame * with a wrapper that passes modified timestamps to callbacks. Time-based * animations that use the timestamp parameter will automatically slow down. * * 2. **performance.now() patching**: We replace performance.now() to return * virtual time. Libraries that use this for timing will be affected. * * 3. **Date.now() patching**: We replace Date.now() to return virtual epoch * milliseconds. Libraries like Motion/Framer Motion use this for timing. * * 4. **setTimeout/setInterval patching**: We scale delays by inverse of speed * so timed callbacks fire at the expected virtual time. * * 5. **Web Animations API**: We poll document.getAnimations() and modify the * playbackRate of all Animation objects. This affects CSS animations, * CSS transitions, and element.animate() calls. * * 6. **Media elements**: We set playbackRate on video/audio elements. * * ## Limitations: * * - Frame-based animations (that increment by a fixed amount per frame without * using timestamps) cannot be smoothly slowed down. * * - Animations created by libraries that cache their own time references * before we patch may not be affected. The Chrome extension runs at * document_start to minimize this issue. */ /** * Main slowmo function - set speed directly. * * @example * import { slowmo } from 'slowmo'; * slowmo(0.5); // Half speed * slowmo(0.1); // 10x slower * slowmo(2); // Double speed * slowmo(0); // Pause */ export declare function slowmo(speed: number): void; export declare namespace slowmo { var setSpeed: (speed: number) => void; var pause: () => void; var play: () => void; var reset: () => void; var getSpeed: () => number; } export default slowmo;