-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtypes.ts
More file actions
100 lines (90 loc) · 3.15 KB
/
types.ts
File metadata and controls
100 lines (90 loc) · 3.15 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Re-export badge types from the dedicated badge types file
export type { BadgeType, UserBadgeType, ProjectBadgeType, BadgeTheme, BadgeOptions, BadgeRouteDoc } from './types/badge.types.js';
export { BADGE_OPTIONAL_PARAMS } from './types/badge.types.js';
export interface GitHubStats {
name: string;
avatarUrl: string;
totalStars: number;
totalCommits: number;
totalPRs: number;
totalIssues: number;
contributedTo: number;
rank?: {
level: string;
score: number;
};
}
export interface LanguageCount {
name: string;
count: number;
}
export interface Theme {
/** Card/graph title text color */
titleColor: string;
/** General body text, labels, and subtitle color */
textColor: string;
/** Icons, accents, graph heatmap cell fill color, and data chart color */
iconColor: string;
/** Card/graph background fill color */
bgColor: string;
/** Card border, divider lines, and grid line color */
borderColor: string;
/** Font name (e.g. 'Orbitron') — defaults to Orbitron */
fontName?: string;
/** Full CSS font-family stack (e.g. "'Orbitron', sans-serif") */
fontFamily?: string;
/** URL to the woff2 font file for @font-face embedding */
fontUrl?: string;
}
export interface ThemeOverrides {
theme?: string;
bgColor?: string;
borderColor?: string;
textColor?: string;
titleColor?: string;
}
export interface StatsCardOptions extends ThemeOverrides {
hideTitle?: boolean;
hideBorder?: boolean;
hideRank?: boolean;
showIcons?: boolean;
customTitle?: string;
avatarMode?: 'none' | 'avatar' | 'radar';
dataBorderStyle?: 'solid' | 'frame';
dataBorderFramePosition?: 'in' | 'out';
}
export interface LanguagesCardOptions extends ThemeOverrides {
showInfo?: boolean;
listLength?: number;
variant?: 'bubbles' | 'pie';
dataBorderStyle?: 'solid' | 'frame';
dataBorderFramePosition?: 'in' | 'out';
}
export interface LanguagesPieChartOptions extends ThemeOverrides {
listLength?: number;
}
export interface ContributionDay {
date: string;
count: number;
level: number;
}
export interface ContributionGraphData {
username: string;
year: string | number;
totalContributions: number;
weeks: ContributionDay[][];
}
export interface GraphCardOptions extends ThemeOverrides {
year?: string | number;
animate?: 'none' | 'glow' | 'wave' | 'pulse';
/** Output format. Default: 'svg'. Use 'webp', 'png', or 'gif' for raster conversion. */
as?: 'svg' | 'webp' | 'png' | 'gif';
/** Canvas size preset. 'default' = 1200×600, 'small' = 800×400, 'medium' = 1000×500, 'large' = 1400×700 */
size?: 'small' | 'medium' | 'large' | 'default';
/** Show/hide the title (username + year). When false, content is centered. Default: true */
show_title?: boolean;
/** Show/hide the total contributions subtitle. When false, SVG height shrinks to fit content. Default: true */
show_total_contribution?: boolean;
/** Show/hide the background (gradient, stars, grid lines). When false, bg is transparent and SVG width fits the cells. Default: true */
show_background?: boolean;
}