7onic 0.1.1 → 0.1.3

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
@@ -1251,7 +1251,13 @@ var CSS_V4_IMPORTS = `@import '@7onic-ui/tokens/css/variables.css';
1251
1251
  `;
1252
1252
  async function init(args) {
1253
1253
  const flagYes = args.includes("--yes") || args.includes("-y");
1254
+ const tailwindFlagIdx = args.indexOf("--tailwind");
1255
+ const tailwindFlagRaw = tailwindFlagIdx !== -1 ? args[tailwindFlagIdx + 1] : null;
1256
+ const forcedTailwindVersion = tailwindFlagRaw === "v3" || tailwindFlagRaw === "3" ? 3 : tailwindFlagRaw === "v4" || tailwindFlagRaw === "4" ? 4 : null;
1254
1257
  mt(import_picocolors2.default.bold("7onic init"));
1258
+ if (tailwindFlagIdx !== -1 && forcedTailwindVersion === null) {
1259
+ O2.warn(`Invalid --tailwind value: "${tailwindFlagRaw ?? "(empty)"}". Use v3 or v4.`);
1260
+ }
1255
1261
  const cwd = process.cwd();
1256
1262
  const projectRoot = findProjectRoot(cwd);
1257
1263
  if (!projectRoot) {
@@ -1298,13 +1304,14 @@ async function init(args) {
1298
1304
  const cssDefault = CSS_CANDIDATES.find((c2) => import_node_fs4.default.existsSync(import_node_path4.default.join(projectRoot, c2))) || "src/app/globals.css";
1299
1305
  let config;
1300
1306
  if (flagYes) {
1307
+ const resolvedVersion = forcedTailwindVersion ?? tw.version;
1301
1308
  config = {
1302
1309
  componentsAlias: "@/components/ui",
1303
1310
  utilsAlias: "@/lib/utils",
1304
- tailwindVersion: tw.version,
1311
+ tailwindVersion: resolvedVersion,
1305
1312
  cssPath: cssDefault
1306
1313
  };
1307
- O2.info(`Using defaults: Tailwind v${tw.version}, CSS: ${cssDefault}`);
1314
+ O2.info(`Using defaults: Tailwind v${resolvedVersion}, CSS: ${cssDefault}`);
1308
1315
  } else {
1309
1316
  config = await dt(
1310
1317
  {
@@ -1324,7 +1331,7 @@ async function init(args) {
1324
1331
  { value: 3, label: "Tailwind v3" },
1325
1332
  { value: 4, label: "Tailwind v4" }
1326
1333
  ],
1327
- initialValue: tw.version
1334
+ initialValue: forcedTailwindVersion ?? tw.version
1328
1335
  }),
1329
1336
  cssPath: () => Ot({
1330
1337
  message: "CSS file path",
@@ -12864,7 +12871,7 @@ function showSetupHints(names) {
12864
12871
 
12865
12872
  // cli/src/index.ts
12866
12873
  var import_picocolors4 = __toESM(require_picocolors());
12867
- var VERSION = "0.1.0";
12874
+ var VERSION = "0.1.3";
12868
12875
  var HELP = `
12869
12876
  ${import_picocolors4.default.bold("7onic")} \u2014 Add 7onic design system components to your project
12870
12877
 
@@ -12875,12 +12882,22 @@ ${import_picocolors4.default.bold("Commands:")}
12875
12882
  init Initialize 7onic in your project
12876
12883
  add <component...> Add components to your project
12877
12884
 
12878
- ${import_picocolors4.default.bold("Options:")}
12885
+ ${import_picocolors4.default.bold("Init options:")}
12886
+ --tailwind v3|v4 Set Tailwind version (default: auto-detect)
12887
+ --yes, -y Skip prompts, use defaults
12888
+
12889
+ ${import_picocolors4.default.bold("Add options:")}
12890
+ --all Add all components
12891
+ --overwrite Overwrite existing files
12892
+ --yes, -y Skip prompts
12893
+
12894
+ ${import_picocolors4.default.bold("Global options:")}
12879
12895
  --version, -v Show version
12880
12896
  --help, -h Show this help message
12881
12897
 
12882
12898
  ${import_picocolors4.default.bold("Examples:")}
12883
12899
  npx 7onic init
12900
+ npx 7onic init --tailwind v3 --yes
12884
12901
  npx 7onic add button card input
12885
12902
  npx 7onic add --all
12886
12903
  `;
package/llms.txt CHANGED
@@ -19,11 +19,11 @@ Initialize 7onic in your project. Creates `7onic.json`, installs base dependenci
19
19
 
20
20
  ```bash
21
21
  npx 7onic init
22
- npx 7onic init --yes # Skip prompts, use defaults
22
+ npx 7onic init --tailwind v3 --yes # Explicit v3, skip prompts
23
23
  ```
24
24
 
25
25
  **What it does:**
26
- 1. Detects Tailwind version (v3: config file exists, v4: no config)
26
+ 1. Detects Tailwind version (v3: config file exists, v4: no config) — or uses `--tailwind` flag
27
27
  2. Detects package manager (npm/pnpm/yarn/bun)
28
28
  3. Installs: `@7onic-ui/tokens`, `clsx`, `tailwind-merge`, `class-variance-authority`
29
29
  4. Creates/updates CSS file with token imports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "7onic",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CLI for adding 7onic design system components to your project",
5
5
  "bin": {
6
6
  "7onic": "./dist/index.js"