@stll/folio-core 0.68.0 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1134) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +4 -4
  2. package/dist/ai-edits/apply.d.ts +39 -16
  3. package/dist/ai-edits/apply.js +1014 -723
  4. package/dist/ai-edits/block-identity.d.ts +6 -0
  5. package/dist/ai-edits/block-identity.js +11 -1
  6. package/dist/ai-edits/blockRange.d.ts +9 -0
  7. package/dist/ai-edits/clean-text.d.ts +2 -0
  8. package/dist/ai-edits/clean-text.js +2 -1
  9. package/dist/ai-edits/comment-lifecycle.d.ts +24 -0
  10. package/dist/ai-edits/comment-lifecycle.js +17 -8
  11. package/dist/ai-edits/directJoin.d.ts +30 -0
  12. package/dist/ai-edits/directJoin.js +30 -0
  13. package/dist/ai-edits/existingRevisions.d.ts +9 -0
  14. package/dist/ai-edits/existingRevisions.js +30 -0
  15. package/dist/ai-edits/finalSectionReview.d.ts +11 -0
  16. package/dist/ai-edits/finalSectionReview.js +26 -0
  17. package/dist/ai-edits/headless.d.ts +275 -14
  18. package/dist/ai-edits/headless.js +1597 -195
  19. package/dist/ai-edits/index.d.ts +11 -10
  20. package/dist/ai-edits/index.js +2 -2
  21. package/dist/ai-edits/markdownInsertion.d.ts +25 -0
  22. package/dist/ai-edits/markdownInsertion.js +67 -0
  23. package/dist/ai-edits/minimal-replacement.d.ts +120 -1
  24. package/dist/ai-edits/minimal-replacement.js +81 -1
  25. package/dist/ai-edits/newListNumbering.d.ts +31 -7
  26. package/dist/ai-edits/newListNumbering.js +46 -8
  27. package/dist/ai-edits/note-references.d.ts +19 -1
  28. package/dist/ai-edits/note-references.js +3 -1
  29. package/dist/ai-edits/pending-suggestions.d.ts +44 -2
  30. package/dist/ai-edits/pending-suggestions.js +483 -22
  31. package/dist/ai-edits/pendingJoin.d.ts +170 -0
  32. package/dist/ai-edits/pendingJoin.js +272 -0
  33. package/dist/ai-edits/read.d.ts +57 -4
  34. package/dist/ai-edits/read.js +317 -40
  35. package/dist/ai-edits/removed-blocks.d.ts +1 -1
  36. package/dist/ai-edits/result-validation.d.ts +36 -1
  37. package/dist/ai-edits/result-validation.js +1 -1
  38. package/dist/ai-edits/retired-comment-receipts.d.ts +20 -0
  39. package/dist/ai-edits/retired-comment-receipts.js +165 -0
  40. package/dist/ai-edits/revisionStretches.d.ts +17 -0
  41. package/dist/ai-edits/snapshot.d.ts +12 -3
  42. package/dist/ai-edits/snapshot.js +9 -7
  43. package/dist/ai-edits/snapshotBatchFacts.d.ts +52 -0
  44. package/dist/ai-edits/snapshotBatchFacts.js +184 -0
  45. package/dist/ai-edits/table-geometry.d.ts +45 -11
  46. package/dist/ai-edits/table-geometry.js +141 -26
  47. package/dist/ai-edits/table-mutation-plan.d.ts +12 -0
  48. package/dist/ai-edits/table-mutation-plan.js +1 -1
  49. package/dist/ai-edits/table-row-column-mutations.d.ts +26 -3
  50. package/dist/ai-edits/table-row-column-mutations.js +90 -11
  51. package/dist/ai-edits/table-template.d.ts +21 -0
  52. package/dist/ai-edits/tableInsertionModes.d.ts +10 -0
  53. package/dist/ai-edits/tableInsertionModes.js +8 -0
  54. package/dist/ai-edits/tracked-batch-fidelity.d.ts +23 -0
  55. package/dist/ai-edits/tracked-batch-fidelity.js +357 -0
  56. package/dist/ai-edits/types.d.ts +81 -15
  57. package/dist/ai-edits/undefinedReferences.d.ts +49 -0
  58. package/dist/ai-edits/undefinedReferences.js +234 -0
  59. package/dist/ai-suggestions/apply.d.ts +12 -0
  60. package/dist/ai-suggestions/conflict.d.ts +9 -0
  61. package/dist/ai-suggestions/text-positions.d.ts +13 -0
  62. package/dist/canonical/batchCommentReferences.d.ts +20 -0
  63. package/dist/canonical/batchCommentReferences.js +93 -0
  64. package/dist/canonical/canonicalBatchReview.d.ts +25 -0
  65. package/dist/canonical/canonicalBatchReview.js +132 -0
  66. package/dist/{controller → canonical}/canonicalComments.d.ts +7 -4
  67. package/dist/{controller → canonical}/canonicalComments.js +36 -9
  68. package/dist/canonical/canonicalCompilerRefusal.d.ts +13 -0
  69. package/dist/canonical/canonicalCompilerRefusal.js +75 -0
  70. package/dist/canonical/canonicalIdLease.d.ts +40 -0
  71. package/dist/canonical/canonicalIdLease.js +96 -0
  72. package/dist/{controller → canonical}/canonicalInlineProjection.d.ts +1 -1
  73. package/dist/{controller → canonical}/canonicalInlineProjection.js +40 -20
  74. package/dist/canonical/canonicalInsertedCommentRange.d.ts +15 -0
  75. package/dist/canonical/canonicalInsertedCommentRange.js +43 -0
  76. package/dist/canonical/canonicalInsertionReplayIds.d.ts +40 -0
  77. package/dist/canonical/canonicalInsertionReplayIds.js +73 -0
  78. package/dist/canonical/canonicalJoinedReceipts.d.ts +11 -0
  79. package/dist/canonical/canonicalJoinedReceipts.js +22 -0
  80. package/dist/{controller → canonical}/canonicalListRendering.js +1 -1
  81. package/dist/canonical/canonicalLockGuard.d.ts +34 -0
  82. package/dist/canonical/canonicalLockGuard.js +208 -0
  83. package/dist/{controller → canonical}/canonicalOperations.js +1 -1
  84. package/dist/canonical/canonicalProjectionBlocks.d.ts +89 -0
  85. package/dist/canonical/canonicalProjectionBlocks.js +79 -0
  86. package/dist/{controller → canonical}/canonicalPublicOperations.d.ts +24 -9
  87. package/dist/canonical/canonicalPublicOperations.js +4791 -0
  88. package/dist/canonical/canonicalRemoteHistory.d.ts +48 -0
  89. package/dist/canonical/canonicalRemoteHistory.js +176 -0
  90. package/dist/canonical/canonicalRevisionLocks.d.ts +18 -0
  91. package/dist/canonical/canonicalRevisionLocks.js +30 -0
  92. package/dist/canonical/canonicalRevisionReceipts.d.ts +15 -0
  93. package/dist/canonical/canonicalRevisionReceipts.js +25 -0
  94. package/dist/canonical/canonicalRoomBase.d.ts +23 -0
  95. package/dist/canonical/canonicalRoomBase.js +38 -0
  96. package/dist/canonical/canonicalSeedContent.d.ts +36 -0
  97. package/dist/canonical/canonicalSeedContent.js +179 -0
  98. package/dist/{controller → canonical}/canonicalSelection.js +1 -1
  99. package/dist/canonical/canonicalSession.d.ts +515 -0
  100. package/dist/canonical/canonicalSession.js +2892 -0
  101. package/dist/canonical/canonicalSourceNormalization.d.ts +42 -0
  102. package/dist/canonical/canonicalSourceNormalization.js +166 -0
  103. package/dist/{controller → canonical}/canonicalTocSelection.js +1 -1
  104. package/dist/canonical/canonicalTrackedBatchFidelity.d.ts +9 -0
  105. package/dist/canonical/canonicalTrackedBatchFidelity.js +125 -0
  106. package/dist/canonical/canonicalWholeTextFidelity.d.ts +21 -0
  107. package/dist/canonical/canonicalWholeTextFidelity.js +88 -0
  108. package/dist/canonical/commentAnchorParagraph.d.ts +10 -0
  109. package/dist/canonical/commentAnchorParagraph.js +11 -0
  110. package/dist/canonical/controlEdges.d.ts +12 -0
  111. package/dist/canonical/controlEdges.js +17 -0
  112. package/dist/canonical/paragraphPatchAsRead.d.ts +19 -0
  113. package/dist/canonical/paragraphPatchAsRead.js +32 -0
  114. package/dist/canonical/propertySourcePreservation.d.ts +38 -0
  115. package/dist/canonical/propertySourcePreservation.js +129 -0
  116. package/dist/canonical/replacementRunSources.d.ts +29 -0
  117. package/dist/canonical/replacementRunSources.js +78 -0
  118. package/dist/compare/compare.d.ts +8 -6
  119. package/dist/compare/compare.js +37 -8
  120. package/dist/compare/content-alignment.d.ts +10 -1
  121. package/dist/compare/content-alignment.js +188 -27
  122. package/dist/compare/content.d.ts +9 -1
  123. package/dist/compare/content.js +2 -2
  124. package/dist/compare/formatting.d.ts +1 -0
  125. package/dist/compare/import-style-closure.d.ts +1 -1
  126. package/dist/compare/inline-atom-alignment.d.ts +83 -0
  127. package/dist/compare/inline-atom-alignment.js +173 -0
  128. package/dist/compare/inline-atoms-model.d.ts +65 -0
  129. package/dist/compare/inline-atoms-model.js +1131 -0
  130. package/dist/compare/inline-atoms.d.ts +4 -4
  131. package/dist/compare/inline-atoms.js +28 -139
  132. package/dist/compare/inline-provenance-model.d.ts +37 -0
  133. package/dist/compare/inline-provenance-model.js +138 -0
  134. package/dist/compare/inline-provenance.d.ts +52 -4
  135. package/dist/compare/inline-provenance.js +40 -7
  136. package/dist/compare/plan.d.ts +38 -4
  137. package/dist/compare/plan.js +22 -8
  138. package/dist/compare/scenario.d.ts +22 -1
  139. package/dist/compare/section-boundary-properties.d.ts +38 -5
  140. package/dist/compare/section-boundary-properties.js +164 -48
  141. package/dist/compare/style-resources.d.ts +3 -2
  142. package/dist/compare/style-resources.js +5 -4
  143. package/dist/compare/types.d.ts +5 -2
  144. package/dist/compare/verification.d.ts +24 -3
  145. package/dist/compare/verification.js +25 -18
  146. package/dist/compat/eigenpal.d.ts +32 -31
  147. package/dist/compat/eigenpal.js +3 -5
  148. package/dist/content-controls/findContentControls.d.ts +9 -0
  149. package/dist/content-controls/index.d.ts +8 -0
  150. package/dist/content-controls/mutateContentControls.d.ts +9 -0
  151. package/dist/controller/activeEditorStory.d.ts +1 -0
  152. package/dist/controller/anonymizationHighlights.d.ts +56 -0
  153. package/dist/controller/anonymizationHighlights.js +148 -0
  154. package/dist/controller/autocompleteSuggestion.d.ts +85 -0
  155. package/dist/controller/autocompleteSuggestion.js +213 -0
  156. package/dist/controller/canonicalClipboard.d.ts +2 -2
  157. package/dist/controller/canonicalClipboard.js +36 -16
  158. package/dist/controller/canonicalClipboardResources.js +9 -4
  159. package/dist/controller/canonicalCollaboration.d.ts +147 -0
  160. package/dist/controller/canonicalCollaboration.js +360 -0
  161. package/dist/controller/canonicalComposition.d.ts +7 -1
  162. package/dist/controller/canonicalComposition.js +48 -13
  163. package/dist/controller/canonicalContentControlValue.d.ts +17 -0
  164. package/dist/controller/canonicalContentControlValue.js +72 -0
  165. package/dist/controller/canonicalIndexedDbJournal.d.ts +6 -0
  166. package/dist/controller/canonicalIndexedDbJournal.js +80 -0
  167. package/dist/controller/canonicalInput.d.ts +13 -2
  168. package/dist/controller/canonicalInput.js +100 -17
  169. package/dist/controller/canonicalPresence.d.ts +63 -0
  170. package/dist/controller/canonicalPresence.js +125 -0
  171. package/dist/controller/canonicalReview.d.ts +1 -1
  172. package/dist/controller/canonicalReview.js +1 -1
  173. package/dist/controller/canonicalRoomAuthority.d.ts +66 -0
  174. package/dist/controller/canonicalRoomAuthority.js +119 -0
  175. package/dist/controller/canonicalRoomEditor.d.ts +87 -0
  176. package/dist/controller/canonicalRoomEditor.js +98 -0
  177. package/dist/controller/canonicalRoomTransport.d.ts +79 -0
  178. package/dist/controller/canonicalRoomTransport.js +104 -0
  179. package/dist/controller/canonicalRoomWire.d.ts +80 -0
  180. package/dist/controller/canonicalRoomWire.js +155 -0
  181. package/dist/controller/canonicalStoryEditor.d.ts +13 -1
  182. package/dist/controller/canonicalStoryEditor.js +55 -19
  183. package/dist/controller/canonicalStructure.d.ts +15 -5
  184. package/dist/controller/canonicalStructure.js +95 -34
  185. package/dist/controller/canonicalTabRoom.d.ts +91 -0
  186. package/dist/controller/canonicalTabRoom.js +553 -0
  187. package/dist/controller/canonicalYjsRoom.d.ts +102 -0
  188. package/dist/controller/canonicalYjsRoom.js +454 -0
  189. package/dist/controller/contentControlWidgetController.d.ts +16 -0
  190. package/dist/controller/contentControlWidgetController.js +7 -1
  191. package/dist/controller/documentChangeNotification.d.ts +5 -0
  192. package/dist/controller/documentChangeNotification.js +7 -0
  193. package/dist/controller/folioEditor.d.ts +12 -4
  194. package/dist/controller/folioEditor.js +21 -1
  195. package/dist/controller/folioEditorEvents.d.ts +1 -1
  196. package/dist/controller/fontReadiness.d.ts +14 -1
  197. package/dist/controller/fontReadiness.js +4 -4
  198. package/dist/controller/headerFooterEditorManager.d.ts +17 -6
  199. package/dist/controller/headerFooterEditorManager.js +29 -25
  200. package/dist/controller/hiddenEditorApi.d.ts +97 -14
  201. package/dist/controller/hiddenEditorApi.js +44 -3
  202. package/dist/controller/hiddenEditorManager.d.ts +68 -16
  203. package/dist/controller/hiddenEditorManager.js +440 -85
  204. package/dist/controller/hyphenationReadiness.d.ts +10 -0
  205. package/dist/controller/layoutPipeline.d.ts +14 -12
  206. package/dist/controller/layoutPipeline.js +66 -54
  207. package/dist/controller/layoutSession.d.ts +10 -6
  208. package/dist/controller/layoutSession.js +3 -1
  209. package/dist/controller/legacyTextAddress.d.ts +9 -0
  210. package/dist/controller/legacyTextAddress.js +52 -0
  211. package/dist/controller/noteEditorManager.d.ts +18 -6
  212. package/dist/controller/noteEditorManager.js +38 -32
  213. package/dist/controller/textPositionLookup.d.ts +24 -0
  214. package/dist/controller/textPositionLookup.js +78 -0
  215. package/dist/display-list/build/buildContext.d.ts +11 -0
  216. package/dist/display-list/build/buildDisplayList.d.ts +14 -1
  217. package/dist/display-list/build/colors.d.ts +8 -0
  218. package/dist/display-list/build/floatingImages.d.ts +10 -0
  219. package/dist/display-list/build/fontTable.d.ts +8 -0
  220. package/dist/display-list/build/furniture.d.ts +14 -2
  221. package/dist/display-list/build/glyphs.d.ts +7 -0
  222. package/dist/display-list/build/headerFooterPrimitives.d.ts +13 -0
  223. package/dist/display-list/build/imagePrimitives.d.ts +10 -0
  224. package/dist/display-list/build/pageBorderPrimitives.d.ts +16 -2
  225. package/dist/display-list/build/pageFurniture.d.ts +13 -0
  226. package/dist/display-list/build/paragraphPrimitives.d.ts +18 -0
  227. package/dist/display-list/build/paragraphPrimitives.js +17 -5
  228. package/dist/display-list/build/previewPrimitives.d.ts +14 -0
  229. package/dist/display-list/build/regions.d.ts +14 -0
  230. package/dist/display-list/build/storyPrimitives.d.ts +16 -0
  231. package/dist/display-list/build/strokes.d.ts +21 -3
  232. package/dist/display-list/build/strokes.js +2 -3
  233. package/dist/display-list/build/tablePrimitives.d.ts +15 -1
  234. package/dist/display-list/build/tablePrimitives.js +92 -55
  235. package/dist/display-list/build/textBoxPrimitives.d.ts +6 -0
  236. package/dist/display-list/build/unsupported.d.ts +10 -0
  237. package/dist/display-list/build/watermarkPrimitives.d.ts +15 -1
  238. package/dist/display-list/dom/renderDisplayListToDom.d.ts +33 -0
  239. package/dist/display-list/dom/renderDisplayListToDom.js +21 -11
  240. package/dist/display-list/editor/displayListPagePainter.d.ts +29 -1
  241. package/dist/display-list/editor/pageRenderer.d.ts +7 -0
  242. package/dist/display-list/html/renderDisplayListToHtml.d.ts +10 -0
  243. package/dist/display-list/primitives.d.ts +12 -1
  244. package/dist/display-list/selectDisplayPages.d.ts +8 -0
  245. package/dist/display-list/types.d.ts +11 -0
  246. package/dist/document-operations.d.ts +34 -4
  247. package/dist/document-operations.js +178 -40
  248. package/dist/docx/attributeRemainder.d.ts +35 -1
  249. package/dist/docx/automaticNoteMarkImport.d.ts +12 -0
  250. package/dist/docx/automaticNoteMarkImport.js +41 -0
  251. package/dist/docx/blockContentParser.d.ts +14 -5
  252. package/dist/docx/blockContentParser.js +19 -0
  253. package/dist/docx/blockPlainText.d.ts +14 -0
  254. package/dist/docx/blockPlainText.js +55 -4
  255. package/dist/docx/bookmarkParser.d.ts +17 -0
  256. package/dist/docx/bookmarkRangeJoin.d.ts +14 -0
  257. package/dist/docx/borderParser.d.ts +11 -0
  258. package/dist/docx/builtInStyles.d.ts +44 -1
  259. package/dist/docx/canonicalSave.d.ts +14 -4
  260. package/dist/docx/canonicalSave.js +133 -30
  261. package/dist/docx/canonicalSessionInput.d.ts +59 -4
  262. package/dist/docx/canonicalSessionInput.js +147 -6
  263. package/dist/docx/canonicalStoryRepack.d.ts +1 -0
  264. package/dist/docx/canonicalStoryRepack.js +2 -2
  265. package/dist/docx/chartPreview.js +10 -9
  266. package/dist/docx/commentAnchorIndex.d.ts +46 -1
  267. package/dist/docx/commentAnchorIndex.js +187 -7
  268. package/dist/docx/commentIdNormalization.d.ts +14 -0
  269. package/dist/docx/commentParagraphIds.d.ts +17 -0
  270. package/dist/docx/commentParagraphIds.js +79 -0
  271. package/dist/docx/commentParser.d.ts +20 -1
  272. package/dist/docx/commentParser.js +5 -0
  273. package/dist/docx/commentRangeIntegrity.js +27 -11
  274. package/dist/docx/commentRangeJoin.d.ts +21 -1
  275. package/dist/docx/commentRangeJoin.js +5 -1
  276. package/dist/docx/commentReferenceCompletion.d.ts +29 -2
  277. package/dist/docx/commentReferenceCompletion.js +4 -3
  278. package/dist/docx/commentReferenceNormalization.d.ts +17 -0
  279. package/dist/docx/commentReferenceNormalization.js +484 -49
  280. package/dist/docx/commentReplyMarkers.d.ts +22 -0
  281. package/dist/docx/compatibility.d.ts +10 -0
  282. package/dist/docx/containerChildren.d.ts +26 -1
  283. package/dist/docx/containerChildren.js +29 -3
  284. package/dist/docx/contentTypeRegistry.d.ts +16 -0
  285. package/dist/docx/contentTypeRegistry.js +49 -21
  286. package/dist/docx/danglingRelationshipReferences.d.ts +13 -0
  287. package/dist/docx/defaultParagraphStyle.d.ts +14 -1
  288. package/dist/docx/documentClone.d.ts +3 -2
  289. package/dist/docx/documentClone.js +1 -1
  290. package/dist/docx/documentParser.d.ts +28 -3
  291. package/dist/docx/documentParser.js +71 -4
  292. package/dist/docx/drawingAnchor.d.ts +17 -0
  293. package/dist/docx/drawingGroupChildren.d.ts +12 -0
  294. package/dist/docx/drawingIdNormalization.d.ts +8 -0
  295. package/dist/docx/drawingIdNormalization.js +46 -1
  296. package/dist/docx/drawingUtils.d.ts +6 -0
  297. package/dist/docx/drawingUtils.js +2 -2
  298. package/dist/docx/encryption/agileDecryption.d.ts +7 -0
  299. package/dist/docx/ensureParaIds.d.ts +73 -0
  300. package/dist/docx/ensureParaIds.js +299 -59
  301. package/dist/docx/ensureUniqueControlIds.js +10 -3
  302. package/dist/docx/ensureUniqueRevisionIds.d.ts +28 -0
  303. package/dist/docx/ensureUniqueRevisionIds.js +140 -0
  304. package/dist/docx/fieldParser.d.ts +27 -2
  305. package/dist/docx/fieldState.d.ts +15 -0
  306. package/dist/docx/fieldWrapperCaptures.d.ts +18 -0
  307. package/dist/docx/fieldWrapperCaptures.js +117 -0
  308. package/dist/docx/foldedListNumberFields.d.ts +14 -0
  309. package/dist/docx/fontTableParser.d.ts +11 -0
  310. package/dist/docx/footnoteParser.d.ts +24 -3
  311. package/dist/docx/footnoteParser.js +29 -6
  312. package/dist/docx/graphicFrameLocks.d.ts +9 -1
  313. package/dist/docx/groupDrawingParser.d.ts +2 -2
  314. package/dist/docx/headerFooterParser.d.ts +37 -5
  315. package/dist/docx/headerFooterParser.js +18 -4
  316. package/dist/docx/headerFooterRefParser.d.ts +7 -0
  317. package/dist/docx/hostCommentThreads.d.ts +21 -2
  318. package/dist/docx/hostCommentThreads.js +25 -2
  319. package/dist/docx/hyperlinkParser.d.ts +20 -3
  320. package/dist/docx/hyperlinkParser.js +19 -24
  321. package/dist/docx/imageParser.d.ts +27 -0
  322. package/dist/docx/index.d.ts +3 -3
  323. package/dist/docx/inlineContentRemovals.d.ts +8 -0
  324. package/dist/docx/inlineWrapperContent.d.ts +33 -1
  325. package/dist/docx/inlineWrapperContent.js +145 -1
  326. package/dist/docx/inlineWrapperParser.d.ts +14 -0
  327. package/dist/docx/listMarkerComputation.d.ts +37 -6
  328. package/dist/docx/listMarkerComputation.js +77 -28
  329. package/dist/docx/listModelNormalization.d.ts +24 -8
  330. package/dist/docx/listModelNormalization.js +426 -143
  331. package/dist/docx/listNumberingInstances.d.ts +39 -9
  332. package/dist/docx/listNumberingInstances.js +91 -44
  333. package/dist/docx/mainDocumentPart.d.ts +22 -1
  334. package/dist/docx/mainDocumentPart.js +51 -12
  335. package/dist/docx/markupRangeMarker.d.ts +16 -0
  336. package/dist/docx/markupRangeMarker.js +11 -2
  337. package/dist/docx/mathToMathml.d.ts +28 -0
  338. package/dist/docx/mergePropertyChangeLinks.d.ts +11 -0
  339. package/dist/docx/mergePropertyChangeLinks.js +30 -0
  340. package/dist/docx/nonVisualDrawingProps.d.ts +6 -0
  341. package/dist/docx/normalizeBaseDirection.d.ts +17 -0
  342. package/dist/docx/normalizedSourceParts.d.ts +21 -0
  343. package/dist/docx/normalizedSourceParts.js +81 -0
  344. package/dist/docx/notePropertiesParser.d.ts +7 -0
  345. package/dist/docx/noteReferenceMark.d.ts +9 -0
  346. package/dist/docx/noteReferenceStyles.d.ts +13 -0
  347. package/dist/docx/numberingIds.d.ts +6 -0
  348. package/dist/docx/numberingIds.js +6 -1
  349. package/dist/docx/numberingParser.d.ts +12 -0
  350. package/dist/docx/numberingReference.d.ts +10 -0
  351. package/dist/docx/numberingReferenceNormalization.d.ts +19 -0
  352. package/dist/docx/numberingReferenceNormalization.js +12 -2
  353. package/dist/docx/packageRelationshipsRoot.d.ts +24 -0
  354. package/dist/docx/packageRelationshipsRoot.js +28 -0
  355. package/dist/docx/packageUnnamedParagraphIds.d.ts +18 -0
  356. package/dist/docx/packageUnnamedParagraphIds.js +78 -0
  357. package/dist/docx/paraIdAttribute.d.ts +15 -0
  358. package/dist/docx/paragraphParser.d.ts +15 -3
  359. package/dist/docx/paragraphParser.js +126 -140
  360. package/dist/docx/paragraphProperties.d.ts +15 -1
  361. package/dist/docx/paragraphProperties.js +3 -5
  362. package/dist/docx/paragraphPropertySource.d.ts +60 -4
  363. package/dist/docx/paragraphPropertySource.js +239 -27
  364. package/dist/docx/paragraphTextBoxEnrichment.d.ts +3 -2
  365. package/dist/docx/paragraphTraversal.d.ts +39 -4
  366. package/dist/docx/paragraphTraversal.js +158 -42
  367. package/dist/docx/parseContext.d.ts +15 -0
  368. package/dist/docx/parseWarningMessage.d.ts +9 -0
  369. package/dist/docx/parseWarningMessage.js +7 -0
  370. package/dist/docx/parser.d.ts +1 -1
  371. package/dist/docx/parser.js +105 -29
  372. package/dist/docx/parserEnums.d.ts +21 -0
  373. package/dist/docx/partRelationships.d.ts +15 -0
  374. package/dist/docx/partRelationships.js +58 -0
  375. package/dist/docx/preservedRunContent.d.ts +2 -1
  376. package/dist/docx/preservedRunContent.js +40 -1
  377. package/dist/docx/previewBudget.d.ts +31 -0
  378. package/dist/docx/relsParser.d.ts +23 -0
  379. package/dist/docx/removeHeaderFooterParts.d.ts +1 -1
  380. package/dist/docx/removeHeaderFooterParts.js +1 -1
  381. package/dist/docx/replyToComment.d.ts +22 -1
  382. package/dist/docx/replyToComment.js +25 -21
  383. package/dist/docx/reviewResolutionProvenance.d.ts +32 -5
  384. package/dist/docx/reviewResolutionProvenance.js +284 -40
  385. package/dist/docx/rezip.d.ts +58 -11
  386. package/dist/docx/rezip.js +367 -101
  387. package/dist/docx/runConsolidator.d.ts +13 -0
  388. package/dist/docx/runParser.d.ts +4 -3
  389. package/dist/docx/runParser.js +27 -6
  390. package/dist/docx/runPayload.d.ts +29 -0
  391. package/dist/docx/saveDiagnostics.d.ts +3 -5
  392. package/dist/docx/sdtProperties.d.ts +17 -0
  393. package/dist/docx/sdtPropertiesPatch.d.ts +14 -0
  394. package/dist/docx/sectionParser.d.ts +21 -0
  395. package/dist/docx/sectionParser.js +1 -6
  396. package/dist/docx/selectiveSave.js +271 -80
  397. package/dist/docx/selectiveXmlPatch.d.ts +36 -1
  398. package/dist/docx/selectiveXmlPatch.js +342 -78
  399. package/dist/docx/serializer/blockSdtSerializer.d.ts +10 -0
  400. package/dist/docx/serializer/borderSerializer.d.ts +8 -0
  401. package/dist/docx/serializer/commentSerializer.d.ts +12 -1
  402. package/dist/docx/serializer/commentSerializer.js +1 -1
  403. package/dist/docx/serializer/documentSerializer.d.ts +21 -3
  404. package/dist/docx/serializer/documentSerializer.js +46 -7
  405. package/dist/docx/serializer/groupTextBoxWriteBack.d.ts +14 -0
  406. package/dist/docx/serializer/headerFooterSerializer.d.ts +11 -0
  407. package/dist/docx/serializer/markupRangeAttributes.d.ts +8 -0
  408. package/dist/docx/serializer/markupRangeAttributes.js +3 -1
  409. package/dist/docx/serializer/noteSerializer.d.ts +21 -0
  410. package/dist/docx/serializer/numberingSerializer.d.ts +14 -0
  411. package/dist/docx/serializer/paragraphSerializer.d.ts +11 -0
  412. package/dist/docx/serializer/paragraphSerializer.js +21 -9
  413. package/dist/docx/serializer/partNamespaces.d.ts +3 -1
  414. package/dist/docx/serializer/partNamespaces.js +4 -2
  415. package/dist/docx/serializer/runSerializer.js +12 -3
  416. package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +15 -0
  417. package/dist/docx/serializer/stylesSerializer.d.ts +26 -1
  418. package/dist/docx/serializer/stylesSerializer.js +111 -23
  419. package/dist/docx/serializer/tableSerializer.js +9 -7
  420. package/dist/docx/serializer/themeSerializer.d.ts +2 -1
  421. package/dist/docx/server/applyDocxXmlPatchProposal.js +1 -1
  422. package/dist/docx/server/build.d.ts +1 -1
  423. package/dist/docx/server/changeListFormat.d.ts +20 -0
  424. package/dist/docx/server/changeListFormat.js +102 -0
  425. package/dist/docx/server/createBilingualDocument.d.ts +21 -0
  426. package/dist/docx/server/materializeYjsDocx.js +2 -2
  427. package/dist/docx/server/migrateYjsAttrSchema.js +5 -5
  428. package/dist/docx/sessionListPruning.d.ts +11 -0
  429. package/dist/docx/settingsParser.d.ts +10 -0
  430. package/dist/docx/shadingParser.d.ts +10 -0
  431. package/dist/docx/shapeAlternateContent.js +9 -2
  432. package/dist/docx/shapeParser.d.ts +27 -0
  433. package/dist/docx/splitRevisionPieces.d.ts +1 -1
  434. package/dist/docx/storyBlockReplay.d.ts +37 -3
  435. package/dist/docx/storyBlockReplay.js +291 -69
  436. package/dist/docx/strictNames.d.ts +12 -1
  437. package/dist/docx/strictValueEncodings.gen.d.ts +9 -0
  438. package/dist/docx/structuralXmlPatch.d.ts +19 -3
  439. package/dist/docx/structuralXmlPatch.js +139 -35
  440. package/dist/docx/styleParser.d.ts +20 -3
  441. package/dist/docx/styleParser.js +3 -2
  442. package/dist/docx/tableLook.d.ts +15 -1
  443. package/dist/docx/tableParser.d.ts +17 -6
  444. package/dist/docx/tableParser.js +10 -5
  445. package/dist/docx/textBoxContentParser.d.ts +3 -2
  446. package/dist/docx/textBoxParser.d.ts +30 -3
  447. package/dist/docx/themeColorAttribute.d.ts +11 -0
  448. package/dist/docx/themeParser.d.ts +17 -5
  449. package/dist/docx/trackedMoveRangeNormalization.d.ts +9 -0
  450. package/dist/docx/trackedMoveRangeNormalization.js +40 -16
  451. package/dist/docx/transitionalSpelling.d.ts +9 -0
  452. package/dist/docx/unnamedParagraphIds.d.ts +33 -0
  453. package/dist/docx/unnamedParagraphIds.js +43 -0
  454. package/dist/docx/unreferencedHeaderFooters.d.ts +27 -0
  455. package/dist/docx/unreferencedHeaderFooters.js +130 -0
  456. package/dist/docx/unzip.d.ts +25 -0
  457. package/dist/docx/verbatimCapture.d.ts +18 -0
  458. package/dist/docx/verbatimCapture.js +76 -9
  459. package/dist/docx/vmlImageParser.d.ts +32 -1
  460. package/dist/docx/watermarkParser.d.ts +21 -0
  461. package/dist/docx/wrapPolygon.d.ts +11 -0
  462. package/dist/docx/wrapTypes.d.ts +6 -0
  463. package/dist/docx/xmlParser.d.ts +23 -19
  464. package/dist/docx/xmlParser.js +2 -20
  465. package/dist/docx/xmlRootInsertion.d.ts +8 -0
  466. package/dist/docx/xmlRootInsertion.js +28 -0
  467. package/dist/docx/xmlSafety.d.ts +1 -0
  468. package/dist/docx/xmlSafety.js +7 -11
  469. package/dist/export-pdf.d.ts +24 -1
  470. package/dist/fields/resolveFieldValues.js +2 -1
  471. package/dist/fonts/fontsourceFaces.d.ts +2 -2
  472. package/dist/fonts/headlessMeasure.d.ts +16 -0
  473. package/dist/generated/text_shaper.js +71 -59
  474. package/dist/generated/text_shaper_bg.wasm +0 -0
  475. package/dist/headless-layout.d.ts +36 -5
  476. package/dist/headless-layout.js +19 -4
  477. package/dist/i18n/messages/ar.gen.js +2 -0
  478. package/dist/i18n/messages/catalogs.gen.d.ts +34 -0
  479. package/dist/i18n/messages/catalogs.gen.js +34 -0
  480. package/dist/i18n/messages/cs.gen.js +2 -0
  481. package/dist/i18n/messages/de.gen.js +2 -0
  482. package/dist/i18n/messages/en.gen.js +2 -0
  483. package/dist/i18n/messages/es.gen.js +2 -0
  484. package/dist/i18n/messages/et.gen.js +2 -0
  485. package/dist/i18n/messages/fr.gen.js +2 -0
  486. package/dist/i18n/messages/he.gen.js +2 -0
  487. package/dist/i18n/messages/hi.gen.js +2 -0
  488. package/dist/i18n/messages/hu.gen.js +2 -0
  489. package/dist/i18n/messages/lt.gen.js +2 -0
  490. package/dist/i18n/messages/lv.gen.js +2 -0
  491. package/dist/i18n/messages/messages.gen.d.ts +2 -0
  492. package/dist/i18n/messages/pl.gen.js +2 -0
  493. package/dist/i18n/messages/pt-BR.gen.js +2 -0
  494. package/dist/i18n/messages/sk.gen.js +2 -0
  495. package/dist/i18n/messages/tr.gen.js +2 -0
  496. package/dist/i18n/messages/zh-CN.gen.js +2 -0
  497. package/dist/index.d.ts +33 -31
  498. package/dist/index.js +3 -4
  499. package/dist/internal/canonicalOperationStaging.d.ts +2 -0
  500. package/dist/internal/canonicalOperationStaging.js +4 -0
  501. package/dist/internal/canonicalTyping.d.ts +9 -0
  502. package/dist/internal/canonicalTyping.js +7 -0
  503. package/dist/internal/compare/inline-presentation.d.ts +8 -0
  504. package/dist/internal/indexedPositionMap.js +2 -1
  505. package/dist/internal/pageBreakRunDescendantIndex.d.ts +7 -2
  506. package/dist/internal/pageBreakRunDescendantIndex.js +12 -3
  507. package/dist/internal/revisionResolutionInline.js +13 -13
  508. package/dist/internal/revisionResolutionStep.js +1 -0
  509. package/dist/internal/revisionResolutionTracking.js +2 -1
  510. package/dist/internal/subtreeHolds.d.ts +12 -0
  511. package/dist/internal/subtreeHolds.js +25 -0
  512. package/dist/internal/wholeStoryRevisionResolution.d.ts +1 -1
  513. package/dist/internal/wholeStoryRevisionResolution.js +57 -66
  514. package/dist/layout-bridge/cellSelectionHighlight.d.ts +8 -0
  515. package/dist/layout-bridge/cellSelectionHighlight.js +3 -3
  516. package/dist/layout-bridge/convert/altChunkPlaceholder.d.ts +7 -0
  517. package/dist/layout-bridge/convert/editingFont.d.ts +26 -0
  518. package/dist/layout-bridge/convert/editingFont.js +42 -0
  519. package/dist/layout-bridge/convert/endnoteLayout.d.ts +19 -1
  520. package/dist/layout-bridge/convert/flowBlockPostprocessing.d.ts +5 -0
  521. package/dist/layout-bridge/convert/flowBlockPostprocessing.js +20 -12
  522. package/dist/layout-bridge/convert/flowBorders.d.ts +10 -4
  523. package/dist/layout-bridge/convert/flowBorders.js +13 -1
  524. package/dist/layout-bridge/convert/flowConversionShared.d.ts +37 -8
  525. package/dist/layout-bridge/convert/flowConversionShared.js +39 -6
  526. package/dist/layout-bridge/convert/footnoteLayout.d.ts +12 -4
  527. package/dist/layout-bridge/convert/footnoteLayout.js +3 -1
  528. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +25 -5
  529. package/dist/layout-bridge/convert/imageConversion.d.ts +5 -1
  530. package/dist/layout-bridge/convert/listMarkers.d.ts +12 -7
  531. package/dist/layout-bridge/convert/markupViewFlow.d.ts +21 -0
  532. package/dist/layout-bridge/convert/markupViewFlow.js +4 -1
  533. package/dist/layout-bridge/convert/noteReferences.d.ts +4 -0
  534. package/dist/layout-bridge/convert/pageBreakSplitting.d.ts +4 -0
  535. package/dist/layout-bridge/convert/paragraphAttrs.d.ts +25 -9
  536. package/dist/layout-bridge/convert/paragraphAttrs.js +12 -5
  537. package/dist/layout-bridge/convert/paragraphBlockCache.d.ts +36 -0
  538. package/dist/layout-bridge/convert/paragraphBlockCache.js +130 -0
  539. package/dist/layout-bridge/convert/paragraphConversion.d.ts +20 -6
  540. package/dist/layout-bridge/convert/paragraphConversion.js +37 -5
  541. package/dist/layout-bridge/convert/paragraphFrames.d.ts +2 -4
  542. package/dist/layout-bridge/convert/paragraphFrames.js +4 -4
  543. package/dist/layout-bridge/convert/paragraphMarkFormatting.d.ts +13 -4
  544. package/dist/layout-bridge/convert/paragraphRuns.d.ts +7 -2
  545. package/dist/layout-bridge/convert/paragraphRuns.js +18 -4
  546. package/dist/layout-bridge/convert/runFormattingMerge.d.ts +10 -4
  547. package/dist/layout-bridge/convert/runMarkFormatting.d.ts +8 -3
  548. package/dist/layout-bridge/convert/runMarkFormatting.js +3 -5
  549. package/dist/layout-bridge/convert/sectionBoundaries.d.ts +4 -0
  550. package/dist/layout-bridge/convert/sectionBoundaries.js +16 -0
  551. package/dist/layout-bridge/convert/tableConversion.d.ts +15 -5
  552. package/dist/layout-bridge/convert/tableConversion.js +40 -19
  553. package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +38 -1
  554. package/dist/layout-bridge/convert/textBoxFill.d.ts +7 -2
  555. package/dist/layout-bridge/convert/textFormattingConversion.d.ts +18 -12
  556. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +8 -2
  557. package/dist/layout-bridge/convert/toFlowBlocks.js +200 -18
  558. package/dist/layout-bridge/convert/topLevelConversion.d.ts +96 -0
  559. package/dist/layout-bridge/convert/topLevelConversion.js +109 -0
  560. package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +10 -0
  561. package/dist/layout-bridge/dom/clickToPositionDom.js +45 -44
  562. package/dist/layout-bridge/dom/findBodyPmSpans.js +4 -3
  563. package/dist/layout-bridge/dom/findHfPmSpans.js +10 -15
  564. package/dist/layout-bridge/dom/imeCaretAnchor.d.ts +8 -0
  565. package/dist/layout-bridge/dom/imeCaretAnchor.js +71 -7
  566. package/dist/layout-bridge/dom/noteStoryDom.d.ts +1 -0
  567. package/dist/layout-bridge/dom/textStreamDom.js +3 -2
  568. package/dist/layout-bridge/engine/blockIndex.d.ts +3 -0
  569. package/dist/layout-bridge/engine/clickToPosition.d.ts +9 -0
  570. package/dist/layout-bridge/engine/hitTest.d.ts +6 -0
  571. package/dist/layout-bridge/engine/hitTest.js +3 -3
  572. package/dist/layout-bridge/engine/measuring/index.d.ts +20 -8
  573. package/dist/layout-bridge/engine/selectionRects.d.ts +9 -0
  574. package/dist/layout-bridge/headerFooterLayout.d.ts +12 -0
  575. package/dist/layout-bridge/headerFooterLayout.js +15 -14
  576. package/dist/layout-bridge/sectionColumns.d.ts +10 -1
  577. package/dist/layout-bridge/tableInsertHover.js +2 -1
  578. package/dist/layout-engine/footnoteContinuation.d.ts +8 -0
  579. package/dist/layout-engine/imageLayout.d.ts +4 -1
  580. package/dist/layout-engine/index.d.ts +10 -5
  581. package/dist/layout-engine/index.js +9 -3
  582. package/dist/layout-engine/keep-together.d.ts +6 -0
  583. package/dist/layout-engine/layoutFlowShared.d.ts +4 -0
  584. package/dist/layout-engine/layoutInstrumentation.d.ts +40 -1
  585. package/dist/layout-engine/layoutInstrumentation.js +26 -4
  586. package/dist/layout-engine/lineFlow.d.ts +1 -0
  587. package/dist/layout-engine/lineFlow.js +4 -1
  588. package/dist/layout-engine/measure/advanceComposition.d.ts +14 -1
  589. package/dist/layout-engine/measure/automaticTextSpacing.d.ts +1 -1
  590. package/dist/layout-engine/measure/cache.d.ts +8 -0
  591. package/dist/layout-engine/measure/cache.js +9 -1
  592. package/dist/layout-engine/measure/crossRunWords.d.ts +1 -1
  593. package/dist/layout-engine/measure/floatingLineClearance.d.ts +4 -0
  594. package/dist/layout-engine/measure/floatingTablePosition.d.ts +32 -1
  595. package/dist/layout-engine/measure/floatingTablePosition.js +49 -1
  596. package/dist/layout-engine/measure/font-metrics.worker.d.ts +16 -0
  597. package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +18 -0
  598. package/dist/layout-engine/measure/hyphenationPreload.d.ts +4 -0
  599. package/dist/layout-engine/measure/index.d.ts +18 -8
  600. package/dist/layout-engine/measure/index.js +2 -1
  601. package/dist/layout-engine/measure/inlineObjectMetrics.d.ts +4 -0
  602. package/dist/layout-engine/measure/justification.d.ts +5 -1
  603. package/dist/layout-engine/measure/lineFitting.d.ts +6 -1
  604. package/dist/layout-engine/measure/lineTypography.d.ts +6 -1
  605. package/dist/layout-engine/measure/listMarkerWidth.d.ts +16 -1
  606. package/dist/layout-engine/measure/measureBlocks.d.ts +4 -1
  607. package/dist/layout-engine/measure/measureBlocks.js +127 -102
  608. package/dist/layout-engine/measure/measureContainer.d.ts +17 -0
  609. package/dist/layout-engine/measure/measureHelpers.d.ts +10 -1
  610. package/dist/layout-engine/measure/measureParagraph.d.ts +7 -1
  611. package/dist/layout-engine/measure/measureParagraph.js +51 -21
  612. package/dist/layout-engine/measure/measureProvider.d.ts +10 -0
  613. package/dist/layout-engine/measure/measureTypes.d.ts +8 -0
  614. package/dist/layout-engine/measure/measureWorker.d.ts +30 -0
  615. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +14 -0
  616. package/dist/layout-engine/measure/measuresHoldNoPositions.d.ts +40 -0
  617. package/dist/layout-engine/measure/measuresHoldNoPositions.js +14 -0
  618. package/dist/layout-engine/measure/paragraphKeyMemo.d.ts +20 -0
  619. package/dist/layout-engine/measure/paragraphKeyMemo.js +92 -0
  620. package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +21 -2
  621. package/dist/layout-engine/measure/paragraphMeasureShared.js +20 -1
  622. package/dist/layout-engine/measure/paragraphTabs.d.ts +4 -0
  623. package/dist/layout-engine/measure/raisedTableWrap.d.ts +16 -0
  624. package/dist/layout-engine/measure/raisedTableWrap.js +105 -0
  625. package/dist/layout-engine/measure/tableBorderBands.d.ts +35 -0
  626. package/dist/layout-engine/measure/tableBorderBands.js +251 -0
  627. package/dist/layout-engine/measure/tableCellFloating.js +1 -1
  628. package/dist/layout-engine/measure/tableCellFlow.d.ts +4 -4
  629. package/dist/layout-engine/measure/tableCellFlow.js +7 -10
  630. package/dist/layout-engine/measure/tableCellGrid.d.ts +4 -1
  631. package/dist/layout-engine/measure/tableCellGrid.js +30 -3
  632. package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
  633. package/dist/layout-engine/measure/tableMeasureMemo.d.ts +23 -0
  634. package/dist/layout-engine/measure/tableMeasureMemo.js +40 -0
  635. package/dist/layout-engine/measure/tableNoWrapWidths.d.ts +12 -0
  636. package/dist/layout-engine/measure/tableNoWrapWidths.js +73 -0
  637. package/dist/layout-engine/measure/tableVisibleBand.d.ts +6 -0
  638. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +7 -1
  639. package/dist/layout-engine/noteAreaFlow.d.ts +10 -1
  640. package/dist/layout-engine/paginator.d.ts +6 -0
  641. package/dist/layout-engine/paginator.js +6 -5
  642. package/dist/layout-engine/paragraphLayout.d.ts +5 -1
  643. package/dist/layout-engine/paragraphSpacing.d.ts +17 -2
  644. package/dist/layout-engine/paragraphSpacing.js +103 -15
  645. package/dist/layout-engine/pmPageIndex.d.ts +14 -1
  646. package/dist/layout-engine/pmPageIndex.js +10 -1
  647. package/dist/layout-engine/section-breaks.d.ts +6 -0
  648. package/dist/layout-engine/sectionLayout.d.ts +6 -1
  649. package/dist/layout-engine/sectionVerticalAlignment.js +2 -1
  650. package/dist/layout-engine/tableHeaderCompatibility.d.ts +3 -0
  651. package/dist/layout-engine/tableHeaderCompatibility.js +5 -0
  652. package/dist/layout-engine/tableLayout.d.ts +17 -6
  653. package/dist/layout-engine/tableLayout.js +36 -25
  654. package/dist/layout-engine/tableRowBreak.d.ts +16 -0
  655. package/dist/layout-engine/tableRowBreak.js +2 -1
  656. package/dist/layout-engine/textBoxFlow.d.ts +9 -0
  657. package/dist/layout-engine/textBoxLayout.d.ts +5 -1
  658. package/dist/layout-engine/types.d.ts +41 -2
  659. package/dist/layout-engine/types.js +77 -27
  660. package/dist/layout-painter/borderStroke.d.ts +1 -1
  661. package/dist/layout-painter/characterFillBand.d.ts +14 -0
  662. package/dist/layout-painter/characterFillBand.js +79 -0
  663. package/dist/layout-painter/imageLayout.d.ts +11 -2
  664. package/dist/layout-painter/imageLayout.js +2 -1
  665. package/dist/layout-painter/index.d.ts +12 -6
  666. package/dist/layout-painter/pageShellStyles.d.ts +19 -0
  667. package/dist/layout-painter/pageShellStyles.js +32 -0
  668. package/dist/layout-painter/previewSvg.d.ts +7 -0
  669. package/dist/layout-painter/reconcileRenderedContent.d.ts +19 -0
  670. package/dist/layout-painter/reconcileRenderedContent.js +119 -0
  671. package/dist/layout-painter/registry/modules/image.d.ts +7 -0
  672. package/dist/layout-painter/registry/modules/paragraph.d.ts +8 -0
  673. package/dist/layout-painter/registry/modules/table.d.ts +6 -0
  674. package/dist/layout-painter/registry/modules/textBox.d.ts +3 -0
  675. package/dist/layout-painter/registry/modules.d.ts +10 -0
  676. package/dist/layout-painter/registry/registry.d.ts +8 -0
  677. package/dist/layout-painter/registry/types.d.ts +11 -0
  678. package/dist/layout-painter/renderFragment.d.ts +6 -0
  679. package/dist/layout-painter/renderFragment.js +4 -6
  680. package/dist/layout-painter/renderImage.d.ts +8 -0
  681. package/dist/layout-painter/renderImage.js +2 -2
  682. package/dist/layout-painter/renderPage.d.ts +10 -3
  683. package/dist/layout-painter/renderPage.js +31 -33
  684. package/dist/layout-painter/renderParagraph.d.ts +6 -0
  685. package/dist/layout-painter/renderParagraph.js +36 -19
  686. package/dist/layout-painter/renderTable.d.ts +10 -1
  687. package/dist/layout-painter/renderTable.js +121 -36
  688. package/dist/layout-painter/renderTextBox.d.ts +9 -0
  689. package/dist/layout-painter/renderTextBox.js +2 -2
  690. package/dist/layout-painter/renderUtils.d.ts +5 -1
  691. package/dist/layout-painter/renderWatermark.d.ts +11 -1
  692. package/dist/layout-painter/sdtBoundary.d.ts +10 -0
  693. package/dist/layout-painter/sdtBoundary.js +3 -2
  694. package/dist/managers/ClipboardManager.d.ts +13 -0
  695. package/dist/managers/ContextMenuManager.d.ts +16 -4
  696. package/dist/managers/ContextMenuManager.js +3 -3
  697. package/dist/managers/DocumentLoaderManager.d.ts +19 -5
  698. package/dist/managers/DocumentLoaderManager.js +48 -13
  699. package/dist/managers/EditorModeManager.d.ts +11 -0
  700. package/dist/managers/ErrorManager.d.ts +11 -0
  701. package/dist/managers/FindReplaceManager.d.ts +14 -27
  702. package/dist/managers/FindReplaceManager.js +0 -49
  703. package/dist/managers/HistoryManager.d.ts +18 -0
  704. package/dist/managers/TableSelectionManager.d.ts +18 -4
  705. package/dist/managers/TableSelectionManager.js +22 -5
  706. package/dist/managers/editorShortcuts.d.ts +14 -2
  707. package/dist/managers/editorShortcuts.js +5 -3
  708. package/dist/managers/types.d.ts +15 -1
  709. package/dist/markdown/annotations.d.ts +9 -0
  710. package/dist/markdown/countParagraphList.d.ts +8 -0
  711. package/dist/markdown/escape.d.ts +6 -4
  712. package/dist/markdown/escape.js +17 -8
  713. package/dist/markdown/images.d.ts +11 -0
  714. package/dist/markdown/index.d.ts +24 -1
  715. package/dist/markdown/index.js +18 -1
  716. package/dist/markdown/internals.d.ts +7 -0
  717. package/dist/markdown/renderBlock.d.ts +5 -0
  718. package/dist/markdown/renderBlock.js +2 -7
  719. package/dist/markdown/renderParagraph.d.ts +22 -2
  720. package/dist/markdown/renderParagraph.js +11 -9
  721. package/dist/markdown/renderRuns.d.ts +10 -0
  722. package/dist/markdown/renderRuns.js +36 -3
  723. package/dist/markdown/renderTable.d.ts +7 -0
  724. package/dist/markdown/renderTable.js +2 -2
  725. package/dist/markdown/trailers.d.ts +7 -0
  726. package/dist/markdown/types.d.ts +9 -2
  727. package/dist/model.d.ts +25 -3
  728. package/dist/paged-layout/blockGeometry.js +3 -2
  729. package/dist/paged-layout/editorScrollRoot.d.ts +9 -0
  730. package/dist/paged-layout/editorScrollRoot.js +10 -1
  731. package/dist/paged-layout/pageText.d.ts +1 -1
  732. package/dist/paged-layout/paragraphFlash.d.ts +3 -0
  733. package/dist/paged-layout/rangeProjection.d.ts +20 -1
  734. package/dist/paged-layout/rangeProjection.js +26 -7
  735. package/dist/paged-layout/scrollToPmPosition.d.ts +15 -0
  736. package/dist/paged-layout/scrollToPmPosition.js +3 -3
  737. package/dist/paged-layout/sectionBlockWidths.d.ts +2 -2
  738. package/dist/paged-layout/sectionGeometry.d.ts +4 -3
  739. package/dist/paged-layout/selectionViewportRect.d.ts +19 -0
  740. package/dist/paged-layout/selectionViewportRect.js +8 -2
  741. package/dist/panel-layout.d.ts +18 -1
  742. package/dist/panel-layout.js +36 -2
  743. package/dist/pdf/contentStream.d.ts +12 -0
  744. package/dist/pdf/fonts.d.ts +19 -0
  745. package/dist/pdf/paint.d.ts +9 -1
  746. package/dist/pdf/paint.js +51 -0
  747. package/dist/prosemirror/acceptedBlockNeighbours.d.ts +50 -0
  748. package/dist/prosemirror/acceptedBlockNeighbours.js +63 -0
  749. package/dist/prosemirror/alternateContentAttrs.d.ts +1 -1
  750. package/dist/prosemirror/anchoredTextBoxes.d.ts +20 -0
  751. package/dist/prosemirror/attrs/index.d.ts +2 -2
  752. package/dist/prosemirror/attrs/index.js +2 -1
  753. package/dist/prosemirror/authoredTransformAttrs.d.ts +14 -0
  754. package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +2 -2
  755. package/dist/prosemirror/canonicalCommands.d.ts +26 -1
  756. package/dist/prosemirror/canonicalCommands.js +12 -1
  757. package/dist/prosemirror/canonicalSelectionRange.d.ts +1 -1
  758. package/dist/prosemirror/canonicalTableCommands.d.ts +14 -0
  759. package/dist/prosemirror/canonicalTableCommands.js +18 -6
  760. package/dist/prosemirror/cellDragSelection.d.ts +9 -0
  761. package/dist/prosemirror/commands/comments.d.ts +27 -2
  762. package/dist/prosemirror/commands/comments.js +459 -159
  763. package/dist/prosemirror/commands/contentControls.d.ts +20 -3
  764. package/dist/prosemirror/commands/contentControls.js +18 -1
  765. package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +11 -1
  766. package/dist/prosemirror/commands/formatPainter.d.ts +10 -0
  767. package/dist/prosemirror/commands/formatPainter.js +0 -1
  768. package/dist/prosemirror/commands/formatting.d.ts +9 -2
  769. package/dist/prosemirror/commands/hyperlink.d.ts +12 -0
  770. package/dist/prosemirror/commands/image.d.ts +12 -0
  771. package/dist/prosemirror/commands/index.d.ts +10 -5
  772. package/dist/prosemirror/commands/pageBreak.d.ts +3 -0
  773. package/dist/prosemirror/commands/paragraph.d.ts +8 -1
  774. package/dist/prosemirror/commands/pastePlainText.d.ts +8 -0
  775. package/dist/prosemirror/commands/pastePlainText.js +1 -1
  776. package/dist/prosemirror/commands/propertyChangeScope.d.ts +28 -15
  777. package/dist/prosemirror/commands/propertyChangeScope.js +5 -12
  778. package/dist/prosemirror/commands/replaceRangeText.d.ts +22 -0
  779. package/dist/prosemirror/commands/replaceRangeText.js +44 -0
  780. package/dist/prosemirror/commands/resolveAllTableChanges.js +3 -2
  781. package/dist/prosemirror/commands/resolveParagraphProperties.js +4 -8
  782. package/dist/prosemirror/commands/rulerParagraph.d.ts +25 -0
  783. package/dist/prosemirror/commands/rulerParagraph.js +18 -0
  784. package/dist/prosemirror/commands/sectionBreak.d.ts +5 -0
  785. package/dist/prosemirror/commands/table.d.ts +7 -0
  786. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +1 -1
  787. package/dist/prosemirror/commentIdAllocator.d.ts +12 -6
  788. package/dist/prosemirror/commentIdAllocator.js +38 -29
  789. package/dist/prosemirror/commentOps.d.ts +7 -0
  790. package/dist/prosemirror/commentRangeBoundaryAttrs.d.ts +1 -1
  791. package/dist/prosemirror/commentRangeInlineAtoms.d.ts +4 -3
  792. package/dist/prosemirror/commentRangeInlineAtoms.js +1 -1
  793. package/dist/prosemirror/commentRecords.d.ts +154 -0
  794. package/dist/prosemirror/commentRecords.js +527 -0
  795. package/dist/prosemirror/commentReferenceAttrs.d.ts +1 -1
  796. package/dist/prosemirror/commentReferenceIntegrity.js +93 -14
  797. package/dist/prosemirror/containerFinalParagraph.d.ts +2 -0
  798. package/dist/prosemirror/containerFinalParagraph.js +3 -1
  799. package/dist/prosemirror/contentControlRevisions.d.ts +14 -0
  800. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +5 -4
  801. package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
  802. package/dist/prosemirror/conversion/fromProseDoc.js +81 -61
  803. package/dist/prosemirror/conversion/index.d.ts +7 -2
  804. package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +21 -0
  805. package/dist/prosemirror/conversion/runShadingMark.d.ts +13 -1
  806. package/dist/prosemirror/conversion/storyConversionOptions.d.ts +16 -0
  807. package/dist/prosemirror/conversion/storyConversionOptions.js +13 -0
  808. package/dist/prosemirror/conversion/toProseDoc.d.ts +48 -14
  809. package/dist/prosemirror/conversion/toProseDoc.js +294 -145
  810. package/dist/prosemirror/copyOriginResolution.js +23 -10
  811. package/dist/prosemirror/documentSchema.d.ts +12 -0
  812. package/dist/prosemirror/emptyRangeAnchor.d.ts +39 -8
  813. package/dist/prosemirror/emptyRangeAnchor.js +63 -10
  814. package/dist/prosemirror/extensions/ExtensionManager.d.ts +7 -0
  815. package/dist/prosemirror/extensions/ExtensionManager.js +2 -0
  816. package/dist/prosemirror/extensions/StarterKit.d.ts +11 -2
  817. package/dist/prosemirror/extensions/core/DocExtension.d.ts +3 -0
  818. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +3 -0
  819. package/dist/prosemirror/extensions/core/HistoryExtension.js +3 -2
  820. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +13 -4
  821. package/dist/prosemirror/extensions/core/ParagraphExtension.js +5 -3
  822. package/dist/prosemirror/extensions/core/TextExtension.d.ts +3 -0
  823. package/dist/prosemirror/extensions/create.d.ts +6 -0
  824. package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +5 -0
  825. package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -3
  826. package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +10 -0
  827. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +10 -0
  828. package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +6 -0
  829. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +20 -0
  830. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +20 -23
  831. package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +13 -0
  832. package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +9 -0
  833. package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +6 -0
  834. package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +14 -0
  835. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +38 -21
  836. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +30 -3
  837. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +65 -45
  838. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +17 -0
  839. package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +7 -3
  840. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +14 -0
  841. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +4 -1
  842. package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +32 -3
  843. package/dist/prosemirror/extensions/features/pasteCleanup.js +23 -3
  844. package/dist/prosemirror/extensions/features/pastedCellSections.d.ts +22 -0
  845. package/dist/prosemirror/extensions/features/pastedCellSections.js +78 -0
  846. package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +22 -0
  847. package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +1 -0
  848. package/dist/prosemirror/extensions/markRegistry.d.ts +14 -1
  849. package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +3 -0
  850. package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +3 -0
  851. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +8 -0
  852. package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +14 -0
  853. package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +6 -0
  854. package/dist/prosemirror/extensions/marks/CommentExtension.js +3 -1
  855. package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +3 -0
  856. package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +4 -6
  857. package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +3 -0
  858. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +5 -0
  859. package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +17 -0
  860. package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +3 -0
  861. package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +3 -0
  862. package/dist/prosemirror/extensions/marks/HyphenElementExtension.d.ts +19 -0
  863. package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +12 -0
  864. package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +3 -0
  865. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +11 -2
  866. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.js +2 -1
  867. package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +21 -0
  868. package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +3 -0
  869. package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +3 -0
  870. package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +3 -0
  871. package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +3 -0
  872. package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +3 -0
  873. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +6 -0
  874. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +7 -0
  875. package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +3 -0
  876. package/dist/prosemirror/extensions/marks/markUtils.d.ts +10 -3
  877. package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +22 -0
  878. package/dist/prosemirror/extensions/nodes/BlockCommentRangeBoundaryExtension.d.ts +11 -0
  879. package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +14 -0
  880. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +17 -0
  881. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +1 -0
  882. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +38 -4
  883. package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +2 -1
  884. package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +3 -1
  885. package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +8 -0
  886. package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +3 -0
  887. package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +3 -0
  888. package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +3 -0
  889. package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +7 -0
  890. package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +1 -0
  891. package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +3 -0
  892. package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +1 -0
  893. package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +25 -0
  894. package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +9 -0
  895. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +1 -0
  896. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +7 -19
  897. package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +1 -0
  898. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +6 -0
  899. package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +6 -0
  900. package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +3 -0
  901. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +8 -1
  902. package/dist/prosemirror/extensions/nodes/TableExtension.js +6 -6
  903. package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +7 -0
  904. package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +7 -0
  905. package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +9 -0
  906. package/dist/prosemirror/extensions/types.d.ts +10 -1
  907. package/dist/prosemirror/findReplaceSelection.d.ts +1 -1
  908. package/dist/prosemirror/hyperlinkRemoval.d.ts +13 -1
  909. package/dist/prosemirror/imageCommit.d.ts +10 -0
  910. package/dist/prosemirror/index.d.ts +30 -20
  911. package/dist/prosemirror/indexedNodeLookup.d.ts +11 -0
  912. package/dist/prosemirror/inlineWrapperStack.d.ts +12 -0
  913. package/dist/prosemirror/insertOperations.d.ts +10 -1
  914. package/dist/prosemirror/insertOperations.js +2 -2
  915. package/dist/prosemirror/insertionGaps.d.ts +21 -0
  916. package/dist/prosemirror/insertionGaps.js +86 -0
  917. package/dist/prosemirror/keptRangeBoundaries.d.ts +16 -12
  918. package/dist/prosemirror/keptRangeBoundaries.js +28 -34
  919. package/dist/prosemirror/listAutoformatMarkers.d.ts +11 -0
  920. package/dist/prosemirror/listInstanceReferences.d.ts +5 -0
  921. package/dist/prosemirror/listLabels.d.ts +16 -3
  922. package/dist/prosemirror/listLabels.js +0 -6
  923. package/dist/prosemirror/listMarker.d.ts +2 -2
  924. package/dist/prosemirror/listNumbering.d.ts +1 -1
  925. package/dist/prosemirror/listRendering.d.ts +2 -2
  926. package/dist/prosemirror/listRenderingAttrs.d.ts +10 -1
  927. package/dist/prosemirror/lockedControls.d.ts +6 -0
  928. package/dist/prosemirror/markupViewNotes.d.ts +11 -1
  929. package/dist/prosemirror/markupViewProjection.d.ts +21 -4
  930. package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +1 -1
  931. package/dist/prosemirror/nativeSelection.d.ts +51 -0
  932. package/dist/prosemirror/nativeSelection.js +124 -0
  933. package/dist/prosemirror/noteReferenceOccurrences.d.ts +1 -1
  934. package/dist/prosemirror/noteReferenceReview.d.ts +17 -3
  935. package/dist/prosemirror/noteReferenceReview.js +26 -5
  936. package/dist/prosemirror/numberedRefFields.d.ts +2 -0
  937. package/dist/prosemirror/numberedRefFields.js +16 -5
  938. package/dist/prosemirror/pageBreakRunProjection.d.ts +2 -1
  939. package/dist/prosemirror/paraText.d.ts +14 -0
  940. package/dist/prosemirror/paragraphFormattingProvenance.d.ts +13 -1
  941. package/dist/prosemirror/paragraphIndentation.d.ts +6 -3
  942. package/dist/prosemirror/paragraphIndentation.js +2 -3
  943. package/dist/prosemirror/paragraphList.d.ts +1 -1
  944. package/dist/prosemirror/paragraphMarkJoin.d.ts +34 -8
  945. package/dist/prosemirror/paragraphMarkJoin.js +176 -18
  946. package/dist/prosemirror/paragraphPropertyCarry.d.ts +15 -1
  947. package/dist/prosemirror/paragraphPropertyCarry.js +5 -3
  948. package/dist/prosemirror/paragraphSpacing.d.ts +1 -1
  949. package/dist/prosemirror/pastePlacement.d.ts +17 -0
  950. package/dist/prosemirror/pastePlacement.js +22 -0
  951. package/dist/prosemirror/pastedCommentCopies.d.ts +87 -0
  952. package/dist/prosemirror/pastedCommentCopies.js +379 -0
  953. package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +12 -0
  954. package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +14 -0
  955. package/dist/prosemirror/plugins/contentControlWidgets.d.ts +15 -9
  956. package/dist/prosemirror/plugins/contentControlWidgets.js +24 -30
  957. package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +17 -0
  958. package/dist/prosemirror/plugins/documentNumbering.d.ts +2 -1
  959. package/dist/prosemirror/plugins/documentNumbering.js +33 -14
  960. package/dist/prosemirror/plugins/documentStyleState.d.ts +3 -4
  961. package/dist/prosemirror/plugins/documentStyles.d.ts +20 -3
  962. package/dist/prosemirror/plugins/index.d.ts +7 -1
  963. package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +18 -1
  964. package/dist/prosemirror/plugins/paragraphStyleResolution.js +12 -2
  965. package/dist/prosemirror/plugins/pmTextScan.d.ts +18 -0
  966. package/dist/prosemirror/plugins/pmTextScan.js +42 -33
  967. package/dist/prosemirror/plugins/revisionIds.d.ts +14 -1
  968. package/dist/prosemirror/plugins/revisionIds.js +5 -1
  969. package/dist/prosemirror/plugins/selectionTracker.d.ts +12 -2
  970. package/dist/prosemirror/plugins/suggestionMode.d.ts +14 -11
  971. package/dist/prosemirror/plugins/suggestionMode.js +225 -35
  972. package/dist/prosemirror/plugins/templateDirectives.d.ts +17 -0
  973. package/dist/prosemirror/plugins/templatePreviewValues.d.ts +23 -0
  974. package/dist/prosemirror/plugins/templateSlashMenu.d.ts +19 -0
  975. package/dist/prosemirror/plugins/transactionInvariants.d.ts +19 -0
  976. package/dist/prosemirror/positionSweep.d.ts +21 -0
  977. package/dist/prosemirror/queries.d.ts +9 -0
  978. package/dist/prosemirror/queries.js +2 -2
  979. package/dist/prosemirror/rangeAnchorAttrs.d.ts +2 -2
  980. package/dist/prosemirror/rangeAnchorAttrs.js +55 -33
  981. package/dist/prosemirror/rebaseParagraphRuns.js +1 -1
  982. package/dist/prosemirror/rejoinRunCarriers.d.ts +17 -0
  983. package/dist/prosemirror/replaceFindMatches.d.ts +20 -0
  984. package/dist/prosemirror/replaceFindMatches.js +33 -0
  985. package/dist/prosemirror/replacedAnnotations.d.ts +143 -0
  986. package/dist/prosemirror/replacedAnnotations.js +223 -26
  987. package/dist/prosemirror/revisionCarriers.js +9 -0
  988. package/dist/prosemirror/runFormattingFromMarks.d.ts +3 -3
  989. package/dist/prosemirror/runFormattingFromMarks.js +10 -51
  990. package/dist/prosemirror/runFormattingProvenance.d.ts +2 -1
  991. package/dist/prosemirror/runFormattingProvenance.js +2 -1
  992. package/dist/prosemirror/runFormattingReconciliation.js +3 -12
  993. package/dist/prosemirror/runIdentity.d.ts +14 -0
  994. package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +30 -1
  995. package/dist/prosemirror/runIdentityAcrossRevisions.js +57 -8
  996. package/dist/prosemirror/runPropertyChangeResolution.d.ts +5 -13
  997. package/dist/prosemirror/runPropertyChangeResolution.js +13 -30
  998. package/dist/prosemirror/runStyleFormatting.d.ts +42 -113
  999. package/dist/prosemirror/runStyleFormatting.js +17 -74
  1000. package/dist/prosemirror/schema/index.d.ts +8 -1
  1001. package/dist/prosemirror/schema/marks.d.ts +21 -1
  1002. package/dist/prosemirror/schema/nodes.d.ts +15 -14
  1003. package/dist/prosemirror/sectionCarrier.d.ts +21 -0
  1004. package/dist/prosemirror/sectionMarkEdits.d.ts +18 -0
  1005. package/dist/prosemirror/selectionState.d.ts +10 -4
  1006. package/dist/prosemirror/storyListNumbering.d.ts +10 -0
  1007. package/dist/prosemirror/storyListNumbering.js +7 -2
  1008. package/dist/prosemirror/styles/index.d.ts +3 -0
  1009. package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +20 -18
  1010. package/dist/prosemirror/styles/paragraphStyleCascade.js +10 -19
  1011. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +4 -3
  1012. package/dist/prosemirror/styles/styleResolver.d.ts +40 -15
  1013. package/dist/prosemirror/styles/styleResolver.js +6 -6
  1014. package/dist/prosemirror/styles/styleToggleCascade.d.ts +18 -11
  1015. package/dist/prosemirror/styles/styleToggleCascade.js +2 -11
  1016. package/dist/prosemirror/styles/tableStyleRegions.d.ts +20 -7
  1017. package/dist/prosemirror/styles/tableStyleRegions.js +14 -13
  1018. package/dist/prosemirror/tableCellPaste.d.ts +21 -0
  1019. package/dist/prosemirror/tableCellPaste.js +32 -2
  1020. package/dist/prosemirror/tableGridMutation.d.ts +9 -0
  1021. package/dist/prosemirror/tableGridMutation.js +34 -2
  1022. package/dist/prosemirror/tablePositionedBookmarks.d.ts +6 -0
  1023. package/dist/prosemirror/tableResize.d.ts +20 -9
  1024. package/dist/prosemirror/tableResize.js +60 -49
  1025. package/dist/prosemirror/tableRunIn.d.ts +26 -1
  1026. package/dist/prosemirror/tableRunIn.js +39 -11
  1027. package/dist/prosemirror/textBoxAnchorAttrs.d.ts +1 -1
  1028. package/dist/prosemirror/textBoxHostCollapse.d.ts +11 -0
  1029. package/dist/prosemirror/textInput.d.ts +30 -1
  1030. package/dist/prosemirror/textInput.js +144 -17
  1031. package/dist/prosemirror/utils/findParagraphByParaId.d.ts +5 -0
  1032. package/dist/prosemirror/utils/tabCalculator.d.ts +6 -0
  1033. package/dist/prosemirror/utils/visualLineNavigation.js +21 -19
  1034. package/dist/prosemirror/validation.d.ts +19 -0
  1035. package/dist/prosemirror/validation.js +84 -16
  1036. package/dist/prosemirror/yjsDocumentMetadata.d.ts +9 -3
  1037. package/dist/prosemirror/yjsDocumentMetadata.js +49 -10
  1038. package/dist/prosemirror/zeroWidthAnchors.d.ts +18 -0
  1039. package/dist/redline.d.ts +4 -1
  1040. package/dist/redline.js +21 -13
  1041. package/dist/render-dom/BodySelectionOverlay.d.ts +5 -0
  1042. package/dist/render-dom/HeaderFooterSelectionOverlay.js +5 -4
  1043. package/dist/render-dom/RemoteSelectionOverlay.js +3 -3
  1044. package/dist/render-dom/RenderedDomContext.js +7 -6
  1045. package/dist/server.d.ts +30 -18
  1046. package/dist/server.js +4 -3
  1047. package/dist/shaping/placeRun.d.ts +8 -0
  1048. package/dist/shaping/shaper.d.ts +19 -0
  1049. package/dist/style-engine/index.d.ts +5 -0
  1050. package/dist/style-engine/styleEngine.d.ts +32 -13
  1051. package/dist/style-sets/extract.d.ts +1 -1
  1052. package/dist/style-sets/styleSetNormalization.d.ts +20 -1
  1053. package/dist/text-shaping.d.ts +9 -1
  1054. package/dist/types/anonymization.d.ts +17 -0
  1055. package/dist/types/anonymization.js +0 -0
  1056. package/dist/types/autocomplete.d.ts +46 -0
  1057. package/dist/types/autocomplete.js +0 -0
  1058. package/dist/types/canonicalCapabilities.d.ts +52 -53
  1059. package/dist/types/canonicalCapabilities.js +54 -56
  1060. package/dist/types/canonicalSave.d.ts +36 -0
  1061. package/dist/types/documentModel.d.ts +37 -0
  1062. package/dist/types/documentModel.js +24 -0
  1063. package/dist/types/docxSerialization.d.ts +10 -0
  1064. package/dist/types/index.d.ts +5 -0
  1065. package/dist/types/remote-selection.d.ts +2 -1
  1066. package/dist/types/selectiveSaveDecline.d.ts +44 -0
  1067. package/dist/types/selectiveSaveDecline.js +0 -0
  1068. package/dist/types/tableWidthKind.d.ts +2 -0
  1069. package/dist/types/tableWidthKind.js +9 -0
  1070. package/dist/utils/base64.d.ts +20 -0
  1071. package/dist/utils/borderCss.d.ts +18 -1
  1072. package/dist/utils/colorResolver.d.ts +12 -11
  1073. package/dist/utils/createDocument.d.ts +8 -1
  1074. package/dist/utils/createDocument.js +20 -2
  1075. package/dist/utils/diagonalHatch.d.ts +2 -0
  1076. package/dist/utils/diagonalHatch.js +16 -0
  1077. package/dist/utils/extremes.d.ts +4 -0
  1078. package/dist/utils/extremes.js +14 -0
  1079. package/dist/utils/findMatchView.d.ts +2 -2
  1080. package/dist/utils/findMatchView.js +4 -3
  1081. package/dist/utils/findReplace.d.ts +2 -2
  1082. package/dist/utils/findReplace.js +3 -2
  1083. package/dist/utils/fontFamilyMerge.d.ts +2 -1
  1084. package/dist/utils/fontResolver.d.ts +11 -2
  1085. package/dist/utils/formatToStyle.d.ts +21 -7
  1086. package/dist/utils/headerFooter.d.ts +16 -2
  1087. package/dist/utils/headerFooter.js +2 -6
  1088. package/dist/utils/imageResize.js +1 -1
  1089. package/dist/utils/listItems.d.ts +7 -0
  1090. package/dist/utils/listItems.js +9 -0
  1091. package/dist/utils/mergeDocumentContent.d.ts +7 -0
  1092. package/dist/utils/mergeDocumentContent.js +2 -2
  1093. package/dist/utils/outlineHeadings.d.ts +1 -1
  1094. package/dist/utils/paintedPositions.d.ts +60 -0
  1095. package/dist/utils/paintedPositions.js +101 -0
  1096. package/dist/utils/paragraphFormattingMerge.d.ts +11 -3
  1097. package/dist/utils/paragraphFormattingMerge.js +0 -8
  1098. package/dist/utils/paragraphInlineLayout.js +2 -1
  1099. package/dist/utils/repeatingStrokeGradient.d.ts +8 -0
  1100. package/dist/utils/repeatingStrokeGradient.js +13 -0
  1101. package/dist/utils/rotationBoundingBox.d.ts +8 -0
  1102. package/dist/utils/rulerControl.d.ts +71 -0
  1103. package/dist/utils/rulerControl.js +94 -0
  1104. package/dist/utils/tableOperations.d.ts +20 -4
  1105. package/dist/utils/tableOperations.js +1 -0
  1106. package/dist/utils/textDirectionFlow.d.ts +10 -0
  1107. package/dist/utils/textFormattingMerge.d.ts +18 -2
  1108. package/dist/utils/textFormattingMerge.js +0 -20
  1109. package/dist/utils/units.d.ts +2 -0
  1110. package/dist/utils/units.js +3 -1
  1111. package/dist/version-comparison.d.ts +63 -1
  1112. package/dist/version-comparison.js +2 -1
  1113. package/dist/watermark/index.d.ts +11 -0
  1114. package/dist/watermark/index.js +0 -5
  1115. package/package.json +7 -8
  1116. package/dist/controller/canonicalLockGuard.d.ts +0 -8
  1117. package/dist/controller/canonicalLockGuard.js +0 -88
  1118. package/dist/controller/canonicalPublicOperations.js +0 -900
  1119. package/dist/controller/canonicalSession.d.ts +0 -256
  1120. package/dist/controller/canonicalSession.js +0 -1717
  1121. package/dist/docx/canonicalResourceSave.d.ts +0 -15
  1122. package/dist/docx/canonicalResourceSave.js +0 -27
  1123. package/dist/internal/acceptedBlockProjection.d.ts +0 -9
  1124. package/dist/internal/acceptedBlockProjection.js +0 -50
  1125. package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +0 -60
  1126. package/dist/prosemirror/plugins/anonymizationDecorations.js +0 -111
  1127. package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +0 -127
  1128. package/dist/prosemirror/plugins/autocompleteSuggestion.js +0 -282
  1129. package/dist/utils/replaceText.d.ts +0 -25
  1130. package/dist/utils/replaceText.js +0 -242
  1131. /package/dist/{controller → canonical}/canonicalListRendering.d.ts +0 -0
  1132. /package/dist/{controller → canonical}/canonicalOperations.d.ts +0 -0
  1133. /package/dist/{controller → canonical}/canonicalSelection.d.ts +0 -0
  1134. /package/dist/{controller → canonical}/canonicalTocSelection.d.ts +0 -0
