@pixerate/schemas 1.4.0 → 1.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/index.cjs +222 -9
- package/dist/index.d.cts +2227 -60
- package/dist/index.d.ts +2227 -60
- package/dist/index.js +202 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -177,20 +177,193 @@ var CodeGenerationSchema = z.object({
|
|
|
177
177
|
prompt: z.string(),
|
|
178
178
|
language: z.string()
|
|
179
179
|
});
|
|
180
|
-
var
|
|
180
|
+
var PlatformLanguageSchema = z.enum(["svelte", "react", "webcomponent"]);
|
|
181
|
+
var ThemeSupportSchema = z.enum(["default", "light-and-dark"]);
|
|
182
|
+
var ComponentPropDocSchema = z.object({
|
|
181
183
|
name: z.string(),
|
|
182
184
|
type: z.string(),
|
|
183
185
|
default: z.string().optional(),
|
|
184
|
-
description: z.string()
|
|
186
|
+
description: z.string()
|
|
187
|
+
});
|
|
188
|
+
var ComponentPropDefinitionSchema = ComponentPropDocSchema;
|
|
189
|
+
var ComponentDocsSchema = z.object({
|
|
190
|
+
usage: z.string().describe("Usage instructions and import examples"),
|
|
191
|
+
props: z.array(ComponentPropDocSchema).describe("List of prop definitions and types"),
|
|
192
|
+
notes: z.string().optional().describe("Additional usage or architectural notes")
|
|
193
|
+
});
|
|
194
|
+
var PreviewHarnessSchema = z.object({
|
|
195
|
+
driverCode: z.string().describe(
|
|
196
|
+
"Complete, runnable preview driver code harness demonstrating usage of the component with snippets/children or mock props"
|
|
197
|
+
),
|
|
198
|
+
mockProps: z.record(z.any()).describe("JSON map of realistic mock prop values passed to the component"),
|
|
199
|
+
wrapperClass: z.string().optional().describe("Tailwind CSS class string for wrapping the preview container")
|
|
200
|
+
});
|
|
201
|
+
var GenerateHarnessOptionsSchema = z.object({
|
|
202
|
+
code: z.string(),
|
|
203
|
+
language: PlatformLanguageSchema,
|
|
204
|
+
componentName: z.string(),
|
|
205
|
+
docsProps: z.array(ComponentPropDocSchema).optional()
|
|
185
206
|
});
|
|
186
207
|
var ComponentSynthesisSchema = z.object({
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
208
|
+
title: z.string().describe("Title of the synthesized component"),
|
|
209
|
+
description: z.string().describe("Detailed description of the component"),
|
|
210
|
+
tags: z.array(z.string()).describe("Keywords and categorization tags"),
|
|
211
|
+
platforms: z.object({
|
|
212
|
+
svelte: z.string().describe("Self-contained Svelte 5 component with runes ($props, $state, onclick, snippets, etc.)"),
|
|
213
|
+
react: z.string().describe("Self-contained React 19 TSX component with all subcomponents defined and exported"),
|
|
214
|
+
webcomponent: z.string().describe("Self-contained WebComponent custom element extending HTMLElement")
|
|
215
|
+
}),
|
|
216
|
+
harnesses: z.object({
|
|
217
|
+
svelte: PreviewHarnessSchema,
|
|
218
|
+
react: PreviewHarnessSchema,
|
|
219
|
+
webcomponent: PreviewHarnessSchema
|
|
220
|
+
}).optional(),
|
|
221
|
+
docs: ComponentDocsSchema
|
|
222
|
+
});
|
|
223
|
+
var ComponentTransformationResultSchema = z.object({
|
|
224
|
+
title: z.string(),
|
|
225
|
+
description: z.string(),
|
|
226
|
+
tags: z.array(z.string()),
|
|
227
|
+
platforms: z.record(PlatformLanguageSchema, z.string()),
|
|
228
|
+
harnesses: z.record(PlatformLanguageSchema, PreviewHarnessSchema),
|
|
229
|
+
docs: ComponentDocsSchema,
|
|
230
|
+
detectedLanguage: PlatformLanguageSchema,
|
|
231
|
+
themeSupport: ThemeSupportSchema
|
|
232
|
+
});
|
|
233
|
+
var ComponentPackageSchema = z.object({
|
|
234
|
+
language: PlatformLanguageSchema,
|
|
235
|
+
code: z.string().describe("Formatted code bundle with trimmed leading whitespace"),
|
|
236
|
+
docs: ComponentDocsSchema,
|
|
237
|
+
screenshot: z.string().describe("Data URI or URL of actual rendered component"),
|
|
238
|
+
themeSupport: ThemeSupportSchema,
|
|
239
|
+
tags: z.array(z.string()),
|
|
240
|
+
previewHarness: PreviewHarnessSchema.optional()
|
|
241
|
+
});
|
|
242
|
+
var UIComponentTypeSchema = z.object({
|
|
243
|
+
id: z.string().describe("Slug, e.g., 'button'"),
|
|
244
|
+
name: z.string().describe("e.g. 'Button'"),
|
|
245
|
+
description: z.string().describe("Official description e.g. from Shadcn documentation"),
|
|
246
|
+
tags: z.array(z.string()).describe("Freeform tags e.g. ['form', 'action']"),
|
|
247
|
+
createdAt: z.string().describe("ISO timestamp"),
|
|
248
|
+
updatedAt: z.string().describe("ISO timestamp")
|
|
249
|
+
});
|
|
250
|
+
var ComponentVariantSchema = z.object({
|
|
251
|
+
id: z.string().describe("Slug, e.g., 'glass-card' or 'glassmorphism'"),
|
|
252
|
+
componentTypeId: z.string().describe("References UIComponentType.id"),
|
|
253
|
+
name: z.string().describe("e.g. 'Glass Action Button'"),
|
|
254
|
+
aestheticId: z.string().describe("Style aesthetic, e.g. 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn'"),
|
|
255
|
+
recommendedThemeId: z.string().optional().describe("Optional recommended theme ID (e.g., 'shadcn-zinc', 'tokyo-night')"),
|
|
256
|
+
description: z.string().optional().describe("Style & business logic description"),
|
|
257
|
+
imageUrl: z.string().optional().describe("Optional image URL"),
|
|
258
|
+
image: z.string().optional(),
|
|
259
|
+
screenshot: z.string().optional(),
|
|
260
|
+
createdAt: z.string().describe("ISO timestamp"),
|
|
261
|
+
updatedAt: z.string().describe("ISO timestamp")
|
|
262
|
+
});
|
|
263
|
+
var AestheticSchema = ComponentVariantSchema;
|
|
264
|
+
var ComponentVersionSchema = z.object({
|
|
265
|
+
id: z.string().describe("Unique version ID e.g. 'button-glass-action-button-v1.0.0'"),
|
|
266
|
+
componentTypeId: z.string().describe("References UIComponentType.id"),
|
|
267
|
+
variantId: z.string().describe("References ComponentVariant.id"),
|
|
268
|
+
aestheticId: z.string().describe("References Aesthetic style e.g. 'glassmorphism'"),
|
|
269
|
+
version: z.string().describe("Semver e.g. '1.0.0'"),
|
|
270
|
+
changelogNote: z.string(),
|
|
271
|
+
createdBy: z.string(),
|
|
272
|
+
createdAt: z.string().describe("ISO timestamp"),
|
|
273
|
+
packages: z.record(PlatformLanguageSchema, ComponentPackageSchema)
|
|
274
|
+
});
|
|
275
|
+
var ActivityActionSchema = z.enum([
|
|
276
|
+
"CREATED",
|
|
277
|
+
"UPDATED",
|
|
278
|
+
"REVERTED",
|
|
279
|
+
"PACKAGE_GENERATED",
|
|
280
|
+
"DELETED"
|
|
281
|
+
]);
|
|
282
|
+
var ActivityLogSchema = z.object({
|
|
283
|
+
id: z.string(),
|
|
284
|
+
componentTypeId: z.string(),
|
|
285
|
+
componentTypeName: z.string(),
|
|
286
|
+
variantId: z.string().optional(),
|
|
287
|
+
aestheticId: z.string(),
|
|
288
|
+
action: ActivityActionSchema,
|
|
289
|
+
version: z.string(),
|
|
290
|
+
details: z.string(),
|
|
291
|
+
timestamp: z.string()
|
|
292
|
+
});
|
|
293
|
+
var IngestionInputSchema = z.object({
|
|
294
|
+
codeBundle: z.string().describe("Raw code bundle provided"),
|
|
295
|
+
css: z.string().optional().describe("Optional raw CSS or CSS bundle to extract and inline"),
|
|
296
|
+
componentTypeId: z.string().describe("Slug or Name of UI Component Type (e.g., 'button')"),
|
|
297
|
+
variantName: z.string().describe("Mandatory Variant Name text input (e.g., 'Glass Action Button')"),
|
|
298
|
+
variantId: z.string().optional().describe("Optional custom slug or ID for variant"),
|
|
299
|
+
aestheticId: z.string().optional().describe("Dropdown value for aesthetic style (e.g., 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn')"),
|
|
300
|
+
recommendedThemeId: z.string().optional().describe("Optional recommended theme ID"),
|
|
301
|
+
componentTypeName: z.string().optional().describe("Optional display name if creating new component type"),
|
|
302
|
+
componentTypeDescription: z.string().optional().describe("Optional description if creating new component type"),
|
|
303
|
+
variantDescription: z.string().optional().describe("Optional description if creating new variant"),
|
|
304
|
+
aestheticName: z.string().optional().describe("Optional display name for aesthetic"),
|
|
305
|
+
aestheticDescription: z.string().optional().describe("Optional description if creating new aesthetic"),
|
|
306
|
+
sourcePlatform: PlatformLanguageSchema.optional().describe("Optional source platform - detected automatically if omitted"),
|
|
307
|
+
changelogNote: z.string().optional(),
|
|
308
|
+
tags: z.array(z.string()).optional()
|
|
309
|
+
});
|
|
310
|
+
var ThemeColorsSchema = z.object({
|
|
311
|
+
primary: z.string(),
|
|
312
|
+
primaryForeground: z.string().optional(),
|
|
313
|
+
secondary: z.string().optional(),
|
|
314
|
+
secondaryForeground: z.string().optional(),
|
|
315
|
+
accent: z.string().optional(),
|
|
316
|
+
accentForeground: z.string().optional(),
|
|
317
|
+
background: z.string(),
|
|
318
|
+
foreground: z.string(),
|
|
319
|
+
surface: z.string().optional(),
|
|
320
|
+
surfaceForeground: z.string().optional(),
|
|
321
|
+
muted: z.string().optional(),
|
|
322
|
+
mutedForeground: z.string().optional(),
|
|
323
|
+
destructive: z.string().optional(),
|
|
324
|
+
destructiveForeground: z.string().optional(),
|
|
325
|
+
border: z.string().optional(),
|
|
326
|
+
ring: z.string().optional(),
|
|
327
|
+
customProperties: z.record(z.string()).optional()
|
|
328
|
+
});
|
|
329
|
+
var ThemeTypographyTokensSchema = z.object({
|
|
330
|
+
fontSans: z.string().optional(),
|
|
331
|
+
fontMono: z.string().optional(),
|
|
332
|
+
fontHeading: z.string().optional(),
|
|
333
|
+
fontImports: z.array(z.string()).optional(),
|
|
334
|
+
fontCss: z.string().optional(),
|
|
335
|
+
fontSize: z.record(z.string()).optional(),
|
|
336
|
+
fontWeight: z.record(z.string()).optional()
|
|
337
|
+
});
|
|
338
|
+
var ThemeTokensSchema = z.object({
|
|
339
|
+
colors: z.object({
|
|
340
|
+
light: ThemeColorsSchema,
|
|
341
|
+
dark: ThemeColorsSchema.partial().optional()
|
|
342
|
+
}),
|
|
343
|
+
typography: ThemeTypographyTokensSchema.optional(),
|
|
344
|
+
radii: z.record(z.string().optional()).optional(),
|
|
345
|
+
spacing: z.record(z.string()).optional(),
|
|
346
|
+
paddings: z.record(z.string()).optional(),
|
|
347
|
+
shadows: z.record(z.string()).optional()
|
|
348
|
+
});
|
|
349
|
+
var ThemeSchema = z.object({
|
|
350
|
+
id: z.string().describe("e.g. 'shadcn-zinc', 'tokyo-night', 'glassmorphism-cyber'"),
|
|
351
|
+
name: z.string().describe("e.g. 'Shadcn Zinc Modern'"),
|
|
352
|
+
description: z.string().optional(),
|
|
353
|
+
tokens: ThemeTokensSchema,
|
|
354
|
+
supportsDarkMode: z.boolean().optional(),
|
|
355
|
+
isSystem: z.boolean().optional(),
|
|
356
|
+
createdAt: z.string().describe("ISO timestamp"),
|
|
357
|
+
updatedAt: z.string().describe("ISO timestamp")
|
|
358
|
+
});
|
|
359
|
+
var ThemeIngestionInputSchema = z.object({
|
|
360
|
+
id: z.string().optional(),
|
|
361
|
+
name: z.string(),
|
|
362
|
+
description: z.string().optional(),
|
|
363
|
+
tokens: ThemeTokensSchema.optional(),
|
|
364
|
+
rawCss: z.string().optional(),
|
|
365
|
+
supportsDarkMode: z.boolean().optional(),
|
|
366
|
+
isSystem: z.boolean().optional()
|
|
194
367
|
});
|
|
195
368
|
var JsonGenerationSchema = z.object({
|
|
196
369
|
prompt: z.string(),
|
|
@@ -735,6 +908,9 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
735
908
|
required: ["version", "stages"]
|
|
736
909
|
};
|
|
737
910
|
export {
|
|
911
|
+
ActivityActionSchema,
|
|
912
|
+
ActivityLogSchema,
|
|
913
|
+
AestheticSchema,
|
|
738
914
|
AgentConfigSchema,
|
|
739
915
|
AgentDocumentAttachmentSchema,
|
|
740
916
|
AgentEnvironmentSchema,
|
|
@@ -747,8 +923,14 @@ export {
|
|
|
747
923
|
AgentToolTypeSchema,
|
|
748
924
|
AspectRatioSchema,
|
|
749
925
|
CodeGenerationSchema,
|
|
926
|
+
ComponentDocsSchema,
|
|
927
|
+
ComponentPackageSchema,
|
|
750
928
|
ComponentPropDefinitionSchema,
|
|
929
|
+
ComponentPropDocSchema,
|
|
751
930
|
ComponentSynthesisSchema,
|
|
931
|
+
ComponentTransformationResultSchema,
|
|
932
|
+
ComponentVariantSchema,
|
|
933
|
+
ComponentVersionSchema,
|
|
752
934
|
ConditionOperatorSchema,
|
|
753
935
|
ConditionSchema,
|
|
754
936
|
ControlValidationSchema,
|
|
@@ -767,12 +949,16 @@ export {
|
|
|
767
949
|
FormStageSchema,
|
|
768
950
|
FormSubmissionPayloadSchema,
|
|
769
951
|
FormValidatorSchema,
|
|
952
|
+
GenerateHarnessOptionsSchema,
|
|
770
953
|
ImageCompositingSchema,
|
|
771
954
|
ImageGenerationSchema,
|
|
772
955
|
ImageTextOverlaySchema,
|
|
773
956
|
ImageTransformationSchema,
|
|
774
957
|
ImageWatermarkSchema,
|
|
958
|
+
IngestionInputSchema,
|
|
775
959
|
JsonGenerationSchema,
|
|
960
|
+
PlatformLanguageSchema,
|
|
961
|
+
PreviewHarnessSchema,
|
|
776
962
|
QueueJobSchema,
|
|
777
963
|
QueueJobStatusSchema,
|
|
778
964
|
QueueJobTypeSchema,
|
|
@@ -790,6 +976,13 @@ export {
|
|
|
790
976
|
TechnicalFormSchema,
|
|
791
977
|
TextAlignmentSchema,
|
|
792
978
|
TextOverlayPositionSchema,
|
|
979
|
+
ThemeColorsSchema,
|
|
980
|
+
ThemeIngestionInputSchema,
|
|
981
|
+
ThemeSchema,
|
|
982
|
+
ThemeSupportSchema,
|
|
983
|
+
ThemeTokensSchema,
|
|
984
|
+
ThemeTypographyTokensSchema,
|
|
985
|
+
UIComponentTypeSchema,
|
|
793
986
|
VideoAnalysisCategorySchema,
|
|
794
987
|
VideoAnalysisSchema,
|
|
795
988
|
VideoAspectRatioSchema,
|