ui-thing 0.0.17 → 0.0.18

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
- # Changelog
2
-
1
+ # Changelog
2
+
3
+ ## v0.0.18
4
+
5
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.17...v0.0.18)
6
+
7
+ ### 🏡 Chore
8
+
9
+ - Update default component folder location ([1268f24](https://github.com/BayBreezy/ui-thing-cli/commit/1268f24))
10
+
11
+ ### ❤️ Contributors
12
+
13
+ - BayBreezy <behon.baker@yahoo.com>
14
+
3
15
  ## v0.0.17
4
16
 
5
17
  [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.16...v0.0.17)
@@ -152,76 +164,76 @@
152
164
 
153
165
  - Behon Baker <behon.baker@yahoo.com>
154
166
 
155
- ## v0.0.7
156
-
157
- [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.6...v0.0.7)
158
-
159
- ### 🏡 Chore
160
-
161
- - Update add command and components ([a294316](https://github.com/BayBreezy/ui-thing-cli/commit/a294316))
162
- - Update add command ([641e474](https://github.com/BayBreezy/ui-thing-cli/commit/641e474))
163
- - Update add command ([81d0d4e](https://github.com/BayBreezy/ui-thing-cli/commit/81d0d4e))
164
-
165
- ### ❤️ Contributors
166
-
167
- - BayBreezy <behon.baker@yahoo.com>
168
-
169
- ## v0.0.6
170
-
171
- [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.5...v0.0.6)
172
-
173
- ### 🚀 Enhancements
174
-
175
- - Add test workflow ([c00e2f4](https://github.com/BayBreezy/ui-thing-cli/commit/c00e2f4))
176
- - Update test workflow ([c0f0662](https://github.com/BayBreezy/ui-thing-cli/commit/c0f0662))
177
-
178
- ### 🏡 Chore
179
-
180
- - Update prompts deps ([8fdf5ce](https://github.com/BayBreezy/ui-thing-cli/commit/8fdf5ce))
181
- - Update comps ([f232b69](https://github.com/BayBreezy/ui-thing-cli/commit/f232b69))
182
- - Update types ([6f6b347](https://github.com/BayBreezy/ui-thing-cli/commit/6f6b347))
183
- - Update deps ([7624ff0](https://github.com/BayBreezy/ui-thing-cli/commit/7624ff0))
184
-
185
- ### ❤️ Contributors
186
-
187
- - Behon Baker <behon.baker@yahoo.com>
188
-
189
- ## v0.0.5
190
-
191
- [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.3...v0.0.5)
192
-
193
- ### 🏡 Chore
194
-
195
- - Update release script ([c53b0d4](https://github.com/BayBreezy/ui-thing-cli/commit/c53b0d4))
196
- - Update readme ([1d95ccb](https://github.com/BayBreezy/ui-thing-cli/commit/1d95ccb))
197
- - Split cli from website repo ([66f2b3c](https://github.com/BayBreezy/ui-thing-cli/commit/66f2b3c))
198
- - Update deps ([3d90848](https://github.com/BayBreezy/ui-thing-cli/commit/3d90848))
199
-
200
- ### ❤️ Contributors
201
-
202
- - Behon Baker <behon.baker@yahoo.com>
203
-
204
- ## v0.0.3
205
-
206
- [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.2...v0.0.3)
207
-
208
- ### 🏡 Chore
209
-
210
- - Update readme ([88be325](https://github.com/BayBreezy/ui-thing-cli/commit/88be325))
211
- - Change package name ([bd17f8d](https://github.com/BayBreezy/ui-thing-cli/commit/bd17f8d))
212
- - Set version back to 0.0.2 ([1c7b6b2](https://github.com/BayBreezy/ui-thing-cli/commit/1c7b6b2))
213
-
214
- ### ❤️ Contributors
215
-
216
- - Behon Baker <behon.baker@yahoo.com>
217
-
218
- ## v0.0.2
219
-
220
- ### 🏡 Chore
221
-
222
- - Add 1st changeset ([ec0083c](https://github.com/BayBreezy/ui-thing-cli/commit/ec0083c))
223
- - Add release script ([ea11cae](https://github.com/BayBreezy/ui-thing-cli/commit/ea11cae))
224
-
225
- ### ❤️ Contributors
226
-
227
- - Behon Baker <behon.baker@yahoo.com>
167
+ ## v0.0.7
168
+
169
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.6...v0.0.7)
170
+
171
+ ### 🏡 Chore
172
+
173
+ - Update add command and components ([a294316](https://github.com/BayBreezy/ui-thing-cli/commit/a294316))
174
+ - Update add command ([641e474](https://github.com/BayBreezy/ui-thing-cli/commit/641e474))
175
+ - Update add command ([81d0d4e](https://github.com/BayBreezy/ui-thing-cli/commit/81d0d4e))
176
+
177
+ ### ❤️ Contributors
178
+
179
+ - BayBreezy <behon.baker@yahoo.com>
180
+
181
+ ## v0.0.6
182
+
183
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.5...v0.0.6)
184
+
185
+ ### 🚀 Enhancements
186
+
187
+ - Add test workflow ([c00e2f4](https://github.com/BayBreezy/ui-thing-cli/commit/c00e2f4))
188
+ - Update test workflow ([c0f0662](https://github.com/BayBreezy/ui-thing-cli/commit/c0f0662))
189
+
190
+ ### 🏡 Chore
191
+
192
+ - Update prompts deps ([8fdf5ce](https://github.com/BayBreezy/ui-thing-cli/commit/8fdf5ce))
193
+ - Update comps ([f232b69](https://github.com/BayBreezy/ui-thing-cli/commit/f232b69))
194
+ - Update types ([6f6b347](https://github.com/BayBreezy/ui-thing-cli/commit/6f6b347))
195
+ - Update deps ([7624ff0](https://github.com/BayBreezy/ui-thing-cli/commit/7624ff0))
196
+
197
+ ### ❤️ Contributors
198
+
199
+ - Behon Baker <behon.baker@yahoo.com>
200
+
201
+ ## v0.0.5
202
+
203
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.3...v0.0.5)
204
+
205
+ ### 🏡 Chore
206
+
207
+ - Update release script ([c53b0d4](https://github.com/BayBreezy/ui-thing-cli/commit/c53b0d4))
208
+ - Update readme ([1d95ccb](https://github.com/BayBreezy/ui-thing-cli/commit/1d95ccb))
209
+ - Split cli from website repo ([66f2b3c](https://github.com/BayBreezy/ui-thing-cli/commit/66f2b3c))
210
+ - Update deps ([3d90848](https://github.com/BayBreezy/ui-thing-cli/commit/3d90848))
211
+
212
+ ### ❤️ Contributors
213
+
214
+ - Behon Baker <behon.baker@yahoo.com>
215
+
216
+ ## v0.0.3
217
+
218
+ [compare changes](https://github.com/BayBreezy/ui-thing-cli/compare/v0.0.2...v0.0.3)
219
+
220
+ ### 🏡 Chore
221
+
222
+ - Update readme ([88be325](https://github.com/BayBreezy/ui-thing-cli/commit/88be325))
223
+ - Change package name ([bd17f8d](https://github.com/BayBreezy/ui-thing-cli/commit/bd17f8d))
224
+ - Set version back to 0.0.2 ([1c7b6b2](https://github.com/BayBreezy/ui-thing-cli/commit/1c7b6b2))
225
+
226
+ ### ❤️ Contributors
227
+
228
+ - Behon Baker <behon.baker@yahoo.com>
229
+
230
+ ## v0.0.2
231
+
232
+ ### 🏡 Chore
233
+
234
+ - Add 1st changeset ([ec0083c](https://github.com/BayBreezy/ui-thing-cli/commit/ec0083c))
235
+ - Add release script ([ea11cae](https://github.com/BayBreezy/ui-thing-cli/commit/ea11cae))
236
+
237
+ ### ❤️ Contributors
238
+
239
+ - Behon Baker <behon.baker@yahoo.com>
package/dist/index.js CHANGED
@@ -9208,7 +9208,7 @@ ${" ".repeat(6+r)}^`),c));n+=`
9208
9208
  ${l.join(`
9209
9209
  `)}
9210
9210
  `}this.message=n}},ep=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),ua=new Set(["string","number","boolean","bigint","symbol","undefined"]),Z=Yt;function tp(s){return/^[$A-Z_a-z][\w$]*$/.test(s)}var ls="__magicast_proxy";function ge(s,n=new Set){if(s===void 0)return Z.identifier("undefined");if(s===null)return Z.literal(null);if(ua.has(typeof s))return Z.literal(s);if(n.has(s))throw new ye("Can not serialize circular reference");if(n.add(s),s[ls])return s.$ast;if(s instanceof RegExp){let e=Z.regExpLiteral(s.source,s.flags);return delete e.extra.raw,e}return s instanceof Set?Z.newExpression(Z.identifier("Set"),[Z.arrayExpression([...s].map(e=>ge(e,n)))]):s instanceof Date?Z.newExpression(Z.identifier("Date"),[Z.literal(s.toISOString())]):s instanceof Map?Z.newExpression(Z.identifier("Map"),[Z.arrayExpression([...s].map(([e,t])=>Z.arrayExpression([ge(e,n),ge(t,n)])))]):Array.isArray(s)?Z.arrayExpression(s.map(e=>ge(e,n))):typeof s=="object"?Z.objectExpression(Object.entries(s).map(([e,t])=>Z.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?Z.identifier(e):Z.literal(e),ge(t,n)))):Z.literal(s)}function np(s,n={}){let e=n;return e[ls]=!0,e.$ast=s,e.$type||(e.$type="object"),e}var rp={enumerable:!0,configurable:!0};function je(s,n,e){let t=np(s,n);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==ls&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return rp},has(r,i){return i in t},...e,get(r,i,a){if(i in t)return t[i];if(e.get)return e.get(r,i,a)},set(r,i,a,o){return i in t?(t[i]=a,!0):e.set?e.set(r,i,a,o):!1}})}var Pe=Yt,Hr=new WeakMap;function sp(s,n,e){if(Hr.has(n))return Hr.get(n);let t=je(n,{get $declaration(){return s},get imported(){return n.type==="ImportDefaultSpecifier"?"default":n.type==="ImportNamespaceSpecifier"?"*":n.imported.type==="Identifier"?n.imported.name:n.imported.value},set imported(r){if(n.type!=="ImportSpecifier")throw new ye("Changing import name is not yet implemented");n.imported.type==="Identifier"?n.imported.name=r:n.imported.value=r},get local(){return n.local.name},set local(r){n.local.name=r},get from(){return s.source.value},set from(r){if(r===s.source.value)return;s.specifiers=s.specifiers.filter(a=>a!==n),s.specifiers.length===0&&(e.body=e.body.filter(a=>a!==s));let i=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===r);i?i.specifiers.push(n):e.body.unshift(Pe.importDeclaration([n],Pe.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Hr.set(n,t),t}function ip(s,n){let e=()=>{let a=[];for(let o of s.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(sp(o,l,s));return a},t=(a,o)=>{let l=e(),c=l.find(m=>m.local===a),p=o.local||a;if(c)return c.imported=o.imported,c.local=p,c.from=o.from,!0;let u=o.imported==="default"?Pe.importDefaultSpecifier(Pe.identifier(p)):o.imported==="*"?Pe.importNamespaceSpecifier(Pe.identifier(p)):Pe.importSpecifier(Pe.identifier(o.imported),Pe.identifier(p)),h=l.find(m=>m.from===o.from)?.$declaration;return h?h.specifiers.push(u):s.body.unshift(Pe.importDeclaration([u],Pe.stringLiteral(o.from))),!0},r=a=>{let o=e().find(p=>p.local===a);if(!o)return!1;let l=o.$declaration,c=o.$ast;return l.specifiers=l.specifiers.filter(p=>p!==c),l.specifiers.length===0&&(s.body=s.body.filter(p=>p!==l)),!0},i=je(s,{$type:"imports",$add(a){i[a.local||a.imported]=a},get $items(){return e()},toJSON(){return e().reduce((a,o)=>(a[o.local]=o,a),{})}},{get(a,o){return e().find(l=>l.local===o)},set(a,o,l){return t(o,l)},deleteProperty(a,o){return r(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(l=>l.local===o)}});return i}function cs(s,n,e){let t=i=>n[i],r=(i,a)=>{n[i]=a};return je(s,{$type:"array",push(i){n.push(ge(i))},pop(){return ce(n.pop(),e)},unshift(i){n.unshift(ge(i))},shift(){return ce(n.shift(),e)},splice(i,a,...o){return n.splice(i,a,...o.map(c=>ge(c))).map(c=>ce(c,e))},find(i){return n.map(a=>ce(a,e)).find(i)},findIndex(i){return n.map(a=>ce(a,e)).findIndex(i)},includes(i){return n.map(a=>ce(a,e)).includes(i)},toJSON(){return n.map(i=>ce(i,e))}},{get(i,a){if(a==="length")return n.length;if(a===Symbol.iterator)return function*(){for(let c of n)yield ce(c,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let l=t(o);if(l)return ce(l,e)},set(i,a,o){if(typeof a=="symbol")return!1;let l=+a;return Number.isNaN(l)?!1:(r(l,ge(o)),!0)},deleteProperty(i,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(n[o]=ge(void 0),!0)},ownKeys(){return["length",...n.map((i,a)=>a.toString())]}})}function ap(s,n){if("elements"in s)return cs(s,s.elements,n)}function op(s,n){if(s.type!=="CallExpression")throw new ye("Not a function call");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new ye("Not implemented")}let t=cs(s,s.arguments,n);return je(s,{$type:"function-call",$callee:e(s.callee),$args:t},{})}var lp=Yt;function cp(s,n){if(!("properties"in s))return;let e=i=>{for(let a of s.properties){if("key"in a&&"name"in a.key&&a.key.name===i)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===i)return a.value.value??a.value}},t=(i,a=!1)=>{if("key"in i&&"name"in i.key)return i.key.name;if(i.type==="ObjectProperty"&&(i.key.type==="StringLiteral"||i.key.type==="NumericLiteral"||i.key.type==="BooleanLiteral"))return i.key.value.toString();if(a)throw new ye(`Casting "${i.type}" is not supported`,{ast:i,code:n?.$code})},r=(i,a)=>{let o=s.properties.find(l=>t(l)===i);o?o.value=a:tp(i)?s.properties.push({type:"Property",key:{type:"Identifier",name:i},value:a}):s.properties.push({type:"ObjectProperty",key:lp.stringLiteral(i),value:a})};return je(s,{$type:"object",toJSON(){return s.properties.reduce((i,a)=>("key"in a&&"name"in a.key&&(i[a.key.name]=ce(a.value,n)),i),{})}},{get(i,a){let o=e(a);if(o)return ce(o,n)},set(i,a,o){return typeof a!="string"&&(a=String(a)),r(a,ge(o)),!0},deleteProperty(i,a){typeof a!="string"&&(a=String(a));let o=s.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===a);return o!==-1&&s.properties.splice(o,1),!0},ownKeys(){return s.properties.map(i=>t(i,!0)).filter(Boolean)}})}function pp(s,n){if(s.type!=="NewExpression")throw new ye("Not a new expression");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new ye("Not implemented")}let t=cs(s,s.arguments,n);return je(s,{$type:"new-expression",$callee:e(s.callee),$args:t},{})}function up(s){if(s.type!=="Identifier")throw new ye("Not an identifier");return je(s,{$type:"identifier",$name:s.name},{})}var Gr=new WeakMap;function ce(s,n){if(ua.has(typeof s))return s;if(ep.has(s.type))return s.value;if(Gr.has(s))return Gr.get(s);let e;switch(s.type){case"ObjectExpression":{e=cp(s,n);break}case"ArrayExpression":{e=ap(s,n);break}case"CallExpression":{e=op(s,n);break}case"NewExpression":{e=pp(s,n);break}case"Identifier":{e=up(s);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=ce(s.expression,n);break}default:throw new ye(`Casting "${s.type}" is not supported`,{ast:s,code:n?.$code})}return Gr.set(s,e),e}var qt=Yt;function dp(s,n){let e=r=>{let i=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of s.body)if(a.type===i){if(r==="default")return a.declaration;if(a.declaration&&"declarations"in a.declaration){let o=a.declaration.declarations[0];if("name"in o.id&&o.id.name===r)return o.init}}},t=(r,i)=>{let a=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=ge(i);for(let l of s.body)if(l.type===a){if(r==="default"){l.declaration=o;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===r){c.init=o;return}}}s.body.push(r==="default"?qt.exportDefaultDeclaration(o):qt.exportNamedDeclaration(qt.variableDeclaration("const",[qt.variableDeclarator(qt.identifier(r),o)])))};return je(s,{$type:"exports"},{get(r,i){let a=e(i);if(a)return ce(a,n)},set(r,i,a){return t(i,a),!0},ownKeys(){return s.body.flatMap(r=>r.type==="ExportDefaultDeclaration"?["default"]:r.type==="ExportNamedDeclaration"&&r.declaration&&"declarations"in r.declaration?r.declaration.declarations.map(i=>"name"in i.id?i.id.name:""):[]).filter(Boolean)},deleteProperty(r,i){let a=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<s.body.length;o++){let l=s.body[o];if(l.type===a){if(i==="default")return s.body.splice(o,1),!0;if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===i)return s.body.splice(o,1),!0}}}return!1}})}function hp(s,n){let e=s.program;if(e.type!=="Program")throw new ye(`Cannot proxify ${s.type} as module`);let t={$code:n,$type:"module"},r=je(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=dp(e,r),t.imports=ip(e),t.generate=i=>da(r,i),r}function fp(s,n={}){let e={wrapColumn:n.wrapColumn===void 0,indent:n.tabWidth===void 0||n.useTabs===void 0,quote:n.quote===void 0,arrowParens:n.arrowParensAlways===void 0,trailingComma:n.trailingComma===void 0},t=2,r=0,i=0,a=0,o=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},p=(s||"").split(`
9211
- `),u=!1;for(let h of p){let m=h.trim();if(m.length!==0){if(e.wrapColumn&&h.length>a&&(a=h.length),e.indent){let d=h.match(/^\s+/)?.[0]||"";d.length>0&&(d.length>0&&d.length<t&&(t=d.length),d[0]===" "?r++:d.length>0&&r--)}if(m.at(-1)===";"?i++:m.length>0&&i--,e.quote||e.arrowParens){let d=m.matchAll(l);for(let g of d)if(g.groups)for(let f in c)g.groups[f]&&c[f]++}e.trailingComma&&((h.startsWith("}")||h.startsWith("]"))&&(u?o++:o--),u=m.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...n}}function mp(s,n){let e=Dc(s,{parser:n?.parser||Xc(),...n});return hp(e,s)}function da(s,n={}){let e=s.$ast||s,t=n.format===!1||!("$code"in s)?{}:fp(s.$code,n.format),{code:r,map:i}=Jc(e,{...n,...t});return{code:r,map:i}}async function ha(s,n={}){let e=await Kr.readFile(s,"utf8");return n.sourceFileName=n.sourceFileName??s,mp(e,n)}async function fa(s,n,e){let t="$ast"in s?s.$ast:s,{code:r,map:i}=da(t,e);await Kr.writeFile(n,r),i&&await Kr.writeFile(n+".map",i)}var $u=sn(lr(),1),qu=sn(qr(),1);function ma(s,n){if(typeof n=="object")for(let e in n)typeof s[e]=="object"&&typeof n[e]=="object"?ma(s[e],n[e]):s[e]=n[e]}function ps(s){return bp(s.exports.default)}function bp(s){return s.$type==="function-call"?s.$args[0]:s}function ba(s,n,e,t){let r=ps(s);r.modules||(r.modules=[]),r.modules.includes(n)||r.modules.push(n),e&&(r[e]||(r[e]={}),ma(r[e],t))}import Tp from"prompts";import gp from"kleur";import yp from"prompts";var ga=["radix-vue","tailwind-variants"],ya=["typescript","tailwindcss-animate","nuxt-icon","prettier-plugin-tailwindcss","prettier","@nuxtjs/tailwindcss","@nuxtjs/color-mode","@ianvs/prettier-plugin-sort-imports","@vueuse/nuxt"],va=["@nuxtjs/tailwindcss","@nuxtjs/color-mode","@vueuse/nuxt","nuxt-icon"],Vn=[{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"}];var xa=async()=>{let s=await yp([{name:"theme",type:"autocomplete",message:"Which theme do you want to start with?",choices:Vn},{name:"tailwindCSSLocation",type:"text",message:"Where is your tailwind.css file located?",initial:"assets/css/tailwind.css"},{name:"tailwindConfigLocation",type:"text",message:"Where is your tailwind.config file located?",initial:"tailwind.config.js"},{name:"componentsLocation",type:"text",message:"Where should your components be stored?",initial:"components/UI"},{name:"composablesLocation",type:"text",message:"Where should your composables be stored?",initial:"composables"},{name:"utilsLocation",type:"text",message:"Where should your utils be stored?",initial:"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:[{title:"NPM",value:"npm"},{title:"Yarn",value:"yarn"},{title:"PNPM",value:"pnpm"},{title:"Bun",value:"bun"}]}]);return!s||Object.keys(s).length<9?(console.log(gp.red("Incomplete configuration submitted. Exiting...")),process.exit(0)):s};var wp=process.cwd(),us="ui-thing.config.ts",xt=async()=>{if(!Se.existsSync("nuxt.config.ts"))return console.log(Pa.red(`No ${Pa.bgWhite("nuxt.config.ts")} file found. Exiting...`)),process.exit(0);let s=await ha(vp(wp,"nuxt.config.ts")),n=ps(s);return{nuxtConfig:s,defaultExport:n}},Ie=async s=>{let n=Se.existsSync(us),e={};if(!n||s?.force){if(e=await xa(),await Se.writeFile(us,`export default ${JSON.stringify(e,null,2)}`),e.packageManager==="pnpm")if(Se.existsSync(".npmrc")){let{confirmCreateNpmrc:r}=await Tp({type:"confirm",name:"confirmCreateNpmrc",message:"A .npmrc file already exists. Do you want to overwrite it?",initial:!1});r&&await Se.writeFile(".npmrc",`shamefully-hoist=true
9211
+ `),u=!1;for(let h of p){let m=h.trim();if(m.length!==0){if(e.wrapColumn&&h.length>a&&(a=h.length),e.indent){let d=h.match(/^\s+/)?.[0]||"";d.length>0&&(d.length>0&&d.length<t&&(t=d.length),d[0]===" "?r++:d.length>0&&r--)}if(m.at(-1)===";"?i++:m.length>0&&i--,e.quote||e.arrowParens){let d=m.matchAll(l);for(let g of d)if(g.groups)for(let f in c)g.groups[f]&&c[f]++}e.trailingComma&&((h.startsWith("}")||h.startsWith("]"))&&(u?o++:o--),u=m.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...n}}function mp(s,n){let e=Dc(s,{parser:n?.parser||Xc(),...n});return hp(e,s)}function da(s,n={}){let e=s.$ast||s,t=n.format===!1||!("$code"in s)?{}:fp(s.$code,n.format),{code:r,map:i}=Jc(e,{...n,...t});return{code:r,map:i}}async function ha(s,n={}){let e=await Kr.readFile(s,"utf8");return n.sourceFileName=n.sourceFileName??s,mp(e,n)}async function fa(s,n,e){let t="$ast"in s?s.$ast:s,{code:r,map:i}=da(t,e);await Kr.writeFile(n,r),i&&await Kr.writeFile(n+".map",i)}var $u=sn(lr(),1),qu=sn(qr(),1);function ma(s,n){if(typeof n=="object")for(let e in n)typeof s[e]=="object"&&typeof n[e]=="object"?ma(s[e],n[e]):s[e]=n[e]}function ps(s){return bp(s.exports.default)}function bp(s){return s.$type==="function-call"?s.$args[0]:s}function ba(s,n,e,t){let r=ps(s);r.modules||(r.modules=[]),r.modules.includes(n)||r.modules.push(n),e&&(r[e]||(r[e]={}),ma(r[e],t))}import Tp from"prompts";import gp from"kleur";import yp from"prompts";var ga=["radix-vue","tailwind-variants"],ya=["typescript","tailwindcss-animate","nuxt-icon","prettier-plugin-tailwindcss","prettier","@nuxtjs/tailwindcss","@nuxtjs/color-mode","@ianvs/prettier-plugin-sort-imports","@vueuse/nuxt"],va=["@nuxtjs/tailwindcss","@nuxtjs/color-mode","@vueuse/nuxt","nuxt-icon"],Vn=[{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"}];var xa=async()=>{let s=await yp([{name:"theme",type:"autocomplete",message:"Which theme do you want to start with?",choices:Vn},{name:"tailwindCSSLocation",type:"text",message:"Where is your tailwind.css file located?",initial:"assets/css/tailwind.css"},{name:"tailwindConfigLocation",type:"text",message:"Where is your tailwind.config file located?",initial:"tailwind.config.js"},{name:"componentsLocation",type:"text",message:"Where should your components be stored?",initial:"components/Ui"},{name:"composablesLocation",type:"text",message:"Where should your composables be stored?",initial:"composables"},{name:"utilsLocation",type:"text",message:"Where should your utils be stored?",initial:"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:[{title:"NPM",value:"npm"},{title:"Yarn",value:"yarn"},{title:"PNPM",value:"pnpm"},{title:"Bun",value:"bun"}]}]);return!s||Object.keys(s).length<9?(console.log(gp.red("Incomplete configuration submitted. Exiting...")),process.exit(0)):s};var wp=process.cwd(),us="ui-thing.config.ts",xt=async()=>{if(!Se.existsSync("nuxt.config.ts"))return console.log(Pa.red(`No ${Pa.bgWhite("nuxt.config.ts")} file found. Exiting...`)),process.exit(0);let s=await ha(vp(wp,"nuxt.config.ts")),n=ps(s);return{nuxtConfig:s,defaultExport:n}},Ie=async s=>{let n=Se.existsSync(us),e={};if(!n||s?.force){if(e=await xa(),await Se.writeFile(us,`export default ${JSON.stringify(e,null,2)}`),e.packageManager==="pnpm")if(Se.existsSync(".npmrc")){let{confirmCreateNpmrc:r}=await Tp({type:"confirm",name:"confirmCreateNpmrc",message:"A .npmrc file already exists. Do you want to overwrite it?",initial:!1});r&&await Se.writeFile(".npmrc",`shamefully-hoist=true
9212
9212
  strict-peer-dependencies=false
9213
9213
  `)}else await Se.writeFile(".npmrc",`shamefully-hoist=true
9214
9214
  strict-peer-dependencies=false