@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
@@ -1,9 +1,9 @@
1
1
  export { BreakpointMap, CollabAudienceChip, CollabAudienceChipProps, CollabNegotiationActionBar, CollabNegotiationActionBarProps, CollabPresenceStrip, CollabPresenceStripProps, CollabRoleChip, CollabRoleChipProps, CollabSendToSupplierButton, CollabSendToSupplierButtonProps, CollabSendToSupplierModal, CollabSendToSupplierModalProps, CollabSendToSupplierSubmitArgs, CollabTamperBanner, CollabTamperBannerProps, CommandPaletteGroup, CommandPaletteItem, CommentDecorationModel, CommentMarkdownRenderer, CommentMarkdownRendererProps, EditorKeyboardCallbacks, EditorKeyboardContext, MarkupDisplay, RailCardAvatar, RailCardCounter, RailCardProgress, RailCardTone, ReviewRailTab, RevisionDecorationModel, ShellHeaderIconAction, ShellHeaderMode, ShellHeaderModeOption, ShellHeaderPrimaryAction, TwAlertBanner, TwChromeOverlay, TwChromeOverlayProps, TwCommandPalette, TwCommandPaletteMount, TwCommandPaletteMountProps, TwCommandPaletteProps, TwCommentSidebar, TwCommentSidebarProps, TwEditorSurface, TwEditorSurfaceProps, TwHealthPanel, TwInlineToken, TwOpaqueBlock, TwParagraphBlock, TwPasteDropToast, TwPasteDropToastProps, TwRailCard, TwRailCardProps, TwReviewRail, TwReviewRailFooter, TwReviewRailFooterProps, TwReviewRailProps, TwReviewWorkspace, TwReviewWorkspaceProps, TwRevisionSidebar, TwScopeRailLayer, TwScopeRailLayerProps, TwSegmentView, TwSelectionToolbar, TwShellHeader, TwShellHeaderProps, TwStatusBar, TwToolbar, TwToolbarIconButton, TwToolbarProps, TwWorkflowTab, TwWorkflowTabProps, createCommentDecorationModel, createEditorKeyboardHandler, createRevisionDecorationModel, createSelectionSnapshot, getCommentHighlightClass, getCommentRangeState, getRevisionHighlightClass, getRevisionRangeState, isCommandPaletteOpenShortcut, renderTwCaret, resolveBreakpoint, selectionTouchesRange, shouldHideInCleanMode, useContainerBreakpoint } from './ui-tailwind.js';
2
- export { e_ as SessionCapabilities, eI as WorkspaceMode, eJ as ZoomLevel, fh as deriveCapabilities } from './public-types-Cgl3efbO.js';
2
+ export { e_ as SessionCapabilities, eI as WorkspaceMode, eJ as ZoomLevel, fh as deriveCapabilities } from './public-types-p9b8rfy8.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import 'yjs';
6
6
  import 'y-protocols/awareness';
7
- import './canonical-document-CXCFCbAz.js';
7
+ import './canonical-document-BMtONpgf.js';
8
8
  import 'prosemirror-state';
9
9
  import 'prosemirror-model';
package/dist/tailwind.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  TwShellHeader,
10
10
  createEditorKeyboardHandler,
11
11
  renderTwCaret
12
- } from "./chunk-D5HYZQTG.js";
12
+ } from "./chunk-VNLDQJ47.js";
13
13
  import {
14
14
  CollabAudienceChip,
15
15
  CollabNegotiationActionBar,
@@ -47,15 +47,15 @@ import {
47
47
  selectionTouchesRange,
48
48
  shouldHideInCleanMode,
49
49
  useContainerBreakpoint
50
- } from "./chunk-2QL5DAKF.js";
51
- import "./chunk-MWSBGJQO.js";
50
+ } from "./chunk-PGKUJZXV.js";
51
+ import "./chunk-OTQIW2TC.js";
52
52
  import "./chunk-YIYM4ZAP.js";
53
53
  import {
54
54
  deriveCapabilities
55
- } from "./chunk-YHZHPXDB.js";
55
+ } from "./chunk-RMRTQGW3.js";
56
56
  import "./chunk-KFCQYZXR.js";
57
57
  import "./chunk-QIO6V46H.js";
58
- import "./chunk-CXSYRB37.js";
58
+ import "./chunk-HUIHBBAQ.js";
59
59
  import "./chunk-OYGMRRR7.js";
60
60
  import "./chunk-5DGKFNQT.js";
61
61
  import "./chunk-UFVDIR2C.js";
@@ -1,5 +1,5 @@
1
- import { C as CanonicalDocument, D as DocumentRootNode, d as PreservationStore } from './canonical-document-CXCFCbAz.cjs';
2
- import { E as EditorHostAdapter, L as LoadStage, o as EditorSurfaceSnapshot, p as LoadSchedulerBackend, a as EditorSessionState, q as CompatibilityReport, r as EditorError, t as ProtectionSnapshot, P as PersistedEditorSnapshot, b as ExportDocxOptions, c as ExportResult } from './public-types-beSYFJRR.cjs';
1
+ import { C as CanonicalDocument, D as DocumentRootNode, d as PreservationStore } from './canonical-document-BMtONpgf.cjs';
2
+ import { E as EditorHostAdapter, L as LoadStage, o as EditorSurfaceSnapshot, p as LoadSchedulerBackend, a as EditorSessionState, q as CompatibilityReport, r as EditorError, t as ProtectionSnapshot, P as PersistedEditorSnapshot, b as ExportDocxOptions, c as ExportResult } from './public-types-B5CRoR6f.cjs';
3
3
 
