@coco-vexel/coco-office-editor 1.0.14 → 1.0.15

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/word.d.cts CHANGED
@@ -1,11 +1,11 @@
1
1
  export { E as EditorReadOnlyError } from './read-only-1_LQCO1d.cjs';
2
- import { f as EditorDocumentView, q as EditorParagraphFormat, w as EditorRunFormat, F as EditorTableCellView, k as EditorHyperlink } from './model-ttSpXtd3.cjs';
3
- export { E as EditorBlockView, a as EditorBoxEdges, b as EditorCommentSpan, c as EditorContentRevisionKind, d as EditorContentSegment, e as EditorDocumentDefaults, g as EditorDrawingSegment, h as EditorFieldSegment, i as EditorHeaderFooterRef, j as EditorHeaderFooterStoryView, l as EditorImageSegment, m as EditorNumberingFormat, n as EditorPageLayout, o as EditorParagraphBorder, p as EditorParagraphBorders, r as EditorParagraphSpan, s as EditorParagraphView, t as EditorPlaceholderSegment, u as EditorRevisionSegment, v as EditorRevisionSpan, x as EditorSectionView, y as EditorSegmentKind, z as EditorShading, A as EditorSpanKind, B as EditorTabStop, C as EditorTableBorder, D as EditorTableBorders, G as EditorTableLayout, H as EditorTableLook, I as EditorTableRowView, J as EditorTableView, K as EditorTextSegment, L as EditorTextSpan } from './model-ttSpXtd3.cjs';
2
+ import { f as EditorDocumentView, q as EditorParagraphFormat, w as EditorRunFormat, F as EditorTableCellView, k as EditorHyperlink } from './model-Cl0nc5HH.cjs';
3
+ export { E as EditorBlockView, a as EditorBoxEdges, b as EditorCommentSpan, c as EditorContentRevisionKind, d as EditorContentSegment, e as EditorDocumentDefaults, g as EditorDrawingSegment, h as EditorFieldSegment, i as EditorHeaderFooterRef, j as EditorHeaderFooterStoryView, l as EditorImageSegment, m as EditorNumberingFormat, n as EditorPageLayout, o as EditorParagraphBorder, p as EditorParagraphBorders, r as EditorParagraphSpan, s as EditorParagraphView, t as EditorPlaceholderSegment, u as EditorRevisionSegment, v as EditorRevisionSpan, x as EditorSectionView, y as EditorSegmentKind, z as EditorShading, A as EditorSpanKind, B as EditorTabStop, C as EditorTableBorder, D as EditorTableBorders, G as EditorTableLayout, H as EditorTableLook, I as EditorTableRowView, J as EditorTableView, K as EditorTextSegment, L as EditorTextSpan } from './model-Cl0nc5HH.cjs';
4
4
  import { Package } from '@coco-vexel/coco-office/pack';
5
5
  import { PackageIndices } from '@coco-vexel/coco-office/word-view';
6
6
  export { RevisionInfo } from '@coco-vexel/coco-office/word-view';
