@pixerate/schemas 1.5.0 → 1.7.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.cjs +125 -13
- package/dist/index.d.cts +2379 -502
- package/dist/index.d.ts +2379 -502
- package/dist/index.js +109 -12
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
102
|
+
var TextOverlaySchema = z.object({
|
|
100
103
|
text: z.string(),
|
|
101
|
-
style:
|
|
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(),
|
|
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(),
|
|
134
|
-
watermark: z.union([z.string(),
|
|
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:
|
|
152
|
-
watermark:
|
|
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(),
|
|
@@ -365,6 +419,34 @@ var ThemeIngestionInputSchema = z.object({
|
|
|
365
419
|
supportsDarkMode: z.boolean().optional(),
|
|
366
420
|
isSystem: z.boolean().optional()
|
|
367
421
|
});
|
|
422
|
+
var UIGenerationOptionsSchema = z.object({
|
|
423
|
+
prompt: z.string().describe("User prompt or instruction for component generation/modification"),
|
|
424
|
+
currentCode: z.string().optional().describe("Existing component code for iterative modification"),
|
|
425
|
+
platform: PlatformLanguageSchema.optional().default("svelte").describe("Target component platform language"),
|
|
426
|
+
theme: z.string().optional().describe("Theme identifier or token reference"),
|
|
427
|
+
systemPrompt: z.string().optional().describe("Custom or override system prompt"),
|
|
428
|
+
maxRetries: z.number().int().nonnegative().optional().default(3).describe("Maximum retry attempts for iterative auto-repair validation"),
|
|
429
|
+
temperature: z.number().optional().describe("Model temperature")
|
|
430
|
+
});
|
|
431
|
+
var UIExtractionResultSchema = z.object({
|
|
432
|
+
code: z.string().describe("Clean extracted component code without markdown fences"),
|
|
433
|
+
postamble: z.string().optional().describe("Conversational explanation or summary after the code block"),
|
|
434
|
+
rawText: z.string().optional().describe("Complete raw output from the model")
|
|
435
|
+
});
|
|
436
|
+
var UIValidationResultSchema = z.object({
|
|
437
|
+
valid: z.boolean().describe("Whether the component passed syntax and linter validation"),
|
|
438
|
+
error: z.string().optional().describe("Error output from validation if failed"),
|
|
439
|
+
errors: z.array(z.string()).optional().describe("List of parsed validation errors"),
|
|
440
|
+
formattedCode: z.string().optional().describe("Prettier-formatted component code if available")
|
|
441
|
+
});
|
|
442
|
+
var UIGenerationResultSchema = z.object({
|
|
443
|
+
code: z.string().describe("Final validated component code"),
|
|
444
|
+
postamble: z.string().optional().describe("Conversational explanation or summary"),
|
|
445
|
+
rawText: z.string().optional().describe("Complete raw model output"),
|
|
446
|
+
isValid: z.boolean().optional().describe("Whether the final code passed validation"),
|
|
447
|
+
validationAttempts: z.number().int().optional().describe("Total number of generation/repair attempts"),
|
|
448
|
+
validationError: z.string().optional().describe("Validation error if still failing after max retries")
|
|
449
|
+
});
|
|
368
450
|
var JsonGenerationSchema = z.object({
|
|
369
451
|
prompt: z.string(),
|
|
370
452
|
schema: z.record(z.any()).optional()
|
|
@@ -922,6 +1004,8 @@ export {
|
|
|
922
1004
|
AgentToolSchema,
|
|
923
1005
|
AgentToolTypeSchema,
|
|
924
1006
|
AspectRatioSchema,
|
|
1007
|
+
AudioMixOptionsSchema,
|
|
1008
|
+
AudioMixTrackSchema,
|
|
925
1009
|
CodeGenerationSchema,
|
|
926
1010
|
ComponentDocsSchema,
|
|
927
1011
|
ComponentPackageSchema,
|
|
@@ -976,6 +1060,8 @@ export {
|
|
|
976
1060
|
TechnicalFormSchema,
|
|
977
1061
|
TextAlignmentSchema,
|
|
978
1062
|
TextOverlayPositionSchema,
|
|
1063
|
+
TextOverlaySchema,
|
|
1064
|
+
TextOverlayStyleSchema,
|
|
979
1065
|
ThemeColorsSchema,
|
|
980
1066
|
ThemeIngestionInputSchema,
|
|
981
1067
|
ThemeSchema,
|
|
@@ -983,15 +1069,26 @@ export {
|
|
|
983
1069
|
ThemeTokensSchema,
|
|
984
1070
|
ThemeTypographyTokensSchema,
|
|
985
1071
|
UIComponentTypeSchema,
|
|
1072
|
+
UIExtractionResultSchema,
|
|
1073
|
+
UIGenerationOptionsSchema,
|
|
1074
|
+
UIGenerationResultSchema,
|
|
1075
|
+
UIValidationResultSchema,
|
|
986
1076
|
VideoAnalysisCategorySchema,
|
|
987
1077
|
VideoAnalysisSchema,
|
|
988
1078
|
VideoAspectRatioSchema,
|
|
1079
|
+
VideoCompositingSchema,
|
|
1080
|
+
VideoCompressionSchema,
|
|
989
1081
|
VideoFrameImageSchema,
|
|
990
1082
|
VideoGenerationSchema,
|
|
1083
|
+
VideoOverlayOptionsSchema,
|
|
991
1084
|
VideoOverlayStyleSchema,
|
|
1085
|
+
VideoPipelineSchema,
|
|
992
1086
|
VideoResolutionSchema,
|
|
1087
|
+
VideoScaleAndPadSchema,
|
|
993
1088
|
VideoTextOverlaySchema,
|
|
1089
|
+
VideoTranscodeSchema,
|
|
994
1090
|
VideoUpscaleSchema,
|
|
995
1091
|
VideoWatermarkSchema,
|
|
996
|
-
WatermarkPositionSchema
|
|
1092
|
+
WatermarkPositionSchema,
|
|
1093
|
+
WatermarkSchema
|
|
997
1094
|
};
|