shiva-code 0.8.14 → 0.8.16

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  colors,
3
3
  log
4
- } from "./chunk-5RLMQDLT.js";
4
+ } from "./chunk-IKIAW3IT.js";
5
5
  import {
6
6
  getAnalyticsConfig,
7
7
  getAnalyticsFilePath,
@@ -31,11 +31,17 @@ var log = {
31
31
  bold: (message) => console.log(chalk.bold(message)),
32
32
  // Newline
33
33
  newline: () => console.log(),
34
- // SHIVA-branded header
35
- header: (title) => {
34
+ // SHIVA-branded header with box style (matching main menu)
35
+ header: (title, width = 40) => {
36
+ const innerWidth = width - 2;
37
+ const visibleLen = title.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "").length;
38
+ const paddingLeft = Math.floor((innerWidth - visibleLen) / 2);
39
+ const paddingRight = innerWidth - visibleLen - paddingLeft;
40
+ console.log();
41
+ console.log(shivaPrimary(" \u256D" + "\u2500".repeat(innerWidth) + "\u256E"));
42
+ console.log(shivaPrimary(" \u2502") + " ".repeat(paddingLeft) + chalk.bold(title) + " ".repeat(paddingRight) + shivaPrimary("\u2502"));
43
+ console.log(shivaPrimary(" \u2570" + "\u2500".repeat(innerWidth) + "\u256F"));
36
44
  console.log();
37
- console.log(shivaPrimary.bold(title));
38
- console.log(shivaPrimary("\u2500".repeat(title.length)));
39
45
  },
40
46
  // Section header with icon
41
47
  section: (title, icon = "\u25C6") => {