@stll/folio-core 0.69.0 → 0.71.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 (1087) 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 +1595 -193
  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 +20 -9
  26. package/dist/ai-edits/newListNumbering.js +25 -10
  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 +481 -20
  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/{controller → canonical}/canonicalLockGuard.d.ts +12 -1
  82. package/dist/{controller → canonical}/canonicalLockGuard.js +96 -21
  83. package/dist/{controller → canonical}/canonicalOperations.js +1 -1
  84. package/dist/{controller → canonical}/canonicalProjectionBlocks.d.ts +11 -1
  85. package/dist/{controller → canonical}/canonicalProjectionBlocks.js +8 -4
  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/{controller → canonical}/canonicalSeedContent.js +53 -5
  98. package/dist/{controller → canonical}/canonicalSelection.js +1 -1
  99. package/dist/{controller → canonical}/canonicalSession.d.ts +245 -12
  100. package/dist/{controller → canonical}/canonicalSession.js +1111 -173
  101. package/dist/canonical/canonicalSourceNormalization.d.ts +42 -0
  102. package/dist/{controller → canonical}/canonicalSourceNormalization.js +41 -23
  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/derivedFields.d.ts +12 -0
  113. package/dist/canonical/derivedFields.js +111 -0
  114. package/dist/canonical/paragraphPatchAsRead.d.ts +19 -0
  115. package/dist/canonical/paragraphPatchAsRead.js +32 -0
  116. package/dist/canonical/propertySourcePreservation.d.ts +38 -0
  117. package/dist/canonical/propertySourcePreservation.js +129 -0
  118. package/dist/canonical/replacementRunSources.d.ts +29 -0
  119. package/dist/canonical/replacementRunSources.js +78 -0
  120. package/dist/compare/compare.d.ts +8 -6
  121. package/dist/compare/compare.js +37 -8
  122. package/dist/compare/content-alignment.d.ts +10 -1
  123. package/dist/compare/content-alignment.js +188 -27
  124. package/dist/compare/content.d.ts +9 -1
  125. package/dist/compare/content.js +2 -2
  126. package/dist/compare/formatting.d.ts +1 -0
  127. package/dist/compare/import-style-closure.d.ts +1 -1
  128. package/dist/compare/inline-atom-alignment.d.ts +83 -0
  129. package/dist/compare/inline-atom-alignment.js +173 -0
  130. package/dist/compare/inline-atoms-model.d.ts +65 -0
  131. package/dist/compare/inline-atoms-model.js +1131 -0
  132. package/dist/compare/inline-atoms.d.ts +4 -4
  133. package/dist/compare/inline-atoms.js +28 -139
  134. package/dist/compare/inline-provenance-model.d.ts +37 -0
  135. package/dist/compare/inline-provenance-model.js +138 -0
  136. package/dist/compare/inline-provenance.d.ts +52 -4
  137. package/dist/compare/inline-provenance.js +40 -7
  138. package/dist/compare/plan.d.ts +38 -4
  139. package/dist/compare/plan.js +22 -8
  140. package/dist/compare/scenario.d.ts +22 -1
  141. package/dist/compare/section-boundary-properties.d.ts +38 -5
  142. package/dist/compare/section-boundary-properties.js +164 -48
  143. package/dist/compare/style-resources.d.ts +3 -2
  144. package/dist/compare/style-resources.js +5 -4
  145. package/dist/compare/types.d.ts +5 -2
  146. package/dist/compare/verification.d.ts +24 -3
  147. package/dist/compare/verification.js +25 -18
  148. package/dist/compat/eigenpal.d.ts +33 -31
  149. package/dist/compat/eigenpal.js +3 -5
  150. package/dist/content-controls/findContentControls.d.ts +9 -0
  151. package/dist/content-controls/index.d.ts +8 -0
  152. package/dist/content-controls/mutateContentControls.d.ts +9 -0
  153. package/dist/controller/activeEditorStory.d.ts +1 -0
  154. package/dist/controller/anonymizationHighlights.d.ts +56 -0
  155. package/dist/controller/anonymizationHighlights.js +148 -0
  156. package/dist/controller/autocompleteSuggestion.d.ts +85 -0
  157. package/dist/controller/autocompleteSuggestion.js +213 -0
  158. package/dist/controller/canonicalClipboard.d.ts +2 -2
  159. package/dist/controller/canonicalClipboard.js +34 -14
  160. package/dist/controller/canonicalClipboardResources.js +9 -4
  161. package/dist/controller/canonicalCollaboration.d.ts +147 -0
  162. package/dist/controller/canonicalCollaboration.js +360 -0
  163. package/dist/controller/canonicalComposition.d.ts +7 -1
  164. package/dist/controller/canonicalComposition.js +14 -8
  165. package/dist/controller/canonicalContentControlValue.d.ts +17 -0
  166. package/dist/controller/canonicalContentControlValue.js +72 -0
  167. package/dist/controller/canonicalIndexedDbJournal.d.ts +6 -0
  168. package/dist/controller/canonicalIndexedDbJournal.js +80 -0
  169. package/dist/controller/canonicalInput.d.ts +13 -2
  170. package/dist/controller/canonicalInput.js +96 -11
  171. package/dist/controller/canonicalPresence.d.ts +63 -0
  172. package/dist/controller/canonicalPresence.js +125 -0
  173. package/dist/controller/canonicalReview.d.ts +1 -1
  174. package/dist/controller/canonicalReview.js +1 -1
  175. package/dist/controller/canonicalRoomAuthority.d.ts +66 -0
  176. package/dist/controller/canonicalRoomAuthority.js +119 -0
  177. package/dist/controller/canonicalRoomEditor.d.ts +87 -0
  178. package/dist/controller/canonicalRoomEditor.js +98 -0
  179. package/dist/controller/canonicalRoomTransport.d.ts +79 -0
  180. package/dist/controller/canonicalRoomTransport.js +104 -0
  181. package/dist/controller/canonicalRoomWire.d.ts +80 -0
  182. package/dist/controller/canonicalRoomWire.js +155 -0
  183. package/dist/controller/canonicalStoryEditor.d.ts +12 -0
  184. package/dist/controller/canonicalStoryEditor.js +39 -7
  185. package/dist/controller/canonicalStructure.d.ts +15 -5
  186. package/dist/controller/canonicalStructure.js +95 -34
  187. package/dist/controller/canonicalTabRoom.d.ts +91 -0
  188. package/dist/controller/canonicalTabRoom.js +553 -0
  189. package/dist/controller/canonicalYjsRoom.d.ts +102 -0
  190. package/dist/controller/canonicalYjsRoom.js +454 -0
  191. package/dist/controller/contentControlWidgetController.d.ts +16 -0
  192. package/dist/controller/contentControlWidgetController.js +7 -1
  193. package/dist/controller/documentChangeNotification.d.ts +5 -0
  194. package/dist/controller/documentChangeNotification.js +7 -0
  195. package/dist/controller/folioEditor.d.ts +12 -4
  196. package/dist/controller/folioEditor.js +19 -1
  197. package/dist/controller/folioEditorEvents.d.ts +1 -1
  198. package/dist/controller/fontReadiness.d.ts +14 -1
  199. package/dist/controller/fontReadiness.js +4 -4
  200. package/dist/controller/headerFooterEditorManager.d.ts +13 -7
  201. package/dist/controller/headerFooterEditorManager.js +24 -25
  202. package/dist/controller/hiddenEditorApi.d.ts +94 -13
  203. package/dist/controller/hiddenEditorApi.js +42 -3
  204. package/dist/controller/hiddenEditorManager.d.ts +65 -17
  205. package/dist/controller/hiddenEditorManager.js +473 -78
  206. package/dist/controller/hyphenationReadiness.d.ts +10 -0
  207. package/dist/controller/layoutPipeline.d.ts +14 -12
  208. package/dist/controller/layoutPipeline.js +64 -53
  209. package/dist/controller/layoutSession.d.ts +7 -6
  210. package/dist/controller/legacyTextAddress.d.ts +9 -0
  211. package/dist/controller/legacyTextAddress.js +52 -0
  212. package/dist/controller/noteEditorManager.d.ts +14 -7
  213. package/dist/controller/noteEditorManager.js +33 -32
  214. package/dist/controller/textPositionLookup.d.ts +24 -0
  215. package/dist/controller/textPositionLookup.js +78 -0
  216. package/dist/display-list/build/buildContext.d.ts +11 -0
  217. package/dist/display-list/build/buildDisplayList.d.ts +14 -1
  218. package/dist/display-list/build/colors.d.ts +8 -0
  219. package/dist/display-list/build/floatingImages.d.ts +10 -0
  220. package/dist/display-list/build/fontTable.d.ts +8 -0
  221. package/dist/display-list/build/furniture.d.ts +14 -2
  222. package/dist/display-list/build/glyphs.d.ts +7 -0
  223. package/dist/display-list/build/headerFooterPrimitives.d.ts +13 -0
  224. package/dist/display-list/build/imagePrimitives.d.ts +10 -0
  225. package/dist/display-list/build/pageBorderPrimitives.d.ts +16 -2
  226. package/dist/display-list/build/pageFurniture.d.ts +13 -0
  227. package/dist/display-list/build/paragraphPrimitives.d.ts +18 -0
  228. package/dist/display-list/build/paragraphPrimitives.js +17 -5
  229. package/dist/display-list/build/previewPrimitives.d.ts +14 -0
  230. package/dist/display-list/build/regions.d.ts +14 -0
  231. package/dist/display-list/build/storyPrimitives.d.ts +16 -0
  232. package/dist/display-list/build/strokes.d.ts +21 -3
  233. package/dist/display-list/build/strokes.js +2 -3
  234. package/dist/display-list/build/tablePrimitives.d.ts +15 -1
  235. package/dist/display-list/build/tablePrimitives.js +92 -55
  236. package/dist/display-list/build/textBoxPrimitives.d.ts +6 -0
  237. package/dist/display-list/build/unsupported.d.ts +10 -0
  238. package/dist/display-list/build/watermarkPrimitives.d.ts +15 -1
  239. package/dist/display-list/dom/renderDisplayListToDom.d.ts +33 -0
  240. package/dist/display-list/dom/renderDisplayListToDom.js +12 -4
  241. package/dist/display-list/editor/displayListPagePainter.d.ts +29 -1
  242. package/dist/display-list/editor/pageRenderer.d.ts +7 -0
  243. package/dist/display-list/html/renderDisplayListToHtml.d.ts +10 -0
  244. package/dist/display-list/primitives.d.ts +12 -1
  245. package/dist/display-list/selectDisplayPages.d.ts +8 -0
  246. package/dist/display-list/types.d.ts +11 -0
  247. package/dist/document-operations.d.ts +35 -5
  248. package/dist/document-operations.js +178 -40
  249. package/dist/docx/attributeRemainder.d.ts +35 -1
  250. package/dist/docx/automaticNoteMarkImport.d.ts +12 -0
  251. package/dist/docx/automaticNoteMarkImport.js +41 -0
  252. package/dist/docx/blockContentParser.d.ts +14 -5
  253. package/dist/docx/blockContentParser.js +19 -0
  254. package/dist/docx/blockPlainText.d.ts +14 -0
  255. package/dist/docx/blockPlainText.js +55 -4
  256. package/dist/docx/bookmarkParser.d.ts +17 -0
  257. package/dist/docx/bookmarkRangeJoin.d.ts +14 -0
  258. package/dist/docx/borderParser.d.ts +11 -0
  259. package/dist/docx/builtInStyles.d.ts +44 -1
  260. package/dist/docx/canonicalSave.d.ts +14 -4
  261. package/dist/docx/canonicalSave.js +128 -30
  262. package/dist/docx/canonicalSessionInput.d.ts +59 -4
  263. package/dist/docx/canonicalSessionInput.js +147 -6
  264. package/dist/docx/canonicalStoryRepack.d.ts +1 -0
  265. package/dist/docx/canonicalStoryRepack.js +2 -2
  266. package/dist/docx/chartPreview.js +10 -9
  267. package/dist/docx/commentAnchorIndex.d.ts +33 -7
  268. package/dist/docx/commentAnchorIndex.js +162 -36
  269. package/dist/docx/commentIdNormalization.d.ts +14 -0
  270. package/dist/docx/commentParagraphIds.d.ts +17 -0
  271. package/dist/docx/commentParagraphIds.js +79 -0
  272. package/dist/docx/commentParser.d.ts +20 -1
  273. package/dist/docx/commentParser.js +5 -0
  274. package/dist/docx/commentRangeIntegrity.js +27 -11
  275. package/dist/docx/commentRangeJoin.d.ts +21 -1
  276. package/dist/docx/commentRangeJoin.js +5 -1
  277. package/dist/docx/commentReferenceCompletion.d.ts +29 -2
  278. package/dist/docx/commentReferenceCompletion.js +4 -3
  279. package/dist/docx/commentReferenceNormalization.d.ts +17 -0
  280. package/dist/docx/commentReferenceNormalization.js +484 -49
  281. package/dist/docx/commentReplyMarkers.d.ts +22 -0
  282. package/dist/docx/compatibility.d.ts +10 -0
  283. package/dist/docx/containerChildren.d.ts +26 -1
  284. package/dist/docx/containerChildren.js +29 -3
  285. package/dist/docx/contentTypeRegistry.d.ts +16 -0
  286. package/dist/docx/contentTypeRegistry.js +48 -20
  287. package/dist/docx/danglingRelationshipReferences.d.ts +13 -0
  288. package/dist/docx/defaultParagraphStyle.d.ts +14 -1
  289. package/dist/docx/documentClone.d.ts +3 -2
  290. package/dist/docx/documentClone.js +1 -1
  291. package/dist/docx/documentParser.d.ts +28 -3
  292. package/dist/docx/documentParser.js +71 -4
  293. package/dist/docx/drawingAnchor.d.ts +17 -0
  294. package/dist/docx/drawingGroupChildren.d.ts +12 -0
  295. package/dist/docx/drawingIdNormalization.d.ts +8 -0
  296. package/dist/docx/drawingIdNormalization.js +46 -1
  297. package/dist/docx/drawingUtils.d.ts +6 -0
  298. package/dist/docx/drawingUtils.js +2 -2
  299. package/dist/docx/encryption/agileDecryption.d.ts +7 -0
  300. package/dist/docx/ensureParaIds.d.ts +73 -0
  301. package/dist/docx/ensureParaIds.js +299 -59
  302. package/dist/docx/ensureUniqueControlIds.js +10 -3
  303. package/dist/docx/ensureUniqueRevisionIds.d.ts +28 -0
  304. package/dist/docx/ensureUniqueRevisionIds.js +140 -0
  305. package/dist/docx/fieldParser.d.ts +27 -2
  306. package/dist/docx/fieldState.d.ts +15 -0
  307. package/dist/docx/fieldWrapperCaptures.d.ts +18 -0
  308. package/dist/docx/fieldWrapperCaptures.js +117 -0
  309. package/dist/docx/foldedListNumberFields.d.ts +14 -0
  310. package/dist/docx/fontTableParser.d.ts +11 -0
  311. package/dist/docx/footnoteParser.d.ts +24 -3
  312. package/dist/docx/footnoteParser.js +29 -6
  313. package/dist/docx/graphicFrameLocks.d.ts +9 -1
  314. package/dist/docx/groupDrawingParser.d.ts +2 -2
  315. package/dist/docx/headerFooterParser.d.ts +37 -5
  316. package/dist/docx/headerFooterParser.js +18 -4
  317. package/dist/docx/headerFooterRefParser.d.ts +7 -0
  318. package/dist/docx/hostCommentThreads.d.ts +10 -1
  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 -142
  331. package/dist/docx/listNumberingInstances.d.ts +38 -8
  332. package/dist/docx/listNumberingInstances.js +89 -42
  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/numberingParser.d.ts +12 -0
  348. package/dist/docx/numberingReference.d.ts +10 -0
  349. package/dist/docx/numberingReferenceNormalization.d.ts +15 -0
  350. package/dist/docx/packageRelationshipsRoot.d.ts +24 -0
  351. package/dist/docx/packageRelationshipsRoot.js +28 -0
  352. package/dist/docx/packageUnnamedParagraphIds.d.ts +18 -0
  353. package/dist/docx/packageUnnamedParagraphIds.js +78 -0
  354. package/dist/docx/paraIdAttribute.d.ts +15 -0
  355. package/dist/docx/paragraphParser.d.ts +15 -3
  356. package/dist/docx/paragraphParser.js +126 -140
  357. package/dist/docx/paragraphProperties.d.ts +15 -1
  358. package/dist/docx/paragraphProperties.js +3 -5
  359. package/dist/docx/paragraphPropertySource.d.ts +55 -21
  360. package/dist/docx/paragraphPropertySource.js +183 -40
  361. package/dist/docx/paragraphTextBoxEnrichment.d.ts +3 -2
  362. package/dist/docx/paragraphTraversal.d.ts +39 -4
  363. package/dist/docx/paragraphTraversal.js +158 -42
  364. package/dist/docx/parseContext.d.ts +15 -0
  365. package/dist/docx/parseWarningMessage.d.ts +9 -0
  366. package/dist/docx/parseWarningMessage.js +7 -0
  367. package/dist/docx/parser.d.ts +1 -1
  368. package/dist/docx/parser.js +103 -29
  369. package/dist/docx/parserEnums.d.ts +21 -0
  370. package/dist/docx/partRelationships.d.ts +15 -0
  371. package/dist/docx/partRelationships.js +58 -0
  372. package/dist/docx/preservedRunContent.d.ts +2 -1
  373. package/dist/docx/preservedRunContent.js +40 -1
  374. package/dist/docx/previewBudget.d.ts +31 -0
  375. package/dist/docx/relsParser.d.ts +23 -0
  376. package/dist/docx/removeHeaderFooterParts.d.ts +1 -1
  377. package/dist/docx/replyToComment.d.ts +22 -1
  378. package/dist/docx/replyToComment.js +25 -21
  379. package/dist/docx/reviewResolutionProvenance.d.ts +32 -5
  380. package/dist/docx/reviewResolutionProvenance.js +229 -38
  381. package/dist/docx/rezip.d.ts +58 -11
  382. package/dist/docx/rezip.js +367 -101
  383. package/dist/docx/runConsolidator.d.ts +13 -0
  384. package/dist/docx/runParser.d.ts +4 -3
  385. package/dist/docx/runParser.js +27 -6
  386. package/dist/docx/runPayload.d.ts +29 -0
  387. package/dist/docx/saveDiagnostics.d.ts +3 -5
  388. package/dist/docx/sdtProperties.d.ts +17 -0
  389. package/dist/docx/sdtPropertiesPatch.d.ts +14 -0
  390. package/dist/docx/sectionParser.d.ts +21 -0
  391. package/dist/docx/sectionParser.js +1 -6
  392. package/dist/docx/selectiveSave.js +271 -80
  393. package/dist/docx/selectiveXmlPatch.d.ts +36 -1
  394. package/dist/docx/selectiveXmlPatch.js +342 -78
  395. package/dist/docx/serializer/blockSdtSerializer.d.ts +10 -0
  396. package/dist/docx/serializer/borderSerializer.d.ts +8 -0
  397. package/dist/docx/serializer/commentSerializer.d.ts +12 -1
  398. package/dist/docx/serializer/commentSerializer.js +1 -1
  399. package/dist/docx/serializer/documentSerializer.d.ts +21 -3
  400. package/dist/docx/serializer/documentSerializer.js +44 -6
  401. package/dist/docx/serializer/groupTextBoxWriteBack.d.ts +14 -0
  402. package/dist/docx/serializer/headerFooterSerializer.d.ts +11 -0
  403. package/dist/docx/serializer/markupRangeAttributes.d.ts +8 -0
  404. package/dist/docx/serializer/markupRangeAttributes.js +3 -1
  405. package/dist/docx/serializer/noteSerializer.d.ts +21 -0
  406. package/dist/docx/serializer/numberingSerializer.d.ts +14 -0
  407. package/dist/docx/serializer/paragraphSerializer.d.ts +11 -0
  408. package/dist/docx/serializer/paragraphSerializer.js +21 -9
  409. package/dist/docx/serializer/partNamespaces.d.ts +2 -0
  410. package/dist/docx/serializer/partNamespaces.js +3 -1
  411. package/dist/docx/serializer/runSerializer.js +12 -3
  412. package/dist/docx/serializer/sdtPropertiesSerializer.d.ts +15 -0
  413. package/dist/docx/serializer/stylesSerializer.d.ts +26 -1
  414. package/dist/docx/serializer/stylesSerializer.js +111 -23
  415. package/dist/docx/serializer/tableSerializer.js +9 -7
  416. package/dist/docx/serializer/themeSerializer.d.ts +2 -1
  417. package/dist/docx/server/applyDocxXmlPatchProposal.js +1 -1
  418. package/dist/docx/server/build.d.ts +2 -2
  419. package/dist/docx/server/changeListFormat.d.ts +20 -0
  420. package/dist/docx/server/changeListFormat.js +102 -0
  421. package/dist/docx/server/createBilingualDocument.d.ts +21 -0
  422. package/dist/docx/server/materializeYjsDocx.js +2 -2
  423. package/dist/docx/server/migrateYjsAttrSchema.js +5 -5
  424. package/dist/docx/sessionListPruning.d.ts +11 -0
  425. package/dist/docx/settingsParser.d.ts +10 -0
  426. package/dist/docx/shadingParser.d.ts +10 -0
  427. package/dist/docx/shapeAlternateContent.js +9 -2
  428. package/dist/docx/shapeParser.d.ts +27 -0
  429. package/dist/docx/splitRevisionPieces.d.ts +1 -1
  430. package/dist/docx/storyBlockReplay.d.ts +37 -3
  431. package/dist/docx/storyBlockReplay.js +277 -68
  432. package/dist/docx/strictNames.d.ts +12 -1
  433. package/dist/docx/strictValueEncodings.gen.d.ts +9 -0
  434. package/dist/docx/structuralXmlPatch.d.ts +19 -3
  435. package/dist/docx/structuralXmlPatch.js +136 -53
  436. package/dist/docx/styleParser.d.ts +20 -3
  437. package/dist/docx/styleParser.js +3 -2
  438. package/dist/docx/tableLook.d.ts +15 -1
  439. package/dist/docx/tableParser.d.ts +17 -6
  440. package/dist/docx/tableParser.js +10 -5
  441. package/dist/docx/textBoxContentParser.d.ts +3 -2
  442. package/dist/docx/textBoxParser.d.ts +30 -3
  443. package/dist/docx/themeColorAttribute.d.ts +11 -0
  444. package/dist/docx/themeParser.d.ts +17 -5
  445. package/dist/docx/trackedMoveRangeNormalization.d.ts +9 -0
  446. package/dist/docx/trackedMoveRangeNormalization.js +40 -16
  447. package/dist/docx/transitionalSpelling.d.ts +9 -0
  448. package/dist/docx/unnamedParagraphIds.d.ts +33 -0
  449. package/dist/docx/unnamedParagraphIds.js +43 -0
  450. package/dist/docx/unreferencedHeaderFooters.d.ts +27 -0
  451. package/dist/docx/unreferencedHeaderFooters.js +130 -0
  452. package/dist/docx/unzip.d.ts +25 -0
  453. package/dist/docx/verbatimCapture.d.ts +18 -0
  454. package/dist/docx/verbatimCapture.js +76 -9
  455. package/dist/docx/vmlImageParser.d.ts +32 -1
  456. package/dist/docx/watermarkParser.d.ts +21 -0
  457. package/dist/docx/wrapPolygon.d.ts +11 -0
  458. package/dist/docx/wrapTypes.d.ts +6 -0
  459. package/dist/docx/xmlParser.d.ts +22 -18
  460. package/dist/docx/xmlParser.js +1 -18
  461. package/dist/docx/xmlRootInsertion.d.ts +8 -0
  462. package/dist/docx/xmlRootInsertion.js +28 -0
  463. package/dist/docx/xmlSafety.d.ts +1 -0
  464. package/dist/docx/xmlSafety.js +7 -11
  465. package/dist/export-pdf.d.ts +24 -1
  466. package/dist/fields/resolveFieldValues.js +2 -1
  467. package/dist/fonts/fontsourceFaces.d.ts +2 -2
  468. package/dist/fonts/headlessMeasure.d.ts +16 -0
  469. package/dist/generated/text_shaper.js +71 -59
  470. package/dist/generated/text_shaper_bg.wasm +0 -0
  471. package/dist/headless-layout.d.ts +36 -5
  472. package/dist/headless-layout.js +19 -4
  473. package/dist/i18n/messages/ar.gen.js +1 -0
  474. package/dist/i18n/messages/catalogs.gen.d.ts +17 -0
  475. package/dist/i18n/messages/catalogs.gen.js +17 -0
  476. package/dist/i18n/messages/cs.gen.js +1 -0
  477. package/dist/i18n/messages/de.gen.js +1 -0
  478. package/dist/i18n/messages/en.gen.js +1 -0
  479. package/dist/i18n/messages/es.gen.js +1 -0
  480. package/dist/i18n/messages/et.gen.js +1 -0
  481. package/dist/i18n/messages/fr.gen.js +1 -0
  482. package/dist/i18n/messages/he.gen.js +1 -0
  483. package/dist/i18n/messages/hi.gen.js +1 -0
  484. package/dist/i18n/messages/hu.gen.js +1 -0
  485. package/dist/i18n/messages/lt.gen.js +1 -0
  486. package/dist/i18n/messages/lv.gen.js +1 -0
  487. package/dist/i18n/messages/messages.gen.d.ts +1 -0
  488. package/dist/i18n/messages/pl.gen.js +1 -0
  489. package/dist/i18n/messages/pt-BR.gen.js +1 -0
  490. package/dist/i18n/messages/sk.gen.js +1 -0
  491. package/dist/i18n/messages/tr.gen.js +1 -0
  492. package/dist/i18n/messages/zh-CN.gen.js +1 -0
  493. package/dist/index.d.ts +34 -31
  494. package/dist/index.js +3 -4
  495. package/dist/internal/canonicalOperationStaging.d.ts +2 -0
  496. package/dist/internal/canonicalOperationStaging.js +4 -0
  497. package/dist/internal/canonicalTyping.d.ts +9 -0
  498. package/dist/internal/canonicalTyping.js +7 -0
  499. package/dist/internal/compare/inline-presentation.d.ts +8 -0
  500. package/dist/internal/indexedPositionMap.js +2 -1
  501. package/dist/internal/revisionResolutionInline.js +13 -13
  502. package/dist/internal/revisionResolutionStep.js +1 -0
  503. package/dist/internal/revisionResolutionTracking.js +2 -1
  504. package/dist/internal/wholeStoryRevisionResolution.d.ts +1 -1
  505. package/dist/internal/wholeStoryRevisionResolution.js +57 -66
  506. package/dist/layout-bridge/cellSelectionHighlight.d.ts +8 -0
  507. package/dist/layout-bridge/convert/altChunkPlaceholder.d.ts +7 -0
  508. package/dist/layout-bridge/convert/editingFont.d.ts +26 -0
  509. package/dist/layout-bridge/convert/editingFont.js +42 -0
  510. package/dist/layout-bridge/convert/endnoteLayout.d.ts +19 -1
  511. package/dist/layout-bridge/convert/flowBlockPostprocessing.d.ts +5 -0
  512. package/dist/layout-bridge/convert/flowBorders.d.ts +10 -4
  513. package/dist/layout-bridge/convert/flowBorders.js +13 -1
  514. package/dist/layout-bridge/convert/flowConversionShared.d.ts +27 -12
  515. package/dist/layout-bridge/convert/flowConversionShared.js +36 -11
  516. package/dist/layout-bridge/convert/footnoteLayout.d.ts +12 -4
  517. package/dist/layout-bridge/convert/footnoteLayout.js +3 -1
  518. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +25 -5
  519. package/dist/layout-bridge/convert/imageConversion.d.ts +5 -1
  520. package/dist/layout-bridge/convert/listMarkers.d.ts +12 -7
  521. package/dist/layout-bridge/convert/markupViewFlow.d.ts +21 -0
  522. package/dist/layout-bridge/convert/markupViewFlow.js +4 -1
  523. package/dist/layout-bridge/convert/noteReferences.d.ts +4 -0
  524. package/dist/layout-bridge/convert/pageBreakSplitting.d.ts +4 -0
  525. package/dist/layout-bridge/convert/paragraphAttrs.d.ts +13 -8
  526. package/dist/layout-bridge/convert/paragraphAttrs.js +1 -1
  527. package/dist/layout-bridge/convert/paragraphBlockCache.d.ts +10 -0
  528. package/dist/layout-bridge/convert/paragraphBlockCache.js +3 -10
  529. package/dist/layout-bridge/convert/paragraphConversion.d.ts +8 -4
  530. package/dist/layout-bridge/convert/paragraphFrames.d.ts +2 -4
  531. package/dist/layout-bridge/convert/paragraphFrames.js +4 -4
  532. package/dist/layout-bridge/convert/paragraphMarkFormatting.d.ts +13 -4
  533. package/dist/layout-bridge/convert/paragraphRuns.d.ts +5 -0
  534. package/dist/layout-bridge/convert/paragraphRuns.js +18 -4
  535. package/dist/layout-bridge/convert/runFormattingMerge.d.ts +10 -4
  536. package/dist/layout-bridge/convert/runMarkFormatting.d.ts +8 -3
  537. package/dist/layout-bridge/convert/runMarkFormatting.js +3 -5
  538. package/dist/layout-bridge/convert/sectionBoundaries.d.ts +4 -0
  539. package/dist/layout-bridge/convert/tableConversion.d.ts +15 -5
  540. package/dist/layout-bridge/convert/tableConversion.js +40 -19
  541. package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +38 -1
  542. package/dist/layout-bridge/convert/textBoxFill.d.ts +7 -2
  543. package/dist/layout-bridge/convert/textFormattingConversion.d.ts +18 -12
  544. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +8 -2
  545. package/dist/layout-bridge/convert/toFlowBlocks.js +67 -14
  546. package/dist/layout-bridge/convert/topLevelConversion.d.ts +26 -4
  547. package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +10 -0
  548. package/dist/layout-bridge/dom/clickToPositionDom.js +4 -4
  549. package/dist/layout-bridge/dom/noteStoryDom.d.ts +1 -0
  550. package/dist/layout-bridge/engine/blockIndex.d.ts +3 -0
  551. package/dist/layout-bridge/engine/clickToPosition.d.ts +9 -0
  552. package/dist/layout-bridge/engine/hitTest.d.ts +6 -0
  553. package/dist/layout-bridge/engine/hitTest.js +3 -3
  554. package/dist/layout-bridge/engine/measuring/index.d.ts +20 -8
  555. package/dist/layout-bridge/engine/selectionRects.d.ts +9 -0
  556. package/dist/layout-bridge/headerFooterLayout.d.ts +12 -0
  557. package/dist/layout-bridge/headerFooterLayout.js +3 -3
  558. package/dist/layout-bridge/sectionColumns.d.ts +10 -1
  559. package/dist/layout-engine/footnoteContinuation.d.ts +8 -0
  560. package/dist/layout-engine/imageLayout.d.ts +4 -1
  561. package/dist/layout-engine/index.d.ts +10 -5
  562. package/dist/layout-engine/index.js +9 -3
  563. package/dist/layout-engine/keep-together.d.ts +6 -0
  564. package/dist/layout-engine/layoutFlowShared.d.ts +4 -0
  565. package/dist/layout-engine/layoutInstrumentation.d.ts +40 -1
  566. package/dist/layout-engine/layoutInstrumentation.js +26 -4
  567. package/dist/layout-engine/lineFlow.d.ts +1 -0
  568. package/dist/layout-engine/lineFlow.js +4 -1
  569. package/dist/layout-engine/measure/advanceComposition.d.ts +14 -1
  570. package/dist/layout-engine/measure/automaticTextSpacing.d.ts +1 -1
  571. package/dist/layout-engine/measure/cache.d.ts +6 -0
  572. package/dist/layout-engine/measure/cache.js +3 -0
  573. package/dist/layout-engine/measure/crossRunWords.d.ts +1 -1
  574. package/dist/layout-engine/measure/floatingLineClearance.d.ts +4 -0
  575. package/dist/layout-engine/measure/floatingTablePosition.d.ts +32 -1
  576. package/dist/layout-engine/measure/floatingTablePosition.js +49 -1
  577. package/dist/layout-engine/measure/font-metrics.worker.d.ts +16 -0
  578. package/dist/layout-engine/measure/hyphenationDictionaries.d.ts +18 -0
  579. package/dist/layout-engine/measure/hyphenationPreload.d.ts +4 -0
  580. package/dist/layout-engine/measure/index.d.ts +18 -8
  581. package/dist/layout-engine/measure/index.js +2 -1
  582. package/dist/layout-engine/measure/inlineObjectMetrics.d.ts +4 -0
  583. package/dist/layout-engine/measure/justification.d.ts +5 -1
  584. package/dist/layout-engine/measure/lineFitting.d.ts +6 -1
  585. package/dist/layout-engine/measure/lineTypography.d.ts +6 -1
  586. package/dist/layout-engine/measure/listMarkerWidth.d.ts +16 -1
  587. package/dist/layout-engine/measure/measureBlocks.d.ts +4 -1
  588. package/dist/layout-engine/measure/measureBlocks.js +127 -102
  589. package/dist/layout-engine/measure/measureContainer.d.ts +17 -0
  590. package/dist/layout-engine/measure/measureHelpers.d.ts +10 -1
  591. package/dist/layout-engine/measure/measureParagraph.d.ts +7 -1
  592. package/dist/layout-engine/measure/measureParagraph.js +51 -21
  593. package/dist/layout-engine/measure/measureProvider.d.ts +10 -0
  594. package/dist/layout-engine/measure/measureTypes.d.ts +8 -0
  595. package/dist/layout-engine/measure/measureWorker.d.ts +30 -0
  596. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +14 -0
  597. package/dist/layout-engine/measure/measuresHoldNoPositions.d.ts +40 -0
  598. package/dist/layout-engine/measure/measuresHoldNoPositions.js +14 -0
  599. package/dist/layout-engine/measure/paragraphKeyMemo.d.ts +12 -0
  600. package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +21 -2
  601. package/dist/layout-engine/measure/paragraphMeasureShared.js +20 -1
  602. package/dist/layout-engine/measure/paragraphTabs.d.ts +4 -0
  603. package/dist/layout-engine/measure/raisedTableWrap.d.ts +16 -0
  604. package/dist/layout-engine/measure/raisedTableWrap.js +105 -0
  605. package/dist/layout-engine/measure/tableBorderBands.d.ts +35 -0
  606. package/dist/layout-engine/measure/tableBorderBands.js +251 -0
  607. package/dist/layout-engine/measure/tableCellFloating.js +1 -1
  608. package/dist/layout-engine/measure/tableCellFlow.d.ts +4 -4
  609. package/dist/layout-engine/measure/tableCellFlow.js +7 -10
  610. package/dist/layout-engine/measure/tableCellGrid.d.ts +4 -1
  611. package/dist/layout-engine/measure/tableCellGrid.js +30 -3
  612. package/dist/layout-engine/measure/tableFragmentBorderGeometry.js +2 -1
  613. package/dist/layout-engine/measure/tableMeasureMemo.d.ts +23 -0
  614. package/dist/layout-engine/measure/tableMeasureMemo.js +40 -0
  615. package/dist/layout-engine/measure/tableNoWrapWidths.d.ts +12 -0
  616. package/dist/layout-engine/measure/tableNoWrapWidths.js +73 -0
  617. package/dist/layout-engine/measure/tableVisibleBand.d.ts +6 -0
  618. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +7 -1
  619. package/dist/layout-engine/noteAreaFlow.d.ts +10 -1
  620. package/dist/layout-engine/paginator.d.ts +6 -0
  621. package/dist/layout-engine/paginator.js +6 -5
  622. package/dist/layout-engine/paragraphLayout.d.ts +5 -1
  623. package/dist/layout-engine/paragraphSpacing.d.ts +17 -2
  624. package/dist/layout-engine/paragraphSpacing.js +103 -15
  625. package/dist/layout-engine/pmPageIndex.d.ts +14 -1
  626. package/dist/layout-engine/pmPageIndex.js +10 -1
  627. package/dist/layout-engine/section-breaks.d.ts +6 -0
  628. package/dist/layout-engine/sectionLayout.d.ts +6 -1
  629. package/dist/layout-engine/sectionVerticalAlignment.js +2 -1
  630. package/dist/layout-engine/tableHeaderCompatibility.d.ts +3 -0
  631. package/dist/layout-engine/tableHeaderCompatibility.js +5 -0
  632. package/dist/layout-engine/tableLayout.d.ts +17 -6
  633. package/dist/layout-engine/tableLayout.js +36 -25
  634. package/dist/layout-engine/tableRowBreak.d.ts +16 -0
  635. package/dist/layout-engine/tableRowBreak.js +2 -1
  636. package/dist/layout-engine/textBoxFlow.d.ts +9 -0
  637. package/dist/layout-engine/textBoxLayout.d.ts +5 -1
  638. package/dist/layout-engine/types.d.ts +35 -2
  639. package/dist/layout-engine/types.js +77 -27
  640. package/dist/layout-painter/borderStroke.d.ts +1 -1
  641. package/dist/layout-painter/characterFillBand.d.ts +14 -0
  642. package/dist/layout-painter/characterFillBand.js +79 -0
  643. package/dist/layout-painter/imageLayout.d.ts +11 -2
  644. package/dist/layout-painter/index.d.ts +12 -6
  645. package/dist/layout-painter/pageShellStyles.d.ts +9 -0
  646. package/dist/layout-painter/previewSvg.d.ts +7 -0
  647. package/dist/layout-painter/reconcileRenderedContent.js +3 -1
  648. package/dist/layout-painter/registry/modules/image.d.ts +7 -0
  649. package/dist/layout-painter/registry/modules/paragraph.d.ts +8 -0
  650. package/dist/layout-painter/registry/modules/table.d.ts +6 -0
  651. package/dist/layout-painter/registry/modules/textBox.d.ts +3 -0
  652. package/dist/layout-painter/registry/modules.d.ts +10 -0
  653. package/dist/layout-painter/registry/registry.d.ts +8 -0
  654. package/dist/layout-painter/registry/types.d.ts +11 -0
  655. package/dist/layout-painter/renderFragment.d.ts +6 -0
  656. package/dist/layout-painter/renderImage.d.ts +8 -0
  657. package/dist/layout-painter/renderPage.d.ts +10 -3
  658. package/dist/layout-painter/renderPage.js +23 -4
  659. package/dist/layout-painter/renderParagraph.d.ts +6 -0
  660. package/dist/layout-painter/renderParagraph.js +33 -16
  661. package/dist/layout-painter/renderTable.d.ts +10 -1
  662. package/dist/layout-painter/renderTable.js +112 -24
  663. package/dist/layout-painter/renderTextBox.d.ts +9 -0
  664. package/dist/layout-painter/renderUtils.d.ts +5 -1
  665. package/dist/layout-painter/renderWatermark.d.ts +11 -1
  666. package/dist/layout-painter/sdtBoundary.d.ts +10 -0
  667. package/dist/managers/ClipboardManager.d.ts +13 -0
  668. package/dist/managers/ContextMenuManager.d.ts +16 -4
  669. package/dist/managers/ContextMenuManager.js +3 -3
  670. package/dist/managers/DocumentLoaderManager.d.ts +19 -5
  671. package/dist/managers/DocumentLoaderManager.js +48 -13
  672. package/dist/managers/EditorModeManager.d.ts +11 -0
  673. package/dist/managers/ErrorManager.d.ts +11 -0
  674. package/dist/managers/FindReplaceManager.d.ts +14 -27
  675. package/dist/managers/FindReplaceManager.js +0 -49
  676. package/dist/managers/HistoryManager.d.ts +18 -0
  677. package/dist/managers/TableSelectionManager.d.ts +18 -4
  678. package/dist/managers/TableSelectionManager.js +22 -5
  679. package/dist/managers/editorShortcuts.d.ts +14 -2
  680. package/dist/managers/editorShortcuts.js +5 -3
  681. package/dist/managers/types.d.ts +15 -1
  682. package/dist/markdown/annotations.d.ts +9 -0
  683. package/dist/markdown/countParagraphList.d.ts +8 -0
  684. package/dist/markdown/escape.d.ts +6 -4
  685. package/dist/markdown/escape.js +17 -8
  686. package/dist/markdown/images.d.ts +11 -0
  687. package/dist/markdown/index.d.ts +24 -1
  688. package/dist/markdown/index.js +18 -1
  689. package/dist/markdown/internals.d.ts +7 -0
  690. package/dist/markdown/renderBlock.d.ts +5 -0
  691. package/dist/markdown/renderBlock.js +2 -7
  692. package/dist/markdown/renderParagraph.d.ts +22 -2
  693. package/dist/markdown/renderParagraph.js +11 -9
  694. package/dist/markdown/renderRuns.d.ts +10 -0
  695. package/dist/markdown/renderRuns.js +36 -3
  696. package/dist/markdown/renderTable.d.ts +7 -0
  697. package/dist/markdown/renderTable.js +2 -2
  698. package/dist/markdown/trailers.d.ts +7 -0
  699. package/dist/markdown/types.d.ts +9 -2
  700. package/dist/model.d.ts +25 -3
  701. package/dist/paged-layout/pageText.d.ts +1 -1
  702. package/dist/paged-layout/paragraphFlash.d.ts +3 -0
  703. package/dist/paged-layout/rangeProjection.d.ts +20 -1
  704. package/dist/paged-layout/rangeProjection.js +22 -4
  705. package/dist/paged-layout/scrollToPmPosition.d.ts +15 -0
  706. package/dist/paged-layout/sectionBlockWidths.d.ts +2 -2
  707. package/dist/paged-layout/sectionGeometry.d.ts +4 -3
  708. package/dist/paged-layout/selectionViewportRect.d.ts +13 -0
  709. package/dist/panel-layout.d.ts +18 -1
  710. package/dist/panel-layout.js +36 -2
  711. package/dist/pdf/contentStream.d.ts +12 -0
  712. package/dist/pdf/fonts.d.ts +19 -0
  713. package/dist/pdf/paint.d.ts +9 -1
  714. package/dist/pdf/paint.js +51 -0
  715. package/dist/prosemirror/acceptedBlockNeighbours.d.ts +50 -0
  716. package/dist/prosemirror/acceptedBlockNeighbours.js +63 -0
  717. package/dist/prosemirror/alternateContentAttrs.d.ts +1 -1
  718. package/dist/prosemirror/anchoredTextBoxes.d.ts +20 -0
  719. package/dist/prosemirror/attrs/index.d.ts +2 -2
  720. package/dist/prosemirror/attrs/index.js +1 -1
  721. package/dist/prosemirror/authoredTransformAttrs.d.ts +14 -0
  722. package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +2 -2
  723. package/dist/prosemirror/canonicalCommands.d.ts +26 -1
  724. package/dist/prosemirror/canonicalCommands.js +12 -1
  725. package/dist/prosemirror/canonicalSelectionRange.d.ts +1 -1
  726. package/dist/prosemirror/canonicalTableCommands.d.ts +14 -0
  727. package/dist/prosemirror/canonicalTableCommands.js +18 -6
  728. package/dist/prosemirror/cellDragSelection.d.ts +9 -0
  729. package/dist/prosemirror/commands/comments.d.ts +22 -0
  730. package/dist/prosemirror/commands/comments.js +374 -154
  731. package/dist/prosemirror/commands/contentControls.d.ts +20 -3
  732. package/dist/prosemirror/commands/contentControls.js +18 -1
  733. package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +11 -1
  734. package/dist/prosemirror/commands/formatPainter.d.ts +10 -0
  735. package/dist/prosemirror/commands/formatPainter.js +0 -1
  736. package/dist/prosemirror/commands/formatting.d.ts +9 -2
  737. package/dist/prosemirror/commands/hyperlink.d.ts +12 -0
  738. package/dist/prosemirror/commands/image.d.ts +12 -0
  739. package/dist/prosemirror/commands/index.d.ts +10 -5
  740. package/dist/prosemirror/commands/pageBreak.d.ts +3 -0
  741. package/dist/prosemirror/commands/paragraph.d.ts +8 -1
  742. package/dist/prosemirror/commands/pastePlainText.d.ts +8 -0
  743. package/dist/prosemirror/commands/pastePlainText.js +1 -1
  744. package/dist/prosemirror/commands/propertyChangeScope.d.ts +28 -15
  745. package/dist/prosemirror/commands/propertyChangeScope.js +5 -12
  746. package/dist/prosemirror/commands/replaceRangeText.d.ts +22 -0
  747. package/dist/prosemirror/commands/replaceRangeText.js +44 -0
  748. package/dist/prosemirror/commands/resolveAllTableChanges.js +3 -2
  749. package/dist/prosemirror/commands/resolveParagraphProperties.js +4 -8
  750. package/dist/prosemirror/commands/rulerParagraph.d.ts +25 -0
  751. package/dist/prosemirror/commands/rulerParagraph.js +18 -0
  752. package/dist/prosemirror/commands/sectionBreak.d.ts +5 -0
  753. package/dist/prosemirror/commands/table.d.ts +7 -0
  754. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +1 -1
  755. package/dist/prosemirror/commentIdAllocator.d.ts +12 -6
  756. package/dist/prosemirror/commentIdAllocator.js +38 -29
  757. package/dist/prosemirror/commentOps.d.ts +7 -0
  758. package/dist/prosemirror/commentRangeBoundaryAttrs.d.ts +1 -1
  759. package/dist/prosemirror/commentRangeInlineAtoms.d.ts +4 -3
  760. package/dist/prosemirror/commentRangeInlineAtoms.js +1 -1
  761. package/dist/prosemirror/commentRecords.d.ts +17 -0
  762. package/dist/prosemirror/commentRecords.js +132 -5
  763. package/dist/prosemirror/commentReferenceAttrs.d.ts +1 -1
  764. package/dist/prosemirror/commentReferenceIntegrity.js +93 -14
  765. package/dist/prosemirror/containerFinalParagraph.d.ts +2 -0
  766. package/dist/prosemirror/containerFinalParagraph.js +3 -1
  767. package/dist/prosemirror/contentControlRevisions.d.ts +14 -0
  768. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +5 -4
  769. package/dist/prosemirror/conversion/fromProseDoc.d.ts +1 -1
  770. package/dist/prosemirror/conversion/fromProseDoc.js +72 -58
  771. package/dist/prosemirror/conversion/index.d.ts +6 -1
  772. package/dist/prosemirror/conversion/preservedSinkCarriers.d.ts +21 -0
  773. package/dist/prosemirror/conversion/runShadingMark.d.ts +13 -1
  774. package/dist/prosemirror/conversion/storyConversionOptions.d.ts +16 -0
  775. package/dist/prosemirror/conversion/storyConversionOptions.js +13 -0
  776. package/dist/prosemirror/conversion/toProseDoc.d.ts +35 -10
  777. package/dist/prosemirror/conversion/toProseDoc.js +197 -136
  778. package/dist/prosemirror/copyOriginResolution.js +23 -10
  779. package/dist/prosemirror/documentSchema.d.ts +12 -0
  780. package/dist/prosemirror/emptyRangeAnchor.d.ts +39 -8
  781. package/dist/prosemirror/emptyRangeAnchor.js +63 -10
  782. package/dist/prosemirror/extensions/ExtensionManager.d.ts +7 -0
  783. package/dist/prosemirror/extensions/ExtensionManager.js +2 -0
  784. package/dist/prosemirror/extensions/StarterKit.d.ts +11 -2
  785. package/dist/prosemirror/extensions/core/DocExtension.d.ts +3 -0
  786. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +3 -0
  787. package/dist/prosemirror/extensions/core/HistoryExtension.js +3 -2
  788. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +13 -4
  789. package/dist/prosemirror/extensions/core/ParagraphExtension.js +5 -3
  790. package/dist/prosemirror/extensions/core/TextExtension.d.ts +3 -0
  791. package/dist/prosemirror/extensions/create.d.ts +6 -0
  792. package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +5 -0
  793. package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -3
  794. package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +10 -0
  795. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +10 -0
  796. package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +6 -0
  797. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +20 -0
  798. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +20 -23
  799. package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +13 -0
  800. package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +9 -0
  801. package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +6 -0
  802. package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +14 -0
  803. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +38 -21
  804. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +8 -3
  805. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +5 -14
  806. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +17 -0
  807. package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +7 -3
  808. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +14 -0
  809. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +4 -1
  810. package/dist/prosemirror/extensions/features/pasteCleanup.d.ts +32 -3
  811. package/dist/prosemirror/extensions/features/pasteCleanup.js +23 -3
  812. package/dist/prosemirror/extensions/features/pastedCellSections.d.ts +22 -0
  813. package/dist/prosemirror/extensions/features/pastedCellSections.js +78 -0
  814. package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +22 -0
  815. package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +1 -0
  816. package/dist/prosemirror/extensions/markRegistry.d.ts +14 -1
  817. package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +3 -0
  818. package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +3 -0
  819. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +8 -0
  820. package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +14 -0
  821. package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +6 -0
  822. package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +3 -0
  823. package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +4 -6
  824. package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +3 -0
  825. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +5 -0
  826. package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +17 -0
  827. package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +3 -0
  828. package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +3 -0
  829. package/dist/prosemirror/extensions/marks/HyphenElementExtension.d.ts +19 -0
  830. package/dist/prosemirror/extensions/marks/InlineWrapperExtension.d.ts +12 -0
  831. package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +3 -0
  832. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +11 -2
  833. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.js +2 -1
  834. package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +21 -0
  835. package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +3 -0
  836. package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +3 -0
  837. package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +3 -0
  838. package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +3 -0
  839. package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +3 -0
  840. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +6 -0
  841. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +7 -0
  842. package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +3 -0
  843. package/dist/prosemirror/extensions/marks/markUtils.d.ts +10 -3
  844. package/dist/prosemirror/extensions/nodes/BlockBookmarkBoundaryExtension.d.ts +22 -0
  845. package/dist/prosemirror/extensions/nodes/BlockCommentRangeBoundaryExtension.d.ts +11 -0
  846. package/dist/prosemirror/extensions/nodes/BlockMoveRangeBoundaryExtension.d.ts +14 -0
  847. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +17 -0
  848. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.d.ts +1 -0
  849. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +38 -4
  850. package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.d.ts +2 -1
  851. package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +8 -0
  852. package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +3 -0
  853. package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +3 -0
  854. package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +3 -0
  855. package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +7 -0
  856. package/dist/prosemirror/extensions/nodes/MoveRangeBoundaryExtension.d.ts +1 -0
  857. package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +3 -0
  858. package/dist/prosemirror/extensions/nodes/PageBreakRunExtension.d.ts +1 -0
  859. package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.d.ts +25 -0
  860. package/dist/prosemirror/extensions/nodes/PreservedXmlExtension.d.ts +9 -0
  861. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.d.ts +1 -0
  862. package/dist/prosemirror/extensions/nodes/RangeAnchorExtension.js +7 -19
  863. package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +1 -0
  864. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +6 -0
  865. package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +6 -0
  866. package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +3 -0
  867. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +8 -1
  868. package/dist/prosemirror/extensions/nodes/TableExtension.js +6 -6
  869. package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +7 -0
  870. package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +7 -0
  871. package/dist/prosemirror/extensions/nodes/bookmarkBoundaryDom.d.ts +9 -0
  872. package/dist/prosemirror/extensions/types.d.ts +10 -1
  873. package/dist/prosemirror/findReplaceSelection.d.ts +1 -1
  874. package/dist/prosemirror/hyperlinkRemoval.d.ts +13 -1
  875. package/dist/prosemirror/imageCommit.d.ts +10 -0
  876. package/dist/prosemirror/index.d.ts +30 -20
  877. package/dist/prosemirror/indexedNodeLookup.d.ts +11 -0
  878. package/dist/prosemirror/inlineWrapperStack.d.ts +12 -0
  879. package/dist/prosemirror/insertOperations.d.ts +10 -1
  880. package/dist/prosemirror/insertOperations.js +2 -2
  881. package/dist/prosemirror/insertionGaps.d.ts +21 -0
  882. package/dist/prosemirror/insertionGaps.js +86 -0
  883. package/dist/prosemirror/keptRangeBoundaries.d.ts +16 -12
  884. package/dist/prosemirror/keptRangeBoundaries.js +28 -34
  885. package/dist/prosemirror/listAutoformatMarkers.d.ts +11 -0
  886. package/dist/prosemirror/listInstanceReferences.d.ts +5 -0
  887. package/dist/prosemirror/listLabels.d.ts +16 -3
  888. package/dist/prosemirror/listLabels.js +0 -6
  889. package/dist/prosemirror/listMarker.d.ts +2 -2
  890. package/dist/prosemirror/listNumbering.d.ts +1 -1
  891. package/dist/prosemirror/listRendering.d.ts +2 -2
  892. package/dist/prosemirror/listRenderingAttrs.d.ts +10 -1
  893. package/dist/prosemirror/lockedControls.d.ts +6 -0
  894. package/dist/prosemirror/markupViewNotes.d.ts +11 -1
  895. package/dist/prosemirror/markupViewProjection.d.ts +21 -4
  896. package/dist/prosemirror/moveRangeBoundaryAttrs.d.ts +1 -1
  897. package/dist/prosemirror/nativeSelection.d.ts +21 -3
  898. package/dist/prosemirror/nativeSelection.js +69 -19
  899. package/dist/prosemirror/noteReferenceOccurrences.d.ts +1 -1
  900. package/dist/prosemirror/noteReferenceReview.d.ts +17 -3
  901. package/dist/prosemirror/noteReferenceReview.js +26 -5
  902. package/dist/prosemirror/pageBreakRunProjection.d.ts +2 -1
  903. package/dist/prosemirror/paraText.d.ts +14 -0
  904. package/dist/prosemirror/paragraphFormattingProvenance.d.ts +13 -1
  905. package/dist/prosemirror/paragraphIndentation.d.ts +6 -3
  906. package/dist/prosemirror/paragraphIndentation.js +2 -3
  907. package/dist/prosemirror/paragraphList.d.ts +1 -1
  908. package/dist/prosemirror/paragraphMarkJoin.d.ts +29 -1
  909. package/dist/prosemirror/paragraphMarkJoin.js +25 -6
  910. package/dist/prosemirror/paragraphPropertyCarry.d.ts +15 -1
  911. package/dist/prosemirror/paragraphPropertyCarry.js +5 -3
  912. package/dist/prosemirror/paragraphSpacing.d.ts +1 -1
  913. package/dist/prosemirror/pastePlacement.d.ts +17 -0
  914. package/dist/prosemirror/pastePlacement.js +22 -0
  915. package/dist/prosemirror/pastedCommentCopies.d.ts +87 -0
  916. package/dist/prosemirror/pastedCommentCopies.js +379 -0
  917. package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +12 -0
  918. package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +14 -0
  919. package/dist/prosemirror/plugins/contentControlWidgets.d.ts +15 -9
  920. package/dist/prosemirror/plugins/contentControlWidgets.js +22 -28
  921. package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +17 -0
  922. package/dist/prosemirror/plugins/derivedFields.d.ts +8 -0
  923. package/dist/prosemirror/plugins/derivedFields.js +52 -0
  924. package/dist/prosemirror/plugins/documentNumbering.d.ts +2 -1
  925. package/dist/prosemirror/plugins/documentStyleState.d.ts +3 -4
  926. package/dist/prosemirror/plugins/documentStyles.d.ts +20 -3
  927. package/dist/prosemirror/plugins/index.d.ts +7 -1
  928. package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +18 -1
  929. package/dist/prosemirror/plugins/paragraphStyleResolution.js +12 -2
  930. package/dist/prosemirror/plugins/pmTextScan.d.ts +18 -0
  931. package/dist/prosemirror/plugins/pmTextScan.js +42 -33
  932. package/dist/prosemirror/plugins/revisionIds.d.ts +14 -1
  933. package/dist/prosemirror/plugins/revisionIds.js +5 -1
  934. package/dist/prosemirror/plugins/selectionTracker.d.ts +12 -2
  935. package/dist/prosemirror/plugins/suggestionMode.d.ts +14 -11
  936. package/dist/prosemirror/plugins/suggestionMode.js +212 -34
  937. package/dist/prosemirror/plugins/templateDirectives.d.ts +17 -0
  938. package/dist/prosemirror/plugins/templatePreviewValues.d.ts +23 -0
  939. package/dist/prosemirror/plugins/templateSlashMenu.d.ts +19 -0
  940. package/dist/prosemirror/plugins/transactionInvariants.d.ts +19 -0
  941. package/dist/prosemirror/positionSweep.d.ts +21 -0
  942. package/dist/prosemirror/queries.d.ts +9 -0
  943. package/dist/prosemirror/queries.js +2 -2
  944. package/dist/prosemirror/rangeAnchorAttrs.d.ts +2 -2
  945. package/dist/prosemirror/rangeAnchorAttrs.js +55 -33
  946. package/dist/prosemirror/rebaseParagraphRuns.js +1 -1
  947. package/dist/prosemirror/rejoinRunCarriers.d.ts +17 -0
  948. package/dist/prosemirror/replaceFindMatches.d.ts +20 -0
  949. package/dist/prosemirror/replaceFindMatches.js +33 -0
  950. package/dist/prosemirror/replacedAnnotations.d.ts +143 -0
  951. package/dist/prosemirror/replacedAnnotations.js +223 -26
  952. package/dist/prosemirror/revisionCarriers.js +9 -0
  953. package/dist/prosemirror/runFormattingFromMarks.d.ts +3 -3
  954. package/dist/prosemirror/runFormattingFromMarks.js +10 -51
  955. package/dist/prosemirror/runFormattingProvenance.d.ts +2 -1
  956. package/dist/prosemirror/runFormattingProvenance.js +2 -1
  957. package/dist/prosemirror/runFormattingReconciliation.js +3 -12
  958. package/dist/prosemirror/runIdentity.d.ts +14 -0
  959. package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +7 -0
  960. package/dist/prosemirror/runPropertyChangeResolution.d.ts +5 -13
  961. package/dist/prosemirror/runPropertyChangeResolution.js +13 -30
  962. package/dist/prosemirror/runStyleFormatting.d.ts +42 -113
  963. package/dist/prosemirror/runStyleFormatting.js +17 -74
  964. package/dist/prosemirror/schema/index.d.ts +8 -1
  965. package/dist/prosemirror/schema/marks.d.ts +16 -2
  966. package/dist/prosemirror/schema/nodes.d.ts +15 -14
  967. package/dist/prosemirror/sectionCarrier.d.ts +21 -0
  968. package/dist/prosemirror/sectionMarkEdits.d.ts +18 -0
  969. package/dist/prosemirror/selectionState.d.ts +10 -4
  970. package/dist/prosemirror/storyListNumbering.d.ts +10 -0
  971. package/dist/prosemirror/styles/index.d.ts +3 -0
  972. package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +20 -18
  973. package/dist/prosemirror/styles/paragraphStyleCascade.js +10 -19
  974. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +4 -3
  975. package/dist/prosemirror/styles/styleResolver.d.ts +40 -15
  976. package/dist/prosemirror/styles/styleResolver.js +6 -6
  977. package/dist/prosemirror/styles/styleToggleCascade.d.ts +18 -11
  978. package/dist/prosemirror/styles/styleToggleCascade.js +2 -11
  979. package/dist/prosemirror/styles/tableStyleRegions.d.ts +20 -7
  980. package/dist/prosemirror/styles/tableStyleRegions.js +14 -13
  981. package/dist/prosemirror/tableCellPaste.d.ts +21 -0
  982. package/dist/prosemirror/tableCellPaste.js +32 -2
  983. package/dist/prosemirror/tableGridMutation.d.ts +9 -0
  984. package/dist/prosemirror/tableGridMutation.js +34 -2
  985. package/dist/prosemirror/tablePositionedBookmarks.d.ts +6 -0
  986. package/dist/prosemirror/tableResize.d.ts +10 -0
  987. package/dist/prosemirror/tableRunIn.d.ts +26 -1
  988. package/dist/prosemirror/tableRunIn.js +39 -11
  989. package/dist/prosemirror/textBoxAnchorAttrs.d.ts +1 -1
  990. package/dist/prosemirror/textBoxHostCollapse.d.ts +11 -0
  991. package/dist/prosemirror/utils/findParagraphByParaId.d.ts +5 -0
  992. package/dist/prosemirror/utils/tabCalculator.d.ts +6 -0
  993. package/dist/prosemirror/utils/visualLineNavigation.js +1 -1
  994. package/dist/prosemirror/validation.js +6 -11
  995. package/dist/prosemirror/yjsDocumentMetadata.d.ts +9 -3
  996. package/dist/prosemirror/yjsDocumentMetadata.js +49 -10
  997. package/dist/prosemirror/zeroWidthAnchors.d.ts +18 -0
  998. package/dist/redline.d.ts +4 -1
  999. package/dist/redline.js +21 -13
  1000. package/dist/render-dom/BodySelectionOverlay.d.ts +5 -0
  1001. package/dist/render-dom/RemoteSelectionOverlay.js +3 -3
  1002. package/dist/server.d.ts +30 -18
  1003. package/dist/server.js +4 -3
  1004. package/dist/shaping/placeRun.d.ts +8 -0
  1005. package/dist/shaping/shaper.d.ts +19 -0
  1006. package/dist/style-engine/index.d.ts +5 -0
  1007. package/dist/style-engine/styleEngine.d.ts +32 -13
  1008. package/dist/style-sets/extract.d.ts +1 -1
  1009. package/dist/style-sets/styleSetNormalization.d.ts +20 -1
  1010. package/dist/text-shaping.d.ts +9 -1
  1011. package/dist/types/anonymization.d.ts +17 -0
  1012. package/dist/types/anonymization.js +0 -0
  1013. package/dist/types/autocomplete.d.ts +46 -0
  1014. package/dist/types/autocomplete.js +0 -0
  1015. package/dist/types/canonicalCapabilities.d.ts +40 -42
  1016. package/dist/types/canonicalCapabilities.js +43 -44
  1017. package/dist/types/canonicalSave.d.ts +36 -0
  1018. package/dist/types/documentModel.d.ts +37 -0
  1019. package/dist/types/documentModel.js +24 -0
  1020. package/dist/types/docxSerialization.d.ts +10 -0
  1021. package/dist/types/fields.d.ts +25 -0
  1022. package/dist/types/fields.js +0 -0
  1023. package/dist/types/index.d.ts +5 -0
  1024. package/dist/types/remote-selection.d.ts +2 -1
  1025. package/dist/types/selectiveSaveDecline.d.ts +44 -0
  1026. package/dist/types/selectiveSaveDecline.js +0 -0
  1027. package/dist/types/tableWidthKind.d.ts +2 -0
  1028. package/dist/types/tableWidthKind.js +9 -0
  1029. package/dist/utils/base64.d.ts +20 -0
  1030. package/dist/utils/borderCss.d.ts +18 -1
  1031. package/dist/utils/colorResolver.d.ts +12 -11
  1032. package/dist/utils/createDocument.d.ts +8 -1
  1033. package/dist/utils/createDocument.js +20 -2
  1034. package/dist/utils/diagonalHatch.d.ts +2 -0
  1035. package/dist/utils/diagonalHatch.js +16 -0
  1036. package/dist/utils/extremes.d.ts +4 -0
  1037. package/dist/utils/extremes.js +14 -0
  1038. package/dist/utils/findMatchView.d.ts +2 -2
  1039. package/dist/utils/findReplace.d.ts +2 -2
  1040. package/dist/utils/findReplace.js +3 -2
  1041. package/dist/utils/fontFamilyMerge.d.ts +2 -1
  1042. package/dist/utils/fontResolver.d.ts +11 -2
  1043. package/dist/utils/formatToStyle.d.ts +22 -8
  1044. package/dist/utils/headerFooter.d.ts +16 -2
  1045. package/dist/utils/headerFooter.js +2 -6
  1046. package/dist/utils/imageResize.js +1 -1
  1047. package/dist/utils/listItems.d.ts +7 -0
  1048. package/dist/utils/listItems.js +9 -0
  1049. package/dist/utils/mergeDocumentContent.d.ts +7 -0
  1050. package/dist/utils/outlineHeadings.d.ts +1 -1
  1051. package/dist/utils/paragraphFormattingMerge.d.ts +11 -3
  1052. package/dist/utils/paragraphFormattingMerge.js +0 -8
  1053. package/dist/utils/paragraphInlineLayout.js +2 -1
  1054. package/dist/utils/repeatingStrokeGradient.d.ts +8 -0
  1055. package/dist/utils/repeatingStrokeGradient.js +13 -0
  1056. package/dist/utils/rotationBoundingBox.d.ts +8 -0
  1057. package/dist/utils/rulerControl.d.ts +71 -0
  1058. package/dist/utils/rulerControl.js +94 -0
  1059. package/dist/utils/tableOperations.d.ts +20 -4
  1060. package/dist/utils/tableOperations.js +1 -0
  1061. package/dist/utils/textDirectionFlow.d.ts +10 -0
  1062. package/dist/utils/textFormattingMerge.d.ts +18 -2
  1063. package/dist/utils/textFormattingMerge.js +0 -20
  1064. package/dist/utils/units.d.ts +2 -0
  1065. package/dist/utils/units.js +3 -1
  1066. package/dist/version-comparison.d.ts +63 -1
  1067. package/dist/version-comparison.js +2 -1
  1068. package/dist/watermark/index.d.ts +11 -0
  1069. package/dist/watermark/index.js +0 -5
  1070. package/package.json +7 -7
  1071. package/dist/controller/canonicalPublicOperations.js +0 -1276
  1072. package/dist/controller/canonicalSeedContent.d.ts +0 -12
  1073. package/dist/controller/canonicalSourceNormalization.d.ts +0 -21
  1074. package/dist/docx/canonicalResourceSave.d.ts +0 -15
  1075. package/dist/docx/canonicalResourceSave.js +0 -27
  1076. package/dist/internal/acceptedBlockProjection.d.ts +0 -9
  1077. package/dist/internal/acceptedBlockProjection.js +0 -50
  1078. package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +0 -60
  1079. package/dist/prosemirror/plugins/anonymizationDecorations.js +0 -111
  1080. package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +0 -127
  1081. package/dist/prosemirror/plugins/autocompleteSuggestion.js +0 -282
  1082. package/dist/utils/replaceText.d.ts +0 -25
  1083. package/dist/utils/replaceText.js +0 -242
  1084. /package/dist/{controller → canonical}/canonicalListRendering.d.ts +0 -0
  1085. /package/dist/{controller → canonical}/canonicalOperations.d.ts +0 -0
  1086. /package/dist/{controller → canonical}/canonicalSelection.d.ts +0 -0
  1087. /package/dist/{controller → canonical}/canonicalTocSelection.d.ts +0 -0
