@pixerate/schemas 1.7.0 → 1.9.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 +230 -2
- package/dist/index.d.cts +1871 -79
- package/dist/index.d.ts +1871 -79
- package/dist/index.js +207 -2
- package/package.json +10 -5
package/dist/index.js
CHANGED
|
@@ -186,6 +186,10 @@ var VideoPipelineSchema = z.object({
|
|
|
186
186
|
options: VideoOverlayOptionsSchema.optional()
|
|
187
187
|
})).optional(),
|
|
188
188
|
audioMix: AudioMixOptionsSchema.optional(),
|
|
189
|
+
subtitles: z.lazy(() => SubtitleBurnOptionsSchema).optional(),
|
|
190
|
+
visualizer: z.lazy(() => AudioVisualizerOptionsSchema).optional(),
|
|
191
|
+
kenBurns: z.lazy(() => KenBurnsOptionsSchema).optional(),
|
|
192
|
+
ducking: z.lazy(() => AudioDuckingOptionsSchema).optional(),
|
|
189
193
|
compress: VideoTranscodeSchema.optional()
|
|
190
194
|
});
|
|
191
195
|
var VideoCompositingSchema = VideoPipelineSchema;
|
|
@@ -201,14 +205,95 @@ var ImageTransformationSchema = z.object({
|
|
|
201
205
|
aspectRatio: AspectRatioSchema.optional(),
|
|
202
206
|
seed: z.number().int().optional()
|
|
203
207
|
});
|
|
208
|
+
var Point2DSchema = z.tuple([z.number(), z.number()]);
|
|
209
|
+
var PerspectiveQuadSchema = z.tuple([
|
|
210
|
+
Point2DSchema,
|
|
211
|
+
Point2DSchema,
|
|
212
|
+
Point2DSchema,
|
|
213
|
+
Point2DSchema
|
|
214
|
+
]);
|
|
215
|
+
var PerspectiveWarpSchema = z.object({
|
|
216
|
+
srcQuad: PerspectiveQuadSchema.optional(),
|
|
217
|
+
dstQuad: PerspectiveQuadSchema,
|
|
218
|
+
resample: z.enum(["ewa", "bicubic", "bilinear", "point"]).optional().default("ewa"),
|
|
219
|
+
background: z.string().optional()
|
|
220
|
+
});
|
|
221
|
+
var DisplacementMapSchema = z.object({
|
|
222
|
+
mapImage: z.string().describe("Path, URL, or base64 data URI of the displacement map image"),
|
|
223
|
+
xScale: z.number().describe("Horizontal displacement scale in pixels"),
|
|
224
|
+
yScale: z.number().describe("Vertical displacement scale in pixels")
|
|
225
|
+
});
|
|
226
|
+
var ArcDistortSchema = z.object({
|
|
227
|
+
angle: z.number().describe("Arc angle in degrees (e.g. 60, 180, 360)"),
|
|
228
|
+
rotation: z.number().optional().default(0).describe("Starting angle rotation in degrees"),
|
|
229
|
+
radius: z.number().optional().describe("Top radius in pixels"),
|
|
230
|
+
background: z.string().optional()
|
|
231
|
+
});
|
|
232
|
+
var AutoFitCaptionSchema = z.object({
|
|
233
|
+
text: z.string(),
|
|
234
|
+
width: z.number().int().positive(),
|
|
235
|
+
height: z.number().int().positive(),
|
|
236
|
+
font: z.string().optional(),
|
|
237
|
+
textColor: z.string().optional(),
|
|
238
|
+
backgroundColor: z.string().optional(),
|
|
239
|
+
gravity: z.enum(["NorthWest", "North", "NorthEast", "West", "Center", "East", "SouthWest", "South", "SouthEast"]).optional().default("Center"),
|
|
240
|
+
position: z.object({
|
|
241
|
+
x: z.number().optional(),
|
|
242
|
+
y: z.number().optional()
|
|
243
|
+
}).optional()
|
|
244
|
+
});
|
|
245
|
+
var AnimatedGifCompositeSchema = z.object({
|
|
246
|
+
delayMs: z.number().int().positive().optional(),
|
|
247
|
+
loop: z.number().int().min(0).optional().default(0),
|
|
248
|
+
dither: z.enum(["FloydSteinberg", "Riemersma", "None"]).optional().default("FloydSteinberg"),
|
|
249
|
+
coalesce: z.boolean().optional().default(true)
|
|
250
|
+
});
|
|
251
|
+
var ImageOverlayOptionsSchema = z.object({
|
|
252
|
+
x: z.union([z.number(), z.string()]).optional(),
|
|
253
|
+
y: z.union([z.number(), z.string()]).optional(),
|
|
254
|
+
gravity: z.enum(["northwest", "north", "northeast", "west", "center", "east", "southwest", "south", "southeast"]).optional(),
|
|
255
|
+
blend: z.enum(["over", "in", "out", "atop", "xor", "multiply", "screen", "overlay", "darken", "lighten"]).optional(),
|
|
256
|
+
opacity: z.number().min(0).max(1).optional()
|
|
257
|
+
});
|
|
258
|
+
var ImagePipelineSchema = z.object({
|
|
259
|
+
fit: z.object({
|
|
260
|
+
width: z.number().int().positive().optional(),
|
|
261
|
+
height: z.number().int().positive().optional(),
|
|
262
|
+
aspectRatio: AspectRatioSchema.optional(),
|
|
263
|
+
fit: z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
|
|
264
|
+
background: z.string().optional()
|
|
265
|
+
}).optional(),
|
|
266
|
+
textOverlay: TextOverlaySchema.optional(),
|
|
267
|
+
watermark: z.union([WatermarkSchema, z.string()]).optional(),
|
|
268
|
+
imageOverlays: z.array(z.object({
|
|
269
|
+
image: z.string(),
|
|
270
|
+
options: ImageOverlayOptionsSchema.optional()
|
|
271
|
+
})).optional(),
|
|
272
|
+
perspectiveWarp: PerspectiveWarpSchema.optional(),
|
|
273
|
+
displacementMap: DisplacementMapSchema.optional(),
|
|
274
|
+
arcDistort: ArcDistortSchema.optional(),
|
|
275
|
+
autoFitCaption: AutoFitCaptionSchema.optional(),
|
|
276
|
+
animatedGif: AnimatedGifCompositeSchema.optional(),
|
|
277
|
+
traceVector: z.lazy(() => VectorTraceOptionsSchema).optional(),
|
|
278
|
+
output: z.object({
|
|
279
|
+
format: z.enum(["png", "jpeg", "webp", "avif", "gif", "svg"]).optional(),
|
|
280
|
+
quality: z.number().int().min(1).max(100).optional()
|
|
281
|
+
}).optional()
|
|
282
|
+
});
|
|
204
283
|
var ImageCompositingSchema = z.object({
|
|
205
284
|
textOverlay: TextOverlaySchema.optional(),
|
|
206
285
|
watermark: WatermarkSchema.optional(),
|
|
207
286
|
fit: z.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
|
|
208
287
|
targetWidth: z.number().int().optional(),
|
|
209
288
|
targetHeight: z.number().int().optional(),
|
|
210
|
-
format: z.enum(["png", "jpeg", "webp", "avif"]).optional(),
|
|
211
|
-
quality: z.number().int().min(1).max(100).optional()
|
|
289
|
+
format: z.enum(["png", "jpeg", "webp", "avif", "gif", "svg"]).optional(),
|
|
290
|
+
quality: z.number().int().min(1).max(100).optional(),
|
|
291
|
+
perspectiveWarp: PerspectiveWarpSchema.optional(),
|
|
292
|
+
displacementMap: DisplacementMapSchema.optional(),
|
|
293
|
+
arcDistort: ArcDistortSchema.optional(),
|
|
294
|
+
autoFitCaption: AutoFitCaptionSchema.optional(),
|
|
295
|
+
animatedGif: AnimatedGifCompositeSchema.optional(),
|
|
296
|
+
traceVector: z.lazy(() => VectorTraceOptionsSchema).optional()
|
|
212
297
|
});
|
|
213
298
|
var VideoAnalysisCategorySchema = z.enum([
|
|
214
299
|
"Scenes",
|
|
@@ -227,6 +312,13 @@ var VideoAnalysisSchema = z.object({
|
|
|
227
312
|
category: VideoAnalysisCategorySchema,
|
|
228
313
|
fidelity: FidelitySchema
|
|
229
314
|
});
|
|
315
|
+
var VideoModificationSchema = z.object({
|
|
316
|
+
prompt: z.string(),
|
|
317
|
+
changes: z.string().optional(),
|
|
318
|
+
aspectRatio: VideoAspectRatioSchema.optional(),
|
|
319
|
+
durationSeconds: z.number().optional(),
|
|
320
|
+
seed: z.number().int().optional()
|
|
321
|
+
});
|
|
230
322
|
var CodeGenerationSchema = z.object({
|
|
231
323
|
prompt: z.string(),
|
|
232
324
|
language: z.string()
|
|
@@ -989,6 +1081,96 @@ var FORM_SCHEMA_JSON_SCHEMA = {
|
|
|
989
1081
|
},
|
|
990
1082
|
required: ["version", "stages"]
|
|
991
1083
|
};
|
|
1084
|
+
var SubtitleFormatSchema = z.enum(["srt", "vtt", "ass"]);
|
|
1085
|
+
var SubtitleBurnOptionsSchema = z.object({
|
|
1086
|
+
subtitlePath: z.string().optional(),
|
|
1087
|
+
subtitleContent: z.string().optional(),
|
|
1088
|
+
format: SubtitleFormatSchema.optional(),
|
|
1089
|
+
fontSize: z.number().optional(),
|
|
1090
|
+
fontName: z.string().optional(),
|
|
1091
|
+
primaryColor: z.string().optional(),
|
|
1092
|
+
outlineColor: z.string().optional(),
|
|
1093
|
+
outlineWidth: z.number().optional(),
|
|
1094
|
+
alignment: z.number().int().optional(),
|
|
1095
|
+
marginV: z.number().int().optional(),
|
|
1096
|
+
karaoke: z.boolean().optional()
|
|
1097
|
+
});
|
|
1098
|
+
var AudioVisualizerTypeSchema = z.enum(["waves", "spectrum", "bars"]);
|
|
1099
|
+
var AudioVisualizerOptionsSchema = z.object({
|
|
1100
|
+
type: AudioVisualizerTypeSchema.optional().default("waves"),
|
|
1101
|
+
width: z.number().int().positive().optional().default(1280),
|
|
1102
|
+
height: z.number().int().positive().optional().default(720),
|
|
1103
|
+
fps: z.number().int().positive().optional().default(30),
|
|
1104
|
+
colors: z.string().optional(),
|
|
1105
|
+
mode: z.enum(["point", "line", "p2p", "cline"]).optional(),
|
|
1106
|
+
scale: z.enum(["lin", "sqrt", "cbrt", "log"]).optional(),
|
|
1107
|
+
background: z.string().optional()
|
|
1108
|
+
});
|
|
1109
|
+
var KenBurnsOptionsSchema = z.object({
|
|
1110
|
+
durationSeconds: z.number().positive().optional().default(5),
|
|
1111
|
+
fps: z.number().int().positive().optional().default(30),
|
|
1112
|
+
width: z.number().int().positive().optional().default(1920),
|
|
1113
|
+
height: z.number().int().positive().optional().default(1080),
|
|
1114
|
+
zoomDirection: z.enum(["in", "out", "none"]).optional().default("in"),
|
|
1115
|
+
panDirection: z.enum(["top-to-bottom", "bottom-to-top", "left-to-right", "right-to-left", "center", "none"]).optional().default("center"),
|
|
1116
|
+
maxZoom: z.number().min(1).max(3).optional().default(1.2)
|
|
1117
|
+
});
|
|
1118
|
+
var AudioDuckingOptionsSchema = z.object({
|
|
1119
|
+
duckingDb: z.number().optional().default(14),
|
|
1120
|
+
attackMs: z.number().optional().default(20),
|
|
1121
|
+
releaseMs: z.number().optional().default(250),
|
|
1122
|
+
threshold: z.number().optional().default(0.125)
|
|
1123
|
+
});
|
|
1124
|
+
var AudioNormalizationOptionsSchema = z.object({
|
|
1125
|
+
targetLufs: z.number().optional().default(-14),
|
|
1126
|
+
truePeak: z.number().optional().default(-1.5),
|
|
1127
|
+
loudnessRange: z.number().optional().default(11),
|
|
1128
|
+
audioCodec: z.string().optional().default("aac")
|
|
1129
|
+
});
|
|
1130
|
+
var AudioSilenceTrimOptionsSchema = z.object({
|
|
1131
|
+
silenceThresholdDb: z.number().optional().default(-50),
|
|
1132
|
+
minSilenceDuration: z.number().optional().default(0.5)
|
|
1133
|
+
});
|
|
1134
|
+
var MediaProbeResultSchema = z.object({
|
|
1135
|
+
format: z.string().optional(),
|
|
1136
|
+
durationSeconds: z.number().optional(),
|
|
1137
|
+
width: z.number().int().optional(),
|
|
1138
|
+
height: z.number().int().optional(),
|
|
1139
|
+
fps: z.number().optional(),
|
|
1140
|
+
bitrate: z.number().optional(),
|
|
1141
|
+
videoCodec: z.string().optional(),
|
|
1142
|
+
audioCodec: z.string().optional(),
|
|
1143
|
+
audioChannels: z.number().int().optional(),
|
|
1144
|
+
sampleRate: z.number().int().optional(),
|
|
1145
|
+
sizeBytes: z.number().int().optional()
|
|
1146
|
+
});
|
|
1147
|
+
var VectorTraceOptionsSchema = z.object({
|
|
1148
|
+
colorMode: z.enum(["color", "binary"]).optional().default("color"),
|
|
1149
|
+
hierarchical: z.enum(["stacked", "cutout"]).optional().default("stacked"),
|
|
1150
|
+
filterSpeckle: z.number().int().min(0).optional().default(4),
|
|
1151
|
+
cornerThreshold: z.number().int().min(0).max(180).optional().default(60),
|
|
1152
|
+
segmentLength: z.number().min(0).optional().default(4),
|
|
1153
|
+
spliceThreshold: z.number().int().min(0).max(180).optional().default(45),
|
|
1154
|
+
scale: z.number().positive().optional().default(1)
|
|
1155
|
+
});
|
|
1156
|
+
var PerceptualHashAlgorithmSchema = z.enum(["ahash", "dhash"]);
|
|
1157
|
+
var PerceptualHashOptionsSchema = z.object({
|
|
1158
|
+
algorithm: PerceptualHashAlgorithmSchema.optional().default("dhash"),
|
|
1159
|
+
hashSize: z.number().int().min(8).max(64).optional().default(8)
|
|
1160
|
+
});
|
|
1161
|
+
var DocumentGenerationOptionsSchema = z.object({
|
|
1162
|
+
title: z.string().optional(),
|
|
1163
|
+
author: z.string().optional(),
|
|
1164
|
+
pageSize: z.enum(["A4", "A3", "A5", "LETTER", "LEGAL"]).optional().default("A4"),
|
|
1165
|
+
margins: z.object({
|
|
1166
|
+
top: z.number(),
|
|
1167
|
+
bottom: z.number(),
|
|
1168
|
+
left: z.number(),
|
|
1169
|
+
right: z.number()
|
|
1170
|
+
}).optional(),
|
|
1171
|
+
enableSyntaxHighlighting: z.boolean().optional().default(true),
|
|
1172
|
+
theme: z.enum(["light", "dark", "corporate", "minimal"]).optional().default("light")
|
|
1173
|
+
});
|
|
992
1174
|
export {
|
|
993
1175
|
ActivityActionSchema,
|
|
994
1176
|
ActivityLogSchema,
|
|
@@ -1003,9 +1185,17 @@ export {
|
|
|
1003
1185
|
AgentNetworkTransformRuleSchema,
|
|
1004
1186
|
AgentToolSchema,
|
|
1005
1187
|
AgentToolTypeSchema,
|
|
1188
|
+
AnimatedGifCompositeSchema,
|
|
1189
|
+
ArcDistortSchema,
|
|
1006
1190
|
AspectRatioSchema,
|
|
1191
|
+
AudioDuckingOptionsSchema,
|
|
1007
1192
|
AudioMixOptionsSchema,
|
|
1008
1193
|
AudioMixTrackSchema,
|
|
1194
|
+
AudioNormalizationOptionsSchema,
|
|
1195
|
+
AudioSilenceTrimOptionsSchema,
|
|
1196
|
+
AudioVisualizerOptionsSchema,
|
|
1197
|
+
AudioVisualizerTypeSchema,
|
|
1198
|
+
AutoFitCaptionSchema,
|
|
1009
1199
|
CodeGenerationSchema,
|
|
1010
1200
|
ComponentDocsSchema,
|
|
1011
1201
|
ComponentPackageSchema,
|
|
@@ -1021,6 +1211,8 @@ export {
|
|
|
1021
1211
|
DecisionGateKindSchema,
|
|
1022
1212
|
DecisionGateSchema,
|
|
1023
1213
|
DimensionScoreSchema,
|
|
1214
|
+
DisplacementMapSchema,
|
|
1215
|
+
DocumentGenerationOptionsSchema,
|
|
1024
1216
|
DropShadowSchema,
|
|
1025
1217
|
FORM_SCHEMA_JSON_SCHEMA,
|
|
1026
1218
|
FidelitySchema,
|
|
@@ -1036,12 +1228,21 @@ export {
|
|
|
1036
1228
|
GenerateHarnessOptionsSchema,
|
|
1037
1229
|
ImageCompositingSchema,
|
|
1038
1230
|
ImageGenerationSchema,
|
|
1231
|
+
ImageOverlayOptionsSchema,
|
|
1232
|
+
ImagePipelineSchema,
|
|
1039
1233
|
ImageTextOverlaySchema,
|
|
1040
1234
|
ImageTransformationSchema,
|
|
1041
1235
|
ImageWatermarkSchema,
|
|
1042
1236
|
IngestionInputSchema,
|
|
1043
1237
|
JsonGenerationSchema,
|
|
1238
|
+
KenBurnsOptionsSchema,
|
|
1239
|
+
MediaProbeResultSchema,
|
|
1240
|
+
PerceptualHashAlgorithmSchema,
|
|
1241
|
+
PerceptualHashOptionsSchema,
|
|
1242
|
+
PerspectiveQuadSchema,
|
|
1243
|
+
PerspectiveWarpSchema,
|
|
1044
1244
|
PlatformLanguageSchema,
|
|
1245
|
+
Point2DSchema,
|
|
1045
1246
|
PreviewHarnessSchema,
|
|
1046
1247
|
QueueJobSchema,
|
|
1047
1248
|
QueueJobStatusSchema,
|
|
@@ -1057,6 +1258,8 @@ export {
|
|
|
1057
1258
|
ServiceClientSchema,
|
|
1058
1259
|
SocialVideoGenerationSchema,
|
|
1059
1260
|
SubmissionScoreSchema,
|
|
1261
|
+
SubtitleBurnOptionsSchema,
|
|
1262
|
+
SubtitleFormatSchema,
|
|
1060
1263
|
TechnicalFormSchema,
|
|
1061
1264
|
TextAlignmentSchema,
|
|
1062
1265
|
TextOverlayPositionSchema,
|
|
@@ -1073,6 +1276,7 @@ export {
|
|
|
1073
1276
|
UIGenerationOptionsSchema,
|
|
1074
1277
|
UIGenerationResultSchema,
|
|
1075
1278
|
UIValidationResultSchema,
|
|
1279
|
+
VectorTraceOptionsSchema,
|
|
1076
1280
|
VideoAnalysisCategorySchema,
|
|
1077
1281
|
VideoAnalysisSchema,
|
|
1078
1282
|
VideoAspectRatioSchema,
|
|
@@ -1080,6 +1284,7 @@ export {
|
|
|
1080
1284
|
VideoCompressionSchema,
|
|
1081
1285
|
VideoFrameImageSchema,
|
|
1082
1286
|
VideoGenerationSchema,
|
|
1287
|
+
VideoModificationSchema,
|
|
1083
1288
|
VideoOverlayOptionsSchema,
|
|
1084
1289
|
VideoOverlayStyleSchema,
|
|
1085
1290
|
VideoPipelineSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.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
|
}
|