Skip to Content

@stesura/core/types

Shared TypeScript types: node and doc attrs, stores, comments, proofreading and user preferences. Everything here is type-only except followNumberingWith. Runtime lists for some of the unions live in @stesura/core/constants: UnderlineType and UNDERLINE_TYPES for Underlines, BORDER_STYLES for BorderStyle, CAPS_VALUES for Caps and CASE_CHANGES for CaseChange.

Types

AccessibilityFinding

NameTypeDefault
ruleAccessibilityRule
posnumber

Position of the offending node — the panel selects it on click.

endnumber

End of the offending content: the node’s end for a block or atom, the run’s end for a link. Carried because a link run can span several text nodes and only the checker knows where it stops.

typeNamestring

Node type at pos when the finding was made. Findings are snapshots, so check pos still holds this type before acting on one later.

excerptstring

Short context for the panel row (link text, heading text, …).

ActiveHandle

NameTypeDefault
posnumber
typeResizeType
colnumber
tablePosnumber
isOuterEdgeboolean
isLeftOuterEdgeboolean
adjacentColnumber
side"left" | "right"
tableAlignTableAlign

AppendTransactionProps

NameTypeDefault
transactionsreadonly Transaction[]
oldStateEditorState
newStateEditorState

BlockBorders

NameTypeDefault
topMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
bottomMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
leftMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
betweenMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>

BlockStyleAttrs

NameTypeDefault
styleIdstring | null

BlockStylingAttrs

NameTypeDefault
bgColorstring | null | undefined
bordersBorders | null | undefined
_bordersBorders | null | undefined

BorderOptions

NameTypeDefault
colorstring
sizenumber
spacenumber
styleBorderStyle

Borders

NameTypeDefault
topMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
bottomMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
leftMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
betweenMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
insideHorizontalMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
insideVerticalMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>

CellAttrs

NameTypeDefault
colspannumber
rowspannumber
colwidthnumber[] | null
verticalAlignAlignmentDirection
isHeaderboolean

Serialize this cell as th scope="col". DERIVED from the table’s hasHeaderRow by tableHeaderCellsPlugin — never set it directly; the plugin will overwrite it on the next transaction (A11Y-21).

bgColorstring | null
bordersCellBorders | null

CellBorders

NameTypeDefault
topMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }> | null
bottomMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }> | null
leftMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }> | null

CodeBlockAttrs

NameTypeDefault
codeLanguagestring | null

Syntax-highlighting language. Named apart from the proofingLanguage global attribute because runtime behaviour is gated on attr presence.

theme"dark" | "light"
showLineNumbersboolean

CommentAuthor

NameTypeDefault
idstring
namestring
avatarstring

CommentCloseAttrs

NameTypeDefault
threadIdstring | null
anchorIdstring | null
originEditorIdstring | null

Editor id stamped on clipboard copies (transformCopied) so paste can strip anchors from another document. Always null in the doc — paste clears it.

CommentOpenAttrs

NameTypeDefault
threadIdstring | null
anchorIdstring | null
originEditorIdstring | null

Editor id stamped on clipboard copies (transformCopied) so paste can strip anchors from another document. Always null in the doc — paste clears it.

CommentReaction

NameTypeDefault
emojistring
createdAtDate
users{ id: string; }[]

CommentsDocx

NameTypeDefault
threadIdstring | number
childrenNode[]
authorstring
dateDate
isReplyboolean

True for every comment after the first in its thread — drives commentsExtended.xml reply linking.

resolvedboolean

Thread resolved state — becomes w15:done in commentsExtended.xml.

ConfigPluginConfig

NameTypeDefault
resolveUsersResolveUsersCallback

Resolves user ids to names and avatars (comment authors, mentions).

currentUserCurrentUser
onToastToastCallback

Shows a toast. Must render into an ARIA live region (role="status", or role="alert" for errors): some actions, like a refused nested table or a rejected upload, report their outcome ONLY here. When omitted, the mount warns once and messages go to console.warn.

Render toast.description, or switch on toast.key for your own copy.

allowedFileHostsstring[]

Hosts (host[:port]) whose PDFs the file node may PREVIEW with @stesura/pdf-viewer-react. Undefined means no previews at all — every PDF is a card (SEC-70) — because the viewer’s browser fetches the file, so the integrator must name hosts trusted to serve only PDFs.

Non-http(s) schemes, loopback, private/link-local ranges and .local/.internal hosts are always refused, so a hostile document cannot make the viewer’s browser fetch their intranet.

Pagination and the PDF export use the same decision, so a print mount MUST get the same list as the editor.

printMountboolean

Marks the PDF export’s print mount. Read via isPrintMount , so screen-only chrome (handles, floating menus, table outlines) can skip rendering instead of being hidden by CSS.

Config-time, not a store: a flag flipping mid-export would paginate one way and capture another.

ConfigPluginState

NameTypeDefault
editorIdstring
configConfigPluginConfig
toastText(message: ToastMessage) => string

See ConfigPluginProps["toastText"].

parentEditorIdstring

The owning editor; set only on sub-editors (footnote, header…). Store lookups fall through to it.

CounterNodeAttrs

NameTypeDefault
_textstring | null
_pathstring | null
_fullTextstring | null
prevTextstring | null

Previous counter text, captured when it shifts while track-changes is on. Visual cue only. Cleared once the text matches it again, or once no earlier paragraph in the instance has pending track changes.

CounterStackItem

NameTypeDefault
levelnumber
indexnumber
parentTypestring

CreateNodeFromContentOptions

NameTypeDefault
sliceboolean
parseOptionsParseOptions
errorOnInvalidContentboolean

CreateProofreadCache

Parameters:
NameTypeDefault
fieldstring
Returns:
ProofreadCacheAdapter

CreateProofreadDictionary

Parameters:
This function does not accept any parameters.
Returns:
ProofreadDictionaryAdapter

CrossReferenceAttrs

NameTypeDefault
targetIdstring | null
textstring
refToCrossRefType
missingReferenceboolean
separatorstring | null

CurrentUser

NameTypeDefault
idstring
namestring
avatarstring
colorstring

DisplayUnits

NameTypeDefault
baseUnit"cm" | "inches"
indentationUnitDisplayUnit
spacingUnitDisplayUnit

DocAttrs

NameTypeDefault
docBgColorstring

Canvas color behind the pages. Named apart from blockStyling’s bgColor attr.

