commitshow 0.3.4 → 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 +159 -26
  2. package/package.json +1 -1
@@ -23,39 +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
- // 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.
186
+ const rows = Array.from({ length: BIG_ROWS }, () => '');
54
187
  const GAP = ' '; // 6-space gutter between glyphs
55
188
  for (let i = 0; i < text.length; i++) {
56
189
  const ch = text[i];
57
190
  const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
58
- for (let r = 0; r < 5; r++)
191
+ for (let r = 0; r < BIG_ROWS; r++)
59
192
  rows[r] += glyph[r] + (i < text.length - 1 ? GAP : '');
60
193
  }
61
194
  return rows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commitshow",
3
- "version": "0.3.4",
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": {