create-flow-os 0.0.39 → 0.0.40

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 +2 -2
  2. package/src/init/ui.ts +7 -6
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "license": "PolyForm-Shield-1.0.0",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@flow-os/client": "^0.0.39"
7
+ "@flow-os/client": "^0.0.40"
8
8
  },
9
9
  "bin": {
10
10
  "create-flow-os": "./src/index.ts"
package/src/init/ui.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  const V = "\x1b[95m"; // magenta scuro
6
- const V_LIGHT = "\x1b[38;5;213m"; // magenta più chiaro
6
+ const V_LIGHT = "\x1b[38;5;177m"; // magenta medio (non troppo chiaro)
7
7
  const Y = "\x1b[38;5;226m";
8
8
  const E = "\x1b[91m";
9
9
  const R = "\x1b[0m";
@@ -21,15 +21,16 @@ export function pad(s: string, w: number): string {
21
21
  }
22
22
 
23
23
  /** Riquadro chiuso con Flow OS in grassetto nel bordo superiore */
24
- export function bannerBox(title: string, lines: string[], color: string, w = 92): string {
24
+ export function bannerBox(title: string, lines: string[], color: string, w = 68): string {
25
25
  const c = color;
26
- const leftPad = " "; // sposta Flow OS un po' a destra
27
- const inner = leftPad + c + B + title + R + " "; // titolo stesso colore del box
26
+ const inner = " " + c + B + title + R + " "; // titolo subito dopo ╔, stesso colore
28
27
  const innerLen = stripAnsi(inner).length;
29
28
  const top = c + "╔" + inner + c + "═".repeat(Math.max(0, w - 2 - innerLen)) + "╗" + R;
30
29
  const bottom = c + "╚" + "═".repeat(w - 2) + "╝" + R;
31
- const body = lines.map((l) => c + "║" + R + " " + pad(l, w - 2) + c + "║" + R).join("\n");
32
- return "\n" + top + "\n" + body + "\n" + bottom + "\n";
30
+ const spacer = c + "║" + R + " " + " ".repeat(w - 2) + c + "║" + R; // riga vuota
31
+ const bodyLines = lines.map((l) => c + "" + R + " " + pad(l, w - 2) + c + "" + R);
32
+ const body = "\n" + spacer + "\n" + bodyLines.join("\n");
33
+ return "\n" + top + body + "\n" + bottom + "\n";
33
34
  }
34
35
 
35
36
  export function box(lines: string[], color: string, w = 52): string {