use-scroll-animate 8.8.0 → 8.9.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
@@ -10,7 +10,7 @@
10
10
  - ✅ **v8.6** — 霓虹 / 玻璃 / 新拟态主题系统;新组件 主题切换器。
11
11
  - ✅ **v8.7** — 手势 3.0:多点触控、陀螺仪;新组件 陀螺仪 3D 卡片。
12
12
  - ✅ **v8.8** — XR / 空间界面:WebXR 预览、空间卡片;新组件 全景查看器。
13
- - **v8.9** — 9.0 预备:9.0 弃用警告、`upgrading-9.md` 与 `usa-codemod-9`;低代码组件导出。
13
+ - ✅ **v8.9** — 9.0 预备:9.0 弃用警告、`upgrading-9.md` 与 `usa-codemod-9`;低代码组件导出。
14
14
  - **v9.0** — 声明式动效 DSL(用一段文本描述完整动效)、插件市场正式版;移除 8.9 弃用项;npm `latest`。
15
15
 
16
16
  之后的方向(9.1 → 10.0):电影化叙事 2.0、Lottie / Rive 导入、生成艺术 2.0、视频动效、无障碍动效 2.0、性能 3.0(OffscreenCanvas / Worker)、设计工具集成、原生 2.0;10.0 目标是零依赖核心 < 10 KB、所有特效插件化、默认 WebGPU。
@@ -1131,6 +1131,22 @@ pano.addEventListener('usa:look', (e) => console.log(e.detail.yaw));
1131
1131
  - `<usa-spatial-card>`: `active`; `usa:focus-depth`.
1132
1132
  - Spatial: `portal-open` (`color`) · `orbit-in` (`from`) · `spatial-float` · `depth-pop`; `yawToOffset(yaw, width)`, `xrSupport()`.
1133
1133
 
1134
+ ### v8.9 Low-code export: `exportComponent()`, `<usa-code-export>`, `<usa-prop-panel>` (`components/widgets`)
1135
+
1136
+ ```html
1137
+ <usa-star-rating id="r" value="3"></usa-star-rating>
1138
+ <usa-prop-panel for="#r" props="value:number:0:5, icon:select:star|heart, readonly:boolean"></usa-prop-panel>
1139
+ <usa-code-export for="#r" formats="html,react,vue,json"></usa-code-export>
1140
+ ```
1141
+ ```js
1142
+ import { defineWidgets, exportComponent, describeComponent } from 'motionary/components/widgets';
1143
+ defineWidgets();
1144
+ console.log(exportComponent(document.querySelector('#r'), 'react'));
1145
+ ```
1146
+ - `<usa-code-export for formats>`: `format`, `code`, `copy()`; `usa:copy` { format, ok }.
1147
+ - `<usa-prop-panel for props label>`: `props`, `reset()`; `usa:prop` { name, value }; `parseProps(str)`.
1148
+ - 9.0 prep: `applyTheme` / `THEMES` / `THEME_NAMES` / `<usa-theme>` are deprecated → `applyMotionTheme` / `MOTION_THEMES` / `MOTION_THEME_NAMES` / `<usa-motion-theme>` (`npx usa-codemod-9 --write src`, see docs/upgrading-9.md).
1149
+
1134
1150
  ## Frameworks
1135
1151
 
1136
1152
  Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
@@ -1,5 +1,9 @@
1
1
  # Deprecations
2
2
 
3
+ ## Deprecated in 8.9, removed in 9.0
4
+
5
+ See [upgrading-9.md](./upgrading-9.md) — the 5.8 motion-theme names `applyTheme()`, `THEMES`, `THEME_NAMES`, `<usa-theme>` / `defineTheme()` (use `applyMotionTheme()`, `MOTION_THEMES`, `MOTION_THEME_NAMES`, `<usa-motion-theme>` / `defineMotionTheme()`; same behaviour). Run `npx usa-codemod-9 --write src`.
6
+
3
7
  ## Deprecated in 7.9, removed in 8.0 (released)
4
8
 
5
9
  See [upgrading-8.md](./upgrading-8.md) — `<usa-rating>` / `defineRating()` (use `<usa-star-rating>` / `defineStarRating()`; same `value`, `max`, `readonly`, `label`, `name`; `icon="♥"` → `icon="heart"`). Run `npx usa-codemod-8 --write src`.
@@ -0,0 +1,27 @@
1
+ # Upgrading to 9.0
2
+
3
+ 9.0.0 is the next major. 8.9 **warns once in the console** for everything below, and a codemod rewrites it:
4
+
5
+ ```sh
6
+ npx usa-codemod-9 src # dry run: lists every change (and what needs a manual edit)
7
+ npx usa-codemod-9 --write src # apply
8
+ ```
9
+
10
+ ## Removed in 9.0 (deprecated in 8.9)
11
+
12
+ 8.6 added *surface* themes (`applySurfaceTheme`, `SURFACE_THEMES`, `data-usa-surface`). To keep them apart from the 5.8 *motion* themes, the 5.8 names get a `Motion` prefix:
13
+
14
+ | 8.x | 9.0 | Codemod |
15
+ |---|---|---|
16
+ | `applyTheme(name, root?)` | `applyMotionTheme(name, root?)` (same signature, returns the undo) | ✅ |
17
+ | `THEMES` / `THEME_NAMES` | `MOTION_THEMES` / `MOTION_THEME_NAMES` | ✅ |
18
+ | `<usa-theme name="neon">` | `<usa-motion-theme name="neon">` (same `data-theme-fx` bindings) | ✅ tags |
19
+ | `defineTheme()` | `defineMotionTheme()` | ⚠️ manual |
20
+
21
+ `document.createElement('usa-theme')` and CSS selectors on `usa-theme` are reported for a manual edit. `themeVars`, `themeCss`, `themePreset`, `playThemeEffect`, `THEME_ROLES` and the `data-usa-theme` attribute are unchanged.
22
+
23
+ ## New in 8.9 (before the break)
24
+
25
+ - **Low-code export.** `exportComponent(el, 'html' | 'react' | 'vue' | 'json')` turns any live, configured component into copy-paste code (runtime parts stripped); `describeComponent(el)` gives the portable JSON. `<usa-code-export>` shows it in tabs with a copy button and follows attribute changes; `<usa-prop-panel for="#el" props="…">` edits a live component's attributes with typed fields.
26
+
27
+ See the [CHANGELOG](../CHANGELOG.md) for the full list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-scroll-animate",
3
- "version": "8.8.0",
3
+ "version": "8.9.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",
@@ -1101,6 +1101,7 @@
1101
1101
  "usa-codemod-5": "./bin/usa-codemod-5.mjs",
1102
1102
  "usa-codemod-6": "./bin/usa-codemod-6.mjs",
1103
1103
  "usa-codemod-7": "./bin/usa-codemod-7.mjs",
1104
- "usa-codemod-8": "./bin/usa-codemod-8.mjs"
1104
+ "usa-codemod-8": "./bin/usa-codemod-8.mjs",
1105
+ "usa-codemod-9": "./bin/usa-codemod-9.mjs"
1105
1106
  }
1106
1107
  }