lovdacn 0.0.2 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,224 @@
1
+ #!/usr/bin/env node
2
+ import {Command}from'commander';import Ae from'os';import v from'path';import {fileURLToPath}from'url';import p from'fs-extra';import G from'prompts';import {execa}from'execa';import g from'picocolors';import {z as z$1}from'zod';var X=process.env.LOVDA_REGISTRY_URL||"https://lovdacn.vercel.app/r";var J=["new-york","default","luma","lyra","maia","mira","nova","rhea","sera","vega"],le=["zinc","slate","stone","gray","neutral","taupe","mauve","olive","mist"],ee=["zinc","slate","stone","gray","neutral","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],de=ee,ue=["inter","dm-sans","nunito-sans","figtree","outfit","manrope","space-grotesk","montserrat","roboto","raleway","public-sans","source-sans-3","lora","merriweather","playfair-display","jetbrains-mono","space-mono","fira-code","noto-serif","roboto-slab","instrument-sans","instrument-serif","geist"],pe=["lucide","phosphor","tabler","expo","heroicons"],ge=["default","none","small","medium","large","full"],fe=[{key:"style",values:J,bits:4},{key:"baseColor",values:le,bits:4},{key:"theme",values:ee,bits:5},{key:"chartColor",values:de,bits:5},{key:"font",values:ue,bits:5},{key:"iconLibrary",values:pe,bits:3},{key:"radius",values:ge,bits:3}],he={style:"new-york",baseColor:"zinc",theme:"zinc",chartColor:"blue",font:"inter",iconLibrary:"lucide",radius:"default"},oe="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Te="a",me=["a"];function ye(e){if(e===0)return "0";let r="",n=e;for(;n>0;)r=oe.charAt(n%62)+r,n=Math.floor(n/62);return r}function ke(e){let r=0;for(let n=0;n<e.length;n++){let s=oe.indexOf(e.charAt(n));if(s===-1)return -1;r=r*62+s;}return r}function Y(e){let r={...he,...e},n=0,s=0;for(let t of fe){let o=t.values.indexOf(r[t.key]);n+=(o===-1?0:o)*2**s,s+=t.bits;}return Te+ye(n)}function A(e){if(!e||e.length<2)return null;let r=e.charAt(0);if(!me.includes(r))return null;let n=fe,s=ke(e.slice(1));if(s<0)return null;let t={},o=0;for(let i of n){let a=Math.floor(s/2**o)%2**i.bits,l=i.values;t[i.key]=a<l.length?l[a]:l[0],o+=i.bits;}return t}function V(e){if(!e||e.length<2||e.length>8||!me.includes(e.charAt(0)))return false;for(let r=1;r<e.length;r++)if(oe.indexOf(e.charAt(r))===-1)return false;return true}var W={inter:"@expo-google-fonts/inter","dm-sans":"@expo-google-fonts/dm-sans","nunito-sans":"@expo-google-fonts/nunito-sans",figtree:"@expo-google-fonts/figtree",outfit:"@expo-google-fonts/outfit",manrope:"@expo-google-fonts/manrope","space-grotesk":"@expo-google-fonts/space-grotesk",montserrat:"@expo-google-fonts/montserrat",roboto:"@expo-google-fonts/roboto",raleway:"@expo-google-fonts/raleway","public-sans":"@expo-google-fonts/public-sans","source-sans-3":"@expo-google-fonts/source-sans-3",lora:"@expo-google-fonts/lora",merriweather:"@expo-google-fonts/merriweather","playfair-display":"@expo-google-fonts/playfair-display","jetbrains-mono":"@expo-google-fonts/jetbrains-mono","space-mono":"@expo-google-fonts/space-mono","fira-code":"@expo-google-fonts/fira-code","noto-serif":"@expo-google-fonts/noto-serif","roboto-slab":"@expo-google-fonts/roboto-slab","instrument-sans":"@expo-google-fonts/instrument-sans","instrument-serif":"@expo-google-fonts/instrument-serif",geist:"@expo-google-fonts/geist"},N={inter:"Inter","dm-sans":"DM Sans","nunito-sans":"Nunito Sans",figtree:"Figtree",outfit:"Outfit",manrope:"Manrope","space-grotesk":"Space Grotesk",montserrat:"Montserrat",roboto:"Roboto",raleway:"Raleway","public-sans":"Public Sans","source-sans-3":"Source Sans 3",lora:"Lora",merriweather:"Merriweather","playfair-display":"Playfair Display","jetbrains-mono":"JetBrains Mono","space-mono":"Space Mono","fira-code":"Fira Code","noto-serif":"Noto Serif","roboto-slab":"Roboto Slab","instrument-sans":"Instrument Sans","instrument-serif":"Instrument Serif",geist:"Geist"},F={lucide:"lucide-react-native",phosphor:"phosphor-react-native",tabler:"@tabler/icons-react-native",expo:"@expo/vector-icons",heroicons:"react-native-heroicons"};var D={default:"0.5rem",none:"0rem",small:"0.125rem",medium:"0.625rem",large:"0.75rem",full:"1.5rem"};var O={"new-york":{title:"New York",description:"Lucide / Inter / Classic",style:"new-york",baseColor:"zinc",theme:"zinc",chartColor:"blue",font:"inter",iconLibrary:"lucide",radius:"default"},default:{title:"Default",description:"Lucide / Inter / Standard",style:"default",baseColor:"slate",theme:"slate",chartColor:"blue",font:"inter",iconLibrary:"lucide",radius:"default"},luma:{title:"Luma",description:"Lucide / Inter / Rounded",style:"luma",baseColor:"neutral",theme:"blue",chartColor:"sky",font:"inter",iconLibrary:"lucide",radius:"large"},lyra:{title:"Lyra",description:"Phosphor / JetBrains Mono / Tight",style:"lyra",baseColor:"stone",theme:"amber",chartColor:"orange",font:"jetbrains-mono",iconLibrary:"phosphor",radius:"small"},maia:{title:"Maia",description:"Tabler / Figtree / Rounded",style:"maia",baseColor:"neutral",theme:"violet",chartColor:"purple",font:"figtree",iconLibrary:"tabler",radius:"large"},mira:{title:"Mira",description:"Phosphor / Inter / Full",style:"mira",baseColor:"zinc",theme:"emerald",chartColor:"red",font:"inter",iconLibrary:"phosphor",radius:"full"},nova:{title:"Nova",description:"Lucide / Inter / Tight",style:"nova",baseColor:"neutral",theme:"neutral",chartColor:"blue",font:"inter",iconLibrary:"lucide",radius:"small"},rhea:{title:"Rhea",description:"Lucide / DM Sans / Full",style:"rhea",baseColor:"neutral",theme:"rose",chartColor:"pink",font:"dm-sans",iconLibrary:"lucide",radius:"full"},sera:{title:"Sera",description:"Lucide / Playfair Display / None",style:"sera",baseColor:"taupe",theme:"amber",chartColor:"amber",font:"playfair-display",iconLibrary:"lucide",radius:"none"},vega:{title:"Vega",description:"Lucide / Space Grotesk / Medium",style:"vega",baseColor:"neutral",theme:"cyan",chartColor:"teal",font:"space-grotesk",iconLibrary:"lucide",radius:"medium"}};var q={zinc:{300:"oklch(0.871 0.006 286.286)",400:"oklch(0.705 0.015 286.067)",500:"oklch(0.552 0.016 285.938)",600:"oklch(0.442 0.017 285.786)",700:"oklch(0.37 0.013 285.805)",grayscale:true},slate:{300:"oklch(0.869 0.022 252.894)",400:"oklch(0.704 0.04 256.788)",500:"oklch(0.554 0.046 257.417)",600:"oklch(0.446 0.043 257.281)",700:"oklch(0.372 0.044 257.287)",grayscale:true},stone:{300:"oklch(0.869 0.005 56.366)",400:"oklch(0.709 0.01 56.259)",500:"oklch(0.553 0.013 58.071)",600:"oklch(0.444 0.011 73.639)",700:"oklch(0.374 0.01 67.558)",grayscale:true},gray:{300:"oklch(0.872 0.01 258.338)",400:"oklch(0.707 0.022 261.325)",500:"oklch(0.551 0.027 264.364)",600:"oklch(0.446 0.03 256.802)",700:"oklch(0.373 0.034 259.733)",grayscale:true},neutral:{300:"oklch(0.87 0 0)",400:"oklch(0.708 0 0)",500:"oklch(0.556 0 0)",600:"oklch(0.439 0 0)",700:"oklch(0.371 0 0)",grayscale:true},red:{300:"oklch(0.808 0.114 19.571)",400:"oklch(0.704 0.191 22.216)",500:"oklch(0.637 0.237 25.331)",600:"oklch(0.577 0.245 27.325)",700:"oklch(0.505 0.213 27.518)"},orange:{300:"oklch(0.837 0.128 66.29)",400:"oklch(0.75 0.183 55.934)",500:"oklch(0.705 0.213 47.604)",600:"oklch(0.646 0.222 41.116)",700:"oklch(0.553 0.195 38.402)"},amber:{300:"oklch(0.879 0.169 91.605)",400:"oklch(0.828 0.189 84.429)",500:"oklch(0.769 0.188 70.08)",600:"oklch(0.666 0.179 58.318)",700:"oklch(0.555 0.163 48.998)",darkForeground:true},yellow:{300:"oklch(0.905 0.182 98.111)",400:"oklch(0.852 0.199 91.936)",500:"oklch(0.795 0.184 86.047)",600:"oklch(0.681 0.162 75.834)",700:"oklch(0.554 0.135 66.442)",darkForeground:true},lime:{300:"oklch(0.897 0.196 126.665)",400:"oklch(0.841 0.238 128.85)",500:"oklch(0.768 0.233 130.85)",600:"oklch(0.648 0.2 131.684)",700:"oklch(0.532 0.157 131.589)",darkForeground:true},green:{300:"oklch(0.871 0.15 154.449)",400:"oklch(0.792 0.209 151.711)",500:"oklch(0.723 0.219 149.579)",600:"oklch(0.627 0.194 149.214)",700:"oklch(0.527 0.154 150.069)"},emerald:{300:"oklch(0.845 0.143 164.978)",400:"oklch(0.765 0.177 163.223)",500:"oklch(0.696 0.17 162.48)",600:"oklch(0.596 0.145 163.225)",700:"oklch(0.508 0.118 165.612)"},teal:{300:"oklch(0.855 0.138 181.071)",400:"oklch(0.777 0.152 181.912)",500:"oklch(0.704 0.14 182.503)",600:"oklch(0.6 0.118 184.704)",700:"oklch(0.511 0.096 186.391)"},cyan:{300:"oklch(0.865 0.127 207.078)",400:"oklch(0.789 0.154 211.53)",500:"oklch(0.715 0.143 215.221)",600:"oklch(0.609 0.126 221.723)",700:"oklch(0.52 0.105 223.128)"},sky:{300:"oklch(0.828 0.111 230.318)",400:"oklch(0.746 0.16 232.661)",500:"oklch(0.685 0.169 237.323)",600:"oklch(0.588 0.158 241.966)",700:"oklch(0.5 0.134 242.749)"},blue:{300:"oklch(0.809 0.105 251.813)",400:"oklch(0.707 0.165 254.624)",500:"oklch(0.623 0.214 259.815)",600:"oklch(0.546 0.245 262.881)",700:"oklch(0.488 0.243 264.376)"},indigo:{300:"oklch(0.785 0.115 274.713)",400:"oklch(0.673 0.182 276.935)",500:"oklch(0.585 0.233 277.117)",600:"oklch(0.511 0.262 276.966)",700:"oklch(0.457 0.24 277.023)"},violet:{300:"oklch(0.811 0.111 293.571)",400:"oklch(0.702 0.183 293.541)",500:"oklch(0.606 0.25 292.717)",600:"oklch(0.541 0.281 293.009)",700:"oklch(0.491 0.27 292.581)"},purple:{300:"oklch(0.827 0.119 306.383)",400:"oklch(0.714 0.203 305.504)",500:"oklch(0.627 0.265 303.9)",600:"oklch(0.558 0.288 302.321)",700:"oklch(0.496 0.265 301.924)"},fuchsia:{300:"oklch(0.833 0.145 321.434)",400:"oklch(0.74 0.238 322.16)",500:"oklch(0.667 0.295 322.15)",600:"oklch(0.591 0.293 322.896)",700:"oklch(0.518 0.253 323.949)"},pink:{300:"oklch(0.823 0.12 346.018)",400:"oklch(0.718 0.202 349.761)",500:"oklch(0.656 0.241 354.308)",600:"oklch(0.592 0.249 0.584)",700:"oklch(0.525 0.223 3.958)"},rose:{300:"oklch(0.81 0.117 11.638)",400:"oklch(0.712 0.194 13.428)",500:"oklch(0.645 0.246 16.439)",600:"oklch(0.586 0.253 17.585)",700:"oklch(0.514 0.222 16.935)"}},Le="oklch(0.985 0 0)",ve="oklch(0.205 0 0)";function be(e){let r=e.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);if(!r)return "0 0% 0%";let n=parseFloat(r[1]),s=parseFloat(r[2]),o=parseFloat(r[3])*Math.PI/180,i=s*Math.cos(o),a=s*Math.sin(o),l=n+.3963377774*i+.2158037573*a,c=n-.1055613458*i-.0638541728*a,u=n-.0894841775*i-1.291485548*a,b=l**3,k=c**3,f=u**3,d=4.0767416621*b-3.3077115913*k+.2309699292*f,m=-1.2684380046*b+2.6097574011*k-.3413193965*f,x=-0.0041960863*b-.7034186147*k+1.707614701*f,h=B=>B<=.0031308?12.92*B:1.055*Math.pow(B,1/2.4)-.055;d=Math.min(1,Math.max(0,h(d))),m=Math.min(1,Math.max(0,h(m))),x=Math.min(1,Math.max(0,h(x)));let w=Math.max(d,m,x),C=Math.min(d,m,x),P=(w+C)/2,E=0,H=0,I=w-C;if(I!==0){switch(H=I/(1-Math.abs(2*P-1)),w){case d:E=(m-x)/I%6;break;case m:E=(x-d)/I+2;break;default:E=(d-m)/I+4;}E*=60,E<0&&(E+=360);}return `${E.toFixed(1)} ${(H*100).toFixed(1)}% ${(P*100).toFixed(1)}%`}function re(e,r="oklch"){let n=q[e];if(!n||n.grayscale)return null;let s=o=>r==="hsl"?be(o):o,t=n.darkForeground?ve:Le;return {light:{primary:s(n[600]),foreground:s(t)},dark:{primary:s(n[500]),foreground:s(ve)}}}function ne(e,r="oklch"){let n=q[e]??q.blue,s=i=>r==="hsl"?be(i):i,t=[n[500],n[400],n[600],n[300],n[700]].map(s),o=[n[400],n[300],n[500],n[300],n[600]].map(s);return {light:t,dark:o}}var Oe=fileURLToPath(import.meta.url);v.dirname(Oe);var we=process.env.LOVDA_GITHUB_URL??"https://github.com/lovdacn-ui/ui.git",Me=z$1.object({cwd:z$1.string(),name:z$1.string().optional(),yes:z$1.boolean().default(false),force:z$1.boolean().default(false),packageManager:z$1.enum(["npm","yarn","pnpm","bun"]).optional(),preset:z$1.string().optional(),engine:z$1.enum(["nativewind","uniwind"]).optional()}),Ce=new Command().name("init").description("initialize your project and install dependencies").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-n, --name <name>","the name for the new project.").option("-y, --yes","skip confirmation prompt.",false).option("-f, --force","force overwrite of existing files.",false).option("-p, --package-manager <package-manager>","the package manager to use. (npm, yarn, pnpm, bun)").option("--preset <preset>","use a preset configuration (code, named preset, or style name)").option("--engine <engine>","the style engine to use (nativewind, uniwind)").action(async e=>{try{let r=Me.parse({...e,cwd:v.resolve(e.cwd)});await Ue(r);}catch(r){console.error(g.red(`
3
+ Initialization failed:`)),console.error(r),process.exit(1);}});async function Ne(e){let r=process.env.LOVDA_TEMPLATE_DIR;if(r){let t=v.resolve(r,e),o=p.existsSync(t)?t:r;if(!p.existsSync(o))throw new Error(`Template directory not found at ${o}`);return {dir:o,cleanup:()=>{}}}let n=v.join(Ae.tmpdir(),`lovda-template-${Date.now()}`);await execa("git",["clone","--depth","1","--filter=blob:none","--sparse",we,n]),await execa("git",["-C",n,"sparse-checkout","set",`packages/templates/${e}`]);let s=v.resolve(n,"packages","templates",e);if(!p.existsSync(s))throw p.removeSync(n),new Error(`Template "${e}" not found in ${we}`);return {dir:s,cleanup:()=>p.removeSync(n)}}async function De(e){try{await execa("git",["init"],{cwd:e}),await execa("git",["add","-A"],{cwd:e}),await execa("git",["commit","-m","feat: initial commit"],{cwd:e});}catch{}}async function Ue(e){let r=e.cwd,n=p.existsSync(v.join(r,"package.json")),s=e.name,t=e.packageManager,o,i="nativewind",a="new-york",l="zinc",c=null;if(e.preset){let h=O[e.preset];if(h){let{title:w,description:C,...P}=h;c=P;}else V(e.preset)?(c=A(e.preset),c||(console.error(g.red(`Invalid preset code: ${e.preset}`)),process.exit(1))):(console.error(g.red(`Unknown preset: ${e.preset}`)),console.error(g.dim(`Available: ${Object.keys(O).join(", ")}, or a preset code.`)),process.exit(1));a=c.style,l=c.baseColor,console.log(g.blue(`Using preset: ${g.cyan(e.preset)}`)),console.log(g.dim(` style: ${a}, base: ${l}, theme: ${c.theme}, chart: ${c.chartColor}, font: ${N[c.font]}, icons: ${c.iconLibrary}, radius: ${D[c.radius]}`));}if(n){o=r,t||(t=e.packageManager||te(r));let h=v.join(r,"package.json"),w={};try{w=p.readJsonSync(h);}catch{}let C={...w.dependencies||{},...w.devDependencies||{}};if(C.uniwind)i="uniwind";else if(C.nativewind)i="nativewind";else if(e.engine)i=e.engine;else if(e.yes)i="nativewind";else {let P=await G({type:"select",name:"styleEngine",message:"Which style engine would you like to use?",choices:[{title:"NativeWind (default/reusables compatible)",value:"nativewind"},{title:"Uniwind",value:"uniwind"}],initial:0});P.styleEngine||process.exit(0),i=P.styleEngine;}}else {if(e.yes)s=s||"nativewind-app",t=t||te(r),i=e.engine||"nativewind",a=c?c.style:"new-york",l=c?c.baseColor:"zinc";else {let h=te(r),w=[];if(e.engine||w.push({type:"select",name:"styleEngine",message:"Which style engine would you like to use?",choices:[{title:"NativeWind (default/reusables compatible)",value:"nativewind"},{title:"Uniwind",value:"uniwind"}],initial:0}),c||(w.push({type:"select",name:"style",message:"Which style would you like to use?",choices:[{title:"Default",value:"default"},{title:"New York",value:"new-york"},{title:"Luma",value:"luma"},{title:"Lyra",value:"lyra"},{title:"Maia",value:"maia"},{title:"Mira",value:"mira"},{title:"Nova",value:"nova"},{title:"Rhea",value:"rhea"},{title:"Sera",value:"sera"},{title:"Vega",value:"vega"}],initial:1}),w.push({type:"select",name:"baseColor",message:"Which color would you like to use as the base color?",choices:[{title:"Zinc",value:"zinc"},{title:"Slate",value:"slate"},{title:"Stone",value:"stone"},{title:"Gray",value:"gray"},{title:"Neutral",value:"neutral"},{title:"Mauve",value:"mauve"},{title:"Olive",value:"olive"},{title:"Mist",value:"mist"},{title:"Taupe",value:"taupe"}],initial:0})),s||w.push({type:"text",name:"projectName",message:"What is your project named?",initial:(P,E)=>E.styleEngine==="uniwind"?"uniwind-app":"nativewind-app",validate:P=>P.trim().length===0?"Project name cannot be empty.":true}),!t){let P=async _e=>{try{return await execa(_e,["--version"]),!0}catch{return false}},[E,H,I,B]=await Promise.all([P("npm"),P("yarn"),P("pnpm"),P("bun")]);w.push({type:"select",name:"packageManager",message:"Which package manager would you like to use?",choices:[{title:"npm"+(E?"":" (not installed)"),value:"npm",disabled:!E},{title:"yarn"+(H?"":" (not installed)"),value:"yarn",disabled:!H},{title:"pnpm"+(I?"":" (not installed)"),value:"pnpm",disabled:!I},{title:"bun"+(B?"":" (not installed)"),value:"bun",disabled:!B}],initial:["npm","yarn","pnpm","bun"].indexOf(h)!==-1?["npm","yarn","pnpm","bun"].indexOf(h):0});}let C=await G(w);(!s&&!C.projectName||!t&&!C.packageManager||!e.engine&&!C.styleEngine||!c&&(!C.style||!C.baseColor))&&process.exit(0),s=s||C.projectName.trim(),t=t||C.packageManager,i=e.engine||C.styleEngine,a=c?c.style:C.style,l=c?c.baseColor:C.baseColor;}if(!t)throw new Error("Package manager is required.");if(o=v.join(r,s),p.existsSync(o)&&p.readdirSync(o).length>0&&!e.force){if(e.yes)throw new Error(`Directory ${o} is not empty. Use --force to overwrite.`);if(!(await G({type:"confirm",name:"overwrite",message:`The directory ${g.cyan(s)} is not empty. Would you like to overwrite it?`,initial:false})).overwrite){console.log(g.yellow("Aborted."));return}}}let u=null,b=v.join(o,"lvcn.json");if(p.existsSync(b)){if(!e.force&&!e.yes&&!(await G({type:"confirm",name:"overwrite",message:`Configuration file ${g.cyan("lvcn.json")} already exists. Overwrite?`,initial:false})).overwrite){console.log(g.yellow("Aborted."));return}try{u=p.readJsonSync(b);}catch{}}if(u&&u.style)a=u.style;else if(c)a=c.style;else if(e.yes)a="new-york";else if(n){let h=await G({type:"select",name:"style",message:"Which style would you like to use?",choices:[{title:"Default",value:"default"},{title:"New York",value:"new-york"},{title:"Luma",value:"luma"},{title:"Lyra",value:"lyra"},{title:"Maia",value:"maia"},{title:"Mira",value:"mira"},{title:"Nova",value:"nova"},{title:"Rhea",value:"rhea"},{title:"Sera",value:"sera"},{title:"Vega",value:"vega"}],initial:1});h.style||process.exit(0),a=h.style;}if(u&&u.tailwind?.baseColor)l=u.tailwind.baseColor;else if(c)l=c.baseColor;else if(e.yes)l="zinc";else if(n){let h=await G({type:"select",name:"baseColor",message:"Which color would you like to use as the base color?",choices:[{title:"Zinc",value:"zinc"},{title:"Slate",value:"slate"},{title:"Stone",value:"stone"},{title:"Gray",value:"gray"},{title:"Neutral",value:"neutral"},{title:"Mauve",value:"mauve"},{title:"Olive",value:"olive"},{title:"Mist",value:"mist"},{title:"Taupe",value:"taupe"}],initial:0});h.baseColor||process.exit(0),l=h.baseColor;}let{dir:k,cleanup:f}=await Ne(i),d=n?p.existsSync(v.join(o,"src")):p.existsSync(v.join(k,"src")),m=d?"./src/global.css":"./global.css";if(n){if(console.log(g.blue("Initializing configurations in existing project...")),p.writeJsonSync(b,{$schema:"https://lovdacn.vercel.app/schema.json",style:a,styleEngine:i,tsx:true,tailwind:{config:"tailwind.config.js",css:m,baseColor:l},aliases:{components:"@/components",utils:"@/lib/utils",ui:"@/components/ui"},components:[]},{spaces:2}),await se(o,i,m,a,l,c?.theme,c?.chartColor),Se(o,l),i==="nativewind"){let h=v.join(k,"tailwind.config.js");Ve(o,h);}He(o,i,m,d),i==="nativewind"&&ze(o),Je(o,m),Ye(o);}else {console.log(g.blue(`Initializing project in ${g.cyan(o)}...`)),p.ensureDirSync(o),p.copySync(k,o,{filter:w=>{let C=v.basename(w);return !w.includes("node_modules")&&C!==".git"&&C!==".expo"&&C!==".claude"}});let h=v.join(o,"package.json");if(p.existsSync(h)){let w=p.readJsonSync(h);w.name=s,p.writeJsonSync(h,w,{spaces:2});}qe(o,t),await se(o,i,m,a,l,c?.theme,c?.chartColor),Se(o,l);}if(f(),p.existsSync(b)){let h=p.readJsonSync(b),w={...h,style:a,styleEngine:i,...u||{},baseColor:l,...c?{theme:c.theme,chartColor:c.chartColor,font:c.font,iconLibrary:c.iconLibrary,radius:c.radius}:{},aliases:{...h.aliases,...u&&u.aliases||{}},tailwind:{...h.tailwind,baseColor:l,...u&&u.tailwind||{}},components:Array.from(new Set([...h.components||[],...u&&u.components||[]]))};p.writeJsonSync(b,w,{spaces:2});}if(console.log(g.blue(`Installing dependencies using ${g.cyan(t)}...`)),n?await execa(t,["install",...i==="uniwind"?["uniwind","tailwindcss","class-variance-authority","@rn-primitives/portal","react-native-gesture-handler"]:["nativewind","tailwindcss","class-variance-authority","@rn-primitives/portal","react-native-gesture-handler"]],{cwd:o,stdio:"inherit"}):await execa(t,["install"],{cwd:o,stdio:"inherit"}),c){let h=[],w=W[c.font];if(w&&h.push(w),c.iconLibrary!=="expo"){let C=F[c.iconLibrary];C&&(h.push(C),h.push("react-native-svg"));}if(h.length>0){console.log(g.blue(`Installing preset packages: ${g.cyan(h.join(", "))}...`));try{await execa(t,["install",...h],{cwd:o,stdio:"inherit"});}catch{console.log(g.yellow(`\u26A0 Could not install some preset packages. Install manually: ${h.join(" ")}`));}}}n||await De(o),console.log(g.green(`
4
+ Project initialized successfully! \u{1F389}`));let x=Be(t);console.log(g.dim(`
5
+ Now add components with:`)),!n&&s&&console.log(` ${g.cyan(`cd ${s}`)}`),console.log(` ${g.cyan(`${x} lovdacn add`)} ${g.dim("[...components]")}`);}function Be(e){switch(e){case "pnpm":return "pnpm dlx";case "bun":return "bunx";case "yarn":return "yarn dlx";default:return "npx"}}function te(e){if(p.existsSync(v.join(e,"bun.lockb"))||p.existsSync(v.join(e,"bun.lock")))return "bun";if(p.existsSync(v.join(e,"pnpm-lock.yaml")))return "pnpm";if(p.existsSync(v.join(e,"yarn.lock")))return "yarn";if(p.existsSync(v.join(e,"package-lock.json")))return "npm";let r=process.env.npm_config_user_agent||"";return r.startsWith("pnpm")?"pnpm":r.startsWith("bun")?"bun":r.startsWith("yarn")?"yarn":"npm"}var K={zinc:{hsl:{light:{background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},dark:{background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.145 0 0)",card:"oklch(1 0 0)","card-foreground":"oklch(0.145 0 0)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.145 0 0)",primary:"oklch(0.205 0 0)","primary-foreground":"oklch(0.985 0 0)",secondary:"oklch(0.97 0 0)","secondary-foreground":"oklch(0.205 0 0)",muted:"oklch(0.97 0 0)","muted-foreground":"oklch(0.556 0 0)",accent:"oklch(0.97 0 0)","accent-foreground":"oklch(0.205 0 0)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.97 0 0)",border:"oklch(0.922 0 0)",input:"oklch(0.922 0 0)",ring:"oklch(0.205 0 0)"},dark:{background:"oklch(0.145 0 0)",foreground:"oklch(0.985 0 0)",card:"oklch(0.145 0 0)","card-foreground":"oklch(0.985 0 0)",popover:"oklch(0.145 0 0)","popover-foreground":"oklch(0.985 0 0)",primary:"oklch(0.985 0 0)","primary-foreground":"oklch(0.205 0 0)",secondary:"oklch(0.269 0 0)","secondary-foreground":"oklch(0.985 0 0)",muted:"oklch(0.269 0 0)","muted-foreground":"oklch(0.708 0 0)",accent:"oklch(0.269 0 0)","accent-foreground":"oklch(0.985 0 0)",destructive:"oklch(0.396 0.141 25.723)","destructive-foreground":"oklch(0.985 0 0)",border:"oklch(0.269 0 0)",input:"oklch(0.269 0 0)",ring:"oklch(0.87 0 0)"}}},neutral:{hsl:{light:{background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 0% 9%","primary-foreground":"0 0% 98%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 0% 3.9%"},dark:{background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"0 0% 9%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 70.9% 59.4%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 0% 83.1%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.145 0 0)",card:"oklch(1 0 0)","card-foreground":"oklch(0.145 0 0)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.145 0 0)",primary:"oklch(0.205 0 0)","primary-foreground":"oklch(0.985 0 0)",secondary:"oklch(0.97 0 0)","secondary-foreground":"oklch(0.205 0 0)",muted:"oklch(0.97 0 0)","muted-foreground":"oklch(0.556 0 0)",accent:"oklch(0.97 0 0)","accent-foreground":"oklch(0.205 0 0)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.97 0 0)",border:"oklch(0.922 0 0)",input:"oklch(0.922 0 0)",ring:"oklch(0.205 0 0)"},dark:{background:"oklch(0.145 0 0)",foreground:"oklch(0.985 0 0)",card:"oklch(0.145 0 0)","card-foreground":"oklch(0.985 0 0)",popover:"oklch(0.145 0 0)","popover-foreground":"oklch(0.985 0 0)",primary:"oklch(0.985 0 0)","primary-foreground":"oklch(0.205 0 0)",secondary:"oklch(0.269 0 0)","secondary-foreground":"oklch(0.985 0 0)",muted:"oklch(0.269 0 0)","muted-foreground":"oklch(0.708 0 0)",accent:"oklch(0.269 0 0)","accent-foreground":"oklch(0.985 0 0)",destructive:"oklch(0.396 0.141 25.723)","destructive-foreground":"oklch(0.985 0 0)",border:"oklch(0.269 0 0)",input:"oklch(0.269 0 0)",ring:"oklch(0.87 0 0)"}}},slate:{hsl:{light:{background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"222.2 47.4% 11.2%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"222.2 84% 4.9%"},dark:{background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"210 40% 98%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.129 0.042 264.695)",card:"oklch(1 0 0)","card-foreground":"oklch(0.129 0.042 264.695)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.129 0.042 264.695)",primary:"oklch(0.208 0.042 265.755)","primary-foreground":"oklch(0.968 0.007 247.896)",secondary:"oklch(0.968 0.007 247.896)","secondary-foreground":"oklch(0.208 0.042 265.755)",muted:"oklch(0.968 0.007 247.896)","muted-foreground":"oklch(0.554 0.046 257.417)",accent:"oklch(0.968 0.007 247.896)","accent-foreground":"oklch(0.208 0.042 265.755)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.968 0.007 247.896)",border:"oklch(0.929 0.013 255.508)",input:"oklch(0.929 0.013 255.508)",ring:"oklch(0.129 0.042 264.695)"},dark:{background:"oklch(0.129 0.042 264.695)",foreground:"oklch(0.968 0.007 247.896)",card:"oklch(0.129 0.042 264.695)","card-foreground":"oklch(0.968 0.007 247.896)",popover:"oklch(0.129 0.042 264.695)","popover-foreground":"oklch(0.968 0.007 247.896)",primary:"oklch(0.968 0.007 247.896)","primary-foreground":"oklch(0.208 0.042 265.755)",secondary:"oklch(0.279 0.041 260.031)","secondary-foreground":"oklch(0.968 0.007 247.896)",muted:"oklch(0.279 0.041 260.031)","muted-foreground":"oklch(0.704 0.04 256.788)",accent:"oklch(0.279 0.041 260.031)","accent-foreground":"oklch(0.968 0.007 247.896)",destructive:"oklch(0.396 0.141 25.723)","destructive-foreground":"oklch(0.968 0.007 247.896)",border:"oklch(0.279 0.041 260.031)",input:"oklch(0.279 0.041 260.031)",ring:"oklch(0.87 0 0)"}}},stone:{hsl:{light:{background:"0 0% 100%",foreground:"24 9.8% 10%",card:"0 0% 100%","card-foreground":"24 9.8% 10%",popover:"0 0% 100%","popover-foreground":"24 9.8% 10%",primary:"24 9.8% 10%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"24 9.8% 10%"},dark:{background:"24 9.8% 10%",foreground:"60 9.1% 97.8%",card:"24 9.8% 10%","card-foreground":"60 9.1% 97.8%",popover:"24 9.8% 10%","popover-foreground":"60 9.1% 97.8%",primary:"60 9.1% 97.8%","primary-foreground":"24 9.8% 10%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"24 9.8% 10%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.147 0.004 49.25)",card:"oklch(1 0 0)","card-foreground":"oklch(0.147 0.004 49.25)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.147 0.004 49.25)",primary:"oklch(0.216 0.006 56.043)","primary-foreground":"oklch(0.97 0.001 106.424)",secondary:"oklch(0.97 0.001 106.424)","secondary-foreground":"oklch(0.216 0.006 56.043)",muted:"oklch(0.97 0.001 106.424)","muted-foreground":"oklch(0.553 0.013 58.071)",accent:"oklch(0.97 0.001 106.424)","accent-foreground":"oklch(0.216 0.006 56.043)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.97 0.001 106.424)",border:"oklch(0.923 0.003 48.717)",input:"oklch(0.923 0.003 48.717)",ring:"oklch(0.216 0.006 56.043)"},dark:{background:"oklch(0.147 0.004 49.25)",foreground:"oklch(0.97 0.001 106.424)",card:"oklch(0.147 0.004 49.25)","card-foreground":"oklch(0.97 0.001 106.424)",popover:"oklch(0.147 0.004 49.25)","popover-foreground":"oklch(0.97 0.001 106.424)",primary:"oklch(0.97 0.001 106.424)","primary-foreground":"oklch(0.216 0.006 56.043)",secondary:"oklch(0.268 0.007 34.298)","secondary-foreground":"oklch(0.97 0.001 106.424)",muted:"oklch(0.268 0.007 34.298)","muted-foreground":"oklch(0.709 0.01 56.259)",accent:"oklch(0.268 0.007 34.298)","accent-foreground":"oklch(0.97 0.001 106.424)",destructive:"oklch(0.396 0.141 25.723)","destructive-foreground":"oklch(0.97 0.001 106.424)",border:"oklch(0.268 0.007 34.298)",input:"oklch(0.268 0.007 34.298)",ring:"oklch(0.87 0 0)"}}},gray:{hsl:{light:{background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"220 9% 18%","primary-foreground":"220 14.3% 95.9%",secondary:"220 14.3% 95.9%","secondary-foreground":"220 9% 18%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220 9% 18%",destructive:"0 84.2% 60.2%","destructive-foreground":"220 14.3% 95.9%",border:"220 13% 91%",input:"220 13% 91%",ring:"224 71.4% 4.1%"},dark:{background:"224 71.4% 4.1%",foreground:"220 14.3% 95.9%",card:"224 71.4% 4.1%","card-foreground":"220 14.3% 95.9%",popover:"224 71.4% 4.1%","popover-foreground":"220 14.3% 95.9%",primary:"220 14.3% 95.9%","primary-foreground":"220 9% 18%",secondary:"220 9% 18%","secondary-foreground":"220 14.3% 95.9%",muted:"220 9% 18%","muted-foreground":"220 10% 64.9%",accent:"220 9% 18%","accent-foreground":"220 14.3% 95.9%",destructive:"0 62.8% 30.6%","destructive-foreground":"220 14.3% 95.9%",border:"220 9% 18%",input:"220 9% 18%",ring:"220 14.3% 95.9%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.13 0.028 261.692)",card:"oklch(1 0 0)","card-foreground":"oklch(0.13 0.028 261.692)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.13 0.028 261.692)",primary:"oklch(0.21 0.034 264.665)","primary-foreground":"oklch(0.967 0.003 264.542)",secondary:"oklch(0.967 0.003 264.542)","secondary-foreground":"oklch(0.21 0.034 264.665)",muted:"oklch(0.967 0.003 264.542)","muted-foreground":"oklch(0.551 0.027 264.364)",accent:"oklch(0.967 0.003 264.542)","accent-foreground":"oklch(0.21 0.034 264.665)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.967 0.003 264.542)",border:"oklch(0.928 0.006 264.531)",input:"oklch(0.928 0.006 264.531)",ring:"oklch(0.13 0.028 261.692)"},dark:{background:"oklch(0.13 0.028 261.692)",foreground:"oklch(0.967 0.003 264.542)",card:"oklch(0.13 0.028 261.692)","card-foreground":"oklch(0.967 0.003 264.542)",popover:"oklch(0.13 0.028 261.692)","popover-foreground":"oklch(0.967 0.003 264.542)",primary:"oklch(0.967 0.003 264.542)","primary-foreground":"oklch(0.21 0.034 264.665)",secondary:"oklch(0.278 0.033 256.848)","secondary-foreground":"oklch(0.967 0.003 264.542)",muted:"oklch(0.278 0.033 256.848)","muted-foreground":"oklch(0.707 0.022 261.325)",accent:"oklch(0.278 0.033 256.848)","accent-foreground":"oklch(0.967 0.003 264.542)",destructive:"oklch(0.396 0.141 25.723)","destructive-foreground":"oklch(0.967 0.003 264.542)",border:"oklch(0.278 0.033 256.848)",input:"oklch(0.278 0.033 256.848)",ring:"oklch(0.87 0 0)"}}},taupe:{hsl:{light:{background:"30 20% 98%",foreground:"30 10% 5%",card:"30 20% 98%","card-foreground":"30 10% 5%",popover:"30 20% 98%","popover-foreground":"30 10% 5%",primary:"30 10% 12%","primary-foreground":"30 20% 98%",secondary:"30 10% 92%","secondary-foreground":"30 10% 12%",muted:"30 10% 92%","muted-foreground":"30 5% 45%",accent:"30 10% 92%","accent-foreground":"30 10% 12%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"30 10% 88%",input:"30 10% 88%",ring:"30 10% 12%"},dark:{background:"30 10% 5%",foreground:"30 20% 98%",card:"30 10% 5%","card-foreground":"30 20% 98%",popover:"30 10% 5%","popover-foreground":"30 20% 98%",primary:"30 20% 98%","primary-foreground":"30 10% 12%",secondary:"30 10% 18%","secondary-foreground":"30 20% 98%",muted:"30 10% 18%","muted-foreground":"30 5% 65%",accent:"30 10% 18%","accent-foreground":"30 20% 98%",destructive:"0 70.9% 59.4%","destructive-foreground":"30 20% 98%",border:"30 10% 18%",input:"30 10% 18%",ring:"30 10% 84%"}},oklch:{light:{background:"oklch(0.986 0.002 67.8)",foreground:"oklch(0.147 0.004 49.3)",card:"oklch(0.986 0.002 67.8)","card-foreground":"oklch(0.147 0.004 49.3)",popover:"oklch(0.986 0.002 67.8)","popover-foreground":"oklch(0.147 0.004 49.3)",primary:"oklch(0.214 0.009 43.1)","primary-foreground":"oklch(0.986 0.002 67.8)",secondary:"oklch(0.922 0.005 34.3)","secondary-foreground":"oklch(0.214 0.009 43.1)",muted:"oklch(0.922 0.005 34.3)","muted-foreground":"oklch(0.547 0.021 43.1)",accent:"oklch(0.922 0.005 34.3)","accent-foreground":"oklch(0.214 0.009 43.1)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.97 0 0)",border:"oklch(0.868 0.007 39.5)",input:"oklch(0.868 0.007 39.5)",ring:"oklch(0.214 0.009 43.1)"},dark:{background:"oklch(0.147 0.004 49.3)",foreground:"oklch(0.986 0.002 67.8)",card:"oklch(0.147 0.004 49.3)","card-foreground":"oklch(0.986 0.002 67.8)",popover:"oklch(0.147 0.004 49.3)","popover-foreground":"oklch(0.986 0.002 67.8)",primary:"oklch(0.986 0.002 67.8)","primary-foreground":"oklch(0.214 0.009 43.1)",secondary:"oklch(0.268 0.011 36.5)","secondary-foreground":"oklch(0.986 0.002 67.8)",muted:"oklch(0.268 0.011 36.5)","muted-foreground":"oklch(0.714 0.014 41.2)",accent:"oklch(0.268 0.011 36.5)","accent-foreground":"oklch(0.986 0.002 67.8)",destructive:"oklch(0.396 0.141 25.723)","destructive-foreground":"oklch(0.986 0.002 67.8)",border:"oklch(0.268 0.011 36.5)",input:"oklch(0.268 0.011 36.5)",ring:"oklch(0.868 0.007 39.5)"}}},mauve:{hsl:{light:{background:"0 0% 100%",foreground:"326 5% 5%",card:"0 0% 100%","card-foreground":"326 5% 5%",popover:"0 0% 100%","popover-foreground":"326 5% 5%",primary:"322 10% 13%","primary-foreground":"0 0% 98%",secondary:"325 5% 95%","secondary-foreground":"322 10% 13%",muted:"325 5% 95%","muted-foreground":"322 8% 45%",accent:"325 5% 95%","accent-foreground":"322 10% 13%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"325 5% 91%",input:"325 5% 91%",ring:"322 10% 13%"},dark:{background:"326 5% 5%",foreground:"0 0% 98%",card:"322 10% 13%","card-foreground":"0 0% 98%",popover:"322 10% 13%","popover-foreground":"0 0% 98%",primary:"325 5% 91%","primary-foreground":"322 10% 13%",secondary:"320 6% 17%","secondary-foreground":"0 0% 98%",muted:"320 6% 17%","muted-foreground":"323 6% 65%",accent:"320 6% 17%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"320 6% 17%",input:"320 6% 17%",ring:"322 8% 45%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.145 0.008 326)",card:"oklch(1 0 0)","card-foreground":"oklch(0.145 0.008 326)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.145 0.008 326)",primary:"oklch(0.212 0.019 322.12)","primary-foreground":"oklch(0.985 0 0)",secondary:"oklch(0.96 0.003 325.6)","secondary-foreground":"oklch(0.212 0.019 322.12)",muted:"oklch(0.96 0.003 325.6)","muted-foreground":"oklch(0.542 0.034 322.5)",accent:"oklch(0.96 0.003 325.6)","accent-foreground":"oklch(0.212 0.019 322.12)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.985 0 0)",border:"oklch(0.922 0.005 325.62)",input:"oklch(0.922 0.005 325.62)",ring:"oklch(0.711 0.019 323.02)"},dark:{background:"oklch(0.145 0.008 326)",foreground:"oklch(0.985 0 0)",card:"oklch(0.212 0.019 322.12)","card-foreground":"oklch(0.985 0 0)",popover:"oklch(0.212 0.019 322.12)","popover-foreground":"oklch(0.985 0 0)",primary:"oklch(0.922 0.005 325.62)","primary-foreground":"oklch(0.212 0.019 322.12)",secondary:"oklch(0.263 0.024 320.12)","secondary-foreground":"oklch(0.985 0 0)",muted:"oklch(0.263 0.024 320.12)","muted-foreground":"oklch(0.711 0.019 323.02)",accent:"oklch(0.263 0.024 320.12)","accent-foreground":"oklch(0.985 0 0)",destructive:"oklch(0.704 0.191 22.216)","destructive-foreground":"oklch(0.985 0 0)",border:"oklch(0.263 0.024 320.12)",input:"oklch(0.263 0.024 320.12)",ring:"oklch(0.542 0.034 322.5)"}}},olive:{hsl:{light:{background:"0 0% 100%",foreground:"107 3% 5%",card:"0 0% 100%","card-foreground":"107 3% 5%",popover:"0 0% 100%","popover-foreground":"107 3% 5%",primary:"107 6% 13%","primary-foreground":"107 4% 98%",secondary:"107 4% 95%","secondary-foreground":"107 6% 13%",muted:"107 4% 95%","muted-foreground":"107 9% 45%",accent:"107 4% 95%","accent-foreground":"107 6% 13%",destructive:"0 84.2% 60.2%","destructive-foreground":"107 4% 98%",border:"107 5% 91%",input:"107 5% 91%",ring:"107 6% 13%"},dark:{background:"107 3% 5%",foreground:"107 4% 98%",card:"107 6% 13%","card-foreground":"107 4% 98%",popover:"107 6% 13%","popover-foreground":"107 4% 98%",primary:"107 5% 91%","primary-foreground":"107 6% 13%",secondary:"107 4% 17%","secondary-foreground":"107 4% 98%",muted:"107 4% 17%","muted-foreground":"107 6% 65%",accent:"107 4% 17%","accent-foreground":"107 4% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"107 4% 98%",border:"107 4% 17%",input:"107 4% 17%",ring:"107 9% 45%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.153 0.006 107.1)",card:"oklch(1 0 0)","card-foreground":"oklch(0.153 0.006 107.1)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.153 0.006 107.1)",primary:"oklch(0.228 0.013 107.4)","primary-foreground":"oklch(0.988 0.003 106.5)",secondary:"oklch(0.966 0.005 106.5)","secondary-foreground":"oklch(0.228 0.013 107.4)",muted:"oklch(0.966 0.005 106.5)","muted-foreground":"oklch(0.58 0.031 107.3)",accent:"oklch(0.966 0.005 106.5)","accent-foreground":"oklch(0.228 0.013 107.4)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.988 0.003 106.5)",border:"oklch(0.93 0.007 106.5)",input:"oklch(0.93 0.007 106.5)",ring:"oklch(0.737 0.021 106.9)"},dark:{background:"oklch(0.153 0.006 107.1)",foreground:"oklch(0.988 0.003 106.5)",card:"oklch(0.228 0.013 107.4)","card-foreground":"oklch(0.988 0.003 106.5)",popover:"oklch(0.228 0.013 107.4)","popover-foreground":"oklch(0.988 0.003 106.5)",primary:"oklch(0.93 0.007 106.5)","primary-foreground":"oklch(0.228 0.013 107.4)",secondary:"oklch(0.286 0.016 107.4)","secondary-foreground":"oklch(0.988 0.003 106.5)",muted:"oklch(0.286 0.016 107.4)","muted-foreground":"oklch(0.737 0.021 106.9)",accent:"oklch(0.286 0.016 107.4)","accent-foreground":"oklch(0.988 0.003 106.5)",destructive:"oklch(0.704 0.191 22.216)","destructive-foreground":"oklch(0.988 0.003 106.5)",border:"oklch(0.286 0.016 107.4)",input:"oklch(0.286 0.016 107.4)",ring:"oklch(0.58 0.031 107.3)"}}},mist:{hsl:{light:{background:"0 0% 100%",foreground:"228 4% 5%",card:"0 0% 100%","card-foreground":"228 4% 5%",popover:"0 0% 100%","popover-foreground":"228 4% 5%",primary:"223 6% 13%","primary-foreground":"197 2% 98%",secondary:"197 2% 95%","secondary-foreground":"223 6% 13%",muted:"197 2% 95%","muted-foreground":"213 7% 45%",accent:"197 2% 95%","accent-foreground":"223 6% 13%",destructive:"0 84.2% 60.2%","destructive-foreground":"197 2% 98%",border:"214 5% 91%",input:"214 5% 91%",ring:"223 6% 13%"},dark:{background:"228 4% 5%",foreground:"197 2% 98%",card:"223 6% 13%","card-foreground":"197 2% 98%",popover:"223 6% 13%","popover-foreground":"197 2% 98%",primary:"214 5% 91%","primary-foreground":"223 6% 13%",secondary:"216 4% 17%","secondary-foreground":"197 2% 98%",muted:"216 4% 17%","muted-foreground":"214 6% 65%",accent:"216 4% 17%","accent-foreground":"197 2% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"197 2% 98%",border:"216 4% 17%",input:"216 4% 17%",ring:"213 7% 45%"}},oklch:{light:{background:"oklch(1 0 0)",foreground:"oklch(0.148 0.004 228.8)",card:"oklch(1 0 0)","card-foreground":"oklch(0.148 0.004 228.8)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.148 0.004 228.8)",primary:"oklch(0.218 0.008 223.9)","primary-foreground":"oklch(0.987 0.002 197.1)",secondary:"oklch(0.963 0.002 197.1)","secondary-foreground":"oklch(0.218 0.008 223.9)",muted:"oklch(0.963 0.002 197.1)","muted-foreground":"oklch(0.56 0.021 213.5)",accent:"oklch(0.963 0.002 197.1)","accent-foreground":"oklch(0.218 0.008 223.9)",destructive:"oklch(0.577 0.245 27.325)","destructive-foreground":"oklch(0.987 0.002 197.1)",border:"oklch(0.925 0.005 214.3)",input:"oklch(0.925 0.005 214.3)",ring:"oklch(0.723 0.014 214.4)"},dark:{background:"oklch(0.148 0.004 228.8)",foreground:"oklch(0.987 0.002 197.1)",card:"oklch(0.218 0.008 223.9)","card-foreground":"oklch(0.987 0.002 197.1)",popover:"oklch(0.218 0.008 223.9)","popover-foreground":"oklch(0.987 0.002 197.1)",primary:"oklch(0.925 0.005 214.3)","primary-foreground":"oklch(0.218 0.008 223.9)",secondary:"oklch(0.275 0.011 216.9)","secondary-foreground":"oklch(0.987 0.002 197.1)",muted:"oklch(0.275 0.011 216.9)","muted-foreground":"oklch(0.723 0.014 214.4)",accent:"oklch(0.275 0.011 216.9)","accent-foreground":"oklch(0.987 0.002 197.1)",destructive:"oklch(0.704 0.191 22.216)","destructive-foreground":"oklch(0.987 0.002 197.1)",border:"oklch(0.275 0.011 216.9)",input:"oklch(0.275 0.011 216.9)",ring:"oklch(0.56 0.021 213.5)"}}}},xe={default:{radius:"0.5rem",fontSans:"Inter",defaultBaseColor:"slate"},"new-york":{radius:"0.5rem",fontSans:"Inter",defaultBaseColor:"zinc"},luma:{radius:"0.75rem",fontSans:"Inter",defaultBaseColor:"neutral"},lyra:{radius:"0.125rem",fontSans:"JetBrains Mono",defaultBaseColor:"stone"},maia:{radius:"1rem",fontSans:"Inter",defaultBaseColor:"neutral"},mira:{radius:"1.5rem",fontSans:"Inter",defaultBaseColor:"zinc"},nova:{radius:"0.125rem",fontSans:"Inter",defaultBaseColor:"neutral"},rhea:{radius:"1.5rem",fontSans:"Inter",defaultBaseColor:"neutral"},sera:{radius:"0rem",fontSans:"Instrument Serif",defaultBaseColor:"taupe"},vega:{radius:"0.625rem",fontSans:"Inter",defaultBaseColor:"neutral"}};function Ge(e,r,n,s,t){let o=xe[e]??xe["new-york"],i="zinc";n in K?i=n:i=o.defaultBaseColor;let a=K[i],l=o.radius,c=r==="uniwind"?"oklch":"hsl",u=s?re(s,c):null,b=ne(t??s??"blue",c),k=`:root {
6
+ --font-sans: ${o.fontSans}, ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji,
7
+ Segoe UI Symbol, Noto Color Emoji;
8
+ --font-display:
9
+ Spline Sans, Inter, ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji,
10
+ Segoe UI Symbol, Noto Color Emoji;
11
+ --font-mono:
12
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
13
+ --font-rounded: 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Meiryo, 'MS PGothic', sans-serif;
14
+ --font-serif: Georgia, 'Times New Roman', serif;
15
+ }
16
+ `;if(r==="uniwind"){let f="";for(let[m,x]of Object.entries(a.oklch.light)){if(u&&m==="primary"){f+=` --primary: ${u.light.primary};
17
+ `;continue}if(u&&m==="primary-foreground"){f+=` --primary-foreground: ${u.light.foreground};
18
+ `;continue}f+=` --${m}: ${x};
19
+ `;}b.light.forEach((m,x)=>{f+=` --chart-${x+1}: ${m};
20
+ `;});let d="";for(let[m,x]of Object.entries(a.oklch.dark)){if(u&&m==="primary"){d+=` --primary: ${u.dark.primary};
21
+ `;continue}if(u&&m==="primary-foreground"){d+=` --primary-foreground: ${u.dark.foreground};
22
+ `;continue}d+=` --${m}: ${x};
23
+ `;}return b.dark.forEach((m,x)=>{d+=` --chart-${x+1}: ${m};
24
+ `;}),`@theme inline {
25
+ /* shadcn-style multiplicative radius scale. Small control tokens (sm/md)
26
+ scale freely so short controls can still clamp to pills; container tokens
27
+ (lg..4xl) are px-capped via min() so cards/dialogs/alerts can never grow
28
+ into ovals regardless of how large --radius is. */
29
+ --radius: ${l};
30
+ --radius-sm: calc(var(--radius) * 0.6);
31
+ --radius-md: calc(var(--radius) * 0.8);
32
+ --radius-lg: min(var(--radius), 20px);
33
+ --radius-xl: min(calc(var(--radius) * 1.4), 24px);
34
+ --radius-2xl: min(calc(var(--radius) * 1.8), 28px);
35
+ --radius-3xl: min(calc(var(--radius) * 2.2), 32px);
36
+ --radius-4xl: min(calc(var(--radius) * 2.6), 32px);
37
+
38
+ --color-background: var(--background);
39
+ --color-foreground: var(--foreground);
40
+ --color-card: var(--card);
41
+ --color-card-foreground: var(--card-foreground);
42
+ --color-popover: var(--popover);
43
+ --color-popover-foreground: var(--popover-foreground);
44
+ --color-primary: var(--primary);
45
+ --color-primary-foreground: var(--primary-foreground);
46
+ --color-secondary: var(--secondary);
47
+ --color-secondary-foreground: var(--secondary-foreground);
48
+ --color-muted: var(--muted);
49
+ --color-muted-foreground: var(--muted-foreground);
50
+ --color-accent: var(--accent);
51
+ --color-accent-foreground: var(--accent-foreground);
52
+ --color-destructive: var(--destructive);
53
+ --color-destructive-foreground: var(--destructive-foreground);
54
+ --color-border: var(--border);
55
+ --color-input: var(--input);
56
+ --color-ring: var(--ring);
57
+ --color-chart-1: var(--chart-1);
58
+ --color-chart-2: var(--chart-2);
59
+ --color-chart-3: var(--chart-3);
60
+ --color-chart-4: var(--chart-4);
61
+ --color-chart-5: var(--chart-5);
62
+ }
63
+
64
+ :root {
65
+ ${f}}
66
+
67
+ .dark {
68
+ ${d}}
69
+
70
+ ${k}`}else {let f="";for(let[m,x]of Object.entries(a.hsl.light)){if(u&&m==="primary"){f+=` --primary: ${u.light.primary};
71
+ `;continue}if(u&&m==="primary-foreground"){f+=` --primary-foreground: ${u.light.foreground};
72
+ `;continue}f+=` --${m}: ${x};
73
+ `;}b.light.forEach((m,x)=>{f+=` --chart-${x+1}: ${m};
74
+ `;});let d="";for(let[m,x]of Object.entries(a.hsl.dark)){if(u&&m==="primary"){d+=` --primary: ${u.dark.primary};
75
+ `;continue}if(u&&m==="primary-foreground"){d+=` --primary-foreground: ${u.dark.foreground};
76
+ `;continue}d+=` --${m}: ${x};
77
+ `;}return b.dark.forEach((m,x)=>{d+=` --chart-${x+1}: ${m};
78
+ `;}),`@layer base {
79
+ :root {
80
+ --radius: ${l};
81
+ ${f} }
82
+
83
+ .dark:root {
84
+ ${d} }
85
+ }
86
+
87
+ ${k}`}}async function se(e,r,n,s,t,o,i){let a=v.join(e,n);p.ensureDirSync(v.dirname(a));let l="";r==="uniwind"?(l+=`@import "tailwindcss";
88
+ `,l+=`@import "uniwind";
89
+ `):(l+=`@tailwind base;
90
+ `,l+=`@tailwind components;
91
+ `,l+=`@tailwind utilities;
92
+ `),l+=`
93
+ `+Ge(s,r,t,o,i)+`
94
+ `,p.writeFileSync(a,l,"utf8"),console.log(g.green(`\u2714 Configured global CSS for style ${g.cyan(s)}`));}async function $e(e){await se(e.projectPath,e.styleEngine,e.cssRelativePath,e.style,e.baseColor,e.theme,e.chartColor);}function He(e,r,n,s){let t=["metro.config.js","metro.config.ts","metro.config.cjs","metro.config.mjs"],o=null;for(let i of t)if(p.existsSync(v.join(e,i))){o=i;break}if(o){let i=v.join(e,o),a=p.readFileSync(i,"utf8");r==="uniwind"&&!a.includes("withUniwindConfig")?(a=`const { withUniwindConfig } = require('uniwind/metro');
95
+ `+a,a.includes("module.exports = ")&&(a=a.replace(/module\.exports\s*=\s*(.+?)(;?\s*$)/s,`module.exports = withUniwindConfig($1, {
96
+ cssEntryFile: '${n}',
97
+ dtsFile: '${s?"./src/uniwind-types.d.ts":"./uniwind-types.d.ts"}'
98
+ })$2`)),p.writeFileSync(i,a,"utf8"),console.log(g.green(`\u2714 Updated ${g.cyan(o)}`))):r==="nativewind"&&!a.includes("withNativeWind")&&(a=`const { withNativeWind } = require('nativewind/metro');
99
+ `+a,a.includes("module.exports = ")&&(a=a.replace(/module\.exports\s*=\s*(.+?)(;?\s*$)/s,`module.exports = withNativeWind($1, { input: '${n}' })$2`)),p.writeFileSync(i,a,"utf8"),console.log(g.green(`\u2714 Updated ${g.cyan(o)}`)));}else {let i=v.join(e,"metro.config.js"),a="";r==="uniwind"?a=`const { getDefaultConfig } = require('expo/metro-config');
100
+ const { withUniwindConfig } = require('uniwind/metro');
101
+
102
+ const config = getDefaultConfig(__dirname);
103
+
104
+ module.exports = withUniwindConfig(config, {
105
+ cssEntryFile: '${n}',
106
+ dtsFile: '${s?"./src/uniwind-types.d.ts":"./uniwind-types.d.ts"}'
107
+ });
108
+ `:a=`const { getDefaultConfig } = require("expo/metro-config");
109
+ const { withNativeWind } = require('nativewind/metro');
110
+
111
+ const config = getDefaultConfig(__dirname);
112
+
113
+ module.exports = withNativeWind(config, { input: '${n}' });
114
+ `,p.writeFileSync(i,a,"utf8"),console.log(g.green(`\u2714 Created ${g.cyan("metro.config.js")}`));}}function Ve(e,r){let n=["tailwind.config.js","tailwind.config.ts","tailwind.config.cjs","tailwind.config.mjs"],s=null;for(let f of n)if(p.existsSync(v.join(e,f))){s=f;break}if(!s){if(p.existsSync(r)){let f=v.join(e,"tailwind.config.js");p.copySync(r,f),console.log(g.green(`\u2714 Created ${g.cyan("tailwind.config.js")}`));}return}let t=v.join(e,s),o=p.readFileSync(t,"utf8"),i=o,a=[],l=/require\(\s*["']nativewind\/theme["']\s*\)/.test(o),c=/\bhairlineWidth\b/.test(o);l||(o=`const { hairlineWidth } = require("nativewind/theme");
115
+ `+o,a.push("nativewind/theme import")),/darkMode\s*:/.test(o)||(o=o.replace(/module\.exports\s*=\s*\{/,`module.exports = {
116
+ darkMode: "class",`),a.push("darkMode"));let u=!/colors\s*:\s*\{[^}]*hsl\(var\(--background\)\)/s.test(o),b=!/borderRadius\s*:\s*\{[^}]*var\(--radius\)/s.test(o),k=!/["']accordion-down["']\s*:/.test(o);if(u||b||k){let f=We({includeColors:u,includeBorderRadius:b,includeBorderWidth:c?!/borderWidth\s*:/.test(o):false,includeKeyframes:k});/theme\s*:\s*\{\s*extend\s*:\s*\{\s*\}/.test(o)?o=o.replace(/theme\s*:\s*\{\s*extend\s*:\s*\{\s*\}\s*,?\s*\}/,`theme: {
117
+ extend: ${f}
118
+ }`):/theme\s*:\s*\{\s*extend\s*:\s*\{/.test(o)?o=o.replace(/theme\s*:\s*\{\s*extend\s*:\s*\{/,d=>`${d}
119
+ ...${f},`):/theme\s*:\s*\{/.test(o)?o=o.replace(/theme\s*:\s*\{/,`theme: {
120
+ extend: ${f},`):o=o.replace(/module\.exports\s*=\s*\{/,`module.exports = {
121
+ theme: {
122
+ extend: ${f},
123
+ },`),a.push("theme.extend (colors/borderRadius/keyframes)");}/["']?chart-1["']?\s*:/.test(o)||/card:\s*\{[^}]*hsl\(var\(--card-foreground\)\)[^}]*\},/s.test(o)&&(o=o.replace(/(card:\s*\{[^}]*hsl\(var\(--card-foreground\)\)[^}]*\},)/s,`$1
124
+ "chart-1": "hsl(var(--chart-1))",
125
+ "chart-2": "hsl(var(--chart-2))",
126
+ "chart-3": "hsl(var(--chart-3))",
127
+ "chart-4": "hsl(var(--chart-4))",
128
+ "chart-5": "hsl(var(--chart-5))",`),a.push("chart colors")),/tailwindcss-animate/.test(o)||(/plugins\s*:\s*\[\s*\]/.test(o)?o=o.replace(/plugins\s*:\s*\[\s*\]/,'plugins: [require("tailwindcss-animate")]'):/plugins\s*:\s*\[/.test(o)?o=o.replace(/plugins\s*:\s*\[/,'plugins: [require("tailwindcss-animate"), '):o=o.replace(/module\.exports\s*=\s*\{/,`module.exports = {
129
+ plugins: [require("tailwindcss-animate")],`),a.push("tailwindcss-animate plugin")),o!==i&&(p.writeFileSync(t,o,"utf8"),console.log(g.green(`\u2714 Updated ${g.cyan(s)} (${a.join(", ")})`)));}function We(e){let r=[];return e.includeColors&&r.push(` colors: {
130
+ border: "hsl(var(--border))",
131
+ input: "hsl(var(--input))",
132
+ ring: "hsl(var(--ring))",
133
+ background: "hsl(var(--background))",
134
+ foreground: "hsl(var(--foreground))",
135
+ primary: {
136
+ DEFAULT: "hsl(var(--primary))",
137
+ foreground: "hsl(var(--primary-foreground))",
138
+ },
139
+ secondary: {
140
+ DEFAULT: "hsl(var(--secondary))",
141
+ foreground: "hsl(var(--secondary-foreground))",
142
+ },
143
+ destructive: {
144
+ DEFAULT: "hsl(var(--destructive))",
145
+ foreground: "hsl(var(--destructive-foreground))",
146
+ },
147
+ muted: {
148
+ DEFAULT: "hsl(var(--muted))",
149
+ foreground: "hsl(var(--muted-foreground))",
150
+ },
151
+ accent: {
152
+ DEFAULT: "hsl(var(--accent))",
153
+ foreground: "hsl(var(--accent-foreground))",
154
+ },
155
+ popover: {
156
+ DEFAULT: "hsl(var(--popover))",
157
+ foreground: "hsl(var(--popover-foreground))",
158
+ },
159
+ card: {
160
+ DEFAULT: "hsl(var(--card))",
161
+ foreground: "hsl(var(--card-foreground))",
162
+ },
163
+ "chart-1": "hsl(var(--chart-1))",
164
+ "chart-2": "hsl(var(--chart-2))",
165
+ "chart-3": "hsl(var(--chart-3))",
166
+ "chart-4": "hsl(var(--chart-4))",
167
+ "chart-5": "hsl(var(--chart-5))",
168
+ }`),e.includeBorderRadius&&r.push(` borderRadius: {
169
+ "4xl": "min(calc(var(--radius) * 2.6), 32px)",
170
+ "3xl": "min(calc(var(--radius) * 2.2), 32px)",
171
+ "2xl": "min(calc(var(--radius) * 1.8), 28px)",
172
+ xl: "min(calc(var(--radius) * 1.4), 24px)",
173
+ lg: "min(var(--radius), 20px)",
174
+ md: "calc(var(--radius) * 0.8)",
175
+ sm: "calc(var(--radius) * 0.6)",
176
+ }`),e.includeBorderWidth&&r.push(` borderWidth: {
177
+ hairline: hairlineWidth(),
178
+ }`),e.includeKeyframes&&(r.push(` keyframes: {
179
+ "accordion-down": {
180
+ from: { height: "0" },
181
+ to: { height: "var(--radix-accordion-content-height)" },
182
+ },
183
+ "accordion-up": {
184
+ from: { height: "var(--radix-accordion-content-height)" },
185
+ to: { height: "0" },
186
+ },
187
+ }`),r.push(` animation: {
188
+ "accordion-down": "accordion-down 0.2s ease-out",
189
+ "accordion-up": "accordion-up 0.2s ease-out",
190
+ }`)),`{
191
+ ${r.join(`,
192
+ `)},
193
+ }`}function ze(e){let r=["babel.config.js","babel.config.cjs"],n=null;for(let s of r)if(p.existsSync(v.join(e,s))){n=s;break}if(n){let s=v.join(e,n),t=p.readFileSync(s,"utf8");t.includes("nativewind/babel")||(t=t.replace(/presets:\s*\[\s*(['"])babel-preset-expo\1\s*\]/,'presets: [["babel-preset-expo", { jsxImportSource: "nativewind" }], "nativewind/babel"]'),p.writeFileSync(s,t,"utf8"),console.log(g.green(`\u2714 Updated ${g.cyan(n)}`)));}}function Je(e,r){let n=["src/app/_layout.tsx","app/_layout.tsx","src/app/_layout.jsx","app/_layout.jsx","src/app/_layout.js","app/_layout.js","App.tsx","App.jsx","App.js","src/App.tsx","src/App.js"],s=null;for(let t of n)if(p.existsSync(v.join(e,t))){s=t;break}if(s){let t=v.join(e,s),o=p.readFileSync(t,"utf8"),i=v.dirname(v.join(e,s)),a=v.resolve(e,r),l=v.relative(i,a).replace(/\\/g,"/");l.startsWith(".")||(l="./"+l),o.includes("global.css")||o.includes("globals.css")||(o=`import "${l}";
194
+ `+o,p.writeFileSync(t,o,"utf8"),console.log(g.green(`\u2714 Updated ${g.cyan(s)}`)));}}function Ye(e){let r=["src/app/_layout.tsx","app/_layout.tsx","src/app/_layout.jsx","app/_layout.jsx","src/app/_layout.js","app/_layout.js","App.tsx","App.jsx","App.js","src/App.tsx","src/App.js"],n=null;for(let a of r)if(p.existsSync(v.join(e,a))){n=a;break}if(!n)return;let s=v.join(e,n),o=p.readFileSync(s,"utf8"),i=[];if(o.includes("PortalHost")||(o.includes("</ThemeProvider>")?(o=o.replace(/(\s*)<\/ThemeProvider>/,`$1 <PortalHost />
195
+ $1</ThemeProvider>`),i.push("PortalHost")):o.includes("</>")&&(o=o.replace(/(\s*)<\/>/,`$1 <PortalHost />
196
+ $1</>`),i.push("PortalHost")),i.includes("PortalHost")&&(o=`import { PortalHost } from "@rn-primitives/portal";
197
+ ${o}`)),!o.includes("GestureHandlerRootView")){let a=o.indexOf("<ThemeProvider"),l="</ThemeProvider>",c=o.lastIndexOf(l);if(a!==-1&&c!==-1&&c>a){let u=o.slice(0,a),b=o.slice(a,c+l.length),k=o.slice(c+l.length);o=u+`<GestureHandlerRootView style={{ flex: 1 }}>
198
+ `+b+`
199
+ </GestureHandlerRootView>`+k,o=`import { GestureHandlerRootView } from "react-native-gesture-handler";
200
+ ${o}`,i.push("GestureHandlerRootView");}}i.length!==0&&(p.writeFileSync(s,o,"utf8"),console.log(g.green(`Updated ${g.cyan(n)} with ${i.join(" + ")}`)));}function qe(e,r){let n={npm:["package-lock.json"],yarn:["yarn.lock"],pnpm:["pnpm-lock.yaml"],bun:["bun.lock","bun.lockb"]};for(let[t,o]of Object.entries(n))if(t!==r)for(let i of o){let a=v.join(e,i);p.existsSync(a)&&p.removeSync(a);}let s=v.join(e,"package.json");if(p.existsSync(s))try{let t=p.readJsonSync(s);delete t.packageManager,p.writeJsonSync(s,t,{spaces:2});}catch{}}function _(e){let r=e.split(/\s+/);if(r.length<3)return "#ffffff";let[n="0",s="0%",t="0%"]=r,o=parseFloat(n),i=parseFloat(s.replace("%",""))/100,a=parseFloat(t.replace("%",""))/100,l=b=>(b+o/30)%12,c=i*Math.min(a,1-a),u=b=>{let k=a-c*Math.max(-1,Math.min(l(b)-3,9-l(b),1));return Math.round(255*k).toString(16).padStart(2,"0")};return `#${u(0)}${u(8)}${u(4)}`}function Se(e,r){let n=["src/constants/theme.ts","constants/theme.ts","src/constants/theme.js","constants/theme.js"],s=null;for(let C of n)if(p.existsSync(v.join(e,C))){s=C;break}if(!s)return;let t=v.join(e,s),o=p.readFileSync(t,"utf8"),i="zinc";r in K?i=r:i="neutral";let a=K[i],l=_(a.hsl.light.background),c=_(a.hsl.light.foreground),u=_(a.hsl.light.muted),b=_(a.hsl.light.accent),k=_(a.hsl.light["muted-foreground"]),f=_(a.hsl.dark.background),d=_(a.hsl.dark.foreground),m=_(a.hsl.dark.muted),x=_(a.hsl.dark.accent),h=_(a.hsl.dark["muted-foreground"]),w=`export const Colors = {
201
+ light: {
202
+ text: '${c}',
203
+ background: '${l}',
204
+ backgroundElement: '${u}',
205
+ backgroundSelected: '${b}',
206
+ textSecondary: '${k}',
207
+ },
208
+ dark: {
209
+ text: '${d}',
210
+ background: '${f}',
211
+ backgroundElement: '${m}',
212
+ backgroundSelected: '${x}',
213
+ textSecondary: '${h}',
214
+ },
215
+ } as const;`;o=o.replace(/export\s+const\s+Colors\s*=\s*\{[\s\S]*?\}\s*as\s+const;/g,w),p.writeFileSync(t,o,"utf8"),console.log(g.green(`\u2714 Configured theme colors in ${g.cyan(s)}`));}var Xe=fileURLToPath(import.meta.url),z=v.dirname(Xe),eo=new Set(["alert-dialog","context-menu","dialog","dropdown-menu","hover-card","popover","select","tooltip"]),oo="@rn-primitives/portal@^1.5.2",ro="react-native-gesture-handler";function no(e){try{let r=p.readJsonSync(v.join(e,"package.json"));return !!(r?.dependencies?.expo||r?.devDependencies?.expo)}catch{return false}}function to(e,r,n){if(!n)return {cmd:e,args:["install",...r]};switch(e){case "pnpm":return {cmd:"pnpm",args:["exec","expo","install",...r]};case "yarn":return {cmd:"yarn",args:["expo","install",...r]};case "bun":return {cmd:"bunx",args:["expo","install",...r]};default:return {cmd:"npx",args:["expo","install",...r]}}}var so=z$1.object({components:z$1.array(z$1.string()).optional(),yes:z$1.boolean().default(false),overwrite:z$1.boolean().default(false),cwd:z$1.string(),packageManager:z$1.enum(["npm","yarn","pnpm","bun"]).optional()}),Ee=new Command().name("add").description("add components to your project").argument("[components...]","the components to add").option("-y, --yes","skip confirmation prompt.",false).option("-o, --overwrite","overwrite existing files.",false).option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-p, --package-manager <package-manager>","the package manager to use. (npm, yarn, pnpm, bun)").action(async(e,r)=>{try{let n=so.parse({components:e,...r,cwd:v.resolve(r.cwd)});await ae(n);}catch(n){console.error(g.red(`
216
+ Component installation failed:`)),console.error(n),process.exit(1);}});async function ae(e){let r=e.cwd,n=v.join(r,"lvcn.json");if(!p.existsSync(n))throw new Error("Configuration file 'lvcn.json' not found. Please run 'init' first to configure your project.");let s=p.readJsonSync(n),t=e.components||[];if(t.length===0){let f=await G({type:"multiselect",name:"components",message:"Which components would you like to add?",choices:["accordion","alert","alert-dialog","aspect-ratio","avatar","badge","button","card","checkbox","collapsible","context-menu","dialog","dropdown-menu","hover-card","icon","input","label","menubar","native-only-animated-view","popover","progress","radio-group","select","separator","skeleton","switch","tabs","text","textarea","toggle","toggle-group","tooltip"].map(d=>({title:d,value:d})),instructions:"Space to select. A to toggle all. Enter to submit."});(!f.components||f.components.length===0)&&process.exit(0),t=f.components;}let o=s.style||"default",i=s.styleEngine||"nativewind",a=e.packageManager||co(r),l=[...t],c=new Set,u=new Set,b=[];for(;l.length>0;){let k=l.shift();if(c.has(k))continue;console.log(g.blue(`Resolving ${g.cyan(k)}...`));let f;try{f=await uo(k,o,i);}catch(d){throw new Error(`Component '${k}' not found in registry under style '${o}' and engine '${i}': ${d.message}`)}c.add(k),f.dependencies&&f.dependencies.forEach(d=>u.add(d)),f.registryDependencies&&f.registryDependencies.forEach(d=>{c.has(d)||l.push(d);}),f.files&&b.push(...f.files);}if(Array.from(c).some(k=>eo.has(k))&&(u.add(oo),u.add(ro),io(r)),u.size>0){let k=Array.from(u);console.log(g.blue(`Installing npm dependencies: ${g.cyan(k.join(", "))}...`));let{cmd:f,args:d}=to(a,k,no(r));await execa(f,d,{cwd:r,stdio:"inherit"});}for(let k of b){let f=s.aliases||{},d=k.path,m;if(d.startsWith("components/ui/")){let h=v.basename(d),w=ie(r,f.ui||"@/components/ui");m=v.join(w,h);}else if(d.startsWith("components/")){let h=v.basename(d),w=ie(r,f.components||"@/components");m=v.join(w,h);}else if(d.includes("utils")){let h=ie(r,f.utils||"@/lib/utils");m=h.endsWith(".ts")||h.endsWith(".js")?h:h+(s.tsx?".ts":".js");}else m=v.join(r,d);if(p.ensureDirSync(v.dirname(m)),p.existsSync(m)&&!e.overwrite&&!e.yes&&!(await G({type:"confirm",name:"overwrite",message:`File ${g.cyan(v.relative(r,m))} already exists. Overwrite?`,initial:false})).overwrite){console.log(g.yellow(`Skipped ${v.relative(r,m)}`));continue}let x=ao(k.content,f);p.writeFileSync(m,x,"utf8"),console.log(g.green(`\u2714 Created ${g.cyan(v.relative(r,m))}`));}s.components||(s.components=[]);for(let k of c)s.components.includes(k)||s.components.push(k);p.writeJsonSync(n,s,{spaces:2}),console.log(g.green(`
217
+ Component(s) added successfully! \u{1F389}`));}function io(e){let r=["src/app/_layout.tsx","app/_layout.tsx","src/app/_layout.jsx","app/_layout.jsx","src/app/_layout.js","app/_layout.js","App.tsx","App.jsx","App.js","src/App.tsx","src/App.js"],n=null;for(let a of r)if(p.existsSync(v.join(e,a))){n=a;break}if(!n)return;let s=v.join(e,n),o=p.readFileSync(s,"utf8"),i=[];if(o.includes("PortalHost")||(o.includes("</ThemeProvider>")?(o=o.replace(/(\s*)<\/ThemeProvider>/,`$1 <PortalHost />
218
+ $1</ThemeProvider>`),i.push("PortalHost")):o.includes("</>")&&(o=o.replace(/(\s*)<\/>/,`$1 <PortalHost />
219
+ $1</>`),i.push("PortalHost")),i.includes("PortalHost")&&(o=`import { PortalHost } from "@rn-primitives/portal";
220
+ ${o}`)),!o.includes("GestureHandlerRootView")){let a=o.indexOf("<ThemeProvider"),l="</ThemeProvider>",c=o.lastIndexOf(l);if(a!==-1&&c!==-1&&c>a){let u=o.slice(0,a),b=o.slice(a,c+l.length),k=o.slice(c+l.length);o=u+`<GestureHandlerRootView style={{ flex: 1 }}>
221
+ `+b+`
222
+ </GestureHandlerRootView>`+k,o=`import { GestureHandlerRootView } from "react-native-gesture-handler";
223
+ ${o}`,i.push("GestureHandlerRootView");}}i.length!==0&&(p.writeFileSync(s,o,"utf8"),console.log(g.green(`Updated ${g.cyan(n)} with ${i.join(" + ")}`)));}function ie(e,r){let n=r.replace(/^([@~]\/)/,"");return p.existsSync(v.join(e,"src"))&&!n.startsWith("src/")?v.resolve(e,"src",n):v.resolve(e,n)}function ao(e,r){let n=c=>c.replace(/\/+$/,""),s=n(r.ui||"@/components/ui"),t=n(r.components||"@/components"),o=n(r.utils||"@/lib/utils"),i="__LOVDA_UI_ALIAS__",a="__LOVDA_UTILS_ALIAS__",l=e.replace(/@\/registry\/(?:nativewind|uniwind)\//g,"@/").replace(/~\/components\/ui\//g,"@/components/ui/").replace(/~\/components\//g,"@/components/").replace(/~\/lib\/utils/g,"@/lib/utils");return l=l.replace(/@\/components\/ui\//g,`${i}/`).replace(/@\/lib\/utils/g,a).replace(/@\/components\//g,`${t}/`).replace(new RegExp(`${i}/`,"g"),`${s}/`).replace(new RegExp(a,"g"),o),l}function co(e){if(p.existsSync(v.join(e,"bun.lockb"))||p.existsSync(v.join(e,"bun.lock")))return "bun";if(p.existsSync(v.join(e,"pnpm-lock.yaml")))return "pnpm";if(p.existsSync(v.join(e,"yarn.lock")))return "yarn";if(p.existsSync(v.join(e,"package-lock.json")))return "npm";let r=process.env.npm_config_user_agent||"";return r.startsWith("pnpm")?"pnpm":r.startsWith("bun")?"bun":r.startsWith("yarn")?"yarn":"npm"}function lo(){if(process.env.LOVDA_REGISTRY_URL)return process.env.LOVDA_REGISTRY_URL;let e=[v.resolve(z,"../../../apps/v2/public/r"),v.resolve(z,"../../../../apps/v2/public/r"),v.resolve(z,"../../apps/v2/public/r"),v.resolve(z,"../../../../../apps/v2/public/r"),v.resolve(z,"../../../../../../apps/v2/public/r")];for(let r of e)if(p.existsSync(r))return r;return X}async function uo(e,r,n){let s=lo();if(s.startsWith("file://")||!s.startsWith("http")){let t=s.replace("file://",""),o=v.resolve(t,`styles/${n}/${r}/${e}.json`);return await p.readJson(o)}else {let t=await fetch(`${s}/styles/${n}/${r}/${e}.json`);if(!t.ok)throw new Error(`Failed to fetch component from registry: ${t.statusText}`);return await t.json()}}var go=new Command().name("decode").description("decode a preset code into its values").argument("<code>","the preset code to decode").option("--json","output as JSON",false).action((e,r)=>{let n=A(e);if(n||(console.error(g.red(`Invalid preset code: ${e}`)),process.exit(1)),r.json){console.log(JSON.stringify({code:e,values:n},null,2));return}console.log(),console.log(` ${g.bold("Preset Code:")} ${g.cyan(e)}`),console.log(),console.log(` ${g.dim("style:")} ${n.style}`),console.log(` ${g.dim("baseColor:")} ${n.baseColor}`),console.log(` ${g.dim("theme:")} ${n.theme}`),console.log(` ${g.dim("chartColor:")} ${n.chartColor}`),console.log(` ${g.dim("font:")} ${n.font} (${N[n.font]})`),console.log(` ${g.dim("iconLibrary:")} ${n.iconLibrary} (${F[n.iconLibrary]})`),console.log(` ${g.dim("radius:")} ${n.radius} (${D[n.radius]})`),console.log();}),fo=new Command().name("resolve").description("resolve the current preset from your project's lvcn.json").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("--json","output as JSON",false).action(async e=>{let r=v.resolve(e.cwd),n=v.join(r,"lvcn.json");p.existsSync(n)||(console.error(g.red("No lvcn.json found. Run 'init' first.")),process.exit(1));let s=p.readJsonSync(n),t={style:s.style,baseColor:s.baseColor,theme:s.theme,chartColor:s.chartColor,font:s.font,iconLibrary:s.iconLibrary,radius:s.radius};for(let a of Object.keys(t))t[a]===void 0&&delete t[a];let o=Y(t),i=A(o);if(e.json){console.log(JSON.stringify({code:o,values:i},null,2));return}console.log(),console.log(` ${g.bold("Current Preset:")} ${g.cyan(o)}`),console.log(),console.log(` ${g.dim("style:")} ${i.style}`),console.log(` ${g.dim("baseColor:")} ${i.baseColor}`),console.log(` ${g.dim("theme:")} ${i.theme}`),console.log(` ${g.dim("chartColor:")} ${i.chartColor}`),console.log(` ${g.dim("font:")} ${i.font} (${N[i.font]})`),console.log(` ${g.dim("iconLibrary:")} ${i.iconLibrary} (${F[i.iconLibrary]})`),console.log(` ${g.dim("radius:")} ${i.radius} (${D[i.radius]})`),console.log(),console.log(` ${g.dim("Run with:")} ${g.green(`npx lovdacn init --preset ${o}`)}`),console.log();}),ho=new Command().name("apply").description("apply a preset to your existing project").argument("<preset>","preset code or named preset (e.g., nova, sera, a3Kx)").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-y, --yes","skip confirmation prompt",false).option("-p, --package-manager <pm>","package manager to use (npm, yarn, pnpm, bun)").action(async(e,r)=>{let n=v.resolve(r.cwd),s=v.join(n,"lvcn.json");p.existsSync(s)||(console.error(g.red("No lvcn.json found. Run 'init' first.")),process.exit(1));let t,o=O[e];if(o){let{title:d,description:m,...x}=o;t=x;}else if(V(e)){let d=A(e);d||(console.error(g.red(`Invalid preset code: ${e}`)),process.exit(1)),t=d;}else if(J.includes(e)){let d=O[e];if(d){let{title:m,description:x,...h}=d;t=h;}else t={...A(Y({style:e}))};}else console.error(g.red(`Unknown preset: ${e}`)),console.error(g.dim(`Use a named preset (${Object.keys(O).join(", ")}), a preset code, or a style name.`)),process.exit(1);let i=p.readJsonSync(s),a=i.styleEngine||"nativewind";if(console.log(),console.log(` ${g.bold("Applying preset:")} ${g.cyan(e)}`),console.log(),console.log(` ${g.dim("style:")} ${i.style||"\u2014"} \u2192 ${g.green(t.style)}`),console.log(` ${g.dim("baseColor:")} ${i.baseColor||"\u2014"} \u2192 ${g.green(t.baseColor)}`),console.log(` ${g.dim("theme:")} ${i.theme||"\u2014"} \u2192 ${g.green(t.theme)}`),console.log(` ${g.dim("chartColor:")} ${i.chartColor||"\u2014"} \u2192 ${g.green(t.chartColor)}`),console.log(` ${g.dim("font:")} ${i.font||"\u2014"} \u2192 ${g.green(t.font)} (${N[t.font]})`),console.log(` ${g.dim("iconLibrary:")} ${i.iconLibrary||"\u2014"} \u2192 ${g.green(t.iconLibrary)} (${F[t.iconLibrary]})`),console.log(` ${g.dim("radius:")} ${i.radius||"\u2014"} \u2192 ${g.green(t.radius)} (${D[t.radius]})`),console.log(` ${g.dim("engine:")} ${a} (unchanged)`),console.log(),!r.yes){let{proceed:d}=await G({type:"confirm",name:"proceed",message:"Apply this preset? (will overwrite styles and re-install components)",initial:true});d||process.exit(0);}i.style=t.style,i.baseColor=t.baseColor,i.theme=t.theme,i.chartColor=t.chartColor,i.font=t.font,i.iconLibrary=t.iconLibrary,i.radius=t.radius,p.writeJsonSync(s,i,{spaces:2}),console.log(g.green("\u2714 Updated lvcn.json"));let l=i.tailwind?.css||"src/global.css",c=v.join(n,l);p.existsSync(c)&&await $e({projectPath:n,styleEngine:a,cssRelativePath:l,style:t.style,baseColor:t.baseColor,theme:t.theme,chartColor:t.chartColor});let u=r.packageManager||mo(n),b=W[t.font];if(b){console.log(g.blue(`Installing font: ${g.cyan(b)}...`));try{await execa(u,["install",b],{cwd:n,stdio:"inherit"});}catch{console.log(g.yellow(`\u26A0 Could not install ${b}. Install manually.`));}}let k=F[t.iconLibrary];if(k&&t.iconLibrary!=="expo"){let d=[k,"react-native-svg"];console.log(g.blue(`Installing icons: ${g.cyan(d.join(", "))}...`));try{await execa(u,["install",...d],{cwd:n,stdio:"inherit"});}catch{console.log(g.yellow("\u26A0 Could not install icon packages. Install manually."));}}let f=i.components||[];f.length>0&&(console.log(g.blue(`
224
+ Re-installing ${f.length} component(s) with ${g.cyan(t.style)} style...`)),await ae({components:f,yes:true,overwrite:true,cwd:n,packageManager:u})),console.log(),console.log(g.green(`\u2714 Preset ${g.cyan(e)} applied successfully! \u{1F389}`)),console.log();}),ce=new Command().name("preset").description("manage design presets").addCommand(go).addCommand(fo).addCommand(ho).action(()=>{ce.outputHelp();});function mo(e){return p.existsSync(v.join(e,"bun.lockb"))||p.existsSync(v.join(e,"bun.lock"))?"bun":p.existsSync(v.join(e,"pnpm-lock.yaml"))?"pnpm":p.existsSync(v.join(e,"yarn.lock"))?"yarn":(p.existsSync(v.join(e,"package-lock.json")),"npm")}var je="0.0.3";var Q=new Command().name("lovdacn").description("A CLI to initialize and manage Expo/NativeWind projects").version(je);Q.addCommand(Ce);Q.addCommand(Ee);Q.addCommand(ce);Q.parse(process.argv);
package/package.json CHANGED
@@ -1,80 +1,51 @@
1
- {
2
- "name": "lovdacn",
3
- "version": "0.0.2",
4
- "type": "module",
5
- "license": "MIT",
6
- "description": "A CLI for Lavdacn-UI",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/lovdacn-ui/ui.git",
10
- "directory": "apps/cli"
11
- },
12
- "publishConfig": {
13
- "access": "public"
14
- },
15
- "main": "./dist/bin.cjs",
16
- "bin": {
17
- "lovdacn": "./dist/bin.cjs",
18
- "lvcn": "./dist/bin.cjs"
19
- },
20
- "files": [
21
- "dist"
22
- ],
23
- "scripts": {
24
- "build": "tsup",
25
- "build:ts": "tsup",
26
- "clean": "rimraf dist/*",
27
- "check": "tsc -b tsconfig.json",
28
- "dev": "cross-env INTERNAL_ENV=development tsx src/bin.ts",
29
- "lint": "eslint \"**/{src,test,examples,scripts,dtslint}/**/*.{ts,mjs}\"",
30
- "lint-fix": "pnpm lint --fix",
31
- "test": "vitest run",
32
- "coverage": "vitest run --coverage",
33
- "changeset-version": "changeset version && node scripts/version.mjs",
34
- "changeset-publish": "pnpm build && cross-env TEST_DIST= pnpm vitest && changeset publish",
35
- "pub:beta": "pnpm publish --no-git-checks --access public --tag beta",
36
- "pub:next": "pnpm publish --no-git-checks --access public --tag next",
37
- "pub:release": "pnpm publish --access public"
38
- },
39
- "dependencies": {
40
- "tsconfig-paths": "^4.2.0"
41
- },
42
- "devDependencies": {
43
- "@changesets/changelog-github": "^0.5.0",
44
- "@changesets/cli": "^2.27.8",
45
- "@effect/cli": "latest",
46
- "@effect/eslint-plugin": "^0.2.0",
47
- "@effect/language-service": "^0.1.0",
48
- "@effect/platform": "latest",
49
- "@effect/platform-node": "latest",
50
- "@effect/vitest": "latest",
51
- "@eslint/compat": "1.1.1",
52
- "@eslint/eslintrc": "3.1.0",
53
- "@eslint/js": "9.10.0",
54
- "@types/node": "22.10.5",
55
- "@typescript-eslint/eslint-plugin": "^8.4.0",
56
- "@typescript-eslint/parser": "^8.4.0",
57
- "cross-env": "^7.0.3",
58
- "effect": "latest",
59
- "eslint": "^9.10.0",
60
- "eslint-import-resolver-typescript": "^3.6.3",
61
- "eslint-plugin-codegen": "0.28.0",
62
- "eslint-plugin-deprecation": "^3.0.0",
63
- "eslint-plugin-import": "^2.30.0",
64
- "eslint-plugin-simple-import-sort": "^12.1.1",
65
- "eslint-plugin-sort-destructure-keys": "^2.0.0",
66
- "execa": "^7.2.0",
67
- "log-symbols": "^7.0.1",
68
- "ora": "^6.1.2",
69
- "package-manager-detector": "^1.3.0",
70
- "tsup": "^8.2.4",
71
- "tsx": "^4.19.1",
72
- "typescript": "^5.9.3",
73
- "vitest": "^2.0.5"
74
- },
75
- "pnpm": {
76
- "patchedDependencies": {
77
- "@changesets/get-github-info@0.6.0": "patches/@changesets__get-github-info@0.6.0.patch"
78
- }
79
- }
80
- }
1
+ {
2
+ "name": "lovdacn",
3
+ "type": "module",
4
+ "version": "0.1.1",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "bin": {
20
+ "lovdacn": "./dist/index.js",
21
+ "lvcn": "./dist/index.js"
22
+ },
23
+ "devDependencies": {
24
+ "@types/fs-extra": "^11.0.4",
25
+ "@types/node": "^22",
26
+ "@types/prompts": "^2.4.9",
27
+ "rimraf": "^6.0.1",
28
+ "tailwind-merge": "^3.6.0",
29
+ "tsup": "^8.5.0",
30
+ "vitest": "^3.0.0"
31
+ },
32
+ "peerDependencies": {
33
+ "typescript": "^5"
34
+ },
35
+ "dependencies": {
36
+ "commander": "^15.0.0",
37
+ "execa": "^9.6.0",
38
+ "fs-extra": "^11.3.1",
39
+ "picocolors": "^1.1.1",
40
+ "prompts": "^2.4.2",
41
+ "zod": "^3.24.1"
42
+ },
43
+ "module": "src/index.ts",
44
+ "scripts": {
45
+ "test": "vitest run",
46
+ "build": "tsup",
47
+ "dev": "tsup --watch",
48
+ "start": "node dist/index.js",
49
+ "clean": "rimraf dist"
50
+ }
51
+ }