@stll/folio-core 0.15.0 → 0.15.2

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 (449) hide show
  1. package/dist/ai-edits/apply.d.ts +2 -2
  2. package/dist/ai-edits/blockRange.d.ts +3 -17
  3. package/dist/ai-edits/clean-text.d.ts +0 -1
  4. package/dist/ai-edits/headless.d.ts +23 -19
  5. package/dist/ai-edits/read.d.ts +8 -5
  6. package/dist/ai-edits/scoped-reading.d.ts +0 -1
  7. package/dist/ai-edits/snapshot.d.ts +1 -7
  8. package/dist/ai-edits/table-cell-mutations.d.ts +4 -31
  9. package/dist/ai-edits/table-row-column-mutations.d.ts +9 -39
  10. package/dist/ai-edits/table-targets.d.ts +0 -1
  11. package/dist/ai-edits/types.d.ts +32 -17
  12. package/dist/ai-suggestions/apply.d.ts +0 -1
  13. package/dist/ai-suggestions/conflict.d.ts +0 -1
  14. package/dist/ai-suggestions/text-positions.d.ts +2 -2
  15. package/dist/ai-suggestions/types.d.ts +27 -13
  16. package/dist/content-controls/errors.d.ts +0 -1
  17. package/dist/content-controls/findContentControls.d.ts +6 -4
  18. package/dist/content-controls/mutateContentControls.d.ts +0 -1
  19. package/dist/controller/activeEditorStory.d.ts +1 -6
  20. package/dist/controller/collaborationModules.d.ts +0 -1
  21. package/dist/controller/contentControlWidgetController.d.ts +0 -1
  22. package/dist/controller/folioEditor.d.ts +2 -2
  23. package/dist/controller/folioEditorEvents.d.ts +5 -3
  24. package/dist/controller/fontReadiness.d.ts +0 -1
  25. package/dist/controller/headerFooterEditorManager.d.ts +1 -5
  26. package/dist/controller/hiddenEditorApi.d.ts +35 -18
  27. package/dist/controller/hiddenEditorManager.d.ts +5 -3
  28. package/dist/controller/latestRequestGate.d.ts +3 -1
  29. package/dist/controller/layoutPipeline.d.ts +1 -1
  30. package/dist/controller/layoutScheduler.d.ts +8 -5
  31. package/dist/controller/layoutSession.d.ts +0 -1
  32. package/dist/controller/noteEditorManager.d.ts +0 -1
  33. package/dist/document-operations.d.ts +5 -12
  34. package/dist/document-stories.d.ts +0 -1
  35. package/dist/docx/blockContentParser.d.ts +0 -1
  36. package/dist/docx/blockContentParser.js +1 -0
  37. package/dist/docx/bookmarkParser.d.ts +5 -3
  38. package/dist/docx/bookmarkPlacement.d.ts +0 -1
  39. package/dist/docx/commentParser.d.ts +0 -1
  40. package/dist/docx/commentParser.js +30 -2
  41. package/dist/docx/commentRangeIntegrity.d.ts +0 -1
  42. package/dist/docx/commentReferenceNormalization.d.ts +1 -9
  43. package/dist/docx/commentReplyMarkers.d.ts +0 -1
  44. package/dist/docx/compatibility.d.ts +0 -1
  45. package/dist/docx/conformance.d.ts +0 -1
  46. package/dist/docx/corePropertiesParser.d.ts +0 -1
  47. package/dist/docx/documentParser.d.ts +0 -1
  48. package/dist/docx/documentParser.js +3 -1
  49. package/dist/docx/drawingIdNormalization.d.ts +5 -0
  50. package/dist/docx/drawingIdNormalization.js +35 -0
  51. package/dist/docx/drawingUtils.d.ts +24 -3
  52. package/dist/docx/drawingUtils.js +134 -28
  53. package/dist/docx/encryption/agileDecryption.d.ts +0 -1
  54. package/dist/docx/encryption/cryptoBytes.js +4 -1
  55. package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -2
  56. package/dist/docx/ensureParaIds.d.ts +7 -3
  57. package/dist/docx/fieldParser.d.ts +23 -11
  58. package/dist/docx/fontTableParser.d.ts +0 -1
  59. package/dist/docx/footnoteParser.d.ts +26 -13
  60. package/dist/docx/footnoteParser.js +4 -2
  61. package/dist/docx/groupDrawingParser.d.ts +0 -1
  62. package/dist/docx/headerFooterParser.d.ts +9 -5
  63. package/dist/docx/headerFooterRefParser.d.ts +0 -1
  64. package/dist/docx/headerFooterReferenceNormalization.d.ts +1 -6
  65. package/dist/docx/headerFooterVerbatim.d.ts +4 -3
  66. package/dist/docx/headerFooterVerbatim.js +6 -1
  67. package/dist/docx/hyperlinkParser.d.ts +0 -1
  68. package/dist/docx/hyperlinkParser.js +1 -9
  69. package/dist/docx/imageParser.d.ts +0 -1
  70. package/dist/docx/imageParser.js +15 -7
  71. package/dist/docx/mathToMathml.d.ts +0 -1
  72. package/dist/docx/metadataPrivacy.d.ts +1 -3
  73. package/dist/docx/modelValidation.d.ts +0 -1
  74. package/dist/docx/newImage.d.ts +11 -0
  75. package/dist/docx/newImage.js +11 -0
  76. package/dist/docx/normalizeBaseDirection.d.ts +0 -1
  77. package/dist/docx/notePropertiesParser.d.ts +0 -1
  78. package/dist/docx/numberingParser.d.ts +10 -6
  79. package/dist/docx/numberingParser.js +4 -2
  80. package/dist/docx/numberingReferenceNormalization.d.ts +1 -9
  81. package/dist/docx/paragraphParser.d.ts +0 -1
  82. package/dist/docx/paragraphParser.js +31 -15
  83. package/dist/docx/paragraphTextBoxEnrichment.d.ts +0 -1
  84. package/dist/docx/paragraphTextBoxEnrichment.js +2 -1
  85. package/dist/docx/paragraphTraversal.d.ts +5 -10
  86. package/dist/docx/paragraphTraversal.js +20 -13
  87. package/dist/docx/parser.d.ts +15 -8
  88. package/dist/docx/parser.js +22 -1
  89. package/dist/docx/parserEnums.d.ts +5 -2
  90. package/dist/docx/parserEnums.js +6 -2
  91. package/dist/docx/relsParser.d.ts +1 -0
  92. package/dist/docx/renderedPageBreakNormalization.d.ts +12 -0
  93. package/dist/docx/renderedPageBreakNormalization.js +59 -0
  94. package/dist/docx/replyToComment.d.ts +2 -2
  95. package/dist/docx/rezip.d.ts +6 -7
  96. package/dist/docx/rezip.js +136 -102
  97. package/dist/docx/runConsolidator.d.ts +0 -1
  98. package/dist/docx/runConsolidator.js +0 -1
  99. package/dist/docx/runParser.d.ts +0 -1
  100. package/dist/docx/runParser.js +25 -12
  101. package/dist/docx/sdtProperties.d.ts +0 -1
  102. package/dist/docx/sdtPropertiesPatch.d.ts +0 -1
  103. package/dist/docx/sectionParser.d.ts +0 -1
  104. package/dist/docx/selectiveSave.d.ts +5 -3
  105. package/dist/docx/selectiveSave.js +2 -2
  106. package/dist/docx/selectiveSaveFlags.d.ts +4 -2
  107. package/dist/docx/selectiveXmlPatch.js +20 -8
  108. package/dist/docx/serializer/blockSdtSerializer.d.ts +0 -1
  109. package/dist/docx/serializer/blockSdtSerializer.js +2 -1
  110. package/dist/docx/serializer/borderSerializer.d.ts +0 -1
  111. package/dist/docx/serializer/commentSerializer.d.ts +0 -1
  112. package/dist/docx/serializer/commentSerializer.js +19 -40
  113. package/dist/docx/serializer/documentSerializer.d.ts +0 -1
  114. package/dist/docx/serializer/documentSerializer.js +1 -1
  115. package/dist/docx/serializer/fontTableSerializer.d.ts +0 -1
  116. package/dist/docx/serializer/headerFooterSerializer.d.ts +0 -1
  117. package/dist/docx/serializer/headerFooterSerializer.js +1 -1
  118. package/dist/docx/serializer/noteSerializer.d.ts +0 -1
  119. package/dist/docx/serializer/noteSerializer.js +1 -1
  120. package/dist/docx/serializer/numberingSerializer.d.ts +0 -1
  121. package/dist/docx/serializer/paragraphSerializer.d.ts +0 -1
  122. package/dist/docx/serializer/paragraphSerializer.js +10 -23
  123. package/dist/docx/serializer/runSerializer.d.ts +0 -1
  124. package/dist/docx/serializer/runSerializer.js +53 -32
  125. package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +0 -1
  126. package/dist/docx/serializer/sectionPropertiesSerializer.js +7 -5
  127. package/dist/docx/serializer/settingsSerializer.d.ts +0 -1
  128. package/dist/docx/serializer/stylesSerializer.d.ts +0 -1
  129. package/dist/docx/serializer/tableSerializer.d.ts +0 -1
  130. package/dist/docx/serializer/tableSerializer.js +2 -0
  131. package/dist/docx/serializer/themeSerializer.d.ts +0 -1
  132. package/dist/docx/serializer/xmlUtils.js +10 -1
  133. package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +3 -10
  134. package/dist/docx/server/docxToMarkdown.d.ts +0 -1
  135. package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +3 -9
  136. package/dist/docx/server/inspectDocxPackage.d.ts +3 -8
  137. package/dist/docx/server/validateDocxConformance.d.ts +0 -1
  138. package/dist/docx/settingsParser.d.ts +2 -2
  139. package/dist/docx/shapeParser.d.ts +0 -1
  140. package/dist/docx/shapeParser.js +16 -123
  141. package/dist/docx/streamingXmlParser.d.ts +16 -0
  142. package/dist/docx/streamingXmlParser.js +248 -0
  143. package/dist/docx/styleParser.d.ts +0 -1
  144. package/dist/docx/styleParser.js +6 -4
  145. package/dist/docx/tableParser.d.ts +1 -2
  146. package/dist/docx/tableParser.js +11 -12
  147. package/dist/docx/textBoxParser.d.ts +1 -2
  148. package/dist/docx/textBoxParser.js +5 -2
  149. package/dist/docx/textWhitespace.d.ts +4 -0
  150. package/dist/docx/textWhitespace.js +4 -0
  151. package/dist/docx/themeParser.d.ts +0 -1
  152. package/dist/docx/trackedMoveRangeNormalization.d.ts +1 -8
  153. package/dist/docx/unzip.d.ts +6 -3
  154. package/dist/docx/unzip.js +96 -40
  155. package/dist/docx/vmlImageParser.d.ts +0 -1
  156. package/dist/docx/vmlImageParser.js +3 -1
  157. package/dist/docx/watermarkParser.d.ts +0 -1
  158. package/dist/docx/xmlParser.d.ts +21 -8
  159. package/dist/docx/xmlParser.js +126 -43
  160. package/dist/fields/bookmarkPages.d.ts +0 -1
  161. package/dist/fields/bookmarkText.d.ts +0 -1
  162. package/dist/fields/evaluateField.d.ts +5 -3
  163. package/dist/fields/fieldContext.d.ts +11 -5
  164. package/dist/fields/resolveFieldValues.d.ts +4 -3
  165. package/dist/fields/sectionPageCounts.d.ts +0 -1
  166. package/dist/fields/seqValues.d.ts +0 -1
  167. package/dist/fonts/embeddedFontTable.d.ts +5 -2
  168. package/dist/fonts/embeddedFonts.d.ts +15 -7
  169. package/dist/index.d.ts +1 -0
  170. package/dist/layout-bridge/cellSelectionHighlight.d.ts +0 -1
  171. package/dist/layout-bridge/convert/footnoteLayout.d.ts +5 -3
  172. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +2 -2
  173. package/dist/layout-bridge/convert/paragraphFrames.d.ts +0 -1
  174. package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +8 -8
  175. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +25 -13
  176. package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +3 -2
  177. package/dist/layout-bridge/dom/findHfPmSpans.d.ts +2 -1
  178. package/dist/layout-bridge/dom/noteStoryDom.d.ts +0 -1
  179. package/dist/layout-bridge/engine/clickToPosition.d.ts +5 -3
  180. package/dist/layout-bridge/engine/hitTest.d.ts +40 -19
  181. package/dist/layout-bridge/engine/selectionRects.d.ts +16 -8
  182. package/dist/layout-bridge/engine/tableWidthUtils.d.ts +0 -1
  183. package/dist/layout-bridge/headerFooterLayout.d.ts +0 -1
  184. package/dist/layout-bridge/sectionColumns.d.ts +0 -1
  185. package/dist/layout-bridge/tableInsertHover.d.ts +8 -4
  186. package/dist/layout-engine/headerFooterRefs.d.ts +0 -1
  187. package/dist/layout-engine/index.d.ts +0 -1
  188. package/dist/layout-engine/justificationCompatibility.d.ts +0 -1
  189. package/dist/layout-engine/keep-together.d.ts +7 -4
  190. package/dist/layout-engine/layoutInstrumentation.d.ts +0 -1
  191. package/dist/layout-engine/lineFlow.d.ts +0 -1
  192. package/dist/layout-engine/measure/cache.d.ts +0 -1
  193. package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +6 -7
  194. package/dist/layout-engine/measure/floatingTablePosition.d.ts +0 -1
  195. package/dist/layout-engine/measure/floatingZones.d.ts +14 -6
  196. package/dist/layout-engine/measure/font-metrics.worker.d.ts +0 -1
  197. package/dist/layout-engine/measure/lineBreakProvider.d.ts +20 -9
  198. package/dist/layout-engine/measure/lineBreaks.d.ts +0 -1
  199. package/dist/layout-engine/measure/listMarkerWidth.d.ts +0 -1
  200. package/dist/layout-engine/measure/measureBlocks.d.ts +1 -0
  201. package/dist/layout-engine/measure/measureContainer.d.ts +0 -1
  202. package/dist/layout-engine/measure/measureHelpers.d.ts +0 -1
  203. package/dist/layout-engine/measure/measureParagraph.d.ts +3 -2
  204. package/dist/layout-engine/measure/measureParagraph.js +23 -3
  205. package/dist/layout-engine/measure/measureProvider.d.ts +0 -1
  206. package/dist/layout-engine/measure/measureTypes.d.ts +4 -2
  207. package/dist/layout-engine/measure/measureWorker.d.ts +0 -1
  208. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +0 -1
  209. package/dist/layout-engine/measure/tableCellFloating.d.ts +0 -1
  210. package/dist/layout-engine/measure/tableCellFlow.d.ts +0 -1
  211. package/dist/layout-engine/measure/tableCellGrid.d.ts +0 -1
  212. package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +0 -1
  213. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +0 -1
  214. package/dist/layout-engine/paginator.d.ts +66 -33
  215. package/dist/layout-engine/paragraphFragmentRange.d.ts +0 -1
  216. package/dist/layout-engine/paragraphFrame.d.ts +0 -1
  217. package/dist/layout-engine/paragraphSequence.d.ts +0 -1
  218. package/dist/layout-engine/paragraphSpacing.d.ts +1 -5
  219. package/dist/layout-engine/pmPageIndex.d.ts +0 -1
  220. package/dist/layout-engine/renderedBreakReconciliation.d.ts +2 -17
  221. package/dist/layout-engine/section-breaks.d.ts +34 -17
  222. package/dist/layout-engine/tableRowBreak.d.ts +4 -3
  223. package/dist/layout-engine/textBoxFlow.d.ts +0 -1
  224. package/dist/layout-engine/textBoxGroup.d.ts +0 -1
  225. package/dist/layout-engine/types.d.ts +382 -189
  226. package/dist/layout-painter/anchoredImagePosition.d.ts +0 -1
  227. package/dist/layout-painter/borderStroke.d.ts +0 -1
  228. package/dist/layout-painter/imageLayout.d.ts +14 -7
  229. package/dist/layout-painter/index.d.ts +9 -5
  230. package/dist/layout-painter/registry/modules/image.d.ts +0 -1
  231. package/dist/layout-painter/registry/modules/paragraph.d.ts +0 -1
  232. package/dist/layout-painter/registry/modules/table.d.ts +0 -1
  233. package/dist/layout-painter/registry/modules/textBox.d.ts +0 -1
  234. package/dist/layout-painter/registry/modules.d.ts +0 -1
  235. package/dist/layout-painter/registry/registry.d.ts +0 -1
  236. package/dist/layout-painter/registry/types.d.ts +0 -1
  237. package/dist/layout-painter/renderFragment.d.ts +2 -2
  238. package/dist/layout-painter/renderImage.d.ts +0 -1
  239. package/dist/layout-painter/renderPage.d.ts +71 -42
  240. package/dist/layout-painter/renderParagraph.d.ts +28 -14
  241. package/dist/layout-painter/renderParagraph.js +6 -2
  242. package/dist/layout-painter/renderTable.d.ts +0 -1
  243. package/dist/layout-painter/renderTextBox.d.ts +0 -1
  244. package/dist/layout-painter/renderUtils.d.ts +17 -9
  245. package/dist/layout-painter/renderWatermark.d.ts +2 -2
  246. package/dist/layout-painter/sdtBoundary.d.ts +0 -1
  247. package/dist/managers/AutoSaveManager.d.ts +22 -11
  248. package/dist/managers/ClipboardManager.d.ts +0 -1
  249. package/dist/managers/ContextMenuManager.d.ts +5 -8
  250. package/dist/managers/DocumentLoaderManager.d.ts +12 -6
  251. package/dist/managers/EditorModeManager.d.ts +3 -2
  252. package/dist/managers/ErrorManager.d.ts +0 -1
  253. package/dist/managers/FindReplaceManager.d.ts +0 -1
  254. package/dist/managers/HistoryManager.d.ts +19 -9
  255. package/dist/managers/TableSelectionManager.d.ts +0 -1
  256. package/dist/managers/editorShortcuts.d.ts +4 -6
  257. package/dist/markdown/annotations.d.ts +0 -1
  258. package/dist/markdown/fromMarkdown.d.ts +0 -1
  259. package/dist/markdown/images.d.ts +0 -1
  260. package/dist/markdown/index.d.ts +0 -1
  261. package/dist/markdown/internals.d.ts +0 -1
  262. package/dist/markdown/renderBlock.d.ts +0 -1
  263. package/dist/markdown/renderParagraph.d.ts +0 -1
  264. package/dist/markdown/renderRuns.d.ts +0 -1
  265. package/dist/markdown/renderTable.d.ts +0 -1
  266. package/dist/markdown/trailers.d.ts +0 -1
  267. package/dist/markdown/types.d.ts +39 -18
  268. package/dist/model.d.ts +3 -5
  269. package/dist/model.js +2 -2
  270. package/dist/paged-layout/incrementalMeasure.d.ts +1 -10
  271. package/dist/paged-layout/pageText.d.ts +1 -1
  272. package/dist/paged-layout/paragraphFlash.d.ts +0 -1
  273. package/dist/paged-layout/paragraphFlashTypes.d.ts +5 -2
  274. package/dist/paged-layout/rangeProjection.d.ts +10 -5
  275. package/dist/paged-layout/scrollNavigation.d.ts +0 -1
  276. package/dist/paged-layout/scrollPageInfo.d.ts +12 -13
  277. package/dist/paged-layout/scrollToPmPosition.d.ts +0 -1
  278. package/dist/paged-layout/sectionBlockWidths.d.ts +2 -11
  279. package/dist/paged-layout/sectionGeometry.d.ts +0 -1
  280. package/dist/paged-layout/selectionViewportRect.d.ts +0 -1
  281. package/dist/paged-layout/transactionDirtyRange.d.ts +0 -1
  282. package/dist/paged-layout/zoomScrollAnchor.d.ts +2 -12
  283. package/dist/prosemirror/attrs/index.d.ts +6 -4
  284. package/dist/prosemirror/attrs/index.js +22 -2
  285. package/dist/prosemirror/autospacingBase.d.ts +0 -1
  286. package/dist/prosemirror/cellDragSelection.d.ts +6 -4
  287. package/dist/prosemirror/commands/comments.d.ts +6 -4
  288. package/dist/prosemirror/commands/contentControls.d.ts +5 -3
  289. package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +1 -1
  290. package/dist/prosemirror/commands/formatPainter.d.ts +0 -1
  291. package/dist/prosemirror/commands/formatting.d.ts +1 -1
  292. package/dist/prosemirror/commands/hyperlink.d.ts +4 -9
  293. package/dist/prosemirror/commands/image.d.ts +0 -1
  294. package/dist/prosemirror/commands/pageBreak.d.ts +0 -1
  295. package/dist/prosemirror/commands/paragraph.d.ts +0 -1
  296. package/dist/prosemirror/commands/pastePlainText.d.ts +0 -1
  297. package/dist/prosemirror/commands/propertyChangeScope.d.ts +0 -1
  298. package/dist/prosemirror/commands/sectionBreak.d.ts +0 -1
  299. package/dist/prosemirror/commands/table.d.ts +0 -1
  300. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -1
  301. package/dist/prosemirror/commentIdAllocator.d.ts +2 -2
  302. package/dist/prosemirror/commentOps.d.ts +0 -1
  303. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +1 -10
  304. package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -1
  305. package/dist/prosemirror/conversion/fromProseDoc.js +17 -10
  306. package/dist/prosemirror/conversion/runShadingMark.d.ts +0 -1
  307. package/dist/prosemirror/conversion/sdtAttrs.d.ts +0 -1
  308. package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -2
  309. package/dist/prosemirror/conversion/toProseDoc.js +17 -3
  310. package/dist/prosemirror/extensions/ExtensionManager.d.ts +0 -1
  311. package/dist/prosemirror/extensions/StarterKit.d.ts +7 -4
  312. package/dist/prosemirror/extensions/core/DocExtension.d.ts +0 -1
  313. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -1
  314. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +0 -1
  315. package/dist/prosemirror/extensions/core/TextExtension.d.ts +0 -1
  316. package/dist/prosemirror/extensions/create.d.ts +0 -1
  317. package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +0 -1
  318. package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +0 -1
  319. package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +0 -1
  320. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +0 -1
  321. package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +0 -1
  322. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +0 -1
  323. package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +0 -1
  324. package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +0 -1
  325. package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +0 -1
  326. package/dist/prosemirror/extensions/features/ListExtension.d.ts +0 -1
  327. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -1
  328. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +7 -4
  329. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +0 -1
  330. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +0 -1
  331. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +0 -1
  332. package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +3 -1
  333. package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +0 -1
  334. package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +0 -1
  335. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +0 -1
  336. package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +0 -1
  337. package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +0 -1
  338. package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +0 -1
  339. package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +1 -0
  340. package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +0 -1
  341. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +0 -1
  342. package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +0 -1
  343. package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +0 -1
  344. package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +0 -1
  345. package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +0 -1
  346. package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +0 -1
  347. package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +0 -1
  348. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +0 -1
  349. package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +0 -1
  350. package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +0 -1
  351. package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +0 -1
  352. package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +0 -1
  353. package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +0 -1
  354. package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +0 -1
  355. package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +0 -1
  356. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +0 -1
  357. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +0 -1
  358. package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +0 -1
  359. package/dist/prosemirror/extensions/marks/markUtils.d.ts +0 -1
  360. package/dist/prosemirror/extensions/marks/markUtils.js +4 -1
  361. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +0 -1
  362. package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +0 -1
  363. package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +0 -1
  364. package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +0 -1
  365. package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +0 -1
  366. package/dist/prosemirror/extensions/nodes/ImageExtension.js +2 -0
  367. package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +0 -1
  368. package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +0 -1
  369. package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +0 -1
  370. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +0 -1
  371. package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +0 -1
  372. package/dist/prosemirror/extensions/nodes/ShapeExtension.js +2 -0
  373. package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +0 -1
  374. package/dist/prosemirror/extensions/nodes/TabExtension.js +32 -9
  375. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +4 -3
  376. package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +0 -1
  377. package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +53 -27
  378. package/dist/prosemirror/extensions/types.d.ts +0 -1
  379. package/dist/prosemirror/findReplaceSelection.d.ts +5 -3
  380. package/dist/prosemirror/imageCommit.d.ts +0 -1
  381. package/dist/prosemirror/index.d.ts +4 -0
  382. package/dist/prosemirror/insertOperations.d.ts +0 -1
  383. package/dist/prosemirror/paraText.d.ts +0 -1
  384. package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +2 -2
  385. package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +0 -1
  386. package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +9 -7
  387. package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +2 -2
  388. package/dist/prosemirror/plugins/contentControlWidgets.d.ts +4 -7
  389. package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +3 -8
  390. package/dist/prosemirror/plugins/documentStyles.d.ts +0 -1
  391. package/dist/prosemirror/plugins/pmTextScan.d.ts +2 -2
  392. package/dist/prosemirror/plugins/revisionIds.d.ts +0 -1
  393. package/dist/prosemirror/plugins/selectionTracker.d.ts +23 -12
  394. package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -1
  395. package/dist/prosemirror/plugins/templateDirectives.d.ts +10 -8
  396. package/dist/prosemirror/plugins/templatePreviewValues.d.ts +10 -5
  397. package/dist/prosemirror/plugins/templateSlashMenu.d.ts +2 -2
  398. package/dist/prosemirror/queries.d.ts +0 -1
  399. package/dist/prosemirror/schema/index.d.ts +2 -3
  400. package/dist/prosemirror/schema/marks.d.ts +8 -5
  401. package/dist/prosemirror/schema/nodes.d.ts +344 -164
  402. package/dist/prosemirror/selectionState.d.ts +13 -7
  403. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +0 -1
  404. package/dist/prosemirror/styles/styleResolver.d.ts +3 -2
  405. package/dist/prosemirror/tableCellMergeRevision.d.ts +0 -1
  406. package/dist/prosemirror/tableResize.d.ts +0 -1
  407. package/dist/prosemirror/textBoxAnchorAttrs.d.ts +0 -1
  408. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +8 -5
  409. package/dist/prosemirror/utils/findParagraphByParaId.d.ts +0 -1
  410. package/dist/prosemirror/utils/tabCalculator.d.ts +18 -7
  411. package/dist/prosemirror/utils/visualLineNavigation.d.ts +0 -1
  412. package/dist/prosemirror/validation.d.ts +0 -1
  413. package/dist/prosemirror/validation.js +5 -3
  414. package/dist/redline.d.ts +16 -8
  415. package/dist/render-dom/BodySelectionOverlay.d.ts +1 -9
  416. package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +0 -1
  417. package/dist/render-dom/RemoteSelectionOverlay.d.ts +1 -8
  418. package/dist/render-dom/resolveSidebarItemPositions.d.ts +1 -9
  419. package/dist/style-engine/styleEngine.d.ts +21 -11
  420. package/dist/style-sets/extract.d.ts +4 -3
  421. package/dist/style-sets/stellaStyle.d.ts +0 -1
  422. package/dist/style-sets/types.d.ts +0 -1
  423. package/dist/symbols.d.ts +6 -2
  424. package/dist/types/block-id.d.ts +3 -6
  425. package/dist/types/content.d.ts +2 -2
  426. package/dist/types/document.d.ts +0 -3
  427. package/dist/types/documentEnumValues.d.ts +5 -1
  428. package/dist/types/documentEnumValues.js +19 -1
  429. package/dist/types/index.d.ts +2 -1
  430. package/dist/utils/clipboard.d.ts +17 -8
  431. package/dist/utils/colorResolver.d.ts +9 -5
  432. package/dist/utils/createDocument.d.ts +19 -10
  433. package/dist/utils/documentLoaderBehavior.d.ts +1 -5
  434. package/dist/utils/docxInput.js +1 -0
  435. package/dist/utils/findReplace.d.ts +0 -1
  436. package/dist/utils/fontFamilyMerge.d.ts +0 -1
  437. package/dist/utils/fontResolver.d.ts +10 -4
  438. package/dist/utils/formatToStyle.d.ts +0 -1
  439. package/dist/utils/headerFooter.d.ts +8 -16
  440. package/dist/utils/headingCollector.d.ts +7 -4
  441. package/dist/utils/mergeDocumentContent.d.ts +0 -1
  442. package/dist/utils/paragraphFormattingMerge.d.ts +0 -1
  443. package/dist/utils/replaceText.d.ts +0 -1
  444. package/dist/utils/rotationBoundingBox.d.ts +0 -1
  445. package/dist/utils/tableOperations.d.ts +0 -1
  446. package/dist/utils/textFormattingMerge.d.ts +0 -1
  447. package/dist/version-comparison.d.ts +12 -6
  448. package/dist/watermark/index.d.ts +0 -1
  449. package/package.json +3 -3
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock, Page } from "../layout-engine/types.js";
2
-
3
2
  //#region src/fields/bookmarkPages.d.ts
