create-flow-os 0.0.47-dev.1772043837 → 0.0.47-dev.1772043899

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/package.json +1 -1
  2. package/src/init/ui.ts +15 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.47-dev.1772043837",
3
+ "version": "0.0.47-dev.1772043899",
4
4
  "license": "PolyForm-Shield-1.0.0",
5
5
  "type": "module",
6
6
  "dependencies": {
package/src/init/ui.ts CHANGED
@@ -9,7 +9,7 @@ const E = "\x1b[91m";
9
9
  const R = "\x1b[0m";
10
10
  const B = "\x1b[1m";
11
11
  const DIM = "\x1b[2m";
12
- const W = "\x1b[97m"; // bianco
12
+ const W = "\x1b[97m"; // bianco (solo per headerLogo)
13
13
 
14
14
  const FRAMES = "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
15
15
 
@@ -22,24 +22,27 @@ export function pad(s: string, w: number): string {
22
22
  }
23
23
 
24
24
  /** Riquadro con Flow OS centrato in grassetto nel bordo superiore, linea singola ─ */
25
- export function bannerBox(title: string, lines: string[], color: string, w = 46): string {
25
+ export function bannerBox(title: string, lines: string[], color: string, w = 50): string {
26
26
  const c = color;
27
27
  const inner = " " + c + B + title + R + " ";
28
28
  const innerLen = stripAnsi(inner).length;
29
- const half = Math.max(0, Math.floor((w - 2 - innerLen) / 2));
30
- const top = c + "╭" + "─".repeat(half) + inner + "─".repeat(w - 2 - half - innerLen) + "╮" + R;
31
- const bottom = c + "╰" + "─".repeat(w - 2) + "╯" + R;
32
- const emptyLine = c + "" + R + " " + " ".repeat(w - 2) + c + "" + R;
33
- const bodyLines = lines.map((l) => c + "" + R + " " + pad(l, w - 2) + c + "" + R);
29
+ const innerW = w - 4;
30
+ const half = Math.max(0, Math.floor((innerW - innerLen) / 2));
31
+ const rest = innerW - half - innerLen;
32
+ const top = c + "" + "─".repeat(half) + inner + "".repeat(rest) + "" + R;
33
+ const bottom = c + "" + "".repeat(innerW) + "" + R;
34
+ const emptyLine = c + "│" + R + " " + " ".repeat(innerW - 2) + c + "│" + R;
35
+ const bodyLines = lines.map((l) => c + "│" + R + " " + pad(l, innerW - 2) + c + "│" + R);
34
36
  return "\n" + top + "\n" + emptyLine + "\n" + bodyLines.join("\n") + "\n" + bottom + "\n";
35
37
  }
36
38
 
37
- export function box(lines: string[], color: string, w = 46): string {
39
+ export function box(lines: string[], color: string, w = 50): string {
38
40
  const c = color;
39
- const top = c + "╭" + "─".repeat(w) + "╮" + R;
40
- const bottom = c + "" + "─".repeat(w) + "" + R;
41
- const emptyLine = c + "" + R + " " + " ".repeat(w - 2) + c + "" + R;
42
- const body = lines.map((l) => c + "│" + R + " " + pad(l, w - 2) + c + "│" + R).join("\n");
41
+ const innerW = w - 4;
42
+ const top = c + "" + "─".repeat(innerW) + "" + R;
43
+ const bottom = c + "" + "".repeat(innerW) + "" + R;
44
+ const emptyLine = c + "│" + R + " " + " ".repeat(innerW - 2) + c + "│" + R;
45
+ const body = lines.map((l) => c + "│" + R + " " + pad(l, innerW - 2) + c + "│" + R).join("\n");
43
46
  return "\n" + top + "\n" + emptyLine + "\n" + body + "\n" + bottom + "\n";
44
47
  }
45
48
 
@@ -90,8 +93,6 @@ export async function withLoading<T>(
90
93
  }
91
94
  }
92
95
 
93
- const W = "\x1b[97m"; // bianco
94
-
95
96
  export const colors = { V, V_LIGHT, Y, E, R, B, DIM, W };
96
97
 
97
98
  /** Icona layers: 3 quadrati arrotondati sovrapposti, vista isometrica con shading ▓▒░ */