@@ -0,0 +1,44 @@
1
+ import { OpStory } from "@stll/docx-core/ops";
2
+ /** Why the structural splice declined, so the save repacked the package. */
3
+ export type StructuralSpliceDeclineReason =
4
+ /** A body the splice cannot read, or one in Strict conformance. */
5
+ "structuralUnreadableBody" |
6
+ /** A paragraph without a valid unique paragraph id. */
7
+ "structuralParagraphIds" |
8
+ /** A body block other than a paragraph, table, section or range marker. */
9
+ "structuralBodyBlock" |
10
+ /** A changed paragraph holding a section, note reference or drawing. */
11
+ "structuralDependentContent" |
12
+ /** A table, body marker or the final section changed shape. */
13
+ "structuralBarrierChanged" |
14
+ /** Surviving paragraphs reordered, or a new paragraph reusing an id. */
15
+ "structuralReorder" |
16
+ /** A serialized paragraph whose namespaces the source cannot carry. */
17
+ "structuralFragment" |
18
+ /**
19
+ * A range or field the splice would split: the spliced body would place a
20
+ * bookmark, comment, permission, move or field marker differently from the
21
+ * serialized body.
22
+ */
23
+ "structuralRangeSplit" |
24
+ /** The splices overlap, or would leave a comment range unbalanced. */
25
+ "structuralSpliceRefused";
26
+ export type SelectiveSaveDeclineReason = StructuralSpliceDeclineReason | "untrackedChanges" | "tooLarge" | "unmaterializedBodyResource" | "unmaterializedStoryResource" | "unmaterializedHeaderFooter" | "pictureWatermark" | "orphanCommentRanges" | "unsynthesizedReplyRanges" | "invalidModel" | "unmaterializedHyperlink" | "unsafePackagePath" | "missingDocumentPart" | "addedNumbering" | "unroutedParagraphs" | "paragraphPatch" | "commentsExtended" | "numberingPart" | "styleMaterialization" | "strictConformance" | "packageError";
27
+ /** The attempted selective write's refusal, without attributing package-wide failures to a part. */
28
+ export type SelectiveSaveDecline = {
29
+ reason: SelectiveSaveDeclineReason;
30
+ } & ({
31
+ scope: "package";
32
+ part?: never;
33
+ story?: never;
34
+ } | {
35
+ scope: "part";
36
+ part: string;
37
+ story?: never;
38
+ } | {
39
+ scope: "story";
40
+ story: Extract<OpStory, {
41
+ kind: "header" | "footer";
42
+ }>;
43
+ part?: never;
44
+ });
File without changes
@@ -0,0 +1,2 @@
1
+ import { TableWidthType } from "@stll/docx-core/model";
2
+ export declare const readTableWidthKind: (type: TableWidthType | undefined) => "automatic" | "percentage" | "twips" | "unspecified";
@@ -0,0 +1,9 @@
1
+ // src/types/tableWidthKind.ts
2
+ const TABLE_WIDTH_KIND = {
3
+ auto: "automatic",
4
+ nil: "unspecified",
5
+ dxa: "twips",
6
+ pct: "percentage"
7
+ };
8
+ const readTableWidthKind = (type) => type === void 0 ? "unspecified" : TABLE_WIDTH_KIND[type];
9
+ export { readTableWidthKind };
@@ -1,3 +1,23 @@
1
+ /**
2
+ * The package's one bytes-to-base64 encoder.
3
+ *
4
+ * Every call site that spelled this itself got a different answer to the same
5
+ * two questions, and one of them got the first question wrong:
6
+ *
7
+ * - `btoa(new TextDecoder("latin1").decode(bytes))` is not a binary string.
8
+ * The Encoding standard maps the `latin1` label to windows-1252, so bytes
9
+ * 0x80-0x9F decode to characters outside Latin-1 and `btoa` throws
10
+ * `InvalidCharacterError` on them. Ordinary image bytes contain those values,
11
+ * so the browser path of that spelling fails on real input.
12
+ * - `String.fromCharCode(...chunk)` is correct but spreads a chunk's worth of
13
+ * arguments per call, and the intermediate binary string is as large as the
14
+ * input.
15
+ *
16
+ * Neither question has to be asked per call site, so it is asked here once.
17
+ * The runtime's own encoder answers it when the runtime has one, and the
18
+ * portable encoder in the shared owner answers it when not; both produce canonical base64,
19
+ * so the choice is invisible in the output.
20
+ */
1
21
  import { bytesToBase64, encodeBase64Portable } from "@stll/utf8-boundaries";
