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/docs/ROADMAP.md CHANGED
@@ -1,54 +1,85 @@
1
1
  # Motionary 路线图(10.0 之后)
2
2
 
3
- 10.0 已发布:全新架构 —— 零依赖核心 `motionary/core`(gzip 后不到 10 KB,实测约 2 KB:`createMotion()`、入场预设、`play` / `bind` / `reveal`、统一暂停与倍速)、所有特效插件化(`motionary/plugins`,按需 `createMotion().use(retro, cinema)`,每个插件只引入自己的特效包)、GPU 特效默认使用 WebGPU(不支持时回退 WebGL2 → Canvas);移除 9.9 弃用的 `registerEffectPacks()`(改用 `registerAllPlugins()`,`npx usa-codemod-10 --write src` 自动改写);`motionary` 与 `use-scroll-animate` 同时成为 npm `latest`。
3
+ 10.0 已发布:全新架构 —— 零依赖核心 `motionary/core`(gzip 后不到 10 KB,实测约 2 KB:`createMotion()`、入场预设、`play` / `bind` / `reveal`、统一暂停与倍速)、所有特效插件化(`motionary/plugins`,按需 `createMotion().use(retro, cinema)`)、GPU 特效默认使用 WebGPU(不支持时回退 WebGL2 → Canvas);移除 9.9 弃用的 `registerEffectPacks()`;`motionary` 与 `use-scroll-animate` 同时成为 npm `latest`。
4
4
 
5
- 下面是 10.1 → 11.0 的计划。每个版本一个主题 + 一组新组件,另外贯穿两条长期主线:
5
+ 下面是 10.1 → 11.0 的计划(2026-10-09 修订)。每个版本一个主题 + 一组新组件,另外贯穿两条长期主线:
6
6
 
7
- - **主线 A · AI 可读组件**:让 AI 模型能自己发现、理解并正确使用每一个组件 —— 机器可读的组件清单、`llms.txt`、逐组件 Markdown 文档、`AGENTS.md` 提示指南,以及 `motionary-mcp` MCP 服务器。
8
- - **主线 B · 依赖第三方插件的组件**:基于 GSAP / ScrollTrigger、SplitType、Lenis、Three.js、lottie-web、Rive、Matter.js、Embla Carousel 等成熟库的组件与特效。这些库一律声明为**可选** `peerDependencies`(`peerDependenciesMeta.optional: true`),核心与其他组件不受影响;组件在首次使用时懒加载对应库,缺失时抛出清晰的错误(例如 `[motionary] <usa-three-scene> 需要 three:npm i three,或通过 CDN 引入后再注册`),而不是静默失败。
7
+ - **主线 A · AI 可读组件**:让 AI 模型能自己发现、理解并正确使用每一个组件 —— 机器可读的组件清单 `components.json`、`llms.txt`、逐组件 Markdown 文档、`AGENTS.md` 提示指南,以及 `motionary-mcp` MCP 服务器。
8
+ - **主线 B · 自研通用前置模块 `motionary/runtime`**:**不再依赖 GSAP、SplitType、Lenis、Three.js、lottie-web、Matter.js、Embla 等第三方库,也不做"全家桶"大包。** Motionary 自己从零实现一个零依赖运行时:共享 ticker / RAF 调度器、tween + timeline 引擎与缓动、模块注册与清晰错误,以及一组按功能 / 格式拆分的模块。每个模块一个子路径(`motionary/runtime/<module>`),可 tree-shake,只为用到的部分付费;可单独通过 CDN 使用(ESM 与自注册 IIFE);导入时不访问 `window`(SSR 安全),能放进 Web Worker 的部分支持 Worker;自带 TypeScript 类型;适用于纯 HTML `<script>`、ESM 打包器、React / Vue / Svelte / Angular。全部为原创实现,不复制、不逆向任何第三方库代码(GSAP 许可证禁止逆向工程)。
9
9
 
10
- ## 主线 B 的统一规则(从 10.1 起对每个依赖插件的组件强制执行)
10
+ ## 主线 B 的统一规则(从 10.1 起强制执行)
11
11
 
12
- 每个依赖第三方库的组件,在以下 **5 处** 都必须写明前置条件:画廊卡片、Store 详情、文档页、README 对应章节、AI 组件清单(manifest)。前置条件固定包含 4 项:
12
+ 需要 runtime 模块(或官方第三方运行时,见下文)的组件,在以下 **5 处** 都必须写明前置条件:画廊卡片、Store 详情、文档页、README 对应章节、AI 组件清单(manifest)。前置条件固定包含:
13
13
 
14
- 1. **安装命令**:如 `npm i gsap`(多个库写在一条命令里);
15
- 2. **CDN 替代方案**:可直接复制的 `<script>` / `import` URL(固定版本号);
16
- 3. **引入顺序与注册代码**:先引入哪个库、是否需要 `gsap.registerPlugin(ScrollTrigger)` 之类的注册、再如何注册 Motionary 组件;
17
- 4. **最小用法示例**:能直接运行的一段 HTML / JS。
14
+ 1. **安装命令**:runtime 模块只需 `npm i motionary` 一次;官方运行时写出确切命令(如 `npm i @rive-app/canvas`);
15
+ 2. **导入路径**:如 `motionary/runtime/scroll`;
16
+ 3. **CDN 地址**:可直接复制的 `<script>`(主版本固定,如 `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js`)以及 ESM 地址;
17
+ 4. **引入顺序与注册代码**:先 `use(scroll)`(会同时注册核心),再注册组件;CDN 先加载 `runtime.iife.js`,再加载模块 IIFE(自动注册);
18
+ 5. **最小用法示例**。
18
19
 
