commitshow 0.3.2 → 0.3.4
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.
- package/dist/lib/render.js +25 -7
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -47,7 +47,11 @@ const BIG_DIGITS = {
|
|
|
47
47
|
* '0' reads as TWO digits rather than one wide blob. */
|
|
48
48
|
function bigText(text) {
|
|
49
49
|
const rows = ['', '', '', '', ''];
|
|
50
|
-
|
|
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
|
|
51
55
|
for (let i = 0; i < text.length; i++) {
|
|
52
56
|
const ch = text[i];
|
|
53
57
|
const glyph = BIG_DIGITS[ch] ?? BIG_DIGITS[' '];
|
|
@@ -178,6 +182,10 @@ export function renderAudit(view) {
|
|
|
178
182
|
for (const row of bigRows) {
|
|
179
183
|
lines.push(' ' + ' '.repeat(leftPad) + c.goldDeep(row));
|
|
180
184
|
}
|
|
185
|
+
// Breathing room between the hero ASCII and the small caption. Without
|
|
186
|
+
// it the "/ 100 · walk-on · strong" line glues to the bottom of the
|
|
187
|
+
// digits and the score reads as one block.
|
|
188
|
+
lines.push('');
|
|
181
189
|
// Caption · small "/ 100 · band" · band tinted so the signal lives there.
|
|
182
190
|
// Walk-on track gets an extra middle segment + a sub-line surfacing the
|
|
183
191
|
// 95 max so users read the score in the right context (88 walk-on ≠ 88
|
|
@@ -267,11 +275,16 @@ export function renderAudit(view) {
|
|
|
267
275
|
lines.push(' ' + c.muted('Δ ') + deltaTone(d)(pad(`${sign}${d}`, 12)) + c.muted(` since last audit`));
|
|
268
276
|
}
|
|
269
277
|
lines.push('');
|
|
270
|
-
// Footer
|
|
278
|
+
// Footer · project URL on its own line, brand wordmark on its own line,
|
|
279
|
+
// separated by a blank so a wrapped URL on a narrow terminal can't shove
|
|
280
|
+
// the wordmark off the right edge. Wordmark right-aligns to the standard
|
|
281
|
+
// 58-char layout box used by every other panel.
|
|
271
282
|
const url = `https://commit.show/projects/${p.id}`;
|
|
272
283
|
lines.push(' ' + c.muted('→ ') + c.cream(url));
|
|
273
|
-
|
|
274
|
-
|
|
284
|
+
lines.push('');
|
|
285
|
+
const wordmark = 'commit.show';
|
|
286
|
+
const footerPad = Math.max(0, BOX_W - wordmark.length);
|
|
287
|
+
lines.push(' '.repeat(footerPad) + c.gold(wordmark));
|
|
275
288
|
return lines.join('\n');
|
|
276
289
|
}
|
|
277
290
|
function vibeChecklistLines(vc) {
|
|
@@ -758,7 +771,11 @@ export function renderUpsell(githubUrl) {
|
|
|
758
771
|
: 'https://commit.show/submit';
|
|
759
772
|
const titleVisible = 'Walk-on · drop-in audit, no audition yet';
|
|
760
773
|
const headVisible = 'Audition to unlock:';
|
|
761
|
-
|
|
774
|
+
// CTA URL renders OUTSIDE the box (after boxBottom()) — the encoded
|
|
775
|
+
// submit URL is 60-70 chars on most repos, which busts the 54-char
|
|
776
|
+
// inside-box content width and visually shears the right border off.
|
|
777
|
+
// Pulling it below the box also lets terminals auto-link the full
|
|
778
|
+
// https:// URL without truncation.
|
|
762
779
|
lines.push(' ' + boxTop());
|
|
763
780
|
lines.push(' ' + boxRow(titleVisible.length, c.bold(c.gold('Walk-on')) + c.muted(' · ') + c.cream('drop-in audit, no audition yet')));
|
|
764
781
|
lines.push(' ' + boxBlank());
|
|
@@ -782,9 +799,10 @@ export function renderUpsell(githubUrl) {
|
|
|
782
799
|
const visible = `→ ${it.tag}${it.rest}`;
|
|
783
800
|
lines.push(' ' + boxRow(visible.length, it.tone('→ ') + c.cream(it.tag) + c.muted(it.rest)));
|
|
784
801
|
}
|
|
785
|
-
lines.push(' ' + boxBlank());
|
|
786
|
-
lines.push(' ' + boxRow(ctaVisible.length, c.gold(ctaVisible)));
|
|
787
802
|
lines.push(' ' + boxBottom());
|
|
803
|
+
// CTA outside the box · full URL stays clickable in modern terminals,
|
|
804
|
+
// and we don't have to truncate or shorten the slug.
|
|
805
|
+
lines.push(' ' + c.gold('→ ') + c.gold(submitUrl));
|
|
788
806
|
return lines.join('\n');
|
|
789
807
|
}
|
|
790
808
|
export function writeAuditJson(dir, json) {
|