@beyondwork/docx-react-component 1.0.131 → 1.0.132

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 (98) hide show
  1. package/dist/api/public-types.cjs +679 -157
  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 +5 -3
  5. package/dist/api/v3.cjs +371 -32
  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-BMtONpgf.d.cts → canonical-document-CfZIc-fC.d.cts} +1 -1
  10. package/dist/{canonical-document-BMtONpgf.d.ts → canonical-document-CfZIc-fC.d.ts} +1 -1
  11. package/dist/{chunk-YLL7MF5C.js → chunk-43JAPM2F.js} +24 -17
  12. package/dist/{chunk-4YCWECLZ.js → chunk-4HGFJ6Z2.js} +1 -1
  13. package/dist/{chunk-HYHCRMR7.js → chunk-6736GA6J.js} +1 -1
  14. package/dist/{chunk-Q7Y57KOK.js → chunk-6TLZ6CMP.js} +2 -2
  15. package/dist/{chunk-DGA7M77X.js → chunk-ALWXYGXP.js} +2 -2
  16. package/dist/{chunk-PHMWH23E.js → chunk-C5LXKR54.js} +1 -1
  17. package/dist/{chunk-6TBLDBCL.js → chunk-CDEZGLQ3.js} +1 -1
  18. package/dist/{chunk-VRKK2CSZ.js → chunk-JVTDBX67.js} +2 -2
  19. package/dist/{chunk-THVM6EP5.js → chunk-LPLJZJT2.js} +1196 -35
  20. package/dist/{chunk-T5YYFDZB.js → chunk-N5FTU4HZ.js} +1 -1
  21. package/dist/{chunk-3YCQM2RV.js → chunk-QUTVR72L.js} +8 -7
  22. package/dist/{chunk-M7YRJX6V.js → chunk-RBWJHRNP.js} +1 -1
  23. package/dist/{chunk-A66ZVUAT.js → chunk-RYMMKOFI.js} +204 -10
  24. package/dist/{chunk-QXKQPUOM.js → chunk-SZ6BJA4Q.js} +3 -3
  25. package/dist/{chunk-A3GSNB4G.js → chunk-U3UMKA7B.js} +147 -13
  26. package/dist/{chunk-KNHMXKC6.js → chunk-UFPBYJMA.js} +2 -2
  27. package/dist/{chunk-35RHOE6I.js → chunk-UP2KDOYE.js} +6 -1162
  28. package/dist/{chunk-CI2TD3T4.js → chunk-W2I47J2Q.js} +1 -1
  29. package/dist/{chunk-7G5GR3VV.js → chunk-XYTWOJII.js} +5 -5
  30. package/dist/{chunk-WZDKNF37.js → chunk-YUHNDEV5.js} +7 -7
  31. package/dist/{chunk-ZVC23LKV.js → chunk-ZDYGRO2Z.js} +1 -1
  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 +312 -20
  37. package/dist/core/commands/image-commands.d.cts +2 -2
  38. package/dist/core/commands/image-commands.d.ts +2 -2
  39. package/dist/core/commands/image-commands.js +5 -5
  40. package/dist/core/commands/section-layout-commands.d.cts +2 -2
  41. package/dist/core/commands/section-layout-commands.d.ts +2 -2
  42. package/dist/core/commands/style-commands.d.cts +2 -2
  43. package/dist/core/commands/style-commands.d.ts +2 -2
  44. package/dist/core/commands/table-structure-commands.cjs +312 -20
  45. package/dist/core/commands/table-structure-commands.d.cts +2 -2
  46. package/dist/core/commands/table-structure-commands.d.ts +2 -2
  47. package/dist/core/commands/table-structure-commands.js +4 -4
  48. package/dist/core/commands/text-commands.cjs +312 -20
  49. package/dist/core/commands/text-commands.d.cts +2 -2
  50. package/dist/core/commands/text-commands.d.ts +2 -2
  51. package/dist/core/commands/text-commands.js +5 -5
  52. package/dist/core/selection/mapping.d.cts +2 -2
  53. package/dist/core/selection/mapping.d.ts +2 -2
  54. package/dist/core/state/editor-state.d.cts +2 -2
  55. package/dist/core/state/editor-state.d.ts +2 -2
  56. package/dist/index.cjs +3015 -2213
  57. package/dist/index.d.cts +5 -5
  58. package/dist/index.d.ts +5 -5
  59. package/dist/index.js +554 -99
  60. package/dist/io/docx-session.d.cts +4 -4
  61. package/dist/io/docx-session.d.ts +4 -4
  62. package/dist/io/docx-session.js +4 -4
  63. package/dist/legal.d.cts +1 -1
  64. package/dist/legal.d.ts +1 -1
  65. package/dist/legal.js +3 -3
  66. package/dist/{loader-B-aL5HGD.d.ts → loader-CfpeEPAa.d.ts} +3 -3
  67. package/dist/{loader-DiY_ZgKl.d.cts → loader-MAa8VpzW.d.cts} +3 -3
  68. package/dist/{public-types-gvubspUI.d.cts → public-types-Cjs8glST.d.ts} +137 -2
  69. package/dist/{public-types-DyqnxxO9.d.ts → public-types-KBS6JnOs.d.cts} +137 -2
  70. package/dist/public-types.cjs +679 -157
  71. package/dist/public-types.d.cts +2 -2
  72. package/dist/public-types.d.ts +2 -2
  73. package/dist/public-types.js +5 -3
  74. package/dist/runtime/collab.d.cts +3 -3
  75. package/dist/runtime/collab.d.ts +3 -3
  76. package/dist/runtime/document-runtime.cjs +371 -22
  77. package/dist/runtime/document-runtime.d.cts +2 -2
  78. package/dist/runtime/document-runtime.d.ts +2 -2
  79. package/dist/runtime/document-runtime.js +14 -14
  80. package/dist/{session-CDB0hohT.d.ts → session-CkoH8FoY.d.ts} +3 -3
  81. package/dist/{session-BUN6B-Vj.d.cts → session-wwe0Gib-.d.cts} +3 -3
  82. package/dist/session.d.cts +5 -5
  83. package/dist/session.d.ts +5 -5
  84. package/dist/session.js +5 -5
  85. package/dist/tailwind.cjs +492 -202
  86. package/dist/tailwind.d.cts +2 -2
  87. package/dist/tailwind.d.ts +2 -2
  88. package/dist/tailwind.js +7 -7
  89. package/dist/{types-C4bz3kDU.d.cts → types-B3SGRW0w.d.cts} +2 -2
  90. package/dist/{types-VWH6CRvG.d.ts → types-CH7NWqVL.d.ts} +2 -2
  91. package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
  92. package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
  93. package/dist/ui-tailwind/editor-surface/search-plugin.js +4 -4
  94. package/dist/ui-tailwind.cjs +492 -202
  95. package/dist/ui-tailwind.d.cts +3 -3
  96. package/dist/ui-tailwind.d.ts +3 -3
  97. package/dist/ui-tailwind.js +7 -7
  98. package/package.json +1 -1
