import { RefObject } from "react"; //#region src/shared/motion-gate.d.ts /** * Published motion tokens for consumer UI — not the per-archetype engine tables. * WAAPI can't read `--mc-easing`, so the literal is duplicated; theming-contract.test.ts guards drift. */ declare const MC_EASE_ENTER = "cubic-bezier(0.22, 1, 0.36, 1)"; /** On-screen morphs (a value updating in place), for consumer UI. * @knipignore — published vocabulary; nothing in the library imports it. */ declare const MC_EASE_MOVE = "cubic-bezier(0.77, 0, 0.175, 1)"; /** Coarse beats for consumer UI around a chart. * @knipignore — published vocabulary; the engine's own per-archetype `DUR` * table is what the entrances use. */ declare const MC_DUR: { /** press / hover / focus feedback */ readonly interact: 120; /** value + state updates */ readonly update: 240; /** entrance base (3 beats — the engine's story spine) */ readonly enter: 360; }; /** Entrance archetypes — the family a chart's entrance belongs to. */ type EntranceArchetype = "draw" | "wipe" | "rise" | "reveal" | "settle" | "sweep" | "trail" | "spin" | "grow" | "scan" | "pop" | "fade"; interface EntranceOptions { /** Marks to animate; defaults per archetype (data-mc-ink roles). */ selector?: string; /** * transform-origin for rise/sweep (default "bottom" / "left"). * "signed": per-mark — `data-mc-ink="negative"` marks grow from the top * (away from the zero line), everything else from the bottom. */ origin?: "bottom" | "top" | "left" | "right" | "center" | "signed"; /** Per-item stagger in ms (default 30, total capped at 180). */ stagger?: number; /** * Sequence marks along real geometry ("x": left→right, "y": top→down) or * DOM order ("index"). Implied "index" for trail; spreads delays across * `window` instead of the fixed stagger. */ order?: "index" | "x" | "y"; /** Total span (ms) of an ordered sequence (default 380 trail / 300 others). */ window?: number; /** * `draw` only: reveal each mark ALONG ITS OWN STROKE (stroke-dashoffset) * instead of under the shared left→right front. For a ring, a spoke or a * trajectory that doubles back, x is not the direction the mark is drawn in, * so a front would uncover disconnected pieces that only later join up. * Everything x-monotone — a line, an area, a worm, a slope, a set of small * multiples — wants the front, which is the default. */ trace?: boolean; /** * `draw` + `trace` only: draw the stroked marks as ONE continuous sweep at constant * speed — each mark's duration is proportional to its stroke length and marks * are baton-passed end to end (mark i+1 starts exactly as mark i finishes). * For a ring of arcs this is constant ANGULAR velocity clockwise from the * path's start, so a donut reads as one value accumulating from 12 o'clock — * never several segments racing at once. `window` is the whole sweep's span. */ proportional?: boolean; /** * Elements to cast into the closing act (they enter as the story lands) * instead of the quiet opening stage — e.g. a cumulative line that must * follow its bars. */ defer?: string; /** * Stroked connectors that DRAW themselves on after the story marks land and * before the voice speaks — a dumbbell's bar between its two dots, a lollipop * stem to its dot. stroke-dashoffset, so the line grows to join the marks. */ link?: string; /** * Max per-mark tracks before the entrance collapses to one whole-svg wipe * (default 80 — a year of cells shouldn't spawn 365 animations). Raise it * only for a fixed, bounded grid whose per-mark story IS the point (a * 100-unit icon array counting up), never for open-ended data. */ maxMarks?: number; } //#endregion //#region src/shared/motion-engine.d.ts /** * Run the entrance for one chart. Returns a cancel function that resolves the * chart to its finished static frame (used on unmount). */ declare function runEntrance(svg: SVGSVGElement, archetype: EntranceArchetype, options?: EntranceOptions): () => void; //#endregion export { type EntranceArchetype, type EntranceOptions, MC_DUR, MC_EASE_ENTER, MC_EASE_MOVE, runEntrance };