@keboola/design 11.2.0 → 11.4.0

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 (249) hide show
  1. package/AGENTS.md +42 -14
  2. package/CHANGELOG.md +424 -0
  3. package/COMPONENT-API.md +33 -32
  4. package/dist/{AIKit-DiS0CVOW.js → AIKit-DDg5DBCG.js} +156 -76
  5. package/dist/AIKit-DDg5DBCG.js.map +1 -0
  6. package/dist/{Alert-DfZq9kGe.js → Alert-DHJFrWnS.js} +3 -3
  7. package/dist/{Alert-DfZq9kGe.js.map → Alert-DHJFrWnS.js.map} +1 -1
  8. package/dist/{AlertModal-Dp_XuJBW.js → AlertModal-BGJdaRRj.js} +3 -3
  9. package/dist/{AlertModal-Dp_XuJBW.js.map → AlertModal-BGJdaRRj.js.map} +1 -1
  10. package/dist/{AppShell-B5GQN6Zs.js → AppShell-DRgJxpXW.js} +29 -10
  11. package/dist/AppShell-DRgJxpXW.js.map +1 -0
  12. package/dist/{BrandEditor-DyzgfVkl.js → BrandEditor-Go7w8Zj2.js} +7 -7
  13. package/dist/{BrandEditor-DyzgfVkl.js.map → BrandEditor-Go7w8Zj2.js.map} +1 -1
  14. package/dist/{BrandLogo-CJkRd0F8.js → BrandLogo-Dmi7jo21.js} +2 -2
  15. package/dist/{BrandLogo-CJkRd0F8.js.map → BrandLogo-Dmi7jo21.js.map} +1 -1
  16. package/dist/{Breadcrumb-Frst8MTA.js → Breadcrumb-uEkM6adI.js} +3 -3
  17. package/dist/{Breadcrumb-Frst8MTA.js.map → Breadcrumb-uEkM6adI.js.map} +1 -1
  18. package/dist/{Button-6xBX0nNl.js → Button-DsRrU5F1.js} +6 -5
  19. package/dist/Button-DsRrU5F1.js.map +1 -0
  20. package/dist/{Card-BAoZ35CV.js → Card-Dyo7055Q.js} +2 -2
  21. package/dist/{Card-BAoZ35CV.js.map → Card-Dyo7055Q.js.map} +1 -1
  22. package/dist/{Checkbox-GJ8-srt4.js → Checkbox-fC0BuO2B.js} +3 -3
  23. package/dist/{Checkbox-GJ8-srt4.js.map → Checkbox-fC0BuO2B.js.map} +1 -1
  24. package/dist/{Clipboard-CBJZiviP.js → Clipboard-ChPdiUy3.js} +2 -2
  25. package/dist/{Clipboard-CBJZiviP.js.map → Clipboard-ChPdiUy3.js.map} +1 -1
  26. package/dist/{ClipboardButton-ClcluT0C.js → ClipboardButton-D9pDjgkB.js} +3 -3
  27. package/dist/{ClipboardButton-ClcluT0C.js.map → ClipboardButton-D9pDjgkB.js.map} +1 -1
  28. package/dist/{CodeEditor-DyaN-Ij2.js → CodeEditor-Cxy3HnKH.js} +244 -113
  29. package/dist/CodeEditor-Cxy3HnKH.js.map +1 -0
  30. package/dist/{ColorInput-B8z4j4Y_.js → ColorInput-Bxj-1eLT.js} +3 -3
  31. package/dist/{ColorInput-B8z4j4Y_.js.map → ColorInput-Bxj-1eLT.js.map} +1 -1
  32. package/dist/{ColorModeSwitch-dZFZyqy1.js → ColorModeSwitch-CsWLiTBX.js} +3 -3
  33. package/dist/{ColorModeSwitch-dZFZyqy1.js.map → ColorModeSwitch-CsWLiTBX.js.map} +1 -1
  34. package/dist/{Combobox-Dgm6Z4ib.js → Combobox-Cs_1pj2q.js} +31 -24
  35. package/dist/Combobox-Cs_1pj2q.js.map +1 -0
  36. package/dist/{Command-C0aZfVTq.js → Command-B7ML9YMv.js} +6 -6
  37. package/dist/{Command-C0aZfVTq.js.map → Command-B7ML9YMv.js.map} +1 -1
  38. package/dist/{CopyField-BJ96zvXs.js → CopyField-BO_sh-HO.js} +2 -2
  39. package/dist/{CopyField-BJ96zvXs.js.map → CopyField-BO_sh-HO.js.map} +1 -1
  40. package/dist/{DateInput-B3UdzRfW.js → DateInput-ZdaMQo5i.js} +4 -4
  41. package/dist/{DateInput-B3UdzRfW.js.map → DateInput-ZdaMQo5i.js.map} +1 -1
  42. package/dist/{DatePicker-Dw3DpbUh.js → DatePicker-nA8YdE84.js} +2 -2
  43. package/dist/{DatePicker-Dw3DpbUh.js.map → DatePicker-nA8YdE84.js.map} +1 -1
  44. package/dist/{DateRangeInput-DTuySEiq.js → DateRangeInput-DkvNh_sT.js} +4 -4
  45. package/dist/{DateRangeInput-DTuySEiq.js.map → DateRangeInput-DkvNh_sT.js.map} +1 -1
  46. package/dist/{DateRangePicker-DCmMHg4s.js → DateRangePicker-DjSUFjh4.js} +6 -6
  47. package/dist/{DateRangePicker-DCmMHg4s.js.map → DateRangePicker-DjSUFjh4.js.map} +1 -1
  48. package/dist/{DropdownMenu-t90tVw6l.js → DropdownMenu-CASr-jgl.js} +2 -2
  49. package/dist/{DropdownMenu-t90tVw6l.js.map → DropdownMenu-CASr-jgl.js.map} +1 -1
  50. package/dist/{FieldItem-D-h1NeBo.js → FieldItem-CCd9-xnp.js} +3 -3
  51. package/dist/{FieldItem-D-h1NeBo.js.map → FieldItem-CCd9-xnp.js.map} +1 -1
  52. package/dist/{FieldItem-CAPj9lj3.d.ts → FieldItem-vhIJW4pj.d.ts} +2 -10
  53. package/dist/{FileUpload-BRv0TaZk.js → FileUpload-ABThVZyg.js} +2 -2
  54. package/dist/{FileUpload-BRv0TaZk.js.map → FileUpload-ABThVZyg.js.map} +1 -1
  55. package/dist/{Form-DHvcFoEi.js → Form-k6PH-em3.js} +8 -8
  56. package/dist/{Form-DHvcFoEi.js.map → Form-k6PH-em3.js.map} +1 -1
  57. package/dist/{FormGroup-C41n65cE.js → FormGroup-DbcDtrgU.js} +3 -3
  58. package/dist/{FormGroup-C41n65cE.js.map → FormGroup-DbcDtrgU.js.map} +1 -1
  59. package/dist/{FullScreenModal-Cb3PGgh4.js → FullScreenModal-BvPuYibe.js} +3 -3
  60. package/dist/{FullScreenModal-Cb3PGgh4.js.map → FullScreenModal-BvPuYibe.js.map} +1 -1
  61. package/dist/{HoverCard-WfDkLK1s.js → HoverCard-B9ZMJxjn.js} +2 -2
  62. package/dist/{HoverCard-WfDkLK1s.js.map → HoverCard-B9ZMJxjn.js.map} +1 -1
  63. package/dist/{InputGroup-CdTq8H7c.js → InputGroup-BnLHY0eq.js} +3 -3
  64. package/dist/{InputGroup-CdTq8H7c.js.map → InputGroup-BnLHY0eq.js.map} +1 -1
  65. package/dist/{Kbd-CxHAo1oo.js → Kbd-CvSM3D3-.js} +2 -2
  66. package/dist/{Kbd-CxHAo1oo.js.map → Kbd-CvSM3D3-.js.map} +1 -1
  67. package/dist/MarkedText-DNGEUVWc.js +67 -0
  68. package/dist/MarkedText-DNGEUVWc.js.map +1 -0
  69. package/dist/{MermaidDiagram-ChL3WIQT.js → MermaidDiagram-WkonYErO.js} +6 -87
  70. package/dist/MermaidDiagram-WkonYErO.js.map +1 -0
  71. package/dist/{Modal-wqG8nJiK.js → Modal-Coj-H02o.js} +16 -4
  72. package/dist/Modal-Coj-H02o.js.map +1 -0
  73. package/dist/{MultiActionButtonGroup-BiIIubiL.js → MultiActionButtonGroup-CxWH7yWK.js} +3 -3
  74. package/dist/{MultiActionButtonGroup-BiIIubiL.js.map → MultiActionButtonGroup-CxWH7yWK.js.map} +1 -1
  75. package/dist/{Navbar-BfaPeLUL.js → Navbar-B2UsolVU.js} +3 -3
  76. package/dist/{Navbar-BfaPeLUL.js.map → Navbar-B2UsolVU.js.map} +1 -1
  77. package/dist/{PageToolbar-OQg3mPF-.js → PageToolbar-DnbFt14Q.js} +3 -3
  78. package/dist/{PageToolbar-OQg3mPF-.js.map → PageToolbar-DnbFt14Q.js.map} +1 -1
  79. package/dist/{Pagination-Cjfda8KG.js → Pagination-C_b7Xhey.js} +2 -2
  80. package/dist/{Pagination-Cjfda8KG.js.map → Pagination-C_b7Xhey.js.map} +1 -1
  81. package/dist/{Popconfirm-D7_vfxFd.js → Popconfirm-CILjmzKI.js} +3 -3
  82. package/dist/{Popconfirm-D7_vfxFd.js.map → Popconfirm-CILjmzKI.js.map} +1 -1
  83. package/dist/{Popover-CzeHjvrB.js → Popover-BEbQrC_P.js} +22 -19
  84. package/dist/Popover-BEbQrC_P.js.map +1 -0
  85. package/dist/{RadioGroup-sIveSsNa.js → RadioGroup-XFzFd1ti.js} +3 -3
  86. package/dist/{RadioGroup-sIveSsNa.js.map → RadioGroup-XFzFd1ti.js.map} +1 -1
  87. package/dist/{Search-3UiqNZRj.js → Search-4Bxtt8hS.js} +2 -2
  88. package/dist/{Search-3UiqNZRj.js.map → Search-4Bxtt8hS.js.map} +1 -1
  89. package/dist/{SearchInput-C7dF_Ir-.js → SearchInput-f_oY9T4Z.js} +3 -3
  90. package/dist/{SearchInput-C7dF_Ir-.js.map → SearchInput-f_oY9T4Z.js.map} +1 -1
  91. package/dist/{SectionNav-8NoTOKO8.js → SectionNav-BpJlisbT.js} +4 -4
  92. package/dist/{SectionNav-8NoTOKO8.js.map → SectionNav-BpJlisbT.js.map} +1 -1
  93. package/dist/{Select-Is0VkePH.js → Select-DpcgKqKB.js} +32 -21
  94. package/dist/Select-DpcgKqKB.js.map +1 -0
  95. package/dist/{Sheet-Dw9BDvjI.js → Sheet-Chf0kX1E.js} +3 -3
  96. package/dist/{Sheet-Dw9BDvjI.js.map → Sheet-Chf0kX1E.js.map} +1 -1
  97. package/dist/{Sidebar-Dcb4rinA.js → Sidebar-Cm6I4dE1.js} +9 -7
  98. package/dist/{Sidebar-Dcb4rinA.js.map → Sidebar-Cm6I4dE1.js.map} +1 -1
  99. package/dist/{Slider-BOPfMOMm.js → Slider-pPC_3gz9.js} +3 -3
  100. package/dist/{Slider-BOPfMOMm.js.map → Slider-pPC_3gz9.js.map} +1 -1
  101. package/dist/{Switch-CX2A0v50.js → Switch-ChfPKcTE.js} +2 -2
  102. package/dist/{Switch-CX2A0v50.js.map → Switch-ChfPKcTE.js.map} +1 -1
  103. package/dist/{Tabs-UMQuDoW8.js → Tabs-eB974xJf.js} +2 -2
  104. package/dist/{Tabs-UMQuDoW8.js.map → Tabs-eB974xJf.js.map} +1 -1
  105. package/dist/{TextInput-CMuN1WfY.js → TextInput-DHM6dHmn.js} +3 -3
  106. package/dist/{TextInput-CMuN1WfY.js.map → TextInput-DHM6dHmn.js.map} +1 -1
  107. package/dist/{ThemeProvider-QncUrfJn.js → ThemeProvider-DrQJtzpd.js} +90 -14
  108. package/dist/ThemeProvider-DrQJtzpd.js.map +1 -0
  109. package/dist/{TimePicker-D9zktB8A.js → TimePicker-BGeqc-Ed.js} +2 -2
  110. package/dist/{TimePicker-D9zktB8A.js.map → TimePicker-BGeqc-Ed.js.map} +1 -1
  111. package/dist/{Toast-DQSbs3oA.js → Toast-Dr6Uw7ao.js} +2 -2
  112. package/dist/{Toast-DQSbs3oA.js.map → Toast-Dr6Uw7ao.js.map} +1 -1
  113. package/dist/{ZoomableSvg-CZEu6sAq.js → ZoomableSvg-BWnDkR61.js} +4 -4
  114. package/dist/{ZoomableSvg-CZEu6sAq.js.map → ZoomableSvg-BWnDkR61.js.map} +1 -1
  115. package/dist/{context-KxxeMHbR.js → context-D7X470dy.js} +5 -34
  116. package/dist/context-D7X470dy.js.map +1 -0
  117. package/dist/defaults-i_xG2F_1.js +32 -0
  118. package/dist/defaults-i_xG2F_1.js.map +1 -0
  119. package/dist/editors.d.ts +12 -2
  120. package/dist/editors.js +20 -12
  121. package/dist/editors.js.map +1 -1
  122. package/dist/findLiteralMatches-BGBw8Vbl.js +62 -0
  123. package/dist/findLiteralMatches-BGBw8Vbl.js.map +1 -0
  124. package/dist/flint.d.ts +15 -0
  125. package/dist/flint.js +212 -0
  126. package/dist/flint.js.map +1 -0
  127. package/dist/index.d.ts +725 -533
  128. package/dist/index.js +60 -57
  129. package/dist/internal/blocks/AIKit.js +2 -2
  130. package/dist/internal/blocks/AppShell.js +2 -2
  131. package/dist/internal/blocks/BrandEditor.js +1 -1
  132. package/dist/internal/blocks/ChartPanel.js +1 -1
  133. package/dist/internal/blocks/ClipboardButton.js +1 -1
  134. package/dist/internal/blocks/ColorInput.js +1 -1
  135. package/dist/internal/blocks/ColorModeSwitch.js +1 -1
  136. package/dist/internal/blocks/Command.js +1 -1
  137. package/dist/internal/blocks/CopyField.js +1 -1
  138. package/dist/internal/blocks/DateInput.js +1 -1
  139. package/dist/internal/blocks/DateRangeInput.js +1 -1
  140. package/dist/{DiagramSkeleton-lwBS2YBa.js → internal/blocks/DiagramShared/DiagramSkeleton.js} +3 -3
  141. package/dist/internal/blocks/DiagramShared/DiagramSkeleton.js.map +1 -0
  142. package/dist/internal/blocks/EmptyConfigurationActionCard.js +1 -1
  143. package/dist/internal/blocks/ErrorState.js +1 -1
  144. package/dist/internal/blocks/ExportMenu.js +5 -5
  145. package/dist/internal/blocks/ExportMenu.js.map +1 -1
  146. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +1 -1
  147. package/dist/internal/blocks/Form.js +1 -1
  148. package/dist/internal/blocks/FormGroup.js +1 -1
  149. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
  150. package/dist/internal/blocks/MultiCombobox.js +15 -11
  151. package/dist/internal/blocks/MultiCombobox.js.map +1 -1
  152. package/dist/internal/blocks/NumberInput.js +1 -1
  153. package/dist/internal/blocks/PageToolbar.js +1 -1
  154. package/dist/internal/blocks/PasswordInput.js +2 -2
  155. package/dist/internal/blocks/SearchInput.js +1 -1
  156. package/dist/internal/blocks/SearchInputWithNavigation.js +3 -3
  157. package/dist/internal/blocks/SectionNav.js +1 -1
  158. package/dist/internal/blocks/SplitButton.js +2 -2
  159. package/dist/internal/blocks/StatCard.js +1 -1
  160. package/dist/internal/blocks/TextInput.js +1 -1
  161. package/dist/internal/blocks/Textarea.js +1 -1
  162. package/dist/internal/blocks/TimeInput.js +3 -3
  163. package/dist/internal/components/Alert.js +1 -1
  164. package/dist/internal/components/AlertModal.js +1 -1
  165. package/dist/internal/components/Avatar.js +1 -1
  166. package/dist/internal/components/BrandLogo.js +1 -1
  167. package/dist/internal/components/Breadcrumb.js +1 -1
  168. package/dist/internal/components/Button.js +1 -1
  169. package/dist/internal/components/Card.js +1 -1
  170. package/dist/internal/components/Checkbox.js +1 -1
  171. package/dist/internal/components/Clipboard.js +1 -1
  172. package/dist/internal/components/CollapsiblePanel.js +1 -1
  173. package/dist/internal/components/Combobox.js +1 -1
  174. package/dist/internal/components/DatePicker.js +1 -1
  175. package/dist/internal/components/DateRangePicker.js +1 -1
  176. package/dist/internal/components/DropdownMenu.js +1 -1
  177. package/dist/internal/components/FileUpload.js +1 -1
  178. package/dist/internal/components/FullScreenModal.js +1 -1
  179. package/dist/internal/components/HoverCard.js +1 -1
  180. package/dist/internal/components/InputGroup.js +1 -1
  181. package/dist/internal/components/Kbd.js +1 -1
  182. package/dist/internal/components/MarkedText.js +1 -1
  183. package/dist/internal/components/Modal.js +1 -1
  184. package/dist/internal/components/Navbar.js +1 -1
  185. package/dist/internal/components/Pagination.js +1 -1
  186. package/dist/internal/components/Popconfirm.js +1 -1
  187. package/dist/internal/components/Popover.js +1 -1
  188. package/dist/internal/components/RadioGroup.js +1 -1
  189. package/dist/internal/components/Search.js +1 -1
  190. package/dist/internal/components/Select.js +1 -1
  191. package/dist/internal/components/Sheet.js +1 -1
  192. package/dist/internal/components/Sidebar.js +1 -1
  193. package/dist/internal/components/Slider.js +1 -1
  194. package/dist/internal/components/Switch.js +1 -1
  195. package/dist/internal/components/Tabs.js +1 -1
  196. package/dist/internal/components/ThemeProvider.js +4 -3
  197. package/dist/internal/components/TimePicker.js +1 -1
  198. package/dist/internal/components/Toast.js +2 -2
  199. package/dist/internal/components/Toggle.js +3 -3
  200. package/dist/internal/components/Toggle.js.map +1 -1
  201. package/dist/internal/components/Tooltip.js +1 -1
  202. package/dist/internal/components/Truncated.js +16 -8
  203. package/dist/internal/components/Truncated.js.map +1 -1
  204. package/dist/internal/components/ZoomableSvg.js +1 -1
  205. package/dist/internal/utils.js +3 -3
  206. package/dist/markdown-editor.js +7 -7
  207. package/dist/mermaid.js +1 -1
  208. package/dist/rjsf.js +11 -11
  209. package/dist/{styles-DSUP_-9Z.js → styles-BAFscjSV.js} +4 -3
  210. package/dist/styles-BAFscjSV.js.map +1 -0
  211. package/dist/styles.css +1 -1
  212. package/dist/svgTransforms-C9njt92h.js +89 -0
  213. package/dist/svgTransforms-C9njt92h.js.map +1 -0
  214. package/dist/testing.js +4 -3
  215. package/dist/testing.js.map +1 -1
  216. package/dist/{themeTokens-BNg98Mu9.js → themeTokens-D70HeNVF.js} +13 -6
  217. package/dist/{themeTokens-BNg98Mu9.js.map → themeTokens-D70HeNVF.js.map} +1 -1
  218. package/dist/{toast-CjkURw0M.js → toast-DIC0iNRf.js} +3 -3
  219. package/dist/toast-DIC0iNRf.js.map +1 -0
  220. package/dist/types-BPcAjMG0.d.ts +10 -0
  221. package/dist/{useColorSchemeState-CYqcUfSH.js → useColorSchemeState-klihG9-i.js} +2 -2
  222. package/dist/{useColorSchemeState-CYqcUfSH.js.map → useColorSchemeState-klihG9-i.js.map} +1 -1
  223. package/dist/{utils-D0c5VAyF.js → utils-B5Z52hYs.js} +2 -2
  224. package/dist/{utils-D0c5VAyF.js.map → utils-B5Z52hYs.js.map} +1 -1
  225. package/dist/vega.d.ts +46 -0
  226. package/dist/vega.js +26 -0
  227. package/dist/vega.js.map +1 -0
  228. package/dist/vegaTheme-DfoEQhOy.js +146 -0
  229. package/dist/vegaTheme-DfoEQhOy.js.map +1 -0
  230. package/package.json +28 -9
  231. package/src/styles.css +27 -4
  232. package/dist/AIKit-DiS0CVOW.js.map +0 -1
  233. package/dist/AppShell-B5GQN6Zs.js.map +0 -1
  234. package/dist/Button-6xBX0nNl.js.map +0 -1
  235. package/dist/CodeEditor-DyaN-Ij2.js.map +0 -1
  236. package/dist/Combobox-Dgm6Z4ib.js.map +0 -1
  237. package/dist/DiagramSkeleton-lwBS2YBa.js.map +0 -1
  238. package/dist/MarkedText-Ckbft5mw.js +0 -44
  239. package/dist/MarkedText-Ckbft5mw.js.map +0 -1
  240. package/dist/MermaidDiagram-ChL3WIQT.js.map +0 -1
  241. package/dist/Modal-wqG8nJiK.js.map +0 -1
  242. package/dist/Popover-CzeHjvrB.js.map +0 -1
  243. package/dist/Select-Is0VkePH.js.map +0 -1
  244. package/dist/ThemeProvider-QncUrfJn.js.map +0 -1
  245. package/dist/context-KxxeMHbR.js.map +0 -1
  246. package/dist/escapeStringRegexp-8MxP2knR.js +0 -6
  247. package/dist/escapeStringRegexp-8MxP2knR.js.map +0 -1
  248. package/dist/styles-DSUP_-9Z.js.map +0 -1
  249. package/dist/toast-CjkURw0M.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { isMac, keyCodes } from "./utils-D0c5VAyF.js";
