import { Command } from 'commander' import prompts from 'prompts' import path from 'path' import fs from 'fs-extra' import ora from 'ora' import { kleur } from '../utils/colors' const COMPONENTS = [ 'hero-ultra', 'navbar-ultra', 'feature-cards-ultra', 'sidebar-ultra', 'glow-buttons-ultra', 'dashboard-ultra', 'pricing-ultra', 'table-ultra', 'btn-glass-ultra', 'badge-neon-ultra', 'input-cyber-ultra', 'card-gradient-ultra', 'aurora-bg-elite', 'tooltip-cyber-elite', 'input-elite-ultra', 'card-float-elite', 'card-royal-elite', 'btn-royal-elite', 'card-prism-elite', 'progress-vapor-elite', 'card-vapor-elite', 'b-glass', 'b-neumorphic', 'b-skeuo', 'b-brutalist', 'b-cyber-neon', 'b-clay', 'b-aurora' ] const TEMPLATES: Record = { 'hero-ultra': `

Beyond The Future

Experience the world's most advanced design intelligence layer. Fast, accessible, and breathtakingly beautiful.

`, 'navbar-ultra': ` `, 'feature-cards-ultra': `

Spatial Logic

Build interfaces that understand the environment natively.

Zero Runtime

Performance built-in from the ground up, no bloat.

Intent-Based

Declarative state management tied directly to visuals.

`, 'sidebar-ultra': ` `, 'glow-buttons-ultra': `
`, 'dashboard-ultra': `

Command Center

Total Volume

$1.2M

`, 'pricing-ultra': `

Premium Tiers

Pro Tier

$49/mo
  • ✓ Advanced Analytics
  • ✓ Premium Support
`, 'table-ultra': `
System Status Latency
Core Engine Online 12ms
Data Layer Online 8ms
`, 'btn-glass-ultra': ` `, 'badge-neon-ultra': `
Active Deployed Pending
`, 'input-cyber-ultra': `
`, 'card-gradient-ultra': `

Neural Interface

Connect your consciousness to the global grid with zero latency.

`, 'aurora-bg-elite': `

Aurora Architecture

Adaptive ambient lighting that evolves with your interface state.

`, 'tooltip-cyber-elite': `
Hover for System Status
`, 'input-elite-ultra': `
`, 'card-float-elite': `

Levitational Design

Interfaces that defy standard gravity physics.

`, 'card-royal-elite': `

Imperial

A design language curated for the elite. Silk gradients meet golden ambient light.

`, 'btn-royal-elite': `
`, 'card-prism-elite': `
Core v3.0

Prism Architecture

Crystalline geometric design patterns for high-fidelity data interfaces.

`, 'progress-vapor-elite': `
`, 'card-vapor-elite': `

Ethereal Logic

Lightweight design language with blurred radial ambient lighting.

`, 'b-glass': `

Glass Surface

Frosted glass effect with deep backdrop blur.

`, 'b-neumorphic': `

Soft UI

`, 'b-skeuo': `

Physical Realism

`, 'b-brutalist': `

Raw Core

VERSION 3.0

`, 'b-cyber-neon': `

Cyber Link Active

`, 'b-clay': `

Clay Softness

Smooth inner shadows for high-tactile depth.

`, 'b-aurora': `

Northern Lights

Dynamic animated mesh gradients.

` }; export const add = new Command() .name('add') .description('Add a futuristic component to your project') .argument('[component]', 'the component to add') .action(async (component: string | undefined) => { let componentToAdd = component if (!componentToAdd) { const response = await prompts({ type: 'select', name: 'component', message: 'Which component do you want to add?', choices: COMPONENTS.map(c => ({ title: c, value: c })) }) componentToAdd = response.component } if (!componentToAdd || !COMPONENTS.includes(componentToAdd)) { console.error(kleur.red(`Error: Component ${componentToAdd} not found.`)) return } const spinner = ora(`Adding ${componentToAdd}...`).start() const destPath = path.join(process.cwd(), 'components', `${componentToAdd}.html`) await fs.ensureDir(path.dirname(destPath)) try { const templateCode = TEMPLATES[componentToAdd] || `` await fs.writeFile(destPath, templateCode, 'utf-8') spinner.succeed(`${componentToAdd} added successfully to ./components/${componentToAdd}.html`) } catch (err) { spinner.fail(`Failed to add ${componentToAdd}. Make sure you are in the framework directory or have installed the package correctly.`) console.error(err) } })