commitshow 0.3.4 → 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,43 +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
- // 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
+ // 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.
28
32
  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
- ' ': [' ', ' ', ' ', ' ', ' '],
33
+ "0": [
34
+ " ██████╗ ",
35
+ " ██╔═████╗",
36
+ " ██║██╔██║",
37
+ " ████╔╝██║",
38
+ " ╚██████╔╝",
39
+ " ╚═════╝ ",
40
+ ],
41
+ "1": [
42
+ " ██╗",
43
+ " ███║",
44
+ " ╚██║",
45
+ " ██║",
46
+ " ██║",
47
+ " ╚═╝",
48
+ ],
49
+ "2": [
50
+ " ██████╗ ",
51
+ " ╚════██╗",
52
+ " █████╔╝",
53
+ " ██╔═══╝ ",
54
+ " ███████╗",
55
+ " ╚══════╝",
56
+ ],
57
+ "3": [
58
+ " ██████╗ ",
59
+ " ╚════██╗",
60
+ " █████╔╝",
61
+ " ╚═══██╗",
62
+ " ██████╔╝",
63
+ " ╚═════╝ ",
64
+ ],
65
+ "4": [
66
+ " ██╗ ██╗",
67
+ " ██║ ██║",
68
+ " ███████║",
69
+ " ╚════██║",
70
+ " ██║",
71
+ " ╚═╝",
72
+ ],
73
+ "5": [
74
+ " ███████╗",
75
+ " ██╔════╝",
76
+ " ███████╗",
77
+ " ╚════██║",
78
+ " ███████║",
79
+ " ╚══════╝",
80
+ ],
81
+ "6": [
82
+ " ██████╗ ",
83
+ " ██╔════╝ ",
84
+ " ███████╗ ",
85
+ " ██╔═══██╗",
86
+ " ╚██████╔╝",
87
+ " ╚═════╝ ",
88
+ ],
89
+ "7": [
90
+ " ███████╗",
91
+ " ╚════██║",
92
+ " ██╔╝",
93
+ " ██╔╝ ",
94
+ " ██║ ",
95
+ " ╚═╝ ",
96
+ ],
97
+ "8": [
98
+ " █████╗ ",
99
+ " ██╔══██╗",
100
+ " ╚█████╔╝",
101
+ " ██╔══██╗",
102
+ " ╚█████╔╝",
103
+ " ╚════╝ ",
104
+ ],
105
+ "9": [
106
+ " █████╗ ",
107
+ " ██╔══██╗",
108
+ " ╚██████║",
109
+ " ╚═══██║",
110
+ " █████╔╝",
111
+ " ╚════╝ ",
112
+ ],
113
+ "/": [
114
+ " ██╗",
115
+ " ██╔╝",
116
+ " ██╔╝ ",
117
+ " ██╔╝ ",
118
+ " ██╔╝ ",
119
+ " ╚═╝ ",
120
+ ],
121
+ " ": [
122
+ " ",
123
+ " ",
124
+ " ",
125
+ " ",
126
+ " ",
127
+ " ",
128
+ ],
41
129
  };
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. */
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. */
48
137
  function bigText(text) {
49
- const rows = ['', '', '', '', ''];
50
- // Block runes (█▀▄) render at ~1.2-1.5× monospace width, so a tight gutter
51
- // visually fuses neighboring digits (the old 4-space looked like one wide
52
- // blob on most fonts). 6 spaces gives the digits room to breathe without
53
- // pushing 3-digit scores past the box width.
54
- const GAP = ' '; // 6-space gutter between glyphs
138
+ const rows = Array.from({ length: BIG_ROWS }, () => '');
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 = '';
55
144
  for (let i = 0; i < text.length; i++) {
56
145
  const ch = text[i];
57
146
  const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
58
- for (let r = 0; r < 5; r++)
147
+ for (let r = 0; r < BIG_ROWS; r++) {
59
148
  rows[r] += glyph[r] + (i < text.length - 1 ? GAP : '');
149
+ }
60
150
  }
61
151
  return rows;
62
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
+ }
63
161
  function pad(s, w) {
64
162
  return s.length >= w ? s.slice(0, w) : s + ' '.repeat(w - s.length);
65
163
  }
@@ -180,7 +278,7 @@ export function renderAudit(view) {
180
278
  const bigWidth = bigRows[0].length;
181
279
  const leftPad = Math.floor((58 - bigWidth) / 2);
182
280
  for (const row of bigRows) {
183
- lines.push(' ' + ' '.repeat(leftPad) + c.goldDeep(row));
281
+ lines.push(' ' + ' '.repeat(leftPad) + c.pixelInk(row));
184
282
  }
185
283
  // Breathing room between the hero ASCII and the small caption. Without
186
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.4",
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": {