@pptx-editor.dev/core/contracts

Interfaces (79)

AltTextinterfaceSource ↗

The alt text of an element (p:cNvPr).

interface AltText
MemberTypeSummary
decorativebooleanMarked as decorative (the `adec:decorative` extension).
descriptionstring
titlestring

AnimationEffect_2interface

One effect of a slide, in the order the slide plays it.

interface AnimationEffect
MemberTypeSummary
delayMsnumberThe delay before the effect starts, in milliseconds.
durationMsnumber | nullHow long the effect plays, in milliseconds; null for an effect that is instant.
editablebooleanWhether the animation commands can change it.
effectClassAnimationClass
idstringThe effect's `p:cTn/@id`: the handle that the animation commands take.
nodeIdstring | nullThe node id of that shape on the slide, or null when the slide has no such shape.
paragraphs?{ readonly start: number; readonly end: number; }The paragraphs it animates (`p:pRg`, 0-based and inclusive), when it animates text.
presetAnimationPreset | nullThe preset, when it is one that `addAnimation` writes; otherwise null.
presetIdnumber | nullThe `presetID` of the effect, or null.
sequence'main' | 'interactive'The main sequence (`mainSeq`), or a sequence that a click on another shape starts (`interactive`). Only main sequence effects can be edited.
shapeIdstringThe `p:cNvPr/@id` of the shape it animates.
shapeNamestringThe name of that shape (`p:cNvPr/@name`), or an empty string.
stepnumber | nullThe click that starts it in the main sequence: 0 for effects that play when the slide starts, then 1, 2, and so on. Null for an interactive effect.
triggerAnimationTrigger
triggerShapeId?stringFor an interactive effect, the `p:cNvPr/@id` of the shape whose click starts it.
triggerShapeName?stringThe name of that shape, or an empty string.

BulletFormatMixedinterfaceSource ↗

What the selected paragraphs share when their bullet formats differ, so the Bullets and Numbering dialog opens on their list's tab and shows the values they have in common.

interface BulletFormatMixed
MemberTypeSummary
kindsreadonly ('bullet' | 'number' | 'picture' | 'none')[]The list kind of each selected paragraph, each kind once, in selection order.
sizePercentnumber | nullPercent of the text size, when every bullet and number has the same; otherwise null.
startAt?number | nullThe first number, when every numbered paragraph has the same; otherwise null. Absent when no paragraph is numbered.

ChartColorEntryinterfaceSource ↗

The color of one series, or of one data point of a pie or doughnut chart.

interface ChartColorEntry
MemberTypeSummary
automaticColorChoiceThe theme color that the automatic color starts from, for a swatch.
colorColorChoice | nullThe color the chart part sets, or null for the automatic color.
namestringThe series name, or the category label of a pie or doughnut point.

ChartDatainterfaceSource ↗

The data of one chart: its categories and its series.

interface ChartData
MemberTypeSummary
categoriesreadonly ChartDataCategory[]
kindChartDataKind
seriesreadonly ChartDataSeries[]
workbook?ChartWorkbookStateOn read only: where the chart's workbook is. A write ignores it.

ChartDataCategoryinterfaceSource ↗

One category (or X value) of a chart.

interface ChartDataCategory
MemberTypeSummary
labelstringThe label, or the X value of a scatter chart as text.
source?numberOn read: the position of the category in the chart. On write: the category this one continues, so its data point formatting and data labels stay with it. Absent: a new category.

ChartDataSeriesinterfaceSource ↗

One series of a chart.

interface ChartDataSeries
MemberTypeSummary
namestringThe series name, as the legend shows it.
source?numberOn read: the position of the series in the chart. On write: the series this one continues, so its formatting stays with it. Absent: a new series, with automatic formatting.
valuesreadonly (number | null)[]One value for each category; `null` is a blank cell.

ChartFormatinterfaceSource ↗

The type and elements of a chart, as chartFormat reads them. A field is null when the chart type has no such element: a pie chart has no axes.

interface ChartFormat
MemberTypeSummary
axesboolean | nullWhether the chart shows its axes; null for a chart with no axes.
axisTitles{ readonly category: string | null; readonly value: string | null; } | nullThe axis titles, or null for no title; null for a chart with no axes.
colorsreadonly ChartColorEntry[]
colorsBy'series' | 'point'What `colors` and `setChartColor` color: each series, or each point of a pie chart.
dataLabelsbooleanWhether the chart shows a value label at each data point.
gridlinesboolean | nullWhether the value axis shows major gridlines; null for a chart with no axes.
legendChartLegendPosition
titlestring | nullThe title text, or null for no title. An automatic title reads as its series name.
typeChartType | nullThe chart type, or null for a type that `setChartType` does not write (3-D, stock).

ChartFormatChangeinterfaceSource ↗

The chart elements that setChartFormat changes. An absent field keeps its value. A title of null removes the title; a string sets its text and keeps its formatting.

interface ChartFormatChange
MemberTypeSummary
axes?boolean
categoryAxisTitle?string | null
dataLabels?boolean
gridlines?boolean
legend?ChartLegendPosition
title?string | null
valueAxisTitle?string | null

ClipboardNodeinterfaceSource ↗

A serialized element, structurally the store's NodeSpec.

interface ClipboardNode
MemberTypeSummary
attrs?readonly { ns: string; local: string; prefix?: string; value: string; }[]
children?readonly (ClipboardNode | { readonly text: string; })[]
localstring
nsstring
nsDecls?readonly { prefix: string; uri: string; }[]
prefix?string

ClipboardPayloadinterfaceSource ↗

The clipboard format for shapes (application/x-pptx-editor+json).

interface ClipboardPayload
MemberTypeSummary
documentstringThe session the shapes came from; pasting into it reuses its parts.
relationshipsreadonly ClipboardRelationship[]
shapesreadonly ClipboardNode[]
slidePartstringThe slide part the shapes came from; pasting onto it offsets them.
version1

ClipboardRelationshipinterfaceSource ↗

A relationship a copied shape uses, with the bytes of its target. A chart, a diagram, or an embedded object carries its own relationships in relationships. A web link carries its address in target and no bytes. A link to a slide names the slide part and carries no bytes; paste keeps it only in the presentation it came from.

interface ClipboardRelationship
MemberTypeSummary
base64string
contentTypestring
idstring
partstring
relationships?readonly ClipboardRelationship[]The relationships of the carried part.
target?stringThe address of an external link.
typestring

CommentAuthorInputinterfaceSource ↗

Who writes a comment or a reply. Absent, the editor's author option (setAuthor) applies, then the collaboration identity. Without a name, the command is refused (disabled.noCommentAuthor).

interface CommentAuthorInput
MemberTypeSummary
author?stringThe display name, 1 to 255 characters.
date?stringISO 8601 date and time. Default: now, in UTC.
initials?stringInitials, up to 8 characters. Default: the first letters of the first two words.

CommentExpectinterfaceSource ↗

What a host showed of a comment, for a command that acts on it: pass the comment's author, date, text, and identity as the snapshot gave them. The editor refuses the command (errors.commentChanged) when the comment at commentId has another author or date.

A twin shares its GUID, author, and creation time with another comment of the slide, or, in the legacy format, its author and index. A twin's id holds its place among its twins (~<n>, or -<n> for a legacy comment). For an id with a place, the editor also compares the text (errors.commentChanged), and refuses the command when the comment has no twin left (errors.noComment): the id may have named the twin that is gone.

Without identity, an id with a place is also refused when another twin has the same text (errors.commentAmbiguous), and when it named another comment since the last snapshot (errors.commentChanged, until the next snapshot). With identity, the editor checks it instead. So a collaborator's edit of a comment without a twin never refuses yours.

Always pass identity. Without it, after the next snapshot, an old id can reach another twin with the same author, date, and text.

interface CommentExpect
MemberTypeSummary
authorstringThe author's display name, as `SlideComment.author` gave it.
date?stringThe date, as `SlideComment.date` gave it; absent when the comment has none.
identity?stringThe `identity`, as the snapshot gave it. With it, the editor refuses the command when the comment at `commentId` has another identity now: as the snapshot shows it for the current slide, and as the editor reads the slide's comments now for another slide. It tells apart twins, even twins with the same text.
textstringThe text, as `SlideComment.text` gave it.

CommentSnapshotinterfaceSource ↗

The comment fields of the editor snapshot (EditorSnapshot).

interface CommentSnapshot
MemberTypeSummary
activeComment?string | nullThe thread a comment marker or `selectComment` picked, or null.
commentAuthor?string | nullThe name that signs a new comment or reply: the editor's `author` option (`setAuthor`), else the collaboration identity's name, else null. With null, the editor refuses a new comment that names no author (`disabled.noCommentAuthor`).
comments?readonly CommentThread[] | nullThe current slide's comment threads, in file order. Null without a review module (`@pptx-editor.dev/pro`); the comment commands still work. Reference-stable while unchanged.

CommentTextRangeinterfaceSource ↗

A range of a shape's text, with the points that a text selection (EditorSelection) uses. A snapshot gives start before end. addComment takes the two points in either order.

interface CommentTextRange
MemberTypeSummary
endTextPointThe point after the last character of the range.
startTextPointThe first character of the range.

CommentThreadinterfaceSource ↗

A comment and its replies (EditorSnapshot.comments).

interface CommentThread extends SlideComment
MemberTypeSummary
anchorCommentAnchor
formatCommentFormat
repliesreadonly SlideComment[]The replies, oldest first.
resolvedbooleanWhether the thread is resolved. Always false for the `legacy` format, which has no state.

ConnectionTargetinterfaceSource ↗

A connection site of a shape: the shape's node id and the site's index.

interface ConnectionTarget
MemberTypeSummary
indexnumberThe index of the site in the shape's geometry (`a:cxnLst`), from 0.
nodeIdstringThe node id of the shape, as `EditorSelection` names shapes.

ConnectorRouteinterfaceSource ↗

A connector's route and the shapes its ends glue to. Each field is optional: an absent field keeps the connector's current value.

interface ConnectorRoute
MemberTypeSummary
adjust?Readonly<Record<string, number>>The adjust values of the preset by guide name, in guide units (see `a:gd`).
end?ConnectionTarget | nullThe connection site the end glues to (`a:endCxn`); null unglues it.
preset?stringThe connector preset (`a:prstGeom/@prst`): `straightConnector1`, `bentConnector2` to `bentConnector5`, or `curvedConnector2` to `curvedConnector5`.
start?ConnectionTarget | nullThe connection site the start glues to (`a:stCxn`); null unglues it.

CustomShowSummaryinterfaceSource ↗

A custom show of the deck (p:custShow, ECMA-376 Part 1, 19.2.1.7), for links.

interface CustomShowSummary
MemberTypeSummary
idnumberThe show's `id` in the file.
namestringThe show's name, on one line.

DateTimeStateinterfaceSource ↗

The date that the slides show (EditorSnapshot.dateTime).

interface DateTimeState
MemberTypeSummary
fixedbooleanTrue for fixed text; false for a date field.
textstringThe text that the date shows.

DiagramNodeStateinterfaceSource ↗

One node of the selected diagram, in outline order.

interface DiagramNodeState
MemberTypeSummary
editablebooleanWhether `setDiagramText` and typing can change the text: one drawing shape shows the text of this node alone.
levelnumber0 for a top-level node, 1 for its child, and so on.
nodestringThe data model id of the node (`dgm:pt/@modelId`).
textstringThe node's plain text: a newline between paragraphs and at each line break.

DocumentOpenFailureinterfaceSource ↗

A file the editor refused to open. It carries a stable code only, never the file's content or name. Each refusal is a new object, so a host can tell a second refusal of the same file from the first.

interface DocumentOpenFailure
MemberTypeSummary
codestringThe engine's reason, the same value as `EditorSnapshot.error` (`zip`, `xml`, `empty`).
reasonDocumentOpenFailureReasonThe group of `code` that picks the message.

EditorinterfaceSource ↗

The editor contract adapters render.

interface Editor
MemberTypeSummary
attach
beginHistoryGroupOpen a history group: every command run with it (`exec(command, { historyGroup })`) until `end()` is one undo step. Opening one creates no undo entry. Undo, redo, and a command with another handle or none split the step; a selection change does not. `load` and `destroy` close every handle. End it in a `finally` block, so a refused or throwing command does not leave it open.
canDry run: whether `exec` would apply. A closed or foreign `historyGroup` refuses.
copyThe selected shapes as a clipboard payload, or null when nothing is copyable.
destroy
detach
execRun a command. Pass `options.historyGroup` to make several commands one undo step. See [HistoryGroupOptions](HistoryGroupOptions).
focusGive the keyboard back to the slide, as DOCX Editor's `focus()`: the text caret for a text selection, else the slide surface. Host pickers call it after a pick.
goToSlide
loadOpen `bytes` in place of the current presentation. Resolves once the presentation can be edited. A long deck resolves when its first slide is ready (`options.startSlide`, or the first one) and opens the other slides in the background (`EditorSnapshot.pendingSlides`).
renderThumbnailPaint a slide thumbnail into a container. The first paint is synchronous, unless `options.defer` is set (see [RenderThumbnailOptions](RenderThumbnailOptions)). A container repaints when its slide changes, when the editor is idle.
saveThe presentation as `.pptx` bytes. The bytes own an `ArrayBuffer`, so `new Blob([bytes])` takes them as they are. A long deck still opening opens the rest first.
selectAllSelect every shape in the current scope (the slide or the entered group).
selectSlideClick slide `index` in the rail: `replace` selects only it (as `goToSlide`), `toggle` (Ctrl/Cmd+click) adds or removes it, and `range` (Shift+click) selects from the anchor to it. The clicked slide becomes current, unless a toggle removed it.
setMode
setZoom
snapshot
subscribe

