@nikkory/vibe-cli 2.4.3 → 2.4.5

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/index.js CHANGED
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
 
26
26
  // src/index.ts
27
27
  var import_commander6 = require("commander");
28
- var import_chalk5 = __toESM(require("chalk"));
28
+ var import_chalk6 = __toESM(require("chalk"));
29
29
 
30
30
  // src/commands/init.ts
31
31
  var fs = __toESM(require("fs/promises"));
@@ -6452,6 +6452,13 @@ var ClassMapper = class {
6452
6452
  }
6453
6453
  };
6454
6454
  var TemplateEngine = class {
6455
+ /**
6456
+ * Format component name with spaces for comments
6457
+ * @example "IosHigButtonStandard" → "IosHig Button Standard"
6458
+ */
6459
+ formatDisplayName(componentName) {
6460
+ return componentName.replace(/([A-Z][a-z]+)(?=[A-Z])/g, "$1 ").replace(/([a-z])(?=[A-Z])/g, "$1 ");
6461
+ }
6455
6462
  /**
6456
6463
  * Generate import statements based on tier
6457
6464
  */
@@ -6580,9 +6587,9 @@ var TemplateEngine = class {
6580
6587
  generate(config) {
6581
6588
  const parts = [];
6582
6589
  parts.push("/**");
6583
- parts.push(` * ${config.componentName} Component`);
6590
+ parts.push(` * ${this.formatDisplayName(config.componentName)} Component`);
6584
6591
  parts.push(" *");
6585
- parts.push(` * Generated by Nikkory Vibe Matrix Generator`);
6592
+ parts.push(` * Generated by Nikkory Vibe`);
6586
6593
  parts.push(" *");
6587
6594
  parts.push(" * @packageDocumentation");
6588
6595
  parts.push(" * @since 1.0.0");
@@ -6787,9 +6794,23 @@ var MatrixResolver = class {
6787
6794
  */
6788
6795
  formatComponentName(componentId, designSystem, tier) {
6789
6796
  const componentParts = componentId.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1));
6790
- const dsParts = designSystem.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1));
6797
+ const designSystemNames = {
6798
+ "material-design": "Material",
6799
+ "ios-hig": "IosHig",
6800
+ glassmorphism: "Glass",
6801
+ neumorphism: "Neu",
6802
+ brutalism: "Brutal",
6803
+ minimalism: "Minimal",
6804
+ fluent: "Fluent",
6805
+ carbon: "Carbon",
6806
+ "ant-design": "Ant",
6807
+ chakra: "Chakra",
6808
+ atlassian: "Atlassian",
6809
+ blueprint: "Blueprint"
6810
+ };
6811
+ const dsName = designSystemNames[designSystem] ?? designSystem.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
6791
6812
  const tierPart = tier.charAt(0).toUpperCase() + tier.slice(1);
6792
- return `${componentParts.join("")}${dsParts.join("")}${tierPart}`;
6813
+ return `${dsName}${componentParts.join("")}${tierPart}`;
6793
6814
  }
