@stll/folio-core 0.46.0 → 0.47.1

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.
Files changed (370) hide show
  1. package/dist/ai-edits/apply.d.ts +17 -1
  2. package/dist/ai-edits/apply.js +31 -27
  3. package/dist/ai-edits/headless.d.ts +9 -2
  4. package/dist/ai-edits/headless.js +5 -3
  5. package/dist/ai-edits/read.d.ts +1 -0
  6. package/dist/ai-edits/read.js +1 -0
  7. package/dist/ai-edits/snapshot.js +32 -27
  8. package/dist/ai-edits/table-cell-mutations.js +15 -7
  9. package/dist/ai-edits/table-geometry.js +21 -18
  10. package/dist/ai-edits/table-template.js +2 -2
  11. package/dist/compare/compare.js +2 -1
  12. package/dist/compare/content-alignment.js +192 -46
  13. package/dist/compare/content-types.d.ts +8 -2
  14. package/dist/compare/content.js +2 -11
  15. package/dist/compare/plan.js +7 -4
  16. package/dist/compare/section-boundary-properties.js +1 -2
  17. package/dist/content-controls/checkboxDisplay.d.ts +8 -2
  18. package/dist/content-controls/checkboxDisplay.js +11 -5
  19. package/dist/content-controls/mutateContentControls.js +41 -42
  20. package/dist/controller/layoutPipeline.js +8 -3
  21. package/dist/display-list/build/buildDisplayList.js +7 -7
  22. package/dist/display-list/build/imagePrimitives.d.ts +4 -4
  23. package/dist/display-list/build/imagePrimitives.js +38 -20
  24. package/dist/display-list/build/pageBorderPrimitives.js +2 -1
  25. package/dist/display-list/build/paragraphPrimitives.js +93 -13
  26. package/dist/display-list/build/previewPrimitives.d.ts +10 -0
  27. package/dist/display-list/build/previewPrimitives.js +89 -0
  28. package/dist/display-list/build/strokes.d.ts +177 -8
  29. package/dist/display-list/build/strokes.js +167 -47
  30. package/dist/display-list/build/tablePrimitives.js +4 -2
  31. package/dist/display-list/build/textBoxPrimitives.js +6 -4
  32. package/dist/display-list/build/textDecorations.d.ts +15 -1
  33. package/dist/display-list/build/textDecorations.js +15 -1
  34. package/dist/display-list/dom/renderDisplayListToDom.js +1 -19
  35. package/dist/display-list/primitives.d.ts +13 -2
  36. package/dist/display-list/primitives.js +36 -1
  37. package/dist/document-operations.d.ts +9 -2
  38. package/dist/document-operations.js +5 -3
  39. package/dist/docx/attributeRemainder.d.ts +34 -1
  40. package/dist/docx/attributeRemainder.js +49 -3
  41. package/dist/docx/blockContentParser.d.ts +2 -0
  42. package/dist/docx/blockContentParser.js +39 -67
  43. package/dist/docx/blockPlainText.js +3 -1
  44. package/dist/docx/borderParser.js +26 -11
  45. package/dist/docx/builtInStyles.d.ts +8 -16
  46. package/dist/docx/builtInStyles.js +54 -17
  47. package/dist/docx/commentAnchorIndex.js +1 -1
  48. package/dist/docx/commentParser.js +3 -3
  49. package/dist/docx/commentRangeIntegrity.js +1 -1
  50. package/dist/docx/commentRangeJoin.js +1 -1
  51. package/dist/docx/commentReferenceNormalization.js +3 -2
  52. package/dist/docx/commentReplyMarkers.js +1 -1
  53. package/dist/docx/compatibility.js +56 -42
  54. package/dist/docx/containerChildren.d.ts +110 -13
  55. package/dist/docx/containerChildren.gen.d.ts +16 -1
  56. package/dist/docx/containerChildren.gen.js +18 -1
  57. package/dist/docx/containerChildren.js +63 -13
  58. package/dist/docx/diagramPreview.d.ts +14 -2
  59. package/dist/docx/diagramPreview.js +81 -169
  60. package/dist/docx/documentParser.js +4 -1
  61. package/dist/docx/drawingAnchor.d.ts +87 -0
  62. package/dist/docx/drawingAnchor.js +201 -0
  63. package/dist/docx/drawingUtils.d.ts +43 -38
  64. package/dist/docx/drawingUtils.js +205 -118
  65. package/dist/docx/fontTableParser.js +102 -41
  66. package/dist/docx/footnoteParser.js +10 -6
  67. package/dist/docx/groupDrawingParser.js +4 -3
  68. package/dist/docx/headerFooterReferenceNormalization.js +1 -1
  69. package/dist/docx/hyperlinkParser.d.ts +45 -7
  70. package/dist/docx/hyperlinkParser.js +126 -57
  71. package/dist/docx/imageParser.js +127 -107
  72. package/dist/docx/index.d.ts +2 -1
  73. package/dist/docx/index.js +2 -1
  74. package/dist/docx/inlineContentRemovals.d.ts +28 -0
  75. package/dist/docx/inlineContentRemovals.js +46 -0
  76. package/dist/docx/inlineWrapperContent.d.ts +84 -3
  77. package/dist/docx/inlineWrapperContent.js +85 -4
  78. package/dist/docx/inlineWrapperParser.d.ts +11 -0
  79. package/dist/docx/inlineWrapperParser.js +60 -0
  80. package/dist/docx/nonVisualDrawingProps.d.ts +5 -13
  81. package/dist/docx/normalizeBaseDirection.js +4 -2
  82. package/dist/docx/numberingParser.d.ts +25 -2
  83. package/dist/docx/numberingParser.js +264 -361
  84. package/dist/docx/numberingReference.d.ts +9 -16
  85. package/dist/docx/numberingReference.js +17 -16
  86. package/dist/docx/numberingReferenceNormalization.js +7 -7
  87. package/dist/docx/ooxmlCounterFormatter.d.ts +1 -1
  88. package/dist/docx/ooxmlCounterFormatter.js +4 -1
  89. package/dist/docx/paraIdAttribute.d.ts +91 -1
  90. package/dist/docx/paraIdAttribute.js +79 -1
  91. package/dist/docx/paragraphParser.d.ts +9 -24
  92. package/dist/docx/paragraphParser.js +212 -396
  93. package/dist/docx/paragraphProperties.d.ts +23 -0
  94. package/dist/docx/paragraphProperties.js +279 -0
  95. package/dist/docx/paragraphPropertySource.js +2 -0
  96. package/dist/docx/paragraphTextBoxEnrichment.d.ts +2 -1
  97. package/dist/docx/paragraphTextBoxEnrichment.js +14 -7
  98. package/dist/docx/paragraphTraversal.d.ts +14 -10
  99. package/dist/docx/paragraphTraversal.js +47 -49
  100. package/dist/docx/parseWarningMessage.js +3 -0
  101. package/dist/docx/parserEnums.d.ts +6 -8
  102. package/dist/docx/parserEnums.js +4 -6
  103. package/dist/docx/preservedRunContent.js +16 -6
  104. package/dist/docx/previewBudget.d.ts +44 -23
  105. package/dist/docx/previewBudget.js +61 -30
  106. package/dist/docx/propertyElementAttributes.d.ts +178 -0
  107. package/dist/docx/propertyElementAttributes.js +114 -0
  108. package/dist/docx/renderedPageBreakNormalization.js +2 -2
  109. package/dist/docx/rezip.d.ts +28 -2
  110. package/dist/docx/rezip.js +78 -9
  111. package/dist/docx/runConsolidator.d.ts +42 -2
  112. package/dist/docx/runConsolidator.js +60 -6
  113. package/dist/docx/runParser.d.ts +54 -18
  114. package/dist/docx/runParser.js +379 -295
  115. package/dist/docx/runPayload.d.ts +5 -0
  116. package/dist/docx/runPayload.js +4 -0
  117. package/dist/docx/sdtProperties.d.ts +39 -5
  118. package/dist/docx/sdtProperties.js +205 -84
  119. package/dist/docx/sdtPropertiesPatch.d.ts +5 -9
  120. package/dist/docx/sdtPropertiesPatch.js +68 -112
  121. package/dist/docx/sectionParser.d.ts +1 -2
  122. package/dist/docx/sectionParser.js +236 -240
  123. package/dist/docx/selectiveSave.js +3 -2
  124. package/dist/docx/selectiveXmlPatch.d.ts +21 -2
  125. package/dist/docx/selectiveXmlPatch.js +195 -99
  126. package/dist/docx/serializer/blockSdtSerializer.js +2 -96
  127. package/dist/docx/serializer/borderSerializer.d.ts +5 -5
  128. package/dist/docx/serializer/borderSerializer.js +10 -8
  129. package/dist/docx/serializer/documentSerializer.js +3 -0
  130. package/dist/docx/serializer/fontTableSerializer.js +31 -3
  131. package/dist/docx/serializer/headerFooterSerializer.js +3 -0
  132. package/dist/docx/serializer/markupRangeAttributes.d.ts +9 -1
  133. package/dist/docx/serializer/markupRangeAttributes.js +9 -1
  134. package/dist/docx/serializer/noteSerializer.js +3 -0
  135. package/dist/docx/serializer/numberingSerializer.d.ts +1 -6
  136. package/dist/docx/serializer/numberingSerializer.js +81 -79
  137. package/dist/docx/serializer/paragraphSerializer.d.ts +1 -9
  138. package/dist/docx/serializer/paragraphSerializer.js +88 -188
  139. package/dist/docx/serializer/runSerializer.d.ts +1 -5
  140. package/dist/docx/serializer/runSerializer.js +109 -59
  141. package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +26 -0
  142. package/dist/docx/serializer/sdtPropertiesSerializer.js +111 -0
  143. package/dist/docx/serializer/sectionPropertiesSerializer.js +34 -45
  144. package/dist/docx/serializer/settingsSerializer.js +6 -4
  145. package/dist/docx/serializer/stylesSerializer.js +8 -11
  146. package/dist/docx/serializer/tableSerializer.js +268 -100
  147. package/dist/docx/serializer/textFormattingSerializer.d.ts +28 -4
  148. package/dist/docx/serializer/textFormattingSerializer.js +111 -101
  149. package/dist/docx/serializer/xmlUtils.d.ts +1 -1
  150. package/dist/docx/serializer/xmlUtils.js +1 -1
  151. package/dist/docx/server/createBilingualDocument.js +18 -16
  152. package/dist/docx/server/migrateYjsAttrSchema.js +3 -3
  153. package/dist/docx/settingsParser.js +7 -4
  154. package/dist/docx/shadingParser.d.ts +2 -1
  155. package/dist/docx/shadingParser.js +43 -7
  156. package/dist/docx/shapeParser.js +8 -3
  157. package/dist/docx/strictNames.d.ts +11 -0
  158. package/dist/docx/strictNames.gen.d.ts +45 -0
  159. package/dist/docx/strictNames.gen.js +50 -0
  160. package/dist/docx/strictNames.js +43 -0
  161. package/dist/docx/strictValueEncodings.gen.js +133 -131
  162. package/dist/docx/styleParser.js +17 -349
  163. package/dist/docx/tableParser.d.ts +10 -1
  164. package/dist/docx/tableParser.js +505 -181
  165. package/dist/docx/textBoxParser.d.ts +3 -1
  166. package/dist/docx/textBoxParser.js +18 -8
  167. package/dist/docx/themeColorAttribute.d.ts +13 -0
  168. package/dist/docx/themeColorAttribute.js +24 -0
  169. package/dist/docx/trackedMoveRangeNormalization.js +2 -1
  170. package/dist/docx/vmlImageParser.d.ts +13 -4
  171. package/dist/docx/vmlImageParser.js +74 -31
  172. package/dist/docx/vmlPreview.js +2 -2
  173. package/dist/docx/wrapPolygon.d.ts +30 -0
  174. package/dist/docx/wrapPolygon.js +70 -0
  175. package/dist/docx/xmlParser.d.ts +14 -1
  176. package/dist/docx/xmlParser.js +18 -2
  177. package/dist/fonts/embeddedFonts.js +3 -3
  178. package/dist/headless-layout.js +2 -0
  179. package/dist/i18n/messages/catalogs.gen.d.ts +68 -0
  180. package/dist/i18n/messages/catalogs.gen.js +102 -34
  181. package/dist/i18n/messages/messages.gen.d.ts +4 -0
  182. package/dist/internal/headlessRevisionResolution.js +9 -0
  183. package/dist/internal/pageBreakRunSourceDescendantIndex.js +3 -1
  184. package/dist/internal/paragraphFormattingSerialization.d.ts +20 -9
  185. package/dist/internal/paragraphFormattingSerialization.js +118 -83
  186. package/dist/layout-bridge/convert/footnoteLayout.d.ts +1 -0
  187. package/dist/layout-bridge/convert/footnoteLayout.js +1 -0
  188. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +1 -0
  189. package/dist/layout-bridge/convert/headerFooterLayout.js +2 -0
  190. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +17 -12
  191. package/dist/layout-bridge/convert/toFlowBlocks.js +177 -101
  192. package/dist/layout-engine/index.d.ts +2 -2
  193. package/dist/layout-engine/index.js +53 -17
  194. package/dist/layout-engine/measure/measureBlocks.d.ts +3 -0
  195. package/dist/layout-engine/measure/measureBlocks.js +6 -10
  196. package/dist/layout-engine/measure/tableCellGrid.js +2 -1
  197. package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
  198. package/dist/layout-engine/measure/tableInlinePlacement.js +2 -5
  199. package/dist/layout-engine/paragraphSequence.js +3 -2
  200. package/dist/layout-engine/renderedBreakReconciliation.js +2 -1
  201. package/dist/layout-engine/section-breaks.d.ts +49 -2
  202. package/dist/layout-engine/section-breaks.js +55 -4
  203. package/dist/layout-engine/types.d.ts +47 -17
  204. package/dist/layout-engine/types.js +16 -1
  205. package/dist/layout-painter/borderStroke.d.ts +18 -4
  206. package/dist/layout-painter/renderPage.js +6 -4
  207. package/dist/layout-painter/renderParagraph.d.ts +2 -1
  208. package/dist/layout-painter/renderParagraph.js +13 -26
  209. package/dist/layout-painter/renderTable.d.ts +4 -1
  210. package/dist/layout-painter/renderTable.js +22 -22
  211. package/dist/layout-painter/renderTextBox.js +5 -3
  212. package/dist/markdown/renderBlock.js +3 -1
  213. package/dist/markdown/renderRuns.js +7 -2
  214. package/dist/markdown/renderTable.js +2 -1
  215. package/dist/model.d.ts +3 -3
  216. package/dist/model.js +2 -2
  217. package/dist/paged-layout/sectionBlockWidths.d.ts +3 -0
  218. package/dist/paged-layout/sectionBlockWidths.js +26 -4
  219. package/dist/prosemirror/attrs/index.d.ts +22 -4
  220. package/dist/prosemirror/attrs/index.js +498 -60
  221. package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +9 -1
  222. package/dist/prosemirror/bookmarkBoundaryAttrs.js +22 -3
  223. package/dist/prosemirror/commands/comments.js +68 -53
  224. package/dist/prosemirror/commands/contentControls.js +24 -19
  225. package/dist/prosemirror/commands/image.d.ts +1 -1
  226. package/dist/prosemirror/commands/image.js +4 -1
  227. package/dist/prosemirror/commands/paragraph.d.ts +2 -1
  228. package/dist/prosemirror/commands/propertyChangeScope.d.ts +12 -4
  229. package/dist/prosemirror/commands/propertyChangeScope.js +22 -4
  230. package/dist/prosemirror/commands/sectionBreak.d.ts +33 -1
  231. package/dist/prosemirror/commands/sectionBreak.js +187 -11
  232. package/dist/prosemirror/conversion/fromProseDoc.d.ts +18 -2
  233. package/dist/prosemirror/conversion/fromProseDoc.js +330 -183
  234. package/dist/prosemirror/conversion/index.d.ts +2 -2
  235. package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +39 -0
  236. package/dist/prosemirror/conversion/preservedSinkCarriers.js +19 -0
  237. package/dist/prosemirror/conversion/runShadingMark.js +14 -1
  238. package/dist/prosemirror/conversion/sdtAttrs.d.ts +10 -1
  239. package/dist/prosemirror/conversion/sdtAttrs.js +19 -5
  240. package/dist/prosemirror/conversion/toProseDoc.js +371 -141
  241. package/dist/prosemirror/emptyRangeAnchor.d.ts +53 -0
  242. package/dist/prosemirror/emptyRangeAnchor.js +158 -0
  243. package/dist/prosemirror/extensions/StarterKit.js +8 -2
  244. package/dist/prosemirror/extensions/core/DocExtension.js +1 -1
  245. package/dist/prosemirror/extensions/core/ParagraphExtension.js +19 -15
  246. package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -2
  247. package/dist/prosemirror/extensions/features/ListExtension.js +43 -24
  248. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +4 -3
  249. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +3 -3
  250. package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +5 -5
  251. package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +3 -1
  252. package/dist/prosemirror/extensions/features/pasteCleanup.js +56 -2
  253. package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +5 -4
  254. package/dist/prosemirror/extensions/markRegistry.d.ts +26 -2
  255. package/dist/prosemirror/extensions/markRegistry.js +73 -10
  256. package/dist/prosemirror/extensions/marks/InlineWrapperExtension.js +17 -3
  257. package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +26 -0
  258. package/dist/prosemirror/extensions/marks/RunIdentityExtension.js +134 -0
  259. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +2 -1
  260. package/dist/prosemirror/extensions/marks/UnderlineExtension.js +12 -18
  261. package/dist/prosemirror/extensions/marks/markUtils.js +2 -1
  262. package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +29 -0
  263. package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.js +46 -0
  264. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +4 -3
  265. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.js +18 -13
  266. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +28 -53
  267. package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +10 -0
  268. package/dist/prosemirror/extensions/nodes/ImageExtension.js +8 -1
  269. package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +11 -0
  270. package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.js +43 -0
  271. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +13 -0
  272. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +65 -0
  273. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +3 -1
  274. package/dist/prosemirror/extensions/nodes/SdtExtension.js +22 -16
  275. package/dist/prosemirror/extensions/nodes/ShapeExtension.js +4 -0
  276. package/dist/prosemirror/extensions/nodes/TableExtension.js +141 -123
  277. package/dist/prosemirror/extensions/nodes/TextBoxExtension.js +4 -0
  278. package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +23 -0
  279. package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.js +57 -0
  280. package/dist/prosemirror/extensions/types.d.ts +12 -3
  281. package/dist/prosemirror/index.d.ts +4 -2
  282. package/dist/prosemirror/index.js +2 -1
  283. package/dist/prosemirror/inlineWrapperStack.js +20 -3
  284. package/dist/prosemirror/listMarker.d.ts +2 -2
  285. package/dist/prosemirror/listMarker.js +7 -8
  286. package/dist/prosemirror/listRenderingAttrs.js +11 -1
  287. package/dist/prosemirror/listState.d.ts +62 -0
  288. package/dist/prosemirror/listState.js +49 -0
  289. package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +13 -0
  290. package/dist/prosemirror/moveRangeBoundaryAttrs.js +114 -0
  291. package/dist/prosemirror/numberedRefFields.js +4 -4
  292. package/dist/prosemirror/numberingAttr.d.ts +55 -0
  293. package/dist/prosemirror/numberingAttr.js +74 -0
  294. package/dist/prosemirror/outlineLevelAttr.d.ts +29 -0
  295. package/dist/prosemirror/outlineLevelAttr.js +42 -0
  296. package/dist/prosemirror/paragraphFormattingProvenance.d.ts +9 -0
  297. package/dist/prosemirror/paragraphFormattingProvenance.js +4 -1
  298. package/dist/prosemirror/plugins/selectionTracker.d.ts +3 -6
  299. package/dist/prosemirror/plugins/selectionTracker.js +3 -10
  300. package/dist/prosemirror/rangeAnchorAttrs.d.ts +14 -0
  301. package/dist/prosemirror/rangeAnchorAttrs.js +101 -0
  302. package/dist/prosemirror/replacedAnnotations.d.ts +1 -1
  303. package/dist/prosemirror/replacedAnnotations.js +24 -6
  304. package/dist/prosemirror/revisionCarriers.d.ts +86 -2
  305. package/dist/prosemirror/revisionCarriers.js +86 -60
  306. package/dist/prosemirror/runFormattingInlineCarriers.d.ts +2 -0
  307. package/dist/prosemirror/runFormattingInlineCarriers.js +2 -0
  308. package/dist/prosemirror/runIdentity.d.ts +28 -0
  309. package/dist/prosemirror/runIdentity.js +36 -0
  310. package/dist/prosemirror/runStyleFormatting.js +1 -1
  311. package/dist/prosemirror/schema/index.d.ts +2 -2
  312. package/dist/prosemirror/schema/marks.d.ts +23 -4
  313. package/dist/prosemirror/schema/nodes.d.ts +220 -24
  314. package/dist/prosemirror/sectionCarrier.d.ts +37 -0
  315. package/dist/prosemirror/sectionCarrier.js +40 -0
  316. package/dist/prosemirror/selectionState.d.ts +3 -0
  317. package/dist/prosemirror/selectionState.js +4 -1
  318. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +5 -4
  319. package/dist/prosemirror/styles/resolvedStyleAttrs.js +15 -13
  320. package/dist/prosemirror/tableResize.js +5 -6
  321. package/dist/prosemirror/trackedRunInlineAtoms.d.ts +2 -0
  322. package/dist/prosemirror/trackedRunInlineAtoms.js +2 -0
  323. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +10 -11
  324. package/dist/prosemirror/utils/extractTrackedChanges.js +109 -92
  325. package/dist/prosemirror/validation.js +17 -6
  326. package/dist/prosemirror/yjsDocumentMetadata.d.ts +2 -2
  327. package/dist/prosemirror/yjsDocumentMetadata.js +428 -7
  328. package/dist/prosemirror/zeroWidthAnchors.js +4 -0
  329. package/dist/style-sets/extract.js +4 -4
  330. package/dist/style-sets/stellaStyle.js +36 -23
  331. package/dist/types/colors.d.ts +2 -2
  332. package/dist/types/content.d.ts +2 -2
  333. package/dist/types/documentEnumValues.d.ts +53 -26
  334. package/dist/types/documentEnumValues.js +72 -174
  335. package/dist/types/formatting.d.ts +2 -2
  336. package/dist/types/index.d.ts +9 -2
  337. package/dist/utils/borderCss.d.ts +246 -0
  338. package/dist/utils/borderCss.js +325 -0
  339. package/dist/utils/colorResolver.d.ts +4 -3
  340. package/dist/utils/colorResolver.js +45 -76
  341. package/dist/utils/createDocument.js +24 -6
  342. package/dist/utils/findReplace.js +52 -10
  343. package/dist/utils/formatToStyle.d.ts +84 -2
  344. package/dist/utils/formatToStyle.js +133 -52
  345. package/dist/utils/headingCollector.js +3 -2
  346. package/dist/utils/mergeDocumentContent.js +5 -3
  347. package/dist/utils/paragraphFormattingMerge.js +27 -6
  348. package/dist/utils/replaceText.js +1 -1
  349. package/dist/utils/tableOperations.d.ts +5 -3
  350. package/dist/utils/tableOperations.js +14 -1
  351. package/dist/utils/tablePlacement.d.ts +7 -0
  352. package/dist/utils/tablePlacement.js +14 -0
  353. package/dist/utils/textDirectionFlow.d.ts +15 -0
  354. package/dist/utils/textDirectionFlow.js +38 -0
  355. package/dist/utils/textFormattingMerge.js +16 -4
  356. package/package.json +10 -10
  357. package/dist/ai-edits/__fixtures__/paragraphs.d.ts +0 -17
  358. package/dist/ai-edits/__fixtures__/paragraphs.js +0 -33
  359. package/dist/compare/__fixtures__/body-sequence.d.ts +0 -119
  360. package/dist/compare/__fixtures__/body-sequence.js +0 -225
  361. package/dist/compare/__fixtures__/nested-table.d.ts +0 -16
  362. package/dist/compare/__fixtures__/nested-table.js +0 -50
  363. package/dist/compare/__fixtures__/numbered-list.d.ts +0 -34
  364. package/dist/compare/__fixtures__/numbered-list.js +0 -85
  365. package/dist/docx/bookmarkPlacement.d.ts +0 -9
  366. package/dist/docx/bookmarkPlacement.js +0 -52
  367. package/dist/fonts/embeddedFontTable.d.ts +0 -45
  368. package/dist/fonts/embeddedFontTable.js +0 -80
  369. package/dist/prosemirror/extensions/marks/PageBreakRunOwnerExtension.d.ts +0 -13
  370. package/dist/prosemirror/extensions/marks/PageBreakRunOwnerExtension.js +0 -39