4
3
  /**
5
4
  * Map each bookmark name to the 1-indexed page its anchoring paragraph lands on,
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock } from "../layout-engine/types.js";
2
-
3
2
  //#region src/fields/bookmarkText.d.ts
4
3
  type BookmarkTextInputs = {
5
4
  fieldValues?: ReadonlyMap<number, string>;
@@ -1,10 +1,12 @@
1
1
  import { ParsedFieldInstruction } from "../docx/fieldParser.js";
2
2
  import { FieldContext } from "./fieldContext.js";
3
-
4
3
  //#region src/fields/evaluateField.d.ts
5
4
  type EvaluateFieldOptions = {
6
- /** Shown for unsupported field types and unresolved references. */fallback?: string; /** Run identity (`pmStart`) used to look up a precomputed SEQ value. */
7
- instanceId?: number; /** Locked fields preserve their cached result instead of recalculating. */
5
+ /** Shown for unsupported field types and unresolved references. */
6
+ fallback?: string;
7
+ /** Run identity (`pmStart`) used to look up a precomputed SEQ value. */
8
+ instanceId?: number;
9
+ /** Locked fields preserve their cached result instead of recalculating. */
8
10
  locked?: boolean;
9
11
  };
10
12
  /**
@@ -7,14 +7,20 @@
7
7
  * layout so a field paints the same value its width was measured against.
8
8
  */
