@stll/folio-core 0.43.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/ai-edits/__fixtures__/paragraphs.js +2 -2
  2. package/dist/ai-edits/headless.js +7 -5
  3. package/dist/ai-edits/index.d.ts +2 -2
  4. package/dist/ai-edits/index.js +2 -2
  5. package/dist/ai-edits/snapshot.js +13 -9
  6. package/dist/compare/content-alignment.js +94 -54
  7. package/dist/compare/inline-atoms.js +34 -20
  8. package/dist/compare/style-resources.js +6 -0
  9. package/dist/content-controls/mutateContentControls.js +4 -2
  10. package/dist/display-list/dom/renderDisplayListToDom.js +8 -8
  11. package/dist/document-operations.js +14 -3
  12. package/dist/docx/appVersionNormalization.d.ts +0 -18
  13. package/dist/docx/blockContentParser.js +8 -0
  14. package/dist/docx/blockRangeMarkers.d.ts +36 -0
  15. package/dist/docx/blockRangeMarkers.js +59 -0
  16. package/dist/docx/bookmarkParser.d.ts +2 -20
  17. package/dist/docx/bookmarkParser.js +6 -30
  18. package/dist/docx/borderParser.d.ts +13 -0
  19. package/dist/docx/borderParser.js +71 -0
  20. package/dist/docx/builtInStyles.d.ts +165 -0
  21. package/dist/docx/builtInStyles.js +239 -0
  22. package/dist/docx/commentIdNormalization.d.ts +3 -1
  23. package/dist/docx/commentIdNormalization.js +18 -1
  24. package/dist/docx/commentParser.d.ts +2 -1
  25. package/dist/docx/commentParser.js +80 -42
  26. package/dist/docx/commentReferenceNormalization.d.ts +4 -1
  27. package/dist/docx/commentReferenceNormalization.js +23 -14
  28. package/dist/docx/commentThreadKey.d.ts +18 -0
  29. package/dist/docx/commentThreadKey.js +22 -0
  30. package/dist/docx/danglingRelationshipReferences.d.ts +15 -0
  31. package/dist/docx/danglingRelationshipReferences.js +30 -0
  32. package/dist/docx/defaultParagraphStyle.d.ts +18 -1
  33. package/dist/docx/defaultParagraphStyle.js +23 -1
  34. package/dist/docx/diagramPreview.js +87 -27
  35. package/dist/docx/documentParser.d.ts +2 -1
  36. package/dist/docx/documentParser.js +2 -2
  37. package/dist/docx/drawingUtils.d.ts +8 -1
  38. package/dist/docx/drawingUtils.js +12 -3
  39. package/dist/docx/fieldParser.js +3 -5
  40. package/dist/docx/footnoteParser.d.ts +3 -2
  41. package/dist/docx/footnoteParser.js +19 -4
  42. package/dist/docx/groupDrawingParser.js +4 -4
  43. package/dist/docx/headerFooterRefParser.d.ts +4 -3
  44. package/dist/docx/headerFooterRefParser.js +42 -12
  45. package/dist/docx/headerFooterReferenceNormalization.d.ts +4 -1
  46. package/dist/docx/headerFooterReferenceNormalization.js +5 -1
  47. package/dist/docx/hyperlinkParser.js +13 -17
  48. package/dist/docx/imageParser.d.ts +10 -2
  49. package/dist/docx/imageParser.js +80 -30
  50. package/dist/docx/imageRawXml.d.ts +14 -1
  51. package/dist/docx/imageRawXml.js +35 -11
  52. package/dist/docx/markupRangeMarker.d.ts +15 -0
  53. package/dist/docx/markupRangeMarker.js +44 -0
  54. package/dist/docx/mathToMathml.js +12 -14
  55. package/dist/docx/nonVisualDrawingProps.d.ts +34 -0
  56. package/dist/docx/nonVisualDrawingProps.js +46 -0
  57. package/dist/docx/noteReferenceStyles.d.ts +29 -0
  58. package/dist/docx/noteReferenceStyles.js +70 -0
  59. package/dist/docx/numberingReferenceNormalization.d.ts +4 -1
  60. package/dist/docx/numberingReferenceNormalization.js +20 -1
  61. package/dist/docx/paraIdRangeNormalization.d.ts +0 -19
  62. package/dist/docx/paragraphParser.js +66 -99
  63. package/dist/docx/paragraphPropertySource.js +1 -0
  64. package/dist/docx/paragraphTextBoxEnrichment.js +3 -0
  65. package/dist/docx/paragraphTraversal.d.ts +37 -1
  66. package/dist/docx/paragraphTraversal.js +84 -1
  67. package/dist/docx/parseContext.d.ts +37 -0
  68. package/dist/docx/parseContext.js +67 -0
  69. package/dist/docx/parseWarningMessage.d.ts +6 -0
  70. package/dist/docx/parseWarningMessage.js +44 -0
  71. package/dist/docx/parser.js +83 -29
  72. package/dist/docx/previewBudget.d.ts +64 -0
  73. package/dist/docx/previewBudget.js +88 -0
  74. package/dist/docx/relsParser.d.ts +28 -11
  75. package/dist/docx/relsParser.js +26 -13
  76. package/dist/docx/revisionIdNormalization.js +96 -10
  77. package/dist/docx/rezip.js +80 -40
  78. package/dist/docx/runConsolidator.js +1 -2
  79. package/dist/docx/runParser.d.ts +8 -1
  80. package/dist/docx/runParser.js +30 -48
  81. package/dist/docx/sdtPropertiesPatch.js +24 -18
  82. package/dist/docx/sectionParser.d.ts +2 -1
  83. package/dist/docx/sectionParser.js +21 -65
  84. package/dist/docx/sectionReferenceHistory.js +2 -2
  85. package/dist/docx/selectiveSave.js +6 -6
  86. package/dist/docx/serializer/blockSdtSerializer.js +38 -26
  87. package/dist/docx/serializer/borderSerializer.d.ts +2 -3
  88. package/dist/docx/serializer/borderSerializer.js +13 -12
  89. package/dist/docx/serializer/commentSerializer.d.ts +41 -16
  90. package/dist/docx/serializer/commentSerializer.js +82 -72
  91. package/dist/docx/serializer/documentSerializer.d.ts +1 -5
  92. package/dist/docx/serializer/documentSerializer.js +6 -16
  93. package/dist/docx/serializer/fontTableSerializer.js +6 -6
  94. package/dist/docx/serializer/headerFooterSerializer.js +10 -5
  95. package/dist/docx/serializer/markupRangeAttributes.d.ts +8 -0
  96. package/dist/docx/serializer/markupRangeAttributes.js +24 -0
  97. package/dist/docx/serializer/noteSerializer.js +5 -0
  98. package/dist/docx/serializer/numberingSerializer.js +7 -6
  99. package/dist/docx/serializer/paragraphSerializer.d.ts +1 -5
  100. package/dist/docx/serializer/paragraphSerializer.js +47 -52
  101. package/dist/docx/serializer/partNamespaces.js +2 -2
  102. package/dist/docx/serializer/runSerializer.js +57 -31
  103. package/dist/docx/serializer/sectionPropertiesSerializer.js +11 -10
  104. package/dist/docx/serializer/settingsSerializer.js +4 -3
  105. package/dist/docx/serializer/stylesSerializer.js +6 -6
  106. package/dist/docx/serializer/tableSerializer.js +37 -21
  107. package/dist/docx/serializer/textFormattingSerializer.d.ts +2 -3
  108. package/dist/docx/serializer/textFormattingSerializer.js +29 -28
  109. package/dist/docx/serializer/themeSerializer.js +6 -6
  110. package/dist/docx/serializer/trackedChangeAttributes.js +2 -2
  111. package/dist/docx/serializer/xmlUtils.d.ts +1 -2
  112. package/dist/docx/serializer/xmlUtils.js +1 -13
  113. package/dist/docx/server/boundedArchive.d.ts +12 -0
  114. package/dist/docx/server/boundedArchive.js +20 -1
  115. package/dist/docx/server/build.js +8 -1
  116. package/dist/docx/server/createBilingualDocument.js +10 -18
  117. package/dist/docx/server/extractDocxText.js +3 -4
  118. package/dist/docx/server/validateDocxConformance.js +22 -1
  119. package/dist/docx/shadingParser.d.ts +6 -0
  120. package/dist/docx/shadingParser.js +32 -0
  121. package/dist/docx/shapeParser.js +10 -8
  122. package/dist/docx/styleParser.js +13 -87
  123. package/dist/docx/styleReferenceResolution.d.ts +36 -0
  124. package/dist/docx/styleReferenceResolution.js +51 -0
  125. package/dist/docx/tableLook.d.ts +57 -0
  126. package/dist/docx/tableLook.js +63 -0
  127. package/dist/docx/tableParser.d.ts +7 -9
  128. package/dist/docx/tableParser.js +64 -110
  129. package/dist/docx/textBoxParser.js +11 -6
  130. package/dist/docx/trackedMoveRangeNormalization.d.ts +3 -1
  131. package/dist/docx/trackedMoveRangeNormalization.js +11 -21
  132. package/dist/docx/transitionalSpelling.d.ts +13 -2
  133. package/dist/docx/transitionalSpelling.js +23 -1
  134. package/dist/docx/unzip.d.ts +23 -0
  135. package/dist/docx/unzip.js +32 -22
  136. package/dist/docx/verbatimCapture.js +5 -12
  137. package/dist/docx/vmlImageParser.js +5 -4
  138. package/dist/docx/vmlPreview.d.ts +1 -3
  139. package/dist/docx/vmlPreview.js +2 -30
  140. package/dist/docx/watermarkParser.js +2 -2
  141. package/dist/docx/xmlParser.d.ts +38 -33
  142. package/dist/docx/xmlParser.js +92 -47
  143. package/dist/docx/xmlResourceLimits.d.ts +89 -9
  144. package/dist/docx/xmlResourceLimits.js +105 -24
  145. package/dist/internal/pageBreakRunSourceDescendantIndex.js +2 -1
  146. package/dist/internal/paragraphFormattingSerialization.d.ts +2 -3
  147. package/dist/internal/paragraphFormattingSerialization.js +29 -8
  148. package/dist/layout-bridge/convert/footnoteLayout.js +2 -7
  149. package/dist/layout-engine/index.d.ts +2 -2
  150. package/dist/layout-engine/index.js +2 -2
  151. package/dist/layout-engine/measure/measureBlocks.js +1 -6
  152. package/dist/layout-engine/types.d.ts +8 -2
  153. package/dist/layout-engine/types.js +35 -2
  154. package/dist/layout-painter/renderImage.js +4 -3
  155. package/dist/layout-painter/renderParagraph.js +4 -3
  156. package/dist/managers/autoSaveCodec.js +2 -8
  157. package/dist/markdown/images.js +1 -4
  158. package/dist/markdown/index.js +1 -1
  159. package/dist/markdown/internals.d.ts +6 -1
  160. package/dist/markdown/internals.js +14 -1
  161. package/dist/markdown/renderBlock.js +35 -21
  162. package/dist/markdown/renderParagraph.js +14 -5
  163. package/dist/markdown/renderRuns.js +4 -3
  164. package/dist/markdown/renderTable.js +4 -3
  165. package/dist/markdown/trailers.js +41 -7
  166. package/dist/markdown/types.d.ts +3 -7
  167. package/dist/prosemirror/attrs/index.js +71 -5
  168. package/dist/prosemirror/bookmarkBoundaryAttrs.d.ts +11 -1
  169. package/dist/prosemirror/bookmarkBoundaryAttrs.js +18 -3
  170. package/dist/prosemirror/commands/image.js +1 -0
  171. package/dist/prosemirror/commands/index.d.ts +3 -3
  172. package/dist/prosemirror/commands/index.js +2 -2
  173. package/dist/prosemirror/commands/paragraph.d.ts +3 -3
  174. package/dist/prosemirror/commands/paragraph.js +2 -2
  175. package/dist/prosemirror/commentIdAllocator.js +2 -7
  176. package/dist/prosemirror/conversion/fromProseDoc.js +197 -68
  177. package/dist/prosemirror/conversion/toProseDoc.d.ts +1 -14
  178. package/dist/prosemirror/conversion/toProseDoc.js +458 -335
  179. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +14 -1
  180. package/dist/prosemirror/extensions/core/ParagraphExtension.js +11 -6
  181. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +3 -3
  182. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +4 -1
  183. package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +6 -2
  184. package/dist/prosemirror/extensions/features/pastedHeadingStyles.d.ts +7 -0
  185. package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +74 -0
  186. package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +2 -3
  187. package/dist/prosemirror/extensions/marks/markUtils.d.ts +11 -3
  188. package/dist/prosemirror/extensions/marks/markUtils.js +98 -19
  189. package/dist/prosemirror/extensions/nodes/BookmarkBoundaryExtension.js +7 -3
  190. package/dist/prosemirror/extensions/nodes/ImageExtension.js +6 -1
  191. package/dist/prosemirror/extensions/nodes/ShapeExtension.js +8 -2
  192. package/dist/prosemirror/extensions/nodes/TableExtension.js +15 -1
  193. package/dist/prosemirror/extensions/nodes/TextBoxExtension.js +8 -4
  194. package/dist/prosemirror/extensions/types.d.ts +2 -2
  195. package/dist/prosemirror/index.d.ts +3 -3
  196. package/dist/prosemirror/index.js +3 -3
  197. package/dist/prosemirror/insertOperations.d.ts +9 -2
  198. package/dist/prosemirror/insertOperations.js +9 -4
  199. package/dist/prosemirror/paragraphFormattingProvenance.d.ts +162 -0
  200. package/dist/prosemirror/paragraphFormattingProvenance.js +115 -0
  201. package/dist/prosemirror/plugins/documentStyles.d.ts +9 -1
  202. package/dist/prosemirror/plugins/documentStyles.js +11 -1
  203. package/dist/prosemirror/plugins/index.d.ts +2 -2
  204. package/dist/prosemirror/plugins/index.js +2 -2
  205. package/dist/prosemirror/plugins/revisionIds.d.ts +11 -2
  206. package/dist/prosemirror/plugins/revisionIds.js +21 -6
  207. package/dist/prosemirror/runFormattingReconciliation.js +3 -2
  208. package/dist/prosemirror/runStyleFormatting.d.ts +1 -1
  209. package/dist/prosemirror/schema/nodes.d.ts +81 -1
  210. package/dist/prosemirror/styles/resolvedStyleAttrs.js +2 -0
  211. package/dist/prosemirror/styles/styleResolver.d.ts +9 -0
  212. package/dist/prosemirror/styles/styleResolver.js +12 -0
  213. package/dist/style-engine/styleEngine.d.ts +3 -0
  214. package/dist/style-engine/styleEngine.js +3 -0
  215. package/dist/style-sets/extract.js +1 -23
  216. package/dist/style-sets/stellaStyle.js +46 -39
  217. package/dist/style-sets/styleSetNormalization.d.ts +19 -0
  218. package/dist/style-sets/styleSetNormalization.js +99 -0
  219. package/dist/types/content.d.ts +2 -2
  220. package/dist/utils/base64.d.ts +36 -0
  221. package/dist/utils/base64.js +40 -0
  222. package/dist/utils/clipboard.js +2 -1
  223. package/dist/utils/createDocument.js +145 -20
  224. package/dist/utils/headingCollector.d.ts +8 -5
  225. package/dist/utils/headingCollector.js +23 -25
  226. package/dist/utils/tableOfContentsStyle.js +9 -2
  227. package/dist/utils/units.d.ts +10 -1
  228. package/dist/utils/units.js +12 -1
  229. package/dist/utils/urlSecurity.d.ts +8 -2
  230. package/dist/utils/urlSecurity.js +21 -3
  231. package/package.json +2 -2
  232. package/dist/docx/textWhitespace.d.ts +0 -4
  233. package/dist/docx/textWhitespace.js +0 -4
  234. package/dist/layout-bridge/engine/tableWidthUtils.d.ts +0 -6
  235. package/dist/layout-bridge/engine/tableWidthUtils.js +0 -25
  236. package/dist/markdown/headings.d.ts +0 -13
  237. package/dist/markdown/headings.js +0 -20
