use-scroll-animate 7.9.0 → 8.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 (219) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/README_ja.md +1 -1
  4. package/README_zh.md +1 -1
  5. package/dist/chunks/{audio-DcPvT2Kh.js → audio-CynhhWDi.js} +3 -3
  6. package/dist/chunks/{audio-DcPvT2Kh.js.map → audio-CynhhWDi.js.map} +1 -1
  7. package/dist/chunks/{audio-EXUoijsG.cjs → audio-cgWbDkoY.cjs} +3 -3
  8. package/dist/chunks/{audio-EXUoijsG.cjs.map → audio-cgWbDkoY.cjs.map} +1 -1
  9. package/dist/chunks/{base-2-yYc93C.js → base-CLuqlLfG.js} +63 -6
  10. package/dist/chunks/base-CLuqlLfG.js.map +1 -0
  11. package/dist/chunks/{base-BaQV-2ha.cjs → base-DoRUZBy-.cjs} +66 -5
  12. package/dist/chunks/base-DoRUZBy-.cjs.map +1 -0
  13. package/dist/chunks/{builtins-HlqAkK0f.js → builtins-Bs4smevg.js} +3 -3
  14. package/dist/chunks/{builtins-HlqAkK0f.js.map → builtins-Bs4smevg.js.map} +1 -1
  15. package/dist/chunks/{builtins-xalxV2d5.cjs → builtins-ClXshqj-.cjs} +3 -3
  16. package/dist/chunks/{builtins-xalxV2d5.cjs.map → builtins-ClXshqj-.cjs.map} +1 -1
  17. package/dist/chunks/{core-DuO-AVXL.js → core-C3Taz-ew.js} +2 -2
  18. package/dist/chunks/{core-DuO-AVXL.js.map → core-C3Taz-ew.js.map} +1 -1
  19. package/dist/chunks/{core-D5rU0CV6.js → core-CiN5sqxB.js} +2 -2
  20. package/dist/chunks/{core-D5rU0CV6.js.map → core-CiN5sqxB.js.map} +1 -1
  21. package/dist/chunks/{core-BGAyaY6L.cjs → core-CwO835Wm.cjs} +2 -2
  22. package/dist/chunks/{core-BGAyaY6L.cjs.map → core-CwO835Wm.cjs.map} +1 -1
  23. package/dist/chunks/{core-zq17EeCI.cjs → core-O4grKHSa.cjs} +2 -2
  24. package/dist/chunks/{core-zq17EeCI.cjs.map → core-O4grKHSa.cjs.map} +1 -1
  25. package/dist/chunks/{fx-lBGVtQO1.cjs → fx-C-XjLOTc.cjs} +2 -2
  26. package/dist/chunks/{fx-lBGVtQO1.cjs.map → fx-C-XjLOTc.cjs.map} +1 -1
  27. package/dist/chunks/{fx-CMxWNwH8.js → fx-CQv3IxMf.js} +2 -2
  28. package/dist/chunks/{fx-CMxWNwH8.js.map → fx-CQv3IxMf.js.map} +1 -1
  29. package/dist/chunks/{gpu-DLPghVWr.js → gpu-CB8frFOD.js} +2 -2
  30. package/dist/chunks/{gpu-DLPghVWr.js.map → gpu-CB8frFOD.js.map} +1 -1
  31. package/dist/chunks/{gpu-Dx0H875w.cjs → gpu-CcdA2D2i.cjs} +2 -2
  32. package/dist/chunks/{gpu-Dx0H875w.cjs.map → gpu-CcdA2D2i.cjs.map} +1 -1
  33. package/dist/chunks/{index-tags-C04JP8g4.js → index-tags-B-JBecYg.js} +2 -2
  34. package/dist/chunks/index-tags-B-JBecYg.js.map +1 -0
  35. package/dist/chunks/{index-tags-BTMwrfgV.cjs → index-tags-hLIF2Clq.cjs} +2 -2
  36. package/dist/chunks/index-tags-hLIF2Clq.cjs.map +1 -0
  37. package/dist/chunks/{player-PS6_FzNw.cjs → player-C2n17sdH.cjs} +4 -4
  38. package/dist/chunks/{player-PS6_FzNw.cjs.map → player-C2n17sdH.cjs.map} +1 -1
  39. package/dist/chunks/{player-DxvCYo7Q.js → player-YzQGkKaW.js} +4 -4
  40. package/dist/chunks/{player-DxvCYo7Q.js.map → player-YzQGkKaW.js.map} +1 -1
  41. package/dist/chunks/{registry-DehBVRDV.cjs → registry-BVklOepd.cjs} +2 -2
  42. package/dist/chunks/{registry-DehBVRDV.cjs.map → registry-BVklOepd.cjs.map} +1 -1
  43. package/dist/chunks/{registry-CyKExAmE.js → registry-CnO7ZVPK.js} +2 -2
  44. package/dist/chunks/{registry-CyKExAmE.js.map → registry-CnO7ZVPK.js.map} +1 -1
  45. package/dist/chunks/{spring-BK8DiezC.js → spring-BFKNHmfl.js} +2 -2
  46. package/dist/chunks/{spring-BK8DiezC.js.map → spring-BFKNHmfl.js.map} +1 -1
  47. package/dist/chunks/{spring-Dgx187Vh.cjs → spring-uQMVJTj9.cjs} +2 -2
  48. package/dist/chunks/{spring-Dgx187Vh.cjs.map → spring-uQMVJTj9.cjs.map} +1 -1
  49. package/dist/chunks/{variants-BQ6bhzn4.js → variants-B-zKORvt.js} +2 -2
  50. package/dist/chunks/{variants-BQ6bhzn4.js.map → variants-B-zKORvt.js.map} +1 -1
  51. package/dist/chunks/{variants-BhjyddG8.cjs → variants-DagykrKH.cjs} +2 -2
  52. package/dist/chunks/{variants-BhjyddG8.cjs.map → variants-DagykrKH.cjs.map} +1 -1
  53. package/dist/components/a11y.cjs +2 -2
  54. package/dist/components/a11y.d.cts +1 -1
  55. package/dist/components/a11y.d.ts +1 -1
  56. package/dist/components/a11y.js +3 -3
  57. package/dist/components/angular.cjs +9 -9
  58. package/dist/components/angular.d.cts +2 -18
  59. package/dist/components/angular.d.ts +2 -18
  60. package/dist/components/angular.js +9 -9
  61. package/dist/components/background.cjs +2 -2
  62. package/dist/components/background.js +2 -2
  63. package/dist/components/bridge.cjs +1 -1
  64. package/dist/components/bridge.js +1 -1
  65. package/dist/components/cards.cjs +2 -2
  66. package/dist/components/cards.js +2 -2
  67. package/dist/components/click.cjs +3 -3
  68. package/dist/components/click.js +3 -3
  69. package/dist/components/depth.cjs +3 -3
  70. package/dist/components/depth.js +3 -3
  71. package/dist/components/effects.cjs +7 -7
  72. package/dist/components/effects.js +9 -9
  73. package/dist/components/engine.cjs +266 -0
  74. package/dist/components/engine.cjs.map +1 -0
  75. package/dist/components/engine.d.cts +105 -0
  76. package/dist/components/engine.d.ts +105 -0
  77. package/dist/components/engine.js +255 -0
  78. package/dist/components/engine.js.map +1 -0
  79. package/dist/components/feedback.cjs +1 -1
  80. package/dist/components/feedback.js +1 -1
  81. package/dist/components/fx-3d.cjs +2 -2
  82. package/dist/components/fx-3d.js +2 -2
  83. package/dist/components/fx-ai.cjs +2 -2
  84. package/dist/components/fx-ai.js +2 -2
  85. package/dist/components/fx-chart.cjs +2 -2
  86. package/dist/components/fx-chart.js +2 -2
  87. package/dist/components/fx-festival.cjs +121 -0
  88. package/dist/components/fx-festival.cjs.map +1 -0
  89. package/dist/components/fx-festival.d.cts +69 -0
  90. package/dist/components/fx-festival.d.ts +69 -0
  91. package/dist/components/fx-festival.js +117 -0
  92. package/dist/components/fx-festival.js.map +1 -0
  93. package/dist/components/fx-focus.cjs +2 -2
  94. package/dist/components/fx-focus.js +2 -2
  95. package/dist/components/fx-form.cjs +2 -2
  96. package/dist/components/fx-form.js +2 -2
  97. package/dist/components/fx-game.cjs +2 -2
  98. package/dist/components/fx-game.js +2 -2
  99. package/dist/components/fx-geo.cjs +2 -2
  100. package/dist/components/fx-geo.js +2 -2
  101. package/dist/components/fx-gpu.cjs +3 -3
  102. package/dist/components/fx-gpu.js +3 -3
  103. package/dist/components/fx-light.cjs +2 -2
  104. package/dist/components/fx-light.js +2 -2
  105. package/dist/components/fx-morph.cjs +2 -2
  106. package/dist/components/fx-morph.js +2 -2
  107. package/dist/components/fx-music.cjs +3 -3
  108. package/dist/components/fx-music.js +3 -3
  109. package/dist/components/fx-physics.cjs +2 -2
  110. package/dist/components/fx-physics.js +2 -2
  111. package/dist/components/fx-shop.cjs +2 -2
  112. package/dist/components/fx-shop.js +2 -2
  113. package/dist/components/fx-social.cjs +2 -2
  114. package/dist/components/fx-social.js +2 -2
  115. package/dist/components/fx-text.cjs +2 -2
  116. package/dist/components/fx-text.js +2 -2
  117. package/dist/components/fx-transitions.cjs +3 -3
  118. package/dist/components/fx-transitions.js +3 -3
  119. package/dist/components/fx-weather.cjs +2 -2
  120. package/dist/components/fx-weather.js +2 -2
  121. package/dist/components/fx.cjs +5 -5
  122. package/dist/components/fx.js +6 -6
  123. package/dist/components/fx2.cjs +10 -4
  124. package/dist/components/fx2.cjs.map +1 -1
  125. package/dist/components/fx2.d.cts +26 -1
  126. package/dist/components/fx2.d.ts +26 -1
  127. package/dist/components/fx2.js +10 -6
  128. package/dist/components/fx2.js.map +1 -1
  129. package/dist/components/gesture.cjs +3 -3
  130. package/dist/components/gesture.js +4 -4
  131. package/dist/components/interaction.cjs +1 -1
  132. package/dist/components/interaction.js +1 -1
  133. package/dist/components/jsx.d.cts +1 -1
  134. package/dist/components/jsx.d.ts +1 -1
  135. package/dist/components/layout.cjs +1 -1
  136. package/dist/components/layout.js +1 -1
  137. package/dist/components/lazy.cjs +1 -1
  138. package/dist/components/lazy.d.cts +1 -1
  139. package/dist/components/lazy.d.ts +1 -1
  140. package/dist/components/lazy.js +1 -1
  141. package/dist/components/lite.cjs +151 -206
  142. package/dist/components/lite.cjs.map +1 -1
  143. package/dist/components/lite.js +152 -206
  144. package/dist/components/lite.js.map +1 -1
  145. package/dist/components/marketplace.cjs +2 -2
  146. package/dist/components/marketplace.js +2 -2
  147. package/dist/components/packs.cjs +1 -1
  148. package/dist/components/packs.js +1 -1
  149. package/dist/components/page.cjs +2 -2
  150. package/dist/components/page.js +3 -3
  151. package/dist/components/perf.cjs +2 -2
  152. package/dist/components/perf.d.cts +1 -1
  153. package/dist/components/perf.d.ts +1 -1
  154. package/dist/components/perf.js +3 -3
  155. package/dist/components/physics.cjs +2 -2
  156. package/dist/components/physics.js +3 -3
  157. package/dist/components/react.cjs +1 -1
  158. package/dist/components/react.js +1 -1
  159. package/dist/components/reveal.cjs +1 -1
  160. package/dist/components/reveal.js +1 -1
  161. package/dist/components/solid.cjs +9 -9
  162. package/dist/components/solid.d.cts +2 -18
  163. package/dist/components/solid.d.ts +2 -18
  164. package/dist/components/solid.js +9 -9
  165. package/dist/components/svelte.cjs +9 -9
  166. package/dist/components/svelte.d.cts +2 -18
  167. package/dist/components/svelte.d.ts +2 -18
  168. package/dist/components/svelte.js +9 -9
  169. package/dist/components/svg.cjs +1 -1
  170. package/dist/components/svg.js +1 -1
  171. package/dist/components/text.cjs +2 -2
  172. package/dist/components/text.js +2 -2
  173. package/dist/components/timeline.cjs +2 -2
  174. package/dist/components/timeline.js +3 -3
  175. package/dist/components/transitions.cjs +1 -1
  176. package/dist/components/transitions.js +1 -1
  177. package/dist/components/ui.cjs +17 -108
  178. package/dist/components/ui.cjs.map +1 -1
  179. package/dist/components/ui.css +0 -1
  180. package/dist/components/ui.d.cts +3 -20
  181. package/dist/components/ui.d.ts +3 -20
  182. package/dist/components/ui.js +19 -109
  183. package/dist/components/ui.js.map +1 -1
  184. package/dist/components/vue.cjs +9 -9
  185. package/dist/components/vue.d.cts +2 -18
  186. package/dist/components/vue.d.ts +2 -18
  187. package/dist/components/vue.js +9 -9
  188. package/dist/components/webgl.cjs +1 -1
  189. package/dist/components/webgl.js +1 -1
  190. package/dist/components/widgets.cjs +373 -146
  191. package/dist/components/widgets.cjs.map +1 -1
  192. package/dist/components/widgets.d.cts +110 -2
  193. package/dist/components/widgets.d.ts +110 -2
  194. package/dist/components/widgets.js +369 -147
  195. package/dist/components/widgets.js.map +1 -1
  196. package/dist/components.cjs +9 -10
  197. package/dist/components.cjs.map +1 -1
  198. package/dist/components.css +0 -1
  199. package/dist/components.d.cts +4 -21
  200. package/dist/components.d.ts +4 -21
  201. package/dist/components.js +12 -12
  202. package/dist/components.umd.js +2 -2
  203. package/dist/components.umd.js.map +1 -1
  204. package/dist/index.cjs +2 -2
  205. package/dist/index.js +2 -2
  206. package/dist/index.umd.js +2 -2
  207. package/dist/index.umd.js.map +1 -1
  208. package/dist/widgets.umd.js +1 -1
  209. package/dist/widgets.umd.js.map +1 -1
  210. package/docs/ROADMAP.md +14 -12
  211. package/docs/accessibility.md +1 -2
  212. package/docs/components.md +44 -1
  213. package/docs/deprecations.md +1 -1
  214. package/docs/upgrading-8.md +9 -6
  215. package/package.json +41 -1
  216. package/dist/chunks/base-2-yYc93C.js.map +0 -1
  217. package/dist/chunks/base-BaQV-2ha.cjs.map +0 -1
  218. package/dist/chunks/index-tags-BTMwrfgV.cjs.map +0 -1
  219. package/dist/chunks/index-tags-C04JP8g4.js.map +0 -1
