@stll/folio-core 0.46.0 → 0.47.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/ai-edits/apply.js +26 -24
- package/dist/ai-edits/headless.js +1 -1
- package/dist/ai-edits/read.d.ts +1 -0
- package/dist/ai-edits/read.js +1 -0
- package/dist/ai-edits/snapshot.js +32 -27
- package/dist/ai-edits/table-cell-mutations.js +15 -7
- package/dist/ai-edits/table-geometry.js +21 -18
- package/dist/ai-edits/table-template.js +2 -2
- package/dist/compare/content-alignment.js +108 -12
- package/dist/compare/content-types.d.ts +8 -2
- package/dist/compare/content.js +2 -11
- package/dist/compare/plan.js +7 -4
- package/dist/compare/section-boundary-properties.js +1 -2
- package/dist/content-controls/checkboxDisplay.d.ts +8 -2
- package/dist/content-controls/checkboxDisplay.js +11 -5
- package/dist/content-controls/mutateContentControls.js +41 -42
- package/dist/controller/layoutPipeline.js +8 -3
- package/dist/display-list/build/buildDisplayList.js +7 -7
- package/dist/display-list/build/imagePrimitives.d.ts +4 -4
- package/dist/display-list/build/imagePrimitives.js +38 -20
- package/dist/display-list/build/pageBorderPrimitives.js +2 -1
- package/dist/display-list/build/paragraphPrimitives.js +93 -13
- package/dist/display-list/build/previewPrimitives.d.ts +10 -0
- package/dist/display-list/build/previewPrimitives.js +89 -0
- package/dist/display-list/build/strokes.d.ts +177 -8
- package/dist/display-list/build/strokes.js +167 -47
- package/dist/display-list/build/tablePrimitives.js +4 -2
- package/dist/display-list/build/textBoxPrimitives.js +6 -4
- package/dist/display-list/build/textDecorations.d.ts +15 -1
- package/dist/display-list/build/textDecorations.js +15 -1
- package/dist/display-list/dom/renderDisplayListToDom.js +1 -19
- package/dist/display-list/primitives.d.ts +13 -2
- package/dist/display-list/primitives.js +36 -1
- package/dist/document-operations.js +2 -1
- package/dist/docx/attributeRemainder.d.ts +34 -1
- package/dist/docx/attributeRemainder.js +49 -3
- package/dist/docx/blockContentParser.d.ts +2 -0
- package/dist/docx/blockContentParser.js +39 -67
- package/dist/docx/blockPlainText.js +3 -1
- package/dist/docx/borderParser.js +26 -11
- package/dist/docx/builtInStyles.d.ts +8 -16
- package/dist/docx/builtInStyles.js +54 -17
- package/dist/docx/commentAnchorIndex.js +1 -1
- package/dist/docx/commentParser.js +3 -3
- package/dist/docx/commentRangeIntegrity.js +1 -1
- package/dist/docx/commentRangeJoin.js +1 -1
- package/dist/docx/commentReferenceNormalization.js +3 -2
- package/dist/docx/commentReplyMarkers.js +1 -1
- package/dist/docx/compatibility.js +56 -42
- package/dist/docx/containerChildren.d.ts +110 -13
- package/dist/docx/containerChildren.gen.d.ts +16 -1
- package/dist/docx/containerChildren.gen.js +18 -1
- package/dist/docx/containerChildren.js +63 -13
- package/dist/docx/diagramPreview.d.ts +14 -2
- package/dist/docx/diagramPreview.js +81 -169
- package/dist/docx/documentParser.js +4 -1
- package/dist/docx/drawingAnchor.d.ts +87 -0
- package/dist/docx/drawingAnchor.js +201 -0
- package/dist/docx/drawingUtils.d.ts +43 -38
- package/dist/docx/drawingUtils.js +205 -118
- package/dist/docx/fontTableParser.js +102 -41
- package/dist/docx/footnoteParser.js +10 -6
- package/dist/docx/groupDrawingParser.js +4 -3
- package/dist/docx/headerFooterReferenceNormalization.js +1 -1
- package/dist/docx/hyperlinkParser.d.ts +45 -7
- package/dist/docx/hyperlinkParser.js +126 -57
- package/dist/docx/imageParser.js +127 -107
- package/dist/docx/index.d.ts +2 -1
- package/dist/docx/index.js +2 -1
- package/dist/docx/inlineContentRemovals.d.ts +28 -0
- package/dist/docx/inlineContentRemovals.js +46 -0
- package/dist/docx/inlineWrapperContent.d.ts +84 -3
- package/dist/docx/inlineWrapperContent.js +85 -4
- package/dist/docx/inlineWrapperParser.d.ts +11 -0
- package/dist/docx/inlineWrapperParser.js +60 -0
- package/dist/docx/nonVisualDrawingProps.d.ts +5 -13
- package/dist/docx/normalizeBaseDirection.js +4 -2
- package/dist/docx/numberingParser.d.ts +25 -2
- package/dist/docx/numberingParser.js +264 -361
- package/dist/docx/numberingReference.d.ts +9 -16
- package/dist/docx/numberingReference.js +17 -16
- package/dist/docx/numberingReferenceNormalization.js +7 -7
- package/dist/docx/ooxmlCounterFormatter.d.ts +1 -1
- package/dist/docx/ooxmlCounterFormatter.js +4 -1
- package/dist/docx/paraIdAttribute.d.ts +91 -1
- package/dist/docx/paraIdAttribute.js +79 -1
- package/dist/docx/paragraphParser.d.ts +9 -24
- package/dist/docx/paragraphParser.js +212 -396
- package/dist/docx/paragraphProperties.d.ts +23 -0
- package/dist/docx/paragraphProperties.js +279 -0
- package/dist/docx/paragraphPropertySource.js +2 -0
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +2 -1
- package/dist/docx/paragraphTextBoxEnrichment.js +14 -7
- package/dist/docx/paragraphTraversal.d.ts +14 -10
- package/dist/docx/paragraphTraversal.js +47 -49
- package/dist/docx/parseWarningMessage.js +3 -0
- package/dist/docx/parserEnums.d.ts +6 -8
- package/dist/docx/parserEnums.js +4 -6
- package/dist/docx/preservedRunContent.js +16 -6
- package/dist/docx/previewBudget.d.ts +44 -23
- package/dist/docx/previewBudget.js +61 -30
- package/dist/docx/propertyElementAttributes.d.ts +178 -0
- package/dist/docx/propertyElementAttributes.js +114 -0
- package/dist/docx/renderedPageBreakNormalization.js +2 -2
- package/dist/docx/rezip.d.ts +28 -2
- package/dist/docx/rezip.js +78 -9
- package/dist/docx/runConsolidator.d.ts +42 -2
- package/dist/docx/runConsolidator.js +60 -6
- package/dist/docx/runParser.d.ts +54 -18
- package/dist/docx/runParser.js +379 -295
- package/dist/docx/runPayload.d.ts +5 -0
- package/dist/docx/runPayload.js +4 -0
- package/dist/docx/sdtProperties.d.ts +39 -5
- package/dist/docx/sdtProperties.js +205 -84
- package/dist/docx/sdtPropertiesPatch.d.ts +5 -9
- package/dist/docx/sdtPropertiesPatch.js +68 -112
- package/dist/docx/sectionParser.d.ts +1 -2
- package/dist/docx/sectionParser.js +236 -240
- package/dist/docx/selectiveSave.js +3 -2
- package/dist/docx/selectiveXmlPatch.d.ts +21 -2
- package/dist/docx/selectiveXmlPatch.js +195 -99
- package/dist/docx/serializer/blockSdtSerializer.js +2 -96
- package/dist/docx/serializer/borderSerializer.d.ts +5 -5
- package/dist/docx/serializer/borderSerializer.js +10 -8
- package/dist/docx/serializer/documentSerializer.js +3 -0
- package/dist/docx/serializer/fontTableSerializer.js +31 -3
- package/dist/docx/serializer/headerFooterSerializer.js +3 -0
- package/dist/docx/serializer/markupRangeAttributes.d.ts +9 -1
- package/dist/docx/serializer/markupRangeAttributes.js +9 -1
- package/dist/docx/serializer/noteSerializer.js +3 -0
- package/dist/docx/serializer/numberingSerializer.d.ts +1 -6
- package/dist/docx/serializer/numberingSerializer.js +81 -79
- package/dist/docx/serializer/paragraphSerializer.d.ts +1 -9
- package/dist/docx/serializer/paragraphSerializer.js +88 -188
- package/dist/docx/serializer/runSerializer.d.ts +1 -5
- package/dist/docx/serializer/runSerializer.js +109 -59
- package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +26 -0
- package/dist/docx/serializer/sdtPropertiesSerializer.js +111 -0
- package/dist/docx/serializer/sectionPropertiesSerializer.js +34 -45
- package/dist/docx/serializer/settingsSerializer.js +6 -4
- package/dist/docx/serializer/stylesSerializer.js +8 -11
- package/dist/docx/serializer/tableSerializer.js +268 -100
- package/dist/docx/serializer/textFormattingSerializer.d.ts +28 -4
- package/dist/docx/serializer/textFormattingSerializer.js +111 -101
- package/dist/docx/serializer/xmlUtils.d.ts +1 -1
- package/dist/docx/serializer/xmlUtils.js +1 -1
- package/dist/docx/server/createBilingualDocument.js +18 -16
- package/dist/docx/server/migrateYjsAttrSchema.js +3 -3
- package/dist/docx/settingsParser.js +7 -4
- package/dist/docx/shadingParser.d.ts +2 -1
- package/dist/docx/shadingParser.js +43 -7
- package/dist/docx/shapeParser.js +8 -3
- package/dist/docx/strictNames.d.ts +11 -0
- package/dist/docx/strictNames.gen.d.ts +45 -0
- package/dist/docx/strictNames.gen.js +50 -0
- package/dist/docx/strictNames.js +43 -0
- package/dist/docx/strictValueEncodings.gen.js +133 -131
- package/dist/docx/styleParser.js +17 -349
- package/dist/docx/tableParser.d.ts +10 -1
- package/dist/docx/tableParser.js +505 -181
- package/dist/docx/textBoxParser.d.ts +3 -1
- package/dist/docx/textBoxParser.js +18 -8
- package/dist/docx/themeColorAttribute.d.ts +13 -0
- package/dist/docx/themeColorAttribute.js +24 -0
- package/dist/docx/trackedMoveRangeNormalization.js +2 -1
- package/dist/docx/vmlImageParser.d.ts +13 -4
- package/dist/docx/vmlImageParser.js +74 -31
- package/dist/docx/vmlPreview.js +2 -2
- package/dist/docx/wrapPolygon.d.ts +30 -0
- package/dist/docx/wrapPolygon.js +70 -0
- package/dist/docx/xmlParser.d.ts +14 -1
- package/dist/docx/xmlParser.js +18 -2
- package/dist/fonts/embeddedFonts.js +3 -3
- package/dist/headless-layout.js +2 -0
- package/dist/i18n/messages/catalogs.gen.d.ts +68 -0
- package/dist/i18n/messages/catalogs.gen.js +102 -34
- package/dist/i18n/messages/messages.gen.d.ts +4 -0
- package/dist/internal/headlessRevisionResolution.js +9 -0
- package/dist/internal/pageBreakRunSourceDescendantIndex.js +3 -1
- package/dist/internal/paragraphFormattingSerialization.d.ts +20 -9
- package/dist/internal/paragraphFormattingSerialization.js +118 -83
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +1 -0
- package/dist/layout-bridge/convert/footnoteLayout.js +1 -0
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +1 -0
- package/dist/layout-bridge/convert/headerFooterLayout.js +2 -0
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +17 -12
- package/dist/layout-bridge/convert/toFlowBlocks.js +177 -101
- package/dist/layout-engine/index.d.ts +2 -2
- package/dist/layout-engine/index.js +53 -17
- package/dist/layout-engine/measure/measureBlocks.d.ts +3 -0
- package/dist/layout-engine/measure/measureBlocks.js +6 -10
- package/dist/layout-engine/measure/tableCellGrid.js +2 -1
- package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
- package/dist/layout-engine/measure/tableInlinePlacement.js +2 -5
- package/dist/layout-engine/paragraphSequence.js +3 -2
- package/dist/layout-engine/renderedBreakReconciliation.js +2 -1
- package/dist/layout-engine/section-breaks.d.ts +49 -2
- package/dist/layout-engine/section-breaks.js +55 -4
- package/dist/layout-engine/types.d.ts +47 -17
- package/dist/layout-engine/types.js +16 -1
- package/dist/layout-painter/borderStroke.d.ts +18 -4
- package/dist/layout-painter/renderPage.js +6 -4
- package/dist/layout-painter/renderParagraph.d.ts +2 -1
- package/dist/layout-painter/renderParagraph.js +13 -26
- package/dist/layout-painter/renderTable.d.ts +4 -1
- package/dist/layout-painter/renderTable.js +22 -22
- package/dist/layout-painter/renderTextBox.js +5 -3
- package/dist/markdown/renderBlock.js +3 -1
- package/dist/markdown/renderRuns.js +7 -2
- package/dist/markdown/renderTable.js +2 -1
- package/dist/model.d.ts +3 -3
- package/dist/model.js +2 -2
- package/dist/paged-layout/sectionBlockWidths.d.ts +3 -0
- package/dist/paged-layout/sectionBlockWidths.js +26 -4
- package/dist/prosemirror/attrs/index.d.ts +22 -4
- package/dist/prosemirror/attrs/index.js +498 -60
- package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +9 -1
- package/dist/prosemirror/bookmarkBoundaryAttrs.js +22 -3
- package/dist/prosemirror/commands/comments.js +68 -53
- package/dist/prosemirror/commands/contentControls.js +24 -19
- package/dist/prosemirror/commands/image.d.ts +1 -1
- package/dist/prosemirror/commands/image.js +4 -1
- package/dist/prosemirror/commands/paragraph.d.ts +2 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +12 -4
- package/dist/prosemirror/commands/propertyChangeScope.js +22 -4
- package/dist/prosemirror/commands/sectionBreak.d.ts +33 -1
- package/dist/prosemirror/commands/sectionBreak.js +187 -11
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +18 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +330 -183
- package/dist/prosemirror/conversion/index.d.ts +2 -2
- package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +39 -0
- package/dist/prosemirror/conversion/preservedSinkCarriers.js +19 -0
- package/dist/prosemirror/conversion/runShadingMark.js +14 -1
- package/dist/prosemirror/conversion/sdtAttrs.d.ts +10 -1
- package/dist/prosemirror/conversion/sdtAttrs.js +19 -5
- package/dist/prosemirror/conversion/toProseDoc.js +371 -141
- package/dist/prosemirror/emptyRangeAnchor.d.ts +53 -0
- package/dist/prosemirror/emptyRangeAnchor.js +158 -0
- package/dist/prosemirror/extensions/StarterKit.js +8 -2
- package/dist/prosemirror/extensions/core/DocExtension.js +1 -1
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +19 -15
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -2
- package/dist/prosemirror/extensions/features/ListExtension.js +43 -24
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +4 -3
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +5 -5
- package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +3 -1
- package/dist/prosemirror/extensions/features/pasteCleanup.js +56 -2
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +5 -4
- package/dist/prosemirror/extensions/markRegistry.d.ts +26 -2
- package/dist/prosemirror/extensions/markRegistry.js +73 -10
- package/dist/prosemirror/extensions/marks/InlineWrapperExtension.js +17 -3
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +26 -0
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.js +134 -0
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +2 -1
- package/dist/prosemirror/extensions/marks/UnderlineExtension.js +12 -18
- package/dist/prosemirror/extensions/marks/markUtils.js +2 -1
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +29 -0
- package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.js +46 -0
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +4 -3
- package/dist/prosemirror/extensions/nodes/BlockSdtExtension.js +18 -13
- package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +28 -53
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +10 -0
- package/dist/prosemirror/extensions/nodes/ImageExtension.js +8 -1
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +11 -0
- package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.js +43 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +13 -0
- package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +65 -0
- package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +3 -1
- package/dist/prosemirror/extensions/nodes/SdtExtension.js +22 -16
- package/dist/prosemirror/extensions/nodes/ShapeExtension.js +4 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.js +141 -123
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.js +4 -0
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +23 -0
- package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.js +57 -0
- package/dist/prosemirror/extensions/types.d.ts +12 -3
- package/dist/prosemirror/index.d.ts +4 -2
- package/dist/prosemirror/index.js +2 -1
- package/dist/prosemirror/inlineWrapperStack.js +20 -3
- package/dist/prosemirror/listMarker.d.ts +2 -2
- package/dist/prosemirror/listMarker.js +7 -8
- package/dist/prosemirror/listRenderingAttrs.js +11 -1
- package/dist/prosemirror/listState.d.ts +62 -0
- package/dist/prosemirror/listState.js +49 -0
- package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +13 -0
- package/dist/prosemirror/moveRangeBoundaryAttrs.js +114 -0
- package/dist/prosemirror/numberedRefFields.js +4 -4
- package/dist/prosemirror/numberingAttr.d.ts +55 -0
- package/dist/prosemirror/numberingAttr.js +74 -0
- package/dist/prosemirror/outlineLevelAttr.d.ts +29 -0
- package/dist/prosemirror/outlineLevelAttr.js +42 -0
- package/dist/prosemirror/paragraphFormattingProvenance.d.ts +9 -0
- package/dist/prosemirror/paragraphFormattingProvenance.js +4 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +3 -6
- package/dist/prosemirror/plugins/selectionTracker.js +3 -10
- package/dist/prosemirror/rangeAnchorAttrs.d.ts +14 -0
- package/dist/prosemirror/rangeAnchorAttrs.js +101 -0
- package/dist/prosemirror/replacedAnnotations.d.ts +1 -1
- package/dist/prosemirror/replacedAnnotations.js +24 -6
- package/dist/prosemirror/revisionCarriers.d.ts +86 -2
- package/dist/prosemirror/revisionCarriers.js +86 -60
- package/dist/prosemirror/runFormattingInlineCarriers.d.ts +2 -0
- package/dist/prosemirror/runFormattingInlineCarriers.js +2 -0
- package/dist/prosemirror/runIdentity.d.ts +28 -0
- package/dist/prosemirror/runIdentity.js +36 -0
- package/dist/prosemirror/runStyleFormatting.js +1 -1
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/marks.d.ts +23 -4
- package/dist/prosemirror/schema/nodes.d.ts +220 -24
- package/dist/prosemirror/sectionCarrier.d.ts +37 -0
- package/dist/prosemirror/sectionCarrier.js +40 -0
- package/dist/prosemirror/selectionState.d.ts +3 -0
- package/dist/prosemirror/selectionState.js +4 -1
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +5 -4
- package/dist/prosemirror/styles/resolvedStyleAttrs.js +15 -13
- package/dist/prosemirror/tableResize.js +5 -6
- package/dist/prosemirror/trackedRunInlineAtoms.d.ts +2 -0
- package/dist/prosemirror/trackedRunInlineAtoms.js +2 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +10 -11
- package/dist/prosemirror/utils/extractTrackedChanges.js +109 -92
- package/dist/prosemirror/validation.js +17 -6
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +2 -2
- package/dist/prosemirror/yjsDocumentMetadata.js +428 -7
- package/dist/prosemirror/zeroWidthAnchors.js +4 -0
- package/dist/style-sets/extract.js +4 -4
- package/dist/style-sets/stellaStyle.js +36 -23
- package/dist/types/colors.d.ts +2 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/documentEnumValues.d.ts +53 -26
- package/dist/types/documentEnumValues.js +72 -174
- package/dist/types/formatting.d.ts +2 -2
- package/dist/types/index.d.ts +9 -2
- package/dist/utils/borderCss.d.ts +246 -0
- package/dist/utils/borderCss.js +325 -0
- package/dist/utils/colorResolver.d.ts +4 -3
- package/dist/utils/colorResolver.js +45 -76
- package/dist/utils/createDocument.js +24 -6
- package/dist/utils/findReplace.js +52 -10
- package/dist/utils/formatToStyle.d.ts +84 -2
- package/dist/utils/formatToStyle.js +133 -52
- package/dist/utils/headingCollector.js +3 -2
- package/dist/utils/mergeDocumentContent.js +5 -3
- package/dist/utils/paragraphFormattingMerge.js +27 -6
- package/dist/utils/replaceText.js +1 -1
- package/dist/utils/tableOperations.d.ts +5 -3
- package/dist/utils/tableOperations.js +14 -1
- package/dist/utils/tablePlacement.d.ts +7 -0
- package/dist/utils/tablePlacement.js +14 -0
- package/dist/utils/textDirectionFlow.d.ts +15 -0
- package/dist/utils/textDirectionFlow.js +38 -0
- package/dist/utils/textFormattingMerge.js +16 -4
- package/package.json +10 -10
- package/dist/ai-edits/__fixtures__/paragraphs.d.ts +0 -17
- package/dist/ai-edits/__fixtures__/paragraphs.js +0 -33
- package/dist/compare/__fixtures__/body-sequence.d.ts +0 -119
- package/dist/compare/__fixtures__/body-sequence.js +0 -225
- package/dist/compare/__fixtures__/nested-table.d.ts +0 -16
- package/dist/compare/__fixtures__/nested-table.js +0 -50
- package/dist/compare/__fixtures__/numbered-list.d.ts +0 -34
- package/dist/compare/__fixtures__/numbered-list.js +0 -85
- package/dist/docx/bookmarkPlacement.d.ts +0 -9
- package/dist/docx/bookmarkPlacement.js +0 -52
- package/dist/fonts/embeddedFontTable.d.ts +0 -45
- package/dist/fonts/embeddedFontTable.js +0 -80
- package/dist/prosemirror/extensions/marks/PageBreakRunOwnerExtension.d.ts +0 -13
- package/dist/prosemirror/extensions/marks/PageBreakRunOwnerExtension.js +0 -39
|
@@ -6,19 +6,21 @@ import { partitionRunsAtPageBreaks } from "../../internal/pageBreakRunPartition.
|
|
|
6
6
|
import { setHyperlinkInstanceIndex } from "../../layout-engine/measure/hyperlinkInstance.js";
|
|
7
7
|
import { setParagraphFrame } from "../../layout-engine/paragraphFrame.js";
|
|
8
8
|
import { setTextBoxGroupId } from "../../layout-engine/textBoxGroup.js";
|
|
9
|
-
import { DEFAULT_TEXTBOX_MARGINS } from "../../layout-engine/types.js";
|
|
9
|
+
import { DEFAULT_TEXTBOX_MARGINS, isListNumPr } from "../../layout-engine/types.js";
|
|
10
10
|
import { getPageNumbering } from "../../paged-layout/sectionGeometry.js";
|
|
11
11
|
import { expectBlockSdtAttrs, expectCharacterSpacingMarkAttrs, expectCharacterStyleMarkAttrs, expectCommentMarkAttrs, expectEmphasisMarkAttrs, expectFieldAttrs, expectFontFamilyMarkAttrs, expectFontSizeMarkAttrs, expectFootnoteRefMarkAttrs, expectHardBreakAttrs, expectHighlightMarkAttrs, expectHyperlinkMarkAttrs, expectImageAttrs, expectInlineWrapperMarkAttrs, expectLanguageMarkAttrs, expectMathAttrs, expectParagraphAttrs, expectPreservedXmlAttrs, expectRunFormattingOverrideMarkAttrs, expectRunShadingMarkAttrs, expectSymbolAttrs, expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, expectTextBoxAttrs, expectTextColorMarkAttrs, expectTextEffectMarkAttrs, expectTrackedChangeMarkAttrs, expectUnderlineMarkAttrs } from "../../prosemirror/attrs/index.js";
|
|
12
12
|
import { autospacingMatchesBase } from "../../prosemirror/autospacingBase.js";
|
|
13
13
|
import { runShadingAttrsToShading } from "../../prosemirror/conversion/runShadingMark.js";
|
|
14
14
|
import { advanceListMarker, advanceVisibleListMarker, cloneListCounterState, formatCounter, resolveListTemplate } from "../../prosemirror/listMarker.js";
|
|
15
15
|
import { resolveNumberedRefFields } from "../../prosemirror/numberedRefFields.js";
|
|
16
|
-
import { directionToBidi } from "../../prosemirror/paragraphDirection.js";
|
|
16
|
+
import { directionIsRtl, directionToBidi } from "../../prosemirror/paragraphDirection.js";
|
|
17
17
|
import { resolveEffectiveRunStyleFormatting } from "../../prosemirror/runStyleFormatting.js";
|
|
18
|
+
import { parseSectionBreakType } from "../../prosemirror/sectionCarrier.js";
|
|
18
19
|
import { expectTextBoxAnchorAttrs } from "../../prosemirror/textBoxAnchorAttrs.js";
|
|
19
20
|
import { assertValidProseMirrorDocument } from "../../prosemirror/validation.js";
|
|
20
21
|
import { createStyleEngine } from "../../style-engine/styleEngine.js";
|
|
21
22
|
import { normalizeShapeTextAnchor } from "../../types/documentEnumValues.js";
|
|
23
|
+
import { cssBorderStyle, cssBorderStyleOf } from "../../utils/borderCss.js";
|
|
22
24
|
import { resolveColor, resolveHighlightToCss } from "../../utils/colorResolver.js";
|
|
23
25
|
import { resolveThemeFont } from "../../utils/fontResolver.js";
|
|
24
26
|
import { resolveShadingFill } from "../../utils/formatToStyle.js";
|
|
@@ -31,6 +33,7 @@ import { AUTO_PARAGRAPH_SPACING_PX, halfPointsToPixels, halfPointsToPoints, poin
|
|
|
31
33
|
import { getColumns } from "../sectionColumns.js";
|
|
32
34
|
import { groupParagraphFrames } from "./paragraphFrames.js";
|
|
33
35
|
import { panic } from "better-result";
|
|
36
|
+
import { headingLevelOf, paragraphNumberingLevel, paragraphNumberingReferenceId, sameStatedParagraphNumbering, statesNoBorder } from "@stll/docx-core/model";
|
|
34
37
|
//#region src/layout-bridge/convert/toFlowBlocks.ts
|
|
35
38
|
const DETACHED_WATERMARK_HOST_ATTR = "_detachedWatermarkHost";
|
|
36
39
|
const expectDetachedWatermarkHostAttr = (attrs) => {
|
|
@@ -39,7 +42,14 @@ const expectDetachedWatermarkHostAttr = (attrs) => {
|
|
|
39
42
|
if (typeof value !== "boolean") panic("Invalid ProseMirror detached watermark host attrs:\nparagraph.attrs._detachedWatermarkHost: Expected a boolean.");
|
|
40
43
|
return value;
|
|
41
44
|
};
|
|
42
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Word's layout fallback when an imported OOXML style hierarchy never supplies
|
|
47
|
+
* `w:sz`. ECMA-376 deliberately leaves that terminal fallback to the consumer;
|
|
48
|
+
* this value matches Word and is therefore applied by the DOCX composition
|
|
49
|
+
* roots, while standalone ProseMirror documents keep the layout engine's 11pt
|
|
50
|
+
* default.
|
|
51
|
+
*/
|
|
52
|
+
const WORD_UNSPECIFIED_FONT_SIZE = 10;
|
|
43
53
|
const TEXT_BOX_ANCHOR_BLOCK_ID = Symbol.for("stll.textBoxAnchorBlockId");
|
|
44
54
|
const DEFAULT_TABLE_CELL_MARGIN_TWIPS = {
|
|
45
55
|
top: 0,
|
|
@@ -72,7 +82,6 @@ function constrainImageToPage(width, height, pageContentHeight) {
|
|
|
72
82
|
height: pageContentHeight
|
|
73
83
|
};
|
|
74
84
|
}
|
|
75
|
-
const DEFAULT_SIZE = 11;
|
|
76
85
|
/**
|
|
77
86
|
* Convert twips to pixels (1 twip = 1/1440 inch, 1 inch = 96 CSS px).
|
|
78
87
|
* No rounding — precision prevents cumulative layout drift across paragraphs.
|
|
@@ -141,31 +150,43 @@ const MARK_PAINT_DISPOSITIONS = {
|
|
|
141
150
|
deletion: "runFormatting",
|
|
142
151
|
inlineWrapper: "runFormatting",
|
|
143
152
|
characterStyle: "resolvedElsewhere",
|
|
144
|
-
|
|
153
|
+
runIdentity: "notPainted",
|
|
145
154
|
runPropertyChange: "notPainted"
|
|
146
155
|
};
|
|
147
156
|
const markPaintDisposition = (name) => {
|
|
148
157
|
return MARK_PAINT_DISPOSITIONS[name];
|
|
149
158
|
};
|
|
150
159
|
/**
|
|
151
|
-
*
|
|
152
|
-
* innermost layer of a stack states it.
|
|
160
|
+
* Whether a layer states how its content is laid out.
|
|
153
161
|
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
162
|
+
* A smart tag and a custom-XML wrapper name an element in another vocabulary
|
|
163
|
+
* and say nothing about layout, so the painter draws the text exactly as it
|
|
164
|
+
* would without them. The `switch` is here rather than inline so a kind added
|
|
165
|
+
* to the model has to answer the question.
|
|
157
166
|
*/
|
|
158
|
-
const
|
|
159
|
-
const layer = stack.at(-1);
|
|
160
|
-
if (layer === void 0) return;
|
|
167
|
+
const paintedDirection = (layer) => {
|
|
161
168
|
switch (layer.kind) {
|
|
162
169
|
case "bidi": return layer.direction === void 0 ? { control: layer.control } : {
|
|
163
170
|
control: layer.control,
|
|
164
171
|
direction: layer.direction
|
|
165
172
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
case "smartTag":
|
|
174
|
+
case "customXml": return;
|
|
175
|
+
default: return;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* The direction the innermost bidirectional layer of a stack lays its content out in.
|
|
180
|
+
*
|
|
181
|
+
* Innermost wins: a bidirectional wrapper inside another is the one the text is
|
|
182
|
+
* laid out in, and the outer layers are what the save leg rebuilds the nesting
|
|
183
|
+
* from. The layers that state no direction are skipped rather than ending the
|
|
184
|
+
* search, so a smart tag inside a `w:dir` still reads right to left.
|
|
185
|
+
*/
|
|
186
|
+
const innermostBidiWrapper = (stack) => {
|
|
187
|
+
for (const layer of stack.toReversed()) {
|
|
188
|
+
const direction = paintedDirection(layer);
|
|
189
|
+
if (direction !== void 0) return direction;
|
|
169
190
|
}
|
|
170
191
|
};
|
|
171
192
|
/**
|
|
@@ -340,6 +361,7 @@ function extractRunFormatting(marks, theme, fontAlternates) {
|
|
|
340
361
|
case "deletion": {
|
|
341
362
|
const attrs = expectTrackedChangeMarkAttrs(mark);
|
|
342
363
|
formatting.isDeletion = true;
|
|
364
|
+
if (attrs._historicalFormatting) formatting.usesHistoricalFormatting = true;
|
|
343
365
|
formatting.changeAuthor = attrs.author;
|
|
344
366
|
if (attrs.date !== void 0) formatting.changeDate = attrs.date;
|
|
345
367
|
formatting.changeRevisionId = attrs.revisionId;
|
|
@@ -384,6 +406,7 @@ function markDefaultBlackTextColorSource(formatting, paraDefaults) {
|
|
|
384
406
|
};
|
|
385
407
|
}
|
|
386
408
|
function mergeRunFormatting(paraDefaults, formatting) {
|
|
409
|
+
if (formatting.isDeletion && formatting.usesHistoricalFormatting) return formatting;
|
|
387
410
|
const merged = {
|
|
388
411
|
...paraDefaults,
|
|
389
412
|
...markDefaultBlackTextColorSource(formatting, paraDefaults)
|
|
@@ -596,6 +619,7 @@ function buildImageRun(attrs, constrained, pmStart, pmEnd, trackedChange) {
|
|
|
596
619
|
const run = {
|
|
597
620
|
kind: "image",
|
|
598
621
|
src: attrs.src,
|
|
622
|
+
...attrs.preview ? { preview: attrs.preview } : {},
|
|
599
623
|
width: constrained.width,
|
|
600
624
|
height: constrained.height,
|
|
601
625
|
pmStart,
|
|
@@ -620,9 +644,10 @@ function buildImageRun(attrs, constrained, pmStart, pmEnd, trackedChange) {
|
|
|
620
644
|
if (attrs.cropLeft != null) run.cropLeft = attrs.cropLeft;
|
|
621
645
|
if (attrs.borderWidth != null) run.borderWidth = attrs.borderWidth;
|
|
622
646
|
if (attrs.borderColor) run.borderColor = attrs.borderColor;
|
|
623
|
-
|
|
647
|
+
const runBorderStyle = cssBorderStyleOf(attrs.borderStyle);
|
|
648
|
+
if (runBorderStyle) run.borderStyle = runBorderStyle;
|
|
624
649
|
if (attrs.position !== void 0) run.position = attrs.position;
|
|
625
|
-
if (attrs.layoutInCell !== void 0) run.layoutInCell = attrs.layoutInCell;
|
|
650
|
+
if (attrs.anchor?.layoutInCell !== void 0) run.layoutInCell = attrs.anchor.layoutInCell;
|
|
626
651
|
if (trackedChange?.isInsertion) run.isInsertion = true;
|
|
627
652
|
if (trackedChange?.isDeletion) run.isDeletion = true;
|
|
628
653
|
if (trackedChange?.changeAuthor !== void 0) run.changeAuthor = trackedChange.changeAuthor;
|
|
@@ -632,7 +657,11 @@ function buildImageRun(attrs, constrained, pmStart, pmEnd, trackedChange) {
|
|
|
632
657
|
}
|
|
633
658
|
/** A package image whose bytes cannot paint still owns its authored line box. */
|
|
634
659
|
const hasRelationshipBackedImageBox = (attrs) => typeof attrs.rId === "string" && attrs.rId.trim().length > 0 && typeof attrs.width === "number" && Number.isFinite(attrs.width) && attrs.width >= 0 && typeof attrs.height === "number" && Number.isFinite(attrs.height) && attrs.height >= 0;
|
|
635
|
-
|
|
660
|
+
/**
|
|
661
|
+
* A preview counts as a source: the bytes are not in the attrs, but the
|
|
662
|
+
* display list can produce them without I/O when it interns the descriptor.
|
|
663
|
+
*/
|
|
664
|
+
const hasPaintableImageSource = (attrs) => attrs.preview !== void 0 || sanitizeImageSrc(attrs.src) !== void 0;
|
|
636
665
|
/**
|
|
637
666
|
* In TOC paragraphs, strip the resolved Hyperlink character-style colour and
|
|
638
667
|
* underline so the painter's link fallback doesn't fire. The PM doc keeps the
|
|
@@ -806,7 +835,7 @@ function paragraphToRuns(node, startPos, _options, pageBreaks) {
|
|
|
806
835
|
}
|
|
807
836
|
if (child.type.name === "image") {
|
|
808
837
|
const attrs = expectImageAttrs(child);
|
|
809
|
-
if (!hasPaintableImageSource(attrs
|
|
838
|
+
if (!hasPaintableImageSource(attrs) && !hasRelationshipBackedImageBox(attrs)) return;
|
|
810
839
|
const constrained = constrainImageToPage(attrs.width ?? 100, attrs.height ?? 100, _options.pageContentHeight);
|
|
811
840
|
const trackedFmt = extractRunFormatting(effectiveMarks, theme, fontAlternates);
|
|
812
841
|
const run = buildImageRun(attrs, constrained, childPos, childPos + child.nodeSize, trackedFmt);
|
|
@@ -885,6 +914,20 @@ function paragraphToRuns(node, startPos, _options, pageBreaks) {
|
|
|
885
914
|
node.forEach((child, childOffset) => {
|
|
886
915
|
pushRunsForChild(child, offset + childOffset);
|
|
887
916
|
});
|
|
917
|
+
const { defaultFont, defaultSize } = _options;
|
|
918
|
+
if (defaultFont !== void 0 || defaultSize !== void 0) for (const run of runs) switch (run.kind) {
|
|
919
|
+
case "text":
|
|
920
|
+
case "tab":
|
|
921
|
+
case "renderedPageBreak":
|
|
922
|
+
case "field":
|
|
923
|
+
case "math":
|
|
924
|
+
if (defaultFont !== void 0) run.fontFamily ??= defaultFont;
|
|
925
|
+
if (defaultSize !== void 0) run.fontSize ??= defaultSize;
|
|
926
|
+
break;
|
|
927
|
+
case "image":
|
|
928
|
+
case "lineBreak": break;
|
|
929
|
+
default:
|
|
930
|
+
}
|
|
888
931
|
return runs;
|
|
889
932
|
}
|
|
890
933
|
function toListMarkerRevision(kind, info) {
|
|
@@ -904,13 +947,7 @@ function isRemovedNumberingChange(change) {
|
|
|
904
947
|
}
|
|
905
948
|
function isChangedNumberingChange(currentNumPr, change) {
|
|
906
949
|
const previousFormatting = change.previousFormatting;
|
|
907
|
-
return previousFormatting != null && Object.hasOwn(previousFormatting, "numPr") && isListNumPr(previousFormatting.numPr) && !
|
|
908
|
-
}
|
|
909
|
-
function areListNumPrEqual(left, right) {
|
|
910
|
-
return left.numId === right.numId && left.ilvl === right.ilvl;
|
|
911
|
-
}
|
|
912
|
-
function isListNumPr(value) {
|
|
913
|
-
return value !== void 0 && value !== null;
|
|
950
|
+
return previousFormatting != null && Object.hasOwn(previousFormatting, "numPr") && isListNumPr(previousFormatting.numPr) && !sameStatedParagraphNumbering(previousFormatting.numPr, currentNumPr);
|
|
914
951
|
}
|
|
915
952
|
function toPreviousListAttrs(previousFormatting) {
|
|
916
953
|
const attrs = {};
|
|
@@ -971,7 +1008,20 @@ function applyDeletedListMarkerAttrs(attrs, change, listCounterState, theme, fon
|
|
|
971
1008
|
if (previousListAttrs.listMarkerAlignment) attrs.listMarkerAlignment = previousListAttrs.listMarkerAlignment;
|
|
972
1009
|
if (previousListAttrs.listMarkerSuffix) attrs.listMarkerSuffix = previousListAttrs.listMarkerSuffix;
|
|
973
1010
|
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Every `ST_Jc` member, and the flow alignment that paints it.
|
|
1013
|
+
*
|
|
1014
|
+
* `start` and `end` stay unresolved here: they name an edge of the writing
|
|
1015
|
+
* direction, not a side of the page, so which of `left` and `right` paints
|
|
1016
|
+
* them depends on the paragraph's direction. `numTab` has no flow alignment at
|
|
1017
|
+
* all — it aligns the paragraph to the list number's tab stop, which the flow
|
|
1018
|
+
* engine does not model — so it falls back to the start edge, which is where a
|
|
1019
|
+
* numbered paragraph without one sits.
|
|
1020
|
+
*/
|
|
974
1021
|
const FLOW_ALIGNMENT_BY_PARAGRAPH_ALIGNMENT = {
|
|
1022
|
+
start: "start",
|
|
1023
|
+
end: "end",
|
|
1024
|
+
numTab: "start",
|
|
975
1025
|
left: "left",
|
|
976
1026
|
center: "center",
|
|
977
1027
|
right: "right",
|
|
@@ -982,10 +1032,19 @@ const FLOW_ALIGNMENT_BY_PARAGRAPH_ALIGNMENT = {
|
|
|
982
1032
|
lowKashida: "justify",
|
|
983
1033
|
thaiDistribute: "justify"
|
|
984
1034
|
};
|
|
1035
|
+
/** Resolve a logical alignment against the direction the paragraph runs in. */
|
|
1036
|
+
const resolveFlowAlignment = (alignment, rightToLeft) => {
|
|
1037
|
+
const flow = FLOW_ALIGNMENT_BY_PARAGRAPH_ALIGNMENT[alignment];
|
|
1038
|
+
switch (flow) {
|
|
1039
|
+
case "start": return rightToLeft ? "right" : "left";
|
|
1040
|
+
case "end": return rightToLeft ? "left" : "right";
|
|
1041
|
+
default: return flow;
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
985
1044
|
function convertParagraphAttrs(pmAttrs, { theme, fontAlternates, listCounterStreams, defaultTabStopTwips }) {
|
|
986
1045
|
const attrs = {};
|
|
987
|
-
if (pmAttrs.alignment) attrs.alignment =
|
|
988
|
-
if (
|
|
1046
|
+
if (pmAttrs.alignment) attrs.alignment = resolveFlowAlignment(pmAttrs.alignment, directionIsRtl(pmAttrs.direction));
|
|
1047
|
+
if (pmAttrs.outlineLevel !== void 0) attrs.outlineLevel = pmAttrs.outlineLevel;
|
|
989
1048
|
const spaceBefore = pmAttrs.spaceBefore;
|
|
990
1049
|
const spaceAfter = pmAttrs.spaceAfter;
|
|
991
1050
|
const lineSpacing = pmAttrs.lineSpacing;
|
|
@@ -1022,8 +1081,8 @@ function convertParagraphAttrs(pmAttrs, { theme, fontAlternates, listCounterStre
|
|
|
1022
1081
|
let indentLeft = typeof pmAttrs.indentLeft === "number" ? pmAttrs.indentLeft : void 0;
|
|
1023
1082
|
let indentFirstLine = typeof pmAttrs.indentFirstLine === "number" ? pmAttrs.indentFirstLine : void 0;
|
|
1024
1083
|
let hangingIndent = pmAttrs.hangingIndent;
|
|
1025
|
-
if (pmAttrs.numPr
|
|
1026
|
-
indentLeft = ((pmAttrs.numPr
|
|
1084
|
+
if (paragraphNumberingReferenceId(pmAttrs.numPr) !== void 0 && indentLeft === void 0 && indentFirstLine === void 0) {
|
|
1085
|
+
indentLeft = ((paragraphNumberingLevel(pmAttrs.numPr) ?? 0) + 1) * 720;
|
|
1027
1086
|
if (indentFirstLine === void 0) {
|
|
1028
1087
|
indentFirstLine = -360;
|
|
1029
1088
|
hangingIndent = true;
|
|
@@ -1057,14 +1116,17 @@ function convertParagraphAttrs(pmAttrs, { theme, fontAlternates, listCounterStre
|
|
|
1057
1116
|
}
|
|
1058
1117
|
const shadingRgb = pmAttrs.shading?.fill?.rgb?.toUpperCase();
|
|
1059
1118
|
if (shadingRgb && shadingRgb !== "FFFFFF" && shadingRgb !== "FFFFFE") attrs.shading = `#${pmAttrs.shading?.fill?.rgb}`;
|
|
1060
|
-
if (pmAttrs.tabs && pmAttrs.tabs.length > 0)
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1119
|
+
if (pmAttrs.tabs && pmAttrs.tabs.length > 0) {
|
|
1120
|
+
const rightToLeft = directionIsRtl(pmAttrs.direction);
|
|
1121
|
+
attrs.tabs = pmAttrs.tabs.map((tab) => {
|
|
1122
|
+
const tabStop = {
|
|
1123
|
+
val: resolveTabAlignment(tab.alignment, rightToLeft),
|
|
1124
|
+
pos: tab.position
|
|
1125
|
+
};
|
|
1126
|
+
if (tab.leader) tabStop.leader = tab.leader;
|
|
1127
|
+
return tabStop;
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1068
1130
|
if (pmAttrs.pageBreakBefore) attrs.pageBreakBefore = true;
|
|
1069
1131
|
if (pmAttrs.kinsoku !== void 0 && pmAttrs.kinsoku !== null) attrs.kinsoku = pmAttrs.kinsoku;
|
|
1070
1132
|
if (pmAttrs.overflowPunctuation !== void 0 && pmAttrs.overflowPunctuation !== null) attrs.overflowPunctuation = pmAttrs.overflowPunctuation;
|
|
@@ -1081,10 +1143,7 @@ function convertParagraphAttrs(pmAttrs, { theme, fontAlternates, listCounterStre
|
|
|
1081
1143
|
const propertyChanges = pmAttrs._propertyChanges ?? [];
|
|
1082
1144
|
let changedNumberingChange;
|
|
1083
1145
|
if (pmAttrs.numPr) {
|
|
1084
|
-
|
|
1085
|
-
if (pmAttrs.numPr.numId !== void 0) numPr.numId = pmAttrs.numPr.numId;
|
|
1086
|
-
if (pmAttrs.numPr.ilvl !== void 0) numPr.ilvl = pmAttrs.numPr.ilvl;
|
|
1087
|
-
attrs.numPr = numPr;
|
|
1146
|
+
attrs.numPr = pmAttrs.numPr;
|
|
1088
1147
|
if (pmAttrs.pPrMark?.kind === "del") attrs.listMarkerRevision = toListMarkerRevision("del", pmAttrs.pPrMark.info);
|
|
1089
1148
|
else if (pmAttrs.pPrMark?.kind === "ins") attrs.listMarkerRevision = toListMarkerRevision("ins", pmAttrs.pPrMark.info);
|
|
1090
1149
|
else {
|
|
@@ -1131,20 +1190,35 @@ function convertParagraphAttrs(pmAttrs, { theme, fontAlternates, listCounterStre
|
|
|
1131
1190
|
return attrs;
|
|
1132
1191
|
}
|
|
1133
1192
|
/**
|
|
1134
|
-
*
|
|
1193
|
+
* Every `ST_TabJc` member, and the layout engine's name for it.
|
|
1194
|
+
*
|
|
1195
|
+
* The engine's `start` and `end` are its names for the left and right edges of
|
|
1196
|
+
* the line, not direction-aware ones, so `w:tab w:val="left"` maps to `start`
|
|
1197
|
+
* unconditionally. `ST_TabJc`'s own `start` and `end` *are* direction-aware
|
|
1198
|
+
* and stay unresolved here, under names the engine has no member for.
|
|
1199
|
+
* `num`, the tab a numbered paragraph's text hangs from, has no engine
|
|
1200
|
+
* alignment of its own and falls back to the line's start edge.
|
|
1135
1201
|
*/
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1202
|
+
const TAB_ALIGNMENT_BY_TAB_STOP_ALIGNMENT = {
|
|
1203
|
+
start: "logicalStart",
|
|
1204
|
+
end: "logicalEnd",
|
|
1205
|
+
num: "logicalStart",
|
|
1206
|
+
left: "start",
|
|
1207
|
+
right: "end",
|
|
1208
|
+
center: "center",
|
|
1209
|
+
decimal: "decimal",
|
|
1210
|
+
bar: "bar",
|
|
1211
|
+
clear: "clear"
|
|
1212
|
+
};
|
|
1213
|
+
/** Resolve a logical tab alignment against the direction the paragraph runs in. */
|
|
1214
|
+
const resolveTabAlignment = (alignment, rightToLeft) => {
|
|
1215
|
+
const mapped = TAB_ALIGNMENT_BY_TAB_STOP_ALIGNMENT[alignment];
|
|
1216
|
+
switch (mapped) {
|
|
1217
|
+
case "logicalStart": return rightToLeft ? "end" : "start";
|
|
1218
|
+
case "logicalEnd": return rightToLeft ? "start" : "end";
|
|
1219
|
+
default: return mapped;
|
|
1146
1220
|
}
|
|
1147
|
-
}
|
|
1221
|
+
};
|
|
1148
1222
|
/**
|
|
1149
1223
|
* Convert a paragraph node to a ParagraphBlock.
|
|
1150
1224
|
*/
|
|
@@ -1166,6 +1240,8 @@ function convertParagraph(node, startPos, options, pageBreaks) {
|
|
|
1166
1240
|
listCounterStreams: options.listCounterStreams,
|
|
1167
1241
|
defaultTabStopTwips: options.defaultTabStopTwips
|
|
1168
1242
|
});
|
|
1243
|
+
if (options.defaultFont !== void 0) attrs.defaultFontFamily ??= options.defaultFont;
|
|
1244
|
+
if (options.defaultSize !== void 0) attrs.defaultFontSize ??= options.defaultSize;
|
|
1169
1245
|
if (options.lineBreakRules) attrs.lineBreakRules = options.lineBreakRules;
|
|
1170
1246
|
if (options.justificationCompatibility) attrs.justificationCompatibility = options.justificationCompatibility;
|
|
1171
1247
|
if (options.automaticHyphenation) attrs.automaticHyphenation = options.automaticHyphenation;
|
|
@@ -1370,7 +1446,7 @@ function suppressFinalParagraphInRepeatedEmptySuffix(blocks) {
|
|
|
1370
1446
|
}
|
|
1371
1447
|
function reserveLeadingEmptyOutlineHeight(blocks) {
|
|
1372
1448
|
const firstBlock = blocks.at(0);
|
|
1373
|
-
if (firstBlock?.kind !== "paragraph" || firstBlock.runs.length !== 0 || firstBlock.attrs?.outlineLevel !== 0) return;
|
|
1449
|
+
if (firstBlock?.kind !== "paragraph" || firstBlock.runs.length !== 0 || headingLevelOf(firstBlock.attrs?.outlineLevel) !== 0) return;
|
|
1374
1450
|
firstBlock.attrs = {
|
|
1375
1451
|
...firstBlock.attrs,
|
|
1376
1452
|
reserveEmptyOutlineHeight: true
|
|
@@ -1383,31 +1459,14 @@ function reserveLeadingEmptyOutlineHeight(blocks) {
|
|
|
1383
1459
|
function borderWidthToPixels(eighthsOfPoint) {
|
|
1384
1460
|
return pointsToPixels(eighthsOfPoint / 8);
|
|
1385
1461
|
}
|
|
1386
|
-
const OOXML_TO_CSS_BORDER = {
|
|
1387
|
-
single: "solid",
|
|
1388
|
-
double: "double",
|
|
1389
|
-
dotted: "dotted",
|
|
1390
|
-
dashed: "dashed",
|
|
1391
|
-
thick: "solid",
|
|
1392
|
-
dashSmallGap: "dashed",
|
|
1393
|
-
dotDash: "dashed",
|
|
1394
|
-
dotDotDash: "dotted",
|
|
1395
|
-
triple: "double",
|
|
1396
|
-
wave: "solid",
|
|
1397
|
-
doubleWave: "double",
|
|
1398
|
-
threeDEmboss: "ridge",
|
|
1399
|
-
threeDEngrave: "groove",
|
|
1400
|
-
outset: "outset",
|
|
1401
|
-
inset: "inset"
|
|
1402
|
-
};
|
|
1403
1462
|
/**
|
|
1404
1463
|
* Convert an OOXML BorderSpec to a layout-engine BorderStyle.
|
|
1405
1464
|
* Shared by paragraph borders, cell borders, and header/footer borders.
|
|
1406
1465
|
*/
|
|
1407
1466
|
function convertBorderSpecToLayout(border, theme) {
|
|
1408
|
-
if (
|
|
1467
|
+
if (border.style === void 0 || statesNoBorder(border.style)) return;
|
|
1409
1468
|
const result = {
|
|
1410
|
-
style:
|
|
1469
|
+
style: cssBorderStyle(border.style),
|
|
1411
1470
|
width: border.size === void 0 ? 1 : borderWidthToPixels(border.size),
|
|
1412
1471
|
color: border.color ? resolveColor(border.color, theme) : "#000000"
|
|
1413
1472
|
};
|
|
@@ -1507,17 +1566,34 @@ function convertTableCell(node, startPos, options, tableCellMargins) {
|
|
|
1507
1566
|
};
|
|
1508
1567
|
}
|
|
1509
1568
|
/**
|
|
1510
|
-
*
|
|
1569
|
+
* Resolve an `ST_JcTable` placement to the flow engine's logical alignment.
|
|
1570
|
+
*
|
|
1571
|
+
* `start` and `end` name an edge of the writing direction, not a side of the
|
|
1572
|
+
* page, the same distinction `ST_Jc` draws for a paragraph. The flow engine
|
|
1573
|
+
* applies `w:bidiVisual` when it resolves that logical alignment to a physical
|
|
1574
|
+
* side, so the bridge must not mirror it first.
|
|
1511
1575
|
*/
|
|
1512
|
-
|
|
1576
|
+
const resolveTablePlacement = (placement) => {
|
|
1577
|
+
switch (placement) {
|
|
1578
|
+
case "start": return "left";
|
|
1579
|
+
case "end": return "right";
|
|
1580
|
+
case "left":
|
|
1581
|
+
case "center":
|
|
1582
|
+
case "right": return placement;
|
|
1583
|
+
default: return placement;
|
|
1584
|
+
}
|
|
1585
|
+
};
|
|
1586
|
+
function convertTableRow(node, startPos, options, { cellMargins }) {
|
|
1513
1587
|
const cells = [];
|
|
1514
1588
|
let offset = startPos + 1;
|
|
1515
1589
|
let breakBefore;
|
|
1516
1590
|
node.forEach((child) => {
|
|
1517
1591
|
if (child.type.name === "tableCell" || child.type.name === "tableHeader") {
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1592
|
+
if (!expectTableCellAttrs(child)._omittedGridSlot) {
|
|
1593
|
+
const converted = convertTableCell(child, offset, options, cellMargins);
|
|
1594
|
+
if (converted.breakBefore !== void 0) breakBefore = converted.breakBefore;
|
|
1595
|
+
cells.push(converted.cell);
|
|
1596
|
+
}
|
|
1521
1597
|
}
|
|
1522
1598
|
offset += child.nodeSize;
|
|
1523
1599
|
});
|
|
@@ -1535,7 +1611,7 @@ function convertTableRow(node, startPos, options, tableCellMargins) {
|
|
|
1535
1611
|
if (breakBefore !== void 0) row.breakBefore = breakBefore;
|
|
1536
1612
|
if (attrs.hidden) row.hidden = attrs.hidden;
|
|
1537
1613
|
const effectiveJustification = attrs._originalFormatting?.justification ?? attrs._resolvedJustification;
|
|
1538
|
-
if (effectiveJustification) row.justification = effectiveJustification;
|
|
1614
|
+
if (effectiveJustification) row.justification = resolveTablePlacement(effectiveJustification);
|
|
1539
1615
|
return row;
|
|
1540
1616
|
}
|
|
1541
1617
|
/**
|
|
@@ -1545,9 +1621,10 @@ function convertTable(node, startPos, options) {
|
|
|
1545
1621
|
const rows = [];
|
|
1546
1622
|
let offset = startPos + 1;
|
|
1547
1623
|
const attrs = expectTableAttrs(node);
|
|
1548
|
-
const
|
|
1624
|
+
const rightToLeft = (attrs._resolvedBidi ?? attrs._originalFormatting?.bidi) === true;
|
|
1625
|
+
const rowContext = { ...attrs.cellMargins === void 0 ? {} : { cellMargins: attrs.cellMargins } };
|
|
1549
1626
|
node.forEach((child) => {
|
|
1550
|
-
if (child.type.name === "tableRow") rows.push(convertTableRow(child, offset, options,
|
|
1627
|
+
if (child.type.name === "tableRow") rows.push(convertTableRow(child, offset, options, rowContext));
|
|
1551
1628
|
offset += child.nodeSize;
|
|
1552
1629
|
});
|
|
1553
1630
|
let columnWidths = attrs.columnWidths?.map(twipsToPixels);
|
|
@@ -1557,7 +1634,8 @@ function convertTable(node, startPos, options) {
|
|
|
1557
1634
|
const cellWidths = rows[0].cells.map((cell) => cell.width);
|
|
1558
1635
|
if (cellWidths.every((w) => w !== void 0 && w > 0)) columnWidths = cellWidths;
|
|
1559
1636
|
}
|
|
1560
|
-
const
|
|
1637
|
+
const authoredJustification = attrs.justification ?? attrs._resolvedJustification;
|
|
1638
|
+
const justification = authoredJustification === void 0 ? void 0 : resolveTablePlacement(authoredJustification);
|
|
1561
1639
|
const originalFormatting = attrs._originalFormatting;
|
|
1562
1640
|
const effectiveIndent = attrs._resolvedIndent ?? originalFormatting?.indent;
|
|
1563
1641
|
const indentPx = effectiveIndent?.value !== void 0 && effectiveIndent?.type === "dxa" ? twipsToPixels(effectiveIndent.value) : void 0;
|
|
@@ -1593,7 +1671,7 @@ function convertTable(node, startPos, options) {
|
|
|
1593
1671
|
if (indentPx !== void 0) tableBlock.indent = indentPx;
|
|
1594
1672
|
if (options.tableIndentCompatibility && !dropsAuthoredIndent) tableBlock.indentCompatibility = options.tableIndentCompatibility;
|
|
1595
1673
|
if (floatingPx) tableBlock.floating = floatingPx;
|
|
1596
|
-
if (
|
|
1674
|
+
if (rightToLeft) tableBlock.bidi = true;
|
|
1597
1675
|
return tableBlock;
|
|
1598
1676
|
}
|
|
1599
1677
|
/**
|
|
@@ -1601,7 +1679,7 @@ function convertTable(node, startPos, options) {
|
|
|
1601
1679
|
*/
|
|
1602
1680
|
function convertImage(node, startPos, pageContentHeight) {
|
|
1603
1681
|
const attrs = expectImageAttrs(node);
|
|
1604
|
-
if (!hasPaintableImageSource(attrs
|
|
1682
|
+
if (!hasPaintableImageSource(attrs) && !hasRelationshipBackedImageBox(attrs)) return;
|
|
1605
1683
|
const wrapType = attrs.wrapType;
|
|
1606
1684
|
const shouldAnchor = wrapType === "behind" || wrapType === "inFront";
|
|
1607
1685
|
const constrained = constrainImageToPage(attrs.width ?? 100, attrs.height ?? 100, pageContentHeight);
|
|
@@ -1609,6 +1687,7 @@ function convertImage(node, startPos, pageContentHeight) {
|
|
|
1609
1687
|
kind: "image",
|
|
1610
1688
|
id: nextBlockId(),
|
|
1611
1689
|
src: attrs.src,
|
|
1690
|
+
...attrs.preview ? { preview: attrs.preview } : {},
|
|
1612
1691
|
width: constrained.width,
|
|
1613
1692
|
height: constrained.height,
|
|
1614
1693
|
pmStart: startPos,
|
|
@@ -1635,7 +1714,8 @@ function convertImage(node, startPos, pageContentHeight) {
|
|
|
1635
1714
|
if (attrs.cropLeft != null) imgBlock.cropLeft = attrs.cropLeft;
|
|
1636
1715
|
if (attrs.borderWidth != null) imgBlock.borderWidth = attrs.borderWidth;
|
|
1637
1716
|
if (attrs.borderColor) imgBlock.borderColor = attrs.borderColor;
|
|
1638
|
-
|
|
1717
|
+
const imageBorderStyle = cssBorderStyleOf(attrs.borderStyle);
|
|
1718
|
+
if (imageBorderStyle) imgBlock.borderStyle = imageBorderStyle;
|
|
1639
1719
|
return imgBlock;
|
|
1640
1720
|
}
|
|
1641
1721
|
/** Convert a textBox PM node to a TextBoxBlock. */
|
|
@@ -1744,15 +1824,13 @@ function coalesceTrailingPageBreakBeforeContinuousSection(blocks, splitPageBreak
|
|
|
1744
1824
|
}
|
|
1745
1825
|
return result;
|
|
1746
1826
|
}
|
|
1827
|
+
/**
|
|
1828
|
+
* The last section's start mode, off a document attribute the schema types as
|
|
1829
|
+
* `any`. `parseSectionBreakType` owns the enumeration, so a member added to
|
|
1830
|
+
* `ST_SectionMark` reaches the paginator instead of being dropped here.
|
|
1831
|
+
*/
|
|
1747
1832
|
function readFinalSectionStart(doc) {
|
|
1748
|
-
|
|
1749
|
-
switch (sectionStart) {
|
|
1750
|
-
case "continuous":
|
|
1751
|
-
case "nextPage":
|
|
1752
|
-
case "oddPage":
|
|
1753
|
-
case "evenPage": return sectionStart;
|
|
1754
|
-
default: return;
|
|
1755
|
-
}
|
|
1833
|
+
return parseSectionBreakType(doc.attrs["_finalSectionStart"]) ?? void 0;
|
|
1756
1834
|
}
|
|
1757
1835
|
/**
|
|
1758
1836
|
* Convert a ProseMirror document to FlowBlock array.
|
|
@@ -1794,8 +1872,6 @@ function toFlowBlocks(doc, options = {}) {
|
|
|
1794
1872
|
const { firstPageBreakRunPosition } = buildPageBreakRunDescendantIndex(doc);
|
|
1795
1873
|
const opts = {
|
|
1796
1874
|
...options,
|
|
1797
|
-
defaultFont: options.defaultFont ?? DEFAULT_FONT,
|
|
1798
|
-
defaultSize: options.defaultSize ?? DEFAULT_SIZE,
|
|
1799
1875
|
listCounters: listCounterState.counters,
|
|
1800
1876
|
listAbstractCounters: listCounterState.abstractCounters,
|
|
1801
1877
|
listSeenNumIds: listCounterState.seenLevels,
|
|
@@ -1855,7 +1931,7 @@ function toFlowBlocks(doc, options = {}) {
|
|
|
1855
1931
|
const child = parent.child(index);
|
|
1856
1932
|
const next = index + 1 < parent.childCount ? parent.child(index + 1) : void 0;
|
|
1857
1933
|
const paragraphAttrs = child.type.name === "paragraph" ? expectParagraphAttrs(child) : void 0;
|
|
1858
|
-
if (paragraphAttrs && next?.type.name === "pageBreak" && paragraphAttrs._trailingPageBreak === true &&
|
|
1934
|
+
if (paragraphAttrs && next?.type.name === "pageBreak" && paragraphAttrs._trailingPageBreak === true && paragraphAttrs._sectionProperties !== void 0) {
|
|
1859
1935
|
trailingPageBreakSectionPositions.add(childStart);
|
|
1860
1936
|
consumedPageBreakPositions.add(childStart + child.nodeSize);
|
|
1861
1937
|
}
|
|
@@ -1924,7 +2000,7 @@ function toFlowBlocks(doc, options = {}) {
|
|
|
1924
2000
|
case "paragraph": {
|
|
1925
2001
|
const pmAttrs = expectParagraphAttrs(node);
|
|
1926
2002
|
const secProps = pmAttrs._sectionProperties;
|
|
1927
|
-
const hasSectionBreak = secProps !== void 0
|
|
2003
|
+
const hasSectionBreak = secProps !== void 0;
|
|
1928
2004
|
const hasListFormatting = pmAttrs.numPr !== null && pmAttrs.numPr !== void 0 || pmAttrs.listMarker !== null && pmAttrs.listMarker !== void 0;
|
|
1929
2005
|
const firstChild = node.firstChild;
|
|
1930
2006
|
const startsWithColumnBreak = firstChild?.type.name === "hardBreak" && expectHardBreakAttrs(firstChild).breakType === "column";
|
|
@@ -1987,7 +2063,7 @@ function toFlowBlocks(doc, options = {}) {
|
|
|
1987
2063
|
kind: "sectionBreak",
|
|
1988
2064
|
id: nextBlockId()
|
|
1989
2065
|
};
|
|
1990
|
-
const breakType = secProps?.sectionStart
|
|
2066
|
+
const breakType = secProps?.sectionStart;
|
|
1991
2067
|
if (breakType) sectionBreak.type = breakType;
|
|
1992
2068
|
if (secProps) {
|
|
1993
2069
|
sectionBreak.pageNumbering = getPageNumbering(secProps);
|
|
@@ -2158,4 +2234,4 @@ function mergeRunInParagraphs(blocks) {
|
|
|
2158
2234
|
return out;
|
|
2159
2235
|
}
|
|
2160
2236
|
//#endregion
|
|
2161
|
-
export { convertBorderSpecToLayout, formatCounter, resetBlockIdCounter, resolveListTemplate, toFlowBlocks };
|
|
2237
|
+
export { WORD_UNSPECIFIED_FONT_SIZE, convertBorderSpecToLayout, formatCounter, resetBlockIdCounter, resolveListTemplate, toFlowBlocks };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockId, BorderStyle, CellBorderSpec, CellBorders, ColumnBreakBlock, ColumnBreakMeasure, ColumnLayout, DEFAULT_TEXTBOX_MARGINS, DEFAULT_TEXTBOX_WIDTH, DocumentPosition, FOOTNOTE_ENTRY_MARGIN_BOTTOM, FOOTNOTE_FALLBACK_LINE_HEIGHT, FOOTNOTE_SEPARATOR_HEIGHT, FieldRun, FloatingTablePosition, FlowBlock, FootnoteContent, Fragment, FragmentBase, HeaderFooterContent, HeaderFooterContentHeights, HeaderFooterLayout, HitTestResult, HyperlinkInfo, ImageBlock, ImageFragment, ImageMeasure, ImageRun, ImageRunPosition, Layout, LayoutOptions, LineBreakRun, ListMarkerFormatting,
|
|
1
|
+
import { BlockId, BorderStyle, CellBorderSpec, CellBorders, ColumnBreakBlock, ColumnBreakMeasure, ColumnLayout, DEFAULT_TEXTBOX_MARGINS, DEFAULT_TEXTBOX_WIDTH, DocumentPosition, FOOTNOTE_ENTRY_MARGIN_BOTTOM, FOOTNOTE_FALLBACK_LINE_HEIGHT, FOOTNOTE_SEPARATOR_HEIGHT, FieldRun, FloatingTablePosition, FlowBlock, FootnoteContent, Fragment, FragmentBase, HeaderFooterContent, HeaderFooterContentHeights, HeaderFooterLayout, HitTestResult, HyperlinkInfo, ImageBlock, ImageFragment, ImageMeasure, ImageRun, ImageRunPosition, Layout, LayoutOptions, LineBreakRun, ListMarkerFormatting, MathRun, Measure, MeasuredLine, Page, PageBreakBlock, PageBreakMeasure, PageHeaderFooterRefs, PageMargins, ParagraphAttrs, ParagraphBlock, ParagraphBorders, ParagraphFragment, ParagraphIndent, ParagraphMeasure, ParagraphSpacing, RenderedPageBreakRun, Run, RunFormatting, SdtGroup, SectionBreakBlock, SectionBreakMeasure, SectionPageNumbering, TabAlignment, TabRun, TabStop, TableBlock, TableCell, TableCellMeasure, TableFragment, TableMeasure, TableRow, TableRowMeasure, TextBoxBlock, TextBoxFlowAttrs, TextBoxFragment, TextBoxMeasure, TextRun, floatingTextBoxReservesBand, floatingTextBoxWrapsText, getTableRowLeadingWidth, isFloatingImageRun, isFloatingTextBoxBlock, isListNumPr, isTextWrappingFloatingImageRun, resolveTableCellPadding, resolveTableWidthPx, tableColumnsArePinned } from "./types.js";
|
|
2
2
|
import { PageState, Paginator, PaginatorOptions, createPaginator } from "./paginator.js";
|
|
3
3
|
import { KeepNextChain, calculateChainHeight, computeKeepNextChains, getMidChainIndices, hasKeepLines, hasPageBreakBefore } from "./keep-together.js";
|
|
4
4
|
import { resolveSectionHeaderFooterRefs } from "./headerFooterRefs.js";
|
|
@@ -42,4 +42,4 @@ declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], option
|
|
|
42
42
|
*/
|
|
43
43
|
declare function getHeaderRowsHeight(measure: TableMeasure, headerRowCount: number): number;
|
|
44
44
|
//#endregion
|
|
45
|
-
export { BlockId, BorderStyle, type BreakDecision, CellBorderSpec, CellBorders, ColumnBreakBlock, ColumnBreakMeasure, ColumnLayout, DEFAULT_TEXTBOX_MARGINS, DEFAULT_TEXTBOX_WIDTH, DocumentPosition, FOOTNOTE_ENTRY_MARGIN_BOTTOM, FOOTNOTE_FALLBACK_LINE_HEIGHT, FOOTNOTE_SEPARATOR_HEIGHT, FieldRun, FloatingTablePosition, FlowBlock, FootnoteContent, Fragment, FragmentBase, HeaderFooterContent, HeaderFooterContentHeights, HeaderFooterLayout, HitTestResult, HyperlinkInfo, ImageBlock, ImageFragment, ImageMeasure, ImageRun, ImageRunPosition, type KeepNextChain, Layout, LayoutOptions, LineBreakRun, ListMarkerFormatting,
|
|
45
|
+
export { BlockId, BorderStyle, type BreakDecision, CellBorderSpec, CellBorders, ColumnBreakBlock, ColumnBreakMeasure, ColumnLayout, DEFAULT_TEXTBOX_MARGINS, DEFAULT_TEXTBOX_WIDTH, DocumentPosition, FOOTNOTE_ENTRY_MARGIN_BOTTOM, FOOTNOTE_FALLBACK_LINE_HEIGHT, FOOTNOTE_SEPARATOR_HEIGHT, FieldRun, FloatingTablePosition, FlowBlock, FootnoteContent, Fragment, FragmentBase, HeaderFooterContent, HeaderFooterContentHeights, HeaderFooterLayout, HitTestResult, HyperlinkInfo, ImageBlock, ImageFragment, ImageMeasure, ImageRun, ImageRunPosition, type KeepNextChain, Layout, LayoutOptions, LineBreakRun, ListMarkerFormatting, MathRun, Measure, MeasuredLine, Page, PageBreakBlock, PageBreakMeasure, PageHeaderFooterRefs, PageMargins, type PageState, type Paginator, type PaginatorOptions, ParagraphAttrs, ParagraphBlock, ParagraphBorders, ParagraphFragment, ParagraphIndent, ParagraphMeasure, ParagraphSpacing, RenderedPageBreakRun, Run, RunFormatting, SdtGroup, SectionBreakBlock, SectionBreakMeasure, SectionLayoutConfig, SectionPageNumbering, type SectionState, TabAlignment, TabRun, TabStop, TableBlock, TableCell, TableCellMeasure, TableFragment, TableMeasure, TableRow, TableRowMeasure, TextBoxBlock, TextBoxFlowAttrs, TextBoxFragment, TextBoxMeasure, TextRun, applyContextualSpacing, applyPendingToActive, assertExhaustiveFlowBlock, calculateChainHeight, collectSectionConfigs, computeKeepNextChains, createInitialSectionState, createPaginator, findPageIndexContainingPmPos, floatingTextBoxReservesBand, floatingTextBoxWrapsText, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, getHeaderRowsHeight, getMidChainIndices, getTableRowLeadingWidth, hasKeepLines, hasPageBreakBefore, isFloatingImageRun, isFloatingTextBoxBlock, isListNumPr, isTextWrappingFloatingImageRun, layoutDocument, resolveSectionHeaderFooterRefs, resolveTableCellPadding, resolveTableWidthPx, scheduleSectionBreak, tableColumnsArePinned };
|