motionary 10.0.0 → 10.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 (287) hide show
  1. package/AGENTS.md +61 -0
  2. package/CHANGELOG.md +36 -0
  3. package/README.md +82 -0
  4. package/bin/create-motionary-plugin.mjs +124 -0
  5. package/dist/chunks/keyframes-W-474DMc.js +183 -0
  6. package/dist/chunks/keyframes-W-474DMc.js.map +1 -0
  7. package/dist/chunks/keyframes-ZheOkpt0.cjs +187 -0
  8. package/dist/chunks/keyframes-ZheOkpt0.cjs.map +1 -0
  9. package/dist/chunks/registry-BIEjKngP.js +69 -0
  10. package/dist/chunks/registry-BIEjKngP.js.map +1 -0
  11. package/dist/chunks/registry-eJgpFAzI.cjs +81 -0
  12. package/dist/chunks/registry-eJgpFAzI.cjs.map +1 -0
  13. package/dist/chunks/ticker-CM_56oVy.js +70 -0
  14. package/dist/chunks/ticker-CM_56oVy.js.map +1 -0
  15. package/dist/chunks/ticker-D4o6enH0.cjs +72 -0
  16. package/dist/chunks/ticker-D4o6enH0.cjs.map +1 -0
  17. package/dist/chunks/tween-CBuWYpI-.cjs +487 -0
  18. package/dist/chunks/tween-CBuWYpI-.cjs.map +1 -0
  19. package/dist/chunks/tween-CqX1JBuj.js +476 -0
  20. package/dist/chunks/tween-CqX1JBuj.js.map +1 -0
  21. package/dist/components/core.cjs +106 -0
  22. package/dist/components/core.cjs.map +1 -1
  23. package/dist/components/core.d.cts +44 -2
  24. package/dist/components/core.d.ts +44 -2
  25. package/dist/components/core.js +105 -1
  26. package/dist/components/core.js.map +1 -1
  27. package/dist/components/marketplace.cjs +104 -0
  28. package/dist/components/marketplace.cjs.map +1 -1
  29. package/dist/components/marketplace.d.cts +33 -2
  30. package/dist/components/marketplace.d.ts +33 -2
  31. package/dist/components/marketplace.js +101 -1
  32. package/dist/components/marketplace.js.map +1 -1
  33. package/dist/components/widgets.cjs +623 -199
  34. package/dist/components/widgets.cjs.map +1 -1
  35. package/dist/components/widgets.d.cts +186 -2
  36. package/dist/components/widgets.d.ts +186 -2
  37. package/dist/components/widgets.js +620 -201
  38. package/dist/components/widgets.js.map +1 -1
  39. package/dist/llms-full.txt +3115 -0
  40. package/dist/llms.txt +211 -0
  41. package/dist/manifest.json +7820 -0
  42. package/dist/manifest.schema.json +85 -0
  43. package/dist/runtime/format-css.cjs +185 -0
  44. package/dist/runtime/format-css.cjs.map +1 -0
  45. package/dist/runtime/format-css.d.cts +174 -0
  46. package/dist/runtime/format-css.d.ts +174 -0
  47. package/dist/runtime/format-css.iife.js +2 -0
  48. package/dist/runtime/format-css.iife.js.map +1 -0
  49. package/dist/runtime/format-css.js +177 -0
  50. package/dist/runtime/format-css.js.map +1 -0
  51. package/dist/runtime/format-motion.cjs +139 -0
  52. package/dist/runtime/format-motion.cjs.map +1 -0
  53. package/dist/runtime/format-motion.d.cts +208 -0
  54. package/dist/runtime/format-motion.d.ts +208 -0
  55. package/dist/runtime/format-motion.iife.js +2 -0
  56. package/dist/runtime/format-motion.iife.js.map +1 -0
  57. package/dist/runtime/format-motion.js +133 -0
  58. package/dist/runtime/format-motion.js.map +1 -0
  59. package/dist/runtime/format-svg.cjs +457 -0
  60. package/dist/runtime/format-svg.cjs.map +1 -0
  61. package/dist/runtime/format-svg.d.cts +214 -0
  62. package/dist/runtime/format-svg.d.ts +214 -0
  63. package/dist/runtime/format-svg.iife.js +2 -0
  64. package/dist/runtime/format-svg.iife.js.map +1 -0
  65. package/dist/runtime/format-svg.js +446 -0
  66. package/dist/runtime/format-svg.js.map +1 -0
  67. package/dist/runtime/scroll.cjs +301 -0
  68. package/dist/runtime/scroll.cjs.map +1 -0
  69. package/dist/runtime/scroll.d.cts +236 -0
  70. package/dist/runtime/scroll.d.ts +236 -0
  71. package/dist/runtime/scroll.iife.js +2 -0
  72. package/dist/runtime/scroll.iife.js.map +1 -0
  73. package/dist/runtime/scroll.js +292 -0
  74. package/dist/runtime/scroll.js.map +1 -0
  75. package/dist/runtime.cjs +79 -0
  76. package/dist/runtime.cjs.map +1 -0
  77. package/dist/runtime.d.cts +236 -0
  78. package/dist/runtime.d.ts +236 -0
  79. package/dist/runtime.iife.js +2 -0
  80. package/dist/runtime.iife.js.map +1 -0
  81. package/dist/runtime.js +55 -0
  82. package/dist/runtime.js.map +1 -0
  83. package/dist/widgets.umd.js +1 -1
  84. package/dist/widgets.umd.js.map +1 -1
  85. package/docs/ROADMAP.md +69 -38
  86. package/docs/ai-prompt-guide.md +54 -0
  87. package/docs/components/README.md +253 -0
  88. package/docs/components/usa-accordion.md +38 -0
  89. package/docs/components/usa-acrylic.md +38 -0
  90. package/docs/components/usa-add-to-cart.md +40 -0
  91. package/docs/components/usa-ambient.md +32 -0
  92. package/docs/components/usa-anim-icon.md +34 -0
  93. package/docs/components/usa-audio.md +38 -0
  94. package/docs/components/usa-aurora.md +36 -0
  95. package/docs/components/usa-auto-animate.md +44 -0
  96. package/docs/components/usa-auto-skeleton.md +38 -0
  97. package/docs/components/usa-avatar-stack.md +38 -0
  98. package/docs/components/usa-back-to-top.md +32 -0
  99. package/docs/components/usa-badge-wall.md +39 -0
  100. package/docs/components/usa-badge.md +36 -0
  101. package/docs/components/usa-bar-chart.md +33 -0
  102. package/docs/components/usa-bg-generator.md +32 -0
  103. package/docs/components/usa-blobs.md +32 -0
  104. package/docs/components/usa-bottom-sheet.md +32 -0
  105. package/docs/components/usa-button.md +78 -0
  106. package/docs/components/usa-card-stack.md +40 -0
  107. package/docs/components/usa-card.md +94 -0
  108. package/docs/components/usa-carousel-3d.md +40 -0
  109. package/docs/components/usa-carousel.md +40 -0
  110. package/docs/components/usa-cart-drawer.md +33 -0
  111. package/docs/components/usa-chapter-nav.md +40 -0
  112. package/docs/components/usa-chat-composer.md +33 -0
  113. package/docs/components/usa-check.md +32 -0
  114. package/docs/components/usa-checkbox.md +32 -0
  115. package/docs/components/usa-click.md +36 -0
  116. package/docs/components/usa-clock-control.md +37 -0
  117. package/docs/components/usa-code-export.md +36 -0
  118. package/docs/components/usa-color-picker.md +32 -0
  119. package/docs/components/usa-command-palette.md +39 -0
  120. package/docs/components/usa-compare.md +38 -0
  121. package/docs/components/usa-countdown.md +32 -0
  122. package/docs/components/usa-counter.md +32 -0
  123. package/docs/components/usa-cube-gallery.md +40 -0
  124. package/docs/components/usa-cube.md +36 -0
  125. package/docs/components/usa-cursor.md +32 -0
  126. package/docs/components/usa-date-picker.md +32 -0
  127. package/docs/components/usa-depth.md +44 -0
  128. package/docs/components/usa-dialog.md +40 -0
  129. package/docs/components/usa-disclosure.md +38 -0
  130. package/docs/components/usa-distort.md +36 -0
  131. package/docs/components/usa-dock.md +40 -0
  132. package/docs/components/usa-dot-network.md +32 -0
  133. package/docs/components/usa-double-tap.md +36 -0
  134. package/docs/components/usa-draggable.md +38 -0
  135. package/docs/components/usa-draw.md +36 -0
  136. package/docs/components/usa-drawer.md +34 -0
  137. package/docs/components/usa-equalizer.md +33 -0
  138. package/docs/components/usa-fab.md +40 -0
  139. package/docs/components/usa-festival-banner.md +32 -0
  140. package/docs/components/usa-field.md +34 -0
  141. package/docs/components/usa-file-drop.md +35 -0
  142. package/docs/components/usa-fullpage.md +38 -0
  143. package/docs/components/usa-fx.md +851 -0
  144. package/docs/components/usa-gauge.md +32 -0
  145. package/docs/components/usa-gen-art.md +32 -0
  146. package/docs/components/usa-gesture-fx.md +36 -0
  147. package/docs/components/usa-gesture-sticker.md +36 -0
  148. package/docs/components/usa-glitch.md +32 -0
  149. package/docs/components/usa-globe.md +33 -0
  150. package/docs/components/usa-gradient-text.md +32 -0
  151. package/docs/components/usa-grain.md +36 -0
  152. package/docs/components/usa-grid-glow.md +36 -0
  153. package/docs/components/usa-gyro-card.md +38 -0
  154. package/docs/components/usa-handwriting.md +32 -0
  155. package/docs/components/usa-hero-video.md +38 -0
  156. package/docs/components/usa-hold.md +32 -0
  157. package/docs/components/usa-hud-panel.md +38 -0
  158. package/docs/components/usa-hydrate.md +42 -0
  159. package/docs/components/usa-icon-morph.md +34 -0
  160. package/docs/components/usa-install-button.md +32 -0
  161. package/docs/components/usa-kanban.md +46 -0
  162. package/docs/components/usa-keyframe-editor.md +37 -0
  163. package/docs/components/usa-kpi.md +32 -0
  164. package/docs/components/usa-leaderboard.md +41 -0
  165. package/docs/components/usa-like.md +32 -0
  166. package/docs/components/usa-liquid-nav.md +36 -0
  167. package/docs/components/usa-liquid.md +36 -0
  168. package/docs/components/usa-loading-bar.md +35 -0
  169. package/docs/components/usa-location-card.md +34 -0
  170. package/docs/components/usa-lottie-icon.md +34 -0
  171. package/docs/components/usa-lottie.md +32 -0
  172. package/docs/components/usa-lyrics.md +38 -0
  173. package/docs/components/usa-magnetic.md +32 -0
  174. package/docs/components/usa-marquee.md +38 -0
  175. package/docs/components/usa-mask-reveal.md +36 -0
  176. package/docs/components/usa-masonry-flow.md +42 -0
  177. package/docs/components/usa-masonry.md +38 -0
  178. package/docs/components/usa-menu-toggle.md +34 -0
  179. package/docs/components/usa-menu.md +44 -0
  180. package/docs/components/usa-message-list.md +39 -0
  181. package/docs/components/usa-milestones.md +40 -0
  182. package/docs/components/usa-modal.md +42 -0
  183. package/docs/components/usa-morph.md +34 -0
  184. package/docs/components/usa-motion-inspector.md +32 -0
  185. package/docs/components/usa-motion-prefs.md +32 -0
  186. package/docs/components/usa-motion-spec.md +32 -0
  187. package/docs/components/usa-motion-switch.md +34 -0
  188. package/docs/components/usa-motion-theme.md +40 -0
  189. package/docs/components/usa-motion.md +42 -0
  190. package/docs/components/usa-music-player.md +36 -0
  191. package/docs/components/usa-native-preview.md +36 -0
  192. package/docs/components/usa-nav-morph.md +40 -0
  193. package/docs/components/usa-navbar.md +36 -0
  194. package/docs/components/usa-notification-bell.md +37 -0
  195. package/docs/components/usa-odometer.md +34 -0
  196. package/docs/components/usa-organic-card.md +36 -0
  197. package/docs/components/usa-otp.md +33 -0
  198. package/docs/components/usa-overscroll.md +36 -0
  199. package/docs/components/usa-pack.md +111 -0
  200. package/docs/components/usa-pagination.md +32 -0
  201. package/docs/components/usa-panorama.md +32 -0
  202. package/docs/components/usa-particles.md +32 -0
  203. package/docs/components/usa-pause-all.md +32 -0
  204. package/docs/components/usa-perf-monitor.md +32 -0
  205. package/docs/components/usa-pinch-zoom.md +36 -0
  206. package/docs/components/usa-player.md +38 -0
  207. package/docs/components/usa-plugin-card.md +61 -0
  208. package/docs/components/usa-plugin-store.md +36 -0
  209. package/docs/components/usa-popover.md +38 -0
  210. package/docs/components/usa-post-fx.md +36 -0
  211. package/docs/components/usa-presence.md +36 -0
  212. package/docs/components/usa-press.md +32 -0
  213. package/docs/components/usa-prize-wheel.md +32 -0
  214. package/docs/components/usa-product-gallery.md +40 -0
  215. package/docs/components/usa-progress-ring.md +38 -0
  216. package/docs/components/usa-progress.md +34 -0
  217. package/docs/components/usa-prop-panel.md +34 -0
  218. package/docs/components/usa-pull-cord.md +32 -0
  219. package/docs/components/usa-pull-refresh.md +37 -0
  220. package/docs/components/usa-radar.md +32 -0
  221. package/docs/components/usa-reactions.md +32 -0
  222. package/docs/components/usa-red-envelope.md +32 -0
  223. package/docs/components/usa-retro-button.md +34 -0
  224. package/docs/components/usa-reveal.md +36 -0
  225. package/docs/components/usa-ripple.md +32 -0
  226. package/docs/components/usa-scene.md +38 -0
  227. package/docs/components/usa-scramble.md +32 -0
  228. package/docs/components/usa-scroll-highlight.md +34 -0
  229. package/docs/components/usa-scroll-progress.md +36 -0
  230. package/docs/components/usa-scroll-scene.md +66 -0
  231. package/docs/components/usa-scrolly.md +40 -0
  232. package/docs/components/usa-segmented.md +40 -0
  233. package/docs/components/usa-shader.md +74 -0
  234. package/docs/components/usa-sheet.md +42 -0
  235. package/docs/components/usa-shimmer-text.md +32 -0
  236. package/docs/components/usa-shortcut.md +34 -0
  237. package/docs/components/usa-skeleton-reveal.md +42 -0
  238. package/docs/components/usa-skeleton.md +36 -0
  239. package/docs/components/usa-sketch-chart.md +32 -0
  240. package/docs/components/usa-slider.md +32 -0
  241. package/docs/components/usa-sparkline.md +32 -0
  242. package/docs/components/usa-spatial-card.md +40 -0
  243. package/docs/components/usa-spinner.md +34 -0
  244. package/docs/components/usa-splash.md +36 -0
  245. package/docs/components/usa-split-text.md +32 -0
  246. package/docs/components/usa-spotlight.md +40 -0
  247. package/docs/components/usa-spring.md +42 -0
  248. package/docs/components/usa-stagger.md +40 -0
  249. package/docs/components/usa-star-rating.md +34 -0
  250. package/docs/components/usa-stepper.md +42 -0
  251. package/docs/components/usa-sticky-stack.md +40 -0
  252. package/docs/components/usa-sticky-wall.md +40 -0
  253. package/docs/components/usa-stories.md +38 -0
  254. package/docs/components/usa-story.md +80 -0
  255. package/docs/components/usa-suggestion-chips.md +32 -0
  256. package/docs/components/usa-swipe-deck.md +40 -0
  257. package/docs/components/usa-swipeable.md +36 -0
  258. package/docs/components/usa-switch.md +32 -0
  259. package/docs/components/usa-tab-bar.md +46 -0
  260. package/docs/components/usa-tabs.md +40 -0
  261. package/docs/components/usa-terminal.md +38 -0
  262. package/docs/components/usa-text-rotate.md +32 -0
  263. package/docs/components/usa-theme-surface.md +36 -0
  264. package/docs/components/usa-theme-switcher.md +32 -0
  265. package/docs/components/usa-tilt.md +36 -0
  266. package/docs/components/usa-timeline.md +40 -0
  267. package/docs/components/usa-tip.md +44 -0
  268. package/docs/components/usa-toast-stack.md +36 -0
  269. package/docs/components/usa-toaster.md +36 -0
  270. package/docs/components/usa-typewriter.md +32 -0
  271. package/docs/components/usa-upload-progress.md +33 -0
  272. package/docs/components/usa-video-card.md +40 -0
  273. package/docs/components/usa-view-switch.md +38 -0
  274. package/docs/components/usa-voice-button.md +33 -0
  275. package/docs/components/usa-volume-knob.md +32 -0
  276. package/docs/components/usa-water-ripple.md +36 -0
  277. package/docs/components/usa-wave-text.md +32 -0
  278. package/docs/components/usa-weather-card.md +32 -0
  279. package/docs/components/usa-worker-canvas.md +32 -0
  280. package/docs/components/usa-xp-bar.md +33 -0
  281. package/docs/components.md +105 -0
  282. package/docs/runtime/core.md +55 -0
  283. package/docs/runtime/format-css.md +59 -0
  284. package/docs/runtime/format-motion.md +56 -0
  285. package/docs/runtime/format-svg.md +62 -0
  286. package/docs/runtime/scroll.md +61 -0
  287. package/package.json +71 -7
