motionary 10.5.0 → 10.6.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 (100) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +60 -0
  3. package/dist/chunks/{anim-image-DuxvYhq6.cjs → anim-image-DECLkPH4.cjs} +2 -2
  4. package/dist/chunks/{anim-image-DuxvYhq6.cjs.map → anim-image-DECLkPH4.cjs.map} +1 -1
  5. package/dist/chunks/{anim-image-BlNPv4JG.js → anim-image-DNghy017.js} +2 -2
  6. package/dist/chunks/{anim-image-BlNPv4JG.js.map → anim-image-DNghy017.js.map} +1 -1
  7. package/dist/chunks/{keyframes-Ce1s05n3.cjs → keyframes-CbUZjD_5.cjs} +2 -2
  8. package/dist/chunks/{keyframes-Ce1s05n3.cjs.map → keyframes-CbUZjD_5.cjs.map} +1 -1
  9. package/dist/chunks/{keyframes-B8ITIAVa.js → keyframes-F6vp6tZZ.js} +2 -2
  10. package/dist/chunks/{keyframes-B8ITIAVa.js.map → keyframes-F6vp6tZZ.js.map} +1 -1
  11. package/dist/chunks/{registry-DXdFb2fJ.js → registry-D8LAoXI-.js} +2 -2
  12. package/dist/chunks/{registry-DXdFb2fJ.js.map → registry-D8LAoXI-.js.map} +1 -1
  13. package/dist/chunks/{registry-VhfPSI0v.cjs → registry-dr1CPTk1.cjs} +2 -2
  14. package/dist/chunks/{registry-VhfPSI0v.cjs.map → registry-dr1CPTk1.cjs.map} +1 -1
  15. package/dist/chunks/{ticker-DvmC6WLS.cjs → ticker-DaAlEyOd.cjs} +2 -2
  16. package/dist/chunks/{ticker-DvmC6WLS.cjs.map → ticker-DaAlEyOd.cjs.map} +1 -1
  17. package/dist/chunks/{ticker-C5RMHMW7.js → ticker-Do9bGsaV.js} +2 -2
  18. package/dist/chunks/{ticker-C5RMHMW7.js.map → ticker-Do9bGsaV.js.map} +1 -1
  19. package/dist/chunks/{tween-CPtm-EdT.js → tween-BzCGq_Ba.js} +2 -2
  20. package/dist/chunks/{tween-CPtm-EdT.js.map → tween-BzCGq_Ba.js.map} +1 -1
  21. package/dist/chunks/{tween-_BGIl6hK.cjs → tween-CmkdSyaC.cjs} +2 -2
  22. package/dist/chunks/{tween-_BGIl6hK.cjs.map → tween-CmkdSyaC.cjs.map} +1 -1
  23. package/dist/components/lite.cjs +179 -0
  24. package/dist/components/lite.cjs.map +1 -1
  25. package/dist/components/lite.js +176 -1
  26. package/dist/components/lite.js.map +1 -1
  27. package/dist/components/tokens.cjs +179 -0
  28. package/dist/components/tokens.cjs.map +1 -1
  29. package/dist/components/tokens.d.cts +36 -1
  30. package/dist/components/tokens.d.ts +36 -1
  31. package/dist/components/tokens.js +176 -1
  32. package/dist/components/tokens.js.map +1 -1
  33. package/dist/components/widgets.cjs +611 -219
  34. package/dist/components/widgets.cjs.map +1 -1
  35. package/dist/components/widgets.d.cts +201 -2
  36. package/dist/components/widgets.d.ts +201 -2
  37. package/dist/components/widgets.js +605 -220
  38. package/dist/components/widgets.js.map +1 -1
  39. package/dist/components.cjs +4 -0
  40. package/dist/components.cjs.map +1 -1
  41. package/dist/components.d.cts +36 -1
  42. package/dist/components.d.ts +36 -1
  43. package/dist/components.js +1 -1
  44. package/dist/components.umd.js +2 -2
  45. package/dist/components.umd.js.map +1 -1
  46. package/dist/index.umd.js.map +1 -1
  47. package/dist/llms-full.txt +124 -1
  48. package/dist/llms.txt +7 -2
  49. package/dist/manifest.json +343 -1
  50. package/dist/runtime/format-apng.cjs +4 -4
  51. package/dist/runtime/format-apng.js +4 -4
  52. package/dist/runtime/format-css.cjs +4 -4
  53. package/dist/runtime/format-css.js +4 -4
  54. package/dist/runtime/format-gif.cjs +4 -4
  55. package/dist/runtime/format-gif.js +4 -4
  56. package/dist/runtime/format-gltf.cjs +1 -1
  57. package/dist/runtime/format-gltf.js +1 -1
  58. package/dist/runtime/format-motion.cjs +4 -4
  59. package/dist/runtime/format-motion.js +4 -4
  60. package/dist/runtime/format-obj.cjs +1 -1
  61. package/dist/runtime/format-obj.js +1 -1
  62. package/dist/runtime/format-sprite.cjs +3 -3
  63. package/dist/runtime/format-sprite.js +3 -3
  64. package/dist/runtime/format-svg.cjs +3 -3
  65. package/dist/runtime/format-svg.js +3 -3
  66. package/dist/runtime/format-webp.cjs +4 -4
  67. package/dist/runtime/format-webp.js +4 -4
  68. package/dist/runtime/gl.cjs +1 -1
  69. package/dist/runtime/gl.js +1 -1
  70. package/dist/runtime/scroll.cjs +2 -2
  71. package/dist/runtime/scroll.js +2 -2
  72. package/dist/runtime/smooth.cjs +1 -1
  73. package/dist/runtime/smooth.js +1 -1
  74. package/dist/runtime/text.cjs +1 -1
  75. package/dist/runtime/text.js +1 -1
  76. package/dist/runtime/vector.cjs +704 -0
  77. package/dist/runtime/vector.cjs.map +1 -0
  78. package/dist/runtime/vector.d.cts +306 -0
  79. package/dist/runtime/vector.d.ts +306 -0
  80. package/dist/runtime/vector.iife.js +2 -0
  81. package/dist/runtime/vector.iife.js.map +1 -0
  82. package/dist/runtime/vector.js +692 -0
  83. package/dist/runtime/vector.js.map +1 -0
  84. package/dist/runtime.cjs +3 -3
  85. package/dist/runtime.d.cts +1 -1
  86. package/dist/runtime.d.ts +1 -1
  87. package/dist/runtime.iife.js +1 -1
  88. package/dist/runtime.iife.js.map +1 -1
  89. package/dist/runtime.js +5 -5
  90. package/dist/widgets.umd.js +1 -1
  91. package/dist/widgets.umd.js.map +1 -1
  92. package/docs/ROADMAP.md +1 -1
  93. package/docs/components/README.md +4 -1
  94. package/docs/components/usa-lottie-player.md +60 -0
  95. package/docs/components/usa-rive.md +57 -0
  96. package/docs/components/usa-token-editor.md +32 -0
  97. package/docs/components.md +72 -0
  98. package/docs/runtime/rive.md +55 -0
  99. package/docs/runtime/vector.md +67 -0
  100. package/package.json +16 -2
