> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Other classes: Shapes, pictures and charts

## `Chart`

Chart members every host shares; the host owns the frame (size, id, position).

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### Chart properties

| Name | Type | Description |
| - | - | - |
| `drawing` | `XElement` | read-only |
| `frameNoun` | `"paragraph"` | read-only What removing the whole chart means in this host: "paragraph", "shape". |
| `relId` | `string` | read-only |
| `axes` | `ChartAxes` | read-only Excel.Chart.axes. |
| `categoryAxisTitle` | `string \| undefined` | The primary category-axis title the chart paints; undefined when the axis is absent, deleted, or untitled. Write "" or undefined to remove it. |
| `chartType` | `string` | read-only Plot families in document order, deduplicated: "bar", "bar+line" (combo). |
| `displayBlanksAs` | `ChartDisplayBlanksAs` | How blank cells plot: "NotPlotted" (a gap), "Zero" or "Interplotted" (joined). |
| `format` | `ChartAreaFormat` | read-only Excel.Chart.format: the chart area's fill, border and default font. |
| `height` | `number \| undefined` | Frame height in points (`wp:extent`); the plot rescales to fit on write. |
| `id` | `number \| undefined` | read-only `wp:docPr` id of the frame — same identity space as Shape ids. |
| `legend` | `ChartLegend` | read-only Excel.Chart.legend. |
| `legendPosition` | `string` | Where the legend sits: bottom, top, left, right, topRight, or "none" when the chart has no legend. Writing creates the legend when absent; writing "none" removes it. |
| `plotArea` | `ChartPlotArea` | read-only Excel.Chart.plotArea. |
| `secondaryValueAxisMaximum` | `number \| undefined` | |
| `secondaryValueAxisMinimum` | `number \| undefined` | |
| `secondaryValueAxisTitle` | `string \| undefined` | The secondary value axis' title; refuses when no plot references one. |
| `series` | `HandleCollection<ChartSeries>` | read-only |
| `title` | `string \| undefined` | |
| `titleFormat` | `ChartTitleFormat` | read-only Extension (Excel's `chart.title.format`; `title` here is the text): the title's fill, border and font. The font lives on the title's own text, or its `c:txPr` while Word words it. |
| `valueAxisMaximum` | `number \| undefined` | |
| `valueAxisMinimum` | `number \| undefined` | The primary value axis' pinned minimum in data units; undefined = auto-scale. A pin crossing the other pinned end refuses. |
| `valueAxisTitle` | `string \| undefined` | The primary value-axis title; same contract as `categoryAxisTitle`. |
| `width` | `number \| undefined` | Frame width in points (`wp:extent`); the plot rescales to fit on write. |

### `Chart.addSeries()`

```ts theme={null}
addSeries(options: AddSeriesOptions): ChartSeries
```

Append a series, modelled on the target plot's last one (axis wiring and
cache structure are cloned; the theme's accent cycle colours it). For a
combo chart, `plotKind` picks the family ("column", "line", …); default
is the first plot. Omitting `name` leaves the legend entry blank.

### `Chart.assertLive()`

```ts theme={null}
assertLive(): void
```

Throws when the frame left its part.

### `Chart.colorStyle()`

```ts theme={null}
colorStyle(): XElement | undefined
```

The chart's `cs:colorStyle` part; a host that keeps none reads as Excel's default.

### `Chart.convertToShape()`

```ts theme={null}
convertToShape(): Shape
```

Extension (VBA InlineShape.ConvertToShape): floats an inline chart with square wrap at
the column and paragraph origin, and returns its Shape for position and wrap. A floating
chart returns its Shape as is.

### `Chart.detached()`

```ts theme={null}
detached(noun: string): Error
```

### `Chart.frameSizePt()`

```ts theme={null}
frameSizePt(): { height: number; width: number } | undefined
```

The frame's size in points, for plot-area geometry.

### `Chart.getDataTable()`

```ts theme={null}
getDataTable(): ChartDataTable
```

Excel.Chart.getDataTable(): throws when the chart type cannot show one.

### `Chart.getDataTableOrNullObject()`

```ts theme={null}
getDataTableOrNullObject(): ChartDataTable
```

Excel.Chart.getDataTableOrNullObject(): `isNullObject` when the chart type cannot show one.

### `Chart.noteChange()`

```ts theme={null}
noteChange(): void
```

### `Chart.seal()`

```ts theme={null}
seal(handle: object): void
```

### `Chart.setColorStyle()`

```ts theme={null}
setColorStyle(root: XElement): void
```

### `Chart.styleAxisTitle()`

```ts theme={null}
styleAxisTitle(title: XElement): void
```

The look a new axis title takes: Office's 10pt grey on a styled chart.

### `Chart.textRef()`

```ts theme={null}
textRef(_formula: string): XElement | undefined
```

A `c:strRef` with its cache for a cell formula; a host without cells leaves it empty.

## `Diagram`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### Diagram properties

| Name | Type | Description |
| - | - | - |
| `drawing` | `XElement` | read-only |
| `height` | `number \| undefined` | read-only Frame height in points (`wp:extent`). |
| `id` | `number \| undefined` | read-only `wp:docPr` id of the frame — same identity space as Shape ids. |
| `kind` | `DiagramKind` | read-only Layout family this diagram was authored as. |
| `nodes` | `{ id: string; text: string }[]` | read-only Flat model ids and texts, in document order. |
| `relIds` | `{ cs: string; dm: string; lo: string; qs: string }` | read-only The four diagram relationship ids the frame binds. |
| `width` | `number \| undefined` | read-only Frame width in points (`wp:extent`). |

### `Diagram.assertLive()`

```ts theme={null}
assertLive(): void
```

## `Equation`

Import from `@reductoai/docx/officejs`.

### Equation properties

| Name | Type | Description |
| - | - | - |
| `display` | `boolean` | read-only `m:oMathPara`: a display equation that owns its line. |
| `paragraph` | `Paragraph` | read-only |
| `tex` | `string` | The equation as TeX, without delimiters. |

### `Equation.delete()`

```ts theme={null}
delete(): void
```

### `Equation.getRange()`

```ts theme={null}
getRange(): Range
```

The one object character the equation occupies in its paragraph's text.

### `Equation.setTex()`

```ts theme={null}
setTex(tex: string, options?: InsertMathOptions): void
```

Rewrites the equation in place; `{ display }` switches between inline and display math.

## `Frame`

Word.Frame: one text frame. Edits reach every paragraph of the frame and are untracked.

Import from `@reductoai/docx/officejs`.

### Frame properties

| Name | Type | Description |
| - | - | - |
| `borders` | `BorderUniversalCollection` | read-only The framed paragraphs' borders, as Word draws a frame's border. |
| `height` | `number` | Points; -1 when the height follows the text (Auto). |
| `heightRule` | `FrameSizeRule` | AtLeast and Exact on a frame with no height give it Word's 72 points. |
| `horizontalDistanceFromText` | `number` | |
| `horizontalPosition` | `number` | Points from the anchor, or a WdFramePosition alignment: -999998 Left, -999995 Center, -999996 Right, -999994 Inside, -999993 Outside. |
| `lockAnchor` | `boolean` | |
| `range` | `Range` | read-only The framed paragraphs. |
| `relativeHorizontalPosition` | `FrameRelativeHorizontalPosition` | |
| `relativeVerticalPosition` | `FrameRelativeVerticalPosition` | |
| `shading` | `ParagraphShadingUniversal` | read-only |
| `textWrap` | `boolean` | Text flows around the frame; false keeps the lines beside it clear (w:wrap notBeside). |
| `verticalDistanceFromText` | `number` | |
| `verticalPosition` | `number` | Points from the anchor, or -999999 Top, -999995 Center, -999997 Bottom, -999994 Inside, -999993 Outside. |
| `width` | `number` | Points; -1 when the width follows the text (Auto). |
| `widthRule` | `FrameSizeRule` | As in Word: Auto drops the width, AtLeast on an Auto frame gives 72 points, Exact alone does nothing. |

### `Frame.delete()`

```ts theme={null}
delete(): void
```

Removes the frame; its text stays where it is, as Word's Frame.Delete does.

### `Frame.set()`

```ts theme={null}
set(properties: FrameUpdateData, options?: UpdateOptions): void
```

**Not implemented.** These Office.js members throw: `copy`, `cut`, `select`.

## `FrameCollection`

Word.FrameCollection: the frames of the document or of a range.

Import from `@reductoai/docx/officejs`.

### FrameCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `T[]` | read-only |
| `length` | `number` | read-only |

### `FrameCollection.add()`

```ts theme={null}
add(range: Range): Frame
```

Frames the range's paragraphs as Word's Insert Frame does: wrap around, 9 pt from the text,
anchored to the column and paragraph. A paragraph already in a frame joins the new one.

### `FrameCollection.at()`

```ts theme={null}
at(index: number): Frame
```

### `FrameCollection.delete()`

```ts theme={null}
delete(): void
```

Removes every frame of the collection; the text stays.

### `FrameCollection.getFirst()`

```ts theme={null}
getFirst(): Frame
```

### `FrameCollection.getFirstOrNullObject()`

```ts theme={null}
getFirstOrNullObject(): Frame & { isNullObject: boolean }
```

OfficeJS null-object variant; inspect `isNullObject` before other members.

### `FrameCollection.getItem()`

```ts theme={null}
getItem(index: number): Frame
```

OfficeJS spelling of at().

### `FrameCollection.getLast()`

```ts theme={null}
getLast(): Frame
```

### `FrameCollection.getLastOrNullObject()`

```ts theme={null}
getLastOrNullObject(): Frame & { isNullObject: boolean }
```

OfficeJS null-object variant; inspect `isNullObject` before other members.

## `GradientStop`

One a:gs: VBA GradientStop.

Import from `@reductoai/docx/officejs`.

### GradientStop properties

| Name | Type | Description |
| - | - | - |
| `color` | `string` | |
| `position` | `number` | |
| `transparency` | `number` | |

### `GradientStop.set()`

```ts theme={null}
set(properties: GradientStopUpdateData, options?: UpdateOptions): void
```

## `GradientStopCollection`

a:gsLst: VBA GradientStops.

Import from `@reductoai/docx/officejs`.

### GradientStopCollection properties

| Name | Type | Description |
| - | - | - |
| `count` | `number` | read-only |
| `items` | `GradientStop[]` | read-only |

### `GradientStopCollection.delete()`

```ts theme={null}
delete(index: number): void
```

VBA GradientStops.Delete; a gradient keeps at least two stops.

### `GradientStopCollection.insert()`

```ts theme={null}
insert(
  color: string,
  position: number,
  transparency?: number,
  index?: number,
): GradientStop
```

VBA GradientStops.Insert; `index` is 0-based and defaults to the end.

## `PictureFormat`

VBA `PictureFormat`: each crop is in points of the uncropped picture at its current scale.
Setting one keeps the scale and moves that edge, so the frame grows or shrinks with it.

Import from `@reductoai/docx/officejs`.

### PictureFormat properties

| Name | Type | Description |
| - | - | - |
| `cropBottom` | `number` | |
| `cropLeft` | `number` | |
| `cropRight` | `number` | |
| `cropTop` | `number` | |

## `ReflectionFormat`

Word.ReflectionFormat (WordApiDesktop 1.3) on a shape: one a:reflection in a:effectLst.

Import from `@reductoai/docx/officejs`.

### ReflectionFormat properties

| Name | Type | Description |
| - | - | - |
| `blur` | `number` | Blur radius in points. |
| `offset` | `number` | Distance from the shape in points. |
| `size` | `number` | How much of the shape the reflection shows, in percent (endPos). |
| `transparency` | `number` | 0 opaque through 1 clear, at the start of the fade (stA). |
| `type` | `ReflectionType` | None when absent; Type1 when it is Word's first preset as written; Mixed otherwise. |

### `ReflectionFormat.set()`

```ts theme={null}
set(properties: ReflectionFormatUpdateData, options?: UpdateOptions): void
```

## `Shape`

A live handle to one floating textbox: the w:r run holding its wp:anchor.

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### Shape properties

| Name | Type | Description |
| - | - | - |
| `run` | `XElement` | read-only |
| `adjustments` | `ShapeAdjustments` | read-only The preset's adjustment handles (`PowerPoint.Shape.adjustments`). |
| `allowOverlap` | `boolean` | wp:anchor\@allowOverlap — authored for Word; this renderer never collision-shifts. |
| `altTextDescription` | `string` | |
| `altTextTitle` | `string` | |
| `behindText` | `boolean` | wp:anchor\@behindDoc — painted under the text. |
| `body` | `Body` | read-only The text (w:txbxContent) as a block-level scope; a GeometricShape gets one on first use, as typing into it in Word does. |
| `effectExtent` | `EffectExtent` | Extension: wp:effectExtent, the room Word keeps around the frame for its effects. |
| `fill` | `ShapeFill` | read-only The fill surface of a textbox or free geometric shape; throws otherwise. |
| `geometricShapeType` | `GeometricShapeType \| undefined` | Word's name for a:prstGeom/@prst; undefined for pictures, groups and unnamed presets. |
| `height` | `number` | Frame height in points. |
| `horizontalAlignment` | `"Left" \| "Right" \| "Inside" \| "Center" \| "Outside" \| undefined` | wp:positionH/wp:align; undefined when the position is an offset. |
| `horizontalFlip` | `boolean` | read-only VBA `Shape.HorizontalFlip`: a:xfrm\@flipH. |
| `id` | `number` | read-only wp:docPr\@id — stable within the document; what layout queries key on. A group member reports its cNvPr\@id. |
| `imageFormat` | `ImageFormat` | read-only |
| `isChild` | `boolean` | read-only True for a member of a group drawing; anchor members (wrap, position, size) then throw. |
| `layoutInCell` | `boolean` | Extension (VBA `Shape.LayoutInCell`): a shape anchored in a table cell is laid out in that cell. |
| `left` | `number` | Horizontal offset in points from the anchor's reference edge. |
| `line` | `ShapeLine` | read-only The outline (a:ln) of a textbox, geometric shape or picture; throws for groups and canvases. |
| `lockAspectRatio` | `boolean` | noChangeAspect on the shape's own locks or the anchor's a:graphicFrameLocks. |
| `name` | `string` | The anchor's wp:docPr name, e.g. "Text Box 3". |
| `parentGroup` | `Shape \| undefined` | read-only The top-level group a member belongs to; undefined for a top-level shape. |
| `pictureFormat` | `PictureFormat` | read-only Extension: VBA's Shape.PictureFormat, for the crop members of a top-level picture. |
| `reflection` | `ReflectionFormat` | read-only VBA `Shape.Reflection`: the a:reflection in a:effectLst. |
| `relativeHorizontalPosition` | `"Page" \| "Column" \| "Character" \| "Margin" \| "LeftMargin" \| "RightMargin" \| "InsideMargin" \| "OutsideMargin" \| undefined` | wp:positionH/@relativeFrom — what `left` and `horizontalAlignment` are measured against. |
| `relativeVerticalPosition` | `"Page" \| "Line" \| "Paragraph" \| "Margin" \| "InsideMargin" \| "OutsideMargin" \| "TopMargin" \| "BottomMargin" \| undefined` | wp:positionV/@relativeFrom — what `top` and `verticalAlignment` are measured against. |
| `rotation` | `number` | a:xfrm\@rot in degrees, clockwise, in \[0, 360); a group turns its whole frame. |
| `shadow` | `ShapeShadow` | read-only `Word.ShadowFormat` (VBA `Shape.Shadow`): the outer shadow in a:effectLst. |
| `shapeGroup` | `ShapeGroup` | read-only The members of a GroupShape; throws for any other type. |
| `textFrame` | `TextFrame` | read-only The textbox's text-body properties (wps:bodyPr): anchoring, insets, autofit. |
| `textWrap` | `ShapeTextWrap` | read-only Word.ShapeTextWrap spelling of wrap, wrapSide and behindText, plus the anchor distances. |
| `top` | `number` | Vertical offset in points from the anchor's reference edge. |
| `type` | `ShapeType` | read-only |
| `verticalAlignment` | `"Inside" \| "Top" \| "Bottom" \| "Center" \| "Outside" \| undefined` | wp:positionV/wp:align; undefined when the position is an offset. |
| `verticalFlip` | `boolean` | read-only VBA `Shape.VerticalFlip`: a:xfrm\@flipV. |
| `visible` | `boolean` | wp:docPr\@hidden inverted. A hidden shape stays in the file but paints nothing: the bundled layout engine skips it entirely. |
| `width` | `number` | Frame width in points. |
| `wrap` | `"None" \| "Square" \| "Tight" \| "TopAndBottom" \| "Through"` | Which wp:wrap\* child the anchor carries. |
| `wrapSide` | `"Left" \| "Right" \| "Both" \| "Largest" \| undefined` | Which side text flows on; undefined unless the wrap is square/tight/through. |

### `Shape.bringToFront()`

```ts theme={null}
bringToFront(): void
```

Paint above every other floating shape: one past the document-wide
maximum wp:anchor z (relativeHeight). Ink behind the body text
(behindText) stays behind it; this orders the float layer only.

### `Shape.delete()`

```ts theme={null}
delete(): void
```

Remove the shape from the document. Handles into it become detached.

### `Shape.flip()`

```ts theme={null}
flip(type: ShapeFlipType): void
```

VBA `Shape.Flip`: mirrors the shape about its centre; a second flip undoes it.

### `Shape.getBase64ImageSrc()`

```ts theme={null}
getBase64ImageSrc(): Promise<string>
```

### `Shape.getRange()`

```ts theme={null}
getRange(): Range
```

Extension: the drawing's one character in its paragraph, as VBA's
InlineShape.Range (Shape.Anchor for a floating one). Its font sets the
run's, which sizes the line an inline shape sits on.

### `Shape.moveHorizontally()`

```ts theme={null}
moveHorizontally(distance: number): void
```

Shift the horizontal offset by a delta in points.

### `Shape.moveVertically()`

```ts theme={null}
moveVertically(distance: number): void
```

Shift the vertical offset by a delta in points.

### `Shape.scaleHeight()`

```ts theme={null}
scaleHeight(
  factor: number,
  scaleType?: ShapeScaleType,
  scaleFrom?: ShapeScaleFrom,
): void
```

Multiply the height by `factor`. Only "CurrentSize" scaling is supported.

### `Shape.scaleWidth()`

```ts theme={null}
scaleWidth(factor: number, scaleType?: ShapeScaleType, scaleFrom?: ShapeScaleFrom): void
```

Multiply the width by `factor`. Only "CurrentSize" scaling is supported.

### `Shape.sendToBack()`

```ts theme={null}
sendToBack(): void
```

Paint below every other floating shape (document-wide minimum z minus one, floored at 0).

### `Shape.set()`

```ts theme={null}
set(properties: ShapeUpdateData, options?: UpdateOptions): void
```

### `Shape.setFreeformPath()`

```ts theme={null}
setFreeformPath(path: string): void
```

Extension: Word's Edit Points / Crop to Shape. Replaces the geometry of a shape or a
picture's mask with a freeform; SVG path data (M, L, H, V, C, Q, Z) in points from its top-left.

## `ShapeAdjustments`

`PowerPoint.Adjustments` (VBA `Shape.Adjustments`) on a Word shape: the preset's
`a:avLst`. A length is a fraction of the shape (50000 → 0.5), an angle is in degrees.

Import from `@reductoai/docx/officejs`.

### ShapeAdjustments properties

| Name | Type | Description |
| - | - | - |
| `count` | `number` | read-only |

### `ShapeAdjustments.get()`

```ts theme={null}
get(index: number): number
```

### `ShapeAdjustments.set()`

```ts theme={null}
set(index: number, value: number): void
```

## `ShapeFill`

Import from `@reductoai/docx/officejs`.

### ShapeFill properties

| Name | Type | Description |
| - | - | - |
| `foregroundColor` | `string \| undefined` | #RRGGBB of a solid fill; undefined for NoFill/Mixed. |
| `gradientAngle` | `number` | VBA FillFormat.GradientAngle: degrees clockwise from the x axis; 0 when not a gradient. |
| `gradientStops` | `GradientStopCollection` | read-only VBA FillFormat.GradientStops. |
| `transparency` | `number` | 0 opaque through 1 clear: the solid colour's a:alpha. A fill that is not solid reads 0. |
| `type` | `"Mixed" \| "NoFill" \| "Solid" \| "Gradient"` | read-only |

### `ShapeFill.clear()`

```ts theme={null}
clear(): void
```

Make the shape transparent (a:noFill).

### `ShapeFill.set()`

```ts theme={null}
set(properties: ShapeFillUpdateData, options?: UpdateOptions): void
```

### `ShapeFill.setSolidColor()`

```ts theme={null}
setSolidColor(color: string): void
```

### `ShapeFill.twoColorGradient()`

```ts theme={null}
twoColorGradient(style: GradientStyle, variant: 1 | 2): void
```

VBA FillFormat.TwoColorGradient: the solid colour (or black) shading to white.

## `ShapeGroup`

Word.ShapeGroup: the members of a wpg group drawing, each a child Shape.

Import from `@reductoai/docx/officejs`.

### ShapeGroup properties

| Name | Type | Description |
| - | - | - |
| `shape` | `Shape` | read-only |
| `id` | `number` | read-only The group's own Shape id. |
| `shapes` | `HandleCollection<Shape>` | read-only Direct members in document order: textboxes, geometric shapes, pictures and nested groups. |

## `ShapeLine`

The outline (a:ln) of a shape's own spPr, named after Excel's ShapeLineFormat.
An absent a:ln means the theme's line (a:style/a:lnRef), which reads as
visible with no explicit color; the first write materializes the element.

Import from `@reductoai/docx/officejs`.

### ShapeLine properties

| Name | Type | Description |
| - | - | - |
| `beginArrowheadLength` | `ArrowheadLength` | |
| `beginArrowheadStyle` | `ArrowheadStyle` | |
| `beginArrowheadWidth` | `ArrowheadWidth` | |
| `color` | `string \| undefined` | #RRGGBB of a solid outline; undefined when hidden, themed or non-solid. |
| `dashStyle` | `"Solid" \| "Dash" \| "RoundDot" \| "SquareDot" \| "DashDot" \| "DashDotDot" \| "LongDash" \| "LongDashDot" \| "LongDashDotDot" \| "SystemDash" \| "SystemDot" \| "SystemDashDot"` | |
| `endArrowheadLength` | `ArrowheadLength` | |
| `endArrowheadStyle` | `ArrowheadStyle` | |
| `endArrowheadWidth` | `ArrowheadWidth` | |
| `transparency` | `number` | Word.LineFormat.transparency: 0 opaque through 1 clear, the solid outline's a:alpha. |
| `visible` | `boolean` | False only for an explicit a:ln/a:noFill. |
| `weight` | `number` | Stroke width in points; Word's 0.75 when a:ln carries no width. |

## `ShapeShadow`

`Word.ShadowFormat` on a shape or picture: one `a:outerShdw` in `a:effectLst`,
as Word's Shadow gallery writes it. Offsets and blur are in points.

Import from `@reductoai/docx/officejs`.

### ShapeShadow properties

| Name | Type | Description |
| - | - | - |
| `blur` | `number` | Blur radius in points. |
| `foregroundColor` | `ColorFormat` | read-only The shadow colour; writing it adds the shadow. |
| `isVisible` | `boolean` | Word's `isVisible`: an `a:outerShdw` is present. False removes it. |
| `offsetX` | `number` | Horizontal offset in points; positive is to the right. |
| `offsetY` | `number` | Vertical offset in points; positive is down. |
| `rotateWithShape` | `boolean` | |
| `transparency` | `number` | 0 (opaque) to 1 (clear), from the colour's `a:alpha`. |

### `ShapeShadow.incrementOffsetX()`

```ts theme={null}
incrementOffsetX(increment: number): void
```

### `ShapeShadow.incrementOffsetY()`

```ts theme={null}
incrementOffsetY(increment: number): void
```

### `ShapeShadow.set()`

```ts theme={null}
set(properties: ShapeShadowUpdateData, options?: UpdateOptions): void
```

## `ShapeTextWrap`

Import from `@reductoai/docx/officejs`.

### ShapeTextWrap properties

| Name | Type | Description |
| - | - | - |
| `bottomDistance` | `number` | |
| `leftDistance` | `number` | |
| `rightDistance` | `number` | |
| `side` | `"None" \| "Left" \| "Right" \| "Both" \| "Largest"` | None when the wrap type has no side (TopBottom, Behind, Front). |
| `topDistance` | `number` | |
| `type` | `"Inline" \| "Square" \| "Tight" \| "Through" \| "TopBottom" \| "Behind" \| "Front"` | Behind and Front are wrap None split on behindDoc; Inline is a wp:inline frame. |
| `wrapPolygon` | `WrapPoint[] \| undefined` | Extension: the Tight or Through contour (wp:wrapPolygon) in Word's 21600 × 21600 frame space, start point first. Undefined for the other wrap types. |

### `ShapeTextWrap.set()`

```ts theme={null}
set(properties: ShapeTextWrapUpdateData, options?: UpdateOptions): void
```

## `TextFrame`

A textbox shape's text-body properties (wps:bodyPr), OfficeJS
Word.TextFrame. Geometry the box's own layout honours: vertical anchoring,
insets, auto-size, word wrap.

Import from `@reductoai/docx/officejs`.

### TextFrame properties

| Name | Type | Description |
| - | - | - |
| `autoSizeSetting` | `"None" \| "ShapeToFitText" \| "TextToFitShape"` | a:noAutofit / a:spAutoFit / a:normAutofit; absent reads None. |
| `bottomMargin` | `number` | |
| `hasText` | `boolean` | read-only Whether the box currently holds any text. |
| `leftMargin` | `number` | |
| `noTextRotation` | `boolean` | bodyPr\@upright: true keeps the text level when the shape rotates. |
| `orientation` | `TextFrameOrientation` | bodyPr\@vert; absent reads Horizontal, wordArt values read Mixed. |
| `rightMargin` | `number` | |
| `topMargin` | `number` | |
| `verticalAlignment` | `"Top" \| "Middle" \| "Bottom"` | bodyPr\@anchor: where the text block sits inside the frame. |
| `warpFormat` | `"PlainText" \| "None" \| "Stop" \| "TriangleUp" \| "TriangleDown" \| "ChevronUp" \| "ChevronDown" \| "RingInside" \| "RingOutside" \| "ArchUpCurve" \| "ArchDownCurve" \| "CircleCurve" \| "ButtonCurve" \| "ArchUpPour" \| "ArchDownPour" \| "CirclePour" \| "ButtonPour" \| "CurveUp" \| "CurveDown" \| "CanUp" \| "CanDown" \| "Wave1" \| "Wave2" \| "DoubleWave1" \| "DoubleWave2" \| "Inflate" \| "Deflate" \| "InflateBottom" \| "DeflateBottom" \| "InflateTop" \| "DeflateTop" \| "DeflateInflate" \| "DeflateInflateDeflate" \| "FadeRight" \| "FadeLeft" \| "FadeUp" \| "FadeDown" \| "SlantUp" \| "SlantDown" \| "CascadeUp" \| "CascadeDown"` | Extension: the warp the text follows, `a:prstTxWarp` (VBA `TextFrame2.WarpFormat`, named as `MsoPresetTextEffectShape`). Absent reads None. |
| `wordWrap` | `boolean` | bodyPr\@wrap: false lets lines run past the frame instead of wrapping. |

### `TextFrame.set()`

```ts theme={null}
set(properties: TextFrameUpdateData, options?: UpdateOptions): void
```