@@ -68,6 +68,21 @@ const tierFor = (outline, comments) => {
68
68
  if (outline === "rail") return "medium";
69
69
  return "wide";
70
70
  };
71
+ /**
72
+ * Where the widest page ends inside the scroll content. Each adapter centres
73
+ * the page in the content with the comments gutter after it (React through
74
+ * its viewport extent, Vue through the pages viewport's padding), which puts
75
+ * the page's start at `max(0, (contentWidth - (pageWidth + gutter)) / 2)`.
76
+ */
77
+ const pageEndInContent = ({ contentWidth, pageWidth, commentsGutter }) => Math.max(0, (contentWidth - (pageWidth + commentsGutter)) / 2) + pageWidth;
78
+ /** Space a comments column keeps from the edges of the surface it sits on. */
79
+ const COMMENTS_COLUMN_INSET = 8;
80
+ /**
81
+ * Where a comments column starts beside the page: a gap after the page's end
82
+ * edge, kept inside the surface it is positioned on. Both values are in that
83
+ * surface's CSS pixels.
84
+ */
85
+ const commentsColumnStart = (pageEnd, surfaceWidth) => Math.max(COMMENTS_COLUMN_INSET, Math.min(pageEnd + PANEL_METRICS.commentsGap, surfaceWidth - PANEL_METRICS.commentsWidth - COMMENTS_COLUMN_INSET));
71
86
  /** Decide each panel's presentation for the width the editor has. */
