@stll/folio-core 0.55.0 → 0.57.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 (225) hide show
  1. package/dist/ai-edits/apply.js +214 -52
  2. package/dist/ai-edits/batch-claims.d.ts +3 -1
  3. package/dist/ai-edits/batch-claims.js +25 -1
  4. package/dist/ai-edits/headless.js +2 -2
  5. package/dist/ai-edits/table-row-column-mutations.js +17 -3
  6. package/dist/ai-edits/types.d.ts +7 -1
  7. package/dist/ai-suggestions/apply.js +20 -1
  8. package/dist/compare/compare.js +1 -0
  9. package/dist/compare/inline-atoms.js +40 -16
  10. package/dist/compare/inline-provenance.js +12 -5
  11. package/dist/compare/reproducible-package.d.ts +0 -17
  12. package/dist/compare/reproducible-package.js +12 -18
  13. package/dist/compat/eigenpal.d.ts +2 -1
  14. package/dist/compat/eigenpal.js +2 -1
  15. package/dist/controller/canonicalClipboard.d.ts +23 -0
  16. package/dist/controller/canonicalClipboard.js +482 -0
  17. package/dist/controller/canonicalClipboardResources.d.ts +21 -0
  18. package/dist/controller/canonicalClipboardResources.js +382 -0
  19. package/dist/controller/canonicalComments.d.ts +41 -0
  20. package/dist/controller/canonicalComments.js +152 -0
  21. package/dist/controller/canonicalComposition.d.ts +24 -3
  22. package/dist/controller/canonicalComposition.js +208 -48
  23. package/dist/controller/canonicalInlineProjection.d.ts +118 -0
  24. package/dist/controller/canonicalInlineProjection.js +476 -0
  25. package/dist/controller/canonicalInput.d.ts +13 -4
  26. package/dist/controller/canonicalInput.js +62 -14
  27. package/dist/controller/canonicalInputTimer.d.ts +16 -0
  28. package/dist/controller/canonicalInputTimer.js +34 -0
  29. package/dist/controller/canonicalPublicOperations.d.ts +48 -0
  30. package/dist/controller/canonicalPublicOperations.js +648 -0
  31. package/dist/controller/canonicalSelection.d.ts +18 -0
  32. package/dist/controller/canonicalSelection.js +32 -0
  33. package/dist/controller/canonicalSession.d.ts +27 -6
  34. package/dist/controller/canonicalSession.js +298 -116
  35. package/dist/controller/canonicalStoryEditor.d.ts +7 -3
  36. package/dist/controller/canonicalStoryEditor.js +27 -2
  37. package/dist/controller/canonicalStructure.js +57 -4
  38. package/dist/controller/canonicalTocSelection.d.ts +11 -0
  39. package/dist/controller/canonicalTocSelection.js +43 -0
  40. package/dist/controller/folioEditor.d.ts +2 -9
  41. package/dist/controller/folioEditor.js +18 -4
  42. package/dist/controller/headerFooterEditorManager.d.ts +2 -1
  43. package/dist/controller/headerFooterEditorManager.js +26 -11
  44. package/dist/controller/hiddenEditorApi.d.ts +24 -3
  45. package/dist/controller/hiddenEditorApi.js +8 -0
  46. package/dist/controller/hiddenEditorManager.d.ts +5 -1
  47. package/dist/controller/hiddenEditorManager.js +378 -43
  48. package/dist/controller/noteEditorManager.d.ts +2 -1
  49. package/dist/controller/noteEditorManager.js +29 -13
  50. package/dist/document-operations.d.ts +8 -1
  51. package/dist/document-operations.js +6 -4
  52. package/dist/docx/blockPlainText.d.ts +1 -1
  53. package/dist/docx/blockPlainText.js +11 -3
  54. package/dist/docx/builtInStyles.js +13 -6
  55. package/dist/docx/canonicalResourceSave.d.ts +16 -0
  56. package/dist/docx/canonicalResourceSave.js +27 -0
  57. package/dist/docx/canonicalSave.d.ts +29 -0
  58. package/dist/docx/canonicalSave.js +101 -0
  59. package/dist/docx/canonicalStoryRepack.d.ts +1 -1
  60. package/dist/docx/canonicalStoryRepack.js +38 -5
  61. package/dist/docx/containerChildren.gen.d.ts +3 -1
  62. package/dist/docx/containerChildren.gen.js +33 -1
  63. package/dist/docx/documentParser.d.ts +1 -13
  64. package/dist/docx/documentParser.js +1 -47
  65. package/dist/docx/ensureParaIds.js +10 -4
  66. package/dist/docx/fieldParser.js +14 -2
  67. package/dist/docx/footnoteParser.d.ts +1 -11
  68. package/dist/docx/footnoteParser.js +1 -16
  69. package/dist/docx/headerFooterParser.d.ts +1 -9
  70. package/dist/docx/headerFooterParser.js +1 -12
  71. package/dist/docx/headerFooterVerbatim.d.ts +26 -1
  72. package/dist/docx/headerFooterVerbatim.js +81 -3
  73. package/dist/docx/hyperlinkParser.d.ts +1 -1
  74. package/dist/docx/hyperlinkParser.js +20 -1
  75. package/dist/docx/imageParser.d.ts +13 -1
  76. package/dist/docx/imageParser.js +20 -11
  77. package/dist/docx/inlineWrapperContent.d.ts +4 -4
  78. package/dist/docx/inlineWrapperContent.js +4 -4
  79. package/dist/docx/linkedSdtPreservation.d.ts +10 -0
  80. package/dist/docx/linkedSdtPreservation.js +37 -0
  81. package/dist/docx/metadataPrivacy.js +6 -1
  82. package/dist/docx/packageParts.js +9 -3
  83. package/dist/docx/paragraphParser.js +88 -67
  84. package/dist/docx/paragraphPropertySource.d.ts +22 -1
  85. package/dist/docx/paragraphPropertySource.js +109 -2
  86. package/dist/docx/parser.js +2 -1
  87. package/dist/docx/preservedRunContent.js +2 -1
  88. package/dist/docx/relsParser.js +26 -2
  89. package/dist/docx/removeHeaderFooterParts.js +17 -6
  90. package/dist/docx/rezip.d.ts +49 -5
  91. package/dist/docx/rezip.js +754 -235
  92. package/dist/docx/saveDiagnostics.d.ts +11 -0
  93. package/dist/docx/selectiveSave.d.ts +2 -1
  94. package/dist/docx/selectiveSave.js +42 -11
  95. package/dist/docx/selectiveXmlPatch.js +7 -5
  96. package/dist/docx/serializer/commentSerializer.d.ts +4 -1
  97. package/dist/docx/serializer/commentSerializer.js +7 -3
  98. package/dist/docx/serializer/documentSerializer.d.ts +9 -2
  99. package/dist/docx/serializer/documentSerializer.js +29 -10
  100. package/dist/docx/serializer/paragraphSerializer.js +207 -94
  101. package/dist/docx/server/applyDocxXmlPatchProposal.js +14 -9
  102. package/dist/docx/server/materializeYjsDocx.js +14 -6
  103. package/dist/docx/server/migrateYjsAttrSchema.js +17 -5
  104. package/dist/docx/storyBlockReplay.d.ts +21 -1
  105. package/dist/docx/storyBlockReplay.js +113 -9
  106. package/dist/docx/storyPlainText.d.ts +20 -0
  107. package/dist/docx/storyPlainText.js +23 -0
  108. package/dist/docx/structuralXmlPatch.js +10 -22
  109. package/dist/docx/styleParser.d.ts +5 -1
  110. package/dist/docx/styleParser.js +1 -1
  111. package/dist/docx/tableParser.d.ts +1 -8
  112. package/dist/docx/tableParser.js +1 -28
  113. package/dist/docx/textBoxParser.d.ts +1 -5
  114. package/dist/docx/textBoxParser.js +1 -20
  115. package/dist/docx/unzip.js +6 -1
  116. package/dist/i18n/messages/ar.gen.js +4 -0
  117. package/dist/i18n/messages/catalogs.gen.d.ts +68 -0
  118. package/dist/i18n/messages/catalogs.gen.js +68 -0
  119. package/dist/i18n/messages/cs.gen.js +4 -0
  120. package/dist/i18n/messages/de.gen.js +4 -0
  121. package/dist/i18n/messages/en.gen.js +4 -0
  122. package/dist/i18n/messages/es.gen.js +4 -0
  123. package/dist/i18n/messages/et.gen.js +4 -0
  124. package/dist/i18n/messages/fr.gen.js +4 -0
  125. package/dist/i18n/messages/he.gen.js +4 -0
  126. package/dist/i18n/messages/hi.gen.js +4 -0
  127. package/dist/i18n/messages/hu.gen.js +4 -0
  128. package/dist/i18n/messages/lt.gen.js +4 -0
  129. package/dist/i18n/messages/lv.gen.js +4 -0
  130. package/dist/i18n/messages/messages.gen.d.ts +4 -0
  131. package/dist/i18n/messages/pl.gen.js +4 -0
  132. package/dist/i18n/messages/pt-BR.gen.js +4 -0
  133. package/dist/i18n/messages/sk.gen.js +4 -0
  134. package/dist/i18n/messages/tr.gen.js +4 -0
  135. package/dist/i18n/messages/zh-CN.gen.js +4 -0
  136. package/dist/index.d.ts +2 -1
  137. package/dist/index.js +2 -1
  138. package/dist/internal/acceptedBlockProjection.d.ts +12 -0
  139. package/dist/internal/acceptedBlockProjection.js +45 -0
  140. package/dist/internal/revisionResolutionInline.js +25 -3
  141. package/dist/managers/DocumentLoaderManager.js +2 -1
  142. package/dist/markdown/escape.d.ts +3 -1
  143. package/dist/markdown/escape.js +9 -2
  144. package/dist/markdown/renderBlock.js +5 -120
  145. package/dist/markdown/renderParagraph.js +4 -2
  146. package/dist/markdown/renderRuns.d.ts +7 -1
  147. package/dist/markdown/renderRuns.js +33 -24
  148. package/dist/panel-layout.d.ts +11 -9
  149. package/dist/panel-layout.js +13 -9
  150. package/dist/prosemirror/addTrackedDeletionMark.d.ts +18 -0
  151. package/dist/prosemirror/addTrackedDeletionMark.js +87 -0
  152. package/dist/prosemirror/attrs/index.js +5 -0
  153. package/dist/prosemirror/canonicalCommands.d.ts +28 -4
  154. package/dist/prosemirror/canonicalCommands.js +11 -4
  155. package/dist/prosemirror/canonicalSelectionRange.d.ts +9 -0
  156. package/dist/prosemirror/canonicalSelectionRange.js +15 -0
  157. package/dist/prosemirror/clipboardIntent.d.ts +7 -0
  158. package/dist/prosemirror/clipboardIntent.js +9 -0
  159. package/dist/prosemirror/commands/comments.js +60 -35
  160. package/dist/prosemirror/commands/pageBreak.js +2 -2
  161. package/dist/prosemirror/commands/pastePlainText.js +2 -1
  162. package/dist/prosemirror/commands/propertyChangeScope.js +3 -6
  163. package/dist/prosemirror/commands/resolveParagraphProperties.js +22 -13
  164. package/dist/prosemirror/commentOps.js +15 -1
  165. package/dist/prosemirror/conversion/fromProseDoc.js +22 -3
  166. package/dist/prosemirror/conversion/hyphenTextCarriers.d.ts +8 -0
  167. package/dist/prosemirror/conversion/hyphenTextCarriers.js +8 -0
  168. package/dist/prosemirror/conversion/toProseDoc.d.ts +7 -1
  169. package/dist/prosemirror/conversion/toProseDoc.js +124 -22
  170. package/dist/prosemirror/extensions/core/ParagraphExtension.js +61 -35
  171. package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +74 -25
  172. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +11 -0
  173. package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +65 -29
  174. package/dist/prosemirror/extensions/marks/markUtils.js +11 -8
  175. package/dist/prosemirror/extensions/marks/noteReferenceDeletion.js +5 -2
  176. package/dist/prosemirror/fieldRepresentation.d.ts +8 -0
  177. package/dist/prosemirror/fieldRepresentation.js +18 -0
  178. package/dist/prosemirror/hyperlinkRemoval.d.ts +13 -1
  179. package/dist/prosemirror/hyperlinkRemoval.js +28 -9
  180. package/dist/prosemirror/insertOperations.js +2 -1
  181. package/dist/prosemirror/listNumbering.js +11 -5
  182. package/dist/prosemirror/noteReferenceOccurrenceId.d.ts +5 -0
  183. package/dist/prosemirror/noteReferenceOccurrenceId.js +5 -0
  184. package/dist/prosemirror/noteReferenceOccurrences.d.ts +21 -0
  185. package/dist/prosemirror/noteReferenceOccurrences.js +185 -0
  186. package/dist/prosemirror/noteReferenceReview.js +14 -1
  187. package/dist/prosemirror/paragraphPropertyCarry.d.ts +7 -1
  188. package/dist/prosemirror/paragraphPropertyCarry.js +8 -3
  189. package/dist/prosemirror/plugins/documentStyles.d.ts +4 -1
  190. package/dist/prosemirror/plugins/documentStyles.js +17 -10
  191. package/dist/prosemirror/plugins/suggestionMode.js +48 -48
  192. package/dist/prosemirror/preservedXmlReview.d.ts +6 -0
  193. package/dist/prosemirror/preservedXmlReview.js +35 -0
  194. package/dist/prosemirror/runFormattingFromMarks.js +2 -2
  195. package/dist/prosemirror/runFormattingReconciliation.js +5 -4
  196. package/dist/prosemirror/runPropertyChangeResolution.d.ts +8 -1
  197. package/dist/prosemirror/runPropertyChangeResolution.js +24 -2
  198. package/dist/prosemirror/runStyleFormatting.d.ts +3 -1
  199. package/dist/prosemirror/runStyleFormatting.js +3 -1
  200. package/dist/prosemirror/schema/marks.d.ts +1 -0
  201. package/dist/prosemirror/schema/nodes.d.ts +2 -0
  202. package/dist/prosemirror/styles/paragraphStyleCascade.js +4 -1
  203. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +15 -15
  204. package/dist/prosemirror/styles/resolvedStyleAttrs.js +69 -28
  205. package/dist/prosemirror/textInput.d.ts +5 -1
  206. package/dist/prosemirror/textInput.js +3 -3
  207. package/dist/prosemirror/trackedRevisionPath.d.ts +5 -1
  208. package/dist/prosemirror/trackedRevisionPath.js +39 -1
  209. package/dist/prosemirror/validation.js +3 -5
  210. package/dist/prosemirror/yjsDocumentMetadata.d.ts +9 -3
  211. package/dist/prosemirror/yjsDocumentMetadata.js +37 -8
  212. package/dist/types/canonicalCapabilities.d.ts +201 -0
  213. package/dist/types/canonicalCapabilities.js +198 -0
  214. package/dist/types/canonicalComments.d.ts +51 -0
  215. package/dist/types/canonicalComments.js +0 -0
  216. package/dist/types/canonicalSave.d.ts +11 -0
  217. package/dist/types/canonicalSave.js +0 -0
  218. package/dist/types/canonicalSections.d.ts +12 -0
  219. package/dist/types/canonicalSections.js +0 -0
  220. package/dist/types/docxSerialization.d.ts +14 -0
  221. package/dist/types/docxSerialization.js +7 -0
  222. package/dist/utils/headingCollector.js +45 -4
  223. package/dist/utils/outlineDepth.d.ts +9 -0
  224. package/dist/utils/outlineDepth.js +9 -0
  225. package/package.json +4 -4
