New

docx-editor 1.x has shipped. Vue support, i18n, agents. Read the migration guide →

API Referencev1.0.2

@eigenpal/docx-editor-core/types/document

Comprehensive TypeScript types for full DOCX document representation

This barrel file re-exports all types from the split modules. Existing imports from './types/document' continue to work unchanged.

Module structure: - colors.ts — Color primitives, borders, shading - formatting.ts — Text, paragraph, and table formatting properties - lists.ts — Numbering and list definitions - content.ts — Content model (runs, images, shapes, tables, paragraphs, sections) - styles.ts — Styles, theme, fonts, relationships, media

Interfaces(100)

interface

AbstractNumbering

packages/core/src/types/lists.ts:129

Abstract numbering definition (`w:abstractNum`) — the reusable template for a list: which `NumberFormat` at each indentation level, what marker text, what paragraph/character formatting. Multiple `NumberingInstance`s (`w:num`) can reference one abstract numbering to share the template while keeping independent counters.

See ECMA-376 §17.9.

interface AbstractNumbering
MemberTypeSummary
abstractNumIdnumberAbstract numbering ID
levelsListLevel[]Level definitions
multiLevelType?'hybridMultilevel' | 'multilevel' | 'singleLevel'Multi-level type
name?stringName

Block-level SDT (content control wrapping paragraphs/tables)

interface BlockSdt
MemberTypeSummary
content(Paragraph | Table)[]Block content inside the control
propertiesSdtPropertiesSDT properties
type'blockSdt'

Bookmark end marker (w:bookmarkEnd)

interface BookmarkEnd
MemberTypeSummary
idnumberBookmark ID
type'bookmarkEnd'

Bookmark start marker (w:bookmarkStart)

interface BookmarkStart
MemberTypeSummary
colFirst?numberColumn index for table bookmarks
colLast?number
idnumberBookmark ID
namestringBookmark name
type'bookmarkStart'