EditorFontSubstitutioninterfaceSource ↗

A family the deck names that renders with another face.

interface EditorFontSubstitution
MemberTypeSummary
familystring
metricCompatiblebooleanTrue when the substitute keeps the line breaks of the original font (same advance widths).
substitutestring

EditorRejectioninterfaceSource ↗

A refused edit: the i18n key of the reason and an optional detail.

interface EditorRejection
MemberTypeSummary
detail?stringWhat the reason names, for the `{reason}` or `{detail}` placeholder.
noop?booleanTrue when the command had nothing to do (`disabled.nothingToUndo`, `disabled.nothingToRedo`, `disabled.noSelection`), not when an edit was refused. Chrome shows no notice for it.
reasonstringThe i18n key of the reason (`errors.*`, `disabled.*`).

EditorRemovalinterfaceSource ↗

A Delete that the user can undo: what it removed and how many.

interface EditorRemoval
MemberTypeSummary
countnumber
kind'shapes' | 'slides'
serialnumberGrows with each removal, so chrome tells two equal removals apart.

EditorSnapshotinterfaceSource ↗

interface EditorSnapshot extends CommentSnapshot
MemberTypeSummary
animationOrder?booleanWhether the canvas shows the order number of each effect on its shape (`showAnimationOrder`). A view setting, never saved. Absent reads as false.
animations?SlideAnimationsThe current slide's effects and transition. Optional: absent means the implementation does not edit animations.
canRedoboolean
canUndoboolean
chart?SelectedChartState | nullThe selected chart, while exactly one chart frame is selected; the chart controls show then. Optional: absent means the implementation does not edit chart data.
collapsedSections?readonly string[]The ids of the collapsed sections (`SlideSection.id`). A view setting, never saved.
currentSlidenumberThe slide on the canvas: an index into the deck's slides. In the slide master view, it is the template index of the layout or master on the canvas instead, not a position in `slides`; read the current entry with `currentSlideSummary`.
customShows?readonly CustomShowSummary[]The deck's custom shows, in file order; empty when it has none. A link can go to one (`#custom-show-<id>`). Reference-stable while they do not change. Optional: absent means the implementation does not report custom shows.
dateTime?DateTimeState | nullThe date (Insert Date and time), read as `footer` is: its text, and whether it is fixed text or a field. Null when no open slide shows one. Absent reads as null.
diagram?SelectedDiagramState | nullThe selected diagram, or the diagram that holds the caret. Absent: no diagram editing.
embeddedFontFacesnumber
equation?SelectedEquationState | nullThe selected equation, while one text box with one equation is selected.
error?string
fitZoomboolean
formatSelectionFormat | null
formatPainter?FormatPainterModeThe format painter. The surface shows the paintbrush cursor and the next selection made with the pointer takes the copied formatting while it is not `off`. Optional: absent means the implementation has no format painter.
geometrySelectionGeometry | null
image?SelectedImageState | nullThe selected pictures, while every selected element is a picture; the picture controls show then. Optional: absent means the implementation does not report pictures.
insertionsnumberHow many objects (shapes, lines, text boxes, pictures, tables) this editor inserted. A ribbon opens the new object's Format tab when the count grows.
isOpening?booleanWhether a deck is still on its way to its first painted slide (`status` is `loading`). Show an opening screen while it holds. It turns false when the first slide paints; that slide takes input while the others open (`pendingSlides`). Optional and additive: absent reads as `false`.
lastRejection?EditorRejection | nullWhy the last edit was refused, or null. Keyboard input, the clipboard, and commands set it when the editor does not apply them; the next applied edit clears it. Optional: absent means the implementation does not report refusals.
lastRemoval?EditorRemoval | nullThe last Delete of shapes or slides, while it is the newest edit: chrome offers to undo it. The next applied edit, an undo or redo, and opening a document clear it. Cut sets none. Optional: absent means the implementation does not report removals.
layouts?readonly SlideLayoutSummary[]The deck's slide layouts, masters in order and each master's layouts in order. Reference-stable while they do not change. Optional: absent means the implementation does not list layouts.
modeEditorMode
notesstring
notesFormatted?readonly NotesParagraph[]The current slide's notes as paragraphs of formatted runs; their text equals `notes`. Reference-stable while the notes do not change. Optional: absent means the implementation does not report notes formatting.
openFailure?DocumentOpenFailure | nullThe file the editor refused to open, or absent. A deck that was open before stays open (`status` stays `ready`); with no deck, `status` is `error`. It clears when the next file starts to open.
pendingSlides?numberHow many slides are still opening. A long deck shows its first slide and takes input while the other slides parse in the background; each one's summary carries `pending` until it is ready. Edits, undo, search, and save work before then: a slide that is needed parses at once, and `save` parses the rest first. Moves at most every 300 ms, and `selectionChange` fires when it does. Optional and additive: absent reads as 0.
presentationView?PresentationViewView Normal or Slide Sorter. Optional: absent means the implementation has only the normal view.
readOnlyReason?'damaged-slide' | nullWhy the open presentation is read-only, or `null`. `'damaged-slide'`: a long deck that opened and holds edits had a slide or a notes slide that did not parse. It stays on screen in view mode with its edits, and its other slides go on opening; commands, undo, `save()`, and automation writes are refused. `openFailure` stays `null`: the file did open. `change` fires once when it is set. It clears when the next file opens, and that file opens in the mode the host set (`setMode`): only `snapshot().mode` shows view meanwhile. Optional and additive: absent reads as `null`.
revisionnumber
sections?readonly SlideSection[]The deck's sections, in order; empty when it has none. Reference-stable while they do not change. Optional: absent means the implementation does not report sections.
selectedSlidesreadonly number[]The slides selected in the slide rail, ascending. Always holds `currentSlide`, except in the slide master view, where it is empty. Shift+click selects a range and Ctrl/Cmd+click adds or removes one slide (`selectSlide`).
selectionEditorSelection
shapes?readonly ShapeSummary[]The current slide's elements, top first, for the selection pane. Hidden elements are in the list. Optional: absent means the implementation has no selection pane.
slideBackgroundSlideBackgroundStateThe current slide's background.
slideHeightnumber
slideNumbersbooleanWhether the current slide shows its slide number (Insert Slide numbers).
slidesreadonly SlideSummary[]
slideWidthnumberSlide size in EMU.
smartGuidesbooleanWhether drags snap to smart guides (View Smart guides). On by default.
status'empty' | 'loading' | 'ready' | 'error'
substitutedFontsreadonly EditorFontSubstitution[]Named families rendered with another face; reference-stable while unchanged.
table?TableContext | nullThe table of the selection (a caret in a cell, a cell range, or the selected table frame), or null. Optional: absent means the implementation does not edit tables.
tableBorderPen?TableBorderPenThe table border pen: the line the Borders menu draws and the target it last drew (`setTableBorderPen`). Optional: absent means the implementation has no border pen.
themeColorsreadonly (readonly ThemeSwatch[])[]The current slide's theme colors in the layout of the color menus: the first row is the ten theme colors (Background 1, Text 1, Background 2, Text 2, Accent 1–6), and each later row one lighter or darker variant of every column. Empty with no document open; reference-stable while the theme and color map do not change.
zoomnumber

FindMatchinterfaceSource ↗

One match of a find. Offsets are UTF-16 offsets in the paragraph.

interface FindMatch
MemberTypeSummary
endnumber
nodeIdstringThe element the text belongs to: a `p:sp`, or the `p:graphicFrame` of a table.
paragraphnumber
partstringThe part that holds the text: the slide part, or the slide's notes part.
slidenumberThe slide index.
startnumber
textstringThe text the match covers.
txBodyIdstringThe text body: a shape's `p:txBody` or a table cell's `a:txBody`.
where'slide' | 'notes'`slide` for text on the slide (shapes, groups, table cells); `notes` for speaker notes.

FindOptionsinterfaceSource ↗

How find compares text.

interface FindOptions
MemberTypeSummary
matchCase?booleanMatch upper and lower case exactly.
wholeWord?booleanMatch whole words only: no letter, digit, or underscore touches either end.

FontConfigurationinterfaceSource ↗

Public font source configuration sampled when an adapter mounts. It must be immutable for that editor lifetime; remount the adapter to replace bytes or substitutions atomically.

interface FontConfiguration
MemberTypeSummary
defaultFont{ readonly family: string; readonly sizeHalfPoints: number; }
epochnumber
language?string
maxFontBytesnumber
sourcesreadonly FontSource[]
substitutions?readonly FontSourceSubstitution[]
supportedFamilies?readonly string[]Selectable provider families, independent of loaded bytes. Listing them performs no fetch.

FontFaceRequestinterfaceSource ↗

A concrete font face requested by authored document content.

interface FontFaceRequest
MemberTypeSummary
familystring
style'normal' | 'italic'
weightnumber

FontFormatCommandinterfaceSource ↗

The fields of the Font dialog (Font and Character Spacing tabs), as setFontFormat takes them. An omitted field keeps each run's value. The same shape as ParagraphFormatCommand.

interface FontFormatCommand
MemberTypeSummary
baseline?numberOffset in percent of the font size, -100 to 100 (`baseline`): positive raises (superscript), negative lowers, 0 turns an inherited offset off.
bold?booleanBold (`b`).
caps?CapsStyleSmall caps or all caps (`cap`).
characterSpacingPt?numberPoints added after each character, -1584 to 1584 (`spc`); negative condenses.
color?ColorChoice | nullA color choice, or null for the inherited color.
fontFamily?stringThe Latin font (`a:latin`): a family name of 1 to 64 letters, digits, spaces, `-._+`.
fontSizePt?numberSize in points, 1 to 4000 (`sz`).
italic?booleanItalic (`i`).
kerningPt?number | nullKerning for fonts of this size in points and above, 0.01 to 1584 (`kern`, in hundredths); null turns kerning off, which the engine writes as `kern="0"`.
strike?StrikeStyleStrikethrough (`strike`): none, single, or double.
underline?UnderlineStyleThe underline style (`u`); `none` removes it.
underlineColor?ColorChoice | nullThe underline color (`a:uFill`), or null for the underline to take the text color (`a:uFillTx`, also over a list style that sets one).

FontFormatReadinterfaceSource ↗

The selected text as the Font dialog reads it: resolved values. A field is null when the selected runs disagree (disagrees says which), so a control can show a blank.

interface FontFormatRead
MemberTypeSummary
baselinenumber | nullPercent of the font size; positive is superscript.
boldboolean | nullBold.
capsCapsStyle | nullCapitals: none, small, or all.
characterSpacingPtnumber | nullPoints.
disagrees{ readonly fontFamily: boolean; readonly fontSizePt: boolean; readonly bold: boolean; readonly italic: boolean; readonly underline: boolean; readonly strike: boolean; readonly baseline: boolean; readonly caps: boolean; readonly characterSpacingPt: boolean; readonly kerningPt: boolean; readonly underlineColor: boolean; }Which fields differ between the selected runs.
fontFamilystring | nullThe Latin font (`a:latin`), resolved through the theme.
fontSizePtnumber | nullPoints.
italicboolean | nullItalic.
kerningPtnumber | nullPoints and above; null when kerning is off or the runs disagree (see `disagrees`).
strikeStrikeStyle | nullStrikethrough: none, single, or double.
underlineUnderlineStyle | nullThe underline style; `none` without an underline.
underlineColorstring | nullThe underline's own solid color, `#RRGGBB`; null when it takes the text color, when its fill is not solid (a gradient or a pattern), or when the runs disagree.

FontSourceinterfaceSource ↗

Immutable, byte-backed font face supplied to layout and browser paint.

interface FontSource
MemberTypeSummary
availability?'available' | 'forbidden'
bytesUint8Array
faceIndexnumber
hashstring
idstring
requestFontFaceRequest

FontSourceSubstitutioninterfaceSource ↗

An explicit authored-font substitution. No implicit platform fallback is performed.

interface FontSourceSubstitution
MemberTypeSummary
fromFontFaceRequest
lineMetrics?{ readonly heightEm: number; readonly baselineEm: number; }Line-box metrics for the requested face, expressed as em ratios.
toFontFaceRequest

GradientFillinterfaceSource ↗

A gradient fill as the chrome edits it.

interface GradientFill
MemberTypeSummary
anglenumberDegrees clockwise from left-to-right (`a:lin/@ang`); 90 runs top to bottom.
kind'linear' | 'radial'`linear` (`a:lin`) or `radial` from the center (`a:path path="circle"`).
rotWithShapebooleanThe gradient turns with the shape (`rotWithShape`).
stopsreadonly { readonly pos: number; readonly color: string; }[]Two to ten stops; `pos` from 0 to 1, `color` as `#RRGGBB`.

HeaderFooterTargetsinterfaceSource ↗

The slides that setSlideNumbers, setFooter, and setDateTime act on.

interface HeaderFooterTargets
MemberTypeSummary
hideOnTitleSlides?booleanWith `show: true`, slides whose layout is a title slide layout (`p:sldLayout type="title"`) hide the placeholder instead. Default false.
indices?readonly number[]The slide indexes to change. Default: all slides.

HistoryGroupinterfaceSource ↗

The engine-owned identity of one gesture. Create it with Editor.beginHistoryGroup().

Every command that names one open handle becomes part of one undo step. Undo, redo, and a command with another handle (or none) close the step, so a later command with the handle starts a new one. A selection change, and a command that the editor refuses before it writes, leave the step open. Redo restores the selection after the last command of the step.

interface HistoryGroup
MemberTypeSummary
[historyGroupBrand]true
endEnd this gesture without reverting any edits. Safe to call more than once.
state'open' | 'closed'Closed after `end()`, after a new document loads, and after `destroy()`.

HistoryGroupOptionsinterfaceSource ↗

Options for a command that can join an explicit history group.

