use-scroll-animate 9.0.0 → 9.1.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,7 +2,7 @@
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:镜头语言(推拉摇移、景深切换、转场);新组件 章节导航。
5
+ - ✅ **v9.1** — 电影化叙事 2.0:镜头语言(推拉摇移、景深切换、转场);新组件 章节导航。
6
6
  - **v9.2** — Lottie / Rive 导入(JSON → 动效时间线);新组件 动画图标集。
7
7
  - **v9.3** — 生成艺术 2.0:风格化着色器;新组件 背景生成器。
8
8
  - **v9.4** — 视频动效:滚动驱动视频、帧序列;新组件 视频卡片、英雄视频。
@@ -1167,6 +1167,29 @@ 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
+
1170
1193
  ## Frameworks
1171
1194
 
1172
1195
  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.0.0",
3
+ "version": "9.1.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,16 @@
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
+ },
391
401
  "./components/reveal": {
392
402
  "import": {
393
403
  "types": "./dist/components/reveal.d.ts",
@@ -998,6 +1008,16 @@
998
1008
  "default": "./dist/components/dsl.cjs"
999
1009
  }
1000
1010
  },
1011
+ "./components/fx-cinema": {
1012
+ "import": {
1013
+ "types": "./dist/components/fx-cinema.d.ts",
1014
+ "default": "./dist/components/fx-cinema.js"
1015
+ },
1016
+ "require": {
1017
+ "types": "./dist/components/fx-cinema.d.cts",
1018
+ "default": "./dist/components/fx-cinema.cjs"
1019
+ }
1020
+ },
1001
1021
  "./components/lite": {
1002
1022
  "import": {
1003
1023
  "types": "./dist/components/lite.d.ts",