@beyondwork/docx-react-component 1.0.128 → 1.0.130

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 (108) hide show
  1. package/dist/api/public-types.cjs +809 -78
  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 +4 -4
  5. package/dist/api/v3.cjs +2059 -402
  6. package/dist/api/v3.d.cts +3 -3
  7. package/dist/api/v3.d.ts +3 -3
  8. package/dist/api/v3.js +13 -13
  9. package/dist/{canonical-document-CXCFCbAz.d.cts → canonical-document-BMtONpgf.d.cts} +6 -0
  10. package/dist/{canonical-document-CXCFCbAz.d.ts → canonical-document-BMtONpgf.d.ts} +6 -0
  11. package/dist/{chunk-MWSBGJQO.js → chunk-35RHOE6I.js} +105 -4
  12. package/dist/{chunk-2QL5DAKF.js → chunk-3YCQM2RV.js} +6 -6
  13. package/dist/{chunk-ESJ2MES5.js → chunk-4YCWECLZ.js} +1 -1
  14. package/dist/{chunk-4EENH4FG.js → chunk-6TBLDBCL.js} +1 -1
  15. package/dist/{chunk-XRACP43Q.js → chunk-7G5GR3VV.js} +469 -32
  16. package/dist/{chunk-CXSYRB37.js → chunk-A3GSNB4G.js} +183 -55
  17. package/dist/{chunk-5DGKFNQT.js → chunk-A66ZVUAT.js} +150 -1
  18. package/dist/{chunk-YIYM4ZAP.js → chunk-CI2TD3T4.js} +1 -1
  19. package/dist/{chunk-TQDQU2E3.js → chunk-DGA7M77X.js} +2 -2
  20. package/dist/{chunk-EB6M3GE6.js → chunk-FM4K4XFJ.js} +100 -97
  21. package/dist/{chunk-D5HYZQTG.js → chunk-HYHCRMR7.js} +1 -1
  22. package/dist/{chunk-6F5QW44A.js → chunk-KNHMXKC6.js} +2 -2
  23. package/dist/{chunk-4YJVRIUB.js → chunk-M7YRJX6V.js} +61 -29
  24. package/dist/{chunk-KFCQYZXR.js → chunk-OVLZQ6FZ.js} +61 -0
  25. package/dist/{chunk-BYSRJ4FE.js → chunk-PHMWH23E.js} +1 -1
  26. package/dist/{chunk-ZDOAUP3V.js → chunk-Q7Y57KOK.js} +2 -2
  27. package/dist/{chunk-LZVBNDGU.js → chunk-QXKQPUOM.js} +3 -3
  28. package/dist/{chunk-CX42VC67.js → chunk-SYQWQ6FE.js} +1 -1
  29. package/dist/{chunk-KV435YXO.js → chunk-T5YYFDZB.js} +1 -1
  30. package/dist/{chunk-YHZHPXDB.js → chunk-THVM6EP5.js} +419 -24
  31. package/dist/{chunk-V6XVZFFH.js → chunk-VRKK2CSZ.js} +111 -90
  32. package/dist/{chunk-OL2UEHRP.js → chunk-WUDSNHWF.js} +1 -1
  33. package/dist/{chunk-LCYYR57Q.js → chunk-WZDKNF37.js} +666 -107
  34. package/dist/{chunk-6EROGFUF.js → chunk-YLL7MF5C.js} +444 -131
  35. package/dist/{chunk-YD2JE54B.js → chunk-ZVC23LKV.js} +1 -1
  36. package/dist/compare.cjs +100 -97
  37. package/dist/compare.d.cts +1 -1
  38. package/dist/compare.d.ts +1 -1
  39. package/dist/compare.js +3 -3
  40. package/dist/core/commands/formatting-commands.d.cts +2 -2
  41. package/dist/core/commands/formatting-commands.d.ts +2 -2
  42. package/dist/core/commands/image-commands.cjs +182 -54
  43. package/dist/core/commands/image-commands.d.cts +2 -2
  44. package/dist/core/commands/image-commands.d.ts +2 -2
  45. package/dist/core/commands/image-commands.js +5 -5
  46. package/dist/core/commands/section-layout-commands.d.cts +2 -2
  47. package/dist/core/commands/section-layout-commands.d.ts +2 -2
  48. package/dist/core/commands/style-commands.d.cts +2 -2
  49. package/dist/core/commands/style-commands.d.ts +2 -2
  50. package/dist/core/commands/table-structure-commands.cjs +182 -54
  51. package/dist/core/commands/table-structure-commands.d.cts +2 -2
  52. package/dist/core/commands/table-structure-commands.d.ts +2 -2
  53. package/dist/core/commands/table-structure-commands.js +4 -4
  54. package/dist/core/commands/text-commands.cjs +182 -54
  55. package/dist/core/commands/text-commands.d.cts +2 -2
  56. package/dist/core/commands/text-commands.d.ts +2 -2
  57. package/dist/core/commands/text-commands.js +5 -5
  58. package/dist/core/selection/mapping.d.cts +2 -2
  59. package/dist/core/selection/mapping.d.ts +2 -2
  60. package/dist/core/state/editor-state.d.cts +2 -2
  61. package/dist/core/state/editor-state.d.ts +2 -2
  62. package/dist/index.cjs +2765 -557
  63. package/dist/index.d.cts +5 -5
  64. package/dist/index.d.ts +5 -5
  65. package/dist/index.js +52 -28
  66. package/dist/io/docx-session.cjs +267 -211
  67. package/dist/io/docx-session.d.cts +4 -4
  68. package/dist/io/docx-session.d.ts +4 -4
  69. package/dist/io/docx-session.js +6 -6
  70. package/dist/legal.cjs +9 -20
  71. package/dist/legal.d.cts +1 -1
  72. package/dist/legal.d.ts +1 -1
  73. package/dist/legal.js +3 -3
  74. package/dist/{loader-19ct2Be0.d.ts → loader-B-aL5HGD.d.ts} +3 -3
  75. package/dist/{loader-CoXQ2wGd.d.cts → loader-DiY_ZgKl.d.cts} +3 -3
  76. package/dist/{measurement-backend-canvas-Q3MJMEYX.js → measurement-backend-canvas-F7ZYDACK.js} +1 -1
  77. package/dist/{public-types-B-CskQen.d.cts → public-types-DyqnxxO9.d.ts} +252 -2
  78. package/dist/{public-types-7KZsNGE2.d.ts → public-types-gvubspUI.d.cts} +252 -2
  79. package/dist/public-types.cjs +809 -78
  80. package/dist/public-types.d.cts +2 -2
  81. package/dist/public-types.d.ts +2 -2
  82. package/dist/public-types.js +4 -4
  83. package/dist/runtime/collab.d.cts +3 -3
  84. package/dist/runtime/collab.d.ts +3 -3
  85. package/dist/runtime/document-runtime.cjs +1887 -313
  86. package/dist/runtime/document-runtime.d.cts +2 -2
  87. package/dist/runtime/document-runtime.d.ts +2 -2
  88. package/dist/runtime/document-runtime.js +17 -17
  89. package/dist/{session-B5015J4v.d.cts → session-BUN6B-Vj.d.cts} +3 -3
  90. package/dist/{session-C2i8-d6v.d.ts → session-CDB0hohT.d.ts} +3 -3
  91. package/dist/session.cjs +267 -211
  92. package/dist/session.d.cts +5 -5
  93. package/dist/session.d.ts +5 -5
  94. package/dist/session.js +7 -7
  95. package/dist/tailwind.cjs +809 -78
  96. package/dist/tailwind.d.cts +2 -2
  97. package/dist/tailwind.d.ts +2 -2
  98. package/dist/tailwind.js +8 -8
  99. package/dist/{types-DNhN0WeN.d.cts → types-C4bz3kDU.d.cts} +2 -2
  100. package/dist/{types-yvrQuGX9.d.ts → types-VWH6CRvG.d.ts} +2 -2
  101. package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
  102. package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
  103. package/dist/ui-tailwind/editor-surface/search-plugin.js +5 -5
  104. package/dist/ui-tailwind.cjs +809 -78
  105. package/dist/ui-tailwind.d.cts +3 -3
  106. package/dist/ui-tailwind.d.ts +3 -3
  107. package/dist/ui-tailwind.js +8 -8
  108. package/package.json +1 -1
