@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/dist/index.js
CHANGED
|
@@ -201,14 +201,93 @@ var ImageTransformationSchema = z.object({
|
|
|
201
201
|
aspectRatio: AspectRatioSchema.optional(),
|
|
202
202
|
seed: z.number().int().optional()
|
|
203
203
|
});
|
|
204
|
+
var Point2DSchema = z.tuple([z.number(), z.number()]);
|
|
205
|
+
var PerspectiveQuadSchema = z.tuple([
|
|
206
|
+
Point2DSchema,
|
|
207
|
+
Point2DSchema,
|
|
208
|
+
Point2DSchema,
|
|
209
|
+
Point2DSchema
|
|
210
|
+
]);
|
|
211
|
+
var PerspectiveWarpSchema = z.object({
|
|
212
|
+
srcQuad: PerspectiveQuadSchema.optional(),
|
|
213
|
+
dstQuad: PerspectiveQuadSchema,
|
|
214
|
+
resample: z.enum(["ewa", "bicubic", "bilinear", "point"]).optional().default("ewa"),
|
|
215
|
+
background: z.string().optional()
|
|
216
|
+
});
|
|
217
|
+
var DisplacementMapSchema = z.object({
|
|
218
|
+
mapImage: z.string().describe("Path, URL, or base64 data URI of the displacement map image"),
|
|
219
|
+
xScale: z.number().describe("Horizontal displacement scale in pixels"),
|
|
220
|
+
yScale: z.number().describe("Vertical displacement scale in pixels")
|
|
221
|
+
});
|
|
222
|
+
var ArcDistortSchema = z.object({
|
|
223
|
+
angle: z.number().describe("Arc angle in degrees (e.g. 60, 180, 360)"),
|
|
224
|
+
rotation: z.number().optional().default(0).describe("Starting angle rotation in degrees"),
|
|
225
|
+
radius: z.number().optional().describe("Top radius in pixels"),
|
|
226
|
+
background: z.string().optional()
|
|
227
|
+
});
|
|
228
|
+
var AutoFitCaptionSchema = z.object({
|
|
229
|
+
text: z.string(),
|
|
230
|
+
width: z.number().int().positive(),
|
|
231
|
+
height: z.number().int().positive(),
|
|
232
|
+
font: z.string().optional(),
|
|
233
|
+
textColor: z.string().optional(),
|
|
234
|
+
backgroundColor: z.string().optional(),
|
|
235
|
+
gravity: z.enum(["NorthWest", "North", "NorthEast", "West", "Center", "East", "SouthWest", "South", "SouthEast"]).optional().default("Center"),
|
|
236
|
+
position: z.object({
|
|
237
|
+
x: z.number().optional(),
|
|
238
|
+
y: z.number().optional()
|
|
239
|
+
}).optional()
|
|
240
|
+
});
|
|
241
|
+
var AnimatedGifCompositeSchema = z.object({
|
|
242
|
+
delayMs: z.number().int().positive().optional(),
|
|
243
|
+
loop: z.number().int().min(0).optional().default(0),
|
|
244
|
+
dither: z.enum(["FloydSteinberg", "Riemersma", "None"]).optional().default("FloydSteinberg"),
|
|
245
|
+
coalesce: z.boolean().optional().default(true)
|
|
246
|
+
});
|
|
247
|
+
var ImageOverlayOptionsSchema = z.object({
|
|
248
|
+
x: z.union([z.number(), z.string()]).optional(),
|
|
249
|
+
y: z.union([z.number(), z.string()]).optional(),
|
|
250
|
+
gravity: z.enum(["northwest", "north", "northeast", "west", "center", "east", "southwest", "south", "southeast"]).optional(),
|
|
251
|
+
blend: z.enum(["over", "in", "out", "atop", "xor", "multiply", "screen", "overlay", "darken", "lighten"]).optional(),
|
|
252
|
+
opacity: z.number().min(0).max(1).optional()
|
|
253
|
+
});
|
|
254
|
+
var ImagePipelineSchema = z.object({
|
|
255
|
+
fit: z.object({
|
|
256
|
+
width: z.number().int().positive().optional(),
|
|
257
|
+
height: z.number().int().positive().optional(),
|
|
258
|
+
aspectRatio: AspectRatioSchema.optional(),
|
|
259
|
+
fit: z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
|
|
260
|
+
background: z.string().optional()
|
|
261
|
+
}).optional(),
|
|
262
|
+
textOverlay: TextOverlaySchema.optional(),
|
|
263
|
+
watermark: z.union([WatermarkSchema, z.string()]).optional(),
|
|
264
|
+
imageOverlays: z.array(z.object({
|
|
265
|
+
image: z.string(),
|
|
266
|
+
options: ImageOverlayOptionsSchema.optional()
|
|
267
|
+
})).optional(),
|
|
268
|
+
perspectiveWarp: PerspectiveWarpSchema.optional(),
|
|
269
|
+
displacementMap: DisplacementMapSchema.optional(),
|
|
270
|
+
arcDistort: ArcDistortSchema.optional(),
|
|
271
|
+
autoFitCaption: AutoFitCaptionSchema.optional(),
|
|
272
|
+
animatedGif: AnimatedGifCompositeSchema.optional(),
|
|
273
|
+
output: z.object({
|
|
274
|
+
format: z.enum(["png", "jpeg", "webp", "avif", "gif"]).optional(),
|
|
275
|
+
quality: z.number().int().min(1).max(100).optional()
|
|
276
|
+
}).optional()
|
|
277
|
+
});
|
|
204
278
|
var ImageCompositingSchema = z.object({
|
|
205
279
|
textOverlay: TextOverlaySchema.optional(),
|
|
206
280
|
watermark: WatermarkSchema.optional(),
|
|
207
281
|
fit: z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
|
|
208
282
|
targetWidth: z.number().int().optional(),
|
|
209
283
|
targetHeight: z.number().int().optional(),
|
|
210
|
-
format: z.enum(["png", "jpeg", "webp", "avif"]).optional(),
|
|
211
|
-
quality: z.number().int().min(1).max(100).optional()
|
|
284
|
+
format: z.enum(["png", "jpeg", "webp", "avif", "gif"]).optional(),
|
|
285
|
+
quality: z.number().int().min(1).max(100).optional(),
|
|
286
|
+
perspectiveWarp: PerspectiveWarpSchema.optional(),
|
|
287
|
+
displacementMap: DisplacementMapSchema.optional(),
|
|
288
|
+
arcDistort: ArcDistortSchema.optional(),
|
|
289
|
+
autoFitCaption: AutoFitCaptionSchema.optional(),
|
|
290
|
+
animatedGif: AnimatedGifCompositeSchema.optional()
|
|
212
291
|
});
|
|
213
292
|
var VideoAnalysisCategorySchema = z.enum([
|
|
214
293
|
"Scenes",
|
|
@@ -227,6 +306,13 @@ var VideoAnalysisSchema = z.object({
|
|
|
227
306
|
category: VideoAnalysisCategorySchema,
|
|
228
307
|
fidelity: FidelitySchema
|
|
229
308
|
});
|
|
309
|
+
var VideoModificationSchema = z.object({
|
|
310
|
+
prompt: z.string(),
|
|
311
|
+
changes: z.string().optional(),
|
|
312
|
+
aspectRatio: VideoAspectRatioSchema.optional(),
|
|
313
|
+
durationSeconds: z.number().optional(),
|
|
314
|
+
seed: z.number().int().optional()
|
|
315
|
+
});
|
|
230
316
|
var CodeGenerationSchema = z.object({
|
|
231
317
|
prompt: z.string(),
|
|
232
318
|
language: z.string()
|
|
@@ -419,6 +505,34 @@ var ThemeIngestionInputSchema = z.object({
|
|
|
419
505
|
supportsDarkMode: z.boolean().optional(),
|
|
420
506
|
isSystem: z.boolean().optional()
|
|
421
507
|
});
|
|
508
|
+
var UIGenerationOptionsSchema = z.object({
|
|
509
|
+
prompt: z.string().describe("User prompt or instruction for component generation/modification"),
|
|
510
|
+
currentCode: z.string().optional().describe("Existing component code for iterative modification"),
|
|
511
|
+
platform: PlatformLanguageSchema.optional().default("svelte").describe("Target component platform language"),
|
|
512
|
+
theme: z.string().optional().describe("Theme identifier or token reference"),
|
|
513
|
+
systemPrompt: z.string().optional().describe("Custom or override system prompt"),
|
|
514
|
+
maxRetries: z.number().int().nonnegative().optional().default(3).describe("Maximum retry attempts for iterative auto-repair validation"),
|
|
515
|
+
temperature: z.number().optional().describe("Model temperature")
|
|
516
|
+
});
|
|
517
|
+
var UIExtractionResultSchema = z.object({
|
|
518
|
+
code: z.string().describe("Clean extracted component code without markdown fences"),
|
|
519
|
+
postamble: z.string().optional().describe("Conversational explanation or summary after the code block"),
|
|
520
|
+
rawText: z.string().optional().describe("Complete raw output from the model")
|
|
521
|
+
});
|
|
522
|
+
var UIValidationResultSchema = z.object({
|
|
523
|
+
valid: z.boolean().describe("Whether the component passed syntax and linter validation"),
|
|
524
|
+
error: z.string().optional().describe("Error output from validation if failed"),
|
|
525
|
+
errors: z.array(z.string()).optional().describe("List of parsed validation errors"),
|
|
526
|
+
formattedCode: z.string().optional().describe("Prettier-formatted component code if available")
|
|
527
|
+
});
|
|
528
|
+
var UIGenerationResultSchema = z.object({
|
|
529
|
+
code: z.string().describe("Final validated component code"),
|
|
530
|
+
postamble: z.string().optional().describe("Conversational explanation or summary"),
|
|
531
|
+
rawText: z.string().optional().describe("Complete raw model output"),
|
|
532
|
+
isValid: z.boolean().optional().describe("Whether the final code passed validation"),
|
|
533
|
+
validationAttempts: z.number().int().optional().describe("Total number of generation/repair attempts"),
|
|
534
|
+
validationError: z.string().optional().describe("Validation error if still failing after max retries")
|
|
535
|
+
});
|
|
422
536
|
var JsonGenerationSchema = z.object({
|
|
423
537
|
prompt: z.string(),
|
|
424
538
|
schema: z.record(z.any()).optional()
|
|
@@ -975,9 +1089,12 @@ export {
|
|
|
975
1089
|
AgentNetworkTransformRuleSchema,
|
|
976
1090
|
AgentToolSchema,
|
|
977
1091
|
AgentToolTypeSchema,
|
|
1092
|
+
AnimatedGifCompositeSchema,
|
|
1093
|
+
ArcDistortSchema,
|
|
978
1094
|
AspectRatioSchema,
|
|
979
1095
|
AudioMixOptionsSchema,
|
|
980
1096
|
AudioMixTrackSchema,
|
|
1097
|
+
AutoFitCaptionSchema,
|
|
981
1098
|
CodeGenerationSchema,
|
|
982
1099
|
ComponentDocsSchema,
|
|
983
1100
|
ComponentPackageSchema,
|
|
@@ -993,6 +1110,7 @@ export {
|
|
|
993
1110
|
DecisionGateKindSchema,
|
|
994
1111
|
DecisionGateSchema,
|
|
995
1112
|
DimensionScoreSchema,
|
|
1113
|
+
DisplacementMapSchema,
|
|
996
1114
|
DropShadowSchema,
|
|
997
1115
|
FORM_SCHEMA_JSON_SCHEMA,
|
|
998
1116
|
FidelitySchema,
|
|
@@ -1008,12 +1126,17 @@ export {
|
|
|
1008
1126
|
GenerateHarnessOptionsSchema,
|
|
1009
1127
|
ImageCompositingSchema,
|
|
1010
1128
|
ImageGenerationSchema,
|
|
1129
|
+
ImageOverlayOptionsSchema,
|
|
1130
|
+
ImagePipelineSchema,
|
|
1011
1131
|
ImageTextOverlaySchema,
|
|
1012
1132
|
ImageTransformationSchema,
|
|
1013
1133
|
ImageWatermarkSchema,
|
|
1014
1134
|
IngestionInputSchema,
|
|
1015
1135
|
JsonGenerationSchema,
|
|
1136
|
+
PerspectiveQuadSchema,
|
|
1137
|
+
PerspectiveWarpSchema,
|
|
1016
1138
|
PlatformLanguageSchema,
|
|
1139
|
+
Point2DSchema,
|
|
1017
1140
|
PreviewHarnessSchema,
|
|
1018
1141
|
QueueJobSchema,
|
|
1019
1142
|
QueueJobStatusSchema,
|
|
@@ -1041,6 +1164,10 @@ export {
|
|
|
1041
1164
|
ThemeTokensSchema,
|
|
1042
1165
|
ThemeTypographyTokensSchema,
|
|
1043
1166
|
UIComponentTypeSchema,
|
|
1167
|
+
UIExtractionResultSchema,
|
|
1168
|
+
UIGenerationOptionsSchema,
|
|
1169
|
+
UIGenerationResultSchema,
|
|
1170
|
+
UIValidationResultSchema,
|
|
1044
1171
|
VideoAnalysisCategorySchema,
|
|
1045
1172
|
VideoAnalysisSchema,
|
|
1046
1173
|
VideoAspectRatioSchema,
|
|
@@ -1048,6 +1175,7 @@ export {
|
|
|
1048
1175
|
VideoCompressionSchema,
|
|
1049
1176
|
VideoFrameImageSchema,
|
|
1050
1177
|
VideoGenerationSchema,
|
|
1178
|
+
VideoModificationSchema,
|
|
1051
1179
|
VideoOverlayOptionsSchema,
|
|
1052
1180
|
VideoOverlayStyleSchema,
|
|
1053
1181
|
VideoPipelineSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
17
|
-
"prepare": "npm run build"
|
|
17
|
+
"prepare": "npm run build",
|
|
18
|
+
"changeset": "changeset",
|
|
19
|
+
"version-packages": "changeset version",
|
|
20
|
+
"release": "npm run build && changeset publish"
|
|
18
21
|
},
|
|
19
22
|
"repository": {
|
|
20
23
|
"type": "git",
|
|
@@ -27,7 +30,8 @@
|
|
|
27
30
|
"author": "Pixerate",
|
|
28
31
|
"license": "MIT",
|
|
29
32
|
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
31
35
|
},
|
|
32
36
|
"files": [
|
|
33
37
|
"dist"
|
|
@@ -36,7 +40,8 @@
|
|
|
36
40
|
"zod": "^3.23.8"
|
|
37
41
|
},
|
|
38
42
|
"devDependencies": {
|
|
39
|
-
"
|
|
40
|
-
"tsup": "^8.0.2"
|
|
43
|
+
"@changesets/cli": "^3.0.1",
|
|
44
|
+
"tsup": "^8.0.2",
|
|
45
|
+
"typescript": "^5.4.5"
|
|
41
46
|
}
|
|
42
47
|
}
|