listConfigsRecord<string, ILevelsOptions[]>
styleSheetStyleSheet
endnotesOptionsEndnoteOptions
languagestring

Default proofing language (BCP 47): the bottom of paragraph.proofingLanguage ?? style.language ?? doc.language, and the only level that always answers.

dirTextDirection

Default text direction: the bottom of paragraph.dir ?? section.dir ?? doc.dir, so a host can mount RTL-by-default without stamping every node.

Dragging

NameTypeDefault
startXnumber
startYnumber
startWidthnumber
startHeightnumber
typeResizeType
adjacentStartWidthnumber
startTimenumber

EditorStoreDefaults

NameTypeDefault
showPaginationboolean
modeEditorMode

EditorStores

NameTypeDefault
modeWritableAtom<EditorMode>
tocWritableAtom<TOCstate | undefined>
tocActiveIdWritableAtom<string | null>

Anchor id of the TOC item the viewport has scrolled to (highlight state). Kept out of toc so scroll tracking never churns the items array.

tocBreaksWritableAtom<Map<string, TOCbreakEntry[]> | undefined>

TOC nodeId → page breaks cutting through it. Written by the pagination engine after each recompute; the TOC nodeview renders row spacers from it.

nodePageNumbersWritableAtom<Map<string, string> | undefined>

Block nodeId → DISPLAYED page label (“iv”, “12”), honouring each section’s pageNumbering, so it matches the footers. Written by pagination after each recompute; undefined until then, or when it’s off. Read by the TOC.

pageCountsWritableAtom<Map<string, number> | undefined>

sectionId → page count, iterated in DOCUMENT order, so a prefix sum is a section’s page offset and the full sum the document total (totalPages, the stats dialog). Written by pagination after each recompute; undefined until then, or when it’s off.

pageNumberingWritableAtom<Map<string, PageNumberingAttrs> | undefined>

sectionId → pageNumbering, for sections that set one. Published by pagination next to pageCounts, so headers/footers resolve page numbers without subscribing to the document.

firstLayoutReadyWritableAtom<boolean | null>

Whether the first pagination pass has produced a layout. null: nobody claims it (unpaginated, or pagination not loaded) and the canvas renders immediately. false: first pass outstanding — the canvas holds, so the unpaginated draft never flashes. true: every section has a layout, or the hold timed out.

resolvedStyleSheetWritableAtom<StyleSheet | undefined>
styleSheetOverridesWritableAtom<StyleSheet | undefined>

The RAW doc.attrs.styleSheet, published by the stylesheet plugin. Sub-editor docs store no style definitions, so they read them here via the registry’s parent fall-through — same as listConfigs .

listConfigsWritableAtom<Record<string, ILevelsOptions[]> | undefined>

List configs (defaults + doc.attrs.listConfigs), published by the numbering plugin. Definitions are doc-global while counters are per story, so sub-editors read them here via the registry’s parent fall-through.

rootDocWritableAtom<Node | undefined>

The root editor’s current doc, published by the numbering plugin’s view. Lets sub-editors answer cross-region questions, e.g. counting a listRef’s instances before deciding whether a config edit must fork (CORE-31).

blockHandleWritableAtom<BlockHandleState>

EffectiveNumbering

NameTypeDefault
listRefstring
levelnumber
instanceIdstring | undefined
followBy"tab" | "space" | "nothing"

Undefined when neither the attr nor the style names one — the level config’s suffix is the next fallback, then “tab”. Resolved by the numbering plugin, which is where the level configs are in hand.

tabStopnumber | null
fromStyleboolean

True when the list came from the paragraph’s style rather than its attrs.

EndnoteAttrs

NameTypeDefault
endnoteRefstring | null
indexnumber
isFirstOccurrenceboolean

EndnoteBodyAttrs

NameTypeDefault
endnoteRefstring | null
indexnumber

EndnoteItem

NameTypeDefault
indexnumber
occurrencesnumber
sectionIdstring | null
isFirstOccurrenceboolean
endnoteRefstring

EndnoteOptions

NameTypeDefault
showAt"endOfDocument" | "endOfSection"
formatLevelFormatName
continuousboolean
startAtnumber

FileAttrs

NameTypeDefault
srcstring | null

Absolute URL of the file.

heightnumber

Preview height in CSS px, UNPAGINATED only (the resize handle writes it). Under pagination the box is the section’s page height and this is ignored.

namestring | null

Original filename, as uploaded. Null on documents that predate it.

mimeTypestring | null

Content type sniffed at upload (never the browser’s file.type). Null on documents that predate it, which could only ever hold PDFs.

sizenumber | null

Byte size at upload, for the card.

rotationFileRotation

Whole-file rotation, degrees clockwise. ADDED to each page’s own rotation (effectiveRotation) by both preview and export.

displayPreviewboolean

Whether a PDF renders as a PREVIEW (its pages) or as a card. Default true: mounting the viewer package is the migration trigger, and what you see is what you export — a card prints as a card with its link.

FootnoteAttrs

NameTypeDefault
footnoteRefstring | null
indexnumber
isFirstOccurrenceboolean

FootnoteBodyAttrs

NameTypeDefault
footnoteRefstring | null
indexnumber

FootnoteItem

NameTypeDefault
indexnumber
occurrencesnumber
sectionIdstring | null
isFirstOccurrenceboolean
footnoteRefstring

FormatPainterPluginState

NameTypeDefault
enabledboolean
onceboolean
marksMark[]
attrsAttrs
nodeTypestring

FullEditorStores

NameTypeDefault
modeWritableAtom<EditorMode>
tocWritableAtom<TOCstate | undefined>
tocActiveIdWritableAtom<string | null>

Anchor id of the TOC item the viewport has scrolled to (highlight state). Kept out of toc so scroll tracking never churns the items array.

tocBreaksWritableAtom<Map<string, TOCbreakEntry[]> | undefined>

TOC nodeId → page breaks cutting through it. Written by the pagination engine after each recompute; the TOC nodeview renders row spacers from it.

nodePageNumbersWritableAtom<Map<string, string> | undefined>

Block nodeId → DISPLAYED page label (“iv”, “12”), honouring each section’s pageNumbering, so it matches the footers. Written by pagination after each recompute; undefined until then, or when it’s off. Read by the TOC.

pageCountsWritableAtom<Map<string, number> | undefined>

