untitledui 0.1.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/commands/add.js +339 -0
- package/dist/commands/init.js +436 -0
- package/dist/helper/download-tar-api.js +129 -0
- package/dist/helper/download-tar.js +81 -0
- package/dist/helper/find-css-file.js +19 -0
- package/dist/helper/formatText.js +37 -0
- package/dist/helper/get-components-api.js +47 -0
- package/dist/helper/get-components-list.js +62 -0
- package/dist/helper/get-components.js +19 -0
- package/dist/helper/get-config.js +163 -0
- package/dist/helper/get-package-info.js +99 -0
- package/dist/helper/get-pkg-manager.js +16 -0
- package/dist/helper/get-project.js +176 -0
- package/dist/helper/install-template.js +29 -0
- package/dist/helper/match-color-css.js +82 -0
- package/dist/helper/update-color-css.js +134 -0
- package/dist/index.js +25 -0
- package/dist/package.json +50 -0
- package/dist/res/components.json +520 -0
- package/dist/res/config.json +3 -0
- package/package.json +61 -0
- package/templates/default/.prettierrc +10 -0
- package/templates/default/README.md +36 -0
- package/templates/default/eslint.config.mjs +58 -0
- package/templates/default/next.config.ts +6 -0
- package/templates/default/package.json +57 -0
- package/templates/default/postcss.config.js +5 -0
- package/templates/default/public/favicon.ico +0 -0
- package/templates/default/public/marketing/smiling-girl.png +0 -0
- package/templates/default/public/marketing/spirals.webp +0 -0
- package/templates/default/src/app/home-screen.tsx +109 -0
- package/templates/default/src/app/layout.tsx +42 -0
- package/templates/default/src/app/not-found.tsx +40 -0
- package/templates/default/src/app/page.tsx +3 -0
- package/templates/default/src/components/foundations/dot-icon.tsx +27 -0
- package/templates/default/src/components/foundations/featured-icon/featured-icons.tsx +153 -0
- package/templates/default/src/components/foundations/logo/UntitledLogo.tsx +63 -0
- package/templates/default/src/components/foundations/logo/UntitledLogoMinimal.tsx +164 -0
- package/templates/default/src/components/foundations/payment-icons/amex-icon.tsx +19 -0
- package/templates/default/src/components/foundations/payment-icons/apple-pay-icon.tsx +27 -0
- package/templates/default/src/components/foundations/payment-icons/discover-icon.tsx +34 -0
- package/templates/default/src/components/foundations/payment-icons/index.tsx +10 -0
- package/templates/default/src/components/foundations/payment-icons/mastercard-icon.tsx +39 -0
- package/templates/default/src/components/foundations/payment-icons/paypal-icon.tsx +45 -0
- package/templates/default/src/components/foundations/payment-icons/stripe-icon.tsx +27 -0
- package/templates/default/src/components/foundations/payment-icons/union-pay-icon.tsx +37 -0
- package/templates/default/src/components/foundations/payment-icons/visa-icon.tsx +27 -0
- package/templates/default/src/components/marketing/header-navigation/base-components/nav-menu-item.tsx +41 -0
- package/templates/default/src/components/marketing/header-navigation/components/header.tsx +245 -0
- package/templates/default/src/components/marketing/header-navigation/dropdown-header-navigation.tsx +53 -0
- package/templates/default/src/components/shared/avatar/avatar-label-group.tsx +32 -0
- package/templates/default/src/components/shared/avatar/avatar-profile-photo.tsx +84 -0
- package/templates/default/src/components/shared/avatar/avatar.tsx +131 -0
- package/templates/default/src/components/shared/avatar/base-components/avatar-add-button.tsx +33 -0
- package/templates/default/src/components/shared/avatar/base-components/avatar-company-icon.tsx +26 -0
- package/templates/default/src/components/shared/avatar/base-components/avatar-online-indicator.tsx +31 -0
- package/templates/default/src/components/shared/avatar/base-components/index.ts +4 -0
- package/templates/default/src/components/shared/avatar/base-components/verified-tick.tsx +34 -0
- package/templates/default/src/components/shared/avatar/utils.ts +12 -0
- package/templates/default/src/components/shared/badges/badge-groups.tsx +176 -0
- package/templates/default/src/components/shared/badges/badge-types.ts +264 -0
- package/templates/default/src/components/shared/badges/badges.tsx +479 -0
- package/templates/default/src/components/shared/button-group/button-group.tsx +97 -0
- package/templates/default/src/components/shared/buttons/app-store-buttons-outline.tsx +454 -0
- package/templates/default/src/components/shared/buttons/app-store-buttons.tsx +806 -0
- package/templates/default/src/components/shared/buttons/button-utility.tsx +87 -0
- package/templates/default/src/components/shared/buttons/button.tsx +284 -0
- package/templates/default/src/components/shared/buttons/close-button.tsx +39 -0
- package/templates/default/src/components/shared/buttons/social-button.tsx +135 -0
- package/templates/default/src/components/shared/buttons/social-logos.tsx +115 -0
- package/templates/default/src/components/shared/checkbox/checkbox.tsx +120 -0
- package/templates/default/src/components/shared/dropdown/dropdown.tsx +138 -0
- package/templates/default/src/components/shared/input-dropdown/combobox.tsx +161 -0
- package/templates/default/src/components/shared/input-dropdown/dropdown-item.tsx +98 -0
- package/templates/default/src/components/shared/input-dropdown/input-dropdown.tsx +172 -0
- package/templates/default/src/components/shared/input-dropdown/multi-select.tsx +373 -0
- package/templates/default/src/components/shared/input-dropdown/popover.tsx +36 -0
- package/templates/default/src/components/shared/input-dropdown/select.tsx +63 -0
- package/templates/default/src/components/shared/inputs/file-upload-trigger.tsx +74 -0
- package/templates/default/src/components/shared/inputs/form/form.tsx +10 -0
- package/templates/default/src/components/shared/inputs/hint-text.tsx +34 -0
- package/templates/default/src/components/shared/inputs/input/index.tsx +189 -0
- package/templates/default/src/components/shared/inputs/input/input-payment.tsx +134 -0
- package/templates/default/src/components/shared/inputs/input/input-with-button.tsx +69 -0
- package/templates/default/src/components/shared/inputs/input/input-with-dropdown.tsx +178 -0
- package/templates/default/src/components/shared/inputs/input/input-with-prefix.tsx +74 -0
- package/templates/default/src/components/shared/inputs/label.tsx +46 -0
- package/templates/default/src/components/shared/inputs/textarea/textarea.tsx +82 -0
- package/templates/default/src/components/shared/progress-indicators/progress-circles.tsx +176 -0
- package/templates/default/src/components/shared/progress-indicators/progress-indicators.tsx +86 -0
- package/templates/default/src/components/shared/progress-indicators/simple-circle.tsx +29 -0
- package/templates/default/src/components/shared/radio-buttons/radio-buttons.tsx +125 -0
- package/templates/default/src/components/shared/radio-groups/radio-group-avatar.tsx +62 -0
- package/templates/default/src/components/shared/radio-groups/radio-group-checkbox.tsx +72 -0
- package/templates/default/src/components/shared/radio-groups/radio-group-icon-card.tsx +95 -0
- package/templates/default/src/components/shared/radio-groups/radio-group-icon-simple.tsx +70 -0
- package/templates/default/src/components/shared/radio-groups/radio-group-payment-icon.tsx +71 -0
- package/templates/default/src/components/shared/radio-groups/radio-group-radio-button.tsx +76 -0
- package/templates/default/src/components/shared/radio-groups/radio-groups.tsx +8 -0
- package/templates/default/src/components/shared/slider/slider.tsx +76 -0
- package/templates/default/src/components/shared/tags/base-components/tag-checkbox.tsx +47 -0
- package/templates/default/src/components/shared/tags/base-components/tag-close-x.tsx +34 -0
- package/templates/default/src/components/shared/tags/tags.tsx +162 -0
- package/templates/default/src/components/shared/toggle/toggle.tsx +140 -0
- package/templates/default/src/components/shared/tooltips/tooltips.tsx +140 -0
- package/templates/default/src/components/utils/index.ts +48 -0
- package/templates/default/src/components/utils/isDeepEqual.ts +31 -0
- package/templates/default/src/components/utils/isReactComponent.ts +22 -0
- package/templates/default/src/components/utils/mergeRefs.ts +19 -0
- package/templates/default/src/components/utils/useBreakpoint.ts +36 -0
- package/templates/default/src/components/utils/uuid.ts +9 -0
- package/templates/default/src/fonts/GeistMonoVF.woff +0 -0
- package/templates/default/src/fonts/GeistVF.woff +0 -0
- package/templates/default/src/hooks/use-resize-observer.tsx +55 -0
- package/templates/default/src/providers/theme.tsx +11 -0
- package/templates/default/src/styles/colors.css +805 -0
- package/templates/default/src/styles/globals.css +86 -0
- package/templates/default/src/styles/text-styles.css +177 -0
- package/templates/default/src/styles/theme.css +1310 -0
- package/templates/default/src/styles/typography.css +428 -0
- package/templates/default/tsconfig.json +27 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.extractColorVariables = extractColorVariables;
|
|
40
|
+
exports.updateCssFile = updateCssFile;
|
|
41
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
function extractColorVariables(cssFilePath) {
|
|
45
|
+
if (!fs.existsSync(path.resolve(process.cwd(), cssFilePath))) {
|
|
46
|
+
console.log(chalk_1.default.red(`Error: CSS file not found at ${cssFilePath}`));
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
const cssContent = fs.readFileSync(path.resolve(process.cwd(), cssFilePath), "utf-8");
|
|
50
|
+
const variableRegex = /(--color-[a-zA-Z-]+-\d{1,3}):\s*(rgb\([^)]+\))/g;
|
|
51
|
+
const variables = {};
|
|
52
|
+
let match;
|
|
53
|
+
while ((match = variableRegex.exec(cssContent)) !== null) {
|
|
54
|
+
variables[match[1]] = match[2]; // match[1] = variable name, match[2] = value
|
|
55
|
+
}
|
|
56
|
+
return variables;
|
|
57
|
+
}
|
|
58
|
+
function updateCssFile(sourcePrefix, targetPrefix, cssFilePath) {
|
|
59
|
+
const filePath = path.resolve(process.cwd(), cssFilePath);
|
|
60
|
+
let cssContent = fs.readFileSync(filePath, "utf-8");
|
|
61
|
+
const colorVars = extractColorVariables(cssFilePath);
|
|
62
|
+
const brandColors = {};
|
|
63
|
+
const targetColors = {};
|
|
64
|
+
for (const [variable, value] of Object.entries(colorVars)) {
|
|
65
|
+
if (variable.startsWith(`--color-${sourcePrefix}-`)) {
|
|
66
|
+
const suffix = variable.replace(`--color-${sourcePrefix}-`, "");
|
|
67
|
+
brandColors[suffix] = variable;
|
|
68
|
+
}
|
|
69
|
+
else if (variable.startsWith(`--color-${targetPrefix}-`)) {
|
|
70
|
+
const suffix = variable.replace(`--color-${targetPrefix}-`, "");
|
|
71
|
+
targetColors[suffix] = value;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (const [suffix, brandVariable] of Object.entries(brandColors)) {
|
|
75
|
+
if (targetColors[suffix]) {
|
|
76
|
+
const newValue = targetColors[suffix];
|
|
77
|
+
const regex = new RegExp(`${brandVariable}:\\s*rgb\\([^)]*\\);`, "g");
|
|
78
|
+
cssContent = cssContent.replace(regex, `${brandVariable}: ${newValue};`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
fs.writeFileSync(filePath, cssContent, "utf-8");
|
|
82
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.extractColorVariables = extractColorVariables;
|
|
40
|
+
exports.updateCssFile = updateCssFile;
|
|
41
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
/**
|
|
45
|
+
* Extracts CSS color variables from a given CSS file.
|
|
46
|
+
*
|
|
47
|
+
* @param cssFilePath - The path to the CSS file.
|
|
48
|
+
* @returns A record of color variable names and their corresponding values.
|
|
49
|
+
* @throws Exits the process if the CSS file does not exist.
|
|
50
|
+
*/
|
|
51
|
+
function extractColorVariables(cssFilePath) {
|
|
52
|
+
// Ensure the CSS file exists before proceeding
|
|
53
|
+
if (!fs.existsSync(path.resolve(cssFilePath))) {
|
|
54
|
+
console.log(chalk_1.default.red(`Error: CSS file not found at ${cssFilePath}`));
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
// Read the contents of the CSS file
|
|
58
|
+
const cssContent = fs.readFileSync(path.resolve(cssFilePath), "utf-8");
|
|
59
|
+
// Regular expression to match CSS color variables
|
|
60
|
+
const variableRegex = /(--color-[a-zA-Z-]+-\d{1,3}):\s*(rgb\([^)]+\))/g;
|
|
61
|
+
// Object to store color variables and their values
|
|
62
|
+
// e.g., { "--color-primary-100": "rgb(255, 255, 255)", ... }
|
|
63
|
+
const variables = {};
|
|
64
|
+
let match;
|
|
65
|
+
// Loop through all matches of the regex pattern in the CSS file
|
|
66
|
+
// and store the variable name and value in the variables object
|
|
67
|
+
while ((match = variableRegex.exec(cssContent)) !== null) {
|
|
68
|
+
// match[1] = variable name, match[2] = value
|
|
69
|
+
variables[match[1]] = match[2];
|
|
70
|
+
}
|
|
71
|
+
return variables;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Updates a CSS file by replacing color variables based on a source and target prefix.
|
|
75
|
+
*
|
|
76
|
+
* @param sourcePrefix - The prefix of the color variables to be replaced.
|
|
77
|
+
* @param targetPrefix - The prefix of the color variables that provide new values.
|
|
78
|
+
* @param cssFilePath - The path to the CSS file to be modified.
|
|
79
|
+
*/
|
|
80
|
+
function updateCssFile(sourcePrefix, targetPrefix, cssFilePath) {
|
|
81
|
+
const filePath = path.resolve(cssFilePath);
|
|
82
|
+
// Check if the CSS file exists
|
|
83
|
+
if (!fs.existsSync(filePath)) {
|
|
84
|
+
console.log(chalk_1.default.red(`Error: CSS file not found at ${filePath}`));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
// Read the contents of the CSS file
|
|
88
|
+
let cssContent = fs.readFileSync(filePath, "utf-8");
|
|
89
|
+
// Extract color variables from the CSS file
|
|
90
|
+
const colorVars = extractColorVariables(cssFilePath);
|
|
91
|
+
// Objects to store mapped brand colors and target colors
|
|
92
|
+
// brandColors - color variables with the source prefix which
|
|
93
|
+
// needs to be updated
|
|
94
|
+
const brandColors = {};
|
|
95
|
+
// targetColors - color variables with the target prefix which
|
|
96
|
+
// provide the new values
|
|
97
|
+
const targetColors = {};
|
|
98
|
+
// Iterate over all extracted color variables
|
|
99
|
+
for (const [variable, value] of Object.entries(colorVars)) {
|
|
100
|
+
if (variable.startsWith(`--color-${sourcePrefix}-`)) {
|
|
101
|
+
// Extract the suffix (e.g., "primary-100") from the source prefix
|
|
102
|
+
const suffix = variable.replace(`--color-${sourcePrefix}-`, "");
|
|
103
|
+
brandColors[suffix] = variable;
|
|
104
|
+
}
|
|
105
|
+
else if (variable.startsWith(`--color-${targetPrefix}-`)) {
|
|
106
|
+
// Extract the suffix and map the target colors
|
|
107
|
+
const suffix = variable.replace(`--color-${targetPrefix}-`, "");
|
|
108
|
+
targetColors[suffix] = value;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
let updated = false; // Track if any changes were made
|
|
112
|
+
// Iterate through all brand colors and update with target color values if available
|
|
113
|
+
for (const [suffix, brandVariable] of Object.entries(brandColors)) {
|
|
114
|
+
if (targetColors[suffix]) {
|
|
115
|
+
const newValue = targetColors[suffix];
|
|
116
|
+
// Create a regex pattern to match and replace the variable value in CSS content
|
|
117
|
+
const regex = new RegExp(`(${brandVariable}):\\s*rgb\\([^)]*\\);?`, "g");
|
|
118
|
+
if (regex.test(cssContent)) {
|
|
119
|
+
cssContent = cssContent.replace(regex, `$1: ${newValue};`);
|
|
120
|
+
updated = true;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
console.log(chalk_1.default.yellow(`No match found for ${brandVariable}`));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (updated) {
|
|
128
|
+
// Write the updated CSS content back to the file
|
|
129
|
+
fs.writeFileSync(filePath, cssContent, "utf-8");
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
console.log(chalk_1.default.blue("No changes were made."));
|
|
133
|
+
}
|
|
134
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{Command as X3}from"commander";import E from"chalk";import{Command as f0}from"commander";import{execa as l0}from"execa";import*as _ from"fs";import Y0 from"ora";import c0 from"os";import*as v from"path";import O from"prompts";import{Project as r0}from"ts-morph";import{posix as D0,sep as x0}from"node:path";import{Readable as y0}from"node:stream";import{pipeline as S0}from"node:stream/promises";import{x as T0}from"tar";var x={api_url:"http://localhost:3000/api"};async function b0(W,Q){try{let X=await w0(Q);await S0(X,T0({cwd:W,strip:2,filter:(Z)=>{return Z.split(x0).join(D0.sep).includes(Q.template||"basic-form")}}))}catch(X){if(X instanceof Error)throw new Error(`Failed to download or extract repository from API: ${X.message}`);throw X}}async function w0(W){let Q=`${x.api_url}/download-repo`;try{let X={...W},Z=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"},body:JSON.stringify(X)});if(Z.status===403||Z.status===404)throw new Error(W.key?"License key is invalid or expired":"Repository not found");if(!Z.ok)throw new Error(`Failed to download from API. Status: ${Z.status} ${Z.statusText}`);if(!Z.body)throw new Error("Response body is empty");let Y=Z.headers.get("content-type");if(Y&&!Y.includes("application/x-gzip")&&!Y.includes("application/octet-stream")&&!Y.includes("application/tar+gzip"))console.warn(`Warning: Unexpected content type: ${Y}. Expected tar/gzip related content.`);return y0.fromWeb(Z.body)}catch(X){if(X instanceof Error)throw X;throw new Error("Unknown error occurred while downloading the tarball")}}async function F(W){let Q=`${x.api_url}/validate-key?key=${W}`;try{if((await fetch(Q)).status!==200)return!1;return!0}catch(X){return!1}}async function U0(W,Q,X){let Z=`${x.api_url}/components`;try{let U=await(await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({type:W,components:Q,key:X})})).json();if(!U?.components?.length)return null;return U}catch(Y){return console.error(Y),null}}async function V0(W,Q=""){let X=`${x.api_url}/components/list?key=${Q}&type=${W}`;try{let Y=await(await fetch(X)).json();if(!Y?.components?.length)return null;return Y}catch(Z){return console.error(Z),null}}async function M0(W=""){let Q=`${x.api_url}/components/list?key=${W}`;try{let Z=await(await fetch(Q)).json();if(!Z?.types?.length)return null;return Z}catch(X){return console.error(X),null}}import g0 from"fast-glob";import*as J0 from"fs";import*as X0 from"path";import{Project as m0}from"ts-morph";import{loadConfig as G0}from"tsconfig-paths";import k0 from"prettier";async function L0(W,Q="typescript"){try{return await k0.format(W,{parser:Q})}catch(X){return console.error("Error formatting with Prettier:",X),W}}import f from"fast-glob";import*as h from"fs";import*as d from"path";import{loadConfig as C0}from"tsconfig-paths";var N=["**/node_modules/**",".next","public","dist","build"];async function l(W){let Q=h.existsSync(d.resolve(W,"src")),X=h.existsSync(d.resolve(W,`${Q?"src/":""}app`)),[Z,Y,U,V]=await Promise.all([f.glob("**/{next,vite,astro}.config.*|gatsby-config.*",{cwd:W,deep:2,ignore:N}),F0(W),O0(W),P0(W)]),q={framework:"other",isTsx:Y,tailwindFile:U||null,aliasPrefix:V,isSrcDir:Q,isUsingAppDir:X};if(Z.find((R)=>R.startsWith("next.config."))?.length)return q.framework=X?"next-app":"next-pages",q;else if(Z?.length||h.existsSync(d.resolve(W,"package.json")))return q.framework="other",q;return null}async function F0(W){return(await f.glob("tsconfig.*",{cwd:W,deep:2,ignore:N})).length>0}async function O0(W){let Q=await f.glob("tailwind.config.*",{cwd:W,deep:2,ignore:N});if(!Q.length)return null;return Q[0]}async function P0(W){let Q=await C0(W);if(Q?.resultType==="failed"||!Object.keys(Q.paths).length)return null;let X={};for(let[Z,Y]of Object.entries(Q.paths)){let U=Z.replace(/\/\*$/,"/");if(Y.some((V)=>V.includes("/app/*")))X.appPrefix=U;else if(Y.some((V)=>V.includes("/components/*")))X.componentsPrefix=U;else if(Y.some((V)=>V.includes("/utils/*")))X.utilsPrefix=U;else if(Y.some((V)=>V.includes("/styles/*")))X.stylesPrefix=U;else if(Y.some((V)=>V.includes("./*")||V.includes("/src/*")))X.srcPrefix=U}return X||null}function c(W){let Q=G0(W),X=g0.sync(["tailwind.config.*","**/globals.css","**/{layout,_app}.tsx","package.json"],{cwd:W,deep:4,absolute:!0,onlyFiles:!0,ignore:N}),Z={tailwindFile:X.find((Y)=>Y.includes("tailwind.config.")),cssFile:X.find((Y)=>Y.includes("globals.css")),layoutFile:X.find((Y)=>Y.includes("layout")),appFile:X.find((Y)=>Y.includes("_app")),packageJson:X.find((Y)=>Y.includes("package.json")),tsConfig:Q?.resultType==="success"?Q?.configFileAbsolutePath:void 0};if(Q.resultType==="failed")throw new Error(`Failed to load tsconfig.json. ${Q.message??""}`.trim());return Z}function H0(W,Q,X){if(W.includes("components")){if(Q?.componentsPrefix)return W.replace(/@\/components\//,X0.join(Q?.componentsPrefix,X?X.replace(/components\//,""):"","/"));if(X)return W.replace(/@\/components\//,X0.join(Q?.srcPrefix||"@/",X,"/"))}if(W.includes("app")&&Q?.appPrefix)return W.replace(/^@\/app\//,Q?.appPrefix);if(W.includes("utils")&&Q?.utilsPrefix)return W.replace(/^@\/utils\//,Q?.utilsPrefix);if(W.includes("styles")&&Q?.stylesPrefix)return W.replace(/^@\/styles\//,Q?.stylesPrefix);if(Q?.srcPrefix)return W.replace(/^@\//,Q?.srcPrefix);return W}async function I0(W,Q,X="@/*"){let Z=await G0(W);if(Z?.resultType==="failed")return null;let Y={};if(!Object.keys(Z.paths).length){Z.paths={[X]:[`./${Q?"src/":""}*`]},Y.srcPrefix=X.replace(/\/\*$/,"");let U=await J0.promises.readFile(Z.configFileAbsolutePath,"utf-8"),V;if(!U.includes('"paths":'))V=U.replace(/"compilerOptions":\s*{/,`"compilerOptions": {
|
|
3
|
+
"paths": ${JSON.stringify(Z.paths)},`);else V=U.replace(/"paths":\s*{[^}]*}/,`"paths": ${JSON.stringify(Z.paths)}`);let q=new m0,R=await L0(V,"json");return q.createSourceFile(Z.configFileAbsolutePath,R,{overwrite:!0}),await q.save(),Y}return Y||null}import*as r from"fs";import h0 from"path";function d0(W="",Q=!0){let X=h0.join(W,"package.json");if(!r.existsSync(X)){if(Q)throw new Error("package.json not found");return null}let Z=r.readFileSync(X,"utf8");return JSON.parse(Z)}function a({cwd:W="",dependencies:Q,devDependencies:X,shouldThrow:Z=!0}){let Y=d0(W,Z);if(!Y)if(Z)throw new Error("package.json not found");else return null;let U=[],V=[];if(Q)Q.forEach((q)=>{if(Y.dependencies?.[q])U.push(`${q}@${Y.dependencies[q]}`)});if(X)X.forEach((q)=>{if(Y.devDependencies?.[q])V.push(`${q}@${Y.devDependencies[q]}`)});return{dependencies:U,devDependencies:V}}function j(){let W=process.env.npm_config_user_agent||"";if(W.startsWith("yarn"))return"yarn";if(W.startsWith("pnpm"))return"pnpm";if(W.startsWith("bun"))return"bun";return"npm"}var __dirname="/Users/deebov/Developer/untitledui/react/packages/cli/commands",a0=v.join(c0.homedir(),".untitledui"),S=v.join(a0,"config.json"),z={components:[],path:"",type:void 0,license:""};if(_.existsSync(S)){let W=JSON.parse(_.readFileSync(S,"utf-8"));z.license=W.license}var n=(W)=>{if(W.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
|
|
4
|
+
`),process.exit(1)},R0=new f0().name("add").description("add a component to your project").argument("[components...]","the components to add").option("-o, --overwrite","overwrite existing files.",!1).option("-a, --all","add all available components",!1).option("-p, --path <path>","the path to add the component to.").option("-t, --type <shared|marketing|shared-assets|application|foundations>","the type of the component to add.").option("-l, --license <license-key>","Add a license key for adding components.").action(async(W,Q)=>{if(W)z.components=W;if(Q)z.overwrite=Q.overwrite,z.all=Q.all,z.path=Q.path,z.license=Q.license||z.license;try{await n0(z)}catch(X){console.error(E.red(X))}});async function n0(W){let Q=Y0().start(),X=process.cwd();if(!_.existsSync(v.resolve(X,"package.json")))Q.warn("This command should be run in a project directory."),process.exit(0);let Y=await l(X);if(z.license){if(!await F(z.license))Q.fail("Invalid license key"),process.exit(0);if(!_.existsSync(S)){let J=v.dirname(S);_.mkdirSync(J,{recursive:!0}),_.writeFileSync(S,JSON.stringify({license:z.license},null,2))}if(JSON.parse(_.readFileSync(S,"utf-8")).license!==z.license)_.writeFileSync(S,JSON.stringify({license:z.license},null,2))}if(Q.stop(),!z?.type&&!z?.components.length){let $=await M0(z.license);if(!$)console.log("No component types found"),process.exit(0);let H=await O({type:"select",name:"type",onState:n,message:`What type of ${E.cyan("component")} are you adding?`,choices:$?.types.map((J)=>({title:J,value:J}))});z.type=H.type}if(!z?.path){let $=await O({type:"text",name:"path",onState:n,message:`Where would you like to add the ${E.cyan("components")}?`,initial:"components"});z.path=$.path}if(Y&&!Y?.aliasPrefix){let $=/^[^*"]+\/\*\s*$/,H=await O({type:"text",name:"aliasPrefix",onState:n,initial:"@/*",message:`What is the ${E.cyan("import alias")} for your project?`,validate:(J)=>$.test(J)?!0:"Import alias must follow the pattern <prefix>/*"});Y.aliasPrefix=await I0(X,Y?.isSrcDir,H?.aliasPrefix)}if(!z?.components.length){let $=await V0(z?.type,z.license);if(!$)console.log("No components found"),process.exit(0);let H=await O({type:"multiselect",name:"components",onState:n,message:`Which ${E.cyan("components")} would you like to add?`,choices:$?.components?.map((J)=>({title:J||"example",value:J||"example",selected:z.components.includes(J)})),instructions:!1,hint:"- Space to select. Return to submit"});if(z.components=H.components,!H.components||H.components.length===0)console.log("No option selected. Exiting..."),process.exit(0)}if(!z.components?.length)Q.warn("No components selected. Exiting."),process.exit(0);if(!z.overwrite){let $=await O({type:"confirm",name:"overwrite",message:"You are about to add new components to your project. Do you want to overwrite the existing files?",initial:!0});z.overwrite=$.overwrite}let U=v.resolve(v.join(__dirname,"../templates/default")),V=await c(X),q=[],R=new r0({tsConfigFilePath:V?.tsConfig}),B=Y0(`Adding component
|
|
5
|
+
`).start(),M=await U0(z.type,z.components,z.license);if(!M)console.log("No components found"),process.exit(0);M.components.forEach(async($)=>{let{files:H,dependencies:J,devDependencies:P}=$,g=a({cwd:U,dependencies:J,devDependencies:P}),w=j(),k=Y0(`Installing dependencies
|
|
6
|
+
`).start();try{if(H?.forEach(async({path:D,code:C})=>{let m=D.replace("components/",""),L=v.join(process.cwd(),`${Y?.isSrcDir&&"src"}`,D.replace(/components\//,z.path+"/")),Q0=v.dirname(L);if(_.existsSync(L)&&!z.overwrite)q.push(m);else{_.mkdirSync(Q0,{recursive:!0}),_.writeFileSync(L,C);let A=R.addSourceFileAtPath(v.resolve(L));A.getImportDeclarations().forEach((K0)=>{let u0=K0.getModuleSpecifierValue();K0.setModuleSpecifier(H0(u0,Y?.aliasPrefix,z.path))}),await A.save()}}),q.length&&!z?.overwrite)console.log(`
|
|
7
|
+
`),B.fail(`Following files already exist in the directory. Use ${E.cyan("--overwrite")} or ${E.cyan("-o")} to overwrite existing files, or refer to the documentation ${E.cyan("https://untitled.xyz/docs")} for manual installation. The rest of the files are added.`),q.forEach((D)=>{console.log(`- ${E.green(D)}`)}),process.exit(0);if(!g)k.fail(`Failed to get dependencies from package.json
|
|
8
|
+
`),process.exit(0);if(g?.dependencies?.length)await l0(w,[w==="npm"?"install":"add",...g.dependencies]),k.succeed(`Dependencies are installed
|
|
9
|
+
`);B.succeed(`Component is added
|
|
10
|
+
`),process.exit(1)}catch(D){k.fail(`
|
|
11
|
+
Failed to install dependencies`),B.fail(`
|
|
12
|
+
Failed to add component`),console.error(E.red(D)),process.exit(0)}})}import j0 from"async-retry";import G from"chalk";import{Command as p0}from"commander";import{execa as t}from"execa";import z0 from"fast-glob";import I from"fs";import o from"ora";import i0 from"os";import*as K from"path";import e from"prompts";import{Project as t0}from"ts-morph";import s0 from"fast-glob";function _0(W){let Q=s0.sync("**/**/theme.css",{onlyFiles:!0,absolute:!0,cwd:W,ignore:N});return Q.length?Q[0]:null}import s from"fs";import v0 from"path";function Z0(W,Q){if(!s.existsSync(Q))s.mkdirSync(Q,{recursive:!0});let X=s.readdirSync(W,{withFileTypes:!0});for(let Z of X){let Y=v0.join(W,Z.name),U=v0.join(Q,Z.name);if(Z.isDirectory())Z0(Y,U);else s.copyFileSync(Y,U)}}import p from"chalk";import*as y from"fs";import*as i from"path";function $0(W){if(!y.existsSync(i.resolve(W)))console.log(p.red(`Error: CSS file not found at ${W}`)),process.exit(1);let Q=y.readFileSync(i.resolve(W),"utf-8"),X=/(--color-[a-zA-Z-]+-\d{1,3}):\s*(rgb\([^)]+\))/g,Z={},Y;while((Y=X.exec(Q))!==null)if(Y[1]&&Y[2])Z[Y[1]]=Y[2];return Z}function q0(W,Q,X){let Z=i.resolve(X);if(!y.existsSync(Z)){console.log(p.red(`Error: CSS file not found at ${Z}`));return}let Y=y.readFileSync(Z,"utf-8"),U=$0(X),V={},q={};for(let[B,M]of Object.entries(U))if(B.startsWith(`--color-${W}-`)){let $=B.replace(`--color-${W}-`,"");V[$]=B}else if(B.startsWith(`--color-${Q}-`)){let $=B.replace(`--color-${Q}-`,"");q[$]=M}let R=!1;for(let[B,M]of Object.entries(V))if(q[B]){let $=q[B],H=new RegExp(`(${M}):\\s*rgb\\([^)]*\\);?`,"g");if(H.test(Y))Y=Y.replace(H,`$1: ${$};`),R=!0;else console.log(p.yellow(`No match found for ${M}`))}if(R)y.writeFileSync(Z,Y,"utf-8");else console.log(p.blue("No changes were made."))}var __dirname="/Users/deebov/Developer/untitledui/react/packages/cli/commands",o0=K.join(i0.homedir(),".untitledui"),T=K.join(o0,"config.json"),N0="default",e0=["with-stripe","otp","magic-link"],u="",b={template:"",color:""};if(I.existsSync(T)){let W=JSON.parse(I.readFileSync(T,"utf-8"));b.license=W.license}var W0=(W)=>{if(W.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
|
|
13
|
+
`),process.exit(1)},E0=new p0().name("init").description("initialize a new project").argument("[directory]").usage("[directory] [options]").helpOption("-h, --help","Display this help message.").option("-t, --template <starter-kit>","Specify a template for the project.").option("-c, --color <color-name>","Specify a color for the project.").option("-o, --overwrite","Overwrite existing files.",!1).option("-l, --license <license-key>","Add a license key to download the repository.").action(async(W,Q)=>{if(W)u=W;if(Q)b.color=Q.color,b.template=Q.template,b.overwrite=Q.overwrite,b.license=Q.license||b.license;try{await W3(Q)}catch(X){console.error(G.red(X))}});async function W3(W){let Q=process.cwd(),X=I.existsSync(K.resolve(Q,"package.json")),Z=K.join(K.resolve(__dirname,"../../../../")),Y=_0(Z),U=$0(Y??""),V=Array.from(new Set(Object.keys(U).map((B)=>B?.split("--color-")?.[1]?.replace(/-\d{1,3}/,"")))),q=o().start(),R=await l(Q);if(b.license){if(!await F(b.license))q.fail("Invalid license key"),process.exit(0);if(!I.existsSync(T)){let $=K.dirname(T);I.mkdirSync($,{recursive:!0}),I.writeFileSync(T,JSON.stringify({license:b.license},null,2))}if(JSON.parse(I.readFileSync(T,"utf-8")).license!==b.license)I.writeFileSync(T,JSON.stringify({license:b.license},null,2))}if(!X){if(q.stop(),!u){let B=await e({onState:W0,type:"text",name:"path",message:"What is your project named?",initial:"untitled-ui"});if(typeof B.path==="string")u=B.path.trim()}if(I.existsSync(K.resolve(u)))q.fail(G.red("Directory already exists!")),process.exit(1);if(!b.template){let B=await e({type:"select",name:"template",onState:W0,message:`Which ${G.cyan("starter kit")} would you like to use?`,choices:[{title:"default-template",value:N0},{title:"basic-form",value:"basic-form"},{title:"magic-link",value:"magic-link"},{title:"next-intl",value:"next-intl"},{title:"otp",value:"otp"},{title:"react-hook-form",value:"react-hook-form"},{title:"with-stripe",value:"with-stripe"}]});if(b.template=B.template,e0.includes(b.template)&&!b.license){let M=await e({type:"text",name:"license",onState:W0,message:`Enter the license key to download the ${G.cyan(b.template)} template:`});if(b.license=M.license,!await F(M.license))q.fail("Invalid license key"),process.exit(0)}}q.succeed("Template is selected: "+G.green(b.template))}else if(R?.framework==="other")q.fail("Unsupported project framework"),console.log(`Please refer to the documentation ${G.cyan("https://untitled.xyz/docs")} for supported frameworks or proceed with manual installation.`),process.exit(1);else q.succeed(G.yellow("Detected Next.js project, proceeding with the setup..."));if(!b.color){let B=await e({type:"select",name:"color",onState:W0,initial:W.color??"",message:`Which ${G.cyan("color")} would you like to use as the ${G.cyanBright("brand")} color?`,choices:V.map((M)=>({title:M,value:M}))});b.color=B.color}if(u&&!X){let B=K.resolve(u);console.log(`
|
|
14
|
+
Creating a new project in ${G.blue(u)}`);let M=o("Downloading and extracting the repository...").start();try{if(I.mkdirSync(B,{recursive:!0}),b.template===N0){let J=K.resolve(K.join(__dirname,"../templates/",b.template));Z0(J,B)}else await j0(()=>b0(B,{username:"a-peak-works",repo:"starter-kits",branch:"master",template:b.template,key:b.license}),{retries:2});M.succeed("Files are downloaded and extracted successfully!");let $=o({text:"Installing dependencies..."}).start(),H=z0.sync(["**/styles/theme.css"],{cwd:B,absolute:!0,onlyFiles:!0})[0];q0("brand",b.color,H??""),await j0(()=>t("sh",["-c",`cd ${u} && ${j()} install && git init`]).catch(async(J)=>{if(J.message.includes("peer"))$.warn("Dependency conflict detected. Retrying with --legacy-peer-deps..."),$.start("Installing dependencies with --legacy-peer-deps flag"),await t("sh",["-c",`cd ${u} && ${j()==="npm"?"npm --legacy-peer-deps":j()} install && git init`])}),{retries:1}),$.succeed("Dependencies installed"),console.log(`
|
|
15
|
+
Your project is ready, to get staretd run the following commands:
|
|
16
|
+
|
|
17
|
+
cd ${G.cyan(u)}
|
|
18
|
+
${G.cyan(j())} run dev`),process.exit(1)}catch($){if(M.fail(G.red(`
|
|
19
|
+
Failed to download and extract the repository`)),$ instanceof Error)console.error($.message);else console.error(`
|
|
20
|
+
`);I.rmdirSync(B,{recursive:!0}),process.exit(0)}}else{let B=[],M=c(Q),$=K.resolve(K.join(__dirname,"../templates/default")),H=z0.sync(["**/{styles,plugins}/**","postcss.config.*"],{cwd:K.join($,"src"),onlyFiles:!0,ignore:N.filter((L)=>!L.includes("public"))}),J=a({cwd:$,dependencies:["tailwindcss","tailwindcss-animate","@tailwindcss/typography","tailwindcss-react-aria-components","@designbycode/tailwindcss-mask-image"],devDependencies:["@tailwindcss/postcss","postcss"]});if(H.forEach((L)=>{let Q0=L.includes("postcss.config"),A=K.resolve(process.cwd(),Q0?L:`${R?.isSrcDir?"src":""}/${L}`);if(I.existsSync(A)){if(b?.overwrite)I.copyFileSync(K.resolve(K.join($,"src"),L),A);else B.push(K.relative(process.cwd(),A));return}I.mkdirSync(K.dirname(A),{recursive:!0}),I.writeFileSync(A,""),I.copyFileSync(K.resolve(K.join($,"src"),L),A)}),B.length&&!b?.overwrite)console.log(`
|
|
21
|
+
`),q.fail(`Following files already exist in the directory. Use ${G.cyan("--overwrite")} or ${G.cyan("-o")} to overwrite existing files, or refer to the documentation ${G.cyan("https://untitled.xyz/docs")} for manual installation.`),B.forEach((L)=>{console.log(`- ${G.green(L)}`)}),process.exit(0);if(M?.tailwindFile)console.log(`
|
|
22
|
+
Tailwind config file exists in the project directory. You can add it to your globals.css as follows:`),console.log(`
|
|
23
|
+
${G.cyan(`@config "../${R?.isSrcDir&&"../"}${K.relative(process.cwd(),M.tailwindFile)}";`)}
|
|
24
|
+
`);let P=M?.layoutFile||M?.appFile||"",w=new t0({tsConfigFilePath:K.resolve(M?.tsConfig||"")}).addSourceFileAtPath(K.resolve(P)),k=["colors.css","globals.css","inter.css","text-styles.css","theme.css","typography.css"];w.getImportDeclarations().filter((L)=>k.includes(L.getModuleSpecifierValue())).forEach((L)=>L.remove());let D=K.relative(K.resolve(process.cwd(),`${R?.isSrcDir&&"src"}`),P).split("/").length;w.addImportDeclarations(H.filter((L)=>L.includes("styles")).map((L)=>({moduleSpecifier:`${R?.aliasPrefix?.stylesPrefix||R?.aliasPrefix?.srcPrefix||"../".repeat(D-1)}${R?.aliasPrefix?.stylesPrefix?L?.split("styles/")[1]:L}`}))),w.saveSync();let C=o(),m=z0.sync(["**/styles/theme.css"],{cwd:Q,absolute:!0,onlyFiles:!0,ignore:N});if(!m?.length)return q.fail("Failed to copy theme.css file");if(q0("brand",b.color,m[0]??""),!J)C.fail("Failed to get dependencies from package.json"),process.exit(1);C.start("Installing dependencies"),await t(j(),[j()==="npm"?"install":"add",...J.dependencies],{}),await t(j(),[j()==="npm"?"install":"add","-D",...J.devDependencies],{}),C.succeed("Dependencies installed"),q.succeed(G.green("Files are extracted successfully!")),console.log(`
|
|
25
|
+
Your project is ready, you can now start adding components.`),process.exit(1)}}var B0={name:"untitledui",version:"0.1.1",main:"dist/index.js",description:"Untitled UI CLI",publishConfig:{access:"public"},type:"module",scripts:{test:'echo "Error: no test specified" && exit 1',dev:"bun build --entrypoints ./index.ts --outdir=dist --target=node --minify --packages=external --watch",build:"bun build --entrypoints ./index.ts --outdir=dist --target=node --minify --packages=external","publish:npm":"bun run build && npm publish --access public",start:"node dist/index.js"},repository:{type:"git",url:"https://github.com/a-peak-works/untitledui-tailwind.git"},bugs:{url:"https://github.com/a-peak-works/untitledui-tailwind/issues"},homepage:"https://github.com/a-peak-works/untitledui-tailwind#readme",keywords:["untitled-ui","cli","tailwindcss","nextjs"],files:["dist","templates"],author:"",license:"MIT",bin:{untitledui:"dist/index.js"},exports:"./dist/index.js",dependencies:{"async-retry":"^1.3.3",chalk:"^5.4.1",commander:"^13.1.0",execa:"^9.5.2","fast-glob":"^3.3.3",ora:"^8.2.0",prompts:"^2.4.2",tar:"^7.4.3","ts-morph":"^25.0.1","tsconfig-paths":"^4.2.0","update-check":"^1.5.4"},devDependencies:{"@types/async-retry":"^1.4.9","@types/prompts":"^2.4.9",prettier:"^3.5.3","type-fest":"^4.37.0",typescript:"^5.8.2"}};process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function Y3(){let W=new X3().name(B0.name).version(B0.version);W.addCommand(E0).addCommand(R0),W.parse()}Y3();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@untitledui/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"description": "Untitled UI CLI",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"dev": "tsc --watch",
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"start": "node dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/a-peak-works/untitledui-tailwind.git"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/a-peak-works/untitledui-tailwind/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/a-peak-works/untitledui-tailwind#readme",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"untitled-ui",
|
|
25
|
+
"cli",
|
|
26
|
+
"tailwindcss",
|
|
27
|
+
"nextjs"
|
|
28
|
+
],
|
|
29
|
+
"author": "",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"bin": {
|
|
32
|
+
"@untitledui/cli": "dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"chalk": "^5.4.1",
|
|
36
|
+
"commander": "^13.1.0",
|
|
37
|
+
"inquirer": "^12.3.2",
|
|
38
|
+
"undici": "^7.3.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/async-retry": "^1.4.9",
|
|
42
|
+
"@types/prompts": "^2.4.9",
|
|
43
|
+
"async-retry": "^1.3.3",
|
|
44
|
+
"execa": "^9.5.2",
|
|
45
|
+
"prettier": "^3.4.2",
|
|
46
|
+
"prompts": "^2.4.2",
|
|
47
|
+
"tar": "^7.4.3",
|
|
48
|
+
"update-check": "^1.5.4"
|
|
49
|
+
}
|
|
50
|
+
}
|