@viliha/vui-ui 1.4.0 → 1.4.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/bin/vui.mjs CHANGED
@@ -42,6 +42,8 @@ const DEPS = [
42
42
  "recharts",
43
43
  "sonner",
44
44
  "tailwind-merge",
45
+ // theme's globals.css imports these:
46
+ "tw-animate-css",
45
47
  "zod",
46
48
  ].join(" ");
47
49
 
@@ -64,9 +66,11 @@ Usage:
64
66
  init Set up the VUI theme in this project (interactive).
65
67
 
66
68
  Options:
69
+ --nextjs | --turbo standalone Next.js app, or a Turborepo (Q0)
70
+ --dir <path> Turborepo target app dir (default apps/web)
67
71
  --fresh | --existing project type (Q1)
68
72
  --prebuilt | --theme-only pre-built shell + demo, or just the theme (Q2)
69
- --yes, -y accept defaults (fresh, prebuilt)
73
+ --yes, -y accept defaults (nextjs, fresh, prebuilt)
70
74
  --force overwrite existing files
71
75
  --dry-run preview without writing
72
76
  `);
@@ -129,6 +133,27 @@ function allFiles(dir, out = []) {
129
133
  }
130
134
 
131
135
  async function main() {
136
+ const cwd = process.cwd();
137
+
138
+ // Q0 — standalone Next.js vs Turborepo (decides WHERE files land).
139
+ let turbo = has("--turbo") ? true : has("--nextjs") ? false : null;
140
+ if (turbo === null) {
141
+ const a = await ask(
142
+ "Is this a standalone Next.js app or a Turborepo? [N/t] ",
143
+ "n",
144
+ );
145
+ turbo = a.startsWith("t");
146
+ }
147
+ let appDir = ".";
148
+ if (turbo) {
149
+ const di = args.indexOf("--dir");
150
+ const flagDir = di >= 0 ? args[di + 1] : null;
151
+ appDir =
152
+ flagDir ||
153
+ (await ask("Target app directory inside the repo? [apps/web] ", "apps/web"));
154
+ }
155
+ const targetRoot = join(cwd, appDir);
156
+
132
157
  // Q1 — fresh vs existing.
133
158
  let fresh = has("--fresh") ? true : has("--existing") ? false : null;
134
159
  if (fresh === null) {
@@ -155,14 +180,13 @@ async function main() {
155
180
  return;
156
181
  }
157
182
 
158
- const cwd = process.cwd();
159
183
  const files = allFiles(TEMPLATE);
160
184
  let created = 0;
161
185
  let skipped = 0;
162
186
  const configSkipped = [];
163
187
 
164
- const label = `${fresh ? "fresh" : "existing"}, ${prebuilt ? "prebuilt" : "theme-only"}`;
165
- console.log(`\nScaffolding VUI (${label}) into ${cwd}${dry ? " [dry run]" : ""}\n`);
188
+ const label = `${turbo ? "turbo" : "nextjs"}, ${fresh ? "fresh" : "existing"}, ${prebuilt ? "prebuilt" : "theme-only"}`;
189
+ console.log(`\nScaffolding VUI (${label}) into ${targetRoot}${dry ? " [dry run]" : ""}\n`);
166
190
 
167
191
  for (const abs of files) {
168
192
  const rel = relative(TEMPLATE, abs);
@@ -183,7 +207,7 @@ async function main() {
183
207
  // Fresh overwrites boilerplate (create-next-app defaults); existing is
184
208
  // non-destructive so we never clobber the user's own files.
185
209
  const force = forceFlag || fresh;
186
- const dest = join(cwd, rel);
210
+ const dest = join(targetRoot, rel);
187
211
  if (existsSync(dest) && !force) {
188
212
  skipped++;
189
213
  console.log(` skip ${rel}`);
@@ -231,6 +255,15 @@ The shell + demo were added under app/(app)/ and app/_components/ — review the
231
255
  ? `\nSkipped config: ${configSkipped.join(", ")}`
232
256
  : ""
233
257
  }
258
+ `);
259
+ }
260
+
261
+ if (turbo) {
262
+ console.log(`Turborepo notes (target: ${appDir}):
263
+ • Add "@viliha/vui-ui" to ${appDir}/package.json dependencies.
264
+ • Ensure your workspace globs include this app (pnpm-workspace.yaml / workspaces).
265
+ • Run install + dev from the repo root or with a filter, e.g.
266
+ pnpm --filter <app-name> dev
234
267
  `);
235
268
  }
236
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viliha/vui-ui",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Vui UI — a clean, token-driven React admin/CRM component library built on Tailwind CSS v4, shadcn-style patterns, and Radix Icons. Ships as TypeScript source (Just-in-Time), compiled by the consuming app.",
5
5
  "license": "MIT",
6
6
  "author": "Suman Bonakurthi",
@@ -0,0 +1,40 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "allowJs": true,
10
+ "skipLibCheck": true,
11
+ "strict": true,
12
+ "noEmit": true,
13
+ "esModuleInterop": true,
14
+ "module": "esnext",
15
+ "moduleResolution": "bundler",
16
+ "resolveJsonModule": true,
17
+ "isolatedModules": true,
18
+ "jsx": "preserve",
19
+ "incremental": true,
20
+ "plugins": [
21
+ {
22
+ "name": "next"
23
+ }
24
+ ],
25
+ "paths": {
26
+ "@/*": [
27
+ "./*"
28
+ ]
29
+ }
30
+ },
31
+ "include": [
32
+ "next-env.d.ts",
33
+ "**/*.ts",
34
+ "**/*.tsx",
35
+ ".next/types/**/*.ts"
36
+ ],
37
+ "exclude": [
38
+ "node_modules"
39
+ ]
40
+ }