commitshow 0.3.20 → 0.3.22

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.
Files changed (2) hide show
  1. package/dist/lib/render.js +270 -7
  2. package/package.json +1 -1
@@ -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
  " ",
@@ -146,6 +223,175 @@ function bigText(text) {
146
223
  }
147
224
  return rows;
148
225
  }
226
+ // XL digit font · 12×12 chunky pixel art for the trophy big-score. Only
227
+ // uses `█` and ` ` so horizontal scaling stays clean (ANSI Shadow's
228
+ // box-drawing chars don't tile when doubled — `╔╔` reads as garbage).
229
+ // Designed proportionally (≈ 1:1.3 visual ratio because terminal cells
230
+ // are ~2:1 H:W) so a 2-digit score reads as "scaled up", not
231
+ // "elongated". Used by bigTextXL · NOT by bigText (which still does
232
+ // ANSI Shadow for any future banner use).
233
+ const XL_ROWS = 12;
234
+ const BIG_DIGITS_XL = {
235
+ "0": [
236
+ " ████████ ",
237
+ " ██ ██ ",
238
+ "██ ██",
239
+ "██ ██",
240
+ "██ ██",
241
+ "██ ██",
242
+ "██ ██",
243
+ "██ ██",
244
+ "██ ██",
245
+ "██ ██",
246
+ " ██ ██ ",
247
+ " ████████ ",
248
+ ],
249
+ "1": [
250
+ " ██ ",
251
+ " ███ ",
252
+ " ████ ",
253
+ " ██ ",
254
+ " ██ ",
255
+ " ██ ",
256
+ " ██ ",
257
+ " ██ ",
258
+ " ██ ",
259
+ " ██ ",
260
+ " ██ ",
261
+ "████████████",
262
+ ],
263
+ "2": [
264
+ " ████████ ",
265
+ "██ ██",
266
+ " ██",
267
+ " ██ ",
268
+ " ██ ",
269
+ " ██ ",
270
+ " ██ ",
271
+ " ██ ",
272
+ " ██ ",
273
+ " ██ ",
274
+ "██ ",
275
+ "████████████",
276
+ ],
277
+ "3": [
278
+ " ████████ ",
279
+ "██ ██",
280
+ " ██",
281
+ " ██",
282
+ " ██",
283
+ " ████████ ",
284
+ " ██",
285
+ " ██",
286
+ " ██",
287
+ " ██",
288
+ "██ ██",
289
+ " ████████ ",
290
+ ],
291
+ "4": [
292
+ "██ ██",
293
+ "██ ██",
294
+ "██ ██",
295
+ "██ ██",
296
+ "██ ██",
297
+ "██ ██",
298
+ "████████████",
299
+ " ██",
300
+ " ██",
301
+ " ██",
302
+ " ██",
303
+ " ██",
304
+ ],
305
+ "5": [
306
+ "████████████",
307
+ "██ ",
308
+ "██ ",
309
+ "██ ",
310
+ "██ ",
311
+ "███████████ ",
312
+ " ██",
313
+ " ██",
314
+ " ██",
315
+ " ██",
316
+ "██ ██",
317
+ " ████████ ",
318
+ ],
319
+ "6": [
320
+ " ████████ ",
321
+ "██ ██",
322
+ "██ ",
323
+ "██ ",
324
+ "██ ",
325
+ "███████████ ",
326
+ "██ ██",
327
+ "██ ██",
328
+ "██ ██",
329
+ "██ ██",
330
+ "██ ██",
331
+ " ████████ ",
332
+ ],
333
+ "7": [
334
+ "████████████",
335
+ "████████████",
336
+ " ██",
337
+ " ██",
338
+ " ██ ",
339
+ " ██ ",
340
+ " ██ ",
341
+ " ██ ",
342
+ " ██ ",
343
+ " ██ ",
344
+ " ██ ",
345
+ " ██ ",
346
+ ],
347
+ "8": [
348
+ " ████████ ",
349
+ "██ ██",
350
+ "██ ██",
351
+ "██ ██",
352
+ "██ ██",
353
+ " ████████ ",
354
+ "██ ██",
355
+ "██ ██",
356
+ "██ ██",
357
+ "██ ██",
358
+ "██ ██",
359
+ " ████████ ",
360
+ ],
361
+ "9": [
362
+ " ████████ ",
363
+ "██ ██",
364
+ "██ ██",
365
+ "██ ██",
366
+ "██ ██",
367
+ " ███████████",
368
+ " ██",
369
+ " ██",
370
+ " ██",
371
+ " ██",
372
+ "██ ██",
373
+ " ████████ ",
374
+ ],
375
+ " ": [
376
+ " ", " ", " ", " ", " ", " ",
377
+ " ", " ", " ", " ", " ", " ",
378
+ ],
379
+ };
380
+ /** XL render · 12-row chunky pixel art, used by the trophy. 1-space
381
+ * gutter between glyphs, no leading/trailing pad (each glyph already
382
+ * carries internal whitespace). */
383
+ function bigTextXL(text) {
384
+ const rows = Array.from({ length: XL_ROWS }, () => '');
385
+ const GAP = ' ';
386
+ for (let i = 0; i < text.length; i++) {
387
+ const ch = text[i];
388
+ const glyph = BIG_DIGITS_XL[ch] ?? BIG_DIGITS_XL[' '];
389
+ for (let r = 0; r < XL_ROWS; r++) {
390
+ rows[r] += glyph[r] + (i < text.length - 1 ? GAP : '');
391
+ }
392
+ }
393
+ return rows;
394
+ }
149
395
  /** Visible (rune) length — counts Unicode code points so the centering math
150
396
  * treats `█` and `╔` as one column each, matching how monospace terminals
151
397
  * render the ANSI Shadow font. */
