motionary 9.8.0 → 9.9.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 (105) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/bin/usa-codemod-10.mjs +57 -0
  3. package/dist/chunks/{audio-D95jwlOh.js → audio-C1uFaOKQ.js} +3 -3
  4. package/dist/chunks/{audio-D95jwlOh.js.map → audio-C1uFaOKQ.js.map} +1 -1
  5. package/dist/chunks/{base-BnRyfuyM.js → base-DWYNLg6P.js} +2 -2
  6. package/dist/chunks/{base-BnRyfuyM.js.map → base-DWYNLg6P.js.map} +1 -1
  7. package/dist/chunks/{builtins-CqIq1zBv.js → builtins-DoCY96r9.js} +3 -3
  8. package/dist/chunks/{builtins-CqIq1zBv.js.map → builtins-DoCY96r9.js.map} +1 -1
  9. package/dist/chunks/{core-XA2yhn1b.js → core-BhuojMcL.js} +2 -2
  10. package/dist/chunks/{core-XA2yhn1b.js.map → core-BhuojMcL.js.map} +1 -1
  11. package/dist/chunks/{core-DsGoL9EY.js → core-DoR4w-E4.js} +2 -2
  12. package/dist/chunks/{core-DsGoL9EY.js.map → core-DoR4w-E4.js.map} +1 -1
  13. package/dist/chunks/{fx-CtnrFEg9.js → fx-XBDr7-dH.js} +2 -2
  14. package/dist/chunks/{fx-CtnrFEg9.js.map → fx-XBDr7-dH.js.map} +1 -1
  15. package/dist/chunks/{gpu-CDcXiNA8.js → gpu-DvLHwLxy.js} +2 -2
  16. package/dist/chunks/{gpu-CDcXiNA8.js.map → gpu-DvLHwLxy.js.map} +1 -1
  17. package/dist/chunks/{manifest-D58HXVY-.js → manifest-BDpbuI-9.js} +2 -2
  18. package/dist/chunks/{manifest-D58HXVY-.js.map → manifest-BDpbuI-9.js.map} +1 -1
  19. package/dist/chunks/{player-48Zy_NBG.js → player-CYGvna09.js} +4 -4
  20. package/dist/chunks/{player-48Zy_NBG.js.map → player-CYGvna09.js.map} +1 -1
  21. package/dist/chunks/{registry-gFJRpPES.js → registry-BRM2BRRY.js} +2 -2
  22. package/dist/chunks/{registry-gFJRpPES.js.map → registry-BRM2BRRY.js.map} +1 -1
  23. package/dist/chunks/{spring-CZDNyqWp.js → spring-CAlkc1co.js} +2 -2
  24. package/dist/chunks/{spring-CZDNyqWp.js.map → spring-CAlkc1co.js.map} +1 -1
  25. package/dist/chunks/{variants-GU3yIL4F.js → variants-BBfyVPYm.js} +2 -2
  26. package/dist/chunks/{variants-GU3yIL4F.js.map → variants-BBfyVPYm.js.map} +1 -1
  27. package/dist/components/a11y.js +2 -2
  28. package/dist/components/angular.js +8 -8
  29. package/dist/components/background.js +2 -2
  30. package/dist/components/bridge.js +1 -1
  31. package/dist/components/cards.js +2 -2
  32. package/dist/components/click.js +3 -3
  33. package/dist/components/depth.js +3 -3
  34. package/dist/components/design.js +3 -3
  35. package/dist/components/dsl.js +2 -2
  36. package/dist/components/effects.js +9 -9
  37. package/dist/components/engine.js +2 -2
  38. package/dist/components/feedback.js +1 -1
  39. package/dist/components/fx-3d.js +2 -2
  40. package/dist/components/fx-ai.js +2 -2
  41. package/dist/components/fx-chart.js +2 -2
  42. package/dist/components/fx-cinema.js +2 -2
  43. package/dist/components/fx-cyber.js +2 -2
  44. package/dist/components/fx-festival.js +2 -2
  45. package/dist/components/fx-focus.js +2 -2
  46. package/dist/components/fx-form.js +2 -2
  47. package/dist/components/fx-game.js +2 -2
  48. package/dist/components/fx-genart.js +2 -2
  49. package/dist/components/fx-geo.js +2 -2
  50. package/dist/components/fx-gesture.js +2 -2
  51. package/dist/components/fx-gpu.js +3 -3
  52. package/dist/components/fx-light.js +2 -2
  53. package/dist/components/fx-lottie.js +2 -2
  54. package/dist/components/fx-morph.js +2 -2
  55. package/dist/components/fx-music.js +3 -3
  56. package/dist/components/fx-organic.js +2 -2
  57. package/dist/components/fx-paper.js +2 -2
  58. package/dist/components/fx-perf.js +2 -2
  59. package/dist/components/fx-physics.js +2 -2
  60. package/dist/components/fx-retro.js +2 -2
  61. package/dist/components/fx-safe.js +2 -2
  62. package/dist/components/fx-shop.js +2 -2
  63. package/dist/components/fx-social.js +2 -2
  64. package/dist/components/fx-spatial.js +2 -2
  65. package/dist/components/fx-surface.js +2 -2
  66. package/dist/components/fx-text.js +2 -2
  67. package/dist/components/fx-transitions.js +3 -3
  68. package/dist/components/fx-video.js +2 -2
  69. package/dist/components/fx-weather.js +2 -2
  70. package/dist/components/fx.js +6 -6
  71. package/dist/components/fx2.cjs +41 -4
  72. package/dist/components/fx2.cjs.map +1 -1
  73. package/dist/components/fx2.d.cts +20 -3
  74. package/dist/components/fx2.d.ts +20 -3
  75. package/dist/components/fx2.js +42 -9
  76. package/dist/components/fx2.js.map +1 -1
  77. package/dist/components/gesture.js +4 -4
  78. package/dist/components/interaction.js +1 -1
  79. package/dist/components/layout.js +1 -1
  80. package/dist/components/marketplace.js +4 -4
  81. package/dist/components/native.js +3 -3
  82. package/dist/components/packs.js +1 -1
  83. package/dist/components/page.js +3 -3
  84. package/dist/components/perf.js +2 -2
  85. package/dist/components/physics.js +3 -3
  86. package/dist/components/reveal.js +1 -1
  87. package/dist/components/solid.js +8 -8
  88. package/dist/components/svelte.js +8 -8
  89. package/dist/components/svg.js +1 -1
  90. package/dist/components/text.js +2 -2
  91. package/dist/components/timeline.js +3 -3
  92. package/dist/components/transitions.js +1 -1
  93. package/dist/components/ui.js +4 -4
  94. package/dist/components/vue.js +8 -8
  95. package/dist/components/webgl.js +1 -1
  96. package/dist/components/widgets.js +8 -8
  97. package/dist/components.js +10 -10
  98. package/dist/index.js +2 -2
  99. package/dist/widgets.umd.js +1 -1
  100. package/dist/widgets.umd.js.map +1 -1
  101. package/docs/ROADMAP.md +1 -1
  102. package/docs/components.md +9 -0
  103. package/docs/deprecations.md +4 -0
  104. package/docs/upgrading-10.md +21 -0
  105. package/package.json +3 -2
