commitshow 0.3.5 → 0.3.7

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.
@@ -11,7 +11,12 @@ function rgb(r, g, b) {
11
11
  }
12
12
  export const c = {
13
13
  gold: rgb(0xF0, 0xC0, 0x40),
14
- goldDeep: rgb(0xD4, 0xA8, 0x38), // slightly darker · used for big-digit hero
14
+ goldDeep: rgb(0xD4, 0xA8, 0x38), // slightly darker · used for box drawing
15
+ // Big-digit hero ink · uses brand gold so the ANSI Shadow numeral reads
16
+ // as a commit.show mark, not a Claude Code mascot. (Earlier peach pass
17
+ // matched the Claude Code logo too literally — CEO pulled it back to
18
+ // brand on 2026-05-02.)
19
+ pixelInk: rgb(0xF0, 0xC0, 0x40),
15
20
  cream: rgb(0xF8, 0xF5, 0xEE),
16
21
  teal: rgb(0x00, 0xD4, 0xAA),
17
22
  scarlet: rgb(0xC8, 0x10, 0x2E),
@@ -23,176 +23,141 @@ 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
- // 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.
26
+ // ANSI Shadow figlet font · transcribed via oh-my-logo --filled. CEO
27
+ // referenced the Claude Code style; Claude Code itself doesn't embed a
28
+ // text-as-ASCII logo (only the Clawd mascot lives in its bundle), but
29
+ // oh-my-logo is the open-source library that imitates the look and ANSI
30
+ // Shadow is the free figlet font it uses. 6 rows tall, variable width per
31
+ // glyph (4 to 10 cols), pre-padded so bigText concats cleanly.
33
32
  const BIG_DIGITS = {
34
- '0': [
35
- '████████',
36
- '████████',
37
- '██ ██',
38
- '██ ██',
39
- '██ ██',
40
- '██ ██',
41
- '██ ██',
42
- '██ ██',
43
- '████████',
44
- '████████',
33
+ "0": [
34
+ " ██████╗ ",
35
+ " ██╔═████╗",
36
+ " ██║██╔██║",
37
+ " ████╔╝██║",
38
+ " ╚██████╔╝",
39
+ " ╚═════╝ ",
45
40
  ],
46
- '1': [
47
- ' ██',
48
- ' ██',
49
- ' ██',
50
- ' ██',
51
- ' ██',
52
- ' ██',
53
- ' ██',
54
- ' ██',
55
- ' ██',
56
- ' ██',
41
+ "1": [
42
+ " ██╗",
43
+ " ███║",
44
+ " ╚██║",
45
+ " ██║",
46
+ " ██║",
47
+ " ╚═╝",
57
48
  ],
58
- '2': [
59
- '████████',
60
- '████████',
61
- ' ██',
62
- ' ██',
63
- '████████',
64
- '████████',
65
- '██ ',
66
- '██ ',
67
- '████████',
68
- '████████',
49
+ "2": [
50
+ " ██████╗ ",
51
+ " ╚════██╗",
52
+ " █████╔╝",
53
+ " ██╔═══╝ ",
54
+ " ███████╗",
55
+ " ╚══════╝",
69
56
  ],
70
- '3': [
71
- '████████',
72
- '████████',
73
- ' ██',
74
- ' ██',
75
- '████████',
76
- '████████',
77
- ' ██',
78
- ' ██',
79
- '████████',
80
- '████████',
57
+ "3": [
58
+ " ██████╗ ",
59
+ " ╚════██╗",
60
+ " █████╔╝",
61
+ " ╚═══██╗",
62
+ " ██████╔╝",
63
+ " ╚═════╝ ",
81
64
  ],
82
- '4': [
83
- '██ ██',
84
- '██ ██',
85
- '██ ██',
86
- '██ ██',
87
- '████████',
88
- '████████',
89
- ' ██',
90
- ' ██',
91
- ' ██',
92
- ' ██',
65
+ "4": [
66
+ " ██╗ ██╗",
67
+ " ██║ ██║",
68
+ " ███████║",
69
+ " ╚════██║",
70
+ " ██║",
71
+ " ╚═╝",
93
72
  ],
94
- '5': [
95
- '████████',
96
- '████████',
97
- '██ ',
98
- '██ ',
99
- '████████',
100
- '████████',
101
- ' ██',
102
- ' ██',
103
- '████████',
104
- '████████',
73
+ "5": [
74
+ " ███████╗",
75
+ " ██╔════╝",
76
+ " ███████╗",
77
+ " ╚════██║",
78
+ " ███████║",
79
+ " ╚══════╝",
105
80
  ],
106
- '6': [
107
- '████████',
108
- '████████',
109
- '██ ',
110
- '██ ',
111
- '████████',
112
- '████████',
113
- '██ ██',
114
- '██ ██',
115
- '████████',
116
- '████████',
81
+ "6": [
82
+ " ██████╗ ",
83
+ " ██╔════╝ ",
84
+ " ███████╗ ",
85
+ " ██╔═══██╗",
86
+ " ╚██████╔╝",
87
+ " ╚═════╝ ",
117
88
  ],
118
- '7': [
119
- '████████',
120
- '████████',
121
- ' ██',
122
- ' ██',
123
- ' ██',
124
- ' ██',
125
- ' ██',
126
- ' ██',
127
- ' ██',
128
- ' ██',
89
+ "7": [
90
+ " ███████╗",
91
+ " ╚════██║",
92
+ " ██╔╝",
93
+ " ██╔╝ ",
94
+ " ██║ ",
95
+ " ╚═╝ ",
129
96
  ],
130
- '8': [
131
- '████████',
132
- '████████',
133
- '██ ██',
134
- '██ ██',
135
- '████████',
136
- '████████',
137
- '██ ██',
138
- '██ ██',
139
- '████████',
140
- '████████',
97
+ "8": [
98
+ " █████╗ ",
99
+ " ██╔══██╗",
100
+ " ╚█████╔╝",
101
+ " ██╔══██╗",
102
+ " ╚█████╔╝",
103
+ " ╚════╝ ",
141
104
  ],
142
- '9': [
143
- '████████',
144
- '████████',
145
- '██ ██',
146
- '██ ██',
147
- '████████',
148
- '████████',
149
- ' ██',
150
- ' ██',
151
- '████████',
152
- '████████',
105
+ "9": [
106
+ " █████╗ ",
107
+ " ██╔══██╗",
108
+ " ╚██████║",
109
+ " ╚═══██║",
110
+ " █████╔╝",
111
+ " ╚════╝ ",
153
112
  ],
154
- '/': [
155
- ' ██',
156
- ' ██',
157
- ' ██ ',
158
- ' ██ ',
159
- ' ██ ',
160
- ' ██ ',
161
- ' ██ ',
162
- '██ ',
163
- '██ ',
164
- '██ ',
113
+ "/": [
114
+ " ██╗",
115
+ " ██╔╝",
116
+ " ██╔╝ ",
117
+ " ██╔╝ ",
118
+ " ██╔╝ ",
119
+ " ╚═╝ ",
165
120
  ],
166
- ' ': [
167
- ' ',
168
- ' ',
169
- ' ',
170
- ' ',
171
- ' ',
172
- ' ',
173
- ' ',
174
- ' ',
175
- ' ',
176
- ' ',
121
+ " ": [
122
+ " ",
123
+ " ",
124
+ " ",
125
+ " ",
126
+ " ",
127
+ " ",
177
128
  ],
178
129
  };
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
- */
130
+ const BIG_ROWS = 6;
131
+ /** Render a string ("68", "100", "82/100") in ANSI Shadow figlet font.
132
+ * Each glyph already carries 1 col of leading + 1 col of trailing space,
133
+ * so a 1-space gutter is enough to separate adjacent digits without the
134
+ * tracking looking gappy. Variable-width glyphs are NOT padded — the
135
+ * font is a proportional shadow font and looks best when concatenated
136
+ * natively, exactly as `figlet` and oh-my-logo render it. */
185
137
  function bigText(text) {
186
138
  const rows = Array.from({ length: BIG_ROWS }, () => '');
187
- const GAP = ' '; // 6-space gutter between glyphs
139
+ // 0 explicit gutter each glyph already carries its own leading and
140
+ // trailing whitespace, so concatenating with no extra gap still gives
141
+ // a visible 2-col space between adjacent digits. CEO tightened from 1
142
+ // (was reading too far apart at hero size).
143
+ const GAP = '';
188
144
  for (let i = 0; i < text.length; i++) {
189
145
  const ch = text[i];
190
146
  const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
191
- for (let r = 0; r < BIG_ROWS; r++)
147
+ for (let r = 0; r < BIG_ROWS; r++) {
192
148
  rows[r] += glyph[r] + (i < text.length - 1 ? GAP : '');
149
+ }
193
150
  }
194
151
  return rows;
195
152
  }
153
+ /** Visible (rune) length — counts Unicode code points so the centering math
154
+ * treats `█` and `╔` as one column each, matching how monospace terminals
155
+ * render the ANSI Shadow font. */
156
+ function bigTextWidth(text) {
157
+ if (text.length === 0)
158
+ return 0;
159
+ return [...bigText(text)[0]].length;
160
+ }
196
161
  function pad(s, w) {
197
162
  return s.length >= w ? s.slice(0, w) : s + ' '.repeat(w - s.length);
198
163
  }
@@ -313,7 +278,7 @@ export function renderAudit(view) {
313
278
  const bigWidth = bigRows[0].length;
314
279
  const leftPad = Math.floor((58 - bigWidth) / 2);
315
280
  for (const row of bigRows) {
316
- lines.push(' ' + ' '.repeat(leftPad) + c.goldDeep(row));
281
+ lines.push(' ' + ' '.repeat(leftPad) + c.pixelInk(row));
317
282
  }
318
283
  // Breathing room between the hero ASCII and the small caption. Without
319
284
  // it the "/ 100 · walk-on · strong" line glues to the bottom of the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitshow",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "commit.show CLI — audit any vibe-coded project from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {