@keboola/design 11.9.0 → 12.0.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 (363) hide show
  1. package/AGENTS.md +34 -8
  2. package/CHANGELOG.md +155 -0
  3. package/COMPONENT-API.md +337 -289
  4. package/README.md +11 -1
  5. package/dist/{AIKit-ELIsegJz.js → AIKit-BD4r7ff-.js} +404 -243
  6. package/dist/AIKit-BD4r7ff-.js.map +1 -0
  7. package/dist/{Alert-BsIM_oFK.js → Alert-UI-CIs-1.js} +16 -16
  8. package/dist/Alert-UI-CIs-1.js.map +1 -0
  9. package/dist/{AlertModal-BGJdaRRj.js → AlertModal-Th2khjPi.js} +5 -5
  10. package/dist/AlertModal-Th2khjPi.js.map +1 -0
  11. package/dist/{AppShell-DRgJxpXW.js → AppShell-WSQabK8r.js} +15 -52
  12. package/dist/AppShell-WSQabK8r.js.map +1 -0
  13. package/dist/{AutoSaveTextarea-BeuWuszr.js → AutoSaveTextarea-C5iIr2Ts.js} +2 -2
  14. package/dist/{AutoSaveTextarea-BeuWuszr.js.map → AutoSaveTextarea-C5iIr2Ts.js.map} +1 -1
  15. package/dist/{Badge-o5jURtpB.js → Badge-DIjhwPvh.js} +4 -9
  16. package/dist/Badge-DIjhwPvh.js.map +1 -0
  17. package/dist/{BrandEditor-BsTBM3s6.js → BrandEditor-BU23Vl8V.js} +7 -7
  18. package/dist/{BrandEditor-BsTBM3s6.js.map → BrandEditor-BU23Vl8V.js.map} +1 -1
  19. package/dist/{BrandLogo-CoKBk4MI.js → BrandLogo-CKpVSZb6.js} +4 -4
  20. package/dist/BrandLogo-CKpVSZb6.js.map +1 -0
  21. package/dist/{Breadcrumb-xqEUxfwn.js → Breadcrumb-p9HtMLCc.js} +8 -14
  22. package/dist/Breadcrumb-p9HtMLCc.js.map +1 -0
  23. package/dist/{Button-DsRrU5F1.js → Button-Ca4Q3VJU.js} +31 -13
  24. package/dist/Button-Ca4Q3VJU.js.map +1 -0
  25. package/dist/{Calendar-cG5NIJ4O.js → Calendar-DFtmZzbF.js} +99 -99
  26. package/dist/Calendar-DFtmZzbF.js.map +1 -0
  27. package/dist/{Card-Dyo7055Q.js → Card-Cr9MBNHu.js} +4 -4
  28. package/dist/Card-Cr9MBNHu.js.map +1 -0
  29. package/dist/{Checkbox-Dq5fPNrO.js → Checkbox-8yIIgY7g.js} +4 -4
  30. package/dist/Checkbox-8yIIgY7g.js.map +1 -0
  31. package/dist/{Clipboard-BZitKiSA.js → Clipboard-_xf6hMDD.js} +2 -2
  32. package/dist/{Clipboard-BZitKiSA.js.map → Clipboard-_xf6hMDD.js.map} +1 -1
  33. package/dist/{ClipboardButton-KHQnPEh_.js → ClipboardButton-DHa1trtI.js} +4 -4
  34. package/dist/{ClipboardButton-KHQnPEh_.js.map → ClipboardButton-DHa1trtI.js.map} +1 -1
  35. package/dist/{CodeEditor-BJKJXA0c.js → CodeEditor-BSo-oLFG.js} +55 -165
  36. package/dist/CodeEditor-BSo-oLFG.js.map +1 -0
  37. package/dist/{ColorInput-Bj3dfPFA.js → ColorInput-DSMqrs2-.js} +12 -27
  38. package/dist/ColorInput-DSMqrs2-.js.map +1 -0
  39. package/dist/{ColorModeSwitch-CWt-DZGC.js → ColorModeSwitch-D7EuWyJz.js} +7 -17
  40. package/dist/ColorModeSwitch-D7EuWyJz.js.map +1 -0
  41. package/dist/Combobox-CxRAYOBt.js +1069 -0
  42. package/dist/Combobox-CxRAYOBt.js.map +1 -0
  43. package/dist/{Command-BDU3C1gg.js → Command-BU_cVurn.js} +4 -4
  44. package/dist/{Command-BDU3C1gg.js.map → Command-BU_cVurn.js.map} +1 -1
  45. package/dist/{CopyField-BHRQUyuF.js → CopyField-6_c-NdLO.js} +17 -53
  46. package/dist/{CopyField-BHRQUyuF.js.map → CopyField-6_c-NdLO.js.map} +1 -1
  47. package/dist/{DateInput-B6N8g0ra.js → DateInput-DyEErfJf.js} +6 -6
  48. package/dist/{DateInput-B6N8g0ra.js.map → DateInput-DyEErfJf.js.map} +1 -1
  49. package/dist/{DatePicker-nA8YdE84.js → DatePicker-CtSa9b3V.js} +3 -3
  50. package/dist/{DatePicker-nA8YdE84.js.map → DatePicker-CtSa9b3V.js.map} +1 -1
  51. package/dist/{DateRangeInput-7M9Z4cVO.js → DateRangeInput-Dg7-VUd9.js} +10 -14
  52. package/dist/DateRangeInput-Dg7-VUd9.js.map +1 -0
  53. package/dist/{DateRangePicker-DjSUFjh4.js → DateRangePicker-BoPnh4aH.js} +9 -13
  54. package/dist/DateRangePicker-BoPnh4aH.js.map +1 -0
  55. package/dist/DiffView-ppTIzh2h.js.map +1 -1
  56. package/dist/{DropdownMenu-CgVwhDvl.js → DropdownMenu-gRM-A8qU.js} +3 -3
  57. package/dist/DropdownMenu-gRM-A8qU.js.map +1 -0
  58. package/dist/{FieldItem-DZGIdiXE.js → FieldItem-2wMXQ0Qw.js} +12 -25
  59. package/dist/FieldItem-2wMXQ0Qw.js.map +1 -0
  60. package/dist/{FieldItem-vhIJW4pj.d.ts → FieldItem-CPN1xjN5.d.ts} +11 -25
  61. package/dist/{FileUpload-DYQCTGjU.js → FileUpload-C83tXuE2.js} +11 -16
  62. package/dist/{FileUpload-DYQCTGjU.js.map → FileUpload-C83tXuE2.js.map} +1 -1
  63. package/dist/{Form-CcK7dRrC.js → Form-95rVLfX8.js} +15 -23
  64. package/dist/{Form-CcK7dRrC.js.map → Form-95rVLfX8.js.map} +1 -1
  65. package/dist/{FormGroup-DR_gZ25-.js → FormGroup-CmNiAtU6.js} +11 -17
  66. package/dist/FormGroup-CmNiAtU6.js.map +1 -0
  67. package/dist/{FullScreenModal-CN9nAs72.js → FullScreenModal-CD7mYeTz.js} +15 -29
  68. package/dist/FullScreenModal-CD7mYeTz.js.map +1 -0
  69. package/dist/{HoverCard-B9ZMJxjn.js → HoverCard-B8OKu9XZ.js} +2 -2
  70. package/dist/{HoverCard-B9ZMJxjn.js.map → HoverCard-B8OKu9XZ.js.map} +1 -1
  71. package/dist/{InputGroup-Do8K2hvD.js → InputGroup-B4QOPxHl.js} +11 -13
  72. package/dist/InputGroup-B4QOPxHl.js.map +1 -0
  73. package/dist/{Kbd-LCFMumoq.js → Kbd-J4n1J6i4.js} +23 -13
  74. package/dist/Kbd-J4n1J6i4.js.map +1 -0
  75. package/dist/{MarkedText-DNGEUVWc.js → MarkedText-DlmlJO0u.js} +2 -2
  76. package/dist/{MarkedText-DNGEUVWc.js.map → MarkedText-DlmlJO0u.js.map} +1 -1
  77. package/dist/{MermaidDiagram-ZG0iiDV_.js → MermaidDiagram-BQvz6bhv.js} +16 -34
  78. package/dist/MermaidDiagram-BQvz6bhv.js.map +1 -0
  79. package/dist/{Modal-I3VWk2oo.js → Modal-Driyqs_N.js} +17 -34
  80. package/dist/Modal-Driyqs_N.js.map +1 -0
  81. package/dist/{ModalTitle-CeLM_mX9.js → ModalTitle-BxopkIoQ.js} +3 -3
  82. package/dist/ModalTitle-BxopkIoQ.js.map +1 -0
  83. package/dist/{MultiActionButtonGroup-CYZ8IgSf.js → MultiActionButtonGroup-BPnmzBtw.js} +3 -3
  84. package/dist/{MultiActionButtonGroup-CYZ8IgSf.js.map → MultiActionButtonGroup-BPnmzBtw.js.map} +1 -1
  85. package/dist/{Navbar-Liy1TPI7.js → Navbar-B_DNpv5s.js} +9 -13
  86. package/dist/{Navbar-Liy1TPI7.js.map → Navbar-B_DNpv5s.js.map} +1 -1
  87. package/dist/{OtpInput-CbbymqYs.js → OtpInput-I8B8Vjdl.js} +2 -2
  88. package/dist/{OtpInput-CbbymqYs.js.map → OtpInput-I8B8Vjdl.js.map} +1 -1
  89. package/dist/{PageHeader-Q3IpCnQd.js → PageHeader-CgfyXpf1.js} +13 -26
  90. package/dist/PageHeader-CgfyXpf1.js.map +1 -0
  91. package/dist/{PageLayout-DSVM-ASz.js → PageLayout-DiAAILuS.js} +12 -20
  92. package/dist/PageLayout-DiAAILuS.js.map +1 -0
  93. package/dist/{PageToolbar-BKVJiDAL.js → PageToolbar-DOAtAnfL.js} +12 -42
  94. package/dist/PageToolbar-DOAtAnfL.js.map +1 -0
  95. package/dist/{Pagination-C_b7Xhey.js → Pagination-LaSg-5cl.js} +3 -3
  96. package/dist/{Pagination-C_b7Xhey.js.map → Pagination-LaSg-5cl.js.map} +1 -1
  97. package/dist/{Popconfirm-5pBzT_HQ.js → Popconfirm-SLz0zodk.js} +3 -3
  98. package/dist/{Popconfirm-5pBzT_HQ.js.map → Popconfirm-SLz0zodk.js.map} +1 -1
  99. package/dist/{Popover-BEbQrC_P.js → Popover-CEk915I1.js} +4 -3
  100. package/dist/Popover-CEk915I1.js.map +1 -0
  101. package/dist/{RadioGroup-Byc2mym4.js → RadioGroup-CBPRLRN0.js} +4 -4
  102. package/dist/{RadioGroup-Byc2mym4.js.map → RadioGroup-CBPRLRN0.js.map} +1 -1
  103. package/dist/{Search-Dhig_hPD.js → Search-DmkQo716.js} +3 -3
  104. package/dist/{Search-Dhig_hPD.js.map → Search-DmkQo716.js.map} +1 -1
  105. package/dist/{SearchInput-92r2bkA7.js → SearchInput-CEfQDNl3.js} +8 -13
  106. package/dist/SearchInput-CEfQDNl3.js.map +1 -0
  107. package/dist/{SectionNav-CNLJsiVG.js → SectionNav-B_qf0AXi.js} +10 -42
  108. package/dist/SectionNav-B_qf0AXi.js.map +1 -0
  109. package/dist/{Select-DV3Hak_l.js → Select-ByRvkZ3D.js} +8 -11
  110. package/dist/{Select-DV3Hak_l.js.map → Select-ByRvkZ3D.js.map} +1 -1
  111. package/dist/{Sheet-OparjIi-.js → Sheet-C-yXk5Da.js} +5 -9
  112. package/dist/Sheet-C-yXk5Da.js.map +1 -0
  113. package/dist/{Sidebar-CLEbBtNY.js → Sidebar-Ds0E6PbR.js} +16 -33
  114. package/dist/Sidebar-Ds0E6PbR.js.map +1 -0
  115. package/dist/{Slider-DLclvRws.js → Slider-DWdu9NuM.js} +3 -3
  116. package/dist/{Slider-DLclvRws.js.map → Slider-DWdu9NuM.js.map} +1 -1
  117. package/dist/{Stepper-C8sm9ZFM.js → Stepper-BLkLhfnd.js} +6 -9
  118. package/dist/{Stepper-C8sm9ZFM.js.map → Stepper-BLkLhfnd.js.map} +1 -1
  119. package/dist/{Switch-B0WdGSjz.js → Switch-DZvNePOm.js} +2 -2
  120. package/dist/{Switch-B0WdGSjz.js.map → Switch-DZvNePOm.js.map} +1 -1
  121. package/dist/{Table-CvYuTuNU.js → Table-BaVT5Tkn.js} +6 -11
  122. package/dist/{Table-CvYuTuNU.js.map → Table-BaVT5Tkn.js.map} +1 -1
  123. package/dist/{Tabs-eB974xJf.js → Tabs-Dt9oLYHC.js} +3 -3
  124. package/dist/{Tabs-eB974xJf.js.map → Tabs-Dt9oLYHC.js.map} +1 -1
  125. package/dist/{TextInput-CFTf4Cz1.js → TextInput-CDG2XpBl.js} +10 -14
  126. package/dist/TextInput-CDG2XpBl.js.map +1 -0
  127. package/dist/{ThemeProvider-DAmNn9Sd.js → ThemeProvider-DXsxFg1U.js} +13 -31
  128. package/dist/ThemeProvider-DXsxFg1U.js.map +1 -0
  129. package/dist/{TimePicker-BGeqc-Ed.js → TimePicker-CDGYrRxi.js} +2 -2
  130. package/dist/{TimePicker-BGeqc-Ed.js.map → TimePicker-CDGYrRxi.js.map} +1 -1
  131. package/dist/{Timeline-C8-wnRRr.js → Timeline-B-I6sb0M.js} +2 -2
  132. package/dist/{Timeline-C8-wnRRr.js.map → Timeline-B-I6sb0M.js.map} +1 -1
  133. package/dist/{Toast-Dr6Uw7ao.js → Toast-PfQf3vj-.js} +2 -2
  134. package/dist/{Toast-Dr6Uw7ao.js.map → Toast-PfQf3vj-.js.map} +1 -1
  135. package/dist/{Workbench-UR2FBC7I.js → Workbench-DmZzpkj7.js} +2 -2
  136. package/dist/{Workbench-UR2FBC7I.js.map → Workbench-DmZzpkj7.js.map} +1 -1
  137. package/dist/{ZoomableSvg-BZlk3PFJ.js → ZoomableSvg-BzXVfgnI.js} +5 -19
  138. package/dist/ZoomableSvg-BzXVfgnI.js.map +1 -0
  139. package/dist/charts.d.ts +21 -52
  140. package/dist/charts.js +13 -39
  141. package/dist/charts.js.map +1 -1
  142. package/dist/{context-D7X470dy.js → context-U293r3v-.js} +5 -9
  143. package/dist/context-U293r3v-.js.map +1 -0
  144. package/dist/editors.d.ts +27 -124
  145. package/dist/editors.js +29 -71
  146. package/dist/editors.js.map +1 -1
  147. package/dist/{findLiteralMatches-BGBw8Vbl.js → findLiteralMatches-DgGLzyG0.js} +8 -20
  148. package/dist/findLiteralMatches-DgGLzyG0.js.map +1 -0
  149. package/dist/flint.d.ts +3 -6
  150. package/dist/flint.js +31 -80
  151. package/dist/flint.js.map +1 -1
  152. package/dist/{icons-Cek151jC.js → icons-wcA70iQx.js} +105 -2
  153. package/dist/icons-wcA70iQx.js.map +1 -0
  154. package/dist/icons.d.ts +2 -2
  155. package/dist/icons.js +2 -2
  156. package/dist/{index-m-kQEWiY.d.ts → index-B7k-09i1.d.ts} +14 -2
  157. package/dist/index.d.ts +1151 -1838
  158. package/dist/index.js +68 -67
  159. package/dist/internal/blocks/AIKit.js +2 -2
  160. package/dist/internal/blocks/AppShell.js +1 -1
  161. package/dist/internal/blocks/AuthLayout.js +7 -27
  162. package/dist/internal/blocks/AuthLayout.js.map +1 -1
  163. package/dist/internal/blocks/AutoSaveTextarea.js +1 -1
  164. package/dist/internal/blocks/BrandEditor.js +1 -1
  165. package/dist/internal/blocks/ChartPanel.js +4 -8
  166. package/dist/internal/blocks/ChartPanel.js.map +1 -1
  167. package/dist/internal/blocks/ChipEditor.js +13 -21
  168. package/dist/internal/blocks/ChipEditor.js.map +1 -1
  169. package/dist/internal/blocks/ClipboardButton.js +1 -1
  170. package/dist/internal/blocks/ColorInput.js +1 -1
  171. package/dist/internal/blocks/ColorModeSwitch.js +1 -1
  172. package/dist/internal/blocks/Command.js +1 -1
  173. package/dist/internal/blocks/CopyField.js +1 -1
  174. package/dist/internal/blocks/DashboardHero.js +4 -7
  175. package/dist/internal/blocks/DashboardHero.js.map +1 -1
  176. package/dist/internal/blocks/DateInput.js +1 -1
  177. package/dist/internal/blocks/DateRangeInput.js +1 -1
  178. package/dist/internal/blocks/EmptyConfigurationActionCard.js +1 -1
  179. package/dist/internal/blocks/EmptyState.js +5 -9
  180. package/dist/internal/blocks/EmptyState.js.map +1 -1
  181. package/dist/internal/blocks/ErrorState.js +5 -9
  182. package/dist/internal/blocks/ErrorState.js.map +1 -1
  183. package/dist/internal/blocks/ExportMenu.js +6 -10
  184. package/dist/internal/blocks/ExportMenu.js.map +1 -1
  185. package/dist/internal/blocks/Form/connectors/ComboboxField.js +40 -0
  186. package/dist/internal/blocks/Form/connectors/ComboboxField.js.map +1 -0
  187. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js +5 -22
  188. package/dist/internal/blocks/Form/connectors/MultiComboboxField.js.map +1 -1
  189. package/dist/internal/blocks/Form.js +1 -1
  190. package/dist/internal/blocks/FormGroup.js +1 -1
  191. package/dist/internal/blocks/GoogleButton.js +1 -1
  192. package/dist/internal/blocks/MicrosoftButton.js +1 -1
  193. package/dist/internal/blocks/MultiActionButtonGroup.js +1 -1
  194. package/dist/internal/blocks/MultiCombobox.js +161 -154
  195. package/dist/internal/blocks/MultiCombobox.js.map +1 -1
  196. package/dist/internal/blocks/NumberInput.js +1 -1
  197. package/dist/internal/blocks/OtpInput.js +1 -1
  198. package/dist/internal/blocks/PageHeader.js +1 -1
  199. package/dist/internal/blocks/PageLayout.js +1 -1
  200. package/dist/internal/blocks/PageToolbar.js +1 -1
  201. package/dist/internal/blocks/PasswordInput.js +4 -4
  202. package/dist/internal/blocks/PasswordInput.js.map +1 -1
  203. package/dist/internal/blocks/SearchInput.js +1 -1
  204. package/dist/internal/blocks/SearchInputWithNavigation.js +4 -4
  205. package/dist/internal/blocks/SectionNav.js +1 -1
  206. package/dist/internal/blocks/SplitButton.js +3 -3
  207. package/dist/internal/blocks/StatCard.js +4 -8
  208. package/dist/internal/blocks/StatCard.js.map +1 -1
  209. package/dist/internal/blocks/TextInput.js +1 -1
  210. package/dist/internal/blocks/Textarea.js +2 -2
  211. package/dist/internal/blocks/TimeInput.js +5 -5
  212. package/dist/internal/blocks/TimeInput.js.map +1 -1
  213. package/dist/internal/components/Alert.js +1 -1
  214. package/dist/internal/components/AlertModal.js +1 -1
  215. package/dist/internal/components/Avatar.js +1 -1
  216. package/dist/internal/components/Badge.js +1 -1
  217. package/dist/internal/components/BrandLogo.js +1 -1
  218. package/dist/internal/components/Breadcrumb.js +1 -1
  219. package/dist/internal/components/Button.js +1 -1
  220. package/dist/internal/components/ButtonGroup.js.map +1 -1
  221. package/dist/internal/components/Calendar.js +1 -1
  222. package/dist/internal/components/Card.js +1 -1
  223. package/dist/internal/components/Checkbox.js +1 -1
  224. package/dist/internal/components/Clipboard.js +1 -1
  225. package/dist/internal/components/CollapsiblePanel.js +2 -2
  226. package/dist/internal/components/Combobox.js +2 -2
  227. package/dist/internal/components/DatePicker.js +1 -1
  228. package/dist/internal/components/DateRangePicker.js +1 -1
  229. package/dist/internal/components/DropdownMenu.js +1 -1
  230. package/dist/internal/components/FileUpload.js +1 -1
  231. package/dist/internal/components/FullScreenModal.js +1 -1
  232. package/dist/internal/components/HoverCard.js +1 -1
  233. package/dist/internal/components/InputGroup.js +1 -1
  234. package/dist/internal/components/Kbd.js +1 -1
  235. package/dist/internal/components/MarkedText.js +1 -1
  236. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +1 -1
  237. package/dist/internal/components/Modal.js +1 -1
  238. package/dist/internal/components/Navbar.js +1 -1
  239. package/dist/internal/components/Pagination.js +1 -1
  240. package/dist/internal/components/PanelWithDetails.js +1 -1
  241. package/dist/internal/components/Popconfirm.js +1 -1
  242. package/dist/internal/components/Popover.js +1 -1
  243. package/dist/internal/components/RadioGroup.js +1 -1
  244. package/dist/internal/components/Search.js +1 -1
  245. package/dist/internal/components/Select.js +1 -1
  246. package/dist/internal/components/Separator.js.map +1 -1
  247. package/dist/internal/components/Sheet.js +1 -1
  248. package/dist/internal/components/Sidebar.js +1 -1
  249. package/dist/internal/components/Skeleton/Skeleton.js +5 -9
  250. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
  251. package/dist/internal/components/Slider.js +1 -1
  252. package/dist/internal/components/SpotlightBackdrop.js +3 -8
  253. package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
  254. package/dist/internal/components/StatusDot.js +8 -15
  255. package/dist/internal/components/StatusDot.js.map +1 -1
  256. package/dist/internal/components/Stepper.js +1 -1
  257. package/dist/internal/components/Switch.js +1 -1
  258. package/dist/internal/components/Table.js +1 -1
  259. package/dist/internal/components/Tabs.js +1 -1
  260. package/dist/internal/components/ThemeProvider.js +3 -3
  261. package/dist/internal/components/TimePicker.js +1 -1
  262. package/dist/internal/components/Timeline.js +1 -1
  263. package/dist/internal/components/Toast.js +2 -2
  264. package/dist/internal/components/Tooltip.js +1 -1
  265. package/dist/internal/components/Truncated.js +4 -8
  266. package/dist/internal/components/Truncated.js.map +1 -1
  267. package/dist/internal/components/Workbench.js +1 -1
  268. package/dist/internal/components/ZoomableSvg.js +1 -1
  269. package/dist/internal/hooks/useScrollbarPosition.js +1 -1
  270. package/dist/internal/hooks/useStableCallback.js +4 -13
  271. package/dist/internal/hooks/useStableCallback.js.map +1 -1
  272. package/dist/internal/utils.js +2 -2
  273. package/dist/markdown-editor.d.ts +15 -37
  274. package/dist/markdown-editor.js +17 -23
  275. package/dist/markdown-editor.js.map +1 -1
  276. package/dist/mermaid.d.ts +4 -6
  277. package/dist/mermaid.js +1 -1
  278. package/dist/rjsf.d.ts +9 -19
  279. package/dist/rjsf.js +44 -84
  280. package/dist/rjsf.js.map +1 -1
  281. package/dist/{styles-BAFscjSV.js → styles-gzcjOyKv.js} +6 -6
  282. package/dist/styles-gzcjOyKv.js.map +1 -0
  283. package/dist/styles.css +1 -1
  284. package/dist/svgTransforms-Dw2hRA-i.js +51 -0
  285. package/dist/svgTransforms-Dw2hRA-i.js.map +1 -0
  286. package/dist/testing.d.ts +3 -10
  287. package/dist/testing.js +5 -12
  288. package/dist/testing.js.map +1 -1
  289. package/dist/themeTokens-7DEab0kp.js +31 -0
  290. package/dist/themeTokens-7DEab0kp.js.map +1 -0
  291. package/dist/{toast-DIC0iNRf.js → toast-CyXEdaCZ.js} +3 -3
  292. package/dist/toast-CyXEdaCZ.js.map +1 -0
  293. package/dist/{themeScopeContext-D7fSyb06.js → useColorSchemeState-Cw4MCXUs.js} +14 -14
  294. package/dist/useColorSchemeState-Cw4MCXUs.js.map +1 -0
  295. package/dist/{useControllableState-M6494mCT.js → useControllableState-CUYXMsfz.js} +3 -7
  296. package/dist/useControllableState-CUYXMsfz.js.map +1 -0
  297. package/dist/useElement-D-RjrGa4.js +21 -0
  298. package/dist/useElement-D-RjrGa4.js.map +1 -0
  299. package/dist/useThemeAttributes-B199Regy.js +67 -0
  300. package/dist/useThemeAttributes-B199Regy.js.map +1 -0
  301. package/dist/{utils-BW4AE8VP.js → utils-Bd28bWgm.js} +31 -26
  302. package/dist/utils-Bd28bWgm.js.map +1 -0
  303. package/dist/vega.d.ts +8 -30
  304. package/dist/vega.js +5 -13
  305. package/dist/vega.js.map +1 -1
  306. package/dist/{vegaTheme-CSvFEMBl.js → vegaTheme-VQMWTlBw.js} +7 -21
  307. package/dist/vegaTheme-VQMWTlBw.js.map +1 -0
  308. package/package.json +10 -9
  309. package/src/styles.css +120 -14
  310. package/src/theme.css +126 -6
  311. package/dist/AIKit-ELIsegJz.js.map +0 -1
  312. package/dist/Alert-BsIM_oFK.js.map +0 -1
  313. package/dist/AlertModal-BGJdaRRj.js.map +0 -1
  314. package/dist/AppShell-DRgJxpXW.js.map +0 -1
  315. package/dist/Badge-o5jURtpB.js.map +0 -1
  316. package/dist/BrandLogo-CoKBk4MI.js.map +0 -1
  317. package/dist/Breadcrumb-xqEUxfwn.js.map +0 -1
  318. package/dist/Button-DsRrU5F1.js.map +0 -1
  319. package/dist/Calendar-cG5NIJ4O.js.map +0 -1
  320. package/dist/Card-Dyo7055Q.js.map +0 -1
  321. package/dist/Checkbox-Dq5fPNrO.js.map +0 -1
  322. package/dist/CodeEditor-BJKJXA0c.js.map +0 -1
  323. package/dist/ColorInput-Bj3dfPFA.js.map +0 -1
  324. package/dist/ColorModeSwitch-CWt-DZGC.js.map +0 -1
  325. package/dist/Combobox-D8PrEqTG.js +0 -619
  326. package/dist/Combobox-D8PrEqTG.js.map +0 -1
  327. package/dist/DateRangeInput-7M9Z4cVO.js.map +0 -1
  328. package/dist/DateRangePicker-DjSUFjh4.js.map +0 -1
  329. package/dist/DropdownMenu-CgVwhDvl.js.map +0 -1
  330. package/dist/FieldItem-DZGIdiXE.js.map +0 -1
  331. package/dist/FormGroup-DR_gZ25-.js.map +0 -1
  332. package/dist/FullScreenModal-CN9nAs72.js.map +0 -1
  333. package/dist/InputGroup-Do8K2hvD.js.map +0 -1
  334. package/dist/Kbd-LCFMumoq.js.map +0 -1
  335. package/dist/MermaidDiagram-ZG0iiDV_.js.map +0 -1
  336. package/dist/Modal-I3VWk2oo.js.map +0 -1
  337. package/dist/ModalTitle-CeLM_mX9.js.map +0 -1
  338. package/dist/PageHeader-Q3IpCnQd.js.map +0 -1
  339. package/dist/PageLayout-DSVM-ASz.js.map +0 -1
  340. package/dist/PageToolbar-BKVJiDAL.js.map +0 -1
  341. package/dist/Popover-BEbQrC_P.js.map +0 -1
  342. package/dist/SearchInput-92r2bkA7.js.map +0 -1
  343. package/dist/SectionNav-CNLJsiVG.js.map +0 -1
  344. package/dist/Sheet-OparjIi-.js.map +0 -1
  345. package/dist/Sidebar-CLEbBtNY.js.map +0 -1
  346. package/dist/TextInput-CFTf4Cz1.js.map +0 -1
  347. package/dist/ThemeProvider-DAmNn9Sd.js.map +0 -1
  348. package/dist/ZoomableSvg-BZlk3PFJ.js.map +0 -1
  349. package/dist/context-D7X470dy.js.map +0 -1
  350. package/dist/findLiteralMatches-BGBw8Vbl.js.map +0 -1
  351. package/dist/icons-Cek151jC.js.map +0 -1
  352. package/dist/styles-BAFscjSV.js.map +0 -1
  353. package/dist/svgTransforms-CJAYPk7o.js +0 -81
  354. package/dist/svgTransforms-CJAYPk7o.js.map +0 -1
  355. package/dist/themeScopeContext-D7fSyb06.js.map +0 -1
  356. package/dist/themeTokens-qP1-55O7.js +0 -119
  357. package/dist/themeTokens-qP1-55O7.js.map +0 -1
  358. package/dist/toast-DIC0iNRf.js.map +0 -1
  359. package/dist/useControllableState-M6494mCT.js.map +0 -1
  360. package/dist/useElement-BK3AAiIf.js +0 -24
  361. package/dist/useElement-BK3AAiIf.js.map +0 -1
  362. package/dist/utils-BW4AE8VP.js.map +0 -1
  363. package/dist/vegaTheme-CSvFEMBl.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-U293r3v-.js","names":[],"sources":["../src/components/ThemeProvider/context.tsx"],"sourcesContent":["import { createContext, use } from 'react';\n\nimport type { Brand } from '@keboola/brand-registry';\n\nimport { DEFAULT_COLOR_SCHEME, defaultBrand, defaultTheme } from './defaults';\nimport type { Theme } from './types';\nimport type { useBrandState } from './useBrandState';\nimport type { useColorSchemeState } from './useColorSchemeState';\n\nexport type ThemeContextValue = ReturnType<typeof useColorSchemeState> &\n ReturnType<typeof useBrandState> & {\n themes: Theme[];\n currentTheme: Theme;\n /** Raw brand tokens, so a nested `ThemeScope` can re-derive them for another scheme. */\n brandTheme: Brand['theme'];\n };\n\nconst noop = () => void 0;\n\nconst defaultContext: ThemeContextValue = {\n scheme: DEFAULT_COLOR_SCHEME,\n resolvedScheme: DEFAULT_COLOR_SCHEME,\n setScheme: noop,\n brandId: defaultTheme.id,\n setBrand: noop,\n\n themes: [defaultTheme],\n currentTheme: defaultTheme,\n brandTheme: defaultBrand.theme,\n};\n\nexport const ThemeContext = createContext(defaultContext);\n\nexport const useTheme = () => use(ThemeContext);\n\n/**\n * TEMPORARY, kbc-ui-internal: whether the subtree renders the argo design language.\n *\n * - kbc-ui provides `false` for legacy brands/surfaces (its `AppThemeProvider`).\n * - `ThemeProvider` never sets it — argo is independent of the brand.\n * - Delete it and `useArgoDesign` once kbc-ui's chrome is migrated.\n */\nexport const ArgoDesignContext = createContext<boolean>(true);\n\nexport const useArgoDesign = () => use(ArgoDesignContext);\n"],"mappings":";;;AAiBA,MAAM,aAAa,KAAK;AAExB,MAAM,iBAAoC;CACxC,QAAQ;CACR,gBAAgB;CAChB,WAAW;CACX,SAAS,aAAa;CACtB,UAAU;CAEV,QAAQ,CAAC,YAAY;CACrB,cAAc;CACd,YAAY,aAAa;AAC3B;AAEA,MAAa,eAAe,cAAc,cAAc;AAExD,MAAa,iBAAiB,IAAI,YAAY;;;;;;;;AAS9C,MAAa,oBAAoB,cAAuB,IAAI;AAE5D,MAAa,sBAAsB,IAAI,iBAAiB"}