sectionId → page count, iterated in DOCUMENT order, so a prefix sum is a section’s page offset and the full sum the document total (totalPages, the stats dialog). Written by pagination after each recompute; undefined until then, or when it’s off.

pageNumberingWritableAtom<Map<string, PageNumberingAttrs> | undefined>

sectionId → pageNumbering, for sections that set one. Published by pagination next to pageCounts, so headers/footers resolve page numbers without subscribing to the document.

firstLayoutReadyWritableAtom<boolean | null>

Whether the first pagination pass has produced a layout. null: nobody claims it (unpaginated, or pagination not loaded) and the canvas renders immediately. false: first pass outstanding — the canvas holds, so the unpaginated draft never flashes. true: every section has a layout, or the hold timed out.

resolvedStyleSheetWritableAtom<StyleSheet | undefined>
styleSheetOverridesWritableAtom<StyleSheet | undefined>

The RAW doc.attrs.styleSheet, published by the stylesheet plugin. Sub-editor docs store no style definitions, so they read them here via the registry’s parent fall-through — same as listConfigs .

listConfigsWritableAtom<Record<string, ILevelsOptions[]> | undefined>

List configs (defaults + doc.attrs.listConfigs), published by the numbering plugin. Definitions are doc-global while counters are per story, so sub-editors read them here via the registry’s parent fall-through.

rootDocWritableAtom<Node | undefined>

The root editor’s current doc, published by the numbering plugin’s view. Lets sub-editors answer cross-region questions, e.g. counting a listRef’s instances before deciding whether a config edit must fork (CORE-31).

blockHandleWritableAtom<BlockHandleState>

GetTextStylesResult

NameTypeDefault
colorstring | number | boolean | null
fontSizestring | number | boolean | null
fontFamilystring | number | boolean | null
capsstring | number | boolean | null
bgColorstring | number | boolean | null
strongboolean
emboolean
underlineboolean
strikethroughboolean
superscriptboolean
subscriptboolean

GlobalAttribute

NameTypeDefault
attrsRecord<string, { default: any; }>

Attrs merged into the node spec’s own attrs.

toDOM(node: Node) => { [key: string]: any; style?: string; class?: string; }

Extra DOM attributes merged into the node’s own toDOM output. class values are combined, style strings concatenated, the rest spread.

getAttrs(dom: HTMLElement) => Attrs

Attr values recovered from the DOM, merged into every parseDOM rule of the node.

nodesstring[]

GlobalAttributeDefinition

NameTypeDefault
attrsRecord<string, { default: any; }>

Attrs merged into the node spec’s own attrs.

toDOM(node: Node) => { [key: string]: any; style?: string; class?: string; }

Extra DOM attributes merged into the node’s own toDOM output. class values are combined, style strings concatenated, the rest spread.

getAttrs(dom: HTMLElement) => Attrs

Attr values recovered from the DOM, merged into every parseDOM rule of the node.

HighlightAttrs

NameTypeDefault
colorstring

HighlightPluginState

NameTypeDefault
persistedColorstring | null

IBorderOptions

NameTypeDefault
styleOoxmlBorderStyle
colorstring
sizenumber
spacenumber

IBordersOptions

NameTypeDefault
topIBorderOptions
bottomIBorderOptions
leftIBorderOptions
betweenIBorderOptions

ILevelsOptions

NameTypeDefault
levelnumber
formatLevelFormatName
textstring
alignmentAlignmentTypeValue
startnumber
suffixLevelSuffixValue
isLegalNumberingStyleboolean
indentIndentAttrs

Per-level indentation in px — Word’s w:lvl/w:pPr/w:ind. The LOWEST tier of the indent cascade (see resolveNumberedIndent); a paragraph’s own indent always beats it.

Only start, by and special are meaningful; end is kept so a round trip cannot drop a value an imported file set.

tabStopnumber

Minimum counter-cell width in px, measured from where the number STARTS (Word measures from the margin; the DOCX layer translates). Only meaningful when followed by a tab. Local extension — strip before docx.js export.

genderNumberGender

Grammatical gender for the word-based formats (cardinalText, ordinalText, ordinal) — “Parte Prima” vs “Capitolo Primo”. Defaults to masculine; ignored by digit formats and single-gender languages.

Local extension with no w:lvl equivalent: stripped before docx.js export and lost on a DOCX round trip.

casing"capitalize" | "uppercase" | "lowercase" | "firstLetter"

Casing for the word-based formats — “FORTY-TWO” vs “forty-two”. Undefined is the converters’ native output (every word capitalised).

Local extension, like gender: stripped before docx.js export and lost on a DOCX round trip.

ImageAltState

NameTypeDefault
altstring | null
decorativeboolean

ImageAnchoredAttrs

NameTypeDefault
altstring | null
decorativeboolean
cropImageCrop | null
transformImageTransform | null
idstring | null

Unique id (assigned by the uniqueId plugin — inline nodes are opted in explicitly).

srcstring | null
widthnumber | null
heightnumber | null
aspectRationumber | null
wrapImageAnchoredWrap
sideImageAnchoredSide
offsetXnumber

Horizontal offset (px) from the anchor point — used by front/behind.

offsetYnumber

Vertical offset (px) from the anchor point — front/behind; top margin for floats.

ImageAttrs

NameTypeDefault
altstring | null
decorativeboolean
cropImageCrop | null
transformImageTransform | null
srcstring | null
widthnumber | null
heightnumber | null
aspectRationumber | null
maxWidthnumber | null
alignImageAlign
wrapImageWrap

ImageCrop

NameTypeDefault
topnumber
bottomnumber
leftnumber

ImageGeometryAttrs

NameTypeDefault
cropImageCrop | null
transformImageTransform | null

ImagePluginAction

NameTypeDefault
type"add" | "remove"
idunknown

ImagePluginState

NameTypeDefault
find(start?: number | undefined, end?: number | undefined, predicate?: ((spec: any) => boolean) | undefined) => Decoration[]

Find all decorations in this set which touch the given range (including decorations that start or end directly at the boundaries) and match the given predicate on their spec. When start and end are omitted, all decorations in the set are considered. When predicate isn’t given, all decorations are assumed to match.

findInnerany
map(mapping: Mapping, doc: Node, options?: { onRemove?: (decorationSpec: any) => void; } | undefined) => DecorationSet

Map the set of decorations in response to a change in the document.