@@ -2,7 +2,7 @@ import { PAINTABLE_MARK_NAMES, applyFormatMarks, captureFormatMarks } from "./co
2
2
  import { clearFontFamily, clearFontSize, clearHighlight, clearTextColor, insertHyperlink, removeHyperlink, setFontFamily, setFontSize, setHighlight, setHyperlink, setTextColor, toggleBold, toggleItalic, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline } from "./commands/formatting.js";
3
3
  import { insertImageFromFile } from "./commands/image.js";
4
4
  import { insertPageBreak } from "./commands/pageBreak.js";
5
- import { addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyStyle, clearStyle, decreaseIndent, decreaseListLevel, generateTOC, increaseIndent, increaseListLevel, removeList, removeTabStop, setAlignment, setIndentFirstLine, setIndentLeft, setIndentRight, setLineSpacing, setLtr, setRtl, toggleBidi, toggleBulletList, toggleNumberedList } from "./commands/paragraph.js";
5
+ import { addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyStyle, clearStyle, decreaseIndent, decreaseListLevel, generateTableOfContents, increaseIndent, increaseListLevel, removeList, removeTabStop, setAlignment, setIndentFirstLine, setIndentLeft, setIndentRight, setLineSpacing, setLtr, setRtl, toggleBidi, toggleBulletList, toggleNumberedList } from "./commands/paragraph.js";
6
6
  import { addColumnLeft, addColumnRight, addRowAbove, addRowBelow, applyTableStyle, autoFitContents, deleteColumn, deleteRow, deleteTable, distributeColumns, insertTable, mergeCells, removeTableBorders, selectColumn, selectRow, selectTable, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setInsideTableBorders, setOutsideTableBorders, setRowHeight, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, splitCell, toggleHeaderRow, toggleNoWrap } from "./commands/table.js";
