docx 9.7.2 → 9.8.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.
@@ -0,0 +1,2276 @@
1
+ import { DocPropertiesOptions } from 'docx';
2
+ import { DrawingLinkOptions } from 'docx';
3
+ import { ICropOptions } from 'docx';
4
+ import { IFloating } from 'docx';
5
+ import { IHorizontalPositionOptions } from 'docx';
6
+ import { IMediaTransformation } from 'docx';
7
+ import { IRunPropertiesOptions } from 'docx';
8
+ import { IVerticalPositionOptions } from 'docx';
9
+ import { Paragraph } from 'docx';
10
+ import { Run } from 'docx';
11
+ import { ThemeColor } from 'docx';
12
+ import { ThemeColorName } from 'docx';
13
+
14
+ /**
15
+ * An arrowhead at one end of a line: a style, or a style with a size.
16
+ *
17
+ * @publicApi
18
+ */
19
+ export declare type Arrowhead = ArrowheadType | {
20
+ readonly type: ArrowheadType;
21
+ /** Width of the arrowhead. Default is `"medium"` */
22
+ readonly width?: ArrowheadSize;
23
+ /** Length of the arrowhead. Default is `"medium"` */
24
+ readonly length?: ArrowheadSize;
25
+ };
26
+
27
+ /**
28
+ * The size of an arrowhead relative to the line width.
29
+ *
30
+ * @publicApi
31
+ */
32
+ export declare type ArrowheadSize = "small" | "medium" | "large";
33
+
34
+ /**
35
+ * The style of an arrowhead (`ST_LineEndType`).
36
+ *
37
+ * @publicApi
38
+ */
39
+ export declare type ArrowheadType = "triangle" | "stealth" | "diamond" | "oval" | "arrow";
40
+
41
+ /**
42
+ * One end of a connector: the `id` of the shape it attaches to, or the `id` with a `side` or `point` of the shape.
43
+ * Without either, the connector attaches to the side that faces the shape at its other end.
44
+ *
45
+ * @publicApi
46
+ */
47
+ export declare type ConnectorEnd = string | {
48
+ /** The `id` of the shape */
49
+ readonly id: string;
50
+ /** The side of the shape to attach to */
51
+ readonly side?: ConnectorSide;
52
+ /**
53
+ * Attaches to the connection point nearest this point, such as `{ x: 0, y: 100 }` for the one nearest the
54
+ * bottom-left corner. On a shape without connection points, the connector ends at this point
55
+ */
56
+ readonly point?: ConnectorPoint;
57
+ };
58
+
59
+ /**
60
+ * Text on a connector, in a box centred on its route.
61
+ *
62
+ * @publicApi
63
+ */
64
+ export declare type ConnectorLabel = {
65
+ /** The text, or paragraphs for text with formatting */
66
+ readonly text: string | readonly Paragraph[];
67
+ /**
68
+ * Where the label goes along the route. `"start"` and `"end"` put it just clear of the shape at that end, such as
69
+ * `"Yes"` and `"No"` beside a decision. A label that would sit on a shape moves along the route until it doesn't.
70
+ * Default is `"middle"`
71
+ */
72
+ readonly position?: ConnectorLabelPosition;
73
+ /** Width of the label's box in pixels. Default fits the text, from the widths of common fonts */
74
+ readonly width?: number;
75
+ /** Height of the label's box in pixels. Default fits the text */
76
+ readonly height?: number;
77
+ /** The label's background, such as `"FFFFFF"` to hide the line behind the text. Default is none */
78
+ readonly fill?: ShapeFill;
79
+ /** The label's outline. Default is none */
80
+ readonly line?: ShapeLine;
81
+ };
82
+
83
+ /**
84
+ * Where a label goes along a connector's route: near where it starts, in the middle, or near where it ends.
85
+ *
86
+ * @publicApi
87
+ */
88
+ export declare type ConnectorLabelPosition = "start" | "middle" | "end";
89
+
90
+ /**
91
+ * A point on a shape, as percentages of the shape's width and height before it is rotated or flipped:
92
+ * `{ x: 0, y: 0 }` is the top-left corner and `{ x: 100, y: 100 }` the bottom-right corner.
93
+ *
94
+ * @publicApi
95
+ */
96
+ export declare type ConnectorPoint = {
97
+ /** From 0 (the left edge) to 100 (the right edge) */
98
+ readonly x: number;
99
+ /** From 0 (the top edge) to 100 (the bottom edge) */
100
+ readonly y: number;
101
+ };
102
+
103
+ /**
104
+ * How a connector gets from one shape to the other: in a straight line, with right-angled bends, or with curves.
105
+ *
106
+ * @publicApi
107
+ */
108
+ export declare type ConnectorRoute = "straight" | "elbow" | "curved";
109
+
110
+ /**
111
+ * A side of a shape that a connector can attach to.
112
+ *
113
+ * @publicApi
114
+ */
115
+ export declare type ConnectorSide = "top" | "right" | "bottom" | "left";
116
+
117
+ /**
118
+ * A dash pattern of your own: dashes and gaps, repeated along the line.
119
+ *
120
+ * @publicApi
121
+ */
122
+ export declare type CustomLineDash = readonly {
123
+ /** Length of the dash, in multiples of the line width */
124
+ readonly length: number;
125
+ /** Length of the gap after the dash, in multiples of the line width */
126
+ readonly gap: number;
127
+ }[];
128
+
129
+ /**
130
+ * A point of a custom shape that connectors attach to, in the units of its paths.
131
+ *
132
+ * @publicApi
133
+ */
134
+ export declare type CustomShapeConnectionPoint = {
135
+ readonly x: number;
136
+ readonly y: number;
137
+ /**
138
+ * The side of the shape the point faces. Connectors leave the point towards it, and a connector's end with this
139
+ * `side` attaches here. Default is the side the point is nearest, as a share of the shape's width and height
140
+ */
141
+ readonly side?: ConnectorSide;
142
+ };
143
+
144
+ /**
145
+ * The outline of a custom shape, and where its text and connection points go.
146
+ *
147
+ * @publicApi
148
+ */
149
+ export declare type CustomShapeGeometry = {
150
+ /**
151
+ * Where the text goes, in the units of the paths, such as the body of a speech bubble without its tail. Default is
152
+ * the whole shape
153
+ */
154
+ readonly textArea?: CustomShapeTextArea;
155
+ /**
156
+ * The points connectors attach to, in the units of the paths. Default is every corner and end of the paths
157
+ */
158
+ readonly connectionPoints?: readonly CustomShapeConnectionPoint[];
159
+ } & ({
160
+ /**
161
+ * The outline of the shape as SVG path data, such as `"M 0 0 L 100 0 L 50 80 Z"` for a triangle.
162
+ * It can use the commands M, L, H, V, C, S, Q, T, A and Z, in any units: the path is scaled so the
163
+ * box around it fills the shape. A closed part of the path inside another part is a hole in it
164
+ */
165
+ readonly path: string;
166
+ readonly paths?: undefined;
167
+ } | {
168
+ /**
169
+ * Several paths, in the same units, each with its own fill and line. The box around all of them is scaled to
170
+ * fill the shape. Later paths are drawn over earlier ones
171
+ */
172
+ readonly paths: readonly CustomShapePath[];
173
+ readonly path?: undefined;
174
+ });
175
+
176
+ /**
177
+ * One of the paths of a custom shape. Each path is filled with the shape's `fill` and outlined with its `line`, on its
178
+ * own, so paths can overlap without cutting holes in each other.
179
+ *
180
+ * @publicApi
181
+ */
182
+ export declare type CustomShapePath = {
183
+ /** SVG path data, such as `"M 0 0 L 100 0 L 50 80 Z"`, in the same units as the shape's other paths */
184
+ readonly path: string;
185
+ /** How the path is filled. Default is `true`, the shape's `fill` */
186
+ readonly fill?: CustomShapePathFill;
187
+ /** Whether the shape's `line` is drawn along the path. Default is `true` */
188
+ readonly line?: boolean;
189
+ };
190
+
191
+ /**
192
+ * How a path of a custom shape is filled: with the shape's `fill` (`true`), not at all (`false`), or with the shape's
193
+ * fill made lighter or darker, as Word's preset shapes shade the top of a cube or the inside of a can.
194
+ *
195
+ * @publicApi
196
+ */
197
+ export declare type CustomShapePathFill = boolean | "lighter" | "slightlyLighter" | "darker" | "slightlyDarker";
198
+
199
+ /**
200
+ * A box in a custom shape, in the units of its paths.
201
+ *
202
+ * @publicApi
203
+ */
204
+ export declare type CustomShapeTextArea = {
205
+ readonly left: number;
206
+ readonly top: number;
207
+ readonly right: number;
208
+ readonly bottom: number;
209
+ };
210
+
211
+ /**
212
+ * The outline a radial gradient spreads out in from the centre.
213
+ *
214
+ * @publicApi
215
+ */
216
+ export declare type GradientPath = "circle" | "rectangle" | "shape";
217
+
218
+ /**
219
+ * A gradient fill. It is linear unless `path` is set.
220
+ *
221
+ * @publicApi
222
+ */
223
+ export declare type GradientShapeFill = {
224
+ readonly type: "gradient";
225
+ /** At least two colour stops */
226
+ readonly stops: readonly GradientStop[];
227
+ /** Direction of a linear gradient in degrees, clockwise from left-to-right. Default is 0 */
228
+ readonly angle?: number;
229
+ /** Makes the gradient radiate from the centre: in a circle, a rectangle, or following the shape's outline */
230
+ readonly path?: GradientPath;
231
+ };
232
+
233
+ /**
234
+ * A colour stop in a gradient fill.
235
+ *
236
+ * @publicApi
237
+ */
238
+ export declare type GradientStop = {
239
+ /** Where the stop sits along the gradient, from 0 to 100 */
240
+ readonly position: number;
241
+ /** A 6-digit hex colour such as `"FF0000"`, or a colour of the document's theme such as `{ theme: "accent1" }` */
242
+ readonly color: ShapeColor;
243
+ /** From 0 (opaque) to 100 (invisible) */
244
+ readonly transparency?: number;
245
+ };
246
+
247
+ /**
248
+ * A picture: its format and data.
249
+ *
250
+ * @publicApi
251
+ */
252
+ export declare type ImageSource = RasterImageSource | SvgImageSource;
253
+
254
+ /**
255
+ * Image data: a Buffer, Uint8Array, ArrayBuffer, or a base64-encoded data URI string.
256
+ */
257
+ declare type ImageSourceData = Buffer | string | Uint8Array | ArrayBuffer;
258
+
259
+ /**
260
+ * A shape, picture, group or connector on a canvas. It takes the same options as a child of a {@link ShapeGroupRun}.
261
+ *
262
+ * @see {@link ShapeCanvasRun}
263
+ * @publicApi
264
+ */
265
+ export declare type IShapeCanvasChildOptions = IShapeGroupChildOptions;
266
+
267
+ /**
268
+ * Options for creating a drawing canvas.
269
+ *
270
+ * @see {@link ShapeCanvasRun}
271
+ * @publicApi
272
+ */
273
+ export declare type IShapeCanvasOptions = DrawingLinkOptions & {
274
+ /** The shapes, pictures and groups on the canvas, and the connectors between them */
275
+ readonly children: readonly IShapeCanvasChildOptions[];
276
+ /**
277
+ * Size of the canvas in pixels. Defaults to reaching from the top-left corner to the right and bottom
278
+ * of the shapes, including their lines and effects, so an `offset` leaves space above and to the left of a shape.
279
+ * The shapes are not scaled.
280
+ */
281
+ readonly transformation?: {
282
+ readonly width: number;
283
+ readonly height: number;
284
+ };
285
+ /** The canvas's background. Default is none */
286
+ readonly fill?: ShapeFill;
287
+ /** The canvas's outline. Default is none */
288
+ readonly line?: ShapeLine;
289
+ /**
290
+ * Places the shapes, pictures and groups that have no `offset`: in levels along their connectors like a flowchart,
291
+ * as a tree like an org chart, or in a grid
292
+ */
293
+ readonly layout?: ShapeLayout;
294
+ /** Floats the canvas on the page instead of placing it inline with text */
295
+ readonly floating?: IFloating;
296
+ /**
297
+ * Whether to write the same diagram as a group too, for applications that can't draw canvases, such as Apple Pages.
298
+ * Default is `true`. Without it, the canvas takes up half as much of the document, and those applications draw nothing
299
+ */
300
+ readonly fallback?: boolean;
301
+ /** Name, description and title used by screen readers */
302
+ readonly altText?: DocPropertiesOptions;
303
+ /** Formatting of the run the canvas is in, such as `position` to raise or lower it from the text's baseline */
304
+ readonly run?: IRunPropertiesOptions;
305
+ };
306
+
307
+ /**
308
+ * A connector between two shapes in a {@link ShapeGroupRun} or {@link ShapeCanvasRun}.
309
+ *
310
+ * The connector is drawn from one shape to the other, so it doesn't need a size or position.
311
+ * On a {@link ShapeCanvasRun}, Word keeps it attached when either shape is moved.
312
+ *
313
+ * When several connectors with arrowheads meet at the same point of a shape with straight sides, such as a rectangle,
314
+ * or several connectors join the same two shapes, their ends are spread out along the side so they don't overlap.
315
+ *
316
+ * @publicApi
317
+ */
318
+ export declare type IShapeConnectorOptions = {
319
+ readonly type: "connector";
320
+ /** Where the connector starts */
321
+ readonly from: ConnectorEnd;
322
+ /** Where the connector ends */
323
+ readonly to: ConnectorEnd;
324
+ /**
325
+ * A straight line, right-angled bends, or curves. Default is `"straight"`, or `"elbow"` when a straight line
326
+ * would go through another shape
327
+ */
328
+ readonly route?: ConnectorRoute;
329
+ /** How far, in pixels, an elbow or curved connector goes past a shape before it turns. Default is 24 (a quarter of an inch) */
330
+ readonly margin?: number;
331
+ /** The connector's line, including any arrowheads. `startArrow` is at `from` and `endArrow` at `to`. Default is a solid black line 1pt wide */
332
+ readonly line?: ShapeLine;
333
+ /**
334
+ * Text on the connector, such as `"Yes"`, in a box centred on the route. The box is a separate
335
+ * shape, so Word doesn't move it when the connector moves
336
+ */
337
+ readonly label?: string | ConnectorLabel;
338
+ /** Name, description and title used by screen readers */
339
+ readonly altText?: DocPropertiesOptions;
340
+ };
341
+
342
+ /**
343
+ * A shape, picture, group or connector inside a {@link ShapeGroupRun} or {@link ShapeCanvasRun}.
344
+ *
345
+ * A shape takes the options of a {@link ShapeRun} except `floating`. `transformation.offset` positions it,
346
+ * in pixels, unless a `layout` places it, and `id` names it so connectors can attach to it.
347
+ *
348
+ * @publicApi
349
+ */
350
+ export declare type IShapeGroupChildOptions = WithPresetShape<ShapeBaseOptions & {
351
+ /** A name that connectors use to attach to this shape. It must be unique within the group or canvas */
352
+ readonly id?: string;
353
+ /** The lane of the flow the shape goes in, by its name. See `ShapeFlowLayout.lanes` */
354
+ readonly lane?: string;
355
+ }> | IShapeConnectorOptions | IShapePictureOptions | IShapeNestedGroupOptions;
356
+
357
+ /**
358
+ * Options for creating a group of shapes.
359
+ *
360
+ * @see {@link ShapeGroupRun}
361
+ * @publicApi
362
+ */
363
+ export declare type IShapeGroupOptions = DrawingLinkOptions & {
364
+ /** The shapes, pictures and groups in the group, and the connectors between them */
365
+ readonly children: readonly IShapeGroupChildOptions[];
366
+ /**
367
+ * Size of the group in pixels, with optional rotation and flip. Defaults to the size of
368
+ * the box around the children. A different size scales every shape in the group.
369
+ */
370
+ readonly transformation?: IMediaTransformation;
371
+ /**
372
+ * Places the shapes, pictures and groups that have no `offset`: in levels along their connectors like a flowchart,
373
+ * as a tree like an org chart, or in a grid
374
+ */
375
+ readonly layout?: ShapeLayout;
376
+ /** Floats the group on the page instead of placing it inline with text */
377
+ readonly floating?: IFloating;
378
+ /** Name, description and title used by screen readers */
379
+ readonly altText?: DocPropertiesOptions;
380
+ /** Formatting of the run the group is in, such as `position` to raise or lower it from the text's baseline */
381
+ readonly run?: IRunPropertiesOptions;
382
+ };
383
+
384
+ /**
385
+ * A group of shapes inside a {@link ShapeGroupRun} or {@link ShapeCanvasRun}, which moves, scales and rotates as one.
386
+ *
387
+ * Its children are positioned relative to each other, like the children of a `ShapeGroupRun`, and `transformation.offset`
388
+ * places the group's top-left corner. Connectors in the group can only join shapes in the group, but connectors
389
+ * outside it can attach to the shapes in it.
390
+ *
391
+ * @publicApi
392
+ */
393
+ export declare type IShapeNestedGroupOptions = DrawingLinkOptions & {
394
+ readonly type: "group";
395
+ /** The shapes, pictures, groups and connectors in the group */
396
+ readonly children: readonly IShapeGroupChildOptions[];
397
+ /**
398
+ * Position and size of the group in pixels, with optional rotation (degrees) and flip. The size defaults to the
399
+ * box around the children, and a different size scales every child
400
+ */
401
+ readonly transformation?: Omit<IMediaTransformation, "width" | "height"> & {
402
+ readonly width?: number;
403
+ readonly height?: number;
404
+ };
405
+ /** Places the children that have no `offset`, such as in a flowchart, tree or grid */
406
+ readonly layout?: ShapeLayout;
407
+ /** The lane of the flow the group goes in, by its name. See `ShapeFlowLayout.lanes` */
408
+ readonly lane?: string;
409
+ /** Name, description and title used by screen readers */
410
+ readonly altText?: DocPropertiesOptions;
411
+ };
412
+
413
+ /**
414
+ * Options for creating a shape.
415
+ *
416
+ * `adjustments` depends on `type`: each shape has its own, such as `cornerRadius` for a `"roundedRectangle"`
417
+ * or `startAngle` and `endAngle` for a `"pie"`.
418
+ *
419
+ * @see {@link ShapeRun}
420
+ * @publicApi
421
+ */
422
+ export declare type IShapeOptions = WithPresetShape<ShapeBaseOptions & {
423
+ /**
424
+ * Floats the shape on the page instead of placing it inline with text. A floating shape's size and offsets can be
425
+ * percentages of the page, its margins or the space between them
426
+ */
427
+ readonly floating?: ShapeFloating;
428
+ /**
429
+ * The name of a text flow the shape is in: text that flows from one shape to the next, such as an article that
430
+ * continues on another page. The first shape of the flow in the document holds the text, from its `text` and
431
+ * `children`, and the text that doesn't fit flows on into the next shape of the flow, and so on
432
+ */
433
+ readonly textFlow?: string;
434
+ /** Formatting of the run the shape is in, such as `position` to raise or lower it from the text's baseline */
435
+ readonly run?: IRunPropertiesOptions;
436
+ }>;
437
+
438
+ /**
439
+ * A picture in a {@link ShapeGroupRun} or {@link ShapeCanvasRun}. Connectors can attach to the middle of its sides.
440
+ *
441
+ * @publicApi
442
+ */
443
+ export declare type IShapePictureOptions = DrawingLinkOptions & {
444
+ readonly type: "picture";
445
+ /** The picture: its format and data, as for an `ImageRun`, such as `{ type: "png", data: fs.readFileSync("logo.png") }` */
446
+ readonly image: ImageSource;
447
+ /** Size in pixels, with optional rotation (degrees) and flip. `offset` positions the picture, in pixels */
448
+ readonly transformation: IMediaTransformation;
449
+ /** A name that connectors use to attach to this picture. It must be unique within the group or canvas */
450
+ readonly id?: string;
451
+ /** The lane of the flow the picture goes in, by its name. See `ShapeFlowLayout.lanes` */
452
+ readonly lane?: string;
453
+ /** Crops the picture by a percentage of each side, from 0 to 100 */
454
+ readonly crop?: ICropOptions;
455
+ /** An outline around the picture. Default is none */
456
+ readonly line?: ShapeLine;
457
+ /** Shadows, glow, soft edges and reflection */
458
+ readonly effects?: ShapeEffects;
459
+ /** Name, description and title used by screen readers */
460
+ readonly altText?: DocPropertiesOptions;
461
+ };
462
+
463
+ declare const LINE_DASH_OOXML_NAMES: {
464
+ readonly solid: "solid";
465
+ readonly dot: "dot";
466
+ readonly dash: "dash";
467
+ readonly longDash: "lgDash";
468
+ readonly dashDot: "dashDot";
469
+ readonly longDashDot: "lgDashDot";
470
+ readonly longDashDotDot: "lgDashDotDot";
471
+ readonly shortDash: "sysDash";
472
+ readonly shortDot: "sysDot";
473
+ readonly shortDashDot: "sysDashDot";
474
+ readonly shortDashDotDot: "sysDashDotDot";
475
+ };
476
+
477
+ /**
478
+ * A preset dash pattern.
479
+ *
480
+ * @publicApi
481
+ */
482
+ export declare type LineDash = keyof typeof LINE_DASH_OOXML_NAMES;
483
+
484
+ declare const PATTERN_OOXML_NAMES: {
485
+ readonly percent5: "pct5";
486
+ readonly percent10: "pct10";
487
+ readonly percent20: "pct20";
488
+ readonly percent25: "pct25";
489
+ readonly percent30: "pct30";
490
+ readonly percent40: "pct40";
491
+ readonly percent50: "pct50";
492
+ readonly percent60: "pct60";
493
+ readonly percent70: "pct70";
494
+ readonly percent75: "pct75";
495
+ readonly percent80: "pct80";
496
+ readonly percent90: "pct90";
497
+ readonly horizontal: "horz";
498
+ readonly vertical: "vert";
499
+ readonly lightHorizontal: "ltHorz";
500
+ readonly lightVertical: "ltVert";
501
+ readonly darkHorizontal: "dkHorz";
502
+ readonly darkVertical: "dkVert";
503
+ readonly narrowHorizontal: "narHorz";
504
+ readonly narrowVertical: "narVert";
505
+ readonly dashedHorizontal: "dashHorz";
506
+ readonly dashedVertical: "dashVert";
507
+ readonly cross: "cross";
508
+ readonly downwardDiagonal: "dnDiag";
509
+ readonly upwardDiagonal: "upDiag";
510
+ readonly lightDownwardDiagonal: "ltDnDiag";
511
+ readonly lightUpwardDiagonal: "ltUpDiag";
512
+ readonly darkDownwardDiagonal: "dkDnDiag";
513
+ readonly darkUpwardDiagonal: "dkUpDiag";
514
+ readonly wideDownwardDiagonal: "wdDnDiag";
515
+ readonly wideUpwardDiagonal: "wdUpDiag";
516
+ readonly dashedDownwardDiagonal: "dashDnDiag";
517
+ readonly dashedUpwardDiagonal: "dashUpDiag";
518
+ readonly diagonalCross: "diagCross";
519
+ readonly smallCheckerBoard: "smCheck";
520
+ readonly largeCheckerBoard: "lgCheck";
521
+ readonly smallGrid: "smGrid";
522
+ readonly largeGrid: "lgGrid";
523
+ readonly dottedGrid: "dotGrid";
524
+ readonly smallConfetti: "smConfetti";
525
+ readonly largeConfetti: "lgConfetti";
526
+ readonly horizontalBrick: "horzBrick";
527
+ readonly diagonalBrick: "diagBrick";
528
+ readonly solidDiamond: "solidDmnd";
529
+ readonly openDiamond: "openDmnd";
530
+ readonly dottedDiamond: "dotDmnd";
531
+ readonly plaid: "plaid";
532
+ readonly sphere: "sphere";
533
+ readonly weave: "weave";
534
+ readonly divot: "divot";
535
+ readonly shingle: "shingle";
536
+ readonly wave: "wave";
537
+ readonly trellis: "trellis";
538
+ readonly zigZag: "zigZag";
539
+ };
540
+
541
+ /**
542
+ * A fill of a repeating pattern of lines or dots in one colour over another.
543
+ *
544
+ * @publicApi
545
+ */
546
+ export declare type PatternShapeFill = {
547
+ readonly type: "pattern";
548
+ /** The pattern, such as `"percent20"`, `"horizontal"` or `"smallCheckerBoard"` */
549
+ readonly pattern: ShapePattern;
550
+ /** The colour of the pattern's lines and dots: a hex colour or a colour of the document's theme. Default is `"000000"` */
551
+ readonly color?: ShapeColor;
552
+ /** The colour of the space behind the pattern: a hex colour or a colour of the document's theme. Default is `"FFFFFF"` */
553
+ readonly backgroundColor?: ShapeColor;
554
+ };
555
+
556
+ /**
557
+ * A fill of a picture, such as a photo in a circle. The shape's outline crops the picture.
558
+ *
559
+ * @publicApi
560
+ */
561
+ export declare type PictureShapeFill = {
562
+ readonly type: "picture";
563
+ /** The picture: its format and data, as for an `ImageRun`, such as `{ type: "png", data: fs.readFileSync("photo.png") }` */
564
+ readonly image: ImageSource;
565
+ /** Repeats the picture across the shape at its own size, instead of stretching it to fill the shape */
566
+ readonly tile?: PictureTile;
567
+ /** Crops the picture by a percentage of each side, from 0 to 100, before stretching it to fill the shape */
568
+ readonly crop?: ICropOptions;
569
+ /** From 0 (opaque) to 100 (invisible) */
570
+ readonly transparency?: number;
571
+ };
572
+
573
+ /**
574
+ * How a picture is repeated across a shape.
575
+ *
576
+ * @publicApi
577
+ */
578
+ export declare type PictureTile = {
579
+ /** Size of each tile, as a percentage of the picture's own size. Default is 100 */
580
+ readonly scale?: number;
581
+ /** Where the first tile is placed. Default is `"topLeft"` */
582
+ readonly alignment?: PictureTileAlignment;
583
+ /** Mirrors every other tile. Default is `"none"` */
584
+ readonly mirror?: PictureTileMirror;
585
+ };
586
+
587
+ /**
588
+ * Where the first tile of a tiled picture is placed. The other tiles are laid out from it.
589
+ *
590
+ * @publicApi
591
+ */
592
+ export declare type PictureTileAlignment = "topLeft" | "top" | "topRight" | "left" | "center" | "right" | "bottomLeft" | "bottom" | "bottomRight";
593
+
594
+ /**
595
+ * Which tiles of a tiled picture are mirrored: every other tile across, every other tile down, or both.
596
+ *
597
+ * @publicApi
598
+ */
599
+ export declare type PictureTileMirror = "none" | "horizontal" | "vertical" | "both";
600
+
601
+ /**
602
+ * Every preset shape, by the name this library gives it, mapped to its name in OOXML (`a:prstGeom/@prst`).
603
+ * The OOXML names are often abbreviated (`roundRect`) or numbered (`ribbon2`), so the library uses names
604
+ * that say what the shape is.
605
+ */
606
+ declare const PRESET_SHAPE_OOXML_NAMES: {
607
+ readonly line: "line";
608
+ readonly inverseLine: "lineInv";
609
+ readonly straightConnector: "straightConnector1";
610
+ readonly elbowConnectorOneBend: "bentConnector2";
611
+ readonly elbowConnector: "bentConnector3";
612
+ readonly elbowConnectorThreeBends: "bentConnector4";
613
+ readonly elbowConnectorFourBends: "bentConnector5";
614
+ readonly curvedConnectorOneBend: "curvedConnector2";
615
+ readonly curvedConnector: "curvedConnector3";
616
+ readonly curvedConnectorThreeBends: "curvedConnector4";
617
+ readonly curvedConnectorFourBends: "curvedConnector5";
618
+ readonly triangle: "triangle";
619
+ readonly rightTriangle: "rtTriangle";
620
+ readonly diamond: "diamond";
621
+ readonly parallelogram: "parallelogram";
622
+ readonly trapezoid: "trapezoid";
623
+ readonly nonIsoscelesTrapezoid: "nonIsoscelesTrapezoid";
624
+ readonly pentagon: "pentagon";
625
+ readonly hexagon: "hexagon";
626
+ readonly heptagon: "heptagon";
627
+ readonly octagon: "octagon";
628
+ readonly decagon: "decagon";
629
+ readonly dodecagon: "dodecagon";
630
+ readonly ellipse: "ellipse";
631
+ readonly teardrop: "teardrop";
632
+ readonly pieWedge: "pieWedge";
633
+ readonly pie: "pie";
634
+ readonly blockArc: "blockArc";
635
+ readonly donut: "donut";
636
+ readonly noSymbol: "noSmoking";
637
+ readonly chord: "chord";
638
+ readonly arc: "arc";
639
+ readonly frame: "frame";
640
+ readonly halfFrame: "halfFrame";
641
+ readonly lShape: "corner";
642
+ readonly diagonalStripe: "diagStripe";
643
+ readonly cross: "plus";
644
+ readonly plaque: "plaque";
645
+ readonly cylinder: "can";
646
+ readonly cube: "cube";
647
+ readonly beveledRectangle: "bevel";
648
+ readonly foldedCorner: "foldedCorner";
649
+ readonly smileyFace: "smileyFace";
650
+ readonly heart: "heart";
651
+ readonly lightningBolt: "lightningBolt";
652
+ readonly sun: "sun";
653
+ readonly moon: "moon";
654
+ readonly cloud: "cloud";
655
+ readonly leftBracket: "leftBracket";
656
+ readonly rightBracket: "rightBracket";
657
+ readonly leftBrace: "leftBrace";
658
+ readonly rightBrace: "rightBrace";
659
+ readonly bracketPair: "bracketPair";
660
+ readonly bracePair: "bracePair";
661
+ readonly rectangle: "rect";
662
+ readonly roundedRectangle: "roundRect";
663
+ readonly roundedCornerRectangle: "round1Rect";
664
+ readonly topRoundedCornersRectangle: "round2SameRect";
665
+ readonly diagonalRoundedCornersRectangle: "round2DiagRect";
666
+ readonly snippedCornerRectangle: "snip1Rect";
667
+ readonly topSnippedCornersRectangle: "snip2SameRect";
668
+ readonly diagonalSnippedCornersRectangle: "snip2DiagRect";
669
+ readonly roundedAndSnippedCornersRectangle: "snipRoundRect";
670
+ readonly rightArrow: "rightArrow";
671
+ readonly leftArrow: "leftArrow";
672
+ readonly upArrow: "upArrow";
673
+ readonly downArrow: "downArrow";
674
+ readonly leftRightArrow: "leftRightArrow";
675
+ readonly upDownArrow: "upDownArrow";
676
+ readonly quadArrow: "quadArrow";
677
+ readonly leftRightUpArrow: "leftRightUpArrow";
678
+ readonly bentArrow: "bentArrow";
679
+ readonly uTurnArrow: "uturnArrow";
680
+ readonly leftUpArrow: "leftUpArrow";
681
+ readonly bentUpArrow: "bentUpArrow";
682
+ readonly curvedRightArrow: "curvedRightArrow";
683
+ readonly curvedLeftArrow: "curvedLeftArrow";
684
+ readonly curvedUpArrow: "curvedUpArrow";
685
+ readonly curvedDownArrow: "curvedDownArrow";
686
+ readonly stripedRightArrow: "stripedRightArrow";
687
+ readonly notchedRightArrow: "notchedRightArrow";
688
+ readonly pentagonArrow: "homePlate";
689
+ readonly chevron: "chevron";
690
+ readonly rightArrowCallout: "rightArrowCallout";
691
+ readonly downArrowCallout: "downArrowCallout";
692
+ readonly leftArrowCallout: "leftArrowCallout";
693
+ readonly upArrowCallout: "upArrowCallout";
694
+ readonly leftRightArrowCallout: "leftRightArrowCallout";
695
+ readonly upDownArrowCallout: "upDownArrowCallout";
696
+ readonly quadArrowCallout: "quadArrowCallout";
697
+ readonly circularArrow: "circularArrow";
698
+ readonly leftCircularArrow: "leftCircularArrow";
699
+ readonly leftRightCircularArrow: "leftRightCircularArrow";
700
+ readonly swooshArrow: "swooshArrow";
701
+ readonly mathPlus: "mathPlus";
702
+ readonly mathMinus: "mathMinus";
703
+ readonly mathMultiply: "mathMultiply";
704
+ readonly mathDivide: "mathDivide";
705
+ readonly mathEqual: "mathEqual";
706
+ readonly mathNotEqual: "mathNotEqual";
707
+ readonly flowChartProcess: "flowChartProcess";
708
+ readonly flowChartAlternateProcess: "flowChartAlternateProcess";
709
+ readonly flowChartDecision: "flowChartDecision";
710
+ readonly flowChartInputOutput: "flowChartInputOutput";
711
+ readonly flowChartPredefinedProcess: "flowChartPredefinedProcess";
712
+ readonly flowChartInternalStorage: "flowChartInternalStorage";
713
+ readonly flowChartDocument: "flowChartDocument";
714
+ readonly flowChartMultidocument: "flowChartMultidocument";
715
+ readonly flowChartTerminator: "flowChartTerminator";
716
+ readonly flowChartPreparation: "flowChartPreparation";
717
+ readonly flowChartManualInput: "flowChartManualInput";
718
+ readonly flowChartManualOperation: "flowChartManualOperation";
719
+ readonly flowChartConnector: "flowChartConnector";
720
+ readonly flowChartOffpageConnector: "flowChartOffpageConnector";
721
+ readonly flowChartPunchedCard: "flowChartPunchedCard";
722
+ readonly flowChartPunchedTape: "flowChartPunchedTape";
723
+ readonly flowChartSummingJunction: "flowChartSummingJunction";
724
+ readonly flowChartOr: "flowChartOr";
725
+ readonly flowChartCollate: "flowChartCollate";
726
+ readonly flowChartSort: "flowChartSort";
727
+ readonly flowChartExtract: "flowChartExtract";
728
+ readonly flowChartMerge: "flowChartMerge";
729
+ readonly flowChartOfflineStorage: "flowChartOfflineStorage";
730
+ readonly flowChartOnlineStorage: "flowChartOnlineStorage";
731
+ readonly flowChartDelay: "flowChartDelay";
732
+ readonly flowChartMagneticTape: "flowChartMagneticTape";
733
+ readonly flowChartMagneticDisk: "flowChartMagneticDisk";
734
+ readonly flowChartMagneticDrum: "flowChartMagneticDrum";
735
+ readonly flowChartDisplay: "flowChartDisplay";
736
+ readonly explosion12: "irregularSeal1";
737
+ readonly explosion14: "irregularSeal2";
738
+ readonly star4: "star4";
739
+ readonly star5: "star5";
740
+ readonly star6: "star6";
741
+ readonly star7: "star7";
742
+ readonly star8: "star8";
743
+ readonly star10: "star10";
744
+ readonly star12: "star12";
745
+ readonly star16: "star16";
746
+ readonly star24: "star24";
747
+ readonly star32: "star32";
748
+ readonly ribbonUp: "ribbon2";
749
+ readonly ribbonDown: "ribbon";
750
+ readonly curvedRibbonUp: "ellipseRibbon2";
751
+ readonly curvedRibbonDown: "ellipseRibbon";
752
+ readonly leftRightRibbon: "leftRightRibbon";
753
+ readonly verticalScroll: "verticalScroll";
754
+ readonly horizontalScroll: "horizontalScroll";
755
+ readonly wave: "wave";
756
+ readonly doubleWave: "doubleWave";
757
+ readonly rectangularCallout: "wedgeRectCallout";
758
+ readonly roundedRectangularCallout: "wedgeRoundRectCallout";
759
+ readonly ellipticalCallout: "wedgeEllipseCallout";
760
+ readonly cloudCallout: "cloudCallout";
761
+ readonly lineCallout: "borderCallout1";
762
+ readonly bentLineCallout: "borderCallout2";
763
+ readonly doubleBentLineCallout: "borderCallout3";
764
+ readonly lineCalloutWithAccentBar: "accentCallout1";
765
+ readonly bentLineCalloutWithAccentBar: "accentCallout2";
766
+ readonly doubleBentLineCalloutWithAccentBar: "accentCallout3";
767
+ readonly lineCalloutWithNoBorder: "callout1";
768
+ readonly bentLineCalloutWithNoBorder: "callout2";
769
+ readonly doubleBentLineCalloutWithNoBorder: "callout3";
770
+ readonly lineCalloutWithBorderAndAccentBar: "accentBorderCallout1";
771
+ readonly bentLineCalloutWithBorderAndAccentBar: "accentBorderCallout2";
772
+ readonly doubleBentLineCalloutWithBorderAndAccentBar: "accentBorderCallout3";
773
+ readonly actionButtonBlank: "actionButtonBlank";
774
+ readonly actionButtonHome: "actionButtonHome";
775
+ readonly actionButtonHelp: "actionButtonHelp";
776
+ readonly actionButtonInformation: "actionButtonInformation";
777
+ readonly actionButtonForwardNext: "actionButtonForwardNext";
778
+ readonly actionButtonBackPrevious: "actionButtonBackPrevious";
779
+ readonly actionButtonEnd: "actionButtonEnd";
780
+ readonly actionButtonBeginning: "actionButtonBeginning";
781
+ readonly actionButtonReturn: "actionButtonReturn";
782
+ readonly actionButtonDocument: "actionButtonDocument";
783
+ readonly actionButtonSound: "actionButtonSound";
784
+ readonly actionButtonMovie: "actionButtonMovie";
785
+ readonly gear6: "gear6";
786
+ readonly gear9: "gear9";
787
+ readonly funnel: "funnel";
788
+ readonly cornerTabs: "cornerTabs";
789
+ readonly squareTabs: "squareTabs";
790
+ readonly plaqueTabs: "plaqueTabs";
791
+ readonly chartX: "chartX";
792
+ readonly chartStar: "chartStar";
793
+ readonly chartPlus: "chartPlus";
794
+ };
795
+
796
+ /**
797
+ * The adjustments of each preset shape that has them, by shape type.
798
+ *
799
+ * Angles are measured clockwise from 3 o'clock. Word keeps each value within the range the shape
800
+ * allows, so a value that is too large acts like the largest allowed value.
801
+ *
802
+ * @publicApi
803
+ */
804
+ export declare type PresetShapeAdjustments = {
805
+ readonly arc: {
806
+ /** Angle where the arc starts, in degrees clockwise from 3 o'clock. Default `270` */
807
+ readonly startAngle?: number;
808
+ /** Angle where the arc ends, in degrees clockwise from 3 o'clock. Default `0` */
809
+ readonly endAngle?: number;
810
+ };
811
+ readonly bentArrow: {
812
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
813
+ readonly shaftThickness?: number;
814
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
815
+ readonly headWidth?: number;
816
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
817
+ readonly headLength?: number;
818
+ /** Outer radius of the bend, as a percent of the shorter side. Default `43.75` */
819
+ readonly bendRadius?: number;
820
+ };
821
+ readonly bentLineCallout: {
822
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
823
+ readonly lineStartX?: number;
824
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
825
+ readonly lineStartY?: number;
826
+ /** Bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
827
+ readonly bendX?: number;
828
+ /** Bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
829
+ readonly bendY?: number;
830
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-46.667` */
831
+ readonly lineEndX?: number;
832
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
833
+ readonly lineEndY?: number;
834
+ };
835
+ readonly bentLineCalloutWithAccentBar: {
836
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
837
+ readonly lineStartX?: number;
838
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
839
+ readonly lineStartY?: number;
840
+ /** Bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
841
+ readonly bendX?: number;
842
+ /** Bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
843
+ readonly bendY?: number;
844
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-46.667` */
845
+ readonly lineEndX?: number;
846
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
847
+ readonly lineEndY?: number;
848
+ };
849
+ readonly bentLineCalloutWithBorderAndAccentBar: {
850
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
851
+ readonly lineStartX?: number;
852
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
853
+ readonly lineStartY?: number;
854
+ /** Bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
855
+ readonly bendX?: number;
856
+ /** Bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
857
+ readonly bendY?: number;
858
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-46.667` */
859
+ readonly lineEndX?: number;
860
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
861
+ readonly lineEndY?: number;
862
+ };
863
+ readonly bentLineCalloutWithNoBorder: {
864
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
865
+ readonly lineStartX?: number;
866
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
867
+ readonly lineStartY?: number;
868
+ /** Bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
869
+ readonly bendX?: number;
870
+ /** Bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
871
+ readonly bendY?: number;
872
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-46.667` */
873
+ readonly lineEndX?: number;
874
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
875
+ readonly lineEndY?: number;
876
+ };
877
+ readonly bentUpArrow: {
878
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
879
+ readonly shaftThickness?: number;
880
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
881
+ readonly headWidth?: number;
882
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
883
+ readonly headLength?: number;
884
+ };
885
+ readonly beveledRectangle: {
886
+ /** Width of the bevelled edge, as a percent of the shorter side. Default `12.5` */
887
+ readonly bevelWidth?: number;
888
+ };
889
+ readonly blockArc: {
890
+ /** Angle where the arc starts, in degrees clockwise from 3 o'clock. Default `180` */
891
+ readonly startAngle?: number;
892
+ /** Angle where the arc ends, in degrees clockwise from 3 o'clock. Default `0` */
893
+ readonly endAngle?: number;
894
+ /** Thickness of the arc, as a percent of the shorter side. Default `25` */
895
+ readonly thickness?: number;
896
+ };
897
+ readonly bracePair: {
898
+ /** Radius of the curves in the braces, as a percent of the shorter side. Default `8.333` */
899
+ readonly curveRadius?: number;
900
+ };
901
+ readonly bracketPair: {
902
+ /** Radius of the corners of the brackets, as a percent of the shorter side. Default `16.667` */
903
+ readonly cornerRadius?: number;
904
+ };
905
+ readonly chevron: {
906
+ /** Length of the point, as a percent of the shorter side. Default `50` */
907
+ readonly pointLength?: number;
908
+ };
909
+ readonly chord: {
910
+ /** Angle where the chord starts, in degrees clockwise from 3 o'clock. Default `45` */
911
+ readonly startAngle?: number;
912
+ /** Angle where the chord ends, in degrees clockwise from 3 o'clock. Default `270` */
913
+ readonly endAngle?: number;
914
+ };
915
+ readonly circularArrow: {
916
+ /** Thickness of the arrow's body, as a percent of the shorter side. Default `12.5` */
917
+ readonly shaftThickness?: number;
918
+ /** Angle the arrowhead covers, in degrees. Default `19.039` */
919
+ readonly headAngle?: number;
920
+ /** Angle where the arrow ends, in degrees clockwise from 3 o'clock. Default `340.961` */
921
+ readonly endAngle?: number;
922
+ /** Angle where the arrow starts, in degrees clockwise from 3 o'clock. Default `180` */
923
+ readonly startAngle?: number;
924
+ /** Width of the arrowhead, as a percent of the shorter side. Default `25` */
925
+ readonly headWidth?: number;
926
+ };
927
+ readonly cloudCallout: {
928
+ /** Tip of the pointer, from the centre, as a percent of the width. Negative values are to the left. Default `-20.833` */
929
+ readonly pointerX?: number;
930
+ /** Tip of the pointer, from the centre, as a percent of the height. Negative values are above the centre. Default `62.5` */
931
+ readonly pointerY?: number;
932
+ };
933
+ readonly cross: {
934
+ /** Size of the cut-away corners, as a percent of the shorter side. Larger values make thinner arms. Default `25` */
935
+ readonly cornerSize?: number;
936
+ };
937
+ readonly cube: {
938
+ /** Depth of the top and side faces, as a percent of the shorter side. Default `25` */
939
+ readonly depth?: number;
940
+ };
941
+ readonly curvedConnector: {
942
+ /** Where the connector bends, from the left edge, as a percent of the width. Default `50` */
943
+ readonly bendX?: number;
944
+ };
945
+ readonly curvedConnectorFourBends: {
946
+ /** Where the connector first bends, from the left edge, as a percent of the width. Default `50` */
947
+ readonly firstBendX?: number;
948
+ /** Where the connector bends a second time, from the top edge, as a percent of the height. Default `50` */
949
+ readonly secondBendY?: number;
950
+ /** Where the connector bends a third time, from the left edge, as a percent of the width. Default `50` */
951
+ readonly thirdBendX?: number;
952
+ };
953
+ readonly curvedConnectorThreeBends: {
954
+ /** Where the connector first bends, from the left edge, as a percent of the width. Default `50` */
955
+ readonly firstBendX?: number;
956
+ /** Where the connector bends a second time, from the top edge, as a percent of the height. Default `50` */
957
+ readonly secondBendY?: number;
958
+ };
959
+ readonly curvedDownArrow: {
960
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
961
+ readonly shaftThickness?: number;
962
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
963
+ readonly headWidth?: number;
964
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
965
+ readonly headLength?: number;
966
+ };
967
+ readonly curvedLeftArrow: {
968
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
969
+ readonly shaftThickness?: number;
970
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
971
+ readonly headWidth?: number;
972
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
973
+ readonly headLength?: number;
974
+ };
975
+ readonly curvedRibbonDown: {
976
+ /** Thickness of the ribbon, as a percent of the height. Default `25` */
977
+ readonly thickness?: number;
978
+ /** Width of the centre section, as a percent of the width. Default `50` */
979
+ readonly centerWidth?: number;
980
+ /** How far the ribbon curves, as a percent of the height. Default `12.5` */
981
+ readonly curveDepth?: number;
982
+ };
983
+ readonly curvedRibbonUp: {
984
+ /** Thickness of the ribbon, as a percent of the height. Default `25` */
985
+ readonly thickness?: number;
986
+ /** Width of the centre section, as a percent of the width. Default `50` */
987
+ readonly centerWidth?: number;
988
+ /** How far the ribbon curves, as a percent of the height. Default `12.5` */
989
+ readonly curveDepth?: number;
990
+ };
991
+ readonly curvedRightArrow: {
992
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
993
+ readonly shaftThickness?: number;
994
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
995
+ readonly headWidth?: number;
996
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
997
+ readonly headLength?: number;
998
+ };
999
+ readonly curvedUpArrow: {
1000
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1001
+ readonly shaftThickness?: number;
1002
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
1003
+ readonly headWidth?: number;
1004
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
1005
+ readonly headLength?: number;
1006
+ };
1007
+ readonly cylinder: {
1008
+ /** Height of the elliptical top, as a percent of the shorter side. Default `25` */
1009
+ readonly topHeight?: number;
1010
+ };
1011
+ readonly diagonalRoundedCornersRectangle: {
1012
+ /** Radius of the top-left and bottom-right corners, as a percent of the shorter side. Default `16.667` */
1013
+ readonly topLeftBottomRightRadius?: number;
1014
+ /** Radius of the top-right and bottom-left corners, as a percent of the shorter side. Default `0` */
1015
+ readonly topRightBottomLeftRadius?: number;
1016
+ };
1017
+ readonly diagonalSnippedCornersRectangle: {
1018
+ /** Size of the cut top-left and bottom-right corners, as a percent of the shorter side. Default `0` */
1019
+ readonly topLeftBottomRightSize?: number;
1020
+ /** Size of the cut top-right and bottom-left corners, as a percent of the shorter side. Default `16.667` */
1021
+ readonly topRightBottomLeftSize?: number;
1022
+ };
1023
+ readonly diagonalStripe: {
1024
+ /** How much of the top and left edges the stripe covers, as a percent of the width and height. Default `50` */
1025
+ readonly stripeWidth?: number;
1026
+ };
1027
+ readonly donut: {
1028
+ /** Thickness of the ring, as a percent of the shorter side. Default `25` */
1029
+ readonly thickness?: number;
1030
+ };
1031
+ readonly doubleBentLineCallout: {
1032
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1033
+ readonly lineStartX?: number;
1034
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1035
+ readonly lineStartY?: number;
1036
+ /** First bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1037
+ readonly firstBendX?: number;
1038
+ /** First bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
1039
+ readonly firstBendY?: number;
1040
+ /** Second bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1041
+ readonly secondBendX?: number;
1042
+ /** Second bend in the callout line, from the top edge, as a percent of the height. Default `100` */
1043
+ readonly secondBendY?: number;
1044
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-8.333` */
1045
+ readonly lineEndX?: number;
1046
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.963` */
1047
+ readonly lineEndY?: number;
1048
+ };
1049
+ readonly doubleBentLineCalloutWithAccentBar: {
1050
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1051
+ readonly lineStartX?: number;
1052
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1053
+ readonly lineStartY?: number;
1054
+ /** First bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1055
+ readonly firstBendX?: number;
1056
+ /** First bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
1057
+ readonly firstBendY?: number;
1058
+ /** Second bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1059
+ readonly secondBendX?: number;
1060
+ /** Second bend in the callout line, from the top edge, as a percent of the height. Default `100` */
1061
+ readonly secondBendY?: number;
1062
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-8.333` */
1063
+ readonly lineEndX?: number;
1064
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.963` */
1065
+ readonly lineEndY?: number;
1066
+ };
1067
+ readonly doubleBentLineCalloutWithBorderAndAccentBar: {
1068
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1069
+ readonly lineStartX?: number;
1070
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1071
+ readonly lineStartY?: number;
1072
+ /** First bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1073
+ readonly firstBendX?: number;
1074
+ /** First bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
1075
+ readonly firstBendY?: number;
1076
+ /** Second bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1077
+ readonly secondBendX?: number;
1078
+ /** Second bend in the callout line, from the top edge, as a percent of the height. Default `100` */
1079
+ readonly secondBendY?: number;
1080
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-8.333` */
1081
+ readonly lineEndX?: number;
1082
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.963` */
1083
+ readonly lineEndY?: number;
1084
+ };
1085
+ readonly doubleBentLineCalloutWithNoBorder: {
1086
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1087
+ readonly lineStartX?: number;
1088
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1089
+ readonly lineStartY?: number;
1090
+ /** First bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1091
+ readonly firstBendX?: number;
1092
+ /** First bend in the callout line, from the top edge, as a percent of the height. Default `18.75` */
1093
+ readonly firstBendY?: number;
1094
+ /** Second bend in the callout line, from the left edge, as a percent of the width. Default `-16.667` */
1095
+ readonly secondBendX?: number;
1096
+ /** Second bend in the callout line, from the top edge, as a percent of the height. Default `100` */
1097
+ readonly secondBendY?: number;
1098
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-8.333` */
1099
+ readonly lineEndX?: number;
1100
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.963` */
1101
+ readonly lineEndY?: number;
1102
+ };
1103
+ readonly doubleWave: {
1104
+ /** Height of the waves, as a percent of the height. Default `6.25` */
1105
+ readonly waveHeight?: number;
1106
+ /** Shifts the waves sideways, as a percent of the width, from -10 to 10. Default `0` */
1107
+ readonly skew?: number;
1108
+ };
1109
+ readonly downArrow: {
1110
+ /** Thickness of the shaft, as a percent of the width. Default `50` */
1111
+ readonly shaftThickness?: number;
1112
+ /** Length of the arrowhead, as a percent of the shorter side. Default `50` */
1113
+ readonly headLength?: number;
1114
+ };
1115
+ readonly downArrowCallout: {
1116
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1117
+ readonly shaftThickness?: number;
1118
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
1119
+ readonly headWidth?: number;
1120
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
1121
+ readonly headLength?: number;
1122
+ /** Height of the box, as a percent of the height. Default `64.977` */
1123
+ readonly boxHeight?: number;
1124
+ };
1125
+ readonly elbowConnector: {
1126
+ /** Where the connector bends, from the left edge, as a percent of the width. Default `50` */
1127
+ readonly bendX?: number;
1128
+ };
1129
+ readonly elbowConnectorFourBends: {
1130
+ /** Where the connector first bends, from the left edge, as a percent of the width. Default `50` */
1131
+ readonly firstBendX?: number;
1132
+ /** Where the connector bends a second time, from the top edge, as a percent of the height. Default `50` */
1133
+ readonly secondBendY?: number;
1134
+ /** Where the connector bends a third time, from the left edge, as a percent of the width. Default `50` */
1135
+ readonly thirdBendX?: number;
1136
+ };
1137
+ readonly elbowConnectorThreeBends: {
1138
+ /** Where the connector first bends, from the left edge, as a percent of the width. Default `50` */
1139
+ readonly firstBendX?: number;
1140
+ /** Where the connector bends a second time, from the top edge, as a percent of the height. Default `50` */
1141
+ readonly secondBendY?: number;
1142
+ };
1143
+ readonly ellipticalCallout: {
1144
+ /** Tip of the pointer, from the centre, as a percent of the width. Negative values are to the left. Default `-20.833` */
1145
+ readonly pointerX?: number;
1146
+ /** Tip of the pointer, from the centre, as a percent of the height. Negative values are above the centre. Default `62.5` */
1147
+ readonly pointerY?: number;
1148
+ };
1149
+ readonly foldedCorner: {
1150
+ /** Size of the folded corner, as a percent of the shorter side. Default `16.667` */
1151
+ readonly foldSize?: number;
1152
+ };
1153
+ readonly frame: {
1154
+ /** Thickness of the frame, as a percent of the shorter side. Default `12.5` */
1155
+ readonly thickness?: number;
1156
+ };
1157
+ readonly gear6: {
1158
+ /** Height of the teeth, as a percent of the shorter side. Default `15` */
1159
+ readonly toothHeight?: number;
1160
+ /** Width of the top of each tooth, as a percent of the shorter side. Default `3.526` */
1161
+ readonly toothWidth?: number;
1162
+ };
1163
+ readonly gear9: {
1164
+ /** Height of the teeth, as a percent of the shorter side. Default `10` */
1165
+ readonly toothHeight?: number;
1166
+ /** Width of the top of each tooth, as a percent of the shorter side. Default `1.763` */
1167
+ readonly toothWidth?: number;
1168
+ };
1169
+ readonly halfFrame: {
1170
+ /** Thickness of the horizontal arm, as a percent of the shorter side. Default `33.333` */
1171
+ readonly horizontalArmThickness?: number;
1172
+ /** Thickness of the vertical arm, as a percent of the shorter side. Default `33.333` */
1173
+ readonly verticalArmThickness?: number;
1174
+ };
1175
+ readonly hexagon: {
1176
+ /** How far the left and right points stick out, as a percent of the shorter side. Default `25` */
1177
+ readonly pointLength?: number;
1178
+ };
1179
+ readonly horizontalScroll: {
1180
+ /** Size of the rolled ends, as a percent of the shorter side. Default `12.5` */
1181
+ readonly rollSize?: number;
1182
+ };
1183
+ readonly leftArrow: {
1184
+ /** Thickness of the shaft, as a percent of the height. Default `50` */
1185
+ readonly shaftThickness?: number;
1186
+ /** Length of the arrowhead, as a percent of the shorter side. Default `50` */
1187
+ readonly headLength?: number;
1188
+ };
1189
+ readonly leftArrowCallout: {
1190
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1191
+ readonly shaftThickness?: number;
1192
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
1193
+ readonly headWidth?: number;
1194
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
1195
+ readonly headLength?: number;
1196
+ /** Width of the box, as a percent of the width. Default `64.977` */
1197
+ readonly boxWidth?: number;
1198
+ };
1199
+ readonly leftBrace: {
1200
+ /** Height of the curves, as a percent of the shorter side. Default `8.333` */
1201
+ readonly curveHeight?: number;
1202
+ /** Where the middle point is, from the top, as a percent of the height. Default `50` */
1203
+ readonly pointPosition?: number;
1204
+ };
1205
+ readonly leftBracket: {
1206
+ /** Height of the curved corners, as a percent of the shorter side. Default `8.333` */
1207
+ readonly cornerHeight?: number;
1208
+ };
1209
+ readonly leftCircularArrow: {
1210
+ /** Thickness of the arrow's body, as a percent of the shorter side. Default `12.5` */
1211
+ readonly shaftThickness?: number;
1212
+ /** Angle the arrowhead covers, in degrees. Negative, because the arrow turns anticlockwise. Default `-19.039` */
1213
+ readonly headAngle?: number;
1214
+ /** Angle where the arrow ends, in degrees clockwise from 3 o'clock. Default `19.039` */
1215
+ readonly endAngle?: number;
1216
+ /** Angle where the arrow starts, in degrees clockwise from 3 o'clock. Default `180` */
1217
+ readonly startAngle?: number;
1218
+ /** Width of the arrowhead, as a percent of the shorter side. Default `25` */
1219
+ readonly headWidth?: number;
1220
+ };
1221
+ readonly leftRightArrow: {
1222
+ /** Thickness of the shaft, as a percent of the height. Default `50` */
1223
+ readonly shaftThickness?: number;
1224
+ /** Length of each arrowhead, as a percent of the shorter side. Default `50` */
1225
+ readonly headLength?: number;
1226
+ };
1227
+ readonly leftRightArrowCallout: {
1228
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1229
+ readonly shaftThickness?: number;
1230
+ /** Width of each arrowhead, as a percent of the shorter side. Default `50` */
1231
+ readonly headWidth?: number;
1232
+ /** Length of each arrowhead, as a percent of the shorter side. Default `25` */
1233
+ readonly headLength?: number;
1234
+ /** Width of the box, as a percent of the width. Default `48.123` */
1235
+ readonly boxWidth?: number;
1236
+ };
1237
+ readonly leftRightCircularArrow: {
1238
+ /** Thickness of the arrow's body, as a percent of the shorter side. Default `12.5` */
1239
+ readonly shaftThickness?: number;
1240
+ /** Angle each arrowhead covers, in degrees. Default `19.039` */
1241
+ readonly headAngle?: number;
1242
+ /** Angle where the arrow ends, in degrees clockwise from 3 o'clock. Default `340.961` */
1243
+ readonly endAngle?: number;
1244
+ /** Angle where the arrow starts, in degrees clockwise from 3 o'clock. Default `199.039` */
1245
+ readonly startAngle?: number;
1246
+ /** Width of the arrowhead, as a percent of the shorter side. Default `25` */
1247
+ readonly headWidth?: number;
1248
+ };
1249
+ readonly leftRightRibbon: {
1250
+ /** Thickness of the ribbon, as a percent of the height. Default `50` */
1251
+ readonly thickness?: number;
1252
+ /** Length of the pointed ends, as a percent of the shorter side. Default `50` */
1253
+ readonly endLength?: number;
1254
+ /** How far the right half is offset from the left half, as a percent of the height. Default `16.667` */
1255
+ readonly verticalOffset?: number;
1256
+ };
1257
+ readonly leftRightUpArrow: {
1258
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1259
+ readonly shaftThickness?: number;
1260
+ /** Width of each arrowhead, as a percent of the shorter side. Default `50` */
1261
+ readonly headWidth?: number;
1262
+ /** Length of each arrowhead, as a percent of the shorter side. Default `25` */
1263
+ readonly headLength?: number;
1264
+ };
1265
+ readonly leftUpArrow: {
1266
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1267
+ readonly shaftThickness?: number;
1268
+ /** Width of each arrowhead, as a percent of the shorter side. Default `50` */
1269
+ readonly headWidth?: number;
1270
+ /** Length of each arrowhead, as a percent of the shorter side. Default `25` */
1271
+ readonly headLength?: number;
1272
+ };
1273
+ readonly lineCallout: {
1274
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1275
+ readonly lineStartX?: number;
1276
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1277
+ readonly lineStartY?: number;
1278
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-38.333` */
1279
+ readonly lineEndX?: number;
1280
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
1281
+ readonly lineEndY?: number;
1282
+ };
1283
+ readonly lineCalloutWithAccentBar: {
1284
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1285
+ readonly lineStartX?: number;
1286
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1287
+ readonly lineStartY?: number;
1288
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-38.333` */
1289
+ readonly lineEndX?: number;
1290
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
1291
+ readonly lineEndY?: number;
1292
+ };
1293
+ readonly lineCalloutWithBorderAndAccentBar: {
1294
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1295
+ readonly lineStartX?: number;
1296
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1297
+ readonly lineStartY?: number;
1298
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-38.333` */
1299
+ readonly lineEndX?: number;
1300
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
1301
+ readonly lineEndY?: number;
1302
+ };
1303
+ readonly lineCalloutWithNoBorder: {
1304
+ /** Start of the callout line, from the left edge, as a percent of the width. Default `-8.333` */
1305
+ readonly lineStartX?: number;
1306
+ /** Start of the callout line, from the top edge, as a percent of the height. Default `18.75` */
1307
+ readonly lineStartY?: number;
1308
+ /** End of the callout line, where it points, from the left edge, as a percent of the width. Default `-38.333` */
1309
+ readonly lineEndX?: number;
1310
+ /** End of the callout line, where it points, from the top edge, as a percent of the height. Default `112.5` */
1311
+ readonly lineEndY?: number;
1312
+ };
1313
+ readonly lShape: {
1314
+ /** Thickness of the horizontal arm, as a percent of the shorter side. Default `50` */
1315
+ readonly horizontalArmThickness?: number;
1316
+ /** Thickness of the vertical arm, as a percent of the shorter side. Default `50` */
1317
+ readonly verticalArmThickness?: number;
1318
+ };
1319
+ readonly mathDivide: {
1320
+ /** Thickness of the bar, as a percent of the height. Default `23.52` */
1321
+ readonly thickness?: number;
1322
+ /** Gap between the bar and each dot, as a percent of the height. Default `5.88` */
1323
+ readonly gap?: number;
1324
+ /** Radius of the dots, as a percent of the height. Default `11.76` */
1325
+ readonly dotRadius?: number;
1326
+ };
1327
+ readonly mathEqual: {
1328
+ /** Thickness of each bar, as a percent of the height. Default `23.52` */
1329
+ readonly thickness?: number;
1330
+ /** Gap between the bars, as a percent of the height. Default `11.76` */
1331
+ readonly gap?: number;
1332
+ };
1333
+ readonly mathMinus: {
1334
+ /** Thickness of the bar, as a percent of the height. Default `23.52` */
1335
+ readonly thickness?: number;
1336
+ };
1337
+ readonly mathMultiply: {
1338
+ /** Thickness of the strokes, as a percent of the shorter side. Default `23.52` */
1339
+ readonly thickness?: number;
1340
+ };
1341
+ readonly mathNotEqual: {
1342
+ /** Thickness of each bar, as a percent of the height. Default `23.52` */
1343
+ readonly thickness?: number;
1344
+ /** Angle of the slash, in degrees. Default `110` */
1345
+ readonly slashAngle?: number;
1346
+ /** Gap between the bars, as a percent of the height. Default `11.76` */
1347
+ readonly gap?: number;
1348
+ };
1349
+ readonly mathPlus: {
1350
+ /** Thickness of the strokes, as a percent of the shorter side. Default `23.52` */
1351
+ readonly thickness?: number;
1352
+ };
1353
+ readonly moon: {
1354
+ /** Thickness of the crescent at its widest, as a percent of the shorter side. Default `50` */
1355
+ readonly thickness?: number;
1356
+ };
1357
+ readonly nonIsoscelesTrapezoid: {
1358
+ /** How far in the top-left corner is, as a percent of the shorter side. Default `25` */
1359
+ readonly leftSlant?: number;
1360
+ /** How far in the top-right corner is, as a percent of the shorter side. Default `25` */
1361
+ readonly rightSlant?: number;
1362
+ };
1363
+ readonly noSymbol: {
1364
+ /** Thickness of the ring and the bar, as a percent of the shorter side. Default `18.75` */
1365
+ readonly thickness?: number;
1366
+ };
1367
+ readonly notchedRightArrow: {
1368
+ /** Thickness of the shaft, as a percent of the height. Default `50` */
1369
+ readonly shaftThickness?: number;
1370
+ /** Length of the arrowhead, as a percent of the shorter side. Default `50` */
1371
+ readonly headLength?: number;
1372
+ };
1373
+ readonly octagon: {
1374
+ /** Size of the cut corners, as a percent of the shorter side. Default `29.289` */
1375
+ readonly cornerSize?: number;
1376
+ };
1377
+ readonly parallelogram: {
1378
+ /** How far right the top edge is shifted, as a percent of the shorter side. Default `25` */
1379
+ readonly slant?: number;
1380
+ };
1381
+ readonly pentagonArrow: {
1382
+ /** Length of the point, as a percent of the shorter side. Default `50` */
1383
+ readonly pointLength?: number;
1384
+ };
1385
+ readonly pie: {
1386
+ /** Angle where the slice starts, in degrees clockwise from 3 o'clock. Default `0` */
1387
+ readonly startAngle?: number;
1388
+ /** Angle where the slice ends, in degrees clockwise from 3 o'clock. Default `270` */
1389
+ readonly endAngle?: number;
1390
+ };
1391
+ readonly plaque: {
1392
+ /** Radius of the curved-in corners, as a percent of the shorter side. Default `16.667` */
1393
+ readonly cornerRadius?: number;
1394
+ };
1395
+ readonly quadArrow: {
1396
+ /** Thickness of the shaft, as a percent of the shorter side. Default `22.5` */
1397
+ readonly shaftThickness?: number;
1398
+ /** Width of each arrowhead, as a percent of the shorter side. Default `45` */
1399
+ readonly headWidth?: number;
1400
+ /** Length of each arrowhead, as a percent of the shorter side. Default `22.5` */
1401
+ readonly headLength?: number;
1402
+ };
1403
+ readonly quadArrowCallout: {
1404
+ /** Thickness of the shaft, as a percent of the shorter side. Default `18.515` */
1405
+ readonly shaftThickness?: number;
1406
+ /** Width of each arrowhead, as a percent of the shorter side. Default `37.03` */
1407
+ readonly headWidth?: number;
1408
+ /** Length of each arrowhead, as a percent of the shorter side. Default `18.515` */
1409
+ readonly headLength?: number;
1410
+ /** Size of the box, as a percent of the width and height. Default `48.123` */
1411
+ readonly boxSize?: number;
1412
+ };
1413
+ readonly rectangularCallout: {
1414
+ /** Tip of the pointer, from the centre, as a percent of the width. Negative values are to the left. Default `-20.833` */
1415
+ readonly pointerX?: number;
1416
+ /** Tip of the pointer, from the centre, as a percent of the height. Negative values are above the centre. Default `62.5` */
1417
+ readonly pointerY?: number;
1418
+ };
1419
+ readonly ribbonDown: {
1420
+ /** How far the ends are offset from the centre section, as a percent of the height. Default `16.667` */
1421
+ readonly endOffset?: number;
1422
+ /** Width of the centre section, as a percent of the width. Default `50` */
1423
+ readonly centerWidth?: number;
1424
+ };
1425
+ readonly ribbonUp: {
1426
+ /** How far the ends are offset from the centre section, as a percent of the height. Default `16.667` */
1427
+ readonly endOffset?: number;
1428
+ /** Width of the centre section, as a percent of the width. Default `50` */
1429
+ readonly centerWidth?: number;
1430
+ };
1431
+ readonly rightArrow: {
1432
+ /** Thickness of the shaft, as a percent of the height. Default `50` */
1433
+ readonly shaftThickness?: number;
1434
+ /** Length of the arrowhead, as a percent of the shorter side. Default `50` */
1435
+ readonly headLength?: number;
1436
+ };
1437
+ readonly rightArrowCallout: {
1438
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1439
+ readonly shaftThickness?: number;
1440
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
1441
+ readonly headWidth?: number;
1442
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
1443
+ readonly headLength?: number;
1444
+ /** Width of the box, as a percent of the width. Default `64.977` */
1445
+ readonly boxWidth?: number;
1446
+ };
1447
+ readonly rightBrace: {
1448
+ /** Height of the curves, as a percent of the shorter side. Default `8.333` */
1449
+ readonly curveHeight?: number;
1450
+ /** Where the middle point is, from the top, as a percent of the height. Default `50` */
1451
+ readonly pointPosition?: number;
1452
+ };
1453
+ readonly rightBracket: {
1454
+ /** Height of the curved corners, as a percent of the shorter side. Default `8.333` */
1455
+ readonly cornerHeight?: number;
1456
+ };
1457
+ readonly roundedAndSnippedCornersRectangle: {
1458
+ /** Radius of the rounded top-left corner, as a percent of the shorter side. Default `16.667` */
1459
+ readonly roundedCornerRadius?: number;
1460
+ /** Size of the cut top-right corner, as a percent of the shorter side. Default `16.667` */
1461
+ readonly snippedCornerSize?: number;
1462
+ };
1463
+ readonly roundedCornerRectangle: {
1464
+ /** Radius of the top-right corner, as a percent of the shorter side. Default `16.667` */
1465
+ readonly cornerRadius?: number;
1466
+ };
1467
+ readonly roundedRectangle: {
1468
+ /** Radius of the corners, as a percent of the shorter side. 50 makes the ends fully round. Default `16.667` */
1469
+ readonly cornerRadius?: number;
1470
+ };
1471
+ readonly roundedRectangularCallout: {
1472
+ /** Tip of the pointer, from the centre, as a percent of the width. Negative values are to the left. Default `-20.833` */
1473
+ readonly pointerX?: number;
1474
+ /** Tip of the pointer, from the centre, as a percent of the height. Negative values are above the centre. Default `62.5` */
1475
+ readonly pointerY?: number;
1476
+ /** Radius of the corners, as a percent of the shorter side. Default `16.667` */
1477
+ readonly cornerRadius?: number;
1478
+ };
1479
+ readonly smileyFace: {
1480
+ /** How much the mouth curves, as a percent of the height. Negative values frown. Default `4.653` */
1481
+ readonly smile?: number;
1482
+ };
1483
+ readonly snippedCornerRectangle: {
1484
+ /** Size of the cut top-right corner, as a percent of the shorter side. Default `16.667` */
1485
+ readonly cornerSize?: number;
1486
+ };
1487
+ readonly star10: {
1488
+ /** Radius of the inner points, as a percent of the outer radius. Default `85.066` */
1489
+ readonly innerRadius?: number;
1490
+ };
1491
+ readonly star12: {
1492
+ /** Radius of the inner points, as a percent of the outer radius. Default `75` */
1493
+ readonly innerRadius?: number;
1494
+ };
1495
+ readonly star16: {
1496
+ /** Radius of the inner points, as a percent of the outer radius. Default `75` */
1497
+ readonly innerRadius?: number;
1498
+ };
1499
+ readonly star24: {
1500
+ /** Radius of the inner points, as a percent of the outer radius. Default `75` */
1501
+ readonly innerRadius?: number;
1502
+ };
1503
+ readonly star32: {
1504
+ /** Radius of the inner points, as a percent of the outer radius. Default `75` */
1505
+ readonly innerRadius?: number;
1506
+ };
1507
+ readonly star4: {
1508
+ /** Radius of the inner points, as a percent of the outer radius. Default `25` */
1509
+ readonly innerRadius?: number;
1510
+ };
1511
+ readonly star5: {
1512
+ /** Radius of the inner points, as a percent of the outer radius. Default `38.196` */
1513
+ readonly innerRadius?: number;
1514
+ };
1515
+ readonly star6: {
1516
+ /** Radius of the inner points, as a percent of the outer radius. Default `57.736` */
1517
+ readonly innerRadius?: number;
1518
+ };
1519
+ readonly star7: {
1520
+ /** Radius of the inner points, as a percent of the outer radius. Default `69.202` */
1521
+ readonly innerRadius?: number;
1522
+ };
1523
+ readonly star8: {
1524
+ /** Radius of the inner points, as a percent of the outer radius. Default `75` */
1525
+ readonly innerRadius?: number;
1526
+ };
1527
+ readonly stripedRightArrow: {
1528
+ /** Thickness of the shaft, as a percent of the height. Default `50` */
1529
+ readonly shaftThickness?: number;
1530
+ /** Length of the arrowhead, as a percent of the shorter side. Default `50` */
1531
+ readonly headLength?: number;
1532
+ };
1533
+ readonly sun: {
1534
+ /** Length of the rays, from the edge to the central disc, as a percent of the width and height. Default `25` */
1535
+ readonly rayLength?: number;
1536
+ };
1537
+ readonly swooshArrow: {
1538
+ /** Thickness of the shaft where it meets the arrowhead, as a percent of the height. Default `25` */
1539
+ readonly shaftThickness?: number;
1540
+ /** Length of the arrowhead, as a percent of the shorter side. Default `16.667` */
1541
+ readonly headLength?: number;
1542
+ };
1543
+ readonly teardrop: {
1544
+ /** How far the point reaches, as a percent of the distance from the centre to the top-right corner. Default `100` */
1545
+ readonly pointLength?: number;
1546
+ };
1547
+ readonly topRoundedCornersRectangle: {
1548
+ /** Radius of the top corners, as a percent of the shorter side. Default `16.667` */
1549
+ readonly topCornerRadius?: number;
1550
+ /** Radius of the bottom corners, as a percent of the shorter side. Default `0` */
1551
+ readonly bottomCornerRadius?: number;
1552
+ };
1553
+ readonly topSnippedCornersRectangle: {
1554
+ /** Size of the cut top corners, as a percent of the shorter side. Default `16.667` */
1555
+ readonly topCornerSize?: number;
1556
+ /** Size of the cut bottom corners, as a percent of the shorter side. Default `0` */
1557
+ readonly bottomCornerSize?: number;
1558
+ };
1559
+ readonly trapezoid: {
1560
+ /** How far in the top corners are, as a percent of the shorter side. Default `25` */
1561
+ readonly slant?: number;
1562
+ };
1563
+ readonly triangle: {
1564
+ /** Where the top point is, from the left edge, as a percent of the width. Default `50` */
1565
+ readonly apexPosition?: number;
1566
+ };
1567
+ readonly upArrow: {
1568
+ /** Thickness of the shaft, as a percent of the width. Default `50` */
1569
+ readonly shaftThickness?: number;
1570
+ /** Length of the arrowhead, as a percent of the shorter side. Default `50` */
1571
+ readonly headLength?: number;
1572
+ };
1573
+ readonly upArrowCallout: {
1574
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1575
+ readonly shaftThickness?: number;
1576
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
1577
+ readonly headWidth?: number;
1578
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
1579
+ readonly headLength?: number;
1580
+ /** Height of the box, as a percent of the height. Default `64.977` */
1581
+ readonly boxHeight?: number;
1582
+ };
1583
+ readonly upDownArrow: {
1584
+ /** Thickness of the shaft, as a percent of the width. Default `50` */
1585
+ readonly shaftThickness?: number;
1586
+ /** Length of each arrowhead, as a percent of the shorter side. Default `50` */
1587
+ readonly headLength?: number;
1588
+ };
1589
+ readonly upDownArrowCallout: {
1590
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1591
+ readonly shaftThickness?: number;
1592
+ /** Width of each arrowhead, as a percent of the shorter side. Default `50` */
1593
+ readonly headWidth?: number;
1594
+ /** Length of each arrowhead, as a percent of the shorter side. Default `25` */
1595
+ readonly headLength?: number;
1596
+ /** Height of the box, as a percent of the height. Default `48.123` */
1597
+ readonly boxHeight?: number;
1598
+ };
1599
+ readonly uTurnArrow: {
1600
+ /** Thickness of the shaft, as a percent of the shorter side. Default `25` */
1601
+ readonly shaftThickness?: number;
1602
+ /** Width of the arrowhead, as a percent of the shorter side. Default `50` */
1603
+ readonly headWidth?: number;
1604
+ /** Length of the arrowhead, as a percent of the shorter side. Default `25` */
1605
+ readonly headLength?: number;
1606
+ /** Outer radius of the bend, as a percent of the shorter side. Default `43.75` */
1607
+ readonly bendRadius?: number;
1608
+ /** How far down the tip of the arrowhead reaches, as a percent of the height. Default `75` */
1609
+ readonly tipPosition?: number;
1610
+ };
1611
+ readonly verticalScroll: {
1612
+ /** Size of the rolled ends, as a percent of the shorter side. Default `12.5` */
1613
+ readonly rollSize?: number;
1614
+ };
1615
+ readonly wave: {
1616
+ /** Height of the waves, as a percent of the height. Default `12.5` */
1617
+ readonly waveHeight?: number;
1618
+ /** Shifts the waves sideways, as a percent of the width, from -10 to 10. Default `0` */
1619
+ readonly skew?: number;
1620
+ };
1621
+ };
1622
+
1623
+ /**
1624
+ * The name of a preset shape.
1625
+ *
1626
+ * Covers all 187 preset shapes in OOXML, from basic shapes such as `"rectangle"`, `"ellipse"` and `"triangle"`
1627
+ * to lines and connectors, block arrows, stars, callouts and flowchart symbols.
1628
+ *
1629
+ * @publicApi
1630
+ */
1631
+ export declare type PresetShapeType = keyof typeof PRESET_SHAPE_OOXML_NAMES;
1632
+
1633
+ /**
1634
+ * A picture in a raster format.
1635
+ */
1636
+ declare type RasterImageSource = {
1637
+ /** The image format */
1638
+ readonly type: "jpg" | "png" | "gif" | "bmp";
1639
+ /** The image data. Accepts a Buffer, Uint8Array, ArrayBuffer, or a base64-encoded data URI string */
1640
+ readonly data: ImageSourceData;
1641
+ };
1642
+
1643
+ /**
1644
+ * The adjustments a shape of type `T` accepts, such as `{ cornerRadius?: number }` for `"roundedRectangle"`.
1645
+ * It is `never` for shapes without handles, which take no adjustments.
1646
+ *
1647
+ * @publicApi
1648
+ */
1649
+ export declare type ShapeAdjustments<T extends PresetShapeType = PresetShapeType> = T extends keyof PresetShapeAdjustments ? PresetShapeAdjustments[T] : never;
1650
+
1651
+ /**
1652
+ * Options every shape has, whatever its type.
1653
+ */
1654
+ declare type ShapeBaseOptions = DrawingLinkOptions & {
1655
+ /**
1656
+ * Size in pixels, with optional rotation (degrees) and flip. `"fitText"` sizes the shape to fit its text.
1657
+ * Inside a group, `offset` positions the shape
1658
+ */
1659
+ readonly transformation: ShapeTransformation;
1660
+ /** How the shape is filled. Default is no fill */
1661
+ readonly fill?: ShapeFill;
1662
+ /** The shape's line. Default is a solid black line 1pt wide */
1663
+ readonly line?: ShapeLine;
1664
+ /** Shadows, glow, soft edges and reflection */
1665
+ readonly effects?: ShapeEffects;
1666
+ /** Text inside the shape, centred. Each line is a paragraph. For text with formatting, use `children` */
1667
+ readonly text?: string;
1668
+ /** Paragraphs of text inside the shape, after `text` */
1669
+ readonly children?: readonly Paragraph[];
1670
+ /** How the text inside the shape is laid out: alignment, margins, autofit, direction, columns and warps */
1671
+ readonly textOptions?: ShapeTextOptions;
1672
+ /** Name, description and title used by screen readers */
1673
+ readonly altText?: DocPropertiesOptions;
1674
+ };
1675
+
1676
+ /**
1677
+ * Represents a drawing canvas in a WordprocessingML document.
1678
+ *
1679
+ * A canvas holds shapes like a {@link ShapeGroupRun}, but its shapes keep their own size, and Word
1680
+ * keeps connectors attached to their shapes when the shapes are moved. Use it for flowcharts and
1681
+ * diagrams that people will edit.
1682
+ *
1683
+ * The shapes are positioned with `transformation.offset`, in pixels from the canvas's top-left corner, or by a `layout`.
1684
+ *
1685
+ * Applications that can't draw canvases, such as Apple Pages, draw the same shapes as a group instead: the canvas is
1686
+ * written in `mc:AlternateContent`, with the group as its fallback, unless `fallback` is `false`.
1687
+ *
1688
+ * @publicApi
1689
+ *
1690
+ * @example
1691
+ * ```typescript
1692
+ * new ShapeCanvasRun({
1693
+ * children: [
1694
+ * { id: "start", type: "flowChartTerminator", transformation: { width: 120, height: 48 } },
1695
+ * { id: "step", type: "flowChartProcess", transformation: { offset: { top: 100 }, width: 120, height: 48 } },
1696
+ * { type: "connector", from: "start", to: "step", route: "elbow", line: { endArrow: "triangle" } },
1697
+ * ],
1698
+ * });
1699
+ * ```
1700
+ */
1701
+ export declare class ShapeCanvasRun extends Run {
1702
+ constructor(options: IShapeCanvasOptions);
1703
+ }
1704
+
1705
+ /**
1706
+ * A colour: a 6-digit hex colour such as `"FF0000"`, or a colour of the document's theme such as `{ theme: "accent1" }`.
1707
+ *
1708
+ * @publicApi
1709
+ */
1710
+ export declare type ShapeColor = string | ShapeThemeColor;
1711
+
1712
+ /**
1713
+ * A line drawn as one or more parallel lines.
1714
+ *
1715
+ * - `"single"`: one line
1716
+ * - `"double"`: two lines of the same width
1717
+ * - `"thickThin"`: a thick line and a thin one
1718
+ * - `"thinThick"`: a thin line and a thick one
1719
+ * - `"triple"`: three lines, the middle one thicker
1720
+ *
1721
+ * @publicApi
1722
+ */
1723
+ export declare type ShapeCompoundLine = "single" | "double" | "thickThin" | "thinThick" | "triple";
1724
+
1725
+ /**
1726
+ * Visual effects on a shape. Each one is optional, and they can be combined.
1727
+ *
1728
+ * @publicApi
1729
+ */
1730
+ export declare type ShapeEffects = {
1731
+ /** A shadow behind the shape. `{}` gives Word's "Offset: Bottom Right" shadow */
1732
+ readonly shadow?: ShapeShadow;
1733
+ /** A shadow inside the shape, as if it were cut out of the page */
1734
+ readonly innerShadow?: ShapeShadow;
1735
+ /** A coloured glow around the shape */
1736
+ readonly glow?: ShapeGlow;
1737
+ /** Blurs the shape's edges inwards by this many points */
1738
+ readonly softEdges?: number;
1739
+ /** A reflection below the shape. `{}` gives a half reflection touching the shape */
1740
+ readonly reflection?: ShapeReflection;
1741
+ };
1742
+
1743
+ /**
1744
+ * How a shape is filled: a hex colour, a colour of the document's theme such as `{ theme: "accent1" }`, `"none"`, or a
1745
+ * solid, gradient, pattern or picture fill.
1746
+ *
1747
+ * @publicApi
1748
+ */
1749
+ export declare type ShapeFill = string | ShapeThemeColor | SolidShapeFill | GradientShapeFill | PatternShapeFill | PictureShapeFill;
1750
+
1751
+ /**
1752
+ * How a shape floats on the page. It takes the options of a floating image, and offsets can also be percentages.
1753
+ *
1754
+ * @publicApi
1755
+ */
1756
+ export declare type ShapeFloating = Omit<IFloating, "horizontalPosition" | "verticalPosition"> & {
1757
+ readonly horizontalPosition: ShapeHorizontalPosition;
1758
+ readonly verticalPosition: ShapeVerticalPosition;
1759
+ /** What a percentage `width` or `height` is a percentage of. Default is the space between the margins, where the text goes */
1760
+ readonly sizeRelativeTo?: {
1761
+ readonly width?: ShapeWidthRelativeTo;
1762
+ readonly height?: ShapeHeightRelativeTo;
1763
+ };
1764
+ };
1765
+
1766
+ /**
1767
+ * Places shapes in levels along their connectors, as in a flowchart: each shape goes on a level after the shapes
1768
+ * that connect to it, and the shapes on each level are ordered so connectors cross as little as they can.
1769
+ *
1770
+ * @publicApi
1771
+ */
1772
+ export declare type ShapeFlowLayout = {
1773
+ readonly type: "flow";
1774
+ /** The way the flow runs. Default is `"down"` */
1775
+ readonly direction?: ShapeLayoutDirection;
1776
+ /** Space between shapes on the same level, in pixels. Default is 40 */
1777
+ readonly spacing?: number;
1778
+ /** Space between one level and the next, in pixels. Default is 50 */
1779
+ readonly levelSpacing?: number;
1780
+ /**
1781
+ * Bands the flow runs along, such as the people or teams that do each step of a process (swimlanes). Each shape
1782
+ * with a `lane` goes in the band of that name, and shapes without one go in the first. The bands are side by side,
1783
+ * across the direction the flow runs in, each with a header at the start of the flow
1784
+ */
1785
+ readonly lanes?: readonly (string | ShapeLane)[];
1786
+ };
1787
+
1788
+ /**
1789
+ * A coloured glow around the outside of a shape.
1790
+ *
1791
+ * @publicApi
1792
+ */
1793
+ export declare type ShapeGlow = {
1794
+ /** A 6-digit hex colour such as `"FFC000"`, or a colour of the document's theme such as `{ theme: "accent4" }` */
1795
+ readonly color: ShapeColor;
1796
+ /** How far the glow reaches past the shape, in points. Default is 5 */
1797
+ readonly size?: number;
1798
+ /** From 0 (opaque) to 100 (invisible). Default is 60 */
1799
+ readonly transparency?: number;
1800
+ };
1801
+
1802
+ /**
1803
+ * Places shapes in rows and columns, in the order they are given.
1804
+ *
1805
+ * @publicApi
1806
+ */
1807
+ export declare type ShapeGridLayout = {
1808
+ readonly type: "grid";
1809
+ /** The number of columns. Default is enough to make the grid about as wide as it is tall, counted in shapes */
1810
+ readonly columns?: number;
1811
+ /** Space between rows and columns, in pixels. Default is 40 */
1812
+ readonly spacing?: number;
1813
+ };
1814
+
1815
+ /**
1816
+ * Represents a group of shapes in a WordprocessingML document.
1817
+ *
1818
+ * The shapes are positioned with `transformation.offset`, in pixels, and the group is
1819
+ * as big as the box around them. Give the group its own `transformation` to scale,
1820
+ * rotate or flip all of them together.
1821
+ *
1822
+ * Connectors are drawn between the shapes they name. Word only keeps connectors attached
1823
+ * when shapes are moved on a {@link ShapeCanvasRun}; in a group they stay where they are drawn.
1824
+ *
1825
+ * Reference: http://officeopenxml.com/drwSp-group.php
1826
+ *
1827
+ * @publicApi
1828
+ *
1829
+ * @example
1830
+ * ```typescript
1831
+ * new ShapeGroupRun({
1832
+ * children: [
1833
+ * { id: "start", type: "rectangle", transformation: { width: 120, height: 48 }, fill: "4472C4" },
1834
+ * { id: "end", type: "ellipse", transformation: { offset: { left: 160 }, width: 120, height: 48 }, fill: "ED7D31" },
1835
+ * { type: "connector", from: "start", to: "end", line: { endArrow: "triangle" } },
1836
+ * ],
1837
+ * });
1838
+ * ```
1839
+ */
1840
+ export declare class ShapeGroupRun extends Run {
1841
+ constructor(options: IShapeGroupOptions);
1842
+ }
1843
+
1844
+ /**
1845
+ * What a percentage height is a percentage of.
1846
+ *
1847
+ * @publicApi
1848
+ */
1849
+ export declare type ShapeHeightRelativeTo = "betweenMargins" | "page" | "topMargin" | "bottomMargin" | "insideMargin" | "outsideMargin";
1850
+
1851
+ /**
1852
+ * Where a floating shape is across the page: as for an image, but the offset can also be a percentage.
1853
+ *
1854
+ * @publicApi
1855
+ */
1856
+ export declare type ShapeHorizontalPosition = Omit<IHorizontalPositionOptions, "offset"> & {
1857
+ /**
1858
+ * Offset in EMUs from the horizontal base, or a percentage of the base's width, such as `"10%"`. A percentage needs
1859
+ * a base of the page, the space between its margins, or one of its margins
1860
+ */
1861
+ readonly offset?: number | ShapePercentage;
1862
+ };
1863
+
1864
+ /**
1865
+ * A lane of a flow: a band, with a header, that the shapes given its name go in.
1866
+ *
1867
+ * @publicApi
1868
+ */
1869
+ export declare type ShapeLane = {
1870
+ /** The lane's name, written in its header. A shape goes in the lane when its `lane` is this name */
1871
+ readonly name: string;
1872
+ /** The lane's background. Default is none */
1873
+ readonly fill?: ShapeFill;
1874
+ /** The background of the lane's header. Default is light grey */
1875
+ readonly headerFill?: ShapeFill;
1876
+ /** The line around the lane and its header. Default is a thin grey line */
1877
+ readonly line?: ShapeLine;
1878
+ };
1879
+
1880
+ /**
1881
+ * How a {@link ShapeGroupRun} or {@link ShapeCanvasRun} places the shapes, pictures and groups that have no `offset`.
1882
+ * Shapes with an `offset` stay where it puts them: those that connect to the shapes the layout places take part in the
1883
+ * layout, which is placed around them. Connectors are routed after the shapes are placed.
1884
+ *
1885
+ * @publicApi
1886
+ */
1887
+ export declare type ShapeLayout = ShapeFlowLayout | ShapeTreeLayout | ShapeGridLayout;
1888
+
1889
+ /**
1890
+ * The way a flow or tree runs, from its first shapes to its last.
1891
+ *
1892
+ * @publicApi
1893
+ */
1894
+ export declare type ShapeLayoutDirection = "down" | "right" | "up" | "left";
1895
+
1896
+ /**
1897
+ * A shape's line: a hex colour, a colour of the document's theme such as `{ theme: "accent1" }`, `"none"`, or line
1898
+ * options.
1899
+ *
1900
+ * @publicApi
1901
+ */
1902
+ export declare type ShapeLine = string | ShapeThemeColor | ShapeLineOptions;
1903
+
1904
+ /**
1905
+ * The shape of the ends of a line, and of the ends of each dash.
1906
+ *
1907
+ * - `"flat"`: the line stops at its end point
1908
+ * - `"round"`: a half circle past the end point
1909
+ * - `"square"`: a half square past the end point
1910
+ *
1911
+ * @publicApi
1912
+ */
1913
+ export declare type ShapeLineCap = "flat" | "round" | "square";
1914
+
1915
+ /**
1916
+ * The shape of the corners where a line turns.
1917
+ *
1918
+ * - `"miter"`: sharp corners
1919
+ * - `"round"`: rounded corners
1920
+ * - `"bevel"`: corners cut off square
1921
+ *
1922
+ * @publicApi
1923
+ */
1924
+ export declare type ShapeLineJoin = "miter" | "round" | "bevel";
1925
+
1926
+ /**
1927
+ * Line options for a shape.
1928
+ *
1929
+ * @publicApi
1930
+ */
1931
+ export declare type ShapeLineOptions = {
1932
+ /** A 6-digit hex colour such as `"FF0000"`, or a colour of the document's theme such as `{ theme: "accent1" }`. Default is `"000000"` */
1933
+ readonly color?: ShapeColor;
1934
+ /** Line width in points, from 0 to 1584. Default is 1 */
1935
+ readonly width?: number;
1936
+ /** From 0 (opaque) to 100 (invisible) */
1937
+ readonly transparency?: number;
1938
+ /** Colours the line with a gradient instead of `color` */
1939
+ readonly gradient?: Omit<GradientShapeFill, "type">;
1940
+ /** A preset dash pattern, or dashes and gaps of your own. Default is a solid line */
1941
+ readonly dash?: LineDash | CustomLineDash;
1942
+ /** The shape of the line's ends and of the ends of each dash */
1943
+ readonly cap?: ShapeLineCap;
1944
+ /** The shape of the corners where the line turns */
1945
+ readonly join?: ShapeLineJoin;
1946
+ /** Draws the line as two or three parallel lines within its width. Default is `"single"` */
1947
+ readonly compound?: ShapeCompoundLine;
1948
+ /** Arrowhead at the start of the line */
1949
+ readonly startArrow?: Arrowhead;
1950
+ /** Arrowhead at the end of the line */
1951
+ readonly endArrow?: Arrowhead;
1952
+ };
1953
+
1954
+ /**
1955
+ * A preset pattern, such as `"percent20"` (20% of dots), `"horizontal"` lines or `"smallCheckerBoard"`.
1956
+ *
1957
+ * @publicApi
1958
+ */
1959
+ export declare type ShapePattern = keyof typeof PATTERN_OOXML_NAMES;
1960
+
1961
+ /**
1962
+ * A percentage, such as `"100%"`.
1963
+ *
1964
+ * @publicApi
1965
+ */
1966
+ export declare type ShapePercentage = `${number}%`;
1967
+
1968
+ /**
1969
+ * A mirror image of a shape below it, fading away from the shape.
1970
+ *
1971
+ * @publicApi
1972
+ */
1973
+ export declare type ShapeReflection = {
1974
+ /** Transparency where the reflection meets the shape, from 0 (opaque) to 100 (invisible). Default is 50 */
1975
+ readonly transparency?: number;
1976
+ /** How much of the shape is reflected before the reflection fades out, from 0 to 100 percent. Default is 50 */
1977
+ readonly size?: number;
1978
+ /** How far the reflection is below the shape, in points. Default is 0 */
1979
+ readonly distance?: number;
1980
+ /** How much the reflection is blurred, in points. Default is 0.5 */
1981
+ readonly blur?: number;
1982
+ };
1983
+
1984
+ /**
1985
+ * Represents a shape in a WordprocessingML document.
1986
+ *
1987
+ * A shape is one of the 187 DrawingML presets, such as a rectangle, ellipse, line,
1988
+ * arrow, star, callout or flowchart symbol. It can have a fill, a line with dashes
1989
+ * and arrowheads, and text inside it. It sits inline with text unless `floating` is set.
1990
+ *
1991
+ * Reference: http://officeopenxml.com/drwSp.php
1992
+ *
1993
+ * @publicApi
1994
+ *
1995
+ * @example
1996
+ * ```typescript
1997
+ * // A black bar inline with text
1998
+ * new Paragraph({
1999
+ * children: [
2000
+ * new TextRun("Name: "),
2001
+ * new ShapeRun({ type: "rectangle", transformation: { width: 200, height: 4 }, fill: "000000", line: "none" }),
2002
+ * ],
2003
+ * });
2004
+ *
2005
+ * // An arrow
2006
+ * new ShapeRun({
2007
+ * type: "line",
2008
+ * transformation: { width: 300, height: 0 },
2009
+ * line: { color: "C00000", width: 2, endArrow: "triangle" },
2010
+ * });
2011
+ * ```
2012
+ */
2013
+ export declare class ShapeRun extends Run {
2014
+ constructor(options: IShapeOptions);
2015
+ }
2016
+
2017
+ /**
2018
+ * A shadow cast by a shape, or thrown inside it.
2019
+ *
2020
+ * @publicApi
2021
+ */
2022
+ export declare type ShapeShadow = {
2023
+ /** A 6-digit hex colour such as `"000000"`, or a colour of the document's theme such as `{ theme: "dark1" }`. Default is black */
2024
+ readonly color?: ShapeColor;
2025
+ /** From 0 (opaque) to 100 (invisible). Default is 60 */
2026
+ readonly transparency?: number;
2027
+ /** How far the shadow's edge is blurred, in points. Default is 4 */
2028
+ readonly blur?: number;
2029
+ /** How far the shadow is from the shape, in points. Default is 3 */
2030
+ readonly distance?: number;
2031
+ /** The direction the shadow falls in, in degrees clockwise from 3 o'clock. Default is 45, down and to the right */
2032
+ readonly angle?: number;
2033
+ };
2034
+
2035
+ /**
2036
+ * A size in pixels, `"fitText"` to fit the shape's text, or a percentage, such as `"100%"`, for a floating shape: a
2037
+ * percentage of the space between the page's margins, or of what `floating.sizeRelativeTo` gives.
2038
+ *
2039
+ * @publicApi
2040
+ */
2041
+ export declare type ShapeSize = number | "fitText" | ShapePercentage;
2042
+
2043
+ /**
2044
+ * The direction text runs in inside a shape.
2045
+ *
2046
+ * - `"horizontal"`: left to right, the default
2047
+ * - `"topToBottom"`: turned a quarter turn clockwise, so each line reads downwards
2048
+ * - `"bottomToTop"`: turned a quarter turn anticlockwise, so each line reads upwards
2049
+ * - `"stacked"`: upright letters stacked one below the other, with lines running left to right
2050
+ * - `"stackedRightToLeft"`: upright letters stacked one below the other, with lines running right to left
2051
+ * - `"eastAsianVertical"`: East Asian characters upright and other text turned, with lines running right to left
2052
+ * - `"mongolianVertical"`: as `"eastAsianVertical"`, with lines running left to right
2053
+ *
2054
+ * @publicApi
2055
+ */
2056
+ export declare type ShapeTextDirection = keyof typeof TEXT_DIRECTION_OOXML_NAMES;
2057
+
2058
+ /**
2059
+ * How text is laid out inside a shape.
2060
+ *
2061
+ * @publicApi
2062
+ */
2063
+ export declare type ShapeTextOptions = {
2064
+ /** Where the text sits between the top and bottom of the shape. Default is `"center"` */
2065
+ readonly verticalAlignment?: ShapeTextVerticalAlignment;
2066
+ /** Space between the shape's edges and its text, in points. Word's defaults are 7.2 (0.1") on the left and right and 3.6 (0.05") on the top and bottom */
2067
+ readonly margins?: {
2068
+ readonly top?: number;
2069
+ readonly right?: number;
2070
+ readonly bottom?: number;
2071
+ readonly left?: number;
2072
+ };
2073
+ /** Whether lines of text wrap at the shape's edges. Default is `true` */
2074
+ readonly wrap?: boolean;
2075
+ /** Grows or shrinks the shape to fit its text. Can't be used with `shrinkTextOnOverflow` */
2076
+ readonly resizeShapeToFitText?: boolean;
2077
+ /** Makes the text smaller when there is too much of it for the shape. Can't be used with `resizeShapeToFitText` */
2078
+ readonly shrinkTextOnOverflow?: boolean;
2079
+ /** The direction the text runs in. Default is `"horizontal"` */
2080
+ readonly direction?: ShapeTextDirection;
2081
+ /** Lays the text out in columns */
2082
+ readonly columns?: {
2083
+ /** The number of columns, from 1 to 16 */
2084
+ readonly count: number;
2085
+ /** Space between the columns, in points. Default is 0 */
2086
+ readonly spacing?: number;
2087
+ };
2088
+ /** Bends or stretches the text to a shape, like WordArt */
2089
+ readonly warp?: ShapeTextWarp;
2090
+ };
2091
+
2092
+ /**
2093
+ * Where text sits between the top and bottom of a shape.
2094
+ *
2095
+ * @publicApi
2096
+ */
2097
+ export declare type ShapeTextVerticalAlignment = "top" | "center" | "bottom";
2098
+
2099
+ /**
2100
+ * A WordArt-style warp that bends or stretches the text to a shape, such as `"archUp"`, `"wave"` or `"inflate"`.
2101
+ * The `...Filled` arches, circle and button spread the text over the whole shape, where the others follow a single line.
2102
+ *
2103
+ * @publicApi
2104
+ */
2105
+ export declare type ShapeTextWarp = keyof typeof TEXT_WARP_OOXML_NAMES;
2106
+
2107
+ /**
2108
+ * A colour of the document's theme, lighter or darker if you like, as Word's colour menus offer them: "Blue, Accent 1,
2109
+ * Lighter 40%" is `{ theme: "accent1", lighter: 40 }`. The shape changes colour when the theme's colours change. The
2110
+ * same as `docx`'s `ThemeColor`, which text, borders and shading take.
2111
+ *
2112
+ * @publicApi
2113
+ */
2114
+ export declare type ShapeThemeColor = ThemeColor;
2115
+
2116
+ /**
2117
+ * One of the twelve colours of the document's theme, as `Document`'s `theme.colors` names them. The same as `docx`'s
2118
+ * `ThemeColorName`.
2119
+ *
2120
+ * @publicApi
2121
+ */
2122
+ export declare type ShapeThemeColorName = ThemeColorName;
2123
+
2124
+ /**
2125
+ * A shape's size in pixels, with optional rotation (degrees) and flip. Inside a group, `offset` positions the shape.
2126
+ *
2127
+ * @publicApi
2128
+ */
2129
+ export declare type ShapeTransformation = Omit<IMediaTransformation, "width" | "height"> & {
2130
+ /**
2131
+ * Width in pixels, `"fitText"` for as wide as the longest line of the shape's text, or a percentage of the space
2132
+ * between the margins for a floating shape, such as `"100%"`
2133
+ */
2134
+ readonly width: ShapeSize;
2135
+ /** Height in pixels, `"fitText"` for as tall as the shape's text, wrapped at the shape's width, or a percentage for a floating shape */
2136
+ readonly height: ShapeSize;
2137
+ };
2138
+
2139
+ /**
2140
+ * Places shapes as a tree, such as an org chart: each connector joins a parent (`from`) to a child (`to`), and
2141
+ * children are placed side by side below their parent, which is centred over them.
2142
+ *
2143
+ * @publicApi
2144
+ */
2145
+ export declare type ShapeTreeLayout = {
2146
+ readonly type: "tree";
2147
+ /** The way the tree grows from its root. Default is `"down"` */
2148
+ readonly direction?: ShapeLayoutDirection;
2149
+ /** Space between shapes on the same level, in pixels. Default is 20 */
2150
+ readonly spacing?: number;
2151
+ /** Space between one level and the next, in pixels. Default is 40 */
2152
+ readonly levelSpacing?: number;
2153
+ };
2154
+
2155
+ /**
2156
+ * Where a floating shape is down the page: as for an image, but the offset can also be a percentage.
2157
+ *
2158
+ * @publicApi
2159
+ */
2160
+ export declare type ShapeVerticalPosition = Omit<IVerticalPositionOptions, "offset"> & {
2161
+ /**
2162
+ * Offset in EMUs from the vertical base, or a percentage of the base's height, such as `"10%"`. A percentage needs
2163
+ * a base of the page, the space between its margins, or one of its margins
2164
+ */
2165
+ readonly offset?: number | ShapePercentage;
2166
+ };
2167
+
2168
+ /**
2169
+ * What a percentage width is a percentage of.
2170
+ *
2171
+ * @publicApi
2172
+ */
2173
+ export declare type ShapeWidthRelativeTo = "betweenMargins" | "page" | "leftMargin" | "rightMargin" | "insideMargin" | "outsideMargin";
2174
+
2175
+ /**
2176
+ * A solid colour fill.
2177
+ *
2178
+ * @publicApi
2179
+ */
2180
+ export declare type SolidShapeFill = {
2181
+ readonly type?: "solid";
2182
+ /** A 6-digit hex colour such as `"FF0000"`, or a colour of the document's theme such as `{ theme: "accent1" }` */
2183
+ readonly color: ShapeColor;
2184
+ /** From 0 (opaque) to 100 (invisible) */
2185
+ readonly transparency?: number;
2186
+ };
2187
+
2188
+ /**
2189
+ * An SVG picture, with a raster picture for applications that can't draw SVG.
2190
+ */
2191
+ declare type SvgImageSource = {
2192
+ /** The image format */
2193
+ readonly type: "svg";
2194
+ /** The SVG data. Accepts a Buffer, Uint8Array, ArrayBuffer, or a base64-encoded data URI string */
2195
+ readonly data: ImageSourceData;
2196
+ /** A picture in a raster format, for Word processors that can't draw SVG */
2197
+ readonly fallback: RasterImageSource;
2198
+ };
2199
+
2200
+ declare const TEXT_DIRECTION_OOXML_NAMES: {
2201
+ readonly horizontal: "horz";
2202
+ readonly topToBottom: "vert";
2203
+ readonly bottomToTop: "vert270";
2204
+ readonly stacked: "wordArtVert";
2205
+ readonly stackedRightToLeft: "wordArtVertRtl";
2206
+ readonly eastAsianVertical: "eaVert";
2207
+ readonly mongolianVertical: "mongolianVert";
2208
+ };
2209
+
2210
+ declare const TEXT_WARP_OOXML_NAMES: {
2211
+ readonly square: "textPlain";
2212
+ readonly stop: "textStop";
2213
+ readonly triangleUp: "textTriangle";
2214
+ readonly triangleDown: "textTriangleInverted";
2215
+ readonly chevronUp: "textChevron";
2216
+ readonly chevronDown: "textChevronInverted";
2217
+ readonly ringInside: "textRingInside";
2218
+ readonly ringOutside: "textRingOutside";
2219
+ readonly archUp: "textArchUp";
2220
+ readonly archDown: "textArchDown";
2221
+ readonly circle: "textCircle";
2222
+ readonly button: "textButton";
2223
+ readonly archUpFilled: "textArchUpPour";
2224
+ readonly archDownFilled: "textArchDownPour";
2225
+ readonly circleFilled: "textCirclePour";
2226
+ readonly buttonFilled: "textButtonPour";
2227
+ readonly curveUp: "textCurveUp";
2228
+ readonly curveDown: "textCurveDown";
2229
+ readonly canUp: "textCanUp";
2230
+ readonly canDown: "textCanDown";
2231
+ readonly wave: "textWave1";
2232
+ readonly waveInverted: "textWave2";
2233
+ readonly doubleWave: "textDoubleWave1";
2234
+ readonly doubleWaveInverted: "textWave4";
2235
+ readonly inflate: "textInflate";
2236
+ readonly deflate: "textDeflate";
2237
+ readonly inflateBottom: "textInflateBottom";
2238
+ readonly deflateBottom: "textDeflateBottom";
2239
+ readonly inflateTop: "textInflateTop";
2240
+ readonly deflateTop: "textDeflateTop";
2241
+ readonly deflateInflate: "textDeflateInflate";
2242
+ readonly deflateInflateDeflate: "textDeflateInflateDeflate";
2243
+ readonly fadeRight: "textFadeRight";
2244
+ readonly fadeLeft: "textFadeLeft";
2245
+ readonly fadeUp: "textFadeUp";
2246
+ readonly fadeDown: "textFadeDown";
2247
+ readonly slantUp: "textSlantUp";
2248
+ readonly slantDown: "textSlantDown";
2249
+ readonly cascadeUp: "textCascadeUp";
2250
+ readonly cascadeDown: "textCascadeDown";
2251
+ };
2252
+
2253
+ /**
2254
+ * Adds `type`, and the `adjustments` that go with it, to a set of shape options.
2255
+ *
2256
+ * There is one member per preset shape, so `adjustments` only accepts the names of that shape's handles.
2257
+ * Another member takes any shape type without adjustments, for when the type is only known at runtime,
2258
+ * and the last one is a custom shape drawn from a `path` or `paths`.
2259
+ */
2260
+ declare type WithPresetShape<Options> = {
2261
+ readonly [T in PresetShapeType]: Options & {
2262
+ /** The preset shape, such as `"rectangle"`, `"ellipse"`, `"line"` or `"rightArrow"` */
2263
+ readonly type: T;
2264
+ /** The shape's handles, such as `{ cornerRadius: 25 }` for a `"roundedRectangle"`. Lengths are percentages and angles are degrees */
2265
+ readonly adjustments?: ShapeAdjustments<T>;
2266
+ };
2267
+ }[PresetShapeType] | (Options & {
2268
+ readonly type: PresetShapeType;
2269
+ readonly adjustments?: undefined;
2270
+ }) | (Options & CustomShapeGeometry & {
2271
+ /** A shape of your own, drawn from `path` or `paths` */
2272
+ readonly type: "custom";
2273
+ readonly adjustments?: undefined;
2274
+ });
2275
+
2276
+ export { }