use-scroll-animate 9.2.0 → 9.4.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
@@ -4,8 +4,8 @@
4
4
 
5
5
  - ✅ **v9.1** — 电影化叙事 2.0:镜头语言(推拉摇移、景深切换、转场);新组件 章节导航。
6
6
  - ✅ **v9.2** — Lottie / Rive 导入(JSON → 动效时间线);新组件 动画图标集。
7
- - **v9.3** — 生成艺术 2.0:风格化着色器;新组件 背景生成器。
8
- - **v9.4** — 视频动效:滚动驱动视频、帧序列;新组件 视频卡片、英雄视频。
7
+ - ✅ **v9.3** — 生成艺术 2.0:风格化着色器;新组件 背景生成器。
8
+ - ✅ **v9.4** — 视频动效:滚动驱动视频、帧序列;新组件 视频卡片、英雄视频。
9
9
  - **v9.5** — 无障碍动效 2.0:更细的动效偏好分级;新组件 动效偏好面板。
10
10
  - **v9.6** — 性能 3.0:OffscreenCanvas、Worker 渲染;新组件 性能监视器。
11
11
  - **v9.7** — 设计工具集成:Figma 插件脚手架、Framer 导出。
@@ -1205,6 +1205,40 @@ riveInputs(riveInstance, 'State Machine 1', button, { hover: 'isHover', click: '
1205
1205
  - `<usa-lottie-icon name trigger size color label>`: `play()`; `LOTTIE_ICONS`.
1206
1206
  - Effects: `lottie-play`, `icon-pop` (`color`).
1207
1207
 
1208
+ ### v9.3 Generative art 2.0: `<usa-gen-art>`, `<usa-bg-generator>` + genart pack (`motionary/fx/genart`)
1209
+
1210
+ ```html
1211
+ <usa-gen-art art="flow" seed="7" palette="ocean" style="height:240px"></usa-gen-art>
1212
+ <usa-bg-generator palette="candy"></usa-bg-generator>
1213
+ <usa-fx effect="mesh-drift" trigger="loop" seed="4" palette="ocean"><section class="hero">…</section></usa-fx>
1214
+ ```
1215
+ ```js
1216
+ import { registerGenArtPack, meshGradient } from 'motionary/fx/genart';
1217
+ registerGenArtPack();
1218
+ hero.style.background = meshGradient(42, 'forest');
1219
+ ```
1220
+ - `<usa-gen-art art seed palette label>`: `generate(seed?)`, `toDataURL()`; `usa:generate`.
1221
+ - `<usa-bg-generator palette style seed label>`: `css`, `shuffle()`, `copy()`; `usa:change`; `backgroundCss(style, seed, palette)`.
1222
+ - Genart: `halftone-in` (`dot`) · `mesh-drift` (`seed`, `palette`) · `kaleido` (`color`, `segments`) · `grain-flicker` (`opacity`); `PALETTES`, `seededRandom`, `meshGradient`.
1223
+
1224
+ ### v9.4 Video motion (`motionary/fx/video`): `<usa-video-card>`, `<usa-hero-video>`
1225
+
1226
+ ```html
1227
+ <usa-hero-video label="Welcome" poster="poster.jpg">
1228
+ <video src="hero.mp4" autoplay muted loop playsinline></video>
1229
+ <h1>Motion, declared.</h1>
1230
+ </usa-hero-video>
1231
+ <usa-video-card duration="2:41"><img src="poster.jpg" alt=""><video src="preview.mp4"></video><h3>Making of</h3></usa-video-card>
1232
+ ```
1233
+ ```js
1234
+ import { scrubVideo, frameSequence } from 'motionary/fx/video';
1235
+ scrubVideo(document.querySelector('#product-video'), document.querySelector('#product'));
1236
+ frameSequence(canvas, { count: 120, src: (i) => `/frames/${String(i).padStart(4, '0')}.webp` }, section);
1237
+ ```
1238
+ - `<usa-video-card duration label>`: `previewing`; `usa:open` { src }.
1239
+ - `<usa-hero-video label poster scrub>`: `paused`, `toggle()`; `usa:play`, `usa:pause`.
1240
+ - Video: `scrubVideo`, `frameSequence`, `scrollProgress`; effects `film-burn` (`color`), `jump-cut`.
1241
+
1208
1242
  ## Frameworks
1209
1243
 
1210
1244
  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": "9.2.0",
3
+ "version": "9.4.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",
@@ -408,6 +408,26 @@
408
408
  "default": "./dist/components/fx-lottie.cjs"
409
409
  }
410
410
  },
411
+ "./fx/genart": {
412
+ "import": {
413
+ "types": "./dist/components/fx-genart.d.ts",
414
+ "default": "./dist/components/fx-genart.js"
415
+ },
416
+ "require": {
417
+ "types": "./dist/components/fx-genart.d.cts",
418
+ "default": "./dist/components/fx-genart.cjs"
419
+ }
420
+ },
421
+ "./fx/video": {
422
+ "import": {
423
+ "types": "./dist/components/fx-video.d.ts",
424
+ "default": "./dist/components/fx-video.js"
425
+ },
426
+ "require": {
427
+ "types": "./dist/components/fx-video.d.cts",
428
+ "default": "./dist/components/fx-video.cjs"
429
+ }
430
+ },
411
431
  "./components/reveal": {
412
432
  "import": {
413
433
  "types": "./dist/components/reveal.d.ts",
@@ -1038,6 +1058,26 @@
1038
1058
  "default": "./dist/components/fx-lottie.cjs"
1039
1059
  }
1040
1060
  },
1061
+ "./components/fx-genart": {
1062
+ "import": {
1063
+ "types": "./dist/components/fx-genart.d.ts",
1064
+ "default": "./dist/components/fx-genart.js"
1065
+ },
1066
+ "require": {
1067
+ "types": "./dist/components/fx-genart.d.cts",
1068
+ "default": "./dist/components/fx-genart.cjs"
1069
+ }
1070
+ },
1071
+ "./components/fx-video": {
1072
+ "import": {
1073
+ "types": "./dist/components/fx-video.d.ts",
1074
+ "default": "./dist/components/fx-video.js"
1075
+ },
1076
+ "require": {
1077
+ "types": "./dist/components/fx-video.d.cts",
1078
+ "default": "./dist/components/fx-video.cjs"
1079
+ }
1080
+ },
1041
1081
  "./components/lite": {
1042
1082
  "import": {
1043
1083
  "types": "./dist/components/lite.d.ts",