72
87
  const computePanelLayout = (input) => {
73
88
  const { availableWidth } = input;
@@ -87,13 +102,32 @@ const computePanelLayout = (input) => {
87
102
  if (availableWidth >= beside + PANEL_METRICS.outlineRailWidth) return "rail";
88
103
  return "drawer";
89
104
  })();
105
+ const outlineTrackWidth = outline === "expanded" ? Math.min(PANEL_METRICS.outlineColumnWidth, Math.max(PANEL_METRICS.controlMinimumSize, (availableWidth - commentsGutter) / 2)) : OUTLINE_TRACK_WIDTH[outline];
106
+ const contentWidth = Math.max(0, availableWidth - outlineTrackWidth);
90
107
  return {
91
108
  tier: tierFor(outline, comments),
92
109
  outline,
93
110
  comments,
94
- outlineTrackWidth: outline === "expanded" ? Math.min(PANEL_METRICS.outlineColumnWidth, Math.max(PANEL_METRICS.controlMinimumSize, (availableWidth - commentsGutter) / 2)) : OUTLINE_TRACK_WIDTH[outline],
111
+ outlineTrackWidth,
95
112
  commentsGutter,
113
+ contentWidth,
114
+ commentsColumnStart: comments === "column" && Number.isFinite(contentWidth) ? commentsColumnStart(pageEndInContent({
115
+ contentWidth,
116
+ pageWidth: input.pageWidth,
117
+ commentsGutter
118
+ }), contentWidth) : null,
96
119
  thresholds
97
120
  };
