cos-design 3.5.5 → 3.7.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 +37 -0
- package/README.md +87 -52
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +2378 -702
- package/dist/src/components/blurText/index.d.ts +21 -0
- package/dist/src/components/bubbleField/background.d.ts +3 -0
- package/dist/src/components/bubbleField/constants.d.ts +10 -0
- package/dist/src/components/bubbleField/index.d.ts +5 -0
- package/dist/src/components/bubbleField/merge.d.ts +5 -0
- package/dist/src/components/bubbleField/physics.d.ts +12 -0
- package/dist/src/components/bubbleField/render.d.ts +3 -0
- package/dist/src/components/bubbleField/types.d.ts +81 -0
- package/dist/src/components/bubbleField/utils.d.ts +6 -0
- package/dist/src/components/circularText/index.d.ts +17 -0
- package/dist/src/components/countUp/index.d.ts +19 -0
- package/dist/src/components/curvedLoop/index.d.ts +19 -0
- package/dist/src/components/fuzzyText/index.d.ts +21 -0
- package/dist/src/components/gameOfLife/index.d.ts +17 -0
- package/dist/src/components/index.d.ts +30 -0
- package/dist/src/components/networkGraph/index.d.ts +24 -0
- package/dist/src/components/rotatingText/index.d.ts +19 -0
- package/dist/src/components/sandFall/index.d.ts +13 -0
- package/dist/src/components/shinyText/index.d.ts +17 -0
- package/dist/src/components/splitText/index.d.ts +21 -0
- package/dist/src/components/springMass/index.d.ts +17 -0
- package/dist/src/components/textMorph/index.d.ts +15 -0
- package/dist/src/components/trueFocus/index.d.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface BlurTextProps {
|
|
3
|
+
/** 显示文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 按词或按字拆分 */
|
|
6
|
+
animateBy?: 'words' | 'letters';
|
|
7
|
+
/** 入场方向 */
|
|
8
|
+
direction?: 'top' | 'bottom';
|
|
9
|
+
/** 相邻单元延迟(毫秒) */
|
|
10
|
+
stagger?: number;
|
|
11
|
+
/** 单单元动画时长(毫秒) */
|
|
12
|
+
duration?: number;
|
|
13
|
+
/** 字号 */
|
|
14
|
+
fontSize?: number;
|
|
15
|
+
/** 颜色 */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** 动画完成后回调 */
|
|
18
|
+
onAnimationComplete?: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const BlurText: React.FC<BlurTextProps>;
|
|
21
|
+
export default BlurText;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const drawStaticBackground: (ctx: CanvasRenderingContext2D, width: number, height: number, tint: string) => void;
|
|
2
|
+
export declare const drawDynamicBackground: (ctx: CanvasRenderingContext2D, width: number, height: number, time: number, snowSprite: HTMLCanvasElement, reduceMotion: boolean) => void;
|
|
3
|
+
export declare const createSnowSprite: () => HTMLCanvasElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PointerState } from './types';
|
|
2
|
+
export declare const BLOB_SEGMENTS = 48;
|
|
3
|
+
export declare const META_SEGMENTS = 56;
|
|
4
|
+
export declare const LIGHT_X = 0.82;
|
|
5
|
+
export declare const LIGHT_Y = 0.08;
|
|
6
|
+
export declare const MAX_RADIUS = 46;
|
|
7
|
+
export declare const MAX_DPR = 2;
|
|
8
|
+
export declare const FRAME_MS: number;
|
|
9
|
+
export declare const MERGE_CELL_SIZE: number;
|
|
10
|
+
export declare const createPointerState: () => PointerState;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ActiveMerge, Bubble, MergePose } from './types';
|
|
2
|
+
export declare const resolveMergePose: (merge: ActiveMerge) => MergePose;
|
|
3
|
+
export declare const applyMergeAttraction: (bubbles: Bubble[]) => void;
|
|
4
|
+
export declare const startNearbyMerges: (bubbles: Bubble[], merges: ActiveMerge[], busyIds: Set<number>) => void;
|
|
5
|
+
export declare const updateMerges: (bubbles: Bubble[], merges: ActiveMerge[], speedScale: number, frameScale: number) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Bubble } from './types';
|
|
2
|
+
export declare const createSeabedBubble: (id: number, width: number, height: number, speed: number, deep?: boolean) => Bubble;
|
|
3
|
+
export declare const integrateBubbleMotion: (bubble: Bubble, time: number, height: number, speedScale: number, frameScale: number) => void;
|
|
4
|
+
export declare const samplePointerFlow: (bx: number, by: number, px: number, py: number, pvx: number, pvy: number, pSpeed: number) => {
|
|
5
|
+
fx: number;
|
|
6
|
+
fy: number;
|
|
7
|
+
strain: number;
|
|
8
|
+
strainAngle: number;
|
|
9
|
+
excite: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const integrateSurfaceModes: (bubble: Bubble, frameScale: number) => void;
|
|
12
|
+
export declare const exciteBubbleFromFlow: (bubble: Bubble, strain: number, strainAngle: number, excite: number, fx: number, fy: number) => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Bubble } from './types';
|
|
2
|
+
export declare const drawBubble: (ctx: CanvasRenderingContext2D, bubble: Bubble, time: number, tint: string, width: number, height: number) => void;
|
|
3
|
+
export declare const drawMergingPair: (ctx: CanvasRenderingContext2D, ax: number, ay: number, ar: number, bx: number, by: number, br: number, tint: string, width: number, height: number, alpha: number) => void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface BubbleFieldProps {
|
|
2
|
+
width?: number;
|
|
3
|
+
height?: number;
|
|
4
|
+
/** 气泡数量上限 */
|
|
5
|
+
bubbleCount?: number;
|
|
6
|
+
/** 上浮速度 */
|
|
7
|
+
speed?: number;
|
|
8
|
+
/** 水体主色 */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** 是否启用鼠标划过扰动 */
|
|
11
|
+
interactive?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface PointerState {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
prevX: number;
|
|
17
|
+
prevY: number;
|
|
18
|
+
vx: number;
|
|
19
|
+
vy: number;
|
|
20
|
+
speed: number;
|
|
21
|
+
active: boolean;
|
|
22
|
+
lastTs: number;
|
|
23
|
+
}
|
|
24
|
+
export interface Bubble {
|
|
25
|
+
id: number;
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
radius: number;
|
|
29
|
+
/** 目标终端上升速度(向上为正) */
|
|
30
|
+
terminalRise: number;
|
|
31
|
+
drift: number;
|
|
32
|
+
vx: number;
|
|
33
|
+
/** 竖直速度,向上为负(屏幕坐标) */
|
|
34
|
+
vy: number;
|
|
35
|
+
phase: number;
|
|
36
|
+
alpha: number;
|
|
37
|
+
/** 轻微椭圆度(接近 1 = 近球形) */
|
|
38
|
+
aspect: number;
|
|
39
|
+
deformAmp: number;
|
|
40
|
+
deformPhase: number;
|
|
41
|
+
deformSpeed: number;
|
|
42
|
+
tilt: number;
|
|
43
|
+
pulseBoost: number;
|
|
44
|
+
/** 粘性拉伸强度(沿相对流速) */
|
|
45
|
+
streamStretch: number;
|
|
46
|
+
/** 拉伸主轴方向 */
|
|
47
|
+
streamAngle: number;
|
|
48
|
+
/** 二阶表面模态振幅(椭圆振荡) */
|
|
49
|
+
mode2: number;
|
|
50
|
+
mode2Vel: number;
|
|
51
|
+
mode2Angle: number;
|
|
52
|
+
/** 三阶表面模态振幅(非对称抖动) */
|
|
53
|
+
mode3: number;
|
|
54
|
+
mode3Vel: number;
|
|
55
|
+
mode3Phase: number;
|
|
56
|
+
/** 融合后短暂振荡(快速衰减) */
|
|
57
|
+
settle: number;
|
|
58
|
+
}
|
|
59
|
+
export interface MergePose {
|
|
60
|
+
ax: number;
|
|
61
|
+
ay: number;
|
|
62
|
+
ar: number;
|
|
63
|
+
bx: number;
|
|
64
|
+
by: number;
|
|
65
|
+
br: number;
|
|
66
|
+
approach: number;
|
|
67
|
+
absorb: number;
|
|
68
|
+
}
|
|
69
|
+
export interface ActiveMerge {
|
|
70
|
+
primaryId: number;
|
|
71
|
+
secondaryId: number;
|
|
72
|
+
progress: number;
|
|
73
|
+
targetRadius: number;
|
|
74
|
+
startPrimaryRadius: number;
|
|
75
|
+
startSecondaryRadius: number;
|
|
76
|
+
startPrimaryX: number;
|
|
77
|
+
startPrimaryY: number;
|
|
78
|
+
startSecondaryX: number;
|
|
79
|
+
startSecondaryY: number;
|
|
80
|
+
pose?: MergePose;
|
|
81
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const easeInOut: (t: number) => number;
|
|
2
|
+
export declare const easeOutCubic: (t: number) => number;
|
|
3
|
+
export declare const smoothstep: (edge0: number, edge1: number, x: number) => number;
|
|
4
|
+
export declare const frameDamp: (value: number, frameScale: number) => number;
|
|
5
|
+
export declare const hash01: (n: number) => number;
|
|
6
|
+
export declare const terminalRiseForRadius: (radius: number, speed: number, randomize?: boolean) => number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CircularTextProps {
|
|
3
|
+
/** 环绕文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 一圈旋转时长(秒) */
|
|
6
|
+
spinDuration?: number;
|
|
7
|
+
/** 悬停行为 */
|
|
8
|
+
onHover?: 'slowDown' | 'speedUp' | 'pause' | 'goBonkers';
|
|
9
|
+
/** 字号 */
|
|
10
|
+
fontSize?: number;
|
|
11
|
+
/** 圆环半径(像素) */
|
|
12
|
+
radius?: number;
|
|
13
|
+
/** 文字颜色 */
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const CircularText: React.FC<CircularTextProps>;
|
|
17
|
+
export default CircularText;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CountUpProps {
|
|
3
|
+
/** 目标值 */
|
|
4
|
+
value: number;
|
|
5
|
+
/** 起始值 */
|
|
6
|
+
start?: number;
|
|
7
|
+
/** 动画时长(毫秒) */
|
|
8
|
+
duration?: number;
|
|
9
|
+
/** 小数位数 */
|
|
10
|
+
decimals?: number;
|
|
11
|
+
/** 前缀 */
|
|
12
|
+
prefix?: string;
|
|
13
|
+
/** 后缀 */
|
|
14
|
+
suffix?: string;
|
|
15
|
+
/** 主色 */
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const CountUp: React.FC<CountUpProps>;
|
|
19
|
+
export default CountUp;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CurvedLoopProps {
|
|
3
|
+
/** 跑马灯文案 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 滚动速度(像素/帧) */
|
|
6
|
+
speed?: number;
|
|
7
|
+
/** 曲线幅度 */
|
|
8
|
+
curveAmount?: number;
|
|
9
|
+
/** 初始方向 */
|
|
10
|
+
direction?: 'left' | 'right';
|
|
11
|
+
/** 是否可拖拽 */
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
/** 文字颜色 */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** 字号(相对 SVG) */
|
|
16
|
+
fontSize?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const CurvedLoop: React.FC<CurvedLoopProps>;
|
|
19
|
+
export default CurvedLoop;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FuzzyTextProps {
|
|
3
|
+
/** 显示文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 字号 */
|
|
6
|
+
fontSize?: number;
|
|
7
|
+
/** 字重 */
|
|
8
|
+
fontWeight?: number;
|
|
9
|
+
/** 颜色 */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** 基础抖动强度 0~1 */
|
|
12
|
+
baseIntensity?: number;
|
|
13
|
+
/** 悬停抖动强度 0~1 */
|
|
14
|
+
hoverIntensity?: number;
|
|
15
|
+
/** 是否启用悬停增强 */
|
|
16
|
+
enableHover?: boolean;
|
|
17
|
+
/** 抖动像素范围 */
|
|
18
|
+
fuzzRange?: number;
|
|
19
|
+
}
|
|
20
|
+
declare const FuzzyText: React.FC<FuzzyTextProps>;
|
|
21
|
+
export default FuzzyText;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface GameOfLifeProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
/** 单元格大小 */
|
|
6
|
+
cellSize?: number;
|
|
7
|
+
/** 演化速度(毫秒/代) */
|
|
8
|
+
speed?: number;
|
|
9
|
+
/** 初始存活密度 0~1 */
|
|
10
|
+
density?: number;
|
|
11
|
+
/** 存活颜色 */
|
|
12
|
+
aliveColor?: string;
|
|
13
|
+
/** 网格线颜色 */
|
|
14
|
+
gridColor?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const GameOfLife: React.FC<GameOfLifeProps>;
|
|
17
|
+
export default GameOfLife;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as BarcodeScan } from './barcodeScan';
|
|
2
2
|
export type { BarcodeScanProps } from './barcodeScan';
|
|
3
|
+
export { default as BlurText } from './blurText';
|
|
4
|
+
export type { BlurTextProps } from './blurText';
|
|
3
5
|
export { default as BurnAway } from './burnAway';
|
|
4
6
|
export type { BurnAwayProps } from './burnAway';
|
|
5
7
|
export { default as Aurora } from './aurora';
|
|
@@ -10,13 +12,18 @@ export { default as CanvasClock } from './canvasClock';
|
|
|
10
12
|
export type { CanvasClockProps } from './canvasClock';
|
|
11
13
|
export { default as Charge } from './charge';
|
|
12
14
|
export type { ChargeProps } from './charge';
|
|
15
|
+
export { default as CircularText } from './circularText';
|
|
16
|
+
export type { CircularTextProps } from './circularText';
|
|
13
17
|
export { default as ClickSpark } from './clickSpark';
|
|
14
18
|
export type { ClickSparkProps } from './clickSpark';
|
|
15
19
|
export { default as Confetti } from './confetti';
|
|
20
|
+
export { default as CurvedLoop } from './curvedLoop';
|
|
21
|
+
export type { CurvedLoopProps } from './curvedLoop';
|
|
16
22
|
export { default as CyberGrid } from './cyberGrid';
|
|
17
23
|
export type { CyberGridProps } from './cyberGrid';
|
|
18
24
|
export type { ConfettiHandle, ConfettiProps } from './confetti';
|
|
19
25
|
export { default as Countdown } from './countdown';
|
|
26
|
+
export { default as CountUp } from './countUp';
|
|
20
27
|
export { default as DnaHelix } from './dnaHelix';
|
|
21
28
|
export type { DnaHelixProps } from './dnaHelix';
|
|
22
29
|
export { default as ElectricArc } from './electricArc';
|
|
@@ -31,9 +38,14 @@ export type { DoublePendulumProps } from './doublePendulum';
|
|
|
31
38
|
export { default as Fireworks } from './fireworks';
|
|
32
39
|
export type { FireworksHandle, FireworksProps } from './fireworks';
|
|
33
40
|
export { default as FlipCounter } from './flipCounter';
|
|
41
|
+
export type { CountUpProps } from './countUp';
|
|
42
|
+
export { default as FuzzyText } from './fuzzyText';
|
|
43
|
+
export type { FuzzyTextProps } from './fuzzyText';
|
|
34
44
|
export { default as GradientFlow } from './gradientFlow';
|
|
35
45
|
export type { GradientFlowProps } from './gradientFlow';
|
|
36
46
|
export type { FlipCounterProps } from './flipCounter';
|
|
47
|
+
export { default as GameOfLife } from './gameOfLife';
|
|
48
|
+
export type { GameOfLifeProps } from './gameOfLife';
|
|
37
49
|
export { default as GlitchText } from './glitchText';
|
|
38
50
|
export { default as GravityBalls } from './gravityBalls';
|
|
39
51
|
export type { GravityBallsProps } from './gravityBalls';
|
|
@@ -56,6 +68,8 @@ export type { MazeGeneratorProps } from './mazeGenerator';
|
|
|
56
68
|
export type { MatrixRainProps } from './matrixRain';
|
|
57
69
|
export { default as MeteorRain } from './meteorRain';
|
|
58
70
|
export type { MeteorRainProps } from './meteorRain';
|
|
71
|
+
export { default as NetworkGraph } from './networkGraph';
|
|
72
|
+
export type { NetworkGraphEdge, NetworkGraphNode, NetworkGraphProps } from './networkGraph';
|
|
59
73
|
export { default as NeonText } from './neonText';
|
|
60
74
|
export { default as NewtonCradle } from './newtonCradle';
|
|
61
75
|
export type { NewtonCradleProps } from './newtonCradle';
|
|
@@ -66,6 +80,8 @@ export { default as ParticleNetwork } from './particleNetwork';
|
|
|
66
80
|
export { default as PlasmaBall } from './plasmaBall';
|
|
67
81
|
export type { PlasmaBallProps } from './plasmaBall';
|
|
68
82
|
export { default as SmokeFog } from './smokeFog';
|
|
83
|
+
export { default as BubbleField } from './bubbleField';
|
|
84
|
+
export type { BubbleFieldProps } from './bubbleField';
|
|
69
85
|
export { default as SolarSystem } from './solarSystem';
|
|
70
86
|
export type { SolarSystemProps } from './solarSystem';
|
|
71
87
|
export type { SmokeFogProps } from './smokeFog';
|
|
@@ -83,8 +99,12 @@ export type { RedPacketRainProps } from './redPacketRain';
|
|
|
83
99
|
export { default as ReturnCity } from './returnCity';
|
|
84
100
|
export { default as RopeChain } from './ropeChain';
|
|
85
101
|
export type { RopeChainProps } from './ropeChain';
|
|
102
|
+
export { default as RotatingText } from './rotatingText';
|
|
103
|
+
export type { RotatingTextProps } from './rotatingText';
|
|
86
104
|
export { default as Speedometer } from './speedometer';
|
|
87
105
|
export type { SpeedometerProps } from './speedometer';
|
|
106
|
+
export { default as ShinyText } from './shinyText';
|
|
107
|
+
export type { ShinyTextProps } from './shinyText';
|
|
88
108
|
export { default as TimelinePulse } from './timelinePulse';
|
|
89
109
|
export type { TimelinePulseProps } from './timelinePulse';
|
|
90
110
|
export { default as RippleWater } from './rippleWater';
|
|
@@ -95,13 +115,23 @@ export { default as ScratchCard } from './scratchCard';
|
|
|
95
115
|
export type { ScratchCardProps } from './scratchCard';
|
|
96
116
|
export { default as SlotMachine } from './slotMachine';
|
|
97
117
|
export type { SlotMachineProps } from './slotMachine';
|
|
118
|
+
export { default as SandFall } from './sandFall';
|
|
119
|
+
export type { SandFallProps } from './sandFall';
|
|
98
120
|
export { default as SplitReveal } from './splitReveal';
|
|
99
121
|
export type { SplitRevealProps } from './splitReveal';
|
|
122
|
+
export { default as SplitText } from './splitText';
|
|
123
|
+
export type { SplitTextProps } from './splitText';
|
|
124
|
+
export { default as SpringMass } from './springMass';
|
|
125
|
+
export type { SpringMassProps } from './springMass';
|
|
100
126
|
export { default as Spotlight } from './spotlight';
|
|
101
127
|
export type { SpotlightProps } from './spotlight';
|
|
102
128
|
export type { ReturnCityProps } from './returnCity';
|
|
103
129
|
export type { TurntablePrize, TurntableProps } from './turntable';
|
|
104
130
|
export { default as Turntable } from './turntable';
|
|
131
|
+
export { default as TextMorph } from './textMorph';
|
|
132
|
+
export type { TextMorphProps } from './textMorph';
|
|
133
|
+
export { default as TrueFocus } from './trueFocus';
|
|
134
|
+
export type { TrueFocusProps } from './trueFocus';
|
|
105
135
|
export { default as Typewriter } from './typewriter';
|
|
106
136
|
export type { TypewriterProps } from './typewriter';
|
|
107
137
|
export { default as WaveButton } from './waveButton';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NetworkGraphNode {
|
|
3
|
+
id: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface NetworkGraphEdge {
|
|
8
|
+
source: string;
|
|
9
|
+
target: string;
|
|
10
|
+
}
|
|
11
|
+
export interface NetworkGraphProps {
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
/** 节点列表 */
|
|
15
|
+
nodes?: NetworkGraphNode[];
|
|
16
|
+
/** 边列表 */
|
|
17
|
+
edges?: NetworkGraphEdge[];
|
|
18
|
+
/** 连线颜色 */
|
|
19
|
+
linkColor?: string;
|
|
20
|
+
/** 节点半径 */
|
|
21
|
+
nodeRadius?: number;
|
|
22
|
+
}
|
|
23
|
+
declare const NetworkGraph: React.FC<NetworkGraphProps>;
|
|
24
|
+
export default NetworkGraph;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RotatingTextProps {
|
|
3
|
+
/** 轮播文案列表 */
|
|
4
|
+
texts?: string[];
|
|
5
|
+
/** 切换间隔(毫秒) */
|
|
6
|
+
interval?: number;
|
|
7
|
+
/** 字符错峰延迟(毫秒) */
|
|
8
|
+
stagger?: number;
|
|
9
|
+
/** 单字符动画时长(毫秒) */
|
|
10
|
+
duration?: number;
|
|
11
|
+
/** 字号 */
|
|
12
|
+
fontSize?: number;
|
|
13
|
+
/** 颜色 */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** 高亮背景色 */
|
|
16
|
+
highlightColor?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const RotatingText: React.FC<RotatingTextProps>;
|
|
19
|
+
export default RotatingText;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SandFallProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
/** 像素格大小 */
|
|
6
|
+
cellSize?: number;
|
|
7
|
+
/** 沙粒颜色列表(仅支持 #RRGGBB) */
|
|
8
|
+
colors?: string[];
|
|
9
|
+
/** 每帧生成粒子数 */
|
|
10
|
+
spawnRate?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const SandFall: React.FC<SandFallProps>;
|
|
13
|
+
export default SandFall;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ShinyTextProps {
|
|
3
|
+
/** 显示文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 扫光周期(秒) */
|
|
6
|
+
speed?: number;
|
|
7
|
+
/** 文字底色 */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** 高光色 */
|
|
10
|
+
shineColor?: string;
|
|
11
|
+
/** 字号 */
|
|
12
|
+
fontSize?: number;
|
|
13
|
+
/** 是否暂停动画 */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const ShinyText: React.FC<ShinyTextProps>;
|
|
17
|
+
export default ShinyText;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SplitTextProps {
|
|
3
|
+
/** 显示文字 */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** 动画类型 */
|
|
6
|
+
animation?: 'fadeUp' | 'scale' | 'rotate' | 'blur';
|
|
7
|
+
/** 字符间隔延迟(毫秒) */
|
|
8
|
+
stagger?: number;
|
|
9
|
+
/** 单字符动画时长(毫秒) */
|
|
10
|
+
duration?: number;
|
|
11
|
+
/** 是否循环播放 */
|
|
12
|
+
loop?: boolean;
|
|
13
|
+
/** 循环间歇(毫秒) */
|
|
14
|
+
loopPause?: number;
|
|
15
|
+
/** 字号 */
|
|
16
|
+
fontSize?: number;
|
|
17
|
+
/** 颜色 */
|
|
18
|
+
color?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const SplitText: React.FC<SplitTextProps>;
|
|
21
|
+
export default SplitText;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SpringMassProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
/** 横向质点数量 */
|
|
6
|
+
cols?: number;
|
|
7
|
+
/** 纵向质点数量 */
|
|
8
|
+
rows?: number;
|
|
9
|
+
/** 弹簧刚度 0~1 */
|
|
10
|
+
stiffness?: number;
|
|
11
|
+
/** 速度阻尼 0~1 */
|
|
12
|
+
damping?: number;
|
|
13
|
+
/** 主色 */
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const SpringMass: React.FC<SpringMassProps>;
|
|
17
|
+
export default SpringMass;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TextMorphProps {
|
|
3
|
+
/** 轮播文案 */
|
|
4
|
+
texts?: string[];
|
|
5
|
+
/** 切换周期(毫秒) */
|
|
6
|
+
interval?: number;
|
|
7
|
+
/** 单次 morph 时长(毫秒) */
|
|
8
|
+
duration?: number;
|
|
9
|
+
/** 字号 */
|
|
10
|
+
fontSize?: number;
|
|
11
|
+
/** 主色 */
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const TextMorph: React.FC<TextMorphProps>;
|
|
15
|
+
export default TextMorph;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TrueFocusProps {
|
|
3
|
+
/** 句子文案 */
|
|
4
|
+
sentence?: string;
|
|
5
|
+
/** 分词分隔符 */
|
|
6
|
+
separator?: string;
|
|
7
|
+
/** 是否仅 hover 聚焦 */
|
|
8
|
+
manualMode?: boolean;
|
|
9
|
+
/** 非聚焦词模糊强度(px) */
|
|
10
|
+
blurAmount?: number;
|
|
11
|
+
/** 焦点框颜色 */
|
|
12
|
+
borderColor?: string;
|
|
13
|
+
/** 焦点光晕颜色 */
|
|
14
|
+
glowColor?: string;
|
|
15
|
+
/** 切换动画时长(秒) */
|
|
16
|
+
animationDuration?: number;
|
|
17
|
+
/** 自动切换间歇(秒) */
|
|
18
|
+
pauseBetweenAnimations?: number;
|
|
19
|
+
/** 字号 */
|
|
20
|
+
fontSize?: number;
|
|
21
|
+
/** 文字颜色 */
|
|
22
|
+
color?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const TrueFocus: React.FC<TrueFocusProps>;
|
|
25
|
+
export default TrueFocus;
|