@shotstack/schemas 1.3.9 → 1.4.1
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 +89 -89
- package/dist/api.bundled.json +17 -11
- package/dist/schema.d.ts +64 -12
- package/dist/zod/zod.gen.cjs +1555 -1042
- package/dist/zod/zod.gen.d.ts +5297 -5253
- package/dist/zod/zod.gen.js +1556 -1043
- package/dist/zod/zod.gen.ts +1609 -1650
- package/package.json +73 -73
package/README.md
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
# @shotstack/schemas
|
|
2
|
-
|
|
3
|
-
Centralized OpenAPI schemas and TypeScript types for the Shotstack API.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @shotstack/schemas zod
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
### TypeScript Types
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import type { components } from '@shotstack/schemas';
|
|
17
|
-
|
|
18
|
-
type Edit = components['schemas']['Edit'];
|
|
19
|
-
type Timeline = components['schemas']['Timeline'];
|
|
20
|
-
type Clip = components['schemas']['Clip'];
|
|
21
|
-
type Output = components['schemas']['Output'];
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Zod Schemas
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
import { z } from 'zod';
|
|
28
|
-
import { richTextAssetSchema, editSchema, timelineSchema } from '@shotstack/schemas/zod';
|
|
29
|
-
|
|
30
|
-
const result = richTextAssetSchema.safeParse(inputData);
|
|
31
|
-
if (result.success) {
|
|
32
|
-
console.log(result.data);
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Extending Schemas
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { z } from 'zod';
|
|
40
|
-
import { richTextAssetSchema } from '@shotstack/schemas/zod';
|
|
41
|
-
|
|
42
|
-
const ExtendedAsset = richTextAssetSchema.extend({
|
|
43
|
-
customFonts: z.array(z.object({
|
|
44
|
-
src: z.string().url(),
|
|
45
|
-
family: z.string(),
|
|
46
|
-
})).optional(),
|
|
47
|
-
border: z.object({
|
|
48
|
-
width: z.number().min(0),
|
|
49
|
-
color: z.string(),
|
|
50
|
-
}).optional(),
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
type ExtendedAssetType = z.infer<typeof ExtendedAsset>;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Custom Validation
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { richTextAnimationSchema } from '@shotstack/schemas/zod';
|
|
60
|
-
|
|
61
|
-
const AnimationWithDirection = richTextAnimationSchema.refine(
|
|
62
|
-
(data) => {
|
|
63
|
-
if (data.preset === 'slideIn' && !data.direction) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
},
|
|
68
|
-
{ message: 'direction is required for slideIn preset' }
|
|
69
|
-
);
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Available Schemas
|
|
73
|
-
|
|
74
|
-
- Edit, Timeline, Track, Clip, Output
|
|
75
|
-
- Assets: VideoAsset, ImageAsset, AudioAsset, HtmlAsset, TextAsset, TitleAsset, LumaAsset, CaptionAsset, ShapeAsset, RichTextAsset
|
|
76
|
-
- Destinations: ShotstackDestination, S3Destination, MuxDestination, VimeoDestination, GoogleDriveDestination, GoogleCloudStorageDestination
|
|
77
|
-
- Transforms, Transitions, Fonts, MergeFields, and more
|
|
78
|
-
|
|
79
|
-
## Development
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
pnpm install
|
|
83
|
-
pnpm run build
|
|
84
|
-
pnpm run test
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## License
|
|
88
|
-
|
|
89
|
-
MIT
|
|
1
|
+
# @shotstack/schemas
|
|
2
|
+
|
|
3
|
+
Centralized OpenAPI schemas and TypeScript types for the Shotstack API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @shotstack/schemas zod
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### TypeScript Types
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { components } from '@shotstack/schemas';
|
|
17
|
+
|
|
18
|
+
type Edit = components['schemas']['Edit'];
|
|
19
|
+
type Timeline = components['schemas']['Timeline'];
|
|
20
|
+
type Clip = components['schemas']['Clip'];
|
|
21
|
+
type Output = components['schemas']['Output'];
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Zod Schemas
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { z } from 'zod';
|
|
28
|
+
import { richTextAssetSchema, editSchema, timelineSchema } from '@shotstack/schemas/zod';
|
|
29
|
+
|
|
30
|
+
const result = richTextAssetSchema.safeParse(inputData);
|
|
31
|
+
if (result.success) {
|
|
32
|
+
console.log(result.data);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Extending Schemas
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { z } from 'zod';
|
|
40
|
+
import { richTextAssetSchema } from '@shotstack/schemas/zod';
|
|
41
|
+
|
|
42
|
+
const ExtendedAsset = richTextAssetSchema.extend({
|
|
43
|
+
customFonts: z.array(z.object({
|
|
44
|
+
src: z.string().url(),
|
|
45
|
+
family: z.string(),
|
|
46
|
+
})).optional(),
|
|
47
|
+
border: z.object({
|
|
48
|
+
width: z.number().min(0),
|
|
49
|
+
color: z.string(),
|
|
50
|
+
}).optional(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
type ExtendedAssetType = z.infer<typeof ExtendedAsset>;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Custom Validation
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { richTextAnimationSchema } from '@shotstack/schemas/zod';
|
|
60
|
+
|
|
61
|
+
const AnimationWithDirection = richTextAnimationSchema.refine(
|
|
62
|
+
(data) => {
|
|
63
|
+
if (data.preset === 'slideIn' && !data.direction) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
},
|
|
68
|
+
{ message: 'direction is required for slideIn preset' }
|
|
69
|
+
);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Available Schemas
|
|
73
|
+
|
|
74
|
+
- Edit, Timeline, Track, Clip, Output
|
|
75
|
+
- Assets: VideoAsset, ImageAsset, AudioAsset, HtmlAsset, TextAsset, TitleAsset, LumaAsset, CaptionAsset, ShapeAsset, RichTextAsset
|
|
76
|
+
- Destinations: ShotstackDestination, S3Destination, MuxDestination, VimeoDestination, GoogleDriveDestination, GoogleCloudStorageDestination
|
|
77
|
+
- Transforms, Transitions, Fonts, MergeFields, and more
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pnpm install
|
|
83
|
+
pnpm run build
|
|
84
|
+
pnpm run test
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|
package/dist/api.bundled.json
CHANGED
|
@@ -2056,7 +2056,7 @@
|
|
|
2056
2056
|
]
|
|
2057
2057
|
},
|
|
2058
2058
|
"SvgAsset": {
|
|
2059
|
-
"description": "The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.\nIt provides
|
|
2059
|
+
"description": "The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.\nIt provides two mutually exclusive ways to define shapes:\n\n**Option 1: Import SVG markup using `src`**\n```json\n{\n \"type\": \"svg\",\n \"src\": \"<svg width=\\\"100\\\" height=\\\"100\\\"><circle cx=\\\"50\\\" cy=\\\"50\\\" r=\\\"40\\\" fill=\\\"#FF0000\\\"/></svg>\"\n}\n```\nWhen using `src`, no other properties are allowed. The fill, stroke, and dimensions\nare automatically extracted from the SVG markup.\n\n**Option 2: Define shapes programmatically using `shape`**\n```json\n{\n \"type\": \"svg\",\n \"shape\": { \"type\": \"circle\", \"radius\": 50 },\n \"fill\": { \"type\": \"solid\", \"color\": \"#FF0000\" }\n}\n```\nWhen using `shape`, you can customize fill, stroke, shadow, transform, and other properties.\nThe `src` property is not allowed in this mode.\n\n**Important:** You must provide either `src` OR `shape`, but not both.\nThese two modes are mutually exclusive.\n\n**Available Shapes (Option 2 only):**\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\nSee [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.\n",
|
|
2060
2060
|
"type": "object",
|
|
2061
2061
|
"properties": {
|
|
2062
2062
|
"type": {
|
|
@@ -2068,28 +2068,35 @@
|
|
|
2068
2068
|
"default": "svg",
|
|
2069
2069
|
"example": "svg"
|
|
2070
2070
|
},
|
|
2071
|
+
"src": {
|
|
2072
|
+
"description": "Raw SVG markup string to import. When provided, the shape is extracted\nautomatically from the SVG content.\n\n**Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,\n`<line>`, `<polygon>`, `<polyline>`\n\n**Automatically extracted:**\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\n**Important:** When using `src`, no other properties (shape, fill, stroke, etc.)\nare allowed. All styling must be defined within the SVG markup itself.\n",
|
|
2073
|
+
"type": "string",
|
|
2074
|
+
"minLength": 1,
|
|
2075
|
+
"maxLength": 500000,
|
|
2076
|
+
"example": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#3498db\"/></svg>"
|
|
2077
|
+
},
|
|
2071
2078
|
"shape": {
|
|
2072
|
-
"description": "The shape definition. The `type` property within determines
|
|
2079
|
+
"description": "The shape definition using primitives. The `type` property within determines\nthe shape kind and its specific properties.\n\n**Important:** When using `shape`, the `src` property is not allowed.\n",
|
|
2073
2080
|
"$ref": "#/components/schemas/SvgShape"
|
|
2074
2081
|
},
|
|
2075
2082
|
"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",
|
|
2083
|
+
"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\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2077
2084
|
"$ref": "#/components/schemas/SvgFill"
|
|
2078
2085
|
},
|
|
2079
2086
|
"stroke": {
|
|
2080
|
-
"description": "Stroke (outline) properties for the shape.\nIf omitted, the shape will have no stroke (no outline).\n",
|
|
2087
|
+
"description": "Stroke (outline) properties for the shape.\nIf omitted, the shape will have no stroke (no outline).\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2081
2088
|
"$ref": "#/components/schemas/SvgStroke"
|
|
2082
2089
|
},
|
|
2083
2090
|
"shadow": {
|
|
2084
|
-
"description": "Drop shadow properties for the shape.\nCreates a shadow effect behind the shape.\n",
|
|
2091
|
+
"description": "Drop shadow properties for the shape.\nCreates a shadow effect behind the shape.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2085
2092
|
"$ref": "#/components/schemas/SvgShadow"
|
|
2086
2093
|
},
|
|
2087
2094
|
"transform": {
|
|
2088
|
-
"description": "Transform properties for positioning, rotating, and scaling the shape.\nThe transform is applied relative to the transformation origin.\n",
|
|
2095
|
+
"description": "Transform properties for positioning, rotating, and scaling the shape.\nThe transform is applied relative to the transformation origin.\n\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2089
2096
|
"$ref": "#/components/schemas/SvgTransform"
|
|
2090
2097
|
},
|
|
2091
2098
|
"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",
|
|
2099
|
+
"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\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2093
2100
|
"type": "number",
|
|
2094
2101
|
"minimum": 0,
|
|
2095
2102
|
"maximum": 1,
|
|
@@ -2097,14 +2104,14 @@
|
|
|
2097
2104
|
"example": 1
|
|
2098
2105
|
},
|
|
2099
2106
|
"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",
|
|
2107
|
+
"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\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2101
2108
|
"type": "integer",
|
|
2102
2109
|
"minimum": 1,
|
|
2103
2110
|
"maximum": 4096,
|
|
2104
2111
|
"example": 400
|
|
2105
2112
|
},
|
|
2106
2113
|
"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",
|
|
2114
|
+
"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\n**Note:** Only allowed when using `shape`, not with `src`.\n",
|
|
2108
2115
|
"type": "integer",
|
|
2109
2116
|
"minimum": 1,
|
|
2110
2117
|
"maximum": 4096,
|
|
@@ -2112,8 +2119,7 @@
|
|
|
2112
2119
|
}
|
|
2113
2120
|
},
|
|
2114
2121
|
"required": [
|
|
2115
|
-
"type"
|
|
2116
|
-
"shape"
|
|
2122
|
+
"type"
|
|
2117
2123
|
],
|
|
2118
2124
|
"example": {
|
|
2119
2125
|
"type": "svg",
|
package/dist/schema.d.ts
CHANGED
|
@@ -1149,10 +1149,33 @@ export interface components {
|
|
|
1149
1149
|
};
|
|
1150
1150
|
/**
|
|
1151
1151
|
* @description The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.
|
|
1152
|
-
* It provides
|
|
1153
|
-
* styling support including fills, strokes, gradients, and shadows.
|
|
1152
|
+
* It provides two mutually exclusive ways to define shapes:
|
|
1154
1153
|
*
|
|
1155
|
-
* **
|
|
1154
|
+
* **Option 1: Import SVG markup using `src`**
|
|
1155
|
+
* ```json
|
|
1156
|
+
* {
|
|
1157
|
+
* "type": "svg",
|
|
1158
|
+
* "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
|
|
1159
|
+
* }
|
|
1160
|
+
* ```
|
|
1161
|
+
* When using `src`, no other properties are allowed. The fill, stroke, and dimensions
|
|
1162
|
+
* are automatically extracted from the SVG markup.
|
|
1163
|
+
*
|
|
1164
|
+
* **Option 2: Define shapes programmatically using `shape`**
|
|
1165
|
+
* ```json
|
|
1166
|
+
* {
|
|
1167
|
+
* "type": "svg",
|
|
1168
|
+
* "shape": { "type": "circle", "radius": 50 },
|
|
1169
|
+
* "fill": { "type": "solid", "color": "#FF0000" }
|
|
1170
|
+
* }
|
|
1171
|
+
* ```
|
|
1172
|
+
* When using `shape`, you can customize fill, stroke, shadow, transform, and other properties.
|
|
1173
|
+
* The `src` property is not allowed in this mode.
|
|
1174
|
+
*
|
|
1175
|
+
* **Important:** You must provide either `src` OR `shape`, but not both.
|
|
1176
|
+
* These two modes are mutually exclusive.
|
|
1177
|
+
*
|
|
1178
|
+
* **Available Shapes (Option 2 only):**
|
|
1156
1179
|
* - `rectangle` - Rectangles with optional rounded corners
|
|
1157
1180
|
* - `circle` - Perfect circles
|
|
1158
1181
|
* - `ellipse` - Ellipses/ovals with separate x and y radii
|
|
@@ -1165,12 +1188,6 @@ export interface components {
|
|
|
1165
1188
|
* - `ring` - Donut/ring shapes
|
|
1166
1189
|
* - `path` - Custom shapes using SVG path data
|
|
1167
1190
|
*
|
|
1168
|
-
* **Styling Options:**
|
|
1169
|
-
* - Fill with solid colors or linear/radial gradients
|
|
1170
|
-
* - Stroke with configurable width, color, dash patterns, and line caps/joins
|
|
1171
|
-
* - Drop shadows with blur, offset, and opacity
|
|
1172
|
-
* - Transform properties for positioning, rotation, and scaling
|
|
1173
|
-
*
|
|
1174
1191
|
* See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
|
|
1175
1192
|
* @example {
|
|
1176
1193
|
* "type": "svg",
|
|
@@ -1218,35 +1235,66 @@ export interface components {
|
|
|
1218
1235
|
*/
|
|
1219
1236
|
type: "svg";
|
|
1220
1237
|
/**
|
|
1221
|
-
* @description
|
|
1222
|
-
*
|
|
1238
|
+
* @description Raw SVG markup string to import. When provided, the shape is extracted
|
|
1239
|
+
* automatically from the SVG content.
|
|
1240
|
+
*
|
|
1241
|
+
* **Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,
|
|
1242
|
+
* `<line>`, `<polygon>`, `<polyline>`
|
|
1243
|
+
*
|
|
1244
|
+
* **Automatically extracted:**
|
|
1245
|
+
* - Path data (converted to a single combined path)
|
|
1246
|
+
* - Fill color (from `fill` attribute or `style`)
|
|
1247
|
+
* - Stroke color and width (from attributes or `style`)
|
|
1248
|
+
* - Dimensions (from `width`/`height` or `viewBox`)
|
|
1249
|
+
* - Opacity (from `opacity` attribute)
|
|
1250
|
+
*
|
|
1251
|
+
* **Important:** When using `src`, no other properties (shape, fill, stroke, etc.)
|
|
1252
|
+
* are allowed. All styling must be defined within the SVG markup itself.
|
|
1253
|
+
* @example <svg width="100" height="100"><circle cx="50" cy="50" r="40" fill="#3498db"/></svg>
|
|
1254
|
+
*/
|
|
1255
|
+
src?: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* @description The shape definition using primitives. The `type` property within determines
|
|
1258
|
+
* the shape kind and its specific properties.
|
|
1259
|
+
*
|
|
1260
|
+
* **Important:** When using `shape`, the `src` property is not allowed.
|
|
1223
1261
|
*/
|
|
1224
|
-
shape
|
|
1262
|
+
shape?: components["schemas"]["SvgShape"];
|
|
1225
1263
|
/**
|
|
1226
1264
|
* @description Fill properties for the shape interior.
|
|
1227
1265
|
* Can be a solid color or a gradient (linear/radial).
|
|
1228
1266
|
* If omitted, the shape will have no fill (transparent interior).
|
|
1267
|
+
*
|
|
1268
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1229
1269
|
*/
|
|
1230
1270
|
fill?: components["schemas"]["SvgFill"];
|
|
1231
1271
|
/**
|
|
1232
1272
|
* @description Stroke (outline) properties for the shape.
|
|
1233
1273
|
* If omitted, the shape will have no stroke (no outline).
|
|
1274
|
+
*
|
|
1275
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1234
1276
|
*/
|
|
1235
1277
|
stroke?: components["schemas"]["SvgStroke"];
|
|
1236
1278
|
/**
|
|
1237
1279
|
* @description Drop shadow properties for the shape.
|
|
1238
1280
|
* Creates a shadow effect behind the shape.
|
|
1281
|
+
*
|
|
1282
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1239
1283
|
*/
|
|
1240
1284
|
shadow?: components["schemas"]["SvgShadow"];
|
|
1241
1285
|
/**
|
|
1242
1286
|
* @description Transform properties for positioning, rotating, and scaling the shape.
|
|
1243
1287
|
* The transform is applied relative to the transformation origin.
|
|
1288
|
+
*
|
|
1289
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1244
1290
|
*/
|
|
1245
1291
|
transform?: components["schemas"]["SvgTransform"];
|
|
1246
1292
|
/**
|
|
1247
1293
|
* @description The overall opacity of the entire shape (including fill, stroke, and shadow).
|
|
1248
1294
|
* `1` is fully opaque, `0` is fully transparent.
|
|
1249
1295
|
* This is applied on top of individual fill/stroke/shadow opacity values.
|
|
1296
|
+
*
|
|
1297
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1250
1298
|
* @default 1
|
|
1251
1299
|
* @example 1
|
|
1252
1300
|
*/
|
|
@@ -1255,6 +1303,8 @@ export interface components {
|
|
|
1255
1303
|
* @description The width of the bounding box in pixels.
|
|
1256
1304
|
* If specified, the shape may be scaled to fit within this width.
|
|
1257
1305
|
* If omitted, the shape uses its natural dimensions.
|
|
1306
|
+
*
|
|
1307
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1258
1308
|
* @example 400
|
|
1259
1309
|
*/
|
|
1260
1310
|
width?: number;
|
|
@@ -1262,6 +1312,8 @@ export interface components {
|
|
|
1262
1312
|
* @description The height of the bounding box in pixels.
|
|
1263
1313
|
* If specified, the shape may be scaled to fit within this height.
|
|
1264
1314
|
* If omitted, the shape uses its natural dimensions.
|
|
1315
|
+
*
|
|
1316
|
+
* **Note:** Only allowed when using `shape`, not with `src`.
|
|
1265
1317
|
* @example 300
|
|
1266
1318
|
*/
|
|
1267
1319
|
height?: number;
|