add(doc: Node, decorations: Decoration[]) => DecorationSet

Add the given array of decorations to the ones in the set, producing a new set. Consumes the decorations array. Needs access to the current document to create the appropriate tree structure.

addInnerany
remove(decorations: Decoration[]) => DecorationSet

Create a new set that contains the decorations in this set, minus the ones in the given array.

removeInnerany
forChild(offset: number, node: Node) => DecorationSet | DecorationGroup

Extract a DecorationSource containing decorations for the given child node at the given offset.

forEachSet(f: (set: DecorationSet) => void) => void

Call the given function for each decoration set in the group.

ImageTransform

NameTypeDefault
rotationnumber
flipHboolean
flipVboolean

ImageUploadPolicy

NameTypeDefault
allowInlineImagesboolean

When false and no upload strategy is installed, dropped/pasted images are refused instead of being embedded as base64 data URIs — docs that sync or persist server-side must not carry inline blobs.

onInlineImageRejected() => void

Notified when an image is refused because inline fallbacks are disabled.

IndentAttrs

NameTypeDefault
startnumber | null
endnumber | null
specialIndentationSpecials | null
bynumber | null

InsertImagePlaceholder

NameTypeDefault
type"add"
posnumber
idunknown

InvisibleCharactersState

NameTypeDefault
showboolean
pilcrowsDecorationSet

One widget at the content end of every atom-final block, kept whether or not markers are shown: it is also the caret’s text anchor after an atom, without which Chrome sizes the caret by the line box (PIL-1c). The pilcrow glyph is gated in CSS.

JSONContent

NameTypeDefault
typestring
attrsRecord<string, any>
contentJSONContent[]
marks{ [key: string]: any; type: string; attrs?: Record<string, any>; }[]
textstring

LanguageExtractor

Parameters:
NameTypeDefault
nodeNode
Returns:
string | undefined

LanguagePluginState

NameTypeDefault
documentLangTagstring

BCP 47 tag put on the editor’s content root, from doc.attrs.language.

decorationsDecorationSet

lang node decorations for blocks that differ from their context.

LevelFormat

NameTypeDefault
formatLevelFormatName | undefined
textstring
tabStopnumber

Level-config tabStop in px (see ILevelsOptions.tabStop).

genderNumberGender

Level-config gender (see ILevelsOptions.gender).

casing"capitalize" | "uppercase" | "lowercase" | "firstLetter"

Level-config casing (see ILevelsOptions.casing).

LineNumbersAttrs

NameTypeDefault
countBynumber

Show only every Nth line’s number (Word’s “Count by”). Every line is still counted.

distancenumber

Gap in px between the gutter and the section’s text edge (OOXML stores twips).

restart"continuous" | "newPage" | "newSection"

Where the counter resets: never, on every page, or at the section’s first line.

startnumber

The first line’s number, 1-based (Word’s floor is 1).

LinkAttrs

NameTypeDefault
urlstring

ListConfig

NameTypeDefault
referencestring
levelsILevelsOptions[]

ListFormatOption

NameTypeDefault
labelstring
valueLevelFormatName | undefined
cssstring
transform(i: number) => string
pickableboolean

Whether the format appears in the level-format picker. Most entries exist only so IMPORTED files render faithfully (⑴, - 5 -, Devanagari digits).

Margins

NameTypeDefault
topnumber
bottomnumber
leftnumber

MarkRange

NameTypeDefault
markMark
fromnumber
tonumber

NodeCommentEntry

NameTypeDefault
threadIdstring

NodeFormatting

NameTypeDefault
indentIndentAttrs
spacingSpacingAttrs
lineHeightstring | number

Unitless multiplier (1.5 lines) or an exact “Xpt” height.

textAlignstring

NodeWithPos

NameTypeDefault
nodeNode
posnumber

NoteItemBase

NameTypeDefault
indexnumber
occurrencesnumber
sectionIdstring | null
isFirstOccurrenceboolean

NotesState

NameTypeDefault
footnotesFootnoteItem[]
endnotesEndnoteItem[]

NumberingAttrs

NameTypeDefault
listRefstring | null

The list this paragraph numbers against. INHERIT_LIST_REF means “take the list from the resolved style”; null is the off-sentinel (see NumberingAttrValue).

levelnumber

level / instanceId / followBy are USER data:

  • on a directly-numbered paragraph they are the canonical storage and the numbering plugin keeps them stamped;
  • on a style-numbered paragraph (INHERIT_LIST_REF) they are OVERRIDES and stay absent unless the user explicitly set one (level change at an unbound level, restart, context-menu followBy). The style cascade fills the gaps — stamping derived values here froze the binding (CORE-37).
instanceIdstring
followBy"tab" | "space" | "nothing"
isBulletboolean
tabStopnumber | null

Per-instance override of the level config’s tabStop (px, see ILevelsOptions.tabStop).

resolvedListRefstring | null

Caches the numbering plugin stamps on style-numbered paragraphs only: the values the cascade produced on the last walk. Read-only outside the plugin. DOM serialization and DOCX export use them as display fallbacks; the effective-numbering resolver ignores them, so a binding edit always re-derives.

resolvedLevelnumber
resolvedInstanceIdstring
resolvedFollowBy"tab" | "space" | "nothing"

NumberingOffSentinel

NameTypeDefault
listRefnull

NumberingPluginState

NameTypeDefault
numberingConfigsMap<string, ListConfig>
selectedConfigIdstring | null
selectedinstanceIdstring | null
applyNumberingboolean
currentLevelnumber

PageFormats

NameTypeDefault
widthnumber
heightnumber
labelstring
valuestring
defaultboolean

PageMargins

NameTypeDefault
topnumber
bottomnumber
leftnumber
labelstring
valuestring
defaultboolean

PageNumberAttrs

NameTypeDefault
pageTypePageNumberType

PageNumberingAttrs

NameTypeDefault
startnumber | null
formatPageNumberFormat

PaginationAttrs

NameTypeDefault
widowOrphanboolean | null
pageBreakBeforeboolean | null
keepWithNextboolean | null
keepLinesboolean | null

Word’s keepLines: the paragraph is never split across pages. Carried so the DOCX round trip keeps it; the engine does not honour it yet.

PaginationPluginState

NameTypeDefault
showPaginationboolean
oversizedDecorationsDecorationSet

