@stll/folio-core 0.62.0 → 0.63.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 (1333) hide show
  1. package/README.md +17 -6
  2. package/dist/ai-edits/apply.d.ts +40 -10
  3. package/dist/ai-edits/apply.js +563 -219
  4. package/dist/ai-edits/batch-claims.d.ts +13 -4
  5. package/dist/ai-edits/batch-claims.js +6 -6
  6. package/dist/ai-edits/block-identity.d.ts +3 -4
  7. package/dist/ai-edits/block-identity.js +15 -1
  8. package/dist/ai-edits/blockRange.d.ts +7 -7
  9. package/dist/ai-edits/blockRange.js +2 -1
  10. package/dist/ai-edits/character-boundaries.d.ts +5 -6
  11. package/dist/ai-edits/clean-text.d.ts +8 -8
  12. package/dist/ai-edits/comment-lifecycle.d.ts +15 -6
  13. package/dist/ai-edits/comment-lifecycle.js +74 -23
  14. package/dist/ai-edits/headless.d.ts +42 -39
  15. package/dist/ai-edits/headless.js +157 -114
  16. package/dist/ai-edits/index.d.ts +2 -1
  17. package/dist/ai-edits/index.js +2 -1
  18. package/dist/ai-edits/inline-emphasis.d.ts +5 -6
  19. package/dist/ai-edits/minimal-replacement.d.ts +12 -13
  20. package/dist/ai-edits/newListNumbering.d.ts +16 -3
  21. package/dist/ai-edits/newListNumbering.js +97 -34
  22. package/dist/ai-edits/note-references.d.ts +14 -14
  23. package/dist/ai-edits/note-story-inventory.d.ts +2 -2
  24. package/dist/ai-edits/pending-suggestions.d.ts +8 -8
  25. package/dist/ai-edits/pending-suggestions.js +5 -1
  26. package/dist/ai-edits/read.d.ts +10 -11
  27. package/dist/ai-edits/read.js +6 -0
  28. package/dist/ai-edits/referenceClassification.d.ts +2 -2
  29. package/dist/ai-edits/removed-blocks.d.ts +20 -0
  30. package/dist/ai-edits/removed-blocks.js +69 -0
  31. package/dist/ai-edits/result-validation.d.ts +4 -5
  32. package/dist/ai-edits/result-validation.js +4 -3
  33. package/dist/ai-edits/revisionStretches.d.ts +3 -3
  34. package/dist/ai-edits/revisionStretches.js +17 -0
  35. package/dist/ai-edits/scoped-reading.d.ts +3 -4
  36. package/dist/ai-edits/snapshot.d.ts +24 -23
  37. package/dist/ai-edits/snapshot.js +44 -30
  38. package/dist/ai-edits/table-cell-mutations.d.ts +6 -6
  39. package/dist/ai-edits/table-cell-mutations.js +7 -4
  40. package/dist/ai-edits/table-geometry.d.ts +6 -6
  41. package/dist/ai-edits/table-mutation-plan.d.ts +5 -5
  42. package/dist/ai-edits/table-mutation-plan.js +1 -4
  43. package/dist/ai-edits/table-row-column-mutations.d.ts +16 -16
  44. package/dist/ai-edits/table-targets.d.ts +8 -9
  45. package/dist/ai-edits/table-template.d.ts +6 -6
  46. package/dist/ai-edits/types.d.ts +48 -44
  47. package/dist/ai-edits/word-diff.d.ts +12 -13
  48. package/dist/ai-edits/word-diff.js +23 -21
  49. package/dist/ai-suggestions/apply.d.ts +3 -3
  50. package/dist/ai-suggestions/apply.js +0 -12
  51. package/dist/ai-suggestions/conflict.d.ts +4 -5
  52. package/dist/ai-suggestions/conflict.js +3 -1
  53. package/dist/ai-suggestions/text-positions.d.ts +3 -4
  54. package/dist/ai-suggestions/types.d.ts +13 -14
  55. package/dist/compare/column-alignment.d.ts +4 -5
  56. package/dist/compare/compare.d.ts +12 -12
  57. package/dist/compare/compare.js +2 -1
  58. package/dist/compare/content-alignment.d.ts +16 -16
  59. package/dist/compare/content-alignment.js +29 -25
  60. package/dist/compare/content-types.d.ts +23 -24
  61. package/dist/compare/content.d.ts +27 -27
  62. package/dist/compare/content.js +6 -3
  63. package/dist/compare/formatting.d.ts +2 -2
  64. package/dist/compare/import-style-closure.d.ts +2 -2
  65. package/dist/compare/inline-atom-resources.d.ts +2 -3
  66. package/dist/compare/inline-atoms.d.ts +6 -7
  67. package/dist/compare/inline-provenance.d.ts +6 -7
  68. package/dist/compare/inline-provenance.js +22 -20
  69. package/dist/compare/inserted-resource-snapshot.d.ts +3 -3
  70. package/dist/compare/plan.d.ts +5 -6
  71. package/dist/compare/plan.js +5 -6
  72. package/dist/compare/reproducible-package.d.ts +2 -3
  73. package/dist/compare/reproducible-package.js +1 -1
  74. package/dist/compare/scenario.d.ts +9 -9
  75. package/dist/compare/section-boundary-properties.d.ts +6 -6
  76. package/dist/compare/section-boundary-properties.js +4 -4
  77. package/dist/compare/style-resources.d.ts +5 -6
  78. package/dist/compare/types.d.ts +29 -28
  79. package/dist/compare/types.js +14 -7
  80. package/dist/compare/verification.d.ts +11 -11
  81. package/dist/content-controls/checkboxDisplay.d.ts +2 -2
  82. package/dist/content-controls/checkboxDisplay.js +2 -1
  83. package/dist/content-controls/errors.d.ts +8 -7
  84. package/dist/content-controls/errors.js +6 -3
  85. package/dist/content-controls/findContentControls.d.ts +7 -8
  86. package/dist/content-controls/mutateContentControls.d.ts +17 -6
  87. package/dist/content-controls/mutateContentControls.js +3 -2
  88. package/dist/controller/activeEditorStory.d.ts +4 -5
  89. package/dist/controller/canonicalClipboard.d.ts +3 -3
  90. package/dist/controller/canonicalClipboard.js +3 -1
  91. package/dist/controller/canonicalClipboardResources.d.ts +3 -3
  92. package/dist/controller/canonicalClipboardResources.js +3 -2
  93. package/dist/controller/canonicalComments.d.ts +7 -6
  94. package/dist/controller/canonicalComments.js +2 -1
  95. package/dist/controller/canonicalComposition.d.ts +2 -2
  96. package/dist/controller/canonicalComposition.js +11 -14
  97. package/dist/controller/canonicalInlineProjection.d.ts +11 -10
  98. package/dist/controller/canonicalInlineProjection.js +70 -38
  99. package/dist/controller/canonicalInput.d.ts +3 -3
  100. package/dist/controller/canonicalInput.js +1 -3
  101. package/dist/controller/canonicalInputTimer.d.ts +5 -6
  102. package/dist/controller/canonicalListRendering.d.ts +6 -5
  103. package/dist/controller/canonicalOperations.d.ts +6 -6
  104. package/dist/controller/canonicalPublicOperations.d.ts +13 -13
  105. package/dist/controller/canonicalPublicOperations.js +14 -15
  106. package/dist/controller/canonicalReview.d.ts +2 -2
  107. package/dist/controller/canonicalSelection.d.ts +2 -2
  108. package/dist/controller/canonicalSelection.js +15 -0
  109. package/dist/controller/canonicalSession.d.ts +25 -17
  110. package/dist/controller/canonicalSession.js +231 -43
  111. package/dist/controller/canonicalStoryEditor.d.ts +2 -2
  112. package/dist/controller/canonicalStructure.d.ts +3 -3
  113. package/dist/controller/canonicalStructure.js +144 -21
  114. package/dist/controller/canonicalTocSelection.d.ts +2 -2
  115. package/dist/controller/collaborationModules.d.ts +2 -3
  116. package/dist/controller/committedLayoutDiff.d.ts +4 -5
  117. package/dist/controller/contentControlWidgetController.d.ts +7 -8
  118. package/dist/controller/folioEditor.d.ts +6 -6
  119. package/dist/controller/folioEditorEvents.d.ts +7 -8
  120. package/dist/controller/fontReadiness.d.ts +12 -12
  121. package/dist/controller/fontReadiness.js +123 -31
  122. package/dist/controller/headerFooterEditorManager.d.ts +9 -10
  123. package/dist/controller/headerFooterEditorManager.js +3 -10
  124. package/dist/controller/hiddenEditorApi.d.ts +5 -5
  125. package/dist/controller/hiddenEditorManager.d.ts +15 -14
  126. package/dist/controller/hiddenEditorManager.js +4 -1
  127. package/dist/controller/hyphenationReadiness.d.ts +4 -5
  128. package/dist/controller/hyphenationReadiness.js +0 -1
  129. package/dist/controller/latestRequestGate.d.ts +3 -4
  130. package/dist/controller/layoutPipeline.d.ts +7 -8
  131. package/dist/controller/layoutPipeline.js +16 -5
  132. package/dist/controller/layoutRunOptions.d.ts +4 -5
  133. package/dist/controller/layoutScheduler.d.ts +8 -9
  134. package/dist/controller/layoutSession.d.ts +7 -7
  135. package/dist/controller/noteEditorManager.d.ts +7 -7
  136. package/dist/controller/noteEditorManager.js +0 -1
  137. package/dist/controller/readOnlySelection.d.ts +12 -0
  138. package/dist/controller/readOnlySelection.js +62 -0
  139. package/dist/display-list/build/buildContext.d.ts +8 -6
  140. package/dist/display-list/build/buildDisplayList.d.ts +6 -6
  141. package/dist/display-list/build/buildDisplayList.js +20 -2
  142. package/dist/display-list/build/colors.d.ts +6 -7
  143. package/dist/display-list/build/commentAnnotations.d.ts +3 -4
  144. package/dist/display-list/build/floatingImages.d.ts +5 -6
  145. package/dist/display-list/build/fontTable.d.ts +4 -5
  146. package/dist/display-list/build/fontTable.js +2 -1
  147. package/dist/display-list/build/furniture.d.ts +7 -6
  148. package/dist/display-list/build/furniture.js +1 -0
  149. package/dist/display-list/build/glyphs.d.ts +7 -7
  150. package/dist/display-list/build/glyphs.js +17 -26
  151. package/dist/display-list/build/headerFooterPrimitives.d.ts +4 -5
  152. package/dist/display-list/build/headerFooterPrimitives.js +5 -1
  153. package/dist/display-list/build/imagePrimitives.d.ts +5 -5
  154. package/dist/display-list/build/imagePrimitives.js +0 -10
  155. package/dist/display-list/build/pageBorderPrimitives.d.ts +4 -5
  156. package/dist/display-list/build/pageBorderPrimitives.js +8 -11
  157. package/dist/display-list/build/pageFurniture.d.ts +6 -7
  158. package/dist/display-list/build/pageFurniture.js +5 -1
  159. package/dist/display-list/build/paragraphPrimitives.d.ts +5 -4
  160. package/dist/display-list/build/paragraphPrimitives.js +138 -108
  161. package/dist/display-list/build/previewPrimitives.d.ts +2 -3
  162. package/dist/display-list/build/previewPrimitives.js +38 -9
  163. package/dist/display-list/build/regions.d.ts +5 -5
  164. package/dist/display-list/build/storyPrimitives.d.ts +4 -4
  165. package/dist/display-list/build/strokes.d.ts +10 -10
  166. package/dist/display-list/build/tablePrimitives.d.ts +5 -5
  167. package/dist/display-list/build/tablePrimitives.js +15 -2
  168. package/dist/display-list/build/textBoxPrimitives.d.ts +3 -4
  169. package/dist/display-list/build/textBoxPrimitives.js +4 -0
  170. package/dist/display-list/build/textDecorations.d.ts +10 -11
  171. package/dist/display-list/build/unsupported.d.ts +4 -5
  172. package/dist/display-list/build/watermarkPrimitives.d.ts +5 -4
  173. package/dist/display-list/build/watermarkPrimitives.js +5 -17
  174. package/dist/display-list/dom/renderDisplayListToDom.d.ts +8 -8
  175. package/dist/display-list/dom/renderDisplayListToDom.js +52 -10
  176. package/dist/display-list/editor/displayListPagePainter.d.ts +4 -5
  177. package/dist/display-list/editor/pageRenderer.d.ts +5 -6
  178. package/dist/display-list/editor/pageRenderer.js +1 -0
  179. package/dist/display-list/html/renderDisplayListToHtml.d.ts +5 -6
  180. package/dist/display-list/pageResourceOwnership.d.ts +4 -0
  181. package/dist/display-list/pageResourceOwnership.js +32 -0
  182. package/dist/display-list/primitives.d.ts +13 -13
  183. package/dist/display-list/primitives.js +2 -0
  184. package/dist/display-list/selectDisplayPages.d.ts +2 -3
  185. package/dist/display-list/types.d.ts +54 -33
  186. package/dist/document-operations.d.ts +59 -46
  187. package/dist/document-operations.js +41 -4
  188. package/dist/document-stories.d.ts +3 -4
  189. package/dist/docx/altChunk.d.ts +5 -6
  190. package/dist/docx/appVersionNormalization.d.ts +6 -5
  191. package/dist/docx/appVersionNormalization.js +2 -1
  192. package/dist/docx/archiveInflation.d.ts +16 -16
  193. package/dist/docx/archiveInflation.js +1 -1
  194. package/dist/docx/attributeRemainder.d.ts +10 -9
  195. package/dist/docx/attributeRemainder.js +36 -1
  196. package/dist/docx/blockContentParser.d.ts +15 -7
  197. package/dist/docx/blockContentParser.js +5 -6
  198. package/dist/docx/blockCustomXmlShell.d.ts +2 -3
  199. package/dist/docx/blockPlainText.d.ts +3 -4
  200. package/dist/docx/blockPlainText.js +5 -1
  201. package/dist/docx/bookmarkIdNormalization.d.ts +2 -3
  202. package/dist/docx/bookmarkIds.d.ts +5 -6
  203. package/dist/docx/bookmarkParser.d.ts +20 -21
  204. package/dist/docx/bookmarkParser.js +3 -2
  205. package/dist/docx/borderParser.d.ts +2 -3
  206. package/dist/docx/builtInStyles.d.ts +11 -11
  207. package/dist/docx/bulletMarkers.d.ts +8 -3
  208. package/dist/docx/bulletMarkers.js +3 -43
  209. package/dist/docx/canonicalModel.d.ts +2 -0
  210. package/dist/docx/canonicalModel.js +1 -0
  211. package/dist/docx/canonicalResourceSave.d.ts +5 -4
  212. package/dist/docx/canonicalResourceSave.js +2 -1
  213. package/dist/docx/canonicalSave.d.ts +8 -6
  214. package/dist/docx/canonicalSave.js +2 -1
  215. package/dist/docx/canonicalSessionInput.d.ts +5 -4
  216. package/dist/docx/canonicalSessionInput.js +2 -1
  217. package/dist/docx/canonicalStoryRepack.d.ts +2 -2
  218. package/dist/docx/chartPreview.d.ts +6 -0
  219. package/dist/docx/chartPreview.js +302 -0
  220. package/dist/docx/commentAnchorIndex.d.ts +6 -5
  221. package/dist/docx/commentAnchorIndex.js +236 -1
  222. package/dist/docx/commentIdNormalization.d.ts +4 -5
  223. package/dist/docx/commentParser.d.ts +4 -5
  224. package/dist/docx/commentParser.js +2 -1
  225. package/dist/docx/commentRangeIntegrity.d.ts +6 -5
  226. package/dist/docx/commentRangeIntegrity.js +17 -1
  227. package/dist/docx/commentRangeJoin.d.ts +2 -3
  228. package/dist/docx/commentReferenceCompletion.d.ts +2 -3
  229. package/dist/docx/commentReferenceNormalization.d.ts +4 -4
  230. package/dist/docx/commentReplyMarkers.d.ts +3 -4
  231. package/dist/docx/commentTextParagraph.d.ts +2 -3
  232. package/dist/docx/commentThreadKey.d.ts +2 -3
  233. package/dist/docx/compatibility.d.ts +12 -13
  234. package/dist/docx/conformance.d.ts +2 -3
  235. package/dist/docx/conformance.js +1 -1
  236. package/dist/docx/containerChildren.d.ts +18 -18
  237. package/dist/docx/containerChildren.gen.d.ts +5 -6
  238. package/dist/docx/contentTypeRegistry.d.ts +2 -2
  239. package/dist/docx/corePropertiesParser.d.ts +2 -2
  240. package/dist/docx/danglingRelationshipReferences.d.ts +3 -3
  241. package/dist/docx/defaultParagraphStyle.d.ts +6 -6
  242. package/dist/docx/diagramPreview.d.ts +5 -4
  243. package/dist/docx/diagramPreview.js +8 -3
  244. package/dist/docx/documentClone.js +1 -2
  245. package/dist/docx/documentGrid.d.ts +2 -2
  246. package/dist/docx/documentParser.d.ts +11 -11
  247. package/dist/docx/documentSectionFacts.d.ts +5 -6
  248. package/dist/docx/drawingAnchor.d.ts +14 -14
  249. package/dist/docx/drawingGroupChildren.d.ts +8 -8
  250. package/dist/docx/drawingIdNormalization.d.ts +3 -4
  251. package/dist/docx/drawingRelationships.d.ts +2 -2
  252. package/dist/docx/drawingUtils.d.ts +16 -17
  253. package/dist/docx/drawingUtils.js +4 -2
  254. package/dist/docx/encryption/agileDecryption.d.ts +2 -3
  255. package/dist/docx/encryption/compoundFile.d.ts +5 -6
  256. package/dist/docx/encryption/containerFormat.d.ts +4 -5
  257. package/dist/docx/encryption/cryptoBytes.d.ts +8 -9
  258. package/dist/docx/encryption/encryptionInfo.d.ts +5 -6
  259. package/dist/docx/encryption/errors.d.ts +7 -6
  260. package/dist/docx/encryption/errors.js +2 -1
  261. package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -6
  262. package/dist/docx/ensureParaIds.d.ts +8 -7
  263. package/dist/docx/ensureParaIds.js +3 -2
  264. package/dist/docx/fieldParser.d.ts +32 -33
  265. package/dist/docx/fieldParser.js +8 -6
  266. package/dist/docx/fieldState.d.ts +5 -6
  267. package/dist/docx/foldedListNumberFields.d.ts +15 -16
  268. package/dist/docx/fontTableParser.d.ts +2 -3
  269. package/dist/docx/footnoteParser.d.ts +11 -11
  270. package/dist/docx/footnoteParser.js +19 -0
  271. package/dist/docx/graphicFrameLocks.d.ts +5 -6
  272. package/dist/docx/groupDrawingParser.d.ts +4 -5
  273. package/dist/docx/groupDrawingParser.js +10 -5
  274. package/dist/docx/headerFooterParser.d.ts +14 -14
  275. package/dist/docx/headerFooterRefParser.d.ts +6 -7
  276. package/dist/docx/headerFooterReferenceNormalization.d.ts +5 -5
  277. package/dist/docx/headerFooterVerbatim.d.ts +16 -16
  278. package/dist/docx/hyperlinkParser.d.ts +20 -21
  279. package/dist/docx/hyperlinkParser.js +54 -11
  280. package/dist/docx/imageParser.d.ts +19 -19
  281. package/dist/docx/imageParser.js +6 -3
  282. package/dist/docx/imageRawXml.d.ts +9 -10
  283. package/dist/docx/importedIdCollisions.d.ts +3 -4
  284. package/dist/docx/index.d.ts +1 -0
  285. package/dist/docx/inlineContentRemovals.d.ts +2 -3
  286. package/dist/docx/inlineWrapperContent.d.ts +38 -33
  287. package/dist/docx/inlineWrapperContent.js +29 -23
  288. package/dist/docx/inlineWrapperParser.d.ts +4 -5
  289. package/dist/docx/inlineWrapperParser.js +14 -0
  290. package/dist/docx/linkedSdtPreservation.d.ts +6 -4
  291. package/dist/docx/linkedSdtPreservation.js +2 -1
  292. package/dist/docx/listMarkerComputation.d.ts +4 -5
  293. package/dist/docx/listModelNormalization.d.ts +2 -2
  294. package/dist/docx/listModelNormalization.js +15 -11
  295. package/dist/docx/listNumberingInstances.d.ts +8 -8
  296. package/dist/docx/listRendering.d.ts +5 -6
  297. package/dist/docx/listTemplate.d.ts +5 -5
  298. package/dist/docx/markupRangeMarker.d.ts +21 -4
  299. package/dist/docx/markupRangeMarker.js +35 -1
  300. package/dist/docx/mathToMathml.d.ts +8 -3
  301. package/dist/docx/mathToMathml.js +72 -4
  302. package/dist/docx/metadataPrivacy.d.ts +17 -16
  303. package/dist/docx/metadataPrivacy.js +7 -5
  304. package/dist/docx/metafileRaster.d.ts +4 -5
  305. package/dist/docx/metafileSvg.d.ts +2 -3
  306. package/dist/docx/metafileSvg.js +28 -39
  307. package/dist/docx/metafileSvgShared.d.ts +27 -0
  308. package/dist/docx/metafileSvgShared.js +28 -0
  309. package/dist/docx/modelValidation.d.ts +5 -6
  310. package/dist/docx/modelValidation.js +144 -1
  311. package/dist/docx/newImage.d.ts +2 -3
  312. package/dist/docx/nonVisualDrawingProps.d.ts +3 -3
  313. package/dist/docx/normalizeBaseDirection.d.ts +2 -3
  314. package/dist/docx/normalizeBaseDirection.js +6 -2
  315. package/dist/docx/noteIds.d.ts +2 -3
  316. package/dist/docx/notePropertiesParser.d.ts +3 -4
  317. package/dist/docx/noteReferenceMark.d.ts +6 -6
  318. package/dist/docx/noteReferenceStyles.d.ts +7 -8
  319. package/dist/docx/noteReferenceStyles.js +0 -13
  320. package/dist/docx/numberingIds.d.ts +3 -3
  321. package/dist/docx/numberingParser.d.ts +15 -16
  322. package/dist/docx/numberingParser.js +6 -30
  323. package/dist/docx/numberingReference.d.ts +2 -2
  324. package/dist/docx/numberingReferenceNormalization.d.ts +5 -5
  325. package/dist/docx/numberingReferenceNormalization.js +6 -9
  326. package/dist/docx/numericIdAllocator.d.ts +2 -2
  327. package/dist/docx/numericIdAllocator.js +2 -1
  328. package/dist/docx/numericIdNormalization.d.ts +3 -3
  329. package/dist/docx/numericIdNormalization.js +0 -1
  330. package/dist/docx/ooxmlCounterFormatter.d.ts +3 -4
  331. package/dist/docx/opaqueCarrier.d.ts +5 -6
  332. package/dist/docx/packageParts.d.ts +8 -9
  333. package/dist/docx/paraIdAttribute.d.ts +11 -12
  334. package/dist/docx/paraIdRangeNormalization.d.ts +3 -4
  335. package/dist/docx/paragraphMarkPropertyPresence.d.ts +4 -5
  336. package/dist/docx/paragraphParser.d.ts +9 -9
  337. package/dist/docx/paragraphParser.js +45 -23
  338. package/dist/docx/paragraphProperties.d.ts +2 -3
  339. package/dist/docx/paragraphProperties.js +15 -2
  340. package/dist/docx/paragraphPropertySource.d.ts +58 -57
  341. package/dist/docx/paragraphPropertySource.js +39 -2
  342. package/dist/docx/paragraphTextBoxEnrichment.d.ts +2 -3
  343. package/dist/docx/paragraphTextBoxEnrichment.js +21 -6
  344. package/dist/docx/paragraphTraversal.d.ts +19 -10
  345. package/dist/docx/paragraphTraversal.js +110 -75
  346. package/dist/docx/parseContext.d.ts +5 -6
  347. package/dist/docx/parseWarningMessage.d.ts +3 -4
  348. package/dist/docx/parser.d.ts +13 -12
  349. package/dist/docx/parser.js +45 -16
  350. package/dist/docx/parserEnums.d.ts +37 -38
  351. package/dist/docx/preservedRunContent.d.ts +5 -6
  352. package/dist/docx/preservedRunContent.js +16 -0
  353. package/dist/docx/previewBudget.d.ts +6 -6
  354. package/dist/docx/previewBudget.js +1 -1
  355. package/dist/docx/propertyElementAttributes.d.ts +10 -11
  356. package/dist/docx/rasterMime.d.ts +4 -4
  357. package/dist/docx/relsParser.d.ts +20 -21
  358. package/dist/docx/removeHeaderFooterParts.d.ts +2 -2
  359. package/dist/docx/renderedPageBreakNormalization.d.ts +2 -2
  360. package/dist/docx/replyToComment.d.ts +4 -5
  361. package/dist/docx/replyToComment.js +2 -1
  362. package/dist/docx/reviewHistoryNamespace.d.ts +2 -3
  363. package/dist/docx/reviewResolutionProvenance.d.ts +17 -13
  364. package/dist/docx/reviewResolutionProvenance.js +17 -5
  365. package/dist/docx/revisionIdNormalization.d.ts +6 -5
  366. package/dist/docx/revisionIdNormalization.js +2 -1
  367. package/dist/docx/rezip.d.ts +43 -42
  368. package/dist/docx/rezip.js +117 -125
  369. package/dist/docx/runConsolidator.d.ts +7 -7
  370. package/dist/docx/runConsolidator.js +13 -0
  371. package/dist/docx/runParser.d.ts +12 -13
  372. package/dist/docx/runParser.js +31 -10
  373. package/dist/docx/runPayload.d.ts +2 -3
  374. package/dist/docx/runPropertyPresence.d.ts +7 -8
  375. package/dist/docx/saveDiagnostics.d.ts +3 -4
  376. package/dist/docx/sdtProperties.d.ts +6 -7
  377. package/dist/docx/sdtPropertiesPatch.d.ts +2 -3
  378. package/dist/docx/sectionParser.d.ts +15 -16
  379. package/dist/docx/sectionReferenceHistory.d.ts +8 -7
  380. package/dist/docx/sectionReferenceHistory.js +2 -1
  381. package/dist/docx/selectedXmlIdentityScan.d.ts +2 -3
  382. package/dist/docx/selectiveSave.d.ts +3 -4
  383. package/dist/docx/selectiveSave.js +6 -3
  384. package/dist/docx/selectiveSaveFlags.d.ts +5 -6
  385. package/dist/docx/selectiveSaveFlags.js +1 -1
  386. package/dist/docx/selectiveSaveTripwire.d.ts +3 -4
  387. package/dist/docx/selectiveXmlPatch.d.ts +28 -28
  388. package/dist/docx/serializer/blockCustomXmlSerializer.d.ts +2 -3
  389. package/dist/docx/serializer/blockSdtSerializer.d.ts +2 -3
  390. package/dist/docx/serializer/blockSdtSerializer.js +2 -1
  391. package/dist/docx/serializer/borderSerializer.d.ts +2 -2
  392. package/dist/docx/serializer/borderSerializer.js +8 -0
  393. package/dist/docx/serializer/commentSerializer.d.ts +7 -8
  394. package/dist/docx/serializer/documentSerializer.d.ts +13 -14
  395. package/dist/docx/serializer/documentSerializer.js +17 -1
  396. package/dist/docx/serializer/fontTableSerializer.d.ts +2 -3
  397. package/dist/docx/serializer/groupTextBoxWriteBack.d.ts +2 -2
  398. package/dist/docx/serializer/groupTextBoxWriteBack.js +1 -4
  399. package/dist/docx/serializer/headerFooterSerializer.d.ts +2 -2
  400. package/dist/docx/serializer/headerFooterSerializer.js +5 -1
  401. package/dist/docx/serializer/markupRangeAttributes.d.ts +11 -6
  402. package/dist/docx/serializer/markupRangeAttributes.js +33 -6
  403. package/dist/docx/serializer/noteSerializer.d.ts +5 -6
  404. package/dist/docx/serializer/noteSerializer.js +26 -1
  405. package/dist/docx/serializer/numberingSerializer.d.ts +2 -3
  406. package/dist/docx/serializer/numberingSerializer.js +14 -0
  407. package/dist/docx/serializer/paragraphSerializer.d.ts +8 -9
  408. package/dist/docx/serializer/paragraphSerializer.js +33 -20
  409. package/dist/docx/serializer/partNamespaces.d.ts +11 -10
  410. package/dist/docx/serializer/partNamespaces.js +2 -1
  411. package/dist/docx/serializer/runSerializer.d.ts +11 -12
  412. package/dist/docx/serializer/runSerializer.js +7 -2
  413. package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +5 -6
  414. package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +2 -3
  415. package/dist/docx/serializer/settingsSerializer.d.ts +2 -3
  416. package/dist/docx/serializer/settingsSerializer.js +9 -6
  417. package/dist/docx/serializer/stylesSerializer.d.ts +3 -4
  418. package/dist/docx/serializer/stylesSerializer.js +4 -1
  419. package/dist/docx/serializer/tableSerializer.d.ts +18 -18
  420. package/dist/docx/serializer/tableSerializer.js +22 -2
  421. package/dist/docx/serializer/textFormattingSerializer.d.ts +3 -3
  422. package/dist/docx/serializer/themeSerializer.d.ts +2 -3
  423. package/dist/docx/serializer/trackedChangeAttributes.d.ts +4 -4
  424. package/dist/docx/serializer/xmlUtils.d.ts +3 -4
  425. package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +12 -11
  426. package/dist/docx/server/applyDocxXmlPatchProposal.js +5 -3
  427. package/dist/docx/server/boundedArchive.d.ts +13 -12
  428. package/dist/docx/server/boundedArchive.js +5 -4
  429. package/dist/docx/server/build.d.ts +16 -15
  430. package/dist/docx/server/build.js +11 -7
  431. package/dist/docx/server/createBilingualDocument.d.ts +15 -14
  432. package/dist/docx/server/createBilingualDocument.js +60 -23
  433. package/dist/docx/server/createBilingualDocx.d.ts +5 -6
  434. package/dist/docx/server/createBilingualDocx.js +7 -3
  435. package/dist/docx/server/docxToMarkdown.d.ts +2 -3
  436. package/dist/docx/server/docxToMarkdown.js +2 -1
  437. package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +20 -19
  438. package/dist/docx/server/evaluateDocxXmlPatchProposal.js +6 -4
  439. package/dist/docx/server/extractDocxText.d.ts +10 -11
  440. package/dist/docx/server/extractDocxText.js +3 -2
  441. package/dist/docx/server/inspectDocxPackage.d.ts +16 -15
  442. package/dist/docx/server/inspectDocxPackage.js +5 -4
  443. package/dist/docx/server/materializeYjsDocx.d.ts +10 -9
  444. package/dist/docx/server/materializeYjsDocx.js +3 -2
  445. package/dist/docx/server/migrateYjsAttrSchema.d.ts +8 -8
  446. package/dist/docx/server/migrateYjsAttrSchema.js +5 -4
  447. package/dist/docx/server/validateDocxConformance.d.ts +14 -15
  448. package/dist/docx/settingsHeaderFooterUpdate.d.ts +2 -3
  449. package/dist/docx/settingsParser.d.ts +2 -2
  450. package/dist/docx/settingsParser.js +12 -0
  451. package/dist/docx/shadingParser.d.ts +2 -3
  452. package/dist/docx/shapeAlternateContent.d.ts +8 -7
  453. package/dist/docx/shapeAlternateContent.js +84 -9
  454. package/dist/docx/shapeParser.d.ts +4 -5
  455. package/dist/docx/shapeParser.js +2 -1
  456. package/dist/docx/storyBlockReplay.d.ts +5 -5
  457. package/dist/docx/storyBlockReplay.js +10 -2
  458. package/dist/docx/storyPlainText.d.ts +9 -10
  459. package/dist/docx/streamingXmlParser.d.ts +8 -8
  460. package/dist/docx/strictNames.d.ts +4 -5
  461. package/dist/docx/strictNames.gen.d.ts +6 -7
  462. package/dist/docx/strictValueEncodings.gen.d.ts +5 -6
  463. package/dist/docx/structuralXmlPatch.d.ts +2 -2
  464. package/dist/docx/styleParser.d.ts +11 -12
  465. package/dist/docx/styleParser.js +1 -3
  466. package/dist/docx/styleReferenceResolution.d.ts +3 -4
  467. package/dist/docx/tableLook.d.ts +7 -7
  468. package/dist/docx/tableParser.d.ts +47 -39
  469. package/dist/docx/tableParser.js +2 -4
  470. package/dist/docx/tableRowPropertyPresence.d.ts +5 -6
  471. package/dist/docx/textBoxParser.d.ts +25 -26
  472. package/dist/docx/textBoxParser.js +18 -19
  473. package/dist/docx/themeColorAttribute.d.ts +3 -4
  474. package/dist/docx/themeParser.d.ts +9 -10
  475. package/dist/docx/trackedChangeInfo.d.ts +5 -6
  476. package/dist/docx/trackedMoveRangeNormalization.d.ts +3 -3
  477. package/dist/docx/trackedMoveRangeNormalization.js +52 -21
  478. package/dist/docx/transitionalSpelling.d.ts +7 -8
  479. package/dist/docx/universalMeasure.d.ts +5 -6
  480. package/dist/docx/unzip.d.ts +15 -16
  481. package/dist/docx/unzip.js +2 -2
  482. package/dist/docx/verbatimCapture.d.ts +8 -7
  483. package/dist/docx/verbatimCapture.js +5 -3
  484. package/dist/docx/verticalMergeProjection.d.ts +4 -5
  485. package/dist/docx/verticalMergeProjection.js +1 -1
  486. package/dist/docx/vmlImageParser.d.ts +4 -5
  487. package/dist/docx/vmlPreview.d.ts +9 -10
  488. package/dist/docx/vmlPreview.js +0 -3
  489. package/dist/docx/watermarkParser.d.ts +4 -5
  490. package/dist/docx/wmfSvg.d.ts +10 -0
  491. package/dist/docx/wmfSvg.js +451 -0
  492. package/dist/docx/wordprocessingPrefixes.d.ts +12 -13
  493. package/dist/docx/wrapPolygon.d.ts +5 -6
  494. package/dist/docx/wrapTypes.js +1 -2
  495. package/dist/docx/xmlEncoding.d.ts +2 -3
  496. package/dist/docx/xmlNamespaceContext.d.ts +5 -6
  497. package/dist/docx/xmlParser.d.ts +49 -50
  498. package/dist/docx/xmlParser.js +12 -12
  499. package/dist/docx/xmlResourceLimits.d.ts +12 -11
  500. package/dist/docx/xmlResourceLimits.js +5 -2
  501. package/dist/docx/xmlSafety.d.ts +3 -4
  502. package/dist/export-pdf.d.ts +13 -13
  503. package/dist/export-pdf.js +4 -2
  504. package/dist/fields/bookmarkPages.d.ts +2 -3
  505. package/dist/fields/bookmarkText.d.ts +2 -2
  506. package/dist/fields/bookmarkText.js +3 -2
  507. package/dist/fields/evaluateField.d.ts +3 -3
  508. package/dist/fields/fieldContext.d.ts +2 -3
  509. package/dist/fields/resolveFieldValues.d.ts +7 -8
  510. package/dist/fields/sectionPageCounts.d.ts +2 -3
  511. package/dist/fields/seqValues.d.ts +2 -3
  512. package/dist/fonts/FontFaceLifecycle.d.ts +12 -0
  513. package/dist/fonts/FontFaceLifecycle.js +56 -0
  514. package/dist/fonts/documentFontFacts.d.ts +17 -0
  515. package/dist/fonts/documentFontFacts.js +41 -0
  516. package/dist/fonts/embeddedFontFingerprint.d.ts +2 -3
  517. package/dist/fonts/embeddedFontFingerprint.js +3 -2
  518. package/dist/fonts/embeddedFonts.d.ts +7 -8
  519. package/dist/fonts/fontAlternates.d.ts +4 -5
  520. package/dist/fonts/fontAlternates.js +2 -1
  521. package/dist/fonts/fontDeobfuscation.d.ts +3 -4
  522. package/dist/fonts/fontDeobfuscation.js +7 -3
  523. package/dist/fonts/fontsourceFaces.d.ts +7 -8
  524. package/dist/fonts/fontsourceFaces.js +16 -0
  525. package/dist/fonts/headlessMeasure.d.ts +12 -12
  526. package/dist/fonts/headlessMeasure.js +2 -1
  527. package/dist/fonts/sfnt/parse.d.ts +7 -7
  528. package/dist/fonts/sfnt/parse.js +4 -2
  529. package/dist/fonts/sfnt/subset.d.ts +6 -6
  530. package/dist/fonts/sfnt/subset.js +2 -1
  531. package/dist/fonts/sfnt/tables.d.ts +16 -16
  532. package/dist/fonts/sfnt/tables.js +2 -1
  533. package/dist/fonts/sfnt/woff.d.ts +6 -6
  534. package/dist/fonts/sfnt/woff.js +2 -1
  535. package/dist/headless-layout.d.ts +9 -9
  536. package/dist/headless-layout.js +9 -1
  537. package/dist/i18n/messages/ar.gen.d.ts +2 -2
  538. package/dist/i18n/messages/catalogs.gen.d.ts +2 -3
  539. package/dist/i18n/messages/cs.gen.d.ts +2 -2
  540. package/dist/i18n/messages/de.gen.d.ts +2 -2
  541. package/dist/i18n/messages/en.gen.d.ts +2 -2
  542. package/dist/i18n/messages/es.gen.d.ts +2 -2
  543. package/dist/i18n/messages/et.gen.d.ts +2 -2
  544. package/dist/i18n/messages/fr.gen.d.ts +2 -2
  545. package/dist/i18n/messages/he.gen.d.ts +2 -2
  546. package/dist/i18n/messages/hi.gen.d.ts +2 -2
  547. package/dist/i18n/messages/hu.gen.d.ts +2 -2
  548. package/dist/i18n/messages/locales.d.ts +3 -4
  549. package/dist/i18n/messages/lt.gen.d.ts +2 -2
  550. package/dist/i18n/messages/lv.gen.d.ts +2 -2
  551. package/dist/i18n/messages/pl.gen.d.ts +2 -2
  552. package/dist/i18n/messages/pt-BR.gen.d.ts +2 -2
  553. package/dist/i18n/messages/sk.gen.d.ts +2 -2
  554. package/dist/i18n/messages/tr.gen.d.ts +2 -2
  555. package/dist/i18n/messages/zh-CN.gen.d.ts +2 -2
  556. package/dist/i18n/messages.d.ts +4 -4
  557. package/dist/internal/acceptedBlockProjection.d.ts +2 -3
  558. package/dist/internal/acceptedBlockProjection.js +5 -1
  559. package/dist/internal/compare/inline-presentation.d.ts +4 -4
  560. package/dist/internal/headlessRevisionResolutionGuard.d.ts +2 -3
  561. package/dist/internal/indexedPositionMap.d.ts +2 -3
  562. package/dist/internal/noteMarkerAttrs.d.ts +3 -4
  563. package/dist/internal/pageBreakRunDescendantIndex.d.ts +3 -4
  564. package/dist/internal/pageBreakRunPartition.d.ts +4 -4
  565. package/dist/internal/pageBreakRunSourceDescendantIndex.d.ts +4 -5
  566. package/dist/internal/pageBreakRunSourceDescendantIndex.js +5 -1
  567. package/dist/internal/paragraphFormattingSerialization.d.ts +6 -6
  568. package/dist/internal/paragraphFormattingSerialization.js +3 -1
  569. package/dist/internal/prosemirrorAttrBoundary.d.ts +9 -10
  570. package/dist/internal/prosemirrorAttrBoundary.js +2 -1
  571. package/dist/internal/revisionResolutionEdits.d.ts +2 -2
  572. package/dist/internal/revisionResolutionInline.d.ts +4 -3
  573. package/dist/internal/revisionResolutionInline.js +69 -48
  574. package/dist/internal/revisionResolutionStep.d.ts +3 -3
  575. package/dist/internal/revisionResolutionTracking.d.ts +2 -2
  576. package/dist/internal/revisionResolutionTracking.js +3 -3
  577. package/dist/internal/sectionEndpointResolution.d.ts +5 -5
  578. package/dist/internal/sectionReferenceResolution.d.ts +6 -7
  579. package/dist/internal/wholeStoryRevisionResolution.d.ts +6 -4
  580. package/dist/internal/wholeStoryRevisionResolution.js +168 -52
  581. package/dist/layout-bridge/cellSelectionHighlight.d.ts +2 -3
  582. package/dist/layout-bridge/convert/endnoteLayout.d.ts +8 -8
  583. package/dist/layout-bridge/convert/endnoteLayout.js +2 -1
  584. package/dist/layout-bridge/convert/fixedTableColumnWidths.d.ts +2 -3
  585. package/dist/layout-bridge/convert/flowBlockPostprocessing.d.ts +5 -6
  586. package/dist/layout-bridge/convert/flowBorders.d.ts +3 -4
  587. package/dist/layout-bridge/convert/flowConversionShared.d.ts +9 -7
  588. package/dist/layout-bridge/convert/footnoteLayout.d.ts +14 -14
  589. package/dist/layout-bridge/convert/footnoteLayout.js +10 -0
  590. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +13 -12
  591. package/dist/layout-bridge/convert/headerFooterLayout.js +10 -4
  592. package/dist/layout-bridge/convert/imageConversion.d.ts +6 -7
  593. package/dist/layout-bridge/convert/listMarkers.d.ts +9 -9
  594. package/dist/layout-bridge/convert/markupViewFlow.d.ts +3 -3
  595. package/dist/layout-bridge/convert/noteReferences.d.ts +2 -3
  596. package/dist/layout-bridge/convert/pageBreakSplitting.d.ts +4 -4
  597. package/dist/layout-bridge/convert/pageBreakSplitting.js +4 -0
  598. package/dist/layout-bridge/convert/paragraphAttrs.d.ts +2 -2
  599. package/dist/layout-bridge/convert/paragraphAttrs.js +18 -11
  600. package/dist/layout-bridge/convert/paragraphConversion.d.ts +4 -5
  601. package/dist/layout-bridge/convert/paragraphConversion.js +9 -2
  602. package/dist/layout-bridge/convert/paragraphFrames.d.ts +2 -2
  603. package/dist/layout-bridge/convert/paragraphFrames.js +1 -1
  604. package/dist/layout-bridge/convert/paragraphMarkFormatting.d.ts +3 -4
  605. package/dist/layout-bridge/convert/paragraphRuns.d.ts +3 -4
  606. package/dist/layout-bridge/convert/paragraphRuns.js +35 -14
  607. package/dist/layout-bridge/convert/runFormattingMerge.d.ts +5 -5
  608. package/dist/layout-bridge/convert/runFormattingMerge.js +1 -0
  609. package/dist/layout-bridge/convert/runMarkFormatting.d.ts +2 -3
  610. package/dist/layout-bridge/convert/runMarkFormatting.js +12 -4
  611. package/dist/layout-bridge/convert/sectionBoundaries.d.ts +6 -6
  612. package/dist/layout-bridge/convert/tableConversion.d.ts +3 -4
  613. package/dist/layout-bridge/convert/tableConversion.js +1 -1
  614. package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +6 -7
  615. package/dist/layout-bridge/convert/textBoxFill.d.ts +3 -4
  616. package/dist/layout-bridge/convert/textFormattingConversion.d.ts +8 -7
  617. package/dist/layout-bridge/convert/textFormattingConversion.js +10 -1
  618. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +3 -3
  619. package/dist/layout-bridge/convert/toFlowBlocks.js +19 -11
  620. package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +3 -4
  621. package/dist/layout-bridge/dom/clickToPositionDom.d.ts +12 -13
  622. package/dist/layout-bridge/dom/clickToPositionDom.js +30 -4
  623. package/dist/layout-bridge/dom/findBodyPmSpans.d.ts +5 -6
  624. package/dist/layout-bridge/dom/findHfPmSpans.d.ts +10 -11
  625. package/dist/layout-bridge/dom/imeCaretAnchor.d.ts +3 -3
  626. package/dist/layout-bridge/dom/noteStoryDom.d.ts +2 -3
  627. package/dist/layout-bridge/dom/textStreamDom.d.ts +16 -9
  628. package/dist/layout-bridge/dom/textStreamDom.js +18 -3
  629. package/dist/layout-bridge/engine/clickToPosition.d.ts +8 -9
  630. package/dist/layout-bridge/engine/clickToPosition.js +77 -94
  631. package/dist/layout-bridge/engine/hitTest.d.ts +18 -19
  632. package/dist/layout-bridge/engine/hitTest.js +2 -1
  633. package/dist/layout-bridge/engine/linePmRange.d.ts +7 -0
  634. package/dist/layout-bridge/engine/linePmRange.js +34 -0
  635. package/dist/layout-bridge/engine/selectionRects.d.ts +7 -8
  636. package/dist/layout-bridge/engine/selectionRects.js +53 -77
  637. package/dist/layout-bridge/headerFooterLayout.d.ts +4 -5
  638. package/dist/layout-bridge/measuring/measureBlocksPipeline.d.ts +2 -3
  639. package/dist/layout-bridge/sectionColumns.d.ts +2 -3
  640. package/dist/layout-bridge/tableInsertHover.d.ts +6 -7
  641. package/dist/layout-engine/anchorLayoutInCellCompatibility.d.ts +2 -3
  642. package/dist/layout-engine/footnoteColumnReflow.d.ts +2 -2
  643. package/dist/layout-engine/headerFooterRefs.d.ts +2 -3
  644. package/dist/layout-engine/imageLayout.d.ts +2 -3
  645. package/dist/layout-engine/index.d.ts +3 -3
  646. package/dist/layout-engine/index.js +9 -6
  647. package/dist/layout-engine/justificationCompatibility.d.ts +2 -3
  648. package/dist/layout-engine/keep-together.d.ts +7 -8
  649. package/dist/layout-engine/keep-together.js +1 -1
  650. package/dist/layout-engine/layoutFlowShared.d.ts +3 -4
  651. package/dist/layout-engine/layoutInstrumentation.d.ts +18 -19
  652. package/dist/layout-engine/lineFlow.d.ts +4 -5
  653. package/dist/layout-engine/measure/advanceComposition.d.ts +8 -8
  654. package/dist/layout-engine/measure/advanceComposition.js +24 -5
  655. package/dist/layout-engine/measure/automaticTextSpacing.d.ts +36 -0
  656. package/dist/layout-engine/measure/automaticTextSpacing.js +178 -0
  657. package/dist/layout-engine/measure/cache.d.ts +22 -22
  658. package/dist/layout-engine/measure/cache.js +50 -14
  659. package/dist/layout-engine/measure/clampFloatingWrapMargins.d.ts +2 -3
  660. package/dist/layout-engine/measure/complexScriptFormatting.d.ts +5 -5
  661. package/dist/layout-engine/measure/crossRunWords.d.ts +8 -8
  662. package/dist/layout-engine/measure/crossRunWords.js +9 -4
  663. package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +3 -3
  664. package/dist/layout-engine/measure/effectiveLineBreakPolicy.js +3 -1
  665. package/dist/layout-engine/measure/featureFlags.d.ts +4 -5
  666. package/dist/layout-engine/measure/floatingLineClearance.d.ts +3 -4
  667. package/dist/layout-engine/measure/floatingTablePosition.d.ts +3 -3
  668. package/dist/layout-engine/measure/floatingZones.d.ts +11 -10
  669. package/dist/layout-engine/measure/font-metrics.worker.d.ts +3 -4
  670. package/dist/layout-engine/measure/font-metrics.worker.js +2 -1
  671. package/dist/layout-engine/measure/hyperlinkInstance.d.ts +3 -4
  672. package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +17 -34
  673. package/dist/layout-engine/measure/hyphenationDictionaries.js +6 -5
  674. package/dist/layout-engine/measure/hyphenationPreload.d.ts +2 -3
  675. package/dist/layout-engine/measure/inlineObjectMetrics.d.ts +3 -4
  676. package/dist/layout-engine/measure/justification.d.ts +7 -7
  677. package/dist/layout-engine/measure/lineBreakProvider.d.ts +16 -11
  678. package/dist/layout-engine/measure/lineBreakProvider.js +29 -4
  679. package/dist/layout-engine/measure/lineBreaks.d.ts +7 -8
  680. package/dist/layout-engine/measure/lineBreaks.js +5 -2
  681. package/dist/layout-engine/measure/lineFitting.d.ts +11 -11
  682. package/dist/layout-engine/measure/lineFitting.js +17 -6
  683. package/dist/layout-engine/measure/lineTypography.d.ts +7 -8
  684. package/dist/layout-engine/measure/lineTypography.js +1 -0
  685. package/dist/layout-engine/measure/listMarkerWidth.d.ts +9 -6
  686. package/dist/layout-engine/measure/listMarkerWidth.js +7 -3
  687. package/dist/layout-engine/measure/measureBlocks.d.ts +7 -7
  688. package/dist/layout-engine/measure/measureBlocks.js +13 -7
  689. package/dist/layout-engine/measure/measureContainer.d.ts +5 -6
  690. package/dist/layout-engine/measure/measureContainer.js +27 -6
  691. package/dist/layout-engine/measure/measureHelpers.d.ts +21 -18
  692. package/dist/layout-engine/measure/measureHelpers.js +12 -3
  693. package/dist/layout-engine/measure/measureParagraph.d.ts +5 -5
  694. package/dist/layout-engine/measure/measureParagraph.js +57 -11
  695. package/dist/layout-engine/measure/measureProvider.d.ts +15 -9
  696. package/dist/layout-engine/measure/measureProvider.js +66 -4
  697. package/dist/layout-engine/measure/measureTypes.d.ts +17 -14
  698. package/dist/layout-engine/measure/measureWorker.d.ts +8 -8
  699. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +6 -7
  700. package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +19 -20
  701. package/dist/layout-engine/measure/paragraphTabs.d.ts +6 -7
  702. package/dist/layout-engine/measure/paragraphTabs.js +16 -17
  703. package/dist/layout-engine/measure/smallCapsCasing.d.ts +6 -7
  704. package/dist/layout-engine/measure/tabCalculator.d.ts +15 -16
  705. package/dist/layout-engine/measure/tableCellFloating.d.ts +6 -6
  706. package/dist/layout-engine/measure/tableCellFlow.d.ts +7 -7
  707. package/dist/layout-engine/measure/tableCellGrid.d.ts +14 -14
  708. package/dist/layout-engine/measure/tableFragmentBorderGeometry.d.ts +2 -2
  709. package/dist/layout-engine/measure/tableInlinePlacement.d.ts +3 -3
  710. package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +4 -4
  711. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +8 -8
  712. package/dist/layout-engine/noColumnBalanceCompatibility.d.ts +7 -0
  713. package/dist/layout-engine/noColumnBalanceCompatibility.js +5 -0
  714. package/dist/layout-engine/noteAreaFlow.d.ts +4 -5
  715. package/dist/layout-engine/paginator.d.ts +18 -11
  716. package/dist/layout-engine/paginator.js +51 -11
  717. package/dist/layout-engine/paragraphFragmentRange.d.ts +2 -3
  718. package/dist/layout-engine/paragraphFrame.d.ts +2 -21
  719. package/dist/layout-engine/paragraphFrame.js +1 -17
  720. package/dist/layout-engine/paragraphLayout.d.ts +2 -2
  721. package/dist/layout-engine/paragraphLayout.js +28 -9
  722. package/dist/layout-engine/paragraphSequence.d.ts +3 -4
  723. package/dist/layout-engine/paragraphSpacing.d.ts +10 -10
  724. package/dist/layout-engine/pmPageIndex.d.ts +3 -4
  725. package/dist/layout-engine/renderedBreakReconciliation.d.ts +7 -7
  726. package/dist/layout-engine/section-breaks.d.ts +15 -15
  727. package/dist/layout-engine/sectionLayout.d.ts +7 -7
  728. package/dist/layout-engine/sectionLayout.js +1 -4
  729. package/dist/layout-engine/sectionVerticalAlignment.d.ts +2 -3
  730. package/dist/layout-engine/tableIndentCompatibility.d.ts +2 -3
  731. package/dist/layout-engine/tableLayout.d.ts +4 -5
  732. package/dist/layout-engine/tableLayout.js +17 -9
  733. package/dist/layout-engine/tableRowBreak.d.ts +6 -6
  734. package/dist/layout-engine/tableRowBreak.js +10 -5
  735. package/dist/layout-engine/textBoxFlow.d.ts +6 -6
  736. package/dist/layout-engine/textBoxGroup.d.ts +3 -4
  737. package/dist/layout-engine/textBoxLayout.d.ts +2 -2
  738. package/dist/layout-engine/types.d.ts +108 -88
  739. package/dist/layout-painter/anchoredImagePosition.d.ts +4 -5
  740. package/dist/layout-painter/borderStroke.d.ts +4 -4
  741. package/dist/layout-painter/cursiveJoiners.d.ts +7 -7
  742. package/dist/layout-painter/documentColors.d.ts +6 -7
  743. package/dist/layout-painter/imageLayout.d.ts +13 -14
  744. package/dist/layout-painter/index.d.ts +8 -7
  745. package/dist/layout-painter/index.js +7 -2
  746. package/dist/layout-painter/registry/modules/image.d.ts +2 -3
  747. package/dist/layout-painter/registry/modules/paragraph.d.ts +2 -3
  748. package/dist/layout-painter/registry/modules/table.d.ts +2 -3
  749. package/dist/layout-painter/registry/modules/textBox.d.ts +2 -3
  750. package/dist/layout-painter/registry/modules.d.ts +2 -3
  751. package/dist/layout-painter/registry/registry.d.ts +4 -5
  752. package/dist/layout-painter/registry/types.d.ts +8 -9
  753. package/dist/layout-painter/renderFragment.d.ts +4 -5
  754. package/dist/layout-painter/renderImage.d.ts +12 -13
  755. package/dist/layout-painter/renderPage.d.ts +27 -25
  756. package/dist/layout-painter/renderPage.js +116 -31
  757. package/dist/layout-painter/renderParagraph.d.ts +19 -15
  758. package/dist/layout-painter/renderParagraph.js +186 -46
  759. package/dist/layout-painter/renderTable.d.ts +7 -8
  760. package/dist/layout-painter/renderTable.js +27 -15
  761. package/dist/layout-painter/renderTextBox.d.ts +5 -6
  762. package/dist/layout-painter/renderTextBox.js +9 -1
  763. package/dist/layout-painter/renderUtils.d.ts +11 -14
  764. package/dist/layout-painter/renderUtils.js +1 -19
  765. package/dist/layout-painter/renderWatermark.d.ts +5 -4
  766. package/dist/layout-painter/sdtBoundary.d.ts +4 -5
  767. package/dist/layout-painter/tableRowPaintGeometry.d.ts +2 -2
  768. package/dist/managers/AutoSaveManager.d.ts +11 -12
  769. package/dist/managers/AutoSaveManager.js +17 -3
  770. package/dist/managers/ClipboardManager.d.ts +7 -8
  771. package/dist/managers/ContextMenuManager.d.ts +3 -4
  772. package/dist/managers/DocumentLoaderManager.d.ts +5 -6
  773. package/dist/managers/EditorModeManager.d.ts +12 -12
  774. package/dist/managers/ErrorManager.d.ts +2 -3
  775. package/dist/managers/FindReplaceManager.d.ts +6 -6
  776. package/dist/managers/HistoryManager.d.ts +9 -10
  777. package/dist/managers/Subscribable.d.ts +2 -3
  778. package/dist/managers/TableSelectionManager.d.ts +9 -10
  779. package/dist/managers/TableSelectionManager.js +3 -13
  780. package/dist/managers/autoSaveCodec.d.ts +8 -9
  781. package/dist/managers/editorShortcuts.d.ts +14 -15
  782. package/dist/managers/reviewDisplayMode.d.ts +4 -5
  783. package/dist/managers/types.d.ts +7 -8
  784. package/dist/markdown/annotations.d.ts +6 -7
  785. package/dist/markdown/escape.d.ts +6 -7
  786. package/dist/markdown/fromMarkdown.d.ts +2 -3
  787. package/dist/markdown/images.d.ts +2 -3
  788. package/dist/markdown/index.d.ts +3 -3
  789. package/dist/markdown/index.js +28 -2
  790. package/dist/markdown/internals.d.ts +4 -5
  791. package/dist/markdown/internals.js +3 -2
  792. package/dist/markdown/renderBlock.d.ts +2 -3
  793. package/dist/markdown/renderBlock.js +5 -1
  794. package/dist/markdown/renderParagraph.d.ts +4 -5
  795. package/dist/markdown/renderParagraph.js +42 -17
  796. package/dist/markdown/renderRuns.d.ts +3 -3
  797. package/dist/markdown/renderRuns.js +15 -10
  798. package/dist/markdown/renderTable.d.ts +2 -3
  799. package/dist/markdown/renderTable.js +21 -8
  800. package/dist/markdown/trailers.d.ts +2 -3
  801. package/dist/markdown/types.d.ts +7 -8
  802. package/dist/model.d.ts +1 -1
  803. package/dist/paged-layout/LayoutSelectionGate.d.ts +2 -2
  804. package/dist/paged-layout/blockGeometry.d.ts +5 -6
  805. package/dist/paged-layout/editorScrollRoot.d.ts +5 -5
  806. package/dist/paged-layout/fitWidthZoom.d.ts +36 -0
  807. package/dist/paged-layout/fitWidthZoom.js +31 -0
  808. package/dist/paged-layout/hiddenEditorScroll.d.ts +2 -3
  809. package/dist/paged-layout/incrementalMeasure.d.ts +6 -7
  810. package/dist/paged-layout/pageText.d.ts +2 -2
  811. package/dist/paged-layout/paragraphFlash.d.ts +7 -7
  812. package/dist/paged-layout/paragraphFlashTypes.d.ts +3 -4
  813. package/dist/paged-layout/rangeProjection.d.ts +11 -12
  814. package/dist/paged-layout/readOnlyEditAttempt.d.ts +2 -2
  815. package/dist/paged-layout/scrollNavigation.d.ts +5 -6
  816. package/dist/paged-layout/scrollPageInfo.d.ts +5 -6
  817. package/dist/paged-layout/scrollToPmPosition.d.ts +4 -5
  818. package/dist/paged-layout/sectionBlockWidths.d.ts +3 -3
  819. package/dist/paged-layout/sectionBlockWidths.js +0 -3
  820. package/dist/paged-layout/sectionGeometry.d.ts +10 -11
  821. package/dist/paged-layout/selectionViewportRect.d.ts +5 -6
  822. package/dist/paged-layout/tableColumnResize.d.ts +2 -3
  823. package/dist/paged-layout/tableInsertButtonGeometry.d.ts +2 -3
  824. package/dist/paged-layout/transactionDirtyRange.d.ts +2 -3
  825. package/dist/paged-layout/zoomScrollAnchor.d.ts +5 -5
  826. package/dist/panel-layout.d.ts +11 -12
  827. package/dist/pdf/contentStream.d.ts +11 -12
  828. package/dist/pdf/fonts.d.ts +11 -11
  829. package/dist/pdf/fonts.js +2 -20
  830. package/dist/pdf/images.d.ts +7 -7
  831. package/dist/pdf/images.js +6 -2
  832. package/dist/pdf/objects.d.ts +23 -24
  833. package/dist/pdf/pageSpace.d.ts +9 -10
  834. package/dist/pdf/paint.d.ts +8 -8
  835. package/dist/pdf/paint.js +30 -2
  836. package/dist/pdf/writePdf.d.ts +8 -8
  837. package/dist/pdf/writePdf.js +2 -1
  838. package/dist/prosemirror/addTrackedDeletionMark.d.ts +2 -2
  839. package/dist/prosemirror/alternateContentAttrs.d.ts +5 -4
  840. package/dist/prosemirror/alternateContentAttrs.js +13 -3
  841. package/dist/prosemirror/anchoredTextBoxes.d.ts +10 -11
  842. package/dist/prosemirror/attrs/index.d.ts +86 -86
  843. package/dist/prosemirror/attrs/index.js +127 -99
  844. package/dist/prosemirror/authoredTransformAttrs.d.ts +3 -3
  845. package/dist/prosemirror/autospacingBase.d.ts +5 -5
  846. package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +7 -7
  847. package/dist/prosemirror/bookmarkBoundaryAttrs.js +31 -2
  848. package/dist/prosemirror/bookmarkBoundaryIntegrity.d.ts +3 -4
  849. package/dist/prosemirror/canonicalCommands.d.ts +38 -21
  850. package/dist/prosemirror/canonicalCommands.js +5 -4
  851. package/dist/prosemirror/canonicalSelectionRange.d.ts +14 -4
  852. package/dist/prosemirror/canonicalSelectionRange.js +20 -1
  853. package/dist/prosemirror/cellDragSelection.d.ts +6 -7
  854. package/dist/prosemirror/cellDragSelection.js +9 -0
  855. package/dist/prosemirror/clearRunColor.d.ts +2 -3
  856. package/dist/prosemirror/clearRunColor.js +8 -5
  857. package/dist/prosemirror/clipboardIntent.d.ts +3 -4
  858. package/dist/prosemirror/commands/clearParagraphIndent.d.ts +2 -3
  859. package/dist/prosemirror/commands/comments.d.ts +28 -28
  860. package/dist/prosemirror/commands/comments.js +220 -83
  861. package/dist/prosemirror/commands/contentControls.d.ts +9 -9
  862. package/dist/prosemirror/commands/contentControls.js +2 -1
  863. package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +2 -3
  864. package/dist/prosemirror/commands/contentControlsBlockFill.js +2 -1
  865. package/dist/prosemirror/commands/formatPainter.d.ts +5 -5
  866. package/dist/prosemirror/commands/formatPainter.js +14 -11
  867. package/dist/prosemirror/commands/formatting.d.ts +20 -20
  868. package/dist/prosemirror/commands/hyperlink.d.ts +5 -6
  869. package/dist/prosemirror/commands/hyperlink.js +7 -6
  870. package/dist/prosemirror/commands/image.d.ts +14 -14
  871. package/dist/prosemirror/commands/pageBreak.d.ts +2 -3
  872. package/dist/prosemirror/commands/pageBreak.js +2 -1
  873. package/dist/prosemirror/commands/paragraph.d.ts +35 -35
  874. package/dist/prosemirror/commands/paragraphBookmarkJoin.d.ts +5 -5
  875. package/dist/prosemirror/commands/paragraphBookmarkJoin.js +4 -7
  876. package/dist/prosemirror/commands/pastePlainText.d.ts +4 -5
  877. package/dist/prosemirror/commands/propertyChangeScope.d.ts +13 -13
  878. package/dist/prosemirror/commands/propertyChangeScope.js +2 -0
  879. package/dist/prosemirror/commands/resolveAllTableChanges.d.ts +3 -3
  880. package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.d.ts +3 -3
  881. package/dist/prosemirror/commands/resolveParagraphProperties.d.ts +3 -3
  882. package/dist/prosemirror/commands/resolveParagraphProperties.js +1 -1
  883. package/dist/prosemirror/commands/sectionBreak.d.ts +9 -8
  884. package/dist/prosemirror/commands/sectionBreak.js +14 -1
  885. package/dist/prosemirror/commands/table.d.ts +34 -34
  886. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +8 -8
  887. package/dist/prosemirror/commands/tableCellMergeResolution.js +3 -2
  888. package/dist/prosemirror/commands/tableMergeFoldDecisions.d.ts +19 -18
  889. package/dist/prosemirror/commentBoundaryOwnership.d.ts +15 -0
  890. package/dist/prosemirror/commentBoundaryOwnership.js +4 -0
  891. package/dist/prosemirror/commentIdAllocator.d.ts +10 -9
  892. package/dist/prosemirror/commentIdAllocator.js +4 -1
  893. package/dist/prosemirror/commentOps.d.ts +6 -7
  894. package/dist/prosemirror/commentOps.js +3 -19
  895. package/dist/prosemirror/commentRangeBoundaryAttrs.d.ts +16 -0
  896. package/dist/prosemirror/commentRangeBoundaryAttrs.js +51 -0
  897. package/dist/prosemirror/commentRangeInlineAtoms.d.ts +5 -5
  898. package/dist/prosemirror/commentRangeInlineAtoms.js +1 -0
  899. package/dist/prosemirror/commentReferenceAttrs.d.ts +3 -4
  900. package/dist/prosemirror/commentReferenceAttrs.js +4 -1
  901. package/dist/prosemirror/commentReferenceIntegrity.d.ts +15 -6
  902. package/dist/prosemirror/commentReferenceIntegrity.js +93 -1
  903. package/dist/prosemirror/containerFinalParagraph.d.ts +4 -4
  904. package/dist/prosemirror/contentControlRevisions.d.ts +7 -7
  905. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +4 -4
  906. package/dist/prosemirror/conversion/fromProseDoc.d.ts +10 -10
  907. package/dist/prosemirror/conversion/fromProseDoc.js +477 -178
  908. package/dist/prosemirror/conversion/hyphenTextCarriers.d.ts +2 -3
  909. package/dist/prosemirror/conversion/markInterner.d.ts +2 -3
  910. package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +5 -5
  911. package/dist/prosemirror/conversion/runShadingMark.d.ts +3 -4
  912. package/dist/prosemirror/conversion/sdtAttrs.d.ts +6 -7
  913. package/dist/prosemirror/conversion/toProseDoc.d.ts +15 -9
  914. package/dist/prosemirror/conversion/toProseDoc.js +318 -202
  915. package/dist/prosemirror/copyOriginDom.d.ts +8 -0
  916. package/dist/prosemirror/copyOriginDom.js +21 -0
  917. package/dist/prosemirror/copyOriginResolution.d.ts +15 -0
  918. package/dist/prosemirror/copyOriginResolution.js +202 -0
  919. package/dist/prosemirror/documentSchema.d.ts +2 -3
  920. package/dist/prosemirror/emptyFieldResultRuns.d.ts +3 -3
  921. package/dist/prosemirror/emptyRangeAnchor.d.ts +6 -6
  922. package/dist/prosemirror/executeEditorCommand.d.ts +4 -5
  923. package/dist/prosemirror/extensions/ExtensionManager.d.ts +2 -3
  924. package/dist/prosemirror/extensions/StarterKit.d.ts +3 -4
  925. package/dist/prosemirror/extensions/StarterKit.js +5 -1
  926. package/dist/prosemirror/extensions/core/DocExtension.d.ts +2 -6
  927. package/dist/prosemirror/extensions/core/DocExtension.js +1 -1
  928. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +3 -6
  929. package/dist/prosemirror/extensions/core/HistoryExtension.js +5 -4
  930. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +8 -9
  931. package/dist/prosemirror/extensions/core/ParagraphExtension.js +17 -9
  932. package/dist/prosemirror/extensions/core/TextExtension.d.ts +2 -6
  933. package/dist/prosemirror/extensions/create.d.ts +4 -5
  934. package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +6 -7
  935. package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +3 -4
  936. package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +2 -13
  937. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +2 -13
  938. package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +2 -9
  939. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +7 -8
  940. package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +2 -16
  941. package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +2 -12
  942. package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +2 -9
  943. package/dist/prosemirror/extensions/features/ImagePasteExtension.js +2 -1
  944. package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +3 -18
  945. package/dist/prosemirror/extensions/features/ListExtension.d.ts +6 -7
  946. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +11 -10
  947. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +94 -53
  948. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +20 -20
  949. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +2 -1
  950. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +2 -19
  951. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +4 -15
  952. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.js +5 -2
  953. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +2 -2
  954. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.js +2 -8
  955. package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +5 -6
  956. package/dist/prosemirror/extensions/features/clipboardTrackedRevisions.d.ts +4 -0
  957. package/dist/prosemirror/extensions/features/clipboardTrackedRevisions.js +72 -0
  958. package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +4 -4
  959. package/dist/prosemirror/extensions/features/pasteCleanup.js +3 -2
  960. package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +2 -3
  961. package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +3 -4
  962. package/dist/prosemirror/extensions/markRegistry.d.ts +4 -5
  963. package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +2 -6
  964. package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +2 -6
  965. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +2 -11
  966. package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +2 -17
  967. package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +2 -9
  968. package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +2 -6
  969. package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +12 -4
  970. package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +2 -6
  971. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +2 -8
  972. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +42 -4
  973. package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +2 -20
  974. package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +4 -4
  975. package/dist/prosemirror/extensions/marks/HighlightExtension.js +6 -4
  976. package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +5 -6
  977. package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +9 -3
  978. package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +3 -16
  979. package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +2 -6
  980. package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +2 -3
  981. package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +2 -3
  982. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +5 -5
  983. package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +3 -3
  984. package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +2 -3
  985. package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +2 -6
  986. package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +2 -6
  987. package/dist/prosemirror/extensions/marks/StrikeExtension.js +9 -3
  988. package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +2 -6
  989. package/dist/prosemirror/extensions/marks/SubscriptExtension.js +3 -2
  990. package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +2 -6
  991. package/dist/prosemirror/extensions/marks/SuperscriptExtension.js +3 -2
  992. package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +2 -6
  993. package/dist/prosemirror/extensions/marks/TextColorExtension.js +7 -6
  994. package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +2 -3
  995. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +6 -13
  996. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.js +1 -4
  997. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +4 -12
  998. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +18 -2
  999. package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +2 -6
  1000. package/dist/prosemirror/extensions/marks/UnderlineExtension.js +10 -3
  1001. package/dist/prosemirror/extensions/marks/markUtils.d.ts +83 -25
  1002. package/dist/prosemirror/extensions/marks/markUtils.js +138 -74
  1003. package/dist/prosemirror/extensions/marks/noteReferenceDeletion.d.ts +3 -3
  1004. package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +6 -25
  1005. package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.js +4 -4
  1006. package/dist/prosemirror/extensions/nodes/BlockCustomXmlExtension.d.ts +2 -3
  1007. package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +10 -0
  1008. package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.js +59 -0
  1009. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +2 -20
  1010. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +3 -4
  1011. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +1 -1
  1012. package/dist/prosemirror/extensions/nodes/CommentRangeBoundaryExtension.d.ts +10 -0
  1013. package/dist/prosemirror/extensions/nodes/CommentRangeBoundaryExtension.js +43 -0
  1014. package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +3 -5
  1015. package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +5 -73
  1016. package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +3 -11
  1017. package/dist/prosemirror/extensions/nodes/FieldExtension.js +12 -2
  1018. package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +2 -6
  1019. package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +2 -6
  1020. package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +2 -6
  1021. package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +2 -10
  1022. package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +4 -5
  1023. package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.js +8 -4
  1024. package/dist/prosemirror/extensions/nodes/NoteMarkerExtension.d.ts +3 -4
  1025. package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +2 -6
  1026. package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +2 -4
  1027. package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +3 -29
  1028. package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +3 -13
  1029. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +4 -5
  1030. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +20 -4
  1031. package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +3 -5
  1032. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +3 -10
  1033. package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +11 -11
  1034. package/dist/prosemirror/extensions/nodes/ShapeExtension.js +5 -6
  1035. package/dist/prosemirror/extensions/nodes/SymbolExtension.d.ts +2 -3
  1036. package/dist/prosemirror/extensions/nodes/SymbolExtension.js +3 -3
  1037. package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +2 -6
  1038. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +10 -10
  1039. package/dist/prosemirror/extensions/nodes/TableExtension.js +11 -13
  1040. package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +3 -10
  1041. package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +4 -5
  1042. package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +7 -5
  1043. package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.js +9 -3
  1044. package/dist/prosemirror/extensions/types.d.ts +27 -27
  1045. package/dist/prosemirror/fieldRepresentation.d.ts +6 -5
  1046. package/dist/prosemirror/fieldRepresentation.js +13 -3
  1047. package/dist/prosemirror/findReplaceSelection.d.ts +9 -9
  1048. package/dist/prosemirror/hyperlinkRemoval.d.ts +6 -5
  1049. package/dist/prosemirror/hyperlinkRemoval.js +14 -1
  1050. package/dist/prosemirror/imageCommit.d.ts +5 -23
  1051. package/dist/prosemirror/imageCommit.js +1 -29
  1052. package/dist/prosemirror/imagePictureNames.d.ts +4 -5
  1053. package/dist/prosemirror/indexedNodeLookup.d.ts +4 -4
  1054. package/dist/prosemirror/inlineDisplayText.d.ts +4 -5
  1055. package/dist/prosemirror/inlineWrapperStack.d.ts +8 -9
  1056. package/dist/prosemirror/insertOperations.d.ts +4 -4
  1057. package/dist/prosemirror/keptRangeBoundaries.d.ts +76 -0
  1058. package/dist/prosemirror/keptRangeBoundaries.js +381 -0
  1059. package/dist/prosemirror/listAutoformatMarkers.d.ts +3 -4
  1060. package/dist/prosemirror/listInstanceReferences.d.ts +3 -4
  1061. package/dist/prosemirror/listInstanceReferences.js +1 -1
  1062. package/dist/prosemirror/listLabels.d.ts +15 -5
  1063. package/dist/prosemirror/listLabels.js +101 -16
  1064. package/dist/prosemirror/listMarker.d.ts +13 -13
  1065. package/dist/prosemirror/listMarker.js +7 -2
  1066. package/dist/prosemirror/listNumbering.d.ts +11 -11
  1067. package/dist/prosemirror/listNumbering.js +0 -16
  1068. package/dist/prosemirror/listRendering.d.ts +5 -5
  1069. package/dist/prosemirror/listRendering.js +4 -0
  1070. package/dist/prosemirror/listRenderingAttrs.d.ts +12 -11
  1071. package/dist/prosemirror/listRenderingAttrs.js +9 -5
  1072. package/dist/prosemirror/listState.d.ts +9 -10
  1073. package/dist/prosemirror/markupViewNotes.d.ts +2 -3
  1074. package/dist/prosemirror/markupViewProjection.d.ts +12 -11
  1075. package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +7 -6
  1076. package/dist/prosemirror/moveRangeBoundaryAttrs.js +27 -4
  1077. package/dist/prosemirror/noteReferenceOccurrenceId.d.ts +2 -3
  1078. package/dist/prosemirror/noteReferenceOccurrences.d.ts +12 -11
  1079. package/dist/prosemirror/noteReferenceOccurrences.js +4 -2
  1080. package/dist/prosemirror/noteReferenceReview.d.ts +13 -13
  1081. package/dist/prosemirror/noteReferenceReview.js +4 -10
  1082. package/dist/prosemirror/numberedRefFields.d.ts +5 -5
  1083. package/dist/prosemirror/numberingAttr.d.ts +14 -14
  1084. package/dist/prosemirror/outlineLevelAttr.d.ts +3 -4
  1085. package/dist/prosemirror/pageBreakRunProjection.d.ts +5 -5
  1086. package/dist/prosemirror/paraText.d.ts +4 -5
  1087. package/dist/prosemirror/paragraphAlignment.d.ts +2 -3
  1088. package/dist/prosemirror/paragraphDirection.d.ts +8 -9
  1089. package/dist/prosemirror/paragraphFormattingProvenance.d.ts +14 -7
  1090. package/dist/prosemirror/paragraphFormattingProvenance.js +8 -0
  1091. package/dist/prosemirror/paragraphIndentation.d.ts +7 -7
  1092. package/dist/prosemirror/paragraphList.d.ts +39 -0
  1093. package/dist/prosemirror/paragraphList.js +81 -0
  1094. package/dist/prosemirror/paragraphMarkJoin.d.ts +12 -2
  1095. package/dist/prosemirror/paragraphMarkJoin.js +34 -3
  1096. package/dist/prosemirror/paragraphPropertyCarry.d.ts +7 -7
  1097. package/dist/prosemirror/paragraphSpacing.d.ts +9 -9
  1098. package/dist/prosemirror/paragraphSpacing.js +16 -10
  1099. package/dist/prosemirror/pluginKeyOwner.d.ts +3 -4
  1100. package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +10 -10
  1101. package/dist/prosemirror/plugins/aiCitationDecorations.js +0 -12
  1102. package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +10 -10
  1103. package/dist/prosemirror/plugins/aiSuggestionDecorations.js +0 -14
  1104. package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +11 -11
  1105. package/dist/prosemirror/plugins/anonymizationDecorations.js +0 -18
  1106. package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +21 -21
  1107. package/dist/prosemirror/plugins/autocompleteSuggestion.js +3 -25
  1108. package/dist/prosemirror/plugins/contentControlWidgets.d.ts +14 -14
  1109. package/dist/prosemirror/plugins/contentControlWidgets.js +13 -7
  1110. package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +6 -6
  1111. package/dist/prosemirror/plugins/documentNumbering.d.ts +11 -9
  1112. package/dist/prosemirror/plugins/documentNumbering.js +42 -42
  1113. package/dist/prosemirror/plugins/documentStyleState.d.ts +9 -10
  1114. package/dist/prosemirror/plugins/documentStyles.d.ts +4 -4
  1115. package/dist/prosemirror/plugins/documentStyles.js +2 -1
  1116. package/dist/prosemirror/plugins/lockedControlKeyHandling.d.ts +4 -0
  1117. package/dist/prosemirror/plugins/lockedControlKeyHandling.js +16 -0
  1118. package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +3 -3
  1119. package/dist/prosemirror/plugins/paragraphStyleResolution.js +23 -1
  1120. package/dist/prosemirror/plugins/pmTextScan.d.ts +5 -6
  1121. package/dist/prosemirror/plugins/revisionIds.d.ts +13 -12
  1122. package/dist/prosemirror/plugins/revisionIds.js +13 -1
  1123. package/dist/prosemirror/plugins/selectionTracker.d.ts +9 -10
  1124. package/dist/prosemirror/plugins/suggestionMode.d.ts +18 -18
  1125. package/dist/prosemirror/plugins/suggestionMode.js +11 -3
  1126. package/dist/prosemirror/plugins/templateDirectives.d.ts +12 -12
  1127. package/dist/prosemirror/plugins/templateDirectives.js +0 -17
  1128. package/dist/prosemirror/plugins/templatePreviewValues.d.ts +16 -16
  1129. package/dist/prosemirror/plugins/templatePreviewValues.js +0 -23
  1130. package/dist/prosemirror/plugins/templateSlashMenu.d.ts +12 -13
  1131. package/dist/prosemirror/plugins/templateSlashMenu.js +3 -21
  1132. package/dist/prosemirror/plugins/transactionInvariants.d.ts +7 -8
  1133. package/dist/prosemirror/positionSweep.d.ts +4 -5
  1134. package/dist/prosemirror/positionSweep.js +1 -1
  1135. package/dist/prosemirror/preservedXmlReview.d.ts +3 -4
  1136. package/dist/prosemirror/queries.d.ts +5 -6
  1137. package/dist/prosemirror/rangeAnchorAttrs.d.ts +4 -5
  1138. package/dist/prosemirror/rangeAnchorAttrs.js +4 -1
  1139. package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +3 -3
  1140. package/dist/prosemirror/rebaseParagraphRunFormatting.js +6 -5
  1141. package/dist/prosemirror/rebaseParagraphRuns.d.ts +4 -4
  1142. package/dist/prosemirror/rebaseParagraphRuns.js +15 -11
  1143. package/dist/prosemirror/rejoinRunCarriers.d.ts +3 -3
  1144. package/dist/prosemirror/replacedAnnotations.d.ts +31 -17
  1145. package/dist/prosemirror/replacedAnnotations.js +80 -11
  1146. package/dist/prosemirror/revisionCarriers.d.ts +13 -13
  1147. package/dist/prosemirror/runContentProjection.d.ts +6 -0
  1148. package/dist/prosemirror/runContentProjection.js +24 -0
  1149. package/dist/prosemirror/runFormattingFromMarks.d.ts +5 -6
  1150. package/dist/prosemirror/runFormattingFromMarks.js +19 -17
  1151. package/dist/prosemirror/runFormattingInlineCarriers.d.ts +16 -15
  1152. package/dist/prosemirror/runFormattingInlineCarriers.js +1 -0
  1153. package/dist/prosemirror/runFormattingMarkNames.d.ts +2 -3
  1154. package/dist/prosemirror/runFormattingProvenance.d.ts +5 -6
  1155. package/dist/prosemirror/runFormattingReconciliation.d.ts +4 -4
  1156. package/dist/prosemirror/runFormattingReconciliation.js +6 -4
  1157. package/dist/prosemirror/runIdentity.d.ts +6 -7
  1158. package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +16 -5
  1159. package/dist/prosemirror/runIdentityAcrossRevisions.js +92 -32
  1160. package/dist/prosemirror/runPropertyChangeResolution.d.ts +3 -3
  1161. package/dist/prosemirror/runPropertyChangeResolution.js +11 -10
  1162. package/dist/prosemirror/runStyleFormatting.d.ts +23 -23
  1163. package/dist/prosemirror/runStyleFormatting.js +4 -2
  1164. package/dist/prosemirror/schema/index.d.ts +7 -6
  1165. package/dist/prosemirror/schema/index.js +0 -7
  1166. package/dist/prosemirror/schema/marks.d.ts +36 -39
  1167. package/dist/prosemirror/schema/nodes.d.ts +42 -35
  1168. package/dist/prosemirror/sectionCarrier.d.ts +7 -8
  1169. package/dist/prosemirror/sectionMarkEdits.d.ts +3 -4
  1170. package/dist/prosemirror/sectionMarkEdits.js +21 -1
  1171. package/dist/prosemirror/selectionMarks.d.ts +2 -2
  1172. package/dist/prosemirror/selectionState.d.ts +5 -6
  1173. package/dist/prosemirror/selectionState.js +1 -4
  1174. package/dist/prosemirror/shapeGeometryAdjustments.d.ts +2 -3
  1175. package/dist/prosemirror/storyListNumbering.d.ts +2 -2
  1176. package/dist/prosemirror/storyListNumbering.js +2 -1
  1177. package/dist/prosemirror/styles/index.js +1 -2
  1178. package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +9 -9
  1179. package/dist/prosemirror/styles/paragraphStyleCascade.js +17 -2
  1180. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +8 -8
  1181. package/dist/prosemirror/styles/styleResolver.d.ts +6 -7
  1182. package/dist/prosemirror/styles/styleResolver.js +17 -0
  1183. package/dist/prosemirror/styles/styleToggleCascade.d.ts +4 -4
  1184. package/dist/prosemirror/styles/tableStyleRegions.d.ts +5 -6
  1185. package/dist/prosemirror/tableCellMergeRevision.d.ts +3 -4
  1186. package/dist/prosemirror/tableCellPaste.d.ts +11 -12
  1187. package/dist/prosemirror/tableCellRevisionVisibility.d.ts +2 -3
  1188. package/dist/prosemirror/tableGridMutation.d.ts +12 -12
  1189. package/dist/prosemirror/tableResize.d.ts +18 -18
  1190. package/dist/prosemirror/tableResize.js +64 -53
  1191. package/dist/prosemirror/tableRunIn.d.ts +10 -5
  1192. package/dist/prosemirror/tableRunIn.js +44 -9
  1193. package/dist/prosemirror/textBoxAnchorAttrs.d.ts +3 -4
  1194. package/dist/prosemirror/textBoxAnchorAttrs.js +4 -1
  1195. package/dist/prosemirror/textBoxHostCollapse.d.ts +8 -0
  1196. package/dist/prosemirror/textBoxHostCollapse.js +79 -0
  1197. package/dist/prosemirror/textBoxHostParagraph.d.ts +2 -3
  1198. package/dist/prosemirror/textInput.d.ts +13 -6
  1199. package/dist/prosemirror/textInput.js +26 -2
  1200. package/dist/prosemirror/trackedRevisionPath.d.ts +6 -6
  1201. package/dist/prosemirror/trackedRevisionPath.js +7 -4
  1202. package/dist/prosemirror/trackedRunInlineAtoms.d.ts +8 -8
  1203. package/dist/prosemirror/trackedRunInlineAtoms.js +3 -2
  1204. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +4 -5
  1205. package/dist/prosemirror/utils/findParagraphByParaId.d.ts +3 -4
  1206. package/dist/prosemirror/utils/tabCalculator.js +1 -2
  1207. package/dist/prosemirror/utils/visualLineNavigation.d.ts +7 -7
  1208. package/dist/prosemirror/utils/visualLineNavigation.js +2 -14
  1209. package/dist/prosemirror/validation.d.ts +7 -8
  1210. package/dist/prosemirror/validation.js +25 -10
  1211. package/dist/prosemirror/yjsDocumentMetadata.d.ts +19 -19
  1212. package/dist/prosemirror/yjsDocumentMetadata.js +21 -15
  1213. package/dist/prosemirror/zeroWidthAnchors.d.ts +7 -6
  1214. package/dist/prosemirror/zeroWidthAnchors.js +53 -16
  1215. package/dist/redline.d.ts +11 -10
  1216. package/dist/redline.js +6 -3
  1217. package/dist/redlineOperationLimit.d.ts +5 -4
  1218. package/dist/redlineOperationLimit.js +2 -1
  1219. package/dist/render-dom/BodySelectionOverlay.d.ts +4 -5
  1220. package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +6 -7
  1221. package/dist/render-dom/RemoteSelectionOverlay.d.ts +5 -6
  1222. package/dist/render-dom/RenderedDomContext.d.ts +6 -7
  1223. package/dist/render-dom/commentAnchorAttributes.d.ts +6 -6
  1224. package/dist/render-dom/resolveSidebarItemPositions.d.ts +5 -6
  1225. package/dist/reviewHistoryLimits.d.ts +3 -0
  1226. package/dist/reviewHistoryLimits.js +4 -0
  1227. package/dist/server.d.ts +2 -1
  1228. package/dist/server.js +2 -1
  1229. package/dist/shaping/placeRun.d.ts +7 -8
  1230. package/dist/shaping/shaper.d.ts +18 -36
  1231. package/dist/shaping/shaper.js +2 -1
  1232. package/dist/style-engine/index.js +1 -2
  1233. package/dist/style-engine/styleEngine.d.ts +5 -6
  1234. package/dist/style-sets/extract.d.ts +8 -9
  1235. package/dist/style-sets/stellaStyle.d.ts +4 -5
  1236. package/dist/style-sets/styleSetNormalization.d.ts +6 -7
  1237. package/dist/style-sets/types.d.ts +5 -6
  1238. package/dist/symbols.d.ts +8 -9
  1239. package/dist/types/block-id.d.ts +11 -12
  1240. package/dist/types/canonicalCapabilities.d.ts +11 -19
  1241. package/dist/types/canonicalCapabilities.js +5 -12
  1242. package/dist/types/canonicalComments.d.ts +3 -4
  1243. package/dist/types/canonicalSave.d.ts +2 -3
  1244. package/dist/types/canonicalSections.d.ts +2 -3
  1245. package/dist/types/documentEnumValues.d.ts +48 -49
  1246. package/dist/types/docxSerialization.d.ts +4 -5
  1247. package/dist/types/editor-story.d.ts +2 -3
  1248. package/dist/types/remote-selection.d.ts +2 -3
  1249. package/dist/types/wrap.d.ts +5 -6
  1250. package/dist/utils/authorColors.d.ts +4 -5
  1251. package/dist/utils/base64.d.ts +2 -2
  1252. package/dist/utils/baseDirection.d.ts +4 -5
  1253. package/dist/utils/borderCss.d.ts +9 -10
  1254. package/dist/utils/boundedContentIdentity.d.ts +13 -0
  1255. package/dist/utils/boundedContentIdentity.js +42 -0
  1256. package/dist/utils/canonicalJson.d.ts +2 -3
  1257. package/dist/utils/clipboard.d.ts +23 -23
  1258. package/dist/utils/clipboard.js +11 -8
  1259. package/dist/utils/colorResolver.d.ts +22 -23
  1260. package/dist/utils/colorResolver.js +0 -20
  1261. package/dist/utils/createDocument.d.ts +4 -4
  1262. package/dist/utils/cursiveJoining.d.ts +7 -8
  1263. package/dist/utils/documentLoaderBehavior.d.ts +3 -4
  1264. package/dist/utils/documentPointerDown.d.ts +5 -0
  1265. package/dist/utils/documentPointerDown.js +28 -0
  1266. package/dist/utils/docxInput.d.ts +3 -4
  1267. package/dist/utils/domGuards.d.ts +7 -8
  1268. package/dist/utils/findMatchView.d.ts +4 -4
  1269. package/dist/utils/findReplace.d.ts +16 -16
  1270. package/dist/utils/findSearchKey.d.ts +5 -5
  1271. package/dist/utils/findVerticalScrollParent.d.ts +3 -4
  1272. package/dist/utils/fontFamilyMerge.d.ts +2 -2
  1273. package/dist/utils/fontLoader.d.ts +12 -13
  1274. package/dist/utils/fontResolver.d.ts +16 -14
  1275. package/dist/utils/fontResolver.js +33 -5
  1276. package/dist/utils/fontWeights.d.ts +2 -3
  1277. package/dist/utils/formatToStyle.d.ts +14 -14
  1278. package/dist/utils/formatToStyle.js +17 -15
  1279. package/dist/utils/headerFooter.d.ts +11 -12
  1280. package/dist/utils/headerFooter.js +10 -0
  1281. package/dist/utils/headingCollector.d.ts +3 -4
  1282. package/dist/utils/hexId.d.ts +6 -7
  1283. package/dist/utils/hexId.js +1 -1
  1284. package/dist/utils/horizontalScale.d.ts +5 -6
  1285. package/dist/utils/htmlComments.d.ts +2 -3
  1286. package/dist/utils/imageLuminance.d.ts +4 -5
  1287. package/dist/utils/imageResize.d.ts +18 -0
  1288. package/dist/utils/imageResize.js +37 -0
  1289. package/dist/utils/imageValidation.d.ts +3 -4
  1290. package/dist/utils/imageValidation.js +1 -1
  1291. package/dist/utils/joiningTypes.gen.d.ts +5 -6
  1292. package/dist/utils/mergeDocumentContent.d.ts +2 -3
  1293. package/dist/utils/mergeDocumentContent.js +7 -0
  1294. package/dist/utils/noteReferenceLabels.d.ts +7 -8
  1295. package/dist/utils/ooxmlSymbol.d.ts +5 -3
  1296. package/dist/utils/ooxmlSymbol.js +51 -1
  1297. package/dist/utils/outlineDepth.d.ts +4 -5
  1298. package/dist/utils/paragraphBaseDirection.d.ts +2 -3
  1299. package/dist/utils/paragraphBaseDirection.js +2 -1
  1300. package/dist/utils/paragraphFormattingMerge.d.ts +4 -5
  1301. package/dist/utils/paragraphFormattingMerge.js +2 -0
  1302. package/dist/utils/paragraphFrame.d.ts +20 -0
  1303. package/dist/utils/paragraphFrame.js +13 -0
  1304. package/dist/utils/paragraphInlineLayout.d.ts +101 -4
  1305. package/dist/utils/paragraphInlineLayout.js +164 -1
  1306. package/dist/utils/replaceText.d.ts +2 -2
  1307. package/dist/utils/replaceText.js +4 -0
  1308. package/dist/utils/rotationBoundingBox.d.ts +7 -8
  1309. package/dist/utils/sanitizeImageSrc.d.ts +3 -4
  1310. package/dist/utils/scriptSegments.d.ts +34 -16
  1311. package/dist/utils/scriptSegments.js +26 -6
  1312. package/dist/utils/sliceText.js +1 -2
  1313. package/dist/utils/stripXmlDeclarations.d.ts +2 -3
  1314. package/dist/utils/tableOfContentsStyle.d.ts +2 -2
  1315. package/dist/utils/tableOperations.d.ts +16 -17
  1316. package/dist/utils/tableOperations.js +44 -41
  1317. package/dist/utils/tablePlacement.d.ts +3 -4
  1318. package/dist/utils/textAdvanceGapsDom.d.ts +8 -0
  1319. package/dist/utils/textAdvanceGapsDom.js +49 -0
  1320. package/dist/utils/textDirectionFlow.d.ts +3 -4
  1321. package/dist/utils/textEncoding.js +1 -2
  1322. package/dist/utils/textFormattingMerge.d.ts +4 -5
  1323. package/dist/utils/tiffConverter.d.ts +5 -6
  1324. package/dist/utils/trailingText.d.ts +4 -5
  1325. package/dist/utils/units.d.ts +19 -20
  1326. package/dist/utils/urlSecurity.d.ts +6 -6
  1327. package/dist/utils/urlSecurity.js +2 -1
  1328. package/dist/utils/zoom.d.ts +4 -5
  1329. package/dist/version-comparison.d.ts +30 -29
  1330. package/dist/version-comparison.js +10 -8
  1331. package/dist/watermark/index.d.ts +5 -5
  1332. package/dist/watermark/index.js +9 -0
  1333. package/package.json +16 -16
