@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
@@ -31,7 +31,7 @@ const modelMatchesElement = ({ value, element, mode }) => {
31
31
  };
32
32
  const XML_TOKEN = /<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<\?[\s\S]*?\?>|<(?:"[^"]*"|'[^']*'|[^'">])*>/gu;
33
33
  const XML_ATTRIBUTE = /([^\s=<>/]+)(\s*=\s*)(["'])(.*?)\3/gsu;
34
- const readStory = (xml, scope) => {
34
+ const readStory = (xml, scope, ignoredChild) => {
35
35
  const parsed = parseStreamingXmlWithSourceRanges(xml, scope);
36
36
  if (parsed.status !== "parsed") return null;
37
37
  const roots = getChildElements(parsed.value);
@@ -41,6 +41,7 @@ const readStory = (xml, scope) => {
41
41
  const children = getChildElements(root);
42
42
  const blocks = [];
43
43
  for (const element of children) {
44
+ if (getLocalName(element.name) === ignoredChild && WORDPROCESSINGML_NAMESPACE_URIS.has(getNamespaceUri(element) ?? "")) continue;
44
45
  const range = getXmlSourceRange(element);
45
46
  if (!range) return null;
46
47
  blocks.push({
@@ -64,7 +65,8 @@ const effectiveBindings = (element) => {
64
65
  }
65
66
  return bindings;
66
67
  };
67
- const generatedFragment = ({ xml, element, sourceNamespace, generatedRoot }) => {
68
+ /** Bind a replay fragment once, retaining existing local declarations and compatibility tokens. */
69
+ const materializeReplayFragment = ({ xml, element, sourceNamespace, generatedRoot }) => {
68
70
  const strict = TRANSITIONAL_NAMESPACE_BY_STRICT_URI.has(sourceNamespace);
69
71
  const first = [...xml.matchAll(XML_TOKEN)].at(0);
70
72
  if (!first || first.index !== 0 || first[0].startsWith("<!") || first[0].startsWith("<?")) return null;
@@ -121,9 +123,9 @@ const takeCandidate = (queue, used) => {
121
123
  }
122
124
  };
123
125
  /** Replace only mapped block ranges, retaining authored root syntax and every intervening gap. */
124
- const replayBlocks = ({ sourceXml, baselineContent, currentContent, serializedXml }, scope) => {
125
- const source = readStory(sourceXml, scope?.source);
126
- const generated = readStory(serializedXml, scope?.generated);
126
+ const replayBlocks = ({ sourceXml, baselineContent, currentContent, serializedXml, ignoredChild }, scope) => {
127
+ const source = readStory(sourceXml, scope?.source, ignoredChild);
128
+ const generated = readStory(serializedXml, scope?.generated, ignoredChild);
127
129
  if (!source || !generated || getLocalName(source.root.name) !== getLocalName(generated.root.name) || source.blocks.length !== baselineContent.length || generated.blocks.length !== currentContent.length) return null;
128
130
  if (source.blocks.some((block, index) => !modelMatchesElement({
129
131
  value: baselineContent[index],
@@ -185,7 +187,7 @@ const replayBlocks = ({ sourceXml, baselineContent, currentContent, serializedXm
185
187
  continue;
186
188
  }
187
189
  }
188
- const fragment = generatedFragment({
190
+ const fragment = materializeReplayFragment({
189
191
  xml: serializedXml.slice(replacement.start, replacement.end),
190
192
  element: replacement.element,
191
193
  sourceNamespace: getNamespaceUri(source.root) ?? "",
@@ -208,7 +210,8 @@ const replayBlocks = ({ sourceXml, baselineContent, currentContent, serializedXm
208
210
  newXml: `${opening.slice(0, -2)}>${fragments.join("")}</${source.root.name}>`
209
211
  });
210
212
  else {
211
- const close = sourceXml.lastIndexOf("</", source.range.end);
213
+ const ignored = ignoredChild === void 0 ? void 0 : getChildElements(source.root).find((child) => getLocalName(child.name) === ignoredChild && WORDPROCESSINGML_NAMESPACE_URIS.has(getNamespaceUri(child) ?? ""));
214
+ const close = (ignored && getXmlSourceRange(ignored)?.start) ?? sourceXml.lastIndexOf("</", source.range.end);
212
215
  if (close < source.range.start) return null;
213
216
  splices.push({
214
217
  start: close,
@@ -322,7 +325,7 @@ const replayCellContent = ({ sourceXml, serializedXml, sourceCell, generatedCell
322
325
  if (getChildElements(sourceCell).at(0) !== sourceProperty || !generatedProperty || getChildElements(generatedCell).at(0) !== generatedProperty) return false;
323
326
  const range = getXmlSourceRange(sourceProperty);
324
327
  if (!range) return false;
325
- const propertyXml = generatedFragment({
328
+ const propertyXml = materializeReplayFragment({
326
329
  xml: sourceXml.slice(range.start, range.end),
327
330
  element: sourceProperty,
328
331
  sourceNamespace: getNamespaceUri(sourceCell) ?? ""
@@ -363,5 +366,106 @@ const replayCellContent = ({ sourceXml, serializedXml, sourceCell, generatedCell
363
366
  });
364
367
  return true;
365
368
  };
369
+ const readDocumentStory = (xml) => {
370
+ const document = readStory(xml);
371
+ if (!document || getLocalName(document.root.name) !== "document") return null;
372
+ const bodies = wordChildren(document.root, "body");
373
+ const body = bodies.at(0);
374
+ if (bodies.length !== 1 || !body || wordChildren(body, "sectPr").length > 1 || wordChildren(document.root, "background").length > 1) return null;
375
+ const range = getXmlSourceRange(body);
376
+ return range ? {
377
+ document,
378
+ body,
379
+ range
380
+ } : null;
381
+ };
382
+ /** Validate source/model correspondence before replaying an unchanged complete part. */
383
+ const canReplayDocumentSource = (sourceXml, baseline) => {
384
+ const source = readDocumentStory(sourceXml);
385
+ if (!source) return false;
386
+ const body = readStory(sourceXml.slice(source.range.start, source.range.end), source.body.namespaceScope, "sectPr");
387
+ return body !== null && body.blocks.length === baseline.content.length && body.blocks.every((block, index) => modelMatchesElement({
388
+ value: baseline.content[index],
389
+ element: block.element,
390
+ mode: "source"
391
+ }));
392
+ };
393
+ /** Replay body blocks and modeled document metadata inside the authored part shell. */
394
+ const buildDocumentBlockReplay = ({ sourceXml, serializedXml, baseline, current }) => {
395
+ const sourceStory = readDocumentStory(sourceXml);
396
+ const generatedStory = readDocumentStory(serializedXml);
397
+ if (!sourceStory || !generatedStory) return null;
398
+ const { body: sourceBody, range: sourceRange } = sourceStory;
399
+ const { document: generated, body: generatedBody, range: generatedRange } = generatedStory;
400
+ let bodyXml = replayBlocks({
401
+ sourceXml: sourceXml.slice(sourceRange.start, sourceRange.end),
402
+ serializedXml: serializedXml.slice(generatedRange.start, generatedRange.end),
403
+ baselineContent: baseline.content,
404
+ currentContent: current.content,
405
+ ignoredChild: "sectPr"
406
+ }, {
407
+ source: sourceBody.namespaceScope,
408
+ generated: generatedBody.namespaceScope,
409
+ generatedRoot: generated.root
410
+ });
411
+ if (bodyXml === null) return null;
412
+ const replaceMetadata = (xml, sourceContainer, generatedContainer, name) => {
413
+ const before = wordChildren(sourceContainer, name);
414
+ const after = wordChildren(generatedContainer, name);
415
+ if (before.length > 1 || after.length > 1) return null;
416
+ const old = before.at(0);
417
+ const next = after.at(0);
418
+ const containerRange = getXmlSourceRange(sourceContainer);
419
+ const oldRange = old && getXmlSourceRange(old);
420
+ const nextRange = next && getXmlSourceRange(next);
421
+ if (!containerRange || old && !oldRange || next && !nextRange) return null;
422
+ const replacement = next && nextRange ? materializeReplayFragment({
423
+ xml: serializedXml.slice(nextRange.start, nextRange.end),
424
+ element: next,
425
+ sourceNamespace: getNamespaceUri(sourceContainer) ?? "",
426
+ generatedRoot: generated.root
427
+ }) : "";
428
+ if (replacement === null) return null;
429
+ if (oldRange) return spliceXml(xml, [{
430
+ start: oldRange.start - containerRange.start,
431
+ end: oldRange.end - containerRange.start,
432
+ newXml: replacement
433
+ }]);
434
+ if (!next) return xml;
435
+ const insertion = name === "background" ? [...xml.matchAll(XML_TOKEN)].at(0)?.[0].length ?? -1 : xml.lastIndexOf("</");
436
+ if (insertion < 0) return null;
437
+ return spliceXml(xml, [{
438
+ start: insertion,
439
+ end: insertion,
440
+ newXml: replacement
441
+ }]);
442
+ };
443
+ if (canonicalJson(baseline.finalSectionProperties) !== canonicalJson(current.finalSectionProperties)) {
444
+ const reparsed = parseStreamingXmlWithSourceRanges(bodyXml, sourceBody.namespaceScope);
445
+ if (reparsed.status !== "parsed") return null;
446
+ const root = getChildElements(reparsed.value).at(0);
447
+ if (!root) return null;
448
+ bodyXml = replaceMetadata(bodyXml, root, generatedBody, "sectPr");
449
+ if (bodyXml === null) return null;
450
+ }
451
+ let result = spliceXml(sourceXml, [{
452
+ start: sourceRange.start,
453
+ end: sourceRange.end,
454
+ newXml: bodyXml
455
+ }]);
456
+ if (result === null) return null;
457
+ if (canonicalJson(baseline.background) !== canonicalJson(current.background)) {
458
+ const reparsed = readStory(result);
459
+ if (!reparsed) return null;
460
+ const replaced = replaceMetadata(result.slice(reparsed.range.start, reparsed.range.end), reparsed.root, generated.root, "background");
461
+ if (replaced === null) return null;
462
+ result = spliceXml(result, [{
463
+ start: reparsed.range.start,
464
+ end: reparsed.range.end,
465
+ newXml: replaced
466
+ }]);
467
+ }
468
+ return result;
469
+ };
366
470
  //#endregion
367
- export { buildStoryBlockReplay };
471
+ export { buildDocumentBlockReplay, buildStoryBlockReplay, canReplayDocumentSource, materializeReplayFragment };
@@ -0,0 +1,20 @@
1
+ import { document_d_exports } from "../types/document.js";
2
+ //#region src/docx/storyPlainText.d.ts
3
+ /** Read the document body with pending revisions accepted. */
4
+ declare const getDocumentText: (body: document_d_exports.DocumentBody) => string;
5
+ /** Approximate word count of the accepted body text. */
6
+ declare const getWordCount: (body: document_d_exports.DocumentBody) => number;
7
+ /** Character count of the accepted body text. */
8
+ declare const getCharacterCount: (body: document_d_exports.DocumentBody) => number;
9
+ /** Read an accepted table, including nested blocks and tracked structure. */
10
+ declare const getTableText: (table: document_d_exports.Table) => string;
11
+ /** Read accepted text-box content for search and indexing. */
12
+ declare const getTextBoxText: (textBox: document_d_exports.TextBox) => string;
13
+ /** Read an accepted header or footer through the same walk as body and notes. */
14
+ declare const getHeaderFooterText: (headerFooter: document_d_exports.HeaderFooter) => string;
15
+ /** Read accepted footnote content, including nested blocks. */
16
+ declare const getFootnoteText: (footnote: document_d_exports.Footnote) => string;
17
+ /** Read accepted endnote content, including nested blocks. */
18
+ declare const getEndnoteText: (endnote: document_d_exports.Endnote) => string;
19
+ //#endregion
20
+ export { getCharacterCount, getDocumentText, getEndnoteText, getFootnoteText, getHeaderFooterText, getTableText, getTextBoxText, getWordCount };
@@ -0,0 +1,23 @@
1
+ import { blockPlainText } from "./blockPlainText.js";
2
+ //#region src/docx/storyPlainText.ts
3
+ /** Read the document body with pending revisions accepted. */
4
+ const getDocumentText = (body) => blockPlainText(body.content);
5
+ /** Approximate word count of the accepted body text. */
6
+ const getWordCount = (body) => {
7
+ const words = getDocumentText(body).trim().split(/\s+/u);
8
+ return words.length > 0 && words[0] !== "" ? words.length : 0;
9
+ };
10
+ /** Character count of the accepted body text. */
11
+ const getCharacterCount = (body) => getDocumentText(body).length;
12
+ /** Read an accepted table, including nested blocks and tracked structure. */
13
+ const getTableText = (table) => blockPlainText([table]);
14
+ /** Read accepted text-box content for search and indexing. */
15
+ const getTextBoxText = (textBox) => blockPlainText(textBox.content);
16
+ /** Read an accepted header or footer through the same walk as body and notes. */
17
+ const getHeaderFooterText = (headerFooter) => blockPlainText(headerFooter.content);
18
+ /** Read accepted footnote content, including nested blocks. */
19
+ const getFootnoteText = (footnote) => blockPlainText(footnote.content);
20
+ /** Read accepted endnote content, including nested blocks. */
21
+ const getEndnoteText = (endnote) => blockPlainText(endnote.content);
22
+ //#endregion
23
+ export { getCharacterCount, getDocumentText, getEndnoteText, getFootnoteText, getHeaderFooterText, getTableText, getTextBoxText, getWordCount };
@@ -2,7 +2,7 @@ import { canonicalJson } from "../utils/canonicalJson.js";
2
2
  import { parseDocumentBody } from "./documentParser.js";
3
3
  import { paraIdAttribute } from "./paraIdAttribute.js";
4
4
  import { spliceSupportsRootNamespaces, spliceXml } from "./selectiveXmlPatch.js";
5
- import { readRootNamespaceBindings, serializePartElement } from "./serializer/partNamespaces.js";
5
+ import { materializeReplayFragment } from "./storyBlockReplay.js";
6
6
  import { NAMESPACES, WORDPROCESSINGML_NAMESPACE_URIS, getChildElements, getLocalName, getNamespaceUri, parseXmlDocument } from "./xmlParser.js";
7
7
  //#region src/docx/structuralXmlPatch.ts
8
8
  /** Conservative body-paragraph splices; source offsets never come from reserialization. */
@@ -111,21 +111,6 @@ const paragraphIds = (root) => {
111
111
  }
112
112
  return ids;
113
113
  };
114
- /** Bind fragment prefixes locally: the source root may use entirely different aliases. */
115
- const paragraphFragment = ({ xml, block, bindings }) => {
116
- const fragment = xml.slice(block.start, block.end);
117
- const openEnd = fragment.indexOf(">");
118
- const name = block.element.name ?? "w:p";
119
- const selfClosing = fragment[openEnd - 1] === "/";
120
- return serializePartElement({
121
- partPath: "word/document.xml",
122
- rootName: name,
123
- rootAttributes: fragment.slice(name.length + 1, selfClosing ? openEnd - 1 : openEnd).trim(),
124
- baselinePrefixes: [],
125
- sourceBindings: bindings,
126
- body: selfClosing ? "" : fragment.slice(openEnd + 1, fragment.lastIndexOf("</"))
127
- });
128
- };
129
114
  /**
130
115
  * Insert/delete direct body paragraphs between surviving paragraph/table anchors.
131
116
  * Tables are opaque barriers: their modeled content and order must stay identical.
@@ -168,11 +153,11 @@ const buildStructuralDocumentPatch = ({ originalXml, serializedXml, changedIds }
168
153
  const survivingBefore = [...before.keys()].filter((key) => after.has(key));
169
154
  const survivingAfter = [...after.keys()].filter((key) => before.has(key));
170
155
  if (canonicalJson(survivingBefore) !== canonicalJson(survivingAfter)) return null;
171
- const bindings = readRootNamespaceBindings(serializedXml);
172
- const fragmentFor = (block) => paragraphFragment({
173
- xml: serializedXml,
174
- block,
175
- bindings
156
+ const fragmentFor = (block) => materializeReplayFragment({
157
+ xml: serializedXml.slice(block.start, block.end),
158
+ element: block.element,
159
+ sourceNamespace: getNamespaceUri(source.root) ?? "",
160
+ generatedRoot: current.root
176
161
  });
177
162
  const splices = [];
178
163
  for (const [key, block] of before) if (!after.has(key)) splices.push({
@@ -186,11 +171,14 @@ const buildStructuralDocumentPatch = ({ originalXml, serializedXml, changedIds }
186
171
  if (!original) {
187
172
  const id = paraIdAttribute(block.element)?.toUpperCase();
188
173
  if (!id || allSourceIds.has(id)) return null;
189
- pending.push(fragmentFor(block));
174
+ const fragment = fragmentFor(block);
175
+ if (fragment === null) return null;
176
+ pending.push(fragment);
190
177
  continue;
191
178
  }
192
179
  const id = paraIdAttribute(block.element)?.toUpperCase();
193
180
  const replacement = id !== void 0 && changed.has(id) ? fragmentFor(block) : originalXml.slice(original.start, original.end);
181
+ if (replacement === null) return null;
194
182
  if (pending.length > 0 || replacement !== originalXml.slice(original.start, original.end)) splices.push({
195
183
  start: original.start,
196
184
  end: original.end,
@@ -8,6 +8,10 @@ type ParsedStylesPackage = {
8
8
  styleDefinitions: document_d_exports.StyleDefinitions;
9
9
  styles: StyleMap;
10
10
  };
11
+ /**
12
+ * Resolve style inheritance chain
13
+ */
14
+ declare function resolveStyleInheritance(style: document_d_exports.Style, styleMap: StyleMap, visited?: Set<string>): document_d_exports.Style;
11
15
  /**
12
16
  * Parse styles.xml content
13
17
  *
@@ -46,4 +50,4 @@ declare function getDefaultCharacterStyle(styleMap: StyleMap): document_d_export
46
50
  */
47
51
  declare function getStylesByType(styleMap: StyleMap, type: document_d_exports.StyleType): document_d_exports.Style[];
48
52
  //#endregion
49
- export { ParsedStylesPackage, StyleMap, getDefaultCharacterStyle, getDefaultParagraphStyle, getResolvedStyle, getStylesByType, parseStyleDefinitions, parseStyles, parseStylesPackage };
53
+ export { ParsedStylesPackage, StyleMap, getDefaultCharacterStyle, getDefaultParagraphStyle, getResolvedStyle, getStylesByType, parseStyleDefinitions, parseStyles, parseStylesPackage, resolveStyleInheritance };
@@ -554,4 +554,4 @@ function getStylesByType(styleMap, type) {
554
554
  return result;
555
555
  }
556
556
  //#endregion
557
- export { getDefaultCharacterStyle, getDefaultParagraphStyle, getResolvedStyle, getStylesByType, parseStyleDefinitions, parseStyles, parseStylesPackage };
557
+ export { getDefaultCharacterStyle, getDefaultParagraphStyle, getResolvedStyle, getStylesByType, parseStyleDefinitions, parseStyles, parseStylesPackage, resolveStyleInheritance };
@@ -342,13 +342,6 @@ declare function isCellMergeStart(cell: document_d_exports.TableCell): boolean;
342
342
  * @returns true if cell spans multiple columns
343
343
  */
344
344
  declare function isCellHorizontallyMerged(cell: document_d_exports.TableCell): boolean;
345
- /**
346
- * Get the plain text content of a table
347
- *
348
- * @param table - The table to extract text from
349
- * @returns Plain text content
350
- */
351
- declare function getTableText(table: document_d_exports.Table): string;
352
345
  /**
353
346
  * Check if table has header row
354
347
  *
@@ -371,4 +364,4 @@ declare function getHeaderRows(table: document_d_exports.Table): document_d_expo
371
364
  */
372
365
  declare function isFloatingTable(table: document_d_exports.Table): boolean;
373
366
  //#endregion
374
- export { CELL_CONTENT_HANDLERS, MAX_TABLE_COLUMNS, ROW_CONTENT_HANDLERS, TABLE_CONTENT_HANDLERS, getHeaderRows, getTableColumnCount, getTableRowCount, getTableText, hasHeaderRow, isCellHorizontallyMerged, isCellMergeContinuation, isCellMergeStart, isFloatingTable, isTableCellMergeRevisionContinuation, isTableCellMergeRevisionValue, parseCellMargins, parseConditionalFormatStyle, parseFloatingTableProperties, parseTable, parseTableBorders, parseTableCell, parseTableCellProperties, parseTableGrid, parseTableLook, parseTableMeasurement, parseTableProperties, parseTablePropertyExceptions, parseTableRow, parseTableRowProperties };
367
+ export { CELL_CONTENT_HANDLERS, MAX_TABLE_COLUMNS, ROW_CONTENT_HANDLERS, TABLE_CONTENT_HANDLERS, getHeaderRows, getTableColumnCount, getTableRowCount, hasHeaderRow, isCellHorizontallyMerged, isCellMergeContinuation, isCellMergeStart, isFloatingTable, isTableCellMergeRevisionContinuation, isTableCellMergeRevisionValue, parseCellMargins, parseConditionalFormatStyle, parseFloatingTableProperties, parseTable, parseTableBorders, parseTableCell, parseTableCellProperties, parseTableGrid, parseTableLook, parseTableMeasurement, parseTableProperties, parseTablePropertyExceptions, parseTableRow, parseTableRowProperties };
@@ -1406,33 +1406,6 @@ function isCellHorizontallyMerged(cell) {
1406
1406
  return (cell.formatting?.gridSpan ?? 1) > 1;
1407
1407
  }
1408
1408
  /**
1409
- * Get the plain text content of a table
1410
- *
1411
- * @param table - The table to extract text from
1412
- * @returns Plain text content
1413
- */
1414
- function getTableText(table) {
1415
- const rows = [];
1416
- for (const row of table.rows) {
1417
- const cells = [];
1418
- for (const cell of row.cells) {
1419
- const cellText = cell.content.filter((c) => c.type === "paragraph").map((p) => getParagraphText(p)).join("\n");
1420
- cells.push(cellText);
1421
- }
1422
- rows.push(cells.join(" "));
1423
- }
1424
- return rows.join("\n");
1425
- }
1426
- /**
1427
- * Helper to get paragraph text (simplified)
1428
- */
1429
- function getParagraphText(para) {
1430
- return para.content.filter((c) => "content" in c).flatMap((run) => {
1431
- if (!("content" in run) || !Array.isArray(run.content)) return [];
1432
- return run.content.filter((c) => typeof c === "object" && c !== null && "type" in c && c.type === "text" && "text" in c).map((c) => c.text);
1433
- }).join("");
1434
- }
1435
- /**
1436
1409
  * Check if table has header row
1437
1410
  *
1438
1411
  * @param table - The table to check
@@ -1461,4 +1434,4 @@ function isFloatingTable(table) {
1461
1434
  return table.formatting?.floating !== void 0;
1462
1435
  }
1463
1436
  //#endregion
1464
- export { CELL_CONTENT_HANDLERS, MAX_TABLE_COLUMNS, ROW_CONTENT_HANDLERS, TABLE_CONTENT_HANDLERS, getHeaderRows, getTableColumnCount, getTableRowCount, getTableText, hasHeaderRow, isCellHorizontallyMerged, isCellMergeContinuation, isCellMergeStart, isFloatingTable, isTableCellMergeRevisionContinuation, isTableCellMergeRevisionValue, parseCellMargins, parseConditionalFormatStyle, parseFloatingTableProperties, parseTable, parseTableBorders, parseTableCell, parseTableCellProperties, parseTableGrid, parseTableLook, parseTableMeasurement, parseTableProperties, parseTablePropertyExceptions, parseTableRow, parseTableRowProperties };
1437
+ export { CELL_CONTENT_HANDLERS, MAX_TABLE_COLUMNS, ROW_CONTENT_HANDLERS, TABLE_CONTENT_HANDLERS, getHeaderRows, getTableColumnCount, getTableRowCount, hasHeaderRow, isCellHorizontallyMerged, isCellMergeContinuation, isCellMergeStart, isFloatingTable, isTableCellMergeRevisionContinuation, isTableCellMergeRevisionValue, parseCellMargins, parseConditionalFormatStyle, parseFloatingTableProperties, parseTable, parseTableBorders, parseTableCell, parseTableCellProperties, parseTableGrid, parseTableLook, parseTableMeasurement, parseTableProperties, parseTablePropertyExceptions, parseTableRow, parseTableRowProperties };
@@ -103,10 +103,6 @@ declare function hasTextBoxOutline(textBox: document_d_exports.TextBox): boolean
103
103
  * Check if text box has content
104
104
  */
105
105
  declare function hasTextBoxContent(textBox: document_d_exports.TextBox): boolean;
106
- /**
107
- * Get plain text from text box (helper for search/indexing)
108
- */
109
- declare function getTextBoxText(textBox: document_d_exports.TextBox): string;
110
106
  /**
111
107
  * Resolve fill color to CSS color string
112
108
  */
@@ -151,4 +147,4 @@ type ScanRunForTextBoxDrawingsOptions = {
151
147
  };
152
148
  declare const scanRunForTextBoxDrawings: ({ xmlRun, claimedByRunParser }: ScanRunForTextBoxDrawingsOptions) => TextBoxRunScan;
153
149
  //#endregion
154
- export { ParagraphParserFn, ScanRunForTextBoxDrawingsOptions, TableParserFn, TextBoxDrawing, TextBoxRunScan, extractTextBoxContentElements, getTextBoxContentElement, getTextBoxDimensionsPx, getTextBoxHeightPx, getTextBoxMarginsPx, getTextBoxOutlineWidthPx, getTextBoxText, getTextBoxWidthPx, hasTextBoxContent, hasTextBoxFill, hasTextBoxOutline, isFloatingTextBox, isShapeTextBox, isTextBoxDrawing, parseTextBox, parseTextBoxContent, parseTextBoxFromShape, resolveTextBoxFillColor, resolveTextBoxOutlineColor, scanRunForTextBoxDrawings };
150
+ export { ParagraphParserFn, ScanRunForTextBoxDrawingsOptions, TableParserFn, TextBoxDrawing, TextBoxRunScan, extractTextBoxContentElements, getTextBoxContentElement, getTextBoxDimensionsPx, getTextBoxHeightPx, getTextBoxMarginsPx, getTextBoxOutlineWidthPx, getTextBoxWidthPx, hasTextBoxContent, hasTextBoxFill, hasTextBoxOutline, isFloatingTextBox, isShapeTextBox, isTextBoxDrawing, parseTextBox, parseTextBoxContent, parseTextBoxFromShape, resolveTextBoxFillColor, resolveTextBoxOutlineColor, scanRunForTextBoxDrawings };
@@ -285,25 +285,6 @@ function hasTextBoxContent(textBox) {
285
285
  return textBox.content.length > 0;
286
286
  }
287
287
  /**
288
- * Get plain text from text box (helper for search/indexing)
289
- */
290
- function getTextBoxText(textBox) {
291
- return textBox.content.map(getTextBoxBlockText).join("\n");
292
- }
293
- const getTextBoxBlockText = (block) => {
294
- if (block.type === "paragraph") {
295
- const runTexts = [];
296
- for (const item of block.content) {
297
- if (item.type !== "run") continue;
298
- for (const content of item.content) if (content.type === "text") runTexts.push(content.text);
299
- }
300
- return runTexts.join("");
301
- }
302
- if (block.type === "table") return block.rows.map((row) => row.cells.map((cell) => cell.content.map(getTextBoxBlockText).join("\n")).join(" ")).join("\n");
303
- if (block.type !== "blockSdt" && block.type !== "blockCustomXml") return "";
304
- return block.content.map(getTextBoxBlockText).join("\n");
305
- };
306
- /**
307
288
  * Resolve fill color to CSS color string
308
289
  */
309
290
  function resolveTextBoxFillColor(textBox) {
@@ -380,4 +361,4 @@ const scanRunForTextBoxDrawings = ({ xmlRun, claimedByRunParser }) => {
380
361
  };
381
362
  };
382
363
  //#endregion
383
- export { extractTextBoxContentElements, getTextBoxContentElement, getTextBoxDimensionsPx, getTextBoxHeightPx, getTextBoxMarginsPx, getTextBoxOutlineWidthPx, getTextBoxText, getTextBoxWidthPx, hasTextBoxContent, hasTextBoxFill, hasTextBoxOutline, isFloatingTextBox, isShapeTextBox, isTextBoxDrawing, parseTextBox, parseTextBoxContent, parseTextBoxFromShape, resolveTextBoxFillColor, resolveTextBoxOutlineColor, scanRunForTextBoxDrawings };
364
+ export { extractTextBoxContentElements, getTextBoxContentElement, getTextBoxDimensionsPx, getTextBoxHeightPx, getTextBoxMarginsPx, getTextBoxOutlineWidthPx, getTextBoxWidthPx, hasTextBoxContent, hasTextBoxFill, hasTextBoxOutline, isFloatingTextBox, isShapeTextBox, isTextBoxDrawing, parseTextBox, parseTextBoxContent, parseTextBoxFromShape, resolveTextBoxFillColor, resolveTextBoxOutlineColor, scanRunForTextBoxDrawings };
@@ -5,6 +5,7 @@ import { openDocxBuffer } from "./encryption/openEncryptedDocx.js";
5
5
  import { RASTER_MIME_TYPES, detectRasterMimeType } from "./rasterMime.js";
6
6
  import { decodeXmlBytes } from "./xmlEncoding.js";
7
7
  import { FOLIO_XML_RESOURCE_LIMITS, assertXmlResourceLimits, createXmlPackageBudget } from "./xmlResourceLimits.js";
8
+ import { writeZipPart } from "@stll/docx-core/zip";
8
9
  import JSZip from "jszip";
9
10
  //#region src/docx/unzip.ts
10
11
  /**
@@ -282,7 +283,11 @@ const replaceRawDocxXmlParts = async (content, parts) => {
282
283
  lowerPath: path.toLowerCase(),
283
284
  content: xmlContent
284
285
  });
285
- content.originalZip.file(path, xmlContent);
286
+ writeZipPart({
287
+ zip: content.originalZip,
288
+ path,
289
+ data: xmlContent
290
+ });
286
291
  identitiesChanged = true;
287
292
  }
288
293
  if (identitiesChanged) content.originalBuffer = await content.originalZip.generateAsync({
@@ -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": "تعقب التغييرات",
@@ -339,6 +339,10 @@ declare const CATALOGS: {
339
339
  readonly editor: {
340
340
  readonly editing: "Editing";
341
341
  readonly editingDescription: "Edit the document directly";
342
+ readonly outlineDepthAll: "All levels";
343
+ readonly outlineDepthLabel: "Show headings";
344
+ readonly outlineDepthThree: "Levels 1–3";
345
+ readonly outlineDepthTwo: "Levels 1–2";
342
346
  readonly outlineTitle: "Outline";
343
347
  readonly showDocumentOutline: "Document outline";
344
348
  readonly suggesting: "Track Changes";
@@ -994,6 +998,10 @@ declare const CATALOGS: {
994
998
  readonly editor: {
995
999
  readonly editing: "Bearbeiten";
996
1000
  readonly editingDescription: "Dokument direkt bearbeiten";
1001
+ readonly outlineDepthAll: "Alle Ebenen";
1002
+ readonly outlineDepthLabel: "Überschriften anzeigen";
1003
+ readonly outlineDepthThree: "Ebenen 1–3";
1004
+ readonly outlineDepthTwo: "Ebenen 1–2";
997
1005
  readonly outlineTitle: "Gliederung";
998
1006
  readonly showDocumentOutline: "Dokumentgliederung";
999
1007
  readonly suggesting: "Änderungen nachverfolgen";
@@ -1649,6 +1657,10 @@ declare const CATALOGS: {
1649
1657
  readonly editor: {
1650
1658
  readonly editing: "Modification";
1651
1659
  readonly editingDescription: "Modifier directement le document";
1660
+ readonly outlineDepthAll: "Tous les niveaux";
1661
+ readonly outlineDepthLabel: "Afficher les titres";
1662
+ readonly outlineDepthThree: "Niveaux 1–3";
1663
+ readonly outlineDepthTwo: "Niveaux 1–2";
1652
1664
  readonly outlineTitle: "Plan";
1653
1665
  readonly showDocumentOutline: "Plan du document";
1654
1666
  readonly suggesting: "Suivi des modifications";
@@ -2304,6 +2316,10 @@ declare const CATALOGS: {
2304
2316
  readonly editor: {
2305
2317
  readonly editing: "Edición";
2306
2318
  readonly editingDescription: "Editar el documento directamente";
2319
+ readonly outlineDepthAll: "Todos los niveles";
2320
+ readonly outlineDepthLabel: "Mostrar encabezados";
2321
+ readonly outlineDepthThree: "Niveles 1–3";
2322
+ readonly outlineDepthTwo: "Niveles 1–2";
2307
2323
  readonly outlineTitle: "Esquema";
2308
2324
  readonly showDocumentOutline: "Esquema del documento";
2309
2325
  readonly suggesting: "Control de cambios";
@@ -2959,6 +2975,10 @@ declare const CATALOGS: {
2959
2975
  readonly editor: {
2960
2976
  readonly editing: "Úpravy";
2961
2977
  readonly editingDescription: "Upravovat dokument přímo";
2978
+ readonly outlineDepthAll: "Vše";
2979
+ readonly outlineDepthLabel: "Zobrazit nadpisy";
2980
+ readonly outlineDepthThree: "Úrovně 1–3";
2981
+ readonly outlineDepthTwo: "Úrovně 1–2";
2962
2982
  readonly outlineTitle: "Osnova";
2963
2983
  readonly showDocumentOutline: "Osnova dokumentu";
2964
2984
  readonly suggesting: "Sledování změn";
@@ -3614,6 +3634,10 @@ declare const CATALOGS: {
3614
3634
  readonly editor: {
3615
3635
  readonly editing: "تحرير";
3616
3636
  readonly editingDescription: "تحرير المستند مباشرةً";
3637
+ readonly outlineDepthAll: "كل المستويات";
3638
+ readonly outlineDepthLabel: "إظهار العناوين";
3639
+ readonly outlineDepthThree: "المستويات 1–3";
3640
+ readonly outlineDepthTwo: "المستويان 1–2";
3617
3641
  readonly outlineTitle: "المخطط";
3618
3642
  readonly showDocumentOutline: "مخطط المستند";
3619
3643
  readonly suggesting: "تعقب التغييرات";
@@ -4269,6 +4293,10 @@ declare const CATALOGS: {
4269
4293
  readonly editor: {
4270
4294
  readonly editing: "Redigeerimine";
4271
4295
  readonly editingDescription: "Redigeerige dokumenti otse";
4296
+ readonly outlineDepthAll: "Kõik tasemed";
4297
+ readonly outlineDepthLabel: "Kuva pealkirju";
4298
+ readonly outlineDepthThree: "Tasemed 1–3";
4299
+ readonly outlineDepthTwo: "Tasemed 1–2";
4272
4300
  readonly outlineTitle: "Liigendus";
4273
4301
  readonly showDocumentOutline: "Dokumendi liigendus";
4274
4302
  readonly suggesting: "Muutuste jälitus";
@@ -4924,6 +4952,10 @@ declare const CATALOGS: {
4924
4952
  readonly editor: {
4925
4953
  readonly editing: "עריכה";
4926
4954
  readonly editingDescription: "ערוך את המסמך ישירות";
4955
+ readonly outlineDepthAll: "כל הרמות";
4956
+ readonly outlineDepthLabel: "הצגת כותרות";
4957
+ readonly outlineDepthThree: "רמות 1–3";
4958
+ readonly outlineDepthTwo: "רמות 1–2";
4927
4959
  readonly outlineTitle: "ניווט";
4928
4960
  readonly showDocumentOutline: "חלונית הניווט במסמך";
4929
4961
  readonly suggesting: "מעקב אחר שינויים";
@@ -5579,6 +5611,10 @@ declare const CATALOGS: {
5579
5611
  readonly editor: {
5580
5612
  readonly editing: "संपादन";
5581
5613
  readonly editingDescription: "दस्तावेज़ को सीधे संपादित करें";
5614
+ readonly outlineDepthAll: "सभी स्तर";
5615
+ readonly outlineDepthLabel: "शीर्षक दिखाएँ";
5616
+ readonly outlineDepthThree: "स्तर 1–3";
5617
+ readonly outlineDepthTwo: "स्तर 1–2";
5582
5618
  readonly outlineTitle: "रूपरेखा";
5583
5619
  readonly showDocumentOutline: "दस्तावेज़ रूपरेखा";
5584
5620
  readonly suggesting: "परिवर्तन ट्रैक करें";
@@ -6234,6 +6270,10 @@ declare const CATALOGS: {
6234
6270
  readonly editor: {
6235
6271
  readonly editing: "Szerkesztés";
6236
6272
  readonly editingDescription: "A dokumentum közvetlen szerkesztése";
6273
+ readonly outlineDepthAll: "Minden szint";
6274
+ readonly outlineDepthLabel: "Címsorok megjelenítése";
6275
+ readonly outlineDepthThree: "1–3. szint";
6276
+ readonly outlineDepthTwo: "1–2. szint";
6237
6277
  readonly outlineTitle: "Vázlat";
6238
6278
  readonly showDocumentOutline: "Dokumentum vázlata";
6239
6279
  readonly suggesting: "Változások követése";
@@ -6889,6 +6929,10 @@ declare const CATALOGS: {
6889
6929
  readonly editor: {
6890
6930
  readonly editing: "Redagavimas";
6891
6931
  readonly editingDescription: "Redaguokite dokumentą tiesiogiai";
6932
+ readonly outlineDepthAll: "Visi lygiai";
6933
+ readonly outlineDepthLabel: "Rodyti antraštes";
6934
+ readonly outlineDepthThree: "1–3 lygiai";
6935
+ readonly outlineDepthTwo: "1–2 lygiai";
6892
6936
  readonly outlineTitle: "Struktūra";
6893
6937
  readonly showDocumentOutline: "Dokumento struktūra";
6894
6938
  readonly suggesting: "Keitimų sekimas";
@@ -7544,6 +7588,10 @@ declare const CATALOGS: {
7544
7588
  readonly editor: {
7545
7589
  readonly editing: "Rediģēšana";
7546
7590
  readonly editingDescription: "Rediģējiet dokumentu tieši";
7591
+ readonly outlineDepthAll: "Visi līmeņi";
7592
+ readonly outlineDepthLabel: "Rādīt virsrakstus";
7593
+ readonly outlineDepthThree: "1.–3. līmenis";
7594
+ readonly outlineDepthTwo: "1.–2. līmenis";
7547
7595
  readonly outlineTitle: "Struktūra";
7548
7596
  readonly showDocumentOutline: "Dokumenta struktūra";
7549
7597
  readonly suggesting: "Izmaiņu reģistrēšana";
@@ -8199,6 +8247,10 @@ declare const CATALOGS: {
8199
8247
  readonly editor: {
8200
8248
  readonly editing: "Edytowanie";
8201
8249
  readonly editingDescription: "Edytuj dokument bezpośrednio";
8250
+ readonly outlineDepthAll: "Wszystkie poziomy";
8251
+ readonly outlineDepthLabel: "Pokaż nagłówki";
8252
+ readonly outlineDepthThree: "Poziomy 1–3";
8253
+ readonly outlineDepthTwo: "Poziomy 1–2";
8202
8254
  readonly outlineTitle: "Konspekt";
8203
8255
  readonly showDocumentOutline: "Konspekt dokumentu";
8204
8256
  readonly suggesting: "Śledzenie zmian";
@@ -8854,6 +8906,10 @@ declare const CATALOGS: {
8854
8906
  readonly editor: {
8855
8907
  readonly editing: "Editando";
8856
8908
  readonly editingDescription: "Edite o documento diretamente";
8909
+ readonly outlineDepthAll: "Todos os níveis";
8910
+ readonly outlineDepthLabel: "Mostrar títulos";
8911
+ readonly outlineDepthThree: "Níveis 1–3";
8912
+ readonly outlineDepthTwo: "Níveis 1–2";
8857
8913
  readonly outlineTitle: "Estrutura de tópicos";
8858
8914
  readonly showDocumentOutline: "Estrutura de tópicos do documento";
8859
8915
  readonly suggesting: "Controle de Alterações";
@@ -9509,6 +9565,10 @@ declare const CATALOGS: {
9509
9565
  readonly editor: {
9510
9566
  readonly editing: "Úpravy";
9511
9567
  readonly editingDescription: "Upravujte dokument priamo";
9568
+ readonly outlineDepthAll: "Všetky úrovne";
9569
+ readonly outlineDepthLabel: "Zobraziť nadpisy";
9570
+ readonly outlineDepthThree: "Úrovne 1–3";
9571
+ readonly outlineDepthTwo: "Úrovne 1–2";
9512
9572
  readonly outlineTitle: "Prehľad";
9513
9573
  readonly showDocumentOutline: "Prehľad dokumentu";
9514
9574
  readonly suggesting: "Sledovanie zmien";
@@ -10164,6 +10224,10 @@ declare const CATALOGS: {
10164
10224
  readonly editor: {
10165
10225
  readonly editing: "Düzenleme";
10166
10226
  readonly editingDescription: "Belgeyi doğrudan düzenleyin";
10227
+ readonly outlineDepthAll: "Tüm düzeyler";
10228
+ readonly outlineDepthLabel: "Başlıkları göster";
10229
+ readonly outlineDepthThree: "1–3. düzeyler";
10230
+ readonly outlineDepthTwo: "1–2. düzeyler";
10167
10231
  readonly outlineTitle: "Ana hat";
10168
10232
  readonly showDocumentOutline: "Belge ana hattı";
10169
10233
  readonly suggesting: "Değişiklik izleme";
@@ -10819,6 +10883,10 @@ declare const CATALOGS: {
10819
10883
  readonly editor: {
10820
10884
  readonly editing: "编辑";
10821
10885
  readonly editingDescription: "直接编辑文档";
10886
+ readonly outlineDepthAll: "所有级别";
10887
+ readonly outlineDepthLabel: "显示标题";
10888
+ readonly outlineDepthThree: "第 1–3 级";
10889
+ readonly outlineDepthTwo: "第 1–2 级";
10822
10890
  readonly outlineTitle: "大纲";
10823
10891
  readonly showDocumentOutline: "文档大纲";
10824
10892
  readonly suggesting: "修订";