6794
6815
  /**
6795
6816
  * Resolve complete component configuration using matrix multiplication
@@ -7033,7 +7054,7 @@ var PageSectionGenerator = class {
7033
7054
  return `/**
7034
7055
  * ${componentName} Section
7035
7056
  *
7036
- * Generated by Nikkory Vibe Section Orchestrator
7057
+ * Generated by Nikkory Vibe
7037
7058
  *
7038
7059
  * @packageDocumentation
7039
7060
  * @since 1.0.0
@@ -7528,12 +7549,64 @@ var pageGenerateCommand = new import_commander5.Command("add:page").alias("page"
7528
7549
  }
7529
7550
  });
7530
7551
 
7552
+ // src/utils/first-run.ts
7553
+ var import_fs = require("fs");
7554
+ var import_path3 = require("path");
7555
+ var import_os = require("os");
7556
+ var import_chalk5 = __toESM(require("chalk"));
7557
+ var CONFIG_DIR = (0, import_path3.join)((0, import_os.homedir)(), ".nikkory-vibe");
7558
+ var FIRST_RUN_FILE = (0, import_path3.join)(CONFIG_DIR, ".first-run");
7559
+ function isFirstRun() {
7560
+ return !(0, import_fs.existsSync)(FIRST_RUN_FILE);
7561
+ }
7562
+ function markAsRun() {
7563
+ if (!(0, import_fs.existsSync)(CONFIG_DIR)) {
7564
+ (0, import_fs.mkdirSync)(CONFIG_DIR, { recursive: true });
7565
+ }
7566
+ (0, import_fs.writeFileSync)(FIRST_RUN_FILE, (/* @__PURE__ */ new Date()).toISOString(), "utf-8");
7567
+ }
7568
+ function showWelcomeIfFirstRun() {
7569
+ if (!isFirstRun()) return;
7570
+ const y2 = import_chalk5.default.hex("#fcb800");
7571
+ const banner2 = `
7572
+ ${y2.bold("\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557")}
7573
+ ${y2.bold("\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D")}
7574
+ ${y2.bold("\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2554\u255D ")}
7575
+ ${y2.bold("\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u255A\u2588\u2588\u2554\u255D ")}
7576
+ ${y2.bold("\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ")}
7577
+ ${y2.bold("\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D ")}
7578
+
7579
+ ${y2.bold(" \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7580
+ ${y2.bold(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D ")}
7581
+ ${y2.bold(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7582
+ ${y2.bold(" \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D ")}
7583
+ ${y2.bold(" \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7584
+ ${y2.bold(" \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D ")}
7585
+
7586
+ ${y2(" happy together")} ${import_chalk5.default.white("\u2022 v2.4.5")}
7587
+
7588
+ ${import_chalk5.default.gray(" Production-ready code in seconds")}
7589
+ ${import_chalk5.default.gray(" https://nikkory.com")}
7590
+
7591
+ ${import_chalk5.default.green("\u2713 Thanks for installing Nikkory Vibe CLI!")}
7592
+
7593
+ ${import_chalk5.default.cyan("Quick Start:")}
7594
+ ${import_chalk5.default.white("nikkory-vibe add button")} ${import_chalk5.default.gray("# Generate button component")}
7595
+ ${import_chalk5.default.white("nikkory-vibe add:section hero")} ${import_chalk5.default.gray("# Generate hero section")}
7596
+ ${import_chalk5.default.white("nikkory-vibe list")} ${import_chalk5.default.gray("# Browse available templates")}
7597
+
7598
+ ${y2(" 169 Components")} ${import_chalk5.default.gray("+")} ${y2("50 Sections")} ${import_chalk5.default.gray("\xD7")} ${y2("12 Systems")} ${import_chalk5.default.gray("\xD7")} ${y2("3 Tiers")}
7599
+ `;
7600
+ console.log(banner2);
7601
+ markAsRun();
7602
+ }
7603
+
7531
7604
  // src/index.ts
7532
7605
  var componentCount = 169;
7533
7606
  var sectionCount = 50;
7534
7607
  var designSystemCount = 12;
7535
7608
  var tierCount = 3;
7536
- var y = import_chalk5.default.hex("#fcb800");
7609
+ var y = import_chalk6.default.hex("#fcb800");
7537
7610
  var banner = `
7538
7611
  ${y.bold("\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557")}
7539
7612
  ${y.bold("\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D")}
@@ -7549,15 +7622,16 @@ ${y.bold(" \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u
7549
7622
  ${y.bold(" \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7550
7623
  ${y.bold(" \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D ")}
7551
7624
 
7552
- ${y(" happy together")} ${import_chalk5.default.white("\u2022 v2.4.3")}
7625
+ ${y(" happy together")} ${import_chalk6.default.white("\u2022 v2.4.5")}
7553
7626
 
7554
- ${import_chalk5.default.gray(" Production-ready code in seconds")}
7555
- ${import_chalk5.default.gray(" https://nikkory.com")}
7627
+ ${import_chalk6.default.gray(" Production-ready code in seconds")}
7628
+ ${import_chalk6.default.gray(" https://nikkory.com")}
7556
7629
 
7557
- ${y(` ${componentCount} Components`)} ${import_chalk5.default.gray("+")} ${y(`${sectionCount} Sections`)} ${import_chalk5.default.gray("\xD7")} ${y(`${designSystemCount} Systems`)} ${import_chalk5.default.gray("\xD7")} ${y(`${tierCount} Tiers`)}
7630
+ ${y(` ${componentCount} Components`)} ${import_chalk6.default.gray("+")} ${y(`${sectionCount} Sections`)} ${import_chalk6.default.gray("\xD7")} ${y(`${designSystemCount} Systems`)} ${import_chalk6.default.gray("\xD7")} ${y(`${tierCount} Tiers`)}
7558
7631
  `;