3
- import { useArgoDesign } from "./context-KxxeMHbR.js";
4
- import { escapeStringRegexp } from "./escapeStringRegexp-8MxP2knR.js";
5
- import { ClipboardButton } from "./ClipboardButton-ClcluT0C.js";
2
+ import { isMac, keyCodes } from "./utils-B5Z52hYs.js";
3
+ import { useArgoDesign } from "./context-D7X470dy.js";
4
+ import { findLiteralMatches } from "./findLiteralMatches-BGBw8Vbl.js";
5
+ import { ClipboardButton } from "./ClipboardButton-D9pDjgkB.js";
6
6
  import { HelpBlock } from "./internal/components/HelpBlock.js";
7
- import { Kbd } from "./Kbd-CxHAo1oo.js";
7
+ import { Kbd } from "./Kbd-CvSM3D3-.js";
8
8
  import { useStableCallback } from "./internal/hooks/useStableCallback.js";
9
- import { resolveToken, useThemeAttributes } from "./themeTokens-BNg98Mu9.js";
9
+ import { resolveToken, useThemeAttributes } from "./themeTokens-D70HeNVF.js";
10
10
  import { useEffect, useLayoutEffect, useMemo, useRef } from "react";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  import { autocompletion, completeAnyWord } from "@codemirror/autocomplete";
