@stll/folio-core 0.14.1 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) 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/compat/eigenpal.d.ts +2 -1
  17. package/dist/compat/eigenpal.js +2 -1
  18. package/dist/content-controls/errors.d.ts +0 -1
  19. package/dist/content-controls/findContentControls.d.ts +6 -4
  20. package/dist/content-controls/mutateContentControls.d.ts +0 -1
  21. package/dist/controller/activeEditorStory.d.ts +1 -6
  22. package/dist/controller/collaborationModules.d.ts +0 -1
  23. package/dist/controller/contentControlWidgetController.d.ts +0 -1
  24. package/dist/controller/folioEditor.d.ts +2 -2
  25. package/dist/controller/folioEditorEvents.d.ts +5 -3
  26. package/dist/controller/fontReadiness.d.ts +0 -1
  27. package/dist/controller/headerFooterEditorManager.d.ts +1 -5
  28. package/dist/controller/hiddenEditorApi.d.ts +35 -18
  29. package/dist/controller/hiddenEditorManager.d.ts +5 -3
  30. package/dist/controller/latestRequestGate.d.ts +3 -1
  31. package/dist/controller/layoutPipeline.d.ts +1 -1
  32. package/dist/controller/layoutScheduler.d.ts +8 -5
  33. package/dist/controller/layoutSession.d.ts +0 -1
  34. package/dist/controller/noteEditorManager.d.ts +0 -1
  35. package/dist/document-operations.d.ts +5 -12
  36. package/dist/document-stories.d.ts +0 -1
  37. package/dist/docx/blockContentParser.d.ts +0 -1
  38. package/dist/docx/blockContentParser.js +1 -0
  39. package/dist/docx/bookmarkParser.d.ts +5 -3
  40. package/dist/docx/bookmarkPlacement.d.ts +0 -1
  41. package/dist/docx/commentParser.d.ts +0 -1
  42. package/dist/docx/commentRangeIntegrity.d.ts +0 -1
  43. package/dist/docx/commentReferenceNormalization.d.ts +1 -9
  44. package/dist/docx/commentReplyMarkers.d.ts +0 -1
  45. package/dist/docx/compatibility.d.ts +0 -1
  46. package/dist/docx/conformance.d.ts +0 -1
  47. package/dist/docx/corePropertiesParser.d.ts +0 -1
  48. package/dist/docx/documentParser.d.ts +0 -1
  49. package/dist/docx/documentParser.js +3 -1
  50. package/dist/docx/drawingUtils.d.ts +23 -2
  51. package/dist/docx/drawingUtils.js +23 -1
  52. package/dist/docx/encryption/agileDecryption.d.ts +0 -1
  53. package/dist/docx/encryption/cryptoBytes.js +4 -1
  54. package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -2
  55. package/dist/docx/ensureParaIds.d.ts +7 -3
  56. package/dist/docx/fieldParser.d.ts +23 -11
  57. package/dist/docx/fontTableParser.d.ts +0 -1
  58. package/dist/docx/footnoteParser.d.ts +26 -13
  59. package/dist/docx/footnoteParser.js +4 -2
  60. package/dist/docx/groupDrawingParser.d.ts +0 -1
  61. package/dist/docx/headerFooterParser.d.ts +9 -5
  62. package/dist/docx/headerFooterRefParser.d.ts +0 -1
  63. package/dist/docx/headerFooterReferenceNormalization.d.ts +1 -6
  64. package/dist/docx/headerFooterVerbatim.d.ts +2 -2
  65. package/dist/docx/hyperlinkParser.d.ts +0 -1
  66. package/dist/docx/hyperlinkParser.js +1 -9
  67. package/dist/docx/imageParser.d.ts +0 -1
  68. package/dist/docx/imageParser.js +15 -7
  69. package/dist/docx/mathToMathml.d.ts +0 -1
  70. package/dist/docx/metadataPrivacy.d.ts +1 -3
  71. package/dist/docx/modelValidation.d.ts +0 -1
  72. package/dist/docx/newImage.d.ts +11 -0
  73. package/dist/docx/newImage.js +11 -0
  74. package/dist/docx/normalizeBaseDirection.d.ts +0 -1
  75. package/dist/docx/notePropertiesParser.d.ts +0 -1
  76. package/dist/docx/numberingParser.d.ts +10 -6
  77. package/dist/docx/numberingParser.js +4 -2
  78. package/dist/docx/numberingReferenceNormalization.d.ts +1 -9
  79. package/dist/docx/paragraphParser.d.ts +0 -1
  80. package/dist/docx/paragraphParser.js +27 -14
  81. package/dist/docx/paragraphTextBoxEnrichment.d.ts +0 -1
  82. package/dist/docx/paragraphTextBoxEnrichment.js +2 -1
  83. package/dist/docx/paragraphTraversal.d.ts +1 -8
  84. package/dist/docx/parser.d.ts +15 -8
  85. package/dist/docx/parser.js +12 -1
  86. package/dist/docx/parserEnums.d.ts +2 -2
  87. package/dist/docx/parserEnums.js +3 -2
  88. package/dist/docx/relsParser.d.ts +1 -0
  89. package/dist/docx/renderedPageBreakNormalization.d.ts +12 -0
  90. package/dist/docx/renderedPageBreakNormalization.js +59 -0
  91. package/dist/docx/replyToComment.d.ts +2 -2
  92. package/dist/docx/rezip.d.ts +6 -7
  93. package/dist/docx/rezip.js +136 -102
  94. package/dist/docx/runConsolidator.d.ts +0 -1
  95. package/dist/docx/runParser.d.ts +0 -1
  96. package/dist/docx/runParser.js +9 -12
  97. package/dist/docx/sdtProperties.d.ts +0 -1
  98. package/dist/docx/sdtPropertiesPatch.d.ts +0 -1
  99. package/dist/docx/sectionParser.d.ts +0 -1
  100. package/dist/docx/selectiveSave.d.ts +5 -3
  101. package/dist/docx/selectiveSave.js +2 -2
  102. package/dist/docx/selectiveSaveFlags.d.ts +4 -2
  103. package/dist/docx/selectiveXmlPatch.js +20 -8
  104. package/dist/docx/serializer/blockSdtSerializer.d.ts +0 -1
  105. package/dist/docx/serializer/blockSdtSerializer.js +2 -1
  106. package/dist/docx/serializer/borderSerializer.d.ts +0 -1
  107. package/dist/docx/serializer/commentSerializer.d.ts +0 -1
  108. package/dist/docx/serializer/commentSerializer.js +11 -37
  109. package/dist/docx/serializer/documentSerializer.d.ts +0 -1
  110. package/dist/docx/serializer/documentSerializer.js +1 -1
  111. package/dist/docx/serializer/fontTableSerializer.d.ts +0 -1
  112. package/dist/docx/serializer/headerFooterSerializer.d.ts +0 -1
  113. package/dist/docx/serializer/headerFooterSerializer.js +1 -1
  114. package/dist/docx/serializer/noteSerializer.d.ts +0 -1
  115. package/dist/docx/serializer/noteSerializer.js +1 -1
  116. package/dist/docx/serializer/numberingSerializer.d.ts +0 -1
  117. package/dist/docx/serializer/paragraphSerializer.d.ts +0 -1
  118. package/dist/docx/serializer/paragraphSerializer.js +10 -23
  119. package/dist/docx/serializer/runSerializer.d.ts +0 -1
  120. package/dist/docx/serializer/runSerializer.js +37 -22
  121. package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +0 -1
  122. package/dist/docx/serializer/sectionPropertiesSerializer.js +5 -4
  123. package/dist/docx/serializer/settingsSerializer.d.ts +0 -1
  124. package/dist/docx/serializer/stylesSerializer.d.ts +0 -1
  125. package/dist/docx/serializer/tableSerializer.d.ts +0 -1
  126. package/dist/docx/serializer/tableSerializer.js +2 -0
  127. package/dist/docx/serializer/themeSerializer.d.ts +0 -1
  128. package/dist/docx/serializer/xmlUtils.js +10 -1
  129. package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +3 -10
  130. package/dist/docx/server/docxToMarkdown.d.ts +0 -1
  131. package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +3 -9
  132. package/dist/docx/server/inspectDocxPackage.d.ts +3 -8
  133. package/dist/docx/server/validateDocxConformance.d.ts +0 -1
  134. package/dist/docx/settingsParser.d.ts +2 -2
  135. package/dist/docx/shapeParser.d.ts +0 -1
  136. package/dist/docx/shapeParser.js +11 -10
  137. package/dist/docx/streamingXmlParser.d.ts +16 -0
  138. package/dist/docx/streamingXmlParser.js +248 -0
  139. package/dist/docx/styleParser.d.ts +0 -1
  140. package/dist/docx/styleParser.js +6 -4
  141. package/dist/docx/tableParser.d.ts +1 -2
  142. package/dist/docx/tableParser.js +3 -6
  143. package/dist/docx/textBoxParser.d.ts +1 -2
  144. package/dist/docx/textBoxParser.js +4 -1
  145. package/dist/docx/textWhitespace.d.ts +4 -0
  146. package/dist/docx/textWhitespace.js +4 -0
  147. package/dist/docx/themeParser.d.ts +0 -1
  148. package/dist/docx/trackedMoveRangeNormalization.d.ts +1 -8
  149. package/dist/docx/unzip.d.ts +6 -3
  150. package/dist/docx/unzip.js +96 -40
  151. package/dist/docx/vmlImageParser.d.ts +0 -1
  152. package/dist/docx/vmlImageParser.js +3 -1
  153. package/dist/docx/watermarkParser.d.ts +0 -1
  154. package/dist/docx/xmlParser.d.ts +21 -8
  155. package/dist/docx/xmlParser.js +126 -43
  156. package/dist/fields/bookmarkPages.d.ts +0 -1
  157. package/dist/fields/bookmarkText.d.ts +0 -1
  158. package/dist/fields/evaluateField.d.ts +5 -3
  159. package/dist/fields/fieldContext.d.ts +11 -5
  160. package/dist/fields/resolveFieldValues.d.ts +4 -3
  161. package/dist/fields/sectionPageCounts.d.ts +0 -1
  162. package/dist/fields/seqValues.d.ts +0 -1
  163. package/dist/fonts/embeddedFontTable.d.ts +5 -2
  164. package/dist/fonts/embeddedFonts.d.ts +15 -7
  165. package/dist/index.d.ts +3 -1
  166. package/dist/index.js +2 -1
  167. package/dist/layout-bridge/cellSelectionHighlight.d.ts +0 -1
  168. package/dist/layout-bridge/convert/footnoteLayout.d.ts +5 -3
  169. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +2 -2
  170. package/dist/layout-bridge/convert/paragraphFrames.d.ts +0 -1
  171. package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +8 -8
  172. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +25 -13
  173. package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +3 -2
  174. package/dist/layout-bridge/dom/findHfPmSpans.d.ts +2 -1
  175. package/dist/layout-bridge/dom/noteStoryDom.d.ts +0 -1
  176. package/dist/layout-bridge/engine/clickToPosition.d.ts +5 -3
  177. package/dist/layout-bridge/engine/hitTest.d.ts +40 -19
  178. package/dist/layout-bridge/engine/selectionRects.d.ts +16 -8
  179. package/dist/layout-bridge/engine/tableWidthUtils.d.ts +0 -1
  180. package/dist/layout-bridge/headerFooterLayout.d.ts +0 -1
  181. package/dist/layout-bridge/sectionColumns.d.ts +0 -1
  182. package/dist/layout-bridge/tableInsertHover.d.ts +8 -4
  183. package/dist/layout-engine/headerFooterRefs.d.ts +0 -1
  184. package/dist/layout-engine/index.d.ts +0 -1
  185. package/dist/layout-engine/justificationCompatibility.d.ts +0 -1
  186. package/dist/layout-engine/keep-together.d.ts +7 -4
  187. package/dist/layout-engine/layoutInstrumentation.d.ts +0 -1
  188. package/dist/layout-engine/lineFlow.d.ts +0 -1
  189. package/dist/layout-engine/measure/cache.d.ts +0 -1
  190. package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +6 -7
  191. package/dist/layout-engine/measure/floatingTablePosition.d.ts +0 -1
  192. package/dist/layout-engine/measure/floatingZones.d.ts +14 -6
  193. package/dist/layout-engine/measure/font-metrics.worker.d.ts +0 -1
  194. package/dist/layout-engine/measure/lineBreakProvider.d.ts +20 -9
  195. package/dist/layout-engine/measure/lineBreaks.d.ts +0 -1
  196. package/dist/layout-engine/measure/listMarkerWidth.d.ts +0 -1
  197. package/dist/layout-engine/measure/measureBlocks.d.ts +1 -0
  198. package/dist/layout-engine/measure/measureContainer.d.ts +0 -1
  199. package/dist/layout-engine/measure/measureHelpers.d.ts +0 -1
  200. package/dist/layout-engine/measure/measureParagraph.d.ts +3 -2
  201. package/dist/layout-engine/measure/measureParagraph.js +23 -3
  202. package/dist/layout-engine/measure/measureProvider.d.ts +0 -1
  203. package/dist/layout-engine/measure/measureTypes.d.ts +4 -2
  204. package/dist/layout-engine/measure/measureWorker.d.ts +0 -1
  205. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +0 -1
  206. package/dist/layout-engine/measure/tableCellFloating.d.ts +0 -1
  207. package/dist/layout-engine/measure/tableCellFlow.d.ts +0 -1
  208. package/dist/layout-engine/measure/tableCellGrid.d.ts +0 -1
  209. package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +0 -1
  210. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +0 -1
  211. package/dist/layout-engine/paginator.d.ts +66 -33
  212. package/dist/layout-engine/paragraphFragmentRange.d.ts +0 -1
  213. package/dist/layout-engine/paragraphFrame.d.ts +0 -1
  214. package/dist/layout-engine/paragraphSequence.d.ts +0 -1
  215. package/dist/layout-engine/paragraphSpacing.d.ts +1 -5
  216. package/dist/layout-engine/pmPageIndex.d.ts +0 -1
  217. package/dist/layout-engine/renderedBreakReconciliation.d.ts +2 -17
  218. package/dist/layout-engine/section-breaks.d.ts +34 -17
  219. package/dist/layout-engine/tableRowBreak.d.ts +4 -3
  220. package/dist/layout-engine/textBoxFlow.d.ts +0 -1
  221. package/dist/layout-engine/textBoxGroup.d.ts +0 -1
  222. package/dist/layout-engine/types.d.ts +382 -189
  223. package/dist/layout-painter/anchoredImagePosition.d.ts +0 -1
  224. package/dist/layout-painter/borderStroke.d.ts +0 -1
  225. package/dist/layout-painter/imageLayout.d.ts +14 -7
  226. package/dist/layout-painter/index.d.ts +9 -5
  227. package/dist/layout-painter/registry/modules/image.d.ts +0 -1
  228. package/dist/layout-painter/registry/modules/paragraph.d.ts +0 -1
  229. package/dist/layout-painter/registry/modules/table.d.ts +0 -1
  230. package/dist/layout-painter/registry/modules/textBox.d.ts +0 -1
  231. package/dist/layout-painter/registry/modules.d.ts +0 -1
  232. package/dist/layout-painter/registry/registry.d.ts +0 -1
  233. package/dist/layout-painter/registry/types.d.ts +0 -1
  234. package/dist/layout-painter/renderFragment.d.ts +2 -2
  235. package/dist/layout-painter/renderImage.d.ts +0 -1
  236. package/dist/layout-painter/renderPage.d.ts +71 -42
  237. package/dist/layout-painter/renderParagraph.d.ts +28 -14
  238. package/dist/layout-painter/renderParagraph.js +6 -2
  239. package/dist/layout-painter/renderTable.d.ts +0 -1
  240. package/dist/layout-painter/renderTextBox.d.ts +0 -1
  241. package/dist/layout-painter/renderUtils.d.ts +17 -9
  242. package/dist/layout-painter/renderWatermark.d.ts +2 -2
  243. package/dist/layout-painter/sdtBoundary.d.ts +0 -1
  244. package/dist/managers/AutoSaveManager.d.ts +22 -11
  245. package/dist/managers/ClipboardManager.d.ts +0 -1
  246. package/dist/managers/ContextMenuManager.d.ts +5 -8
  247. package/dist/managers/DocumentLoaderManager.d.ts +12 -6
  248. package/dist/managers/EditorModeManager.d.ts +3 -2
  249. package/dist/managers/ErrorManager.d.ts +0 -1
  250. package/dist/managers/FindReplaceManager.d.ts +0 -1
  251. package/dist/managers/HistoryManager.d.ts +19 -9
  252. package/dist/managers/TableSelectionManager.d.ts +0 -1
  253. package/dist/managers/editorShortcuts.d.ts +4 -6
  254. package/dist/markdown/annotations.d.ts +0 -1
  255. package/dist/markdown/fromMarkdown.d.ts +0 -1
  256. package/dist/markdown/fromMarkdown.js +55 -5
  257. package/dist/markdown/images.d.ts +0 -1
  258. package/dist/markdown/index.d.ts +0 -1
  259. package/dist/markdown/internals.d.ts +0 -1
  260. package/dist/markdown/renderBlock.d.ts +0 -1
  261. package/dist/markdown/renderParagraph.d.ts +0 -1
  262. package/dist/markdown/renderRuns.d.ts +0 -1
  263. package/dist/markdown/renderTable.d.ts +0 -1
  264. package/dist/markdown/trailers.d.ts +0 -1
  265. package/dist/markdown/types.d.ts +39 -18
  266. package/dist/model.d.ts +3 -5
  267. package/dist/model.js +2 -2
  268. package/dist/paged-layout/incrementalMeasure.d.ts +1 -10
  269. package/dist/paged-layout/pageText.d.ts +1 -1
  270. package/dist/paged-layout/paragraphFlash.d.ts +0 -1
  271. package/dist/paged-layout/paragraphFlashTypes.d.ts +5 -2
  272. package/dist/paged-layout/rangeProjection.d.ts +10 -5
  273. package/dist/paged-layout/scrollNavigation.d.ts +0 -1
  274. package/dist/paged-layout/scrollPageInfo.d.ts +12 -13
  275. package/dist/paged-layout/scrollToPmPosition.d.ts +0 -1
  276. package/dist/paged-layout/sectionBlockWidths.d.ts +2 -11
  277. package/dist/paged-layout/sectionGeometry.d.ts +0 -1
  278. package/dist/paged-layout/selectionViewportRect.d.ts +0 -1
  279. package/dist/paged-layout/transactionDirtyRange.d.ts +0 -1
  280. package/dist/paged-layout/zoomScrollAnchor.d.ts +2 -12
  281. package/dist/prosemirror/attrs/index.d.ts +2 -2
  282. package/dist/prosemirror/attrs/index.js +5 -0
  283. package/dist/prosemirror/autospacingBase.d.ts +0 -1
  284. package/dist/prosemirror/cellDragSelection.d.ts +6 -4
  285. package/dist/prosemirror/commands/comments.d.ts +6 -4
  286. package/dist/prosemirror/commands/contentControls.d.ts +5 -3
  287. package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +1 -1
  288. package/dist/prosemirror/commands/formatPainter.d.ts +0 -1
  289. package/dist/prosemirror/commands/formatting.d.ts +1 -1
  290. package/dist/prosemirror/commands/hyperlink.d.ts +4 -9
  291. package/dist/prosemirror/commands/image.d.ts +0 -1
  292. package/dist/prosemirror/commands/pageBreak.d.ts +0 -1
  293. package/dist/prosemirror/commands/paragraph.d.ts +0 -1
  294. package/dist/prosemirror/commands/pastePlainText.d.ts +0 -1
  295. package/dist/prosemirror/commands/propertyChangeScope.d.ts +0 -1
  296. package/dist/prosemirror/commands/sectionBreak.d.ts +0 -1
  297. package/dist/prosemirror/commands/table.d.ts +0 -1
  298. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -1
  299. package/dist/prosemirror/commentIdAllocator.d.ts +2 -2
  300. package/dist/prosemirror/commentOps.d.ts +0 -1
  301. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +1 -10
  302. package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -1
  303. package/dist/prosemirror/conversion/fromProseDoc.js +7 -4
  304. package/dist/prosemirror/conversion/runShadingMark.d.ts +0 -1
  305. package/dist/prosemirror/conversion/sdtAttrs.d.ts +0 -1
  306. package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -2
  307. package/dist/prosemirror/conversion/toProseDoc.js +16 -2
  308. package/dist/prosemirror/extensions/ExtensionManager.d.ts +0 -1
  309. package/dist/prosemirror/extensions/StarterKit.d.ts +7 -4
  310. package/dist/prosemirror/extensions/core/DocExtension.d.ts +0 -1
  311. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -1
  312. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +0 -1
  313. package/dist/prosemirror/extensions/core/TextExtension.d.ts +0 -1
  314. package/dist/prosemirror/extensions/create.d.ts +0 -1
  315. package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +0 -1
  316. package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +0 -1
  317. package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +0 -1
  318. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +0 -1
  319. package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +0 -1
  320. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +0 -1
  321. package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +0 -1
  322. package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +0 -1
  323. package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +0 -1
  324. package/dist/prosemirror/extensions/features/ListExtension.d.ts +0 -1
  325. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -1
  326. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +7 -4
  327. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +0 -1
  328. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +0 -1
  329. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +0 -1
  330. package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +3 -1
  331. package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +0 -1
  332. package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +0 -1
  333. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +0 -1
  334. package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +0 -1
  335. package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +0 -1
  336. package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +0 -1
  337. package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +1 -0
  338. package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +0 -1
  339. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +0 -1
  340. package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +0 -1
  341. package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +0 -1
  342. package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +0 -1
  343. package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +0 -1
  344. package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +0 -1
  345. package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +0 -1
  346. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +0 -1
  347. package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +0 -1
  348. package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +0 -1
  349. package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +0 -1
  350. package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +0 -1
  351. package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +0 -1
  352. package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +0 -1
  353. package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +0 -1
  354. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +0 -1
  355. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +0 -1
  356. package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +0 -1
  357. package/dist/prosemirror/extensions/marks/markUtils.d.ts +0 -1
  358. package/dist/prosemirror/extensions/marks/markUtils.js +4 -1
  359. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +0 -1
  360. package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +0 -1
  361. package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +0 -1
  362. package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +0 -1
  363. package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +0 -1
  364. package/dist/prosemirror/extensions/nodes/ImageExtension.js +2 -0
  365. package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +0 -1
  366. package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +0 -1
  367. package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +0 -1
  368. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +0 -1
  369. package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +0 -1
  370. package/dist/prosemirror/extensions/nodes/ShapeExtension.js +2 -0
  371. package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +0 -1
  372. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +4 -3
  373. package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +0 -1
  374. package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +53 -27
  375. package/dist/prosemirror/extensions/types.d.ts +0 -1
  376. package/dist/prosemirror/findReplaceSelection.d.ts +5 -3
  377. package/dist/prosemirror/imageCommit.d.ts +0 -1
  378. package/dist/prosemirror/index.d.ts +4 -0
  379. package/dist/prosemirror/insertOperations.d.ts +0 -1
  380. package/dist/prosemirror/paraText.d.ts +0 -1
  381. package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +2 -2
  382. package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +0 -1
  383. package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +9 -7
  384. package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +2 -2
  385. package/dist/prosemirror/plugins/contentControlWidgets.d.ts +4 -7
  386. package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +3 -8
  387. package/dist/prosemirror/plugins/documentStyles.d.ts +0 -1
  388. package/dist/prosemirror/plugins/pmTextScan.d.ts +2 -2
  389. package/dist/prosemirror/plugins/revisionIds.d.ts +0 -1
  390. package/dist/prosemirror/plugins/selectionTracker.d.ts +23 -12
  391. package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -1
  392. package/dist/prosemirror/plugins/templateDirectives.d.ts +10 -8
  393. package/dist/prosemirror/plugins/templatePreviewValues.d.ts +10 -5
  394. package/dist/prosemirror/plugins/templateSlashMenu.d.ts +2 -2
  395. package/dist/prosemirror/queries.d.ts +0 -1
  396. package/dist/prosemirror/schema/index.d.ts +0 -1
  397. package/dist/prosemirror/schema/marks.d.ts +8 -5
  398. package/dist/prosemirror/schema/nodes.d.ts +340 -163
  399. package/dist/prosemirror/selectionState.d.ts +13 -7
  400. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +0 -1
  401. package/dist/prosemirror/styles/styleResolver.d.ts +3 -2
  402. package/dist/prosemirror/tableCellMergeRevision.d.ts +0 -1
  403. package/dist/prosemirror/tableResize.d.ts +0 -1
  404. package/dist/prosemirror/textBoxAnchorAttrs.d.ts +0 -1
  405. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +8 -5
  406. package/dist/prosemirror/utils/findParagraphByParaId.d.ts +0 -1
  407. package/dist/prosemirror/utils/tabCalculator.d.ts +18 -7
  408. package/dist/prosemirror/utils/visualLineNavigation.d.ts +0 -1
  409. package/dist/prosemirror/validation.d.ts +0 -1
  410. package/dist/redline.d.ts +16 -8
  411. package/dist/render-dom/BodySelectionOverlay.d.ts +1 -9
  412. package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +0 -1
  413. package/dist/render-dom/RemoteSelectionOverlay.d.ts +1 -8
  414. package/dist/render-dom/resolveSidebarItemPositions.d.ts +1 -9
  415. package/dist/style-engine/styleEngine.d.ts +21 -11
  416. package/dist/style-sets/extract.d.ts +4 -3
  417. package/dist/style-sets/stellaStyle.d.ts +0 -1
  418. package/dist/style-sets/types.d.ts +0 -1
  419. package/dist/symbols.d.ts +6 -2
  420. package/dist/types/block-id.d.ts +3 -6
  421. package/dist/types/document.d.ts +0 -3
  422. package/dist/types/documentEnumValues.d.ts +2 -1
  423. package/dist/types/documentEnumValues.js +6 -1
  424. package/dist/utils/clipboard.d.ts +17 -8
  425. package/dist/utils/colorResolver.d.ts +9 -5
  426. package/dist/utils/createDocument.d.ts +19 -10
  427. package/dist/utils/documentLoaderBehavior.d.ts +1 -5
  428. package/dist/utils/docxInput.js +1 -0
  429. package/dist/utils/findReplace.d.ts +0 -1
  430. package/dist/utils/fontFamilyMerge.d.ts +0 -1
  431. package/dist/utils/fontResolver.d.ts +10 -4
  432. package/dist/utils/formatToStyle.d.ts +0 -1
  433. package/dist/utils/headerFooter.d.ts +8 -16
  434. package/dist/utils/headingCollector.d.ts +7 -4
  435. package/dist/utils/mergeDocumentContent.d.ts +28 -0
  436. package/dist/utils/mergeDocumentContent.js +145 -0
  437. package/dist/utils/paragraphFormattingMerge.d.ts +0 -1
  438. package/dist/utils/replaceText.d.ts +0 -1
  439. package/dist/utils/rotationBoundingBox.d.ts +0 -1
  440. package/dist/utils/tableOperations.d.ts +0 -1
  441. package/dist/utils/textFormattingMerge.d.ts +0 -1
  442. package/dist/version-comparison.d.ts +12 -6
  443. package/dist/watermark/index.d.ts +0 -1
  444. package/package.json +3 -3
