/** * Stagger intent — authoring sugar over parallel TransitionNodes (#124). * * Lowers N child boundaries sharing one signal; each child gets a * `TransitionNode` with `routing: 'par'` and a compile-time delay derived * from `stepMs * index`. Motion compiles through `interpretTransition` → * CSS projection + runtime leaf-write floor. * * @module */ import type { ContentAddress } from './brands.js'; import type { DocumentGraph } from './document-graph.js'; import { type RevealPolicy, type RevealTransition, type RevealTrigger } from './reveal.js'; import type { TransitionProgram } from './transition-program.js'; /** One staggered child boundary. */ export interface StaggerChild { readonly target: string; readonly from: Readonly>; readonly to: Readonly>; } /** Authoring input to {@link Stagger.intent}. */ export interface StaggerIntentInput { readonly trigger: RevealTrigger; readonly children: readonly StaggerChild[]; readonly stepMs: number; readonly transition: RevealTransition; readonly policy: RevealPolicy; } /** Sealed stagger intent — data over graph, no behavior authority. */ export interface StaggerIntent extends StaggerIntentInput { readonly _tag: 'StaggerIntent'; } /** One lowered child with its transition id and computed delay. */ export interface LoweredStaggerItem { readonly target: string; readonly transitionId: ContentAddress; readonly componentId: ContentAddress; readonly delayMs: number; } /** Graph bundle produced by {@link lowerStaggerIntent}. */ export interface LoweredStagger { readonly graph: DocumentGraph; readonly intent: StaggerIntent; readonly items: readonly LoweredStaggerItem[]; readonly signalId: ContentAddress; } /** * Lower a {@link StaggerIntent} into parallel TransitionNodes sharing one signal. * * Each child gets `routing: 'par'` and the same `durationMs`; stagger offset is * applied at compile time as `animation-delay` / `transition-delay`. */ export declare function lowerStaggerIntent(intent: StaggerIntent): LoweredStagger; /** * Compose a {@link LoweredStagger}'s children into a `par` {@link TransitionProgram} * (#141). Each staggered child becomes a `step` carrying its compile-time * `delayMs`; the `par` total is the `max` child window, so `interpretProgram` emits * REAL per-child windows (the delays ride the offsets) instead of the pre-W9 * routing-label collapse. The authoring bridge from Stagger sugar to the algebra. */ export declare function staggerProgram(lowered: LoweredStagger): TransitionProgram; /** * Resolve the discrete state for SSR / reduced-motion first paint (#124). * When `reducedMotion: 'settle'` and the user prefers reduced motion, settle * immediately to the `to` pose — no tween, no stagger delay. */ export declare function resolveStaggerInitialState(intent: StaggerIntent, opts: { prefersReducedMotion: boolean; }): 'before' | 'after'; /** Authoring sugar namespace — data over intent, no behavior authority. */ export declare const Stagger: { /** Seal a stagger intent from authoring input. */ readonly intent: (input: StaggerIntentInput) => StaggerIntent; }; //# sourceMappingURL=stagger.d.ts.map