@cyberbloxai/ui-kit 0.3.1 → 0.3.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/README.md CHANGED
@@ -61,6 +61,9 @@ npx @cyberbloxai/ui-kit init
61
61
  npx @cyberbloxai/ui-kit add button
62
62
  npx @cyberbloxai/ui-kit add dialog
63
63
  npx @cyberbloxai/ui-kit add alert-dialog # This will also add 'button' automatically!
64
+
65
+ # 3. Add all components at once
66
+ npx @cyberbloxai/ui-kit add all
64
67
  ```
65
68
 
66
69
  **What happens during `init`?**
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@cyberbloxai/ui-kit",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Production-ready UI component library built on Radix UI + Tailwind CSS. Supports shadcn-style component installation.",
5
- "bin": "./src/cli.js",
5
+ "bin": {
6
+ "ui-kit": "./src/cli.js"
7
+ },
6
8
  "repository": {
7
9
  "type": "git",
8
10
  "url": "git+https://github.com/abhishekjohn1507/uni-kit-forge.git"
package/src/cli.js CHANGED
@@ -301,7 +301,7 @@ async function init() {
301
301
  console.log('npx @cyberbloxai/ui-kit add [component-name]');
302
302
  }
303
303
 
304
- function addComponent(name) {
304
+ function addComponent(name, options = { skipInstall: false }) {
305
305
  if (!name) {
306
306
  console.error('Please specify a component name.');
307
307
  process.exit(1);
@@ -318,8 +318,8 @@ function addComponent(name) {
318
318
  // Recursive add for internal dependencies
319
319
  if (registryItem && registryItem.dependencies) {
320
320
  registryItem.dependencies.forEach(dep => {
321
- if (!dep.startsWith('@')) { // It's an internal component
322
- addComponent(dep);
321
+ if (!dep.startsWith('@') && COMPONENT_REGISTRY[dep]) { // It's an internal component
322
+ addComponent(dep, options);
323
323
  }
324
324
  });
325
325
  }
@@ -350,12 +350,12 @@ function addComponent(name) {
350
350
  const destPath = path.join(targetDir, path.basename(finalSrcPath));
351
351
 
352
352
  if (fs.existsSync(destPath)) {
353
- console.log(` File ${path.basename(finalSrcPath)} already exists. Skipping.`);
353
+ // console.log(` File ${path.basename(finalSrcPath)} already exists. Skipping.`);
354
354
  } else {
355
355
  copyFile(finalSrcPath, destPath);
356
356
 
357
357
  // Install npm dependencies
358
- if (registryItem && registryItem.dependencies) {
358
+ if (!options.skipInstall && registryItem && registryItem.dependencies) {
359
359
  const npmDeps = registryItem.dependencies.filter(d => d.startsWith('@') || !COMPONENT_REGISTRY[d]);
360
360
  const regDeps = registryItem.registryDependencies || [];
361
361
  installDependencies([...new Set([...npmDeps, ...regDeps])]);
@@ -363,6 +363,45 @@ function addComponent(name) {
363
363
  }
364
364
  }
365
365
 
366
+ function addAllComponents() {
367
+ const config = getProjectConfig();
368
+ if (!config) {
369
+ console.error('Project not initialized. Run "npx @cyberbloxai/ui-kit init" first.');
370
+ process.exit(1);
371
+ }
372
+
373
+ const components = Object.keys(COMPONENT_REGISTRY);
374
+ console.log(`Adding all ${components.length} components...`);
375
+
376
+ const allNpmDeps = new Set();
377
+
378
+ components.forEach(name => {
379
+ // Add component without installing deps yet
380
+ addComponent(name, { skipInstall: true });
381
+
382
+ // Collect deps
383
+ const item = COMPONENT_REGISTRY[name];
384
+ if (item && item.dependencies) {
385
+ item.dependencies.forEach(d => {
386
+ if (d.startsWith('@') || !COMPONENT_REGISTRY[d]) {
387
+ allNpmDeps.add(d);
388
+ }
389
+ });
390
+ }
391
+ if (item && item.registryDependencies) {
392
+ item.registryDependencies.forEach(d => allNpmDeps.add(d));
393
+ }
394
+ });
395
+
396
+ // Install all unique dependencies at once
397
+ if (allNpmDeps.size > 0) {
398
+ console.log('\nInstalling all required dependencies...');
399
+ installDependencies([...allNpmDeps]);
400
+ }
401
+
402
+ console.log('\nSuccess! All components have been added.');
403
+ }
404
+
366
405
  function listComponents() {
367
406
  console.log('Available components:');
368
407
  const files = fs.readdirSync(componentsSrc);
@@ -378,7 +417,11 @@ switch (command) {
378
417
  init();
379
418
  break;
380
419
  case 'add':
381
- addComponent(args[1]);
420
+ if (args[1] === 'all') {
421
+ addAllComponents();
422
+ } else {
423
+ addComponent(args[1]);
424
+ }
382
425
  break;
383
426
  case 'list':
384
427
  listComponents();
@@ -391,6 +434,7 @@ switch (command) {
391
434
  console.log('\nUsage:');
392
435
  console.log(' npx @cyberbloxai/ui-kit init - Setup components.json and utils');
393
436
  console.log(' npx @cyberbloxai/ui-kit add [name] - Add a component');
437
+ console.log(' npx @cyberbloxai/ui-kit add all - Add all available components');
394
438
  console.log(' npx @cyberbloxai/ui-kit list - List components');
395
439
  break;
396
440
  }
@@ -23,9 +23,9 @@ export const componentRegistry: ComponentDoc[] = [
23
23
  name: "Button",
24
24
  description: "A versatile button component with multiple variants, sizes, and loading states. Supports rendering as a child element via the asChild prop.",
25
25
  category: "Actions",
26
- variants: ["default", "destructive", "outline", "secondary", "ghost", "link"],
26
+ variants: ["default", "destructive", "outline", "secondary", "ghost", "link", "shiny"],
27
27
  props: [
28
- { name: "variant", type: '"default" | "destructive" | "outline" | "secondary" | "ghost" | "link"', default: '"default"', description: "Visual style variant of the button." },
28
+ { name: "variant", type: '"default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "shiny"', default: '"default"', description: "Visual style variant of the button." },
29
29
  { name: "size", type: '"default" | "sm" | "lg" | "icon"', default: '"default"', description: "Controls the button dimensions." },
30
30
  { name: "asChild", type: "boolean", default: "false", description: "Merges props onto a child element instead of rendering a <button>." },
31
31
  { name: "disabled", type: "boolean", default: "false", description: "Disables the button and reduces opacity." },
@@ -41,6 +41,7 @@ import { Loader2, ArrowRight } from "lucide-react";
41
41
  <Button variant="destructive">Destructive</Button>
42
42
  <Button variant="ghost">Ghost</Button>
43
43
  <Button variant="link">Link</Button>
44
+ <Button variant="shiny">Shiny</Button>
44
45
 
45
46
  // Sizes
46
47
  <Button size="sm">Small</Button>
@@ -90,9 +91,9 @@ import { Label } from "@/components/ui/label";
90
91
  name: "Badge",
91
92
  description: "A small label component for status indicators, tags, and categories. Renders as a styled div with rounded-full corners.",
92
93
  category: "Data Display",
93
- variants: ["default", "secondary", "destructive", "outline"],
94
+ variants: ["default", "secondary", "destructive", "outline", "success", "warning", "info"],
94
95
  props: [
95
- { name: "variant", type: '"default" | "secondary" | "destructive" | "outline"', default: '"default"', description: "Visual style of the badge." },
96
+ { name: "variant", type: '"default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "info"', default: '"default"', description: "Visual style of the badge." },
96
97
  { name: "className", type: "string", description: "Additional CSS classes to merge." },
97
98
  ],
98
99
  codeExample: `import { Badge } from "@/components/ui/badge";