19
- Store 卡片显示 **「Requires: X」** 徽章(如 `Requires: GSAP + ScrollTrigger`),点开详情即可看到上面 4 项。从 10.1 起 CI 增加 `check:peer-docs`,任何一处缺失都会让构建失败。
20
+ Store 卡片显示 **「Requires: motionary/runtime/<module>」** 徽章(官方运行时为 `Requires: @rive-app/canvas` 等)。缺少模块时组件显示并抛出清晰错误(包含上面几项与文档链接)。CI 的 `npm run check:peer-docs` 检查 5 处是否齐全;每个模块有固定的 gzip 体积预算,CI 强制(`size-budget.json`)。
21
+
22
+ ## 格式兼容:每种格式一个独立加载器模块
23
+
24
+ `motionary/runtime` 尽可能兼容常见动画 / 资源格式,全部自研、零依赖,每种格式一个可 tree-shake 的加载器模块,各有体积预算、真实样例文件测试(自制或 CC0 / CC-BY 样例并注明出处)、文档页兼容性表格与 AI 清单条目:
25
+
26
+ - **矢量**:Lottie JSON(形状、预合成、遮罩 / 轨道遮罩、修剪路径、渐变、文本层、表达式子集)+ dotLottie(`.lottie` zip,主题 / 状态机可行子集);SVG(SMIL `animate` / `animateTransform` / `animateMotion` 回放、路径变形、CSS 动画 SVG)。
27
+ - **CSS / Web**:CSS `@keyframes` 与 Web Animations API 关键帧导入 timeline;Motion / Framer 风格关键帧 JSON。
28
+ - **位图 / 序列**:精灵图(TexturePacker / Aseprite JSON)、GIF / APNG / 动画 WebP 拆帧到 canvas、图片序列、视频(MP4 / WebM)纹理与滚动拖动。
29
+ - **3D**:glTF 2.0 / GLB(网格、PBR 基础、蒙皮、变形目标、动画)、OBJ / MTL。
30
+ - **物理 / 数据**:自定义、带版本号的场景 JSON(`motionary-scene@1`)。
31
+
32
+ ### 使用官方第三方运行时的组件(及原因)
33
+
34
+ 只有我们**无法合理自行实现**的格式才使用官方运行时,一律作为**可选** `peerDependencies`(`peerDependenciesMeta.optional: true`),首次使用时懒加载,缺失时清晰报错,并同样满足 5 处前置条件规则 + Requires 徽章:
35
+
36
+ | 组件 / 功能 | 官方运行时 | 原因 |
37
+ |---|---|---|
38
+ | `<usa-rive>`(10.6) | `@rive-app/canvas`(或 `@rive-app/webgl2`) | `.riv` 是 Rive 的专有二进制格式,没有公开的完整规范,自研无法保证正确性 |
39
+ | Lottie 全保真模式(可选,10.6+) | `lottie-web` | 自研播放器只覆盖文档列出的子集;需要子集之外特性(3D 图层、效果等)时可切换到官方播放器 |
40
+ | dotLottie 完整状态机(可选,10.9) | `@lottiefiles/dotlottie-web` | 完整状态机规范庞大且仍在演进,自研只做子集 |
41
+ | glTF Draco / KTX2(Basis) 压缩(可选,10.9) | `draco3d`、`basis_universal` 官方解码器 | 专用压缩解码器(WASM),自研成本与风险过高 |
20
42
 
21
43
  ## 各版本计划
22
44
 
23
- - **v10.1** — 插件生态 + AI 清单 + 第三方插件基础设施:插件开发脚手架(`npm create motionary-plugin`)、插件签名校验与版本兼容检查。
24
- - 主线 A:发布机器可读组件清单 `components.json`(Pages 根目录 + npm 包内 `motionary/manifest.json`,带 JSON Schema),每个组件包含:标签名、属性 / attributes、事件、插槽、导入路径、CDN URL、最小示例、peer 依赖;Pages 根目录提供 `llms.txt`(索引)与 `llms-full.txt`(全部组件的完整说明),均在构建时由源码生成,保证不过期。
25
- - 主线 B:`requirePeer()` 懒加载器与统一错误提示、`peerDependenciesMeta` 规范、Store 「Requires: X」徽章、前置条件区块模板与 `check:peer-docs`(本版先用于新组件)。
26
- - 新组件:插件详情卡、安装按钮(一键复制 npm 命令或 CDN 代码)。
27
- - **v10.2** — 核心 DSL 化:`motionary/core` 直接支持 `data-motion` 声明式语法(无需整个 DSL 包)。
28
- - 主线 A:逐组件 Markdown 文档(`/docs/components/<tag>.md`,由清单生成,与 `llms-full.txt` 同源);仓库根目录新增 `AGENTS.md` 与提示指南(如何让 AI 选组件、写最小示例、避免常见误用)。
29
- - 主线 B:首个依赖插件的组件 —— GSAP + ScrollTrigger 桥接(`motionary/peer/gsap`,把 Motionary 特效挂到 GSAP 时间线上)。
30
- - 新组件:动效检查器面板、`<usa-scroll-scene>`(Requires: GSAP + ScrollTrigger)。
31
- - **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画插件。
32
- - 主线 B:文字拆分组件 `<usa-split-text>`(Requires: SplitType),逐字 / 逐词 / 逐行入场。
33
- - 新组件:路由转场容器、`<usa-split-text>`。
45
+ - ✅ **v10.1** — 插件生态 + AI 清单 + runtime 核心:插件开发脚手架(`create-motionary-plugin`)、插件签名校验(SRI 风格 SHA-256 完整性)与版本兼容检查。
46
+ - 主线 A:机器可读组件清单 `components.json`(Pages 根目录 + npm 包内 `motionary/manifest.json`,带 JSON Schema),每个组件包含:标签名、attributes、事件、插槽、方法、导入路径、CDN URL、最小示例、前置条件;Pages 根目录提供 `llms.txt` 与 `llms-full.txt`,均在构建时由源码生成。
47
+ - 主线 B:**runtime 核心** —— 共享 ticker / RAF 调度器、tween + timeline 引擎与缓动、`use()` / `requireModule()` 注册 API 与清晰错误、「Requires: motionary/runtime/…」徽章、前置条件模板、`check:peer-docs`(检查 runtime 模块文档与 5 处前置条件)、清单列出 runtime 模块。
48
+ - 格式:CSS `@keyframes` + WAAPI 关键帧(`motionary/runtime/format-css`)、Motion / Framer 关键帧 JSON(`motionary/runtime/format-motion`)。
49
+ - 新组件:插件详情卡 `<usa-plugin-card>`(Requires: motionary/runtime)、安装按钮 `<usa-install-button>`。
50
+ - ✅ **v10.2** — 核心 DSL 化:`motionary/core` 直接支持 `data-motion` 声明式语法。
51
+ - 主线 A:逐组件 Markdown 文档(`/docs/components/<tag>.md`,由清单生成);仓库根目录新增 `AGENTS.md` 与提示指南。
52
+ - 主线 B:**scroll 模块**(`motionary/runtime/scroll`)—— pin、scrub、markers、start / end 规则(自研,功能对标 ScrollTrigger,但不复制其代码或 API)。
53
+ - 格式:SVG SMIL 回放、路径变形、CSS 动画 SVG(`motionary/runtime/format-svg`)。
54
+ - 新组件:动效检查器面板、`<usa-scroll-scene>`(Requires: motionary/runtime/scroll)。
55
+ - **v10.3** — View Transitions 2.0:跨文档页面转场、共享元素动画。
56
+ - 主线 B:**text 模块** —— 逐字 / 逐词 / 逐行拆分(保留可访问文本)。
57
+ - 格式:精灵图(TexturePacker / Aseprite JSON)、图片序列(`motionary/runtime/format-sprite`)。
58
+ - 新组件:路由转场容器、`<usa-text-splitter>`(`<usa-split-text>` 已被 4.x 文本组件占用)。
34
59
  - **v10.4** — 滚动驱动 3.0:原生 `animation-timeline` 优先、JS 回退插件化。