Node decorations marking engine-detected oversized nodes with data-oversized-id. The actual clamp (max-height + overflow: hidden) comes from a store-driven stylesheet, NOT from decoration styles — see the pagination plugin’s oversizedClamps module.

oversizedSignaturestring

Signature of the clamp set the decorations were built from, compared by the poke helper to skip redundant dispatches.

ParagraphStyle

NameTypeDefault
bordersBlockBorders
backgroundColorstring | null

Block fill. null resets (cleared here, not inherited), as with numbering/outlineLevel; absent inherits.

numberingStyleNumbering | null

Style-linked numbering. Inherits through basedOn as a whole object (no field merge). null resets to unnumbered; absent inherits.

textAlignstring
indentIndentAttrs
spacingSpacingAttrs
lineHeightstring | number

Unitless multiplier (1.5 lines) or an exact “Xpt” height.

lineHeightRule"atLeast" | null

“atLeast”: the “Xpt” lineHeight is a minimum (see the paragraph attr).

tabStopsTabStop[] | null

Tab stops, as a whole list: a paragraph’s own tabStops replaces the style’s rather than adding to it. Inherits through basedOn; null resets to the default stops.

outlineLevelnumber | null

Heading level (1–9; Word’s w:outlineLvl is 0-based). A style with an outline level IS a heading. Inherits through basedOn; null resets to body text, absent inherits.

paginationPaginationAttrs | null

Pagination props (Word: keepNext / keepLines / widowControl / pageBreakBefore), in the node attr’s PaginationAttrs shape so both levels resolve the same way. One object because Word edits them together in its Paragraph dialog — the right granularity for OT and track changes.

Whole-object override through basedOn: absent inherits, null resets. Unset fields fall back to widowOrphan true and the rest false (see getStylePaginationProps). Not rendered as CSS.

Parser

Parameters:
NameTypeDefault
optionsParserOptions
Returns:
Decoration[] | Promise<void>

ParserOptions

NameTypeDefault
contentstring

Text content of the code block.

posnumber

Start position of the code block.

languagestring
sizenumber

The node’s nodeSize.

nodeNode

PdfPreviewAssets

NameTypeDefault
workerSrcstring

pdf.js worker script. The one asset without which nothing renders.

cMapUrlstring

Directory of the CMap files, for CJK documents. Trailing slash.

standardFontDataUrlstring

Directory of the standard 14 font files. Trailing slash.

wasmUrlstring

Directory of the JPX/OpenJPEG WASM modules. Trailing slash.

iccUrlstring

Directory of the ICC colour-profile WASM module. Trailing slash.

PdfPreviewConfig

NameTypeDefault
readyboolean
allowedFileHostsstring[]

The config plugin’s allowedFileHosts. Undefined → every PDF is a card.

PdfPreviewLimits

NameTypeDefault
maxPagesnumber

Pages rendered before the preview stops and says how many are left.

maxBytesnumber

Content-Length above which the file is a card with the reason.

PdfPreviewProps

NameTypeDefault
srcstring

Already normalized and policy-checked by the node view.

rotationFileRotation

The node’s whole-file rotation, ADDED to each page’s own.

namestring | null

Display name, for the preview region’s accessible name.

heightnumber

Box height in CSS px: the page height paginated, the height attr otherwise.

PendingLinkPluginState

NameTypeDefault
isPendingboolean
pendingSelectionSelection | null
existingUrlstring

Problem

NameTypeDefault
fromnumber
tonumber
msgstring
shortmsgstring
typestring
replacements{ value: string; }[]

Suggested corrections in LanguageTool’s object shape (PR-2). Capped at five.

ProofingLanguageAttrs

NameTypeDefault
proofingLanguagestring | null

ProofreadCacheAdapter

NameTypeDefault
get(id: string) => ProofreadCacheItem | undefined
set(id: string, value: ProofreadCacheItem) => void
delete(id: string) => void
entries() => Iterable<[string, ProofreadCacheItem]>
subscribe(cb: (changedIds?: readonly string[] | undefined) => void) => () => void
destroy() => void
readyPromise<void>

ProofreadCacheItem

NameTypeDefault
hashstring
languagestring | null
problemsProblem[]

Problem positions are relative to the node’s content (doc token accounting: atoms = 1, inline node boundaries = 1 each).

deletedAtnumber

Epoch ms when the node was seen deleted; the entry is kept briefly so an undo needs no new api call. A number, not a Date: entries round-trip through JSON, and a Date would come back as a string that never expires.

vnumber

Cache format version. Entries whose version doesn’t match the current format are treated as misses.

ProofreadDictionaryAdapter

NameTypeDefault
has(word: string, language?: string | null | undefined) => boolean

Whether word is in the dictionary for language (primary subtag) or globally.

add(word: string, language?: string | null | undefined) => void
remove(word: string, language?: string | null | undefined) => void
subscribe(cb: () => void) => () => void
destroy() => void

Range

NameTypeDefault
fromnumber
tonumber

RemoveImagePlaceholder

NameTypeDefault
type"remove"
idunknown

ResolvedIndentAttrs

NameTypeDefault
startnumber
endnumber
specialNonNullable<IndentationSpecials | null | undefined>
bynumber

ResolvedStyleDefinition

NameTypeDefault
namestring
type"paragraph" | "character"

Word’s w:style/@w:type; absent means “paragraph”. A "character" entry never applies to a block: it is absent from the style picker, not a valid styleId, carries no paragraphStyle, bases only on character styles, and renders against its MARK’s selector rather than .pm-style-<id>.

Only HTMLCode (code mark) and Hyperlink (link mark) are recognised; every other w:rStyle flattens onto its runs at import.

basedOnstring | null
semiHiddenboolean
unhideWhenUsedboolean
quickFormatboolean
uiPrioritynumber
nextstring
languagestring | null

Proofing language (BCP 47), the middle of paragraph.proofingLanguage ?? style.language ?? doc.language — Word’s w:style/w:rPr/w:lang. Top-level, not in characterStyle, so it never reaches textStyleToCss. Inherits through basedOn; null resets to the document language, absent inherits.

characterStyleTextStyle
paragraphStyleResolvedParagraphStyle

ResolvedUser

NameTypeDefault
namestring
avatarstring

ResolveMentionSuggestionsCallback

Parameters:
NameTypeDefault
params{ text: string; }
Returns:
Promise<string[]>

ResolveUsersCallback