98
121
  };
99
- export { COMMENTS_TRACK_WIDTH, PANEL_METRICS, computePanelLayout, panelLayoutThresholds };
122
+ /**
123
+ * The outline presentation a layout is asked for: an opened outline takes a
124
+ * track of its own beside the page rather than a drawer over it.
125
+ */
126
+ const requestedOutline = (overlay, outline) => overlay === "outline" && outline !== "absent" ? "expanded" : outline;
127
+ /** An overlay stays open only while its panel is still opened by it. */
128
+ const overlayAfterLayout = (overlay, layout) => {
129
+ if (overlay === "outline" && (layout.outline === "none" || layout.outline === "column")) return "none";
130
+ if (overlay === "comments" && layout.comments !== "drawer") return "none";
131
+ return overlay;
132
+ };
133
+ export { COMMENTS_TRACK_WIDTH, PANEL_METRICS, commentsColumnStart, computePanelLayout, overlayAfterLayout, panelLayoutThresholds, requestedOutline };
@@ -1,3 +1,15 @@
1
+ /**
2
+ * Content-stream construction: the graphics operators, and the resource
3
+ * names they refer to.
4
+ *
5
+ * A stream is built as a list of parts rather than a string, because a
6
+ * resource reference (`/F1`, `/Im1`, `/GS1`) is written as a *use* of a font,
7
+ * image or alpha, not as a name. Names are assigned once the whole stream is
8
+ * known, in sorted key order, so nothing about the file depends on the order
9
+ * in which the painter happened to reach a resource. Emitting names as the
10
+ * painter goes would make the bytes depend on traversal order, which is
11
+ * exactly the kind of drift the determinism requirement forbids.
12
+ */
1
13
  import { DisplayColor } from "../display-list/types.js";