package/docs/ROADMAP.md CHANGED
@@ -10,5 +10,5 @@
10
10
  - ✅ **v9.6** — 性能 3.0:OffscreenCanvas、Worker 渲染;新组件 性能监视器。
11
11
  - ✅ **v9.7** — 设计工具集成:Figma 插件脚手架、Framer 导出。
12
12
  - ✅ **v9.8** — 原生 2.0:React Native / Flutter 组件示例。
13
- - **v9.9** — 10.0 预备:10.0 弃用警告、`upgrading-10.md` 与 `usa-codemod-10`。
13
+ - ✅ **v9.9** — 10.0 预备:10.0 弃用警告、`upgrading-10.md` 与 `usa-codemod-10`。
14
14
  - **v10.0** — 全新架构:零依赖核心 < 10 KB、所有特效插件化、默认 WebGPU;npm `latest`。
@@ -1301,6 +1301,15 @@ fs.writeFileSync('motion-tokens.json', JSON.stringify(nativeTokens(), null, 2));
1301
1301
  ```
1302
1302
  - `<usa-native-preview rules platform name>`: `replay()`, `code('react-native' | 'flutter')`; `usa:replay`.
1303
1303
 
1304
+ ### v9.9 Plugins API (`motionary/fx2`) — 10.0 preparation
1305
+
1306
+ ```js
1307
+ import { usePlugins, effectPlugins, definePlugin, registerAllPlugins } from 'motionary/fx2';
1308
+ usePlugins(...effectPlugins().filter((p) => /retro|cinema/.test(p.name))); // only what you use
1309
+ usePlugins(definePlugin('acme/sparkle', [sparkleEffect]));
1310
+ ```
1311
+ - `registerEffectPacks()` is deprecated (removed in 10.0) → `registerAllPlugins()`; `npx usa-codemod-10 --write src`. See docs/upgrading-10.md.
1312
+
1304
1313
  ## Frameworks
1305
1314
 
1306
1315
  Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
@@ -1,5 +1,9 @@
1
1
  # Deprecations
2
2
 
3
+ ## Deprecated in 9.9, removed in 10.0
4
+
5
+ See [upgrading-10.md](./upgrading-10.md) — `registerEffectPacks()` (use `registerAllPlugins()` or `usePlugins(...)`). Run `npx usa-codemod-10 --write src`.
6
+
3
7
  ## Deprecated in 8.9, removed in 9.0 (released)
4
8
 
5
9
  See [upgrading-9.md](./upgrading-9.md) — the 5.8 motion-theme names `applyTheme()`, `THEMES`, `THEME_NAMES`, `<usa-theme>` / `defineTheme()` (use `applyMotionTheme()`, `MOTION_THEMES`, `MOTION_THEME_NAMES`, `<usa-motion-theme>` / `defineMotionTheme()`; same behaviour). Run `npx usa-codemod-9 --write src`.
@@ -0,0 +1,21 @@
1
+ # Upgrading to 10.0
2
+
3
+ 10.0.0 is the next major — a new architecture: a zero-dependency core under 10 KB (`motionary/core`), every effect pack delivered as a plugin, and WebGPU as the default backend for GPU effects. 9.9 **warns once in the console** for everything that goes away, and a codemod rewrites it:
4
+
5
+ ```sh
6
+ npx usa-codemod-10 src # dry run: lists every change (and what needs a manual edit)
7
+ npx usa-codemod-10 --write src # apply
8
+ ```
9
+
10
+ ## Removed in 10.0 (deprecated in 9.9)
11
+
12
+ | 9.x | 10.0 | Codemod |
13
+ |---|---|---|
14
+ | `registerEffectPacks()` (`motionary/fx2`) | `registerAllPlugins()` — or register only the plugins you use: `usePlugins(retro, cinema)` | ✅ |
15
+ `EFFECT_PACKS` (packs by key) stays; `effectPlugins()` gives the same packs as plugin objects (`[{ name: 'retro', effects }, …]`).
16
+
17
+ ## New in 9.9 (before the break)
18
+
19
+ - **Plugins.** `definePlugin(name, effects, install?)`, `usePlugins(...plugins)` (registers each plugin once, returns the effect names), `effectPlugins()` (every built-in pack as a plugin) and `registerAllPlugins()` in `motionary/fx2`. `installPlugin()` from `motionary/marketplace` accepts these plugin objects too.
20
+
21
+ See the [CHANGELOG](../CHANGELOG.md) for the full list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motionary",
3
- "version": "9.8.0",
3
+ "version": "9.9.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",
@@ -1293,6 +1293,7 @@
1293
1293
  "usa-codemod-6": "./bin/usa-codemod-6.mjs",
1294
1294
  "usa-codemod-7": "./bin/usa-codemod-7.mjs",
1295
1295
  "usa-codemod-8": "./bin/usa-codemod-8.mjs",
1296
- "usa-codemod-9": "./bin/usa-codemod-9.mjs"
1296
+ "usa-codemod-9": "./bin/usa-codemod-9.mjs",
1297
+ "usa-codemod-10": "./bin/usa-codemod-10.mjs"
1297
1298
  }
1298
1299
  }