4
4
  /**
5
5
  * Embedded-object classifier (hotfix/ole-digestibility-guard).
@@ -1,5 +1,5 @@
1
- import { C as CanonicalDocument, D as DocumentRootNode, d as PreservationStore } from './canonical-document-CXCFCbAz.js';
2
- import { E as EditorHostAdapter, L as LoadStage, o as EditorSurfaceSnapshot, p as LoadSchedulerBackend, a as EditorSessionState, q as CompatibilityReport, r as EditorError, t as ProtectionSnapshot, P as PersistedEditorSnapshot, b as ExportDocxOptions, c as ExportResult } from './public-types-Cgl3efbO.js';
1
+ import { C as CanonicalDocument, D as DocumentRootNode, d as PreservationStore } from './canonical-document-BMtONpgf.js';
2
+ import { E as EditorHostAdapter, L as LoadStage, o as EditorSurfaceSnapshot, p as LoadSchedulerBackend, a as EditorSessionState, q as CompatibilityReport, r as EditorError, t as ProtectionSnapshot, P as PersistedEditorSnapshot, b as ExportDocxOptions, c as ExportResult } from './public-types-p9b8rfy8.js';
3
3
 
4
4
  /**
5
5
  * Embedded-object classifier (hotfix/ole-digestibility-guard).
@@ -1,10 +1,10 @@
1
1
  import { EditorState, Transaction, Plugin, PluginKey } from 'prosemirror-state';
2
- import { j as SearchOptions$1, k as SearchTextOptions } from '../../public-types-beSYFJRR.cjs';
3
- export { l as SecondaryStorySearchResult, m as createSearchExcerpt, n as findSearchMatches, s as searchSecondaryStories } from '../../public-types-beSYFJRR.cjs';
2
+ import { j as SearchOptions$1, k as SearchTextOptions } from '../../public-types-B5CRoR6f.cjs';
3
+ export { l as SecondaryStorySearchResult, m as createSearchExcerpt, n as findSearchMatches, s as searchSecondaryStories } from '../../public-types-B5CRoR6f.cjs';
4
4
  import 'react';
5
5
  import 'yjs';
6
6
  import 'y-protocols/awareness';
7
- import '../../canonical-document-CXCFCbAz.cjs';
7
+ import '../../canonical-document-BMtONpgf.cjs';
8
8
  import 'prosemirror-model';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { EditorState, Transaction, Plugin, PluginKey } from 'prosemirror-state';
2
- import { j as SearchOptions$1, k as SearchTextOptions } from '../../public-types-Cgl3efbO.js';
3
- export { l as SecondaryStorySearchResult, m as createSearchExcerpt, n as findSearchMatches, s as searchSecondaryStories } from '../../public-types-Cgl3efbO.js';
2
+ import { j as SearchOptions$1, k as SearchTextOptions } from '../../public-types-p9b8rfy8.js';
3
+ export { l as SecondaryStorySearchResult, m as createSearchExcerpt, n as findSearchMatches, s as searchSecondaryStories } from '../../public-types-p9b8rfy8.js';
4
4
  import 'react';
5
5
  import 'yjs';
6
6
  import 'y-protocols/awareness';
7
- import '../../canonical-document-CXCFCbAz.js';
7
+ import '../../canonical-document-BMtONpgf.js';
8
8
  import 'prosemirror-model';
9
9
 
10
10
  /**
@@ -4,15 +4,15 @@ import {
4
4
  createSearchPlugin,
5
5
  performSearch,
6
6
  searchPluginKey
7
- } from "../../chunk-4EENH4FG.js";
7
+ } from "../../chunk-EZKJXIPH.js";
8
8
  import {
9
9
  createSearchExcerpt,
10
10
  findSearchMatches,
11
11
  searchSecondaryStories
12
- } from "../../chunk-YHZHPXDB.js";
12
+ } from "../../chunk-RMRTQGW3.js";
13
13
  import "../../chunk-KFCQYZXR.js";
14
14
  import "../../chunk-QIO6V46H.js";
15
- import "../../chunk-CXSYRB37.js";
15
+ import "../../chunk-HUIHBBAQ.js";
16
16
  import "../../chunk-OYGMRRR7.js";
17
17
  import "../../chunk-5DGKFNQT.js";
18
18
  import "../../chunk-UFVDIR2C.js";
@@ -10572,12 +10572,13 @@ function getLevelStartAt(level, levelDefinitions) {
10572
10572
  return levelDefinitions.get(level)?.startAt ?? DEFAULT_NUMBERING_START_AT;
10573
10573
  }
10574
10574
  function getNumberingFormatPosture(format, value) {
10575
- if (!isSupportedNumberingFormat(format)) {
10575
+ const registryEntry = getNumberingFormatRegistryEntry(format);
10576
+ if (!registryEntry || registryEntry.renderSupport === "approximated") {
10576
10577
  return {
10577
10578
  status: "approximated",
10578
10579
  requestedFormat: format,
10579
10580
  renderedFormat: "decimal",
10580
- reason: "unsupported-numbering-format-decimal-fallback"
10581
+ reason: registryEntry?.fallbackReason ?? "unsupported-numbering-format-decimal-fallback"
10581
10582
  };
10582
10583
  }
10583
10584
  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)) {
@@ -10608,56 +10609,148 @@ function renderLevelText(text, counters, levelDefinitions) {
10608
10609
  });
10609
10610
  return rendered.trim().length > 0 ? rendered : null;
10610
10611
  }
10611
- var SUPPORTED_NUMBERING_FORMATS = /* @__PURE__ */ new Set([
10612
- "decimal",
10613
- "decimalZero",
10614
- "upperLetter",
10615
- "lowerLetter",
10616
- "upperRoman",
10617
- "lowerRoman",
10618
- "hex",
10619
- "ordinal",
10620
- "cardinalText",
10621
- "ordinalText",
10622
- "chicago",
10623
- "bullet",
10624
- "none"
10625
- ]);
10626
10612
  function isSupportedNumberingFormat(format) {
10627
- return SUPPORTED_NUMBERING_FORMATS.has(format);
10613
+ return getNumberingFormatRegistryEntry(format)?.renderSupport === "supported";
10614
+ }
10615
+ function getNumberingFormatRegistryEntry(format) {
10616
+ return NUMBERING_FORMAT_REGISTRY.get(format);
10628
10617
  }