9
9
  type FieldContext = {
10
- /** 1-indexed page the field is on (PAGE). */pageNumber: number; /** Total pages in the document (NUMPAGES). */
10
+ /** 1-indexed page the field is on (PAGE). */
11
+ pageNumber: number;
12
+ /** Total pages in the document (NUMPAGES). */
11
13
  totalPages: number;
12
14
  /** Pages in the field's current section (SECTIONPAGES); omit until the
13
15
  * per-section page counts are available, in which case the field falls back. */
14
- sectionPages?: number; /** Bookmark name -> 1-indexed page it lands on (PAGEREF). */
15
- bookmarkPages: ReadonlyMap<string, number>; /** Bookmark name -> resolved display text (REF). */
16
- bookmarkText: ReadonlyMap<string, string>; /** Field instance id (the run's `pmStart`) -> precomputed SEQ value. */
17
- seqValues: ReadonlyMap<number, number>; /** Clock for DATE/TIME-family fields; passed in so evaluation stays pure. */
16
+ sectionPages?: number;
17
+ /** Bookmark name -> 1-indexed page it lands on (PAGEREF). */
18
+ bookmarkPages: ReadonlyMap<string, number>;
19
+ /** Bookmark name -> resolved display text (REF). */
20
+ bookmarkText: ReadonlyMap<string, string>;
21
+ /** Field instance id (the run's `pmStart`) -> precomputed SEQ value. */
22
+ seqValues: ReadonlyMap<number, number>;
23
+ /** Clock for DATE/TIME-family fields; passed in so evaluation stays pure. */
18
24
  now: Date;
19
25
  };
