@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
|
@@ -1,18 +1,33 @@
|
|
|
1
|
+
import { serializePreservedAttributes } from "../attributeRemainder.js";
|
|
2
|
+
import { serializeWithPreservedChildren } from "../containerChildren.js";
|
|
1
3
|
import { serializePartElement } from "./partNamespaces.js";
|
|
2
4
|
import { escapeXmlAttribute } from "@stll/docx-core";
|
|
3
5
|
//#region src/docx/serializer/fontTableSerializer.ts
|
|
4
6
|
const serializeFontTableXml = (fontTable) => "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + serializePartElement({
|
|
5
7
|
partPath: "word/fontTable.xml",
|
|
6
8
|
rootName: "w:fonts",
|
|
9
|
+
rootAttributes: serializePreservedAttributes([], fontTable.preservedAttributes).join(" "),
|
|
7
10
|
baselinePrefixes: ["w"],
|
|
8
11
|
sourceBindings: void 0,
|
|
9
|
-
body: fontTable.fonts.map(serializeFont).
|
|
12
|
+
body: serializeWithPreservedChildren(fontTable.fonts.map(serializeFont), fontTable.preserved)
|
|
10
13
|
});
|
|
14
|
+
/**
|
|
15
|
+
* One `w:font`, with its children in the order `CT_Font` declares them.
|
|
16
|
+
*
|
|
17
|
+
* The order is what makes the sink's index mean something: a capture recorded
|
|
18
|
+
* after the third field the reader kept goes back after the third field this
|
|
19
|
+
* writes, so unmodelled markup keeps the neighbours it was authored between.
|
|
20
|
+
*/
|
|
11
21
|
const serializeFont = (font) => {
|
|
12
22
|
const parts = [];
|
|
13
23
|
if (font.altName) parts.push(`<w:altName w:val="${escapeXmlAttribute(font.altName)}"/>`);
|
|
14
24
|
if (font.panose1) parts.push(`<w:panose1 w:val="${escapeXmlAttribute(font.panose1)}"/>`);
|
|
15
|
-
if (font.charset)
|
|
25
|
+
if (font.charset) {
|
|
26
|
+
const attributes = [];
|
|
27
|
+
if (font.charset.val !== void 0) attributes.push(`w:val="${escapeXmlAttribute(font.charset.val)}"`);
|
|
28
|
+
if (font.charset.characterSet !== void 0) attributes.push(`w:characterSet="${escapeXmlAttribute(font.charset.characterSet)}"`);
|
|
29
|
+
parts.push(attributes.length === 0 ? "<w:charset/>" : `<w:charset ${attributes.join(" ")}/>`);
|
|
30
|
+
}
|
|
16
31
|
if (font.family) parts.push(`<w:family w:val="${font.family}"/>`);
|
|
17
32
|
if (font.pitch) parts.push(`<w:pitch w:val="${font.pitch}"/>`);
|
|
18
33
|
if (font.sig) {
|
|
@@ -23,7 +38,20 @@ const serializeFont = (font) => {
|
|
|
23
38
|
}
|
|
24
39
|
if (attrs.length > 0) parts.push(`<w:sig ${attrs.join(" ")}/>`);
|
|
25
40
|
}
|
|
26
|
-
|
|
41
|
+
pushEmbed(parts, "embedRegular", font.embedRegular);
|
|
42
|
+
pushEmbed(parts, "embedBold", font.embedBold);
|
|
43
|
+
pushEmbed(parts, "embedItalic", font.embedItalic);
|
|
44
|
+
pushEmbed(parts, "embedBoldItalic", font.embedBoldItalic);
|
|
45
|
+
const attributes = serializePreservedAttributes([`w:name="${escapeXmlAttribute(font.name)}"`], font.preservedAttributes);
|
|
46
|
+
const body = serializeWithPreservedChildren(parts, font.preserved);
|
|
47
|
+
return `<w:font ${attributes.join(" ")}>${body}</w:font>`;
|
|
48
|
+
};
|
|
49
|
+
const pushEmbed = (parts, element, embed) => {
|
|
50
|
+
if (embed === void 0) return;
|
|
51
|
+
const attributes = [`r:id="${escapeXmlAttribute(embed.id)}"`];
|
|
52
|
+
if (embed.fontKey !== void 0) attributes.push(`w:fontKey="${escapeXmlAttribute(embed.fontKey)}"`);
|
|
53
|
+
if (embed.subsetted !== void 0) attributes.push(`w:subsetted="${embed.subsetted ? "1" : "0"}"`);
|
|
54
|
+
parts.push(`<w:${element} ${attributes.join(" ")}/>`);
|
|
27
55
|
};
|
|
28
56
|
//#endregion
|
|
29
57
|
export { serializeFontTableXml };
|
|
@@ -3,6 +3,7 @@ import { isEmptyParagraph } from "../paragraphParser.js";
|
|
|
3
3
|
import { captureVerbatimXml } from "../verbatimCapture.js";
|
|
4
4
|
import { getLocalName, parseXmlDocument } from "../xmlParser.js";
|
|
5
5
|
import { serializeBlockSdt } from "./blockSdtSerializer.js";
|
|
6
|
+
import { serializeBookmarkMarker } from "./markupRangeAttributes.js";
|
|
6
7
|
import { serializeParagraph } from "./paragraphSerializer.js";
|
|
7
8
|
import { serializePartElement } from "./partNamespaces.js";
|
|
8
9
|
import { serializeTable } from "./tableSerializer.js";
|
|
@@ -41,6 +42,8 @@ function serializeBlock(block) {
|
|
|
41
42
|
case "table": return serializeTable(block, serializeParagraph);
|
|
42
43
|
case "blockSdt": return serializeBlockSdt(block, serializeBlock);
|
|
43
44
|
case "preservedBlock": return block.xml;
|
|
45
|
+
case "bookmarkStart":
|
|
46
|
+
case "bookmarkEnd": return serializeBookmarkMarker(block);
|
|
44
47
|
default: return block;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
@@ -2,7 +2,15 @@ import { document_d_exports } from "../../types/document.js";
|
|
|
2
2
|
//#region src/docx/serializer/markupRangeAttributes.d.ts
|
|
3
3
|
declare const markupRangeAttributes: (marker: document_d_exports.MarkupRangeMarker) => string[];
|
|
4
4
|
declare const bookmarkRangeAttributes: (marker: document_d_exports.BookmarkRangeMarker) => string[];
|
|
5
|
+
/**
|
|
6
|
+
* One bookmark marker, wherever it stands.
|
|
7
|
+
*
|
|
8
|
+
* The same element is a paragraph child, a block, a child of `w:tr` and a
|
|
9
|
+
* child of `w:tbl`, so the four serializers share one writer: an attribute
|
|
10
|
+
* added to `CT_Bookmark` reaches every level at once.
|
|
11
|
+
*/
|
|
12
|
+
declare const serializeBookmarkMarker: (marker: document_d_exports.BookmarkStart | document_d_exports.BookmarkEnd) => string;
|
|
5
13
|
/** `w:author` is required, so it is always written; `w:date` only when known. */
|
|
6
14
|
declare const moveBookmarkAttributes: (marker: document_d_exports.MoveBookmarkMarker) => string[];
|
|
7
15
|
//#endregion
|
|
8
|
-
export { bookmarkRangeAttributes, markupRangeAttributes, moveBookmarkAttributes };
|
|
16
|
+
export { bookmarkRangeAttributes, markupRangeAttributes, moveBookmarkAttributes, serializeBookmarkMarker };
|
|
@@ -13,6 +13,14 @@ const bookmarkRangeAttributes = (marker) => {
|
|
|
13
13
|
attributes.push(attribute("w:name", marker.name));
|
|
14
14
|
return attributes;
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* One bookmark marker, wherever it stands.
|
|
18
|
+
*
|
|
19
|
+
* The same element is a paragraph child, a block, a child of `w:tr` and a
|
|
20
|
+
* child of `w:tbl`, so the four serializers share one writer: an attribute
|
|
21
|
+
* added to `CT_Bookmark` reaches every level at once.
|
|
22
|
+
*/
|
|
23
|
+
const serializeBookmarkMarker = (marker) => marker.type === "bookmarkStart" ? `<w:bookmarkStart ${bookmarkRangeAttributes(marker).join(" ")}/>` : `<w:bookmarkEnd ${markupRangeAttributes(marker).join(" ")}/>`;
|
|
16
24
|
/** `w:author` is required, so it is always written; `w:date` only when known. */
|
|
17
25
|
const moveBookmarkAttributes = (marker) => {
|
|
18
26
|
const attributes = bookmarkRangeAttributes(marker);
|
|
@@ -21,4 +29,4 @@ const moveBookmarkAttributes = (marker) => {
|
|
|
21
29
|
return attributes;
|
|
22
30
|
};
|
|
23
31
|
//#endregion
|
|
24
|
-
export { bookmarkRangeAttributes, markupRangeAttributes, moveBookmarkAttributes };
|
|
32
|
+
export { bookmarkRangeAttributes, markupRangeAttributes, moveBookmarkAttributes, serializeBookmarkMarker };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { serializeBlockSdt } from "./blockSdtSerializer.js";
|
|
2
|
+
import { serializeBookmarkMarker } from "./markupRangeAttributes.js";
|
|
2
3
|
import { serializeParagraph } from "./paragraphSerializer.js";
|
|
3
4
|
import { serializePartElement } from "./partNamespaces.js";
|
|
4
5
|
import { serializeTable } from "./tableSerializer.js";
|
|
@@ -43,6 +44,8 @@ function serializeBlock(block) {
|
|
|
43
44
|
case "table": return serializeTable(block, serializeParagraph);
|
|
44
45
|
case "blockSdt": return serializeBlockSdt(block, serializeBlock);
|
|
45
46
|
case "preservedBlock": return block.xml;
|
|
47
|
+
case "bookmarkStart":
|
|
48
|
+
case "bookmarkEnd": return serializeBookmarkMarker(block);
|
|
46
49
|
default: return block;
|
|
47
50
|
}
|
|
48
51
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { document_d_exports } from "../../types/document.js";
|
|
2
2
|
//#region src/docx/serializer/numberingSerializer.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Serialize {@link NumberingDefinitions} to a complete `word/numbering.xml`
|
|
5
|
-
* string. `w:abstractNum` elements precede `w:num` elements as ECMA-376 §17.9
|
|
6
|
-
* requires. See the module note: this whole-part output is used only for
|
|
7
|
-
* change detection and per-definition splicing, never to overwrite the part.
|
|
8
|
-
*/
|
|
3
|
+
/** Serialize a complete `word/numbering.xml` part. */
|
|
9
4
|
declare function serializeNumberingXml(numbering: document_d_exports.NumberingDefinitions): string;
|
|
10
5
|
//#endregion
|
|
11
6
|
export { serializeNumberingXml };
|
|
@@ -1,99 +1,101 @@
|
|
|
1
|
+
import { serializeParagraphPropertySet } from "../../internal/paragraphFormattingSerialization.js";
|
|
2
|
+
import { serializePreservedAttributes } from "../attributeRemainder.js";
|
|
3
|
+
import { customNumberFormatOf } from "../numberingParser.js";
|
|
1
4
|
import { serializePartElement } from "./partNamespaces.js";
|
|
2
5
|
import { serializeTextFormatting } from "./textFormattingSerializer.js";
|
|
3
6
|
import { intAttr } from "./xmlUtils.js";
|
|
4
|
-
import { escapeXmlAttribute } from "@stll/docx-core";
|
|
7
|
+
import { escapeXmlAttribute, serializeOnOffElement } from "@stll/docx-core";
|
|
8
|
+
import { serializeSequenceChildren } from "@stll/docx-core/schema";
|
|
5
9
|
//#region src/docx/serializer/numberingSerializer.ts
|
|
6
|
-
/**
|
|
7
|
-
* Serialize a level's paragraph properties — the modeled subset is indentation
|
|
8
|
-
* plus tab stops (see `parseLevelParagraphProps`). Returns "" when neither is
|
|
9
|
-
* present so an empty `<w:pPr/>` is not emitted.
|
|
10
|
-
*/
|
|
11
|
-
function serializeLevelParagraphProps(pPr) {
|
|
12
|
-
const indAttrs = [];
|
|
13
|
-
if (pPr.indentLeft !== void 0) indAttrs.push(`w:left="${intAttr(pPr.indentLeft)}"`);
|
|
14
|
-
if (pPr.indentRight !== void 0) indAttrs.push(`w:right="${intAttr(pPr.indentRight)}"`);
|
|
15
|
-
if (pPr.indentFirstLine !== void 0) {
|
|
16
|
-
if (pPr.hangingIndent) indAttrs.push(`w:hanging="${intAttr(Math.abs(pPr.indentFirstLine))}"`);
|
|
17
|
-
else if (pPr.indentFirstLine !== 0) indAttrs.push(`w:firstLine="${intAttr(pPr.indentFirstLine)}"`);
|
|
18
|
-
}
|
|
19
|
-
const parts = [];
|
|
20
|
-
if (pPr.tabs && pPr.tabs.length > 0) {
|
|
21
|
-
const tabs = pPr.tabs.map((tab) => {
|
|
22
|
-
const attrs = [`w:val="${tab.alignment}"`, `w:pos="${intAttr(tab.position)}"`];
|
|
23
|
-
if (tab.leader) attrs.push(`w:leader="${tab.leader}"`);
|
|
24
|
-
return `<w:tab ${attrs.join(" ")}/>`;
|
|
25
|
-
}).join("");
|
|
26
|
-
parts.push(`<w:tabs>${tabs}</w:tabs>`);
|
|
27
|
-
}
|
|
28
|
-
if (indAttrs.length > 0) parts.push(`<w:ind ${indAttrs.join(" ")}/>`);
|
|
29
|
-
if (parts.length === 0) return "";
|
|
30
|
-
return `<w:pPr>${parts.join("")}</w:pPr>`;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Serialize one `w:lvl`. Children follow the ECMA-376 §17.9.6 CT_Lvl order
|
|
34
|
-
* (start, numFmt, lvlRestart, isLgl, suff, lvlText, legacy, lvlJc, pPr, rPr) so
|
|
35
|
-
* a re-emitted level parses back into an equivalent model.
|
|
36
|
-
*/
|
|
10
|
+
/** Serialize one `w:lvl`. */
|
|
37
11
|
function serializeLevel(level) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (level.
|
|
44
|
-
|
|
45
|
-
if (level.legacy) {
|
|
46
|
-
const
|
|
47
|
-
if (level.legacy.
|
|
48
|
-
if (level.legacy.
|
|
49
|
-
|
|
12
|
+
const customFormat = customNumberFormatOf(level);
|
|
13
|
+
const numFmtFormat = customFormat === void 0 ? "" : ` w:format="${escapeXmlAttribute(customFormat)}"`;
|
|
14
|
+
const pPr = level.pPr === void 0 ? "" : serializeParagraphPropertySet({ formatting: level.pPr }) || "<w:pPr/>";
|
|
15
|
+
const rPr = level.rPr === void 0 ? "" : serializeTextFormatting(level.rPr) || "<w:rPr/>";
|
|
16
|
+
const lvlTextAttrs = [`w:val="${escapeXmlAttribute(level.lvlText)}"`];
|
|
17
|
+
if (level.lvlTextNull !== void 0) lvlTextAttrs.push(`w:null="${level.lvlTextNull ? 1 : 0}"`);
|
|
18
|
+
let legacy = "";
|
|
19
|
+
if (level.legacy !== void 0) {
|
|
20
|
+
const attributes = [];
|
|
21
|
+
if (level.legacy.legacy !== void 0) attributes.push(`w:legacy="${level.legacy.legacy ? 1 : 0}"`);
|
|
22
|
+
if (level.legacy.legacySpace !== void 0) attributes.push(`w:legacySpace="${intAttr(level.legacy.legacySpace)}"`);
|
|
23
|
+
if (level.legacy.legacyIndent !== void 0) attributes.push(`w:legacyIndent="${intAttr(level.legacy.legacyIndent)}"`);
|
|
24
|
+
legacy = attributes.length === 0 ? "<w:legacy/>" : `<w:legacy ${attributes.join(" ")}/>`;
|
|
50
25
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
const children = serializeSequenceChildren({
|
|
27
|
+
container: "w:lvl",
|
|
28
|
+
modelled: [
|
|
29
|
+
["start", level.start === void 0 ? "" : `<w:start w:val="${intAttr(level.start)}"/>`],
|
|
30
|
+
["numFmt", `<w:numFmt w:val="${escapeXmlAttribute(level.numFmt)}"${numFmtFormat}/>`],
|
|
31
|
+
["lvlRestart", level.lvlRestart === void 0 ? "" : `<w:lvlRestart w:val="${intAttr(level.lvlRestart)}"/>`],
|
|
32
|
+
["pStyle", level.pStyle === void 0 ? "" : `<w:pStyle w:val="${escapeXmlAttribute(level.pStyle)}"/>`],
|
|
33
|
+
["isLgl", serializeOnOffElement(level.isLgl, "isLgl")],
|
|
34
|
+
["suff", level.suffix === void 0 ? "" : `<w:suff w:val="${escapeXmlAttribute(level.suffix)}"/>`],
|
|
35
|
+
["lvlText", `<w:lvlText ${lvlTextAttrs.join(" ")}/>`],
|
|
36
|
+
["lvlPicBulletId", level.lvlPicBulletId === void 0 ? "" : `<w:lvlPicBulletId w:val="${intAttr(level.lvlPicBulletId)}"/>`],
|
|
37
|
+
["legacy", legacy],
|
|
38
|
+
["lvlJc", level.lvlJc === void 0 ? "" : `<w:lvlJc w:val="${escapeXmlAttribute(level.lvlJc)}"/>`],
|
|
39
|
+
["pPr", pPr],
|
|
40
|
+
["rPr", rPr]
|
|
41
|
+
],
|
|
42
|
+
preserved: level.preserved
|
|
43
|
+
});
|
|
44
|
+
const attributes = [`w:ilvl="${intAttr(level.ilvl)}"`];
|
|
45
|
+
if (level.tplc !== void 0) attributes.push(`w:tplc="${escapeXmlAttribute(level.tplc)}"`);
|
|
46
|
+
if (level.tentative !== void 0) attributes.push(`w:tentative="${level.tentative ? 1 : 0}"`);
|
|
47
|
+
return `<w:lvl ${serializePreservedAttributes(attributes, level.preservedAttributes).join(" ")}>${children.join("")}</w:lvl>`;
|
|
55
48
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Serialize one `w:abstractNum` (the reusable list template). Children follow
|
|
58
|
-
* ECMA-376 §17.9.1 CT_AbstractNum order for the modeled subset (multiLevelType,
|
|
59
|
-
* name, styleLink, numStyleLink, lvl+); `w:nsid` / `w:tmpl` are not modeled.
|
|
60
|
-
*/
|
|
49
|
+
/** Serialize one reusable `w:abstractNum` list template. */
|
|
61
50
|
function serializeAbstractNum(abstractNum) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
const levels = [...abstractNum.levels].sort((left, right) => left.ilvl - right.ilvl);
|
|
52
|
+
const children = serializeSequenceChildren({
|
|
53
|
+
container: "w:abstractNum",
|
|
54
|
+
modelled: [
|
|
55
|
+
["nsid", abstractNum.nsid === void 0 ? "" : `<w:nsid w:val="${escapeXmlAttribute(abstractNum.nsid)}"/>`],
|
|
56
|
+
["multiLevelType", abstractNum.multiLevelType === void 0 ? "" : `<w:multiLevelType w:val="${escapeXmlAttribute(abstractNum.multiLevelType)}"/>`],
|
|
57
|
+
["tmpl", abstractNum.tmpl === void 0 ? "" : `<w:tmpl w:val="${escapeXmlAttribute(abstractNum.tmpl)}"/>`],
|
|
58
|
+
["name", abstractNum.name === void 0 ? "" : `<w:name w:val="${escapeXmlAttribute(abstractNum.name)}"/>`],
|
|
59
|
+
["styleLink", abstractNum.styleLink === void 0 ? "" : `<w:styleLink w:val="${escapeXmlAttribute(abstractNum.styleLink)}"/>`],
|
|
60
|
+
["numStyleLink", abstractNum.numStyleLink === void 0 ? "" : `<w:numStyleLink w:val="${escapeXmlAttribute(abstractNum.numStyleLink)}"/>`],
|
|
61
|
+
["lvl", levels.map(serializeLevel).join("")]
|
|
62
|
+
],
|
|
63
|
+
preserved: abstractNum.preserved
|
|
64
|
+
});
|
|
65
|
+
return `<w:abstractNum ${serializePreservedAttributes([`w:abstractNumId="${intAttr(abstractNum.abstractNumId)}"`], abstractNum.preservedAttributes).join(" ")}>${children.join("")}</w:abstractNum>`;
|
|
70
66
|
}
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
/** Serialize one concrete instance's per-level override. */
|
|
68
|
+
function serializeLevelOverride(override) {
|
|
69
|
+
const children = serializeSequenceChildren({
|
|
70
|
+
container: "w:lvlOverride",
|
|
71
|
+
modelled: [["startOverride", override.startOverride === void 0 ? "" : `<w:startOverride w:val="${intAttr(override.startOverride)}"/>`], ["lvl", override.lvl === void 0 ? "" : serializeLevel(override.lvl)]],
|
|
72
|
+
preserved: override.preserved
|
|
73
|
+
});
|
|
74
|
+
return `<w:lvlOverride ${serializePreservedAttributes([`w:ilvl="${intAttr(override.ilvl)}"`], override.preservedAttributes).join(" ")}>${children.join("")}</w:lvlOverride>`;
|
|
75
|
+
}
|
|
76
|
+
/** Serialize one concrete `w:num` numbering instance. */
|
|
74
77
|
function serializeNum(instance) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
return `<w:num w:numId="${intAttr(instance.numId)}">${parts.join("")}</w:num>`;
|
|
78
|
+
const children = serializeSequenceChildren({
|
|
79
|
+
container: "w:num",
|
|
80
|
+
modelled: [["abstractNumId", `<w:abstractNumId w:val="${intAttr(instance.abstractNumId)}"/>`], ["lvlOverride", (instance.levelOverrides ?? []).map(serializeLevelOverride).join("")]],
|
|
81
|
+
preserved: instance.preserved
|
|
82
|
+
});
|
|
83
|
+
return `<w:num ${serializePreservedAttributes([`w:numId="${intAttr(instance.numId)}"`], instance.preservedAttributes).join(" ")}>${children.join("")}</w:num>`;
|
|
83
84
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Serialize {@link NumberingDefinitions} to a complete `word/numbering.xml`
|
|
86
|
-
* string. `w:abstractNum` elements precede `w:num` elements as ECMA-376 §17.9
|
|
87
|
-
* requires. See the module note: this whole-part output is used only for
|
|
88
|
-
* change detection and per-definition splicing, never to overwrite the part.
|
|
89
|
-
*/
|
|
85
|
+
/** Serialize a complete `word/numbering.xml` part. */
|
|
90
86
|
function serializeNumberingXml(numbering) {
|
|
87
|
+
const children = serializeSequenceChildren({
|
|
88
|
+
container: "w:numbering",
|
|
89
|
+
modelled: [["abstractNum", numbering.abstractNums.map(serializeAbstractNum).join("")], ["num", numbering.nums.map(serializeNum).join("")]],
|
|
90
|
+
preserved: numbering.preserved
|
|
91
|
+
});
|
|
91
92
|
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + serializePartElement({
|
|
92
93
|
partPath: "word/numbering.xml",
|
|
93
94
|
rootName: "w:numbering",
|
|
95
|
+
rootAttributes: serializePreservedAttributes([], numbering.preservedAttributes).join(" "),
|
|
94
96
|
baselinePrefixes: ["w"],
|
|
95
97
|
sourceBindings: void 0,
|
|
96
|
-
body:
|
|
98
|
+
body: children.join("")
|
|
97
99
|
});
|
|
98
100
|
}
|
|
99
101
|
//#endregion
|
|
@@ -31,13 +31,5 @@ declare function createEmptyParagraph(formatting?: document_d_exports.ParagraphF
|
|
|
31
31
|
* Create a paragraph with a single text run
|
|
32
32
|
*/
|
|
33
33
|
declare function createTextParagraph(text: string, paragraphFormatting?: document_d_exports.ParagraphFormatting, textFormatting?: document_d_exports.TextFormatting): document_d_exports.Paragraph;
|
|
34
|
-
/**
|
|
35
|
-
* Check if paragraph is a list item
|
|
36
|
-
*/
|
|
37
|
-
declare function isListParagraph(paragraph: document_d_exports.Paragraph): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Get list level of a paragraph (0-8, or -1 if not a list)
|
|
40
|
-
*/
|
|
41
|
-
declare function getListLevel(paragraph: document_d_exports.Paragraph): number;
|
|
42
34
|
//#endregion
|
|
43
|
-
export { createEmptyParagraph, createTextParagraph,
|
|
35
|
+
export { createEmptyParagraph, createTextParagraph, hasParagraphContent, hasParagraphFormatting, serializeParagraph, serializeParagraphFormatting, serializeParagraphs };
|