interface HistoryGroupOptions
```ts
const resize = editor.beginHistoryGroup();
editor.exec({ type: 'setTableGrid', columns: [914400, 914400] }, { historyGroup: resize });
editor.exec({ type: 'setTableGrid', columns: [1828800, 914400] }, { historyGroup: resize });
resize.end();
editor.exec({ type: 'undo' }); // reverts both commands
```
MemberTypeSummary
historyGroup?HistoryGroupAn open handle from `Editor.beginHistoryGroup` on this editor. A closed handle, or a handle from another editor, refuses the command with `errors.unsupported` and changes nothing.

ImageAdjustmentsinterfaceSource ↗

Picture corrections, color, and transparency, as the Picture Format tab sets them.

interface ImageAdjustments
MemberTypeSummary
brightness?numberBrightness from −1 to 1 (`a:lum/@bright`).
contrast?numberContrast from −1 to 1 (`a:lum/@contrast`).
recolor?ImageRecolorA Recolor preset of the Color gallery; `none` removes the color effect.
transparency?numberTransparency from 0 to 1 (`a:alphaModFix`, 1 − amount).

ImageCropPercentinterfaceSource ↗

The crop of each edge of a picture, in percent of the image (a:srcRect), after DOCX Editor's ImageCropPercent: a positive value removes that part of the image. Unlike DOCX Editor's 0 to 100, a value may be negative: it adds space on that side as padding (Fit writes it).

interface ImageCropPercent
MemberTypeSummary
bottomnumber
leftnumber
rightnumber
topnumber

ImagePropertiesinterfaceSource ↗

The Format Picture values, as DOCX Editor's setImageProperties names them. The size is the size on the slide, as the Size fields show it (SelectedImageState.widthEmu; inside a scaled group it differs from the file's a:ext), and keeps the top-left corner of the unrotated box; the crop keeps the image fixed on the slide.

interface ImageProperties
MemberTypeSummary
crop?ImageCropPercentThe crop of each edge in percent of the image.
heightEmu?numberThe height on the slide, in EMU.
rotationDegrees?numberThe rotation in degrees, clockwise.
widthEmu?numberThe width on the slide, in EMU.

LoadOptionsinterfaceSource ↗

Options of Editor.load.

interface LoadOptions
MemberTypeSummary
startSlide?numberThe slide to show first, zero-based; clamped to the deck. In a long deck it is the slide that parses first. Default 0.

NewChartDatainterfaceSource ↗

The data of a new chart: its categories (or X values) and its series.

interface NewChartData
MemberTypeSummary
categoriesreadonly string[]
seriesreadonly { readonly name: string; readonly values: readonly (number | null)[]; }[]

NotesParagraphinterfaceSource ↗

One paragraph of the speaker notes.

interface NotesParagraph
MemberTypeSummary
runsreadonly NotesRun[]The paragraph's runs; neighbors with the same formatting are joined.

NotesRuninterfaceSource ↗

A run of the speaker notes with its character formatting.

interface NotesRun
MemberTypeSummary
boldbooleanBold, from the run or the notes text style it inherits.
italicbooleanItalic, from the run or the notes text style it inherits.
strikebooleanStruck through (single or double).
textstringThe run's text. A line break inside a paragraph is `\n`.
underlinebooleanUnderlined (any underline style).

ParagraphFormatCommandinterfaceSource ↗