7
- import { B as NativeWordDocument, L as NativeWordParagraphNode, J as NativeWordListType, x as NativeWordBlockNode } from './native-B7rEV_h6.cjs';
8
- export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, K as NativeWordPageBreakNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, X as WordEditorChangeEvent, Y as WordEditorCommand, Z as WordEditorCommandState, _ as WordEditorEngineKind, $ as WordEditorFormatValue, a0 as WordEditorHyperlink, a1 as WordEditorImageInsertOptions, a2 as WordEditorImageState, a3 as WordEditorLineSpacingState, a4 as WordEditorRuntime, a5 as WordEditorRuntimeEvent, a6 as WordEditorRuntimeEventMap, a7 as WordEditorRuntimeOptions, a8 as WordEditorSearchMatch, a9 as WordEditorSearchOptions, aa as WordEditorSearchState, ab as WordEditorSelection, ac as WordEditorSelectionChangeEvent, ad as WordEditorSelectionPoint, ae as WordEditorTableCellPoint, af as WordEditorTableState, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeLineStrokeStyle, b4 as nativeListIndent, b5 as nativeListType, b6 as nativeMergeTableCells, b7 as nativeNumberingAtLevel, b8 as nativePageBreakAt, b9 as nativeParagraphText, ba as nativeRangeContainsPageBreak, bb as nativeReplaceBlockRangeAcrossParagraphs, bc as nativeReplaceRange, bd as nativeReplaceRangeWithBlocks, be as nativeReplaceTableCellRangeContent, bf as nativeReplaceTableCellRangeText, bg as nativeReplaceTextRangeAcrossParagraphs, bh as nativeReplaceTextRangeWithParagraphs, bi as nativeResolveFormatRevision, bj as nativeResolveImageFormatRevision, bk as nativeResolveImageRevision, bl as nativeResolveRevision, bm as nativeSelection, bn as nativeSelectionFromCursor, bo as nativeSetHyperlink, bp as nativeSetImageSize, bq as nativeSetParagraphFormat, br as nativeSetParagraphList, bs as nativeSetRunFormat, bt as nativeSetTableCellFormat, bu as nativeSetTableCellRangeFormat, bv as nativeSplitParagraph, bw as nativeSplitTableCell, bx as nativeSyncParagraphText, by as nativeTableCellsInRange, bz as nativeTableSupportsStructuralEditing, bA as nativeTextRangeIsBold, bB as nativeUpdateComment, bC as paginateNativeDocument, bD as parentNativeParagraph, bE as planWordOoxmlPatch, bF as planWordOoxmlPatches, bG as previousNativeParagraphId, bH as rebuildNativeTableFragmentsFromParagraph, bI as reflowNativeDocumentFromParagraph, bJ as refreshNativeNumberingLabels, bK as refreshNativePageCommentBubbles, bL as renderNativeBlock, bM as renderNativeDocument, bN as renderNativeImage, bO as renderNativeParagraph, bP as renderNativeTable, bQ as renderNativeWordEditor, bR as resolveNativeSectionPageNumberStarts, bS as resolveNativeTableCellBorders, bT as resolveWordOoxmlPatchTargets, bU as restoreNativeCursor, bV as restoreNativeElementSelection, bW as restoreNativeTextSelection, bX as searchNativeWordDocument, bY as selectNativeImage, bZ as splitNativeTableRowAtBlockBoundary, b_ as splitNativeTableRowAtTextOffset, b$ as summarizeNativeTablePagination } from './native-B7rEV_h6.cjs';
7
+ import { B as NativeWordDocument, L as NativeWordParagraphNode, J as NativeWordListType, x as NativeWordBlockNode } from './native-DD66OEQ6.cjs';
8
+ export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, K as NativeWordPageBreakNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, X as WordEditorChangeEvent, Y as WordEditorCommand, Z as WordEditorCommandState, _ as WordEditorEngineKind, $ as WordEditorFormatValue, a0 as WordEditorHyperlink, a1 as WordEditorImageInsertOptions, a2 as WordEditorImageState, a3 as WordEditorLineSpacingState, a4 as WordEditorRuntime, a5 as WordEditorRuntimeEvent, a6 as WordEditorRuntimeEventMap, a7 as WordEditorRuntimeOptions, a8 as WordEditorSearchMatch, a9 as WordEditorSearchOptions, aa as WordEditorSearchState, ab as WordEditorSelection, ac as WordEditorSelectionChangeEvent, ad as WordEditorSelectionPoint, ae as WordEditorTableCellPoint, af as WordEditorTableState, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeLineStrokeStyle, b4 as nativeListIndent, b5 as nativeListType, b6 as nativeMergeTableCells, b7 as nativeNumberingAtLevel, b8 as nativePageBreakAt, b9 as nativeParagraphText, ba as nativeRangeContainsPageBreak, bb as nativeReplaceBlockRangeAcrossParagraphs, bc as nativeReplaceRange, bd as nativeReplaceRangeWithBlocks, be as nativeReplaceTableCellRangeContent, bf as nativeReplaceTableCellRangeText, bg as nativeReplaceTextRangeAcrossParagraphs, bh as nativeReplaceTextRangeWithParagraphs, bi as nativeResolveFormatRevision, bj as nativeResolveImageFormatRevision, bk as nativeResolveImageRevision, bl as nativeResolveRevision, bm as nativeSelection, bn as nativeSelectionFromCursor, bo as nativeSetHyperlink, bp as nativeSetImageSize, bq as nativeSetParagraphFormat, br as nativeSetParagraphList, bs as nativeSetRunFormat, bt as nativeSetTableCellFormat, bu as nativeSetTableCellRangeFormat, bv as nativeSplitParagraph, bw as nativeSplitTableCell, bx as nativeSyncParagraphText, by as nativeTableCellsInRange, bz as nativeTableSupportsStructuralEditing, bA as nativeTextRangeIsBold, bB as nativeUpdateComment, bC as paginateNativeDocument, bD as parentNativeParagraph, bE as planWordOoxmlPatch, bF as planWordOoxmlPatches, bG as previousNativeParagraphId, bH as rebuildNativeTableFragmentsFromParagraph, bI as reflowNativeDocumentFromParagraph, bJ as refreshNativeNumberingLabels, bK as refreshNativePageCommentBubbles, bL as renderNativeBlock, bM as renderNativeDocument, bN as renderNativeImage, bO as renderNativeParagraph, bP as renderNativeTable, bQ as renderNativeWordEditor, bR as resolveNativeSectionPageNumberStarts, bS as resolveNativeTableCellBorders, bT as resolveWordOoxmlPatchTargets, bU as restoreNativeCursor, bV as restoreNativeElementSelection, bW as restoreNativeTextSelection, bX as searchNativeWordDocument, bY as selectNativeImage, bZ as splitNativeTableRowAtBlockBoundary, b_ as splitNativeTableRowAtTextOffset, b$ as summarizeNativeTablePagination } from './native-DD66OEQ6.cjs';
9
9
  export { WordAnnotationEditChangeDraft, WordAnnotationEditOperation, WordBlockEditChangeDraft, WordBlockEditOperation, WordBlockSnapshot, WordChangeSet, WordChangeStatus, WordChangeTarget, WordContent, WordContentEditChangeDraft, WordContentEditOperation, WordEditChange, WordEditChangeBase, WordEditChangeDraft, WordEditMark, WordEditingPluginOptions, WordEditorRange, WordImageContent, WordMarkEditChangeDraft, WordParagraphAlignment, WordParagraphBlockSnapshot, WordParagraphEditChangeDraft, WordParagraphRange, WordRevisionEditChangeDraft, WordRevisionEditOperation, WordSelectedParagraph, WordSelectionInfo, WordTableBlockSnapshot, WordTableEditChangeDraft, WordTableEditOperation, WordTextContent, WordTextEditChangeDraft, WordTextEditOperation, createWordEditingPlugin, getWordChangeSet, getWordSelectionInfo, setColor, setFontSize, setParagraphAlign, toggleBold, wordEditingPluginKey } from './word-editing.cjs';
