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.
Files changed (2) hide show
  1. package/dist/lib/render.js +172 -26
  2. package/package.json +1 -1
@@ -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
- // 5-row × 5-col ASCII digit set · used for the hero score.
27
- // Hand-rolled (no external font dep) so the bundle stays tiny.
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
- '1': [' ▄█ ', ' █ ', ' █ ', ' █ ', ' ▄█▄'],
31
- '2': ['█▀▀▀█', ' █', '█▀▀▀▀', '█ ', '█▄▄▄▄'],
32
- '3': ['█▀▀▀█', ' ', ' ▀▀▀█', ' █', '█▄▄▄█'],
33
- '4': ['█ █', '█ █', '█▄▄▄█', ' ', ' █'],
34
- '5': ['█▀▀▀▀', '█ ', '▀▀▀▀█', ' █', '█▄▄▄█'],
35
- '6': ['█▀▀▀▀', '█ ', '█▀▀▀█', '█ █', '█▄▄▄█'],
36
- '7': ['█▀▀▀█', ' ', ' ▄▀', ' ▄▀ ', ' ▄▀ '],
37
- '8': ['█▀▀▀█', '█ █', '█▀▀▀█', '█ █', '█▄▄▄█'],
38
- '9': ['█▀▀▀█', '█ █', '█▄▄▄█', ' █', '█▄▄▄█'],
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
- /** Render a string ("68", "100", "82/100") as 5 rows of big ASCII.
43
- * Block runes ('█▀▄') render wider than ASCII chars in most monospace
44
- * fonts; what looks like 1 col-width is actually closer to 1.2-1.5×.
45
- * Earlier 1-space and 2-space gutters left adjacent digits visually
46
- * fused. We now use a 4-space gutter wide enough that '0' next to
47
- * '0' reads as TWO digits rather than one wide blob. */
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 = ' '; // 4-space gutter between glyphs
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 < 5; 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 URLs
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
- const footerPad = Math.max(0, 58 - 'commit.show'.length - 2);
274
- lines.push(' '.repeat(footerPad) + c.gold('commit.show'));
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitshow",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "commit.show CLI — audit any vibe-coded project from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {