@nyanxx/sui 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nayan Lonkar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # SUI
package/dist/index.cjs ADDED
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+
26
+ // src/index.ts
27
+ var import_commander = require("commander");
28
+
29
+ // src/add.ts
30
+ var import_fs_extra = __toESM(require("fs-extra"), 1);
31
+ var import_path = __toESM(require("path"), 1);
32
+ var import_chalk = __toESM(require("chalk"), 1);
33
+ var COMPONENTS = {
34
+ lead: `export function Lead({ children }: { children: React.ReactNode }) {
35
+ return <p className="text-xl text-muted-foreground">{children}</p>;
36
+ }`,
37
+ h1: `export function H1({ children }: { children: React.ReactNode }) {
38
+ return <h1 className="text-4xl font-bold">{children}</h1>;
39
+ }`
40
+ };
41
+ async function addComponents(names) {
42
+ const outDir = import_path.default.resolve(process.cwd(), "components/ui");
43
+ await import_fs_extra.default.ensureDir(outDir);
44
+ for (const name of names) {
45
+ if (!COMPONENTS[name]) {
46
+ console.log(import_chalk.default.red(`\u2716 Unknown component: ${name}`));
47
+ continue;
48
+ }
49
+ const filePath = import_path.default.join(outDir, `${name}.tsx`);
50
+ await import_fs_extra.default.writeFile(filePath, COMPONENTS[name]);
51
+ console.log(import_chalk.default.green(`\u2714 Added ${name} \u2192 ${filePath}`));
52
+ }
53
+ }
54
+
55
+ // package.json
56
+ var package_default = {
57
+ name: "@nyanxx/sui",
58
+ version: "0.0.0",
59
+ description: "Add UI components to your project",
60
+ type: "module",
61
+ main: "./dist/index.js",
62
+ module: "./dist/index.mjs",
63
+ types: "./dist/index.d.ts",
64
+ files: [
65
+ "dist"
66
+ ],
67
+ bin: {
68
+ "@nyanxx/sui": "./dist/index.js"
69
+ },
70
+ scripts: {
71
+ build: "tsup src/index.ts --format cjs,esm --dts --clean",
72
+ dev: "tsx src/index.ts",
73
+ test: "vitest run",
74
+ "type-check": "tsc --noEmit",
75
+ prepublishOnly: "npm run build"
76
+ },
77
+ dependencies: {
78
+ chalk: "^5.6.2",
79
+ commander: "^14.0.3",
80
+ "fs-extra": "^11.3.5"
81
+ },
82
+ keywords: [
83
+ "ui-cli",
84
+ "sui"
85
+ ],
86
+ author: "Nayan",
87
+ license: "MIT",
88
+ repository: {
89
+ type: "git",
90
+ url: "git+https://github.com/nyanxx/sui"
91
+ },
92
+ bugs: {
93
+ url: "https://github.com/nyanxx/sui/issues"
94
+ },
95
+ homepage: "https://github.com/nyanxx/sui#readme",
96
+ packageManager: "pnpm@10.33.0",
97
+ devDependencies: {
98
+ "@changesets/cli": "^2.31.0",
99
+ "@types/fs-extra": "^11.0.4",
100
+ "@types/node": "^25.9.1",
101
+ tsup: "^8.5.1",
102
+ tsx: "^4.22.3",
103
+ typescript: "^6.0.3",
104
+ "typescript-eslint": "^8.60.0",
105
+ vitest: "^4.1.7"
106
+ }
107
+ };
108
+
109
+ // src/index.ts
110
+ var program = new import_commander.Command();
111
+ program.name(package_default.name).description(package_default.description).version(package_default.version);
112
+ program.command("add [components...]").description("Add one or more components").action((components) => {
113
+ addComponents(components);
114
+ });
115
+ program.parse();
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { Command } from "commander";
5
+
6
+ // src/add.ts
7
+ import fs from "fs-extra";
8
+ import path from "path";
9
+ import chalk from "chalk";
10
+ var COMPONENTS = {
11
+ lead: `export function Lead({ children }: { children: React.ReactNode }) {
12
+ return <p className="text-xl text-muted-foreground">{children}</p>;
13
+ }`,
14
+ h1: `export function H1({ children }: { children: React.ReactNode }) {
15
+ return <h1 className="text-4xl font-bold">{children}</h1>;
16
+ }`
17
+ };
18
+ async function addComponents(names) {
19
+ const outDir = path.resolve(process.cwd(), "components/ui");
20
+ await fs.ensureDir(outDir);
21
+ for (const name of names) {
22
+ if (!COMPONENTS[name]) {
23
+ console.log(chalk.red(`\u2716 Unknown component: ${name}`));
24
+ continue;
25
+ }
26
+ const filePath = path.join(outDir, `${name}.tsx`);
27
+ await fs.writeFile(filePath, COMPONENTS[name]);
28
+ console.log(chalk.green(`\u2714 Added ${name} \u2192 ${filePath}`));
29
+ }
30
+ }
31
+
32
+ // package.json
33
+ var package_default = {
34
+ name: "@nyanxx/sui",
35
+ version: "0.0.0",
36
+ description: "Add UI components to your project",
37
+ type: "module",
38
+ main: "./dist/index.js",
39
+ module: "./dist/index.mjs",
40
+ types: "./dist/index.d.ts",
41
+ files: [
42
+ "dist"
43
+ ],
44
+ bin: {
45
+ "@nyanxx/sui": "./dist/index.js"
46
+ },
47
+ scripts: {
48
+ build: "tsup src/index.ts --format cjs,esm --dts --clean",
49
+ dev: "tsx src/index.ts",
50
+ test: "vitest run",
51
+ "type-check": "tsc --noEmit",
52
+ prepublishOnly: "npm run build"
53
+ },
54
+ dependencies: {
55
+ chalk: "^5.6.2",
56
+ commander: "^14.0.3",
57
+ "fs-extra": "^11.3.5"
58
+ },
59
+ keywords: [
60
+ "ui-cli",
61
+ "sui"
62
+ ],
63
+ author: "Nayan",
64
+ license: "MIT",
65
+ repository: {
66
+ type: "git",
67
+ url: "git+https://github.com/nyanxx/sui"
68
+ },
69
+ bugs: {
70
+ url: "https://github.com/nyanxx/sui/issues"
71
+ },
72
+ homepage: "https://github.com/nyanxx/sui#readme",
73
+ packageManager: "pnpm@10.33.0",
74
+ devDependencies: {
75
+ "@changesets/cli": "^2.31.0",
76
+ "@types/fs-extra": "^11.0.4",
77
+ "@types/node": "^25.9.1",
78
+ tsup: "^8.5.1",
79
+ tsx: "^4.22.3",
80
+ typescript: "^6.0.3",
81
+ "typescript-eslint": "^8.60.0",
82
+ vitest: "^4.1.7"
83
+ }
84
+ };
85
+
86
+ // src/index.ts
87
+ var program = new Command();
88
+ program.name(package_default.name).description(package_default.description).version(package_default.version);
89
+ program.command("add [components...]").description("Add one or more components").action((components) => {
90
+ addComponents(components);
91
+ });
92
+ program.parse();
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@nyanxx/sui",
3
+ "version": "0.0.0",
4
+ "description": "Add UI components to your project",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "bin": {
13
+ "@nyanxx/sui": "./dist/index.js"
14
+ },
15
+ "dependencies": {
16
+ "chalk": "^5.6.2",
17
+ "commander": "^14.0.3",
18
+ "fs-extra": "^11.3.5"
19
+ },
20
+ "keywords": [
21
+ "ui-cli",
22
+ "sui"
23
+ ],
24
+ "author": "Nayan",
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/nyanxx/sui"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/nyanxx/sui/issues"
32
+ },
33
+ "homepage": "https://github.com/nyanxx/sui#readme",
34
+ "devDependencies": {
35
+ "@changesets/cli": "^2.31.0",
36
+ "@types/fs-extra": "^11.0.4",
37
+ "@types/node": "^25.9.1",
38
+ "tsup": "^8.5.1",
39
+ "tsx": "^4.22.3",
40
+ "typescript": "^6.0.3",
41
+ "typescript-eslint": "^8.60.0",
42
+ "vitest": "^4.1.7"
43
+ },
44
+ "scripts": {
45
+ "build": "tsup src/index.ts --format cjs,esm --dts --clean",
46
+ "dev": "tsx src/index.ts",
47
+ "test": "vitest run",
48
+ "type-check": "tsc --noEmit"
49
+ }
50
+ }