@pixerate/schemas 1.4.0 → 1.6.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.js CHANGED
@@ -43,7 +43,7 @@ var VideoUpscaleSchema = z.object({
43
43
  targetResolution: z.enum(["1080p", "4k", "1080P", "4K"]).default("1080p"),
44
44
  modelName: z.string().optional()
45
45
  });
46
- var VideoOverlayStyleSchema = z.enum([
46
+ var TextOverlayStyleSchema = z.enum([
47
47
  "neubrutalist",
48
48
  "neubrutalist-dark",
49
49
  "badge",
@@ -51,6 +51,7 @@ var VideoOverlayStyleSchema = z.enum([
51
51
  "custom",
52
52
  "none"
53
53
  ]);
54
+ var VideoOverlayStyleSchema = TextOverlayStyleSchema;
54
55
  var WatermarkPositionSchema = z.union([
55
56
  z.enum([
56
57
  "bottom-right",
@@ -64,7 +65,7 @@ var WatermarkPositionSchema = z.union([
64
65
  y: z.union([z.number(), z.string()]).optional()
65
66
  })
66
67
  ]);
67
- var VideoWatermarkSchema = z.object({
68
+ var WatermarkSchema = z.object({
68
69
  text: z.string().optional(),
69
70
  imagePath: z.string().optional(),
70
71
  font: z.string().optional(),
@@ -81,6 +82,8 @@ var VideoWatermarkSchema = z.object({
81
82
  marginLeft: z.number().optional(),
82
83
  marginTop: z.number().optional()
83
84
  });
85
+ var VideoWatermarkSchema = WatermarkSchema;
86
+ var ImageWatermarkSchema = WatermarkSchema;
84
87
  var TextOverlayPositionSchema = z.union([
85
88
  z.enum(["top", "center", "bottom"]),
86
89
  z.object({
@@ -96,9 +99,9 @@ var DropShadowSchema = z.object({
96
99
  color: z.string().optional(),
97
100
  opacity: z.number().optional()
98
101
  });
99
- var VideoTextOverlaySchema = z.object({
102
+ var TextOverlaySchema = z.object({
100
103
  text: z.string(),
101
- style: VideoOverlayStyleSchema.optional(),
104
+ style: TextOverlayStyleSchema.optional(),
102
105
  font: z.string().optional(),
103
106
  fontPath: z.string().optional(),
104
107
  position: TextOverlayPositionSchema.optional(),
@@ -122,17 +125,70 @@ var VideoTextOverlaySchema = z.object({
122
125
  badgeBgColor: z.string().optional(),
123
126
  badgeTextColor: z.string().optional(),
124
127
  badgeFont: z.string().optional(),
128
+ badgeFontSize: z.number().optional(),
125
129
  badgePosition: z.enum(["top-left", "top-right", "top-center", "bottom-left", "bottom-right", "bottom-center"]).optional(),
126
- watermark: z.union([z.string(), VideoWatermarkSchema]).optional()
130
+ watermark: z.union([z.string(), WatermarkSchema]).optional()
127
131
  });
132
+ var VideoTextOverlaySchema = TextOverlaySchema;
133
+ var ImageTextOverlaySchema = TextOverlaySchema;
128
134
  var SocialVideoGenerationSchema = z.object({
129
135
  prompt: z.string(),
130
136
  audioPrompt: z.string().optional(),
131
137
  aspectRatio: VideoAspectRatioSchema.optional(),
132
138
  durationSeconds: z.number().int().optional(),
133
- hook: z.union([z.string(), VideoTextOverlaySchema]).optional(),
134
- watermark: z.union([z.string(), VideoWatermarkSchema]).optional()
139
+ hook: z.union([z.string(), TextOverlaySchema]).optional(),
140
+ watermark: z.union([z.string(), WatermarkSchema]).optional()
135
141
  });
142
+ var VideoTranscodeSchema = z.object({
143
+ crf: z.number().min(0).max(51).optional(),
144
+ preset: z.string().optional(),
145
+ videoCodec: z.string().optional(),
146
+ audioCodec: z.string().optional()
147
+ });
148
+ var VideoCompressionSchema = VideoTranscodeSchema;
149
+ var VideoOverlayOptionsSchema = z.object({
150
+ x: z.union([z.number(), z.string()]).optional(),
151
+ y: z.union([z.number(), z.string()]).optional(),
152
+ crf: z.number().optional(),
153
+ preset: z.string().optional(),
154
+ videoCodec: z.string().optional(),
155
+ audioCodec: z.string().optional()
156
+ });
157
+ var VideoScaleAndPadSchema = z.object({
158
+ width: z.number().int().positive(),
159
+ height: z.number().int().positive(),
160
+ fit: z.enum(["contain", "cover", "fill"]).optional(),
161
+ background: z.string().optional(),
162
+ crf: z.number().optional(),
163
+ preset: z.string().optional(),
164
+ videoCodec: z.string().optional(),
165
+ audioCodec: z.string().optional()
166
+ });
167
+ var AudioMixTrackSchema = z.object({
168
+ path: z.string(),
169
+ volume: z.number().min(0).max(1).optional(),
170
+ delayMs: z.number().optional()
171
+ });
172
+ var AudioMixOptionsSchema = z.object({
173
+ tracks: z.array(AudioMixTrackSchema),
174
+ videoVolume: z.number().optional(),
175
+ crf: z.number().optional(),
176
+ preset: z.string().optional(),
177
+ videoCodec: z.string().optional(),
178
+ audioCodec: z.string().optional()
179
+ });
180
+ var VideoPipelineSchema = z.object({
181
+ scaleAndPad: VideoScaleAndPadSchema.optional(),
182
+ textOverlay: TextOverlaySchema.optional(),
183
+ watermark: z.union([WatermarkSchema, z.string()]).optional(),
184
+ imageOverlays: z.array(z.object({
185
+ imagePath: z.string(),
186
+ options: VideoOverlayOptionsSchema.optional()
187
+ })).optional(),
188
+ audioMix: AudioMixOptionsSchema.optional(),
189
+ compress: VideoTranscodeSchema.optional()
190
+ });
191
+ var VideoCompositingSchema = VideoPipelineSchema;
136
192
  var ImageGenerationSchema = z.object({
137
193
  prompt: z.string(),
138
194
  aspectRatio: AspectRatioSchema.optional(),
@@ -145,11 +201,9 @@ var ImageTransformationSchema = z.object({
145
201
  aspectRatio: AspectRatioSchema.optional(),
146
202
  seed: z.number().int().optional()
147
203
  });
148
- var ImageTextOverlaySchema = VideoTextOverlaySchema;
149
- var ImageWatermarkSchema = VideoWatermarkSchema;
150
204
  var ImageCompositingSchema = z.object({
151
- textOverlay: ImageTextOverlaySchema.optional(),
152
- watermark: ImageWatermarkSchema.optional(),
205
+ textOverlay: TextOverlaySchema.optional(),
206
+ watermark: WatermarkSchema.optional(),
153
207
  fit: z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
154
208
  targetWidth: z.number().int().optional(),
155
209
  targetHeight: z.number().int().optional(),
@@ -177,20 +231,193 @@ var CodeGenerationSchema = z.object({
177
231
  prompt: z.string(),
178
232
  language: z.string()
179
233
  });
180
- var ComponentPropDefinitionSchema = z.object({
234
+ var PlatformLanguageSchema = z.enum(["svelte", "react", "webcomponent"]);
235
+ var ThemeSupportSchema = z.enum(["default", "light-and-dark"]);
236
+ var ComponentPropDocSchema = z.object({
181
237
  name: z.string(),
182
238
  type: z.string(),
183
239
  default: z.string().optional(),
184
- description: z.string().optional()
240
+ description: z.string()
241
+ });
242
+ var ComponentPropDefinitionSchema = ComponentPropDocSchema;
243
+ var ComponentDocsSchema = z.object({
244
+ usage: z.string().describe("Usage instructions and import examples"),
245
+ props: z.array(ComponentPropDocSchema).describe("List of prop definitions and types"),
246
+ notes: z.string().optional().describe("Additional usage or architectural notes")
247
+ });
248
+ var PreviewHarnessSchema = z.object({
249
+ driverCode: z.string().describe(
250
+ "Complete, runnable preview driver code harness demonstrating usage of the component with snippets/children or mock props"
251
+ ),
252
+ mockProps: z.record(z.any()).describe("JSON map of realistic mock prop values passed to the component"),
253
+ wrapperClass: z.string().optional().describe("Tailwind CSS class string for wrapping the preview container")
254
+ });
255
+ var GenerateHarnessOptionsSchema = z.object({
256
+ code: z.string(),
257
+ language: PlatformLanguageSchema,
258
+ componentName: z.string(),
259
+ docsProps: z.array(ComponentPropDocSchema).optional()
185
260
  });
186
261
  var ComponentSynthesisSchema = z.object({
187
- svelte5: z.string().describe("Synthesized Svelte 5 component implementation using runes"),
188
- reactTsx: z.string().describe("Synthesized React 19 TSX component implementation"),
189
- webComponent: z.string().describe("Synthesized WebComponent custom element implementation"),
190
- usageDocs: z.string().describe("Markdown documentation detailing props and usage patterns"),
191
- propsSummary: z.array(ComponentPropDefinitionSchema).describe("List of prop definitions and types"),
192
- supportedThemes: z.enum(["default", "light-and-dark"]).describe("Color theme support classification"),
193
- previewHtml: z.string().optional().describe("Self-contained interactive preview HTML harness")
262
+ title: z.string().describe("Title of the synthesized component"),
263
+ description: z.string().describe("Detailed description of the component"),
264
+ tags: z.array(z.string()).describe("Keywords and categorization tags"),
265
+ platforms: z.object({
266
+ svelte: z.string().describe("Self-contained Svelte 5 component with runes ($props, $state, onclick, snippets, etc.)"),
267
+ react: z.string().describe("Self-contained React 19 TSX component with all subcomponents defined and exported"),
268
+ webcomponent: z.string().describe("Self-contained WebComponent custom element extending HTMLElement")
269
+ }),
270
+ harnesses: z.object({
271
+ svelte: PreviewHarnessSchema,
272
+ react: PreviewHarnessSchema,
273
+ webcomponent: PreviewHarnessSchema
274
+ }).optional(),
275
+ docs: ComponentDocsSchema
276
+ });
277
+ var ComponentTransformationResultSchema = z.object({
278
+ title: z.string(),
279
+ description: z.string(),
280
+ tags: z.array(z.string()),
281
+ platforms: z.record(PlatformLanguageSchema, z.string()),
282
+ harnesses: z.record(PlatformLanguageSchema, PreviewHarnessSchema),
283
+ docs: ComponentDocsSchema,
284
+ detectedLanguage: PlatformLanguageSchema,
285
+ themeSupport: ThemeSupportSchema
286
+ });
287
+ var ComponentPackageSchema = z.object({
288
+ language: PlatformLanguageSchema,
289
+ code: z.string().describe("Formatted code bundle with trimmed leading whitespace"),
290
+ docs: ComponentDocsSchema,
291
+ screenshot: z.string().describe("Data URI or URL of actual rendered component"),
292
+ themeSupport: ThemeSupportSchema,
293
+ tags: z.array(z.string()),
294
+ previewHarness: PreviewHarnessSchema.optional()
295
+ });
296
+ var UIComponentTypeSchema = z.object({
297
+ id: z.string().describe("Slug, e.g., 'button'"),
298
+ name: z.string().describe("e.g. 'Button'"),
299
+ description: z.string().describe("Official description e.g. from Shadcn documentation"),
300
+ tags: z.array(z.string()).describe("Freeform tags e.g. ['form', 'action']"),
301
+ createdAt: z.string().describe("ISO timestamp"),
302
+ updatedAt: z.string().describe("ISO timestamp")
303
+ });
304
+ var ComponentVariantSchema = z.object({
305
+ id: z.string().describe("Slug, e.g., 'glass-card' or 'glassmorphism'"),
306
+ componentTypeId: z.string().describe("References UIComponentType.id"),
307
+ name: z.string().describe("e.g. 'Glass Action Button'"),
308
+ aestheticId: z.string().describe("Style aesthetic, e.g. 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn'"),
309
+ recommendedThemeId: z.string().optional().describe("Optional recommended theme ID (e.g., 'shadcn-zinc', 'tokyo-night')"),
310
+ description: z.string().optional().describe("Style & business logic description"),
311
+ imageUrl: z.string().optional().describe("Optional image URL"),
312
+ image: z.string().optional(),
313
+ screenshot: z.string().optional(),
314
+ createdAt: z.string().describe("ISO timestamp"),
315
+ updatedAt: z.string().describe("ISO timestamp")
316
+ });
317
+ var AestheticSchema = ComponentVariantSchema;
318
+ var ComponentVersionSchema = z.object({
319
+ id: z.string().describe("Unique version ID e.g. 'button-glass-action-button-v1.0.0'"),
320
+ componentTypeId: z.string().describe("References UIComponentType.id"),
321
+ variantId: z.string().describe("References ComponentVariant.id"),
322
+ aestheticId: z.string().describe("References Aesthetic style e.g. 'glassmorphism'"),
323
+ version: z.string().describe("Semver e.g. '1.0.0'"),
324
+ changelogNote: z.string(),
325
+ createdBy: z.string(),
326
+ createdAt: z.string().describe("ISO timestamp"),
327
+ packages: z.record(PlatformLanguageSchema, ComponentPackageSchema)
328
+ });
329
+ var ActivityActionSchema = z.enum([
330
+ "CREATED",
331
+ "UPDATED",
332
+ "REVERTED",
333
+ "PACKAGE_GENERATED",
334
+ "DELETED"
335
+ ]);
336
+ var ActivityLogSchema = z.object({
337
+ id: z.string(),
338
+ componentTypeId: z.string(),
339
+ componentTypeName: z.string(),
340
+ variantId: z.string().optional(),
341
+ aestheticId: z.string(),
342
+ action: ActivityActionSchema,
343
+ version: z.string(),
344
+ details: z.string(),
345
+ timestamp: z.string()
346
+ });
347
+ var IngestionInputSchema = z.object({
348
+ codeBundle: z.string().describe("Raw code bundle provided"),
349
+ css: z.string().optional().describe("Optional raw CSS or CSS bundle to extract and inline"),
350
+ componentTypeId: z.string().describe("Slug or Name of UI Component Type (e.g., 'button')"),
351
+ variantName: z.string().describe("Mandatory Variant Name text input (e.g., 'Glass Action Button')"),
352
+ variantId: z.string().optional().describe("Optional custom slug or ID for variant"),
353
+ aestheticId: z.string().optional().describe("Dropdown value for aesthetic style (e.g., 'glassmorphism', 'neubrutalism', 'minimalist', 'modern', 'shadcn')"),
354
+ recommendedThemeId: z.string().optional().describe("Optional recommended theme ID"),
355
+ componentTypeName: z.string().optional().describe("Optional display name if creating new component type"),
356
+ componentTypeDescription: z.string().optional().describe("Optional description if creating new component type"),
357
+ variantDescription: z.string().optional().describe("Optional description if creating new variant"),
358
+ aestheticName: z.string().optional().describe("Optional display name for aesthetic"),
359
+ aestheticDescription: z.string().optional().describe("Optional description if creating new aesthetic"),
360
+ sourcePlatform: PlatformLanguageSchema.optional().describe("Optional source platform - detected automatically if omitted"),
361
+ changelogNote: z.string().optional(),
362
+ tags: z.array(z.string()).optional()
363
+ });
364
+ var ThemeColorsSchema = z.object({
365
+ primary: z.string(),
366
+ primaryForeground: z.string().optional(),
367
+ secondary: z.string().optional(),
368
+ secondaryForeground: z.string().optional(),
369
+ accent: z.string().optional(),
370
+ accentForeground: z.string().optional(),
371
+ background: z.string(),
372
+ foreground: z.string(),
373
+ surface: z.string().optional(),
374
+ surfaceForeground: z.string().optional(),
375
+ muted: z.string().optional(),
376
+ mutedForeground: z.string().optional(),
377
+ destructive: z.string().optional(),
378
+ destructiveForeground: z.string().optional(),
379
+ border: z.string().optional(),
380
+ ring: z.string().optional(),
381
+ customProperties: z.record(z.string()).optional()
382
+ });
383
+ var ThemeTypographyTokensSchema = z.object({
384
+ fontSans: z.string().optional(),
385
+ fontMono: z.string().optional(),
386
+ fontHeading: z.string().optional(),
387
+ fontImports: z.array(z.string()).optional(),
388
+ fontCss: z.string().optional(),
389
+ fontSize: z.record(z.string()).optional(),
390
+ fontWeight: z.record(z.string()).optional()
391
+ });
392
+ var ThemeTokensSchema = z.object({
393
+ colors: z.object({
394
+ light: ThemeColorsSchema,
395
+ dark: ThemeColorsSchema.partial().optional()
396
+ }),
397
+ typography: ThemeTypographyTokensSchema.optional(),
398
+ radii: z.record(z.string().optional()).optional(),
399
+ spacing: z.record(z.string()).optional(),
400
+ paddings: z.record(z.string()).optional(),
401
+ shadows: z.record(z.string()).optional()
402
+ });
403
+ var ThemeSchema = z.object({
404
+ id: z.string().describe("e.g. 'shadcn-zinc', 'tokyo-night', 'glassmorphism-cyber'"),
405
+ name: z.string().describe("e.g. 'Shadcn Zinc Modern'"),
406
+ description: z.string().optional(),
407
+ tokens: ThemeTokensSchema,
408
+ supportsDarkMode: z.boolean().optional(),
409
+ isSystem: z.boolean().optional(),
410
+ createdAt: z.string().describe("ISO timestamp"),
411
+ updatedAt: z.string().describe("ISO timestamp")
412
+ });
413
+ var ThemeIngestionInputSchema = z.object({
414
+ id: z.string().optional(),
415
+ name: z.string(),
416
+ description: z.string().optional(),
417
+ tokens: ThemeTokensSchema.optional(),
418
+ rawCss: z.string().optional(),
419
+ supportsDarkMode: z.boolean().optional(),
420
+ isSystem: z.boolean().optional()
194
421
  });
195
422
  var JsonGenerationSchema = z.object({
196
423
  prompt: z.string(),
@@ -735,6 +962,9 @@ var FORM_SCHEMA_JSON_SCHEMA = {
735
962
  required: ["version", "stages"]
736
963
  };
737
964
  export {
965
+ ActivityActionSchema,
966
+ ActivityLogSchema,
967
+ AestheticSchema,
738
968
  AgentConfigSchema,
739
969
  AgentDocumentAttachmentSchema,
740
970
  AgentEnvironmentSchema,
@@ -746,9 +976,17 @@ export {
746
976
  AgentToolSchema,
747
977
  AgentToolTypeSchema,
748
978
  AspectRatioSchema,
979
+ AudioMixOptionsSchema,
980
+ AudioMixTrackSchema,
749
981
  CodeGenerationSchema,
982
+ ComponentDocsSchema,
983
+ ComponentPackageSchema,
750
984
  ComponentPropDefinitionSchema,
985
+ ComponentPropDocSchema,
751
986
  ComponentSynthesisSchema,
987
+ ComponentTransformationResultSchema,
988
+ ComponentVariantSchema,
989
+ ComponentVersionSchema,
752
990
  ConditionOperatorSchema,
753
991
  ConditionSchema,
754
992
  ControlValidationSchema,
@@ -767,12 +1005,16 @@ export {
767
1005
  FormStageSchema,
768
1006
  FormSubmissionPayloadSchema,
769
1007
  FormValidatorSchema,
1008
+ GenerateHarnessOptionsSchema,
770
1009
  ImageCompositingSchema,
771
1010
  ImageGenerationSchema,
772
1011
  ImageTextOverlaySchema,
773
1012
  ImageTransformationSchema,
774
1013
  ImageWatermarkSchema,
1014
+ IngestionInputSchema,
775
1015
  JsonGenerationSchema,
1016
+ PlatformLanguageSchema,
1017
+ PreviewHarnessSchema,
776
1018
  QueueJobSchema,
777
1019
  QueueJobStatusSchema,
778
1020
  QueueJobTypeSchema,
@@ -790,15 +1032,31 @@ export {
790
1032
  TechnicalFormSchema,
791
1033
  TextAlignmentSchema,
792
1034
  TextOverlayPositionSchema,
1035
+ TextOverlaySchema,
1036
+ TextOverlayStyleSchema,
1037
+ ThemeColorsSchema,
1038
+ ThemeIngestionInputSchema,
1039
+ ThemeSchema,
1040
+ ThemeSupportSchema,
1041
+ ThemeTokensSchema,
1042
+ ThemeTypographyTokensSchema,
1043
+ UIComponentTypeSchema,
793
1044
  VideoAnalysisCategorySchema,
794
1045
  VideoAnalysisSchema,
795
1046
  VideoAspectRatioSchema,
1047
+ VideoCompositingSchema,
1048
+ VideoCompressionSchema,
796
1049
  VideoFrameImageSchema,
797
1050
  VideoGenerationSchema,
1051
+ VideoOverlayOptionsSchema,
798
1052
  VideoOverlayStyleSchema,
1053
+ VideoPipelineSchema,
799
1054
  VideoResolutionSchema,
1055
+ VideoScaleAndPadSchema,
800
1056
  VideoTextOverlaySchema,
1057
+ VideoTranscodeSchema,
801
1058
  VideoUpscaleSchema,
802
1059
  VideoWatermarkSchema,
803
- WatermarkPositionSchema
1060
+ WatermarkPositionSchema,
1061
+ WatermarkSchema
804
1062
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/schemas",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",