The fields of the Paragraph dialog, as setParagraphFormat takes them. An omitted field keeps the paragraph's value. null removes the paragraph's own value, so it takes the inherited value again (from the layout, the master, or the shape's list style); a zero is a value and blocks the inherited one.

interface ParagraphFormatCommand
MemberTypeSummary
alignment?ParagraphAlignmentAlignment (`algn`).
indentFirstLineEmu?number | nullThe first line's offset from the left indent in EMU (`indent`): negative is a hanging indent, positive a first-line indent.
indentLeftEmu?number | null"Before text": the left indent of the text in EMU (`marL`), 0 to 51206400.
lineSpacing?ParagraphLineSpacing | nullLine spacing (`a:lnSpc`): a multiple from 0.01 to 9.99, or 0.01 to 1584 points.
spaceAfterLines?number | nullSpace after the paragraph in lines (`a:spcAft/a:spcPct`), 0 to 132.
spaceAfterPt?number | nullSpace after the paragraph in points (`a:spcAft/a:spcPts`), 0 to 1584.
spaceBeforeLines?number | nullSpace before the paragraph in lines of its text (`a:spcBef/a:spcPct`), 0 to 132. Give this or `spaceBeforePt`, not both.
spaceBeforePt?number | nullSpace before the paragraph in points (`a:spcBef/a:spcPts`), 0 to 1584.

ParagraphFormatReadinterfaceSource ↗

The selected paragraphs as the Paragraph dialog reads them. A field is null when the paragraphs disagree (disagrees says which), so a control can show a blank. Values are resolved: inherited values count.

interface ParagraphFormatRead
MemberTypeSummary
alignmentParagraphAlignment | nullAlignment; null when the paragraphs disagree.
disagrees{ readonly alignment: boolean; readonly spaceBefore: boolean; readonly spaceAfter: boolean; readonly lineSpacing: boolean; readonly indentLeft: boolean; readonly indentFirstLine: boolean; }Which fields differ between the selected paragraphs.
indentFirstLineEmunumber | nullThe first line's offset from the left indent, EMU (negative hangs).
indentLeftEmunumber | null"Before text", EMU; null when the paragraphs disagree.
lineSpacingParagraphLineSpacing | nullLine spacing; null when the paragraphs disagree.
spaceAfterLinesnumber | nullLines, or null when the space is in points or the paragraphs disagree.
spaceAfterPtnumber | nullPoints, or null when the space is in lines or the paragraphs disagree.
spaceBeforeLinesnumber | nullLines, or null when the space is in points or the paragraphs disagree.
spaceBeforePtnumber | nullPoints, or null when the space is in lines or the paragraphs disagree.

ParagraphLineSpacinginterfaceSource ↗

Line spacing as the Paragraph dialog sets it: a multiple of single spacing (a:spcPct), or exact points (a:spcPts). DOCX Editor's rule names; a:lnSpc has no "at least".

interface ParagraphLineSpacing
MemberTypeSummary
rule'multiple' | 'exact'`multiple` of single spacing (`a:spcPct`), or `exact` points (`a:spcPts`).
valuenumberLines for `multiple` (1 is single), points for `exact`.

PatternFillinterfaceSource ↗

A preset pattern fill (a:pattFill) as the chrome edits it.

interface PatternFill
MemberTypeSummary
backgroundstringThe background, as `#RRGGBB`.
foregroundstringThe foreground (the pattern's ink), as `#RRGGBB`.
presetPatternPreset

RenderThumbnailOptionsinterfaceSource ↗

Options of renderThumbnail.

interface RenderThumbnailOptions
MemberTypeSummary
defer?booleanDefer the first paint, for a list with one container per slide (the rail, the slide sorter). The first containers asked for in one task and the current slide's paint at once; the others paint when they scroll into view or when the browser is idle, and stay empty until then. A container that is not on the page paints at once.

ReviewPaneOptionsinterfaceSource ↗

The comment view settings of a review module. Every field is optional.

interface ReviewPaneOptions
MemberTypeSummary
commentMarkers?CommentMarkerStyleDefault `'icon'`.
opening?ReviewPaneOpeningDefault `'auto'`.

SelectedChartStateinterfaceSource ↗

The selected chart, while exactly one chart frame is selected.

interface SelectedChartState
MemberTypeSummary
editablebooleanWhether `setChartData` can edit the chart's data.
nodeIdstringThe node id of the chart's graphic frame.
reason?stringWhy the data cannot be edited, as a translation key, when `editable` is false.

SelectedDiagramStateinterfaceSource ↗

The selected diagram, while one diagram frame is selected or holds the caret.

interface SelectedDiagramState
MemberTypeSummary
nodestring | nullThe diagram node whose text holds the caret (`dgm:pt/@modelId`), or null.
nodeIdstringThe node id of the diagram's graphic frame.
nodesreadonly DiagramNodeState[]The content nodes of the data model, in outline order: each node, then its children.
reason?stringWhy the shapes cannot be added or deleted, as a translation key, when `structure` is false.
structurebooleanWhether `addDiagramShape` and `deleteDiagramShape` can change this diagram: its saved drawing reads as a line of blocks that the editor can lay out again.

SelectedEquationStateinterfaceSource ↗

The selected equation: one text box with one equation is selected.

interface SelectedEquationState
MemberTypeSummary
linearstring | nullThe linear form of the equation, for Edit Equation. Null when the equation has a construct, run property, or character that the linear form does not cover: then only its box, its place, and its paragraph can change.
nodeIdstringThe node id of the equation (`a14:m`), for `setEquation`.

SelectedImageStateinterfaceSource ↗

The selected pictures, as the picture controls show them: the values are the first picture's.

interface SelectedImageState
MemberTypeSummary
brightnessnumberBrightness from −1 to 1 (`a:lum/@bright`); 0 is none.
canCropbooleanWhether the picture can be cropped: false with `a:picLocks/@noCrop`, as DOCX Editor's `canCrop`.
canResizebooleanWhether `setImageProperties` and Reset Picture & Size can change the size: false with `a:picLocks/@noResize`, as DOCX Editor's `canResize`.
canRotatebooleanWhether `setImageProperties` can change the rotation: false with `a:picLocks/@noRot`.
contrastnumberContrast from −1 to 1 (`a:lum/@contrast`); 0 is none.
countnumberHow many pictures are selected. Crop, Change Picture, Format Picture, and Alt Text take one.
cropImageCropPercentThe crop of each edge in percent of the image (`a:srcRect`).
croppingbooleanCrop mode is on: the crop handles show.
heightEmunumberThe height on the slide, in EMU, as `setImageProperties` takes it.
lockAspectbooleanThe value of the Lock Aspect Ratio check box (`a:picLocks/@noChangeAspect`): the Format Picture default. Unlike DOCX Editor's `locks.changeAspect`, the engine does not enforce it, and the dialog does not save the box.
nodeIdstringThe first selected picture.
recolorImageRecolor | 'other'The Recolor preset the picture matches, or `other` for another color effect.
rotationDegreesnumberThe rotation in degrees, clockwise.
shapestringThe preset the picture is cropped to (`rect` for none), or `custom` (`a:custGeom`); the value `cropToShape` takes as `preset`.
style?ImageStyleIdThe picture style the picture matches, if any.
transparencynumberTransparency from 0 (opaque) to 1 (`a:alphaModFix`, 1 − amount).
widthEmunumberThe width on the slide, in EMU, as `setImageProperties` takes it.

SelectionFormatinterfaceSource ↗

Formatting at the selection, for toolbar state.

interface SelectionFormat
MemberTypeSummary
align?TextAlign
boldboolean
bulletFormat?BulletFormatRead | nullThe bullet format of the selected paragraphs: null when they have no list, absent when they differ (so no gallery row is checked).
bulletFormatMixed?BulletFormatMixedWhat the selected paragraphs share, when `bulletFormat` is absent because they differ.
bulletsboolean
color?string
columns?TextColumnsThe text columns of the selected shapes with text; absent when they differ.
font?FontFormatReadThe selected text, for the Font dialog and the character spacing menu.
fontFamily?stringThe family the text is drawn in; a theme font reads as the theme's family name.
fontFamilyTheme?'major' | 'minor'The theme font the family comes from: `major` for `+mj-lt` (headings), `minor` for `+mn-lt` (body). Absent when the text names a literal family. ECMA-376 Part 1, 20.1.4.1.17 `latin`.
fontSize?number
italicboolean
numberingboolean
paragraph?ParagraphFormatReadThe selected paragraphs, for the Paragraph dialog and `useParagraphFormat`.
renderedFontSize?number | null`fontSize` as drawn under `a:normAutofit/@fontScale`; null when the shapes differ.
strikeboolean
subscript?booleanThe text is lowered (`baseline` below 0).
superscript?booleanThe text is raised (`baseline` above 0).
textDirection?TextOrientationThe text direction of the selected shapes with text (`vert`); absent when they differ. A file value outside `ST_TextVerticalType` reads as `horizontal`, as layout draws it.
underlineboolean
verticalAlign?VerticalAlignVertical alignment of the text in its shape.

SelectionGeometryinterfaceSource ↗

The selected element's geometry, for the Format panel. EMU and degrees.

interface SelectionGeometry
MemberTypeSummary
altText?AltTextThe element's alt text.
cxnumber
cynumber
effects?ShapeEffectsStateShadow, reflection, glow, and soft edges. Shapes, connectors, and pictures only.
fill?stringSolid fill as `#RRGGBB`, `none`, `gradient`, `pattern`, `picture`, or `other`. Shapes only.
flipH?booleanFlips of the element's transform.
flipV?boolean
gradient?GradientFillThe gradient, when `fill` is `gradient`.
kind'shape' | 'picture' | 'group' | 'connector' | 'graphicFrame'
lineColor?stringOutline color as `#RRGGBB`, `none`, or `other`.
lineDash?string
lineHead?LineEndTypeArrowheads, for lines and connectors.
lineTail?LineEndType
lineWidth?numberOutline width in points.
lockAspectRatio?booleanThe aspect ratio is locked (`noChangeAspect`): a drag of any resize handle on the canvas keeps the ratio.
namestring
nodeIdstringThe element's node id; position and size are in its file coordinates.
pattern?PatternFillThe pattern, when `fill` is `pattern`.
rotnumber
shapeStyle?ShapeStyleChoiceThe Shape Styles gallery cell the shape's `p:style` matches. Shapes only.
textFitting?TextFittingText fitting, for shapes with a text body.
textWarp?TextWarpPresetThe text warp (`a:prstTxWarp`), `textNoShape` for none. Shapes with a text body only.
xnumber
ynumber

ShapeEffectsStateinterfaceSource ↗

The effects of the selected element as the chrome shows them. A shadow or reflection that is not a gallery preset reads other. Sizes are in points; 0 is no effect.

interface ShapeEffectsState
MemberTypeSummary
bevelBevelPreset | 'none'The top bevel preset, or `none`.
blurnumberBlur radius in points; 0 is no blur.
glownumber
glowAccent?Exclude<ShapeStyleColor, 'dk1'>The theme accent of a Glow Variations color (40% opacity), when the glow has one.
glowColor?stringThe glow color as `#RRGGBB`, when there is a glow.
reflectionReflectionPreset | 'none' | 'other'
rotation3dRotation3DPreset | 'none' | 'other'The camera preset when it is a 3-D Rotation gallery choice, `none` for a front camera.
shadowShadowPreset | 'none' | 'other'
softEdgenumber

ShapeStyleChoiceinterfaceSource ↗

One cell of the Shape Styles gallery.

interface ShapeStyleChoice
MemberTypeSummary
colorShapeStyleColor
rowShapeStyleRow

ShapeSummaryinterfaceSource ↗

One element of the current slide, as the selection pane lists it.

interface ShapeSummary
MemberTypeSummary
children?readonly ShapeSummary[]A group's children, top first.
hiddenboolean`p:cNvPr/@hidden`: the element does not draw.
kind'shape' | 'picture' | 'group' | 'connector' | 'graphicFrame'
namestring`p:cNvPr/@name`.
nodeIdstring

SlideAnimationsinterfaceSource ↗

The animations and the transition of the current slide (EditorSnapshot.animations).

interface SlideAnimations
MemberTypeSummary
editablebooleanWhether `addAnimation` and the effect commands can edit this slide. A slide whose timing is in markup-compatibility content (`mc:AlternateContent`) or whose main sequence has a structure the commands do not write is read-only.
effectsreadonly AnimationEffect[]The effects, main sequence first, in the order the slide plays them.
transitionSlideTransitionState

SlideBackgroundStateinterfaceSource ↗

The current slide's background, as the chrome shows it.

interface SlideBackgroundState
MemberTypeSummary
color?string
gradient?GradientFill
inheritedbooleanTrue when the background comes from the layout or master, not the slide.
kind'solid' | 'gradient' | 'pattern' | 'picture' | 'none' | 'other'`none` is white; `other` is a fill the chrome does not edit.
pattern?PatternFill
tile?booleanTrue for a picture that tiles at its own size instead of stretching over the slide.

SlideCommentinterfaceSource ↗

One comment or reply. Its text and author come from the file: show them as text.

interface SlideComment
MemberTypeSummary
authorstringThe author's display name. Empty when the file names no author for the comment.
date?stringThe date as the file stores it (ISO 8601), or absent.
idstringThe id that the comment commands take. When the slide repeats the comment's GUID, or a legacy comment's author and index, a delete of another comment can change it, and a twin (see `identity`) can take the id of a deleted one. Send `expect` with a command, so the editor refuses it when the comment at the id is not the one you showed.
identitystringA token that names the comment in this editor's snapshots. Key UI state, such as an open field, by it; pass `id` to the commands. Once shown, an identity never names another comment, also after the slide changes and comes back, or the editor opens another deck.
initialsstringThe author's initials. Empty when the file has none.
textstringThe text, with one line feed between paragraphs.
textEditablebooleanWhether `editComment` can replace the text of this comment in a deck open for editing. False for a body that holds more than plain text, such as a mention.

SlideLayoutSummaryinterfaceSource ↗

One slide layout of the deck, as the Layout and New Slide galleries list it.

interface SlideLayoutSummary
MemberTypeSummary
idstringThe layout's identity in the open document.
masterIdstringThe slide master the layout belongs to; galleries group layouts by master.
masterNamestringThe master's name, as the gallery's group header shows it: the master's own name, or the name of its theme (`a:theme/@name`).
namestringThe layout's name (`p:cSld/@name`, for example "Title and Content").
typeSlideLayoutKind`p:sldLayout/@type`.

SlideSectioninterfaceSource ↗

One section of the slide list (p14:section).

interface SlideSection
MemberTypeSummary
firstSlidenumberThe index of its first slide; for an empty section, the index its slides would take.
idstringThe section's identity: its GUID in the file.
namestring
slideCountnumber

SlideSummaryinterfaceSource ↗

One slide in the rail.

interface SlideSummary
MemberTypeSummary
hiddenboolean
idstringThe slide's identity in the open document: it stays the same when slides move, and a deleted slide's id is never given to another slide.
indexnumber
keystringChanges whenever the slide's rendering may change, for thumbnail caching.
layoutId?stringThe slide's layout (`SlideLayoutSummary.id`); absent when the slide names none.
masterId?stringIn the slide master view, the master of a layout (its `id`).
name?stringIn the slide master view, the template's name (`p:cSld/@name`).
pending?trueThe slide is still opening (`EditorSnapshot.pendingSlides`): its thumbnail shows a placeholder until it is ready. Absent once it is.
template?'master' | 'layout'In the slide master view, the template this entry shows: a slide master, or one of its slide layouts. Absent for a slide.
usedBy?numberIn the slide master view, how many slides use the template: the slides on a layout, or on any layout of a master.

SlideTransitionStateinterfaceSource ↗

The transition of a slide (p:transition).

interface SlideTransitionState
MemberTypeSummary
advanceAfterMsnumber | nullThe time after which the slide moves on by itself (`advTm`), or null.
advanceOnClickbooleanWhether a click moves to the next slide (`advClick`).
durationMsnumberHow long it plays, in milliseconds (`p14:dur`, else the speed `spd`).
kindTransitionKind | 'none' | 'other'The kind, `none` with no effect, or `other` for a kind that `setTransition` does not write.

TableBorderPeninterfaceSource ↗

The border pen: the line the Borders menu draws, and the target it last drew. A pen color, style, or weight pick arms the pen and writes nothing. A border target pick draws the pen there; after it, a pen pick redraws that target with the new pen, as DOCX Editor's table chrome draft does, until No Border.

interface TableBorderPen
MemberTypeSummary
drawnbooleanWhether a pen pick redraws `target`: true after a border target pick, until No Border.
specTableBorderSpecThe line the pen draws.
targetTableBorderEdgeTargetThe target the pen last drew (All Borders until the first pick).

TableBorderSpecinterfaceSource ↗

A cell border: color, width in points, and dash. DOCX Editor's spec counts eighths of a point and names a WordprocessingML border style; a DrawingML line (a:lnL) has a width and a preset dash, so the fields follow setLineWidth and setLineDash (and Office.js BorderProperties.weight).

interface TableBorderSpec
MemberTypeSummary
colorColorChoiceThe line color.
dash?LineDashThe preset dash; solid when absent.
widthnumberThe line width in points (at most 1,584, `ST_LineWidth`).

TableCellAddressinterfaceSource ↗

A table cell by its row and column, zero-based: the shape of the cell that DOCX Editor's getSelectedTable() returns. A merged cell is addressed by its top-left grid position.

interface TableCellAddress
MemberTypeSummary
columnnumberThe grid column, zero-based.
rownumberThe row, zero-based.

TableContextinterfaceSource ↗

The table of the selection, for the Table Design and Table Layout chrome: DOCX Editor's TableContext (rows, columns, rowIndex, columnIndex), with the selected cell range that a slide table selection adds.

interface TableContext
MemberTypeSummary
cellFill?stringThe first selected cell's fill as drawn (its own or the style's): `#RRGGBB`, `none`, `gradient`, or `other`, as `SelectionGeometry.fill`.
columnIndexnumberThe column of the caret, or of the focus cell of a cell range (0 for a selected table).
columnsnumberThe number of grid columns (`a:gridCol`).
columnWidthnumberThe first selected grid column's width, EMU.
margins{ readonly left: number; readonly right: number; readonly top: number; readonly bottom: number; }The first selected cell's margins, EMU.
nodeIdstringThe table's `p:graphicFrame`.
optionsreadonly TableStyleOption[]The style options that are on.
rowHeightnumberThe first selected row's laid-out height, EMU.
rowIndexnumberThe row of the caret, or of the focus cell of a cell range (0 for a selected table).
rowsnumberThe number of rows (`a:tr`).
selectedColumns{ readonly from: number; readonly to: number; }The selected grid columns, first to last, inclusive.
selectedRows{ readonly from: number; readonly to: number; }The selected rows and columns, first to last, inclusive: the shape of DOCX Editor's `getTableCellSelection()` range (`from`, `to`).
styleId?stringThe table style id, when the table names one.

TableStyleChoiceinterfaceSource ↗

A table style the Table Styles picker offers. A deck style carries its styleName; the built-in default is builtIn with no name, so the chrome names it in the user's language.

interface TableStyleChoice
MemberTypeSummary
builtIn?trueThe editor's own Medium Style 2 - Accent 1 (no name): the chrome shows its label.
idstringThe style GUID, `{…}`, as `a:tableStyleId` holds it.
namestringThe style's `styleName`, which can be empty.

TextColumnsinterfaceSource ↗

Text columns of a shape.

interface TextColumns
MemberTypeSummary
countnumber1 to 16.
gapEmunumberThe gap between columns, EMU (DOCX Editor: `gapTwips`).

TextPointinterfaceSource ↗

A caret position: paragraph index and UTF-16 offset in the paragraph.

interface TextPoint
MemberTypeSummary
affinity?CaretAffinityWhere the caret shows when the offset has two places on a line that mixes directions: `'upstream'` after the character before the offset, `'downstream'` (the default) before the character at the offset. The caret, the arrow keys, and a click set it; edits and collaboration read only the offset.
offsetnumber
paragraphnumber

ThemeColorChoiceinterfaceSource ↗

A theme color pick. It is written as a:schemeClr, so the color follows the theme when the theme changes. shift is the luminance variant of [ThemeSwatch](ThemeSwatch).

interface ThemeColorChoice
MemberTypeSummary
shift?number0 or absent for the theme color; −99 to 99 for "Darker n%" or "Lighter n%".
themeThemeColorSlot

ThemeSwatchinterfaceSource ↗

One swatch of the theme color grid.

interface ThemeSwatch
MemberTypeSummary
colorstringThe color as a slide renders it, `#RRGGBB`.
scheme?stringThe theme color the slot names through the slide's color map (`p:clrMap`): `lt1` for `bg1` with the default map, `dk1` on a dark map. A `p:style` reference to `dk1` or `lt1` names this theme color directly, not through the map.
shiftnumberThe luminance variant: 0 is the theme color itself, a positive number is "Lighter n%" (`a:lumMod` 100−n, `a:lumOff` n), and a negative number is "Darker n%" (`a:lumMod` 100−n).
slotThemeColorSlot

TransformIteminterfaceSource ↗

One element's new box, in its file coordinates (its parent's child space).

interface TransformItem
MemberTypeSummary
connector?ConnectorRouteA connector's route and glued ends (`p:cxnSp` only). Absent keeps them.
cxnumber
cynumber
flipH?booleanFlips; absent keeps the current ones. A line's direction is its flips.
flipV?boolean
nodeIdstring
rotnumberRotation in degrees, clockwise. The file stores it in 60,000ths of a degree.
xnumber
ynumber

Type aliases (79)

AnimationClasstypeSource ↗

The class of an effect (p:cTn/@presetClass): entrance (entr), emphasis (emph), exit (exit), motion path (path), or another class, such as a media call.

type AnimationClass = 'entrance' | 'emphasis' | 'exit' | 'motionPath' | 'other';

AnimationCommandtypeSource ↗

The animation commands.

type AnimationCommand = 
/**
 * Add an effect to each selected shape, at the end of the main sequence. A shape in a group
 * animates as its whole group. `trigger` defaults to `onClick`.
 */
{
    readonly type: 'addAnimation';
    readonly preset: AnimationPreset;
    readonly trigger?: AnimationTrigger;
}
/** Remove the effect `effectId` (`AnimationEffect.id`) of the current slide. */
 | {
    readonly type: 'removeAnimation';
    readonly effectId: string;
}
/** Move the effect `effectId` to position `to` of the main sequence (0-based). */
 | {
    readonly type: 'moveAnimation';
    readonly effectId: string;
    readonly to: number;
}
/**
 * Change when the effect `effectId` starts and how long it plays. Absent fields stay. Delay is
 * 0 to 3,600,000 ms; duration is 10 to 59,000 ms and is refused for an instant effect.
 */
 | {
    readonly type: 'setAnimationTiming';
    readonly effectId: string;
    readonly trigger?: AnimationTrigger;
    readonly delayMs?: number;
    readonly durationMs?: number;
}
/**
 * Set the transition of the current slide, or of the slides `indices`. Absent fields keep
 * their values. `kind: 'none'` removes the effect. Duration is 10 to 59,000 ms;
 * `advanceAfterMs` is 0 to 3,600,000 ms, or null to clear it.
 */
 | {
    readonly type: 'setTransition';
    readonly kind?: TransitionKind | 'none';
    readonly durationMs?: number;
    readonly advanceOnClick?: boolean;
    readonly advanceAfterMs?: number | null;
    readonly indices?: readonly number[];
}
/**
 * Show the order number of each effect on its shape on the canvas. A view setting, not an
 * edit: no undo step, never saved.
 */
 | {
    readonly type: 'showAnimationOrder';
    readonly show: boolean;
};

AnimationPresettypeSource ↗

The effects that addAnimation writes. Entrance: appear, fade, flyIn, wipe, zoom. Emphasis: pulse, spin, growShrink. Exit: disappear, fadeOut, flyOut, wipeOut, zoomOut.

