untitledui 0.1.46 → 0.1.49

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{Command as W1}from"commander";import W3 from"async-retry";import N from"chalk";import{Command as E3}from"commander";import{execa as M0}from"execa";import*as x from"fs";import X0 from"ora";import T3 from"os";import*as F from"path";import r from"prompts";import{Project as w3}from"ts-morph";import m0 from"node-fetch";import{Readable as b3,pipeline as M3}from"stream";import{x as H3}from"tar";import{promisify as v3}from"util";var G3=v3(M3);async function l0(z,Q){try{let Y=await j3(Q);await G3(Y,H3({cwd:z,strip:1}))}catch(Y){throw new Error(`Failed to download or extract repository from API: ${Y instanceof Error?Y.message:Y}`)}}async function j3(z){let Q=`https://www.untitledui.com/react/api/download-repo?template=${z.template}`;try{let Y=await m0(Q,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}});if(Y.status===403||Y.status===404)throw new Error("Repository not found");if(!Y.ok)throw new Error(`Failed to download from API. Status: ${Y.status} ${Y.statusText}`);if(!Y.body)throw new Error("Response body is empty");return b3.from(Y.body)}catch(Y){throw new Error(`Error downloading tarball: ${Y instanceof Error?Y.message:Y}`)}}async function J0(z){let Q=`https://www.untitledui.com/react/api/validate-key?key=${z}`;try{return(await m0(Q)).status===200}catch{return!1}}import u3 from"node-fetch";var c0={invalid_key:"Invalid key provided",no_components_found:"No components found",no_components_provided:"No components provided"};async function V0(z,Q,Y){let B=Q.map((q)=>{if(q.includes("modals/"))if(q.includes("-modal"))return q;else return q+"-modal";return q});try{let q=await u3("https://www.untitledui.com/react/api/components",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({type:z,components:B,key:Y})});if(!q.ok)console.log(c0?.[q.statusText]||c0.no_components_found),process.exit(1);return await q.json()}catch(q){return null}}import R0 from"node-fetch";var z0={invalid_key:"Invalid key provided",no_components_found:"No components found",no_components_provided:"No components provided"};async function a0(z,Q=""){let Y=`https://www.untitledui.com/react/api/components/list?key=${Q}&type=${z}`;try{let Z=await R0(Y),B=await Z.json();if(!Z.ok)console.log(z0?.[Z.statusText]||z0.no_components_found),process.exit(1);if(!B?.components?.length)return null;return B}catch(Z){return console.error(Z),null}}async function s0(z,Q="",Y){let Z=`https://www.untitledui.com/react/api/components/list?key=${Q}&type=${z}&subfolders=${Y.join(",")}`;try{let B=await R0(Z);if(!B.ok)console.log(z0?.[B.statusText]||z0.no_components_found),process.exit(1);let q=await B.json();if(!q?.components?.length)return null;return q}catch(B){return console.error(B),null}}async function r0(z=""){let Q=`https://www.untitledui.com/react/api/components/list?key=${z}`;try{let Y=await R0(Q);if(!Y.ok)console.log(z0?.[Y.statusText]||z0.no_components_found),process.exit(1);let Z=await Y.json();if(!Z?.types?.length)return null;return Z}catch(Y){return console.error(Y),null}}import N0 from"fast-glob";import*as L0 from"fs";import*as l from"path";import{Project as D3}from"ts-morph";import{loadConfig as o0}from"tsconfig-paths";import I3 from"prettier";async function i0(z,Q="typescript"){try{return await I3.format(z,{parser:Q,printWidth:160,tabWidth:4})}catch(Y){return console.error("Error formatting with Prettier:",Y),z}}import m from"fast-glob";import*as h from"fs";import*as a from"path";import{loadConfig as A0}from"tsconfig-paths";import n0 from"fs";import y3 from"path";function p0(z=""){let Q=y3.join(z,"package.json");if(!n0.existsSync(Q))return null;else return JSON.parse(n0.readFileSync(Q,"utf-8"))}var P=["**/node_modules/**",".next","public","dist","build"],t0={"next-app":"Next.js (App)","next-pages":"Next.js (Pages)",vite:"Vite",other:"Other"};async function s(z){let Q=h.existsSync(a.resolve(z,"src")),Y=h.existsSync(a.resolve(z,`${Q?"src/":""}app`)),[Z,B,q,J,G]=await Promise.all([m.glob("**/{next,vite,astro}.config.*|gatsby-config.*",{cwd:z,deep:2,ignore:P}),R3(z),A3(z),N3(z),p0(z)]),K=h.existsSync(a.resolve(z,"components.json")),M=null;if(K)M=JSON.parse(h.readFileSync(a.resolve(z,"components.json"),"utf-8"));let b=m.sync(["**/**/theme.css"],{cwd:z,absolute:!0,onlyFiles:!0,ignore:P}),H=b?.[0]&&h.readFileSync(b[0],"utf-8").match(/(--color-brand+-\d{1,3}):\s*(rgb\([^)]+\))/g)?.[1]||void 0,V={tailwind:{config:q||void 0,brandColor:H?.replace(/--color-([^-]+(?:-[^-]+)?)-\d+:.*/,"$1")||void 0},examples:M?.examples||void 0,aliases:M?.aliases||J||{},isTsx:B,isSrcDir:Q,isAppDir:Y,framework:"other"};if(Z.find((W)=>W.startsWith("next.config."))?.length)return V.framework=Y?"next-app":"next-pages",V;else if(Z.find((W)=>W.startsWith("vite.config."))?.length)return V.framework="vite",V;else if(Object.keys(G?.dependencies||{}).includes("react"))return V.framework="next-pages",V;else if(Z?.length||h.existsSync(a.resolve(z,"package.json")))return V.framework="other",V;return null}async function R3(z){return(await m.glob("tsconfig.*",{cwd:z,deep:2,ignore:P})).length>0}async function A3(z){let Q=await m.glob("tailwind.config.*",{cwd:z,deep:2,ignore:P});if(!Q.length)return null;return Q[0]}async function N3(z){let[Q,Y]=await Promise.all([m.glob("next.config.*",{cwd:z,deep:1,ignore:P}),m.glob("vite.config.*",{cwd:z,deep:1,ignore:P})]),Z=Q.length>0,B=Y.length>0,q;if(Z)q=A0(z);else if(B){if(q=A0(z),q?.resultType==="failed"||!Object.keys(q.paths||{}).length){let K=await m.glob(["tsconfig.app.*","*/tsconfig.app.*"],{cwd:z,deep:1,onlyFiles:!0,absolute:!0,ignore:P}),[M]=K;if(M)try{let H=function($){return $.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/,(\s*[}\]])/g,"$1")},b=h.readFileSync(M,"utf-8"),V=H(b),W=JSON.parse(V);if(W.compilerOptions?.paths)q={resultType:"success",paths:W?.compilerOptions?.paths,baseUrl:W.compilerOptions.baseUrl||".",absoluteBaseUrl:a.resolve(z,W.compilerOptions.baseUrl||".")}}catch{}}}else q=A0(z);if(q?.resultType==="failed"||!Object.keys(q.paths).length)return null;let J={},G={app:/\/?app\/\*$/,components:/\/?components\/\*$/,utils:/\/?utils\/\*$/,styles:/\/?styles\/\*$/,hooks:/\/?hooks\/\*$/,src:/^(\.\/src\/\*|\.\/\*|\/src\/\*|src\/\*|\/\*|\*)$/};for(let[K,M]of Object.entries(q.paths)){let b=K.replace(/\/\*$/,"/");for(let[H,V]of Object.entries(G))if(M.some((W)=>V.test(W))){J[H]=b;break}}return J||null}function Q0(z,Q){let Y=o0(z),Z=N0.sync(["tailwind.config.*","**/globals.css","package.json"],{cwd:z,deep:4,absolute:!0,onlyFiles:!0,ignore:P}),B=N0.sync("**/{layout,_app,main}.tsx",{cwd:Q?l.posix.join(z,Q):z,deep:4,absolute:!0,onlyFiles:!0,ignore:P}),q={tailwindFile:Z.find((J)=>J.includes("tailwind.config.")),cssFile:Z.find((J)=>J.includes("globals.css")),packageJson:Z.find((J)=>J.includes("package.json")),tsConfig:Y?.resultType==="success"?Y?.configFileAbsolutePath:void 0,layoutFile:B.find((J)=>J.includes("layout")),appFile:B.find((J)=>J.includes("_app")),mainFile:B.find((J)=>J.includes("main"))};if(Y.resultType==="failed")throw new Error(`Failed to load tsconfig.json. ${Y.message??""}`.trim());return q}function W0(z,Q,Y={}){if(z.includes("components")&&Y?.components)return z.replace(/@\/components\//,l.posix.join(Y?.components||"",Q?Q.replace(/components\/?/,""):"","/"));if(z.includes("app")&&Y?.app)return z.replace(/^@\/app\//,l.posix.join(Y?.app,"/"));if(z.includes("utils")&&Y?.utils)return z.replace(/^@\/utils\//,l.posix.join(Y?.utils,"/"));if(z.includes("hooks")&&Y?.hooks)return z.replace(/^@\/hooks\//,l.posix.join(Y?.hooks,"/"));if(z.includes("styles")&&Y?.styles)return z.replace(/^@\/styles\//,l.posix.join(Y?.styles,"/"));if(Y?.src)return z.replace(/^@\//,l.posix.join(Y?.src,"/"));return z}async function e0(z,Q,Y="@/*"){let Z=await o0(z);if(Z?.resultType==="failed")return null;let B={};if(!Object.keys(Z.paths).length){Z.paths={[Y]:[`./${Q?"src/":""}*`]},B.src=Y.replace(/\/\*$/,"");let q=await L0.promises.readFile(Z.configFileAbsolutePath,"utf-8"),J,G=/(?:\/\/\s*)?"paths":\s*\{(?:[^{}]|\{[^}]*\})*\}/;if(!G.test(q))J=q.replace(/"compilerOptions":\s*{/,`"compilerOptions": {
3
- "paths": ${JSON.stringify(Z.paths)},`);else J=q.replace(G,`"paths": ${JSON.stringify(Z.paths)}`);let M=new D3,b=await i0(J,"json");return M.createSourceFile(Z.configFileAbsolutePath,b,{overwrite:!0}),await M.save(),B}return B||null}function z3(z){let Q=N0.sync(["vite.config.*"],{cwd:z,absolute:!0,onlyFiles:!0,ignore:P})?.[0];if(!Q)return!1;try{let Y=L0.readFileSync(Q,"utf-8");return _3(Y)}catch{return!1}}function _3(z){let Q=z.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 S(){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 Y0(){switch(S()){case"yarn":return"yarn";case"pnpm":return"pnpx";case"bun":return"bunx";default:return"npx"}}function Q3(){switch(S()){case"yarn":return"yarn dev";case"pnpm":return"pnpm dev";case"bun":return"bun dev";default:return"npm run dev"}}function b0(z){return z.replace(/^[ \t]*\/\/\s*(TODO:|collapse-(start|end)).*\r?\n?|[ \t]*{\s*\/\*\s*(TODO:|collapse-(start|end)).*?\*\/\s*}\r?\n?/gm,"")}var S3=F.join(T3.homedir(),".untitledui"),i=F.join(S3,"config.json"),X={components:[],path:"",type:void 0,license:""};if(x.existsSync(i)){let z=JSON.parse(x.readFileSync(i,"utf-8"));X.license=z.license}var Z0=(z)=>{if(z.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
3
+ "paths": ${JSON.stringify(Z.paths)},`);else J=q.replace(G,`"paths": ${JSON.stringify(Z.paths)}`);let M=new D3,b=await i0(J,"json");return M.createSourceFile(Z.configFileAbsolutePath,b,{overwrite:!0}),await M.save(),B}return B||null}function z3(z){let Q=N0.sync(["vite.config.*"],{cwd:z,absolute:!0,onlyFiles:!0,ignore:P})?.[0];if(!Q)return!1;try{let Y=L0.readFileSync(Q,"utf-8");return _3(Y)}catch{return!1}}function _3(z){let Q=z.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 S(){if("bun/1.2.20 npm/? node/v24.3.0 darwin arm64".startsWith("yarn"))return"yarn";if("bun/1.2.20 npm/? node/v24.3.0 darwin arm64".startsWith("pnpm"))return"pnpm";if("bun/1.2.20 npm/? node/v24.3.0 darwin arm64".startsWith("bun"))return"bun";return"npm"}function Y0(){switch(S()){case"yarn":return"yarn";case"pnpm":return"pnpx";case"bun":return"bunx";default:return"npx"}}function Q3(){switch(S()){case"yarn":return"yarn dev";case"pnpm":return"pnpm dev";case"bun":return"bun dev";default:return"npm run dev"}}function b0(z){return z.replace(/^[ \t]*\/\/\s*(TODO:|collapse-(start|end)).*\r?\n?|[ \t]*{\s*\/\*\s*(TODO:|collapse-(start|end)).*?\*\/\s*}\r?\n?/gm,"")}var S3=F.join(T3.homedir(),".untitledui"),i=F.join(S3,"config.json"),X={components:[],path:"",type:void 0,license:""};if(x.existsSync(i)){let z=JSON.parse(x.readFileSync(i,"utf-8"));X.license=z.license}var Z0=(z)=>{if(z.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
4
4
  `),process.exit(1)},Y3=new E3().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(z,Q)=>{if(z)X.components=z;if(Q)X.all=Q.all,X.dir=Q.dir,X.path=Q.path,X.overwrite=Q.overwrite,X.license=Q.license||X.license;try{await D0(X)}catch(Y){console.error(N.red(Y))}});async function D0(z){if(z)X={...X,...z};let Q=X0().start(),Y=F.posix.join(process.cwd(),X.dir||"");if(!x.existsSync(F.resolve(Y,"package.json")))Q.warn("This command should be run in a project directory."),process.exit(1);let B=await s(Y);if(X.license){if(!await J0(X.license))Q.fail("Invalid license key"),process.exit(1);if(!x.existsSync(i)){let L=F.dirname(i);x.mkdirSync(L,{recursive:!0}),x.writeFileSync(i,JSON.stringify({license:X.license},null,2))}if(JSON.parse(x.readFileSync(i,"utf-8")).license!==X.license)x.writeFileSync(i,JSON.stringify({license:X.license},null,2),"utf-8")}Q.stop();let q=[];if(X.components.length){let W=await V0(X.type,X.components,X.license);if(W&&W.pro&&W.pro.length>0){if(console.log(),W.pro.length===1){let $=W.pro[0]?.split("/")[1]||W.pro[0];console.log(N.yellow(`\uD83D\uDD12 The ${N.cyan($)} component requires PRO access.`))}else console.log(N.yellow("\uD83D\uDD12 The following components require PRO access:")),W.pro.forEach(($)=>{let L=$?.split("/")[1]||$;console.log(` • ${N.cyan(L)}`)});console.log(),console.log("To access PRO components:"),console.log(` ${N.green("→")} If you've already purchased: ${N.cyan(`${Y0()} 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(!W?.components.length)console.log("No components found"),process.exit(1);q.push(...W.components)}if(!X?.type&&!X?.components.length){let W=await r0(X.license);if(!W)console.log("No component types found"),process.exit(1);let $=await r({type:"select",name:"type",onState:Z0,message:`What type of ${N.cyan("component")} are you adding?`,choices:W?.types.map((L)=>({title:L,value:L}))});X.type=$.type}if(!X?.path){let W=await r({type:"text",name:"path",onState:Z0,message:`Where would you like to add the ${N.cyan("components")}?`,initial:"components"});X.path=W.path}if(B&&!Object.keys(B?.aliases).length){let W=/^[^*"]+\/\*\s*$/,$=await r({type:"text",name:"aliasPrefix",onState:Z0,initial:"@/*",message:`What is the ${N.cyan("import alias")} for your project?`,validate:(L)=>W.test(L)?!0:"Import alias must follow the pattern <prefix>/*"});B.aliases=await e0(Y,B?.isSrcDir,$?.aliasPrefix)}if(!X?.components.length){let W=await a0(X?.type,X.license);if(!W)console.log("No components found"),process.exit(1);let $=await r({type:"multiselect",name:"components",onState:Z0,message:`Which ${N.cyan("components")} would you like to add?`,choices:W?.components?.map((j)=>({title:j?.name+(j?.count?` (${j?.count} variants)`:"")||"example",value:j||"example",selected:X.components.includes(j.name)})),instructions:!1,hint:"- Space to select. Return to submit"});if(!$.components||!$.components.length)console.log("No option selected. Exiting..."),process.exit(1);let L=$.components.filter((j)=>j?.type==="file").map((j)=>j.name),R=$.components.filter((j)=>j?.type==="dir").map((j)=>j.name),E=[];if(R.length){let j=await s0(X?.type,X.license,R);if(j&&j.components.length)for(let O of j.components){let[A,T]=Object.entries(O)[0]||[],k=await r({type:"select",name:"component",onState:Z0,message:`Which ${N.cyan("variant")} from ${N.cyan(A)} would you like to add?`,choices:T?.map((C)=>({title:C?.name.replace(/-modal/g,"")||"example",value:C?.name||"example",selected:X.components.includes(C.name)})),instructions:!1,hint:"- Space to select. Return to submit"});if(!k.component)console.log("No variant selected for "+N.cyan(A));E.push(A+"/"+k.component)}else console.log("No variants found")}X.components=[...E,...L]}if(!X.components?.length)Q.warn("No components selected. Exiting."),process.exit(1);let J=Q0(Y),G=new Set,K=new Set,M=new Set,b=new w3({tsConfigFilePath:J?.tsConfig});if(Q.start(),X.type&&X.components.length){let W=await V0(X.type,X.components,X.license);if(!W?.components.length)console.log("No components found"),process.exit(1);q.push(...W.components)}let H=new Set;if(q.forEach((W)=>{W?.components?.forEach(($)=>{H.add({name:$.name,path:$.path})})}),Q.stop(),H.size){let W=Array.from(H).filter(($)=>!x.existsSync(F.posix.join(Y,`${B?.isSrcDir?"src":""}`,$?.path?.replace(/components\//,X.path+"/"))));if(W?.length){let $=await r({type:"multiselect",name:"baseComponents",onState:Z0,message:"Select which base components you want to add",choices:W.map((L)=>({title:L?.name,value:L?.name,selected:!0})),instructions:!1,hint:"- Space to select. Return to submit"});if(X.baseComponents=$.baseComponents,!W.length&&!$.baseComponents?.length)Q.warn("No components selected")}}if(Q.start(),X?.baseComponents?.length){let W=await V0("",X.baseComponents,X.license);if(!W||!W?.components.length)console.log("No base components found");else q.push(...W.components)}if(Q.stop(),q.forEach((W)=>{let $=X0(`Adding ${W.name}...`).start(),L=W.files;W?.dependencies?.forEach((R)=>K.add(R)),W?.devDependencies?.forEach((R)=>M.add(R));try{if(L?.forEach(async({path:R,code:E})=>{let j=F.posix.join(Y,`${B?.isSrcDir?"src":""}`,R.replace(/components\//,X.path+"/")),O=B?.framework==="vite"?E.replace(`"use client";
5
5
 
6
6
  `,""):E,A=b0(O),T=F.dirname(j);if(x.existsSync(j)&&!X.overwrite){if(x.readFileSync(j,"utf-8")!==A)G.add({code:A,path:j})}else{x.mkdirSync(T,{recursive:!0}),x.writeFileSync(j,A);let k=b.addSourceFileAtPath(F.resolve(j));k.getImportDeclarations().forEach((C)=>{let f=C.getModuleSpecifierValue();C.setModuleSpecifier(W0(f,X.path,B?.aliases))}),await k.save()}}),G.size)$.warn(`Some files of ${N.yellow(W.name)} already exist`);else $.succeed(`${N.green(W.name)} is added successfully`)}catch(R){$.fail(`
@@ -78,4 +78,4 @@ Your project is ready, you can now start adding components.`)}}var e3=y.join(t3.
78
78
  Failed to add the component ${v.red(U?.example)}`),console.error(v.red(W)),process.exit(1)}if(K.size&&!U?.overwrite)if(console.log(`
79
79
  Following files already exist in the directory.`),K.forEach(($)=>{console.log(v.green(`- ${y.relative(Q,$.path)}`))}),(await o({type:"confirm",name:"overwrite",message:"Do you want to overwrite the existing files?",initial:!0})).overwrite){let $=K0("Overwriting files").start();K.forEach((L)=>{let R=M.addSourceFileAtPath(y.resolve(L.path));R.replaceWithText(L.code),R.getImportDeclarations().forEach((E)=>{let j=E.getModuleSpecifierValue();E.setModuleSpecifier(W0(j,U.path,Z?.aliases))}),R.saveSync()}),$.succeed("Files are overwritten")}else console.log(`Use ${v.cyan("--overwrite")} or ${v.cyan("-o")} to overwrite existing files, or refer to the documentation ${v.cyan("https://www.untitled.com/docs")} for manual installation. The rest of the files are added.`);let V=S();if(B?.dependencies?.length){let W=K0("Installing example dependencies").start();await h0(()=>y0(V,[V==="npm"?"install":"add",...B.dependencies],{cwd:Q}).catch(async($)=>{if($.message.includes("peer"))W.warn("Dependency conflict detected. Retrying with --legacy-peer-deps..."),W.start("Installing dependencies with --legacy-peer-deps flag"),await y0(V,[V==="npm"?"install":"add",...B.dependencies,"--legacy-peer-deps"],{cwd:Q})}),{retries:1}),W.succeed("Example dependencies are installed")}if(B?.devDependencies?.length){let W=K0("Installing example devDependencies").start();await h0(()=>y0(V,[V==="npm"?"install":"add","-D",...B.devDependencies],{cwd:Q}).catch(async($)=>{if($.message.includes("peer"))W.warn("DevDependency conflict detected. Retrying with --legacy-peer-deps..."),W.start("Installing devDependencies with --legacy-peer-deps flag"),await y0(V,[V==="npm"?"install":"add","-D",...B.devDependencies,"--legacy-peer-deps"],{cwd:Q})}),{retries:1}),W.succeed("Example devDependencies are installed")}if(U?.components?.length)await h0(()=>D0({components:U.components,dir:d0?.projectPath||"",path:U.path,message:`
80
80
  \uD83C\uDF89 Example ${v.green(U.example)} has been added to ${v.green(H)}`}),{retries:1});console.log(`
81
- \uD83C\uDF89 Example ${v.green(U.example)} has been added to ${v.green(H)}`),process.exit(0)}var f0={name:"untitledui",version:"0.1.46",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 Y1(){let z=new W1().name(f0.name).version(f0.version);z.addCommand(V3).addCommand(Y3).addCommand(L3).addCommand(q3),z.parse()}Y1();
81
+ \uD83C\uDF89 Example ${v.green(U.example)} has been added to ${v.green(H)}`),process.exit(0)}var f0={name:"untitledui",version:"0.1.45",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 Y1(){let z=new W1().name(f0.name).version(f0.version);z.addCommand(V3).addCommand(Y3).addCommand(L3).addCommand(q3),z.parse()}Y1();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "untitledui",
3
- "version": "0.1.46",
3
+ "version": "0.1.49",
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",