Parameters:
NameTypeDefault
params{ userIds: string[]; }
Returns:
Promise<ResolvedUser[]>

RowAttrs

NameTypeDefault
heightnumber | null
heightRule"atLeast" | "exact" | null

Word’s w:trHeight/@w:hRule: exact pins the row, atLeast (or null) lets content grow it. Carried for the DOCX round trip — the editor renders both as a minimum.

isConditionalboolean
isValidboolean
errorMessagestring
codeTsstring

SectionAttrs

NameTypeDefault
orientation"portrait" | "landscape"
margin{ top: number; bottom: number; left: number; right: number; }
pageSizeSize
footerFromBottomnumber
headerFromTopnumber
lineNumbersLineNumbersAttrs | null
dirTextDirection | null
pageNumberingPageNumberingAttrs | null

null: continue from the previous section, in decimal.

SectionOptions

NameTypeDefault
orientation"portrait" | "landscape"
margin{ top?: number; bottom?: number; left?: number; right?: number; layout?: "narrow" | "moderate" | "wide" | "custom"; }
pageSizeSize

SelectedBorders

NameTypeDefault
topboolean
bottomboolean
leftboolean
betweenboolean
outsideboolean
allboolean
insideVerticalboolean
insideHorizontalboolean

SerializedComment

NameTypeDefault
idstring
threadIdstring
bodyJSONContent

ProseMirror JSON (a doc of paragraphs). Undefined once soft-deleted.

authorCommentAuthor
createdAtstring
deletedAtstring
reactionsSerializedReaction[]

SerializedReaction

NameTypeDefault
emojistring
users{ id: string; }[]
createdAtstring

SerializedThread

NameTypeDefault
idstring
resolvedboolean
metadataRecord<string, unknown>
createdAtstring
deletedAtstring
commentsSerializedComment[]

Size

NameTypeDefault
widthnumber
heightnumber

SortOptions

NameTypeDefault
colIndexnumber
descendingboolean
orderBy"number" | "text" | "date"

SpacingAttrs

NameTypeDefault
beforenumber | null
afternumber | null
contextualboolean | null

Word’s “don’t add space between paragraphs of the same style” (w:contextualSpacing): between two blocks of one style, the before/after of a block that sets it is ignored. Inherits through the style like the other fields; null inherits.

StyleDefinition

NameTypeDefault
namestring
type"paragraph" | "character"

Word’s w:style/@w:type; absent means “paragraph”. A "character" entry never applies to a block: it is absent from the style picker, not a valid styleId, carries no paragraphStyle, bases only on character styles, and renders against its MARK’s selector rather than .pm-style-<id>.

Only HTMLCode (code mark) and Hyperlink (link mark) are recognised; every other w:rStyle flattens onto its runs at import.

basedOnstring | null
paragraphStyleParagraphStyle
characterStyleTextStyle
semiHiddenboolean
unhideWhenUsedboolean
quickFormatboolean
uiPrioritynumber
nextstring
languagestring | null

Proofing language (BCP 47), the middle of paragraph.proofingLanguage ?? style.language ?? doc.language — Word’s w:style/w:rPr/w:lang. Top-level, not in characterStyle, so it never reaches textStyleToCss. Inherits through basedOn; null resets to the document language, absent inherits.

StyleNumbering

NameTypeDefault
listRefstring
levelnumber
followBy"tab" | "space" | "nothing"
tabStopnumber

StylePaginationProps

NameTypeDefault
keepWithNextboolean
widowOrphanboolean
pageBreakBeforeboolean
keepLinesboolean

StyleSheetState

NameTypeDefault
resolvedStylesStyleSheet
overridesStyleSheet

doc.attrs.styleSheet as stored — what sub-editors read off the store.

TableAttrs

NameTypeDefault
alignTableAlign
sortableSortOptions
bordersTableBorders | null
hasHeaderRowboolean
idstring

TableBorders

NameTypeDefault
topMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
bottomMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
leftMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
insideHorizontalMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>
insideVerticalMutable<Omit<IBorderOptions, "style"> & { style: BorderStyle; }>

TableDragState

NameTypeDefault
dragging{ node: Node; } | null

TableResizingOptions

NameTypeDefault
handleWidthnumber
handleHeightnumber
cellMinWidthnumber
cellMinHeightnumber
defaultCellMinWidthnumber

TabStop

NameTypeDefault
posnumber
alignTabStopAlign
leaderTabStopLeader

TextStyle

NameTypeDefault
colorstring | null

“#RRGGBB”, the AUTO_COLOR sentinel "auto" (Word’s automatic color: flips black/white against the nearest background at render time), or null (the stylesheet decides). “auto” is legal ONLY here and in TextStyle.color; every other color slot treats it as absent.

fontSizenumber | null
fontFamilystring | null
capsCaps | null
bgColorstring | null
strongboolean
emboolean
underlineboolean
strikethroughboolean
superscriptboolean
subscriptboolean

TextStyleAttrs

NameTypeDefault
colorstring | null

“#RRGGBB”, the AUTO_COLOR sentinel "auto" (Word’s automatic color: flips black/white against the nearest background at render time), or null (the stylesheet decides). “auto” is legal ONLY here and in TextStyle.color; every other color slot treats it as absent.

fontSizenumber | null
fontFamilystring | null
capsCaps | null
bgColorstring | null
offTextStyleOff[] | null

Properties this run turns OFF against its paragraph’s style. Always in TEXT_STYLE_OFF order and never [] — a reordered or empty array is a different mark to Mark.eq, so adjacent text stops merging. Write through withOff.

TextStyleAttrsWithoutOff

NameTypeDefault
colorstring | null

“#RRGGBB”, the AUTO_COLOR sentinel "auto" (Word’s automatic color: flips black/white against the nearest background at render time), or null (the stylesheet decides). “auto” is legal ONLY here and in TextStyle.color; every other color slot treats it as absent.

fontSizenumber | null
fontFamilystring | null
capsCaps | null
bgColorstring | null

Thread

NameTypeDefault
idstring
resolvedboolean
createdAtDate
deletedAtDate
metadataRecord<string, unknown>
commentsThreadComment[]

ThreadComment

NameTypeDefault
idstring
threadIdstring
createdAtDate
bodyJSONContent

ProseMirror JSON (a doc of paragraphs). Undefined once soft-deleted.

deletedAtDate

