superdoc 2.4.0-next.5 → 2.4.0-next.7

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.
@@ -7,7 +7,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
7
7
  var PRIVATE_ENGINE_INFO = (0, __superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
8
8
  var ENGINE_INFO = Object.freeze({
9
9
  ...PRIVATE_ENGINE_INFO,
10
- superdocVersion: "2.4.0-next.5",
10
+ superdocVersion: "2.4.0-next.7",
11
11
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
12
12
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
13
13
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -6,7 +6,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
6
6
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
7
7
  var ENGINE_INFO = Object.freeze({
8
8
  ...PRIVATE_ENGINE_INFO,
9
- superdocVersion: "2.4.0-next.5",
9
+ superdocVersion: "2.4.0-next.7",
10
10
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
11
11
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
12
12
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -2,9 +2,7 @@ import { TextTarget, TrackedChangeAddress } from './address.js';
2
2
  import { DiscoveryOutput } from './discovery.js';
3
3
  import { StoryLocator } from './story.types.js';
4
4
  /**
5
- * Canonical v2 tracked-change broad-type vocabulary defined by
6
- * `../labs/tests/requirements/specs/tracked-changes-comments/tracked-changes-spec.md`
7
- * §3 / §5.
5
+ * Canonical v2 tracked-change broad-type vocabulary.
8
6
  *
9
7
  * Public adapters MUST emit one of these values. Existing v1 emitters and
10
8
  * tests still produce the legacy `insert` / `delete` / `format` strings; both
package/dist/style.css CHANGED
@@ -1734,11 +1734,11 @@ img[data-v-c95b2073] {
1734
1734
  pointer-events: auto;
1735
1735
  }
1736
1736
 
1737
- .superdoc[data-v-c3bc8a46] {
1737
+ .superdoc[data-v-62293b70] {
1738
1738
  display: flex;
1739
1739
  position: relative;
1740
1740
  }
1741
- .sd-visually-hidden[data-v-c3bc8a46] {
1741
+ .sd-visually-hidden[data-v-62293b70] {
1742
1742
  position: absolute;
1743
1743
  width: 1px;
1744
1744
  height: 1px;
@@ -1749,30 +1749,30 @@ img[data-v-c95b2073] {
1749
1749
  white-space: nowrap;
1750
1750
  border: 0;
1751
1751
  }
1752
- .right-sidebar[data-v-c3bc8a46] {
1752
+ .right-sidebar[data-v-62293b70] {
1753
1753
  min-width: 320px;
1754
1754
  height: 100%;
1755
1755
  }
1756
- .floating-comments[data-v-c3bc8a46] {
1756
+ .floating-comments[data-v-62293b70] {
1757
1757
  min-width: 300px;
1758
1758
  width: 300px;
1759
1759
  height: 100%;
1760
1760
  overflow: visible;
1761
1761
  }
1762
- .superdoc__layers[data-v-c3bc8a46] {
1762
+ .superdoc__layers[data-v-62293b70] {
1763
1763
  height: 100%;
1764
1764
  position: relative;
1765
1765
  box-sizing: border-box;
1766
1766
  }
1767
- .superdoc__document[data-v-c3bc8a46] {
1767
+ .superdoc__document[data-v-62293b70] {
1768
1768
  width: 100%;
1769
1769
  position: relative;
1770
1770
  }
1771
- .superdoc__sub-document[data-v-c3bc8a46] {
1771
+ .superdoc__sub-document[data-v-62293b70] {
1772
1772
  width: 100%;
1773
1773
  position: relative;
1774
1774
  }
1775
- .superdoc__selection-layer[data-v-c3bc8a46] {
1775
+ .superdoc__selection-layer[data-v-62293b70] {
1776
1776
  position: absolute;
1777
1777
  min-width: 100%;
1778
1778
  min-height: 100%;
@@ -1783,13 +1783,13 @@ img[data-v-c95b2073] {
1783
1783
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
1784
1784
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
1785
1785
  clickable, and below the selection layer (z-index 10). */
1786
- .superdoc__whiteboard-layer[data-v-c3bc8a46] {
1786
+ .superdoc__whiteboard-layer[data-v-62293b70] {
1787
1787
  z-index: 4;
1788
1788
  }
1789
- .superdoc__temp-selection[data-v-c3bc8a46] {
1789
+ .superdoc__temp-selection[data-v-62293b70] {
1790
1790
  position: absolute;
1791
1791
  }
1792
- .superdoc__right-sidebar[data-v-c3bc8a46] {
1792
+ .superdoc__right-sidebar[data-v-62293b70] {
1793
1793
  width: 320px;
1794
1794
  min-width: 320px;
1795
1795
  padding: 0 10px;
@@ -1797,7 +1797,7 @@ img[data-v-c95b2073] {
1797
1797
  position: relative;
1798
1798
  z-index: 2;
1799
1799
  }
1800
- .superdoc__compact-comment-popover[data-v-c3bc8a46] {
1800
+ .superdoc__compact-comment-popover[data-v-62293b70] {
1801
1801
  position: absolute;
1802
1802
  top: 12px;
1803
1803
  right: 12px;
@@ -1806,14 +1806,14 @@ img[data-v-c95b2073] {
1806
1806
  }
1807
1807
 
1808
1808
  /* Tools styles */
1809
- .tools[data-v-c3bc8a46] {
1809
+ .tools[data-v-62293b70] {
1810
1810
  position: absolute;
1811
1811
  z-index: 3;
1812
1812
  display: flex;
1813
1813
  flex-direction: column;
1814
1814
  gap: var(--sd-ui-tools-gap, 6px);
1815
1815
  }
1816
- .tools-item[data-v-c3bc8a46] {
1816
+ .tools-item[data-v-62293b70] {
1817
1817
  display: flex;
1818
1818
  align-items: center;
1819
1819
  justify-content: center;
@@ -1824,10 +1824,10 @@ img[data-v-c95b2073] {
1824
1824
  cursor: pointer;
1825
1825
  position: relative;
1826
1826
  }
1827
- .tools-item i[data-v-c3bc8a46] {
1827
+ .tools-item i[data-v-62293b70] {
1828
1828
  cursor: pointer;
1829
1829
  }
1830
- .superdoc__tools-icon[data-v-c3bc8a46] {
1830
+ .superdoc__tools-icon[data-v-62293b70] {
1831
1831
  width: var(--sd-ui-tools-icon-size, 20px);
1832
1832
  height: var(--sd-ui-tools-icon-size, 20px);
1833
1833
  flex-shrink: 0;
@@ -1842,22 +1842,22 @@ img[data-v-c95b2073] {
1842
1842
 
1843
1843
  /* 834px is iPad screen size in portrait orientation */
1844
1844
  @media (max-width: 834px) {
1845
- .superdoc .superdoc__layers[data-v-c3bc8a46] {
1845
+ .superdoc .superdoc__layers[data-v-62293b70] {
1846
1846
  margin: 0;
1847
1847
  border: 0 !important;
1848
1848
  box-shadow: none;
1849
1849
  }
1850
- .superdoc__sub-document[data-v-c3bc8a46] {
1850
+ .superdoc__sub-document[data-v-62293b70] {
1851
1851
  max-width: 100%;
1852
1852
  }
1853
- .superdoc__right-sidebar[data-v-c3bc8a46] {
1853
+ .superdoc__right-sidebar[data-v-62293b70] {
1854
1854
  padding: 10px;
1855
1855
  position: relative;
1856
1856
  }
1857
1857
  }
1858
1858
 
1859
1859
  /* AI Writer styles */
1860
- .ai-writer-container[data-v-c3bc8a46] {
1860
+ .ai-writer-container[data-v-62293b70] {
1861
1861
  position: fixed;
1862
1862
  z-index: 1000;
1863
1863
  background: white;
@@ -1873,10 +1873,10 @@ img[data-v-c95b2073] {
1873
1873
  transform: translateY(-50%);
1874
1874
  z-index: 50;
1875
1875
  } */
1876
- .ai-tool > svg[data-v-c3bc8a46] {
1876
+ .ai-tool > svg[data-v-62293b70] {
1877
1877
  fill: transparent;
1878
1878
  }
1879
- .ai-tool[data-v-c3bc8a46]::before {
1879
+ .ai-tool[data-v-62293b70]::before {
1880
1880
  content: '';
1881
1881
  position: absolute;
1882
1882
  width: 20px;
@@ -1897,7 +1897,7 @@ img[data-v-c95b2073] {
1897
1897
  filter: brightness(1.2);
1898
1898
  transition: filter 0.2s ease;
1899
1899
  }
1900
- .ai-tool[data-v-c3bc8a46]:hover::before {
1900
+ .ai-tool[data-v-62293b70]:hover::before {
1901
1901
  filter: brightness(1.3);
1902
1902
  }
1903
1903
 
@@ -1734,11 +1734,11 @@ img[data-v-c95b2073] {
1734
1734
  pointer-events: auto;
1735
1735
  }
1736
1736
 
1737
- .superdoc[data-v-c3bc8a46] {
1737
+ .superdoc[data-v-62293b70] {
1738
1738
  display: flex;
1739
1739
  position: relative;
1740
1740
  }
1741
- .sd-visually-hidden[data-v-c3bc8a46] {
1741
+ .sd-visually-hidden[data-v-62293b70] {
1742
1742
  position: absolute;
1743
1743
  width: 1px;
1744
1744
  height: 1px;
@@ -1749,30 +1749,30 @@ img[data-v-c95b2073] {
1749
1749
  white-space: nowrap;
1750
1750
  border: 0;
1751
1751
  }
1752
- .right-sidebar[data-v-c3bc8a46] {
1752
+ .right-sidebar[data-v-62293b70] {
1753
1753
  min-width: 320px;
1754
1754
  height: 100%;
1755
1755
  }
1756
- .floating-comments[data-v-c3bc8a46] {
1756
+ .floating-comments[data-v-62293b70] {
1757
1757
  min-width: 300px;
1758
1758
  width: 300px;
1759
1759
  height: 100%;
1760
1760
  overflow: visible;
1761
1761
  }
1762
- .superdoc__layers[data-v-c3bc8a46] {
1762
+ .superdoc__layers[data-v-62293b70] {
1763
1763
  height: 100%;
1764
1764
  position: relative;
1765
1765
  box-sizing: border-box;
1766
1766
  }
1767
- .superdoc__document[data-v-c3bc8a46] {
1767
+ .superdoc__document[data-v-62293b70] {
1768
1768
  width: 100%;
1769
1769
  position: relative;
1770
1770
  }
1771
- .superdoc__sub-document[data-v-c3bc8a46] {
1771
+ .superdoc__sub-document[data-v-62293b70] {
1772
1772
  width: 100%;
1773
1773
  position: relative;
1774
1774
  }
1775
- .superdoc__selection-layer[data-v-c3bc8a46] {
1775
+ .superdoc__selection-layer[data-v-62293b70] {
1776
1776
  position: absolute;
1777
1777
  min-width: 100%;
1778
1778
  min-height: 100%;
@@ -1783,13 +1783,13 @@ img[data-v-c95b2073] {
1783
1783
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
1784
1784
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
1785
1785
  clickable, and below the selection layer (z-index 10). */
1786
- .superdoc__whiteboard-layer[data-v-c3bc8a46] {
1786
+ .superdoc__whiteboard-layer[data-v-62293b70] {
1787
1787
  z-index: 4;
1788
1788
  }
1789
- .superdoc__temp-selection[data-v-c3bc8a46] {
1789
+ .superdoc__temp-selection[data-v-62293b70] {
1790
1790
  position: absolute;
1791
1791
  }
1792
- .superdoc__right-sidebar[data-v-c3bc8a46] {
1792
+ .superdoc__right-sidebar[data-v-62293b70] {
1793
1793
  width: 320px;
1794
1794
  min-width: 320px;
1795
1795
  padding: 0 10px;
@@ -1797,7 +1797,7 @@ img[data-v-c95b2073] {
1797
1797
  position: relative;
1798
1798
  z-index: 2;
1799
1799
  }
1800
- .superdoc__compact-comment-popover[data-v-c3bc8a46] {
1800
+ .superdoc__compact-comment-popover[data-v-62293b70] {
1801
1801
  position: absolute;
1802
1802
  top: 12px;
1803
1803
  right: 12px;
@@ -1806,14 +1806,14 @@ img[data-v-c95b2073] {
1806
1806
  }
1807
1807
 
1808
1808
  /* Tools styles */
1809
- .tools[data-v-c3bc8a46] {
1809
+ .tools[data-v-62293b70] {
1810
1810
  position: absolute;
1811
1811
  z-index: 3;
1812
1812
  display: flex;
1813
1813
  flex-direction: column;
1814
1814
  gap: var(--sd-ui-tools-gap, 6px);
1815
1815
  }
1816
- .tools-item[data-v-c3bc8a46] {
1816
+ .tools-item[data-v-62293b70] {
1817
1817
  display: flex;
1818
1818
  align-items: center;
1819
1819
  justify-content: center;
@@ -1824,10 +1824,10 @@ img[data-v-c95b2073] {
1824
1824
  cursor: pointer;
1825
1825
  position: relative;
1826
1826
  }
1827
- .tools-item i[data-v-c3bc8a46] {
1827
+ .tools-item i[data-v-62293b70] {
1828
1828
  cursor: pointer;
1829
1829
  }
1830
- .superdoc__tools-icon[data-v-c3bc8a46] {
1830
+ .superdoc__tools-icon[data-v-62293b70] {
1831
1831
  width: var(--sd-ui-tools-icon-size, 20px);
1832
1832
  height: var(--sd-ui-tools-icon-size, 20px);
1833
1833
  flex-shrink: 0;
@@ -1842,22 +1842,22 @@ img[data-v-c95b2073] {
1842
1842
 
1843
1843
  /* 834px is iPad screen size in portrait orientation */
1844
1844
  @media (max-width: 834px) {
1845
- .superdoc .superdoc__layers[data-v-c3bc8a46] {
1845
+ .superdoc .superdoc__layers[data-v-62293b70] {
1846
1846
  margin: 0;
1847
1847
  border: 0 !important;
1848
1848
  box-shadow: none;
1849
1849
  }
1850
- .superdoc__sub-document[data-v-c3bc8a46] {
1850
+ .superdoc__sub-document[data-v-62293b70] {
1851
1851
  max-width: 100%;
1852
1852
  }
1853
- .superdoc__right-sidebar[data-v-c3bc8a46] {
1853
+ .superdoc__right-sidebar[data-v-62293b70] {
1854
1854
  padding: 10px;
1855
1855
  position: relative;
1856
1856
  }
1857
1857
  }
1858
1858
 
1859
1859
  /* AI Writer styles */
1860
- .ai-writer-container[data-v-c3bc8a46] {
1860
+ .ai-writer-container[data-v-62293b70] {
1861
1861
  position: fixed;
1862
1862
  z-index: 1000;
1863
1863
  background: white;
@@ -1873,10 +1873,10 @@ img[data-v-c95b2073] {
1873
1873
  transform: translateY(-50%);
1874
1874
  z-index: 50;
1875
1875
  } */
1876
- .ai-tool > svg[data-v-c3bc8a46] {
1876
+ .ai-tool > svg[data-v-62293b70] {
1877
1877
  fill: transparent;
1878
1878
  }
1879
- .ai-tool[data-v-c3bc8a46]::before {
1879
+ .ai-tool[data-v-62293b70]::before {
1880
1880
  content: '';
1881
1881
  position: absolute;
1882
1882
  width: 20px;
@@ -1897,7 +1897,7 @@ img[data-v-c95b2073] {
1897
1897
  filter: brightness(1.2);
1898
1898
  transition: filter 0.2s ease;
1899
1899
  }
1900
- .ai-tool[data-v-c3bc8a46]:hover::before {
1900
+ .ai-tool[data-v-62293b70]:hover::before {
1901
1901
  filter: brightness(1.3);
1902
1902
  }
1903
1903
 
@@ -843,6 +843,20 @@ export type LinkPopoverResolution = {
843
843
  * default popover.
844
844
  */
845
845
  export type LinkPopoverResolver = (ctx: LinkPopoverContext) => LinkPopoverResolution | null | undefined;
846
+ /**
847
+ * Canonical configuration for the built-in link popover.
848
+ *
849
+ * `popoverResolver` supersedes `modules.links.popoverResolver`, which stays
850
+ * supported for all of v2. Setting both keeps the canonical one; the legacy
851
+ * spelling only applies when the canonical one is absent.
852
+ */
853
+ export interface LinkPopoverConfig {
854
+ /**
855
+ * Called when a user clicks a link, to decide which popover to show.
856
+ * Returning `null` or `undefined` falls back to the built-in popover.
857
+ */
858
+ popoverResolver?: LinkPopoverResolver;
859
+ }
846
860
  /** Context object passed to context menu callbacks (showWhen, render, action, menuProvider). */
847
861
  export interface ContextMenuContext {
848
862
  /** The editor instance. */
@@ -2663,8 +2677,12 @@ export interface UIConfig {
2663
2677
  * custom UI either way.
2664
2678
  */
2665
2679
  search?: boolean | Record<string, unknown>;
2666
- /** Built-in popover shown when a link is selected. Disabled by default. */
2667
- linkPopover?: boolean | Record<string, unknown>;
2680
+ /**
2681
+ * Built-in popover shown when a link is clicked. It renders by default;
2682
+ * pass `false` (or `ui: false`) to suppress it. Supplying a
2683
+ * {@link LinkPopoverConfig.popoverResolver} replaces it with your own UI.
2684
+ */
2685
+ linkPopover?: boolean | LinkPopoverConfig;
2668
2686
  /** Built-in ruler. Disabled by default. */
2669
2687
  ruler?: boolean | {
2670
2688
  /** Element or selector to render the ruler into. */
@@ -49,6 +49,7 @@ import type { LayoutFragment as __Cjs_LayoutFragment } from './index.js' with {
49
49
  import type { LayoutMetrics as __Cjs_LayoutMetrics } from './index.js' with { "resolution-mode": "import" };
50
50
  import type { LayoutMode as __Cjs_LayoutMode } from './index.js' with { "resolution-mode": "import" };
51
51
  import type { LayoutPage as __Cjs_LayoutPage } from './index.js' with { "resolution-mode": "import" };
52
+ import type { LinkPopoverConfig as __Cjs_LinkPopoverConfig } from './index.js' with { "resolution-mode": "import" };
52
53
  import type { LinkPopoverContext as __Cjs_LinkPopoverContext } from './index.js' with { "resolution-mode": "import" };
53
54
  import type { LinkPopoverResolution as __Cjs_LinkPopoverResolution } from './index.js' with { "resolution-mode": "import" };
54
55
  import type { LinkPopoverResolver as __Cjs_LinkPopoverResolver } from './index.js' with { "resolution-mode": "import" };
@@ -234,6 +235,7 @@ export type { __Cjs_LayoutFragment as LayoutFragment };
234
235
  export type { __Cjs_LayoutMetrics as LayoutMetrics };
235
236
  export type { __Cjs_LayoutMode as LayoutMode };
236
237
  export type { __Cjs_LayoutPage as LayoutPage };
238
+ export type { __Cjs_LinkPopoverConfig as LinkPopoverConfig };
237
239
  export type { __Cjs_LinkPopoverContext as LinkPopoverContext };
238
240
  export type { __Cjs_LinkPopoverResolution as LinkPopoverResolution };
239
241
  export type { __Cjs_LinkPopoverResolver as LinkPopoverResolver };
@@ -72,6 +72,7 @@ export type { SuperDocLayoutEngineOptions as LayoutEngineOptions } from '../core
72
72
  export type { FlowBlock, FlowMode, Layout, Fragment as LayoutFragment, Page as LayoutPage } from '../../../layout-engine/contracts/src/index.js';
73
73
  export type { LayoutMetrics } from '../../../layout-engine/layout-bridge/src/index.js';
74
74
  export type { LayoutMode } from '../../../layout-engine/painters/dom/src/index.js';
75
+ export type { LinkPopoverConfig } from '../core/types/index.js';
75
76
  export type { LinkPopoverContext } from '../core/types/index.js';
76
77
  export type { LinkPopoverResolution } from '../core/types/index.js';
77
78
  export type { LinkPopoverResolver } from '../core/types/index.js';
package/dist/superdoc.cjs CHANGED
@@ -18245,7 +18245,7 @@ var _sfc_main$20 = {
18245
18245
  getSurfaceManager: getLinkPopoverSurfaceManager,
18246
18246
  getActiveEditor: () => proxy.$superdoc?.activeEditor,
18247
18247
  getUi: getSuperDocUI,
18248
- getResolver: () => proxy.$superdoc?.uiConfig?.linkPopover?.suppressed ? () => ({ type: "none" }) : proxy.$superdoc?.config?.modules?.links?.popoverResolver,
18248
+ getResolver: () => proxy.$superdoc?.uiConfig?.linkPopover?.suppressed ? () => ({ type: "none" }) : proxy.$superdoc?.uiConfig?.linkPopover?.options?.popoverResolver,
18249
18249
  getLayerElement: () => layers.value,
18250
18250
  emitException: (payload) => {
18251
18251
  proxy.$superdoc?.emit("exception", {
@@ -19610,7 +19610,7 @@ var _sfc_main$20 = {
19610
19610
  jsonOverride: proxy.$superdoc.config.jsonOverride,
19611
19611
  viewOptions: proxy.$superdoc.config.viewOptions,
19612
19612
  contained: proxy.$superdoc.config.contained,
19613
- linkPopoverResolver: proxy.$superdoc.uiConfig.linkPopover.enabled ? proxy.$superdoc.config.modules?.links?.popoverResolver : void 0,
19613
+ linkPopoverResolver: proxy.$superdoc.uiConfig.linkPopover.options.popoverResolver,
19614
19614
  layoutEngineOptions: useLayoutEngine ? {
19615
19615
  ...proxy.$superdoc.config.layoutEngineOptions || {},
19616
19616
  proofing: resolvedProofingConfig.value,
@@ -19618,7 +19618,7 @@ var _sfc_main$20 = {
19618
19618
  zoom: (activeZoom.value ?? 100) / 100,
19619
19619
  emitCommentPositionsInViewing: isViewingMode() && shouldRenderCommentsInViewing.value,
19620
19620
  enableCommentsInViewing: isViewingCommentsVisible.value,
19621
- contentControlsChrome: !proxy.$superdoc.uiConfig.contentControls.enabled ? "none" : proxy.$superdoc.uiConfig.contentControls.options.chrome ?? (proxy.$superdoc.config.modules?.contentControls?.chrome === "none" ? void 0 : proxy.$superdoc.config.modules?.contentControls?.chrome),
19621
+ contentControlsChrome: proxy.$superdoc.uiConfig.contentControls.options.chrome,
19622
19622
  resolveTrackedChangeColor: require_create_super_doc_ui.composeAuthorColorResolver(proxy.$superdoc.config.modules?.trackChanges?.authorColors)
19623
19623
  } : void 0,
19624
19624
  permissionResolver: (payload = {}) => proxy.$superdoc.canPerformPermission({
@@ -20560,7 +20560,7 @@ var _sfc_main$20 = {
20560
20560
  };
20561
20561
  }
20562
20562
  };
20563
- var SuperDoc_default = /* @__PURE__ */ require__plugin_vue_export_helper.__plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-c3bc8a46"]]);
20563
+ var SuperDoc_default = /* @__PURE__ */ require__plugin_vue_export_helper.__plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-62293b70"]]);
20564
20564
  var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
20565
20565
  var PINIA_DEVTOOLS_PLUGIN_ID = "dev.esm.pinia";
20566
20566
  var piniaDevtoolsSuppressionState = {
@@ -32995,6 +32995,10 @@ function normalizeUiConfig(config = {}) {
32995
32995
  };
32996
32996
  const options = (key) => allDisabled ? {} : resolveOptions(ui, key);
32997
32997
  const rulerSuppressed = allDisabled || explicit("ruler") === false;
32998
+ const linkPopoverSuppressed = allDisabled || explicit("linkPopover") === false;
32999
+ const linkPopoverResolver = linkPopoverSuppressed ? void 0 : firstDefined(options("linkPopover").popoverResolver, config.modules?.links?.popoverResolver);
33000
+ const contentControlsEnabled = explicit("contentControls") ?? (!allDisabled && config.modules?.contentControls?.chrome !== "none");
33001
+ const legacyContentControlsChrome = config.modules?.contentControls?.chrome === "none" ? void 0 : config.modules?.contentControls?.chrome;
32998
33002
  const toolbarOptions = options("toolbar");
32999
33003
  const legacyToolbar = config.modules?.toolbar;
33000
33004
  const legacyToolbarOptions = isPlainObject$2(legacyToolbar) ? legacyToolbar : {};
@@ -33035,9 +33039,9 @@ function normalizeUiConfig(config = {}) {
33035
33039
  options: allDisabled ? {} : mergeDefined(legacySearch, options("search"))
33036
33040
  },
33037
33041
  linkPopover: {
33038
- enabled: explicit("linkPopover") ?? (!allDisabled && Boolean(config.modules?.links?.popoverResolver)),
33039
- suppressed: allDisabled || explicit("linkPopover") === false,
33040
- options: options("linkPopover")
33042
+ enabled: typeof linkPopoverResolver === "function",
33043
+ suppressed: linkPopoverSuppressed,
33044
+ options: mergeDefined(options("linkPopover"), { popoverResolver: linkPopoverResolver })
33041
33045
  },
33042
33046
  ruler: {
33043
33047
  enabled: explicit("ruler") ?? (!allDisabled && Boolean(config.rulers)),
@@ -33045,8 +33049,8 @@ function normalizeUiConfig(config = {}) {
33045
33049
  container: rulerSuppressed ? null : options("ruler").container ?? config.rulerContainer ?? null
33046
33050
  },
33047
33051
  contentControls: {
33048
- enabled: explicit("contentControls") ?? (!allDisabled && config.modules?.contentControls?.chrome !== "none"),
33049
- options: options("contentControls")
33052
+ enabled: contentControlsEnabled,
33053
+ options: contentControlsEnabled ? mergeDefined({ chrome: legacyContentControlsChrome }, options("contentControls")) : { chrome: "none" }
33050
33054
  }
33051
33055
  };
33052
33056
  }
@@ -39353,7 +39357,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
39353
39357
  this.config.colors = shuffleArray(this.config.colors);
39354
39358
  this.userColorMap = /* @__PURE__ */ new Map();
39355
39359
  this.colorIndex = 0;
39356
- this.version = "2.4.0-next.5";
39360
+ this.version = "2.4.0-next.7";
39357
39361
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
39358
39362
  this.superdocId = config.superdocId || require_uuid.v4_default();
39359
39363
  this.colors = this.config.colors ?? [];
@@ -18202,7 +18202,7 @@ var SuperDoc_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
18202
18202
  getSurfaceManager: getLinkPopoverSurfaceManager,
18203
18203
  getActiveEditor: () => proxy.$superdoc?.activeEditor,
18204
18204
  getUi: getSuperDocUI,
18205
- getResolver: () => proxy.$superdoc?.uiConfig?.linkPopover?.suppressed ? () => ({ type: "none" }) : proxy.$superdoc?.config?.modules?.links?.popoverResolver,
18205
+ getResolver: () => proxy.$superdoc?.uiConfig?.linkPopover?.suppressed ? () => ({ type: "none" }) : proxy.$superdoc?.uiConfig?.linkPopover?.options?.popoverResolver,
18206
18206
  getLayerElement: () => layers.value,
18207
18207
  emitException: (payload) => {
18208
18208
  proxy.$superdoc?.emit("exception", {
@@ -19567,7 +19567,7 @@ var SuperDoc_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
19567
19567
  jsonOverride: proxy.$superdoc.config.jsonOverride,
19568
19568
  viewOptions: proxy.$superdoc.config.viewOptions,
19569
19569
  contained: proxy.$superdoc.config.contained,
19570
- linkPopoverResolver: proxy.$superdoc.uiConfig.linkPopover.enabled ? proxy.$superdoc.config.modules?.links?.popoverResolver : void 0,
19570
+ linkPopoverResolver: proxy.$superdoc.uiConfig.linkPopover.options.popoverResolver,
19571
19571
  layoutEngineOptions: useLayoutEngine ? {
19572
19572
  ...proxy.$superdoc.config.layoutEngineOptions || {},
19573
19573
  proofing: resolvedProofingConfig.value,
@@ -19575,7 +19575,7 @@ var SuperDoc_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
19575
19575
  zoom: (activeZoom.value ?? 100) / 100,
19576
19576
  emitCommentPositionsInViewing: isViewingMode() && shouldRenderCommentsInViewing.value,
19577
19577
  enableCommentsInViewing: isViewingCommentsVisible.value,
19578
- contentControlsChrome: !proxy.$superdoc.uiConfig.contentControls.enabled ? "none" : proxy.$superdoc.uiConfig.contentControls.options.chrome ?? (proxy.$superdoc.config.modules?.contentControls?.chrome === "none" ? void 0 : proxy.$superdoc.config.modules?.contentControls?.chrome),
19578
+ contentControlsChrome: proxy.$superdoc.uiConfig.contentControls.options.chrome,
19579
19579
  resolveTrackedChangeColor: composeAuthorColorResolver(proxy.$superdoc.config.modules?.trackChanges?.authorColors)
19580
19580
  } : void 0,
19581
19581
  permissionResolver: (payload = {}) => proxy.$superdoc.canPerformPermission({
@@ -20516,7 +20516,7 @@ var SuperDoc_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
20516
20516
  ], 38);
20517
20517
  };
20518
20518
  }
20519
- }, [["__scopeId", "data-v-c3bc8a46"]]);
20519
+ }, [["__scopeId", "data-v-62293b70"]]);
20520
20520
  var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
20521
20521
  var PINIA_DEVTOOLS_PLUGIN_ID = "dev.esm.pinia";
20522
20522
  var piniaDevtoolsSuppressionState = {
@@ -32950,6 +32950,10 @@ function normalizeUiConfig(config = {}) {
32950
32950
  };
32951
32951
  const options = (key) => allDisabled ? {} : resolveOptions(ui, key);
32952
32952
  const rulerSuppressed = allDisabled || explicit("ruler") === false;
32953
+ const linkPopoverSuppressed = allDisabled || explicit("linkPopover") === false;
32954
+ const linkPopoverResolver = linkPopoverSuppressed ? void 0 : firstDefined(options("linkPopover").popoverResolver, config.modules?.links?.popoverResolver);
32955
+ const contentControlsEnabled = explicit("contentControls") ?? (!allDisabled && config.modules?.contentControls?.chrome !== "none");
32956
+ const legacyContentControlsChrome = config.modules?.contentControls?.chrome === "none" ? void 0 : config.modules?.contentControls?.chrome;
32953
32957
  const toolbarOptions = options("toolbar");
32954
32958
  const legacyToolbar = config.modules?.toolbar;
32955
32959
  const legacyToolbarOptions = isPlainObject$2(legacyToolbar) ? legacyToolbar : {};
@@ -32990,9 +32994,9 @@ function normalizeUiConfig(config = {}) {
32990
32994
  options: allDisabled ? {} : mergeDefined(legacySearch, options("search"))
32991
32995
  },
32992
32996
  linkPopover: {
32993
- enabled: explicit("linkPopover") ?? (!allDisabled && Boolean(config.modules?.links?.popoverResolver)),
32994
- suppressed: allDisabled || explicit("linkPopover") === false,
32995
- options: options("linkPopover")
32997
+ enabled: typeof linkPopoverResolver === "function",
32998
+ suppressed: linkPopoverSuppressed,
32999
+ options: mergeDefined(options("linkPopover"), { popoverResolver: linkPopoverResolver })
32996
33000
  },
32997
33001
  ruler: {
32998
33002
  enabled: explicit("ruler") ?? (!allDisabled && Boolean(config.rulers)),
@@ -33000,8 +33004,8 @@ function normalizeUiConfig(config = {}) {
33000
33004
  container: rulerSuppressed ? null : options("ruler").container ?? config.rulerContainer ?? null
33001
33005
  },
33002
33006
  contentControls: {
33003
- enabled: explicit("contentControls") ?? (!allDisabled && config.modules?.contentControls?.chrome !== "none"),
33004
- options: options("contentControls")
33007
+ enabled: contentControlsEnabled,
33008
+ options: contentControlsEnabled ? mergeDefined({ chrome: legacyContentControlsChrome }, options("contentControls")) : { chrome: "none" }
33005
33009
  }
33006
33010
  };
33007
33011
  }
@@ -39286,7 +39290,7 @@ var SuperDoc = class extends import_eventemitter3.default {
39286
39290
  this.config.colors = shuffleArray(this.config.colors);
39287
39291
  this.userColorMap = /* @__PURE__ */ new Map();
39288
39292
  this.colorIndex = 0;
39289
- this.version = "2.4.0-next.5";
39293
+ this.version = "2.4.0-next.7";
39290
39294
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
39291
39295
  this.superdocId = config.superdocId || v4_default();
39292
39296
  this.colors = this.config.colors ?? [];