package/docs/ROADMAP.md CHANGED
@@ -65,7 +65,7 @@ Store 卡片显示 **「Requires: motionary/runtime/<module>」** 徽章(官
65
65
  - 主线 B:**gl 模块** —— 迷你 WebGL2 场景(网格 / 基础几何体、相机、灯光、着色器材质;不是 Three.js 克隆)。
66
66
  - 格式:OBJ / MTL、glTF 2.0 / GLB 基础、视频纹理。
67
67
  - 新组件:粒子画布、着色器背景、`<usa-gl-scene>`(保留别名 `<usa-three-scene>`)。
68
- - **v10.6** — 动效设计令牌 2.0:W3C Design Tokens 格式导入导出。
68
+ - ✅ **v10.6** — 动效设计令牌 2.0:W3C Design Tokens 格式导入导出。
69
69
  - 主线 B:**vector 模块** —— 矢量动画播放器,支持文档列出的 Lottie JSON 子集(形状、变换、修剪路径、基础遮罩、预合成、渐变;文档列出不支持的特性)+ dotLottie。
70
70
  - 官方运行时:`<usa-rive>`(Requires: @rive-app/canvas,可选 peer,懒加载)。
71
71
  - 新组件:令牌编辑器、`<usa-lottie-player>`、`<usa-rive>`。
@@ -1,4 +1,4 @@
1
- # Motionary components (202)
1
+ # Motionary components (205)
2
2
 
3
3
  One page per `<usa-*>` element, generated from the source. Machine-readable: `motionary/manifest.json` · Pages `/components.json` · `/llms.txt` · `/llms-full.txt`. How to use these with an AI assistant: [AGENTS.md](../../AGENTS.md) and [the prompt guide](../ai-prompt-guide.md).
4
4
 
@@ -65,6 +65,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
65
65
  - [`<usa-location-card>`](usa-location-card.md) — Location card
66
66
  - [`<usa-lottie>`](usa-lottie.md) — Lottie player
67
67
  - [`<usa-lottie-icon>`](usa-lottie-icon.md) — Animated icon set
68
+ - [`<usa-lottie-player>`](usa-lottie-player.md) — Lottie player (JSON + dotLottie) · Requires: motionary/runtime/vector
68
69
  - [`<usa-menu>`](usa-menu.md) — Dropdown menu
69
70
  - [`<usa-message-list>`](usa-message-list.md) — Chat thread
70
71
  - [`<usa-motion>`](usa-motion.md) — Motion DSL
@@ -94,6 +95,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
94
95
  - [`<usa-reactions>`](usa-reactions.md) — Emoji reactions
95
96
  - [`<usa-red-envelope>`](usa-red-envelope.md) — Red envelope (红包)
96
97
  - [`<usa-retro-button>`](usa-retro-button.md) — Retro buttons
98
+ - [`<usa-rive>`](usa-rive.md) — Rive player (official runtime) · Requires: @rive-app/canvas
97
99
  - [`<usa-scene>`](usa-scene.md) — Cinematic scene
98
100
  - [`<usa-segmented>`](usa-segmented.md) — Segmented control
99
101
  - [`<usa-shader-backdrop>`](usa-shader-backdrop.md) — Shader backdrop + post chain
@@ -112,6 +114,7 @@ One page per `<usa-*>` element, generated from the source. Machine-readable: `mo
112
114
  - [`<usa-theme-surface>`](usa-theme-surface.md) — Theme surface
113
115
  - [`<usa-theme-switcher>`](usa-theme-switcher.md) — Theme switcher
114
116
  - [`<usa-tip>`](usa-tip.md) — Tooltip / popover 2.0
117
+ - [`<usa-token-editor>`](usa-token-editor.md) — Motion token editor (W3C DTCG)
115
118
  - [`<usa-upload-progress>`](usa-upload-progress.md) — Upload progress
116
119
  - [`<usa-video-card>`](usa-video-card.md) — Video card
117
120
  - [`<usa-voice-button>`](usa-voice-button.md) — Voice button
@@ -0,0 +1,60 @@
1
+ # `<usa-lottie-player>` — Lottie player (JSON + dotLottie)
2
+
3
+ > Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
4
+
5
+ 10.6: plays Lottie JSON and dotLottie (.lottie) files with Motionary’s own Canvas 2D renderer — shapes, gradients, trim paths, masks, track mattes, precomps and images; autoplay, loop, bounce, segments / markers, play on hover or scrub with scroll. Requires motionary/runtime/vector — npm i motionary, then use(vector) before it mounts.
6
+
7
+ - **Category:** ui · **since** 10.6
8
+ - **Import:** `import { defineLottiePlayer } from 'motionary/components/widgets'` then `defineLottiePlayer();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
10
+ - **Attributes:** `src`, `animation`, `autoplay`, `loop`, `speed`, `mode`, `segment`, `hover`, `scrub`, `fit`, `background`, `label`
11
+ - **Events:** `usa:complete`, `usa:load`, `usa:error`, `usa:runtime-missing`
12
+ - **Slots:** —
13
+ - **Methods:** `play()`, `pause()`, `stop()`, `seek()`
14
+ - **Source:** [src/components/widgets/lottie-player.ts](../../src/components/widgets/lottie-player.ts)
15
+
16
+ ## Prerequisites — Requires: motionary/runtime/vector
17
+
18
+ 1. **Install:** `npm i motionary`
19
+ 2. **Import order & registration:** Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).
20
+
21
+ ```js
22
+ import { use } from 'motionary/runtime';
23
+ import { vector } from 'motionary/runtime/vector';
24
+ import { defineLottiePlayer } from 'motionary/components/widgets';
25
+
26
+ use(vector);
27
+ defineLottiePlayer(); // registers <usa-lottie-player> — after the prerequisites
28
+ ```
29
+
30
+ 3. **CDN:**
31
+
32
+ ```html
33
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
34
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js"></script>
35
+ <!-- then the component bundles -->
36
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
37
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
38
+ ```
39
+
40
+ ## Minimal example
41
+
42
+ ```html
43
+ <usa-lottie-player src="/anim/hero.lottie" autoplay loop label="Hero animation"></usa-lottie-player>
44
+ ```
45
+
46
+ ## ES module
47
+
48
+ ```js
49
+ import { use } from 'motionary/runtime';
50
+ import { vector } from 'motionary/runtime/vector';
51
+
52
+ use(vector);
53
+ import { defineLottiePlayer } from 'motionary/components/widgets';
54
+
55
+ defineLottiePlayer(); // registers <usa-lottie-player>
56
+
57
+ /* then use it in your HTML:
58
+ <usa-lottie-player src="/anim/hero.lottie" autoplay loop label="Hero animation"></usa-lottie-player>
59
+ */
60
+ ```
@@ -0,0 +1,57 @@
1
+ # `<usa-rive>` — Rive player (official runtime)
2
+
3
+ > Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
4
+
5
+ 10.6: plays Rive (.riv) files — artboards, animations and state machines with inputs — through the official Rive runtime @rive-app/canvas, an optional peer dependency that is lazy-loaded on first use (Motionary does not reimplement the proprietary .riv format). Requires @rive-app/canvas — npm i @rive-app/canvas, or load its CDN script first; missing → a clear message in place.
6
+
7
+ - **Category:** ui · **since** 10.6
8
+ - **Import:** `import { defineRive } from 'motionary/components/widgets'` then `defineRive();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
10
+ - **Attributes:** `src`, `artboard`, `animation`, `state-machine`, `autoplay`, `fit`, `label`, `runtime-src`
11
+ - **Events:** `usa:load`, `usa:error`, `usa:runtime-missing`
12
+ - **Slots:** —
13
+ - **Methods:** `play()`, `pause()`, `input()`
14
+ - **Source:** [src/components/widgets/rive.ts](../../src/components/widgets/rive.ts)
15
+
16
+ ## Prerequisites — Requires: @rive-app/canvas
17
+
18
+ 1. **Install:** `npm i @rive-app/canvas`
19
+ 2. **Import order & registration:** Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.
20
+
21
+ ```js
22
+ import { provideRiveRuntime } from 'motionary/components/widgets';
23
+ import { defineRive } from 'motionary/components/widgets';
24
+
25
+ provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts
26
+ defineRive(); // registers <usa-rive> — after the prerequisites
27
+ ```
28
+
29
+ 3. **CDN:**
30
+
31
+ ```html
32
+ <script src="https://unpkg.com/@rive-app/canvas@2.44.1/rive.js"></script>
33
+ <!-- then the component bundles -->
34
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
35
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
36
+ ```
37
+
38
+ ## Minimal example
39
+
40
+ ```html
41
+ <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay label="Icon"></usa-rive>
42
+ ```
43
+
44
+ ## ES module
45
+
46
+ ```js
47
+ import { provideRiveRuntime } from 'motionary/components/widgets';
48
+
49
+ provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts
50
+ import { defineRive } from 'motionary/components/widgets';
51
+
52
+ defineRive(); // registers <usa-rive>
53
+
54
+ /* then use it in your HTML:
55
+ <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay label="Icon"></usa-rive>
56
+ */
57
+ ```
@@ -0,0 +1,32 @@
1
+ # `<usa-token-editor>` — Motion token editor (W3C DTCG)
2
+
3
+ > Generated from the source and the gallery catalog by `scripts/gen-component-docs.mjs` (same data as [components.json](https://harrisoncn.github.io/Motionary/components.json) and [llms-full.txt](https://harrisoncn.github.io/Motionary/llms-full.txt)).
4
+
5
+ 10.6 (motion design tokens 2.0): edit duration and cubic-bézier easing tokens with a live preview per token, then export W3C Design Tokens (DTCG 2025.10 or the earlier draft) or import a DTCG file — aliases resolved, problems listed; apply writes the tokens to :root custom properties as you edit.
6
+
7
+ - **Category:** ui · **since** 10.6
8
+ - **Import:** `import { defineTokenEditor } from 'motionary/components/widgets'` then `defineTokenEditor();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
10
+ - **Attributes:** `apply`, `format`, `groups`
11
+ - **Events:** `usa:export`, `usa:import`, `usa:change`
12
+ - **Slots:** —
13
+ - **Methods:** `exportJSON()`, `importJSON()`
14
+ - **Source:** [src/components/widgets/token-editor.ts](../../src/components/widgets/token-editor.ts)
15
+
16
+ ## Minimal example
17
+
18
+ ```html
19
+ <usa-token-editor apply format="2025.10"></usa-token-editor>
20
+ ```
21
+
22
+ ## ES module
23
+
24
+ ```js
25
+ import { defineTokenEditor } from 'motionary/components/widgets';
26
+
27
+ defineTokenEditor(); // registers <usa-token-editor>
28
+
29
+ /* then use it in your HTML:
30
+ <usa-token-editor apply format="2025.10"></usa-token-editor>
31
+ */
32
+ ```
@@ -1501,6 +1501,64 @@ defineGlScene(); // registers <usa-gl-scene> — after the prerequisites
1501
1501
  <usa-gl-scene src="/models/chair.glb" controls auto-rotate="20" label="Chair"></usa-gl-scene>