7632
+ showWelcomeIfFirstRun();
7559
7633
  var program = new import_commander6.Command();
7560
- program.name("nikkory-vibe").description("Nikkory Vibe - Production-ready code in seconds").version("2.4.3").addHelpText("before", banner);
7634
+ program.name("nikkory-vibe").description("Nikkory Vibe - Production-ready code in seconds").version("2.4.4").addHelpText("before", banner);
7561
7635
  program.addCommand(matrixGenerateCommand);
7562
7636
  program.addCommand(sectionGenerateCommand);
7563
7637
  program.addCommand(pageGenerateCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nikkory/vibe-cli",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "CLI tool for Nikkory Vibe - Generate production-ready code in seconds",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
- "scripts",
14
13
  "README.md"
15
14
  ],
16
15
  "scripts": {
@@ -19,8 +18,7 @@
19
18
  "lint": "eslint src --ext .ts",
20
19
  "type-check": "tsc --noEmit",
21
20
  "test": "vitest run",
22
- "test:watch": "vitest",
23
- "postinstall": "node scripts/postinstall.js"
21
+ "test:watch": "vitest"
24
22
  },
25
23
  "keywords": [
26
24
  "cli",
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Convert Nikkory logo to ASCII art based on pixel brightness
4
- """
5
-
6
- from PIL import Image
7
- import sys
8
-
9
- # ASCII characters from darkest to brightest
10
- ASCII_CHARS = ['@', '#', 'S', '%', '?', '*', '+', ';', ':', ',', '.', ' ']
11
- # For yellow/gold logo, use simpler set
12
- ASCII_CHARS_SIMPLE = ['█', '▓', '▒', '░', ' ']
13
-
14
- def resize_image(image, new_width=80):
15
- """Resize image maintaining aspect ratio"""
16
- width, height = image.size
17
- aspect_ratio = height / width
18
- new_height = int(new_width * aspect_ratio * 0.55) # 0.55 for terminal char aspect
19
- return image.resize((new_width, new_height))
20
-
21
- def grayscale(image):
22
- """Convert to grayscale"""
23
- return image.convert('L')
24
-
25
- def pixels_to_ascii(image, ascii_chars=ASCII_CHARS_SIMPLE, invert=False):
26
- """Convert pixels to ASCII characters"""
27
- pixels = image.getdata()
28
- ascii_str = ''
29
- for pixel in pixels:
30
- if invert:
31
- # Invert: bright pixels = dark chars (for yellow on white background)
32
- ascii_str += ascii_chars[min(pixel * len(ascii_chars) // 256, len(ascii_chars) - 1)]
33
- else:
34
- # Normal: dark pixels = dark chars (for yellow logo on transparent/dark background)
35
- ascii_str += ascii_chars[len(ascii_chars) - 1 - min(pixel * len(ascii_chars) // 256, len(ascii_chars) - 1)]
36
- return ascii_str
37
-
38
- def main(image_path, width=80):
39
- """Main conversion function"""
40
- try:
41
- # Load image
42
- image = Image.open(image_path)
43
-
44
- # Process image
45
- image = resize_image(image, width)
46
- image = grayscale(image)
47
-
48
- # Convert to ASCII
49
- ascii_str = pixels_to_ascii(image)
50
-
51
- # Format into lines
52
- img_width = image.width
53
- ascii_lines = [ascii_str[i:i+img_width] for i in range(0, len(ascii_str), img_width)]
54
-
55
- # Save to file first
56
- output_file = image_path.replace('.png', '-ascii.txt')
57
- with open(output_file, 'w', encoding='utf-8') as f:
58
- f.write('\n'.join(ascii_lines))
59
-
60
- # Print success message
61
- print(f"Saved to: {output_file}")
62
-
63
- except Exception as e:
64
- print(f"Error: {e}", file=sys.stderr)
65
- sys.exit(1)
66
-
67
- if __name__ == '__main__':
68
- if len(sys.argv) < 2:
69
- print("Usage: python logo-to-ascii.py <image_path> [width]")
70
- sys.exit(1)
71
-
72
- image_path = sys.argv[1]
73
- width = int(sys.argv[2]) if len(sys.argv) > 2 else 80
74
-
75
- main(image_path, width)
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Post-install script
4
- * Displays welcome message after CLI installation
5
- *
6
- * Powered by Nikkory
7
- */
8
-
9
- // Simple version without chalk dependency for postinstall
10
- const yellow = '\x1b[33m';
11
- const gray = '\x1b[90m';
12
- const green = '\x1b[32m';
13
- const cyan = '\x1b[36m';
14
- const white = '\x1b[37m';
15
- const bold = '\x1b[1m';
16
- const reset = '\x1b[0m';
17
-
18
- const banner = `
19
- ${yellow}${bold}███╗ ██╗██╗██╗ ██╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗${reset}
20
- ${yellow}${bold}████╗ ██║██║██║ ██╔╝██║ ██╔╝██╔═══██╗██╔══██╗╚██╗ ██╔╝${reset}
21
- ${yellow}${bold}██╔██╗ ██║██║█████╔╝ █████╔╝ ██║ ██║██████╔╝ ╚████╔╝ ${reset}
22
- ${yellow}${bold}██║╚██╗██║██║██╔═██╗ ██╔═██╗ ██║ ██║██╔══██╗ ╚██╔╝ ${reset}
23
- ${yellow}${bold}██║ ╚████║██║██║ ██╗██║ ██╗╚██████╔╝██║ ██║ ██║ ${reset}
24
- ${yellow}${bold}╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ${reset}
25
-
26
- ${yellow}${bold} ██╗ ██╗██╗██████╗ ███████╗ ${reset}
27
- ${yellow}${bold} ██║ ██║██║██╔══██╗██╔════╝ ${reset}
28
- ${yellow}${bold} ██║ ██║██║██████╔╝█████╗ ${reset}
29
- ${yellow}${bold} ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ${reset}
30
- ${yellow}${bold} ╚████╔╝ ██║██████╔╝███████╗ ${reset}
31
- ${yellow}${bold} ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ${reset}
32
-
33
- ${yellow} happy together${reset} ${white}• v2.4.3${reset}
34
-
35
- ${gray} Production-ready code in seconds${reset}
36
- ${gray} https://nikkory.com${reset}
37
-
38
- ${green}✓ Installation successful!${reset}
39
-
40
- ${cyan}Quick Start:${reset}
41
- ${white}nikkory-vibe add button${reset} ${gray}# Generate button component${reset}
42
- ${white}nikkory-vibe add:section hero${reset} ${gray}# Generate hero section${reset}
43
- ${white}nikkory-vibe list${reset} ${gray}# Browse available templates${reset}
44
-
45
- ${cyan}Need help?${reset}
46
- ${white}nikkory-vibe --help${reset}
47
-
48
- ${yellow} 169 Components${reset} ${gray}+${reset} ${yellow}50 Sections${reset} ${gray}×${reset} ${yellow}12 Systems${reset} ${gray}×${reset} ${yellow}3 Tiers${reset}
49
- `;
50
-
51
- console.log(banner);