type AnimationPreset = 'appear' | 'fade' | 'flyIn' | 'wipe' | 'zoom' | 'pulse' | 'spin' | 'growShrink' | 'disappear' | 'fadeOut' | 'flyOut' | 'wipeOut' | 'zoomOut';

AnimationTriggertypeSource ↗

When an effect starts (p:cTn/@nodeType): on a click (clickEffect), with the effect before it (withEffect), or after the effect before it (afterEffect).

type AnimationTrigger = 'onClick' | 'withPrevious' | 'afterPrevious';

AutonumberSchemetypeSource ↗

Numbering schemes the editor sets: the ST_TextAutonumberScheme values that layout numbers exactly. Arabic, Roman, and Latin letters with a period, a right parenthesis, or both parentheses, and Arabic numbers with nothing (arabicPlain; the schema has no other plain scheme).

type AutonumberScheme = `${'arabic' | 'romanUc' | 'romanLc' | 'alphaUc' | 'alphaLc'}${'Period' | 'ParenR' | 'ParenBoth'}` | 'arabicPlain';

BevelPresettypeSource ↗

The presets of the Bevel gallery: the top bevel presets of ST_BevelPresetType (ECMA-376 Part 1, 20.1.10.9), each 6 pt wide and 6 pt high.

type BevelPreset = 'circle' | 'relaxedInset' | 'cross' | 'coolSlant' | 'angle' | 'softRound' | 'convex' | 'slope' | 'divot' | 'riblet' | 'hardEdge' | 'artDeco';

BulletFormattypeSource ↗

A bullet format: a bullet character in a font (a:buChar, a:buFont), or a numbering scheme (a:buAutoNum), with its size and color. An omitted field keeps each paragraph's value, so a command can change only the size, the color, or the start number. With no kind, only the size and color change, on the paragraphs that show a list, and each keeps its own bullet or number. A paragraph with no list takes the bullet its placeholder inherits, or the first gallery item; one with the other kind takes the first gallery item for an omitted character or scheme. null makes the bullet follow the text (a:buSzTx, a:buClrTx), also over a list style that sets a value.

type BulletFormat = {
    readonly kind: 'bullet';
    readonly char?: string;
    readonly font?: string;
    readonly sizePercent?: number | null;
    readonly color?: ColorChoice | null;
} | {
    readonly kind: 'number';
    readonly scheme?: AutonumberScheme;
    readonly startAt?: number;
    readonly sizePercent?: number | null;
    readonly color?: ColorChoice | null;
} | {
    readonly kind: 'picture';
    readonly picture: Uint8Array;
    readonly sizePercent?: number | null;
} | {
    readonly kind?: undefined;
    readonly sizePercent?: number | null;
    readonly color?: ColorChoice | null;
};

BulletFormatReadtypeSource ↗

The bullet format of the selected paragraphs, as the gallery and dialog show it: resolved values.

type BulletFormatRead = {
    readonly kind: 'bullet';
    readonly char: string;
    readonly font?: string;
    readonly sizePercent: number;
    readonly color?: string;
} | {
    readonly kind: 'number';
    readonly scheme: string;
    readonly startAt: number;
    readonly sizePercent: number;
    readonly color?: string;
} | {
    readonly kind: 'picture';
    readonly sizePercent: number;
};

CanResulttypeSource ↗

Whether a command can run now; when it cannot, the i18n key of the reason.

type CanResult = {
    readonly ok: true;
} | {
    readonly ok: false;
    readonly reason: string;
};

CapsStyletypeSource ↗

Capitals: none, small caps, or all caps (ST_TextCapsType).

type CapsStyle = 'none' | 'small' | 'all';

CaretAffinitytypeSource ↗

The side of a direction boundary a caret shows on (TextPoint.affinity).

type CaretAffinity = 'downstream' | 'upstream';

ChartCommandtypeSource ↗

The chart commands.

type ChartCommand = {
    readonly type: 'setChartData';
    readonly nodeId?: string;
    readonly data: Omit<ChartData, 'workbook'>;
} | {
    readonly type: 'insertChart';
    readonly chartType: ChartType;
    readonly data?: NewChartData;
} | {
    readonly type: 'setChartType';
    readonly nodeId?: string;
    readonly chartType: ChartType;
} | {
    readonly type: 'setChartFormat';
    readonly nodeId?: string;
    readonly format: ChartFormatChange;
} | {
    readonly type: 'setChartColor';
    readonly nodeId?: string;
    readonly index: number;
    readonly color: ColorChoice | null;
};

ChartDataKindtypeSource ↗

How a chart plots its data. category: each series has one value per category (bar, column, line, area, pie, doughnut, and radar charts). xy: each series has one Y value per X value (scatter charts); the categories are the X values.

type ChartDataKind = 'category' | 'xy';

ChartDataReadtypeSource ↗

The data of a chart, or why it cannot be edited. reason is a translation key, such as errors.chartData.unsupportedType.

type ChartDataRead = {
    readonly ok: true;
    readonly data: ChartData;
} | {
    readonly ok: false;
    readonly reason: string;
};

ChartFormatReadtypeSource ↗

The type and elements of a chart, or why the editor does not edit them. reason is a translation key, such as errors.chartData.combination.

type ChartFormatRead = {
    readonly ok: true;
    readonly format: ChartFormat;
} | {
    readonly ok: false;
    readonly reason: string;
};

ChartLegendPositiontypeSource ↗

Where a chart shows its legend (c:legendPos), or none for no legend.

type ChartLegendPosition = 'none' | 'top' | 'bottom' | 'left' | 'right';

ChartTypetypeSource ↗

A chart type that insertChart and setChartType write (ECMA-376 Part 1, 21.2.2): the plot element, and its direction, grouping, or style. Column and bar charts are c:barChart with vertical or horizontal bars; lineMarkers shows a marker at each point; scatter shows markers only, and scatterLines joins them with lines.

type ChartType = 'columnClustered' | 'columnStacked' | 'columnPercentStacked' | 'barClustered' | 'barStacked' | 'barPercentStacked' | 'line' | 'lineMarkers' | 'area' | 'areaStacked' | 'areaPercentStacked' | 'pie' | 'doughnut' | 'radar' | 'scatter' | 'scatterLines';

ChartWorkbookStatetypeSource ↗

Where the chart's workbook is, and what an edit does to it. embedded: an edit writes the new values into the embedded workbook too. kept: the embedded workbook has a structure that the editor does not change, so it keeps its old values. external: the workbook is a linked file, which the editor never opens; an edit turns off its automatic update. none: the chart has no workbook.

type ChartWorkbookState = 'embedded' | 'kept' | 'external' | 'none';

ColorChoicetypeSource ↗

A color the chrome writes: #RRGGBB (a:srgbClr) or a theme color (a:schemeClr).

type ColorChoice = string | ThemeColorChoice;

CommandResulttypeSource ↗

The outcome of a command. A refusal with noop means the command had nothing to do (nothing to undo, nothing selected): nothing changed, and nothing went wrong.

type CommandResult = {
    readonly ok: true;
} | {
    readonly ok: false;
    readonly reason: string;
    readonly detail?: string;
    readonly noop?: boolean;
};

CommentAnchortypeSource ↗

Where a thread points on its slide. text: a range of an element's text, by its node id. shape: an element of the slide, by its node id. point: a place on the slide, in EMU. slide: the slide as a whole, with no place.

A text thread follows its text through edits. When an edit removes all of its text, the thread points at the element (shape). Only the threaded format holds text anchors.

type CommentAnchor = {
    readonly kind: 'slide';
} | {
    readonly kind: 'point';
    readonly x: number;
    readonly y: number;
} | {
    readonly kind: 'shape';
    readonly nodeId: string;
} | ({
    readonly kind: 'text';
    readonly nodeId: string;
} & CommentTextRange);

CommentCommandtypeSource ↗

The comment commands. Text is 1 to 10,000 characters; a line feed starts a new paragraph. The commands on an existing comment take expect, what the host showed of that comment. A new comment uses the threaded format, unless the deck has only legacy comments.

type CommentCommand = 
/**
 * Add a thread on the current slide. With `nodeId`, it points at that element, and with
 * `nodeId` and `range`, at that range of its text. Without `nodeId`, it points at the
 * selected text of a shape, else at the selected element when one element is selected, else
 * at the slide. A deck with only legacy comments has no text anchors: the thread then points
 * at the element.
 */
({
    readonly type: 'addComment';
    readonly text: string;
    readonly nodeId?: string;
    readonly range?: CommentTextRange;
} & CommentAuthorInput)
/** Reply to the thread of `commentId` (a thread or one of its replies). */
 | ({
    readonly type: 'replyToComment';
    readonly commentId: string;
    readonly text: string;
    readonly expect?: CommentExpect;
} & CommentAuthorInput)
/** Replace the text of a comment or a reply. */
 | {
    readonly type: 'editComment';
    readonly commentId: string;
    readonly text: string;
    readonly expect?: CommentExpect;
}
/** Delete a reply, or a whole thread when `commentId` is a thread. */
 | {
    readonly type: 'deleteComment';
    readonly commentId: string;
    readonly expect?: CommentExpect;
}
/** Mark a thread resolved. Refused for the legacy format (`disabled.commentNoStatus`). */
 | {
    readonly type: 'resolveComment';
    readonly commentId: string;
    readonly expect?: CommentExpect;
}
/** Mark a resolved thread active again. */
 | {
    readonly type: 'reopenComment';
    readonly commentId: string;
    readonly expect?: CommentExpect;
};

CommentFormattypeSource ↗

The file format of a comment thread.

type CommentFormat = 'modern' | 'legacy';

CommentMarkerStyletypeSource ↗

How a comment marker on the slide looks. icon: the comment icon. initials: a badge with the thread author's initials in the author's color, the reply count, and a check mark when the thread is resolved.

type CommentMarkerStyle = 'initials' | 'icon';

DiagramCommandtypeSource ↗

The diagram commands.

type DiagramCommand = {
    readonly type: 'addDiagramShape';
    readonly position: DiagramShapePosition;
    readonly nodeId?: string;
    readonly node?: string;
} | {
    readonly type: 'deleteDiagramShape';
    readonly nodeId?: string;
    readonly node?: string;
} | {
    readonly type: 'setDiagramText';
    readonly node: string;
    readonly text: string;
    readonly nodeId?: string;
};

DiagramShapePositiontypeSource ↗

Where addDiagramShape puts the new shape: after or before the target node at its level, or below it as its last child.

type DiagramShapePosition = 'after' | 'before' | 'below';

DocumentOpenFailureReasontypeSource ↗

What a person can do about a file that did not open, after DOCX Editor's reason groups: damaged (the archive or its XML is broken, or the file is not a ZIP package at all), not-pptx (the package holds no presentation, or the file is empty), too-large (the file crosses a size, count, or depth limit), blocked (the file uses XML features that the editor refuses for security), and unknown.

type DocumentOpenFailureReason = 'damaged' | 'not-pptx' | 'too-large' | 'blocked' | 'unknown';

EditorCommandtypeSource ↗

Every editing command. Each compiles to store ops or is refused with a reason.