@@ -1,21 +1,22 @@
1
- import { modelParagraphFormattingEmission } from "../../internal/paragraphFormattingSerialization.js";
1
+ import { modelParagraphFormattingEmission, serializeParagraphPropertySet } from "../../internal/paragraphFormattingSerialization.js";
2
2
  import { serializePreservedAttributes } from "../attributeRemainder.js";
3
+ import { CONTAINER_CHILDREN } from "../containerChildren.gen.js";
3
4
  import { fieldStateAttributes } from "../fieldState.js";
4
5
  import { getParagraphPropertySource, paragraphPropertySourceMatchesEmission } from "../paragraphPropertySource.js";
5
- import { reconcileRawSdtPr } from "../sdtPropertiesPatch.js";
6
6
  import { DATE_UTC_ATTRIBUTE } from "../trackedChangeInfo.js";
7
7
  import { toTransitionalNamespaceUri } from "../transitionalSpelling.js";
8
8
  import { captureVerbatimXml, sanitizeCapturedXmlElement } from "../verbatimCapture.js";
9
9
  import { NAMESPACES, OOXML_NAMESPACE_SCOPE, cloneElement, getChildElements, getLocalName, parseXml } from "../xmlParser.js";
10
- import { bookmarkRangeAttributes, markupRangeAttributes, moveBookmarkAttributes } from "./markupRangeAttributes.js";
10
+ import { markupRangeAttributes, moveBookmarkAttributes, serializeBookmarkMarker } from "./markupRangeAttributes.js";
11
11
  import { serializeRun } from "./runSerializer.js";
