use-scroll-animate 7.5.0 → 7.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 +27 -0
- package/dist/components/fx-form.cjs +92 -0
- package/dist/components/fx-form.cjs.map +1 -0
- package/dist/components/fx-form.d.cts +66 -0
- package/dist/components/fx-form.d.ts +66 -0
- package/dist/components/fx-form.js +88 -0
- package/dist/components/fx-form.js.map +1 -0
- package/dist/components/fx-geo.cjs +125 -0
- package/dist/components/fx-geo.cjs.map +1 -0
- package/dist/components/fx-geo.d.cts +70 -0
- package/dist/components/fx-geo.d.ts +70 -0
- package/dist/components/fx-geo.js +121 -0
- package/dist/components/fx-geo.js.map +1 -0
- package/dist/components/fx2.cjs +12 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +49 -1
- package/dist/components/fx2.d.ts +49 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +703 -103
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +116 -2
- package/dist/components/widgets.d.ts +116 -2
- package/dist/components/widgets.js +693 -105
- 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 +44 -0
- package/package.json +41 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
- ✅ **v7.3** — 电商动效:飞入购物车、价格翻牌、库存脉冲、优惠券撕开;新组件 购物车抽屉、商品图库、限时倒计时。
|
|
8
8
|
- ✅ **v7.4** — 聊天 / 社交:输入中气泡、表情回应飘升、已读回执、消息撤回;新组件 消息列表、头像叠放、通知铃铛。
|
|
9
9
|
- ✅ **v7.5** — 游戏化:成就解锁、经验条、宝箱开启、幸运转盘;新组件 排行榜、徽章墙、抽奖机。
|
|
10
|
-
- **v7.6** — 地图与地理:路线绘制、旋转地球、标记脉冲、飞线;新组件 3D 地球、位置卡片。
|
|
11
|
-
- **v7.7** — 表单动效:抖动校验、浮动标签、密码强度、成功勾选;新组件 动效输入框、验证码(OTP)输入、上传进度。
|
|
10
|
+
- ✅ **v7.6** — 地图与地理:路线绘制、旋转地球、标记脉冲、飞线;新组件 3D 地球、位置卡片。
|
|
11
|
+
- ✅ **v7.7** — 表单动效:抖动校验、浮动标签、密码强度、成功勾选;新组件 动效输入框、验证码(OTP)输入、上传进度。
|
|
12
12
|
- **v7.8** — AI 界面:流式文字、思考光晕、语音波形、生成骨架;新组件 对话输入框、建议标签(Chips)、语音按钮。
|
|
13
13
|
- **v7.9** — 8.0 预备:8.0 弃用警告、`upgrading-8.md` 与 `usa-codemod-8`;新组件 命令面板(⌘K)、快捷键提示。
|
|
14
14
|
- **v8.0** — 统一时间线引擎(所有组件与特效共享一个时钟)、SSR 水合动画、移除 7.9 弃用项;npm `latest`。
|
package/docs/components.md
CHANGED
|
@@ -851,6 +851,50 @@ const i = await wheel.spin(); // usa:result { index, label }
|
|
|
851
851
|
- `<usa-prize-wheel segments duration turns label>`: `segments`, `result`, `spinning`, `spin(index?)`; `usa:result`; `wheelAngle(index, count, turns)`.
|
|
852
852
|
- Game: `achievement-unlock` (`duration`) · `level-up` (`color`) · `chest-open` (`spark`, `count`) · `coin-burst` (`coin`, `count`, `power`) · `xp-gain` (`text`, `color`); `throwPath(deg, power)`.
|
|
853
853
|
|
|
854
|
+
### v7.6 Widgets: globe, location card (`components/widgets`) + maps & geo motion (`motionary/fx/geo`)
|
|
855
|
+
|
|
856
|
+
```html
|
|
857
|
+
<usa-globe markers="Shanghai:31.2,121.5; London:51.5,-0.1" speed="12" tilt="18"></usa-globe>
|
|
858
|
+
<usa-location-card name="Blue Bottle" address="66 Mint St" lat="37.782" lon="-122.407"
|
|
859
|
+
from-lat="37.776" from-lon="-122.394" href="https://maps.example/…"></usa-location-card>
|
|
860
|
+
|
|
861
|
+
<usa-fx effect="route-draw" trigger="enter"><svg viewBox="0 0 200 80"><path d="M10 70 C60 10 120 90 190 20"/></svg></usa-fx>
|
|
862
|
+
<usa-fx effect="pin-drop" trigger="enter"><span>📍</span></usa-fx>
|
|
863
|
+
```
|
|
864
|
+
```js
|
|
865
|
+
import { defineWidgets } from 'motionary/components/widgets';
|
|
866
|
+
import { registerGeoPack } from 'motionary/fx/geo';
|
|
867
|
+
defineWidgets(); registerGeoPack();
|
|
868
|
+
await globe.flyTo('London'); // usa:focus { name, lat, lon }
|
|
869
|
+
card.replay();
|
|
870
|
+
```
|
|
871
|
+
- `<usa-globe markers speed tilt lon>`: `markers`, `lon`, `flyTo(name)`; `usa:focus`; `project(lat, lon, lon0, tilt)`, `parseMarkers()`.
|
|
872
|
+
- `<usa-location-card name address lat lon from-lat from-lon distance href unit>`: `km`, `replay()`; `usa:arrive`; `haversine()`, `formatDistance(km, unit)`.
|
|
873
|
+
- Geo: `route-draw` (`duration`, `stagger`) · `marker-pulse` (`color`, `rings`) · `pin-drop` (`height`) · `globe-spin` (`turns`); `routeLength(points)`.
|
|
874
|
+
|
|
875
|
+
### v7.7 Widgets: field, OTP, upload progress (`components/widgets`) + form motion (`motionary/fx/form`)
|
|
876
|
+
|
|
877
|
+
```html
|
|
878
|
+
<usa-field label="Email" type="email" name="email" required hint="We never share it"></usa-field>
|
|
879
|
+
<usa-field label="Password" type="password" name="pw" minlength="8" strength></usa-field>
|
|
880
|
+
<usa-otp length="6"></usa-otp>
|
|
881
|
+
<usa-upload-progress name="report.pdf" size="2400000" value="40"></usa-upload-progress>
|
|
882
|
+
|
|
883
|
+
<usa-fx effect="field-shake" trigger="click"><input></usa-fx>
|
|
884
|
+
<usa-fx effect="form-cascade" trigger="enter"><form>…</form></usa-fx>
|
|
885
|
+
```
|
|
886
|
+
```js
|
|
887
|
+
import { defineWidgets, passwordStrength } from 'motionary/components/widgets';
|
|
888
|
+
import { registerFormPack } from 'motionary/fx/form';
|
|
889
|
+
defineWidgets(); registerFormPack();
|
|
890
|
+
otp.addEventListener('usa:complete', (e) => (e.detail.code === '482913' ? otp.success() : otp.error('Wrong code')));
|
|
891
|
+
row.value = 75; row.status = 'done';
|
|
892
|
+
```
|
|
893
|
+
- `<usa-field label hint error strength type name required pattern minlength maxlength autocomplete inputmode placeholder value>`: `value`, `input`, `validate()`; `usa:valid`, `usa:invalid`; `passwordStrength(pw)` → `{ score 0–4, label }`.
|
|
894
|
+
- `<usa-otp length mode label value>`: `value`, `fillCode(code)`, `clear()`, `error(message)`, `success()`; `usa:complete`; `sanitizeCode(s, mode)`.
|
|
895
|
+
- `<usa-upload-progress name size value status message>`: `value`, `status`; `usa:done`, `usa:error`, `usa:retry`; `formatBytes(n)`.
|
|
896
|
+
- Form: `field-shake` (`distance`, `color`) · `field-success` (`color`) · `label-float` (`stagger`) · `form-cascade` (`stagger`, `distance`); `shakeFrames(distance, steps)`.
|
|
897
|
+
|
|
854
898
|
## Frameworks
|
|
855
899
|
|
|
856
900
|
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": "7.
|
|
3
|
+
"version": "7.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",
|
|
@@ -248,6 +248,26 @@
|
|
|
248
248
|
"default": "./dist/components/fx-game.cjs"
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
|
+
"./fx/geo": {
|
|
252
|
+
"import": {
|
|
253
|
+
"types": "./dist/components/fx-geo.d.ts",
|
|
254
|
+
"default": "./dist/components/fx-geo.js"
|
|
255
|
+
},
|
|
256
|
+
"require": {
|
|
257
|
+
"types": "./dist/components/fx-geo.d.cts",
|
|
258
|
+
"default": "./dist/components/fx-geo.cjs"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"./fx/form": {
|
|
262
|
+
"import": {
|
|
263
|
+
"types": "./dist/components/fx-form.d.ts",
|
|
264
|
+
"default": "./dist/components/fx-form.js"
|
|
265
|
+
},
|
|
266
|
+
"require": {
|
|
267
|
+
"types": "./dist/components/fx-form.d.cts",
|
|
268
|
+
"default": "./dist/components/fx-form.cjs"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
251
271
|
"./components/reveal": {
|
|
252
272
|
"import": {
|
|
253
273
|
"types": "./dist/components/reveal.d.ts",
|
|
@@ -728,6 +748,26 @@
|
|
|
728
748
|
"default": "./dist/components/fx-game.cjs"
|
|
729
749
|
}
|
|
730
750
|
},
|
|
751
|
+
"./components/fx-geo": {
|
|
752
|
+
"import": {
|
|
753
|
+
"types": "./dist/components/fx-geo.d.ts",
|
|
754
|
+
"default": "./dist/components/fx-geo.js"
|
|
755
|
+
},
|
|
756
|
+
"require": {
|
|
757
|
+
"types": "./dist/components/fx-geo.d.cts",
|
|
758
|
+
"default": "./dist/components/fx-geo.cjs"
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"./components/fx-form": {
|
|
762
|
+
"import": {
|
|
763
|
+
"types": "./dist/components/fx-form.d.ts",
|
|
764
|
+
"default": "./dist/components/fx-form.js"
|
|
765
|
+
},
|
|
766
|
+
"require": {
|
|
767
|
+
"types": "./dist/components/fx-form.d.cts",
|
|
768
|
+
"default": "./dist/components/fx-form.cjs"
|
|
769
|
+
}
|
|
770
|
+
},
|
|
731
771
|
"./components/lite": {
|
|
732
772
|
"import": {
|
|
733
773
|
"types": "./dist/components/lite.d.ts",
|