package/AGENTS.md ADDED
@@ -0,0 +1,61 @@
1
+ # AGENTS.md — using Motionary from an AI assistant
2
+
3
+ This file tells AI coding agents (and the people prompting them) how to pick and use Motionary components correctly. It applies to code that *uses* Motionary; contributors should also read [CONTRIBUTING.md](CONTRIBUTING.md).
4
+
5
+ ## Sources of truth (read these, do not guess)
6
+
7
+ | What | Where |
8
+ |---|---|
9
+ | Every component: tag, attributes, events, slots, methods, import path, define function, CDN URL, minimal example, prerequisites | `motionary/manifest.json` in the npm package · `https://harrisoncn.github.io/Motionary/components.json` (JSON Schema: `components.schema.json`) |
10
+ | Short index for LLMs | `https://harrisoncn.github.io/Motionary/llms.txt` |
11
+ | Full reference in one file | `https://harrisoncn.github.io/Motionary/llms-full.txt` |
12
+ | One Markdown page per component | [`docs/components/<tag>.md`](docs/components/README.md) |
13
+ | Runtime modules (`motionary/runtime/*`) and their compatibility tables | [`docs/runtime/`](docs/runtime/) |
14
+ | Prompting tips and common mistakes | [`docs/ai-prompt-guide.md`](docs/ai-prompt-guide.md) |
15
+
16
+ All of these are generated from the source at build time, so they match the installed version. If a tag or attribute is not in the manifest, it does not exist — do not invent it.
17
+
18
+ ## Rules
19
+
20
+ 1. **Install once:** `npm i motionary` (the old name `use-scroll-animate` is a compatibility alias). No other packages are needed except the few components whose manifest entry lists an official third-party runtime under `requires` (e.g. `<usa-rive>` from 10.6 needs `@rive-app/canvas`).
21
+ 2. **Register before use.** Each component has a define function: `import { defineX } from '<import.path>'; defineX();` — or load the CDN bundle (`components.umd.js`, plus `widgets.umd.js` for 6.x+ widgets), which registers everything.
22
+ 3. **Prerequisites first.** If a component's `requires` is non-empty, register those modules *before* the component mounts:
23
+ ```js
24
+ import { use } from 'motionary/runtime';
25
+ import { scroll } from 'motionary/runtime/scroll';
26
+ use(scroll); // also registers the runtime core
27
+ import { defineScrollScene } from 'motionary/components/widgets';
28
+ defineScrollScene();
29
+ ```
30
+ On a plain HTML page load `runtime.iife.js` first, then each `runtime/<module>.iife.js`, then the component bundles. A missing module shows a visible error that names the exact install / import / CDN fix.
31
+ 4. **Use only documented attributes, events (`usa:*`) and methods.** Attribute values are strings; boolean attributes are present/absent.
32
+ 5. **Accessibility is built in.** Every component honours `prefers-reduced-motion`; do not add your own motion overrides unless asked. Keep real text in the light DOM (components split / animate it accessibly).
33
+ 6. **Frameworks:** Web Components work everywhere. React: `motionary/components/react` (`createUsaComponents`); Vue: mark `usa-*` as custom elements; Svelte / Solid / Angular helpers live in `motionary/components/<framework>`.
34
+ 7. **SSR:** importing any entry is safe on the server (nothing touches `window` at import); call define functions / `use()` on the client.
35
+ 8. **Prefer the smallest import:** a single category (`motionary/components/cards`), a single runtime module, or `motionary/core` for presets only.
36
+
37
+ ## Minimal templates
38
+
39
+ Plain HTML:
40
+
41
+ ```html
42
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
43
+ <usa-reveal effect="fade-up"><h2>Hello</h2></usa-reveal>
44
+ ```
45
+
46
+ Bundler:
47
+
48
+ ```js
49
+ import { defineReveal } from 'motionary/components/reveal';
50
+ defineReveal();
51
+ ```
52
+
53
+ Declarative motion without components (10.2):
54
+
55
+ ```html
56
+ <ul data-motion="enter: fade-up 500ms stagger 80ms"><li>One</li><li>Two</li></ul>
57
+ <script type="module">
58
+ import { createMotion, applyMotionAttributes } from 'motionary/core';
59
+ applyMotionAttributes(createMotion());
60
+ </script>
61
+ ```
package/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [10.2.0] - 2026-10-09
11
+
12
+ ### Added
13
+ - **`motionary/runtime/scroll`** — scroll-linked scenes (original implementation, own API): `scrollScene({ trigger, start, end, scrub, pin, markers, actions, toggleClass, once, horizontal, scroller, onEnter, onLeave, onEnterBack, onLeaveBack, onUpdate, onToggle, animation })`. Rules like `"top 80%"`, `"center center+=100"`, end `"+=600"`; scrub direct (`true`) or smoothed (ms) on the shared ticker; pinning with a layout-preserving spacer (fixed in the window, transform inside scroll containers); start / end / viewport markers; per-edge actions (`play pause resume reverse restart reset complete none`); `refreshScenes()`, `killScenes()`, `allScenes()`, `parseEdge()`, `resolveRule()`. CDN `dist/runtime/scroll.iife.js`; fixed gzip budget.
14
+ - **`motionary/runtime/format-svg`** — SVG loader: SMIL playback on the runtime timeline (`<animate>` from / to / by / values, `keyTimes`, `calcMode` linear / discrete / spline + `keySplines`; `<set>`; `<animateTransform>` translate / scale / rotate / skewX / skewY; `<animateMotion>` path / `<mpath>`, `rotate="auto"`; `dur`, numeric `begin`, `repeatCount` incl. `indefinite`, `repeatDur`, `fill="freeze"`), `playSmil()` (seek / scrub / reverse / timeScale, `restore()`), `readSmil()`; path geometry without the DOM — `parsePath()` (all commands incl. arcs and S/T reflections), `flattenPath()`, `pathLength()`, `pointAtLength()`, `samplePath()` — and **path morphing** between any two paths (`morphPath()`, also used for `attributeName="d"`). Compatibility table in `docs/runtime/format-svg.md`.
15
+ - **`data-motion` in `motionary/core`** — `applyMotionAttributes(motion, root?, { observe })` wires `data-motion="enter: fade-up 600ms stagger 80ms; click: pop"` (triggers `enter`, `load`, `click`, `hover`, `loop`; duration, `delay`, `stagger`, `ease`, `once`) without the DSL package; `parseMotionAttr()`. Core stays far under its 10 KB budget.
16
+ - **Per-component Markdown docs** — `docs/components/<tag>.md` for every element (attributes, events, slots, methods, import, CDN, prerequisites, minimal example, variants) + index, generated from the same data as `components.json` / `llms-full.txt` (`npm run docs:components`; `check:peer-docs` fails when they are stale).
17
+ - **`AGENTS.md`** (repo root, also in the npm package) and **`docs/ai-prompt-guide.md`** — how AI assistants should pick components, start from the manifest example, and handle prerequisites; review checklist and common misuses.
18
+ - **New components (10.2)** in `motionary/components/widgets`: `<usa-scroll-scene>` — scroll-scrubbed scene for `[data-scrub="prop: from -> to"]` children with `scrub`, `pin`, `markers`, `stagger`, `toggle-class`, `preview` (**Requires: motionary/runtime/scroll**); `<usa-motion-inspector>` — live list of running animations (CSS, WAAPI, components) with pause / play all, 0.25× slow motion, per-row scrub and the runtime ticker's fps.
19
+ - Showcase: new gallery cards with copyable code (prerequisites first), live demos and live Store thumbnails.
20
+
21
+ ### Accessibility
22
+ - `<usa-scroll-scene>` is user-driven (it only moves when the reader scrolls); under reduced motion the scrub is linear and the preview loop does not run. `<usa-motion-inspector>` controls are a labelled `toolbar`, rows have labelled scrub sliders, and its slow-motion switch helps people check motion for vestibular safety.
23
+
24
+ ## [10.1.0] - 2026-10-09
25
+
26
+ ### Added
27
+ - **`motionary/runtime` — Motionary's own zero-dependency animation runtime** (original implementation; no third-party code). Shared ticker (`getTicker()`: one rAF loop, lag smoothing, `timeScale`, `step()` for tests / workers), tween + timeline engine (`tween()`, `timeline()`, `Tween`, `Timeline`: plain objects and elements — CSS lengths, colours, custom properties, transform shorthands `x y rotate scale scaleX scaleY skewX skewY`; positions `<`, `>`, `+=`, `-=`, labels; `repeat`, `yoyo`, `reverse()`, `seek()`, `await`), easing (`EASES`, `cubicBezier()`, `steps()`, `parseEase()`), and the module registry (`use()`, `requireModule()`, `hasModule()`, `RuntimeModuleError` with install / import / CDN instructions). SSR-safe (no `window` at import), works in Web Workers, TypeScript types. CDN: `dist/runtime.iife.js` (`window.MotionaryRuntime`, registers itself) and per-module `dist/runtime/<module>.iife.js`; ESM at `dist/runtime.js` / `dist/runtime/<module>.js`.
28
+ - **Format loaders** (each its own tree-shakable module with a fixed gzip budget): `motionary/runtime/format-css` — CSS `@keyframes` (prefixed rules, selector lists, per-frame `animation-timing-function`, transforms as shorthands) and Web Animations API keyframes (array + property-indexed, offsets distributed like the WAAPI) → runtime timeline (`parseKeyframes`, `fromCssRule`, `fromWaapi`, `toWaapi`, `playKeyframes`); `motionary/runtime/format-motion` — Motion / Framer-style `{ initial, animate, transition }` JSON (array keyframes, `times`, ease names / cubic arrays, `repeat` + `repeatType`, per-property transitions, `type: "spring"` simulated into an easing) (`fromMotion`, `playMotion`, `springEase`, `motionEase`). Compatibility tables in `docs/runtime/format-css.md` and `docs/runtime/format-motion.md`.
29
+ - **Prerequisites system**: `showcase/catalog/prereqs.js` is the single source for every component prerequisite (runtime modules now; official third-party runtimes for formats we cannot implement, from 10.6). Gallery cards get a **Requires** block (install, import & register order, CDN, minimal example), Store cards a **"Requires: motionary/runtime/…"** badge and a Prerequisites section in the detail; code snippets include the prerequisites; `scripts/gen-runtime-docs.mjs` writes `docs/runtime/<module>.md` and the README / `docs/components.md` prerequisite blocks.
30
+ - **`npm run check:peer-docs`** (in CI): every runtime-powered component documents its prerequisites in all five places (gallery card, Store detail, docs page, README, AI manifest); every `runtimeModule()` call is declared on its card; every module has a docs page, a compatibility table and a size budget; generated docs are current.
31
+ - **AI-readable components**: `dist/manifest.json` (npm `motionary/manifest.json`, Pages `/components.json`) with JSON Schema (`motionary/manifest.schema.json`, Pages `/components.schema.json`) — every component's tag, attributes, events, slots, methods, import path, define function, CDN URL, minimal example and prerequisites, plus the runtime modules; `llms.txt` (index) and `llms-full.txt` (full reference) at the Pages root. All generated from the source at build time.
32
+ - **Plugin ecosystem**: `create-motionary-plugin` scaffold (`npx -p motionary create-motionary-plugin my-plugin`: EffectPlugin, node:test test, README, `scripts/sign.mjs` writing the SHA-256 integrity into `motionary-plugin.json`); `motionary/marketplace` adds `pluginIntegrity()`, `verifyPlugin()` (SRI-style sha256/384/512 via Web Crypto), `satisfies()` (semver ranges) and `checkCompat()` (`engines.motionary`).
33
+ - **New components (10.1)** in `motionary/components/widgets`: `<usa-plugin-card>` — plugin detail card with compatibility + signature badges, animated download counter and expandable details (**Requires: motionary/runtime**); `<usa-install-button>` — npm / pnpm / yarn / bun / CDN tabs with copy-to-clipboard.
34
+ - Showcase: new gallery cards with copyable code, live demos and live Store thumbnails; the gallery and thumbnails register the runtime modules.
35
+
36
+ ### Changed
37
+ - ROADMAP (track B): no third-party peer libraries and no umbrella bundle — each planned component is powered by a `motionary/runtime` module (scroll, text, smooth, gl, vector, physics, drag-snap) plus a format loader per version; official third-party runtimes only where a format cannot reasonably be implemented (Rive `.riv`, optional Lottie full-fidelity, Draco / KTX2), listed with reasons. `<usa-split-text>` and `<usa-carousel>` already exist, so the planned runtime components are `<usa-text-splitter>` and `<usa-snap-carousel>`.
38
+
39
+ ### Accessibility
40
+ - `<usa-plugin-card>` counts and expands without animation under reduced motion; its details button exposes `aria-expanded`. `<usa-install-button>` tabs are a labelled `tablist`; the copy confirmation is announced (`aria-live`). A missing runtime module renders a visible `role="alert"` message instead of failing silently.
41
+
42
+ ### Fixed
43
+ - The showcase snippet tests now accept the documented `motionary/runtime` and `motionary/runtime/<module>` entry points used by runtime-powered components' code tabs.
44
+ - `<usa-install-button>`: switching package-manager tabs now animates the command in (it changed abruptly); skipped under reduced motion.
45
+
10
46
  ## [10.0.0] - 2026-10-09
