@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
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  NO_EDITABLE_TARGETS_INDEX,
12
12
  createEditorSurfaceSnapshot
13
- } from "./chunk-A3GSNB4G.js";
13
+ } from "./chunk-U3UMKA7B.js";
14
14
  import {
15
15
  createSelectionSnapshot
16
16
  } from "./chunk-OYGMRRR7.js";
@@ -1,8 +1,6 @@
1
1
  import {
2
- incrementInvalidationCounter,
3
- recordPerfSample,
4
2
  resolvePageOverlayRectsFromGeometry
5
- } from "./chunk-35RHOE6I.js";
3
+ } from "./chunk-UP2KDOYE.js";
6
4
  import {
7
5
  buildPageAnchorAttributes,
8
6
  buildPageAnchorSelector,
@@ -10,7 +8,7 @@ import {
10
8
  resolveChromePreset,
11
9
  resolveChromePresetOptions,
12
10
  resolveChromeVisibilityForPreset
13
- } from "./chunk-CI2TD3T4.js";
11
+ } from "./chunk-W2I47J2Q.js";
14
12
  import {
15
13
  DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP,
16
14
  DEFAULT_PX_PER_TWIP,
@@ -19,20 +17,22 @@ import {
19
17
  estimateParagraphLineHeight,
20
18
  findPageForOffset,
21
19
  getUsableColumnWidth,
20
+ incrementInvalidationCounter,
21
+ recordPerfSample,
22
22
  sanitizeMarkdown
23
- } from "./chunk-THVM6EP5.js";
23
+ } from "./chunk-LPLJZJT2.js";
24
24
  import {
25
25
  createCanvasBackend
26
26
  } from "./chunk-OVLZQ6FZ.js";
