@mkbabb/keyframes.js 4.4.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +36 -221
  2. package/dist/animation-BGyzfzBq.js +947 -0
  3. package/dist/compile-CcSUwM8R.js +276 -0
  4. package/dist/{waapi-D9MHMm_9.js → delegation-DWwr4IXr.js} +116 -32
  5. package/dist/{draw-svg-DYRDxBlL.js → draw-svg-GURj9nin.js} +17 -13
  6. package/dist/easing-registry-DHV2-5gA.js +27 -0
  7. package/dist/easing-registry-y1p9McFy.js +2 -0
  8. package/dist/engine/index.d.ts +2873 -0
  9. package/dist/engine/index.js +17 -0
  10. package/dist/engine-DEVgCTUy.js +156 -0
  11. package/dist/engine-DrBtsKaf.js +4 -0
  12. package/dist/{format-BUgCTjmr.js → format-C-Gi9r7L.js} +4 -4
  13. package/dist/{scroll-grammar-B4kPvGh5.js → grammar-BLucehC4.js} +1 -1
  14. package/dist/group-vJcsHKN9.js +360 -0
  15. package/dist/{ingest-CNM5xkQT.js → ingest-S5hUe20K.js} +62 -56
  16. package/dist/keyframes.d.ts +585 -989
  17. package/dist/keyframes.js +188 -129
  18. package/dist/morph-svg-BToeumw5.js +89 -0
  19. package/dist/{motion-path-J-RSNmRQ.js → motion-path-pQVbamWT.js} +16 -12
  20. package/dist/parse-flatten-DRMHFytp.js +2 -0
  21. package/dist/parse-flatten-ZZUSEQEL.js +63 -0
  22. package/dist/{animations-5nf2kBkv.js → presets-BG2Fczzq.js} +124 -73
  23. package/dist/{scheduler-7eIr_q1g.js → scheduler-CUtVnuoU.js} +1 -1
  24. package/dist/{scroll-scene-CXEgM49Q.js → scroll-CxpYFO4u.js} +50 -46
  25. package/dist/sequence-C_DCiOIQ.js +708 -0
  26. package/dist/validate-DDeGnvSt.js +39 -0
  27. package/package.json +45 -6
  28. package/dist/animate-CuUJt2Tb.js +0 -26
  29. package/dist/compile-DgNRG6Lo.js +0 -251
  30. package/dist/decay-BvNmFk51.js +0 -25
  31. package/dist/engine-CNHvTgpw.js +0 -1122
  32. package/dist/errors-W8zkvPw4.js +0 -21
  33. package/dist/morph-svg-DRjl9Hfz.js +0 -62
  34. package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
  35. package/dist/sequence-CF5hazqz.js +0 -198
  36. package/dist/springTimingFunction-CDHZ00JQ.js +0 -63
  37. package/dist/timeline-B7SV3T_E.js +0 -442
  38. package/dist/utils-D7nuAND5.js +0 -97
  39. package/dist/validate-8r6Yo-uc.js +0 -35
@@ -80,62 +80,6 @@ export declare interface AdoptRunningOptions extends IngestOptions {
80
80
  commit?: boolean;
81
81
  }
82
82
 
83
- /**
84
- * Construct, target, and play an animation in one call. Returns the
85
- * `CSSKeyframesAnimation` as the control handle — `await animate(...)` is NOT
86
- * the pattern (it would await the *construction*, which is synchronous); await
87
- * the returned handle's play promise via the `.play()` it already kicked off,
88
- * or pass `autoPlay: false` and drive it yourself.
89
- *
90
- * @param target one or more DOM elements (or a single element) to animate.
91
- * @param input a CSS string, a keyframe map, a vars array, or a MotionPath
92
- * spec (`{ path }`) — dispatched on its shape.
93
- * @param options animation options + optional `transform` / `autoPlay`.
94
- *
95
- * @example
96
- * // CSS string → fromString
97
- * animate(box, `from { opacity: 0 } to { opacity: 1 }`, { duration: 400 });
98
- * // keyframe map → fromKeyframes
99
- * animate(box, { "0%": { opacity: 0 }, "100%": { opacity: 1 } });
100
- * // vars array → fromVars
101
- * animate(box, [{ opacity: 0 }, { opacity: 1 }], { duration: 400 });
102
- * // MotionPath spec → fromMotionPath (F.W12 §S2)
103
- * animate(box, { path: "path('M 0 0 Q 100 -100 200 0')", rotate: "auto" }, { duration: 2000 });
104
- */
105
- declare function animate<V extends Vars = any>(target: HTMLElement | HTMLElement[], input: AnimateInput<V>, options?: AnimateOptions): CSSKeyframesAnimation<V> | AnimationGroup<V> | Sequence<V>;
106
-
107
- /**
108
- * The declarative input to {@link animate} — one of the six dispatch shapes:
109
- *
110
- * • `string` — a CSS `@keyframes` (or bare keyframe-block) source.
111
- * • `KeyframeMap` — `{ "0%": {...}, "100%": {...} }` or the `Map` form.
112
- * • `V[]` — an ordered vars array (the simplest `[from, to]`
113
- * pair, or more stops), distributed evenly 0→100%.
114
- * • `MotionPathInput` — `{ path, from?, to?, rotate? }` — an `offset-distance`
115
- * sweep over an author `offset-path` (F.W12 §S2).
116
- * • `AnimationGroup` — the SPATIAL per-frame blender (L.W8 §S3) — routed to
117
- * its own `.play()`, NOT wrapped in a new animation.
118
- * • `Sequence` — the TEMPORAL master-playhead orchestrator (L.W8 §S3)
119
- * — routed to its own `.play()`.
120
- */
121
- export declare type AnimateInput<V extends Vars> = string | KeyframeMap<V> | V[] | MotionPathInput | AnimationGroup<V> | Sequence<V>;
122
-
123
- /**
124
- * Options accepted by {@link animate}. The animation-options surface, plus an
125
- * optional custom `transform` renderer (forwarded to the chosen `from*`
126
- * factory) and `autoPlay` (default true — set false to construct + target
127
- * without starting, when the caller wants to drive the returned handle).
128
- */
129
- export declare interface AnimateOptions extends Partial<InputAnimationOptions> {
130
- /** Custom renderer forwarded to the `from*` factory. */
131
- transform?: TransformFunction<any>;
132
- /**
133
- * Auto-start the animation after construction + targeting. Default true.
134
- * `false` returns a constructed, targeted, NOT-yet-playing handle.
135
- */
136
- autoPlay?: boolean;
137
- }
138
-
139
83
  /**
140
84
  * The value.js-bearing engine surface, resolved through `loadAnimationEngine()`.
141
85
  *
@@ -145,122 +89,83 @@ export declare interface AnimateOptions extends Partial<InputAnimationOptions> {
145
89
  * with `./engine`'s runtime exports.
146
90
  */
147
91
  export declare interface AnimationEngine {
148
- /**
149
- * The core engine constructor (PKG-3, L.W8 §S4) — renamed from `Animation`
150
- * to clear the `globalThis.Animation` d.ts collision. `Animation` below is
151
- * the @deprecated backward-compat alias (same runtime constructor).
152
- */
92
+ /** The core engine base class (CSS-keyframe parsing + playback). */
153
93
  KeyframesAnimation: typeof KeyframesAnimation;
154
- /** @deprecated Use {@link KeyframesAnimation}. Backward-compat alias (PKG-3). */
155
- Animation: typeof KeyframesAnimation;
94
+ /** The CSS-parsing `CSSKeyframesAnimation` subclass — the primary "in". */
156
95
  CSSKeyframesAnimation: typeof CSSKeyframesAnimation;
96
+ /** Multi-animation compositor (replace/add/weighted layer blending). */
157
97
  AnimationGroup: typeof AnimationGroup;
98
+ /** Stable string id for an animation (or string passthrough). */
158
99
  getAnimationId: (animation: KeyframesAnimation | string) => string;
100
+ /** Easing name/literal → a typed `TimingFunction` (value.js registry). */
159
101
  getTimingFunction: (timingFunction: TimingFunction | TimingFunctionNames | string | undefined) => TimingFunction | undefined;
102
+ /** CSS `@keyframes` text/stylesheet → resolved keyframes. */
160
103
  resolveKeyframes: (input: string | Stylesheet) => ResolvedKeyframes;
161
- /** The single-call front door — dispatch + auto-target + auto-play. */
162
- animate: typeof animate;
163
- /** CSS-native MotionPath (F.W12) — offset-distance over an author offset-path. */
104
+ /** CSS-native MotionPath — offset-distance over an author offset-path. */
164
105
  MotionPath: typeof MotionPath;
106
+ /** Construct a MotionPath sweep over a target. */
165
107
  fromMotionPath: typeof fromMotionPath;
166
- /** CSS-native DrawSVG (G.W13) — stroke-dashoffset sweep over the path length. */
108
+ /** CSS-native DrawSVG — stroke-dashoffset sweep over the path length. */
167
109
  DrawSVG: typeof DrawSVG;
110
+ /** Construct a DrawSVG line-draw over an SVG geometry target. */
168
111
  fromDrawSVG: typeof fromDrawSVG;
169
- /**
170
- * MorphSVG (O.W6, the DM-3 7-tranche chronic terminal) — SVG path-shape
171
- * morphing over value.js's `PathGeometry`. Samples two `d` strings at
172
- * `samples` uniform arc-length steps, pairs the points, and interpolates the
173
- * `(x, y)` pairs across `t`; `MorphSVG.sampleD(t)` reads the morphed `d`.
174
- */
112
+ /** SVG path-shape morphing over value.js's `PathGeometry`. */
175
113
  MorphSVG: typeof MorphSVG;
114
+ /** Construct a MorphSVG between two `d` strings. */
176
115
  fromMorphSVG: typeof fromMorphSVG;
177
- /**
178
- * The preset library (`fadeIn`, `bounce`, `shake`, …) — heavy (each returns
179
- * a `CSSKeyframesAnimation`), so it rides the dynamic boundary as a namespace
180
- * instead of the light static barrel: `const { presets } = await
181
- * loadAnimationEngine(); presets.fadeIn({ duration: 500 })` (F.W11).
182
- */
116
+ /** The preset library (`fadeIn`, `bounce`, `shake`, …) as a namespace. */
183
117
  presets: typeof AnimationPresets;
118
+ /** The valid `direction` values, as a const tuple. */
184
119
  DIRECTIONS: readonly AnimationOptions["direction"][];
120
+ /** The valid `fillMode` values, as a const tuple. */
185
121
  FILL_MODES: readonly AnimationOptions["fillMode"][];
122
+ /** The `AnimationOptions` defaults. */
186
123
  defaultOptions: AnimationOptions;
124
+ /** The per-layer blend-config defaults. */
187
125
  defaultLayerConfig: AnimationLayerConfig;
188
- /**
189
- * K.W8 INGEST (FLAGGED ADDITIVE) — the round-trip pointed FORWARD at the
190
- * live web. `fromStyleSheets`/`fromLiveAnimations`/`resolveLiveKeyframes`
191
- * walk the CSSOM into kf `CSSKeyframesAnimation` objects (per-sheet CORS
192
- * `try/catch` → a `CORS_SKIP` diagnostic, never a silent drop); `adoptRunning`
193
- * takes over a RUNNING CSS animation mid-flight via `getAnimations()`
194
- * currentTime handoff (the continuity seed, NOT seed-at-zero). HEAVY (the
195
- * ingest needs the value.js parser) — reached only here, never the LIGHT
196
- * barrel. Named `adoptRunning` to disambiguate from `engine.adoptCompiled`.
197
- */
126
+ /** Walk the document's stylesheets → reconstructed kf animations + CORS diagnostics. */
198
127
  fromStyleSheets: typeof fromStyleSheets;
128
+ /** Narrow to the names currently RUNNING via `getAnimations()`. */
199
129
  fromLiveAnimations: typeof fromLiveAnimations;
130
+ /** The lowest-level live-CSSOM walk (live analogue of `resolveKeyframes`). */
200
131
  resolveLiveKeyframes: typeof resolveLiveKeyframes;
132
+ /** Mid-flight takeover of a running CSS animation (currentTime handoff). */
201
133
  adoptRunning: typeof adoptRunning;
202
- /**
203
- * K.W9 SCROLL-AS-CSS (FLAGGED ADDITIVE) — the scroll-grammar round-trip
204
- * (`parseScrollCSS` / `serializeScrollOptions` / `roundTripScrollCSS`,
205
- * consuming value.js 0.13.0's typed `CSSTimelineOptions` extractor +
206
- * inverse serializer), the `ScrollScene` JS driver (`createScrollScene`),
207
- * the conservative-correct backend dispatch (`dispatchScrollBackend`), and
208
- * the `position:sticky` pin synthesis (`pinCSS`). HEAVY (static value.js
209
- * edge) — reached only here, never the LIGHT barrel.
210
- */
134
+ /** Scroll-driven animation as CSS — the JS driver over a parsed scroll grammar. */
211
135
  ScrollScene: typeof ScrollScene;
136
+ /** Construct a `ScrollScene` driver. */
212
137
  createScrollScene: typeof createScrollScene;
138
+ /** Parse a scroll-as-CSS rule → typed scroll options. */
213
139
  parseScrollCSS: typeof parseScrollCSS;
140
+ /** Parse an `animation-timeline` value. */
214
141
  parseScrollTimeline: typeof parseScrollTimeline;
142
+ /** Parse an `animation-range` value. */
215
143
  parseScrollRange: typeof parseScrollRange;
144
+ /** Serialize scroll options back to valid CSS. */
216
145
  serializeScrollOptions: typeof serializeScrollOptions;
146
+ /** Round-trip scroll CSS (parse → serialize). */
217
147
  roundTripScrollCSS: typeof roundTripScrollCSS;
148
+ /** Conservative-correct scroll backend dispatch. */
218
149
  dispatchScrollBackend: typeof dispatchScrollBackend;
150
+ /** Resolve a scroll `animation-range` to concrete boundaries. */
219
151
  resolveRange: typeof resolveRange;
152
+ /** `position:sticky` pin synthesis. */
220
153
  pinCSS: typeof pinCSS;
221
- /**
222
- * K.W10 COMPILE (FLAGGED ADDITIVE) — the round-trip's BACKWARD half:
223
- * `compileToCSS(group | sequence | childList)` → a ZERO-RUNTIME CSS artifact
224
- * (`@keyframes` + `animation-*` longhands + `animation-composition` layering
225
- * + `linear()` springs + materialized stagger delays + perceptual `oklab()`
226
- * densify) PLUS the CC-3 ineligibility report (the four named refusals —
227
- * `weighted` blend / custom renderers / perceptual oklab beyond densify /
228
- * computed-unit drift). The compiler is the parser run BACKWARD over the SAME
229
- * data model (`format.ts` is `keyframes.ts` run backward); a human pastes the
230
- * result and ships with ZERO kf bytes on the page. HEAVY (value.js-bearing) —
231
- * reached only here, never the LIGHT barrel.
232
- */
154
+ /** The round-trip's BACKWARD half: orchestration graph → zero-runtime CSS. */
233
155
  compileToCSS: typeof compileToCSS;
234
- /**
235
- * L.W6 AGENT-AUTHORING VERB (FLAGGED ADDITIVE) — the round-trip's FORWARD
236
- * half: the VALIDATION layer over the compile surface, the first question an
237
- * LLM agent asks before it suggests kf ("will this `@keyframes` block ship
238
- * faithfully?"). `validate(css, opts?)` is a READ-ONLY projection over three
239
- * already-typed channels (the adapter `diagnostics`, the compile
240
- * `{ eligible, refusals }`, the WAAPI `eligibility`) onto ONE agent-shaped
241
- * `ValidateResult` envelope an LLM branches on WITHOUT scraping a message;
242
- * `explain(css, opts?)` formats the SAME verdict deterministic human/LLM-
243
- * readable. NO new engine code — a pure JOIN over the channels L.W1/L.W2 made
244
- * honest. HEAVY (validate.ts imports the engine + compile + waapi) — reached
245
- * only here, never the LIGHT barrel.
246
- */
156
+ /** Read-only validation envelope over the compile/adapter/WAAPI channels. */
247
157
  validate: typeof validate;
158
+ /** Format the `validate` verdict as deterministic human/LLM-readable text. */
248
159
  explain: typeof explain;
249
- /**
250
- * L.W8 S1 ED-3 DOGFOOD INVERSION (FLAGGED ADDITIVE) — the heavy
251
- * serialization/painting/scheduler helpers over a parsed `Animation`.
252
- * `CSSKeyframesToString`/`CSSKeyframesToStrings` re-serialize the parsed
253
- * keyframes back to CSS (the FORWARD half of `fromString`, value.js-bearing);
254
- * `formatCSSKeyframeString` trims one keyframe body for display;
255
- * `transformTargetsStyle` paints a `Vars` snapshot onto DOM targets (the
256
- * same painter the run loop drives); `yieldToMain` is the engine's ONE
257
- * INP-relief yield ladder. HEAVY (they ride the engine chunk) — reached only
258
- * here, never the LIGHT barrel.
259
- */
160
+ /** Re-serialize parsed keyframes back to a CSS string. */
260
161
  CSSKeyframesToString: typeof CSSKeyframesToString;
162
+ /** Re-serialize parsed keyframes back to per-rule CSS strings. */
261
163
  CSSKeyframesToStrings: typeof CSSKeyframesToStrings;
164
+ /** Trim one keyframe body for display. */
262
165
  formatCSSKeyframeString: typeof formatCSSKeyframeString;
166
+ /** Paint a `Vars` snapshot onto DOM targets (the run-loop painter). */
263
167
  transformTargetsStyle: typeof transformTargetsStyle;
168
+ /** The engine's INP-relief yield ladder. */
264
169
  yieldToMain: typeof yieldToMain;
265
170
  }
