superdoc 2.4.0-next.6 → 2.4.0-next.8

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.
@@ -1734,11 +1734,11 @@ img[data-v-c95b2073] {
1734
1734
  pointer-events: auto;
1735
1735
  }
1736
1736
 
1737
- .superdoc[data-v-acf35f4b] {
1737
+ .superdoc[data-v-62293b70] {
1738
1738
  display: flex;
1739
1739
  position: relative;
1740
1740
  }
1741
- .sd-visually-hidden[data-v-acf35f4b] {
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-acf35f4b] {
1752
+ .right-sidebar[data-v-62293b70] {
1753
1753
  min-width: 320px;
1754
1754
  height: 100%;
1755
1755
  }
1756
- .floating-comments[data-v-acf35f4b] {
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-acf35f4b] {
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-acf35f4b] {
1767
+ .superdoc__document[data-v-62293b70] {
1768
1768
  width: 100%;
1769
1769
  position: relative;
1770
1770
  }
1771
- .superdoc__sub-document[data-v-acf35f4b] {
1771
+ .superdoc__sub-document[data-v-62293b70] {
1772
1772
  width: 100%;
1773
1773
  position: relative;
1774
1774
  }
1775
- .superdoc__selection-layer[data-v-acf35f4b] {
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-acf35f4b] {
1786
+ .superdoc__whiteboard-layer[data-v-62293b70] {
1787
1787
  z-index: 4;
1788
1788
  }
1789
- .superdoc__temp-selection[data-v-acf35f4b] {
1789
+ .superdoc__temp-selection[data-v-62293b70] {
1790
1790
  position: absolute;
1791
1791
  }
1792
- .superdoc__right-sidebar[data-v-acf35f4b] {
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-acf35f4b] {
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-acf35f4b] {
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-acf35f4b] {
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-acf35f4b] {
1827
+ .tools-item i[data-v-62293b70] {
1828
1828
  cursor: pointer;
1829
1829
  }
1830
- .superdoc__tools-icon[data-v-acf35f4b] {
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-acf35f4b] {
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-acf35f4b] {
1850
+ .superdoc__sub-document[data-v-62293b70] {
1851
1851
  max-width: 100%;
1852
1852
  }
1853
- .superdoc__right-sidebar[data-v-acf35f4b] {
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-acf35f4b] {
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-acf35f4b] {
1876
+ .ai-tool > svg[data-v-62293b70] {
1877
1877
  fill: transparent;
1878
1878
  }
1879
- .ai-tool[data-v-acf35f4b]::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-acf35f4b]:hover::before {
1900
+ .ai-tool[data-v-62293b70]:hover::before {
1901
1901
  filter: brightness(1.3);
1902
1902
  }
1903
1903
 
@@ -2921,7 +2921,7 @@ img[data-v-c95b2073] {
2921
2921
  background: var(--sd-ui-password-prompt-submit-hover-bg, var(--sd-ui-action-hover));
2922
2922
  }
2923
2923
 
2924
- .sd-find-replace[data-v-fed15bd3] {
2924
+ .sd-find-replace[data-v-41f37c29] {
2925
2925
  display: flex;
2926
2926
  flex-direction: column;
2927
2927
  gap: var(--sd-ui-find-replace-gap, 6px);
@@ -2929,7 +2929,7 @@ img[data-v-c95b2073] {
2929
2929
  so it needs room to breathe before the query starts truncating. */
2930
2930
  min-width: var(--sd-ui-find-replace-min-width, 380px);
2931
2931
  }
2932
- .sd-find-replace__row[data-v-fed15bd3] {
2932
+ .sd-find-replace__row[data-v-41f37c29] {
2933
2933
  display: flex;
2934
2934
  align-items: center;
2935
2935
  gap: var(--sd-ui-find-replace-gap, 6px);
@@ -2937,13 +2937,13 @@ img[data-v-c95b2073] {
2937
2937
 
2938
2938
  /* Mirrors the expander's footprint so the replace field and the error line
2939
2939
  align with the find field. */
2940
- .sd-find-replace__row-indent[data-v-fed15bd3] {
2940
+ .sd-find-replace__row-indent[data-v-41f37c29] {
2941
2941
  flex: 0 0 var(--sd-ui-find-replace-expander-size, 24px);
2942
2942
  }
2943
2943
 
2944
2944
  /* The field carries the border; the input inside is naked so the count and
2945
2945
  the query toggles sit visually inside the control. */
2946
- .sd-find-replace__field[data-v-fed15bd3] {
2946
+ .sd-find-replace__field[data-v-41f37c29] {
2947
2947
  flex: 1;
2948
2948
  min-width: 0;
2949
2949
  display: flex;
@@ -2958,24 +2958,24 @@ img[data-v-c95b2073] {
2958
2958
  border-color 0.12s ease-out,
2959
2959
  box-shadow 0.12s ease-out;
2960
2960
  }
2961
- .sd-find-replace__field[data-v-fed15bd3]:focus-within {
2961
+ .sd-find-replace__field[data-v-41f37c29]:focus-within {
2962
2962
  border-color: var(--sd-ui-find-replace-input-focus-border, var(--sd-ui-action));
2963
2963
  box-shadow: 0 0 0 3px
2964
2964
  var(--sd-ui-find-replace-input-focus-ring, color-mix(in srgb, var(--sd-ui-action) 15%, transparent));
2965
2965
  }
2966
- .sd-find-replace__field--error[data-v-fed15bd3],
2967
- .sd-find-replace__field--error[data-v-fed15bd3]:focus-within {
2966
+ .sd-find-replace__field--error[data-v-41f37c29],
2967
+ .sd-find-replace__field--error[data-v-41f37c29]:focus-within {
2968
2968
  border-color: var(--sd-ui-find-replace-error-color, #b3261e);
2969
2969
  }
2970
- .sd-find-replace__field--error[data-v-fed15bd3]:focus-within {
2970
+ .sd-find-replace__field--error[data-v-41f37c29]:focus-within {
2971
2971
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sd-ui-find-replace-error-color, #b3261e) 12%, transparent);
2972
2972
  }
2973
- .sd-find-replace__search-icon[data-v-fed15bd3] {
2973
+ .sd-find-replace__search-icon[data-v-41f37c29] {
2974
2974
  color: var(--sd-ui-find-replace-search-icon-color, #9ca3af);
2975
2975
  flex-shrink: 0;
2976
2976
  margin-right: 6px;
2977
2977
  }
2978
- .sd-find-replace__input[data-v-fed15bd3] {
2978
+ .sd-find-replace__input[data-v-41f37c29] {
2979
2979
  flex: 1;
2980
2980
  min-width: 0;
2981
2981
  height: 100%;
@@ -2987,7 +2987,7 @@ img[data-v-c95b2073] {
2987
2987
  border: none;
2988
2988
  outline: none;
2989
2989
  }
2990
- .sd-find-replace__count[data-v-fed15bd3] {
2990
+ .sd-find-replace__count[data-v-41f37c29] {
2991
2991
  font-size: var(--sd-ui-find-replace-count-font-size, 12px);
2992
2992
  color: var(--sd-ui-find-replace-count-color, #6b7280);
2993
2993
  pointer-events: none;
@@ -2997,23 +2997,23 @@ img[data-v-c95b2073] {
2997
2997
  padding: 0 5px 0 4px;
2998
2998
  flex-shrink: 0;
2999
2999
  }
3000
- .sd-find-replace__divider[data-v-fed15bd3] {
3000
+ .sd-find-replace__divider[data-v-41f37c29] {
3001
3001
  width: 1px;
3002
3002
  height: 16px;
3003
3003
  margin: 0 4px;
3004
3004
  background: var(--sd-ui-find-replace-input-border, var(--sd-ui-border));
3005
3005
  flex-shrink: 0;
3006
3006
  }
3007
- .sd-find-replace__nav[data-v-fed15bd3] {
3007
+ .sd-find-replace__nav[data-v-41f37c29] {
3008
3008
  display: flex;
3009
3009
  align-items: center;
3010
3010
  gap: var(--sd-ui-find-replace-nav-gap, 2px);
3011
3011
  flex-shrink: 0;
3012
3012
  }
3013
- .sd-find-replace__nav--actions[data-v-fed15bd3] {
3013
+ .sd-find-replace__nav--actions[data-v-41f37c29] {
3014
3014
  gap: var(--sd-ui-find-replace-gap, 6px);
3015
3015
  }
3016
- .sd-find-replace__btn[data-v-fed15bd3] {
3016
+ .sd-find-replace__btn[data-v-41f37c29] {
3017
3017
  display: inline-flex;
3018
3018
  align-items: center;
3019
3019
  justify-content: center;
@@ -3028,47 +3028,47 @@ img[data-v-c95b2073] {
3028
3028
  border-color 0.12s ease-out,
3029
3029
  transform 90ms ease-out;
3030
3030
  }
3031
- .sd-find-replace__btn[data-v-fed15bd3]:active:not(:disabled) {
3031
+ .sd-find-replace__btn[data-v-41f37c29]:active:not(:disabled) {
3032
3032
  transform: scale(0.96);
3033
3033
  }
3034
- .sd-find-replace__btn[data-v-fed15bd3]:focus-visible {
3034
+ .sd-find-replace__btn[data-v-41f37c29]:focus-visible {
3035
3035
  outline: 2px solid var(--sd-ui-action);
3036
3036
  outline-offset: 1px;
3037
3037
  }
3038
- .sd-find-replace__btn[data-v-fed15bd3]:disabled {
3038
+ .sd-find-replace__btn[data-v-41f37c29]:disabled {
3039
3039
  opacity: var(--sd-ui-find-replace-btn-disabled-opacity, 0.4);
3040
3040
  cursor: not-allowed;
3041
3041
  }
3042
- .sd-find-replace__btn--icon[data-v-fed15bd3] {
3042
+ .sd-find-replace__btn--icon[data-v-41f37c29] {
3043
3043
  width: var(--sd-ui-find-replace-btn-size, 28px);
3044
3044
  height: var(--sd-ui-find-replace-btn-size, 28px);
3045
3045
  border-radius: var(--sd-ui-find-replace-btn-radius, 6px);
3046
3046
  color: var(--sd-ui-find-replace-btn-color, #4b5563);
3047
3047
  }
3048
- .sd-find-replace__btn--icon[data-v-fed15bd3]:hover:not(:disabled) {
3048
+ .sd-find-replace__btn--icon[data-v-41f37c29]:hover:not(:disabled) {
3049
3049
  background: var(--sd-ui-find-replace-btn-hover-bg, color-mix(in srgb, currentColor 8%, transparent));
3050
3050
  }
3051
- .sd-find-replace__btn--expander[data-v-fed15bd3] {
3051
+ .sd-find-replace__btn--expander[data-v-41f37c29] {
3052
3052
  width: var(--sd-ui-find-replace-expander-size, 24px);
3053
3053
  height: var(--sd-ui-find-replace-expander-size, 24px);
3054
3054
  border-radius: var(--sd-ui-find-replace-btn-radius, 6px);
3055
3055
  color: var(--sd-ui-find-replace-count-color, #6b7280);
3056
3056
  flex-shrink: 0;
3057
3057
  }
3058
- .sd-find-replace__btn--expander[data-v-fed15bd3]:hover:not(:disabled) {
3058
+ .sd-find-replace__btn--expander[data-v-41f37c29]:hover:not(:disabled) {
3059
3059
  background: var(--sd-ui-find-replace-btn-hover-bg, color-mix(in srgb, currentColor 8%, transparent));
3060
3060
  color: var(--sd-ui-find-replace-btn-color, var(--sd-ui-text));
3061
3061
  }
3062
- .sd-find-replace__btn--expander svg[data-v-fed15bd3] {
3062
+ .sd-find-replace__btn--expander svg[data-v-41f37c29] {
3063
3063
  transition: transform 0.16s ease-out;
3064
3064
  }
3065
- .sd-find-replace__btn--expander-open svg[data-v-fed15bd3] {
3065
+ .sd-find-replace__btn--expander-open svg[data-v-41f37c29] {
3066
3066
  transform: rotate(90deg);
3067
3067
  }
3068
3068
 
3069
3069
  /* Query-scoped toggles inside the field (match case / diacritics / regex).
3070
3070
  Kept compact so they never crowd the query text. */
3071
- .sd-find-replace__btn--toggle[data-v-fed15bd3] {
3071
+ .sd-find-replace__btn--toggle[data-v-41f37c29] {
3072
3072
  height: 20px;
3073
3073
  min-width: 20px;
3074
3074
  padding: var(--sd-ui-find-replace-btn-toggle-padding, 0 3px);
@@ -3079,15 +3079,15 @@ img[data-v-c95b2073] {
3079
3079
  color: var(--sd-ui-find-replace-count-color, #6b7280);
3080
3080
  flex-shrink: 0;
3081
3081
  }
3082
- .sd-find-replace__btn--toggle + .sd-find-replace__btn--toggle[data-v-fed15bd3] {
3082
+ .sd-find-replace__btn--toggle + .sd-find-replace__btn--toggle[data-v-41f37c29] {
3083
3083
  margin-left: 1px;
3084
3084
  }
3085
- .sd-find-replace__btn--toggle[data-v-fed15bd3]:hover:not(:disabled) {
3085
+ .sd-find-replace__btn--toggle[data-v-41f37c29]:hover:not(:disabled) {
3086
3086
  background: var(--sd-ui-find-replace-btn-hover-bg, color-mix(in srgb, currentColor 8%, transparent));
3087
3087
  color: var(--sd-ui-find-replace-btn-color, var(--sd-ui-text));
3088
3088
  }
3089
- .sd-find-replace__btn--active[data-v-fed15bd3],
3090
- .sd-find-replace__btn--active[data-v-fed15bd3]:hover:not(:disabled) {
3089
+ .sd-find-replace__btn--active[data-v-41f37c29],
3090
+ .sd-find-replace__btn--active[data-v-41f37c29]:hover:not(:disabled) {
3091
3091
  background: var(--sd-ui-find-replace-toggle-active-bg, color-mix(in srgb, var(--sd-ui-action) 12%, transparent));
3092
3092
  border-color: var(
3093
3093
  --sd-ui-find-replace-toggle-active-border,
@@ -3095,7 +3095,7 @@ img[data-v-c95b2073] {
3095
3095
  );
3096
3096
  color: var(--sd-ui-find-replace-toggle-active-color, var(--sd-ui-action));
3097
3097
  }
3098
- .sd-find-replace__btn--action[data-v-fed15bd3] {
3098
+ .sd-find-replace__btn--action[data-v-41f37c29] {
3099
3099
  height: var(--sd-ui-find-replace-btn-size, 28px);
3100
3100
  padding: var(--sd-ui-find-replace-action-btn-padding, 0 12px);
3101
3101
  font-size: var(--sd-ui-find-replace-count-font-size, 13px);
@@ -3104,13 +3104,13 @@ img[data-v-c95b2073] {
3104
3104
  background: var(--sd-ui-find-replace-action-btn-bg, var(--sd-ui-action));
3105
3105
  color: var(--sd-ui-find-replace-action-btn-color, #fff);
3106
3106
  }
3107
- .sd-find-replace__btn--action[data-v-fed15bd3]:hover:not(:disabled) {
3107
+ .sd-find-replace__btn--action[data-v-41f37c29]:hover:not(:disabled) {
3108
3108
  background: var(
3109
3109
  --sd-ui-find-replace-action-btn-hover-bg,
3110
3110
  color-mix(in srgb, var(--sd-ui-find-replace-action-btn-bg, var(--sd-ui-action)) 88%, #000)
3111
3111
  );
3112
3112
  }
3113
- .sd-find-replace__error[data-v-fed15bd3] {
3113
+ .sd-find-replace__error[data-v-41f37c29] {
3114
3114
  display: flex;
3115
3115
  align-items: center;
3116
3116
  gap: var(--sd-ui-find-replace-gap, 6px);
@@ -3118,12 +3118,12 @@ img[data-v-c95b2073] {
3118
3118
  font-size: var(--sd-ui-find-replace-error-font-size, 12px);
3119
3119
  letter-spacing: 0.01em;
3120
3120
  padding: var(--sd-ui-find-replace-error-padding, 0 2px);
3121
- animation: sd-find-replace-error-in-fed15bd3 0.16s ease-out;
3121
+ animation: sd-find-replace-error-in-41f37c29 0.16s ease-out;
3122
3122
  }
3123
- .sd-find-replace__error-text[data-v-fed15bd3] {
3123
+ .sd-find-replace__error-text[data-v-41f37c29] {
3124
3124
  padding-left: 4px;
3125
3125
  }
3126
- @keyframes sd-find-replace-error-in-fed15bd3 {
3126
+ @keyframes sd-find-replace-error-in-41f37c29 {
3127
3127
  from {
3128
3128
  opacity: 0;
3129
3129
  transform: translateY(-2px);
@@ -3134,15 +3134,15 @@ to {
3134
3134
  }
3135
3135
  }
3136
3136
  @media (prefers-reduced-motion: reduce) {
3137
- .sd-find-replace__field[data-v-fed15bd3],
3138
- .sd-find-replace__btn[data-v-fed15bd3],
3139
- .sd-find-replace__btn--expander svg[data-v-fed15bd3] {
3137
+ .sd-find-replace__field[data-v-41f37c29],
3138
+ .sd-find-replace__btn[data-v-41f37c29],
3139
+ .sd-find-replace__btn--expander svg[data-v-41f37c29] {
3140
3140
  transition: none;
3141
3141
  }
3142
- .sd-find-replace__btn[data-v-fed15bd3]:active:not(:disabled) {
3142
+ .sd-find-replace__btn[data-v-41f37c29]:active:not(:disabled) {
3143
3143
  transform: none;
3144
3144
  }
3145
- .sd-find-replace__error[data-v-fed15bd3] {
3145
+ .sd-find-replace__error[data-v-41f37c29] {
3146
3146
  animation: none;
3147
3147
  }
3148
3148
  }
@@ -843,6 +843,111 @@ export type LinkPopoverResolution = {
843
843
  * default popover.
844
844
  */
845
845
  export type LinkPopoverResolver = (ctx: LinkPopoverContext) => LinkPopoverResolution | null | undefined;
846
+ /**
847
+ * Canonical presentation settings for the built-in comments UI.
848
+ *
849
+ * Presentation only, and deliberately not the whole of `modules.comments`.
850
+ * That block also carries `readOnly` and `allowResolve`, which resolve through
851
+ * `interaction.comments`, and `permissionResolver`, which is read off
852
+ * `modules.comments` or the top-level `Config`. All three are stripped from
853
+ * this bag: policy outlives the built-in UI, so an application drawing its own
854
+ * comment surface still has to honor it. See the fields themselves, which are
855
+ * rejected by name with the spelling that applies to each.
856
+ *
857
+ * Open on purpose, for the same reason `modules.comments` is: the runtime
858
+ * merges this bag over that block and spreads the result through the comments
859
+ * store, which accepts pass-through keys. Closing it would reject working
860
+ * configurations, which is a worse failure than the missing autocomplete it
861
+ * would buy. The named fields are the ones the shell reads.
862
+ */
863
+ export type CommentsConfig = {
864
+ /** How comments present themselves as the surface narrows. */
865
+ displayMode?: 'auto' | 'sidebar' | 'inline';
866
+ /** CSS selector for an explicit width measurement target in `auto` mode. */
867
+ compactMeasurementSelector?: string;
868
+ /** Fixed compact-mode breakpoint override, in pixels. */
869
+ compactBreakpointPx?: number;
870
+ /** Comment highlight colors (internal/external and active overrides). */
871
+ highlightColors?: {
872
+ /** Base highlight color for internal comments. */
873
+ internal?: string;
874
+ /** Base highlight color for external comments. */
875
+ external?: string;
876
+ /** Active highlight color override for internal comments. */
877
+ activeInternal?: string;
878
+ /** Active highlight color override for external comments. */
879
+ activeExternal?: string;
880
+ };
881
+ /** Comment highlight opacity, active and inactive. */
882
+ highlightOpacity?: {
883
+ /** Opacity for the active comment highlight. */
884
+ active?: number;
885
+ /** Opacity for inactive comment highlights. */
886
+ inactive?: number;
887
+ };
888
+ /** Highlight color used while hovering a comment. */
889
+ highlightHoverColor?: string;
890
+ /** Tracked-change highlight colors. */
891
+ trackChangeHighlightColors?: TrackChangeHighlightColors;
892
+ /** Active tracked-change highlight colors (defaults to the above). */
893
+ trackChangeActiveHighlightColors?: TrackChangeHighlightColors;
894
+ /**
895
+ * Policy, not presentation. `normalizeUiConfig` strips all three from this
896
+ * bag before anything reads it, so accepting them here would advertise a
897
+ * setting that is silently discarded.
898
+ *
899
+ * `readOnly` and `allowResolve` belong on `interaction.comments`, where they
900
+ * resolve and keep applying to an application drawing its own comment
901
+ * surface.
902
+ *
903
+ * `permissionResolver` is collaboration wiring rather than policy, and has
904
+ * no `ui` spelling at all. `pickResolver` takes the first of
905
+ * `modules.comments.permissionResolver` and the top-level
906
+ * `Config.permissionResolver`, in that order, so either works and the
907
+ * comments-scoped one wins.
908
+ */
909
+ readOnly?: never;
910
+ allowResolve?: never;
911
+ permissionResolver?: never;
912
+ } & Record<string, unknown>;
913
+ /** Border and background colors for one tracked-change highlight state. */
914
+ export interface TrackChangeHighlightColors {
915
+ /** Border color for inserted text. */
916
+ insertBorder?: string;
917
+ /** Background color for inserted text. */
918
+ insertBackground?: string;
919
+ /** Border color for deleted text. */
920
+ deleteBorder?: string;
921
+ /** Background color for deleted text. */
922
+ deleteBackground?: string;
923
+ /** Border color for a format change. */
924
+ formatBorder?: string;
925
+ }
926
+ /**
927
+ * Canonical configuration for the chrome drawn around content controls.
928
+ *
929
+ * `chrome` is the whole option bag this surface has. `'default'` and `'none'`
930
+ * are the only values the painter and the v2 host accept; anything else is
931
+ * coerced back to `'default'`.
932
+ */
933
+ export interface ContentControlsConfig {
934
+ /** Whether SuperDoc draws its own chrome around each content control. */
935
+ chrome?: 'default' | 'none';
936
+ }
937
+ /**
938
+ * Canonical configuration for the built-in link popover.
939
+ *
940
+ * `popoverResolver` supersedes `modules.links.popoverResolver`, which stays
941
+ * supported for all of v2. Setting both keeps the canonical one; the legacy
942
+ * spelling only applies when the canonical one is absent.
943
+ */
944
+ export interface LinkPopoverConfig {
945
+ /**
946
+ * Called when a user clicks a link, to decide which popover to show.
947
+ * Returning `null` or `undefined` falls back to the built-in popover.
948
+ */
949
+ popoverResolver?: LinkPopoverResolver;
950
+ }
846
951
  /** Context object passed to context menu callbacks (showWhen, render, action, menuProvider). */
847
952
  export interface ContextMenuContext {
848
953
  /** The editor instance. */
@@ -1650,6 +1755,17 @@ export interface FindReplaceConfig {
1650
1755
  width?: number | string;
1651
1756
  maxWidth?: number | string;
1652
1757
  maxHeight?: number | string;
1758
+ /**
1759
+ * Focus the find input when the surface opens. Defaults to `true`; set
1760
+ * `false` to leave focus wherever the user had it.
1761
+ *
1762
+ * Honored but undeclared until #1094: `useFindReplace` spreads this whole
1763
+ * bag into the surface request, and `SurfaceManager` applies it last, over
1764
+ * the `modules.surfaces.floating` defaults.
1765
+ */
1766
+ autoFocus?: boolean;
1767
+ /** Close the surface on a pointer press outside it. Defaults to `false`. */
1768
+ closeOnOutsidePointerDown?: boolean;
1653
1769
  };
1654
1770
  }
1655
1771
  /**
@@ -2654,7 +2770,7 @@ export interface UIConfig {
2654
2770
  showTableOfContentsButton?: boolean;
2655
2771
  };
2656
2772
  /** Built-in comments UI. Enabled by default. */
2657
- comments?: boolean | Record<string, unknown>;
2773
+ comments?: boolean | CommentsConfig;
2658
2774
  /** Built-in right-click and slash context menu. Enabled by default. */
2659
2775
  contextMenu?: boolean | ContextMenuConfig;
2660
2776
  /**
@@ -2662,16 +2778,20 @@ export interface UIConfig {
2662
2778
  * SuperDoc intercept Cmd+F / Ctrl+F; `editor.ui.search` stays available to
2663
2779
  * custom UI either way.
2664
2780
  */
2665
- search?: boolean | Record<string, unknown>;
2666
- /** Built-in popover shown when a link is selected. Disabled by default. */
2667
- linkPopover?: boolean | Record<string, unknown>;
2781
+ search?: boolean | FindReplaceConfig;
2782
+ /**
2783
+ * Built-in popover shown when a link is clicked. It renders by default;
2784
+ * pass `false` (or `ui: false`) to suppress it. Supplying a
2785
+ * {@link LinkPopoverConfig.popoverResolver} replaces it with your own UI.
2786
+ */
2787
+ linkPopover?: boolean | LinkPopoverConfig;
2668
2788
  /** Built-in ruler. Disabled by default. */
2669
2789
  ruler?: boolean | {
2670
2790
  /** Element or selector to render the ruler into. */
2671
2791
  container?: string | HTMLElement;
2672
2792
  };
2673
2793
  /** Built-in chrome drawn around content controls. Enabled by default. */
2674
- contentControls?: boolean | Record<string, unknown>;
2794
+ contentControls?: boolean | ContentControlsConfig;
2675
2795
  }
2676
2796
  /**
2677
2797
  * What the user is permitted to do, as distinct from what SuperDoc draws.
@@ -9,10 +9,12 @@ import type { BorrowedSuperDocUI as __Cjs_BorrowedSuperDocUI } from './index.js'
9
9
  import type { CanPerformPermissionParams as __Cjs_CanPerformPermissionParams } from './index.js' with { "resolution-mode": "import" };
10
10
  import type { CollaborationConfig as __Cjs_CollaborationConfig } from './index.js' with { "resolution-mode": "import" };
11
11
  import type { CommentAddress as __Cjs_CommentAddress } from './index.js' with { "resolution-mode": "import" };
12
+ import type { CommentsConfig as __Cjs_CommentsConfig } from './index.js' with { "resolution-mode": "import" };
12
13
  import type { CommentsType as __Cjs_CommentsType } from './index.js' with { "resolution-mode": "import" };
13
14
  import type { Config as __Cjs_Config } from './index.js' with { "resolution-mode": "import" };
14
15
  import type { ContentControlActiveChangePayload as __Cjs_ContentControlActiveChangePayload } from './index.js' with { "resolution-mode": "import" };
15
16
  import type { ContentControlClickPayload as __Cjs_ContentControlClickPayload } from './index.js' with { "resolution-mode": "import" };
17
+ import type { ContentControlsConfig as __Cjs_ContentControlsConfig } from './index.js' with { "resolution-mode": "import" };
16
18
  import type { ContextMenuConfig as __Cjs_ContextMenuConfig } from './index.js' with { "resolution-mode": "import" };
17
19
  import type { ContextMenuContext as __Cjs_ContextMenuContext } from './index.js' with { "resolution-mode": "import" };
18
20
  import type { ContextMenuItem as __Cjs_ContextMenuItem } from './index.js' with { "resolution-mode": "import" };
@@ -49,6 +51,7 @@ import type { LayoutFragment as __Cjs_LayoutFragment } from './index.js' with {
49
51
  import type { LayoutMetrics as __Cjs_LayoutMetrics } from './index.js' with { "resolution-mode": "import" };
50
52
  import type { LayoutMode as __Cjs_LayoutMode } from './index.js' with { "resolution-mode": "import" };
51
53
  import type { LayoutPage as __Cjs_LayoutPage } from './index.js' with { "resolution-mode": "import" };
54
+ import type { LinkPopoverConfig as __Cjs_LinkPopoverConfig } from './index.js' with { "resolution-mode": "import" };
52
55
  import type { LinkPopoverContext as __Cjs_LinkPopoverContext } from './index.js' with { "resolution-mode": "import" };
53
56
  import type { LinkPopoverResolution as __Cjs_LinkPopoverResolution } from './index.js' with { "resolution-mode": "import" };
54
57
  import type { LinkPopoverResolver as __Cjs_LinkPopoverResolver } from './index.js' with { "resolution-mode": "import" };
@@ -164,6 +167,7 @@ import type { TextAddress as __Cjs_TextAddress } from './index.js' with { "resol
164
167
  import type { TextSegment as __Cjs_TextSegment } from './index.js' with { "resolution-mode": "import" };
165
168
  import type { TextTarget as __Cjs_TextTarget } from './index.js' with { "resolution-mode": "import" };
166
169
  import type { TrackChangeAuthor as __Cjs_TrackChangeAuthor } from './index.js' with { "resolution-mode": "import" };
170
+ import type { TrackChangeHighlightColors as __Cjs_TrackChangeHighlightColors } from './index.js' with { "resolution-mode": "import" };
167
171
  import type { TrackChangesAuthorColorsConfig as __Cjs_TrackChangesAuthorColorsConfig } from './index.js' with { "resolution-mode": "import" };
168
172
  import type { TrackChangesModuleConfig as __Cjs_TrackChangesModuleConfig } from './index.js' with { "resolution-mode": "import" };
169
173
  import type { TrackChangesSemanticColorsConfig as __Cjs_TrackChangesSemanticColorsConfig } from './index.js' with { "resolution-mode": "import" };
@@ -188,11 +192,13 @@ export declare const buildTheme: typeof import('./index.js', { with: { "resoluti
188
192
  export type { __Cjs_CanPerformPermissionParams as CanPerformPermissionParams };
189
193
  export type { __Cjs_CollaborationConfig as CollaborationConfig };
190
194
  export type { __Cjs_CommentAddress as CommentAddress };
195
+ export type { __Cjs_CommentsConfig as CommentsConfig };
191
196
  export type { __Cjs_CommentsType as CommentsType };
192
197
  export declare const compareVersions: typeof import('./index.js', { with: { "resolution-mode": "import" } }).compareVersions;
193
198
  export type { __Cjs_Config as Config };
194
199
  export type { __Cjs_ContentControlActiveChangePayload as ContentControlActiveChangePayload };
195
200
  export type { __Cjs_ContentControlClickPayload as ContentControlClickPayload };
201
+ export type { __Cjs_ContentControlsConfig as ContentControlsConfig };
196
202
  export type { __Cjs_ContextMenuConfig as ContextMenuConfig };
197
203
  export type { __Cjs_ContextMenuContext as ContextMenuContext };
198
204
  export type { __Cjs_ContextMenuItem as ContextMenuItem };
@@ -234,6 +240,7 @@ export type { __Cjs_LayoutFragment as LayoutFragment };
234
240
  export type { __Cjs_LayoutMetrics as LayoutMetrics };
235
241
  export type { __Cjs_LayoutMode as LayoutMode };
236
242
  export type { __Cjs_LayoutPage as LayoutPage };
243
+ export type { __Cjs_LinkPopoverConfig as LinkPopoverConfig };
237
244
  export type { __Cjs_LinkPopoverContext as LinkPopoverContext };
238
245
  export type { __Cjs_LinkPopoverResolution as LinkPopoverResolution };
239
246
  export type { __Cjs_LinkPopoverResolver as LinkPopoverResolver };
@@ -351,6 +358,7 @@ export type { __Cjs_TextAddress as TextAddress };
351
358
  export type { __Cjs_TextSegment as TextSegment };
352
359
  export type { __Cjs_TextTarget as TextTarget };
353
360
  export type { __Cjs_TrackChangeAuthor as TrackChangeAuthor };
361
+ export type { __Cjs_TrackChangeHighlightColors as TrackChangeHighlightColors };
354
362
  export type { __Cjs_TrackChangesAuthorColorsConfig as TrackChangesAuthorColorsConfig };
355
363
  export type { __Cjs_TrackChangesModuleConfig as TrackChangesModuleConfig };
356
364
  export type { __Cjs_TrackChangesSemanticColorsConfig as TrackChangesSemanticColorsConfig };
@@ -72,6 +72,10 @@ 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 { CommentsConfig } from '../core/types/index.js';
76
+ export type { TrackChangeHighlightColors } from '../core/types/index.js';
77
+ export type { ContentControlsConfig } from '../core/types/index.js';
78
+ export type { LinkPopoverConfig } from '../core/types/index.js';
75
79
  export type { LinkPopoverContext } from '../core/types/index.js';
76
80
  export type { LinkPopoverResolution } from '../core/types/index.js';
77
81
  export type { LinkPopoverResolver } from '../core/types/index.js';