untitledui 0.1.39 → 0.1.41
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.mjs +25 -25
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{Command as
|
|
3
|
-
`),process.exit(1)},t0=new
|
|
2
|
+
import{Command as p1}from"commander";import o0 from"async-retry";import N from"chalk";import{Command as I1}from"commander";import{execa as b0}from"execa";import*as F from"fs";import Y0 from"ora";import N1 from"os";import*as D from"path";import Z0 from"prompts";import{Project as A1}from"ts-morph";import f0 from"node-fetch";import{Readable as J1,pipeline as K1}from"stream";import{x as U1}from"tar";import{promisify as b1}from"util";var V1=b1(K1);async function m0(W,Q){try{let z=await L1(Q);await V1(z,U1({cwd:W,strip:1}))}catch(z){throw new Error(`Failed to download or extract repository from API: ${z instanceof Error?z.message:z}`)}}async function L1(W){let Q=`https://www.untitledui.com/react/api/download-repo?template=${W.template}`;try{let z=await f0(Q,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}});if(z.status===403||z.status===404)throw new Error("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");return J1.from(z.body)}catch(z){throw new Error(`Error downloading tarball: ${z instanceof Error?z.message:z}`)}}async function X0(W){let Q=`https://www.untitledui.com/react/api/validate-key?key=${W}`;try{return(await f0(Q)).status===200}catch{return!1}}import M1 from"node-fetch";var c0={invalid_key:"Invalid key provided",no_components_found:"No components found",no_components_provided:"No components provided"};async function I0(W,Q,z){let $=Q.map((q)=>{if(q.includes("modals/"))if(q.includes("-modal"))return q;else return q+"-modal";return q});try{let q=await M1("https://www.untitledui.com/react/api/components",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({type:W,components:$,key:z})});if(!q.ok)console.log(c0?.[q.statusText]||c0.no_components_found),process.exit(1);return await q.json()}catch(q){return null}}import N0 from"node-fetch";var i={invalid_key:"Invalid key provided",no_components_found:"No components found",no_components_provided:"No components provided"};async function l0(W,Q=""){let z=`https://www.untitledui.com/react/api/components/list?key=${Q}&type=${W}`;try{let X=await N0(z),$=await X.json();if(!X.ok)console.log(i?.[X.statusText]||i.no_components_found),process.exit(1);if(!$?.components?.length)return null;return $}catch(X){return console.error(X),null}}async function a0(W,Q="",z){let X=`https://www.untitledui.com/react/api/components/list?key=${Q}&type=${W}&subfolders=${z.join(",")}`;try{let $=await N0(X);if(!$.ok)console.log(i?.[$.statusText]||i.no_components_found),process.exit(1);let q=await $.json();if(!q?.components?.length)return null;return q}catch($){return console.error($),null}}async function s0(W=""){let Q=`https://www.untitledui.com/react/api/components/list?key=${W}`;try{let z=await N0(Q);if(!z.ok)console.log(i?.[z.statusText]||i.no_components_found),process.exit(1);let X=await z.json();if(!X?.types?.length)return null;return X}catch(z){return console.error(z),null}}import r0 from"fast-glob";import*as E0 from"fs";import*as A0 from"path";import{Project as H3}from"ts-morph";import{loadConfig as R1}from"tsconfig-paths";import B3 from"prettier";import K0 from"fast-glob";import*as B0 from"fs";import*as J0 from"path";import{loadConfig as H1}from"tsconfig-paths";var d=["**/node_modules/**",".next","public","dist","build"],n0={"next-app":"Next.js (App)","next-pages":"Next.js (Pages)",vite:"Vite",other:"Other"};async function p(W){let Q=B0.existsSync(J0.resolve(W,"src")),z=B0.existsSync(J0.resolve(W,`${Q?"src/":""}app`)),[X,$,q,L]=await Promise.all([K0.glob("**/{next,vite,astro}.config.*|gatsby-config.*",{cwd:W,deep:2,ignore:d}),j1(W),G1(W),v1(W)]),H={framework:"other",isTsx:$,tailwindFile:q||null,aliasPrefix:L,isSrcDir:Q,isUsingAppDir:z};if(X.find((V)=>V.startsWith("next.config."))?.length)return H.framework=z?"next-app":"next-pages",H;else if(X.find((V)=>V.startsWith("vite.config."))?.length)return H.framework="vite",H;else if(X?.length||B0.existsSync(J0.resolve(W,"package.json")))return H.framework="other",H;return null}async function j1(W){return(await K0.glob("tsconfig.*",{cwd:W,deep:2,ignore:d})).length>0}async function G1(W){let Q=await K0.glob("tailwind.config.*",{cwd:W,deep:2,ignore:d});if(!Q.length)return null;return Q[0]}async function v1(W){let Q=await H1(W);if(Q?.resultType==="failed"||!Object.keys(Q.paths).length)return null;let z={};for(let[X,$]of Object.entries(Q.paths)){let q=X.replace(/\/\*$/,"/");if($.some((L)=>L.includes("/app/*")))z.appPrefix=q;else if($.some((L)=>L.includes("/components/*")))z.componentsPrefix=q;else if($.some((L)=>L.includes("/utils/*")))z.utilsPrefix=q;else if($.some((L)=>L.includes("/styles/*")))z.stylesPrefix=q;else if($.some((L)=>L.includes("./*")||L.includes("/src/*")))z.srcPrefix=q}return z||null}function o(W){let Q=R1(W),z=r0.sync(["tailwind.config.*","**/globals.css","**/{layout,_app,main}.tsx","package.json"],{cwd:W,deep:4,absolute:!0,onlyFiles:!0,ignore:d}),X={tailwindFile:z.find(($)=>$.includes("tailwind.config.")),cssFile:z.find(($)=>$.includes("globals.css")),layoutFile:z.find(($)=>$.includes("layout")),appFile:z.find(($)=>$.includes("_app")),mainFile:z.find(($)=>$.includes("main")),packageJson:z.find(($)=>$.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 X}function t(W,Q,z={},X=""){if(W.includes("components")){if(z?.componentsPrefix)return W.replace(/@\/components\//,A0.posix.join(z?.componentsPrefix,Q?Q.replace(/components\//,""):"","/"));if(Q){let $=z?.srcPrefix?A0.posix.join(z?.srcPrefix,Q,"/"):X;return W.replace(/@\/components\//,$)}}if(W.includes("app")&&z?.appPrefix)return W.replace(/^@\/app\//,z?.appPrefix);if(W.includes("utils")&&z?.utilsPrefix)return W.replace(/^@\/utils\//,z?.utilsPrefix);if(W.includes("styles")&&z?.stylesPrefix)return W.replace(/^@\/styles\//,z?.stylesPrefix);if(z?.srcPrefix)return W.replace(/^@\//,z?.srcPrefix);return W}function i0(W){let Q=r0.sync(["vite.config.*"],{cwd:W,absolute:!0,onlyFiles:!0,ignore:d})?.[0];if(!Q)return!1;try{let z=E0.readFileSync(Q,"utf-8");return u1(z)}catch{return!1}}function u1(W){let Q=W.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"");if(!["tailwindcss","@tailwindcss/vite","tailwind("].some((q)=>Q.includes(q)))return!1;return["plugins:","postcss:","css:"].some((q)=>Q.includes(q))}function C(){if("bun/1.2.18 npm/? node/v24.3.0 darwin arm64".startsWith("yarn"))return"yarn";if("bun/1.2.18 npm/? node/v24.3.0 darwin arm64".startsWith("pnpm"))return"pnpm";if("bun/1.2.18 npm/? node/v24.3.0 darwin arm64".startsWith("bun"))return"bun";return"npm"}function e(){switch(C()){case"yarn":return"yarn";case"pnpm":return"pnpx";case"bun":return"bunx";default:return"npx"}}function p0(){switch(C()){case"yarn":return"yarn dev";case"pnpm":return"pnpm dev";case"bun":return"bun dev";default:return"npm run dev"}}function U0(W){return W.replace(/^[ \t]*\/\/\s*(TODO:|collapse-(start|end)).*\r?\n?|[ \t]*{\s*\/\*\s*(TODO:|collapse-(start|end)).*?\*\/\s*}\r?\n?/gm,"")}var E1=D.join(N1.homedir(),".untitledui"),c=D.join(E1,"config.json"),K={components:[],path:"",type:void 0,license:""};if(F.existsSync(c)){let W=JSON.parse(F.readFileSync(c,"utf-8"));K.license=W.license}var V0=(W)=>{if(W.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
|
|
3
|
+
`),process.exit(1)},t0=new I1().name("add").description("add a component to your project").argument("[components...]","the components to add").option("-a, --all","add all available components",!1).option("-o, --overwrite","overwrite existing files.",!1).option("-p, --path <path>","the path to add the component to.").option("-d, --dir <directory>","the directory where the project is located.").option("-t, --type <base|marketing|shared-assets|application|foundations>","the type of the component to add.").action(async(W,Q)=>{if(W)K.components=W;if(Q)K.all=Q.all,K.dir=Q.dir,K.path=Q.path,K.overwrite=Q.overwrite,K.license=Q.license||K.license;try{await y0(K)}catch(z){console.error(N.red(z))}});async function y0(W){if(W)K={...K,...W};let Q=Y0().start(),z=D.posix.join(process.cwd(),K.dir||"");if(!F.existsSync(D.resolve(z,"package.json")))Q.warn("This command should be run in a project directory."),process.exit(1);let $=await p(z);if(K.license){if(!await X0(K.license))Q.fail("Invalid license key"),process.exit(1);if(!F.existsSync(c)){let B=D.dirname(c);F.mkdirSync(B,{recursive:!0}),F.writeFileSync(c,JSON.stringify({license:K.license},null,2))}if(JSON.parse(F.readFileSync(c,"utf-8")).license!==K.license)F.writeFileSync(c,JSON.stringify({license:K.license},null,2),"utf-8")}Q.stop();let q=[];if(K.components.length){let Z=await I0(K.type,K.components,K.license);if(Z&&Z.pro&&Z.pro.length>0){if(console.log(),Z.pro.length===1){let Y=Z.pro[0]?.split("/")[1]||Z.pro[0];console.log(N.yellow(`\uD83D\uDD12 The ${N.cyan(Y)} component requires PRO access.`))}else console.log(N.yellow("\uD83D\uDD12 The following components require PRO access:")),Z.pro.forEach((Y)=>{let B=Y?.split("/")[1]||Y;console.log(` • ${N.cyan(B)}`)});console.log(),console.log("To access PRO components:"),console.log(` ${N.green("→")} If you've already purchased: ${N.cyan(`${e()} untitledui@latest login`)}`),console.log(` ${N.green("→")} To purchase PRO components: ${N.cyan("https://www.untitledui.com/buy/react")}`),console.log(),process.exit(1)}if(!Z?.components.length)console.log("No components found"),process.exit(1);q.push(...Z.components)}if(!K?.type&&!K?.components.length){let Z=await s0(K.license);if(!Z)console.log("No component types found"),process.exit(1);let Y=await Z0({type:"select",name:"type",onState:V0,message:`What type of ${N.cyan("component")} are you adding?`,choices:Z?.types.map((B)=>({title:B,value:B}))});K.type=Y.type}if(!K?.path){let Z=await Z0({type:"text",name:"path",onState:V0,message:`Where would you like to add the ${N.cyan("components")}?`,initial:"components"});K.path=Z.path}if(!K?.components.length){let Z=await l0(K?.type,K.license);if(!Z)console.log("No components found"),process.exit(1);let Y=await Z0({type:"multiselect",name:"components",onState:V0,message:`Which ${N.cyan("components")} would you like to add?`,choices:Z?.components?.map((b)=>({title:b?.name+(b?.count?` (${b?.count} variants)`:"")||"example",value:b||"example",selected:K.components.includes(b.name)})),instructions:!1,hint:"- Space to select. Return to submit"});if(!Y.components||!Y.components.length)console.log("No option selected. Exiting..."),process.exit(1);let B=Y.components.filter((b)=>b?.type==="file").map((b)=>b.name),U=Y.components.filter((b)=>b?.type==="dir").map((b)=>b.name),S=[];if(U.length){let b=await a0(K?.type,K.license,U);if(b&&b.components.length)for(let x of b.components){let[I,O]=Object.entries(x)[0]||[],u=await Z0({type:"select",name:"component",onState:V0,message:`Which ${N.cyan("variant")} from ${N.cyan(I)} would you like to add?`,choices:O?.map((y)=>({title:y?.name.replace(/-modal/g,"")||"example",value:y?.name||"example",selected:K.components.includes(y.name)})),instructions:!1,hint:"- Space to select. Return to submit"});if(!u.component)console.log("No variant selected for "+N.cyan(I));S.push(I+"/"+u.component)}else console.log("No variants found")}K.components=[...S,...B]}if(!K.components?.length)Q.warn("No components selected. Exiting."),process.exit(1);let L=o(z),H=new Set,V=new Set,E=new Set,T=new A1({tsConfigFilePath:L?.tsConfig});if(K.type&&K.components.length){let Z=await I0(K.type,K.components,K.license);if(!Z?.components.length)console.log("No components found"),process.exit(1);q.push(...Z.components)}if(q.forEach((Z)=>{let Y=Y0(`Adding ${Z.name}...`).start(),B=Z.files;Z.dependencies.forEach((U)=>V.add(U)),Z.devDependencies.forEach((U)=>E.add(U));try{if(B?.forEach(async({path:U,code:S})=>{let b=D.posix.join(z,`${$?.isSrcDir?"src":""}`,U.replace(/components\//,K.path+"/")),x=$?.framework==="vite"?S.replace(`"use client";
|
|
4
4
|
|
|
5
|
-
`,""):S,
|
|
6
|
-
Failed to add the component ${N.red(
|
|
7
|
-
Following files already exist in the directory.`),H.forEach((Y)=>{console.log(N.green(`- ${D.relative(z,Y.path)}`))}),(await Z0({type:"confirm",name:"overwrite",message:"Do you want to overwrite the existing files?",initial:!0})).overwrite){let Y=Y0("Overwriting files").start();H.forEach((
|
|
5
|
+
`,""):S,I=U0(x),O=D.dirname(b);if(F.existsSync(b)&&!K.overwrite){if(F.readFileSync(b,"utf-8")!==I)H.add({code:I,path:b})}else{F.mkdirSync(O,{recursive:!0}),F.writeFileSync(b,I);let u=D.relative(D.posix.join(z,`${$?.isSrcDir?"src":""}`),b).split("/").length,y=u===1?"./":"../".repeat(u-1),k=T.addSourceFileAtPath(D.resolve(b));k.getImportDeclarations().forEach((P)=>{let W0=P.getModuleSpecifierValue();P.setModuleSpecifier(t(W0,K.path,$?.aliasPrefix,y))}),await k.save()}}),H.size)Y.warn(`Some files of ${N.yellow(Z.name)} already exist`);else Y.succeed(`${N.green(Z.name)} is added successfully`)}catch(U){Y.fail(`
|
|
6
|
+
Failed to add the component ${N.red(Z.name)}`),console.error(N.red(U)),process.exit(1)}}),H.size&&!K?.overwrite)if(console.log(`
|
|
7
|
+
Following files already exist in the directory.`),H.forEach((Y)=>{console.log(N.green(`- ${D.relative(z,Y.path)}`))}),(await Z0({type:"confirm",name:"overwrite",message:"Do you want to overwrite the existing files?",initial:!0})).overwrite){let Y=Y0("Overwriting files").start();H.forEach((B)=>{let U=D.relative(D.resolve(z,`${$?.isSrcDir?"src":""}`,K.path),B.path).split("/").length,S=U===1?"./":"../".repeat(U-1),b=T.addSourceFileAtPath(D.resolve(B.path));b.replaceWithText(B.code),b.getImportDeclarations().forEach((x)=>{let I=x.getModuleSpecifierValue();x.setModuleSpecifier(t(I,K.path,$?.aliasPrefix,S))}),b.saveSync()}),Y.succeed("Files are overwritten")}else console.log(`Use ${N.cyan("--overwrite")} or ${N.cyan("-o")} to overwrite existing files, or refer to the documentation ${N.cyan("https://www.untitled.com/docs")} for manual installation. The rest of the files are added.`),process.exit(1);let R=C();if(V?.size){let Z=Y0("Installing component dependencies").start();await o0(()=>b0(R,[R==="npm"?"install":"add",...V],{cwd:z}).catch(async(Y)=>{if(Y.message.includes("peer"))Z.warn("Component dependencies conflict detected. Retrying with --legacy-peer-deps..."),Z.start("Installing component dependencies with --legacy-peer-deps flag"),await b0(R,[R==="npm"?"install":"add",...V,"--legacy-peer-deps"],{cwd:z})}),{retries:1}),Z.succeed("Component dependencies are installed")}if(E?.size){let Z=Y0("Installing component devDependencies").start();await o0(()=>b0(R,[R==="npm"?"install":"add","-D",...E],{cwd:z}).catch(async(Y)=>{if(Y.message.includes("peer"))Z.warn("Component devDependencies conflict detected. Retrying with --legacy-peer-deps..."),Z.start("Installing component devDependencies with --legacy-peer-deps flag"),await b0(R,[R==="npm"?"install":"add","-D",...E,"--legacy-peer-deps"],{cwd:z})}),{retries:1}),Z.succeed("Component devDependencies are installed")}if(K.message)console.log(K.message);process.exit(0)}import w0 from"chalk";import{Command as w1}from"commander";import*as f from"fs";import T1 from"http";import S1 from"open";import x1 from"ora";import C1 from"os";import*as S0 from"path";import{URL as F1}from"url";import*as L0 from"fs";import*as l from"path";import{fileURLToPath as y1}from"url";var _1=y1(import.meta.url),_0=l.dirname(_1);function D1(){let W=[l.join(_0,"..","templates","auth-template.html"),l.join(_0,"templates","auth-template.html"),l.join(process.cwd(),"node_modules","untitledui","templates","auth-template.html"),l.join(_0,"..","..","templates","auth-template.html")];for(let Q of W)if(L0.existsSync(Q))return Q;throw new Error("Auth template file not found. Please ensure the CLI package is properly installed.")}function e0(){try{let W=D1();return L0.readFileSync(W,"utf-8")}catch(W){return console.warn("Warning: Using fallback auth template. Some styling may be missing."),`<!doctype html>
|
|
8
8
|
<html lang="en">
|
|
9
9
|
<head>
|
|
10
10
|
<meta charset="UTF-8" />
|
|
@@ -50,31 +50,31 @@ Following files already exist in the directory.`),H.forEach((Y)=>{console.log(N.
|
|
|
50
50
|
{{AUTO_CLOSE_SCRIPT}}
|
|
51
51
|
</div>
|
|
52
52
|
</body>
|
|
53
|
-
</html>`}}function
|
|
54
|
-
✨ You can now access PRO components with the CLI!`)),process.exit(0)}catch(Q){W.fail(`Authentication failed: ${Q instanceof Error?Q.message:Q}`),process.exit(1)}});async function
|
|
53
|
+
</html>`}}function z1(){return e0().replace("{{TITLE}}","Authentication successful").replace("{{HEADING}}","Authentication successful").replace("{{DESCRIPTION}}","You can now close this tab and return to your terminal.").replace("{{AUTO_CLOSE_SCRIPT}}","<script>setTimeout(() => window.close(), 10000);</script>")}function M0(W){return e0().replace("{{TITLE}}","Authentication failed").replace("{{HEADING}}","Authentication failed").replace("{{DESCRIPTION}}",W).replace("{{AUTO_CLOSE_SCRIPT}}","")}var T0=S0.join(C1.homedir(),".untitledui"),D0=S0.join(T0,"config.json"),Q1=new w1().name("login").description("authenticate with Untitled UI to access PRO components").action(async()=>{let W=x1("Starting authentication...").start();try{await k1(W),W.succeed("Authentication completed successfully!"),console.log(w0.green(`
|
|
54
|
+
✨ You can now access PRO components with the CLI!`)),process.exit(0)}catch(Q){W.fail(`Authentication failed: ${Q instanceof Error?Q.message:Q}`),process.exit(1)}});async function k1(W){return new Promise((Q,z)=>{let X=T1.createServer(($,q)=>{let L=new F1($.url,"http://localhost");if(L.pathname==="/callback"){let H=L.searchParams.get("apiKey"),V=L.searchParams.get("error");if(V){q.writeHead(400,{"Content-Type":"text/html"}),q.end(M0(decodeURIComponent(V))),X.close(),z(new Error(decodeURIComponent(V)));return}if(!H){q.writeHead(400,{"Content-Type":"text/html"}),q.end(M0("No Access Token received")),X.close(),z(new Error("No Access Token received"));return}try{P1(H),q.writeHead(200,{"Content-Type":"text/html"}),q.end(z1()),X.close(),Q()}catch(E){q.writeHead(500,{"Content-Type":"text/html"}),q.end(M0("Failed to save authentication data")),X.close(),z(E)}}else q.writeHead(404),q.end("Not found")});X.listen(0,"localhost",()=>{let L=`https://www.untitledui.com/react/api/cli-auth?port=${X.address().port}`;W.text="Opening browser for authentication...",S1(L).catch((H)=>{console.log(w0.yellow(`
|
|
55
55
|
Failed to open browser automatically: ${H.message}`)),console.log(w0.cyan(`Please manually open: ${L}
|
|
56
|
-
`))}),W.text="Waiting for authentication in browser..."}),setTimeout(()=>{
|
|
57
|
-
`),process.exit(1)},
|
|
58
|
-
Creating a new project in ${A.blue(h)}`);let Y=z0("Downloading and extracting the repository...").start();try{_.mkdirSync(
|
|
56
|
+
`))}),W.text="Waiting for authentication in browser..."}),setTimeout(()=>{X.close(),z(new Error("Authentication timeout. Please try again."))},300000)})}function P1(W){if(!f.existsSync(T0))f.mkdirSync(T0,{recursive:!0});let Q={};if(f.existsSync(D0))try{Q=JSON.parse(f.readFileSync(D0,"utf-8"))}catch{Q={}}Q.license=W,f.writeFileSync(D0,JSON.stringify(Q,null,2),"utf-8")}import g0 from"async-retry";import M from"chalk";import{Command as l1}from"commander";import{execa as u0}from"execa";import*as w from"fs";import q0 from"ora";import a1 from"os";import*as G from"path";import n from"prompts";import{Project as s1}from"ts-morph";import O1 from"node-fetch";async function H0(W,Q){try{let X=await O1("https://www.untitledui.com/react/api/components/example",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({example:W,key:Q})});if(!X.ok){if(X.status===401||X.status===403)return{type:"error",status:X.status,message:"PRO access required"};return console.error(`API error: ${X.status} - ${X.statusText}`),null}return await X.json()}catch(X){return console.error(X?.message||"Error fetching example data."),null}}import $0 from"async-retry";import A from"chalk";import{Command as g1}from"commander";import{execa as a}from"execa";import v0 from"fast-glob";import _ from"fs";import z0 from"ora";import d1 from"os";import*as v from"path";import R0 from"prompts";import{Project as h1}from"ts-morph";import{fileURLToPath as f1}from"url";import*as j0 from"fs";import*as W1 from"path";function x0(W,Q){let z=W1.join(W,"package.json");if(!j0.existsSync(z))return Q;let X=JSON.parse(j0.readFileSync(z,"utf-8")),$={...X.dependencies,...X.devDependencies},q=[];for(let L of Q){let H=$[L];if(!H){q.push(L);continue}if(L==="tailwindcss"){let V=H.match(/\d+/);if((V?parseInt(V[0],10):0)<4)q.push(L)}}return q}import C0 from"chalk";import*as m from"fs";import*as G0 from"path";function F0(W){if(!m.existsSync(G0.resolve(W)))console.log(C0.red(`Error: CSS file not found at ${W}`)),process.exit(1);let Q=m.readFileSync(G0.resolve(W),"utf-8"),z=/(--color-[a-zA-Z-]+-\d{1,3}):\s*(rgb\([^)]+\))/g,X={},$;while(($=z.exec(Q))!==null)if($[1]&&$[2])X[$[1]]=$[2];return X}function k0(W,Q,z){let X=G0.resolve(z);if(!m.existsSync(X)){console.log(C0.red(`Error: CSS file not found at ${X}`));return}let $=m.readFileSync(X,"utf-8"),q=F0(z),L={},H={};for(let[E,T]of Object.entries(q))if(E.startsWith(`--color-${W}-`)){let R=E.replace(`--color-${W}-`,"");L[R]=E}else if(E.startsWith(`--color-${Q}-`)){let R=E.replace(`--color-${Q}-`,"");H[R]=T}let V=!1;for(let[E,T]of Object.entries(L))if(H[E]){let R=H[E],Z=new RegExp(`(${T}):\\s*rgb\\([^)]*\\);?`,"g");if(Z.test($))$=$.replace(Z,`$1: ${R};`),V=!0;else console.log(C0.yellow(`No match found for ${T}`))}if(V)m.writeFileSync(X,$,"utf-8")}var m1=f1(import.meta.url),Y1=v.dirname(m1),c1=v.join(d1.homedir(),".untitledui"),s=v.join(c1,"config.json"),$1="vite",q1="nextjs",Z1={[q1]:"Next.js",[$1]:"Vite"},h="",j={color:"",template:"",framework:void 0};if(_.existsSync(s)){let W=JSON.parse(_.readFileSync(s,"utf-8"));j.license=W.license}var P0=(W)=>{if(W.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
|
|
57
|
+
`),process.exit(1)},X1=new g1().name("init").description("initialize a new project or adjust an existing one").argument("[directory]").usage("[directory] [options]").helpOption("-h, --help","display this help message.").option("--vite","initialize a Vite project.",!1).option("--nextjs","initialize a Next.js project.",!1).option("-o, --overwrite","overwrite existing files.",!1).option("--colors-list","show the colors list.",!1).option("-c, --color <color-name>","specify a color for the project.").action(async(W,Q)=>{if(W)h=W;if(Q){if(j.color=Q.color,j.template=Q.template,j.overwrite=Q.overwrite,j.colorsList=Q.colorsList,j.license=Q.license||j.license,j.vite=Q.vite,j.nextjs=Q.nextjs,Q.vite)j.framework=$1;if(Q.nextjs)j.framework=q1}try{await O0(Q),process.exit(0)}catch(z){console.error(A.red(z)),process.exit(1)}});async function O0(W,Q=null){let z=process.cwd(),X=_.existsSync(v.resolve(z,"package.json")),$=v.resolve(v.join(Y1,"../config/styles","theme.css")),q=F0($??""),L=Array.from(new Set(Object.keys(q).map((Z)=>Z?.split("--color-")?.[1]?.replace(/-\d{1,3}/,"")))),H=z0().start(),V=await p(z),E=X?v0.sync(["**/**/theme.css"],{cwd:z,absolute:!0,onlyFiles:!0,ignore:d}):[],T=E?.[0]&&_.readFileSync(E[0],"utf-8").match(/(--color-brand+-\d{1,3}):\s*(rgb\([^)]+\))/g)?.[1]||void 0;if(j.license){if(!_.existsSync(s)){let Y=v.dirname(s);_.mkdirSync(Y,{recursive:!0}),_.writeFileSync(s,JSON.stringify({license:j.license},null,2))}if(JSON.parse(_.readFileSync(s,"utf-8")).license!==j.license)_.writeFileSync(s,JSON.stringify({license:j.license},null,2))}if(!X){if(H.stop(),!h){let Z=await R0({onState:P0,type:"text",name:"path",message:"What is your project named?",initial:"untitled-ui"});if(typeof Z.path==="string")h=Z.path.trim()}if(Q)Q.projectPath=h;if(_.existsSync(v.resolve(v.posix.join(z,h))))H.fail(A.red("Directory already exists!")),process.exit(1);if(j.vite&&j.nextjs||!j.framework){let Z=await R0({type:"select",name:"framework",onState:P0,message:`Which ${A.cyan("framework")} would you like to use?`,choices:Object.entries(Z1).map(([Y,B])=>({title:B,value:Y}))});j.framework=Z.framework}H.succeed("Framework is selected: "+A.green(Z1[j.framework]))}else if(V?.framework==="other")H.fail("Unsupported project framework"),console.log(`Please refer to the documentation ${A.cyan("https://www.untitled.com/docs")} for supported frameworks or proceed with manual installation.`),process.exit(1);else if(V?.framework.startsWith("next")||V?.framework.startsWith("vite"))if(!Q&&!T)H.succeed(A.yellow(`Detected ${n0[V.framework]} project, proceeding with the setup...`));else H.stop();if(j.colorsList||!j.color&&!T){let Z=await R0({type:"select",name:"color",onState:P0,initial:W.color??"",message:`Which ${A.cyan("color")} would you like to use as the ${A.cyanBright("brand")} color?`,choices:L.map((Y)=>({title:Y,value:Y}))});j.color=Z.color}let R=v.posix.join(z,h||"");if(h&&!X){let Z=v.resolve(h);console.log(`
|
|
58
|
+
Creating a new project in ${A.blue(h)}`);let Y=z0("Downloading and extracting the repository...").start();try{_.mkdirSync(Z,{recursive:!0}),await $0(()=>m0(Z,{template:j.framework}),{retries:2}),Y.succeed("Files are downloaded and extracted successfully!");let B=z0({text:"Installing dependencies..."}).start(),U=v0.sync(["**/styles/theme.css"],{cwd:Z,absolute:!0,onlyFiles:!0})[0];if(k0("brand",j.color||"",U??""),await $0(()=>a(C(),["install"],{cwd:R}).catch(async(S)=>{if(S.message.includes("peer"))B.warn("Dependency conflict detected. Retrying with --legacy-peer-deps..."),B.start("Installing dependencies with --legacy-peer-deps flag"),await a(C(),["install","--legacy-peer-deps"],{cwd:R})}),{retries:1}),await $0(()=>a("git",["init"],{cwd:R}),{retries:1}),B.succeed("Dependencies are installed"),!Q)console.log(`
|
|
59
59
|
Your project is ready, to get started run the following commands:
|
|
60
60
|
|
|
61
61
|
cd ${A.cyan(h)}
|
|
62
|
-
${A.cyan(p0())}`)}catch(
|
|
63
|
-
Failed to download and extract the repository`)),
|
|
64
|
-
`);_.rmdirSync(
|
|
65
|
-
`)
|
|
62
|
+
${A.cyan(p0())}`)}catch(B){if(Y.fail(A.red(`
|
|
63
|
+
Failed to download and extract the repository`)),B instanceof Error)console.error(B.message);else console.error(`
|
|
64
|
+
`);_.rmdirSync(Z,{recursive:!0}),process.exit(1)}}else{let Z=z0(),Y=new Set,B=o(z),U=v.resolve(v.join(Y1,"../config")),S=v0.sync(["**"],{cwd:U,onlyFiles:!0,ignore:d}),b=x0(z,["tailwindcss","tailwindcss-animate","@tailwindcss/typography","tailwindcss-react-aria-components"]),x=x0(z,["@tailwindcss/postcss","postcss"]);if(!Q&&!T)Z.start("Copying files to the project directory");if(S.forEach((u)=>{let y=u.includes("postcss.config"),k=v.posix.join(v.posix.join(U),u),P=v.posix.join(z,y?u:`${V?.isSrcDir?"src":""}/${u}`);if(_.existsSync(P)){if(j?.overwrite)_.copyFileSync(k,P);else{let W0=_.readFileSync(P,"utf-8"),g=_.readFileSync(k,"utf-8");if(W0!==g){if(u.endsWith("theme.css")&&T)return;Y.add({targetFile:P,sourceFile:k})}}return}_.mkdirSync(v.dirname(P),{recursive:!0}),_.writeFileSync(P,""),_.copyFileSync(k,P)}),Z.stop(),Y.size&&!j?.overwrite)if(console.log(`
|
|
65
|
+
`),Z.fail("Following files already exist in the directory."),Y.forEach((y)=>{console.log(`- ${A.green(y.targetFile)}`)}),(await R0({type:"confirm",name:"overwrite",message:"Do you want to overwrite the existing files?",initial:!0})).overwrite){let y=z0("Overwriting files").start();Y.forEach((k)=>{_.copyFileSync(k.sourceFile,k.targetFile)}),y.succeed("Files are overwritten")}else console.log(`Use ${A.cyan("--overwrite")} or ${A.cyan("-o")} to overwrite existing files, or refer to the documentation ${A.cyan("https://www.untitled.com/docs")} for manual installation. The rest of the files are added.`);if(B?.tailwindFile)console.log(`
|
|
66
66
|
Tailwind config file exists in the project directory. You can add it to your globals.css as follows:`),console.log(`
|
|
67
|
-
${A.cyan(`@config "../${V?.isSrcDir?"../":""}${v.relative(z,
|
|
67
|
+
${A.cyan(`@config "../${V?.isSrcDir?"../":""}${v.relative(z,B.tailwindFile)}";`)}
|
|
68
68
|
`);if(V?.framework==="vite"){if(!i0(z))console.log(`
|
|
69
69
|
Tailwind CSS is not configured in your Vite project. Please refer to the documentation ${A.cyan("https://www.untitled.com/react/integrations/vite")} for manual installation.
|
|
70
|
-
`)}let
|
|
71
|
-
`),S.forEach((
|
|
72
|
-
Ensure that the ${A.cyan("theme.css")} file exists in the project directory under ${A.yellow("styles/")} folder.`);if((j.color||!T)&&k0("brand",j.color||"brand",O[0]??""),
|
|
73
|
-
Your project is ready, you can now start adding components.`)}}var
|
|
74
|
-
`),process.exit(1)},
|
|
70
|
+
`)}let I=B?.layoutFile||B?.appFile||V?.framework==="vite"&&B?.mainFile||"";if(!I)console.log(`Import following files to your main file:
|
|
71
|
+
`),S.forEach((u)=>{console.log(A.cyan(u))});else{let y=new h1({tsConfigFilePath:v.resolve(B?.tsConfig||"")}).addSourceFileAtPath(v.resolve(I)),k="globals.css";y.getImportDeclarations().filter((g)=>g.getModuleSpecifierValue().includes("globals.css")).forEach((g)=>g.remove());let P=v.relative(v.resolve(z,`${V?.isSrcDir?"src":""}`),I).split("/").length,W0=V?.aliasPrefix?.stylesPrefix||V?.aliasPrefix?.srcPrefix||(P===1?"./":"../".repeat(P-1));y.addImportDeclarations(S.filter((g)=>g.includes("globals.css")).map((g)=>({moduleSpecifier:`${W0}${V?.aliasPrefix?.stylesPrefix?g?.split("styles/")[1]:g}`}))),y.saveSync()}let O=v0.sync(["**/styles/theme.css"],{cwd:z,absolute:!0,onlyFiles:!0,ignore:d});if(!O?.length)return Z.fail(`Failed to copy ${A.cyan("theme.css")} file.
|
|
72
|
+
Ensure that the ${A.cyan("theme.css")} file exists in the project directory under ${A.yellow("styles/")} folder.`);if((j.color||!T)&&k0("brand",j.color||"brand",O[0]??""),b.length||x.length){let u=z0().start("Installing dependencies");b.length&&await $0(()=>a(C(),[C()==="npm"?"install":"add",...b],{cwd:R}).catch(async(y)=>{if(y.message.includes("peer"))u.warn("Dependency conflict detected. Retrying with --legacy-peer-deps..."),u.start("Installing dependencies with --legacy-peer-deps flag"),await a(C(),[C()==="npm"?"install":"add",...b,"--legacy-peer-deps"],{cwd:R})}),{retries:1}),x.length&&await $0(()=>a(C(),[C()==="npm"?"install":"add","-D",...x],{cwd:R}).catch(async(y)=>{if(y.message.includes("peer"))u.warn("DevDependency conflict detected. Retrying with --legacy-peer-deps..."),u.start("Installing dependencies with --legacy-peer-deps flag"),await a(C(),[C()==="npm"?"install":"add","-D",...x,"--legacy-peer-deps"],{cwd:R})}),{retries:1}),u.succeed("Dependencies are installed")}if(!Q&&!T)Z.succeed(A.green("Project setup is completed!"));if(Q&&X){H.stop(),Z.stop();return}else console.log(`
|
|
73
|
+
Your project is ready, you can now start adding components.`)}}var n1=G.join(a1.homedir(),".untitledui"),r=G.join(n1,"config.json"),J={path:"",example:"",license:"",components:[]},d0={};if(w.existsSync(r)){let W=JSON.parse(w.readFileSync(r,"utf-8"));J.license=W.license}var Q0=(W)=>{if(W.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
|
|
74
|
+
`),process.exit(1)},B1=new l1().name("example").description("add an example to the project").argument("[example]","the example to add").option("-o, --overwrite","overwrite existing files.",!1).option("-p, --path <path>","the path to add the component to.").option("-e, --example-path <example-path>","the path to add the example file to.").action(async(W,Q)=>{if(W)J.example=W;if(Q)J.path=Q.path,J.overwrite=Q.overwrite,J.examplePath=Q.examplePath,J.license=Q.license||J.license;try{await O0(Q,d0),await r1(J)}catch(z){console.error(M.red(z))}});async function r1(W){let Q=q0().start(),z=G.posix.join(process.cwd(),d0?.projectPath||"");if(!w.existsSync(G.posix.join(G.resolve(z,"package.json"))))Q.warn("This command should be run in a project directory."),process.exit(1);let $=await p(z);if(J.license){if(!await X0(J.license))Q.fail("Invalid license key"),process.exit(1);if(!w.existsSync(r)){let U=G.dirname(r);w.mkdirSync(U,{recursive:!0}),w.writeFileSync(r,JSON.stringify({license:J.license},null,2))}if(JSON.parse(w.readFileSync(r,"utf-8")).license!==J.license)w.writeFileSync(r,JSON.stringify({license:J.license},null,2),"utf-8")}if(Q.stop(),!J.example){let Y=await n({type:"select",name:"example",onState:Q0,message:"Select which type of example you want to add",choices:[{title:"Application",value:"application"},{title:"Marketing",value:"marketing"}]});J.example=Y.example}let q=null;if(J.example){let Y=await H0(J.example,J.license);if(Y?.type==="error"&&(Y.status===401||Y.status===403))console.log(),console.log(M.yellow(`\uD83D\uDD12 The ${M.cyan(J.example)} example requires PRO access.`)),console.log(),console.log("To access PRO examples:"),console.log(` ${M.green("→")} If you've already purchased: ${M.cyan(`${e()} untitledui@latest login`)}`),console.log(` ${M.green("→")} To purchase PRO examples: ${M.cyan("https://www.untitledui.com/buy/react")}`),console.log(),process.exit(1);if(Y?.type==="directory"){let B=await n({type:"select",name:"example",onState:Q0,message:`Select a folder or file in "${J.example}"`,choices:Y.results.map((U)=>({title:U,value:U}))});if(!B.example)return;if(J.example=B.example,Y=await H0(B.example,J.license),Y?.type==="error"&&(Y.status===401||Y.status===403))console.log(),console.log(M.yellow(`\uD83D\uDD12 The ${M.cyan(B.example)} example requires PRO access.`)),console.log(),console.log("To access PRO examples:"),console.log(` ${M.green("→")} If you've already purchased: ${M.cyan(`${e()} untitledui@latest login`)}`),console.log(` ${M.green("→")} To purchase PRO examples: ${M.cyan("https://www.untitledui.com/buy/react")}`),console.log(),process.exit(1)}if(Y?.type==="json-files"){let B=await n({type:"select",name:"example",onState:Q0,message:`Select which example you want to add from "${J.example}"`,choices:Y.results.map((U)=>({title:U,value:`${J.example}/${U}`}))});if(!B.example)return;if(J.example=B.example,Y=await H0(B.example,J.license),Y?.type==="error"&&(Y.status===401||Y.status===403))console.log(),console.log(M.yellow(`\uD83D\uDD12 The ${M.cyan(B.example)} example requires PRO access.`)),console.log(),console.log("To access PRO examples:"),console.log(` ${M.green("→")} If you've already purchased: ${M.cyan(`${e()} untitledui@latest login`)}`),console.log(` ${M.green("→")} To purchase PRO examples: ${M.cyan("https://www.untitledui.com/buy/react")}`),console.log(),process.exit(1)}if(Y?.type==="json-file")q=Y.content}if(!q)Q.fail("No example found"),process.exit(1);if(!J?.examplePath){let Y=$?.isUsingAppDir?"app":"pages",B=$?.isSrcDir?G.posix.join("src",Y):Y,U=await n({type:"text",name:"examplePath",onState:Q0,message:`Where would you like to add the ${M.cyan(J?.example)} example?`,initial:B});J.examplePath=U.examplePath}else if(!w.existsSync(G.posix.join(z,J.examplePath)))w.mkdirSync(G.posix.join(z,J.examplePath),{recursive:!0}),console.log(M.green(`Created directory ${J.examplePath}`));if(!J?.path){let Y=await n({type:"text",name:"path",onState:Q0,message:`Where would you like to add the ${M.cyan("components")}?`,initial:"components"});J.path=Y.path}let L=q.components.filter((Y)=>!w.existsSync(G.posix.join(z,`${$?.isSrcDir?"src":""}`,Y?.path?.replace(/components\//,J.path+"/"))));if(L?.length){let Y=await n({type:"multiselect",name:"components",onState:Q0,message:`Select which components you want to add from ${M.cyan(q.name)} example`,choices:L.map((B)=>({title:B?.name,value:B?.name,selected:!0})),instructions:!1,hint:"- Space to select. Return to submit"});if(J.components=Y.components,!L.length&&!Y.components?.length)Q.warn("No components selected")}let H=o(z),V=new Set,E=new s1({tsConfigFilePath:H?.tsConfig}),T=q0(`Adding ${J?.example}...`).start(),R="";try{if(q.files?.forEach(async({path:Y,code:B})=>{let U=G.posix.join(z,`${$?.isSrcDir?"src":""}`,Y.replace(/components\//,J.path+"/")),S=$?.framework==="vite"?B.replace(`"use client";
|
|
75
75
|
|
|
76
|
-
`,""):
|
|
77
|
-
Failed to add the component ${M.red(
|
|
78
|
-
Following files already exist in the directory.`),V.forEach((
|
|
79
|
-
\uD83C\uDF89 Example ${M.green(
|
|
80
|
-
\uD83C\uDF89 Example ${M.green(
|
|
76
|
+
`,""):B,b=U0(S);if(Y.includes("examples")){let I=G.basename(Y);U=G.posix.join(z,J?.examplePath??"",I),R=G.posix.join(J?.examplePath??"",I)}let x=G.dirname(U);if(w.existsSync(U)&&!J.overwrite){if(w.readFileSync(U,"utf-8")!==b)V.add({code:b,path:U})}else{w.mkdirSync(x,{recursive:!0}),w.writeFileSync(U,b);let I=G.relative(G.posix.join(z,`${$?.isSrcDir?"src":""}`),U).split("/").length,O=I===1?"./":"../".repeat(I-1),u=E.addSourceFileAtPath(G.resolve(U));u.getImportDeclarations().forEach((y)=>{let k=y.getModuleSpecifierValue();y.setModuleSpecifier(t(k,J.path,$?.aliasPrefix,O))}),await u.save()}}),V.size)T.warn(`Some files of ${M.yellow(J?.example)} already exist`);else T.succeed(`${M.green(J?.example)} is added successfully`)}catch(Y){T.fail(`
|
|
77
|
+
Failed to add the component ${M.red(J?.example)}`),console.error(M.red(Y)),process.exit(1)}if(V.size&&!J?.overwrite)if(console.log(`
|
|
78
|
+
Following files already exist in the directory.`),V.forEach((B)=>{console.log(M.green(`- ${G.relative(z,B.path)}`))}),(await n({type:"confirm",name:"overwrite",message:"Do you want to overwrite the existing files?",initial:!0})).overwrite){let B=q0("Overwriting files").start();V.forEach((U)=>{let S=G.relative(G.resolve(z,`${$?.isSrcDir?"src":""}`,J.path),U.path).split("/").length,b=S===1?"./":"../".repeat(S-1),x=E.addSourceFileAtPath(G.resolve(U.path));x.replaceWithText(U.code),x.getImportDeclarations().forEach((I)=>{let O=I.getModuleSpecifierValue();I.setModuleSpecifier(t(O,J.path,$?.aliasPrefix,b))}),x.saveSync()}),B.succeed("Files are overwritten")}else console.log(`Use ${M.cyan("--overwrite")} or ${M.cyan("-o")} to overwrite existing files, or refer to the documentation ${M.cyan("https://www.untitled.com/docs")} for manual installation. The rest of the files are added.`),process.exit(1);let Z=C();if(q?.dependencies?.length){let Y=q0("Installing example dependencies").start();await g0(()=>u0(Z,[Z==="npm"?"install":"add",...q.dependencies],{cwd:z}).catch(async(B)=>{if(B.message.includes("peer"))Y.warn("Dependency conflict detected. Retrying with --legacy-peer-deps..."),Y.start("Installing dependencies with --legacy-peer-deps flag"),await u0(Z,[Z==="npm"?"install":"add",...q.dependencies,"--legacy-peer-deps"],{cwd:z})}),{retries:1}),Y.succeed("Example dependencies are installed")}if(q?.devDependencies?.length){let Y=q0("Installing example devDependencies").start();await g0(()=>u0(Z,[Z==="npm"?"install":"add","-D",...q.devDependencies],{cwd:z}).catch(async(B)=>{if(B.message.includes("peer"))Y.warn("DevDependency conflict detected. Retrying with --legacy-peer-deps..."),Y.start("Installing devDependencies with --legacy-peer-deps flag"),await u0(Z,[Z==="npm"?"install":"add","-D",...q.devDependencies,"--legacy-peer-deps"],{cwd:z})}),{retries:1}),Y.succeed("Example devDependencies are installed")}if(J?.components?.length)await g0(()=>y0({components:J.components,dir:d0?.projectPath||"",path:J.path,message:`
|
|
79
|
+
\uD83C\uDF89 Example ${M.green(J.example)} has been added to ${M.green(R)}`}),{retries:1});console.log(`
|
|
80
|
+
\uD83C\uDF89 Example ${M.green(J.example)} has been added to ${M.green(R)}`),process.exit(0)}var h0={name:"untitledui",version:"0.1.41",main:"dist/index.mjs",description:"The Untitled UI CLI tool helps you quickly scaffold projects with Untitled UI React and add components and page examples to your existing projects with an interactive interface in seconds.",type:"module",publishConfig:{access:"public"},scripts:{test:'echo "Error: no test specified" && exit 1',dev:"bun build --entrypoints ./index.ts --entry-naming=[name].mjs --outdir=dist --target=node --minify --packages=external --env=inline --define=process.env.API_URL=http://localhost:3000/react/api --watch",build:"bun build --entrypoints ./index.ts --entry-naming=[name].mjs --outdir=dist --target=node --minify --packages=external --env=inline --define=process.env.API_URL=https://www.untitledui.com/react/api","publish:npm":"bun run build && npm publish --access public",start:"node dist/index.mjs"},bugs:{url:"https://github.com/untitleduico/react/issues"},homepage:"https://github.com/untitleduico/react#readme",keywords:["untitledui","untitled-ui","untitledui","untitledui-cli","untitledui-react","untitledui-components","untitledui-examples","untitledui-vite","untitledui-nextjs","cli","tailwindcss","nextjs","react","components","examples","vite"],files:["dist","config","templates","README.md"],author:{name:"Untitled UI",url:"https://www.untitledui.com/react"},contributors:[{name:"Dilshod Turobov",url:"https://x.com/deebovv"},{name:"Jordan Hughes",url:"https://x.com/jordanphughes"}],license:"MIT",bin:{untitledui:"dist/index.mjs"},exports:"./dist/index.mjs",dependencies:{"async-retry":"^1.3.3",chalk:"^5.4.1",commander:"^13.1.0",execa:"^7.0.0","fast-glob":"^3.3.3","node-fetch":"^3.3.2",open:"^10.1.0",ora:"^8.2.0",prettier:"^3.5.3",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","@types/tar":"^6.1.13","type-fest":"^4.37.0",typescript:"^5.8.2"}};process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function o1(){let W=new p1().name(h0.name).version(h0.version);W.addCommand(X1).addCommand(t0).addCommand(B1).addCommand(Q1),W.parse()}o1();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "untitledui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"main": "dist/index.mjs",
|
|
5
5
|
"description": "The Untitled UI CLI tool helps you quickly scaffold projects with Untitled UI React and add components and page examples to your existing projects with an interactive interface in seconds.",
|
|
6
6
|
"type": "module",
|