commitshow 0.3.19 → 0.3.21
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 +118 -8
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -118,6 +118,83 @@ const BIG_DIGITS = {
|
|
|
118
118
|
" ██╔╝ ",
|
|
119
119
|
" ╚═╝ ",
|
|
120
120
|
],
|
|
121
|
+
// Uppercase letters — added 2026-05-04 for the COMMIT.SHOW banner that
|
|
122
|
+
// crowns each audit. Same ANSI Shadow font as the digits, transcribed
|
|
123
|
+
// from oh-my-logo / figlet so the wordmark and the score share visual
|
|
124
|
+
// weight. Only the letters needed for "COMMIT.SHOW" are included to
|
|
125
|
+
// keep the dictionary small.
|
|
126
|
+
"C": [
|
|
127
|
+
" ██████╗",
|
|
128
|
+
"██╔════╝",
|
|
129
|
+
"██║ ",
|
|
130
|
+
"██║ ",
|
|
131
|
+
"╚██████╗",
|
|
132
|
+
" ╚═════╝",
|
|
133
|
+
],
|
|
134
|
+
"O": [
|
|
135
|
+
" ██████╗ ",
|
|
136
|
+
"██╔═══██╗",
|
|
137
|
+
"██║ ██║",
|
|
138
|
+
"██║ ██║",
|
|
139
|
+
"╚██████╔╝",
|
|
140
|
+
" ╚═════╝ ",
|
|
141
|
+
],
|
|
142
|
+
"M": [
|
|
143
|
+
"███╗ ███╗",
|
|
144
|
+
"████╗ ████║",
|
|
145
|
+
"██╔████╔██║",
|
|
146
|
+
"██║╚██╔╝██║",
|
|
147
|
+
"██║ ╚═╝ ██║",
|
|
148
|
+
"╚═╝ ╚═╝",
|
|
149
|
+
],
|
|
150
|
+
"I": [
|
|
151
|
+
"██╗",
|
|
152
|
+
"██║",
|
|
153
|
+
"██║",
|
|
154
|
+
"██║",
|
|
155
|
+
"██║",
|
|
156
|
+
"╚═╝",
|
|
157
|
+
],
|
|
158
|
+
"T": [
|
|
159
|
+
"████████╗",
|
|
160
|
+
"╚══██╔══╝",
|
|
161
|
+
" ██║ ",
|
|
162
|
+
" ██║ ",
|
|
163
|
+
" ██║ ",
|
|
164
|
+
" ╚═╝ ",
|
|
165
|
+
],
|
|
166
|
+
"S": [
|
|
167
|
+
"███████╗",
|
|
168
|
+
"██╔════╝",
|
|
169
|
+
"███████╗",
|
|
170
|
+
"╚════██║",
|
|
171
|
+
"███████║",
|
|
172
|
+
"╚══════╝",
|
|
173
|
+
],
|
|
174
|
+
"H": [
|
|
175
|
+
"██╗ ██╗",
|
|
176
|
+
"██║ ██║",
|
|
177
|
+
"███████║",
|
|
178
|
+
"██╔══██║",
|
|
179
|
+
"██║ ██║",
|
|
180
|
+
"╚═╝ ╚═╝",
|
|
181
|
+
],
|
|
182
|
+
"W": [
|
|
183
|
+
"██╗ ██╗",
|
|
184
|
+
"██║ ██║",
|
|
185
|
+
"██║ █╗ ██║",
|
|
186
|
+
"██║███╗██║",
|
|
187
|
+
"╚███╔███╔╝",
|
|
188
|
+
" ╚══╝╚══╝ ",
|
|
189
|
+
],
|
|
190
|
+
".": [
|
|
191
|
+
" ",
|
|
192
|
+
" ",
|
|
193
|
+
" ",
|
|
194
|
+
" ",
|
|
195
|
+
"██╗",
|
|
196
|
+
"╚═╝",
|
|
197
|
+
],
|
|
121
198
|
" ": [
|
|
122
199
|
" ",
|
|
123
200
|
" ",
|
|
@@ -224,12 +301,22 @@ export function renderAudit(view) {
|
|
|
224
301
|
const WALK_ON_AUDIT_MAX = 50;
|
|
225
302
|
const isWalkOn = p.status === 'preview';
|
|
226
303
|
const total = p.score_total ?? 0;
|
|
227
|
-
// Header
|
|
304
|
+
// Header · Claude Code-style welcome strip. Rounded corners (╭ ╮ ╰ ╯)
|
|
305
|
+
// + ✻ glyph match the visual signature Claude Code uses on launch.
|
|
306
|
+
// The ✻ is part of the wordmark line, not a separate panel — keeps
|
|
307
|
+
// the header to a single tight row.
|
|
228
308
|
const lines = [];
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
309
|
+
const roundTop = c.muted('╭' + '─'.repeat(INSIDE_W) + '╮');
|
|
310
|
+
const roundBottom = c.muted('╰' + '─'.repeat(INSIDE_W) + '╯');
|
|
311
|
+
lines.push(roundTop);
|
|
312
|
+
const titleVisible = '✻ commit.show — Audit report';
|
|
313
|
+
const titleColored = c.bold(c.gold('✻'))
|
|
314
|
+
+ ' '
|
|
315
|
+
+ c.bold(c.gold('commit.show'))
|
|
316
|
+
+ c.muted(' — ')
|
|
317
|
+
+ c.cream('Audit report');
|
|
318
|
+
lines.push(boxRow(titleVisible.length, titleColored));
|
|
319
|
+
lines.push(roundBottom);
|
|
233
320
|
lines.push('');
|
|
234
321
|
// Project title line
|
|
235
322
|
const name = p.project_name ?? 'untitled';
|
|
@@ -369,7 +456,12 @@ export function renderAudit(view) {
|
|
|
369
456
|
// showing project identity, score, and brand mark in one frame.
|
|
370
457
|
const band = total >= 75 ? 'strong' : total >= 50 ? 'mid' : 'weak';
|
|
371
458
|
const bandTone = scoreTone(total);
|
|
372
|
-
|
|
459
|
+
// Double each row vertically so the score reads as a billboard, not a
|
|
460
|
+
// ticker. Width stays the same — only height grows from 6 → 12 rows.
|
|
461
|
+
// Naive duplication is fine because ANSI Shadow's diagonals already
|
|
462
|
+
// step in 1-cell increments; doubled they step in 2-cell increments,
|
|
463
|
+
// which reads as "scaled up" rather than "blurry".
|
|
464
|
+
const bigRows = bigText(String(total)).flatMap(r => [r, r]);
|
|
373
465
|
const bigWidth = bigRows[0].length;
|
|
374
466
|
// Trophy: name strip + big digits + caption inside one ╔═╗ frame so a
|
|
375
467
|
// crop of just the trophy tells the whole story (project · score · band).
|
|
@@ -396,8 +488,26 @@ export function renderAudit(view) {
|
|
|
396
488
|
lines.push(trophyIndent + trophyRow(slugVisible.length, c.muted(slugVisible)));
|
|
397
489
|
}
|
|
398
490
|
lines.push(trophyIndent + trophyBlank);
|
|
399
|
-
|
|
400
|
-
|
|
491
|
+
// Metallic-gold gradient · top row brightest, bottom row darkest. Single
|
|
492
|
+
// tone (`c.pixelInk`) read as flat — the SKILLS-style banner Google ships
|
|
493
|
+
// gets its "embossed coin" feel from a vertical light fall-off, which we
|
|
494
|
+
// approximate here within monospace constraints. Six rows because the
|
|
495
|
+
// ANSI Shadow font is 6 tall.
|
|
496
|
+
const GOLD_GRADIENT = [
|
|
497
|
+
[0xFF, 0xE0, 0x78], // row 0 · highlight
|
|
498
|
+
[0xF8, 0xD0, 0x60], // row 1
|
|
499
|
+
[0xF0, 0xC0, 0x40], // row 2 · brand mid
|
|
500
|
+
[0xE0, 0xA8, 0x30], // row 3
|
|
501
|
+
[0xC8, 0x90, 0x20], // row 4
|
|
502
|
+
[0xA8, 0x70, 0x18], // row 5 · base shadow
|
|
503
|
+
];
|
|
504
|
+
for (let i = 0; i < bigRows.length; i++) {
|
|
505
|
+
// Map row index to gradient bucket so 12 doubled rows still distribute
|
|
506
|
+
// smoothly across the 6 gold tones (each tone covers 2 doubled rows).
|
|
507
|
+
const gradIdx = Math.min(GOLD_GRADIENT.length - 1, Math.floor((i * GOLD_GRADIENT.length) / bigRows.length));
|
|
508
|
+
const [rr, gg, bb] = GOLD_GRADIENT[gradIdx];
|
|
509
|
+
const colored = `\x1b[38;2;${rr};${gg};${bb}m${bigRows[i]}\x1b[0m`;
|
|
510
|
+
lines.push(trophyIndent + trophyRow(bigWidth, colored));
|
|
401
511
|
}
|
|
402
512
|
lines.push(trophyIndent + trophyBlank);
|
|
403
513
|
const captionColored = isWalkOn
|