2
22
  /** Encode bytes as a `data:` URL with the given media type. */
3
23
  export declare const bytesToDataUrl: (bytes: Uint8Array, mimeType: string) => string;
@@ -1,3 +1,20 @@
1
+ /**
2
+ * The one OOXML border style → CSS `border-style` table.
3
+ *
4
+ * There were three of these and they covered different amounts of the
5
+ * enumeration. `TableExtension` rendered the nine `thinThick`/`thickThin` gap
6
+ * styles as `double` and `dashDotStroked` as `dashed`; the layout bridge and
7
+ * `formatToStyle` fell through to `solid`, so a table cell and the paragraph
8
+ * above it painted the same authored border differently. The three agreed
9
+ * wherever they overlapped, so this table is their union rather than a new
10
+ * decision: a rendering decision per enumeration member is a table, and a table
11
+ * has one owner.
12
+ *
13
+ * Totality is the point of the `satisfies`: `ST_Border` is generated from the
14
+ * committed schema graph, so a schema refresh that adds a member fails the
15
+ * build here rather than quietly painting it as a plain line.
16
+ */
17
+ import { DeepReadonly } from "../types/documentModel.js";
1
18
  import { BorderStyleValue, PresetLineDashVal, PresetLineDashValue } from "@stll/docx-core/model";
