shadcn 4.16.0 → 4.16.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/{chunk-WSDRTMUH.js → chunk-HHYTEWMD.js} +1 -1
- package/dist/{chunk-OLTG3DPR.js → chunk-MZJVAM2M.js} +73 -73
- package/dist/chunk-UDHSWRLP.js +1 -0
- package/dist/index.d.ts +22 -1
- package/dist/index.js +46 -46
- package/dist/mcp/index.js +1 -1
- package/dist/registry/index.d.ts +6 -0
- package/dist/registry/index.js +1 -1
- package/dist/schema/index.d.ts +149 -1
- package/dist/schema/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-MTWZIHEW.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {z as z$1}from'zod';var l=z$1.union([z$1.string().refine(e=>e.includes("{name}"),{message:"Registry URL must include {name} placeholder"}),z$1.object({url:z$1.string().refine(e=>e.includes("{name}"),{message:"Registry URL must include {name} placeholder"}),params:z$1.record(z$1.string(),z$1.string()).optional(),headers:z$1.record(z$1.string(),z$1.string()).optional()})]),p=z$1.record(z$1.string().refine(e=>e.startsWith("@"),{message:"Registry names must start with @ (e.g., @v0, @acme)"}),l),o=z$1.object({$schema:z$1.string().optional(),style:z$1.string(),rsc:z$1.coerce.boolean().default(false),tsx:z$1.coerce.boolean().default(true),tailwind:z$1.object({config:z$1.string().optional(),css:z$1.string(),baseColor:z$1.string(),cssVariables:z$1.boolean().default(true),prefix:z$1.string().default("").optional()}),iconLibrary:z$1.string().optional(),rtl:z$1.coerce.boolean().default(false).optional(),menuColor:z$1.enum(["default","inverted","default-translucent","inverted-translucent"]).default("default").optional(),menuAccent:z$1.enum(["subtle","bold"]).default("subtle").optional(),aliases:z$1.object({components:z$1.string(),utils:z$1.string(),ui:z$1.string().optional(),lib:z$1.string().optional(),hooks:z$1.string().optional()}),registries:p.optional()}).strict(),m=o.extend({resolvedPaths:z$1.object({cwd:z$1.string(),tailwindConfig:z$1.string(),tailwindCss:z$1.string(),utils:z$1.string(),components:z$1.string(),lib:z$1.string(),hooks:z$1.string(),ui:z$1.string()})}),C=z$1.record(m),a=z$1.enum(["registry:lib","registry:block","registry:component","registry:ui","registry:hook","registry:page","registry:file","registry:theme","registry:style","registry:item","registry:base","registry:font","registry:example","registry:internal"]),y=z$1.discriminatedUnion("type",[z$1.object({path:z$1.string(),content:z$1.string().optional(),type:z$1.enum(["registry:file","registry:page"]),target:z$1.string()}),z$1.object({path:z$1.string(),content:z$1.string().optional(),type:a.exclude(["registry:file","registry:page"]),target:z$1.string().optional()})]),d=z$1.object({config:z$1.object({content:z$1.array(z$1.string()).optional(),theme:z$1.record(z$1.string(),z$1.any()).optional(),plugins:z$1.array(z$1.string()).optional()}).optional()}),n=z$1.object({theme:z$1.record(z$1.string(),z$1.string()).optional(),light:z$1.record(z$1.string(),z$1.string()).optional(),dark:z$1.record(z$1.string(),z$1.string()).optional()}),g=z$1.lazy(()=>z$1.union([z$1.string(),z$1.array(z$1.union([z$1.string(),z$1.record(z$1.string(),z$1.string())])),z$1.record(z$1.string(),g)])),u=z$1.record(z$1.string(),g),h=z$1.record(z$1.string(),z$1.string()),c=z$1.object({family:z$1.string(),provider:z$1.literal("google"),import:z$1.string(),variable:z$1.string(),weight:z$1.array(z$1.string()).optional(),subsets:z$1.array(z$1.string()).optional(),selector:z$1.string().optional(),dependency:z$1.string().optional()}),r=z$1.object({$schema:z$1.string().optional(),extends:z$1.string().optional(),name:z$1.string(),title:z$1.string().optional(),author:z$1.string().min(2).optional(),description:z$1.string().optional(),dependencies:z$1.array(z$1.string()).optional(),devDependencies:z$1.array(z$1.string()).optional(),registryDependencies:z$1.array(z$1.string()).optional(),files:z$1.array(y).optional(),tailwind:d.optional(),cssVars:n.optional(),css:u.optional(),envVars:h.optional(),meta:z$1.record(z$1.string(),z$1.any()).optional(),docs:z$1.string().optional(),categories:z$1.array(z$1.string()).optional()}),i=z$1.discriminatedUnion("type",[r.extend({type:z$1.literal("registry:base"),config:o.deepPartial().optional()}),r.extend({type:z$1.literal("registry:font"),font:c}),r.extend({type:a.exclude(["registry:base","registry:font"])})]),s=z$1.object({total:z$1.number(),offset:z$1.number(),limit:z$1.number(),hasMore:z$1.boolean()}),f=z$1.object({$schema:z$1.string().optional(),name:z$1.string().optional(),homepage:z$1.string().optional(),include:z$1.array(z$1.string()).optional(),items:z$1.array(i).optional(),pagination:s.optional()}).refine(e=>e.items!==void 0||e.include!==void 0,{message:"Registry must define at least one of `items` or `include`.",path:["items"]}),b=f.transform(e=>({...e,items:e.items??[]})),R=b.pipe(z$1.object({$schema:z$1.string().optional(),name:z$1.string(),homepage:z$1.string(),include:z$1.array(z$1.string()).optional(),items:z$1.array(i),pagination:s.optional()})),v=z$1.array(i),V=z$1.array(z$1.object({name:z$1.string(),label:z$1.string()})),w=z$1.record(z$1.string(),z$1.record(z$1.string(),z$1.string())),k=z$1.object({inlineColors:z$1.object({light:z$1.record(z$1.string(),z$1.string()),dark:z$1.record(z$1.string(),z$1.string())}),cssVars:n,cssVarsV4:n.optional(),inlineColorsTemplate:z$1.string(),cssVarsTemplate:z$1.string()}),z=r.pick({dependencies:true,devDependencies:true,files:true,tailwind:true,cssVars:true,css:true,envVars:true,docs:true}).extend({fonts:z$1.array(r.extend({type:z$1.literal("registry:font"),font:c})).optional()}),x=z$1.object({name:z$1.string(),type:z$1.string().optional(),description:z$1.string().optional(),registry:z$1.string(),addCommandArgument:z$1.string()}),S=z$1.object({registry:z$1.string(),message:z$1.string()}),T=z$1.object({pagination:s,items:z$1.array(x),errors:z$1.array(S).optional()}),A=z$1.record(z$1.string().regex(/^@[a-zA-Z0-9][a-zA-Z0-9-_]*$/),z$1.string()),$=z$1.array(z$1.object({name:z$1.string(),homepage:z$1.string().optional(),url:z$1.string(),description:z$1.string().optional()})),j=z$1.object({name:z$1.string(),title:z$1.string(),description:z$1.string(),base:z$1.string(),style:z$1.string(),baseColor:z$1.string(),theme:z$1.string(),iconLibrary:z$1.string(),font:z$1.string(),rtl:z$1.coerce.boolean().default(false),menuAccent:z$1.enum(["subtle","bold"]),menuColor:z$1.enum(["default","inverted","default-translucent","inverted-translucent"]),radius:z$1.string()}),E=z$1.object({presets:z$1.array(j)});export{$ as A,j as B,E as C,l as a,p as b,o as c,m as d,C as e,a as f,y as g,d as h,n as i,u as j,h as k,c as l,r as m,i as n,s as o,b as p,R as q,v as r,V as s,w as t,k as u,z as v,x as w,S as x,T as y,A as z};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,16 @@ type RegistryApiOptions = {
|
|
|
7
7
|
config?: Partial<Config>;
|
|
8
8
|
useCache?: boolean;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type RegistrySearchParams = {
|
|
11
|
+
query?: string;
|
|
12
|
+
types?: string[];
|
|
13
|
+
limit?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
};
|
|
16
|
+
type GetRegistryOptions = RegistryApiOptions & {
|
|
17
|
+
searchParams?: RegistrySearchParams;
|
|
18
|
+
};
|
|
19
|
+
declare function getRegistry(name: string, options?: GetRegistryOptions): Promise<{
|
|
11
20
|
name: string;
|
|
12
21
|
homepage: string;
|
|
13
22
|
items: ({
|
|
@@ -169,6 +178,12 @@ declare function getRegistry(name: string, options?: RegistryApiOptions): Promis
|
|
|
169
178
|
})[];
|
|
170
179
|
$schema?: string | undefined;
|
|
171
180
|
include?: string[] | undefined;
|
|
181
|
+
pagination?: {
|
|
182
|
+
total: number;
|
|
183
|
+
offset: number;
|
|
184
|
+
limit: number;
|
|
185
|
+
hasMore: boolean;
|
|
186
|
+
} | undefined;
|
|
172
187
|
} | {
|
|
173
188
|
items: ({
|
|
174
189
|
files: ({
|
|
@@ -325,6 +340,12 @@ declare function getRegistry(name: string, options?: RegistryApiOptions): Promis
|
|
|
325
340
|
homepage: string;
|
|
326
341
|
$schema?: string | undefined;
|
|
327
342
|
include?: string[] | undefined;
|
|
343
|
+
pagination?: {
|
|
344
|
+
total: number;
|
|
345
|
+
offset: number;
|
|
346
|
+
limit: number;
|
|
347
|
+
hasMore: boolean;
|
|
348
|
+
} | undefined;
|
|
328
349
|
}>;
|
|
329
350
|
declare function getRegistryItems(items: string[], options?: RegistryApiOptions): Promise<({
|
|
330
351
|
type: "registry:base";
|