One side of a border — style, color, width, spacing. Used by paragraph borders, table borders (per-cell or whole-table), and page borders. `size` is in eighths of a point (Word's wire format); `space` is in points.

See ECMA-376 §17.18.2 (`ST_Border`).

interface BorderSpec
MemberTypeSummary
color?ColorValueColor of the border
frame?booleanFrame effect
shadow?booleanShadow effect
size?numberWidth in eighths of a point (1/8 pt)
space?numberSpacing from text in points
style'none' | 'single' | 'double' | 'dotted' | 'dashed' | 'thick' | 'triple' | 'thinThickSmallGap' | 'thickThinSmallGap' | 'thinThickMediumGap' | 'thickThinMediumGap' | 'thinThickLargeGap' | 'thickThinLargeGap' | 'wave' | 'doubleWave' | 'dashSmallGap' | 'dashDotStroked' | 'threeDEmboss' | 'threeDEngrave' | 'outset' | 'inset' | 'nil'Border style

Line break

interface BreakContent
MemberTypeSummary
breakType?'page' | 'column' | 'textWrapping'Break type
clear?'none' | 'left' | 'right' | 'all'Clear type for text wrapping break
type'break'

Cell margins

interface CellMargins
MemberTypeSummary
bottom?TableMeasurement
left?TableMeasurement
right?TableMeasurement
top?TableMeasurement

ECMA-376 color reference — either a direct RGB hex, a theme slot reference (with optional tint/shade), or `auto` for context-dependent defaults (usually black for text on light backgrounds). When both `rgb` and `themeColor` are set, the theme wins on Word import and the `rgb` acts as a fallback for renderers without theme support.

See ECMA-376 §17.18.39 (`ST_ThemeColor`).

interface ColorValue
MemberTypeSummary
auto?booleanAuto color - context-dependent (usually black for text)
rgb?stringRGB hex value without # (e.g., "FF0000")
themeColor?ThemeColorSlotTheme color slot reference
themeShade?stringShade modifier (0-255 as hex string) - makes color darker
themeTint?stringTint modifier (0-255 as hex string, e.g., "80") - makes color lighter

Column definition

interface Column
MemberTypeSummary
space?numberSpace after column in twips
width?numberColumn width in twips
interface

Comment_2

A comment from `comments.xml` — the top-level entity for review comments and replies. `id` matches the inline `CommentRangeStart` / `CommentRangeEnd` markers that anchor it inside a paragraph; `parentId` threads replies under their parent; `done` reflects Word's "Resolve" state (`w15:done`).

interface Comment
MemberTypeSummary
authorstringAuthor name
contentParagraph[]Comment content (paragraphs)
date?stringDate
done?booleanWhether the comment is resolved/done
idnumberComment ID (matches commentRangeStart/End)
initials?stringAuthor initials
parentId?numberParent comment ID (for replies)

Comment range end marker in paragraph content

interface CommentRangeEnd
MemberTypeSummary
idnumber
type'commentRangeEnd'

Comment range start marker in paragraph content

interface CommentRangeStart
MemberTypeSummary
idnumber
type'commentRangeStart'

Complex field (w:fldChar begin/separate/end with w:instrText)

interface ComplexField
MemberTypeSummary
dirty?booleanField is dirty
fieldCodeRun[]Field code runs
fieldResultRun[]Display result runs
fieldTypeFieldTypeParsed field type
fldLock?booleanField is locked
instructionstringField instruction
type'complexField'
interface

ConditionalFormatStyle

packages/core/src/types/formatting.ts:487

Conditional format style

interface ConditionalFormatStyle
MemberTypeSummary
evenHBand?booleanEven horizontal band
evenVBand?booleanEven vertical band
firstColumn?booleanFirst column
firstRow?booleanFirst row
lastColumn?booleanLast column
lastRow?booleanLast row
neCell?booleanNortheast corner
nwCell?booleanNorthwest corner
oddHBand?booleanOdd horizontal band
oddVBand?booleanOdd vertical band
seCell?booleanSoutheast corner
swCell?booleanSouthwest corner

Deletion wrapper (w:del) — runs deleted by tracked changes

interface Deletion
MemberTypeSummary
content(Run | Hyperlink)[]Deleted content
infoTrackedChangeInfoTracked change metadata
type'deletion'

Document defaults (w:docDefaults)

interface DocDefaults
MemberTypeSummary
pPr?ParagraphFormattingDefault paragraph properties
rPr?TextFormattingDefault run properties
interface

Document_2

Top-level parsed DOCX document — the result of `parseDocx(buffer)`.

Wraps the unzipped DOCX package (`document.xml`, `styles.xml`, etc.), the original buffer for round-trip saves, and any template variables / parse warnings detected during ingestion.

interface Document
```ts
import { parseDocx } from '@eigenpal/docx-editor-core/headless';
const doc = await parseDocx(buffer);
console.log(doc.package.document.content.length);
```
MemberTypeSummary
originalBuffer?ArrayBufferOriginal DOCX buffer. Kept for round-trip saves that preserve untouched parts.
packageDocxPackageParsed DOCX package — body, styles, numbering, theme, media, headers/footers.
templateVariables?string[]Detected docxtemplater variables (e.g. `{name}`, `{address}`). Populated when the document is recognized as a template.
warnings?string[]Non-fatal parser diagnostics — malformed parts, unsupported features, fallbacks.

Document body (`w:body`) — the editable content of the document.

Contains the ordered block content (paragraphs and tables), the section layout chain derived from inline `sectPr` markers, the final `sectPr`, and any document-level comments. This is what most edit operations mutate; headers/footers/styles live elsewhere in the package.

interface DocumentBody
MemberTypeSummary
comments?Comment[]Comments from comments.xml
contentBlockContent[]All content (paragraphs, tables)
finalSectionProperties?SectionPropertiesFinal section properties (from body's sectPr)
sections?Section[]Sections (derived from sectPr in paragraphs and final sectPr)

Complete DOCX package structure

interface DocxPackage
MemberTypeSummary
documentDocumentBodyDocument body
endnotes?Endnote[]Endnotes
fontTable?FontTableFont table
footers?Map<string, HeaderFooter>Footers by relationship ID
footnotes?Footnote[]Footnotes
headers?Map<string, HeaderFooter>Headers by relationship ID
media?Map<string, MediaFile>Media files
numbering?NumberingDefinitionsNumbering definitions
properties?{ title?: string; subject?: string; creator?: string; keywords?: string; description?: string; lastModifiedBy?: string; revision?: number; created?: Date; modified?: Date; }Document properties
relationships?RelationshipMapDocument relationships
styles?StyleDefinitionsStyle definitions
theme?ThemeTheme

Drawing/image reference

interface DrawingContent
MemberTypeSummary
imageImageImage data
type'drawing'

Endnote (w:endnote)

interface Endnote
MemberTypeSummary
content(Paragraph | Table)[]Content. Per ECMA-376 §17.11.4 endnotes can hold the same blocks as the body — paragraphs and tables. See note on `Footnote.content`.
idnumberEndnote ID
noteType?'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice'Special endnote type
type'endnote'

Endnote properties

interface EndnoteProperties
MemberTypeSummary
numFmt?NumberFormat
numRestart?NoteNumberRestart
numStart?number
position?EndnotePosition

Field character (begin/separate/end)

interface FieldCharContent
MemberTypeSummary
charType'begin' | 'separate' | 'end'Field character type
dirty?booleanField is dirty (needs update)
fldLock?booleanField is locked
type'fieldChar'
interface

FloatingTableProperties

packages/core/src/types/formatting.ts:414

Floating table properties

interface FloatingTableProperties
MemberTypeSummary
bottomFromText?number
horzAnchor?'margin' | 'page' | 'text'Horizontal anchor
leftFromText?number
rightFromText?number
tblpX?numberHorizontal position
tblpXSpec?'left' | 'center' | 'right' | 'inside' | 'outside'
tblpY?numberVertical position
tblpYSpec?'top' | 'center' | 'bottom' | 'inside' | 'outside' | 'inline'
topFromText?numberDistance from surrounding text
vertAnchor?'margin' | 'page' | 'text'Vertical anchor

Font info from fontTable.xml

interface FontInfo
MemberTypeSummary
altName?stringAlternate names
charset?stringCharacter set
embedBold?string
embedBoldItalic?string
embedItalic?string
embedRegular?stringEmbedded font data reference
family?'decorative' | 'modern' | 'roman' | 'script' | 'swiss' | 'auto'Font family type
namestringFont name
panose1?stringPanose-1 classification
pitch?'default' | 'fixed' | 'variable'Pitch (fixed or variable)
sig?{ usb0?: string; usb1?: string; usb2?: string; usb3?: string; csb0?: string; csb1?: string; }Signature

Font table from fontTable.xml

interface FontTable
MemberTypeSummary
fontsFontInfo[]
interface FooterReference
MemberTypeSummary
rIdstring
typeHeaderFooterType

Footnote (w:footnote)

interface Footnote
MemberTypeSummary
content(Paragraph | Table)[]Content. Per ECMA-376 §17.11.10 footnotes can hold the same blocks as the body — paragraphs and tables. The parser previously only collected w:p children which silently dropped any w:tbl inside a footnote; widened to match HeaderFooter / TableCell shape so the body pipeline (toProseDoc → toFlowBlocks) can render them uniformly.
idnumberFootnote ID
noteType?'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice'Special footnote type
type'footnote'

Footnote properties

interface FootnoteProperties
MemberTypeSummary
numFmt?NumberFormat
numRestart?NoteNumberRestart
numStart?number
position?FootnotePosition

Header or footer content

interface HeaderFooter
MemberTypeSummary
content(Paragraph | Table)[]Content (paragraphs, tables, etc.)
hdrFtrTypeHeaderFooterTypeHeader/footer type
type'header' | 'footer'

Header or footer reference

interface HeaderReference
MemberTypeSummary
rIdstring
typeHeaderFooterType
interface

Image_2

Embedded image (`w:drawing` with an inline or anchored picture). Carries the relationship-id pointer to the binary in `word/media/`, its resolved data URL (`src`), display dimensions, optional crop / transform / wrap behaviors, and anchor positioning for floating images.

See ECMA-376 §20.4 (DrawingML wordprocessingDrawing).

interface Image
MemberTypeSummary
allowOverlap?boolean`wp:anchor allowOverlap` — when true (default), anchored objects may overlap; when false, Word repositions them to avoid collisions. We don't currently reposition; we round-trip the flag so saving preserves the author's intent.
alt?stringAlt text for accessibility
crop?ImageCropSource-image crop (fractional, OOXML `a:srcRect`).
decorative?booleanWhether this is a decorative image
effects?{ brightness?: number; contrast?: number; saturation?: number; }Image effects
filename?stringOriginal filename
hlinkHref?stringHyperlink URL for clickable image
id?stringUnique ID
layoutInCell?boolean`wp:anchor layoutInCell` — when true (default), an anchored image inside a table cell is constrained to the cell. When false, the image escapes the cell into the page area. Round-tripped on save.
mimeType?stringImage MIME type
opacity?numberOpacity in [0, 1] (OOXML `a:alphaModFix amt`). Undefined = fully opaque.
originalSize?ImageSizeOriginal size before any transforms
outline?ShapeOutlineImage outline/border
padding?ImagePaddingPadding around image
position?ImagePositionPosition for floating images
rIdstringRelationship ID for the image data
sizeImageSizeImage size
src?stringResolved image data (base64 or blob URL)
title?stringTitle/description
transform?ImageTransformImage transformations
type'image'
wrapImageWrapWrap settings

Image crop, expressed as fractions of the source image to trim from each edge. OOXML's `<a:srcRect l="10000" t="0" r="5000" b="0"/>` uses units of 1/100000 (so 10000 → 0.1 → 10% trimmed from the left). We store the normalised fraction so both the renderer and the saver can read it directly without re-parsing units.

interface ImageCrop
MemberTypeSummary
bottom?number
left?number
right?number
top?number

Image padding/margins

interface ImagePadding
MemberTypeSummary
bottom?number
left?number
right?number
top?number

Position for floating images

interface ImagePosition
MemberTypeSummary
horizontal{ relativeTo: 'character' | 'column' | 'insideMargin' | 'leftMargin' | 'margin' | 'outsideMargin' | 'page' | 'rightMargin'; alignment?: 'left' | 'right' | 'center' | 'inside' | 'outside'; posOffset?: number; }Horizontal positioning
vertical{ relativeTo: 'insideMargin' | 'line' | 'margin' | 'outsideMargin' | 'page' | 'paragraph' | 'topMargin' | 'bottomMargin'; alignment?: 'top' | 'bottom' | 'center' | 'inside' | 'outside'; posOffset?: number; }Vertical positioning

Image size specification

interface ImageSize
MemberTypeSummary
heightnumberHeight in EMUs
widthnumberWidth in EMUs (English Metric Units)

Image transformation

interface ImageTransform
MemberTypeSummary
flipH?booleanFlip horizontal
flipV?booleanFlip vertical
rotation?numberRotation in degrees

Image wrap type for floating images

interface ImageWrap
MemberTypeSummary
distB?number
distL?number
distR?number
distT?numberDistance from text
typeWrapType
wrapText?'bothSides' | 'left' | 'right' | 'largest'Wrap text direction

Inline SDT (content control within a paragraph)

interface InlineSdt
MemberTypeSummary
content(Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[]Inline content held inside the control. OOXML allows runs, hyperlinks, simple/complex fields, nested SDTs, and math at this level; the renderer must descend into all of them so docProps-bound fields and similar template content survive paged rendering.
propertiesSdtPropertiesSDT properties
type'inlineSdt'

Insertion wrapper (w:ins) — runs inserted by tracked changes

interface Insertion
MemberTypeSummary
content(Run | Hyperlink)[]Inserted content
infoTrackedChangeInfoTracked change metadata
type'insertion'

Field instruction text

interface InstrTextContent
MemberTypeSummary
textstringField instruction
type'instrText'

One indentation level of an abstract numbering definition (`w:lvl`). Carries the number format, the marker template (`lvlText` — e.g. `"%1.%2."`), the level's paragraph properties (indent, hanging) and character properties (font, size, color for the marker itself).

`ilvl` ranges 0-8 in standard Word documents.

interface ListLevel
MemberTypeSummary
ilvlnumberLevel index (0-8)
isLgl?booleanIs legal numbering style
legacy?{ legacy?: boolean; legacySpace?: number; legacyIndent?: number; }Legacy settings
lvlJc?'left' | 'center' | 'right'Justification
lvlRestart?numberRestart numbering from higher level
lvlTextstringLevel text (e.g., "%1." or "•")
numFmtNumberFormatNumber format
pPr?ParagraphFormattingParagraph properties for this level
rPr?TextFormattingRun properties for the number/bullet
start?numberStarting number
suffix?LevelSuffixSuffix after number

Computed list marker for one paragraph — what the layout engine and painter need to render the "1.", "a)", "•" prefix. Not part of the wire format; the parser fills this from the `numbering.xml` chain plus the paragraph's `numPr`. Paragraphs without list rendering omit it.

interface ListRendering
MemberTypeSummary
abstractNumId?numberabstractNumId the paragraph's numId points to (counters key on this).
isBulletbooleanWhether this is a bullet or numbered list
levelnumberList level (0-8)
levelNumFmts?NumberFormat[]NumberFormat for each level from 0..ilvl (inclusive). Used to resolve multi-level templates like "%1.%2." where each %N may need a different format (e.g., upperRoman parent + decimal child).
markerstringComputed marker text (e.g., "1.", "a)", "•")
markerFontFamily?stringMarker font family from numbering level rPr (ascii name)
markerFontSize?numberMarker font size from numbering level rPr, in points
markerHidden?booleanWhether the list marker is hidden (w:vanish on level rPr)
numFmt?NumberFormatNumber format type (decimal, lowerRoman, upperRoman, etc.)
numIdnumberNumbering ID
startOverride?numberStart value from the numId's lvlOverride for the paragraph's ilvl, if any. Per ECMA-376 §17.9.18, this resets the shared abstractNum counter the first time the numId appears.

Math equation content (m:oMath or m:oMathPara)

interface MathEquation
MemberTypeSummary
display'inline' | 'block'Whether this is a block (oMathPara) or inline (oMath) equation
ommlXmlstringRaw OMML XML for round-trip preservation
plainText?stringPlain text representation for accessibility/fallback
type'mathEquation'

Media file from word/media/

interface MediaFile
MemberTypeSummary
base64?stringBase64 encoded data for rendering
dataArrayBufferBinary data
dataUrl?stringData URL for direct use in src attributes
filename?stringOriginal filename
mimeTypestringMIME type
pathstringFile path in ZIP

Move-from wrapper (w:moveFrom) — content moved away from this position

interface MoveFrom
MemberTypeSummary
content(Run | Hyperlink)[]Moved content
infoTrackedChangeInfoTracked change metadata
type'moveFrom'

Move-from range end marker (w:moveFromRangeEnd)

interface MoveFromRangeEnd
MemberTypeSummary
idnumber
type'moveFromRangeEnd'

Move-from range start marker (w:moveFromRangeStart) — ECMA-376 §17.13.5.22 Pairs with moveFromRangeEnd to delimit the source of a move in the document.

interface MoveFromRangeStart
MemberTypeSummary
idnumber
namestring
type'moveFromRangeStart'

Move-to wrapper (w:moveTo) — content moved into this position

interface MoveTo
MemberTypeSummary
content(Run | Hyperlink)[]Moved content
infoTrackedChangeInfoTracked change metadata
type'moveTo'

Move-to range end marker (w:moveToRangeEnd)

interface MoveToRangeEnd
MemberTypeSummary
idnumber
type'moveToRangeEnd'

Move-to range start marker (w:moveToRangeStart) — ECMA-376 §17.13.5.24 Pairs with moveToRangeEnd to delimit the destination of a move.

interface MoveToRangeStart
MemberTypeSummary
idnumber
namestring
type'moveToRangeStart'

Non-breaking hyphen

interface NoBreakHyphenContent
MemberTypeSummary
type'noBreakHyphen'

Footnote or endnote reference

interface NoteReferenceContent
MemberTypeSummary
idnumberNote ID
type'footnoteRef' | 'endnoteRef'
interface

NumberingDefinitions

packages/core/src/types/lists.ts:205

Top-level numbering data from `numbering.xml` — the set of abstract templates and the per-document `NumberingInstance`s that reference them. Paragraphs reference a `numId` (instance), not an `abstractNumId` directly.

interface NumberingDefinitions
MemberTypeSummary
abstractNumsAbstractNumbering[]Abstract numbering definitions
numsNumberingInstance[]Numbering instances
interface

NumberingInstance

packages/core/src/types/lists.ts:147

Numbering instance (w:num)

interface NumberingInstance
MemberTypeSummary
abstractNumIdnumberReference to abstract numbering
levelOverrides?Array<{ ilvl: number; startOverride?: number; lvl?: ListLevel; }>Level overrides
numIdnumberNumbering ID (referenced by paragraphs)

Paragraph (`w:p`) — the primary block-level container in a Word document.

Every paragraph carries direct formatting (`formatting`), tracked property changes (`propertyChanges`), inline content (`content`), and optional list rendering / section break metadata. `paraId` is Word's stable identifier (`w14:paraId`) and is what `EditorBridge` and the agent toolkit use to address paragraphs.

See ECMA-376 §17.3.1.

interface Paragraph
MemberTypeSummary
contentParagraphContent[]Paragraph content
formatting?ParagraphFormattingParagraph formatting
listRendering?ListRenderingComputed list rendering (if this is a list item)
paraId?stringUnique paragraph ID
propertyChanges?ParagraphPropertyChange[]Paragraph-level tracked property changes (w:pPrChange)
renderedPageBreakBefore?booleanWord's cached layout says this paragraph started on a new rendered page.
sectionProperties?SectionPropertiesSection properties (if this paragraph ends a section)
textId?stringText ID
type'paragraph'

Paragraph-level formatting (`w:pPr`) — alignment, indentation, spacing (before/after, line height), pagination flags (keepNext, keepLines, pageBreakBefore, widowControl), tabs, borders, shading, numbering reference, style reference, and frame/anchored-text properties.

Most fields mirror their ECMA-376 element names (see §17.3.1). Inheritance: direct formatting beats the linked style which beats document defaults.

interface ParagraphFormatting
MemberTypeSummary
afterAutospacing?booleanAuto space after (w:spacing/w:afterAutospacing)
alignment?ParagraphAlignmentParagraph alignment (w:jc)
beforeAutospacing?booleanAuto space before (w:spacing/w:beforeAutospacing)
bidi?booleanText direction (w:bidi)
borders?{ top?: BorderSpec; bottom?: BorderSpec; left?: BorderSpec; right?: BorderSpec; between?: BorderSpec; bar?: BorderSpec; }Paragraph borders (w:pBdr)
contextualSpacing?booleanContextual spacing — suppress space between paragraphs of the same style (w:contextualSpacing)
frame?{ width?: number; height?: number; hAnchor?: 'text' | 'margin' | 'page'; vAnchor?: 'text' | 'margin' | 'page'; x?: number; y?: number; xAlign?: 'left' | 'center' | 'right' | 'inside' | 'outside'; yAlign?: 'top' | 'center' | 'bottom' | 'inside' | 'outside' | 'inline'; wrap?: 'around' | 'auto' | 'none' | 'notBeside' | 'through' | 'tight'; }Text frame properties (w:framePr)
hangingIndent?booleanWhether first line is hanging indent
indentFirstLine?numberFirst line indent in twips - positive for indent, negative for hanging (w:ind/w:firstLine or w:hanging)
indentLeft?numberLeft indent in twips (w:ind/w:left)
indentRight?numberRight indent in twips (w:ind/w:right)
keepLines?booleanKeep lines together (w:keepLines)
keepNext?booleanKeep with next paragraph (w:keepNext)
lineSpacing?numberLine spacing value (w:spacing/w:line)
lineSpacingRule?LineSpacingRuleLine spacing rule (w:spacing/w:lineRule)
numPr?{ numId?: number; ilvl?: number; }Numbering properties (w:numPr)
outlineLevel?numberOutline level 0-9 (w:outlineLvl)
pageBreakBefore?booleanPage break before (w:pageBreakBefore)
runProperties?TextFormattingRun properties to apply to all runs (w:rPr)
shading?ShadingPropertiesParagraph shading (w:shd)
spaceAfter?numberSpacing after in twips (w:spacing/w:after)
spaceBefore?numberSpacing before in twips (w:spacing/w:before)
spacingExplicit?SpacingExplicitPer-side flags marking which `<w:spacing>` attrs came from this paragraph's own pPr (vs inherited). Word collapses style-inherited spacing on empty paragraphs but honors the explicit values.
styleId?stringParagraph style ID (w:pStyle)
suppressAutoHyphens?booleanSuppress auto hyphens (w:suppressAutoHyphens)
suppressLineNumbers?booleanSuppress line numbers (w:suppressLineNumbers)
tabs?TabStop[]Custom tab stops (w:tabs)
widowControl?booleanWidow/orphan control (w:widowControl)

Paragraph property change (w:pPrChange)

interface ParagraphPropertyChange
MemberTypeSummary
currentFormatting?ParagraphFormattingParagraph properties after the tracked change (editor model convenience)
infoPropertyChangeInfoTracked change metadata
previousFormatting?ParagraphFormattingParagraph properties before the tracked change
type'paragraphPropertyChange'

Generic tracked property-change wrapper metadata (w:*PrChange)

interface PropertyChangeInfo extends TrackedChangeInfo
MemberTypeSummary
rsid?stringOptional revision session ID

Relationship entry

interface Relationship
MemberTypeSummary
idstringRelationship ID (e.g., "rId1")
targetstringTarget path or URL
targetMode?'External' | 'Internal'Target mode
typeRelationshipTypeRelationship type URI

A run (`w:r`) — a contiguous span of inline content sharing one set of character properties (bold, italic, font, color, etc.). Runs are the atomic unit of character formatting; toggling bold on a selection that spans different formatting creates new runs.

See ECMA-376 §17.3.2.

interface Run
```ts
const run: Run = {
  type: 'run',
  formatting: { bold: true },
  content: [{ type: 'text', text: 'Hello' }],
};
```
MemberTypeSummary
contentRunContent[]Run content (text, tabs, breaks, etc.)
formatting?TextFormattingText formatting properties
propertyChanges?RunPropertyChange[]Run-level tracked property changes (w:rPrChange)
type'run'

Run property change (w:rPrChange)

interface RunPropertyChange
MemberTypeSummary
currentFormatting?TextFormattingRun properties after the tracked change (editor model convenience)
infoPropertyChangeInfoTracked change metadata
previousFormatting?TextFormattingRun properties before the tracked change
type'runPropertyChange'

SDT properties (w:sdtPr)

interface SdtProperties
MemberTypeSummary
alias?stringAlias (friendly name)
checked?booleanCheckbox checked state
dateFormat?stringDate format for date controls
listItems?{ displayText: string; value: string; }[]Dropdown/combobox list items
lock?'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked'Lock content editing
placeholder?stringPlaceholder text
sdtTypeSdtTypeSDT type
showingPlaceholder?booleanWhether showing placeholder
tag?stringTag (developer identifier)

One section of the document — a `SectionProperties` plus the block content (`Paragraph`s and `Table`s) that lives under those properties.

Sections are derived during parse: every paragraph carrying an inline `sectPr` ends a section, and the body's final `sectPr` defines the last section. Each section may carry its own headers/footers map.

interface Section
MemberTypeSummary
contentBlockContent[]Content in this section
footers?Map<HeaderFooterType, HeaderFooter>Footers for this section
headers?Map<HeaderFooterType, HeaderFooter>Headers for this section
propertiesSectionPropertiesSection properties

Section properties (`w:sectPr`) — page geometry, margins, columns, header/footer references, and page numbering for one section of the document. Sections are introduced by inline `sectPr` markers on the terminating paragraph (`Paragraph.sectionProperties`) and the body's final `sectPr`.

All distance units are twips (1/20 of a point) on the wire. The layout engine converts to pixels.

See ECMA-376 §17.6.

interface SectionProperties
MemberTypeSummary
background?{ color?: ColorValue; themeColor?: ThemeColorSlot; themeTint?: string; themeShade?: string; }Page background
bidi?booleanRight-to-left section
columnCount?numberNumber of columns
columns?Column[]Individual column definitions
columnSpace?numberSpace between columns in twips
docGrid?{ type?: 'default' | 'lines' | 'linesAndChars' | 'snapToChars'; linePitch?: number; charSpace?: number; }Document grid
endnotePr?EndnotePropertiesEndnote properties for this section
equalWidth?booleanEqual width columns
evenAndOddHeaders?booleanDifferent odd/even page headers/footers
footerDistance?numberFooter distance from bottom in twips
footerReferences?FooterReference[]Footer references
footnotePr?FootnotePropertiesFootnote properties for this section
gutter?numberGutter margin in twips
headerDistance?numberHeader distance from top in twips
headerReferences?HeaderReference[]Header references
lineNumbers?{ start?: number; countBy?: number; distance?: number; restart?: LineNumberRestart; }Line numbering settings
marginBottom?numberBottom margin in twips
marginLeft?numberLeft margin in twips
marginRight?numberRight margin in twips
marginTop?numberTop margin in twips
orientation?PageOrientationPage orientation
pageBorders?{ top?: BorderSpec; bottom?: BorderSpec; left?: BorderSpec; right?: BorderSpec; display?: 'allPages' | 'firstPage' | 'notFirstPage'; offsetFrom?: 'page' | 'text'; zOrder?: 'front' | 'back'; }Page borders
pageHeight?numberPage height in twips
pageWidth?numberPage width in twips
paperSrcFirst?numberFirst page paper source
paperSrcOther?numberOther pages paper source
sectionStart?SectionStartSection start type
separator?booleanSeparator line between columns
titlePg?booleanDifferent first page header/footer
verticalAlign?VerticalAlignVertical alignment of text

Cell/paragraph/run shading — Word's combined "fill + pattern overlay" model. `fill` is the solid background; `color` is the pattern overlay drawn on top; `pattern` selects the pattern type (defaults to `'clear'` = solid `fill`, no pattern).

See ECMA-376 §17.4.32 (`CT_Shd`).

interface ShadingProperties
MemberTypeSummary
color?ColorValuePattern fill color
fill?ColorValueBackground fill color
pattern?'clear' | 'solid' | 'horzStripe' | 'vertStripe' | 'reverseDiagStripe' | 'diagStripe' | 'horzCross' | 'diagCross' | 'thinHorzStripe' | 'thinVertStripe' | 'thinReverseDiagStripe' | 'thinDiagStripe' | 'thinHorzCross' | 'thinDiagCross' | 'pct5' | 'pct10' | 'pct12' | 'pct15' | 'pct20' | 'pct25' | 'pct30' | 'pct35' | 'pct37' | 'pct40' | 'pct45' | 'pct50' | 'pct55' | 'pct60' | 'pct62' | 'pct65' | 'pct70' | 'pct75' | 'pct80' | 'pct85' | 'pct87' | 'pct90' | 'pct95' | 'nil'Shading pattern type

Shape/drawing object (wps:wsp)

interface Shape
MemberTypeSummary
customGeometry?stringCustom geometry points
fill?ShapeFillFill
id?stringUnique ID
name?stringName
outline?ShapeOutlineOutline/stroke
position?ImagePositionPosition for floating shapes
shapeTypeShapeTypeShape type preset
sizeImageSizeSize in EMUs
textBody?ShapeTextBodyText content inside the shape
transform?ImageTransformTransform
type'shape'
wrap?ImageWrapWrap settings

Shape reference

interface ShapeContent
MemberTypeSummary
shapeShapeShape data
type'shape'

Shape fill type

interface ShapeFill
MemberTypeSummary
color?ColorValueSolid fill color
gradient?{ type: 'linear' | 'radial' | 'rectangular' | 'path'; angle?: number; stops: Array<{ position: number; color: ColorValue; }>; }Gradient stops for gradient fill
type'none' | 'solid' | 'gradient' | 'pattern' | 'picture'

Shape outline/stroke

interface ShapeOutline
MemberTypeSummary
cap?'flat' | 'round' | 'square'Line cap
color?ColorValueLine color
headEnd?{ type: 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow'; width?: 'sm' | 'med' | 'lg'; length?: 'sm' | 'med' | 'lg'; }Head arrow
join?'bevel' | 'miter' | 'round'Line join
style?'solid' | 'dot' | 'dash' | 'lgDash' | 'dashDot' | 'lgDashDot' | 'lgDashDotDot' | 'sysDot' | 'sysDash' | 'sysDashDot' | 'sysDashDotDot'Line style
tailEnd?{ type: 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow'; width?: 'sm' | 'med' | 'lg'; length?: 'sm' | 'med' | 'lg'; }Tail arrow
width?numberLine width in EMUs

Text body inside a shape

interface ShapeTextBody
MemberTypeSummary
anchor?'top' | 'middle' | 'bottom' | 'distributed' | 'justified'Anchor/vertical alignment
anchorCenter?booleanAnchor center
autoFit?'none' | 'normal' | 'shape'Auto fit
contentParagraph[]Paragraphs inside the shape
margins?{ top?: number; bottom?: number; left?: number; right?: number; }Text margins
rotation?numberRotation
vertical?booleanText direction

Simple field (w:fldSimple)

interface SimpleField
MemberTypeSummary
content(Run | Hyperlink)[]Current display value
dirty?booleanField is dirty
fieldTypeFieldTypeParsed field type
fldLock?booleanField is locked
instructionstringField instruction (e.g., "PAGE \* MERGEFORMAT")
type'simpleField'

Soft hyphen

interface SoftHyphenContent
MemberTypeSummary
type'softHyphen'

Style definition from `styles.xml` — a named, reusable bundle of paragraph and/or character formatting. Word's "Heading 1", "Normal", "Title", and "List Bullet" are styles; user-defined styles look the same. `basedOn` chains styles for inheritance; `link` pairs a paragraph style with a matching character style.

See ECMA-376 §17.7.4.

interface Style
MemberTypeSummary
basedOn?stringBased on style ID
default?booleanIs default style
hidden?booleanHidden from UI
name?stringDisplay name
next?stringNext style after Enter (for paragraph styles)
personal?booleanPersonal style (custom)
pPr?ParagraphFormattingParagraph properties (for paragraph/table styles)
qFormat?booleanQuick format in gallery
rPr?TextFormattingRun properties
semiHidden?booleanSemi-hidden from UI
styleIdstringStyle ID
tblPr?TableFormattingTable properties (for table styles)
tblStylePr?Array<{ type: 'band1Horz' | 'band1Vert' | 'band2Horz' | 'band2Vert' | 'firstCol' | 'firstRow' | 'lastCol' | 'lastRow' | 'neCell' | 'nwCell' | 'seCell' | 'swCell'; pPr?: ParagraphFormatting; rPr?: TextFormatting; tblPr?: TableFormatting; trPr?: TableRowFormatting; tcPr?: TableCellFormatting; }>Conditional table style parts
tcPr?TableCellFormattingTable cell properties
trPr?TableRowFormattingTable row properties
typeStyleTypeStyle type
uiPriority?numberUI sort priority
unhideWhenUsed?booleanUnhide when used

Style definitions from styles.xml

interface StyleDefinitions
MemberTypeSummary
docDefaults?DocDefaultsDocument defaults
latentStyles?{ defLockedState?: boolean; defUIPriority?: number; defSemiHidden?: boolean; defUnhideWhenUsed?: boolean; defQFormat?: boolean; count?: number; }Latent styles
stylesStyle[]Style definitions

Symbol character (special font character)

interface SymbolContent
MemberTypeSummary
charstringCharacter code
fontstringFont name
type'symbol'

Tab character

interface TabContent
MemberTypeSummary
type'tab'

Table (`w:tbl`) — a block-level grid of rows × cells. Tables carry their own formatting layer (borders, shading, alignment, indent, floating placement) and an explicit column-width grid in twips. Tables can nest arbitrarily through `TableCell.content`.

See ECMA-376 §17.4.

interface Table
MemberTypeSummary
columnWidths?number[]Column widths in twips
formatting?TableFormattingTable formatting
propertyChanges?TablePropertyChange[]Table-level tracked property changes (w:tblPrChange)
rowsTableRow[]Table rows
type'table'

Table borders

interface TableBorders
MemberTypeSummary
bottom?BorderSpec
insideH?BorderSpec
insideV?BorderSpec
left?BorderSpec
right?BorderSpec
top?BorderSpec

Table cell (`w:tc`). Holds nested block content (paragraphs and nested tables), cell-level formatting (borders, shading, vertical merge), tracked property changes, and tracked structural changes for cell insert/delete/merge operations.

interface TableCell
MemberTypeSummary
content(Paragraph | Table)[]Cell content (paragraphs, tables, etc.)
formatting?TableCellFormattingCell formatting
propertyChanges?TableCellPropertyChange[]Cell-level tracked property changes (w:tcPrChange)
structuralChange?TableStructuralChangeInfoTracked structural changes (cell insert/delete/merge)
type'tableCell'

Table cell formatting properties (w:tcPr)

interface TableCellFormatting
MemberTypeSummary
borders?TableBordersCell borders
conditionalFormat?ConditionalFormatStyleConditional format style
fitText?booleanFit text to cell width
gridSpan?numberGrid span (horizontal merge)
hideMark?booleanHide cell marker
margins?CellMarginsCell margins (override table default)
noWrap?booleanWrap text
shading?ShadingPropertiesCell shading/background
textDirection?'lr' | 'lrV' | 'rl' | 'rlV' | 'tb' | 'tbV' | 'tbRl' | 'tbRlV' | 'btLr'Text direction
verticalAlign?'top' | 'center' | 'bottom'Vertical alignment
vMerge?'restart' | 'continue'Vertical merge
width?TableMeasurementCell width

Table cell property change (w:tcPrChange)

interface TableCellPropertyChange
MemberTypeSummary
currentFormatting?TableCellFormattingCell properties after the tracked change (editor model convenience)
infoPropertyChangeInfoTracked change metadata
previousFormatting?TableCellFormattingCell properties before the tracked change
type'tableCellPropertyChange'

Table formatting properties (w:tblPr)

interface TableFormatting
MemberTypeSummary
bidi?booleanRight to left table
borders?TableBordersTable borders
cellMargins?CellMarginsDefault cell margins
cellSpacing?TableMeasurementCell spacing
floating?FloatingTablePropertiesFloating table properties
indent?TableMeasurementTable indent from left margin
justification?'left' | 'center' | 'right'Table justification
layout?'fixed' | 'autofit'Table layout
look?TableLookTable look (conditional formatting flags)
overlap?'never' | 'overlap'Overlap for floating tables
shading?ShadingPropertiesShading/background
styleId?stringTable style ID
width?TableMeasurementTable width

Table look flags (for table styles)

interface TableLook
MemberTypeSummary
firstColumn?boolean
firstRow?boolean
lastColumn?boolean
lastRow?boolean
noHBand?boolean
noVBand?boolean

Table measurement (width or height)

interface TableMeasurement
MemberTypeSummary
typeTableWidthTypeMeasurement type
valuenumberValue in twips (for dxa) or fifths of a percent (for pct)

Table property change (w:tblPrChange)

interface TablePropertyChange
MemberTypeSummary
currentFormatting?TableFormattingTable properties after the tracked change (editor model convenience)
infoPropertyChangeInfoTracked change metadata
previousFormatting?TableFormattingTable properties before the tracked change
type'tablePropertyChange'

Table row (`w:tr`) — an ordered list of `TableCell` plus row-level formatting (height, repeated header, cantSplit) and tracked changes for inserts/deletes.

interface TableRow
MemberTypeSummary
cellsTableCell[]Cells in this row
formatting?TableRowFormattingRow formatting
propertyChanges?TableRowPropertyChange[]Row-level tracked property changes (w:trPrChange)
structuralChange?TableStructuralChangeInfoTracked structural changes (row insert/delete)
type'tableRow'

Table row formatting properties (w:trPr)

interface TableRowFormatting
MemberTypeSummary
cantSplit?booleanAllow row to break across pages
conditionalFormat?ConditionalFormatStyleConditional format style
header?booleanHeader row (repeats on each page)
height?TableMeasurementRow height
heightRule?'auto' | 'atLeast' | 'exact'Height rule
hidden?booleanHidden row
justification?'left' | 'center' | 'right'Row justification

Table row property change (w:trPrChange)

interface TableRowPropertyChange
MemberTypeSummary
currentFormatting?TableRowFormattingRow properties after the tracked change (editor model convenience)
infoPropertyChangeInfoTracked change metadata
previousFormatting?TableRowFormattingRow properties before the tracked change
type'tableRowPropertyChange'

Table structural tracked change metadata (row/cell insert/delete/merge)

interface TableStructuralChangeInfo
MemberTypeSummary
infoTrackedChangeInfoTracked change metadata
type'tableRowInsertion' | 'tableRowDeletion' | 'tableCellInsertion' | 'tableCellDeletion' | 'tableCellMerge'

Tab stop definition

interface TabStop
MemberTypeSummary
alignmentTabStopAlignmentAlignment at tab stop
leader?TabLeaderLeader character
positionnumberPosition in twips from left margin

Text box (floating text container)

interface TextBox
MemberTypeSummary
contentParagraph[]Text content
fill?ShapeFillFill
id?stringUnique ID
margins?{ top?: number; bottom?: number; left?: number; right?: number; }Internal margins
outline?ShapeOutlineOutline
position?ImagePositionPosition
sizeImageSizeSize
type'textBox'
wrap?ImageWrapWrap settings

Plain text run content (`w:t`). `preserveSpace` mirrors the `xml:space="preserve"` attribute and matters for runs that begin or end with whitespace — without it, Word collapses leading/trailing spaces.

interface TextContent
MemberTypeSummary
preserveSpace?booleanPreserve whitespace (xml:space="preserve")
textstringThe text string
type'text'

Character-level formatting (`w:rPr`) — the full set of run properties Word supports: weight, slant, font, size, color, highlight, underline, strikethrough, vertical position, language, complex-script variants, spacing/kerning, emphasis marks, and more.

Most fields mirror their ECMA-376 element names (see §17.3.2). Missing keys inherit from the run's paragraph style → linked style → document defaults chain.

interface TextFormatting
MemberTypeSummary
allCaps?booleanAll caps (w:caps)
bold?booleanBold (w:b)
boldCs?booleanBold complex script (w:bCs)
color?ColorValueText color (w:color)
cs?booleanComplex script formatting (w:cs)
doubleStrike?booleanDouble strikethrough (w:dstrike)
effect?TextEffectText effect animation (w:effect)
emboss?booleanEmboss effect (w:emboss)
emphasisMark?EmphasisMarkEmphasis mark (w:em)
fontFamily?{ ascii?: string; hAnsi?: string; eastAsia?: string; cs?: string; asciiTheme?: 'majorAscii' | 'majorHAnsi' | 'majorEastAsia' | 'majorBidi' | 'minorAscii' | 'minorHAnsi' | 'minorEastAsia' | 'minorBidi'; hAnsiTheme?: string; eastAsiaTheme?: string; csTheme?: string; }Font family (w:rFonts)
fontSize?numberFont size in half-points (w:sz) - e.g., 24 = 12pt
fontSizeCs?numberFont size complex script (w:szCs)
hidden?booleanHidden text (w:vanish)
highlight?'black' | 'blue' | 'cyan' | 'darkBlue' | 'darkCyan' | 'darkGray' | 'darkGreen' | 'darkMagenta' | 'darkRed' | 'darkYellow' | 'green' | 'lightGray' | 'magenta' | 'none' | 'red' | 'white' | 'yellow'Highlight/background color (w:highlight)
imprint?booleanImprint/engrave effect (w:imprint)
italic?booleanItalic (w:i)
italicCs?booleanItalic complex script (w:iCs)
kerning?numberKerning threshold in half-points (w:kern)
outline?booleanOutline effect (w:outline)
position?numberRaised/lowered text position in half-points (w:position)
rtl?booleanRight-to-left text (w:rtl)
scale?numberHorizontal text scale percentage (w:w)
shading?ShadingPropertiesCharacter shading (w:shd)
shadow?booleanShadow effect (w:shadow)
smallCaps?booleanSmall caps (w:smallCaps)
spacing?numberCharacter spacing in twips (w:spacing)
strike?booleanStrikethrough (w:strike)
styleId?stringCharacter style ID (w:rStyle)
underline?{ style: UnderlineStyle; color?: ColorValue; }Underline style and color (w:u)
vertAlign?'baseline' | 'superscript' | 'subscript'Superscript/subscript (w:vertAlign)

Theme (from theme1.xml)

interface Theme
MemberTypeSummary
colorScheme?ThemeColorSchemeColor scheme
fontScheme?ThemeFontSchemeFont scheme
formatScheme?{ name?: string; }Format scheme (fills, lines, effects) - simplified
name?stringTheme name

Theme color scheme (a:clrScheme)

interface ThemeColorScheme
MemberTypeSummary
accent1?stringAccent colors 1-6
accent2?string
accent3?string
accent4?string
accent5?string
accent6?string
dk1?stringDark 1 color (usually black)
dk2?stringDark 2 color
lt1?stringLight 1 color (usually white)
lt2?stringLight 2 color

Theme font (with script variants)

interface ThemeFont
MemberTypeSummary
cs?stringComplex script font
ea?stringEast Asian font
fonts?Record<string, string>Script-specific fonts
latin?stringLatin font

Theme font scheme (a:fontScheme)

interface ThemeFontScheme
MemberTypeSummary
majorFont?ThemeFontMajor font (headings)
minorFont?ThemeFontMinor font (body text)

Tracked change metadata (w:ins, w:del attributes)

interface TrackedChangeInfo
MemberTypeSummary
authorstringAuthor who made the change
date?stringDate of the change
idnumberRevision ID

Type aliases(30)

Block-level content types

type BlockContent = Paragraph | Table | BlockSdt;

Emphasis mark type

type EmphasisMark = 'none' | 'dot' | 'comma' | 'circle' | 'underDot';

Endnote position

type EndnotePosition = 'sectEnd' | 'docEnd';
type Field = SimpleField | ComplexField;

Known field types

type FieldType = 'PAGE' | 'NUMPAGES' | 'NUMWORDS' | 'NUMCHARS' | 'DATE' | 'TIME' | 'CREATEDATE' | 'SAVEDATE' | 'PRINTDATE' | 'AUTHOR' | 'TITLE' | 'SUBJECT' | 'KEYWORDS' | 'COMMENTS' | 'FILENAME' | 'FILESIZE' | 'TEMPLATE' | 'DOCPROPERTY' | 'DOCVARIABLE' | 'REF' | 'PAGEREF' | 'NOTEREF' | 'HYPERLINK' | 'TOC' | 'TOA' | 'INDEX' | 'SEQ' | 'STYLEREF' | 'AUTONUM' | 'AUTONUMLGL' | 'AUTONUMOUT' | 'IF' | 'MERGEFIELD' | 'NEXT' | 'NEXTIF' | 'ASK' | 'SET' | 'QUOTE' | 'INCLUDETEXT' | 'INCLUDEPICTURE' | 'SYMBOL' | 'ADVANCE' | 'EDITTIME' | 'REVNUM' | 'SECTION' | 'SECTIONPAGES' | 'USERADDRESS' | 'USERNAME' | 'USERINITIALS' | 'UNKNOWN';

Footnote position

type FootnotePosition = 'pageBottom' | 'beneathText' | 'sectEnd' | 'docEnd';

Header/footer type

type HeaderFooterType = 'default' | 'first' | 'even';

Multi-level suffix (what follows the number)

type LevelSuffix = 'tab' | 'space' | 'nothing';

Line number restart type

type LineNumberRestart = 'continuous' | 'newPage' | 'newSection';

Line spacing rule

type LineSpacingRule = 'auto' | 'exact' | 'atLeast';

Number restart type

type NoteNumberRestart = 'continuous' | 'eachSect' | 'eachPage';

Number format type

type NumberFormat = 'decimal' | 'upperRoman' | 'lowerRoman' | 'upperLetter' | 'lowerLetter' | 'ordinal' | 'cardinalText' | 'ordinalText' | 'hex' | 'chicago' | 'ideographDigital' | 'japaneseCounting' | 'aiueo' | 'iroha' | 'decimalFullWidth' | 'decimalHalfWidth' | 'japaneseLegal' | 'japaneseDigitalTenThousand' | 'decimalEnclosedCircle' | 'decimalFullWidth2' | 'aiueoFullWidth' | 'irohaFullWidth' | 'decimalZero' | 'bullet' | 'ganada' | 'chosung' | 'decimalEnclosedFullstop' | 'decimalEnclosedParen' | 'decimalEnclosedCircleChinese' | 'ideographEnclosedCircle' | 'ideographTraditional' | 'ideographZodiac' | 'ideographZodiacTraditional' | 'taiwaneseCounting' | 'ideographLegalTraditional' | 'taiwaneseCountingThousand' | 'taiwaneseDigital' | 'chineseCounting' | 'chineseLegalSimplified' | 'chineseCountingThousand' | 'koreanDigital' | 'koreanCounting' | 'koreanLegal' | 'koreanDigital2' | 'vietnameseCounting' | 'russianLower' | 'russianUpper' | 'none' | 'numberInDash' | 'hebrew1' | 'hebrew2' | 'arabicAlpha' | 'arabicAbjad' | 'hindiVowels' | 'hindiConsonants' | 'hindiNumbers' | 'hindiCounting' | 'thaiLetters' | 'thaiNumbers' | 'thaiCounting';

Page orientation

type PageOrientation = 'portrait' | 'landscape';

Paragraph alignment/justification

type ParagraphAlignment = 'left' | 'center' | 'right' | 'both' | 'distribute' | 'mediumKashida' | 'highKashida' | 'lowKashida' | 'thaiDistribute';

Inline content that can appear inside a paragraph. Covers runs (text), hyperlinks, bookmarks, fields, structured document tags, comment range markers, tracked-change wrappers, and math equations. Every node in this union carries a `type` discriminator so consumers can narrow at runtime.

type ParagraphContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | SimpleField | ComplexField | InlineSdt | CommentRangeStart | CommentRangeEnd | Insertion | Deletion | MoveFrom | MoveTo | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | MathEquation;

Relationship map (keyed by rId)

type RelationshipMap = Map<string, Relationship>;

Relationship type

type RelationshipType = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/header' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart' | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData' | string;

All possible run content types

type RunContent = TextContent | TabContent | BreakContent | SymbolContent | NoteReferenceContent | FieldCharContent | InstrTextContent | SoftHyphenContent | NoBreakHyphenContent | DrawingContent | ShapeContent;

SDT type (content control type)

type SdtType = 'richText' | 'plainText' | 'date' | 'dropdown' | 'comboBox' | 'checkbox' | 'picture' | 'buildingBlockGallery' | 'group' | 'unknown';

Section start type

type SectionStart = 'continuous' | 'nextPage' | 'oddPage' | 'evenPage' | 'nextColumn';

Shape types

type ShapeType = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'rtTriangle' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'decagon' | 'dodecagon' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'line' | 'straightConnector1' | 'bentConnector2' | 'bentConnector3' | 'bentConnector4' | 'bentConnector5' | 'curvedConnector2' | 'curvedConnector3' | 'curvedConnector4' | 'curvedConnector5' | 'rightArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'leftRightArrow' | 'upDownArrow' | 'quadArrow' | 'leftRightUpArrow' | 'bentArrow' | 'uturnArrow' | 'leftUpArrow' | 'bentUpArrow' | 'curvedRightArrow' | 'curvedLeftArrow' | 'curvedUpArrow' | 'curvedDownArrow' | 'stripedRightArrow' | 'notchedRightArrow' | 'homePlate' | 'chevron' | 'rightArrowCallout' | 'downArrowCallout' | 'leftArrowCallout' | 'upArrowCallout' | 'leftRightArrowCallout' | 'quadArrowCallout' | 'circularArrow' | 'flowChartProcess' | 'flowChartAlternateProcess' | 'flowChartDecision' | 'flowChartInputOutput' | 'flowChartPredefinedProcess' | 'flowChartInternalStorage' | 'flowChartDocument' | 'flowChartMultidocument' | 'flowChartTerminator' | 'flowChartPreparation' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartConnector' | 'flowChartOffpageConnector' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSummingJunction' | 'flowChartOr' | 'flowChartCollate' | 'flowChartSort' | 'flowChartExtract' | 'flowChartMerge' | 'flowChartOnlineStorage' | 'flowChartDelay' | 'flowChartMagneticTape' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartDisplay' | 'wedgeRectCallout' | 'wedgeRoundRectCallout' | 'wedgeEllipseCallout' | 'cloudCallout' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'callout1' | 'callout2' | 'callout3' | 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'actionButtonBlank' | 'actionButtonHome' | 'actionButtonHelp' | 'actionButtonInformation' | 'actionButtonBackPrevious' | 'actionButtonForwardNext' | 'actionButtonBeginning' | 'actionButtonEnd' | 'actionButtonReturn' | 'actionButtonDocument' | 'actionButtonSound' | 'actionButtonMovie' | 'irregularSeal1' | 'irregularSeal2' | 'frame' | 'halfFrame' | 'corner' | 'diagStripe' | 'chord' | 'arc' | 'bracketPair' | 'bracePair' | 'leftBracket' | 'rightBracket' | 'leftBrace' | 'rightBrace' | 'can' | 'cube' | 'bevel' | 'donut' | 'noSmoking' | 'blockArc' | 'foldedCorner' | 'smileyFace' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'cloud' | 'snip1Rect' | 'snip2SameRect' | 'snip2DiagRect' | 'snipRoundRect' | 'round1Rect' | 'round2SameRect' | 'round2DiagRect' | 'plaque' | 'teardrop' | 'mathPlus' | 'mathMinus' | 'mathMultiply' | 'mathDivide' | 'mathEqual' | 'mathNotEqual' | 'gear6' | 'gear9' | 'funnel' | 'pieWedge' | 'pie' | 'leftCircularArrow' | 'leftRightCircularArrow' | 'swooshArrow' | 'textBox';

Style type

type StyleType = 'paragraph' | 'character' | 'numbering' | 'table';

Tab leader character

type TabLeader = 'none' | 'dot' | 'hyphen' | 'underscore' | 'heavy' | 'middleDot';

Table width type

type TableWidthType = 'auto' | 'dxa' | 'nil' | 'pct';

Tab stop alignment

type TabStopAlignment = 'left' | 'center' | 'right' | 'decimal' | 'bar' | 'clear' | 'num';

Text effect animations

type TextEffect = 'none' | 'blinkBackground' | 'lights' | 'antsBlack' | 'antsRed' | 'shimmer' | 'sparkle';

Theme color slots from theme1.xml

type ThemeColorSlot = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'background1' | 'text1' | 'background2' | 'text2';

Run-level tracked wrappers represented in WordprocessingML.

type TrackedRunChange = Insertion | Deletion | MoveFrom | MoveTo;

Underline style options

type UnderlineStyle = 'none' | 'single' | 'words' | 'double' | 'thick' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashedHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dashDotHeavy' | 'dotDotDash' | 'dashDotDotHeavy' | 'wave' | 'wavyHeavy' | 'wavyDouble';

Vertical alignment

type VerticalAlign = 'top' | 'center' | 'both' | 'bottom';