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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//! Layout and styling constants for the git graph renderer.
// ---------------------------------------------------------------------------
// Layout geometry
// ---------------------------------------------------------------------------
/// Offset added to each commit's axis position (px).
pub const LAYOUT_OFFSET: f64 = 10.0;
/// Distance between consecutive commits on the primary axis (px).
pub const COMMIT_STEP: f64 = 40.0;
/// Default starting position for TB/BT diagrams (px).
pub const DEFAULT_POS: f64 = 30.0;
// ---------------------------------------------------------------------------
// Commit visual geometry
// ---------------------------------------------------------------------------
/// Radius of the commit circle (px).
pub const COMMIT_RADIUS: f64 = 10.0;
/// Number of CSS colour classes cycling through the git theme palette.
pub const THEME_COLOR_LIMIT: usize = 8;
// ---------------------------------------------------------------------------
// Branch labels
// ---------------------------------------------------------------------------
/// Horizontal padding inside a branch label box on each side (px).
pub const BRANCH_LABEL_PADDING: f64 = 10.0;
/// Font size for branch name labels (px).
pub const BRANCH_FONT_SIZE: f64 = 16.0;
/// Scale factor to compensate for difference between bundled Arial and browser-rendered Arial (LR branches).
/// Browser metrics are ~7.5% wider per character at 16px.
pub const BRANCH_FONT_SCALE: f64 = 1.075;
// ---------------------------------------------------------------------------
// Commit labels
// ---------------------------------------------------------------------------
/// Scale factor for commit label text (hex-like strings at 10px, ~14% wider in browser).
pub const COMMIT_LABEL_FONT_SCALE: f64 = 1.14;
/// Scale factor for tag text (short labels at 10px, ~27% wider in browser).
pub const TAG_TEXT_FONT_SCALE: f64 = 1.27;
/// Whether to render commit ID labels below each commit.
pub const SHOW_COMMIT_LABEL: bool = true;
/// Whether to rotate commit labels 45°.
pub const ROTATE_COMMIT_LABEL: bool = false;
// ---------------------------------------------------------------------------
// Arrow arcs
// ---------------------------------------------------------------------------
/// Arc radius used for cross-lane arrows in LR mode (px).
pub const LR_ARC_RADIUS: f64 = 20.0;
/// Arc radius used for cross-lane arrows in TB/BT mode (px).
pub const TB_ARC_RADIUS: f64 = 10.0;
// ---------------------------------------------------------------------------
// Branch colours
// ---------------------------------------------------------------------------
/// Git branch colour palette (fill, stroke) for indices 0–7.
/// Matches Mermaid's default theme gitGraph colours (git0..git7).
pub const GIT_COLORS: = ;
/// Text colours for branch label text, one per branch index (0–7).
pub const BRANCH_LABEL_TEXT_COLORS: = ;