@beyondwork/docx-react-component 1.0.127 → 1.0.129

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 +215 -61
  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 +2 -2
  5. package/dist/api/v3.cjs +1324 -71
  6. package/dist/api/v3.d.cts +3 -3
  7. package/dist/api/v3.d.ts +3 -3
  8. package/dist/api/v3.js +8 -8
  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-KV435YXO.js → chunk-5DSHUYSY.js} +1 -1
  12. package/dist/{chunk-TQDQU2E3.js → chunk-63FYIGCT.js} +2 -2
  13. package/dist/{chunk-ZDOAUP3V.js → chunk-DDN2AIGE.js} +1 -1
  14. package/dist/{chunk-6F5QW44A.js → chunk-DJU2W4E4.js} +2 -2
  15. package/dist/{chunk-4EENH4FG.js → chunk-EZKJXIPH.js} +1 -1
  16. package/dist/{chunk-CXSYRB37.js → chunk-HUIHBBAQ.js} +166 -49
  17. package/dist/{chunk-ESJ2MES5.js → chunk-JJGVE5J7.js} +1 -1
  18. package/dist/{chunk-LZVBNDGU.js → chunk-LJH64PV3.js} +3 -3
  19. package/dist/{chunk-MWSBGJQO.js → chunk-OTQIW2TC.js} +2 -2
  20. package/dist/{chunk-2QL5DAKF.js → chunk-PGKUJZXV.js} +3 -3
  21. package/dist/{chunk-PUMZWE2D.js → chunk-PRAZBHNF.js} +460 -136
  22. package/dist/{chunk-4YJVRIUB.js → chunk-Q3QYGKFE.js} +51 -8
  23. package/dist/{chunk-YHZHPXDB.js → chunk-RMRTQGW3.js} +50 -13
  24. package/dist/{chunk-XRACP43Q.js → chunk-SKPTKQHF.js} +351 -13
  25. package/dist/{chunk-D5HYZQTG.js → chunk-VNLDQJ47.js} +1 -1
  26. package/dist/{chunk-BYSRJ4FE.js → chunk-W34X3KBR.js} +1 -1
  27. package/dist/{chunk-V6XVZFFH.js → chunk-XMHSGPLN.js} +2 -2
  28. package/dist/{chunk-46KNRA4C.js → chunk-XQCAMKIQ.js} +849 -6
  29. package/dist/{chunk-YD2JE54B.js → chunk-YZDZ4FGR.js} +1 -1
  30. package/dist/compare.d.cts +1 -1
  31. package/dist/compare.d.ts +1 -1
  32. package/dist/core/commands/formatting-commands.d.cts +2 -2
  33. package/dist/core/commands/formatting-commands.d.ts +2 -2
  34. package/dist/core/commands/image-commands.cjs +166 -49
  35. package/dist/core/commands/image-commands.d.cts +2 -2
  36. package/dist/core/commands/image-commands.d.ts +2 -2
  37. package/dist/core/commands/image-commands.js +4 -4
  38. package/dist/core/commands/section-layout-commands.d.cts +2 -2
  39. package/dist/core/commands/section-layout-commands.d.ts +2 -2
  40. package/dist/core/commands/style-commands.d.cts +2 -2
  41. package/dist/core/commands/style-commands.d.ts +2 -2
  42. package/dist/core/commands/table-structure-commands.cjs +166 -49
  43. package/dist/core/commands/table-structure-commands.d.cts +2 -2
  44. package/dist/core/commands/table-structure-commands.d.ts +2 -2
  45. package/dist/core/commands/table-structure-commands.js +3 -3
  46. package/dist/core/commands/text-commands.cjs +166 -49
  47. package/dist/core/commands/text-commands.d.cts +2 -2
  48. package/dist/core/commands/text-commands.d.ts +2 -2
  49. package/dist/core/commands/text-commands.js +4 -4
  50. package/dist/core/selection/mapping.d.cts +2 -2
  51. package/dist/core/selection/mapping.d.ts +2 -2
  52. package/dist/core/state/editor-state.d.cts +2 -2
  53. package/dist/core/state/editor-state.d.ts +2 -2
  54. package/dist/index.cjs +1943 -219
  55. package/dist/index.d.cts +5 -5
  56. package/dist/index.d.ts +5 -5
  57. package/dist/index.js +56 -22
  58. package/dist/io/docx-session.cjs +51 -8
  59. package/dist/io/docx-session.d.cts +4 -4
  60. package/dist/io/docx-session.d.ts +4 -4
  61. package/dist/io/docx-session.js +3 -3
  62. package/dist/legal.d.cts +1 -1
  63. package/dist/legal.d.ts +1 -1
  64. package/dist/legal.js +2 -2
  65. package/dist/{loader-CFICtb9m.d.ts → loader-4qsw4eIU.d.ts} +3 -3
  66. package/dist/{loader-DveZOVuC.d.cts → loader-B8TKhmQi.d.cts} +3 -3
  67. package/dist/{public-types-beSYFJRR.d.cts → public-types-B5CRoR6f.d.cts} +220 -1
  68. package/dist/{public-types-Cgl3efbO.d.ts → public-types-p9b8rfy8.d.ts} +220 -1
  69. package/dist/public-types.cjs +215 -61
  70. package/dist/public-types.d.cts +2 -2
  71. package/dist/public-types.d.ts +2 -2
  72. package/dist/public-types.js +2 -2
  73. package/dist/runtime/collab.d.cts +3 -3
  74. package/dist/runtime/collab.d.ts +3 -3
  75. package/dist/runtime/document-runtime.cjs +999 -193
  76. package/dist/runtime/document-runtime.d.cts +2 -2
  77. package/dist/runtime/document-runtime.d.ts +2 -2
  78. package/dist/runtime/document-runtime.js +13 -13
  79. package/dist/{session-B7u82EJF.d.cts → session-BnGIjaex.d.cts} +3 -3
  80. package/dist/{session-BWMJ9jm4.d.ts → session-vEYKf-w3.d.ts} +3 -3
  81. package/dist/session.cjs +51 -8
  82. package/dist/session.d.cts +5 -5
  83. package/dist/session.d.ts +5 -5
  84. package/dist/session.js +4 -4
  85. package/dist/tailwind.cjs +215 -61
  86. package/dist/tailwind.d.cts +2 -2
  87. package/dist/tailwind.d.ts +2 -2
  88. package/dist/tailwind.js +5 -5
  89. package/dist/{types-BQjdVZsh.d.cts → types-BLuvZ6cQ.d.cts} +2 -2
  90. package/dist/{types-DvvmS5A7.d.ts → types-Dutlyj0T.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 +3 -3
  94. package/dist/ui-tailwind.cjs +215 -61
  95. package/dist/ui-tailwind.d.cts +3 -3
  96. package/dist/ui-tailwind.d.ts +3 -3
  97. package/dist/ui-tailwind.js +5 -5
  98. package/package.json +1 -1
package/dist/api/v3.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-beSYFJRR.cjs';
2
- export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-beSYFJRR.cjs';
1
+ import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-B5CRoR6f.cjs';
2
+ export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-B5CRoR6f.cjs';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
6
- import '../canonical-document-CXCFCbAz.cjs';
6
+ import '../canonical-document-BMtONpgf.cjs';
7
7
  import 'prosemirror-state';
8
8
  import 'prosemirror-model';
9
9
 
package/dist/api/v3.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-Cgl3efbO.js';
2
- export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-Cgl3efbO.js';
1
+ import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-p9b8rfy8.js';
2
+ export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-p9b8rfy8.js';
3
3
  import 'react';
4
4
  import 'yjs';
5
5
  import 'y-protocols/awareness';
6
- import '../canonical-document-CXCFCbAz.js';
6
+ import '../canonical-document-BMtONpgf.js';
7
7
  import 'prosemirror-state';
8
8
  import 'prosemirror-model';
9
9
 
package/dist/api/v3.js CHANGED
@@ -5,22 +5,22 @@ import {
5
5
  mockId,
6
6
  mockPayload,
7
7
  validateApiV3Metadata
8
- } from "../chunk-46KNRA4C.js";
9
- import "../chunk-XRACP43Q.js";
8
+ } from "../chunk-XQCAMKIQ.js";
9
+ import "../chunk-SKPTKQHF.js";
10
10
  import "../chunk-C2LWJ4CZ.js";