10
10
  import 'prosemirror-state';
11
11
  import 'prosemirror-view';
package/dist/word.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  export { E as EditorReadOnlyError } from './read-only-1_LQCO1d.js';
2
- import { f as EditorDocumentView, q as EditorParagraphFormat, w as EditorRunFormat, F as EditorTableCellView, k as EditorHyperlink } from './model-ttSpXtd3.js';
3
- export { E as EditorBlockView, a as EditorBoxEdges, b as EditorCommentSpan, c as EditorContentRevisionKind, d as EditorContentSegment, e as EditorDocumentDefaults, g as EditorDrawingSegment, h as EditorFieldSegment, i as EditorHeaderFooterRef, j as EditorHeaderFooterStoryView, l as EditorImageSegment, m as EditorNumberingFormat, n as EditorPageLayout, o as EditorParagraphBorder, p as EditorParagraphBorders, r as EditorParagraphSpan, s as EditorParagraphView, t as EditorPlaceholderSegment, u as EditorRevisionSegment, v as EditorRevisionSpan, x as EditorSectionView, y as EditorSegmentKind, z as EditorShading, A as EditorSpanKind, B as EditorTabStop, C as EditorTableBorder, D as EditorTableBorders, G as EditorTableLayout, H as EditorTableLook, I as EditorTableRowView, J as EditorTableView, K as EditorTextSegment, L as EditorTextSpan } from './model-ttSpXtd3.js';
2
+ import { f as EditorDocumentView, q as EditorParagraphFormat, w as EditorRunFormat, F as EditorTableCellView, k as EditorHyperlink } from './model-Cl0nc5HH.js';
3
+ export { E as EditorBlockView, a as EditorBoxEdges, b as EditorCommentSpan, c as EditorContentRevisionKind, d as EditorContentSegment, e as EditorDocumentDefaults, g as EditorDrawingSegment, h as EditorFieldSegment, i as EditorHeaderFooterRef, j as EditorHeaderFooterStoryView, l as EditorImageSegment, m as EditorNumberingFormat, n as EditorPageLayout, o as EditorParagraphBorder, p as EditorParagraphBorders, r as EditorParagraphSpan, s as EditorParagraphView, t as EditorPlaceholderSegment, u as EditorRevisionSegment, v as EditorRevisionSpan, x as EditorSectionView, y as EditorSegmentKind, z as EditorShading, A as EditorSpanKind, B as EditorTabStop, C as EditorTableBorder, D as EditorTableBorders, G as EditorTableLayout, H as EditorTableLook, I as EditorTableRowView, J as EditorTableView, K as EditorTextSegment, L as EditorTextSpan } from './model-Cl0nc5HH.js';
4
4
  import { Package } from '@coco-vexel/coco-office/pack';
5
5
  import { PackageIndices } from '@coco-vexel/coco-office/word-view';
6
6
  export { RevisionInfo } from '@coco-vexel/coco-office/word-view';
