ui-thing 0.3.0 → 0.3.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,1351 @@
1
+ #!/usr/bin/env node
2
+ import{Command as Vr}from"commander";var go="0.3.0";import V from"path";import{updateConfig as Io}from"c12/update";import{Command as _e}from"commander";import{consola as A}from"consola";import E from"kleur";import M from"lodash";import H from"prompts";import{join as Co}from"path";import{loadConfig as pe}from"c12";import S from"fs-extra";import me from"lodash";import{loadFile as he,writeFile as ue}from"magicast";import{addNuxtModule as fe}from"magicast/helpers";var U="ui-thing.config.ts",K={theme:"zinc",tailwindCSSLocation:"assets/css/tailwind.css",componentsLocation:"components/Ui",composablesLocation:"composables",pluginsLocation:"plugins",utilsLocation:"utils",force:!0,useDefaultFilename:!0,packageManager:"npm"},D={theme:"zinc",tailwindCSSLocation:"app/assets/css/tailwind.css",componentsLocation:"app/components/Ui",composablesLocation:"app/composables",pluginsLocation:"app/plugins",utilsLocation:"app/utils",force:!0,useDefaultFilename:!0,packageManager:"npm"},yo=["tailwindcss","motion-v","@tailwindcss/vite","reka-ui","tailwind-variants","tailwind-merge","@nuxt/fonts","@nuxtjs/color-mode","@nuxt/icon","@vueuse/nuxt","@tailwindcss/forms"],bo=["typescript","tw-animate-css"],j=["prettier-plugin-tailwindcss","prettier","@ianvs/prettier-plugin-sort-imports"],vo=["@nuxtjs/color-mode","motion-v/nuxt","@vueuse/nuxt","@nuxt/icon","@nuxt/fonts"],y=[{title:"Npm",value:"npm"},{title:"Yarn",value:"yarn"},{title:"Pnpm",value:"pnpm"},{title:"Bun",value:"bun"},{title:"Deno",value:"deno"}],_=[{title:"Zinc",value:"zinc"},{title:"Slate",value:"slate"},{title:"Stone",value:"stone"},{title:"Gray",value:"gray"},{title:"Neutral",value:"neutral"},{title:"Red",value:"red"},{title:"Rose",value:"rose"},{title:"Orange",value:"orange"},{title:"Green",value:"green"},{title:"Blue",value:"blue"},{title:"Yellow",value:"yellow"},{title:"Violet",value:"violet"}];import le from"fs";function R(){try{let o=JSON.parse(le.readFileSync("package.json","utf-8")),e=o.dependencies?.nuxt||o.devDependencies?.nuxt;if(e)return/^[~^>=<\s]*4/.test(e)?4:3}catch{return 4}return 4}import de from"prompts";import{consola as F}from"consola";var d={info:(o,...e)=>F.info(o,...e),error:(o,...e)=>F.error(o,...e),warn:(o,...e)=>F.warn(o,...e),success:(o,...e)=>F.success(o,...e),log:(o,...e)=>F.log(o,...e)};var wo=async o=>{let e=await de([{name:"theme",type:"autocomplete",message:"Which theme do you want to start with?",choices:_},{name:"tailwindCSSLocation",type:"text",message:"Where is your tailwind.css file located?",initial:(r,n)=>o==3?"assets/css/tailwind.css":"app/assets/css/tailwind.css"},{name:"componentsLocation",type:"text",message:"Where should your components be stored?",initial:(r,n)=>o==3?"components/Ui":"app/components/Ui"},{name:"composablesLocation",type:"text",message:"Where should your composables be stored?",initial:(r,n)=>o==3?"composables":"app/composables"},{name:"pluginsLocation",type:"text",message:"Where should your plugins be stored?",initial:(r,n)=>o==3?"plugins":"app/plugins"},{name:"utilsLocation",type:"text",message:"Where should your utils be stored?",initial:(r,n)=>o==3?"utils":"app/utils"},{name:"force",type:"confirm",message:"Should we just replace component files if they already exist?",initial:!0},{name:"useDefaultFilename",type:"confirm",message:"Would you like to use the default filename when adding components?",initial:!0},{name:"packageManager",type:"select",message:"Which package manager do you use?",choices:y}]);return!e||Object.keys(e).length<9?(d.error("Incomplete configuration submitted. Exiting..."),process.exit(1)):e};var xo=process.cwd(),h=async o=>{let e=S.existsSync(U),r={},n=Number(o?.nuxtVersion)||R();if(!e||o?.force){if(r=o?.yes?n===4?D:K:await wo(n),await S.writeFile(U,`export default ${JSON.stringify(r,null,2)}`),r.packageManager==="pnpm"){let i=["shamefully-hoist=true","strict-peer-dependencies=false"],a="";S.existsSync(".npmrc")&&(a=await S.readFile(".npmrc","utf-8"));let l=i.filter(c=>!a.includes(c));if(l.length>0){let c=a&&!a.endsWith(`
3
+ `)?`
4
+ `:"";await S.writeFile(".npmrc",a+c+l.join(`
5
+ `)+`
6
+ `)}}}else r=(await pe({configFile:U.replace(".ts","")})).config;return me.isEmpty(r)?h({force:!0}):(ke(r),r)},ke=o=>{let e=(r,n=!1)=>{r&&(n?S.ensureDirSync(r):S.ensureFileSync(r))};e(o.tailwindCSSLocation),e(o.pluginsLocation,!0),e(o.componentsLocation,!0),e(o.composablesLocation,!0),e(o.utilsLocation,!0)},B=async o=>{if(!o)return;let e=typeof o=="string"?[o]:o,r=await he(Co(xo,"nuxt.config.ts"));e.forEach(n=>fe(r,n)),await ue(r,Co(xo,"nuxt.config.ts"))};var b=async()=>{let o=await h(),e={nuxtVersion:3,theme:"string",tailwindCSSLocation:"string",componentsLocation:"string",composablesLocation:"string",utilsLocation:"string",force:!0,useDefaultFilename:!0,packageManager:"string"},r=[];for(let n of Object.keys(e))o[n]===void 0&&r.push(n);return!(r.length>1)};import ge from"axios";import{consola as ye}from"consola";import be from"dotenv";import ve from"ora";be.config();var v=async()=>{let o=ve("Fetching components...").start();try{let{data:e}=await ge.get(process.env.COMPONENTS_API||"https://uithing.com/api/components");return o.succeed("Components fetched."),e}catch{o.fail("Failed to fetch components."),ye.error("Could not reach the UI Thing API. Check your network connection."),process.exit(1)}};import eo from"fs";var k=async o=>{try{return await eo.promises.access(o,eo.constants.F_OK||eo.constants.W_OK),!0}catch{return!1}};import{execa as $}from"execa";import W from"lodash";import we from"ora";var Ce={yarn:"add",bun:"add",pnpm:"add",npm:"install",deno:"add"},xe={yarn:"-D",bun:"-D",pnpm:"-D",npm:"-D",deno:"--dev"},So=(o,e)=>o==="deno"?e.map(r=>r.startsWith("npm:")?r:`npm:${r}`):e,g=async(o,e,r)=>{typeof e=="string"&&(e=[e]),typeof r=="string"&&(r=[r]);let n=Ce[o]??"install",i=xe[o]??"-D",a=we("Installing dependencies...").start();!W.isUndefined(e)&&!W.isEmpty(e)&&await $(o,[n,...So(o,e)]),a.text="Installing dev dependencies...",!W.isUndefined(r)&&!W.isEmpty(r)&&await $(o,[n,i,...So(o,r)]),a.text="Running nuxt prepare...",o==="deno"?await $("deno",["run","-A","npm:nuxt","prepare"]):await $`npx -y nuxt prepare`,a.succeed("Installed dependencies!")};import Se from"prompts";var Eo=async o=>{let e={yup:["yup","@vee-validate/yup"],zod:["zod","@vee-validate/zod"],joi:["joi","@vee-validate/joi"],valibot:["valibot","@vee-validate/valibot"]},{validator:r}=await Se({type:"select",name:"validator",message:"Choose the validator package to use with Vee Validate: ",choices:[{title:"Yup",value:"yup"},{title:"Zod",value:"zod"},{title:"Joi",value:"joi"},{title:"Valibot",value:"valibot"}]});if(!r){d.warn("No validator package selected");return}return d.info(`Selected ${r} as the validator package`),e[r]&&await g(o,e[r]),r};import Ee from"boxen";import Ie from"figlet";var Ne=(o,e,r={})=>{let{box:n,figletFont:i}=r,a=Ie.textSync(o,{font:i||"Standard"}),c=Ee(a,{...{borderColor:"greenBright",padding:1,borderStyle:"round",titleAlignment:"center"},...n});return e?`${c}
7
+ ${e}`:c},f=(o,e,r)=>{console.log(`
8
+ `+Ne(o,e,r))};import Te from"prompts";var G=async(o,e=[])=>{if(o)return e.map(n=>n.value);let{components:r}=await Te({type:"autocompleteMultiselect",name:"components",message:"Select the components you want to add",choices:e.map(n=>({title:n.name,value:n.value}))});return r};import ro from"fs";import Pe from"path";var w=async(o,e)=>{if(!await k(o)){let n=Pe.dirname(o);ro.existsSync(n)||ro.mkdirSync(n,{recursive:!0})}ro.writeFileSync(o,e)};var io=[],L=process.cwd(),to=o=>io.find(e=>e.value.toLowerCase()===o.toLowerCase());async function No(o,e,r,n){if(await k(o)&&!r){let{value:a}=await H({type:"confirm",name:"value",message:n,initial:!1});if(!a)return A.info(`Skipped: ${E.cyan(V.basename(o))}`),!1}return await w(o,e),!0}async function no(o,e,r,n){for(let i of e){let a=V.join(L,r,i.fileName);await No(a,i.fileContent,n,`The ${o} file ${E.bold(i.fileName)} already exists. Overwrite?`)}}var Fe=async(o,e)=>{let r;if(e.skipConfig){let p=R()===4?D:K,u=e.packageManager;if(!u){let{packageManager:m}=await H({type:"select",name:"packageManager",message:"Which package manager are you using?",choices:y});u=m??"npm"}r={...p,packageManager:u}}else r=await h(),await b()||(r=await h({force:!0})),M.isEmpty(r)&&(A.error("Config file not set. Exiting..."),process.exit(1));io=await v();let n=o;if(n.length===0){let t=await G(e.all,io);(!t||t.length===0)&&(A.info("No components selected. Exiting..."),process.exit(0)),n=t}let i=n.filter(t=>!to(t));i.length>0&&A.error(`Not found: ${E.bgRed(i.join(", "))}`);let a=n.map(t=>to(t)).filter(Boolean);for(let t of[...a])t.components&&t.components.forEach(p=>{a.find(u=>u.value===p)||a.push(to(p))});for(let t of a)for(let p of t.files){let u=r.componentsLocation,m=V.join(L,u,p.fileName);if(!r.useDefaultFilename){let{value:x}=await H({type:"text",name:"value",message:`Where should we add the file ${E.cyan(p.fileName)}?`,initial:u});x&&(u=x,m=V.join(L,u,p.fileName))}await No(m,p.fileContent,r.force,`The file ${E.bold(p.fileName)} already exists. Overwrite?`)&&((t.value==="vue-sonner"||t.value==="sonner")&&await Me(),t.value==="datatable"&&await Ae(),await no("utils",t.utils,r.utilsLocation,r.force),await no("composables",t.composables,r.composablesLocation,r.force),await no("plugins",t.plugins,r.pluginsLocation??"",r.force))}await B(M.uniq(a.flatMap(t=>t.nuxtModules||[])));let l=M.uniq(a.flatMap(t=>t.deps||[])),c=M.uniq(a.flatMap(t=>t.devDeps||[]));if(l.length>0||c.length>0)if(e.all)await g(r.packageManager,l,c);else{let{confirmInstall:t}=await H({type:"confirm",name:"confirmInstall",message:`Install packages: ${E.cyan([...l,...c].join(", "))}?`,initial:!0});t&&await g(r.packageManager,l,c)}a.some(t=>t.askValidator)&&await Eo(r.packageManager),f("All Done!",`Run the ${E.cyan("ui-thing@latest --help")} command to learn more.
9
+ `,{box:{title:"Components Added"}}),a.filter(t=>t.docsPath).forEach(t=>A.info(`Docs: https://uithing.com${t.docsPath}`));let s=M.compact(a.flatMap(t=>t.instructions));s.length>0&&(d.info("Instructions:"),s.forEach(t=>d.info(`- ${t}`)))},To=new _e().name("add").command("add").description("Add a list of components to your project.").option("-a --all","Add all components to your project.",!1).option("--skip-config","Add components without a ui-thing config file. Uses auto-detected Nuxt defaults.").option("--package-manager <pm>","Package manager to use when --skip-config is set.").argument("[componentNames...]","Components that you want to add.").action(Fe);async function Me(){await Io({configFile:"nuxt.config",cwd:L,onUpdate(o){o.imports||={imports:[]},o.imports.imports.find(e=>e.from==="vue-sonner"&&e.name==="toast")||o.imports.imports.push({from:"vue-sonner",name:"toast",as:"useSonner"})}})}async function Ae(){await Io({configFile:"nuxt.config",cwd:L,onUpdate(o){o.app||={head:{script:[]}},["https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.12/pdfmake.min.js","https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.12/vfs_fonts.min.js"].forEach(r=>{o.app.head.script.find(n=>n.src===r)||o.app.head.script.push({src:r,defer:!0})})}})}import{spawnSync as $e}from"child_process";import ao from"path";import{Command as We}from"commander";import{consola as I}from"consola";import q from"kleur";import Fo from"lodash";import Y from"prompts";import Le from"axios";import{consola as Oe}from"consola";import Ue from"dotenv";import Ke from"ora";Ue.config();var Po=async()=>{let o=Ke("Fetching block categories...").start();try{let{data:e}=await Le.get(process.env.BLOCK_CATEGORIES_API||"https://uithing.com/api/blocks/categories");return o.succeed("Block categories fetched."),e}catch{o.fail("Failed to fetch block categories."),Oe.error("Could not reach the UI Thing API. Check your network connection."),process.exit(1)}};import De from"axios";import{consola as je}from"consola";import Re from"dotenv";import Be from"ora";Re.config();var _o=async()=>{let o=Be("Fetching blocks...").start();try{let{data:e}=await De.get(process.env.BLOCKS_API||"https://uithing.com/api/blocks");return o.succeed("Blocks fetched."),e}catch{o.fail("Failed to fetch blocks."),je.error("Could not reach the UI Thing API. Check your network connection."),process.exit(1)}};var z=[],Mo=process.cwd();function Ge(o){return o.componentsLocation?.startsWith("app/")?"app/components/Blocks":"components/Blocks"}async function He(o,e,r,n){if(await k(o)&&!r){let{value:a}=await Y({type:"confirm",name:"value",message:n,initial:!1});if(!a)return I.info(`Skipped: ${q.cyan(ao.basename(o))}`),!1}return await w(o,e),!0}var Ve=async(o,e)=>{let r=await h();await b()||(r=await h({force:!0})),Fo.isEmpty(r)&&(I.error("Config file not set. Exiting..."),process.exit(1));let n=await Po(),i=e.category;if(!i&&n?.length){let{category:m}=await Y({type:"select",name:"category",message:"Choose a block category",choices:[{title:"All",value:"all"},...n.map(T=>({title:T,value:T}))],initial:0});i=m}z=await _o();let a=z;i&&i!=="all"&&(a=z.filter(m=>m.category===i),a.length===0&&(I.warn(`No blocks found for category ${q.cyan(i)}. Falling back to all.`),a=z));let{selectedBlocks:l}=await Y({type:"autocompleteMultiselect",name:"selectedBlocks",message:"Select the blocks you want to add",choices:a.map(m=>({title:m.name,value:m}))});(!l||l.length===0)&&(I.info("No blocks selected. Exiting..."),process.exit(0));let c=l,s=Ge(r),{blocksDir:t}=await Y({type:"text",name:"blocksDir",message:"Where should we add the blocks?",initial:s}),p=t||s;for(let m of c){let T=ao.join(p,m.path),x=ao.join(Mo,T);await He(x,m.file,r.force,`The block file ${q.bold(m.fileName)} already exists. Overwrite?`)}let u=Fo.uniq(c.flatMap(m=>m.components||[]));if(u.length>0){I.info(`Adding ${u.length} component(s) required by blocks...`);let m=$e("npx",["ui-thing@latest","add",...u],{cwd:Mo,stdio:"inherit"});m.error?I.error("Failed to spawn component installer:",m.error.message):m.status!==0&&I.error(`Component installer exited with code ${m.status}`)}f("Blocks added!",`Run the ${q.cyan("ui-thing@latest --help")} command to learn more.
10
+ `,{box:{title:"Blocks Added"}})},Ao=new We().name("block").command("block").description("Add UI Thing blocks to your project.").option("-c --category <category>","Filter blocks by category before selection").action(Ve);import gr from"path";import{updateConfig as yr}from"c12/update";import{Command as br}from"commander";import $o from"fs-extra";import po from"kleur";import vr from"ora";var ze=`@import "tailwindcss";
11
+ @import "tw-animate-css";
12
+
13
+ @plugin "@tailwindcss/forms" {
14
+ strategy: "class";
15
+ }
16
+
17
+ @custom-variant dark (&:is(.dark *));
18
+
19
+ @theme {
20
+ --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
21
+ "Segoe UI Symbol", "Noto Color Emoji";
22
+ --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
23
+ "Courier New", monospace;
24
+ --font-display--font-feature-settings: "cv02", "cv03", "cv04", "cv11";
25
+
26
+ --animate-shine: shine 3s ease-out infinite;
27
+ --animate-gradient-flow: gradientFlow 10s ease 0s infinite normal none running;
28
+ --animate-meteor: meteor 5s linear infinite;
29
+ --animate-background-position-spin: background-position-spin 3000ms infinite alternate;
30
+ --animate-grid: grid 15s linear infinite;
31
+
32
+ @keyframes grid {
33
+ 0% {
34
+ transform: translateY(-50%);
35
+ }
36
+ 100% {
37
+ transform: translateY(0);
38
+ }
39
+ }
40
+
41
+ @keyframes shine {
42
+ 0% {
43
+ background-position: 200% 0;
44
+ }
45
+ 25%,
46
+ 100% {
47
+ background-position: -200% 0;
48
+ }
49
+ }
50
+
51
+ @keyframes gradientFlow {
52
+ 50% {
53
+ background-position: 100% 50%;
54
+ }
55
+ 0%,
56
+ 100% {
57
+ background-position: 0% 50%;
58
+ }
59
+ }
60
+
61
+ @keyframes meteor {
62
+ 0% {
63
+ transform: rotate(var(--angle)) translateX(0);
64
+ opacity: 1;
65
+ }
66
+ 70% {
67
+ opacity: 1;
68
+ }
69
+ 100% {
70
+ transform: rotate(var(--angle)) translateX(-500px);
71
+ opacity: 0;
72
+ }
73
+ }
74
+
75
+ @keyframes background-position-spin {
76
+ 0% {
77
+ background-position: top center;
78
+ }
79
+ 100% {
80
+ background-position: bottom center;
81
+ }
82
+ }
83
+ }
84
+
85
+ @theme inline {
86
+ --radius-sm: calc(var(--radius) - 4px);
87
+ --radius-md: calc(var(--radius) - 2px);
88
+ --radius-lg: var(--radius);
89
+ --radius-xl: calc(var(--radius) + 4px);
90
+
91
+ --color-background: var(--background);
92
+ --color-foreground: var(--foreground);
93
+ --color-card: var(--card);
94
+ --color-card-foreground: var(--card-foreground);
95
+ --color-popover: var(--popover);
96
+ --color-popover-foreground: var(--popover-foreground);
97
+ --color-primary: var(--primary);
98
+ --color-primary-foreground: var(--primary-foreground);
99
+ --color-secondary: var(--secondary);
100
+ --color-secondary-foreground: var(--secondary-foreground);
101
+ --color-muted: var(--muted);
102
+ --color-muted-foreground: var(--muted-foreground);
103
+ --color-accent: var(--accent);
104
+ --color-accent-foreground: var(--accent-foreground);
105
+ --color-destructive: var(--destructive);
106
+ --color-destructive-foreground: var(--destructive-foreground);
107
+ --color-border: var(--border);
108
+ --color-input: var(--input);
109
+ --color-ring: var(--ring);
110
+
111
+ --color-sidebar-background: var(--sidebar-background);
112
+ --color-sidebar-foreground: var(--sidebar-foreground);
113
+ --color-sidebar-primary: var(--sidebar-primary);
114
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
115
+ --color-sidebar-accent: var(--sidebar-accent);
116
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
117
+ --color-sidebar-border: var(--sidebar-border);
118
+ --color-sidebar-ring: var(--sidebar-ring);
119
+ --color-sidebar-input: var(--sidebar-input);
120
+
121
+ --color-gradient-lime: var(--gradient-lime);
122
+ --color-gradient-ocean: var(--gradient-ocean);
123
+ --color-gradient-wine: var(--gradient-wine);
124
+ --color-gradient-rust: var(--gradient-rust);
125
+ }
126
+
127
+ :root {
128
+ /* Gradient slide show Colors */
129
+ --gradient-lime: oklch(67.287% 0.1546 116.644);
130
+ --gradient-ocean: oklch(44.56% 0.10114 242.813);
131
+ --gradient-wine: oklch(32.332% 0.12034 5.266);
132
+ --gradient-rust: oklch(55.695% 0.19944 34.155);
133
+ }
134
+
135
+ `,qe=`@layer base {
136
+ * {
137
+ @apply border-border outline-ring/50;
138
+ }
139
+ * {
140
+ scrollbar-width: thin;
141
+ scrollbar-color: var(--border) transparent;
142
+ }
143
+ html {
144
+ @apply antialiased;
145
+ }
146
+ body {
147
+ @apply bg-background text-foreground;
148
+ }
149
+ ::-webkit-scrollbar {
150
+ width: 4px;
151
+ }
152
+ ::-webkit-scrollbar-track {
153
+ background: transparent;
154
+ }
155
+ ::-webkit-scrollbar-thumb {
156
+ background: var(--border);
157
+ border-radius: 4px;
158
+ }
159
+ button:not(:disabled),
160
+ [role="button"]:not(:disabled) {
161
+ cursor: pointer;
162
+ }
163
+ html {
164
+ color-scheme: light dark;
165
+ }
166
+ html.dark {
167
+ color-scheme: dark;
168
+ }
169
+ html.light {
170
+ color-scheme: light;
171
+ }
172
+ @media (prefers-color-scheme: dark) {
173
+ select {
174
+ background-color: var(--popover);
175
+ }
176
+ }
177
+ }
178
+
179
+ @utility no-scrollbar {
180
+ -ms-overflow-style: none;
181
+ scrollbar-width: none;
182
+ &::-webkit-scrollbar {
183
+ display: none;
184
+ }
185
+ }
186
+ `,J=o=>(Lo[o]||(o="ZINC"),`${ze}${Lo[o]}${qe}`),Ye=`
187
+ :root {
188
+ --radius: 0.65rem;
189
+ --background: oklch(1 0 0);
190
+ --foreground: oklch(0.145 0 0);
191
+ --card: oklch(1 0 0);
192
+ --card-foreground: oklch(0.145 0 0);
193
+ --popover: oklch(1 0 0);
194
+ --popover-foreground: oklch(0.145 0 0);
195
+ --primary: oklch(0.205 0 0);
196
+ --primary-foreground: oklch(0.985 0 0);
197
+ --secondary: oklch(0.97 0 0);
198
+ --secondary-foreground: oklch(0.205 0 0);
199
+ --muted: oklch(0.97 0 0);
200
+ --muted-foreground: oklch(0.556 0 0);
201
+ --accent: oklch(0.97 0 0);
202
+ --accent-foreground: oklch(0.205 0 0);
203
+ --destructive: oklch(0.577 0.245 27.325);
204
+ --border: oklch(0.922 0 0);
205
+ --input: oklch(0.922 0 0);
206
+ --ring: oklch(0.708 0 0);
207
+ --chart-1: oklch(0.646 0.222 41.116);
208
+ --chart-2: oklch(0.6 0.118 184.704);
209
+ --chart-3: oklch(0.398 0.07 227.392);
210
+ --chart-4: oklch(0.828 0.189 84.429);
211
+ --chart-5: oklch(0.769 0.188 70.08);
212
+ --sidebar: oklch(0.985 0 0);
213
+ --sidebar-foreground: oklch(0.145 0 0);
214
+ --sidebar-primary: oklch(0.205 0 0);
215
+ --sidebar-primary-foreground: oklch(0.985 0 0);
216
+ --sidebar-accent: oklch(0.97 0 0);
217
+ --sidebar-accent-foreground: oklch(0.205 0 0);
218
+ --sidebar-border: oklch(0.922 0 0);
219
+ --sidebar-ring: oklch(0.708 0 0);
220
+ }
221
+
222
+ .dark {
223
+ --background: oklch(0.145 0 0);
224
+ --foreground: oklch(0.985 0 0);
225
+ --card: oklch(0.205 0 0);
226
+ --card-foreground: oklch(0.985 0 0);
227
+ --popover: oklch(0.205 0 0);
228
+ --popover-foreground: oklch(0.985 0 0);
229
+ --primary: oklch(0.922 0 0);
230
+ --primary-foreground: oklch(0.205 0 0);
231
+ --secondary: oklch(0.269 0 0);
232
+ --secondary-foreground: oklch(0.985 0 0);
233
+ --muted: oklch(0.269 0 0);
234
+ --muted-foreground: oklch(0.708 0 0);
235
+ --accent: oklch(0.269 0 0);
236
+ --accent-foreground: oklch(0.985 0 0);
237
+ --destructive: oklch(0.704 0.191 22.216);
238
+ --border: oklch(1 0 0 / 10%);
239
+ --input: oklch(1 0 0 / 15%);
240
+ --ring: oklch(0.556 0 0);
241
+ --chart-1: oklch(0.488 0.243 264.376);
242
+ --chart-2: oklch(0.696 0.17 162.48);
243
+ --chart-3: oklch(0.769 0.188 70.08);
244
+ --chart-4: oklch(0.627 0.265 303.9);
245
+ --chart-5: oklch(0.645 0.246 16.439);
246
+ --sidebar: oklch(0.205 0 0);
247
+ --sidebar-foreground: oklch(0.985 0 0);
248
+ --sidebar-primary: oklch(0.488 0.243 264.376);
249
+ --sidebar-primary-foreground: oklch(0.985 0 0);
250
+ --sidebar-accent: oklch(0.269 0 0);
251
+ --sidebar-accent-foreground: oklch(0.985 0 0);
252
+ --sidebar-border: oklch(1 0 0 / 10%);
253
+ --sidebar-ring: oklch(0.556 0 0);
254
+ }
255
+
256
+ `,Je=`
257
+ :root {
258
+ --radius: 0.625rem;
259
+ --background: oklch(1 0 0);
260
+ --foreground: oklch(0.129 0.042 264.695);
261
+ --card: oklch(1 0 0);
262
+ --card-foreground: oklch(0.129 0.042 264.695);
263
+ --popover: oklch(1 0 0);
264
+ --popover-foreground: oklch(0.129 0.042 264.695);
265
+ --primary: oklch(0.208 0.042 265.755);
266
+ --primary-foreground: oklch(0.984 0.003 247.858);
267
+ --secondary: oklch(0.968 0.007 247.896);
268
+ --secondary-foreground: oklch(0.208 0.042 265.755);
269
+ --muted: oklch(0.968 0.007 247.896);
270
+ --muted-foreground: oklch(0.554 0.046 257.417);
271
+ --accent: oklch(0.968 0.007 247.896);
272
+ --accent-foreground: oklch(0.208 0.042 265.755);
273
+ --destructive: oklch(0.577 0.245 27.325);
274
+ --border: oklch(0.929 0.013 255.508);
275
+ --input: oklch(0.929 0.013 255.508);
276
+ --ring: oklch(0.704 0.04 256.788);
277
+ --chart-1: oklch(0.646 0.222 41.116);
278
+ --chart-2: oklch(0.6 0.118 184.704);
279
+ --chart-3: oklch(0.398 0.07 227.392);
280
+ --chart-4: oklch(0.828 0.189 84.429);
281
+ --chart-5: oklch(0.769 0.188 70.08);
282
+ --sidebar: oklch(0.984 0.003 247.858);
283
+ --sidebar-foreground: oklch(0.129 0.042 264.695);
284
+ --sidebar-primary: oklch(0.208 0.042 265.755);
285
+ --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
286
+ --sidebar-accent: oklch(0.968 0.007 247.896);
287
+ --sidebar-accent-foreground: oklch(0.208 0.042 265.755);
288
+ --sidebar-border: oklch(0.929 0.013 255.508);
289
+ --sidebar-ring: oklch(0.704 0.04 256.788);
290
+ }
291
+
292
+ .dark {
293
+ --background: oklch(0.129 0.042 264.695);
294
+ --foreground: oklch(0.984 0.003 247.858);
295
+ --card: oklch(0.208 0.042 265.755);
296
+ --card-foreground: oklch(0.984 0.003 247.858);
297
+ --popover: oklch(0.208 0.042 265.755);
298
+ --popover-foreground: oklch(0.984 0.003 247.858);
299
+ --primary: oklch(0.929 0.013 255.508);
300
+ --primary-foreground: oklch(0.208 0.042 265.755);
301
+ --secondary: oklch(0.279 0.041 260.031);
302
+ --secondary-foreground: oklch(0.984 0.003 247.858);
303
+ --muted: oklch(0.279 0.041 260.031);
304
+ --muted-foreground: oklch(0.704 0.04 256.788);
305
+ --accent: oklch(0.279 0.041 260.031);
306
+ --accent-foreground: oklch(0.984 0.003 247.858);
307
+ --destructive: oklch(0.704 0.191 22.216);
308
+ --border: oklch(1 0 0 / 10%);
309
+ --input: oklch(1 0 0 / 15%);
310
+ --ring: oklch(0.551 0.027 264.364);
311
+ --chart-1: oklch(0.488 0.243 264.376);
312
+ --chart-2: oklch(0.696 0.17 162.48);
313
+ --chart-3: oklch(0.769 0.188 70.08);
314
+ --chart-4: oklch(0.627 0.265 303.9);
315
+ --chart-5: oklch(0.645 0.246 16.439);
316
+ --sidebar: oklch(0.208 0.042 265.755);
317
+ --sidebar-foreground: oklch(0.984 0.003 247.858);
318
+ --sidebar-primary: oklch(0.488 0.243 264.376);
319
+ --sidebar-primary-foreground: oklch(0.984 0.003 247.858);
320
+ --sidebar-accent: oklch(0.279 0.041 260.031);
321
+ --sidebar-accent-foreground: oklch(0.984 0.003 247.858);
322
+ --sidebar-border: oklch(1 0 0 / 10%);
323
+ --sidebar-ring: oklch(0.551 0.027 264.364);
324
+ }
325
+
326
+ `,Xe=`
327
+ :root {
328
+ --radius: 0.625rem;
329
+ --background: oklch(1 0 0);
330
+ --foreground: oklch(0.147 0.004 49.25);
331
+ --card: oklch(1 0 0);
332
+ --card-foreground: oklch(0.147 0.004 49.25);
333
+ --popover: oklch(1 0 0);
334
+ --popover-foreground: oklch(0.147 0.004 49.25);
335
+ --primary: oklch(0.216 0.006 56.043);
336
+ --primary-foreground: oklch(0.985 0.001 106.423);
337
+ --secondary: oklch(0.97 0.001 106.424);
338
+ --secondary-foreground: oklch(0.216 0.006 56.043);
339
+ --muted: oklch(0.97 0.001 106.424);
340
+ --muted-foreground: oklch(0.553 0.013 58.071);
341
+ --accent: oklch(0.97 0.001 106.424);
342
+ --accent-foreground: oklch(0.216 0.006 56.043);
343
+ --destructive: oklch(0.577 0.245 27.325);
344
+ --border: oklch(0.923 0.003 48.717);
345
+ --input: oklch(0.923 0.003 48.717);
346
+ --ring: oklch(0.709 0.01 56.259);
347
+ --chart-1: oklch(0.646 0.222 41.116);
348
+ --chart-2: oklch(0.6 0.118 184.704);
349
+ --chart-3: oklch(0.398 0.07 227.392);
350
+ --chart-4: oklch(0.828 0.189 84.429);
351
+ --chart-5: oklch(0.769 0.188 70.08);
352
+ --sidebar: oklch(0.985 0.001 106.423);
353
+ --sidebar-foreground: oklch(0.147 0.004 49.25);
354
+ --sidebar-primary: oklch(0.216 0.006 56.043);
355
+ --sidebar-primary-foreground: oklch(0.985 0.001 106.423);
356
+ --sidebar-accent: oklch(0.97 0.001 106.424);
357
+ --sidebar-accent-foreground: oklch(0.216 0.006 56.043);
358
+ --sidebar-border: oklch(0.923 0.003 48.717);
359
+ --sidebar-ring: oklch(0.709 0.01 56.259);
360
+ }
361
+ .dark {
362
+ --background: oklch(0.147 0.004 49.25);
363
+ --foreground: oklch(0.985 0.001 106.423);
364
+ --card: oklch(0.216 0.006 56.043);
365
+ --card-foreground: oklch(0.985 0.001 106.423);
366
+ --popover: oklch(0.216 0.006 56.043);
367
+ --popover-foreground: oklch(0.985 0.001 106.423);
368
+ --primary: oklch(0.923 0.003 48.717);
369
+ --primary-foreground: oklch(0.216 0.006 56.043);
370
+ --secondary: oklch(0.268 0.007 34.298);
371
+ --secondary-foreground: oklch(0.985 0.001 106.423);
372
+ --muted: oklch(0.268 0.007 34.298);
373
+ --muted-foreground: oklch(0.709 0.01 56.259);
374
+ --accent: oklch(0.268 0.007 34.298);
375
+ --accent-foreground: oklch(0.985 0.001 106.423);
376
+ --destructive: oklch(0.704 0.191 22.216);
377
+ --border: oklch(1 0 0 / 10%);
378
+ --input: oklch(1 0 0 / 15%);
379
+ --ring: oklch(0.553 0.013 58.071);
380
+ --chart-1: oklch(0.488 0.243 264.376);
381
+ --chart-2: oklch(0.696 0.17 162.48);
382
+ --chart-3: oklch(0.769 0.188 70.08);
383
+ --chart-4: oklch(0.627 0.265 303.9);
384
+ --chart-5: oklch(0.645 0.246 16.439);
385
+ --sidebar: oklch(0.216 0.006 56.043);
386
+ --sidebar-foreground: oklch(0.985 0.001 106.423);
387
+ --sidebar-primary: oklch(0.488 0.243 264.376);
388
+ --sidebar-primary-foreground: oklch(0.985 0.001 106.423);
389
+ --sidebar-accent: oklch(0.268 0.007 34.298);
390
+ --sidebar-accent-foreground: oklch(0.985 0.001 106.423);
391
+ --sidebar-border: oklch(1 0 0 / 10%);
392
+ --sidebar-ring: oklch(0.553 0.013 58.071);
393
+ }
394
+
395
+ `,Ze=`
396
+ :root {
397
+ --radius: 0.625rem;
398
+ --background: oklch(1 0 0);
399
+ --foreground: oklch(0.13 0.028 261.692);
400
+ --card: oklch(1 0 0);
401
+ --card-foreground: oklch(0.13 0.028 261.692);
402
+ --popover: oklch(1 0 0);
403
+ --popover-foreground: oklch(0.13 0.028 261.692);
404
+ --primary: oklch(0.21 0.034 264.665);
405
+ --primary-foreground: oklch(0.985 0.002 247.839);
406
+ --secondary: oklch(0.967 0.003 264.542);
407
+ --secondary-foreground: oklch(0.21 0.034 264.665);
408
+ --muted: oklch(0.967 0.003 264.542);
409
+ --muted-foreground: oklch(0.551 0.027 264.364);
410
+ --accent: oklch(0.967 0.003 264.542);
411
+ --accent-foreground: oklch(0.21 0.034 264.665);
412
+ --destructive: oklch(0.577 0.245 27.325);
413
+ --border: oklch(0.928 0.006 264.531);
414
+ --input: oklch(0.928 0.006 264.531);
415
+ --ring: oklch(0.707 0.022 261.325);
416
+ --chart-1: oklch(0.646 0.222 41.116);
417
+ --chart-2: oklch(0.6 0.118 184.704);
418
+ --chart-3: oklch(0.398 0.07 227.392);
419
+ --chart-4: oklch(0.828 0.189 84.429);
420
+ --chart-5: oklch(0.769 0.188 70.08);
421
+ --sidebar: oklch(0.985 0.002 247.839);
422
+ --sidebar-foreground: oklch(0.13 0.028 261.692);
423
+ --sidebar-primary: oklch(0.21 0.034 264.665);
424
+ --sidebar-primary-foreground: oklch(0.985 0.002 247.839);
425
+ --sidebar-accent: oklch(0.967 0.003 264.542);
426
+ --sidebar-accent-foreground: oklch(0.21 0.034 264.665);
427
+ --sidebar-border: oklch(0.928 0.006 264.531);
428
+ --sidebar-ring: oklch(0.707 0.022 261.325);
429
+ }
430
+
431
+ .dark {
432
+ --background: oklch(0.13 0.028 261.692);
433
+ --foreground: oklch(0.985 0.002 247.839);
434
+ --card: oklch(0.21 0.034 264.665);
435
+ --card-foreground: oklch(0.985 0.002 247.839);
436
+ --popover: oklch(0.21 0.034 264.665);
437
+ --popover-foreground: oklch(0.985 0.002 247.839);
438
+ --primary: oklch(0.928 0.006 264.531);
439
+ --primary-foreground: oklch(0.21 0.034 264.665);
440
+ --secondary: oklch(0.278 0.033 256.848);
441
+ --secondary-foreground: oklch(0.985 0.002 247.839);
442
+ --muted: oklch(0.278 0.033 256.848);
443
+ --muted-foreground: oklch(0.707 0.022 261.325);
444
+ --accent: oklch(0.278 0.033 256.848);
445
+ --accent-foreground: oklch(0.985 0.002 247.839);
446
+ --destructive: oklch(0.704 0.191 22.216);
447
+ --border: oklch(1 0 0 / 10%);
448
+ --input: oklch(1 0 0 / 15%);
449
+ --ring: oklch(0.551 0.027 264.364);
450
+ --chart-1: oklch(0.488 0.243 264.376);
451
+ --chart-2: oklch(0.696 0.17 162.48);
452
+ --chart-3: oklch(0.769 0.188 70.08);
453
+ --chart-4: oklch(0.627 0.265 303.9);
454
+ --chart-5: oklch(0.645 0.246 16.439);
455
+ --sidebar: oklch(0.21 0.034 264.665);
456
+ --sidebar-foreground: oklch(0.985 0.002 247.839);
457
+ --sidebar-primary: oklch(0.488 0.243 264.376);
458
+ --sidebar-primary-foreground: oklch(0.985 0.002 247.839);
459
+ --sidebar-accent: oklch(0.278 0.033 256.848);
460
+ --sidebar-accent-foreground: oklch(0.985 0.002 247.839);
461
+ --sidebar-border: oklch(1 0 0 / 10%);
462
+ --sidebar-ring: oklch(0.551 0.027 264.364);
463
+ }
464
+
465
+ `,Qe=`
466
+ :root {
467
+ --radius: 0.625rem;
468
+ --background: oklch(1 0 0);
469
+ --foreground: oklch(0.145 0 0);
470
+ --card: oklch(1 0 0);
471
+ --card-foreground: oklch(0.145 0 0);
472
+ --popover: oklch(1 0 0);
473
+ --popover-foreground: oklch(0.145 0 0);
474
+ --primary: oklch(0.205 0 0);
475
+ --primary-foreground: oklch(0.985 0 0);
476
+ --secondary: oklch(0.97 0 0);
477
+ --secondary-foreground: oklch(0.205 0 0);
478
+ --muted: oklch(0.97 0 0);
479
+ --muted-foreground: oklch(0.556 0 0);
480
+ --accent: oklch(0.97 0 0);
481
+ --accent-foreground: oklch(0.205 0 0);
482
+ --destructive: oklch(0.577 0.245 27.325);
483
+ --border: oklch(0.922 0 0);
484
+ --input: oklch(0.922 0 0);
485
+ --ring: oklch(0.708 0 0);
486
+ --chart-1: oklch(0.646 0.222 41.116);
487
+ --chart-2: oklch(0.6 0.118 184.704);
488
+ --chart-3: oklch(0.398 0.07 227.392);
489
+ --chart-4: oklch(0.828 0.189 84.429);
490
+ --chart-5: oklch(0.769 0.188 70.08);
491
+ --sidebar: oklch(0.985 0 0);
492
+ --sidebar-foreground: oklch(0.145 0 0);
493
+ --sidebar-primary: oklch(0.205 0 0);
494
+ --sidebar-primary-foreground: oklch(0.985 0 0);
495
+ --sidebar-accent: oklch(0.97 0 0);
496
+ --sidebar-accent-foreground: oklch(0.205 0 0);
497
+ --sidebar-border: oklch(0.922 0 0);
498
+ --sidebar-ring: oklch(0.708 0 0);
499
+ }
500
+
501
+ .dark {
502
+ --background: oklch(0.145 0 0);
503
+ --foreground: oklch(0.985 0 0);
504
+ --card: oklch(0.205 0 0);
505
+ --card-foreground: oklch(0.985 0 0);
506
+ --popover: oklch(0.205 0 0);
507
+ --popover-foreground: oklch(0.985 0 0);
508
+ --primary: oklch(0.922 0 0);
509
+ --primary-foreground: oklch(0.205 0 0);
510
+ --secondary: oklch(0.269 0 0);
511
+ --secondary-foreground: oklch(0.985 0 0);
512
+ --muted: oklch(0.269 0 0);
513
+ --muted-foreground: oklch(0.708 0 0);
514
+ --accent: oklch(0.269 0 0);
515
+ --accent-foreground: oklch(0.985 0 0);
516
+ --destructive: oklch(0.704 0.191 22.216);
517
+ --border: oklch(1 0 0 / 10%);
518
+ --input: oklch(1 0 0 / 15%);
519
+ --ring: oklch(0.556 0 0);
520
+ --chart-1: oklch(0.488 0.243 264.376);
521
+ --chart-2: oklch(0.696 0.17 162.48);
522
+ --chart-3: oklch(0.769 0.188 70.08);
523
+ --chart-4: oklch(0.627 0.265 303.9);
524
+ --chart-5: oklch(0.645 0.246 16.439);
525
+ --sidebar: oklch(0.205 0 0);
526
+ --sidebar-foreground: oklch(0.985 0 0);
527
+ --sidebar-primary: oklch(0.488 0.243 264.376);
528
+ --sidebar-primary-foreground: oklch(0.985 0 0);
529
+ --sidebar-accent: oklch(0.269 0 0);
530
+ --sidebar-accent-foreground: oklch(0.985 0 0);
531
+ --sidebar-border: oklch(1 0 0 / 10%);
532
+ --sidebar-ring: oklch(0.556 0 0);
533
+ }
534
+
535
+ `,or=`
536
+ :root {
537
+ --radius: 0.65rem;
538
+ --background: oklch(1 0 0);
539
+ --foreground: oklch(0.141 0.005 285.823);
540
+ --card: oklch(1 0 0);
541
+ --card-foreground: oklch(0.141 0.005 285.823);
542
+ --popover: oklch(1 0 0);
543
+ --popover-foreground: oklch(0.141 0.005 285.823);
544
+ --primary: oklch(0.637 0.237 25.331);
545
+ --primary-foreground: oklch(0.971 0.013 17.38);
546
+ --secondary: oklch(0.967 0.001 286.375);
547
+ --secondary-foreground: oklch(0.21 0.006 285.885);
548
+ --muted: oklch(0.967 0.001 286.375);
549
+ --muted-foreground: oklch(0.552 0.016 285.938);
550
+ --accent: oklch(0.967 0.001 286.375);
551
+ --accent-foreground: oklch(0.21 0.006 285.885);
552
+ --destructive: oklch(0.577 0.245 27.325);
553
+ --border: oklch(0.92 0.004 286.32);
554
+ --input: oklch(0.92 0.004 286.32);
555
+ --ring: oklch(0.637 0.237 25.331);
556
+ --chart-1: oklch(0.646 0.222 41.116);
557
+ --chart-2: oklch(0.6 0.118 184.704);
558
+ --chart-3: oklch(0.398 0.07 227.392);
559
+ --chart-4: oklch(0.828 0.189 84.429);
560
+ --chart-5: oklch(0.769 0.188 70.08);
561
+ --sidebar: oklch(0.985 0 0);
562
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
563
+ --sidebar-primary: oklch(0.637 0.237 25.331);
564
+ --sidebar-primary-foreground: oklch(0.971 0.013 17.38);
565
+ --sidebar-accent: oklch(0.967 0.001 286.375);
566
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
567
+ --sidebar-border: oklch(0.92 0.004 286.32);
568
+ --sidebar-ring: oklch(0.637 0.237 25.331);
569
+ }
570
+
571
+ .dark {
572
+ --background: oklch(0.141 0.005 285.823);
573
+ --foreground: oklch(0.985 0 0);
574
+ --card: oklch(0.21 0.006 285.885);
575
+ --card-foreground: oklch(0.985 0 0);
576
+ --popover: oklch(0.21 0.006 285.885);
577
+ --popover-foreground: oklch(0.985 0 0);
578
+ --primary: oklch(0.637 0.237 25.331);
579
+ --primary-foreground: oklch(0.971 0.013 17.38);
580
+ --secondary: oklch(0.274 0.006 286.033);
581
+ --secondary-foreground: oklch(0.985 0 0);
582
+ --muted: oklch(0.274 0.006 286.033);
583
+ --muted-foreground: oklch(0.705 0.015 286.067);
584
+ --accent: oklch(0.274 0.006 286.033);
585
+ --accent-foreground: oklch(0.985 0 0);
586
+ --destructive: oklch(0.704 0.191 22.216);
587
+ --border: oklch(1 0 0 / 10%);
588
+ --input: oklch(1 0 0 / 15%);
589
+ --ring: oklch(0.637 0.237 25.331);
590
+ --chart-1: oklch(0.488 0.243 264.376);
591
+ --chart-2: oklch(0.696 0.17 162.48);
592
+ --chart-3: oklch(0.769 0.188 70.08);
593
+ --chart-4: oklch(0.627 0.265 303.9);
594
+ --chart-5: oklch(0.645 0.246 16.439);
595
+ --sidebar: oklch(0.21 0.006 285.885);
596
+ --sidebar-foreground: oklch(0.985 0 0);
597
+ --sidebar-primary: oklch(0.637 0.237 25.331);
598
+ --sidebar-primary-foreground: oklch(0.971 0.013 17.38);
599
+ --sidebar-accent: oklch(0.274 0.006 286.033);
600
+ --sidebar-accent-foreground: oklch(0.985 0 0);
601
+ --sidebar-border: oklch(1 0 0 / 10%);
602
+ --sidebar-ring: oklch(0.637 0.237 25.331);
603
+ }
604
+
605
+ `,er=`
606
+ :root {
607
+ --radius: 0.65rem;
608
+ --background: oklch(1 0 0);
609
+ --foreground: oklch(0.141 0.005 285.823);
610
+ --card: oklch(1 0 0);
611
+ --card-foreground: oklch(0.141 0.005 285.823);
612
+ --popover: oklch(1 0 0);
613
+ --popover-foreground: oklch(0.141 0.005 285.823);
614
+ --primary: oklch(0.645 0.246 16.439);
615
+ --primary-foreground: oklch(0.969 0.015 12.422);
616
+ --secondary: oklch(0.967 0.001 286.375);
617
+ --secondary-foreground: oklch(0.21 0.006 285.885);
618
+ --muted: oklch(0.967 0.001 286.375);
619
+ --muted-foreground: oklch(0.552 0.016 285.938);
620
+ --accent: oklch(0.967 0.001 286.375);
621
+ --accent-foreground: oklch(0.21 0.006 285.885);
622
+ --destructive: oklch(0.577 0.245 27.325);
623
+ --border: oklch(0.92 0.004 286.32);
624
+ --input: oklch(0.92 0.004 286.32);
625
+ --ring: oklch(0.645 0.246 16.439);
626
+ --chart-1: oklch(0.646 0.222 41.116);
627
+ --chart-2: oklch(0.6 0.118 184.704);
628
+ --chart-3: oklch(0.398 0.07 227.392);
629
+ --chart-4: oklch(0.828 0.189 84.429);
630
+ --chart-5: oklch(0.769 0.188 70.08);
631
+ --sidebar: oklch(0.985 0 0);
632
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
633
+ --sidebar-primary: oklch(0.645 0.246 16.439);
634
+ --sidebar-primary-foreground: oklch(0.969 0.015 12.422);
635
+ --sidebar-accent: oklch(0.967 0.001 286.375);
636
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
637
+ --sidebar-border: oklch(0.92 0.004 286.32);
638
+ --sidebar-ring: oklch(0.645 0.246 16.439);
639
+ }
640
+
641
+ .dark {
642
+ --background: oklch(0.141 0.005 285.823);
643
+ --foreground: oklch(0.985 0 0);
644
+ --card: oklch(0.21 0.006 285.885);
645
+ --card-foreground: oklch(0.985 0 0);
646
+ --popover: oklch(0.21 0.006 285.885);
647
+ --popover-foreground: oklch(0.985 0 0);
648
+ --primary: oklch(0.645 0.246 16.439);
649
+ --primary-foreground: oklch(0.969 0.015 12.422);
650
+ --secondary: oklch(0.274 0.006 286.033);
651
+ --secondary-foreground: oklch(0.985 0 0);
652
+ --muted: oklch(0.274 0.006 286.033);
653
+ --muted-foreground: oklch(0.705 0.015 286.067);
654
+ --accent: oklch(0.274 0.006 286.033);
655
+ --accent-foreground: oklch(0.985 0 0);
656
+ --destructive: oklch(0.704 0.191 22.216);
657
+ --border: oklch(1 0 0 / 10%);
658
+ --input: oklch(1 0 0 / 15%);
659
+ --ring: oklch(0.645 0.246 16.439);
660
+ --chart-1: oklch(0.488 0.243 264.376);
661
+ --chart-2: oklch(0.696 0.17 162.48);
662
+ --chart-3: oklch(0.769 0.188 70.08);
663
+ --chart-4: oklch(0.627 0.265 303.9);
664
+ --chart-5: oklch(0.645 0.246 16.439);
665
+ --sidebar: oklch(0.21 0.006 285.885);
666
+ --sidebar-foreground: oklch(0.985 0 0);
667
+ --sidebar-primary: oklch(0.645 0.246 16.439);
668
+ --sidebar-primary-foreground: oklch(0.969 0.015 12.422);
669
+ --sidebar-accent: oklch(0.274 0.006 286.033);
670
+ --sidebar-accent-foreground: oklch(0.985 0 0);
671
+ --sidebar-border: oklch(1 0 0 / 10%);
672
+ --sidebar-ring: oklch(0.645 0.246 16.439);
673
+ }
674
+
675
+ `,rr=`
676
+ :root {
677
+ --radius: 0.65rem;
678
+ --background: oklch(1 0 0);
679
+ --foreground: oklch(0.141 0.005 285.823);
680
+ --card: oklch(1 0 0);
681
+ --card-foreground: oklch(0.141 0.005 285.823);
682
+ --popover: oklch(1 0 0);
683
+ --popover-foreground: oklch(0.141 0.005 285.823);
684
+ --primary: oklch(0.705 0.213 47.604);
685
+ --primary-foreground: oklch(0.98 0.016 73.684);
686
+ --secondary: oklch(0.967 0.001 286.375);
687
+ --secondary-foreground: oklch(0.21 0.006 285.885);
688
+ --muted: oklch(0.967 0.001 286.375);
689
+ --muted-foreground: oklch(0.552 0.016 285.938);
690
+ --accent: oklch(0.967 0.001 286.375);
691
+ --accent-foreground: oklch(0.21 0.006 285.885);
692
+ --destructive: oklch(0.577 0.245 27.325);
693
+ --border: oklch(0.92 0.004 286.32);
694
+ --input: oklch(0.92 0.004 286.32);
695
+ --ring: oklch(0.705 0.213 47.604);
696
+ --chart-1: oklch(0.646 0.222 41.116);
697
+ --chart-2: oklch(0.6 0.118 184.704);
698
+ --chart-3: oklch(0.398 0.07 227.392);
699
+ --chart-4: oklch(0.828 0.189 84.429);
700
+ --chart-5: oklch(0.769 0.188 70.08);
701
+ --sidebar: oklch(0.985 0 0);
702
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
703
+ --sidebar-primary: oklch(0.705 0.213 47.604);
704
+ --sidebar-primary-foreground: oklch(0.98 0.016 73.684);
705
+ --sidebar-accent: oklch(0.967 0.001 286.375);
706
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
707
+ --sidebar-border: oklch(0.92 0.004 286.32);
708
+ --sidebar-ring: oklch(0.705 0.213 47.604);
709
+ }
710
+
711
+ .dark {
712
+ --background: oklch(0.141 0.005 285.823);
713
+ --foreground: oklch(0.985 0 0);
714
+ --card: oklch(0.21 0.006 285.885);
715
+ --card-foreground: oklch(0.985 0 0);
716
+ --popover: oklch(0.21 0.006 285.885);
717
+ --popover-foreground: oklch(0.985 0 0);
718
+ --primary: oklch(0.646 0.222 41.116);
719
+ --primary-foreground: oklch(0.98 0.016 73.684);
720
+ --secondary: oklch(0.274 0.006 286.033);
721
+ --secondary-foreground: oklch(0.985 0 0);
722
+ --muted: oklch(0.274 0.006 286.033);
723
+ --muted-foreground: oklch(0.705 0.015 286.067);
724
+ --accent: oklch(0.274 0.006 286.033);
725
+ --accent-foreground: oklch(0.985 0 0);
726
+ --destructive: oklch(0.704 0.191 22.216);
727
+ --border: oklch(1 0 0 / 10%);
728
+ --input: oklch(1 0 0 / 15%);
729
+ --ring: oklch(0.646 0.222 41.116);
730
+ --chart-1: oklch(0.488 0.243 264.376);
731
+ --chart-2: oklch(0.696 0.17 162.48);
732
+ --chart-3: oklch(0.769 0.188 70.08);
733
+ --chart-4: oklch(0.627 0.265 303.9);
734
+ --chart-5: oklch(0.645 0.246 16.439);
735
+ --sidebar: oklch(0.21 0.006 285.885);
736
+ --sidebar-foreground: oklch(0.985 0 0);
737
+ --sidebar-primary: oklch(0.646 0.222 41.116);
738
+ --sidebar-primary-foreground: oklch(0.98 0.016 73.684);
739
+ --sidebar-accent: oklch(0.274 0.006 286.033);
740
+ --sidebar-accent-foreground: oklch(0.985 0 0);
741
+ --sidebar-border: oklch(1 0 0 / 10%);
742
+ --sidebar-ring: oklch(0.646 0.222 41.116);
743
+ }
744
+
745
+ `,tr=`
746
+ :root {
747
+ --radius: 0.65rem;
748
+ --background: oklch(1 0 0);
749
+ --foreground: oklch(0.141 0.005 285.823);
750
+ --card: oklch(1 0 0);
751
+ --card-foreground: oklch(0.141 0.005 285.823);
752
+ --popover: oklch(1 0 0);
753
+ --popover-foreground: oklch(0.141 0.005 285.823);
754
+ --primary: oklch(0.723 0.219 149.579);
755
+ --primary-foreground: oklch(0.982 0.018 155.826);
756
+ --secondary: oklch(0.967 0.001 286.375);
757
+ --secondary-foreground: oklch(0.21 0.006 285.885);
758
+ --muted: oklch(0.967 0.001 286.375);
759
+ --muted-foreground: oklch(0.552 0.016 285.938);
760
+ --accent: oklch(0.967 0.001 286.375);
761
+ --accent-foreground: oklch(0.21 0.006 285.885);
762
+ --destructive: oklch(0.577 0.245 27.325);
763
+ --border: oklch(0.92 0.004 286.32);
764
+ --input: oklch(0.92 0.004 286.32);
765
+ --ring: oklch(0.723 0.219 149.579);
766
+ --chart-1: oklch(0.646 0.222 41.116);
767
+ --chart-2: oklch(0.6 0.118 184.704);
768
+ --chart-3: oklch(0.398 0.07 227.392);
769
+ --chart-4: oklch(0.828 0.189 84.429);
770
+ --chart-5: oklch(0.769 0.188 70.08);
771
+ --sidebar: oklch(0.985 0 0);
772
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
773
+ --sidebar-primary: oklch(0.723 0.219 149.579);
774
+ --sidebar-primary-foreground: oklch(0.982 0.018 155.826);
775
+ --sidebar-accent: oklch(0.967 0.001 286.375);
776
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
777
+ --sidebar-border: oklch(0.92 0.004 286.32);
778
+ --sidebar-ring: oklch(0.723 0.219 149.579);
779
+ }
780
+
781
+ .dark {
782
+ --background: oklch(0.141 0.005 285.823);
783
+ --foreground: oklch(0.985 0 0);
784
+ --card: oklch(0.21 0.006 285.885);
785
+ --card-foreground: oklch(0.985 0 0);
786
+ --popover: oklch(0.21 0.006 285.885);
787
+ --popover-foreground: oklch(0.985 0 0);
788
+ --primary: oklch(0.696 0.17 162.48);
789
+ --primary-foreground: oklch(0.393 0.095 152.535);
790
+ --secondary: oklch(0.274 0.006 286.033);
791
+ --secondary-foreground: oklch(0.985 0 0);
792
+ --muted: oklch(0.274 0.006 286.033);
793
+ --muted-foreground: oklch(0.705 0.015 286.067);
794
+ --accent: oklch(0.274 0.006 286.033);
795
+ --accent-foreground: oklch(0.985 0 0);
796
+ --destructive: oklch(0.704 0.191 22.216);
797
+ --border: oklch(1 0 0 / 10%);
798
+ --input: oklch(1 0 0 / 15%);
799
+ --ring: oklch(0.527 0.154 150.069);
800
+ --chart-1: oklch(0.488 0.243 264.376);
801
+ --chart-2: oklch(0.696 0.17 162.48);
802
+ --chart-3: oklch(0.769 0.188 70.08);
803
+ --chart-4: oklch(0.627 0.265 303.9);
804
+ --chart-5: oklch(0.645 0.246 16.439);
805
+ --sidebar: oklch(0.21 0.006 285.885);
806
+ --sidebar-foreground: oklch(0.985 0 0);
807
+ --sidebar-primary: oklch(0.696 0.17 162.48);
808
+ --sidebar-primary-foreground: oklch(0.393 0.095 152.535);
809
+ --sidebar-accent: oklch(0.274 0.006 286.033);
810
+ --sidebar-accent-foreground: oklch(0.985 0 0);
811
+ --sidebar-border: oklch(1 0 0 / 10%);
812
+ --sidebar-ring: oklch(0.527 0.154 150.069);
813
+ }
814
+
815
+ `,nr=`
816
+ :root {
817
+ --radius: 0.65rem;
818
+ --background: oklch(1 0 0);
819
+ --foreground: oklch(0.141 0.005 285.823);
820
+ --card: oklch(1 0 0);
821
+ --card-foreground: oklch(0.141 0.005 285.823);
822
+ --popover: oklch(1 0 0);
823
+ --popover-foreground: oklch(0.141 0.005 285.823);
824
+ --primary: oklch(0.623 0.214 259.815);
825
+ --primary-foreground: oklch(0.97 0.014 254.604);
826
+ --secondary: oklch(0.967 0.001 286.375);
827
+ --secondary-foreground: oklch(0.21 0.006 285.885);
828
+ --muted: oklch(0.967 0.001 286.375);
829
+ --muted-foreground: oklch(0.552 0.016 285.938);
830
+ --accent: oklch(0.967 0.001 286.375);
831
+ --accent-foreground: oklch(0.21 0.006 285.885);
832
+ --destructive: oklch(0.577 0.245 27.325);
833
+ --border: oklch(0.92 0.004 286.32);
834
+ --input: oklch(0.92 0.004 286.32);
835
+ --ring: oklch(0.623 0.214 259.815);
836
+ --chart-1: oklch(0.646 0.222 41.116);
837
+ --chart-2: oklch(0.6 0.118 184.704);
838
+ --chart-3: oklch(0.398 0.07 227.392);
839
+ --chart-4: oklch(0.828 0.189 84.429);
840
+ --chart-5: oklch(0.769 0.188 70.08);
841
+ --sidebar: oklch(0.985 0 0);
842
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
843
+ --sidebar-primary: oklch(0.623 0.214 259.815);
844
+ --sidebar-primary-foreground: oklch(0.97 0.014 254.604);
845
+ --sidebar-accent: oklch(0.967 0.001 286.375);
846
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
847
+ --sidebar-border: oklch(0.92 0.004 286.32);
848
+ --sidebar-ring: oklch(0.623 0.214 259.815);
849
+ }
850
+
851
+ .dark {
852
+ --background: oklch(0.141 0.005 285.823);
853
+ --foreground: oklch(0.985 0 0);
854
+ --card: oklch(0.21 0.006 285.885);
855
+ --card-foreground: oklch(0.985 0 0);
856
+ --popover: oklch(0.21 0.006 285.885);
857
+ --popover-foreground: oklch(0.985 0 0);
858
+ --primary: oklch(0.546 0.245 262.881);
859
+ --primary-foreground: oklch(0.98 0.0067 277.16);
860
+ --secondary: oklch(0.274 0.006 286.033);
861
+ --secondary-foreground: oklch(0.985 0 0);
862
+ --muted: oklch(0.274 0.006 286.033);
863
+ --muted-foreground: oklch(0.705 0.015 286.067);
864
+ --accent: oklch(0.274 0.006 286.033);
865
+ --accent-foreground: oklch(0.985 0 0);
866
+ --destructive: oklch(0.704 0.191 22.216);
867
+ --border: oklch(1 0 0 / 10%);
868
+ --input: oklch(1 0 0 / 15%);
869
+ --ring: oklch(0.488 0.243 264.376);
870
+ --chart-1: oklch(0.488 0.243 264.376);
871
+ --chart-2: oklch(0.696 0.17 162.48);
872
+ --chart-3: oklch(0.769 0.188 70.08);
873
+ --chart-4: oklch(0.627 0.265 303.9);
874
+ --chart-5: oklch(0.645 0.246 16.439);
875
+ --sidebar: oklch(0.21 0.006 285.885);
876
+ --sidebar-foreground: oklch(0.985 0 0);
877
+ --sidebar-primary: oklch(0.546 0.245 262.881);
878
+ --sidebar-primary-foreground: oklch(0.379 0.146 265.522);
879
+ --sidebar-accent: oklch(0.274 0.006 286.033);
880
+ --sidebar-accent-foreground: oklch(0.985 0 0);
881
+ --sidebar-border: oklch(1 0 0 / 10%);
882
+ --sidebar-ring: oklch(0.488 0.243 264.376);
883
+ }
884
+
885
+ `,ir=`
886
+ :root {
887
+ --radius: 0.65rem;
888
+ --background: oklch(1 0 0);
889
+ --foreground: oklch(0.141 0.005 285.823);
890
+ --card: oklch(1 0 0);
891
+ --card-foreground: oklch(0.141 0.005 285.823);
892
+ --popover: oklch(1 0 0);
893
+ --popover-foreground: oklch(0.141 0.005 285.823);
894
+ --primary: oklch(0.795 0.184 86.047);
895
+ --primary-foreground: oklch(0.421 0.095 57.708);
896
+ --secondary: oklch(0.967 0.001 286.375);
897
+ --secondary-foreground: oklch(0.21 0.006 285.885);
898
+ --muted: oklch(0.967 0.001 286.375);
899
+ --muted-foreground: oklch(0.552 0.016 285.938);
900
+ --accent: oklch(0.967 0.001 286.375);
901
+ --accent-foreground: oklch(0.21 0.006 285.885);
902
+ --destructive: oklch(0.577 0.245 27.325);
903
+ --border: oklch(0.92 0.004 286.32);
904
+ --input: oklch(0.92 0.004 286.32);
905
+ --ring: oklch(0.795 0.184 86.047);
906
+ --chart-1: oklch(0.646 0.222 41.116);
907
+ --chart-2: oklch(0.6 0.118 184.704);
908
+ --chart-3: oklch(0.398 0.07 227.392);
909
+ --chart-4: oklch(0.828 0.189 84.429);
910
+ --chart-5: oklch(0.769 0.188 70.08);
911
+ --sidebar: oklch(0.985 0 0);
912
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
913
+ --sidebar-primary: oklch(0.795 0.184 86.047);
914
+ --sidebar-primary-foreground: oklch(0.421 0.095 57.708);
915
+ --sidebar-accent: oklch(0.967 0.001 286.375);
916
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
917
+ --sidebar-border: oklch(0.92 0.004 286.32);
918
+ --sidebar-ring: oklch(0.795 0.184 86.047);
919
+ }
920
+
921
+ .dark {
922
+ --background: oklch(0.141 0.005 285.823);
923
+ --foreground: oklch(0.985 0 0);
924
+ --card: oklch(0.21 0.006 285.885);
925
+ --card-foreground: oklch(0.985 0 0);
926
+ --popover: oklch(0.21 0.006 285.885);
927
+ --popover-foreground: oklch(0.985 0 0);
928
+ --primary: oklch(0.795 0.184 86.047);
929
+ --primary-foreground: oklch(0.421 0.095 57.708);
930
+ --secondary: oklch(0.274 0.006 286.033);
931
+ --secondary-foreground: oklch(0.985 0 0);
932
+ --muted: oklch(0.274 0.006 286.033);
933
+ --muted-foreground: oklch(0.705 0.015 286.067);
934
+ --accent: oklch(0.274 0.006 286.033);
935
+ --accent-foreground: oklch(0.985 0 0);
936
+ --destructive: oklch(0.704 0.191 22.216);
937
+ --border: oklch(1 0 0 / 10%);
938
+ --input: oklch(1 0 0 / 15%);
939
+ --ring: oklch(0.554 0.135 66.442);
940
+ --chart-1: oklch(0.488 0.243 264.376);
941
+ --chart-2: oklch(0.696 0.17 162.48);
942
+ --chart-3: oklch(0.769 0.188 70.08);
943
+ --chart-4: oklch(0.627 0.265 303.9);
944
+ --chart-5: oklch(0.645 0.246 16.439);
945
+ --sidebar: oklch(0.21 0.006 285.885);
946
+ --sidebar-foreground: oklch(0.985 0 0);
947
+ --sidebar-primary: oklch(0.795 0.184 86.047);
948
+ --sidebar-primary-foreground: oklch(0.421 0.095 57.708);
949
+ --sidebar-accent: oklch(0.274 0.006 286.033);
950
+ --sidebar-accent-foreground: oklch(0.985 0 0);
951
+ --sidebar-border: oklch(1 0 0 / 10%);
952
+ --sidebar-ring: oklch(0.554 0.135 66.442);
953
+ }
954
+
955
+ `,ar=`
956
+ :root {
957
+ --radius: 0.65rem;
958
+ --background: oklch(1 0 0);
959
+ --foreground: oklch(0.141 0.005 285.823);
960
+ --card: oklch(1 0 0);
961
+ --card-foreground: oklch(0.141 0.005 285.823);
962
+ --popover: oklch(1 0 0);
963
+ --popover-foreground: oklch(0.141 0.005 285.823);
964
+ --primary: oklch(0.606 0.25 292.717);
965
+ --primary-foreground: oklch(0.969 0.016 293.756);
966
+ --secondary: oklch(0.967 0.001 286.375);
967
+ --secondary-foreground: oklch(0.21 0.006 285.885);
968
+ --muted: oklch(0.967 0.001 286.375);
969
+ --muted-foreground: oklch(0.552 0.016 285.938);
970
+ --accent: oklch(0.967 0.001 286.375);
971
+ --accent-foreground: oklch(0.21 0.006 285.885);
972
+ --destructive: oklch(0.577 0.245 27.325);
973
+ --border: oklch(0.92 0.004 286.32);
974
+ --input: oklch(0.92 0.004 286.32);
975
+ --ring: oklch(0.606 0.25 292.717);
976
+ --chart-1: oklch(0.646 0.222 41.116);
977
+ --chart-2: oklch(0.6 0.118 184.704);
978
+ --chart-3: oklch(0.398 0.07 227.392);
979
+ --chart-4: oklch(0.828 0.189 84.429);
980
+ --chart-5: oklch(0.769 0.188 70.08);
981
+ --sidebar: oklch(0.985 0 0);
982
+ --sidebar-foreground: oklch(0.141 0.005 285.823);
983
+ --sidebar-primary: oklch(0.606 0.25 292.717);
984
+ --sidebar-primary-foreground: oklch(0.969 0.016 293.756);
985
+ --sidebar-accent: oklch(0.967 0.001 286.375);
986
+ --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
987
+ --sidebar-border: oklch(0.92 0.004 286.32);
988
+ --sidebar-ring: oklch(0.606 0.25 292.717);
989
+ }
990
+
991
+ .dark {
992
+ --background: oklch(0.141 0.005 285.823);
993
+ --foreground: oklch(0.985 0 0);
994
+ --card: oklch(0.21 0.006 285.885);
995
+ --card-foreground: oklch(0.985 0 0);
996
+ --popover: oklch(0.21 0.006 285.885);
997
+ --popover-foreground: oklch(0.985 0 0);
998
+ --primary: oklch(0.541 0.281 293.009);
999
+ --primary-foreground: oklch(0.969 0.016 293.756);
1000
+ --secondary: oklch(0.274 0.006 286.033);
1001
+ --secondary-foreground: oklch(0.985 0 0);
1002
+ --muted: oklch(0.274 0.006 286.033);
1003
+ --muted-foreground: oklch(0.705 0.015 286.067);
1004
+ --accent: oklch(0.274 0.006 286.033);
1005
+ --accent-foreground: oklch(0.985 0 0);
1006
+ --destructive: oklch(0.704 0.191 22.216);
1007
+ --border: oklch(1 0 0 / 10%);
1008
+ --input: oklch(1 0 0 / 15%);
1009
+ --ring: oklch(0.541 0.281 293.009);
1010
+ --chart-1: oklch(0.488 0.243 264.376);
1011
+ --chart-2: oklch(0.696 0.17 162.48);
1012
+ --chart-3: oklch(0.769 0.188 70.08);
1013
+ --chart-4: oklch(0.627 0.265 303.9);
1014
+ --chart-5: oklch(0.645 0.246 16.439);
1015
+ --sidebar: oklch(0.21 0.006 285.885);
1016
+ --sidebar-foreground: oklch(0.985 0 0);
1017
+ --sidebar-primary: oklch(0.541 0.281 293.009);
1018
+ --sidebar-primary-foreground: oklch(0.969 0.016 293.756);
1019
+ --sidebar-accent: oklch(0.274 0.006 286.033);
1020
+ --sidebar-accent-foreground: oklch(0.985 0 0);
1021
+ --sidebar-border: oklch(1 0 0 / 10%);
1022
+ --sidebar-ring: oklch(0.541 0.281 293.009);
1023
+ }
1024
+
1025
+ `,Lo={ZINC:Ye,SLATE:Je,STONE:Xe,GRAY:Ze,NEUTRAL:Qe,RED:or,ROSE:er,ORANGE:rr,GREEN:tr,BLUE:nr,YELLOW:ir,VIOLET:ar};var Oo=`/**
1026
+ * Utility function to return Tailwind CSS classes.
1027
+ */
1028
+ export const tw = <T extends TemplateStringsArray | string>(tailwindClasses: T) => tailwindClasses;
1029
+ `;import{join as cr}from"path";import{$ as sr}from"execa";import co from"fs-extra";import lr from"ora";import Uo from"prompts";var X={arrowParens:"always",endOfLine:"lf",plugins:["@ianvs/prettier-plugin-sort-imports","prettier-plugin-tailwindcss"],printWidth:100,semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"es5",useTabs:!1,vueIndentScriptAndStyle:!0,tailwindFunctions:["tv","tw"],importOrder:["<BUILTIN_MODULES>","<THIRD_PARTY_MODULES>","<TYPES>","","^[.]"]};var Z=async(o=process.cwd(),e=!0)=>{let r=cr(o,".prettierrc"),n=X;if(co.existsSync(r)){let a=await co.readFile(r,"utf-8"),l={};try{l=JSON.parse(a)}catch{console.warn("\u26A0\uFE0F Existing .prettierrc is not valid JSON \u2014 will prompt for overwrite.")}let c=await Uo({name:"merge",type:"select",message:"A prettier config file already exists. What would you like to do?",choices:[{title:"Merge configs",value:"merge"},{title:"Overwrite with new config",value:"overwrite"},{title:"Cancel",value:"cancel"}],initial:0});if(c.merge==="merge")n={...l,...X};else if(c.merge==="overwrite")n=X;else return!1}if(await co.writeFile(r,JSON.stringify(n,null,2),"utf-8"),!e)return!0;let i=lr("Formatting files with prettier...").start();return await sr`npx prettier --write .`,i.succeed("Files formatted with prettier"),!0},Ko=async()=>{let{addPrettier:o}=await Uo({name:"addPrettier",type:"confirm",message:"Would you like to add a Prettier configuration to your project?",initial:!0});return o};import{join as dr}from"path";import{builders as pr,loadFile as mr,writeFile as hr}from"magicast";import{getDefaultExportOptions as ur}from"magicast/helpers";var Do=async()=>{let o=dr(process.cwd(),"nuxt.config.ts"),e=await mr(o);if(!e.$code.includes("tailwindcss()")){let r=ur(e);r.vite||={},r.vite.plugins||=[],r.vite.plugins.push(pr.functionCall("tailwindcss"))}e.imports.$items.find(r=>r.local==="tailwindcss")||e.imports.$prepend({from:"@tailwindcss/vite",local:"tailwindcss",imported:"default"}),await hr(e,o)};import kr from"fs-extra";var jo={recommendations:["vue.volar","bradlc.vscode-tailwindcss","antfu.iconify","formulahendry.auto-close-tag","formulahendry.auto-rename-tag"]},Ro={"editor.formatOnSave":!0,"editor.quickSuggestions":{strings:"on"},"files.associations":{"*.css":"tailwindcss"},"tailwindCSS.classFunctions":["tw","clsx","tw\\.[a-z-]+"],"tailwindCSS.experimental.classRegex":[["\\btv\\(\\s*((?:\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'|`(?:\\\\.|[^`\\\\])*`|[^)]*)*)\\)",`["']([^"']*)["']`],["\\btv\\(\\s*((?:\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'|`(?:\\\\.|[^`\\\\])*`|[^)]*)*)\\)","`([^`]*)`"]]};import{merge as fr}from"es-toolkit";import so from"fs-extra";function lo(o,e){let r={};if(so.existsSync(o))try{r=so.readJsonSync(o)}catch{console.warn(`\u26A0\uFE0F Could not parse ${o}, starting fresh.`)}let n=fr(r,e);so.writeJsonSync(o,n,{spaces:2})}var Bo=(o=".vscode")=>{kr.ensureDirSync(o),lo(`${o}/extensions.json`,jo),lo(`${o}/settings.json`,Ro)};var wr=async o=>{let e=await h(o),r=vr("Updating nuxt.config...").start();await yr({cwd:process.cwd(),configFile:"nuxt.config",async onUpdate(i){i.modules||(i.modules=[]),i.imports||(i.imports={imports:[]});for(let s of vo)i.modules.includes(s)||i.modules.push(s);if(!i.colorMode){let s=gr.basename(process.cwd());i.colorMode={storageKey:`${s}-color-mode`,classSuffix:""}}i.icon||(i.icon={clientBundle:{scan:!0,sizeLimitKb:0},mode:"svg",class:"shrink-0",fetchTimeout:2e3,serverBundle:"local"}),i.imports.imports.find(s=>s.from==="tailwind-variants"&&s.name==="tv")||i.imports.imports.push({from:"tailwind-variants",name:"tv"}),i.imports.imports.find(s=>s.from==="tailwind-variants"&&s.name==="VariantProps")||i.imports.imports.push({from:"tailwind-variants",name:"VariantProps",type:!0}),i.css||=[];let a=e.tailwindCSSLocation?.split("app/")[1],l=`~/${a}`,c=`@/${a}`;!i.css.includes(l)&&!i.css.includes(c)&&i.css.push(l)}}),await Do(),r.succeed("Updated nuxt.config!"),r.start("Adding initial Tailwind CSS file..."),$o.writeFileSync(e.tailwindCSSLocation,J(e.theme.toUpperCase()),"utf-8"),r.succeed("Added initial Tailwind CSS file!"),r.start("Adding Autocomplete helper..."),$o.writeFileSync(e.utilsLocation+"/tw-helper.ts",Oo,"utf-8"),r.succeed("Added Autocomplete helper!"),r.start("Merging VS Code settings..."),Bo(),r.succeed("Merged VS Code settings!"),await g(e.packageManager,yo,bo),await Ko()&&(await g(e.packageManager,[],j),await Z()),f("Initialized",`Feel free to start adding components with the ${po.bgWhite(" add ")} command.`,{box:{title:"Complete"}})},Wo=new br().command("init").name("init").summary("Initialize UI Thing in your Nuxt project.").description(`${po.bold("Initialize UI Thing in your Nuxt project.")}
1030
+
1031
+ \u2705 Add tailwindcss to your project
1032
+ \u2705 Update your nuxt.config file
1033
+ \u2705 Add the necessary dependencies
1034
+ \u2705 Create a ${po.bold("ui-thing.config")} file with the default configuration`).option("-f --force","Overwrite config file if it exists.",!1).option("-y --yes","Skip prompts and use default values.",!1).option("-n --nuxtVersion <number>","Specify the Nuxt version you are using.").action(wr);import Cr from"path";import{Command as xr}from"commander";var Sr=async o=>{let e=await h(),r=await v(),n=process.cwd(),i=r;if(o.installed){let a=await Promise.all(r.map(async l=>{if(!l.files||l.files.length===0)return!1;let c=Cr.join(n,e.componentsLocation,l.files[0].fileName);return k(c)}));i=r.filter((l,c)=>a[c])}if(i.length===0){d.info(o.installed?"No components installed.":"No components available.");return}i.forEach(a=>d.log(`${a.name} (${a.value})`)),d.success(`${i.length} component(s) found.`)},Go=new xr().command("list").name("list").description("List available or installed components.").option("-i --installed","Only show installed components.",!1).action(Sr);import{Command as Er}from"commander";import Ir from"prompts";var Ho=new Er().command("prettier").name("prettier").description("Adds prettier config to your project.").action(async()=>{if(!await Z(void 0,!1)){f("Not Added","Prettier config was not added.",{box:{title:"Prettier Not Added",borderColor:"red"}});return}let{pkgManager:e}=await Ir({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:y});if(!e)return process.exit(0);await g(e,void 0,j),f("All Done!","A .prettierrc file has been added to your project and the code formatted. Enjoy!",{box:{title:"Prettier Added"}})});import{spawnSync as Fr}from"child_process";import oo from"path";import{Command as Mr}from"commander";import{consola as C}from"consola";import N from"kleur";import O from"lodash";import uo from"prompts";import Nr from"axios";import{consola as Tr}from"consola";import Pr from"dotenv";import _r from"ora";Pr.config();var Vo=async()=>{let o=_r("Fetching prose components...").start();try{let{data:e}=await Nr.get(process.env.PROSE_COMPONENTS_API||"https://uithing.com/api/prose");return o.succeed("Prose components fetched."),e}catch{o.fail("Failed to fetch prose components."),Tr.error("Could not reach the UI Thing API. Check your network connection."),process.exit(1)}};var fo=[],Q=process.cwd(),mo=o=>fo.find(e=>e.value.toLowerCase()===o.toLowerCase());async function zo(o,e,r,n){if(await k(o)&&!r){let{value:a}=await uo({type:"confirm",name:"value",message:n,initial:!1});if(!a)return C.info(`Skipped: ${N.cyan(oo.basename(o))}`),!1}return await w(o,e),!0}async function ho(o,e,r,n){if(!(!e||e.length===0))for(let i of e){let a=oo.join(Q,r,i.fileName);await zo(a,i.fileContent,n,`The ${o} file ${N.bold(i.fileName)} already exists. Overwrite?`)}}var Ar=async(o,e)=>{let r=await h();await b()||(r=await h({force:!0})),O.isEmpty(r)&&(C.error("Config file not set. Exiting..."),process.exit(1)),fo=await Vo();let n=o;if(n.length===0){let t=await G(e.all,fo);(!t||t.length===0)&&(C.info("No components selected. Exiting..."),process.exit(0)),n=t}let i=n.filter(t=>!mo(t));i.length>0&&C.error(`Not found: ${N.bgRed(i.join(", "))}`);let a=n.map(t=>mo(t)).filter(Boolean);for(let t of[...a])t.prose&&t.prose.length>0&&t.prose.forEach(p=>{if(!a.find(u=>u.value===p)){let u=mo(p);u&&a.push(u)}});for(let t of a){let p=t.file,u=r.componentsLocation,m=oo.join(Q,u,p.fileName);if(!r.useDefaultFilename){let{value:x}=await uo({type:"text",name:"value",message:`Where should we add the file ${N.cyan(p.fileName)}?`,initial:u});x&&(u=x,m=oo.join(Q,u,p.fileName))}await zo(m,p.fileContent,r.force,`The file ${N.bold(p.fileName)} already exists. Overwrite?`)&&(await ho("utils",t.utils,r.utilsLocation,r.force),await ho("composables",t.composables,r.composablesLocation,r.force),await ho("plugins",t.plugins,r.pluginsLocation??"",r.force))}await B(O.uniq(a.flatMap(t=>t.modules||[])));let l=O.uniq(a.flatMap(t=>t.deps||[])),c=O.uniq(a.flatMap(t=>t.devDeps||[]));if(l.length>0||c.length>0)if(e.all)await g(r.packageManager,l,c);else{let{confirmInstall:t}=await uo({type:"confirm",name:"confirmInstall",message:`Install packages: ${N.cyan([...l,...c].join(", "))}?`,initial:!0});t&&await g(r.packageManager,l,c)}let s=O.uniq(a.flatMap(t=>t.components||[]));if(s.length>0){C.info(`Adding ${s.length} component(s) required by prose...`);let t=Fr("npx",["ui-thing@latest","add",...s],{cwd:Q,stdio:"inherit"});t.error?C.error("Failed to spawn component installer:",t.error.message):t.status!==0&&C.error(`Component installer exited with code ${t.status}`)}f("Prose added!",`Run the ${N.cyan("ui-thing@latest --help")} command to learn more.
1035
+ `,{box:{title:"Prose Components Added"}}),a.filter(t=>t.docsUrl).forEach(t=>C.info(`Docs: ${t.docsUrl}`))},qo=new Mr().name("prose").command("prose").description("Add prose components to your project.").option("-a --all","Add all prose components to your project.",!1).argument("[componentNames...]").action(Ar);import Lr from"fs/promises";import P from"path";import{Command as Or}from"commander";import Yo from"prompts";var Ur=async o=>{let e=await h(),r=await v(),n=process.cwd(),i=o;if(i.length===0){let c=(await Promise.all(r.map(async t=>{if(!t.files||t.files.length===0)return null;let p=P.join(n,e.componentsLocation,t.files[0].fileName);return await k(p)?t:null}))).filter(Boolean);if(c.length===0){d.info("No installed components found.");return}let{selected:s}=await Yo({type:"autocompleteMultiselect",name:"selected",message:"Select components to remove",choices:c.map(t=>({title:t.name,value:t.value}))});(!s||s.length===0)&&(d.info("No components selected. Exiting..."),process.exit(0)),i=s}let a=i.map(c=>r.find(s=>s.value.toLowerCase()===c.toLowerCase())).filter(Boolean);if(a.length===0&&(d.error("None of the specified components were found in the registry."),process.exit(1)),!(await Yo({type:"confirm",name:"confirmed",message:`Remove ${a.map(c=>c.name).join(", ")}?`,initial:!1}))?.confirmed){d.info("Cancelled.");return}for(let c of a){let s=[...c.files.map(t=>P.join(n,e.componentsLocation,t.fileName)),...c.utils.map(t=>P.join(n,e.utilsLocation,t.fileName)),...(c.composables??[]).map(t=>P.join(n,e.composablesLocation,t.fileName))];for(let t of s){if(!await k(t)){d.warn(`Skipped (not found): ${P.basename(t)}`);continue}await Lr.unlink(t),d.success(`Removed: ${P.basename(t)}`)}}f("Removed!",void 0,{box:{title:"Components Removed"}})},Jo=new Or().command("remove").name("remove").description(`Remove installed components from your project.
1036
+ Note: shared utility files used by multiple components are deleted \u2014 other components depending on them may break.`).argument("[componentNames...]","Components to remove.").action(Ur);import{Command as Kr}from"commander";import{execa as Dr}from"execa";import jr from"ora";import Rr from"prompts";import{join as Zo}from"path";import Qo from"fs-extra";var Xo=`import type { MaybeRef } from "vue";
1037
+
1038
+ type KbdKeysSpecificMap = {
1039
+ meta: string;
1040
+ alt: string;
1041
+ ctrl: string;
1042
+ };
1043
+
1044
+ export const kbdKeysMap = {
1045
+ meta: "",
1046
+ ctrl: "",
1047
+ alt: "",
1048
+ win: "\u229E",
1049
+ command: "\u2318",
1050
+ shift: "\u21E7",
1051
+ control: "\u2303",
1052
+ option: "\u2325",
1053
+ enter: "\u21B5",
1054
+ delete: "\u2326",
1055
+ backspace: "\u232B",
1056
+ escape: "\u238B",
1057
+ tab: "\u21E5",
1058
+ capslock: "\u21EA",
1059
+ arrowup: "\u2191",
1060
+ arrowright: "\u2192",
1061
+ arrowdown: "\u2193",
1062
+ arrowleft: "\u2190",
1063
+ pageup: "\u21DE",
1064
+ pagedown: "\u21DF",
1065
+ home: "\u2196",
1066
+ end: "\u2198",
1067
+ };
1068
+
1069
+ export type KbdKey = keyof typeof kbdKeysMap;
1070
+ export type KbdKeySpecific = keyof KbdKeysSpecificMap;
1071
+
1072
+ const _useKbd = () => {
1073
+ const macOS = computed(
1074
+ () =>
1075
+ import.meta.client &&
1076
+ navigator &&
1077
+ navigator.userAgent &&
1078
+ navigator.userAgent.match(/Macintosh;/)
1079
+ );
1080
+
1081
+ const kbdKeysSpecificMap = reactive({
1082
+ meta: " ",
1083
+ alt: " ",
1084
+ ctrl: " ",
1085
+ });
1086
+
1087
+ onMounted(() => {
1088
+ kbdKeysSpecificMap.meta = macOS.value ? kbdKeysMap.command : "Ctrl";
1089
+ kbdKeysSpecificMap.ctrl = macOS.value ? kbdKeysMap.control : "Ctrl";
1090
+ kbdKeysSpecificMap.alt = macOS.value ? kbdKeysMap.option : "Alt";
1091
+ });
1092
+
1093
+ function getKbdKey(value?: KbdKey | string) {
1094
+ if (!value) {
1095
+ return;
1096
+ }
1097
+
1098
+ if (["meta", "alt", "ctrl"].includes(value)) {
1099
+ return kbdKeysSpecificMap[value as KbdKeySpecific];
1100
+ }
1101
+
1102
+ return kbdKeysMap[value as KbdKey] || value.toUpperCase();
1103
+ }
1104
+
1105
+ return {
1106
+ macOS,
1107
+ getKbdKey,
1108
+ };
1109
+ };
1110
+
1111
+ export const useKbd = /* @__PURE__ */ createSharedComposable(_useKbd);
1112
+
1113
+ type Handler = (e?: any) => void;
1114
+
1115
+ export interface ShortcutConfig {
1116
+ handler: Handler;
1117
+ usingInput?: string | boolean;
1118
+ }
1119
+
1120
+ export interface ShortcutsConfig {
1121
+ [key: string]: ShortcutConfig | Handler | false | null | undefined;
1122
+ }
1123
+
1124
+ export interface ShortcutsOptions {
1125
+ chainDelay?: number;
1126
+ }
1127
+
1128
+ interface Shortcut {
1129
+ handler: Handler;
1130
+ enabled: boolean;
1131
+ chained: boolean;
1132
+ // KeyboardEvent attributes
1133
+ key: string;
1134
+ ctrlKey: boolean;
1135
+ metaKey: boolean;
1136
+ shiftKey: boolean;
1137
+ altKey: boolean;
1138
+ // code?: string
1139
+ // keyCode?: number
1140
+ }
1141
+
1142
+ const chainedShortcutRegex = /^[^-]+.*-.*[^-]+$/;
1143
+ const combinedShortcutRegex = /^[^_]+.*_.*[^_]+$/;
1144
+ // keyboard keys which can be combined with Shift modifier (in addition to alphabet keys)
1145
+ const shiftableKeys = [
1146
+ "arrowleft",
1147
+ "arrowright",
1148
+ "arrowup",
1149
+ "arrowright",
1150
+ "tab",
1151
+ "escape",
1152
+ "enter",
1153
+ "backspace",
1154
+ ];
1155
+
1156
+ export function extractShortcuts(items: any[] | any[][]) {
1157
+ const shortcuts: Record<string, Handler> = {};
1158
+
1159
+ function traverse(items: any[]) {
1160
+ items.forEach((item) => {
1161
+ if (item.kbds?.length && (item.onSelect || item.onClick)) {
1162
+ const shortcutKey = item.kbds.join("_");
1163
+ shortcuts[shortcutKey] = item.onSelect || item.onClick;
1164
+ }
1165
+ if (item.children) {
1166
+ traverse(item.children.flat());
1167
+ }
1168
+ if (item.items) {
1169
+ traverse(item.items.flat());
1170
+ }
1171
+ });
1172
+ }
1173
+
1174
+ traverse(items.flat());
1175
+
1176
+ return shortcuts;
1177
+ }
1178
+
1179
+ export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: ShortcutsOptions = {}) {
1180
+ const chainedInputs = ref<string[]>([]);
1181
+ const clearChainedInput = () => {
1182
+ chainedInputs.value.splice(0, chainedInputs.value.length);
1183
+ };
1184
+ const debouncedClearChainedInput = useDebounceFn(clearChainedInput, options.chainDelay ?? 800);
1185
+
1186
+ const { macOS } = useKbd();
1187
+ const activeElement = useActiveElement();
1188
+
1189
+ const onKeyDown = (e: KeyboardEvent) => {
1190
+ // Input autocomplete triggers a keydown event
1191
+ if (!e.key) {
1192
+ return;
1193
+ }
1194
+
1195
+ const alphabetKey = /^[a-z]{1}$/i.test(e.key);
1196
+ const shiftableKey = shiftableKeys.includes(e.key.toLowerCase());
1197
+
1198
+ let chainedKey;
1199
+ chainedInputs.value.push(e.key);
1200
+ // try matching a chained shortcut
1201
+ if (chainedInputs.value.length >= 2) {
1202
+ chainedKey = chainedInputs.value.slice(-2).join("-");
1203
+
1204
+ for (const shortcut of shortcuts.value.filter((s) => s.chained)) {
1205
+ if (shortcut.key !== chainedKey) {
1206
+ continue;
1207
+ }
1208
+
1209
+ if (shortcut.enabled) {
1210
+ e.preventDefault();
1211
+ shortcut.handler(e);
1212
+ }
1213
+ clearChainedInput();
1214
+ return;
1215
+ }
1216
+ }
1217
+
1218
+ // try matching a standard shortcut
1219
+ for (const shortcut of shortcuts.value.filter((s) => !s.chained)) {
1220
+ if (e.key.toLowerCase() !== shortcut.key) {
1221
+ continue;
1222
+ }
1223
+ if (e.metaKey !== shortcut.metaKey) {
1224
+ continue;
1225
+ }
1226
+ if (e.ctrlKey !== shortcut.ctrlKey) {
1227
+ continue;
1228
+ }
1229
+ // shift modifier is only checked in combination with alphabet keys and some extra keys
1230
+ // (shift with special characters would change the key)
1231
+ if ((alphabetKey || shiftableKey) && e.shiftKey !== shortcut.shiftKey) {
1232
+ continue;
1233
+ }
1234
+ // alt modifier changes the combined key anyways
1235
+ // if (e.altKey !== shortcut.altKey) { continue }
1236
+
1237
+ if (shortcut.enabled) {
1238
+ e.preventDefault();
1239
+ shortcut.handler(e);
1240
+ }
1241
+ clearChainedInput();
1242
+ return;
1243
+ }
1244
+
1245
+ debouncedClearChainedInput();
1246
+ };
1247
+
1248
+ const usingInput = computed(() => {
1249
+ const tagName = activeElement.value?.tagName;
1250
+ const contentEditable = activeElement.value?.contentEditable;
1251
+
1252
+ const usingInput = !!(
1253
+ tagName === "INPUT" ||
1254
+ tagName === "TEXTAREA" ||
1255
+ contentEditable === "true" ||
1256
+ contentEditable === "plaintext-only"
1257
+ );
1258
+
1259
+ if (usingInput) {
1260
+ return ((activeElement.value as any)?.name as string) || true;
1261
+ }
1262
+
1263
+ return false;
1264
+ });
1265
+
1266
+ // Map config to full detailed shortcuts
1267
+ const shortcuts = computed<Shortcut[]>(() => {
1268
+ return Object.entries(toValue(config))
1269
+ .map(([key, shortcutConfig]) => {
1270
+ if (!shortcutConfig) {
1271
+ return null;
1272
+ }
1273
+
1274
+ // Parse key and modifiers
1275
+ let shortcut: Partial<Shortcut>;
1276
+
1277
+ if (
1278
+ key.includes("-") &&
1279
+ key !== "-" &&
1280
+ !key.includes("_") &&
1281
+ !key.match(chainedShortcutRegex)?.length
1282
+ ) {
1283
+ console.trace(\`[Shortcut] Invalid key: "\${key}"\`);
1284
+ }
1285
+
1286
+ if (key.includes("_") && key !== "_" && !key.match(combinedShortcutRegex)?.length) {
1287
+ console.trace(\`[Shortcut] Invalid key: "\${key}"\`);
1288
+ }
1289
+
1290
+ const chained = key.includes("-") && key !== "-" && !key.includes("_");
1291
+ if (chained) {
1292
+ shortcut = {
1293
+ key: key.toLowerCase(),
1294
+ metaKey: false,
1295
+ ctrlKey: false,
1296
+ shiftKey: false,
1297
+ altKey: false,
1298
+ };
1299
+ } else {
1300
+ const keySplit = key
1301
+ .toLowerCase()
1302
+ .split("_")
1303
+ .map((k) => k);
1304
+ shortcut = {
1305
+ key: keySplit
1306
+ .filter((k) => !["meta", "command", "ctrl", "shift", "alt", "option"].includes(k))
1307
+ .join("_"),
1308
+ metaKey: keySplit.includes("meta") || keySplit.includes("command"),
1309
+ ctrlKey: keySplit.includes("ctrl"),
1310
+ shiftKey: keySplit.includes("shift"),
1311
+ altKey: keySplit.includes("alt") || keySplit.includes("option"),
1312
+ };
1313
+ }
1314
+ shortcut.chained = chained;
1315
+
1316
+ // Convert Meta to Ctrl for non-MacOS
1317
+ if (!macOS.value && shortcut.metaKey && !shortcut.ctrlKey) {
1318
+ shortcut.metaKey = false;
1319
+ shortcut.ctrlKey = true;
1320
+ }
1321
+
1322
+ // Retrieve handler function
1323
+ if (typeof shortcutConfig === "function") {
1324
+ shortcut.handler = shortcutConfig;
1325
+ } else if (typeof shortcutConfig === "object") {
1326
+ shortcut = { ...shortcut, handler: shortcutConfig.handler };
1327
+ }
1328
+
1329
+ if (!shortcut.handler) {
1330
+ console.trace("[Shortcut] Invalid value");
1331
+ return null;
1332
+ }
1333
+
1334
+ let enabled = true;
1335
+ if (!(shortcutConfig as ShortcutConfig).usingInput) {
1336
+ enabled = !usingInput.value;
1337
+ } else if (typeof (shortcutConfig as ShortcutConfig).usingInput === "string") {
1338
+ enabled = usingInput.value === (shortcutConfig as ShortcutConfig).usingInput;
1339
+ }
1340
+ shortcut.enabled = enabled;
1341
+
1342
+ return shortcut;
1343
+ })
1344
+ .filter(Boolean) as Shortcut[];
1345
+ });
1346
+
1347
+ return useEventListener("keydown", onKeyDown);
1348
+ }
1349
+
1350
+ `;var oe=async(o=process.cwd())=>{let e=await h(),r=Zo(o,e.composablesLocation);await Qo.ensureDir(r),await Qo.writeFile(Zo(r,"shortcuts.ts"),Xo,"utf-8")};var ee=new Kr().command("shortcuts").name("shortcuts").description("Add the shortcuts composables to your project.").action(async()=>{await oe();let{pkgManager:o}=await Rr({name:"pkgManager",type:"select",message:"Which package manager are you using?",choices:y});if(!o)return process.exit(0);let e=jr("Installing vueuse module...").start();await Dr`npx -y nuxi@latest module add vueuse`,e.succeed("VueUse module installed successfully!"),f("All Done!","Check the composables folder for the shortcuts composables.",{box:{title:"Composable Added"}})});import{Command as Br}from"commander";import re from"fs-extra";import ko from"lodash";import te from"prompts";var $r=o=>_.some(e=>e.value===o?.toLowerCase()),ne=new Br().command("theme").name("theme").description("Add a new theme to your project.").argument("[themeName]","The name of the theme you would like to add").action(async o=>{let e=await h();await b()||(e=await h({force:!0})),ko.isEmpty(e)&&(d.error("Config file not set. Exiting..."),process.exit(1));let n=o&&$r(o)?o.toLowerCase():void 0;if(!n){let{theme:i}=await te([{name:"theme",type:"autocomplete",message:"Which theme do you want to add?",choices:_}]);i||(d.warn("No theme selected. Exiting..."),process.exit(0)),n=i}if(re.existsSync(e.tailwindCSSLocation)){let{force:i}=await te([{name:"force",type:"confirm",message:"The Tailwind CSS file already exists. Overwrite?",initial:!1}]);if(!i)return d.info("Exiting..."),process.exit(0)}re.writeFileSync(e.tailwindCSSLocation,J(n.toUpperCase()),"utf-8"),f(`${ko.capitalize(n)}`,`${ko.capitalize(n)} theme has been added to ${e.tailwindCSSLocation}`,{box:{title:"New Theme Added"}})});import ie from"path";import{Command as Wr}from"commander";import Gr from"prompts";var Hr=async o=>{let e=await h(),r=await v(),n=process.cwd(),i=o;if(i.length===0){let c=(await Promise.all(r.map(async t=>{if(!t.files||t.files.length===0)return null;let p=ie.join(n,e.componentsLocation,t.files[0].fileName);return await k(p)?t:null}))).filter(Boolean);if(c.length===0){d.info("No installed components found.");return}let{selected:s}=await Gr({type:"autocompleteMultiselect",name:"selected",message:"Select components to update",choices:c.map(t=>({title:t.name,value:t.value}))});(!s||s.length===0)&&(d.info("No components selected. Exiting..."),process.exit(0)),i=s}let a=i.filter(c=>!r.find(s=>s.value.toLowerCase()===c.toLowerCase()));a.length>0&&d.warn(`Component(s) not found in registry: ${a.join(", ")}`);let l=i.map(c=>r.find(s=>s.value.toLowerCase()===c.toLowerCase())).filter(Boolean);for(let c of l)for(let s of c.files){let t=ie.join(n,e.componentsLocation,s.fileName);await w(t,s.fileContent),d.success(`Updated: ${s.fileName}`)}f("Updated!",void 0,{box:{title:"Components Updated"}})},ae=new Wr().command("update").name("update").description("Re-fetch and overwrite installed components with the latest version.").argument("[componentNames...]","Components to update.").action(Hr);process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));process.on("SIGTSTP",()=>process.exit(0));var ce=new Vr;console.clear();f("UI Thing",void 0,{box:{title:"Welcome"}});console.log();ce.name("ui-thing").description("CLI for adding ui-thing components to your Nuxt application").version(go).addCommand(Wo).addCommand(To).addCommand(qo).addCommand(Ao).addCommand(ne).addCommand(Go).addCommand(ae).addCommand(Jo).addCommand(ee).addCommand(Ho);ce.parse(process.argv);
1351
+ //# sourceMappingURL=index.js.map