2
19
  /** The CSS `border-style` keywords folio paints a border with, in one tuple. */
3
20
  export declare const CSS_BORDER_STYLE_VALUES: readonly ["none", "solid", "double", "dotted", "dashed", "groove", "ridge", "inset", "outset"];
@@ -230,7 +247,7 @@ export declare const paintsCssBorder: (style: CssBorderStyle | undefined) => boo
230
247
  * A token the schema does not declare paints as a plain line: the member is
231
248
  * kept for the round trip, but nothing can be inferred about how it draws.
232
249
  */
233
- export declare const cssBorderStyle: (style: BorderStyleValue | undefined) => CssBorderStyle;
250
+ export declare const cssBorderStyle: (style: DeepReadonly<BorderStyleValue> | undefined) => CssBorderStyle;
234
251
  /**
235
252
  * The CSS `border-style` for a parsed `a:prstDash@val`.
236
253
  *
@@ -1,4 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
+ import { DeepReadonly } from "../types/documentModel.js";
2
3
  import { ThemeColor } from "@stll/docx-core/model";
3
4
  /**
4
5
  * Public form of the same hex-color check, for callers that read a color
@@ -15,7 +16,7 @@ export declare function isValidHexColor(value: string | undefined | null): boole
15
16
  * @param defaultColor - Default color if auto or undefined (default: black)
16
17
  * @returns CSS color string (e.g., "#FF0000" or "inherit")
17
18
  */