11
11
  import {
12
12
  createUiApi,
13
13
  emitUxResponse
14
14
  } from "../chunk-YIYM4ZAP.js";
15
- import "../chunk-YHZHPXDB.js";
15
+ import "../chunk-RMRTQGW3.js";
16
16
  import "../chunk-KFCQYZXR.js";
17
17
  import "../chunk-QIO6V46H.js";
18
- import "../chunk-CXSYRB37.js";
18
+ import "../chunk-HUIHBBAQ.js";
19
19
  import "../chunk-OYGMRRR7.js";
20
- import "../chunk-TQDQU2E3.js";
21
- import "../chunk-V6XVZFFH.js";
22
- import "../chunk-ESJ2MES5.js";
23
- import "../chunk-4YJVRIUB.js";
20
+ import "../chunk-63FYIGCT.js";
21
+ import "../chunk-XMHSGPLN.js";
22
+ import "../chunk-JJGVE5J7.js";
23
+ import "../chunk-Q3QYGKFE.js";
24
24
  import "../chunk-4BJ6K26R.js";
25
25
  import "../chunk-5DGKFNQT.js";
26
26
  import "../chunk-OL2UEHRP.js";
@@ -634,6 +634,8 @@ interface NumberingLevelParagraphGeometry {
634
634
  readonly tabStops?: TabStop[];
635
635
  }