type EditorCommand = CommentCommand | {
    readonly type: 'undo';
} | {
    readonly type: 'redo';
} | {
    readonly type: 'toggleBold';
} | {
    readonly type: 'toggleItalic';
} | {
    readonly type: 'toggleUnderline';
} | {
    readonly type: 'toggleStrike';
} | {
    readonly type: 'setFontSize';
    readonly points: number;
} | {
    readonly type: 'stepFontSize';
    readonly direction: 1 | -1;
} | {
    readonly type: 'setFontFamily';
    readonly family: string;
}
/** Text color: a color choice, or null for the inherited color. */
 | {
    readonly type: 'setTextColor';
    readonly color: ColorChoice | null;
} | {
    readonly type: 'setHighlight';
    readonly color: ColorChoice | null;
} | {
    readonly type: 'setAlign';
    readonly align: TextAlign;
} | {
    readonly type: 'toggleBullets';
} | {
    readonly type: 'toggleNumbering';
} | {
    readonly type: 'indent';
    readonly direction: 1 | -1;
}
/**
 * Backspace at the start of a list item: remove the bullet or number of every list item the
 * selection touches. The item keeps its level, and its text moves to where the bullet was.
 */
 | {
    readonly type: 'removeBullet';
} | {
    readonly type: 'setLineSpacing';
    readonly multiple: number;
} | {
    readonly type: 'insertTextBox';
} | {
    readonly type: 'insertShape';
    readonly preset: string;
} | {
    readonly type: 'insertImage';
    readonly bytes: Uint8Array;
    readonly mime: string;
    readonly width: number;
    readonly height: number;
} | {
    readonly type: 'order';
    readonly move: OrderMove;
} | {
    readonly type: 'alignObjects';
    readonly align: ObjectAlign;
} | {
    readonly type: 'duplicate';
} | {
    readonly type: 'delete';
}
/**
 * Home > New Slide: add a slide after the current one. `layoutId` (`SlideLayoutSummary.id`)
 * picks its layout. Without it, the slide takes the current slide's layout, or Title and
 * Content after a title slide.
 */
 | {
    readonly type: 'addSlide';
    readonly layoutId?: string;
} | {
    readonly type: 'duplicateSlide';
    readonly index: number;
}
/**
 * Paste copied slides after the current slide. `file` is a presentation (`.pptx` bytes),
 * read with the limits of any opened file, and `slides` are its slide indexes in order. The
 * slides go on this presentation's layouts of the same type (destination theme).
 */
 | {
    readonly type: 'pasteSlides';
    readonly file: Uint8Array;
    readonly slides: readonly number[];
} | {
    readonly type: 'deleteSlide';
    readonly index: number;
}
/**
 * Move slide `from` to position `to`. It joins the section of the slide before it, or
 * `section`, by the one rule of `moveSlides`. Behavior change: a slide moved up to the first
 * place of a section joined that section before; now it joins the section before it. Pass
 * that section's id as `section` to get the earlier result.
 */
 | {
    readonly type: 'moveSlide';
    readonly from: number;
    readonly to: number;
    readonly section?: string;
}
/**
 * Insert > Slide numbers: show or hide the slide number, through the slide-number placeholder
 * of each slide's layout or master. Takes the `HeaderFooterTargets` options; by default, every
 * slide. Refused, also to hide, when no target slide can have a slide number.
 */
 | ({
    readonly type: 'setSlideNumbers';
    readonly show: boolean;
} & HeaderFooterTargets)
/**
 * Insert > Footer: show or hide the footer, through the footer placeholder (`p:ph type="ftr"`)
 * of each slide's layout or master. With `text`, every slide that shows the footer shows
 * `text`. Without `text`, a slide keeps its footer text, and a slide without a footer takes the
 * text that the other slides show. A slide that has a footer keeps its box and format. Refused
 * when no target slide's layout or master has a footer placeholder, for blank or multi-line
 * text, and without `text` when no slide shows a footer (`disabled.noFooterText`). Text is one
 * line of 1,024 characters at most.
 */
 | ({
    readonly type: 'setFooter';
    readonly show: boolean;
    readonly text?: string;
} & HeaderFooterTargets)
/**
 * Insert > Date and time: show or hide the date, through the date placeholder
 * (`p:ph type="dt"`) of each slide's layout or master. With `text`, every slide that shows the
 * date shows `text`: a `datetime1` field, which a presentation application can update when it
 * opens the file, or fixed text with `fixed: true`. Without `text`, a slide keeps its date, and
 * a slide without one takes the date that the other slides show, else today's date
 * (month/day/year) as a field; with `fixed: true`, the dates become fixed text. A slide that has
 * a date keeps its box and format. Refused when no target slide's layout or master has a date
 * placeholder, and for blank or multi-line text.
 */
 | ({
    readonly type: 'setDateTime';
    readonly show: boolean;
    readonly text?: string;
    readonly fixed?: boolean;
} & HeaderFooterTargets)
/** Delete the selected slides (`EditorSnapshot.selectedSlides`) as one undo step. */
 | {
    readonly type: 'deleteSlides';
    readonly indices: readonly number[];
}
/** Duplicate the selected slides; the copies follow the last one, in order. */
 | {
    readonly type: 'duplicateSlides';
    readonly indices: readonly number[];
}
/**
 * Move the selected slides as one block, in order, so the block starts at `to`, counted
 * among the slides that do not move. The block joins the section of the slide before it.
 * `section` (a `SlideSection.id`) puts it into that section instead, for a drop below a
 * section header or a step across one in the slide pane: the section must be the
 * section of the slide before the block, of the slide after it, or an empty section between
 * them; otherwise the command is refused. With `section`, a block that stays in place only
 * changes its section.
 */
 | {
    readonly type: 'moveSlides';
    readonly indices: readonly number[];
    readonly to: number;
    readonly section?: string;
}
/**
 * Speaker notes: write `text` as slide `index`'s notes. With `paragraphs` (the same text as
 * formatted runs, as a notes field shows it), each character also takes the bold, italic,
 * underline, and strikethrough it has there, in the same undo step.
 */
 | {
    readonly type: 'setNotes';
    readonly index: number;
    readonly text: string;
    readonly paragraphs?: readonly NotesParagraph[];
}
/**
 * Speaker notes: bold, italic, underline, or strikethrough on the plain-text range
 * `[start, end)` of slide `index`'s notes (offsets as in `EditorSnapshot.notes`), as one undo
 * step. `value` absent toggles: on, unless the whole range already has the format.
 */
 | {
    readonly type: 'formatNotes';
    readonly index: number;
    readonly start: number;
    readonly end: number;
    readonly format: NotesFormat;
    readonly value?: boolean;
}
/**
 * Home > Section > Add Section: a section that starts at slide `index` (the current slide when
 * absent) and takes the rest of the section it splits. `name` defaults to the translated
 * "Untitled Section" (`sections.untitled`). In a deck without sections, the slides before it go
 * into a first section named `defaultSectionName`, by default "Default Section" (`sections.default`).
 */
 | {
    readonly type: 'addSection';
    readonly name?: string;
    readonly index?: number;
    readonly defaultSectionName?: string;
}
/** Home > Section > Remove All Sections: the slides stay, the section list goes. */
 | {
    readonly type: 'removeAllSections';
}
/** Home > Section > Rename Section. */
 | {
    readonly type: 'renameSection';
    readonly sectionId: string;
    readonly name: string;
}
/**
 * Remove Section: its slides join the section before it (after it, for the first). With
 * `withSlides`, Remove Section & Slides deletes them. The last section removes the list.
 * `sectionId` absent: the section of the current slide.
 */
 | {
    readonly type: 'removeSection';
    readonly sectionId?: string;
    readonly withSlides?: boolean;
}
/** Move Section Up (`-1`) or Down (`1`), with its slides. */
 | {
    readonly type: 'moveSection';
    readonly sectionId: string;
    readonly direction: -1 | 1;
}
/**
 * Home > Layout: put the slides on a layout of the deck (`SlideLayoutSummary.id`) as one undo
 * step. Placeholders re-map by type and index, and their content is kept.
 * `indices` absent: the selected slides (`EditorSnapshot.selectedSlides`).
 */
 | {
    readonly type: 'applyLayout';
    readonly layoutId: string;
    readonly indices?: readonly number[];
}
/**
 * Home > Reset: re-apply each slide's layout. Text placeholders go back to the layout's
 * position, size, and formatting, and deleted placeholders come back; their text stays.
 * Pictures, tables, and charts in placeholders keep their own box. `indices` absent: the
 * selected slides.
 */
 | {
    readonly type: 'resetSlides';
    readonly indices?: readonly number[];
}
/**
 * Slide Show > Hide Slide: hide the slides (`p:sld/@show="0"`) or show them again. `indices`
 * absent: the selected slides. `hidden` absent: the toggle, which hides them unless every one
 * of them is hidden already.
 */
 | {
    readonly type: 'setSlidesHidden';
    readonly indices?: readonly number[];
    readonly hidden?: boolean;
}
/** View > Smart guides: drags snap to and show alignment guides. A view setting, not an edit. */
 | {
    readonly type: 'toggleSmartGuides';
}
/**
 * Set the table border pen (`snapshot.tableBorderPen`) that the Borders menu draws with. A
 * setting of this editor, not an edit: no undo step, never saved.
 */
 | {
    readonly type: 'setTableBorderPen';
    readonly pen: TableBorderPen;
}
/** View > Normal or Slide Sorter. A view setting, not an edit: no undo step, never saved. */
 | {
    readonly type: 'setPresentationView';
    readonly view: PresentationView;
}
/**
 * Collapse or expand sections in the slide pane and the slide sorter (Collapse All, Expand All
 * when `sectionIds` is absent). A view setting, not an edit: no undo step, never saved.
 */
 | {
    readonly type: 'setSectionsCollapsed';
    readonly collapsed: boolean;
    readonly sectionIds?: readonly string[];
}
/**
 * Replace one find match with `replacement`. The new text takes the formatting of the first
 * replaced character. Refused when the matched text is no longer there.
 */
 | {
    readonly type: 'replace';
    readonly match: FindMatch;
    readonly replacement: string;
}
/** Replace every match of `query` in the deck (slides, tables, notes) as one undo step. */
 | {
    readonly type: 'replaceAll';
    readonly query: string;
    readonly replacement: string;
    readonly options?: FindOptions;
} | {
    readonly type: 'setTransform';
    readonly nodeId: string;
    readonly x: number;
    readonly y: number;
    readonly cx: number;
    readonly cy: number;
    readonly rot: number;
} | {
    readonly type: 'nudge';
    readonly dx: number;
    readonly dy: number;
}
/** Shape fill: a color choice, or null for no fill. */
 | {
    readonly type: 'setShapeFill';
    readonly color: ColorChoice | null;
}
/** Shape fill: a linear or radial gradient. */
 | {
    readonly type: 'setShapeGradient';
    readonly gradient: GradientFill;
}
/** Outline color: a color choice, or null for no outline. */
 | {
    readonly type: 'setLineColor';
    readonly color: ColorChoice | null;
}
/** Outline width in points. */
 | {
    readonly type: 'setLineWidth';
    readonly points: number;
} | {
    readonly type: 'setLineDash';
    readonly dash: LineDash;
}
/**
 * Link the selected text to a URL (`http`, `https`, `mailto`, `tel`, `ftp`), or to a slide:
 * `#slide-3`, `#next-slide`, `#previous-slide`, `#first-slide`, `#last-slide`. null unlinks.
 */
 | {
    readonly type: 'setLink';
    readonly url: string | null;
}
/** Remove character formatting from the selected text; links stay. */
 | {
    readonly type: 'clearFormatting';
}
/** Vertical alignment of text in its shape (`a:bodyPr/@anchor`). */
 | {
    readonly type: 'setVerticalAlign';
    readonly anchor: VerticalAlign;
}
/** Arrowheads of a line: `head` at its start, `tail` at its end. Absent keeps the current end. */
 | {
    readonly type: 'setLineEnds';
    readonly head?: LineEndType;
    readonly tail?: LineEndType;
}
/**
 * The slide background: a color, a gradient, or a picture; null removes the slide's own
 * background so the layout's shows. `allSlides` applies it to every slide.
 */
 | {
    readonly type: 'setSlideBackground';
    readonly background: SlideBackground | null;
    readonly allSlides?: boolean;
}
/** Slide size in EMU, 1 to 56 in a side; `content: 'scale'` (default) fits the content. */
 | {
    readonly type: 'setSlideSize';
    readonly width: number;
    readonly height: number;
    readonly content?: 'scale' | 'keep';
}
/** Adjust values of one preset shape by guide name, in guide units (see `a:gd`). */
 | {
    readonly type: 'setAdjustments';
    readonly values: Readonly<Record<string, number>>;
}
/** Insert a line, an arrow, or an elbow or curved connector. */
 | {
    readonly type: 'insertLine';
    readonly kind: LineKind;
}
/** Text fitting: none, shrink text on overflow, or resize the shape to fit its text. */
 | {
    readonly type: 'setAutofit';
    readonly mode: TextFitting;
}
/** The selected shapes' text warp, with adjust values by guide name; null removes it. */
 | {
    readonly type: 'setTextWarp';
    readonly preset: TextWarpPreset | null;
    readonly adjust?: Readonly<Record<string, number>>;
} | {
    readonly type: 'setTransforms';
    readonly items: readonly TransformItem[];
} | {
    readonly type: 'group';
} | {
    readonly type: 'ungroup';
} | {
    readonly type: 'paste';
    readonly payload: ClipboardPayload;
}
/**
 * The Format Painter button. A press copies the formatting of the selection and arms the
 * painter for one paint; a second press within the double-click time keeps it on until
 * Escape (`sticky` does that at once); a press while it is on turns it off.
 */
 | {
    readonly type: 'toggleFormatPainter';
    readonly sticky?: boolean;
}
/** Copy the formatting of the selection without arming the painter (Ctrl/Cmd+Shift+C). */
 | {
    readonly type: 'copyFormat';
}
/** Apply the copied formatting to the selection as one undo step (Ctrl/Cmd+Shift+V). */
 | {
    readonly type: 'pasteFormat';
} | TextFormatCommand | PictureCommand | ChartCommand | EquationCommand | DiagramCommand | FillCommand | AnimationCommand
/**
 * Shape Effects: set or remove one effect of the selected shapes, connectors, and pictures.
 * A shape whose effects come from its theme style (`a:effectRef`) gets that style's effects
 * written into it first, so its other effects stay.
 */
 | {
    readonly type: 'setShapeEffect';
    readonly effect: ShapeEffectChoice;
}
/**
 * Shape Styles: apply a theme style of the Shape Styles gallery to the selected shapes. It
 * writes `p:style` and removes the shape's own fill, outline, and effects.
 */
 | {
    readonly type: 'setShapeStyle';
    readonly style: ShapeStyleChoice;
}
/**
 * Distribute the selected elements so the gaps between them are equal. One element centers
 * on the slide; two are refused; three or more keep the outer two in place.
 */
 | {
    readonly type: 'distributeObjects';
    readonly axis: ObjectAxis;
}
/** Flip each selected element about its own center (`a:xfrm/@flipH`, `@flipV`). */
 | {
    readonly type: 'flipObjects';
    readonly axis: ObjectAxis;
}
/** Turn each selected element by `degrees` about its center; 90 is Rotate Right 90°. */
 | {
    readonly type: 'rotateObjects';
    readonly degrees: number;
}
/** Lock or unlock the aspect ratio of the selected elements (`noChangeAspect`). */
 | {
    readonly type: 'setLockAspectRatio';
    readonly lock: boolean;
}
/** Selection pane: show or hide elements of the current slide (`p:cNvPr/@hidden`). */
 | {
    readonly type: 'setShapesVisible';
    readonly nodeIds: readonly string[];
    readonly visible: boolean;
}
/** Selection pane: rename an element of the current slide (`p:cNvPr/@name`). */
 | {
    readonly type: 'renameShape';
    readonly nodeId: string;
    readonly name: string;
} | TableCommand;

EditorCommandTypetypeSource ↗

The command type names.

type EditorCommandType = EditorCommand['type'];

EditorExecOptionstypeSource ↗

Options for one command.

type EditorExecOptions = HistoryGroupOptions;

EditorFontErrorCodetypeSource ↗

Why a font was not admitted.

Distinguished rather than collapsed because the responses differ: overLimit and malformed are the caller's own bytes, while forbidden and hashMismatch mean the source was not what it claimed and the load should not be retried. wasmUnavailable alone is a HOST fault — the shaper's WASM never loaded, diagnostic carries the remedy — surface it as a setup error.

