use-scroll-animate 8.0.0 → 8.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.
package/docs/ROADMAP.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  8.0 已发布:统一时间线引擎(`motionary/engine` —— 所有组件、特效与帧循环共享一个时钟,可整体暂停、变速、编排)、SSR 水合动画(`ssrHead()` + `hydrateMotion()` / `<usa-hydrate>`)、移除 7.9 弃用的 `<usa-rating>`;`motionary` 与 `use-scroll-animate` 同时成为 npm `latest`。下面是 8.1 → 9.0 的计划,每个版本一个特效主题 + 一组新的动画组件,x.9 版本负责下一个大版本的弃用与迁移工具。
4
4
 
5
- - **v8.1** — 节日特效包:烟花、新春(灯笼、福字、鞭炮)、圣诞飘雪、万圣节;新组件 节日横幅、红包。
6
- - **v8.2** — 复古风:像素化、CRT 显示器、VHS 噪点、Y2K;新组件 复古按钮、终端窗口。
5
+ - ✅ **v8.1** — 节日特效包:烟花、新春(灯笼、福字、鞭炮)、圣诞飘雪、万圣节;新组件 节日横幅、红包。
6
+ - ✅ **v8.2** — 复古风:像素化、CRT 显示器、VHS 噪点、Y2K;新组件 复古按钮、终端窗口。
7
7
  - **v8.3** — 自然有机:水波涟漪、藤蔓生长、花朵绽放;新组件 有机卡片、液态导航。
8
8
  - **v8.4** — 赛博 / 科幻:HUD 线框、扫描线、全息投影;新组件 HUD 面板、雷达扫描。
9
9
  - **v8.5** — 纸张与手绘:折纸、铅笔素描、水彩晕染;新组件 便利贴墙、手绘图表。
@@ -961,6 +961,48 @@ hydrateMotion(document, { stagger: 60 });
961
961
  - `hydrateMotion(root, { stagger, duration, preset, easing })` → timeline; `ssrHead(nonce)`, `HYDRATION_CSS`, `HYDRATE_PRESETS`.
962
962
  - `<usa-clock-control speeds label>`: `rate`, `paused`; `usa:change`. `<usa-hydrate effect stagger duration>`: `replay()`, `timeline`; `usa:hydrated`.
963
963
 
964
+ ### v8.1 Widgets: red envelope, festival banner (`components/widgets`) + festival packs (`motionary/fx/festival`)
965
+
966
+ ```html
967
+ <usa-red-envelope amount="88.88" from="Grandma" message="恭喜发财"></usa-red-envelope>
968
+ <usa-festival-banner theme="lunar" dismissible>🧧 Happy Lunar New Year — 20% off all week</usa-festival-banner>
969
+
970
+ <usa-fx effect="firework-burst" trigger="click"><button>Celebrate</button></usa-fx>
971
+ <usa-fx effect="xmas-snow" trigger="loop"><div class="card">Season’s greetings</div></usa-fx>
972
+ ```
973
+ ```js
974
+ import { defineWidgets } from 'motionary/components/widgets';
975
+ import { registerFestivalPack } from 'motionary/fx/festival';
976
+ defineWidgets(); registerFestivalPack();
977
+ envelope.addEventListener('usa:open', (e) => console.log(e.detail.amount));
978
+ ```
979
+ - `<usa-red-envelope amount currency message from opened>`: `open()`, `close()`, `opened`; `usa:open` { amount }.
980
+ - `<usa-festival-banner theme label dismissible>`: `theme`, `dismiss()`; `usa:dismiss`; `FESTIVAL_THEMES`.
981
+ - Festival: `firework-burst` (`bursts`, `colors`) · `lantern-rise` (`sway`) · `xmas-snow` (`flakes`) · `spooky-float` (`cycles`); `sparkVectors(n, radius, seed)`.
982
+
983
+ ### v8.2 Widgets: terminal, retro buttons (`components/widgets`) + retro pack (`motionary/fx/retro`)
984
+
985
+ ```html
986
+ <usa-terminal title="zsh" theme="green">
987
+ <p data-cmd>npm i motionary</p>
988
+ <p>added 1 package in 2s</p>
989
+ </usa-terminal>
990
+ <usa-retro-button variant="pixel">Start</usa-retro-button>
991
+ <usa-retro-button variant="win95">OK</usa-retro-button>
992
+
993
+ <usa-fx effect="crt-power" trigger="enter"><img src="screen.png" alt=""></usa-fx>
994
+ <usa-fx effect="vhs-glitch" trigger="hover"><h2>REWIND</h2></usa-fx>
995
+ ```
996
+ ```js
997
+ import { defineWidgets } from 'motionary/components/widgets';
998
+ import { registerRetroPack } from 'motionary/fx/retro';
999
+ defineWidgets(); registerRetroPack();
1000
+ term.addEventListener('usa:done', () => term.replay());
1001
+ ```
1002
+ - `<usa-terminal title prompt theme speed loop>`: `replay()`, `skip()`; `usa:done`.
1003
+ - `<usa-retro-button variant type disabled name value>`: `button`, `variant`; `RETRO_VARIANTS`.
1004
+ - Retro: `pixelate-in` (`steps`) · `crt-power` · `vhs-glitch` (`intensity`) · `y2k-shine` (`color`); `pixelSteps(steps)`.
1005
+
964
1006
  ## Frameworks
965
1007
 
966
1008
  Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-scroll-animate",
3
- "version": "8.0.0",
3
+ "version": "8.2.0",
4
4
  "description": "Compatibility alias of motionary (same build). The project was renamed to Motionary — install `motionary` instead. 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",
@@ -288,6 +288,26 @@
288
288
  "default": "./dist/components/fx-ai.cjs"
289
289
  }
290
290
  },
291
+ "./fx/festival": {
292
+ "import": {
293
+ "types": "./dist/components/fx-festival.d.ts",
294
+ "default": "./dist/components/fx-festival.js"
295
+ },
296
+ "require": {
297
+ "types": "./dist/components/fx-festival.d.cts",
298
+ "default": "./dist/components/fx-festival.cjs"
299
+ }
300
+ },
301
+ "./fx/retro": {
302
+ "import": {
303
+ "types": "./dist/components/fx-retro.d.ts",
304
+ "default": "./dist/components/fx-retro.js"
305
+ },
306
+ "require": {
307
+ "types": "./dist/components/fx-retro.d.cts",
308
+ "default": "./dist/components/fx-retro.cjs"
309
+ }
310
+ },
291
311
  "./components/reveal": {
292
312
  "import": {
293
313
  "types": "./dist/components/reveal.d.ts",
@@ -808,6 +828,26 @@
808
828
  "default": "./dist/components/engine.cjs"
809
829
  }
810
830
  },
831
+ "./components/fx-festival": {
832
+ "import": {
833
+ "types": "./dist/components/fx-festival.d.ts",
834
+ "default": "./dist/components/fx-festival.js"
835
+ },
836
+ "require": {
837
+ "types": "./dist/components/fx-festival.d.cts",
838
+ "default": "./dist/components/fx-festival.cjs"
839
+ }
840
+ },
841
+ "./components/fx-retro": {
842
+ "import": {
843
+ "types": "./dist/components/fx-retro.d.ts",
844
+ "default": "./dist/components/fx-retro.js"
845
+ },
846
+ "require": {
847
+ "types": "./dist/components/fx-retro.d.cts",
848
+ "default": "./dist/components/fx-retro.cjs"
849
+ }
850
+ },
811
851
  "./components/lite": {
812
852
  "import": {
813
853
  "types": "./dist/components/lite.d.ts",