@shotstack/schemas 1.9.9 → 1.9.11
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/api.bundled.json +4 -4
- package/dist/json-schema/caption-asset.json +1 -1
- package/dist/json-schema/schemas.json +3 -3
- package/dist/json-schema/svg-asset.json +2 -2
- package/dist/schema.d.ts +5 -11
- package/dist/zod/zod.gen.cjs +17 -9
- package/dist/zod/zod.gen.d.ts +3613 -3620
- package/dist/zod/zod.gen.js +17 -9
- package/dist/zod/zod.gen.ts +16 -9
- package/package.json +1 -1
package/dist/api.bundled.json
CHANGED
|
@@ -1752,7 +1752,7 @@
|
|
|
1752
1752
|
]
|
|
1753
1753
|
},
|
|
1754
1754
|
"CaptionAsset": {
|
|
1755
|
-
"description": "The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset
|
|
1755
|
+
"description": "The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with\nmatching start and end time.\n",
|
|
1756
1756
|
"type": "object",
|
|
1757
1757
|
"properties": {
|
|
1758
1758
|
"type": {
|
|
@@ -2417,7 +2417,7 @@
|
|
|
2417
2417
|
]
|
|
2418
2418
|
},
|
|
2419
2419
|
"SvgAsset": {
|
|
2420
|
-
"description": "The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.\n\n
|
|
2420
|
+
"description": "The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.\n\n**Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,\n`<line>`, `<polygon>`, `<polyline>`\n\n**Automatically extracted from SVG markup:**\n- Path data (converted to a single combined path)\n- Fill color (from `fill` attribute or `style`)\n- Stroke color and width (from attributes or `style`)\n- Dimensions (from `width`/`height` or `viewBox`)\n- Opacity (from `opacity` attribute)\n\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.\n",
|
|
2421
2421
|
"type": "object",
|
|
2422
2422
|
"properties": {
|
|
2423
2423
|
"type": {
|
|
@@ -2430,7 +2430,7 @@
|
|
|
2430
2430
|
"example": "svg"
|
|
2431
2431
|
},
|
|
2432
2432
|
"src": {
|
|
2433
|
-
"description": "Raw SVG markup string. The shape,
|
|
2433
|
+
"description": "Raw SVG markup string. The SVG must contain valid SVG elements. The shape,\nfill, stroke, dimensions and opacity are automatically extracted from the\nSVG content.\n",
|
|
2434
2434
|
"type": "string",
|
|
2435
2435
|
"minLength": 1,
|
|
2436
2436
|
"maxLength": 500000,
|
|
@@ -2444,7 +2444,7 @@
|
|
|
2444
2444
|
],
|
|
2445
2445
|
"example": {
|
|
2446
2446
|
"type": "svg",
|
|
2447
|
-
"src": "<svg width=\"
|
|
2447
|
+
"src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#3498db\"/></svg>"
|
|
2448
2448
|
}
|
|
2449
2449
|
},
|
|
2450
2450
|
"Transition": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "CaptionAsset",
|
|
3
3
|
"strict": true,
|
|
4
4
|
"schema": {
|
|
5
|
-
"description": "The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset
|
|
5
|
+
"description": "The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with\nmatching start and end time.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"type": {
|
|
@@ -1734,7 +1734,7 @@
|
|
|
1734
1734
|
]
|
|
1735
1735
|
},
|
|
1736
1736
|
"CaptionAsset": {
|
|
1737
|
-
"description": "The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset
|
|
1737
|
+
"description": "The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will\nbe read and burnt to the video.\n\nCaptions can be applied independently from a video or audio file for greater\nflexibility with styling and layout. For example you can scale, position or crop a video without modifying the\ncaptions.\n\nTo sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with\nmatching start and end time.\n",
|
|
1738
1738
|
"type": "object",
|
|
1739
1739
|
"properties": {
|
|
1740
1740
|
"type": {
|
|
@@ -2761,7 +2761,7 @@
|
|
|
2761
2761
|
]
|
|
2762
2762
|
},
|
|
2763
2763
|
"SvgAsset": {
|
|
2764
|
-
"description": "The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.\n\n
|
|
2764
|
+
"description": "The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.\n\n**Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,\n`<line>`, `<polygon>`, `<polyline>`\n\n**Automatically extracted from SVG markup:**\n- Path data (converted to a single combined path)\n- Fill color (from `fill` attribute or `style`)\n- Stroke color and width (from attributes or `style`)\n- Dimensions (from `width`/`height` or `viewBox`)\n- Opacity (from `opacity` attribute)\n\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.\n",
|
|
2765
2765
|
"type": "object",
|
|
2766
2766
|
"properties": {
|
|
2767
2767
|
"type": {
|
|
@@ -2772,7 +2772,7 @@
|
|
|
2772
2772
|
]
|
|
2773
2773
|
},
|
|
2774
2774
|
"src": {
|
|
2775
|
-
"description": "Raw SVG markup string. The shape,
|
|
2775
|
+
"description": "Raw SVG markup string. The SVG must contain valid SVG elements. The shape,\nfill, stroke, dimensions and opacity are automatically extracted from the\nSVG content.\n",
|
|
2776
2776
|
"type": "string"
|
|
2777
2777
|
}
|
|
2778
2778
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "SvgAsset",
|
|
3
3
|
"strict": true,
|
|
4
4
|
"schema": {
|
|
5
|
-
"description": "The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.\n\n
|
|
5
|
+
"description": "The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.\n\n**Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,\n`<line>`, `<polygon>`, `<polyline>`\n\n**Automatically extracted from SVG markup:**\n- Path data (converted to a single combined path)\n- Fill color (from `fill` attribute or `style`)\n- Stroke color and width (from attributes or `style`)\n- Dimensions (from `width`/`height` or `viewBox`)\n- Opacity (from `opacity` attribute)\n\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.\n",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"type": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"src": {
|
|
16
|
-
"description": "Raw SVG markup string. The shape,
|
|
16
|
+
"description": "Raw SVG markup string. The SVG must contain valid SVG elements. The shape,\nfill, stroke, dimensions and opacity are automatically extracted from the\nSVG content.\n",
|
|
17
17
|
"type": "string"
|
|
18
18
|
}
|
|
19
19
|
},
|
package/dist/schema.d.ts
CHANGED
|
@@ -897,7 +897,7 @@ export interface components {
|
|
|
897
897
|
* flexibility with styling and layout. For example you can scale, position or crop a video without modifying the
|
|
898
898
|
* captions.
|
|
899
899
|
*
|
|
900
|
-
* To sync captions with a video or audio file use a [Video](#tocs_videoasset
|
|
900
|
+
* To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
|
|
901
901
|
* matching start and end time.
|
|
902
902
|
*/
|
|
903
903
|
CaptionAsset: {
|
|
@@ -1339,13 +1339,6 @@ export interface components {
|
|
|
1339
1339
|
/**
|
|
1340
1340
|
* @description The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.
|
|
1341
1341
|
*
|
|
1342
|
-
* ```json
|
|
1343
|
-
* {
|
|
1344
|
-
* "type": "svg",
|
|
1345
|
-
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
|
|
1346
|
-
* }
|
|
1347
|
-
* ```
|
|
1348
|
-
*
|
|
1349
1342
|
* **Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,
|
|
1350
1343
|
* `<line>`, `<polygon>`, `<polyline>`
|
|
1351
1344
|
*
|
|
@@ -1359,7 +1352,7 @@ export interface components {
|
|
|
1359
1352
|
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
|
|
1360
1353
|
* @example {
|
|
1361
1354
|
* "type": "svg",
|
|
1362
|
-
* "src": "<svg width=\"
|
|
1355
|
+
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#3498db\"/></svg>"
|
|
1363
1356
|
* }
|
|
1364
1357
|
*/
|
|
1365
1358
|
SvgAsset: {
|
|
@@ -1369,8 +1362,9 @@ export interface components {
|
|
|
1369
1362
|
*/
|
|
1370
1363
|
type: "svg";
|
|
1371
1364
|
/**
|
|
1372
|
-
* @description Raw SVG markup string. The
|
|
1373
|
-
* are automatically extracted from the
|
|
1365
|
+
* @description Raw SVG markup string. The SVG must contain valid SVG elements. The shape,
|
|
1366
|
+
* fill, stroke, dimensions and opacity are automatically extracted from the
|
|
1367
|
+
* SVG content.
|
|
1374
1368
|
* @example <svg width="100" height="100"><circle cx="50" cy="50" r="40" fill="#3498db"/></svg>
|
|
1375
1369
|
*/
|
|
1376
1370
|
src: string;
|
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -122,7 +122,7 @@ exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
|
|
|
122
122
|
* flexibility with styling and layout. For example you can scale, position or crop a video without modifying the
|
|
123
123
|
* captions.
|
|
124
124
|
*
|
|
125
|
-
* To sync captions with a video or audio file use a [Video](#tocs_videoasset
|
|
125
|
+
* To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
|
|
126
126
|
* matching start and end time.
|
|
127
127
|
*
|
|
128
128
|
*/
|
|
@@ -1144,7 +1144,22 @@ exports.richcaptionassetRichCaptionAssetSchema = zod_1.z.object({
|
|
|
1144
1144
|
align: zod_1.z.optional(exports.richtextpropertiesRichTextAlignmentSchema),
|
|
1145
1145
|
active: zod_1.z.optional(exports.richcaptionpropertiesRichCaptionActiveSchema),
|
|
1146
1146
|
animation: zod_1.z.optional(exports.richcaptionpropertiesRichCaptionAnimationSchema)
|
|
1147
|
-
}).strict()
|
|
1147
|
+
}).strict().superRefine((data, ctx) => {
|
|
1148
|
+
if (data.src) {
|
|
1149
|
+
try {
|
|
1150
|
+
const pathname = new URL(data.src).pathname.toLowerCase();
|
|
1151
|
+
const mediaExts = [".m4a", ".mp3", ".wav", ".aac", ".ogg", ".flac", ".wma", ".mp4", ".mov", ".avi", ".mkv", ".webm", ".wmv", ".flv", ".3gp"];
|
|
1152
|
+
if (mediaExts.some((ext) => pathname.endsWith(ext))) {
|
|
1153
|
+
ctx.addIssue({
|
|
1154
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
1155
|
+
message: "src must point to a subtitle file (SRT or VTT). Audio and video files are not supported as src. Use the words array to provide word timings directly.",
|
|
1156
|
+
path: ["src"],
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
catch { }
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1148
1163
|
exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema;
|
|
1149
1164
|
/**
|
|
1150
1165
|
* Font properties for rich text.
|
|
@@ -1628,13 +1643,6 @@ exports.soundtrackSchema = exports.soundtrackSoundtrackSchema;
|
|
|
1628
1643
|
/**
|
|
1629
1644
|
* The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.
|
|
1630
1645
|
*
|
|
1631
|
-
* ```json
|
|
1632
|
-
* {
|
|
1633
|
-
* "type": "svg",
|
|
1634
|
-
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
|
|
1635
|
-
* }
|
|
1636
|
-
* ```
|
|
1637
|
-
*
|
|
1638
1646
|
* **Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,
|
|
1639
1647
|
* `<line>`, `<polygon>`, `<polyline>`
|
|
1640
1648
|
*
|