20
26
  //#endregion
@@ -1,18 +1,19 @@
1
1
  import { FlowBlock, Page } from "../layout-engine/types.js";
2
-
3
2
  //#region src/fields/resolveFieldValues.d.ts
4
3
  /** Layout-derived inputs shared by every field, regardless of its position. */
5
4
  type SharedFieldInputs = {
6
5
  totalPages: number;
7
6
  bookmarkPages: ReadonlyMap<string, number>;
8
7
  bookmarkText: ReadonlyMap<string, string>;
9
- seqValues: ReadonlyMap<number, number>; /** Section index -> page count, for SECTIONPAGES. */
8
+ seqValues: ReadonlyMap<number, number>;
9
+ /** Section index -> page count, for SECTIONPAGES. */
10
10
  sectionPageCounts: ReadonlyMap<number, number>;
11
11
  now: Date;
12
12
  };
13
13
  type HeaderFooterFieldInputs = Pick<SharedFieldInputs, "bookmarkPages" | "bookmarkText" | "seqValues" | "sectionPageCounts">;
14
14
  type ResolvedFieldValues = {
15
- /** Field run `pmStart` -> resolved display text. */values: Map<number, string>;
15
+ /** Field run `pmStart` -> resolved display text. */
16
+ values: Map<number, string>;
16
17
  /**
17
18
  * True when at least one field resolved to a string that differs from the
18
19
  * text it was measured at (`fallback || "1"`), i.e. a re-measure would change
@@ -1,5 +1,4 @@
1
1
  import { Page } from "../layout-engine/types.js";
2
-
3
2
  //#region src/fields/sectionPageCounts.d.ts
4
3
  /**
5
4
  * Count how many pages belong to each section (by `Page.sectionIndex`, defaulting
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock } from "../layout-engine/types.js";
2
-
3
2
  //#region src/fields/seqValues.d.ts
4
3
  /**
5
4
  * Assign each SEQ field instance its sequence number in document order, keyed by
@@ -20,8 +20,11 @@
20
20
  */
21
21
  /** A single embedded face referenced from a `w:embed*` element. */
22
22
  type EmbeddedFontFaceRef = {
23
- /** Relationship id (`r:id`) resolved via `word/_rels/fontTable.xml.rels`. */relId: string; /** Obfuscation key GUID (`w:fontKey`), e.g. `{XXXXXXXX-...}`. */
24
- fontKey?: string; /** Whether the embedded face is subsetted (`w:subsetted`). */
23
+ /** Relationship id (`r:id`) resolved via `word/_rels/fontTable.xml.rels`. */
24
+ relId: string;
25
+ /** Obfuscation key GUID (`w:fontKey`), e.g. `{XXXXXXXX-...}`. */
26
+ fontKey?: string;
27
+ /** Whether the embedded face is subsetted (`w:subsetted`). */
25
28
  subsetted?: boolean;
26
29
  };
27
30
  /** One `<w:font>` entry with whichever of the four embed faces it declares. */
@@ -31,17 +31,25 @@ type EmbeddedFont = {
31
31
  * {@link buildEmbeddedFontFamilyMap}) to resolve document runs, which
32
32
  * still reference the font by its original DOCX name, to this family.
33
33
  */
34
- family: string; /** Original Word font name (`w:font w:name`), before scoping. */
35
- originalFamily: string; /** CSS `font-style` the face maps to (`embed*Italic` `italic`). */
36
- style: "normal" | "italic"; /** CSS `font-weight` the face maps to (`embedBold*` → `700`). */
37
- weight: 400 | 700; /** De-obfuscated OpenType/TrueType bytes (backed by a fresh, non-shared buffer). */
38
- bytes: Uint8Array<ArrayBuffer>; /** Whether the source face was subsetted (`w:subsetted`). */
34
+ family: string;
35
+ /** Original Word font name (`w:font w:name`), before scoping. */
36
+ originalFamily: string;
37
+ /** CSS `font-style` the face maps to (`embed*Italic` `italic`). */
38
+ style: "normal" | "italic";
39
+ /** CSS `font-weight` the face maps to (`embedBold*` → `700`). */
40
+ weight: 400 | 700;
41
+ /** De-obfuscated OpenType/TrueType bytes (backed by a fresh, non-shared buffer). */
42
+ bytes: Uint8Array<ArrayBuffer>;
43
+ /** Whether the source face was subsetted (`w:subsetted`). */
39
44
  subsetted: boolean;
40
45
  };
