import type { Scheduler } from '../scheduler/scheduler'; import type { AnimationHandle } from '../value/animatable'; import type { DelayFn } from './stagger-delay'; /** A deferred animation: called when its turn comes. */ export type AnimationStep = () => AnimationHandle; export interface StaggerOptions { scheduler?: Scheduler; } /** * Starts `animation` on each item, item i delayed by its schedule. * The third argument is either a flat per-index spacing (item i delayed by * i * delayMs, the original linear behavior) or a `DelayFn` from `staggerDelay()` * for an expressive wave (origin, 2D grid, axis, easing). The returned handle * aggregates them: `finished` resolves when every item has rested; `stop` cancels * pending starts and freezes running items. */ export declare function stagger(items: readonly T[], animation: (item: T, index: number) => AnimationHandle, delay?: number | DelayFn, options?: StaggerOptions): AnimationHandle; /** * Runs steps one after another, each starting when the previous one rests. * `stop` freezes the current step and cancels the remaining ones. * `finished` resolves at the end (or on stop) - never rejects. * * The low-level ordered-handle primitive. For fluent, interruptible authoring * (verbs, overlap, pause/timeScale) use `sequence()` from `@underlying/core/playback`. */ export declare function chain(steps: readonly AnimationStep[]): AnimationHandle; //# sourceMappingURL=composition.d.ts.map