@@ -0,0 +1,105 @@
1
+ /** Put an animation on the shared motion clock (animateWithMotion does this for every component / effect animation). */
2
+ declare function trackAnimation(a: Animation | null | undefined): void;
3
+ /** The motion clock's state: `rate` (1 = normal), `paused`, `time` (clock ms elapsed, scaled by rate). */
4
+ declare function getClock(): {
5
+ rate: number;
6
+ paused: boolean;
7
+ time: number;
8
+ tracked: number;
9
+ };
10
+ /** Change the shared clock: `{ rate }` (0.05–8) and / or `{ paused }`. Applies to running animations and loops. */
11
+ declare function setClock(next: {
12
+ rate?: number;
13
+ paused?: boolean;
14
+ }): void;
15
+ /** Subscribe to clock changes; returns an unsubscribe. */
16
+ declare function onClockChange(fn: () => void): () => void;
17
+
18
+ /**
19
+ * `motionary/engine` (= `motionary/components/engine`, 8.0) — the unified
20
+ * timeline engine and SSR hydration animations.
21
+ *
22
+ * - **`motionClock`** — the one clock every component, effect and frame loop
23
+ * runs on: `rate` (slow-mo / fast-forward), `pause()` / `resume()` /
24
+ * `toggle()`, `time`, `onChange()`. Pausing it freezes every animation
25
+ * started by Motionary on the page.
26
+ * - **`createTimeline()`** — sequence animations on that clock:
27
+ * `add(target, keyframes, options, position)` with positions `1200`
28
+ * (ms), `'+=200'` / `'-=100'` (after / overlapping the previous end) or
29
+ * `'<'` / `'<+=80'` (with the previous start); `play()`, `pause()`,
30
+ * `seek(ms)`, `progress` (0–1, settable), `duration`, `finished`.
31
+ * - **`hydrateMotion()`** — animate server-rendered `[data-usa-hydrate]`
32
+ * markup in on hydration without a flash: `ssrHead()` gives the `<style>`
33
+ * + one-line `<script>` for the document head (content stays visible
34
+ * without JS, and a CSS fallback reveals it after 3 s if JS never runs).
35
+ */
36
+
37
+ /** The shared motion clock (8.0). */
38
+ declare const motionClock: {
39
+ rate: number;
40
+ readonly paused: boolean;
41
+ /** Clock time in ms (advances with the shared frame loop, scaled by `rate`, frozen while paused). */
42
+ readonly time: number;
43
+ pause(): void;
44
+ resume(): void;
45
+ toggle(): void;
46
+ onChange: typeof onClockChange;
47
+ };
48
+ type TimelinePosition = number | string;
49
+ interface TimelineEntry {
50
+ target: Element;
51
+ keyframes: Keyframe[];
52
+ options: KeyframeAnimationOptions;
53
+ start: number;
54
+ end: number;
55
+ }
56
+ interface MotionTimeline {
57
+ readonly entries: readonly TimelineEntry[];
58
+ readonly duration: number;
59
+ readonly playing: boolean;
60
+ progress: number;
61
+ readonly finished: Promise<void>;
62
+ add(target: Element | Element[] | NodeListOf<Element> | null, keyframes: Keyframe[], options?: number | KeyframeAnimationOptions, position?: TimelinePosition): MotionTimeline;
63
+ play(): MotionTimeline;
64
+ pause(): MotionTimeline;
65
+ seek(ms: number): MotionTimeline;
66
+ restart(): MotionTimeline;
67
+ cancel(): void;
68
+ }
69
+ /** Resolve a timeline position against the previous entry (8.0). */
70
+ declare function resolvePosition(position: TimelinePosition | undefined, prev: {
71
+ start: number;
72
+ end: number;
73
+ } | null, total: number): number;
74
+ /** Sequence animations on the shared clock (8.0). */
75
+ declare function createTimeline(defaults?: KeyframeAnimationOptions & {
76
+ autoplay?: boolean;
77
+ }): MotionTimeline;
78
+ /** Hydration presets for `data-usa-hydrate="…"` (8.0). */
79
+ declare const HYDRATE_PRESETS: Record<string, Keyframe[]>;
80
+ /**
81
+ * CSS that keeps `[data-usa-hydrate]` hidden only while JS is on and the
82
+ * page has not hydrated yet (`html.usa-js`), with a 3 s CSS fallback so the
83
+ * content can never stay invisible (8.0).
84
+ */
85
+ declare const HYDRATION_CSS = "html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:0;animation:usa-hydrate-fallback 0s 3s forwards}@keyframes usa-hydrate-fallback{to{opacity:1}}@media (prefers-reduced-motion:reduce){html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:1;animation:none}}";
86
+ /** `<style>` + inline `<script>` for the SSR document head (8.0). Pass a CSP `nonce` if you use one. */
87
+ declare function ssrHead(nonce?: string): string;
88
+ interface HydrateOptions {
89
+ /** Delay between elements in document order (ms). Default 60. */
90
+ stagger?: number;
91
+ /** Duration per element (ms). Default 600. */
92
+ duration?: number;
93
+ /** Fallback preset when `data-usa-hydrate` is empty. Default `fade-up`. */
94
+ preset?: string;
95
+ easing?: string;
96
+ }
97
+ /**
98
+ * Animate server-rendered `[data-usa-hydrate]` elements in (document order,
99
+ * staggered; per-element `data-usa-delay`), mark them `data-usa-hydrated`
100
+ * and emit `usa:hydrated` on the root. Returns the timeline (8.0).
101
+ */
102
+ declare function hydrateMotion(root?: ParentNode, options?: HydrateOptions): MotionTimeline;
103
+
104
+ export { HYDRATE_PRESETS, HYDRATION_CSS, createTimeline, getClock, hydrateMotion, motionClock, onClockChange, resolvePosition, setClock, ssrHead, trackAnimation };
105
+ export type { HydrateOptions, MotionTimeline, TimelineEntry, TimelinePosition };
@@ -0,0 +1,105 @@
1
+ /** Put an animation on the shared motion clock (animateWithMotion does this for every component / effect animation). */
2
+ declare function trackAnimation(a: Animation | null | undefined): void;
3
+ /** The motion clock's state: `rate` (1 = normal), `paused`, `time` (clock ms elapsed, scaled by rate). */
4
+ declare function getClock(): {
5
+ rate: number;
6
+ paused: boolean;
7
+ time: number;
8
+ tracked: number;
9
+ };
10
+ /** Change the shared clock: `{ rate }` (0.05–8) and / or `{ paused }`. Applies to running animations and loops. */
11
+ declare function setClock(next: {
12
+ rate?: number;
13
+ paused?: boolean;
14
+ }): void;
15
+ /** Subscribe to clock changes; returns an unsubscribe. */
16
+ declare function onClockChange(fn: () => void): () => void;
17
+
18
+ /**
19
+ * `motionary/engine` (= `motionary/components/engine`, 8.0) — the unified
20
+ * timeline engine and SSR hydration animations.
21
+ *
22
+ * - **`motionClock`** — the one clock every component, effect and frame loop
23
+ * runs on: `rate` (slow-mo / fast-forward), `pause()` / `resume()` /
24
+ * `toggle()`, `time`, `onChange()`. Pausing it freezes every animation
25
+ * started by Motionary on the page.
26
+ * - **`createTimeline()`** — sequence animations on that clock:
27
+ * `add(target, keyframes, options, position)` with positions `1200`
28
+ * (ms), `'+=200'` / `'-=100'` (after / overlapping the previous end) or
29
+ * `'<'` / `'<+=80'` (with the previous start); `play()`, `pause()`,
30
+ * `seek(ms)`, `progress` (0–1, settable), `duration`, `finished`.
31
+ * - **`hydrateMotion()`** — animate server-rendered `[data-usa-hydrate]`
32
+ * markup in on hydration without a flash: `ssrHead()` gives the `<style>`
33
+ * + one-line `<script>` for the document head (content stays visible
34
+ * without JS, and a CSS fallback reveals it after 3 s if JS never runs).
35
+ */
36
+
37
+ /** The shared motion clock (8.0). */
38
+ declare const motionClock: {
39
+ rate: number;
40
+ readonly paused: boolean;
41
+ /** Clock time in ms (advances with the shared frame loop, scaled by `rate`, frozen while paused). */
42
+ readonly time: number;
43
+ pause(): void;
44
+ resume(): void;
45
+ toggle(): void;
46
+ onChange: typeof onClockChange;
47
+ };
48
+ type TimelinePosition = number | string;
49
+ interface TimelineEntry {
50
+ target: Element;
51
+ keyframes: Keyframe[];
52
+ options: KeyframeAnimationOptions;
53
+ start: number;
54
+ end: number;
55
+ }
56
+ interface MotionTimeline {
57
+ readonly entries: readonly TimelineEntry[];
58
+ readonly duration: number;
59
+ readonly playing: boolean;
60
+ progress: number;
61
+ readonly finished: Promise<void>;
62
+ add(target: Element | Element[] | NodeListOf<Element> | null, keyframes: Keyframe[], options?: number | KeyframeAnimationOptions, position?: TimelinePosition): MotionTimeline;
63
+ play(): MotionTimeline;
64
+ pause(): MotionTimeline;
65
+ seek(ms: number): MotionTimeline;
66
+ restart(): MotionTimeline;
67
+ cancel(): void;
68
+ }
69
+ /** Resolve a timeline position against the previous entry (8.0). */
70
+ declare function resolvePosition(position: TimelinePosition | undefined, prev: {
71
+ start: number;
72
+ end: number;
73
+ } | null, total: number): number;
74
+ /** Sequence animations on the shared clock (8.0). */
75
+ declare function createTimeline(defaults?: KeyframeAnimationOptions & {
76
+ autoplay?: boolean;
77
+ }): MotionTimeline;
78
+ /** Hydration presets for `data-usa-hydrate="…"` (8.0). */
79
+ declare const HYDRATE_PRESETS: Record<string, Keyframe[]>;
80
+ /**
81
+ * CSS that keeps `[data-usa-hydrate]` hidden only while JS is on and the
82
+ * page has not hydrated yet (`html.usa-js`), with a 3 s CSS fallback so the
83
+ * content can never stay invisible (8.0).
84
+ */
85
+ declare const HYDRATION_CSS = "html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:0;animation:usa-hydrate-fallback 0s 3s forwards}@keyframes usa-hydrate-fallback{to{opacity:1}}@media (prefers-reduced-motion:reduce){html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:1;animation:none}}";
86
+ /** `<style>` + inline `<script>` for the SSR document head (8.0). Pass a CSP `nonce` if you use one. */
87
+ declare function ssrHead(nonce?: string): string;
88
+ interface HydrateOptions {
89
+ /** Delay between elements in document order (ms). Default 60. */
90
+ stagger?: number;
91
+ /** Duration per element (ms). Default 600. */
92
+ duration?: number;
93
+ /** Fallback preset when `data-usa-hydrate` is empty. Default `fade-up`. */
94
+ preset?: string;
95
+ easing?: string;
96
+ }
97
+ /**
98
+ * Animate server-rendered `[data-usa-hydrate]` elements in (document order,
99
+ * staggered; per-element `data-usa-delay`), mark them `data-usa-hydrated`
100
+ * and emit `usa:hydrated` on the root. Returns the timeline (8.0).
101
+ */
102
+ declare function hydrateMotion(root?: ParentNode, options?: HydrateOptions): MotionTimeline;
103
+
104
+ export { HYDRATE_PRESETS, HYDRATION_CSS, createTimeline, getClock, hydrateMotion, motionClock, onClockChange, resolvePosition, setClock, ssrHead, trackAnimation };
105
+ export type { HydrateOptions, MotionTimeline, TimelineEntry, TimelinePosition };
@@ -0,0 +1,255 @@
1
+ import { v as onClockChange, x as setClock, y as getClock, p as prefersReducedMotion, e as animateWithMotion } from '../chunks/base-CLuqlLfG.js';
2
+ export { z as trackAnimation } from '../chunks/base-CLuqlLfG.js';
3
+
4
+ /**
5
+ * `motionary/engine` (= `motionary/components/engine`, 8.0) — the unified
6
+ * timeline engine and SSR hydration animations.
7
+ *
8
+ * - **`motionClock`** — the one clock every component, effect and frame loop
9
+ * runs on: `rate` (slow-mo / fast-forward), `pause()` / `resume()` /
10
+ * `toggle()`, `time`, `onChange()`. Pausing it freezes every animation
11
+ * started by Motionary on the page.
12
+ * - **`createTimeline()`** — sequence animations on that clock:
13
+ * `add(target, keyframes, options, position)` with positions `1200`
14
+ * (ms), `'+=200'` / `'-=100'` (after / overlapping the previous end) or
15
+ * `'<'` / `'<+=80'` (with the previous start); `play()`, `pause()`,
16
+ * `seek(ms)`, `progress` (0–1, settable), `duration`, `finished`.
17
+ * - **`hydrateMotion()`** — animate server-rendered `[data-usa-hydrate]`
18
+ * markup in on hydration without a flash: `ssrHead()` gives the `<style>`
19
+ * + one-line `<script>` for the document head (content stays visible
20
+ * without JS, and a CSS fallback reveals it after 3 s if JS never runs).
21
+ */
22
+ /** The shared motion clock (8.0). */
23
+ const motionClock = {
24
+ get rate() {
25
+ return getClock().rate;
26
+ },
27
+ set rate(r) {
28
+ setClock({ rate: r });
29
+ },
30
+ get paused() {
31
+ return getClock().paused;
32
+ },
33
+ /** Clock time in ms (advances with the shared frame loop, scaled by `rate`, frozen while paused). */
34
+ get time() {
35
+ return getClock().time;
36
+ },
37
+ pause() {
38
+ setClock({ paused: true });
39
+ },
40
+ resume() {
41
+ setClock({ paused: false });
42
+ },
43
+ toggle() {
44
+ setClock({ paused: !getClock().paused });
45
+ },
46
+ onChange: onClockChange,
47
+ };
48
+ /** Resolve a timeline position against the previous entry (8.0). */
49
+ function resolvePosition(position, prev, total) {
50
+ if (typeof position === 'number' && Number.isFinite(position))
51
+ return Math.max(0, position);
52
+ const p = String(position ?? '').replace(/\s+/g, '');
53
+ const prevStart = prev ? prev.start : 0;
54
+ const prevEnd = prev ? prev.end : 0;
55
+ let m;
56
+ if (p === '')
57
+ return prev ? prevEnd : 0;
58
+ if (p === '<')
59
+ return prevStart;
60
+ if ((m = p.match(/^<([+-])=(\d+(?:\.\d+)?)$/)))
61
+ return Math.max(0, prevStart + (m[1] === '+' ? 1 : -1) * Number(m[2]));
62
+ if ((m = p.match(/^([+-])=(\d+(?:\.\d+)?)$/)))
63
+ return Math.max(0, prevEnd + (m[1] === '+' ? 1 : -1) * Number(m[2]));
64
+ if (p === '>')
65
+ return total;
66
+ const n = Number(p);
67
+ return Number.isFinite(n) ? Math.max(0, n) : prevEnd;
68
+ }
69
+ const span = (o) => {
70
+ const d = typeof o.duration === 'number' ? o.duration : 0;
71
+ const it = typeof o.iterations === 'number' && Number.isFinite(o.iterations) ? o.iterations : 1;
72
+ return (o.delay || 0) + d * it + (o.endDelay || 0);
73
+ };
74
+ /** Sequence animations on the shared clock (8.0). */
75
+ function createTimeline(defaults = {}) {
76
+ const { autoplay = false, ...base } = defaults;
77
+ const entries = [];
78
+ let anims = [];
79
+ let playing = false;
80
+ let pos = 0;
81
+ let resolveDone = () => undefined;
82
+ let finished = new Promise((r) => (resolveDone = r));
83
+ let timer = 0;
84
+ const duration = () => entries.reduce((m, e) => Math.max(m, e.end), 0);
85
+ const build = () => {
86
+ if (anims.length === entries.length)
87
+ return;
88
+ anims.forEach((a) => a?.cancel());
89
+ anims = entries.map((e) => {
90
+ const a = animateWithMotion(e.target, e.keyframes, { fill: 'both', ...e.options, delay: e.start + (e.options.delay || 0) });
91
+ if (a) {
92
+ a.pause();
93
+ a.currentTime = pos;
94
+ }
95
+ return a;
96
+ });
97
+ };
98
+ const done = () => {
99
+ playing = false;
100
+ pos = duration();
101
+ resolveDone();
102
+ };
103
+ const tl = {
104
+ get entries() {
105
+ return entries;
106
+ },
107
+ get duration() {
108
+ return duration();
109
+ },
110
+ get playing() {
111
+ return playing;
112
+ },
113
+ get progress() {
114
+ const live = anims.find((a) => a && typeof a.currentTime === 'number');
115
+ const t = live && playing ? Number(live.currentTime) : pos;
116
+ const d = duration();
117
+ return d ? Math.min(1, Math.max(0, t / d)) : 0;
118
+ },
119
+ set progress(p) {
120
+ tl.seek(Math.min(1, Math.max(0, p)) * duration());
121
+ },
122
+ get finished() {
123
+ return finished;
124
+ },
125
+ add(target, keyframes, options = {}, position) {
126
+ const opts = { ...base, ...(typeof options === 'number' ? { duration: options } : options) };
127
+ const list = !target ? [] : target instanceof Element ? [target] : Array.from(target);
128
+ const prev = entries.length ? entries[entries.length - 1] : null;
129
+ let start = resolvePosition(position, prev, duration());
130
+ const stagger = opts.stagger ? Number(opts.stagger) : 0;
131
+ delete opts.stagger;
132
+ for (const el of list) {
133
+ entries.push({ target: el, keyframes, options: opts, start, end: start + span(opts) });
134
+ start += stagger;
135
+ }
136
+ anims.forEach((a) => a?.cancel());
137
+ anims = [];
138
+ return tl;
139
+ },
140
+ play() {
141
+ if (pos >= duration())
142
+ pos = 0;
143
+ if (playing)
144
+ return tl;
145
+ if (pos === 0 && anims.length) {
146
+ anims.forEach((a) => a?.cancel());
147
+ anims = [];
148
+ finished = new Promise((r) => (resolveDone = r));
149
+ }
150
+ build();
151
+ playing = true;
152
+ const live = anims.filter(Boolean);
153
+ live.forEach((a) => {
154
+ a.currentTime = pos;
155
+ a.play();
156
+ });
157
+ clearTimeout(timer);
158
+ if (!live.length || prefersReducedMotion()) {
159
+ tl.seek(duration());
160
+ done();
161
+ }
162
+ else
163
+ Promise.all(live.map((a) => a.finished.catch(() => undefined))).then(() => playing && done());
164
+ return tl;
165
+ },
166
+ pause() {
167
+ const live = anims.find((a) => a && typeof a.currentTime === 'number');
168
+ if (live)
169
+ pos = Number(live.currentTime);
170
+ anims.forEach((a) => a?.pause());
171
+ playing = false;
172
+ return tl;
173
+ },
174
+ seek(ms) {
175
+ pos = Math.min(duration(), Math.max(0, ms));
176
+ build();
177
+ anims.forEach((a) => {
178
+ if (!a)
179
+ return;
180
+ a.currentTime = pos;
181
+ if (!playing)
182
+ a.pause();
183
+ });
184
+ return tl;
185
+ },
186
+ restart() {
187
+ anims.forEach((a) => a?.cancel());
188
+ anims = [];
189
+ pos = 0;
190
+ playing = false;
191
+ finished = new Promise((r) => (resolveDone = r));
192
+ return tl.play();
193
+ },
194
+ cancel() {
195
+ anims.forEach((a) => a?.cancel());
196
+ anims = [];
197
+ playing = false;
198
+ pos = 0;
199
+ },
200
+ };
201
+ if (autoplay)
202
+ queueMicrotask(() => entries.length && tl.play());
203
+ return tl;
204
+ }
205
+ /** Hydration presets for `data-usa-hydrate="…"` (8.0). */
206
+ const HYDRATE_PRESETS = {
207
+ fade: [{ opacity: 0 }, { opacity: 1 }],
208
+ 'fade-up': [{ opacity: 0, transform: 'translateY(16px)' }, { opacity: 1, transform: 'none' }],
209
+ 'fade-down': [{ opacity: 0, transform: 'translateY(-16px)' }, { opacity: 1, transform: 'none' }],
210
+ scale: [{ opacity: 0, transform: 'scale(.94)' }, { opacity: 1, transform: 'none' }],
211
+ blur: [{ opacity: 0, filter: 'blur(8px)' }, { opacity: 1, filter: 'none' }],
212
+ 'slide-left': [{ opacity: 0, transform: 'translateX(24px)' }, { opacity: 1, transform: 'none' }],
213
+ };
214
+ /**
215
+ * CSS that keeps `[data-usa-hydrate]` hidden only while JS is on and the
216
+ * page has not hydrated yet (`html.usa-js`), with a 3 s CSS fallback so the
217
+ * content can never stay invisible (8.0).
218
+ */
219
+ const HYDRATION_CSS = 'html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:0;animation:usa-hydrate-fallback 0s 3s forwards}@keyframes usa-hydrate-fallback{to{opacity:1}}@media (prefers-reduced-motion:reduce){html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:1;animation:none}}';
220
+ /** `<style>` + inline `<script>` for the SSR document head (8.0). Pass a CSP `nonce` if you use one. */
221
+ function ssrHead(nonce) {
222
+ const n = nonce ? ` nonce="${String(nonce).replace(/"/g, '')}"` : '';
223
+ return `<style data-usa-hydration${n}>${HYDRATION_CSS}</style><script${n}>document.documentElement.classList.add('usa-js')</script>`;
224
+ }
225
+ /**
226
+ * Animate server-rendered `[data-usa-hydrate]` elements in (document order,
227
+ * staggered; per-element `data-usa-delay`), mark them `data-usa-hydrated`
228
+ * and emit `usa:hydrated` on the root. Returns the timeline (8.0).
229
+ */
230
+ function hydrateMotion(root = document, options = {}) {
231
+ const { stagger = 60, duration = 600, preset = 'fade-up', easing = 'cubic-bezier(.2,.8,.2,1)' } = options;
232
+ if (typeof document !== 'undefined' && !document.querySelector('style[data-usa-hydration]')) {
233
+ const s = document.createElement('style');
234
+ s.setAttribute('data-usa-hydration', '');
235
+ s.textContent = HYDRATION_CSS;
236
+ document.head?.appendChild(s);
237
+ }
238
+ const els = Array.from(root.querySelectorAll('[data-usa-hydrate]:not([data-usa-hydrated])'));
239
+ const tl = createTimeline({ easing, duration });
240
+ els.forEach((el, i) => {
241
+ const name = el.getAttribute('data-usa-hydrate') || preset;
242
+ const frames = HYDRATE_PRESETS[name] || HYDRATE_PRESETS[preset] || HYDRATE_PRESETS['fade-up'];
243
+ const extra = Number(el.getAttribute('data-usa-delay')) || 0;
244
+ tl.add(el, frames, { duration, easing }, i * stagger + extra);
245
+ });
246
+ // mark first so the hiding CSS lets go; the animation's backwards fill holds the first frame
247
+ tl.play();
248
+ els.forEach((el) => el.setAttribute('data-usa-hydrated', ''));
249
+ const target = root.dispatchEvent ? root : document;
250
+ tl.finished.then(() => target.dispatchEvent?.(new CustomEvent('usa:hydrated', { detail: { count: els.length }, bubbles: true })));
251
+ return tl;
252
+ }
253
+
254
+ export { HYDRATE_PRESETS, HYDRATION_CSS, createTimeline, getClock, hydrateMotion, motionClock, onClockChange, resolvePosition, setClock, ssrHead };
255
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sources":["../../src/components/engine/index.ts"],"sourcesContent":["/**\n * `motionary/engine` (= `motionary/components/engine`, 8.0) — the unified\n * timeline engine and SSR hydration animations.\n *\n * - **`motionClock`** — the one clock every component, effect and frame loop\n * runs on: `rate` (slow-mo / fast-forward), `pause()` / `resume()` /\n * `toggle()`, `time`, `onChange()`. Pausing it freezes every animation\n * started by Motionary on the page.\n * - **`createTimeline()`** — sequence animations on that clock:\n * `add(target, keyframes, options, position)` with positions `1200`\n * (ms), `'+=200'` / `'-=100'` (after / overlapping the previous end) or\n * `'<'` / `'<+=80'` (with the previous start); `play()`, `pause()`,\n * `seek(ms)`, `progress` (0–1, settable), `duration`, `finished`.\n * - **`hydrateMotion()`** — animate server-rendered `[data-usa-hydrate]`\n * markup in on hydration without a flash: `ssrHead()` gives the `<style>`\n * + one-line `<script>` for the document head (content stays visible\n * without JS, and a CSS fallback reveals it after 3 s if JS never runs).\n */\nimport { animateWithMotion, getClock, setClock, onClockChange, prefersReducedMotion } from '../base';\n\nexport { getClock, setClock, onClockChange, trackAnimation } from '../base';\n\n/** The shared motion clock (8.0). */\nexport const motionClock = {\n get rate(): number {\n return getClock().rate;\n },\n set rate(r: number) {\n setClock({ rate: r });\n },\n get paused(): boolean {\n return getClock().paused;\n },\n /** Clock time in ms (advances with the shared frame loop, scaled by `rate`, frozen while paused). */\n get time(): number {\n return getClock().time;\n },\n pause(): void {\n setClock({ paused: true });\n },\n resume(): void {\n setClock({ paused: false });\n },\n toggle(): void {\n setClock({ paused: !getClock().paused });\n },\n onChange: onClockChange,\n};\n\nexport type TimelinePosition = number | string;\nexport interface TimelineEntry {\n target: Element;\n keyframes: Keyframe[];\n options: KeyframeAnimationOptions;\n start: number;\n end: number;\n}\nexport interface MotionTimeline {\n readonly entries: readonly TimelineEntry[];\n readonly duration: number;\n readonly playing: boolean;\n progress: number;\n readonly finished: Promise<void>;\n add(target: Element | Element[] | NodeListOf<Element> | null, keyframes: Keyframe[], options?: number | KeyframeAnimationOptions, position?: TimelinePosition): MotionTimeline;\n play(): MotionTimeline;\n pause(): MotionTimeline;\n seek(ms: number): MotionTimeline;\n restart(): MotionTimeline;\n cancel(): void;\n}\n\n/** Resolve a timeline position against the previous entry (8.0). */\nexport function resolvePosition(position: TimelinePosition | undefined, prev: { start: number; end: number } | null, total: number): number {\n if (typeof position === 'number' && Number.isFinite(position)) return Math.max(0, position);\n const p = String(position ?? '').replace(/\\s+/g, '');\n const prevStart = prev ? prev.start : 0;\n const prevEnd = prev ? prev.end : 0;\n let m: RegExpMatchArray | null;\n if (p === '') return prev ? prevEnd : 0;\n if (p === '<') return prevStart;\n if ((m = p.match(/^<([+-])=(\\d+(?:\\.\\d+)?)$/))) return Math.max(0, prevStart + (m[1] === '+' ? 1 : -1) * Number(m[2]));\n if ((m = p.match(/^([+-])=(\\d+(?:\\.\\d+)?)$/))) return Math.max(0, prevEnd + (m[1] === '+' ? 1 : -1) * Number(m[2]));\n if (p === '>') return total;\n const n = Number(p);\n return Number.isFinite(n) ? Math.max(0, n) : prevEnd;\n}\n\nconst span = (o: KeyframeAnimationOptions): number => {\n const d = typeof o.duration === 'number' ? o.duration : 0;\n const it = typeof o.iterations === 'number' && Number.isFinite(o.iterations) ? o.iterations : 1;\n return (o.delay || 0) + d * it + (o.endDelay || 0);\n};\n\n/** Sequence animations on the shared clock (8.0). */\nexport function createTimeline(defaults: KeyframeAnimationOptions & { autoplay?: boolean } = {}): MotionTimeline {\n const { autoplay = false, ...base } = defaults;\n const entries: TimelineEntry[] = [];\n let anims: (Animation | null)[] = [];\n let playing = false;\n let pos = 0;\n let resolveDone: () => void = () => undefined;\n let finished = new Promise<void>((r) => (resolveDone = r));\n let timer = 0 as unknown as ReturnType<typeof setTimeout>;\n\n const duration = () => entries.reduce((m, e) => Math.max(m, e.end), 0);\n const build = () => {\n if (anims.length === entries.length) return;\n anims.forEach((a) => a?.cancel());\n anims = entries.map((e) => {\n const a = animateWithMotion(e.target, e.keyframes, { fill: 'both', ...e.options, delay: e.start + (e.options.delay || 0) });\n if (a) {\n a.pause();\n a.currentTime = pos;\n }\n return a;\n });\n };\n const done = () => {\n playing = false;\n pos = duration();\n resolveDone();\n };\n const tl: MotionTimeline = {\n get entries() {\n return entries;\n },\n get duration() {\n return duration();\n },\n get playing() {\n return playing;\n },\n get progress() {\n const live = anims.find((a) => a && typeof a.currentTime === 'number');\n const t = live && playing ? Number(live.currentTime) : pos;\n const d = duration();\n return d ? Math.min(1, Math.max(0, t / d)) : 0;\n },\n set progress(p: number) {\n tl.seek(Math.min(1, Math.max(0, p)) * duration());\n },\n get finished() {\n return finished;\n },\n add(target, keyframes, options = {}, position) {\n const opts: KeyframeAnimationOptions = { ...base, ...(typeof options === 'number' ? { duration: options } : options) };\n const list = !target ? [] : target instanceof Element ? [target] : Array.from(target as ArrayLike<Element>);\n const prev = entries.length ? entries[entries.length - 1] : null;\n let start = resolvePosition(position, prev, duration());\n const stagger = (opts as any).stagger ? Number((opts as any).stagger) : 0;\n delete (opts as any).stagger;\n for (const el of list) {\n entries.push({ target: el, keyframes, options: opts, start, end: start + span(opts) });\n start += stagger;\n }\n anims.forEach((a) => a?.cancel());\n anims = [];\n return tl;\n },\n play() {\n if (pos >= duration()) pos = 0;\n if (playing) return tl;\n if (pos === 0 && anims.length) {\n anims.forEach((a) => a?.cancel());\n anims = [];\n finished = new Promise<void>((r) => (resolveDone = r));\n }\n build();\n playing = true;\n const live = anims.filter(Boolean) as Animation[];\n live.forEach((a) => {\n a.currentTime = pos;\n a.play();\n });\n clearTimeout(timer);\n if (!live.length || prefersReducedMotion()) {\n tl.seek(duration());\n done();\n } else Promise.all(live.map((a) => a.finished.catch(() => undefined))).then(() => playing && done());\n return tl;\n },\n pause() {\n const live = anims.find((a) => a && typeof a.currentTime === 'number');\n if (live) pos = Number(live.currentTime);\n anims.forEach((a) => a?.pause());\n playing = false;\n return tl;\n },\n seek(ms) {\n pos = Math.min(duration(), Math.max(0, ms));\n build();\n anims.forEach((a) => {\n if (!a) return;\n a.currentTime = pos;\n if (!playing) a.pause();\n });\n return tl;\n },\n restart() {\n anims.forEach((a) => a?.cancel());\n anims = [];\n pos = 0;\n playing = false;\n finished = new Promise<void>((r) => (resolveDone = r));\n return tl.play();\n },\n cancel() {\n anims.forEach((a) => a?.cancel());\n anims = [];\n playing = false;\n pos = 0;\n },\n };\n if (autoplay) queueMicrotask(() => entries.length && tl.play());\n return tl;\n}\n\n/** Hydration presets for `data-usa-hydrate=\"…\"` (8.0). */\nexport const HYDRATE_PRESETS: Record<string, Keyframe[]> = {\n fade: [{ opacity: 0 }, { opacity: 1 }],\n 'fade-up': [{ opacity: 0, transform: 'translateY(16px)' }, { opacity: 1, transform: 'none' }],\n 'fade-down': [{ opacity: 0, transform: 'translateY(-16px)' }, { opacity: 1, transform: 'none' }],\n scale: [{ opacity: 0, transform: 'scale(.94)' }, { opacity: 1, transform: 'none' }],\n blur: [{ opacity: 0, filter: 'blur(8px)' }, { opacity: 1, filter: 'none' }],\n 'slide-left': [{ opacity: 0, transform: 'translateX(24px)' }, { opacity: 1, transform: 'none' }],\n};\n\n/**\n * CSS that keeps `[data-usa-hydrate]` hidden only while JS is on and the\n * page has not hydrated yet (`html.usa-js`), with a 3 s CSS fallback so the\n * content can never stay invisible (8.0).\n */\nexport const HYDRATION_CSS =\n 'html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:0;animation:usa-hydrate-fallback 0s 3s forwards}@keyframes usa-hydrate-fallback{to{opacity:1}}@media (prefers-reduced-motion:reduce){html.usa-js [data-usa-hydrate]:not([data-usa-hydrated]),html.usa-js usa-hydrate:not([data-usa-hydrated])>*{opacity:1;animation:none}}';\n\n/** `<style>` + inline `<script>` for the SSR document head (8.0). Pass a CSP `nonce` if you use one. */\nexport function ssrHead(nonce?: string): string {\n const n = nonce ? ` nonce=\"${String(nonce).replace(/\"/g, '')}\"` : '';\n return `<style data-usa-hydration${n}>${HYDRATION_CSS}</style><script${n}>document.documentElement.classList.add('usa-js')</script>`;\n}\n\nexport interface HydrateOptions {\n /** Delay between elements in document order (ms). Default 60. */\n stagger?: number;\n /** Duration per element (ms). Default 600. */\n duration?: number;\n /** Fallback preset when `data-usa-hydrate` is empty. Default `fade-up`. */\n preset?: string;\n easing?: string;\n /** Run as a timeline you can pause / seek (returned). */\n}\n\n/**\n * Animate server-rendered `[data-usa-hydrate]` elements in (document order,\n * staggered; per-element `data-usa-delay`), mark them `data-usa-hydrated`\n * and emit `usa:hydrated` on the root. Returns the timeline (8.0).\n */\nexport function hydrateMotion(root: ParentNode = document, options: HydrateOptions = {}): MotionTimeline {\n const { stagger = 60, duration = 600, preset = 'fade-up', easing = 'cubic-bezier(.2,.8,.2,1)' } = options;\n if (typeof document !== 'undefined' && !document.querySelector('style[data-usa-hydration]')) {\n const s = document.createElement('style');\n s.setAttribute('data-usa-hydration', '');\n s.textContent = HYDRATION_CSS;\n document.head?.appendChild(s);\n }\n const els = Array.from(root.querySelectorAll<HTMLElement>('[data-usa-hydrate]:not([data-usa-hydrated])'));\n const tl = createTimeline({ easing, duration });\n els.forEach((el, i) => {\n const name = el.getAttribute('data-usa-hydrate') || preset;\n const frames = HYDRATE_PRESETS[name] || HYDRATE_PRESETS[preset] || HYDRATE_PRESETS['fade-up'];\n const extra = Number(el.getAttribute('data-usa-delay')) || 0;\n tl.add(el, frames, { duration, easing }, i * stagger + extra);\n });\n // mark first so the hiding CSS lets go; the animation's backwards fill holds the first frame\n tl.play();\n els.forEach((el) => el.setAttribute('data-usa-hydrated', ''));\n const target = (root as any).dispatchEvent ? (root as unknown as EventTarget) : document;\n tl.finished.then(() => target.dispatchEvent?.(new CustomEvent('usa:hydrated', { detail: { count: els.length }, bubbles: true })));\n return tl;\n}\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;AAiBG;AAKH;AACO,MAAM,WAAW,GAAG;AACzB,IAAA,IAAI,IAAI,GAAA;AAC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AE,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACjI,IAAA,OAAO,EAAE;AACX;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-BaQV-2ha.cjs');
3
+ var base = require('../chunks/base-DoRUZBy-.cjs');
4
4
 
5
5
  var css$4 = "usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-kind=\"windows\"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind=\"windows\"] i::after{content:\"\";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-kind=\"windows\"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind=\"windows\"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind=\"windows\"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind=\"windows\"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-kind=\"ring\"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-kind=\"dots\"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind=\"dots\"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-kind=\"dots\"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind=\"dots\"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-kind=\"pulse\"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-kind=\"pulse\"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-kind=\"bars\"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind=\"bars\"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-kind=\"bars\"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind=\"bars\"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind=\"bars\"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-kind=\"windows\"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}";
6
6
 
@@ -1,4 +1,4 @@
1
- import { u as defineElement, A as kindOf, z as EASE_OUT, k as clamp, F as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-2-yYc93C.js';
1
+ import { u as defineElement, F as kindOf, D as EASE_OUT, k as clamp, H as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-CLuqlLfG.js';
2
2
 
3
3
  var css$4 = "usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-kind=\"windows\"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind=\"windows\"] i::after{content:\"\";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-kind=\"windows\"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind=\"windows\"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind=\"windows\"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind=\"windows\"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-kind=\"ring\"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-kind=\"dots\"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind=\"dots\"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-kind=\"dots\"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind=\"dots\"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-kind=\"pulse\"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-kind=\"pulse\"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-kind=\"bars\"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind=\"bars\"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-kind=\"bars\"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind=\"bars\"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind=\"bars\"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-kind=\"windows\"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}";
4
4
 
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-DehBVRDV.cjs');
3
+ var registry = require('../chunks/registry-BVklOepd.cjs');
4
4
  var shared = require('../chunks/shared-jkgRH-Hx.cjs');
5
5
  var components_fxLight = require('./fx-light.cjs');
6
- require('../chunks/base-BaQV-2ha.cjs');
6
+ require('../chunks/base-DoRUZBy-.cjs');
7
7
  require('../chunks/generative-BHIj-NU0.cjs');
8
8
 
9
9
  const layers = (el) => {
@@ -1,7 +1,7 @@
1
- import { registerEffects } from '../chunks/registry-CyKExAmE.js';
1
+ import { registerEffects } from '../chunks/registry-CnO7ZVPK.js';
2
2
  import { a as all } from '../chunks/shared-CkKHWrtJ.js';
3
3
  import { trackPointer } from './fx-light.js';
4
- import '../chunks/base-2-yYc93C.js';
4
+ import '../chunks/base-CLuqlLfG.js';
5
5
  import '../chunks/generative-2LhxG5BJ.js';
6
6
 
7
7
  const layers = (el) => {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-DehBVRDV.cjs');
4
- require('../chunks/base-BaQV-2ha.cjs');
3
+ var registry = require('../chunks/registry-BVklOepd.cjs');
4
+ require('../chunks/base-DoRUZBy-.cjs');
5
5
 
6
6
  /** Split text into words, keeping the whitespace after each (7.8). */
7
7
  function splitWords(text) {
@@ -1,5 +1,5 @@
1
- import { registerEffects } from '../chunks/registry-CyKExAmE.js';
2
- import '../chunks/base-2-yYc93C.js';
1
+ import { registerEffects } from '../chunks/registry-CnO7ZVPK.js';
2
+ import '../chunks/base-CLuqlLfG.js';
3
3
 
4
4
  /** Split text into words, keeping the whitespace after each (7.8). */
5
5
  function splitWords(text) {
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-DehBVRDV.cjs');
3
+ var registry = require('../chunks/registry-BVklOepd.cjs');
4
4
  var shared = require('../chunks/shared-jkgRH-Hx.cjs');
5
- require('../chunks/base-BaQV-2ha.cjs');
5
+ require('../chunks/base-DoRUZBy-.cjs');
6
6
 
7
7
  const fade = (el, ctx) => ctx.animate(el, [{ opacity: 0 }, { opacity: 1 }], { duration: 250 });
8
8
  const pick = (el, sel) => Array.from(el.querySelectorAll(sel));
@@ -1,6 +1,6 @@
1
- import { registerEffects } from '../chunks/registry-CyKExAmE.js';
1
+ import { registerEffects } from '../chunks/registry-CnO7ZVPK.js';
2
2
  import { a as all } from '../chunks/shared-CkKHWrtJ.js';
3
- import '../chunks/base-2-yYc93C.js';
3
+ import '../chunks/base-CLuqlLfG.js';
4
4
 
5
5
  const fade = (el, ctx) => ctx.animate(el, [{ opacity: 0 }, { opacity: 1 }], { duration: 250 });
6
6
  const pick = (el, sel) => Array.from(el.querySelectorAll(sel));