@@ -23,10 +23,10 @@ import { r } from "@codemirror/legacy-modes/mode/r";
23
23
  import { shell } from "@codemirror/legacy-modes/mode/shell";
24
24
  import { toml } from "@codemirror/legacy-modes/mode/toml";
25
25
  import { linter } from "@codemirror/lint";
26
- import { tags } from "@lezer/highlight";
27
- import { githubLightInit } from "@uiw/codemirror-theme-github";
26
+ import { githubDarkInit, githubLightInit } from "@uiw/codemirror-theme-github";
28
27
  import { getSqlLanguageSupport } from "@keboola/codemirror-lang-sql";
29
28
  import { simpleMode } from "@codemirror/legacy-modes/mode/simple-mode";
29
+ import { tags } from "@lezer/highlight";
30
30
  import { Compartment, StateEffect, StateField } from "@codemirror/state";
31
31
  //#region src/components/CodeEditor/ButtonToolbar.tsx
32
32
  const ButtonToolbar = ({ value, children }) => {
@@ -344,6 +344,95 @@ const jsonnet = {
344
344
  return null;
345
345
  }
346
346
  };
347
+ const DARK_GUTTER_ALPHA = "47";
348
+ /**
349
+ * The two diff fills, per scheme: light keeps the opaque pastel, dark tints the same `500` hue at
350
+ * low alpha over whatever token surface is behind it.
351
+ *
352
+ * - Its own module, importing nothing, so `MergeEditor` can share it without reaching into
353
+ * `CodeEditor/helpers.ts` and pulling the language modes and the CodeMirror runtime with it.
354
+ * - Shared by the unified merge wash in `helpers.ts` and `buildDiffHighlightTheme` in
355
+ * `MergeEditor/decorations.ts`, so the two views cannot drift apart on the alphas.
356
+ * - Callers pass the hue and the pastel; which one is used is this function's business.
357
+ */
358
+ const buildDiffWash = (scheme) => {
359
+ const dark = scheme === "dark";
360
+ return {
361
+ line: (hue, pastel) => dark ? `${hue}29` : pastel,
362
+ gutter: (hue, pastel) => dark ? `${hue}${DARK_GUTTER_ALPHA}` : pastel
363
+ };
364
+ };
365
+ //#endregion
366
+ //#region src/components/CodeEditor/syntaxPalette.ts
367
+ /**
368
+ * The tag colours layered over the stock github palette, per colour scheme.
369
+ *
370
+ * - Its own module, importing nothing but the tag vocabulary and the ramps, so
371
+ * `scripts/contrast-audit.ts` can measure the palette without pulling the language modes and the
372
+ * CodeMirror runtime into a build script.
373
+ * - Later entries win over the stock rule for the same tag — both `githubLightInit` and
374
+ * `githubDarkInit` concatenate these after their own.
375
+ * - `foreground` is the caller's, because it is a live `--*` token rather than a ramp step: the
376
+ * theme passes `resolveToken('foreground')`, the audit passes the scheme's channel value.
377
+ * - Every ramp step here is a light/dark pair, and each pair is chosen against **two** surfaces —
378
+ * the theme's `background` setting is the page, but `variant="field"` paints on `muted`, which
379
+ * the theme never sees. Ratios in the comments are quoted `background` / `muted`.
380
+ */
381
+ const buildSyntaxPalette = (scheme, foreground) => {
382
+ const dark = scheme === "dark";
383
+ return [
384
+ {
385
+ tag: [
386
+ tags.name,
387
+ tags.special(tags.string),
388
+ tags.bracket
389
+ ],
390
+ color: foreground
391
+ },
392
+ {
393
+ tag: tags.standard(tags.name),
394
+ color: dark ? colors.purple[300] : colors.purple[600]
395
+ },
396
+ {
397
+ tag: tags.special(tags.name),
398
+ color: dark ? colors.cyan[300] : colors.cyan[800]
399
+ },
400
+ {
401
+ tag: tags.string,
402
+ color: dark ? colors.warning[300] : colors.warning[800]
403
+ },
404
+ ...dark ? [] : [
405
+ {
406
+ tag: [
407
+ tags.keyword,
408
+ tags.typeName,
409
+ tags.typeOperator
410
+ ],
411
+ color: colors.error[550]
412
+ },
413
+ {
414
+ tag: tags.comment,
415
+ color: colors.neutral[500]
416
+ },
417
+ {
418
+ tag: tags.quote,
419
+ color: colors.green[900]
420
+ },
421
+ {
422
+ tag: tags.invalid,
423
+ color: colors.error[700]
424
+ }
425
+ ],
426
+ ...dark ? [{
427
+ tag: [
428
+ tags.escape,
429
+ tags.url,
430
+ tags.link
431
+ ],
432
+ color: colors.blue[300]
433
+ }] : []
434
+ ];
435
+ };
347
436
  //#endregion
