use-scroll-animate 9.0.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 +24 -0
- package/dist/components/fx-cinema.cjs +100 -0
- package/dist/components/fx-cinema.cjs.map +1 -0
- package/dist/components/fx-cinema.d.cts +70 -0
- package/dist/components/fx-cinema.d.ts +70 -0
- package/dist/components/fx-cinema.js +95 -0
- package/dist/components/fx-cinema.js.map +1 -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 +15 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +68 -1
- package/dist/components/fx2.d.ts +68 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/marketplace.cjs +2 -0
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.js +2 -0
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/widgets.cjs +545 -207
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +106 -2
- package/dist/components/widgets.d.ts +106 -2
- package/dist/components/widgets.js +542 -209
- 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 +2 -2
- package/docs/components.md +38 -0
- package/package.json +41 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
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
|
-
- **v9.1** — 电影化叙事 2.0:镜头语言(推拉摇移、景深切换、转场);新组件 章节导航。
|
|
6
|
-
- **v9.2** — Lottie / Rive 导入(JSON → 动效时间线);新组件 动画图标集。
|
|
5
|
+
- ✅ **v9.1** — 电影化叙事 2.0:镜头语言(推拉摇移、景深切换、转场);新组件 章节导航。
|
|
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
|
@@ -1167,6 +1167,44 @@ await installPlugin(searchPlugins('retro')[0], { load: () => import('motionary/f
|
|
|
1167
1167
|
- `<usa-motion rules>`: `parsed`, `errors`; `usa:motion-error` { message }.
|
|
1168
1168
|
- `<usa-plugin-store query label>`: `plugins`, `loader`, `search(q)`, `install(name)`; `usa:install` { name, effects }, `usa:install-error`.
|
|
1169
1169
|
|
|
1170
|
+
### v9.1 Storytelling 2.0: chapter nav, cinematic scene (`components/widgets`) + cinema pack (`motionary/fx/cinema`)
|
|
1171
|
+
|
|
1172
|
+
```html
|
|
1173
|
+
<usa-chapter-nav for="#story"></usa-chapter-nav>
|
|
1174
|
+
<article id="story">
|
|
1175
|
+
<section data-chapter="Prologue">…</section>
|
|
1176
|
+
<usa-scene camera="dolly-in" data-chapter="The harbor">
|
|
1177
|
+
<img src="harbor.jpg" alt="Harbor at dawn"><p data-caption data-at="0.4">Dawn, 1912.</p>
|
|
1178
|
+
</usa-scene>
|
|
1179
|
+
</article>
|
|
1180
|
+
|
|
1181
|
+
<usa-fx effect="letterbox" trigger="enter"><img src="scene.jpg" alt=""></usa-fx>
|
|
1182
|
+
```
|
|
1183
|
+
```js
|
|
1184
|
+
import { defineWidgets } from 'motionary/components/widgets';
|
|
1185
|
+
import { registerCinemaPack, cameraFrame } from 'motionary/fx/cinema';
|
|
1186
|
+
defineWidgets(); registerCinemaPack();
|
|
1187
|
+
nav.addEventListener('usa:chapter', (e) => console.log(e.detail.title));
|
|
1188
|
+
```
|
|
1189
|
+
- `<usa-chapter-nav for orientation label>`: `current`, `goTo(i)`; `usa:chapter` { index, title }.
|
|
1190
|
+
- `<usa-scene camera strength>`: `progress`, `setProgress(p)`; `usa:shot` { progress }.
|
|
1191
|
+
- Cinema: `dolly-in` · `pan-reveal` (`from`) · `letterbox` (`hold`) · `rack-focus`; `cameraFrame(move, p, strength?)`, `CAMERA_MOVES`.
|
|
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
|
+
|
|
1170
1208
|
## Frameworks
|
|
1171
1209
|
|
|
1172
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",
|
|
@@ -388,6 +388,26 @@
|
|
|
388
388
|
"default": "./dist/components/fx-spatial.cjs"
|
|
389
389
|
}
|
|
390
390
|
},
|
|
391
|
+
"./fx/cinema": {
|
|
392
|
+
"import": {
|
|
393
|
+
"types": "./dist/components/fx-cinema.d.ts",
|
|
394
|
+
"default": "./dist/components/fx-cinema.js"
|
|
395
|
+
},
|
|
396
|
+
"require": {
|
|
397
|
+
"types": "./dist/components/fx-cinema.d.cts",
|
|
398
|
+
"default": "./dist/components/fx-cinema.cjs"
|
|
399
|
+
}
|
|
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
|
+
},
|
|
391
411
|
"./components/reveal": {
|
|
392
412
|
"import": {
|
|
393
413
|
"types": "./dist/components/reveal.d.ts",
|
|
@@ -998,6 +1018,26 @@
|
|
|
998
1018
|
"default": "./dist/components/dsl.cjs"
|
|
999
1019
|
}
|
|
1000
1020
|
},
|
|
1021
|
+
"./components/fx-cinema": {
|
|
1022
|
+
"import": {
|
|
1023
|
+
"types": "./dist/components/fx-cinema.d.ts",
|
|
1024
|
+
"default": "./dist/components/fx-cinema.js"
|
|
1025
|
+
},
|
|
1026
|
+
"require": {
|
|
1027
|
+
"types": "./dist/components/fx-cinema.d.cts",
|
|
1028
|
+
"default": "./dist/components/fx-cinema.cjs"
|
|
1029
|
+
}
|
|
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
|
+
},
|
|
1001
1041
|
"./components/lite": {
|
|
1002
1042
|
"import": {
|
|
1003
1043
|
"types": "./dist/components/lite.d.ts",
|