shadcn-svelte 1.2.4 → 1.2.5
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-D4bXUN-E.d.mts → index-BYQnFFLZ.d.mts} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/schema/index.d.mts +17 -0
- package/dist/schema/index.mjs +1 -1
- package/dist/schema-BACbuGkc.mjs +1 -0
- package/dist/utils/transformers/index.d.mts +1 -1
- package/dist/utils/transformers/transform-icons.d.mts +1 -1
- package/dist/utils/transformers/transform-imports.d.mts +1 -1
- package/dist/utils/transformers/transform-menu.d.mts +1 -1
- package/dist/utils/transformers/transform-strip-types.d.mts +1 -1
- package/package.json +1 -1
- package/dist/schema-pOs-GJu0.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t,r as n,t as r}from"./transform-strip-types-KwOgC14N.mjs";import{S as i,f as a,g as o,i as s,n as c,o as l,r as u,s as d,t as f,x as p,y as m}from"./libraries-UukRrwOg.mjs";import{i as h,n as g,r as _,t as v}from"./transform-icons-BU5XJbBV.mjs";import{a as y,i as b,n as x,r as S,t as C}from"./constants-Cg45v4Km.mjs";import{c as w,f as ee,i as te,l as ne,n as re,p as ie,t as ae,u as oe,v as se}from"./preset-Ccv1xFuI.mjs";import{a as ce,d as le,f as ue,g as de,h as fe,l as pe,m as me,p as he,u as ge}from"./schema-
|
|
2
|
+
import{i as e,n as t,r as n,t as r}from"./transform-strip-types-KwOgC14N.mjs";import{S as i,f as a,g as o,i as s,n as c,o as l,r as u,s as d,t as f,x as p,y as m}from"./libraries-UukRrwOg.mjs";import{i as h,n as g,r as _,t as v}from"./transform-icons-BU5XJbBV.mjs";import{a as y,i as b,n as x,r as S,t as C}from"./constants-Cg45v4Km.mjs";import{c as w,f as ee,i as te,l as ne,n as re,p as ie,t as ae,u as oe,v as se}from"./preset-Ccv1xFuI.mjs";import{a as ce,d as le,f as ue,g as de,h as fe,l as pe,m as me,p as he,u as ge}from"./schema-BACbuGkc.mjs";import{t as _e}from"./src-BM2HK-cR.mjs";import"./magic-string.es-DSnmfwqI.mjs";import{t as ve}from"./transform-imports-plkbH-jB.mjs";import{t as ye}from"./transform-menu-h3XyTjqb.mjs";import{t as be}from"./transformers-Cr-KcpKk.mjs";import{t as xe}from"./css-CKUFqkB9.mjs";import Se,{createRequire as Ce}from"node:module";import T,{stdin as we,stdout as Te}from"node:process";import{Command as Ee,Option as De}from"commander";import E,{dirname as Oe,isAbsolute as ke,join as Ae,resolve as je}from"node:path";import D,{existsSync as O,lstatSync as Me,promises as k,readdirSync as Ne}from"node:fs";import Pe from"fs";import{fileURLToPath as Fe,pathToFileURL as Ie}from"node:url";import{spawn as Le}from"child_process";import{delimiter as Re,dirname as ze,normalize as Be,resolve as Ve}from"path";import{cwd as He}from"process";import{PassThrough as Ue}from"stream";import We from"readline";import Ge,{constants as Ke}from"node:fs/promises";import{promisify as qe,stripVTControlCharacters as Je,styleText as A}from"node:util";import*as Ye from"node:readline";import Xe from"node:readline";import{ReadStream as Ze}from"node:tty";import{fetch as Qe}from"node-fetch-native";import{createProxy as $e}from"node-fetch-native/proxy";import j,{parse as et}from"postcss";import{twMerge as tt}from"tailwind-merge";import*as nt from"svelte/compiler";import rt,{execFile as it}from"node:child_process";import at from"node:os";import{Buffer as ot}from"node:buffer";var M=e(t(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),o=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+s(i,t,n,a)+t:e+i+t},s=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},c=(e=a)=>{let t=e?o:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=c(),t.exports.createColors=c}))(),1);const st=e=>typeof e==`object`&&!!e,ct=(e,t)=>Object.assign(Error(`[${e}]: ${t}`),{code:e}),lt=`ERR_INVALID_PACKAGE_CONFIG`,ut=`ERR_INVALID_PACKAGE_TARGET`,dt=/^\d+$/,ft=/^(\.{1,2}|node_modules)$/i,pt=/\/|\\/;var mt=(e=>(e.Export=`exports`,e.Import=`imports`,e))(mt||{});const ht=(e,t,n,r,i)=>{if(t==null)return[];if(typeof t==`string`){let[n,...r]=t.split(pt);if(n===`..`||r.some(e=>ft.test(e)))throw ct(ut,`Invalid "${e}" target "${t}" defined in the package config`);return[i?t.replace(/\*/g,i):t]}if(Array.isArray(t))return t.flatMap(t=>ht(e,t,n,r,i));if(st(t)){for(let a of Object.keys(t)){if(dt.test(a))throw ct(lt,`Cannot contain numeric property keys`);if(a===`default`||r.includes(a))return ht(e,t[a],n,r,i)}return[]}throw ct(ut,`Invalid "${e}" target "${t}"`)},gt=(e,t)=>{let n=e.indexOf(`*`),r=t.indexOf(`*`);return n===r?t.length>e.length:r>n};function _t(e,t){if(!t.includes(`*`)&&e.hasOwnProperty(t))return[t];let n,r;for(let i of Object.keys(e))if(i.includes(`*`)){let[e,a,o]=i.split(`*`);if(o===void 0&&t.startsWith(e)&&t.endsWith(a)){let o=t.slice(e.length,-a.length||void 0);o&&(!n||gt(n,i))&&(n=i,r=o)}}return[n,r]}const vt=e=>Object.keys(e).reduce((e,t)=>{let n=t===``||t[0]!==`.`;if(e===void 0||e===n)return n;throw ct(lt,`"exports" cannot contain some keys starting with "." and some not`)},void 0),yt=/^\w+:/,bt=(e,t,n)=>{if(!e)throw Error(`"exports" is required`);t=t===``?`.`:`./${t}`,(typeof e==`string`||Array.isArray(e)||st(e)&&vt(e))&&(e={".":e});let[r,i]=_t(e,t),a=ht(mt.Export,e[r],t,n,i);if(a.length===0)throw ct(`ERR_PACKAGE_PATH_NOT_EXPORTED`,t===`.`?`No "exports" main defined`:`Package subpath '${t}' is not defined by "exports"`);for(let e of a)if(!e.startsWith(`./`)&&!yt.test(e))throw ct(ut,`Invalid "exports" target "${e}" defined in the package config`);return a};var xt=Object.defineProperty,N=(e,t)=>xt(e,`name`,{value:t,configurable:!0});function St(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}N(St,`slash`);const Ct=N(e=>{let t=D[e];return(n,...r)=>{let i=`${e}:${r.join(`:`)}`,a=n?.get(i);return a===void 0&&(a=Reflect.apply(t,D,r),n?.set(i,a)),a}},`cacheFs`),wt=Ct(`existsSync`),Tt=Ct(`readFileSync`),Et=Ct(`statSync`),Dt=N((e,t,n)=>{for(;;){let r=E.posix.join(e,t);if(wt(n,r))return r;let i=E.dirname(e);if(i===e)return;e=i}},`findUp`),Ot=/^\.{1,2}(\/.*)?$/,kt=N(e=>{let t=St(e);return Ot.test(t)?t:`./${t}`},`normalizeRelativePath`);function At(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}N(f,`scanHexDigits`);function p(e){r=e,i=``,a=0,o=16,d=0}N(p,`setPosition`);function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Nt(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Nt(e.charCodeAt(r)))for(r++;r<e.length&&Nt(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r);let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Nt(e.charCodeAt(r))){for(r++;r<e.length&&Nt(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}N(m,`scanNumber`);function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
3
3
|
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31)if(Mt(a)){t+=e.substring(i,r),d=2;break}else d=6;r++}return t}N(h,`scanString`);function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(jt(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(jt(t));return o=15}if(Mt(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
4
4
|
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!Mt(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,Mt(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!Nt(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}N(g,`scanNext`);function _(e){if(jt(e)||Mt(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}N(_,`isUnknownContentCharacter`);function v(){let e;do e=g();while(e>=12&&e<=15);return e}return N(v,`scanNextNonTrivia`),{setPosition:p,getPosition:N(()=>r,`getPosition`),scan:t?v:g,getToken:N(()=>o,`getToken`),getTokenValue:N(()=>i,`getTokenValue`),getTokenOffset:N(()=>a,`getTokenOffset`),getTokenLength:N(()=>r-a,`getTokenLength`),getTokenStartLine:N(()=>c,`getTokenStartLine`),getTokenStartCharacter:N(()=>a-u,`getTokenStartCharacter`),getTokenError:N(()=>d,`getTokenError`)}}N(At,`createScanner`);function jt(e){return e===32||e===9}N(jt,`isWhiteSpace`);function Mt(e){return e===10||e===13}N(Mt,`isLineBreak`);function Nt(e){return e>=48&&e<=57}N(Nt,`isDigit`);var Pt;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(Pt||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
|
|
5
5
|
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
|
package/dist/schema/index.d.mts
CHANGED
|
@@ -424,6 +424,23 @@ declare const componentsJsonSchema: z.ZodObject<{
|
|
|
424
424
|
typescript: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
425
425
|
config: z.ZodString;
|
|
426
426
|
}, z.core.$strip>]>>;
|
|
427
|
+
iconLibrary: z.ZodOptional<z.ZodEnum<{
|
|
428
|
+
lucide: "lucide";
|
|
429
|
+
tabler: "tabler";
|
|
430
|
+
hugeicons: "hugeicons";
|
|
431
|
+
phosphor: "phosphor";
|
|
432
|
+
remixicon: "remixicon";
|
|
433
|
+
}>>;
|
|
434
|
+
menuColor: z.ZodOptional<z.ZodEnum<{
|
|
435
|
+
default: "default";
|
|
436
|
+
inverted: "inverted";
|
|
437
|
+
"default-translucent": "default-translucent";
|
|
438
|
+
"inverted-translucent": "inverted-translucent";
|
|
439
|
+
}>>;
|
|
440
|
+
menuAccent: z.ZodOptional<z.ZodEnum<{
|
|
441
|
+
subtle: "subtle";
|
|
442
|
+
bold: "bold";
|
|
443
|
+
}>>;
|
|
427
444
|
}, z.core.$strip>;
|
|
428
445
|
/**
|
|
429
446
|
* A highly naive implementation of deep partialification. Unfortunately the latest version of zod doesn't support this at this time. If there ever comes a time where it does let's replace this method ASAP.
|
package/dist/schema/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../constants-Cg45v4Km.mjs";import"../preset-Ccv1xFuI.mjs";import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"../schema-
|
|
1
|
+
import"../constants-Cg45v4Km.mjs";import"../preset-Ccv1xFuI.mjs";import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"../schema-BACbuGkc.mjs";export{c as componentsJsonSchema,i as naiveDeepPartialify,o as registryBaseColorSchema,n as registryIndexItemSchema,e as registryIndexSchema,a as registryItemCommonSchema,s as registryItemFileSchema,t as registryItemFontSchema,r as registryItemSchema,l as registrySchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,p as l,u,v as d,y as f}from"./libraries-UukRrwOg.mjs";import{i as p}from"./constants-Cg45v4Km.mjs";import{a as m,o as h,r as g,s as _}from"./preset-Ccv1xFuI.mjs";const v=m,y=g,b=h,x=_,S={$schema:`${p}/schema.json`,aliases:{lib:`$lib`,utils:`$lib/utils`,hooks:`$lib/hooks`,components:`$lib/components`,ui:`$lib/components/ui`},tailwind:{baseColor:`slate`,css:`src/app.css`},typescript:!0,registry:`${p}/registry`,style:`nova`,iconLibrary:`lucide`,menuColor:`default`,menuAccent:`subtle`},C=e=>e.endsWith(`/`)?e.slice(0,-1):e,w=e=>f(`Missing aliases.${e} alias`),T=a({$schema:f().optional(),tailwind:a({css:f(`Missing tailwind.css path`),baseColor:f(`Missing tailwind.baseColor field`)},`Missing tailwind object`),aliases:a({components:w(`components`),utils:w(`utils`)},`Missing aliases object`),typescript:t([i(),a({config:f()})],`Invalid typescript field. Must either be 'true', 'false', or '{ "config": "path/to/tsconfig.json" }'`).default(S.typescript)}),E=T.extend({style:f().optional()}),D=T.extend({aliases:T.shape.aliases.extend({ui:w(`ui`).default(S.aliases.ui),hooks:w(`hooks`).default(S.aliases.hooks),lib:w(`lib`).default(S.aliases.lib)}),registry:f().default(S.registry),style:f().optional(),iconLibrary:s(v).optional(),menuColor:s(x).optional(),menuAccent:s(b).optional()}),O=a({...E.shape,...D.shape,aliases:a({...E.shape.aliases.shape,...D.shape.aliases.shape})}),k=O.extend({sveltekit:i(),resolvedPaths:a({cwd:f(),tailwindCss:f(),utils:f(),components:f(),hooks:f(),ui:f(),lib:f()}),style:f().default(S.style),iconLibrary:s(v).default(S.iconLibrary),menuColor:s(x).default(S.menuColor),menuAccent:s(b).default(S.menuAccent)}),A=[`registry:lib`,`registry:block`,`registry:component`,`registry:ui`,`registry:hook`,`registry:page`,`registry:file`,`registry:theme`,`registry:style`,`registry:item`,`registry:base`,`registry:font`],j=[`registry:block`],M=[`registry:example`,`registry:internal`],N=s([...A,...j,...M]).describe(`The type of the item. Used to determine the type and target path of the item when resolved for a project.`),P=s(A).describe(`The type of the file. Used to resolve the file's path for a project.`),F=a({content:f().describe(`The content of the file.`),type:P,target:f().describe(`The target path of the file. This is where the file will be installed.`)}).describe(`The main payload of the registry item. This is an array of files that are part of the registry item. Each file is an object with a target, type, and content.`),I=f().array().describe(`An array of registry items that this item depends on. Use the name of the item to reference shadcn/ui components and urls to reference other registries.`),L=a({name:f().describe(`The name of the item. Used to identify the item in the registry. It should be unique for your registry.`),title:f().optional().describe(`The human-readable title for your registry item. Keep it short and descriptive.`),type:N,author:f().min(2,`Author name must be at least 2 characters`).optional().describe(`The author of the item. Recommended format: username <url>`),description:f().optional().describe(`The description of the item. Used to provide a brief overview of the item.`),dependencies:f().array().optional().describe(`An array of NPM dependencies required by the registry item.`),devDependencies:f().array().optional().describe(`An array of NPM dev dependencies required by the registry item.`),registryDependencies:e(I),meta:d(f(),u()).optional().describe(`Additional metadata for the registry item. This is an object with any key value pairs.`)}),R=L.extend({relativeUrl:f()}),z=r(R),B=d(f(),f()),V=a({cssVars:a({light:B,dark:B})}),H=a({theme:e(B).describe(`CSS variables for the @theme directive. For Tailwind v4 projects only. Use tailwind for older projects.`),light:e(B).describe(`CSS variables for the light theme.`),dark:e(B).describe(`CSS variables for the dark theme.`)}).describe(`The css variables for the registry item. This will be merged with the project's css variables.`),U=d(f().describe(`Direct CSS string (e.g., 'font-family: sans-serif; line-height: 1.5;')`),c(()=>t([f().describe(`CSS property value (e.g., 'blue', 'var(--color-primary)')`),U.describe(`CSS property value for nested rule`)])).describe(`CSS properties or nested selectors`)).describe(`CSS definitions to be added to the project's CSS file. Supports at-rules, selectors, nested rules, utilities, layers, and more.`),W=a({$schema:f().optional(),...L.shape,docs:f().optional().describe(`The documentation for the registry item. This is a markdown string.`),categories:f().array().optional().describe(`The categories of the registry item. This is an array of strings.`),css:e(U),cssVars:e(H),files:r(F).optional()}),G=a({family:f(),provider:o(`google`),import:f(),variable:f(),weight:r(f()).optional(),subsets:r(f()).optional(),selector:f().optional(),dependency:f().optional()}),K=l(`type`,[W.extend({type:o(`registry:base`),config:Y(O).optional()}),W.extend({type:o(`registry:font`),font:G}),W.extend({type:N.exclude([`registry:base`,`registry:font`])})]),q=a({$schema:f().optional(),name:f().describe(`The name of the registry.`),homepage:f().describe(`The homepage of the registry.`),overrideDependencies:f().array().optional().describe("An array of NPM dependencies that should have their versions overridden during registry `build`."),aliases:a({lib:f().optional(),ui:f().optional(),components:f().optional(),utils:f().optional(),hooks:f().optional()}).optional().describe("Defines which internal import paths should be transformed during registry `build`."),items:L.extend({files:F.partial().extend({path:f().describe(`The path to the file relative to the registry root.`),type:P}).array().describe("An array of files that instructs the `build` command on how to locate and parse the registry files."),registryDependencies:I,cssVars:e(H),css:e(U),font:e(G)}).array().describe(`Defines a custom component registry.`)}),J=a({$schema:f().optional(),style:f().optional().describe(`DEPRECATED IN TAILWIND v4! The style for your components. This cannot be changed after initialization.`),tailwind:a({css:f().describe(`Path to the CSS file that imports Tailwind CSS into your project.`),baseColor:f().describe(`Used to generate the default color palette for your components. This cannot be changed after initialization.`),config:f().optional().describe("DEPRECATED IN TAILWIND v4! The path to your `tailwind.config.[js|ts]` file.")}),aliases:a({components:f().describe(`Import alias for your components.`),utils:f().describe(`Import alias for your utility functions.`),ui:f().optional().describe("Import alias for your UI components. Defaults to `$lib/components/ui`."),hooks:f().optional().describe("Import alias for your hooks. Defaults to `$lib/hooks`."),lib:f().optional().describe("Import alias for your library, which is typically where you store your components, utils, hooks, etc. Defaults to `$lib`.")}).describe("The CLI uses these values and the `alias` config from your `svelte.config.js` file to place generated components in the correct location."),registry:f().optional().describe(`The registry URL tells the CLI where to fetch the shadcn-svelte components/registry from. You can pin this to a specific preview release or your own fork of the registry.`),typescript:t([i(),a({config:f().describe(`Path to the tsconfig/jsconfig file.`)})]).optional().describe("Used to determine if Typescript is used for this project. When set to `false`, `.js` files will be installed instead. Defaults to `true`."),iconLibrary:s(v).optional().describe(`The icon library to use for your components.`),menuColor:s(x).optional().describe(`The color scheme for menus.`),menuAccent:s(b).optional().describe(`The accent style for menus.`)});function Y(t){let r={};return Object.entries(t.shape).forEach(([t,i])=>{i instanceof n?r[t]=Y(i).optional():r[t]=e(i)}),a(r)}export{z as a,G as c,y as d,S as f,C as g,k as h,R as i,K as l,O as m,Y as n,W as o,D as p,V as r,F as s,J as t,q as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as transformMenu, c as transformStripTypes, i as transform, n as Transformer, o as transformImports, r as TransformerResult, s as transformIcons, t as TransformOptions } from "../../index-
|
|
1
|
+
import { a as transformMenu, c as transformStripTypes, i as transform, n as Transformer, o as transformImports, r as TransformerResult, s as transformIcons, t as TransformOptions } from "../../index-BYQnFFLZ.mjs";
|
|
2
2
|
export { TransformOptions, Transformer, TransformerResult, transform, transformIcons, transformImports, transformMenu, transformStripTypes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as transformIcons } from "../../index-
|
|
1
|
+
import { s as transformIcons } from "../../index-BYQnFFLZ.mjs";
|
|
2
2
|
export { transformIcons };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as transformImports } from "../../index-
|
|
1
|
+
import { o as transformImports } from "../../index-BYQnFFLZ.mjs";
|
|
2
2
|
export { transformImports };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as transformMenu } from "../../index-
|
|
1
|
+
import { a as transformMenu } from "../../index-BYQnFFLZ.mjs";
|
|
2
2
|
export { transformMenu };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as transformStripTypes } from "../../index-
|
|
1
|
+
import { c as transformStripTypes } from "../../index-BYQnFFLZ.mjs";
|
|
2
2
|
export { transformStripTypes };
|
package/package.json
CHANGED
package/dist/schema-pOs-GJu0.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,p as l,u,v as d,y as f}from"./libraries-UukRrwOg.mjs";import{i as p}from"./constants-Cg45v4Km.mjs";import{a as m,o as h,r as g,s as _}from"./preset-Ccv1xFuI.mjs";const v=g,y=h,b=_,x={$schema:`${p}/schema.json`,aliases:{lib:`$lib`,utils:`$lib/utils`,hooks:`$lib/hooks`,components:`$lib/components`,ui:`$lib/components/ui`},tailwind:{baseColor:`slate`,css:`src/app.css`},typescript:!0,registry:`${p}/registry`,style:`nova`,iconLibrary:`lucide`,menuColor:`default`,menuAccent:`subtle`},S=e=>e.endsWith(`/`)?e.slice(0,-1):e,C=e=>f(`Missing aliases.${e} alias`),w=a({$schema:f().optional(),tailwind:a({css:f(`Missing tailwind.css path`),baseColor:f(`Missing tailwind.baseColor field`)},`Missing tailwind object`),aliases:a({components:C(`components`),utils:C(`utils`)},`Missing aliases object`),typescript:t([i(),a({config:f()})],`Invalid typescript field. Must either be 'true', 'false', or '{ "config": "path/to/tsconfig.json" }'`).default(x.typescript)}),T=w.extend({style:f().optional()}),E=w.extend({aliases:w.shape.aliases.extend({ui:C(`ui`).default(x.aliases.ui),hooks:C(`hooks`).default(x.aliases.hooks),lib:C(`lib`).default(x.aliases.lib)}),registry:f().default(x.registry),style:f().optional(),iconLibrary:s(m).optional(),menuColor:s(b).optional(),menuAccent:s(y).optional()}),D=a({...T.shape,...E.shape,aliases:a({...T.shape.aliases.shape,...E.shape.aliases.shape})}),O=D.extend({sveltekit:i(),resolvedPaths:a({cwd:f(),tailwindCss:f(),utils:f(),components:f(),hooks:f(),ui:f(),lib:f()}),style:f().default(x.style),iconLibrary:s(m).default(x.iconLibrary),menuColor:s(b).default(x.menuColor),menuAccent:s(y).default(x.menuAccent)}),k=[`registry:lib`,`registry:block`,`registry:component`,`registry:ui`,`registry:hook`,`registry:page`,`registry:file`,`registry:theme`,`registry:style`,`registry:item`,`registry:base`,`registry:font`],A=[`registry:block`],j=[`registry:example`,`registry:internal`],M=s([...k,...A,...j]).describe(`The type of the item. Used to determine the type and target path of the item when resolved for a project.`),N=s(k).describe(`The type of the file. Used to resolve the file's path for a project.`),P=a({content:f().describe(`The content of the file.`),type:N,target:f().describe(`The target path of the file. This is where the file will be installed.`)}).describe(`The main payload of the registry item. This is an array of files that are part of the registry item. Each file is an object with a target, type, and content.`),F=f().array().describe(`An array of registry items that this item depends on. Use the name of the item to reference shadcn/ui components and urls to reference other registries.`),I=a({name:f().describe(`The name of the item. Used to identify the item in the registry. It should be unique for your registry.`),title:f().optional().describe(`The human-readable title for your registry item. Keep it short and descriptive.`),type:M,author:f().min(2,`Author name must be at least 2 characters`).optional().describe(`The author of the item. Recommended format: username <url>`),description:f().optional().describe(`The description of the item. Used to provide a brief overview of the item.`),dependencies:f().array().optional().describe(`An array of NPM dependencies required by the registry item.`),devDependencies:f().array().optional().describe(`An array of NPM dev dependencies required by the registry item.`),registryDependencies:e(F),meta:d(f(),u()).optional().describe(`Additional metadata for the registry item. This is an object with any key value pairs.`)}),L=I.extend({relativeUrl:f()}),R=r(L),z=d(f(),f()),B=a({cssVars:a({light:z,dark:z})}),V=a({theme:e(z).describe(`CSS variables for the @theme directive. For Tailwind v4 projects only. Use tailwind for older projects.`),light:e(z).describe(`CSS variables for the light theme.`),dark:e(z).describe(`CSS variables for the dark theme.`)}).describe(`The css variables for the registry item. This will be merged with the project's css variables.`),H=d(f().describe(`Direct CSS string (e.g., 'font-family: sans-serif; line-height: 1.5;')`),c(()=>t([f().describe(`CSS property value (e.g., 'blue', 'var(--color-primary)')`),H.describe(`CSS property value for nested rule`)])).describe(`CSS properties or nested selectors`)).describe(`CSS definitions to be added to the project's CSS file. Supports at-rules, selectors, nested rules, utilities, layers, and more.`),U=a({$schema:f().optional(),...I.shape,docs:f().optional().describe(`The documentation for the registry item. This is a markdown string.`),categories:f().array().optional().describe(`The categories of the registry item. This is an array of strings.`),css:e(H),cssVars:e(V),files:r(P).optional()}),W=a({family:f(),provider:o(`google`),import:f(),variable:f(),weight:r(f()).optional(),subsets:r(f()).optional(),selector:f().optional(),dependency:f().optional()}),G=l(`type`,[U.extend({type:o(`registry:base`),config:J(D).optional()}),U.extend({type:o(`registry:font`),font:W}),U.extend({type:M.exclude([`registry:base`,`registry:font`])})]),K=a({$schema:f().optional(),name:f().describe(`The name of the registry.`),homepage:f().describe(`The homepage of the registry.`),overrideDependencies:f().array().optional().describe("An array of NPM dependencies that should have their versions overridden during registry `build`."),aliases:a({lib:f().optional(),ui:f().optional(),components:f().optional(),utils:f().optional(),hooks:f().optional()}).optional().describe("Defines which internal import paths should be transformed during registry `build`."),items:I.extend({files:P.partial().extend({path:f().describe(`The path to the file relative to the registry root.`),type:N}).array().describe("An array of files that instructs the `build` command on how to locate and parse the registry files."),registryDependencies:F,cssVars:e(V),css:e(H),font:e(W)}).array().describe(`Defines a custom component registry.`)}),q=a({$schema:f().optional(),style:f().optional().describe(`DEPRECATED IN TAILWIND v4! The style for your components. This cannot be changed after initialization.`),tailwind:a({css:f().describe(`Path to the CSS file that imports Tailwind CSS into your project.`),baseColor:f().describe(`Used to generate the default color palette for your components. This cannot be changed after initialization.`),config:f().optional().describe("DEPRECATED IN TAILWIND v4! The path to your `tailwind.config.[js|ts]` file.")}),aliases:a({components:f().describe(`Import alias for your components.`),utils:f().describe(`Import alias for your utility functions.`),ui:f().optional().describe("Import alias for your UI components. Defaults to `$lib/components/ui`."),hooks:f().optional().describe("Import alias for your hooks. Defaults to `$lib/hooks`."),lib:f().optional().describe("Import alias for your library, which is typically where you store your components, utils, hooks, etc. Defaults to `$lib`.")}).describe("The CLI uses these values and the `alias` config from your `svelte.config.js` file to place generated components in the correct location."),registry:f().optional().describe(`The registry URL tells the CLI where to fetch the shadcn-svelte components/registry from. You can pin this to a specific preview release or your own fork of the registry.`),typescript:t([i(),a({config:f().describe(`Path to the tsconfig/jsconfig file.`)})]).optional().describe("Used to determine if Typescript is used for this project. When set to `false`, `.js` files will be installed instead. Defaults to `true`.")});function J(t){let r={};return Object.entries(t.shape).forEach(([t,i])=>{i instanceof n?r[t]=J(i).optional():r[t]=e(i)}),a(r)}export{R as a,W as c,v as d,x as f,S as g,O as h,L as i,G as l,D as m,J as n,U as o,E as p,B as r,P as s,q as t,K as u};
|