@@ -338,6 +338,10 @@ const CATALOGS = {
338
338
  "editor": {
339
339
  "editing": "Editing",
340
340
  "editingDescription": "Edit the document directly",
341
+ "outlineDepthAll": "All levels",
342
+ "outlineDepthLabel": "Show headings",
343
+ "outlineDepthThree": "Levels 1–3",
344
+ "outlineDepthTwo": "Levels 1–2",
341
345
  "outlineTitle": "Outline",
342
346
  "showDocumentOutline": "Document outline",
343
347
  "suggesting": "Track Changes",
@@ -991,6 +995,10 @@ const CATALOGS = {
991
995
  "editor": {
992
996
  "editing": "Bearbeiten",
993
997
  "editingDescription": "Dokument direkt bearbeiten",
998
+ "outlineDepthAll": "Alle Ebenen",
999
+ "outlineDepthLabel": "Überschriften anzeigen",
1000
+ "outlineDepthThree": "Ebenen 1–3",
1001
+ "outlineDepthTwo": "Ebenen 1–2",
994
1002
  "outlineTitle": "Gliederung",
995
1003
  "showDocumentOutline": "Dokumentgliederung",
996
1004
  "suggesting": "Änderungen nachverfolgen",
@@ -1644,6 +1652,10 @@ const CATALOGS = {
1644
1652
  "editor": {
1645
1653
  "editing": "Modification",
1646
1654
  "editingDescription": "Modifier directement le document",
1655
+ "outlineDepthAll": "Tous les niveaux",
1656
+ "outlineDepthLabel": "Afficher les titres",
1657
+ "outlineDepthThree": "Niveaux 1–3",
1658
+ "outlineDepthTwo": "Niveaux 1–2",
1647
1659
  "outlineTitle": "Plan",
1648
1660
  "showDocumentOutline": "Plan du document",
1649
1661
  "suggesting": "Suivi des modifications",
@@ -2297,6 +2309,10 @@ const CATALOGS = {
2297
2309
  "editor": {
2298
2310
  "editing": "Edición",
2299
2311
  "editingDescription": "Editar el documento directamente",
2312
+ "outlineDepthAll": "Todos los niveles",
2313
+ "outlineDepthLabel": "Mostrar encabezados",
2314
+ "outlineDepthThree": "Niveles 1–3",
2315
+ "outlineDepthTwo": "Niveles 1–2",
2300
2316
  "outlineTitle": "Esquema",
2301
2317
  "showDocumentOutline": "Esquema del documento",
2302
2318
  "suggesting": "Control de cambios",
@@ -2950,6 +2966,10 @@ const CATALOGS = {
2950
2966
  "editor": {
2951
2967
  "editing": "Úpravy",
2952
2968
  "editingDescription": "Upravovat dokument přímo",
2969
+ "outlineDepthAll": "Vše",
2970
+ "outlineDepthLabel": "Zobrazit nadpisy",
2971
+ "outlineDepthThree": "Úrovně 1–3",
2972
+ "outlineDepthTwo": "Úrovně 1–2",
2953
2973
  "outlineTitle": "Osnova",
2954
2974
  "showDocumentOutline": "Osnova dokumentu",
2955
2975
  "suggesting": "Sledování změn",
@@ -3603,6 +3623,10 @@ const CATALOGS = {
3603
3623
  "editor": {
3604
3624
  "editing": "تحرير",
3605
3625
  "editingDescription": "تحرير المستند مباشرةً",
3626
+ "outlineDepthAll": "كل المستويات",
3627
+ "outlineDepthLabel": "إظهار العناوين",
3628
+ "outlineDepthThree": "المستويات 1–3",
3629
+ "outlineDepthTwo": "المستويان 1–2",
3606
3630
  "outlineTitle": "المخطط",
3607
3631
  "showDocumentOutline": "مخطط المستند",
3608
3632
  "suggesting": "تعقب التغييرات",
@@ -4256,6 +4280,10 @@ const CATALOGS = {
4256
4280
  "editor": {
4257
4281
  "editing": "Redigeerimine",
4258
4282
  "editingDescription": "Redigeerige dokumenti otse",
4283
+ "outlineDepthAll": "Kõik tasemed",
4284
+ "outlineDepthLabel": "Kuva pealkirju",
4285
+ "outlineDepthThree": "Tasemed 1–3",
4286
+ "outlineDepthTwo": "Tasemed 1–2",
4259
4287
  "outlineTitle": "Liigendus",
4260
4288
  "showDocumentOutline": "Dokumendi liigendus",
4261
4289
  "suggesting": "Muutuste jälitus",
@@ -4909,6 +4937,10 @@ const CATALOGS = {
4909
4937
  "editor": {
4910
4938
  "editing": "עריכה",
4911
4939
  "editingDescription": "ערוך את המסמך ישירות",
4940
+ "outlineDepthAll": "כל הרמות",
4941
+ "outlineDepthLabel": "הצגת כותרות",
4942
+ "outlineDepthThree": "רמות 1–3",
4943
+ "outlineDepthTwo": "רמות 1–2",
4912
4944
  "outlineTitle": "ניווט",
4913
4945
  "showDocumentOutline": "חלונית הניווט במסמך",
4914
4946
  "suggesting": "מעקב אחר שינויים",
@@ -5562,6 +5594,10 @@ const CATALOGS = {
5562
5594
  "editor": {
5563
5595
  "editing": "संपादन",
5564
5596
  "editingDescription": "दस्तावेज़ को सीधे संपादित करें",
5597
+ "outlineDepthAll": "सभी स्तर",
5598
+ "outlineDepthLabel": "शीर्षक दिखाएँ",
5599
+ "outlineDepthThree": "स्तर 1–3",
5600
+ "outlineDepthTwo": "स्तर 1–2",
5565
5601
  "outlineTitle": "रूपरेखा",
5566
5602
  "showDocumentOutline": "दस्तावेज़ रूपरेखा",
5567
5603
  "suggesting": "परिवर्तन ट्रैक करें",
@@ -6215,6 +6251,10 @@ const CATALOGS = {
6215
6251
  "editor": {
6216
6252
  "editing": "Szerkesztés",
6217
6253
  "editingDescription": "A dokumentum közvetlen szerkesztése",
6254
+ "outlineDepthAll": "Minden szint",
6255
+ "outlineDepthLabel": "Címsorok megjelenítése",
6256
+ "outlineDepthThree": "1–3. szint",
6257
+ "outlineDepthTwo": "1–2. szint",
6218
6258
  "outlineTitle": "Vázlat",
6219
6259
  "showDocumentOutline": "Dokumentum vázlata",
6220
6260
  "suggesting": "Változások követése",
@@ -6868,6 +6908,10 @@ const CATALOGS = {
6868
6908
  "editor": {
6869
6909
  "editing": "Redagavimas",
6870
6910
  "editingDescription": "Redaguokite dokumentą tiesiogiai",
6911
+ "outlineDepthAll": "Visi lygiai",
6912
+ "outlineDepthLabel": "Rodyti antraštes",
6913
+ "outlineDepthThree": "1–3 lygiai",
6914
+ "outlineDepthTwo": "1–2 lygiai",
6871
6915
  "outlineTitle": "Struktūra",
6872
6916
  "showDocumentOutline": "Dokumento struktūra",
6873
6917
  "suggesting": "Keitimų sekimas",
@@ -7521,6 +7565,10 @@ const CATALOGS = {
7521
7565
  "editor": {
7522
7566
  "editing": "Rediģēšana",
7523
7567
  "editingDescription": "Rediģējiet dokumentu tieši",
7568
+ "outlineDepthAll": "Visi līmeņi",
7569
+ "outlineDepthLabel": "Rādīt virsrakstus",
7570
+ "outlineDepthThree": "1.–3. līmenis",
7571
+ "outlineDepthTwo": "1.–2. līmenis",
7524
7572
  "outlineTitle": "Struktūra",
7525
7573
  "showDocumentOutline": "Dokumenta struktūra",
7526
7574
  "suggesting": "Izmaiņu reģistrēšana",
@@ -8174,6 +8222,10 @@ const CATALOGS = {
8174
8222
  "editor": {
8175
8223
  "editing": "Edytowanie",
8176
8224
  "editingDescription": "Edytuj dokument bezpośrednio",
8225
+ "outlineDepthAll": "Wszystkie poziomy",
8226
+ "outlineDepthLabel": "Pokaż nagłówki",
8227
+ "outlineDepthThree": "Poziomy 1–3",
8228
+ "outlineDepthTwo": "Poziomy 1–2",
8177
8229
  "outlineTitle": "Konspekt",
8178
8230
  "showDocumentOutline": "Konspekt dokumentu",
8179
8231
  "suggesting": "Śledzenie zmian",
@@ -8827,6 +8879,10 @@ const CATALOGS = {
8827
8879
  "editor": {
8828
8880
  "editing": "Editando",
8829
8881
  "editingDescription": "Edite o documento diretamente",
8882
+ "outlineDepthAll": "Todos os níveis",
8883
+ "outlineDepthLabel": "Mostrar títulos",
8884
+ "outlineDepthThree": "Níveis 1–3",
8885
+ "outlineDepthTwo": "Níveis 1–2",
8830
8886
  "outlineTitle": "Estrutura de tópicos",
8831
8887
  "showDocumentOutline": "Estrutura de tópicos do documento",
8832
8888
  "suggesting": "Controle de Alterações",
@@ -9480,6 +9536,10 @@ const CATALOGS = {
9480
9536
  "editor": {
9481
9537
  "editing": "Úpravy",
9482
9538
  "editingDescription": "Upravujte dokument priamo",
9539
+ "outlineDepthAll": "Všetky úrovne",
9540
+ "outlineDepthLabel": "Zobraziť nadpisy",
9541
+ "outlineDepthThree": "Úrovne 1–3",
9542
+ "outlineDepthTwo": "Úrovne 1–2",
9483
9543
  "outlineTitle": "Prehľad",
9484
9544
  "showDocumentOutline": "Prehľad dokumentu",
9485
9545
  "suggesting": "Sledovanie zmien",
@@ -10133,6 +10193,10 @@ const CATALOGS = {
10133
10193
  "editor": {
10134
10194
  "editing": "Düzenleme",
10135
10195
  "editingDescription": "Belgeyi doğrudan düzenleyin",
10196
+ "outlineDepthAll": "Tüm düzeyler",
10197
+ "outlineDepthLabel": "Başlıkları göster",
10198
+ "outlineDepthThree": "1–3. düzeyler",
10199
+ "outlineDepthTwo": "1–2. düzeyler",
10136
10200
  "outlineTitle": "Ana hat",
10137
10201
  "showDocumentOutline": "Belge ana hattı",
10138
10202
  "suggesting": "Değişiklik izleme",
@@ -10786,6 +10850,10 @@ const CATALOGS = {
10786
10850
  "editor": {
10787
10851
  "editing": "编辑",
10788
10852
  "editingDescription": "直接编辑文档",
10853
+ "outlineDepthAll": "所有级别",
10854
+ "outlineDepthLabel": "显示标题",
10855
+ "outlineDepthThree": "第 1–3 级",
10856
+ "outlineDepthTwo": "第 1–2 级",
10789
10857
  "outlineTitle": "大纲",
10790
10858
  "showDocumentOutline": "文档大纲",
10791
10859
  "suggesting": "修订",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Úpravy",
339
339
  "editingDescription": "Upravovat dokument přímo",
340
+ "outlineDepthAll": "Vše",
341
+ "outlineDepthLabel": "Zobrazit nadpisy",
342
+ "outlineDepthThree": "Úrovně 1–3",
343
+ "outlineDepthTwo": "Úrovně 1–2",
340
344
  "outlineTitle": "Osnova",
341
345
  "showDocumentOutline": "Osnova dokumentu",
342
346
  "suggesting": "Sledování změn",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Bearbeiten",
339
339
  "editingDescription": "Dokument direkt bearbeiten",
340
+ "outlineDepthAll": "Alle Ebenen",
341
+ "outlineDepthLabel": "Überschriften anzeigen",
342
+ "outlineDepthThree": "Ebenen 1–3",
343
+ "outlineDepthTwo": "Ebenen 1–2",
340
344
  "outlineTitle": "Gliederung",
341
345
  "showDocumentOutline": "Dokumentgliederung",
342
346
  "suggesting": "Änderungen nachverfolgen",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Editing",
339
339
  "editingDescription": "Edit the document directly",
340
+ "outlineDepthAll": "All levels",
341
+ "outlineDepthLabel": "Show headings",
342
+ "outlineDepthThree": "Levels 1–3",
343
+ "outlineDepthTwo": "Levels 1–2",
340
344
  "outlineTitle": "Outline",
341
345
  "showDocumentOutline": "Document outline",
342
346
  "suggesting": "Track Changes",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Edición",
339
339
  "editingDescription": "Editar el documento directamente",
340
+ "outlineDepthAll": "Todos los niveles",
341
+ "outlineDepthLabel": "Mostrar encabezados",
342
+ "outlineDepthThree": "Niveles 1–3",
343
+ "outlineDepthTwo": "Niveles 1–2",
340
344
  "outlineTitle": "Esquema",
341
345
  "showDocumentOutline": "Esquema del documento",
342
346
  "suggesting": "Control de cambios",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Redigeerimine",
339
339
  "editingDescription": "Redigeerige dokumenti otse",
340
+ "outlineDepthAll": "Kõik tasemed",
341
+ "outlineDepthLabel": "Kuva pealkirju",
342
+ "outlineDepthThree": "Tasemed 1–3",
343
+ "outlineDepthTwo": "Tasemed 1–2",
340
344
  "outlineTitle": "Liigendus",
341
345
  "showDocumentOutline": "Dokumendi liigendus",
342
346
  "suggesting": "Muutuste jälitus",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Modification",
339
339
  "editingDescription": "Modifier directement le document",
340
+ "outlineDepthAll": "Tous les niveaux",
341
+ "outlineDepthLabel": "Afficher les titres",
342
+ "outlineDepthThree": "Niveaux 1–3",
343
+ "outlineDepthTwo": "Niveaux 1–2",
340
344
  "outlineTitle": "Plan",
341
345
  "showDocumentOutline": "Plan du document",
342
346
  "suggesting": "Suivi des modifications",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "עריכה",
339
339
  "editingDescription": "ערוך את המסמך ישירות",
340
+ "outlineDepthAll": "כל הרמות",
341
+ "outlineDepthLabel": "הצגת כותרות",
342
+ "outlineDepthThree": "רמות 1–3",
343
+ "outlineDepthTwo": "רמות 1–2",
340
344
  "outlineTitle": "ניווט",
341
345
  "showDocumentOutline": "חלונית הניווט במסמך",
342
346
  "suggesting": "מעקב אחר שינויים",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "संपादन",
339
339
  "editingDescription": "दस्तावेज़ को सीधे संपादित करें",
340
+ "outlineDepthAll": "सभी स्तर",
341
+ "outlineDepthLabel": "शीर्षक दिखाएँ",
342
+ "outlineDepthThree": "स्तर 1–3",
343
+ "outlineDepthTwo": "स्तर 1–2",
340
344
  "outlineTitle": "रूपरेखा",
341
345
  "showDocumentOutline": "दस्तावेज़ रूपरेखा",
342
346
  "suggesting": "परिवर्तन ट्रैक करें",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Szerkesztés",
339
339
  "editingDescription": "A dokumentum közvetlen szerkesztése",
340
+ "outlineDepthAll": "Minden szint",
341
+ "outlineDepthLabel": "Címsorok megjelenítése",
342
+ "outlineDepthThree": "1–3. szint",
343
+ "outlineDepthTwo": "1–2. szint",
340
344
  "outlineTitle": "Vázlat",
341
345
  "showDocumentOutline": "Dokumentum vázlata",
342
346
  "suggesting": "Változások követése",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Redagavimas",
339
339
  "editingDescription": "Redaguokite dokumentą tiesiogiai",
340
+ "outlineDepthAll": "Visi lygiai",
341
+ "outlineDepthLabel": "Rodyti antraštes",
342
+ "outlineDepthThree": "1–3 lygiai",
343
+ "outlineDepthTwo": "1–2 lygiai",
340
344
  "outlineTitle": "Struktūra",
341
345
  "showDocumentOutline": "Dokumento struktūra",
342
346
  "suggesting": "Keitimų sekimas",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Rediģēšana",
339
339
  "editingDescription": "Rediģējiet dokumentu tieši",
340
+ "outlineDepthAll": "Visi līmeņi",
341
+ "outlineDepthLabel": "Rādīt virsrakstus",
342
+ "outlineDepthThree": "1.–3. līmenis",
343
+ "outlineDepthTwo": "1.–2. līmenis",
340
344
  "outlineTitle": "Struktūra",
341
345
  "showDocumentOutline": "Dokumenta struktūra",
342
346
  "suggesting": "Izmaiņu reģistrēšana",
@@ -338,6 +338,10 @@ type Messages = {
338
338
  "editor": {
339
339
  "editing": "Editing";
340
340
  "editingDescription": "Edit the document directly";
341
+ "outlineDepthAll": "All levels";
342
+ "outlineDepthLabel": "Show headings";
343
+ "outlineDepthThree": "Levels 1–3";
344
+ "outlineDepthTwo": "Levels 1–2";
341
345
  "outlineTitle": "Outline";
342
346
  "showDocumentOutline": "Document outline";
343
347
  "suggesting": "Track Changes";
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Edytowanie",
339
339
  "editingDescription": "Edytuj dokument bezpośrednio",
340
+ "outlineDepthAll": "Wszystkie poziomy",
341
+ "outlineDepthLabel": "Pokaż nagłówki",
342
+ "outlineDepthThree": "Poziomy 1–3",
343
+ "outlineDepthTwo": "Poziomy 1–2",
340
344
  "outlineTitle": "Konspekt",
341
345
  "showDocumentOutline": "Konspekt dokumentu",
342
346
  "suggesting": "Śledzenie zmian",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Editando",
339
339
  "editingDescription": "Edite o documento diretamente",
340
+ "outlineDepthAll": "Todos os níveis",
341
+ "outlineDepthLabel": "Mostrar títulos",
342
+ "outlineDepthThree": "Níveis 1–3",
343
+ "outlineDepthTwo": "Níveis 1–2",
340
344
  "outlineTitle": "Estrutura de tópicos",
341
345
  "showDocumentOutline": "Estrutura de tópicos do documento",
342
346
  "suggesting": "Controle de Alterações",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Úpravy",
339
339
  "editingDescription": "Upravujte dokument priamo",
340
+ "outlineDepthAll": "Všetky úrovne",
341
+ "outlineDepthLabel": "Zobraziť nadpisy",
342
+ "outlineDepthThree": "Úrovne 1–3",
343
+ "outlineDepthTwo": "Úrovne 1–2",
340
344
  "outlineTitle": "Prehľad",
341
345
  "showDocumentOutline": "Prehľad dokumentu",
342
346
  "suggesting": "Sledovanie zmien",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "Düzenleme",
339
339
  "editingDescription": "Belgeyi doğrudan düzenleyin",
340
+ "outlineDepthAll": "Tüm düzeyler",
341
+ "outlineDepthLabel": "Başlıkları göster",
342
+ "outlineDepthThree": "1–3. düzeyler",
343
+ "outlineDepthTwo": "1–2. düzeyler",
340
344
  "outlineTitle": "Ana hat",
341
345
  "showDocumentOutline": "Belge ana hattı",
342
346
  "suggesting": "Değişiklik izleme",
@@ -337,6 +337,10 @@ const messages = { "folio": {
337
337
  "editor": {
338
338
  "editing": "编辑",
339
339
  "editingDescription": "直接编辑文档",
340
+ "outlineDepthAll": "所有级别",
341
+ "outlineDepthLabel": "显示标题",
342
+ "outlineDepthThree": "第 1–3 级",
343
+ "outlineDepthTwo": "第 1–2 级",
340
344
  "outlineTitle": "大纲",
341
345
  "showDocumentOutline": "文档大纲",
342
346
  "suggesting": "修订",
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import { MAX_COMPARE_OPERATIONS, compareDocx } from "./compare/compare.js";
18
18
  import { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DocumentPreset, DocumentStyleSet } from "./style-sets/types.js";
19
19
  import { CreateEmptyDocumentOptions, createEmptyDocument } from "./utils/createDocument.js";
20
20
  import { mergeDocumentContent } from "./utils/mergeDocumentContent.js";
21
+ import { DEFAULT_OUTLINE_DEPTH, OutlineDepth, filterHeadingsByDepth } from "./utils/outlineDepth.js";
21
22
  import { DocumentStyleCatalog, DocumentStyleCatalogEntry, ExtractDocumentStyleSetOptions, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, inspectDocumentStyles, inspectDocumentStylesFromDocx } from "./style-sets/extract.js";
22
23
  import { STELLA_STYLE_SET_NAME, createStellaStyleDocumentPreset, createStellaStyleSet } from "./style-sets/stellaStyle.js";
23
24
  import { DocumentPropertiesOptions, createDocx } from "./docx/rezip.js";
@@ -42,4 +43,4 @@ import { FOLIO_YJS_ATTR_SCHEMA_VERSION, FolioYjsAttrSchemaVersion, FolioYjsAttrS
42
43
  import { DOCX_CONFORMANCE_CLASSES } from "@stll/docx-core/model";
43
44
  type Document = document_d_exports.Document;
44
45
  type DocxConformanceClass = document_d_exports.DocxConformanceClass;
45
- export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type AcceptAutocompleteResult, type AnonymizationMatch, type AnonymizationTerm, type ApplyFolioDocumentOperationsOptions, type ApplyResult, type AutocompleteSuggestionPluginOptions, type AutocompleteSuggestionState, type AutocompleteSuggestionStatus, type AutocompleteTriggerCheck, type AutocompleteTriggerOptions, type AutocompleteTriggerSkipReason, type BlockRect, COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, type CompareChange, type CompareChangeLocation, type CompareCompatibility, type CompareContentOptions, CompareDocxApplyError, type CompareDocxError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, type CompareDocxOptions, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, type CompareFolioRequirement, type CompareResult, type CompareRevisionFormat, type CompareUnsupportedPart, type CompareUnsupportedReason, type CompareVerification, type CompareVerificationCause, type CompareVerificationFailure, type CompareVerificationInvariant, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocumentPreset, type DocumentPropertiesOptions, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, type DocxCompatibility, type DocxCompatibilityContext, type DocxCompatibilityIssue, type DocxCompatibilityLocation, type DocxCompatibilityPart, type DocxConformanceClass, type DocxDrawingClassification, type DrawingSafetyClass, type EmbeddedFont, type EmbeddedFontParts, type ExtractDocumentStyleSetOptions, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, type FinalParagraphMarkRevision, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIBlockStructuralBoundary, type FolioAIBlockTableLocation, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyOutcome, type FolioAIEditApplyResult, type FolioAIEditNormalization, type FolioAIEditNormalizationCode, type FolioAIEditOperation, type FolioAIEditPrecondition, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAIInlineBooleanProperty, type FolioAIInlineFormatting, type FolioAIInlineFormattingPatch, type FolioAIParagraphSpacing, type FolioAISignatureParty, type FolioBlockId, type FolioContentBlock, type FolioContentBlockProperty, type FolioContentComparison, type FolioContentComparisonError, type FolioContentComparisonEvent, type FolioContentComparisonLimit, FolioContentComparisonLimitError, type FolioContentContainerPathEntry, type FolioContentFormatRange, type FolioContentFormattingChange, type FolioContentIdStability, type FolioContentInlineBooleanProperty, type FolioContentInlineComparisonResult, type FolioContentInlineFormatting, type FolioContentInlineFormattingPatch, FolioContentInlinePresentationProjectionError, type FolioContentLineSpacingRule, type FolioContentParagraphAlignment, type FolioContentParagraphFormattingPatch, type FolioContentParagraphKind, type FolioContentParagraphSpacing, type FolioContentRun, type FolioContentSnapshot, type FolioContentStructuralChange, type FolioContentTableLocation, type FolioContentTextSegment, type FolioDocumentOperation, type FolioDocumentOperationAffectedTarget, type FolioDocumentOperationBatch, type FolioDocumentOperationCapabilities, type FolioDocumentOperationIssue, type FolioDocumentOperationMode, type FolioDocumentOperationPrecondition, type FolioDocumentOperationReceipt, type FolioDocumentOperationRecovery, type FolioDocumentOperationResult, type FolioDocumentOperationResultBase, type FolioDocumentOperationStatus, type FolioDocumentOperationStory, type FolioDocumentOperationType, type FolioDocumentOperationUndoFailureReason, type FolioDocumentOperationUndoHandle, type FolioDocumentOperationUndoResult, type FolioDocxCompatibilityHost, type FolioDocxCompatibilityProfile, type FolioRevisionStamp, type FolioWordDiffOptions, type FolioYjsAttrSchemaVersion, FolioYjsAttrSchemaVersionError, type ImageMeta, type ImageRef, type InspectDocxCompatibilityOptions, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, type MarkdownOptions, type MarkdownResult, type PositionalText, type ResolvedAnchor, STELLA_STYLE_SET_NAME, type TemplatePreviewHiddenRange, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, type WordDiffGranularity, type WordDiffNormalization, type WordDiffOptions, type WordDiffSegment, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
46
+ export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type AcceptAutocompleteResult, type AnonymizationMatch, type AnonymizationTerm, type ApplyFolioDocumentOperationsOptions, type ApplyResult, type AutocompleteSuggestionPluginOptions, type AutocompleteSuggestionState, type AutocompleteSuggestionStatus, type AutocompleteTriggerCheck, type AutocompleteTriggerOptions, type AutocompleteTriggerSkipReason, type BlockRect, COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, type CompareChange, type CompareChangeLocation, type CompareCompatibility, type CompareContentOptions, CompareDocxApplyError, type CompareDocxError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, type CompareDocxOptions, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, type CompareFolioRequirement, type CompareResult, type CompareRevisionFormat, type CompareUnsupportedPart, type CompareUnsupportedReason, type CompareVerification, type CompareVerificationCause, type CompareVerificationFailure, type CompareVerificationInvariant, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DEFAULT_OUTLINE_DEPTH, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocumentPreset, type DocumentPropertiesOptions, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, type DocxCompatibility, type DocxCompatibilityContext, type DocxCompatibilityIssue, type DocxCompatibilityLocation, type DocxCompatibilityPart, type DocxConformanceClass, type DocxDrawingClassification, type DrawingSafetyClass, type EmbeddedFont, type EmbeddedFontParts, type ExtractDocumentStyleSetOptions, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, type FinalParagraphMarkRevision, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIBlockStructuralBoundary, type FolioAIBlockTableLocation, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyOutcome, type FolioAIEditApplyResult, type FolioAIEditNormalization, type FolioAIEditNormalizationCode, type FolioAIEditOperation, type FolioAIEditPrecondition, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAIInlineBooleanProperty, type FolioAIInlineFormatting, type FolioAIInlineFormattingPatch, type FolioAIParagraphSpacing, type FolioAISignatureParty, type FolioBlockId, type FolioContentBlock, type FolioContentBlockProperty, type FolioContentComparison, type FolioContentComparisonError, type FolioContentComparisonEvent, type FolioContentComparisonLimit, FolioContentComparisonLimitError, type FolioContentContainerPathEntry, type FolioContentFormatRange, type FolioContentFormattingChange, type FolioContentIdStability, type FolioContentInlineBooleanProperty, type FolioContentInlineComparisonResult, type FolioContentInlineFormatting, type FolioContentInlineFormattingPatch, FolioContentInlinePresentationProjectionError, type FolioContentLineSpacingRule, type FolioContentParagraphAlignment, type FolioContentParagraphFormattingPatch, type FolioContentParagraphKind, type FolioContentParagraphSpacing, type FolioContentRun, type FolioContentSnapshot, type FolioContentStructuralChange, type FolioContentTableLocation, type FolioContentTextSegment, type FolioDocumentOperation, type FolioDocumentOperationAffectedTarget, type FolioDocumentOperationBatch, type FolioDocumentOperationCapabilities, type FolioDocumentOperationIssue, type FolioDocumentOperationMode, type FolioDocumentOperationPrecondition, type FolioDocumentOperationReceipt, type FolioDocumentOperationRecovery, type FolioDocumentOperationResult, type FolioDocumentOperationResultBase, type FolioDocumentOperationStatus, type FolioDocumentOperationStory, type FolioDocumentOperationType, type FolioDocumentOperationUndoFailureReason, type FolioDocumentOperationUndoHandle, type FolioDocumentOperationUndoResult, type FolioDocxCompatibilityHost, type FolioDocxCompatibilityProfile, type FolioRevisionStamp, type FolioWordDiffOptions, type FolioYjsAttrSchemaVersion, FolioYjsAttrSchemaVersionError, type ImageMeta, type ImageRef, type InspectDocxCompatibilityOptions, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, type MarkdownOptions, type MarkdownResult, type OutlineDepth, type PositionalText, type ResolvedAnchor, STELLA_STYLE_SET_NAME, type TemplatePreviewHiddenRange, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, type WordDiffGranularity, type WordDiffNormalization, type WordDiffOptions, type WordDiffSegment, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, filterHeadingsByDepth, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
package/dist/index.js CHANGED
@@ -33,5 +33,6 @@ import { currentFolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, isFolioB
33
33
  import { createEmptyDocument } from "./utils/createDocument.js";
34
34
  import { getGoogleFontsEnabled, setEmbeddedFontFamilyMap, setGoogleFontsEnabled } from "./utils/fontResolver.js";
35
35
  import { mergeDocumentContent } from "./utils/mergeDocumentContent.js";
36
+ import { DEFAULT_OUTLINE_DEPTH, filterHeadingsByDepth } from "./utils/outlineDepth.js";
36
37
  import { DOCX_CONFORMANCE_CLASSES } from "@stll/docx-core/model";
37
- export { COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, CompareDocxApplyError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, FolioContentComparisonLimitError, FolioContentInlinePresentationProjectionError, FolioYjsAttrSchemaVersionError, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, STELLA_STYLE_SET_NAME, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
38
+ export { COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, CompareDocxApplyError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DEFAULT_OUTLINE_DEPTH, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, FolioContentComparisonLimitError, FolioContentInlinePresentationProjectionError, FolioYjsAttrSchemaVersionError, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, STELLA_STYLE_SET_NAME, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, filterHeadingsByDepth, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
@@ -0,0 +1,12 @@
1
+ import { document_d_exports } from "../types/document.js";
2
+ //#region src/internal/acceptedBlockProjection.d.ts
3
+ /**
4
+ * Read a model story through the same structural resolver as Accept All and
5
+ * the editor's No Markup view. The authored model is never changed.
6
+ */
7
+ declare const projectAcceptedBlocks: (blocks: readonly document_d_exports.BlockContent[], pkg: document_d_exports.DocxPackage | undefined) => {
8
+ blocks: readonly document_d_exports.BlockContent[];
9
+ completeness: string;
10
+ } | null;
11
+ //#endregion
12
+ export { projectAcceptedBlocks };
@@ -0,0 +1,45 @@
1
+ import { getCachedNumberingMap } from "../docx/numberingParser.js";
2
+ import { proseDocToBlocks } from "../prosemirror/conversion/fromProseDoc.js";
3
+ import { headerFooterToProseDoc } from "../prosemirror/conversion/toProseDoc.js";
4
+ import { createStyleEngine } from "../style-engine/styleEngine.js";
5
+ import { resolveWholeStory } from "./wholeStoryRevisionResolution.js";
6
+ import { panic } from "better-result";
7
+ //#region src/internal/acceptedBlockProjection.ts
8
+ /** Inline revisions alone are already handled by the Markdown run renderer. */
9
+ const hasBlockRevision = (blocks) => blocks.some((block) => {
10
+ switch (block.type) {
11
+ case "paragraph": return block.pPrMark !== void 0;
12
+ case "table": return block.rows.some((row) => row.structuralChange !== void 0 || row.cells.some((cell) => cell.structuralChange !== void 0 || hasBlockRevision(cell.content)));
13
+ case "blockSdt":
14
+ case "blockCustomXml": return hasBlockRevision(block.content);
15
+ case "preservedBlock":
16
+ case "bookmarkStart":
17
+ case "bookmarkEnd": return false;
18
+ default: return panic("Unsupported block in accepted projection", { unsupported: block });
19
+ }
20
+ });
21
+ /**
22
+ * Read a model story through the same structural resolver as Accept All and
23
+ * the editor's No Markup view. The authored model is never changed.
24
+ */
25
+ const projectAcceptedBlocks = (blocks, pkg) => {
26
+ if (!hasBlockRevision(blocks)) return null;
27
+ const options = {
28
+ ...pkg?.styles !== void 0 && { styles: pkg.styles },
29
+ ...pkg?.theme !== void 0 && { theme: pkg.theme },
30
+ ...pkg?.numbering !== void 0 && { numbering: pkg.numbering }
31
+ };
32
+ const doc = headerFooterToProseDoc([...blocks], options);
33
+ const result = resolveWholeStory({
34
+ doc,
35
+ mode: "accept",
36
+ styleResolver: createStyleEngine(pkg?.styles),
37
+ numbering: pkg?.numbering ? getCachedNumberingMap(pkg.numbering) : null
38
+ });
39
+ return {
40
+ blocks: result.resolved.eq(doc) ? blocks : proseDocToBlocks(result.resolved, [...blocks], pkg?.styles),
41
+ completeness: result.failed ? "partial" : "complete"
42
+ };
43
+ };
44
+ //#endregion
45
+ export { projectAcceptedBlocks };
@@ -3,9 +3,11 @@ import { expectFieldAttrs, expectRunPropertyChangeMarkAttrs, expectTrackedChange
3
3
  import { resolutionRemovesControl, withoutResolvedEnclosures } from "../prosemirror/contentControlRevisions.js";
4
4
  import { resolveEmptyFieldResultRuns } from "../prosemirror/emptyFieldResultRuns.js";
5
5
  import "../prosemirror/extensions/nodes/SdtExtension.js";
6
+ import { canonicalFieldNode } from "../prosemirror/fieldRepresentation.js";
7
+ import { resolvedPreservedXmlAttrs } from "../prosemirror/preservedXmlReview.js";
6
8
  import { continuedRunMarks } from "../prosemirror/rejoinRunCarriers.js";
7
9
  import { RUN_FORMATTING_MARK_NAMES } from "../prosemirror/runFormattingMarkNames.js";
8
- import { reconstructRejectedRunFormattingMarks } from "../prosemirror/runPropertyChangeResolution.js";
10
+ import { reconstructRejectedRunFormattingMarks, restoreHistoricalRunFormatting } from "../prosemirror/runPropertyChangeResolution.js";
9
11
  import { paragraphRunStyleContext } from "../prosemirror/runStyleFormatting.js";
10
12
  import { recordNodeResolution } from "./revisionResolutionEdits.js";
11
13
  import { panic } from "better-result";
@@ -35,6 +37,11 @@ const rebuildNode = (source, attrs, content, marks = source.marks) => recreatePr
35
37
  const resolveInlineNode = ({ node, context, paragraphScope }) => {
36
38
  let marks = node.marks;
37
39
  let attrs = node.attrs;
40
+ if (context.mode === "reject" && node.marks.some((mark) => mark.type === context.keepType && expectTrackedChangeMarkAttrs(mark)._historicalFormatting)) marks = restoreHistoricalRunFormatting({
41
+ node,
42
+ paragraphContext: resolveParagraphRunStyleScope(paragraphScope, context.styleResolver),
43
+ styleResolver: context.styleResolver
44
+ });
38
45
  const runPropertyChangeMark = marks.find((mark) => mark.type.name === "runPropertyChange");
39
46
  if (runPropertyChangeMark) {
40
47
  const { changes } = expectRunPropertyChangeMarkAttrs(runPropertyChangeMark);
@@ -64,6 +71,7 @@ const resolveInlineNode = ({ node, context, paragraphScope }) => {
64
71
  }
65
72
  if (node.marks.some((mark) => (mark.type.name === "insertion" || mark.type.name === "deletion") && expectTrackedChangeMarkAttrs(mark)._docxRevisionAncestors?.some((layer) => context.mode === "accept" ? layer.type === "deletion" || layer.type === "moveFrom" : layer.type === "insertion" || layer.type === "moveTo")) || context.removeType && node.marks.some((mark) => mark.type === context.removeType)) return null;
66
73
  if (context.keepType) marks = marks.filter((mark) => mark.type !== context.keepType);
74
+ if (attrs === node.attrs) attrs = resolvedPreservedXmlAttrs(node, marks);
67
75
  if (attrs !== node.attrs) return rebuildNode(node, attrs, node.content, marks);
68
76
  return marksEqual(marks, node.marks) ? node : node.mark(marks);
69
77
  };
@@ -172,7 +180,7 @@ const resolveInlineContent = ({ node, position, context, inheritedParagraphScope
172
180
  context
173
181
  });
174
182
  let resolvedContent = Fragment.fromArray(children);
175
- if (!resolvedNode.type.validContent(resolvedContent)) {
183
+ if (!resolvedNode.type.validContent(resolvedContent) && !(resolvedNode.type.name === "structuredField" && resolvedContent.size === 0)) {
176
184
  const fitted = resolvedNode.type.createAndFill(resolvedNode.attrs, resolvedContent, resolvedNode.marks);
177
185
  if (!fitted || !resolvedNode.type.validContent(fitted.content)) {
178
186
  if (!resolvedNode.isInline) return panic(`Revision inline resolution invalidated ${resolvedNode.type.name} content`);
@@ -195,7 +203,21 @@ const resolveInlineContent = ({ node, position, context, inheritedParagraphScope
195
203
  from: position,
196
204
  to: position + resolvedNode.nodeSize
197
205
  });
198
- return rebuildNode(node, resolvedAttrs, resolvedContent, resolvedNode.marks);
206
+ const rebuilt = rebuildNode(node, resolvedAttrs, resolvedContent, resolvedNode.marks);
207
+ const canonical = canonicalFieldNode(rebuilt);
208
+ if (canonical !== rebuilt && canonical.type === rebuilt.type) recordNodeResolution({
209
+ before: rebuilt,
210
+ after: canonical,
211
+ position,
212
+ steps: context.steps
213
+ });
214
+ else if (canonical !== rebuilt) context.replacementRanges.splice(replacementRangeStart, context.replacementRanges.length - replacementRangeStart, {
215
+ from: position,
216
+ to: position + node.nodeSize,
217
+ newSize: canonical.nodeSize,
218
+ slice: new Slice(Fragment.from(canonical), 0, 0)
219
+ });
220
+ return canonical;
199
221
  };
200
222
  const coalesceReplacementRanges = (replacementRanges) => {
201
223
  const coalesced = [];
@@ -2,6 +2,7 @@ import { prepareCanonicalDocxInput } from "../docx/canonicalSessionInput.js";
2
2
  import { inspectDocxCompatibility } from "../docx/compatibility.js";
3
3
  import { parseDocx } from "../docx/parser.js";
4
4
  import { recordDocumentLoadPhase } from "../layout-engine/layoutInstrumentation.js";
5
+ import { CANONICAL_GAP, usesCanonicalSession } from "../types/canonicalCapabilities.js";
5
6
  import { resetAuthorColors } from "../utils/authorColors.js";
6
7
  import { loadFontsWithMapping } from "../utils/fontLoader.js";
7
8
  //#region src/managers/DocumentLoaderManager.ts
@@ -62,7 +63,7 @@ var DocumentLoaderManager = class {
62
63
  let doc;
63
64
  try {
64
65
  let input = buffer;
65
- if (this.callbacks.getExperimentalSession?.() === "canonical") {
66
+ if (usesCanonicalSession(this.callbacks.getExperimentalSession?.(), CANONICAL_GAP.authorityRouting)) {
66
67
  const prepared = await prepareCanonicalDocxInput(buffer);
67
68
  if (prepared.isErr()) throw prepared.error;
68
69
  input = prepared.value;
@@ -25,6 +25,8 @@ declare function escapeInline(text: string): string;
25
25
  * line.
26
26
  */
27
27
  declare function escapeTableCell(text: string): string;
28
+ /** Single-line Markdown blocks express inline breaks without their two-space syntax. */
29
+ declare const inlineBreaksToHtml: (text: string) => string;
28
30
  declare function escapeLinkUrl(url: string): string;
29
31
  /**
30
32
  * Alt text inside `![alt](url)`. Raw (un-escaped) text, so escape the backslash
@@ -33,4 +35,4 @@ declare function escapeLinkUrl(url: string): string;
33
35
  */
34
36
  declare function escapeAltText(text: string): string;
35
37
  //#endregion
36
- export { escapeAltText, escapeInline, escapeLinkUrl, escapeTableCell };
38
+ export { escapeAltText, escapeInline, escapeLinkUrl, escapeTableCell, inlineBreaksToHtml };