cos-design 2.4.1 → 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 +22 -0
- package/README.md +26 -20
- 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/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/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/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/waveText/index.d.ts +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2294 -353
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ 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
|
+
|
|
8
29
|
## [2.4.1] - 2026-06-18
|
|
9
30
|
|
|
10
31
|
### Fixed
|
|
@@ -106,6 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
106
127
|
- Webpack 及相关 loader 依赖
|
|
107
128
|
- UMD 格式产物
|
|
108
129
|
|
|
130
|
+
[3.0.0]: https://github.com/jiaxiantao/cos-design/compare/v2.4.1...v3.0.0
|
|
109
131
|
[2.4.1]: https://github.com/jiaxiantao/cos-design/compare/v2.4.0...v2.4.1
|
|
110
132
|
[2.4.0]: https://github.com/jiaxiantao/cos-design/compare/v2.3.0...v2.4.0
|
|
111
133
|
[2.3.0]: https://github.com/jiaxiantao/cos-design/compare/v2.2.0...v2.3.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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface WaveTextProps {
|
|
3
|
+
/** 显示文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 波浪振幅(px) */
|
|
6
|
+
amplitude?: number;
|
|
7
|
+
/** 文字颜色 */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** 字号 */
|
|
10
|
+
fontSize?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const WaveText: React.FC<WaveTextProps>;
|
|
13
|
+
export default WaveText;
|