commitshow 0.3.4 → 0.3.5
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/dist/lib/render.js +159 -26
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -23,39 +23,172 @@ function scoreBar(value, max) {
|
|
|
23
23
|
const tone = scoreTone(Math.round((value / max) * 100));
|
|
24
24
|
return tone('▰'.repeat(filled)) + c.muted('▱'.repeat(empty));
|
|
25
25
|
}
|
|
26
|
-
//
|
|
27
|
-
//
|
|
26
|
+
// 10-row × 8-col chunky pixel digit set · two-cell-thick 7-segment digital
|
|
27
|
+
// numerals. CEO referenced the Claude Code "CLAUDE CODE" pixel-grid logo:
|
|
28
|
+
// thick block strokes, segment thickness 2 in pixel space, segments visibly
|
|
29
|
+
// chunky enough to read as a pixel-art numeral on a wide terminal. Solid
|
|
30
|
+
// '█' only — no half-blocks — so the digits stay opaque on every monospace
|
|
31
|
+
// font. Each digit fits in 8 columns; a 3-digit "100" still lands inside
|
|
32
|
+
// the 58-char box with breathing room.
|
|
28
33
|
const BIG_DIGITS = {
|
|
29
|
-
'0': [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
'0': [
|
|
35
|
+
'████████',
|
|
36
|
+
'████████',
|
|
37
|
+
'██ ██',
|
|
38
|
+
'██ ██',
|
|
39
|
+
'██ ██',
|
|
40
|
+
'██ ██',
|
|
41
|
+
'██ ██',
|
|
42
|
+
'██ ██',
|
|
43
|
+
'████████',
|
|
44
|
+
'████████',
|
|
45
|
+
],
|
|
46
|
+
'1': [
|
|
47
|
+
' ██',
|
|
48
|
+
' ██',
|
|
49
|
+
' ██',
|
|
50
|
+
' ██',
|
|
51
|
+
' ██',
|
|
52
|
+
' ██',
|
|
53
|
+
' ██',
|
|
54
|
+
' ██',
|
|
55
|
+
' ██',
|
|
56
|
+
' ██',
|
|
57
|
+
],
|
|
58
|
+
'2': [
|
|
59
|
+
'████████',
|
|
60
|
+
'████████',
|
|
61
|
+
' ██',
|
|
62
|
+
' ██',
|
|
63
|
+
'████████',
|
|
64
|
+
'████████',
|
|
65
|
+
'██ ',
|
|
66
|
+
'██ ',
|
|
67
|
+
'████████',
|
|
68
|
+
'████████',
|
|
69
|
+
],
|
|
70
|
+
'3': [
|
|
71
|
+
'████████',
|
|
72
|
+
'████████',
|
|
73
|
+
' ██',
|
|
74
|
+
' ██',
|
|
75
|
+
'████████',
|
|
76
|
+
'████████',
|
|
77
|
+
' ██',
|
|
78
|
+
' ██',
|
|
79
|
+
'████████',
|
|
80
|
+
'████████',
|
|
81
|
+
],
|
|
82
|
+
'4': [
|
|
83
|
+
'██ ██',
|
|
84
|
+
'██ ██',
|
|
85
|
+
'██ ██',
|
|
86
|
+
'██ ██',
|
|
87
|
+
'████████',
|
|
88
|
+
'████████',
|
|
89
|
+
' ██',
|
|
90
|
+
' ██',
|
|
91
|
+
' ██',
|
|
92
|
+
' ██',
|
|
93
|
+
],
|
|
94
|
+
'5': [
|
|
95
|
+
'████████',
|
|
96
|
+
'████████',
|
|
97
|
+
'██ ',
|
|
98
|
+
'██ ',
|
|
99
|
+
'████████',
|
|
100
|
+
'████████',
|
|
101
|
+
' ██',
|
|
102
|
+
' ██',
|
|
103
|
+
'████████',
|
|
104
|
+
'████████',
|
|
105
|
+
],
|
|
106
|
+
'6': [
|
|
107
|
+
'████████',
|
|
108
|
+
'████████',
|
|
109
|
+
'██ ',
|
|
110
|
+
'██ ',
|
|
111
|
+
'████████',
|
|
112
|
+
'████████',
|
|
113
|
+
'██ ██',
|
|
114
|
+
'██ ██',
|
|
115
|
+
'████████',
|
|
116
|
+
'████████',
|
|
117
|
+
],
|
|
118
|
+
'7': [
|
|
119
|
+
'████████',
|
|
120
|
+
'████████',
|
|
121
|
+
' ██',
|
|
122
|
+
' ██',
|
|
123
|
+
' ██',
|
|
124
|
+
' ██',
|
|
125
|
+
' ██',
|
|
126
|
+
' ██',
|
|
127
|
+
' ██',
|
|
128
|
+
' ██',
|
|
129
|
+
],
|
|
130
|
+
'8': [
|
|
131
|
+
'████████',
|
|
132
|
+
'████████',
|
|
133
|
+
'██ ██',
|
|
134
|
+
'██ ██',
|
|
135
|
+
'████████',
|
|
136
|
+
'████████',
|
|
137
|
+
'██ ██',
|
|
138
|
+
'██ ██',
|
|
139
|
+
'████████',
|
|
140
|
+
'████████',
|
|
141
|
+
],
|
|
142
|
+
'9': [
|
|
143
|
+
'████████',
|
|
144
|
+
'████████',
|
|
145
|
+
'██ ██',
|
|
146
|
+
'██ ██',
|
|
147
|
+
'████████',
|
|
148
|
+
'████████',
|
|
149
|
+
' ██',
|
|
150
|
+
' ██',
|
|
151
|
+
'████████',
|
|
152
|
+
'████████',
|
|
153
|
+
],
|
|
154
|
+
'/': [
|
|
155
|
+
' ██',
|
|
156
|
+
' ██',
|
|
157
|
+
' ██ ',
|
|
158
|
+
' ██ ',
|
|
159
|
+
' ██ ',
|
|
160
|
+
' ██ ',
|
|
161
|
+
' ██ ',
|
|
162
|
+
'██ ',
|
|
163
|
+
'██ ',
|
|
164
|
+
'██ ',
|
|
165
|
+
],
|
|
166
|
+
' ': [
|
|
167
|
+
' ',
|
|
168
|
+
' ',
|
|
169
|
+
' ',
|
|
170
|
+
' ',
|
|
171
|
+
' ',
|
|
172
|
+
' ',
|
|
173
|
+
' ',
|
|
174
|
+
' ',
|
|
175
|
+
' ',
|
|
176
|
+
' ',
|
|
177
|
+
],
|
|
41
178
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
|
|
179
|
+
const BIG_ROWS = 10;
|
|
180
|
+
/** Render a string ("68", "100", "82/100") as 7 rows of solid block ASCII.
|
|
181
|
+
* Block runes ('█') render at ~1.2-1.5× monospace width, so a tight gutter
|
|
182
|
+
* visually fuses neighboring digits. 6 spaces gives the digits room to
|
|
183
|
+
* breathe without pushing 3-digit scores past the 58-char box.
|
|
184
|
+
*/
|
|
48
185
|
function bigText(text) {
|
|
49
|
-
const rows =
|
|
50
|
-
// Block runes (█▀▄) render at ~1.2-1.5× monospace width, so a tight gutter
|
|
51
|
-
// visually fuses neighboring digits (the old 4-space looked like one wide
|
|
52
|
-
// blob on most fonts). 6 spaces gives the digits room to breathe without
|
|
53
|
-
// pushing 3-digit scores past the box width.
|
|
186
|
+
const rows = Array.from({ length: BIG_ROWS }, () => '');
|
|
54
187
|
const GAP = ' '; // 6-space gutter between glyphs
|
|
55
188
|
for (let i = 0; i < text.length; i++) {
|
|
56
189
|
const ch = text[i];
|
|
57
190
|
const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
|
|
58
|
-
for (let r = 0; r <
|
|
191
|
+
for (let r = 0; r < BIG_ROWS; r++)
|
|
59
192
|
rows[r] += glyph[r] + (i < text.length - 1 ? GAP : '');
|
|
60
193
|
}
|
|
61
194
|
return rows;
|