18
- export declare function resolveColor(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined, defaultColor?: string): string;
19
+ export declare function resolveColor(color: DeepReadonly<document_d_exports.ColorValue> | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined, defaultColor?: string): string;
19
20
  /**
20
21
  * Resolve a highlight color name to CSS
21
22
  *
@@ -28,7 +29,7 @@ export declare function resolveColor(color: document_d_exports.ColorValue | unde
28
29
  * document theme; explicit `rgb` values are upper-cased. Used by adapters that
29
30
  * need a normalized hex (e.g. comparing a cell fill against a swatch).
30
31
  */
31
- export declare function resolveColorToHex(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined): string | undefined;
32
+ export declare function resolveColorToHex(color: DeepReadonly<document_d_exports.ColorValue> | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): string | undefined;
32
33
  export declare function resolveHighlightColor(highlight: string | undefined): string;
33
34
  /**
34
35
  * Resolve a shading fill or pattern color to CSS
@@ -37,7 +38,7 @@ export declare function resolveHighlightColor(highlight: string | undefined): st
37
38
  * @param theme - Theme for resolving theme colors
38
39
  * @returns CSS color string
39
40
  */
40
- export declare function resolveShadingColor(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined): string;
41
+ export declare function resolveShadingColor(color: DeepReadonly<document_d_exports.ColorValue> | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): string;
41
42
  /**
42
43
  * Check if a color is effectively black
43
44
  *
@@ -45,7 +46,7 @@ export declare function resolveShadingColor(color: document_d_exports.ColorValue
45
46
  * @param theme - Theme for resolving theme colors
46
47
  * @returns True if color resolves to black or very dark
47
48
  */