@@ -2,13 +2,13 @@ import {
2
2
  insertImage,
3
3
  repositionFloatingImage,
4
4
  resizeImage
5
- } from "../../chunk-KNHMXKC6.js";
6
- import "../../chunk-T5YYFDZB.js";
7
- import "../../chunk-PHMWH23E.js";
5
+ } from "../../chunk-UFPBYJMA.js";
6
+ import "../../chunk-N5FTU4HZ.js";
7
+ import "../../chunk-C5LXKR54.js";
8
8
  import "../../chunk-QIO6V46H.js";
9
- import "../../chunk-A3GSNB4G.js";
9
+ import "../../chunk-U3UMKA7B.js";
10
10
  import "../../chunk-OYGMRRR7.js";
11
- import "../../chunk-A66ZVUAT.js";
11
+ import "../../chunk-RYMMKOFI.js";
12
12
  import "../../chunk-UFVDIR2C.js";
13
13
  import "../../chunk-PGGPPZ65.js";
14
14
  import "../../chunk-DNXYUIIS.js";
@@ -1,5 +1,5 @@
1
- import { h as SelectionSnapshot, M as MarginPresetDefinition, i as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-gvubspUI.cjs';
2
- import { C as CanonicalDocument, P as PageSize, a as PageMargins, b as ColumnProperties, c as PageNumbering } from '../../canonical-document-BMtONpgf.cjs';
1
+ import { h as SelectionSnapshot, M as MarginPresetDefinition, i as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-KBS6JnOs.cjs';
2
+ import { C as CanonicalDocument, P as PageSize, a as PageMargins, b as ColumnProperties, c as PageNumbering } from '../../canonical-document-CfZIc-fC.cjs';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
@@ -1,5 +1,5 @@
1
- import { h as SelectionSnapshot, M as MarginPresetDefinition, i as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-DyqnxxO9.js';
2
- import { C as CanonicalDocument, P as PageSize, a as PageMargins, b as ColumnProperties, c as PageNumbering } from '../../canonical-document-BMtONpgf.js';
1
+ import { h as SelectionSnapshot, M as MarginPresetDefinition, i as PageFormatDefinition, R as RuntimeRenderSnapshot } from '../../public-types-Cjs8glST.js';
2
+ import { C as CanonicalDocument, P as PageSize, a as PageMargins, b as ColumnProperties, c as PageNumbering } from '../../canonical-document-CfZIc-fC.js';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
@@ -1,8 +1,8 @@
1
- import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-gvubspUI.cjs';
1
+ import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-KBS6JnOs.cjs';
2
2
  import 'react';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
- import '../../canonical-document-BMtONpgf.cjs';
5
+ import '../../canonical-document-CfZIc-fC.cjs';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';
8
8
 
@@ -1,8 +1,8 @@
1
- import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-DyqnxxO9.js';
1
+ import { P as PersistedEditorSnapshot, R as RuntimeRenderSnapshot } from '../../public-types-Cjs8glST.js';
2
2
  import 'react';
3
3
  import 'yjs';
4
4
  import 'y-protocols/awareness';
5
- import '../../canonical-document-BMtONpgf.js';
5
+ import '../../canonical-document-CfZIc-fC.js';
6
6
  import 'prosemirror-state';
7
7
  import 'prosemirror-model';
8
8
 
@@ -264,11 +264,14 @@ function collectEditableTargetRefs(doc, cache) {
264
264
  collectEditableTargetsInBlocks(
265
265
  context.blocks,
266
266
  {
267
+ doc,
267
268
  storyKey: context.storyKey,
268
269
  basePath: context.basePath,
269
270
  insideSdt: false,
270
271
  insideTextBox: false,
271
- tableDepth: 0
272
+ tableDepth: 0,
273
+ numberingCatalogHash: createNumberingCatalogRevisionHash(doc),
274
+ numberingTargetRevisionHash: createNumberingTargetRevisionHash(doc)
272
275
  },
273
276
  targets,
274
277
  cache
@@ -285,6 +288,7 @@ function buildBlockCacheSignature(context, blockIndex) {
285
288
  const owner = tt?.editableOwnersByChildIndex?.get(blockIndex);
286
289
  return [
287
290
  context.storyKey,
291
+ context.numberingTargetRevisionHash,
288
292
  context.insideSdt ? "1" : "0",
289
293
  context.insideTextBox ? "1" : "0",
290
294
  String(context.tableDepth),
@@ -330,7 +334,8 @@ function collectEditableTargetsInBlocks(blocks, context, targets, cache, blockIn
330
334
  editableParagraphTargetPosture(targetKind),
331
335
  context.contentControl,
332
336
  context.tableTarget,
333
- context.tableTarget?.editableOwnersByChildIndex?.get(blockIndex)
337
+ context.tableTarget?.editableOwnersByChildIndex?.get(blockIndex),
338
+ resolveEditableParagraphListIdentity(block, context)
334
339
  )
335
340
  );
336
341
  }
@@ -859,7 +864,7 @@ function collectEditableTargetsInInlines(inlines, basePath, context, targets) {
859
864
  }
860
865
  }
861
866
  }
862
- function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, targetPosture = { editability: "editable", posture: { blockers: [] } }, contentControl, tableTarget, editableOwner) {
867
+ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, targetPosture = { editability: "editable", posture: { blockers: [] } }, contentControl, tableTarget, editableOwner, listIdentity) {
863
868
  const paragraphText = collectParagraphText(paragraph);
864
869
  const paragraphTextHash = hashText(paragraphText);
865
870
  const sourceRef = paragraph.sourceRef;
@@ -870,19 +875,39 @@ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, tar
870
875
  context: { storyKey, insideSdt: contentControl !== void 0 },
871
876
  ...tableTarget
872
877
  }) : void 0;
873
- const listAddress = paragraph.numbering !== void 0 ? createCanonicalAddress({
878
+ const listAddress = listIdentity !== void 0 ? createCanonicalAddress({
874
879
  addressKind: "list-item-text",
875
880
  storyKey,
876
881
  staleCheckKind: "paragraph",
877
882
  operationScope: "list-text",
878
- sourceRefs: [sourceRef],
883
+ sourceRefs: [
884
+ sourceRef,
885
+ listIdentity.paragraphNumberingSourceRef,
886
+ listIdentity.instanceSourceRef,
887
+ listIdentity.abstractSourceRef
888
+ ],
879
889
  staleHash: paragraphTextHash,
880
890
  rangeBoundary: { boundaryKind: "list-item-text" },
891
+ list: {
892
+ numberingOrigin: listIdentity.numberingOrigin,
893
+ numberingInstanceId: listIdentity.numberingInstanceId,
894
+ ...listIdentity.abstractNumberingId !== void 0 ? { abstractNumberingId: listIdentity.abstractNumberingId } : {},
895
+ level: listIdentity.level,
896
+ ...listIdentity.overrideHash !== void 0 ? { overrideHash: listIdentity.overrideHash } : {},
897
+ numberingCatalogHash: listIdentity.numberingCatalogHash
898
+ },
881
899
  discriminator: {
882
900
  blockPath,
883
- numberingInstanceId: paragraph.numbering.numberingInstanceId,
884
- level: paragraph.numbering.level,
901
+ numberingOrigin: listIdentity.numberingOrigin,
902
+ numberingInstanceId: listIdentity.numberingInstanceId,
903
+ abstractNumberingId: listIdentity.abstractNumberingId ?? null,
904
+ level: listIdentity.level,
905
+ overrideHash: listIdentity.overrideHash ?? null,
906
+ numberingCatalogHash: listIdentity.numberingCatalogHash,
885
907
  sourceId: sourceRef?.sourceId ?? null,
908
+ numberingSourceId: listIdentity.paragraphNumberingSourceRef?.sourceId ?? null,
909
+ numberingInstanceSourceId: listIdentity.instanceSourceRef?.sourceId ?? null,
910
+ abstractNumberingSourceId: listIdentity.abstractSourceRef?.sourceId ?? null,
886
911
  paraId: paragraph.wordExtensionIds?.paraId ?? null,
887
912
  textId: paragraph.wordExtensionIds?.textId ?? null
888
913
  }
@@ -923,11 +948,62 @@ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, tar
923
948
  blockType: "paragraph",
924
949
  ...paragraph.wordExtensionIds?.paraId !== void 0 ? { wordParaId: paragraph.wordExtensionIds.paraId } : {},
925
950
  ...paragraph.wordExtensionIds?.textId !== void 0 ? { wordTextId: paragraph.wordExtensionIds.textId } : {},
926
- ...sourceRef !== void 0 ? { sourceRef } : {}
951
+ ...sourceRef !== void 0 ? { sourceRef } : {},
952
+ ...listIdentity !== void 0 ? {
953
+ listNumberingOrigin: listIdentity.numberingOrigin,
954
+ listNumberingInstanceId: listIdentity.numberingInstanceId,
955
+ ...listIdentity.abstractNumberingId !== void 0 ? { listAbstractNumberingId: listIdentity.abstractNumberingId } : {},
956
+ listLevel: listIdentity.level,
957
+ ...listIdentity.overrideHash !== void 0 ? { listOverrideHash: listIdentity.overrideHash } : {},
958
+ numberingCatalogHash: listIdentity.numberingCatalogHash
959
+ } : {}
927
960
  },
928
961
  posture
929
962
  };
930
963
  }
964
+ function resolveEditableParagraphListIdentity(paragraph, context) {
965
+ const directNumbering = paragraph.numbering;
966
+ const styleNumbering = directNumbering === void 0 && paragraph.styleId !== void 0 ? resolveParagraphStyleNumbering(context.doc, paragraph.styleId) : void 0;
967
+ const numbering = directNumbering ?? styleNumbering;
968
+ if (numbering === void 0) return void 0;
969
+ const numberingCatalog = context.doc.numbering ?? { abstractDefinitions: {}, instances: {} };
970
+ const instances = numberingCatalog.instances ?? {};
971
+ const abstractDefinitions = numberingCatalog.abstractDefinitions ?? {};
972
+ const instance = instances[numbering.numberingInstanceId];
973
+ const abstractDefinition = instance !== void 0 ? abstractDefinitions[instance.abstractNumberingId] : void 0;
974
+ const level = numbering.level ?? 0;
975
+ const override = instance?.overrides.find((entry) => entry.level === level);
976
+ const overrideHash = override !== void 0 ? hashText(JSON.stringify(numberingOverrideDiscriminator(override))) : void 0;
977
+ return {
978
+ numberingOrigin: directNumbering !== void 0 ? "paragraph" : "paragraph-style",
979
+ numberingInstanceId: numbering.numberingInstanceId,
980
+ ...instance?.abstractNumberingId !== void 0 ? { abstractNumberingId: instance.abstractNumberingId } : {},
981
+ level,
982
+ ...overrideHash !== void 0 ? { overrideHash } : {},
983
+ numberingCatalogHash: context.numberingCatalogHash,
984
+ ...directNumbering?.sourceRef !== void 0 ? { paragraphNumberingSourceRef: directNumbering.sourceRef } : {},
985
+ ...instance?.sourceRef !== void 0 ? { instanceSourceRef: instance.sourceRef } : {},
986
+ ...abstractDefinition?.sourceRef !== void 0 ? { abstractSourceRef: abstractDefinition.sourceRef } : {}
987
+ };
988
+ }
989
+ function numberingOverrideDiscriminator(override) {
990
+ return {
991
+ level: override.level,
992
+ startAt: override.startAt ?? null,
993
+ sourceId: override.sourceRef?.sourceId ?? null,
994
+ levelDefinition: override.levelDefinition === void 0 ? null : {
995
+ sourceId: override.levelDefinition.sourceRef?.sourceId ?? null,
996
+ format: override.levelDefinition.format ?? null,
997
+ text: override.levelDefinition.text ?? null,
998
+ startAt: override.levelDefinition.startAt ?? null,
999
+ paragraphStyleId: override.levelDefinition.paragraphStyleId ?? null,
1000
+ isLegalNumbering: override.levelDefinition.isLegalNumbering ?? null,
1001
+ suffix: override.levelDefinition.suffix ?? null,
1002
+ restartAfterLevel: override.levelDefinition.restartAfterLevel ?? null,
1003
+ picBulletId: override.levelDefinition.picBulletId ?? null
1004
+ }
1005
+ };
1006
+ }
931
1007
  function contentControlLocksContent(contentControl) {
932
1008
  return contentControl?.lock !== void 0 && contentControl.lock !== "unlocked" && contentControl.lock !== "none";
933
1009
  }
@@ -1696,6 +1772,7 @@ function createCanonicalAddress(input) {
1696
1772
  ...input.rowRange !== void 0 ? { rowRange: input.rowRange } : {},
1697
1773
  ...input.columnRange !== void 0 ? { columnRange: input.columnRange } : {},
1698
1774
  ...sourceHash !== void 0 ? { sourceJoinHash: sourceHash } : {},
1775
+ ...input.list !== void 0 ? { list: input.list } : {},
1699
1776
  ...input.secondaryStory === true ? { secondaryStory: true } : {},
1700
1777
  ...input.nestedTable === true ? { nestedTable: true } : {},
1701
1778
  ...input.insideSdt === true ? { insideSdt: true } : {},
@@ -1730,6 +1807,87 @@ function sourceJoinHash(refs) {
1730
1807
  if (sourceIds.length === 0) return void 0;
1731
1808
  return hashText(sourceIds.join("\0"));
1732
1809
  }
1810
+ function createNumberingCatalogRevisionHash(doc) {
1811
+ const catalog = doc.numbering ?? { abstractDefinitions: {}, instances: {} };
1812
+ const abstractDefinitions = catalog.abstractDefinitions ?? {};
1813
+ const instances = catalog.instances ?? {};
1814
+ const numPicBullets = catalog.numPicBullets ?? {};
1815
+ return hashText(JSON.stringify({
1816
+ abstractDefinitions: Object.keys(abstractDefinitions).sort().map((abstractNumberingId) => {
1817
+ const definition = abstractDefinitions[abstractNumberingId];
1818
+ return {
1819
+ abstractNumberingId,
1820
+ sourceId: definition.sourceRef?.sourceId ?? null,
1821
+ nsid: definition.nsid ?? null,
1822
+ tplc: definition.tplc ?? null,
1823
+ styleLink: definition.styleLink ?? null,
1824
+ numStyleLink: definition.numStyleLink ?? null,
1825
+ levels: definition.levels.map((level) => ({
1826
+ sourceId: level.sourceRef?.sourceId ?? null,
1827
+ level: level.level,
1828
+ format: level.format,
1829
+ text: level.text,
1830
+ startAt: level.startAt ?? null,
1831
+ paragraphStyleId: level.paragraphStyleId ?? null,
1832
+ isLegalNumbering: level.isLegalNumbering ?? null,
1833
+ suffix: level.suffix ?? null,
1834
+ restartAfterLevel: level.restartAfterLevel ?? null,
1835
+ picBulletId: level.picBulletId ?? null
1836
+ }))
1837
+ };
1838
+ }),
1839
+ instances: Object.keys(instances).sort().map((numberingInstanceId) => {
1840
+ const instance = instances[numberingInstanceId];
1841
+ return {
1842
+ numberingInstanceId,
1843
+ sourceId: instance.sourceRef?.sourceId ?? null,
1844
+ abstractNumberingId: instance.abstractNumberingId,
1845
+ overrides: instance.overrides.map(numberingOverrideDiscriminator)
1846
+ };
1847
+ }),
1848
+ numPicBullets: Object.keys(numPicBullets).sort().map((numPicBulletId) => {
1849
+ const picBullet = numPicBullets[numPicBulletId];
1850
+ return {
1851
+ numPicBulletId,
1852
+ sourceId: picBullet.sourceRef?.sourceId ?? null,
1853
+ mediaId: picBullet.mediaId ?? null,
1854
+ widthEmu: picBullet.widthEmu ?? null,
1855
+ heightEmu: picBullet.heightEmu ?? null
1856
+ };
1857
+ })
1858
+ }));
1859
+ }
1860
+ function createNumberingTargetRevisionHash(doc) {
1861
+ const paragraphStyles = doc.styles?.paragraphs ?? {};
1862
+ return hashText(JSON.stringify({
1863
+ numberingCatalogHash: createNumberingCatalogRevisionHash(doc),
1864
+ paragraphStyleNumbering: Object.keys(paragraphStyles).sort().map((styleId) => {
1865
+ const style = paragraphStyles[styleId];
1866
+ return {
1867
+ styleId,
1868
+ basedOn: style.basedOn ?? null,
1869
+ numberingInstanceId: style.numbering?.numberingInstanceId ?? null,
1870
+ level: style.numbering?.level ?? null
1871
+ };
1872
+ })
1873
+ }));
1874
+ }
1875
+ function resolveParagraphStyleNumbering(doc, styleId) {
1876
+ const visited = /* @__PURE__ */ new Set();
1877
+ let currentStyleId = styleId;
1878
+ while (currentStyleId !== void 0 && !visited.has(currentStyleId)) {
1879
+ visited.add(currentStyleId);
1880
+ const style = doc.styles?.paragraphs?.[currentStyleId];
1881
+ if (style === void 0) {
1882
+ return void 0;
1883
+ }
1884
+ if (style.numbering !== void 0) {
1885
+ return style.numbering;
1886
+ }
1887
+ currentStyleId = style.basedOn;
1888
+ }
1889
+ return void 0;
1890
+ }
1733
1891
  function collectCanonicalFieldRegionIdentities(doc) {
1734
1892
  const registry = doc.fieldRegistry;
1735
1893
  const byFieldIndex = new Map(
@@ -3336,6 +3494,10 @@ function createNumberingPrefixResolver(catalog) {
3336
3494
  ])
3337
3495
  ) : resolved.effectiveLevels;
3338
3496
  const picBulletId = resolved.effectiveLevel.picBulletId;
3497
+ const pictureBulletPosture = resolvePictureBulletRenderPosture(
3498
+ picBulletId,
3499
+ picBulletId != null ? catalog.numPicBullets?.[picBulletId] : void 0
3500
+ );
3339
3501
  const text = renderLevelText(
3340
3502
  resolved.effectiveLevel.text,
3341
3503
  workingState.counters,
@@ -3344,14 +3506,20 @@ function createNumberingPrefixResolver(catalog) {
3344
3506
  if (picBulletId == null && resolved.effectiveLevel.format !== "none" && text === null) {
3345
3507
  return null;
3346
3508
  }
3347
- const visibleText = resolved.effectiveLevel.format === "none" ? null : text;
3509
+ const visibleText = resolved.effectiveLevel.format === "none" ? null : text ?? pictureBulletPosture?.fallbackGlyph ?? null;
3510
+ const normalizedMarkerText = normalizeMarkerText(
3511
+ visibleText,
3512
+ resolved.effectiveLevel.format,
3513
+ resolved.geometry.markerRunProperties
3514
+ );
3348
3515
  const formatPosture = getNumberingFormatPosture(
3349
3516
  resolved.effectiveLevel.format,
3350
3517
  currentCounter
3351
3518
  );
3352
- const picBulletMediaId = picBulletId != null ? catalog.numPicBullets?.[picBulletId]?.mediaId : void 0;
3519
+ const picBulletMediaId = pictureBulletPosture?.mediaId;
3353
3520
  return {
3354
- text: visibleText,
3521
+ text: normalizedMarkerText.text,
3522
+ ...normalizedMarkerText.posture !== void 0 ? { markerTextPosture: normalizedMarkerText.posture } : {},
3355
3523
  level: resolved.effectiveLevel.level,
3356
3524
  format: resolved.effectiveLevel.format,
3357
3525
  ...formatPosture !== void 0 ? { formatPosture } : {},
@@ -3361,7 +3529,9 @@ function createNumberingPrefixResolver(catalog) {
3361
3529
  ...resolved.effectiveLevel.isLegalNumbering ? { isLegalNumbering: true } : {},
3362
3530
  ...resolved.geometry.markerRunProperties ? { markerRunProperties: resolved.geometry.markerRunProperties } : {},
3363
3531
  geometry: resolved.geometry,
3364
- ...picBulletMediaId != null ? { picBulletMediaId } : {}
3532
+ ...picBulletId != null ? { picBulletId } : {},
3533
+ ...picBulletMediaId != null ? { picBulletMediaId } : {},
3534
+ ...pictureBulletPosture !== void 0 ? { pictureBulletPosture } : {}
3365
3535
  };
3366
3536
  }
3367
3537
  return {
@@ -3377,6 +3547,69 @@ function createNumberingPrefixResolver(catalog) {
3377
3547
  }
3378
3548
  };
3379
3549
  }
3550
+ function normalizeMarkerText(text, format, markerRunProperties) {
3551
+ if (text === null || format !== "bullet") {
3552
+ return { text };
3553
+ }
3554
+ const fontFamily = getMarkerFontFamily(markerRunProperties);
3555
+ if (!isKnownSymbolBulletFont(fontFamily)) {
3556
+ return { text };
3557
+ }
3558
+ const renderedText = Array.from(text, (char) => SYMBOL_BULLET_GLYPH_MAP.get(char) ?? char).join("");
3559
+ if (renderedText === text) {
3560
+ return { text };
3561
+ }
3562
+ return {
3563
+ text: renderedText,
3564
+ posture: {
3565
+ status: "normalized",
3566
+ sourceText: text,
3567
+ renderedText,
3568
+ reason: "symbol-font-bullet-normalized",
3569
+ ...fontFamily ? { fontFamily } : {}
3570
+ }
3571
+ };
3572
+ }
3573
+ function getMarkerFontFamily(markerRunProperties) {
3574
+ return markerRunProperties?.fontFamilyAscii ?? markerRunProperties?.fontFamilyHAnsi ?? markerRunProperties?.fontFamilyEastAsia ?? markerRunProperties?.fontFamilyCs ?? markerRunProperties?.fontFamily;
3575
+ }
3576
+ function isKnownSymbolBulletFont(fontFamily) {
3577
+ return fontFamily !== void 0 && /^(?:symbol|wingdings|wingdings 2|wingdings 3|webdings)$/iu.test(
3578
+ fontFamily.trim()
3579
+ );
3580
+ }
3581
+ var SYMBOL_BULLET_GLYPH_MAP = /* @__PURE__ */ new Map([
3582
+ ["\uF0B7", "\u2022"],
3583
+ ["\uF0A7", "\u25AA"],
3584
+ ["\uF0FC", "\u2713"]
3585
+ ]);
3586
+ function resolvePictureBulletRenderPosture(picBulletId, picBullet) {
3587
+ if (picBulletId == null) return void 0;
3588
+ if (!picBullet) {
3589
+ return {
3590
+ status: "preserve-only",
3591
+ picBulletId,
3592
+ fallbackGlyph: "\u2022",
3593
+ reason: "picture-bullet-catalog-entry-missing"
3594
+ };
3595
+ }
3596
+ if (picBullet.mediaId) {
3597
+ return {
3598
+ status: "media-rendered",
3599
+ picBulletId,
3600
+ mediaId: picBullet.mediaId,
3601
+ ...picBullet.sourceRef ? { sourceRef: picBullet.sourceRef } : {},
3602
+ reason: "picture-bullet-media-rendered"
3603
+ };
3604
+ }
3605
+ return {
3606
+ status: "glyph-fallback",
3607
+ picBulletId,
3608
+ fallbackGlyph: "\u2022",
3609
+ ...picBullet.sourceRef ? { sourceRef: picBullet.sourceRef } : {},
3610
+ reason: "picture-bullet-media-unavailable"
3611
+ };
3612
+ }
3380
3613
  function getSequenceState(states, numberingInstanceId, options = { create: true }) {
3381
3614
  const existing = states.get(numberingInstanceId);
3382
3615
  if (existing) {
@@ -3439,7 +3672,7 @@ function getNumberingFormatPosture(format, value) {
3439
3672
  reason: registryEntry?.fallbackReason ?? "unsupported-numbering-format-decimal-fallback"
3440
3673
  };
3441
3674
  }
3442
- 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)) {
3675
+ if (value !== void 0 && (registryEntry.isInRange !== void 0 && !registryEntry.isInRange(value) || (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)) {
3443
3676
  return {
3444
3677
  status: "approximated",
3445
3678
  requestedFormat: format,
@@ -3533,6 +3766,37 @@ var exactNumberingFormatEntries = [
3533
3766
  supportsMutation: true,
3534
3767
  render: toOrdinal2
3535
3768
  },
3769
+ {
3770
+ format: "decimalFullWidth",
3771
+ renderSupport: "supported",
3772
+ renderedFormat: "decimalFullWidth",
3773
+ supportsMutation: false,
3774
+ render: toFullWidthDecimal
3775
+ },
3776
+ {
3777
+ format: "decimalEnclosedCircle",
3778
+ renderSupport: "supported",
3779
+ renderedFormat: "decimalEnclosedCircle",
3780
+ supportsMutation: false,
3781
+ render: toCircledDecimal,
3782
+ isInRange: (value) => Number.isInteger(value) && value >= 0 && value <= 50
3783
+ },
3784
+ {
3785
+ format: "decimalEnclosedParen",
3786
+ renderSupport: "supported",
3787
+ renderedFormat: "decimalEnclosedParen",
3788
+ supportsMutation: false,
3789
+ render: (value) => Number.isInteger(value) && value > 0 ? `(${value})` : String(value),
3790
+ isInRange: (value) => Number.isInteger(value) && value > 0
3791
+ },
3792
+ {
3793
+ format: "decimalEnclosedFullstop",
3794
+ renderSupport: "supported",
3795
+ renderedFormat: "decimalEnclosedFullstop",
3796
+ supportsMutation: false,
3797
+ render: (value) => Number.isInteger(value) && value > 0 ? `${value}.` : String(value),
3798
+ isInRange: (value) => Number.isInteger(value) && value > 0
3799
+ },
3536
3800
  {
3537
3801
  format: "cardinalText",
3538
3802
  renderSupport: "supported",
@@ -3570,10 +3834,6 @@ var exactNumberingFormatEntries = [
3570
3834
  }
3571
3835
  ];
3572
3836
  var approximatedDecimalFormats = [
3573
- "decimalEnclosedCircle",
3574
- "decimalEnclosedFullstop",
3575
- "decimalEnclosedParen",
3576
- "decimalFullWidth",
3577
3837
  "decimalHalfWidth",
3578
3838
  "aiueo",
3579
3839
  "iroha",
@@ -3625,6 +3885,30 @@ function toOrdinal2(value) {
3625
3885
  return `${value}th`;
3626
3886
  }
3627
3887
  }
3888
+ function toFullWidthDecimal(value) {
3889
+ return String(value).replace(
3890
+ /[0-9]/g,
3891
+ (digit) => String.fromCharCode(65296 + Number.parseInt(digit, 10))
3892
+ );
3893
+ }
3894
+ var CIRCLED_DECIMAL_BY_VALUE = new Map([
3895
+ [0, "\u24EA"],
3896
+ ...Array.from({ length: 20 }, (_, index) => [
3897
+ index + 1,
3898
+ String.fromCodePoint(9312 + index)
3899
+ ]),
3900
+ ...Array.from({ length: 15 }, (_, index) => [
3901
+ index + 21,
3902
+ String.fromCodePoint(12881 + index)
3903
+ ]),
3904
+ ...Array.from({ length: 15 }, (_, index) => [
3905
+ index + 36,
3906
+ String.fromCodePoint(12977 + index)
3907
+ ])
3908
+ ]);
3909
+ function toCircledDecimal(value) {
3910
+ return CIRCLED_DECIMAL_BY_VALUE.get(value) ?? String(value);
3911
+ }
3628
3912
  function toAlphabetic2(value) {
3629
3913
  if (value <= 0) {
3630
3914
  return String(value);
@@ -4398,6 +4682,7 @@ function toNumberingLayoutInput(numbering) {
4398
4682
  const hangingTwips = textColumn?.hanging ?? numbering.geometry.indentation?.hanging ?? (typeof numbering.geometry.indentation?.firstLine === "number" && numbering.geometry.indentation.firstLine < 0 ? Math.abs(numbering.geometry.indentation.firstLine) : void 0);
4399
4683
  return {
4400
4684
  markerText: numbering.text,
4685
+ ...numbering.markerTextPosture ? { markerTextPosture: { ...numbering.markerTextPosture } } : {},
4401
4686
  ...numbering.markerRunProperties ? { markerRunFormatting: numbering.markerRunProperties } : {},
4402
4687
  markerSuffix: normalizeNumberingMarkerSuffix(numbering.suffix),
4403
4688
  ...markerLane ? { markerLaneStartTwips: markerLane.start } : {},
@@ -4410,7 +4695,9 @@ function toNumberingLayoutInput(numbering) {
4410
4695
  ...numbering.formatPosture !== void 0 ? { formatPosture: { ...numbering.formatPosture } } : {},
4411
4696
  startAt: numbering.startAt,
4412
4697
  ...numbering.isLegalNumbering ? { isLegalNumbering: true } : {},
4413
- ...numbering.picBulletMediaId ? { pictureBulletMediaId: numbering.picBulletMediaId } : {}
4698
+ ...numbering.picBulletId ? { pictureBulletId: numbering.picBulletId } : {},
4699
+ ...numbering.picBulletMediaId ? { pictureBulletMediaId: numbering.picBulletMediaId } : {},
4700
+ ...numbering.pictureBulletPosture ? { pictureBulletPosture: { ...numbering.pictureBulletPosture } } : {}
4414
4701
  };
4415
4702
  }
4416
4703
  function toFieldLayoutInput(entry, resolved, region) {
@@ -4922,6 +5209,7 @@ function buildEffectiveNumbering(detail) {
4922
5209
  const result = {
4923
5210
  level: detail.level,
4924
5211
  ...detail.text !== null ? { marker: detail.text } : {},
5212
+ ...detail.markerTextPosture ? { markerTextPosture: { ...detail.markerTextPosture } } : {},
4925
5213
  ...detail.markerRunProperties ? { markerRunFormatting: detail.markerRunProperties } : {},
4926
5214
  ...detail.geometry ? {
4927
5215
  indentation: {
@@ -4931,7 +5219,8 @@ function buildEffectiveNumbering(detail) {
4931
5219
  ...detail.geometry.tabStops && detail.geometry.tabStops.length > 0 ? { tab: detail.geometry.tabStops[0].position } : {}
4932
5220
  }
4933
5221
  } : {},
4934
- ...detail.picBulletMediaId ? { pictureBulletRef: detail.picBulletMediaId } : {}
5222
+ ...detail.picBulletMediaId ? { pictureBulletRef: detail.picBulletMediaId } : {},
5223
+ ...detail.pictureBulletPosture ? { pictureBulletPosture: { ...detail.pictureBulletPosture } } : {}
4935
5224
  };
4936
5225
  return result;
4937
5226
  }
@@ -6847,6 +7136,7 @@ function toSurfaceResolvedNumbering(numbering) {
6847
7136
  format: numbering.format,
6848
7137
  ...numbering.formatPosture !== void 0 ? { formatPosture: { ...numbering.formatPosture } } : {},
6849
7138
  ...numbering.text !== null ? { text: numbering.text } : {},
7139
+ ...numbering.markerTextPosture !== void 0 ? { markerTextPosture: { ...numbering.markerTextPosture } } : {},
6850
7140
  startAt: numbering.startAt,
6851
7141
  ...numbering.paragraphStyleId ? { paragraphStyleId: numbering.paragraphStyleId } : {},
6852
7142
  ...numbering.isLegalNumbering ? { isLegalNumbering: true } : {},
@@ -6859,7 +7149,9 @@ function toSurfaceResolvedNumbering(numbering) {
6859
7149
  ...numbering.geometry.markerLane ? { markerLane: { ...numbering.geometry.markerLane } } : {},
6860
7150
  ...numbering.geometry.textColumn ? { textColumn: { ...numbering.geometry.textColumn } } : {}
6861
7151
  },
6862
- ...numbering.picBulletMediaId ? { picBulletMediaId: numbering.picBulletMediaId } : {}
7152
+ ...numbering.picBulletId ? { picBulletId: numbering.picBulletId } : {},
7153
+ ...numbering.picBulletMediaId ? { picBulletMediaId: numbering.picBulletMediaId } : {},
7154
+ ...numbering.pictureBulletPosture ? { pictureBulletPosture: { ...numbering.pictureBulletPosture } } : {}
6863
7155
  };
6864
7156
  }
6865
7157
  function describePreservedInlinePreview(payloadReference) {
@@ -1,5 +1,5 @@
1
- export { gr as CellLocator, gs as TableStructureOperation, gt as applyTableStructureOperation, gu as applyTableStructureOperationForEditableTarget, gv as getTableStructureContext, gw as removeCellFromRow, gx as removeTableRowPure, gy as tableStructureActionHandleForTarget } from '../../public-types-gvubspUI.cjs';
2
- import '../../canonical-document-BMtONpgf.cjs';
1
+ export { gr as CellLocator, gs as TableStructureOperation, gt as applyTableStructureOperation, gu as applyTableStructureOperationForEditableTarget, gv as getTableStructureContext, gw as removeCellFromRow, gx as removeTableRowPure, gy as tableStructureActionHandleForTarget } from '../../public-types-KBS6JnOs.cjs';
2
+ import '../../canonical-document-CfZIc-fC.cjs';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
@@ -1,5 +1,5 @@
1
- export { gr as CellLocator, gs as TableStructureOperation, gt as applyTableStructureOperation, gu as applyTableStructureOperationForEditableTarget, gv as getTableStructureContext, gw as removeCellFromRow, gx as removeTableRowPure, gy as tableStructureActionHandleForTarget } from '../../public-types-DyqnxxO9.js';
2
- import '../../canonical-document-BMtONpgf.js';
1
+ export { gr as CellLocator, gs as TableStructureOperation, gt as applyTableStructureOperation, gu as applyTableStructureOperationForEditableTarget, gv as getTableStructureContext, gw as removeCellFromRow, gx as removeTableRowPure, gy as tableStructureActionHandleForTarget } from '../../public-types-Cjs8glST.js';
2
+ import '../../canonical-document-CfZIc-fC.js';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
@@ -5,11 +5,11 @@ import {
5
5
  removeCellFromRow,
6
6
  removeTableRowPure,
7
7
  tableStructureActionHandleForTarget
8
- } from "../../chunk-Q7Y57KOK.js";
9
- import "../../chunk-PHMWH23E.js";
10
- import "../../chunk-A3GSNB4G.js";
8
+ } from "../../chunk-6TLZ6CMP.js";
9
+ import "../../chunk-C5LXKR54.js";
10
+ import "../../chunk-U3UMKA7B.js";
11
11
  import "../../chunk-OYGMRRR7.js";
12
- import "../../chunk-A66ZVUAT.js";
12
+ import "../../chunk-RYMMKOFI.js";
13
13
  import "../../chunk-UFVDIR2C.js";
14
14
  import "../../chunk-PGGPPZ65.js";
15
15
  import "../../chunk-DNXYUIIS.js";