@shotstack/schemas 1.3.5 → 1.3.8
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 +836 -0
- package/dist/schema.d.ts +633 -1
- package/dist/zod/zod.gen.cjs +414 -121
- package/dist/zod/zod.gen.d.ts +8009 -3776
- package/dist/zod/zod.gen.js +410 -118
- package/dist/zod/zod.gen.ts +454 -118
- package/package.json +1 -1
package/dist/api.bundled.json
CHANGED
|
@@ -1193,6 +1193,7 @@
|
|
|
1193
1193
|
"html": "#/components/schemas/HtmlAsset",
|
|
1194
1194
|
"title": "#/components/schemas/TitleAsset",
|
|
1195
1195
|
"shape": "#/components/schemas/ShapeAsset",
|
|
1196
|
+
"svg": "#/components/schemas/SvgAsset",
|
|
1196
1197
|
"text-to-image": "#/components/schemas/TextToImageAsset",
|
|
1197
1198
|
"image-to-video": "#/components/schemas/ImageToVideoAsset"
|
|
1198
1199
|
}
|
|
@@ -1228,6 +1229,9 @@
|
|
|
1228
1229
|
{
|
|
1229
1230
|
"$ref": "#/components/schemas/ShapeAsset"
|
|
1230
1231
|
},
|
|
1232
|
+
{
|
|
1233
|
+
"$ref": "#/components/schemas/SvgAsset"
|
|
1234
|
+
},
|
|
1231
1235
|
{
|
|
1232
1236
|
"$ref": "#/components/schemas/TextToImageAsset"
|
|
1233
1237
|
},
|
|
@@ -2051,6 +2055,838 @@
|
|
|
2051
2055
|
"text"
|
|
2052
2056
|
]
|
|
2053
2057
|
},
|
|
2058
|
+
"SvgAsset": {
|
|
2059
|
+
"description": "The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.\nIt provides a comprehensive set of primitive shapes and custom paths with full\nstyling support including fills, strokes, gradients, and shadows.\n\n**Available Shapes:**\n- `rectangle` - Rectangles with optional rounded corners\n- `circle` - Perfect circles\n- `ellipse` - Ellipses/ovals with separate x and y radii\n- `line` - Straight lines with configurable thickness\n- `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)\n- `star` - Multi-pointed stars\n- `arrow` - Directional arrows\n- `heart` - Heart shapes\n- `cross` - Plus/cross shapes\n- `ring` - Donut/ring shapes\n- `path` - Custom shapes using SVG path data\n\n**Styling Options:**\n- Fill with solid colors or linear/radial gradients\n- Stroke with configurable width, color, dash patterns, and line caps/joins\n- Drop shadows with blur, offset, and opacity\n- Transform properties for positioning, rotation, and scaling\n\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.\n",
|
|
2060
|
+
"type": "object",
|
|
2061
|
+
"properties": {
|
|
2062
|
+
"type": {
|
|
2063
|
+
"description": "The asset type - set to `svg` for SVG shapes.",
|
|
2064
|
+
"type": "string",
|
|
2065
|
+
"enum": [
|
|
2066
|
+
"svg"
|
|
2067
|
+
],
|
|
2068
|
+
"default": "svg",
|
|
2069
|
+
"example": "svg"
|
|
2070
|
+
},
|
|
2071
|
+
"shape": {
|
|
2072
|
+
"description": "The shape definition. The `type` property within determines the shape kind\nand its specific properties. See individual shape documentation for details.\n",
|
|
2073
|
+
"$ref": "#/components/schemas/SvgShape"
|
|
2074
|
+
},
|
|
2075
|
+
"fill": {
|
|
2076
|
+
"description": "Fill properties for the shape interior.\nCan be a solid color or a gradient (linear/radial).\nIf omitted, the shape will have no fill (transparent interior).\n",
|
|
2077
|
+
"$ref": "#/components/schemas/SvgFill"
|
|
2078
|
+
},
|
|
2079
|
+
"stroke": {
|
|
2080
|
+
"description": "Stroke (outline) properties for the shape.\nIf omitted, the shape will have no stroke (no outline).\n",
|
|
2081
|
+
"$ref": "#/components/schemas/SvgStroke"
|
|
2082
|
+
},
|
|
2083
|
+
"shadow": {
|
|
2084
|
+
"description": "Drop shadow properties for the shape.\nCreates a shadow effect behind the shape.\n",
|
|
2085
|
+
"$ref": "#/components/schemas/SvgShadow"
|
|
2086
|
+
},
|
|
2087
|
+
"transform": {
|
|
2088
|
+
"description": "Transform properties for positioning, rotating, and scaling the shape.\nThe transform is applied relative to the transformation origin.\n",
|
|
2089
|
+
"$ref": "#/components/schemas/SvgTransform"
|
|
2090
|
+
},
|
|
2091
|
+
"opacity": {
|
|
2092
|
+
"description": "The overall opacity of the entire shape (including fill, stroke, and shadow).\n`1` is fully opaque, `0` is fully transparent.\nThis is applied on top of individual fill/stroke/shadow opacity values.\n",
|
|
2093
|
+
"type": "number",
|
|
2094
|
+
"minimum": 0,
|
|
2095
|
+
"maximum": 1,
|
|
2096
|
+
"default": 1,
|
|
2097
|
+
"example": 1
|
|
2098
|
+
},
|
|
2099
|
+
"width": {
|
|
2100
|
+
"description": "The width of the bounding box in pixels.\nIf specified, the shape may be scaled to fit within this width.\nIf omitted, the shape uses its natural dimensions.\n",
|
|
2101
|
+
"type": "integer",
|
|
2102
|
+
"minimum": 1,
|
|
2103
|
+
"maximum": 4096,
|
|
2104
|
+
"example": 400
|
|
2105
|
+
},
|
|
2106
|
+
"height": {
|
|
2107
|
+
"description": "The height of the bounding box in pixels.\nIf specified, the shape may be scaled to fit within this height.\nIf omitted, the shape uses its natural dimensions.\n",
|
|
2108
|
+
"type": "integer",
|
|
2109
|
+
"minimum": 1,
|
|
2110
|
+
"maximum": 4096,
|
|
2111
|
+
"example": 300
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
"required": [
|
|
2115
|
+
"type",
|
|
2116
|
+
"shape"
|
|
2117
|
+
],
|
|
2118
|
+
"example": {
|
|
2119
|
+
"type": "svg",
|
|
2120
|
+
"shape": {
|
|
2121
|
+
"type": "star",
|
|
2122
|
+
"points": 5,
|
|
2123
|
+
"outerRadius": 100,
|
|
2124
|
+
"innerRadius": 50
|
|
2125
|
+
},
|
|
2126
|
+
"fill": {
|
|
2127
|
+
"type": "linear",
|
|
2128
|
+
"angle": 45,
|
|
2129
|
+
"stops": [
|
|
2130
|
+
{
|
|
2131
|
+
"offset": 0,
|
|
2132
|
+
"color": "#FFD700"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
"offset": 1,
|
|
2136
|
+
"color": "#FF6B6B"
|
|
2137
|
+
}
|
|
2138
|
+
],
|
|
2139
|
+
"opacity": 1
|
|
2140
|
+
},
|
|
2141
|
+
"stroke": {
|
|
2142
|
+
"color": "#2C3E50",
|
|
2143
|
+
"width": 3,
|
|
2144
|
+
"opacity": 1,
|
|
2145
|
+
"lineCap": "round",
|
|
2146
|
+
"lineJoin": "round"
|
|
2147
|
+
},
|
|
2148
|
+
"transform": {
|
|
2149
|
+
"x": 200,
|
|
2150
|
+
"y": 150,
|
|
2151
|
+
"rotation": 0,
|
|
2152
|
+
"scale": 1
|
|
2153
|
+
},
|
|
2154
|
+
"opacity": 1
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2157
|
+
"SvgShape": {
|
|
2158
|
+
"description": "The shape definition for an SVG asset. Each shape type has its own specific\nproperties. The `type` field determines which shape is rendered.\n",
|
|
2159
|
+
"oneOf": [
|
|
2160
|
+
{
|
|
2161
|
+
"$ref": "#/components/schemas/SvgRectangleShape"
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
"$ref": "#/components/schemas/SvgCircleShape"
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
"$ref": "#/components/schemas/SvgEllipseShape"
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"$ref": "#/components/schemas/SvgLineShape"
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
"$ref": "#/components/schemas/SvgPolygonShape"
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
"$ref": "#/components/schemas/SvgStarShape"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
"$ref": "#/components/schemas/SvgArrowShape"
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
"$ref": "#/components/schemas/SvgHeartShape"
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"$ref": "#/components/schemas/SvgCrossShape"
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
"$ref": "#/components/schemas/SvgRingShape"
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
"$ref": "#/components/schemas/SvgPathShape"
|
|
2192
|
+
}
|
|
2193
|
+
],
|
|
2194
|
+
"discriminator": {
|
|
2195
|
+
"propertyName": "type",
|
|
2196
|
+
"mapping": {
|
|
2197
|
+
"rectangle": "#/components/schemas/SvgRectangleShape",
|
|
2198
|
+
"circle": "#/components/schemas/SvgCircleShape",
|
|
2199
|
+
"ellipse": "#/components/schemas/SvgEllipseShape",
|
|
2200
|
+
"line": "#/components/schemas/SvgLineShape",
|
|
2201
|
+
"polygon": "#/components/schemas/SvgPolygonShape",
|
|
2202
|
+
"star": "#/components/schemas/SvgStarShape",
|
|
2203
|
+
"arrow": "#/components/schemas/SvgArrowShape",
|
|
2204
|
+
"heart": "#/components/schemas/SvgHeartShape",
|
|
2205
|
+
"cross": "#/components/schemas/SvgCrossShape",
|
|
2206
|
+
"ring": "#/components/schemas/SvgRingShape",
|
|
2207
|
+
"path": "#/components/schemas/SvgPathShape"
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
},
|
|
2211
|
+
"SvgRectangleShape": {
|
|
2212
|
+
"description": "A rectangle shape with optional rounded corners.\nThe rectangle is defined by its width and height dimensions.\n",
|
|
2213
|
+
"type": "object",
|
|
2214
|
+
"properties": {
|
|
2215
|
+
"type": {
|
|
2216
|
+
"description": "The shape type - set to `rectangle`.",
|
|
2217
|
+
"type": "string",
|
|
2218
|
+
"enum": [
|
|
2219
|
+
"rectangle"
|
|
2220
|
+
]
|
|
2221
|
+
},
|
|
2222
|
+
"width": {
|
|
2223
|
+
"description": "The width of the rectangle in pixels.",
|
|
2224
|
+
"type": "number",
|
|
2225
|
+
"minimum": 1,
|
|
2226
|
+
"maximum": 4096,
|
|
2227
|
+
"example": 200
|
|
2228
|
+
},
|
|
2229
|
+
"height": {
|
|
2230
|
+
"description": "The height of the rectangle in pixels.",
|
|
2231
|
+
"type": "number",
|
|
2232
|
+
"minimum": 1,
|
|
2233
|
+
"maximum": 4096,
|
|
2234
|
+
"example": 100
|
|
2235
|
+
},
|
|
2236
|
+
"cornerRadius": {
|
|
2237
|
+
"description": "The corner radius for rounded corners in pixels.\nSet to `0` for sharp corners. The radius is automatically clamped\nto half of the smallest dimension.\n",
|
|
2238
|
+
"type": "number",
|
|
2239
|
+
"minimum": 0,
|
|
2240
|
+
"maximum": 2048,
|
|
2241
|
+
"default": 0,
|
|
2242
|
+
"example": 10
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
"required": [
|
|
2246
|
+
"type",
|
|
2247
|
+
"width",
|
|
2248
|
+
"height"
|
|
2249
|
+
]
|
|
2250
|
+
},
|
|
2251
|
+
"SvgCircleShape": {
|
|
2252
|
+
"description": "A perfect circle shape defined by its radius.\nThe circle is centered at the shape's position.\n",
|
|
2253
|
+
"type": "object",
|
|
2254
|
+
"properties": {
|
|
2255
|
+
"type": {
|
|
2256
|
+
"description": "The shape type - set to `circle`.",
|
|
2257
|
+
"type": "string",
|
|
2258
|
+
"enum": [
|
|
2259
|
+
"circle"
|
|
2260
|
+
]
|
|
2261
|
+
},
|
|
2262
|
+
"radius": {
|
|
2263
|
+
"description": "The radius of the circle in pixels.",
|
|
2264
|
+
"type": "number",
|
|
2265
|
+
"minimum": 1,
|
|
2266
|
+
"maximum": 2048,
|
|
2267
|
+
"example": 50
|
|
2268
|
+
}
|
|
2269
|
+
},
|
|
2270
|
+
"required": [
|
|
2271
|
+
"type",
|
|
2272
|
+
"radius"
|
|
2273
|
+
]
|
|
2274
|
+
},
|
|
2275
|
+
"SvgEllipseShape": {
|
|
2276
|
+
"description": "An ellipse (oval) shape with separate horizontal and vertical radii.\nThe ellipse is centered at the shape's position.\n",
|
|
2277
|
+
"type": "object",
|
|
2278
|
+
"properties": {
|
|
2279
|
+
"type": {
|
|
2280
|
+
"description": "The shape type - set to `ellipse`.",
|
|
2281
|
+
"type": "string",
|
|
2282
|
+
"enum": [
|
|
2283
|
+
"ellipse"
|
|
2284
|
+
]
|
|
2285
|
+
},
|
|
2286
|
+
"radiusX": {
|
|
2287
|
+
"description": "The horizontal radius (semi-major axis) in pixels.",
|
|
2288
|
+
"type": "number",
|
|
2289
|
+
"minimum": 1,
|
|
2290
|
+
"maximum": 2048,
|
|
2291
|
+
"example": 80
|
|
2292
|
+
},
|
|
2293
|
+
"radiusY": {
|
|
2294
|
+
"description": "The vertical radius (semi-minor axis) in pixels.",
|
|
2295
|
+
"type": "number",
|
|
2296
|
+
"minimum": 1,
|
|
2297
|
+
"maximum": 2048,
|
|
2298
|
+
"example": 50
|
|
2299
|
+
}
|
|
2300
|
+
},
|
|
2301
|
+
"required": [
|
|
2302
|
+
"type",
|
|
2303
|
+
"radiusX",
|
|
2304
|
+
"radiusY"
|
|
2305
|
+
]
|
|
2306
|
+
},
|
|
2307
|
+
"SvgLineShape": {
|
|
2308
|
+
"description": "A straight line shape with a specified length and thickness.\nThe line is drawn horizontally by default and can be rotated using transform.\n",
|
|
2309
|
+
"type": "object",
|
|
2310
|
+
"properties": {
|
|
2311
|
+
"type": {
|
|
2312
|
+
"description": "The shape type - set to `line`.",
|
|
2313
|
+
"type": "string",
|
|
2314
|
+
"enum": [
|
|
2315
|
+
"line"
|
|
2316
|
+
]
|
|
2317
|
+
},
|
|
2318
|
+
"length": {
|
|
2319
|
+
"description": "The length of the line in pixels.",
|
|
2320
|
+
"type": "number",
|
|
2321
|
+
"minimum": 1,
|
|
2322
|
+
"maximum": 4096,
|
|
2323
|
+
"example": 100
|
|
2324
|
+
},
|
|
2325
|
+
"thickness": {
|
|
2326
|
+
"description": "The thickness of the line in pixels.",
|
|
2327
|
+
"type": "number",
|
|
2328
|
+
"minimum": 1,
|
|
2329
|
+
"maximum": 500,
|
|
2330
|
+
"example": 4
|
|
2331
|
+
}
|
|
2332
|
+
},
|
|
2333
|
+
"required": [
|
|
2334
|
+
"type",
|
|
2335
|
+
"length",
|
|
2336
|
+
"thickness"
|
|
2337
|
+
]
|
|
2338
|
+
},
|
|
2339
|
+
"SvgPolygonShape": {
|
|
2340
|
+
"description": "A regular polygon shape with a specified number of sides.\nExamples: triangle (3), square (4), pentagon (5), hexagon (6), etc.\nThe polygon is inscribed in a circle of the given radius.\n",
|
|
2341
|
+
"type": "object",
|
|
2342
|
+
"properties": {
|
|
2343
|
+
"type": {
|
|
2344
|
+
"description": "The shape type - set to `polygon`.",
|
|
2345
|
+
"type": "string",
|
|
2346
|
+
"enum": [
|
|
2347
|
+
"polygon"
|
|
2348
|
+
]
|
|
2349
|
+
},
|
|
2350
|
+
"sides": {
|
|
2351
|
+
"description": "The number of sides of the polygon.\nMinimum 3 (triangle), maximum 100 for practical use.\n",
|
|
2352
|
+
"type": "integer",
|
|
2353
|
+
"minimum": 3,
|
|
2354
|
+
"maximum": 100,
|
|
2355
|
+
"example": 6
|
|
2356
|
+
},
|
|
2357
|
+
"radius": {
|
|
2358
|
+
"description": "The radius of the circumscribed circle in pixels.\nThis determines the size of the polygon.\n",
|
|
2359
|
+
"type": "number",
|
|
2360
|
+
"minimum": 1,
|
|
2361
|
+
"maximum": 2048,
|
|
2362
|
+
"example": 50
|
|
2363
|
+
}
|
|
2364
|
+
},
|
|
2365
|
+
"required": [
|
|
2366
|
+
"type",
|
|
2367
|
+
"sides",
|
|
2368
|
+
"radius"
|
|
2369
|
+
]
|
|
2370
|
+
},
|
|
2371
|
+
"SvgStarShape": {
|
|
2372
|
+
"description": "A star shape with a specified number of points.\nThe star is defined by outer and inner radii, creating the characteristic\npointed appearance.\n",
|
|
2373
|
+
"type": "object",
|
|
2374
|
+
"properties": {
|
|
2375
|
+
"type": {
|
|
2376
|
+
"description": "The shape type - set to `star`.",
|
|
2377
|
+
"type": "string",
|
|
2378
|
+
"enum": [
|
|
2379
|
+
"star"
|
|
2380
|
+
]
|
|
2381
|
+
},
|
|
2382
|
+
"points": {
|
|
2383
|
+
"description": "The number of points on the star.\nMinimum 3 for a triangle-like star, typically 5 for a classic star.\n",
|
|
2384
|
+
"type": "integer",
|
|
2385
|
+
"minimum": 3,
|
|
2386
|
+
"maximum": 100,
|
|
2387
|
+
"example": 5
|
|
2388
|
+
},
|
|
2389
|
+
"outerRadius": {
|
|
2390
|
+
"description": "The outer radius in pixels - the distance from center to the tips of the points.\n",
|
|
2391
|
+
"type": "number",
|
|
2392
|
+
"minimum": 1,
|
|
2393
|
+
"maximum": 2048,
|
|
2394
|
+
"example": 50
|
|
2395
|
+
},
|
|
2396
|
+
"innerRadius": {
|
|
2397
|
+
"description": "The inner radius in pixels - the distance from center to the inner vertices.\nShould be smaller than outerRadius for a star effect.\n",
|
|
2398
|
+
"type": "number",
|
|
2399
|
+
"minimum": 1,
|
|
2400
|
+
"maximum": 2048,
|
|
2401
|
+
"example": 25
|
|
2402
|
+
}
|
|
2403
|
+
},
|
|
2404
|
+
"required": [
|
|
2405
|
+
"type",
|
|
2406
|
+
"points",
|
|
2407
|
+
"outerRadius",
|
|
2408
|
+
"innerRadius"
|
|
2409
|
+
]
|
|
2410
|
+
},
|
|
2411
|
+
"SvgArrowShape": {
|
|
2412
|
+
"description": "An arrow shape pointing to the right by default.\nUse transform rotation to change direction.\n",
|
|
2413
|
+
"type": "object",
|
|
2414
|
+
"properties": {
|
|
2415
|
+
"type": {
|
|
2416
|
+
"description": "The shape type - set to `arrow`.",
|
|
2417
|
+
"type": "string",
|
|
2418
|
+
"enum": [
|
|
2419
|
+
"arrow"
|
|
2420
|
+
]
|
|
2421
|
+
},
|
|
2422
|
+
"length": {
|
|
2423
|
+
"description": "The total length of the arrow from tail to tip in pixels.",
|
|
2424
|
+
"type": "number",
|
|
2425
|
+
"minimum": 1,
|
|
2426
|
+
"maximum": 4096,
|
|
2427
|
+
"example": 100
|
|
2428
|
+
},
|
|
2429
|
+
"headWidth": {
|
|
2430
|
+
"description": "The width of the arrow head (the widest part) in pixels.",
|
|
2431
|
+
"type": "number",
|
|
2432
|
+
"minimum": 1,
|
|
2433
|
+
"maximum": 1000,
|
|
2434
|
+
"example": 40
|
|
2435
|
+
},
|
|
2436
|
+
"headLength": {
|
|
2437
|
+
"description": "The length of the arrow head portion in pixels.",
|
|
2438
|
+
"type": "number",
|
|
2439
|
+
"minimum": 1,
|
|
2440
|
+
"maximum": 1000,
|
|
2441
|
+
"example": 30
|
|
2442
|
+
},
|
|
2443
|
+
"shaftWidth": {
|
|
2444
|
+
"description": "The width of the arrow shaft (body) in pixels.",
|
|
2445
|
+
"type": "number",
|
|
2446
|
+
"minimum": 1,
|
|
2447
|
+
"maximum": 1000,
|
|
2448
|
+
"example": 20
|
|
2449
|
+
}
|
|
2450
|
+
},
|
|
2451
|
+
"required": [
|
|
2452
|
+
"type",
|
|
2453
|
+
"length",
|
|
2454
|
+
"headWidth",
|
|
2455
|
+
"headLength",
|
|
2456
|
+
"shaftWidth"
|
|
2457
|
+
]
|
|
2458
|
+
},
|
|
2459
|
+
"SvgHeartShape": {
|
|
2460
|
+
"description": "A heart shape commonly used for love/like icons.\nThe heart is defined by a single size parameter.\n",
|
|
2461
|
+
"type": "object",
|
|
2462
|
+
"properties": {
|
|
2463
|
+
"type": {
|
|
2464
|
+
"description": "The shape type - set to `heart`.",
|
|
2465
|
+
"type": "string",
|
|
2466
|
+
"enum": [
|
|
2467
|
+
"heart"
|
|
2468
|
+
]
|
|
2469
|
+
},
|
|
2470
|
+
"size": {
|
|
2471
|
+
"description": "The size of the heart in pixels.\nThis determines both the width and height proportionally.\n",
|
|
2472
|
+
"type": "number",
|
|
2473
|
+
"minimum": 1,
|
|
2474
|
+
"maximum": 4096,
|
|
2475
|
+
"example": 100
|
|
2476
|
+
}
|
|
2477
|
+
},
|
|
2478
|
+
"required": [
|
|
2479
|
+
"type",
|
|
2480
|
+
"size"
|
|
2481
|
+
]
|
|
2482
|
+
},
|
|
2483
|
+
"SvgCrossShape": {
|
|
2484
|
+
"description": "A cross or plus shape with equal or different arm lengths.\nCan be styled as a plus sign (+) or a cross (x with rotation).\n",
|
|
2485
|
+
"type": "object",
|
|
2486
|
+
"properties": {
|
|
2487
|
+
"type": {
|
|
2488
|
+
"description": "The shape type - set to `cross`.",
|
|
2489
|
+
"type": "string",
|
|
2490
|
+
"enum": [
|
|
2491
|
+
"cross"
|
|
2492
|
+
]
|
|
2493
|
+
},
|
|
2494
|
+
"width": {
|
|
2495
|
+
"description": "The total width of the cross in pixels.",
|
|
2496
|
+
"type": "number",
|
|
2497
|
+
"minimum": 1,
|
|
2498
|
+
"maximum": 4096,
|
|
2499
|
+
"example": 100
|
|
2500
|
+
},
|
|
2501
|
+
"height": {
|
|
2502
|
+
"description": "The total height of the cross in pixels.",
|
|
2503
|
+
"type": "number",
|
|
2504
|
+
"minimum": 1,
|
|
2505
|
+
"maximum": 4096,
|
|
2506
|
+
"example": 100
|
|
2507
|
+
},
|
|
2508
|
+
"thickness": {
|
|
2509
|
+
"description": "The thickness of the cross arms in pixels.",
|
|
2510
|
+
"type": "number",
|
|
2511
|
+
"minimum": 1,
|
|
2512
|
+
"maximum": 500,
|
|
2513
|
+
"example": 20
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
"required": [
|
|
2517
|
+
"type",
|
|
2518
|
+
"width",
|
|
2519
|
+
"height",
|
|
2520
|
+
"thickness"
|
|
2521
|
+
]
|
|
2522
|
+
},
|
|
2523
|
+
"SvgRingShape": {
|
|
2524
|
+
"description": "A ring (donut/annulus) shape - a circle with a circular hole in the center.\nThe ring is defined by outer and inner radii.\n",
|
|
2525
|
+
"type": "object",
|
|
2526
|
+
"properties": {
|
|
2527
|
+
"type": {
|
|
2528
|
+
"description": "The shape type - set to `ring`.",
|
|
2529
|
+
"type": "string",
|
|
2530
|
+
"enum": [
|
|
2531
|
+
"ring"
|
|
2532
|
+
]
|
|
2533
|
+
},
|
|
2534
|
+
"outerRadius": {
|
|
2535
|
+
"description": "The outer radius of the ring in pixels.",
|
|
2536
|
+
"type": "number",
|
|
2537
|
+
"minimum": 1,
|
|
2538
|
+
"maximum": 2048,
|
|
2539
|
+
"example": 50
|
|
2540
|
+
},
|
|
2541
|
+
"innerRadius": {
|
|
2542
|
+
"description": "The inner radius (hole) of the ring in pixels.\nMust be smaller than outerRadius.\n",
|
|
2543
|
+
"type": "number",
|
|
2544
|
+
"minimum": 0,
|
|
2545
|
+
"maximum": 2048,
|
|
2546
|
+
"example": 30
|
|
2547
|
+
}
|
|
2548
|
+
},
|
|
2549
|
+
"required": [
|
|
2550
|
+
"type",
|
|
2551
|
+
"outerRadius",
|
|
2552
|
+
"innerRadius"
|
|
2553
|
+
]
|
|
2554
|
+
},
|
|
2555
|
+
"SvgPathShape": {
|
|
2556
|
+
"description": "A custom shape defined by SVG path data.\nSupports all standard SVG path commands for creating complex shapes.\n\n**Path Commands:**\n- `M x y` / `m dx dy` - Move to (absolute/relative)\n- `L x y` / `l dx dy` - Line to\n- `H x` / `h dx` - Horizontal line to\n- `V y` / `v dy` - Vertical line to\n- `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve\n- `S x2 y2 x y` / `s` - Smooth cubic Bezier\n- `Q x1 y1 x y` / `q` - Quadratic Bezier curve\n- `T x y` / `t` - Smooth quadratic Bezier\n- `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc\n- `Z` / `z` - Close path\n",
|
|
2557
|
+
"type": "object",
|
|
2558
|
+
"properties": {
|
|
2559
|
+
"type": {
|
|
2560
|
+
"description": "The shape type - set to `path`.",
|
|
2561
|
+
"type": "string",
|
|
2562
|
+
"enum": [
|
|
2563
|
+
"path"
|
|
2564
|
+
]
|
|
2565
|
+
},
|
|
2566
|
+
"d": {
|
|
2567
|
+
"description": "The SVG path data string defining the shape.\nUses standard SVG path commands (M, L, C, Q, A, Z, etc.).\nExample: `M 0 0 L 100 0 L 100 100 L 0 100 Z` draws a square.\n",
|
|
2568
|
+
"type": "string",
|
|
2569
|
+
"minLength": 1,
|
|
2570
|
+
"maxLength": 100000,
|
|
2571
|
+
"example": "M 0 0 L 100 0 L 50 86.6 Z"
|
|
2572
|
+
}
|
|
2573
|
+
},
|
|
2574
|
+
"required": [
|
|
2575
|
+
"type",
|
|
2576
|
+
"d"
|
|
2577
|
+
]
|
|
2578
|
+
},
|
|
2579
|
+
"SvgFill": {
|
|
2580
|
+
"description": "Fill properties for SVG shapes. Supports solid colors and gradients.\nThe fill defines how the interior of a shape is painted.\n",
|
|
2581
|
+
"oneOf": [
|
|
2582
|
+
{
|
|
2583
|
+
"$ref": "#/components/schemas/SvgSolidFill"
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"$ref": "#/components/schemas/SvgLinearGradientFill"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
"$ref": "#/components/schemas/SvgRadialGradientFill"
|
|
2590
|
+
}
|
|
2591
|
+
],
|
|
2592
|
+
"discriminator": {
|
|
2593
|
+
"propertyName": "type",
|
|
2594
|
+
"mapping": {
|
|
2595
|
+
"solid": "#/components/schemas/SvgSolidFill",
|
|
2596
|
+
"linear": "#/components/schemas/SvgLinearGradientFill",
|
|
2597
|
+
"radial": "#/components/schemas/SvgRadialGradientFill"
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
"SvgSolidFill": {
|
|
2602
|
+
"description": "A solid color fill for SVG shapes.",
|
|
2603
|
+
"type": "object",
|
|
2604
|
+
"properties": {
|
|
2605
|
+
"type": {
|
|
2606
|
+
"description": "The fill type - set to `solid` for a single color fill.",
|
|
2607
|
+
"type": "string",
|
|
2608
|
+
"enum": [
|
|
2609
|
+
"solid"
|
|
2610
|
+
],
|
|
2611
|
+
"default": "solid"
|
|
2612
|
+
},
|
|
2613
|
+
"color": {
|
|
2614
|
+
"description": "The fill color using hexadecimal color notation (e.g., `#FF0000` for red).\nMust be a 6-digit hex color code prefixed with `#`.\n",
|
|
2615
|
+
"type": "string",
|
|
2616
|
+
"pattern": "^#[A-Fa-f0-9]{6}$",
|
|
2617
|
+
"default": "#000000",
|
|
2618
|
+
"example": "#3498db"
|
|
2619
|
+
},
|
|
2620
|
+
"opacity": {
|
|
2621
|
+
"description": "The opacity of the fill where `1` is fully opaque and `0` is fully transparent.\nValues between 0 and 1 create semi-transparent fills.\n",
|
|
2622
|
+
"type": "number",
|
|
2623
|
+
"minimum": 0,
|
|
2624
|
+
"maximum": 1,
|
|
2625
|
+
"default": 1,
|
|
2626
|
+
"example": 0.8
|
|
2627
|
+
}
|
|
2628
|
+
},
|
|
2629
|
+
"required": [
|
|
2630
|
+
"type",
|
|
2631
|
+
"color"
|
|
2632
|
+
]
|
|
2633
|
+
},
|
|
2634
|
+
"SvgLinearGradientFill": {
|
|
2635
|
+
"description": "A linear gradient fill that transitions colors along a straight line.\nThe gradient direction is controlled by the `angle` property.\n",
|
|
2636
|
+
"type": "object",
|
|
2637
|
+
"properties": {
|
|
2638
|
+
"type": {
|
|
2639
|
+
"description": "The fill type - set to `linear` for a linear gradient fill.",
|
|
2640
|
+
"type": "string",
|
|
2641
|
+
"enum": [
|
|
2642
|
+
"linear"
|
|
2643
|
+
]
|
|
2644
|
+
},
|
|
2645
|
+
"angle": {
|
|
2646
|
+
"description": "The angle of the gradient in degrees. `0` is horizontal (left to right),\n`90` is vertical (bottom to top), `180` is right to left, etc.\n",
|
|
2647
|
+
"type": "number",
|
|
2648
|
+
"minimum": 0,
|
|
2649
|
+
"maximum": 360,
|
|
2650
|
+
"default": 0,
|
|
2651
|
+
"example": 45
|
|
2652
|
+
},
|
|
2653
|
+
"stops": {
|
|
2654
|
+
"description": "Array of color stops that define the gradient colors and their positions.\nMust have at least 2 stops. Offsets should increase from 0 to 1.\n",
|
|
2655
|
+
"type": "array",
|
|
2656
|
+
"minItems": 2,
|
|
2657
|
+
"items": {
|
|
2658
|
+
"$ref": "#/components/schemas/SvgGradientStop"
|
|
2659
|
+
}
|
|
2660
|
+
},
|
|
2661
|
+
"opacity": {
|
|
2662
|
+
"description": "The overall opacity of the gradient where `1` is fully opaque and `0` is fully transparent.\n",
|
|
2663
|
+
"type": "number",
|
|
2664
|
+
"minimum": 0,
|
|
2665
|
+
"maximum": 1,
|
|
2666
|
+
"default": 1,
|
|
2667
|
+
"example": 1
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
"required": [
|
|
2671
|
+
"type",
|
|
2672
|
+
"stops"
|
|
2673
|
+
]
|
|
2674
|
+
},
|
|
2675
|
+
"SvgRadialGradientFill": {
|
|
2676
|
+
"description": "A radial gradient fill that transitions colors radiating outward from a center point.\nThe gradient creates a circular or elliptical color transition.\n",
|
|
2677
|
+
"type": "object",
|
|
2678
|
+
"properties": {
|
|
2679
|
+
"type": {
|
|
2680
|
+
"description": "The fill type - set to `radial` for a radial gradient fill.",
|
|
2681
|
+
"type": "string",
|
|
2682
|
+
"enum": [
|
|
2683
|
+
"radial"
|
|
2684
|
+
]
|
|
2685
|
+
},
|
|
2686
|
+
"stops": {
|
|
2687
|
+
"description": "Array of color stops that define the gradient colors and their positions.\nMust have at least 2 stops. Offset `0` is the center, `1` is the outer edge.\n",
|
|
2688
|
+
"type": "array",
|
|
2689
|
+
"minItems": 2,
|
|
2690
|
+
"items": {
|
|
2691
|
+
"$ref": "#/components/schemas/SvgGradientStop"
|
|
2692
|
+
}
|
|
2693
|
+
},
|
|
2694
|
+
"opacity": {
|
|
2695
|
+
"description": "The overall opacity of the gradient where `1` is fully opaque and `0` is fully transparent.\n",
|
|
2696
|
+
"type": "number",
|
|
2697
|
+
"minimum": 0,
|
|
2698
|
+
"maximum": 1,
|
|
2699
|
+
"default": 1,
|
|
2700
|
+
"example": 1
|
|
2701
|
+
}
|
|
2702
|
+
},
|
|
2703
|
+
"required": [
|
|
2704
|
+
"type",
|
|
2705
|
+
"stops"
|
|
2706
|
+
]
|
|
2707
|
+
},
|
|
2708
|
+
"SvgGradientStop": {
|
|
2709
|
+
"description": "A color stop in a gradient. Each stop defines a color at a specific position\nalong the gradient vector. Gradients require at least 2 stops.\n",
|
|
2710
|
+
"type": "object",
|
|
2711
|
+
"properties": {
|
|
2712
|
+
"offset": {
|
|
2713
|
+
"description": "Position of the color stop along the gradient vector.\n`0` represents the start and `1` represents the end of the gradient.\n",
|
|
2714
|
+
"type": "number",
|
|
2715
|
+
"minimum": 0,
|
|
2716
|
+
"maximum": 1,
|
|
2717
|
+
"example": 0.5
|
|
2718
|
+
},
|
|
2719
|
+
"color": {
|
|
2720
|
+
"description": "The color at this stop using hexadecimal color notation.",
|
|
2721
|
+
"type": "string",
|
|
2722
|
+
"pattern": "^#[A-Fa-f0-9]{6}$",
|
|
2723
|
+
"example": "#e74c3c"
|
|
2724
|
+
}
|
|
2725
|
+
},
|
|
2726
|
+
"required": [
|
|
2727
|
+
"offset",
|
|
2728
|
+
"color"
|
|
2729
|
+
]
|
|
2730
|
+
},
|
|
2731
|
+
"SvgStroke": {
|
|
2732
|
+
"description": "Stroke (outline) properties for SVG shapes. The stroke defines how the outline\nof a shape is painted, including its color, width, and line style.\n",
|
|
2733
|
+
"type": "object",
|
|
2734
|
+
"properties": {
|
|
2735
|
+
"color": {
|
|
2736
|
+
"description": "The stroke color using hexadecimal color notation.",
|
|
2737
|
+
"type": "string",
|
|
2738
|
+
"pattern": "^#[A-Fa-f0-9]{6}$",
|
|
2739
|
+
"default": "#000000",
|
|
2740
|
+
"example": "#2c3e50"
|
|
2741
|
+
},
|
|
2742
|
+
"width": {
|
|
2743
|
+
"description": "The width of the stroke in pixels. Must be greater than 0.\nLarger values create thicker outlines.\n",
|
|
2744
|
+
"type": "number",
|
|
2745
|
+
"minimum": 0,
|
|
2746
|
+
"maximum": 100,
|
|
2747
|
+
"default": 1,
|
|
2748
|
+
"example": 2
|
|
2749
|
+
},
|
|
2750
|
+
"opacity": {
|
|
2751
|
+
"description": "The opacity of the stroke where `1` is opaque and `0` is transparent.",
|
|
2752
|
+
"type": "number",
|
|
2753
|
+
"minimum": 0,
|
|
2754
|
+
"maximum": 1,
|
|
2755
|
+
"default": 1,
|
|
2756
|
+
"example": 1
|
|
2757
|
+
},
|
|
2758
|
+
"lineCap": {
|
|
2759
|
+
"description": "The shape at the end of open paths (lines, polylines, unclosed paths).\n<ul>\n <li>`butt` - flat edge perpendicular to the line (default)</li>\n <li>`round` - semicircular cap extending beyond the endpoint</li>\n <li>`square` - rectangular cap extending beyond the endpoint</li>\n</ul>\n",
|
|
2760
|
+
"type": "string",
|
|
2761
|
+
"enum": [
|
|
2762
|
+
"butt",
|
|
2763
|
+
"round",
|
|
2764
|
+
"square"
|
|
2765
|
+
],
|
|
2766
|
+
"default": "butt",
|
|
2767
|
+
"example": "round"
|
|
2768
|
+
},
|
|
2769
|
+
"lineJoin": {
|
|
2770
|
+
"description": "The shape at the corners where two lines meet.\n<ul>\n <li>`miter` - sharp corner (default)</li>\n <li>`round` - rounded corner</li>\n <li>`bevel` - flattened corner</li>\n</ul>\n",
|
|
2771
|
+
"type": "string",
|
|
2772
|
+
"enum": [
|
|
2773
|
+
"miter",
|
|
2774
|
+
"round",
|
|
2775
|
+
"bevel"
|
|
2776
|
+
],
|
|
2777
|
+
"default": "miter",
|
|
2778
|
+
"example": "round"
|
|
2779
|
+
},
|
|
2780
|
+
"dashArray": {
|
|
2781
|
+
"description": "Pattern of dashes and gaps for the stroke. An array of numbers where\nodd indices are dash lengths and even indices are gap lengths.\nFor example, `[10, 5]` creates 10px dashes with 5px gaps.\n`[10, 5, 2, 5]` creates alternating 10px and 2px dashes with 5px gaps.\n",
|
|
2782
|
+
"type": "array",
|
|
2783
|
+
"items": {
|
|
2784
|
+
"type": "number",
|
|
2785
|
+
"minimum": 0
|
|
2786
|
+
},
|
|
2787
|
+
"example": [
|
|
2788
|
+
10,
|
|
2789
|
+
5
|
|
2790
|
+
]
|
|
2791
|
+
},
|
|
2792
|
+
"dashOffset": {
|
|
2793
|
+
"description": "Offset for the dash pattern. Positive values shift the pattern\nforward along the path, negative values shift it backward.\n",
|
|
2794
|
+
"type": "number",
|
|
2795
|
+
"default": 0,
|
|
2796
|
+
"example": 5
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
"SvgShadow": {
|
|
2801
|
+
"description": "Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.\n",
|
|
2802
|
+
"type": "object",
|
|
2803
|
+
"properties": {
|
|
2804
|
+
"offsetX": {
|
|
2805
|
+
"description": "Horizontal offset of the shadow in pixels.\nPositive values move the shadow to the right, negative to the left.\n",
|
|
2806
|
+
"type": "number",
|
|
2807
|
+
"default": 0,
|
|
2808
|
+
"example": 4
|
|
2809
|
+
},
|
|
2810
|
+
"offsetY": {
|
|
2811
|
+
"description": "Vertical offset of the shadow in pixels.\nPositive values move the shadow down, negative values move it up.\n",
|
|
2812
|
+
"type": "number",
|
|
2813
|
+
"default": 0,
|
|
2814
|
+
"example": 4
|
|
2815
|
+
},
|
|
2816
|
+
"blur": {
|
|
2817
|
+
"description": "The blur radius of the shadow in pixels. Must be 0 or greater.",
|
|
2818
|
+
"type": "number",
|
|
2819
|
+
"minimum": 0,
|
|
2820
|
+
"default": 0,
|
|
2821
|
+
"example": 8
|
|
2822
|
+
},
|
|
2823
|
+
"color": {
|
|
2824
|
+
"description": "The shadow color using hexadecimal color notation.",
|
|
2825
|
+
"type": "string",
|
|
2826
|
+
"pattern": "^#[A-Fa-f0-9]{6}$",
|
|
2827
|
+
"default": "#000000",
|
|
2828
|
+
"example": "#000000"
|
|
2829
|
+
},
|
|
2830
|
+
"opacity": {
|
|
2831
|
+
"description": "The opacity of the shadow where `1` is opaque and `0` is transparent.",
|
|
2832
|
+
"type": "number",
|
|
2833
|
+
"minimum": 0,
|
|
2834
|
+
"maximum": 1,
|
|
2835
|
+
"default": 0.5,
|
|
2836
|
+
"example": 0.3
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
},
|
|
2840
|
+
"SvgTransform": {
|
|
2841
|
+
"description": "Transformation properties for positioning, rotating, and scaling SVG shapes.\n",
|
|
2842
|
+
"type": "object",
|
|
2843
|
+
"properties": {
|
|
2844
|
+
"x": {
|
|
2845
|
+
"description": "The x-coordinate position of the shape in pixels.\nRelative to the top-left corner of the viewport.\n",
|
|
2846
|
+
"type": "number",
|
|
2847
|
+
"default": 0,
|
|
2848
|
+
"example": 100
|
|
2849
|
+
},
|
|
2850
|
+
"y": {
|
|
2851
|
+
"description": "The y-coordinate position of the shape in pixels.\nRelative to the top-left corner of the viewport.\n",
|
|
2852
|
+
"type": "number",
|
|
2853
|
+
"default": 0,
|
|
2854
|
+
"example": 100
|
|
2855
|
+
},
|
|
2856
|
+
"rotation": {
|
|
2857
|
+
"description": "Rotation angle in degrees. Positive values rotate clockwise,\nnegative values rotate counter-clockwise. Range: -360 to 360.\n",
|
|
2858
|
+
"type": "number",
|
|
2859
|
+
"minimum": -360,
|
|
2860
|
+
"maximum": 360,
|
|
2861
|
+
"default": 0,
|
|
2862
|
+
"example": 45
|
|
2863
|
+
},
|
|
2864
|
+
"scale": {
|
|
2865
|
+
"description": "Scale factor for the shape. `1` is original size, `2` is double size,\n`0.5` is half size. Must be greater than 0.\n",
|
|
2866
|
+
"type": "number",
|
|
2867
|
+
"minimum": 0.01,
|
|
2868
|
+
"maximum": 100,
|
|
2869
|
+
"default": 1,
|
|
2870
|
+
"example": 1.5
|
|
2871
|
+
},
|
|
2872
|
+
"originX": {
|
|
2873
|
+
"description": "The x-coordinate of the transformation origin as a value from 0 to 1.\n`0` is the left edge, `0.5` is the center, `1` is the right edge.\n",
|
|
2874
|
+
"type": "number",
|
|
2875
|
+
"minimum": 0,
|
|
2876
|
+
"maximum": 1,
|
|
2877
|
+
"default": 0.5,
|
|
2878
|
+
"example": 0.5
|
|
2879
|
+
},
|
|
2880
|
+
"originY": {
|
|
2881
|
+
"description": "The y-coordinate of the transformation origin as a value from 0 to 1.\n`0` is the top edge, `0.5` is the center, `1` is the bottom edge.\n",
|
|
2882
|
+
"type": "number",
|
|
2883
|
+
"minimum": 0,
|
|
2884
|
+
"maximum": 1,
|
|
2885
|
+
"default": 0.5,
|
|
2886
|
+
"example": 0.5
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2054
2890
|
"Transition": {
|
|
2055
2891
|
"description": "In and out transitions for a clip - i.e. fade in and fade out",
|
|
2056
2892
|
"properties": {
|