@extend-ai/react-docx 0.7.0-alpha.4 → 0.7.0-alpha.6
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-XLGR633U.js → chunk-2SXGXGWO.js} +4 -64
- 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 +1241 -504
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -2
- package/dist/index.d.ts +107 -2
- package/dist/index.js +931 -625
- package/dist/index.js.map +1 -1
- package/dist/src-NDPFDRVM.js +14 -0
- package/dist/{src-IT7QNDVM.js → src-PJYTN6DB.js} +3 -2
- package/dist/src-PJYTN6DB.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-XLGR633U.js.map +0 -1
- /package/dist/{src-IT7QNDVM.js.map → src-NDPFDRVM.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -401,6 +401,17 @@ interface DocumentNoteDefinition {
|
|
|
401
401
|
text: string;
|
|
402
402
|
nodes?: DocNode[];
|
|
403
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
|
+
}
|
|
404
415
|
interface DocumentCompatibilitySettings {
|
|
405
416
|
suppressSpacingBeforeAfterPageBreak?: boolean;
|
|
406
417
|
usePrinterMetrics?: boolean;
|
|
@@ -427,6 +438,7 @@ interface DocModel {
|
|
|
427
438
|
compatibility?: DocumentCompatibilitySettings;
|
|
428
439
|
footnotes?: DocumentNoteDefinition[];
|
|
429
440
|
endnotes?: DocumentNoteDefinition[];
|
|
441
|
+
comments?: DocumentCommentDefinition[];
|
|
430
442
|
};
|
|
431
443
|
}
|
|
432
444
|
|
|
@@ -618,6 +630,32 @@ interface DocxTrackedChange {
|
|
|
618
630
|
nodeIndex: number;
|
|
619
631
|
location: DocxTextRangeLocation;
|
|
620
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
|
+
}
|
|
621
659
|
type DocxLineSpacingRule = "auto" | "exact" | "atLeast";
|
|
622
660
|
type DocxSelectionSessionKind = "idle" | "pointer" | "keyboard" | "composition" | "command" | "history-restore";
|
|
623
661
|
interface DocxLineSpacingInfo {
|
|
@@ -665,6 +703,12 @@ interface UseDocxEditorOptions {
|
|
|
665
703
|
* @defaultValue `false`
|
|
666
704
|
*/
|
|
667
705
|
initialShowTrackedChanges?: boolean;
|
|
706
|
+
/**
|
|
707
|
+
* Whether document comments are visible when the editor first mounts.
|
|
708
|
+
*
|
|
709
|
+
* @defaultValue `false`
|
|
710
|
+
*/
|
|
711
|
+
initialShowComments?: boolean;
|
|
668
712
|
}
|
|
669
713
|
/**
|
|
670
714
|
* Controller returned by `useDocxEditor`.
|
|
@@ -713,6 +757,8 @@ interface DocxEditorController {
|
|
|
713
757
|
availableParagraphStyles: ParagraphStyleDefinition[];
|
|
714
758
|
trackedChanges: DocxTrackedChange[];
|
|
715
759
|
showTrackedChanges: boolean;
|
|
760
|
+
comments: DocxComment[];
|
|
761
|
+
showComments: boolean;
|
|
716
762
|
currentPage: number;
|
|
717
763
|
totalPages: number;
|
|
718
764
|
hasUnorderedList: boolean;
|
|
@@ -723,8 +769,10 @@ interface DocxEditorController {
|
|
|
723
769
|
setStatus: React.Dispatch<React.SetStateAction<string>>;
|
|
724
770
|
setDocumentTheme: (theme: DocxDocumentTheme) => void;
|
|
725
771
|
setShowTrackedChanges: (showTrackedChanges: boolean) => void;
|
|
772
|
+
setShowComments: (showComments: boolean) => void;
|
|
726
773
|
syncPaginationInfo: (pagination: DocxPaginationInfo) => void;
|
|
727
774
|
toggleShowTrackedChanges: () => void;
|
|
775
|
+
toggleShowComments: () => void;
|
|
728
776
|
importDocxFile: (file: File) => Promise<void>;
|
|
729
777
|
newDocument: () => void;
|
|
730
778
|
exportDocx: () => void;
|
|
@@ -920,6 +968,22 @@ interface DocxPageVirtualizationOptions {
|
|
|
920
968
|
* @defaultValue `0`
|
|
921
969
|
*/
|
|
922
970
|
settleDelayMs?: number;
|
|
971
|
+
/**
|
|
972
|
+
* Explicit scroll container for internal page virtualization.
|
|
973
|
+
*
|
|
974
|
+
* Omit this to let the viewer discover the nearest scrollable ancestor.
|
|
975
|
+
* Provide it when the host app owns scrolling, such as when the viewer is
|
|
976
|
+
* mounted inside a custom scroll-area viewport.
|
|
977
|
+
*/
|
|
978
|
+
scrollElement?: HTMLElement | null;
|
|
979
|
+
/**
|
|
980
|
+
* Effective visual scale applied around the viewer.
|
|
981
|
+
*
|
|
982
|
+
* Omit this to let the viewer infer CSS `zoom` from its ancestor chain.
|
|
983
|
+
* Provide it when toolbar zoom is controlled outside the viewer so virtual
|
|
984
|
+
* page offsets update synchronously with the selected zoom.
|
|
985
|
+
*/
|
|
986
|
+
zoomScale?: number;
|
|
923
987
|
}
|
|
924
988
|
/**
|
|
925
989
|
* Externally controlled visible page window.
|
|
@@ -1048,6 +1112,17 @@ interface DocxEditorViewerProps {
|
|
|
1048
1112
|
* Custom renderer for tracked-change cards in the page gutter.
|
|
1049
1113
|
*/
|
|
1050
1114
|
renderTrackedChangeCard?: (props: DocxTrackedChangeCardRenderProps) => React.ReactNode;
|
|
1115
|
+
/**
|
|
1116
|
+
* Overrides whether document comments are shown.
|
|
1117
|
+
*
|
|
1118
|
+
* If omitted, the value from `useDocxComments(editor)` or
|
|
1119
|
+
* `editor.showComments` is used.
|
|
1120
|
+
*/
|
|
1121
|
+
showComments?: boolean;
|
|
1122
|
+
/**
|
|
1123
|
+
* Custom renderer for comment cards in the page gutter.
|
|
1124
|
+
*/
|
|
1125
|
+
renderCommentCard?: (props: DocxCommentCardRenderProps) => React.ReactNode;
|
|
1051
1126
|
/**
|
|
1052
1127
|
* Custom renderer for table context menus.
|
|
1053
1128
|
*
|
|
@@ -1085,6 +1160,22 @@ interface DocxTrackedChangeCardRenderProps {
|
|
|
1085
1160
|
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1086
1161
|
style: React.CSSProperties;
|
|
1087
1162
|
}
|
|
1163
|
+
interface DocxCommentCardRenderProps {
|
|
1164
|
+
/** Comment data represented by the card. */
|
|
1165
|
+
comment: DocxComment;
|
|
1166
|
+
/** Plain-text comment body (already normalized for display). */
|
|
1167
|
+
snippet: string;
|
|
1168
|
+
/** Formatted comment date, if the source document provided one. */
|
|
1169
|
+
formattedDate?: string;
|
|
1170
|
+
/** Accent color chosen for comments. */
|
|
1171
|
+
accentColor: string;
|
|
1172
|
+
/** Current document theme. */
|
|
1173
|
+
documentTheme: DocxDocumentTheme;
|
|
1174
|
+
/** Zero-based page index that owns the card. */
|
|
1175
|
+
pageIndex: number;
|
|
1176
|
+
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1177
|
+
style: React.CSSProperties;
|
|
1178
|
+
}
|
|
1088
1179
|
/**
|
|
1089
1180
|
* Viewer interaction mode.
|
|
1090
1181
|
*
|
|
@@ -1129,6 +1220,14 @@ interface UseDocxTrackChangesResult {
|
|
|
1129
1220
|
changesByLocation: Map<string, DocxTrackedChange[]>;
|
|
1130
1221
|
getChangesForLocation: (location: DocxTextRangeLocation) => DocxTrackedChange[];
|
|
1131
1222
|
}
|
|
1223
|
+
interface UseDocxCommentsResult {
|
|
1224
|
+
comments: DocxComment[];
|
|
1225
|
+
showComments: boolean;
|
|
1226
|
+
setShowComments: (showComments: boolean) => void;
|
|
1227
|
+
toggleShowComments: () => void;
|
|
1228
|
+
commentsByLocation: Map<string, DocxComment[]>;
|
|
1229
|
+
getCommentsForLocation: (location: DocxTextRangeLocation) => DocxComment[];
|
|
1230
|
+
}
|
|
1132
1231
|
interface DocxSectionColumnLayout {
|
|
1133
1232
|
count: number;
|
|
1134
1233
|
gapPx: number;
|
|
@@ -1307,9 +1406,15 @@ declare function useDocxLineSpacing(editor: Pick<DocxEditorController, "selected
|
|
|
1307
1406
|
declare function useDocxBorders(editor: Pick<DocxEditorController, "selectedBorderContext" | "activeBorderPresets" | "applyBorderPreset">): UseDocxBordersResult;
|
|
1308
1407
|
declare function useDocxFormFields(editor: Pick<DocxEditorController, "model" | "selectedFormField" | "selectFormField" | "setFormFieldValue" | "toggleFormCheckbox" | "updateFormFieldWidget">): UseDocxFormFieldsResult;
|
|
1309
1408
|
declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "trackedChanges" | "showTrackedChanges" | "setShowTrackedChanges" | "toggleShowTrackedChanges">): UseDocxTrackChangesResult;
|
|
1409
|
+
/**
|
|
1410
|
+
* Exposes document comments and the show/hide state, mirroring
|
|
1411
|
+
* `useDocxTrackChanges`. Pair with `DocxEditorViewer`'s `renderCommentCard`
|
|
1412
|
+
* to fully customize how comments render.
|
|
1413
|
+
*/
|
|
1414
|
+
declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments">): UseDocxCommentsResult;
|
|
1310
1415
|
declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
|
|
1311
1416
|
declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
|
|
1312
|
-
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;
|
|
1417
|
+
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;
|
|
1313
1418
|
|
|
1314
1419
|
interface InsertParagraphOptions {
|
|
1315
1420
|
paragraphStyle?: ParagraphStyle;
|
|
@@ -1623,4 +1728,4 @@ interface UseDocxModelState {
|
|
|
1623
1728
|
declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
|
|
1624
1729
|
declare function ReactDocxViewer({ file, model, className, layoutOptions, emptyState }: ReactDocxViewerProps): React.JSX.Element;
|
|
1625
1730
|
|
|
1626
|
-
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 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 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 };
|
|
1731
|
+
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
|
@@ -401,6 +401,17 @@ interface DocumentNoteDefinition {
|
|
|
401
401
|
text: string;
|
|
402
402
|
nodes?: DocNode[];
|
|
403
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
|
+
}
|
|
404
415
|
interface DocumentCompatibilitySettings {
|
|
405
416
|
suppressSpacingBeforeAfterPageBreak?: boolean;
|
|
406
417
|
usePrinterMetrics?: boolean;
|
|
@@ -427,6 +438,7 @@ interface DocModel {
|
|
|
427
438
|
compatibility?: DocumentCompatibilitySettings;
|
|
428
439
|
footnotes?: DocumentNoteDefinition[];
|
|
429
440
|
endnotes?: DocumentNoteDefinition[];
|
|
441
|
+
comments?: DocumentCommentDefinition[];
|
|
430
442
|
};
|
|
431
443
|
}
|
|
432
444
|
|
|
@@ -618,6 +630,32 @@ interface DocxTrackedChange {
|
|
|
618
630
|
nodeIndex: number;
|
|
619
631
|
location: DocxTextRangeLocation;
|
|
620
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
|
+
}
|
|
621
659
|
type DocxLineSpacingRule = "auto" | "exact" | "atLeast";
|
|
622
660
|
type DocxSelectionSessionKind = "idle" | "pointer" | "keyboard" | "composition" | "command" | "history-restore";
|
|
623
661
|
interface DocxLineSpacingInfo {
|
|
@@ -665,6 +703,12 @@ interface UseDocxEditorOptions {
|
|
|
665
703
|
* @defaultValue `false`
|
|
666
704
|
*/
|
|
667
705
|
initialShowTrackedChanges?: boolean;
|
|
706
|
+
/**
|
|
707
|
+
* Whether document comments are visible when the editor first mounts.
|
|
708
|
+
*
|
|
709
|
+
* @defaultValue `false`
|
|
710
|
+
*/
|
|
711
|
+
initialShowComments?: boolean;
|
|
668
712
|
}
|
|
669
713
|
/**
|
|
670
714
|
* Controller returned by `useDocxEditor`.
|
|
@@ -713,6 +757,8 @@ interface DocxEditorController {
|
|
|
713
757
|
availableParagraphStyles: ParagraphStyleDefinition[];
|
|
714
758
|
trackedChanges: DocxTrackedChange[];
|
|
715
759
|
showTrackedChanges: boolean;
|
|
760
|
+
comments: DocxComment[];
|
|
761
|
+
showComments: boolean;
|
|
716
762
|
currentPage: number;
|
|
717
763
|
totalPages: number;
|
|
718
764
|
hasUnorderedList: boolean;
|
|
@@ -723,8 +769,10 @@ interface DocxEditorController {
|
|
|
723
769
|
setStatus: React.Dispatch<React.SetStateAction<string>>;
|
|
724
770
|
setDocumentTheme: (theme: DocxDocumentTheme) => void;
|
|
725
771
|
setShowTrackedChanges: (showTrackedChanges: boolean) => void;
|
|
772
|
+
setShowComments: (showComments: boolean) => void;
|
|
726
773
|
syncPaginationInfo: (pagination: DocxPaginationInfo) => void;
|
|
727
774
|
toggleShowTrackedChanges: () => void;
|
|
775
|
+
toggleShowComments: () => void;
|
|
728
776
|
importDocxFile: (file: File) => Promise<void>;
|
|
729
777
|
newDocument: () => void;
|
|
730
778
|
exportDocx: () => void;
|
|
@@ -920,6 +968,22 @@ interface DocxPageVirtualizationOptions {
|
|
|
920
968
|
* @defaultValue `0`
|
|
921
969
|
*/
|
|
922
970
|
settleDelayMs?: number;
|
|
971
|
+
/**
|
|
972
|
+
* Explicit scroll container for internal page virtualization.
|
|
973
|
+
*
|
|
974
|
+
* Omit this to let the viewer discover the nearest scrollable ancestor.
|
|
975
|
+
* Provide it when the host app owns scrolling, such as when the viewer is
|
|
976
|
+
* mounted inside a custom scroll-area viewport.
|
|
977
|
+
*/
|
|
978
|
+
scrollElement?: HTMLElement | null;
|
|
979
|
+
/**
|
|
980
|
+
* Effective visual scale applied around the viewer.
|
|
981
|
+
*
|
|
982
|
+
* Omit this to let the viewer infer CSS `zoom` from its ancestor chain.
|
|
983
|
+
* Provide it when toolbar zoom is controlled outside the viewer so virtual
|
|
984
|
+
* page offsets update synchronously with the selected zoom.
|
|
985
|
+
*/
|
|
986
|
+
zoomScale?: number;
|
|
923
987
|
}
|
|
924
988
|
/**
|
|
925
989
|
* Externally controlled visible page window.
|
|
@@ -1048,6 +1112,17 @@ interface DocxEditorViewerProps {
|
|
|
1048
1112
|
* Custom renderer for tracked-change cards in the page gutter.
|
|
1049
1113
|
*/
|
|
1050
1114
|
renderTrackedChangeCard?: (props: DocxTrackedChangeCardRenderProps) => React.ReactNode;
|
|
1115
|
+
/**
|
|
1116
|
+
* Overrides whether document comments are shown.
|
|
1117
|
+
*
|
|
1118
|
+
* If omitted, the value from `useDocxComments(editor)` or
|
|
1119
|
+
* `editor.showComments` is used.
|
|
1120
|
+
*/
|
|
1121
|
+
showComments?: boolean;
|
|
1122
|
+
/**
|
|
1123
|
+
* Custom renderer for comment cards in the page gutter.
|
|
1124
|
+
*/
|
|
1125
|
+
renderCommentCard?: (props: DocxCommentCardRenderProps) => React.ReactNode;
|
|
1051
1126
|
/**
|
|
1052
1127
|
* Custom renderer for table context menus.
|
|
1053
1128
|
*
|
|
@@ -1085,6 +1160,22 @@ interface DocxTrackedChangeCardRenderProps {
|
|
|
1085
1160
|
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1086
1161
|
style: React.CSSProperties;
|
|
1087
1162
|
}
|
|
1163
|
+
interface DocxCommentCardRenderProps {
|
|
1164
|
+
/** Comment data represented by the card. */
|
|
1165
|
+
comment: DocxComment;
|
|
1166
|
+
/** Plain-text comment body (already normalized for display). */
|
|
1167
|
+
snippet: string;
|
|
1168
|
+
/** Formatted comment date, if the source document provided one. */
|
|
1169
|
+
formattedDate?: string;
|
|
1170
|
+
/** Accent color chosen for comments. */
|
|
1171
|
+
accentColor: string;
|
|
1172
|
+
/** Current document theme. */
|
|
1173
|
+
documentTheme: DocxDocumentTheme;
|
|
1174
|
+
/** Zero-based page index that owns the card. */
|
|
1175
|
+
pageIndex: number;
|
|
1176
|
+
/** Positioning style computed by the viewer. Apply this to the card root. */
|
|
1177
|
+
style: React.CSSProperties;
|
|
1178
|
+
}
|
|
1088
1179
|
/**
|
|
1089
1180
|
* Viewer interaction mode.
|
|
1090
1181
|
*
|
|
@@ -1129,6 +1220,14 @@ interface UseDocxTrackChangesResult {
|
|
|
1129
1220
|
changesByLocation: Map<string, DocxTrackedChange[]>;
|
|
1130
1221
|
getChangesForLocation: (location: DocxTextRangeLocation) => DocxTrackedChange[];
|
|
1131
1222
|
}
|
|
1223
|
+
interface UseDocxCommentsResult {
|
|
1224
|
+
comments: DocxComment[];
|
|
1225
|
+
showComments: boolean;
|
|
1226
|
+
setShowComments: (showComments: boolean) => void;
|
|
1227
|
+
toggleShowComments: () => void;
|
|
1228
|
+
commentsByLocation: Map<string, DocxComment[]>;
|
|
1229
|
+
getCommentsForLocation: (location: DocxTextRangeLocation) => DocxComment[];
|
|
1230
|
+
}
|
|
1132
1231
|
interface DocxSectionColumnLayout {
|
|
1133
1232
|
count: number;
|
|
1134
1233
|
gapPx: number;
|
|
@@ -1307,9 +1406,15 @@ declare function useDocxLineSpacing(editor: Pick<DocxEditorController, "selected
|
|
|
1307
1406
|
declare function useDocxBorders(editor: Pick<DocxEditorController, "selectedBorderContext" | "activeBorderPresets" | "applyBorderPreset">): UseDocxBordersResult;
|
|
1308
1407
|
declare function useDocxFormFields(editor: Pick<DocxEditorController, "model" | "selectedFormField" | "selectFormField" | "setFormFieldValue" | "toggleFormCheckbox" | "updateFormFieldWidget">): UseDocxFormFieldsResult;
|
|
1309
1408
|
declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "trackedChanges" | "showTrackedChanges" | "setShowTrackedChanges" | "toggleShowTrackedChanges">): UseDocxTrackChangesResult;
|
|
1409
|
+
/**
|
|
1410
|
+
* Exposes document comments and the show/hide state, mirroring
|
|
1411
|
+
* `useDocxTrackChanges`. Pair with `DocxEditorViewer`'s `renderCommentCard`
|
|
1412
|
+
* to fully customize how comments render.
|
|
1413
|
+
*/
|
|
1414
|
+
declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments">): UseDocxCommentsResult;
|
|
1310
1415
|
declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
|
|
1311
1416
|
declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
|
|
1312
|
-
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;
|
|
1417
|
+
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;
|
|
1313
1418
|
|
|
1314
1419
|
interface InsertParagraphOptions {
|
|
1315
1420
|
paragraphStyle?: ParagraphStyle;
|
|
@@ -1623,4 +1728,4 @@ interface UseDocxModelState {
|
|
|
1623
1728
|
declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
|
|
1624
1729
|
declare function ReactDocxViewer({ file, model, className, layoutOptions, emptyState }: ReactDocxViewerProps): React.JSX.Element;
|
|
1625
1730
|
|
|
1626
|
-
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 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 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 };
|
|
1731
|
+
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 };
|