348
437
  //#region src/components/CodeEditor/helpers.ts
349
438
  const LANGUAGE_MODES = [
@@ -368,44 +457,61 @@ const LANGUAGE_MODES = [
368
457
  const isLanguageMode = (mode) => LANGUAGE_MODES.includes(mode);
369
458
  const READ_ONLY_EDITOR = "&.cm-editor:has(.cm-content[contenteditable=\"false\"])";
370
459
  const EDITABLE_EDITOR = "&.cm-editor:has(.cm-content[contenteditable=\"true\"])";
371
- const buildBaseThemeStyles = () => ({
372
- "*": { lineHeight: "20px" },
373
- "*::selection": {
374
- backgroundColor: resolveToken("primary", "31 143 255"),
375
- color: `${resolveToken("primary-foreground", "255 255 255")} !important`
376
- },
377
- [READ_ONLY_EDITOR]: { backgroundColor: resolveToken("secondary", "226 232 240") },
378
- [`${READ_ONLY_EDITOR} .cm-gutters`]: { backgroundColor: resolveToken("border", "229 231 235") },
379
- "&.cm-editor .cm-scroller": { overflowAnchor: "none" },
380
- "&.cm-editor, &.cm-editor .cm-scroller": {
381
- minHeight: "100%",
382
- flexGrow: 1,
383
- alignItems: "stretch !important",
384
- outline: "none"
385
- },
386
- ".cm-gutter.cm-foldGutter": { display: "none !important" },
387
- ".cm-gutter.cm-lineNumbers": {
388
- paddingLeft: "20px",
389
- paddingRight: "6px"
390
- },
391
- ".cm-gutters": { height: "auto" },
392
- "&[class*=\"cm-merge-\"] .cm-deletedLine": { backgroundColor: colors.error[100] },
393
- "&[class*=\"cm-merge-\"] .cm-changedLine": { backgroundColor: colors.green[100] },
394
- "&[class*=\"cm-merge-\"] .cm-deletedLineGutter": { backgroundColor: colors.error[200] },
395
- "&[class*=\"cm-merge-\"] .cm-changedLineGutter": { backgroundColor: colors.green[200] },
396
- "&[class*=\"cm-merge-\"] .cm-deletedText": { background: colors.error[200] },
397
- "&[class*=\"cm-merge-\"] .cm-changedText": { background: colors.green[200] },
398
- "&[class*=\"cm-merge-\"]": { backgroundColor: `${colors.white} !important` },
399
- "&[class*=\"cm-merge-\"] .cm-gutters": { backgroundColor: `${colors.white} !important` },
400
- ".cm-changeGutter": {
401
- position: "absolute",
402
- zIndex: -1,
403
- width: "100%",
404
- paddingLeft: 0
405
- },
406
- "&[class*=\"cm-merge-\"] .cm-changedLine,&[class*=\"cm-merge-\"] .cm-line, &[class*=\"cm-merge-\"] .cm-deletedChunk": { paddingLeft: 0 }
407
- });
460
+ /**
461
+ * Editor chrome and the unified merge (diff) wash.
462
+ *
463
+ * - Chrome surfaces (selection, read-only wash) resolve from live `--*` tokens, so they re-skin
464
+ * with brand and colour scheme. Fallback channels mirror the light-mode token values for SSR /
465
+ * no-provider parity.
466
+ * - Diff colours stay categorical — fixed across brands, because added/removed is meaning, not
467
+ * chrome — but each is a light/dark pair from `buildDiffWash`, shared with
468
+ * `buildDiffHighlightTheme` in `MergeEditor/decorations.ts`.
469
+ * - This wash reaches only `CodeEditor`'s *unified* merge view — the one a `previousValue` turns on.
470
+ * `MergePane` builds its own theme from scratch.
471
+ */
472
+ const buildBaseThemeStyles = (scheme) => {
473
+ const { line, gutter } = buildDiffWash(scheme);
474
+ const dark = scheme === "dark";
475
+ return {
476
+ "*": { lineHeight: "20px" },
477
+ "*::selection": {
478
+ backgroundColor: resolveToken("primary", "31 143 255"),
479
+ color: `${resolveToken("primary-foreground", "255 255 255")} !important`
480
+ },
481
+ [READ_ONLY_EDITOR]: { backgroundColor: `var(--code-editor-surface, ${dark ? resolveToken("muted", "38 38 45") : resolveToken("secondary", "226 232 240")})` },
482
+ [`${READ_ONLY_EDITOR} .cm-gutters`]: { backgroundColor: `var(--code-editor-surface, ${resolveToken("border", "229 231 235")})` },
483
+ "&.cm-editor .cm-scroller": { overflowAnchor: "none" },
484
+ "&.cm-editor, &.cm-editor .cm-scroller": {
485
+ minHeight: "100%",
486
+ flexGrow: 1,
487
+ alignItems: "stretch !important",
488
+ outline: "none"
489
+ },
490
+ ".cm-gutter.cm-foldGutter": { display: "none !important" },
491
+ ".cm-gutter.cm-lineNumbers": {
492
+ paddingLeft: "20px",
493
+ paddingRight: "6px"
494
+ },
495
+ ".cm-gutters": { height: "auto" },
496
+ "&[class*=\"cm-merge-\"] .cm-deletedLine": { backgroundColor: line(colors.error[500], colors.error[100]) },
497
+ "&[class*=\"cm-merge-\"] .cm-changedLine": { backgroundColor: line(colors.green[500], colors.green[100]) },
498
+ "&[class*=\"cm-merge-\"] .cm-deletedLineGutter": { backgroundColor: gutter(colors.error[500], colors.error[200]) },
499
+ "&[class*=\"cm-merge-\"] .cm-changedLineGutter": { backgroundColor: gutter(colors.green[500], colors.green[200]) },
500
+ "&[class*=\"cm-merge-\"] .cm-deletedText": { background: gutter(colors.error[500], colors.error[200]) },
501
+ "&[class*=\"cm-merge-\"] .cm-changedText": { background: gutter(colors.green[500], colors.green[200]) },
502
+ "&[class*=\"cm-merge-\"]": { backgroundColor: `${resolveToken("background", "249 250 251")} !important` },
503
+ "&[class*=\"cm-merge-\"] .cm-gutters": { backgroundColor: `${resolveToken("muted", "241 245 249")} !important` },
504
+ ".cm-changeGutter": {
505
+ position: "absolute",
506
+ zIndex: -1,
507
+ width: "100%",
508
+ paddingLeft: 0
509
+ },
510
+ "&[class*=\"cm-merge-\"] .cm-changedLine,&[class*=\"cm-merge-\"] .cm-line, &[class*=\"cm-merge-\"] .cm-deletedChunk": { paddingLeft: 0 }
511
+ };
512
+ };
408
513
  const ALWAYS_OFF = {
514
+ autocompletion: false,
409
515
  drawSelection: false,
410
516
  foldGutter: false,
411
517
  foldKeymap: false,
@@ -424,42 +530,50 @@ const buildBasicSetup = (readOnly) => ({
424
530
  highlightSelectionMatches: false
425
531
  } : null
426
532
  });
533
+ /**
534
+ * The syntax theme, per colour scheme.
535
+ *
536
+ * - The stock github palette is picked by scheme: `githubDarkInit` under dark, `githubLightInit`
537
+ * otherwise. One palette cannot serve both — the light set scores 1.14:1 to 4.31:1 on the two
538
+ * dark surfaces, so 10 of its 11 colours failed AA there (UT-5194).
539
+ * - `githubDarkInit` also passes `dark: true` to `EditorView.theme`, which sets the
540
+ * `EditorView.darkTheme` facet. That is what makes the `&dark` rules apply — CodeMirror's own
541
+ * base theme (cursor, selection layer, panels, buttons) and ours (`search.ts`,
542
+ * `highlighting.ts`) both key off it, so they follow the scheme without a second signal.
543
+ * - Chrome (surface, gutter, selection, caret) resolves from live `--*` tokens, so it re-skins with
544
+ * the brand too. Fallback channels mirror the light-mode token values, for SSR and jsdom.
545
+ * - `caret` and `selectionMatch` are pinned because the two initialisers disagree on them, and the
546
+ * branch would otherwise change values nothing here chose. The caret follows `foreground`; before
547
+ * the facet was set, CodeMirror's own default painted it black on the dark page, so it was
548
+ * invisible. `selectionMatch` is a 10% `primary` tint, which beats each initialiser's own value
549
+ * on the token it hurts most: 3.82:1 against the light default's 3.29, 5.40:1 against the dark
550
+ * default's 3.57. Any occurrence wash costs contrast — this is the cheapest one, and it is the
551
+ * same in both schemes.
552
+ * - `styles` comes from `buildSyntaxPalette`, which lives apart so the audit script can measure it.
553
+ *
554
+ * Those overrides exist because the github theme paints every `name`-family tag one colour, and in
555
+ * SQL nearly every token is a name — identifiers, function calls and `$variables` all drowned
556
+ * together, and a keyword that doubles as a function (`create or REPLACE`) read as a value
557
+ * (UT-5024). Instead: identifiers and brackets carry no colour, functions and special vars get
558
+ * their own hues, and amber is unique to string literals — in JSON that shifts string values from
559
+ * navy to amber, the one visible non-SQL change.
560
+ */
427
561
  const buildCustomTheme = (scheme) => {
428
562
  const foreground = resolveToken("foreground", "30 41 59");
429
- const dark = scheme === "dark";
430
- return githubLightInit({
563
+ return (scheme === "dark" ? githubDarkInit : githubLightInit)({
431
564
  settings: {
432
565
  fontFamily: `'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New'`,
433
566
  background: resolveToken("background", "249 250 251"),
434
567
  foreground,
568
+ caret: foreground,
435
569
  gutterBackground: resolveToken("muted", "241 245 249"),
436
570
  gutterForeground: resolveToken("muted-foreground", "100 116 139"),
437
571
  gutterBorder: "transparent",
438
572
  lineHighlight: "transparent",
439
- selection: resolveToken("primary", "31 143 255")
573
+ selection: resolveToken("primary", "31 143 255"),
574
+ selectionMatch: resolveToken("primary", "31 143 255", .1)
440
575
  },
441
- styles: [
442
- {
443
- tag: [
444
- tags.name,
445
- tags.special(tags.string),
446
- tags.bracket
447
- ],
448
- color: foreground
449
- },
450
- {
451
- tag: tags.standard(tags.name),
452
- color: colors.purple[600]
453
- },
454
- {
455
- tag: tags.special(tags.name),
456
- color: colors.cyan[700]
457
- },
458
- {
459
- tag: tags.string,
460
- color: dark ? colors.warning[300] : colors.warning[800]
461
- }
462
- ]
576
+ styles: buildSyntaxPalette(scheme, foreground)
463
577
  });
464
578
  };
465
579
  const getLanguageMode = (mode) => {
@@ -524,22 +638,32 @@ const buildJsonLinter = (allowBlankDocument) => {
524
638
  * variant does. No semantic token holds that grey, and the nearest one
525
639
  * (`--muted`) is a few points off — which is the "almost, but not quite, the
526
640
  * input next to it" mismatch this preset exists to remove.
641
+ *
642
+ * That ramp is fixed, so the legacy preset needs its own scheme pair — a legacy brand and the dark
643
+ * scheme are independent choices, and `neutral[100]` under dark is a light slab: `foreground` on it
644
+ * is 1.09:1 and the darkest syntax colour 2.69:1. Dark mirrors the same two steps from the other
645
+ * end of the ramp (`800` / `900`, 5.00:1 and 6.14:1 for that colour).
527
646
  */
528
- const buildInputChrome = (isArgo) => ({
529
- surface: isArgo ? resolveToken("muted", "241 245 249") : colors.neutral[100],
530
- borderColor: isArgo ? resolveToken("input", "203 213 225") : colors.neutral[100],
531
- readOnlySurface: isArgo ? resolveToken("muted", "241 245 249") : colors.neutral[150],
532
- readOnlyBorderColor: isArgo ? resolveToken("input", "203 213 225") : colors.neutral[150],
533
- hoverBorderColor: null,
534
- focusBorderColor: isArgo ? resolveToken("primary", "37 99 235") : resolveToken("ring", "31 143 255"),
535
- focusRing: `0 0 0 4px ${resolveToken("ring", "31 143 255", isArgo ? .5 : .3)}`,
536
- radius: isArgo ? "var(--radius-lg, 0.25rem)" : "0.25rem",
537
- paddingY: isArgo ? "3px" : "5px",
538
- paddingX: {
539
- left: "10px",
540
- right: "14px"
541
- }
542
- });
647
+ const buildInputChrome = (isArgo, scheme) => {
648
+ const dark = scheme === "dark";
649
+ const legacySurface = dark ? colors.neutral[800] : colors.neutral[100];
650
+ const legacyReadOnly = dark ? colors.neutral[900] : colors.neutral[150];
651
+ return {
652
+ surface: isArgo ? resolveToken("muted", "241 245 249") : legacySurface,
653
+ borderColor: isArgo ? resolveToken("input", "203 213 225") : legacySurface,
654
+ readOnlySurface: isArgo ? resolveToken("muted", "241 245 249") : legacyReadOnly,
655
+ readOnlyBorderColor: isArgo ? resolveToken("input", "203 213 225") : legacyReadOnly,
656
+ hoverBorderColor: null,
657
+ focusBorderColor: isArgo ? resolveToken("primary", "37 99 235") : resolveToken("ring", "31 143 255"),
658
+ focusRing: `0 0 0 4px ${resolveToken("ring", "31 143 255", isArgo ? .5 : .3)}`,
659
+ radius: isArgo ? "var(--radius-lg, 0.25rem)" : "0.25rem",
660
+ paddingY: isArgo ? "3px" : "5px",
661
+ paddingX: {
662
+ left: "10px",
663
+ right: "14px"
664
+ }
665
+ };
666
+ };
543
667
  /** The SQL workspace's notebook cell: a white canvas, not a form control. */
544
668
  const buildCanvasChrome = () => ({
545
669
  surface: resolveToken("card", "255 255 255"),
@@ -586,23 +710,12 @@ const buildChromeStyles = (chrome) => ({
586
710
  //#region src/components/CodeEditor/search.ts
587
711
  const setSearchEffect = StateEffect.define();
588
712
  function findMatches(doc, query) {
589
- if (!query) return [];
590
- const text = doc.toString();
591
- try {
592
- const regex = new RegExp(escapeStringRegexp(query), "gi");
593
- return Array.from(text.matchAll(regex)).map((match, index) => {
594
- const from = match.index;
595
- return {
596
- from,
597
- to: from + match[0].length,
598
- text: match[0],
599
- localIndex: index
600
- };
601
- });
602
- } catch (e) {
603
- console.warn("Invalid search regex:", e);
604
- return [];
605
- }
713
+ if (!query || query.length > doc.length) return [];
714
+ return findLiteralMatches(doc.toString(), query).map((from, index) => ({
715
+ from,
716
+ to: from + query.length,
717
+ localIndex: index
718
+ }));
606
719
  }
607
720
  function createDecorations(matches, selectedLocalIndex) {
608
721
  const decorations = matches.map((match) => {
@@ -660,11 +773,28 @@ const searchViewPlugin = ViewPlugin.fromClass(class {
660
773
  if (state.selectedMatchIndex === void 0) this.lastSelectedIndex = void 0;
661
774
  }
662
775
  });
776
+ /**
777
+ * Match and current-match fills, per colour scheme.
778
+ *
779
+ * - `&dark` is how a *static* base theme follows the scheme, without becoming a
780
+ * `useThemedExtension` builder and a second entry in its never-evicting cache. It applies
781
+ * whenever the `EditorView.darkTheme` facet is set — see `buildBaseThemeStyles`' callers, which
782
+ * set it explicitly.
783
+ * - Light text is `blue[700]`: 5.42:1 on the fill, and 6.29:1 for white on the current match.
784
+ * - Dark tints `blue[500]` for the plain match, with `blue[200]` text: 11.10:1 on the page surface,
785
+ * 8.86:1 on the `variant="field"` one. The current match keeps a solid `blue[500]` and takes
786
+ * `neutral[900]` as its text (5.78:1) — white on it is 2.55:1, since the token that reads as
787
+ * "strong" in light is a light colour.
788
+ */
663
789
  const searchTheme = EditorView.baseTheme({
664
790
  ".cm-searchMatch": { backgroundColor: colors.blue[100] },
665
- ".cm-searchMatch > span": { color: `${colors.blue[600]} !important` },
666
- ".cm-searchMatch-selected": { backgroundColor: colors.blue[600] },
667
- ".cm-searchMatch-selected > span": { color: `${colors.white} !important` }
791
+ ".cm-searchMatch > span": { color: `${colors.blue[700]} !important` },
792
+ ".cm-searchMatch-selected": { backgroundColor: colors.blue[700] },
793
+ ".cm-searchMatch-selected > span": { color: `${colors.white} !important` },
794
+ "&dark .cm-searchMatch": { backgroundColor: `${colors.blue[500]}29` },
795
+ "&dark .cm-searchMatch > span": { color: `${colors.blue[200]} !important` },
796
+ "&dark .cm-searchMatch-selected": { backgroundColor: colors.blue[500] },
797
+ "&dark .cm-searchMatch-selected > span": { color: `${colors.neutral[900]} !important` }
668
798
  });
669
799
  function searchExtension() {
670
800
  return [
@@ -844,7 +974,7 @@ const useVariableCompletion = (variables = []) => useStableCallback(completeVari
844
974
  //#endregion
845
975
  //#region src/components/CodeEditor/CodeEditor.tsx
846
976
  const emptyObject = {};
847
- const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode = "application/json", placeholder: placeholder$1 = "", ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, allowBlankDocument = false, onBlur, searchQuery, searchMatchIndex, readOnly = false, inputLocked = false, autocompletions, completionSource, variables, extraKeys = emptyObject, withToggleCommentHint = false, withAutofocus = false, withLineNumbers = true, withLineWrapping = true, withCollapseUnchanged = false, withCopyButton = false, completeAny = false, help = null, helpPostfix = null, renderAdditionalButtons, className }) => {
977
+ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode = "application/json", placeholder: placeholder$1 = "", ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, allowBlankDocument = false, onBlur, searchQuery, searchMatchIndex, readOnly = false, inputLocked = false, autocompletions, completionSource, variables, withCompletions = true, extraKeys = emptyObject, withToggleCommentHint = false, withAutofocus = false, withLineNumbers = true, withLineWrapping = true, withCollapseUnchanged = false, withCopyButton = false, completeAny = false, help = null, helpPostfix = null, renderAdditionalButtons, className }) => {
848
978
  const handleChange = useStableCallback((next) => onChange?.(next));
849
979
  const handleBlur = useStableCallback(() => onBlur?.());
850
980
  const withSearch = searchQuery !== void 0;
@@ -887,10 +1017,10 @@ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode =
887
1017
  const customTheme = useThemedExtension("editor:syntax", buildCustomTheme);
888
1018
  const isArgo = useArgoDesign();
889
1019
  const isField = variant === "field";
890
- const baseTheme = useThemedExtension(isField ? `code-editor:field:${isArgo ? "argo" : "legacy"}` : "code-editor:chrome", () => EditorView.theme({
891
- ...buildBaseThemeStyles(),
892
- ...isField ? buildChromeStyles(buildInputChrome(isArgo)) : null
893
- }));
1020
+ const baseTheme = useThemedExtension(isField ? `code-editor:field:${isArgo ? "argo" : "legacy"}` : "code-editor:chrome", (scheme) => EditorView.theme({
1021
+ ...buildBaseThemeStyles(scheme),
1022
+ ...isField ? buildChromeStyles(buildInputChrome(isArgo, scheme)) : null
1023
+ }, { dark: scheme === "dark" }));
894
1024
  const commonExtensions = useMemo(() => {
895
1025
  const callerCompletions = completionSource ?? (completeAny ? completeAnyWord : autocompletions?.length ? autocompletions : null);
896
1026
  const completionEntries = [...callerCompletions ? [{ autocomplete: callerCompletions }] : [], { autocomplete: variableCompletion }];
@@ -906,7 +1036,7 @@ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode =
906
1036
  return true;
907
1037
  }
908
1038
  }))),
909
- readOnly ? [] : [autocompletion()],
1039
+ readOnly || !withCompletions ? [] : [autocompletion()],
910
1040
  contentAria ? EditorView.contentAttributes.of(contentAria) : [],
911
1041
  withBlur ? EditorView.domEventHandlers({ blur: handleBlur }) : [],
912
1042
  withSearch ? searchExtension() : [],
@@ -918,6 +1048,7 @@ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode =
918
1048
  completionSource,
919
1049
  variableCompletion,
920
1050
  completeAny,
1051
+ withCompletions,
921
1052
  boundKeys,
922
1053
  mode,
923
1054
  readOnly,
@@ -995,6 +1126,6 @@ const CodeEditor = ({ value, previousValue, onChange, variant = "plain", mode =
995
1126
  });
996
1127
  };
997
1128
  //#endregion
998
- export { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion };
1129
+ export { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, buildDiffWash, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion };
999
1130
 
1000
- //# sourceMappingURL=CodeEditor-DyaN-Ij2.js.map
1131
+ //# sourceMappingURL=CodeEditor-Cxy3HnKH.js.map