@extend-ai/react-docx 0.9.1 → 0.10.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/dist/index.d.cts CHANGED
@@ -72,6 +72,7 @@ interface TextStyle {
72
72
  highlight?: string;
73
73
  backgroundColor?: string;
74
74
  fontSizePt?: number;
75
+ fontSizeCsPt?: number;
75
76
  /** Resolved single-family fallback retained for backwards compatibility. */
76
77
  fontFamily?: string;
77
78
  /** @internal Import-time fallback used to detect fontFamily edits. */
@@ -235,8 +236,18 @@ interface ParagraphTabStop {
235
236
  leader?: "none" | "dot" | "hyphen" | "underscore" | "middleDot";
236
237
  positionTwips?: number;
237
238
  }
239
+ type ParagraphTextAlignment = "auto" | "top" | "center" | "baseline" | "bottom";
238
240
  interface ParagraphStyle {
239
241
  align?: ParagraphAlignment;
242
+ textAlignment?: ParagraphTextAlignment;
243
+ /** @internal Imported effective vertical character alignment. */
244
+ sourceTextAlignment?: ParagraphTextAlignment;
245
+ /** @internal Whether the imported paragraph had a direct alignment property. */
246
+ sourceHasTextAlignment?: boolean;
247
+ /** @internal Inherited alignment exposed when a direct override is cleared. */
248
+ sourceInheritedTextAlignment?: ParagraphTextAlignment;
249
+ /** @internal Table-style alignment before paragraph-style overrides. */
250
+ sourceTableTextAlignment?: ParagraphTextAlignment;
240
251
  headingLevel?: HeadingLevel;
241
252
  styleId?: string;
242
253
  styleName?: string;
@@ -263,12 +274,26 @@ interface ParagraphStyle {
263
274
  verticalSpaceTwips?: number;
264
275
  };
265
276
  }
277
+ /** @internal Imported mark layers before paragraph-style inheritance. */
278
+ interface ParagraphMarkFormattingSource {
279
+ defaultStyle?: TextStyle;
280
+ characterStyle?: TextStyle;
281
+ directStyle?: TextStyle;
282
+ }
266
283
  interface ParagraphNode {
267
284
  type: "paragraph";
268
285
  /** Stable identity for measurement caches; survives edits via cloneParagraph. */
269
286
  blockId?: string;
270
287
  children: ParagraphChildNode[];
271
288
  style?: ParagraphStyle;
289
+ /** Effective formatting of the paragraph-ending mark. */
290
+ paragraphMarkStyle?: TextStyle;
291
+ /** @internal Imported mark formatting used to detect changes. */
292
+ sourceParagraphMarkStyle?: TextStyle;
293
+ /** @internal Presence distinguishes imported mark layers from fresh marks. */
294
+ sourceParagraphMarkFormatting?: ParagraphMarkFormattingSource;
295
+ /** @internal Original paragraph mark properties retained during regeneration. */
296
+ sourceParagraphMarkPropertiesXml?: string;
272
297
  paragraphMarkDeleted?: boolean;
273
298
  sourceXml?: string;
274
299
  /** @internal Validated provenance for a surgical plain-text sourceXml patch. */
@@ -309,14 +334,39 @@ interface TableBorderSet {
309
334
  tl2br?: TableBorderStyle;
310
335
  tr2bl?: TableBorderStyle;
311
336
  }
337
+ /** dxa values are twips; pct values are ordinary percentages. */
338
+ type TablePreferredWidth = {
339
+ type: "dxa";
340
+ value: number;
341
+ } | {
342
+ type: "pct";
343
+ value: number;
344
+ } | {
345
+ type: "auto";
346
+ } | {
347
+ type: "nil";
348
+ };
349
+ /** @internal Imported baseline for edits through either width API. */
350
+ interface TableWidthSource {
351
+ preferredWidth?: TablePreferredWidth;
352
+ widthTwips?: number;
353
+ inheritedPreferredWidth?: TablePreferredWidth;
354
+ }
355
+ type TableAlignment = "left" | "center" | "right";
312
356
  interface TableCellStyle {
313
357
  backgroundColor?: string;
314
358
  gridSpan?: number;
315
359
  rowSpan?: number;
316
360
  vMergeContinuation?: boolean;
317
361
  widthTwips?: number;
362
+ preferredWidth?: TablePreferredWidth;
363
+ /** @internal */
364
+ sourceWidth?: TableWidthSource;
318
365
  marginTwips?: TableBoxSpacing;
319
366
  verticalAlign?: "top" | "center" | "bottom";
367
+ textDirection?: "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV" | "tbLrV";
368
+ /** @internal */
369
+ sourceTextDirection?: TableCellStyle["textDirection"];
320
370
  borders?: TableBorderSet;
321
371
  }
322
372
  type TableCellContentNode = ParagraphNode | TableNode;
@@ -325,7 +375,20 @@ interface TableCellNode {
325
375
  nodes: TableCellContentNode[];
326
376
  style?: TableCellStyle;
327
377
  }
378
+ /** @internal Imported baseline for row geometry edits and clears. */
379
+ interface TableRowGeometrySource {
380
+ gridBefore?: number;
381
+ gridAfter?: number;
382
+ widthBefore?: TablePreferredWidth;
383
+ widthAfter?: TablePreferredWidth;
384
+ }
328
385
  interface TableRowStyle {
386
+ gridBefore?: number;
387
+ gridAfter?: number;
388
+ widthBefore?: TablePreferredWidth;
389
+ widthAfter?: TablePreferredWidth;
390
+ /** @internal */
391
+ sourceRowGeometry?: TableRowGeometrySource;
329
392
  backgroundColor?: string;
330
393
  heightTwips?: number;
331
394
  heightRule?: "auto" | "atLeast" | "exact";
@@ -338,7 +401,23 @@ interface TableRowNode {
338
401
  style?: TableRowStyle;
339
402
  }
340
403
  interface TableStyle {
404
+ styleId?: string;
405
+ /** @internal Imported table-style identity used to detect edits and clears. */
406
+ sourceStyleId?: string;
341
407
  widthTwips?: number;
408
+ preferredWidth?: TablePreferredWidth;
409
+ /** @internal */
410
+ sourceWidth?: TableWidthSource;
411
+ alignment?: TableAlignment;
412
+ /** @internal Imported effective alignment before editing. */
413
+ sourceAlignment?: TableAlignment;
414
+ /** @internal Inherited alignment exposed when a direct override is cleared. */
415
+ sourceInheritedAlignment?: TableAlignment;
416
+ bidiVisual?: boolean;
417
+ /** @internal Imported effective table direction before editing. */
418
+ sourceBidiVisual?: boolean;
419
+ /** @internal Inherited direction exposed when a direct override is cleared. */
420
+ sourceInheritedBidiVisual?: boolean;
342
421
  indentTwips?: number;
343
422
  layout?: "fixed" | "autofit";
344
423
  cellSpacingTwips?: number;
@@ -394,6 +473,9 @@ interface ParagraphStyleDefinition {
394
473
  basedOnId?: string;
395
474
  nextStyleId?: string;
396
475
  align?: ParagraphAlignment;
476
+ textAlignment?: ParagraphTextAlignment;
477
+ /** @internal Whether the style chain owns alignment before document defaults. */
478
+ sourceHasTextAlignment?: boolean;
397
479
  headingLevel?: HeadingLevel;
398
480
  numbering?: ParagraphNumbering;
399
481
  spacing?: ParagraphSpacing;
@@ -484,6 +566,13 @@ interface DocumentCommentDefinition {
484
566
  isNew?: boolean;
485
567
  }
486
568
  interface DocumentCompatibilitySettings {
569
+ noLeading?: boolean;
570
+ suppressTopSpacingWP?: boolean;
571
+ truncateFontHeightsLikeWP6?: boolean;
572
+ noExtraLineSpacing?: boolean;
573
+ spaceForUL?: boolean;
574
+ suppressBottomSpacing?: boolean;
575
+ compatibilityMode?: number;
487
576
  suppressSpacingBeforeAfterPageBreak?: boolean;
488
577
  usePrinterMetrics?: boolean;
489
578
  useFixedHtmlParagraphSpacing?: boolean;
@@ -505,6 +594,11 @@ interface DocModel {
505
594
  footerSections: FooterSection[];
506
595
  paragraphStyles: ParagraphStyleDefinition[];
507
596
  defaultParagraphStyleId?: string;
597
+ defaultTabStopTwips?: number;
598
+ /** @internal Imported settings are authoritative when their values are cleared. */
599
+ documentSettingsImported?: boolean;
600
+ /** @internal Import consumed the line-spacing compatibility fields. */
601
+ lineSpacingCompatibilityImported?: boolean;
508
602
  numberingDefinitions?: NumberingDefinitionSet;
509
603
  compatibility?: DocumentCompatibilitySettings;
510
604
  footnotes?: DocumentNoteDefinition[];
@@ -513,6 +607,12 @@ interface DocModel {
513
607
  };
514
608
  }
515
609
 
610
+ /** The parent grid bounds skipped-column counts without changing their source values. */
611
+ declare function tableGridColumnBound(table: Pick<TableNode, "style" | "rows">): number;
612
+ /** Ignore skipped-grid counts that exceed the parent grid. */
613
+ declare function resolveTableGridSkipCount(count: number | undefined, gridColumnCount: number): number;
614
+ declare function tableRowGridSkipCount(table: Pick<TableNode, "style" | "rows">, row: TableRowNode, edge: "before" | "after"): number;
615
+
516
616
  /** Returns a fresh block id, unique for the lifetime of this module instance. */
517
617
  declare function allocateBlockId(): string;
518
618
  /**
@@ -529,6 +629,7 @@ declare function ensureDocModelBlockIds(model: DocModel): DocModel;
529
629
  */
530
630
  declare function collectDuplicateDocModelBlockIds(model: DocModel): string[];
531
631
 
632
+ declare function cloneParagraphMarkFormatting(formatting?: ParagraphMarkFormattingSource): ParagraphMarkFormattingSource | undefined;
532
633
  declare function cloneParagraphNode(paragraph: ParagraphNode): ParagraphNode;
533
634
  declare function cloneTableNode(table: TableNode): TableNode;
534
635
  declare function cloneDocModel(model: DocModel): DocModel;
@@ -554,6 +655,87 @@ declare function buildDocModelFromBytes(bytes: ArrayBuffer | Uint8Array): Promis
554
655
  };
555
656
  }>;
556
657
 
658
+ interface LineElementMetrics {
659
+ ascent: number;
660
+ descent: number;
661
+ suppressibleBottomSpace?: number;
662
+ }
663
+ interface LineVerticalMetrics {
664
+ ascent: number;
665
+ descent: number;
666
+ height: number;
667
+ suppressibleBottomSpace: number;
668
+ }
669
+ /** Signed 32-bit multiply/divide, including saturation and half-away rounding. */
670
+ declare function multiplyDivideRound(a: number, b: number, denominator: number): number;
671
+ /** All measurements and limits must use the same unit. */
672
+ declare function aggregateLineMetrics(elements: readonly LineElementMetrics[]): LineVerticalMetrics;
673
+ declare function checkLineVerticalFit(metrics: LineVerticalMetrics, available: number, secondaryLimit: number): {
674
+ fits: boolean;
675
+ appliedSuppression: number;
676
+ rejectedSuppression: number;
677
+ };
678
+ declare function constrainParagraphLineSplit(linesRemaining: number, fittingLines: number, minimumBefore: number, minimumAfter: number): number;
679
+
680
+ /** All amounts must use the same layout unit. */
681
+ declare function collapseParagraphMargins(amounts: readonly number[]): number;
682
+ /** The preceding amount has already been included in the flow position. */
683
+ declare function paragraphMarginContribution(previousAmount: number, nextAmount: number): number;
684
+
685
+ type TableRowHeightRule = "auto" | "atLeast" | "exact";
686
+ interface TableRowHeightConstraint {
687
+ /** Intrinsic outer height already includes cell padding. */
688
+ intrinsicHeight: number;
689
+ declaredHeight?: number;
690
+ heightRule?: TableRowHeightRule;
691
+ maximumBottomPadding?: number;
692
+ }
693
+ interface ResolvedTableRowHeight {
694
+ height: number;
695
+ exact: boolean;
696
+ contentHeightLimit?: number;
697
+ }
698
+ declare function normalizeTableRowHeightTwips(height?: number): number | undefined;
699
+ /** Measurements must use the same unit; border geometry is resolved separately. */
700
+ declare function resolveTableRowHeight(constraint: TableRowHeightConstraint): ResolvedTableRowHeight;
701
+ declare function resolveTableCellContentClipHeight(rowHeightLimit: number, cellTopPadding?: number, cellBottomPadding?: number, outerRowHeight?: number): number;
702
+
703
+ type TableWidthDefinition = Pick<TableStyle, "preferredWidth" | "widthTwips" | "sourceWidth">;
704
+ declare function resolveEffectiveTablePreferredWidth(style: TableWidthDefinition | undefined): TablePreferredWidth | undefined;
705
+ /** The reference is page text width for tables and resolved table width for cells. */
706
+ declare function resolveTablePreferredWidthTwips(style: TableWidthDefinition | undefined, percentageReferenceWidthTwips?: number): number | undefined;
707
+ /** Convert table source widths to CSS pixels without a device-pixel rounding step. */
708
+ declare function tableWidthTwipsToPixels(widthTwips?: number): number | undefined;
709
+ /** Reduce fixed-layout grid widths proportionally when they exceed the table width. */
710
+ declare function reduceFixedTableColumnWidths(columnWidths: readonly number[], tableWidth: number): number[];
711
+ interface FixedTableCellWidth {
712
+ gridSpan?: number;
713
+ preferredWidth?: number;
714
+ }
715
+ interface FixedTableRowWidths {
716
+ gridBefore?: number;
717
+ gridAfter?: number;
718
+ beforeWidth?: number;
719
+ afterWidth?: number;
720
+ cells: readonly FixedTableCellWidth[];
721
+ }
722
+ /** Resolve ordered fixed-layout grid requests in a single measurement unit. */
723
+ declare function resolveFixedTableGridWidths(params: {
724
+ initialGridWidths?: readonly number[];
725
+ rows: readonly FixedTableRowWidths[];
726
+ preferredTableWidth?: number;
727
+ }): number[];
728
+ declare function resolveEffectiveTableAlignment(style: Pick<TableStyle, "alignment" | "sourceAlignment" | "sourceInheritedAlignment"> | undefined): TableAlignment | undefined;
729
+ declare function resolveEffectiveTableBidiVisual(style: Pick<TableStyle, "bidiVisual" | "sourceBidiVisual" | "sourceInheritedBidiVisual"> | undefined): boolean | undefined;
730
+ declare function resolveTableLeadingIndent(alignment: TableAlignment | undefined, indent?: number): number;
731
+ declare function resolveTableAlignmentOffset(params: {
732
+ alignment?: TableAlignment;
733
+ bidiVisual?: boolean;
734
+ availableWidth: number;
735
+ tableWidth: number;
736
+ indent?: number;
737
+ }): number;
738
+
557
739
  interface LayoutOptions {
558
740
  pageWidth?: number;
559
741
  pageHeight?: number;
@@ -663,6 +845,78 @@ interface ParsedDocxDocument {
663
845
  }
664
846
  declare function parseDocxForViewer(source: DocxViewerSource, options?: ParseDocxForViewerOptions): Promise<ParsedDocxDocument>;
665
847
 
848
+ type ViewerZoomMode = "automatic" | "fit-page" | "fit-width";
849
+ type ViewerZoomLevel = number | ViewerZoomMode;
850
+ type ViewerZoomState = {
851
+ level: ViewerZoomLevel;
852
+ resolvedZoom: number;
853
+ };
854
+
855
+ type TableRow = TableNode["rows"][number];
856
+ interface TableCellPhysicalGridRange {
857
+ cellIndex: number;
858
+ startColumnIndex: number;
859
+ endColumnIndex: number;
860
+ }
861
+ type TableGridColumnInsertionRowPlan = {
862
+ rowIndex: number;
863
+ } & ({
864
+ kind: "unchanged";
865
+ } | {
866
+ kind: "expand-before";
867
+ gridBefore: number;
868
+ } | {
869
+ kind: "expand-after";
870
+ gridAfter: number;
871
+ } | {
872
+ kind: "extend-cell";
873
+ cellIndex: number;
874
+ gridSpan: number;
875
+ } | {
876
+ kind: "insert-cell";
877
+ cellIndex: number;
878
+ referenceCellIndex?: number;
879
+ });
880
+ type TableGridColumnDeletionRowPlan = {
881
+ rowIndex: number;
882
+ } & ({
883
+ kind: "unchanged";
884
+ } | {
885
+ kind: "reduce-before";
886
+ gridBefore: number;
887
+ } | {
888
+ kind: "reduce-after";
889
+ gridAfter: number;
890
+ } | {
891
+ kind: "shrink-cell";
892
+ cellIndex: number;
893
+ gridSpan: number;
894
+ } | {
895
+ kind: "remove-cell";
896
+ cellIndex: number;
897
+ removesOnlyCell: boolean;
898
+ });
899
+ interface TableGridColumnInsertionPlan {
900
+ columnIndex: number;
901
+ columnCount: number;
902
+ rows: TableGridColumnInsertionRowPlan[];
903
+ }
904
+ interface TableGridColumnDeletionPlan {
905
+ columnIndex: number;
906
+ columnCount: number;
907
+ deletesLastPhysicalColumn: boolean;
908
+ deletesAllActualCells: boolean;
909
+ rows: TableGridColumnDeletionRowPlan[];
910
+ }
911
+ declare function tableCellPhysicalGridRange(row: TableRow, cellIndex: number, gridColumnBound: number): TableCellPhysicalGridRange | undefined;
912
+ declare function tablePhysicalGridColumnCount(table: TableNode): number;
913
+ declare function planTableGridColumnInsertion(table: TableNode, columnIndex: number): TableGridColumnInsertionPlan | undefined;
914
+ declare function planTableGridColumnDeletion(table: TableNode, columnIndex: number): TableGridColumnDeletionPlan | undefined;
915
+ declare function tableCellsIntersectingGridRange(table: TableNode, startRowIndex: number, endRowIndex: number, startColumnIndex: number, endColumnIndex: number): Array<{
916
+ rowIndex: number;
917
+ cellIndex: number;
918
+ }>;
919
+
666
920
  type AnnotationMutationFailureReason = "stale" | "unsupported" | "unsafe-xml";
667
921
  type AnnotationMutationResult = {
668
922
  ok: true;
@@ -1042,6 +1296,12 @@ interface DocxEditorController {
1042
1296
  setShowTrackedChanges: (showTrackedChanges: boolean) => void;
1043
1297
  setShowComments: (showComments: boolean) => void;
1044
1298
  syncPaginationInfo: (pagination: DocxPaginationInfo) => void;
1299
+ /** Selects a numeric or responsive viewer zoom level. */
1300
+ setZoom: (level: ViewerZoomLevel) => void;
1301
+ /** Returns the selected zoom level, including an active responsive mode. */
1302
+ getZoom: () => ViewerZoomLevel;
1303
+ /** Returns the currently resolved zoom percentage. */
1304
+ getResolvedZoom: () => number;
1045
1305
  toggleShowTrackedChanges: () => void;
1046
1306
  toggleShowComments: () => void;
1047
1307
  acceptTrackedChange: (change: DocxTrackedChange) => DocxAnnotationCommandResult;
@@ -1332,6 +1592,12 @@ interface DocxEditorViewerProps {
1332
1592
  * Inline styles applied to the outer viewer root.
1333
1593
  */
1334
1594
  style?: React.CSSProperties;
1595
+ /** Controlled numeric percentage or responsive zoom mode. */
1596
+ zoom?: ViewerZoomLevel;
1597
+ /** Initial zoom level when `zoom` is uncontrolled. */
1598
+ defaultZoom?: ViewerZoomLevel;
1599
+ /** Called when the selected level or its resolved percentage changes. */
1600
+ onZoomChange?: (state: ViewerZoomState) => void;
1335
1601
  /**
1336
1602
  * Background color of each rendered page surface.
1337
1603
  *
@@ -1767,7 +2033,9 @@ declare function useDocxTrackChanges(editor: Pick<DocxEditorController, "tracked
1767
2033
  declare function useDocxComments(editor: Pick<DocxEditorController, "comments" | "showComments" | "setShowComments" | "toggleShowComments" | "createComment" | "setCommentResolved">): UseDocxCommentsResult;
1768
2034
  declare function useDocxPageLayout(editor: Pick<DocxEditorController, "model">): UseDocxPageLayoutResult;
1769
2035
  declare function useDocxPagination(editor: Pick<DocxEditorController, "currentPage" | "totalPages">): UseDocxPaginationResult;
1770
- 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;
2036
+ declare function DocxEditorViewer({ editor, className, style, zoom, defaultZoom, onZoomChange, pageBackgroundColor, pageGapBackgroundColor, deferInitialPaginationPaint, loadingState, pageVirtualization, visiblePageRange, pageIndexes, onPageCountChange, onRequestPageReveal, headingStyles, showTrackedChanges, renderTrackedChangeCard, showComments, renderCommentCard, renderTableContextMenu, renderContextMenu, onFormFieldDoubleClick, mode, }: DocxEditorViewerProps): React.JSX.Element;
2037
+
2038
+ declare function invalidateFontMetrics(): void;
1771
2039
 
1772
2040
  interface ResolvedModelSection {
1773
2041
  startNodeIndex: number;
@@ -1984,6 +2252,10 @@ declare function modelToDocumentXml(model: DocModel, basePackage?: OoxmlPackage)
1984
2252
  declare function serializeDocModel(model: DocModel, basePackage?: OoxmlPackage): Promise<OoxmlPackage>;
1985
2253
  declare function serializeDocx(model: DocModel, basePackage?: OoxmlPackage): Promise<ArrayBuffer>;
1986
2254
 
2255
+ /**
2256
+ * @deprecated Since v0.10.0, use DocxEditorViewerProps with mode="read-only"
2257
+ * and a controller from useDocxEditor.
2258
+ */
1987
2259
  interface ReactDocxViewerProps {
1988
2260
  /**
1989
2261
  * Raw `.docx` file contents to parse and render.
@@ -2021,6 +2293,12 @@ interface ReactDocxViewerProps {
2021
2293
  * ```
2022
2294
  */
2023
2295
  className?: string;
2296
+ /** Controlled numeric percentage or responsive zoom mode. */
2297
+ zoom?: ViewerZoomLevel;
2298
+ /** Initial zoom level when `zoom` is uncontrolled. */
2299
+ defaultZoom?: ViewerZoomLevel;
2300
+ /** Called when the selected level or its resolved percentage changes. */
2301
+ onZoomChange?: (state: ViewerZoomState) => void;
2024
2302
  /**
2025
2303
  * Layout overrides for the simple read-only renderer.
2026
2304
  *
@@ -2052,7 +2330,11 @@ interface UseDocxModelState {
2052
2330
  error?: Error;
2053
2331
  }
2054
2332
  declare function useDocxModel(file?: ArrayBuffer): UseDocxModelState;
2055
- declare function ReactDocxViewer({ file, model, document, loadEmbeddedFonts, pageIndexes, className, layoutOptions, emptyState, }: ReactDocxViewerProps): React.JSX.Element;
2333
+ /**
2334
+ * @deprecated Since v0.10.0, use DocxEditorViewer with mode="read-only"
2335
+ * and a controller from useDocxEditor.
2336
+ */
2337
+ declare function ReactDocxViewer({ file, model, document, loadEmbeddedFonts, pageIndexes, className, zoom, defaultZoom, onZoomChange, layoutOptions, emptyState, }: ReactDocxViewerProps): React.JSX.Element;
2056
2338
  type DocxThumbnailOutput = "canvas" | "blob" | "imageBitmap";
2057
2339
  interface CreateDocxThumbnailRendererOptions {
2058
2340
  scheduling?: DocxThumbnailScheduling;
@@ -2100,4 +2382,4 @@ interface DocxThumbnailRenderer {
2100
2382
  }
2101
2383
  declare function createDocxThumbnailRenderer(documentModel: DocxThumbnailDocument, options?: CreateDocxThumbnailRendererOptions): DocxThumbnailRenderer;
2102
2384
 
2103
- 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 };
2385
+ 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 FixedTableCellWidth, type FixedTableRowWidths, 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 LineElementMetrics, type LineVerticalMetrics, 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 ParagraphMarkFormattingSource, type ParagraphNode, type ParagraphNumbering, type ParagraphRevisionKind, type ParagraphRevisionTarget, type ParagraphSpacing, type ParagraphSplitControlOptions, type ParagraphStyle, type ParagraphStyleDefinition, type ParagraphTabStop, type ParagraphTextAlignment, type ParseDocxForViewerOptions, type ParsedDocxDocument, type ParsedDocxPerformanceTimings, ReactDocxViewer, type ReactDocxViewerProps, type RenderDocxThumbnailPageOptions, type ResolvedDocument, type ResolvedDocumentSection, type ResolvedLayoutMetrics, type ResolvedModelSection, type ResolvedTableRowHeight, type TableAlignment, type TableBorderSet, type TableBorderStyle, type TableBoxSpacing, type TableCellContentNode, type TableCellNode, type TableCellPhysicalGridRange, type TableCellStyle, type TableExplicitPageBreakInfo, type TableGridColumnDeletionPlan, type TableGridColumnDeletionRowPlan, type TableGridColumnInsertionPlan, type TableGridColumnInsertionRowPlan, type TableNode, type TablePreferredWidth, type TableRowGeometrySource, type TableRowHeightConstraint, type TableRowHeightRule, type TableRowNode, type TableRowRange, type TableRowStyle, type TableStyle, type TableWidthDefinition, type TableWidthSource, 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 ViewerZoomLevel, type ViewerZoomMode, type ViewerZoomState, type WasmOoxmlPackage, type WasmSource, acceptParagraphRevision, aggregateLineMetrics, allocateBlockId, applyRunStyle, buildDocModel, buildDocModelFromBytes, buildDocumentPageNodeSegments, buildDocumentPageRanges, buildLayoutSnapshot, checkLineVerticalFit, cloneDocModel, cloneParagraphMarkFormatting, cloneParagraphNode, cloneTableNode, collapseParagraphMargins, collectDocxEstimatedOverflowBreakStartNodeIndexes, collectDocxHardPageBreakStartNodeIndexes, collectDocxLastRenderedPageBreakStartNodeIndexes, collectDuplicateDocModelBlockIds, collectTableExplicitPageBreakInfo, collectTopLevelExplicitPageBreakStartNodeIndexes, constrainParagraphLineSplit, copyParagraphs, createDocxThumbnailRenderer, createMinimalDocxPackage, createParagraphComment, deepFreezeDocModel, defaultStarterModel, duplicateParagraph, ensureDocModelBlockIds, getPart, initWasm, insertParagraph, layoutDocument, modelToDocumentXml, multiplyDivideRound, normalizeDocModel, normalizeTableRowHeightTwips, packageToArrayBuffer, paragraphAfterSpacingPx, paragraphBeforeSpacingPx, paragraphHasExplicitPageBreak, paragraphHasLastRenderedPageBreak, paragraphHasPageBreakBefore, paragraphLetterheadColumnGroupAtSegmentOffset, paragraphLetterheadFloatSideAtNodeIndex, paragraphMarginContribution, paragraphStartsWithLastRenderedPageBreak, parseDocx, parseDocxForViewer, parseParagraphsFromClipboard, parseSectionLayout, pasteParagraphs, planTableGridColumnDeletion, planTableGridColumnInsertion, reduceFixedTableColumnWidths, invalidateFontMetrics as refreshDocxFontMetrics, rejectParagraphRevision, removeParagraph, replaceText, resolveDocumentForLayout, resolveDocumentLayout, resolveDocumentPageSegmentStartNodeIndex, resolveDocumentSectionsFromMetadata, resolveDocxPageThumbnailResolution, resolveEffectiveTableAlignment, resolveEffectiveTableBidiVisual, resolveEffectiveTablePreferredWidth, resolveFixedTableGridWidths, resolvePaginationSectionMetricsIndexForNodeIndex, resolveParagraphBeforeSpacingPx, resolveSectionIndexForNodeIndex, resolveSectionPropertiesXmlForNodeIndex, resolveTableAlignmentOffset, resolveTableCellContentClipHeight, resolveTableGridSkipCount, resolveTableLeadingIndent, resolveTablePreferredWidthTwips, resolveTableRowHeight, scalePaginationSectionMetricsHeights, scorePaginationAgainstStoredPageBreaks, sectionBreakAfterParagraphStartsNewPage, sectionBreakPropertiesStartNewPage, sectionTitlePageEnabled, selectSectionVariantForPage, serializeDocModel, serializeDocx, serializeParagraphsForClipboard, setCommentResolved, setParagraphAlignment, setParagraphHeading, setRunColor, setRunHighlight, setWasmSource, splitParagraphChildrenAtTextOffsets, tableCellPhysicalGridRange, tableCellsIntersectingGridRange, tableGridColumnBound, tablePhysicalGridColumnCount, tableRowGridSkipCount, tableWidthTwipsToPixels, toggleRunStyleFlag, updateParagraphText, updateTableCellParagraphText, updateTableCellParagraphTextRecursive, updateTableCellText, useDocxBorders, useDocxComments, useDocxDocumentTheme, useDocxEditor, useDocxFormFields, useDocxImageWrapMenu, useDocxLineSpacing, useDocxModel, useDocxPageLayout, useDocxPageThumbnails, useDocxPagination, useDocxParagraphStyles, useDocxTrackChanges, useDocxViewerThumbnails, withPart };