636
636
  interface NumberingLevelDefinition {
637
+ /** Source numbering-part pointer for level-specific joins and command readback. */
638
+ readonly sourceRef?: CanonicalSourceRef;
637
639
  readonly level: number;
638
640
  readonly format: string;
639
641
  readonly text: string;
@@ -652,6 +654,8 @@ interface NumberingLevelDefinition {
652
654
  readonly picBulletId?: string;
653
655
  }
654
656
  interface NumberingLevelOverrideDefinition {
657
+ /** Source numbering-part pointer for override-level definition joins. */
658
+ readonly sourceRef?: CanonicalSourceRef;
655
659
  readonly level: number;
656
660
  readonly format?: string;
657
661
  readonly text?: string;
@@ -672,6 +676,8 @@ interface NumberingInstance {
672
676
  readonly overrides: NumberingLevelOverride[];
673
677
  }
674
678
  interface NumberingLevelOverride {
679
+ /** Source numbering-part pointer for `<w:lvlOverride>`. */
680
+ readonly sourceRef?: CanonicalSourceRef;
675
681
  readonly level: number;
676
682
  readonly startAt?: number;
677
683
  readonly levelDefinition?: NumberingLevelOverrideDefinition;
@@ -634,6 +634,8 @@ interface NumberingLevelParagraphGeometry {
634
634
  readonly tabStops?: TabStop[];
635
635
  }
636
636
  interface NumberingLevelDefinition {
637
+ /** Source numbering-part pointer for level-specific joins and command readback. */
638
+ readonly sourceRef?: CanonicalSourceRef;
637
639
  readonly level: number;
638
640
  readonly format: string;
639
641
  readonly text: string;
@@ -652,6 +654,8 @@ interface NumberingLevelDefinition {
652
654
  readonly picBulletId?: string;
653
655
  }
654
656
  interface NumberingLevelOverrideDefinition {
657
+ /** Source numbering-part pointer for override-level definition joins. */
658
+ readonly sourceRef?: CanonicalSourceRef;
655
659
  readonly level: number;
656
660
  readonly format?: string;
657
661
  readonly text?: string;
@@ -672,6 +676,8 @@ interface NumberingInstance {
672
676
  readonly overrides: NumberingLevelOverride[];
673
677
  }
674
678
  interface NumberingLevelOverride {
679
+ /** Source numbering-part pointer for `<w:lvlOverride>`. */
680
+ readonly sourceRef?: CanonicalSourceRef;
675
681
  readonly level: number;
676
682
  readonly startAt?: number;
677
683
  readonly levelDefinition?: NumberingLevelOverrideDefinition;
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  NO_EDITABLE_TARGETS_INDEX,
12
12
  createEditorSurfaceSnapshot
13
- } from "./chunk-CXSYRB37.js";
13
+ } from "./chunk-HUIHBBAQ.js";
14
14
  import {
15
15
  createSelectionSnapshot
16
16
  } from "./chunk-OYGMRRR7.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  loadDocxSessionAsync
3
- } from "./chunk-V6XVZFFH.js";
3
+ } from "./chunk-XMHSGPLN.js";
4
4
  import {
5
5
  buildCompatibilityReport,
6
6
  createLoadScheduler
7
- } from "./chunk-ESJ2MES5.js";
7
+ } from "./chunk-JJGVE5J7.js";
8
8
  import {
9
9
  decodePersistedSourcePackageBytes,
10
10
  hasValidPersistedSourcePackageDigest,
@@ -3,7 +3,7 @@ import {
3
3
  createNoopStructuralMutation,
4
4
  findTableCellParagraphSelection,
5
5
  findTopLevelParagraphSelectionNearBlock
6
- } from "./chunk-BYSRJ4FE.js";
6
+ } from "./chunk-W34X3KBR.js";
7
7
  import {
8
8
  collectEditableTargetRefs,
9
9
  collectStoryBlockContexts,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  TextTransactionError
3
- } from "./chunk-KV435YXO.js";
3
+ } from "./chunk-5DSHUYSY.js";
4
4
  import {
5
5
  replaceParagraphScope,
6
6
  resolveParagraphScope
7
- } from "./chunk-BYSRJ4FE.js";
7
+ } from "./chunk-W34X3KBR.js";
8
8
  import {
9
9
  cloneParagraphProperties,
10
10
  cloneStoryUnit,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildSearchPattern
3
- } from "./chunk-YHZHPXDB.js";
3
+ } from "./chunk-RMRTQGW3.js";
4
4
 
