@beyondwork/docx-react-component 1.0.124 → 1.0.126

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 (101) hide show
  1. package/dist/api/public-types.cjs +147 -35
  2. package/dist/api/public-types.d.cts +2 -2
  3. package/dist/api/public-types.d.ts +2 -2
  4. package/dist/api/public-types.js +3 -3
  5. package/dist/api/v3.cjs +796 -102
  6. package/dist/api/v3.d.cts +3 -3
  7. package/dist/api/v3.d.ts +3 -3
  8. package/dist/api/v3.js +10 -10
  9. package/dist/{canonical-document-CG2TgAzj.d.cts → canonical-document-CXCFCbAz.d.cts} +2 -0
  10. package/dist/{canonical-document-CG2TgAzj.d.ts → canonical-document-CXCFCbAz.d.ts} +2 -0
  11. package/dist/{chunk-PFYUJU3Q.js → chunk-2QL5DAKF.js} +98 -43
  12. package/dist/{chunk-4IPEZYQX.js → chunk-4EENH4FG.js} +1 -1
  13. package/dist/{chunk-BOHHIVQ2.js → chunk-4G3OS2H6.js} +3 -3
  14. package/dist/{chunk-A74Y5NE4.js → chunk-4YJVRIUB.js} +52 -21
  15. package/dist/{chunk-FNWKE74J.js → chunk-5DGKFNQT.js} +5 -1
  16. package/dist/{chunk-RSYN6FTS.js → chunk-6F5QW44A.js} +2 -2
  17. package/dist/{chunk-ZMRO6P3A.js → chunk-6IGWPAR4.js} +505 -44
  18. package/dist/{chunk-KOHQFZMM.js → chunk-BYSRJ4FE.js} +1 -1
  19. package/dist/{chunk-H6IL5ABU.js → chunk-CXSYRB37.js} +64 -20
  20. package/dist/{chunk-32ZAOQ54.js → chunk-D5HYZQTG.js} +1 -1
  21. package/dist/{chunk-TY4DIJO3.js → chunk-ESJ2MES5.js} +1 -1
  22. package/dist/{chunk-Q76XPPTA.js → chunk-FPRWV54X.js} +101 -14
  23. package/dist/{chunk-MPH4ZQS4.js → chunk-GL7XRYBY.js} +624 -87
  24. package/dist/{chunk-IR7QV2BX.js → chunk-KV435YXO.js} +2 -2
  25. package/dist/{chunk-N4VIXI2Z.js → chunk-MWSBGJQO.js} +137 -18
  26. package/dist/{chunk-7PC6XUNO.js → chunk-TQDQU2E3.js} +2 -2
  27. package/dist/{chunk-4B74ETJI.js → chunk-V6XVZFFH.js} +2 -2
  28. package/dist/{chunk-NAMAWCXN.js → chunk-YD2JE54B.js} +1 -1
  29. package/dist/{chunk-ZRHLLPSJ.js → chunk-YHZHPXDB.js} +85 -18
  30. package/dist/{chunk-HXHQA4BU.js → chunk-YIYM4ZAP.js} +1 -1
  31. package/dist/{chunk-LGWNN3L2.js → chunk-ZDOAUP3V.js} +2 -2
  32. package/dist/compare.d.cts +1 -1
  33. package/dist/compare.d.ts +1 -1
  34. package/dist/core/commands/formatting-commands.d.cts +2 -2
  35. package/dist/core/commands/formatting-commands.d.ts +2 -2
  36. package/dist/core/commands/image-commands.cjs +65 -20
  37. package/dist/core/commands/image-commands.d.cts +2 -2
  38. package/dist/core/commands/image-commands.d.ts +2 -2
  39. package/dist/core/commands/image-commands.js +5 -5
  40. package/dist/core/commands/section-layout-commands.d.cts +2 -2
  41. package/dist/core/commands/section-layout-commands.d.ts +2 -2
  42. package/dist/core/commands/style-commands.d.cts +2 -2
  43. package/dist/core/commands/style-commands.d.ts +2 -2
  44. package/dist/core/commands/table-structure-commands.cjs +65 -20
  45. package/dist/core/commands/table-structure-commands.d.cts +2 -2
  46. package/dist/core/commands/table-structure-commands.d.ts +2 -2
  47. package/dist/core/commands/table-structure-commands.js +4 -4
  48. package/dist/core/commands/text-commands.cjs +66 -21
  49. package/dist/core/commands/text-commands.d.cts +2 -2
  50. package/dist/core/commands/text-commands.d.ts +2 -2
  51. package/dist/core/commands/text-commands.js +5 -5
  52. package/dist/core/selection/mapping.d.cts +2 -2
  53. package/dist/core/selection/mapping.d.ts +2 -2
  54. package/dist/core/state/editor-state.d.cts +2 -2
  55. package/dist/core/state/editor-state.d.ts +2 -2
  56. package/dist/index.cjs +1677 -240
  57. package/dist/index.d.cts +5 -5
  58. package/dist/index.d.ts +5 -5
  59. package/dist/index.js +62 -25
  60. package/dist/io/docx-session.cjs +51 -20
  61. package/dist/io/docx-session.d.cts +4 -4
  62. package/dist/io/docx-session.d.ts +4 -4
  63. package/dist/io/docx-session.js +4 -4
  64. package/dist/legal.cjs +36 -12
  65. package/dist/legal.d.cts +1 -1
  66. package/dist/legal.d.ts +1 -1
  67. package/dist/legal.js +3 -3
  68. package/dist/{loader-D9y4ZRjj.d.ts → loader-CS9-9KFa.d.ts} +3 -3
  69. package/dist/{loader-D9KCtj4m.d.cts → loader-OoWJ1_17.d.cts} +3 -3
  70. package/dist/{public-types-CNnMHZM9.d.ts → public-types-BP3vqJR5.d.cts} +157 -11
  71. package/dist/{public-types-DajNGKV4.d.cts → public-types-DdcHqcow.d.ts} +157 -11
  72. package/dist/public-types.cjs +147 -35
  73. package/dist/public-types.d.cts +2 -2
  74. package/dist/public-types.d.ts +2 -2
  75. package/dist/public-types.js +3 -3
  76. package/dist/runtime/collab.d.cts +3 -3
  77. package/dist/runtime/collab.d.ts +3 -3
  78. package/dist/runtime/document-runtime.cjs +945 -134
  79. package/dist/runtime/document-runtime.d.cts +2 -2
  80. package/dist/runtime/document-runtime.d.ts +2 -2
  81. package/dist/runtime/document-runtime.js +14 -14
  82. package/dist/{session-DyQGlryH.d.cts → session-Cq-fzx3B.d.cts} +3 -3
  83. package/dist/{session-DEmaOEjA.d.ts → session-DyFQt8Ph.d.ts} +3 -3
  84. package/dist/session.cjs +51 -20
  85. package/dist/session.d.cts +5 -5
  86. package/dist/session.d.ts +5 -5
  87. package/dist/session.js +5 -5
  88. package/dist/tailwind.cjs +238 -73
  89. package/dist/tailwind.d.cts +2 -2
  90. package/dist/tailwind.d.ts +2 -2
  91. package/dist/tailwind.js +7 -7
  92. package/dist/{types-CxE1aZiv.d.cts → types-Bg7D-GD3.d.cts} +2 -2
  93. package/dist/{types-DjJNaE9c.d.ts → types-bJAgMq1M.d.ts} +2 -2
  94. package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
  95. package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
  96. package/dist/ui-tailwind/editor-surface/search-plugin.js +4 -4
  97. package/dist/ui-tailwind.cjs +238 -73
  98. package/dist/ui-tailwind.d.cts +3 -3
  99. package/dist/ui-tailwind.d.ts +3 -3
  100. package/dist/ui-tailwind.js +7 -7
  101. package/package.json +1 -1