11
47
 
12
48
  ### ⚠️ Breaking
package/README.md CHANGED
@@ -166,6 +166,86 @@ Import one category (`motionary/components/cards`), everything (`motionary/compo
166
166
  | **Effect registry** (`/components/fx`) | `<usa-fx>` |
167
167
  | **Effect packs** (`/components/effects`) | `<usa-player>` · `<usa-story>` · `<usa-audio>` · `<usa-motion-theme>` · `<usa-gesture-fx>` |
168
168
 
169
+ <!-- runtime:start -->
170
+ ## Runtime (`motionary/runtime`) & prerequisites
171
+
172
+ Motionary ships its own zero-dependency animation runtime — shared ticker, tween + timeline engine, and one tree-shakable module per feature / format (`motionary/runtime/<module>`). `npm i motionary` installs all of it; you pay only for the modules you import. Components that need a module say so with a **Requires:** badge in the gallery and the Store, and throw a clear error (install / import / CDN) when it is missing.
173
+
174
+ | Module | Import | CDN (IIFE) | Register | gzip budget |
175
+ |---|---|---|---|---|
176
+ | [Runtime core](docs/runtime/core.md) | `motionary/runtime` | `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js` | `use();` | 5.5 KB |
177
+ | [CSS @keyframes & WAAPI keyframes loader](docs/runtime/format-css.md) | `motionary/runtime/format-css` | `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-css.iife.js` | `use(formatCss);` | 2.5 KB |
178
+ | [Motion / Framer keyframe JSON loader](docs/runtime/format-motion.md) | `motionary/runtime/format-motion` | `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-motion.iife.js` | `use(formatMotion);` | 2.5 KB |
179
+ | [Scroll scenes](docs/runtime/scroll.md) | `motionary/runtime/scroll` | `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.iife.js` | `use(scroll);` | 4.5 KB |
180
+ | [SVG loader: SMIL playback + path morphing](docs/runtime/format-svg.md) | `motionary/runtime/format-svg` | `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-svg.iife.js` | `use(formatSvg);` | 5.0 KB |
181
+
182
+ Install once: `npm i motionary`. Plain HTML: load `runtime.iife.js` first, then the module files (each registers itself).
183
+
184
+ #### `<usa-plugin-card>` — Requires: motionary/runtime
185
+
186
+ - **Install:** `npm i motionary`
187
+ - **Import order & registration:** Import motionary/runtime and call use() once at start-up, before any runtime-powered component mounts. CDN: the IIFE registers itself (window.MotionaryRuntime).
188
+
189
+ ```js
190
+ import { use } from 'motionary/runtime';
191
+ import { definePluginCard } from 'motionary/components/widgets';
192
+
193
+ use();
194
+ definePluginCard(); // registers <usa-plugin-card> — after the prerequisites
195
+ ```
196
+
197
+ - **CDN:**
198
+
199
+ ```html
200
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
201
+ <!-- then the component bundles -->
202
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
203
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
204
+ ```
205
+
206
+ - **Minimal example:**
207
+
208
+ ```html
209
+ <usa-plugin-card name="retro" title="Retro" version="1.2.0" author="Motionary" engine="^10.0.0" downloads="12400">
210
+ <p>Pixel, CRT, VHS and Y2K effects.</p>
211
+ </usa-plugin-card>
212
+ ```
213
+
214
+ #### `<usa-scroll-scene>` — Requires: motionary/runtime/scroll
215
+
216
+ - **Install:** `npm i motionary`
217
+ - **Import order & registration:** Register the core first, then the module: use(scroll) also registers the core. CDN: load runtime.iife.js, then runtime/scroll.iife.js (it registers itself).
218
+
219
+ ```js
220
+ import { use } from 'motionary/runtime';
221
+ import { scroll } from 'motionary/runtime/scroll';
222
+ import { defineScrollScene } from 'motionary/components/widgets';
223
+
224
+ use(scroll);
225
+ defineScrollScene(); // registers <usa-scroll-scene> — after the prerequisites
226
+ ```
227
+
228
+ - **CDN:**
229
+
230
+ ```html
231
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
232
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/scroll.iife.js"></script>
233
+ <!-- then the component bundles -->
234
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
235
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
236
+ ```
237
+
238
+ - **Minimal example:**
239
+
240
+ ```html
241
+ <usa-scroll-scene start="top 80%" end="bottom 20%" scrub="120" stagger="120">
242
+ <h2 data-scrub="x: -80 -> 0; opacity: 0 -> 1">Scroll</h2>
243
+ <p data-scrub="y: 40 -> 0; opacity: 0 -> 1">and it follows.</p>
244
+ </usa-scroll-scene>
245
+ ```
246
+
247
+ <!-- runtime:end -->
248
+
169
249
  ## Accessibility & reduced motion
170
250
 
171
251
  - With `prefers-reduced-motion: reduce`, scroll reveals show content immediately (no entrance, parallax or scrub motion), and components fall back to calm states (`staticAlternative()` / `adaptKeyframes()`).
@@ -197,6 +277,8 @@ Evergreen browsers since 2023: Chrome / Edge ≥ 111, Safari ≥ 16.4, Firefox
197
277
 
198
278
  ## Documentation
199
279
 
280
+ - **AI assistants:** [AGENTS.md](AGENTS.md) · [prompt guide](docs/ai-prompt-guide.md) · one page per component in [docs/components/](docs/components/README.md) · `components.json` / `llms.txt` / `llms-full.txt` on the site root.
281
+
200
282
  - [API reference](./docs/API.md) — every export, option and `data-sa-*` attribute
201
283
  - [Presets](./docs/presets.md) — all 214 by category
202
284
  - [Components](./docs/components.md) — every `<usa-*>` element, attribute and event
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+ // 10.1: scaffold a Motionary effect plugin.
3
+ // npx -p motionary create-motionary-plugin my-plugin [--dir path] [--force]
4
+ // Writes package.json (motionary as a peer, engines.motionary range), src/index.js
5
+ // (an EffectPlugin for createMotion().use() / usePlugins()), a test, a README and
6
+ // scripts/sign.mjs, which writes the SRI integrity of dist/index.js into
7
+ // motionary-plugin.json (checked by verifyPlugin() / <usa-plugin-card integrity>).
8
+ import { mkdirSync, writeFileSync, existsSync, readdirSync, readFileSync } from 'node:fs';
9
+ import { join, resolve } from 'node:path';
10
+
11
+ const args = process.argv.slice(2);
12
+ if (!args.length || args.includes('--help') || args.includes('-h')) {
13
+ console.log('Usage: create-motionary-plugin <name> [--dir <path>] [--force]\n\nScaffolds a Motionary effect plugin (EffectPlugin) with tests, README and an integrity signing script.');
14
+ process.exit(args.length ? 0 : 1);
15
+ }
16
+ const name = args.find((a) => !a.startsWith('-') && args[args.indexOf(a) - 1] !== '--dir');
17
+ if (!/^(@[a-z0-9-]+\/)?[a-z0-9][a-z0-9._-]*$/.test(name || '')) {
18
+ console.error(`create-motionary-plugin: invalid package name "${name}" (lowercase, npm rules)`);
19
+ process.exit(1);
20
+ }
21
+ const short = name.split('/').pop().replace(/^motionary-(plugin-)?/, '');
22
+ const dir = resolve(args.includes('--dir') ? args[args.indexOf('--dir') + 1] : short);
23
+ if (existsSync(dir) && readdirSync(dir).length && !args.includes('--force')) {
24
+ console.error(`create-motionary-plugin: ${dir} is not empty (use --force)`);
25
+ process.exit(1);
26
+ }
27
+ const self = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
28
+ const major = self.version.split('.')[0];
29
+ const effect = `${short}-pop`;
30
+ const files = {
31
+ 'package.json': JSON.stringify({
32
+ name,
33
+ version: '0.1.0',
34
+ description: `Motionary effect plugin: ${short}`,
35
+ type: 'module',
36
+ main: './dist/index.js',
37
+ exports: { '.': './dist/index.js', './motionary-plugin.json': './motionary-plugin.json' },
38
+ files: ['dist', 'motionary-plugin.json'],
39
+ keywords: ['motionary', 'motionary-plugin', 'animation'],
40
+ scripts: { build: 'node -e "require(\'fs\').mkdirSync(\'dist\',{recursive:true});require(\'fs\').copyFileSync(\'src/index.js\',\'dist/index.js\')"', sign: 'node scripts/sign.mjs', test: 'node --test test/plugin.test.mjs', prepublishOnly: 'npm run build && npm run sign && npm test' },
41
+ peerDependencies: { motionary: `>=${major}.0.0` },
42
+ engines: { motionary: `>=${major}.0.0` },
43
+ license: 'MIT',
44
+ }, null, 2) + '\n',
45
+ 'src/index.js': `/**
46
+ * ${name} — a Motionary effect plugin.
47
+ *
48
+ * import { createMotion } from 'motionary/core';
49
+ * import ${camel(short)} from '${name}';
50
+ * createMotion().use(${camel(short)});
51
+ * // or: import { usePlugins } from 'motionary/fx2'; usePlugins(${camel(short)});
52
+ */
53
+ const ${camel(short)} = {
54
+ name: '${short}',
55
+ effects: [
56
+ {
57
+ name: '${effect}',
58
+ kind: 'enter',
59
+ description: 'Scale up with a soft overshoot.',
60
+ // run(el, options, ctx): ctx.animate(el, keyframes, timing) honours reduced motion and pausing
61
+ run(el, options, ctx) {
62
+ if (ctx.reduced) return null;
63
+ return ctx.animate(el, [{ transform: 'scale(.6)', opacity: 0 }, { transform: 'scale(1.08)', opacity: 1, offset: 0.7 }, { transform: 'scale(1)', opacity: 1 }], { duration: 520, easing: 'cubic-bezier(.22,1,.36,1)' });
64
+ },
65
+ },
66
+ ],
67
+ };
68
+ export default ${camel(short)};
69
+ `,
70
+ 'test/plugin.test.mjs': `import { test } from 'node:test';
71
+ import assert from 'node:assert/strict';
72
+ import plugin from '../src/index.js';
73
+
74
+ test('exports an EffectPlugin', () => {
75
+ assert.equal(typeof plugin.name, 'string');
76
+ assert.ok(Array.isArray(plugin.effects) && plugin.effects.length > 0);
77
+ for (const e of plugin.effects) assert.equal(typeof e.run, 'function');
78
+ });
79
+ test('respects reduced motion', () => {
80
+ assert.equal(plugin.effects[0].run({}, {}, { reduced: true, animate() { throw new Error('animated'); } }), null);
81
+ });
82
+ `,
83
+ 'scripts/sign.mjs': `// Writes motionary-plugin.json with the SRI integrity of dist/index.js.
84
+ import { readFileSync, writeFileSync } from 'node:fs';
85
+ import { createHash } from 'node:crypto';
86
+ const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
87
+ const code = readFileSync('dist/index.js');
88
+ const integrity = 'sha256-' + createHash('sha256').update(code).digest('base64');
89
+ const manifest = { format: 'motionary/plugin', name: pkg.name, version: pkg.version, entry: 'dist/index.js', integrity, engines: pkg.engines };
90
+ writeFileSync('motionary-plugin.json', JSON.stringify(manifest, null, 2) + '\\n');
91
+ console.log('signed', pkg.name, integrity);
92
+ `,
93
+ 'README.md': `# ${name}
94
+
95
+ A [Motionary](https://github.com/HarrisonCN/Motionary) effect plugin.
96
+
97
+ \`\`\`bash
98
+ npm i motionary ${name}
99
+ \`\`\`
100
+
101
+ \`\`\`js
102
+ import { createMotion } from 'motionary/core';
103
+ import ${camel(short)} from '${name}';
104
+
105
+ createMotion().use(${camel(short)});
106
+ \`\`\`
107
+
108
+ ## Develop
109
+
110
+ - \`npm test\` — node:test
111
+ - \`npm run build && npm run sign\` — writes \`motionary-plugin.json\` with the \`sha256-…\` integrity of \`dist/index.js\`.
112
+ Hosts verify it with \`verifyPlugin(code, integrity)\` from \`motionary/marketplace\`, and
113
+ \`<usa-plugin-card integrity="sha256-…" src=".../dist/index.js">\` shows a Verified badge.
114
+ - \`engines.motionary\` is checked by \`checkCompat(manifest, version)\`.
115
+ `,
116
+ };
117
+ function camel(s) {
118
+ return s.replace(/[-_.](\w)/g, (_, c) => c.toUpperCase()).replace(/^\d/, '_$&');
119
+ }
120
+ for (const [f, s] of Object.entries(files)) {
121
+ mkdirSync(join(dir, f, '..'), { recursive: true });
122
+ writeFileSync(join(dir, f), s);
123
+ }
124
+ console.log(`Created ${name} in ${dir}\n cd ${dir} && npm test`);
@@ -0,0 +1,183 @@
1
+ import { T as Timeline, a as Tween, p as parseEase, d as parseValue } from './tween-CqX1JBuj.js';
2
+
3
+ /**
4
+ * Normalised keyframes shared by the format loaders: a list of frames with
5
+ * offsets in [0, 1], camelCase props and an optional per-segment easing,
6
+ * played as a runtime `Timeline` (one tween per segment).
7
+ */
8
+ const camelProp = (k) => (k.startsWith('--') ? k : k.trim().replace(/-([a-z])/g, (_, c) => c.toUpperCase()));
9
+ /** Fill in missing offsets (spaced evenly between known ones, first 0 / last 1), as the WAAPI does. */
10
+ function distributeOffsets(frames) {
11
+ const out = frames.map((f) => ({ ...f }));
12
+ if (!out.length)
13
+ return out;
14
+ if (out[0].offset == null)
15
+ out[0].offset = out.length === 1 ? 1 : 0;
16
+ if (out[out.length - 1].offset == null)
17
+ out[out.length - 1].offset = 1;
18
+ let i = 0;
19
+ while (i < out.length) {
20
+ if (out[i].offset != null) {
21
+ i++;
22
+ continue;
23
+ }
24
+ const a = i - 1;
25
+ let b = i;
26
+ while (out[b].offset == null)
27
+ b++;
28
+ const from = out[a].offset, to = out[b].offset;
29
+ for (let k = i; k < b; k++)
30
+ out[k].offset = from + ((to - from) * (k - a)) / (b - a);
31
+ i = b;
32
+ }
33
+ return out;
34
+ }
35
+ /** CSS transform functions → runtime transform shorthands (translate/rotate/scale/skew); null when not representable (matrix, 3D, …). */
36
+ function transformToProps(t) {
37
+ if (!t || t === 'none')
38
+ return { x: 0, y: 0, rotate: 0, scale: 1 };
39
+ const out = {};
40
+ const re = /([a-zA-Z][a-zA-Z0-9]*)\(([^)]*)\)/g;
41
+ let m;
42
+ let rest = t;
43
+ while ((m = re.exec(t))) {
44
+ rest = rest.replace(m[0], '');
45
+ const args = m[2].split(/[\s,]+/).filter(Boolean);
46
+ switch (m[1]) {
47
+ case 'translate':
48
+ out.x = args[0];
49
+ out.y = args[1] ?? 0;
50
+ break;
51
+ case 'translateX':
52
+ out.x = args[0];
53
+ break;
54
+ case 'translateY':
55
+ out.y = args[0];
56
+ break;
57
+ case 'translate3d':
58
+ if (parseFloat(args[2] || '0') !== 0)
59
+ return null;
60
+ out.x = args[0];
61
+ out.y = args[1] ?? 0;
62
+ break;
63
+ case 'scale3d':
64
+ if (parseFloat(args[2] ?? '1') !== 1)
65
+ return null;
66
+ if (args[1] !== undefined && args[1] !== args[0]) {
67
+ out.scaleX = +args[0];
68
+ out.scaleY = +args[1];
69
+ }
70
+ else
71
+ out.scale = +args[0];
72
+ break;
73
+ case 'rotate':
74
+ case 'rotateZ':
75
+ out.rotate = args[0];
76
+ break;
77
+ case 'scale':
78
+ if (args[1] !== undefined && args[1] !== args[0]) {
79
+ out.scaleX = +args[0];
80
+ out.scaleY = +args[1];
81
+ }
82
+ else
83
+ out.scale = +args[0];
84
+ break;
85
+ case 'scaleX':
86
+ out.scaleX = +args[0];
87
+ break;
88
+ case 'scaleY':
89
+ out.scaleY = +args[0];
90
+ break;
91
+ case 'skewX':
92
+ out.skewX = args[0];
93
+ break;
94
+ case 'skewY':
95
+ out.skewY = args[0];
96
+ break;
97
+ default: return null;
98
+ }
99
+ }
100
+ return rest.trim() ? null : out;
101
+ }
102
+ /** Expand `transform` into shorthands where possible (kept as a discrete prop otherwise). */
103
+ function expandProps(props) {
104
+ const out = {};
105
+ for (const [k, v] of Object.entries(props)) {
106
+ if (k === 'transform' && typeof v === 'string') {
107
+ const t = transformToProps(v);
108
+ if (t) {
109
+ Object.assign(out, t);
110
+ continue;
111
+ }
112
+ }
113
+ out[k] = v;
114
+ }
115
+ return out;
116
+ }
117
+ const tweenable = (v) => {
118
+ try {
119
+ parseValue(v);
120
+ return true;
121
+ }
122
+ catch {
123
+ return false;
124
+ }
125
+ };
126
+ /**
127
+ * Play frames on a target as a `Timeline` (paused unless `paused: false`).
128
+ * Props missing from a frame hold their previous value; non-numeric values
129
+ * (e.g. `display`, `matrix(...)`) switch discretely at the segment midpoint.
130
+ */
131
+ function framesToTimeline(target, frames, o = {}) {
132
+ const dur = o.duration ?? 1000;
133
+ const fs = [...frames].sort((a, b) => a.offset - b.offset).map((f) => ({ ...f, props: expandProps(f.props) }));
134
+ const tl = new Timeline({ repeat: o.repeat, yoyo: o.yoyo, delay: o.delay, onUpdate: o.onUpdate, onComplete: o.onComplete });
135
+ const keys = Array.from(new Set(fs.flatMap((f) => Object.keys(f.props))));
136
+ // carry values forward / backward so every frame has every key
137
+ const filled = fs.map((f) => ({ ...f, props: { ...f.props } }));
138
+ for (const k of keys) {
139
+ let last;
140
+ for (const f of filled) {
141
+ if (k in f.props)
142
+ last = f.props[k];
143
+ else if (last !== undefined)
144
+ f.props[k] = last;
145
+ }
146
+ let next;
147
+ for (let i = filled.length - 1; i >= 0; i--) {
148
+ if (k in filled[i].props)
149
+ next = filled[i].props[k];
150
+ else if (next !== undefined)
151
+ filled[i].props[k] = next;
152
+ }
153
+ }
154
+ const def = o.ease ?? 'linear';
155
+ if (filled.length === 1)
156
+ filled.unshift({ ...filled[0], offset: 0 });
157
+ for (let i = 0; i < filled.length - 1; i++) {
158
+ const a = filled[i], b = filled[i + 1];
159
+ const segDur = Math.max(0, (b.offset - a.offset) * dur);
160
+ const from = {}, to = {};
161
+ const discrete = [];
162
+ for (const k of keys) {
163
+ if (tweenable(a.props[k]) && tweenable(b.props[k])) {
164
+ from[k] = a.props[k];
165
+ to[k] = b.props[k];
166
+ }
167
+ else
168
+ discrete.push([k, b.props[k]]);
169
+ }
170
+ tl.add(new Tween(target, { from, to, duration: segDur, ease: a.easing ? parseEase(a.easing) : def, paused: true }), a.offset * dur);
171
+ for (const [k, v] of discrete)
172
+ tl.call(() => { if (target.style)
173
+ target.style.setProperty(k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()), String(v));
174
+ else
175
+ target[k] = v; }, a.offset * dur + segDur / 2);
176
+ }
177
+ if (o.paused === false)
178
+ tl.play();
179
+ return tl;
180
+ }
181
+
182
+ export { camelProp as c, distributeOffsets as d, framesToTimeline as f };
183
+ //# sourceMappingURL=keyframes-W-474DMc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyframes-W-474DMc.js","sources":["../../src/runtime/keyframes.ts"],"sourcesContent":["/**\n * Normalised keyframes shared by the format loaders: a list of frames with\n * offsets in [0, 1], camelCase props and an optional per-segment easing,\n * played as a runtime `Timeline` (one tween per segment).\n */\nimport { Timeline, Tween, parseValue, type Target, type PlayOptions } from './tween';\nimport { parseEase, type Ease } from './ease';\n\nexport interface Frame {\n offset: number;\n props: Record<string, string | number>;\n /** Easing from this frame to the next. */\n easing?: string;\n}\n\nexport interface KeyframesPlayOptions extends PlayOptions {\n /** ms (default 1000). */\n duration?: number;\n /** Default easing for segments without their own (default 'linear', as in CSS / WAAPI keyframes). */\n ease?: string | Ease;\n}\n\nexport const camelProp = (k: string): string => (k.startsWith('--') ? k : k.trim().replace(/-([a-z])/g, (_, c: string) => c.toUpperCase()));\n\n/** Fill in missing offsets (spaced evenly between known ones, first 0 / last 1), as the WAAPI does. */\nexport function distributeOffsets<T extends { offset?: number | null }>(frames: T[]): (T & { offset: number })[] {\n const out = frames.map((f) => ({ ...f })) as (T & { offset: number })[];\n if (!out.length) return out;\n if (out[0].offset == null) out[0].offset = out.length === 1 ? 1 : 0;\n if (out[out.length - 1].offset == null) out[out.length - 1].offset = 1;\n let i = 0;\n while (i < out.length) {\n if (out[i].offset != null) { i++; continue; }\n const a = i - 1;\n let b = i;\n while (out[b].offset == null) b++;\n const from = out[a].offset, to = out[b].offset;\n for (let k = i; k < b; k++) out[k].offset = from + ((to - from) * (k - a)) / (b - a);\n i = b;\n }\n return out;\n}\n\n/** CSS transform functions → runtime transform shorthands (translate/rotate/scale/skew); null when not representable (matrix, 3D, …). */\nexport function transformToProps(t: string): Record<string, string | number> | null {\n if (!t || t === 'none') return { x: 0, y: 0, rotate: 0, scale: 1 };\n const out: Record<string, string | number> = {};\n const re = /([a-zA-Z][a-zA-Z0-9]*)\\(([^)]*)\\)/g;\n let m: RegExpExecArray | null;\n let rest = t;\n while ((m = re.exec(t))) {\n rest = rest.replace(m[0], '');\n const args = m[2].split(/[\\s,]+/).filter(Boolean);\n switch (m[1]) {\n case 'translate': out.x = args[0]; out.y = args[1] ?? 0; break;\n case 'translateX': out.x = args[0]; break;\n case 'translateY': out.y = args[0]; break;\n case 'translate3d': if (parseFloat(args[2] || '0') !== 0) return null; out.x = args[0]; out.y = args[1] ?? 0; break;\n case 'scale3d': if (parseFloat(args[2] ?? '1') !== 1) return null; if (args[1] !== undefined && args[1] !== args[0]) { out.scaleX = +args[0]; out.scaleY = +args[1]; } else out.scale = +args[0]; break;\n case 'rotate': case 'rotateZ': out.rotate = args[0]; break;\n case 'scale': if (args[1] !== undefined && args[1] !== args[0]) { out.scaleX = +args[0]; out.scaleY = +args[1]; } else out.scale = +args[0]; break;\n case 'scaleX': out.scaleX = +args[0]; break;\n case 'scaleY': out.scaleY = +args[0]; break;\n case 'skewX': out.skewX = args[0]; break;\n case 'skewY': out.skewY = args[0]; break;\n default: return null;\n }\n }\n return rest.trim() ? null : out;\n}\n\n/** Expand `transform` into shorthands where possible (kept as a discrete prop otherwise). */\nexport function expandProps(props: Record<string, string | number>): Record<string, string | number> {\n const out: Record<string, string | number> = {};\n for (const [k, v] of Object.entries(props)) {\n if (k === 'transform' && typeof v === 'string') {\n const t = transformToProps(v);\n if (t) { Object.assign(out, t); continue; }\n }\n out[k] = v;\n }\n return out;\n}\n\nconst tweenable = (v: string | number): boolean => {\n try { parseValue(v); return true; } catch { return false; }\n};\n\n/**\n * Play frames on a target as a `Timeline` (paused unless `paused: false`).\n * Props missing from a frame hold their previous value; non-numeric values\n * (e.g. `display`, `matrix(...)`) switch discretely at the segment midpoint.\n */\nexport function framesToTimeline(target: Target, frames: Frame[], o: KeyframesPlayOptions = {}): Timeline {\n const dur = o.duration ?? 1000;\n const fs = [...frames].sort((a, b) => a.offset - b.offset).map((f) => ({ ...f, props: expandProps(f.props) }));\n const tl = new Timeline({ repeat: o.repeat, yoyo: o.yoyo, delay: o.delay, onUpdate: o.onUpdate, onComplete: o.onComplete });\n const keys = Array.from(new Set(fs.flatMap((f) => Object.keys(f.props))));\n // carry values forward / backward so every frame has every key\n const filled = fs.map((f) => ({ ...f, props: { ...f.props } }));\n for (const k of keys) {\n let last: string | number | undefined;\n for (const f of filled) { if (k in f.props) last = f.props[k]; else if (last !== undefined) f.props[k] = last; }\n let next: string | number | undefined;\n for (let i = filled.length - 1; i >= 0; i--) { if (k in filled[i].props) next = filled[i].props[k]; else if (next !== undefined) filled[i].props[k] = next; }\n }\n const def = o.ease ?? 'linear';\n if (filled.length === 1) filled.unshift({ ...filled[0], offset: 0 });\n for (let i = 0; i < filled.length - 1; i++) {\n const a = filled[i], b = filled[i + 1];\n const segDur = Math.max(0, (b.offset - a.offset) * dur);\n const from: Record<string, string | number> = {}, to: Record<string, string | number> = {};\n const discrete: [string, string | number][] = [];\n for (const k of keys) {\n if (tweenable(a.props[k]) && tweenable(b.props[k])) { from[k] = a.props[k]; to[k] = b.props[k]; }\n else discrete.push([k, b.props[k]]);\n }\n tl.add(new Tween(target, { from, to, duration: segDur, ease: a.easing ? parseEase(a.easing) : def, paused: true }), a.offset * dur);\n for (const [k, v] of discrete) tl.call(() => { if ((target as any).style) (target as HTMLElement).style.setProperty(k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()), String(v)); else (target as any)[k] = v; }, a.offset * dur + segDur / 2);\n }\n if (o.paused === false) tl.play();\n return tl;\n}\n"],"names":[],"mappings":";;AAAA;;;;AAIG;MAkBU,SAAS,GAAG,CAAC,CAAS,MAAc,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAS,KAAK,CAAC,C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