> ## 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.

# Types: editor: Sections and pages

## `GutterCardBox`

A thread's card under its icon, in scroller px.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `left` | `number` | |
| `top` | `number` | |
| `width` | `number` | |

## `GutterLayout`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `open?` | `GutterPin` | The pin whose card is open; the composer's pin wins. |
| `pins` | `GutterPin[]` | |

## `GutterMetrics`

Gutter geometry, in scroller px.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `cardGap` | `number` | Space between the icon and the card under it. |
| `cardInset` | `number` | A card keeps this far inside the page. |
| `cardWidth` | `number` | |
| `edge` | `number` | Inset of the icon from the page's right edge and from the connector's elbow. |
| `icon` | `number` | |
| `sameLine` | `number` | Anchors this close share one icon: Word marks a line once. |

## `GutterPin`

One icon: every comment that hangs off one line, or the composer while comments float.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `active` | `boolean` | The caret is in one of its threads, or its card is open. |
| `card` | `GutterCardBox` | |
| `color` | `string` | |
| `draft` | `boolean` | The composer's pin: shown only while comments float over the page. |
| `ids` | `string[]` | |
| `key` | `string` | Unique among the pins; the first anchor's slot. |
| `left` | `number` | |
| `page` | `number` | |
| `peeked` | `boolean` | Its card floats over the page (`ReviewModel.peek`). |
| `size` | `number` | |
| `threads` | `CommentThread[]` | |
| `top` | `number` | |

## `HeaderFooterSlot`

The header or footer one page shows. `section` counts sectPr in document order, `type` is
which of the section's three it is, `linked` is Word's Link to Previous, and `story` is
absent when the page shows none.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `kind` | `"header" \| "footer"` | |
| `linked` | `boolean` | |
| `page` | `number` | |
| `section` | `number` | |
| `story?` | `string` | |
| `type` | `"default" \| "first" \| "even"` | |

## `LineNumbers`

Word's Line Numbers options for one section.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `countBy?` | `number` | Show every Nth number; default 1. |
| `distancePt?` | `number` | From the text column; absent is Word's Auto. |
| `restart` | `"continuous" \| "eachPage" \| "eachSection"` | |
| `start?` | `number` | The first number shown; default 1. |

## `PageBox`

Points from the page's top-left corner.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `h` | `number` | |
| `w` | `number` | |
| `x` | `number` | |
| `y` | `number` | |

## `PageFrame`

A page card's box in the scroller's content px, plus the connector elbow column.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `elbowX` | `number` | |
| `height` | `number` | |
| `left` | `number` | |
| `page` | `number` | |
| `scale` | `number` | Display px per hmm. |
| `top` | `number` | |
| `width` | `number` | |

## `PageNumberFormat`

Not exported by name. You get it from the API.

```ts theme={null}
type PageNumberFormat = "decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman"
```

## `PageOverlay`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `box` | `PageBox` | |
| `node` | `HTMLElement` | |
| `page` | `number` | The page as `hitTest` numbers it. |
| `move()` | `(box: PageBox, page?: number) => void` | A new box, and a new page when given. |
| `remove()` | `() => void` | |

## `PageOverlays`

Host nodes pinned to pages; `EditorModel.overlays`.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `list()` | `() => PageOverlay[]` | Every pinned node, on screen or waiting for its page. |
| `mount()` | `(page: number, node: HTMLElement, box: PageBox) => PageOverlay` | Pins `node` to page `page` (as `hitTest` numbers it); it stays until `remove`. |

## `PagePoint`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `page` | `number` | |
| `x` | `number` | |
| `y` | `number` | |

## `RulerUnit`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

```ts theme={null}
type RulerUnit = "in" | "cm"
```

## `SectionBreakKind`

How the section after a break begins (`w:sectPr/w:type`).

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

```ts theme={null}
type SectionBreakKind = "nextPage" | "continuous" | "evenPage" | "oddPage"
```

## `SectionFormat`

