@beyondwork/docx-react-component 1.0.122 → 1.0.123

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 (102) hide show
  1. package/dist/api/public-types.cjs +318 -32
  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 +349 -62
  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-ByIqTd4s.d.cts → canonical-document-CG2TgAzj.d.cts} +1 -1
  10. package/dist/{canonical-document-ByIqTd4s.d.ts → canonical-document-CG2TgAzj.d.ts} +1 -1
  11. package/dist/{chunk-B4YHWFE3.js → chunk-32ZAOQ54.js} +1 -1
  12. package/dist/{chunk-QNGJRZ2D.js → chunk-4IPEZYQX.js} +1 -1
  13. package/dist/{chunk-3OFSP2IX.js → chunk-BOHHIVQ2.js} +3 -3
  14. package/dist/{chunk-EMDH4IQN.js → chunk-E5IBDE5E.js} +4 -3
  15. package/dist/{chunk-TFSXOIAI.js → chunk-FNWKE74J.js} +43 -3
  16. package/dist/{chunk-IT2DK3A7.js → chunk-H2YQKA55.js} +9 -7
  17. package/dist/{chunk-3TUQCHYT.js → chunk-H6IL5ABU.js} +47 -7
  18. package/dist/{chunk-GON2DNTE.js → chunk-HXHQA4BU.js} +1 -1
  19. package/dist/{chunk-3OHVK2D6.js → chunk-IR7QV2BX.js} +17 -1
  20. package/dist/{chunk-ZKSDVHGH.js → chunk-KOHQFZMM.js} +1 -1
  21. package/dist/{chunk-XVFENXLK.js → chunk-LGWNN3L2.js} +2 -2
  22. package/dist/{chunk-TMU7JMXX.js → chunk-MB7RJBSN.js} +9 -21
  23. package/dist/{chunk-UWDWGQH5.js → chunk-ML4A4WUN.js} +1 -1
  24. package/dist/{chunk-GZW2ERUO.js → chunk-N4VIXI2Z.js} +3 -3
  25. package/dist/{chunk-S4ANOS2M.js → chunk-NNPVA5VL.js} +2 -2
  26. package/dist/{chunk-QFU7ZOAD.js → chunk-PFYUJU3Q.js} +176 -36
  27. package/dist/{chunk-37SEJQ3G.js → chunk-RSYN6FTS.js} +2 -2
  28. package/dist/{chunk-OBCP6VTG.js → chunk-RWERZWHR.js} +1 -1
  29. package/dist/{chunk-UHQOUTAX.js → chunk-SGSJ4DQA.js} +377 -50
  30. package/dist/{chunk-PCXTMEGY.js → chunk-UHJLCPLU.js} +24 -14
  31. package/dist/{chunk-G3B2OBCZ.js → chunk-ZRHLLPSJ.js} +271 -26
  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 +50 -9
  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 +50 -9
  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 -9
  49. package/dist/core/commands/text-commands.d.cts +3 -2
  50. package/dist/core/commands/text-commands.d.ts +3 -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 +1196 -197
  57. package/dist/index.d.cts +5 -5
  58. package/dist/index.d.ts +5 -5
  59. package/dist/index.js +278 -85
  60. package/dist/io/docx-session.cjs +10 -21
  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 +8 -20
  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-BF8ju_LK.d.ts → loader-D9KCtj4m.d.cts} +4 -22
  69. package/dist/{loader-g54WRvj1.d.cts → loader-D9y4ZRjj.d.ts} +4 -22
  70. package/dist/{public-types-Dl1jiWjk.d.ts → public-types-CNnMHZM9.d.ts} +263 -213
  71. package/dist/{public-types-D_y4Ptcj.d.cts → public-types-DajNGKV4.d.cts} +263 -213
  72. package/dist/public-types.cjs +318 -32
  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 +752 -77
  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-C1EPAkcI.d.ts → session-DEmaOEjA.d.ts} +3 -3
  83. package/dist/{session-D15QOO0Q.d.cts → session-DyQGlryH.d.cts} +3 -3
  84. package/dist/session.cjs +12 -618
  85. package/dist/session.d.cts +5 -5
  86. package/dist/session.d.ts +5 -5
  87. package/dist/session.js +7 -9
  88. package/dist/tailwind.cjs +489 -63
  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-BoSRp2Vg.d.cts → types-CxE1aZiv.d.cts} +2 -2
  93. package/dist/{types-DEvRwq9C.d.ts → types-DjJNaE9c.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/theme/tokens.css +387 -0
  98. package/dist/ui-tailwind.cjs +489 -63
  99. package/dist/ui-tailwind.d.cts +3 -3
  100. package/dist/ui-tailwind.d.ts +3 -3
  101. package/dist/ui-tailwind.js +7 -7
  102. package/package.json +7 -3
@@ -2578,12 +2578,13 @@ function buildBlockCacheSignature(context, blockIndex) {
2578
2578
  owner?.targetKey ?? ""
2579
2579
  ].join("|");
2580
2580
  }
