shadcn 0.0.0-beta.8ff87cb → 0.0.0-beta.9df4b2e
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-TPDUVJHA.js +7 -0
- package/dist/chunk-TPDUVJHA.js.map +1 -0
- package/dist/index.d.ts +397 -0
- package/dist/index.js +69 -15
- package/dist/index.js.map +1 -1
- package/dist/registry/index.d.ts +804 -0
- package/dist/registry/index.js +3 -0
- package/dist/registry/index.js.map +1 -0
- package/package.json +13 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
var e=z.enum(["registry:lib","registry:block","registry:component","registry:ui","registry:hook","registry:page","registry:file","registry:theme","registry:example","registry:style","registry:internal"]),i=z.discriminatedUnion("type",[z.object({path:z.string(),content:z.string().optional(),type:z.enum(["registry:file","registry:page"]),target:z.string()}),z.object({path:z.string(),content:z.string().optional(),type:e.exclude(["registry:file","registry:page"]),target:z.string().optional()})]),s=z.object({config:z.object({content:z.array(z.string()).optional(),theme:z.record(z.string(),z.any()).optional(),plugins:z.array(z.string()).optional()}).optional()}),n=z.object({light:z.record(z.string(),z.string()).optional(),dark:z.record(z.string(),z.string()).optional()}),r=z.object({$schema:z.string().optional(),name:z.string(),type:e,title:z.string().optional(),author:z.string().min(2).optional(),description:z.string().optional(),dependencies:z.array(z.string()).optional(),devDependencies:z.array(z.string()).optional(),registryDependencies:z.array(z.string()).optional(),files:z.array(i).optional(),tailwind:s.optional(),cssVars:n.optional(),meta:z.record(z.string(),z.any()).optional(),docs:z.string().optional(),categories:z.array(z.string()).optional()}),a=z.object({name:z.string(),homepage:z.string(),items:z.array(r)}),g=z.array(r),c=z.array(z.object({name:z.string(),label:z.string()})),p=z.record(z.string(),z.record(z.string(),z.string())),l=z.object({inlineColors:z.object({light:z.record(z.string(),z.string()),dark:z.record(z.string(),z.string())}),cssVars:z.object({light:z.record(z.string(),z.string()),dark:z.record(z.string(),z.string())}),inlineColorsTemplate:z.string(),cssVarsTemplate:z.string()}),y=r.pick({dependencies:!0,devDependencies:!0,files:!0,tailwind:!0,cssVars:!0,docs:!0});
|
|
4
|
+
|
|
5
|
+
export { e as a, i as b, s as c, n as d, r as e, a as f, g, c as h, p as i, l as j, y as k };
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-TPDUVJHA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/registry/schema.ts"],"names":["z","registryItemTypeSchema","registryItemFileSchema","registryItemTailwindSchema","registryItemCssVarsSchema","registryItemSchema","registrySchema","registryIndexSchema","stylesSchema","iconsSchema","registryBaseColorSchema","registryResolvedItemsTreeSchema"],"mappings":"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","sourcesContent":["import { z } from \"zod\"\n\n// Note: if you edit the schema here, you must also edit the schema in the\n// apps/www/public/schema/registry-item.json file.\n\nexport const registryItemTypeSchema = z.enum([\n \"registry:lib\",\n \"registry:block\",\n \"registry:component\",\n \"registry:ui\",\n \"registry:hook\",\n \"registry:page\",\n \"registry:file\",\n\n // Internal use only\n \"registry:theme\",\n \"registry:example\",\n \"registry:style\",\n \"registry:internal\",\n])\n\nexport const registryItemFileSchema = z.discriminatedUnion(\"type\", [\n // Target is required for registry:file and registry:page\n z.object({\n path: z.string(),\n content: z.string().optional(),\n type: z.enum([\"registry:file\", \"registry:page\"]),\n target: z.string(),\n }),\n z.object({\n path: z.string(),\n content: z.string().optional(),\n type: registryItemTypeSchema.exclude([\"registry:file\", \"registry:page\"]),\n target: z.string().optional(),\n }),\n])\n\nexport const registryItemTailwindSchema = z.object({\n config: z\n .object({\n content: z.array(z.string()).optional(),\n theme: z.record(z.string(), z.any()).optional(),\n plugins: z.array(z.string()).optional(),\n })\n .optional(),\n})\n\nexport const registryItemCssVarsSchema = z.object({\n light: z.record(z.string(), z.string()).optional(),\n dark: z.record(z.string(), z.string()).optional(),\n})\n\nexport const registryItemSchema = z.object({\n $schema: z.string().optional(),\n name: z.string(),\n type: registryItemTypeSchema,\n title: z.string().optional(),\n author: z.string().min(2).optional(),\n description: z.string().optional(),\n dependencies: z.array(z.string()).optional(),\n devDependencies: z.array(z.string()).optional(),\n registryDependencies: z.array(z.string()).optional(),\n files: z.array(registryItemFileSchema).optional(),\n tailwind: registryItemTailwindSchema.optional(),\n cssVars: registryItemCssVarsSchema.optional(),\n meta: z.record(z.string(), z.any()).optional(),\n docs: z.string().optional(),\n categories: z.array(z.string()).optional(),\n})\n\nexport type RegistryItem = z.infer<typeof registryItemSchema>\n\nexport const registrySchema = z.object({\n name: z.string(),\n homepage: z.string(),\n items: z.array(registryItemSchema),\n})\n\nexport type Registry = z.infer<typeof registrySchema>\n\nexport const registryIndexSchema = z.array(registryItemSchema)\n\nexport const stylesSchema = z.array(\n z.object({\n name: z.string(),\n label: z.string(),\n })\n)\n\nexport const iconsSchema = z.record(\n z.string(),\n z.record(z.string(), z.string())\n)\n\nexport const registryBaseColorSchema = z.object({\n inlineColors: z.object({\n light: z.record(z.string(), z.string()),\n dark: z.record(z.string(), z.string()),\n }),\n cssVars: z.object({\n light: z.record(z.string(), z.string()),\n dark: z.record(z.string(), z.string()),\n }),\n inlineColorsTemplate: z.string(),\n cssVarsTemplate: z.string(),\n})\n\nexport const registryResolvedItemsTreeSchema = registryItemSchema.pick({\n dependencies: true,\n devDependencies: true,\n files: true,\n tailwind: true,\n cssVars: true,\n docs: true,\n})\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,398 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { registryIndexSchema, registryItemSchema } from './registry/index.js';
|
|
4
|
+
|
|
5
|
+
declare const configSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
6
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
7
|
+
style: z.ZodString;
|
|
8
|
+
rsc: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
tsx: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
tailwind: z.ZodObject<{
|
|
11
|
+
config: z.ZodOptional<z.ZodString>;
|
|
12
|
+
css: z.ZodString;
|
|
13
|
+
baseColor: z.ZodString;
|
|
14
|
+
cssVariables: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
css: string;
|
|
18
|
+
baseColor: string;
|
|
19
|
+
cssVariables: boolean;
|
|
20
|
+
config?: string | undefined;
|
|
21
|
+
prefix?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
css: string;
|
|
24
|
+
baseColor: string;
|
|
25
|
+
config?: string | undefined;
|
|
26
|
+
cssVariables?: boolean | undefined;
|
|
27
|
+
prefix?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
aliases: z.ZodObject<{
|
|
30
|
+
components: z.ZodString;
|
|
31
|
+
utils: z.ZodString;
|
|
32
|
+
ui: z.ZodOptional<z.ZodString>;
|
|
33
|
+
lib: z.ZodOptional<z.ZodString>;
|
|
34
|
+
hooks: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
components: string;
|
|
37
|
+
utils: string;
|
|
38
|
+
ui?: string | undefined;
|
|
39
|
+
lib?: string | undefined;
|
|
40
|
+
hooks?: string | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
components: string;
|
|
43
|
+
utils: string;
|
|
44
|
+
ui?: string | undefined;
|
|
45
|
+
lib?: string | undefined;
|
|
46
|
+
hooks?: string | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
iconLibrary: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, {
|
|
50
|
+
resolvedPaths: z.ZodObject<{
|
|
51
|
+
cwd: z.ZodString;
|
|
52
|
+
tailwindConfig: z.ZodString;
|
|
53
|
+
tailwindCss: z.ZodString;
|
|
54
|
+
utils: z.ZodString;
|
|
55
|
+
components: z.ZodString;
|
|
56
|
+
lib: z.ZodString;
|
|
57
|
+
hooks: z.ZodString;
|
|
58
|
+
ui: z.ZodString;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
components: string;
|
|
61
|
+
ui: string;
|
|
62
|
+
utils: string;
|
|
63
|
+
lib: string;
|
|
64
|
+
hooks: string;
|
|
65
|
+
cwd: string;
|
|
66
|
+
tailwindConfig: string;
|
|
67
|
+
tailwindCss: string;
|
|
68
|
+
}, {
|
|
69
|
+
components: string;
|
|
70
|
+
ui: string;
|
|
71
|
+
utils: string;
|
|
72
|
+
lib: string;
|
|
73
|
+
hooks: string;
|
|
74
|
+
cwd: string;
|
|
75
|
+
tailwindConfig: string;
|
|
76
|
+
tailwindCss: string;
|
|
77
|
+
}>;
|
|
78
|
+
}>, "strict", z.ZodTypeAny, {
|
|
79
|
+
tailwind: {
|
|
80
|
+
css: string;
|
|
81
|
+
baseColor: string;
|
|
82
|
+
cssVariables: boolean;
|
|
83
|
+
config?: string | undefined;
|
|
84
|
+
prefix?: string | undefined;
|
|
85
|
+
};
|
|
86
|
+
style: string;
|
|
87
|
+
rsc: boolean;
|
|
88
|
+
tsx: boolean;
|
|
89
|
+
aliases: {
|
|
90
|
+
components: string;
|
|
91
|
+
utils: string;
|
|
92
|
+
ui?: string | undefined;
|
|
93
|
+
lib?: string | undefined;
|
|
94
|
+
hooks?: string | undefined;
|
|
95
|
+
};
|
|
96
|
+
resolvedPaths: {
|
|
97
|
+
components: string;
|
|
98
|
+
ui: string;
|
|
99
|
+
utils: string;
|
|
100
|
+
lib: string;
|
|
101
|
+
hooks: string;
|
|
102
|
+
cwd: string;
|
|
103
|
+
tailwindConfig: string;
|
|
104
|
+
tailwindCss: string;
|
|
105
|
+
};
|
|
106
|
+
$schema?: string | undefined;
|
|
107
|
+
iconLibrary?: string | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
tailwind: {
|
|
110
|
+
css: string;
|
|
111
|
+
baseColor: string;
|
|
112
|
+
config?: string | undefined;
|
|
113
|
+
cssVariables?: boolean | undefined;
|
|
114
|
+
prefix?: string | undefined;
|
|
115
|
+
};
|
|
116
|
+
style: string;
|
|
117
|
+
aliases: {
|
|
118
|
+
components: string;
|
|
119
|
+
utils: string;
|
|
120
|
+
ui?: string | undefined;
|
|
121
|
+
lib?: string | undefined;
|
|
122
|
+
hooks?: string | undefined;
|
|
123
|
+
};
|
|
124
|
+
resolvedPaths: {
|
|
125
|
+
components: string;
|
|
126
|
+
ui: string;
|
|
127
|
+
utils: string;
|
|
128
|
+
lib: string;
|
|
129
|
+
hooks: string;
|
|
130
|
+
cwd: string;
|
|
131
|
+
tailwindConfig: string;
|
|
132
|
+
tailwindCss: string;
|
|
133
|
+
};
|
|
134
|
+
$schema?: string | undefined;
|
|
135
|
+
rsc?: boolean | undefined;
|
|
136
|
+
tsx?: boolean | undefined;
|
|
137
|
+
iconLibrary?: string | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
type Config = z.infer<typeof configSchema>;
|
|
140
|
+
|
|
141
|
+
declare function getRegistryIndex(): Promise<{
|
|
142
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
143
|
+
name: string;
|
|
144
|
+
tailwind?: {
|
|
145
|
+
config?: {
|
|
146
|
+
content?: string[] | undefined;
|
|
147
|
+
theme?: Record<string, any> | undefined;
|
|
148
|
+
plugins?: string[] | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
$schema?: string | undefined;
|
|
152
|
+
dependencies?: string[] | undefined;
|
|
153
|
+
devDependencies?: string[] | undefined;
|
|
154
|
+
files?: ({
|
|
155
|
+
path: string;
|
|
156
|
+
type: "registry:page" | "registry:file";
|
|
157
|
+
target: string;
|
|
158
|
+
content?: string | undefined;
|
|
159
|
+
} | {
|
|
160
|
+
path: string;
|
|
161
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
162
|
+
content?: string | undefined;
|
|
163
|
+
target?: string | undefined;
|
|
164
|
+
})[] | undefined;
|
|
165
|
+
title?: string | undefined;
|
|
166
|
+
author?: string | undefined;
|
|
167
|
+
description?: string | undefined;
|
|
168
|
+
registryDependencies?: string[] | undefined;
|
|
169
|
+
cssVars?: {
|
|
170
|
+
light?: Record<string, string> | undefined;
|
|
171
|
+
dark?: Record<string, string> | undefined;
|
|
172
|
+
} | undefined;
|
|
173
|
+
meta?: Record<string, any> | undefined;
|
|
174
|
+
docs?: string | undefined;
|
|
175
|
+
categories?: string[] | undefined;
|
|
176
|
+
}[] | undefined>;
|
|
177
|
+
declare function getRegistryStyles(): Promise<{
|
|
178
|
+
name: string;
|
|
179
|
+
label: string;
|
|
180
|
+
}[]>;
|
|
181
|
+
declare function getRegistryIcons(): Promise<Record<string, Record<string, string>>>;
|
|
182
|
+
declare function getRegistryItem(name: string, style: string): Promise<{
|
|
183
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
184
|
+
name: string;
|
|
185
|
+
tailwind?: {
|
|
186
|
+
config?: {
|
|
187
|
+
content?: string[] | undefined;
|
|
188
|
+
theme?: Record<string, any> | undefined;
|
|
189
|
+
plugins?: string[] | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
$schema?: string | undefined;
|
|
193
|
+
dependencies?: string[] | undefined;
|
|
194
|
+
devDependencies?: string[] | undefined;
|
|
195
|
+
files?: ({
|
|
196
|
+
path: string;
|
|
197
|
+
type: "registry:page" | "registry:file";
|
|
198
|
+
target: string;
|
|
199
|
+
content?: string | undefined;
|
|
200
|
+
} | {
|
|
201
|
+
path: string;
|
|
202
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
203
|
+
content?: string | undefined;
|
|
204
|
+
target?: string | undefined;
|
|
205
|
+
})[] | undefined;
|
|
206
|
+
title?: string | undefined;
|
|
207
|
+
author?: string | undefined;
|
|
208
|
+
description?: string | undefined;
|
|
209
|
+
registryDependencies?: string[] | undefined;
|
|
210
|
+
cssVars?: {
|
|
211
|
+
light?: Record<string, string> | undefined;
|
|
212
|
+
dark?: Record<string, string> | undefined;
|
|
213
|
+
} | undefined;
|
|
214
|
+
meta?: Record<string, any> | undefined;
|
|
215
|
+
docs?: string | undefined;
|
|
216
|
+
categories?: string[] | undefined;
|
|
217
|
+
} | null>;
|
|
218
|
+
declare function getRegistryBaseColors(): Promise<{
|
|
219
|
+
name: string;
|
|
220
|
+
label: string;
|
|
221
|
+
}[]>;
|
|
222
|
+
declare function getRegistryBaseColor(baseColor: string): Promise<{
|
|
223
|
+
cssVars: {
|
|
224
|
+
light: Record<string, string>;
|
|
225
|
+
dark: Record<string, string>;
|
|
226
|
+
};
|
|
227
|
+
inlineColors: {
|
|
228
|
+
light: Record<string, string>;
|
|
229
|
+
dark: Record<string, string>;
|
|
230
|
+
};
|
|
231
|
+
inlineColorsTemplate: string;
|
|
232
|
+
cssVarsTemplate: string;
|
|
233
|
+
} | undefined>;
|
|
234
|
+
declare function resolveTree(index: z.infer<typeof registryIndexSchema>, names: string[]): Promise<{
|
|
235
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
236
|
+
name: string;
|
|
237
|
+
tailwind?: {
|
|
238
|
+
config?: {
|
|
239
|
+
content?: string[] | undefined;
|
|
240
|
+
theme?: Record<string, any> | undefined;
|
|
241
|
+
plugins?: string[] | undefined;
|
|
242
|
+
} | undefined;
|
|
243
|
+
} | undefined;
|
|
244
|
+
$schema?: string | undefined;
|
|
245
|
+
dependencies?: string[] | undefined;
|
|
246
|
+
devDependencies?: string[] | undefined;
|
|
247
|
+
files?: ({
|
|
248
|
+
path: string;
|
|
249
|
+
type: "registry:page" | "registry:file";
|
|
250
|
+
target: string;
|
|
251
|
+
content?: string | undefined;
|
|
252
|
+
} | {
|
|
253
|
+
path: string;
|
|
254
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
255
|
+
content?: string | undefined;
|
|
256
|
+
target?: string | undefined;
|
|
257
|
+
})[] | undefined;
|
|
258
|
+
title?: string | undefined;
|
|
259
|
+
author?: string | undefined;
|
|
260
|
+
description?: string | undefined;
|
|
261
|
+
registryDependencies?: string[] | undefined;
|
|
262
|
+
cssVars?: {
|
|
263
|
+
light?: Record<string, string> | undefined;
|
|
264
|
+
dark?: Record<string, string> | undefined;
|
|
265
|
+
} | undefined;
|
|
266
|
+
meta?: Record<string, any> | undefined;
|
|
267
|
+
docs?: string | undefined;
|
|
268
|
+
categories?: string[] | undefined;
|
|
269
|
+
}[]>;
|
|
270
|
+
declare function fetchTree(style: string, tree: z.infer<typeof registryIndexSchema>): Promise<{
|
|
271
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
272
|
+
name: string;
|
|
273
|
+
tailwind?: {
|
|
274
|
+
config?: {
|
|
275
|
+
content?: string[] | undefined;
|
|
276
|
+
theme?: Record<string, any> | undefined;
|
|
277
|
+
plugins?: string[] | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
$schema?: string | undefined;
|
|
281
|
+
dependencies?: string[] | undefined;
|
|
282
|
+
devDependencies?: string[] | undefined;
|
|
283
|
+
files?: ({
|
|
284
|
+
path: string;
|
|
285
|
+
type: "registry:page" | "registry:file";
|
|
286
|
+
target: string;
|
|
287
|
+
content?: string | undefined;
|
|
288
|
+
} | {
|
|
289
|
+
path: string;
|
|
290
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
291
|
+
content?: string | undefined;
|
|
292
|
+
target?: string | undefined;
|
|
293
|
+
})[] | undefined;
|
|
294
|
+
title?: string | undefined;
|
|
295
|
+
author?: string | undefined;
|
|
296
|
+
description?: string | undefined;
|
|
297
|
+
registryDependencies?: string[] | undefined;
|
|
298
|
+
cssVars?: {
|
|
299
|
+
light?: Record<string, string> | undefined;
|
|
300
|
+
dark?: Record<string, string> | undefined;
|
|
301
|
+
} | undefined;
|
|
302
|
+
meta?: Record<string, any> | undefined;
|
|
303
|
+
docs?: string | undefined;
|
|
304
|
+
categories?: string[] | undefined;
|
|
305
|
+
}[] | undefined>;
|
|
306
|
+
declare function getItemTargetPath(config: Config, item: Pick<z.infer<typeof registryItemSchema>, "type">, override?: string): Promise<string | null>;
|
|
307
|
+
declare function fetchRegistry(paths: string[]): Promise<unknown[]>;
|
|
308
|
+
declare function registryResolveItemsTree(names: z.infer<typeof registryItemSchema>["name"][], config: Config): Promise<{
|
|
309
|
+
tailwind?: {
|
|
310
|
+
config?: {
|
|
311
|
+
content?: string[] | undefined;
|
|
312
|
+
theme?: Record<string, any> | undefined;
|
|
313
|
+
plugins?: string[] | undefined;
|
|
314
|
+
} | undefined;
|
|
315
|
+
} | undefined;
|
|
316
|
+
dependencies?: string[] | undefined;
|
|
317
|
+
devDependencies?: string[] | undefined;
|
|
318
|
+
files?: ({
|
|
319
|
+
path: string;
|
|
320
|
+
type: "registry:page" | "registry:file";
|
|
321
|
+
target: string;
|
|
322
|
+
content?: string | undefined;
|
|
323
|
+
} | {
|
|
324
|
+
path: string;
|
|
325
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
326
|
+
content?: string | undefined;
|
|
327
|
+
target?: string | undefined;
|
|
328
|
+
})[] | undefined;
|
|
329
|
+
cssVars?: {
|
|
330
|
+
light?: Record<string, string> | undefined;
|
|
331
|
+
dark?: Record<string, string> | undefined;
|
|
332
|
+
} | undefined;
|
|
333
|
+
docs?: string | undefined;
|
|
334
|
+
} | null>;
|
|
335
|
+
declare function registryGetTheme(name: string, config: Config): Promise<{
|
|
336
|
+
name: string;
|
|
337
|
+
type: "registry:theme";
|
|
338
|
+
tailwind: {
|
|
339
|
+
config: {
|
|
340
|
+
theme: {
|
|
341
|
+
extend: {
|
|
342
|
+
borderRadius: {
|
|
343
|
+
lg: string;
|
|
344
|
+
md: string;
|
|
345
|
+
sm: string;
|
|
346
|
+
};
|
|
347
|
+
colors: {};
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
cssVars: {
|
|
353
|
+
light: {
|
|
354
|
+
radius: string;
|
|
355
|
+
};
|
|
356
|
+
dark: {};
|
|
357
|
+
};
|
|
358
|
+
} | null>;
|
|
359
|
+
declare function resolveRegistryItems(names: string[], config: Config): Promise<string[]>;
|
|
360
|
+
declare function getRegistryTypeAliasMap(): Map<string, string>;
|
|
361
|
+
declare function getRegistryParentMap(registryItems: z.infer<typeof registryItemSchema>[]): Map<string, {
|
|
362
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:page" | "registry:file" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
363
|
+
name: string;
|
|
364
|
+
tailwind?: {
|
|
365
|
+
config?: {
|
|
366
|
+
content?: string[] | undefined;
|
|
367
|
+
theme?: Record<string, any> | undefined;
|
|
368
|
+
plugins?: string[] | undefined;
|
|
369
|
+
} | undefined;
|
|
370
|
+
} | undefined;
|
|
371
|
+
$schema?: string | undefined;
|
|
372
|
+
dependencies?: string[] | undefined;
|
|
373
|
+
devDependencies?: string[] | undefined;
|
|
374
|
+
files?: ({
|
|
375
|
+
path: string;
|
|
376
|
+
type: "registry:page" | "registry:file";
|
|
377
|
+
target: string;
|
|
378
|
+
content?: string | undefined;
|
|
379
|
+
} | {
|
|
380
|
+
path: string;
|
|
381
|
+
type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:theme" | "registry:example" | "registry:style" | "registry:internal";
|
|
382
|
+
content?: string | undefined;
|
|
383
|
+
target?: string | undefined;
|
|
384
|
+
})[] | undefined;
|
|
385
|
+
title?: string | undefined;
|
|
386
|
+
author?: string | undefined;
|
|
387
|
+
description?: string | undefined;
|
|
388
|
+
registryDependencies?: string[] | undefined;
|
|
389
|
+
cssVars?: {
|
|
390
|
+
light?: Record<string, string> | undefined;
|
|
391
|
+
dark?: Record<string, string> | undefined;
|
|
392
|
+
} | undefined;
|
|
393
|
+
meta?: Record<string, any> | undefined;
|
|
394
|
+
docs?: string | undefined;
|
|
395
|
+
categories?: string[] | undefined;
|
|
396
|
+
}>;
|
|
397
|
+
|
|
398
|
+
export { fetchRegistry, fetchTree, getItemTargetPath, getRegistryBaseColor, getRegistryBaseColors, getRegistryIcons, getRegistryIndex, getRegistryItem, getRegistryParentMap, getRegistryStyles, getRegistryTypeAliasMap, registryGetTheme, registryResolveItemsTree, resolveRegistryItems, resolveTree };
|