12
+ import { serializeSdtWrapper } from "./sdtPropertiesSerializer.js";
12
13
  import { serializeSectionProperties } from "./sectionPropertiesSerializer.js";
13
14
  import { serializeTextFormatting } from "./textFormattingSerializer.js";
14
15
  import { serializeTrackedChangeAttributes, trackedChangeAttributeRecord } from "./trackedChangeAttributes.js";
15
- import { isSingleWellFormedElement } from "./xmlUtils.js";
16
16
  import { panic } from "better-result";
17
17
  import { escapeXmlAttribute, escapeXmlText } from "@stll/docx-core";
18
18
  import { PARAGRAPH_MARK_CHANGE_KINDS } from "@stll/docx-core/model";
19
+ import { SEQUENCE_CHILDREN } from "@stll/docx-core/schema";
19
20
  //#region src/docx/serializer/paragraphSerializer.ts
20
21
  /**
21
22
  * Serialize paragraph formatting properties to w:pPr XML
@@ -52,83 +53,26 @@ const PARAGRAPH_APPEND_PREFIXES = /* @__PURE__ */ new Map([
52
53
  ["r", NAMESPACES.r],
53
54
  ["w15", NAMESPACES.w15]
54
55
  ]);
55
- const PARAGRAPH_PROPERTY_CHILD_ORDER = new Map([
56
- "pStyle",
57
- "keepNext",
58
- "keepLines",
59
- "pageBreakBefore",
60
- "framePr",
61
- "widowControl",
62
- "numPr",
63
- "suppressLineNumbers",
64
- "pBdr",
65
- "shd",
66
- "tabs",
67
- "suppressAutoHyphens",
68
- "kinsoku",
69
- "wordWrap",
70
- "overflowPunct",
71
- "topLinePunct",
72
- "autoSpaceDE",
73
- "autoSpaceDN",
74
- "bidi",
75
- "adjustRightInd",
76
- "snapToGrid",
77
- "spacing",
78
- "ind",
79
- "contextualSpacing",
80
- "mirrorIndents",
81
- "suppressOverlap",
82
- "jc",
83
- "textDirection",
84
- "textAlignment",
85
- "textboxTightWrap",
86
- "outlineLvl",
87
- "divId",
88
- "cnfStyle",
89
- "rPr"
90
- ].map((name, index) => [name, index]));
91
- const PARAGRAPH_MARK_BASE_CHILDREN = /* @__PURE__ */ new Set([
92
- "rStyle",
93
- "rFonts",
94
- "b",
95
- "bCs",
96
- "i",
97
- "iCs",
98
- "caps",
99
- "smallCaps",
100
- "strike",
101
- "dstrike",
102
- "outline",
103
- "shadow",
104
- "emboss",
105
- "imprint",
106
- "snapToGrid",
107
- "vanish",
108
- "webHidden",
109
- "color",
110
- "spacing",
111
- "w",
112
- "kern",
113
- "position",
114
- "sz",
115
- "szCs",
116
- "noProof",
117
- "highlight",
118
- "u",
119
- "effect",
120
- "bdr",
121
- "shd",
122
- "fitText",
123
- "vertAlign",
124
- "rtl",
125
- "cs",
126
- "em",
127
- "lang",
128
- "eastAsianLayout",
129
- "specVanish",
130
- "oMath"
131
- ]);
56
+ /**
57
+ * The order a replayed `w:pPr` has to already be in, from the generated table.
58
+ *
59
+ * This used to be the same list written out again, which is a mirror of the
60
+ * order the writer emits: the two could disagree and a capture the gate let
61
+ * through would then be markup the rebuild would never have written.
62
+ * `w:sectPr` and `w:pPrChange` are in the generated list and are refused
63
+ * before this map is consulted, because they have their own lifecycles.
64
+ */
65
+ const PARAGRAPH_PROPERTY_CHILD_ORDER = new Map(SEQUENCE_CHILDREN["paragraph-properties"].map((name, index) => [name, index]));
66
+ /**
67
+ * `EG_RPrBase`: the paragraph mark's `w:rPr` children a replay may carry.
68
+ *
69
+ * Derived from the generated declared-child list rather than restated, so the
70
+ * set a capture is checked against and the set the parser makes a decision for
71
+ * are one list. The revisions `CT_ParaRPr` adds around it are excluded here
72
+ * and refused by {@link RESERVED_PARAGRAPH_CAPTURE_CHILDREN}, which is what
73
+ * keeps a replayed `w:pPr` from carrying a revision the model also writes.
74
+ */
75
+ const PARAGRAPH_MARK_BASE_CHILDREN = new Set(CONTAINER_CHILDREN["run-properties"].filter((name) => !RESERVED_PARAGRAPH_CAPTURE_CHILDREN.has(name)));
132
76
  const PARAGRAPH_NESTED_PROPERTY_CHILDREN = /* @__PURE__ */ new Map([
133
77
  ["numPr", /* @__PURE__ */ new Set([
134
78
  "ilvl",
@@ -306,15 +250,12 @@ const serializeParagraphFormattingWithOptions = (formatting, { propertyChanges,
306
250
  const sourceWithMark = paragraphMarkChange ? withParagraphMarkChange(verifiedSource, paragraphMarkChange) : verifiedSource;
307
251
  return withTrailingParagraphPropertyChildren(sourceWithMark, [sectionPropertiesXml, ...propertyChangesXml]);
308
252
  }
309
- const parts = [];
310
- if (modeledFormatting.propertiesXml) parts.push(modeledFormatting.propertiesXml);
311
- const paragraphMarkPropertiesInnerXml = `${paragraphMarkXml}${modeledFormatting.paragraphMarkPropertiesInnerXml ?? ""}`;
312
- if (paragraphMarkPropertiesInnerXml) parts.push(`<w:rPr>${paragraphMarkPropertiesInnerXml}</w:rPr>`);
313
- parts.push(sectionPropertiesXml);
314
- if (propertyChangesXml.length > 0) parts.push(...propertyChangesXml);
315
- const inner = parts.join("");
316
- if (inner.length === 0) return "";
317
- return `<w:pPr>${inner}</w:pPr>`;
253
+ return serializeParagraphPropertySet({
254
+ formatting,
255
+ markPropertiesPrefixXml: paragraphMarkXml,
256
+ sectionPropertiesXml,
257
+ propertyChangesXml
258
+ });
318
259
  };
319
260
  function serializeParagraphFormatting(formatting, propertyChanges, paragraphMarkChange) {
320
261
  return serializeParagraphFormattingWithOptions(formatting, {
@@ -343,37 +284,35 @@ function hyperlinkAttributes(hyperlink) {
343
284
  if (hyperlink.docLocation) attrs.push(`w:docLocation="${escapeXmlAttribute(hyperlink.docLocation)}"`);
344
285
  return attrs.length > 0 ? ` ${attrs.join(" ")}` : "";
345
286
  }
346
- /** One `w:hyperlink` child, with the caller deciding how a run is written. */
347
- function serializeHyperlinkChild(child, serializeChildRun) {
348
- if (child.type === "run") return serializeChildRun(child);
349
- if (child.type === "bookmarkStart") return serializeBookmarkStart(child);
350
- return child.type === "bookmarkEnd" ? serializeBookmarkEnd(child) : child.xml;
287
+ /** One `w:hyperlink` child, written with the link's own disposition. */
288
+ function serializeHyperlinkChild(child, disposition) {
289
+ switch (child.type) {
290
+ case "run": return serializeInlineRun(child, disposition);
291
+ case "bookmarkStart": return serializeBookmarkMarker(child);
292
+ case "bookmarkEnd": return serializeBookmarkMarker(child);
293
+ case "inlineWrapper": return serializeParagraphContent(child, disposition);
294
+ case "preservedInline": return child.xml;
295
+ default: return child;
296
+ }
351
297
  }
352
298
  /**
353
299
  * Serialize a hyperlink (w:hyperlink)
354
300
  */
355
301
  function serializeHyperlink(hyperlink, disposition = "kept") {
356
- const childrenXml = hyperlink.children.map((child) => serializeHyperlinkChild(child, (run) => serializeInlineRun(run, disposition))).join("");
302
+ const childrenXml = hyperlink.children.map((child) => serializeHyperlinkChild(child, disposition)).join("");
357
303
  return `<w:hyperlink${hyperlinkAttributes(hyperlink)}>${childrenXml}</w:hyperlink>`;
358
304
  }
359
- /**
360
- * Serialize bookmark start (w:bookmarkStart)
361
- */
362
- function serializeBookmarkStart(bookmark) {
363
- return `<w:bookmarkStart ${bookmarkRangeAttributes(bookmark).join(" ")}/>`;
364
- }
365
- /**
366
- * Serialize bookmark end (w:bookmarkEnd)
367
- */
368
- function serializeBookmarkEnd(bookmark) {
369
- return `<w:bookmarkEnd ${markupRangeAttributes(bookmark).join(" ")}/>`;
370
- }
371
305
  /** Serialize a simple field without changing its authored OOXML field form. */
372
306
  function serializeSimpleField(field) {
373
307
  const attrs = [`w:instr="${escapeXmlAttribute(field.instruction)}"`, ...fieldStateAttributes(field)];
374
308
  const contentXml = field.content.map((item) => {
375
- if (item.type === "run") return serializeRun(item);
376
- return item.type === "hyperlink" ? serializeHyperlink(item) : item.xml;
309
+ switch (item.type) {
310
+ case "run": return serializeRun(item);
311
+ case "hyperlink": return serializeHyperlink(item);
312
+ case "inlineWrapper": return serializeParagraphContent(item);
313
+ case "preservedInline": return item.xml;
314
+ default: return item;
315
+ }
377
316
  }).join("");
378
317
  return `<w:fldSimple ${attrs.join(" ")}>${contentXml}</w:fldSimple>`;
379
318
  }
@@ -399,56 +338,6 @@ function serializeComplexField(field) {
399
338
  return parts.join("");
400
339
  }
401
340
  /**
402
- * Synthesize a `<w:sdtPr>` from the modeled {@link SdtProperties}.
403
- *
404
- * Only reached for an inline SDT that carries no captured `rawPropertiesXml`
405
- * (constructed programmatically rather than parsed from a DOCX). Mirrors the
406
- * block-SDT fallback: emit `w:id` first so the parsed numeric id survives,
407
- * then the shared identity fields, then the type-defining marker.
408
- */
409
- function synthesizeInlineSdtPr(props) {
410
- const prParts = [];
411
- if (typeof props.id === "number") prParts.push(`<w:id w:val="${props.id}"/>`);
412
- if (props.alias) prParts.push(`<w:alias w:val="${escapeXmlAttribute(props.alias)}"/>`);
413
- if (props.tag) prParts.push(`<w:tag w:val="${escapeXmlAttribute(props.tag)}"/>`);
414
- if (props.lock && props.lock !== "unlocked") prParts.push(`<w:lock w:val="${props.lock}"/>`);
415
- if (props.placeholder) prParts.push(`<w:placeholder><w:docPart w:val="${escapeXmlAttribute(props.placeholder)}"/></w:placeholder>`);
416
- if (props.showingPlaceholder) prParts.push("<w:showingPlcHdr/>");
417
- switch (props.sdtType) {
418
- case "plainText":
419
- prParts.push("<w:text/>");
420
- break;
421
- case "date": {
422
- const fullDateAttr = props.dateValueISO ? ` w:fullDate="${escapeXmlAttribute(props.dateValueISO)}"` : "";
423
- const formatChild = props.dateFormat ? `<w:dateFormat w:val="${escapeXmlAttribute(props.dateFormat)}"/>` : "";
424
- if (fullDateAttr || formatChild) prParts.push(`<w:date${fullDateAttr}>${formatChild}</w:date>`);
425
- else prParts.push("<w:date/>");
426
- break;
427
- }
428
- case "dropdown": {
429
- const items = (props.listItems ?? []).map((i) => `<w:listItem w:displayText="${escapeXmlAttribute(i.displayText)}" w:value="${escapeXmlAttribute(i.value)}"/>`).join("");
430
- prParts.push(`<w:dropDownList>${items}</w:dropDownList>`);
431
- break;
432
- }
433
- case "comboBox": {
434
- const items = (props.listItems ?? []).map((i) => `<w:listItem w:displayText="${escapeXmlAttribute(i.displayText)}" w:value="${escapeXmlAttribute(i.value)}"/>`).join("");
435
- prParts.push(`<w:comboBox>${items}</w:comboBox>`);
436
- break;
437
- }
438
- case "checkbox":
439
- prParts.push(`<w14:checkbox><w14:checked w14:val="${props.checked ? "1" : "0"}"/></w14:checkbox>`);
440
- break;
441
- case "picture":
442
- prParts.push("<w:picture/>");
443
- break;
444
- case "richText":
445
- case "buildingBlockGallery":
446
- case "group":
447
- case "unknown": break;
448
- }
449
- return `<w:sdtPr>${prParts.join("")}</w:sdtPr>`;
450
- }
451
- /**
452
341
  * Serialize an inline SDT (w:sdt).
453
342
  *
454
343
  * Replays the captured `<w:sdtPr>` / `<w:sdtEndPr>` verbatim so unmodeled
@@ -459,7 +348,7 @@ function synthesizeInlineSdtPr(props) {
459
348
  */
460
349
  function serializeInlineSdt(sdt, disposition = "kept") {
461
350
  const props = sdt.properties;
462
- const contentXml = sdt.content.map((item) => {
351
+ return serializeSdtWrapper(props, sdt.content.map((item) => {
463
352
  switch (item.type) {
464
353
  case "run": return serializeInlineRun(item, disposition);
465
354
  case "hyperlink": return serializeHyperlink(item, disposition);
@@ -467,6 +356,8 @@ function serializeInlineSdt(sdt, disposition = "kept") {
467
356
  case "complexField": return serializeComplexField(item);
468
357
  case "inlineSdt": return serializeInlineSdt(item, disposition);
469
358
  case "inlineWrapper": return serializeParagraphContent(item, disposition);
359
+ case "bookmarkStart": return serializeBookmarkMarker(item);
360
+ case "bookmarkEnd": return serializeBookmarkMarker(item);
470
361
  case "insertion": return serializeTrackedChange("ins", item);
471
362
  case "deletion": return serializeTrackedChange("del", item);
472
363
  case "moveFrom": return serializeTrackedChange("moveFrom", item);
@@ -475,14 +366,7 @@ function serializeInlineSdt(sdt, disposition = "kept") {
475
366
  case "preservedInline": return item.xml;
476
367
  default: return item;
477
368
  }
478
- }).join("");
479
- const baseSdtPr = props.rawPropertiesXml && isSingleWellFormedElement(props.rawPropertiesXml, "sdtPr") ? props.rawPropertiesXml : synthesizeInlineSdtPr(props);
480
- const dateFullDate = props.sdtType === "date" && props.dateValueISO ? props.dateValueISO : void 0;
481
- const dropdownLastValue = (props.sdtType === "dropdown" || props.sdtType === "comboBox") && typeof props.dropdownLastValue === "string" ? props.dropdownLastValue : void 0;
482
- return `<w:sdt>${reconcileRawSdtPr(baseSdtPr, props, {
483
- ...dateFullDate !== void 0 ? { dateFullDate } : {},
484
- ...dropdownLastValue !== void 0 ? { dropdownLastValue } : {}
485
- })}${props.rawEndPropertiesXml && isSingleWellFormedElement(props.rawEndPropertiesXml, "sdtEndPr") ? props.rawEndPropertiesXml : ""}<w:sdtContent>${contentXml}</w:sdtContent></w:sdt>`;
369
+ }).join(""));
486
370
  }
487
371
  function serializeMoveRangeStart(tag, marker) {
488
372
  return `<w:${tag} ${moveBookmarkAttributes(marker).join(" ")}/>`;
@@ -534,8 +418,8 @@ function serializeTrackedChange(tag, change) {
534
418
  case "deletion":
535
419
  case "moveFrom":
536
420
  case "moveTo": return serializeTrackedChange(trackedChangeTag(item), item);
537
- case "bookmarkStart": return serializeBookmarkStart(item);
538
- case "bookmarkEnd": return serializeBookmarkEnd(item);
421
+ case "bookmarkStart":
422
+ case "bookmarkEnd": return serializeBookmarkMarker(item);
539
423
  case "preservedInline": return item.xml;
540
424
  case "inlineWrapper":
541
425
  case "inlineSdt": return serializeParagraphContent(item, disposition);
@@ -557,7 +441,7 @@ function serializeTrackedChange(tag, change) {
557
441
  for (const item of change.content) {
558
442
  if (item.type === "hyperlink") {
559
443
  flushPending();
560
- const childrenXml = item.children.map((child) => serializeHyperlinkChild(child, serializeContentRun)).join("");
444
+ const childrenXml = item.children.map((child) => serializeHyperlinkChild(child, disposition)).join("");
561
445
  segments.push(`<w:hyperlink${hyperlinkAttributes(item)}>${open}${childrenXml}${close}</w:hyperlink>`);
562
446
  continue;
563
447
  }
@@ -566,6 +450,32 @@ function serializeTrackedChange(tag, change) {
566
450
  flushPending();
567
451
  return segments.join("");
568
452
  }
453
+ const TAGGED_WRAPPER_PROPERTY_NAMES = {
454
+ smartTag: /* @__PURE__ */ new Set(["smartTagPr"]),
455
+ customXml: /* @__PURE__ */ new Set(["customXmlPr"])
456
+ };
457
+ /**
458
+ * Emit a `w:smartTag` or a run-level `w:customXml` around content already written.
459
+ *
460
+ * `w:element` is required by both content models, so it is always spelled;
461
+ * `w:uri` is written only when the source stated one, because inventing an
462
+ * empty namespace would change what the tag names. The properties element
463
+ * comes first, as both content models declare it.
464
+ *
465
+ * The captured properties are replayed only when they are structurally the one
466
+ * element they claim to be. The layer rides a ProseMirror mark, so a paste from
467
+ * outside the editor can put any string there, and a string that closed the
468
+ * wrapper early would splice sibling markup into the part.
469
+ */
470
+ function serializeTaggedWrapper(kind, wrapper, inner) {
471
+ const uri = wrapper.uri === void 0 ? "" : ` w:uri="${escapeXmlAttribute(wrapper.uri)}"`;
472
+ const properties = sanitizeCapturedXmlElement(wrapper.propertiesXml, {
473
+ allowedLocalNames: TAGGED_WRAPPER_PROPERTY_NAMES[kind],
474
+ allowedNamespaceUris: WORDPROCESSINGML_NAMESPACE,
475
+ inheritedNamespaceScope: OOXML_NAMESPACE_SCOPE
476
+ }) ?? "";
477
+ return `<w:${kind}${uri} w:element="${escapeXmlAttribute(wrapper.element)}">${properties}${inner}</w:${kind}>`;
478
+ }
569
479
  /** Emit the `<w:commentReference>` run Word places after a comment range end. */
570
480
  function serializeCommentReferenceRun(id) {
571
481
  return `<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="${id}"/></w:r>`;
@@ -582,8 +492,8 @@ function serializeParagraphContent(content, disposition = "kept") {
582
492
  switch (content.type) {
583
493
  case "run": return serializeInlineRun(content, disposition);
584
494
  case "hyperlink": return serializeHyperlink(content, disposition);
585
- case "bookmarkStart": return serializeBookmarkStart(content);
586
- case "bookmarkEnd": return serializeBookmarkEnd(content);
495
+ case "bookmarkStart":
496
+ case "bookmarkEnd": return serializeBookmarkMarker(content);
587
497
  case "simpleField": return serializeSimpleField(content);
588
498
  case "complexField": return serializeComplexField(content);
589
499
  case "inlineSdt": return serializeInlineSdt(content, disposition);
@@ -605,7 +515,9 @@ function serializeParagraphContent(content, disposition = "kept") {
605
515
  const tag = content.control === "override" ? "bdo" : "dir";
606
516
  return `<w:${tag}${content.direction === void 0 ? "" : ` w:val="${escapeXmlAttribute(content.direction)}"`}>${inner}</w:${tag}>`;
607
517
  }
608
- default: return content.kind;
518
+ case "smartTag": return serializeTaggedWrapper("smartTag", content, inner);
519
+ case "customXml": return serializeTaggedWrapper("customXml", content, inner);
520
+ default: return content;
609
521
  }
610
522
  }
611
523
  case "mathEquation": return content.ommlXml || "";
@@ -720,17 +632,5 @@ function createTextParagraph(text, paragraphFormatting, textFormatting) {
720
632
  }]
721
633
  };
722
634
  }
723
- /**
724
- * Check if paragraph is a list item
725
- */
726
- function isListParagraph(paragraph) {
727
- return paragraph.formatting?.numPr !== void 0;
728
- }
729
- /**
730
- * Get list level of a paragraph (0-8, or -1 if not a list)
731
- */
732
- function getListLevel(paragraph) {
733
- return paragraph.formatting?.numPr?.ilvl ?? -1;
734
- }
735
635
  //#endregion
736
- export { createEmptyParagraph, createTextParagraph, getListLevel, hasParagraphContent, hasParagraphFormatting, isListParagraph, serializeParagraph, serializeParagraphFormatting, serializeParagraphs };
636
+ export { createEmptyParagraph, createTextParagraph, hasParagraphContent, hasParagraphFormatting, serializeParagraph, serializeParagraphFormatting, serializeParagraphs };
@@ -19,10 +19,6 @@ declare function serializeRun(run: document_d_exports.Run): string;
19
19
  * @returns XML string for all runs
20
20
  */
21
21
  declare function serializeRuns(runs: document_d_exports.Run[]): string;
22
- /**
23
- * Check if a run has any content
24
- */
25
- declare function hasRunContent(run: document_d_exports.Run): boolean;
26
22
  /**
27
23
  * Check if a run has formatting
28
24
  */
@@ -48,4 +44,4 @@ declare function createBreakRun(breakType?: "page" | "column" | "textWrapping",
48
44
  */
49
45
  declare function createTabRun(formatting?: document_d_exports.TextFormatting): document_d_exports.Run;
50
46
  //#endregion
51
- export { createBreakRun, createEmptyRun, createTabRun, createTextRun, getRunPlainText, hasRunContent, hasRunFormatting, resetAutoIdCounter, serializeRun, serializeRuns };
47
+ export { createBreakRun, createEmptyRun, createTabRun, createTextRun, getRunPlainText, hasRunFormatting, resetAutoIdCounter, serializeRun, serializeRuns };