/** * Animation -- rAF to Effect.Stream interpolation + value lerping. * * Produces a Stream of AnimationFrame values driven by requestAnimationFrame, * with configurable duration and easing. Also provides numeric record * interpolation for smooth state transitions. * * @module */ import { Stream } from 'effect'; import type { Millis } from './brands.js'; import type { Easing } from './easing.js'; import type { Scheduler } from './scheduler.js'; import { interpolate } from './interpolate.js'; interface AnimationFrameShape { readonly progress: number; readonly eased: number; readonly elapsed: Millis; readonly timestamp: number; } /** * Create a finite animation stream driven by rAF. * Emits AnimationFrame values from progress 0 to 1. */ declare function _run(config: { duration: Millis; easing?: Easing.Fn; scheduler?: Scheduler.Shape; }): Stream.Stream; /** * Animation — rAF-driven value interpolation exposed as an `Effect.Stream`. * Pairs a duration and easing with either primitive lerping or the generic * {@link Animation.interpolate} over numeric records. */ export declare const Animation: { /** Run an rAF animation that yields a stream of {@link Animation.Frame}. */ run: typeof _run; /** Shallow numeric-record interpolator; non-numeric keys pass through. */ interpolate: typeof interpolate; }; export declare namespace Animation { /** Structural shape of a single frame emitted by {@link Animation.run}. */ type Frame = AnimationFrameShape; } export {}; //# sourceMappingURL=animation.d.ts.map