48
- export declare function isBlack(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined): boolean;
49
+ export declare function isBlack(color: document_d_exports.ColorValue | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): boolean;
49
50
  /**
50
51
  * Check if a color is effectively white
51
52
  *
@@ -53,7 +54,7 @@ export declare function isBlack(color: document_d_exports.ColorValue | undefined
53
54
  * @param theme - Theme for resolving theme colors
54
55
  * @returns True if color resolves to white or very light
55
56
  */
56
- export declare function isWhite(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined): boolean;
57
+ export declare function isWhite(color: document_d_exports.ColorValue | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): boolean;
57
58
  /**
58
59
  * Get contrasting text color for a background
59
60
  *
@@ -61,7 +62,7 @@ export declare function isWhite(color: document_d_exports.ColorValue | undefined
61
62
  * @param theme - Theme for resolving theme colors
62
63
  * @returns Black or white hex color for best contrast
63
64
  */
64
- export declare function getContrastingColor(backgroundColor: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined): string;
65
+ export declare function getContrastingColor(backgroundColor: document_d_exports.ColorValue | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): string;
65
66
  /**
66
67
  * Parse a color string (various formats) to ColorValue
67
68
  *
@@ -93,7 +94,7 @@ export declare function createRgbColor(hex: string): document_d_exports.ColorVal
93
94
  * @param percent - Percentage to darken (0-100)
94
95
  * @returns CSS color string
95
96
  */
96
- export declare function darkenColor(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined, percent: number): string;
97
+ export declare function darkenColor(color: document_d_exports.ColorValue | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined, percent: number): string;
97
98
  /**
98
99
  * Lighten a color by a percentage
99
100
  *
@@ -102,7 +103,7 @@ export declare function darkenColor(color: document_d_exports.ColorValue | undef
102
103
  * @param percent - Percentage to lighten (0-100)
103
104
  * @returns CSS color string
104
105
  */