10629
10618
  function formatCounter(value, format) {
10630
- switch (format) {
10631
- case "decimal":
10632
- return String(value);
10633
- case "decimalZero":
10634
- return String(value).padStart(2, "0");
10635
- case "upperLetter":
10636
- return toAlphabetic2(value).toUpperCase();
10637
- case "lowerLetter":
10638
- return toAlphabetic2(value).toLowerCase();
10639
- case "upperRoman":
10640
- return toRoman2(value).toUpperCase();
10641
- case "lowerRoman":
10642
- return toRoman2(value).toLowerCase();
10643
- case "hex":
10644
- return value >= 0 ? value.toString(16).toUpperCase() : String(value);
10645
- case "ordinal":
10646
- return toOrdinal2(value);
10647
- case "cardinalText":
10648
- return toCardinalText2(value);
10649
- case "ordinalText":
10650
- return toOrdinalText2(value);
10651
- case "chicago":
10652
- return toChicago2(value);
10653
- case "bullet":
10654
- return "";
10655
- case "none":
10656
- return "";
10657
- default:
10658
- return String(value);
10659
- }
10619
+ return getNumberingFormatRegistryEntry(format)?.render(value) ?? String(value);
10660
10620
  }
10621
+ var exactNumberingFormatEntries = [
10622
+ {
10623
+ format: "decimal",
10624
+ renderSupport: "supported",
10625
+ renderedFormat: "decimal",
10626
+ supportsMutation: true,
10627
+ render: (value) => String(value)
10628
+ },
10629
+ {
10630
+ format: "decimalZero",
10631
+ renderSupport: "supported",
10632
+ renderedFormat: "decimalZero",
10633
+ supportsMutation: true,
10634
+ render: (value) => String(value).padStart(2, "0")
10635
+ },
10636
+ {
10637
+ format: "upperLetter",
10638
+ renderSupport: "supported",
10639
+ renderedFormat: "upperLetter",
10640
+ supportsMutation: true,
10641
+ render: (value) => toAlphabetic2(value).toUpperCase()
10642
+ },
10643
+ {
10644
+ format: "lowerLetter",
10645
+ renderSupport: "supported",
10646
+ renderedFormat: "lowerLetter",
10647
+ supportsMutation: true,
10648
+ render: (value) => toAlphabetic2(value).toLowerCase()
10649
+ },
10650
+ {
10651
+ format: "upperRoman",
10652
+ renderSupport: "supported",
10653
+ renderedFormat: "upperRoman",
10654
+ supportsMutation: true,
10655
+ render: (value) => toRoman2(value).toUpperCase()
10656
+ },
10657
+ {
10658
+ format: "lowerRoman",
10659
+ renderSupport: "supported",
10660
+ renderedFormat: "lowerRoman",
10661
+ supportsMutation: true,
10662
+ render: (value) => toRoman2(value).toLowerCase()
10663
+ },
10664
+ {
10665
+ format: "hex",
10666
+ renderSupport: "supported",
10667
+ renderedFormat: "hex",
10668
+ supportsMutation: true,
10669
+ render: (value) => value >= 0 ? value.toString(16).toUpperCase() : String(value)
10670
+ },
10671
+ {
10672
+ format: "ordinal",
10673
+ renderSupport: "supported",
10674
+ renderedFormat: "ordinal",
10675
+ supportsMutation: true,
10676
+ render: toOrdinal2
10677
+ },
10678
+ {
10679
+ format: "cardinalText",
10680
+ renderSupport: "supported",
10681
+ renderedFormat: "cardinalText",
10682
+ supportsMutation: true,
10683
+ render: toCardinalText2
10684
+ },
10685
+ {
10686
+ format: "ordinalText",
10687
+ renderSupport: "supported",
10688
+ renderedFormat: "ordinalText",
10689
+ supportsMutation: true,
10690
+ render: toOrdinalText2
10691
+ },
10692
+ {
10693
+ format: "chicago",
10694
+ renderSupport: "supported",
10695
+ renderedFormat: "chicago",
10696
+ supportsMutation: true,
10697
+ render: toChicago2
10698
+ },
10699
+ {
10700
+ format: "bullet",
10701
+ renderSupport: "supported",
10702
+ renderedFormat: "bullet",
10703
+ supportsMutation: true,
10704
+ render: () => ""
10705
+ },
10706
+ {
10707
+ format: "none",
10708
+ renderSupport: "supported",
10709
+ renderedFormat: "none",
10710
+ supportsMutation: true,
10711
+ render: () => ""
10712
+ }
10713
+ ];
10714
+ var approximatedDecimalFormats = [
10715
+ "decimalEnclosedCircle",
10716
+ "decimalEnclosedFullstop",
10717
+ "decimalEnclosedParen",
10718
+ "decimalFullWidth",
10719
+ "decimalHalfWidth",
10720
+ "aiueo",
10721
+ "iroha",
10722
+ "ganada",
10723
+ "chosung",
10724
+ "russianLower",
10725
+ "russianUpper",
10726
+ "hebrew1",
10727
+ "hebrew2",
10728
+ "arabicAlpha",
10729
+ "arabicAbjad",
10730
+ "thaiLetters",
10731
+ "thaiNumbers",
10732
+ "hindiLetters",
10733
+ "hindiNumbers",
10734
+ "ideographDigital",
10735
+ "ideographTraditional",
10736
+ "chineseCounting",
10737
+ "japaneseCounting",
10738
+ "japaneseLegal"
10739
+ ];
10740
+ var approximatedNumberingFormatEntries = approximatedDecimalFormats.map((format) => ({
10741
+ format,
10742
+ renderSupport: "approximated",
10743
+ renderedFormat: "decimal",
10744
+ supportsMutation: false,
10745
+ fallbackReason: "unsupported-numbering-format-decimal-fallback",
10746
+ render: (value) => String(value)
10747
+ }));
10748
+ var NUMBERING_FORMAT_REGISTRY = new Map(
10749
+ [...exactNumberingFormatEntries, ...approximatedNumberingFormatEntries].map((entry) => [
10750
+ entry.format,
10751
+ entry
10752
+ ])
10753
+ );
10661
10754
  function toOrdinal2(value) {
10662
10755
  if (value <= 0) return String(value);
10663
10756
  const lastTwo = value % 100;
@@ -11311,12 +11404,36 @@ var DEFAULT_HYPERLINK_COLOR_HEX = "0563C1";
11311
11404
  function resolveHyperlinkRunFormatting(input, catalog, resolver) {
11312
11405
  const augmentedInput = input.characterStyleId === void 0 ? { ...input, characterStyleId: HYPERLINK_CHARACTER_STYLE_ID } : input;
11313
11406
  const cascade = resolveEffectiveRunFormatting(augmentedInput, catalog);
11314
- const resolvedColor = resolveHyperlinkColorHex(cascade, resolver);
11407
+ const resolvedColor = resolveHyperlinkColorHex(
11408
+ stripInheritedColorHexForImplicitHyperlink(input, catalog, cascade),
11409
+ resolver
11410
+ );
11315
11411
  if (resolvedColor && resolvedColor !== cascade.colorHex) {
11316
11412
  return { ...cascade, colorHex: resolvedColor };
11317
11413
  }
11318
11414
  return cascade;
11319
11415
  }
11416
+ function hasDirectNonAutoColor(input) {
11417
+ return Boolean(input.direct?.colorHex && input.direct.colorHex !== "auto");
11418
+ }
11419
+ function characterStyleDeclaresColorHex(styleId, catalog) {
11420
+ if (!catalog) return false;
11421
+ const chain = resolveCharacterStyleChain(styleId, catalog);
11422
+ return chain.some((chainStyleId) => {
11423
+ const colorHex = catalog.characters[chainStyleId]?.runProperties?.colorHex;
11424
+ return Boolean(colorHex && colorHex !== "auto");
11425
+ });
11426
+ }
11427
+ function stripInheritedColorHexForImplicitHyperlink(originalInput, catalog, cascade) {
11428
+ if (originalInput.characterStyleId !== void 0 || hasDirectNonAutoColor(originalInput) || !cascade.colorHex || cascade.colorHex === "auto" || characterStyleDeclaresColorHex(HYPERLINK_CHARACTER_STYLE_ID, catalog)) {
11429
+ return cascade;
11430
+ }
11431
+ const inheritedCascade = resolveEffectiveRunFormatting(originalInput, catalog);
11432
+ if (inheritedCascade.colorHex !== cascade.colorHex) {
11433
+ return cascade;
11434
+ }
11435
+ return { ...cascade, colorHex: void 0 };
11436
+ }
11320
11437
  function resolveHyperlinkColorHex(cascade, resolver) {
11321
11438
  if (cascade.colorHex && cascade.colorHex !== "auto") {
11322
11439
  return cascade.colorHex;
@@ -16526,6 +16643,14 @@ function paginateSectionBlocksWithSplits(section, blocks, layout, footnotes, mea
16526
16643
  pushPage(block.from);
16527
16644
  continue;
16528
16645
  }
16646
+ if (isStandalonePageBreakParagraph(block)) {
16647
+ if (columnHeight > 0) {
16648
+ pushPage(nextBoundary);
16649
+ } else {
16650
+ pageStart = Math.max(pageStart, Math.min(nextBoundary, section.end));
16651
+ }
16652
+ break;
16653
+ }
16529
16654
  const effectiveNoteHeight = estimateFootnoteReservation(
16530
16655
  block,
16531
16656
  footnotes,
@@ -16700,6 +16825,21 @@ function hasPageBreak(block) {
16700
16825
  }
16701
16826
  return nestedBlocks(block).some(hasPageBreak);
16702
16827
  }
16828
+ function isStandalonePageBreakParagraph(block) {
16829
+ if (block.kind !== "paragraph") return false;
16830
+ let sawPageBreak = false;
16831
+ for (const segment of block.segments) {
16832
+ if (segment.kind === "opaque_inline" && segment.label === "Page break") {
16833
+ sawPageBreak = true;
16834
+ continue;
16835
+ }
16836
+ if (segment.kind === "text" && segment.text.trim().length === 0) {
16837
+ continue;
16838
+ }
16839
+ return false;
16840
+ }
16841
+ return sawPageBreak;
16842
+ }
16703
16843
  function nestedBlocks(block) {
16704
16844
  if (block.kind === "sdt_block") {
16705
16845
  return block.children;
@@ -18161,6 +18301,9 @@ function projectSurfaceBlocksToPageFragments(surface, pages, splits, columnByBlo
18161
18301
  for (let blockIndex = 0; blockIndex < surface.blocks.length; blockIndex += 1) {
18162
18302
  const block = surface.blocks[blockIndex];
18163
18303
  const blockPath = `main/block[${blockIndex}]`;
18304
+ if (isStandalonePageBreakParagraph2(block)) {
18305
+ continue;
18306
+ }
18164
18307
  if (block.kind === "table") {
18165
18308
  const tableSliceList = splits?.tablesByBlockId.get(block.blockId);
18166
18309
  if (tableSliceList && tableSliceList.length > 1) {
@@ -18246,6 +18389,23 @@ function projectSurfaceBlocksToPageFragments(surface, pages, splits, columnByBlo
18246
18389
  }
18247
18390
  return byPage;
18248
18391
  }
18392
+ function isStandalonePageBreakParagraph2(block) {
18393
+ if (block.kind !== "paragraph") {
18394
+ return false;
18395
+ }
18396
+ let sawPageBreak = false;
18397
+ for (const segment of block.segments) {
18398
+ if (segment.kind === "opaque_inline" && segment.label === "Page break") {
18399
+ sawPageBreak = true;
18400
+ continue;
18401
+ }
18402
+ if (segment.kind === "text" && segment.text.trim().length === 0) {
18403
+ continue;
18404
+ }
18405
+ return false;
18406
+ }
18407
+ return sawPageBreak;
18408
+ }
18249
18409
  function projectLineBoxesForPageFragments(pages, fragmentsByPageIndex, fragmentMeasurementsByPageIndex, surface) {
18250
18410
  const byPage = /* @__PURE__ */ new Map();
18251
18411
  const blocksById = surface ? new Map(surface.blocks.map((block) => [block.blockId, block])) : /* @__PURE__ */ new Map();
@@ -18758,13 +18918,11 @@ function buildBookmarkRanges(targets) {
18758
18918
  }
18759
18919
  var EMPTY_NUMBERING_INPUT_INDEX = {
18760
18920
  byNumberingKey: /* @__PURE__ */ new Map(),
18761
- byBlockPath: /* @__PURE__ */ new Map(),
18762
- byParagraphIndex: /* @__PURE__ */ new Map()
18921
+ byBlockPath: /* @__PURE__ */ new Map()
18763
18922
  };
18764
18923
  function buildNumberingInputIndex(numberingInputs) {
18765
18924
  const byNumberingKey = /* @__PURE__ */ new Map();
18766
18925
  const byBlockPath = /* @__PURE__ */ new Map();
18767
- const byParagraph = /* @__PURE__ */ new Map();
18768
18926
  for (const input of numberingInputs) {
18769
18927
  if (!byNumberingKey.has(input.numberingKey)) {
18770
18928
  byNumberingKey.set(input.numberingKey, input);
@@ -18772,11 +18930,8 @@ function buildNumberingInputIndex(numberingInputs) {
18772
18930
  if (!byBlockPath.has(input.blockPath)) {
18773
18931
  byBlockPath.set(input.blockPath, input);
18774
18932
  }
18775
- if (!byParagraph.has(input.paragraphIndex)) {
18776
- byParagraph.set(input.paragraphIndex, input);
18777
- }
18778
18933
  }
18779
- return { byNumberingKey, byBlockPath, byParagraphIndex: byParagraph };
18934
+ return { byNumberingKey, byBlockPath };
18780
18935
  }
18781
18936
  function collectBookmarkRangeLayoutFacts(fragmentId, blockPath, bookmarkRanges) {
18782
18937
  if (!blockPath || !bookmarkRanges || bookmarkRanges.length === 0) return [];
@@ -18896,8 +19051,7 @@ function collectNumberingLayoutFactsForBlock(block, blockPath, numberingIndex, n
18896
19051
  const canonical = lookupNumberingInput(
18897
19052
  numberingIndex,
18898
19053
  numberingKey,
18899
- context.path,
18900
- paragraphIndex
19054
+ context.path
18901
19055
  );
18902
19056
  const target = findNumberingTarget(numberingTargets, context.path);
18903
19057
  const numberingLayoutId = numberingKey ?? [
@@ -18937,7 +19091,7 @@ function findNumberingTarget(numberingTargets, blockPath) {
18937
19091
  if (blockPath === void 0) return void 0;
18938
19092
  return numberingTargets.find((target) => target.blockPath === blockPath);
18939
19093
  }
18940
- function lookupNumberingInput(numberingIndex, numberingKey, blockPath, paragraphIndex) {
19094
+ function lookupNumberingInput(numberingIndex, numberingKey, blockPath) {
18941
19095
  if (!numberingIndex) return void 0;
18942
19096
  if (numberingKey !== void 0) {
18943
19097
  const byKey = numberingIndex.byNumberingKey.get(numberingKey);
@@ -18947,7 +19101,7 @@ function lookupNumberingInput(numberingIndex, numberingKey, blockPath, paragraph
18947
19101
  const byPath = numberingIndex.byBlockPath.get(blockPath);
18948
19102
  if (byPath !== void 0) return byPath;
18949
19103
  }
18950
- return paragraphIndex !== void 0 ? numberingIndex.byParagraphIndex.get(paragraphIndex) : void 0;
19104
+ return void 0;
18951
19105
  }
18952
19106
  function collectNumberingUnavailableReasons(numbering, canonical) {
18953
19107
  const reasons = [];
@@ -19338,7 +19492,7 @@ function createEmpiricalProvider() {
19338
19492
  }
19339
19493
 
19340
19494
  // src/runtime/layout/layout-engine-version.ts
19341
- var LAYOUT_ENGINE_VERSION = 88;
19495
+ var LAYOUT_ENGINE_VERSION = 89;
19342
19496
 
19343
19497
  // src/runtime/layout/layout-engine-instance.ts
19344
19498
  var FULL_VIEWPORT_WINDOW_KEY = "full";
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { b$ as CommentSidebarSnapshot, ed as TrackedChangeEntrySnapshot, ee as TrackedChangesSnapshot, c4 as CompatibilityPanelSnapshot, cB as EditorWarning, dn as RuntimeContextAnalyticsSnapshot, eV as ScopeRailSegment, ek as WorkflowBlockedCommandReason, c1 as CommentSidebarThreadSnapshot, eI as WorkspaceMode, eJ as ZoomLevel, eW as ChromePinSurface, eX as PinState, eY as FormattingAlignment, I as InsertTableOptions, dG as SectionBreakType, eZ as InsertImageOptions, dH as SectionLayoutPatch, dI as SectionPageNumberingPatch, cF as HeaderFooterLinkPatch, cx as EditorStoryTarget, R as RuntimeRenderSnapshot, cA as EditorViewStateSnapshot, e_ as SessionCapabilities, e$ as WordReviewEditorLayoutFacet, f0 as GeometryFacet, f1 as WorkflowFacet, f2 as EditorActionHostCallbacks, f3 as TwWorkspaceChromeHostController, f4 as FormattingStateSnapshot, bf as ActiveListContext, dT as StyleCatalogSnapshot, eG as WorkflowScopeSnapshot, cL as InteractionGuardSnapshot, eh as WordReviewEditorChromePreset, eg as WordReviewEditorChromeOptions, bF as CollabSession, b7 as TransportStatus, de as ReviewQueueSnapshot, f5 as UiObjectDragStartInput, f6 as UiObjectDragSession, f7 as ActiveSelectionToolModel, cd as DocumentNavigationSnapshot, f8 as TableStructureContextSnapshot, ei as WordReviewEditorChromeVisibility, f9 as EditorRole, eF as WorkflowScopeMode, dB as ScopeIssueAction, ck as EditorAnchorProjection, cz as EditorUser, h as SelectionSnapshot, dX as SurfaceBlockSnapshot, dY as SurfaceInlineSegment, bZ as CommentPresentationSnapshot, bO as CommentBody, bQ as CommentMention, bM as CommentAttachment, fa as ToolbarChromeItemId, fb as ToolbarChromePlacement, dJ as SelectionToolKind, fc as ScopeRailPosture, fd as ChromePinsState, fe as PublicMeasurementFidelity, ff as FormattingInlineSelectionToolModel, b9 as PresenceSnapshot, b8 as CollabPosture, bN as CommentAudience, cU as MetadataIntegrity, bT as CommentNegotiationEntry, c_ as NegotiationRole, bR as CommentNegotiationAction, d0 as PageLayoutSnapshot, fg as EditableTargetRef } from './public-types-beSYFJRR.cjs';
3
- export { fh as deriveCapabilities } from './public-types-beSYFJRR.cjs';
2
+ import { b$ as CommentSidebarSnapshot, ed as TrackedChangeEntrySnapshot, ee as TrackedChangesSnapshot, c4 as CompatibilityPanelSnapshot, cB as EditorWarning, dn as RuntimeContextAnalyticsSnapshot, eV as ScopeRailSegment, ek as WorkflowBlockedCommandReason, c1 as CommentSidebarThreadSnapshot, eI as WorkspaceMode, eJ as ZoomLevel, eW as ChromePinSurface, eX as PinState, eY as FormattingAlignment, I as InsertTableOptions, dG as SectionBreakType, eZ as InsertImageOptions, dH as SectionLayoutPatch, dI as SectionPageNumberingPatch, cF as HeaderFooterLinkPatch, cx as EditorStoryTarget, R as RuntimeRenderSnapshot, cA as EditorViewStateSnapshot, e_ as SessionCapabilities, e$ as WordReviewEditorLayoutFacet, f0 as GeometryFacet, f1 as WorkflowFacet, f2 as EditorActionHostCallbacks, f3 as TwWorkspaceChromeHostController, f4 as FormattingStateSnapshot, bf as ActiveListContext, dT as StyleCatalogSnapshot, eG as WorkflowScopeSnapshot, cL as InteractionGuardSnapshot, eh as WordReviewEditorChromePreset, eg as WordReviewEditorChromeOptions, bF as CollabSession, b7 as TransportStatus, de as ReviewQueueSnapshot, f5 as UiObjectDragStartInput, f6 as UiObjectDragSession, f7 as ActiveSelectionToolModel, cd as DocumentNavigationSnapshot, f8 as TableStructureContextSnapshot, ei as WordReviewEditorChromeVisibility, f9 as EditorRole, eF as WorkflowScopeMode, dB as ScopeIssueAction, ck as EditorAnchorProjection, cz as EditorUser, h as SelectionSnapshot, dX as SurfaceBlockSnapshot, dY as SurfaceInlineSegment, bZ as CommentPresentationSnapshot, bO as CommentBody, bQ as CommentMention, bM as CommentAttachment, fa as ToolbarChromeItemId, fb as ToolbarChromePlacement, dJ as SelectionToolKind, fc as ScopeRailPosture, fd as ChromePinsState, fe as PublicMeasurementFidelity, ff as FormattingInlineSelectionToolModel, b9 as PresenceSnapshot, b8 as CollabPosture, bN as CommentAudience, cU as MetadataIntegrity, bT as CommentNegotiationEntry, c_ as NegotiationRole, bR as CommentNegotiationAction, d0 as PageLayoutSnapshot, fg as EditableTargetRef } from './public-types-B5CRoR6f.cjs';
3
+ export { fh as deriveCapabilities } from './public-types-B5CRoR6f.cjs';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { ReactNode, FocusEventHandler, Ref, KeyboardEvent as KeyboardEvent$1 } from 'react';
6
6
  import 'yjs';
7
7
  import 'y-protocols/awareness';
8
- import './canonical-document-CXCFCbAz.cjs';
8
+ import './canonical-document-BMtONpgf.cjs';
9
9
  import 'prosemirror-state';
10
10
  import 'prosemirror-model';
11
11
 
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { b$ as CommentSidebarSnapshot, ed as TrackedChangeEntrySnapshot, ee as TrackedChangesSnapshot, c4 as CompatibilityPanelSnapshot, cB as EditorWarning, dn as RuntimeContextAnalyticsSnapshot, eV as ScopeRailSegment, ek as WorkflowBlockedCommandReason, c1 as CommentSidebarThreadSnapshot, eI as WorkspaceMode, eJ as ZoomLevel, eW as ChromePinSurface, eX as PinState, eY as FormattingAlignment, I as InsertTableOptions, dG as SectionBreakType, eZ as InsertImageOptions, dH as SectionLayoutPatch, dI as SectionPageNumberingPatch, cF as HeaderFooterLinkPatch, cx as EditorStoryTarget, R as RuntimeRenderSnapshot, cA as EditorViewStateSnapshot, e_ as SessionCapabilities, e$ as WordReviewEditorLayoutFacet, f0 as GeometryFacet, f1 as WorkflowFacet, f2 as EditorActionHostCallbacks, f3 as TwWorkspaceChromeHostController, f4 as FormattingStateSnapshot, bf as ActiveListContext, dT as StyleCatalogSnapshot, eG as WorkflowScopeSnapshot, cL as InteractionGuardSnapshot, eh as WordReviewEditorChromePreset, eg as WordReviewEditorChromeOptions, bF as CollabSession, b7 as TransportStatus, de as ReviewQueueSnapshot, f5 as UiObjectDragStartInput, f6 as UiObjectDragSession, f7 as ActiveSelectionToolModel, cd as DocumentNavigationSnapshot, f8 as TableStructureContextSnapshot, ei as WordReviewEditorChromeVisibility, f9 as EditorRole, eF as WorkflowScopeMode, dB as ScopeIssueAction, ck as EditorAnchorProjection, cz as EditorUser, h as SelectionSnapshot, dX as SurfaceBlockSnapshot, dY as SurfaceInlineSegment, bZ as CommentPresentationSnapshot, bO as CommentBody, bQ as CommentMention, bM as CommentAttachment, fa as ToolbarChromeItemId, fb as ToolbarChromePlacement, dJ as SelectionToolKind, fc as ScopeRailPosture, fd as ChromePinsState, fe as PublicMeasurementFidelity, ff as FormattingInlineSelectionToolModel, b9 as PresenceSnapshot, b8 as CollabPosture, bN as CommentAudience, cU as MetadataIntegrity, bT as CommentNegotiationEntry, c_ as NegotiationRole, bR as CommentNegotiationAction, d0 as PageLayoutSnapshot, fg as EditableTargetRef } from './public-types-Cgl3efbO.js';
3
- export { fh as deriveCapabilities } from './public-types-Cgl3efbO.js';
2
+ import { b$ as CommentSidebarSnapshot, ed as TrackedChangeEntrySnapshot, ee as TrackedChangesSnapshot, c4 as CompatibilityPanelSnapshot, cB as EditorWarning, dn as RuntimeContextAnalyticsSnapshot, eV as ScopeRailSegment, ek as WorkflowBlockedCommandReason, c1 as CommentSidebarThreadSnapshot, eI as WorkspaceMode, eJ as ZoomLevel, eW as ChromePinSurface, eX as PinState, eY as FormattingAlignment, I as InsertTableOptions, dG as SectionBreakType, eZ as InsertImageOptions, dH as SectionLayoutPatch, dI as SectionPageNumberingPatch, cF as HeaderFooterLinkPatch, cx as EditorStoryTarget, R as RuntimeRenderSnapshot, cA as EditorViewStateSnapshot, e_ as SessionCapabilities, e$ as WordReviewEditorLayoutFacet, f0 as GeometryFacet, f1 as WorkflowFacet, f2 as EditorActionHostCallbacks, f3 as TwWorkspaceChromeHostController, f4 as FormattingStateSnapshot, bf as ActiveListContext, dT as StyleCatalogSnapshot, eG as WorkflowScopeSnapshot, cL as InteractionGuardSnapshot, eh as WordReviewEditorChromePreset, eg as WordReviewEditorChromeOptions, bF as CollabSession, b7 as TransportStatus, de as ReviewQueueSnapshot, f5 as UiObjectDragStartInput, f6 as UiObjectDragSession, f7 as ActiveSelectionToolModel, cd as DocumentNavigationSnapshot, f8 as TableStructureContextSnapshot, ei as WordReviewEditorChromeVisibility, f9 as EditorRole, eF as WorkflowScopeMode, dB as ScopeIssueAction, ck as EditorAnchorProjection, cz as EditorUser, h as SelectionSnapshot, dX as SurfaceBlockSnapshot, dY as SurfaceInlineSegment, bZ as CommentPresentationSnapshot, bO as CommentBody, bQ as CommentMention, bM as CommentAttachment, fa as ToolbarChromeItemId, fb as ToolbarChromePlacement, dJ as SelectionToolKind, fc as ScopeRailPosture, fd as ChromePinsState, fe as PublicMeasurementFidelity, ff as FormattingInlineSelectionToolModel, b9 as PresenceSnapshot, b8 as CollabPosture, bN as CommentAudience, cU as MetadataIntegrity, bT as CommentNegotiationEntry, c_ as NegotiationRole, bR as CommentNegotiationAction, d0 as PageLayoutSnapshot, fg as EditableTargetRef } from './public-types-p9b8rfy8.js';
3
+ export { fh as deriveCapabilities } from './public-types-p9b8rfy8.js';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { ReactNode, FocusEventHandler, Ref, KeyboardEvent as KeyboardEvent$1 } from 'react';
6
6
  import 'yjs';
7
7
  import 'y-protocols/awareness';
8
- import './canonical-document-CXCFCbAz.js';
8
+ import './canonical-document-BMtONpgf.js';
9
9
  import 'prosemirror-state';
10
10
  import 'prosemirror-model';
11
11
 
@@ -9,7 +9,7 @@ import {
9
9
  TwShellHeader,
10
10
  createEditorKeyboardHandler,
11
11
  renderTwCaret
12
- } from "./chunk-D5HYZQTG.js";
12
+ } from "./chunk-VNLDQJ47.js";
13
13
  import {
14
14
  CollabAudienceChip,
15
15
  CollabNegotiationActionBar,
@@ -47,15 +47,15 @@ import {
47
47
  selectionTouchesRange,
48
48
  shouldHideInCleanMode,
49
49
  useContainerBreakpoint
50
- } from "./chunk-2QL5DAKF.js";
51
- import "./chunk-MWSBGJQO.js";
50
+ } from "./chunk-PGKUJZXV.js";
51
+ import "./chunk-OTQIW2TC.js";
52
52
  import "./chunk-YIYM4ZAP.js";
53
53
  import {
54
54
  deriveCapabilities
55
- } from "./chunk-YHZHPXDB.js";
55
+ } from "./chunk-RMRTQGW3.js";
56
56
  import "./chunk-KFCQYZXR.js";
57
57
  import "./chunk-QIO6V46H.js";
58
- import "./chunk-CXSYRB37.js";
58
+ import "./chunk-HUIHBBAQ.js";
59
59
  import "./chunk-OYGMRRR7.js";
60
60
  import "./chunk-5DGKFNQT.js";
61
61
  import "./chunk-UFVDIR2C.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beyondwork/docx-react-component",
3
3
  "publisher": "beyondwork",
4
- "version": "1.0.127",
4
+ "version": "1.0.129",
5
5
  "description": "Embeddable React Word (docx) editor with review, comments, tracked changes, and round-trip OOXML fidelity.",
6
6
  "type": "module",
7
7
  "sideEffects": [