1502
1502
  ```
1503
1503
 
1504
+ ### `<usa-lottie-player>` — Requires: motionary/runtime/vector
1505
+
1506
+ - **Install:** `npm i motionary`
1507
+ - **Import order & registration:** Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).
1508
+
1509
+ ```js
1510
+ import { use } from 'motionary/runtime';
1511
+ import { vector } from 'motionary/runtime/vector';
1512
+ import { defineLottiePlayer } from 'motionary/components/widgets';
1513
+
1514
+ use(vector);
1515
+ defineLottiePlayer(); // registers <usa-lottie-player> — after the prerequisites
1516
+ ```
1517
+
1518
+ - **CDN:**
1519
+
1520
+ ```html
1521
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
1522
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js"></script>
1523
+ <!-- then the component bundles -->
1524
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
1525
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
1526
+ ```
1527
+
1528
+ - **Minimal example:**
1529
+
1530
+ ```html
1531
+ <usa-lottie-player src="/anim/hero.lottie" autoplay loop label="Hero animation"></usa-lottie-player>
1532
+ ```
1533
+
1534
+ ### `<usa-rive>` — Requires: @rive-app/canvas
1535
+
1536
+ - **Install:** `npm i @rive-app/canvas`
1537
+ - **Import order & registration:** Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.
1538
+
1539
+ ```js
1540
+ import { provideRiveRuntime } from 'motionary/components/widgets';
1541
+ import { defineRive } from 'motionary/components/widgets';
1542
+
1543
+ provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts
1544
+ defineRive(); // registers <usa-rive> — after the prerequisites
1545
+ ```
1546
+
1547
+ - **CDN:**
1548
+
1549
+ ```html
1550
+ <script src="https://unpkg.com/@rive-app/canvas@2.44.1/rive.js"></script>
1551
+ <!-- then the component bundles -->
1552
+ <script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>
1553
+ <script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>
1554
+ ```
1555
+
1556
+ - **Minimal example:**
1557
+
1558
+ ```html
1559
+ <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay label="Icon"></usa-rive>
1560
+ ```
1561
+
1504
1562
  <!-- prereqs:end -->
1505
1563
 
1506
1564
  ### v10.2 Scroll scenes (`motionary/runtime/scroll`) + SVG loader + `data-motion` in core: `<usa-scroll-scene>`, `<usa-motion-inspector>` (`components/widgets`)
@@ -1568,6 +1626,20 @@ MCP: `npx -y -p motionary motionary-mcp` — see [docs/mcp.md](docs/mcp.md).
1568
1626
  | `<usa-gpu-particles>` | `count`, `mode` (swirl, galaxy, fountain), `colors`, `size`, `speed`, `trail`, `pointer`, `label` | `backend`; `usa:backend` |
1569
1627
  | `<usa-shader-backdrop>` | `preset` (aurora, plasma, waves, nebula), `post` (bloom, vignette, grain, chromatic, pixelate, scanlines), `colors`, `speed`, `intensity`, `label`; child `<script type="x-shader/x-fragment">` | `passes`; `usa:backend` |
1570
1628
 
1629
+ ### v10.6 Lottie / dotLottie (`motionary/runtime/vector`), Rive (official runtime, optional peer) and W3C motion tokens: `<usa-lottie-player>`, `<usa-rive>`, `<usa-token-editor>` (`components/widgets`)
1630
+
1631
+ ```html
1632
+ <usa-lottie-player src="/anim/hero.lottie" autoplay loop label="Hero animation"></usa-lottie-player>
1633
+ <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay label="Icon"></usa-rive>
1634
+ <usa-token-editor apply format="2025.10"></usa-token-editor>
1635
+ ```
1636
+
1637
+ | Element | Attributes | Methods / events |
1638
+ |---|---|---|
1639
+ | `<usa-lottie-player>` (Requires: motionary/runtime/vector) | `src` (.json, .lottie), `animation`, `autoplay`, `loop`, `speed`, `mode` (normal, bounce), `segment`, `hover`, `scrub`, `fit` (contain, cover, fill), `background`, `label` | `play()`, `pause()`, `stop()`, `seek(frame)`, `player`, `animationData`, `unsupported`; `usa:load`, `usa:complete`, `usa:error`, `usa:runtime-missing` |
1640
+ | `<usa-rive>` (Requires: @rive-app/canvas — official runtime, optional peer) | `src`, `artboard`, `animation`, `state-machine`, `autoplay`, `fit` (contain, cover, fill, fitWidth, fitHeight, none), `runtime-src`, `label` | `rive`, `play()`, `pause()`, `input(name)`; `usa:load`, `usa:error`, `usa:runtime-missing`; `provideRiveRuntime(loader)` |
1641
+ | `<usa-token-editor>` | `apply`, `format` (2025.10, draft), `groups` (duration, easing), `label` | `tokens`, `exportJSON()`, `importJSON(json)`; `usa:change`, `usa:export`, `usa:import` |
1642
+
1571
1643
  ## Frameworks
1572
1644
 
1573
1645
  Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
@@ -0,0 +1,55 @@
1
+ # @rive-app/canvas — Official Rive runtime
2
+
3
+ > Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
4
+
5
+ The official MIT-licensed Rive runtime, used by <usa-rive> to play .riv files (artboards, animations, state machines with inputs). Optional peer dependency: lazy-loaded on first use, never bundled into Motionary.
6
+
7
+ **Official third-party runtime** (optional peer dependency, lazy-loaded). Why not our own: .riv is Rive’s proprietary binary format with a state-machine runtime; the official runtime is the only faithful player, so Motionary does not reimplement it.
8
+
9
+ ## Prerequisites
10
+
11
+ 1. **Install:** `npm i @rive-app/canvas`
12
+ 2. **Import path:** `@rive-app/canvas`
13
+ 3. **CDN:**
14
+
15
+ ```html
16
+ <script src="https://unpkg.com/@rive-app/canvas@2.44.1/rive.js"></script>
17
+ ```
18
+
19
+ ESM from a CDN: `https://cdn.jsdelivr.net/npm/@rive-app/canvas@2.44.1/+esm`
20
+
21
+ 4. **Import order & registration:** Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.
22
+
23
+ ```js
24
+ import { provideRiveRuntime } from 'motionary/components/widgets';
25
+ provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts
26
+ ```
27
+
28
+ ## Example
29
+
30
+ ```js
31
+ // npm i @rive-app/canvas
32
+ import { defineRive } from 'motionary/components/widgets';
33
+ defineRive();
34
+ // <usa-rive src="/anim/icon.riv" state-machine="State Machine 1" autoplay></usa-rive>
35
+ ```
36
+
37
+ ## Exports
38
+
39
+ `provideRiveRuntime` · `loadRiveRuntime` · `RIVE_PEER` · `RIVE_CDN`
40
+
41
+ ## Compatibility
42
+
43
+ | Feature | Supported | Notes |
44
+ |---|---|---|
45
+ | .riv files: artboards, linear animations | ✅ yes | played by the official runtime |
46
+ | state machines + inputs (boolean, number, trigger) | ✅ yes | el.input(name) |
47
+ | fit: contain, cover, fill, fitWidth, fitHeight, none | ✅ yes | |
48
+ | lazy loading, clear error when the runtime is missing | ✅ yes | usa:runtime-missing |
49
+ | reduced motion | ✅ yes | no autoplay (first frame) |
50
+ | WebGL2 renderer (@rive-app/webgl2) | ◐ partial | pass its URL as runtime-src or provideRiveRuntime(() => import('@rive-app/webgl2')) |
51
+ | SSR | ✅ yes | nothing loads until the element mounts in a browser |
52
+
53
+ ## Components that need it
54
+
55
+ - `<usa-rive>` — Rive player (official runtime)
@@ -0,0 +1,67 @@
1
+ # motionary/runtime/vector — Lottie + dotLottie player
2
+
3
+ > Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
4
+
5
+ Plays Lottie (bodymovin JSON) and dotLottie (.lottie) files on Canvas 2D with Motionary’s own renderer (no lottie-web code): shapes, gradients, trim paths, masks, track mattes, precomps, images; a runtime timeline you can seek, reverse and scrub.
6
+
7
+ Part of Motionary's own zero-dependency runtime. Size budget: **12.0 KB gzip** (enforced in CI).
8
+
9
+ ## Prerequisites
10
+
11
+ 1. **Install:** `npm i motionary`
12
+ 2. **Import path:** `motionary/runtime/vector`
13
+ 3. **CDN:**
14
+
15
+ ```html
16
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
17
+ <script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js"></script>
18
+ ```
19
+
20
+ ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.js`
21
+
22
+ 4. **Import order & registration:** Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).
23
+
24
+ ```js
25
+ import { use } from 'motionary/runtime';
26
+ import { vector } from 'motionary/runtime/vector';
27
+ use(vector);
28
+ ```
29
+
30
+ ## Example
31
+
32
+ ```js
33
+ import { use } from 'motionary/runtime';
34
+ import { vector, loadLottie, lottiePlayer } from 'motionary/runtime/vector';
35
+ use(vector);
36
+ const { animation } = await loadLottie('/anim/hero.lottie');
37
+ const player = lottiePlayer(canvas, animation, { loop: true });
38
+ player.play();
39
+ ```
40
+
41
+ ## Exports
42
+
43
+ `vector` · `loadLottie` · `parseDotLottie` · `unzipEntries` · `lottiePlayer` · `renderLottieFrame` · `inspectLottie` · `propValue` · `transformAt` · `trimContours` · `loadLottieImages`
44
+
45
+ ## Compatibility
46
+
47
+ | Feature | Supported | Notes |
48
+ |---|---|---|
49
+ | shape, solid, null, image and precomp layers; parenting; in / out points | ✅ yes | precomp time stretch + time remap |
50
+ | transforms: anchor, position (split X / Y, spatial bezier), scale, rotation, skew, opacity | ✅ yes | |
51
+ | paths, rectangles (rounded), ellipses, stars / polygons, groups | ✅ yes | |
52
+ | fills (non-zero / even-odd), strokes (caps, joins, dashes) | ✅ yes | |
53
+ | linear + radial gradient fills / strokes | ✅ yes | highlight length / angle ignored |
54
+ | trim paths (individually / simultaneously) | ✅ yes | |
55
+ | masks: add, subtract, intersect, inverted, opacity | ✅ yes | |
56
+ | track mattes: alpha, alpha inverted | ✅ yes | luma mattes approximated by alpha |
57
+ | keyframes: per-dimension bezier easing, hold keyframes, v4 + v5 files | ✅ yes | |
58
+ | dotLottie (.lottie): stored + deflate entries, manifest v1 / v2, several animations, embedded images | ✅ yes | deflate needs the native DecompressionStream |
59
+ | markers → named segments | ✅ yes | |
60
+ | text layers, expressions | ✕ no | planned for 10.8 (subset) |
61
+ | 3D layers, layer effects, merge paths, repeaters | ✕ no | listed by inspectLottie() / el.unsupported |
62
+ | dotLottie themes / state machines | ✕ no | planned for 10.9 (subset) |
63
+ | SSR / workers | ◐ partial | parsing + unzip are pure; rendering needs a 2D canvas (OffscreenCanvas works) |
64
+
65
+ ## Components that need it
66
+
67
+ - `<usa-lottie-player>` — Lottie player (JSON + dotLottie)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motionary",
3
- "version": "10.5.0",
3
+ "version": "10.6.0",
4
4
  "description": "Motionary (formerly use-scroll-animate): dependency-free scroll animations + 94 animated Web Components — 214 scroll-reveal presets, card/click/button morphs, physics, page transitions, generative & sound-reactive backgrounds, cursor/gesture effects, themes, micro-interactions, <usa-player>, WebGL. React, Vue, Svelte, Solid, Angular or plain HTML.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1348,6 +1348,16 @@
1348
1348
  "default": "./dist/runtime/format-obj.cjs"
1349
1349
  }
1350
1350
  },
1351
+ "./runtime/vector": {
1352
+ "import": {
1353
+ "types": "./dist/runtime/vector.d.ts",
1354
+ "default": "./dist/runtime/vector.js"
1355
+ },
1356
+ "require": {
1357
+ "types": "./dist/runtime/vector.d.cts",
1358
+ "default": "./dist/runtime/vector.cjs"
1359
+ }
1360
+ },
1351
1361
  "./manifest.json": "./dist/manifest.json",
1352
1362
  "./manifest.schema.json": "./dist/manifest.schema.json",
1353
1363
  "./components.css": "./dist/components.css",
@@ -1469,7 +1479,8 @@
1469
1479
  },
1470
1480
  "peerDependencies": {
1471
1481
  "solid-js": ">=1.6.0",
1472
- "svelte": ">=3.0.0"
1482
+ "svelte": ">=3.0.0",
1483
+ "@rive-app/canvas": ">=2.20.0"
1473
1484
  },
1474
1485
  "peerDependenciesMeta": {
1475
1486
  "solid-js": {
@@ -1477,6 +1488,9 @@
1477
1488
  },
1478
1489
  "svelte": {
1479
1490
  "optional": true
1491
+ },
1492
+ "@rive-app/canvas": {
1493
+ "optional": true
1480
1494
  }
1481
1495
  },
1482
1496
  "engines": {