zerozeeker 2.2.10 → 2.3.0
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 +51 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,60 +6,67 @@ 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.0";
|
|
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" }
|
|
17
25
|
];
|
|
26
|
+
var COMPONENT_NAMES = REGISTRY.map((c) => c.name);
|
|
27
|
+
function printHeader() {
|
|
28
|
+
console.log("");
|
|
29
|
+
console.log(chalk.bold.white(" ZeroZeeker") + chalk.dim(" \xB7 UI Component Library"));
|
|
30
|
+
console.log(chalk.dim(" https://www.zerozeeker.com"));
|
|
31
|
+
console.log("");
|
|
32
|
+
}
|
|
18
33
|
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."));
|
|
34
|
+
program.name("zerozeeker").description("CLI for installing ZeroZeeker UI components").version(VERSION, "-v, --version", "Output the current version");
|
|
35
|
+
program.command("add <component>").description("Add a ZeroZeeker component to your project").action((component) => {
|
|
36
|
+
if (!COMPONENT_NAMES.includes(component)) {
|
|
37
|
+
console.error(chalk.red(` \u2716 Unknown component: "${component}"
|
|
38
|
+
`));
|
|
39
|
+
console.log(chalk.dim(" Available components:"));
|
|
40
|
+
COMPONENT_NAMES.forEach((c) => console.log(chalk.cyan(` ${c}`)));
|
|
41
|
+
console.log(chalk.dim("\n Run " + chalk.white("npx zerozeeker list") + " for full details.\n"));
|
|
28
42
|
process.exit(1);
|
|
29
43
|
}
|
|
30
44
|
const url = `${REGISTRY_URL}/${component}.json`;
|
|
31
|
-
const spinner = ora(`
|
|
45
|
+
const spinner = ora({ text: `Installing ${chalk.cyan(component)}`, color: "cyan" }).start();
|
|
46
|
+
spinner.stop();
|
|
47
|
+
console.log(chalk.dim(` \u2192 ${url}
|
|
48
|
+
`));
|
|
32
49
|
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.`));
|
|
50
|
+
execSync(`npx shadcn@latest add "${url}"`, { stdio: "inherit" });
|
|
51
|
+
console.log("");
|
|
52
|
+
console.log(chalk.green(` \u2714 ${component} installed successfully.`));
|
|
53
|
+
console.log(chalk.dim(" Import it from your components/ui directory and go build something great.\n"));
|
|
39
54
|
} catch {
|
|
40
|
-
|
|
41
|
-
console.
|
|
42
|
-
console.log(chalk.dim("[*] Try again, or check your network connection."));
|
|
55
|
+
console.error(chalk.red(` \u2716 Installation failed.`));
|
|
56
|
+
console.log(chalk.dim(" Check your network connection and try again.\n"));
|
|
43
57
|
process.exit(1);
|
|
44
58
|
}
|
|
45
59
|
});
|
|
46
60
|
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"));
|
|
61
|
+
printHeader();
|
|
62
|
+
const categories = [...new Set(REGISTRY.map((c) => c.category))];
|
|
63
|
+
for (const cat of categories) {
|
|
64
|
+
console.log(chalk.bold.white(` ${cat}`));
|
|
65
|
+
REGISTRY.filter((c) => c.category === cat).forEach(({ name, desc }) => {
|
|
66
|
+
console.log(` ${chalk.cyan(name.padEnd(26))} ${chalk.dim(desc)}`);
|
|
67
|
+
});
|
|
68
|
+
console.log("");
|
|
69
|
+
}
|
|
70
|
+
console.log(chalk.dim(` Install with: `) + chalk.white("npx zerozeeker add <component>") + chalk.dim("\n"));
|
|
64
71
|
});
|
|
65
72
|
program.parse();
|