5
5
  // src/ui-tailwind/editor-surface/search-plugin.ts
6
6
  import { Plugin, PluginKey } from "prosemirror-state";
@@ -1366,12 +1366,13 @@ function getLevelStartAt(level, levelDefinitions) {
1366
1366
  return levelDefinitions.get(level)?.startAt ?? DEFAULT_NUMBERING_START_AT;
1367
1367
  }
1368
1368
  function getNumberingFormatPosture(format, value) {
1369
- if (!isSupportedNumberingFormat(format)) {
1369
+ const registryEntry = getNumberingFormatRegistryEntry(format);
1370
+ if (!registryEntry || registryEntry.renderSupport === "approximated") {
1370
1371
  return {
1371
1372
  status: "approximated",
1372
1373
  requestedFormat: format,
1373
1374
  renderedFormat: "decimal",
1374
- reason: "unsupported-numbering-format-decimal-fallback"
1375
+ reason: registryEntry?.fallbackReason ?? "unsupported-numbering-format-decimal-fallback"
1375
1376
  };
1376
1377
  }
1377
1378
  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)) {
@@ -1402,56 +1403,148 @@ function renderLevelText(text, counters, levelDefinitions) {
1402
1403
  });
1403
1404
  return rendered.trim().length > 0 ? rendered : null;
1404
1405
  }
