cos-design 2.4.1 → 3.0.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +203 -98
  3. package/dist/components/audioVisualizer/index.d.ts +9 -0
  4. package/dist/components/aurora/index.d.ts +9 -0
  5. package/dist/components/barcodeScan/index.d.ts +11 -0
  6. package/dist/components/burnAway/index.d.ts +11 -0
  7. package/dist/components/clickSpark/index.d.ts +10 -0
  8. package/dist/components/cursorTrail/index.d.ts +11 -0
  9. package/dist/components/cyberGrid/index.d.ts +11 -0
  10. package/dist/components/diceRoll/index.d.ts +9 -0
  11. package/dist/components/dnaHelix/index.d.ts +9 -0
  12. package/dist/components/electricArc/index.d.ts +8 -0
  13. package/dist/components/gradientFlow/index.d.ts +11 -0
  14. package/dist/components/gravityBalls/index.d.ts +8 -0
  15. package/dist/components/holographicCard/index.d.ts +8 -0
  16. package/dist/components/index.d.ts +68 -0
  17. package/dist/components/liquidGlass/index.d.ts +10 -0
  18. package/dist/components/liquidProgress/index.d.ts +9 -0
  19. package/dist/components/magneticButton/index.d.ts +10 -0
  20. package/dist/components/mazeGenerator/index.d.ts +9 -0
  21. package/dist/components/newtonCradle/index.d.ts +7 -0
  22. package/dist/components/orbitalChart/index.d.ts +12 -0
  23. package/dist/components/progressChest/index.d.ts +11 -0
  24. package/dist/components/radarScan/index.d.ts +9 -0
  25. package/dist/components/redPacketRain/index.d.ts +9 -0
  26. package/dist/components/rippleWater/index.d.ts +9 -0
  27. package/dist/components/scrambleText/index.d.ts +11 -0
  28. package/dist/components/scratchCard/index.d.ts +13 -0
  29. package/dist/components/slotMachine/index.d.ts +9 -0
  30. package/dist/components/smokeFog/index.d.ts +9 -0
  31. package/dist/components/snowfall/index.d.ts +11 -0
  32. package/dist/components/speedometer/index.d.ts +9 -0
  33. package/dist/components/splitReveal/index.d.ts +11 -0
  34. package/dist/components/spotlight/index.d.ts +10 -0
  35. package/dist/components/starfield/index.d.ts +11 -0
  36. package/dist/components/timelinePulse/index.d.ts +8 -0
  37. package/dist/components/waveText/index.d.ts +13 -0
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.css +1 -1
  40. package/dist/index.js +2331 -367
  41. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.0.1] - 2026-06-22
9
+
10
+ ### Fixed
11
+
12
+ - `ScratchCard` 修复 HiDPI 屏幕下刮开进度检测不准确
13
+ - `SlotMachine` 修复开奖符号与中间行不对齐;合并为单 rAF 循环;卸载时取消动画
14
+ - `AudioVisualizer` 修复组件卸载时麦克风流未释放
15
+ - `OrbitalChart` 中心标签改为显示占比最大的数据项
16
+ - `DiceRoll` 修复卸载时 `setTimeout` 未清理
17
+ - `BurnAway` / `Turntable` 修复卸载后仍触发回调的问题
18
+ - `RedPacketRain` 修复结束时动画循环被意外重启
19
+ - `TimelinePulse` 修复轴线与圆点垂直不对齐
20
+ - `NewtonCradle` 修复摆动不符合动量守恒的视觉问题
21
+
22
+ ### Changed
23
+
24
+ - `CanvasClock`、`LiquidProgress` 页面隐藏时暂停动画循环
25
+ - 优化 `README.md` 排版与组件分类展示
26
+
27
+ ## [3.0.0] - 2026-06-18
28
+
29
+ ### Added
30
+
31
+ **背景氛围(6)** — `Aurora`、`RippleWater`、`SmokeFog`、`CyberGrid`、`Snowfall`、`Starfield`
32
+
33
+ **文字动效(6)** — `ScrambleText`、`SplitReveal`、`WaveText`、`GradientFlow`、`BurnAway`、`BarcodeScan`
34
+
35
+ **交互玩具(6)** — `Spotlight`、`MagneticButton`、`HolographicCard`、`ClickSpark`、`CursorTrail`、`LiquidGlass`
36
+
37
+ **游戏营销(6)** — `ScratchCard`、`SlotMachine`、`DiceRoll`、`RedPacketRain`、`ProgressChest`、`RadarScan`
38
+
39
+ **数据装饰(5)** — `LiquidProgress`、`AudioVisualizer`、`Speedometer`、`TimelinePulse`、`OrbitalChart`
40
+
41
+ **物理创意(5)** — `NewtonCradle`、`GravityBalls`、`DnaHelix`、`ElectricArc`、`MazeGenerator`
42
+
43
+ ### Changed
44
+
45
+ - Playground 首页按 6 大分类展示组件,支持分类筛选与搜索
46
+ - 组件总数从 15 增至 49
47
+
8
48
  ## [2.4.1] - 2026-06-18
