galaxy-design 0.2.19 → 0.2.20

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.
@@ -643,43 +643,29 @@ export default {
643
643
  }
644
644
  try {
645
645
  let content = readFileSync(tsconfigPath, 'utf-8');
646
- // Strip comments to make valid JSON (preserve comment structure for later)
647
- const comments = [];
648
- const commentRegex = /\/\*[\s\S]*?\*\/|\/\/.*/g;
649
- // Extract comments
650
- content = content.replace(commentRegex, (match)=>{
651
- comments.push(match);
652
- return `__COMMENT_${comments.length - 1}__`;
653
- });
654
- const tsconfig = JSON.parse(content);
655
- // Ensure compilerOptions exists
656
- if (!tsconfig.compilerOptions) {
657
- tsconfig.compilerOptions = {};
646
+ // Check if baseUrl and paths already exist
647
+ if (content.includes('"baseUrl"') && content.includes('"paths"') && content.includes('"@/*"')) {
648
+ return; // Already configured
658
649
  }
659
- // Add baseUrl and paths if not already present
660
- if (!tsconfig.compilerOptions.baseUrl) {
661
- tsconfig.compilerOptions.baseUrl = '.';
650
+ // Find the position to insert path aliases - right before the closing brace of compilerOptions
651
+ // Look for the last property in compilerOptions before the closing brace
652
+ const compilerOptionsMatch = content.match(/"compilerOptions"\s*:\s*{/);
653
+ if (!compilerOptionsMatch) {
654
+ throw new Error('compilerOptions not found');
662
655
  }
663
- if (!tsconfig.compilerOptions.paths) {
664
- tsconfig.compilerOptions.paths = {
665
- '@/*': [
666
- './src/*'
667
- ]
668
- };
669
- } else if (!tsconfig.compilerOptions.paths['@/*']) {
670
- tsconfig.compilerOptions.paths['@/*'] = [
671
- './src/*'
672
- ];
656
+ // Strategy: Insert before the closing } of compilerOptions
657
+ // Find the pattern: any content followed by closing brace and comma (or newline), followed by "include" or other root property
658
+ const insertPattern = /(\s*)(}\s*,?\s*\n\s*"(?:include|exclude|extends|files|references))/;
659
+ const match = content.match(insertPattern);
660
+ if (match) {
661
+ const indent = match[1] || ' ';
662
+ // Insert path config before the closing brace
663
+ const pathConfig = `,\n\n${indent}/* Path Aliases */\n${indent}"baseUrl": ".",\n${indent}"paths": {\n${indent} "@/*": ["./src/*"]\n${indent}}`;
664
+ content = content.replace(insertPattern, `${pathConfig}\n${indent}}$2`);
665
+ writeFileSync(tsconfigPath, content, 'utf-8');
673
666
  }
674
- // Write back with pretty formatting
675
- let output = JSON.stringify(tsconfig, null, 2);
676
- // Restore comments
677
- comments.forEach((comment, index)=>{
678
- output = output.replace(`"__COMMENT_${index}__"`, comment);
679
- });
680
- writeFileSync(tsconfigPath, output + '\n', 'utf-8');
681
667
  } catch (error) {
682
- console.error(chalk.yellow(`Warning: Could not update ${tsconfigFile}`));
668
+ // Silently fail - path aliases are not critical
683
669
  }
684
670
  }
685
671
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/init.ts"],"sourcesContent":["import prompts from 'prompts';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport {\n detectFramework,\n detectPackageManager,\n hasSrcDirectory,\n type Framework as DetectedFramework,\n} from '../utils/detect.js';\nimport {\n createComponentsConfig,\n hasComponentsConfig,\n loadComponentsConfig,\n type Framework,\n} from '../utils/components-config.js';\nimport {\n getDefaultConfig,\n type BaseColor,\n type IconLibrary,\n} from '../utils/config-schema.js';\nimport { writeFile, ensureDir, readFile } from '../utils/files.js';\nimport { installDependencies } from '../utils/package-manager.js';\nimport { resolve } from 'path';\nimport { existsSync, readFileSync, writeFileSync } from 'fs';\n\ninterface InitOptions {\n yes?: boolean;\n cwd: string;\n}\n\nexport async function initCommand(options: InitOptions) {\n console.log(chalk.bold.cyan('\\n🌌 Galaxy UI CLI - Multi-Framework Edition\\n'));\n\n const cwd = options.cwd;\n\n // Check if already initialized\n if (hasComponentsConfig(cwd)) {\n console.log(chalk.yellow('⚠ components.json already exists in this project.'));\n const { overwrite } = await prompts({\n type: 'confirm',\n name: 'overwrite',\n message: 'Do you want to overwrite the existing configuration?',\n initial: false,\n });\n\n if (!overwrite) {\n console.log(chalk.gray('Initialization cancelled.'));\n return;\n }\n }\n\n // Detect framework\n const detectedFramework = detectFramework(cwd);\n\n if (detectedFramework === 'unknown') {\n console.log(\n chalk.red(\n '❌ Could not detect framework. Please ensure you are in a valid Angular, React, Vue, Next.js, Nuxt.js, React Native, or Flutter project.'\n )\n );\n return;\n }\n\n console.log(chalk.green(`✓ Detected ${chalk.bold(detectedFramework)} framework`));\n\n // Map detected framework to Framework type\n const frameworkMap: Record<DetectedFramework, Framework | null> = {\n angular: 'angular',\n react: 'react',\n vue: 'vue',\n 'react-native': 'react-native',\n flutter: 'flutter',\n nextjs: 'nextjs',\n nuxtjs: 'nuxtjs',\n unknown: null,\n };\n\n const framework = frameworkMap[detectedFramework];\n if (!framework) {\n console.log(chalk.red('❌ Unsupported framework detected.'));\n return;\n }\n\n // Detect package manager\n const packageManager = detectPackageManager(cwd);\n console.log(chalk.green(`✓ Using ${chalk.bold(packageManager)} package manager`));\n\n // Get configuration from user (or use defaults with --yes)\n let config = getDefaultConfig(framework);\n\n // Detect if project uses src/ directory and adjust paths accordingly\n const usesSrcDir = hasSrcDirectory(cwd);\n if (usesSrcDir) {\n console.log(chalk.green(`✓ Detected ${chalk.bold('src/')} directory structure`));\n }\n\n if (!options.yes) {\n console.log(chalk.cyan('\\n📝 Configuration\\n'));\n\n // Build prompts based on framework\n const promptQuestions: any[] = [];\n\n // TypeScript prompt (not for Flutter)\n if (framework !== 'flutter') {\n promptQuestions.push({\n type: 'toggle',\n name: 'typescript',\n message: 'Would you like to use TypeScript?',\n initial: true,\n active: 'yes',\n inactive: 'no',\n });\n }\n\n // Base color prompt (for all frameworks)\n promptQuestions.push({\n type: 'select',\n name: 'baseColor',\n message: 'Which base color would you like to use?',\n choices: [\n { title: 'Slate', value: 'slate' },\n { title: 'Gray', value: 'gray' },\n { title: 'Zinc', value: 'zinc' },\n { title: 'Neutral', value: 'neutral' },\n { title: 'Stone', value: 'stone' },\n ],\n initial: 0,\n });\n\n // Icon library prompt (not for Flutter - uses built-in icons)\n if (framework !== 'flutter') {\n promptQuestions.push({\n type: 'select',\n name: 'iconLibrary',\n message: 'Which icon library would you like to use?',\n choices: [\n { title: 'Lucide (Recommended)', value: 'lucide' },\n { title: 'Heroicons', value: 'heroicons' },\n { title: 'Radix Icons', value: 'radix-icons' },\n ],\n initial: 0,\n });\n }\n\n // CSS file prompt (only for web frameworks and React Native)\n if (framework !== 'flutter' && config.tailwind.css) {\n promptQuestions.push({\n type: 'text',\n name: 'cssFile',\n message: framework === 'react-native'\n ? 'Where is your global CSS file (for NativeWind)?'\n : 'Where is your global CSS file?',\n initial: config.tailwind.css,\n });\n }\n\n const answers = await prompts(promptQuestions);\n\n if (Object.keys(answers).length === 0) {\n console.log(chalk.gray('Initialization cancelled.'));\n return;\n }\n\n // Update config with user choices\n config = {\n ...config,\n typescript: answers.typescript ?? config.typescript,\n iconLibrary: (answers.iconLibrary as IconLibrary) ?? config.iconLibrary,\n tailwind: {\n ...config.tailwind,\n baseColor: (answers.baseColor as BaseColor) ?? config.tailwind.baseColor,\n css: answers.cssFile ?? config.tailwind.css,\n },\n };\n }\n\n console.log(chalk.cyan('\\n📦 Installing dependencies...\\n'));\n\n // Install dependencies\n const spinner = ora('Installing dependencies...').start();\n\n const dependencies: string[] = [];\n const devDependencies: string[] = [];\n\n // Common dependencies\n dependencies.push('clsx', 'tailwind-merge');\n\n // Framework-specific dependencies\n switch (framework) {\n case 'vue':\n case 'nuxtjs':\n dependencies.push('radix-vue');\n devDependencies.push('tailwindcss@3.4.0', 'autoprefixer', 'postcss');\n if (config.iconLibrary === 'lucide') {\n dependencies.push('lucide-vue-next');\n }\n if (config.typescript) {\n devDependencies.push('@types/node');\n }\n break;\n\n case 'react':\n case 'nextjs':\n dependencies.push('@radix-ui/react-slot');\n devDependencies.push('tailwindcss@3.4.0', 'autoprefixer', 'postcss');\n if (config.iconLibrary === 'lucide') {\n dependencies.push('lucide-react');\n }\n if (config.typescript) {\n devDependencies.push('@types/react', '@types/react-dom', '@types/node');\n }\n break;\n\n case 'angular':\n // Angular components use Radix NG primitives\n dependencies.push('@radix-ng/primitives');\n if (config.iconLibrary === 'lucide') {\n dependencies.push('lucide-angular');\n }\n break;\n }\n\n try {\n // Install dependencies\n if (dependencies.length > 0) {\n await installDependencies(dependencies, {\n cwd,\n silent: true,\n });\n }\n\n // Install devDependencies\n if (devDependencies.length > 0) {\n await installDependencies(devDependencies, {\n cwd,\n dev: true,\n silent: true,\n });\n }\n\n spinner.succeed('Dependencies installed');\n } catch (error) {\n spinner.fail('Failed to install dependencies');\n console.error(chalk.red(error));\n return;\n }\n\n // Create directories\n const dirSpinner = ora('Creating directories...').start();\n\n try {\n const baseDir = usesSrcDir ? 'src/' : '';\n const componentsPath = resolve(cwd, baseDir + config.aliases.components.replace('@/', ''));\n const utilsPath = resolve(cwd, baseDir + config.aliases.utils.replace('@/', ''));\n\n await ensureDir(componentsPath);\n await ensureDir(resolve(componentsPath, 'ui'));\n await ensureDir(utilsPath.replace('/utils', '')); // Create lib dir\n\n dirSpinner.succeed('Directories created');\n } catch (error) {\n dirSpinner.fail('Failed to create directories');\n console.error(chalk.red(error));\n return;\n }\n\n // Create utils file\n const utilsSpinner = ora('Creating utility functions...').start();\n\n try {\n const baseDir = usesSrcDir ? 'src/' : '';\n const utilsPath = resolve(cwd, baseDir + config.aliases.utils.replace('@/', '') + '.ts');\n const utilsContent = getUtilsContent();\n writeFile(utilsPath, utilsContent);\n\n utilsSpinner.succeed('Utility functions created');\n } catch (error) {\n utilsSpinner.fail('Failed to create utility functions');\n console.error(chalk.red(error));\n return;\n }\n\n // Save components.json\n const configSpinner = ora('Creating components.json...').start();\n\n try {\n createComponentsConfig(cwd, framework);\n configSpinner.succeed('components.json created');\n } catch (error) {\n configSpinner.fail('Failed to create components.json');\n console.error(chalk.red(error));\n return;\n }\n\n // Create Tailwind CSS configuration files (only for frameworks that use Tailwind)\n if (framework !== 'flutter' && framework !== 'angular') {\n const tailwindSpinner = ora('Creating Tailwind CSS configuration...').start();\n\n try {\n // Create tailwind.config.js\n const tailwindConfigPath = resolve(cwd, config.tailwind.config);\n const tailwindConfigContent = getTailwindConfigContent(framework);\n writeFile(tailwindConfigPath, tailwindConfigContent);\n\n // Create postcss.config.js\n const postcssConfigPath = resolve(cwd, 'postcss.config.js');\n const postcssConfigContent = getPostCSSConfigContent();\n writeFile(postcssConfigPath, postcssConfigContent);\n\n tailwindSpinner.succeed('Tailwind CSS configuration created');\n } catch (error) {\n tailwindSpinner.fail('Failed to create Tailwind CSS configuration');\n console.error(chalk.red(error));\n return;\n }\n\n // Create or update CSS file with Tailwind directives\n const cssSpinner = ora('Setting up CSS file...').start();\n\n try {\n const baseDir = usesSrcDir ? 'src/' : '';\n const cssPath = resolve(cwd, baseDir + config.tailwind.css.replace('src/', ''));\n const cssContent = getCSSContent(config.tailwind.baseColor);\n writeFile(cssPath, cssContent);\n\n cssSpinner.succeed('CSS file configured');\n } catch (error) {\n cssSpinner.fail('Failed to configure CSS file');\n console.error(chalk.red(error));\n return;\n }\n }\n\n // Configure path aliases for TypeScript and bundler\n if (config.typescript && framework !== 'flutter' && framework !== 'angular') {\n const aliasSpinner = ora('Configuring path aliases...').start();\n\n try {\n // Configure TypeScript path aliases\n if (framework === 'react') {\n // Vite React uses tsconfig.app.json\n configureTypeScriptAliases(cwd, 'tsconfig.app.json');\n } else if (framework === 'vue' || framework === 'nextjs') {\n // Vue and Next.js use tsconfig.json\n configureTypeScriptAliases(cwd, 'tsconfig.json');\n }\n\n // Configure bundler path aliases (only for Vite projects, not Next.js/Nuxt)\n if (framework === 'react') {\n configureViteAliases(cwd, 'vite.config.ts');\n } else if (framework === 'vue') {\n configureViteAliases(cwd, 'vite.config.js');\n }\n\n aliasSpinner.succeed('Path aliases configured');\n } catch (error) {\n aliasSpinner.fail('Failed to configure path aliases');\n console.error(chalk.red(error));\n // Don't return - this is not critical\n }\n }\n\n // Success message\n console.log(chalk.green('\\n✨ Success! Galaxy UI has been initialized.\\n'));\n console.log(chalk.cyan('Next steps:\\n'));\n console.log(chalk.white(` 1. Add components:`));\n console.log(chalk.gray(` galaxy-design add button`));\n console.log(chalk.gray(` galaxy-design add input card`));\n console.log(chalk.gray(` galaxy-design add --all\\n`));\n\n console.log(chalk.cyan('Learn more:'));\n console.log(chalk.white(' Documentation: https://galaxy-design.vercel.app'));\n console.log(chalk.white(' GitHub: https://github.com/buikevin/galaxy-design\\n'));\n}\n\n/**\n * Get utils.ts content\n */\nfunction getUtilsContent(): string {\n return `import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind CSS classes\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n`;\n}\n\n/**\n * Get tailwind.config.js content\n */\nfunction getTailwindConfigContent(framework: Framework): string {\n const contentPaths =\n framework === 'react' || framework === 'nextjs'\n ? `[\n \"./index.html\",\n \"./src/**/*.{js,ts,jsx,tsx}\",\n ]`\n : framework === 'vue' || framework === 'nuxtjs'\n ? `[\n \"./index.html\",\n \"./src/**/*.{vue,js,ts,jsx,tsx}\",\n ]`\n : `[\n \"./src/**/*.{js,ts,jsx,tsx,mdx}\",\n ]`;\n\n return `/** @type {import('tailwindcss').Config} */\nexport default {\n darkMode: [\"class\"],\n content: ${contentPaths},\n theme: {\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n },\n },\n plugins: [],\n}\n`;\n}\n\n/**\n * Get postcss.config.js content\n */\nfunction getPostCSSConfigContent(): string {\n return `export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n}\n`;\n}\n\n/**\n * Get CSS file content with Tailwind directives and CSS variables\n */\nfunction getCSSContent(baseColor: BaseColor): string {\n // CSS variables based on base color\n const colorVariables: Record<BaseColor, { light: string; dark: string }> = {\n slate: {\n light: `--background: 0 0% 100%;\n --foreground: 222.2 84% 4.9%;\n --card: 0 0% 100%;\n --card-foreground: 222.2 84% 4.9%;\n --popover: 0 0% 100%;\n --popover-foreground: 222.2 84% 4.9%;\n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n --secondary: 210 40% 96.1%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n --muted: 210 40% 96.1%;\n --muted-foreground: 215.4 16.3% 46.9%;\n --accent: 210 40% 96.1%;\n --accent-foreground: 222.2 47.4% 11.2%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 40% 98%;\n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n --ring: 222.2 84% 4.9%;\n --radius: 0.5rem;`,\n dark: `--background: 222.2 84% 4.9%;\n --foreground: 210 40% 98%;\n --card: 222.2 84% 4.9%;\n --card-foreground: 210 40% 98%;\n --popover: 222.2 84% 4.9%;\n --popover-foreground: 210 40% 98%;\n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 11.2%;\n --secondary: 217.2 32.6% 17.5%;\n --secondary-foreground: 210 40% 98%;\n --muted: 217.2 32.6% 17.5%;\n --muted-foreground: 215 20.2% 65.1%;\n --accent: 217.2 32.6% 17.5%;\n --accent-foreground: 210 40% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 40% 98%;\n --border: 217.2 32.6% 17.5%;\n --input: 217.2 32.6% 17.5%;\n --ring: 212.7 26.8% 83.9%;`,\n },\n gray: {\n light: `--background: 0 0% 100%;\n --foreground: 224 71.4% 4.1%;\n --card: 0 0% 100%;\n --card-foreground: 224 71.4% 4.1%;\n --popover: 0 0% 100%;\n --popover-foreground: 224 71.4% 4.1%;\n --primary: 220.9 39.3% 11%;\n --primary-foreground: 210 20% 98%;\n --secondary: 220 14.3% 95.9%;\n --secondary-foreground: 220.9 39.3% 11%;\n --muted: 220 14.3% 95.9%;\n --muted-foreground: 220 8.9% 46.1%;\n --accent: 220 14.3% 95.9%;\n --accent-foreground: 220.9 39.3% 11%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 20% 98%;\n --border: 220 13% 91%;\n --input: 220 13% 91%;\n --ring: 224 71.4% 4.1%;\n --radius: 0.5rem;`,\n dark: `--background: 224 71.4% 4.1%;\n --foreground: 210 20% 98%;\n --card: 224 71.4% 4.1%;\n --card-foreground: 210 20% 98%;\n --popover: 224 71.4% 4.1%;\n --popover-foreground: 210 20% 98%;\n --primary: 210 20% 98%;\n --primary-foreground: 220.9 39.3% 11%;\n --secondary: 215 27.9% 16.9%;\n --secondary-foreground: 210 20% 98%;\n --muted: 215 27.9% 16.9%;\n --muted-foreground: 217.9 10.6% 64.9%;\n --accent: 215 27.9% 16.9%;\n --accent-foreground: 210 20% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 20% 98%;\n --border: 215 27.9% 16.9%;\n --input: 215 27.9% 16.9%;\n --ring: 216 12.2% 83.9%;`,\n },\n zinc: {\n light: `--background: 0 0% 100%;\n --foreground: 240 10% 3.9%;\n --card: 0 0% 100%;\n --card-foreground: 240 10% 3.9%;\n --popover: 0 0% 100%;\n --popover-foreground: 240 10% 3.9%;\n --primary: 240 5.9% 10%;\n --primary-foreground: 0 0% 98%;\n --secondary: 240 4.8% 95.9%;\n --secondary-foreground: 240 5.9% 10%;\n --muted: 240 4.8% 95.9%;\n --muted-foreground: 240 3.8% 46.1%;\n --accent: 240 4.8% 95.9%;\n --accent-foreground: 240 5.9% 10%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n --border: 240 5.9% 90%;\n --input: 240 5.9% 90%;\n --ring: 240 10% 3.9%;\n --radius: 0.5rem;`,\n dark: `--background: 240 10% 3.9%;\n --foreground: 0 0% 98%;\n --card: 240 10% 3.9%;\n --card-foreground: 0 0% 98%;\n --popover: 240 10% 3.9%;\n --popover-foreground: 0 0% 98%;\n --primary: 0 0% 98%;\n --primary-foreground: 240 5.9% 10%;\n --secondary: 240 3.7% 15.9%;\n --secondary-foreground: 0 0% 98%;\n --muted: 240 3.7% 15.9%;\n --muted-foreground: 240 5% 64.9%;\n --accent: 240 3.7% 15.9%;\n --accent-foreground: 0 0% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n --border: 240 3.7% 15.9%;\n --input: 240 3.7% 15.9%;\n --ring: 240 4.9% 83.9%;`,\n },\n neutral: {\n light: `--background: 0 0% 100%;\n --foreground: 0 0% 3.9%;\n --card: 0 0% 100%;\n --card-foreground: 0 0% 3.9%;\n --popover: 0 0% 100%;\n --popover-foreground: 0 0% 3.9%;\n --primary: 0 0% 9%;\n --primary-foreground: 0 0% 98%;\n --secondary: 0 0% 96.1%;\n --secondary-foreground: 0 0% 9%;\n --muted: 0 0% 96.1%;\n --muted-foreground: 0 0% 45.1%;\n --accent: 0 0% 96.1%;\n --accent-foreground: 0 0% 9%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n --border: 0 0% 89.8%;\n --input: 0 0% 89.8%;\n --ring: 0 0% 3.9%;\n --radius: 0.5rem;`,\n dark: `--background: 0 0% 3.9%;\n --foreground: 0 0% 98%;\n --card: 0 0% 3.9%;\n --card-foreground: 0 0% 98%;\n --popover: 0 0% 3.9%;\n --popover-foreground: 0 0% 98%;\n --primary: 0 0% 98%;\n --primary-foreground: 0 0% 9%;\n --secondary: 0 0% 14.9%;\n --secondary-foreground: 0 0% 98%;\n --muted: 0 0% 14.9%;\n --muted-foreground: 0 0% 63.9%;\n --accent: 0 0% 14.9%;\n --accent-foreground: 0 0% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n --border: 0 0% 14.9%;\n --input: 0 0% 14.9%;\n --ring: 0 0% 83.1%;`,\n },\n stone: {\n light: `--background: 0 0% 100%;\n --foreground: 20 14.3% 4.1%;\n --card: 0 0% 100%;\n --card-foreground: 20 14.3% 4.1%;\n --popover: 0 0% 100%;\n --popover-foreground: 20 14.3% 4.1%;\n --primary: 24 9.8% 10%;\n --primary-foreground: 60 9.1% 97.8%;\n --secondary: 60 4.8% 95.9%;\n --secondary-foreground: 24 9.8% 10%;\n --muted: 60 4.8% 95.9%;\n --muted-foreground: 25 5.3% 44.7%;\n --accent: 60 4.8% 95.9%;\n --accent-foreground: 24 9.8% 10%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 60 9.1% 97.8%;\n --border: 20 5.9% 90%;\n --input: 20 5.9% 90%;\n --ring: 20 14.3% 4.1%;\n --radius: 0.5rem;`,\n dark: `--background: 20 14.3% 4.1%;\n --foreground: 60 9.1% 97.8%;\n --card: 20 14.3% 4.1%;\n --card-foreground: 60 9.1% 97.8%;\n --popover: 20 14.3% 4.1%;\n --popover-foreground: 60 9.1% 97.8%;\n --primary: 60 9.1% 97.8%;\n --primary-foreground: 24 9.8% 10%;\n --secondary: 12 6.5% 15.1%;\n --secondary-foreground: 60 9.1% 97.8%;\n --muted: 12 6.5% 15.1%;\n --muted-foreground: 24 5.4% 63.9%;\n --accent: 12 6.5% 15.1%;\n --accent-foreground: 60 9.1% 97.8%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 60 9.1% 97.8%;\n --border: 12 6.5% 15.1%;\n --input: 12 6.5% 15.1%;\n --ring: 24 5.7% 82.9%;`,\n },\n };\n\n const colors = colorVariables[baseColor];\n\n return `@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n ${colors.light}\n }\n\n .dark {\n ${colors.dark}\n }\n}\n`;\n}\n\n/**\n * Configure TypeScript path aliases in tsconfig\n */\nfunction configureTypeScriptAliases(cwd: string, tsconfigFile: string): void {\n const tsconfigPath = resolve(cwd, tsconfigFile);\n\n if (!existsSync(tsconfigPath)) {\n return;\n }\n\n try {\n let content = readFileSync(tsconfigPath, 'utf-8');\n\n // Strip comments to make valid JSON (preserve comment structure for later)\n const comments: string[] = [];\n const commentRegex = /\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*/g;\n\n // Extract comments\n content = content.replace(commentRegex, (match) => {\n comments.push(match);\n return `__COMMENT_${comments.length - 1}__`;\n });\n\n const tsconfig = JSON.parse(content);\n\n // Ensure compilerOptions exists\n if (!tsconfig.compilerOptions) {\n tsconfig.compilerOptions = {};\n }\n\n // Add baseUrl and paths if not already present\n if (!tsconfig.compilerOptions.baseUrl) {\n tsconfig.compilerOptions.baseUrl = '.';\n }\n\n if (!tsconfig.compilerOptions.paths) {\n tsconfig.compilerOptions.paths = {\n '@/*': ['./src/*'],\n };\n } else if (!tsconfig.compilerOptions.paths['@/*']) {\n tsconfig.compilerOptions.paths['@/*'] = ['./src/*'];\n }\n\n // Write back with pretty formatting\n let output = JSON.stringify(tsconfig, null, 2);\n\n // Restore comments\n comments.forEach((comment, index) => {\n output = output.replace(`\"__COMMENT_${index}__\"`, comment);\n });\n\n writeFileSync(tsconfigPath, output + '\\n', 'utf-8');\n } catch (error) {\n console.error(chalk.yellow(`Warning: Could not update ${tsconfigFile}`));\n }\n}\n\n/**\n * Configure Vite path aliases in vite.config\n */\nfunction configureViteAliases(cwd: string, viteConfigFile: string): void {\n const viteConfigPath = resolve(cwd, viteConfigFile);\n\n if (!existsSync(viteConfigPath)) {\n return;\n }\n\n try {\n let content = readFileSync(viteConfigPath, 'utf-8');\n\n // Check if path is already imported\n if (!content.includes(\"import path from 'path'\") && !content.includes('import path from \"path\"')) {\n // Add path import after the first import line\n content = content.replace(\n /(import .+ from .+\\n)/,\n \"$1import path from 'path'\\n\"\n );\n }\n\n // Check if resolve.alias is already configured\n if (!content.includes('resolve:') && !content.includes('@:')) {\n // Add resolve.alias configuration\n content = content.replace(\n /(plugins: \\[.+\\],?)/s,\n `$1\\n resolve: {\\n alias: {\\n '@': path.resolve(__dirname, './src'),\\n },\\n },`\n );\n }\n\n writeFileSync(viteConfigPath, content, 'utf-8');\n } catch (error) {\n console.error(chalk.yellow(`Warning: Could not update ${viteConfigFile}`));\n }\n}\n"],"names":["prompts","chalk","ora","detectFramework","detectPackageManager","hasSrcDirectory","createComponentsConfig","hasComponentsConfig","getDefaultConfig","writeFile","ensureDir","installDependencies","resolve","existsSync","readFileSync","writeFileSync","initCommand","options","console","log","bold","cyan","cwd","yellow","overwrite","type","name","message","initial","gray","detectedFramework","red","green","frameworkMap","angular","react","vue","flutter","nextjs","nuxtjs","unknown","framework","packageManager","config","usesSrcDir","yes","promptQuestions","push","active","inactive","choices","title","value","tailwind","css","answers","Object","keys","length","typescript","iconLibrary","baseColor","cssFile","spinner","start","dependencies","devDependencies","silent","dev","succeed","error","fail","dirSpinner","baseDir","componentsPath","aliases","components","replace","utilsPath","utils","utilsSpinner","utilsContent","getUtilsContent","configSpinner","tailwindSpinner","tailwindConfigPath","tailwindConfigContent","getTailwindConfigContent","postcssConfigPath","postcssConfigContent","getPostCSSConfigContent","cssSpinner","cssPath","cssContent","getCSSContent","aliasSpinner","configureTypeScriptAliases","configureViteAliases","white","contentPaths","colorVariables","slate","light","dark","zinc","neutral","stone","colors","tsconfigFile","tsconfigPath","content","comments","commentRegex","match","tsconfig","JSON","parse","compilerOptions","baseUrl","paths","output","stringify","forEach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,QAAQ,CAAC,eAAe,CAACjB,QAAQiB,QAAQ,CAAC,OAAO;YAC5D,kCAAkC;YAClCjB,UAAUA,QAAQjC,OAAO,CACvB,sCACA,CAAC,0FAA0F,CAAC;QAEhG;QAEA9D,cAAc+G,gBAAgBhB,SAAS;IACzC,EAAE,OAAOxC,OAAO;QACdpD,QAAQoD,KAAK,CAACrE,MAAMsB,MAAM,CAAC,CAAC,0BAA0B,EAAEsG,gBAAgB;IAC1E;AACF"}
1
+ {"version":3,"sources":["../../src/commands/init.ts"],"sourcesContent":["import prompts from 'prompts';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport {\n detectFramework,\n detectPackageManager,\n hasSrcDirectory,\n type Framework as DetectedFramework,\n} from '../utils/detect.js';\nimport {\n createComponentsConfig,\n hasComponentsConfig,\n loadComponentsConfig,\n type Framework,\n} from '../utils/components-config.js';\nimport {\n getDefaultConfig,\n type BaseColor,\n type IconLibrary,\n} from '../utils/config-schema.js';\nimport { writeFile, ensureDir, readFile } from '../utils/files.js';\nimport { installDependencies } from '../utils/package-manager.js';\nimport { resolve } from 'path';\nimport { existsSync, readFileSync, writeFileSync } from 'fs';\n\ninterface InitOptions {\n yes?: boolean;\n cwd: string;\n}\n\nexport async function initCommand(options: InitOptions) {\n console.log(chalk.bold.cyan('\\n🌌 Galaxy UI CLI - Multi-Framework Edition\\n'));\n\n const cwd = options.cwd;\n\n // Check if already initialized\n if (hasComponentsConfig(cwd)) {\n console.log(chalk.yellow('⚠ components.json already exists in this project.'));\n const { overwrite } = await prompts({\n type: 'confirm',\n name: 'overwrite',\n message: 'Do you want to overwrite the existing configuration?',\n initial: false,\n });\n\n if (!overwrite) {\n console.log(chalk.gray('Initialization cancelled.'));\n return;\n }\n }\n\n // Detect framework\n const detectedFramework = detectFramework(cwd);\n\n if (detectedFramework === 'unknown') {\n console.log(\n chalk.red(\n '❌ Could not detect framework. Please ensure you are in a valid Angular, React, Vue, Next.js, Nuxt.js, React Native, or Flutter project.'\n )\n );\n return;\n }\n\n console.log(chalk.green(`✓ Detected ${chalk.bold(detectedFramework)} framework`));\n\n // Map detected framework to Framework type\n const frameworkMap: Record<DetectedFramework, Framework | null> = {\n angular: 'angular',\n react: 'react',\n vue: 'vue',\n 'react-native': 'react-native',\n flutter: 'flutter',\n nextjs: 'nextjs',\n nuxtjs: 'nuxtjs',\n unknown: null,\n };\n\n const framework = frameworkMap[detectedFramework];\n if (!framework) {\n console.log(chalk.red('❌ Unsupported framework detected.'));\n return;\n }\n\n // Detect package manager\n const packageManager = detectPackageManager(cwd);\n console.log(chalk.green(`✓ Using ${chalk.bold(packageManager)} package manager`));\n\n // Get configuration from user (or use defaults with --yes)\n let config = getDefaultConfig(framework);\n\n // Detect if project uses src/ directory and adjust paths accordingly\n const usesSrcDir = hasSrcDirectory(cwd);\n if (usesSrcDir) {\n console.log(chalk.green(`✓ Detected ${chalk.bold('src/')} directory structure`));\n }\n\n if (!options.yes) {\n console.log(chalk.cyan('\\n📝 Configuration\\n'));\n\n // Build prompts based on framework\n const promptQuestions: any[] = [];\n\n // TypeScript prompt (not for Flutter)\n if (framework !== 'flutter') {\n promptQuestions.push({\n type: 'toggle',\n name: 'typescript',\n message: 'Would you like to use TypeScript?',\n initial: true,\n active: 'yes',\n inactive: 'no',\n });\n }\n\n // Base color prompt (for all frameworks)\n promptQuestions.push({\n type: 'select',\n name: 'baseColor',\n message: 'Which base color would you like to use?',\n choices: [\n { title: 'Slate', value: 'slate' },\n { title: 'Gray', value: 'gray' },\n { title: 'Zinc', value: 'zinc' },\n { title: 'Neutral', value: 'neutral' },\n { title: 'Stone', value: 'stone' },\n ],\n initial: 0,\n });\n\n // Icon library prompt (not for Flutter - uses built-in icons)\n if (framework !== 'flutter') {\n promptQuestions.push({\n type: 'select',\n name: 'iconLibrary',\n message: 'Which icon library would you like to use?',\n choices: [\n { title: 'Lucide (Recommended)', value: 'lucide' },\n { title: 'Heroicons', value: 'heroicons' },\n { title: 'Radix Icons', value: 'radix-icons' },\n ],\n initial: 0,\n });\n }\n\n // CSS file prompt (only for web frameworks and React Native)\n if (framework !== 'flutter' && config.tailwind.css) {\n promptQuestions.push({\n type: 'text',\n name: 'cssFile',\n message: framework === 'react-native'\n ? 'Where is your global CSS file (for NativeWind)?'\n : 'Where is your global CSS file?',\n initial: config.tailwind.css,\n });\n }\n\n const answers = await prompts(promptQuestions);\n\n if (Object.keys(answers).length === 0) {\n console.log(chalk.gray('Initialization cancelled.'));\n return;\n }\n\n // Update config with user choices\n config = {\n ...config,\n typescript: answers.typescript ?? config.typescript,\n iconLibrary: (answers.iconLibrary as IconLibrary) ?? config.iconLibrary,\n tailwind: {\n ...config.tailwind,\n baseColor: (answers.baseColor as BaseColor) ?? config.tailwind.baseColor,\n css: answers.cssFile ?? config.tailwind.css,\n },\n };\n }\n\n console.log(chalk.cyan('\\n📦 Installing dependencies...\\n'));\n\n // Install dependencies\n const spinner = ora('Installing dependencies...').start();\n\n const dependencies: string[] = [];\n const devDependencies: string[] = [];\n\n // Common dependencies\n dependencies.push('clsx', 'tailwind-merge');\n\n // Framework-specific dependencies\n switch (framework) {\n case 'vue':\n case 'nuxtjs':\n dependencies.push('radix-vue');\n devDependencies.push('tailwindcss@3.4.0', 'autoprefixer', 'postcss');\n if (config.iconLibrary === 'lucide') {\n dependencies.push('lucide-vue-next');\n }\n if (config.typescript) {\n devDependencies.push('@types/node');\n }\n break;\n\n case 'react':\n case 'nextjs':\n dependencies.push('@radix-ui/react-slot');\n devDependencies.push('tailwindcss@3.4.0', 'autoprefixer', 'postcss');\n if (config.iconLibrary === 'lucide') {\n dependencies.push('lucide-react');\n }\n if (config.typescript) {\n devDependencies.push('@types/react', '@types/react-dom', '@types/node');\n }\n break;\n\n case 'angular':\n // Angular components use Radix NG primitives\n dependencies.push('@radix-ng/primitives');\n if (config.iconLibrary === 'lucide') {\n dependencies.push('lucide-angular');\n }\n break;\n }\n\n try {\n // Install dependencies\n if (dependencies.length > 0) {\n await installDependencies(dependencies, {\n cwd,\n silent: true,\n });\n }\n\n // Install devDependencies\n if (devDependencies.length > 0) {\n await installDependencies(devDependencies, {\n cwd,\n dev: true,\n silent: true,\n });\n }\n\n spinner.succeed('Dependencies installed');\n } catch (error) {\n spinner.fail('Failed to install dependencies');\n console.error(chalk.red(error));\n return;\n }\n\n // Create directories\n const dirSpinner = ora('Creating directories...').start();\n\n try {\n const baseDir = usesSrcDir ? 'src/' : '';\n const componentsPath = resolve(cwd, baseDir + config.aliases.components.replace('@/', ''));\n const utilsPath = resolve(cwd, baseDir + config.aliases.utils.replace('@/', ''));\n\n await ensureDir(componentsPath);\n await ensureDir(resolve(componentsPath, 'ui'));\n await ensureDir(utilsPath.replace('/utils', '')); // Create lib dir\n\n dirSpinner.succeed('Directories created');\n } catch (error) {\n dirSpinner.fail('Failed to create directories');\n console.error(chalk.red(error));\n return;\n }\n\n // Create utils file\n const utilsSpinner = ora('Creating utility functions...').start();\n\n try {\n const baseDir = usesSrcDir ? 'src/' : '';\n const utilsPath = resolve(cwd, baseDir + config.aliases.utils.replace('@/', '') + '.ts');\n const utilsContent = getUtilsContent();\n writeFile(utilsPath, utilsContent);\n\n utilsSpinner.succeed('Utility functions created');\n } catch (error) {\n utilsSpinner.fail('Failed to create utility functions');\n console.error(chalk.red(error));\n return;\n }\n\n // Save components.json\n const configSpinner = ora('Creating components.json...').start();\n\n try {\n createComponentsConfig(cwd, framework);\n configSpinner.succeed('components.json created');\n } catch (error) {\n configSpinner.fail('Failed to create components.json');\n console.error(chalk.red(error));\n return;\n }\n\n // Create Tailwind CSS configuration files (only for frameworks that use Tailwind)\n if (framework !== 'flutter' && framework !== 'angular') {\n const tailwindSpinner = ora('Creating Tailwind CSS configuration...').start();\n\n try {\n // Create tailwind.config.js\n const tailwindConfigPath = resolve(cwd, config.tailwind.config);\n const tailwindConfigContent = getTailwindConfigContent(framework);\n writeFile(tailwindConfigPath, tailwindConfigContent);\n\n // Create postcss.config.js\n const postcssConfigPath = resolve(cwd, 'postcss.config.js');\n const postcssConfigContent = getPostCSSConfigContent();\n writeFile(postcssConfigPath, postcssConfigContent);\n\n tailwindSpinner.succeed('Tailwind CSS configuration created');\n } catch (error) {\n tailwindSpinner.fail('Failed to create Tailwind CSS configuration');\n console.error(chalk.red(error));\n return;\n }\n\n // Create or update CSS file with Tailwind directives\n const cssSpinner = ora('Setting up CSS file...').start();\n\n try {\n const baseDir = usesSrcDir ? 'src/' : '';\n const cssPath = resolve(cwd, baseDir + config.tailwind.css.replace('src/', ''));\n const cssContent = getCSSContent(config.tailwind.baseColor);\n writeFile(cssPath, cssContent);\n\n cssSpinner.succeed('CSS file configured');\n } catch (error) {\n cssSpinner.fail('Failed to configure CSS file');\n console.error(chalk.red(error));\n return;\n }\n }\n\n // Configure path aliases for TypeScript and bundler\n if (config.typescript && framework !== 'flutter' && framework !== 'angular') {\n const aliasSpinner = ora('Configuring path aliases...').start();\n\n try {\n // Configure TypeScript path aliases\n if (framework === 'react') {\n // Vite React uses tsconfig.app.json\n configureTypeScriptAliases(cwd, 'tsconfig.app.json');\n } else if (framework === 'vue' || framework === 'nextjs') {\n // Vue and Next.js use tsconfig.json\n configureTypeScriptAliases(cwd, 'tsconfig.json');\n }\n\n // Configure bundler path aliases (only for Vite projects, not Next.js/Nuxt)\n if (framework === 'react') {\n configureViteAliases(cwd, 'vite.config.ts');\n } else if (framework === 'vue') {\n configureViteAliases(cwd, 'vite.config.js');\n }\n\n aliasSpinner.succeed('Path aliases configured');\n } catch (error) {\n aliasSpinner.fail('Failed to configure path aliases');\n console.error(chalk.red(error));\n // Don't return - this is not critical\n }\n }\n\n // Success message\n console.log(chalk.green('\\n✨ Success! Galaxy UI has been initialized.\\n'));\n console.log(chalk.cyan('Next steps:\\n'));\n console.log(chalk.white(` 1. Add components:`));\n console.log(chalk.gray(` galaxy-design add button`));\n console.log(chalk.gray(` galaxy-design add input card`));\n console.log(chalk.gray(` galaxy-design add --all\\n`));\n\n console.log(chalk.cyan('Learn more:'));\n console.log(chalk.white(' Documentation: https://galaxy-design.vercel.app'));\n console.log(chalk.white(' GitHub: https://github.com/buikevin/galaxy-design\\n'));\n}\n\n/**\n * Get utils.ts content\n */\nfunction getUtilsContent(): string {\n return `import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind CSS classes\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n`;\n}\n\n/**\n * Get tailwind.config.js content\n */\nfunction getTailwindConfigContent(framework: Framework): string {\n const contentPaths =\n framework === 'react' || framework === 'nextjs'\n ? `[\n \"./index.html\",\n \"./src/**/*.{js,ts,jsx,tsx}\",\n ]`\n : framework === 'vue' || framework === 'nuxtjs'\n ? `[\n \"./index.html\",\n \"./src/**/*.{vue,js,ts,jsx,tsx}\",\n ]`\n : `[\n \"./src/**/*.{js,ts,jsx,tsx,mdx}\",\n ]`;\n\n return `/** @type {import('tailwindcss').Config} */\nexport default {\n darkMode: [\"class\"],\n content: ${contentPaths},\n theme: {\n extend: {\n colors: {\n border: \"hsl(var(--border))\",\n input: \"hsl(var(--input))\",\n ring: \"hsl(var(--ring))\",\n background: \"hsl(var(--background))\",\n foreground: \"hsl(var(--foreground))\",\n primary: {\n DEFAULT: \"hsl(var(--primary))\",\n foreground: \"hsl(var(--primary-foreground))\",\n },\n secondary: {\n DEFAULT: \"hsl(var(--secondary))\",\n foreground: \"hsl(var(--secondary-foreground))\",\n },\n destructive: {\n DEFAULT: \"hsl(var(--destructive))\",\n foreground: \"hsl(var(--destructive-foreground))\",\n },\n muted: {\n DEFAULT: \"hsl(var(--muted))\",\n foreground: \"hsl(var(--muted-foreground))\",\n },\n accent: {\n DEFAULT: \"hsl(var(--accent))\",\n foreground: \"hsl(var(--accent-foreground))\",\n },\n popover: {\n DEFAULT: \"hsl(var(--popover))\",\n foreground: \"hsl(var(--popover-foreground))\",\n },\n card: {\n DEFAULT: \"hsl(var(--card))\",\n foreground: \"hsl(var(--card-foreground))\",\n },\n },\n borderRadius: {\n lg: \"var(--radius)\",\n md: \"calc(var(--radius) - 2px)\",\n sm: \"calc(var(--radius) - 4px)\",\n },\n },\n },\n plugins: [],\n}\n`;\n}\n\n/**\n * Get postcss.config.js content\n */\nfunction getPostCSSConfigContent(): string {\n return `export default {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n}\n`;\n}\n\n/**\n * Get CSS file content with Tailwind directives and CSS variables\n */\nfunction getCSSContent(baseColor: BaseColor): string {\n // CSS variables based on base color\n const colorVariables: Record<BaseColor, { light: string; dark: string }> = {\n slate: {\n light: `--background: 0 0% 100%;\n --foreground: 222.2 84% 4.9%;\n --card: 0 0% 100%;\n --card-foreground: 222.2 84% 4.9%;\n --popover: 0 0% 100%;\n --popover-foreground: 222.2 84% 4.9%;\n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n --secondary: 210 40% 96.1%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n --muted: 210 40% 96.1%;\n --muted-foreground: 215.4 16.3% 46.9%;\n --accent: 210 40% 96.1%;\n --accent-foreground: 222.2 47.4% 11.2%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 40% 98%;\n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n --ring: 222.2 84% 4.9%;\n --radius: 0.5rem;`,\n dark: `--background: 222.2 84% 4.9%;\n --foreground: 210 40% 98%;\n --card: 222.2 84% 4.9%;\n --card-foreground: 210 40% 98%;\n --popover: 222.2 84% 4.9%;\n --popover-foreground: 210 40% 98%;\n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 11.2%;\n --secondary: 217.2 32.6% 17.5%;\n --secondary-foreground: 210 40% 98%;\n --muted: 217.2 32.6% 17.5%;\n --muted-foreground: 215 20.2% 65.1%;\n --accent: 217.2 32.6% 17.5%;\n --accent-foreground: 210 40% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 40% 98%;\n --border: 217.2 32.6% 17.5%;\n --input: 217.2 32.6% 17.5%;\n --ring: 212.7 26.8% 83.9%;`,\n },\n gray: {\n light: `--background: 0 0% 100%;\n --foreground: 224 71.4% 4.1%;\n --card: 0 0% 100%;\n --card-foreground: 224 71.4% 4.1%;\n --popover: 0 0% 100%;\n --popover-foreground: 224 71.4% 4.1%;\n --primary: 220.9 39.3% 11%;\n --primary-foreground: 210 20% 98%;\n --secondary: 220 14.3% 95.9%;\n --secondary-foreground: 220.9 39.3% 11%;\n --muted: 220 14.3% 95.9%;\n --muted-foreground: 220 8.9% 46.1%;\n --accent: 220 14.3% 95.9%;\n --accent-foreground: 220.9 39.3% 11%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 210 20% 98%;\n --border: 220 13% 91%;\n --input: 220 13% 91%;\n --ring: 224 71.4% 4.1%;\n --radius: 0.5rem;`,\n dark: `--background: 224 71.4% 4.1%;\n --foreground: 210 20% 98%;\n --card: 224 71.4% 4.1%;\n --card-foreground: 210 20% 98%;\n --popover: 224 71.4% 4.1%;\n --popover-foreground: 210 20% 98%;\n --primary: 210 20% 98%;\n --primary-foreground: 220.9 39.3% 11%;\n --secondary: 215 27.9% 16.9%;\n --secondary-foreground: 210 20% 98%;\n --muted: 215 27.9% 16.9%;\n --muted-foreground: 217.9 10.6% 64.9%;\n --accent: 215 27.9% 16.9%;\n --accent-foreground: 210 20% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 210 20% 98%;\n --border: 215 27.9% 16.9%;\n --input: 215 27.9% 16.9%;\n --ring: 216 12.2% 83.9%;`,\n },\n zinc: {\n light: `--background: 0 0% 100%;\n --foreground: 240 10% 3.9%;\n --card: 0 0% 100%;\n --card-foreground: 240 10% 3.9%;\n --popover: 0 0% 100%;\n --popover-foreground: 240 10% 3.9%;\n --primary: 240 5.9% 10%;\n --primary-foreground: 0 0% 98%;\n --secondary: 240 4.8% 95.9%;\n --secondary-foreground: 240 5.9% 10%;\n --muted: 240 4.8% 95.9%;\n --muted-foreground: 240 3.8% 46.1%;\n --accent: 240 4.8% 95.9%;\n --accent-foreground: 240 5.9% 10%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n --border: 240 5.9% 90%;\n --input: 240 5.9% 90%;\n --ring: 240 10% 3.9%;\n --radius: 0.5rem;`,\n dark: `--background: 240 10% 3.9%;\n --foreground: 0 0% 98%;\n --card: 240 10% 3.9%;\n --card-foreground: 0 0% 98%;\n --popover: 240 10% 3.9%;\n --popover-foreground: 0 0% 98%;\n --primary: 0 0% 98%;\n --primary-foreground: 240 5.9% 10%;\n --secondary: 240 3.7% 15.9%;\n --secondary-foreground: 0 0% 98%;\n --muted: 240 3.7% 15.9%;\n --muted-foreground: 240 5% 64.9%;\n --accent: 240 3.7% 15.9%;\n --accent-foreground: 0 0% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n --border: 240 3.7% 15.9%;\n --input: 240 3.7% 15.9%;\n --ring: 240 4.9% 83.9%;`,\n },\n neutral: {\n light: `--background: 0 0% 100%;\n --foreground: 0 0% 3.9%;\n --card: 0 0% 100%;\n --card-foreground: 0 0% 3.9%;\n --popover: 0 0% 100%;\n --popover-foreground: 0 0% 3.9%;\n --primary: 0 0% 9%;\n --primary-foreground: 0 0% 98%;\n --secondary: 0 0% 96.1%;\n --secondary-foreground: 0 0% 9%;\n --muted: 0 0% 96.1%;\n --muted-foreground: 0 0% 45.1%;\n --accent: 0 0% 96.1%;\n --accent-foreground: 0 0% 9%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 0 0% 98%;\n --border: 0 0% 89.8%;\n --input: 0 0% 89.8%;\n --ring: 0 0% 3.9%;\n --radius: 0.5rem;`,\n dark: `--background: 0 0% 3.9%;\n --foreground: 0 0% 98%;\n --card: 0 0% 3.9%;\n --card-foreground: 0 0% 98%;\n --popover: 0 0% 3.9%;\n --popover-foreground: 0 0% 98%;\n --primary: 0 0% 98%;\n --primary-foreground: 0 0% 9%;\n --secondary: 0 0% 14.9%;\n --secondary-foreground: 0 0% 98%;\n --muted: 0 0% 14.9%;\n --muted-foreground: 0 0% 63.9%;\n --accent: 0 0% 14.9%;\n --accent-foreground: 0 0% 98%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 0 0% 98%;\n --border: 0 0% 14.9%;\n --input: 0 0% 14.9%;\n --ring: 0 0% 83.1%;`,\n },\n stone: {\n light: `--background: 0 0% 100%;\n --foreground: 20 14.3% 4.1%;\n --card: 0 0% 100%;\n --card-foreground: 20 14.3% 4.1%;\n --popover: 0 0% 100%;\n --popover-foreground: 20 14.3% 4.1%;\n --primary: 24 9.8% 10%;\n --primary-foreground: 60 9.1% 97.8%;\n --secondary: 60 4.8% 95.9%;\n --secondary-foreground: 24 9.8% 10%;\n --muted: 60 4.8% 95.9%;\n --muted-foreground: 25 5.3% 44.7%;\n --accent: 60 4.8% 95.9%;\n --accent-foreground: 24 9.8% 10%;\n --destructive: 0 84.2% 60.2%;\n --destructive-foreground: 60 9.1% 97.8%;\n --border: 20 5.9% 90%;\n --input: 20 5.9% 90%;\n --ring: 20 14.3% 4.1%;\n --radius: 0.5rem;`,\n dark: `--background: 20 14.3% 4.1%;\n --foreground: 60 9.1% 97.8%;\n --card: 20 14.3% 4.1%;\n --card-foreground: 60 9.1% 97.8%;\n --popover: 20 14.3% 4.1%;\n --popover-foreground: 60 9.1% 97.8%;\n --primary: 60 9.1% 97.8%;\n --primary-foreground: 24 9.8% 10%;\n --secondary: 12 6.5% 15.1%;\n --secondary-foreground: 60 9.1% 97.8%;\n --muted: 12 6.5% 15.1%;\n --muted-foreground: 24 5.4% 63.9%;\n --accent: 12 6.5% 15.1%;\n --accent-foreground: 60 9.1% 97.8%;\n --destructive: 0 62.8% 30.6%;\n --destructive-foreground: 60 9.1% 97.8%;\n --border: 12 6.5% 15.1%;\n --input: 12 6.5% 15.1%;\n --ring: 24 5.7% 82.9%;`,\n },\n };\n\n const colors = colorVariables[baseColor];\n\n return `@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n :root {\n ${colors.light}\n }\n\n .dark {\n ${colors.dark}\n }\n}\n`;\n}\n\n/**\n * Configure TypeScript path aliases in tsconfig\n */\nfunction configureTypeScriptAliases(cwd: string, tsconfigFile: string): void {\n const tsconfigPath = resolve(cwd, tsconfigFile);\n\n if (!existsSync(tsconfigPath)) {\n return;\n }\n\n try {\n let content = readFileSync(tsconfigPath, 'utf-8');\n\n // Check if baseUrl and paths already exist\n if (content.includes('\"baseUrl\"') && content.includes('\"paths\"') && content.includes('\"@/*\"')) {\n return; // Already configured\n }\n\n // Find the position to insert path aliases - right before the closing brace of compilerOptions\n // Look for the last property in compilerOptions before the closing brace\n const compilerOptionsMatch = content.match(/\"compilerOptions\"\\s*:\\s*{/);\n if (!compilerOptionsMatch) {\n throw new Error('compilerOptions not found');\n }\n\n // Strategy: Insert before the closing } of compilerOptions\n // Find the pattern: any content followed by closing brace and comma (or newline), followed by \"include\" or other root property\n const insertPattern = /(\\s*)(}\\s*,?\\s*\\n\\s*\"(?:include|exclude|extends|files|references))/;\n const match = content.match(insertPattern);\n\n if (match) {\n const indent = match[1] || ' ';\n // Insert path config before the closing brace\n const pathConfig = `,\\n\\n${indent}/* Path Aliases */\\n${indent}\"baseUrl\": \".\",\\n${indent}\"paths\": {\\n${indent} \"@/*\": [\"./src/*\"]\\n${indent}}`;\n\n content = content.replace(insertPattern, `${pathConfig}\\n${indent}}$2`);\n writeFileSync(tsconfigPath, content, 'utf-8');\n }\n } catch (error) {\n // Silently fail - path aliases are not critical\n }\n}\n\n/**\n * Configure Vite path aliases in vite.config\n */\nfunction configureViteAliases(cwd: string, viteConfigFile: string): void {\n const viteConfigPath = resolve(cwd, viteConfigFile);\n\n if (!existsSync(viteConfigPath)) {\n return;\n }\n\n try {\n let content = readFileSync(viteConfigPath, 'utf-8');\n\n // Check if path is already imported\n if (!content.includes(\"import path from 'path'\") && !content.includes('import path from \"path\"')) {\n // Add path import after the first import line\n content = content.replace(\n /(import .+ from .+\\n)/,\n \"$1import path from 'path'\\n\"\n );\n }\n\n // Check if resolve.alias is already configured\n if (!content.includes('resolve:') && !content.includes('@:')) {\n // Add resolve.alias configuration\n content = content.replace(\n /(plugins: \\[.+\\],?)/s,\n `$1\\n resolve: {\\n alias: {\\n '@': path.resolve(__dirname, './src'),\\n },\\n },`\n );\n }\n\n writeFileSync(viteConfigPath, content, 'utf-8');\n } catch (error) {\n console.error(chalk.yellow(`Warning: Could not update ${viteConfigFile}`));\n }\n}\n"],"names":["prompts","chalk","ora","detectFramework","detectPackageManager","hasSrcDirectory","createComponentsConfig","hasComponentsConfig","getDefaultConfig","writeFile","ensureDir","installDependencies","resolve","existsSync","readFileSync","writeFileSync","initCommand","options","console","log","bold","cyan","cwd","yellow","overwrite","type","name","message","initial","gray","detectedFramework","red","green","frameworkMap","angular","react","vue","flutter","nextjs","nuxtjs","unknown","framework","packageManager","config","usesSrcDir","yes","promptQuestions","push","active","inactive","choices","title","value","tailwind","css","answers","Object","keys","length","typescript","iconLibrary","baseColor","cssFile","spinner","start","dependencies","devDependencies","silent","dev","succeed","error","fail","dirSpinner","baseDir","componentsPath","aliases","components","replace","utilsPath","utils","utilsSpinner","utilsContent","getUtilsContent","configSpinner","tailwindSpinner","tailwindConfigPath","tailwindConfigContent","getTailwindConfigContent","postcssConfigPath","postcssConfigContent","getPostCSSConfigContent","cssSpinner","cssPath","cssContent","getCSSContent","aliasSpinner","configureTypeScriptAliases","configureViteAliases","white","contentPaths","colorVariables","slate","light","dark","zinc","neutral","stone","colors","tsconfigFile","tsconfigPath","content","includes","compilerOptionsMatch","match","Error","insertPattern","indent","pathConfig","viteConfigFile","viteConfigPath"],"mappings":";AAAA,OAAOA,aAAa,UAAU;AAC9B,OAAOC,WAAW,QAAQ;AAC1B,OAAOC,SAAS,MAAM;AACtB,SACEC,eAAe,EACfC,oBAAoB,EACpBC,eAAe,QAEV,qBAAqB;AAC5B,SACEC,sBAAsB,EACtBC,mBAAmB,QAGd,gCAA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EAAED,OAAO,oBAAoB,EAAEA,OAAO,iBAAiB,EAAEA,OAAO,YAAY,EAAEA,OAAO,sBAAsB,EAAEA,OAAO,CAAC,CAAC;YAE/IN,UAAUA,QAAQjC,OAAO,CAACsC,eAAe,GAAGE,WAAW,EAAE,EAAED,OAAO,GAAG,CAAC;YACtErG,cAAc8F,cAAcC,SAAS;QACvC;IACF,EAAE,OAAOxC,OAAO;IACd,gDAAgD;IAClD;AACF;AAEA;;CAEC,GACD,SAAS2B,qBAAqB3E,GAAW,EAAEgG,cAAsB;IAC/D,MAAMC,iBAAiB3G,QAAQU,KAAKgG;IAEpC,IAAI,CAACzG,WAAW0G,iBAAiB;QAC/B;IACF;IAEA,IAAI;QACF,IAAIT,UAAUhG,aAAayG,gBAAgB;QAE3C,oCAAoC;QACpC,IAAI,CAACT,QAAQC,QAAQ,CAAC,8BAA8B,CAACD,QAAQC,QAAQ,CAAC,4BAA4B;YAChG,8CAA8C;YAC9CD,UAAUA,QAAQjC,OAAO,CACvB,yBACA;QAEJ;QAEA,+CAA+C;QAC/C,IAAI,CAACiC,QAAQC,QAAQ,CAAC,eAAe,CAACD,QAAQC,QAAQ,CAAC,OAAO;YAC5D,kCAAkC;YAClCD,UAAUA,QAAQjC,OAAO,CACvB,sCACA,CAAC,0FAA0F,CAAC;QAEhG;QAEA9D,cAAcwG,gBAAgBT,SAAS;IACzC,EAAE,OAAOxC,OAAO;QACdpD,QAAQoD,KAAK,CAACrE,MAAMsB,MAAM,CAAC,CAAC,0BAA0B,EAAE+F,gBAAgB;IAC1E;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "galaxy-design",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "CLI tool for adding Galaxy UI components to your Vue, React, Angular, Next.js, Nuxt.js, React Native, or Flutter project",
5
5
  "author": "Bùi Trọng Hiếu (kevinbui) <kevinbui210191@gmail.com>",
6
6
  "license": "MIT",