@@ -3940,12 +3940,13 @@ function getLevelStartAt(level, levelDefinitions) {
3940
3940
  return levelDefinitions.get(level)?.startAt ?? DEFAULT_NUMBERING_START_AT;
3941
3941
  }
3942
3942
  function getNumberingFormatPosture(format, value) {
3943
- if (!isSupportedNumberingFormat(format)) {
3943
+ const registryEntry = getNumberingFormatRegistryEntry(format);
3944
+ if (!registryEntry || registryEntry.renderSupport === "approximated") {
3944
3945
  return {
3945
3946
  status: "approximated",
3946
3947
  requestedFormat: format,
3947
3948
  renderedFormat: "decimal",
3948
- reason: "unsupported-numbering-format-decimal-fallback"
3949
+ reason: registryEntry?.fallbackReason ?? "unsupported-numbering-format-decimal-fallback"
3949
3950
  };
3950
3951
  }
3951
3952
  if (value !== void 0 && ((format === "upperRoman" || format === "lowerRoman") && (value <= 0 || value >= 4e3) || (format === "cardinalText" || format === "ordinalText") && (!Number.isInteger(value) || value < 1 || value > 999) || (format === "upperLetter" || format === "lowerLetter" || format === "chicago") && value < 1)) {
@@ -3976,56 +3977,148 @@ function renderLevelText(text, counters, levelDefinitions) {
3976
3977
  });
3977
3978
  return rendered.trim().length > 0 ? rendered : null;
3978
3979
  }
3979
- var SUPPORTED_NUMBERING_FORMATS = /* @__PURE__ */ new Set([
3980
- "decimal",
3981
- "decimalZero",
3982
- "upperLetter",
3983
- "lowerLetter",
3984
- "upperRoman",
3985
- "lowerRoman",
3986
- "hex",
3987
- "ordinal",
3988
- "cardinalText",
3989
- "ordinalText",
3990
- "chicago",
3991
- "bullet",
3992
- "none"
3993
- ]);
3994
3980
  function isSupportedNumberingFormat(format) {
3995
- return SUPPORTED_NUMBERING_FORMATS.has(format);
3981
+ return getNumberingFormatRegistryEntry(format)?.renderSupport === "supported";
3982
+ }
3983
+ function getNumberingFormatRegistryEntry(format) {
3984
+ return NUMBERING_FORMAT_REGISTRY.get(format);
3996
3985
  }
3997
3986
  function formatCounter(value, format) {
3998
- switch (format) {
3999
- case "decimal":
4000
- return String(value);
4001
- case "decimalZero":
4002
- return String(value).padStart(2, "0");
4003
- case "upperLetter":
4004
- return toAlphabetic2(value).toUpperCase();
4005
- case "lowerLetter":
4006
- return toAlphabetic2(value).toLowerCase();
4007
- case "upperRoman":
4008
- return toRoman2(value).toUpperCase();
4009
- case "lowerRoman":
4010
- return toRoman2(value).toLowerCase();
4011
- case "hex":
4012
- return value >= 0 ? value.toString(16).toUpperCase() : String(value);
4013
- case "ordinal":
4014
- return toOrdinal2(value);
4015
- case "cardinalText":
4016
- return toCardinalText2(value);
4017
- case "ordinalText":
4018
- return toOrdinalText2(value);
4019
- case "chicago":
4020
- return toChicago2(value);
4021
- case "bullet":
4022
- return "";
4023
- case "none":
4024
- return "";
4025
- default:
4026
- return String(value);
3987
+ return getNumberingFormatRegistryEntry(format)?.render(value) ?? String(value);
3988
+ }
3989
+ var exactNumberingFormatEntries = [
3990
+ {
3991
+ format: "decimal",
3992
+ renderSupport: "supported",
3993
+ renderedFormat: "decimal",
3994
+ supportsMutation: true,
3995
+ render: (value) => String(value)
3996
+ },
3997
+ {
3998
+ format: "decimalZero",
3999
+ renderSupport: "supported",
4000
+ renderedFormat: "decimalZero",
4001
+ supportsMutation: true,
4002
+ render: (value) => String(value).padStart(2, "0")
4003
+ },
4004
+ {
4005
+ format: "upperLetter",
4006
+ renderSupport: "supported",
4007
+ renderedFormat: "upperLetter",
4008
+ supportsMutation: true,
4009
+ render: (value) => toAlphabetic2(value).toUpperCase()
4010
+ },
4011
+ {
4012
+ format: "lowerLetter",
4013
+ renderSupport: "supported",
4014
+ renderedFormat: "lowerLetter",
4015
+ supportsMutation: true,
4016
+ render: (value) => toAlphabetic2(value).toLowerCase()
4017
+ },
4018
+ {
4019
+ format: "upperRoman",
4020
+ renderSupport: "supported",
4021
+ renderedFormat: "upperRoman",
4022
+ supportsMutation: true,
4023
+ render: (value) => toRoman2(value).toUpperCase()
4024
+ },
4025
+ {
4026
+ format: "lowerRoman",
4027
+ renderSupport: "supported",
4028
+ renderedFormat: "lowerRoman",
4029
+ supportsMutation: true,
4030
+ render: (value) => toRoman2(value).toLowerCase()
4031
+ },
4032
+ {
4033
+ format: "hex",
4034
+ renderSupport: "supported",
4035
+ renderedFormat: "hex",
4036
+ supportsMutation: true,
4037
+ render: (value) => value >= 0 ? value.toString(16).toUpperCase() : String(value)
4038
+ },
4039
+ {
4040
+ format: "ordinal",
4041
+ renderSupport: "supported",
4042
+ renderedFormat: "ordinal",
4043
+ supportsMutation: true,
4044
+ render: toOrdinal2
4045
+ },
4046
+ {
4047
+ format: "cardinalText",
4048
+ renderSupport: "supported",
4049
+ renderedFormat: "cardinalText",
4050
+ supportsMutation: true,
4051
+ render: toCardinalText2
4052
+ },
4053
+ {
4054
+ format: "ordinalText",
4055
+ renderSupport: "supported",
4056
+ renderedFormat: "ordinalText",
4057
+ supportsMutation: true,
4058
+ render: toOrdinalText2
4059
+ },
4060
+ {
4061
+ format: "chicago",
4062
+ renderSupport: "supported",
4063
+ renderedFormat: "chicago",
4064
+ supportsMutation: true,
4065
+ render: toChicago2
4066
+ },
4067
+ {
4068
+ format: "bullet",
4069
+ renderSupport: "supported",
4070
+ renderedFormat: "bullet",
4071
+ supportsMutation: true,
4072
+ render: () => ""
4073
+ },
4074
+ {
4075
+ format: "none",
4076
+ renderSupport: "supported",
4077
+ renderedFormat: "none",
4078
+ supportsMutation: true,
4079
+ render: () => ""
4027
4080
  }
4028
- }
4081
+ ];
4082
+ var approximatedDecimalFormats = [
4083
+ "decimalEnclosedCircle",
4084
+ "decimalEnclosedFullstop",
4085
+ "decimalEnclosedParen",
4086
+ "decimalFullWidth",
4087
+ "decimalHalfWidth",
4088
+ "aiueo",
4089
+ "iroha",
4090
+ "ganada",
4091
+ "chosung",
4092
+ "russianLower",
4093
+ "russianUpper",
4094
+ "hebrew1",
4095
+ "hebrew2",
4096
+ "arabicAlpha",
4097
+ "arabicAbjad",
4098
+ "thaiLetters",
4099
+ "thaiNumbers",
4100
+ "hindiLetters",
4101
+ "hindiNumbers",
4102
+ "ideographDigital",
4103
+ "ideographTraditional",
4104
+ "chineseCounting",
4105
+ "japaneseCounting",
4106
+ "japaneseLegal"
4107
+ ];
4108
+ var approximatedNumberingFormatEntries = approximatedDecimalFormats.map((format) => ({
4109
+ format,
4110
+ renderSupport: "approximated",
4111
+ renderedFormat: "decimal",
4112
+ supportsMutation: false,
4113
+ fallbackReason: "unsupported-numbering-format-decimal-fallback",
4114
+ render: (value) => String(value)
4115
+ }));
4116
+ var NUMBERING_FORMAT_REGISTRY = new Map(
4117
+ [...exactNumberingFormatEntries, ...approximatedNumberingFormatEntries].map((entry) => [
4118
+ entry.format,
4119
+ entry
4120
+ ])
4121
+ );
4029
4122
  function toOrdinal2(value) {
4030
4123
  if (value <= 0) return String(value);
4031
4124
  const lastTwo = value % 100;
@@ -4679,12 +4772,36 @@ var DEFAULT_HYPERLINK_COLOR_HEX = "0563C1";
4679
4772
  function resolveHyperlinkRunFormatting(input, catalog, resolver) {
4680
4773
  const augmentedInput = input.characterStyleId === void 0 ? { ...input, characterStyleId: HYPERLINK_CHARACTER_STYLE_ID } : input;
4681
4774
  const cascade = resolveEffectiveRunFormatting(augmentedInput, catalog);
4682
- const resolvedColor = resolveHyperlinkColorHex(cascade, resolver);
4775
+ const resolvedColor = resolveHyperlinkColorHex(
4776
+ stripInheritedColorHexForImplicitHyperlink(input, catalog, cascade),
4777
+ resolver
4778
+ );
4683
4779
  if (resolvedColor && resolvedColor !== cascade.colorHex) {
4684
4780
  return { ...cascade, colorHex: resolvedColor };
4685
4781
  }
4686
4782
  return cascade;
4687
4783
  }
4784
+ function hasDirectNonAutoColor(input) {
4785
+ return Boolean(input.direct?.colorHex && input.direct.colorHex !== "auto");
4786
+ }
4787
+ function characterStyleDeclaresColorHex(styleId, catalog) {
4788
+ if (!catalog) return false;
4789
+ const chain = resolveCharacterStyleChain(styleId, catalog);
4790
+ return chain.some((chainStyleId) => {
4791
+ const colorHex = catalog.characters[chainStyleId]?.runProperties?.colorHex;
4792
+ return Boolean(colorHex && colorHex !== "auto");
4793
+ });
4794
+ }
4795
+ function stripInheritedColorHexForImplicitHyperlink(originalInput, catalog, cascade) {
4796
+ if (originalInput.characterStyleId !== void 0 || hasDirectNonAutoColor(originalInput) || !cascade.colorHex || cascade.colorHex === "auto" || characterStyleDeclaresColorHex(HYPERLINK_CHARACTER_STYLE_ID, catalog)) {
4797
+ return cascade;
4798
+ }
4799
+ const inheritedCascade = resolveEffectiveRunFormatting(originalInput, catalog);
4800
+ if (inheritedCascade.colorHex !== cascade.colorHex) {
4801
+ return cascade;
4802
+ }
4803
+ return { ...cascade, colorHex: void 0 };
4804
+ }
4688
4805
  function resolveHyperlinkColorHex(cascade, resolver) {
4689
4806
  if (cascade.colorHex && cascade.colorHex !== "auto") {
4690
4807
  return cascade.colorHex;
@@ -5443,6 +5560,7 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
5443
5560
  ...options.authorColorPalette ? { authorColorPalette: options.authorColorPalette } : {}
5444
5561
  });
5445
5562
  const editableTargetsByBlockPath = options.editableTargetsByBlockPath ?? indexEditableTargetsByBlockPath(document);
5563
+ const layoutIdentitiesByBlockPath = options.layoutIdentitiesByBlockPath;
5446
5564
  const activeStoryBlockPathBase = getActiveStoryBlockPathBase(document, activeStory);
5447
5565
  chartModelStore.beginBuildPass(document);
5448
5566
  const unsupportedNumberingFormatsSeen = options.emitFormattingTelemetry ? /* @__PURE__ */ new Set() : null;
@@ -5466,6 +5584,7 @@ function createEditorSurfaceSnapshot(document, _selection, activeStory = { kind:
5466
5584
  activeStory.kind !== "main",
5467
5585
  !isInViewport,
5468
5586
  editableTargetsByBlockPath,
5587
+ layoutIdentitiesByBlockPath,
5469
5588
  `${activeStoryBlockPathBase}/block[${index}]`
5470
5589
  );
5471
5590
  if (isInViewport) {
@@ -5532,7 +5651,7 @@ function isIndexInAnyRange(index, ranges) {
5532
5651
  }
5533
5652
  return false;
5534
5653
  }
5535
- function createSurfaceBlock(block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath) {
5654
+ function createSurfaceBlock(block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, layoutIdentitiesByBlockPath, blockPath) {
5536
5655
  if (block.type === "opaque_block") {
5537
5656
  const fragment = getOpaqueFragment(document.preservation, block.fragmentId);
5538
5657
  const descriptor = fragment ? describeOpaqueFragment(fragment) : null;
@@ -5569,6 +5688,7 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
5569
5688
  promoteSecondaryStoryTextBoxes,
5570
5689
  cullBuild,
5571
5690
  editableTargetsByBlockPath,
5691
+ layoutIdentitiesByBlockPath,
5572
5692
  blockPath
5573
5693
  );
5574
5694
  }
@@ -5609,6 +5729,7 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
5609
5729
  promoteSecondaryStoryTextBoxes,
5610
5730
  cullBuild,
5611
5731
  editableTargetsByBlockPath,
5732
+ layoutIdentitiesByBlockPath,
5612
5733
  blockPath
5613
5734
  );
5614
5735
  }
@@ -5691,10 +5812,11 @@ function createSurfaceBlock(block, document, cursor, counters, formattingContext
5691
5812
  cullBuild,
5692
5813
  editableTargetsByBlockPath,
5693
5814
  blockPath,
5694
- blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0
5815
+ blockPath !== void 0 ? editableTargetsByBlockPath.get(blockPath) : void 0,
5816
+ blockPath !== void 0 ? layoutIdentitiesByBlockPath?.get(blockPath) : void 0
5695
5817
  );
5696
5818
  }
5697
- function createTableBlock(tableIndex, table, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, tablePath) {
5819
+ function createTableBlock(tableIndex, table, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, layoutIdentitiesByBlockPath, tablePath) {
5698
5820
  const lockedFragmentIds = [];
5699
5821
  let innerCursor = cursor;
5700
5822
  if (cullBuild) {
@@ -5711,6 +5833,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
5711
5833
  promoteSecondaryStoryTextBoxes,
5712
5834
  true,
5713
5835
  editableTargetsByBlockPath,
5836
+ layoutIdentitiesByBlockPath,
5714
5837
  tablePath !== void 0 ? `${tablePath}/row[${rowIndex}]/cell[${cellIndex}]/block[${childIndex}]` : void 0
5715
5838
  );
5716
5839
  lockedFragmentIds.push(...result.lockedFragmentIds);
@@ -5726,6 +5849,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
5726
5849
  to: innerCursor,
5727
5850
  styleId: table.styleId,
5728
5851
  ...table.sourceRef !== void 0 ? { sourceRef: table.sourceRef } : {},
5852
+ ...tablePath !== void 0 && layoutIdentitiesByBlockPath?.get(tablePath) !== void 0 ? { layoutIdentity: layoutIdentitiesByBlockPath.get(tablePath) } : {},
5729
5853
  gridColumns: table.gridColumns,
5730
5854
  rows: []
5731
5855
  },
@@ -5763,6 +5887,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
5763
5887
  promoteSecondaryStoryTextBoxes,
5764
5888
  cullBuild,
5765
5889
  editableTargetsByBlockPath,
5890
+ layoutIdentitiesByBlockPath,
5766
5891
  tablePath !== void 0 ? `${tablePath}/row[${rowIndex}]/cell[${cellIndex}]/block[${childIndex}]` : void 0
5767
5892
  );
5768
5893
  cellContent.push(result.block);
@@ -5851,6 +5976,7 @@ function createTableBlock(tableIndex, table, document, cursor, counters, formatt
5851
5976
  to: innerCursor,
5852
5977
  styleId: table.styleId,
5853
5978
  ...table.sourceRef !== void 0 ? { sourceRef: table.sourceRef } : {},
5979
+ ...tablePath !== void 0 && layoutIdentitiesByBlockPath?.get(tablePath) !== void 0 ? { layoutIdentity: layoutIdentitiesByBlockPath.get(tablePath) } : {},
5854
5980
  gridColumns: table.gridColumns,
5855
5981
  ...gridColumnsRelative ? { gridColumnsRelative } : {},
5856
5982
  ...resolvedTable.table?.alignment ? { alignment: resolvedTable.table.alignment } : {},
@@ -6038,7 +6164,7 @@ function resolveCellBorderStyles(borders, tableBorders, position) {
6038
6164
  if (left) result.borderLeft = left;
6039
6165
  return result;
6040
6166
  }
6041
- function createSdtBlock(sdtIndex, block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, sdtPath) {
6167
+ function createSdtBlock(sdtIndex, block, document, cursor, counters, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, layoutIdentitiesByBlockPath, sdtPath) {
6042
6168
  const children = [];
6043
6169
  const lockedFragmentIds = [];
6044
6170
  let innerCursor = cursor;
@@ -6055,6 +6181,7 @@ function createSdtBlock(sdtIndex, block, document, cursor, counters, formattingC
6055
6181
  promoteSecondaryStoryTextBoxes,
6056
6182
  cullBuild,
6057
6183
  editableTargetsByBlockPath,
6184
+ layoutIdentitiesByBlockPath,
6058
6185
  sdtPath !== void 0 ? `${sdtPath}/block[${childIndex}]` : void 0
6059
6186
  );
6060
6187
  children.push(result.block);
@@ -6097,7 +6224,7 @@ function getRecursableSdtBlockedReasonCode(block) {
6097
6224
  ].filter(Boolean).join(" ").toLowerCase();
6098
6225
  return searchText.includes("table of contents") || /\btoc\b/u.test(searchText) ? "workflow_preserve_only" : null;
6099
6226
  }
6100
- function createParagraphBlock(paragraphIndex, paragraph, document, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath, editableTarget) {
6227
+ function createParagraphBlock(paragraphIndex, paragraph, document, start, formattingContext, promoteSecondaryStoryTextBoxes, cullBuild = false, editableTargetsByBlockPath = EMPTY_EDITABLE_TARGETS_BY_BLOCK_PATH, blockPath, editableTarget, layoutIdentity) {
6101
6228
  const themeResolver = formattingContext.theme;
6102
6229
  const effectiveNumbering = formattingContext.resolveEffectiveParagraphNumbering(paragraph);
6103
6230
  let resolvedNumbering = null;
@@ -6120,6 +6247,7 @@ function createParagraphBlock(paragraphIndex, paragraph, document, start, format
6120
6247
  from: start,
6121
6248
  to: start,
6122
6249
  ...editableTarget !== void 0 ? { editableTarget } : {},
6250
+ ...layoutIdentity !== void 0 ? { layoutIdentity } : {},
6123
6251
  ...paragraph.styleId ? { styleId: paragraph.styleId } : {},
6124
6252
  ...effectiveNumbering ? { numbering: effectiveNumbering } : {},
6125
6253
  ...resolvedNumbering ? {
@@ -1,8 +1,8 @@
1
- import { T as TextTransactionTextTarget, C as CanonicalDocumentEnvelope, S as SelectionSnapshot, d as TextTransactionResult, e as StructuralMutationResult, I as InsertTableOptions, f as TextFormattingDirective, g as TransactionMapping } from '../../public-types-B-CskQen.cjs';
1
+ import { T as TextTransactionTextTarget, C as CanonicalDocumentEnvelope, S as SelectionSnapshot, d as TextTransactionResult, e as StructuralMutationResult, I as InsertTableOptions, f as TextFormattingDirective, g as TransactionMapping } from '../../public-types-gvubspUI.cjs';
2
2
  import 'react';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
- import '../../canonical-document-CXCFCbAz.cjs';
5
+ import '../../canonical-document-BMtONpgf.cjs';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';
8
8
 
@@ -1,8 +1,8 @@
1
- import { T as TextTransactionTextTarget, C as CanonicalDocumentEnvelope, S as SelectionSnapshot, d as TextTransactionResult, e as StructuralMutationResult, I as InsertTableOptions, f as TextFormattingDirective, g as TransactionMapping } from '../../public-types-7KZsNGE2.js';
1
+ import { T as TextTransactionTextTarget, C as CanonicalDocumentEnvelope, S as SelectionSnapshot, d as TextTransactionResult, e as StructuralMutationResult, I as InsertTableOptions, f as TextFormattingDirective, g as TransactionMapping } from '../../public-types-DyqnxxO9.js';
2
2
  import 'react';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
- import '../../canonical-document-CXCFCbAz.js';
5
+ import '../../canonical-document-BMtONpgf.js';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';
8
8
 
@@ -8,14 +8,14 @@ import {
8
8
  insertText,
9
9
  outdentParagraphAtSelection,
10
10
  splitParagraph
11
- } from "../../chunk-LZVBNDGU.js";
11
+ } from "../../chunk-QXKQPUOM.js";
12
12
  import "../../chunk-Y4XZCMCS.js";
13
- import "../../chunk-KV435YXO.js";
14
- import "../../chunk-BYSRJ4FE.js";
13
+ import "../../chunk-T5YYFDZB.js";
14
+ import "../../chunk-PHMWH23E.js";
15
15
  import "../../chunk-QIO6V46H.js";
16
- import "../../chunk-CXSYRB37.js";
16
+ import "../../chunk-A3GSNB4G.js";
17
17
  import "../../chunk-OYGMRRR7.js";
18
- import "../../chunk-5DGKFNQT.js";
18
+ import "../../chunk-A66ZVUAT.js";
19
19
  import "../../chunk-UFVDIR2C.js";
20
20
  import "../../chunk-PGGPPZ65.js";
21
21
  import "../../chunk-DNXYUIIS.js";
@@ -1,7 +1,7 @@
1
- export { fi as Assoc, fj as BoundaryAssoc, fk as DEFAULT_BOUNDARY_ASSOC, fl as DetachedAnchor, fm as DocRange, a$ as EditorAnchorProjection, fn as InternalEditorAnchorProjection, fo as MAIN_STORY_TARGET, fp as MappingResult, fq as MappingStep, fr as NodeAnchor, fs as Position, ft as RangeAnchor, g as TransactionMapping, fu as anchorUnaffectedByMapping, fv as areAnchorsEqual, fw as createDetachedAnchor, fx as createEmptyMapping, fy as createNodeAnchor, fz as createRangeAnchor, fA as getEffectiveRange, fB as mapAnchor, fC as mapPosition, fD as mapRange, fE as normalizeRange, fF as storyTargetsEqual } from '../../public-types-B-CskQen.cjs';
1
+ export { fi as Assoc, fj as BoundaryAssoc, fk as DEFAULT_BOUNDARY_ASSOC, fl as DetachedAnchor, fm as DocRange, a$ as EditorAnchorProjection, fn as InternalEditorAnchorProjection, fo as MAIN_STORY_TARGET, fp as MappingResult, fq as MappingStep, fr as NodeAnchor, fs as Position, ft as RangeAnchor, g as TransactionMapping, fu as anchorUnaffectedByMapping, fv as areAnchorsEqual, fw as createDetachedAnchor, fx as createEmptyMapping, fy as createNodeAnchor, fz as createRangeAnchor, fA as getEffectiveRange, fB as mapAnchor, fC as mapPosition, fD as mapRange, fE as normalizeRange, fF as storyTargetsEqual } from '../../public-types-gvubspUI.cjs';
2
2
  import 'react';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
- import '../../canonical-document-CXCFCbAz.cjs';
5
+ import '../../canonical-document-BMtONpgf.cjs';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';
@@ -1,7 +1,7 @@
1
- export { fi as Assoc, fj as BoundaryAssoc, fk as DEFAULT_BOUNDARY_ASSOC, fl as DetachedAnchor, fm as DocRange, a$ as EditorAnchorProjection, fn as InternalEditorAnchorProjection, fo as MAIN_STORY_TARGET, fp as MappingResult, fq as MappingStep, fr as NodeAnchor, fs as Position, ft as RangeAnchor, g as TransactionMapping, fu as anchorUnaffectedByMapping, fv as areAnchorsEqual, fw as createDetachedAnchor, fx as createEmptyMapping, fy as createNodeAnchor, fz as createRangeAnchor, fA as getEffectiveRange, fB as mapAnchor, fC as mapPosition, fD as mapRange, fE as normalizeRange, fF as storyTargetsEqual } from '../../public-types-7KZsNGE2.js';
1
+ export { fi as Assoc, fj as BoundaryAssoc, fk as DEFAULT_BOUNDARY_ASSOC, fl as DetachedAnchor, fm as DocRange, a$ as EditorAnchorProjection, fn as InternalEditorAnchorProjection, fo as MAIN_STORY_TARGET, fp as MappingResult, fq as MappingStep, fr as NodeAnchor, fs as Position, ft as RangeAnchor, g as TransactionMapping, fu as anchorUnaffectedByMapping, fv as areAnchorsEqual, fw as createDetachedAnchor, fx as createEmptyMapping, fy as createNodeAnchor, fz as createRangeAnchor, fA as getEffectiveRange, fB as mapAnchor, fC as mapPosition, fD as mapRange, fE as normalizeRange, fF as storyTargetsEqual } from '../../public-types-DyqnxxO9.js';
2
2
  import 'react';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
- import '../../canonical-document-CXCFCbAz.js';
5
+ import '../../canonical-document-BMtONpgf.js';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';
@@ -1,5 +1,5 @@
1
- export { C as CanonicalDocumentEnvelope, fG as CommandStateSnapshot, fH as CommentEntryRecord, fI as CommentResolutionRecord, fJ as CommentSidebarSnapshot, fK as CommentThreadRecord, c2 as CompatibilityFeatureClass, c3 as CompatibilityFeatureEntry, fL as CompatibilityPanelSnapshot, q as CompatibilityReport, fM as CreateEditorStateOptions, fN as DocumentStats, r as EditorError, cm as EditorErrorCode, fO as EditorRuntimeState, fP as EditorState, cB as EditorWarning, cC as EditorWarningCode, fQ as PersistedEditorSnapshot, fR as ReviewStore, fS as RevisionMetadataRecord, fT as RevisionRecord, fU as RuntimePhase, fV as RuntimeRenderSnapshot, S as SelectionSnapshot, fW as TrackedChangesSnapshot, fX as createDefaultCanonicalDocument, fY as createEditorState, fZ as createEmptyCompatibilityReport, f_ as createEmptyReviewStore, f$ as createPersistedEditorSnapshot, g0 as createSelectionSnapshot, g1 as deriveDocumentStats, g2 as deriveRenderSnapshot, g3 as normalizeCommentThreadRecord } from '../../public-types-B-CskQen.cjs';
2
- export { o as createCanonicalDocumentId } from '../../canonical-document-CXCFCbAz.cjs';
1
+ export { C as CanonicalDocumentEnvelope, fG as CommandStateSnapshot, fH as CommentEntryRecord, fI as CommentResolutionRecord, fJ as CommentSidebarSnapshot, fK as CommentThreadRecord, c2 as CompatibilityFeatureClass, c3 as CompatibilityFeatureEntry, fL as CompatibilityPanelSnapshot, q as CompatibilityReport, fM as CreateEditorStateOptions, fN as DocumentStats, r as EditorError, cm as EditorErrorCode, fO as EditorRuntimeState, fP as EditorState, cB as EditorWarning, cC as EditorWarningCode, fQ as PersistedEditorSnapshot, fR as ReviewStore, fS as RevisionMetadataRecord, fT as RevisionRecord, fU as RuntimePhase, fV as RuntimeRenderSnapshot, S as SelectionSnapshot, fW as TrackedChangesSnapshot, fX as createDefaultCanonicalDocument, fY as createEditorState, fZ as createEmptyCompatibilityReport, f_ as createEmptyReviewStore, f$ as createPersistedEditorSnapshot, g0 as createSelectionSnapshot, g1 as deriveDocumentStats, g2 as deriveRenderSnapshot, g3 as normalizeCommentThreadRecord } from '../../public-types-gvubspUI.cjs';
2
+ export { o as createCanonicalDocumentId } from '../../canonical-document-BMtONpgf.cjs';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
@@ -1,5 +1,5 @@
1
- export { C as CanonicalDocumentEnvelope, fG as CommandStateSnapshot, fH as CommentEntryRecord, fI as CommentResolutionRecord, fJ as CommentSidebarSnapshot, fK as CommentThreadRecord, c2 as CompatibilityFeatureClass, c3 as CompatibilityFeatureEntry, fL as CompatibilityPanelSnapshot, q as CompatibilityReport, fM as CreateEditorStateOptions, fN as DocumentStats, r as EditorError, cm as EditorErrorCode, fO as EditorRuntimeState, fP as EditorState, cB as EditorWarning, cC as EditorWarningCode, fQ as PersistedEditorSnapshot, fR as ReviewStore, fS as RevisionMetadataRecord, fT as RevisionRecord, fU as RuntimePhase, fV as RuntimeRenderSnapshot, S as SelectionSnapshot, fW as TrackedChangesSnapshot, fX as createDefaultCanonicalDocument, fY as createEditorState, fZ as createEmptyCompatibilityReport, f_ as createEmptyReviewStore, f$ as createPersistedEditorSnapshot, g0 as createSelectionSnapshot, g1 as deriveDocumentStats, g2 as deriveRenderSnapshot, g3 as normalizeCommentThreadRecord } from '../../public-types-7KZsNGE2.js';
2
- export { o as createCanonicalDocumentId } from '../../canonical-document-CXCFCbAz.js';
1
+ export { C as CanonicalDocumentEnvelope, fG as CommandStateSnapshot, fH as CommentEntryRecord, fI as CommentResolutionRecord, fJ as CommentSidebarSnapshot, fK as CommentThreadRecord, c2 as CompatibilityFeatureClass, c3 as CompatibilityFeatureEntry, fL as CompatibilityPanelSnapshot, q as CompatibilityReport, fM as CreateEditorStateOptions, fN as DocumentStats, r as EditorError, cm as EditorErrorCode, fO as EditorRuntimeState, fP as EditorState, cB as EditorWarning, cC as EditorWarningCode, fQ as PersistedEditorSnapshot, fR as ReviewStore, fS as RevisionMetadataRecord, fT as RevisionRecord, fU as RuntimePhase, fV as RuntimeRenderSnapshot, S as SelectionSnapshot, fW as TrackedChangesSnapshot, fX as createDefaultCanonicalDocument, fY as createEditorState, fZ as createEmptyCompatibilityReport, f_ as createEmptyReviewStore, f$ as createPersistedEditorSnapshot, g0 as createSelectionSnapshot, g1 as deriveDocumentStats, g2 as deriveRenderSnapshot, g3 as normalizeCommentThreadRecord } from '../../public-types-DyqnxxO9.js';
2
+ export { o as createCanonicalDocumentId } from '../../canonical-document-BMtONpgf.js';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';