package/dist/editors.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./types-BPcAjMG0.js";
2
- import { ChangeClassification, FieldItemProps, MergeConflict } from "./FieldItem-vhIJW4pj.js";
2
+ import { ChangeClassification, FieldItemProps, MergeConflict } from "./FieldItem-CPN1xjN5.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
4
  import { CompletionSource } from "@codemirror/autocomplete";
5
5
  import { EditorView } from "@codemirror/view";
@@ -24,99 +24,35 @@ type EditorVariable = {
24
24
  type Props$3 = {
25
25
  value: string;
26
26
  previousValue?: string;
27
- /**
28
- * `'field'` draws the chrome an `InputGroup` draws — surface, border, radius,
29
- * focus ring, read-only wash — for an editor that is one control among others
30
- * in a form. It sizes to its content, so don't pin its height.
31
- *
32
- * `'plain'` (the default) is the full-bleed surface of an editor that *is* the
33
- * panel: a modal body, a chat block, a fixed-height viewer already framed by
34
- * whatever contains it.
35
- */
27
+ /** `'field'`: `InputGroup` chrome, sized to content (don't pin height). `'plain'`: full-bleed panel. */
36
28
  variant?: 'plain' | 'field';
37
29
  mode?: LANGUAGE_MODE;
38
30
  placeholder?: string;
39
- /** Names the editable region for screen readers — the editor has no visible label of its own. */
31
+ /** Screen-reader name: the editor has no visible label of its own. */
40
32
  ariaLabel?: string;
41
- /**
42
- * Names the editable region from an existing element, for when the label is already on screen.
43
- * Prefer this over `ariaLabel` inside a form — `CodeEditorField` passes the field's own label id.
44
- */
33
+ /** Prefer over `ariaLabel` inside a form. */
45
34
  ariaLabelledBy?: string;
46
- /** Links the editable region to help / error text. Space-delimited idref list. */
47
35
  ariaDescribedBy?: string;
48
- /** Marks the editable region invalid. Visual error styling is the caller's (`variant="field"`). */
36
+ /** Visual error styling is the caller's (`variant="field"`). */
49
37
  ariaInvalid?: boolean;
50
38
  ariaRequired?: boolean;
51
- /**
52
- * Treats a blank document as valid instead of a parse error (JSON modes only).
53
- *
54
- * - Off by default: for a standalone editor "Unexpected end of input" is correct, and at several
55
- * call sites the gutter marker is the only thing explaining a Save button that
56
- * `isValidJsonConfig('') === false` has already disabled.
57
- * - `CodeEditorField` turns it on for a field that is not `required`, where an empty document is
58
- * how the value is removed.
59
- */
39
+ /** JSON modes: a blank document is not a parse error. Off by default: the mark explains a disabled Save. */
60
40
  allowBlankDocument?: boolean;
61
- /**
62
- * Fires when focus leaves the editable region — what a form connector needs to mark its field
63
- * blurred, which is the gate errors are revealed on.
64
- *
65
- * - Bound as a CodeMirror DOM handler on the content node, not on the wrapper: the wrapper is not
66
- * what gets focused.
67
- * - Installed only when passed, so an editor without it keeps the extension set it had.
68
- */
41
+ /** Bound on CodeMirror's content node (the wrapper is not what gets focused). */
69
42
  onBlur?: () => void;
70
- /**
71
- * Highlights every occurrence and scrolls the selected one into view. The find
72
- * UI is the caller's — pass the query it holds, and omit both props entirely to
73
- * leave the search extension uninstalled.
74
- */
43
+ /** Highlights matches; the find UI is the caller's. Omit both props to skip the search extension. */
75
44
  searchQuery?: string;
76
45
  searchMatchIndex?: number;
77
46
  readOnly?: boolean;
78
- /**
79
- * Refuses edits while leaving the editor looking and behaving as it did — for a
80
- * transient lock such as an in-flight save, where a keystroke landing mid-request
81
- * would be overwritten by the response. `readOnly` is the wrong prop for that:
82
- * it turns the editor into a viewer, greying the surface and taking the lint
83
- * marks and completions with it.
84
- */
47
+ /** Refuses edits without changing the look, e.g. during a save; `readOnly` makes a greyed viewer. */
85
48
  inputLocked?: boolean;
86
- /**
87
- * A flat list of completions, offered everywhere in the document. One word per
88
- * label: CodeMirror derives the pattern for the word being completed from the
89
- * labels' characters, so a space in one widens it across whitespace and the
90
- * editor offers nothing past the first word of a line. A phrase belongs in
91
- * `completionSource`.
92
- *
93
- * Compared by identity, like `completionSource` — hand the editor a stable array.
94
- */
49
+ /** One word per label (a space breaks matching; phrases go in `completionSource`). Pass a stable array. */
95
50
  autocompletions?: string[];
96
- /**
97
- * Completions that depend on where the cursor is — a column list offered only
98
- * after its table, say. Wins over both `autocompletions` and `completeAny`,
99
- * which stay the right props for a list that is the same everywhere in the
100
- * document and for having no list at all. Like them, it opens on typing.
101
- *
102
- * Compared by identity: build it in a `useMemo` or the editor rebuilds its whole
103
- * extension tree on every render.
104
- */
51
+ /** Cursor-dependent completions; wins over `autocompletions` / `completeAny`. Memoize it. */
105
52
  completionSource?: CompletionSource;
106
- /**
107
- * Configuration variables, completed into `{{name}}`. Independent of
108
- * `completionSource`: both are offered, so a caller keeps its own completions and
109
- * gets variables spelled the way the rest of the platform writes them.
110
- */
53
+ /** Completed into `{{name}}`, alongside `completionSource`. */
111
54
  variables?: EditorVariable[];
112
- /**
113
- * Whether the completion popup runs at all.
114
- *
115
- * - `false` silences every source, the *language's* own vocabulary included.
116
- * - For a field highlighted as a language nobody authors there: pasted `.env` and a
117
- * cURL command sit in shell mode for its colours, and shell's `ls`, `sudo`, `vim`
118
- * are noise over content we cannot predict.
119
- */
55
+ /** `false` silences every source, the language's own included (e.g. shell mode used only for colours). */
120
56
  withCompletions?: boolean;
121
57
  extraKeys?: Record<string, () => void>;
122
58
  withToggleCommentHint?: boolean;
@@ -128,11 +64,7 @@ type Props$3 = {
128
64
  completeAny?: boolean;
129
65
  help?: ReactNode;
130
66
  helpPostfix?: ReactNode;
131
- /**
132
- * Extra actions for the toolbar that floats over the editor's top-right corner,
133
- * beside the copy button. The toolbar is a 28px chip, so pass `size="icon-xs"`
134
- * buttons — a default-sized one grows the chip and de-aligns the copy button.
135
- */
67
+ /** Toolbar actions beside the copy button; pass `size="icon-xs"` buttons to fit the 28px chip. */
136
68
  renderAdditionalButtons?: (value?: string) => ReactNode;
137
69
  className?: string;
138
70
  } & ({
@@ -142,7 +74,7 @@ type Props$3 = {
142
74
  readOnly?: boolean;
143
75
  onChange: (value: string) => void;
144
76
  });
145
- declare const CodeEditor: ({ value, previousValue, onChange, variant, mode, placeholder, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, allowBlankDocument, onBlur, searchQuery, searchMatchIndex, readOnly, inputLocked, autocompletions, completionSource, variables, withCompletions, extraKeys, withToggleCommentHint, withAutofocus, withLineNumbers, withLineWrapping, withCollapseUnchanged, withCopyButton, completeAny, help, helpPostfix, renderAdditionalButtons, className }: Props$3) => import("react/jsx-runtime").JSX.Element;
77
+ declare const CodeEditor: ({ value, previousValue, onChange, variant, mode, placeholder, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, allowBlankDocument, onBlur, searchQuery, searchMatchIndex, readOnly, inputLocked, autocompletions, completionSource, variables, withCompletions, extraKeys, withToggleCommentHint, withAutofocus, withLineNumbers, withLineWrapping, withCollapseUnchanged, withCopyButton, completeAny, help, helpPostfix, renderAdditionalButtons, className }: Props$3) => import("react").JSX.Element;
146
78
  //#endregion
147
79
  //#region src/components/CodeEditor/highlighting.d.ts
148
80
  type HighlightedLines = {
@@ -175,19 +107,11 @@ type Props$2 = {
175
107
  autoFocus?: boolean;
176
108
  lineNumbers?: boolean;
177
109
  className?: string;
178
- /**
179
- * A schema is too large to compare by value, so this one prop keeps the
180
- * identity requirement every other prop here is now free of: hand the editor
181
- * a stable object, or it rebuilds its whole extension tree on every render.
182
- */
110
+ /** Compared by identity: pass a stable object or the extension tree rebuilds every render. */
183
111
  schema?: SQLNamespace;
184
112
  /**
185
- * Completions the caller knows and the schema does not — a table the code writes to
186
- * before it exists, say. Added to the schema, keyword and variable completions; unlike
187
- * `CodeEditor`'s prop of the same name, it replaces nothing.
188
- *
189
- * Compared by identity: build it in a `useMemo` or the editor rebuilds its whole
190
- * extension tree on every render.
113
+ * Added to schema/keyword/variable completions; unlike `CodeEditor`'s, replaces nothing.
114
+ * Compared by identity: `useMemo` it or the extension tree rebuilds every render.
191
115
  */
192
116
  completionSource?: CompletionSource;
193
117
  variables?: EditorVariable[];
@@ -196,7 +120,7 @@ type Props$2 = {
196
120
  highlightLines?: HighlightedLines;
197
121
  dialect?: SqlDialectName$1;
198
122
  };
199
- declare const SqlEditor: ({ value, onChange, onSelectionChange, onCreateEditor, onDestroyEditor, onBlurEditor, onFocusEditor, placeholder, searchQuery, searchMatchIndex, readOnly, queryParser, autoFocus, lineNumbers, className, schema, completionSource, variables, defaultDatabase, defaultSchema, highlightLines, dialect }: Props$2) => import("react/jsx-runtime").JSX.Element;
123
+ declare const SqlEditor: ({ value, onChange, onSelectionChange, onCreateEditor, onDestroyEditor, onBlurEditor, onFocusEditor, placeholder, searchQuery, searchMatchIndex, readOnly, queryParser, autoFocus, lineNumbers, className, schema, completionSource, variables, defaultDatabase, defaultSchema, highlightLines, dialect }: Props$2) => import("react").JSX.Element;
200
124
  //#endregion
201
125
  //#region src/components/MergeEditor/MergeEditor.d.ts
202
126
  type Props$1 = {
@@ -222,15 +146,11 @@ type Props$1 = {
222
146
  middleClassName?: string;
223
147
  rightHeader?: ReactNode;
224
148
  className?: string;
225
- /**
226
- * Paint the corresponding read-only pane with the error palette to signal the
227
- * side has been deleted upstream. The diff is still rendered so the user can
228
- * see what was lost; accept/dismiss controls for that side are suppressed.
229
- */
149
+ /** Side deleted upstream: its pane turns error-red, its accept/dismiss controls are hidden. */
230
150
  leftDeleted?: boolean;
231
151
  rightDeleted?: boolean;
232
152
  };
233
- declare const MergeEditor: ({ mergeValue, handleMergeChange, leftText, rightText, leftConflicts, rightConflicts, leftHighlightedLines, rightHighlightedLines, leftClassification, rightClassification, mergeHighlightedLines, mergeClassification, acceptLeft, acceptRight, dismissLeft, dismissRight, leftHeader, middleHeader, middleHeaderClassName, middleClassName, rightHeader, className, leftDeleted, rightDeleted }: Props$1) => import("react/jsx-runtime").JSX.Element;
153
+ declare const MergeEditor: ({ mergeValue, handleMergeChange, leftText, rightText, leftConflicts, rightConflicts, leftHighlightedLines, rightHighlightedLines, leftClassification, rightClassification, mergeHighlightedLines, mergeClassification, acceptLeft, acceptRight, dismissLeft, dismissRight, leftHeader, middleHeader, middleHeaderClassName, middleClassName, rightHeader, className, leftDeleted, rightDeleted }: Props$1) => import("react").JSX.Element;
234
154
  //#endregion
235
155
  //#region src/components/CodeEditor/CodeEditorField.d.ts
236
156
  type Props = FieldItemProps & Omit<ComponentProps<typeof CodeEditor>, 'value' | 'onChange' | 'onBlur' | 'ariaLabel' | 'ariaLabelledBy' | 'ariaDescribedBy' | 'ariaInvalid' | 'ariaRequired' | 'readOnly' | 'className' | 'allowBlankDocument'> & {
@@ -238,31 +158,14 @@ type Props = FieldItemProps & Omit<ComponentProps<typeof CodeEditor>, 'value' |
238
158
  editorClassName?: string;
239
159
  };
240
160
  /**
241
- * Code / JSON editor field. State is the raw editor text (`string`) — never a parsed value.
242
- *
243
- * ⚠️ Shipped from **`@keboola/design/editors`**, not as a `field.*` connector on `useAppForm`, and
244
- * deliberately: CodeMirror plus its language modes is ~170 kB brotlied, and registering this in the root
245
- * form hook pulled all of it into `@keboola/design`'s main entry — every consumer paying for an editor
246
- * most of them never render. That is the whole reason the `editors` subpath exists.
247
- *
248
- * It still reads the field from context, so it composes exactly like a connector:
249
- *
250
- * ```tsx
251
- * import { CodeEditorField } from '@keboola/design/editors';
252
- *
253
- * <form.AppField name="schema">{() => <CodeEditorField label="Schema" />}</form.AppField>
254
- * ```
255
- *
256
- * Text in, text out, deliberately: a JSON field is mid-edit invalid for most of the time the user is
257
- * typing in it, and parsing on every keystroke would either throw away their cursor position or throw
258
- * away the text. Parse in the schema (or at submit) and keep the editor's own content authoritative.
259
- *
260
- * `variant="field"` by default so it reads as a form control rather than a code block.
161
+ * Code / JSON editor field; state is the raw editor text, never a parsed value.
261
162
  *
262
- * Labelled with `aria-labelledby`, not `for`: CodeMirror's editable node is a `div[role="textbox"]`,
263
- * which is not a labelable element.
163
+ * - In `@keboola/design/editors`, not `useAppForm`: keeps CodeMirror (~170 kB) out of the main entry.
164
+ * - Reads the field from context, so use it inside `<form.AppField>` like a connector.
165
+ * - JSON is invalid mid-edit; parse in the schema or at submit.
166
+ * - Labelled via `aria-labelledby`: CodeMirror's `div[role="textbox"]` is not labelable.
264
167
  */
265
- declare const CodeEditorField: ({ label, action, required, requiredMark, help, tooltip, className, 'aria-describedby': ariaDescribedBy, editorClassName, variant, ...editorProps }: Props) => import("react/jsx-runtime").JSX.Element;
168
+ declare const CodeEditorField: ({ label, action, required, requiredMark, help, tooltip, className, 'aria-describedby': ariaDescribedBy, editorClassName, variant, ...editorProps }: Props) => import("react").JSX.Element;
266
169
  //#endregion
267
170
  export { CodeEditor, CodeEditorField, type EditorVariable, type LANGUAGE_MODE, LANGUAGE_MODES, MergeEditor, type SqlDialectName, SqlEditor, isLanguageMode };
268
171
  //# sourceMappingURL=editors.d.ts.map
package/dist/editors.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { cn } from "./classNames-BzrkDnOD.js";
2
- import { ChevronsLeft, ChevronsRight, X } from "./icons-Cek151jC.js";
3
- import { Button } from "./Button-DsRrU5F1.js";
2
+ import { ChevronsLeft, ChevronsRight, X } from "./icons-wcA70iQx.js";
3
+ import { Button } from "./Button-Ca4Q3VJU.js";
4
4
  import { useStableCallback } from "./internal/hooks/useStableCallback.js";
5
- import { FieldItem, useFieldContext } from "./FieldItem-DZGIdiXE.js";
5
+ import { FieldItem, useFieldContext } from "./FieldItem-2wMXQ0Qw.js";
6
6
  import { CHANGE_CLASS } from "./internal/components/MergeEditor/constants.js";
7
- import { resolveToken } from "./themeTokens-qP1-55O7.js";
8
- import { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, buildDiffWash, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion } from "./CodeEditor-BJKJXA0c.js";
7
+ import { resolveToken } from "./themeTokens-7DEab0kp.js";
8
+ import { CodeEditor, LANGUAGE_MODES, buildBaseThemeStyles, buildBasicSetup, buildCanvasChrome, buildChromeStyles, buildCustomTheme, buildDiffWash, isLanguageMode, searchExtension, updateSearch, useThemedExtension, useTooltipsExtension, useVariableCompletion } from "./CodeEditor-BSo-oLFG.js";
9
9
  import { useCallback, useEffect, useMemo, useRef } from "react";
10
10
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
11
  import { Decoration, EditorView, GutterMarker, ViewPlugin, gutter, gutterLineClass } from "@codemirror/view";
12
12
  import CodeMirror, { EditorView as EditorView$1, keymap as keymap$1 } from "@uiw/react-codemirror";
13
- import colors from "@keboola/tailwind-config/colors";
14
13
  import { installExtensions } from "@keboola/codemirror-lang-sql";
14
+ import colors from "@keboola/tailwind-config/colors";
15
15
  import { RangeSet, RangeSetBuilder, StateEffect, StateField } from "@codemirror/state";
16
16
  import { defaultKeymap } from "@codemirror/commands";
17
17
  //#region src/components/CodeEditor/activeQueryHighlight.ts
@@ -19,10 +19,7 @@ const activeQueryFirstLine = Decoration.line({ class: "cm-active-query cm-active
19
19
  const activeQueryMiddleLine = Decoration.line({ class: "cm-active-query" });
20
20
  const activeQueryLastLine = Decoration.line({ class: "cm-active-query cm-active-query-last" });
21
21
  const activeQuerySingleLine = Decoration.line({ class: "cm-active-query cm-active-query-first cm-active-query-last" });
22
- /**
23
- * Given pre-computed query boundaries and a cursor position, find which query
24
- * the cursor is in. Returns trimmed character offsets or null.
25
- */
22
+ /** Whitespace-trimmed offsets of the query holding the cursor, or null. */
26
23
  const findActiveQueryRange = (doc, cursorPos, boundaries) => {
27
24
  if (boundaries.length === 0) return null;
28
25
  let match = boundaries[boundaries.length - 1];
@@ -43,16 +40,20 @@ const findActiveQueryRange = (doc, cursorPos, boundaries) => {
43
40
  };
44
41
  };
45
42
  /**
46
- * Convert splitSqlQueries result (array of query strings that join back to the
47
- * original doc) into character-offset boundaries.
43
+ * Character-offset boundaries for the fragments a splitter reported for `doc`.
44
+ *
45
+ * - Bounded by `docLength`: an injected splitter is not trusted to re-join to `doc`.
46
+ * - A fragment past the end is cut there, or dropped if it starts past it.
47
+ * - Offsets past the document would throw in `Text.lineAt`.
48
48
  */
49
- const computeBoundaries = (queries) => {
49
+ const computeBoundaries = (queries, docLength) => {
50
50
  const boundaries = [];
51
51
  let offset = 0;
52
52
  for (const query of queries) {
53
+ if (offset >= docLength) break;
53
54
  boundaries.push({
54
55
  from: offset,
55
- to: offset + query.length
56
+ to: Math.min(offset + query.length, docLength)
56
57
  });
57
58
  offset += query.length;
58
59
  }
@@ -61,14 +62,9 @@ const computeBoundaries = (queries) => {
61
62
  /**
62
63
  * Synchronously map cached boundaries through a changeset.
63
64
  *
64
- * Boundaries can outlive the document state they were computed from (the async
65
- * re-parse in `scheduleDocParse` is debounced, so several edits may land
66
- * before new boundaries are produced). When that happens a cached position
67
- * can exceed the changeset's pre-change length and `ChangeSet.mapPos` throws
68
- * `RangeError: Position X is out of range for changeset of length Y`.
69
- *
70
- * Clamp positions into the valid `[0, changes.length]` range before mapping
71
- * and drop degenerate boundaries so the mapping is safe even with stale cache.
65
+ * - Clamped to `[0, changes.length]` first: the re-parse is debounced, so boundaries can be
66
+ * stale, and `ChangeSet.mapPos` throws a `RangeError` past the pre-change length.
67
+ * - Degenerate boundaries are dropped.
72
68
  */
73
69
  const mapBoundariesThroughChanges = (boundaries, changes) => {
74
70
  const prevLen = changes.length;
@@ -125,13 +121,7 @@ const activeQueryHighlight = (splitQueries) => {
125
121
  this.destroyed = true;
126
122
  if (this.debounceTimer) clearTimeout(this.debounceTimer);
127
123
  }
128
- /**
129
- * Update decorations using cached query boundaries.
130
- * Only mutates this.decorations — does NOT call view.dispatch().
131
- * When called from update() (sync), CodeMirror picks up the new
132
- * decorations via the accessor. When called from the async
133
- * scheduleDocParse callback, the caller must dispatch separately.
134
- */
124
+ /** Sets `this.decorations` without dispatching; an async caller must dispatch. */
135
125
  updateFromCache(view) {
136
126
  if (!view.hasFocus) {
137
127
  this.decorations = Decoration.none;
@@ -151,7 +141,6 @@ const activeQueryHighlight = (splitQueries) => {
151
141
  const range = findActiveQueryRange(doc, main.head, this.cachedBoundaries);
152
142
  this.decorations = range ? buildDecorations(view, range) : Decoration.none;
153
143
  }
154
- /** Parse queries async (debounced) and update decorations. */
155
144
  scheduleDocParse(view) {
156
145
  if (this.debounceTimer) clearTimeout(this.debounceTimer);
157
146
  this.debounceTimer = setTimeout(async () => {
@@ -174,7 +163,7 @@ const activeQueryHighlight = (splitQueries) => {
174
163
  }
175
164
  if (this.destroyed || seq !== this.seq) return;
176
165
  this.cachedDoc = doc;
177
- this.cachedBoundaries = computeBoundaries(queries);
166
+ this.cachedBoundaries = computeBoundaries(queries, doc.length);
178
167
  this.updateFromCache(view);
179
168
  if (!this.destroyed) view.dispatch();
180
169
  }, 100);
@@ -506,25 +495,11 @@ const createDiffHighlightExtension = () => StateField.define({
506
495
  provide: (f) => [EditorView.decorations.from(f, (val) => val.decorations), gutterLineClass.from(f, (val) => val.gutterMarkers)]
507
496
  });
508
497
  /**
509
- * The highlight palette, split out of the StateField above so it can be built
510
- * through `useThemedExtension` — the field instance must stay stable across a
511
- * scheme change (a fresh one would drop the current highlights), the colours
512
- * must not.
513
- *
514
- * `!important` overrides CodeMirror's built-in active-line and selection
515
- * backgrounds. SAFE = change present on one side only (green). CONFLICT = both
516
- * sides edited this region (amber/warning — NOT red, since red reads as
517
- * "deletion" and the 3-pane editor only ever displays additions in each side
518
- * pane). The colored left border doubles as a scan-lane so changes are easy to
519
- * spot when zoomed out.
498
+ * The highlight palette, for `useThemedExtension`; separate from the StateField, which must stay stable across schemes.
520
499
  *
521
- * Light mode paints an opaque pastel wash. Dark mode tints the same hue at low
522
- * alpha over the pane's token-driven surface instead — the pastel is opaque, so
523
- * it put the dark scheme's near-white line text and grey line numbers on a
524
- * light slab.
525
- *
526
- * A pure function of `scheme`, which `useThemedExtension` passes from the same
527
- * read that produced its cache key.
500
+ * - `!important` overrides CodeMirror's active-line and selection backgrounds.
501
+ * - SAFE (green): one side changed. CONFLICT (amber, not red — red reads as deletion): both did.
502
+ * - Dark mode tints at low alpha; an opaque pastel would put light text on a light slab.
528
503
  */
529
504
  const buildDiffHighlightTheme = (scheme) => {
530
505
  const dark = scheme === "dark";
@@ -766,29 +741,12 @@ const MergeEditor = ({ mergeValue, handleMergeChange, leftText, rightText, leftC
766
741
  //#endregion
767
742
  //#region src/components/CodeEditor/CodeEditorField.tsx
768
743
  /**
769
- * Code / JSON editor field. State is the raw editor text (`string`) — never a parsed value.
770
- *
771
- * ⚠️ Shipped from **`@keboola/design/editors`**, not as a `field.*` connector on `useAppForm`, and
772
- * deliberately: CodeMirror plus its language modes is ~170 kB brotlied, and registering this in the root
773
- * form hook pulled all of it into `@keboola/design`'s main entry — every consumer paying for an editor
774
- * most of them never render. That is the whole reason the `editors` subpath exists.
775
- *
776
- * It still reads the field from context, so it composes exactly like a connector:
777
- *
778
- * ```tsx
779
- * import { CodeEditorField } from '@keboola/design/editors';
780
- *
781
- * <form.AppField name="schema">{() => <CodeEditorField label="Schema" />}</form.AppField>
782
- * ```
783
- *
784
- * Text in, text out, deliberately: a JSON field is mid-edit invalid for most of the time the user is
785
- * typing in it, and parsing on every keystroke would either throw away their cursor position or throw
786
- * away the text. Parse in the schema (or at submit) and keep the editor's own content authoritative.
787
- *
788
- * `variant="field"` by default so it reads as a form control rather than a code block.
744
+ * Code / JSON editor field; state is the raw editor text, never a parsed value.
789
745
  *
790
- * Labelled with `aria-labelledby`, not `for`: CodeMirror's editable node is a `div[role="textbox"]`,
791
- * which is not a labelable element.
746
+ * - In `@keboola/design/editors`, not `useAppForm`: keeps CodeMirror (~170 kB) out of the main entry.
747
+ * - Reads the field from context, so use it inside `<form.AppField>` like a connector.
748
+ * - JSON is invalid mid-edit; parse in the schema or at submit.
749
+ * - Labelled via `aria-labelledby`: CodeMirror's `div[role="textbox"]` is not labelable.
792
750
  */
793
751
  const CodeEditorField = ({ label, action, required, requiredMark, help, tooltip, className, "aria-describedby": ariaDescribedBy, editorClassName, variant = "field", ...editorProps }) => {
794
752
  const field = useFieldContext();