wordinweb 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -5
- package/dist/index.d.ts +266 -12
- package/dist/index.js +8525 -1351
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ export function Editor() {
|
|
|
67
67
|
|
|
68
68
|
return (
|
|
69
69
|
<div>
|
|
70
|
-
{api && <DocxToolbar api={api} onSave={download} />}
|
|
70
|
+
{api && <DocxToolbar api={api} mode="advanced" onSave={download} />}
|
|
71
71
|
<DocxView
|
|
72
72
|
source="/report.docx"
|
|
73
73
|
editable
|
|
@@ -116,19 +116,36 @@ The object passed to `onReady`. Every command operates on the current selection
|
|
|
116
116
|
**Page layout**
|
|
117
117
|
- `setPageLayout(patch, scope?)` — margins, page size, orientation, columns, page borders. `scope` = `"document"` (all sections) or `"section"` (the caret's).
|
|
118
118
|
- `insertBreak("page" | "column" | "sectionNextPage" | "sectionContinuous")`.
|
|
119
|
+
- `insertBlankPage()` — inserts a complete blank page at the caret.
|
|
120
|
+
- `insertCoverPage({ title, subtitle?, author? })` — prepends an editable, styled cover page.
|
|
119
121
|
- `setLineNumbering(patch, scope?)`, `getLineNumbering()`.
|
|
122
|
+
- `openHeaderFooter("header" | "footer")`, `closeHeaderFooter()` — create or directly enter page header/footer editing; Escape closes it.
|
|
120
123
|
|
|
121
124
|
**Tables**
|
|
122
125
|
- `insertTable(rows, cols)`.
|
|
123
126
|
- `tableOp(op)` — insert/delete row/column, merge/split cells, cell vertical align, cell shading, delete table.
|
|
124
127
|
|
|
125
128
|
**Images**
|
|
126
|
-
- `insertImage(file)` — inserts a
|
|
129
|
+
- `insertImage(file)` — inserts a raster image or editable SVG icon inline at the caret, clamped to the column width (TIFF/WMF/EMF are decoded to something the browser can paint).
|
|
130
|
+
- `insertScreenshot()` — opens the browser screen/window/tab picker and inserts the captured frame as an editable PNG picture.
|
|
131
|
+
- `insertModel3D(file, poster?)` — packages a GLB as a native Office 3D model with an editable poster fallback.
|
|
132
|
+
- `insertOnlineVideo(url)` — inserts Word online-video metadata with a safe browser poster; double-click opens the validated HTTP(S) URL.
|
|
133
|
+
- `insertEmbeddedObject(file, filename?)` — embeds any file as a native OLE Package; double-click safely downloads the original file in the browser.
|
|
127
134
|
|
|
128
|
-
**Comments, footnotes &
|
|
135
|
+
**Comments, footnotes & Insert content**
|
|
129
136
|
- `addComment(text)` — comment on the selection (`false` if nothing is selected).
|
|
130
137
|
- `addFootnote(text)` — footnote at the caret.
|
|
131
138
|
- `insertPageNumber("page" | "pageOfTotal")` — dynamic `PAGE` / `Page X of Y` field.
|
|
139
|
+
- `insertField(instruction, cachedResult?)`, `insertDateTime("date" | "time", picture?)` — live Word fields.
|
|
140
|
+
- `addBookmark(name)`, `listBookmarks()`, `insertCrossReference(name, "text" | "page")` — named bookmark targets and live `REF` / `PAGEREF` fields.
|
|
141
|
+
- `insertEquation(linear)`, `insertSymbol(symbol)` — native editable OMML equations and arbitrary Unicode symbols.
|
|
142
|
+
- `insertShape(preset, text?)` — floating editable DrawingML rectangles, rounded rectangles, ellipses, diamonds, and text boxes. Advanced mode also exposes Text Box as its own Insert control.
|
|
143
|
+
- `insertWordArt(text, preset?)` — editable DrawingML WordArt with plain, arch, wave, and chevron presets.
|
|
144
|
+
- `insertChart(data)`, `updateSelectedChart(data)` — native editable ChartML with its embedded workbook.
|
|
145
|
+
- `insertSmartArt(data)`, `updateSelectedSmartArt(data)` — native editable SmartArt data, layout, style, colors, and cached drawing parts.
|
|
146
|
+
- `setDrawingTool({ kind: "pen", color, width } | { kind: "eraser", size } | { kind: "lasso" } | null)`, `getDrawingTool()` — draw, erase, or lasso-select movable DrawingML ink.
|
|
147
|
+
- `arrangeObject(action)` — align the selected image, shape, or ink group to the page; rotate it 90°; or bring it to the front/send it to the back. Arrow keys nudge selected floating objects by 1px (`Shift` = 10px).
|
|
148
|
+
- `setDropCap("drop" | "margin" | null, lines?)` — apply, change, or remove a native Word drop cap on the caret paragraph.
|
|
132
149
|
|
|
133
150
|
**Suggesting mode (tracked changes)**
|
|
134
151
|
- `setSuggesting(on, author?)` — when on, edits record as OOXML `w:ins`/`w:del` instead of mutating text directly, and the view switches to markup.
|
|
@@ -144,16 +161,18 @@ The object passed to `onReady`. Every command operates on the current selection
|
|
|
144
161
|
- `undo()`, `redo()`, `canUndo()`, `canRedo()`.
|
|
145
162
|
- `save()` → edited `.docx` bytes (`Uint8Array`). Everything the model doesn't touch round-trips byte-for-byte.
|
|
146
163
|
- `print()` — browser print dialog / save-as-PDF of the rendered pages.
|
|
147
|
-
- `pageCount()
|
|
164
|
+
- `pageCount()` and `document` (the parsed `DocxDocument`).
|
|
148
165
|
|
|
149
166
|
### `DocxToolbar`
|
|
150
167
|
|
|
151
|
-
A ready-made formatting toolbar for an editable `DocxView`.
|
|
168
|
+
A ready-made formatting toolbar for an editable `DocxView`. Use `mode="simple"` for the basic Home editing strip or `mode="advanced"` for the full Home / Insert / Draw / Layout ribbon supported by the installed version.
|
|
169
|
+
Layout includes Word-style paper presets plus a custom width/height dialog; both document and current-section scope emit native page-size properties.
|
|
152
170
|
|
|
153
171
|
| Prop | Type | What it does |
|
|
154
172
|
| --- | --- | --- |
|
|
155
173
|
| `api` | `DocxViewApi \| null` | The api from `onReady`. |
|
|
156
174
|
| `onSave` | `(bytes: Uint8Array) => void` | Adds a Download button; receives `api.save()` bytes. |
|
|
175
|
+
| `mode` | `"simple" \| "advanced"` | Editing surface. Defaults to `"advanced"`; simple omits the Insert, Draw, and Layout ribbons. |
|
|
157
176
|
| `features` | `Partial<Record<ToolbarFeature, boolean>>` | Per-group toggles; every group defaults on. Set one `false` to hide it (e.g. `{ table: false, image: false }`). |
|
|
158
177
|
| `className` | `string` | Class on the toolbar root — handy as a scope for CSS-variable overrides. |
|
|
159
178
|
| `style` | `React.CSSProperties` | Inline overrides merged onto the toolbar root. |
|
|
@@ -168,6 +187,7 @@ Every color the chrome paints — the toolbar, comment cards, selection, caret,
|
|
|
168
187
|
| `--dxw-toolbar-fg` | `#3c4043` | Toolbar text & icons (icons use `currentColor`) |
|
|
169
188
|
| `--dxw-toolbar-border` | `#dadce0` | Toolbar borders & separators |
|
|
170
189
|
| `--dxw-toolbar-muted` | `#5f6368` | Secondary/label text |
|
|
190
|
+
| `--dxw-toolbar-z-index` | `100` | Toolbar and open-menu stacking level |
|
|
171
191
|
| `--dxw-accent` | `#1a73e8` | Primary accent (active tab, pills, focus rings) |
|
|
172
192
|
| `--dxw-accent-fg` | `#fff` | Text/icon on an accent fill |
|
|
173
193
|
| `--dxw-btn-active-bg` | `#dfe7f5` | Toggled button background |
|
|
@@ -175,6 +195,9 @@ Every color the chrome paints — the toolbar, comment cards, selection, caret,
|
|
|
175
195
|
| `--dxw-tab-active-bg` | `#e8f0fe` | Active ribbon-tab background |
|
|
176
196
|
| `--dxw-popover-bg` | `#fff` | Dropdown / popover surface |
|
|
177
197
|
| `--dxw-popover-shadow` | `0 4px 16px rgba(0,0,0,.15)` | Popover shadow |
|
|
198
|
+
| `--dxw-layout-menu-width` | `304px` | Layout option-menu width |
|
|
199
|
+
| `--dxw-layout-menu-max-height` | `480px` | Layout option-menu scroll limit |
|
|
200
|
+
| `--dxw-layout-preview-bg` | `#fff` | Paper fill in Layout option previews |
|
|
178
201
|
| `--dxw-canvas-bg` | `#e8eaed` | Scroll area behind the pages |
|
|
179
202
|
| `--dxw-page-bg` | `#ffffff` | Page paper |
|
|
180
203
|
| `--dxw-page-shadow` | `0 1px 3px …, 0 4px 14px …` | Page drop shadow |
|
|
@@ -215,6 +238,12 @@ Or in a stylesheet:
|
|
|
215
238
|
.dxw-dark { --dxw-toolbar-bg: #1f2937; --dxw-toolbar-fg: #e5e7eb; /* … */ }
|
|
216
239
|
```
|
|
217
240
|
|
|
241
|
+
Layout controls also expose stable `.dxw-layout-ribbon`, `.dxw-layout-menu-trigger`,
|
|
242
|
+
`.dxw-layout-menu`, `.dxw-layout-menu-item`, and `.dxw-layout-preview` classes.
|
|
243
|
+
Their `data-dxw-layout-menu`, `data-dxw-layout-option`, and
|
|
244
|
+
`data-dxw-layout-preview` attributes identify each menu, action, and diagram
|
|
245
|
+
when a host needs a narrowly scoped style override.
|
|
246
|
+
|
|
218
247
|
## How it works
|
|
219
248
|
|
|
220
249
|
WordInWeb never converts the document to flowing HTML. It parses the OOXML into a typed model, runs a layout engine that breaks lines with real canvas metrics and paginates like Word, and renders each primitive as one absolutely-positioned element, so the browser does zero reflow. Editing mutates the retained XML tree and re-serializes only the parts it models, leaving everything else byte-for-byte intact.
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ interface XmlElement {
|
|
|
16
16
|
children: XmlElement[];
|
|
17
17
|
/** Concatenated character data directly inside this element. */
|
|
18
18
|
text: string;
|
|
19
|
+
/** Editor placeholder retained in memory but omitted from XML while empty. */
|
|
20
|
+
omitWhenEmpty?: boolean;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -272,6 +274,27 @@ interface ImageContent {
|
|
|
272
274
|
};
|
|
273
275
|
/** Source w:drawing (or pict) element, for resize/move editing. */
|
|
274
276
|
srcDrawing?: XmlElement;
|
|
277
|
+
/** Native Office 3D model shown through its saved poster raster. */
|
|
278
|
+
model3D?: Model3DReference;
|
|
279
|
+
/** Word online-video metadata shown through its saved poster raster. */
|
|
280
|
+
webVideo?: WebVideoReference;
|
|
281
|
+
/** Embedded OLE package activated as a safe download in the browser. */
|
|
282
|
+
embeddedObject?: EmbeddedObjectReference;
|
|
283
|
+
}
|
|
284
|
+
interface Model3DReference {
|
|
285
|
+
part: string;
|
|
286
|
+
posterPart: string;
|
|
287
|
+
}
|
|
288
|
+
interface WebVideoReference {
|
|
289
|
+
url: string;
|
|
290
|
+
embeddedHtml: string;
|
|
291
|
+
width: number;
|
|
292
|
+
height: number;
|
|
293
|
+
}
|
|
294
|
+
interface EmbeddedObjectReference {
|
|
295
|
+
part: string;
|
|
296
|
+
filename: string;
|
|
297
|
+
progId: string;
|
|
275
298
|
}
|
|
276
299
|
/** OMML equation node (subset: runs, scripts, fractions, radicals). */
|
|
277
300
|
type MathNode = {
|
|
@@ -466,6 +489,10 @@ interface ShapeTextbox {
|
|
|
466
489
|
* be an interactive hit target (select the shape instead of the body text
|
|
467
490
|
* behind it). */
|
|
468
491
|
srcDrawing?: XmlElement;
|
|
492
|
+
/** Header/footer-owned textbox whose text is edited as an independent story. */
|
|
493
|
+
textboxStory?: boolean;
|
|
494
|
+
/** DrawingML WordArt, including the identity textNoShape preset. */
|
|
495
|
+
wordArt?: boolean;
|
|
469
496
|
/** bodyPr a:prstTxWarp preset name (textArchUp, textWave1, textChevron,
|
|
470
497
|
* textCirclePour, …): the shape's text is bent onto the preset's envelope
|
|
471
498
|
* rather than flowed as ordinary lines. "textNoShape" (no warp) is dropped. */
|
|
@@ -509,6 +536,8 @@ interface ShapeWordArt {
|
|
|
509
536
|
interface ShapeArt {
|
|
510
537
|
type: "art";
|
|
511
538
|
srcDrawing?: XmlElement;
|
|
539
|
+
/** A freehand stroke, selectable by the Draw ribbon's stroke eraser. */
|
|
540
|
+
ink?: boolean;
|
|
512
541
|
x: number;
|
|
513
542
|
y: number;
|
|
514
543
|
/** Percent-of-page offsets (wp14:pctPos*Offset), 0..1. */
|
|
@@ -519,7 +548,10 @@ interface ShapeArt {
|
|
|
519
548
|
hRel: AnchorRel;
|
|
520
549
|
vRel: AnchorRel;
|
|
521
550
|
hAlign?: "left" | "center" | "right";
|
|
551
|
+
vAlign?: "top" | "center" | "bottom";
|
|
522
552
|
behind?: boolean;
|
|
553
|
+
/** a:xfrm rotation, degrees clockwise. */
|
|
554
|
+
rotation?: number;
|
|
523
555
|
lines: DrawingLine[];
|
|
524
556
|
images: DrawingImage[];
|
|
525
557
|
paths: DrawingPath[];
|
|
@@ -566,8 +598,14 @@ interface ShapeImage {
|
|
|
566
598
|
};
|
|
567
599
|
/** Source w:drawing element (editing). */
|
|
568
600
|
srcDrawing?: XmlElement;
|
|
601
|
+
model3D?: Model3DReference;
|
|
602
|
+
webVideo?: WebVideoReference;
|
|
603
|
+
embeddedObject?: EmbeddedObjectReference;
|
|
569
604
|
}
|
|
570
|
-
type Shape = ShapeLine | ShapeTextbox | ShapeImage | ShapeArt | ShapeWordArt
|
|
605
|
+
type Shape = (ShapeLine | ShapeTextbox | ShapeImage | ShapeArt | ShapeWordArt) & {
|
|
606
|
+
/** wp:anchor relativeHeight, used for object stacking order. */
|
|
607
|
+
z?: number;
|
|
608
|
+
};
|
|
571
609
|
/**
|
|
572
610
|
* Floating/anchored object: does not occupy inline space; positioned against
|
|
573
611
|
* page/margin/paragraph during layout. (How classic pleading paper draws its
|
|
@@ -615,6 +653,10 @@ interface DrawingContent {
|
|
|
615
653
|
height: number;
|
|
616
654
|
lines: DrawingLine[];
|
|
617
655
|
images: DrawingImage[];
|
|
656
|
+
/** Native ChartML chart data resolved from the related chart part. */
|
|
657
|
+
chart?: ChartData;
|
|
658
|
+
/** Native SmartArt diagram data resolved from its diagram parts. */
|
|
659
|
+
smartArt?: SmartArtData;
|
|
618
660
|
/** Freeform vector shapes (a:custGeom), as SVG path data. */
|
|
619
661
|
paths?: DrawingPath[];
|
|
620
662
|
/** An INLINE wps text box (wp:inline wps:txbx): a fixed-extent box that
|
|
@@ -642,6 +684,22 @@ interface DrawingContent {
|
|
|
642
684
|
* SmartArt cached-drawing shapes). Painted above lines/paths. */
|
|
643
685
|
texts?: DrawingTextShape[];
|
|
644
686
|
}
|
|
687
|
+
type ChartType = "column" | "bar" | "line" | "pie";
|
|
688
|
+
interface ChartSeries {
|
|
689
|
+
name: string;
|
|
690
|
+
values: number[];
|
|
691
|
+
}
|
|
692
|
+
interface ChartData {
|
|
693
|
+
type: ChartType;
|
|
694
|
+
title?: string;
|
|
695
|
+
categories: string[];
|
|
696
|
+
series: ChartSeries[];
|
|
697
|
+
}
|
|
698
|
+
type SmartArtLayout = "process" | "cycle" | "hierarchy" | "list";
|
|
699
|
+
interface SmartArtData {
|
|
700
|
+
layout: SmartArtLayout;
|
|
701
|
+
items: string[];
|
|
702
|
+
}
|
|
645
703
|
/** A text body positioned inside a composite drawing (a wps textbox in a
|
|
646
704
|
* group, or a SmartArt dsp:sp txBody), px relative to the drawing's box. */
|
|
647
705
|
interface DrawingTextShape {
|
|
@@ -681,6 +739,7 @@ interface DrawingPath {
|
|
|
681
739
|
stroke?: {
|
|
682
740
|
color: string;
|
|
683
741
|
width: number;
|
|
742
|
+
opacity?: number;
|
|
684
743
|
};
|
|
685
744
|
}
|
|
686
745
|
/**
|
|
@@ -1064,7 +1123,10 @@ declare class DocxDocument {
|
|
|
1064
1123
|
/** Changes whenever refresh() rebuilds the parsed model. Plain in-place text
|
|
1065
1124
|
* edits can keep this stable so incremental layout reuses model-only caches. */
|
|
1066
1125
|
private _modelVersion;
|
|
1126
|
+
private _packageResourceVersion;
|
|
1067
1127
|
get modelVersion(): number;
|
|
1128
|
+
/** Invalidate layout derived from related parts such as ChartML. */
|
|
1129
|
+
markPackageResourceChanged(): void;
|
|
1068
1130
|
readonly pkg: Package;
|
|
1069
1131
|
readonly theme: Theme;
|
|
1070
1132
|
styles: Styles;
|
|
@@ -1137,6 +1199,11 @@ declare class DocxDocument {
|
|
|
1137
1199
|
private commentsDirty;
|
|
1138
1200
|
/** Retained XML roots — source of truth for editing and save(). */
|
|
1139
1201
|
private readonly docPart;
|
|
1202
|
+
/** Retained settings.xml tree. A synthetic empty root keeps history root
|
|
1203
|
+
* indices stable for documents that did not originally contain the part. */
|
|
1204
|
+
private readonly settingsPart;
|
|
1205
|
+
private readonly settingsRoot;
|
|
1206
|
+
private settingsDirty;
|
|
1140
1207
|
/** Parsed document.xml root (read-only outside the class; the layout engine
|
|
1141
1208
|
* scans it for incremental-reuse eligibility, tests walk it). */
|
|
1142
1209
|
readonly docRoot: XmlElement;
|
|
@@ -1147,6 +1214,10 @@ declare class DocxDocument {
|
|
|
1147
1214
|
private readonly relsPath;
|
|
1148
1215
|
private relsRoot;
|
|
1149
1216
|
private contentTypesRoot;
|
|
1217
|
+
/** Canonical XML as first parsed from each always-modeled package part.
|
|
1218
|
+
* If the retained tree still matches on save, keep the part's original
|
|
1219
|
+
* bytes instead of replacing producer formatting such as CRLF line ends. */
|
|
1220
|
+
private readonly originalModeledXml;
|
|
1150
1221
|
private nextDocPrId;
|
|
1151
1222
|
/** Transient layout state: set by the engine while laying out a docGrid
|
|
1152
1223
|
* type="charsAndLines" section so line measurement can give East-Asian
|
|
@@ -1155,6 +1226,8 @@ declare class DocxDocument {
|
|
|
1155
1226
|
* single-threaded and sequential per section. */
|
|
1156
1227
|
charGridEa: boolean;
|
|
1157
1228
|
private constructor();
|
|
1229
|
+
/** Repair only objects emitted by older WordInWeb builds that Word rejects. */
|
|
1230
|
+
private repairLegacyWordInWebObjects;
|
|
1158
1231
|
/**
|
|
1159
1232
|
* Re-derive the document model from the retained XML trees. Called after
|
|
1160
1233
|
* edit commands mutate the XML.
|
|
@@ -1172,6 +1245,16 @@ declare class DocxDocument {
|
|
|
1172
1245
|
* stable across a plain text edit). */
|
|
1173
1246
|
layoutGlobalSig(): string;
|
|
1174
1247
|
refresh(): void;
|
|
1248
|
+
/**
|
|
1249
|
+
* Reparse the two direct body paragraphs created by Enter without rebuilding
|
|
1250
|
+
* the complete document model. This deliberately covers only the simple
|
|
1251
|
+
* single-section body case used by incremental pagination; structural
|
|
1252
|
+
* containers, revisions, bookmarks, and section breaks use refresh().
|
|
1253
|
+
*/
|
|
1254
|
+
reparseDirectBodyParagraphSplit(beforeSource: XmlElement, afterSource: XmlElement): {
|
|
1255
|
+
before: Paragraph;
|
|
1256
|
+
after: Paragraph;
|
|
1257
|
+
} | null;
|
|
1175
1258
|
private deriveComments;
|
|
1176
1259
|
/** Retained comments tree for edit commands (null when the doc has none). */
|
|
1177
1260
|
/**
|
|
@@ -1222,13 +1305,16 @@ declare class DocxDocument {
|
|
|
1222
1305
|
* nearest preceding w:t.
|
|
1223
1306
|
*/
|
|
1224
1307
|
commentAnchors(): Map<string, XmlElement[]>;
|
|
1225
|
-
/** The mutable XML roots (document body, header/footer parts, comments).
|
|
1226
|
-
* The comments root is last so history snapshot indices stay stable. */
|
|
1227
1308
|
/** Flag the footnotes part dirty when `t` lives inside it, so save()
|
|
1228
1309
|
* re-serializes footnotes.xml. Called by the editor after a text edit; a
|
|
1229
1310
|
* no-op for body/header/footer targets. */
|
|
1230
1311
|
markDirtyIfFootnote(t: XmlElement): void;
|
|
1312
|
+
/** The mutable XML roots (document body, related modeled parts, settings).
|
|
1313
|
+
* settingsRoot is always second and always present so its history snapshot
|
|
1314
|
+
* index stays stable even when optional related roots are created later. */
|
|
1231
1315
|
editableRoots(): XmlElement[];
|
|
1316
|
+
/** Toggle the document-global facing-page margin mode in settings.xml. */
|
|
1317
|
+
setMirrorMargins(enabled: boolean): void;
|
|
1232
1318
|
/**
|
|
1233
1319
|
* Find the parent element of `target` in any modeled XML tree (document
|
|
1234
1320
|
* body, headers, footers). Linear scan — documents are small and this only
|
|
@@ -1242,6 +1328,8 @@ declare class DocxDocument {
|
|
|
1242
1328
|
* XML parts we model are re-serialized; every other part round-trips
|
|
1243
1329
|
* byte-for-byte.
|
|
1244
1330
|
*/
|
|
1331
|
+
private rememberOriginalXml;
|
|
1332
|
+
private writeModeledXml;
|
|
1245
1333
|
save(): Uint8Array;
|
|
1246
1334
|
/** Fresh unique docPr id for inserted drawings. */
|
|
1247
1335
|
nextDrawingId(): number;
|
|
@@ -1260,6 +1348,34 @@ declare class DocxDocument {
|
|
|
1260
1348
|
/** Retarget an existing external relationship (hyperlink href edit). */
|
|
1261
1349
|
setRelTarget(relId: string, url: string): boolean;
|
|
1262
1350
|
addImageResource(bytes: Uint8Array, ext: string): string;
|
|
1351
|
+
/** Add a GLB model part and its Office 2019 model3d relationship. */
|
|
1352
|
+
addModel3DResource(bytes: Uint8Array): {
|
|
1353
|
+
relId: string;
|
|
1354
|
+
part: string;
|
|
1355
|
+
};
|
|
1356
|
+
/** Add an OLE package part used by a Word w:object. */
|
|
1357
|
+
addEmbeddedObjectResource(bytes: Uint8Array): {
|
|
1358
|
+
relId: string;
|
|
1359
|
+
part: string;
|
|
1360
|
+
};
|
|
1361
|
+
/** Add a DOCX package embedded as an activatable Word.Document.12 object. */
|
|
1362
|
+
addEmbeddedWordDocumentResource(bytes: Uint8Array): {
|
|
1363
|
+
relId: string;
|
|
1364
|
+
part: string;
|
|
1365
|
+
};
|
|
1366
|
+
/** Add a native ChartML part and its embedded editable workbook. */
|
|
1367
|
+
addChartResource(chartXml: string, workbook: Uint8Array): {
|
|
1368
|
+
relId: string;
|
|
1369
|
+
part: string;
|
|
1370
|
+
};
|
|
1371
|
+
/** Add the SmartArt data/layout/style/color parts and its cached diagram drawing. */
|
|
1372
|
+
addSmartArtResources(layoutXml: string, styleXml: string, colorsXml: string, drawingXml: string, dataXml: (drawingRelId: string) => string): {
|
|
1373
|
+
dataRelId: string;
|
|
1374
|
+
layoutRelId: string;
|
|
1375
|
+
styleRelId: string;
|
|
1376
|
+
colorsRelId: string;
|
|
1377
|
+
drawingRelId: string;
|
|
1378
|
+
};
|
|
1263
1379
|
static load(data: ArrayBuffer | Uint8Array): DocxDocument;
|
|
1264
1380
|
media(part: string): Uint8Array | undefined;
|
|
1265
1381
|
/** Effective paragraph properties: docDefaults → table style → style chain → direct. */
|
|
@@ -1321,10 +1437,17 @@ interface PathItem {
|
|
|
1321
1437
|
stroke?: {
|
|
1322
1438
|
color: string;
|
|
1323
1439
|
width: number;
|
|
1440
|
+
opacity?: number;
|
|
1441
|
+
};
|
|
1442
|
+
rotate?: {
|
|
1443
|
+
deg: number;
|
|
1444
|
+
ox: number;
|
|
1445
|
+
oy: number;
|
|
1324
1446
|
};
|
|
1325
1447
|
/** Paint under / over the body text (anchored-shape layering). */
|
|
1326
1448
|
behind?: boolean;
|
|
1327
1449
|
front?: boolean;
|
|
1450
|
+
z?: number;
|
|
1328
1451
|
}
|
|
1329
1452
|
interface TextItem {
|
|
1330
1453
|
kind: "text";
|
|
@@ -1366,6 +1489,9 @@ interface TextItem {
|
|
|
1366
1489
|
href?: string;
|
|
1367
1490
|
/** Present for editable text (absent on numbering labels etc.). */
|
|
1368
1491
|
src?: TextSource;
|
|
1492
|
+
/** Source drawing when this text belongs to an independently editable
|
|
1493
|
+
* text-box story. */
|
|
1494
|
+
textboxStory?: XmlElement;
|
|
1369
1495
|
/** Rotate about a point (px, relative to this item's top-left). */
|
|
1370
1496
|
rotate?: {
|
|
1371
1497
|
deg: number;
|
|
@@ -1377,6 +1503,7 @@ interface TextItem {
|
|
|
1377
1503
|
/** Paint over the body text (non-behindDoc anchored shape content: Word
|
|
1378
1504
|
* layers in-front shapes above the text layer). */
|
|
1379
1505
|
front?: boolean;
|
|
1506
|
+
z?: number;
|
|
1380
1507
|
/** Right-to-left run: renderer sets direction:rtl so the browser shapes and
|
|
1381
1508
|
* orders the (Arabic/Hebrew) glyphs within the span box. */
|
|
1382
1509
|
rtl?: boolean;
|
|
@@ -1407,6 +1534,7 @@ interface RectItem {
|
|
|
1407
1534
|
behind?: boolean;
|
|
1408
1535
|
/** Paint over the body text (non-behindDoc anchored shape fill). */
|
|
1409
1536
|
front?: boolean;
|
|
1537
|
+
z?: number;
|
|
1410
1538
|
}
|
|
1411
1539
|
interface LineEdgeItem {
|
|
1412
1540
|
kind: "edge";
|
|
@@ -1425,6 +1553,7 @@ interface LineEdgeItem {
|
|
|
1425
1553
|
};
|
|
1426
1554
|
/** Paint over the body text (non-behindDoc anchored shape border). */
|
|
1427
1555
|
front?: boolean;
|
|
1556
|
+
z?: number;
|
|
1428
1557
|
}
|
|
1429
1558
|
interface ImageItem {
|
|
1430
1559
|
kind: "image";
|
|
@@ -1442,6 +1571,12 @@ interface ImageItem {
|
|
|
1442
1571
|
b: number;
|
|
1443
1572
|
};
|
|
1444
1573
|
rotation?: number;
|
|
1574
|
+
/** Whole-group rotation about an external origin. */
|
|
1575
|
+
rotate?: {
|
|
1576
|
+
deg: number;
|
|
1577
|
+
ox: number;
|
|
1578
|
+
oy: number;
|
|
1579
|
+
};
|
|
1445
1580
|
/** Picture-watermark "washout" (VML v:imagedata gain/blacklevel, 0..1
|
|
1446
1581
|
* fractions). Per-channel linear recolor, measured against Word's PDF of
|
|
1447
1582
|
* probe2-picture-watermark (gain 0.3, blacklevel 0.35: source 32 -> 215,
|
|
@@ -1462,8 +1597,20 @@ interface ImageItem {
|
|
|
1462
1597
|
* (Word's z-order; without this, later-emitted text spans cover the image
|
|
1463
1598
|
* and it neither shows in front nor receives clicks/drags). */
|
|
1464
1599
|
front?: boolean;
|
|
1600
|
+
z?: number;
|
|
1465
1601
|
/** Source w:drawing element (for interactive resize/move). */
|
|
1466
1602
|
src?: XmlElement;
|
|
1603
|
+
model3D?: Model3DReference;
|
|
1604
|
+
webVideo?: WebVideoReference;
|
|
1605
|
+
embeddedObject?: EmbeddedObjectReference;
|
|
1606
|
+
}
|
|
1607
|
+
interface ChartItem {
|
|
1608
|
+
kind: "chart";
|
|
1609
|
+
x: number;
|
|
1610
|
+
y: number;
|
|
1611
|
+
width: number;
|
|
1612
|
+
height: number;
|
|
1613
|
+
data: ChartData;
|
|
1467
1614
|
}
|
|
1468
1615
|
/** Interactive resize zone over a table boundary (column or row). */
|
|
1469
1616
|
interface DrawingHitItem {
|
|
@@ -1476,16 +1623,28 @@ interface DrawingHitItem {
|
|
|
1476
1623
|
src: XmlElement;
|
|
1477
1624
|
/** Anchored drawings drag by offset; inline ones re-anchor into text. */
|
|
1478
1625
|
anchored: boolean;
|
|
1626
|
+
/** Freehand stroke that may be removed with the Draw ribbon's eraser. */
|
|
1627
|
+
ink?: boolean;
|
|
1628
|
+
/** Native SmartArt diagram selection target. */
|
|
1629
|
+
smartArt?: boolean;
|
|
1479
1630
|
/** A shape fill hit that sits UNDER the shape's own text spans (same z): a
|
|
1480
|
-
* click on bare fill selects the shape,
|
|
1481
|
-
* reach the text
|
|
1631
|
+
* click on bare fill selects or drags the shape, while clicks on its text
|
|
1632
|
+
* glyphs still reach the text editor. */
|
|
1482
1633
|
belowText?: boolean;
|
|
1634
|
+
/** The drawing owns an independently editable text-box story. */
|
|
1635
|
+
textboxStory?: boolean;
|
|
1636
|
+
rotate?: {
|
|
1637
|
+
deg: number;
|
|
1638
|
+
ox: number;
|
|
1639
|
+
oy: number;
|
|
1640
|
+
};
|
|
1641
|
+
z?: number;
|
|
1483
1642
|
}
|
|
1484
1643
|
interface GripItem {
|
|
1485
1644
|
kind: "grip";
|
|
1486
1645
|
/** "col": vertical zone at x spanning y1..y2. "row": horizontal zone at y1
|
|
1487
|
-
* spanning x..x2. */
|
|
1488
|
-
axis: "col" | "row";
|
|
1646
|
+
* spanning x..x2. "move": table bounds x..x2, y1..y2. */
|
|
1647
|
+
axis: "col" | "row" | "move";
|
|
1489
1648
|
x: number;
|
|
1490
1649
|
y1: number;
|
|
1491
1650
|
y2: number;
|
|
@@ -1545,10 +1704,16 @@ interface WarpTextItem {
|
|
|
1545
1704
|
fill: string;
|
|
1546
1705
|
/** Preset name (textArchUp, textWave1, textChevron, textCirclePour, …). */
|
|
1547
1706
|
warp: string;
|
|
1707
|
+
rotate?: {
|
|
1708
|
+
deg: number;
|
|
1709
|
+
ox: number;
|
|
1710
|
+
oy: number;
|
|
1711
|
+
};
|
|
1548
1712
|
behind?: boolean;
|
|
1549
1713
|
front?: boolean;
|
|
1714
|
+
z?: number;
|
|
1550
1715
|
}
|
|
1551
|
-
type PageItem = TextItem | PathItem | RectItem | LineEdgeItem | ImageItem | DrawingHitItem | GripItem | WordArtItem | WarpTextItem;
|
|
1716
|
+
type PageItem = TextItem | PathItem | RectItem | LineEdgeItem | ImageItem | ChartItem | DrawingHitItem | GripItem | WordArtItem | WarpTextItem;
|
|
1552
1717
|
interface LaidOutPage {
|
|
1553
1718
|
width: number;
|
|
1554
1719
|
height: number;
|
|
@@ -1570,6 +1735,13 @@ interface LayoutResult {
|
|
|
1570
1735
|
* back as LayoutOptions.prev to enable incremental relayout. Not part of the
|
|
1571
1736
|
* rendered output and ignored by the equivalence harness. */
|
|
1572
1737
|
_incr?: unknown;
|
|
1738
|
+
/** Internal marker: unchanged pages in this result retain exact object
|
|
1739
|
+
* identity from the previous layout, so the DOM diff can use identity
|
|
1740
|
+
* instead of structurally walking a dense changed page. */
|
|
1741
|
+
_incremental?: boolean;
|
|
1742
|
+
/** Exclusive global page index through which an incremental render may run
|
|
1743
|
+
* pageEq before the page containing the exact dirty text source. */
|
|
1744
|
+
_incrementalStructuralPrefixEnd?: number;
|
|
1573
1745
|
/** Opaque page state used to refresh headers/footers without repaginating
|
|
1574
1746
|
* the body when their measured geometry is unchanged. */
|
|
1575
1747
|
_hf?: unknown;
|
|
@@ -1625,6 +1797,9 @@ interface LayoutOptions {
|
|
|
1625
1797
|
* multi-block edits (paste, paragraph split/merge, undo/redo, structural ops),
|
|
1626
1798
|
* which take the full scan. */
|
|
1627
1799
|
dirtyHint?: XmlElement;
|
|
1800
|
+
/** Exact retained text element changed by a local edit. Used only to bound
|
|
1801
|
+
* structural page comparison before the first actually dirty page. */
|
|
1802
|
+
dirtySource?: XmlElement;
|
|
1628
1803
|
}
|
|
1629
1804
|
declare function layoutDocument(doc: DocxDocument, options?: LayoutOptions): LayoutResult;
|
|
1630
1805
|
|
|
@@ -1762,6 +1937,25 @@ interface SelectionFormat {
|
|
|
1762
1937
|
verticalAlign?: "superscript" | "subscript";
|
|
1763
1938
|
}
|
|
1764
1939
|
|
|
1940
|
+
type ShapePreset = "rectangle" | "roundedRectangle" | "ellipse" | "diamond" | "textBox";
|
|
1941
|
+
type WordArtPreset = "plain" | "archUp" | "archDown" | "wave" | "chevron";
|
|
1942
|
+
type DrawingTool = {
|
|
1943
|
+
kind?: "pen";
|
|
1944
|
+
color: string;
|
|
1945
|
+
width: number;
|
|
1946
|
+
} | {
|
|
1947
|
+
kind: "highlighter";
|
|
1948
|
+
color: string;
|
|
1949
|
+
width: number;
|
|
1950
|
+
} | {
|
|
1951
|
+
kind: "eraser";
|
|
1952
|
+
size: number;
|
|
1953
|
+
} | {
|
|
1954
|
+
kind: "lasso";
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
type ObjectArrangeAction = "alignLeft" | "alignCenter" | "alignRight" | "alignTop" | "alignMiddle" | "alignBottom" | "rotateLeft" | "rotateRight" | "bringToFront" | "sendToBack";
|
|
1958
|
+
|
|
1765
1959
|
type ParagraphAlignment = "left" | "center" | "right" | "justify";
|
|
1766
1960
|
interface PageLayoutPatch {
|
|
1767
1961
|
/** Margins in inches. */
|
|
@@ -1771,6 +1965,8 @@ interface PageLayoutPatch {
|
|
|
1771
1965
|
bottom?: number;
|
|
1772
1966
|
left?: number;
|
|
1773
1967
|
};
|
|
1968
|
+
/** Document-global facing-page mode (settings.xml w:mirrorMargins). */
|
|
1969
|
+
mirrorMargins?: boolean;
|
|
1774
1970
|
/** Page size in inches (before orientation). */
|
|
1775
1971
|
size?: {
|
|
1776
1972
|
width: number;
|
|
@@ -1802,6 +1998,11 @@ type TableOp = "rowAbove" | "rowBelow" | "deleteRow" | "colLeft" | "colRight" |
|
|
|
1802
1998
|
v: "top" | "center" | "bottom";
|
|
1803
1999
|
};
|
|
1804
2000
|
|
|
2001
|
+
interface CoverPageContent {
|
|
2002
|
+
title: string;
|
|
2003
|
+
subtitle?: string;
|
|
2004
|
+
author?: string;
|
|
2005
|
+
}
|
|
1805
2006
|
interface LineNumberingPatch {
|
|
1806
2007
|
/** Turn margin line numbering on/off for the target section(s). */
|
|
1807
2008
|
enabled: boolean;
|
|
@@ -1821,17 +2022,21 @@ interface MissingFont {
|
|
|
1821
2022
|
}
|
|
1822
2023
|
|
|
1823
2024
|
/** Toolbar control groups a host can disable via the `features` prop. */
|
|
1824
|
-
type ToolbarFeature = "history" | "styles" | "font" | "size" | "format" | "color" | "highlight" | "alignment" | "indent" | "spacing" | "link" | "lists" | "table" | "image" | "comment" | "footnote" | "layout" | "download";
|
|
1825
|
-
|
|
2025
|
+
type ToolbarFeature = "history" | "styles" | "font" | "size" | "format" | "color" | "highlight" | "alignment" | "indent" | "spacing" | "link" | "lists" | "table" | "image" | "icon" | "screenshot" | "model3D" | "media" | "object" | "chart" | "smartArt" | "comment" | "footnote" | "bookmark" | "crossReference" | "dateTime" | "field" | "equation" | "symbol" | "shape" | "textBox" | "wordArt" | "drawing" | "arrange" | "dropCap" | "headerFooter" | "coverPage" | "pageNumber" | "break" | "layout" | "download";
|
|
2026
|
+
type ToolbarMode = "simple" | "advanced";
|
|
2027
|
+
interface DocxToolbarProps {
|
|
1826
2028
|
api: DocxViewApi | null;
|
|
1827
2029
|
onSave?: (bytes: Uint8Array) => void;
|
|
2030
|
+
/** Simple shows basic Home editing; advanced adds the Insert, Draw, and Layout ribbons. */
|
|
2031
|
+
mode?: ToolbarMode;
|
|
1828
2032
|
/** Per-group overrides; every group defaults to enabled. */
|
|
1829
2033
|
features?: Partial<Record<ToolbarFeature, boolean>>;
|
|
1830
2034
|
/** Extra class on the toolbar root (e.g. a scope for CSS-variable overrides). */
|
|
1831
2035
|
className?: string;
|
|
1832
2036
|
/** Inline overrides merged onto the toolbar root; wins over the defaults. */
|
|
1833
2037
|
style?: React.CSSProperties;
|
|
1834
|
-
}
|
|
2038
|
+
}
|
|
2039
|
+
declare function DocxToolbar({ api, onSave, mode, features, className, style, }: DocxToolbarProps): react.JSX.Element;
|
|
1835
2040
|
|
|
1836
2041
|
interface DocxViewApi {
|
|
1837
2042
|
/** Apply character formatting to the current browser selection. */
|
|
@@ -1842,6 +2047,44 @@ interface DocxViewApi {
|
|
|
1842
2047
|
addFootnote(text: string): boolean;
|
|
1843
2048
|
/** Insert a dynamic page-number field at the caret (body, header or footer). */
|
|
1844
2049
|
insertPageNumber(kind?: "page" | "pageOfTotal"): boolean;
|
|
2050
|
+
/** Insert any Word field instruction supported by the renderer. */
|
|
2051
|
+
insertField(instruction: string, cachedResult?: string): boolean;
|
|
2052
|
+
/** Insert a live DATE or TIME field with an optional Word date picture. */
|
|
2053
|
+
insertDateTime(kind: "date" | "time", picture?: string): boolean;
|
|
2054
|
+
/** Named bookmarks in document order. */
|
|
2055
|
+
listBookmarks(): string[];
|
|
2056
|
+
/** Add a bookmark around the selection, or a zero-length bookmark at the caret. */
|
|
2057
|
+
addBookmark(name: string): boolean;
|
|
2058
|
+
/** Insert a live text or page reference to a bookmark. */
|
|
2059
|
+
insertCrossReference(bookmark: string, kind: "text" | "page"): boolean;
|
|
2060
|
+
/** Insert an editable inline equation from WordInWeb's linear math syntax. */
|
|
2061
|
+
insertEquation(linear: string): boolean;
|
|
2062
|
+
/** Insert a Unicode symbol through the normal undo/suggestion-aware typing path. */
|
|
2063
|
+
insertSymbol(symbol: string): boolean;
|
|
2064
|
+
/** Insert a floating editable DrawingML shape at the caret. */
|
|
2065
|
+
insertShape(preset: ShapePreset, text?: string): boolean;
|
|
2066
|
+
/** Insert editable DrawingML WordArt at the caret. */
|
|
2067
|
+
insertWordArt(text: string, preset?: WordArtPreset): boolean;
|
|
2068
|
+
/** Insert a native editable ChartML chart at the caret. */
|
|
2069
|
+
insertChart(data: ChartData): boolean;
|
|
2070
|
+
/** Replace the selected native chart's type and data. */
|
|
2071
|
+
updateSelectedChart(data: ChartData): boolean;
|
|
2072
|
+
/** Insert a native editable SmartArt diagram at the caret. */
|
|
2073
|
+
insertSmartArt(data: SmartArtData): boolean;
|
|
2074
|
+
/** Replace the selected native SmartArt diagram's layout and node text. */
|
|
2075
|
+
updateSelectedSmartArt(data: SmartArtData): boolean;
|
|
2076
|
+
/** Insert a native Office 3D model with an optional custom poster image. */
|
|
2077
|
+
insertModel3D(file: Blob, poster?: Blob): Promise<boolean>;
|
|
2078
|
+
/** Insert Word online-video metadata with a browser-safe poster. */
|
|
2079
|
+
insertOnlineVideo(url: string): Promise<boolean>;
|
|
2080
|
+
/** Embed an arbitrary file as a native OLE Package object. */
|
|
2081
|
+
insertEmbeddedObject(file: Blob, filename?: string): Promise<boolean>;
|
|
2082
|
+
/** Activate a freehand pen, or return to selection mode with null. */
|
|
2083
|
+
setDrawingTool(tool: DrawingTool | null): void;
|
|
2084
|
+
/** Current freehand pen, or null while in selection mode. */
|
|
2085
|
+
getDrawingTool(): DrawingTool | null;
|
|
2086
|
+
/** Align, rotate, or reorder the selected image, shape, or ink group. */
|
|
2087
|
+
arrangeObject(action: ObjectArrangeAction): boolean;
|
|
1845
2088
|
undo(): void;
|
|
1846
2089
|
redo(): void;
|
|
1847
2090
|
canUndo(): boolean;
|
|
@@ -1852,6 +2095,8 @@ interface DocxViewApi {
|
|
|
1852
2095
|
tableOp(op: TableOp): void;
|
|
1853
2096
|
/** Insert an image file at the caret (inline, natural size clamped to column). */
|
|
1854
2097
|
insertImage(file: Blob): Promise<void>;
|
|
2098
|
+
/** Capture a screen, window, or browser tab and insert the current frame as a PNG picture. */
|
|
2099
|
+
insertScreenshot(): Promise<ScreenshotInsertResult>;
|
|
1855
2100
|
/** Align the paragraph(s) under the caret or selection. */
|
|
1856
2101
|
setAlignment(align: ParagraphAlignment): void;
|
|
1857
2102
|
/** Apply a named paragraph style (null clears back to Normal). */
|
|
@@ -1872,6 +2117,8 @@ interface DocxViewApi {
|
|
|
1872
2117
|
beforePt?: number | null;
|
|
1873
2118
|
afterPt?: number | null;
|
|
1874
2119
|
}): void;
|
|
2120
|
+
/** Apply or remove a native Word drop cap on the caret paragraph. */
|
|
2121
|
+
setDropCap(mode: "drop" | "margin" | null, lines?: number): boolean;
|
|
1875
2122
|
/** Remove direct character formatting from the selection. */
|
|
1876
2123
|
clearFormatting(): void;
|
|
1877
2124
|
/** Change the selection's case. */
|
|
@@ -1897,6 +2144,10 @@ interface DocxViewApi {
|
|
|
1897
2144
|
setPageLayout(patch: PageLayoutPatch, scope?: "document" | "section"): void;
|
|
1898
2145
|
/** Insert a page/column break or a section break at the caret. */
|
|
1899
2146
|
insertBreak(kind: "page" | "column" | "sectionNextPage" | "sectionContinuous"): boolean;
|
|
2147
|
+
/** Insert a full blank page at the caret (two consecutive page breaks). */
|
|
2148
|
+
insertBlankPage(): boolean;
|
|
2149
|
+
/** Insert an editable cover page before the current document. */
|
|
2150
|
+
insertCoverPage(content: CoverPageContent): boolean;
|
|
1900
2151
|
/** Toggle/configure margin line numbers (Word's Layout > Line Numbers).
|
|
1901
2152
|
* scope "section" targets the caret's section; "document" every section. */
|
|
1902
2153
|
setLineNumbering(patch: LineNumberingPatch, scope?: "document" | "section"): void;
|
|
@@ -1908,6 +2159,8 @@ interface DocxViewApi {
|
|
|
1908
2159
|
} | null;
|
|
1909
2160
|
/** Leave header/footer editing mode. */
|
|
1910
2161
|
closeHeaderFooter(): void;
|
|
2162
|
+
/** Enter and, if needed, create the header or footer on the caret's page. */
|
|
2163
|
+
openHeaderFooter(kind: "header" | "footer"): boolean;
|
|
1911
2164
|
/** Effective formatting of the current selection (toolbar state), or null. */
|
|
1912
2165
|
getSelectionFormat(): SelectionFormat | null;
|
|
1913
2166
|
/** Print the rendered pages (browser print dialog / save as PDF). */
|
|
@@ -1936,6 +2189,7 @@ interface DocxViewApi {
|
|
|
1936
2189
|
rejectAllRevisions(): number;
|
|
1937
2190
|
document: DocxDocument;
|
|
1938
2191
|
}
|
|
2192
|
+
type ScreenshotInsertResult = "inserted" | "unsupported" | "cancelled" | "error" | "no-caret";
|
|
1939
2193
|
interface DocxViewProps {
|
|
1940
2194
|
/** The document: raw bytes, a File/Blob, or a URL to fetch. */
|
|
1941
2195
|
source: ArrayBuffer | Uint8Array | Blob | string;
|
|
@@ -1990,4 +2244,4 @@ interface DocxViewProps {
|
|
|
1990
2244
|
*/
|
|
1991
2245
|
declare function DocxView({ source, zoom, fitWidth, narrowWidth, editable, className, style, onLoad, onReady, onError, commentAuthor, showComments, revisions, onMissingFonts, }: DocxViewProps): react.JSX.Element;
|
|
1992
2246
|
|
|
1993
|
-
export { DocxDocument, DocxToolbar, DocxView, type DocxViewApi, type DocxViewProps, type LineNumberingPatch, type PageLayoutPatch, type ParagraphAlignment, type RunFormatPatch, type SelectionFormat, layoutDocument, printPages, renderToDom };
|
|
2247
|
+
export { type CoverPageContent, DocxDocument, DocxToolbar, type DocxToolbarProps, DocxView, type DocxViewApi, type DocxViewProps, type DrawingTool, type LineNumberingPatch, type PageLayoutPatch, type ParagraphAlignment, type RunFormatPatch, type ScreenshotInsertResult, type SelectionFormat, type ShapePreset, type ToolbarFeature, type ToolbarMode, layoutDocument, printPages, renderToDom };
|