@extend-ai/react-docx 0.8.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/docx_wasm_bg.wasm +0 -0
- package/dist/index.cjs +1541 -972
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -7
- package/dist/index.d.ts +134 -7
- package/dist/index.js +3750 -3184
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -614,6 +614,50 @@ interface LayoutPage {
|
|
|
614
614
|
}
|
|
615
615
|
declare function layoutDocument(model: DocModel, options?: LayoutOptions): LayoutPage[];
|
|
616
616
|
|
|
617
|
+
declare function setWasmSource(source: WasmSource): void;
|
|
618
|
+
declare function initWasm(source?: WasmSource): ReturnType<typeof initWasm$1>;
|
|
619
|
+
|
|
620
|
+
interface DocxImportResult {
|
|
621
|
+
package: OoxmlPackage;
|
|
622
|
+
model: DocModel;
|
|
623
|
+
source: "worker" | "main-thread";
|
|
624
|
+
timings?: DocxImportWorkerTimings;
|
|
625
|
+
}
|
|
626
|
+
interface DocxImportOptions {
|
|
627
|
+
signal?: AbortSignal;
|
|
628
|
+
transferBuffer?: boolean;
|
|
629
|
+
useWorker?: boolean;
|
|
630
|
+
}
|
|
631
|
+
interface DocxImportWorkerTimings {
|
|
632
|
+
totalMs: number;
|
|
633
|
+
parseMs: number;
|
|
634
|
+
buildModelMs: number;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
type DocxViewerSource = ArrayBuffer | ArrayBufferView | Blob;
|
|
638
|
+
interface ParseDocxForViewerOptions extends DocxImportOptions {
|
|
639
|
+
loadEmbeddedFonts?: boolean | "defer";
|
|
640
|
+
fileName?: string;
|
|
641
|
+
}
|
|
642
|
+
interface ParsedDocxPerformanceTimings {
|
|
643
|
+
fileReadMs: number;
|
|
644
|
+
parseMs: number;
|
|
645
|
+
modelConstructionMs: number;
|
|
646
|
+
fontLoadingMs: number;
|
|
647
|
+
totalMs: number;
|
|
648
|
+
}
|
|
649
|
+
interface ParsedDocxDocument {
|
|
650
|
+
readonly model: DocModel;
|
|
651
|
+
readonly package: OoxmlPackage;
|
|
652
|
+
readonly source: DocxImportResult["source"];
|
|
653
|
+
readonly fileName?: string;
|
|
654
|
+
readonly timings: ParsedDocxPerformanceTimings;
|
|
655
|
+
readonly embeddedFontsLoaded: boolean;
|
|
656
|
+
loadEmbeddedFonts(): Promise<void>;
|
|
657
|
+
dispose(): void;
|
|
658
|
+
}
|
|
659
|
+
declare function parseDocxForViewer(source: DocxViewerSource, options?: ParseDocxForViewerOptions): Promise<ParsedDocxDocument>;
|
|
660
|
+
|
|
617
661
|
type AnnotationMutationFailureReason = "stale" | "unsupported" | "unsafe-xml";
|
|
618
662
|
type AnnotationMutationResult = {
|
|
619
663
|
ok: true;
|
|
@@ -881,6 +925,17 @@ type DocxBorderPresetState = Record<DocxBorderPreset, boolean>;
|
|
|
881
925
|
* imports update the controller through `editor.importDocxFile`.
|
|
882
926
|
*/
|
|
883
927
|
interface UseDocxEditorOptions {
|
|
928
|
+
/**
|
|
929
|
+
* Parsed document to use as the initial editor state without reading or
|
|
930
|
+
* parsing the source again.
|
|
931
|
+
*/
|
|
932
|
+
document?: ParsedDocxDocument;
|
|
933
|
+
/**
|
|
934
|
+
* Loads embedded fonts when an initial parsed document deferred them.
|
|
935
|
+
*
|
|
936
|
+
* @defaultValue `true`
|
|
937
|
+
*/
|
|
938
|
+
loadEmbeddedFonts?: boolean;
|
|
884
939
|
/**
|
|
885
940
|
* Model used for `editor.newDocument()` and for the initial empty editor.
|
|
886
941
|
*
|
|
@@ -1309,6 +1364,11 @@ interface DocxEditorViewerProps {
|
|
|
1309
1364
|
* range is rendered.
|
|
1310
1365
|
*/
|
|
1311
1366
|
visiblePageRange?: DocxVisiblePageRange;
|
|
1367
|
+
/**
|
|
1368
|
+
* Hard set of zero-based pages to mount. Unlike `visiblePageRange`, omitted
|
|
1369
|
+
* pages remain metadata-only even when they fall between requested pages.
|
|
1370
|
+
*/
|
|
1371
|
+
pageIndexes?: readonly number[];
|
|
1312
1372
|
/**
|
|
1313
1373
|
* Called whenever the viewer's resolved page count changes.
|
|
1314
1374
|
*/
|
|
@@ -1609,6 +1669,17 @@ interface UseDocxPageThumbnailsOptions {
|
|
|
1609
1669
|
* Prioritizes thumbnails for consumer-owned virtualized thumbnail rails.
|
|
1610
1670
|
*/
|
|
1611
1671
|
renderWindow?: DocxPageThumbnailRenderWindow;
|
|
1672
|
+
/**
|
|
1673
|
+
* Hard set of zero-based pages exposed and eligible for rasterization.
|
|
1674
|
+
* Omit to preserve the existing all-pages behavior.
|
|
1675
|
+
*/
|
|
1676
|
+
pageIndexes?: readonly number[];
|
|
1677
|
+
/**
|
|
1678
|
+
* Default scheduling policy for thumbnail paint requests.
|
|
1679
|
+
*
|
|
1680
|
+
* @defaultValue `"idle"`
|
|
1681
|
+
*/
|
|
1682
|
+
scheduling?: DocxThumbnailScheduling;
|
|
1612
1683
|
/**
|
|
1613
1684
|
* Prevents thumbnail rendering while keeping stable item metadata.
|
|
1614
1685
|
*
|
|
@@ -1617,6 +1688,13 @@ interface UseDocxPageThumbnailsOptions {
|
|
|
1617
1688
|
disabled?: boolean;
|
|
1618
1689
|
}
|
|
1619
1690
|
type DocxPageThumbnailStatus = "idle" | "rendering" | "ready" | "unavailable" | "error";
|
|
1691
|
+
type DocxThumbnailScheduling = "idle" | "immediate";
|
|
1692
|
+
interface DocxRenderToCanvasOptions {
|
|
1693
|
+
/** Bypasses idle scheduling for a visible imperative request. */
|
|
1694
|
+
scheduling?: DocxThumbnailScheduling;
|
|
1695
|
+
/** Ignores unchanged-content and surface-cache fast paths. */
|
|
1696
|
+
force?: boolean;
|
|
1697
|
+
}
|
|
1620
1698
|
interface DocxPageThumbnailItem extends DocxPageThumbnailResolution {
|
|
1621
1699
|
/** Source page aspect ratio. */
|
|
1622
1700
|
aspectRatio: number;
|
|
@@ -1645,7 +1723,7 @@ interface DocxPageThumbnailItem extends DocxPageThumbnailResolution {
|
|
|
1645
1723
|
/** Ref callback that keeps an attached canvas rendered as the page changes. */
|
|
1646
1724
|
canvasRef: (canvas: HTMLCanvasElement | null) => void;
|
|
1647
1725
|
/** Asynchronously renders this thumbnail into a canvas. */
|
|
1648
|
-
renderToCanvas: (canvas: HTMLCanvasElement) => Promise<void>;
|
|
1726
|
+
renderToCanvas: (canvas: HTMLCanvasElement, options?: DocxRenderToCanvasOptions) => Promise<void>;
|
|
1649
1727
|
/** Alias for `widthPx`. */
|
|
1650
1728
|
width: number;
|
|
1651
1729
|
}
|
|
@@ -1679,7 +1757,7 @@ declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "tracked
|
|
|
1679
1757
|
declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments" | "createComment" | "setCommentResolved">): UseDocxCommentsResult;
|
|
1680
1758
|
declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
|
|
1681
1759
|
declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
|
|
1682
|
-
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;
|
|
1760
|
+
declare function DocxEditorViewer({ editor, className, style, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, pageIndexes, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, showComments, renderCommentCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
|
|
1683
1761
|
|
|
1684
1762
|
interface ResolvedModelSection {
|
|
1685
1763
|
startNodeIndex: number;
|
|
@@ -1896,9 +1974,6 @@ declare function modelToDocumentXml(model: DocModel, basePackage?: OoxmlPackage)
|
|
|
1896
1974
|
declare function serializeDocModel(model: DocModel, basePackage?: OoxmlPackage): Promise<OoxmlPackage>;
|
|
1897
1975
|
declare function serializeDocx(model: DocModel, basePackage?: OoxmlPackage): Promise<ArrayBuffer>;
|
|
1898
1976
|
|
|
1899
|
-
declare function setWasmSource(source: WasmSource): void;
|
|
1900
|
-
declare function initWasm(source?: WasmSource): ReturnType<typeof initWasm$1>;
|
|
1901
|
-
|
|
1902
1977
|
interface ReactDocxViewerProps {
|
|
1903
1978
|
/**
|
|
1904
1979
|
* Raw `.docx` file contents to parse and render.
|
|
@@ -1921,6 +1996,12 @@ interface ReactDocxViewerProps {
|
|
|
1921
1996
|
* pipeline.
|
|
1922
1997
|
*/
|
|
1923
1998
|
model?: DocModel;
|
|
1999
|
+
/** Parsed input returned by `parseDocxForViewer`. */
|
|
2000
|
+
document?: ParsedDocxDocument;
|
|
2001
|
+
/** Loads deferred embedded fonts when a parsed document is mounted. */
|
|
2002
|
+
loadEmbeddedFonts?: boolean;
|
|
2003
|
+
/** Hard set of zero-based pages to mount. */
|
|
2004
|
+
pageIndexes?: readonly number[];
|
|
1924
2005
|
/**
|
|
1925
2006
|
* CSS class applied to the outer viewer container.
|
|
1926
2007
|
*
|
|
@@ -1961,6 +2042,52 @@ interface UseDocxModelState {
|
|
|
1961
2042
|
error?: Error;
|
|
1962
2043
|
}
|
|
1963
2044
|
declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
|
|
1964
|
-
declare function ReactDocxViewer({ file, model, className, layoutOptions, emptyState, }: ReactDocxViewerProps): React.JSX.Element;
|
|
2045
|
+
declare function ReactDocxViewer({ file, model, document, loadEmbeddedFonts, pageIndexes, className, layoutOptions, emptyState, }: ReactDocxViewerProps): React.JSX.Element;
|
|
2046
|
+
type DocxThumbnailOutput = "canvas" | "blob" | "imageBitmap";
|
|
2047
|
+
interface CreateDocxThumbnailRendererOptions {
|
|
2048
|
+
scheduling?: DocxThumbnailScheduling;
|
|
2049
|
+
pixelRatio?: number;
|
|
2050
|
+
resolution?: DocxPageThumbnailBounds;
|
|
2051
|
+
pageIndexes?: readonly number[];
|
|
2052
|
+
}
|
|
2053
|
+
interface RenderDocxThumbnailPageOptions {
|
|
2054
|
+
scheduling?: DocxThumbnailScheduling;
|
|
2055
|
+
pixelRatio?: number;
|
|
2056
|
+
resolution?: DocxPageThumbnailBounds;
|
|
2057
|
+
maxWidth?: number;
|
|
2058
|
+
maxHeight?: number;
|
|
2059
|
+
output?: DocxThumbnailOutput;
|
|
2060
|
+
canvas?: HTMLCanvasElement;
|
|
2061
|
+
mimeType?: string;
|
|
2062
|
+
quality?: number;
|
|
2063
|
+
}
|
|
2064
|
+
interface DocxThumbnailRenderTimings {
|
|
2065
|
+
paginationMs: number;
|
|
2066
|
+
pageMountMs: number;
|
|
2067
|
+
rasterizationMs: number;
|
|
2068
|
+
encodingMs: number;
|
|
2069
|
+
totalMs: number;
|
|
2070
|
+
}
|
|
2071
|
+
interface DocxThumbnailRenderResult {
|
|
2072
|
+
pageIndex: number;
|
|
2073
|
+
pageCount: number;
|
|
2074
|
+
width: number;
|
|
2075
|
+
height: number;
|
|
2076
|
+
pixelWidth: number;
|
|
2077
|
+
pixelHeight: number;
|
|
2078
|
+
output: DocxThumbnailOutput;
|
|
2079
|
+
canvas?: HTMLCanvasElement;
|
|
2080
|
+
blob?: Blob;
|
|
2081
|
+
imageBitmap?: ImageBitmap;
|
|
2082
|
+
timings: DocxThumbnailRenderTimings;
|
|
2083
|
+
}
|
|
2084
|
+
type DocxThumbnailDocument = ParsedDocxDocument | DocModel;
|
|
2085
|
+
interface DocxThumbnailRenderer {
|
|
2086
|
+
readonly document: DocxThumbnailDocument;
|
|
2087
|
+
readonly pageCount: number;
|
|
2088
|
+
renderPage(pageIndex: number, options?: RenderDocxThumbnailPageOptions): Promise<DocxThumbnailRenderResult>;
|
|
2089
|
+
dispose(): void;
|
|
2090
|
+
}
|
|
2091
|
+
declare function createDocxThumbnailRenderer(documentModel: DocxThumbnailDocument, options?: CreateDocxThumbnailRendererOptions): DocxThumbnailRenderer;
|
|
1965
2092
|
|
|
1966
|
-
export { type AnnotationMutationFailureReason, type AnnotationMutationResult, type CommentCreationResult, type CreateParagraphCommentInput, 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 DocxAnnotationCommandFailureReason, type DocxAnnotationCommandResult, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxComment, type DocxCommentCardRenderProps, type DocxCommentCreationCommandResult, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxCreateCommentOptions, 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 DocxPageThumbnailRenderWindow, 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 ParagraphRevisionKind, type ParagraphRevisionTarget, 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, acceptParagraphRevision, allocateBlockId, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, cloneParagraphNode, cloneTableNode, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectDuplicateDocModelBlockIds, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createMinimalDocxPackage, createParagraphComment, deepFreezeDocModel, defaultStarterModel, duplicateParagraph, ensureDocModelBlockIds, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, rejectParagraphRevision, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setCommentResolved, 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 };
|
|
2093
|
+
export { type AnnotationMutationFailureReason, type AnnotationMutationResult, type CommentCreationResult, type CreateDocxThumbnailRendererOptions, type CreateParagraphCommentInput, 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 DocxAnnotationCommandFailureReason, type DocxAnnotationCommandResult, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxComment, type DocxCommentCardRenderProps, type DocxCommentCreationCommandResult, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxCreateCommentOptions, 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 DocxPageThumbnailRenderWindow, type DocxPageThumbnailResolution, type DocxPageThumbnailResolutionOptions, type DocxPageThumbnailStatus, type DocxPageVirtualizationOptions, type DocxPaginationInfo, type DocxRenderToCanvasOptions, type DocxSectionColumnLayout, type DocxSelectedFormField, type DocxTableContextMenuAction, type DocxTableContextMenuActionId, type DocxTableContextMenuContext, type DocxTableContextMenuRenderProps, type DocxTextRange, type DocxTextRangeLocation, type DocxThumbnailDocument, type DocxThumbnailOutput, type DocxThumbnailRenderResult, type DocxThumbnailRenderTimings, type DocxThumbnailRenderer, type DocxThumbnailScheduling, type DocxTrackedChange, type DocxTrackedChangeCardRenderProps, type DocxTrackedChangeKind, type DocxViewerSource, 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 ParagraphRevisionKind, type ParagraphRevisionTarget, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, type ParseDocxForViewerOptions, type ParsedDocxDocument, type ParsedDocxPerformanceTimings, ReactDocxViewer, type ReactDocxViewerProps, type RenderDocxThumbnailPageOptions, 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, acceptParagraphRevision, allocateBlockId, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, cloneParagraphNode, cloneTableNode, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectDuplicateDocModelBlockIds, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createDocxThumbnailRenderer, createMinimalDocxPackage, createParagraphComment, deepFreezeDocModel, defaultStarterModel, duplicateParagraph, ensureDocModelBlockIds, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseDocxForViewer, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, rejectParagraphRevision, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setCommentResolved, 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
|
@@ -614,6 +614,50 @@ interface LayoutPage {
|
|
|
614
614
|
}
|
|
615
615
|
declare function layoutDocument(model: DocModel, options?: LayoutOptions): LayoutPage[];
|
|
616
616
|
|
|
617
|
+
declare function setWasmSource(source: WasmSource): void;
|
|
618
|
+
declare function initWasm(source?: WasmSource): ReturnType<typeof initWasm$1>;
|
|
619
|
+
|
|
620
|
+
interface DocxImportResult {
|
|
621
|
+
package: OoxmlPackage;
|
|
622
|
+
model: DocModel;
|
|
623
|
+
source: "worker" | "main-thread";
|
|
624
|
+
timings?: DocxImportWorkerTimings;
|
|
625
|
+
}
|
|
626
|
+
interface DocxImportOptions {
|
|
627
|
+
signal?: AbortSignal;
|
|
628
|
+
transferBuffer?: boolean;
|
|
629
|
+
useWorker?: boolean;
|
|
630
|
+
}
|
|
631
|
+
interface DocxImportWorkerTimings {
|
|
632
|
+
totalMs: number;
|
|
633
|
+
parseMs: number;
|
|
634
|
+
buildModelMs: number;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
type DocxViewerSource = ArrayBuffer | ArrayBufferView | Blob;
|
|
638
|
+
interface ParseDocxForViewerOptions extends DocxImportOptions {
|
|
639
|
+
loadEmbeddedFonts?: boolean | "defer";
|
|
640
|
+
fileName?: string;
|
|
641
|
+
}
|
|
642
|
+
interface ParsedDocxPerformanceTimings {
|
|
643
|
+
fileReadMs: number;
|
|
644
|
+
parseMs: number;
|
|
645
|
+
modelConstructionMs: number;
|
|
646
|
+
fontLoadingMs: number;
|
|
647
|
+
totalMs: number;
|
|
648
|
+
}
|
|
649
|
+
interface ParsedDocxDocument {
|
|
650
|
+
readonly model: DocModel;
|
|
651
|
+
readonly package: OoxmlPackage;
|
|
652
|
+
readonly source: DocxImportResult["source"];
|
|
653
|
+
readonly fileName?: string;
|
|
654
|
+
readonly timings: ParsedDocxPerformanceTimings;
|
|
655
|
+
readonly embeddedFontsLoaded: boolean;
|
|
656
|
+
loadEmbeddedFonts(): Promise<void>;
|
|
657
|
+
dispose(): void;
|
|
658
|
+
}
|
|
659
|
+
declare function parseDocxForViewer(source: DocxViewerSource, options?: ParseDocxForViewerOptions): Promise<ParsedDocxDocument>;
|
|
660
|
+
|
|
617
661
|
type AnnotationMutationFailureReason = "stale" | "unsupported" | "unsafe-xml";
|
|
618
662
|
type AnnotationMutationResult = {
|
|
619
663
|
ok: true;
|
|
@@ -881,6 +925,17 @@ type DocxBorderPresetState = Record<DocxBorderPreset, boolean>;
|
|
|
881
925
|
* imports update the controller through `editor.importDocxFile`.
|
|
882
926
|
*/
|
|
883
927
|
interface UseDocxEditorOptions {
|
|
928
|
+
/**
|
|
929
|
+
* Parsed document to use as the initial editor state without reading or
|
|
930
|
+
* parsing the source again.
|
|
931
|
+
*/
|
|
932
|
+
document?: ParsedDocxDocument;
|
|
933
|
+
/**
|
|
934
|
+
* Loads embedded fonts when an initial parsed document deferred them.
|
|
935
|
+
*
|
|
936
|
+
* @defaultValue `true`
|
|
937
|
+
*/
|
|
938
|
+
loadEmbeddedFonts?: boolean;
|
|
884
939
|
/**
|
|
885
940
|
* Model used for `editor.newDocument()` and for the initial empty editor.
|
|
886
941
|
*
|
|
@@ -1309,6 +1364,11 @@ interface DocxEditorViewerProps {
|
|
|
1309
1364
|
* range is rendered.
|
|
1310
1365
|
*/
|
|
1311
1366
|
visiblePageRange?: DocxVisiblePageRange;
|
|
1367
|
+
/**
|
|
1368
|
+
* Hard set of zero-based pages to mount. Unlike `visiblePageRange`, omitted
|
|
1369
|
+
* pages remain metadata-only even when they fall between requested pages.
|
|
1370
|
+
*/
|
|
1371
|
+
pageIndexes?: readonly number[];
|
|
1312
1372
|
/**
|
|
1313
1373
|
* Called whenever the viewer's resolved page count changes.
|
|
1314
1374
|
*/
|
|
@@ -1609,6 +1669,17 @@ interface UseDocxPageThumbnailsOptions {
|
|
|
1609
1669
|
* Prioritizes thumbnails for consumer-owned virtualized thumbnail rails.
|
|
1610
1670
|
*/
|
|
1611
1671
|
renderWindow?: DocxPageThumbnailRenderWindow;
|
|
1672
|
+
/**
|
|
1673
|
+
* Hard set of zero-based pages exposed and eligible for rasterization.
|
|
1674
|
+
* Omit to preserve the existing all-pages behavior.
|
|
1675
|
+
*/
|
|
1676
|
+
pageIndexes?: readonly number[];
|
|
1677
|
+
/**
|
|
1678
|
+
* Default scheduling policy for thumbnail paint requests.
|
|
1679
|
+
*
|
|
1680
|
+
* @defaultValue `"idle"`
|
|
1681
|
+
*/
|
|
1682
|
+
scheduling?: DocxThumbnailScheduling;
|
|
1612
1683
|
/**
|
|
1613
1684
|
* Prevents thumbnail rendering while keeping stable item metadata.
|
|
1614
1685
|
*
|
|
@@ -1617,6 +1688,13 @@ interface UseDocxPageThumbnailsOptions {
|
|
|
1617
1688
|
disabled?: boolean;
|
|
1618
1689
|
}
|
|
1619
1690
|
type DocxPageThumbnailStatus = "idle" | "rendering" | "ready" | "unavailable" | "error";
|
|
1691
|
+
type DocxThumbnailScheduling = "idle" | "immediate";
|
|
1692
|
+
interface DocxRenderToCanvasOptions {
|
|
1693
|
+
/** Bypasses idle scheduling for a visible imperative request. */
|
|
1694
|
+
scheduling?: DocxThumbnailScheduling;
|
|
1695
|
+
/** Ignores unchanged-content and surface-cache fast paths. */
|
|
1696
|
+
force?: boolean;
|
|
1697
|
+
}
|
|
1620
1698
|
interface DocxPageThumbnailItem extends DocxPageThumbnailResolution {
|
|
1621
1699
|
/** Source page aspect ratio. */
|
|
1622
1700
|
aspectRatio: number;
|
|
@@ -1645,7 +1723,7 @@ interface DocxPageThumbnailItem extends DocxPageThumbnailResolution {
|
|
|
1645
1723
|
/** Ref callback that keeps an attached canvas rendered as the page changes. */
|
|
1646
1724
|
canvasRef: (canvas: HTMLCanvasElement | null) => void;
|
|
1647
1725
|
/** Asynchronously renders this thumbnail into a canvas. */
|
|
1648
|
-
renderToCanvas: (canvas: HTMLCanvasElement) => Promise<void>;
|
|
1726
|
+
renderToCanvas: (canvas: HTMLCanvasElement, options?: DocxRenderToCanvasOptions) => Promise<void>;
|
|
1649
1727
|
/** Alias for `widthPx`. */
|
|
1650
1728
|
width: number;
|
|
1651
1729
|
}
|
|
@@ -1679,7 +1757,7 @@ declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "tracked
|
|
|
1679
1757
|
declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments" | "createComment" | "setCommentResolved">): UseDocxCommentsResult;
|
|
1680
1758
|
declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
|
|
1681
1759
|
declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
|
|
1682
|
-
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;
|
|
1760
|
+
declare function DocxEditorViewer({ editor, className, style, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, pageIndexes, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, showComments, renderCommentCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
|
|
1683
1761
|
|
|
1684
1762
|
interface ResolvedModelSection {
|
|
1685
1763
|
startNodeIndex: number;
|
|
@@ -1896,9 +1974,6 @@ declare function modelToDocumentXml(model: DocModel, basePackage?: OoxmlPackage)
|
|
|
1896
1974
|
declare function serializeDocModel(model: DocModel, basePackage?: OoxmlPackage): Promise<OoxmlPackage>;
|
|
1897
1975
|
declare function serializeDocx(model: DocModel, basePackage?: OoxmlPackage): Promise<ArrayBuffer>;
|
|
1898
1976
|
|
|
1899
|
-
declare function setWasmSource(source: WasmSource): void;
|
|
1900
|
-
declare function initWasm(source?: WasmSource): ReturnType<typeof initWasm$1>;
|
|
1901
|
-
|
|
1902
1977
|
interface ReactDocxViewerProps {
|
|
1903
1978
|
/**
|
|
1904
1979
|
* Raw `.docx` file contents to parse and render.
|
|
@@ -1921,6 +1996,12 @@ interface ReactDocxViewerProps {
|
|
|
1921
1996
|
* pipeline.
|
|
1922
1997
|
*/
|
|
1923
1998
|
model?: DocModel;
|
|
1999
|
+
/** Parsed input returned by `parseDocxForViewer`. */
|
|
2000
|
+
document?: ParsedDocxDocument;
|
|
2001
|
+
/** Loads deferred embedded fonts when a parsed document is mounted. */
|
|
2002
|
+
loadEmbeddedFonts?: boolean;
|
|
2003
|
+
/** Hard set of zero-based pages to mount. */
|
|
2004
|
+
pageIndexes?: readonly number[];
|
|
1924
2005
|
/**
|
|
1925
2006
|
* CSS class applied to the outer viewer container.
|
|
1926
2007
|
*
|
|
@@ -1961,6 +2042,52 @@ interface UseDocxModelState {
|
|
|
1961
2042
|
error?: Error;
|
|
1962
2043
|
}
|
|
1963
2044
|
declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
|
|
1964
|
-
declare function ReactDocxViewer({ file, model, className, layoutOptions, emptyState, }: ReactDocxViewerProps): React.JSX.Element;
|
|
2045
|
+
declare function ReactDocxViewer({ file, model, document, loadEmbeddedFonts, pageIndexes, className, layoutOptions, emptyState, }: ReactDocxViewerProps): React.JSX.Element;
|
|
2046
|
+
type DocxThumbnailOutput = "canvas" | "blob" | "imageBitmap";
|
|
2047
|
+
interface CreateDocxThumbnailRendererOptions {
|
|
2048
|
+
scheduling?: DocxThumbnailScheduling;
|
|
2049
|
+
pixelRatio?: number;
|
|
2050
|
+
resolution?: DocxPageThumbnailBounds;
|
|
2051
|
+
pageIndexes?: readonly number[];
|
|
2052
|
+
}
|
|
2053
|
+
interface RenderDocxThumbnailPageOptions {
|
|
2054
|
+
scheduling?: DocxThumbnailScheduling;
|
|
2055
|
+
pixelRatio?: number;
|
|
2056
|
+
resolution?: DocxPageThumbnailBounds;
|
|
2057
|
+
maxWidth?: number;
|
|
2058
|
+
maxHeight?: number;
|
|
2059
|
+
output?: DocxThumbnailOutput;
|
|
2060
|
+
canvas?: HTMLCanvasElement;
|
|
2061
|
+
mimeType?: string;
|
|
2062
|
+
quality?: number;
|
|
2063
|
+
}
|
|
2064
|
+
interface DocxThumbnailRenderTimings {
|
|
2065
|
+
paginationMs: number;
|
|
2066
|
+
pageMountMs: number;
|
|
2067
|
+
rasterizationMs: number;
|
|
2068
|
+
encodingMs: number;
|
|
2069
|
+
totalMs: number;
|
|
2070
|
+
}
|
|
2071
|
+
interface DocxThumbnailRenderResult {
|
|
2072
|
+
pageIndex: number;
|
|
2073
|
+
pageCount: number;
|
|
2074
|
+
width: number;
|
|
2075
|
+
height: number;
|
|
2076
|
+
pixelWidth: number;
|
|
2077
|
+
pixelHeight: number;
|
|
2078
|
+
output: DocxThumbnailOutput;
|
|
2079
|
+
canvas?: HTMLCanvasElement;
|
|
2080
|
+
blob?: Blob;
|
|
2081
|
+
imageBitmap?: ImageBitmap;
|
|
2082
|
+
timings: DocxThumbnailRenderTimings;
|
|
2083
|
+
}
|
|
2084
|
+
type DocxThumbnailDocument = ParsedDocxDocument | DocModel;
|
|
2085
|
+
interface DocxThumbnailRenderer {
|
|
2086
|
+
readonly document: DocxThumbnailDocument;
|
|
2087
|
+
readonly pageCount: number;
|
|
2088
|
+
renderPage(pageIndex: number, options?: RenderDocxThumbnailPageOptions): Promise<DocxThumbnailRenderResult>;
|
|
2089
|
+
dispose(): void;
|
|
2090
|
+
}
|
|
2091
|
+
declare function createDocxThumbnailRenderer(documentModel: DocxThumbnailDocument, options?: CreateDocxThumbnailRendererOptions): DocxThumbnailRenderer;
|
|
1965
2092
|
|
|
1966
|
-
export { type AnnotationMutationFailureReason, type AnnotationMutationResult, type CommentCreationResult, type CreateParagraphCommentInput, 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 DocxAnnotationCommandFailureReason, type DocxAnnotationCommandResult, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxComment, type DocxCommentCardRenderProps, type DocxCommentCreationCommandResult, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxCreateCommentOptions, 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 DocxPageThumbnailRenderWindow, 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 ParagraphRevisionKind, type ParagraphRevisionTarget, 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, acceptParagraphRevision, allocateBlockId, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, cloneParagraphNode, cloneTableNode, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectDuplicateDocModelBlockIds, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createMinimalDocxPackage, createParagraphComment, deepFreezeDocModel, defaultStarterModel, duplicateParagraph, ensureDocModelBlockIds, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, rejectParagraphRevision, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setCommentResolved, 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 };
|
|
2093
|
+
export { type AnnotationMutationFailureReason, type AnnotationMutationResult, type CommentCreationResult, type CreateDocxThumbnailRendererOptions, type CreateParagraphCommentInput, 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 DocxAnnotationCommandFailureReason, type DocxAnnotationCommandResult, type DocxBorderContext, type DocxBorderPreset, type DocxBorderPresetState, type DocxComment, type DocxCommentCardRenderProps, type DocxCommentCreationCommandResult, type DocxContextMenuAction, type DocxContextMenuActionId, type DocxContextMenuContext, type DocxContextMenuRenderProps, type DocxCreateCommentOptions, 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 DocxPageThumbnailRenderWindow, type DocxPageThumbnailResolution, type DocxPageThumbnailResolutionOptions, type DocxPageThumbnailStatus, type DocxPageVirtualizationOptions, type DocxPaginationInfo, type DocxRenderToCanvasOptions, type DocxSectionColumnLayout, type DocxSelectedFormField, type DocxTableContextMenuAction, type DocxTableContextMenuActionId, type DocxTableContextMenuContext, type DocxTableContextMenuRenderProps, type DocxTextRange, type DocxTextRangeLocation, type DocxThumbnailDocument, type DocxThumbnailOutput, type DocxThumbnailRenderResult, type DocxThumbnailRenderTimings, type DocxThumbnailRenderer, type DocxThumbnailScheduling, type DocxTrackedChange, type DocxTrackedChangeCardRenderProps, type DocxTrackedChangeKind, type DocxViewerSource, 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 ParagraphRevisionKind, type ParagraphRevisionTarget, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, type ParseDocxForViewerOptions, type ParsedDocxDocument, type ParsedDocxPerformanceTimings, ReactDocxViewer, type ReactDocxViewerProps, type RenderDocxThumbnailPageOptions, 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, acceptParagraphRevision, allocateBlockId, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, cloneDocModel, cloneParagraphNode, cloneTableNode, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectDuplicateDocModelBlockIds, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, copyParagraphs, createDocxThumbnailRenderer, createMinimalDocxPackage, createParagraphComment, deepFreezeDocModel, defaultStarterModel, duplicateParagraph, ensureDocModelBlockIds, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, normalizeDocModel, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseDocxForViewer, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, rejectParagraphRevision, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setCommentResolved, 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 };
|