Set when the comment has been soft-deleted.

authorCommentAuthor
reactionsCommentReaction[]

Toast

NameTypeDefault
typeToastType
descriptionstring
keyToastKey
paramsRecord<string, string | number>

ToastCallback

Parameters:
NameTypeDefault
toastToast
Returns:
void

ToastMessage

NameTypeDefault
typeToastType
key"cannotInsertAcrossNodes" | "cannotRemoveFirstSection" | "missingSortColumn" | "sortColumnOutOfRange" | "cannotSortMergedRows" | "emptyRowRemoved" | "nestedTablesNotAllowed" | "dispatchFailed" | "footnoteRemoved" | "endnoteRemoved"
params{ column: number; columns: number; }

ToastParams

NameTypeDefault
sortColumnOutOfRange{ column: number; columns: number; }

TOCattrs

NameTypeDefault
showPageNumbersboolean
alignNumberRightboolean
showLeaderDotsboolean

Dotted leader between text and the right-aligned number (only meaningful with alignNumberRight).

scope"document" | "section"

“document” lists every section’s headings (Word default); “section” only the TOC’s own.

TOCbreakEntry

NameTypeDefault
afterLinenumber
paddingTopnumber

TOCitem

NameTypeDefault
idstring
typeNamestring

Node type name of the anchor (“heading”, “paragraph”, …).

itemIndexnumber
levelnumber
originalLevelnumber
isNumberedboolean
numberingLabelstring | undefined
runsTOCrun[]
textContentstring

Plain-text projection of runs (math omitted) — for search/aria/compact lists.

posnumber
sectionIndexnumber

0-based index of the section the anchor lives in — lets a section-scoped TOC filter.

pathstring | undefined
listRefstring | undefined
languagestring | undefined

TOCstate

NameTypeDefault
contentTOCitem[]

ToggleCounterTrProps

NameTypeDefault
buttonType"number" | "bullet"
levelFormatLevelFormat

TrackChangesAttrs

NameTypeDefault
type"deletion" | "insertion" | "deleteClosure"
idstring
datestring | null
userIdstring | null
userNamestring | null
previousOmit<TrackChangesAttrs, "previous"> | null

The still-pending insertion this deletion/deleteClosure overwrote — set only when a reviewer deletes ANOTHER user’s inserted block (the attr is a single slot, unlike inline marks which stack). Rejecting the deletion restores it, so the original proposal returns to pending instead of being silently accepted. Never nests: an insertion carries no previous.

trackChangesModificationAttrs

NameTypeDefault
idstring
datestring | null
userIdstring | null
userNamestring | null
attrsAttrs

TrackChangesState

NameTypeDefault
enabledboolean
showboolean
markActivityMapMap<string, number>

markId → lastActivityTimestamp, driving the merge of adjacent marks by the same user within a short window. On plugin state so editors don’t share it.

hasPendingboolean

Whether the doc holds ANY pending track change, kept incrementally so toolbar probes are O(1). When absent (tests, states without the plugin) consumers fall back to a cached full-doc walk.

TransactionFn

Parameters:
NameTypeDefault
propsTransactionFnProps
Returns:
boolean

TransactionFnProps

NameTypeDefault
trTransaction
stateEditorState
viewEditorView
dispatch(tr: Transaction) => void

Underline

NameTypeDefault
typeUnderlines
stylestring
thicknessstring | undefined
offsetstring | undefined

UnderlineAttrs

NameTypeDefault
variantUnderlines

Not type, which on a mark reads as mark.type. The DOM form stays data-underline-type.

colorstring | null

UploadBlockAttrs

NameTypeDefault
uploadTypestring | null

UserPreferences

NameTypeDefault
showOutlineboolean
showRulerboolean
zoomLevelnumber
trackChanges{ show: boolean; enabled: boolean; }
showCommentsCommentDisplayMode
displayUnitsDisplayUnits
proofReadEnabledboolean
proofReadLoadingboolean
proofReadApiFailedboolean

Other exports

