@frontic/ui 0.3.0 → 0.5.0
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/api-DmrBFC4C.d.ts +313 -0
- package/dist/api-DmrBFC4C.d.ts.map +1 -0
- package/dist/index-Cd5RBhtD.d.ts +1480 -0
- package/dist/index-Cd5RBhtD.d.ts.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +2411 -555
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +46 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +5 -0
- package/dist/mcp-CxUIP4Qu.js +304 -0
- package/dist/mcp-CxUIP4Qu.js.map +1 -0
- package/dist/registry/index.d.ts +113 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry-CgE-Q6HO.js +2638 -0
- package/dist/registry-CgE-Q6HO.js.map +1 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +3 -0
- package/dist/schema-DgHN-d0T.js +155 -0
- package/dist/schema-DgHN-d0T.js.map +1 -0
- package/package.json +68 -14
- package/dist/bin/frontic-ui.js +0 -590
- package/dist/bin/frontic-ui.js.map +0 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { h as registryItemSchema, r as configSchema, u as registryIndexSchema } from "./index-Cd5RBhtD.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/get-config.d.ts
|
|
5
|
+
|
|
6
|
+
type Config = z.infer<typeof configSchema>;
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/registry/api.d.ts
|
|
9
|
+
declare function getRegistry(name: string, options?: {
|
|
10
|
+
config?: Partial<Config>;
|
|
11
|
+
useCache?: boolean;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
name?: string;
|
|
14
|
+
items?: {
|
|
15
|
+
name?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
18
|
+
description?: string;
|
|
19
|
+
$schema?: string;
|
|
20
|
+
extends?: string;
|
|
21
|
+
author?: string;
|
|
22
|
+
dependencies?: string[];
|
|
23
|
+
devDependencies?: string[];
|
|
24
|
+
registryDependencies?: string[];
|
|
25
|
+
files?: ({
|
|
26
|
+
path?: string;
|
|
27
|
+
type?: "registry:page" | "registry:file";
|
|
28
|
+
content?: string;
|
|
29
|
+
target?: string;
|
|
30
|
+
} | {
|
|
31
|
+
path?: string;
|
|
32
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
33
|
+
content?: string;
|
|
34
|
+
target?: string;
|
|
35
|
+
})[];
|
|
36
|
+
tailwind?: {
|
|
37
|
+
config?: {
|
|
38
|
+
content?: string[];
|
|
39
|
+
theme?: Record<string, any>;
|
|
40
|
+
plugins?: string[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
cssVars?: {
|
|
44
|
+
theme?: Record<string, string>;
|
|
45
|
+
light?: Record<string, string>;
|
|
46
|
+
dark?: Record<string, string>;
|
|
47
|
+
};
|
|
48
|
+
css?: Record<string, string | Record<string, string | Record<string, string>>>;
|
|
49
|
+
envVars?: Record<string, string>;
|
|
50
|
+
meta?: Record<string, any>;
|
|
51
|
+
docs?: string;
|
|
52
|
+
categories?: string[];
|
|
53
|
+
}[];
|
|
54
|
+
homepage?: string;
|
|
55
|
+
}>;
|
|
56
|
+
declare function getRegistryItems(items: string[], options?: {
|
|
57
|
+
config?: Partial<Config>;
|
|
58
|
+
useCache?: boolean;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
name?: string;
|
|
61
|
+
title?: string;
|
|
62
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
63
|
+
description?: string;
|
|
64
|
+
$schema?: string;
|
|
65
|
+
extends?: string;
|
|
66
|
+
author?: string;
|
|
67
|
+
dependencies?: string[];
|
|
68
|
+
devDependencies?: string[];
|
|
69
|
+
registryDependencies?: string[];
|
|
70
|
+
files?: ({
|
|
71
|
+
path?: string;
|
|
72
|
+
type?: "registry:page" | "registry:file";
|
|
73
|
+
content?: string;
|
|
74
|
+
target?: string;
|
|
75
|
+
} | {
|
|
76
|
+
path?: string;
|
|
77
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
78
|
+
content?: string;
|
|
79
|
+
target?: string;
|
|
80
|
+
})[];
|
|
81
|
+
tailwind?: {
|
|
82
|
+
config?: {
|
|
83
|
+
content?: string[];
|
|
84
|
+
theme?: Record<string, any>;
|
|
85
|
+
plugins?: string[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
cssVars?: {
|
|
89
|
+
theme?: Record<string, string>;
|
|
90
|
+
light?: Record<string, string>;
|
|
91
|
+
dark?: Record<string, string>;
|
|
92
|
+
};
|
|
93
|
+
css?: Record<string, string | Record<string, string | Record<string, string>>>;
|
|
94
|
+
envVars?: Record<string, string>;
|
|
95
|
+
meta?: Record<string, any>;
|
|
96
|
+
docs?: string;
|
|
97
|
+
categories?: string[];
|
|
98
|
+
}[]>;
|
|
99
|
+
declare function resolveRegistryItems(items: string[], options?: {
|
|
100
|
+
config?: Partial<Config>;
|
|
101
|
+
useCache?: boolean;
|
|
102
|
+
}): Promise<{
|
|
103
|
+
dependencies?: string[];
|
|
104
|
+
devDependencies?: string[];
|
|
105
|
+
files?: ({
|
|
106
|
+
path?: string;
|
|
107
|
+
type?: "registry:page" | "registry:file";
|
|
108
|
+
content?: string;
|
|
109
|
+
target?: string;
|
|
110
|
+
} | {
|
|
111
|
+
path?: string;
|
|
112
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
113
|
+
content?: string;
|
|
114
|
+
target?: string;
|
|
115
|
+
})[];
|
|
116
|
+
tailwind?: {
|
|
117
|
+
config?: {
|
|
118
|
+
content?: string[];
|
|
119
|
+
theme?: Record<string, any>;
|
|
120
|
+
plugins?: string[];
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
cssVars?: {
|
|
124
|
+
theme?: Record<string, string>;
|
|
125
|
+
light?: Record<string, string>;
|
|
126
|
+
dark?: Record<string, string>;
|
|
127
|
+
};
|
|
128
|
+
css?: Record<string, string | Record<string, string | Record<string, string>>>;
|
|
129
|
+
envVars?: Record<string, string>;
|
|
130
|
+
docs?: string;
|
|
131
|
+
}>;
|
|
132
|
+
declare function getRegistriesConfig(cwd: string): Promise<{
|
|
133
|
+
registries: Record<string, string | {
|
|
134
|
+
params?: Record<string, string>;
|
|
135
|
+
url?: string;
|
|
136
|
+
headers?: Record<string, string>;
|
|
137
|
+
}>;
|
|
138
|
+
}>;
|
|
139
|
+
declare function getShadcnRegistryIndex(): Promise<{
|
|
140
|
+
name?: string;
|
|
141
|
+
title?: string;
|
|
142
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
143
|
+
description?: string;
|
|
144
|
+
$schema?: string;
|
|
145
|
+
extends?: string;
|
|
146
|
+
author?: string;
|
|
147
|
+
dependencies?: string[];
|
|
148
|
+
devDependencies?: string[];
|
|
149
|
+
registryDependencies?: string[];
|
|
150
|
+
files?: ({
|
|
151
|
+
path?: string;
|
|
152
|
+
type?: "registry:page" | "registry:file";
|
|
153
|
+
content?: string;
|
|
154
|
+
target?: string;
|
|
155
|
+
} | {
|
|
156
|
+
path?: string;
|
|
157
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
158
|
+
content?: string;
|
|
159
|
+
target?: string;
|
|
160
|
+
})[];
|
|
161
|
+
tailwind?: {
|
|
162
|
+
config?: {
|
|
163
|
+
content?: string[];
|
|
164
|
+
theme?: Record<string, any>;
|
|
165
|
+
plugins?: string[];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
cssVars?: {
|
|
169
|
+
theme?: Record<string, string>;
|
|
170
|
+
light?: Record<string, string>;
|
|
171
|
+
dark?: Record<string, string>;
|
|
172
|
+
};
|
|
173
|
+
css?: Record<string, string | Record<string, string | Record<string, string>>>;
|
|
174
|
+
envVars?: Record<string, string>;
|
|
175
|
+
meta?: Record<string, any>;
|
|
176
|
+
docs?: string;
|
|
177
|
+
categories?: string[];
|
|
178
|
+
}[]>;
|
|
179
|
+
declare function getRegistryStyles(): Promise<{
|
|
180
|
+
name?: string;
|
|
181
|
+
label?: string;
|
|
182
|
+
}[]>;
|
|
183
|
+
declare function getRegistryIcons(): Promise<Record<string, Record<string, string>>>;
|
|
184
|
+
declare function getRegistryBaseColors(): Promise<readonly [{
|
|
185
|
+
readonly name: "neutral";
|
|
186
|
+
readonly label: "Neutral";
|
|
187
|
+
}, {
|
|
188
|
+
readonly name: "gray";
|
|
189
|
+
readonly label: "Gray";
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "zinc";
|
|
192
|
+
readonly label: "Zinc";
|
|
193
|
+
}, {
|
|
194
|
+
readonly name: "stone";
|
|
195
|
+
readonly label: "Stone";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "slate";
|
|
198
|
+
readonly label: "Slate";
|
|
199
|
+
}]>;
|
|
200
|
+
declare function getRegistryBaseColor(baseColor: string): Promise<{
|
|
201
|
+
cssVars?: {
|
|
202
|
+
theme?: Record<string, string>;
|
|
203
|
+
light?: Record<string, string>;
|
|
204
|
+
dark?: Record<string, string>;
|
|
205
|
+
};
|
|
206
|
+
inlineColors?: {
|
|
207
|
+
light?: Record<string, string>;
|
|
208
|
+
dark?: Record<string, string>;
|
|
209
|
+
};
|
|
210
|
+
cssVarsV4?: {
|
|
211
|
+
theme?: Record<string, string>;
|
|
212
|
+
light?: Record<string, string>;
|
|
213
|
+
dark?: Record<string, string>;
|
|
214
|
+
};
|
|
215
|
+
inlineColorsTemplate?: string;
|
|
216
|
+
cssVarsTemplate?: string;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
220
|
+
*/
|
|
221
|
+
declare function resolveTree(index: z.infer<typeof registryIndexSchema>, names: string[]): Promise<{
|
|
222
|
+
name?: string;
|
|
223
|
+
title?: string;
|
|
224
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
225
|
+
description?: string;
|
|
226
|
+
$schema?: string;
|
|
227
|
+
extends?: string;
|
|
228
|
+
author?: string;
|
|
229
|
+
dependencies?: string[];
|
|
230
|
+
devDependencies?: string[];
|
|
231
|
+
registryDependencies?: string[];
|
|
232
|
+
files?: ({
|
|
233
|
+
path?: string;
|
|
234
|
+
type?: "registry:page" | "registry:file";
|
|
235
|
+
content?: string;
|
|
236
|
+
target?: string;
|
|
237
|
+
} | {
|
|
238
|
+
path?: string;
|
|
239
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
240
|
+
content?: string;
|
|
241
|
+
target?: string;
|
|
242
|
+
})[];
|
|
243
|
+
tailwind?: {
|
|
244
|
+
config?: {
|
|
245
|
+
content?: string[];
|
|
246
|
+
theme?: Record<string, any>;
|
|
247
|
+
plugins?: string[];
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
cssVars?: {
|
|
251
|
+
theme?: Record<string, string>;
|
|
252
|
+
light?: Record<string, string>;
|
|
253
|
+
dark?: Record<string, string>;
|
|
254
|
+
};
|
|
255
|
+
css?: Record<string, string | Record<string, string | Record<string, string>>>;
|
|
256
|
+
envVars?: Record<string, string>;
|
|
257
|
+
meta?: Record<string, any>;
|
|
258
|
+
docs?: string;
|
|
259
|
+
categories?: string[];
|
|
260
|
+
}[]>;
|
|
261
|
+
/**
|
|
262
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
263
|
+
*/
|
|
264
|
+
declare function fetchTree(style: string, tree: z.infer<typeof registryIndexSchema>): Promise<{
|
|
265
|
+
name?: string;
|
|
266
|
+
title?: string;
|
|
267
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
268
|
+
description?: string;
|
|
269
|
+
$schema?: string;
|
|
270
|
+
extends?: string;
|
|
271
|
+
author?: string;
|
|
272
|
+
dependencies?: string[];
|
|
273
|
+
devDependencies?: string[];
|
|
274
|
+
registryDependencies?: string[];
|
|
275
|
+
files?: ({
|
|
276
|
+
path?: string;
|
|
277
|
+
type?: "registry:page" | "registry:file";
|
|
278
|
+
content?: string;
|
|
279
|
+
target?: string;
|
|
280
|
+
} | {
|
|
281
|
+
path?: string;
|
|
282
|
+
type?: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
|
|
283
|
+
content?: string;
|
|
284
|
+
target?: string;
|
|
285
|
+
})[];
|
|
286
|
+
tailwind?: {
|
|
287
|
+
config?: {
|
|
288
|
+
content?: string[];
|
|
289
|
+
theme?: Record<string, any>;
|
|
290
|
+
plugins?: string[];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
cssVars?: {
|
|
294
|
+
theme?: Record<string, string>;
|
|
295
|
+
light?: Record<string, string>;
|
|
296
|
+
dark?: Record<string, string>;
|
|
297
|
+
};
|
|
298
|
+
css?: Record<string, string | Record<string, string | Record<string, string>>>;
|
|
299
|
+
envVars?: Record<string, string>;
|
|
300
|
+
meta?: Record<string, any>;
|
|
301
|
+
docs?: string;
|
|
302
|
+
categories?: string[];
|
|
303
|
+
}[]>;
|
|
304
|
+
/**
|
|
305
|
+
* @deprecated This function is deprecated and will be removed in a future version.
|
|
306
|
+
*/
|
|
307
|
+
declare function getItemTargetPath(config: Config, item: Pick<z.infer<typeof registryItemSchema>, "type">, override?: string): Promise<string>;
|
|
308
|
+
declare function getRegistriesIndex(options?: {
|
|
309
|
+
useCache?: boolean;
|
|
310
|
+
}): Promise<Record<string, string>>;
|
|
311
|
+
//#endregion
|
|
312
|
+
export { getRegistry as a, getRegistryIcons as c, getShadcnRegistryIndex as d, resolveRegistryItems as f, getRegistriesIndex as i, getRegistryItems as l, Config as m, getItemTargetPath as n, getRegistryBaseColor as o, resolveTree as p, getRegistriesConfig as r, getRegistryBaseColors as s, fetchTree as t, getRegistryStyles as u };
|
|
313
|
+
//# sourceMappingURL=api-DmrBFC4C.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-DmrBFC4C.d.ts","names":[],"sources":["../src/utils/get-config.ts","../src/registry/api.ts"],"sourcesContent":[],"mappings":";;;;;AC4CqB,KDrBT,MAAA,GAAS,CAAA,CAAE,KCqBF,CAAA,ODrBe,YCqBf,CAAA;;;iBAHC,WAAA;EDlBV,MAAA,CAAA,ECqBC,ODrBK,CCqBG,MDrBe,CAAA;;ICuBjC;;EALmB,KAAA,CAAA,EAAA;IAGD,IAAA,CAAA,EAAA,MAAA;IAAR,KAAA,CAAA,EAAA,MAAA;;;;;;;;;;MAEV,IAAA,CAAA,EA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