@@ -224,12 +470,22 @@ export function renderAudit(view) {
224
470
  const WALK_ON_AUDIT_MAX = 50;
225
471
  const isWalkOn = p.status === 'preview';
226
472
  const total = p.score_total ?? 0;
227
- // Header
473
+ // Header · Claude Code-style welcome strip. Rounded corners (╭ ╮ ╰ ╯)
474
+ // + ✻ glyph match the visual signature Claude Code uses on launch.
475
+ // The ✻ is part of the wordmark line, not a separate panel — keeps
476
+ // the header to a single tight row.
228
477
  const lines = [];
229
- lines.push(boxTop());
230
- lines.push(boxRow(
231
- /* visibleLen */ 'commit.show · Audit report'.length, c.bold(c.gold('commit.show')) + c.muted(' · ') + c.cream('Audit report')));
232
- lines.push(boxBottom());
478
+ const roundTop = c.muted('╭' + '─'.repeat(INSIDE_W) + '╮');
479
+ const roundBottom = c.muted('╰' + '─'.repeat(INSIDE_W) + '╯');
480
+ lines.push(roundTop);
481
+ const titleVisible = '✻ commit.show — Audit report';
482
+ const titleColored = c.bold(c.gold('✻'))
483
+ + ' '
484
+ + c.bold(c.gold('commit.show'))
485
+ + c.muted(' — ')
486
+ + c.cream('Audit report');
487
+ lines.push(boxRow(titleVisible.length, titleColored));
488
+ lines.push(roundBottom);
233
489
  lines.push('');
234
490
  // Project title line
235
491
  const name = p.project_name ?? 'untitled';
@@ -369,7 +625,11 @@ export function renderAudit(view) {
369
625
  // showing project identity, score, and brand mark in one frame.
370
626
  const band = total >= 75 ? 'strong' : total >= 50 ? 'mid' : 'weak';
371
627
  const bandTone = scoreTone(total);
372
- const bigRows = bigText(String(total));
628
+ // 12×12 chunky pixel-art digits via bigTextXL · scales BOTH width and
629
+ // height (vs. row-doubling alone, which made the score read as
630
+ // elongated rather than enlarged). Pure block characters tile cleanly
631
+ // when concatenated — no ANSI Shadow box-drawing artifacts.
632
+ const bigRows = bigTextXL(String(total));
373
633
  const bigWidth = bigRows[0].length;
374
634
  // Trophy: name strip + big digits + caption inside one ╔═╗ frame so a
375
635
  // crop of just the trophy tells the whole story (project · score · band).
@@ -410,7 +670,10 @@ export function renderAudit(view) {
410
670
  [0xA8, 0x70, 0x18], // row 5 · base shadow
411
671
  ];
412
672
  for (let i = 0; i < bigRows.length; i++) {
413
- const [rr, gg, bb] = GOLD_GRADIENT[Math.min(i, GOLD_GRADIENT.length - 1)];
673
+ // Map row index to gradient bucket so 12 doubled rows still distribute
674
+ // smoothly across the 6 gold tones (each tone covers 2 doubled rows).
675
+ const gradIdx = Math.min(GOLD_GRADIENT.length - 1, Math.floor((i * GOLD_GRADIENT.length) / bigRows.length));
676
+ const [rr, gg, bb] = GOLD_GRADIENT[gradIdx];
414
677
  const colored = `\x1b[38;2;${rr};${gg};${bb}m${bigRows[i]}\x1b[0m`;
415
678
  lines.push(trophyIndent + trophyRow(bigWidth, colored));
416
679
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitshow",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "description": "commit.show CLI — audit any vibe-coded project from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {