@astralkit/cli 3.0.0 → 3.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralkit/cli",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "AstralKit CLI — Install and manage UI components in your project",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "bin": {
@@ -44,30 +44,13 @@ async function initCommand(options) {
44
44
  }
45
45
  }
46
46
 
47
- // Detect or ask for framework
47
+ // Auto-detect framework silently — no prompt needed during init.
48
+ // Framework selection happens during `add` if auto-detection is wrong.
48
49
  let framework = options.framework;
49
50
  if (!framework) {
50
- const detected = detectFramework();
51
- console.log(chalk.gray(`Detected framework: ${detected}`));
52
-
53
- const { confirmed } = await inquirer.prompt([{
54
- type: 'list',
55
- name: 'confirmed',
56
- message: 'Which framework are you using?',
57
- choices: [
58
- { name: `${detected} (detected)`, value: detected },
59
- { name: 'HTML + Tailwind', value: 'html' },
60
- { name: 'React', value: 'react' },
61
- { name: 'Next.js', value: 'nextjs' },
62
- ].filter((c, i) => {
63
- // Remove duplicate if detected matches a named option
64
- if (i === 0) return true;
65
- return c.value !== detected;
66
- }),
67
- default: detected,
68
- }]);
69
- framework = confirmed;
51
+ framework = detectFramework();
70
52
  }
53
+ console.log(chalk.gray(` Framework: ${framework}`));
71
54
 
72
55
  // Component directory
73
56
  const componentDir = options.dir || 'src/components/ui';
@@ -75,7 +58,8 @@ async function initCommand(options) {
75
58
  // ─── Step 1: Install astralkit design token package ─────
76
59
  // Fetched from AstralKit API (not npm) to keep tokens private.
77
60
  // Written to node_modules/astralkit/ so imports resolve normally.
78
- if (framework !== 'html') {
61
+ // ALL frameworks need this — HTML uses @import "astralkit/theme", React/Next.js use import { cn }.
62
+ {
79
63
  if (!isAstralkitInstalled()) {
80
64
  const spinner = ora('Installing astralkit design tokens...').start();
81
65
  try {