cos-design 2.4.0 → 3.0.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 +43 -0
- package/README.md +26 -20
- package/dist/components/_shared/visibility.d.ts +3 -0
- package/dist/components/audioVisualizer/index.d.ts +9 -0
- package/dist/components/aurora/index.d.ts +9 -0
- package/dist/components/barcodeScan/index.d.ts +11 -0
- package/dist/components/burnAway/index.d.ts +11 -0
- package/dist/components/clickSpark/index.d.ts +10 -0
- package/dist/components/cursorTrail/index.d.ts +11 -0
- package/dist/components/cyberGrid/index.d.ts +11 -0
- package/dist/components/diceRoll/index.d.ts +9 -0
- package/dist/components/dnaHelix/index.d.ts +9 -0
- package/dist/components/electricArc/index.d.ts +8 -0
- package/dist/components/gradientFlow/index.d.ts +11 -0
- package/dist/components/gravityBalls/index.d.ts +8 -0
- package/dist/components/holographicCard/index.d.ts +8 -0
- package/dist/components/index.d.ts +68 -0
- package/dist/components/liquidGlass/index.d.ts +10 -0
- package/dist/components/liquidProgress/index.d.ts +9 -0
- package/dist/components/magneticButton/index.d.ts +10 -0
- package/dist/components/matrixRain/index.d.ts +6 -0
- package/dist/components/mazeGenerator/index.d.ts +9 -0
- package/dist/components/newtonCradle/index.d.ts +7 -0
- package/dist/components/orbitalChart/index.d.ts +12 -0
- package/dist/components/particleNetwork/index.d.ts +2 -0
- package/dist/components/progressChest/index.d.ts +11 -0
- package/dist/components/radarScan/index.d.ts +9 -0
- package/dist/components/redPacketRain/index.d.ts +9 -0
- package/dist/components/returnCity/index.d.ts +2 -2
- package/dist/components/rippleWater/index.d.ts +9 -0
- package/dist/components/scrambleText/index.d.ts +11 -0
- package/dist/components/scratchCard/index.d.ts +13 -0
- package/dist/components/slotMachine/index.d.ts +9 -0
- package/dist/components/smokeFog/index.d.ts +9 -0
- package/dist/components/snowfall/index.d.ts +11 -0
- package/dist/components/speedometer/index.d.ts +9 -0
- package/dist/components/splitReveal/index.d.ts +11 -0
- package/dist/components/spotlight/index.d.ts +10 -0
- package/dist/components/starfield/index.d.ts +11 -0
- package/dist/components/timelinePulse/index.d.ts +8 -0
- package/dist/components/waveButton/index.d.ts +1 -3
- package/dist/components/waveText/index.d.ts +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2362 -339
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,47 @@ 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.0] - 2026-06-18
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
**背景氛围(6)** — `Aurora`、`RippleWater`、`SmokeFog`、`CyberGrid`、`Snowfall`、`Starfield`
|
|
13
|
+
|
|
14
|
+
**文字动效(6)** — `ScrambleText`、`SplitReveal`、`WaveText`、`GradientFlow`、`BurnAway`、`BarcodeScan`
|
|
15
|
+
|
|
16
|
+
**交互玩具(6)** — `Spotlight`、`MagneticButton`、`HolographicCard`、`ClickSpark`、`CursorTrail`、`LiquidGlass`
|
|
17
|
+
|
|
18
|
+
**游戏营销(6)** — `ScratchCard`、`SlotMachine`、`DiceRoll`、`RedPacketRain`、`ProgressChest`、`RadarScan`
|
|
19
|
+
|
|
20
|
+
**数据装饰(5)** — `LiquidProgress`、`AudioVisualizer`、`Speedometer`、`TimelinePulse`、`OrbitalChart`
|
|
21
|
+
|
|
22
|
+
**物理创意(5)** — `NewtonCradle`、`GravityBalls`、`DnaHelix`、`ElectricArc`、`MazeGenerator`
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Playground 首页按 6 大分类展示组件,支持分类筛选与搜索
|
|
27
|
+
- 组件总数从 15 增至 49
|
|
28
|
+
|
|
29
|
+
## [2.4.1] - 2026-06-18
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- `Charge` 恢复原版 gooey 充电动效,修正气泡 nth-child 错位与容器高度动画,Demo 全屏展示
|
|
34
|
+
- `Fireworks` 移除重复自动燃放逻辑,页面隐藏时暂停动画
|
|
35
|
+
- `Countdown` 校验无效日期,倒计时结束后停止定时器
|
|
36
|
+
- `Typewriter` 空文案保护,`texts` 变更时重置状态
|
|
37
|
+
- `Confetti` 分离自动喷射与画布循环,避免重复触发
|
|
38
|
+
- `ReturnCity` 基于容器尺寸定位星星,默认 `glassCount` 改为 8
|
|
39
|
+
- `FlipCounter` 修复翻牌数字裁切与动画层逻辑
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Canvas 组件(Fireworks、Confetti、MeteorRain、MatrixRain、ParticleNetwork)页面隐藏时暂停 RAF
|
|
44
|
+
- `MeteorRain` 优化流星绘制,避免每帧创建渐变对象
|
|
45
|
+
- `MatrixRain` 叠层标题支持 `showOverlay` / `title` / `subtitle` 配置
|
|
46
|
+
- `ParticleNetwork` 新增 `repelRadius`,支持触摸互动
|
|
47
|
+
- `WaveButton` 支持原生 `button` 属性(如 `disabled`)
|
|
48
|
+
|
|
8
49
|
## [2.4.0] - 2026-06-18
|
|
9
50
|
|
|
10
51
|
### Added
|
|
@@ -86,6 +127,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
86
127
|
- Webpack 及相关 loader 依赖
|
|
87
128
|
- UMD 格式产物
|
|
88
129
|
|
|
130
|
+
[3.0.0]: https://github.com/jiaxiantao/cos-design/compare/v2.4.1...v3.0.0
|
|
131
|
+
[2.4.1]: https://github.com/jiaxiantao/cos-design/compare/v2.4.0...v2.4.1
|
|
89
132
|
[2.4.0]: https://github.com/jiaxiantao/cos-design/compare/v2.3.0...v2.4.0
|
|
90
133
|
[2.3.0]: https://github.com/jiaxiantao/cos-design/compare/v2.2.0...v2.3.0
|
|
91
134
|
[2.2.0]: https://github.com/jiaxiantao/cos-design/compare/v2.1.0...v2.2.0
|
package/README.md
CHANGED
|
@@ -33,25 +33,31 @@ function App() {
|
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
## 组件(49 个 · 6 大分类)
|
|
37
|
+
|
|
38
|
+
### 背景氛围
|
|
39
|
+
|
|
40
|
+
`MatrixRain` · `MeteorRain` · `ParticleNetwork` · `Aurora` · `RippleWater` · `SmokeFog` · `CyberGrid` · `Snowfall` · `Starfield`
|
|
41
|
+
|
|
42
|
+
### 文字动效
|
|
43
|
+
|
|
44
|
+
`Typewriter` · `NeonText` · `GlitchText` · `ScrambleText` · `SplitReveal` · `WaveText` · `GradientFlow` · `BurnAway` · `BarcodeScan`
|
|
45
|
+
|
|
46
|
+
### 交互玩具
|
|
47
|
+
|
|
48
|
+
`WaveButton` · `Spotlight` · `MagneticButton` · `HolographicCard` · `ClickSpark` · `CursorTrail` · `LiquidGlass`
|
|
49
|
+
|
|
50
|
+
### 游戏营销
|
|
51
|
+
|
|
52
|
+
`Turntable` · `Confetti` · `Charge` · `ScratchCard` · `SlotMachine` · `DiceRoll` · `RedPacketRain` · `ProgressChest` · `RadarScan`
|
|
53
|
+
|
|
54
|
+
### 数据装饰
|
|
55
|
+
|
|
56
|
+
`CanvasClock` · `FlipCounter` · `Countdown` · `LiquidProgress` · `AudioVisualizer` · `Speedometer` · `TimelinePulse` · `OrbitalChart`
|
|
57
|
+
|
|
58
|
+
### 物理创意
|
|
59
|
+
|
|
60
|
+
`Fireworks` · `ReturnCity` · `NewtonCradle` · `GravityBalls` · `DnaHelix` · `ElectricArc` · `MazeGenerator`
|
|
55
61
|
|
|
56
62
|
## 本地开发
|
|
57
63
|
|
|
@@ -81,7 +87,7 @@ npm run setup
|
|
|
81
87
|
npx --yes pnpm@9 dev
|
|
82
88
|
```
|
|
83
89
|
|
|
84
|
-
访问 `http://localhost:4000`
|
|
90
|
+
访问 `http://localhost:4000` 进入首页,按分类浏览并跳转到对应组件演示(共 49 个组件)。
|
|
85
91
|
|
|
86
92
|
## 脚本
|
|
87
93
|
|
|
@@ -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,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,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;
|
|
@@ -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';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface LiquidGlassProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/** 模糊强度,默认 16 */
|
|
5
|
+
blur?: number;
|
|
6
|
+
/** 圆角,默认 20 */
|
|
7
|
+
borderRadius?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const LiquidGlass: React.FC<LiquidGlassProps>;
|
|
10
|
+
export default LiquidGlass;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MagneticButtonProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/** 磁力强度 0–1,默认 0.4 */
|
|
5
|
+
strength?: number;
|
|
6
|
+
/** 按钮颜色 */
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const MagneticButton: React.FC<MagneticButtonProps>;
|
|
10
|
+
export default MagneticButton;
|
|
@@ -6,6 +6,12 @@ export interface MatrixRainProps {
|
|
|
6
6
|
density?: number;
|
|
7
7
|
/** 主色调 */
|
|
8
8
|
color?: string;
|
|
9
|
+
/** 是否显示标题叠层,默认 true */
|
|
10
|
+
showOverlay?: boolean;
|
|
11
|
+
/** 叠层标题 */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** 叠层副标题 */
|
|
14
|
+
subtitle?: string;
|
|
9
15
|
}
|
|
10
16
|
declare const MatrixRain: React.FC<MatrixRainProps>;
|
|
11
17
|
export default MatrixRain;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MazeGeneratorProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
cellSize?: number;
|
|
6
|
+
onGenerated?: (cols: number, rows: number) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const MazeGenerator: React.FC<MazeGeneratorProps>;
|
|
9
|
+
export default MazeGenerator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface OrbitalChartItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OrbitalChartProps {
|
|
8
|
+
data?: OrbitalChartItem[];
|
|
9
|
+
size?: number;
|
|
10
|
+
}
|
|
11
|
+
declare const OrbitalChart: React.FC<OrbitalChartProps>;
|
|
12
|
+
export default OrbitalChart;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ProgressChestProps {
|
|
3
|
+
/** 进度 0–100 */
|
|
4
|
+
progress?: number;
|
|
5
|
+
/** 宝箱打开回调 */
|
|
6
|
+
onOpen?: () => void;
|
|
7
|
+
/** 标签文字 */
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const ProgressChest: React.FC<ProgressChestProps>;
|
|
11
|
+
export default ProgressChest;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RedPacketRainProps {
|
|
3
|
+
/** 持续时间(毫秒),默认 10000 */
|
|
4
|
+
duration?: number;
|
|
5
|
+
/** 抢到红包回调 */
|
|
6
|
+
onGrab?: (amount: number) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const RedPacketRain: React.FC<RedPacketRainProps>;
|
|
9
|
+
export default RedPacketRain;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface ReturnCityProps {
|
|
3
|
-
/**
|
|
3
|
+
/** 星星数量,默认按容器宽度自动计算 */
|
|
4
4
|
starCount?: number;
|
|
5
|
-
/** 光壁数量,默认
|
|
5
|
+
/** 光壁数量,默认 8 */
|
|
6
6
|
glassCount?: number;
|
|
7
7
|
/** 光壁半径(px),默认 150 */
|
|
8
8
|
glassRadius?: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ScrambleTextProps {
|
|
3
|
+
/** 目标文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 解密动画时长(毫秒) */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** 随机字符集 */
|
|
8
|
+
charset?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const ScrambleText: React.FC<ScrambleTextProps>;
|
|
11
|
+
export default ScrambleText;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ScratchCardProps {
|
|
3
|
+
/** 涂层颜色 */
|
|
4
|
+
coverColor?: string;
|
|
5
|
+
/** 奖品文字 */
|
|
6
|
+
prize?: string;
|
|
7
|
+
/** 刮开完成回调 */
|
|
8
|
+
onReveal?: () => void;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const ScratchCard: React.FC<ScratchCardProps>;
|
|
13
|
+
export default ScratchCard;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SlotMachineProps {
|
|
3
|
+
/** 符号列表 */
|
|
4
|
+
symbols?: string[];
|
|
5
|
+
/** 旋转结束回调 */
|
|
6
|
+
onSpinEnd?: (results: string[]) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const SlotMachine: React.FC<SlotMachineProps>;
|
|
9
|
+
export default SlotMachine;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SnowfallProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
/** 飘落模式 */
|
|
6
|
+
mode?: 'snow' | 'sakura';
|
|
7
|
+
/** 粒子数量 */
|
|
8
|
+
count?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const Snowfall: React.FC<SnowfallProps>;
|
|
11
|
+
export default Snowfall;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SplitRevealProps {
|
|
3
|
+
/** 显示文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 每个字符的延迟间隔(毫秒) */
|
|
6
|
+
delay?: number;
|
|
7
|
+
/** 文字颜色 */
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const SplitReveal: React.FC<SplitRevealProps>;
|
|
11
|
+
export default SplitReveal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SpotlightProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/** 聚光半径,默认 120 */
|
|
5
|
+
radius?: number;
|
|
6
|
+
/** 遮罩颜色,默认 rgba(0,0,0,0.85) */
|
|
7
|
+
dimColor?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Spotlight: React.FC<SpotlightProps>;
|
|
10
|
+
export default Spotlight;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StarfieldProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
/** 星星数量 */
|
|
6
|
+
starCount?: number;
|
|
7
|
+
/** 飞行速度,默认 1 */
|
|
8
|
+
speed?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const Starfield: React.FC<StarfieldProps>;
|
|
11
|
+
export default Starfield;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export interface WaveButtonProps {
|
|
2
|
+
export interface WaveButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
3
3
|
/** 按钮文字 */
|
|
4
4
|
text?: string;
|
|
5
|
-
/** 点击回调 */
|
|
6
|
-
onClick?: () => void;
|
|
7
5
|
/** 主色 */
|
|
8
6
|
color?: string;
|
|
9
7
|
}
|