1405
- var SUPPORTED_NUMBERING_FORMATS = /* @__PURE__ */ new Set([
1406
- "decimal",
1407
- "decimalZero",
1408
- "upperLetter",
1409
- "lowerLetter",
1410
- "upperRoman",
1411
- "lowerRoman",
1412
- "hex",
1413
- "ordinal",
1414
- "cardinalText",
1415
- "ordinalText",
1416
- "chicago",
1417
- "bullet",
1418
- "none"
1419
- ]);
1420
1406
  function isSupportedNumberingFormat(format) {
1421
- return SUPPORTED_NUMBERING_FORMATS.has(format);
1407
+ return getNumberingFormatRegistryEntry(format)?.renderSupport === "supported";
1408
+ }
1409
+ function getNumberingFormatRegistryEntry(format) {
1410
+ return NUMBERING_FORMAT_REGISTRY.get(format);
1422
1411
  }
1423
1412
  function formatCounter(value, format) {
1424
- switch (format) {
1425
- case "decimal":
1426
- return String(value);
1427
- case "decimalZero":
1428
- return String(value).padStart(2, "0");
1429
- case "upperLetter":
1430
- return toAlphabetic2(value).toUpperCase();
1431
- case "lowerLetter":
1432
- return toAlphabetic2(value).toLowerCase();
1433
- case "upperRoman":
1434
- return toRoman2(value).toUpperCase();
1435
- case "lowerRoman":
1436
- return toRoman2(value).toLowerCase();
1437
- case "hex":
1438
- return value >= 0 ? value.toString(16).toUpperCase() : String(value);
1439
- case "ordinal":
1440
- return toOrdinal2(value);
1441
- case "cardinalText":
1442
- return toCardinalText2(value);
1443
- case "ordinalText":
1444
- return toOrdinalText2(value);
1445
- case "chicago":
1446
- return toChicago2(value);
1447
- case "bullet":
1448
- return "";
1449
- case "none":
1450
- return "";
1451
- default:
1452
- return String(value);
1413
+ return getNumberingFormatRegistryEntry(format)?.render(value) ?? String(value);
1414
+ }
1415
+ var exactNumberingFormatEntries = [
1416
+ {
1417
+ format: "decimal",
1418
+ renderSupport: "supported",
1419
+ renderedFormat: "decimal",
1420
+ supportsMutation: true,
1421
+ render: (value) => String(value)
1422
+ },
1423
+ {
1424
+ format: "decimalZero",
1425
+ renderSupport: "supported",
1426
+ renderedFormat: "decimalZero",
1427
+ supportsMutation: true,
1428
+ render: (value) => String(value).padStart(2, "0")
1429
+ },
1430
+ {
1431
+ format: "upperLetter",
1432
+ renderSupport: "supported",
1433
+ renderedFormat: "upperLetter",
1434
+ supportsMutation: true,
1435
+ render: (value) => toAlphabetic2(value).toUpperCase()
1436
+ },
1437
+ {
1438
+ format: "lowerLetter",
1439
+ renderSupport: "supported",
1440
+ renderedFormat: "lowerLetter",
1441
+ supportsMutation: true,
1442
+ render: (value) => toAlphabetic2(value).toLowerCase()
1443
+ },
1444
+ {
1445
+ format: "upperRoman",
1446
+ renderSupport: "supported",
1447
+ renderedFormat: "upperRoman",
1448
+ supportsMutation: true,
1449
+ render: (value) => toRoman2(value).toUpperCase()
1450
+ },
1451
+ {
1452
+ format: "lowerRoman",
1453
+ renderSupport: "supported",
1454
+ renderedFormat: "lowerRoman",
1455
+ supportsMutation: true,
1456
+ render: (value) => toRoman2(value).toLowerCase()
1457
+ },
1458
+ {
1459
+ format: "hex",
1460
+ renderSupport: "supported",
1461
+ renderedFormat: "hex",
1462
+ supportsMutation: true,
1463
+ render: (value) => value >= 0 ? value.toString(16).toUpperCase() : String(value)
1464
+ },
1465
+ {
1466
+ format: "ordinal",
1467
+ renderSupport: "supported",
1468
+ renderedFormat: "ordinal",
1469
+ supportsMutation: true,
1470
+ render: toOrdinal2
1471
+ },
1472
+ {
1473
+ format: "cardinalText",
1474
+ renderSupport: "supported",
1475
+ renderedFormat: "cardinalText",
1476
+ supportsMutation: true,
1477
+ render: toCardinalText2
1478
+ },
1479
+ {
1480
+ format: "ordinalText",
1481
+ renderSupport: "supported",
1482
+ renderedFormat: "ordinalText",
1483
+ supportsMutation: true,
1484
+ render: toOrdinalText2
1485
+ },
1486
+ {
1487
+ format: "chicago",
1488
+ renderSupport: "supported",
1489
+ renderedFormat: "chicago",
1490
+ supportsMutation: true,
1491
+ render: toChicago2
1492
+ },
1493
+ {
1494
+ format: "bullet",
1495
+ renderSupport: "supported",
1496
+ renderedFormat: "bullet",
1497
+ supportsMutation: true,
1498
+ render: () => ""
1499
+ },
1500
+ {
1501
+ format: "none",
1502
+ renderSupport: "supported",
1503
+ renderedFormat: "none",
1504
+ supportsMutation: true,
1505
+ render: () => ""
1453
1506
  }
1454
- }
1507
+ ];
1508
+ var approximatedDecimalFormats = [
1509
+ "decimalEnclosedCircle",
1510
+ "decimalEnclosedFullstop",
1511
+ "decimalEnclosedParen",
1512
+ "decimalFullWidth",
1513
+ "decimalHalfWidth",
1514
+ "aiueo",
1515
+ "iroha",
1516
+ "ganada",
1517
+ "chosung",
1518
+ "russianLower",
1519
+ "russianUpper",
1520
+ "hebrew1",
1521
+ "hebrew2",
1522
+ "arabicAlpha",
1523
+ "arabicAbjad",
1524
+ "thaiLetters",
1525
+ "thaiNumbers",
1526
+ "hindiLetters",
1527
+ "hindiNumbers",
1528
+ "ideographDigital",
1529
+ "ideographTraditional",
1530
+ "chineseCounting",
1531
+ "japaneseCounting",
1532
+ "japaneseLegal"
1533
+ ];
1534
+ var approximatedNumberingFormatEntries = approximatedDecimalFormats.map((format) => ({
1535
+ format,
1536
+ renderSupport: "approximated",
1537
+ renderedFormat: "decimal",
1538
+ supportsMutation: false,
1539
+ fallbackReason: "unsupported-numbering-format-decimal-fallback",
1540
+ render: (value) => String(value)
1541
+ }));
1542
+ var NUMBERING_FORMAT_REGISTRY = new Map(
1543
+ [...exactNumberingFormatEntries, ...approximatedNumberingFormatEntries].map((entry) => [
1544
+ entry.format,
1545
+ entry
1546
+ ])
1547
+ );
1455
1548
  function toOrdinal2(value) {
1456
1549
  if (value <= 0) return String(value);
1457
1550
  const lastTwo = value % 100;
@@ -2105,12 +2198,36 @@ var DEFAULT_HYPERLINK_COLOR_HEX = "0563C1";
2105
2198
  function resolveHyperlinkRunFormatting(input, catalog, resolver) {
2106
2199
  const augmentedInput = input.characterStyleId === void 0 ? { ...input, characterStyleId: HYPERLINK_CHARACTER_STYLE_ID } : input;
2107
2200
  const cascade = resolveEffectiveRunFormatting(augmentedInput, catalog);
2108
- const resolvedColor = resolveHyperlinkColorHex(cascade, resolver);
2201
+ const resolvedColor = resolveHyperlinkColorHex(
2202
+ stripInheritedColorHexForImplicitHyperlink(input, catalog, cascade),
2203
+ resolver
2204
+ );
2109
2205
  if (resolvedColor && resolvedColor !== cascade.colorHex) {
2110
2206
  return { ...cascade, colorHex: resolvedColor };
2111
2207
  }
2112
2208
  return cascade;
2113
2209
  }
2210
+ function hasDirectNonAutoColor(input) {
2211
+ return Boolean(input.direct?.colorHex && input.direct.colorHex !== "auto");
2212
+ }
2213
+ function characterStyleDeclaresColorHex(styleId, catalog) {
2214
+ if (!catalog) return false;
2215
+ const chain = resolveCharacterStyleChain(styleId, catalog);
2216
+ return chain.some((chainStyleId) => {
2217
+ const colorHex = catalog.characters[chainStyleId]?.runProperties?.colorHex;
2218
+ return Boolean(colorHex && colorHex !== "auto");
2219
+ });
2220
+ }
2221
+ function stripInheritedColorHexForImplicitHyperlink(originalInput, catalog, cascade) {
2222
+ if (originalInput.characterStyleId !== void 0 || hasDirectNonAutoColor(originalInput) || !cascade.colorHex || cascade.colorHex === "auto" || characterStyleDeclaresColorHex(HYPERLINK_CHARACTER_STYLE_ID, catalog)) {
2223
+ return cascade;
2224
+ }
2225
+ const inheritedCascade = resolveEffectiveRunFormatting(originalInput, catalog);
2226
+ if (inheritedCascade.colorHex !== cascade.colorHex) {
2227
+ return cascade;
2228
+ }
2229
+ return { ...cascade, colorHex: void 0 };
2230
+ }
2114
2231
  function resolveHyperlinkColorHex(cascade, resolver) {
2115
2232
  if (cascade.colorHex && cascade.colorHex !== "auto") {
2116
2233
  return cascade.colorHex;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  classifyFieldInstruction
3
- } from "./chunk-4YJVRIUB.js";
3
+ } from "./chunk-Q3QYGKFE.js";
4
4
  import {
5
5
  describeOpaqueFragment,
6
6
  describeStructuredWrapperBlock,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Y4XZCMCS.js";
4
4
  import {
5
5
  applyTextTransaction
6
- } from "./chunk-KV435YXO.js";
6
+ } from "./chunk-5DSHUYSY.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-BYSRJ4FE.js";
14
+ } from "./chunk-W34X3KBR.js";
15
15
  import {
16
16
  NO_EDITABLE_TARGETS_INDEX,
17
17
  createEditorSurfaceSnapshot
18
- } from "./chunk-CXSYRB37.js";
18
+ } from "./chunk-HUIHBBAQ.js";
19
19
  import {
20
20
  createSelectionSnapshot
21
21
  } from "./chunk-OYGMRRR7.js";
