untitledui 0.1.26 → 0.1.28

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/README.md CHANGED
@@ -154,20 +154,6 @@ This command will open a browser window for you to authenticate with your Untitl
154
154
 
155
155
  The Untitled UI CLI is licensed under the [MIT License](LICENSE).
156
156
 
157
- ## Contributing
158
-
159
- Contributions are welcome! Please open an issue or submit a pull request on our [GitHub repository](https://github.com/untitleduico/cli.git).
160
-
161
157
  ## Bug Reports
162
158
 
163
- If you find a bug, please report it on our [issue tracker](https://github.com/untitleduico/cli/issues).
164
-
165
- ## Keywords
166
-
167
- - untitledui-cli
168
- - untitledui
169
- - cli
170
- - tailwindcss
171
- - nextjs
172
- - react
173
- - components
159
+ If you find a bug, please report it on our [issue tracker](https://github.com/untitleduico/react/issues).
@@ -47,10 +47,10 @@
47
47
 
48
48
  /* BREAKPOINTS */
49
49
  --breakpoint-xxs: 320px;
50
- /* This must match the breakpoint in sonner: https://github.com/emilkowalski/sonner/blob/main/src/styles.css */
50
+ /* This must match the breakpoint in Sonner: https://github.com/emilkowalski/sonner/blob/main/src/styles.css */
51
51
  --breakpoint-xs: 600px;
52
52
 
53
- /* RADUIS */
53
+ /* RADIUS */
54
54
  --radius-none: 0px;
55
55
  --radius-xs: 0.25rem;
56
56
  --radius-sm: 0.125rem;
@@ -790,12 +790,6 @@
790
790
  --color-screen-mockup-border: var(--color-gray-900);
791
791
  --color-slider-handle-bg: var(--color-white);
792
792
  --color-slider-handle-border: var(--color-brand-600);
793
- --color-social-icon-fg-angellist: var(--color-black);
794
- --color-social-icon-fg-apple: var(--color-black);
795
- --color-social-icon-fg-github: var(--color-black);
796
- --color-social-icon-fg-instagram: rgb(0 1 0 1);
797
- --color-social-icon-fg-tumblr: rgb(0 25 53 1);
798
- --color-social-icon-fg-x: rgb(36 46 54 1);
799
793
  --color-toggle-border: var(--color-gray-300);
800
794
  --color-toggle-button-fg_disabled: var(--color-gray-50);
801
795
  --color-toggle-slim-border_pressed-hover: var(--color-bg-brand-solid_hover);
@@ -1224,12 +1218,6 @@
1224
1218
  --color-screen-mockup-border: var(--color-gray-700);
1225
1219
  --color-slider-handle-bg: var(--color-fg-brand-primary);
1226
1220
  --color-slider-handle-border: var(--color-bg-primary);
1227
- --color-social-icon-fg-angellist: var(--color-white);
1228
- --color-social-icon-fg-apple: var(--color-white);
1229
- --color-social-icon-fg-github: var(--color-white);
1230
- --color-social-icon-fg-instagram: var(--color-white);
1231
- --color-social-icon-fg-tumblr: var(--color-white);
1232
- --color-social-icon-fg-x: var(--color-white);
1233
1221
  --color-toggle-border: var(--color-transparent);
1234
1222
  --color-toggle-button-fg_disabled: var(--color-gray-600);
1235
1223
  --color-toggle-slim-border_pressed-hover: var(--color-transparent);
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import{Command as n3}from"commander";import r0 from"async-retry";import N from"chalk";import{Command as G3}from"commander";import{execa as K0}from"execa";import*as F from"fs";import Z0 from"ora";import v3 from"os";import*as D from"path";import $0 from"prompts";import{Project as R3}from"ts-morph";import h0 from"node-fetch";import{Readable as q3,pipeline as X3}from"stream";import{x as b3}from"tar";import{promisify as B3}from"util";var U3=B3(X3);async function f0(Q,W){try{let z=await J3(W);await U3(z,b3({cwd:Q,strip:1}))}catch(z){throw new Error(`Failed to download or extract repository from API: ${z instanceof Error?z.message:z}`)}}async function J3(Q){let W=`https://www.untitledui.com/react/api/download-repo?template=${Q.template}`;try{let z=await h0(W,{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 q3.from(z.body)}catch(z){throw new Error(`Error downloading tarball: ${z instanceof Error?z.message:z}`)}}async function i(Q){let W=`https://www.untitledui.com/react/api/validate-key?key=${Q}`;try{return(await h0(W)).status===200}catch{return!1}}import K3 from"node-fetch";var m0={invalid_key:"Invalid key provided",no_components_found:"No components found",no_components_provided:"No components provided"};async function I0(Q,W,z){try{let Z=await K3("https://www.untitledui.com/react/api/components",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({type:Q,components:W,key:z})});if(!Z.ok)console.log(m0?.[Z.statusText]||m0.no_components_found),process.exit(1);return await Z.json()}catch(Z){return null}}import N0 from"node-fetch";var p={invalid_key:"Invalid key provided",no_components_found:"No components found",no_components_provided:"No components provided"};async function c0(Q,W=""){let z=`https://www.untitledui.com/react/api/components/list?key=${W}&type=${Q}`;try{let X=await N0(z),Z=await X.json();if(!X.ok)console.log(p?.[X.statusText]||p.no_components_found),process.exit(1);if(!Z?.components?.length)return null;return Z}catch(X){return console.error(X),null}}async function l0(Q,W="",z){let X=`https://www.untitledui.com/react/api/components/list?key=${W}&type=${Q}&subfolders=${z.join(",")}`;try{let Z=await N0(X);if(!Z.ok)console.log(p?.[Z.statusText]||p.no_components_found),process.exit(1);let U=await Z.json();if(!U?.components?.length)return null;return U}catch(Z){return console.error(Z),null}}async function a0(Q=""){let W=`https://www.untitledui.com/react/api/components/list?key=${Q}`;try{let z=await N0(W);if(!z.ok)console.log(p?.[z.statusText]||p.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 j3 from"fast-glob";import*as E0 from"path";import{Project as V1}from"ts-morph";import{loadConfig as u3}from"tsconfig-paths";import $1 from"prettier";import U0 from"fast-glob";import*as b0 from"fs";import*as B0 from"path";import{loadConfig as V3}from"tsconfig-paths";var h=["**/node_modules/**",".next","public","dist","build"],s0={"next-app":"Next.js (App)","next-pages":"Next.js (Pages)",vite:"Vite",other:"Other"};async function o(Q){let W=b0.existsSync(B0.resolve(Q,"src")),z=b0.existsSync(B0.resolve(Q,`${W?"src/":""}app`)),[X,Z,U,L]=await Promise.all([U0.glob("**/{next,vite,astro}.config.*|gatsby-config.*",{cwd:Q,deep:2,ignore:h}),L3(Q),M3(Q),H3(Q)]),H={framework:"other",isTsx:Z,tailwindFile:U||null,aliasPrefix:L,isSrcDir:W,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(B0.resolve(Q,"package.json")))return H.framework="other",H;return null}async function L3(Q){return(await U0.glob("tsconfig.*",{cwd:Q,deep:2,ignore:h})).length>0}async function M3(Q){let W=await U0.glob("tailwind.config.*",{cwd:Q,deep:2,ignore:h});if(!W.length)return null;return W[0]}async function H3(Q){let W=await V3(Q);if(W?.resultType==="failed"||!Object.keys(W.paths).length)return null;let z={};for(let[X,Z]of Object.entries(W.paths)){let U=X.replace(/\/\*$/,"/");if(Z.some((L)=>L.includes("/app/*")))z.appPrefix=U;else if(Z.some((L)=>L.includes("/components/*")))z.componentsPrefix=U;else if(Z.some((L)=>L.includes("/utils/*")))z.utilsPrefix=U;else if(Z.some((L)=>L.includes("/styles/*")))z.stylesPrefix=U;else if(Z.some((L)=>L.includes("./*")||L.includes("/src/*")))z.srcPrefix=U}return z||null}function t(Q){let W=u3(Q),z=j3.sync(["tailwind.config.*","**/globals.css","**/{layout,_app,main}.tsx","package.json"],{cwd:Q,deep:4,absolute:!0,onlyFiles:!0,ignore:h}),X={tailwindFile:z.find((Z)=>Z.includes("tailwind.config.")),cssFile:z.find((Z)=>Z.includes("globals.css")),layoutFile:z.find((Z)=>Z.includes("layout")),appFile:z.find((Z)=>Z.includes("_app")),mainFile:z.find((Z)=>Z.includes("main")),packageJson:z.find((Z)=>Z.includes("package.json")),tsConfig:W?.resultType==="success"?W?.configFileAbsolutePath:void 0};if(W.resultType==="failed")throw new Error(`Failed to load tsconfig.json. ${W.message??""}`.trim());return X}function e(Q,W,z={},X=""){if(Q.includes("components")){if(z?.componentsPrefix)return Q.replace(/@\/components\//,E0.posix.join(z?.componentsPrefix,W?W.replace(/components\//,""):"","/"));if(W){let Z=z?.srcPrefix?E0.posix.join(z?.srcPrefix,W,"/"):X;return Q.replace(/@\/components\//,Z)}}if(Q.includes("app")&&z?.appPrefix)return Q.replace(/^@\/app\//,z?.appPrefix);if(Q.includes("utils")&&z?.utilsPrefix)return Q.replace(/^@\/utils\//,z?.utilsPrefix);if(Q.includes("styles")&&z?.stylesPrefix)return Q.replace(/^@\/styles\//,z?.stylesPrefix);if(z?.srcPrefix)return Q.replace(/^@\//,z?.srcPrefix);return Q}function C(){if("bun/1.2.15 npm/? node/v22.6.0 darwin arm64".startsWith("yarn"))return"yarn";if("bun/1.2.15 npm/? node/v22.6.0 darwin arm64".startsWith("pnpm"))return"pnpm";if("bun/1.2.15 npm/? node/v22.6.0 darwin arm64".startsWith("bun"))return"bun";return"npm"}function z0(){switch(C()){case"yarn":return"yarn";case"pnpm":return"pnpx";case"bun":return"bunx";default:return"npx"}}function n0(){switch(C()){case"yarn":return"yarn dev";case"pnpm":return"pnpm dev";case"bun":return"bun dev";default:return"npm run dev"}}function J0(Q){return Q.replace(/^[ \t]*\/\/\s*(TODO:|collapse-(start|end)).*\r?\n?|[ \t]*{\s*\/\*\s*(TODO:|collapse-(start|end)).*?\*\/\s*}\r?\n?/gm,"")}var I3=D.join(v3.homedir(),".untitledui"),c=D.join(I3,"config.json"),B={components:[],path:"",type:void 0,license:""};if(F.existsSync(c)){let Q=JSON.parse(F.readFileSync(c,"utf-8"));B.license=Q.license}var V0=(Q)=>{if(Q.aborted)process.stdout.write("\x1B[?25h"),process.stdout.write(`
3
- `),process.exit(1)},i0=new G3().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(Q,W)=>{if(Q)B.components=Q;if(W)B.all=W.all,B.dir=W.dir,B.path=W.path,B.overwrite=W.overwrite,B.license=W.license||B.license;try{await A0(B)}catch(z){console.error(N.red(z))}});async function A0(Q){if(Q)B={...B,...Q};let W=Z0().start(),z=D.posix.join(process.cwd(),B.dir||"");if(!F.existsSync(D.resolve(z,"package.json")))W.warn("This command should be run in a project directory."),process.exit(1);let Z=await o(z);if(B.license){if(!await i(B.license))W.fail("Invalid license key"),process.exit(1);if(!F.existsSync(c)){let q=D.dirname(c);F.mkdirSync(q,{recursive:!0}),F.writeFileSync(c,JSON.stringify({license:B.license},null,2))}if(JSON.parse(F.readFileSync(c,"utf-8")).license!==B.license)F.writeFileSync(c,JSON.stringify({license:B.license},null,2),"utf-8")}W.stop();let U=[];if(B.components.length){let $=await I0(B.type,B.components,B.license);if($&&$.pro&&$.pro.length>0){if(console.log(),$.pro.length===1){let Y=$.pro[0]?.split("/")[1]||$.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:")),$.pro.forEach((Y)=>{let q=Y?.split("/")[1]||Y;console.log(` • ${N.cyan(q)}`)});console.log(),console.log("To access PRO components:"),console.log(` ${N.green("→")} If you've already purchased: ${N.cyan(`${z0()} untitledui@latest login`)}`),console.log(` ${N.green("→")} To purchase PRO components: ${N.cyan("https://www.untitledui.com/buy/react")}`),console.log()}if(!$?.components.length)console.log("No components found"),process.exit(1);U.push(...$.components)}if(!B?.type&&!B?.components.length){let $=await a0(B.license);if(!$)console.log("No component types found"),process.exit(1);let Y=await $0({type:"select",name:"type",onState:V0,message:`What type of ${N.cyan("component")} are you adding?`,choices:$?.types.map((q)=>({title:q,value:q}))});B.type=Y.type}if(!B?.path){let $=await $0({type:"text",name:"path",onState:V0,message:`Where would you like to add the ${N.cyan("components")}?`,initial:"components"});B.path=$.path}if(!B?.components.length){let $=await c0(B?.type,B.license);if(!$)console.log("No components found"),process.exit(1);let Y=await $0({type:"multiselect",name:"components",onState:V0,message:`Which ${N.cyan("components")} would you like to add?`,choices:$?.components?.map((K)=>({title:K?.name+(K?.count?` (${K?.count} variants)`:"")||"example",value:K||"example",selected:B.components.includes(K.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 q=Y.components.filter((K)=>K?.type==="file").map((K)=>K.name),J=Y.components.filter((K)=>K?.type==="dir").map((K)=>K.name),S=[];if(J.length){let K=await l0(B?.type,B.license,J);if(K&&K.components.length)for(let x of K.components){let[I,g]=Object.entries(x)[0]||[],R=await $0({type:"select",name:"component",onState:V0,message:`Which ${N.cyan("variant")} from ${N.cyan(I)} would you like to add?`,choices:g?.map((A)=>({title:A?.name||"example",value:A?.name||"example",selected:B.components.includes(A.name)})),instructions:!1,hint:"- Space to select. Return to submit"});if(!R.component)console.log("No variant selected for "+N.cyan(I));S.push(I+"/"+R.component)}else console.log("No variants found")}B.components=[...S,...q]}if(!B.components?.length)W.warn("No components selected. Exiting."),process.exit(1);let L=t(z),H=new Set,V=new Set,E=new Set,T=new R3({tsConfigFilePath:L?.tsConfig});if(B.type&&B.components.length){let $=await I0(B.type,B.components,B.license);if(!$?.components.length)console.log("No components found"),process.exit(1);U.push(...$.components)}if(U.forEach(($)=>{let Y=Z0(`Adding ${$.name}...`).start(),q=$.files;$.dependencies.forEach((J)=>V.add(J)),$.devDependencies.forEach((J)=>E.add(J));try{if(q?.forEach(async({path:J,code:S})=>{let K=D.posix.join(z,`${Z?.isSrcDir&&"src"}`,J.replace(/components\//,B.path+"/")),x=Z?.framework==="vite"?S.replace(`"use client";
3
+ `),process.exit(1)},i0=new G3().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(Q,W)=>{if(Q)B.components=Q;if(W)B.all=W.all,B.dir=W.dir,B.path=W.path,B.overwrite=W.overwrite,B.license=W.license||B.license;try{await A0(B)}catch(z){console.error(N.red(z))}});async function A0(Q){if(Q)B={...B,...Q};let W=Z0().start(),z=D.posix.join(process.cwd(),B.dir||"");if(!F.existsSync(D.resolve(z,"package.json")))W.warn("This command should be run in a project directory."),process.exit(1);let Z=await o(z);if(B.license){if(!await i(B.license))W.fail("Invalid license key"),process.exit(1);if(!F.existsSync(c)){let q=D.dirname(c);F.mkdirSync(q,{recursive:!0}),F.writeFileSync(c,JSON.stringify({license:B.license},null,2))}if(JSON.parse(F.readFileSync(c,"utf-8")).license!==B.license)F.writeFileSync(c,JSON.stringify({license:B.license},null,2),"utf-8")}W.stop();let U=[];if(B.components.length){let $=await I0(B.type,B.components,B.license);if($&&$.pro&&$.pro.length>0){if(console.log(),$.pro.length===1){let Y=$.pro[0]?.split("/")[1]||$.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:")),$.pro.forEach((Y)=>{let q=Y?.split("/")[1]||Y;console.log(` • ${N.cyan(q)}`)});console.log(),console.log("To access PRO components:"),console.log(` ${N.green("→")} If you've already purchased: ${N.cyan(`${z0()} 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(!$?.components.length)console.log("No components found"),process.exit(1);U.push(...$.components)}if(!B?.type&&!B?.components.length){let $=await a0(B.license);if(!$)console.log("No component types found"),process.exit(1);let Y=await $0({type:"select",name:"type",onState:V0,message:`What type of ${N.cyan("component")} are you adding?`,choices:$?.types.map((q)=>({title:q,value:q}))});B.type=Y.type}if(!B?.path){let $=await $0({type:"text",name:"path",onState:V0,message:`Where would you like to add the ${N.cyan("components")}?`,initial:"components"});B.path=$.path}if(!B?.components.length){let $=await c0(B?.type,B.license);if(!$)console.log("No components found"),process.exit(1);let Y=await $0({type:"multiselect",name:"components",onState:V0,message:`Which ${N.cyan("components")} would you like to add?`,choices:$?.components?.map((K)=>({title:K?.name+(K?.count?` (${K?.count} variants)`:"")||"example",value:K||"example",selected:B.components.includes(K.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 q=Y.components.filter((K)=>K?.type==="file").map((K)=>K.name),J=Y.components.filter((K)=>K?.type==="dir").map((K)=>K.name),S=[];if(J.length){let K=await l0(B?.type,B.license,J);if(K&&K.components.length)for(let x of K.components){let[I,g]=Object.entries(x)[0]||[],R=await $0({type:"select",name:"component",onState:V0,message:`Which ${N.cyan("variant")} from ${N.cyan(I)} would you like to add?`,choices:g?.map((A)=>({title:A?.name||"example",value:A?.name||"example",selected:B.components.includes(A.name)})),instructions:!1,hint:"- Space to select. Return to submit"});if(!R.component)console.log("No variant selected for "+N.cyan(I));S.push(I+"/"+R.component)}else console.log("No variants found")}B.components=[...S,...q]}if(!B.components?.length)W.warn("No components selected. Exiting."),process.exit(1);let L=t(z),H=new Set,V=new Set,E=new Set,T=new R3({tsConfigFilePath:L?.tsConfig});if(B.type&&B.components.length){let $=await I0(B.type,B.components,B.license);if(!$?.components.length)console.log("No components found"),process.exit(1);U.push(...$.components)}if(U.forEach(($)=>{let Y=Z0(`Adding ${$.name}...`).start(),q=$.files;$.dependencies.forEach((J)=>V.add(J)),$.devDependencies.forEach((J)=>E.add(J));try{if(q?.forEach(async({path:J,code:S})=>{let K=D.posix.join(z,`${Z?.isSrcDir&&"src"}`,J.replace(/components\//,B.path+"/")),x=Z?.framework==="vite"?S.replace(`"use client";
4
4
 
5
5
  `,""):S,I=J0(x),g=D.dirname(K);if(F.existsSync(K)&&!B.overwrite){if(F.readFileSync(K,"utf-8")!==I)H.add({code:I,path:K})}else{F.mkdirSync(g,{recursive:!0}),F.writeFileSync(K,I);let R=D.relative(D.resolve(z,`${Z?.isSrcDir&&"src"}`,B.path),K).split("/").length,A=R===1?"./":"../".repeat(R-1),k=T.addSourceFileAtPath(D.resolve(K));k.getImportDeclarations().forEach((P)=>{let Y0=P.getModuleSpecifierValue();P.setModuleSpecifier(e(Y0,B.path,Z?.aliasPrefix,A))}),await k.save()}}),H.size)Y.warn(`Some files of ${N.yellow($.name)} already exist`);else Y.succeed(`${N.green($.name)} is added successfully`)}catch(J){Y.fail(`
6
6
  Failed to add the component ${N.red($.name)}`),console.error(N.red(J)),process.exit(1)}}),H.size&&!B?.overwrite)if(console.log(`
@@ -75,4 +75,4 @@ Your project is ready, you can now start adding components.`)}}var l3=u.join(m3.
75
75
  Failed to add the component ${M.red(b?.example)}`),console.error(M.red(Y)),process.exit(1)}if(V.size&&!b?.overwrite)if(console.log(`
76
76
  Following files already exist in the directory.`),V.forEach((q)=>{console.log(M.green(`- ${u.relative(z,q.path)}`))}),(await n({type:"confirm",name:"overwrite",message:"Do you want to overwrite the existing files?",initial:!0})).overwrite){let q=X0("Overwriting files").start();V.forEach((J)=>{let S=u.relative(u.resolve(z,`${Z?.isSrcDir&&"src"}`,b.path),J.path).split("/").length,K=S===1?"./":"../".repeat(S-1),x=E.addSourceFileAtPath(u.resolve(J.path));x.replaceWithText(J.code),x.getImportDeclarations().forEach((I)=>{let g=I.getModuleSpecifierValue();I.setModuleSpecifier(e(g,b.path,Z?.aliasPrefix,K))}),x.saveSync()}),q.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 $=C();if(U?.dependencies?.length){let Y=X0("Installing example dependencies").start();await g0(()=>R0($,[$==="npm"?"install":"add",...U.dependencies],{cwd:z}).catch(async(q)=>{if(q.message.includes("peer"))Y.warn("Dependency conflict detected. Retrying with --legacy-peer-deps..."),Y.start("Installing dependencies with --legacy-peer-deps flag"),await R0($,[$==="npm"?"install":"add",...U.dependencies,"--legacy-peer-deps"],{cwd:z})}),{retries:1}),Y.succeed("Example dependencies are installed")}if(U?.devDependencies?.length){let Y=X0("Installing example devDependencies").start();await g0(()=>R0($,[$==="npm"?"install":"add","-D",...U.devDependencies],{cwd:z}).catch(async(q)=>{if(q.message.includes("peer"))Y.warn("DevDependency conflict detected. Retrying with --legacy-peer-deps..."),Y.start("Installing devDependencies with --legacy-peer-deps flag"),await R0($,[$==="npm"?"install":"add","-D",...U.devDependencies,"--legacy-peer-deps"],{cwd:z})}),{retries:1}),Y.succeed("Example devDependencies are installed")}if(b?.components?.length)await g0(()=>A0({components:b.components,dir:O0?.projectPath||"",path:b.path,message:`
77
77
  \uD83C\uDF89 Example ${M.green(b.example)} has been added to ${M.green(v)}`}),{retries:1});console.log(`
78
- \uD83C\uDF89 Example ${M.green(b.example)} has been added to ${M.green(v)}`),process.exit(0)}var d0={name:"untitledui",version:"0.1.26",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"},repository:{type:"git",url:"https://github.com/untitledui/cli.git"},bugs:{url:"https://github.com/untitledui/cli/issues"},homepage:"https://github.com/untitledui/cli#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",email:"dilshod@untitledui.com",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 r3(){let Q=new n3().name(d0.name).version(d0.version);Q.addCommand(Z3).addCommand(i0).addCommand($3).addCommand(t0),Q.parse()}r3();
78
+ \uD83C\uDF89 Example ${M.green(b.example)} has been added to ${M.green(v)}`),process.exit(0)}var d0={name:"untitledui",version:"0.1.28",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"},repository:{type:"git",url:"https://github.com/untitledui/cli.git"},bugs:{url:"https://github.com/untitledui/cli/issues"},homepage:"https://github.com/untitledui/cli#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",email:"dilshod@untitledui.com",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 r3(){let Q=new n3().name(d0.name).version(d0.version);Q.addCommand(Z3).addCommand(i0).addCommand($3).addCommand(t0),Q.parse()}r3();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "untitledui",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
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",