41
46
  /** Already-unzipped package parts the pure extractor needs. */
42
47
  type EmbeddedFontParts = {
43
- /** Raw `word/fontTable.xml`. */fontTableXml: string | null | undefined; /** Raw `word/_rels/fontTable.xml.rels`. */
44
- fontTableRelsXml: string | null | undefined; /** Unzipped font binaries keyed by package path (e.g. `word/fonts/font1.odttf`). */
48
+ /** Raw `word/fontTable.xml`. */
49
+ fontTableXml: string | null | undefined;
50
+ /** Raw `word/_rels/fontTable.xml.rels`. */
51
+ fontTableRelsXml: string | null | undefined;
52
+ /** Unzipped font binaries keyed by package path (e.g. `word/fonts/font1.odttf`). */
45
53
  fonts: ReadonlyMap<string, ArrayBuffer>;
46
54
  };
47
55
  /**
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { ApplyFolioDocumentOperationsOptions, FOLIO_DOCUMENT_OPERATION_BATCH_MOD
5
5
  import { createFolioAIEditSnapshot, hashFolioAIBlockText, normalizeFolioAIBlockText } from "./ai-edits/snapshot.js";
6
6
  import { DeriveBlockIdInput, FolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
7
7
  import { WordDiffSegment, diffWordSegments } from "./ai-edits/word-diff.js";
8
+ import "./ai-edits/index.js";
8
9
  import { AIBarStatus, AIChatMode, AICitation, AICitationSource, AIGenerateInput, AISuggestion, AISuggestionApplyMode, AISuggestionPreset, AISuggestionSeverity, AISuggestionStatus, DEFAULT_AI_SUGGESTION_PRESETS } from "./ai-suggestions/types.js";
9
10
  import { ApplyResult, applySuggestions } from "./ai-suggestions/apply.js";
10
11
  import { ResolvedAnchor, isSuggestionStale, resolveSuggestionAnchor } from "./ai-suggestions/conflict.js";
@@ -1,5 +1,4 @@
1
1
  import { EditorState } from "prosemirror-state";
2
-
3
2
  //#region src/layout-bridge/cellSelectionHighlight.d.ts
4
3
  /**
5
4
  * Apply the `.layout-table-cell-selected` class to painted layout cells
@@ -1,13 +1,13 @@
1
1
  import { document_d_exports } from "../../types/document.js";
2
2
  import { FOOTNOTE_ENTRY_MARGIN_BOTTOM, FOOTNOTE_FALLBACK_LINE_HEIGHT, FOOTNOTE_SEPARATOR_HEIGHT, FlowBlock, FootnoteContent, Measure, Page } from "../../layout-engine/types.js";
3
3
  import { ToFlowBlocksOptions } from "./toFlowBlocks.js";
4
-
5
4
  //#region src/layout-bridge/convert/footnoteLayout.d.ts
6
5
  type MeasureBlocksFn = (blocks: FlowBlock[], contentWidth: number) => Measure[];
7
6
  type ConvertFootnoteOptions = {
8
7
  styles?: document_d_exports.StyleDefinitions | null;
9
8
  theme?: document_d_exports.Theme | null;
10
- measureBlocks?: MeasureBlocksFn; /** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
9
+ measureBlocks?: MeasureBlocksFn;
10
+ /** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
11
11
  defaultTabStopTwips?: number;
12
12
  lineBreakRules?: ToFlowBlocksOptions["lineBreakRules"];
13
13
  justificationCompatibility?: ToFlowBlocksOptions["justificationCompatibility"];
@@ -48,7 +48,9 @@ type NumberableNote = {
48
48
  */
