/** The lifecycle moments a run can emit. `repeat`/`reverseComplete` are playback-only. */ export type LifecycleEvent = 'start' | 'update' | 'complete' | 'interrupt' | 'repeat' | 'reverseComplete'; export interface LifecycleCallbacks { /** Fired once when the run begins (after any delay). Also fires on the reduced/instant path. */ onStart?(this: object, handle: H): void; /** Per frame with the live value. A number on animatable/playable; the values object on animate(). */ onUpdate?(this: object, value: number, handle: H): void; /** Natural settle to rest. Never fires for an Infinity-repeat run. Fires on the reduced/instant path. */ onComplete?(this: object, handle: H): void; /** Replaced, stopped, teleported, or disposed mid-flight. Never fires on the reduced/instant path. */ onInterrupt?(this: object, handle: H): void; /** Playable only: an iteration boundary (the iteration index is the run's repeat count so far). */ onRepeat?(this: object, handle: H): void; /** Playable only: a reversed leg reached its start. */ onReverseComplete?(this: object, handle: H): void; /** The `this` receiver for every callback. Defaults to the handle. */ scope?: object; } export interface LifecycleRegistry { /** Load the callbacks (and scope) from an options bag. Ignores a missing/empty bag. */ seed(callbacks: LifecycleCallbacks | undefined): void; /** Attach or (with null) clear one event's callback - the post-hoc eventCallback path. Last writer wins. */ set(event: LifecycleEvent, fn: ((handle: H) => void) | null): void; /** True if anyone is listening for this event (lets callers skip work, e.g. force the JS path for `update`). */ has(event: LifecycleEvent): boolean; /** Invoke the event's callback with the configured scope (`update` also passes the value). */ fire(event: LifecycleEvent, handle: H, value?: number): void; } export declare function lifecycleRegistry(): LifecycleRegistry; //# sourceMappingURL=lifecycle.d.ts.map