@pixerate/schemas 1.7.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 +108 -2
- package/dist/index.d.cts +1085 -10
- package/dist/index.d.ts +1085 -10
- package/dist/index.js +98 -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()
|
|
@@ -1003,9 +1089,12 @@ export {
|
|
|
1003
1089
|
AgentNetworkTransformRuleSchema,
|
|
1004
1090
|
AgentToolSchema,
|
|
1005
1091
|
AgentToolTypeSchema,
|
|
1092
|
+
AnimatedGifCompositeSchema,
|
|
1093
|
+
ArcDistortSchema,
|
|
1006
1094
|
AspectRatioSchema,
|
|
1007
1095
|
AudioMixOptionsSchema,
|
|
1008
1096
|
AudioMixTrackSchema,
|
|
1097
|
+
AutoFitCaptionSchema,
|
|
1009
1098
|
CodeGenerationSchema,
|
|
1010
1099
|
ComponentDocsSchema,
|
|
1011
1100
|
ComponentPackageSchema,
|
|
@@ -1021,6 +1110,7 @@ export {
|
|
|
1021
1110
|
DecisionGateKindSchema,
|
|
1022
1111
|
DecisionGateSchema,
|
|
1023
1112
|
DimensionScoreSchema,
|
|
1113
|
+
DisplacementMapSchema,
|
|
1024
1114
|
DropShadowSchema,
|
|
1025
1115
|
FORM_SCHEMA_JSON_SCHEMA,
|
|
1026
1116
|
FidelitySchema,
|
|
@@ -1036,12 +1126,17 @@ export {
|
|
|
1036
1126
|
GenerateHarnessOptionsSchema,
|
|
1037
1127
|
ImageCompositingSchema,
|
|
1038
1128
|
ImageGenerationSchema,
|
|
1129
|
+
ImageOverlayOptionsSchema,
|
|
1130
|
+
ImagePipelineSchema,
|
|
1039
1131
|
ImageTextOverlaySchema,
|
|
1040
1132
|
ImageTransformationSchema,
|
|
1041
1133
|
ImageWatermarkSchema,
|
|
1042
1134
|
IngestionInputSchema,
|
|
1043
1135
|
JsonGenerationSchema,
|
|
1136
|
+
PerspectiveQuadSchema,
|
|
1137
|
+
PerspectiveWarpSchema,
|
|
1044
1138
|
PlatformLanguageSchema,
|
|
1139
|
+
Point2DSchema,
|
|
1045
1140
|
PreviewHarnessSchema,
|
|
1046
1141
|
QueueJobSchema,
|
|
1047
1142
|
QueueJobStatusSchema,
|
|
@@ -1080,6 +1175,7 @@ export {
|
|
|
1080
1175
|
VideoCompressionSchema,
|
|
1081
1176
|
VideoFrameImageSchema,
|
|
1082
1177
|
VideoGenerationSchema,
|
|
1178
|
+
VideoModificationSchema,
|
|
1083
1179
|
VideoOverlayOptionsSchema,
|
|
1084
1180
|
VideoOverlayStyleSchema,
|
|
1085
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
|
}
|