35
- - 主线 A:发布 `motionary-mcp` MCP 服务器(`npx motionary-mcp`,stdio),工具:`list_components`、`search_components`、`get_component`、`get_example`、`scaffold_snippet`(按框架 / CDN / npm 生成可运行片段,自动带上 peer 前置条件);数据直接读取清单。
36
- - 主线 B:平滑滚动组件(Requires: Lenis)。
60
+ - 主线 A:发布 `motionary-mcp` MCP 服务器(`npx motionary-mcp`,stdio):`list_components`、`search_components`、`get_component`、`get_example`、`scaffold_snippet`(自动带上前置条件)。
61
+ - 主线 B:**smooth 模块** —— 平滑滚动(减少动态效果时停用)。
62
+ - 格式:GIF(自研 LZW)、APNG、动画 WebP 拆帧到 canvas。
37
63
  - 新组件:滚动进度环、视差分层容器、`<usa-smooth-scroll>`。
38
- - **v10.5** — WebGPU 特效 2.0:计算着色器粒子、后处理链(辉光、色差、景深)。
39
- - 主线 B:Three.js 场景组件(Requires: three;加载 glTF 时另需 `three/addons` 的 GLTFLoader,文档写明引入路径)。
40
- - 新组件:粒子画布、着色器背景、`<usa-three-scene>`。
41
- - **v10.6** — 动效设计令牌 2.0:W3C Design Tokens 格式导入导出、主题级动效曲线。
42
- - 主线 B:完整保真的 Lottie / Rive 播放器(Requires: lottie-web / @rive-app/canvas),与 9.2 的内置 `lottieToKeyframes()` 轻量转换并存,文档说明何时选哪个。
64
+ - **v10.5** — WebGPU 特效 2.0:计算着色器粒子、后处理链。
65
+ - 主线 B:**gl 模块** —— 迷你 WebGL2 场景(网格 / 基础几何体、相机、灯光、着色器材质;不是 Three.js 克隆)。
66
+ - 格式:OBJ / MTL、glTF 2.0 / GLB 基础、视频纹理。
67
+ - 新组件:粒子画布、着色器背景、`<usa-gl-scene>`(保留别名 `<usa-three-scene>`)。
68
+ - **v10.6** — 动效设计令牌 2.0:W3C Design Tokens 格式导入导出。
69
+ - 主线 B:**vector 模块** —— 矢量动画播放器,支持文档列出的 Lottie JSON 子集(形状、变换、修剪路径、基础遮罩、预合成、渐变;文档列出不支持的特性)+ dotLottie。
70
+ - 官方运行时:`<usa-rive>`(Requires: @rive-app/canvas,可选 peer,懒加载)。
43
71
  - 新组件:令牌编辑器、`<usa-lottie-player>`、`<usa-rive>`。
44
- - **v10.7** — AI 辅助动效:自然语言 → 动效描述(本地规则引擎,可选接入模型)、动效建议。
45
- - 主线 A:MCP 服务器 2.0 —— 新增 `suggest_motion`、`validate_snippet`(检查标签、属性与 peer 前置条件是否齐全);清单覆盖全部特效;加入 AI 使用评测集(给模型一组任务,检验生成代码能否直接运行)。
46
- - 主线 B:物理组件(Requires: matter-js)。
72
+ - **v10.7** — AI 辅助动效:自然语言 → 动效描述、动效建议。
73
+ - 主线 A:MCP 2.0 —— `suggest_motion`、`validate_snippet`;AI 使用评测集(运行 AI 写的片段检验能否直接工作)。
74
+ - 主线 B:**physics 模块** —— 2D 刚体(圆 / 盒 / 多边形)、约束;场景 JSON `motionary-scene@1`。
47
75
  - 新组件:动效提示输入框、`<usa-physics-playground>`。
48
- - **v10.8** — 跨端 3.0:小程序(微信 / 支付宝)适配插件、鸿蒙 ArkTS 示例。
49
- - 主线 B:轮播组件(Requires: embla-carousel),类 Swiper 的手势、循环、自动播放,暂停遵循减少动态效果偏好。
50
- - 新组件:跨端预览器、`<usa-carousel>`。
76
+ - **v10.8** — 跨端 3.0:小程序适配、鸿蒙 ArkTS 示例。
77
+ - 主线 B:**drag-snap 模块** —— 拖拽吸附 / 惯性轮播。
78
+ - 格式:glTF 蒙皮 / 变形目标 / 动画;Lottie 文本层 + 表达式子集。
79
+ - 新组件:跨端预览器、`<usa-snap-carousel>`(`<usa-carousel>` 已被 6.2 轮播占用)。
51
80
  - **v10.9** — 11.0 预备:11.0 弃用警告、`upgrading-11.md` 与 `usa-codemod-11`。
