zerozeeker 2.2.10 → 2.3.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/dist/index.js +63 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,60 +6,79 @@ import { execSync } from "child_process";
|
|
|
6
6
|
import ora from "ora";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
var REGISTRY_URL = "https://www.zerozeeker.com/r";
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
9
|
+
var VERSION = "2.3.1";
|
|
10
|
+
var REGISTRY = [
|
|
11
|
+
// Buttons
|
|
12
|
+
{ name: "rainbow-button", category: "Buttons", desc: "Animated rainbow gradient border" },
|
|
13
|
+
{ name: "shimmer-button", category: "Buttons", desc: "Moving border glow effect" },
|
|
14
|
+
{ name: "magnetic-button", category: "Buttons", desc: "Cursor-following magnetic pull effect" },
|
|
15
|
+
{ name: "expand-button", category: "Buttons", desc: "Expanding pill animation on hover" },
|
|
16
|
+
{ name: "flip-button", category: "Buttons", desc: "3D flip card reveal effect" },
|
|
17
|
+
{ name: "circle-reveal-button", category: "Buttons", desc: "Icon-to-pill circle expansion" },
|
|
18
|
+
// Inputs
|
|
19
|
+
{ name: "glow-input", category: "Inputs", desc: "Animated glow ring on focus" },
|
|
20
|
+
{ name: "typewriter-input", category: "Inputs", desc: "Cycling typewriter placeholder" },
|
|
21
|
+
{ name: "shimmer-input", category: "Inputs", desc: "Shimmer border sweep on focus" },
|
|
22
|
+
{ name: "spotlight-input", category: "Inputs", desc: "Mouse-tracked spotlight effect" },
|
|
23
|
+
{ name: "vortex-input", category: "Inputs", desc: "Swirling vortex border animation" },
|
|
24
|
+
{ name: "prism-input", category: "Inputs", desc: "Prism light refraction border" },
|
|
25
|
+
// Accordions
|
|
26
|
+
{ name: "glow-accordion", category: "Accordions", desc: "Colored left-accent bar and tint on open" },
|
|
27
|
+
{ name: "card-accordion", category: "Accordions", desc: "Card-per-item with shadow lift and +/- swap" },
|
|
28
|
+
{ name: "step-accordion", category: "Accordions", desc: "Numbered step circles flip solid on open" },
|
|
29
|
+
{ name: "line-accordion", category: "Accordions", desc: "Editorial sweep line animates on open, 5 colors" },
|
|
30
|
+
// Alert Dialogs
|
|
31
|
+
{ name: "glow-alert-dialog", category: "Alert Dialogs", desc: "Glowing ring border with centered icon, 5 colors" },
|
|
32
|
+
{ name: "banner-alert-dialog", category: "Alert Dialogs", desc: "Colored header band with icon and title, 5 colors" },
|
|
33
|
+
{ name: "split-alert-dialog", category: "Alert Dialogs", desc: "Two-column colored left panel + white right content" },
|
|
34
|
+
{ name: "slide-alert-dialog", category: "Alert Dialogs", desc: "Bottom-sheet slide-up with full-width confirm button" },
|
|
35
|
+
{ name: "gradient-alert-dialog", category: "Alert Dialogs", desc: "Rich gradient hero section with white action bar below" },
|
|
36
|
+
{ name: "float-alert-dialog", category: "Alert Dialogs", desc: "Icon badge floats above the dialog card overlapping its top edge" }
|
|
17
37
|
];
|
|
38
|
+
var COMPONENT_NAMES = REGISTRY.map((c) => c.name);
|
|
39
|
+
function printHeader() {
|
|
40
|
+
console.log("");
|
|
41
|
+
console.log(chalk.bold.white(" ZeroZeeker") + chalk.dim(" \xB7 UI Component Library"));
|
|
42
|
+
console.log(chalk.dim(" https://www.zerozeeker.com"));
|
|
43
|
+
console.log("");
|
|
44
|
+
}
|
|
18
45
|
var program = new Command();
|
|
19
|
-
program.name("zerozeeker").description("CLI for installing ZeroZeeker UI components
|
|
20
|
-
program.command("add <component>").description("Add a component
|
|
21
|
-
if (!
|
|
22
|
-
console.error(chalk.red(`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
console.log(chalk.dim("\n[*] Pro tip: Copy-paste is your friend."));
|
|
46
|
+
program.name("zerozeeker").description("CLI for installing ZeroZeeker UI components").version(VERSION, "-v, --version", "Output the current version");
|
|
47
|
+
program.command("add <component>").description("Add a ZeroZeeker component to your project").action((component) => {
|
|
48
|
+
if (!COMPONENT_NAMES.includes(component)) {
|
|
49
|
+
console.error(chalk.red(` \u2716 Unknown component: "${component}"
|
|
50
|
+
`));
|
|
51
|
+
console.log(chalk.dim(" Available components:"));
|
|
52
|
+
COMPONENT_NAMES.forEach((c) => console.log(chalk.cyan(` ${c}`)));
|
|
53
|
+
console.log(chalk.dim("\n Run " + chalk.white("npx zerozeeker list") + " for full details.\n"));
|
|
28
54
|
process.exit(1);
|
|
29
55
|
}
|
|
30
56
|
const url = `${REGISTRY_URL}/${component}.json`;
|
|
31
|
-
const spinner = ora(`
|
|
57
|
+
const spinner = ora({ text: `Installing ${chalk.cyan(component)}`, color: "cyan" }).start();
|
|
58
|
+
spinner.stop();
|
|
59
|
+
console.log(chalk.dim(` \u2192 ${url}
|
|
60
|
+
`));
|
|
32
61
|
try {
|
|
33
|
-
execSync(`npx shadcn@latest add ${url}`, {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
spinner.stop();
|
|
38
|
-
console.log(chalk.green(`[+] Successfully installed ${component}. Now go make something beautiful.`));
|
|
62
|
+
execSync(`npx shadcn@latest add "${url}"`, { stdio: "inherit" });
|
|
63
|
+
console.log("");
|
|
64
|
+
console.log(chalk.green(` \u2714 ${component} installed successfully.`));
|
|
65
|
+
console.log(chalk.dim(" Import it from your components/ui directory and go build something great.\n"));
|
|
39
66
|
} catch {
|
|
40
|
-
|
|
41
|
-
console.
|
|
42
|
-
console.log(chalk.dim("[*] Try again, or check your network connection."));
|
|
67
|
+
console.error(chalk.red(` \u2716 Installation failed.`));
|
|
68
|
+
console.log(chalk.dim(" Check your network connection and try again.\n"));
|
|
43
69
|
process.exit(1);
|
|
44
70
|
}
|
|
45
71
|
});
|
|
46
72
|
program.command("list").description("List all available components").action(() => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
COMPONENTS.filter((c) => c !== "index").forEach((component) => {
|
|
58
|
-
console.log(chalk.cyan(` [>] ${component}`));
|
|
59
|
-
console.log(chalk.dim(` ${descriptions[component]}
|
|
60
|
-
`));
|
|
61
|
-
});
|
|
62
|
-
console.log(chalk.dim(">>> Install any component with: ") + chalk.white("npx zerozeeker add <component>"));
|
|
63
|
-
console.log(chalk.dim(">>> More components coming soon. Ship fast. Look good doing it.\n"));
|
|
73
|
+
printHeader();
|
|
74
|
+
const categories = [...new Set(REGISTRY.map((c) => c.category))];
|
|
75
|
+
for (const cat of categories) {
|
|
76
|
+
console.log(chalk.bold.white(` ${cat}`));
|
|
77
|
+
REGISTRY.filter((c) => c.category === cat).forEach(({ name, desc }) => {
|
|
78
|
+
console.log(` ${chalk.cyan(name.padEnd(26))} ${chalk.dim(desc)}`);
|
|
79
|
+
});
|
|
80
|
+
console.log("");
|
|
81
|
+
}
|
|
82
|
+
console.log(chalk.dim(` Install with: `) + chalk.white("npx zerozeeker add <component>") + chalk.dim("\n"));
|
|
64
83
|
});
|
|
65
84
|
program.parse();
|