basuicn 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/dist/ui-cli.cjs +421 -0
  2. package/package.json +85 -86
@@ -0,0 +1,421 @@
1
+ #!/usr/bin/env node
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+
25
+ // scripts/ui-cli.ts
26
+ var import_fs = __toESM(require("fs"), 1);
27
+ var import_path = __toESM(require("path"), 1);
28
+ var import_child_process = require("child_process");
29
+ var REGISTRY_LOCAL = "./registry.json";
30
+ var REGISTRY_REMOTE = "https://raw.githubusercontent.com/huy14032003/ui-component/main/registry.json";
31
+ var log = (msg) => console.log(`[basuicn] ${msg}`);
32
+ var warn = (msg) => console.warn(`[basuicn] WARN: ${msg}`);
33
+ var error = (msg) => console.error(`[basuicn] ERROR: ${msg}`);
34
+ var getTargetProjectDir = () => process.cwd();
35
+ var validateRegistry = (data) => {
36
+ if (!data || typeof data !== "object") return false;
37
+ const reg = data;
38
+ return "components" in reg && typeof reg.components === "object" && reg.components !== null;
39
+ };
40
+ var getRegistry = async (isLocal) => {
41
+ if (isLocal && import_fs.default.existsSync(REGISTRY_LOCAL)) {
42
+ log("Using local registry...");
43
+ try {
44
+ const data = JSON.parse(import_fs.default.readFileSync(REGISTRY_LOCAL, "utf-8"));
45
+ if (!validateRegistry(data)) {
46
+ error('Invalid local registry format \u2014 missing "components" field.');
47
+ process.exit(1);
48
+ }
49
+ return data;
50
+ } catch (err) {
51
+ error(`Failed to parse local registry: ${err instanceof Error ? err.message : err}`);
52
+ process.exit(1);
53
+ }
54
+ }
55
+ log("Fetching registry from remote...");
56
+ try {
57
+ const response = await fetch(REGISTRY_REMOTE);
58
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
59
+ const data = await response.json();
60
+ if (!validateRegistry(data)) {
61
+ error('Invalid remote registry format \u2014 missing "components" field.');
62
+ process.exit(1);
63
+ }
64
+ return data;
65
+ } catch (err) {
66
+ const message = err instanceof Error ? err.message : String(err);
67
+ error(`Cannot fetch registry: ${message}`);
68
+ process.exit(1);
69
+ }
70
+ };
71
+ var installNpmPackages = (packages, cwd, dev = false) => {
72
+ if (packages.length === 0) return;
73
+ const pkgJsonPath = import_path.default.join(cwd, "package.json");
74
+ let toInstall = packages;
75
+ if (import_fs.default.existsSync(pkgJsonPath)) {
76
+ const pkg = JSON.parse(import_fs.default.readFileSync(pkgJsonPath, "utf-8"));
77
+ const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
78
+ toInstall = packages.filter((p) => !allDeps[p]);
79
+ }
80
+ if (toInstall.length === 0) return;
81
+ log(`Installing: ${toInstall.join(", ")}...`);
82
+ const flag = dev ? "--save-dev" : "--save";
83
+ try {
84
+ (0, import_child_process.execSync)(`npm install ${toInstall.join(" ")} ${flag}`, { stdio: "inherit", cwd });
85
+ } catch (err) {
86
+ error(`Failed to install packages: ${toInstall.join(", ")}. ${err instanceof Error ? err.message : ""}`);
87
+ }
88
+ };
89
+ var VITE_DEV_PACKAGES = ["tailwindcss", "@tailwindcss/vite", "@vitejs/plugin-react", "vite-plugin-babel", "babel-plugin-react-compiler", "@types/node"];
90
+ var RUNTIME_PACKAGES = ["@base-ui/react", "tailwind-variants", "clsx", "tailwind-merge", "tailwindcss-animate"];
91
+ var VITE_CONFIG_TEMPLATE = `import { defineConfig } from 'vite';
92
+ import tailwindcss from '@tailwindcss/vite';
93
+ import react from '@vitejs/plugin-react';
94
+ import babel from 'vite-plugin-babel';
95
+ import { reactCompilerPreset } from 'babel-plugin-react-compiler';
96
+ import path from 'path';
97
+
98
+ // https://vite.dev/config/
99
+ export default defineConfig({
100
+ plugins: [
101
+ tailwindcss(),
102
+ react(),
103
+ babel({ presets: [reactCompilerPreset()] }),
104
+ ],
105
+ resolve: {
106
+ alias: {
107
+ '@': path.resolve(__dirname, './src'),
108
+ '@lib': path.resolve(__dirname, './src/lib'),
109
+ '@components': path.resolve(__dirname, './src/components'),
110
+ '@assets': path.resolve(__dirname, './src/assets'),
111
+ '@pages': path.resolve(__dirname, './src/pages'),
112
+ '@styles': path.resolve(__dirname, './src/styles'),
113
+ },
114
+ },
115
+ });
116
+ `;
117
+ var TSCONFIG_PATHS = {
118
+ "@/*": ["./src/*"],
119
+ "@lib/*": ["./src/lib/*"],
120
+ "@components/*": ["./src/components/*"],
121
+ "@assets/*": ["./src/assets/*"],
122
+ "@pages/*": ["./src/pages/*"],
123
+ "@styles/*": ["./src/styles/*"]
124
+ };
125
+ var setupViteConfig = (cwd) => {
126
+ installNpmPackages(VITE_DEV_PACKAGES, cwd, true);
127
+ const configTs = import_path.default.join(cwd, "vite.config.ts");
128
+ const configJs = import_path.default.join(cwd, "vite.config.js");
129
+ if (!import_fs.default.existsSync(configTs) && !import_fs.default.existsSync(configJs)) {
130
+ import_fs.default.writeFileSync(configTs, VITE_CONFIG_TEMPLATE);
131
+ log("Created vite.config.ts with Tailwind + React Compiler setup.");
132
+ return;
133
+ }
134
+ const existingPath = import_fs.default.existsSync(configTs) ? configTs : configJs;
135
+ let content = import_fs.default.readFileSync(existingPath, "utf-8");
136
+ const missingImports = [];
137
+ if (!content.includes("@tailwindcss/vite")) missingImports.push("import tailwindcss from '@tailwindcss/vite';");
138
+ if (!content.includes("@vitejs/plugin-react")) missingImports.push("import react from '@vitejs/plugin-react';");
139
+ if (!content.includes("vite-plugin-babel")) missingImports.push("import babel from 'vite-plugin-babel';");
140
+ if (!content.includes("babel-plugin-react-compiler")) missingImports.push("import { reactCompilerPreset } from 'babel-plugin-react-compiler';");
141
+ if (!content.includes("from 'path'") && !content.includes('from "path"')) missingImports.push("import path from 'path';");
142
+ const missingPlugins = [];
143
+ if (!content.includes("tailwindcss()")) missingPlugins.push("tailwindcss()");
144
+ if (!content.includes("react()") && !content.includes("react({")) missingPlugins.push("react()");
145
+ if (!content.includes("reactCompilerPreset")) missingPlugins.push("babel({ presets: [reactCompilerPreset()] })");
146
+ const hasAlias = content.includes("alias:") || content.includes("alias(") || content.includes("'@'") || content.includes('"@"');
147
+ if (missingImports.length === 0 && missingPlugins.length === 0 && hasAlias) {
148
+ log("vite.config already configured \u2014 skipping.");
149
+ return;
150
+ }
151
+ if (missingImports.length > 0) {
152
+ const importBlock = missingImports.join("\n");
153
+ const allImports = [...content.matchAll(/^import\s.+$/gm)];
154
+ if (allImports.length > 0) {
155
+ const last = allImports[allImports.length - 1];
156
+ const pos = last.index + last[0].length;
157
+ content = content.slice(0, pos) + "\n" + importBlock + content.slice(pos);
158
+ } else {
159
+ content = importBlock + "\n" + content;
160
+ }
161
+ }
162
+ if (missingPlugins.length > 0) {
163
+ const match = content.match(/plugins:\s*\[/);
164
+ if (match && match.index !== void 0) {
165
+ const pos = match.index + match[0].length;
166
+ const after = content.slice(pos);
167
+ const pluginLines = missingPlugins.map((p) => `
168
+ ${p},`).join("");
169
+ const needsNewline = after.length > 0 && after[0] !== "\n" && after[0] !== "\r";
170
+ content = content.slice(0, pos) + pluginLines + (needsNewline ? "\n " : "") + after;
171
+ }
172
+ }
173
+ if (!hasAlias) {
174
+ const aliasBlock = [
175
+ " resolve: {",
176
+ " alias: {",
177
+ " '@': path.resolve(__dirname, './src'),",
178
+ " '@lib': path.resolve(__dirname, './src/lib'),",
179
+ " '@components': path.resolve(__dirname, './src/components'),",
180
+ " '@assets': path.resolve(__dirname, './src/assets'),",
181
+ " '@pages': path.resolve(__dirname, './src/pages'),",
182
+ " '@styles': path.resolve(__dirname, './src/styles'),",
183
+ " },",
184
+ " },"
185
+ ].join("\n");
186
+ const pluginsStart = content.search(/plugins:\s*\[/);
187
+ if (pluginsStart !== -1) {
188
+ let depth = 0;
189
+ let foundStart = false;
190
+ for (let i = pluginsStart; i < content.length; i++) {
191
+ if (content[i] === "[") {
192
+ depth++;
193
+ foundStart = true;
194
+ }
195
+ if (content[i] === "]") depth--;
196
+ if (foundStart && depth === 0) {
197
+ let lineEnd = content.indexOf("\n", i);
198
+ if (lineEnd === -1) lineEnd = content.length;
199
+ content = content.slice(0, lineEnd + 1) + aliasBlock + "\n" + content.slice(lineEnd + 1);
200
+ break;
201
+ }
202
+ }
203
+ }
204
+ }
205
+ import_fs.default.writeFileSync(existingPath, content);
206
+ log(`Updated ${import_path.default.basename(existingPath)} with Tailwind + React Compiler + path aliases.`);
207
+ };
208
+ var ensureTailwindCss = (cwd) => {
209
+ const candidates = ["src/index.css", "src/App.css", "src/main.css"];
210
+ for (const cssFile of candidates) {
211
+ const cssPath = import_path.default.join(cwd, cssFile);
212
+ if (import_fs.default.existsSync(cssPath)) {
213
+ const content = import_fs.default.readFileSync(cssPath, "utf-8");
214
+ if (!content.includes('@import "tailwindcss"') && !content.includes("@import 'tailwindcss'")) {
215
+ import_fs.default.writeFileSync(cssPath, `@import "tailwindcss";
216
+
217
+ ${content}`);
218
+ log(`Added @import "tailwindcss" to ${cssFile}`);
219
+ } else {
220
+ log(`${cssFile} already imports Tailwind \u2014 skipping.`);
221
+ }
222
+ return;
223
+ }
224
+ }
225
+ const srcDir = import_path.default.join(cwd, "src");
226
+ if (!import_fs.default.existsSync(srcDir)) import_fs.default.mkdirSync(srcDir, { recursive: true });
227
+ import_fs.default.writeFileSync(import_path.default.join(srcDir, "index.css"), '@import "tailwindcss";\n');
228
+ log('Created src/index.css with @import "tailwindcss"');
229
+ };
230
+ var setupTsConfig = (cwd) => {
231
+ const candidates = ["tsconfig.app.json", "tsconfig.json"];
232
+ for (const candidate of candidates) {
233
+ const configPath = import_path.default.join(cwd, candidate);
234
+ if (!import_fs.default.existsSync(configPath)) continue;
235
+ const raw = import_fs.default.readFileSync(configPath, "utf-8");
236
+ if (raw.includes('"@/*"') || raw.includes("'@/*'")) {
237
+ log(`${candidate} already has path aliases \u2014 skipping.`);
238
+ return;
239
+ }
240
+ try {
241
+ const stripped = raw.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[\s,{[\]])\/\/[^\n]*/g, "$1");
242
+ const parsed = JSON.parse(stripped);
243
+ if (!parsed.compilerOptions) parsed.compilerOptions = {};
244
+ parsed.compilerOptions.baseUrl = ".";
245
+ parsed.compilerOptions.paths = TSCONFIG_PATHS;
246
+ import_fs.default.writeFileSync(configPath, JSON.stringify(parsed, null, 2));
247
+ log(`Added path aliases to ${candidate}.`);
248
+ } catch (err) {
249
+ warn(`Could not auto-patch ${candidate}: ${err instanceof Error ? err.message : err}`);
250
+ warn("Add these to compilerOptions manually:");
251
+ console.log('\n "baseUrl": ".",');
252
+ console.log(' "paths": {');
253
+ for (const [alias, targets] of Object.entries(TSCONFIG_PATHS)) {
254
+ console.log(` "${alias}": ["${targets[0]}"],`);
255
+ }
256
+ console.log(" }");
257
+ console.log("");
258
+ }
259
+ return;
260
+ }
261
+ const newConfig = { compilerOptions: { baseUrl: ".", paths: TSCONFIG_PATHS } };
262
+ import_fs.default.writeFileSync(import_path.default.join(cwd, "tsconfig.json"), JSON.stringify(newConfig, null, 2));
263
+ log("Created tsconfig.json with path aliases.");
264
+ };
265
+ var ensureCore = (registry, cwd) => {
266
+ const core = registry.core;
267
+ if (!core) return;
268
+ installNpmPackages(core.dependencies, cwd);
269
+ for (const file of core.files) {
270
+ const targetPath = import_path.default.join(cwd, file.path);
271
+ const targetDir = import_path.default.dirname(targetPath);
272
+ if (!import_fs.default.existsSync(targetDir)) {
273
+ import_fs.default.mkdirSync(targetDir, { recursive: true });
274
+ }
275
+ if (!import_fs.default.existsSync(targetPath)) {
276
+ import_fs.default.writeFileSync(targetPath, file.content);
277
+ log(`Created core file: ${file.path}`);
278
+ }
279
+ }
280
+ };
281
+ var addComponent = (name, registry, cwd, options, added = /* @__PURE__ */ new Set()) => {
282
+ if (added.has(name)) return;
283
+ added.add(name);
284
+ const component = registry.components[name];
285
+ if (!component) {
286
+ error(`Component "${name}" not found. Run 'list' to see available components.`);
287
+ return;
288
+ }
289
+ log(`Adding: ${name}...`);
290
+ ensureCore(registry, cwd);
291
+ installNpmPackages(component.dependencies, cwd);
292
+ if (component.internalDependencies) {
293
+ for (const dep of component.internalDependencies) {
294
+ if (registry.components[dep]) {
295
+ addComponent(dep, registry, cwd, options, added);
296
+ }
297
+ }
298
+ }
299
+ for (const file of component.files) {
300
+ const targetPath = import_path.default.join(cwd, file.path);
301
+ const targetDir = import_path.default.dirname(targetPath);
302
+ if (!import_fs.default.existsSync(targetDir)) {
303
+ import_fs.default.mkdirSync(targetDir, { recursive: true });
304
+ }
305
+ if (import_fs.default.existsSync(targetPath) && !options.force) {
306
+ warn(`Skipped (exists): ${file.path} \u2014 use --force to overwrite`);
307
+ continue;
308
+ }
309
+ import_fs.default.writeFileSync(targetPath, file.content);
310
+ log(`Created: ${file.path}`);
311
+ }
312
+ };
313
+ var removeComponent = (name, registry, cwd) => {
314
+ const component = registry.components[name];
315
+ if (!component) {
316
+ error(`Component "${name}" not found.`);
317
+ return;
318
+ }
319
+ log(`Removing: ${name}...`);
320
+ for (const file of component.files) {
321
+ const targetPath = import_path.default.join(cwd, file.path);
322
+ if (import_fs.default.existsSync(targetPath)) {
323
+ import_fs.default.unlinkSync(targetPath);
324
+ log(`Deleted: ${file.path}`);
325
+ }
326
+ }
327
+ for (const file of component.files) {
328
+ const targetDir = import_path.default.dirname(import_path.default.join(cwd, file.path));
329
+ try {
330
+ if (import_fs.default.existsSync(targetDir) && import_fs.default.readdirSync(targetDir).length === 0) {
331
+ import_fs.default.rmdirSync(targetDir);
332
+ log(`Removed empty dir: ${import_path.default.relative(cwd, targetDir)}`);
333
+ }
334
+ } catch (err) {
335
+ warn(`Could not remove directory: ${err instanceof Error ? err.message : err}`);
336
+ }
337
+ }
338
+ };
339
+ var main = async () => {
340
+ const args = process.argv.slice(2);
341
+ const isLocal = args.includes("--local");
342
+ const isForce = args.includes("--force");
343
+ const filteredArgs = args.filter((a) => !a.startsWith("--"));
344
+ const command = filteredArgs[0];
345
+ const componentNames = filteredArgs.slice(1);
346
+ const cwd = getTargetProjectDir();
347
+ const registry = await getRegistry(isLocal);
348
+ switch (command) {
349
+ case "add": {
350
+ if (componentNames.length === 0) {
351
+ error("Usage: npx basuicn add <component-name> [--force]");
352
+ return;
353
+ }
354
+ const cnPath = import_path.default.join(cwd, "src/lib/utils/cn.ts");
355
+ if (!import_fs.default.existsSync(cnPath)) {
356
+ log("Project not initialized \u2014 running init first...");
357
+ setupViteConfig(cwd);
358
+ setupTsConfig(cwd);
359
+ ensureTailwindCss(cwd);
360
+ installNpmPackages(RUNTIME_PACKAGES, cwd);
361
+ }
362
+ for (const name of componentNames) {
363
+ addComponent(name, registry, cwd, { force: isForce });
364
+ }
365
+ log("Done!");
366
+ break;
367
+ }
368
+ case "remove": {
369
+ if (componentNames.length === 0) {
370
+ error("Usage: npx basuicn remove <component-name>");
371
+ return;
372
+ }
373
+ for (const name of componentNames) {
374
+ removeComponent(name, registry, cwd);
375
+ }
376
+ log("Done!");
377
+ break;
378
+ }
379
+ case "list": {
380
+ const components = Object.keys(registry.components).sort();
381
+ log(`Available components (${components.length}):`);
382
+ for (const k of components) {
383
+ const deps = registry.components[k].internalDependencies;
384
+ const depStr = deps?.length ? ` (requires: ${deps.join(", ")})` : "";
385
+ console.log(` - ${k}${depStr}`);
386
+ }
387
+ break;
388
+ }
389
+ case "init": {
390
+ setupViteConfig(cwd);
391
+ setupTsConfig(cwd);
392
+ ensureTailwindCss(cwd);
393
+ installNpmPackages(RUNTIME_PACKAGES, cwd);
394
+ ensureCore(registry, cwd);
395
+ log("Initialization complete.");
396
+ break;
397
+ }
398
+ case "tailwind": {
399
+ console.log("\n--- Copy to tailwind.config.ts / tailwind.config.js ---\n");
400
+ console.log("// See README_CLI.md for full theme config");
401
+ break;
402
+ }
403
+ default: {
404
+ console.log(`
405
+ basuicn \u2014 UI Component CLI
406
+
407
+ Commands:
408
+ init Initialize project (install core deps + files)
409
+ add <name> [--force] Add component(s) to your project
410
+ remove <name> Remove component(s) from your project
411
+ list List all available components
412
+ tailwind Show Tailwind config instructions
413
+
414
+ Options:
415
+ --local Use local registry.json instead of remote
416
+ --force Overwrite existing files when adding
417
+ `);
418
+ }
419
+ }
420
+ };
421
+ main();
package/package.json CHANGED
@@ -1,86 +1,85 @@
1
- {
2
- "name": "basuicn",
3
- "private": false,
4
- "version": "0.1.0",
5
- "type": "module",
6
- "bin": {
7
- "basuicn": "./dist/ui-cli.cjs"
8
- },
9
- "files": [
10
- "dist",
11
- "registry.json",
12
- "scripts",
13
- "README_CLI.md"
14
- ],
15
- "scripts": {
16
- "dev": "vite",
17
- "build": "tsc -b && vite build",
18
- "build:cli": "npx -y esbuild scripts/ui-cli.ts --bundle --platform=node --outfile=dist/ui-cli.cjs --format=cjs --packages=external",
19
- "lint": "eslint .",
20
- "preview": "vite preview",
21
- "test": "vitest",
22
- "test:ui": "vitest --ui",
23
- "test:coverage": "vitest run --coverage",
24
- "registry:build": "npx -y tsx scripts/build-registry.ts",
25
- "ui:add": "npx -y tsx scripts/ui-cli.ts add"
26
- },
27
- "dependencies": {
28
- "@base-ui/react": "^1.3.0",
29
- "@codesandbox/sandpack-react": "^2.20.0",
30
- "@fontsource-variable/geist": "^5.2.8",
31
- "@hookform/resolvers": "^5.2.2",
32
- "@monaco-editor/react": "^4.7.0",
33
- "@tailwindcss/vite": "^4.2.2",
34
- "@tanstack/react-table": "^8.21.3",
35
- "@types/hast": "^3.0.4",
36
- "clsx": "^2.1.1",
37
- "date-fns": "^4.1.0",
38
- "dayjs": "^1.11.20",
39
- "lucide-react": "^0.577.0",
40
- "react": "^19.2.4",
41
- "react-day-picker": "^9.14.0",
42
- "react-dom": "^19.2.4",
43
- "react-hook-form": "^7.72.0",
44
- "react-live": "^4.1.8",
45
- "react-resizable-panels": "^4.8.0",
46
- "react-router-dom": "^7.13.2",
47
- "rehype-parse": "^9.0.1",
48
- "rehype-pretty-code": "^0.14.3",
49
- "rehype-react": "^8.0.0",
50
- "shiki": "^4.0.2",
51
- "sonner": "^2.0.7",
52
- "tailwind-merge": "^3.5.0",
53
- "tailwind-variants": "^3.2.2",
54
- "tailwindcss-animate": "^1.0.7",
55
- "tw-animate-css": "^1.4.0",
56
- "unified": "^11.0.5",
57
- "zod": "^4.3.6"
58
- },
59
- "devDependencies": {
60
- "@babel/core": "^7.29.0",
61
- "@eslint/js": "^9.39.4",
62
- "@rolldown/plugin-babel": "^0.2.1",
63
- "@testing-library/jest-dom": "^6.9.1",
64
- "@testing-library/react": "^16.3.2",
65
- "@testing-library/user-event": "^14.6.1",
66
- "@types/babel__core": "^7.20.5",
67
- "@types/node": "^24.12.0",
68
- "@types/react": "^19.2.14",
69
- "@types/react-dom": "^19.2.3",
70
- "@vitejs/plugin-react": "^6.0.1",
71
- "@vitest/ui": "^4.1.2",
72
- "autoprefixer": "^10.4.27",
73
- "babel-plugin-react-compiler": "^1.0.0",
74
- "eslint": "^9.39.4",
75
- "eslint-plugin-react-hooks": "^7.0.1",
76
- "eslint-plugin-react-refresh": "^0.5.2",
77
- "globals": "^17.4.0",
78
- "jsdom": "^29.0.1",
79
- "postcss": "^8.5.8",
80
- "tailwindcss": "^4.2.2",
81
- "typescript": "~5.9.3",
82
- "typescript-eslint": "^8.57.0",
83
- "vite": "^8.0.1",
84
- "vitest": "^4.1.2"
85
- }
86
- }
1
+ {
2
+ "name": "basuicn",
3
+ "private": false,
4
+ "version": "0.1.1",
5
+ "type": "module",
6
+ "bin": {
7
+ "basuicn": "./dist/ui-cli.cjs"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "registry.json",
12
+ "scripts",
13
+ "README_CLI.md"
14
+ ],
15
+ "scripts": {
16
+ "dev": "vite",
17
+ "build": "tsc -b && vite build",
18
+ "build:cli": "npx -y esbuild scripts/ui-cli.ts --bundle --platform=node --outfile=dist/ui-cli.cjs --format=cjs --packages=external",
19
+ "lint": "eslint .",
20
+ "preview": "vite preview",
21
+ "test": "vitest",
22
+ "test:ui": "vitest --ui",
23
+ "test:coverage": "vitest run --coverage",
24
+ "registry:build": "npx -y tsx scripts/build-registry.ts",
25
+ "ui:add": "npx -y tsx scripts/ui-cli.ts add"
26
+ },
27
+ "dependencies": {},
28
+ "devDependencies": {
29
+ "@babel/core": "^7.29.0",
30
+ "@base-ui/react": "^1.3.0",
31
+ "@codesandbox/sandpack-react": "^2.20.0",
32
+ "@eslint/js": "^9.39.4",
33
+ "@fontsource-variable/geist": "^5.2.8",
34
+ "@hookform/resolvers": "^5.2.2",
35
+ "@monaco-editor/react": "^4.7.0",
36
+ "@rolldown/plugin-babel": "^0.2.1",
37
+ "@tailwindcss/vite": "^4.2.2",
38
+ "@tanstack/react-table": "^8.21.3",
39
+ "@testing-library/jest-dom": "^6.9.1",
40
+ "@testing-library/react": "^16.3.2",
41
+ "@testing-library/user-event": "^14.6.1",
42
+ "@types/babel__core": "^7.20.5",
43
+ "@types/hast": "^3.0.4",
44
+ "@types/node": "^24.12.0",
45
+ "@types/react": "^19.2.14",
46
+ "@types/react-dom": "^19.2.3",
47
+ "@vitejs/plugin-react": "^6.0.1",
48
+ "@vitest/ui": "^4.1.2",
49
+ "autoprefixer": "^10.4.27",
50
+ "babel-plugin-react-compiler": "^1.0.0",
51
+ "clsx": "^2.1.1",
52
+ "date-fns": "^4.1.0",
53
+ "dayjs": "^1.11.20",
54
+ "eslint": "^9.39.4",
55
+ "eslint-plugin-react-hooks": "^7.0.1",
56
+ "eslint-plugin-react-refresh": "^0.5.2",
57
+ "globals": "^17.4.0",
58
+ "jsdom": "^29.0.1",
59
+ "lucide-react": "^0.577.0",
60
+ "postcss": "^8.5.8",
61
+ "react": "^19.2.4",
62
+ "react-day-picker": "^9.14.0",
63
+ "react-dom": "^19.2.4",
64
+ "react-hook-form": "^7.72.0",
65
+ "react-live": "^4.1.8",
66
+ "react-resizable-panels": "^4.8.0",
67
+ "react-router-dom": "^7.13.2",
68
+ "rehype-parse": "^9.0.1",
69
+ "rehype-pretty-code": "^0.14.3",
70
+ "rehype-react": "^8.0.0",
71
+ "shiki": "^4.0.2",
72
+ "sonner": "^2.0.7",
73
+ "tailwind-merge": "^3.5.0",
74
+ "tailwind-variants": "^3.2.2",
75
+ "tailwindcss": "^4.2.2",
76
+ "tailwindcss-animate": "^1.0.7",
77
+ "tw-animate-css": "^1.4.0",
78
+ "typescript": "~5.9.3",
79
+ "typescript-eslint": "^8.57.0",
80
+ "unified": "^11.0.5",
81
+ "vite": "^8.0.1",
82
+ "vitest": "^4.1.2",
83
+ "zod": "^4.3.6"
84
+ }
85
+ }