ExportTypeDescription
AccessibilityRule"imageMissingAlt" /** Link text that says nothing out of context ("click here", a bare URL). */ | "linkTextNotDescriptive" /** The same link text pointing at more than one destination. */ | "duplicateLinkText" /** A paragraph formatted like a heading but not styled as one. */ | "headingLikeParagraph" /** An outline level reached without passing through its parent (1 → 3). */ | "skippedHeadingLevel" /** A table whose first row is not marked as a header row. */ | "tableMissingHeaderRow"The accessibility checker’s rules (v1). Per ATAG they surface judgement calls to the author, as Word/Docs/Acrobat do; none auto-fixes anything.
AlignmentDirection"top" | "middle" | "bottom"
AlignmentTypeValue"start" | "center" | "end" | "both" | "mediumKashida" | "distribute" | "numTab" | "highKashida" | "lowKashida" | "thaiDistribute" | "left" | "right"
AtomValueAtomValue<T>The value type of a nanostores atom.
AttrsWithDefaults{ [K in keyof T]: { default: T[K]; validate?: string | ((value: any) => void) } }ProseMirror attr specs for every key of T.
BlockHandleState{ node: Node; pos: number } | nullThe block under the drag handle, if any.
BorderPosition"top" | "bottom" | "left" | "right" | "between"
BorderStyle"single" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset" | "none"
Caps"all" | "small" | "none"Word’s two casing FORMATS, plus an explicit off. One slot, so all caps and small caps are mutually exclusive by construction. "none" is an explicit off that beats an inherited all-caps; null inherits.
CaseChange"sentence" | "uppercase" | "lowercase" | "capitalize"Case changes offered as EDITS: they rewrite the stored characters and store nothing. Clearing the casing FORMAT is Caps via setCaps instead.
CellAlignment${AlignmentDirection}-${TableAlign}
CommentDisplayMode"anchored" | "floating" | "minimized" | "none"
ContentHTMLContent | JSONContent | JSONContent[] | nullContent given as an HTML string or ProseMirror JSON.
CrossRefType"default" | "fullContext" | "aboveBelow"
CSSPropertiesProperties<string | number> & { [key: `--${string}`]: string | number | undefined }A style object: csstype Properties plus CSS custom properties (--name).
DisplayUnit"cm" | "inches" | "pt" | "px"
EditorMode"edit" | "review" | "view"Editor mutability mode. "edit" — full editing. "review" — all edits become tracked suggestions. Requires the track-changes plugin: configuring it without one throws. The toggle that would turn tracking off is refused for as long as the mode is set. "view" — read-only: local doc-changing transactions are dropped at dispatch, remote collab changes still apply.
EditorStoreExtensionsinterface EditorStoreExtensions {}Module-augment this interface to type the extension stores passed to createEditorStores.
FileKind"pdf" | "other"
FileRotation0 | 90 | 180 | 270The rotations a file node can store.
FindResultContentNodeWithPos | undefinedResult of a prosemirror-utils node lookup.
FollowBy"tab" | "space" | "nothing"
followNumberingWithreadonly ["tab", "space", "nothing"]What can follow a list number. FollowBy is its element type.
GlobalAttributeMapRecord<T, GlobalAttribute>The resolved global attributes of a schema, keyed by attribute name.
HeaderFooterVariant"default" | "even" | "first"
HTMLContentstring
ImageAlign"start" | "end" | "center" | "fullWidth"
ImageAnchoredSide"left" | "right"Which side a square/tight anchored image floats to.
ImageAnchoredWrap"inline" | "square" | "tight" | "front" | "behind"Layout mode of the inline image_anchored node: “inline”: part of a single text line (flows like a tall glyph). “square” | “tight”: floated to a side; adjacent lines wrap around it. The pagination engine merges the image + adjacent narrow lines into one indivisible band (see getTextLinesFromElement). “front” | “behind”: absolutely positioned from the anchor point, out of flow (in front of / behind the text). Contributes nothing to line measurement.
ImageWrap"top-bottom" | "square"Wrap attr of the BLOCK image node. “square” is a legacy value from the first wrap attempt (float on the block node) — kept for parsing old docs. New wrap behaviours live on the inline image_anchored node (see ImageAnchoredWrap).
ImageWrapMode"top-bottom" | ImageAnchoredWrapThe full wrap-mode surface exposed by the setImageWrap command / toolbar. “top-bottom” selects the BLOCK image node (text above and below); every other mode selects the inline image_anchored node with that wrap.
IndentationSpecials"none" | "first-line" | "hanging"
Jsonstring | number | boolean | null | Json[] | { [key: string]: Json | undefined }Any JSON value.
JSONContentAttrsRecord<string, any>The attrs of a JSONContent node.
LevelFormatName"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" | "bahtText" | "dollarText" | "custom"
LevelFormatValueILevelsOptions["format"]A list level’s number format ("decimal", "lowerRoman", …).
LevelSuffixValue"nothing" | "space" | "tab"
LineHeightRule"atLeast"How an exact (“Xpt”) line height applies — see the lineHeightRule attr.
MaybeReadOnlyReadonly<T> | T
Mutable{ -readonly [P in keyof T]: T[P] }
NodeCommentsAttrNodeCommentEntry[] | nullValue of the nodeComments global attribute.
Nullable{ [P in keyof T]: T[P] | null }
NumberCasing"capitalize" | "uppercase" | "lowercase" | "firstLetter"Casing for the word-based number formats (cardinalText, ordinalText): capitalize — every word capitalised: “Forty-Two” (the converters’ native output); uppercase — “FORTY-TWO”; lowercase — “forty-two”; firstLetter — only the leading letter capitalised: “Forty-two”
NumberGender"masculine" | "feminine"The grammatical genders the numbering UI offers.
NumberingAttrValueNumberingAttrs | NumberingOffSentinel | nullThe numbering node attr: direct numbering (listRef: INHERIT_LIST_REF takes the list from the style), the off sentinel { listRef: null }, or null to inherit.
OoxmlBorderStyle"single" | "dashDotStroked" | "dashed" | "dashSmallGap" | "dotDash" | "dotDotDash" | "dotted" | "double" | "doubleWave" | "inset" | "nil" | "none" | "outset" | "thick" | "thickThinLargeGap" | "thickThinMediumGap" | "thickThinSmallGap" | "thinThickLargeGap" | "thinThickMediumGap" | "thinThickSmallGap" | "thinThickThinLargeGap" | "thinThickThinMediumGap" | "thinThickThinSmallGap" | "threeDEmboss" | "threeDEngrave" | "triple" | "wave"
PageNumberFormat"decimal" | "lowerRoman" | "upperRoman" | "lowerLetter" | "upperLetter"Word’s page-number formats (w:pgNumType/@w:fmt) the editor prints.
PageNumberType"currentPage" | "totalPages"
ResizeType"column" | "row"
StringLiteralsOnlyStringLiteralsOnly<T> = T extends string ? (string extends T ? never : T) : never
StyleSheetRecord<string, StyleDefinition>A document’s style definitions, keyed by style id.
TableAlign"start" | "center" | "end"
TabStopAlign"start" | "center" | "end" | "decimal"Where text lands against a tab stop: decimal lines up on the first ”.”.
TabStopLeader"none" | "dot" | "hyphen" | "underscore"What fills the gap a tab leaves.
TextAlignType"justify" | "start" | "end" | "center"
TextDirection"ltr" | "rtl"
TextStyleOff"strong" | "em" | "underline" | "strikethrough" | "superscript" | "subscript"The marks a textStyle mark can negate — Word’s “bold style, unbolded run”. Turning a property ON is the standalone marks’ job; only OFF needs a slot, since a mark cannot be absent-with-emphasis. TEXT_STYLE_OFF in helpers/text-style.ts is the ordered runtime array, checked against this.
ToastKey"cannotInsertAcrossNodes" | "cannotRemoveFirstSection" | "missingSortColumn" | "sortColumnOutOfRange" | "cannotSortMergedRows" | "emptyRowRemoved" | "nestedTablesNotAllowed" | "dispatchFailed" | "footnoteRemoved" | "endnoteRemoved"Every message core and the feature packs can raise. Core emits keys, not text, so a host can translate or reword messages without matching English.
ToastType"success" | "info" | "error" | "warning" | "default"
TOCItemType"numberedItem" | "heading"
TOCrun{ text: string; marks?: TOCrunMark[] } | { math: string }One renderable fragment of a TOC entry: formatted text, or LaTeX for an equation.
TOCrunMark"em" | "superscript" | "subscript"
Underlines"single" | "double" | "thick" | "dotted" | "dottedHeavy" | "dash" | "dashedHeavy" | "wave" | "wavyHeavy"
Last updated on