7
- import { B as NativeWordDocument, L as NativeWordParagraphNode, J as NativeWordListType, x as NativeWordBlockNode } from './native-DQL69NnL.js';
8
- export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, K as NativeWordPageBreakNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, X as WordEditorChangeEvent, Y as WordEditorCommand, Z as WordEditorCommandState, _ as WordEditorEngineKind, $ as WordEditorFormatValue, a0 as WordEditorHyperlink, a1 as WordEditorImageInsertOptions, a2 as WordEditorImageState, a3 as WordEditorLineSpacingState, a4 as WordEditorRuntime, a5 as WordEditorRuntimeEvent, a6 as WordEditorRuntimeEventMap, a7 as WordEditorRuntimeOptions, a8 as WordEditorSearchMatch, a9 as WordEditorSearchOptions, aa as WordEditorSearchState, ab as WordEditorSelection, ac as WordEditorSelectionChangeEvent, ad as WordEditorSelectionPoint, ae as WordEditorTableCellPoint, af as WordEditorTableState, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeLineStrokeStyle, b4 as nativeListIndent, b5 as nativeListType, b6 as nativeMergeTableCells, b7 as nativeNumberingAtLevel, b8 as nativePageBreakAt, b9 as nativeParagraphText, ba as nativeRangeContainsPageBreak, bb as nativeReplaceBlockRangeAcrossParagraphs, bc as nativeReplaceRange, bd as nativeReplaceRangeWithBlocks, be as nativeReplaceTableCellRangeContent, bf as nativeReplaceTableCellRangeText, bg as nativeReplaceTextRangeAcrossParagraphs, bh as nativeReplaceTextRangeWithParagraphs, bi as nativeResolveFormatRevision, bj as nativeResolveImageFormatRevision, bk as nativeResolveImageRevision, bl as nativeResolveRevision, bm as nativeSelection, bn as nativeSelectionFromCursor, bo as nativeSetHyperlink, bp as nativeSetImageSize, bq as nativeSetParagraphFormat, br as nativeSetParagraphList, bs as nativeSetRunFormat, bt as nativeSetTableCellFormat, bu as nativeSetTableCellRangeFormat, bv as nativeSplitParagraph, bw as nativeSplitTableCell, bx as nativeSyncParagraphText, by as nativeTableCellsInRange, bz as nativeTableSupportsStructuralEditing, bA as nativeTextRangeIsBold, bB as nativeUpdateComment, bC as paginateNativeDocument, bD as parentNativeParagraph, bE as planWordOoxmlPatch, bF as planWordOoxmlPatches, bG as previousNativeParagraphId, bH as rebuildNativeTableFragmentsFromParagraph, bI as reflowNativeDocumentFromParagraph, bJ as refreshNativeNumberingLabels, bK as refreshNativePageCommentBubbles, bL as renderNativeBlock, bM as renderNativeDocument, bN as renderNativeImage, bO as renderNativeParagraph, bP as renderNativeTable, bQ as renderNativeWordEditor, bR as resolveNativeSectionPageNumberStarts, bS as resolveNativeTableCellBorders, bT as resolveWordOoxmlPatchTargets, bU as restoreNativeCursor, bV as restoreNativeElementSelection, bW as restoreNativeTextSelection, bX as searchNativeWordDocument, bY as selectNativeImage, bZ as splitNativeTableRowAtBlockBoundary, b_ as splitNativeTableRowAtTextOffset, b$ as summarizeNativeTablePagination } from './native-DQL69NnL.js';
7
+ import { B as NativeWordDocument, L as NativeWordParagraphNode, J as NativeWordListType, x as NativeWordBlockNode } from './native-aRa_2i4F.js';
8
+ export { N as NativeAnchorLayoutMetadata, a as NativeBlockRangeReplacement, b as NativeCursorPoint, c as NativeDocumentReflowMeasurement, d as NativeParagraphLocation, e as NativePlainTextReplacement, f as NativeSelectedImage, g as NativeTableCellFormatPatch, h as NativeTableCellLocation, i as NativeTableCellPoint, j as NativeTableCellPosition, k as NativeTableCellRange, l as NativeTableClipboardCell, m as NativeTableEditResult, n as NativeTableLocation, o as NativeTablePaginationSummary, p as NativeTableRangeEditResult, q as NativeTableRowBlockSplitPlan, r as NativeTableRowBlockSplitResult, s as NativeTableRowPaginationAnalysis, t as NativeTableRowPaginationKind, u as NativeTableRowPaginationRisk, v as NativeTableRowTextSplitPlan, w as NativeTableStructureOperation, y as NativeWordChange, z as NativeWordChangeApplyResult, A as NativeWordCommentMark, C as NativeWordDrawingNode, D as NativeWordEditor, E as NativeWordFieldNode, F as NativeWordFormatRevisionMark, G as NativeWordHeaderFooterStory, H as NativeWordImageNode, I as NativeWordInlineNode, K as NativeWordPageBreakNode, M as NativeWordRevisionMark, O as NativeWordTableCellNode, P as NativeWordTableNode, Q as NativeWordTableRowNode, R as NativeWordTextMark, S as NativeWordTextNode, T as ResolvedWordOoxmlPatchTarget, U as SkippedWordOoxmlPatch, V as UnresolvedWordOoxmlPatchTarget, W as UnsupportedNativeWordChange, X as WordEditorChangeEvent, Y as WordEditorCommand, Z as WordEditorCommandState, _ as WordEditorEngineKind, $ as WordEditorFormatValue, a0 as WordEditorHyperlink, a1 as WordEditorImageInsertOptions, a2 as WordEditorImageState, a3 as WordEditorLineSpacingState, a4 as WordEditorRuntime, a5 as WordEditorRuntimeEvent, a6 as WordEditorRuntimeEventMap, a7 as WordEditorRuntimeOptions, a8 as WordEditorSearchMatch, a9 as WordEditorSearchOptions, aa as WordEditorSearchState, ab as WordEditorSelection, ac as WordEditorSelectionChangeEvent, ad as WordEditorSelectionPoint, ae as WordEditorTableCellPoint, af as WordEditorTableState, ag as WordOoxmlPatch, ah as WordOoxmlPatchApplyResult, ai as WordOoxmlPatchKind, aj as WordOoxmlPatchPlan, ak as WordOoxmlPatchTargetResolution, al as adjacentNativeListNumbering, am as allNativeParagraphs, an as analyzeNativeTableRowPagination, ao as applyNativeWordChangesToPackage, ap as applyWordOoxmlPatches, aq as bodyParagraphs, ar as canDispatchNativeWordCommand, as as clearNativeImageSelection, at as cloneNativeWordBlocks, au as createNativeListNumbering, av as createNativeParaId, aw as createNativeSelectionRange, ax as createNativeTextRange, ay as createNativeWordDocument, az as currentNativeCursor, aA as currentNativeSelection, aB as defineNativeWordElements, aC as findNativeParagraph, aD as findNativeParagraphLocation, aE as findNativeTableCellLocation, aF as findNativeTableLocation, aG as getNativeWordCommandState, aH as imageOffset, aI as layoutNativePageAnnotationBubbles, aJ as measureNativeDocumentReflowFromParagraph, aK as nativeAddComment, aL as nativeAddFormatRevision, aM as nativeAddRevision, aN as nativeAnchorLayoutMetadata, aO as nativeClearRunFormat, aP as nativeClearTableCellRange, aQ as nativeCopyBlockRange, aR as nativeCursorFromPoint, aS as nativeDeleteBackward, aT as nativeDeleteComment, aU as nativeDeleteForward, aV as nativeDeleteImage, aW as nativeDeleteRange, aX as nativeDeleteTable, aY as nativeDeleteTextRangeAcrossParagraphs, aZ as nativeDrawingWidthCss, a_ as nativeEditTableStructure, a$ as nativeInsertImage, b0 as nativeInsertPageBreak, b1 as nativeInsertTable, b2 as nativeInsertText, b3 as nativeLineStrokeStyle, b4 as nativeListIndent, b5 as nativeListType, b6 as nativeMergeTableCells, b7 as nativeNumberingAtLevel, b8 as nativePageBreakAt, b9 as nativeParagraphText, ba as nativeRangeContainsPageBreak, bb as nativeReplaceBlockRangeAcrossParagraphs, bc as nativeReplaceRange, bd as nativeReplaceRangeWithBlocks, be as nativeReplaceTableCellRangeContent, bf as nativeReplaceTableCellRangeText, bg as nativeReplaceTextRangeAcrossParagraphs, bh as nativeReplaceTextRangeWithParagraphs, bi as nativeResolveFormatRevision, bj as nativeResolveImageFormatRevision, bk as nativeResolveImageRevision, bl as nativeResolveRevision, bm as nativeSelection, bn as nativeSelectionFromCursor, bo as nativeSetHyperlink, bp as nativeSetImageSize, bq as nativeSetParagraphFormat, br as nativeSetParagraphList, bs as nativeSetRunFormat, bt as nativeSetTableCellFormat, bu as nativeSetTableCellRangeFormat, bv as nativeSplitParagraph, bw as nativeSplitTableCell, bx as nativeSyncParagraphText, by as nativeTableCellsInRange, bz as nativeTableSupportsStructuralEditing, bA as nativeTextRangeIsBold, bB as nativeUpdateComment, bC as paginateNativeDocument, bD as parentNativeParagraph, bE as planWordOoxmlPatch, bF as planWordOoxmlPatches, bG as previousNativeParagraphId, bH as rebuildNativeTableFragmentsFromParagraph, bI as reflowNativeDocumentFromParagraph, bJ as refreshNativeNumberingLabels, bK as refreshNativePageCommentBubbles, bL as renderNativeBlock, bM as renderNativeDocument, bN as renderNativeImage, bO as renderNativeParagraph, bP as renderNativeTable, bQ as renderNativeWordEditor, bR as resolveNativeSectionPageNumberStarts, bS as resolveNativeTableCellBorders, bT as resolveWordOoxmlPatchTargets, bU as restoreNativeCursor, bV as restoreNativeElementSelection, bW as restoreNativeTextSelection, bX as searchNativeWordDocument, bY as selectNativeImage, bZ as splitNativeTableRowAtBlockBoundary, b_ as splitNativeTableRowAtTextOffset, b$ as summarizeNativeTablePagination } from './native-aRa_2i4F.js';
9
9
  export { WordAnnotationEditChangeDraft, WordAnnotationEditOperation, WordBlockEditChangeDraft, WordBlockEditOperation, WordBlockSnapshot, WordChangeSet, WordChangeStatus, WordChangeTarget, WordContent, WordContentEditChangeDraft, WordContentEditOperation, WordEditChange, WordEditChangeBase, WordEditChangeDraft, WordEditMark, WordEditingPluginOptions, WordEditorRange, WordImageContent, WordMarkEditChangeDraft, WordParagraphAlignment, WordParagraphBlockSnapshot, WordParagraphEditChangeDraft, WordParagraphRange, WordRevisionEditChangeDraft, WordRevisionEditOperation, WordSelectedParagraph, WordSelectionInfo, WordTableBlockSnapshot, WordTableEditChangeDraft, WordTableEditOperation, WordTextContent, WordTextEditChangeDraft, WordTextEditOperation, createWordEditingPlugin, getWordChangeSet, getWordSelectionInfo, setColor, setFontSize, setParagraphAlign, toggleBold, wordEditingPluginKey } from './word-editing.js';
