use-scroll-animate 7.6.0 → 7.8.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
@@ -8,7 +8,7 @@
8
8
  - ✅ **v7.4** — 聊天 / 社交:输入中气泡、表情回应飘升、已读回执、消息撤回;新组件 消息列表、头像叠放、通知铃铛。
9
9
  - ✅ **v7.5** — 游戏化:成就解锁、经验条、宝箱开启、幸运转盘;新组件 排行榜、徽章墙、抽奖机。
10
10
  - ✅ **v7.6** — 地图与地理:路线绘制、旋转地球、标记脉冲、飞线;新组件 3D 地球、位置卡片。
11
- - **v7.7** — 表单动效:抖动校验、浮动标签、密码强度、成功勾选;新组件 动效输入框、验证码(OTP)输入、上传进度。
12
- - **v7.8** — AI 界面:流式文字、思考光晕、语音波形、生成骨架;新组件 对话输入框、建议标签(Chips)、语音按钮。
11
+ - ✅ **v7.7** — 表单动效:抖动校验、浮动标签、密码强度、成功勾选;新组件 动效输入框、验证码(OTP)输入、上传进度。
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`。
@@ -872,6 +872,52 @@ card.replay();
872
872
  - `<usa-location-card name address lat lon from-lat from-lon distance href unit>`: `km`, `replay()`; `usa:arrive`; `haversine()`, `formatDistance(km, unit)`.
873
873
  - Geo: `route-draw` (`duration`, `stagger`) · `marker-pulse` (`color`, `rings`) · `pin-drop` (`height`) · `globe-spin` (`turns`); `routeLength(points)`.
874
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
+
898
+ ### v7.8 Widgets: chat composer, suggestion chips, voice button (`components/widgets`) + AI UI motion (`motionary/fx/ai`)
899
+
900
+ ```html
901
+ <usa-chat-composer placeholder="Ask anything…"></usa-chat-composer>
902
+ <usa-suggestion-chips items="Summarise|Translate|Explain like I'm 5" dismiss></usa-suggestion-chips>
903
+ <usa-voice-button label="Talk to the assistant"></usa-voice-button>
904
+
905
+ <usa-fx effect="stream-text" trigger="enter"><p>Here is a streamed answer…</p></usa-fx>
906
+ <usa-fx effect="thinking-glow" trigger="loop"><div class="bubble">Thinking…</div></usa-fx>
907
+ ```
908
+ ```js
909
+ import { defineWidgets } from 'motionary/components/widgets';
910
+ import { registerAiPack } from 'motionary/fx/ai';
911
+ defineWidgets(); registerAiPack();
912
+ composer.addEventListener('usa:send', async (e) => { composer.busy = true; await ask(e.detail.text); composer.busy = false; });
913
+ chips.addEventListener('usa:pick', (e) => composer.value = e.detail.text);
914
+ vb.level = analyserLevel; // 0–1
915
+ ```
916
+ - `<usa-chat-composer placeholder label rows busy value>`: `value`, `busy`, `send()`, `clear()`; `usa:send` { text } (cancelable), `usa:stop`.
917
+ - `<usa-suggestion-chips items label dismiss>`: `items`, `setItems(list)`; `usa:pick` { text, index }; `parseChips(s)`.
918
+ - `<usa-voice-button label bars listening>`: `listening`, `level`, `toggle(force?)`; `usa:start`, `usa:stop`; `waveBars(level, n, phase)`.
919
+ - AI: `stream-text` (`speed`) · `thinking-glow` (`colors`) · `voice-wave` (`cycles`) · `gen-skeleton` (`hold`); `splitWords(text)`.
920
+
875
921
  ## Frameworks
876
922
 
877
923
  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.6.0",
3
+ "version": "7.8.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",
@@ -258,6 +258,26 @@
258
258
  "default": "./dist/components/fx-geo.cjs"
259
259
  }
260
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
+ },
271
+ "./fx/ai": {
272
+ "import": {
273
+ "types": "./dist/components/fx-ai.d.ts",
274
+ "default": "./dist/components/fx-ai.js"
275
+ },
276
+ "require": {
277
+ "types": "./dist/components/fx-ai.d.cts",
278
+ "default": "./dist/components/fx-ai.cjs"
279
+ }
280
+ },
261
281
  "./components/reveal": {
262
282
  "import": {
263
283
  "types": "./dist/components/reveal.d.ts",
@@ -748,6 +768,26 @@
748
768
  "default": "./dist/components/fx-geo.cjs"
749
769
  }
750
770
  },
771
+ "./components/fx-form": {
772
+ "import": {
773
+ "types": "./dist/components/fx-form.d.ts",
774
+ "default": "./dist/components/fx-form.js"
775
+ },
776
+ "require": {
777
+ "types": "./dist/components/fx-form.d.cts",
778
+ "default": "./dist/components/fx-form.cjs"
779
+ }
780
+ },
781
+ "./components/fx-ai": {
782
+ "import": {
783
+ "types": "./dist/components/fx-ai.d.ts",
784
+ "default": "./dist/components/fx-ai.js"
785
+ },
786
+ "require": {
787
+ "types": "./dist/components/fx-ai.d.cts",
788
+ "default": "./dist/components/fx-ai.cjs"
789
+ }
790
+ },
751
791
  "./components/lite": {
752
792
  "import": {
753
793
  "types": "./dist/components/lite.d.ts",