commitshow 0.1.1 → 0.1.2
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/colors.js +1 -0
- package/dist/lib/render.js +9 -6
- package/package.json +1 -1
package/dist/lib/colors.js
CHANGED
|
@@ -11,6 +11,7 @@ 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
15
|
cream: rgb(0xF8, 0xF5, 0xEE),
|
|
15
16
|
teal: rgb(0x00, 0xD4, 0xAA),
|
|
16
17
|
scarlet: rgb(0xC8, 0x10, 0x2E),
|
package/dist/lib/render.js
CHANGED
|
@@ -94,19 +94,22 @@ export function renderAudit(view) {
|
|
|
94
94
|
lines.push(' ' + c.bold(c.cream(name)) + ' ' + c.muted(slug));
|
|
95
95
|
lines.push('');
|
|
96
96
|
// Hero score · big-digit ASCII for X-share screenshots.
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
|
|
97
|
+
// Always brand gold (slightly deeper tone for screenshot legibility) so
|
|
98
|
+
// the wordmark + score read as one cohesive brand mark. Band info is
|
|
99
|
+
// surfaced in the small caption underneath instead of via color.
|
|
100
100
|
const bigRows = bigText(String(total));
|
|
101
101
|
const bigWidth = bigRows[0].length;
|
|
102
102
|
const leftPad = Math.floor((58 - bigWidth) / 2);
|
|
103
103
|
for (const row of bigRows) {
|
|
104
|
-
lines.push(' ' + ' '.repeat(leftPad) +
|
|
104
|
+
lines.push(' ' + ' '.repeat(leftPad) + c.goldDeep(row));
|
|
105
105
|
}
|
|
106
|
-
// Caption
|
|
106
|
+
// Caption · small "/ 100 · band" · band tinted so the signal lives there.
|
|
107
107
|
const band = total >= 75 ? 'strong' : total >= 50 ? 'mid' : 'weak';
|
|
108
|
+
const bandTone = scoreTone(total);
|
|
108
109
|
const caption = `/ 100 · ${band}`;
|
|
109
|
-
|
|
110
|
+
// Center the caption (visible chars only — color codes don't take width).
|
|
111
|
+
const capPad = Math.floor((58 - caption.length) / 2);
|
|
112
|
+
lines.push(' ' + ' '.repeat(capPad) + c.muted('/ 100 · ') + bandTone(band));
|
|
110
113
|
lines.push('');
|
|
111
114
|
// 3-axis bars
|
|
112
115
|
const auditLine = ` Audit ${pad(`${p.score_auto}/50`, 7)} ${scoreBar(p.score_auto, 50)}`;
|