2581
- function collectEditableTargetsInBlocks(blocks, context, targets, cache) {
2581
+ function collectEditableTargetsInBlocks(blocks, context, targets, cache, blockIndexOffset = 0) {
2582
2582
  for (let blockIndex = 0; blockIndex < blocks.length; blockIndex += 1) {
2583
2583
  const block = blocks[blockIndex];
2584
2584
  if (!block) continue;
2585
- const blockPath = `${context.basePath}/block[${blockIndex}]`;
2586
- const signature = cache !== void 0 ? buildBlockCacheSignature(context, blockIndex) : "";
2585
+ const absoluteBlockIndex = blockIndex + blockIndexOffset;
2586
+ const blockPath = `${context.basePath}/block[${absoluteBlockIndex}]`;
2587
+ const signature = cache !== void 0 ? buildBlockCacheSignature(context, absoluteBlockIndex) : "";
2587
2588
  if (cache !== void 0) {
2588
2589
  const cached = cache.get(block);
2589
2590
  if (cached !== void 0 && cached.blockPath === blockPath && cached.signature === signature) {
@@ -7452,6 +7453,8 @@ function createSurfaceBlock(block, document2, cursor, counters, formattingContex
7452
7453
  formattingContext,
7453
7454
  promoteSecondaryStoryTextBoxes,
7454
7455
  cullBuild,
7456
+ editableTargetsByBlockPath,
7457
+ blockPath,
7455
7458
  blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0
7456
7459
  );
7457
7460
  }
@@ -7858,7 +7861,7 @@ function getRecursableSdtBlockedReasonCode(block) {
7858
7861
  ].filter(Boolean).join(" ").toLowerCase();
7859
7862
  return searchText.includes("table of contents") || /\btoc\b/u.test(searchText) ? "workflow_preserve_only" : null;
7860
7863
  }
7861
- function createParagraphBlock(paragraphIndex, paragraph, document2, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTarget) {
7864
+ function createParagraphBlock(paragraphIndex, paragraph, document2, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath, editableTarget) {
7862
7865
  const themeResolver = formattingContext.theme;
7863
7866
  const effectiveNumbering = formattingContext.resolveEffectiveParagraphNumbering(paragraph);
7864
7867
  let resolvedNumbering = null;
@@ -7923,6 +7926,8 @@ function createParagraphBlock(paragraphIndex, paragraph, document2, start, forma
7923
7926
  document2,
7924
7927
  cursor,
7925
7928
  promoteSecondaryStoryTextBoxes,
7929
+ blockPath !== void 0 ? `${blockPath}/inline[${childIndex}]` : void 0,
7930
+ editableTargetsByBlockPath,
7926
7931
  void 0,
7927
7932
  cullBuild,
7928
7933
  themeResolver,
@@ -7979,7 +7984,7 @@ function isVisibleTocResultInline(node) {
7979
7984
  return false;
7980
7985
  }
7981
7986
  }
7982
- function appendInlineSegments(paragraph, node, document2, start, promoteSecondaryStoryTextBoxes, hyperlinkHref, cullBuild = false, themeResolver, formattingContext) {
7987
+ function appendInlineSegments(paragraph, node, document2, start, promoteSecondaryStoryTextBoxes, inlinePath, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, hyperlinkHref, cullBuild = false, themeResolver, formattingContext) {
7983
7988
  switch (node.type) {
7984
7989
  case "text": {
7985
7990
  const cloned = node.marks ? cloneMarks2(node.marks) : { marks: [] };
@@ -8032,13 +8037,16 @@ function appendInlineSegments(paragraph, node, document2, start, promoteSecondar
8032
8037
  return { nextCursor: start + 1, lockedFragmentIds: [] };
8033
8038
  case "hyperlink": {
8034
8039
  let cursor = start;
8035
- for (const child of node.children) {
8040
+ for (let childIndex = 0; childIndex < node.children.length; childIndex += 1) {
8041
+ const child = node.children[childIndex];
8036
8042
  const result = appendInlineSegments(
8037
8043
  paragraph,
8038
8044
  child,
8039
8045
  document2,
8040
8046
  cursor,
8041
8047
  promoteSecondaryStoryTextBoxes,
8048
+ inlinePath !== void 0 ? `${inlinePath}/child[${childIndex}]` : void 0,
8049
+ editableTargetsByBlockPath,
8042
8050
  node.href,
8043
8051
  cullBuild,
8044
8052
  themeResolver,
@@ -8097,6 +8105,33 @@ function appendInlineSegments(paragraph, node, document2, start, promoteSecondar
8097
8105
  if (isMicrosoftSensitivityLabelShape(node)) {
8098
8106
  return { nextCursor: start + 1, lockedFragmentIds: [] };
8099
8107
  }
8108
+ if (node.isTextBox && node.txbxBlocks !== void 0) {
8109
+ const txbxTextSegment = extractTxbxFirstTextSegment(node.txbxBlocks);
8110
+ const txbxText = txbxTextSegment?.text ?? node.text;
8111
+ const txbxBody = surfaceTextBoxBodyFromShape(
8112
+ node,
8113
+ void 0,
8114
+ inlinePath,
8115
+ editableTargetsByBlockPath
8116
+ );
8117
+ paragraph.segments.push({
8118
+ segmentId: `${paragraph.blockId}-segment-${paragraph.segments.length}`,
8119
+ kind: "shape",
8120
+ from: start,
8121
+ to: start + 1,
8122
+ label: "Text box",
8123
+ detail: createShapeDetail(node),
8124
+ ...node.geometry !== void 0 ? { geometry: node.geometry } : {},
8125
+ isTextBox: true,
8126
+ ...node.textBoxBody ? { textBoxBody: node.textBoxBody } : {},
8127
+ ...node.preserveOnlyObject ? { preserveOnlyObject: surfacePreserveOnlyObject(node.preserveOnlyObject) } : {},
8128
+ ...txbxText ? { txbxText } : {},
8129
+ ...txbxBody ? { txbxBody } : {},
8130
+ ...txbxTextSegment?.marks && txbxTextSegment.marks.length > 0 ? { txbxMarks: txbxTextSegment.marks } : {},
8131
+ ...txbxTextSegment?.markAttrs ? { txbxMarkAttrs: txbxTextSegment.markAttrs } : {}
8132
+ });
8133
+ return { nextCursor: start + 1, lockedFragmentIds: [] };
8134
+ }
8100
8135
  if (promoteSecondaryStoryTextBoxes && node.isTextBox && node.text) {
8101
8136
  return appendTextBoxSegment(
8102
8137
  paragraph,
@@ -8156,7 +8191,7 @@ function appendInlineSegments(paragraph, node, document2, start, promoteSecondar
8156
8191
  const anchor = surfaceAnchorFromGeometry(node.anchor);
8157
8192
  const txbxTextSegment = c.isTextBox ? extractTxbxFirstTextSegment(c.txbxBlocks) : void 0;
8158
8193
  const txbxText = txbxTextSegment?.text ?? (c.isTextBox ? c.text : void 0);
8159
- const txbxBody = c.isTextBox ? surfaceTextBoxBodyFromShape(c, node.sourceRef) : void 0;
8194
+ const txbxBody = c.isTextBox ? surfaceTextBoxBodyFromShape(c, node.sourceRef, inlinePath, editableTargetsByBlockPath) : void 0;
8160
8195
  const surfaceFill = c.fill;
8161
8196
  paragraph.segments.push({
8162
8197
  segmentId: `${paragraph.blockId}-segment-${paragraph.segments.length}`,
@@ -8333,13 +8368,16 @@ function appendInlineSegments(paragraph, node, document2, start, promoteSecondar
8333
8368
  const refHyperlinkHref = (node.fieldFamily === "REF" || node.fieldFamily === "PAGEREF" || node.fieldFamily === "NOTEREF") && node.switches?.hyperlink === true && node.fieldTarget ? `#${node.fieldTarget}` : void 0;
8334
8369
  let cursor = start;
8335
8370
  const lockedIds = [];
8336
- for (const child of node.children) {
8371
+ for (let childIndex = 0; childIndex < node.children.length; childIndex += 1) {
8372
+ const child = node.children[childIndex];
8337
8373
  const result = appendInlineSegments(
8338
8374
  paragraph,
8339
8375
  child,
8340
8376
  document2,
8341
8377
  cursor,
8342
8378
  promoteSecondaryStoryTextBoxes,
8379
+ inlinePath !== void 0 ? `${inlinePath}/child[${childIndex}]` : void 0,
8380
+ editableTargetsByBlockPath,
8343
8381
  refHyperlinkHref ?? hyperlinkHref,
8344
8382
  cullBuild,
8345
8383
  themeResolver,
@@ -8586,7 +8624,7 @@ function extractTxbxFirstTextSegment(blocks) {
8586
8624
  }
8587
8625
  return void 0;
8588
8626
  }
8589
- function surfaceTextBoxBodyFromShape(shape, sourceRef) {
8627
+ function surfaceTextBoxBodyFromShape(shape, sourceRef, inlinePath, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH) {
8590
8628
  if (!shape.isTextBox && shape.txbxContentXml === void 0 && shape.txbxBlocks === void 0) {
8591
8629
  return void 0;
8592
8630
  }
@@ -8612,9 +8650,12 @@ function surfaceTextBoxBodyFromShape(shape, sourceRef) {
8612
8650
  (run, inlineIndex) => surfaceTextBoxRunFromLegacyRun(run, inlineIndex)
8613
8651
  ) ?? [];
8614
8652
  const text = runs.map((run) => run.text ?? "").join("");
8653
+ const blockPath = inlinePath !== void 0 ? `${inlinePath}/txbx/block[${blockIndex}]` : void 0;
8654
+ const editableTarget = blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0;
8615
8655
  return [{
8616
8656
  ...block.sourceRef !== void 0 ? { sourceRef: block.sourceRef } : {},
8617
8657
  blockIndex,
8658
+ ...editableTarget !== void 0 ? { editableTarget } : {},
8618
8659
  text,
8619
8660
  textLength: Array.from(text).length,
8620
8661
  ...block.borders !== void 0 ? { borders: block.borders } : {},
@@ -11882,6 +11923,7 @@ function buildPageGraph(inputOrPages, sectionsArg, storiesArg) {
11882
11923
  regions,
11883
11924
  divergences: frameDivergences,
11884
11925
  subParts: input.subParts,
11926
+ anchors: input.anchors,
11885
11927
  pageFieldCounts
11886
11928
  });
11887
11929
  const divergences = builtFrame.divergences;
@@ -12048,6 +12090,7 @@ function buildPageFrame(input) {
12048
12090
  stories: input.stories,
12049
12091
  regions,
12050
12092
  subParts: input.subParts,
12093
+ anchors: input.anchors,
12051
12094
  pageFieldCounts: input.pageFieldCounts
12052
12095
  });
12053
12096
  const divergences = [...input.divergences, ...pageLocalStoryResult.divergences];
@@ -12085,6 +12128,7 @@ function buildPageLocalStoryInstances(input) {
12085
12128
  input.stories.header,
12086
12129
  input.regions.header,
12087
12130
  findHeaderFooterPart(input.subParts?.headers, input.stories.header),
12131
+ input.anchors,
12088
12132
  input.pageFieldCounts
12089
12133
  );
12090
12134
  instances.push(built.instance);
@@ -12101,6 +12145,7 @@ function buildPageLocalStoryInstances(input) {
12101
12145
  input.stories.footer,
12102
12146
  input.regions.footer,
12103
12147
  findHeaderFooterPart(input.subParts?.footers, input.stories.footer),
12148
+ input.anchors,
12104
12149
  input.pageFieldCounts
12105
12150
  );
12106
12151
  instances.push(built.instance);
@@ -12108,7 +12153,7 @@ function buildPageLocalStoryInstances(input) {
12108
12153
  }
12109
12154
  return { instances, divergences };
12110
12155
  }
12111
- function buildPageLocalStoryInstance(frameId, pageId, pageIndex, sectionIndex, displayPageNumber, layout, target, region, source, pageFieldCounts) {
12156
+ function buildPageLocalStoryInstance(frameId, pageId, pageIndex, sectionIndex, displayPageNumber, layout, target, region, source, anchors, pageFieldCounts) {
12112
12157
  const measuredFrameHeightTwips = region?.heightTwips ?? 0;
12113
12158
  const sectionPart = target.sectionIndex === void 0 ? "section-unknown" : `section-${target.sectionIndex}`;
12114
12159
  const instanceId = `${frameId}:${target.kind}:${target.variant}:${target.relationshipId}`;
@@ -12129,7 +12174,9 @@ function buildPageLocalStoryInstance(frameId, pageId, pageIndex, sectionIndex, d
12129
12174
  kind: target.kind,
12130
12175
  variant: target.variant,
12131
12176
  relationshipId: target.relationshipId,
12132
- region
12177
+ region,
12178
+ storyBasePath: `${target.kind}:${source.partPath ?? `word/${target.kind}${target.relationshipId}.xml`}`,
12179
+ anchorsByInlinePath: buildAnchorsByInlinePath(anchors)
12133
12180
  }) : { objects: [], divergences: [] };
12134
12181
  const signature = buildPageLocalStorySignature({
12135
12182
  kind: target.kind,
@@ -12183,6 +12230,23 @@ function buildPageLocalStorySignature(input) {
12183
12230
  object.anchorRectTwips?.yTwips ?? "",
12184
12231
  object.anchorRectTwips?.widthTwips ?? "",
12185
12232
  object.anchorRectTwips?.heightTwips ?? "",
12233
+ object.textBoxBody?.bodyKey ?? "",
12234
+ object.textBoxBody?.status ?? "",
12235
+ object.textBoxBody?.unavailableReason ?? "",
12236
+ object.textBoxBody?.contentRectTwips?.xTwips ?? "",
12237
+ object.textBoxBody?.contentRectTwips?.yTwips ?? "",
12238
+ object.textBoxBody?.contentRectTwips?.widthTwips ?? "",
12239
+ object.textBoxBody?.contentRectTwips?.heightTwips ?? "",
12240
+ object.textBoxBody?.paragraphs.map(
12241
+ (paragraph) => [
12242
+ paragraph.paragraphKey,
12243
+ paragraph.rectTwips?.xTwips ?? "",
12244
+ paragraph.rectTwips?.yTwips ?? "",
12245
+ paragraph.rectTwips?.widthTwips ?? "",
12246
+ paragraph.rectTwips?.heightTwips ?? "",
12247
+ paragraph.unavailableReason ?? ""
12248
+ ].join("/")
12249
+ ).join(",") ?? "",
12186
12250
  object.relationshipIds?.join(",") ?? "",
12187
12251
  object.mediaIds?.join(",") ?? "",
12188
12252
  object.wrapMode ?? "",
@@ -12327,6 +12391,10 @@ function truncatePageLocalStoryPreview(text) {
12327
12391
  if (text.length <= MAX_PAGE_LOCAL_STORY_PREVIEW_CHARS) return text;
12328
12392
  return `${text.slice(0, MAX_PAGE_LOCAL_STORY_PREVIEW_CHARS - 1).trimEnd()}\u2026`;
12329
12393
  }
12394
+ function buildAnchorsByInlinePath(anchors) {
12395
+ if (!anchors || anchors.length === 0) return void 0;
12396
+ return new Map(anchors.map((anchor) => [anchor.inlinePath, anchor]));
12397
+ }
12330
12398
  function collectStoryAnchoredObjects(blocks, context) {
12331
12399
  const objects = [];
12332
12400
  const divergences = [];
@@ -12370,26 +12438,45 @@ function collectStoryAnchoredObjects(blocks, context) {
12370
12438
  });
12371
12439
  ordinal += 1;
12372
12440
  };
12373
- const visitBlock = (block) => {
12441
+ const visitBlocks = (blocksToVisit, basePath) => {
12442
+ for (let blockIndex = 0; blockIndex < blocksToVisit.length; blockIndex += 1) {
12443
+ const block = blocksToVisit[blockIndex];
12444
+ if (!block) continue;
12445
+ visitBlock(block, `${basePath}/block[${blockIndex}]`);
12446
+ }
12447
+ };
12448
+ const visitBlock = (block, blockPath) => {
12374
12449
  switch (block.type) {
12375
12450
  case "paragraph":
12376
- for (const child of block.children) visitInline(child);
12451
+ visitInlines(block.children, blockPath, `${blockPath}/inline`);
12377
12452
  break;
12378
12453
  case "table":
12379
- for (const row of block.rows) {
12380
- for (const cell of row.cells) {
12381
- for (const child of cell.children) visitBlock(child);
12454
+ for (let rowIndex = 0; rowIndex < block.rows.length; rowIndex += 1) {
12455
+ const row = block.rows[rowIndex];
12456
+ if (!row) continue;
12457
+ for (let cellIndex = 0; cellIndex < row.cells.length; cellIndex += 1) {
12458
+ const cell = row.cells[cellIndex];
12459
+ if (!cell) continue;
12460
+ visitBlocks(cell.children, `${blockPath}/row[${rowIndex}]/cell[${cellIndex}]`);
12382
12461
  }
12383
12462
  }
12384
12463
  break;
12385
12464
  case "sdt":
12386
- for (const child of block.children) visitBlock(child);
12465
+ case "custom_xml":
12466
+ visitBlocks(block.children, blockPath);
12387
12467
  break;
12388
12468
  default:
12389
12469
  break;
12390
12470
  }
12391
12471
  };
12392
- const visitInline = (inline) => {
12472
+ const visitInlines = (inlines, blockPath, basePath) => {
12473
+ for (let inlineIndex = 0; inlineIndex < inlines.length; inlineIndex += 1) {
12474
+ const inline = inlines[inlineIndex];
12475
+ if (!inline) continue;
12476
+ visitInline(inline, blockPath, `${basePath}[${inlineIndex}]`);
12477
+ }
12478
+ };
12479
+ const visitInline = (inline, blockPath, inlinePath) => {
12393
12480
  switch (inline.type) {
12394
12481
  case "image": {
12395
12482
  pushObject({
@@ -12410,17 +12497,27 @@ function collectStoryAnchoredObjects(blocks, context) {
12410
12497
  inline.anchor.extent.widthEmu,
12411
12498
  inline.anchor.extent.heightEmu
12412
12499
  );
12500
+ const anchorRectTwips = resolveObjectAnchorRectTwips(
12501
+ context.region,
12502
+ extentTwips,
12503
+ inline.anchor.positionH,
12504
+ inline.anchor.positionV
12505
+ );
12506
+ const canonicalAnchor = context.anchorsByInlinePath?.get(inlinePath);
12507
+ const textBoxBody = buildDrawingFrameTextBoxBodyFacts(
12508
+ inline,
12509
+ canonicalAnchor,
12510
+ inlinePath,
12511
+ display,
12512
+ anchorRectTwips
12513
+ );
12413
12514
  pushObject({
12414
12515
  objectId: getDrawingFrameObjectId(inline, context.storyKey, ordinal),
12415
12516
  sourceType: "drawing-frame",
12416
12517
  display,
12417
12518
  extentTwips,
12418
- anchorRectTwips: resolveObjectAnchorRectTwips(
12419
- context.region,
12420
- extentTwips,
12421
- inline.anchor.positionH,
12422
- inline.anchor.positionV
12423
- ),
12519
+ anchorRectTwips,
12520
+ ...textBoxBody ? { textBoxBody } : {},
12424
12521
  ...relationshipIds.length > 0 ? { relationshipIds } : {},
12425
12522
  ...inline.content.type === "picture" && inline.content.mediaId ? { mediaIds: [inline.content.mediaId] } : {},
12426
12523
  preserveOnly: Boolean(preserveHint),
@@ -12428,7 +12525,7 @@ function collectStoryAnchoredObjects(blocks, context) {
12428
12525
  wrapMode: inline.anchor.wrapMode
12429
12526
  });
12430
12527
  if (inline.content.type === "shape") {
12431
- for (const child of inline.content.txbxBlocks ?? []) visitBlock(child);
12528
+ visitBlocks(inline.content.txbxBlocks ?? [], `${inlinePath}/txbx`);
12432
12529
  }
12433
12530
  break;
12434
12531
  }
@@ -12455,10 +12552,11 @@ function collectStoryAnchoredObjects(blocks, context) {
12455
12552
  } : {},
12456
12553
  ...preserveHint?.relationshipIds ? { relationshipIds: [...preserveHint.relationshipIds] } : {},
12457
12554
  preserveOnly: Boolean(preserveHint),
12458
- ...preserveHint ? { preserveHint } : {}
12555
+ ...preserveHint ? { preserveHint } : {},
12556
+ ...inline.type === "vml_shape" && inline.text ? { textBoxBody: buildUnsupportedVmlTextBoxFacts(inline, inlinePath) } : {}
12459
12557
  });
12460
12558
  if (inline.type === "shape") {
12461
- for (const child of inline.txbxBlocks ?? []) visitBlock(child);
12559
+ visitBlocks(inline.txbxBlocks ?? [], `${inlinePath}/txbx`);
12462
12560
  }
12463
12561
  break;
12464
12562
  }
@@ -12480,16 +12578,16 @@ function collectStoryAnchoredObjects(blocks, context) {
12480
12578
  });
12481
12579
  break;
12482
12580
  case "field":
12483
- for (const child of inline.children) visitInline(child);
12581
+ visitInlines(inline.children, blockPath, `${inlinePath}/child`);
12484
12582
  break;
12485
12583
  case "hyperlink":
12486
- for (const child of inline.children) visitInline(child);
12584
+ visitInlines(inline.children, blockPath, `${inlinePath}/child`);
12487
12585
  break;
12488
12586
  default:
12489
12587
  break;
12490
12588
  }
12491
12589
  };
12492
- for (const block of blocks) visitBlock(block);
12590
+ visitBlocks(blocks, context.storyBasePath);
12493
12591
  return { objects, divergences };
12494
12592
  }
12495
12593
  function getDrawingFramePreserveHint(inline) {
@@ -12497,6 +12595,170 @@ function getDrawingFramePreserveHint(inline) {
12497
12595
  if (content.type === "picture") return void 0;
12498
12596
  return content.preserveOnlyObject;
12499
12597
  }
12598
+ function buildDrawingFrameTextBoxBodyFacts(inline, canonicalAnchor, inlinePath, display, anchorRectTwips) {
12599
+ if (inline.content.type !== "shape") return void 0;
12600
+ const content = inline.content;
12601
+ const canonicalBody = canonicalAnchor?.textBoxBody;
12602
+ const hasTextBoxContent = Boolean(
12603
+ canonicalBody || content.isTextBox || content.textBoxBody || content.txbxBlocks?.length
12604
+ );
12605
+ if (!hasTextBoxContent) return void 0;
12606
+ if (!canonicalBody) {
12607
+ return unavailableTextBoxBodyFacts(
12608
+ `${canonicalAnchor?.objectKey ?? inlinePath}:txbx`,
12609
+ "unmodeled-txbx-blocks",
12610
+ content.textBoxBody,
12611
+ content.txbxBlocks?.length ?? 0,
12612
+ countParagraphBlocks(content.txbxBlocks ?? []),
12613
+ 0
12614
+ );
12615
+ }
12616
+ if (display !== "floating") {
12617
+ return unavailableTextBoxBodyFactsFromCanonical(canonicalBody, "inline-textbox");
12618
+ }
12619
+ if (!anchorRectTwips) {
12620
+ return unavailableTextBoxBodyFactsFromCanonical(canonicalBody, "missing-anchor-rect");
12621
+ }
12622
+ if (canonicalBody.status !== "modeled") {
12623
+ return unavailableTextBoxBodyFactsFromCanonical(
12624
+ canonicalBody,
12625
+ normalizeTextBoxBodyUnavailableReason(canonicalBody.unavailableReason)
12626
+ );
12627
+ }
12628
+ const bodyInsetsTwips = textBoxInsetsTwips(canonicalBody.bodyProperties);
12629
+ if (!bodyInsetsTwips) {
12630
+ return unavailableTextBoxBodyFactsFromCanonical(canonicalBody, "missing-body-insets");
12631
+ }
12632
+ const contentRectTwips = rect(
12633
+ anchorRectTwips.xTwips + bodyInsetsTwips.leftTwips,
12634
+ anchorRectTwips.yTwips + bodyInsetsTwips.topTwips,
12635
+ Math.max(0, anchorRectTwips.widthTwips - bodyInsetsTwips.leftTwips - bodyInsetsTwips.rightTwips),
12636
+ Math.max(0, anchorRectTwips.heightTwips - bodyInsetsTwips.topTwips - bodyInsetsTwips.bottomTwips)
12637
+ );
12638
+ return {
12639
+ bodyKey: canonicalBody.bodyKey,
12640
+ status: "modeled",
12641
+ ...canonicalBody.bodyProperties ? { bodyProperties: { ...canonicalBody.bodyProperties } } : {},
12642
+ bodyInsetsTwips,
12643
+ contentRectTwips,
12644
+ blockCount: canonicalBody.blockCount,
12645
+ paragraphCount: canonicalBody.paragraphCount,
12646
+ unsupportedBlockCount: canonicalBody.unsupportedBlockCount,
12647
+ paragraphs: buildTextBoxParagraphFacts(canonicalBody, contentRectTwips)
12648
+ };
12649
+ }
12650
+ function unavailableTextBoxBodyFactsFromCanonical(body, reason) {
12651
+ return {
12652
+ bodyKey: body.bodyKey,
12653
+ status: body.status === "preserve-only" ? "preserve-only" : "unavailable",
12654
+ unavailableReason: reason,
12655
+ ...body.bodyProperties ? { bodyProperties: { ...body.bodyProperties } } : {},
12656
+ blockCount: body.blockCount,
12657
+ paragraphCount: body.paragraphCount,
12658
+ unsupportedBlockCount: body.unsupportedBlockCount,
12659
+ paragraphs: body.paragraphs.map((paragraph) => ({
12660
+ paragraphKey: paragraph.paragraphKey,
12661
+ blockPath: paragraph.blockPath,
12662
+ blockIndex: paragraph.blockIndex,
12663
+ unavailableReason: reason,
12664
+ ...paragraph.styleId !== void 0 ? { styleId: paragraph.styleId } : {},
12665
+ ...paragraph.alignment !== void 0 ? { alignment: paragraph.alignment } : {},
12666
+ textLength: paragraph.textLength,
12667
+ runCount: paragraph.runCount
12668
+ }))
12669
+ };
12670
+ }
12671
+ function unavailableTextBoxBodyFacts(bodyKey, reason, bodyProperties, blockCount, paragraphCount, unsupportedBlockCount) {
12672
+ return {
12673
+ bodyKey,
12674
+ status: "unavailable",
12675
+ unavailableReason: reason,
12676
+ ...bodyProperties ? { bodyProperties: { ...bodyProperties } } : {},
12677
+ blockCount,
12678
+ paragraphCount,
12679
+ unsupportedBlockCount,
12680
+ paragraphs: []
12681
+ };
12682
+ }
12683
+ function buildUnsupportedVmlTextBoxFacts(inline, inlinePath) {
12684
+ const hasText = Boolean(inline.text?.length);
12685
+ return {
12686
+ bodyKey: `${inline.preserveOnlyObject?.sourceId ?? inlinePath}:vml-textbox`,
12687
+ status: "unavailable",
12688
+ unavailableReason: "unsupported-vml-textbox",
12689
+ blockCount: hasText ? 1 : 0,
12690
+ paragraphCount: hasText ? 1 : 0,
12691
+ unsupportedBlockCount: hasText ? 1 : 0,
12692
+ paragraphs: []
12693
+ };
12694
+ }
12695
+ function buildTextBoxParagraphFacts(body, contentRectTwips) {
12696
+ const paragraphCount = body.paragraphs.length;
12697
+ if (paragraphCount === 0) return [];
12698
+ const baseHeight = Math.floor(contentRectTwips.heightTwips / paragraphCount);
12699
+ return body.paragraphs.map((paragraph, index) => {
12700
+ const yTwips = contentRectTwips.yTwips + baseHeight * index;
12701
+ const heightTwips = index === paragraphCount - 1 ? Math.max(0, contentRectTwips.yTwips + contentRectTwips.heightTwips - yTwips) : Math.max(0, baseHeight);
12702
+ return {
12703
+ paragraphKey: paragraph.paragraphKey,
12704
+ blockPath: paragraph.blockPath,
12705
+ blockIndex: paragraph.blockIndex,
12706
+ rectTwips: rect(
12707
+ contentRectTwips.xTwips,
12708
+ yTwips,
12709
+ contentRectTwips.widthTwips,
12710
+ heightTwips
12711
+ ),
12712
+ ...paragraph.styleId !== void 0 ? { styleId: paragraph.styleId } : {},
12713
+ ...paragraph.alignment !== void 0 ? { alignment: paragraph.alignment } : {},
12714
+ textLength: paragraph.textLength,
12715
+ runCount: paragraph.runCount
12716
+ };
12717
+ });
12718
+ }
12719
+ function textBoxInsetsTwips(bodyProperties) {
12720
+ if (!bodyProperties || bodyProperties.insetLeftEmu === void 0 || bodyProperties.insetTopEmu === void 0 || bodyProperties.insetRightEmu === void 0 || bodyProperties.insetBottomEmu === void 0) {
12721
+ return void 0;
12722
+ }
12723
+ return {
12724
+ leftTwips: Math.max(0, Math.round(bodyProperties.insetLeftEmu / EMUS_PER_TWIP)),
12725
+ topTwips: Math.max(0, Math.round(bodyProperties.insetTopEmu / EMUS_PER_TWIP)),
12726
+ rightTwips: Math.max(0, Math.round(bodyProperties.insetRightEmu / EMUS_PER_TWIP)),
12727
+ bottomTwips: Math.max(0, Math.round(bodyProperties.insetBottomEmu / EMUS_PER_TWIP))
12728
+ };
12729
+ }
12730
+ function normalizeTextBoxBodyUnavailableReason(reason) {
12731
+ switch (reason) {
12732
+ case "txbx-blocks-unavailable":
12733
+ case "empty-body":
12734
+ case "unsupported-content":
12735
+ return reason;
12736
+ default:
12737
+ return "unmodeled-txbx-blocks";
12738
+ }
12739
+ }
12740
+ function countParagraphBlocks(blocks) {
12741
+ let count = 0;
12742
+ const visit = (block) => {
12743
+ if (block.type === "paragraph") {
12744
+ count += 1;
12745
+ return;
12746
+ }
12747
+ if (block.type === "table") {
12748
+ for (const row of block.rows) {
12749
+ for (const cell of row.cells) {
12750
+ for (const child of cell.children) visit(child);
12751
+ }
12752
+ }
12753
+ return;
12754
+ }
12755
+ if (block.type === "sdt" || block.type === "custom_xml") {
12756
+ for (const child of block.children) visit(child);
12757
+ }
12758
+ };
12759
+ for (const block of blocks) visit(block);
12760
+ return count;
12761
+ }
12500
12762
  function collectDrawingRelationshipIds(inline) {
12501
12763
  const content = inline.content;
12502
12764
  if (content.type === "picture") return [content.blipRef];
@@ -12825,12 +13087,34 @@ function freezePageFrame(frame) {
12825
13087
  for (const story of frame.pageLocalStories) {
12826
13088
  Object.freeze(story.resolvedFields);
12827
13089
  Object.freeze(story.previewParts);
13090
+ for (const object of story.anchoredObjects) {
13091
+ freezeStoryAnchoredObject(object);
13092
+ }
12828
13093
  Object.freeze(story.anchoredObjects);
12829
13094
  Object.freeze(story);
12830
13095
  }
12831
13096
  Object.freeze(frame.pageLocalStories);
12832
13097
  Object.freeze(frame);
12833
13098
  }
13099
+ function freezeStoryAnchoredObject(object) {
13100
+ if (object.extentTwips) Object.freeze(object.extentTwips);
13101
+ if (object.anchorRectTwips) Object.freeze(object.anchorRectTwips);
13102
+ if (object.relationshipIds) Object.freeze(object.relationshipIds);
13103
+ if (object.mediaIds) Object.freeze(object.mediaIds);
13104
+ if (object.textBoxBody) {
13105
+ if (object.textBoxBody.bodyProperties) Object.freeze(object.textBoxBody.bodyProperties);
13106
+ if (object.textBoxBody.bodyInsetsTwips) Object.freeze(object.textBoxBody.bodyInsetsTwips);
13107
+ if (object.textBoxBody.contentRectTwips) Object.freeze(object.textBoxBody.contentRectTwips);
13108
+ for (const paragraph of object.textBoxBody.paragraphs) {
13109
+ if (paragraph.rectTwips) Object.freeze(paragraph.rectTwips);
13110
+ Object.freeze(paragraph);
13111
+ }
13112
+ Object.freeze(object.textBoxBody.paragraphs);
13113
+ Object.freeze(object.textBoxBody);
13114
+ }
13115
+ Object.freeze(object.divergenceIds);
13116
+ Object.freeze(object);
13117
+ }
12834
13118
  function normalizePageLocalStoryFieldsForPages(pages) {
12835
13119
  const pageFieldCounts = buildPageFieldCounts(pages);
12836
13120
  return pages.map((page) => {
@@ -14465,7 +14749,8 @@ function createLayoutEngine(options = {}) {
14465
14749
  fragmentsByPageIndex,
14466
14750
  lineBoxesByPageIndex,
14467
14751
  noteAllocationsByPageIndex: pageStack.noteAllocationsByPageIndex,
14468
- subParts: document2.subParts
14752
+ subParts: document2.subParts,
14753
+ anchors: layoutInputs.anchors
14469
14754
  });
14470
14755
  const graph = applyViewportWindowMaterialization(
14471
14756
  measuredGraph,
@@ -14600,7 +14885,8 @@ function createLayoutEngine(options = {}) {
14600
14885
  fragmentsByPageIndex: freshFragmentsByPageIndex,
14601
14886
  lineBoxesByPageIndex: freshLineBoxesByPageIndex,
14602
14887
  noteAllocationsByPageIndex: freshResult.noteAllocationsByPageIndex,
14603
- subParts: document2.subParts
14888
+ subParts: document2.subParts,
14889
+ anchors: layoutInputs.anchors
14604
14890
  });
14605
14891
  const freshNodes = freshGraph.pages;
14606
14892
  const splicedGraph = spliceGraph(priorGraph, freshNodes, firstDirty, convergedTailStart);
@@ -1,7 +1,7 @@
1
1
  import 'react';
2
- export { bf as ActiveListContext, gL as ActiveMarginPreset, bg as ActiveNoteContext, gM as ActivePageFormat, bh as AddCommentParams, bi as AddCommentReplyResult, bj as AddCommentResult, gN as AddScopeParams, gO as AddScopeResult, bk as AiExplanationScopeInput, bl as AiExplanationScopeResult, bo as AutosaveConfig, bp as AutosaveState, br as BatchEditEntryResult, bs as BatchEditOperation, bt as BatchEditOptions, bu as BatchEditResult, gP as CAPABILITY_BY_ID, C as CanonicalDocumentEnvelope, gQ as CanonicalDocumentFragment, gR as CapabilityBlockReason, gS as CapabilityCategory, gT as CapabilityKind, gU as CapabilityShortcut, bv as CaretAffinity, bw as ChangeAnchor, bx as ChangeFilter, by as ChartPreviewResolveParams, bz as ChartSnapshot, bA as ChartSnapshotBubbleSeries, bB as ChartSnapshotData, bC as ChartSnapshotScatterSeries, bD as ChartSnapshotSeries, eW as ChromePinSurface, fd as ChromePinsState, gV as ClearHighlightOptions, bF as CollabSession, bL as CommandStateSnapshot, b$ as CommentSidebarSnapshot, c0 as CommentSidebarThreadEntrySnapshot, c1 as CommentSidebarThreadSnapshot, c2 as CompatibilityFeatureClass, c3 as CompatibilityFeatureEntry, c4 as CompatibilityPanelSnapshot, q as CompatibilityReport, gW as DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP, gX as DEFAULT_PX_PER_TWIP, gY as DecorationIndex, c8 as DocumentChunkKind, c9 as DocumentChunkSnapshot, ca as DocumentHeadingSnapshot, cb as DocumentLocationSnapshot, cc as DocumentLocationSource, gZ as DocumentMode, cd as DocumentNavigationSnapshot, ce as DocumentOutlineHeadingSnapshot, cf as DocumentOutlineSnapshot, cg as DocumentPageSnapshot, ch as DocumentSectionSnapshot, ci as DocumentStats, cj as DocumentTextToken, g_ as EMU_PER_INCH, g$ as EMU_PER_PX, fg as EditableTargetRef, ck as EditorAnchorProjection, h0 as EditorApiError, h1 as EditorCapability, cl as EditorDatastoreAdapter, h2 as EditorDiagnostic, h3 as EditorDiagnosticCode, h4 as EditorDiagnosticLlmMetadata, h5 as EditorDiagnosticRecoveryClass, h6 as EditorDiagnosticRemediation, h7 as EditorDiagnosticSource, h8 as EditorDiagnosticTechnical, r as EditorError, cm as EditorErrorCode, E as EditorHostAdapter, f9 as EditorRole, a as EditorSessionState, cn as EditorStateBlob, as as EditorStateLocation, ar as EditorStateNamespace, co as EditorStatePartLoadFailure, cp as EditorStatePartPersistFailure, cq as EditorStatePersister, cr as EditorStatePolicy, cs as EditorStatePolicyEntry, ct as EditorStatePolicyMigration, cu as EditorStateResolveErrorMode, cv as EditorStateResolver, cw as EditorStateStorageRef, cx as EditorStoryTarget, o as EditorSurfaceSnapshot, cy as EditorTelemetryEvent, cz as EditorUser, cA as EditorViewStateSnapshot, cB as EditorWarning, cC as EditorWarningCode, h9 as EffectiveSelectionMode, ha as EmbeddedDocumentManifestLike, hb as ExportDelivery, b as ExportDocxOptions, c as ExportResult, cE as ExternalDocumentSource, hc as FieldEntrySnapshot, hd as FieldFamily, he as FieldRefreshStatus, hf as FieldSnapshot, eY as FormattingAlignment, hg as FormattingBreadcrumbItem, f4 as FormattingStateSnapshot, f0 as GeometryFacet, cF as HeaderFooterLinkPatch, cG as HostAnnotationItem, cH as HostAnnotationKind, cI as HostAnnotationOverlay, cJ as HostAnnotationSnapshot, cK as ISSUE_METADATA_ID, eZ as InsertImageOptions, I as InsertTableOptions, cL as InteractionGuardSnapshot, cM as IssueMetadataValue, cN as IssueMode, cO as IssueOwner, cP as IssueSeverity, hh as LayoutFacetEvent, hi as LayoutFacetInvalidationReason, cQ as LayoutMeasurement, cR as LoadRequest, cS as LoadResult, cT as LoadSourcePolicy, L as LoadStage, fo as MAIN_STORY_TARGET, M as MarginPresetDefinition, hj as MetadataConflictPolicy, cU as MetadataIntegrity, cV as MetadataPersistenceMode, cW as MetadataResolverMissingError, hk as OverlayKind, hl as OverlayVisibilityAuthorship, hm as OverlayVisibilityEnforcement, hn as OverlayVisibilityPolicy, ho as PERCENTAGE_PARTS, hp as PageChromeReservations, hq as PageFieldContext, i as PageFormatDefinition, d0 as PageLayoutSnapshot, hr as PagePreviewMaps, d1 as PageRegionHitTest, P as PersistedEditorSnapshot, eX as PinState, hs as ProtectionRange, t as ProtectionSnapshot, ht as PublicBlockFragment, hu as PublicBlockMeasurement, hv as PublicBorderSpec, hw as PublicCellLocator, hx as PublicCellShading, hy as PublicFieldDirtinessReport, hz as PublicLayoutDivergence, hA as PublicLineBox, hB as PublicLineRunAnchor, fe as PublicMeasurementFidelity, hC as PublicNoteAllocation, hD as PublicPageAnchor, hE as PublicPageFrame, hF as PublicPageLocalStoryInstance, hG as PublicPageNode, hH as PublicPagePaginationTelemetry, hI as PublicPageRegion, hJ as PublicPageRegions, hK as PublicPageSpan, hL as PublicPaginationTelemetry, hM as PublicRegionBlock, hN as PublicRegionKind, hO as PublicResolvedPageStories, hP as PublicResolvedParagraphFormatting, hQ as PublicResolvedRunFormatting, hR as PublicResolvedStoryField, hS as PublicSectionNode, hT as PublicStoryAnchoredObject, hU as PublicTableBorders, hV as PublicTableCellBorders, hW as PublicTableCellMargins, hX as PublicTableEvent, hY as PublicTableRenderPlan, hZ as PublicTableRowHeight, h_ as PublicTableStyle, h$ as PublicTableSummary, i0 as PublicTableWidth, i1 as PublicTwipsRect, d6 as REVIEW_ACTION_METADATA_ID, i2 as ROTATION_UNITS_PER_DEGREE, i3 as RenderAnchorIndex, i4 as RenderAnchorQuery, i5 as RenderBlock, i6 as RenderBlockDecoration, i7 as RenderFrame, i8 as RenderFrameQueryOptions, i9 as RenderFrameRect, ia as RenderHitResult, ib as RenderKernelEvent, ic as RenderLine, id as RenderLineAnchor, ie as RenderPage, ig as RenderPageRegions, ih as RenderPoint, ii as RenderStoryRegion, ij as RenderZoom, ik as RenderZoomSummary, il as ResolveMetadataConflictInput, im as ResolvedNumberingGeometrySnapshot, io as ResolvedNumberingSnapshot, d7 as RestorePointCheckpointType, d8 as RestorePointSnapshot, d9 as RestoreResult, da as ReviewActionKind, db as ReviewActionMetadataValue, dc as ReviewQueueItem, dd as ReviewQueueItemKind, de as ReviewQueueSnapshot, df as ReviewWorkItemSnapshot, dg as ReviewWorkSnapshot, dh as RuntimeContextAnalyticsActionHint, di as RuntimeContextAnalyticsBadge, dj as RuntimeContextAnalyticsCounts, dk as RuntimeContextAnalyticsProvenance, dl as RuntimeContextAnalyticsQuery, dm as RuntimeContextAnalyticsScopeKind, dn as RuntimeContextAnalyticsSnapshot, dp as RuntimeContextAnalyticsState, dq as RuntimeContextAnalyticsUnavailableField, ip as RuntimeEditTargetContext, be as RuntimePageGraph, iq as RuntimePageNode, R as RuntimeRenderSnapshot, ir as SRCRECT_UNITS_PER_PERCENT, is as SanitizeResult, du as SaveExportParams, dv as SaveExportResult, dw as SaveSessionParams, dx as SaveSessionResult, dy as SaveSnapshotParams, dz as SaveSnapshotResult, it as ScopeBundle, iu as ScopeBundleEvidence, iv as ScopeBundleNeighborhood, dA as ScopeCardModel, iw as ScopeChromeVisibility, ix as ScopeChromeVisibilityState, iy as ScopeHandle, dB as ScopeIssueAction, dC as ScopeMetadataPersistence, dD as ScopeMetadataResolver, dE as ScopeMetadataStorageRef, iz as ScopeQueryFilter, iA as ScopeQueryResult, fc as ScopeRailPosture, eV as ScopeRailSegment, iB as ScopeRailSnapshot, iC as ScopeTagRegistry, dF as ScopeTagTouch, iD as ScopeVisibility, j as SearchOptions, iE as SearchResultSnapshot, k as SearchTextOptions, l as SecondaryStorySearchResult, iF as SecondaryStorySurface, dG as SectionBreakType, dH as SectionLayoutPatch, dI as SectionPageNumberingPatch, h as SelectionSnapshot, iG as SemanticScope, iH as SemanticScopeKind, e_ as SessionCapabilities, iI as SetSelectionOptions, aL as SharedWorkflowState, iJ as ShortcutDelegationContext, dN as SnapshotRefreshChangeKind, dO as SnapshotRefreshHints, dP as SnapshotRefreshInvalidateTarget, dQ as SnapshotRefreshStaleTarget, iK as StorageReference, iL as StoreEmbeddedDocParams, dR as StoryTextStreamSnapshot, dS as StyleCatalogEntrySnapshot, dT as StyleCatalogSnapshot, dU as SuggestionEntrySnapshot, dV as SuggestionGroup, dW as SuggestionsSnapshot, iM as SupportedFieldFamily, dX as SurfaceBlockSnapshot, iN as SurfaceDrawingAnchor, dY as SurfaceInlineSegment, iO as SurfacePictureEffects, iP as SurfacePreserveOnlyObjectSizing, dZ as SurfaceTableCellSnapshot, d_ as SurfaceTableRowSnapshot, iQ as SurfaceTextBoxBodyProperties, iR as SurfaceTextBoxBodySnapshot, iS as SurfaceTextBoxBodyStatus, iT as SurfaceTextBoxParagraphSnapshot, iU as SurfaceTextBoxRunSnapshot, d$ as SurfaceTextMark, iV as TWIPS_PER_PX, iW as TableOp, iX as TableOpResult, iY as TableOperationCapabilitySnapshot, f8 as TableStructureContextSnapshot, b0 as TextCommandAck, e5 as TextCommandAckKind, b1 as TextCommandRefreshClass, f as TextFormattingDirective, e6 as TextProjection, e7 as TextProjectionLine, e8 as TextProjectionOptions, e9 as TextProjectionStoryEntry, iZ as TextStyleFilter, ea as TocEntrySnapshot, i_ as TocRefreshOptions, i$ as TocRefreshResult, j0 as TocRefreshTrigger, eb as TocRegionSnapshot, ec as TocSnapshot, ed as TrackedChangeEntrySnapshot, ee as TrackedChangesSnapshot, j1 as UpdateFieldsOptions, j2 as UpdateFieldsResult, ef as ViewMode, j3 as WordReviewEditorChangesFacet, eg as WordReviewEditorChromeOptions, eh as WordReviewEditorChromePreset, ei as WordReviewEditorChromeVisibility, j4 as WordReviewEditorCommentsFacet, j5 as WordReviewEditorDiagnosticsFacet, j6 as WordReviewEditorDocumentFacet, ej as WordReviewEditorEvent, j7 as WordReviewEditorFieldsFacet, e$ as WordReviewEditorLayoutFacet, j8 as WordReviewEditorPasteEvent, b2 as WordReviewEditorProps, b3 as WordReviewEditorRef, j9 as WordReviewEditorScopesFacet, ja as WordReviewEditorTablesFacet, ek as WorkflowBlockedCommandReason, el as WorkflowCandidateRange, em as WorkflowCandidateRangeOptions, en as WorkflowCommentMarkup, jb as WorkflowEventOrigin, f1 as WorkflowFacet, eo as WorkflowFieldMarkup, ep as WorkflowHighlightMarkup, jc as WorkflowLockedZone, eq as WorkflowMarkupBase, er as WorkflowMarkupItem, es as WorkflowMarkupKind, jd as WorkflowMarkupMode, je as WorkflowMarkupModeEnforcement, jf as WorkflowMarkupModePolicy, et as WorkflowMarkupSnapshot, eu as WorkflowMetadataDefinition, ev as WorkflowMetadataEntry, ew as WorkflowMetadataMarkup, ex as WorkflowMetadataPersistence, ey as WorkflowMetadataSnapshot, ez as WorkflowOpaqueFragmentMarkup, eA as WorkflowOverlay, eB as WorkflowOverlayPatch, eC as WorkflowProtectedRangeMarkup, eD as WorkflowRevisionMarkup, eE as WorkflowScope, jg as WorkflowScopeGuardPolicy, jh as WorkflowScopeMetadataField, eF as WorkflowScopeMode, eG as WorkflowScopeSnapshot, eH as WorkflowWorkItem, eI as WorkspaceMode, eJ as ZoomLevel, ji as buildPagePreviewMaps, jj as buildSearchPattern, jk as createCanvasBackend, jl as createPublicNodeAnchor, jm as createPublicRangeAnchor, jn as createScopeTagRegistry, m as createSearchExcerpt, fh as deriveCapabilities, jo as estimateBlockHeight, jp as estimateParagraphLineCount, jq as estimateParagraphLineHeight, jr as findPageForOffset, n as findSearchMatches, js as getUsableColumnWidth, jt as resolvePageFieldDisplayText, ju as sanitizeMarkdown, s as searchSecondaryStories, jv as storyTargetKey, fF as storyTargetsEqual } from './public-types-D_y4Ptcj.cjs';
2
+ export { bf as ActiveListContext, gL as ActiveMarginPreset, bg as ActiveNoteContext, gM as ActivePageFormat, bh as AddCommentParams, bi as AddCommentReplyResult, bj as AddCommentResult, gN as AddScopeParams, gO as AddScopeResult, bk as AiExplanationScopeInput, bl as AiExplanationScopeResult, bo as AutosaveConfig, bp as AutosaveState, br as BatchEditEntryResult, bs as BatchEditOperation, bt as BatchEditOptions, bu as BatchEditResult, gP as CAPABILITY_BY_ID, C as CanonicalDocumentEnvelope, gQ as CanonicalDocumentFragment, gR as CapabilityBlockReason, gS as CapabilityCategory, gT as CapabilityKind, gU as CapabilityShortcut, bv as CaretAffinity, bw as ChangeAnchor, bx as ChangeFilter, by as ChartPreviewResolveParams, bz as ChartSnapshot, bA as ChartSnapshotBubbleSeries, bB as ChartSnapshotData, bC as ChartSnapshotScatterSeries, bD as ChartSnapshotSeries, eW as ChromePinSurface, fd as ChromePinsState, gV as ClearHighlightOptions, bF as CollabSession, bL as CommandStateSnapshot, b$ as CommentSidebarSnapshot, c0 as CommentSidebarThreadEntrySnapshot, c1 as CommentSidebarThreadSnapshot, c2 as CompatibilityFeatureClass, c3 as CompatibilityFeatureEntry, c4 as CompatibilityPanelSnapshot, q as CompatibilityReport, gW as DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP, gX as DEFAULT_PX_PER_TWIP, gY as DecorationIndex, c8 as DocumentChunkKind, c9 as DocumentChunkSnapshot, ca as DocumentHeadingSnapshot, cb as DocumentLocationSnapshot, cc as DocumentLocationSource, gZ as DocumentMode, cd as DocumentNavigationSnapshot, ce as DocumentOutlineHeadingSnapshot, cf as DocumentOutlineSnapshot, cg as DocumentPageSnapshot, ch as DocumentSectionSnapshot, ci as DocumentStats, cj as DocumentTextToken, g_ as EMU_PER_INCH, g$ as EMU_PER_PX, fg as EditableTargetRef, ck as EditorAnchorProjection, h0 as EditorApiError, h1 as EditorCapability, cl as EditorDatastoreAdapter, h2 as EditorDiagnostic, h3 as EditorDiagnosticCode, h4 as EditorDiagnosticLlmMetadata, h5 as EditorDiagnosticRecoveryClass, h6 as EditorDiagnosticRemediation, h7 as EditorDiagnosticSource, h8 as EditorDiagnosticTechnical, r as EditorError, cm as EditorErrorCode, E as EditorHostAdapter, f9 as EditorRole, a as EditorSessionState, cn as EditorStateBlob, as as EditorStateLocation, ar as EditorStateNamespace, co as EditorStatePartLoadFailure, cp as EditorStatePartPersistFailure, cq as EditorStatePersister, cr as EditorStatePolicy, cs as EditorStatePolicyEntry, ct as EditorStatePolicyMigration, cu as EditorStateResolveErrorMode, cv as EditorStateResolver, cw as EditorStateStorageRef, cx as EditorStoryTarget, o as EditorSurfaceSnapshot, cy as EditorTelemetryEvent, cz as EditorUser, cA as EditorViewStateSnapshot, cB as EditorWarning, cC as EditorWarningCode, h9 as EffectiveSelectionMode, ha as EmbeddedDocumentManifestLike, hb as ExportDelivery, b as ExportDocxOptions, c as ExportResult, cE as ExternalDocumentSource, hc as FieldEntrySnapshot, hd as FieldFamily, he as FieldRefreshStatus, hf as FieldSnapshot, eY as FormattingAlignment, hg as FormattingBreadcrumbItem, f4 as FormattingStateSnapshot, f0 as GeometryFacet, cF as HeaderFooterLinkPatch, cG as HostAnnotationItem, cH as HostAnnotationKind, cI as HostAnnotationOverlay, cJ as HostAnnotationSnapshot, cK as ISSUE_METADATA_ID, eZ as InsertImageOptions, I as InsertTableOptions, cL as InteractionGuardSnapshot, cM as IssueMetadataValue, cN as IssueMode, cO as IssueOwner, cP as IssueSeverity, hh as LayoutFacetEvent, hi as LayoutFacetInvalidationReason, cQ as LayoutMeasurement, cR as LoadRequest, cS as LoadResult, cT as LoadSourcePolicy, L as LoadStage, fo as MAIN_STORY_TARGET, M as MarginPresetDefinition, hj as MetadataConflictPolicy, cU as MetadataIntegrity, cV as MetadataPersistenceMode, cW as MetadataResolverMissingError, hk as OverlayKind, hl as OverlayVisibilityAuthorship, hm as OverlayVisibilityEnforcement, hn as OverlayVisibilityPolicy, ho as PERCENTAGE_PARTS, hp as PageChromeReservations, hq as PageFieldContext, i as PageFormatDefinition, d0 as PageLayoutSnapshot, hr as PagePreviewMaps, d1 as PageRegionHitTest, P as PersistedEditorSnapshot, eX as PinState, hs as ProtectionRange, t as ProtectionSnapshot, ht as PublicBlockFragment, hu as PublicBlockMeasurement, hv as PublicBorderSpec, hw as PublicCellLocator, hx as PublicCellShading, hy as PublicFieldDirtinessReport, hz as PublicLayoutDivergence, hA as PublicLineBox, hB as PublicLineRunAnchor, fe as PublicMeasurementFidelity, hC as PublicNoteAllocation, hD as PublicPageAnchor, hE as PublicPageFrame, hF as PublicPageLocalStoryInstance, hG as PublicPageNode, hH as PublicPagePaginationTelemetry, hI as PublicPageRegion, hJ as PublicPageRegions, hK as PublicPageSpan, hL as PublicPaginationTelemetry, hM as PublicRegionBlock, hN as PublicRegionKind, hO as PublicResolvedPageStories, hP as PublicResolvedParagraphFormatting, hQ as PublicResolvedRunFormatting, hR as PublicResolvedStoryField, hS as PublicSectionNode, hT as PublicStoryAnchoredObject, hU as PublicTableBorders, hV as PublicTableCellBorders, hW as PublicTableCellMargins, hX as PublicTableEvent, hY as PublicTableRenderPlan, hZ as PublicTableRowHeight, h_ as PublicTableStyle, h$ as PublicTableSummary, i0 as PublicTableWidth, i1 as PublicTwipsRect, d6 as REVIEW_ACTION_METADATA_ID, i2 as ROTATION_UNITS_PER_DEGREE, i3 as RenderAnchorIndex, i4 as RenderAnchorQuery, i5 as RenderBlock, i6 as RenderBlockDecoration, i7 as RenderFrame, i8 as RenderFrameQueryOptions, i9 as RenderFrameRect, ia as RenderHitResult, ib as RenderKernelEvent, ic as RenderLine, id as RenderLineAnchor, ie as RenderPage, ig as RenderPageRegions, ih as RenderPoint, ii as RenderStoryRegion, ij as RenderZoom, ik as RenderZoomSummary, il as ResolveMetadataConflictInput, im as ResolvedNumberingGeometrySnapshot, io as ResolvedNumberingSnapshot, d7 as RestorePointCheckpointType, d8 as RestorePointSnapshot, d9 as RestoreResult, da as ReviewActionKind, db as ReviewActionMetadataValue, dc as ReviewQueueItem, dd as ReviewQueueItemKind, de as ReviewQueueSnapshot, df as ReviewWorkItemSnapshot, dg as ReviewWorkSnapshot, dh as RuntimeContextAnalyticsActionHint, di as RuntimeContextAnalyticsBadge, dj as RuntimeContextAnalyticsCounts, dk as RuntimeContextAnalyticsProvenance, dl as RuntimeContextAnalyticsQuery, dm as RuntimeContextAnalyticsScopeKind, dn as RuntimeContextAnalyticsSnapshot, dp as RuntimeContextAnalyticsState, dq as RuntimeContextAnalyticsUnavailableField, ip as RuntimeEditTargetContext, be as RuntimePageGraph, iq as RuntimePageNode, R as RuntimeRenderSnapshot, ir as SRCRECT_UNITS_PER_PERCENT, is as SanitizeResult, du as SaveExportParams, dv as SaveExportResult, dw as SaveSessionParams, dx as SaveSessionResult, dy as SaveSnapshotParams, dz as SaveSnapshotResult, it as ScopeBundle, iu as ScopeBundleEvidence, iv as ScopeBundleNeighborhood, dA as ScopeCardModel, iw as ScopeChromeVisibility, ix as ScopeChromeVisibilityState, iy as ScopeHandle, dB as ScopeIssueAction, dC as ScopeMetadataPersistence, dD as ScopeMetadataResolver, dE as ScopeMetadataStorageRef, iz as ScopeQueryFilter, iA as ScopeQueryResult, fc as ScopeRailPosture, eV as ScopeRailSegment, iB as ScopeRailSnapshot, iC as ScopeTagRegistry, dF as ScopeTagTouch, iD as ScopeVisibility, j as SearchOptions, iE as SearchResultSnapshot, k as SearchTextOptions, l as SecondaryStorySearchResult, iF as SecondaryStorySurface, dG as SectionBreakType, dH as SectionLayoutPatch, dI as SectionPageNumberingPatch, h as SelectionSnapshot, iG as SemanticScope, iH as SemanticScopeKind, e_ as SessionCapabilities, iI as SetSelectionOptions, aL as SharedWorkflowState, iJ as ShortcutDelegationContext, dN as SnapshotRefreshChangeKind, dO as SnapshotRefreshHints, dP as SnapshotRefreshInvalidateTarget, dQ as SnapshotRefreshStaleTarget, iK as StorageReference, iL as StoreEmbeddedDocParams, dR as StoryTextStreamSnapshot, dS as StyleCatalogEntrySnapshot, dT as StyleCatalogSnapshot, dU as SuggestionEntrySnapshot, dV as SuggestionGroup, dW as SuggestionsSnapshot, iM as SupportedFieldFamily, dX as SurfaceBlockSnapshot, iN as SurfaceDrawingAnchor, dY as SurfaceInlineSegment, iO as SurfacePictureEffects, iP as SurfacePreserveOnlyObjectSizing, dZ as SurfaceTableCellSnapshot, d_ as SurfaceTableRowSnapshot, iQ as SurfaceTextBoxBodyProperties, iR as SurfaceTextBoxBodySnapshot, iS as SurfaceTextBoxBodyStatus, iT as SurfaceTextBoxParagraphSnapshot, iU as SurfaceTextBoxRunSnapshot, d$ as SurfaceTextMark, iV as TWIPS_PER_PX, iW as TableOp, iX as TableOpResult, iY as TableOperationCapabilitySnapshot, f8 as TableStructureContextSnapshot, b0 as TextCommandAck, e5 as TextCommandAckKind, b1 as TextCommandRefreshClass, f as TextFormattingDirective, e6 as TextProjection, e7 as TextProjectionLine, e8 as TextProjectionOptions, e9 as TextProjectionStoryEntry, iZ as TextStyleFilter, ea as TocEntrySnapshot, i_ as TocRefreshOptions, i$ as TocRefreshResult, j0 as TocRefreshTrigger, eb as TocRegionSnapshot, ec as TocSnapshot, ed as TrackedChangeEntrySnapshot, ee as TrackedChangesSnapshot, j1 as UpdateFieldsOptions, j2 as UpdateFieldsResult, ef as ViewMode, j3 as WordReviewEditorChangesFacet, eg as WordReviewEditorChromeOptions, eh as WordReviewEditorChromePreset, ei as WordReviewEditorChromeVisibility, j4 as WordReviewEditorCommentsFacet, j5 as WordReviewEditorDiagnosticsFacet, j6 as WordReviewEditorDocumentFacet, ej as WordReviewEditorEvent, j7 as WordReviewEditorFieldsFacet, e$ as WordReviewEditorLayoutFacet, j8 as WordReviewEditorPasteEvent, b2 as WordReviewEditorProps, b3 as WordReviewEditorRef, j9 as WordReviewEditorScopesFacet, ja as WordReviewEditorTablesFacet, ek as WorkflowBlockedCommandReason, el as WorkflowCandidateRange, em as WorkflowCandidateRangeOptions, en as WorkflowCommentMarkup, jb as WorkflowEventOrigin, f1 as WorkflowFacet, eo as WorkflowFieldMarkup, ep as WorkflowHighlightMarkup, jc as WorkflowLockedZone, eq as WorkflowMarkupBase, er as WorkflowMarkupItem, es as WorkflowMarkupKind, jd as WorkflowMarkupMode, je as WorkflowMarkupModeEnforcement, jf as WorkflowMarkupModePolicy, et as WorkflowMarkupSnapshot, eu as WorkflowMetadataDefinition, ev as WorkflowMetadataEntry, ew as WorkflowMetadataMarkup, ex as WorkflowMetadataPersistence, ey as WorkflowMetadataSnapshot, ez as WorkflowOpaqueFragmentMarkup, eA as WorkflowOverlay, eB as WorkflowOverlayPatch, eC as WorkflowProtectedRangeMarkup, eD as WorkflowRevisionMarkup, eE as WorkflowScope, jg as WorkflowScopeGuardPolicy, jh as WorkflowScopeMetadataField, eF as WorkflowScopeMode, eG as WorkflowScopeSnapshot, eH as WorkflowWorkItem, eI as WorkspaceMode, eJ as ZoomLevel, ji as buildPagePreviewMaps, jj as buildSearchPattern, jk as createCanvasBackend, jl as createPublicNodeAnchor, jm as createPublicRangeAnchor, jn as createScopeTagRegistry, m as createSearchExcerpt, fh as deriveCapabilities, jo as estimateBlockHeight, jp as estimateParagraphLineCount, jq as estimateParagraphLineHeight, jr as findPageForOffset, n as findSearchMatches, js as getUsableColumnWidth, jt as resolvePageFieldDisplayText, ju as sanitizeMarkdown, s as searchSecondaryStories, jv as storyTargetKey, fF as storyTargetsEqual } from './public-types-DajNGKV4.cjs';
3
3
  import 'y-protocols/awareness';
4
4
  import 'yjs';
5
- export { a8 as AreaChartModel, a9 as Axis, aa as AxisBase, ab as BarChartModel, B as BlockNode, ac as BubbleChartModel, ad as BubbleSeries, Y as CanonicalParagraphFormatting, Z as CanonicalRunFormatting, ae as CategoryAxis, af as CategoryLikeAxis, ag as ChartCommon, a1 as ChartModel, ah as ColorMod, a3 as ColorRef, ai as ComboChartModel, aj as DataLabelsSpec, ak as DataPointOverride, al as DateAxis, _ as FillSpec, am as Legend, an as LineChartModel, ao as LineSeries, ap as MarkerSpec, aq as PieChartModel, ar as PieSeries, a2 as ResolvedTheme, as as ScatterChartModel, at as ScatterSeries, au as Series, av as SeriesAxis, aw as SeriesBase, ax as ShapeProperties, a0 as StrokeSpec, G as TextMark, $ as TextProperties, ay as Title, az as UnsupportedChartModel, aA as UnsupportedReason, aB as ValueAxis } from './canonical-document-ByIqTd4s.cjs';
5
+ export { a8 as AreaChartModel, a9 as Axis, aa as AxisBase, ab as BarChartModel, B as BlockNode, ac as BubbleChartModel, ad as BubbleSeries, Y as CanonicalParagraphFormatting, Z as CanonicalRunFormatting, ae as CategoryAxis, af as CategoryLikeAxis, ag as ChartCommon, a1 as ChartModel, ah as ColorMod, a3 as ColorRef, ai as ComboChartModel, aj as DataLabelsSpec, ak as DataPointOverride, al as DateAxis, _ as FillSpec, am as Legend, an as LineChartModel, ao as LineSeries, ap as MarkerSpec, aq as PieChartModel, ar as PieSeries, a2 as ResolvedTheme, as as ScatterChartModel, at as ScatterSeries, au as Series, av as SeriesAxis, aw as SeriesBase, ax as ShapeProperties, a0 as StrokeSpec, G as TextMark, $ as TextProperties, ay as Title, az as UnsupportedChartModel, aA as UnsupportedReason, aB as ValueAxis } from './canonical-document-CG2TgAzj.cjs';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';