type EditorFontErrorCode = 'initializationFailed' | 'wasmUnavailable' | 'missing' | 'forbidden' | 'overLimit' | 'malformed' | 'hashMismatch' | 'metadataMismatch' | 'fontFaceLoadFailed' | 'unsupportedFaceIndex' | 'missingFont' | 'hashInvalid' | 'fontMismatch' | 'unsupportedFace' | 'loadFailed';

EditorModetypeSource ↗

The editing mode, matching the toolbar's mode pill.

type EditorMode = 'edit' | 'view';

EditorSelectiontypeSource ↗

What is selected.

type EditorSelection = {
    readonly kind: 'none';
} | {
    readonly kind: 'shapes';
    readonly nodeIds: readonly string[];
    readonly group?: string;
} | {
    readonly kind: 'text';
    readonly nodeId: string;
    readonly anchor: TextPoint;
    readonly focus: TextPoint;
    readonly cell?: TableCellAddress;
    readonly diagramNode?: string;
} | {
    readonly kind: 'cells';
    readonly nodeId: string;
    readonly anchor: TableCellAddress;
    readonly focus: TableCellAddress;
};

EquationCommandtypeSource ↗

The equation commands. An equation's math is written from a linear form, a short text syntax: a/b is a fraction, x^2 and x_i are scripts, \sqrt(x) is a square root, \sum_(i=1)^n is a sum, and \alpha is a Greek letter. The equations guide lists the whole syntax.

type EquationCommand = 
/**
 * Insert > Equation: a new text box centered on the slide, with the equation of `linear`.
 * `font` names the font of its math runs; default `Cambria Math`. The text box is selected.
 */
{
    readonly type: 'insertEquation';
    readonly linear: string;
    readonly font?: string;
}
/**
 * Replace the math of an equation (`SelectedEquationState.nodeId`) with the equation of
 * `linear`. The equation keeps its alignment and the font, size, and color of its first run.
 */
 | {
    readonly type: 'setEquation';
    readonly nodeId: string;
    readonly linear: string;
};

FillCommandtypeSource ↗

The fill commands of shapes beyond a color and a gradient.

type FillCommand = 
/** Shape fill: a preset pattern. */
{
    readonly type: 'setShapePattern';
    readonly pattern: PatternFill;
}
/**
 * Shape fill: a PNG, JPEG, or GIF picture, stretched over the shape, or tiled at its own
 * size when `tile` is true. The type comes from the bytes; other bytes are refused.
 */
 | {
    readonly type: 'setShapePicture';
    readonly bytes: Uint8Array;
    readonly mime?: string;
    readonly tile?: boolean;
};

FormatPainterModetypeSource ↗

The format painter: off, armed for one paint (once), or on until Escape or a second press (sticky).

type FormatPainterMode = 'off' | 'once' | 'sticky';

ImageCroptypeSource ↗

A picture crop. rect crops each edge in percent: the image stays in place and the frame changes, as a crop handle does; with keepFrame, the frame stays and the image moves in it. fill and fit keep the frame and crop the image to cover it or to show all of it; aspect crops the image to a width-to-height ratio.

type ImageCrop = ({
    readonly kind: 'rect';
    readonly keepFrame?: boolean;
} & ImageCropPercent) | {
    readonly kind: 'fill';
} | {
    readonly kind: 'fit';
} | {
    readonly kind: 'aspect';
    readonly width: number;
    readonly height: number;
};

ImageRecolortypeSource ↗

The Recolor presets of the Color gallery. accentNDark and accentNLight are the dark and light variations of theme accent N (a:duotone).

type ImageRecolor = 'none' | 'grayscale' | 'sepia' | 'blackWhite25' | 'blackWhite50' | 'blackWhite75' | `accent${1 | 2 | 3 | 4 | 5 | 6}${'Dark' | 'Light'}`;

ImageStyleIdtypeSource ↗

The picture styles the gallery offers, with the gallery's names in camel case.

type ImageStyleId = 'simpleFrameWhite' | 'simpleFrameBlack' | 'softEdgeRectangle' | 'softEdgeOval' | 'reflectedRoundedRectangle';

LineDashtypeSource ↗

Outline dash presets offered by the chrome (a:prstDash values).

type LineDash = 'solid' | 'sysDot' | 'sysDash' | 'dash' | 'dashDot' | 'lgDash' | 'lgDashDot';

LineEndTypetypeSource ↗

Line end (arrowhead) types (a:headEnd/@type, a:tailEnd/@type).

type LineEndType = 'none' | 'triangle' | 'arrow' | 'stealth' | 'oval' | 'diamond';

LineKindtypeSource ↗

Lines the chrome inserts.

type LineKind = 'line' | 'arrow' | 'elbow' | 'curved';

NotesFormattypeSource ↗

Character formats the speaker notes pane sets.

type NotesFormat = 'bold' | 'italic' | 'underline' | 'strike';

ObjectAligntypeSource ↗

Object alignment targets.

type ObjectAlign = 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';

ObjectAxistypeSource ↗

The axis of a flip or a distribute: horizontal acts along x.

type ObjectAxis = 'horizontal' | 'vertical';

OrderMovetypeSource ↗

Z-order moves.

type OrderMove = 'forward' | 'backward' | 'front' | 'back';

ParagraphAlignmenttypeSource ↗

Paragraph alignment as the Paragraph dialog names it (algn: l, ctr, r, just, dist).

type ParagraphAlignment = 'left' | 'center' | 'right' | 'justify' | 'distributed';

PatternPresettypeSource ↗

The 54 preset patterns (ST_PresetPatternVal, ECMA-376 Part 1, 20.1.10.51).

type PatternPreset = 'pct5' | 'pct10' | 'pct20' | 'pct25' | 'pct30' | 'pct40' | 'pct50' | 'pct60' | 'pct70' | 'pct75' | 'pct80' | 'pct90' | 'horz' | 'vert' | 'ltHorz' | 'ltVert' | 'dkHorz' | 'dkVert' | 'narHorz' | 'narVert' | 'dashHorz' | 'dashVert' | 'cross' | 'dnDiag' | 'upDiag' | 'ltDnDiag' | 'ltUpDiag' | 'dkDnDiag' | 'dkUpDiag' | 'wdDnDiag' | 'wdUpDiag' | 'dashDnDiag' | 'dashUpDiag' | 'diagCross' | 'smCheck' | 'lgCheck' | 'smGrid' | 'lgGrid' | 'dotGrid' | 'smConfetti' | 'lgConfetti' | 'horzBrick' | 'diagBrick' | 'solidDmnd' | 'openDmnd' | 'dotDmnd' | 'plaid' | 'sphere' | 'weave' | 'divot' | 'shingle' | 'wave' | 'trellis' | 'zigZag';

PictureCommandtypeSource ↗

The picture commands (picture-commands.ts): crop, crop to shape, crop mode, Change Picture, Reset Picture, Corrections and Color, styles, Format Picture, and alt text.

type PictureCommand = 
/**
 * Crop the selected picture (`a:srcRect`): to a crop rectangle, where the image stays in place
 * on the slide and the frame changes; to fill or fit its frame; or to an aspect ratio.
 */
{
    readonly type: 'cropImage';
    readonly crop: ImageCrop;
}
/** Crop the selected pictures to a preset shape (`a:prstGeom`); `rect` crops back to a rectangle. */
 | {
    readonly type: 'cropToShape';
    readonly preset: string;
}
/**
 * The Crop button: turn crop mode on for the selected picture, or off. In crop mode the crop
 * handles show; Escape, a second press, or another selection ends it.
 */
 | {
    readonly type: 'toggleCrop';
}
/**
 * Change Picture: replace the selected picture's image with an image file. The new image fits
 * in the old frame; the crop resets, and the border, effects, and adjustments stay. `width` and
 * `height` are the stored pixel size; without them, the engine reads it from the image header.
 * A JPEG's EXIF orientation does not count: the stored pixels do.
 */
 | {
    readonly type: 'replaceImage';
    readonly bytes: Uint8Array;
    readonly mime: string;
    readonly width?: number;
    readonly height?: number;
}
/**
 * Reset Picture: remove the adjustments, the border, the effects, and the crop to a shape.
 * `size` also removes the crop and gives the picture its own size (Reset Picture & Size).
 */
 | {
    readonly type: 'resetImage';
    readonly size?: boolean;
}
/** Corrections, color, and transparency of the selected pictures. Absent fields stay. */
 | {
    readonly type: 'setImageAdjustments';
    readonly adjustments: ImageAdjustments;
}
/** A picture style of the Picture Styles gallery: border, effects, and shape. */
 | {
    readonly type: 'setImageStyle';
    readonly style: ImageStyleId;
}
/**
 * Format Picture: the size, rotation, and crop of the selected picture as one undo step, with
 * the fields on the command, after DOCX Editor's `setImageProperties`. It takes `widthEmu`,
 * `heightEmu`, and `crop` as DOCX Editor does, plus `rotationDegrees`; absent fields stay, and
 * any other field is refused. DOCX Editor's other fields live elsewhere: alt text in
 * `setAltText` (every object), links in `setLink`, the natural size in `resetImage` with
 * `size`, the border in the Shape line commands; it has no target check, as the dialog closes
 * when its picture changes. DOCX Editor's wrap and position fields have no slide equivalent.
 */
 | ({
    readonly type: 'setImageProperties';
} & ImageProperties)
/**
 * Alt text of the selected element (`p:cNvPr/@descr` and `@title`). `decorative` marks it as
 * decorative, as the Alt Text pane does; a decorative element keeps no description,
 * and a description for one is refused unless `decorative` is false. An absent field keeps the
 * element's own; an empty description or title removes it.
 */
 | {
    readonly type: 'setAltText';
    readonly description?: string;
    readonly title?: string;
    readonly decorative?: boolean;
};

PresentationViewtypeSource ↗

How the editor shows the deck: normal (the slide with the rail and notes), slideSorter (every slide as a thumbnail, by section), or slideMaster (the slide masters and layouts, edited on the canvas), as the View tab names them (ppViewNormal, ppViewSlideSorter, ppViewSlideMaster).

type PresentationView = 'normal' | 'slideSorter' | 'slideMaster';

ReflectionPresettypeSource ↗

The presets of the Reflection gallery: size, and the gap to the shape.

type ReflectionPreset = 'tightTouching' | 'halfTouching' | 'fullTouching' | 'tight4pt' | 'half4pt' | 'full4pt' | 'tight8pt' | 'half8pt' | 'full8pt';

ReviewPaneOpeningtypeSource ↗

What a press on a comment marker does besides picking the thread. auto: it also asks for the **Comments** tab of the side panel (requestPane). manual: it only picks the thread, and the host opens its own comments view.

type ReviewPaneOpening = 'auto' | 'manual';

RotateChoicetypeSource ↗

An arrange.rotate value: the 90° turns, then the flips.

type RotateChoice = 'right90' | 'left90' | 'flipVertical' | 'flipHorizontal';

Rotation3DPresettypeSource ↗

The presets of the 3-D Rotation gallery: camera presets of ST_PresetCameraType (ECMA-376 Part 1, 20.1.10.47) with parallel projection.

type Rotation3DPreset = 'isometricLeftDown' | 'isometricRightUp' | 'isometricTopUp' | 'isometricOffAxis1Left' | 'isometricOffAxis1Right' | 'obliqueTopLeft' | 'obliqueTopRight' | 'obliqueBottomLeft' | 'obliqueBottomRight';

ShadowPresettypeSource ↗

The presets of the Shadow gallery: the nine Outer shadows ("Offset: Bottom Right") and the nine Inner shadows ("Inside: Top Left").

type ShadowPreset = 'outerBottomRight' | 'outerBottom' | 'outerBottomLeft' | 'outerRight' | 'outerCenter' | 'outerLeft' | 'outerTopRight' | 'outerTop' | 'outerTopLeft' | 'innerTopLeft' | 'innerTop' | 'innerTopRight' | 'innerLeft' | 'innerCenter' | 'innerRight' | 'innerBottomLeft' | 'innerBottom' | 'innerBottomRight';

ShapeEffectChoicetypeSource ↗

One effect to set; a null preset or size removes the effect.

type ShapeEffectChoice = {
    readonly kind: 'shadow';
    readonly preset: ShadowPreset | null;
} | {
    readonly kind: 'reflection';
    readonly preset: ReflectionPreset | null;
} | {
    readonly kind: 'glow';
    readonly size: number | null;
    readonly color?: ColorChoice;
}
/** Soft edge size in points (the gallery offers 1, 2.5, 5, 10, 25, and 50). */
 | {
    readonly kind: 'softEdge';
    readonly size: number | null;
}
/** Blur radius in points (`a:blur`). No gallery offers it. */
 | {
    readonly kind: 'blur';
    readonly size: number | null;
}
/** A top bevel (`a:sp3d/a:bevelT`), with a front camera when the shape has no scene. */
 | {
    readonly kind: 'bevel';
    readonly preset: BevelPreset | null;
}
/** A camera preset (`a:scene3d/a:camera`); null turns the camera back to the front. */
 | {
    readonly kind: 'rotation3d';
    readonly preset: Rotation3DPreset | null;
};

ShapeEffectsValuetypeSource ↗

A shape.effects option value: an effect and its choice (shadow.outerTop, glow.8.accent2, softEdge.none). A glow without a color keeps the shape's glow color. Sizes are points above 0; the command refuses others. The slot's state value lists the current choice of each effect, separated by spaces: test an option with chromeOptionChecked.

type ShapeEffectsValue = `shadow.${ShadowPreset | 'none'}` | `reflection.${ReflectionPreset | 'none'}` | `glow.${number | 'none'}` | `glow.${number}.${Exclude<ShapeStyleColor, 'dk1'>}` | `softEdge.${number | 'none'}` | `bevel.${BevelPreset | 'none'}` | `rotation3d.${Rotation3DPreset | 'none'}`;

