motionary 0.0.0-stage → 6.2.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 (374) hide show
  1. package/CHANGELOG.md +803 -0
  2. package/LICENSE +21 -0
  3. package/README.md +218 -2
  4. package/README_ja.md +219 -0
  5. package/README_zh.md +219 -0
  6. package/bin/usa-codemod-5.mjs +79 -0
  7. package/bin/usa-codemod-6.mjs +146 -0
  8. package/dist/chunks/base-BaQV-2ha.cjs +436 -0
  9. package/dist/chunks/base-BaQV-2ha.cjs.map +1 -0
  10. package/dist/chunks/base-C_3cAoRz.js +404 -0
  11. package/dist/chunks/base-C_3cAoRz.js.map +1 -0
  12. package/dist/chunks/bind-B_CTL6Qn.js +22 -0
  13. package/dist/chunks/bind-B_CTL6Qn.js.map +1 -0
  14. package/dist/chunks/bind-Ui43-n2d.cjs +25 -0
  15. package/dist/chunks/bind-Ui43-n2d.cjs.map +1 -0
  16. package/dist/chunks/core-B5T0dhFH.cjs +920 -0
  17. package/dist/chunks/core-B5T0dhFH.cjs.map +1 -0
  18. package/dist/chunks/core-BGAyaY6L.cjs +265 -0
  19. package/dist/chunks/core-BGAyaY6L.cjs.map +1 -0
  20. package/dist/chunks/core-D7cVumUu.js +909 -0
  21. package/dist/chunks/core-D7cVumUu.js.map +1 -0
  22. package/dist/chunks/core-VEBw36QK.js +260 -0
  23. package/dist/chunks/core-VEBw36QK.js.map +1 -0
  24. package/dist/chunks/core-ps8uvYuN.js +181 -0
  25. package/dist/chunks/core-ps8uvYuN.js.map +1 -0
  26. package/dist/chunks/core-zq17EeCI.cjs +185 -0
  27. package/dist/chunks/core-zq17EeCI.cjs.map +1 -0
  28. package/dist/chunks/fx-Bs6IrV4Q.js +109 -0
  29. package/dist/chunks/fx-Bs6IrV4Q.js.map +1 -0
  30. package/dist/chunks/fx-lBGVtQO1.cjs +114 -0
  31. package/dist/chunks/fx-lBGVtQO1.cjs.map +1 -0
  32. package/dist/chunks/generative-D2YyhaeO.js +336 -0
  33. package/dist/chunks/generative-D2YyhaeO.js.map +1 -0
  34. package/dist/chunks/generative-DzIZq-_g.cjs +348 -0
  35. package/dist/chunks/generative-DzIZq-_g.cjs.map +1 -0
  36. package/dist/chunks/gpu-Bu7qwugO.js +380 -0
  37. package/dist/chunks/gpu-Bu7qwugO.js.map +1 -0
  38. package/dist/chunks/gpu-CenK2l6b.cjs +387 -0
  39. package/dist/chunks/gpu-CenK2l6b.cjs.map +1 -0
  40. package/dist/chunks/index-tags-DucKMQr_.js +26 -0
  41. package/dist/chunks/index-tags-DucKMQr_.js.map +1 -0
  42. package/dist/chunks/index-tags-wv0R_vkO.cjs +28 -0
  43. package/dist/chunks/index-tags-wv0R_vkO.cjs.map +1 -0
  44. package/dist/chunks/presets-BYBVJVeP.js +226 -0
  45. package/dist/chunks/presets-BYBVJVeP.js.map +1 -0
  46. package/dist/chunks/presets-CUHys3sK.cjs +233 -0
  47. package/dist/chunks/presets-CUHys3sK.cjs.map +1 -0
  48. package/dist/chunks/registry-CKNLQpwd.js +121 -0
  49. package/dist/chunks/registry-CKNLQpwd.js.map +1 -0
  50. package/dist/chunks/registry-DehBVRDV.cjs +131 -0
  51. package/dist/chunks/registry-DehBVRDV.cjs.map +1 -0
  52. package/dist/chunks/spring-CbvHfVtP.js +219 -0
  53. package/dist/chunks/spring-CbvHfVtP.js.map +1 -0
  54. package/dist/chunks/spring-Dgx187Vh.cjs +232 -0
  55. package/dist/chunks/spring-Dgx187Vh.cjs.map +1 -0
  56. package/dist/chunks/stagger-CCFyhzSw.cjs +86 -0
  57. package/dist/chunks/stagger-CCFyhzSw.cjs.map +1 -0
  58. package/dist/chunks/stagger-DtMKo2SK.js +84 -0
  59. package/dist/chunks/stagger-DtMKo2SK.js.map +1 -0
  60. package/dist/chunks/variants-BhjyddG8.cjs +39 -0
  61. package/dist/chunks/variants-BhjyddG8.cjs.map +1 -0
  62. package/dist/chunks/variants-DRlKVHvu.js +35 -0
  63. package/dist/chunks/variants-DRlKVHvu.js.map +1 -0
  64. package/dist/components/a11y.cjs +276 -0
  65. package/dist/components/a11y.cjs.map +1 -0
  66. package/dist/components/a11y.d.cts +131 -0
  67. package/dist/components/a11y.d.ts +131 -0
  68. package/dist/components/a11y.js +259 -0
  69. package/dist/components/a11y.js.map +1 -0
  70. package/dist/components/angular.cjs +76 -0
  71. package/dist/components/angular.cjs.map +1 -0
  72. package/dist/components/angular.d.cts +1734 -0
  73. package/dist/components/angular.d.ts +1734 -0
  74. package/dist/components/angular.js +70 -0
  75. package/dist/components/angular.js.map +1 -0
  76. package/dist/components/background.cjs +659 -0
  77. package/dist/components/background.cjs.map +1 -0
  78. package/dist/components/background.css +9 -0
  79. package/dist/components/background.d.cts +166 -0
  80. package/dist/components/background.d.ts +166 -0
  81. package/dist/components/background.js +647 -0
  82. package/dist/components/background.js.map +1 -0
  83. package/dist/components/bridge.cjs +154 -0
  84. package/dist/components/bridge.cjs.map +1 -0
  85. package/dist/components/bridge.d.cts +63 -0
  86. package/dist/components/bridge.d.ts +63 -0
  87. package/dist/components/bridge.js +147 -0
  88. package/dist/components/bridge.js.map +1 -0
  89. package/dist/components/cards.cjs +561 -0
  90. package/dist/components/cards.cjs.map +1 -0
  91. package/dist/components/cards.css +6 -0
  92. package/dist/components/cards.d.cts +115 -0
  93. package/dist/components/cards.d.ts +115 -0
  94. package/dist/components/cards.js +554 -0
  95. package/dist/components/cards.js.map +1 -0
  96. package/dist/components/click.cjs +877 -0
  97. package/dist/components/click.cjs.map +1 -0
  98. package/dist/components/click.css +9 -0
  99. package/dist/components/click.d.cts +218 -0
  100. package/dist/components/click.d.ts +218 -0
  101. package/dist/components/click.js +863 -0
  102. package/dist/components/click.js.map +1 -0
  103. package/dist/components/depth.cjs +250 -0
  104. package/dist/components/depth.cjs.map +1 -0
  105. package/dist/components/depth.css +3 -0
  106. package/dist/components/depth.d.cts +86 -0
  107. package/dist/components/depth.d.ts +86 -0
  108. package/dist/components/depth.js +242 -0
  109. package/dist/components/depth.js.map +1 -0
  110. package/dist/components/effects.cjs +2258 -0
  111. package/dist/components/effects.cjs.map +1 -0
  112. package/dist/components/effects.d.cts +545 -0
  113. package/dist/components/effects.d.ts +545 -0
  114. package/dist/components/effects.js +2200 -0
  115. package/dist/components/effects.js.map +1 -0
  116. package/dist/components/feedback.cjs +442 -0
  117. package/dist/components/feedback.cjs.map +1 -0
  118. package/dist/components/feedback.css +7 -0
  119. package/dist/components/feedback.d.cts +144 -0
  120. package/dist/components/feedback.d.ts +144 -0
  121. package/dist/components/feedback.js +433 -0
  122. package/dist/components/feedback.js.map +1 -0
  123. package/dist/components/fx-gpu.cjs +12 -0
  124. package/dist/components/fx-gpu.cjs.map +1 -0
  125. package/dist/components/fx-gpu.d.cts +63 -0
  126. package/dist/components/fx-gpu.d.ts +63 -0
  127. package/dist/components/fx-gpu.js +5 -0
  128. package/dist/components/fx-gpu.js.map +1 -0
  129. package/dist/components/fx.cjs +169 -0
  130. package/dist/components/fx.cjs.map +1 -0
  131. package/dist/components/fx.css +3 -0
  132. package/dist/components/fx.d.cts +114 -0
  133. package/dist/components/fx.d.ts +114 -0
  134. package/dist/components/fx.js +156 -0
  135. package/dist/components/fx.js.map +1 -0
  136. package/dist/components/fx2.cjs +25 -0
  137. package/dist/components/fx2.cjs.map +1 -0
  138. package/dist/components/fx2.d.cts +136 -0
  139. package/dist/components/fx2.d.ts +136 -0
  140. package/dist/components/fx2.js +17 -0
  141. package/dist/components/fx2.js.map +1 -0
  142. package/dist/components/gesture.cjs +209 -0
  143. package/dist/components/gesture.cjs.map +1 -0
  144. package/dist/components/gesture.css +3 -0
  145. package/dist/components/gesture.d.cts +134 -0
  146. package/dist/components/gesture.d.ts +134 -0
  147. package/dist/components/gesture.js +203 -0
  148. package/dist/components/gesture.js.map +1 -0
  149. package/dist/components/interaction.cjs +424 -0
  150. package/dist/components/interaction.cjs.map +1 -0
  151. package/dist/components/interaction.css +8 -0
  152. package/dist/components/interaction.d.cts +115 -0
  153. package/dist/components/interaction.d.ts +115 -0
  154. package/dist/components/interaction.js +416 -0
  155. package/dist/components/interaction.js.map +1 -0
  156. package/dist/components/jsx.cjs +3 -0
  157. package/dist/components/jsx.cjs.map +1 -0
  158. package/dist/components/jsx.d.cts +53 -0
  159. package/dist/components/jsx.d.ts +53 -0
  160. package/dist/components/jsx.js +2 -0
  161. package/dist/components/jsx.js.map +1 -0
  162. package/dist/components/layout.cjs +257 -0
  163. package/dist/components/layout.cjs.map +1 -0
  164. package/dist/components/layout.css +3 -0
  165. package/dist/components/layout.d.cts +99 -0
  166. package/dist/components/layout.d.ts +99 -0
  167. package/dist/components/layout.js +249 -0
  168. package/dist/components/layout.js.map +1 -0
  169. package/dist/components/lazy.cjs +92 -0
  170. package/dist/components/lazy.cjs.map +1 -0
  171. package/dist/components/lazy.d.cts +48 -0
  172. package/dist/components/lazy.d.ts +48 -0
  173. package/dist/components/lazy.js +87 -0
  174. package/dist/components/lazy.js.map +1 -0
  175. package/dist/components/lite.cjs +11095 -0
  176. package/dist/components/lite.cjs.map +1 -0
  177. package/dist/components/lite.d.cts +4 -0
  178. package/dist/components/lite.d.ts +4 -0
  179. package/dist/components/lite.js +10827 -0
  180. package/dist/components/lite.js.map +1 -0
  181. package/dist/components/packs.cjs +192 -0
  182. package/dist/components/packs.cjs.map +1 -0
  183. package/dist/components/packs.css +3 -0
  184. package/dist/components/packs.d.cts +72 -0
  185. package/dist/components/packs.d.ts +72 -0
  186. package/dist/components/packs.js +184 -0
  187. package/dist/components/packs.js.map +1 -0
  188. package/dist/components/page.cjs +824 -0
  189. package/dist/components/page.cjs.map +1 -0
  190. package/dist/components/page.css +11 -0
  191. package/dist/components/page.d.cts +249 -0
  192. package/dist/components/page.d.ts +249 -0
  193. package/dist/components/page.js +799 -0
  194. package/dist/components/page.js.map +1 -0
  195. package/dist/components/perf.cjs +120 -0
  196. package/dist/components/perf.cjs.map +1 -0
  197. package/dist/components/perf.d.cts +98 -0
  198. package/dist/components/perf.d.ts +98 -0
  199. package/dist/components/perf.js +110 -0
  200. package/dist/components/perf.js.map +1 -0
  201. package/dist/components/physics.cjs +448 -0
  202. package/dist/components/physics.cjs.map +1 -0
  203. package/dist/components/physics.css +5 -0
  204. package/dist/components/physics.d.cts +189 -0
  205. package/dist/components/physics.d.ts +189 -0
  206. package/dist/components/physics.js +430 -0
  207. package/dist/components/physics.js.map +1 -0
  208. package/dist/components/react.cjs +96 -0
  209. package/dist/components/react.cjs.map +1 -0
  210. package/dist/components/react.d.cts +18 -0
  211. package/dist/components/react.d.ts +18 -0
  212. package/dist/components/react.js +91 -0
  213. package/dist/components/react.js.map +1 -0
  214. package/dist/components/reveal.cjs +362 -0
  215. package/dist/components/reveal.cjs.map +1 -0
  216. package/dist/components/reveal.css +5 -0
  217. package/dist/components/reveal.d.cts +105 -0
  218. package/dist/components/reveal.d.ts +105 -0
  219. package/dist/components/reveal.js +353 -0
  220. package/dist/components/reveal.js.map +1 -0
  221. package/dist/components/solid.cjs +86 -0
  222. package/dist/components/solid.cjs.map +1 -0
  223. package/dist/components/solid.d.cts +1751 -0
  224. package/dist/components/solid.d.ts +1751 -0
  225. package/dist/components/solid.js +82 -0
  226. package/dist/components/solid.js.map +1 -0
  227. package/dist/components/svelte.cjs +68 -0
  228. package/dist/components/svelte.cjs.map +1 -0
  229. package/dist/components/svelte.d.cts +1733 -0
  230. package/dist/components/svelte.d.ts +1733 -0
  231. package/dist/components/svelte.js +64 -0
  232. package/dist/components/svelte.js.map +1 -0
  233. package/dist/components/svg.cjs +359 -0
  234. package/dist/components/svg.cjs.map +1 -0
  235. package/dist/components/svg.css +3 -0
  236. package/dist/components/svg.d.cts +113 -0
  237. package/dist/components/svg.d.ts +113 -0
  238. package/dist/components/svg.js +347 -0
  239. package/dist/components/svg.js.map +1 -0
  240. package/dist/components/text.cjs +968 -0
  241. package/dist/components/text.cjs.map +1 -0
  242. package/dist/components/text.css +8 -0
  243. package/dist/components/text.d.cts +342 -0
  244. package/dist/components/text.d.ts +342 -0
  245. package/dist/components/text.js +947 -0
  246. package/dist/components/text.js.map +1 -0
  247. package/dist/components/timeline.cjs +109 -0
  248. package/dist/components/timeline.cjs.map +1 -0
  249. package/dist/components/timeline.css +3 -0
  250. package/dist/components/timeline.d.cts +155 -0
  251. package/dist/components/timeline.d.ts +155 -0
  252. package/dist/components/timeline.js +103 -0
  253. package/dist/components/timeline.js.map +1 -0
  254. package/dist/components/tokens.cjs +226 -0
  255. package/dist/components/tokens.cjs.map +1 -0
  256. package/dist/components/tokens.d.cts +74 -0
  257. package/dist/components/tokens.d.ts +74 -0
  258. package/dist/components/tokens.js +211 -0
  259. package/dist/components/tokens.js.map +1 -0
  260. package/dist/components/transitions.cjs +430 -0
  261. package/dist/components/transitions.cjs.map +1 -0
  262. package/dist/components/transitions.css +5 -0
  263. package/dist/components/transitions.d.cts +126 -0
  264. package/dist/components/transitions.d.ts +126 -0
  265. package/dist/components/transitions.js +423 -0
  266. package/dist/components/transitions.js.map +1 -0
  267. package/dist/components/ui.cjs +1050 -0
  268. package/dist/components/ui.cjs.map +1 -0
  269. package/dist/components/ui.css +14 -0
  270. package/dist/components/ui.d.cts +224 -0
  271. package/dist/components/ui.d.ts +224 -0
  272. package/dist/components/ui.js +1034 -0
  273. package/dist/components/ui.js.map +1 -0
  274. package/dist/components/vue.cjs +67 -0
  275. package/dist/components/vue.cjs.map +1 -0
  276. package/dist/components/vue.d.cts +1722 -0
  277. package/dist/components/vue.d.ts +1722 -0
  278. package/dist/components/vue.js +64 -0
  279. package/dist/components/vue.js.map +1 -0
  280. package/dist/components/webgl.cjs +459 -0
  281. package/dist/components/webgl.cjs.map +1 -0
  282. package/dist/components/webgl.css +3 -0
  283. package/dist/components/webgl.d.cts +133 -0
  284. package/dist/components/webgl.d.ts +133 -0
  285. package/dist/components/webgl.js +442 -0
  286. package/dist/components/webgl.js.map +1 -0
  287. package/dist/components/widgets.cjs +591 -0
  288. package/dist/components/widgets.cjs.map +1 -0
  289. package/dist/components/widgets.d.cts +110 -0
  290. package/dist/components/widgets.d.ts +110 -0
  291. package/dist/components/widgets.js +581 -0
  292. package/dist/components/widgets.js.map +1 -0
  293. package/dist/components.cjs +351 -0
  294. package/dist/components.cjs.map +1 -0
  295. package/dist/components.css +75 -0
  296. package/dist/components.d.cts +2997 -0
  297. package/dist/components.d.ts +2997 -0
  298. package/dist/components.js +106 -0
  299. package/dist/components.js.map +1 -0
  300. package/dist/components.umd.js +23 -0
  301. package/dist/components.umd.js.map +1 -0
  302. package/dist/element.cjs +97 -0
  303. package/dist/element.cjs.map +1 -0
  304. package/dist/element.d.cts +215 -0
  305. package/dist/element.d.ts +215 -0
  306. package/dist/element.js +95 -0
  307. package/dist/element.js.map +1 -0
  308. package/dist/element.umd.js +2 -0
  309. package/dist/element.umd.js.map +1 -0
  310. package/dist/index.cjs +149 -0
  311. package/dist/index.cjs.map +1 -0
  312. package/dist/index.d.cts +425 -0
  313. package/dist/index.d.ts +425 -0
  314. package/dist/index.js +131 -0
  315. package/dist/index.js.map +1 -0
  316. package/dist/index.umd.js +15 -0
  317. package/dist/index.umd.js.map +1 -0
  318. package/dist/presets/extended.cjs +243 -0
  319. package/dist/presets/extended.cjs.map +1 -0
  320. package/dist/presets/extended.d.cts +37 -0
  321. package/dist/presets/extended.d.ts +37 -0
  322. package/dist/presets/extended.js +239 -0
  323. package/dist/presets/extended.js.map +1 -0
  324. package/dist/presets-extended.umd.js +2 -0
  325. package/dist/presets-extended.umd.js.map +1 -0
  326. package/dist/react.cjs +68 -0
  327. package/dist/react.cjs.map +1 -0
  328. package/dist/react.d.cts +158 -0
  329. package/dist/react.d.ts +158 -0
  330. package/dist/react.js +65 -0
  331. package/dist/react.js.map +1 -0
  332. package/dist/solid.cjs +93 -0
  333. package/dist/solid.cjs.map +1 -0
  334. package/dist/solid.d.cts +249 -0
  335. package/dist/solid.d.ts +249 -0
  336. package/dist/solid.js +89 -0
  337. package/dist/solid.js.map +1 -0
  338. package/dist/svelte.cjs +66 -0
  339. package/dist/svelte.cjs.map +1 -0
  340. package/dist/svelte.d.cts +243 -0
  341. package/dist/svelte.d.ts +243 -0
  342. package/dist/svelte.js +63 -0
  343. package/dist/svelte.js.map +1 -0
  344. package/dist/vue.cjs +62 -0
  345. package/dist/vue.cjs.map +1 -0
  346. package/dist/vue.d.cts +158 -0
  347. package/dist/vue.d.ts +158 -0
  348. package/dist/vue.js +60 -0
  349. package/dist/vue.js.map +1 -0
  350. package/dist/widgets.umd.js +2 -0
  351. package/dist/widgets.umd.js.map +1 -0
  352. package/docs/API.md +147 -0
  353. package/docs/ROADMAP.md +14 -0
  354. package/docs/accessibility.md +60 -0
  355. package/docs/components.md +564 -0
  356. package/docs/deprecations.md +30 -0
  357. package/docs/frameworks-ssr.md +100 -0
  358. package/docs/hybrid-apps.md +145 -0
  359. package/docs/images/showcase-detail.png +0 -0
  360. package/docs/images/showcase-grid.png +0 -0
  361. package/docs/images/showcase-mobile.png +0 -0
  362. package/docs/migration-from-aos.md +67 -0
  363. package/docs/migration-from-gsap-scrolltrigger.md +80 -0
  364. package/docs/motion-tokens.css +31 -0
  365. package/docs/motion-tokens.md +46 -0
  366. package/docs/motion.tokens.json +132 -0
  367. package/docs/performance.md +24 -0
  368. package/docs/presets.md +310 -0
  369. package/docs/upgrading-3.md +21 -0
  370. package/docs/upgrading-4.md +65 -0
  371. package/docs/upgrading-5.md +31 -0
  372. package/docs/upgrading-6.md +32 -0
  373. package/docs/windows-apps.md +119 -0
  374. package/package.json +562 -4
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Members shared by every `<usa-*>` element. Attribute helpers, a cleanup
3
+ * bag that is emptied on disconnect, and motion helpers that degrade to the
4
+ * final state without WAAPI or under reduced motion.
5
+ */
6
+ interface UsaElement extends HTMLElement {
7
+ /** `true` while reduced motion applies to this element. */
8
+ readonly reduced: boolean;
9
+ }
10
+
11
+ /** Entrance effects shared by `<usa-reveal>` and `<usa-stagger>` (transform / opacity / filter only). */
12
+ declare const REVEAL_EFFECTS: readonly ["fade", "fade-up", "fade-down", "fade-left", "fade-right", "zoom-in", "zoom-out", "blur", "blur-up", "flip-up", "flip-left", "rise"];
13
+ type RevealEffect = (typeof REVEAL_EFFECTS)[number];
14
+ /** Keyframes from the effect to the natural state. */
15
+ declare function revealKeyframes(effect: string, distance?: number): Keyframe[];
16
+
17
+ /**
18
+ * `<usa-reveal>` — reveals its content when it scrolls into view.
19
+ *
20
+ * Attributes: `effect` (see {@link RevealEffect}, default `fade-up`),
21
+ * `duration` (ms, 700), `delay` (ms, 0), `distance` (px, 32), `easing`,
22
+ * `threshold` (0–1, 0.15), `root-margin`, `repeat` (hide again when it
23
+ * leaves, replay on re-entry). Events: `usa:enter`, `usa:leave`, `usa:complete`.
24
+ */
25
+ interface UsaRevealElement extends UsaElement {
26
+ effect: RevealEffect | string;
27
+ /** Play the entrance now (also called automatically on enter). */
28
+ reveal(): Promise<void>;
29
+ /** Hide again so the next `reveal()` replays the entrance. */
30
+ reset(): void;
31
+ readonly revealed: boolean;
32
+ }
33
+ declare function defineReveal(tag?: string): CustomElementConstructor | undefined;
34
+
35
+ /**
36
+ * `<usa-stagger>` — reveals its direct children one after another when the
37
+ * list scrolls into view.
38
+ *
39
+ * Attributes: `effect` (default `fade-up`), `interval` (ms between children,
40
+ * 70), `duration` (600), `delay` (0), `distance` (24), `easing`,
41
+ * `threshold` (0.1), `repeat`. Events: `usa:enter`, `usa:complete`.
42
+ */
43
+ interface UsaStaggerElement extends UsaElement {
44
+ reveal(): Promise<void>;
45
+ reset(): void;
46
+ }
47
+ declare function defineStagger(tag?: string): CustomElementConstructor | undefined;
48
+
49
+ /**
50
+ * `<usa-scroll-progress>` — a reading-progress bar.
51
+ *
52
+ * Attributes: `target` (CSS selector of an article to track; default the
53
+ * whole page), `position` (`top` | `bottom` | `inline`, default `top`),
54
+ * `label` (accessible name, default "Reading progress"). Style with
55
+ * `--usa-progress-color`, `--usa-progress-height`, `--usa-progress-track`.
56
+ * Exposes the progress (0–1) as `--usa-progress` on the element and as the
57
+ * `progress` property. Event: `usa:progress` (`detail.progress`).
58
+ *
59
+ * Writes only `transform: scaleX()` (compositor-friendly); reads layout
60
+ * once per animation frame, and only while scrolling.
61
+ */
62
+ interface UsaScrollProgressElement extends UsaElement {
63
+ readonly progress: number;
64
+ /** Re-measure (e.g. after content loaded). */
65
+ update(): void;
66
+ }
67
+ /** Progress (0–1) of `target` scrolling through the viewport, or of the page. */
68
+ declare function readScrollProgress(target?: Element | null): number;
69
+ declare function defineScrollProgress(tag?: string): CustomElementConstructor | undefined;
70
+
71
+ /**
72
+ * `<usa-scrolly>` — sticky scrollytelling. A child marked `data-sticky`
73
+ * stays pinned while the `[data-step]` children scroll past; the step that
74
+ * crosses the trigger line becomes active.
75
+ *
76
+ * Attributes: `offset` (trigger line as a fraction of the viewport height,
77
+ * default 0.5), `active` (reflected index of the active step). The active
78
+ * step gets `data-active`; the host gets `--usa-step` and `data-step-name`
79
+ * (the step's `data-step` value). Event: `usa:step` (`detail.index`,
80
+ * `detail.step`, `detail.name`).
81
+ */
82
+ interface UsaScrollyElement extends UsaElement {
83
+ readonly active: number;
84
+ readonly steps: HTMLElement[];
85
+ }
86
+ declare function defineScrolly(tag?: string): CustomElementConstructor | undefined;
87
+
88
+ /**
89
+ * motionary/components/reveal — entrance & scroll reveal components.
90
+ * `<usa-reveal>`, `<usa-stagger>`, `<usa-scroll-progress>`, `<usa-scrolly>`.
91
+ */
92
+
93
+ /** Register every component of this category under its default tag. */
94
+ declare function defineRevealComponents(): void;
95
+ declare global {
96
+ interface HTMLElementTagNameMap {
97
+ 'usa-reveal': UsaRevealElement;
98
+ 'usa-stagger': UsaStaggerElement;
99
+ 'usa-scroll-progress': UsaScrollProgressElement;
100
+ 'usa-scrolly': UsaScrollyElement;
101
+ }
102
+ }
103
+
104
+ export { REVEAL_EFFECTS, defineReveal, defineRevealComponents, defineScrollProgress, defineScrolly, defineStagger, readScrollProgress, revealKeyframes };
105
+ export type { RevealEffect, UsaRevealElement, UsaScrollProgressElement, UsaScrollyElement, UsaStaggerElement };
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Members shared by every `<usa-*>` element. Attribute helpers, a cleanup
3
+ * bag that is emptied on disconnect, and motion helpers that degrade to the
4
+ * final state without WAAPI or under reduced motion.
5
+ */
6
+ interface UsaElement extends HTMLElement {
7
+ /** `true` while reduced motion applies to this element. */
8
+ readonly reduced: boolean;
9
+ }
10
+
11
+ /** Entrance effects shared by `<usa-reveal>` and `<usa-stagger>` (transform / opacity / filter only). */
12
+ declare const REVEAL_EFFECTS: readonly ["fade", "fade-up", "fade-down", "fade-left", "fade-right", "zoom-in", "zoom-out", "blur", "blur-up", "flip-up", "flip-left", "rise"];
13
+ type RevealEffect = (typeof REVEAL_EFFECTS)[number];
14
+ /** Keyframes from the effect to the natural state. */
15
+ declare function revealKeyframes(effect: string, distance?: number): Keyframe[];
16
+
17
+ /**
18
+ * `<usa-reveal>` — reveals its content when it scrolls into view.
19
+ *
20
+ * Attributes: `effect` (see {@link RevealEffect}, default `fade-up`),
21
+ * `duration` (ms, 700), `delay` (ms, 0), `distance` (px, 32), `easing`,
22
+ * `threshold` (0–1, 0.15), `root-margin`, `repeat` (hide again when it
23
+ * leaves, replay on re-entry). Events: `usa:enter`, `usa:leave`, `usa:complete`.
24
+ */
25
+ interface UsaRevealElement extends UsaElement {
26
+ effect: RevealEffect | string;
27
+ /** Play the entrance now (also called automatically on enter). */
28
+ reveal(): Promise<void>;
29
+ /** Hide again so the next `reveal()` replays the entrance. */
30
+ reset(): void;
31
+ readonly revealed: boolean;
32
+ }
33
+ declare function defineReveal(tag?: string): CustomElementConstructor | undefined;
34
+
35
+ /**
36
+ * `<usa-stagger>` — reveals its direct children one after another when the
37
+ * list scrolls into view.
38
+ *
39
+ * Attributes: `effect` (default `fade-up`), `interval` (ms between children,
40
+ * 70), `duration` (600), `delay` (0), `distance` (24), `easing`,
41
+ * `threshold` (0.1), `repeat`. Events: `usa:enter`, `usa:complete`.
42
+ */
43
+ interface UsaStaggerElement extends UsaElement {
44
+ reveal(): Promise<void>;
45
+ reset(): void;
46
+ }
47
+ declare function defineStagger(tag?: string): CustomElementConstructor | undefined;
48
+
49
+ /**
50
+ * `<usa-scroll-progress>` — a reading-progress bar.
51
+ *
52
+ * Attributes: `target` (CSS selector of an article to track; default the
53
+ * whole page), `position` (`top` | `bottom` | `inline`, default `top`),
54
+ * `label` (accessible name, default "Reading progress"). Style with
55
+ * `--usa-progress-color`, `--usa-progress-height`, `--usa-progress-track`.
56
+ * Exposes the progress (0–1) as `--usa-progress` on the element and as the
57
+ * `progress` property. Event: `usa:progress` (`detail.progress`).
58
+ *
59
+ * Writes only `transform: scaleX()` (compositor-friendly); reads layout
60
+ * once per animation frame, and only while scrolling.
61
+ */
62
+ interface UsaScrollProgressElement extends UsaElement {
63
+ readonly progress: number;
64
+ /** Re-measure (e.g. after content loaded). */
65
+ update(): void;
66
+ }
67
+ /** Progress (0–1) of `target` scrolling through the viewport, or of the page. */
68
+ declare function readScrollProgress(target?: Element | null): number;
69
+ declare function defineScrollProgress(tag?: string): CustomElementConstructor | undefined;
70
+
71
+ /**
72
+ * `<usa-scrolly>` — sticky scrollytelling. A child marked `data-sticky`
73
+ * stays pinned while the `[data-step]` children scroll past; the step that
74
+ * crosses the trigger line becomes active.
75
+ *
76
+ * Attributes: `offset` (trigger line as a fraction of the viewport height,
77
+ * default 0.5), `active` (reflected index of the active step). The active
78
+ * step gets `data-active`; the host gets `--usa-step` and `data-step-name`
79
+ * (the step's `data-step` value). Event: `usa:step` (`detail.index`,
80
+ * `detail.step`, `detail.name`).
81
+ */
82
+ interface UsaScrollyElement extends UsaElement {
83
+ readonly active: number;
84
+ readonly steps: HTMLElement[];
85
+ }
86
+ declare function defineScrolly(tag?: string): CustomElementConstructor | undefined;
87
+
88
+ /**
89
+ * motionary/components/reveal — entrance & scroll reveal components.
90
+ * `<usa-reveal>`, `<usa-stagger>`, `<usa-scroll-progress>`, `<usa-scrolly>`.
91
+ */
92
+
93
+ /** Register every component of this category under its default tag. */
94
+ declare function defineRevealComponents(): void;
95
+ declare global {
96
+ interface HTMLElementTagNameMap {
97
+ 'usa-reveal': UsaRevealElement;
98
+ 'usa-stagger': UsaStaggerElement;
99
+ 'usa-scroll-progress': UsaScrollProgressElement;
100
+ 'usa-scrolly': UsaScrollyElement;
101
+ }
102
+ }
103
+
104
+ export { REVEAL_EFFECTS, defineReveal, defineRevealComponents, defineScrollProgress, defineScrolly, defineStagger, readScrollProgress, revealKeyframes };
105
+ export type { RevealEffect, UsaRevealElement, UsaScrollProgressElement, UsaScrollyElement, UsaStaggerElement };
@@ -0,0 +1,353 @@
1
+ import { x as defineElement, y as EASE_OUT, l as caf, r as raf, k as clamp } from '../chunks/base-C_3cAoRz.js';
2
+
3
+ /** Entrance effects shared by `<usa-reveal>` and `<usa-stagger>` (transform / opacity / filter only). */
4
+ const REVEAL_EFFECTS = [
5
+ 'fade',
6
+ 'fade-up',
7
+ 'fade-down',
8
+ 'fade-left',
9
+ 'fade-right',
10
+ 'zoom-in',
11
+ 'zoom-out',
12
+ 'blur',
13
+ 'blur-up',
14
+ 'flip-up',
15
+ 'flip-left',
16
+ 'rise',
17
+ ];
18
+ /** The "from" keyframe of an effect; the "to" keyframe is the element's natural state. */
19
+ function revealFrom(effect, distance = 32) {
20
+ const d = `${distance}px`;
21
+ switch (effect) {
22
+ case 'fade':
23
+ return { opacity: 0 };
24
+ case 'fade-down':
25
+ return { opacity: 0, transform: `translate3d(0,-${d},0)` };
26
+ case 'fade-left':
27
+ return { opacity: 0, transform: `translate3d(-${d},0,0)` };
28
+ case 'fade-right':
29
+ return { opacity: 0, transform: `translate3d(${d},0,0)` };
30
+ case 'zoom-in':
31
+ return { opacity: 0, transform: 'scale(0.86)' };
32
+ case 'zoom-out':
33
+ return { opacity: 0, transform: 'scale(1.14)' };
34
+ case 'blur':
35
+ return { opacity: 0, filter: 'blur(12px)' };
36
+ case 'blur-up':
37
+ return { opacity: 0, filter: 'blur(10px)', transform: `translate3d(0,${d},0)` };
38
+ case 'flip-up':
39
+ return { opacity: 0, transform: 'perspective(800px) rotateX(-55deg)', transformOrigin: '50% 100%' };
40
+ case 'flip-left':
41
+ return { opacity: 0, transform: 'perspective(800px) rotateY(55deg)', transformOrigin: '0% 50%' };
42
+ case 'rise':
43
+ return { opacity: 0, transform: `translate3d(0,${distance * 1.5}px,0) scale(0.96)` };
44
+ case 'fade-up':
45
+ default:
46
+ return { opacity: 0, transform: `translate3d(0,${d},0)` };
47
+ }
48
+ }
49
+ /** Keyframes from the effect to the natural state. */
50
+ function revealKeyframes(effect, distance) {
51
+ // Any preset registered with the scroll library (core, `presets/extended`, your own)
52
+ const p = REVEAL_EFFECTS.includes(effect) ? null : globalThis[Symbol.for('use-scroll-animate.presets')]?.[effect];
53
+ if (p)
54
+ return [p.from, ...(p.frames || []), p.to];
55
+ const from = revealFrom(effect, distance);
56
+ const to = {};
57
+ for (const k of Object.keys(from)) {
58
+ if (k === 'opacity')
59
+ to.opacity = 1;
60
+ else if (k === 'transform')
61
+ to.transform = 'none';
62
+ else if (k === 'filter')
63
+ to.filter = 'none';
64
+ else if (k === 'transformOrigin')
65
+ to.transformOrigin = from.transformOrigin;
66
+ }
67
+ return [from, to];
68
+ }
69
+
70
+ var css$2 = "usa-reveal,usa-stagger{display:block}usa-reveal[data-state=\"hidden\"],usa-stagger[data-state=\"hidden\"]>*{opacity:0}@media (prefers-reduced-motion:reduce){usa-reveal[data-state=\"hidden\"],usa-stagger[data-state=\"hidden\"]>*{opacity:1}}";
71
+
72
+ function defineReveal(tag = 'usa-reveal') {
73
+ return defineElement(tag, (Base) => class UsaReveal extends Base {
74
+ constructor() {
75
+ super(...arguments);
76
+ this._anim = null;
77
+ }
78
+ static get observedAttributes() {
79
+ return ['effect', 'distance', 'repeat', 'threshold', 'root-margin'];
80
+ }
81
+ get effect() {
82
+ return this.str('effect', 'fade-up');
83
+ }
84
+ set effect(v) {
85
+ this.setAttribute('effect', v);
86
+ }
87
+ get revealed() {
88
+ return this.getAttribute('data-state') !== 'hidden';
89
+ }
90
+ mount() {
91
+ if (this.reduced) {
92
+ this.setAttribute('data-state', 'shown');
93
+ return;
94
+ }
95
+ if (this.getAttribute('data-state') !== 'shown')
96
+ this.setAttribute('data-state', 'hidden');
97
+ this.inView((visible) => {
98
+ if (visible) {
99
+ this.emit('enter');
100
+ if (!this.revealed)
101
+ this.reveal();
102
+ }
103
+ else {
104
+ this.emit('leave');
105
+ if (this.flag('repeat') && this.revealed)
106
+ this.reset();
107
+ }
108
+ }, { threshold: this.num('threshold', 0.15), rootMargin: this.str('root-margin', '0px') });
109
+ }
110
+ unmount() {
111
+ this._anim?.cancel();
112
+ this._anim = null;
113
+ }
114
+ reveal() {
115
+ this._anim?.cancel();
116
+ this.setAttribute('data-state', 'shown');
117
+ if (this.reduced)
118
+ return Promise.resolve();
119
+ const a = this.motion(this, revealKeyframes(this.effect, this.num('distance', 32)), {
120
+ duration: this.num('duration', 700),
121
+ delay: this.num('delay', 0),
122
+ easing: this.str('easing', EASE_OUT),
123
+ fill: 'backwards',
124
+ });
125
+ this._anim = a;
126
+ return new Promise((resolve) => {
127
+ const done = () => {
128
+ if (this._anim === a)
129
+ this._anim = null;
130
+ this.emit('complete');
131
+ resolve();
132
+ };
133
+ if (!a)
134
+ done();
135
+ else
136
+ a.onfinish = done;
137
+ });
138
+ }
139
+ reset() {
140
+ this._anim?.cancel();
141
+ this._anim = null;
142
+ if (!this.reduced)
143
+ this.setAttribute('data-state', 'hidden');
144
+ }
145
+ }, { id: 'reveal', text: css$2 });
146
+ }
147
+
148
+ function defineStagger(tag = 'usa-stagger') {
149
+ return defineElement(tag, (Base) => class UsaStagger extends Base {
150
+ constructor() {
151
+ super(...arguments);
152
+ this._anims = [];
153
+ }
154
+ static get observedAttributes() {
155
+ return ['effect', 'repeat', 'threshold'];
156
+ }
157
+ mount() {
158
+ if (this.reduced) {
159
+ this.setAttribute('data-state', 'shown');
160
+ return;
161
+ }
162
+ if (this.getAttribute('data-state') !== 'shown')
163
+ this.setAttribute('data-state', 'hidden');
164
+ this.inView((visible) => {
165
+ if (visible && this.getAttribute('data-state') === 'hidden') {
166
+ this.emit('enter');
167
+ this.reveal();
168
+ }
169
+ else if (!visible && this.flag('repeat'))
170
+ this.reset();
171
+ }, { threshold: this.num('threshold', 0.1) });
172
+ }
173
+ unmount() {
174
+ this.cancel();
175
+ }
176
+ cancel() {
177
+ this._anims.splice(0).forEach((a) => a.cancel());
178
+ }
179
+ reveal() {
180
+ this.cancel();
181
+ this.setAttribute('data-state', 'shown');
182
+ const kids = Array.from(this.children);
183
+ if (this.reduced || !kids.length)
184
+ return Promise.resolve();
185
+ const frames = revealKeyframes(this.str('effect', 'fade-up'), this.num('distance', 24));
186
+ const interval = this.num('interval', 70);
187
+ const base = this.num('delay', 0);
188
+ const duration = this.num('duration', 600);
189
+ const easing = this.str('easing', EASE_OUT);
190
+ const anims = kids
191
+ .map((kid, i) => this.motion(kid, frames, { duration, easing, delay: base + i * interval, fill: 'backwards' }))
192
+ .filter((a) => !!a);
193
+ this._anims = anims;
194
+ const last = anims[anims.length - 1];
195
+ return new Promise((resolve) => {
196
+ const done = () => {
197
+ this.emit('complete');
198
+ resolve();
199
+ };
200
+ if (!last)
201
+ done();
202
+ else
203
+ last.onfinish = done;
204
+ });
205
+ }
206
+ reset() {
207
+ this.cancel();
208
+ if (!this.reduced)
209
+ this.setAttribute('data-state', 'hidden');
210
+ }
211
+ }, { id: 'reveal', text: css$2 });
212
+ }
213
+
214
+ var css$1 = "usa-scroll-progress{display:block;position:fixed;left:0;right:0;top:0;z-index:1000;height:var(--usa-progress-height,3px);background:var(--usa-progress-track,transparent);pointer-events:none;contain:strict}usa-scroll-progress[position=\"bottom\"]{top:auto;bottom:0}usa-scroll-progress[position=\"inline\"]{position:relative;z-index:auto;border-radius:999px;overflow:hidden}usa-scroll-progress .usa-progress-fill{display:block;height:100%;transform:scaleX(0);transform-origin:0 50%;background:var(--usa-progress-color,linear-gradient(90deg,#7c5cff,#22d3ee));will-change:transform}";
215
+
216
+ /** Progress (0–1) of `target` scrolling through the viewport, or of the page. */
217
+ function readScrollProgress(target) {
218
+ if (typeof window === 'undefined')
219
+ return 0;
220
+ const vh = window.innerHeight || document.documentElement.clientHeight;
221
+ if (target) {
222
+ const r = target.getBoundingClientRect();
223
+ const total = r.height - vh;
224
+ return total <= 0 ? (r.top <= 0 ? 1 : 0) : clamp(-r.top / total, 0, 1);
225
+ }
226
+ const doc = document.documentElement;
227
+ const max = doc.scrollHeight - vh;
228
+ return max <= 0 ? 0 : clamp((window.scrollY || doc.scrollTop) / max, 0, 1);
229
+ }
230
+ function defineScrollProgress(tag = 'usa-scroll-progress') {
231
+ return defineElement(tag, (Base) => class UsaScrollProgress extends Base {
232
+ constructor() {
233
+ super(...arguments);
234
+ this._bar = null;
235
+ this._p = -1;
236
+ this._frame = 0;
237
+ }
238
+ static get observedAttributes() {
239
+ return ['target', 'label'];
240
+ }
241
+ get progress() {
242
+ return Math.max(0, this._p);
243
+ }
244
+ mount() {
245
+ if (!this._bar) {
246
+ this._bar = document.createElement('span');
247
+ this._bar.className = 'usa-progress-fill';
248
+ this.replaceChildren(this._bar);
249
+ }
250
+ this.setAttribute('role', 'progressbar');
251
+ this.setAttribute('aria-valuemin', '0');
252
+ this.setAttribute('aria-valuemax', '100');
253
+ if (!this.hasAttribute('aria-label'))
254
+ this.setAttribute('aria-label', this.str('label', 'Reading progress'));
255
+ const schedule = () => {
256
+ if (!this._frame)
257
+ this._frame = raf(() => ((this._frame = 0), this.update()));
258
+ };
259
+ this.listen(window, 'scroll', schedule, { passive: true });
260
+ this.listen(window, 'resize', schedule, { passive: true });
261
+ this.update();
262
+ }
263
+ unmount() {
264
+ caf(this._frame);
265
+ this._frame = 0;
266
+ }
267
+ update() {
268
+ const sel = this.getAttribute('target');
269
+ const target = sel ? document.querySelector(sel) : null;
270
+ const p = readScrollProgress(target);
271
+ if (Math.abs(p - this._p) < 0.0005)
272
+ return;
273
+ this._p = p;
274
+ if (this._bar)
275
+ this._bar.style.transform = `scaleX(${p})`;
276
+ this.style.setProperty('--usa-progress', String(p));
277
+ const pct = String(Math.round(p * 100));
278
+ if (this.getAttribute('aria-valuenow') !== pct)
279
+ this.setAttribute('aria-valuenow', pct);
280
+ this.emit('progress', { progress: p });
281
+ }
282
+ }, { id: 'scroll-progress', text: css$1 });
283
+ }
284
+
285
+ var css = "usa-scrolly{display:block;position:relative}usa-scrolly [data-sticky]{position:sticky;top:var(--usa-sticky-top,0px)}usa-scrolly [data-step]{opacity:var(--usa-step-dim,0.35);transition:opacity 0.4s ease}usa-scrolly [data-step][data-active]{opacity:1}@media (prefers-reduced-motion:reduce){usa-scrolly [data-step]{transition:none}}";
286
+
287
+ function defineScrolly(tag = 'usa-scrolly') {
288
+ return defineElement(tag, (Base) => class UsaScrolly extends Base {
289
+ constructor() {
290
+ super(...arguments);
291
+ this._active = -1;
292
+ }
293
+ static get observedAttributes() {
294
+ return ['offset'];
295
+ }
296
+ get active() {
297
+ return this._active;
298
+ }
299
+ get steps() {
300
+ return Array.from(this.querySelectorAll('[data-step]'));
301
+ }
302
+ mount() {
303
+ const steps = this.steps;
304
+ if (!steps.length)
305
+ return;
306
+ const offset = clamp(this.num('offset', 0.5), 0, 1);
307
+ // A thin trigger band `offset` down the viewport
308
+ const top = Math.min(99, Math.round(offset * 100));
309
+ const rootMargin = `-${top}% 0px -${Math.max(0, 99 - top)}% 0px`;
310
+ if (typeof IntersectionObserver === 'undefined') {
311
+ this.activate(0);
312
+ return;
313
+ }
314
+ const io = new IntersectionObserver((entries) => {
315
+ for (const e of entries)
316
+ if (e.isIntersecting)
317
+ this.activate(steps.indexOf(e.target));
318
+ }, { rootMargin });
319
+ steps.forEach((s) => io.observe(s));
320
+ this.onCleanup(() => io.disconnect());
321
+ if (this._active < 0)
322
+ this.activate(0, true);
323
+ }
324
+ activate(index, silent = false) {
325
+ const steps = this.steps;
326
+ if (index < 0 || index >= steps.length || index === this._active)
327
+ return;
328
+ this._active = index;
329
+ steps.forEach((s, i) => s.toggleAttribute('data-active', i === index));
330
+ const step = steps[index];
331
+ this.setAttribute('active', String(index));
332
+ this.style.setProperty('--usa-step', String(index));
333
+ this.setAttribute('data-step-name', step.dataset.step || String(index));
334
+ if (!silent)
335
+ this.emit('step', { index, step, name: step.dataset.step || '' });
336
+ }
337
+ }, { id: 'scrolly', text: css });
338
+ }
339
+
340
+ /**
341
+ * motionary/components/reveal — entrance & scroll reveal components.
342
+ * `<usa-reveal>`, `<usa-stagger>`, `<usa-scroll-progress>`, `<usa-scrolly>`.
343
+ */
344
+ /** Register every component of this category under its default tag. */
345
+ function defineRevealComponents() {
346
+ defineReveal();
347
+ defineStagger();
348
+ defineScrollProgress();
349
+ defineScrolly();
350
+ }
351
+
352
+ export { REVEAL_EFFECTS, defineReveal, defineRevealComponents, defineScrollProgress, defineScrolly, defineStagger, readScrollProgress, revealKeyframes };
353
+ //# sourceMappingURL=reveal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reveal.js","sources":["../../src/components/reveal/effects.ts","../../src/components/reveal/reveal.ts","../../src/components/reveal/stagger.ts","../../src/components/reveal/scroll-progress.ts","../../src/components/reveal/scrolly.ts","../../src/components/reveal/index.ts"],"sourcesContent":["/** Entrance effects shared by `<usa-reveal>` and `<usa-stagger>` (transform / opacity / filter only). */\n\nexport const REVEAL_EFFECTS = [\n 'fade',\n 'fade-up',\n 'fade-down',\n 'fade-left',\n 'fade-right',\n 'zoom-in',\n 'zoom-out',\n 'blur',\n 'blur-up',\n 'flip-up',\n 'flip-left',\n 'rise',\n] as const;\n\nexport type RevealEffect = (typeof REVEAL_EFFECTS)[number];\n\n/** The \"from\" keyframe of an effect; the \"to\" keyframe is the element's natural state. */\nexport function revealFrom(effect: string, distance = 32): Keyframe {\n const d = `${distance}px`;\n switch (effect) {\n case 'fade':\n return { opacity: 0 };\n case 'fade-down':\n return { opacity: 0, transform: `translate3d(0,-${d},0)` };\n case 'fade-left':\n return { opacity: 0, transform: `translate3d(-${d},0,0)` };\n case 'fade-right':\n return { opacity: 0, transform: `translate3d(${d},0,0)` };\n case 'zoom-in':\n return { opacity: 0, transform: 'scale(0.86)' };\n case 'zoom-out':\n return { opacity: 0, transform: 'scale(1.14)' };\n case 'blur':\n return { opacity: 0, filter: 'blur(12px)' };\n case 'blur-up':\n return { opacity: 0, filter: 'blur(10px)', transform: `translate3d(0,${d},0)` };\n case 'flip-up':\n return { opacity: 0, transform: 'perspective(800px) rotateX(-55deg)', transformOrigin: '50% 100%' };\n case 'flip-left':\n return { opacity: 0, transform: 'perspective(800px) rotateY(55deg)', transformOrigin: '0% 50%' };\n case 'rise':\n return { opacity: 0, transform: `translate3d(0,${distance * 1.5}px,0) scale(0.96)` };\n case 'fade-up':\n default:\n return { opacity: 0, transform: `translate3d(0,${d},0)` };\n }\n}\n\n/** Keyframes from the effect to the natural state. */\nexport function revealKeyframes(effect: string, distance?: number): Keyframe[] {\n // Any preset registered with the scroll library (core, `presets/extended`, your own)\n const p = (REVEAL_EFFECTS as readonly string[]).includes(effect) ? null : (globalThis as any)[Symbol.for('use-scroll-animate.presets')]?.[effect];\n if (p) return [p.from, ...(p.frames || []), p.to];\n const from = revealFrom(effect, distance);\n const to: Keyframe = {};\n for (const k of Object.keys(from)) {\n if (k === 'opacity') to.opacity = 1;\n else if (k === 'transform') to.transform = 'none';\n else if (k === 'filter') to.filter = 'none';\n else if (k === 'transformOrigin') to.transformOrigin = from.transformOrigin;\n }\n return [from, to];\n}\n","import { defineElement, EASE_OUT, type UsaElement } from '../base';\nimport { revealKeyframes, type RevealEffect } from './effects';\nimport css from './reveal.css?raw';\n\n/**\n * `<usa-reveal>` — reveals its content when it scrolls into view.\n *\n * Attributes: `effect` (see {@link RevealEffect}, default `fade-up`),\n * `duration` (ms, 700), `delay` (ms, 0), `distance` (px, 32), `easing`,\n * `threshold` (0–1, 0.15), `root-margin`, `repeat` (hide again when it\n * leaves, replay on re-entry). Events: `usa:enter`, `usa:leave`, `usa:complete`.\n */\nexport interface UsaRevealElement extends UsaElement {\n effect: RevealEffect | string;\n /** Play the entrance now (also called automatically on enter). */\n reveal(): Promise<void>;\n /** Hide again so the next `reveal()` replays the entrance. */\n reset(): void;\n readonly revealed: boolean;\n}\n\nexport function defineReveal(tag = 'usa-reveal'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaReveal extends Base {\n static get observedAttributes(): string[] {\n return ['effect', 'distance', 'repeat', 'threshold', 'root-margin'];\n }\n\n private _anim: Animation | null = null;\n\n get effect(): string {\n return this.str('effect', 'fade-up');\n }\n set effect(v: string) {\n this.setAttribute('effect', v);\n }\n get revealed(): boolean {\n return this.getAttribute('data-state') !== 'hidden';\n }\n\n mount(): void {\n if (this.reduced) {\n this.setAttribute('data-state', 'shown');\n return;\n }\n if (this.getAttribute('data-state') !== 'shown') this.setAttribute('data-state', 'hidden');\n this.inView(\n (visible) => {\n if (visible) {\n this.emit('enter');\n if (!this.revealed) this.reveal();\n } else {\n this.emit('leave');\n if (this.flag('repeat') && this.revealed) this.reset();\n }\n },\n { threshold: this.num('threshold', 0.15), rootMargin: this.str('root-margin', '0px') }\n );\n }\n\n unmount(): void {\n this._anim?.cancel();\n this._anim = null;\n }\n\n reveal(): Promise<void> {\n this._anim?.cancel();\n this.setAttribute('data-state', 'shown');\n if (this.reduced) return Promise.resolve();\n const a = this.motion(this, revealKeyframes(this.effect, this.num('distance', 32)), {\n duration: this.num('duration', 700),\n delay: this.num('delay', 0),\n easing: this.str('easing', EASE_OUT),\n fill: 'backwards',\n });\n this._anim = a;\n return new Promise((resolve) => {\n const done = () => {\n if (this._anim === a) this._anim = null;\n this.emit('complete');\n resolve();\n };\n if (!a) done();\n else a.onfinish = done;\n });\n }\n\n reset(): void {\n this._anim?.cancel();\n this._anim = null;\n if (!this.reduced) this.setAttribute('data-state', 'hidden');\n }\n },\n { id: 'reveal', text: css }\n );\n}\n","import { defineElement, EASE_OUT, type UsaElement } from '../base';\nimport { revealKeyframes } from './effects';\nimport css from './reveal.css?raw';\n\n/**\n * `<usa-stagger>` — reveals its direct children one after another when the\n * list scrolls into view.\n *\n * Attributes: `effect` (default `fade-up`), `interval` (ms between children,\n * 70), `duration` (600), `delay` (0), `distance` (24), `easing`,\n * `threshold` (0.1), `repeat`. Events: `usa:enter`, `usa:complete`.\n */\nexport interface UsaStaggerElement extends UsaElement {\n reveal(): Promise<void>;\n reset(): void;\n}\n\nexport function defineStagger(tag = 'usa-stagger'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaStagger extends Base {\n static get observedAttributes(): string[] {\n return ['effect', 'repeat', 'threshold'];\n }\n\n private _anims: Animation[] = [];\n\n mount(): void {\n if (this.reduced) {\n this.setAttribute('data-state', 'shown');\n return;\n }\n if (this.getAttribute('data-state') !== 'shown') this.setAttribute('data-state', 'hidden');\n this.inView(\n (visible) => {\n if (visible && this.getAttribute('data-state') === 'hidden') {\n this.emit('enter');\n this.reveal();\n } else if (!visible && this.flag('repeat')) this.reset();\n },\n { threshold: this.num('threshold', 0.1) }\n );\n }\n\n unmount(): void {\n this.cancel();\n }\n\n private cancel(): void {\n this._anims.splice(0).forEach((a) => a.cancel());\n }\n\n reveal(): Promise<void> {\n this.cancel();\n this.setAttribute('data-state', 'shown');\n const kids = Array.from(this.children) as HTMLElement[];\n if (this.reduced || !kids.length) return Promise.resolve();\n const frames = revealKeyframes(this.str('effect', 'fade-up'), this.num('distance', 24));\n const interval = this.num('interval', 70);\n const base = this.num('delay', 0);\n const duration = this.num('duration', 600);\n const easing = this.str('easing', EASE_OUT);\n const anims = kids\n .map((kid, i) => this.motion(kid, frames, { duration, easing, delay: base + i * interval, fill: 'backwards' }))\n .filter((a): a is Animation => !!a);\n this._anims = anims;\n const last = anims[anims.length - 1];\n return new Promise((resolve) => {\n const done = () => {\n this.emit('complete');\n resolve();\n };\n if (!last) done();\n else last.onfinish = done;\n });\n }\n\n reset(): void {\n this.cancel();\n if (!this.reduced) this.setAttribute('data-state', 'hidden');\n }\n },\n { id: 'reveal', text: css }\n );\n}\n","import { defineElement, raf, caf, clamp, type UsaElement } from '../base';\nimport css from './scroll-progress.css?raw';\n\n/**\n * `<usa-scroll-progress>` — a reading-progress bar.\n *\n * Attributes: `target` (CSS selector of an article to track; default the\n * whole page), `position` (`top` | `bottom` | `inline`, default `top`),\n * `label` (accessible name, default \"Reading progress\"). Style with\n * `--usa-progress-color`, `--usa-progress-height`, `--usa-progress-track`.\n * Exposes the progress (0–1) as `--usa-progress` on the element and as the\n * `progress` property. Event: `usa:progress` (`detail.progress`).\n *\n * Writes only `transform: scaleX()` (compositor-friendly); reads layout\n * once per animation frame, and only while scrolling.\n */\nexport interface UsaScrollProgressElement extends UsaElement {\n readonly progress: number;\n /** Re-measure (e.g. after content loaded). */\n update(): void;\n}\n\n/** Progress (0–1) of `target` scrolling through the viewport, or of the page. */\nexport function readScrollProgress(target?: Element | null): number {\n if (typeof window === 'undefined') return 0;\n const vh = window.innerHeight || document.documentElement.clientHeight;\n if (target) {\n const r = target.getBoundingClientRect();\n const total = r.height - vh;\n return total <= 0 ? (r.top <= 0 ? 1 : 0) : clamp(-r.top / total, 0, 1);\n }\n const doc = document.documentElement;\n const max = doc.scrollHeight - vh;\n return max <= 0 ? 0 : clamp((window.scrollY || doc.scrollTop) / max, 0, 1);\n}\n\nexport function defineScrollProgress(tag = 'usa-scroll-progress'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaScrollProgress extends Base {\n static get observedAttributes(): string[] {\n return ['target', 'label'];\n }\n\n private _bar: HTMLElement | null = null;\n private _p = -1;\n private _frame = 0;\n\n get progress(): number {\n return Math.max(0, this._p);\n }\n\n mount(): void {\n if (!this._bar) {\n this._bar = document.createElement('span');\n this._bar.className = 'usa-progress-fill';\n this.replaceChildren(this._bar);\n }\n this.setAttribute('role', 'progressbar');\n this.setAttribute('aria-valuemin', '0');\n this.setAttribute('aria-valuemax', '100');\n if (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', this.str('label', 'Reading progress'));\n const schedule = () => {\n if (!this._frame) this._frame = raf(() => ((this._frame = 0), this.update()));\n };\n this.listen(window, 'scroll', schedule, { passive: true });\n this.listen(window, 'resize', schedule, { passive: true });\n this.update();\n }\n\n unmount(): void {\n caf(this._frame);\n this._frame = 0;\n }\n\n update(): void {\n const sel = this.getAttribute('target');\n const target = sel ? document.querySelector(sel) : null;\n const p = readScrollProgress(target);\n if (Math.abs(p - this._p) < 0.0005) return;\n this._p = p;\n if (this._bar) this._bar.style.transform = `scaleX(${p})`;\n this.style.setProperty('--usa-progress', String(p));\n const pct = String(Math.round(p * 100));\n if (this.getAttribute('aria-valuenow') !== pct) this.setAttribute('aria-valuenow', pct);\n this.emit('progress', { progress: p });\n }\n },\n { id: 'scroll-progress', text: css }\n );\n}\n","import { defineElement, clamp, type UsaElement } from '../base';\nimport css from './scrolly.css?raw';\n\n/**\n * `<usa-scrolly>` — sticky scrollytelling. A child marked `data-sticky`\n * stays pinned while the `[data-step]` children scroll past; the step that\n * crosses the trigger line becomes active.\n *\n * Attributes: `offset` (trigger line as a fraction of the viewport height,\n * default 0.5), `active` (reflected index of the active step). The active\n * step gets `data-active`; the host gets `--usa-step` and `data-step-name`\n * (the step's `data-step` value). Event: `usa:step` (`detail.index`,\n * `detail.step`, `detail.name`).\n */\nexport interface UsaScrollyElement extends UsaElement {\n readonly active: number;\n readonly steps: HTMLElement[];\n}\n\nexport function defineScrolly(tag = 'usa-scrolly'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaScrolly extends Base {\n static get observedAttributes(): string[] {\n return ['offset'];\n }\n\n private _active = -1;\n\n get active(): number {\n return this._active;\n }\n get steps(): HTMLElement[] {\n return Array.from(this.querySelectorAll<HTMLElement>('[data-step]'));\n }\n\n mount(): void {\n const steps = this.steps;\n if (!steps.length) return;\n const offset = clamp(this.num('offset', 0.5), 0, 1);\n // A thin trigger band `offset` down the viewport\n const top = Math.min(99, Math.round(offset * 100));\n const rootMargin = `-${top}% 0px -${Math.max(0, 99 - top)}% 0px`;\n if (typeof IntersectionObserver === 'undefined') {\n this.activate(0);\n return;\n }\n const io = new IntersectionObserver(\n (entries) => {\n for (const e of entries) if (e.isIntersecting) this.activate(steps.indexOf(e.target as HTMLElement));\n },\n { rootMargin }\n );\n steps.forEach((s) => io.observe(s));\n this.onCleanup(() => io.disconnect());\n if (this._active < 0) this.activate(0, true);\n }\n\n activate(index: number, silent = false): void {\n const steps = this.steps;\n if (index < 0 || index >= steps.length || index === this._active) return;\n this._active = index;\n steps.forEach((s, i) => s.toggleAttribute('data-active', i === index));\n const step = steps[index];\n this.setAttribute('active', String(index));\n this.style.setProperty('--usa-step', String(index));\n this.setAttribute('data-step-name', step.dataset.step || String(index));\n if (!silent) this.emit('step', { index, step, name: step.dataset.step || '' });\n }\n },\n { id: 'scrolly', text: css }\n );\n}\n","/**\n * motionary/components/reveal — entrance & scroll reveal components.\n * `<usa-reveal>`, `<usa-stagger>`, `<usa-scroll-progress>`, `<usa-scrolly>`.\n */\nimport { defineReveal, type UsaRevealElement } from './reveal';\nimport { defineStagger, type UsaStaggerElement } from './stagger';\nimport { defineScrollProgress, type UsaScrollProgressElement } from './scroll-progress';\nimport { defineScrolly, type UsaScrollyElement } from './scrolly';\n\nexport { defineReveal, defineStagger, defineScrollProgress, defineScrolly };\nexport { readScrollProgress } from './scroll-progress';\nexport { REVEAL_EFFECTS, revealKeyframes } from './effects';\nexport type { RevealEffect } from './effects';\nexport type { UsaRevealElement, UsaStaggerElement, UsaScrollProgressElement, UsaScrollyElement };\n\n/** Register every component of this category under its default tag. */\nexport function defineRevealComponents(): void {\n defineReveal();\n defineStagger();\n defineScrollProgress();\n defineScrolly();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-reveal': UsaRevealElement;\n 'usa-stagger': UsaStaggerElement;\n 'usa-scroll-progress': UsaScrollProgressElement;\n 'usa-scrolly': UsaScrolly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