@extend-ai/react-docx 0.7.0-alpha.3 → 0.7.0-alpha.5
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/dist/{chunk-BGCGPO6Q.js → chunk-2SXGXGWO.js} +94 -68
- package/dist/chunk-2SXGXGWO.js.map +1 -0
- package/dist/chunk-P3B3Q7Y6.js +422 -0
- package/dist/chunk-P3B3Q7Y6.js.map +1 -0
- package/dist/chunk-QOXSE6WY.js +73 -0
- package/dist/chunk-QOXSE6WY.js.map +1 -0
- package/dist/docx-import-worker.cjs +710 -0
- package/dist/docx-import-worker.cjs.map +1 -0
- package/dist/docx-import-worker.d.cts +2 -0
- package/dist/docx-import-worker.d.ts +2 -0
- package/dist/docx-import-worker.js +61 -0
- package/dist/docx-import-worker.js.map +1 -0
- package/dist/docx_wasm_bg.wasm +0 -0
- package/dist/index.cjs +1322 -542
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -2
- package/dist/index.d.ts +96 -2
- package/dist/index.js +922 -659
- package/dist/index.js.map +1 -1
- package/dist/src-NDPFDRVM.js +14 -0
- package/dist/{src-XA2NEWYM.js → src-PJYTN6DB.js} +3 -2
- package/dist/src-PJYTN6DB.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-BGCGPO6Q.js.map +0 -1
- /package/dist/{src-XA2NEWYM.js.map → src-NDPFDRVM.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -32,6 +32,11 @@ interface WasmOoxmlPart {
|
|
|
32
32
|
content: string;
|
|
33
33
|
}
|
|
34
34
|
interface WasmOoxmlPackage {
|
|
35
|
+
parts: Record<string, WasmOoxmlPart>;
|
|
36
|
+
binaryAssets: Record<string, Uint8Array>;
|
|
37
|
+
}
|
|
38
|
+
/** Package shape produced by pre-Uint8Array versions of this library. */
|
|
39
|
+
interface LegacyWasmOoxmlPackage {
|
|
35
40
|
parts: Record<string, WasmOoxmlPart>;
|
|
36
41
|
binaryAssets: Record<string, number[]>;
|
|
37
42
|
}
|
|
@@ -396,6 +401,17 @@ interface DocumentNoteDefinition {
|
|
|
396
401
|
text: string;
|
|
397
402
|
nodes?: DocNode[];
|
|
398
403
|
}
|
|
404
|
+
interface DocumentCommentDefinition {
|
|
405
|
+
id: number;
|
|
406
|
+
author?: string;
|
|
407
|
+
initials?: string;
|
|
408
|
+
date?: string;
|
|
409
|
+
text: string;
|
|
410
|
+
/** Comment id this comment replies to (from commentsExtended threading). */
|
|
411
|
+
parentId?: number;
|
|
412
|
+
/** True when the comment thread is marked done in commentsExtended. */
|
|
413
|
+
resolved?: boolean;
|
|
414
|
+
}
|
|
399
415
|
interface DocumentCompatibilitySettings {
|
|
400
416
|
suppressSpacingBeforeAfterPageBreak?: boolean;
|
|
401
417
|
usePrinterMetrics?: boolean;
|
|
@@ -422,6 +438,7 @@ interface DocModel {
|
|
|
422
438
|
compatibility?: DocumentCompatibilitySettings;
|
|
423
439
|
footnotes?: DocumentNoteDefinition[];
|
|
424
440
|
endnotes?: DocumentNoteDefinition[];
|
|
441
|
+
comments?: DocumentCommentDefinition[];
|
|
425
442
|
};
|
|
426
443
|
}
|
|
427
444
|
|
|
@@ -613,6 +630,32 @@ interface DocxTrackedChange {
|
|
|
613
630
|
nodeIndex: number;
|
|
614
631
|
location: DocxTextRangeLocation;
|
|
615
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* A document comment anchored to a text range.
|
|
635
|
+
*
|
|
636
|
+
* Comment definitions come from `word/comments.xml` (threading and resolution
|
|
637
|
+
* state from `word/commentsExtended.xml`); the anchor location is resolved
|
|
638
|
+
* from the paragraph that carries the `commentReference` run.
|
|
639
|
+
*/
|
|
640
|
+
interface DocxComment {
|
|
641
|
+
/** Stable identifier (unique per rendered anchor). */
|
|
642
|
+
id: string;
|
|
643
|
+
/** Comment id from `word/comments.xml` (`w:id`). */
|
|
644
|
+
commentId: number;
|
|
645
|
+
author?: string;
|
|
646
|
+
initials?: string;
|
|
647
|
+
date?: string;
|
|
648
|
+
/** Plain-text comment body. */
|
|
649
|
+
text: string;
|
|
650
|
+
/** Comment id this comment replies to, when part of a thread. */
|
|
651
|
+
parentId?: number;
|
|
652
|
+
/** True when the comment thread is marked done. */
|
|
653
|
+
resolved?: boolean;
|
|
654
|
+
/** Plain-text excerpt of the commented document range. */
|
|
655
|
+
anchorText?: string;
|
|
656
|
+
nodeIndex: number;
|
|
657
|
+
location: DocxTextRangeLocation;
|
|
658
|
+
}
|
|
616
659
|
type DocxLineSpacingRule = "auto" | "exact" | "atLeast";
|
|
617
660
|
type DocxSelectionSessionKind = "idle" | "pointer" | "keyboard" | "composition" | "command" | "history-restore";
|
|
618
661
|
interface DocxLineSpacingInfo {
|
|
@@ -660,6 +703,12 @@ interface UseDocxEditorOptions {
|
|
|
660
703
|
* @defaultValue `false`
|
|
661
704
|
*/
|
|
662
705
|
initialShowTrackedChanges?: boolean;
|
|
706
|
+
/**
|
|
707
|
+
* Whether document comments are visible when the editor first mounts.
|
|
708
|
+
*
|
|
709
|
+
* @defaultValue `false`
|
|
710
|
+
*/
|
|
711
|
+
initialShowComments?: boolean;
|
|
663
712
|
}
|
|
664
713
|
/**
|
|
665
714
|
* Controller returned by `useDocxEditor`.
|
|
@@ -708,6 +757,8 @@ interface DocxEditorController {
|
|
|
708
757
|
availableParagraphStyles: ParagraphStyleDefinition[];
|
|
709
758
|
trackedChanges: DocxTrackedChange[];
|
|
710
759
|
showTrackedChanges: boolean;
|
|
760
|
+
comments: DocxComment[];
|
|
761
|
+
showComments: boolean;
|
|
711
762
|
currentPage: number;
|
|
712
763
|
totalPages: number;
|
|
713
764
|
hasUnorderedList: boolean;
|
|
@@ -718,8 +769,10 @@ interface DocxEditorController {
|
|
|
718
769
|
setStatus: React.Dispatch<React.SetStateAction<string>>;
|
|
719
770
|
setDocumentTheme: (theme: DocxDocumentTheme) => void;
|
|
720
771
|
setShowTrackedChanges: (showTrackedChanges: boolean) => void;
|
|
772
|
+
setShowComments: (showComments: boolean) => void;
|
|
721
773
|
syncPaginationInfo: (pagination: DocxPaginationInfo) => void;
|
|
722
774
|
toggleShowTrackedChanges: () => void;
|
|
775
|
+
toggleShowComments: () => void;
|
|
723
776
|
importDocxFile: (file: File) => Promise<void>;
|
|
724
777
|
newDocument: () => void;
|
|
725
778
|
exportDocx: () => void;
|
|
@@ -1043,6 +1096,17 @@ interface DocxEditorViewerProps {
|
|
|
1043
1096
|
* Custom renderer for tracked-change cards in the page gutter.
|
|
1044
1097
|
*/
|
|
1045
1098
|
renderTrackedChangeCard?: (props: DocxTrackedChangeCardRenderProps) => React.ReactNode;
|
|
1099
|
+
/**
|
|
1100
|
+
* Overrides whether document comments are shown.
|
|
1101
|
+
*
|
|
1102
|
+
* If omitted, the value from `useDocxComments(editor)` or
|
|
1103
|
+
* `editor.showComments` is used.
|
|
1104
|
+
*/
|
|
1105
|
+
showComments?: boolean;
|
|
1106
|
+
/**
|
|
1107
|
+
* Custom renderer for comment cards in the page gutter.
|
|
1108
|
+
*/
|
|
1109
|
+
renderCommentCard?: (props: DocxCommentCardRenderProps) => React.ReactNode;
|
|
1046
1110
|
/**
|
|
1047
1111
|
* Custom renderer for table context menus.
|
|
1048
1112
|
*
|
|
@@ -1080,6 +1144,22 @@ interface DocxTrackedChangeCardRenderProps {
|
|
|
1080
1144
|
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1081
1145
|
style: React.CSSProperties;
|
|
1082
1146
|
}
|
|
1147
|
+
interface DocxCommentCardRenderProps {
|
|
1148
|
+
/** Comment data represented by the card. */
|
|
1149
|
+
comment: DocxComment;
|
|
1150
|
+
/** Plain-text comment body (already normalized for display). */
|
|
1151
|
+
snippet: string;
|
|
1152
|
+
/** Formatted comment date, if the source document provided one. */
|
|
1153
|
+
formattedDate?: string;
|
|
1154
|
+
/** Accent color chosen for comments. */
|
|
1155
|
+
accentColor: string;
|
|
1156
|
+
/** Current document theme. */
|
|
1157
|
+
documentTheme: DocxDocumentTheme;
|
|
1158
|
+
/** Zero-based page index that owns the card. */
|
|
1159
|
+
pageIndex: number;
|
|
1160
|
+
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1161
|
+
style: React.CSSProperties;
|
|
1162
|
+
}
|
|
1083
1163
|
/**
|
|
1084
1164
|
* Viewer interaction mode.
|
|
1085
1165
|
*
|
|
@@ -1124,6 +1204,14 @@ interface UseDocxTrackChangesResult {
|
|
|
1124
1204
|
changesByLocation: Map<string, DocxTrackedChange[]>;
|
|
1125
1205
|
getChangesForLocation: (location: DocxTextRangeLocation) => DocxTrackedChange[];
|
|
1126
1206
|
}
|
|
1207
|
+
interface UseDocxCommentsResult {
|
|
1208
|
+
comments: DocxComment[];
|
|
1209
|
+
showComments: boolean;
|
|
1210
|
+
setShowComments: (showComments: boolean) => void;
|
|
1211
|
+
toggleShowComments: () => void;
|
|
1212
|
+
commentsByLocation: Map<string, DocxComment[]>;
|
|
1213
|
+
getCommentsForLocation: (location: DocxTextRangeLocation) => DocxComment[];
|
|
1214
|
+
}
|
|
1127
1215
|
interface DocxSectionColumnLayout {
|
|
1128
1216
|
count: number;
|
|
1129
1217
|
gapPx: number;
|
|
@@ -1302,9 +1390,15 @@ declare function useDocxLineSpacing(editor: Pick<DocxEditorController, "selected
|
|
|
1302
1390
|
declare function useDocxBorders(editor: Pick<DocxEditorController, "selectedBorderContext" | "activeBorderPresets" | "applyBorderPreset">): UseDocxBordersResult;
|
|
1303
1391
|
declare function useDocxFormFields(editor: Pick<DocxEditorController, "model" | "selectedFormField" | "selectFormField" | "setFormFieldValue" | "toggleFormCheckbox" | "updateFormFieldWidget">): UseDocxFormFieldsResult;
|
|
1304
1392
|
declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "trackedChanges" | "showTrackedChanges" | "setShowTrackedChanges" | "toggleShowTrackedChanges">): UseDocxTrackChangesResult;
|
|
1393
|
+
/**
|
|
1394
|
+
* Exposes document comments and the show/hide state, mirroring
|
|
1395
|
+
* `useDocxTrackChanges`. Pair with `DocxEditorViewer`'s `renderCommentCard`
|
|
1396
|
+
* to fully customize how comments render.
|
|
1397
|
+
*/
|
|
1398
|
+
declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments">): UseDocxCommentsResult;
|
|
1305
1399
|
declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
|
|
1306
1400
|
declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
|
|
1307
|
-
declare function DocxEditorViewer({ editor, className, style, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
|
|
1401
|
+
declare function DocxEditorViewer({ editor, className, style, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, showComments, renderCommentCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
|
|
1308
1402
|
|
|
1309
1403
|
interface InsertParagraphOptions {
|
|
1310
1404
|
paragraphStyle?: ParagraphStyle;
|
|
@@ -1618,4 +1712,4 @@ interface UseDocxModelState {
|
|
|
1618
1712
|
declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
|
|
1619
1713
|
declare function ReactDocxViewer({ file, model, className, layoutOptions, emptyState }: ReactDocxViewerProps): React.JSX.Element;
|
|
1620
1714
|
|
|
1621
|
-
export { DEFAULT_MIN_PARAGRAPH_LINE_HEIGHT_PX, DEFAULT_PAGE_OVERFLOW_TOLERANCE_PX, type DocModel, type DocNode, type DocumentCompatibilitySettings, type DocumentNoteDefinition, type DocumentPageNodeSegment, type DocumentPageRange, type DocumentPageSegmentationOptions, type DocumentSection, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxDocumentTheme, type DocxEditorController, type DocxEditorSelection, DocxEditorViewer, type DocxEditorViewerMode, type DocxEditorViewerProps, type DocxFormFieldLocation, type DocxHeadingStyleMap, type DocxImageDropTarget, type DocxImageLocation, type DocxImageWrapMenuOption, type DocxImageWrapMode, type DocxImageWrapState, type DocxLineSpacingInfo, type DocxListType, type DocxPageLayoutInfo, type DocxPageThumbnailBounds, type DocxPageThumbnailItem, type DocxPageThumbnailResolution, type DocxPageThumbnailResolutionOptions, type DocxPageThumbnailStatus, type DocxPageVirtualizationOptions, type DocxPaginationInfo, type DocxSectionColumnLayout, type DocxSelectedFormField, type DocxTableContextMenuAction, type DocxTableContextMenuActionId, type DocxTableContextMenuContext, type DocxTableContextMenuRenderProps, type DocxTextRange, type DocxTextRangeLocation, type DocxTrackedChange, type DocxTrackedChangeCardRenderProps, type DocxTrackedChangeKind, type DocxViewerThumbnails, type DocxVisiblePageRange, type FooterSection, type FormFieldCheckboxWidgetSettings, type FormFieldDropdownWidgetSettings, type FormFieldOption, type FormFieldRunNode, type FormFieldSourceKind, type FormFieldTextWidgetSettings, type FormFieldType, type FormFieldWidgetSettings, type HeaderSection, type HeadingLevel, type ImageRunNode, type InsertParagraphOptions, type LayoutBlock, type LayoutFragmentSource, type LayoutImageRun, type LayoutOptions, type LayoutPage, type LayoutParagraphBlock, type LayoutRun, type LayoutSnapshot, type LayoutSnapshotBlockFragment, type LayoutSnapshotImageRun, type LayoutSnapshotMargins, type LayoutSnapshotOptions, type LayoutSnapshotPage, type LayoutSnapshotPageSize, type LayoutSnapshotParagraphFragment, type LayoutSnapshotRect, type LayoutSnapshotRun, type LayoutSnapshotTableCellFragment, type LayoutSnapshotTableFragment, type LayoutSnapshotTableRowFragment, type LayoutSnapshotTextRun, type LayoutTableBlock, type LayoutTableCell, type LayoutTableRow, type LayoutTextRun, type LetterheadColumnSegmentGroup, type NumberingAbstractDefinition, type NumberingDefinitionSet, type NumberingInstanceDefinition, type NumberingLevelDefinition, type NumberingPictureBulletDefinition, type OoxmlPackage, type OoxmlPart, type OverflowBreakCollectionOptions, type PageSegmentationCallbacks, type PaginationSectionMetrics, type ParagraphAlignment, type ParagraphBorderSet, type ParagraphBorderStyle, type ParagraphChildNode, type ParagraphIndent, type ParagraphLineRange, type ParagraphNode, type ParagraphNumbering, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, ReactDocxViewer, type ReactDocxViewerProps, type ResolvedDocument, type ResolvedDocumentSection, type ResolvedLayoutMetrics, type ResolvedModelSection, type TableBorderSet, type TableBorderStyle, type TableBoxSpacing, type TableCellContentNode, type TableCellNode, type TableCellStyle, type TableExplicitPageBreakInfo, type TableNode, type TableRowNode, type TableRowRange, type TableRowStyle, type TableStyle, type TextRunBorderStyle, type TextRunNode, type TextStyle, type UpdateTextOptions, type UseDocxBordersResult, type UseDocxDocumentThemeResult, type UseDocxEditorOptions, type UseDocxFormFieldsResult, type UseDocxImageWrapMenuResult, type UseDocxLineSpacingResult, type UseDocxModelState, type UseDocxPageLayoutResult, type UseDocxPageThumbnailsOptions, type UseDocxPageThumbnailsResult, type UseDocxPaginationResult, type UseDocxParagraphStylesResult, type UseDocxTrackChangesResult, type UseDocxViewerThumbnailsOptions, type WasmOoxmlPackage, type WasmSource, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createMinimalDocxPackage, defaultStarterModel, duplicateParagraph, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setParagraphAlignment, setParagraphHeading, setRunColor, setRunHighlight, setWasmSource, splitParagraphChildrenAtTextOffsets, toggleRunStyleFlag, updateParagraphText, updateTableCellParagraphText, updateTableCellParagraphTextRecursive, updateTableCellText, useDocxBorders, useDocxDocumentTheme, useDocxEditor, useDocxFormFields, useDocxImageWrapMenu, useDocxLineSpacing, useDocxModel, useDocxPageLayout, useDocxPageThumbnails, useDocxPagination, useDocxParagraphStyles, useDocxTrackChanges, useDocxViewerThumbnails, withPart };
|
|
1715
|
+
export { DEFAULT_MIN_PARAGRAPH_LINE_HEIGHT_PX, DEFAULT_PAGE_OVERFLOW_TOLERANCE_PX, type DocModel, type DocNode, type DocumentCommentDefinition, type DocumentCompatibilitySettings, type DocumentNoteDefinition, type DocumentPageNodeSegment, type DocumentPageRange, type DocumentPageSegmentationOptions, type DocumentSection, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxComment, type DocxCommentCardRenderProps, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxDocumentTheme, type DocxEditorController, type DocxEditorSelection, DocxEditorViewer, type DocxEditorViewerMode, type DocxEditorViewerProps, type DocxFormFieldLocation, type DocxHeadingStyleMap, type DocxImageDropTarget, type DocxImageLocation, type DocxImageWrapMenuOption, type DocxImageWrapMode, type DocxImageWrapState, type DocxLineSpacingInfo, type DocxListType, type DocxPageLayoutInfo, type DocxPageThumbnailBounds, type DocxPageThumbnailItem, type DocxPageThumbnailResolution, type DocxPageThumbnailResolutionOptions, type DocxPageThumbnailStatus, type DocxPageVirtualizationOptions, type DocxPaginationInfo, type DocxSectionColumnLayout, type DocxSelectedFormField, type DocxTableContextMenuAction, type DocxTableContextMenuActionId, type DocxTableContextMenuContext, type DocxTableContextMenuRenderProps, type DocxTextRange, type DocxTextRangeLocation, type DocxTrackedChange, type DocxTrackedChangeCardRenderProps, type DocxTrackedChangeKind, type DocxViewerThumbnails, type DocxVisiblePageRange, type FooterSection, type FormFieldCheckboxWidgetSettings, type FormFieldDropdownWidgetSettings, type FormFieldOption, type FormFieldRunNode, type FormFieldSourceKind, type FormFieldTextWidgetSettings, type FormFieldType, type FormFieldWidgetSettings, type HeaderSection, type HeadingLevel, type ImageRunNode, type InsertParagraphOptions, type LayoutBlock, type LayoutFragmentSource, type LayoutImageRun, type LayoutOptions, type LayoutPage, type LayoutParagraphBlock, type LayoutRun, type LayoutSnapshot, type LayoutSnapshotBlockFragment, type LayoutSnapshotImageRun, type LayoutSnapshotMargins, type LayoutSnapshotOptions, type LayoutSnapshotPage, type LayoutSnapshotPageSize, type LayoutSnapshotParagraphFragment, type LayoutSnapshotRect, type LayoutSnapshotRun, type LayoutSnapshotTableCellFragment, type LayoutSnapshotTableFragment, type LayoutSnapshotTableRowFragment, type LayoutSnapshotTextRun, type LayoutTableBlock, type LayoutTableCell, type LayoutTableRow, type LayoutTextRun, type LegacyWasmOoxmlPackage, type LetterheadColumnSegmentGroup, type NumberingAbstractDefinition, type NumberingDefinitionSet, type NumberingInstanceDefinition, type NumberingLevelDefinition, type NumberingPictureBulletDefinition, type OoxmlPackage, type OoxmlPart, type OverflowBreakCollectionOptions, type PageSegmentationCallbacks, type PaginationSectionMetrics, type ParagraphAlignment, type ParagraphBorderSet, type ParagraphBorderStyle, type ParagraphChildNode, type ParagraphIndent, type ParagraphLineRange, type ParagraphNode, type ParagraphNumbering, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, ReactDocxViewer, type ReactDocxViewerProps, type ResolvedDocument, type ResolvedDocumentSection, type ResolvedLayoutMetrics, type ResolvedModelSection, type TableBorderSet, type TableBorderStyle, type TableBoxSpacing, type TableCellContentNode, type TableCellNode, type TableCellStyle, type TableExplicitPageBreakInfo, type TableNode, type TableRowNode, type TableRowRange, type TableRowStyle, type TableStyle, type TextRunBorderStyle, type TextRunNode, type TextStyle, type UpdateTextOptions, type UseDocxBordersResult, type UseDocxCommentsResult, type UseDocxDocumentThemeResult, type UseDocxEditorOptions, type UseDocxFormFieldsResult, type UseDocxImageWrapMenuResult, type UseDocxLineSpacingResult, type UseDocxModelState, type UseDocxPageLayoutResult, type UseDocxPageThumbnailsOptions, type UseDocxPageThumbnailsResult, type UseDocxPaginationResult, type UseDocxParagraphStylesResult, type UseDocxTrackChangesResult, type UseDocxViewerThumbnailsOptions, type WasmOoxmlPackage, type WasmSource, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createMinimalDocxPackage, defaultStarterModel, duplicateParagraph, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setParagraphAlignment, setParagraphHeading, setRunColor, setRunHighlight, setWasmSource, splitParagraphChildrenAtTextOffsets, toggleRunStyleFlag, updateParagraphText, updateTableCellParagraphText, updateTableCellParagraphTextRecursive, updateTableCellText, useDocxBorders, useDocxComments, useDocxDocumentTheme, useDocxEditor, useDocxFormFields, useDocxImageWrapMenu, useDocxLineSpacing, useDocxModel, useDocxPageLayout, useDocxPageThumbnails, useDocxPagination, useDocxParagraphStyles, useDocxTrackChanges, useDocxViewerThumbnails, withPart };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ interface WasmOoxmlPart {
|
|
|
32
32
|
content: string;
|
|
33
33
|
}
|
|
34
34
|
interface WasmOoxmlPackage {
|
|
35
|
+
parts: Record<string, WasmOoxmlPart>;
|
|
36
|
+
binaryAssets: Record<string, Uint8Array>;
|
|
37
|
+
}
|
|
38
|
+
/** Package shape produced by pre-Uint8Array versions of this library. */
|
|
39
|
+
interface LegacyWasmOoxmlPackage {
|
|
35
40
|
parts: Record<string, WasmOoxmlPart>;
|
|
36
41
|
binaryAssets: Record<string, number[]>;
|
|
37
42
|
}
|
|
@@ -396,6 +401,17 @@ interface DocumentNoteDefinition {
|
|
|
396
401
|
text: string;
|
|
397
402
|
nodes?: DocNode[];
|
|
398
403
|
}
|
|
404
|
+
interface DocumentCommentDefinition {
|
|
405
|
+
id: number;
|
|
406
|
+
author?: string;
|
|
407
|
+
initials?: string;
|
|
408
|
+
date?: string;
|
|
409
|
+
text: string;
|
|
410
|
+
/** Comment id this comment replies to (from commentsExtended threading). */
|
|
411
|
+
parentId?: number;
|
|
412
|
+
/** True when the comment thread is marked done in commentsExtended. */
|
|
413
|
+
resolved?: boolean;
|
|
414
|
+
}
|
|
399
415
|
interface DocumentCompatibilitySettings {
|
|
400
416
|
suppressSpacingBeforeAfterPageBreak?: boolean;
|
|
401
417
|
usePrinterMetrics?: boolean;
|
|
@@ -422,6 +438,7 @@ interface DocModel {
|
|
|
422
438
|
compatibility?: DocumentCompatibilitySettings;
|
|
423
439
|
footnotes?: DocumentNoteDefinition[];
|
|
424
440
|
endnotes?: DocumentNoteDefinition[];
|
|
441
|
+
comments?: DocumentCommentDefinition[];
|
|
425
442
|
};
|
|
426
443
|
}
|
|
427
444
|
|
|
@@ -613,6 +630,32 @@ interface DocxTrackedChange {
|
|
|
613
630
|
nodeIndex: number;
|
|
614
631
|
location: DocxTextRangeLocation;
|
|
615
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* A document comment anchored to a text range.
|
|
635
|
+
*
|
|
636
|
+
* Comment definitions come from `word/comments.xml` (threading and resolution
|
|
637
|
+
* state from `word/commentsExtended.xml`); the anchor location is resolved
|
|
638
|
+
* from the paragraph that carries the `commentReference` run.
|
|
639
|
+
*/
|
|
640
|
+
interface DocxComment {
|
|
641
|
+
/** Stable identifier (unique per rendered anchor). */
|
|
642
|
+
id: string;
|
|
643
|
+
/** Comment id from `word/comments.xml` (`w:id`). */
|
|
644
|
+
commentId: number;
|
|
645
|
+
author?: string;
|
|
646
|
+
initials?: string;
|
|
647
|
+
date?: string;
|
|
648
|
+
/** Plain-text comment body. */
|
|
649
|
+
text: string;
|
|
650
|
+
/** Comment id this comment replies to, when part of a thread. */
|
|
651
|
+
parentId?: number;
|
|
652
|
+
/** True when the comment thread is marked done. */
|
|
653
|
+
resolved?: boolean;
|
|
654
|
+
/** Plain-text excerpt of the commented document range. */
|
|
655
|
+
anchorText?: string;
|
|
656
|
+
nodeIndex: number;
|
|
657
|
+
location: DocxTextRangeLocation;
|
|
658
|
+
}
|
|
616
659
|
type DocxLineSpacingRule = "auto" | "exact" | "atLeast";
|
|
617
660
|
type DocxSelectionSessionKind = "idle" | "pointer" | "keyboard" | "composition" | "command" | "history-restore";
|
|
618
661
|
interface DocxLineSpacingInfo {
|
|
@@ -660,6 +703,12 @@ interface UseDocxEditorOptions {
|
|
|
660
703
|
* @defaultValue `false`
|
|
661
704
|
*/
|
|
662
705
|
initialShowTrackedChanges?: boolean;
|
|
706
|
+
/**
|
|
707
|
+
* Whether document comments are visible when the editor first mounts.
|
|
708
|
+
*
|
|
709
|
+
* @defaultValue `false`
|
|
710
|
+
*/
|
|
711
|
+
initialShowComments?: boolean;
|
|
663
712
|
}
|
|
664
713
|
/**
|
|
665
714
|
* Controller returned by `useDocxEditor`.
|
|
@@ -708,6 +757,8 @@ interface DocxEditorController {
|
|
|
708
757
|
availableParagraphStyles: ParagraphStyleDefinition[];
|
|
709
758
|
trackedChanges: DocxTrackedChange[];
|
|
710
759
|
showTrackedChanges: boolean;
|
|
760
|
+
comments: DocxComment[];
|
|
761
|
+
showComments: boolean;
|
|
711
762
|
currentPage: number;
|
|
712
763
|
totalPages: number;
|
|
713
764
|
hasUnorderedList: boolean;
|
|
@@ -718,8 +769,10 @@ interface DocxEditorController {
|
|
|
718
769
|
setStatus: React.Dispatch<React.SetStateAction<string>>;
|
|
719
770
|
setDocumentTheme: (theme: DocxDocumentTheme) => void;
|
|
720
771
|
setShowTrackedChanges: (showTrackedChanges: boolean) => void;
|
|
772
|
+
setShowComments: (showComments: boolean) => void;
|
|
721
773
|
syncPaginationInfo: (pagination: DocxPaginationInfo) => void;
|
|
722
774
|
toggleShowTrackedChanges: () => void;
|
|
775
|
+
toggleShowComments: () => void;
|
|
723
776
|
importDocxFile: (file: File) => Promise<void>;
|
|
724
777
|
newDocument: () => void;
|
|
725
778
|
exportDocx: () => void;
|
|
@@ -1043,6 +1096,17 @@ interface DocxEditorViewerProps {
|
|
|
1043
1096
|
* Custom renderer for tracked-change cards in the page gutter.
|
|
1044
1097
|
*/
|
|
1045
1098
|
renderTrackedChangeCard?: (props: DocxTrackedChangeCardRenderProps) => React.ReactNode;
|
|
1099
|
+
/**
|
|
1100
|
+
* Overrides whether document comments are shown.
|
|
1101
|
+
*
|
|
1102
|
+
* If omitted, the value from `useDocxComments(editor)` or
|
|
1103
|
+
* `editor.showComments` is used.
|
|
1104
|
+
*/
|
|
1105
|
+
showComments?: boolean;
|
|
1106
|
+
/**
|
|
1107
|
+
* Custom renderer for comment cards in the page gutter.
|
|
1108
|
+
*/
|
|
1109
|
+
renderCommentCard?: (props: DocxCommentCardRenderProps) => React.ReactNode;
|
|
1046
1110
|
/**
|
|
1047
1111
|
* Custom renderer for table context menus.
|
|
1048
1112
|
*
|
|
@@ -1080,6 +1144,22 @@ interface DocxTrackedChangeCardRenderProps {
|
|
|
1080
1144
|
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1081
1145
|
style: React.CSSProperties;
|
|
1082
1146
|
}
|
|
1147
|
+
interface DocxCommentCardRenderProps {
|
|
1148
|
+
/** Comment data represented by the card. */
|
|
1149
|
+
comment: DocxComment;
|
|
1150
|
+
/** Plain-text comment body (already normalized for display). */
|
|
1151
|
+
snippet: string;
|
|
1152
|
+
/** Formatted comment date, if the source document provided one. */
|
|
1153
|
+
formattedDate?: string;
|
|
1154
|
+
/** Accent color chosen for comments. */
|
|
1155
|
+
accentColor: string;
|
|
1156
|
+
/** Current document theme. */
|
|
1157
|
+
documentTheme: DocxDocumentTheme;
|
|
1158
|
+
/** Zero-based page index that owns the card. */
|
|
1159
|
+
pageIndex: number;
|
|
1160
|
+
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1161
|
+
style: React.CSSProperties;
|
|
1162
|
+
}
|
|
1083
1163
|
/**
|
|
1084
1164
|
* Viewer interaction mode.
|
|
1085
1165
|
*
|
|
@@ -1124,6 +1204,14 @@ interface UseDocxTrackChangesResult {
|
|
|
1124
1204
|
changesByLocation: Map<string, DocxTrackedChange[]>;
|
|
1125
1205
|
getChangesForLocation: (location: DocxTextRangeLocation) => DocxTrackedChange[];
|
|
1126
1206
|
}
|
|
1207
|
+
interface UseDocxCommentsResult {
|
|
1208
|
+
comments: DocxComment[];
|
|
1209
|
+
showComments: boolean;
|
|
1210
|
+
setShowComments: (showComments: boolean) => void;
|
|
1211
|
+
toggleShowComments: () => void;
|
|
1212
|
+
commentsByLocation: Map<string, DocxComment[]>;
|
|
1213
|
+
getCommentsForLocation: (location: DocxTextRangeLocation) => DocxComment[];
|
|
1214
|
+
}
|
|
1127
1215
|
interface DocxSectionColumnLayout {
|
|
1128
1216
|
count: number;
|
|
1129
1217
|
gapPx: number;
|
|
@@ -1302,9 +1390,15 @@ declare function useDocxLineSpacing(editor: Pick<DocxEditorController, "selected
|
|
|
1302
1390
|
declare function useDocxBorders(editor: Pick<DocxEditorController, "selectedBorderContext" | "activeBorderPresets" | "applyBorderPreset">): UseDocxBordersResult;
|
|
1303
1391
|
declare function useDocxFormFields(editor: Pick<DocxEditorController, "model" | "selectedFormField" | "selectFormField" | "setFormFieldValue" | "toggleFormCheckbox" | "updateFormFieldWidget">): UseDocxFormFieldsResult;
|
|
1304
1392
|
declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "trackedChanges" | "showTrackedChanges" | "setShowTrackedChanges" | "toggleShowTrackedChanges">): UseDocxTrackChangesResult;
|
|
1393
|
+
/**
|
|
1394
|
+
* Exposes document comments and the show/hide state, mirroring
|
|
1395
|
+
* `useDocxTrackChanges`. Pair with `DocxEditorViewer`'s `renderCommentCard`
|
|
1396
|
+
* to fully customize how comments render.
|
|
1397
|
+
*/
|
|
1398
|
+
declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments">): UseDocxCommentsResult;
|
|
1305
1399
|
declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
|
|
1306
1400
|
declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
|
|
1307
|
-
declare function DocxEditorViewer({ editor, className, style, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
|
|
1401
|
+
declare function DocxEditorViewer({ editor, className, style, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, showComments, renderCommentCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
|
|
1308
1402
|
|
|
1309
1403
|
interface InsertParagraphOptions {
|
|
1310
1404
|
paragraphStyle?: ParagraphStyle;
|
|
@@ -1618,4 +1712,4 @@ interface UseDocxModelState {
|
|
|
1618
1712
|
declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
|
|
1619
1713
|
declare function ReactDocxViewer({ file, model, className, layoutOptions, emptyState }: ReactDocxViewerProps): React.JSX.Element;
|
|
1620
1714
|
|
|
1621
|
-
export { DEFAULT_MIN_PARAGRAPH_LINE_HEIGHT_PX, DEFAULT_PAGE_OVERFLOW_TOLERANCE_PX, type DocModel, type DocNode, type DocumentCompatibilitySettings, type DocumentNoteDefinition, type DocumentPageNodeSegment, type DocumentPageRange, type DocumentPageSegmentationOptions, type DocumentSection, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxDocumentTheme, type DocxEditorController, type DocxEditorSelection, DocxEditorViewer, type DocxEditorViewerMode, type DocxEditorViewerProps, type DocxFormFieldLocation, type DocxHeadingStyleMap, type DocxImageDropTarget, type DocxImageLocation, type DocxImageWrapMenuOption, type DocxImageWrapMode, type DocxImageWrapState, type DocxLineSpacingInfo, type DocxListType, type DocxPageLayoutInfo, type DocxPageThumbnailBounds, type DocxPageThumbnailItem, type DocxPageThumbnailResolution, type DocxPageThumbnailResolutionOptions, type DocxPageThumbnailStatus, type DocxPageVirtualizationOptions, type DocxPaginationInfo, type DocxSectionColumnLayout, type DocxSelectedFormField, type DocxTableContextMenuAction, type DocxTableContextMenuActionId, type DocxTableContextMenuContext, type DocxTableContextMenuRenderProps, type DocxTextRange, type DocxTextRangeLocation, type DocxTrackedChange, type DocxTrackedChangeCardRenderProps, type DocxTrackedChangeKind, type DocxViewerThumbnails, type DocxVisiblePageRange, type FooterSection, type FormFieldCheckboxWidgetSettings, type FormFieldDropdownWidgetSettings, type FormFieldOption, type FormFieldRunNode, type FormFieldSourceKind, type FormFieldTextWidgetSettings, type FormFieldType, type FormFieldWidgetSettings, type HeaderSection, type HeadingLevel, type ImageRunNode, type InsertParagraphOptions, type LayoutBlock, type LayoutFragmentSource, type LayoutImageRun, type LayoutOptions, type LayoutPage, type LayoutParagraphBlock, type LayoutRun, type LayoutSnapshot, type LayoutSnapshotBlockFragment, type LayoutSnapshotImageRun, type LayoutSnapshotMargins, type LayoutSnapshotOptions, type LayoutSnapshotPage, type LayoutSnapshotPageSize, type LayoutSnapshotParagraphFragment, type LayoutSnapshotRect, type LayoutSnapshotRun, type LayoutSnapshotTableCellFragment, type LayoutSnapshotTableFragment, type LayoutSnapshotTableRowFragment, type LayoutSnapshotTextRun, type LayoutTableBlock, type LayoutTableCell, type LayoutTableRow, type LayoutTextRun, type LetterheadColumnSegmentGroup, type NumberingAbstractDefinition, type NumberingDefinitionSet, type NumberingInstanceDefinition, type NumberingLevelDefinition, type NumberingPictureBulletDefinition, type OoxmlPackage, type OoxmlPart, type OverflowBreakCollectionOptions, type PageSegmentationCallbacks, type PaginationSectionMetrics, type ParagraphAlignment, type ParagraphBorderSet, type ParagraphBorderStyle, type ParagraphChildNode, type ParagraphIndent, type ParagraphLineRange, type ParagraphNode, type ParagraphNumbering, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, ReactDocxViewer, type ReactDocxViewerProps, type ResolvedDocument, type ResolvedDocumentSection, type ResolvedLayoutMetrics, type ResolvedModelSection, type TableBorderSet, type TableBorderStyle, type TableBoxSpacing, type TableCellContentNode, type TableCellNode, type TableCellStyle, type TableExplicitPageBreakInfo, type TableNode, type TableRowNode, type TableRowRange, type TableRowStyle, type TableStyle, type TextRunBorderStyle, type TextRunNode, type TextStyle, type UpdateTextOptions, type UseDocxBordersResult, type UseDocxDocumentThemeResult, type UseDocxEditorOptions, type UseDocxFormFieldsResult, type UseDocxImageWrapMenuResult, type UseDocxLineSpacingResult, type UseDocxModelState, type UseDocxPageLayoutResult, type UseDocxPageThumbnailsOptions, type UseDocxPageThumbnailsResult, type UseDocxPaginationResult, type UseDocxParagraphStylesResult, type UseDocxTrackChangesResult, type UseDocxViewerThumbnailsOptions, type WasmOoxmlPackage, type WasmSource, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createMinimalDocxPackage, defaultStarterModel, duplicateParagraph, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setParagraphAlignment, setParagraphHeading, setRunColor, setRunHighlight, setWasmSource, splitParagraphChildrenAtTextOffsets, toggleRunStyleFlag, updateParagraphText, updateTableCellParagraphText, updateTableCellParagraphTextRecursive, updateTableCellText, useDocxBorders, useDocxDocumentTheme, useDocxEditor, useDocxFormFields, useDocxImageWrapMenu, useDocxLineSpacing, useDocxModel, useDocxPageLayout, useDocxPageThumbnails, useDocxPagination, useDocxParagraphStyles, useDocxTrackChanges, useDocxViewerThumbnails, withPart };
|
|
1715
|
+
export { DEFAULT_MIN_PARAGRAPH_LINE_HEIGHT_PX, DEFAULT_PAGE_OVERFLOW_TOLERANCE_PX, type DocModel, type DocNode, type DocumentCommentDefinition, type DocumentCompatibilitySettings, type DocumentNoteDefinition, type DocumentPageNodeSegment, type DocumentPageRange, type DocumentPageSegmentationOptions, type DocumentSection, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxComment, type DocxCommentCardRenderProps, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxDocumentTheme, type DocxEditorController, type DocxEditorSelection, DocxEditorViewer, type DocxEditorViewerMode, type DocxEditorViewerProps, type DocxFormFieldLocation, type DocxHeadingStyleMap, type DocxImageDropTarget, type DocxImageLocation, type DocxImageWrapMenuOption, type DocxImageWrapMode, type DocxImageWrapState, type DocxLineSpacingInfo, type DocxListType, type DocxPageLayoutInfo, type DocxPageThumbnailBounds, type DocxPageThumbnailItem, type DocxPageThumbnailResolution, type DocxPageThumbnailResolutionOptions, type DocxPageThumbnailStatus, type DocxPageVirtualizationOptions, type DocxPaginationInfo, type DocxSectionColumnLayout, type DocxSelectedFormField, type DocxTableContextMenuAction, type DocxTableContextMenuActionId, type DocxTableContextMenuContext, type DocxTableContextMenuRenderProps, type DocxTextRange, type DocxTextRangeLocation, type DocxTrackedChange, type DocxTrackedChangeCardRenderProps, type DocxTrackedChangeKind, type DocxViewerThumbnails, type DocxVisiblePageRange, type FooterSection, type FormFieldCheckboxWidgetSettings, type FormFieldDropdownWidgetSettings, type FormFieldOption, type FormFieldRunNode, type FormFieldSourceKind, type FormFieldTextWidgetSettings, type FormFieldType, type FormFieldWidgetSettings, type HeaderSection, type HeadingLevel, type ImageRunNode, type InsertParagraphOptions, type LayoutBlock, type LayoutFragmentSource, type LayoutImageRun, type LayoutOptions, type LayoutPage, type LayoutParagraphBlock, type LayoutRun, type LayoutSnapshot, type LayoutSnapshotBlockFragment, type LayoutSnapshotImageRun, type LayoutSnapshotMargins, type LayoutSnapshotOptions, type LayoutSnapshotPage, type LayoutSnapshotPageSize, type LayoutSnapshotParagraphFragment, type LayoutSnapshotRect, type LayoutSnapshotRun, type LayoutSnapshotTableCellFragment, type LayoutSnapshotTableFragment, type LayoutSnapshotTableRowFragment, type LayoutSnapshotTextRun, type LayoutTableBlock, type LayoutTableCell, type LayoutTableRow, type LayoutTextRun, type LegacyWasmOoxmlPackage, type LetterheadColumnSegmentGroup, type NumberingAbstractDefinition, type NumberingDefinitionSet, type NumberingInstanceDefinition, type NumberingLevelDefinition, type NumberingPictureBulletDefinition, type OoxmlPackage, type OoxmlPart, type OverflowBreakCollectionOptions, type PageSegmentationCallbacks, type PaginationSectionMetrics, type ParagraphAlignment, type ParagraphBorderSet, type ParagraphBorderStyle, type ParagraphChildNode, type ParagraphIndent, type ParagraphLineRange, type ParagraphNode, type ParagraphNumbering, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, ReactDocxViewer, type ReactDocxViewerProps, type ResolvedDocument, type ResolvedDocumentSection, type ResolvedLayoutMetrics, type ResolvedModelSection, type TableBorderSet, type TableBorderStyle, type TableBoxSpacing, type TableCellContentNode, type TableCellNode, type TableCellStyle, type TableExplicitPageBreakInfo, type TableNode, type TableRowNode, type TableRowRange, type TableRowStyle, type TableStyle, type TextRunBorderStyle, type TextRunNode, type TextStyle, type UpdateTextOptions, type UseDocxBordersResult, type UseDocxCommentsResult, type UseDocxDocumentThemeResult, type UseDocxEditorOptions, type UseDocxFormFieldsResult, type UseDocxImageWrapMenuResult, type UseDocxLineSpacingResult, type UseDocxModelState, type UseDocxPageLayoutResult, type UseDocxPageThumbnailsOptions, type UseDocxPageThumbnailsResult, type UseDocxPaginationResult, type UseDocxParagraphStylesResult, type UseDocxTrackChangesResult, type UseDocxViewerThumbnailsOptions, type WasmOoxmlPackage, type WasmSource, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createMinimalDocxPackage, defaultStarterModel, duplicateParagraph, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setParagraphAlignment, setParagraphHeading, setRunColor, setRunHighlight, setWasmSource, splitParagraphChildrenAtTextOffsets, toggleRunStyleFlag, updateParagraphText, updateTableCellParagraphText, updateTableCellParagraphTextRecursive, updateTableCellText, useDocxBorders, useDocxComments, useDocxDocumentTheme, useDocxEditor, useDocxFormFields, useDocxImageWrapMenu, useDocxLineSpacing, useDocxModel, useDocxPageLayout, useDocxPageThumbnails, useDocxPagination, useDocxParagraphStyles, useDocxTrackChanges, useDocxViewerThumbnails, withPart };
|