27
27
  import {
28
28
  storyTargetKey
29
- } from "./chunk-A3GSNB4G.js";
29
+ } from "./chunk-U3UMKA7B.js";
30
30
  import {
31
31
  EMU_PER_INCH,
32
32
  EMU_PER_PX,
33
33
  ROTATION_UNITS_PER_DEGREE,
34
34
  TWIPS_PER_PX
35
- } from "./chunk-A66ZVUAT.js";
35
+ } from "./chunk-RYMMKOFI.js";
36
36
  import {
37
37
  createPublicNodeAnchor,
38
38
  createPublicRangeAnchor
@@ -18751,6 +18751,7 @@ function selectionTouchesRange(selection, from, to) {
18751
18751
  }
18752
18752
 
18753
18753
  export {
18754
+ useLayoutFacetRenderSignal,
18754
18755
  preserveEditorSelectionMouseDown,
18755
18756
  PAGE_CHROME_DEFAULTS,
18756
18757
  buildPageBreakDecorations,
@@ -6,7 +6,7 @@ import {
6
6
  createHeaderFooterStoryKey,
7
7
  createNoteStoryKey,
8
8
  sha256TextHex
9
- } from "./chunk-A66ZVUAT.js";
9
+ } from "./chunk-RYMMKOFI.js";
10
10
  import {
11
11
  SCOPE_MARKER_BOOKMARK_PREFIX,
12
12
  buildGrabBagSourceChildFromParsed,
@@ -372,11 +372,14 @@ function collectEditableTargetRefs(doc, cache) {
372
372
  collectEditableTargetsInBlocks(
373
373
  context.blocks,
374
374
  {
375
+ doc,
375
376
  storyKey: context.storyKey,
376
377
  basePath: context.basePath,
377
378
  insideSdt: false,
378
379
  insideTextBox: false,
379
- tableDepth: 0
380
+ tableDepth: 0,
381
+ numberingCatalogHash: createNumberingCatalogRevisionHash(doc),
382
+ numberingTargetRevisionHash: createNumberingTargetRevisionHash(doc)
380
383
  },
381
384
  targets,
382
385
  cache
@@ -396,11 +399,14 @@ function collectEditableTargetRefsForStoryBlockRanges(doc, storyKey, ranges, cac
396
399
  collectEditableTargetsInBlocks(
397
400
  context.blocks.slice(range.start, range.end),
398
401
  {
402
+ doc,
399
403
  storyKey: context.storyKey,
400
404
  basePath: context.basePath,
401
405
  insideSdt: false,
402
406
  insideTextBox: false,
403
- tableDepth: 0
407
+ tableDepth: 0,
408
+ numberingCatalogHash: createNumberingCatalogRevisionHash(doc),
409
+ numberingTargetRevisionHash: createNumberingTargetRevisionHash(doc)
404
410
  },
405
411
  targets,
406
412
  cache,
@@ -426,6 +432,7 @@ function buildBlockCacheSignature(context, blockIndex) {
426
432
  const owner = tt?.editableOwnersByChildIndex?.get(blockIndex);
427
433
  return [
428
434
  context.storyKey,
435
+ context.numberingTargetRevisionHash,
429
436
  context.insideSdt ? "1" : "0",
430
437
  context.insideTextBox ? "1" : "0",
431
438
  String(context.tableDepth),
@@ -471,7 +478,8 @@ function collectEditableTargetsInBlocks(blocks, context, targets, cache, blockIn
471
478
  editableParagraphTargetPosture(targetKind),
472
479
  context.contentControl,
473
480
  context.tableTarget,
474
- context.tableTarget?.editableOwnersByChildIndex?.get(blockIndex)
481
+ context.tableTarget?.editableOwnersByChildIndex?.get(blockIndex),
482
+ resolveEditableParagraphListIdentity(block, context)
475
483
  )
476
484
  );
477
485
  }
@@ -1016,7 +1024,7 @@ function collectEditableTargetsInInlines(inlines, basePath, context, targets) {
1016
1024
  }
1017
1025
  }
1018
1026
  }
1019
- function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, targetPosture = { editability: "editable", posture: { blockers: [] } }, contentControl, tableTarget, editableOwner) {
1027
+ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, targetPosture = { editability: "editable", posture: { blockers: [] } }, contentControl, tableTarget, editableOwner, listIdentity) {
1020
1028
  const paragraphText = collectParagraphText(paragraph);
1021
1029
  const paragraphTextHash = hashText(paragraphText);
1022
1030
  const sourceRef = paragraph.sourceRef;
@@ -1027,19 +1035,39 @@ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, tar
1027
1035
  context: { storyKey, insideSdt: contentControl !== void 0 },
1028
1036
  ...tableTarget
1029
1037
  }) : void 0;
1030
- const listAddress = paragraph.numbering !== void 0 ? createCanonicalAddress({
1038
+ const listAddress = listIdentity !== void 0 ? createCanonicalAddress({
1031
1039
  addressKind: "list-item-text",
1032
1040
  storyKey,
1033
1041
  staleCheckKind: "paragraph",
1034
1042
  operationScope: "list-text",
1035
- sourceRefs: [sourceRef],
1043
+ sourceRefs: [
1044
+ sourceRef,
1045
+ listIdentity.paragraphNumberingSourceRef,
1046
+ listIdentity.instanceSourceRef,
1047
+ listIdentity.abstractSourceRef
1048
+ ],
1036
1049
  staleHash: paragraphTextHash,
1037
1050
  rangeBoundary: { boundaryKind: "list-item-text" },
1051
+ list: {
1052
+ numberingOrigin: listIdentity.numberingOrigin,
1053
+ numberingInstanceId: listIdentity.numberingInstanceId,
1054
+ ...listIdentity.abstractNumberingId !== void 0 ? { abstractNumberingId: listIdentity.abstractNumberingId } : {},
1055
+ level: listIdentity.level,
1056
+ ...listIdentity.overrideHash !== void 0 ? { overrideHash: listIdentity.overrideHash } : {},
1057
+ numberingCatalogHash: listIdentity.numberingCatalogHash
1058
+ },
1038
1059
  discriminator: {
1039
1060
  blockPath,
1040
- numberingInstanceId: paragraph.numbering.numberingInstanceId,
1041
- level: paragraph.numbering.level,
1061
+ numberingOrigin: listIdentity.numberingOrigin,
1062
+ numberingInstanceId: listIdentity.numberingInstanceId,
1063
+ abstractNumberingId: listIdentity.abstractNumberingId ?? null,
1064
+ level: listIdentity.level,
1065
+ overrideHash: listIdentity.overrideHash ?? null,
1066
+ numberingCatalogHash: listIdentity.numberingCatalogHash,
1042
1067
  sourceId: sourceRef?.sourceId ?? null,
1068
+ numberingSourceId: listIdentity.paragraphNumberingSourceRef?.sourceId ?? null,
1069
+ numberingInstanceSourceId: listIdentity.instanceSourceRef?.sourceId ?? null,
1070
+ abstractNumberingSourceId: listIdentity.abstractSourceRef?.sourceId ?? null,
1043
1071
  paraId: paragraph.wordExtensionIds?.paraId ?? null,
1044
1072
  textId: paragraph.wordExtensionIds?.textId ?? null
1045
1073
  }
@@ -1080,11 +1108,62 @@ function createParagraphEditableTarget(paragraph, kind, storyKey, blockPath, tar
1080
1108
  blockType: "paragraph",
1081
1109
  ...paragraph.wordExtensionIds?.paraId !== void 0 ? { wordParaId: paragraph.wordExtensionIds.paraId } : {},
1082
1110
  ...paragraph.wordExtensionIds?.textId !== void 0 ? { wordTextId: paragraph.wordExtensionIds.textId } : {},
1083
- ...sourceRef !== void 0 ? { sourceRef } : {}
1111
+ ...sourceRef !== void 0 ? { sourceRef } : {},
1112
+ ...listIdentity !== void 0 ? {
1113
+ listNumberingOrigin: listIdentity.numberingOrigin,
1114
+ listNumberingInstanceId: listIdentity.numberingInstanceId,
1115
+ ...listIdentity.abstractNumberingId !== void 0 ? { listAbstractNumberingId: listIdentity.abstractNumberingId } : {},
1116
+ listLevel: listIdentity.level,
1117
+ ...listIdentity.overrideHash !== void 0 ? { listOverrideHash: listIdentity.overrideHash } : {},
1118
+ numberingCatalogHash: listIdentity.numberingCatalogHash
1119
+ } : {}
1084
1120
  },
1085
1121
  posture
1086
1122
  };
1087
1123
  }
1124
+ function resolveEditableParagraphListIdentity(paragraph, context) {
1125
+ const directNumbering = paragraph.numbering;
1126
+ const styleNumbering = directNumbering === void 0 && paragraph.styleId !== void 0 ? resolveParagraphStyleNumbering(context.doc, paragraph.styleId) : void 0;
1127
+ const numbering = directNumbering ?? styleNumbering;
1128
+ if (numbering === void 0) return void 0;
1129
+ const numberingCatalog = context.doc.numbering ?? { abstractDefinitions: {}, instances: {} };
1130
+ const instances = numberingCatalog.instances ?? {};
1131
+ const abstractDefinitions = numberingCatalog.abstractDefinitions ?? {};
1132
+ const instance = instances[numbering.numberingInstanceId];
1133
+ const abstractDefinition = instance !== void 0 ? abstractDefinitions[instance.abstractNumberingId] : void 0;
1134
+ const level = numbering.level ?? 0;
1135
+ const override = instance?.overrides.find((entry) => entry.level === level);
1136
+ const overrideHash = override !== void 0 ? hashText(JSON.stringify(numberingOverrideDiscriminator(override))) : void 0;
1137
+ return {
1138
+ numberingOrigin: directNumbering !== void 0 ? "paragraph" : "paragraph-style",
1139
+ numberingInstanceId: numbering.numberingInstanceId,
1140
+ ...instance?.abstractNumberingId !== void 0 ? { abstractNumberingId: instance.abstractNumberingId } : {},
1141
+ level,
1142
+ ...overrideHash !== void 0 ? { overrideHash } : {},
1143
+ numberingCatalogHash: context.numberingCatalogHash,
1144
+ ...directNumbering?.sourceRef !== void 0 ? { paragraphNumberingSourceRef: directNumbering.sourceRef } : {},
1145
+ ...instance?.sourceRef !== void 0 ? { instanceSourceRef: instance.sourceRef } : {},
1146
+ ...abstractDefinition?.sourceRef !== void 0 ? { abstractSourceRef: abstractDefinition.sourceRef } : {}
1147
+ };
1148
+ }
1149
+ function numberingOverrideDiscriminator(override) {
1150
+ return {
1151
+ level: override.level,
1152
+ startAt: override.startAt ?? null,
1153
+ sourceId: override.sourceRef?.sourceId ?? null,
1154
+ levelDefinition: override.levelDefinition === void 0 ? null : {
1155
+ sourceId: override.levelDefinition.sourceRef?.sourceId ?? null,
1156
+ format: override.levelDefinition.format ?? null,
1157
+ text: override.levelDefinition.text ?? null,
1158
+ startAt: override.levelDefinition.startAt ?? null,
1159
+ paragraphStyleId: override.levelDefinition.paragraphStyleId ?? null,
1160
+ isLegalNumbering: override.levelDefinition.isLegalNumbering ?? null,
1161
+ suffix: override.levelDefinition.suffix ?? null,
1162
+ restartAfterLevel: override.levelDefinition.restartAfterLevel ?? null,
1163
+ picBulletId: override.levelDefinition.picBulletId ?? null
1164
+ }
1165
+ };
1166
+ }
1088
1167
  function contentControlLocksContent(contentControl) {
1089
1168
  return contentControl?.lock !== void 0 && contentControl.lock !== "unlocked" && contentControl.lock !== "none";
1090
1169
  }
@@ -1853,6 +1932,7 @@ function createCanonicalAddress(input) {
1853
1932
  ...input.rowRange !== void 0 ? { rowRange: input.rowRange } : {},
1854
1933
  ...input.columnRange !== void 0 ? { columnRange: input.columnRange } : {},
1855
1934
  ...sourceHash !== void 0 ? { sourceJoinHash: sourceHash } : {},
1935
+ ...input.list !== void 0 ? { list: input.list } : {},
1856
1936
  ...input.secondaryStory === true ? { secondaryStory: true } : {},
1857
1937
  ...input.nestedTable === true ? { nestedTable: true } : {},
1858
1938
  ...input.insideSdt === true ? { insideSdt: true } : {},
@@ -1887,6 +1967,71 @@ function sourceJoinHash(refs) {
1887
1967
  if (sourceIds.length === 0) return void 0;
1888
1968
  return hashText(sourceIds.join("\0"));
1889
1969
  }
1970
+ function createNumberingCatalogRevisionHash(doc) {
1971
+ const catalog = doc.numbering ?? { abstractDefinitions: {}, instances: {} };
1972
+ const abstractDefinitions = catalog.abstractDefinitions ?? {};
1973
+ const instances = catalog.instances ?? {};
1974
+ const numPicBullets = catalog.numPicBullets ?? {};
1975
+ return hashText(JSON.stringify({
1976
+ abstractDefinitions: Object.keys(abstractDefinitions).sort().map((abstractNumberingId) => {
1977
+ const definition = abstractDefinitions[abstractNumberingId];
1978
+ return {
1979
+ abstractNumberingId,
1980
+ sourceId: definition.sourceRef?.sourceId ?? null,
1981
+ nsid: definition.nsid ?? null,
1982
+ tplc: definition.tplc ?? null,
1983
+ styleLink: definition.styleLink ?? null,
1984
+ numStyleLink: definition.numStyleLink ?? null,
1985
+ levels: definition.levels.map((level) => ({
1986
+ sourceId: level.sourceRef?.sourceId ?? null,
1987
+ level: level.level,
1988
+ format: level.format,
1989
+ text: level.text,
1990
+ startAt: level.startAt ?? null,
1991
+ paragraphStyleId: level.paragraphStyleId ?? null,
1992
+ isLegalNumbering: level.isLegalNumbering ?? null,
1993
+ suffix: level.suffix ?? null,
1994
+ restartAfterLevel: level.restartAfterLevel ?? null,
1995
+ picBulletId: level.picBulletId ?? null
1996
+ }))
1997
+ };
1998
+ }),
1999
+ instances: Object.keys(instances).sort().map((numberingInstanceId) => {
2000
+ const instance = instances[numberingInstanceId];
2001
+ return {
2002
+ numberingInstanceId,
2003
+ sourceId: instance.sourceRef?.sourceId ?? null,
2004
+ abstractNumberingId: instance.abstractNumberingId,
2005
+ overrides: instance.overrides.map(numberingOverrideDiscriminator)
2006
+ };
2007
+ }),
2008
+ numPicBullets: Object.keys(numPicBullets).sort().map((numPicBulletId) => {
2009
+ const picBullet = numPicBullets[numPicBulletId];
2010
+ return {
2011
+ numPicBulletId,
2012
+ sourceId: picBullet.sourceRef?.sourceId ?? null,
2013
+ mediaId: picBullet.mediaId ?? null,
2014
+ widthEmu: picBullet.widthEmu ?? null,
2015
+ heightEmu: picBullet.heightEmu ?? null
2016
+ };
2017
+ })
2018
+ }));
2019
+ }
2020
+ function createNumberingTargetRevisionHash(doc) {
2021
+ const paragraphStyles = doc.styles?.paragraphs ?? {};
2022
+ return hashText(JSON.stringify({
2023
+ numberingCatalogHash: createNumberingCatalogRevisionHash(doc),
2024
+ paragraphStyleNumbering: Object.keys(paragraphStyles).sort().map((styleId) => {
2025
+ const style = paragraphStyles[styleId];
2026
+ return {
2027
+ styleId,
2028
+ basedOn: style.basedOn ?? null,
2029
+ numberingInstanceId: style.numbering?.numberingInstanceId ?? null,
2030
+ level: style.numbering?.level ?? null
2031
+ };
2032
+ })
2033
+ }));
2034
+ }
1890
2035
  function validateEditableTargetRef(value, path = "$") {
1891
2036
  const issues = [];
1892
2037
  const record = asPlainObject(value, path, issues);
@@ -1986,6 +2131,32 @@ function validateEditableTargetRef(value, path = "$") {
1986
2131
  if (staleCheck.sourceRef !== void 0) {
1987
2132
  validateTargetSourceRef(staleCheck.sourceRef, `${path}.staleCheck.sourceRef`, issues);
1988
2133
  }
2134
+ if (staleCheck.listNumberingOrigin !== void 0) {
2135
+ validateEnum(
2136
+ staleCheck.listNumberingOrigin,
2137
+ EDITABLE_TARGET_LIST_NUMBERING_ORIGINS,
2138
+ `${path}.staleCheck.listNumberingOrigin`,
2139
+ issues
2140
+ );
2141
+ }
2142
+ if (staleCheck.listNumberingInstanceId !== void 0) {
2143
+ expectString(staleCheck.listNumberingInstanceId, `${path}.staleCheck.listNumberingInstanceId`, issues);
2144
+ }
2145
+ if (staleCheck.listAbstractNumberingId !== void 0) {
2146
+ expectString(staleCheck.listAbstractNumberingId, `${path}.staleCheck.listAbstractNumberingId`, issues);
2147
+ }
2148
+ if (staleCheck.listLevel !== void 0 && (typeof staleCheck.listLevel !== "number" || !Number.isInteger(staleCheck.listLevel) || staleCheck.listLevel < 0)) {
2149
+ issues.push({
2150
+ path: `${path}.staleCheck.listLevel`,
2151
+ message: "listLevel must be a non-negative integer when present."
2152
+ });
2153
+ }
2154
+ if (staleCheck.listOverrideHash !== void 0) {
2155
+ validateSha256(staleCheck.listOverrideHash, `${path}.staleCheck.listOverrideHash`, issues);
2156
+ }
2157
+ if (staleCheck.numberingCatalogHash !== void 0) {
2158
+ validateSha256(staleCheck.numberingCatalogHash, `${path}.staleCheck.numberingCatalogHash`, issues);
2159
+ }
1989
2160
  }
1990
2161
  const posture = asPlainObject(record.posture, `${path}.posture`, issues);
1991
2162
  if (posture) {
@@ -2203,6 +2374,9 @@ function validateTargetCanonicalAddress(value, path, issues) {
2203
2374
  if (record.sourceJoinHash !== void 0) {
2204
2375
  validateSha256(record.sourceJoinHash, `${path}.sourceJoinHash`, issues);
2205
2376
  }
2377
+ if (record.list !== void 0) {
2378
+ validateTargetListAddressIdentity(record.list, `${path}.list`, issues);
2379
+ }
2206
2380
  if (record.resolver !== void 0) {
2207
2381
  validateTargetCanonicalAddressResolver(record.resolver, `${path}.resolver`, issues);
2208
2382
  }
@@ -2212,6 +2386,22 @@ function validateTargetCanonicalAddress(value, path, issues) {
2212
2386
  }
2213
2387
  }
2214
2388
  }
2389
+ function validateTargetListAddressIdentity(value, path, issues) {
2390
+ const record = asPlainObject(value, path, issues);
2391
+ if (!record) return;
2392
+ validateEnum(record.numberingOrigin, EDITABLE_TARGET_LIST_NUMBERING_ORIGINS, `${path}.numberingOrigin`, issues);
2393
+ expectString(record.numberingInstanceId, `${path}.numberingInstanceId`, issues);
2394
+ if (record.abstractNumberingId !== void 0) {
2395
+ expectString(record.abstractNumberingId, `${path}.abstractNumberingId`, issues);
2396
+ }
2397
+ if (typeof record.level !== "number" || !Number.isInteger(record.level) || record.level < 0) {
2398
+ issues.push({ path: `${path}.level`, message: "level must be a non-negative integer." });
2399
+ }
2400
+ if (record.overrideHash !== void 0) {
2401
+ validateSha256(record.overrideHash, `${path}.overrideHash`, issues);
2402
+ }
2403
+ validateSha256(record.numberingCatalogHash, `${path}.numberingCatalogHash`, issues);
2404
+ }
2215
2405
  function validateTargetCanonicalAddressResolver(value, path, issues) {
2216
2406
  const record = asPlainObject(value, path, issues);
2217
2407
  if (!record) return;
@@ -2349,6 +2539,10 @@ var EDITABLE_TARGET_COMMAND_FAMILIES = /* @__PURE__ */ new Set([
2349
2539
  "preserve-only-refusal"
2350
2540
  ]);
2351
2541
  var EDITABLE_TARGET_EDITABILITY = /* @__PURE__ */ new Set(["editable", "non-editable"]);
2542
+ var EDITABLE_TARGET_LIST_NUMBERING_ORIGINS = /* @__PURE__ */ new Set([
2543
+ "paragraph",
2544
+ "paragraph-style"
2545
+ ]);
2352
2546
  var EDITABLE_TARGET_BLOCKERS = /* @__PURE__ */ new Set([
2353
2547
  "protected-section",
2354
2548
  "protected-range",
@@ -2548,7 +2742,7 @@ function resolveParagraphStyleNumbering(doc, styleId) {
2548
2742
  let currentStyleId = styleId;
2549
2743
  while (currentStyleId !== void 0 && !visited.has(currentStyleId)) {
2550
2744
  visited.add(currentStyleId);
2551
- const style = doc.styles.paragraphs[currentStyleId];
2745
+ const style = doc.styles?.paragraphs?.[currentStyleId];
2552
2746
  if (style === void 0) {
2553
2747
  return void 0;
2554
2748
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Y4XZCMCS.js";
4
4
  import {
5
5
  applyTextTransaction
6
- } from "./chunk-T5YYFDZB.js";
6
+ } from "./chunk-N5FTU4HZ.js";
7
7
  import {
8
8
  createInsertedTableBlock,
9
9
  createNoopStructuralMutation,
@@ -11,11 +11,11 @@ import {
11
11
  replaceParagraphScope,
12
12
  resolveInsertedTableStyleId,
13
13
  resolveParagraphScope
14
- } from "./chunk-PHMWH23E.js";
14
+ } from "./chunk-C5LXKR54.js";
15
15
  import {
16
16
  NO_EDITABLE_TARGETS_INDEX,
17
17
  createEditorSurfaceSnapshot
18
- } from "./chunk-A3GSNB4G.js";
18
+ } from "./chunk-U3UMKA7B.js";
19
19
  import {
20
20
  createSelectionSnapshot
21
21
  } from "./chunk-OYGMRRR7.js";