inai-react-components 0.1.5 → 0.1.7
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/commands/add.d.ts +4 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +104 -8
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +11 -1
- package/dist/commands/theme.d.ts.map +1 -1
- package/dist/commands/theme.js +21 -1
- package/dist/index.js +3 -2
- package/package.json +4 -2
package/dist/commands/add.d.ts
CHANGED
|
@@ -28,7 +28,10 @@ export declare function findInRegistry(registry: {
|
|
|
28
28
|
export declare function getTargetDir(component: RegistryComponent, aliases: {
|
|
29
29
|
components: string;
|
|
30
30
|
blocks: string;
|
|
31
|
+
templates?: string;
|
|
31
32
|
}): string;
|
|
32
33
|
export declare function runAdd(componentSpec: string, rootDir: string): Promise<AddResult>;
|
|
33
|
-
export declare function addCommand(componentSpec?: string
|
|
34
|
+
export declare function addCommand(componentSpec?: string, options?: {
|
|
35
|
+
all?: boolean;
|
|
36
|
+
}): Promise<void>;
|
|
34
37
|
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,aAAa,CAAC;AASrB,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG;IAChD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;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/add.js
CHANGED
|
@@ -11,13 +11,30 @@ import { normalizeThemeCss, getLocalTailwindCssTemplate, getLegacyTailwindCssTem
|
|
|
11
11
|
* into its type prefix and name.
|
|
12
12
|
*/
|
|
13
13
|
export function parseComponentSpec(spec) {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const trimmed = spec.trim();
|
|
15
|
+
if (!trimmed) {
|
|
16
|
+
throw new Error('Component spec cannot be empty.');
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
let prefix = null;
|
|
19
|
+
let name;
|
|
20
|
+
if (trimmed.startsWith("block/")) {
|
|
21
|
+
prefix = "block";
|
|
22
|
+
name = trimmed.slice(6).trim();
|
|
19
23
|
}
|
|
20
|
-
|
|
24
|
+
else if (trimmed.startsWith("template/")) {
|
|
25
|
+
prefix = "template";
|
|
26
|
+
name = trimmed.slice(9).trim();
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
name = trimmed;
|
|
30
|
+
}
|
|
31
|
+
if (!name) {
|
|
32
|
+
throw new Error(`Invalid component spec "${spec}" — name cannot be empty.`);
|
|
33
|
+
}
|
|
34
|
+
if (!/^[a-z0-9][a-z0-9\-]*[a-z0-9]$|^[a-z0-9]$/.test(name)) {
|
|
35
|
+
throw new Error(`Invalid component name "${name}" — use only lowercase letters, numbers, and hyphens (e.g. "my-component").`);
|
|
36
|
+
}
|
|
37
|
+
return { prefix, name };
|
|
21
38
|
}
|
|
22
39
|
/**
|
|
23
40
|
* Find a component in the registry, optionally narrowing by type prefix.
|
|
@@ -46,7 +63,13 @@ export function getTargetDir(component, aliases) {
|
|
|
46
63
|
return aliases.blocks.replace(/^@\//, "src/");
|
|
47
64
|
}
|
|
48
65
|
if (type === "template") {
|
|
49
|
-
|
|
66
|
+
if (aliases.templates) {
|
|
67
|
+
return aliases.templates.replace(/^@\//, "src/");
|
|
68
|
+
}
|
|
69
|
+
// Fallback: derive templates dir from blocks dir
|
|
70
|
+
const blocksDir = aliases.blocks.replace(/^@\//, "src/");
|
|
71
|
+
const parent = path.dirname(blocksDir);
|
|
72
|
+
return path.join(parent, "templates");
|
|
50
73
|
}
|
|
51
74
|
// Components, forms, and other types go to the components directory
|
|
52
75
|
return aliases.components.replace(/^@\//, "src/");
|
|
@@ -167,7 +190,12 @@ function printAddResult(result) {
|
|
|
167
190
|
console.log(chalk.cyan(` pnpm add ${result.npmDeps.join(" ")}`));
|
|
168
191
|
}
|
|
169
192
|
}
|
|
170
|
-
export async function addCommand(componentSpec) {
|
|
193
|
+
export async function addCommand(componentSpec, options) {
|
|
194
|
+
// If --all flag, install everything
|
|
195
|
+
if (options?.all) {
|
|
196
|
+
await installAll();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
171
199
|
// If no component specified, show interactive picker
|
|
172
200
|
if (!componentSpec) {
|
|
173
201
|
await interactiveAdd();
|
|
@@ -211,7 +239,7 @@ function discoverThemes(registryDir) {
|
|
|
211
239
|
*/
|
|
212
240
|
async function changeTheme(rootDir, registryDir) {
|
|
213
241
|
const componentsJson = readComponentsJson(rootDir);
|
|
214
|
-
const currentTheme = componentsJson.theme ?? "
|
|
242
|
+
const currentTheme = componentsJson.theme ?? "inai";
|
|
215
243
|
const themes = discoverThemes(registryDir);
|
|
216
244
|
if (themes.length === 0) {
|
|
217
245
|
console.log(chalk.red("No themes found in registry."));
|
|
@@ -290,6 +318,74 @@ async function changeTheme(rootDir, registryDir) {
|
|
|
290
318
|
console.error(chalk.red(`\nError: ${message}`));
|
|
291
319
|
}
|
|
292
320
|
}
|
|
321
|
+
async function installAll() {
|
|
322
|
+
const rootDir = process.cwd();
|
|
323
|
+
const componentsJson = readComponentsJson(rootDir);
|
|
324
|
+
if (!componentsJson) {
|
|
325
|
+
console.log(chalk.red("No components.json found. Run `inai-ui init` first to initialize your project."));
|
|
326
|
+
process.exit(1);
|
|
327
|
+
}
|
|
328
|
+
const registryDir = resolveRegistryDir(rootDir);
|
|
329
|
+
const registryPath = path.join(registryDir, "registry.json");
|
|
330
|
+
const registry = readRegistryJson(registryPath);
|
|
331
|
+
if (!registry) {
|
|
332
|
+
console.log(chalk.red("Registry not found. Ensure your project is initialized correctly."));
|
|
333
|
+
process.exit(1);
|
|
334
|
+
}
|
|
335
|
+
const allItems = [
|
|
336
|
+
...registry.components,
|
|
337
|
+
...registry.blocks,
|
|
338
|
+
...registry.templates,
|
|
339
|
+
];
|
|
340
|
+
console.log(chalk.bold(`\nInstalling all ${allItems.length} components, blocks, and templates...\n`));
|
|
341
|
+
const installed = componentsJson.installedComponents ?? [];
|
|
342
|
+
const installedNames = new Set(installed.map((c) => c.name));
|
|
343
|
+
const allNpmDeps = new Set();
|
|
344
|
+
let addedCount = 0;
|
|
345
|
+
let updatedCount = 0;
|
|
346
|
+
for (const item of allItems) {
|
|
347
|
+
const isInstalled = installedNames.has(item.name);
|
|
348
|
+
const action = isInstalled ? "Updating" : "Adding";
|
|
349
|
+
const prefix = item.type === "block" ? "block/" : item.type === "template" ? "template/" : "";
|
|
350
|
+
const spinner = ora(`${action} "${prefix}${item.name}"...`).start();
|
|
351
|
+
try {
|
|
352
|
+
const spec = prefix ? `${prefix}${item.name}` : item.name;
|
|
353
|
+
const result = await runAdd(spec, rootDir);
|
|
354
|
+
if (!result.added) {
|
|
355
|
+
spinner.fail(result.message);
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
if (isInstalled) {
|
|
359
|
+
spinner.succeed(`Updated "${prefix}${item.name}"`);
|
|
360
|
+
updatedCount++;
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
spinner.succeed(`Added "${prefix}${item.name}"`);
|
|
364
|
+
addedCount++;
|
|
365
|
+
}
|
|
366
|
+
for (const dep of result.npmDeps) {
|
|
367
|
+
allNpmDeps.add(dep);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
catch (error) {
|
|
371
|
+
spinner.fail(`Failed to process "${prefix}${item.name}"`);
|
|
372
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
373
|
+
console.error(chalk.red(` Error: ${message}`));
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
// Summary
|
|
377
|
+
console.log(chalk.bold("\nSummary:"));
|
|
378
|
+
if (addedCount > 0) {
|
|
379
|
+
console.log(chalk.green(` ${addedCount} component${addedCount > 1 ? "s" : ""} added`));
|
|
380
|
+
}
|
|
381
|
+
if (updatedCount > 0) {
|
|
382
|
+
console.log(chalk.blue(` ${updatedCount} component${updatedCount > 1 ? "s" : ""} updated`));
|
|
383
|
+
}
|
|
384
|
+
if (allNpmDeps.size > 0) {
|
|
385
|
+
console.log(chalk.yellow("\nInstall required npm dependencies:"));
|
|
386
|
+
console.log(chalk.cyan(` pnpm add ${[...allNpmDeps].join(" ")}`));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
293
389
|
async function interactiveAdd() {
|
|
294
390
|
const rootDir = process.cwd();
|
|
295
391
|
const componentsJson = readComponentsJson(rootDir);
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const AVAILABLE_THEMES: readonly ["monday", "linear", "notion", "vercel", "
|
|
1
|
+
declare const AVAILABLE_THEMES: readonly ["inai", "monday", "linear", "notion", "vercel", "anthropic", "shadcn-default", "shadcn-blue", "shadcn-green", "shadcn-orange", "shadcn-red", "shadcn-rose", "shadcn-violet", "shadcn-yellow", "shadcn-amber", "shadcn-lime", "shadcn-emerald", "shadcn-teal", "shadcn-cyan", "shadcn-sky", "shadcn-indigo", "shadcn-purple", "shadcn-fuchsia", "shadcn-pink"];
|
|
2
2
|
type Theme = (typeof AVAILABLE_THEMES)[number];
|
|
3
3
|
declare const FONT_PRESETS: readonly [{
|
|
4
4
|
readonly name: "outfit";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRo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package/dist/commands/init.js
CHANGED
|
@@ -5,11 +5,11 @@ import ora from "ora";
|
|
|
5
5
|
import prompts from "prompts";
|
|
6
6
|
import { cloneRegistry, getCacheDir } from "../utils/registry-resolver.js";
|
|
7
7
|
const AVAILABLE_THEMES = [
|
|
8
|
+
"inai",
|
|
8
9
|
"monday",
|
|
9
10
|
"linear",
|
|
10
11
|
"notion",
|
|
11
12
|
"vercel",
|
|
12
|
-
"inai",
|
|
13
13
|
"anthropic",
|
|
14
14
|
"shadcn-default",
|
|
15
15
|
"shadcn-blue",
|
|
@@ -19,6 +19,16 @@ const AVAILABLE_THEMES = [
|
|
|
19
19
|
"shadcn-rose",
|
|
20
20
|
"shadcn-violet",
|
|
21
21
|
"shadcn-yellow",
|
|
22
|
+
"shadcn-amber",
|
|
23
|
+
"shadcn-lime",
|
|
24
|
+
"shadcn-emerald",
|
|
25
|
+
"shadcn-teal",
|
|
26
|
+
"shadcn-cyan",
|
|
27
|
+
"shadcn-sky",
|
|
28
|
+
"shadcn-indigo",
|
|
29
|
+
"shadcn-purple",
|
|
30
|
+
"shadcn-fuchsia",
|
|
31
|
+
"shadcn-pink",
|
|
22
32
|
];
|
|
23
33
|
const FONT_PRESETS = [
|
|
24
34
|
// Sans-serif — geometric & modern
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/commands/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/commands/theme.ts"],"names":[],"mappings":"AA0CA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMhF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgB3F;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAoDlE;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBnF"}
|
package/dist/commands/theme.js
CHANGED
|
@@ -3,11 +3,11 @@ import path from "node:path";
|
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import ora from "ora";
|
|
5
5
|
const AVAILABLE_THEMES = [
|
|
6
|
+
"inai",
|
|
6
7
|
"monday",
|
|
7
8
|
"linear",
|
|
8
9
|
"notion",
|
|
9
10
|
"vercel",
|
|
10
|
-
"inai",
|
|
11
11
|
"anthropic",
|
|
12
12
|
"shadcn-default",
|
|
13
13
|
"shadcn-blue",
|
|
@@ -17,6 +17,26 @@ const AVAILABLE_THEMES = [
|
|
|
17
17
|
"shadcn-rose",
|
|
18
18
|
"shadcn-violet",
|
|
19
19
|
"shadcn-yellow",
|
|
20
|
+
"shadcn-amber",
|
|
21
|
+
"shadcn-lime",
|
|
22
|
+
"shadcn-emerald",
|
|
23
|
+
"shadcn-teal",
|
|
24
|
+
"shadcn-cyan",
|
|
25
|
+
"shadcn-sky",
|
|
26
|
+
"shadcn-indigo",
|
|
27
|
+
"shadcn-purple",
|
|
28
|
+
"shadcn-fuchsia",
|
|
29
|
+
"shadcn-pink",
|
|
30
|
+
"cyberpunk",
|
|
31
|
+
"aurora",
|
|
32
|
+
"sunset",
|
|
33
|
+
"midnight",
|
|
34
|
+
"acid",
|
|
35
|
+
"sakura",
|
|
36
|
+
"ocean",
|
|
37
|
+
"cosmic",
|
|
38
|
+
"matcha",
|
|
39
|
+
"volcanic",
|
|
20
40
|
];
|
|
21
41
|
export function resolveThemesDir(rootDir) {
|
|
22
42
|
return path.join(rootDir, "packages", "tokens", "src", "themes");
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ const program = new Command();
|
|
|
12
12
|
program
|
|
13
13
|
.name("inai-ui")
|
|
14
14
|
.description("CLI for InAI UI component library")
|
|
15
|
-
.version("0.1.
|
|
15
|
+
.version("0.1.7");
|
|
16
16
|
program
|
|
17
17
|
.command("init [repo-url]")
|
|
18
18
|
.description("Initialize InAI UI in your project. Optionally pass a Git repo URL to fetch components remotely.")
|
|
@@ -20,7 +20,8 @@ program
|
|
|
20
20
|
program
|
|
21
21
|
.command("add [component]")
|
|
22
22
|
.description("Add a component to your project. Without arguments, opens an interactive picker to select multiple components.")
|
|
23
|
-
.
|
|
23
|
+
.option("-a, --all", "Install all available components, blocks, and templates")
|
|
24
|
+
.action((component, options) => addCommand(component, options));
|
|
24
25
|
program
|
|
25
26
|
.command("sync")
|
|
26
27
|
.description("Update the local registry cache from the remote repository")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inai-react-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "CLI for InAI UI component library — install components from a private registry into your React project",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"design-system"
|
|
18
18
|
],
|
|
19
19
|
"license": "MIT",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
},
|
|
20
23
|
"repository": {
|
|
21
24
|
"type": "git",
|
|
22
25
|
"url": "git+https://github.com/InAI-Team/inai-components-react.git",
|
|
@@ -34,7 +37,6 @@
|
|
|
34
37
|
"dependencies": {
|
|
35
38
|
"chalk": "^5.6.2",
|
|
36
39
|
"commander": "^14.0.3",
|
|
37
|
-
"fast-glob": "^3.3.3",
|
|
38
40
|
"ora": "^9.3.0",
|
|
39
41
|
"prompts": "^2.4.2"
|
|
40
42
|
},
|