Page setup of one section in points; an absent key leaves that value as it is.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `bottomMarginPt?` | `number` | |
| `columns?` | `number` | Equal-width text columns, 1 through 45. |
| `columnSeparator?` | `boolean` | Word's Line Between: a rule down the middle of each column gap. |
| `columnSpacingPt?` | `number` | |
| `columnWidthsPt?` | `number[] \| null` | Unequal columns, left to right, with `columnSpacingPt` (or the stored gap) between each; null makes them equal again. |
| `differentFirstPage?` | `boolean` | `w:titlePg`; turning it on adds the empty first-page header and footer Word does. |
| `endnotes?` | `NoteNumbering` | `w:endnotePr`; endnotes cannot restart on each page. |
| `footerDistancePt?` | `number` | |
| `footnotes?` | `NoteNumbering` | Footnote and Endnote dialog for this section (`w:footnotePr`). |
| `gutterAtTop?` | `boolean` | `w:gutterAtTop` in settings: the gutter goes on the top margin; document-wide. |
| `gutterPt?` | `number` | `w:pgMar/@w:gutter`: binding space added to the left (or inside) margin. |
| `headerDistancePt?` | `number` | Header from Top and Footer from Bottom (`w:pgMar` `w:header` / `w:footer`). |
| `leftMarginPt?` | `number` | |
| `lineNumbers?` | `LineNumbers \| null` | Layout > Line Numbers (`w:lnNumType`); null turns them off. |
| `mirrorMargins?` | `boolean` | `w:mirrorMargins` in settings: left and right become inside and outside; document-wide. |
| `oddAndEvenPages?` | `boolean` | `w:evenAndOddHeaders` in settings, for the whole document as in Word. |
| `orientation?` | `"portrait" \| "landscape"` | Word turns the page box with the page: a landscape section is wider than tall. |
| `pageBorder?` | `CellBorder \| null` | Page Borders > Box: one line on all four sides, 24pt from the page edge by default; null for None. |
| `pageHeightPt?` | `number` | |
| `pageNumberFormat?` | `PageNumberFormat` | `w:pgNumType/@w:fmt` for this section's page numbers. |
| `pageNumberStart?` | `number \| null` | `w:pgNumType/@w:start`; null continues from the previous section. |
| `pageWidthPt?` | `number` | |
| `rightMarginPt?` | `number` | |
| `topMarginPt?` | `number` | |

## `SectionState`

Page setup of the section that holds the caret: declared values, Word's defaults when absent.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `bottomMarginPt` | `number` | |
| `columns` | `number` | |
| `columnSeparator` | `boolean` | |
| `columnSpacingPt` | `number` | |
| `columnWidthsPt?` | `number[]` | Present only when the columns have their own widths. |
| `count` | `number` | |
| `differentFirstPage` | `boolean` | |
| `endnotes` | `Required<Omit<NoteNumbering, "applyTo">>` | |
| `footerDistancePt` | `number` | |
| `footnotes` | `Required<Omit<NoteNumbering, "applyTo">>` | |
| `gutterAtTop` | `boolean` | |
| `gutterPt` | `number` | |
| `hasFooter` | `boolean` | |
| `hasHeader` | `boolean` | |
| `headerDistancePt` | `number` | |
| `index` | `number` | 0-based, in document order. |
| `leftMarginPt` | `number` | |
| `lineNumbers?` | `LineNumbers` | Absent: the section numbers no lines. |
| `mirrorMargins` | `boolean` | |
| `oddAndEvenPages` | `boolean` | |
| `orientation` | `"portrait" \| "landscape"` | |
| `pageBorder?` | `CellBorder` | The section's box page border; absent for none or one whose sides differ. |
| `pageColor?` | `string` | Design > Page Color as RRGGBB; document-wide. Absent: none. |
| `pageHeightPt` | `number` | |
| `pageNumberFormat` | `PageNumberFormat` | |
| `pageNumbers?` | `true` | A header or footer holds a page number Remove Page Numbers would take out. |
| `pageNumberStart?` | `number` | Absent: numbering continues from the previous section. |
| `pageWidthPt` | `number` | |
| `paragraphSpacing` | `{ after: number; line: number }` | Design > Paragraph Spacing: the default space after (twips) and auto line spacing (240ths). |
| `rightMarginPt` | `number` | |
| `start` | `SectionBreakKind \| "nextColumn"` | How this section begins; the first section always reads "nextPage". |
| `themeColors?` | `ThemeColorScheme` | Design > Colors: the theme's colour scheme; document-wide. |
| `themeFonts?` | `ThemeFontScheme` | Design > Fonts: the theme's heading (major) and body (minor) faces; document-wide. |
| `topMarginPt` | `number` | |
| `watermark?` | `Watermark` | Design > Watermark: the text watermark in the headers. Absent: none. |

## `ToolbarSection`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

```ts theme={null}
type ToolbarSection = keyof typeof TOOLBAR_SECTIONS
```