105
- export declare function lightenColor(color: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined, percent: number): string;
106
+ export declare function lightenColor(color: document_d_exports.ColorValue | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined, percent: number): string;
106
107
  /**
107
108
  * Blend two colors together
108
109
  *
@@ -112,7 +113,7 @@ export declare function lightenColor(color: document_d_exports.ColorValue | unde
112
113
  * @param theme - Theme for resolving
113
114
  * @returns CSS color string
114
115
  */
115
- export declare function blendColors(color1: document_d_exports.ColorValue | undefined | null, color2: document_d_exports.ColorValue | undefined | null, ratio: number, theme: document_d_exports.Theme | null | undefined): string;
116
+ export declare function blendColors(color1: document_d_exports.ColorValue | undefined | null, color2: document_d_exports.ColorValue | undefined | null, ratio: number, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): string;
116
117
  /**
117
118
  * Ensure a hex color string has a '#' prefix.
118
119
  */
@@ -162,7 +163,7 @@ export declare function getThemeTintShadeHex(baseHex: string, type: "tint" | "sh
162
163
  * @param colorScheme - Theme color scheme (falls back to Office 2016 defaults)
163
164
  * @returns 6 rows × 10 columns of ThemeMatrixCell
164
165
  */
165
- export declare function generateThemeTintShadeMatrix(colorScheme?: document_d_exports.ThemeColorScheme | null): ThemeMatrixCell[][];
166
+ export declare function generateThemeTintShadeMatrix(colorScheme?: DeepReadonly<document_d_exports.ThemeColorScheme> | null): ThemeMatrixCell[][];
166
167
  /**
167
168
  * Check if two colors are equal
168
169
  *
@@ -171,4 +172,4 @@ export declare function generateThemeTintShadeMatrix(colorScheme?: document_d_ex
171
172
  * @param theme - Theme for resolving
172
173
  * @returns True if colors resolve to the same value
173
174
  */
174
- export declare function colorsEqual(color1: document_d_exports.ColorValue | undefined | null, color2: document_d_exports.ColorValue | undefined | null, theme: document_d_exports.Theme | null | undefined): boolean;
175
+ export declare function colorsEqual(color1: document_d_exports.ColorValue | undefined | null, color2: document_d_exports.ColorValue | undefined | null, theme: DeepReadonly<document_d_exports.Theme> | null | undefined): boolean;
@@ -1,5 +1,12 @@
1
- import { document_d_exports } from "../types/document.js";
1
+ /**
2
+ * Create Document Utility
3
+ *
4
+ * Provides functions to create new documents programmatically.
5
+ */
2
6
  import { DocumentPreset, DocumentStyleSet } from "../style-sets/types.js";
7
+ import { document_d_exports } from "../types/document.js";
8
+ /** Heading properties used when an edit needs a missing built-in definition. */
9
+ export declare const defaultHeadingStyle: (styleId: string) => document_d_exports.Style | undefined;
3
10
  /**
4
11
  * Options for creating an empty document
5
12
  */
@@ -7,7 +7,7 @@ import { STYLE_SET_PART, normalizeDocumentStyleSet } from "../style-sets/styleSe
7
7
  import "../style-sets/types.js";
8
8
  import { generateHexId } from "./hexId.js";
9
9
  import { panic } from "better-result";
10
- import { DOCX_CONFORMANCE_CLASSES } from "@stll/docx-core/model";
10
+ import { DOCX_CONFORMANCE_CLASSES, headingOutlineLevel } from "@stll/docx-core/model";
11
11
  // src/utils/createDocument.ts
12
12
  /**
13
13
  * Create Document Utility
@@ -310,6 +310,24 @@ function getDefaultStyles() {
310
310
  }
311
311
  ];
312
312
  }
313
+ /** Heading properties used when an edit needs a missing built-in definition. */
314
+ const defaultHeadingStyle = (styleId) => {
315
+ const level = /^Heading(?<level>[1-9])$/u.exec(styleId)?.groups?.["level"];
316
+ if (level === void 0) return void 0;
317
+ const template = getDefaultStyles().find((style) => style.styleId === (Number(level) <= 6 ? styleId : "Heading6"));
318
+ const outlineLevel = Number(level) - 1;
319
+ const outline = headingOutlineLevel(outlineLevel);
320
+ if (template === void 0 || outline === void 0) return panic("The default heading template is missing.");
321
+ return {
322
+ ...template,
323
+ styleId,
324
+ name: builtInHeadingStyleName(outlineLevel),
325
+ pPr: {
326
+ ...template.pPr,
327
+ outlineLevel: outline
328
+ }
329
+ };
330
+ };
313
331
  /**
314
332
  * Get default section properties (US Letter, 1 inch margins)
315
333
  */
@@ -433,4 +451,4 @@ function createDocumentWithText(text, options = {}) {
433
451
  initialText: text
434
452
  });
435
453
  }
436
- export { createDocumentWithText, createEmptyDocument };
454
+ export { createDocumentWithText, createEmptyDocument, defaultHeadingStyle };
@@ -0,0 +1,2 @@
1
+ import { DiagonalHatchPattern } from "../display-list/types.js";
2
+ export declare function diagonalHatchGradient(color: string, { pitchPx, lineWidthPx, slots }: DiagonalHatchPattern): string;
@@ -0,0 +1,16 @@
1
+ // src/utils/diagonalHatch.ts
2
+ function diagonalHatchGradient(color, { pitchPx, lineWidthPx, slots }) {
3
+ const perpendicularPitchPx = pitchPx / Math.SQRT2;
4
+ const stops = [];
5
+ for (const [index, painted] of slots.entries()) {
6
+ const startPx = index * perpendicularPitchPx;
7
+ const endPx = startPx + perpendicularPitchPx;
8
+ if (painted) {
9
+ const inkEndPx = startPx + lineWidthPx;
10
+ stops.push(`${color} ${startPx}px ${inkEndPx}px`);
11
+ stops.push(`transparent ${inkEndPx}px ${endPx}px`);
12
+ } else stops.push(`transparent ${startPx}px ${endPx}px`);
13
+ }
14
+ return `repeating-linear-gradient(135deg, ${stops.join(", ")})`;
15
+ }
16
+ export { diagonalHatchGradient };
@@ -0,0 +1,4 @@
1
+ /** `Math.max(floor, ...values)` without the argument limit. */
2
+ export declare const maxOf: (values: Iterable<number>, floor?: number) => number;
3
+ /** `Math.min(ceiling, ...values)` without the argument limit. */
4
+ export declare const minOf: (values: Iterable<number>, ceiling?: number) => number;
@@ -0,0 +1,14 @@
1
+ // src/utils/extremes.ts
2
+ /** `Math.max(floor, ...values)` without the argument limit. */
3
+ const maxOf = (values, floor = Number.NEGATIVE_INFINITY) => {
4
+ let result = floor;
5
+ for (const value of values) result = Math.max(result, value);
6
+ return result;
7
+ };
8
+ /** `Math.min(ceiling, ...values)` without the argument limit. */
9
+ const minOf = (values, ceiling = Number.POSITIVE_INFINITY) => {
10
+ let result = ceiling;
11
+ for (const value of values) result = Math.min(result, value);
12
+ return result;
13
+ };
14
+ export { maxOf, minOf };
@@ -1,7 +1,7 @@
1
- import { document_d_exports } from "../types/document.js";
2
1
  import { Layout } from "../layout-engine/types.js";
3
- import { FindMatch } from "./findReplace.js";
4
2
  import { FindMatchRange } from "../prosemirror/findReplaceSelection.js";
3
+ import { document_d_exports } from "../types/document.js";
4
+ import { FindMatch } from "./findReplace.js";
5
5
  import { Node } from "prosemirror-model";
6
6
  import { OpStory } from "@stll/docx-core/ops";
7
7
  /** The same page variant selection used by the painter, including unmounted pages. */
@@ -1,6 +1,6 @@
1
- import { document_d_exports } from "../types/document.js";
2
- import { Paragraph } from "../types/content.js";
3
1
  import { DisplayMode } from "../managers/EditorModeManager.js";
2
+ import { Paragraph } from "../types/content.js";
3
+ import { document_d_exports } from "../types/document.js";
4
4
  import { OpStory } from "@stll/docx-core/ops";
5
5
  export type ReplaceEligibility = {
6
6
  status: "allowed";
@@ -1,6 +1,7 @@
1
1
  import { parseFieldType } from "../docx/fieldParser.js";
2
2
  import { HYPHEN_TEXT_CARRIERS } from "../prosemirror/conversion/hyphenTextCarriers.js";
3
3
  import { isTableCellRetainedInReviewView } from "../prosemirror/tableCellRevisionVisibility.js";
4
+ import { itemBefore } from "./listItems.js";
4
5
  import { decodeOoxmlSymbolCharacter } from "./ooxmlSymbol.js";
5
6
  import { panic } from "better-result";
6
7
  import { documentStories, sameStory, storyBody } from "@stll/docx-core/ops";
@@ -240,7 +241,7 @@ const findInParagraph = (paragraph, searchText, options, paragraphIndex) => {
240
241
  }),
241
242
  contentIndex: findContentIndexAtOffset(paragraph, projection.offsets.at(start) ?? start),
242
243
  startOffset: projection.offsets.at(start) ?? start,
243
- endOffset: (projection.offsets.at(end - 1) ?? end - 1) + 1,
244
+ endOffset: (itemBefore(projection.offsets, end) ?? end - 1) + 1,
244
245
  text: projection.text.slice(start, end)
245
246
  }));
246
247
  };
@@ -261,7 +262,7 @@ const replacementForProjection = ({ projection, start, end }) => {
261
262
  status: "blocked",
262
263
  reason: "atomic-content"
263
264
  };
