@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 CHANGED
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ ActivityActionSchema: () => ActivityActionSchema,
24
+ ActivityLogSchema: () => ActivityLogSchema,
25
+ AestheticSchema: () => AestheticSchema,
23
26
  AgentConfigSchema: () => AgentConfigSchema,
24
27
  AgentDocumentAttachmentSchema: () => AgentDocumentAttachmentSchema,
25
28
  AgentEnvironmentSchema: () => AgentEnvironmentSchema,
@@ -32,8 +35,14 @@ __export(index_exports, {
32
35
  AgentToolTypeSchema: () => AgentToolTypeSchema,
33
36
  AspectRatioSchema: () => AspectRatioSchema,
34
37
  CodeGenerationSchema: () => CodeGenerationSchema,
38
+ ComponentDocsSchema: () => ComponentDocsSchema,
39
+ ComponentPackageSchema: () => ComponentPackageSchema,
35
40
  ComponentPropDefinitionSchema: () => ComponentPropDefinitionSchema,
41
+ ComponentPropDocSchema: () => ComponentPropDocSchema,
36
42
  ComponentSynthesisSchema: () => ComponentSynthesisSchema,
43
+ ComponentTransformationResultSchema: () => ComponentTransformationResultSchema,
44
+ ComponentVariantSchema: () => ComponentVariantSchema,
45
+ ComponentVersionSchema: () => ComponentVersionSchema,
37
46
  ConditionOperatorSchema: () => ConditionOperatorSchema,
38
47
  ConditionSchema: () => ConditionSchema,
39
48
  ControlValidationSchema: () => ControlValidationSchema,
@@ -52,12 +61,16 @@ __export(index_exports, {
52
61
  FormStageSchema: () => FormStageSchema,
53
62
  FormSubmissionPayloadSchema: () => FormSubmissionPayloadSchema,
54
63
  FormValidatorSchema: () => FormValidatorSchema,
64
+ GenerateHarnessOptionsSchema: () => GenerateHarnessOptionsSchema,
55
65
  ImageCompositingSchema: () => ImageCompositingSchema,
56
66
  ImageGenerationSchema: () => ImageGenerationSchema,
57
67
  ImageTextOverlaySchema: () => ImageTextOverlaySchema,
58
68
  ImageTransformationSchema: () => ImageTransformationSchema,
59
69
  ImageWatermarkSchema: () => ImageWatermarkSchema,
70
+ IngestionInputSchema: () => IngestionInputSchema,
60
71
  JsonGenerationSchema: () => JsonGenerationSchema,
72
+ PlatformLanguageSchema: () => PlatformLanguageSchema,
73
+ PreviewHarnessSchema: () => PreviewHarnessSchema,
61
74
  QueueJobSchema: () => QueueJobSchema,
62
75
  QueueJobStatusSchema: () => QueueJobStatusSchema,
63
76
  QueueJobTypeSchema: () => QueueJobTypeSchema,
@@ -75,6 +88,13 @@ __export(index_exports, {
75
88
  TechnicalFormSchema: () => TechnicalFormSchema,
76
89
  TextAlignmentSchema: () => TextAlignmentSchema,
77
90
  TextOverlayPositionSchema: () => TextOverlayPositionSchema,
91
+ ThemeColorsSchema: () => ThemeColorsSchema,
92
+ ThemeIngestionInputSchema: () => ThemeIngestionInputSchema,
93
+ ThemeSchema: () => ThemeSchema,
94
+ ThemeSupportSchema: () => ThemeSupportSchema,
95
+ ThemeTokensSchema: () => ThemeTokensSchema,
96
+ ThemeTypographyTokensSchema: () => ThemeTypographyTokensSchema,
97
+ UIComponentTypeSchema: () => UIComponentTypeSchema,
78
98
  VideoAnalysisCategorySchema: () => VideoAnalysisCategorySchema,
79
99
  VideoAnalysisSchema: () => VideoAnalysisSchema,
80
100
  VideoAspectRatioSchema: () => VideoAspectRatioSchema,
@@ -266,20 +286,193 @@ var CodeGenerationSchema = import_zod.z.object({
266
286
  prompt: import_zod.z.string(),
267
287
  language: import_zod.z.string()
268
288
  });
269
- var ComponentPropDefinitionSchema = import_zod.z.object({
289
+ var PlatformLanguageSchema = import_zod.z.enum(["svelte", "react", "webcomponent"]);
290
+ var ThemeSupportSchema = import_zod.z.enum(["default", "light-and-dark"]);
291
+ var ComponentPropDocSchema = import_zod.z.object({
270
292
  name: import_zod.z.string(),
271
293
  type: import_zod.z.string(),
272
294
  default: import_zod.z.string().optional(),
273
- description: import_zod.z.string().optional()
295
+ description: import_zod.z.string()
296
+ });
297
+ var ComponentPropDefinitionSchema = ComponentPropDocSchema;
298
+ var ComponentDocsSchema = import_zod.z.object({
299
+ usage: import_zod.z.string().describe("Usage instructions and import examples"),
300
+ props: import_zod.z.array(ComponentPropDocSchema).describe("List of prop definitions and types"),
301
+ notes: import_zod.z.string().optional().describe("Additional usage or architectural notes")
302
+ });
303
+ var PreviewHarnessSchema = import_zod.z.object({
304
+ driverCode: import_zod.z.string().describe(
305
+ "Complete, runnable preview driver code harness demonstrating usage of the component with snippets/children or mock props"
306
+ ),
307
+ mockProps: import_zod.z.record(import_zod.z.any()).describe("JSON map of realistic mock prop values passed to the component"),
308
+ wrapperClass: import_zod.z.string().optional().describe("Tailwind CSS class string for wrapping the preview container")
309
+ });
310
+ var GenerateHarnessOptionsSchema = import_zod.z.object({
311
+ code: import_zod.z.string(),
312
+ language: PlatformLanguageSchema,
313
+ componentName: import_zod.z.string(),
314
+ docsProps: import_zod.z.array(ComponentPropDocSchema).optional()
274
315
  });
275
316
  var ComponentSynthesisSchema = import_zod.z.object({
276
- svelte5: import_zod.z.string().describe("Synthesized Svelte 5 component implementation using runes"),
277
- reactTsx: import_zod.z.string().describe("Synthesized React 19 TSX component implementation"),
278
- webComponent: import_zod.z.string().describe("Synthesized WebComponent custom element implementation"),
279
- usageDocs: import_zod.z.string().describe("Markdown documentation detailing props and usage patterns"),
280
- propsSummary: import_zod.z.array(ComponentPropDefinitionSchema).describe("List of prop definitions and types"),
281
- supportedThemes: import_zod.z.enum(["default", "light-and-dark"]).describe("Color theme support classification"),
282
- previewHtml: import_zod.z.string().optional().describe("Self-contained interactive preview HTML harness")
317
+ title: import_zod.z.string().describe("Title of the synthesized component"),
318
+ description: import_zod.z.string().describe("Detailed description of the component"),
319
+ tags: import_zod.z.array(import_zod.z.string()).describe("Keywords and categorization tags"),
320
+ platforms: import_zod.z.object({
321
+ svelte: import_zod.z.string().describe("Self-contained Svelte 5 component with runes ($props, $state, onclick, snippets, etc.)"),
322
+ react: import_zod.z.string().describe("Self-contained React 19 TSX component with all subcomponents defined and exported"),
323
+ webcomponent: import_zod.z.string().describe("Self-contained WebComponent custom element extending HTMLElement")
324
+ }),
325
+ harnesses: import_zod.z.object({
326
+ svelte: PreviewHarnessSchema,
327
+ react: PreviewHarnessSchema,
328
+ webcomponent: PreviewHarnessSchema
329
+ }).optional(),
330
+ docs: ComponentDocsSchema
331
+ });
332
+ var ComponentTransformationResultSchema = import_zod.z.object({
333
+ title: import_zod.z.string(),
334
+ description: import_zod.z.string(),
335
+ tags: import_zod.z.array(import_zod.z.string()),
336
+ platforms: import_zod.z.record(PlatformLanguageSchema, import_zod.z.string()),
337
+ harnesses: import_zod.z.record(PlatformLanguageSchema, PreviewHarnessSchema),
338
+ docs: ComponentDocsSchema,
339
+ detectedLanguage: PlatformLanguageSchema,
340
+ themeSupport: ThemeSupportSchema
341
+ });
342
+ var ComponentPackageSchema = import_zod.z.object({
343
+ language: PlatformLanguageSchema,
344
+ code: import_zod.z.string().describe("Formatted code bundle with trimmed leading whitespace"),
345
+ docs: ComponentDocsSchema,
346
+ screenshot: import_zod.z.string().describe("Data URI or URL of actual rendered component"),
347
+ themeSupport: ThemeSupportSchema,
348
+ tags: import_zod.z.array(import_zod.z.string()),
349
+ previewHarness: PreviewHarnessSchema.optional()
350
+ });
351
+ var UIComponentTypeSchema = import_zod.z.object({
352
+ id: import_zod.z.string().describe("Slug, e.g., 'button'"),
353
+ name: import_zod.z.string().describe("e.g. 'Button'"),
354
+ description: import_zod.z.string().describe("Official description e.g. from Shadcn documentation"),
355
+ tags: import_zod.z.array(import_zod.z.string()).describe("Freeform tags e.g. ['form', 'action']"),
356
+ createdAt: import_zod.z.string().describe("ISO timestamp"),
357
+ updatedAt: import_zod.z.string().describe("ISO timestamp")
358
+ });
359
+ var ComponentVariantSchema = import_zod.z.object({
360
+ id: import_zod.z.string().describe("Slug, e.g., 'glass-card' or 'glassmorphism'"),
361
+ componentTypeId: import_zod.z.string().describe("References UIComponentType.id"),
362
+ name: import_zod.z.string().describe("e.g. 'Glass Action Button'"),
363
+ aestheticId: import_zod.z.string().describe("Style aesthetic, e.g. 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn'"),
364
+ recommendedThemeId: import_zod.z.string().optional().describe("Optional recommended theme ID (e.g., 'shadcn-zinc', 'tokyo-night')"),
365
+ description: import_zod.z.string().optional().describe("Style & business logic description"),
366
+ imageUrl: import_zod.z.string().optional().describe("Optional image URL"),
367
+ image: import_zod.z.string().optional(),
368
+ screenshot: import_zod.z.string().optional(),
369
+ createdAt: import_zod.z.string().describe("ISO timestamp"),
370
+ updatedAt: import_zod.z.string().describe("ISO timestamp")
371
+ });
372
+ var AestheticSchema = ComponentVariantSchema;
373
+ var ComponentVersionSchema = import_zod.z.object({
374
+ id: import_zod.z.string().describe("Unique version ID e.g. 'button-glass-action-button-v1.0.0'"),
375
+ componentTypeId: import_zod.z.string().describe("References UIComponentType.id"),
376
+ variantId: import_zod.z.string().describe("References ComponentVariant.id"),
377
+ aestheticId: import_zod.z.string().describe("References Aesthetic style e.g. 'glassmorphism'"),
378
+ version: import_zod.z.string().describe("Semver e.g. '1.0.0'"),
379
+ changelogNote: import_zod.z.string(),
380
+ createdBy: import_zod.z.string(),
381
+ createdAt: import_zod.z.string().describe("ISO timestamp"),
382
+ packages: import_zod.z.record(PlatformLanguageSchema, ComponentPackageSchema)
383
+ });
384
+ var ActivityActionSchema = import_zod.z.enum([
385
+ "CREATED",
386
+ "UPDATED",
387
+ "REVERTED",
388
+ "PACKAGE_GENERATED",
389
+ "DELETED"
390
+ ]);
391
+ var ActivityLogSchema = import_zod.z.object({
392
+ id: import_zod.z.string(),
393
+ componentTypeId: import_zod.z.string(),
394
+ componentTypeName: import_zod.z.string(),
395
+ variantId: import_zod.z.string().optional(),
396
+ aestheticId: import_zod.z.string(),
397
+ action: ActivityActionSchema,
398
+ version: import_zod.z.string(),
399
+ details: import_zod.z.string(),
400
+ timestamp: import_zod.z.string()
401
+ });
402
+ var IngestionInputSchema = import_zod.z.object({
403
+ codeBundle: import_zod.z.string().describe("Raw code bundle provided"),
404
+ css: import_zod.z.string().optional().describe("Optional raw CSS or CSS bundle to extract and inline"),
405
+ componentTypeId: import_zod.z.string().describe("Slug or Name of UI Component Type (e.g., 'button')"),
406
+ variantName: import_zod.z.string().describe("Mandatory Variant Name text input (e.g., 'Glass Action Button')"),
407
+ variantId: import_zod.z.string().optional().describe("Optional custom slug or ID for variant"),
408
+ aestheticId: import_zod.z.string().optional().describe("Dropdown value for aesthetic style (e.g., 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn')"),
409
+ recommendedThemeId: import_zod.z.string().optional().describe("Optional recommended theme ID"),
410
+ componentTypeName: import_zod.z.string().optional().describe("Optional display name if creating new component type"),
411
+ componentTypeDescription: import_zod.z.string().optional().describe("Optional description if creating new component type"),
412
+ variantDescription: import_zod.z.string().optional().describe("Optional description if creating new variant"),
413
+ aestheticName: import_zod.z.string().optional().describe("Optional display name for aesthetic"),
414
+ aestheticDescription: import_zod.z.string().optional().describe("Optional description if creating new aesthetic"),
415
+ sourcePlatform: PlatformLanguageSchema.optional().describe("Optional source platform - detected automatically if omitted"),
416
+ changelogNote: import_zod.z.string().optional(),
417
+ tags: import_zod.z.array(import_zod.z.string()).optional()
418
+ });
419
+ var ThemeColorsSchema = import_zod.z.object({
420
+ primary: import_zod.z.string(),
421
+ primaryForeground: import_zod.z.string().optional(),
422
+ secondary: import_zod.z.string().optional(),
423
+ secondaryForeground: import_zod.z.string().optional(),
424
+ accent: import_zod.z.string().optional(),
425
+ accentForeground: import_zod.z.string().optional(),
426
+ background: import_zod.z.string(),
427
+ foreground: import_zod.z.string(),
428
+ surface: import_zod.z.string().optional(),
429
+ surfaceForeground: import_zod.z.string().optional(),
430
+ muted: import_zod.z.string().optional(),
431
+ mutedForeground: import_zod.z.string().optional(),
432
+ destructive: import_zod.z.string().optional(),
433
+ destructiveForeground: import_zod.z.string().optional(),
434
+ border: import_zod.z.string().optional(),
435
+ ring: import_zod.z.string().optional(),
436
+ customProperties: import_zod.z.record(import_zod.z.string()).optional()
437
+ });
438
+ var ThemeTypographyTokensSchema = import_zod.z.object({
439
+ fontSans: import_zod.z.string().optional(),
440
+ fontMono: import_zod.z.string().optional(),
441
+ fontHeading: import_zod.z.string().optional(),
442
+ fontImports: import_zod.z.array(import_zod.z.string()).optional(),
443
+ fontCss: import_zod.z.string().optional(),
444
+ fontSize: import_zod.z.record(import_zod.z.string()).optional(),
445
+ fontWeight: import_zod.z.record(import_zod.z.string()).optional()
446
+ });
447
+ var ThemeTokensSchema = import_zod.z.object({
448
+ colors: import_zod.z.object({
449
+ light: ThemeColorsSchema,
450
+ dark: ThemeColorsSchema.partial().optional()
451
+ }),
452
+ typography: ThemeTypographyTokensSchema.optional(),
453
+ radii: import_zod.z.record(import_zod.z.string().optional()).optional(),
454
+ spacing: import_zod.z.record(import_zod.z.string()).optional(),
455
+ paddings: import_zod.z.record(import_zod.z.string()).optional(),
456
+ shadows: import_zod.z.record(import_zod.z.string()).optional()
457
+ });
458
+ var ThemeSchema = import_zod.z.object({
459
+ id: import_zod.z.string().describe("e.g. 'shadcn-zinc', 'tokyo-night', 'glassmorphism-cyber'"),
460
+ name: import_zod.z.string().describe("e.g. 'Shadcn Zinc Modern'"),
461
+ description: import_zod.z.string().optional(),
462
+ tokens: ThemeTokensSchema,
463
+ supportsDarkMode: import_zod.z.boolean().optional(),
464
+ isSystem: import_zod.z.boolean().optional(),
465
+ createdAt: import_zod.z.string().describe("ISO timestamp"),
466
+ updatedAt: import_zod.z.string().describe("ISO timestamp")
467
+ });
468
+ var ThemeIngestionInputSchema = import_zod.z.object({
469
+ id: import_zod.z.string().optional(),
470
+ name: import_zod.z.string(),
471
+ description: import_zod.z.string().optional(),
472
+ tokens: ThemeTokensSchema.optional(),
473
+ rawCss: import_zod.z.string().optional(),
474
+ supportsDarkMode: import_zod.z.boolean().optional(),
475
+ isSystem: import_zod.z.boolean().optional()
283
476
  });
284
477
  var JsonGenerationSchema = import_zod.z.object({
285
478
  prompt: import_zod.z.string(),
@@ -825,6 +1018,9 @@ var FORM_SCHEMA_JSON_SCHEMA = {
825
1018
  };
826
1019
  // Annotate the CommonJS export names for ESM import in node:
827
1020
  0 && (module.exports = {
1021
+ ActivityActionSchema,
1022
+ ActivityLogSchema,
1023
+ AestheticSchema,
828
1024
  AgentConfigSchema,
829
1025
  AgentDocumentAttachmentSchema,
830
1026
  AgentEnvironmentSchema,
@@ -837,8 +1033,14 @@ var FORM_SCHEMA_JSON_SCHEMA = {
837
1033
  AgentToolTypeSchema,
838
1034
  AspectRatioSchema,
839
1035
  CodeGenerationSchema,
1036
+ ComponentDocsSchema,
1037
+ ComponentPackageSchema,
840
1038
  ComponentPropDefinitionSchema,
1039
+ ComponentPropDocSchema,
841
1040
  ComponentSynthesisSchema,
1041
+ ComponentTransformationResultSchema,
1042
+ ComponentVariantSchema,
1043
+ ComponentVersionSchema,
842
1044
  ConditionOperatorSchema,
843
1045
  ConditionSchema,
844
1046
  ControlValidationSchema,
@@ -857,12 +1059,16 @@ var FORM_SCHEMA_JSON_SCHEMA = {
857
1059
  FormStageSchema,
858
1060
  FormSubmissionPayloadSchema,
859
1061
  FormValidatorSchema,
1062
+ GenerateHarnessOptionsSchema,
860
1063
  ImageCompositingSchema,
861
1064
  ImageGenerationSchema,
862
1065
  ImageTextOverlaySchema,
863
1066
  ImageTransformationSchema,
864
1067
  ImageWatermarkSchema,
1068
+ IngestionInputSchema,
865
1069
  JsonGenerationSchema,
1070
+ PlatformLanguageSchema,
1071
+ PreviewHarnessSchema,
866
1072
  QueueJobSchema,
867
1073
  QueueJobStatusSchema,
868
1074
  QueueJobTypeSchema,
@@ -880,6 +1086,13 @@ var FORM_SCHEMA_JSON_SCHEMA = {
880
1086
  TechnicalFormSchema,
881
1087
  TextAlignmentSchema,
882
1088
  TextOverlayPositionSchema,
1089
+ ThemeColorsSchema,
1090
+ ThemeIngestionInputSchema,
1091
+ ThemeSchema,
1092
+ ThemeSupportSchema,
1093
+ ThemeTokensSchema,
1094
+ ThemeTypographyTokensSchema,
1095
+ UIComponentTypeSchema,
883
1096
  VideoAnalysisCategorySchema,
884
1097
  VideoAnalysisSchema,
885
1098
  VideoAspectRatioSchema,