@@ -3,10 +3,10 @@ import {
3
3
  PAGE_STACK_GAP_PX,
4
4
  defaultChromeReservations,
5
5
  resolveDefaultZoom
6
- } from "./chunk-YHZHPXDB.js";
6
+ } from "./chunk-RMRTQGW3.js";
7
7
  import {
8
8
  storyTargetKey
9
- } from "./chunk-CXSYRB37.js";
9
+ } from "./chunk-HUIHBBAQ.js";
10
10
  import {
11
11
  MAIN_STORY_KEY,
12
12
  collectCanonicalLayoutInputs,
@@ -2,7 +2,7 @@ import {
2
2
  incrementInvalidationCounter,
3
3
  recordPerfSample,
4
4
  resolvePageOverlayRectsFromGeometry
5
- } from "./chunk-MWSBGJQO.js";
5
+ } from "./chunk-OTQIW2TC.js";
6
6
  import {
7
7
  buildPageAnchorAttributes,
8
8
  buildPageAnchorSelector,
@@ -20,13 +20,13 @@ import {
20
20
  findPageForOffset,
21
21
  getUsableColumnWidth,
22
22
  sanitizeMarkdown
23
- } from "./chunk-YHZHPXDB.js";
23
+ } from "./chunk-RMRTQGW3.js";
24
24
  import {
25
25
  createCanvasBackend
26
26
  } from "./chunk-KFCQYZXR.js";
27
27
  import {
28
28
  storyTargetKey
29
- } from "./chunk-CXSYRB37.js";
29
+ } from "./chunk-HUIHBBAQ.js";
30
30
  import {
31
31
  EMU_PER_INCH,
32
32
  EMU_PER_PX,