264
- for (let offset = start + 1; offset < end; offset++) if ((projection.offsets.at(offset) ?? offset) !== (projection.offsets.at(offset - 1) ?? offset - 1) + 1) return {
265
+ for (let offset = start + 1; offset < end; offset++) if ((projection.offsets.at(offset) ?? offset) !== (itemBefore(projection.offsets, offset) ?? offset - 1) + 1) return {
265
266
  status: "blocked",
266
267
  reason: "hidden-content"
267
268
  };
@@ -1,4 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
+ import { DeepReadonly } from "../types/documentModel.js";
2
3
  type FontFamily = NonNullable<document_d_exports.TextFormatting["fontFamily"]>;
3
- export declare function mergeFontFamily(target: FontFamily | undefined, source: FontFamily): FontFamily;
4
+ export declare function mergeFontFamily(target: DeepReadonly<FontFamily> | undefined, source: DeepReadonly<FontFamily>): FontFamily;
4
5
  export {};
@@ -1,6 +1,15 @@
1
+ /**
2
+ * Font Family Resolver
3
+ *
4
+ * Maps DOCX font names to Google Fonts equivalents with proper CSS fallback stacks.
5
+ *
6
+ * DOCX files often use fonts that aren't freely available (Calibri, Cambria, etc.)
7
+ * This module provides mappings to metrically-compatible Google Fonts alternatives.
8
+ */
9
+ import { DocumentFontFacts } from "../fonts/documentFontFacts.js";
1
10
  import { document_d_exports } from "../types/document.js";
11
+ import { DeepReadonly } from "../types/documentModel.js";
2
12
  import "../types/index.js";
3
- import { DocumentFontFacts } from "../fonts/documentFontFacts.js";
4
13
  /**
5
14
  * Result of resolving a font family
6
15
  */
@@ -67,7 +76,7 @@ export declare function parseFontFamilyList(list: string): string[];
67
76
  * @param fontScheme - Theme font scheme from the DOCX
68
77
  * @returns Resolved font name or null if not found
69
78
  */
70
- export declare function resolveThemeFont(themeRef: string, fontScheme?: document_d_exports.ThemeFontScheme): string | null;
79
+ export declare function resolveThemeFont(themeRef: string, fontScheme?: DeepReadonly<document_d_exports.ThemeFontScheme>): string | null;
71
80
  /**
72
81
  * Get all Google Font names needed for a list of DOCX fonts
73
82
  *
@@ -1,5 +1,19 @@
1
- import { document_d_exports } from "../types/document.js";
1
+ /**
2
+ * Formatting to CSS Converter
3
+ *
4
+ * Converts OOXML formatting objects (TextFormatting, ParagraphFormatting)
5
+ * to CSS style properties for rendering.
6
+ *
7
+ * Handles ALL formatting properties:
8
+ * - Font: family, size, weight, style
9
+ * - Text: color, background, decoration (underline, strike, double-strike)
10
+ * - Effects: superscript, subscript, small-caps, all-caps
11
+ * - Spacing: letter-spacing
12
+ * - Paragraph: alignment, line-height, margins, padding, borders, background
13
+ */
2
14
  import { ColorValue } from "../types/colors.js";
15
+ import { document_d_exports } from "../types/document.js";
16
+ import { DeepReadonly } from "../types/documentModel.js";
3
17
  import { Properties } from "csstype";
4
18
  type CSSProperties = Properties<string | number>;
5
19
  /**
@@ -9,7 +23,7 @@ type CSSProperties = Properties<string | number>;
9
23
  * @param theme - Theme for resolving colors and fonts
10
24
  * @returns React CSSProperties
11
25
  */
12
- export declare function textToStyle(formatting: document_d_exports.TextFormatting | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
26
+ export declare function textToStyle(formatting: document_d_exports.TextFormatting | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
13
27
  /**
14
28
  * Convert ParagraphFormatting to CSS properties
15
29
  *
@@ -17,7 +31,7 @@ export declare function textToStyle(formatting: document_d_exports.TextFormattin
17
31
  * @param theme - Theme for resolving colors
18
32
  * @returns React CSSProperties
19
33
  */
20
- export declare function paragraphToStyle(formatting: document_d_exports.ParagraphFormatting | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
34
+ export declare function paragraphToStyle(formatting: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
21
35
  /**
22
36
  * Convert a BorderSpec to CSS border properties
23
37
  *
@@ -26,7 +40,7 @@ export declare function paragraphToStyle(formatting: document_d_exports.Paragrap
26
40
  * @param theme - Theme for color resolution
27
41
  * @returns Partial CSSProperties with border styles
28
42
  */
29
- export declare function borderToStyle(border: document_d_exports.BorderSpec | undefined | null, side?: "Top" | "Bottom" | "Left" | "Right" | "", theme?: document_d_exports.Theme | null): CSSProperties;
43
+ export declare function borderToStyle(border: DeepReadonly<document_d_exports.BorderSpec> | undefined | null, side?: "Top" | "Bottom" | "Left" | "Right" | "", theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
30
44
  /**
31
45
  * Convert ShadingProperties to background color
32
46
  *
@@ -34,7 +48,7 @@ export declare function borderToStyle(border: document_d_exports.BorderSpec | un
34
48
  * @param theme - Theme for color resolution
35
49
  * @returns CSS color string or empty string
36
50
  */
37
- export declare function resolveShadingFill(shading: document_d_exports.ShadingProperties | undefined | null, theme?: document_d_exports.Theme | null): string;
51
+ export declare function resolveShadingFill(shading: DeepReadonly<document_d_exports.ShadingProperties> | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): string;
38
52
  /** The CSS `text-decoration-style` keywords folio paints an underline with. */
39
53
  export type CssTextDecorationStyle = "solid" | "double" | "dotted" | "dashed" | "wavy";
40
54
  /**
@@ -136,7 +150,7 @@ export declare function mergeStyles(...styles: (CSSProperties | undefined | null
136
150
  export declare function tableCellToStyle(formatting: {
137
151
  verticalAlign?: "top" | "center" | "bottom";
138
152
  textDirection?: document_d_exports.TextDirection;
139
- shading?: document_d_exports.ShadingProperties;
153
+ shading?: DeepReadonly<document_d_exports.ShadingProperties>;
140
154
  borders?: {
141
155
  top?: document_d_exports.BorderSpec;
142
156
  bottom?: document_d_exports.BorderSpec;
@@ -161,7 +175,7 @@ export declare function tableCellToStyle(formatting: {
161
175
  type: string;
162
176
  };
163
177
  };
164
- } | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
178
+ } | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
165
179
  /**
166
180
  * Get CSS for page/section container
167
181
  *
@@ -178,5 +192,5 @@ export declare function sectionToStyle(sectionProps: {
178
192
  background?: {
179
193
  color?: ColorValue;
180
194
  };
181
- } | undefined | null, theme?: document_d_exports.Theme | null): CSSProperties;
195
+ } | undefined | null, theme?: DeepReadonly<document_d_exports.Theme> | null): CSSProperties;
182
196
  export {};
@@ -1,4 +1,15 @@
1
+ /**
2
+ * Header/footer document-model operations, extracted from the React
3
+ * `useHeaderFooterEditor` hook. Pure functions over the folio `Document`
4
+ * model: resolving which header/footer renders for each slot, and building the
5
+ * new `Document` produced by creating, saving, or removing a header/footer.
6
+ *
7
+ * ProseMirror stays in the adapter: the save path serialises the live hidden
8
+ * header/footer PM doc to `BlockContent[]` (`proseDocToBlocks`) and passes the
9
+ * blocks in here.
10
+ */
1
11
  import { document_d_exports } from "../types/document.js";
12
+ import { DeepReadonly } from "../types/documentModel.js";
2
13
  export type HeaderFooterPosition = "header" | "footer";
3
14
  /**
4
15
  * The resolved header/footer slots for the active document, plus the
@@ -23,9 +34,12 @@ export type HeaderFooterResolution = {
23
34
  export declare const resolveHeaderFooterContent: (pkg: document_d_exports.DocxPackage | undefined) => HeaderFooterResolution;
24
35
  /**
25
36
  * The section properties that drive the rendered chrome, with `titlePg` merged
26
- * in when title-page mode was inferred from header/footer references.
37
+ * in when title-page mode was inferred from header/footer references. They are
38
+ * the document's own section properties when nothing is merged, so a read-only
39
+ * document gives read-only ones; a plain one still gives plain ones.
27
40
  */
28
- export declare const resolveEffectiveSectionProperties: (documentBody: document_d_exports.DocumentBody | undefined, hasTitlePg: boolean) => document_d_exports.SectionProperties | undefined;
41
+ export declare function resolveEffectiveSectionProperties(documentBody: document_d_exports.DocumentBody | undefined, hasTitlePg: boolean): document_d_exports.SectionProperties | undefined;
42
+ export declare function resolveEffectiveSectionProperties(documentBody: DeepReadonly<document_d_exports.DocumentBody> | undefined, hasTitlePg: boolean): DeepReadonly<document_d_exports.SectionProperties> | undefined;
29
43
  /** Pick the relationship id for the slot a save/remove targets. */
30
44
  export declare const pickActiveHeaderFooterRId: (resolution: HeaderFooterResolution, position: HeaderFooterPosition, isFirstPage: boolean) => string | null;
31
45
  /**
@@ -139,18 +139,14 @@ const resolveHeaderFooterContent = (pkg) => {
139
139
  activeFirstFooterRId: resolvedFirstFooterRId
140
140
  };
141
141
  };
142
- /**
143
- * The section properties that drive the rendered chrome, with `titlePg` merged
144
- * in when title-page mode was inferred from header/footer references.
145
- */
146
- const resolveEffectiveSectionProperties = (documentBody, hasTitlePg) => {
142
+ function resolveEffectiveSectionProperties(documentBody, hasTitlePg) {
147
143
  const base = (documentBody?.sections?.find((section) => section.content.length > 0))?.properties ?? documentBody?.finalSectionProperties;
148
144
  if (!hasTitlePg || base?.titlePg) return base;
149
145
  return base ? {
150
146
  ...base,
151
147
  titlePg: true
152
148
  } : base;
153
- };
149
+ }
154
150
  /** Pick the relationship id for the slot a save/remove targets. */
155
151
  const pickActiveHeaderFooterRId = (resolution, position, isFirstPage) => {
156
152
  if (isFirstPage) return position === "header" ? resolution.activeFirstHeaderRId : resolution.activeFirstFooterRId;
@@ -20,7 +20,7 @@ const calculateResizedImageDimensions = ({ handle, deltaX, deltaY, startWidth, s
20
20
  const scaleY = startHeight > 0 ? (startHeight + deltaY * signY) / startHeight : 1;
21
21
  const desiredScale = Math.abs(scaleX - 1) > Math.abs(scaleY - 1) ? scaleX : scaleY;
22
22
  const minScale = Math.max(startWidth > 0 ? MIN_IMAGE_PX / startWidth : 0, startHeight > 0 ? MIN_IMAGE_PX / startHeight : 0);
23
- const maxScale = Math.min(startWidth > 0 ? MAX_IMAGE_PX / startWidth : Infinity, startHeight > 0 ? MAX_IMAGE_PX / startHeight : Infinity);
23
+ const maxScale = Math.min(startWidth > 0 ? MAX_IMAGE_PX / startWidth : 1e400, startHeight > 0 ? MAX_IMAGE_PX / startHeight : 1e400);
24
24
  const scale = Math.min(maxScale, Math.max(minScale, desiredScale));
25
25
  return {
26
26
  width: startWidth * scale,
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The item of `list` just before `index`; `undefined` at the list's start,
3
+ * where `list.at(index - 1)` would read the list's last item instead.
4
+ * `.oxlint-plugins/folio-at-wraparound.ts` keeps computed negative `.at()`
5
+ * indexes out of package source.
6
+ */
7
+ export declare const itemBefore: <T>(list: ArrayLike<T>, index: number) => T | undefined;
@@ -0,0 +1,9 @@
1
+ // src/utils/listItems.ts
2
+ /**
3
+ * The item of `list` just before `index`; `undefined` at the list's start,
4
+ * where `list.at(index - 1)` would read the list's last item instead.
5
+ * `.oxlint-plugins/folio-at-wraparound.ts` keeps computed negative `.at()`
6
+ * indexes out of package source.
7
+ */
8
+ const itemBefore = (list, index) => index > 0 ? list[index - 1] : void 0;
9
+ export { itemBefore };
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Merge Document Content Utility
3
+ *
4
+ * Composes two documents by appending one document's body content onto
5
+ * another's, renumbering any list numbering the source carries so it can
6
+ * never collide with numbering the target already defines.
7
+ */
1
8
  import { document_d_exports } from "../types/document.js";
2
9
  /**
3
10
  * Append `source`'s body content onto `target`'s. Both documents keep their
@@ -1,5 +1,5 @@
1
- import { HeadingInfo } from "./headingCollector.js";
2
1
  import { Layout } from "../layout-engine/types.js";
2
+ import { HeadingInfo } from "./headingCollector.js";
3
3
  type ResolveOutlineHeadingsOptions = {
4
4
  /** Headings collected from the document `layout` was computed from. */
5
5
  collected: readonly HeadingInfo[];
@@ -1,4 +1,11 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
+ import { DeepReadonly, OwnRecord } from "../types/documentModel.js";
3
+ /**
4
+ * A merge's own record: a merge with a source always builds a new top-level
5
+ * record, so its fields are the caller's to set, while its nested values (a
6
+ * border, a frame, the tab stops) stay shared with the inputs.
7
+ */
8
+ export type MergedParagraphFormatting = OwnRecord<document_d_exports.ParagraphFormatting>;
2
9
  /**
3
10
  * Merge custom tab stops across OOXML paragraph-property layers.
4
11
  *
@@ -8,8 +15,8 @@ import { document_d_exports } from "../types/document.js";
8
15
  * clear entry also lets the tab calculator suppress an automatic stop at the
9
16
  * same position.
10
17
  */
11
- export declare function mergeParagraphTabStops(inherited: document_d_exports.TabStop[] | undefined, direct: document_d_exports.TabStop[]): document_d_exports.TabStop[];
12
- export declare function mergeParagraphTabStops(inherited: document_d_exports.TabStop[] | undefined, direct: document_d_exports.TabStop[] | undefined): document_d_exports.TabStop[] | undefined;
18
+ export declare function mergeParagraphTabStops<Stop extends DeepReadonly<document_d_exports.TabStop>>(inherited: readonly Stop[] | undefined, direct: readonly Stop[]): Stop[];
19
+ export declare function mergeParagraphTabStops<Stop extends DeepReadonly<document_d_exports.TabStop>>(inherited: readonly Stop[] | undefined, direct: readonly Stop[] | undefined): Stop[] | undefined;
13
20
  /**
14
21
  * Merge paragraph properties for OOXML style cascade resolution.
15
22
  *
@@ -18,4 +25,5 @@ export declare function mergeParagraphTabStops(inherited: document_d_exports.Tab
18
25
  * tabs merge by position; paragraph mark `w:rPr` uses the run-formatting
19
26
  * merge rules.
20
27
  */
21
- export declare function mergeParagraphFormatting(target: document_d_exports.ParagraphFormatting | undefined, source: document_d_exports.ParagraphFormatting | undefined): document_d_exports.ParagraphFormatting | undefined;
28
+ export declare function mergeParagraphFormatting(target: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined, source: DeepReadonly<document_d_exports.ParagraphFormatting>): MergedParagraphFormatting;
29
+ export declare function mergeParagraphFormatting(target: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined, source: DeepReadonly<document_d_exports.ParagraphFormatting> | undefined): DeepReadonly<document_d_exports.ParagraphFormatting> | undefined;
@@ -65,14 +65,6 @@ const withoutPreservedMarkup = (formatting) => {
65
65
  const { preserved: _preserved, indentPreservedAttributes: _indentPreservedAttributes, spacingPreservedAttributes: _spacingPreservedAttributes, ...resolved } = formatting;
66
66
  return resolved;
67
67
  };
68
- /**
69
- * Merge paragraph properties for OOXML style cascade resolution.
70
- *
71
- * The source is the higher-priority layer. Most `w:pPr` properties replace an
72
- * inherited value when present; nested child containers merge by child field;
73
- * tabs merge by position; paragraph mark `w:rPr` uses the run-formatting
74
- * merge rules.
75
- */
76
68
  function mergeParagraphFormatting(target, source) {
77
69
  if (!source) return target;
78
70
  if (!target) {