266
171
 
@@ -286,6 +191,16 @@ export declare interface AnimationFrame<V extends Vars> {
286
191
  * on every interpFrames() call in the hot path.
287
192
  */
288
193
  allInterpVars: Array<InterpolatedVar<V>>;
194
+ /**
195
+ * Q.WB3 S2 — the precomputed numeric SoA fold layout (built ONCE at `parse`
196
+ * over the stable `allInterpVars` set). `processFrame` folds the numeric subset
197
+ * through ONE `lerpArray` over the packed `Float64Array` buffers and strides
198
+ * the result back into the numeric leaves' `.value` slots; the boxed residual
199
+ * (color/computed/mixed) keeps the per-element `lerpValue`. Absent (undefined)
200
+ * for a frame with no numeric ivs, or before `parse` runs — `processFrame`
201
+ * falls back to the all-boxed walk. Bit-identical to the boxed path.
202
+ */
203
+ _numericPlan?: NumericFoldPlan<V>;
289
204
  transform: TransformFunction<V>;
290
205
  timingFunction: Easing;
291
206
  /**
@@ -305,29 +220,19 @@ export declare interface AnimationFrame<V extends Vars> {
305
220
 
306
221
  export declare class AnimationGroup<V extends Vars> {
307
222
  animations: AnimationGroupObject<V>;
308
- /**
309
- * The group's composite transform. Defaults to a real no-op at the FIELD
310
- * (I.W0 S3) — NOT a lying definite-assignment assertion: a childless or
311
- * pre-`parse()` group composites nothing via a harmless no-op instead of
312
- * throwing `this.transform is not a function`. The constructor overrides it
313
- * with the first child's transform when one exists.
314
- */
223
+ /** The group's composite transform. Defaults to a real no-op at the FIELD
224
+ * (I.W0 S3) — a childless/pre-`parse()` group composites nothing instead of
225
+ * throwing; the constructor overrides it with the first child's transform. */
315
226
  transform: TransformFunction<V>;
316
227
  superKey: string | undefined;
317
228
  paused: boolean;
318
229
  started: boolean;
319
230
  done: boolean;
320
- /**
321
- * When true, `play()` honors `prefers-reduced-motion: reduce` by snapping
322
- * every child to its final frame in a single composite instead of running
323
- * the rAF draw loop. SSR-safe off-DOM. Default false.
324
- */
231
+ /** When true, `play()` honors `prefers-reduced-motion: reduce` by snapping
232
+ * every child to its final frame in one composite, no rAF loop. Default false. */
325
233
  respectReducedMotion: boolean;
326
- /**
327
- * Children-per-slice before `advanceTo()` yields to the main thread. Groups
328
- * at or under this size tick in one slice (fast path); larger groups tick in
329
- * batches with a `scheduler.yield()` between them (INP relief).
330
- */
234
+ /** Children-per-slice before `advanceTo()` yields to the main thread; larger
235
+ * groups batch with a `scheduler.yield()` between slices (INP relief). */
331
236
  static readonly YIELD_BATCH = 32;
332
237
  singleTarget: boolean;
333
238
  lastTickTime: number;
@@ -340,250 +245,114 @@ export declare class AnimationGroup<V extends Vars> {
340
245
  /** Cached entries sorted by layer zIndex (see `getEntries`). */
341
246
  private _entries;
342
247
  private _entriesDirty;
343
- /**
344
- * Long-lived composite buffer, cleared in place at the top of
345
- * `transformFramesGrouped` (the zero-alloc idiom `interpFrames`'s `out` buffer
346
- * uses) — no fresh object allocated per frame.
347
- */
348
- private _grouped;
349
- /**
350
- * The compile-stable union of every child's contributed (whitelist-filtered)
351
- * keys — what `_grouped` is null-filled to each frame so the composite clears
352
- * WITHOUT `delete` (F.W4 S2: the delete-loop trapped `_grouped` in V8
353
- * dictionary mode). Recomputed only on a structural change; the fold lives in
354
- * `group-layer-springs`.
355
- */
356
- private _groupedKeys;
357
- private _groupedKeysDirty;
358
- /**
359
- * P.W2 — the SoA composite layout for the `add`/`weighted` blend arms (the
360
- * validated 3.7× — `scripts/group-soa-decision.json`, bit-identical
361
- * `maxErr=0`). One {@link SoALayerPlan} per `add`/`weighted` entry: the FLAT
362
- * list of pure-numeric `(carrier, incoming)` `ValueUnit<number>` pairs that
363
- * blend would touch, hoisted out of the per-frame `for..in` + `Array.isArray`
364
- * + per-element `isNumericUnit` dispatch into a contiguous {@link Float64Array}
365
- * fold. Rebuilt ONLY on a structural change (alongside `_groupedKeys`), NEVER
366
- * per frame. The `replace` default arm is dispatch-free and carries NO plan;
367
- * the non-numeric (color/computed/string/mixed) tail keeps the boxed
368
- * per-element path. The probe (`carrier-probe`) proved `interpFrames` MUTATES
369
- * each leaf `ValueUnit.value` IN PLACE, so the carrier + incoming refs are
370
- * STABLE across frames — the plan is valid until the entry set / a layer
371
- * whitelist / a blend mode changes (every such mutation routes through
372
- * `invalidateEntries`).
373
- */
374
- private _soaPlans;
375
- /**
376
- * The long-lived SoA fold scratch — the contiguous numeric accumulate buffer
377
- * the `add`/`weighted` fold seeds, folds, and writes back through. Sized to
378
- * the WIDEST single-layer numeric pair count once per structural change
379
- * (reused across layers AND frames — zero per-frame alloc, the F.W4 zero-alloc
380
- * discipline). `null` until the first plan with numeric pairs is built.
381
- */
382
- private _compositeBuf;
383
- /**
384
- * K.W11 PHYS-C — true iff ANY layer currently carries a `weightSpring`. The
385
- * fast-path guard: when false (the universal case) `advanceTo` skips the
386
- * per-frame spring scan entirely, so the constant-weight blend hot path takes
387
- * ZERO new work. Set true by `transitionLayer`; recomputed false once every
388
- * driving spring has settled.
389
- */
390
- private _hasLayerSprings;
248
+ /** Long-lived composite buffer, cleared in place each frame (zero-alloc).
249
+ * INTERNAL (R.W2) — read/written by `./compositor`. */
250
+ _grouped: Record<string, unknown>;
251
+ /** The compile-stable union of every child's contributed keys — what `_grouped`
252
+ * is null-filled to each frame so the composite clears WITHOUT `delete` (F.W4
253
+ * S2; fold in `./entries`). INTERNAL (R.W2) — the `./compositor` null-fill. */
254
+ _groupedKeys: string[];
255
+ _groupedKeysDirty: boolean;
256
+ /** P.W2 — the SoA composite layout for the `add`/`weighted` blend arms (the
257
+ * validated 3.7×, bit-identical): one {@link SoALayerPlan} per entry, the FLAT
258
+ * pure-numeric pairs hoisted into a {@link Float64Array} fold (built by
259
+ * `buildSoAPlans` in `./soa`, rebuilt ONLY on a structural change). INTERNAL
260
+ * (R.W2) — read/written by `./compositor`. */
261
+ _soaPlans: SoALayerPlan[] | null;
262
+ /** The long-lived SoA fold scratch — the contiguous numeric accumulate buffer,
263
+ * sized to the WIDEST single-layer pair count once per structural change
264
+ * (reused, zero per-frame alloc). INTERNAL (R.W2) — read by `./compositor`. */
265
+ _compositeBuf: Float64Array | null;
266
+ /** K.W11 PHYS-C — true iff ANY layer carries a `weightSpring`; when false (the
267
+ * universal case) `advanceTo` skips the per-frame spring scan (ZERO new work).
268
+ * INTERNAL (R.W2) — set by `./layer-api`'s `transitionLayer`. */
269
+ _hasLayerSprings: boolean;
391
270
  constructor(...inputs: (KeyframesAnimation<V> | AnimationGroupInput<V>)[]);
392
- /**
393
- * The animation entries sorted by layer zIndex, dirty-flag cached — rebuilt
394
- * only when the animations object or a layer config is mutated. All hot-path
395
- * iteration uses this instead of `Object.values()`.
396
- */
397
- private getEntries;
398
- /** Mark entries cache stale. Called at all mutation boundaries. */
399
- private invalidateEntries;
271
+ /** The animation entries sorted by layer zIndex, dirty-flag cached — rebuilt
272
+ * only on a mutation. INTERNAL (R.W2): read by the colocated `./compositor`/
273
+ * `./entries`/`./scheduler`/`./springs` helpers + all hot-path iteration. */
274
+ getEntries(): AnimationGroupEntry<V>[];
275
+ /** Mark entries cache stale. Called at all mutation boundaries.
276
+ * INTERNAL (R.W2) — also called by `./layer-api`. */
277
+ invalidateEntries(): void;
400
278
  setSuperKey(superKey: string): this;
401
279
  setTargets(...targets: HTMLElement[]): this;
402
- onStart(): this;
403
- onEnd(): this;
404
- /**
405
- * Composite all animation values into a single grouped transform (per-frame
406
- * for single-target groups). Applies layer blending (replace / add /
407
- * weighted) in zIndex order, then calls the group transform with the merged
408
- * values. Each child's values refresh in place (`interpFrames` clears and
409
- * rewrites the long-lived buffer), so no stale keys leak and no fresh object
410
- * is allocated per entry per frame.
411
- */
412
- transformFramesGrouped(t: number): Record<string, unknown>;
413
- /**
414
- * The boxed `add`/`weighted` blend arm — the per-element AoS path that the
415
- * SoA fold (`soaBlendLayer`) supplants for the pure-numeric majority. Kept as
416
- * THE blend implementation for two roles: (1) the plan-build frame (every key,
417
- * `only === undefined`) — it establishes the carriers `buildSoAPlans` then
418
- * captures; (2) the per-frame residual (the plan's `boxedKeys` — non-numeric /
419
- * mixed / first-touch leaves the fold cannot cover, typically empty). Both
420
- * arms guard on `Array.isArray(existing) && Array.isArray(incoming)` and loop
421
- * `Math.min(existing.length, incoming.length)` elements with a per-element
422
- * `isNumericUnit` guard — the byte-exact G.W17 leaf contract (proof:blend),
423
- * un-clamped `add` (`+=`), spring-weighted `lerp`. A non-array carrier (or a
424
- * skipped key) falls through to `groupedValues[key] = incoming`.
425
- */
426
- private boxedBlendArm;
427
- /**
428
- * P.W2 — the SoA fold for ONE `add`/`weighted` layer (the validated 3.7×,
429
- * `scripts/group-soa-decision.json`: weighted 3.66×, add 3.69×, bit-identical
430
- * `maxErr=0`). Replaces the boxed `for..in` + `Array.isArray` + per-element
431
- * `isNumericUnit` dispatch with a contiguous {@link Float64Array} fold over the
432
- * plan's precomputed numeric `(carrier, incoming)` pairs: seed `_compositeBuf`
433
- * from each carrier, apply the op against the incoming, write back. The carrier
434
- * units are the SAME `ValueUnit`s a lower layer parked in `_grouped` (the refs
435
- * are frame-stable — `interpFrames` mutates `.value` in place), so writing the
436
- * folded result back to `carrier.value` mutates the live composite exactly as
437
- * the boxed arm did. The `add` accumulate is naturally UN-CLAMPED; the
438
- * `weighted` lerp reads ONE per-layer `w` (the K.W11 PHYS-C spring weight).
439
- */
440
- private soaBlendLayer;
441
- /**
442
- * P.W2 — build the SoA fold layout for every `add`/`weighted` layer (rebuilt
443
- * ONLY on a structural change, gated by the `_groupedKeys` dirty seam). A
444
- * NON-destructive carrier-resolution walk in zIndex order mirrors the boxed
445
- * blend's carrier semantics EXACTLY: `replace` (and the non-array first-touch
446
- * fall-through) parks a key's leaf as its carrier; `add`/`weighted` over an
447
- * array carrier blend the numeric elements in place. For each `add`/`weighted`
448
- * layer, the pure-numeric `(carrier, incoming)` element pairs (carrier IS an
449
- * array, both elements numeric) are extracted into the flat `carriers`/
450
- * `incomings` arrays the fold loops; every other key it touches (non-array
451
- * carrier, or ANY non-numeric / mixed element) is recorded in `boxedKeys` for
452
- * the boxed residual. `_compositeBuf` is grown to the widest layer's numeric
453
- * width ONCE (reused across layers and frames — zero per-frame alloc). The
454
- * walk mutates NOTHING (it reads `.value` only to classify, never writes), so
455
- * the building frame's already-computed composite is untouched.
456
- */
457
- private buildSoAPlans;
458
- /**
459
- * Render the current composition as a static frame at each child's current
460
- * `t`. Single-target groups go through the blended transform; multi-target
461
- * groups apply each child's interpolated vars to its own targets. The public
462
- * entry point for state mutated outside the rAF loop (scrubbing, state
463
- * restore, pause snapshots) that needs the visual to update immediately.
464
- */
465
- render(): void;
466
- /**
467
- * Set a child animation's current time without touching its siblings.
468
- * Updates `pausedTime` so the child resumes correctly from the scrub
469
- * position. Chainable; call `render()` afterwards to reflect it visually.
470
- */
280
+ /** Composite all values into a single grouped transform (single-target,
281
+ * per-frame). R.W2 — `private` (lib-group F8): the PUBLIC single-frame-paint
282
+ * entry is `render(t?)`; the body lives in `./compositor`. Thin delegate. */
283
+ private transformFramesGrouped;
284
+ /**
285
+ * Render the current composition as a static frame — the public entry for
286
+ * state mutated outside the rAF loop (scrubbing, restore, pause snapshots).
287
+ * R.W2 — the silent `|| performance.now()` fabrication is EXCISED: the
288
+ * composite `t` is non-normative for a pure-CSS transform, so a caller with a
289
+ * clock passes it (`render(now)`); a scrub uses the group's REAL `lastTickTime`
290
+ * (0 for a never-ticked group), never a fabricated wall-clock.
291
+ */
292
+ render(t?: number): void;
293
+ /** Set a child's current time without touching its siblings (updates
294
+ * `pausedTime` for a jump-free resume). Chainable; `render()` to reflect it. */
471
295
  setChildTime(nameOrAnim: string | KeyframesAnimation<V>, t: number): this;
472
- /**
473
- * Advance all child animations to absolute clock `t`. SYNC on the steady
474
- * path (J.W6 S1): children that all step synchronously advance the group
475
- * with no per-frame `Promise.all`/microtask hop; a thenable only on a
476
- * genuinely-async child or the over-`YIELD_BATCH` yield path.
477
- */
296
+ /** Advance all child animations to absolute clock `t`. SYNC on the steady path
297
+ * (J.W6 S1): all-synchronous children advance with no per-frame microtask hop;
298
+ * a thenable only on an async child or the over-`YIELD_BATCH` yield path. */
478
299
  advanceTo(t: number): this | Promise<this>;
479
- /** The post-advance tail — `onEnd` once the render marked done. */
480
- private _endAdvance;
481
- /**
482
- * One frame of the group's draw loop (driven by `RAFPlayback.loop`): ticks
483
- * all children, then renders (single-target: grouped blending; multi-target:
484
- * per-child). Returns whether the loop should continue.
485
- */
300
+ /** One frame of the group's draw loop: tick all children, then render. */
486
301
  private _frame;
487
- /** The post-advance render half of `_frame` — composite, or settle. */
302
+ /** The post-advance render half of `_frame` — composite, or settle on done. */
488
303
  private _renderFrame;
489
304
  private _resolvePlay;
490
- /**
491
- * The completion front-door (G.W13) — `await group.finished` resolves once
492
- * the in-flight composite play settles. Exposes the ONE held
493
- * `_playingPromise` `play()` constructs (the re-entrant guard returns it;
494
- * the `finally`-clear nulls it on settle) — NOT a second completion
495
- * lifecycle. A settled (or never-played) group resolves immediately.
496
- */
305
+ /** The completion front-door (G.W13) — `await group.finished` resolves once
306
+ * the in-flight composite play settles. Exposes the ONE held `_playingPromise`
307
+ * (a settled/never-played group resolves immediately). */
497
308
  get finished(): Promise<void>;
498
- /**
499
- * Start the animation group. Resolves when all children complete (or on
500
- * explicit stop/reset). Re-entrant: a `play()` while one is in flight
501
- * returns the same promise rather than leaking a second draw loop. Under
502
- * `respectReducedMotion` + an active query, snaps every child to its final
503
- * frame in a single composite (no rAF loop), then settles as a completed
504
- * play would.
505
- */
309
+ /** Start the group. Resolves when all children complete (or on stop/reset).
310
+ * Re-entrant: an in-flight `play()` returns the same promise. Under
311
+ * `respectReducedMotion` + an active query, snaps to final (no rAF loop). */
506
312
  play(): Promise<void>;
507
- /**
508
- * `prefers-reduced-motion` snap: rest = final, paint it, settle — the SAME
509
- * terminal path a completed play takes, motion elided. Every child advances
510
- * to its final frame, one composite paints, `settle()` readies the group for
511
- * replay (final frame stays on the target(s), matching `Animation`'s snap).
512
- */
313
+ /** `prefers-reduced-motion` snap: rest = final, paint it, settle — the SAME
314
+ * terminal path a completed play takes, motion elided. */
513
315
  private _playReducedMotion;
514
- /**
515
- * Pause the group — idempotent. Pausing an already-paused (or
516
- * not-yet-started) group is a no-op, NOT a resume (use {@link toggle} for
517
- * the explicit flip). Cancels the rAF loop immediately and renders a
518
- * final-frame snapshot so the visual matches the exact pause moment.
519
- */
316
+ /** Pause the group — idempotent. Pausing an already-paused (or not-yet-started)
317
+ * group is a no-op, NOT a resume. Cancels the rAF loop + renders a final-frame
318
+ * snapshot so the visual matches the pause moment. */
520
319
  pause(): this;
521
- /**
522
- * Resume the group — idempotent. Unpauses every child DIRECTLY (not via
523
- * `child.resume()`, which would start each child's own rAF loop — the
524
- * group's draw loop owns the ticking) and re-registers that loop.
525
- */
320
+ /** Resume the group — idempotent. Unpauses every child DIRECTLY (not via
321
+ * `child.resume()` — the group's draw loop owns the ticking) + re-registers it. */
526
322
  resume(): this;
527
323
  /** The explicit flip: pauses if playing, resumes if paused. */
528
324
  toggle(): this;
529
- /**
530
- * Pure state teardown — never paints. Releases every child
531
- * (`managed = false`, `child.settle()`) and clears the group's playback
532
- * flags. Completion and the reduced-motion snap both end here, leaving the
533
- * rest frame on the target(s).
534
- */
325
+ /** Pure state teardown — never paints. Releases every child (`managed = false`,
326
+ * `child.settle()`) and clears the group flags, leaving the rest frame painted. */
535
327
  settle(): this;
536
- /**
537
- * Explicit rewind: paint every started child back to its INITIAL frame, then
538
- * settle — the user-facing "return to start". Completion does NOT come here
539
- * (it settles where the fill contract rested the pixels).
540
- */
328
+ /** Explicit rewind: paint every started child back to its INITIAL frame, then
329
+ * settle — the user-facing "return to start" (completion does NOT come here). */
541
330
  reset(): this;
542
- /**
543
- * Halt the draw loop, rewind to the initial frame (the transport-stop
544
- * semantic the demo's controls expect), and resolve any pending `play()`.
545
- */
331
+ /** Halt the draw loop, rewind to the initial frame (the transport-stop
332
+ * semantic the demo's controls expect), and resolve any pending `play()`. */
546
333
  stop(): this;
547
334
  playing(): boolean;
548
- forcePause(): void;
549
- forcePlay(): void;
550
- /**
551
- * Set layer config for an animation by name or reference. Chainable; throws
552
- * on an unregistered key (silent no-ops were hiding consumer bugs).
553
- */
335
+ /** Set layer config for an animation by name or reference. Chainable. */
554
336
  setLayerConfig(nameOrAnim: string | KeyframesAnimation<V>, config: Partial<AnimationLayerConfig>): this;
555
337
  /** Convenience toggle for enabling/disabling a layer. Chainable. */
556
338
  setLayerEnabled(nameOrAnim: string | KeyframesAnimation<V>, enabled: boolean): this;
557
339
  /** Read the layer config for an animation by name or reference. */
558
340
  getLayerConfig(nameOrAnim: string | KeyframesAnimation<V>): AnimationLayerConfig | undefined;
559
- /**
560
- * Spring a layer's blend `weight` from its CURRENT value to `weight` (K.W11
561
- * PHYS-C — the spring-driven crossfade). Seeds a `SpringProgress` (via
562
- * `seedLayerSpring`), parks it on `layer.weightSpring`, and forces
563
- * `blendMode` to `weighted`. A re-target mid-flight RE-SEATS the in-flight
564
- * spring from its live `(value, velocity)` (`set target`) — no kink. Full
565
- * trajectory documentation in `./group-layer-springs`. Chainable.
566
- */
341
+ /** Spring a layer's blend `weight` to `weight` (K.W11 PHYS-C — body in
342
+ * `./layer-api`; a mid-flight re-target re-seats velocity-continuously). */
567
343
  transitionLayer(nameOrAnim: string | KeyframesAnimation<V>, target: {
568
344
  weight: number;
569
345
  spring?: LayerTransitionSpring;
570
346
  }): this;
571
- /**
572
- * Physically crossfade between two layers (K.W11 PHYS-C): spring layer `a`
573
- * down to weight `0` and layer `b` up to weight `1`, each over its own
574
- * `SpringProgress`. Two `transitionLayer` calls — the flagship demo moment, a
575
- * crossfade that overshoots and settles. Chainable.
576
- */
347
+ /** Crossfade two layers (K.W11 PHYS-C — body in `./layer-api`): two spring
348
+ * `transitionLayer` calls, a→0 and b→1. Chainable. */
577
349
  crossfade(a: string | KeyframesAnimation<V>, b: string | KeyframesAnimation<V>, options?: {
578
350
  spring?: LayerTransitionSpring;
579
351
  }): this;
580
- /**
581
- * Advance every spring-driven layer weight by the frame delta `dt` ms (K.W11
582
- * PHYS-C). Called from `advanceTo` ONLY when `_hasLayerSprings` is true, so
583
- * the constant-weight path pays nothing. On settle the converged value
584
- * commits to the constant `layer.weight` and the spring is CLEARED — the
585
- * `weighted` leaf's `?? layer.weight` read then serves the constant.
586
- */
352
+ /** Advance every spring-driven layer weight by `dt` ms (K.W11 PHYS-C). Called
353
+ * from `advanceTo` ONLY when `_hasLayerSprings` is true. R.W2 (lib-group C2):
354
+ * the integrate BODY moved to `./springs`; this thin delegate updates
355
+ * `_hasLayerSprings` from its "any still active?" return. */
587
356
  private advanceLayerSprings;
588
357
  }
589
358
 
@@ -593,7 +362,7 @@ export declare interface AnimationGroupEntry<V extends Vars> {
593
362
  layer: AnimationLayerConfig;
594
363
  }
595
364
 
596
- /** Input type for AnimationGroup constructor — bare Animation or Animation with layer config. */
365
+ /** Input — a bare Animation or one with a layer config. */
597
366
  declare type AnimationGroupInput<V extends Vars> = KeyframesAnimation<V> | {
598
367
  animation: KeyframesAnimation<V>;
599
368
  layer?: Partial<AnimationLayerConfig>;
@@ -751,10 +520,8 @@ declare namespace AnimationPresets {
751
520
  notificationBounce,
752
521
  spinner,
753
522
  parallaxScroll,
754
- slideInLeftKeyframes,
755
523
  slideInLeft,
756
524
  slideOutLeft,
757
- slideInRightKeyframes,
758
525
  slideInRight,
759
526
  slideOutRight,
760
527
  hover,
@@ -778,13 +545,13 @@ export { AnimationTimelineValue }
778
545
 
779
546
  /** Attention animations — a one-shot nudge to draw the eye. */
780
547
  declare const attentionPresets: {
781
- readonly pulse: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
782
- readonly shake: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
783
- readonly bounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
784
- readonly flip: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
785
- readonly notificationBounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
786
- readonly springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
787
- readonly springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
548
+ readonly pulse: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
549
+ readonly shake: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
550
+ readonly bounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
551
+ readonly flip: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
552
+ readonly notificationBounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
553
+ readonly springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
554
+ readonly springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
788
555
  };
789
556
 
790
557
  export declare type BlendMode = "replace" | "add" | "weighted";
@@ -866,16 +633,6 @@ export declare interface CompileRefusal {
866
633
  */
867
634
  export declare type CompileRefusalReason = "weighted-blend" | "custom-renderer" | "perceptual-oklab" | "computed-unit-drift";
868
635
 
869
- /**
870
- * The COMPILER surface (L.W7 S3 `loadCompiler()`) — the engine core PLUS the
871
- * round-trip's BACKWARD half, `compileToCSS`. A consumer compiling an
872
- * orchestration graph to zero-runtime CSS pays for `engine` + `compile`, not
873
- * the ingest / motion / draw / preset weight.
874
- */
875
- export declare interface CompilerSurface extends EngineCore {
876
- compileToCSS: typeof compileToCSS;
877
- }
878
-
879
636
  /**
880
637
  * THE compiler (CC-1/CC-2/CC-3) — compile an orchestration graph to zero-runtime
881
638
  * CSS. Walks the input (`AnimationGroup` / `Sequence` / child list), emits one
@@ -906,9 +663,8 @@ declare type CompositeOperator = "replace" | "add" | "accumulate";
906
663
  * Feature-detect (`"ScrollTimeline" in window` / `"ViewTimeline" in window`)
907
664
  * and construct a NATIVE `AnimationTimeline` for the additive WAAPI scroll
908
665
  * bridge (D-LIB-2 / F-5). Returns `null` where the platform lacks the API
909
- * (Firefox today, SSR, jsdom) — the caller then keeps the JS {@link Timeline}
910
- * sampler, which is the proven fallback AND the only general driver over
911
- * non-DOM targets.
666
+ * (Firefox today, SSR, jsdom) — the caller then keeps the JS Timeline sampler,
667
+ * which is the proven fallback AND the only general driver over non-DOM targets.
912
668
  *
913
669
  * CRITICAL — the ARCH-kill HOLDS: this does NOT replace the JS sampler. Native
914
670
  * scroll-driven is Chromium-only / not-Baseline, and the JS `Timeline` is a
@@ -917,7 +673,7 @@ declare type CompositeOperator = "replace" | "add" | "accumulate";
917
673
  * bridge is a pure additive fast lane where supported + eligible. No polyfill.
918
674
  *
919
675
  * Light: a runtime `in`-detect over the `window` globals — zero static
920
- * value.js / engine edge, so importing this keeps `timeline.ts` light.
676
+ * value.js / engine edge, so importing this keeps the timeline zone light.
921
677
  */
922
678
  export declare function createNativeTimeline(spec: NativeTimelineSpec): AnimationTimeline | null;
923
679
 
@@ -937,7 +693,33 @@ export declare function createNativeTimeline(spec: NativeTimelineSpec): Animatio
937
693
  declare function createScrollScene(spec?: ScrollSceneOptions | CSSTimelineOptions): ScrollScene;
938
694
 
939
695
  export declare class CSSKeyframesAnimation<V extends Vars> extends KeyframesAnimation<V> {
696
+ /**
697
+ * Q.WD1-bind S2 (DM-22) — the timeline a scroll-range named selector resolves
698
+ * its phase against. Stored by {@link bindTimeline} for the no-timeline guard's
699
+ * check; `undefined` until a timeline is bound. A scroll-context operation
700
+ * specific to CSS keyframes with named selectors (the base `Animation` class is
701
+ * value.js-/scroll-agnostic), so the field + method live here.
702
+ */
703
+ private _boundTimeline?;
940
704
  constructor(options?: Partial<InputAnimationOptions>, ...targets: HTMLElement[]);
705
+ /**
706
+ * Q.WD1-bind S2 (DM-22) — the attach-time deferred-resolution seam. A
707
+ * scroll-range named keyframe selector (`entry`/`exit`/`cover`/`contain`)
708
+ * ingests OPAQUELY (the L.W1 S4 floor) and is RESOLVABLE only under a timeline;
709
+ * `bindTimeline` is where that resolution happens. It walks `templateFrames`,
710
+ * resolves each named-selector start to a numeric `%` `ValueUnit` via
711
+ * {@link namedSelectorToFraction}, CLEARS the `NAMED_SELECTOR_SUPERTYPE` tag (so
712
+ * the resolved frame is indistinguishable from an author-written `%` at the sort
713
+ * step — no NaN), and re-compiles. The play-time guard
714
+ * (`assertNoUnresolvedNamedSelector`) then finds zero unresolved frames and
715
+ * passes silently — so this MUST land before the guard fires (the gate-enforced
716
+ * sub-wave ordering: the guard over-throws on a bound animation if the resolver
717
+ * is absent).
718
+ *
719
+ * Idempotent + safe to call before `fromString`: with no named frames the walk
720
+ * is a no-op; calling it after a NaN-producing `parse()` purges the NaN frames.
721
+ */
722
+ bindTimeline(timeline: Timeline): this;
941
723
  /**
942
724
  * One transform-resolution seam for the three `from*` entry points:
943
725
  * a supplied transform is the consumer's renderer (vars arrive
@@ -1087,7 +869,7 @@ declare interface Diagnostic extends Partial<ParseDiagnostic> {
1087
869
  * WAAPI-reason rows are AUTHORED here but POPULATED by K.W8 (which owns the
1088
870
  * CSSOM walk that produces them).
1089
871
  */
1090
- declare type DiagnosticCode = "EMPTY_PARSE" | "UNKNOWN_TIMING_FN" | "COMPOSITION_FALLBACK" | "PARSE_ERROR" | "CORS_SKIP" | "WAAPI_INELIGIBLE" | "ADOPT_REFUSE";
872
+ declare type DiagnosticCode = "EMPTY_PARSE" | "UNKNOWN_TIMING_FN" | "COMPOSITION_FALLBACK" | "PARSE_ERROR" | "CORS_SKIP" | "WAAPI_INELIGIBLE" | "ADOPT_REFUSE" | "PROPERTY_REGISTER_REJECTED" | "CUSTOM_FN_ARG_DROP";
1091
873
 
1092
874
  declare const DIRECTIONS: readonly ["normal", "reverse", "alternate", "alternate-reverse"];
1093
875
 
@@ -1135,14 +917,14 @@ export declare function drag2D(element: HTMLElement, options?: {
1135
917
 
1136
918
  /**
1137
919
  * The 2-D drag sugar — two one-axis {@link Draggable}s composed behind a
1138
- * single `(x, y, vx, vy)` surface. Split out of `drag.ts` (the 1-D engine)
920
+ * single `(x, y, vx, vy)` surface. Split out of `draggable.ts` (the 1-D engine)
1139
921
  * as additive sugar: the engine stays one-dimensional (KISS); this module is
1140
922
  * the front door that spares every 2-D consumer the two-`Draggable`
1141
923
  * boilerplate. LIGHT — it imports only `Draggable` + `DragOptions` from
1142
- * `./drag`, so it carries zero static `@mkbabb/value.js` edge.
924
+ * `./draggable`, so it carries zero static `@mkbabb/value.js` edge.
1143
925
  *
1144
- * Re-exported THROUGH `drag.ts` so the barrel `export { drag, Draggable,
1145
- * drag2D } from "./drag"` keeps resolving unchanged.
926
+ * The `drag/index.ts` barrel re-exports `drag2D` + `Drag2DHandle` (R.W1 — the
927
+ * barrel owns the unified surface; no flat-sibling relay through `draggable.ts`).
1146
928
  */
1147
929
  /**
1148
930
  * The composite handle a {@link drag2D} returns — two one-axis `Draggable`s
@@ -1469,53 +1251,28 @@ export declare interface ElementMorphOptions {
1469
1251
  transformOrigin?: string;
1470
1252
  }
1471
1253
 
1472
- /**
1473
- * The engine CORE surface — `Animation` / `CSSKeyframesAnimation` /
1474
- * `AnimationGroup` + the timing/keyframe helpers + the option constants. This
1475
- * is `./engine`'s own runtime exports: parse + interpolate WITHOUT the
1476
- * ingest / compile / motion-path / draw-svg / animate / preset front doors. The
1477
- * granular `loadEngine()` (L.W7 S3) resolves exactly this — a consumer that
1478
- * needs only `new CSSKeyframesAnimation(opts).fromString(css)` pays for the
1479
- * `engine` chunk alone, not the eight-chunk full surface.
1480
- */
1481
- export declare interface EngineCore {
1482
- /** The core engine constructor (PKG-3, L.W8 §S4 — renamed from `Animation`). */
1483
- KeyframesAnimation: typeof KeyframesAnimation;
1484
- /** @deprecated Use {@link KeyframesAnimation}. Backward-compat alias (PKG-3). */
1485
- Animation: typeof KeyframesAnimation;
1486
- CSSKeyframesAnimation: typeof CSSKeyframesAnimation;
1487
- AnimationGroup: typeof AnimationGroup;
1488
- getAnimationId: (animation: KeyframesAnimation | string) => string;
1489
- getTimingFunction: (timingFunction: TimingFunction | TimingFunctionNames | string | undefined) => TimingFunction | undefined;
1490
- resolveKeyframes: (input: string | Stylesheet) => ResolvedKeyframes;
1491
- DIRECTIONS: readonly AnimationOptions["direction"][];
1492
- FILL_MODES: readonly AnimationOptions["fillMode"][];
1493
- defaultOptions: AnimationOptions;
1494
- defaultLayerConfig: AnimationLayerConfig;
1495
- }
1496
-
1497
1254
  /** Entrance animations — bring an element INTO view. */
1498
1255
  declare const enterPresets: {
1499
- readonly fadeIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1500
- readonly slideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1501
- readonly slideInLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1502
- readonly slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1503
- readonly rotateIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1504
- readonly blurIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1505
- readonly springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1506
- readonly springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1507
- readonly jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1256
+ readonly fadeIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1257
+ readonly slideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1258
+ readonly slideInLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1259
+ readonly slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1260
+ readonly rotateIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1261
+ readonly blurIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1262
+ readonly springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1263
+ readonly springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1264
+ readonly jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1508
1265
  };
1509
1266
 
1510
1267
  /** Exit animations — take an element OUT of view. */
1511
1268
  declare const exitPresets: {
1512
- readonly fadeOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1513
- readonly slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1514
- readonly slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1515
- readonly blurOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1516
- readonly warpLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1517
- readonly warpRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1518
- readonly jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1269
+ readonly fadeOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1270
+ readonly slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1271
+ readonly slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1272
+ readonly blurOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1273
+ readonly warpLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1274
+ readonly warpRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1275
+ readonly jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1519
1276
  };
1520
1277
 
1521
1278
  /**
@@ -1746,15 +1503,19 @@ declare const fromLiveAnimations: <V extends Vars = any>(target?: Document | Ele
1746
1503
  *
1747
1504
  * @param from the source SVG path `d` string.
1748
1505
  * @param to the target SVG path `d` string (differing geometry).
1749
- * @param options `{ samples?, target?, autoPlay?, ...animationOptions }`.
1506
+ * @param options `{ samples?, target?, orient?, autoPlay?, ...animationOptions }`.
1750
1507
  *
1751
1508
  * @example
1752
- * // Morph a triangle into a square over 1s:
1509
+ * // Morph a triangle into a square over 1s, RENDERING onto a live <path>:
1510
+ * const path = document.querySelector("path");
1753
1511
  * const m = fromMorphSVG(
1754
1512
  * "M 0 0 L 100 0 L 50 100 Z",
1755
1513
  * "M 0 0 L 100 0 L 100 100 L 0 100 Z",
1756
- * { duration: 1000 },
1514
+ * { duration: 1000, target: path },
1757
1515
  * );
1516
+ * // each frame the engine writes path.style.d = path("…") + --morph-d so the
1517
+ * // morphing shape paints directly (no author-side reader needed on Chromium/
1518
+ * // Safari; `<path style="d: var(--morph-d)">` is the Firefox-lags fallback).
1758
1519
  */
1759
1520
  declare function fromMorphSVG<V extends Record<string, any> = any>(from: string, to: string, options?: MorphSVGOptions): CSSKeyframesAnimation<V>;
1760
1521
 
@@ -1858,32 +1619,6 @@ export declare interface IngestResult<V extends Vars = any> {
1858
1619
  diagnostics: Diagnostic[];
1859
1620
  }
1860
1621
 
1861
- /**
1862
- * The INGEST surface (L.W7 S3 `loadIngest()`) — the engine core PLUS the
1863
- * forward-pointed live-web walk (`fromStyleSheets` / `fromLiveAnimations` /
1864
- * `resolveLiveKeyframes` / `adoptRunning`) and the scroll-grammar round-trip
1865
- * (`ScrollScene` + `parseScrollCSS` / `serializeScrollOptions` / …). A
1866
- * consumer ingesting CSSOM / adopting a running animation / driving a scroll
1867
- * scene pays for `engine` + `ingest` + `scroll-scene`, not the compile /
1868
- * motion / draw / preset weight.
1869
- */
1870
- export declare interface IngestSurface extends EngineCore {
1871
- fromStyleSheets: typeof fromStyleSheets;
1872
- fromLiveAnimations: typeof fromLiveAnimations;
1873
- resolveLiveKeyframes: typeof resolveLiveKeyframes;
1874
- adoptRunning: typeof adoptRunning;
1875
- ScrollScene: typeof ScrollScene;
1876
- createScrollScene: typeof createScrollScene;
1877
- parseScrollCSS: typeof parseScrollCSS;
1878
- parseScrollTimeline: typeof parseScrollTimeline;
1879
- parseScrollRange: typeof parseScrollRange;
1880
- serializeScrollOptions: typeof serializeScrollOptions;
1881
- roundTripScrollCSS: typeof roundTripScrollCSS;
1882
- dispatchScrollBackend: typeof dispatchScrollBackend;
1883
- resolveRange: typeof resolveRange;
1884
- pinCSS: typeof pinCSS;
1885
- }
1886
-
1887
1622
  export declare type InputAnimationOptions = Partial<{
1888
1623
  duration: number | string;
1889
1624
  delay: number | string;
@@ -1907,150 +1642,97 @@ declare const jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimati
1907
1642
 
1908
1643
  declare const jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1909
1644
 
1910
- /** A keyframe map: percent/keyword stops → partial var frames. */
1911
- export declare type KeyframeMap<V extends Vars> = Map<string, Partial<V>> | Record<string, Partial<V>>;
1912
-
1913
1645
  /**
1914
1646
  * The core animation engine — keyframes, timing, interpolation, playback.
1915
1647
  *
1916
- * ── PKG-3 RENAME (L.W8 §S4 · audit W126). Formerly `Animation`; renamed to
1917
- * `KeyframesAnimation` because the old name collided with the ambient
1918
- * `globalThis.Animation` (WAAPI), leaking a numeric-suffixed collision alias
1919
- * into the d.ts roll-up (packaging-k.md:118-127). The old `Animation` name
1920
- * survives as a backward-compat RE-EXPORT alias (value + type) below — see the
1921
- * `@deprecated` `Animation` export for the full rationale. Gated by
1922
- * `proof:pkg3-clean`. The runtime constructor is `KeyframesAnimation`.
1648
+ * PKG-3 RENAME (L.W8): formerly `Animation`; renamed to `KeyframesAnimation`
1649
+ * because the old name collided with the ambient `globalThis.Animation` (WAAPI),
1650
+ * leaking a suffixed collision alias into the d.ts. The legacy `Animation`
1651
+ * re-export alias was DROPPED in 5.0.0 (Q.WE1 — NO-LEGACY).
1923
1652
  */
1924
- declare class KeyframesAnimation<V extends Vars = any> {
1653
+ export declare class KeyframesAnimation<V extends Vars = any> {
1925
1654
  id: number;
1926
1655
  name: string | undefined;
1927
1656
  superKey: string | undefined;
1928
1657
  targets: HTMLElement[];
1929
1658
  options: AnimationOptions;
1930
- /**
1931
- * The frame-compilation half — template frames → sampled `frames[]`.
1932
- * `Animation` composes one and delegates `addFrame`/`parse` + the frame
1933
- * accessors (`templateFrames`/`parsedVars`/`frames`/`frameId`) to it.
1934
- * Assigned in the constructor once `options` exists (the compiler holds a
1935
- * live reference to that options object).
1936
- *
1937
- * READ-ONLY surface (G.W19): the backing `_compiler` is written ONLY by the
1938
- * constructor and {@link adoptCompiled}. An external `animation.compiler = …`
1939
- * write was the one cross-boundary reach-in vector that could desync the
1940
- * live-options reference (`this.options !== this.compiler.options`); making
1941
- * `compiler` a get-only accessor makes that reach-in a COMPILE error, not a
1942
- * convention. Adopt a compiled state via `adoptCompiled(source)`.
1943
- */
1659
+ /** The frame-compilation half — template frames → sampled `frames[]`. The
1660
+ * class composes one and delegates `addFrame`/`parse` + the frame accessors
1661
+ * to it. READ-ONLY surface (G.W19): the backing `_compiler` is written ONLY
1662
+ * by the constructor + `adoptCompiled` (via `_setCompiler`); an external
1663
+ * `animation.compiler = …` reach-in is a COMPILE error (the live-options
1664
+ * desync lock). */
1944
1665
  private _compiler;
1945
1666
  get compiler(): FrameCompiler<V>;
1946
- /**
1947
- * THE rAF owner for this animation — the standalone rAF play loop and
1948
- * the WAAPI shadow tick both ride it, so `stop()` halts either
1949
- * uniformly and no raw rAF handle leaks onto the instance.
1950
- */
1667
+ /** THE rAF owner for this animation — the standalone play loop and the WAAPI
1668
+ * shadow tick both ride it, so `stop()` halts either uniformly. */
1951
1669
  readonly playback: RAFPlayback;
1952
- /**
1953
- * The live WAAPI compositor animations during a `_playWAAPI` delegation
1954
- * (one per target), populated by `playWAAPI` and cleared on teardown.
1955
- * The lifecycle methods (`stop`/`reset`) cancel these so a stopped
1956
- * compositor animation never keeps painting and the awaited play
1957
- * promise never hangs. Empty on the rAF path.
1958
- */
1959
- _waAnimations: globalThis.Animation[];
1670
+ /** The standalone-play machine's OWN run-state (R.W2 — DI by composition):
1671
+ * the deferred play resolver, the held play promise, the live WAAPI handles,
1672
+ * the bound frame callback, the hoisted zero-alloc interp buffer. The five
1673
+ * fields formerly privacy-inverted onto the class body + re-published through
1674
+ * the excised `PlaybackHost` interface; the `./playback` free functions now
1675
+ * own them via `this._playback` directly (no cast, no re-publication). */
1676
+ readonly _playback: PlaybackState;
1960
1677
  startTime: number | undefined;
1961
1678
  pausedTime: number;
1962
1679
  t: number;
1963
1680
  iteration: number;
1964
- /**
1965
- * Structured parse/honoring diagnostics (K.W7 S4) — surfaced from the
1966
- * adapter's `resolveKeyframes` ({@link CSSKeyframesAnimation.fromString})
1967
- * and joined by the engine's own composition-fallback rows. A FLAT additive
1968
- * array of stable-coded {@link Diagnostic} rows; empty on a clean parse with
1969
- * no fallback. Every SILENT fallback site is mirrored here — the honesty
1970
- * surface (`proof:diagnostics-channel`). Queryable; no console output.
1971
- */
1681
+ /** Structured parse/honoring diagnostics (K.W7 S4) — a FLAT additive array
1682
+ * of stable-coded {@link Diagnostic} rows surfaced from `resolveKeyframes` +
1683
+ * the engine's composition-fallback rows; empty on a clean parse. Every
1684
+ * SILENT fallback site is mirrored here (`proof:diagnostics-channel`). */
1972
1685
  diagnostics: Diagnostic[];
1973
- /**
1974
- * The captured UNDERLYING base value for each composited leaf (K.W7 S1),
1975
- * keyed by the flat property key — the per-element numeric base the
1976
- * `add`/`accumulate` operator accumulates ONTO (snapshotted the first time a
1977
- * composited leaf is applied). Empty for a pure-`replace` animation (the
1978
- * zero-overhead path). The capture/accumulate logic lives in
1979
- * `./engine-composition` ({@link applyComposition}/`captureUnderlyingBase`).
1980
- */
1981
- private _compositionBase;
1686
+ /** The captured UNDERLYING base value per composited leaf (K.W7 S1) — the
1687
+ * per-element numeric base `add`/`accumulate` accumulates ONTO; empty for a
1688
+ * pure-`replace` animation. INTERNAL — read by `./interpolate` (R.W2). */
1689
+ _compositionBase: Map<string, number[]>;
1982
1690
  /** Properties whose non-numeric composite already emitted its
1983
- * `COMPOSITION_FALLBACK` row — so a long playback emits the honesty row
1984
- * ONCE per property, not once per frame (S3/S4). */
1985
- private _compositionFallbackSeen;
1986
- /** True once `fromString`/`addFrame` saw a non-`replace` operator — the hot
1987
- * path skips ALL composition work when this is false (the predictable
1988
- * per-animation-constant branch the §gate's clause (f) measures free). */
1989
- private _hasComposition;
1691
+ * `COMPOSITION_FALLBACK` row (once per property, not per frame). INTERNAL —
1692
+ * read by `./interpolate` (R.W2). */
1693
+ _compositionFallbackSeen: Set<string>;
1694
+ /** True once a non-`replace` operator was seen — the hot path skips ALL
1695
+ * composition work when false. INTERNAL — read by `./interpolate` (R.W2). */
1696
+ _hasComposition: boolean;
1990
1697
  started: boolean;
1991
1698
  done: boolean;
1992
1699
  reversed: boolean;
1993
1700
  paused: boolean;
1994
- /**
1995
- * True when an `AnimationGroup` is driving this animation's
1996
- * `advanceTo()` and `interpFrames()` from its own rAF loop. Set by
1997
- * the group at construction; standalone `.play()` / `.draw()`
1998
- * throw when this is true rather than racing the group.
1999
- */
1701
+ /** True when an `AnimationGroup` drives this animation's `advanceTo()`/
1702
+ * `interpFrames()` from its own rAF loop. Standalone `.play()` throws when
1703
+ * set rather than racing the group. */
2000
1704
  managed: boolean;
2001
- /**
2002
- * If the most recent `play()` was rejected by WAAPI eligibility
2003
- * but `useWAAPI: true` was requested, this records the reason.
2004
- * Queryable by debug builds — no console output is produced.
2005
- */
1705
+ /** If the most recent `play()` fell back from WAAPI to rAF despite
1706
+ * `useWAAPI: true`, this records the reason. Queryable; no console output. */
2006
1707
  waapiIneligibleReason: string | undefined;
2007
1708
  unflatten: boolean;
2008
- private resolvePromise;
2009
- private _playingPromise;
2010
- /**
2011
- * Pre-bound frame callback — allocated once to avoid creating a new
2012
- * closure on every playback loop start.
2013
- */
2014
- private _boundFrame;
2015
- /**
2016
- * The ONE output buffer for the standalone play loop's `interpFrames`
2017
- * calls — reused every frame so steady-state playback allocates no
2018
- * per-frame result object (the primitive-level analogue of the group's
2019
- * hoisted `_grouped` buffer, gated by `proof:standalone-zero-alloc`).
2020
- * The play path (`_frame`) never returns this object to a consumer, so
2021
- * reuse is safe; `at()` (a query whose result the caller keeps) still
2022
- * allocates a fresh object.
2023
- */
2024
- private _interpOut;
2025
- /**
2026
- * The compile-stable union of every frame's `flatVars` keys — the maximal
2027
- * key-set any `interpFrames` call can write. Fixed at `parse` (the keys
2028
- * never change across frames; a color-space renormalize re-derives the same
2029
- * carriers under the same keys). It is what `clearBuffer` null-fills to keep
2030
- * a reused buffer stale-free WITHOUT `delete` (F.W4 S1 — the V8 dictionary-
2031
- * mode trap the delete-loop fell into). Exposed (read-only) as `flatKeys`
2032
- * so the `AnimationGroup` can size its own composite buffer the same way.
2033
- */
2034
- private _stableKeys;
2035
- /**
2036
- * The consumer's EXPLICIT constructor options (NOT merged with defaults) —
1709
+ /** The compile-stable union of every frame's `flatVars` keys, fixed at
1710
+ * `parse` — what `clearBuffer` null-fills to keep a reused buffer stale-free
1711
+ * WITHOUT `delete` (F.W4 S1, the V8 dictionary-mode trap). Exposed read-only
1712
+ * as `flatKeys` so the group sizes its composite buffer the same way.
1713
+ * INTERNAL — read by `./interpolate` (R.W2). */
1714
+ _stableKeys: string[];
1715
+ /** The consumer's EXPLICIT constructor options (NOT merged with defaults) —
2037
1716
  * retained so `fromString` can layer a parsed style-rule `animation`
2038
- * shorthand UNDER them (constructor-explicit wins over parsed-from-CSS, F.W8).
2039
- */
1717
+ * shorthand UNDER them (constructor-explicit wins, F.W8). */
2040
1718
  protected _ctorOptions: Partial<InputAnimationOptions>;
2041
1719
  /** The compile-stable union of this animation's interpolated keys. */
2042
1720
  get flatKeys(): readonly string[];
2043
1721
  /**
2044
- * The instance's ONE default DOM-style renderer, allocated once.
2045
- * "Did the consumer supply a custom transform?" is a reference
2046
- * comparison against this single value ({@link usesDefaultRenderer}) —
2047
- * typed and bind-proof, unlike a Symbol tag on a closure, which
2048
- * `Function.prototype.bind` silently drops.
1722
+ * The instance's ONE default DOM-style renderer, allocated once. "Did the
1723
+ * consumer supply a custom transform?" is a reference comparison against this
1724
+ * single value ({@link usesDefaultRenderer}) — typed and bind-proof.
2049
1725
  */
2050
1726
  protected readonly _defaultTransform: TransformFunction<V>;
2051
1727
  /** True when `fn` is this instance's default DOM-style renderer. */
2052
1728
  usesDefaultRenderer(fn: TransformFunction<V> | undefined): boolean;
2053
- private dispatchAnimationEvent;
1729
+ /**
1730
+ * Fire a lifecycle `AnimationEvent` on each bound target (R.W2 — F-6, body in
1731
+ * `./playback`). INTERNAL: the play machine calls it on the concrete
1732
+ * animation — kept ON the class but NOT `private`, reached by direct field
1733
+ * access (the old `PlaybackHost` re-publication + cast are excised).
1734
+ */
1735
+ dispatchAnimationEvent(type: string): void;
2054
1736
  constructor(options?: Partial<InputAnimationOptions>, targets?: HTMLElement[] | HTMLElement | undefined, name?: string | undefined, superKey?: string | undefined);
2055
1737
  get templateFrames(): TemplateAnimationFrame<V>[];
2056
1738
  set templateFrames(value: TemplateAnimationFrame<V>[]);
@@ -2059,56 +1741,21 @@ declare class KeyframesAnimation<V extends Vars = any> {
2059
1741
  get frameId(): number;
2060
1742
  /** Append a template frame (delegated to the compiler). Chainable. */
2061
1743
  addFrame<K extends V>(start: number | string | ValueUnit<number>, vars: Partial<K>, transform?: TransformFunction<K>, timingFunction?: InputAnimationOptions["timingFunction"], composition?: CompositeOperator): KeyframesAnimation<K>;
2062
- /** Compile the template frames into the sampled `frames[]`. Chainable. */
1744
+ /** Compile the template frames into the sampled `frames[]` (R.W2 body in
1745
+ * `./compile-bridge`). Chainable. */
2063
1746
  parse(): this;
2064
- /**
2065
- * Set `_hasComposition` (K.W7 S1) — true iff ANY compiled frame carries a
2066
- * non-`replace` `animation-composition` operator (the hot-path branch reads
2067
- * this ONE per-animation constant; a pure-`replace` animation never pays for
2068
- * the composition work) — and reset the per-run base/fallback caches so a
2069
- * re-parse re-snapshots the underlying base. See `./engine-composition`.
2070
- */
2071
- private computeHasComposition;
2072
1747
  /**
2073
1748
  * Adopt another animation's ALREADY-COMPILED state as ONE atomic motion
2074
- * (G.W19) — the first-class verb for the "single-compile, then transplant"
2075
- * pattern (E.W8 S0): a throwaway animation is built + compiled ONCE off the
2076
- * new keyframes, and the live animation adopts that compiled state without a
2077
- * second compile.
2078
- *
2079
- * The transplant moves the `{ compiler, options, unflatten }` triad together
2080
- * and re-binds the live-options reference BY CONSTRUCTION — `this.options` is
2081
- * read OFF the adopted compiler, so `this.options === this.compiler.options`
2082
- * holds without relying on the caller's assignment order. This is the
2083
- * invariant the demo formerly held by a comment + three ordered field writes;
2084
- * here it is the method's contract, enforced by `proof:adopt-compiled`. A
2085
- * `compiler` adopted WITHOUT re-binding `options` would leave the setters
2086
- * mutating one object while the compiler reads another — the exact desync
2087
- * the `6e29236` live-options lock guards against.
2088
- *
2089
- * Recomputes `_stableKeys` so `flatKeys` (the buffer-sizing contract)
2090
- * reflects the adopted compiled frames, not the pre-adopt key-set. Chainable.
2091
- *
2092
- * @param source an animation whose `compiler` is already compiled.
1749
+ * (G.W19 — body in `./compile-bridge`): moves the `{ compiler, options,
1750
+ * unflatten }` triad + re-binds the live-options reference BY CONSTRUCTION
1751
+ * (`proof:adopt-compiled`). Chainable.
2093
1752
  */
2094
1753
  adoptCompiled(source: KeyframesAnimation<V>): this;
2095
- /**
2096
- * Recompute `_stableKeys` — the union of every compiled frame's `flatVars`
2097
- * keys — after a (re)compile. The maximal key-set the `clearBuffer`
2098
- * null-fill resets, so a reused interpolation buffer stays in V8
2099
- * fast-properties mode without ever calling `delete` (F.W4 S1).
2100
- */
2101
- private computeStableKeys;
2102
- /**
2103
- * Option setters — the fail-explicit contract.
2104
- *
2105
- * Genuine omission (`undefined`/`null`) means "use the default" and is
2106
- * always accepted; present-but-malformed input THROWS a typed
2107
- * `AnimationOptionError` naming the option and the offending value.
2108
- * This is the same posture the layer API chose ("silent no-ops were
2109
- * hiding consumer bugs") applied to the whole options surface — no
2110
- * silent fallback, no silently-preserved previous value.
2111
- */
1754
+ /** INTERNAL (R.W2): the sanctioned backing-field write for `_compiler` (used
1755
+ * ONLY by `./compile-bridge`'s `adoptCompiled`). The `compiler` accessor
1756
+ * stays get-only — an external `animation.compiler = …` reach-in is a COMPILE
1757
+ * error (the G.W19 live-options-desync lock). */
1758
+ _setCompiler(compiler: FrameCompiler<V>): void;
2112
1759
  setTimingFunction(timingFunction: InputAnimationOptions["timingFunction"]): this;
2113
1760
  setIterationCount(iterationCount: InputAnimationOptions["iterationCount"]): this;
2114
1761
  setDuration(duration: InputAnimationOptions["duration"]): this;
@@ -2119,197 +1766,53 @@ declare class KeyframesAnimation<V extends Vars = any> {
2119
1766
  setRespectReducedMotion(respectReducedMotion: InputAnimationOptions["respectReducedMotion"]): this;
2120
1767
  setColorSpace(colorSpace: InputAnimationOptions["colorSpace"]): this;
2121
1768
  setHueMethod(hueMethod: InputAnimationOptions["hueMethod"]): this;
2122
- /**
2123
- * Set the LAYER-level `animation-composition` operator (L.W1 S5, Band A).
2124
- * Genuine omission (`undefined`) leaves the field unset — the serializer
2125
- * treats it as the CSS default `replace` and omits the longhand. A present
2126
- * value is stored verbatim (`replace` | `add` | `accumulate`), so a sibling
2127
- * `.class { animation-composition: add }` ingested by `fromString`
2128
- * round-trips on re-serialize.
2129
- */
2130
1769
  setComposite(composite: InputAnimationOptions["composite"]): this;
2131
1770
  setOptions(options: Partial<InputAnimationOptions>): this;
2132
1771
  reverse(): this;
2133
1772
  fillForwards(): void;
2134
1773
  fillBackwards(): void;
2135
- /**
2136
- * Where the playhead rests after a completed play — derived ONCE from
2137
- * `fillMode` (forwards/both → final; none/backwards → initial). This is
2138
- * the explicit rest-position contract: completion paints the rest frame
2139
- * per this derivation, and the reduced-motion snap is "rest = final,
2140
- * paint it, settle" — the same path a `fillMode: forwards` completion
2141
- * takes, not a separate code path.
2142
- */
1774
+ /** Where the playhead rests after a completed play (forwards/both → final;
1775
+ * none/backwards → initial) — body in `./interpolate`. */
2143
1776
  get restPosition(): "initial" | "final";
2144
- /** Paint the rest frame per the fill contract. */
1777
+ /** Paint the rest frame per the fill contract (body in `./interpolate`). */
2145
1778
  paintRest(): void;
2146
- /**
2147
- * Stateless progress query. Maps [0,1] from first keyframe to last,
2148
- * regardless of playback direction. `apply=true` invokes transform callbacks.
2149
- */
1779
+ /** The named-selector PLAY-TIME guard (Q.WD1 S3 — body in `./interpolate`).
1780
+ * INTERNAL (R.W2): the play machine + `at()` call it; NOT `private`. */
1781
+ assertNoUnresolvedNamedSelector(): void;
1782
+ /** Stateless progress query — maps [0,1] from first to last keyframe,
1783
+ * direction-agnostic (`apply=true` invokes transforms). Body in
1784
+ * `./interpolate`. */
2150
1785
  at(progress: number, apply?: boolean): Record<string, ValueUnit[]>;
2151
1786
  /**
2152
- * Interpolate all active frames at time `t`. This is the hot path —
2153
- * called once per rAF frame during playback.
2154
- *
2155
- * Uses binary search (O(log N)) to find the first matching frame,
2156
- * then scans neighbors to collect all overlapping frames at `t`
2157
- * (multiple properties may share the same time range).
2158
- *
2159
- * @param t - Current animation time in milliseconds
2160
- * @param transformFrames - If true, applies each frame's transform function to targets
2161
- * @param out - Optional output object to write results into. When
2162
- * provided, its keys are cleared first so no stale keys from a
2163
- * previous call leak through. Pass this per-animation to achieve
2164
- * zero-allocation steady-state playback.
2165
- * @returns Merged flat vars from all active frames
1787
+ * Interpolate all active frames at time `t` — the hot path (once per rAF
1788
+ * frame). R.W2 body in `./interpolate`; this is the thin public sampling
1789
+ * delegate the group, sequence, WAAPI build, and `at()` all drive. Zero-alloc
1790
+ * + fast-properties contract preserved (proof:standalone-zero-alloc /
1791
+ * proof:interp-fastprops).
2166
1792
  */
2167
1793
  interpFrames(t: number, transformFrames?: boolean, out?: Record<string, ValueUnit[]>): Record<string, ValueUnit[]>;
2168
- /**
2169
- * Clear a reused interpolation buffer to a stale-free state WITHOUT
2170
- * `delete` — the V8-correct stable-key null-fill (F.W4 S1). The key-set is
2171
- * compile-stable (`_stableKeys` is the union of every frame's `flatVars`
2172
- * keys, fixed at `parse`), so null-filling it keeps the buffer in
2173
- * fast-properties mode AND zero-alloc. Inactive keys read back `undefined`;
2174
- * every consumer of a reused buffer (the group blend, the unused play-loop
2175
- * `_interpOut`) skips them — only the standalone return path (which never
2176
- * reuses a buffer) must be `undefined`-free, and it takes the alias / fresh
2177
- * merge above.
2178
- */
2179
- private clearBuffer;
2180
- /**
2181
- * Interpolate ONE active frame at time `t` in place (lerp + optional
2182
- * transform). Lifted off the `interpFrames` hot loop so playback allocates
2183
- * no per-frame closure. A zero-width frame (`start === stop`, a degenerate
2184
- * keyframe pair) snaps to the endpoint instead of dividing by zero in
2185
- * `scale` (E-RT-5). The merge into the result buffer is done by the caller
2186
- * (F.W4 S3 — so the single-frame path can alias `flatVars` with no copy).
2187
- */
2188
- private processFrame;
2189
- /**
2190
- * Composite ONE frame's lerped numeric leaves onto the captured underlying
2191
- * base per its `animation-composition` operator (K.W7 S1) — the thin engine
2192
- * seam threading the live per-run state into the pure `./engine-composition`
2193
- * honoring (where the un-clamped add, repeat-aware accumulate, captured base,
2194
- * and non-numeric `replace`-fallback + `COMPOSITION_FALLBACK` row live).
2195
- */
2196
- private applyComposition;
2197
- /** SYNC unless `delay > 0` — then a thenable resolving after the sleep. */
2198
1794
  onStart(): Promise<void> | undefined;
2199
1795
  onEnd(): void;
2200
- /**
2201
- * Advance the playhead to absolute clock `t` (a rAF timestamp, NOT a
2202
- * delta). Lazily runs `onStart` on the first call, reconciles the
2203
- * pause/resume clock, and ends the iteration once `t` reaches the
2204
- * duration. This is the DRIVER-layer advance — the one meaning of the
2205
- * absolute-clock step, distinct from the `tickDt(dt)` stepper surface
2206
- * the rest of the engine canonicalized to.
2207
- *
2208
- * SYNC on the steady path (J.W6 S1 — the F.W5 held half, landed): every
2209
- * post-start frame returns a plain number (no per-frame promise+microtask
2210
- * hop); a thenable ONLY when the FIRST tick awaits the genuinely-async
2211
- * delay sleep. Ordering locked by proof:event-ordering.
2212
- */
2213
1796
  advanceTo(t: number): number | Promise<number>;
2214
- /** The post-start advance body — pause clock, local time, iteration end. */
2215
- private _advance;
2216
- /**
2217
- * One frame of the standalone rAF play path, driven by the shared
2218
- * `RAFPlayback.loop`. Returns whether the loop should continue.
2219
- */
1797
+ /** One frame of the standalone rAF play path (driven by `RAFPlayback.loop`). */
2220
1798
  private _frame;
2221
- /** The post-advance render half of `_frame` — paint, or settle on done. */
2222
- private _renderFrame;
2223
- private _resolvePlay;
2224
- /** Internal rAF-based play loop — loop ownership rides `this.playback`. */
2225
- private _playRAF;
2226
- /**
2227
- * Play via the Web Animations API. WAAPI handles visuals on the
2228
- * compositor thread; a shadow loop in `playWAAPI` (riding
2229
- * `this.playback`) drives `advanceTo()` so events, iteration count,
2230
- * pause/resume, and other lifecycle state stay coherent with the
2231
- * rAF path.
2232
- *
2233
- * No silent fallback — eligibility is decided once in `play()`
2234
- * before this is invoked, and runtime errors propagate.
2235
- */
2236
- private _playWAAPI;
2237
- /**
2238
- * Cancel the live WAAPI compositor animations (if any). Cancelling
2239
- * rejects each `wa.finished`, which `playWAAPI` catches as a halt — so
2240
- * this both stops the compositor paint AND unblocks the awaited play
2241
- * promise. No-op on the rAF path.
2242
- */
2243
- private _cancelWAAPI;
2244
- /**
2245
- * `prefers-reduced-motion` snap: rest = final, paint it, settle — the
2246
- * SAME terminal path a `fillMode: forwards` completion takes, with the
2247
- * motion elided. The lifecycle stays observable (`animationstart` →
2248
- * final paint → `animationend`) so consumers' event wiring is identical
2249
- * to a completed normal play.
2250
- */
2251
- private _playReducedMotion;
2252
- /**
2253
- * Mid-flight reduced-motion snap (D-LIB-3). A running rAF loop detected a
2254
- * live flip to `reduce`; converge to the rest frame and resolve the
2255
- * in-flight `play()` exactly as a forwards completion would. Distinct from
2256
- * `_playReducedMotion` (the up-front gate) only in that `animationstart`
2257
- * already fired — so here we paint final, mark done, end, settle, and
2258
- * release the awaiter. The WAAPI lane snaps via the same path: the up-front
2259
- * gate already routes reduced-motion away from WAAPI, and a live flip on a
2260
- * WAAPI animation cancels the compositor handles before settling.
2261
- */
2262
- private _snapToReducedMotion;
2263
- /**
2264
- * The completion front-door (G.W13) — `await anim.finished` resolves once
2265
- * the in-flight play settles. It exposes the ONE held `_playingPromise`
2266
- * `play()` already constructs (the re-entrant guard returns it; the
2267
- * `finally`-clear nulls it on settle) — NOT a second completion lifecycle.
2268
- * Two reads mid-play return the SAME promise. A settled (or never-played)
2269
- * animation reads `null` and resolves immediately: "not running" = "nothing
2270
- * to await" — the honest semantics for a getter that reports current
2271
- * settledness, not a pre-armed future run.
2272
- */
1799
+ /** The completion front-door (G.W13) — `await anim.finished` resolves once
1800
+ * the in-flight play settles (a settled/never-played animation resolves
1801
+ * immediately). Reads the ONE held promise off the composed `_playback`. */
2273
1802
  get finished(): Promise<void>;
2274
1803
  play(): Promise<void>;
2275
- /**
2276
- * Pause playback — idempotent. Pausing an already-paused (or
2277
- * not-yet-started) animation is a no-op, never a resume: a method named
2278
- * `pause` pauses. Use {@link resume} for the explicit resume.
2279
- */
2280
1804
  pause(): this;
2281
1805
  resume(): this;
2282
1806
  /** The explicit flip: pauses if playing, resumes if paused. */
2283
1807
  toggle(): this;
2284
- /**
2285
- * Halt playback where it stands: cancel the loop AND the WAAPI
2286
- * compositor animations, settle state, and resolve any pending `play()`
2287
- * promise. Never paints — `reset()` is the explicit rewind.
2288
- */
2289
1808
  stop(): void;
2290
1809
  playing(): boolean;
2291
- /** Returns the effective time accounting for direction reversal. */
2292
1810
  get effectiveT(): number;
2293
- /**
2294
- * Pure state teardown — flags, clocks, iteration. NEVER paints. This is
2295
- * the terminal half of the rest-position contract: completion paints
2296
- * the rest frame (via `onEnd` → `paintRest`) and then settles; the
2297
- * reduced-motion snap paints final and then settles. Settling is
2298
- * orthogonal to where the pixels rest.
2299
- */
2300
1811
  settle(): this;
2301
- /**
2302
- * Explicit rewind: paint the INITIAL frame, then settle. This is the
2303
- * user-facing "return to start" — rest position `initial`, painted
2304
- * deliberately — distinct from `settle()`, which tears down state and
2305
- * leaves the pixels where they rest.
2306
- */
2307
1812
  reset(): this;
2308
1813
  setTargets(...targets: HTMLElement[]): this;
2309
1814
  group(...animations: KeyframesAnimation<V>[]): AnimationGroup<V>;
2310
1815
  }
2311
- export { KeyframesAnimation as Animation }
2312
- export { KeyframesAnimation }
2313
1816
 
2314
1817
  /**
2315
1818
  * The JS scroll-progress sampler.
@@ -2320,24 +1823,19 @@ export { KeyframesAnimation }
2320
1823
  * (the Houdini native scroll timeline): API Extractor renamed the colliding
2321
1824
  * source class and re-exported it under a numeric-suffixed alias that leaked
2322
1825
  * into IDE hover text. Naming the class `KeyframesScrollTimeline` (no ambient
2323
- * collision) clears the rename; gated by `proof:pkg3-clean`. The old
2324
- * `ScrollTimeline` name survives as a backward-compat RE-EXPORT alias (value +
2325
- * type) — see the `@deprecated` `ScrollTimeline` export below; because the
2326
- * canonical name no longer collides, API Extractor emits the alias cleanly
2327
- * (`KeyframesScrollTimeline` exported under the `ScrollTimeline` name, no
2328
- * numeric suffix).
1826
+ * collision) clears the rename; gated by `proof:pkg3-clean`. The legacy
1827
+ * `ScrollTimeline` backward-compat RE-EXPORT alias was DROPPED in 5.0.0
1828
+ * (Q.WE1 — NO-LEGACY).
2329
1829
  */
2330
- declare class KeyframesScrollTimeline extends Timeline {
1830
+ export declare class KeyframesScrollTimeline extends Timeline {
2331
1831
  private threshold;
2332
1832
  private getScrollY;
2333
1833
  private getViewportHeight;
2334
1834
  constructor(options?: KeyframesScrollTimelineOptions);
2335
1835
  protected sample(): number;
2336
1836
  }
2337
- export { KeyframesScrollTimeline }
2338
- export { KeyframesScrollTimeline as ScrollTimeline }
2339
1837
 
2340
- declare interface KeyframesScrollTimelineOptions extends TimelineOptions {
1838
+ export declare interface KeyframesScrollTimelineOptions extends TimelineOptions {
2341
1839
  /** Viewport fraction for full progress. Default 0.35. */
2342
1840
  threshold?: number | undefined;
2343
1841
  /** Custom scroll position supplier. Default: window.scrollY. */
@@ -2345,8 +1843,6 @@ declare interface KeyframesScrollTimelineOptions extends TimelineOptions {
2345
1843
  /** Custom viewport height supplier. Default: window.innerHeight. */
2346
1844
  getViewportHeight?: (() => number) | undefined;
2347
1845
  }
2348
- export { KeyframesScrollTimelineOptions }
2349
- export { KeyframesScrollTimelineOptions as ScrollTimelineOptions }
2350
1846
 
2351
1847
  /**
2352
1848
  * Options for `AnimationGroup.transitionLayer` / `crossfade` (K.W11 PHYS-C).
@@ -2359,23 +1855,17 @@ declare type LayerTransitionSpring = Partial<Omit<SpringProgressOptions, "initia
2359
1855
 
2360
1856
  export declare const loadAnimationEngine: () => Promise<AnimationEngine>;
2361
1857
 
2362
- export declare const loadCompiler: () => Promise<CompilerSurface>;
2363
-
2364
- export declare const loadEngine: () => Promise<EngineCore>;
2365
-
2366
- export declare const loadIngest: () => Promise<IngestSurface>;
2367
-
2368
1858
  /** Looping animations — run continuously (`iterationCount: Infinity`). */
2369
1859
  declare const loopPresets: {
2370
- readonly heartbeat: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2371
- readonly glow: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2372
- readonly spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2373
- readonly rainbowText: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2374
- readonly skeletonLoading: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2375
- readonly gradientBackground: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2376
- readonly parallaxScroll: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2377
- readonly hover: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2378
- readonly typingCursor: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
1860
+ readonly heartbeat: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1861
+ readonly glow: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1862
+ readonly spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1863
+ readonly rainbowText: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1864
+ readonly skeletonLoading: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1865
+ readonly gradientBackground: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1866
+ readonly parallaxScroll: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1867
+ readonly hover: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
1868
+ readonly typingCursor: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2379
1869
  };
2380
1870
 
2381
1871
  export declare class ManualTimeline extends Timeline {
@@ -2390,6 +1880,13 @@ export declare class ManualTimeline extends Timeline {
2390
1880
  export declare interface MorphPoint {
2391
1881
  x: number;
2392
1882
  y: number;
1883
+ /**
1884
+ * The tangent angle (radians) of the source path at this point — populated
1885
+ * ONLY when the morph is built with `orient: true` (the
1886
+ * `PathGeometry.sampleAtLength` tangent, the `rotate: auto` value). Absent
1887
+ * (`undefined`) on a position-only morph (the default ~130-key floor).
1888
+ */
1889
+ angle?: number;
2393
1890
  }
2394
1891
 
2395
1892
  export declare interface MorphRect {
@@ -2442,15 +1939,37 @@ export declare interface MorphSVGOptions extends Partial<InputAnimationOptions>
2442
1939
  */
2443
1940
  samples?: number;
2444
1941
  /**
2445
- * Optional target the morph drives. When given, the morph writes the
2446
- * interpolated polyline `d` (`MorphSVG.sampleD`) onto the target's
2447
- * `--morph-d` CSS custom property each frame so an author can render it
2448
- * (e.g. `<path d="" style="d: var(--morph-d)">` or a JS reader). Default
2449
- * target-less: the returned handle IS the control surface, exactly like
2450
- * `fromDrawSVG`'s target-less form — `MorphSVG.sampleD(t)` reads the
2451
- * morphed `d` directly without a DOM write.
1942
+ * Optional target the morph drives. When given, the morph reassembles the
1943
+ * interpolated polyline into a `d` string EACH FRAME and writes it onto the
1944
+ * target's style as BOTH:
1945
+ * • the `d:` CSS property — `target.style.d = path("M … L …")` — which
1946
+ * Chromium and recent Safari render DIRECTLY on a `<path>`/`<svg>`
1947
+ * (no author wiring needed), and
1948
+ * • the `--morph-d` custom property — `var(--morph-d)` — the cross-browser
1949
+ * author channel + the Firefox-lags fallback (`<path style="d:
1950
+ * var(--morph-d)">`, or a JS reader via {@link MorphSVG.sampleD}).
1951
+ *
1952
+ * The render rides the engine's per-frame renderer seam (a custom
1953
+ * `transform` supplied to `fromKeyframes`), NOT the default DOM-style
1954
+ * renderer — so the morph is WAAPI-ineligible by construction and always
1955
+ * runs the rAF path where the renderer fires. The reassembly reuses an
1956
+ * instance-level scratch point-array, so the steady frame mints nothing.
1957
+ *
1958
+ * Default target-less: the returned handle IS the control surface, exactly
1959
+ * like `fromDrawSVG`'s target-less form — {@link MorphSVG.sampleD}(t) reads
1960
+ * the morphed `d` directly without a DOM write.
2452
1961
  */
2453
1962
  target?: HTMLElement | SVGElement;
1963
+ /**
1964
+ * Orient-along-path: when `true`, the morph ALSO samples each point's
1965
+ * tangent angle (radians) from `PathGeometry.sampleAtLength` and emits a
1966
+ * per-point `--morph-{i}-angle` channel that interpolates the `from`→`to`
1967
+ * tangent across `t` — the `rotate: auto` value a consumer reads to bank a
1968
+ * glyph along the morphed outline. Default `false` (a position-only morph
1969
+ * stays at the ~130-key floor; orient adds ~65 angle keys ONLY when asked,
1970
+ * pre-empting a "morph is too heavy" perf concern).
1971
+ */
1972
+ orient?: boolean;
2454
1973
  /**
2455
1974
  * Auto-start the play loop after construction + targeting. Default true.
2456
1975
  * `false` returns a constructed, NOT-yet-playing handle so the caller can
@@ -2485,16 +2004,6 @@ declare class MotionPath<V extends Record<string, any> = any> {
2485
2004
  stop(): this;
2486
2005
  }
2487
2006
 
2488
- /**
2489
- * A MotionPath spec — the `{ path, ... }` shape that routes to
2490
- * {@link fromMotionPath} (F.W12 §S2). It carries the author `offset-path`
2491
- * (`path`) plus the optional `from`/`to`/`rotate` MotionPath knobs; the
2492
- * animation-options + `autoPlay` ride {@link AnimateOptions} on the third
2493
- * argument, exactly as every other `animate()` shape. The discriminating field
2494
- * is `path` — a `string` no keyframe map / vars array carries.
2495
- */
2496
- declare type MotionPathInput = Pick<MotionPathOptions, "path" | "from" | "to" | "rotate">;
2497
-
2498
2007
  export declare interface MotionPathOptions extends Partial<InputAnimationOptions> {
2499
2008
  /**
2500
2009
  * The author `offset-path` (required) — set on the target so the browser
@@ -2541,11 +2050,11 @@ declare type NativeScrollAttachment = {
2541
2050
  export declare type NativeTimelineSpec = {
2542
2051
  kind: "scroll";
2543
2052
  source?: Element | null;
2544
- axis?: ScrollAxis;
2053
+ axis?: ScrollTimelineAxis;
2545
2054
  } | {
2546
2055
  kind: "view";
2547
2056
  subject: Element;
2548
- axis?: ScrollAxis;
2057
+ axis?: ScrollTimelineAxis;
2549
2058
  inset?: string;
2550
2059
  };
2551
2060
 
@@ -2631,6 +2140,31 @@ export declare interface NumericAnimationOptions {
2631
2140
  respectReducedMotion?: boolean | undefined;
2632
2141
  }
2633
2142
 
2143
+ /**
2144
+ * Q.WB3 S2 — the precomputed SoA fold layout for ONE compiled frame's NUMERIC
2145
+ * interp subset (the single-animation `processFrame` analog of the compositor's
2146
+ * `SoALayerPlan`). Built ONCE at `parse` over the STABLE iv set (the F.W4
2147
+ * zero-alloc discipline — NO per-frame allocation):
2148
+ * - `numeric` — the numeric ivs (numeric start+stop, NOT computed, NOT color),
2149
+ * in slot order. Each iv's interp-carrier `value` is the `ValueUnit` slot the
2150
+ * strided write-back fills (the SAME slot `lerpValue` writes today).
2151
+ * - `from` / `to` — the packed endpoint `Float64Array`s (`start.value` /
2152
+ * `stop.value`), one slot per `numeric[s]`.
2153
+ * - `out` — the per-frame scratch the `lerpArray` fold writes into (reused
2154
+ * across every frame — zero per-frame alloc).
2155
+ * - `boxed` — the residual ivs (color / computed / mixed) the fold CANNOT cover
2156
+ * — walked by the existing per-element `lerpValue`, UNCHANGED.
2157
+ * The boxed-color tail is the GATED `ColorChannelPlan` consume's frontier (S4,
2158
+ * value.js 1.2.0) — NOT this NOW numeric arm.
2159
+ */
2160
+ declare interface NumericFoldPlan<V extends Vars> {
2161
+ numeric: Array<InterpolatedVar<V>>;
2162
+ from: Float64Array;
2163
+ to: Float64Array;
2164
+ out: Float64Array;
2165
+ boxed: Array<InterpolatedVar<V>>;
2166
+ }
2167
+
2634
2168
  /** Callback invoked each frame during `.play()` with the interpolated values. */
2635
2169
  export declare type NumericFrameCallback<T extends Record<string, number>> = (values: T) => void;
2636
2170
 
@@ -2789,6 +2323,33 @@ declare function pinCSS(opts?: {
2789
2323
  bottom?: number;
2790
2324
  }): string;
2791
2325
 
2326
+ /**
2327
+ * The standalone-play machine's OWN run-state (R.W2 — replaces the
2328
+ * `PlaybackHost` privacy-inversion interface). `KeyframesAnimation` composes
2329
+ * ONE of these as a `readonly _playback` field, so the play-machine state has a
2330
+ * single owner instead of being scattered as privates the class re-published
2331
+ * through a cast:
2332
+ *
2333
+ * - `resolvePromise` — the standalone-loop deferred resolver (`playRAF`
2334
+ * arms it, `resolvePlay` fires it).
2335
+ * - `_playingPromise` — the held in-flight play promise (`get finished`
2336
+ * exposes it; `play` arms it; the `finally` clears it).
2337
+ * - `_waAnimations` — the live WAAPI compositor animations during a WAAPI
2338
+ * delegation (one per target); cancelled on teardown.
2339
+ * - `_boundFrame` — the frame callback bound ONCE at construction, never
2340
+ * re-bound per loop (the per-loop-closure-free idiom).
2341
+ * - `_interpOut` — the ONE hoisted interp buffer the play loop reuses
2342
+ * every frame (zero-alloc steady state).
2343
+ */
2344
+ declare class PlaybackState {
2345
+ resolvePromise: ((value: void | PromiseLike<void>) => void) | null;
2346
+ _playingPromise: Promise<void> | null;
2347
+ _waAnimations: globalThis.Animation[];
2348
+ readonly _boundFrame: (t: number) => boolean | Promise<boolean>;
2349
+ readonly _interpOut: Record<string, unknown>;
2350
+ constructor(frameCb: (t: number) => boolean | Promise<boolean>);
2351
+ }
2352
+
2792
2353
  /**
2793
2354
  * The full preset taxonomy, grouped by intent. Each leaf is one of the
2794
2355
  * existing exported factory functions — the taxonomy is a discovery index over
@@ -2796,44 +2357,44 @@ declare function pinCSS(opts?: {
2796
2357
  */
2797
2358
  declare const presetTaxonomy: {
2798
2359
  readonly enter: {
2799
- readonly fadeIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2800
- readonly slideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2801
- readonly slideInLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2802
- readonly slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2803
- readonly rotateIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2804
- readonly blurIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2805
- readonly springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2806
- readonly springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2807
- readonly jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2360
+ readonly fadeIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2361
+ readonly slideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2362
+ readonly slideInLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2363
+ readonly slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2364
+ readonly rotateIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2365
+ readonly blurIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2366
+ readonly springScaleIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2367
+ readonly springSlideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2368
+ readonly jumpUp: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2808
2369
  };
2809
2370
  readonly exit: {
2810
- readonly fadeOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2811
- readonly slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2812
- readonly slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2813
- readonly blurOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2814
- readonly warpLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2815
- readonly warpRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2816
- readonly jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2371
+ readonly fadeOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2372
+ readonly slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2373
+ readonly slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2374
+ readonly blurOut: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2375
+ readonly warpLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2376
+ readonly warpRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2377
+ readonly jumpDown: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2817
2378
  };
2818
2379
  readonly attention: {
2819
- readonly pulse: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2820
- readonly shake: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2821
- readonly bounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2822
- readonly flip: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2823
- readonly notificationBounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2824
- readonly springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2825
- readonly springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2380
+ readonly pulse: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2381
+ readonly shake: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2382
+ readonly bounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2383
+ readonly flip: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2384
+ readonly notificationBounce: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2385
+ readonly springPop: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2386
+ readonly springWobble: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2826
2387
  };
2827
2388
  readonly loop: {
2828
- readonly heartbeat: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2829
- readonly glow: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2830
- readonly spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2831
- readonly rainbowText: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2832
- readonly skeletonLoading: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2833
- readonly gradientBackground: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2834
- readonly parallaxScroll: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2835
- readonly hover: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2836
- readonly typingCursor: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
2389
+ readonly heartbeat: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2390
+ readonly glow: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2391
+ readonly spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2392
+ readonly rainbowText: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2393
+ readonly skeletonLoading: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2394
+ readonly gradientBackground: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2395
+ readonly parallaxScroll: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2396
+ readonly hover: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2397
+ readonly typingCursor: (options?: InputAnimationOptions) => CSSKeyframesAnimation<Vars>;
2837
2398
  };
2838
2399
  };
2839
2400
 
@@ -3120,12 +2681,13 @@ export declare interface ResolvedRange {
3120
2681
  * `"ease-out-cubic"`, … — or a CSS `cubic-bezier()` literal) to a typed
3121
2682
  * {@link Easing}.
3122
2683
  *
3123
- * The lookup rides the dynamic engine boundary: `import("./engine")` loads
3124
- * the value.js-bearing easing registry only when a named easing is actually
3125
- * used, so a light-only consumer that never calls this stays value.js-free.
2684
+ * The lookup rides the dynamic boundary: `import("./compile/easing-registry")`
2685
+ * loads ONLY the value.js-bearing timing-function registry (R.W1 narrow — not the
2686
+ * full engine chunk; lib-support F7) when a named easing is actually used, so a
2687
+ * light-only consumer that never calls this stays value.js-free.
3126
2688
  *
3127
2689
  * Fail-explicit: an unresolvable name throws {@link UnknownEasingError};
3128
- * an engine chunk-load failure rethrows with the failing easing named —
2690
+ * a chunk-load failure rethrows with the failing easing named —
3129
2691
  * never an unhandled rejection, never a silent identity fallback.
3130
2692
  *
3131
2693
  * ```ts
@@ -3311,23 +2873,41 @@ export declare interface ScrollSceneOptions {
3311
2873
  /** A `.on(event, cb)` subscriber. Receives the local progress at the crossing. */
3312
2874
  export declare type ScrollSceneSubscriber = (progress: number) => void;
3313
2875
 
2876
+ /**
2877
+ * orchestration/timeline/native.ts — the platform native-timeline feature-detect
2878
+ * (R.W1; lib-light F-9). Split off the JS sampler family (`./index`) by the
2879
+ * consumer seam: `native.ts` is consumed by `waapi/` (the HEAVY native scroll
2880
+ * bridge) while the JS `Timeline` family is the general caller-polled sampler.
2881
+ * Both stay LIGHT (value.js-free — these are DOM globals + an `in`-detect).
2882
+ */
2883
+ /**
2884
+ * The scroll/view timeline axis — the `block|inline|x|y` keyword set. A LOCAL
2885
+ * structural alias of the DOM lib's ambient `ScrollAxis` global (R.W4b): it is
2886
+ * byte-identical to `lib.dom.d.ts`'s `type ScrollAxis = "block" | "inline" | "x"
2887
+ * | "y"`, but as a NAMED module export it is FOLLOWABLE by the `./engine` subpath
2888
+ * dts roll-up (API Extractor cannot follow a bare ambient-global reference reached
2889
+ * transitively through `ScrollScene` — it throws "Unable to follow symbol for
2890
+ * ScrollAxis"). value.js-free (a string-literal union — these are DOM keywords).
2891
+ */
2892
+ declare type ScrollTimelineAxis = "block" | "inline" | "x" | "y";
2893
+
3314
2894
  /**
3315
2895
  * The master-playhead orchestrator. Positions child animations along one clock
3316
2896
  * and drives them via `Animation.advanceTo`. See the module docstring for the
3317
2897
  * booked name + subsumption decision.
3318
2898
  */
3319
- export declare class Sequence<V extends Vars = any> {
2899
+ export declare class Sequence<V extends Vars = any> implements SequencePlayContext<V> {
3320
2900
  /** Resolved segments, in insertion order. */
3321
2901
  readonly entries: SequenceEntry<V>[];
3322
2902
  /** Named positions on the master clock, registered via {@link label}. */
3323
- private readonly labels;
2903
+ readonly labels: Map<string, number>;
3324
2904
  /**
3325
2905
  * The transport-events bus — the per-event subscriber registry + the
3326
2906
  * crossing detector (segment-lifecycle + label straddle). `on(...)` forwards
3327
- * to `_events.subscribe`, and `_fireCrossings` to `_events.fire`. See
3328
- * `./sequence-events` for the channel + detector body.
2907
+ * to `events.subscribe`; the transport's `fireSequenceCrossings` to
2908
+ * `events.fire`. See `./events` for the channel + detector body.
3329
2909
  */
3330
- private readonly _events;
2910
+ readonly events: SequenceEventBus<V>;
3331
2911
  /**
3332
2912
  * The running insertion cursor (ms) — the end of the last-inserted
3333
2913
  * segment. Relative `"+="`/`"-="` positions and auto-append (`at` omitted)
@@ -3335,13 +2915,13 @@ export declare class Sequence<V extends Vars = any> {
3335
2915
  */
3336
2916
  private cursor;
3337
2917
  /** Master clock (ms) of the current playhead. */
3338
- private _time;
2918
+ _time: number;
3339
2919
  private readonly respectReducedMotion;
3340
2920
  /** THE rAF owner for the sequence's play loop. */
3341
2921
  readonly playback: RAFPlayback;
3342
2922
  private _boundFrame;
3343
- private _resolvePlay;
3344
- private _playOrigin;
2923
+ _resolvePlay: (() => void) | null;
2924
+ _playOrigin: number | undefined;
3345
2925
  private _playingPromise;
3346
2926
  /**
3347
2927
  * The scalar playback rate — the single field that drives `timeScale`
@@ -3351,21 +2931,21 @@ export declare class Sequence<V extends Vars = any> {
3351
2931
  * backward (`reverse`). It scales the master clock in {@link _frame}:
3352
2932
  * `masterClock = (clock − _playOrigin) * _rate`.
3353
2933
  */
3354
- private _rate;
2934
+ _rate: number;
3355
2935
  /**
3356
2936
  * How many master-clock cycles `play()` runs before settling. `1` is the
3357
2937
  * existing single-play; `Infinity` never settles (the loop case);
3358
2938
  * `n` runs `n` cycles. The master clock folds modulo `duration`
3359
2939
  * (see {@link _fold}).
3360
2940
  */
3361
- private _repeatCount;
2941
+ _repeatCount: number;
3362
2942
  /**
3363
2943
  * When true, odd cycles reflect the folded phase (`duration − phase`) —
3364
2944
  * the GSAP `yoyo` ping-pong. Default off (every cycle runs forward).
3365
2945
  */
3366
- private _yoyoOn;
2946
+ _yoyoOn: boolean;
3367
2947
  /** Whether `pause()` has halted the loop with the playhead retained. */
3368
- private _paused;
2948
+ _paused: boolean;
3369
2949
  /**
3370
2950
  * The loop's last rAF timestamp — the re-anchor reference. The
3371
2951
  * `RAFPlayback`/`AnimationGroup` managed-pause records the loop's LAST rAF
@@ -3373,7 +2953,7 @@ export declare class Sequence<V extends Vars = any> {
3373
2953
  * the SAME clock the loop reads, with no forward jump. `Sequence` records
3374
2954
  * it here per frame (the driver does not expose it) for that one re-anchor.
3375
2955
  */
3376
- private _lastClock;
2956
+ _lastClock: number | undefined;
3377
2957
  constructor(options?: SequenceOptions);
3378
2958
  /** The full span of the sequence (ms): the latest segment end. */
3379
2959
  get duration(): number;
@@ -3417,16 +2997,6 @@ export declare class Sequence<V extends Vars = any> {
3417
2997
  * Chainable.
3418
2998
  */
3419
2999
  add(animation: KeyframesAnimation<V>, at?: SequencePosition): this;
3420
- /**
3421
- * Resolve a {@link SequencePosition} to an absolute ms offset.
3422
- *
3423
- * - omitted → the running cursor (auto-append after the previous segment).
3424
- * - `number` → itself.
3425
- * - `"+=n"` / `"-=n"` → cursor ± n.
3426
- * - any other string → the registered label (throws if unknown — labels
3427
- * are an explicit contract, a typo is a bug, not a silent 0).
3428
- */
3429
- private resolvePosition;
3430
3000
  /**
3431
3001
  * Map the master playhead to each child's LOCAL clock and paint it. This is
3432
3002
  * the synchronous scrub form: for every segment, the local clock is
@@ -3436,40 +3006,6 @@ export declare class Sequence<V extends Vars = any> {
3436
3006
  * Chainable.
3437
3007
  */
3438
3008
  seek(masterClock: number): this;
3439
- /**
3440
- * THE master-playhead → child-clock map, applied as a pure synchronous
3441
- * scrub. For every segment the local clock is `clamp(masterClock − at, 0,
3442
- * duration)`, painted via `interpFrames(local, true)`. This is the ONE map
3443
- * both `seek` (the public scrub) and `_frame` (the rAF play loop) drive —
3444
- * so play is pixel-identical to seek BY CONSTRUCTION, forward AND reverse
3445
- * (the C⁰-continuity the F.W9 parity gate locks). It carries no `onEnd`/
3446
- * `startTime` machinery, so re-entering a finished segment under a negative
3447
- * `rate` paints the same final-frame value `seek` would — there is no
3448
- * forward-monotone re-anchor window to break (F.W9 §S3 MEASURE-FIRST).
3449
- */
3450
- private _applyAt;
3451
- /**
3452
- * Detect and fire segment-lifecycle + label crossings between the previous
3453
- * painted phase and `phase` — the ONE detector both `seek` (scrub) and
3454
- * `_frame` (the rAF play loop) drive, so play fires the identical crossings a
3455
- * scrub would. The detector + the per-event subscriber state live on the
3456
- * `_events` bus (`./sequence-events`); this thin wrapper threads the segments
3457
- * and labels the bus reads. The bus updates its own `_prevPhase` on EVERY
3458
- * call (even the early-exit) so a subscriber registered mid-transport
3459
- * straddles from the true prior playhead.
3460
- */
3461
- private _fireCrossings;
3462
- /**
3463
- * Fold a raw, repeat-extended master clock down to an effective phase in
3464
- * `[0, duration]` per the `repeat`/`yoyo` transport. With `repeat(1)` +
3465
- * `yoyo(false)` (the defaults) this is the identity on `[0, duration]`
3466
- * (the existing single-play). For `repeat`, the phase is `raw mod
3467
- * duration`; for `yoyo`, odd cycles reflect (`duration − phase`) so the
3468
- * playhead ping-pongs. The terminal clock of the LAST cycle resolves to
3469
- * the rest phase (`duration` forward, `0` reflected) rather than wrapping
3470
- * to `0` — so a settled `repeat`/`yoyo` run lands on its true end frame.
3471
- */
3472
- private _fold;
3473
3009
  /**
3474
3010
  * Set targets on every child segment. Convenience for the common case
3475
3011
  * where one target receives the whole sequence; per-segment targets can be
@@ -3497,32 +3033,8 @@ export declare class Sequence<V extends Vars = any> {
3497
3033
  */
3498
3034
  get finished(): Promise<void>;
3499
3035
  play(): Promise<void>;
3500
- private _frame;
3501
- /**
3502
- * True for the byte-stable default transport — forward real-time, single
3503
- * cycle, no yoyo. The event-dispatch path runs ONLY here, so an existing
3504
- * caller's `play()` fires the same `animationstart`/`animationend` it
3505
- * always did; any transport modifier opts into the scrub-paint authority.
3506
- */
3507
- private _isForwardMonotone;
3508
- /**
3509
- * The terminal rest phase of a `repeat`/`yoyo` run — where the playhead
3510
- * lands when the final cycle closes. A forward run rests at `duration`;
3511
- * an odd-cycle yoyo run that closes reflected rests at `0`. Mirrors the
3512
- * boundary `_fold` resolves at the terminal clock.
3513
- */
3514
- private _restPhase;
3515
- /**
3516
- * Re-anchor `_playOrigin` against the loop's last rAF timestamp so the
3517
- * master clock is CONTINUOUS across a transport edit — the
3518
- * `RAFPlayback`/`AnimationGroup` managed-pause re-anchor (no forward jump).
3519
- * The invariant restored: `(clock − _playOrigin) * rate === _time` at the
3520
- * edit instant. Solving for the origin: `_playOrigin = clock − _time /
3521
- * rate`. With `rate = 0` the playhead is frozen, so the origin collapses
3522
- * to the bare timestamp (the next non-zero rate re-anchors again).
3523
- */
3036
+ _frame(clock: number): Promise<boolean>;
3524
3037
  private _reanchor;
3525
- /** Release every child back to standalone ownership and clear play flags. */
3526
3038
  private _settle;
3527
3039
  /** Halt the play loop where it stands and resolve any pending `play()`. */
3528
3040
  stop(): this;
@@ -3599,6 +3111,58 @@ export declare interface SequenceEntry<V extends Vars> {
3599
3111
  */
3600
3112
  export declare type SequenceEvent = "segment:enter" | "segment:leave" | "label";
3601
3113
 
3114
+ /**
3115
+ * The Sequence transport-events BUS — the per-event subscriber registry + the
3116
+ * crossing DETECTOR, owned beside `Sequence` (`sequence.ts`). `Sequence`
3117
+ * constructs ONE bus and forwards `.on(...)` to {@link subscribe} and every
3118
+ * paint to {@link fire}; the three event fields (`subscribers`,
3119
+ * `_activeSegments`, `_prevPhase`) live here, not on the class.
3120
+ */
3121
+ declare class SequenceEventBus<V extends Vars> {
3122
+ /**
3123
+ * The per-event subscriber sets — the {@link subscribe} channel (three Sets
3124
+ * keyed by {@link SequenceEvent}). Empty by construction; {@link fire}
3125
+ * early-exits while all three stay empty (zero overhead for the common
3126
+ * no-subscriber transport). Mirror of `ScrollScene.subscribers`
3127
+ * (`scroll-scene.ts:360-366`).
3128
+ */
3129
+ private readonly subscribers;
3130
+ /**
3131
+ * The `segment:enter`/`segment:leave` edge memory: the segments whose
3132
+ * `[at, at + duration)` span held the PREVIOUS painted phase. A segment in
3133
+ * the current active set but not here ENTERED; one here but not in the
3134
+ * current set LEFT. Maintained only while a segment subscriber is registered
3135
+ * (the detector early-exits otherwise).
3136
+ */
3137
+ private readonly _activeSegments;
3138
+ /**
3139
+ * The previous painted phase (ms) — the `from` end of every crossing
3140
+ * straddle (`label`, and the directional `segment` edges). `undefined`
3141
+ * before the first paint; updated on EVERY {@link fire} so a subscriber
3142
+ * registered mid-transport straddles from the true prior playhead (not a
3143
+ * stale or zeroed origin).
3144
+ */
3145
+ private _prevPhase;
3146
+ /**
3147
+ * Register a subscriber for `event`; returns an unsubscribe handle — the
3148
+ * `ScrollScene.on` idiom (`scroll-scene.ts:506-514`). The class's overloaded
3149
+ * `on(...)` forwards here.
3150
+ */
3151
+ subscribe(event: SequenceEvent, cb: SequenceSubscriber): () => void;
3152
+ /**
3153
+ * Detect and fire segment-lifecycle + label crossings between the previous
3154
+ * painted phase (`_prevPhase`) and `phase` — the ONE detector both `seek`
3155
+ * (scrub) and `_frame` (the rAF play loop) drive, so play fires the identical
3156
+ * crossings a scrub would. Mirror of `ScrollScene.fire` (`scroll-scene.ts:513`).
3157
+ *
3158
+ * `_prevPhase` is updated on EVERY call (even the early-exit) so a subscriber
3159
+ * registered mid-transport straddles from the true prior playhead. The firing
3160
+ * loops run ONLY while at least one subscriber set is non-empty — the
3161
+ * zero-overhead path for the common no-subscriber transport.
3162
+ */
3163
+ fire(entries: readonly SequenceEntry<V>[], labels: ReadonlyMap<string, number>, phase: number): void;
3164
+ }
3165
+
3602
3166
  /**
3603
3167
  * A `label` subscriber. Receives the crossed label's `name` and the
3604
3168
  * master-clock position (ms) at the crossing.
@@ -3615,6 +3179,28 @@ export declare interface SequenceOptions {
3615
3179
  respectReducedMotion?: boolean;
3616
3180
  }
3617
3181
 
3182
+ /**
3183
+ * The play-machine view the rAF-loop driver reads + writes. `Sequence` IS this
3184
+ * shape (its fields), so the loop body lives here without copying state — the
3185
+ * class's `_frame`/`_settle` are thin delegates that pass `this`. Keeping the
3186
+ * fields on `Sequence` preserves the seek↔play parity test's direct reaches
3187
+ * (`seq._time` / `seq._rate` / `seq._frame(...)`); only the loop BODY moved.
3188
+ */
3189
+ declare interface SequencePlayContext<V extends Vars> {
3190
+ readonly entries: SequenceEntry<V>[];
3191
+ readonly labels: ReadonlyMap<string, number>;
3192
+ readonly events: SequenceEventBus<V>;
3193
+ readonly duration: number;
3194
+ _time: number;
3195
+ _rate: number;
3196
+ _repeatCount: number;
3197
+ _yoyoOn: boolean;
3198
+ _paused: boolean;
3199
+ _playOrigin: number | undefined;
3200
+ _lastClock: number | undefined;
3201
+ _resolvePlay: (() => void) | null;
3202
+ }
3203
+
3618
3204
  /**
3619
3205
  * A position on the master clock for a sequence entry.
3620
3206
  *
@@ -3622,7 +3208,7 @@ export declare interface SequenceOptions {
3622
3208
  * - `` `+=${n}` `` / `` `-=${n}` `` — relative to the running insertion cursor
3623
3209
  * (the end of the previously-inserted segment): `"+=200"` starts 200ms after
3624
3210
  * the cursor, `"-=200"` overlaps the previous segment by 200ms.
3625
- * - any other string — a label registered via {@link Sequence.label}.
3211
+ * - any other string — a label registered via `Sequence.label`.
3626
3212
  */
3627
3213
  export declare type SequencePosition = number | `+=${number}` | `-=${number}` | string;
3628
3214
 
@@ -3665,12 +3251,8 @@ declare const slideIn: (options?: InputAnimationOptions) => CSSKeyframesAnimatio
3665
3251
 
3666
3252
  declare const slideInLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
3667
3253
 
3668
- declare const slideInLeftKeyframes = "\n0% {\n transform: translateX(-100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n";
3669
-
3670
3254
  declare const slideInRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
3671
3255
 
3672
- declare const slideInRightKeyframes = "\n0% {\n transform: translateX(100%);\n opacity: 0;\n}\n100% {\n transform: translateX(0);\n opacity: 1;\n}\n";
3673
-
3674
3256
  declare const slideOutLeft: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
3675
3257
 
3676
3258
  declare const slideOutRight: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
@@ -3765,6 +3347,46 @@ export declare interface SmoothProgressOptions {
3765
3347
  /** A `.snap()` snap point — a local progress in [0,1] the scene settles to. */
3766
3348
  export declare type SnapPoints = readonly number[];
3767
3349
 
3350
+ /**
3351
+ * P.W2 — the precomputed SoA fold layout for ONE `add`/`weighted` blend layer.
3352
+ * `carriers[s]`/`incomings[s]` are the stable `ValueUnit<number>` refs the boxed
3353
+ * inner loop would have touched at slot `s` (the carrier is the leaf a lower
3354
+ * layer parked in `_grouped`; the incoming is this layer's `entry.values` leaf —
3355
+ * both alias `frame.flatVars` units whose `.value` `interpFrames` mutates in
3356
+ * place, so the refs are frame-stable). The per-frame fold seeds the composite
3357
+ * buffer from each carrier, applies the layer's op (`+=` for `add`, `lerp(...,w)`
3358
+ * for `weighted`) against the incoming, and writes back — replacing the
3359
+ * per-frame `for..in` + `Array.isArray` + per-element `isNumericUnit` dispatch
3360
+ * with a contiguous numeric loop. The `entry` is carried for the `weighted`
3361
+ * arm's per-LAYER `w = layer.weightSpring?.value ?? layer.weight` read (K.W11
3362
+ * PHYS-C).
3363
+ */
3364
+ declare interface SoALayerPlan {
3365
+ /**
3366
+ * The layer config — the `weighted` fold re-reads its per-frame `w =
3367
+ * weightSpring?.value ?? weight` LIVE (K.W11 PHYS-C, so a spring still drives
3368
+ * the blend), and the config is generic-independent so the plan holds it
3369
+ * without binding the group's `V`.
3370
+ */
3371
+ layer: AnimationLayerConfig;
3372
+ weighted: boolean;
3373
+ /** The pure-numeric carrier units the fold seeds the composite buffer from + writes back to. */
3374
+ carriers: ValueUnit<number>[];
3375
+ /** The incoming numeric units folded against each carrier (parallel to `carriers`). */
3376
+ incomings: ValueUnit<number>[];
3377
+ /**
3378
+ * The keys this layer touches that the SoA fold does NOT cover — a non-array
3379
+ * carrier (first-touch of a key, or a scalar that a lower layer left
3380
+ * `undefined`), or a leaf with ANY non-numeric / mixed element. These keep
3381
+ * the boxed per-element path (the `Array.isArray` guard + the
3382
+ * `Math.min(existing.length, incoming.length)` element loop), so the
3383
+ * `add`/`weighted` blend stays byte-identical on the non-numeric tail. EMPTY
3384
+ * for the dominant all-numeric transform shape (every leaf a numeric
3385
+ * `ValueUnit[]`), so the whole `for..in` collapses to the SoA fold.
3386
+ */
3387
+ boxedKeys: string[];
3388
+ }
3389
+
3768
3390
  declare const spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimation< Vars>;
3769
3391
 
3770
3392
  /**
@@ -3782,7 +3404,7 @@ declare const spinner: (options?: InputAnimationOptions) => CSSKeyframesAnimatio
3782
3404
  * (`initial`, `initialVelocity`, thresholds, `respectReducedMotion`)
3783
3405
  * carry through unchanged.
3784
3406
  */
3785
- declare interface SpringDurationOptions extends Partial<Pick<SpringProgressOptions, "initial" | "initialVelocity" | "settleThreshold" | "velocitySettleThreshold" | "respectReducedMotion">> {
3407
+ export declare interface SpringDurationOptions extends Partial<Pick<SpringProgressOptions, "initial" | "initialVelocity" | "settleThreshold" | "velocitySettleThreshold" | "respectReducedMotion">> {
3786
3408
  /**
3787
3409
  * The perceptual settle duration in seconds — mapped directly onto
3788
3410
  * `response`. The designer-facing name for the same quantity.
@@ -3899,12 +3521,7 @@ export declare class SpringProgress {
3899
3521
  private omegaD;
3900
3522
  private subscribers;
3901
3523
  private disposed;
3902
- private vecOrigin;
3903
- private vecOriginVel;
3904
- private vecTarget;
3905
- private vecCurrent;
3906
- private vecVelocity;
3907
- private vecElapsed;
3524
+ private vectorLanes;
3908
3525
  private _playback;
3909
3526
  private _onFrame;
3910
3527
  constructor(options?: Partial<SpringProgressOptions>);
@@ -4005,11 +3622,12 @@ export declare class SpringProgress {
4005
3622
  get velocities(): Float64Array;
4006
3623
  /**
4007
3624
  * Advance EVERY lane by `dt` MILLISECONDS — one call, K channels, one buffer
4008
- * write. The analytic per-channel step is the same closed form `evaluateAt`
4009
- * uses (the shared `omega`/`zeta`/`omegaD`), with the transcendentals
4010
- * (`exp`/`cos`/`sin`) hoisted once per tick and reused across lanes — the
4011
- * amortization the W122 probe measured. No-op (returns the same buffer)
4012
- * before the first {@link setTargets}, when disposed, or for `dt <= 0`.
3625
+ * write, delegated to the SoA {@link SpringVectorLanes} under this spring's
3626
+ * `(omega, zeta, omegaD)`. The analytic per-channel step is the same closed
3627
+ * form `evaluateAt` uses, with the transcendentals (`exp`/`cos`/`sin`)
3628
+ * hoisted once per tick — the amortization the W122 probe measured. No-op
3629
+ * (returns the same buffer) before the first {@link setTargets}, when
3630
+ * disposed, or for `dt <= 0`.
4013
3631
  */
4014
3632
  tickVector(dt: number): Float64Array;
4015
3633
  /**
@@ -4469,34 +4087,12 @@ declare type WAAPIEligibility = {
4469
4087
  };
4470
4088
 
4471
4089
  /**
4472
- * Fire-and-forget idle-warmer for the heavy engine (L.W7 S1, W121).
4473
- *
4474
- * Pre-flights `loadAnimationEngine()`'s dynamic import so the first
4475
- * `.animate()` / `new CSSKeyframesAnimation()` call on a cold page resolves
4476
- * against an already-in-flight (or already-resolved) Promise instead of paying
4477
- * network + parse + compile latency inline. Call it during idle —
4478
- * `requestIdleCallback`, `visibilitychange`, or `mouseenter` on the app shell:
4479
- *
4480
- * ```ts
4481
- * requestIdleCallback(() => warmEngine());
4482
- * ```
4483
- *
4484
- * Idempotent and value.js-free by construction: it shares the SAME
4485
- * module-scope `_enginePromise` with `loadAnimationEngine()`, so a
4486
- * `loadAnimationEngine()` after `warmEngine()` returns the same in-flight
4487
- * Promise — no double import. It fires a DYNAMIC import only; it names no
4488
- * static value.js specifier, so `proof:boundary` stays green.
4489
- *
4490
- * L.W7 S4 (MEASURE-FIRST — the `scheduler.postTask` adoption is DEFERRED, not
4491
- * shipped). `scheduler.postTask("background", …)` would be the idiomatic home
4492
- * for an idle warm, but the `proof:scheduler-posttask` probe only SKIPS in
4493
- * jsdom (the API is absent there) — it has NOT positively MEASURED that the
4494
- * `"background"` call does not degrade INP on a real engine. Per the wave's own
4495
- * measure-first law (and inv ε — no claim without an observed oracle), warmEngine
4496
- * stays on the PROVEN bare `void loadAnimationEngine()` path. The probe + gate are
4497
- * ARMED: when a real-browser run (Playwright with `scheduler.postTask`) measures
4498
- * the background dispatch safe, warmEngine adopts `postTask("background")` then —
4499
- * a gated future change, not an unmeasured ship today.
4090
+ * Fire-and-forget idle-warmer for the heavy engine. Pre-flights
4091
+ * `loadAnimationEngine()`'s dynamic import during idle (`requestIdleCallback` /
4092
+ * `visibilitychange` / `mouseenter`) so the first `new CSSKeyframesAnimation()`
4093
+ * on a cold page resolves against an already-in-flight Promise. Idempotent and
4094
+ * value.js-free — it shares the one memoized `_enginePromise` (no double import)
4095
+ * and names only a dynamic import (`proof:boundary` stays green).
4500
4096
  */
4501
4097
  export declare const warmEngine: () => void;
4502
4098