Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
73 lines (62 loc) · 1.47 KB
/
Copy pathtypes.ts
File metadata and controls
73 lines (62 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { LucideIcon } from 'lucide-react';
export type ContentMode = 'icon' | 'text' | 'pixel' | 'image';
export type BackgroundType = 'solid' | 'linear' | 'radial';
export interface GradientPoint {
offset: number;
color: string;
}
export interface PixelGrid {
rows: number;
cols: number;
data: string[]; // Array of hex colors, empty string means transparent
}
export interface IconConfig {
mode: ContentMode;
// Background
backgroundType: BackgroundType;
solidColor: string;
gradientStart: string;
gradientEnd: string;
gradientAngle: number; // for linear
noiseOpacity: number;
radialGlareOpacity: number;
// Icon Mode
selectedIconName: string;
iconColor: string;
iconSize: number;
iconOffsetY: number;
// Text Mode
textContent: string;
fontFamily: string;
textColor: string;
textSize: number;
fontWeight: string;
textOffsetY: number;
// Pixel Mode
pixelGrid: PixelGrid;
pixelColor: string;
pixelSize: number;
pixelRounding: boolean;
pixelRoundingStyle: '25%' | '50%';
// Image Mode
imageSrc: string | null;
imageSize: number;
imageOffsetY: number;
imageColor: string;
// Export
exportSize: number;
withBackground: boolean; // Squircle or transparent
}
export interface Preset {
name: string;
backgroundType: BackgroundType;
solidColor: string;
gradientStart: string;
gradientEnd: string;
gradientAngle: number;
}
export interface FontOption {
name: string;
value: string;
family: string;
}