49
49
  declare function computeNoteDisplayNumbers(notes: readonly NumberableNote[], refNoteIds: readonly number[]): Map<number, number>;
50
50
  type NoteDisplayNumberMaps = {
51
- /** footnote `w:id` → sequential display number */footnoteNumbers?: ReadonlyMap<number, number>; /** endnote `w:id` → sequential display number */
51
+ /** footnote `w:id` → sequential display number */
52
+ footnoteNumbers?: ReadonlyMap<number, number>;
53
+ /** endnote `w:id` → sequential display number */
52
54
  endnoteNumbers?: ReadonlyMap<number, number>;
53
55
  };
54
56
  /**
@@ -3,7 +3,6 @@ import { FlowBlock, HeaderFooterContent, ImageRun, ImageRunPosition, Measure, Pa
3
3
  import { ToFlowBlocksOptions } from "./toFlowBlocks.js";
4
4
  import { MeasureBlocksFn } from "./footnoteLayout.js";
5
5
  import { Node } from "prosemirror-model";
6
-
7
6
  //#region src/layout-bridge/convert/headerFooterLayout.d.ts
8
7
  type HeaderFooterMetrics = {
9
8
  section: "header" | "footer";
@@ -34,7 +33,8 @@ declare function calculateHeaderFooterMarginPushBounds(blocks: FlowBlock[], meas
34
33
  type ConvertHeaderFooterOptions = {
35
34
  styles?: document_d_exports.StyleDefinitions | null;
36
35
  theme?: document_d_exports.Theme | null;
37
- measureBlocks: MeasureBlocksFn; /** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
36
+ measureBlocks: MeasureBlocksFn;
37
+ /** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
38
38
  defaultTabStopTwips?: number;
39
39
  lineBreakRules?: ToFlowBlocksOptions["lineBreakRules"];
40
40
  justificationCompatibility?: ToFlowBlocksOptions["justificationCompatibility"];
@@ -1,5 +1,4 @@
1
1
  import { BlockId, FlowBlock } from "../../layout-engine/types.js";
2
-
3
2
  //#region src/layout-bridge/convert/paragraphFrames.d.ts
4
3
  type BlockIdFactory = () => BlockId;
5
4
  declare function groupParagraphFrames(blocks: FlowBlock[], nextBlockId: BlockIdFactory): FlowBlock[];
@@ -1,15 +1,18 @@
1
1
  import { TemplatePreviewValue } from "../../prosemirror/plugins/templatePreviewValues.js";
2
2
  import { FlowBlock } from "../../layout-engine/types.js";
3
-
4
3
  //#region src/layout-bridge/convert/templatePreviewFlow.d.ts
5
4
  /** One marker→value substitution, in PM doc positions. */
6
5
  type TemplatePreviewFlowEntry = {
7
- /** Inclusive PM doc position of the marker start. */from: number; /** Exclusive PM doc position of the marker end. */
8
- to: number; /** The typed value displayed in place of the marker. */
6
+ /** Inclusive PM doc position of the marker start. */
7
+ from: number;
8
+ /** Exclusive PM doc position of the marker end. */
9
+ to: number;
10
+ /** The typed value displayed in place of the marker. */
9
11
  value: TemplatePreviewValue;
10
12
  };
11
13
  type TemplatePreviewFlowOptions = {
12
- entries: readonly TemplatePreviewFlowEntry[]; /** `highlighted` marks substituted runs for the accent-chip CSS. */
14
+ entries: readonly TemplatePreviewFlowEntry[];
15
+ /** `highlighted` marks substituted runs for the accent-chip CSS. */
13
16
  mode: "highlighted" | "plain";
14
17
  };
15
18
  /**
@@ -17,10 +20,7 @@ type TemplatePreviewFlowOptions = {
17
20
  * flow blocks (recursing into table cells and text boxes). Returns the input
18
21
  * array unchanged when there is nothing to substitute.
19
22
  */
20
- declare function applyTemplatePreviewToBlocks(blocks: FlowBlock[], {
21
- entries,
22
- mode
23
- }: TemplatePreviewFlowOptions): FlowBlock[];
23
+ declare function applyTemplatePreviewToBlocks(blocks: FlowBlock[], { entries, mode }: TemplatePreviewFlowOptions): FlowBlock[];
24
24
  /**
25
25
  * PM range covering every substitution that differs between two preview
26
26
  * states (changed, added, or removed entries), or `null` when the
@@ -1,18 +1,24 @@
1
1
  import { document_d_exports } from "../../types/document.js";
2
2
  import { BorderStyle, FlowBlock, ParagraphAttrs } from "../../layout-engine/types.js";
3
3
  import { Node } from "prosemirror-model";
4
-
5
4
  //#region src/layout-bridge/convert/toFlowBlocks.d.ts
6
5
  /**
7
6
  * Options for the conversion.
8
7
  */
9
8
  type ToFlowBlocksOptions = {
10
- /** Default font family. */defaultFont?: string; /** Default font size in points. */
11
- defaultSize?: number; /** Theme for resolving theme colors. */
12
- theme?: document_d_exports.Theme | null; /** Page content height in pixels (pageHeight - marginTop - marginBottom). Images taller than this are scaled down to fit. */
13
- pageContentHeight?: number; /** Shared list counters for nested containers. */
14
- listCounters?: Map<number, number[]>; /** Latest concrete counters by abstract numbering definition. */
15
- listAbstractCounters?: Map<number, number[]>; /** Shared startOverride state for nested containers. */
9
+ /** Default font family. */
10
+ defaultFont?: string;
11
+ /** Default font size in points. */
12
+ defaultSize?: number;
13
+ /** Theme for resolving theme colors. */
14
+ theme?: document_d_exports.Theme | null;
15
+ /** Page content height in pixels (pageHeight - marginTop - marginBottom). Images taller than this are scaled down to fit. */
16
+ pageContentHeight?: number;
17
+ /** Shared list counters for nested containers. */
18
+ listCounters?: Map<number, number[]>;
19
+ /** Latest concrete counters by abstract numbering definition. */
20
+ listAbstractCounters?: Map<number, number[]>;
21
+ /** Shared startOverride state for nested containers. */
16
22
  listSeenNumIds?: Set<string>;
17
23
  /**
18
24
  * Parallel counter state for the "original" (pre-revision) document, used to
@@ -22,8 +28,10 @@ type ToFlowBlocksOptions = {
22
28
  * item continues the counter of the inserted item before it (a, b → c, d, e
23
29
  * instead of a, b and a, b, c). Normal items advance both streams.
24
30
  */
25
- originalListCounters?: Map<number, number[]>; /** Latest concrete original-stream counters by abstract numbering definition. */
26
- originalListAbstractCounters?: Map<number, number[]>; /** Original-stream startOverride state. */
31
+ originalListCounters?: Map<number, number[]>;
32
+ /** Latest concrete original-stream counters by abstract numbering definition. */
33
+ originalListAbstractCounters?: Map<number, number[]>;
34
+ /** Original-stream startOverride state. */
27
35
  originalListSeenNumIds?: Set<string>;
28
36
  /**
29
37
  * Document-wide `w:defaultTabStop` (§17.6.13) in twips. Stamped onto
@@ -31,7 +39,8 @@ type ToFlowBlocksOptions = {
31
39
  * tab-stop math) can read it without taking a `Document` reference.
32
40
  * Defaults to the OOXML 720-twip value when absent.
33
41
  */
34
- defaultTabStopTwips?: number; /** Document-wide custom Word line-breaking settings. */
42
+ defaultTabStopTwips?: number;
43
+ /** Document-wide custom Word line-breaking settings. */
35
44
  lineBreakRules?: {
36
45
  noLineBreaksBefore?: {
37
46
  language?: string;
@@ -42,9 +51,12 @@ type ToFlowBlocksOptions = {
42
51
  characters: string;
43
52
  };
44
53
  useLegacyEthiopicAmharicRules?: boolean;
45
- }; /** Document-generation policy for justified line fitting. */
46
- justificationCompatibility?: NonNullable<ParagraphAttrs["justificationCompatibility"]>; /** Document-wide automatic hyphenation policy. */
47
- automaticHyphenation?: NonNullable<ParagraphAttrs["automaticHyphenation"]>; /** Line pitch for the final body section, whose properties live outside the PM body. */
54
+ };
55
+ /** Document-generation policy for justified line fitting. */
56
+ justificationCompatibility?: NonNullable<ParagraphAttrs["justificationCompatibility"]>;
57
+ /** Document-wide automatic hyphenation policy. */
58
+ automaticHyphenation?: NonNullable<ParagraphAttrs["automaticHyphenation"]>;
59
+ /** Line pitch for the final body section, whose properties live outside the PM body. */
48
60
  finalSectionDocumentGridLinePitchTwips?: number;
49
61
  };