package/dist/legal.cjs CHANGED
@@ -1017,7 +1017,8 @@ var SCOPE_MARKER_BOOKMARK_PREFIX = "bw:scope:";
1017
1017
  // src/io/ooxml/parse-bookmark-references.ts
1018
1018
  var HYPERLINK_ANCHOR_RE = /<(?:\w+:)?hyperlink\b[^>]*\bw:anchor\s*=\s*"([^"]*)"/gi;
1019
1019
  var INSTR_TEXT_RE = /<(?:\w+:)?instrText\b[^>]*>([\s\S]*?)<\/(?:\w+:)?instrText>/gi;
1020
- var FLD_SIMPLE_INSTR_RE = /<(?:\w+:)?fldSimple\b[^>]*(?:\bw:instr|\binstr)\s*=\s*(["'])([\s\S]*?)\1/gi;
1020
+ var FLD_SIMPLE_INSTR_DOUBLE_RE = /<(?:\w+:)?fldSimple\b[^>]*?\b(?:w:)?instr\s*=\s*"([^"]*)"/gi;
1021
+ var FLD_SIMPLE_INSTR_SINGLE_RE = /<(?:\w+:)?fldSimple\b[^>]*?\b(?:w:)?instr\s*=\s*'([^']*)'/gi;
1021
1022
  var TOC_FIELD_RE = /\bTOC\b/;
1022
1023
  var REFLIKE_FIELD_RE = /\b(?:HYPERLINK|REF|PAGEREF|NOTEREF)\s+([A-Za-z0-9_:.\-]+)/g;
1023
1024
  var DATA_BINDING_RE = /<(?:\w+:)?dataBinding\b/i;
@@ -1036,11 +1037,22 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
1036
1037
  }
1037
1038
  INSTR_TEXT_RE.lastIndex = 0;
1038
1039
  while ((m = INSTR_TEXT_RE.exec(documentXml)) !== null) {
1039
- if (scanInstructionText(m[1] ?? "", retained)) retainAllToc = true;
1040
+ const instrText = m[1] ?? "";
1041
+ scanFieldInstruction(instrText, retained, () => {
1042
+ retainAllToc = true;
1043
+ });
1040
1044
  }