9
49
 
10
50
  ### Fixed
@@ -106,6 +146,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106
146
  - Webpack 及相关 loader 依赖
107
147
  - UMD 格式产物
108
148
 
149
+ [3.0.1]: https://github.com/jiaxiantao/cos-design/compare/v3.0.0...v3.0.1
150
+ [3.0.0]: https://github.com/jiaxiantao/cos-design/compare/v2.4.1...v3.0.0
109
151
  [2.4.1]: https://github.com/jiaxiantao/cos-design/compare/v2.4.0...v2.4.1
110
152
  [2.4.0]: https://github.com/jiaxiantao/cos-design/compare/v2.3.0...v2.4.0
111
153
  [2.3.0]: https://github.com/jiaxiantao/cos-design/compare/v2.2.0...v2.3.0
package/README.md CHANGED
@@ -1,152 +1,257 @@
1
+ <div align="center">
2
+
1
3
  # cos-design
2
4
 
5
+ **49 个 React 视觉特效组件 · 活动页 / 品牌页 / 创意展示开箱即用**
6
+
3
7
  [![CI](https://github.com/jiaxiantao/cos-design/actions/workflows/ci.yml/badge.svg)](https://github.com/jiaxiantao/cos-design/actions/workflows/ci.yml)
4
8
  [![npm version](https://img.shields.io/npm/v/cos-design.svg)](https://www.npmjs.com/package/cos-design)
5
9
  [![license](https://img.shields.io/npm/l/cos-design.svg)](https://github.com/jiaxiantao/cos-design/blob/main/LICENSE)
10
+ [![React](https://img.shields.io/badge/React-19-61dafb)](https://react.dev/)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6)](https://www.typescriptlang.org/)
6
12
 
7
- 基于 React 19 + Vite 8 + TypeScript 5 的 React 组件库。
13
+ [在线预览](https://github.com/jiaxiantao/cos-design#本地开发) · [v3.0 发布博客](./docs/cos-design-v3-release.md) · [完整指南](./docs/cos-design-intro.md) · [更新日志](./CHANGELOG.md)
8
14
 
9
- ## 特性
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## 这是什么?
20
+
21
+ **cos-design** 是一个面向**视觉表达**的 React 组件库——不是 Ant Design 的替代品,而是给页面加氛围、加趣味、加记忆点的「特效层」。
10
22
 
11
- - 开箱即用的 React 组件
12
- - ESM / CJS 双格式输出,完整 TypeScript 类型支持
13
- - 样式自动注入,无需手动引入 CSS
14
- - 使用 pnpm + Vite 的现代工程化方案
23
+ 适合用在:
15
24
 
16
- ## 安装
25
+ | 场景 | 你可以用它做什么 |
26
+ | ------------ | ---------------------------------- |
27
+ | 营销活动页 | 转盘抽奖、刮刮乐、红包雨、烟花庆祝 |
28
+ | 品牌 Landing | 极光背景、霓虹标题、全息卡片 |
29
+ | 数据大屏 | 翻牌器、仪表盘、液体进度环 |
30
+ | 创意作品集 | 牛顿摆、DNA 螺旋、迷宫生成 |
31
+
32
+ > 15 个组件太单薄,49 个刚好组成一套完整的「视觉工具箱」。
33
+
34
+ ---
35
+
36
+ ## 30 秒上手
17
37
 
18
38
  ```bash
19
39
  pnpm add cos-design
20
- # or
21
- npm install cos-design
22
- # or
23
- yarn add cos-design
24
40
  ```
25
41
 
26
- ## 使用
27
-
28
42
  ```tsx
29
- import { CanvasClock, Charge, ReturnCity, Turntable } from 'cos-design';
30
-
31
- function App() {
32
- return <CanvasClock width={400} height={400} />;
43
+ import { Fireworks, ScrambleText, ScratchCard } from 'cos-design';
44
+
45
+ export default function Page() {
46
+ return (
47
+ <>
48
+ <ScrambleText text="GRAND OPENING" />
49
+ <ScratchCard prize="🎉 恭喜中奖!" />
50
+ <Fireworks width={800} height={500} />
51
+ </>
52
+ );
33
53
  }
34
54
  ```
35
55
 
36
- ## 组件
37
-
38
- | 组件 | 说明 |
39
- | ----------------- | -------------------- |
40
- | `CanvasClock` | Canvas 画布时钟 |
41
- | `Charge` | 充电特效 |
42
- | `ReturnCity` | 回城特效 |
43
- | `Turntable` | 抽奖转盘 |
44
- | `Fireworks` | 烟花特效(点击燃放) |
45
- | `MatrixRain` | 黑客帝国数字雨 |
46
- | `ParticleNetwork` | 粒子连线网络 |
47
- | `Typewriter` | 打字机文字效果 |
48
- | `NeonText` | 霓虹灯发光文字 |
49
- | `WaveButton` | 波纹扩散按钮 |
50
- | `FlipCounter` | 数字翻牌器 |
51
- | `Countdown` | 活动倒计时 |
52
- | `Confetti` | 彩纸庆祝喷射 |
53
- | `GlitchText` | 故障风发光文字 |
54
- | `MeteorRain` | 流星雨背景 |
56
+ 无需手动引入 CSS,样式自动注入。完整 TypeScript 类型开箱即用。
55
57
 
56
- ## 本地开发
58
+ ---
57
59
 
58
- > **要求 Node.js >= 20**(项目含 `.nvmrc`,推荐使用 Node 22)
60
+ ## 组件一览(49 个 · 6 大分类)
59
61
 
60
- ### 第一步:切换 Node 版本
62
+ <details open>
63
+ <summary><strong>背景氛围</strong> — 9 个 · 动态场景与粒子背景</summary>
64
+
65
+ <br>
66
+
67
+ | 组件 | 说明 |
68
+ | ----------------- | ------------------------ |
69
+ | `MatrixRain` | 黑客帝国数字雨 |
70
+ | `MeteorRain` | 流星雨穿越 |
71
+ | `ParticleNetwork` | 粒子连线网络(支持触摸) |
72
+ | `Aurora` | 极光渐变光带 |
73
+ | `RippleWater` | 点击水波纹 |
74
+ | `SmokeFog` | 烟雾雾气飘动 |
75
+ | `CyberGrid` | 赛博透视地面 |
76
+ | `Snowfall` | 雪花 / 樱花飘落 |
77
+ | `Starfield` | 3D 纵深星空 |
61
78
 
62
- ```bash
63
- nvm use
64
- # 若未安装 Node 20
65
- nvm install 20 && nvm use 20
66
- ```
79
+ </details>
67
80
 
68
- ### 第二步:安装依赖
81
+ <details>
82
+ <summary><strong>文字动效</strong> — 9 个 · 标题与 Banner 动画</summary>
69
83
 
70
- **不要直接运行 `pnpm install`**(若本机 corepack 有问题会报错),请使用:
84
+ <br>
71
85
 
72
- ```bash
73
- npm run setup
74
- ```
86
+ | 组件 | 说明 |
87
+ | -------------- | ------------ |
88
+ | `Typewriter` | 终端打字机 |
89
+ | `NeonText` | 霓虹发光字 |
90
+ | `GlitchText` | 故障风闪烁 |
91
+ | `ScrambleText` | 乱码解密文字 |
92
+ | `SplitReveal` | 字母分裂入场 |
93
+ | `WaveText` | 正弦波浪文字 |
94
+ | `GradientFlow` | 流光渐变字 |
95
+ | `BurnAway` | 燃烧消失 |
96
+ | `BarcodeScan` | 扫描线覆盖 |
75
97
 
76
- 该命令会通过 `npx` 直接调用 pnpm,绕过 corepack。
98
+ </details>
77
99
 
78
- ### 第三步:启动开发
100
+ <details>
101
+ <summary><strong>交互玩具</strong> — 7 个 · 鼠标驱动的趣味反馈</summary>
79
102
 
80
- ```bash
81
- npx --yes pnpm@9 dev
82
- ```
103
+ <br>
104
+
105
+ | 组件 | 说明 |
106
+ | ----------------- | ------------ |
107
+ | `WaveButton` | 水波扩散按钮 |
108
+ | `Spotlight` | 手电筒照亮 |
109
+ | `MagneticButton` | 磁吸按钮 |
110
+ | `HolographicCard` | 全息反光卡片 |
111
+ | `ClickSpark` | 点击火花 |
112
+ | `CursorTrail` | 光标拖尾 |
113
+ | `LiquidGlass` | 液态毛玻璃 |
114
+
115
+ </details>
116
+
117
+ <details>
118
+ <summary><strong>游戏营销</strong> — 9 个 · 抽奖与活动玩法</summary>
119
+
120
+ <br>
83
121
 
84
- 访问 `http://localhost:4000` 进入首页,点击卡片跳转到对应组件演示(共 15 个组件)。
122
+ | 组件 | 说明 |
123
+ | --------------- | ------------ |
124
+ | `Turntable` | 抽奖转盘 |
125
+ | `Confetti` | 彩纸喷射庆祝 |
126
+ | `Charge` | 充电动效 |
127
+ | `ScratchCard` | 刮刮乐 |
128
+ | `SlotMachine` | 老虎机 |
129
+ | `DiceRoll` | 3D 掷骰子 |
130
+ | `RedPacketRain` | 红包雨 |
131
+ | `ProgressChest` | 宝箱进度 |
132
+ | `RadarScan` | 雷达扫描 HUD |
85
133
 
86
- ## 脚本
134
+ </details>
87
135
 
88
- | 命令 | 说明 |
89
- | ------------------------ | ------------------------------- |
90
- | `npm run setup` | 安装依赖(推荐,绕过 corepack) |
91
- | `npx --yes pnpm@9 dev` | 启动本地演示 |
92
- | `npx --yes pnpm@9 build` | 构建组件库 |
93
- | `npx --yes pnpm@9 lint` | 代码检查 |
94
- | `npx --yes pnpm@9 pub` | 构建并发布到 npm |
136
+ <details>
137
+ <summary><strong>数据装饰</strong> — 8 个 · 大屏与时间展示</summary>
95
138
 
96
- ## 修复本机 pnpm(可选)
139
+ <br>
97
140
 
98
- 若希望直接使用 `pnpm` 命令,在 **Node 20+** 环境下执行:
141
+ | 组件 | 说明 |
142
+ | ----------------- | --------------- |
143
+ | `CanvasClock` | Canvas 模拟时钟 |
144
+ | `FlipCounter` | 机械翻牌数字 |
145
+ | `Countdown` | 活动倒计时 |
146
+ | `LiquidProgress` | 液体进度环 |
147
+ | `AudioVisualizer` | 音频可视化 |
148
+ | `Speedometer` | 速度仪表盘 |
149
+ | `TimelinePulse` | 时间轴脉冲 |
150
+ | `OrbitalChart` | 轨道占比图 |
151
+
152
+ </details>
153
+
154
+ <details>
155
+ <summary><strong>物理创意</strong> — 7 个 · 物理模拟与视觉实验</summary>
156
+
157
+ <br>
158
+
159
+ | 组件 | 说明 |
160
+ | --------------- | ------------ |
161
+ | `Fireworks` | 烟花燃放 |
162
+ | `ReturnCity` | 回城传送特效 |
163
+ | `NewtonCradle` | 牛顿摆 |
164
+ | `GravityBalls` | 重力球池 |
165
+ | `DnaHelix` | DNA 双螺旋 |
166
+ | `ElectricArc` | 电弧闪电 |
167
+ | `MazeGenerator` | 迷宫生成器 |
168
+
169
+ </details>
170
+
171
+ ---
172
+
173
+ ## 特性
174
+
175
+ - **49 个组件**,覆盖背景、文字、交互、营销、数据、物理六大场景
176
+ - **React 19** + **Vite 8** + **TypeScript 5** 现代技术栈
177
+ - **ESM / CJS** 双格式,完整 `.d.ts` 类型
178
+ - **样式自动注入**,无需 `import 'cos-design/dist/index.css'`
179
+ - Canvas 组件**页面隐藏时自动暂停**动画,省电友好
180
+ - **GitHub Actions** 自动 lint、构建、npm 发布
181
+
182
+ ---
183
+
184
+ ## 本地开发
185
+
186
+ > 要求 **Node.js >= 20**(推荐 Node 22,项目含 `.nvmrc`)
99
187
 
100
188
  ```bash
101
- nvm use 20
102
- corepack disable
103
- hash -r
104
- npm install -g pnpm@9
105
- which pnpm # 确认路径不在 corepack 下
106
- pnpm -v
189
+ git clone git@github.com:jiaxiantao/cos-design.git
190
+ cd cos-design
191
+ nvm use
192
+ npm run setup # 安装依赖(绕过 corepack 问题)
193
+ npx --yes pnpm@9 dev # 启动 Playground
107
194
  ```
108
195
 
109
- ## 自动发布(CI/CD)
196
+ 访问 **http://localhost:4000** — 按分类浏览全部 49 个组件,右侧可查看与复制示例代码。
110
197
 
111
- 推送到 `master` 分支后,GitHub Actions 会自动执行 lint、构建,并将**新版本**发布到 [npm](https://www.npmjs.com/package/cos-design)。
198
+ ---
112
199
 
113
- ### 首次配置(仅需一次)
200
+ ## 常用命令
114
201
 
115
- 1. 打开 [npm Access Tokens](https://www.npmjs.com/settings/jiaxiantao/tokens)
116
- 2. 创建 **Granular Access Token**:
117
- - Permissions: Packages → **Read and write**
118
- - 勾选 **Bypass 2FA for publish**(自动化发布必须)
119
- 3. 打开 GitHub 仓库 → **Settings** → **Secrets and variables** → **Actions**
120
- 4. 新建 Secret:`NPM_TOKEN`,值为上一步的 token
202
+ | 命令 | 说明 |
203
+ | ------------------------ | -------------- |
204
+ | `npm run setup` | 安装依赖 |
205
+ | `npx --yes pnpm@9 dev` | 启动本地演示 |
206
+ | `npx --yes pnpm@9 build` | 构建组件库 |
207
+ | `npx --yes pnpm@9 lint` | 代码检查 |
208
+ | `npx --yes pnpm@9 pub` | 构建并发布 npm |
121
209
 
122
- ### 发布新版本
210
+ ---
123
211
 
124
- ```bash
125
- # 1. 更新 package.json 中的 version(如 2.2.0)
126
- # 2. 更新 CHANGELOG.md
127
- # 3. 提交并推送
128
- git add .
129
- git commit -m "chore: release v2.2.0"
130
- git push origin master
131
-
132
- # 4.(可选)打 tag
133
- git tag v2.2.0 && git push origin v2.2.0
212
+ ## 使用注意
213
+
214
+ **Canvas 组件请客户端渲染**(依赖 `window` / `canvas` / `requestAnimationFrame`):
215
+
216
+ ```tsx
217
+ import dynamic from 'next/dynamic';
218
+
219
+ const Fireworks = dynamic(() => import('cos-design').then((m) => m.Fireworks), { ssr: false });
134
220
  ```
135
221
 
136
- 推送后可在 [Actions](https://github.com/jiaxiantao/cos-design/actions) 查看发布进度。若 npm 上已存在相同版本号,会自动跳过发布。
222
+ **控制使用密度** — 一个页面建议「一个强视觉背景 + 若干局部交互」,避免全场动画互相抢戏。
223
+
224
+ ---
137
225
 
138
226
  ## 文档
139
227
 
140
- - [完整介绍与实践指南](./docs/cos-design-intro.md) — 项目背景、架构、组件能力与适用场景
228
+ | 文档 | 内容 |
229
+ | ------------------------------------------------ | -------------------------------- |
230
+ | [v3.0 发布博客](./docs/cos-design-v3-release.md) | 重大升级解读、分类体系、技术实现 |
231
+ | [完整介绍与实践指南](./docs/cos-design-intro.md) | 架构、使用规则、组件详解 |
232
+ | [CHANGELOG](./CHANGELOG.md) | 版本更新记录 |
233
+ | [CONTRIBUTING](./CONTRIBUTING.md) | 参与贡献指南 |
234
+
235
+ ---
236
+
237
+ ## 自动发布
238
+
239
+ 推送到 `master` 后,GitHub Actions 自动 lint、构建,并将新版本发布到 [npm](https://www.npmjs.com/package/cos-design)。
240
+
241
+ 首次配置需在 GitHub Secrets 中设置 `NPM_TOKEN`(需勾选 **Bypass 2FA for publish**)。详见 [npm Access Tokens](https://www.npmjs.com/settings/jiaxiantao/tokens)。
242
+
243
+ ---
141
244
 
142
245
  ## 参与贡献
143
246
 
144
- 欢迎提交 Issue 与 Pull Request,请参阅 [CONTRIBUTING.md](./CONTRIBUTING.md)。
247
+ 欢迎提交 Issue 与 Pull Request!
248
+
249
+ ---
145
250
 
146
- ## 更新日志
251
+ <div align="center">
147
252
 
148
- 详见 [CHANGELOG.md](./CHANGELOG.md)。
253
+ **如果觉得有用,欢迎 Star ⭐**
149
254
 
150
- ## License
255
+ [MIT](./LICENSE) © [jiaxiantao](https://github.com/jiaxiantao)
151
256
 
152
- [MIT](./LICENSE) © jiaxiantao
257
+ </div>
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface AudioVisualizerProps {
3
+ width?: number;
4
+ height?: number;
5
+ barCount?: number;
6
+ useMic?: boolean;
7
+ }
8
+ declare const AudioVisualizer: React.FC<AudioVisualizerProps>;
9
+ export default AudioVisualizer;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface AuroraProps {
3
+ width?: number;
4
+ height?: number;
5
+ /** 极光色带,默认绿/青/紫 */
6
+ colors?: string[];
7
+ }
8
+ declare const Aurora: React.FC<AuroraProps>;
9
+ export default Aurora;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface BarcodeScanProps {
3
+ /** 包裹内容 */
4
+ children?: React.ReactNode;
5
+ /** 扫描线颜色 */
6
+ scanColor?: string;
7
+ /** 扫描速度(秒/次) */
8
+ speed?: number;
9
+ }
10
+ declare const BarcodeScan: React.FC<BarcodeScanProps>;
11
+ export default BarcodeScan;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface BurnAwayProps {
3
+ /** 显示文字 */
4
+ text?: string;
5
+ /** 字号 */
6
+ fontSize?: number;
7
+ /** 燃烧完成回调 */
8
+ onComplete?: () => void;
9
+ }
10
+ declare const BurnAway: React.FC<BurnAwayProps>;
11
+ export default BurnAway;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface ClickSparkProps {
3
+ children?: React.ReactNode;
4
+ /** 火花颜色 */
5
+ color?: string;
6
+ /** 每次点击粒子数,默认 16 */
7
+ count?: number;
8
+ }
9
+ declare const ClickSpark: React.FC<ClickSparkProps>;
10
+ export default ClickSpark;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface CursorTrailProps {
3
+ /** 轨迹颜色 */
4
+ color?: string;
5
+ /** 轨迹长度,默认 20 */
6
+ length?: number;
7
+ width?: number;
8
+ height?: number;
9
+ }
10
+ declare const CursorTrail: React.FC<CursorTrailProps>;
11
+ export default CursorTrail;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface CyberGridProps {
3
+ width?: number;
4
+ height?: number;
5
+ /** 网格线颜色 */
6
+ color?: string;
7
+ /** 移动速度,默认 1 */
8
+ speed?: number;
9
+ }
10
+ declare const CyberGrid: React.FC<CyberGridProps>;
11
+ export default CyberGrid;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface DiceRollProps {
3
+ /** 掷骰结束回调 */
4
+ onRoll?: (value: number) => void;
5
+ /** 骰子面数,默认 6 */
6
+ sides?: 6;
7
+ }
8
+ declare const DiceRoll: React.FC<DiceRollProps>;
9
+ export default DiceRoll;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface DnaHelixProps {
3
+ width?: number;
4
+ height?: number;
5
+ speed?: number;
6
+ color?: string;
7
+ }
8
+ declare const DnaHelix: React.FC<DnaHelixProps>;
9
+ export default DnaHelix;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface ElectricArcProps {
3
+ width?: number;
4
+ height?: number;
5
+ color?: string;
6
+ }
7
+ declare const ElectricArc: React.FC<ElectricArcProps>;
8
+ export default ElectricArc;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface GradientFlowProps {
3
+ /** 显示文字 */
4
+ text?: string;
5
+ /** 渐变色列表 */
6
+ colors?: string[];
7
+ /** 字号 */
8
+ fontSize?: number;
9
+ }
10
+ declare const GradientFlow: React.FC<GradientFlowProps>;
11
+ export default GradientFlow;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface GravityBallsProps {
3
+ width?: number;
4
+ height?: number;
5
+ ballCount?: number;
6
+ }
7
+ declare const GravityBalls: React.FC<GravityBallsProps>;
8
+ export default GravityBalls;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface HolographicCardProps {
3
+ title?: string;
4
+ subtitle?: string;
5
+ image?: string;
6
+ }
7
+ declare const HolographicCard: React.FC<HolographicCardProps>;
8
+ export default HolographicCard;
@@ -1,26 +1,92 @@
1
+ export { default as BarcodeScan } from './barcodeScan';
2
+ export type { BarcodeScanProps } from './barcodeScan';
3
+ export { default as BurnAway } from './burnAway';
4
+ export type { BurnAwayProps } from './burnAway';
5
+ export { default as Aurora } from './aurora';
6
+ export type { AuroraProps } from './aurora';
7
+ export { default as AudioVisualizer } from './audioVisualizer';
8
+ export type { AudioVisualizerProps } from './audioVisualizer';
1
9
  export { default as CanvasClock } from './canvasClock';
2
10
  export type { CanvasClockProps } from './canvasClock';
3
11
  export { default as Charge } from './charge';
4
12
  export type { ChargeProps } from './charge';
13
+ export { default as ClickSpark } from './clickSpark';
14
+ export type { ClickSparkProps } from './clickSpark';
5
15
  export { default as Confetti } from './confetti';
16
+ export { default as CyberGrid } from './cyberGrid';
17
+ export type { CyberGridProps } from './cyberGrid';
6
18
  export type { ConfettiHandle, ConfettiProps } from './confetti';
7
19
  export { default as Countdown } from './countdown';
20
+ export { default as DnaHelix } from './dnaHelix';
21
+ export type { DnaHelixProps } from './dnaHelix';
22
+ export { default as ElectricArc } from './electricArc';
23
+ export type { ElectricArcProps } from './electricArc';
8
24
  export type { CountdownProps } from './countdown';
25
+ export { default as CursorTrail } from './cursorTrail';
26
+ export type { CursorTrailProps } from './cursorTrail';
27
+ export { default as DiceRoll } from './diceRoll';
28
+ export type { DiceRollProps } from './diceRoll';
9
29
  export { default as Fireworks } from './fireworks';
10
30
  export type { FireworksHandle, FireworksProps } from './fireworks';
11
31
  export { default as FlipCounter } from './flipCounter';
32
+ export { default as GradientFlow } from './gradientFlow';
33
+ export type { GradientFlowProps } from './gradientFlow';
12
34
  export type { FlipCounterProps } from './flipCounter';
13
35
  export { default as GlitchText } from './glitchText';
36
+ export { default as GravityBalls } from './gravityBalls';
37
+ export type { GravityBallsProps } from './gravityBalls';
14
38
  export type { GlitchTextProps } from './glitchText';
39
+ export { default as HolographicCard } from './holographicCard';
40
+ export type { HolographicCardProps } from './holographicCard';
41
+ export { default as LiquidProgress } from './liquidProgress';
42
+ export type { LiquidProgressProps } from './liquidProgress';
43
+ export { default as LiquidGlass } from './liquidGlass';
44
+ export type { LiquidGlassProps } from './liquidGlass';
45
+ export { default as MagneticButton } from './magneticButton';
46
+ export type { MagneticButtonProps } from './magneticButton';
15
47
  export { default as MatrixRain } from './matrixRain';
48
+ export { default as MazeGenerator } from './mazeGenerator';
49
+ export type { MazeGeneratorProps } from './mazeGenerator';
16
50
  export type { MatrixRainProps } from './matrixRain';
17
51
  export { default as MeteorRain } from './meteorRain';
18
52
  export type { MeteorRainProps } from './meteorRain';
19
53
  export { default as NeonText } from './neonText';
54
+ export { default as NewtonCradle } from './newtonCradle';
55
+ export type { NewtonCradleProps } from './newtonCradle';
20
56
  export type { NeonTextProps } from './neonText';
57
+ export { default as OrbitalChart } from './orbitalChart';
58
+ export type { OrbitalChartItem, OrbitalChartProps } from './orbitalChart';
21
59
  export { default as ParticleNetwork } from './particleNetwork';
60
+ export { default as SmokeFog } from './smokeFog';
61
+ export type { SmokeFogProps } from './smokeFog';
62
+ export { default as Snowfall } from './snowfall';
63
+ export type { SnowfallProps } from './snowfall';
64
+ export { default as Starfield } from './starfield';
65
+ export type { StarfieldProps } from './starfield';
22
66
  export type { ParticleNetworkProps } from './particleNetwork';
67
+ export { default as ProgressChest } from './progressChest';
68
+ export type { ProgressChestProps } from './progressChest';
69
+ export { default as RadarScan } from './radarScan';
70
+ export type { RadarScanProps } from './radarScan';
71
+ export { default as RedPacketRain } from './redPacketRain';
72
+ export type { RedPacketRainProps } from './redPacketRain';
23
73
  export { default as ReturnCity } from './returnCity';
74
+ export { default as Speedometer } from './speedometer';
75
+ export type { SpeedometerProps } from './speedometer';
76
+ export { default as TimelinePulse } from './timelinePulse';
77
+ export type { TimelinePulseProps } from './timelinePulse';
78
+ export { default as RippleWater } from './rippleWater';
79
+ export type { RippleWaterProps } from './rippleWater';
80
+ export { default as ScrambleText } from './scrambleText';
81
+ export type { ScrambleTextProps } from './scrambleText';
82
+ export { default as ScratchCard } from './scratchCard';
83
+ export type { ScratchCardProps } from './scratchCard';
84
+ export { default as SlotMachine } from './slotMachine';
85
+ export type { SlotMachineProps } from './slotMachine';
86
+ export { default as SplitReveal } from './splitReveal';
87
+ export type { SplitRevealProps } from './splitReveal';
88
+ export { default as Spotlight } from './spotlight';
89
+ export type { SpotlightProps } from './spotlight';
24
90
  export type { ReturnCityProps } from './returnCity';
25
91
  export type { TurntablePrize, TurntableProps } from './turntable';
26
92
  export { default as Turntable } from './turntable';
@@ -28,3 +94,5 @@ export { default as Typewriter } from './typewriter';
28
94
  export type { TypewriterProps } from './typewriter';
29
95
  export { default as WaveButton } from './waveButton';
30
96
  export type { WaveButtonProps } from './waveButton';
97
+ export { default as WaveText } from './waveText';
98
+ export type { WaveTextProps } from './waveText';