2
14
  import { PdfMatrix } from "./pageSpace.js";
3
15
  export type PdfResourceUse = {
@@ -1,3 +1,22 @@
1
+ /**
2
+ * Font embedding.
3
+ *
4
+ * Every face the document paints becomes a composite (Type 0) font with
5
+ * `Identity-H` encoding, so a run is written as two-byte glyph ids and the
6
+ * file carries no encoding table to disagree with the font. A face the source
7
+ * cannot supply, or whose licence bits forbid embedding, falls back to a
8
+ * base-14 face and is *reported*: a substitution the caller cannot see is a
9
+ * silently different document.
10
+ *
11
+ * ## A face is not a binary
12
+ *
13
+ * A packaged family arrives cut into disjoint script subsets: one binary
14
+ * carries ASCII, another the Central European letters, and Czech, Slovak or
15
+ * Polish text needs both at once. Each binary is its own sfnt with its own
16
+ * glyph space, so one face becomes one PDF font resource *per binary the
17
+ * document actually uses*, and a code point is served by the first binary
18
+ * whose cmap covers it.
19
+ */
1
20
  import { DisplayFontFace } from "../display-list/types.js";
2
21
  import { Shaper, ShapingDirection } from "../shaping/shaper.js";
3
22
  import { PdfDocument, PdfRef } from "./objects.js";
@@ -1,6 +1,14 @@
1
+ /**
2
+ * Display list to content stream.
3
+ *
4
+ * Everything here is emitted in display-list coordinates: CSS px, origin at
5
+ * the page's top-left, y down. The page's base CTM (see `pageSpace.ts`)
6
+ * converts once, at the stream's first operator, which is why no primitive
7
+ * below does any arithmetic on the page height.
8
+ */
1
9
  import { DisplayPage } from "../display-list/types.js";
2
- import { PreparedFont, ShapedRunRequest } from "./fonts.js";
3
10
  import { ContentPart } from "./contentStream.js";
11
+ import { PreparedFont, ShapedRunRequest } from "./fonts.js";
4
12
  import { Result, TaggedErrorClass } from "better-result";
5
13
  declare const PaintErrorBase: TaggedErrorClass<"PaintError">;
6
14
  export declare class PaintError extends PaintErrorBase<{
package/dist/pdf/paint.js CHANGED
@@ -21,6 +21,7 @@ const OPAQUE = 1;
21
21
  const WAVY_SAMPLES_PER_PERIOD = 8;
22
22
  /** A `double` stroke is drawn as two lines, one either side of the path. */
23
23
  const DOUBLE_STROKE_LINES = 2;
24
+ const MAX_HATCH_SLOTS_PER_EDGE = 8192;
24
25
  const withAlpha = (context, alpha) => ({
25
26
  ...context,
26
27
  alpha
@@ -41,6 +42,10 @@ const beginPrimitive = (context, alpha) => {
41
42
  const applyStrokeState = (stream, stroke, widthPx) => {
42
43
  stream.setStrokeColor(stroke.color);
43
44
  stream.setLineWidth(widthPx);
45
+ if (stroke.pattern === "dashed" && stroke.dashArrayPx !== void 0) {
46
+ stream.setDash(stroke.dashArrayPx, 0);
47
+ return;
48
+ }
44
49
  const dash = STROKE_DASH_FACTORS[stroke.pattern];
45
50
  if (dash !== null) stream.setDash([dash.dash * stroke.thicknessPx, dash.gap * stroke.thicknessPx], 0);
46
51
  };
@@ -112,6 +117,48 @@ const paintSegment = (context, stroke, segment) => {
112
117
  }
113
118
  stream.restore();
114
119
  };
120
+ function paintHatchedEdge(context, line) {
121
+ const { x1Px, y1Px, x2Px, y2Px, stroke, hatch } = line;
122
+ if (!hatch) return;
123
+ const horizontal = y1Px === y2Px;
124
+ if (!horizontal && !(x1Px === x2Px)) return;
125
+ const halfBand = stroke.thicknessPx / 2;
126
+ const x = horizontal ? Math.min(x1Px, x2Px) : x1Px - halfBand;
127
+ const y = horizontal ? y1Px - halfBand : Math.min(y1Px, y2Px);
128
+ const width = horizontal ? Math.abs(x2Px - x1Px) : stroke.thicknessPx;
129
+ const height = horizontal ? stroke.thicknessPx : Math.abs(y2Px - y1Px);
130
+ const projection = width + height;
131
+ const { pitchPx, lineWidthPx, slots } = hatch;
132
+ if (!(width > 0 && height > 0 && pitchPx > 0 && lineWidthPx > 0)) return;
133
+ const slotCount = Math.ceil(projection / pitchPx);
134
+ if (!Number.isFinite(slotCount) || slots.length === 0) return;
135
+ if (slotCount > MAX_HATCH_SLOTS_PER_EDGE) {
136
+ paintSegment(context, stroke, {
137
+ x1Px,
138
+ y1Px,
139
+ x2Px,
140
+ y2Px
141
+ });
142
+ return;
143
+ }
144
+ beginPrimitive(context, context.alpha * stroke.color.a);
145
+ const { stream } = context;
146
+ stream.appendRect(x, y, width, height);
147
+ stream.clipToCurrentPath();
148
+ stream.setStrokeColor(stroke.color);
149
+ stream.setLineWidth(lineWidthPx);
150
+ const inkCenter = lineWidthPx / Math.SQRT2;
151
+ for (let slot = 0; slot < slotCount; slot += 1) {
152
+ if (!slots[slot % slots.length]) continue;
153
+ const offset = slot * pitchPx + inkCenter;
154
+ const start = Math.max(0, offset - height) - lineWidthPx;
155
+ const end = Math.min(width, offset) + lineWidthPx;
156
+ stream.moveTo(x + start, y + offset - start);
157
+ stream.lineTo(x + end, y + offset - end);
158
+ }
159
+ stream.stroke();
160
+ stream.restore();
161
+ }
115
162
  const paintPolyline = (context, primitive) => {
116
163
  const first = primitive.points.at(0);
117
164
  if (first === void 0 || primitive.points.length < 2) return;
@@ -350,6 +397,10 @@ const paintPrimitive = (context, primitive) => {
350
397
  paintRect(context, primitive);
351
398
  return;
352
399
  case "line":
400
+ if (primitive.hatch) {
401
+ paintHatchedEdge(context, primitive);
402
+ return;
403
+ }
353
404
  paintSegment(context, primitive.stroke, {
354
405
  x1Px: primitive.x1Px,
355
406
  y1Px: primitive.y1Px,
@@ -0,0 +1,50 @@
1
+ /**
2
+ * What a place between blocks has next to it once every pending change is
3
+ * accepted.
4
+ *
5
+ * Accepting removes some blocks whole: a paragraph with nothing left of it
6
+ * whose mark is deleted (`paragraphGoes`), and a table every row of which is
7
+ * deleted (`tableGoes`). An edit reads a document with pending changes as
8
+ * accepting leaves it: a join into a paragraph accepting removes, right
9
+ * before a table, ends there, and the two sides of blocks accepting removes
10
+ * whole are one gap. Applied directly, the same edit reads the same.
11
+ */
12
+ import { paragraphLeftAfter } from "./paragraphPropertyCarry.js";
13
+ import { Node } from "prosemirror-model";
14
+ /**
15
+ * Whether accepting every change ends a join at the paragraph at `position`,
16
+ * leaving the words joined into it apart from the table right after it:
17
+ * nothing of that paragraph stays and its mark goes, and a table that stays
18
+ * follows it. A deleted paragraph stood before the table, and the join ended
19
+ * there (`tableRunIn`), so a merge into it applied directly keeps its break
20
+ * before the table, as the same merge tracked and accepted leaves it.
21
+ */
22
+ export declare const joinEndsBeforeTable: (doc: Node, position: number) => boolean;
23
+ /**
24
+ * The paragraph accepting every change leaves of a merge from the paragraph
25
+ * at `paragraphPos`, whose break goes: the one `paragraphLeftAfter` finds,
26
+ * unless the join ends at it before a table (`joinEndsBeforeTable`), where
27
+ * accepting leaves the paragraph the merge started from. The merge's
28
+ * properties go there.
29
+ */
30
+ export declare const paragraphMergeLeaves: (options: Parameters<typeof paragraphLeftAfter>[0]) => number | null;
31
+ /**
32
+ * What accepting every change ends a pending join at: the paragraph whose
33
+ * break the joined words take, or a table that stays and stops them, as
34
+ * `joinEndsBeforeTable` reads it.
35
+ */
36
+ export type PendingJoinEnd = {
37
+ kind: "paragraph" | "table";
38
+ position: number;
39
+ };
40
+ /**
41
+ * Where accepting every change ends the join from the paragraph at
42
+ * `position`, whose break is a plain pending deletion while something of it
43
+ * stays. The join runs on past the paragraphs accepting removes whole and
44
+ * takes the break of the next paragraph, when that break stays; a table that
45
+ * stays after at least one removed paragraph stops it, and the words keep
46
+ * their own paragraph. Null for any other end: a paragraph whose break goes
47
+ * as well (the longer join is read from its last paragraph), a table right
48
+ * after the words, or the end of the container.
49
+ */
50
+ export declare const pendingJoinEnd: (doc: Node, position: number) => PendingJoinEnd | null;
@@ -0,0 +1,63 @@
1
+ import { expectParagraphAttrs } from "./attrs/index.js";
2
+ import { paragraphLeftAfter } from "./paragraphPropertyCarry.js";
3
+ import { paragraphGoes, tableGoes } from "./tableRunIn.js";
4
+ // src/prosemirror/acceptedBlockNeighbours.ts
5
+ const isTable = (node) => node.type.spec["tableRole"] === "table";
6
+ /**
7
+ * Whether accepting every change ends a join at the paragraph at `position`,
8
+ * leaving the words joined into it apart from the table right after it:
9
+ * nothing of that paragraph stays and its mark goes, and a table that stays
10
+ * follows it. A deleted paragraph stood before the table, and the join ended
11
+ * there (`tableRunIn`), so a merge into it applied directly keeps its break
12
+ * before the table, as the same merge tracked and accepted leaves it.
13
+ */
14
+ const joinEndsBeforeTable = (doc, position) => {
15
+ const paragraph = doc.nodeAt(position);
16
+ if (!paragraph || !paragraphGoes(paragraph, "accept")) return false;
17
+ const after = doc.resolve(position + paragraph.nodeSize).nodeAfter;
18
+ return after !== null && isTable(after) && !tableGoes(after, "accept");
19
+ };
20
+ /**
21
+ * The paragraph accepting every change leaves of a merge from the paragraph
22
+ * at `paragraphPos`, whose break goes: the one `paragraphLeftAfter` finds,
23
+ * unless the join ends at it before a table (`joinEndsBeforeTable`), where
24
+ * accepting leaves the paragraph the merge started from. The merge's
25
+ * properties go there.
26
+ */
27
+ const paragraphMergeLeaves = (options) => {
28
+ const left = paragraphLeftAfter(options);
29
+ return left !== null && joinEndsBeforeTable(options.doc, left) ? options.paragraphPos : left;
30
+ };
31
+ /**
32
+ * Where accepting every change ends the join from the paragraph at
33
+ * `position`, whose break is a plain pending deletion while something of it
34
+ * stays. The join runs on past the paragraphs accepting removes whole and
35
+ * takes the break of the next paragraph, when that break stays; a table that
36
+ * stays after at least one removed paragraph stops it, and the words keep
37
+ * their own paragraph. Null for any other end: a paragraph whose break goes
38
+ * as well (the longer join is read from its last paragraph), a table right
39
+ * after the words, or the end of the container.
40
+ */
41
+ const pendingJoinEnd = (doc, position) => {
42
+ const paragraph = doc.nodeAt(position);
43
+ if (paragraph?.type.name !== "paragraph" || expectParagraphAttrs(paragraph).pPrMark?.kind !== "del" || paragraphGoes(paragraph, "accept")) return null;
44
+ const $after = doc.resolve(position + paragraph.nodeSize);
45
+ let at = $after.pos;
46
+ for (let index = $after.index(); index < $after.parent.childCount; index++) {
47
+ const next = $after.parent.child(index);
48
+ if (next.type.name === "paragraph" && paragraphGoes(next, "accept")) {
49
+ at += next.nodeSize;
50
+ continue;
51
+ }
52
+ if (next.type.name === "paragraph") return expectParagraphAttrs(next).pPrMark == null ? {
53
+ kind: "paragraph",
54
+ position: at
55
+ } : null;
56
+ return isTable(next) && at > $after.pos && !tableGoes(next, "accept") ? {
57
+ kind: "table",
58
+ position: at
59
+ } : null;
60
+ }
61
+ return null;
62
+ };
63
+ export { joinEndsBeforeTable, paragraphMergeLeaves, pendingJoinEnd };
@@ -1,5 +1,5 @@
1
- import { AlternateContentAttrs } from "./schema/nodes.js";
2
1
  import { ShapeAlternateContent } from "../types/content.js";
2
+ import { AlternateContentAttrs } from "./schema/nodes.js";
3
3
  import { Node } from "prosemirror-model";
4
4
  /** Attach a captured `mc:AlternateContent` to a freshly projected node. */
5
5
  export declare const withAlternateContent: (node: Node, xml: string | undefined, source?: ShapeAlternateContent) => Node;
@@ -1,3 +1,23 @@
1
+ /**
2
+ * A text box and the paragraph it is drawn in.
3
+ *
4
+ * In DOCX a text box is run content: a `w:drawing` in a run of its paragraph.
5
+ * The editor lifts it out into a `textBox` block after that paragraph and
6
+ * leaves a zero-width `textBoxAnchor` where the run was; the save puts the box
7
+ * back at its anchor, wherever the block has ended up. So the anchor, not the
8
+ * block's position, says which paragraph owns the box, and two rules follow:
9
+ *
10
+ * - The box follows its anchor. A paragraph deleted, or its anchor deleted,
11
+ * takes the box with it: a drawing is content of the paragraph it is in.
12
+ * Left behind, the block was saved into whatever paragraph came before it.
13
+ * - The box sits right after its paragraph. The reader lists the box's
14
+ * paragraphs where the block is, and a reopened package puts the block
15
+ * right after the paragraph holding its anchor, so a block written between
16
+ * the two is read in a different order once saved.
17
+ *
18
+ * Only a box placed `inlineWithPrevious` has an anchor: a `standalone` one
19
+ * stands in for a paragraph that held nothing else.
20
+ */
1
21
  import { Node } from "prosemirror-model";
2
22
  import { Transaction } from "prosemirror-state";
3
23
  import { Transform } from "prosemirror-transform";
@@ -1,7 +1,7 @@
1
+ import { ProseMirrorAttrIssue, ReadProseMirrorAttrsResult } from "../../internal/prosemirrorAttrBoundary.js";
2
+ import "../schema/index.js";
1
3
  import { CharacterSpacingAttrs, CharacterStyleAttrs, CommentAttrs, EmphasisMarkAttrs, FontFamilyAttrs, FontSizeAttrs, FootnoteRefAttrs, HighlightAttrs, HyperlinkAttrs, InlineWrapperAttrs, InlineWrapperLayer, LanguageAttrs, RunFormattingOverrideAttrs, RunIdentityMarkAttrs, RunPropertyChangeMarkAttrs, RunShadingAttrs, StrikeAttrs, TextColorAttrs, TextEffectAttrs, TrackedChangeMarkAttrs, TrackedRevisionAncestor, UnderlineAttrs } from "../schema/marks.js";
2
4
  import { BlockCustomXmlAttrs, BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, MathAttrs, PageBreakRunAttrs, ParagraphAttrs, PreservedBlockAttrs, PreservedXmlAttrs, SdtAttrs, ShapeAttrs, SymbolAttrs, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "../schema/nodes.js";
3
- import "../schema/index.js";
4
- import { ProseMirrorAttrIssue, ReadProseMirrorAttrsResult } from "../../internal/prosemirrorAttrBoundary.js";
5
5
  import { Mark, Node } from "prosemirror-model";
6
6
  export declare const readParagraphAttrs: (node: Node) => ReadProseMirrorAttrsResult<Readonly<ParagraphAttrs>>;
7
7
  export declare const expectParagraphAttrs: (node: Node) => Readonly<ParagraphAttrs>;
@@ -979,10 +979,11 @@ const readCommentMarkAttrs = (mark) => {
979
979
  expectMarkType(mark, "comment", issues);
980
980
  requiredNumber(attrs, "commentId", "comment.attrs.commentId", issues);
981
981
  optionalBoolean(attrs, "point", "comment.attrs.point", issues);
982
+ optionalString(attrs, "suggestionId", "comment.attrs.suggestionId", issues);
982
983
  return attrsResult(attrs, issues);
983
984
  };
984
985
  const expectCommentMarkAttrs = (mark) => expectCachedMarkAttrs(mark, commentAttrsCache, readCommentMarkAttrs, "comment attrs");
985
- const isTrackedRevisionAncestorArray = (value) => Array.isArray(value) && value.length > 0 && value.every((ancestor) => isRecord(ancestor) && TRACKED_REVISION_ANCESTOR_TYPES.some((type) => type === ancestor["type"]) && typeof ancestor["revisionId"] === "number" && Number.isSafeInteger(ancestor["revisionId"]) && ancestor["revisionId"] >= 0 && typeof ancestor["author"] === "string" && (ancestor["date"] === void 0 || typeof ancestor["date"] === "string") && (ancestor["utcDate"] === void 0 || typeof ancestor["utcDate"] === "string") && (ancestor["initials"] === void 0 || typeof ancestor["initials"] === "string") && typeof ancestor["outerWrapperCount"] === "number" && Number.isSafeInteger(ancestor["outerWrapperCount"]) && ancestor["outerWrapperCount"] >= 0 && (ancestor["resolutionJoins"] === void 0 || isResolutionJoins(ancestor["resolutionJoins"])));
986
+ const isTrackedRevisionAncestorArray = (value) => Array.isArray(value) && value.length > 0 && value.every((ancestor) => isRecord(ancestor) && TRACKED_REVISION_ANCESTOR_TYPES.some((type) => type === ancestor["type"]) && typeof ancestor["revisionId"] === "number" && Number.isSafeInteger(ancestor["revisionId"]) && ancestor["revisionId"] >= 0 && typeof ancestor["author"] === "string" && (ancestor["date"] === void 0 || typeof ancestor["date"] === "string") && (ancestor["utcDate"] === void 0 || typeof ancestor["utcDate"] === "string") && (ancestor["initials"] === void 0 || typeof ancestor["initials"] === "string") && typeof ancestor["outerWrapperCount"] === "number" && Number.isSafeInteger(ancestor["outerWrapperCount"]) && ancestor["outerWrapperCount"] >= 0 && (ancestor["resolutionJoins"] === void 0 || isResolutionJoins(ancestor["resolutionJoins"])) && (ancestor["suggestionId"] === void 0 || typeof ancestor["suggestionId"] === "string" && ancestor["suggestionId"].length > 0));
986
987
  const readTrackedChangeMarkAttrs = (mark) => {
987
988
  const attrs = attrsRecord(mark.attrs);
988
989
  const issues = [];
@@ -1,3 +1,17 @@
1
+ /**
2
+ * The authored DrawingML transform a drawing node carries.
3
+ *
4
+ * A drawing's `a:xfrm` states a rotation and two flips, and each of them is
5
+ * either absent or a value the author wrote. The editor used to carry all
6
+ * three inside one CSS string (`rotate(90deg) scaleX(-1)`), which can express
7
+ * neither an authored `rot="0"` nor an authored `flipH="0"`: both spell the
8
+ * identity, and the identity is what an absent transform already means. Saving
9
+ * the document then wrote the attribute away.
10
+ *
11
+ * So the node carries the three values as attrs, absent as `null`, and the CSS
12
+ * string stays a projection of them for rendering. {@link authoredTransformAttrs}
13
+ * produces both at once so the two cannot drift apart.
14
+ */
1
15
  import { document_d_exports } from "../types/document.js";
2
16
  /** The transform attrs a drawing node (`image`, `shape`, `textBox`) carries. */
3
17
  type AuthoredTransformAttrs = {
@@ -1,7 +1,7 @@
1
- import { document_d_exports } from "../types/document.js";
2
- import { BookmarkBoundaryAttrs } from "./schema/nodes.js";
3
1
  import { ReadProseMirrorAttrsResult } from "../internal/prosemirrorAttrBoundary.js";
2
+ import { document_d_exports } from "../types/document.js";
4
3
  import "./attrs/index.js";
4
+ import { BookmarkBoundaryAttrs } from "./schema/nodes.js";
5
5
  import { Node } from "prosemirror-model";
6
6
  export declare const isDisplacedByCustomXml: (value: unknown) => value is document_d_exports.DisplacedByCustomXml;
7
7
  /**
@@ -1,3 +1,5 @@
1
+ import "../content-controls/index.js";
2
+ import { SetContentControlValueInput } from "../content-controls/mutateContentControls.js";
1
3
  import { document_d_exports } from "../types/document.js";
2
4
  import { TableCellFormatting, TableFormatting, TableRowFormatting } from "../types/formatting.js";
3
5
  import { Node } from "prosemirror-model";
@@ -26,7 +28,11 @@ export type CanonicalTableEdit = WithoutTableTarget<Exclude<TableIntentOperation
26
28
  type: "setCellProps" | "setRowProps" | "setTableProps";
27
29
  }>>;
28
30
  /** Command meaning before canonical positions are resolved by the session. */
29
- export type CanonicalCommandIntent = {
31
+ export type CanonicalCommandIntent =
32
+ /** The command changes the selection alone and runs as it is. */
33
+ {
34
+ type: "selection";
35
+ } | {
30
36
  type: "formatTable";
31
37
  targets: readonly CanonicalTableFormatTarget[];
32
38
  } | {
@@ -106,10 +112,29 @@ export type CanonicalCommandIntent = {
106
112
  from: number;
107
113
  to: number;
108
114
  breakType: "page" | "textWrapping";
115
+ } | {
116
+ /** A typed control's value: the block control whose open token is at `at`. */
117
+ type: "setContentControlValue";
118
+ at: number;
119
+ input: SetContentControlValueInput;
120
+ } | {
121
+ type: "replaceText";
122
+ from: number;
123
+ to: number;
124
+ text: string;
109
125
  };
110
126
  type CanonicalCommandDescriptor = (state: EditorState) => readonly CanonicalCommandIntent[] | undefined;
111
127
  /** Registration leaves execution and side-effect-free command probes unchanged. */
112
128
  export declare const withCanonicalCommand: (command: Command, descriptor: CanonicalCommandDescriptor) => Command;
129
+ /** A history command's direction through a canonical session's journal. */
130
+ export type CanonicalHistoryDirection = "undo" | "redo";
131
+ /**
132
+ * Register an undo or redo command: on a canonical session it steps the
133
+ * session's own journal, as the undo keys do, instead of running on the view.
134
+ * Registration leaves execution on a default session unchanged.
135
+ */
136
+ export declare const withCanonicalHistory: (command: Command, direction: CanonicalHistoryDirection) => Command;
137
+ export declare const getCanonicalHistoryDirection: (command: Command) => CanonicalHistoryDirection | undefined;
113
138
  export declare const getCanonicalCommandIntents: (command: Command, state: EditorState) => readonly CanonicalCommandIntent[] | undefined;
114
139
  export declare const canonicalRunFormatting: (state: EditorState, patch: RunPropsPatch) => {
115
140
  type: "formatRun";
@@ -6,6 +6,17 @@ const withCanonicalCommand = (command, descriptor) => {
6
6
  descriptors.set(command, descriptor);
7
7
  return command;
8
8
  };
9
+ const historyCommands = /* @__PURE__ */ new WeakMap();
10
+ /**
11
+ * Register an undo or redo command: on a canonical session it steps the
12
+ * session's own journal, as the undo keys do, instead of running on the view.
13
+ * Registration leaves execution on a default session unchanged.
14
+ */
15
+ const withCanonicalHistory = (command, direction) => {
16
+ historyCommands.set(command, direction);
17
+ return command;
18
+ };
19
+ const getCanonicalHistoryDirection = (command) => historyCommands.get(command);
9
20
  const getCanonicalCommandIntents = (command, state) => descriptors.get(command)?.(state);
10
21
  const canonicalRunFormatting = (state, patch) => canonicalSelectionRanges(state).map(({ from, to }) => ({
11
22
  type: "formatRun",
@@ -32,4 +43,4 @@ const withCanonicalStartParagraphFormatting = (command, patch) => withCanonicalC
32
43
  if (paragraph.type.name !== "paragraph") return [];
33
44
  return canonicalParagraphFormatting(state, patch(paragraph));
34
45
  });
35
- export { canonicalRunFormatting, getCanonicalCommandIntents, withCanonicalCommand, withCanonicalParagraphFormatting, withCanonicalStartParagraphFormatting };
46
+ export { canonicalRunFormatting, getCanonicalCommandIntents, getCanonicalHistoryDirection, withCanonicalCommand, withCanonicalHistory, withCanonicalParagraphFormatting, withCanonicalStartParagraphFormatting };
@@ -4,7 +4,7 @@ import { CellSelection } from "prosemirror-tables";
4
4
  /** Document edges denote the first and last editable content gaps. */
5
5
  export declare const canonicalContentPosition: (doc: Node, position: number) => number;
6
6
  /** Whole-document selection addresses paragraph content rather than document edges. */
7
- export declare const canonicalSelectionRange: ({ doc, selection }: EditorState) => {
7
+ export declare const canonicalSelectionRange: ({ doc, selection }: Pick<EditorState, "doc" | "selection">) => {
8
8
  from: number;
9
9
  to: number;
10
10
  };
@@ -1,5 +1,6 @@
1
1
  import { CanonicalCommandIntent } from "./canonicalCommands.js";
2
2
  import { Command, EditorState } from "prosemirror-state";
3
+ import { TableRect } from "prosemirror-tables";
3
4
  /**
4
5
  * What an attribute-only table command does, as table formatting patches.
5
6
  *
@@ -12,10 +13,23 @@ import { Command, EditorState } from "prosemirror-state";
12
13
  export declare const lowerTableAttributeCommand: (command: Command, state: EditorState) => readonly CanonicalCommandIntent[] | undefined;
13
14
  /** Register a command whose whole effect is table, row and cell attributes. */
14
15
  export declare const withCanonicalTableAttributeCommand: (command: Command) => Command;
16
+ /**
17
+ * Register a command whose whole effect is the selection, such as selecting a
18
+ * table, a row or a column: it runs as it is and changes no content. A
19
+ * command that would change the document has no such description.
20
+ */
21
+ export declare const withCanonicalSelectionCommand: (command: Command) => Command;
22
+ /** A paragraph of the table's own, outside the given columns, that addresses it. */
23
+ export declare const tableAnchor: (rect: TableRect, avoid?: {
24
+ left: number;
25
+ right: number;
26
+ }) => number | undefined;
15
27
  export declare const withCanonicalColumnInsertion: (command: Command, side: "left" | "right") => Command;
16
28
  export declare const withCanonicalColumnDeletion: (command: Command) => Command;
17
29
  export declare const withCanonicalCellMerge: (command: Command) => Command;
18
30
  export declare const withCanonicalCellSplit: (command: Command) => Command;
31
+ /** A paragraph of the table's own in the given row. */
32
+ export declare const rowAnchor: (rect: TableRect, row: number) => number | undefined;
19
33
  export declare const withCanonicalRowInsertion: (command: Command, side: "above" | "below") => Command;
20
34
  export declare const withCanonicalRowDeletion: (command: Command) => Command;
21
35
  export declare const withCanonicalTableDeletion: (command: Command) => Command;
@@ -56,7 +56,7 @@ const targetBetween = (scope, before, after, at) => {
56
56
  const firstParagraphPosition = (node, position) => {
57
57
  let found;
58
58
  node.descendants((child, offset) => {
59
- if (found !== void 0 || child.type.name === "table") return false;
59
+ if (found !== void 0 || child.type.name === "table" || child.attrs["_originallyEmpty"] === true) return false;
60
60
  if (child.isTextblock) {
61
61
  found = position + 1 + offset + 1;
62
62
  return false;
@@ -142,6 +142,18 @@ const gridEdit = (before, after, at) => {
142
142
  };
143
143
  /** Register a command whose whole effect is table, row and cell attributes. */
144
144
  const withCanonicalTableAttributeCommand = (command) => withCanonicalCommand(command, (state) => lowerTableAttributeCommand(command, state));
145
+ /**
146
+ * Register a command whose whole effect is the selection, such as selecting a
147
+ * table, a row or a column: it runs as it is and changes no content. A
148
+ * command that would change the document has no such description.
149
+ */
150
+ const withCanonicalSelectionCommand = (command) => withCanonicalCommand(command, (state) => {
151
+ let transaction;
152
+ if (!command(state, (dispatched) => {
153
+ transaction = dispatched;
154
+ }) || transaction === void 0 || transaction.docChanged) return void 0;
155
+ return [{ type: "selection" }];
156
+ });
145
157
  /** A paragraph of the table's own, outside the given columns, that addresses it. */
146
158
  const tableAnchor = (rect, avoid = {
147
159
  left: 0,
@@ -212,7 +224,7 @@ const deleteColumns = (rect) => {
212
224
  });
213
225
  return intents;
214
226
  };
215
- const mergeCells$1 = (rect) => {
227
+ const mergeCells = (rect) => {
216
228
  const at = tableAnchor(rect);
217
229
  if (at === void 0) return void 0;
218
230
  return [{
@@ -228,7 +240,7 @@ const mergeCells$1 = (rect) => {
228
240
  }];
229
241
  };
230
242
  /** The cell at the selection's top left, addressed by its own paragraph. */
231
- const splitCell$1 = (rect) => {
243
+ const splitCell = (rect) => {
232
244
  const offset = rect.map.map[rect.top * rect.map.width + rect.left];
233
245
  const cell = offset === void 0 ? null : rect.table.nodeAt(offset);
234
246
  if (offset === void 0 || cell === null) return void 0;
@@ -242,8 +254,8 @@ const splitCell$1 = (rect) => {
242
254
  };
243
255
  const withCanonicalColumnInsertion = (command, side) => withCanonicalTableStructureCommand(command, insertColumn(side));
244
256
  const withCanonicalColumnDeletion = (command) => withCanonicalTableStructureCommand(command, deleteColumns);
245
- const withCanonicalCellMerge = (command) => withCanonicalTableStructureCommand(command, mergeCells$1);
246
- const withCanonicalCellSplit = (command) => withCanonicalTableStructureCommand(command, splitCell$1);
257
+ const withCanonicalCellMerge = (command) => withCanonicalTableStructureCommand(command, mergeCells);
258
+ const withCanonicalCellSplit = (command) => withCanonicalTableStructureCommand(command, splitCell);
247
259
  /** A paragraph of the table's own in the given row. */
248
260
  const rowAnchor = (rect, row) => {
249
261
  const { map, table, tableStart } = rect;
@@ -359,4 +371,4 @@ const withCanonicalTableInsertion = (command) => withCanonicalCommand(command, (
359
371
  }
360
372
  }];
361
373
  });
362
- export { lowerTableAttributeCommand, withCanonicalCellMerge, withCanonicalCellSplit, withCanonicalColumnDeletion, withCanonicalColumnInsertion, withCanonicalRowDeletion, withCanonicalRowInsertion, withCanonicalTableAttributeCommand, withCanonicalTableDeletion, withCanonicalTableInsertion };
374
+ export { lowerTableAttributeCommand, rowAnchor, tableAnchor, withCanonicalCellMerge, withCanonicalCellSplit, withCanonicalColumnDeletion, withCanonicalColumnInsertion, withCanonicalRowDeletion, withCanonicalRowInsertion, withCanonicalSelectionCommand, withCanonicalTableAttributeCommand, withCanonicalTableDeletion, withCanonicalTableInsertion };
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Drag-to-select table cells, shared by the React and Vue pages-pointer
3
+ * handlers. A pointer drag that starts inside a table cell and crosses into
4
+ * another cell is promoted from a text selection to a prosemirror-tables
5
+ * `CellSelection` (so multi-cell ops — delete row/column, fill, merge — become
6
+ * reachable by dragging). Pure `(view, pmPos, clientX) → boolean` logic; the
7
+ * adapters own the DOM event wiring and the active-view resolution (body vs
8
+ * header/footer).
9
+ */
1
10
  import { EditorView } from "prosemirror-view";
2
11
  /**
3
12
  * @deprecated No longer used. The tracker ignores pointer overflow so same-cell