7
7
  import { fromProseDoc, updateDocumentContent } from "./conversion/fromProseDoc.js";
8
8
  import { createEmptyDoc, toProseDoc } from "./conversion/toProseDoc.js";
@@ -13,11 +13,11 @@ import { getHyperlinkAttrs, getSelectedText, isHyperlinkActive } from "./extensi
13
13
  import { clearFormatting, getMarkAttr, isMarkActive } from "./extensions/marks/markUtils.js";
14
14
  import { getTableContext, isInTable as isInTableCell } from "./extensions/nodes/TableExtension.js";
15
15
  import { insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "./insertOperations.js";
16
- import { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver } from "./plugins/documentStyles.js";
16
+ import { createDocumentStylesPlugin, documentStylesKey, getDocumentBuiltInStyles, getDocumentStyleResolver } from "./plugins/documentStyles.js";
17
17
  import { createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from "./plugins/selectionTracker.js";
18
18
  import { schema, singletonManager } from "./schema/index.js";
19
19
  import { extractSelectionState } from "./selectionState.js";
20
20
  import { StyleResolver, createStyleResolver } from "./styles/styleResolver.js";
21
21
  import { assertValidProseMirrorDocument, formatProseMirrorDocumentIssues, validateProseMirrorDocument } from "./validation.js";
22
22
  import { TextSelection } from "prosemirror-state";
23
- export { PAINTABLE_MARK_NAMES, StyleResolver, TextSelection, addColumnLeft, addColumnRight, addRowAbove, addRowBelow, addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyFormatMarks, applyStyle, applyTableStyle, assertValidProseMirrorDocument, autoFitContents, captureFormatMarks, clearFontFamily, clearFontSize, clearFormatting, clearHighlight, clearStyle, clearTextColor, createDocumentStylesPlugin, createEmptyDoc, createSelectionTrackerPlugin, createStyleResolver, decreaseIndent, decreaseListLevel, deleteColumn, deleteRow, deleteTable, distributeColumns, documentStylesKey, ensureParaIdsInState, extractSelectionContext, extractSelectionState, formatProseMirrorDocumentIssues, fromProseDoc, generateTOC, getDocumentStyleResolver, getHyperlinkAttrs, getListInfo, getMarkAttr, getParagraphAlignment, getParagraphBidi, getSelectedText, getSelectionContext, getStyleId, getTableContext, increaseIndent, increaseListLevel, insertHyperlink, insertImageFromFile, insertPageBreak, insertPageBreakInView, insertTable, insertTableInView, insertTableOfContentsInView, isHyperlinkActive, isInList, isInTableCell as isInTable, isMarkActive, mergeCells, removeHyperlink, removeList, removeTabStop, removeTableBorders, schema, selectColumn, selectRow, selectTable, selectionTrackerKey, setAlignment, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setFontFamily, setFontSize, setHighlight, setHyperlink, setIndentFirstLine, setIndentLeft, setIndentRight, setInsideTableBorders, setLineSpacing, setLtr, setOutsideTableBorders, setRowHeight, setRtl, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, setTextColor, singletonManager, splitCell, toProseDoc, toggleBidi, toggleBold, toggleBulletList, toggleHeaderRow, toggleItalic, toggleNoWrap, toggleNumberedList, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline, updateDocumentContent, validateProseMirrorDocument };
23
+ export { PAINTABLE_MARK_NAMES, StyleResolver, TextSelection, addColumnLeft, addColumnRight, addRowAbove, addRowBelow, addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyFormatMarks, applyStyle, applyTableStyle, assertValidProseMirrorDocument, autoFitContents, captureFormatMarks, clearFontFamily, clearFontSize, clearFormatting, clearHighlight, clearStyle, clearTextColor, createDocumentStylesPlugin, createEmptyDoc, createSelectionTrackerPlugin, createStyleResolver, decreaseIndent, decreaseListLevel, deleteColumn, deleteRow, deleteTable, distributeColumns, documentStylesKey, ensureParaIdsInState, extractSelectionContext, extractSelectionState, formatProseMirrorDocumentIssues, fromProseDoc, generateTableOfContents, getDocumentBuiltInStyles, getDocumentStyleResolver, getHyperlinkAttrs, getListInfo, getMarkAttr, getParagraphAlignment, getParagraphBidi, getSelectedText, getSelectionContext, getStyleId, getTableContext, increaseIndent, increaseListLevel, insertHyperlink, insertImageFromFile, insertPageBreak, insertPageBreakInView, insertTable, insertTableInView, insertTableOfContentsInView, isHyperlinkActive, isInList, isInTableCell as isInTable, isMarkActive, mergeCells, removeHyperlink, removeList, removeTabStop, removeTableBorders, schema, selectColumn, selectRow, selectTable, selectionTrackerKey, setAlignment, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setFontFamily, setFontSize, setHighlight, setHyperlink, setIndentFirstLine, setIndentLeft, setIndentRight, setInsideTableBorders, setLineSpacing, setLtr, setOutsideTableBorders, setRowHeight, setRtl, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, setTextColor, singletonManager, splitCell, toProseDoc, toggleBidi, toggleBold, toggleBulletList, toggleHeaderRow, toggleItalic, toggleNoWrap, toggleNumberedList, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline, updateDocumentContent, validateProseMirrorDocument };
@@ -1,11 +1,18 @@
1
+ import { GenerateTableOfContentsOptions } from "./extensions/core/ParagraphExtension.js";
1
2
  import { insertImageFromFile } from "./commands/image.js";
3
+ import "./commands/index.js";
2
4
  import { EditorView } from "prosemirror-view";
3
5
  //#region src/prosemirror/insertOperations.d.ts
4
6
  /** Insert a `rows × columns` table at the current selection. */
5
7
  declare function insertTableInView(view: EditorView, rows: number, columns: number): boolean;
6
8
  /** Insert a page break at the current selection. */
7
9
  declare function insertPageBreakInView(view: EditorView): boolean;
8
- /** Generate (or refresh) a table of contents from the document's headings. */
9
- declare function insertTableOfContentsInView(view: EditorView): boolean;
10
+ /**
11
+ * Generate (or refresh) a table of contents from the document's headings.
12
+ *
13
+ * `title` is the caller's because this layer has no locale — see
14
+ * {@link GenerateTableOfContentsOptions}.
15
+ */
16
+ declare function insertTableOfContentsInView(view: EditorView, options: GenerateTableOfContentsOptions): boolean;
10
17
  //#endregion
11
18
  export { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView };
@@ -1,6 +1,6 @@
1
1
  import { insertImageFromFile } from "./commands/image.js";
2
2
  import { insertPageBreak } from "./commands/pageBreak.js";
3
- import { generateTOC } from "./commands/paragraph.js";
3
+ import { generateTableOfContents } from "./commands/paragraph.js";
4
4
  import { insertTable } from "./commands/table.js";
5
5
  //#region src/prosemirror/insertOperations.ts
6
6
  /** Insert a `rows × columns` table at the current selection. */
@@ -11,9 +11,14 @@ function insertTableInView(view, rows, columns) {
11
11
  function insertPageBreakInView(view) {
12
12
  return insertPageBreak(view.state, view.dispatch);
13
13
  }
14
- /** Generate (or refresh) a table of contents from the document's headings. */
15
- function insertTableOfContentsInView(view) {
16
- return generateTOC(view.state, view.dispatch);
14
+ /**
15
+ * Generate (or refresh) a table of contents from the document's headings.
16
+ *
17
+ * `title` is the caller's because this layer has no locale — see
18
+ * {@link GenerateTableOfContentsOptions}.
19
+ */
20
+ function insertTableOfContentsInView(view, options) {
21
+ return generateTableOfContents(options)(view.state, view.dispatch);
17
22
  }
18
23
  //#endregion
19
24
  export { insertImageFromFile, insertPageBreakInView, insertTableInView, insertTableOfContentsInView };
@@ -0,0 +1,162 @@
1
+ import { document_d_exports } from "../types/document.js";
2
+ import { ParagraphAttrs } from "./schema/nodes.js";
3
+ //#region src/prosemirror/paragraphFormattingProvenance.d.ts
4
+ /**
5
+ * How each `w:pPr` field reaches the saved model from paragraph attrs.
6
+ *
7
+ * - `style-resolved-attr`: the named attr holds the effective value, so the
8
+ * write-back filters it against `ParagraphAttrs._resolvedFormatting`.
9
+ * - `direct-provenance`: the field has its own provenance channel and reader
10
+ * (`alignmentFromStyle`, `spacingFromDocDefaults`, `numPrFromStyle`, …).
11
+ * - `derived`: not authored; recomputed from another field on load and save.
12
+ * - `original-only`: no editor attr writes it back; it survives through
13
+ * `ParagraphAttrs._originalFormatting`.
14
+ */
15
+ type ParagraphFieldWriteBack = {
16
+ kind: "style-resolved-attr";
17
+ attr: keyof ParagraphAttrs;
18
+ } | {
19
+ kind: "direct-provenance";
20
+ } | {
21
+ kind: "derived";
22
+ } | {
23
+ kind: "original-only";
24
+ };
25
+ /**
26
+ * Total over `ParagraphFormatting`, so a new `w:pPr` field cannot land without
27
+ * a decision about how a save tells its authored value from its inherited one.
28
+ */
29
+ declare const PARAGRAPH_FORMATTING_WRITE_BACK: {
30
+ readonly alignment: {
31
+ readonly kind: "direct-provenance";
32
+ };
33
+ readonly bidi: {
34
+ readonly kind: "style-resolved-attr";
35
+ readonly attr: "direction";
36
+ };
37
+ readonly kinsoku: {
38
+ readonly kind: "style-resolved-attr";
39
+ readonly attr: "kinsoku";
40
+ };
41
+ readonly overflowPunctuation: {
42
+ readonly kind: "style-resolved-attr";
43
+ readonly attr: "overflowPunctuation";
44
+ };
45
+ readonly spaceBefore: {
46
+ readonly kind: "direct-provenance";
47
+ };
48
+ readonly spaceAfter: {
49
+ readonly kind: "direct-provenance";
50
+ };
51
+ readonly lineSpacing: {
52
+ readonly kind: "direct-provenance";
53
+ };
54
+ readonly lineSpacingRule: {
55
+ readonly kind: "direct-provenance";
56
+ };
57
+ readonly snapToGrid: {
58
+ readonly kind: "style-resolved-attr";
59
+ readonly attr: "snapToGrid";
60
+ };
61
+ readonly beforeAutospacing: {
62
+ readonly kind: "direct-provenance";
63
+ };
64
+ readonly afterAutospacing: {
65
+ readonly kind: "direct-provenance";
66
+ };
67
+ readonly spacingExplicit: {
68
+ readonly kind: "derived";
69
+ };
70
+ readonly indentLeft: {
71
+ readonly kind: "style-resolved-attr";
72
+ readonly attr: "indentLeft";
73
+ };
74
+ readonly indentRight: {
75
+ readonly kind: "style-resolved-attr";
76
+ readonly attr: "indentRight";
77
+ };
78
+ readonly indentFirstLine: {
79
+ readonly kind: "style-resolved-attr";
80
+ readonly attr: "indentFirstLine";
81
+ };
82
+ readonly hangingIndent: {
83
+ readonly kind: "direct-provenance";
84
+ };
85
+ readonly borders: {
86
+ readonly kind: "style-resolved-attr";
87
+ readonly attr: "borders";
88
+ };
89
+ readonly shading: {
90
+ readonly kind: "style-resolved-attr";
91
+ readonly attr: "shading";
92
+ };
93
+ readonly tabs: {
94
+ readonly kind: "style-resolved-attr";
95
+ readonly attr: "tabs";
96
+ };
97
+ readonly keepNext: {
98
+ readonly kind: "style-resolved-attr";
99
+ readonly attr: "keepNext";
100
+ };
101
+ readonly keepLines: {
102
+ readonly kind: "style-resolved-attr";
103
+ readonly attr: "keepLines";
104
+ };
105
+ readonly widowControl: {
106
+ readonly kind: "style-resolved-attr";
107
+ readonly attr: "widowControl";
108
+ };
109
+ readonly pageBreakBefore: {
110
+ readonly kind: "style-resolved-attr";
111
+ readonly attr: "pageBreakBefore";
112
+ };
113
+ readonly contextualSpacing: {
114
+ readonly kind: "style-resolved-attr";
115
+ readonly attr: "contextualSpacing";
116
+ };
117
+ readonly numPr: {
118
+ readonly kind: "direct-provenance";
119
+ };
120
+ readonly numPrFromStyle: {
121
+ readonly kind: "derived";
122
+ };
123
+ readonly numberingChangeXml: {
124
+ readonly kind: "original-only";
125
+ };
126
+ readonly outlineLevel: {
127
+ readonly kind: "style-resolved-attr";
128
+ readonly attr: "outlineLevel";
129
+ };
130
+ readonly styleId: {
131
+ readonly kind: "direct-provenance";
132
+ };
133
+ readonly frame: {
134
+ readonly kind: "original-only";
135
+ };
136
+ readonly suppressLineNumbers: {
137
+ readonly kind: "original-only";
138
+ };
139
+ readonly suppressAutoHyphens: {
140
+ readonly kind: "style-resolved-attr";
141
+ readonly attr: "suppressAutoHyphens";
142
+ };
143
+ readonly runProperties: {
144
+ readonly kind: "original-only";
145
+ };
146
+ readonly runInWithNext: {
147
+ readonly kind: "style-resolved-attr";
148
+ readonly attr: "runInWithNext";
149
+ };
150
+ };
151
+ type StyleResolvedParagraphField = { [Field in keyof typeof PARAGRAPH_FORMATTING_WRITE_BACK]: (typeof PARAGRAPH_FORMATTING_WRITE_BACK)[Field] extends {
152
+ kind: "style-resolved-attr";
153
+ } ? Field : never; }[keyof typeof PARAGRAPH_FORMATTING_WRITE_BACK];
154
+ declare const STYLE_RESOLVED_PARAGRAPH_FIELDS: StyleResolvedParagraphField[];
155
+ /**
156
+ * The part of a resolved style cascade a save needs to keep out of direct
157
+ * `w:pPr`. Narrowed to the governed fields so an ordinary paragraph, whose
158
+ * cascade supplies only spacing, stores nothing at all.
159
+ */
160
+ declare const styleResolvedParagraphFormatting: (resolved: document_d_exports.ParagraphFormatting | undefined) => document_d_exports.ParagraphFormatting | undefined;
161
+ //#endregion
162
+ export { PARAGRAPH_FORMATTING_WRITE_BACK, ParagraphFieldWriteBack, STYLE_RESOLVED_PARAGRAPH_FIELDS, StyleResolvedParagraphField, styleResolvedParagraphFormatting };
@@ -0,0 +1,115 @@
1
+ //#region src/prosemirror/paragraphFormattingProvenance.ts
2
+ /**
3
+ * Total over `ParagraphFormatting`, so a new `w:pPr` field cannot land without
4
+ * a decision about how a save tells its authored value from its inherited one.
5
+ */
6
+ const PARAGRAPH_FORMATTING_WRITE_BACK = {
7
+ alignment: { kind: "direct-provenance" },
8
+ bidi: {
9
+ kind: "style-resolved-attr",
10
+ attr: "direction"
11
+ },
12
+ kinsoku: {
13
+ kind: "style-resolved-attr",
14
+ attr: "kinsoku"
15
+ },
16
+ overflowPunctuation: {
17
+ kind: "style-resolved-attr",
18
+ attr: "overflowPunctuation"
19
+ },
20
+ spaceBefore: { kind: "direct-provenance" },
21
+ spaceAfter: { kind: "direct-provenance" },
22
+ lineSpacing: { kind: "direct-provenance" },
23
+ lineSpacingRule: { kind: "direct-provenance" },
24
+ snapToGrid: {
25
+ kind: "style-resolved-attr",
26
+ attr: "snapToGrid"
27
+ },
28
+ beforeAutospacing: { kind: "direct-provenance" },
29
+ afterAutospacing: { kind: "direct-provenance" },
30
+ spacingExplicit: { kind: "derived" },
31
+ indentLeft: {
32
+ kind: "style-resolved-attr",
33
+ attr: "indentLeft"
34
+ },
35
+ indentRight: {
36
+ kind: "style-resolved-attr",
37
+ attr: "indentRight"
38
+ },
39
+ indentFirstLine: {
40
+ kind: "style-resolved-attr",
41
+ attr: "indentFirstLine"
42
+ },
43
+ hangingIndent: { kind: "direct-provenance" },
44
+ borders: {
45
+ kind: "style-resolved-attr",
46
+ attr: "borders"
47
+ },
48
+ shading: {
49
+ kind: "style-resolved-attr",
50
+ attr: "shading"
51
+ },
52
+ tabs: {
53
+ kind: "style-resolved-attr",
54
+ attr: "tabs"
55
+ },
56
+ keepNext: {
57
+ kind: "style-resolved-attr",
58
+ attr: "keepNext"
59
+ },
60
+ keepLines: {
61
+ kind: "style-resolved-attr",
62
+ attr: "keepLines"
63
+ },
64
+ widowControl: {
65
+ kind: "style-resolved-attr",
66
+ attr: "widowControl"
67
+ },
68
+ pageBreakBefore: {
69
+ kind: "style-resolved-attr",
70
+ attr: "pageBreakBefore"
71
+ },
72
+ contextualSpacing: {
73
+ kind: "style-resolved-attr",
74
+ attr: "contextualSpacing"
75
+ },
76
+ numPr: { kind: "direct-provenance" },
77
+ numPrFromStyle: { kind: "derived" },
78
+ numberingChangeXml: { kind: "original-only" },
79
+ outlineLevel: {
80
+ kind: "style-resolved-attr",
81
+ attr: "outlineLevel"
82
+ },
83
+ styleId: { kind: "direct-provenance" },
84
+ frame: { kind: "original-only" },
85
+ suppressLineNumbers: { kind: "original-only" },
86
+ suppressAutoHyphens: {
87
+ kind: "style-resolved-attr",
88
+ attr: "suppressAutoHyphens"
89
+ },
90
+ runProperties: { kind: "original-only" },
91
+ runInWithNext: {
92
+ kind: "style-resolved-attr",
93
+ attr: "runInWithNext"
94
+ }
95
+ };
96
+ const STYLE_RESOLVED_PARAGRAPH_FIELDS = Object.keys(PARAGRAPH_FORMATTING_WRITE_BACK).filter((field) => PARAGRAPH_FORMATTING_WRITE_BACK[field].kind === "style-resolved-attr");
97
+ /**
98
+ * The part of a resolved style cascade a save needs to keep out of direct
99
+ * `w:pPr`. Narrowed to the governed fields so an ordinary paragraph, whose
100
+ * cascade supplies only spacing, stores nothing at all.
101
+ */
102
+ const styleResolvedParagraphFormatting = (resolved) => {
103
+ if (!resolved) return;
104
+ const governed = {};
105
+ let found = false;
106
+ for (const field of STYLE_RESOLVED_PARAGRAPH_FIELDS) {
107
+ const value = resolved[field];
108
+ if (value === void 0) continue;
109
+ Reflect.set(governed, field, value);
110
+ found = true;
111
+ }
112
+ return found ? governed : void 0;
113
+ };
114
+ //#endregion
115
+ export { PARAGRAPH_FORMATTING_WRITE_BACK, STYLE_RESOLVED_PARAGRAPH_FIELDS, styleResolvedParagraphFormatting };
@@ -1,4 +1,5 @@
1
1
  import { document_d_exports } from "../../types/document.js";
2
+ import { BuiltInStyleIndex } from "../../docx/builtInStyles.js";
2
3
  import { StyleResolver } from "../styles/styleResolver.js";
3
4
  import { EditorState, Plugin, PluginKey } from "prosemirror-state";
4
5
  //#region src/prosemirror/plugins/documentStyles.d.ts
@@ -13,7 +14,14 @@ declare const documentStylesKey: PluginKey<StyleResolver | null>;
13
14
  declare function createDocumentStylesPlugin(styles: document_d_exports.StyleDefinitions | StyleResolver | null | undefined): Plugin;
14
15
  /** Read the document's StyleResolver, or null when the plugin isn't installed. */
15
16
  declare function getDocumentStyleResolver(state: EditorState): StyleResolver | null;
17
+ /**
18
+ * Read the document's built-in style index, for the callers that classify
19
+ * paragraphs (heading collection, markdown export, the AI snapshot). Without
20
+ * the plugin every lookup misses, which degrades classification to the
21
+ * paragraph's own outline level rather than to English style ids.
22
+ */
23
+ declare function getDocumentBuiltInStyles(state: EditorState): BuiltInStyleIndex;
16
24
  /** Reconfigure so ProseMirror replaces the keyed plugin's resolver state. */
17
25
  declare const withDocumentStyles: (state: EditorState, styles: document_d_exports.StyleDefinitions | StyleResolver | null | undefined) => EditorState;
18
26
  //#endregion
19
- export { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver, withDocumentStyles };
27
+ export { createDocumentStylesPlugin, documentStylesKey, getDocumentBuiltInStyles, getDocumentStyleResolver, withDocumentStyles };
@@ -1,3 +1,4 @@
1
+ import { EMPTY_BUILT_IN_STYLE_INDEX } from "../../docx/builtInStyles.js";
1
2
  import { StyleResolver, createStyleResolver } from "../styles/styleResolver.js";
2
3
  import { Plugin, PluginKey } from "prosemirror-state";
3
4
  //#region src/prosemirror/plugins/documentStyles.ts
@@ -42,6 +43,15 @@ function createDocumentStylesPlugin(styles) {
42
43
  function getDocumentStyleResolver(state) {
43
44
  return documentStylesKey.getState(state) ?? null;
44
45
  }
46
+ /**
47
+ * Read the document's built-in style index, for the callers that classify
48
+ * paragraphs (heading collection, markdown export, the AI snapshot). Without
49
+ * the plugin every lookup misses, which degrades classification to the
50
+ * paragraph's own outline level rather than to English style ids.
51
+ */
52
+ function getDocumentBuiltInStyles(state) {
53
+ return getDocumentStyleResolver(state)?.builtInStyles ?? EMPTY_BUILT_IN_STYLE_INDEX;
54
+ }
45
55
  /** Reconfigure so ProseMirror replaces the keyed plugin's resolver state. */
46
56
  const withDocumentStyles = (state, styles) => {
47
57
  const previous = documentStylesKey.get(state);
@@ -49,4 +59,4 @@ const withDocumentStyles = (state, styles) => {
49
59
  return state.reconfigure({ plugins: retained }).reconfigure({ plugins: [...retained, createDocumentStylesPlugin(styles)] });
50
60
  };
51
61
  //#endregion
52
- export { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver, withDocumentStyles };
62
+ export { createDocumentStylesPlugin, documentStylesKey, getDocumentBuiltInStyles, getDocumentStyleResolver, withDocumentStyles };
@@ -1,3 +1,3 @@
1
1
  import { SelectionChangeCallback, SelectionContext, createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from "./selectionTracker.js";
2
- import { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver } from "./documentStyles.js";
3
- export { type SelectionChangeCallback, type SelectionContext, createDocumentStylesPlugin, createSelectionTrackerPlugin, documentStylesKey, extractSelectionContext, getDocumentStyleResolver, getSelectionContext, selectionTrackerKey };
2
+ import { createDocumentStylesPlugin, documentStylesKey, getDocumentBuiltInStyles, getDocumentStyleResolver } from "./documentStyles.js";
3
+ export { type SelectionChangeCallback, type SelectionContext, createDocumentStylesPlugin, createSelectionTrackerPlugin, documentStylesKey, extractSelectionContext, getDocumentBuiltInStyles, getDocumentStyleResolver, getSelectionContext, selectionTrackerKey };
@@ -1,3 +1,3 @@
1
- import { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver } from "./documentStyles.js";
1
+ import { createDocumentStylesPlugin, documentStylesKey, getDocumentBuiltInStyles, getDocumentStyleResolver } from "./documentStyles.js";
2
2
  import { createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from "./selectionTracker.js";
3
- export { createDocumentStylesPlugin, createSelectionTrackerPlugin, documentStylesKey, extractSelectionContext, getDocumentStyleResolver, getSelectionContext, selectionTrackerKey };
3
+ export { createDocumentStylesPlugin, createSelectionTrackerPlugin, documentStylesKey, extractSelectionContext, getDocumentBuiltInStyles, getDocumentStyleResolver, getSelectionContext, selectionTrackerKey };
@@ -14,9 +14,18 @@ declare function mintRevisionId(): number;
14
14
  */
15
15
  declare function seedRevisionIdsAbove(maxId: number): void;
16
16
  /**
17
- * Raise the counter above every revision id already present in `doc`.
17
+ * The highest id in `doc` from any part of the annotation space.
18
+ *
19
+ * A revision, a comment and a bookmark draw their `w:id` from one space, so a
20
+ * counter seeded above its own kind alone still mints over another kind's id.
21
+ * Both allocators seed from this, and the save-time normalization avoids the
22
+ * same space, so the three agree on what is taken.
23
+ */
24
+ declare function maxAnnotationIdInDoc(doc: Node): number;
25
+ /**
26
+ * Raise the counter above every annotation id already present in `doc`.
18
27
  * Called from the suggestion-mode plugin's `state.init`.
19
28
  */
20
29
  declare function seedRevisionIdsFromDoc(doc: Node): void;
21
30
  //#endregion
22
- export { mintRevisionId, seedRevisionIdsAbove, seedRevisionIdsFromDoc };
31
+ export { maxAnnotationIdInDoc, mintRevisionId, seedRevisionIdsAbove, seedRevisionIdsFromDoc };
@@ -31,16 +31,24 @@ function seedRevisionIdsAbove(maxId) {
31
31
  /** Node attrs that carry a revision id directly (`revisionId` field). */
32
32
  const DIRECT_REVISION_ATTR_KEYS = ["trIns", "trDel"];
33
33
  /**
34
- * Raise the counter above every revision id already present in `doc`.
35
- * Called from the suggestion-mode plugin's `state.init`.
34
+ * The highest id in `doc` from any part of the annotation space.
35
+ *
36
+ * A revision, a comment and a bookmark draw their `w:id` from one space, so a
37
+ * counter seeded above its own kind alone still mints over another kind's id.
38
+ * Both allocators seed from this, and the save-time normalization avoids the
39
+ * same space, so the three agree on what is taken.
36
40
  */
37
- function seedRevisionIdsFromDoc(doc) {
41
+ function maxAnnotationIdInDoc(doc) {
38
42
  let max = 0;
39
43
  const consider = (id) => {
40
44
  if (typeof id === "number" && Number.isInteger(id) && id > max && id <= MAX_REVISION_ID) max = id;
41
45
  };
42
46
  doc.descendants((node) => {
43
- for (const mark of node.marks) consider(mark.attrs["revisionId"]);
47
+ for (const mark of node.marks) {
48
+ consider(mark.attrs["revisionId"]);
49
+ consider(mark.attrs["commentId"]);
50
+ }
51
+ if (node.type.name === "bookmarkBoundary") consider(node.attrs["id"]);
44
52
  const attrs = node.attrs;
45
53
  const pPrMark = attrs["pPrMark"];
46
54
  if (pPrMark?.info) consider(pPrMark.info.id);
@@ -51,7 +59,14 @@ function seedRevisionIdsFromDoc(doc) {
51
59
  const cellMarker = attrs["cellMarker"];
52
60
  if (cellMarker?.info) consider(cellMarker.info.revisionId);
53
61
  });
54
- seedRevisionIdsAbove(max);
62
+ return max;
63
+ }
64
+ /**
65
+ * Raise the counter above every annotation id already present in `doc`.
66
+ * Called from the suggestion-mode plugin's `state.init`.
67
+ */
68
+ function seedRevisionIdsFromDoc(doc) {
69
+ seedRevisionIdsAbove(maxAnnotationIdInDoc(doc));
55
70
  }
56
71
  //#endregion
57
- export { mintRevisionId, seedRevisionIdsAbove, seedRevisionIdsFromDoc };
72
+ export { maxAnnotationIdInDoc, mintRevisionId, seedRevisionIdsAbove, seedRevisionIdsFromDoc };
@@ -1,9 +1,10 @@
1
1
  import { mergeTextFormatting } from "../utils/textFormattingMerge.js";
2
2
  import { expectCharacterStyleMarkAttrs } from "./attrs/index.js";
3
3
  import { marksToTextFormatting } from "./conversion/fromProseDoc.js";
4
- import { textFormattingToMarks } from "./conversion/toProseDoc.js";
4
+ import { textFormattingToMarks } from "./extensions/marks/markUtils.js";
5
5
  import { RUN_FORMATTING_MARK_NAMES } from "./runFormattingMarkNames.js";
6
6
  import { getParagraphMarkSuppressionOverrides, hasDirectRunFormatting, paragraphFormattingForRun, resolveEffectiveRunStyleFormatting } from "./runStyleFormatting.js";
7
+ import { schema } from "./schema/index.js";
7
8
  import { Mark } from "prosemirror-model";
8
9
  //#region src/prosemirror/runFormattingReconciliation.ts
9
10
  /** Read authored run properties without confusing inherited visuals for direct formatting. */
@@ -36,7 +37,7 @@ const reconcileRunFormattingMarks = ({ authoredFormatting, context, node, styleR
36
37
  marks: styleResolutionMarks,
37
38
  paragraphFormatting,
38
39
  ...styleResolver !== void 0 ? { styleResolver } : {}
39
- }), authoredFormatting), {
40
+ }), authoredFormatting), schema, {
40
41
  overrideFormatting: mergeTextFormatting(getParagraphMarkSuppressionOverrides({
41
42
  directFormatting: authoredFormatting,
42
43
  paragraphMarkFormatting: context.paragraphMarkFormatting,
@@ -26,7 +26,7 @@ type ParagraphRunStyleContext = {
26
26
  paragraphMarkFormatting: document_d_exports.TextFormatting | undefined;
27
27
  paragraphMarkPrecedesStyle: boolean;
28
28
  };
29
- type RunStyleResolver = Pick<StyleEngine, "getDefaultCharacterStyle" | "getDefaultParagraphStyle" | "getDocDefaults" | "getRunStyleOwnProperties" | "getStyle" | "resolveParagraphStyle">;
29
+ type RunStyleResolver = Pick<StyleEngine, "builtInStyles" | "getDefaultCharacterStyle" | "getDefaultParagraphStyle" | "getDocDefaults" | "getRunStyleOwnProperties" | "getStyle" | "resolveParagraphStyle">;
30
30
  type ResolveParagraphBodyRunFormattingOptions = {
31
31
  styleId: string | undefined;
32
32
  styleResolver?: RunStyleResolver | null | undefined;