/** * Timeline -- quantizer over time with play/pause/seek/scrub/reverse. * * A Timeline wraps a BoundaryDef and drives it from a time-based signal, * producing discrete state transitions as the elapsed time crosses thresholds. * * @module */ import type { Stream, Scope } from 'effect'; import { Effect } from 'effect'; import type { Millis } from './brands.js'; import { Boundary } from './boundary.js'; import type { StateUnion } from './type-utils.js'; import type { Scheduler } from './scheduler.js'; interface TimelineShape { readonly boundary: B; readonly state: Effect.Effect>; readonly progress: Effect.Effect; readonly elapsed: Effect.Effect; readonly changes: Stream.Stream>; play(): Effect.Effect; pause(): Effect.Effect; reverse(): Effect.Effect; seek(ms: Millis): Effect.Effect; scrub(progress: number): Effect.Effect; } interface TimelineFactory { from(boundary: B, config?: { duration?: Millis; loop?: boolean; scheduler?: Scheduler.Shape; }): Effect.Effect, never, Scope.Scope>; } /** * Timeline — scheduler-driven advancement over a {@link Boundary}. * Produces a scoped reactive timeline that seeks or plays between boundary * states; pluggable clock via {@link Scheduler}. */ export declare const Timeline: TimelineFactory; export declare namespace Timeline { /** Structural shape of a timeline instance for a given {@link Boundary}. */ type Shape = TimelineShape; } export {}; //# sourceMappingURL=timeline.d.ts.map