ShapeStyleColortypeSource ↗

The columns of the Shape Styles gallery: Dark 1, then Accent 1 to 6 (theme color names).

type ShapeStyleColor = 'dk1' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';

ShapeStyleRowtypeSource ↗

The rows of the Shape Styles gallery (theme styles), top to bottom: Colored Outline, Colored Fill, Light 1 Outline Colored Fill, Subtle Effect, Moderate Effect, Intense Effect.

type ShapeStyleRow = 'coloredOutline' | 'coloredFill' | 'lightOutline' | 'subtleEffect' | 'moderateEffect' | 'intenseEffect';

ShapeStyleValuetypeSource ↗

A shape.styles value: a gallery cell as row.color (intenseEffect.accent2).

type ShapeStyleValue = `${ShapeStyleRow}.${ShapeStyleColor}`;

SlideBackgroundtypeSource ↗

A slide background the chrome sets.

type SlideBackground = {
    readonly kind: 'solid';
    readonly color: ColorChoice;
} | {
    readonly kind: 'gradient';
    readonly gradient: GradientFill;
} | {
    readonly kind: 'pattern';
    readonly pattern: PatternFill;
} | {
    readonly kind: 'picture';
    readonly bytes: Uint8Array;
    readonly mime: string;
    readonly tile?: boolean;
};

SlideLayoutKindtypeSource ↗

The kind of a slide layout, with the file's own values: ST_SlideLayoutType (ECMA-376 Part 1, §19.7.15). cust is a custom layout, and also the value for a file that names none or an unknown kind. The Office.js SlideLayoutType enum names the same idea with other values ("TitleOnly" for titleOnly); the automation API keeps that name for its own type.

type SlideLayoutKind = 'title' | 'tx' | 'twoColTx' | 'tbl' | 'txAndChart' | 'chartAndTx' | 'dgm' | 'chart' | 'txAndClipArt' | 'clipArtAndTx' | 'titleOnly' | 'blank' | 'txAndObj' | 'objAndTx' | 'objOnly' | 'obj' | 'txAndMedia' | 'mediaAndTx' | 'objOverTx' | 'txOverObj' | 'txAndTwoObj' | 'twoObjAndTx' | 'twoObjOverTx' | 'fourObj' | 'vertTx' | 'clipArtAndVertTx' | 'vertTitleAndTx' | 'vertTitleAndTxOverChart' | 'twoObj' | 'objAndTwoObj' | 'twoObjAndObj' | 'cust' | 'secHead' | 'twoTxTwoObj' | 'objTx' | 'picTx';

SlideSelectModetypeSource ↗

How a click in the slide rail changes the slide selection.

type SlideSelectMode = 'replace' | 'toggle' | 'range';

StrikeStyletypeSource ↗

Strikethrough: none, single, or double (ST_TextStrikeType).

type StrikeStyle = 'none' | 'single' | 'double';

TableBorderEdgeTargettypeSource ↗

The edges a border is set on: every target but none, as DOCX Editor's type.

type TableBorderEdgeTarget = Exclude<TableBorderTarget, 'none'>;

TableBorderTargettypeSource ↗

Which cell edges a border command sets, as DOCX Editor's TableBorderTarget.

type TableBorderTarget = 'all' | 'outside' | 'inside' | 'none' | 'top' | 'bottom' | 'left' | 'right';

TableCommandtypeSource ↗

Table commands (table-commands.ts). Each acts on the table of the selection: a caret in a cell, a cell range, or the selected table frame. The structure commands have DOCX Editor's names; three differ (the style options, the shared Align buttons, and No Border).

type TableCommand = 
/** Insert > Table: a `rows` × `cols` table with the theme's default table style. */
{
    readonly type: 'insertTable';
    readonly rows: number;
    readonly cols: number;
}
/** Insert a row above or below the selected rows. */
 | {
    readonly type: 'insertRow';
    readonly where: 'above' | 'below';
}
/** Insert a column left or right of the selected columns. */
 | {
    readonly type: 'insertColumn';
    readonly where: 'left' | 'right';
} | {
    readonly type: 'deleteRow';
} | {
    readonly type: 'deleteColumn';
} | {
    readonly type: 'deleteTable';
}
/** Select the whole table, or the rows or columns of the selected cells. Not an edit. */
 | {
    readonly type: 'selectTableRegion';
    readonly region: 'table' | 'row' | 'column';
}
/** Merge the selected cell range into one cell; the text of every cell is kept. */
 | {
    readonly type: 'mergeCells';
}
/** Split the selected cell into `rows` × `cols` cells. */
 | {
    readonly type: 'splitCell';
    readonly rows: number;
    readonly cols: number;
}
/** Cell shading: a color choice, or null for No Fill (`a:noFill`, over the style's fill). */
 | {
    readonly type: 'setCellFill';
    readonly color: ColorChoice | null;
}
/** Borders of the selected cells, drawn with `spec`; `scope: 'none'` removes them. */
 | {
    readonly type: 'setTableBorders';
    readonly scope: 'none';
} | {
    readonly type: 'setTableBorders';
    readonly scope: TableBorderEdgeTarget;
    readonly spec: TableBorderSpec;
}
/** The table style (`a:tableStyleId`), by `styleId`. */
 | {
    readonly type: 'setTableStyle';
    readonly styleId: string;
}
/** Turn one table style option (`a:tblPr` flag) on or off. */
 | {
    readonly type: 'toggleTableStyleOption';
    readonly option: TableStyleOption;
}
/** Cell margins in EMU; an absent side keeps its value. */
 | {
    readonly type: 'setCellMargins';
    readonly margins: {
        readonly left?: number;
        readonly right?: number;
        readonly top?: number;
        readonly bottom?: number;
    };
}
/** The height of the selected rows in EMU (`a:tr/@h`, a minimum). */
 | {
    readonly type: 'setRowHeight';
    readonly height: number;
}
/** The width of the selected columns in EMU (`a:gridCol/@w`). */
 | {
    readonly type: 'setColumnWidth';
    readonly width: number;
}
/**
 * Fill cells with plain text from the top-left cell of the selection (a paste of copied
 * cells): one array for each row, one string for each cell. Each written cell keeps the format
 * of its first run. Text past the table's edge adds rows at the bottom and columns at the end of the grid (the right, or the left in a right-to-left table)
 * (new columns share the table's width), up to the table limits; a position inside a merged
 * cell is skipped.
 */
 | {
    readonly type: 'pasteCells';
    readonly texts: readonly (readonly string[])[];
}
/** Give the selected rows (or every row) the same height. */
 | {
    readonly type: 'distributeRows';
}
/** Give the selected columns (or every column) the same width. */
 | {
    readonly type: 'distributeColumns';
}
/**
 * Set every column width and row height of the selected table, in EMU (a grid line drag).
 * Run the steps of one drag with one `historyGroup` (`exec` options) for one undo step.
 */
 | {
    readonly type: 'setTableGrid';
    readonly columns?: readonly number[];
    readonly rows?: readonly number[];
};

TableStyleOptiontypeSource ↗

Table style options, the a:tblPr flags: Header Row, Total Row, Banded Rows, First Column, Last Column, Banded Columns.

type TableStyleOption = 'firstRow' | 'lastRow' | 'bandRow' | 'firstCol' | 'lastCol' | 'bandCol';

TextAligntypeSource ↗

Paragraph alignment values the chrome can set.

type TextAlign = 'l' | 'ctr' | 'r' | 'just';

TextCasetypeSource ↗

Change Case choices: "Sentence case.", "lowercase", "UPPERCASE", "Capitalize Each Word", and "tOGGLE cASE".

type TextCase = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';

TextEffectsValuetypeSource ↗

A shape.textEffects option value: transform. and a text warp, or transform.none to remove the warp.

type TextEffectsValue = `transform.${Exclude<TextWarpPreset, 'textNoShape'> | 'none'}`;

TextFittingtypeSource ↗

Text fitting modes (a:noAutofit, a:normAutofit, a:spAutoFit).

type TextFitting = 'none' | 'shrink' | 'shape';

TextFormatCommandtypeSource ↗

The text format commands of EditorCommand: the Paragraph, Font, and Bullets and Numbering dialogs, superscript and subscript, Change Case, character spacing, Text Direction, and Columns. Each acts on the selected text, or on all text of the selected shapes.

type TextFormatCommand = 
/**
 * Format > Paragraph: alignment, indents, spacing before and after, and line spacing on every
 * selected paragraph, as one undo step. DOCX Editor's command name; the fields follow its
 * `ParagraphFormatCommand`, in PresentationML units (EMU indents, spacing in points or lines).
 */
({
    readonly type: 'setParagraphFormat';
} & ParagraphFormatCommand)
/** Superscript on or off: the button writes `baseline` 30 % up. */
 | {
    readonly type: 'toggleSuperscript';
}
/** Subscript on or off: the button writes `baseline` 25 % down. */
 | {
    readonly type: 'toggleSubscript';
}
/** Home > Change Case: rewrite the letters of the selected text. Formatting stays. */
 | {
    readonly type: 'changeCase';
    readonly case: TextCase;
}
/** Home > Character Spacing: points added after each character (`spc`); 0 is Normal. */
 | {
    readonly type: 'setCharacterSpacing';
    readonly points: number;
}
/** Format > Font: the fields of the Font dialog, as one undo step. */
 | ({
    readonly type: 'setFontFormat';
} & FontFormatCommand)
/**
 * Home > Text Direction (`a:bodyPr/@vert`) of the selected shapes. The type leaves out
 * `mongolianVertical` and `wordArtVerticalRtl`, which layout does not draw correctly;
 * the engine refuses them too.
 */
 | {
    readonly type: 'setTextDirection';
    readonly direction: Exclude<TextOrientation, 'mongolianVertical' | 'wordArtVerticalRtl'>;
}
/**
 * Home > Columns: the number of text columns (1 to 16, `numCol`) of the selected shapes, and
 * the gap between them in EMU (`spcCol`, 0 to 51206400). An absent `gapEmu` keeps the gap.
 */
 | {
    readonly type: 'setColumns';
    readonly count: number;
    readonly gapEmu?: number;
}
/**
 * Home > Bullets or Numbering (a gallery item), or Format > Bullets and Numbering: the bullet
 * format of the selected paragraphs (Office.js `ParagraphFormat.bulletFormat`).
 * `null` is the gallery's None: the list turns off.
 */
 | {
    readonly type: 'setBulletFormat';
    readonly format: BulletFormat | null;
}
/**
 * Paste formatted text: DrawingML paragraphs (`a:p`, as `ClipboardNode`s) replace the selected
 * text, or, with no text selected, go in a new text box in the middle of the slide. The
 * paragraphs are checked as untrusted input: runs, breaks, and their formatting are kept, and
 * links, pictures, and relationship references are left out. A field becomes plain text.
 */
 | {
    readonly type: 'pasteText';
    readonly paragraphs: readonly ClipboardNode[];
};

TextOrientationtypeSource ↗

The orientation of a shape's text (Home Text Direction), in the words of Office.js's the Office.js ShapeTextOrientation enum:horizontal, rotated 90° (vertical, file vert) or 270° (vertical270), stacked letters (wordArtVertical), upright East Asian text (eastAsianVertical, file eaVert), and the two the editor reads but does not set (mongolianVertical, wordArtVerticalRtl). Not DOCX Editor's TextDirection, which is bidi.

type TextOrientation = 'horizontal' | 'vertical' | 'vertical270' | 'wordArtVertical' | 'eastAsianVertical' | 'mongolianVertical' | 'wordArtVerticalRtl';

TextWarpPresettypeSource ↗

A preset text warp (a:prstTxWarp/@prst, ST_TextShapeType, ECMA-376 Part 1, 20.1.10.76). textNoShape draws the text flat.

type TextWarpPreset = 'textNoShape' | 'textPlain' | 'textStop' | 'textTriangle' | 'textTriangleInverted' | 'textChevron' | 'textChevronInverted' | 'textRingInside' | 'textRingOutside' | 'textArchUp' | 'textArchDown' | 'textCircle' | 'textButton' | 'textArchUpPour' | 'textArchDownPour' | 'textCirclePour' | 'textButtonPour' | 'textCurveUp' | 'textCurveDown' | 'textCanUp' | 'textCanDown' | 'textWave1' | 'textWave2' | 'textDoubleWave1' | 'textWave4' | 'textInflate' | 'textDeflate' | 'textInflateBottom' | 'textDeflateBottom' | 'textInflateTop' | 'textDeflateTop' | 'textDeflateInflate' | 'textDeflateInflateDeflate' | 'textFadeRight' | 'textFadeLeft' | 'textFadeUp' | 'textFadeDown' | 'textSlantUp' | 'textSlantDown' | 'textCascadeUp' | 'textCascadeDown';

ThemeColorSlottypeSource ↗

A theme color as the color menus name it: the color map's names, so bg1 is the color the slide's p:clrMap maps to Background 1.

type ThemeColorSlot = 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6';

TransitionKindtypeSource ↗

The kinds of transition that setTransition writes.

type TransitionKind = 'fade' | 'push' | 'wipe' | 'split' | 'cut';

UnderlineStyletypeSource ↗

Underline styles: ST_TextUnderlineType in words, as Office.js names them (single is sng, double is dbl, wavyDouble is wavyDbl).

type UnderlineStyle = 'none' | 'words' | 'single' | 'double' | 'heavy' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wavy' | 'wavyHeavy' | 'wavyDouble';

VerticalAligntypeSource ↗

Vertical text alignment: top, middle, bottom.

type VerticalAlign = 't' | 'ctr' | 'b';