52
- - 主线 A:清单 Schema v2 定稿(11.0 起冻结),`llms.txt` / 文档 / MCP 全量对齐。
53
- - 主线 B:对全部依赖插件的组件做一次审计 —— `check:peer-docs` 扩展到所有历史组件,peer 版本范围与 CDN 链接统一更新。
54
- - **v11.0** — 下一代:核心继续瘦身(目标 < 5 KB)、插件按需懒加载、移除 10.9 弃用项;组件清单 Schema v2 与 `motionary-mcp` 1.0 稳定版;`motionary/peer/*` 入口转为稳定 API;npm `latest`。
81
+ - 主线 A:清单 Schema v2 定稿(11.0 起冻结)。
82
+ - 主线 B:全部 runtime 模块审计、逐模块体积预算复核;dotLottie 主题 / 状态机子集;Draco / KTX2 官方解码器挂钩。
83
+ - **v11.0** — 下一代:核心继续瘦身(目标 < 5 KB)、移除 10.9 弃用项;清单 Schema v2 与 `motionary-mcp` 1.0 稳定版;`motionary/runtime/*` 转为稳定 API;npm `latest`。
84
+
85
+ 完整的格式兼容性矩阵(格式 / 版本 / 支持特性 / 已知缺口 / 回退方案)见各模块文档页 `docs/runtime/<module>.md`。
@@ -0,0 +1,54 @@
1
+ # Prompt guide: getting good Motionary code from an AI assistant
2
+
3
+ Motionary publishes machine-readable docs so assistants can stop guessing. These prompts and checks get reliable results.
4
+
5
+ ## 1. Give the model the manifest
6
+
7
+ > Use Motionary. Before writing code, read https://harrisoncn.github.io/Motionary/llms.txt (and llms-full.txt for details). Only use tags, attributes and events listed there.
8
+
9
+ With an MCP-capable client (from 10.4) connect `npx motionary-mcp` instead; it answers `search_components` / `get_component` / `scaffold_snippet` from the same manifest.
10
+
11
+ ## 2. Ask for a component by intent, then let the model pick
12
+
13
+ Good: *"A pricing section where the cards slide in as you scroll and the middle one is pinned while the others pass."*
14
+ The model should search the manifest (`scroll`, `pin`, `reveal`) and pick, e.g., `<usa-scroll-scene pin>` + `<usa-reveal>`.
15
+
16
+ Less good: *"Use usa-pin-cards"* — a tag that does not exist. Ask the model to confirm every tag against the manifest.
17
+
18
+ ## 3. Ask for the minimal example first
19
+
20
+ > Start from the component's `example` in the manifest, then change only what I asked for.
21
+
22
+ Manifest examples are tested in the gallery, so starting from them avoids broken markup.
23
+
24
+ ## 4. Prerequisites — the most common mistake
25
+
26
+ If a component's manifest entry has `requires`, the generated code **must** include, in this order:
27
+
28
+ 1. the install command (`npm i motionary`, or the official runtime it names, e.g. `npm i @rive-app/canvas`);
29
+ 2. the runtime import and `use(...)` registration (or the CDN `<script>` tags: `runtime.iife.js` first, then the module);
30
+ 3. the component's define function;
31
+ 4. the markup.
32
+
33
+ Checklist to paste into a review prompt:
34
+
35
+ - [ ] every `<usa-*>` tag exists in `components.json`;
36
+ - [ ] every attribute is listed in that component's `attributes`;
37
+ - [ ] events are `usa:*` names from `events`;
38
+ - [ ] `requires` prerequisites are installed, imported and registered before the define call;
39
+ - [ ] no third-party animation library was added unless the manifest asks for it;
40
+ - [ ] nothing disables reduced-motion handling.
41
+
42
+ ## 5. Common misuses
43
+
44
+ | Mistake | Fix |
45
+ |---|---|
46
+ | Importing from `use-scroll-animate` in new code | import from `motionary` (same build) |
47
+ | Calling `defineX()` during SSR and expecting output | define on the client; SSR renders the light-DOM content |
48
+ | Forgetting `use(module)` for runtime-powered components | follow the component's Prerequisites (the visible error tells you the exact line) |
49
+ | Using `<usa-carousel>` APIs from other libraries (Swiper, Embla) | use only the documented attributes of the Motionary element |
50
+ | Animating with inline `transition` on the same properties a component animates | let the component own its motion |
51
+
52
+ ## 6. Validation
53
+
54
+ From 10.7, `motionary-mcp`'s `validate_snippet` checks tags, attributes and prerequisites automatically.
@@ -0,0 +1,253 @@
1
+ # Motionary components (193)
2
+
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
+
5
+ ## transitions
6
+
7
+ - [`<usa-accordion>`](usa-accordion.md) — Accordion
8
+ - [`<usa-dialog>`](usa-dialog.md) — Modal & drawer
9
+ - [`<usa-disclosure>`](usa-disclosure.md) — Accordion 2.0
10
+ - [`<usa-modal>`](usa-modal.md) — Modal dialog
11
+ - [`<usa-sheet>`](usa-sheet.md) — Drawer / bottom sheet
12
+ - [`<usa-view-switch>`](usa-view-switch.md) — View switch
13
+
14
+ ## background
15
+
16
+ - [`<usa-acrylic>`](usa-acrylic.md) — Acrylic & Mica
17
+ - [`<usa-aurora>`](usa-aurora.md) — Aurora
18
+ - [`<usa-blobs>`](usa-blobs.md) — Fluid blobs
19
+ - [`<usa-dot-network>`](usa-dot-network.md) — Dot network
20
+ - [`<usa-grain>`](usa-grain.md) — Film grain
21
+ - [`<usa-grid-glow>`](usa-grid-glow.md) — Grid glow
22
+ - [`<usa-marquee>`](usa-marquee.md) — Marquee
23
+ - [`<usa-particles>`](usa-particles.md) — Particles
24
+ - [`<usa-water-ripple>`](usa-water-ripple.md) — Water ripple
25
+
26
+ ## ui
27
+
28
+ - [`<usa-add-to-cart>`](usa-add-to-cart.md) — Add to cart (fly-to-cart)
29
+ - [`<usa-avatar-stack>`](usa-avatar-stack.md) — Avatar stack
30
+ - [`<usa-badge>`](usa-badge.md) — Badge
31
+ - [`<usa-badge-wall>`](usa-badge-wall.md) — Badge wall
32
+ - [`<usa-bar-chart>`](usa-bar-chart.md) — Animated bar chart
33
+ - [`<usa-bg-generator>`](usa-bg-generator.md) — Background generator
34
+ - [`<usa-bottom-sheet>`](usa-bottom-sheet.md) — Bottom sheet
35
+ - [`<usa-carousel>`](usa-carousel.md) — Carousel / slider
36
+ - [`<usa-cart-drawer>`](usa-cart-drawer.md) — Cart drawer
37
+ - [`<usa-chapter-nav>`](usa-chapter-nav.md) — Chapter nav
38
+ - [`<usa-chat-composer>`](usa-chat-composer.md) — AI chat composer
39
+ - [`<usa-clock-control>`](usa-clock-control.md) — Motion clock control
40
+ - [`<usa-code-export>`](usa-code-export.md) — Code export
41
+ - [`<usa-color-picker>`](usa-color-picker.md) — Color picker
42
+ - [`<usa-command-palette>`](usa-command-palette.md) — Command palette (⌘K)
43
+ - [`<usa-countdown>`](usa-countdown.md) — Flip countdown
44
+ - [`<usa-date-picker>`](usa-date-picker.md) — Date picker
45
+ - [`<usa-dock>`](usa-dock.md) — macOS-style dock
46
+ - [`<usa-drawer>`](usa-drawer.md) — Drawer
47
+ - [`<usa-fab>`](usa-fab.md) — FAB speed dial
48
+ - [`<usa-festival-banner>`](usa-festival-banner.md) — Festival banner
49
+ - [`<usa-field>`](usa-field.md) — Animated field
50
+ - [`<usa-gauge>`](usa-gauge.md) — Spring gauge
51
+ - [`<usa-gen-art>`](usa-gen-art.md) — Generative artwork
52
+ - [`<usa-gesture-sticker>`](usa-gesture-sticker.md) — Multi-touch sticker
53
+ - [`<usa-globe>`](usa-globe.md) — Spinning globe
54
+ - [`<usa-gyro-card>`](usa-gyro-card.md) — Gyro 3D card
55
+ - [`<usa-hero-video>`](usa-hero-video.md) — Hero video
56
+ - [`<usa-hud-panel>`](usa-hud-panel.md) — HUD panel
57
+ - [`<usa-hydrate>`](usa-hydrate.md) — SSR hydration animation
58
+ - [`<usa-install-button>`](usa-install-button.md) — Install button
59
+ - [`<usa-kpi>`](usa-kpi.md) — KPI card
60
+ - [`<usa-leaderboard>`](usa-leaderboard.md) — Leaderboard
61
+ - [`<usa-liquid-nav>`](usa-liquid-nav.md) — Liquid nav
62
+ - [`<usa-location-card>`](usa-location-card.md) — Location card
63
+ - [`<usa-lottie>`](usa-lottie.md) — Lottie player
64
+ - [`<usa-lottie-icon>`](usa-lottie-icon.md) — Animated icon set
65
+ - [`<usa-menu>`](usa-menu.md) — Dropdown menu
66
+ - [`<usa-message-list>`](usa-message-list.md) — Chat thread
67
+ - [`<usa-motion>`](usa-motion.md) — Motion DSL
68
+ - [`<usa-motion-inspector>`](usa-motion-inspector.md) — Motion inspector
69
+ - [`<usa-motion-prefs>`](usa-motion-prefs.md) — Motion preference panel
70
+ - [`<usa-motion-spec>`](usa-motion-spec.md) — Motion spec sheet
71
+ - [`<usa-music-player>`](usa-music-player.md) — Music player
72
+ - [`<usa-native-preview>`](usa-native-preview.md) — Native preview
73
+ - [`<usa-nav-morph>`](usa-nav-morph.md) — Navbar with morphing indicator
74
+ - [`<usa-navbar>`](usa-navbar.md) — Auto-hide navbar
75
+ - [`<usa-notification-bell>`](usa-notification-bell.md) — Notification bell
76
+ - [`<usa-organic-card>`](usa-organic-card.md) — Organic card
77
+ - [`<usa-otp>`](usa-otp.md) — OTP code input
78
+ - [`<usa-pagination>`](usa-pagination.md) — Pagination with sliding ink
79
+ - [`<usa-panorama>`](usa-panorama.md) — 360° panorama viewer
80
+ - [`<usa-pause-all>`](usa-pause-all.md) — Pause all motion
81
+ - [`<usa-perf-monitor>`](usa-perf-monitor.md) — Perf monitor
82
+ - [`<usa-plugin-card>`](usa-plugin-card.md) — Plugin detail card · Requires: motionary/runtime
83
+ - [`<usa-plugin-store>`](usa-plugin-store.md) — Plugin marketplace
84
+ - [`<usa-popover>`](usa-popover.md) — Popover
85
+ - [`<usa-presence>`](usa-presence.md) — Presence avatar
86
+ - [`<usa-prize-wheel>`](usa-prize-wheel.md) — Prize wheel
87
+ - [`<usa-product-gallery>`](usa-product-gallery.md) — Product gallery
88
+ - [`<usa-prop-panel>`](usa-prop-panel.md) — Property panel
89
+ - [`<usa-pull-refresh>`](usa-pull-refresh.md) — Pull to refresh
90
+ - [`<usa-radar>`](usa-radar.md) — Radar scope
91
+ - [`<usa-reactions>`](usa-reactions.md) — Emoji reactions
92
+ - [`<usa-red-envelope>`](usa-red-envelope.md) — Red envelope (红包)
93
+ - [`<usa-retro-button>`](usa-retro-button.md) — Retro buttons
94
+ - [`<usa-scene>`](usa-scene.md) — Cinematic scene
95
+ - [`<usa-segmented>`](usa-segmented.md) — Segmented control
96
+ - [`<usa-shortcut>`](usa-shortcut.md) — Shortcut hint
97
+ - [`<usa-sketch-chart>`](usa-sketch-chart.md) — Sketch chart
98
+ - [`<usa-slider>`](usa-slider.md) — Slider
99
+ - [`<usa-sparkline>`](usa-sparkline.md) — Sparkline
100
+ - [`<usa-spatial-card>`](usa-spatial-card.md) — Spatial card
101
+ - [`<usa-stepper>`](usa-stepper.md) — Stepper / wizard
102
+ - [`<usa-sticky-wall>`](usa-sticky-wall.md) — Sticky-note wall
103
+ - [`<usa-stories>`](usa-stories.md) — Stories viewer
104
+ - [`<usa-suggestion-chips>`](usa-suggestion-chips.md) — Suggestion chips
105
+ - [`<usa-tab-bar>`](usa-tab-bar.md) — Tabs with animated indicator
106
+ - [`<usa-tabs>`](usa-tabs.md) — Tabs
107
+ - [`<usa-terminal>`](usa-terminal.md) — Terminal window
108
+ - [`<usa-theme-surface>`](usa-theme-surface.md) — Theme surface
109
+ - [`<usa-theme-switcher>`](usa-theme-switcher.md) — Theme switcher
110
+ - [`<usa-tip>`](usa-tip.md) — Tooltip / popover 2.0
111
+ - [`<usa-upload-progress>`](usa-upload-progress.md) — Upload progress
112
+ - [`<usa-video-card>`](usa-video-card.md) — Video card
113
+ - [`<usa-voice-button>`](usa-voice-button.md) — Voice button
114
+ - [`<usa-worker-canvas>`](usa-worker-canvas.md) — Worker canvas
115
+ - [`<usa-xp-bar>`](usa-xp-bar.md) — XP bar
116
+
117
+ ## page
118
+
119
+ - [`<usa-ambient>`](usa-ambient.md) — Ambient layer
120
+ - [`<usa-auto-skeleton>`](usa-auto-skeleton.md) — Auto skeleton
121
+ - [`<usa-back-to-top>`](usa-back-to-top.md) — Back to top
122
+ - [`<usa-cursor>`](usa-cursor.md) — Custom cursor
123
+ - [`<usa-fullpage>`](usa-fullpage.md) — Full-page sections
124
+ - [`<usa-loading-bar>`](usa-loading-bar.md) — Top loading bar
125
+ - [`<usa-motion-switch>`](usa-motion-switch.md) — Motion intensity
126
+ - [`<usa-splash>`](usa-splash.md) — Splash screen
127
+
128
+ ## svg
129
+
130
+ - [`<usa-anim-icon>`](usa-anim-icon.md) — Animated icons
131
+ - [`<usa-draw>`](usa-draw.md) — Line drawing
132
+ - [`<usa-mask-reveal>`](usa-mask-reveal.md) — Mask reveal
133
+ - [`<usa-morph>`](usa-morph.md) — Path morph
134
+
135
+ ## fx
136
+
137
+ - [`<usa-audio>`](usa-audio.md) — Beat-triggered effects
138
+ - [`<usa-fx>`](usa-fx.md) — Attention seekers
139
+ - [`<usa-gesture-fx>`](usa-gesture-fx.md) — Gesture triggers
140
+ - [`<usa-motion-theme>`](usa-motion-theme.md) — Theme packs
141
+ - [`<usa-player>`](usa-player.md) — JSON animation player
142
+ - [`<usa-story>`](usa-story.md) — Story: before / after
143
+
144
+ ## layout
145
+
146
+ - [`<usa-auto-animate>`](usa-auto-animate.md) — Auto-animate
147
+ - [`<usa-kanban>`](usa-kanban.md) — Kanban board (drag-sort)
148
+ - [`<usa-masonry>`](usa-masonry.md) — Masonry
149
+ - [`<usa-masonry-flow>`](usa-masonry-flow.md) — Masonry with layout animation
150
+
151
+ ## click
152
+
153
+ - [`<usa-button>`](usa-button.md) — Button deformation
154
+ - [`<usa-checkbox>`](usa-checkbox.md) — Animated checkbox
155
+ - [`<usa-click>`](usa-click.md) — Click effects
156
+ - [`<usa-double-tap>`](usa-double-tap.md) — Double tap
157
+ - [`<usa-hold>`](usa-hold.md) — Hold to confirm
158
+ - [`<usa-icon-morph>`](usa-icon-morph.md) — Icon morph
159
+ - [`<usa-like>`](usa-like.md) — Like button
160
+ - [`<usa-menu-toggle>`](usa-menu-toggle.md) — Hamburger → close
161
+ - [`<usa-pull-cord>`](usa-pull-cord.md) — Lamp pull-cord switch
162
+ - [`<usa-star-rating>`](usa-star-rating.md) — Star rating 2.0
163
+ - [`<usa-switch>`](usa-switch.md) — Toggle switch variants
164
+
165
+ ## cards
166
+
167
+ - [`<usa-card>`](usa-card.md) — Card
168
+ - [`<usa-card-stack>`](usa-card-stack.md) — Swipe stack
169
+ - [`<usa-carousel-3d>`](usa-carousel-3d.md) — 3D carousel
170
+ - [`<usa-cube-gallery>`](usa-cube-gallery.md) — Cube gallery
171
+ - [`<usa-sticky-stack>`](usa-sticky-stack.md) — Sticky stack
172
+
173
+ ## feedback
174
+
175
+ - [`<usa-check>`](usa-check.md) — Result icon
176
+ - [`<usa-file-drop>`](usa-file-drop.md) — File drop zone
177
+ - [`<usa-progress>`](usa-progress.md) — Progress bar
178
+ - [`<usa-progress-ring>`](usa-progress-ring.md) — Progress ring / bar / gauge
179
+ - [`<usa-skeleton>`](usa-skeleton.md) — Skeleton
180
+ - [`<usa-skeleton-reveal>`](usa-skeleton-reveal.md) — Skeleton → content reveal
181
+ - [`<usa-spinner>`](usa-spinner.md) — Spinners
182
+ - [`<usa-toast-stack>`](usa-toast-stack.md) — Toast stack
183
+ - [`<usa-toaster>`](usa-toaster.md) — Toasts
184
+ - [`<usa-weather-card>`](usa-weather-card.md) — Animated weather card
185
+
186
+ ## interaction
187
+
188
+ - [`<usa-compare>`](usa-compare.md) — Before / after compare
189
+ - [`<usa-equalizer>`](usa-equalizer.md) — Graphic equalizer
190
+ - [`<usa-magnetic>`](usa-magnetic.md) — Magnetic button
191
+ - [`<usa-press>`](usa-press.md) — Press feedback
192
+ - [`<usa-ripple>`](usa-ripple.md) — Ripple
193
+ - [`<usa-spotlight>`](usa-spotlight.md) — Reveal highlight
194
+ - [`<usa-tilt>`](usa-tilt.md) — 3D tilt card
195
+ - [`<usa-volume-knob>`](usa-volume-knob.md) — Volume knob
196
+
197
+ ## text
198
+
199
+ - [`<usa-counter>`](usa-counter.md) — Number counter
200
+ - [`<usa-glitch>`](usa-glitch.md) — Glitch text
201
+ - [`<usa-gradient-text>`](usa-gradient-text.md) — Gradient flow
202
+ - [`<usa-handwriting>`](usa-handwriting.md) — Handwriting draw
203
+ - [`<usa-lyrics>`](usa-lyrics.md) — Synced karaoke lyrics
204
+ - [`<usa-odometer>`](usa-odometer.md) — Odometer counter
205
+ - [`<usa-scramble>`](usa-scramble.md) — Scramble / decode
206
+ - [`<usa-scroll-highlight>`](usa-scroll-highlight.md) — Scroll highlight
207
+ - [`<usa-shimmer-text>`](usa-shimmer-text.md) — Shimmer text
208
+ - [`<usa-split-text>`](usa-split-text.md) — Split-text reveal
209
+ - [`<usa-text-rotate>`](usa-text-rotate.md) — Rotating words
210
+ - [`<usa-typewriter>`](usa-typewriter.md) — Typewriter
211
+ - [`<usa-wave-text>`](usa-wave-text.md) — Wave text
212
+
213
+ ## depth
214
+
215
+ - [`<usa-cube>`](usa-cube.md) — 3D cube
216
+ - [`<usa-depth>`](usa-depth.md) — Depth parallax
217
+
218
+ ## webgl
219
+
220
+ - [`<usa-distort>`](usa-distort.md) — Hover distortion
221
+ - [`<usa-liquid>`](usa-liquid.md) — Liquid image
222
+ - [`<usa-post-fx>`](usa-post-fx.md) — Post-processing
223
+ - [`<usa-shader>`](usa-shader.md) — Shader background
224
+
225
+ ## physics
226
+
227
+ - [`<usa-draggable>`](usa-draggable.md) — Draggable
228
+ - [`<usa-overscroll>`](usa-overscroll.md) — Elastic overscroll
229
+ - [`<usa-spring>`](usa-spring.md) — Spring effects
230
+
231
+ ## timeline
232
+
233
+ - [`<usa-keyframe-editor>`](usa-keyframe-editor.md) — Animation editor 2.0
234
+ - [`<usa-milestones>`](usa-milestones.md) — Scroll-drawn milestones
235
+ - [`<usa-timeline>`](usa-timeline.md) — Timeline
236
+
237
+ ## packs
238
+
239
+ - [`<usa-pack>`](usa-pack.md) — E-commerce pack
240
+
241
+ ## gesture
242
+
243
+ - [`<usa-pinch-zoom>`](usa-pinch-zoom.md) — Pinch zoom
244
+ - [`<usa-swipe-deck>`](usa-swipe-deck.md) — Swipe cards deck
245
+ - [`<usa-swipeable>`](usa-swipeable.md) — Swipeable
246
+
247
+ ## reveal
248
+
249
+ - [`<usa-reveal>`](usa-reveal.md) — Reveal
250
+ - [`<usa-scroll-progress>`](usa-scroll-progress.md) — Scroll progress bar
251
+ - [`<usa-scroll-scene>`](usa-scroll-scene.md) — Scroll scene · Requires: motionary/runtime/scroll
252
+ - [`<usa-scrolly>`](usa-scrolly.md) — Sticky scrollytelling
253
+ - [`<usa-stagger>`](usa-stagger.md) — Stagger list
@@ -0,0 +1,38 @@
1
+ # `<usa-accordion>` — Accordion
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
+ Smooth expand / collapse for native <details> — semantics, keyboard and find-in-page kept; no wrapper elements.
6
+
7
+ - **Category:** transitions
8
+ - **Import:** `import { defineAccordion } from 'motionary/components/transitions'` then `defineAccordion();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
10
+ - **Attributes:** —
11
+ - **Events:** `usa:toggle`
12
+ - **Slots:** —
13
+ - **Methods:** `toggleItem()`
14
+ - **Source:** [src/components/transitions/accordion.ts](../../src/components/transitions/accordion.ts)
15
+
16
+ ## Minimal example
17
+
18
+ ```html
19
+ <usa-accordion>
20
+ <details><summary>Shipping</summary><p>…</p></details>
21
+ <details><summary>Returns</summary><p>…</p></details>
22
+ </usa-accordion>
23
+ ```
24
+
25
+ ## ES module
26
+
27
+ ```js
28
+ import { defineAccordion } from 'motionary/components/transitions';
29
+
30
+ defineAccordion(); // registers <usa-accordion>
31
+
32
+ /* then use it in your HTML:
33
+ <usa-accordion>
34
+ <details><summary>Shipping</summary><p>…</p></details>
35
+ <details><summary>Returns</summary><p>…</p></details>
36
+ </usa-accordion>
37
+ */
38
+ ```
@@ -0,0 +1,38 @@
1
+ # `<usa-acrylic>` — Acrylic & Mica
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
+ Windows Fluent materials: frosted acrylic (backdrop blur + tint + noise) and mica. Solid fallback when transparency is reduced.
6
+
7
+ - **Category:** background
8
+ - **Import:** `import { defineAcrylic } from 'motionary/components/background'` then `defineAcrylic();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
10
+ - **Attributes:** `tint`, `tint-opacity`, `blur`, `shimmer`
11
+ - **Events:** —
12
+ - **Slots:** —
13
+ - **Methods:** —
14
+ - **Source:** [src/components/background/acrylic.ts](../../src/components/background/acrylic.ts)
15
+
16
+ ## Minimal example
17
+
18
+ ```html
19
+ <usa-acrylic shimmer="hover">
20
+ <nav>…</nav>
21
+ </usa-acrylic>
22
+ <usa-acrylic kind="mica">…</usa-acrylic>
23
+ ```
24
+
25
+ ## ES module
26
+
27
+ ```js
28
+ import { defineAcrylic } from 'motionary/components/background';
29
+
30
+ defineAcrylic(); // registers <usa-acrylic>
31
+
32
+ /* then use it in your HTML:
33
+ <usa-acrylic shimmer="hover">
34
+ <nav>…</nav>
35
+ </usa-acrylic>
36
+ <usa-acrylic kind="mica">…</usa-acrylic>
37
+ */
38
+ ```
@@ -0,0 +1,40 @@
1
+ # `<usa-add-to-cart>` — Add to cart (fly-to-cart)
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
+ 7.3: a buy button — the product photo flies on an arc into the cart, the cart badge bumps and the button morphs into a ✓ “Added” state. Works with <usa-cart-drawer> (calls add(item)) or any [data-cart] icon.
6
+
7
+ - **Category:** ui · **since** 7.3
8
+ - **Import:** `import { defineAddToCart } from 'motionary/components/widgets'` then `defineAddToCart();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/widgets.umd.js"></script>`
10
+ - **Attributes:** —
11
+ - **Events:** `usa:add`
12
+ - **Slots:** —
13
+ - **Methods:** `add()`
14
+ - **Source:** [src/components/widgets/add-to-cart.ts](../../src/components/widgets/add-to-cart.ts)
15
+
16
+ ## Minimal example
17
+
18
+ ```html
19
+ <usa-cart-drawer id="cart"></usa-cart-drawer>
20
+ <div data-product>
21
+ <img src="shoe.jpg" alt="Sneaker">
22
+ <usa-add-to-cart cart="#cart" item='{"name":"Sneaker","price":89}'></usa-add-to-cart>
23
+ </div>
24
+ ```
25
+
26
+ ## ES module
27
+
28
+ ```js
29
+ import { defineAddToCart } from 'motionary/components/widgets';
30
+
31
+ defineAddToCart(); // registers <usa-add-to-cart>
32
+
33
+ /* then use it in your HTML:
34
+ <usa-cart-drawer id="cart"></usa-cart-drawer>
35
+ <div data-product>
36
+ <img src="shoe.jpg" alt="Sneaker">
37
+ <usa-add-to-cart cart="#cart" item='{"name":"Sneaker","price":89}'></usa-add-to-cart>
38
+ </div>
39
+ */
40
+ ```
@@ -0,0 +1,32 @@
1
+ # `<usa-ambient>` — Ambient layer
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
+ A fixed page-wide layer: drifting particles, falling snow, twinkling stars, film grain or a gradient that shifts with scroll.
6
+
7
+ - **Category:** page
8
+ - **Import:** `import { defineAmbient } from 'motionary/components/page'` then `defineAmbient();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
10
+ - **Attributes:** `effect`, `density`, `color`
11
+ - **Events:** —
12
+ - **Slots:** —
13
+ - **Methods:** `mount()`, `upd()`, `resize()`, `resize()`, `draw()`, `draw()`, `unmount()`, `caf()`
14
+ - **Source:** [src/components/page/ambient.ts](../../src/components/page/ambient.ts)
15
+
16
+ ## Minimal example
17
+
18
+ ```html
19
+ <usa-ambient effect="snow" density="1.2"></usa-ambient>
20
+ ```
21
+
22
+ ## ES module
23
+
24
+ ```js
25
+ import { defineAmbient } from 'motionary/components/page';
26
+
27
+ defineAmbient(); // registers <usa-ambient>
28
+
29
+ /* then use it in your HTML:
30
+ <usa-ambient effect="snow" density="1.2"></usa-ambient>
31
+ */
32
+ ```
@@ -0,0 +1,34 @@
1
+ # `<usa-anim-icon>` — Animated icons
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
+ Stroke icons that move: the bell rings, the heart beats, the check draws, the gear turns. Hover, click, in view or loop; decorative unless labelled.
6
+
7
+ - **Category:** svg
8
+ - **Import:** `import { defineAnimIcon } from 'motionary/components/svg'` then `defineAnimIcon();`
9
+ - **CDN:** `<script src="https://unpkg.com/motionary@10/dist/components.umd.js"></script>`
10
+ - **Attributes:** `name`, `size`, `label`
11
+ - **Events:** —
12
+ - **Slots:** —
13
+ - **Methods:** `play()`
14
+ - **Source:** [src/components/svg/anim-icon.ts](../../src/components/svg/anim-icon.ts)
15
+
16
+ ## Minimal example
17
+
18
+ ```html
19
+ <usa-anim-icon name="bell" label="Notifications"></usa-anim-icon>
20
+ <usa-anim-icon name="heart" trigger="click"></usa-anim-icon>
21
+ ```
22
+
23
+ ## ES module
24
+
25
+ ```js
26
+ import { defineAnimIcon } from 'motionary/components/svg';
27
+
28
+ defineAnimIcon(); // registers <usa-anim-icon>
29
+
30
+ /* then use it in your HTML:
31
+ <usa-anim-icon name="bell" label="Notifications"></usa-anim-icon>
32
+ <usa-anim-icon name="heart" trigger="click"></usa-anim-icon>
33
+ */
34
+ ```