use-scroll-animate 7.7.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/CHANGELOG.md +13 -0
- package/dist/components/fx-ai.cjs +130 -0
- package/dist/components/fx-ai.cjs.map +1 -0
- package/dist/components/fx-ai.d.cts +66 -0
- package/dist/components/fx-ai.d.ts +66 -0
- package/dist/components/fx-ai.js +126 -0
- package/dist/components/fx-ai.js.map +1 -0
- package/dist/components/fx2.cjs +6 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +23 -1
- package/dist/components/fx2.d.ts +23 -1
- package/dist/components/fx2.js +5 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +388 -118
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +57 -2
- package/dist/components/widgets.d.ts +57 -2
- package/dist/components/widgets.js +384 -119
- 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 +1 -1
- package/docs/components.md +23 -0
- package/package.json +21 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
- ✅ **v7.5** — 游戏化:成就解锁、经验条、宝箱开启、幸运转盘;新组件 排行榜、徽章墙、抽奖机。
|
|
10
10
|
- ✅ **v7.6** — 地图与地理:路线绘制、旋转地球、标记脉冲、飞线;新组件 3D 地球、位置卡片。
|
|
11
11
|
- ✅ **v7.7** — 表单动效:抖动校验、浮动标签、密码强度、成功勾选;新组件 动效输入框、验证码(OTP)输入、上传进度。
|
|
12
|
-
- **v7.8** — AI 界面:流式文字、思考光晕、语音波形、生成骨架;新组件 对话输入框、建议标签(Chips)、语音按钮。
|
|
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
|
@@ -895,6 +895,29 @@ row.value = 75; row.status = 'done';
|
|
|
895
895
|
- `<usa-upload-progress name size value status message>`: `value`, `status`; `usa:done`, `usa:error`, `usa:retry`; `formatBytes(n)`.
|
|
896
896
|
- Form: `field-shake` (`distance`, `color`) · `field-success` (`color`) · `label-float` (`stagger`) · `form-cascade` (`stagger`, `distance`); `shakeFrames(distance, steps)`.
|
|
897
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
|
+
|
|
898
921
|
## Frameworks
|
|
899
922
|
|
|
900
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.
|
|
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",
|
|
@@ -268,6 +268,16 @@
|
|
|
268
268
|
"default": "./dist/components/fx-form.cjs"
|
|
269
269
|
}
|
|
270
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
|
+
},
|
|
271
281
|
"./components/reveal": {
|
|
272
282
|
"import": {
|
|
273
283
|
"types": "./dist/components/reveal.d.ts",
|
|
@@ -768,6 +778,16 @@
|
|
|
768
778
|
"default": "./dist/components/fx-form.cjs"
|
|
769
779
|
}
|
|
770
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
|
+
},
|
|
771
791
|
"./components/lite": {
|
|
772
792
|
"import": {
|
|
773
793
|
"types": "./dist/components/lite.d.ts",
|