@pixerate/schemas 1.6.0 → 1.8.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/README.md +23 -0
- package/dist/index.cjs +144 -2
- package/dist/index.d.cts +1167 -12
- package/dist/index.d.ts +1167 -12
- package/dist/index.js +130 -2
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -69,3 +69,26 @@ npm run build
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
The compiled bundles and types will reside in the `dist/` directory.
|
|
72
|
+
|
|
73
|
+
## Contributing & Releases
|
|
74
|
+
|
|
75
|
+
This repository mandates [Changesets](https://github.com/changesets/changesets) for tracking versioning and generating changelogs.
|
|
76
|
+
|
|
77
|
+
### Creating a Changeset
|
|
78
|
+
|
|
79
|
+
When submitting a pull request that introduces changes, generate a changeset:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm run changeset
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
1. Select the bump type (`patch`, `minor`, or `major`).
|
|
86
|
+
2. Provide a summary message describing the changes.
|
|
87
|
+
3. Commit the generated `.changeset/*.md` file with your pull request.
|
|
88
|
+
|
|
89
|
+
If a PR does not require a release bump (e.g. CI adjustments or documentation fixes), generate an empty changeset:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx changeset --empty
|
|
93
|
+
```
|
|
94
|
+
|
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,12 @@ __export(index_exports, {
|
|
|
33
33
|
AgentNetworkTransformRuleSchema: () => AgentNetworkTransformRuleSchema,
|
|
34
34
|
AgentToolSchema: () => AgentToolSchema,
|
|
35
35
|
AgentToolTypeSchema: () => AgentToolTypeSchema,
|
|
36
|
+
AnimatedGifCompositeSchema: () => AnimatedGifCompositeSchema,
|
|
37
|
+
ArcDistortSchema: () => ArcDistortSchema,
|
|
36
38
|
AspectRatioSchema: () => AspectRatioSchema,
|
|
37
39
|
AudioMixOptionsSchema: () => AudioMixOptionsSchema,
|
|
38
40
|
AudioMixTrackSchema: () => AudioMixTrackSchema,
|
|
41
|
+
AutoFitCaptionSchema: () => AutoFitCaptionSchema,
|
|
39
42
|
CodeGenerationSchema: () => CodeGenerationSchema,
|
|
40
43
|
ComponentDocsSchema: () => ComponentDocsSchema,
|
|
41
44
|
ComponentPackageSchema: () => ComponentPackageSchema,
|
|
@@ -51,6 +54,7 @@ __export(index_exports, {
|
|
|
51
54
|
DecisionGateKindSchema: () => DecisionGateKindSchema,
|
|
52
55
|
DecisionGateSchema: () => DecisionGateSchema,
|
|
53
56
|
DimensionScoreSchema: () => DimensionScoreSchema,
|
|
57
|
+
DisplacementMapSchema: () => DisplacementMapSchema,
|
|
54
58
|
DropShadowSchema: () => DropShadowSchema,
|
|
55
59
|
FORM_SCHEMA_JSON_SCHEMA: () => FORM_SCHEMA_JSON_SCHEMA,
|
|
56
60
|
FidelitySchema: () => FidelitySchema,
|
|
@@ -66,12 +70,17 @@ __export(index_exports, {
|
|
|
66
70
|
GenerateHarnessOptionsSchema: () => GenerateHarnessOptionsSchema,
|
|
67
71
|
ImageCompositingSchema: () => ImageCompositingSchema,
|
|
68
72
|
ImageGenerationSchema: () => ImageGenerationSchema,
|
|
73
|
+
ImageOverlayOptionsSchema: () => ImageOverlayOptionsSchema,
|
|
74
|
+
ImagePipelineSchema: () => ImagePipelineSchema,
|
|
69
75
|
ImageTextOverlaySchema: () => ImageTextOverlaySchema,
|
|
70
76
|
ImageTransformationSchema: () => ImageTransformationSchema,
|
|
71
77
|
ImageWatermarkSchema: () => ImageWatermarkSchema,
|
|
72
78
|
IngestionInputSchema: () => IngestionInputSchema,
|
|
73
79
|
JsonGenerationSchema: () => JsonGenerationSchema,
|
|
80
|
+
PerspectiveQuadSchema: () => PerspectiveQuadSchema,
|
|
81
|
+
PerspectiveWarpSchema: () => PerspectiveWarpSchema,
|
|
74
82
|
PlatformLanguageSchema: () => PlatformLanguageSchema,
|
|
83
|
+
Point2DSchema: () => Point2DSchema,
|
|
75
84
|
PreviewHarnessSchema: () => PreviewHarnessSchema,
|
|
76
85
|
QueueJobSchema: () => QueueJobSchema,
|
|
77
86
|
QueueJobStatusSchema: () => QueueJobStatusSchema,
|
|
@@ -99,6 +108,10 @@ __export(index_exports, {
|
|
|
99
108
|
ThemeTokensSchema: () => ThemeTokensSchema,
|
|
100
109
|
ThemeTypographyTokensSchema: () => ThemeTypographyTokensSchema,
|
|
101
110
|
UIComponentTypeSchema: () => UIComponentTypeSchema,
|
|
111
|
+
UIExtractionResultSchema: () => UIExtractionResultSchema,
|
|
112
|
+
UIGenerationOptionsSchema: () => UIGenerationOptionsSchema,
|
|
113
|
+
UIGenerationResultSchema: () => UIGenerationResultSchema,
|
|
114
|
+
UIValidationResultSchema: () => UIValidationResultSchema,
|
|
102
115
|
VideoAnalysisCategorySchema: () => VideoAnalysisCategorySchema,
|
|
103
116
|
VideoAnalysisSchema: () => VideoAnalysisSchema,
|
|
104
117
|
VideoAspectRatioSchema: () => VideoAspectRatioSchema,
|
|
@@ -106,6 +119,7 @@ __export(index_exports, {
|
|
|
106
119
|
VideoCompressionSchema: () => VideoCompressionSchema,
|
|
107
120
|
VideoFrameImageSchema: () => VideoFrameImageSchema,
|
|
108
121
|
VideoGenerationSchema: () => VideoGenerationSchema,
|
|
122
|
+
VideoModificationSchema: () => VideoModificationSchema,
|
|
109
123
|
VideoOverlayOptionsSchema: () => VideoOverlayOptionsSchema,
|
|
110
124
|
VideoOverlayStyleSchema: () => VideoOverlayStyleSchema,
|
|
111
125
|
VideoPipelineSchema: () => VideoPipelineSchema,
|
|
@@ -321,14 +335,93 @@ var ImageTransformationSchema = import_zod.z.object({
|
|
|
321
335
|
aspectRatio: AspectRatioSchema.optional(),
|
|
322
336
|
seed: import_zod.z.number().int().optional()
|
|
323
337
|
});
|
|
338
|
+
var Point2DSchema = import_zod.z.tuple([import_zod.z.number(), import_zod.z.number()]);
|
|
339
|
+
var PerspectiveQuadSchema = import_zod.z.tuple([
|
|
340
|
+
Point2DSchema,
|
|
341
|
+
Point2DSchema,
|
|
342
|
+
Point2DSchema,
|
|
343
|
+
Point2DSchema
|
|
344
|
+
]);
|
|
345
|
+
var PerspectiveWarpSchema = import_zod.z.object({
|
|
346
|
+
srcQuad: PerspectiveQuadSchema.optional(),
|
|
347
|
+
dstQuad: PerspectiveQuadSchema,
|
|
348
|
+
resample: import_zod.z.enum(["ewa", "bicubic", "bilinear", "point"]).optional().default("ewa"),
|
|
349
|
+
background: import_zod.z.string().optional()
|
|
350
|
+
});
|
|
351
|
+
var DisplacementMapSchema = import_zod.z.object({
|
|
352
|
+
mapImage: import_zod.z.string().describe("Path, URL, or base64 data URI of the displacement map image"),
|
|
353
|
+
xScale: import_zod.z.number().describe("Horizontal displacement scale in pixels"),
|
|
354
|
+
yScale: import_zod.z.number().describe("Vertical displacement scale in pixels")
|
|
355
|
+
});
|
|
356
|
+
var ArcDistortSchema = import_zod.z.object({
|
|
357
|
+
angle: import_zod.z.number().describe("Arc angle in degrees (e.g. 60, 180, 360)"),
|
|
358
|
+
rotation: import_zod.z.number().optional().default(0).describe("Starting angle rotation in degrees"),
|
|
359
|
+
radius: import_zod.z.number().optional().describe("Top radius in pixels"),
|
|
360
|
+
background: import_zod.z.string().optional()
|
|
361
|
+
});
|
|
362
|
+
var AutoFitCaptionSchema = import_zod.z.object({
|
|
363
|
+
text: import_zod.z.string(),
|
|
364
|
+
width: import_zod.z.number().int().positive(),
|
|
365
|
+
height: import_zod.z.number().int().positive(),
|
|
366
|
+
font: import_zod.z.string().optional(),
|
|
367
|
+
textColor: import_zod.z.string().optional(),
|
|
368
|
+
backgroundColor: import_zod.z.string().optional(),
|
|
369
|
+
gravity: import_zod.z.enum(["NorthWest", "North", "NorthEast", "West", "Center", "East", "SouthWest", "South", "SouthEast"]).optional().default("Center"),
|
|
370
|
+
position: import_zod.z.object({
|
|
371
|
+
x: import_zod.z.number().optional(),
|
|
372
|
+
y: import_zod.z.number().optional()
|
|
373
|
+
}).optional()
|
|
374
|
+
});
|
|
375
|
+
var AnimatedGifCompositeSchema = import_zod.z.object({
|
|
376
|
+
delayMs: import_zod.z.number().int().positive().optional(),
|
|
377
|
+
loop: import_zod.z.number().int().min(0).optional().default(0),
|
|
378
|
+
dither: import_zod.z.enum(["FloydSteinberg", "Riemersma", "None"]).optional().default("FloydSteinberg"),
|
|
379
|
+
coalesce: import_zod.z.boolean().optional().default(true)
|
|
380
|
+
});
|
|
381
|
+
var ImageOverlayOptionsSchema = import_zod.z.object({
|
|
382
|
+
x: import_zod.z.union([import_zod.z.number(), import_zod.z.string()]).optional(),
|
|
383
|
+
y: import_zod.z.union([import_zod.z.number(), import_zod.z.string()]).optional(),
|
|
384
|
+
gravity: import_zod.z.enum(["northwest", "north", "northeast", "west", "center", "east", "southwest", "south", "southeast"]).optional(),
|
|
385
|
+
blend: import_zod.z.enum(["over", "in", "out", "atop", "xor", "multiply", "screen", "overlay", "darken", "lighten"]).optional(),
|
|
386
|
+
opacity: import_zod.z.number().min(0).max(1).optional()
|
|
387
|
+
});
|
|
388
|
+
var ImagePipelineSchema = import_zod.z.object({
|
|
389
|
+
fit: import_zod.z.object({
|
|
390
|
+
width: import_zod.z.number().int().positive().optional(),
|
|
391
|
+
height: import_zod.z.number().int().positive().optional(),
|
|
392
|
+
aspectRatio: AspectRatioSchema.optional(),
|
|
393
|
+
fit: import_zod.z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
|
|
394
|
+
background: import_zod.z.string().optional()
|
|
395
|
+
}).optional(),
|
|
396
|
+
textOverlay: TextOverlaySchema.optional(),
|
|
397
|
+
watermark: import_zod.z.union([WatermarkSchema, import_zod.z.string()]).optional(),
|
|
398
|
+
imageOverlays: import_zod.z.array(import_zod.z.object({
|
|
399
|
+
image: import_zod.z.string(),
|
|
400
|
+
options: ImageOverlayOptionsSchema.optional()
|
|
401
|
+
})).optional(),
|
|
402
|
+
perspectiveWarp: PerspectiveWarpSchema.optional(),
|
|
403
|
+
displacementMap: DisplacementMapSchema.optional(),
|
|
404
|
+
arcDistort: ArcDistortSchema.optional(),
|
|
405
|
+
autoFitCaption: AutoFitCaptionSchema.optional(),
|
|
406
|
+
animatedGif: AnimatedGifCompositeSchema.optional(),
|
|
407
|
+
output: import_zod.z.object({
|
|
408
|
+
format: import_zod.z.enum(["png", "jpeg", "webp", "avif", "gif"]).optional(),
|
|
409
|
+
quality: import_zod.z.number().int().min(1).max(100).optional()
|
|
410
|
+
}).optional()
|
|
411
|
+
});
|
|
324
412
|
var ImageCompositingSchema = import_zod.z.object({
|
|
325
413
|
textOverlay: TextOverlaySchema.optional(),
|
|
326
414
|
watermark: WatermarkSchema.optional(),
|
|
327
415
|
fit: import_zod.z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
|
|
328
416
|
targetWidth: import_zod.z.number().int().optional(),
|
|
329
417
|
targetHeight: import_zod.z.number().int().optional(),
|
|
330
|
-
format: import_zod.z.enum(["png", "jpeg", "webp", "avif"]).optional(),
|
|
331
|
-
quality: import_zod.z.number().int().min(1).max(100).optional()
|
|
418
|
+
format: import_zod.z.enum(["png", "jpeg", "webp", "avif", "gif"]).optional(),
|
|
419
|
+
quality: import_zod.z.number().int().min(1).max(100).optional(),
|
|
420
|
+
perspectiveWarp: PerspectiveWarpSchema.optional(),
|
|
421
|
+
displacementMap: DisplacementMapSchema.optional(),
|
|
422
|
+
arcDistort: ArcDistortSchema.optional(),
|
|
423
|
+
autoFitCaption: AutoFitCaptionSchema.optional(),
|
|
424
|
+
animatedGif: AnimatedGifCompositeSchema.optional()
|
|
332
425
|
});
|
|
333
426
|
var VideoAnalysisCategorySchema = import_zod.z.enum([
|
|
334
427
|
"Scenes",
|
|
@@ -347,6 +440,13 @@ var VideoAnalysisSchema = import_zod.z.object({
|
|
|
347
440
|
category: VideoAnalysisCategorySchema,
|
|
348
441
|
fidelity: FidelitySchema
|
|
349
442
|
});
|
|
443
|
+
var VideoModificationSchema = import_zod.z.object({
|
|
444
|
+
prompt: import_zod.z.string(),
|
|
445
|
+
changes: import_zod.z.string().optional(),
|
|
446
|
+
aspectRatio: VideoAspectRatioSchema.optional(),
|
|
447
|
+
durationSeconds: import_zod.z.number().optional(),
|
|
448
|
+
seed: import_zod.z.number().int().optional()
|
|
449
|
+
});
|
|
350
450
|
var CodeGenerationSchema = import_zod.z.object({
|
|
351
451
|
prompt: import_zod.z.string(),
|
|
352
452
|
language: import_zod.z.string()
|
|
@@ -539,6 +639,34 @@ var ThemeIngestionInputSchema = import_zod.z.object({
|
|
|
539
639
|
supportsDarkMode: import_zod.z.boolean().optional(),
|
|
540
640
|
isSystem: import_zod.z.boolean().optional()
|
|
541
641
|
});
|
|
642
|
+
var UIGenerationOptionsSchema = import_zod.z.object({
|
|
643
|
+
prompt: import_zod.z.string().describe("User prompt or instruction for component generation/modification"),
|
|
644
|
+
currentCode: import_zod.z.string().optional().describe("Existing component code for iterative modification"),
|
|
645
|
+
platform: PlatformLanguageSchema.optional().default("svelte").describe("Target component platform language"),
|
|
646
|
+
theme: import_zod.z.string().optional().describe("Theme identifier or token reference"),
|
|
647
|
+
systemPrompt: import_zod.z.string().optional().describe("Custom or override system prompt"),
|
|
648
|
+
maxRetries: import_zod.z.number().int().nonnegative().optional().default(3).describe("Maximum retry attempts for iterative auto-repair validation"),
|
|
649
|
+
temperature: import_zod.z.number().optional().describe("Model temperature")
|
|
650
|
+
});
|
|
651
|
+
var UIExtractionResultSchema = import_zod.z.object({
|
|
652
|
+
code: import_zod.z.string().describe("Clean extracted component code without markdown fences"),
|
|
653
|
+
postamble: import_zod.z.string().optional().describe("Conversational explanation or summary after the code block"),
|
|
654
|
+
rawText: import_zod.z.string().optional().describe("Complete raw output from the model")
|
|
655
|
+
});
|
|
656
|
+
var UIValidationResultSchema = import_zod.z.object({
|
|
657
|
+
valid: import_zod.z.boolean().describe("Whether the component passed syntax and linter validation"),
|
|
658
|
+
error: import_zod.z.string().optional().describe("Error output from validation if failed"),
|
|
659
|
+
errors: import_zod.z.array(import_zod.z.string()).optional().describe("List of parsed validation errors"),
|
|
660
|
+
formattedCode: import_zod.z.string().optional().describe("Prettier-formatted component code if available")
|
|
661
|
+
});
|
|
662
|
+
var UIGenerationResultSchema = import_zod.z.object({
|
|
663
|
+
code: import_zod.z.string().describe("Final validated component code"),
|
|
664
|
+
postamble: import_zod.z.string().optional().describe("Conversational explanation or summary"),
|
|
665
|
+
rawText: import_zod.z.string().optional().describe("Complete raw model output"),
|
|
666
|
+
isValid: import_zod.z.boolean().optional().describe("Whether the final code passed validation"),
|
|
667
|
+
validationAttempts: import_zod.z.number().int().optional().describe("Total number of generation/repair attempts"),
|
|
668
|
+
validationError: import_zod.z.string().optional().describe("Validation error if still failing after max retries")
|
|
669
|
+
});
|
|
542
670
|
var JsonGenerationSchema = import_zod.z.object({
|
|
543
671
|
prompt: import_zod.z.string(),
|
|
544
672
|
schema: import_zod.z.record(import_zod.z.any()).optional()
|
|
@@ -1096,9 +1224,12 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
1096
1224
|
AgentNetworkTransformRuleSchema,
|
|
1097
1225
|
AgentToolSchema,
|
|
1098
1226
|
AgentToolTypeSchema,
|
|
1227
|
+
AnimatedGifCompositeSchema,
|
|
1228
|
+
ArcDistortSchema,
|
|
1099
1229
|
AspectRatioSchema,
|
|
1100
1230
|
AudioMixOptionsSchema,
|
|
1101
1231
|
AudioMixTrackSchema,
|
|
1232
|
+
AutoFitCaptionSchema,
|
|
1102
1233
|
CodeGenerationSchema,
|
|
1103
1234
|
ComponentDocsSchema,
|
|
1104
1235
|
ComponentPackageSchema,
|
|
@@ -1114,6 +1245,7 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
1114
1245
|
DecisionGateKindSchema,
|
|
1115
1246
|
DecisionGateSchema,
|
|
1116
1247
|
DimensionScoreSchema,
|
|
1248
|
+
DisplacementMapSchema,
|
|
1117
1249
|
DropShadowSchema,
|
|
1118
1250
|
FORM_SCHEMA_JSON_SCHEMA,
|
|
1119
1251
|
FidelitySchema,
|
|
@@ -1129,12 +1261,17 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
1129
1261
|
GenerateHarnessOptionsSchema,
|
|
1130
1262
|
ImageCompositingSchema,
|
|
1131
1263
|
ImageGenerationSchema,
|
|
1264
|
+
ImageOverlayOptionsSchema,
|
|
1265
|
+
ImagePipelineSchema,
|
|
1132
1266
|
ImageTextOverlaySchema,
|
|
1133
1267
|
ImageTransformationSchema,
|
|
1134
1268
|
ImageWatermarkSchema,
|
|
1135
1269
|
IngestionInputSchema,
|
|
1136
1270
|
JsonGenerationSchema,
|
|
1271
|
+
PerspectiveQuadSchema,
|
|
1272
|
+
PerspectiveWarpSchema,
|
|
1137
1273
|
PlatformLanguageSchema,
|
|
1274
|
+
Point2DSchema,
|
|
1138
1275
|
PreviewHarnessSchema,
|
|
1139
1276
|
QueueJobSchema,
|
|
1140
1277
|
QueueJobStatusSchema,
|
|
@@ -1162,6 +1299,10 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
1162
1299
|
ThemeTokensSchema,
|
|
1163
1300
|
ThemeTypographyTokensSchema,
|
|
1164
1301
|
UIComponentTypeSchema,
|
|
1302
|
+
UIExtractionResultSchema,
|
|
1303
|
+
UIGenerationOptionsSchema,
|
|
1304
|
+
UIGenerationResultSchema,
|
|
1305
|
+
UIValidationResultSchema,
|
|
1165
1306
|
VideoAnalysisCategorySchema,
|
|
1166
1307
|
VideoAnalysisSchema,
|
|
1167
1308
|
VideoAspectRatioSchema,
|
|
@@ -1169,6 +1310,7 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
1169
1310
|
VideoCompressionSchema,
|
|
1170
1311
|
VideoFrameImageSchema,
|
|
1171
1312
|
VideoGenerationSchema,
|
|
1313
|
+
VideoModificationSchema,
|
|
1172
1314
|
VideoOverlayOptionsSchema,
|
|
1173
1315
|
VideoOverlayStyleSchema,
|
|
1174
1316
|
VideoPipelineSchema,
|