commitshow 0.3.3 → 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 +172 -26
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -23,35 +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
|
-
const GAP = '
|
|
186
|
+
const rows = Array.from({ length: BIG_ROWS }, () => '');
|
|
187
|
+
const GAP = ' '; // 6-space gutter between glyphs
|
|
51
188
|
for (let i = 0; i < text.length; i++) {
|
|
52
189
|
const ch = text[i];
|
|
53
190
|
const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
|
|
54
|
-
for (let r = 0; r <
|
|
191
|
+
for (let r = 0; r < BIG_ROWS; r++)
|
|
55
192
|
rows[r] += glyph[r] + (i < text.length - 1 ? GAP : '');
|
|
56
193
|
}
|
|
57
194
|
return rows;
|
|
@@ -178,6 +315,10 @@ export function renderAudit(view) {
|
|
|
178
315
|
for (const row of bigRows) {
|
|
179
316
|
lines.push(' ' + ' '.repeat(leftPad) + c.goldDeep(row));
|
|
180
317
|
}
|
|
318
|
+
// Breathing room between the hero ASCII and the small caption. Without
|
|
319
|
+
// it the "/ 100 · walk-on · strong" line glues to the bottom of the
|
|
320
|
+
// digits and the score reads as one block.
|
|
321
|
+
lines.push('');
|
|
181
322
|
// Caption · small "/ 100 · band" · band tinted so the signal lives there.
|
|
182
323
|
// Walk-on track gets an extra middle segment + a sub-line surfacing the
|
|
183
324
|
// 95 max so users read the score in the right context (88 walk-on ≠ 88
|
|
@@ -267,11 +408,16 @@ export function renderAudit(view) {
|
|
|
267
408
|
lines.push(' ' + c.muted('Δ ') + deltaTone(d)(pad(`${sign}${d}`, 12)) + c.muted(` since last audit`));
|
|
268
409
|
}
|
|
269
410
|
lines.push('');
|
|
270
|
-
// Footer
|
|
411
|
+
// Footer · project URL on its own line, brand wordmark on its own line,
|
|
412
|
+
// separated by a blank so a wrapped URL on a narrow terminal can't shove
|
|
413
|
+
// the wordmark off the right edge. Wordmark right-aligns to the standard
|
|
414
|
+
// 58-char layout box used by every other panel.
|
|
271
415
|
const url = `https://commit.show/projects/${p.id}`;
|
|
272
416
|
lines.push(' ' + c.muted('→ ') + c.cream(url));
|
|
273
|
-
|
|
274
|
-
|
|
417
|
+
lines.push('');
|
|
418
|
+
const wordmark = 'commit.show';
|
|
419
|
+
const footerPad = Math.max(0, BOX_W - wordmark.length);
|
|
420
|
+
lines.push(' '.repeat(footerPad) + c.gold(wordmark));
|
|
275
421
|
return lines.join('\n');
|
|
276
422
|
}
|
|
277
423
|
function vibeChecklistLines(vc) {
|