use-scroll-animate 9.1.0 → 9.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/CHANGELOG.md +12 -0
- package/dist/components/fx-lottie.cjs +216 -0
- package/dist/components/fx-lottie.cjs.map +1 -0
- package/dist/components/fx-lottie.d.cts +88 -0
- package/dist/components/fx-lottie.d.ts +88 -0
- package/dist/components/fx-lottie.js +210 -0
- package/dist/components/fx-lottie.js.map +1 -0
- package/dist/components/fx2.cjs +8 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +44 -1
- package/dist/components/fx2.d.ts +44 -1
- package/dist/components/fx2.js +5 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/marketplace.cjs +1 -0
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.js +1 -0
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/widgets.cjs +351 -171
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +70 -2
- package/dist/components/widgets.d.ts +70 -2
- package/dist/components/widgets.js +349 -172
- package/dist/components/widgets.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +1 -1
- package/docs/components.md +15 -0
- package/package.json +21 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
9.0 已发布:声明式动效 DSL(`motionary/dsl` —— 用 `data-motion="enter: fade-up 600ms stagger 80ms; hover: pop"` 一行文本描述完整动效,或用 `<usa-motion>`)、插件市场正式版(`motionary/marketplace` —— 目录、搜索、一键安装,`<usa-plugin-store>`)、移除 8.9 弃用的 `applyTheme()` / `THEMES` / `THEME_NAMES` / `<usa-theme>`(改名为 Motion 前缀);`motionary` 与 `use-scroll-animate` 同时成为 npm `latest`。下面是 9.1 → 10.0 的计划,每个版本一个主题 + 一组新组件,9.9 负责 10.0 的弃用与迁移工具。
|
|
4
4
|
|
|
5
5
|
- ✅ **v9.1** — 电影化叙事 2.0:镜头语言(推拉摇移、景深切换、转场);新组件 章节导航。
|
|
6
|
-
- **v9.2** — Lottie / Rive 导入(JSON → 动效时间线);新组件 动画图标集。
|
|
6
|
+
- ✅ **v9.2** — Lottie / Rive 导入(JSON → 动效时间线);新组件 动画图标集。
|
|
7
7
|
- **v9.3** — 生成艺术 2.0:风格化着色器;新组件 背景生成器。
|
|
8
8
|
- **v9.4** — 视频动效:滚动驱动视频、帧序列;新组件 视频卡片、英雄视频。
|
|
9
9
|
- **v9.5** — 无障碍动效 2.0:更细的动效偏好分级;新组件 动效偏好面板。
|
package/docs/components.md
CHANGED
|
@@ -1190,6 +1190,21 @@ nav.addEventListener('usa:chapter', (e) => console.log(e.detail.title));
|
|
|
1190
1190
|
- `<usa-scene camera strength>`: `progress`, `setProgress(p)`; `usa:shot` { progress }.
|
|
1191
1191
|
- Cinema: `dolly-in` · `pan-reveal` (`from`) · `letterbox` (`hold`) · `rack-focus`; `cameraFrame(move, p, strength?)`, `CAMERA_MOVES`.
|
|
1192
1192
|
|
|
1193
|
+
### v9.2 Lottie / Rive import (`motionary/fx/lottie`): `<usa-lottie>`, `<usa-lottie-icon>`
|
|
1194
|
+
|
|
1195
|
+
```html
|
|
1196
|
+
<usa-lottie src="confetti.json" autoplay loop label="Celebration"></usa-lottie>
|
|
1197
|
+
<usa-lottie-icon name="heart" trigger="click" label="Like"></usa-lottie-icon>
|
|
1198
|
+
```
|
|
1199
|
+
```js
|
|
1200
|
+
import { lottieToKeyframes, riveInputs } from 'motionary/fx/lottie';
|
|
1201
|
+
const { duration, layers } = lottieToKeyframes(json); // WAAPI keyframes per layer
|
|
1202
|
+
riveInputs(riveInstance, 'State Machine 1', button, { hover: 'isHover', click: 'press' });
|
|
1203
|
+
```
|
|
1204
|
+
- `<usa-lottie src json autoplay loop speed label>`: `play()`, `pause()`, `stop()`, `parsed`; `usa:load`, `usa:complete`.
|
|
1205
|
+
- `<usa-lottie-icon name trigger size color label>`: `play()`; `LOTTIE_ICONS`.
|
|
1206
|
+
- Effects: `lottie-play`, `icon-pop` (`color`).
|
|
1207
|
+
|
|
1193
1208
|
## Frameworks
|
|
1194
1209
|
|
|
1195
1210
|
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.
|
|
3
|
+
"version": "9.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",
|
|
@@ -398,6 +398,16 @@
|
|
|
398
398
|
"default": "./dist/components/fx-cinema.cjs"
|
|
399
399
|
}
|
|
400
400
|
},
|
|
401
|
+
"./fx/lottie": {
|
|
402
|
+
"import": {
|
|
403
|
+
"types": "./dist/components/fx-lottie.d.ts",
|
|
404
|
+
"default": "./dist/components/fx-lottie.js"
|
|
405
|
+
},
|
|
406
|
+
"require": {
|
|
407
|
+
"types": "./dist/components/fx-lottie.d.cts",
|
|
408
|
+
"default": "./dist/components/fx-lottie.cjs"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
401
411
|
"./components/reveal": {
|
|
402
412
|
"import": {
|
|
403
413
|
"types": "./dist/components/reveal.d.ts",
|
|
@@ -1018,6 +1028,16 @@
|
|
|
1018
1028
|
"default": "./dist/components/fx-cinema.cjs"
|
|
1019
1029
|
}
|
|
1020
1030
|
},
|
|
1031
|
+
"./components/fx-lottie": {
|
|
1032
|
+
"import": {
|
|
1033
|
+
"types": "./dist/components/fx-lottie.d.ts",
|
|
1034
|
+
"default": "./dist/components/fx-lottie.js"
|
|
1035
|
+
},
|
|
1036
|
+
"require": {
|
|
1037
|
+
"types": "./dist/components/fx-lottie.d.cts",
|
|
1038
|
+
"default": "./dist/components/fx-lottie.cjs"
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1021
1041
|
"./components/lite": {
|
|
1022
1042
|
"import": {
|
|
1023
1043
|
"types": "./dist/components/lite.d.ts",
|