@@ -1,7 +1,6 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { DocxInput } from "../utils/docxInput.js";
3
3
  import { DocxCompatibility } from "../docx/compatibility.js";
4
-
5
4
  //#region src/managers/DocumentLoaderManager.d.ts
6
5
  type DocumentLoadState = {
7
6
  status: "loading";
@@ -16,14 +15,21 @@ type DocumentLoadState = {
16
15
  * here so core does not depend on the React `useHistory` return type.
17
16
  */
18
17
  type DocumentLoaderHistory = {
19
- /** The current document, or null before any load. */readonly state: document_d_exports.Document | null; /** Reset history to a freshly loaded document. */
18
+ /** The current document, or null before any load. */
19
+ readonly state: document_d_exports.Document | null;
20
+ /** Reset history to a freshly loaded document. */
20
21
  reset: (document: document_d_exports.Document) => void;
21
22
  };
22
23
  type DocumentLoaderCallbacks = {
23
- /** Editor history to reset/seed with the loaded document. */history: DocumentLoaderHistory; /** Called when an unrecoverable parse error occurs. */
24
- onError: ((error: Error) => void) | undefined; /** Called after parsing to report whether editing can preserve fidelity. */
25
- onCompatibilityChange: ((compatibility: DocxCompatibility) => void) | undefined; /** Clears UI state coupled to the previous document at the start of a load. */
26
- onReset: () => void; /** Sets the document loading slice of editor state. */
24
+ /** Editor history to reset/seed with the loaded document. */
25
+ history: DocumentLoaderHistory;
26
+ /** Called when an unrecoverable parse error occurs. */
27
+ onError: ((error: Error) => void) | undefined;
28
+ /** Called after parsing to report whether editing can preserve fidelity. */
29
+ onCompatibilityChange: ((compatibility: DocxCompatibility) => void) | undefined;
30
+ /** Clears UI state coupled to the previous document at the start of a load. */
31
+ onReset: () => void;
32
+ /** Sets the document loading slice of editor state. */
27
33
  setDocumentLoadState: (state: DocumentLoadState) => void;
28
34
  };
29
35
  declare class DocumentLoaderManager {
@@ -1,5 +1,4 @@
1
1
  import { Subscribable } from "./Subscribable.js";
2
-
3
2
  //#region src/managers/EditorModeManager.d.ts
4
3
  /** Editor mode. Mirrors Google Docs editing/suggesting/viewing semantics. */
5
4
  type EditorMode = "editing" | "suggesting" | "viewing";
@@ -8,7 +7,9 @@ declare const DISPLAY_MODES: readonly ["all-markup", "simple-markup", "no-markup
8
7
  type DisplayMode = (typeof DISPLAY_MODES)[number];
9
8
  /** EditorModeManager snapshot. */
10
9
  type EditorModeSnapshot = {
11
- /** Uncontrolled internal editing mode (the host's controlled prop wins over this). */editingMode: EditorMode; /** Tracked-changes display mode (`all-markup` by default). */
10
+ /** Uncontrolled internal editing mode (the host's controlled prop wins over this). */
11
+ editingMode: EditorMode;
12
+ /** Tracked-changes display mode (`all-markup` by default). */
12
13
  displayMode: DisplayMode;
13
14
  };
14
15
  /** True when the host opts into read-only OR the mode is `"viewing"`. */
@@ -1,6 +1,5 @@
1
1
  import { Subscribable } from "./Subscribable.js";
2
2
  import { ErrorManagerSnapshot } from "./types.js";
3
-
4
3
  //#region src/managers/ErrorManager.d.ts
5
4
  declare class ErrorManager extends Subscribable<ErrorManagerSnapshot> {
6
5
  private notifications;
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { FindMatchPosition } from "../prosemirror/findReplaceSelection.js";
3
-
4
3
  //#region src/managers/FindReplaceManager.d.ts
5
4
  type FindDirection = "next" | "previous";
6
5
  type FindReplaceResult<TMatch> = {
@@ -1,23 +1,33 @@
1
1
  import { Subscribable } from "./Subscribable.js";
2
-
3
2
  //#region src/managers/HistoryManager.d.ts
4
3
  /** History entry containing state and metadata. */
5
4
  type HistoryEntry<T> = {
6
- /** The state at this point. */state: T; /** Timestamp when this entry was created. */
7
- timestamp: number; /** Optional description of what changed. */
5
+ /** The state at this point. */
6
+ state: T;
7
+ /** Timestamp when this entry was created. */
8
+ timestamp: number;
9
+ /** Optional description of what changed. */
8
10
  description?: string;
9
11
  };
10
12
  /** Reactive snapshot adapters render from. */
11
13
  type HistorySnapshot<T> = {
12
- /** Current state. */state: T; /** Whether undo is available. */
13
- canUndo: boolean; /** Whether redo is available. */
14
- canRedo: boolean; /** Number of entries in the undo stack. */
15
- undoCount: number; /** Number of entries in the redo stack. */
14
+ /** Current state. */
15
+ state: T;
16
+ /** Whether undo is available. */
17
+ canUndo: boolean;
18
+ /** Whether redo is available. */
19
+ canRedo: boolean;
20
+ /** Number of entries in the undo stack. */
21
+ undoCount: number;
22
+ /** Number of entries in the redo stack. */
16
23
  redoCount: number;
17
24
  };
18
25
  type HistoryManagerOptions<T> = {
19
- /** Maximum number of entries in the undo stack (default: 100). */maxEntries?: number; /** Time in ms within which rapid pushes are grouped (default: 500). */
20
- groupingInterval?: number; /** Custom comparison used to skip no-op pushes (default: JSON compare). */
26
+ /** Maximum number of entries in the undo stack (default: 100). */
27
+ maxEntries?: number;
28
+ /** Time in ms within which rapid pushes are grouped (default: 500). */
29
+ groupingInterval?: number;
30
+ /** Custom comparison used to skip no-op pushes (default: JSON compare). */
21
31
  isEqual?: (a: T, b: T) => boolean;
22
32
  };
23
33
  /** Default equality check using JSON stringify. */
@@ -2,7 +2,6 @@ import { document_d_exports } from "../types/document.js";
2
2
  import { Subscribable } from "./Subscribable.js";
3
3
  import { CellCoordinates } from "./types.js";
4
4
  import { TableAction, TableContext } from "../utils/tableOperations.js";
5
-
6
5
  //#region src/managers/TableSelectionManager.d.ts
7
6
  /** Data attributes for table elements in the rendered DOM */
8
7
  declare const TABLE_DATA_ATTRIBUTES: {
@@ -1,5 +1,4 @@
1
1
  import { EditorState, Transaction } from "prosemirror-state";
2
-
3
2
  //#region src/managers/editorShortcuts.d.ts
4
3
  declare function isMacPlatform(): boolean;
5
4
  /**
@@ -19,7 +18,9 @@ type EditorKeydownIntent = {
19
18
  type: "none";
20
19
  };
21
20
  type ClassifyEditorKeydownOptions = {
22
- /** Whether the platform uses Cmd (Mac) rather than Ctrl as the primary modifier. */isMac: boolean; /** Whether focus is in a non-editor input/textarea/contenteditable. */
21
+ /** Whether the platform uses Cmd (Mac) rather than Ctrl as the primary modifier. */
22
+ isMac: boolean;
23
+ /** Whether focus is in a non-editor input/textarea/contenteditable. */
23
24
  isInputLike: boolean;
24
25
  };
25
26
  /**
@@ -28,10 +29,7 @@ type ClassifyEditorKeydownOptions = {
28
29
  * - Cmd/Ctrl+P (no auto-repeat) → custom print
29
30
  * - Delete/Backspace (no modifiers, focus not in an input) → delete selected table
30
31
  */
31
- declare function classifyEditorKeydown(e: KeyboardEvent, {
32
- isMac,
33
- isInputLike
34
- }: ClassifyEditorKeydownOptions): EditorKeydownIntent;
32
+ declare function classifyEditorKeydown(e: KeyboardEvent, { isMac, isInputLike }: ClassifyEditorKeydownOptions): EditorKeydownIntent;
35
33
  /**
36
34
  * If the selection is a ProseMirror `CellSelection` covering every cell of its
37
35
  * table, delete the table and return `true`. Returns `false` for any other
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/annotations.d.ts
5
4
  declare function wrapInsertion(ctx: RenderContext, info: document_d_exports.TrackedChangeInfo, inner: string): string;
6
5
  declare function wrapDeletion(ctx: RenderContext, info: document_d_exports.TrackedChangeInfo, inner: string): string;
@@ -1,5 +1,4 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
-
3
2
  //#region src/markdown/fromMarkdown.d.ts
4
3
  /**
5
4
  * Convert a markdown string to a parsed `Document`. Synchronous. The result is
@@ -21,6 +21,13 @@ import { marked } from "marked";
21
21
  * continuous, header/footer-free band (a skill body is a document, not a
22
22
  * Word page). Headers/footers live outside `document.content` and are never
23
23
  * produced here.
24
+ * - Every markdown list also gets a matching `w:abstractNum`/`w:num` pair in
25
+ * `document.package.numbering` (see {@link buildNumbering}), so the result
26
+ * is self-consistent and `createDocx` never has to fail with a missing
27
+ * numbering definition. Merging this content onto another document that
28
+ * has its own numbering (e.g. a styled preset) needs `mergeDocumentContent`
29
+ * to renumber the two numbering namespaces apart — appending
30
+ * `document.package.document.content` directly can collide.
24
31
  */
25
32
  const MONO_FONT = {
26
33
  ascii: "Courier New",
@@ -146,10 +153,24 @@ const tableFromToken = (token) => ({
146
153
  cells: row.map((c) => cellOf(c))
147
154
  }))]
148
155
  });
149
- const listBlocks = (list, level, numId) => {
156
+ const LIST_INDENT_STEP_TWIPS = 720;
157
+ const buildListLevel = (ilvl, isBullet, start) => ({
158
+ ilvl,
159
+ ...!isBullet && { start },
160
+ numFmt: isBullet ? "bullet" : "decimal",
161
+ lvlText: isBullet ? "•" : `%${ilvl + 1}.`,
162
+ suffix: "tab",
163
+ pPr: {
164
+ indentLeft: LIST_INDENT_STEP_TWIPS * (ilvl + 1),
165
+ indentFirstLine: -360,
166
+ hangingIndent: true
167
+ }
168
+ });
169
+ const listBlocks = (list, level, numId, levels) => {
150
170
  const out = [];
151
171
  const start = Number(list.start) || 1;
152
172
  const decimalLevels = Array.from({ length: level + 1 }, () => "decimal");
173
+ if (!levels.has(level)) levels.set(level, buildListLevel(level, !list.ordered, start));
153
174
  for (const item of list.items) {
154
175
  const rendering = list.ordered ? {
155
176
  marker: `%${level + 1}.`,
@@ -170,7 +191,7 @@ const listBlocks = (list, level, numId) => {
170
191
  for (const child of item.tokens) if (isTokenType(child, "list")) nestedLists.push(child);
171
192
  else inlineTokens.push(child);
172
193
  out.push(listPara(inlineToRuns(inlineTokens, item.text, {}), rendering));
173
- for (const nested of nestedLists) out.push(...listBlocks(nested, level + 1, numId));
194
+ for (const nested of nestedLists) out.push(...listBlocks(nested, level + 1, numId, levels));
174
195
  }
175
196
  return out;
176
197
  };
@@ -180,8 +201,12 @@ const blocksFromTokens = (tokens, numIds) => {
180
201
  const level = Math.min(Math.max(token.depth, 1), 4);
181
202
  blocks.push(para(inlineToRuns(token.tokens, token.text, {}), `Heading${level}`));
182
203
  } else if (isTokenType(token, "paragraph")) blocks.push(para(inlineToRuns(token.tokens, token.text, {})));
183
- else if (isTokenType(token, "list")) blocks.push(...listBlocks(token, 0, numIds.next++));
184
- else if (isTokenType(token, "table")) blocks.push(tableFromToken(token));
204
+ else if (isTokenType(token, "list")) {
205
+ const numId = numIds.next++;
206
+ const levels = /* @__PURE__ */ new Map();
207
+ numIds.levels.set(numId, levels);
208
+ blocks.push(...listBlocks(token, 0, numId, levels));
209
+ } else if (isTokenType(token, "table")) blocks.push(tableFromToken(token));
185
210
  else if (isTokenType(token, "code")) for (const line of token.text.split("\n")) blocks.push(para([textRun(line.length > 0 ? line : " ", { mono: true })]));
186
211
  else if (isTokenType(token, "blockquote")) for (const inner of blocksFromTokens(token.tokens, numIds)) {
187
212
  const styled = inner.type === "paragraph" ? {
@@ -207,6 +232,26 @@ const applyMarkdownPageGeometry = (document) => {
207
232
  section.headerDistance = 0;
208
233
  section.footerDistance = 0;
209
234
  };
235
+ const buildNumbering = (numIdLevels) => {
236
+ const abstractNums = [];
237
+ const nums = [];
238
+ for (const [numId, levels] of numIdLevels) {
239
+ const sortedLevels = [...levels.entries()].sort(([a], [b]) => a - b).map(([, lvl]) => lvl);
240
+ abstractNums.push({
241
+ abstractNumId: numId,
242
+ multiLevelType: sortedLevels.length > 1 ? "multilevel" : "singleLevel",
243
+ levels: sortedLevels
244
+ });
245
+ nums.push({
246
+ numId,
247
+ abstractNumId: numId
248
+ });
249
+ }
250
+ return {
251
+ abstractNums,
252
+ nums
253
+ };
254
+ };
210
255
  /**
211
256
  * Convert a markdown string to a parsed `Document`. Synchronous. The result is
212
257
  * ready to hand to the editor (`<DocxEditor document={…} />`) and to re-export
@@ -214,8 +259,13 @@ const applyMarkdownPageGeometry = (document) => {
214
259
  */
215
260
  function fromMarkdown(markdown) {
216
261
  const document = createEmptyDocument();
217
- const blocks = blocksFromTokens(marked.lexer(markdown), { next: 1 });
262
+ const numIds = {
263
+ next: 1,
264
+ levels: /* @__PURE__ */ new Map()
265
+ };
266
+ const blocks = blocksFromTokens(marked.lexer(markdown), numIds);
218
267
  if (blocks.length > 0) document.package.document.content = blocks;
268
+ if (numIds.levels.size > 0) document.package.numbering = buildNumbering(numIds.levels);
219
269
  applyMarkdownPageGeometry(document);
220
270
  return document;
221
271
  }
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { ImageRef, RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/images.d.ts
5
4
  /**
6
5
  * Build an `ImageRef` from a `MediaFile` and store it in the context's image
@@ -1,7 +1,6 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { ImageMeta, ImageRef, MarkdownOptions, MarkdownResult } from "./types.js";
3
3
  import { fromMarkdown } from "./fromMarkdown.js";
4
-
5
4
  //#region src/markdown/index.d.ts
6
5
  /**
7
6
  * Convert a parsed `Document` to a markdown string. Synchronous; pre-parse the
@@ -1,5 +1,4 @@
1
1
  import { MarkdownOptions, RenderContext } from "./types.js";
2
-
3
2
  //#region src/markdown/internals.d.ts
4
3
  /**
5
4
  * Build a fresh `RenderContext` from caller options, applying defaults. The
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/renderBlock.d.ts
5
4
  declare function renderBlocks(ctx: RenderContext, pkg: document_d_exports.DocxPackage | undefined, blocks: document_d_exports.BlockContent[]): string;
6
5
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/renderParagraph.d.ts
5
4
  /**
6
5
  * Render a paragraph and return the block text. No surrounding blank line: the
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/renderRuns.d.ts
5
4
  /**
6
5
  * Render the full inline content of a paragraph, tracking comment-range
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/renderTable.d.ts
5
4
  /** Render a `Table` as markdown. Picks GFM vs HTML based on cell features. */
6
5
  declare function renderTable(ctx: RenderContext, pkg: document_d_exports.DocxPackage | undefined, table: document_d_exports.Table): string;
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { RenderContext } from "./types.js";
3
-
4
3
  //#region src/markdown/trailers.d.ts
5
4
  /**
6
5
  * Append footnote definitions, the hyperlink reference list (for
@@ -12,17 +12,26 @@
12
12
  * types.
13
13
  */
14
14
  type ImageMeta = {
15
- /** `paraId` of the containing paragraph, when the source paragraph has one. */paraId?: string | undefined; /** 1-based ordinal in registration order. Unique per render call. */
16
- index: number; /** Path inside the DOCX zip (e.g. `word/media/image1.png`). */
17
- originalPath: string; /** MIME type (`image/png`, `image/jpeg`, …). */
18
- mimeType: string; /** Alt text from the drawing, when present. */
15
+ /** `paraId` of the containing paragraph, when the source paragraph has one. */
16
+ paraId?: string | undefined;
17
+ /** 1-based ordinal in registration order. Unique per render call. */
18
+ index: number;
19
+ /** Path inside the DOCX zip (e.g. `word/media/image1.png`). */
20
+ originalPath: string;
21
+ /** MIME type (`image/png`, `image/jpeg`, …). */
22
+ mimeType: string;
23
+ /** Alt text from the drawing, when present. */
19
24
  alt?: string | undefined;
20
25
  };
21
26
  /** Full registration record for an image, keyed by `virtualPath`. */
22
27
  type ImageRef = {
23
- /** Raw bytes as exposed by the DOCX parser. */data: Uint8Array; /** Base64-encoded contents, without the `data:` prefix. */
24
- base64: string; /** `data:<mime>;base64,<base64>` URL. */
25
- dataUrl: string; /** The path that appears inside the markdown's `![alt](…)` reference. */
28
+ /** Raw bytes as exposed by the DOCX parser. */
29
+ data: Uint8Array;
30
+ /** Base64-encoded contents, without the `data:` prefix. */
31
+ base64: string;
32
+ /** `data:<mime>;base64,<base64>` URL. */
33
+ dataUrl: string;
34
+ /** The path that appears inside the markdown's `![alt](…)` reference. */
26
35
  virtualPath: string;
27
36
  } & ImageMeta;
28
37
  /**
@@ -74,8 +83,11 @@ type MarkdownOptions = {
74
83
  };
75
84
  /** Result of a render, when the caller needs images/warnings as well as text. */
76
85
  type MarkdownResult = {
77
- /** The full rendered markdown string. */markdown: string; /** Every image referenced in `markdown`, keyed by its virtual path. */
78
- images: Map<string, ImageRef>; /** Non-fatal diagnostics; recurring messages are deduped. */
86
+ /** The full rendered markdown string. */
87
+ markdown: string;
88
+ /** Every image referenced in `markdown`, keyed by its virtual path. */
89
+ images: Map<string, ImageRef>;
90
+ /** Non-fatal diagnostics; recurring messages are deduped. */
79
91
  warnings: string[];
80
92
  };
81
93
  /** Resolved option values with defaults applied. Used internally. */
@@ -93,25 +105,34 @@ type ResolvedOptions = {
93
105
  * reference lists. Exported only so the split renderer files share the shape.
94
106
  */
95
107
  type RenderContext = {
96
- opts: ResolvedOptions; /** Accumulated images keyed by virtual path. */
97
- images: Map<string, ImageRef>; /** Same images keyed by source `MediaFile.path` for dedupe on re-reference. */
98
- imagesByPath: Map<string, ImageRef>; /** Diagnostics accumulator. */
99
- warnings: string[]; /** Footnote/endnote refs collected during this render, in document order. */
108
+ opts: ResolvedOptions;
109
+ /** Accumulated images keyed by virtual path. */
110
+ images: Map<string, ImageRef>;
111
+ /** Same images keyed by source `MediaFile.path` for dedupe on re-reference. */
112
+ imagesByPath: Map<string, ImageRef>;
113
+ /** Diagnostics accumulator. */
114
+ warnings: string[];
115
+ /** Footnote/endnote refs collected during this render, in document order. */
100
116
  footnoteRefs: {
101
117
  refId: number;
102
118
  markerNumber: number;
103
119
  kind: "footnote" | "endnote";
104
- }[]; /** Comment refs collected during this render (sidecar mode only). */
120
+ }[];
121
+ /** Comment refs collected during this render (sidecar mode only). */
105
122
  commentRefs: {
106
123
  commentId: number;
107
124
  markerNumber: number;
108
- }[]; /** Hyperlink refs collected during this render (reference mode only). */
125
+ }[];
126
+ /** Hyperlink refs collected during this render (reference mode only). */
109
127
  hyperlinkRefs: {
110
128
  href: string;
111
129
  refNumber: number;
112
- }[]; /** 1-based counter for default virtual paths. */
113
- imageCounter: number; /** Live list counters per numId, for resolving `%N` marker templates. */
114
- listCounters: Map<number, number[]>; /** `numId:level` pairs already seen, so a start override applies once. */
130
+ }[];
131
+ /** 1-based counter for default virtual paths. */
132
+ imageCounter: number;
133
+ /** Live list counters per numId, for resolving `%N` marker templates. */
134
+ listCounters: Map<number, number[]>;
135
+ /** `numId:level` pairs already seen, so a start override applies once. */
115
136
  listSeenLevels: Set<string>;
116
137
  };
117
138
  //#endregion
package/dist/model.d.ts CHANGED
@@ -1,13 +1,11 @@
1
1
  import { document_d_exports } from "./types/document.js";
2
2
  import { DeriveBlockIdInput, FolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
3
- import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
3
+ import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
4
4
  import { types_d_exports } from "./layout-engine/types.js";
5
5
  import { measureTypes_d_exports } from "./layout-engine/measure/measureTypes.js";
6
6
  export * from "@stll/docx-core/model";
7
-
8
- //#region src/model.d.ts
9
7
  declare namespace model_d_exports {
10
- export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
8
+ export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
11
9
  }
12
10
  //#endregion
13
- export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, type measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
11
+ export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, DeriveBlockIdInput, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, FolioBlockId, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_d_exports as Layout, type measureTypes_d_exports as Measure, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
package/dist/model.js CHANGED
@@ -1,4 +1,4 @@
1
- import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
1
+ import { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES } from "./types/documentEnumValues.js";
2
2
  import { deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
3
3
  import { types_exports } from "./layout-engine/types.js";
4
- export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_exports as Layout, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
4
+ export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, types_exports as Layout, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES, deriveBlockId, getFolioParaIdFromBlockId, getSequentialFolioBlockIdIndex, isFolioBlockId, isSequentialFolioBlockId };
@@ -1,5 +1,4 @@
1
1
  import { FlowBlock, Measure } from "../layout-engine/types.js";
2
-
3
2
  //#region src/paged-layout/incrementalMeasure.d.ts
4
3
  type DirtyRange = {
5
4
  from: number;
@@ -20,14 +19,6 @@ type IncrementalMeasureResult = {
20
19
  };
21
20
  declare function mergeDirtyRanges(first: DirtyRange | null, second: DirtyRange | null): DirtyRange | null;
22
21
  declare function findDirtyBlockIndexes(blocks: FlowBlock[], dirtyRange: DirtyRange): number[];
23
- declare function tryBuildIncrementalMeasures({
24
- previousBlocks,
25
- previousMeasures,
26
- previousBlockWidths,
27
- nextBlocks,
28
- nextBlockWidths,
29
- dirtyRange,
30
- measureBlock
31
- }: IncrementalMeasureInput): IncrementalMeasureResult | null;
22
+ declare function tryBuildIncrementalMeasures({ previousBlocks, previousMeasures, previousBlockWidths, nextBlocks, nextBlockWidths, dirtyRange, measureBlock }: IncrementalMeasureInput): IncrementalMeasureResult | null;
32
23
  //#endregion
33
24
  export { DirtyRange, IncrementalMeasureInput, IncrementalMeasureResult, findDirtyBlockIndexes, mergeDirtyRanges, tryBuildIncrementalMeasures };
@@ -1,6 +1,6 @@
1
1
  import { Layout } from "../layout-engine/types.js";
2
+ import "../layout-engine/index.js";
2
3
  import { Node } from "prosemirror-model";
3
-
4
4
  //#region src/paged-layout/pageText.d.ts
5
5
  /**
6
6
  * The plain text of a single rendered page (1-based), read by joining each of
@@ -1,5 +1,4 @@
1
1
  import { ParagraphHighlightOptions, ScrollToParaIdOptions } from "./paragraphFlashTypes.js";
2
-
3
2
  //#region src/paged-layout/paragraphFlash.d.ts
4
3
  /** Default color used by paragraph flashes. */
5
4
  declare const DEFAULT_PARAGRAPH_FLASH_COLOR = "rgba(255, 235, 59, 0.55)";
@@ -7,12 +7,15 @@
7
7
  */
8
8
  /** Customization for the transient paragraph flash applied by `scrollToParaId`. */
9
9
  type ParagraphHighlightOptions = {
10
- /** CSS color used for the transient paragraph flash. Defaults to yellow. */color?: string; /** How long the flash remains visible before it is removed. Defaults to 1200ms. */
10
+ /** CSS color used for the transient paragraph flash. Defaults to yellow. */
11
+ color?: string;
12
+ /** How long the flash remains visible before it is removed. Defaults to 1200ms. */
11
13
  durationMs?: number;
12
14
  };
13
15
  /** Optional reveal behavior for `scrollToParaId`. */
14
16
  type ScrollToParaIdOptions = {
15
- /** Flash rendered paragraph fragments after scrolling to the paragraph. */highlight?: ParagraphHighlightOptions;
17
+ /** Flash rendered paragraph fragments after scrolling to the paragraph. */
18
+ highlight?: ParagraphHighlightOptions;
16
19
  };
17
20
  //#endregion
18
21
  export { ParagraphHighlightOptions, ScrollToParaIdOptions };
@@ -1,6 +1,5 @@
1
1
  import { FlowBlock, Layout, Measure } from "../layout-engine/types.js";
2
2
  import { SelectionRect } from "../layout-bridge/engine/selectionRects.js";
3
-
4
3
  //#region src/paged-layout/rangeProjection.d.ts
5
4
  type ProjectableRange = {
6
5
  from: number;
@@ -31,8 +30,11 @@ declare const measureContentLeft: (pagesContainer: HTMLElement, zoom: number) =>
31
30
  * inter-page gap — exactly the region a gutter rail is allowed to paint over.
32
31
  */
33
32
  type PageContentBand = {
34
- /** 0-based page index (from `data-page-number` minus one). */pageIndex: number; /** Top of the body content area, container space. */
35
- top: number; /** Bottom of the body content area, container space. */
33
+ /** 0-based page index (from `data-page-number` minus one). */
34
+ pageIndex: number;
35
+ /** Top of the body content area, container space. */
36
+ top: number;
37
+ /** Bottom of the body content area, container space. */
36
38
  bottom: number;
37
39
  };
38
40
  /**
@@ -42,8 +44,11 @@ type PageContentBand = {
42
44
  * instead of running across page breaks). Measured O(pages), never per-range.
43
45
  */
44
46
  type DirectiveGutterGeometry = {
45
- /** Text-column left edge, container space. Rails anchor here. */contentLeft: number; /** Usable left-margin width: `contentLeft - pageLeftEdge`. Drives the budget. */
46
- marginWidth: number; /** Per-page body-content vertical bands, in document order. */
47
+ /** Text-column left edge, container space. Rails anchor here. */
48
+ contentLeft: number;
49
+ /** Usable left-margin width: `contentLeft - pageLeftEdge`. Drives the budget. */
50
+ marginWidth: number;
51
+ /** Per-page body-content vertical bands, in document order. */
47
52
  pageBands: PageContentBand[];
48
53
  };
49
54
  declare const measureDirectiveGutter: (pagesContainer: HTMLElement, zoom: number) => DirectiveGutterGeometry | null;
@@ -1,5 +1,4 @@
1
1
  import { Layout } from "../layout-engine/types.js";
2
-
3
2
  //#region src/paged-layout/scrollNavigation.d.ts
4
3
  type PageScrollTarget = {
5
4
  type: "position";
@@ -14,11 +14,17 @@ type ScrollPageInfo = {
14
14
  };
15
15
  declare const updateScrollPageTotal: (previous: ScrollPageInfo, totalPages: number) => ScrollPageInfo;
16
16
  type ScrollPageMetrics = {
17
- /** Laid-out page heights (unscaled), top to bottom. */pageHeights: readonly number[]; /** Current scroll offset of the container (scaled by zoom). */
18
- scrollTop: number; /** Visible height of the scroll container. */
19
- clientHeight: number; /** Current zoom factor. */
20
- zoom: number; /** Padding above the first page in the scroll container. */
21
- viewportPaddingTop: number; /** Gap rendered between consecutive pages. */
17
+ /** Laid-out page heights (unscaled), top to bottom. */
18
+ pageHeights: readonly number[];
19
+ /** Current scroll offset of the container (scaled by zoom). */
20
+ scrollTop: number;
21
+ /** Visible height of the scroll container. */
22
+ clientHeight: number;
23
+ /** Current zoom factor. */
24
+ zoom: number;
25
+ /** Padding above the first page in the scroll container. */
26
+ viewportPaddingTop: number;
27
+ /** Gap rendered between consecutive pages. */
22
28
  pageGap: number;
23
29
  };
24
30
  /**
@@ -26,14 +32,7 @@ type ScrollPageMetrics = {
26
32
  * count from the laid-out page heights and the live scroll position. Returns
27
33
  * null when there are no pages to measure.
28
34
  */
29
- declare const computeScrollPageInfo: ({
30
- pageHeights,
31
- scrollTop,
32
- clientHeight,
33
- zoom,
34
- viewportPaddingTop,
35
- pageGap
36
- }: ScrollPageMetrics) => {
35
+ declare const computeScrollPageInfo: ({ pageHeights, scrollTop, clientHeight, zoom, viewportPaddingTop, pageGap }: ScrollPageMetrics) => {
37
36
  currentPage: number;
38
37
  totalPages: number;
39
38
  } | null;
@@ -1,5 +1,4 @@
1
1
  import { EditorView } from "prosemirror-view";
2
-
3
2
  //#region src/paged-layout/scrollToPmPosition.d.ts
4
3
  /** Class on the pages container `PagedEditor` paints into. */
5
4
  declare const PAGES_CONTAINER_CLASS = "paged-editor__pages";