10
10
  import 'prosemirror-state';
11
11
  import 'prosemirror-view';
package/dist/word.js CHANGED
@@ -812,6 +812,10 @@ function parseTableLayout(tableEl, inheritedMode) {
812
812
  const jc = firstDirectChild(tblPr, W_NS, "jc");
813
813
  const alignment = jc ? parseTableAlignment(jc.getAttributeNS(W_NS, "val")) : void 0;
814
814
  if (alignment !== void 0) layout.alignment = alignment;
815
+ const position = firstDirectChild(tblPr, W_NS, "tblpPr");
816
+ if ((position == null ? void 0 : position.getAttributeNS(W_NS, "vertAnchor")) === "margin" && position.getAttributeNS(W_NS, "tblpYSpec") === "bottom") {
817
+ layout.anchorToBottomMargin = true;
818
+ }
815
819
  return Object.keys(layout).length > 0 ? layout : void 0;
816
820
  }
817
821
  __name(parseTableLayout, "parseTableLayout");
@@ -6044,7 +6048,8 @@ function paginateNativeDocument(root, doc) {
6044
6048
  const hasForcedPageBreak = block.querySelector(".coco-word-page-break") !== null;
6045
6049
  if (body.scrollHeight > bodyLimit()) {
6046
6050
  const keepWithPrevious = previousKeepNextBlock(body, block);
6047
- if (!splitNativeTableAcrossPages(block, body, bodyLimit, nextPage)) {
6051
+ const moveWholeTable = isBottomAnchoredTable(block) && block.getBoundingClientRect().height <= bodyLimit();
6052
+ if (moveWholeTable || !splitNativeTableAcrossPages(block, body, bodyLimit, nextPage)) {
6048
6053
  body.removeChild(block);
6049
6054
  if (keepWithPrevious) body.removeChild(keepWithPrevious);
6050
6055
  const tail = keepWithPrevious ? null : splitNativeParagraphToFitCurrentPage(block, body, bodyLimit);
@@ -6053,7 +6058,7 @@ function paginateNativeDocument(root, doc) {
6053
6058
  if (keepWithPrevious) body.appendChild(keepWithPrevious);
6054
6059
  body.appendChild(tail != null ? tail : block);
6055
6060
  }
6056
- } else if (block.matches("coco-word-native-table")) {
6061
+ } else if (block.matches("coco-word-native-table") && !isBottomAnchoredTable(block)) {
6057
6062
  const sectionBreak = nextBlock && sectionBreakTypeAfterBlock(nextBlock, doc);
6058
6063
  const endsSection = nextBlock && sectionBreak && sectionBreak !== "continuous" && sectionBreak !== "nextColumn" && !nativeParagraphHasFlowContent(nextBlock);
6059
6064
  const endsPage = endsSection || nextBlock && shouldStartBlockOnNewPage(nextBlock);
@@ -6204,7 +6209,7 @@ __name(nativePagePairCanBackfill, "nativePagePairCanBackfill");
6204
6209
  function incrementalBlockGroupHeight(blocks) {
6205
6210
  return blocks.reduce((height, block) => {
6206
6211
  const style = window.getComputedStyle(block);
6207
- const marginTop = Number.parseFloat(style.marginTop) || 0;
6212
+ const marginTop = isBottomAnchoredTable(block) ? 0 : Number.parseFloat(style.marginTop) || 0;
6208
6213
  const marginBottom = Number.parseFloat(style.marginBottom) || 0;
6209
6214
  return height + block.getBoundingClientRect().height + marginTop + marginBottom;
6210
6215
  }, 0);
@@ -6271,8 +6276,10 @@ function leadingIncrementalBlockGroup(body) {
6271
6276
  __name(leadingIncrementalBlockGroup, "leadingIncrementalBlockGroup");
6272
6277
  function moveTrailingIncrementalTableRows(root, doc, page, existingNextPage, templates) {
6273
6278
  const body = nativePageBody(page);
6274
- const sourceBlock = body == null ? void 0 : body.lastElementChild;
6279
+ if (!body) return false;
6280
+ const sourceBlock = body.lastElementChild;
6275
6281
  if (!(sourceBlock instanceof HTMLElement) || !sourceBlock.matches("coco-word-native-table")) return false;
6282
+ if (isBottomAnchoredTable(sourceBlock) && sourceBlock.getBoundingClientRect().height <= body.getBoundingClientRect().height) return false;
6276
6283
  const sourceTable = sourceBlock.querySelector(":scope > table");
6277
6284
  const sourceBody = sourceTable == null ? void 0 : sourceTable.querySelector(":scope > tbody");
6278
6285
  if (!sourceTable || !sourceBody) return false;
@@ -6922,31 +6929,32 @@ function isShortFlexFilledTablePage(body, limit) {
6922
6929
  }
6923
6930
  __name(isShortFlexFilledTablePage, "isShortFlexFilledTablePage");
6924
6931
  function nativeBodyContentHeight(body) {
6925
- let height = 0;
6926
- for (const child of Array.from(body.children)) {
6927
- if (!(child instanceof HTMLElement)) continue;
6928
- const rect = child.getBoundingClientRect();
6929
- const style = window.getComputedStyle(child);
6930
- const marginTop = Number.parseFloat(style.marginTop) || 0;
6931
- const marginBottom = Number.parseFloat(style.marginBottom) || 0;
6932
- height += rect.height + marginTop + marginBottom;
6933
- }
6934
- return height;
6932
+ const blocks = Array.from(body.children).filter((child) => child instanceof HTMLElement);
6933
+ return incrementalBlockGroupHeight(blocks);
6935
6934
  }
6936
6935
  __name(nativeBodyContentHeight, "nativeBodyContentHeight");
6937
6936
  function nativeBodyContentBottom(body) {
6938
6937
  const bodyRect = body.getBoundingClientRect();
6939
6938
  let bottom = 0;
6939
+ let bottomTableHeight = 0;
6940
6940
  for (const child of Array.from(body.children)) {
6941
6941
  if (!(child instanceof HTMLElement)) continue;
6942
6942
  const rect = child.getBoundingClientRect();
6943
6943
  const style = window.getComputedStyle(child);
6944
6944
  const marginBottom = Number.parseFloat(style.marginBottom) || 0;
6945
+ if (isBottomAnchoredTable(child)) {
6946
+ bottomTableHeight += rect.height + marginBottom;
6947
+ continue;
6948
+ }
6945
6949
  bottom = Math.max(bottom, rect.bottom - bodyRect.top + marginBottom);
6946
6950
  }
6947
- return bottom;
6951
+ return bottom + bottomTableHeight;
6948
6952
  }
6949
6953
  __name(nativeBodyContentBottom, "nativeBodyContentBottom");
6954
+ function isBottomAnchoredTable(block) {
6955
+ return block.hasAttribute("data-anchor-bottom-margin");
6956
+ }
6957
+ __name(isBottomAnchoredTable, "isBottomAnchoredTable");
6950
6958
  function tableBottomReservePx(block, bodyLimit) {
6951
6959
  if (bodyLimit < 700) return 0;
6952
6960
  const rowCount = block.querySelectorAll("tr").length;
@@ -8241,29 +8249,30 @@ function mapDrawingTextAlign(value) {
8241
8249
  }
8242
8250
  __name(mapDrawingTextAlign, "mapDrawingTextAlign");
8243
8251
  function renderNativeTable(table) {
8244
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
8252
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
8245
8253
  const el = document.createElement("coco-word-native-table");
8246
8254
  el.setAttribute("data-table-id", table.tableId);
8255
+ if ((_a = table.layout) == null ? void 0 : _a.anchorToBottomMargin) el.setAttribute("data-anchor-bottom-margin", "");
8247
8256
  if (table.revision) {
8248
8257
  el.classList.add(table.revision.revisionKind === "delete" ? "coco-word-revision-delete" : "coco-word-revision-insert");
8249
8258
  el.dataset.revisionId = table.revision.revisionId;
8250
8259
  el.dataset.revisionKind = table.revision.revisionKind;
8251
- el.dataset.revisionAuthor = (_a = table.revision.author) != null ? _a : "";
8252
- el.dataset.revisionDate = (_b = table.revision.date) != null ? _b : "";
8260
+ el.dataset.revisionAuthor = (_b = table.revision.author) != null ? _b : "";
8261
+ el.dataset.revisionDate = (_c = table.revision.date) != null ? _c : "";
8253
8262
  el.dataset.revisionText = "\u8868\u683C\u7ED3\u6784";
8254
8263
  }
8255
8264
  if (table.tableStyleId) el.setAttribute("data-style-id", table.tableStyleId);
8256
8265
  const tableEl = document.createElement("table");
8257
- tableEl.dataset.layout = (_d = (_c = table.layout) == null ? void 0 : _c.mode) != null ? _d : "autofit";
8266
+ tableEl.dataset.layout = (_e = (_d = table.layout) == null ? void 0 : _d.mode) != null ? _e : "autofit";
8258
8267
  applyNativeTableLayout(tableEl, table);
8259
8268
  const columnCount = nativeTableColumnCount(table);
8260
8269
  const colgroup = document.createElement("colgroup");
8261
8270
  const tableWidth = table.columnWidths.reduce((sum, width) => sum + Math.max(0, width), 0);
8262
8271
  for (let index = 0; index < columnCount; index++) {
8263
- const width = (_e = table.columnWidths[index]) != null ? _e : 0;
8272
+ const width = (_f = table.columnWidths[index]) != null ? _f : 0;
8264
8273
  const col = document.createElement("col");
8265
8274
  if (width > 0) {
8266
- col.style.width = ((_f = table.layout) == null ? void 0 : _f.widthType) === "pct" ? `${width / tableWidth * 100}%` : twipsToPt2(width);
8275
+ col.style.width = ((_g = table.layout) == null ? void 0 : _g.widthType) === "pct" ? `${width / tableWidth * 100}%` : twipsToPt2(width);
8267
8276
  }
8268
8277
  colgroup.appendChild(col);
8269
8278
  }
@@ -8278,7 +8287,7 @@ function renderNativeTable(table) {
8278
8287
  if (row.cantSplit) tr.dataset.cantSplit = "true";
8279
8288
  if (row.height && row.height.val > 0) {
8280
8289
  const height = twipsToPt2(row.height.val);
8281
- tr.dataset.heightRule = (_g = row.height.hRule) != null ? _g : "auto";
8290
+ tr.dataset.heightRule = (_h = row.height.hRule) != null ? _h : "auto";
8282
8291
  tr.style.setProperty("--coco-word-row-height", height);
8283
8292
  if (row.height.hRule === "exact") {
8284
8293
  tr.style.height = height;
@@ -8308,7 +8317,7 @@ function renderNativeTable(table) {
8308
8317
  })
8309
8318
  }));
8310
8319
  if (cellStyle.cssText) td.setAttribute("style", cellStyle.cssText);
8311
- const spaced = ((_i = (_h = table.layout) == null ? void 0 : _h.cellSpacing) != null ? _i : 0) > 0;
8320
+ const spaced = ((_j = (_i = table.layout) == null ? void 0 : _i.cellSpacing) != null ? _j : 0) > 0;
8312
8321
  const gridWidths = ["top", "right", "bottom", "left"].map((side) => {
8313
8322
  const border = cellStyle.declarations[`border-${side}`];
8314
8323
  if (border && border !== "0") return "0";
@@ -12668,6 +12677,20 @@ coco-word-native-document.uses-natural-paragraph-flow coco-word-native-page-body
12668
12677
  display: block;
12669
12678
  }
12670
12679
 
12680
+ coco-word-native-document.uses-natural-paragraph-flow
12681
+ coco-word-native-page-body:has(> coco-word-native-table[data-anchor-bottom-margin]) {
12682
+ display: flex;
12683
+ }
12684
+
12685
+ /* Reserve space in pagination while placing anchored tables below the page's text. */
12686
+ coco-word-native-page-body > coco-word-native-table[data-anchor-bottom-margin] {
12687
+ order: 1;
12688
+ }
12689
+
12690
+ coco-word-native-page-body > coco-word-native-table[data-anchor-bottom-margin]:not([data-anchor-bottom-margin] ~ *) {
12691
+ margin-top: auto;
12692
+ }
12693
+
12671
12694
  coco-word-native-page[data-vertical-alignment] > coco-word-native-page-body {
12672
12695
  display: flex;
12673
12696
  }