@@ -5,7 +5,7 @@ import { ParseContext } from "./parseContext.js";
5
5
  * previously imported from `xml-js`. Every consumer imports this from
6
6
  * `xmlParser.ts`, so the shape must stay identical.
7
7
  */
8
- type XmlElement = {
8
+ export type XmlElement = {
9
9
  declaration?: {
10
10
  attributes?: Record<string, string | number>;
11
11
  };
@@ -24,14 +24,14 @@ type XmlElement = {
24
24
  elements?: XmlElement[];
25
25
  };
26
26
  /** Parent-linked XML namespace declarations; each scope stores only local overrides. */
27
- type XmlNamespaceScope = {
27
+ export type XmlNamespaceScope = {
28
28
  bindings: ReadonlyMap<string, string>;
29
29
  parent?: XmlNamespaceScope;
30
30
  };
31
31
  /**
32
32
  * Common OOXML namespace URIs — re-exported from @stll/docx-utils.
33
33
  */
34
- declare const NAMESPACES: {
34
+ export declare const NAMESPACES: {
35
35
  readonly w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
36
36
  readonly a: "http://schemas.openxmlformats.org/drawingml/2006/main";
37
37
  readonly r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
@@ -66,13 +66,13 @@ declare const NAMESPACES: {
66
66
  * binds it to a prefix this map does not know — simply fails to match, and
67
67
  * the caller falls back to whatever it does without the capture.
68
68
  */
69
- declare const OOXML_NAMESPACE_SCOPE: XmlNamespaceScope;
70
- declare function parseXml(xml: string, inheritedNamespaceScope?: XmlNamespaceScope): XmlElement;
69
+ export declare const OOXML_NAMESPACE_SCOPE: XmlNamespaceScope;
70
+ export declare function parseXml(xml: string, inheritedNamespaceScope?: XmlNamespaceScope): XmlElement;
71
71
  /**
72
72
  * The general-purpose reader {@link parseXml} falls back to, and the reference
73
73
  * the streaming reader's equivalence tests compare against.
74
74
  */
75
- declare function parseXmlWithFastXmlParser(xml: string, inheritedNamespaceScope?: XmlNamespaceScope): XmlElement;
75
+ export declare function parseXmlWithFastXmlParser(xml: string, inheritedNamespaceScope?: XmlNamespaceScope): XmlElement;
76
76
  /**
77
77
  * Serialize an XmlElement back to an XML string.
78
78
  *
@@ -91,23 +91,23 @@ declare function parseXmlWithFastXmlParser(xml: string, inheritedNamespaceScope?
91
91
  * no spelling for dropped. Every other rule reproduces its output byte for
92
92
  * byte, so replaying a capture is unchanged wherever it was already correct.
93
93
  */
94
- declare function elementToXml(element: XmlElement): string;
94
+ export declare function elementToXml(element: XmlElement): string;
95
95
  /**
96
96
  * Parse XML string to a more convenient format
97
97
  */
98
- declare function parseXmlDocument(xml: string): XmlElement | null;
98
+ export declare function parseXmlDocument(xml: string): XmlElement | null;
99
99
  /**
100
100
  * Get local name from a prefixed element name
101
101
  * e.g., "w:p" -> "p", "a:graphic" -> "graphic"
102
102
  */
103
- declare function getLocalName(name: string | undefined): string;
103
+ export declare function getLocalName(name: string | undefined): string;
104
104
  /**
105
105
  * Get namespace prefix from an element name
106
106
  * e.g., "w:p" -> "w", "a:graphic" -> "a"
107
107
  */
108
- declare function getNamespacePrefix(name: string): string | null;
108
+ export declare function getNamespacePrefix(name: string): string | null;
109
109
  /** Namespace URI resolved from the element's in-scope XML declarations. */
110
- declare const getNamespaceUri: (element: XmlElement) => string | undefined;
110
+ export declare const getNamespaceUri: (element: XmlElement) => string | undefined;
111
111
  /**
112
112
  * Namespace URI of one of the element's attributes, by its source spelling.
113
113
  *
@@ -116,29 +116,29 @@ declare const getNamespaceUri: (element: XmlElement) => string | undefined;
116
116
  * and `undefined` is that answer as well as "the prefix resolves to nothing".
117
117
  * A caller that must tell the two apart checks the spelling for a colon.
118
118
  */
119
- declare const resolveAttributeNamespaceUri: (element: XmlElement, attributeName: string) => string | undefined;
119
+ export declare const resolveAttributeNamespaceUri: (element: XmlElement, attributeName: string) => string | undefined;
120
120
  /** WordprocessingML main namespace, Transitional and Strict (ECMA-376 Parts 1 and 4). */
121
- declare const WORDPROCESSINGML_NAMESPACE_URIS: ReadonlySet<string>;
121
+ export declare const WORDPROCESSINGML_NAMESPACE_URIS: ReadonlySet<string>;
122
122
  /** Office document relationship attributes, Transitional and Strict. */
123
- declare const OFFICE_RELATIONSHIP_NAMESPACE_URIS: ReadonlySet<string>;
123
+ export declare const OFFICE_RELATIONSHIP_NAMESPACE_URIS: ReadonlySet<string>;
124
124
  /**
125
125
  * First child whose local name matches AND whose resolved namespace URI is
126
126
  * one of `namespaceUris`. Unlike {@link findChild}, a same-named element
127
127
  * from a foreign namespace is not accepted.
128
128
  */
129
- declare function findChildByNamespaceUri(parent: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): XmlElement | null;
129
+ export declare function findChildByNamespaceUri(parent: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): XmlElement | null;
130
130
  /** First direct child in either supported WordprocessingML namespace. */
131
- declare const findWordprocessingChild: (parent: XmlElement | null | undefined, localName: string) => XmlElement | null;
131
+ export declare const findWordprocessingChild: (parent: XmlElement | null | undefined, localName: string) => XmlElement | null;
132
132
  /** All direct children whose local name and resolved namespace both match. */
133
- declare function findChildrenByNamespaceUri(parent: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): XmlElement[];
134
- type XmlAttributeMatch = {
133
+ export declare function findChildrenByNamespaceUri(parent: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): XmlElement[];
134
+ export type XmlAttributeMatch = {
135
135
  name: string;
136
136
  value: string;
137
137
  };
138
138
  /** Find an attribute whose prefix resolves to one of the accepted namespace URIs. */
139
- declare function findAttributeByNamespaceUri(element: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): XmlAttributeMatch | null;
139
+ export declare function findAttributeByNamespaceUri(element: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): XmlAttributeMatch | null;
140
140
  /** Get an attribute whose prefix resolves to one of the accepted namespace URIs. */
141
- declare function getAttributeByNamespaceUri(element: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): string | null;
141
+ export declare function getAttributeByNamespaceUri(element: XmlElement | null | undefined, namespaceUris: ReadonlySet<string>, localName: string): string | null;
142
142
  /**
143
143
  * Check if an element matches a given namespaced name
144
144
  *
@@ -146,7 +146,7 @@ declare function getAttributeByNamespaceUri(element: XmlElement | null | undefin
146
146
  * @param namespace - Namespace prefix (e.g., "w", "a")
147
147
  * @param localName - Local element name (e.g., "p", "r")
148
148
  */
149
- declare function matchesName(element: XmlElement, _namespace: string, localName: string): boolean;
149
+ export declare function matchesName(element: XmlElement, _namespace: string, localName: string): boolean;
150
150
  /**
151
151
  * Find first child element matching the given namespaced name
152
152
  *
@@ -155,7 +155,7 @@ declare function matchesName(element: XmlElement, _namespace: string, localName:
155
155
  * @param localName - Local element name (e.g., "p")
156
156
  * @returns First matching child or null
157
157
  */
158
- declare function findChild(parent: XmlElement | null | undefined, _namespace: string, localName: string): XmlElement | null;
158
+ export declare function findChild(parent: XmlElement | null | undefined, _namespace: string, localName: string): XmlElement | null;
159
159
  /**
160
160
  * Find all child elements matching the given namespaced name
161
161
  *
@@ -164,7 +164,7 @@ declare function findChild(parent: XmlElement | null | undefined, _namespace: st
164
164
  * @param localName - Local element name
165
165
  * @returns Array of matching children
166
166
  */
167
- declare function findChildren(parent: XmlElement | null | undefined, _namespace: string, localName: string): XmlElement[];
167
+ export declare function findChildren(parent: XmlElement | null | undefined, _namespace: string, localName: string): XmlElement[];
168
168
  /**
169
169
  * Find first child element by local name only (ignoring namespace)
170
170
  *
@@ -172,7 +172,7 @@ declare function findChildren(parent: XmlElement | null | undefined, _namespace:
172
172
  * @param localName - Local element name
173
173
  * @returns First matching child or null
174
174
  */
175
- declare function findChildByLocalName(parent: XmlElement | null | undefined, localName: string): XmlElement | null;
175
+ export declare function findChildByLocalName(parent: XmlElement | null | undefined, localName: string): XmlElement | null;
176
176
  /**
177
177
  * Find all child elements by local name only
178
178
  *
@@ -180,7 +180,7 @@ declare function findChildByLocalName(parent: XmlElement | null | undefined, loc
180
180
  * @param localName - Local element name
181
181
  * @returns Array of matching children
182
182
  */
183
- declare function findChildrenByLocalName(parent: XmlElement | null | undefined, localName: string): XmlElement[];
183
+ export declare function findChildrenByLocalName(parent: XmlElement | null | undefined, localName: string): XmlElement[];
184
184
  /**
185
185
  * Find first child element by full name (including namespace prefix)
186
186
  *
@@ -188,21 +188,21 @@ declare function findChildrenByLocalName(parent: XmlElement | null | undefined,
188
188
  * @param fullName - Full element name with namespace prefix (e.g., 'wp:extent')
189
189
  * @returns First matching child or null
190
190
  */
191
- declare function findByFullName(parent: XmlElement | null | undefined, fullName: string): XmlElement | null;
191
+ export declare function findByFullName(parent: XmlElement | null | undefined, fullName: string): XmlElement | null;
192
192
  /**
193
193
  * Get all child elements (excludes text nodes, etc.)
194
194
  *
195
195
  * @param parent - Parent element
196
196
  * @returns Array of child elements
197
197
  */
198
- declare function getChildElements(parent: XmlElement | null | undefined): XmlElement[];
198
+ export declare function getChildElements(parent: XmlElement | null | undefined): XmlElement[];
199
199
  /**
200
200
  * Folio's normalized Markup Compatibility policy: use the first Choice, which
201
201
  * is the established parser behavior when `mc:Requires` cannot be evaluated;
202
202
  * use Fallback only when there is no Choice. Callers serialize that selected
203
203
  * branch as ordinary WordprocessingML rather than concatenating alternatives.
204
204
  */
205
- declare function selectAlternateContentBranch(alternateContent: XmlElement): XmlElement | undefined;
205
+ export declare function selectAlternateContentBranch(alternateContent: XmlElement): XmlElement | undefined;
206
206
  /**
207
207
  * Get an attribute value from an element
208
208
  *
@@ -222,7 +222,7 @@ declare function selectAlternateContentBranch(alternateContent: XmlElement): Xml
222
222
  * would silently drop on round-trip even though the element itself is
223
223
  * recognised.
224
224
  */
225
- declare function getAttribute(element: XmlElement | null | undefined, namespace: string | null, name: string): string | null;
225
+ export declare function getAttribute(element: XmlElement | null | undefined, namespace: string | null, name: string): string | null;
226
226
  /**
227
227
  * Read an attribute by local name, trying the element's own prefix first,
228
228
  * then the canonical Word prefix, then unprefixed.
@@ -235,7 +235,7 @@ declare function getAttribute(element: XmlElement | null | undefined, namespace:
235
235
  * an OOXML attribute that conventionally lives in the `w:` namespace
236
236
  * but could appear under an alternate prefix bound to the same URI.
237
237
  */
238
- declare function getAttributeAnyPrefix(element: XmlElement | null | undefined, localName: string): string | null;
238
+ export declare function getAttributeAnyPrefix(element: XmlElement | null | undefined, localName: string): string | null;
239
239
  /**
240
240
  * Get an attribute value, trying multiple possible names
241
241
  *
@@ -243,21 +243,21 @@ declare function getAttributeAnyPrefix(element: XmlElement | null | undefined, l
243
243
  * @param names - Array of possible attribute names (with or without namespace)
244
244
  * @returns First found attribute value or null
245
245
  */
246
- declare function getAttributeAny(element: XmlElement | null | undefined, names: string[]): string | null;
246
+ export declare function getAttributeAny(element: XmlElement | null | undefined, names: string[]): string | null;
247
247
  /**
248
248
  * Get all attributes from an element
249
249
  *
250
250
  * @param element - Element to get attributes from
251
251
  * @returns Record of attribute name -> value
252
252
  */
253
- declare function getAttributes(element: XmlElement | null | undefined): Record<string, string>;
253
+ export declare function getAttributes(element: XmlElement | null | undefined): Record<string, string>;
254
254
  /**
255
255
  * Get the text content of an element (concatenates all text nodes)
256
256
  *
257
257
  * @param element - Element to get text from
258
258
  * @returns Text content or empty string
259
259
  */
260
- declare function getTextContent(element: XmlElement | null | undefined): string;
260
+ export declare function getTextContent(element: XmlElement | null | undefined): string;
261
261
  /**
262
262
  * Read an `ST_OnOff` attribute.
263
263
  *
@@ -270,7 +270,7 @@ declare function getTextContent(element: XmlElement | null | undefined): string;
270
270
  * `w:beforeAutospacing="on"` as false, and the save path then writes `"0"`,
271
271
  * inverting what the document said.
272
272
  */
273
- declare function parseOnOffAttribute(element: XmlElement | null | undefined, namespace: string | null, name: string, context?: ParseContext): boolean | undefined;
273
+ export declare function parseOnOffAttribute(element: XmlElement | null | undefined, namespace: string | null, name: string, context?: ParseContext): boolean | undefined;
274
274
  /**
275
275
  * Check if a child element exists (used for boolean flags in OOXML)
276
276
  *
@@ -279,14 +279,14 @@ declare function parseOnOffAttribute(element: XmlElement | null | undefined, nam
279
279
  * @param localName - Local element name
280
280
  * @returns true if child element exists
281
281
  */
282
- declare function hasChild(parent: XmlElement | null | undefined, namespace: string, localName: string): boolean;
282
+ export declare function hasChild(parent: XmlElement | null | undefined, namespace: string, localName: string): boolean;
283
283
  /**
284
284
  * Parse an OOXML color value
285
285
  *
286
286
  * @param element - Color element (e.g., w:color)
287
287
  * @returns Object with val, themeColor, themeTint, themeShade
288
288
  */
289
- declare function parseColorElement(element: XmlElement | null | undefined): {
289
+ export declare function parseColorElement(element: XmlElement | null | undefined): {
290
290
  val?: string;
291
291
  themeColor?: string;
292
292
  themeTint?: string;
@@ -301,7 +301,7 @@ declare function parseColorElement(element: XmlElement | null | undefined): {
301
301
  * @param scale - Optional scale factor (e.g., 20 for twips to points)
302
302
  * @returns Parsed number or undefined
303
303
  */
304
- declare function parseNumericAttribute(element: XmlElement | null | undefined, namespace: string | null, name: string, scale?: number): number | undefined;
304
+ export declare function parseNumericAttribute(element: XmlElement | null | undefined, namespace: string | null, name: string, scale?: number): number | undefined;
305
305
  /**
306
306
  * Parse a zero-based numbering level reference.
307
307
  *
@@ -309,14 +309,14 @@ declare function parseNumericAttribute(element: XmlElement | null | undefined, n
309
309
  * sentinel values alongside `w:numId="0"` to disable numbering; treat those
310
310
  * as an omitted level instead of leaking an invalid value into the model.
311
311
  */
312
- declare function parseNumberingLevelAttribute(element: XmlElement | null | undefined): number | undefined;
312
+ export declare function parseNumberingLevelAttribute(element: XmlElement | null | undefined): number | undefined;
313
313
  /**
314
314
  * Parse `w:w` on a table width/height element. A percentage may be spelled the
315
315
  * way it reads (`100%`) or as the number its slot counts in
316
316
  * (50ths-of-percent, `5000`); the generated slot table says which unit that
317
317
  * is, so the two spellings are not decided here.
318
318
  */
319
- declare function parseTableMeasurementValue(element: XmlElement | null | undefined, widthType: string): number | undefined;
319
+ export declare function parseTableMeasurementValue(element: XmlElement | null | undefined, widthType: string): number | undefined;
320
320
  /**
321
321
  * Parse an OOXML `ST_OnOff` lexical value.
322
322
  *
@@ -324,7 +324,7 @@ declare function parseTableMeasurementValue(element: XmlElement | null | undefin
324
324
  * reports the value folio declined to read, and the hundred that do not yet
325
325
  * thread one keep compiling and keep their behaviour.
326
326
  */
327
- declare function parseOnOffValue(value: string | null | undefined, context?: ParseContext, element?: string): boolean | undefined;
327
+ export declare function parseOnOffValue(value: string | null | undefined, context?: ParseContext, element?: string): boolean | undefined;
328
328
  /**
329
329
  * Parse a boolean value from an attribute or element presence
330
330
  *
@@ -337,7 +337,7 @@ declare function parseOnOffValue(value: string | null | undefined, context?: Par
337
337
  * @param namespace - Namespace for val attribute
338
338
  * @returns boolean value
339
339
  */
340
- declare function parseBooleanElement(element: XmlElement | null | undefined, namespace?: string, context?: ParseContext): boolean;
340
+ export declare function parseBooleanElement(element: XmlElement | null | undefined, namespace?: string, context?: ParseContext): boolean;
341
341
  /**
342
342
  * Read a `CT_OnOff` child as the three states it has.
343
343
  *
@@ -348,7 +348,7 @@ declare function parseBooleanElement(element: XmlElement | null | undefined, nam
348
348
  * a save reads its toggles through here, and writes what it gets back —
349
349
  * `undefined` included — so the element it did not carry stays uncarried.
350
350
  */
351
- declare function parseOnOffChild(parent: XmlElement | null | undefined, namespace: string, localName: string, context?: ParseContext): boolean | undefined;
351
+ export declare function parseOnOffChild(parent: XmlElement | null | undefined, namespace: string, localName: string, context?: ParseContext): boolean | undefined;
352
352
  /**
353
353
  * Deep find - search recursively for an element
354
354
  *
@@ -357,7 +357,7 @@ declare function parseOnOffChild(parent: XmlElement | null | undefined, namespac
357
357
  * @param localName - Local element name
358
358
  * @returns First matching element found or null
359
359
  */
360
- declare function findDeep(root: XmlElement | null | undefined, namespace: string, localName: string): XmlElement | null;
360
+ export declare function findDeep(root: XmlElement | null | undefined, namespace: string, localName: string): XmlElement | null;
361
361
  /**
362
362
  * Find all elements matching name, searching recursively
363
363
  *
@@ -366,7 +366,7 @@ declare function findDeep(root: XmlElement | null | undefined, namespace: string
366
366
  * @param localName - Local element name
367
367
  * @returns Array of all matching elements
368
368
  */
369
- declare function findAllDeep(root: XmlElement | null | undefined, namespace: string, localName: string): XmlElement[];
369
+ export declare function findAllDeep(root: XmlElement | null | undefined, namespace: string, localName: string): XmlElement[];
370
370
  /**
371
371
  * Collect every `xmlns` / `xmlns:*` declaration from an element's attributes.
372
372
  *
@@ -376,7 +376,7 @@ declare function findAllDeep(root: XmlElement | null | undefined, namespace: str
376
376
  * is emitted on its own. Carrying the source declarations forward keeps the
377
377
  * raw replay self-contained regardless of the producer's prefix choice.
378
378
  */
379
- declare function collectXmlnsDeclarations(element: XmlElement): Record<string, string>;
379
+ export declare function collectXmlnsDeclarations(element: XmlElement): Record<string, string>;
380
380
  /**
381
381
  * Merge an element's own `xmlns` / `xmlns:*` declarations onto an inherited
382
382
  * in-scope set, returning the accumulated set. Threaded down the ancestor
@@ -385,7 +385,7 @@ declare function collectXmlnsDeclarations(element: XmlElement): Record<string, s
385
385
  * inherited object is not mutated; the same reference is returned unchanged when
386
386
  * the element declares nothing.
387
387
  */
388
- declare function mergeXmlnsDeclarations(inherited: Record<string, string>, element: XmlElement): Record<string, string>;
388
+ export declare function mergeXmlnsDeclarations(inherited: Record<string, string>, element: XmlElement): Record<string, string>;
389
389
  /**
390
390
  * Return a shallow clone of `element` carrying the inherited namespace
391
391
  * declarations needed by its raw subtree.
@@ -396,7 +396,7 @@ declare function mergeXmlnsDeclarations(inherited: Record<string, string>, eleme
396
396
  * If a producer omitted a binding for a standard OOXML prefix, use its
397
397
  * canonical binding so the detached subtree is valid on its first replay.
398
398
  */
399
- declare function cloneWithXmlnsDeclarations(element: XmlElement, xmlnsDecls: Record<string, string>): XmlElement;
399
+ export declare function cloneWithXmlnsDeclarations(element: XmlElement, xmlnsDecls: Record<string, string>): XmlElement;
400
400
  /**
401
401
  * Shallow clone of an element that keeps its resolved namespace metadata.
402
402
  *
@@ -406,6 +406,5 @@ declare function cloneWithXmlnsDeclarations(element: XmlElement, xmlnsDecls: Rec
406
406
  * original's scope leaves resolution unchanged whether or not the clone
407
407
  * carries `xmlns` attributes of its own.
408
408
  */
409
- declare function cloneElement(element: XmlElement, overrides: Partial<XmlElement>): XmlElement;
410
- //#endregion
411
- export { NAMESPACES, OFFICE_RELATIONSHIP_NAMESPACE_URIS, OOXML_NAMESPACE_SCOPE, WORDPROCESSINGML_NAMESPACE_URIS, XmlAttributeMatch, XmlElement, XmlNamespaceScope, cloneElement, cloneWithXmlnsDeclarations, collectXmlnsDeclarations, elementToXml, findAllDeep, findAttributeByNamespaceUri, findByFullName, findChild, findChildByLocalName, findChildByNamespaceUri, findChildren, findChildrenByLocalName, findChildrenByNamespaceUri, findDeep, findWordprocessingChild, getAttribute, getAttributeAny, getAttributeAnyPrefix, getAttributeByNamespaceUri, getAttributes, getChildElements, getLocalName, getNamespacePrefix, getNamespaceUri, getTextContent, hasChild, matchesName, mergeXmlnsDeclarations, parseBooleanElement, parseColorElement, parseNumberingLevelAttribute, parseNumericAttribute, parseOnOffAttribute, parseOnOffChild, parseOnOffValue, parseTableMeasurementValue, parseXml, parseXmlDocument, parseXmlWithFastXmlParser, resolveAttributeNamespaceUri, selectAlternateContentBranch };
409
+ export declare function cloneElement(element: XmlElement, overrides: Partial<XmlElement>): XmlElement;
410
+ //#endregion
@@ -384,10 +384,7 @@ function selectAlternateContentBranch(alternateContent) {
384
384
  if (getNamespaceUri(child) !== NAMESPACES.mc) continue;
385
385
  switch (getLocalName(child.name)) {
386
386
  case "Choice": return child;
387
- case "Fallback":
388
- fallback ??= child;
389
- break;
390
- default: break;
387
+ case "Fallback": fallback ??= child;
391
388
  }
392
389
  }
393
390
  return fallback;
@@ -789,8 +786,10 @@ const addPrefix = (name, prefixes) => {
789
786
  * those bindings even when no descendant name uses them.
790
787
  */
791
788
  const collectUsedNamespacePrefixes = (element, prefixes = /* @__PURE__ */ new Set()) => {
792
- if (element.name) if (element.name.includes(":")) addPrefix(element.name, prefixes);
793
- else prefixes.add("");
789
+ if (element.name) {
790
+ if (element.name.includes(":")) addPrefix(element.name, prefixes);
791
+ else prefixes.add("");
792
+ }
794
793
  if (element.attributes) for (const [name, value] of Object.entries(element.attributes)) {
795
794
  if (name === "xmlns" || name.startsWith("xmlns:")) continue;
796
795
  addPrefix(name, prefixes);
@@ -821,14 +820,15 @@ function cloneWithXmlnsDeclarations(element, xmlnsDecls) {
821
820
  const prefixes = collectUsedNamespacePrefixes(element);
822
821
  const additions = {};
823
822
  const attributes = element.attributes ?? {};
824
- for (const [name, value] of Object.entries(xmlnsDecls)) {
825
- const prefix = name === "xmlns" ? "" : name.slice(6);
826
- if (prefixes.has(prefix) && attributes[name] === void 0) additions[name] = value;
827
- }
828
823
  for (const prefix of prefixes) {
829
824
  const name = `xmlns:${prefix}`;
830
- if (!prefix || attributes[name] !== void 0 || additions[name] !== void 0 || !isCanonicalNamespacePrefix(prefix)) continue;
831
- additions[name] = NAMESPACES[prefix];
825
+ const declaration = prefix === "" ? "xmlns" : name;
826
+ if (attributes[declaration] !== void 0 || prefix === "xml") continue;
827
+ const sourceBinding = resolveNamespaceUri(element.namespaceScope, prefix);
828
+ const inheritedBinding = xmlnsDecls[declaration];
829
+ const binding = sourceBinding ?? inheritedBinding;
830
+ if (binding !== void 0) additions[declaration] = binding;
831
+ else if (isCanonicalNamespacePrefix(prefix)) additions[declaration] = NAMESPACES[prefix];
832
832
  }
833
833
  for (const _key in additions) return cloneElement(element, { attributes: {
834
834
  ...attributes,
@@ -1,4 +1,6 @@
1
+ import { TaggedErrorClass } from "better-result";
1
2
  //#region src/docx/xmlResourceLimits.d.ts
3
+ declare const XmlResourceLimitErrorBase: TaggedErrorClass<"XmlResourceLimitError">;
2
4
  /**
3
5
  * Shared bounds for XML parts parsed by Folio.
4
6
  *
@@ -37,7 +39,7 @@
37
39
  * ceiling of 250 MiB, ~37M elements and well past 1.8 GB of tree while passing
38
40
  * every bound. Lower these to trade format reach for a smaller ceiling.
39
41
  */
40
- declare const FOLIO_XML_RESOURCE_LIMITS: {
42
+ export declare const FOLIO_XML_RESOURCE_LIMITS: {
41
43
  readonly maxBytes: number;
42
44
  readonly maxDepth: 100;
43
45
  /** 1.68x the corpus maximum (596,668). Unchanged; a shipped bound is not loosened. */
@@ -49,7 +51,7 @@ declare const FOLIO_XML_RESOURCE_LIMITS: {
49
51
  /** 4.69x the corpus maximum (639,110). */
50
52
  readonly maxAttributesPerPackage: 3000000;
51
53
  };
52
- type XmlResourceLimits = {
54
+ export type XmlResourceLimits = {
53
55
  maxBytes: number;
54
56
  maxDepth: number;
55
57
  maxElementsPerPart: number;
@@ -58,9 +60,8 @@ type XmlResourceLimits = {
58
60
  maxAttributesPerPackage: number;
59
61
  };
60
62
  type XmlResourceLimitKind = "bytes" | "depth" | "elements" | "attributes" | "package-elements" | "package-attributes" | "syntax";
61
- declare const XmlResourceLimitError_base: import("better-result").TaggedErrorClass<"XmlResourceLimitError">;
62
63
  /** XML input exceeded a parser resource bound or could not be scanned safely. */
63
- declare class XmlResourceLimitError extends XmlResourceLimitError_base<{
64
+ export declare class XmlResourceLimitError extends XmlResourceLimitErrorBase<{
64
65
  message: string;
65
66
  limit: XmlResourceLimitKind;
66
67
  /** The package part being scanned, when the caller named one. */
@@ -76,13 +77,13 @@ declare class XmlResourceLimitError extends XmlResourceLimitError_base<{
76
77
  * parts, each individually modest. The budget is the accumulator the readers
77
78
  * carry across parts so the ceiling is the package's, not each part's.
78
79
  */
79
- type XmlPackageBudget = {
80
+ export type XmlPackageBudget = {
80
81
  elements: number;
81
82
  attributes: number;
82
83
  };
83
- declare const createXmlPackageBudget: () => XmlPackageBudget;
84
- declare const exceedsUtf8ByteLimit: (value: string, maxBytes: number) => boolean;
85
- type XmlResourceScanOptions = {
84
+ export declare const createXmlPackageBudget: () => XmlPackageBudget;
85
+ export declare const exceedsUtf8ByteLimit: (value: string, maxBytes: number) => boolean;
86
+ export type XmlResourceScanOptions = {
86
87
  xml: string;
87
88
  limits?: XmlResourceLimits;
88
89
  /** The package path scanned, carried on any refusal so a host can name it. */
@@ -91,7 +92,7 @@ type XmlResourceScanOptions = {
91
92
  budget?: XmlPackageBudget;
92
93
  };
93
94
  /** What the preflight counted, for callers that reconcile it against the tree. */
94
- type XmlResourceScanResult = {
95
+ export type XmlResourceScanResult = {
95
96
  elements: number;
96
97
  attributes: number;
97
98
  maxDepth: number;
@@ -103,6 +104,6 @@ type XmlResourceScanResult = {
103
104
  * bound is checked at the point it is crossed, so the work done before a
104
105
  * refusal is proportional to the limit rather than to the input.
105
106
  */
106
- declare const assertXmlResourceLimits: ({ xml, limits, partPath, budget }: XmlResourceScanOptions) => XmlResourceScanResult;
107
+ export declare const assertXmlResourceLimits: ({ xml, limits, partPath, budget }: XmlResourceScanOptions) => XmlResourceScanResult;
107
108
  //#endregion
108
- export { FOLIO_XML_RESOURCE_LIMITS, XmlPackageBudget, XmlResourceLimitError, XmlResourceLimits, XmlResourceScanOptions, XmlResourceScanResult, assertXmlResourceLimits, createXmlPackageBudget, exceedsUtf8ByteLimit };
109
+ export {};
@@ -1,4 +1,7 @@
1
1
  import { TaggedError } from "better-result";
2
+ //#region src/docx/xmlResourceLimits.ts
3
+ const MEBIBYTE = 1048576;
4
+ const XmlResourceLimitErrorBase = TaggedError("XmlResourceLimitError");
2
5
  /**
3
6
  * Shared bounds for XML parts parsed by Folio.
4
7
  *
@@ -38,7 +41,7 @@ import { TaggedError } from "better-result";
38
41
  * every bound. Lower these to trade format reach for a smaller ceiling.
39
42
  */
40
43
  const FOLIO_XML_RESOURCE_LIMITS = {
41
- maxBytes: 128 * (1024 * 1024),
44
+ maxBytes: 128 * MEBIBYTE,
42
45
  maxDepth: 100,
43
46
  /** 1.68x the corpus maximum (596,668). Unchanged; a shipped bound is not loosened. */
44
47
  maxElementsPerPart: 1e6,
@@ -50,7 +53,7 @@ const FOLIO_XML_RESOURCE_LIMITS = {
50
53
  maxAttributesPerPackage: 3e6
51
54
  };
52
55
  /** XML input exceeded a parser resource bound or could not be scanned safely. */
53
- var XmlResourceLimitError = class extends TaggedError("XmlResourceLimitError") {};
56
+ var XmlResourceLimitError = class extends XmlResourceLimitErrorBase {};
54
57
  const createXmlPackageBudget = () => ({
55
58
  elements: 0,
56
59
  attributes: 0
@@ -1,5 +1,4 @@
1
1
  //#region src/docx/xmlSafety.d.ts
2
- type DocxXmlSafetyIssue = "doctype-forbidden" | "entity-forbidden" | "not-well-formed";
3
- declare const getDocxXmlSafetyIssue: (xml: string) => DocxXmlSafetyIssue | null;
4
- //#endregion
5
- export { DocxXmlSafetyIssue, getDocxXmlSafetyIssue };
2
+ export type DocxXmlSafetyIssue = "doctype-forbidden" | "entity-forbidden" | "not-well-formed";
3
+ export declare const getDocxXmlSafetyIssue: (xml: string) => DocxXmlSafetyIssue | null;
4
+ //#endregion
@@ -4,14 +4,14 @@ import { HeadlessFontSource, HeadlessFontSubstitution } from "./fonts/headlessMe
4
4
  import { HeadlessLayoutGap } from "./headless-layout.js";
5
5
  import { PdfSubstitution } from "./pdf/fonts.js";
6
6
  import { PdfUnencodable } from "./pdf/writePdf.js";
7
- import { Result } from "better-result";
7
+ import { Result, TaggedErrorClass } from "better-result";
8
8
  //#region src/export-pdf.d.ts
9
- declare const ExportPdfError_base: import("better-result").TaggedErrorClass<"ExportPdfError">;
10
- declare class ExportPdfError extends ExportPdfError_base<{
9
+ declare const ExportPdfErrorBase: TaggedErrorClass<"ExportPdfError">;
10
+ export declare class ExportPdfError extends ExportPdfErrorBase<{
11
11
  message: string;
12
12
  cause?: unknown;
13
13
  }> {}
14
- type ExportDocxToPdfOptions = {
14
+ export type ExportDocxToPdfOptions = {
15
15
  /** Supplies face binaries for measurement and for embedding alike. */
16
16
  readonly fonts: HeadlessFontSource;
17
17
  /**
@@ -29,7 +29,7 @@ type ExportDocxToPdfOptions = {
29
29
  */
30
30
  readonly pages?: readonly number[];
31
31
  };
32
- type ExportDocxToPdfResult = {
32
+ export type ExportDocxToPdfResult = {
33
33
  readonly bytes: Uint8Array;
34
34
  readonly pageCount: number;
35
35
  /** Constructs the display list could not represent. */
@@ -43,12 +43,12 @@ type ExportDocxToPdfResult = {
43
43
  /** Code points painted as `.notdef` because no supplied face covers them. */
44
44
  readonly unencodable: readonly PdfUnencodable[];
45
45
  };
46
- type BuildDocxDisplayListOptions = {
46
+ export type BuildDocxDisplayListOptions = {
47
47
  /** Supplies face binaries for measurement. */
48
48
  readonly fonts: HeadlessFontSource;
49
49
  readonly metadata?: DisplayMetadata;
50
50
  };
51
- type BuildDocxDisplayListResult = {
51
+ export type BuildDocxDisplayListResult = {
52
52
  /** The pages every backend paints: the PDF writer, the DOM and HTML backends. */
53
53
  readonly list: DisplayList;
54
54
  /** Stories the headless pipeline does not paginate. */
@@ -62,15 +62,15 @@ type BuildDocxDisplayListResult = {
62
62
  * every other headless build and export, for the reason
63
63
  * {@link runExclusively} gives.
64
64
  */
65
- declare const buildDocxDisplayList: (input: DocxInput, options: BuildDocxDisplayListOptions) => Promise<Result<BuildDocxDisplayListResult, ExportPdfError>>;
66
- declare const exportDocxToPdf: (input: DocxInput, options: ExportDocxToPdfOptions) => Promise<Result<ExportDocxToPdfResult, ExportPdfError>>;
67
- type WriteDisplayListPdfOptions = Pick<ExportDocxToPdfOptions, "fonts" | "timestamp" | "producer">;
68
- type WriteDisplayListPdfResult = Pick<ExportDocxToPdfResult, "bytes" | "pageCount" | "embeddingSubstitutions" | "unencodable">;
65
+ export declare const buildDocxDisplayList: (input: DocxInput, options: BuildDocxDisplayListOptions) => Promise<Result<BuildDocxDisplayListResult, ExportPdfError>>;
66
+ export declare const exportDocxToPdf: (input: DocxInput, options: ExportDocxToPdfOptions) => Promise<Result<ExportDocxToPdfResult, ExportPdfError>>;
67
+ export type WriteDisplayListPdfOptions = Pick<ExportDocxToPdfOptions, "fonts" | "timestamp" | "producer">;
68
+ export type WriteDisplayListPdfResult = Pick<ExportDocxToPdfResult, "bytes" | "pageCount" | "embeddingSubstitutions" | "unencodable">;
69
69
  /**
70
70
  * Write a display list built by {@link buildDocxDisplayList} (or narrowed by
71
71
  * `selectDisplayPages`) as a PDF, embedding faces from the same source the
72
72
  * layout measured with.
73
73
  */
74
- declare const writeDisplayListPdf: (list: DisplayList, options: WriteDisplayListPdfOptions) => Promise<Result<WriteDisplayListPdfResult, ExportPdfError>>;
74
+ export declare const writeDisplayListPdf: (list: DisplayList, options: WriteDisplayListPdfOptions) => Promise<Result<WriteDisplayListPdfResult, ExportPdfError>>;
75
75
  //#endregion
76
- export { BuildDocxDisplayListOptions, BuildDocxDisplayListResult, ExportDocxToPdfOptions, ExportDocxToPdfResult, ExportPdfError, WriteDisplayListPdfOptions, WriteDisplayListPdfResult, buildDocxDisplayList, exportDocxToPdf, writeDisplayListPdf };
76
+ export {};
@@ -6,6 +6,7 @@ import { layoutDocxHeadless } from "./headless-layout.js";
6
6
  import { getMeasureProvider, setMeasureProvider } from "./layout-engine/measure/measureProvider.js";
7
7
  import { writePdf } from "./pdf/writePdf.js";
8
8
  import { Result, TaggedError } from "better-result";
9
+ import { survivingComments } from "@stll/docx-core/ops";
9
10
  //#region src/export-pdf.ts
10
11
  /**
11
12
  * `.docx` to PDF, with no browser and no second painter.
@@ -30,7 +31,8 @@ import { Result, TaggedError } from "better-result";
30
31
  * `compareDocx` uses, so a caller cannot get nondeterministic output by
31
32
  * omission.
32
33
  */
33
- var ExportPdfError = class extends TaggedError("ExportPdfError") {};
34
+ const ExportPdfErrorBase = TaggedError("ExportPdfError");
35
+ var ExportPdfError = class extends ExportPdfErrorBase {};
34
36
  const toFontRequest = ({ family, weight, italic }) => ({
35
37
  family,
36
38
  bold: weight >= 700,
@@ -118,7 +120,7 @@ const buildWithHeadlessProvider = async (input, options) => {
118
120
  documentFeatures: laidOut.value.documentFeatures,
119
121
  ...laidOut.value.furniture,
120
122
  embeddedFonts: laidOut.value.embeddedFonts,
121
- ...laidOut.value.document.package.document.comments === void 0 ? {} : { comments: displayCommentsFrom(laidOut.value.document.package.document.comments) },
123
+ ...laidOut.value.document.package.document.comments === void 0 ? {} : { comments: displayCommentsFrom(survivingComments(laidOut.value.document)) },
122
124
  ...options.metadata === void 0 ? {} : { metadata: options.metadata }
123
125
  });
124
126
  return Result.ok({
@@ -7,6 +7,5 @@ import { FlowBlock, Page } from "../layout-engine/types.js";
7
7
  * splits across pages takes the first (lowest) page it appears on, matching how
8
8
  * Word resolves a PAGEREF to the start of the bookmark.
9
9
  */
10
- declare function buildBookmarkPageMap(pages: readonly Page[], blocks: readonly FlowBlock[]): Map<string, number>;
11
- //#endregion
12
- export { buildBookmarkPageMap };
10
+ export declare function buildBookmarkPageMap(pages: readonly Page[], blocks: readonly FlowBlock[]): Map<string, number>;
11
+ //#endregion
@@ -10,6 +10,6 @@ type BookmarkTextInputs = {
10
10
  * paragraph level, so a REF resolves to that paragraph's visible text. Document
11
11
  * order, independent of layout. First paragraph carrying a name wins.
12
12
  */
13
- declare function buildBookmarkText(blocks: readonly FlowBlock[], inputs?: BookmarkTextInputs): Map<string, string>;
13
+ export declare function buildBookmarkText(blocks: readonly FlowBlock[], inputs?: BookmarkTextInputs): Map<string, string>;
14
14
  //#endregion
15
- export { buildBookmarkText };
15
+ export {};
@@ -36,7 +36,7 @@ function bookmarkFieldText(run, inputs) {
36
36
  if (run.pmStart === void 0 || !inputs.seqValues?.has(run.pmStart)) return run.fallback ?? "";
37
37
  const parsed = parseFieldInstruction(run.instruction || run.fieldType);
38
38
  if (parsed.type !== "SEQ") return run.fallback ?? "";
39
- return evaluateField(parsed, {
39
+ const context = {
40
40
  pageNumber: 1,
41
41
  totalPages: 1,
42
42
  sectionPages: 1,
@@ -44,7 +44,8 @@ function bookmarkFieldText(run, inputs) {
44
44
  bookmarkText: EMPTY_STRING_STRING,
45
45
  seqValues: inputs.seqValues ?? EMPTY_NUMBER_NUMBER,
46
46
  now: /* @__PURE__ */ new Date(0)
47
- }, {
47
+ };
48
+ return evaluateField(parsed, context, {
48
49
  fallback: run.fallback ?? "",
49
50
  instanceId: run.pmStart,
50
51
  ...run.fldLock ? { locked: true } : {}