@@ -101,6 +102,9 @@ import { Label } from "@/components/ui/label";
101
102
  <Badge variant="secondary">Beta</Badge>
102
103
  <Badge variant="destructive">Critical</Badge>
103
104
  <Badge variant="outline">Stable</Badge>
105
+ <Badge variant="success">Success</Badge>
106
+ <Badge variant="warning">Warning</Badge>
107
+ <Badge variant="info">Info</Badge>
104
108
 
105
109
  // Custom colored
106
110
  <Badge className="bg-primary/20 text-primary border-0">Custom</Badge>`,
@@ -41,7 +41,7 @@ const ComponentDetail = () => {
41
41
  <div className="flex items-center gap-3">
42
42
  <Link to="/" className="flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors">
43
43
  <Package className="h-5 w-5 text-primary" />
44
- <span className="font-bold text-foreground">UIKit</span>
44
+ <span className="font-bold text-foreground">CyberBlox UI</span>
45
45
  </Link>
46
46
  <span className="text-border">/</span>
47
47
  <Link to="/components" className="text-sm text-muted-foreground hover:text-foreground transition-colors">
@@ -33,7 +33,7 @@ const Index = () => {
33
33
  const [copied, setCopied] = useState(false);
34
34
 
35
35
  const handleCopy = () => {
36
- navigator.clipboard.writeText("npx create-ui-kit@latest");
36
+ navigator.clipboard.writeText("npx @cyberbloxai/ui-kit init");
37
37
  setCopied(true);
38
38
  setTimeout(() => setCopied(false), 2000);
39
39
  };
@@ -61,7 +61,7 @@ const Index = () => {
61
61
  <div className="flex items-center gap-2">
62
62
  <Package className="h-6 w-6 text-primary" />
63
63
  <span className="font-bold text-lg text-foreground">CyberBlox UI</span>
64
- <span className="text-xs font-mono text-primary bg-primary/10 px-2 py-0.5 rounded-full">v0.3.0</span>
64
+ <span className="text-xs font-mono text-primary bg-primary/10 px-2 py-0.5 rounded-full">v0.3.2</span>
65
65
  </div>
66
66
  <div className="flex items-center gap-3">
67
67
  <Link to="/components">
@@ -110,7 +110,7 @@ const Index = () => {
110
110
  onClick={handleCopy}
111
111
  className="flex items-center gap-2 bg-muted/50 border border-border/60 rounded-lg px-4 py-2.5 font-mono text-sm text-muted-foreground hover:border-primary/30 hover:text-foreground transition-all"
112
112
  >
113
- <span>npx create-ui-kit@latest</span>
113
+ <span>npx @cyberbloxai/ui-kit init</span>
114
114
  {copied ? <Check className="h-4 w-4 text-success" /> : <Copy className="h-4 w-4" />}
115
115
  </button>
116
116
  </div>
@@ -170,6 +170,35 @@ const Index = () => {
170
170
  </motion.div>
171
171
  </section>
172
172
 
173
+ {/* CLI Commands */}
174
+ <section className="max-w-6xl mx-auto px-6 pb-24">
175
+ <div className="glass-card p-8 border-primary/20 bg-primary/5">
176
+ <div className="flex flex-col md:flex-row items-center justify-between gap-8">
177
+ <div className="space-y-4 text-center md:text-left">
178
+ <h2 className="text-2xl font-bold text-foreground">Fast Installation</h2>
179
+ <p className="text-muted-foreground max-w-md">
180
+ Copy individual components or add the entire library at once with our CLI.
181
+ All dependencies are handled automatically.
182
+ </p>
183
+ </div>
184
+ <div className="w-full md:w-auto space-y-3">
185
+ <div className="flex items-center justify-between bg-background/80 border border-border/60 rounded-lg px-4 py-3 font-mono text-sm group">
186
+ <span className="text-primary">npx @cyberbloxai/ui-kit init</span>
187
+ <button onClick={() => { navigator.clipboard.writeText("npx @cyberbloxai/ui-kit init"); }} className="opacity-0 group-hover:opacity-100 transition-opacity">
188
+ <Copy className="h-4 w-4 text-muted-foreground hover:text-foreground" />
189
+ </button>
190
+ </div>
191
+ <div className="flex items-center justify-between bg-background/80 border border-border/60 rounded-lg px-4 py-3 font-mono text-sm group">
192
+ <span className="text-primary">npx @cyberbloxai/ui-kit add all</span>
193
+ <button onClick={() => { navigator.clipboard.writeText("npx @cyberbloxai/ui-kit add all"); }} className="opacity-0 group-hover:opacity-100 transition-opacity">
194
+ <Copy className="h-4 w-4 text-muted-foreground hover:text-foreground" />
195
+ </button>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </section>
201
+
173
202
  {/* Features Grid */}
174
203
  <section className="max-w-6xl mx-auto px-6 pb-24">
175
204
  <div className="text-center mb-12">
@@ -206,7 +235,7 @@ const Index = () => {
206
235
  <div className="max-w-6xl mx-auto px-6 flex flex-col sm:flex-row items-center justify-between gap-4">
207
236
  <div className="flex items-center gap-2">
208
237
  <Package className="h-4 w-4 text-primary" />
209
- <span className="text-sm font-medium text-foreground">UIKit</span>
238
+ <span className="text-sm font-medium text-foreground">CyberBlox UI</span>
210
239
  <span className="text-xs text-muted-foreground">© 2026</span>
211
240
  </div>
212
241
  <div className="flex items-center gap-4 text-sm text-muted-foreground">