use-scroll-animate 8.5.0 → 8.7.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 +33 -0
- package/dist/components/fx-gesture.cjs +111 -0
- package/dist/components/fx-gesture.cjs.map +1 -0
- package/dist/components/fx-gesture.d.cts +75 -0
- package/dist/components/fx-gesture.d.ts +75 -0
- package/dist/components/fx-gesture.js +105 -0
- package/dist/components/fx-gesture.js.map +1 -0
- package/dist/components/fx-surface.cjs +89 -0
- package/dist/components/fx-surface.cjs.map +1 -0
- package/dist/components/fx-surface.d.cts +70 -0
- package/dist/components/fx-surface.d.ts +70 -0
- package/dist/components/fx-surface.js +84 -0
- package/dist/components/fx-surface.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 +57 -1
- package/dist/components/fx2.d.ts +57 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +531 -148
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +72 -2
- package/dist/components/widgets.d.ts +72 -2
- package/dist/components/widgets.js +528 -149
- 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 +40 -0
- package/package.json +41 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
- ✅ **v8.3** — 自然有机:水波涟漪、藤蔓生长、花朵绽放;新组件 有机卡片、液态导航。
|
|
8
8
|
- ✅ **v8.4** — 赛博 / 科幻:HUD 线框、扫描线、全息投影;新组件 HUD 面板、雷达扫描。
|
|
9
9
|
- ✅ **v8.5** — 纸张与手绘:折纸、铅笔素描、水彩晕染;新组件 便利贴墙、手绘图表。
|
|
10
|
-
- **v8.6** — 霓虹 / 玻璃 / 新拟态主题系统;新组件 主题切换器。
|
|
11
|
-
- **v8.7** — 手势 3.0:多点触控、陀螺仪;新组件 陀螺仪 3D 卡片。
|
|
10
|
+
- ✅ **v8.6** — 霓虹 / 玻璃 / 新拟态主题系统;新组件 主题切换器。
|
|
11
|
+
- ✅ **v8.7** — 手势 3.0:多点触控、陀螺仪;新组件 陀螺仪 3D 卡片。
|
|
12
12
|
- **v8.8** — XR / 空间界面:WebXR 预览、空间卡片;新组件 全景查看器。
|
|
13
13
|
- **v8.9** — 9.0 预备:9.0 弃用警告、`upgrading-9.md` 与 `usa-codemod-9`;低代码组件导出。
|
|
14
14
|
- **v9.0** — 声明式动效 DSL(用一段文本描述完整动效)、插件市场正式版;移除 8.9 弃用项;npm `latest`。
|
package/docs/components.md
CHANGED
|
@@ -1068,6 +1068,46 @@ wall.addEventListener('usa:pick', (e) => console.log(e.detail.index));
|
|
|
1068
1068
|
- `<usa-sketch-chart values labels type color label>`: `values`, `setValues(list)`; `usa:drawn`.
|
|
1069
1069
|
- Paper: `paper-unfold` (`folds`) · `pencil-sketch` (`stagger`) · `watercolor` · `crumple`; `roughLine(x1, y1, x2, y2, seed, amp)`, `paperRandom(seed)`.
|
|
1070
1070
|
|
|
1071
|
+
### v8.6 Theme system: theme switcher, theme surface (`components/widgets`) + surface pack (`motionary/fx/surface`)
|
|
1072
|
+
|
|
1073
|
+
```html
|
|
1074
|
+
<usa-theme-switcher themes="light,dark,neon,glass,neu" persist></usa-theme-switcher>
|
|
1075
|
+
<usa-theme-surface><h3>Follows the page theme</h3></usa-theme-surface>
|
|
1076
|
+
<usa-theme-surface theme="glass"><h3>Always glass</h3></usa-theme-surface>
|
|
1077
|
+
|
|
1078
|
+
<usa-fx effect="neon-ignite" trigger="enter" color="#f0abfc"><h2>OPEN</h2></usa-fx>
|
|
1079
|
+
<usa-fx effect="neu-press" trigger="click"><button class="neu">Press</button></usa-fx>
|
|
1080
|
+
```
|
|
1081
|
+
```js
|
|
1082
|
+
import { defineWidgets } from 'motionary/components/widgets';
|
|
1083
|
+
import { registerSurfacePack, applySurfaceTheme } from 'motionary/fx/surface';
|
|
1084
|
+
defineWidgets(); registerSurfacePack();
|
|
1085
|
+
applySurfaceTheme('neon'); // <html data-usa-surface="neon">
|
|
1086
|
+
switcher.addEventListener('usa:change', (e) => console.log(e.detail.theme));
|
|
1087
|
+
```
|
|
1088
|
+
- `<usa-theme-switcher themes target value persist label>`: `value`; `usa:change` { theme }.
|
|
1089
|
+
- `<usa-theme-surface theme>`: `theme` (resolved); `usa:theme` { theme }.
|
|
1090
|
+
- Surface: `neon-ignite` · `neon-pulse` (`color`) · `glass-frost` · `neu-press`; `SURFACE_THEMES`, `applySurfaceTheme(name, target?)`.
|
|
1091
|
+
|
|
1092
|
+
### v8.7 Gestures 3.0: gyro 3D card, multi-touch sticker (`components/widgets`) + gesture pack (`motionary/fx/gesture`)
|
|
1093
|
+
|
|
1094
|
+
```html
|
|
1095
|
+
<usa-gyro-card max="15"><h3 data-depth="2">Gyro</h3><p data-depth="1">Tilt your phone</p></usa-gyro-card>
|
|
1096
|
+
<usa-gesture-sticker label="Star" max="3"><img src="star.png" alt="Star" width="120"></usa-gesture-sticker>
|
|
1097
|
+
|
|
1098
|
+
<usa-fx effect="swipe-hint" trigger="enter" direction="left"><div class="card">…</div></usa-fx>
|
|
1099
|
+
<usa-fx effect="depth-in" trigger="enter"><div data-depth="3">Back</div><div data-depth="1">Front</div></usa-fx>
|
|
1100
|
+
```
|
|
1101
|
+
```js
|
|
1102
|
+
import { defineWidgets } from 'motionary/components/widgets';
|
|
1103
|
+
import { registerGesture3Pack, pinchScale, pinchAngle } from 'motionary/fx/gesture';
|
|
1104
|
+
defineWidgets(); registerGesture3Pack();
|
|
1105
|
+
sticker.addEventListener('usa:transform', (e) => save(e.detail)); // { x, y, scale, angle }
|
|
1106
|
+
```
|
|
1107
|
+
- `<usa-gyro-card max glare>`: `tilt(rx, ry, source?)`, `source`; `usa:tilt`.
|
|
1108
|
+
- `<usa-gesture-sticker min max label>`: `x`, `y`, `scale`, `angle`, `transformTo(state)`, `reset()`; `usa:transform`.
|
|
1109
|
+
- Gesture: `swipe-hint` (`direction`) · `pinch-hint` · `tilt-wobble` · `depth-in` (`stagger`, `data-depth`); `pinchScale`, `pinchAngle`, `orientationToTilt(beta, gamma, max?, rest?)`.
|
|
1110
|
+
|
|
1071
1111
|
## Frameworks
|
|
1072
1112
|
|
|
1073
1113
|
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": "8.
|
|
3
|
+
"version": "8.7.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",
|
|
@@ -338,6 +338,26 @@
|
|
|
338
338
|
"default": "./dist/components/fx-paper.cjs"
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
|
+
"./fx/surface": {
|
|
342
|
+
"import": {
|
|
343
|
+
"types": "./dist/components/fx-surface.d.ts",
|
|
344
|
+
"default": "./dist/components/fx-surface.js"
|
|
345
|
+
},
|
|
346
|
+
"require": {
|
|
347
|
+
"types": "./dist/components/fx-surface.d.cts",
|
|
348
|
+
"default": "./dist/components/fx-surface.cjs"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"./fx/gesture": {
|
|
352
|
+
"import": {
|
|
353
|
+
"types": "./dist/components/fx-gesture.d.ts",
|
|
354
|
+
"default": "./dist/components/fx-gesture.js"
|
|
355
|
+
},
|
|
356
|
+
"require": {
|
|
357
|
+
"types": "./dist/components/fx-gesture.d.cts",
|
|
358
|
+
"default": "./dist/components/fx-gesture.cjs"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
341
361
|
"./components/reveal": {
|
|
342
362
|
"import": {
|
|
343
363
|
"types": "./dist/components/reveal.d.ts",
|
|
@@ -908,6 +928,26 @@
|
|
|
908
928
|
"default": "./dist/components/fx-paper.cjs"
|
|
909
929
|
}
|
|
910
930
|
},
|
|
931
|
+
"./components/fx-surface": {
|
|
932
|
+
"import": {
|
|
933
|
+
"types": "./dist/components/fx-surface.d.ts",
|
|
934
|
+
"default": "./dist/components/fx-surface.js"
|
|
935
|
+
},
|
|
936
|
+
"require": {
|
|
937
|
+
"types": "./dist/components/fx-surface.d.cts",
|
|
938
|
+
"default": "./dist/components/fx-surface.cjs"
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
"./components/fx-gesture": {
|
|
942
|
+
"import": {
|
|
943
|
+
"types": "./dist/components/fx-gesture.d.ts",
|
|
944
|
+
"default": "./dist/components/fx-gesture.js"
|
|
945
|
+
},
|
|
946
|
+
"require": {
|
|
947
|
+
"types": "./dist/components/fx-gesture.d.cts",
|
|
948
|
+
"default": "./dist/components/fx-gesture.cjs"
|
|
949
|
+
}
|
|
950
|
+
},
|
|
911
951
|
"./components/lite": {
|
|
912
952
|
"import": {
|
|
913
953
|
"types": "./dist/components/lite.d.ts",
|