1041
- FLD_SIMPLE_INSTR_RE.lastIndex = 0;
1042
- while ((m = FLD_SIMPLE_INSTR_RE.exec(documentXml)) !== null) {
1043
- if (scanInstructionText(m[2] ?? "", retained)) retainAllToc = true;
1045
+ FLD_SIMPLE_INSTR_DOUBLE_RE.lastIndex = 0;
1046
+ while ((m = FLD_SIMPLE_INSTR_DOUBLE_RE.exec(documentXml)) !== null) {
1047
+ scanFieldInstruction(decodeXmlAttribute(m[1] ?? ""), retained, () => {
1048
+ retainAllToc = true;
1049
+ });
1050
+ }
1051
+ FLD_SIMPLE_INSTR_SINGLE_RE.lastIndex = 0;
1052
+ while ((m = FLD_SIMPLE_INSTR_SINGLE_RE.exec(documentXml)) !== null) {
1053
+ scanFieldInstruction(decodeXmlAttribute(m[1] ?? ""), retained, () => {
1054
+ retainAllToc = true;
1055
+ });
1044
1056
  }
1045
1057
  retainRevisionBoundedBookmarks(documentXml, retained);
1046
1058
  return {
@@ -1049,14 +1061,16 @@ function scanBookmarkReferences(documentXml, callerAllowlist = []) {
1049
1061
  retainAll
1050
1062
  };
1051
1063
  }
1052
- function scanInstructionText(instrText, retained) {
1053
- const hasTocField = TOC_FIELD_RE.test(instrText);
1064
+ function scanFieldInstruction(instrText, retained, retainToc) {
1065
+ if (TOC_FIELD_RE.test(instrText)) retainToc();
1054
1066
  REFLIKE_FIELD_RE.lastIndex = 0;
1055
1067
  let r;
1056
1068
  while ((r = REFLIKE_FIELD_RE.exec(instrText)) !== null) {
1057
1069
  if (r[1]) retained.add(r[1]);
1058
1070
  }
1059
- return hasTocField;
1071
+ }
1072
+ function decodeXmlAttribute(value) {
1073
+ return value.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
1060
1074
  }
1061
1075
  function retainRevisionBoundedBookmarks(documentXml, retained) {
1062
1076
  const starts = /* @__PURE__ */ new Map();
@@ -4813,7 +4827,11 @@ function parseBodyChild(node, sourceXml, relationshipMap, relationships, mediaPa
4813
4827
  switch (localName(child.name)) {
4814
4828
  case "pPr":
4815
4829
  styleId = readParagraphStyleId(child);
4816
- numbering = readParagraphNumbering(child, sourcePartPath);
4830
+ numbering = readParagraphNumbering(
4831
+ child,
4832
+ sourcePartPath,
4833
+ `${sourceXmlPath}/pPr[${countPriorElementSiblingsByName(node, child) + 1}]`
4834
+ );
4817
4835
  alignment = readParagraphAlignment(child);
4818
4836
  spacing = readParagraphSpacing(child);
4819
4837
  contextualSpacing = readOptionalOnOffParagraphProperty(child, "contextualSpacing");
@@ -5896,7 +5914,7 @@ function readParagraphStyleId(node) {
5896
5914
  }
5897
5915
  return void 0;
5898
5916
  }
5899
- function readParagraphNumbering(node, sourcePartPath) {
5917
+ function readParagraphNumbering(node, sourcePartPath, sourceXmlPath) {
5900
5918
  const numberingProperties = node.children.find(
5901
5919
  (child) => child.type === "element" && localName(child.name) === "numPr"
5902
5920
  );
@@ -5916,16 +5934,22 @@ function readParagraphNumbering(node, sourcePartPath) {
5916
5934
  }
5917
5935
  return {
5918
5936
  numberingInstanceId: toCanonicalNumberingInstanceId(rawInstanceId),
5919
- sourceRef: createElementSourceRef(sourcePartPath, "numPr", numberingProperties),
5937
+ sourceRef: createElementSourceRef(
5938
+ sourcePartPath,
5939
+ "numPr",
5940
+ numberingProperties,
5941
+ sourceXmlPath !== void 0 ? `${sourceXmlPath}/numPr[${countPriorElementSiblingsByName(node, numberingProperties) + 1}]` : void 0
5942
+ ),
5920
5943
  level: Number.parseInt(rawLevel, 10)
5921
5944
  };
5922
5945
  }
5923
- function createElementSourceRef(partPath, element, node) {
5946
+ function createElementSourceRef(partPath, element, node, xmlPath) {
5924
5947
  return {
5925
5948
  sourceId: `part:${partPath}#${element}:${node.start}`,
5926
5949
  partPath,
5927
5950
  storyKind: storyKindFromPartPath(partPath),
5928
5951
  element,
5952
+ ...xmlPath !== void 0 ? { xmlPath } : {},
5929
5953
  startOffset: node.start,
5930
5954
  endOffset: node.end
5931
5955
  };
package/dist/legal.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CanonicalDocument, e as DocumentNode } from './canonical-document-CG2TgAzj.cjs';
1
+ import { C as CanonicalDocument, e as DocumentNode } from './canonical-document-CXCFCbAz.cjs';
2
2
 
3
3
  interface LegalBookmark {
4
4
  bookmarkId: string;
package/dist/legal.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CanonicalDocument, e as DocumentNode } from './canonical-document-CG2TgAzj.js';
1
+ import { C as CanonicalDocument, e as DocumentNode } from './canonical-document-CXCFCbAz.js';
2
2
 
3
3
  interface LegalBookmark {
4
4
  bookmarkId: string;
package/dist/legal.js CHANGED
@@ -4,13 +4,13 @@ import {
4
4
  isHiddenBookmarkName,
5
5
  parseBookmarksFromDocumentXml,
6
6
  resolveWalkableRoot
7
- } from "./chunk-NAMAWCXN.js";
7
+ } from "./chunk-YD2JE54B.js";
8
8
  import {
9
9
  extractComplexFieldsFromBodyXml,
10
10
  parseFieldsFromParagraphXml,
11
11
  parseMainDocumentXml
12
- } from "./chunk-A74Y5NE4.js";
13
- import "./chunk-FNWKE74J.js";
12
+ } from "./chunk-4YJVRIUB.js";
13
+ import "./chunk-5DGKFNQT.js";
14
14
  import "./chunk-IHE7YOAY.js";
15
15
  import "./chunk-UTL65BUI.js";
16
16
  import "./chunk-DNXYUIIS.js";
@@ -1,6 +1,6 @@
1
- import { C as CanonicalDocument } from './canonical-document-CG2TgAzj.js';
2
- import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-CNnMHZM9.js';
3
- import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-DjJNaE9c.js';
1
+ import { C as CanonicalDocument } from './canonical-document-CXCFCbAz.js';
2
+ import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-DdcHqcow.js';
3
+ import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-bJAgMq1M.js';
4
4
 
5
5
  interface EditorStatePayloadNamespaceEntry {
6
6
  namespace: EditorStateNamespace;
@@ -1,6 +1,6 @@
1
- import { C as CanonicalDocument } from './canonical-document-CG2TgAzj.cjs';
2
- import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-DajNGKV4.cjs';
3
- import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-CxE1aZiv.cjs';
1
+ import { C as CanonicalDocument } from './canonical-document-CXCFCbAz.cjs';
2
+ import { ar as EditorStateNamespace, as as EditorStateLocation, a as EditorSessionState, P as PersistedEditorSnapshot, r as EditorError, t as ProtectionSnapshot, b as ExportDocxOptions, c as ExportResult, L as LoadStage, E as EditorHostAdapter, at as LoadScheduler, o as EditorSurfaceSnapshot } from './public-types-BP3vqJR5.cjs';
3
+ import { E as EmbeddedDocumentManifest, e as ProgressiveSurfaceProjector } from './types-Bg7D-GD3.cjs';
4
4
 
5
5
  interface EditorStatePayloadNamespaceEntry {
6
6
  namespace: EditorStateNamespace;
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  import * as Y from 'yjs';
4
4
  import * as y_protocols_awareness from 'y-protocols/awareness';
5
5
  import { Awareness } from 'y-protocols/awareness';
6
- import { S as SectionProperties, f as PersistedEditorSnapshotVersion, g as CDS_SCHEMA_VERSION, I as ISO8601DateTime, C as CanonicalDocument, h as CompatibilityReportVersion, i as Base64, M as ModelValidationIssue, j as CommentThread, k as CommentEntry, l as CommentResolution, m as RevisionMetadataRecord$1, n as RevisionRecord$1, p as CanonicalSourceRef, q as SdtDataBindingState, F as FieldFamily$1, r as FieldRefreshStatus$1, T as TocRegion, s as CanonicalAnchor, t as PreserveOnlyObjectSizing, u as TableCellNode, v as TableLook, w as TableStyleFormatting, x as TableWidth, y as TableBorders, z as TableStyleConditionalRegion, A as TableCellBorders, E as CellShading, G as TextMark, H as Mutable, J as ParagraphNode, K as TableIndent, L as TableCellMargins, N as TableNode, B as BlockNode, Q as FieldRegistryEntry, U as FootnoteProperties, V as EndnoteProperties, W as CanonicalTheme, X as InlineNode, Y as CanonicalParagraphFormatting, Z as CanonicalRunFormatting, _ as FillSpec, $ as TextProperties, a0 as StrokeSpec, a1 as ChartModel, a2 as ResolvedTheme, a3 as ColorRef, a4 as SupportedFieldFamily$1, a5 as HeaderDocument, a6 as FooterDocument, a7 as ParagraphBorders } from './canonical-document-CG2TgAzj.js';
6
+ import { S as SectionProperties, f as PersistedEditorSnapshotVersion, g as CDS_SCHEMA_VERSION, I as ISO8601DateTime, C as CanonicalDocument, h as CompatibilityReportVersion, i as Base64, M as ModelValidationIssue, j as CommentThread, k as CommentEntry, l as CommentResolution, m as RevisionMetadataRecord$1, n as RevisionRecord$1, p as CanonicalSourceRef, q as SdtDataBindingState, F as FieldFamily$1, r as FieldRefreshStatus$1, T as TocRegion, s as CanonicalAnchor, t as PreserveOnlyObjectSizing, u as TableCellNode, B as BlockNode, v as TableLook, w as TableStyleFormatting, x as TableWidth, y as TableBorders, z as TableStyleConditionalRegion, A as TableCellBorders, E as CellShading, G as TextMark, H as Mutable, J as ParagraphNode, K as TableIndent, L as TableCellMargins, N as TableNode, Q as FieldRegistryEntry, U as FootnoteProperties, V as EndnoteProperties, W as CanonicalTheme, X as InlineNode, Y as CanonicalParagraphFormatting, Z as CanonicalRunFormatting, _ as FillSpec, $ as TextProperties, a0 as StrokeSpec, a1 as ChartModel, a2 as ResolvedTheme, a3 as ColorRef, a4 as SupportedFieldFamily$1, a5 as HeaderDocument, a6 as FooterDocument, a7 as ParagraphBorders } from './canonical-document-CXCFCbAz.cjs';
7
7
  import * as prosemirror_state from 'prosemirror-state';
8
8
  import { Command } from 'prosemirror-state';
9
9
  import { Schema } from 'prosemirror-model';
@@ -2013,6 +2013,10 @@ interface RuntimeNumberingLayoutFacts {
2013
2013
  sourceBlockPath?: string;
2014
2014
  sourceBlockId?: string;
2015
2015
  paragraphIndex?: number;
2016
+ targetKey?: string;
2017
+ targetKind?: string;
2018
+ canonicalAddressKey?: string;
2019
+ listAddressKey?: string;
2016
2020
  sourceRef?: RuntimeFieldRegionLayoutFacts["sourceRef"];
2017
2021
  numberingSourceRef?: RuntimeFieldRegionLayoutFacts["sourceRef"];
2018
2022
  numberingOrigin?: "paragraph" | "paragraph-style";
@@ -2023,6 +2027,12 @@ interface RuntimeNumberingLayoutFacts {
2023
2027
  numberingInstanceId?: string;
2024
2028
  level?: number;
2025
2029
  format?: string;
2030
+ formatPosture?: {
2031
+ status: "approximated";
2032
+ requestedFormat: string;
2033
+ renderedFormat: "decimal";
2034
+ reason: "unsupported-numbering-format-decimal-fallback" | "numbering-format-range-decimal-fallback";
2035
+ };
2026
2036
  markerText?: string;
2027
2037
  markerSuffix?: "tab" | "space" | "nothing";
2028
2038
  markerJustification?: "left" | "center" | "right" | "both" | "distribute";
@@ -2038,7 +2048,9 @@ interface RuntimeNumberingLayoutFacts {
2038
2048
  hangingTwips?: number;
2039
2049
  };
2040
2050
  tabStops?: readonly RuntimeNumberingTabStopFacts[];
2051
+ unavailableReasons?: readonly RuntimeNumberingUnavailableReason[];
2041
2052
  }
2053
+ type RuntimeNumberingUnavailableReason = "canonical-numbering-input-missing" | "numbering-marker-lane-unavailable" | "numbering-text-column-unavailable";
2042
2054
  interface RuntimeNumberingTabStopFacts {
2043
2055
  positionTwips: number;
2044
2056
  align?: string;
@@ -2198,7 +2210,7 @@ interface RuntimePageAnchor {
2198
2210
  type EditableTargetKind = "paragraph-text" | "sdt-paragraph-text" | "table-cell-paragraph-text" | "nested-table-cell-paragraph-text" | "sdt-table-cell-paragraph-text" | "table-structure-table" | "table-structure-row" | "table-structure-column" | "table-structure-cell" | "table-structure-span" | "secondary-story-paragraph-text" | "textbox-paragraph-text" | "field-result-text" | "field-region-refresh" | "toc-region-refresh" | "hyperlink-text" | "hyperlink-destination" | "bookmark-anchor" | "bookmark-content-range" | "comment-anchor" | "revision-anchor" | "object-anchor" | "custom-xml-content" | "opaque-content";
2199
2211
  type EditableTargetCommandFamily = "text-leaf" | "table-structure" | "field" | "link-bookmark" | "comment-revision" | "object" | "metadata" | "preserve-only-refusal";
2200
2212
  type EditableTargetEditability = "editable" | "non-editable";
2201
- type EditableTargetBlocker = "protected-section" | "protected-range" | "locked-content-control" | "preserve-only" | "opaque-content" | "field-generated-text" | "review-posture" | "synthetic-layout-cell" | "unmodeled-target";
2213
+ type EditableTargetBlocker = "protected-section" | "protected-range" | "locked-content-control" | "preserve-only" | "opaque-content" | "field-generated-text" | "review-posture" | "synthetic-layout-cell" | "unmodeled-target" | "list-text-readback-missing" | "list-structure-command-missing" | "list-target-stale" | "list-secondary-story-unsupported" | "list-table-target-missing" | "list-export-persistence-missing" | "numbering-format-unsupported" | "picture-bullet-preserve-only" | "marker-geometry-unavailable";
2202
2214
  interface EditableTargetPosture {
2203
2215
  readonly blockers: readonly EditableTargetBlocker[];
2204
2216
  readonly protected?: boolean;
@@ -2402,10 +2414,54 @@ interface EditableTargetRef {
2402
2414
  readonly table?: EditableTargetTableIdentity;
2403
2415
  readonly editableOwner?: EditableTargetOwnerIdentity;
2404
2416
  readonly canonicalAddress?: EditableTargetCanonicalAddress;
2417
+ /**
2418
+ * List-specific address for numbered/bulleted paragraph text. Table-cell
2419
+ * list items keep their primary `canonicalAddress` as the table text target
2420
+ * for existing table commands; this additive address lets list consumers use
2421
+ * the same paragraph without narrowing it to table-only authority.
2422
+ */
2423
+ readonly listAddress?: EditableTargetCanonicalAddress;
2405
2424
  readonly staleCheck: EditableTargetStaleCheck;
2406
2425
  readonly posture: EditableTargetPosture;
2407
2426
  }
2408
2427
  type CanonicalAnchorObjectKind = "legacy-image" | "picture" | "shape" | "textbox" | "chart" | "smartart" | "opaque";
2428
+ /**
2429
+ * Per-block cache for {@link collectEditableTargetRefs}.
2430
+ *
2431
+ * Each cache entry holds the editable targets produced for one canonical
2432
+ * block (paragraph, table, sdt, etc.) under a specific collection context.
2433
+ * Cache hits short-circuit the per-block walk on subsequent calls when the
2434
+ * block reference is unchanged AND the surrounding context (story key,
2435
+ * blockPath position, table identity, content-control posture) is
2436
+ * identical.
2437
+ *
2438
+ * The intended consumer is the document runtime: instantiate one cache per
2439
+ * runtime instance and reuse it across `getCachedSurface` calls so the
2440
+ * editable-target walk does not run on every keystroke. Block references
2441
+ * are preserved across text-only edits for unchanged paragraphs/tables, so
2442
+ * the cache hit-rate approaches 100 % minus the directly edited block.
2443
+ *
2444
+ * The cache is safe across both text-only and structural edits:
2445
+ * - Text-only edits replace the affected block's reference, naturally
2446
+ * missing the cache for that block while leaving siblings cached.
2447
+ * - Structural edits (paragraph splits, table merges) replace blocks
2448
+ * and shift `blockPath` indices; the entry's recorded `blockPath` is
2449
+ * compared against the live walk's `blockPath` so a stale entry whose
2450
+ * block survived but moved is rejected and recomputed.
2451
+ *
2452
+ * The cache uses {@link WeakMap} so dropped block references are
2453
+ * collected automatically; callers do not need to invalidate entries
2454
+ * manually.
2455
+ */
2456
+ interface EditableTargetBlockCache {
2457
+ get(block: BlockNode): EditableTargetBlockCacheEntry | undefined;
2458
+ set(block: BlockNode, entry: EditableTargetBlockCacheEntry): void;
2459
+ }
2460
+ interface EditableTargetBlockCacheEntry {
2461
+ readonly blockPath: string;
2462
+ readonly signature: string;
2463
+ readonly targets: readonly EditableTargetRef[];
2464
+ }
2409
2465
 
2410
2466
  /**
2411
2467
  * Layer 02 · runtime page-graph types.
@@ -4341,6 +4397,12 @@ interface GeometryHitTarget {
4341
4397
  lineIndex: number;
4342
4398
  rect: GeometryRect$1;
4343
4399
  precision: GeometryPrecision;
4400
+ generatedContentKind?: "numbering-marker";
4401
+ generatedContentBoundary?: {
4402
+ policy: "snap-to-authored-text";
4403
+ authoredTextStartsAtPx?: number;
4404
+ selectionPolicy: "exclude-generated-marker";
4405
+ };
4344
4406
  }
4345
4407
  type SemanticDisplayEntryKind = "text-line" | "editable-target" | "field-region" | "page-local-field-ledger" | "numbering-marker" | "table-frame" | "table-row" | "table-column" | "table-cell" | "toc-leader" | "toc-page-label" | "field-result" | "inline-object" | "floating-object" | "placeholder" | "background" | "border" | "debug-classification";
4346
4408
  interface GeometryTableRowRange {
@@ -4374,6 +4436,20 @@ interface GeometryProjectionWarning {
4374
4436
  message: string;
4375
4437
  }
4376
4438
  type GeometryEditableTargetUnavailableReason = "editable-target-block-geometry-missing" | "editable-target-table-geometry-missing" | "editable-target-command-geometry-missing" | "editable-target-page-geometry-unavailable";
4439
+ type GeometryNumberingUnavailableReason = "canonical-numbering-input-missing" | "numbering-marker-lane-unavailable" | "numbering-text-column-unavailable";
4440
+ interface GeometryNumberingFormatPosture {
4441
+ status: "approximated";
4442
+ requestedFormat: string;
4443
+ renderedFormat: "decimal";
4444
+ reason: "unsupported-numbering-format-decimal-fallback" | "numbering-format-range-decimal-fallback";
4445
+ }
4446
+ interface GeometryNumberingMarkerBoundary {
4447
+ generatedContent: "numbering-marker";
4448
+ caretPolicy: "snap-to-authored-text";
4449
+ selectionPolicy: "exclude-marker-unless-list-item-action";
4450
+ coordinateSpace: "frame-px";
4451
+ authoredTextStartsAtPx?: number;
4452
+ }
4377
4453
  interface SemanticDisplayEntry {
4378
4454
  entryId: string;
4379
4455
  kind: SemanticDisplayEntryKind;
@@ -4417,6 +4493,21 @@ interface SemanticDisplayEntry {
4417
4493
  editableTargetOwnerReason?: string;
4418
4494
  editableTargetOwnerCanonicalAddress?: EditableTargetOwnerAddressRouting;
4419
4495
  editableTargetUnavailableReason?: GeometryEditableTargetUnavailableReason;
4496
+ numberingLayoutId?: string;
4497
+ numberingKey?: string;
4498
+ numberingTargetKey?: string;
4499
+ numberingTargetKind?: string;
4500
+ numberingCanonicalAddressKey?: string;
4501
+ numberingListAddressKey?: string;
4502
+ numberingMarkerText?: string;
4503
+ numberingMarkerSuffix?: "tab" | "space" | "nothing";
4504
+ numberingFormat?: string;
4505
+ numberingFormatPosture?: GeometryNumberingFormatPosture;
4506
+ numberingUnavailableReasons?: readonly GeometryNumberingUnavailableReason[];
4507
+ markerGlyphRect?: GeometryRect$1;
4508
+ markerLaneRect?: GeometryRect$1;
4509
+ textColumnRect?: GeometryRect$1;
4510
+ markerBoundary?: GeometryNumberingMarkerBoundary;
4420
4511
  rect: GeometryRect$1;
4421
4512
  status: GeometryRehydrationStatus;
4422
4513
  precision: GeometryPrecision;
@@ -4489,6 +4580,9 @@ interface HitTestResult$1 {
4489
4580
  * available; missing anchor metadata leaves it undefined.
4490
4581
  */
4491
4582
  assoc?: "before" | "after";
4583
+ generatedContentKind?: "numbering-marker";
4584
+ generatedContentBoundary?: "snap-to-authored-text";
4585
+ semanticEntryId?: string;
4492
4586
  }
4493
4587
  type AnchorQueryKind = "runtime-offset" | "block-id" | "fragment-id" | "scope-id" | "comment-id" | "revision-id" | "page-index";
4494
4588
  interface AnchorQuery {
@@ -5737,24 +5831,29 @@ type EditorCommand = {
5737
5831
  } | {
5738
5832
  type: "list.toggle";
5739
5833
  kind: "bulleted" | "numbered";
5740
- paragraphIndexes: readonly number[];
5834
+ paragraphIndexes?: readonly number[];
5835
+ editableTargets?: readonly EditableTargetRef[];
5741
5836
  origin?: CommandOrigin;
5742
5837
  } | {
5743
5838
  type: "list.indent";
5744
- paragraphIndexes: readonly number[];
5839
+ paragraphIndexes?: readonly number[];
5840
+ editableTargets?: readonly EditableTargetRef[];
5745
5841
  origin?: CommandOrigin;
5746
5842
  } | {
5747
5843
  type: "list.outdent";
5748
- paragraphIndexes: readonly number[];
5844
+ paragraphIndexes?: readonly number[];
5845
+ editableTargets?: readonly EditableTargetRef[];
5749
5846
  origin?: CommandOrigin;
5750
5847
  } | {
5751
5848
  type: "list.restart-numbering";
5752
- paragraphIndex: number;
5849
+ paragraphIndex?: number;
5850
+ editableTarget?: EditableTargetRef | null;
5753
5851
  startAt?: number;
5754
5852
  origin?: CommandOrigin;
5755
5853
  } | {
5756
5854
  type: "list.continue-numbering";
5757
- paragraphIndex: number;
5855
+ paragraphIndex?: number;
5856
+ editableTarget?: EditableTargetRef | null;
5758
5857
  origin?: CommandOrigin;
5759
5858
  } | {
5760
5859
  type: "table.apply-structure";
@@ -5883,6 +5982,8 @@ interface CommandExecutionContext {
5883
5982
  */
5884
5983
  renderSnapshot?: RuntimeRenderSnapshot;
5885
5984
  activeStorySize?: number;
5985
+ activeStoryKey?: string;
5986
+ editableTargetCache?: EditableTargetBlockCache;
5886
5987
  textTarget?: TextTransactionTextTarget;
5887
5988
  rejectTargetlessTableStructureInsert?: boolean;
5888
5989
  }
@@ -6950,6 +7051,21 @@ interface RuntimeOperationStep {
6950
7051
  readonly kind: RuntimeOperationStepKind;
6951
7052
  /** Human-readable one-line description; used in audit `compiledOperations`. */
6952
7053
  readonly summary: string;
7054
+ /**
7055
+ * Optional command-surface target hint. Semantic ranges identify intent, but
7056
+ * text mutation must still resolve against the runtime's current editable
7057
+ * target graph before dispatch so table/SDT/nested structure offsets cannot
7058
+ * masquerade as paragraph text positions.
7059
+ */
7060
+ readonly editableTargetHint?: {
7061
+ readonly kind: "text-leaf";
7062
+ readonly storyKey: string;
7063
+ readonly blockPath: string;
7064
+ readonly semanticBlockRange: {
7065
+ readonly from: number;
7066
+ readonly to: number;
7067
+ };
7068
+ };
6953
7069
  /**
6954
7070
  * Document-coordinate range the step operates on. Absent for steps
6955
7071
  * that target the scope as a whole.
@@ -8125,6 +8241,17 @@ interface CreateDocumentRuntimeOptions {
8125
8241
  * See CLAUDE.md (lane status table) §Phase 2.5 §3.7.
8126
8242
  */
8127
8243
  seedLayoutCache?: RuntimePageGraph;
8244
+ /**
8245
+ * Mounted-shell cold-load guard. When provided, only the first editor
8246
+ * surface facet is projected with these realized block ranges. This is a
8247
+ * presentation residency hint, not layout truth: L04 page graph reads must
8248
+ * continue to start from their normal full/lazy layout query state.
8249
+ * Headless callers omit this to preserve full-surface semantics.
8250
+ */
8251
+ initialSurfaceViewportBlockRanges?: readonly {
8252
+ start: number;
8253
+ end: number;
8254
+ }[];
8128
8255
  }
8129
8256
  declare function createDocumentRuntime(options: CreateDocumentRuntimeOptions): DocumentRuntime;
8130
8257
  /**
@@ -8596,7 +8723,7 @@ interface RuntimeWordFieldMatrixProvider {
8596
8723
  * `runtime.collab.*` family graduate its live path when hosts supply it
8597
8724
  * and fall back to deterministic mocks when they don't.
8598
8725
  */
8599
- type RuntimeApiHandle = Pick<DocumentRuntime, "now" | "getSessionState" | "setDocumentMode" | "exportDocx" | "getCompatibilityReport" | "getWarnings" | "getRenderSnapshot" | "getDocumentNavigationSnapshot" | "getCanonicalDocument" | "findAllText" | "replaceText" | "applyFormattingOperation" | "getReviewWorkSnapshot" | "getSuggestionsSnapshot" | "acceptChange" | "rejectChange" | "resolveComment" | "getCommentThreadForChange" | "ensureCommentThreadForChange" | "addReplyToChange" | "queryScopes" | "getWorkflowMarkupSnapshot" | "getInteractionGuardSnapshot" | "getWorkflowOverlay" | "addScope" | "setScopeGuardPolicy" | "getScopeGuardPolicy" | "setWorkflowMetadataEntries" | "getWorkflowMetadataSnapshot" | "getVisibilityPolicy" | "getVisibilityPolicies" | "setVisibilityPolicy" | "clearVisibilityPolicy" | "subscribeVisibilityPolicy" | "getMarkupModePolicy" | "setMarkupModePolicy" | "subscribeMarkupModePolicy" | "getScope" | "getLocationForAnchor" | "compileScopeBundleById" | "compileScopeList" | "compileScopeCardById" | "compileScopeRailSnapshot" | "applyScopeReplacement" | "applyScopeFormatting" | "dispatch" | "debug" | "layout" | "geometry"> & {
8726
+ type RuntimeApiHandle = Pick<DocumentRuntime, "now" | "getSessionState" | "setDocumentMode" | "exportDocx" | "getCompatibilityReport" | "getWarnings" | "getRenderSnapshot" | "getDocumentNavigationSnapshot" | "getCanonicalDocument" | "findAllText" | "replaceText" | "applyActiveStoryTextCommand" | "applyFormattingOperation" | "getReviewWorkSnapshot" | "getSuggestionsSnapshot" | "acceptChange" | "rejectChange" | "resolveComment" | "getCommentThreadForChange" | "ensureCommentThreadForChange" | "addReplyToChange" | "queryScopes" | "getWorkflowMarkupSnapshot" | "getInteractionGuardSnapshot" | "getWorkflowOverlay" | "addScope" | "setScopeGuardPolicy" | "getScopeGuardPolicy" | "setWorkflowMetadataEntries" | "getWorkflowMetadataSnapshot" | "getVisibilityPolicy" | "getVisibilityPolicies" | "setVisibilityPolicy" | "clearVisibilityPolicy" | "subscribeVisibilityPolicy" | "getMarkupModePolicy" | "setMarkupModePolicy" | "subscribeMarkupModePolicy" | "getScope" | "getLocationForAnchor" | "compileScopeBundleById" | "compileScopeList" | "compileScopeCardById" | "compileScopeRailSnapshot" | "applyScopeReplacement" | "applyScopeFormatting" | "dispatch" | "debug" | "layout" | "geometry"> & {
8600
8727
  /**
8601
8728
  * Optional collab session — hosts that wire Yjs/Awareness pass the
8602
8729
  * session here so `api.runtime.collab.getPresence` / `.getPosture`
@@ -11400,7 +11527,7 @@ type AiActionsTargetInput = {
11400
11527
  readonly tableTextScopeLimit?: number;
11401
11528
  };
11402
11529
  interface AiActionsMatch {
11403
- readonly kind: SemanticScopeKind | "table-text";
11530
+ readonly kind: SemanticScopeKind | "table-text" | "hyperlink-text";
11404
11531
  readonly text: string;
11405
11532
  readonly excerpt: string;
11406
11533
  readonly handle?: ScopeHandle;
@@ -11439,7 +11566,7 @@ interface DiscoverActionsResult {
11439
11566
  readonly blockerDetails?: readonly AiActionsBlockerDetail[];
11440
11567
  }
11441
11568
  interface AiActionsTargetSummary {
11442
- readonly kind: SemanticScopeKind | "table-text";
11569
+ readonly kind: SemanticScopeKind | "table-text" | "hyperlink-text";
11443
11570
  readonly handle?: ScopeHandle;
11444
11571
  readonly actionHandle?: string;
11445
11572
  readonly readback?: AiTableTextReadback;
@@ -11458,6 +11585,12 @@ interface RewriteActionsInput {
11458
11585
  readonly origin?: "ui" | "agent" | "host";
11459
11586
  readonly proposalId?: string;
11460
11587
  }
11588
+ interface HyperlinkTextEditActionsInput {
11589
+ readonly target: AiActionsExactTargetInput;
11590
+ readonly text: string;
11591
+ readonly actorId?: string;
11592
+ readonly origin?: "ui" | "agent" | "host";
11593
+ }
11461
11594
  interface RewriteAllActionsInput extends Omit<RewriteActionsInput, "target"> {
11462
11595
  readonly query: string;
11463
11596
  readonly kind?: SemanticScopeKind;
@@ -11648,6 +11781,12 @@ type RunPlanActionsStep = (RunPlanStepBase & {
11648
11781
  readonly href: string;
11649
11782
  readonly actorId?: string;
11650
11783
  readonly origin?: "ui" | "agent" | "host";
11784
+ }) | (RunPlanStepBase & {
11785
+ readonly kind: "hyperlinkTextEdit";
11786
+ readonly target: AiActionsExactTargetInput;
11787
+ readonly text: string;
11788
+ readonly actorId?: string;
11789
+ readonly origin?: "ui" | "agent" | "host";
11651
11790
  }) | (RunPlanStepBase & {
11652
11791
  readonly kind: "listOperation";
11653
11792
  readonly target: AiActionsExactTargetInput;
@@ -11703,7 +11842,7 @@ interface ApplyActionsResult {
11703
11842
  readonly results?: readonly ApplyActionsResult[];
11704
11843
  }
11705
11844
  interface AiActionsCommandReference {
11706
- readonly command: NonNullable<ApplyTableActionResult["commandReference"]>["command"] | "field.refresh" | "toc.refresh" | "bookmark.edit-content" | "hyperlink.update-destination" | "list.toggle" | "list.indent" | "list.outdent" | "list.restart-numbering" | "list.continue-numbering";
11845
+ readonly command: NonNullable<ApplyTableActionResult["commandReference"]>["command"] | "field.refresh" | "toc.refresh" | "bookmark.edit-content" | "hyperlink.update-destination" | "text.insert" | "list.toggle" | "list.indent" | "list.outdent" | "list.restart-numbering" | "list.continue-numbering";
11707
11846
  readonly actorId: string;
11708
11847
  readonly origin: "ui" | "agent" | "host";
11709
11848
  readonly emittedAtUtc: string;
@@ -11765,6 +11904,7 @@ declare function createActionsFamily(runtime: RuntimeApiHandle): {
11765
11904
  tocRefresh(input: TocRefreshActionsInput): ApplyActionsResult;
11766
11905
  bookmarkEdit(input: BookmarkEditActionsInput): ApplyActionsResult;
11767
11906
  hyperlinkDestinationEdit(input: HyperlinkDestinationEditActionsInput): ApplyActionsResult;
11907
+ hyperlinkTextEdit(input: HyperlinkTextEditActionsInput): ApplyActionsResult;
11768
11908
  listOperation(input: ListOperationActionsInput): ApplyActionsResult;
11769
11909
  tableFragment(input: TableFragmentActionsInput): ApplyActionsResult;
11770
11910
  tableSelection(input: TableSelectionActionsInput): ApplyActionsResult;
@@ -14155,6 +14295,12 @@ interface ResolvedNumberingGeometrySnapshot {
14155
14295
  interface ResolvedNumberingSnapshot {
14156
14296
  level: number;
14157
14297
  format: string;
14298
+ formatPosture?: {
14299
+ status: "approximated";
14300
+ requestedFormat: string;
14301
+ renderedFormat: "decimal";
14302
+ reason: "unsupported-numbering-format-decimal-fallback" | "numbering-format-range-decimal-fallback";
14303
+ };
14158
14304
  text?: string;
14159
14305
  startAt: number;
14160
14306
  paragraphStyleId?: string;