50
62
  declare function formatCounter(value: number, format: document_d_exports.NumberFormat | undefined): string;
@@ -1,9 +1,10 @@
1
1
  import { EditorState, Transaction } from "prosemirror-state";
2
2
  import { EditorView } from "prosemirror-view";
3
-
4
3
  //#region src/layout-bridge/convert/wrapEditorViewAsSurface.d.ts
5
4
  type Surface = {
6
- /** Identity tag — `"body"` for the body PM, `"hf"` for any HF PM. */kind: "body" | "hf"; /** rId of the source HF part; `null` for the body surface. */
5
+ /** Identity tag — `"body"` for the body PM, `"hf"` for any HF PM. */
6
+ kind: "body" | "hf";
7
+ /** rId of the source HF part; `null` for the body surface. */
7
8
  rId: string | null;
8
9
  getState: () => EditorState | null;
9
10
  getView: () => EditorView | null;
@@ -23,7 +23,8 @@ declare function findHfPmAnchor(container: ParentNode, kind: HfSlotKind, rId: st
23
23
  * should hug so the renderer can pick `left` vs `right`.
24
24
  */
25
25
  type HfCaretSpanHit = {
26
- element: HTMLElement; /** Which edge of the span's getBoundingClientRect to anchor the caret to. */
26
+ element: HTMLElement;
27
+ /** Which edge of the span's getBoundingClientRect to anchor the caret to. */
27
28
  edge: "left" | "right";
28
29
  };
29
30
  declare function findHfCaretSpan(container: ParentNode, kind: HfSlotKind, rId: string, pos: number): HfCaretSpanHit | null;
@@ -1,5 +1,4 @@
1
1
  import { NoteStoryKey } from "../../controller/noteEditorManager.js";
2
-
3
2
  //#region src/layout-bridge/dom/noteStoryDom.d.ts
4
3
  declare const findNoteStoryForTarget: (target: unknown) => NoteStoryKey | null;
5
4
  //#endregion
@@ -1,13 +1,15 @@
1
1
  import { ParagraphBlock, ParagraphMeasure } from "../../layout-engine/types.js";
2
2
  import { FragmentHit, TableCellHit } from "./hitTest.js";
3
-
4
3
  //#region src/layout-bridge/engine/clickToPosition.d.ts
5
4
  /**
6
5
  * Result of click-to-position mapping.
7
6
  */
8
7
  type PositionResult = {
9
- /** ProseMirror document position. */pmPosition: number; /** Character offset within the line (for debugging). */
10
- charOffset: number; /** Line index within the paragraph. */
8
+ /** ProseMirror document position. */
9
+ pmPosition: number;
10
+ /** Character offset within the line (for debugging). */
11
+ charOffset: number;
12
+ /** Line index within the paragraph. */
11
13
  lineIndex: number;
12
14
  };
13
15
  /**
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock, Fragment, Layout, Measure, Page, ParagraphBlock, ParagraphMeasure, TableBlock, TableFragment, TableMeasure } from "../../layout-engine/types.js";
2
-
3
2
  //#region src/layout-bridge/engine/hitTest.d.ts
4
3
  /**
5
4
  * A 2D point in page coordinate space.
@@ -12,34 +11,53 @@ type Point = {
12
11
  * Result of hit-testing to find which page contains a point.
13
12
  */
14
13
  type PageHit = {
15
- /** Index of the page (0-based). */pageIndex: number; /** The page that was hit. */
16
- page: Page; /** Y position relative to the page top. */
14
+ /** Index of the page (0-based). */
15
+ pageIndex: number;
16
+ /** The page that was hit. */
17
+ page: Page;
18
+ /** Y position relative to the page top. */
17
19
  pageY: number;
18
20
  };
19
21
  /**
20
22
  * Result of hit-testing to find which fragment contains a point.
21
23
  */
22
24
  type FragmentHit = {
23
- /** The fragment that was hit. */fragment: Fragment; /** The corresponding flow block. */
24
- block: FlowBlock; /** The corresponding measurement. */
25
- measure: Measure; /** Page index (0-based). */
26
- pageIndex: number; /** Y position relative to the fragment top. */
27
- localY: number; /** X position relative to the fragment left. */
25
+ /** The fragment that was hit. */
26
+ fragment: Fragment;
27
+ /** The corresponding flow block. */
28
+ block: FlowBlock;
29
+ /** The corresponding measurement. */
30
+ measure: Measure;
31
+ /** Page index (0-based). */
32
+ pageIndex: number;
33
+ /** Y position relative to the fragment top. */
34
+ localY: number;
35
+ /** X position relative to the fragment left. */
28
36
  localX: number;
29
37
  };
30
38
  /**
31
39
  * Result of hit-testing a table to find the cell.
32
40
  */
33
41
  type TableCellHit = {
34
- /** The table fragment. */fragment: TableFragment; /** The table block. */
35
- block: TableBlock; /** The table measure. */
36
- measure: TableMeasure; /** Page index (0-based). */
37
- pageIndex: number; /** Row index (0-based). */
38
- rowIndex: number; /** Column index (0-based). */
39
- colIndex: number; /** Paragraph block within the cell (first one). */
40
- cellBlock?: ParagraphBlock; /** Paragraph measure within the cell. */
41
- cellMeasure?: ParagraphMeasure; /** X position relative to cell content area. */
42
- cellLocalX: number; /** Y position relative to cell content area. */
42
+ /** The table fragment. */
43
+ fragment: TableFragment;
44
+ /** The table block. */
45
+ block: TableBlock;
46
+ /** The table measure. */
47
+ measure: TableMeasure;
48
+ /** Page index (0-based). */
49
+ pageIndex: number;
50
+ /** Row index (0-based). */
51
+ rowIndex: number;
52
+ /** Column index (0-based). */
53
+ colIndex: number;
54
+ /** Paragraph block within the cell (first one). */
55
+ cellBlock?: ParagraphBlock;
56
+ /** Paragraph measure within the cell. */
57
+ cellMeasure?: ParagraphMeasure;
58
+ /** X position relative to cell content area. */
59
+ cellLocalX: number;
60
+ /** Y position relative to cell content area. */
43
61
  cellLocalY: number;
44
62
  };
45
63
  /**
@@ -93,8 +111,11 @@ declare function hitTestTableCell(pageHit: PageHit, blocks: FlowBlock[], measure
93
111
  * Combined result of all hit testing.
94
112
  */
95
113
  type HitTestResult = {
96
- /** Page that was hit. */pageHit: PageHit | null; /** Fragment that was hit (if any). */
97
- fragmentHit: FragmentHit | null; /** Table cell that was hit (if fragment is a table). */
114
+ /** Page that was hit. */
115
+ pageHit: PageHit | null;
116
+ /** Fragment that was hit (if any). */
117
+ fragmentHit: FragmentHit | null;
118
+ /** Table cell that was hit (if fragment is a table). */
98
119
  tableCellHit: TableCellHit | null;
99
120
  };
100
121
  /**
@@ -1,23 +1,31 @@
1
1
  import { FlowBlock, Layout, Measure } from "../../layout-engine/types.js";
2
-
3
2
  //#region src/layout-bridge/engine/selectionRects.d.ts
4
3
  /**
5
4
  * A rectangle representing part of a selection.
6
5
  */
7
6
  type SelectionRect = {
8
- /** X coordinate in container space. */x: number; /** Y coordinate in container space. */
9
- y: number; /** Width of the rectangle. */
10
- width: number; /** Height of the rectangle (typically line height). */
11
- height: number; /** Page index (0-based). */
7
+ /** X coordinate in container space. */
8
+ x: number;
9
+ /** Y coordinate in container space. */
10
+ y: number;
11
+ /** Width of the rectangle. */
12
+ width: number;
13
+ /** Height of the rectangle (typically line height). */
14
+ height: number;
15
+ /** Page index (0-based). */
12
16
  pageIndex: number;
13
17
  };
14
18
  /**
15
19
  * Caret position for collapsed selection.
16
20
  */
17
21
  type CaretPosition = {
18
- /** X coordinate in container space. */x: number; /** Y coordinate in container space. */
19
- y: number; /** Height of the caret (line height). */
20
- height: number; /** Page index (0-based). */
22
+ /** X coordinate in container space. */
23
+ x: number;
24
+ /** Y coordinate in container space. */
25
+ y: number;
26
+ /** Height of the caret (line height). */
27
+ height: number;
28
+ /** Page index (0-based). */
21
29
  pageIndex: number;
22
30
  };
23
31
  /**
@@ -1,5 +1,4 @@
1
1
  import { document_d_exports } from "../../types/document.js";
2
-
3
2
  //#region src/layout-bridge/engine/tableWidthUtils.d.ts
4
3
  declare function resolveTableWidthPx(width: number | undefined, widthType: document_d_exports.TableWidthType | undefined, containerWidth: number): number | undefined;
5
4
  declare function normalizeTableColumnWidths(widths: number[], columnCount: number, targetWidth: number): number[];
@@ -1,5 +1,4 @@
1
1
  import { EditorView } from "prosemirror-view";
2
-
3
2
  //#region src/layout-bridge/headerFooterLayout.d.ts
4
3
  /**
5
4
  * Drop the cached HF host + span lists. Hosts/painters call this after
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { ColumnLayout } from "../layout-engine/types.js";
3
-
4
3
  //#region src/layout-bridge/sectionColumns.d.ts
5
4
  /**
6
5
  * Extract column layout from section properties.
@@ -17,17 +17,21 @@
17
17
  declare const TABLE_INSERT_EDGE_PROXIMITY = 30;
18
18
  declare const TABLE_INSERT_HIDE_DELAY_MS = 200;
19
19
  type TableInsertHoverHit = {
20
- type: "row" | "column"; /** Client-coordinate anchor for the button. Caller converts to its UI frame. */
20
+ type: "row" | "column";
21
+ /** Client-coordinate anchor for the button. Caller converts to its UI frame. */
21
22
  clientX: number;
22
- clientY: number; /** PM position of the cell the button targets. */
23
+ clientY: number;
24
+ /** PM position of the cell the button targets. */
23
25
  cellPmPos: number;
24
26
  };
25
27
  type TableInsertHoverInput = {
26
28
  mouseX: number;
27
29
  mouseY: number;
28
- pagesContainer: HTMLElement; /** Element under the cursor at the time of the event (e.target). */
30
+ pagesContainer: HTMLElement;
31
+ /** Element under the cursor at the time of the event (e.target). */
29
32
  target: HTMLElement;
30
- hfEditMode: "header" | "footer" | null; /** Override edge proximity in pixels (defaults to TABLE_INSERT_EDGE_PROXIMITY). */
33
+ hfEditMode: "header" | "footer" | null;
34
+ /** Override edge proximity in pixels (defaults to TABLE_INSERT_EDGE_PROXIMITY). */
31
35
  edgeProximity?: number;
32
36
  };
33
37
  /**
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { PageHeaderFooterRefs } from "./types.js";
3
-
4
3
  //#region src/layout-engine/headerFooterRefs.d.ts
5
4
  declare const resolveSectionHeaderFooterRefs: (documentModel: document_d_exports.Document | null | undefined) => PageHeaderFooterRefs[] | undefined;
6
5
  //#endregion
@@ -4,7 +4,6 @@ import { KeepNextChain, calculateChainHeight, computeKeepNextChains, getMidChain
4
4
  import { resolveSectionHeaderFooterRefs } from "./headerFooterRefs.js";
5
5
  import { BreakDecision, SectionState, applyPendingToActive, createInitialSectionState, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, scheduleSectionBreak } from "./section-breaks.js";
6
6
  import { assertExhaustiveFlowBlock, findPageIndexContainingPmPos } from "./pmPageIndex.js";
7
-
8
7
  //#region src/layout-engine/index.d.ts
9
8
  type SectionLayoutConfig = {
10
9
  pageSize: {
@@ -1,5 +1,4 @@
1
1
  import { ParagraphAttrs } from "./types.js";
2
-
3
2
  //#region src/layout-engine/justificationCompatibility.d.ts
4
3
  declare function resolveJustificationCompatibility(compatibilityMode: number | undefined): NonNullable<ParagraphAttrs["justificationCompatibility"]> | undefined;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock, Measure } from "./types.js";
2
-
3
2
  //#region src/layout-engine/keep-together.d.ts
4
3
  /**
5
4
  * A chain of paragraphs that Word keeps with following content. This includes
@@ -7,9 +6,13 @@ import { FlowBlock, Measure } from "./types.js";
7
6
  * be stranded at the bottom of a page.
8
7
  */
9
8
  type KeepNextChain = {
10
- /** Index of the first paragraph in the chain. */startIndex: number; /** Index of the last keepNext or pass-through empty member. */
11
- endIndex: number; /** All keepNext and pass-through empty paragraph indices in the chain. */
12
- memberIndices: number[]; /** Index of the anchor paragraph (first non-keepNext after chain), or -1 if none. */
9
+ /** Index of the first paragraph in the chain. */
10
+ startIndex: number;
11
+ /** Index of the last keepNext or pass-through empty member. */
12
+ endIndex: number;
13
+ /** All keepNext and pass-through empty paragraph indices in the chain. */
14
+ memberIndices: number[];
15
+ /** Index of the anchor paragraph (first non-keepNext after chain), or -1 if none. */
13
16
  anchorIndex: number;
14
17
  };
15
18
  /**
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock } from "./types.js";
2
-
3
2
  //#region src/layout-engine/layoutInstrumentation.d.ts
4
3
  type LayoutRunReason = "font-ready" | "initial" | "layout-input" | "manual" | "transaction";
5
4
  type LayoutPhase = "flow-blocks" | "header-footer" | "initial-fonts" | "layout-document" | "measure-blocks" | "render-pages";
@@ -1,5 +1,4 @@
1
1
  import { MeasuredLine } from "./types.js";
2
-
3
2
  //#region src/layout-engine/lineFlow.d.ts
4
3
  declare function measuredLineAdvance(line: MeasuredLine): number;
5
4
  declare function measuredLineRangeHeight(lines: readonly MeasuredLine[], fromLine: number, toLine: number): number;
@@ -1,5 +1,4 @@
1
1
  import { ParagraphBlock, ParagraphMeasure } from "../types.js";
2
-
3
2
  //#region src/layout-engine/measure/cache.d.ts
4
3
  /**
5
4
  * Get cached text width or return undefined