@keboola/design 11.9.0 → 13.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 (367) hide show
  1. package/AGENTS.md +45 -14
  2. package/CHANGELOG.md +246 -0
  3. package/COMPONENT-API.md +352 -294
  4. package/README.md +11 -1
  5. package/dist/{AIKit-ELIsegJz.js → AIKit-DcOlHIBr.js} +420 -247
  6. package/dist/AIKit-DcOlHIBr.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-mbSnuuka.js} +8 -8
  10. package/dist/AlertModal-mbSnuuka.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-Bkd6dhb8.js} +7 -7
  18. package/dist/{BrandEditor-BsTBM3s6.js.map → BrandEditor-Bkd6dhb8.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-BUoAZyhO.js} +8 -14
  22. package/dist/Breadcrumb-BUoAZyhO.js.map +1 -0
  23. package/dist/{Button-DsRrU5F1.js → Button-B21oVcPU.js} +31 -14
  24. package/dist/Button-B21oVcPU.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-BQmBWHXl.js} +35 -7
  28. package/dist/Card-BQmBWHXl.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-srUgWgwH.js} +4 -4
  34. package/dist/{ClipboardButton-KHQnPEh_.js.map → ClipboardButton-srUgWgwH.js.map} +1 -1
  35. package/dist/{CodeEditor-BJKJXA0c.js → CodeEditor-jZMw1ioj.js} +55 -165
  36. package/dist/CodeEditor-jZMw1ioj.js.map +1 -0
  37. package/dist/{ColorInput-Bj3dfPFA.js → ColorInput-B3gBZ8Ya.js} +12 -27
  38. package/dist/ColorInput-B3gBZ8Ya.js.map +1 -0
  39. package/dist/{ColorModeSwitch-CWt-DZGC.js → ColorModeSwitch-Bw9wMyoL.js} +7 -17
  40. package/dist/ColorModeSwitch-Bw9wMyoL.js.map +1 -0
  41. package/dist/Combobox-C_MTpQ1l.js +1081 -0
  42. package/dist/Combobox-C_MTpQ1l.js.map +1 -0
  43. package/dist/{Command-BDU3C1gg.js → Command-BQPiZCNz.js} +4 -4
  44. package/dist/{Command-BDU3C1gg.js.map → Command-BQPiZCNz.js.map} +1 -1
  45. package/dist/{CopyField-BHRQUyuF.js → CopyField-Ba7h8MqZ.js} +19 -55
  46. package/dist/{CopyField-BHRQUyuF.js.map → CopyField-Ba7h8MqZ.js.map} +1 -1
  47. package/dist/{DateInput-B6N8g0ra.js → DateInput-D0nWUasV.js} +6 -6
  48. package/dist/{DateInput-B6N8g0ra.js.map → DateInput-D0nWUasV.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-i6wE45-V.js} +10 -14
  52. package/dist/DateRangeInput-i6wE45-V.js.map +1 -0
  53. package/dist/{DateRangePicker-DjSUFjh4.js → DateRangePicker-BAnuz6vO.js} +9 -13
  54. package/dist/DateRangePicker-BAnuz6vO.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-BHViBJS3.js} +12 -25
  59. package/dist/FieldItem-BHViBJS3.js.map +1 -0
  60. package/dist/{FieldItem-vhIJW4pj.d.ts → FieldItem-CPN1xjN5.d.ts} +11 -25
  61. package/dist/{FileUpload-DYQCTGjU.js → FileUpload-Ch2hrIWq.js} +11 -16
  62. package/dist/{FileUpload-DYQCTGjU.js.map → FileUpload-Ch2hrIWq.js.map} +1 -1
  63. package/dist/{Form-CcK7dRrC.js → Form-VkzfVPyT.js} +15 -23
  64. package/dist/{Form-CcK7dRrC.js.map → Form-VkzfVPyT.js.map} +1 -1
  65. package/dist/{FormGroup-DR_gZ25-.js → FormGroup-CmCppxOn.js} +11 -17
  66. package/dist/FormGroup-CmCppxOn.js.map +1 -0
  67. package/dist/{FullScreenModal-CN9nAs72.js → FullScreenModal-Cwnm8WdM.js} +15 -29
  68. package/dist/FullScreenModal-Cwnm8WdM.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-CrlMRz4X.js} +11 -13
  72. package/dist/InputGroup-CrlMRz4X.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-B30x2yV7.js} +16 -34
  78. package/dist/MermaidDiagram-B30x2yV7.js.map +1 -0
  79. package/dist/{Modal-I3VWk2oo.js → Modal-BkSuS9Yz.js} +17 -34
  80. package/dist/Modal-BkSuS9Yz.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-AWLj1Tg7.js} +3 -3
  84. package/dist/{MultiActionButtonGroup-CYZ8IgSf.js.map → MultiActionButtonGroup-AWLj1Tg7.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-CIW0VmKe.js} +12 -42
  94. package/dist/PageToolbar-CIW0VmKe.js.map +1 -0
  95. package/dist/{Pagination-C_b7Xhey.js → Pagination-DH3f6LN0.js} +3 -3
  96. package/dist/{Pagination-C_b7Xhey.js.map → Pagination-DH3f6LN0.js.map} +1 -1
  97. package/dist/{Popconfirm-5pBzT_HQ.js → Popconfirm-Dhzn7sy6.js} +3 -3
  98. package/dist/{Popconfirm-5pBzT_HQ.js.map → Popconfirm-Dhzn7sy6.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-D3qMkHaW.js} +8 -13
  106. package/dist/SearchInput-D3qMkHaW.js.map +1 -0
  107. package/dist/{SectionNav-CNLJsiVG.js → SectionNav-TU5i3JeM.js} +10 -42
  108. package/dist/SectionNav-TU5i3JeM.js.map +1 -0
  109. package/dist/{Select-DV3Hak_l.js → Select-B4uK0QVm.js} +10 -12
  110. package/dist/Select-B4uK0QVm.js.map +1 -0
  111. package/dist/{Sheet-OparjIi-.js → Sheet-D0fAE14T.js} +5 -9
  112. package/dist/Sheet-D0fAE14T.js.map +1 -0
  113. package/dist/{Sidebar-CLEbBtNY.js → Sidebar-ZLMNIbg5.js} +16 -33
  114. package/dist/Sidebar-ZLMNIbg5.js.map +1 -0
  115. package/dist/{Slider-DLclvRws.js → Slider-B0ou9r0B.js} +3 -3
  116. package/dist/{Slider-DLclvRws.js.map → Slider-B0ou9r0B.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-CTDmye1N.js} +3 -3
  124. package/dist/{Tabs-eB974xJf.js.map → Tabs-CTDmye1N.js.map} +1 -1
  125. package/dist/{TextInput-CFTf4Cz1.js → TextInput-BWYXbfs4.js} +10 -14
  126. package/dist/TextInput-BWYXbfs4.js.map +1 -0
  127. package/dist/{ThemeProvider-DAmNn9Sd.js → ThemeProvider-VF38VfUa.js} +13 -31
  128. package/dist/ThemeProvider-VF38VfUa.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-C65nta_r.js} +5 -19
  138. package/dist/ZoomableSvg-C65nta_r.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 +1180 -1867
  158. package/dist/index.js +69 -68
  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 +160 -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 +3 -3
  226. package/dist/internal/components/CollapsiblePanel.js.map +1 -1
  227. package/dist/internal/components/Combobox.js +2 -2
  228. package/dist/internal/components/DatePicker.js +1 -1
  229. package/dist/internal/components/DateRangePicker.js +1 -1
  230. package/dist/internal/components/DropdownMenu.js +1 -1
  231. package/dist/internal/components/FileUpload.js +1 -1
  232. package/dist/internal/components/FullScreenModal.js +1 -1
  233. package/dist/internal/components/HoverCard.js +1 -1
  234. package/dist/internal/components/InputGroup.js +1 -1
  235. package/dist/internal/components/Kbd.js +1 -1
  236. package/dist/internal/components/MarkedText.js +1 -1
  237. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +1 -1
  238. package/dist/internal/components/Modal.js +1 -1
  239. package/dist/internal/components/Navbar.js +1 -1
  240. package/dist/internal/components/Pagination.js +1 -1
  241. package/dist/internal/components/PanelWithDetails.js +1 -1
  242. package/dist/internal/components/Popconfirm.js +1 -1
  243. package/dist/internal/components/Popover.js +1 -1
  244. package/dist/internal/components/RadioGroup.js +1 -1
  245. package/dist/internal/components/Search.js +1 -1
  246. package/dist/internal/components/Select.js +1 -1
  247. package/dist/internal/components/Separator.js.map +1 -1
  248. package/dist/internal/components/Sheet.js +1 -1
  249. package/dist/internal/components/Sidebar.js +1 -1
  250. package/dist/internal/components/Skeleton/Skeleton.js +5 -9
  251. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -1
  252. package/dist/internal/components/Slider.js +1 -1
  253. package/dist/internal/components/SpotlightBackdrop.js +3 -8
  254. package/dist/internal/components/SpotlightBackdrop.js.map +1 -1
  255. package/dist/internal/components/Stepper.js +1 -1
  256. package/dist/internal/components/Switch.js +1 -1
  257. package/dist/internal/components/Table.js +1 -1
  258. package/dist/internal/components/Tabs.js +1 -1
  259. package/dist/internal/components/ThemeProvider.js +3 -3
  260. package/dist/internal/components/TimePicker.js +1 -1
  261. package/dist/internal/components/Timeline.js +1 -1
  262. package/dist/internal/components/Toast.js +2 -2
  263. package/dist/internal/components/Tooltip.js +1 -1
  264. package/dist/internal/components/Truncated.js +4 -8
  265. package/dist/internal/components/Truncated.js.map +1 -1
  266. package/dist/internal/components/Workbench.js +1 -1
  267. package/dist/internal/components/ZoomableSvg.js +1 -1
  268. package/dist/internal/hooks/useScrollbarPosition.js +1 -1
  269. package/dist/internal/hooks/useStableCallback.js +4 -13
  270. package/dist/internal/hooks/useStableCallback.js.map +1 -1
  271. package/dist/internal/utils/accessibleName.js +11 -0
  272. package/dist/internal/utils/accessibleName.js.map +1 -0
  273. package/dist/internal/utils.js +2 -2
  274. package/dist/markdown-editor.d.ts +15 -37
  275. package/dist/markdown-editor.js +17 -23
  276. package/dist/markdown-editor.js.map +1 -1
  277. package/dist/mermaid.d.ts +4 -6
  278. package/dist/mermaid.js +1 -1
  279. package/dist/rjsf.d.ts +9 -19
  280. package/dist/rjsf.js +44 -84
  281. package/dist/rjsf.js.map +1 -1
  282. package/dist/{styles-BAFscjSV.js → styles-gzcjOyKv.js} +6 -6
  283. package/dist/styles-gzcjOyKv.js.map +1 -0
  284. package/dist/styles.css +1 -1
  285. package/dist/svgTransforms-Dw2hRA-i.js +51 -0
  286. package/dist/svgTransforms-Dw2hRA-i.js.map +1 -0
  287. package/dist/testing.d.ts +3 -10
  288. package/dist/testing.js +7 -15
  289. package/dist/testing.js.map +1 -1
  290. package/dist/themeTokens-7DEab0kp.js +31 -0
  291. package/dist/themeTokens-7DEab0kp.js.map +1 -0
  292. package/dist/{toast-DIC0iNRf.js → toast-CyXEdaCZ.js} +3 -3
  293. package/dist/toast-CyXEdaCZ.js.map +1 -0
  294. package/dist/{themeScopeContext-D7fSyb06.js → useColorSchemeState-Cw4MCXUs.js} +14 -14
  295. package/dist/useColorSchemeState-Cw4MCXUs.js.map +1 -0
  296. package/dist/{useControllableState-M6494mCT.js → useControllableState-CUYXMsfz.js} +3 -7
  297. package/dist/useControllableState-CUYXMsfz.js.map +1 -0
  298. package/dist/useElement-D-RjrGa4.js +21 -0
  299. package/dist/useElement-D-RjrGa4.js.map +1 -0
  300. package/dist/useThemeAttributes-B199Regy.js +67 -0
  301. package/dist/useThemeAttributes-B199Regy.js.map +1 -0
  302. package/dist/{utils-BW4AE8VP.js → utils-Bd28bWgm.js} +31 -26
  303. package/dist/utils-Bd28bWgm.js.map +1 -0
  304. package/dist/vega.d.ts +8 -30
  305. package/dist/vega.js +5 -13
  306. package/dist/vega.js.map +1 -1
  307. package/dist/{vegaTheme-CSvFEMBl.js → vegaTheme-VQMWTlBw.js} +7 -21
  308. package/dist/vegaTheme-VQMWTlBw.js.map +1 -0
  309. package/package.json +28 -27
  310. package/src/styles.css +120 -14
  311. package/src/theme.css +130 -5
  312. package/dist/AIKit-ELIsegJz.js.map +0 -1
  313. package/dist/Alert-BsIM_oFK.js.map +0 -1
  314. package/dist/AlertModal-BGJdaRRj.js.map +0 -1
  315. package/dist/AppShell-DRgJxpXW.js.map +0 -1
  316. package/dist/Badge-o5jURtpB.js.map +0 -1
  317. package/dist/BrandLogo-CoKBk4MI.js.map +0 -1
  318. package/dist/Breadcrumb-xqEUxfwn.js.map +0 -1
  319. package/dist/Button-DsRrU5F1.js.map +0 -1
  320. package/dist/Calendar-cG5NIJ4O.js.map +0 -1
  321. package/dist/Card-Dyo7055Q.js.map +0 -1
  322. package/dist/Checkbox-Dq5fPNrO.js.map +0 -1
  323. package/dist/CodeEditor-BJKJXA0c.js.map +0 -1
  324. package/dist/ColorInput-Bj3dfPFA.js.map +0 -1
  325. package/dist/ColorModeSwitch-CWt-DZGC.js.map +0 -1
  326. package/dist/Combobox-D8PrEqTG.js +0 -619
  327. package/dist/Combobox-D8PrEqTG.js.map +0 -1
  328. package/dist/DateRangeInput-7M9Z4cVO.js.map +0 -1
  329. package/dist/DateRangePicker-DjSUFjh4.js.map +0 -1
  330. package/dist/DropdownMenu-CgVwhDvl.js.map +0 -1
  331. package/dist/FieldItem-DZGIdiXE.js.map +0 -1
  332. package/dist/FormGroup-DR_gZ25-.js.map +0 -1
  333. package/dist/FullScreenModal-CN9nAs72.js.map +0 -1
  334. package/dist/InputGroup-Do8K2hvD.js.map +0 -1
  335. package/dist/Kbd-LCFMumoq.js.map +0 -1
  336. package/dist/MermaidDiagram-ZG0iiDV_.js.map +0 -1
  337. package/dist/Modal-I3VWk2oo.js.map +0 -1
  338. package/dist/ModalTitle-CeLM_mX9.js.map +0 -1
  339. package/dist/PageHeader-Q3IpCnQd.js.map +0 -1
  340. package/dist/PageLayout-DSVM-ASz.js.map +0 -1
  341. package/dist/PageToolbar-BKVJiDAL.js.map +0 -1
  342. package/dist/Popover-BEbQrC_P.js.map +0 -1
  343. package/dist/SearchInput-92r2bkA7.js.map +0 -1
  344. package/dist/SectionNav-CNLJsiVG.js.map +0 -1
  345. package/dist/Select-DV3Hak_l.js.map +0 -1
  346. package/dist/Sheet-OparjIi-.js.map +0 -1
  347. package/dist/Sidebar-CLEbBtNY.js.map +0 -1
  348. package/dist/TextInput-CFTf4Cz1.js.map +0 -1
  349. package/dist/ThemeProvider-DAmNn9Sd.js.map +0 -1
  350. package/dist/ZoomableSvg-BZlk3PFJ.js.map +0 -1
  351. package/dist/context-D7X470dy.js.map +0 -1
  352. package/dist/findLiteralMatches-BGBw8Vbl.js.map +0 -1
  353. package/dist/icons-Cek151jC.js.map +0 -1
  354. package/dist/internal/components/StatusDot.js +0 -67
  355. package/dist/internal/components/StatusDot.js.map +0 -1
  356. package/dist/styles-BAFscjSV.js.map +0 -1
  357. package/dist/svgTransforms-CJAYPk7o.js +0 -81
  358. package/dist/svgTransforms-CJAYPk7o.js.map +0 -1
  359. package/dist/themeScopeContext-D7fSyb06.js.map +0 -1
  360. package/dist/themeTokens-qP1-55O7.js +0 -119
  361. package/dist/themeTokens-qP1-55O7.js.map +0 -1
  362. package/dist/toast-DIC0iNRf.js.map +0 -1
  363. package/dist/useControllableState-M6494mCT.js.map +0 -1
  364. package/dist/useElement-BK3AAiIf.js +0 -24
  365. package/dist/useElement-BK3AAiIf.js.map +0 -1
  366. package/dist/utils-BW4AE8VP.js.map +0 -1
  367. package/dist/vegaTheme-CSvFEMBl.js.map +0 -1
@@ -1,67 +0,0 @@
1
- import { cn } from "../../classNames-BzrkDnOD.js";
2
- import { cva } from "class-variance-authority";
3
- import { jsx } from "react/jsx-runtime";
4
- //#region src/components/StatusDot/StatusDot.tsx
5
- /**
6
- * The dot's fill.
7
- *
8
- * - One class per state, each a brand-overridable status token — never a primitive hue.
9
- * - `neutral` is chrome, not a status: an entity that has no state yet, or one the caller cannot
10
- * resolve.
11
- * - A solid fill is the whole mark, so the "tint + legible foreground" rule for status _surfaces_
12
- * does not apply — there is no foreground on top of it.
13
- */
14
- const statusDotVariants = cva([
15
- "tw:inline-block",
16
- "tw:shrink-0",
17
- "tw:rounded-full"
18
- ], {
19
- defaultVariants: {
20
- status: "neutral",
21
- size: "default"
22
- },
23
- variants: {
24
- status: {
25
- success: ["tw:bg-success"],
26
- warning: ["tw:bg-warning"],
27
- info: ["tw:bg-info"],
28
- destructive: ["tw:bg-destructive"],
29
- neutral: ["tw:bg-muted-foreground"]
30
- },
31
- size: {
32
- default: ["tw:size-1.5"],
33
- large: ["tw:size-2"]
34
- }
35
- }
36
- });
37
- /**
38
- * A small round state mark — the one way the platform paints status as a colour.
39
- *
40
- * **When to use:** an entity's state beside its name in a row, a header or a chip — running,
41
- * failed, stale, idle. `status` is the whole colour API, so a customer brand recolours every dot
42
- * on the platform at once.
43
- * **When NOT to use:** as the only carrier of meaning where colour is the sole difference between
44
- * two rows — pair it with text, or use `Badge` (a labelled pill) / `Alert` (a contextual message).
45
- * For an in-flight *step* use `Stepper`, and for indeterminate background work `DotsLoader`.
46
- * **Composition:** `tw:flex tw:items-center tw:gap-2` with the label next to it. An overlay dot on
47
- * top of an icon needs a ring in the surface's own colour (`tw:ring-2 tw:ring-card`) — pass it in
48
- * `className` at the call site, since only the call site knows what it overlaps.
49
- */
50
- const StatusDot = ({ ref, status, size, pulse = false, label, className, ...rest }) => /* @__PURE__ */ jsx("span", {
51
- ...rest,
52
- ref,
53
- "data-slot": "status-dot",
54
- "data-status": status ?? "neutral",
55
- ...label == null ? { "aria-hidden": true } : {
56
- role: "img",
57
- "aria-label": label
58
- },
59
- className: cn(statusDotVariants({
60
- status,
61
- size
62
- }), pulse && "tw:animate-pulse", className)
63
- });
64
- //#endregion
65
- export { StatusDot, statusDotVariants };
66
-
67
- //# sourceMappingURL=StatusDot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatusDot.js","names":[],"sources":["../../../src/components/StatusDot/StatusDot.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../utils';\n\n/**\n * The dot's fill.\n *\n * - One class per state, each a brand-overridable status token — never a primitive hue.\n * - `neutral` is chrome, not a status: an entity that has no state yet, or one the caller cannot\n * resolve.\n * - A solid fill is the whole mark, so the \"tint + legible foreground\" rule for status _surfaces_\n * does not apply — there is no foreground on top of it.\n */\nexport const statusDotVariants = cva(['tw:inline-block', 'tw:shrink-0', 'tw:rounded-full'], {\n defaultVariants: {\n status: 'neutral',\n size: 'default',\n },\n variants: {\n status: {\n success: ['tw:bg-success'],\n warning: ['tw:bg-warning'],\n info: ['tw:bg-info'],\n destructive: ['tw:bg-destructive'],\n neutral: ['tw:bg-muted-foreground'],\n },\n size: {\n default: ['tw:size-1.5'],\n large: ['tw:size-2'],\n },\n },\n});\n\ntype Props = Omit<ComponentProps<'span'>, 'children'> &\n VariantProps<typeof statusDotVariants> & {\n /** Animates the dot. Reserve it for work that is still running. */\n pulse?: boolean;\n /**\n * What the dot says on its own.\n *\n * - Omitted, the dot is decorative (`aria-hidden`) — the right choice whenever a visible label\n * sits beside it, which would otherwise be announced twice.\n * - Given, the dot becomes an image with that name: the only state a screen reader gets.\n */\n label?: string;\n };\n\n/**\n * A small round state mark — the one way the platform paints status as a colour.\n *\n * **When to use:** an entity's state beside its name in a row, a header or a chip — running,\n * failed, stale, idle. `status` is the whole colour API, so a customer brand recolours every dot\n * on the platform at once.\n * **When NOT to use:** as the only carrier of meaning where colour is the sole difference between\n * two rows — pair it with text, or use `Badge` (a labelled pill) / `Alert` (a contextual message).\n * For an in-flight *step* use `Stepper`, and for indeterminate background work `DotsLoader`.\n * **Composition:** `tw:flex tw:items-center tw:gap-2` with the label next to it. An overlay dot on\n * top of an icon needs a ring in the surface's own colour (`tw:ring-2 tw:ring-card`) — pass it in\n * `className` at the call site, since only the call site knows what it overlaps.\n */\nexport const StatusDot = ({\n ref,\n status,\n size,\n pulse = false,\n label,\n className,\n ...rest\n}: Props) => (\n <span\n {...rest}\n ref={ref}\n data-slot=\"status-dot\"\n data-status={status ?? 'neutral'}\n {...(label == null ? { 'aria-hidden': true } : { role: 'img', 'aria-label': label })}\n className={cn(statusDotVariants({ status, size }), pulse && 'tw:animate-pulse', className)}\n />\n);\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAa,oBAAoB,IAAI;CAAC;CAAmB;CAAe;AAAiB,GAAG;CAC1F,iBAAiB;EACf,QAAQ;EACR,MAAM;CACR;CACA,UAAU;EACR,QAAQ;GACN,SAAS,CAAC,eAAe;GACzB,SAAS,CAAC,eAAe;GACzB,MAAM,CAAC,YAAY;GACnB,aAAa,CAAC,mBAAmB;GACjC,SAAS,CAAC,wBAAwB;EACpC;EACA,MAAM;GACJ,SAAS,CAAC,aAAa;GACvB,OAAO,CAAC,WAAW;EACrB;CACF;AACF,CAAC;;;;;;;;;;;;;;AA6BD,MAAa,aAAa,EACxB,KACA,QACA,MACA,QAAQ,OACR,OACA,WACA,GAAG,WAEH,oBAAC,QAAD;CACE,GAAI;CACC;CACL,aAAU;CACV,eAAa,UAAU;CACvB,GAAK,SAAS,OAAO,EAAE,eAAe,KAAK,IAAI;EAAE,MAAM;EAAO,cAAc;CAAM;CAClF,WAAW,GAAG,kBAAkB;EAAE;EAAQ;CAAK,CAAC,GAAG,SAAS,oBAAoB,SAAS;AAC1F,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles-BAFscjSV.js","names":[],"sources":["../src/components/OverlayTrigger/styles.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/**\n * Chrome for a control that looks like an input but opens an overlay on click. Shared by\n * `SelectTrigger` and `DateRangePicker`'s trigger so both sit at the same height and colour when\n * they stand next to each other in a filter row.\n */\nexport const overlayTriggerVariants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:group',\n 'tw:box-border',\n\n // layout\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-between',\n 'tw:gap-2',\n 'tw:w-full',\n 'tw:text-left',\n\n // base appearance\n 'tw:rounded',\n 'tw:border',\n 'tw:border-solid',\n // Ink for `secondary`, whose fixed light-grey fill a scheme-following colour would\n // sit on invisibly. `primary` and `argo` both re-pin it to `foreground`.\n 'tw:text-neutral-800',\n // Scoped transition (no `outline`) — prevents the UA focus-outline color\n // from interpolating through its dark default during state changes.\n 'tw:transition-[color,background-color,border-color,box-shadow]',\n\n // focus base — ring width here, color comes from state variant\n 'tw:!outline-hidden',\n 'tw:focus:ring-4',\n 'tw:data-[state=open]:ring-4',\n\n // disabled\n 'tw:disabled:cursor-not-allowed',\n 'tw:aria-disabled:cursor-not-allowed',\n\n // placeholder (Radix sets data-placeholder on the trigger when no value)\n 'tw:data-[placeholder]:text-muted-foreground',\n\n // child svg defaults\n 'tw:[&_svg]:shrink-0',\n 'tw:[&_svg]:pointer-events-none',\n ],\n {\n defaultVariants: {\n variant: 'primary',\n state: 'default',\n sizing: 'medium',\n },\n compoundVariants: [\n {\n variant: 'secondary',\n state: 'error',\n className: ['tw:bg-error-100'],\n },\n {\n variant: 'secondary',\n state: 'warning',\n className: ['tw:bg-warning-100'],\n },\n // --- argo ---\n {\n variant: 'argo',\n state: 'default',\n className: [\n 'tw:focus:border-primary',\n 'tw:focus:ring-ring/50',\n 'tw:data-[state=open]:border-primary',\n 'tw:data-[state=open]:ring-ring/50',\n ],\n },\n {\n variant: 'argo',\n state: 'error',\n className: [\n 'tw:border-destructive',\n 'tw:focus:border-destructive',\n 'tw:focus:ring-destructive/20',\n 'tw:data-[state=open]:border-destructive',\n 'tw:data-[state=open]:ring-destructive/20',\n ],\n },\n ],\n variants: {\n variant: {\n primary: [\n // The same field trio the `primary` `InputGroup` beside it uses, so a trigger and\n // an input in one row stay the same colour.\n //\n // - `--input-background` resolves to white in light; the fill only moves in dark.\n // - The `neutral` ramp is scheme-blind — `[data-theme='dark']` redefines only the\n // semantic tokens — so a literal here paints light chrome on a dark surface.\n 'tw:bg-input-background',\n 'tw:text-foreground',\n 'tw:border-input',\n 'tw:disabled:opacity-40',\n 'tw:aria-disabled:opacity-40',\n // aria-invalid on the trigger surfaces the error chrome without a `state` prop — the\n // accessible path (mirrors the `state=\"error\"` legacy tokens). The extra attribute\n // selector outranks the default focus/open state, so it wins without `!important`.\n 'tw:aria-[invalid=true]:border-error-500',\n 'tw:aria-[invalid=true]:focus:border-error-500',\n 'tw:aria-[invalid=true]:focus:ring-error-200',\n 'tw:aria-[invalid=true]:data-[state=open]:border-error-500',\n 'tw:aria-[invalid=true]:data-[state=open]:ring-error-200',\n ],\n secondary: [\n 'tw:bg-neutral-100',\n 'tw:border-neutral-100',\n 'tw:disabled:opacity-40',\n 'tw:aria-disabled:opacity-40',\n 'tw:aria-[invalid=true]:border-error-500',\n 'tw:aria-[invalid=true]:focus:border-error-500',\n 'tw:aria-[invalid=true]:focus:ring-error-200',\n 'tw:aria-[invalid=true]:data-[state=open]:border-error-500',\n 'tw:aria-[invalid=true]:data-[state=open]:ring-error-200',\n ],\n argo: [\n // muted filled input surface — gray, distinct from white containers; not the app-background token\n 'tw:bg-muted',\n 'tw:border-input',\n // token-driven radius so the trigger tracks --radius-lg like sibling inputs (InputGroup/Combobox/Button)\n 'tw:rounded-[var(--radius-lg,0.25rem)]',\n 'tw:text-foreground',\n 'tw:disabled:opacity-50',\n 'tw:aria-disabled:opacity-50',\n // aria-invalid on the trigger surfaces the error chrome without a `state` prop — the\n // accessible path (uses the themeable `destructive` status token).\n 'tw:aria-[invalid=true]:border-destructive',\n 'tw:aria-[invalid=true]:focus:border-destructive',\n 'tw:aria-[invalid=true]:focus:ring-destructive/20',\n 'tw:aria-[invalid=true]:data-[state=open]:border-destructive',\n 'tw:aria-[invalid=true]:data-[state=open]:ring-destructive/20',\n ],\n },\n sizing: {\n // border-inclusive heights: 40 / 36 / 32 px (small matches Button small)\n default: ['tw:px-4', 'tw:py-2.5', 'tw:text-sm/[18px]', 'tw:h-10', 'tw:min-h-10'],\n medium: ['tw:px-4', 'tw:py-2', 'tw:text-sm/[18px]', 'tw:h-9', 'tw:min-h-9'],\n small: ['tw:px-4', 'tw:py-2', 'tw:text-sm/[16px]', 'tw:h-8', 'tw:min-h-8'],\n },\n state: {\n default: [\n 'tw:focus:border-ring',\n 'tw:focus:ring-ring/30',\n 'tw:data-[state=open]:border-ring',\n 'tw:data-[state=open]:ring-ring/30',\n ],\n error: [\n 'tw:border-error-500',\n 'tw:focus:border-error-500',\n 'tw:focus:ring-error-200',\n 'tw:data-[state=open]:border-error-500',\n 'tw:data-[state=open]:ring-error-200',\n ],\n warning: [\n 'tw:border-warning-500',\n 'tw:focus:border-warning-500',\n 'tw:focus:ring-warning-200',\n 'tw:data-[state=open]:border-warning-500',\n 'tw:data-[state=open]:ring-warning-200',\n ],\n },\n },\n },\n);\n"],"mappings":";;;;;;;AAOA,MAAa,yBAAyB,IACpC;CACE;CACA;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CAGA;CACA;CACA;CAGA;CAGA;CAGA;CACA;CACA;CAGA;CACA;CAGA;CAGA;CACA;AACF,GACA;CACE,iBAAiB;EACf,SAAS;EACT,OAAO;EACP,QAAQ;CACV;CACA,kBAAkB;EAChB;GACE,SAAS;GACT,OAAO;GACP,WAAW,CAAC,iBAAiB;EAC/B;EACA;GACE,SAAS;GACT,OAAO;GACP,WAAW,CAAC,mBAAmB;EACjC;EAEA;GACE,SAAS;GACT,OAAO;GACP,WAAW;IACT;IACA;IACA;IACA;GACF;EACF;EACA;GACE,SAAS;GACT,OAAO;GACP,WAAW;IACT;IACA;IACA;IACA;IACA;GACF;EACF;CACF;CACA,UAAU;EACR,SAAS;GACP,SAAS;IAOP;IACA;IACA;IACA;IACA;IAIA;IACA;IACA;IACA;IACA;GACF;GACA,WAAW;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,MAAM;IAEJ;IACA;IAEA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;GACF;EACF;EACA,QAAQ;GAEN,SAAS;IAAC;IAAW;IAAa;IAAqB;IAAW;GAAa;GAC/E,QAAQ;IAAC;IAAW;IAAW;IAAqB;IAAU;GAAY;GAC1E,OAAO;IAAC;IAAW;IAAW;IAAqB;IAAU;GAAY;EAC3E;EACA,OAAO;GACL,SAAS;IACP;IACA;IACA;IACA;GACF;GACA,OAAO;IACL;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IACP;IACA;IACA;IACA;IACA;GACF;EACF;CACF;AACF,CACF"}
@@ -1,81 +0,0 @@
1
- //#region src/blocks/DiagramShared/svgTransforms.ts
2
- const HTML_TAG = /<[^>]+>/g;
3
- const FOREIGN_OBJECT = /(<foreignObject\b[^>]*>)([\s\S]*?)(<\/foreignObject>)/g;
4
- const ROOT_SVG_TAG = /^(\s*<svg\b)([^>]*)(>)/i;
5
- /**
6
- * Mermaid renders node labels — including icon-shape (`@{ icon: … }`) labels — as
7
- * HTML (`<div><span><p>…</p></span></div>`) inside an SVG `<foreignObject>`. The
8
- * ZoomableSvg DOMPurify pass runs the SVG namespace profile, which strips every
9
- * XHTML-namespaced element under an `<svg>` root, so those wrapped labels vanish
10
- * (icon rendered, text gone). DOMPurify keeps *bare text* directly inside a
11
- * `<foreignObject>`, so collapse each label's HTML to its text content. Mermaid
12
- * has already sanitized that text under `securityLevel: 'strict'`, and dropping
13
- * the wrapper tags is strictly safer than keeping them.
14
- *
15
- * Entities are left encoded (`&amp;`, `&lt;`, …): as text-node content inside the
16
- * `<foreignObject>` the browser renders them correctly, and decoding them here
17
- * would risk turning `&lt;`/`&gt;` back into real angle brackets that could form
18
- * markup in the sanitized SVG.
19
- */
20
- const flattenForeignObjectLabels = (svg) => svg.replace(FOREIGN_OBJECT, (_match, open, inner, close) => {
21
- return `${open}${inner.replace(HTML_TAG, " ").replace(/\s+/g, " ").trim()}${close}`;
22
- });
23
- /**
24
- * Make the diagram fluid: strip the root `<svg>`'s fixed width/height/style and
25
- * set `width="100%"` plus a `max-width` from the viewBox width so it never
26
- * overflows its container.
27
- *
28
- * Only the ROOT `<svg>` tag is rewritten (anchored to string start). Icon-shape
29
- * nodes embed their own inner `<svg>` icons with fixed width/height; an earlier
30
- * unanchored regex matched the first `<svg …height…>` anywhere, so when the root
31
- * tag carried no height (mermaid emits `width="100%"` alone) it stripped the
32
- * FIRST icon's height instead — detaching and mis-sizing that icon.
33
- *
34
- * The existing `style` attribute is preserved (only an existing `max-width` is
35
- * replaced): beautiful-mermaid carries theme CSS vars (`--bg`, `--fg`) there that
36
- * its inner `<style>` block derives node/text colors from — dropping the whole
37
- * attribute made every derived color resolve to black.
38
- */
39
- const STYLE_ATTR = /\s+style="([^"]*)"/i;
40
- const makeResponsive = (svgString) => {
41
- const viewBoxMatch = svgString.match(/viewBox="[^"]*\s([\d.]+)\s[\d.]+"/);
42
- const vbWidth = viewBoxMatch ? Math.round(Number(viewBoxMatch[1])) : void 0;
43
- return svgString.replace(ROOT_SVG_TAG, (_match, open, attrs, close) => {
44
- const styleDecls = (attrs.match(STYLE_ATTR)?.[1] ?? "").replace(/max-width:\s*[^;"]*;?\s*/gi, "").replace(/\s+/g, " ").trim().replace(/;$/, "");
45
- let nextAttrs = attrs.replace(/\s+width="[^"]*"/i, "").replace(/\s+height="[^"]*"/i, "").replace(STYLE_ATTR, "");
46
- nextAttrs += " width=\"100%\"";
47
- const styleParts = [styleDecls, vbWidth ? `max-width: ${vbWidth}px` : ""].filter(Boolean).join("; ");
48
- if (styleParts) nextAttrs += ` style="${styleParts}"`;
49
- return `${open}${nextAttrs}${close}`;
50
- });
51
- };
52
- /**
53
- * Whether an SVG has drawn content, i.e. a non-degenerate viewBox.
54
- *
55
- * - beautiful-mermaid does not throw on every syntax it cannot lay out: an
56
- * `erDiagram` entity whose quoted name contains a space (`"sample (Copy)"`)
57
- * returns a well-formed SVG with `viewBox="0 0 0 0"` and an empty `<defs>`.
58
- * - Such output is truthy, so it would be cached and rendered as an empty box,
59
- * and the async mermaid renderer — which parses the same code fine — would
60
- * never run.
61
- * - A missing viewBox counts as drawn: mermaid's own output is sized via
62
- * width/height attributes on some diagram types.
63
- * - Only the ROOT `<svg>` is inspected. Icon-shape nodes embed their own inner
64
- * `<svg>` / `<symbol>`, so an unanchored search reads a nested viewBox when the
65
- * root carries none — discarding a diagram that had in fact been drawn. Same
66
- * trap `makeResponsive` documents above.
67
- * - Either quote style is accepted, and whitespace around the `=`. Both current
68
- * renderers emit `viewBox="…"` exactly, so this is future-proofing rather than a
69
- * live case: a miss reads as "no viewBox", i.e. drawn, silently restoring the
70
- * empty-diagram bug.
71
- */
72
- const ROOT_VIEWBOX = /^\s*<svg\b[^>]*\sviewBox\s*=\s*(["'])\s*[\d.eE+-]+\s+[\d.eE+-]+\s+([\d.eE+-]+)\s+([\d.eE+-]+)\s*\1/i;
73
- const hasDrawnContent = (svg) => {
74
- const viewBox = svg.match(ROOT_VIEWBOX);
75
- if (!viewBox) return true;
76
- return Number(viewBox[2]) > 0 && Number(viewBox[3]) > 0;
77
- };
78
- //#endregion
79
- export { flattenForeignObjectLabels, hasDrawnContent, makeResponsive };
80
-
81
- //# sourceMappingURL=svgTransforms-CJAYPk7o.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"svgTransforms-CJAYPk7o.js","names":[],"sources":["../src/blocks/DiagramShared/svgTransforms.ts"],"sourcesContent":["// Pure post-processing of diagram SVG output (mermaid, vega), before it reaches\n// ZoomableSvg's DOMPurify pass. Extracted for unit testing.\n\nconst HTML_TAG = /<[^>]+>/g;\nconst FOREIGN_OBJECT = /(<foreignObject\\b[^>]*>)([\\s\\S]*?)(<\\/foreignObject>)/g;\n// The root <svg> open tag, anchored to the start of the string.\nconst ROOT_SVG_TAG = /^(\\s*<svg\\b)([^>]*)(>)/i;\n\n/**\n * Mermaid renders node labels — including icon-shape (`@{ icon: … }`) labels — as\n * HTML (`<div><span><p>…</p></span></div>`) inside an SVG `<foreignObject>`. The\n * ZoomableSvg DOMPurify pass runs the SVG namespace profile, which strips every\n * XHTML-namespaced element under an `<svg>` root, so those wrapped labels vanish\n * (icon rendered, text gone). DOMPurify keeps *bare text* directly inside a\n * `<foreignObject>`, so collapse each label's HTML to its text content. Mermaid\n * has already sanitized that text under `securityLevel: 'strict'`, and dropping\n * the wrapper tags is strictly safer than keeping them.\n *\n * Entities are left encoded (`&amp;`, `&lt;`, …): as text-node content inside the\n * `<foreignObject>` the browser renders them correctly, and decoding them here\n * would risk turning `&lt;`/`&gt;` back into real angle brackets that could form\n * markup in the sanitized SVG.\n */\nexport const flattenForeignObjectLabels = (svg: string): string =>\n svg.replace(FOREIGN_OBJECT, (_match, open: string, inner: string, close: string) => {\n const text = inner.replace(HTML_TAG, ' ').replace(/\\s+/g, ' ').trim();\n return `${open}${text}${close}`;\n });\n\n/**\n * Make the diagram fluid: strip the root `<svg>`'s fixed width/height/style and\n * set `width=\"100%\"` plus a `max-width` from the viewBox width so it never\n * overflows its container.\n *\n * Only the ROOT `<svg>` tag is rewritten (anchored to string start). Icon-shape\n * nodes embed their own inner `<svg>` icons with fixed width/height; an earlier\n * unanchored regex matched the first `<svg …height…>` anywhere, so when the root\n * tag carried no height (mermaid emits `width=\"100%\"` alone) it stripped the\n * FIRST icon's height instead — detaching and mis-sizing that icon.\n *\n * The existing `style` attribute is preserved (only an existing `max-width` is\n * replaced): beautiful-mermaid carries theme CSS vars (`--bg`, `--fg`) there that\n * its inner `<style>` block derives node/text colors from — dropping the whole\n * attribute made every derived color resolve to black.\n */\nconst STYLE_ATTR = /\\s+style=\"([^\"]*)\"/i;\n\nexport const makeResponsive = (svgString: string): string => {\n const viewBoxMatch = svgString.match(/viewBox=\"[^\"]*\\s([\\d.]+)\\s[\\d.]+\"/);\n const vbWidth = viewBoxMatch ? Math.round(Number(viewBoxMatch[1])) : undefined;\n\n return svgString.replace(ROOT_SVG_TAG, (_match, open: string, attrs: string, close: string) => {\n const existingStyle = attrs.match(STYLE_ATTR)?.[1] ?? '';\n const styleDecls = existingStyle\n .replace(/max-width:\\s*[^;\"]*;?\\s*/gi, '')\n .replace(/\\s+/g, ' ')\n .trim()\n .replace(/;$/, '');\n\n let nextAttrs = attrs\n .replace(/\\s+width=\"[^\"]*\"/i, '')\n .replace(/\\s+height=\"[^\"]*\"/i, '')\n .replace(STYLE_ATTR, '');\n\n nextAttrs += ' width=\"100%\"';\n\n const styleParts = [styleDecls, vbWidth ? `max-width: ${vbWidth}px` : '']\n .filter(Boolean)\n .join('; ');\n if (styleParts) nextAttrs += ` style=\"${styleParts}\"`;\n\n return `${open}${nextAttrs}${close}`;\n });\n};\n\n/**\n * Whether an SVG has drawn content, i.e. a non-degenerate viewBox.\n *\n * - beautiful-mermaid does not throw on every syntax it cannot lay out: an\n * `erDiagram` entity whose quoted name contains a space (`\"sample (Copy)\"`)\n * returns a well-formed SVG with `viewBox=\"0 0 0 0\"` and an empty `<defs>`.\n * - Such output is truthy, so it would be cached and rendered as an empty box,\n * and the async mermaid renderer — which parses the same code fine — would\n * never run.\n * - A missing viewBox counts as drawn: mermaid's own output is sized via\n * width/height attributes on some diagram types.\n * - Only the ROOT `<svg>` is inspected. Icon-shape nodes embed their own inner\n * `<svg>` / `<symbol>`, so an unanchored search reads a nested viewBox when the\n * root carries none — discarding a diagram that had in fact been drawn. Same\n * trap `makeResponsive` documents above.\n * - Either quote style is accepted, and whitespace around the `=`. Both current\n * renderers emit `viewBox=\"…\"` exactly, so this is future-proofing rather than a\n * live case: a miss reads as \"no viewBox\", i.e. drawn, silently restoring the\n * empty-diagram bug.\n */\nconst ROOT_VIEWBOX =\n /^\\s*<svg\\b[^>]*\\sviewBox\\s*=\\s*([\"'])\\s*[\\d.eE+-]+\\s+[\\d.eE+-]+\\s+([\\d.eE+-]+)\\s+([\\d.eE+-]+)\\s*\\1/i;\n\nexport const hasDrawnContent = (svg: string): boolean => {\n const viewBox = svg.match(ROOT_VIEWBOX);\n if (!viewBox) return true;\n return Number(viewBox[2]) > 0 && Number(viewBox[3]) > 0;\n};\n"],"mappings":";AAGA,MAAM,WAAW;AACjB,MAAM,iBAAiB;AAEvB,MAAM,eAAe;;;;;;;;;;;;;;;;AAiBrB,MAAa,8BAA8B,QACzC,IAAI,QAAQ,iBAAiB,QAAQ,MAAc,OAAe,UAAkB;CAElF,OAAO,GAAG,OADG,MAAM,QAAQ,UAAU,GAAG,CAAC,CAAC,QAAQ,QAAQ,GAAG,CAAC,CAAC,KAC3C,IAAI;AAC1B,CAAC;;;;;;;;;;;;;;;;;AAkBH,MAAM,aAAa;AAEnB,MAAa,kBAAkB,cAA8B;CAC3D,MAAM,eAAe,UAAU,MAAM,mCAAmC;CACxE,MAAM,UAAU,eAAe,KAAK,MAAM,OAAO,aAAa,EAAE,CAAC,IAAI,KAAA;CAErE,OAAO,UAAU,QAAQ,eAAe,QAAQ,MAAc,OAAe,UAAkB;EAE7F,MAAM,cADgB,MAAM,MAAM,UAAU,CAAC,GAAG,MAAM,GAAA,CAEnD,QAAQ,8BAA8B,EAAE,CAAC,CACzC,QAAQ,QAAQ,GAAG,CAAC,CACpB,KAAK,CAAC,CACN,QAAQ,MAAM,EAAE;EAEnB,IAAI,YAAY,MACb,QAAQ,qBAAqB,EAAE,CAAC,CAChC,QAAQ,sBAAsB,EAAE,CAAC,CACjC,QAAQ,YAAY,EAAE;EAEzB,aAAa;EAEb,MAAM,aAAa,CAAC,YAAY,UAAU,cAAc,QAAQ,MAAM,EAAE,CAAC,CACtE,OAAO,OAAO,CAAC,CACf,KAAK,IAAI;EACZ,IAAI,YAAY,aAAa,WAAW,WAAW;EAEnD,OAAO,GAAG,OAAO,YAAY;CAC/B,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,eACJ;AAEF,MAAa,mBAAmB,QAAyB;CACvD,MAAM,UAAU,IAAI,MAAM,YAAY;CACtC,IAAI,CAAC,SAAS,OAAO;CACrB,OAAO,OAAO,QAAQ,EAAE,IAAI,KAAK,OAAO,QAAQ,EAAE,IAAI;AACxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"themeScopeContext-D7fSyb06.js","names":[],"sources":["../src/components/ThemeProvider/useBrandState.ts","../src/components/ThemeProvider/useColorSchemeState.ts","../src/components/ThemeProvider/themeScopeContext.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { DEFAULT_BRAND_ID } from './defaults';\nimport type { BrandId } from './types';\n\nexport const BRAND_ATTRIBUTE = 'data-brand';\n\nexport type UseBrandOptions = {\n /** Initial active brand id for uncontrolled use. Defaults to the design-system sentinel (`DEFAULT_BRAND_ID`) — no brand tokens injected, so the stylesheet defaults apply. */\n defaultBrandId?: BrandId;\n /** Controlled active brand id. When set, the parent owns the value and `setBrand` only notifies via `onBrandIdChange` (it does not mutate internal state). */\n brandId?: BrandId;\n /** Called with the next id whenever `setBrand` runs — required to persist the choice in controlled mode. */\n onBrandIdChange?: (brandId: BrandId) => void;\n};\n\nexport const useBrandState = ({\n defaultBrandId: defaultBrand = DEFAULT_BRAND_ID,\n brandId: controlledBrand,\n onBrandIdChange: onBrandChange,\n}: UseBrandOptions = {}) => {\n const [uncontrolledBrand, setUncontrolledBrand] = useState(defaultBrand);\n\n const isControlled = controlledBrand !== undefined;\n const brandId = isControlled ? controlledBrand : uncontrolledBrand;\n\n const setBrand = useCallback(\n (next: BrandId) => {\n if (!isControlled) setUncontrolledBrand(next);\n onBrandChange?.(next);\n },\n [isControlled, onBrandChange],\n );\n\n useEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute(BRAND_ATTRIBUTE, brandId);\n }, [brandId]);\n\n return { brandId, setBrand };\n};\n","import { useCallback, useEffect, useState } from 'react';\n\nimport { DEFAULT_COLOR_SCHEME } from './defaults';\nimport type { ColorScheme, ResolvedColorScheme } from './types';\n\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\nexport const THEME_ATTRIBUTE = 'data-theme';\n\nconst getSystemColorScheme = (): ResolvedColorScheme => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return 'light';\n return window.matchMedia(DARK_QUERY).matches ? 'dark' : 'light';\n};\n\nexport type UseColorSchemeOptions = {\n /** Initial colour scheme for uncontrolled use. Defaults to `light` (`DEFAULT_COLOR_SCHEME`). */\n defaultScheme?: ColorScheme;\n /** Controlled colour scheme (`light` / `dark` / `system`). When set, the parent owns the value and `setScheme` only notifies via `onSchemeChange`. `system` follows `prefers-color-scheme` and resolves reactively. */\n scheme?: ColorScheme;\n /** Called with the next scheme whenever `setScheme` runs — required to persist the choice in controlled mode. */\n onSchemeChange?: (theme: ColorScheme) => void;\n};\n\nexport const useColorSchemeState = ({\n defaultScheme = DEFAULT_COLOR_SCHEME,\n scheme: propScheme,\n onSchemeChange,\n}: UseColorSchemeOptions = {}) => {\n const [uncontrolledScheme, setUncontrolledScheme] = useState(defaultScheme);\n const [systemScheme, setSystemScheme] = useState<ResolvedColorScheme>(getSystemColorScheme);\n\n const isControlled = propScheme !== undefined;\n const scheme = isControlled ? propScheme : uncontrolledScheme;\n\n const setScheme = useCallback(\n (next: ColorScheme) => {\n if (!isControlled) setUncontrolledScheme(next);\n onSchemeChange?.(next);\n },\n [isControlled, onSchemeChange],\n );\n\n // Track the OS preference so `system` stays live as the user flips it.\n useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;\n const mq = window.matchMedia(DARK_QUERY);\n const onChange = () => setSystemScheme(mq.matches ? 'dark' : 'light');\n onChange();\n mq.addEventListener('change', onChange);\n return () => mq.removeEventListener('change', onChange);\n }, []);\n\n const resolvedScheme: ResolvedColorScheme = scheme === 'system' ? systemScheme : scheme;\n\n useEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute(THEME_ATTRIBUTE, resolvedScheme);\n }, [resolvedScheme]);\n\n return { scheme, resolvedScheme, setScheme };\n};\n","import { createContext } from 'react';\n\nimport type { ResolvedColorScheme } from './types';\n\n/**\n * What a `ThemeScope` publishes about itself, in its own module so a hook can read it without\n * importing the component that provides it.\n *\n * - `scheme`: the scheme this subtree is pinned to, or `null` outside a scope.\n * - `container`: a body-level node carrying the scope's `data-theme` and token vars. A canvas\n * (chart, diagram) that resolves live `--*` values reads them off this rather than `<html>`,\n * which is still painting the page's scheme.\n */\nexport const ThemeScopeSchemeContext = createContext<ResolvedColorScheme | null>(null);\nexport const ThemeScopeContainerContext = createContext<HTMLElement | null>(null);\n"],"mappings":";;;AAKA,MAAa,kBAAkB;AAW/B,MAAa,iBAAiB,EAC5B,gBAAgB,eAAe,kBAC/B,SAAS,iBACT,iBAAiB,kBACE,CAAC,MAAM;CAC1B,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,YAAY;CAEvE,MAAM,eAAe,oBAAoB,KAAA;CACzC,MAAM,UAAU,eAAe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AG,CAAC,cAAc,CAAC;CAEnB,OAAO;EAAE;EAAQ;EAAgB;CAAU;AAC7C;;;;;;;;;;;;AC9CA,MAAa,0BAA0B,cAA0C,IAAI;AACrF,MAAa,6BAA6B,cAAkC,IAAI"}
@@ -1,119 +0,0 @@
1
- import { DEFAULT_BRAND_ID, DEFAULT_COLOR_SCHEME } from "./defaults-i_xG2F_1.js";
2
- import { BRAND_ATTRIBUTE, THEME_ATTRIBUTE, ThemeScopeContainerContext, ThemeScopeSchemeContext } from "./themeScopeContext-D7fSyb06.js";
3
- import { use, useMemo, useSyncExternalStore } from "react";
4
- //#region src/components/ThemeProvider/useThemeAttributes.ts
5
- const DEFAULT_ATTRIBUTES = {
6
- cacheKey: `${DEFAULT_COLOR_SCHEME}:${DEFAULT_BRAND_ID}`,
7
- scheme: DEFAULT_COLOR_SCHEME,
8
- brandId: DEFAULT_BRAND_ID,
9
- scope: null
10
- };
11
- let snapshot = DEFAULT_ATTRIBUTES;
12
- const readThemeAttributes = () => {
13
- if (typeof document === "undefined") return DEFAULT_ATTRIBUTES;
14
- const root = document.documentElement;
15
- const theme = root.getAttribute(THEME_ATTRIBUTE);
16
- const scheme = theme === "dark" || theme === "light" ? theme : DEFAULT_COLOR_SCHEME;
17
- const brandId = root.getAttribute("data-brand") ?? "design-system";
18
- const cacheKey = `${scheme}:${brandId}`;
19
- if (cacheKey !== snapshot.cacheKey) snapshot = {
20
- cacheKey,
21
- scheme,
22
- brandId,
23
- scope: null
24
- };
25
- return snapshot;
26
- };
27
- const subscribe = (onChange) => {
28
- if (typeof document === "undefined") return () => {};
29
- const observer = new MutationObserver(onChange);
30
- observer.observe(document.documentElement, {
31
- attributes: true,
32
- attributeFilter: [THEME_ATTRIBUTE, BRAND_ATTRIBUTE]
33
- });
34
- return () => observer.disconnect();
35
- };
36
- const getServerSnapshot = () => DEFAULT_ATTRIBUTES;
37
- /**
38
- * The colour scheme and brand currently applied to `<html>`, plus a key that
39
- * changes whenever they do — for memoizing anything built from `resolveToken`.
40
- *
41
- * Read from the DOM rather than `useTheme()` on purpose: `ThemeProvider` writes
42
- * both attributes from passive effects, so during the render after a scheme
43
- * change the context already says `dark` while `<html>` — and therefore every
44
- * computed `--*` value — is still light. Keying off the attributes keeps the
45
- * values and the key that stands for them in lockstep, and works in a subtree
46
- * with no `ThemeProvider` above it.
47
- *
48
- * Returning `scheme` from the same read is what makes that safe by construction:
49
- * a caller cannot pick up the new key and the old scheme.
50
- *
51
- * Inside a `ThemeScope` the scope's scheme wins. `<html>` still carries the page's, but the
52
- * scope re-points the tokens for its own subtree, so a consumer that read the root would build
53
- * light values for a dark panel — a white chart on a dark card. Unlike the provider's, the
54
- * scope's attribute and vars are rendered in the same commit as the subtree, so context and
55
- * DOM cannot disagree here.
56
- */
57
- const useThemeAttributes = () => {
58
- const root = useSyncExternalStore(subscribe, readThemeAttributes, getServerSnapshot);
59
- const scopedScheme = use(ThemeScopeSchemeContext);
60
- const scope = use(ThemeScopeContainerContext);
61
- return useMemo(() => {
62
- if (scopedScheme === null && scope === null) return root;
63
- const scheme = scopedScheme ?? root.scheme;
64
- return {
65
- scheme,
66
- brandId: root.brandId,
67
- scope,
68
- cacheKey: `${scheme}:${root.brandId}${scope === null ? "" : ":scoped"}`
69
- };
70
- }, [
71
- scopedScheme,
72
- scope,
73
- root
74
- ]);
75
- };
76
- //#endregion
77
- //#region src/utils/themeTokens.ts
78
- /**
79
- * Live access to the semantic `--*` design tokens for consumers that cannot use
80
- * a Tailwind class — a CodeMirror theme object, a mermaid `themeVariables` map,
81
- * an SVG serialized for export. Those all need a concrete color string at build
82
- * time, so we resolve the value the browser currently computes for `<html>` and
83
- * hand the resulting `rgb(...)` to the library.
84
- *
85
- * SSR/no-document falls back to a literal; so does a token the stylesheet has
86
- * not defined (which is what unit tests see, since they load no CSS).
87
- */
88
- const format = (channels, alpha) => alpha === void 0 ? `rgb(${channels})` : `rgb(${channels} / ${alpha})`;
89
- const resolveToken = (token, fallbackChannels, alpha) => {
90
- const channels = typeof document === "undefined" ? fallbackChannels : getComputedStyle(document.documentElement).getPropertyValue(`--${token}`).trim() || fallbackChannels;
91
- return format(channels, alpha);
92
- };
93
- /**
94
- * A {@link resolveToken} bound to a single `getComputedStyle` snapshot.
95
- *
96
- * Reach for this when building a whole palette at once: `resolveToken` reads the
97
- * computed style per call, so a config with dozens of token lookups forces dozens
98
- * of style resolutions for one render. Take a snapshot, read every token off it,
99
- * throw it away.
100
- *
101
- * Snapshot per palette build, never module-level — the values change whenever the
102
- * scheme or brand does, and a cached resolver would keep serving the old ones.
103
- *
104
- * {@link createChannelResolver} is the same snapshot answering the raw `"R G B"`
105
- * channels, for a consumer that needs another serialization.
106
- */
107
- const createChannelResolver = (from) => {
108
- const element = from ?? (typeof document === "undefined" ? null : document.documentElement);
109
- const computed = element === null ? null : getComputedStyle(element);
110
- return (token, fallbackChannels) => computed?.getPropertyValue(`--${token}`).trim() || fallbackChannels;
111
- };
112
- const createTokenResolver = (from) => {
113
- const resolve = createChannelResolver(from);
114
- return (token, fallbackChannels, alpha) => format(resolve(token, fallbackChannels), alpha);
115
- };
116
- //#endregion
117
- export { createChannelResolver, createTokenResolver, resolveToken, useThemeAttributes };
118
-
119
- //# sourceMappingURL=themeTokens-qP1-55O7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"themeTokens-qP1-55O7.js","names":[],"sources":["../src/components/ThemeProvider/useThemeAttributes.ts","../src/utils/themeTokens.ts"],"sourcesContent":["import { use, useMemo, useSyncExternalStore } from 'react';\n\nimport { DEFAULT_BRAND_ID, DEFAULT_COLOR_SCHEME } from './defaults';\nimport { ThemeScopeContainerContext, ThemeScopeSchemeContext } from './themeScopeContext';\nimport type { BrandId, ResolvedColorScheme } from './types';\nimport { BRAND_ATTRIBUTE } from './useBrandState';\nimport { THEME_ATTRIBUTE } from './useColorSchemeState';\n\nexport type ThemeAttributes = {\n /** Changes whenever `scheme`, `brandId` or `scope` does — the memo key for anything built from live `--*` values. */\n cacheKey: string;\n scheme: ResolvedColorScheme;\n brandId: BrandId;\n /**\n * The element to read live `--*` values off, or `null` for `<html>`.\n *\n * Set inside a `ThemeScope`, whose subtree carries its own tokens. It arrives one commit\n * after the scope mounts, which is why it is part of `cacheKey` — a palette built against\n * `<html>` must not be served once the scope's own is available.\n */\n scope: HTMLElement | null;\n};\n\n// No attribute set means the stylesheet's own `:root` block is painting, which is\n// the default scheme — not a third \"unknown\" state. Same value on the server, so\n// the SSR snapshot and the client's first render agree.\nconst DEFAULT_ATTRIBUTES: ThemeAttributes = {\n cacheKey: `${DEFAULT_COLOR_SCHEME}:${DEFAULT_BRAND_ID}`,\n scheme: DEFAULT_COLOR_SCHEME,\n brandId: DEFAULT_BRAND_ID,\n scope: null,\n};\n\n// `useSyncExternalStore` re-renders forever on a snapshot whose reference changes\n// on every read, so the object is rebuilt only when the key it stands for moves.\nlet snapshot = DEFAULT_ATTRIBUTES;\n\nconst readThemeAttributes = (): ThemeAttributes => {\n if (typeof document === 'undefined') return DEFAULT_ATTRIBUTES;\n\n const root = document.documentElement;\n const theme = root.getAttribute(THEME_ATTRIBUTE);\n const scheme: ResolvedColorScheme =\n theme === 'dark' || theme === 'light' ? theme : DEFAULT_COLOR_SCHEME;\n const brandId = root.getAttribute(BRAND_ATTRIBUTE) ?? DEFAULT_BRAND_ID;\n const cacheKey = `${scheme}:${brandId}`;\n\n if (cacheKey !== snapshot.cacheKey) snapshot = { cacheKey, scheme, brandId, scope: null };\n\n return snapshot;\n};\n\nconst subscribe = (onChange: () => void): (() => void) => {\n if (typeof document === 'undefined') return () => {};\n\n const observer = new MutationObserver(onChange);\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [THEME_ATTRIBUTE, BRAND_ATTRIBUTE],\n });\n\n return () => observer.disconnect();\n};\n\nconst getServerSnapshot = (): ThemeAttributes => DEFAULT_ATTRIBUTES;\n\n/**\n * The colour scheme and brand currently applied to `<html>`, plus a key that\n * changes whenever they do — for memoizing anything built from `resolveToken`.\n *\n * Read from the DOM rather than `useTheme()` on purpose: `ThemeProvider` writes\n * both attributes from passive effects, so during the render after a scheme\n * change the context already says `dark` while `<html>` — and therefore every\n * computed `--*` value — is still light. Keying off the attributes keeps the\n * values and the key that stands for them in lockstep, and works in a subtree\n * with no `ThemeProvider` above it.\n *\n * Returning `scheme` from the same read is what makes that safe by construction:\n * a caller cannot pick up the new key and the old scheme.\n *\n * Inside a `ThemeScope` the scope's scheme wins. `<html>` still carries the page's, but the\n * scope re-points the tokens for its own subtree, so a consumer that read the root would build\n * light values for a dark panel — a white chart on a dark card. Unlike the provider's, the\n * scope's attribute and vars are rendered in the same commit as the subtree, so context and\n * DOM cannot disagree here.\n */\nexport const useThemeAttributes = (): ThemeAttributes => {\n const root = useSyncExternalStore(subscribe, readThemeAttributes, getServerSnapshot);\n const scopedScheme = use(ThemeScopeSchemeContext);\n const scope = use(ThemeScopeContainerContext);\n\n // The reference is a memo key for callers, so it may only move when the values do.\n return useMemo(() => {\n if (scopedScheme === null && scope === null) return root;\n\n const scheme = scopedScheme ?? root.scheme;\n return {\n scheme,\n brandId: root.brandId,\n scope,\n cacheKey: `${scheme}:${root.brandId}${scope === null ? '' : ':scoped'}`,\n };\n }, [scopedScheme, scope, root]);\n};\n","/**\n * Live access to the semantic `--*` design tokens for consumers that cannot use\n * a Tailwind class — a CodeMirror theme object, a mermaid `themeVariables` map,\n * an SVG serialized for export. Those all need a concrete color string at build\n * time, so we resolve the value the browser currently computes for `<html>` and\n * hand the resulting `rgb(...)` to the library.\n *\n * SSR/no-document falls back to a literal; so does a token the stylesheet has\n * not defined (which is what unit tests see, since they load no CSS).\n */\nconst format = (channels: string, alpha?: number): string =>\n alpha === undefined ? `rgb(${channels})` : `rgb(${channels} / ${alpha})`;\n\nexport const resolveToken = (token: string, fallbackChannels: string, alpha?: number): string => {\n const channels =\n typeof document === 'undefined'\n ? fallbackChannels\n : getComputedStyle(document.documentElement).getPropertyValue(`--${token}`).trim() ||\n fallbackChannels;\n return format(channels, alpha);\n};\n\n/**\n * A {@link resolveToken} bound to a single `getComputedStyle` snapshot.\n *\n * Reach for this when building a whole palette at once: `resolveToken` reads the\n * computed style per call, so a config with dozens of token lookups forces dozens\n * of style resolutions for one render. Take a snapshot, read every token off it,\n * throw it away.\n *\n * Snapshot per palette build, never module-level — the values change whenever the\n * scheme or brand does, and a cached resolver would keep serving the old ones.\n *\n * {@link createChannelResolver} is the same snapshot answering the raw `\"R G B\"`\n * channels, for a consumer that needs another serialization.\n */\nexport const createChannelResolver = (from?: Element | null) => {\n // `from` is a node inside the subtree whose palette is wanted — a `ThemeScope` re-points the\n // tokens for its own subtree, so reading `<html>` there builds the page's palette instead.\n const element = from ?? (typeof document === 'undefined' ? null : document.documentElement);\n const computed = element === null ? null : getComputedStyle(element);\n\n return (token: string, fallbackChannels: string): string =>\n computed?.getPropertyValue(`--${token}`).trim() || fallbackChannels;\n};\n\nexport const createTokenResolver = (from?: Element | null) => {\n const resolve = createChannelResolver(from);\n\n return (token: string, fallbackChannels: string, alpha?: number): string =>\n format(resolve(token, fallbackChannels), alpha);\n};\n"],"mappings":";;;;AA0BA,MAAM,qBAAsC;CAC1C,UAAU,GAAG,qBAAqB,GAAG;CACrC,QAAQ;CACR,SAAS;CACT,OAAO;AACT;AAIA,IAAI,WAAW;AAEf,MAAM,4BAA6C;CACjD,IAAI,OAAO,aAAa,aAAa,OAAO;CAE5C,MAAM,OAAO,SAAS;CACtB,MAAM,QAAQ,KAAK,aAAa,eAAe;CAC/C,MAAM,SACJ,UAAU,UAAU,UAAU,UAAU,QAAQ;CAClD,MAAM,UAAU,KAAK,aAAA,YAA4B,KAAA;CACjD,MAAM,WAAW,GAAG,OAAO,GAAG;CAE9B,IAAI,aAAa,SAAS,UAAU,WAAW;EAAE;EAAU;EAAQ;EAAS,OAAO;CAAK;CAExF,OAAO;AACT;AAEA,MAAM,aAAa,aAAuC;CACxD,IAAI,OAAO,aAAa,aAAa,aAAa,CAAC;CAEnD,MAAM,WAAW,IAAI,iBAA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gB,GAAG,KAAK;AAClD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toast-DIC0iNRf.js","names":["sonnerToast","toast","sonnerToast"],"sources":["../src/components/Toast/ToastAction.tsx","../src/components/Toast/ToastDescription.tsx","../src/components/Toast/ToastDismiss.tsx","../src/components/Toast/ToastDuration.tsx","../src/components/Toast/ToastTitle.tsx","../src/components/Toast/ToastRoot.tsx","../src/components/Toast/toast.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'button'>;\n\nexport const ToastAction = ({ ref, className, ...rest }: Props) => (\n <button\n {...rest}\n ref={ref}\n data-slot=\"toast-action\"\n type=\"button\"\n className={cn(\n // layout\n 'tw:col-start-3',\n 'tw:row-start-1',\n 'tw:flex',\n 'tw:items-center',\n 'tw:justify-center',\n\n // font\n 'tw:text-xs',\n 'tw:font-medium',\n 'tw:text-primary',\n\n // sizing\n 'tw:px-2',\n 'tw:h-6',\n\n // styles\n // Fixed white: this is the chip's surface, not ink on a primary fill.\n // - All four non-`default` toast variants paint a scheme-blind primitive\n // (`bg-error-550`, `bg-blue-600`, `bg-green-700`, `bg-warning-550`), so a\n // chip on them must not move with the scheme either.\n // - `default` (`bg-popover`) is scheme-aware, and the white chip is the same\n // in both schemes there. `text-primary` on it is 3.27:1 in dark — that ink\n // is a separate fix, tracked in UT-5239's follow-ups.\n 'tw:bg-white',\n 'tw:rounded',\n className,\n )}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const ToastDescription = ({ ref, className, children, ...rest }: Props) => (\n <div\n ref={ref}\n data-slot=\"toast-description\"\n className={cn(\n 'tw:col-start-2',\n 'tw:font-normal',\n 'tw:break-words',\n 'tw:text-white',\n 'tw:group-data-[variant=default]/toast:text-muted-foreground',\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n);\n","import type { ComponentProps } from 'react';\n\nimport { X } from '../../icons';\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'button'>;\n\nexport const ToastDismiss = ({ ref, className, ...rest }: Props) => (\n <button\n ref={ref}\n data-slot=\"toast-dismiss\"\n className={cn(\n 'tw:flex',\n 'tw:justify-center',\n 'tw:col-start-4',\n 'tw:row-start-1',\n 'tailwindcss-preflight',\n 'tw:[&_svg]:aspect-square',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-4',\n 'tw:[&_svg]:m-1',\n\n 'tw:text-white',\n 'tw:group-data-[variant=default]/toast:[&_svg]:text-popover-foreground',\n 'tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:[&_svg]:text-foreground',\n className,\n )}\n type=\"button\"\n {...rest}\n >\n <X />\n <span className=\"tw:sr-only\">Dismiss</span>\n </button>\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype ToastDurationProps = ComponentProps<'span'> & {\n duration: number;\n};\n\nexport const ToastDuration = ({ ref, duration, className, style, ...rest }: ToastDurationProps) => (\n <span\n {...rest}\n ref={ref}\n className={cn(\n 'tw:bg-white/30',\n 'tw:group-data-[variant=default]/toast:bg-popover-foreground/20',\n 'tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:bg-foreground/20',\n 'tw:rounded-bl-lg',\n 'tw:mx-px',\n\n // positioning\n 'tw:absolute',\n 'tw:bottom-0',\n 'tw:left-0',\n\n // sizing\n 'tw:h-1',\n\n // animation\n 'tw:animate-toast-progress',\n 'tw:group-hover/toast:[animation-play-state:paused]',\n className,\n )}\n style={{\n animationDuration: `${duration}ms`,\n ...style,\n }}\n />\n);\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '../../utils';\n\ntype Props = ComponentProps<'div'>;\n\nexport const ToastTitle = ({ ref, className, children, ...rest }: Props) => (\n <div\n ref={ref}\n data-slot=\"toast-title\"\n className={cn(\n 'tw:col-start-2',\n 'tw:text-sm',\n 'tw:leading-6',\n 'tw:min-h-6',\n 'tw:self-center',\n 'tw:text-white',\n 'tw:group-data-[variant=default]/toast:text-popover-foreground',\n 'tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:text-foreground',\n\n 'tw:break-words',\n 'tw:font-medium',\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n);\n","import type { MouseEventHandler, ReactNode } from 'react';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\nimport { type Action, toast as sonnerToast } from 'sonner';\n\nimport { AlertCircle, AlertTriangle, CircleCheck, Info, Loader2 } from '../../icons';\nimport { cn } from '../../utils';\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nimport { ToastAction } from './ToastAction';\nimport { ToastDescription } from './ToastDescription';\nimport { ToastDismiss } from './ToastDismiss';\nimport { ToastDuration } from './ToastDuration';\nimport { ToastTitle } from './ToastTitle';\n\nconst variants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:group/toast',\n 'tw:relative',\n\n // layout\n 'tw:grid',\n 'tw:grid-cols-[0_1fr_auto_auto]',\n 'tw:items-start',\n 'tw:has-[[data-slot=toast-description]]:grid-rows-[auto_auto]',\n 'tw:has-[[data-slot=toast-icon]]:grid-cols-[auto_1fr_auto_auto]',\n 'tw:[&_[data-slot=toast-icon]]:mr-2',\n 'tw:[&_[data-slot=toast-title]]:mr-2.5',\n 'tw:[&_[data-slot=toast-description]]:mr-2.5',\n 'tw:[&_[data-slot=toast-action]]:mr-2',\n 'tw:[&_[data-slot=toast-description]]:col-end-3',\n 'tw:gap-y-0',\n\n // styles\n 'tw:p-4',\n 'tw:rounded-lg',\n 'tw:shadow-md',\n ],\n {\n defaultVariants: {\n variant: 'info',\n },\n variants: {\n variant: {\n default: 'tw:border tw:border-border tw:bg-popover',\n error: 'tw:bg-error-550',\n info: 'tw:bg-blue-600',\n success: 'tw:bg-green-700',\n warning: 'tw:bg-warning-550',\n },\n },\n },\n);\n\ntype Variants = VariantProps<typeof variants>;\ntype Variant = NonNullable<Variants['variant']>;\ntype VariantIcon = Exclude<Variant, 'default'>;\n\ntype Props = {\n id: string | number;\n title: ReactNode;\n icon?: ReactNode;\n description?: ReactNode;\n action?: Action;\n loading?: boolean;\n duration?: number;\n // offset?: number;\n} & Variants;\n\nconst DEFAULT_VARIANT_ICON: Record<VariantIcon, ReactNode> = {\n error: <AlertTriangle />,\n info: <Info />,\n success: <CircleCheck />,\n warning: <AlertCircle />,\n};\n\nexport const ToastRoot = ({\n id,\n title,\n description,\n action,\n duration = Infinity,\n variant = 'info',\n loading = false,\n icon: iconProp,\n}: Props) => {\n const renderArgo = useArgoDesign();\n\n const icon: ReactNode = (() => {\n if (loading) return <Loader2 className=\"tw:animate-spin\" />;\n if (iconProp) return iconProp;\n if (variant === 'default' || variant === null) return null;\n return DEFAULT_VARIANT_ICON[variant];\n })();\n\n const handleActionClick: MouseEventHandler<HTMLButtonElement> = (event) => {\n sonnerToast.dismiss(id);\n action?.onClick(event);\n };\n\n return (\n <div\n data-variant={variant}\n data-argo={renderArgo}\n className={cn(\n variants({ variant }),\n 'tw:data-[variant=default]:data-[argo=true]:bg-background',\n )}\n >\n {icon && (\n <span\n data-slot=\"toast-icon\"\n className={cn(\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:self-center',\n 'tw:aspect-square',\n 'tw:size-5',\n 'tw:shrink-0',\n 'tw:[&_svg:not([class*=\"tw:size-\"])]:size-5',\n 'tw:text-white',\n 'tw:group-data-[variant=default]/toast:text-popover-foreground',\n 'tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:text-foreground',\n )}\n >\n {icon}\n </span>\n )}\n\n <ToastTitle>{title}</ToastTitle>\n {description && <ToastDescription>{description}</ToastDescription>}\n {action && (\n <ToastAction style={action?.actionButtonStyle} onClick={handleActionClick}>\n {action.label}\n </ToastAction>\n )}\n <ToastDismiss onClick={() => sonnerToast.dismiss(id)} />\n {duration !== Infinity && <ToastDuration duration={duration} />}\n </div>\n );\n};\n","import type { ComponentProps, ReactNode } from 'react';\nimport { type ExternalToast, toast as sonnerToast } from 'sonner';\n\nimport { cn } from '../../utils';\n\nimport { ToastRoot } from './ToastRoot';\n\ntype ToastProps = ComponentProps<typeof ToastRoot>;\ntype Title = ToastProps['title'] | ((opts: { dismiss: () => void }) => ReactNode);\n\nexport type ToastOptions = { id?: string | number; title: Title } & Omit<\n ToastProps,\n 'id' | 'title'\n> &\n Pick<\n ExternalToast,\n 'onAutoClose' | 'onDismiss' | 'testId' | 'toasterId' | 'dismissible' | 'position'\n >;\ntype DerivedToastOptions = Omit<ToastOptions, 'title' | 'variant'>;\n\nexport const toast = ({\n onAutoClose,\n onDismiss,\n testId,\n toasterId,\n dismissible = true,\n position,\n title: titleProp,\n ...toast\n}: ToastOptions) => {\n const duration = (() => {\n if (typeof toast.duration === 'number') return toast.duration;\n if (toast.variant === 'error' || toast.variant === 'warning') return Infinity;\n return toast.duration ?? 5000;\n })();\n\n const renderCustomToast: Parameters<typeof sonnerToast.custom>[0] = (id) => {\n const title =\n typeof titleProp === 'function'\n ? titleProp({ dismiss: () => sonnerToast.dismiss(id) })\n : titleProp;\n\n return <ToastRoot {...toast} id={id} title={title} duration={duration} />;\n };\n\n return sonnerToast.custom(renderCustomToast, {\n // toast generated by sonner will always have an id, but we want to allow users to specify their own id if they want to\n // can not pass undefined, as it will break dismiss\n ...(toast.id != null ? { id: toast.id } : {}),\n unstyled: true,\n position,\n onAutoClose,\n onDismiss,\n testId,\n toasterId,\n dismissible,\n duration,\n // override default focus-visible styles to match our design\n className: cn('tw:rounded-lg', 'tw:focus-visible:!ring-4', 'tw:focus-visible:!ring-ring/50'),\n });\n};\n\ntoast.success = (title: Title, options?: DerivedToastOptions) =>\n toast({\n ...options,\n title,\n variant: 'success',\n });\n\ntoast.error = (title: Title, options?: DerivedToastOptions) =>\n toast({\n ...options,\n title,\n variant: 'error',\n duration: options?.duration ?? Infinity,\n });\n\ntoast.warning = (title: Title, options?: DerivedToastOptions) =>\n toast({\n ...options,\n title,\n variant: 'warning',\n duration: options?.duration ?? Infinity,\n });\n\ntoast.info = (title: Title, options?: DerivedToastOptions) =>\n toast({\n ...options,\n title,\n variant: 'info',\n });\n\ntoast.dismiss = (toastId?: ToastOptions['id']) => sonnerToast.dismiss(toastId);\ntoast.dismissAll = () => sonnerToast.dismiss();\n"],"mappings":";;;;;;;AAMA,MAAa,eAAe,EAAE,KAAK,WAAW,GAAG,WAC/C,oBAAC,UAAD;CACE,GAAI;CACC;CACL,aAAU;CACV,MAAK;CACL,WAAW,GAET,kBACA,kBACA,WACA,mBACA,qBAGA,cACA,kBACA,mBAGA,WACA,UAUA,eACA,cACA,SACF;AACD,CAAA;;;ACnCH,MAAa,oBAAoB,EAAE,KAAK,WAAW,UAAU,GAAG,WAC9D,oBAAC,OAAD;CACO;CACL,aAAU;CACV,WAAW,GACT,kBACA,kBACA,kBACA,iBACA,+DACA,SACF;CACA,GAAI;CAEH;AACE,CAAA;;;ACdP,MAAa,gBAAgB,EAAE,KAAK,WAAW,GAAG,WAChD,qBAAC,UAAD;CACO;CACL,aAAU;CACV,WAAW,GACT,WACA,qBACA,kBACA,kBACA,yBACA,4BACA,gDACA,kBAEA,iBACA,yEACA,8FACA,SACF;CACA,MAAK;CACL,GAAI;CAnBN,UAAA,CAqBE,oBAAC,GAAD,CAAI,CAAA,GACJ,oBAAC,QAAD;EAAM,WAAU;EAAa,UAAA;CAAa,CAAA,CACpC;;;;ACvBV,MAAa,iBAAiB,EAAE,KAAK,UAAU,WAAW,OAAO,GAAG,WAClE,oBAAC,QAAD;CACE,GAAI;CACC;CACL,WAAW,GACT,kBACA,kEACA,uFACA,oBACA,YAGA,eACA,eACA,aAGA,UAGA,6BACA,sDACA,SACF;CACA,OAAO;EACL,mBAAmB,GAAG,SAAS;EAC/B,GAAG;CACL;AACD,CAAA;;;AC9BH,MAAa,cAAc,EAAE,KAAK,WAAW,UAAU,GAAG,WACxD,oBAAC,OAAD;CACO;CACL,aAAU;CACV,WAAW,GACT,kBACA,cACA,gBACA,cACA,kBACA,iBACA,iEACA,sFAE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AAY,QAAQ,OAAO;AAC7E,QAAM,mBAAmBA,MAAY,QAAQ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useControllableState-M6494mCT.js","names":[],"sources":["../src/hooks/useControllableState.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport type { Dispatch, SetStateAction } from 'react';\n\ntype UseControllableStateParams<T> = {\n /** The controlled value. When defined, the hook operates in controlled mode. */\n prop: T | undefined;\n /** The initial value used in uncontrolled mode. */\n defaultProp: T;\n /** Called with the next value whenever `setValue` runs (controlled and uncontrolled). */\n onChange?: (value: T) => void;\n};\n\n/**\n * Controlled/uncontrolled state, à la Radix's `useControllableState`.\n *\n * Returns a `[value, setValue]` tuple where `setValue` accepts a value or an updater\n * function (`SetStateAction<T>`). In controlled mode (`prop !== undefined`) the hook never\n * owns state — `setValue` resolves the next value and calls `onChange`; the parent is\n * responsible for feeding the new `prop` back. In uncontrolled mode the hook owns the value\n * in internal state and still calls `onChange`. `onChange` fires on every `setValue` call\n * (it is not deduped against the previous value).\n */\nexport const useControllableState = <T>({\n prop,\n defaultProp,\n onChange,\n}: UseControllableStateParams<T>): readonly [T, Dispatch<SetStateAction<T>>] => {\n const [uncontrolled, setUncontrolled] = useState<T>(defaultProp);\n const isControlled = prop !== undefined;\n // Inline the `!== undefined` check (rather than reusing `isControlled`) so TypeScript\n // narrows `prop` from `T | undefined` to `T` here.\n const value = prop !== undefined ? prop : uncontrolled;\n\n // Read the latest value/onChange without widening `setValue`'s dependency list,\n // keeping its identity stable across renders.\n const valueRef = useRef(value);\n valueRef.current = value;\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n const setValue = useCallback<Dispatch<SetStateAction<T>>>(\n (next) => {\n const nextValue =\n typeof next === 'function' ? (next as (prev: T) => T)(valueRef.current) : next;\n // Advance the ref immediately so multiple functional-updater calls in the same tick\n // compose (each resolves against the previous result, not the stale render value).\n valueRef.current = nextValue;\n if (!isControlled) setUncontrolled(nextValue);\n onChangeRef.current?.(nextValue);\n },\n [isControlled],\n );\n\n return [value, setValue] as const;\n};\n"],"mappings":";;;;;;;;;;;;AAsBA,MAAa,wBAA2B,EACtC,MACA,aACA,eAC8E;CAC9E,MAAM,CAAC,cAAc,mBAAmB,SAAY,WAAW;CAC/D,MAAM,eAAe,SAAS,KAAA;CAG9B,MAAM,QAAQ,SAAS,KAAA,IAAY,OAAO;CAI1C,MAAM,WAAW,OAAO,KAAK;CAC7B,SAAS,UAAU;CACnB,MAAM,cAAc,OAAO,QAAQ;CACnC,YAAY,UAAU;CAetB,OAAO,CAAC,OAbS,aACd,SAAS;EACR,MAAM,YACJ,OAAO,SAAS,aAAc,KAAwB,SAAS,OAAO,IAAI;EAG5E,SAAS,UAAU;EACnB,IAAI,CAAC,cAAc,gBAAgB,SAAS;EAC5C,YAAY,UAAU,SAAS;CACjC,GACA,CAAC,YAAY,CAGO,CAAC;AACzB"}
@@ -1,24 +0,0 @@
1
- import { useCallback, useState } from "react";
2
- //#region src/hooks/useElement.ts
3
- /**
4
- * A callback ref that reports the element it is attached to.
5
- *
6
- * - Detachment runs through the ref's own cleanup rather than a `null` call, so React never
7
- * asks this hook to guess which of the two it is looking at.
8
- * - A branch swap clears the outgoing node and registers the incoming one inside a single
9
- * commit, so the consumer never sees `null` between them.
10
- * - A branch that attaches no ref at all — the rail becoming a sheet — still releases the
11
- * node it left behind. Holding a detached one would keep its listeners and observers alive.
12
- */
13
- const useElement = () => {
14
- const [element, setElement] = useState(null);
15
- return [element, useCallback((node) => {
16
- if (node === null) return;
17
- setElement(node);
18
- return () => setElement((prev) => prev === node ? null : prev);
19
- }, [])];
20
- };
21
- //#endregion
22
- export { useElement };
23
-
24
- //# sourceMappingURL=useElement-BK3AAiIf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useElement-BK3AAiIf.js","names":[],"sources":["../src/hooks/useElement.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\n/**\n * A callback ref that reports the element it is attached to.\n *\n * - Detachment runs through the ref's own cleanup rather than a `null` call, so React never\n * asks this hook to guess which of the two it is looking at.\n * - A branch swap clears the outgoing node and registers the incoming one inside a single\n * commit, so the consumer never sees `null` between them.\n * - A branch that attaches no ref at all — the rail becoming a sheet — still releases the\n * node it left behind. Holding a detached one would keep its listeners and observers alive.\n */\nexport const useElement = () => {\n const [element, setElement] = useState<HTMLElement | null>(null);\n\n const ref = useCallback((node: HTMLElement | null) => {\n // React 18's `null` call, which the cleanup below replaces. Acting on it would drop the\n // node a swap has already registered.\n if (node === null) return;\n\n setElement(node);\n\n return () => setElement((prev) => (prev === node ? null : prev));\n }, []);\n\n return [element, ref] as const;\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,mBAAmB;CAC9B,MAAM,CAAC,SAAS,cAAc,SAA6B,IAAI;CAY/D,OAAO,CAAC,SAVI,aAAa,SAA6B;EAGpD,IAAI,SAAS,MAAM;EAEnB,WAAW,IAAI;EAEf,aAAa,YAAY,SAAU,SAAS,OAAO,OAAO,IAAK;CACjE,GAAG,CAAC,CAEe,CAAC;AACtB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-BW4AE8VP.js","names":["Root"],"sources":["../src/utils/copyToClipboard.ts","../src/utils/createChangeInputEvent.ts","../src/constants/keyCodes.ts","../src/components/Tooltip/TooltipContent.tsx","../src/components/Tooltip/TooltipRoot.tsx","../src/components/Tooltip/TooltipTrigger.tsx","../src/components/Tooltip/Tooltip.tsx","../src/utils/decorators.tsx","../src/utils/createPrefixedString.ts","../src/utils/noop.ts","../src/utils/debounce.ts","../src/utils/isMac.ts","../src/utils/useSHA256.ts","../src/utils/splitEntry.ts"],"sourcesContent":["/**\n * The async Clipboard API requires the document to be focused and rejects with\n * `NotAllowedError: Document is not focused` otherwise — which is the normal state\n * for a page inside an iframe that has not taken focus, such as Storybook's canvas\n * or an embedded preview. `execCommand` has no such requirement because it copies\n * the selection of a node we focus ourselves, so it covers that gap.\n */\nconst copyViaSelection = (text: string) => {\n const node = document.createElement('textarea');\n node.value = text;\n node.setAttribute('readonly', '');\n node.style.cssText = 'position:fixed;top:0;left:0;opacity:0';\n document.body.append(node);\n node.select();\n\n try {\n return document.execCommand('copy');\n } finally {\n node.remove();\n }\n};\n\nexport const copyToClipboard = async (text: string) => {\n try {\n await navigator.clipboard.writeText(text);\n } catch (error) {\n if (!copyViaSelection(text)) throw error;\n }\n};\n","import type { ChangeEvent } from 'react';\n\nexport const createChangeInputEvent = (input: HTMLInputElement) => {\n const changeEvent: ChangeEvent<HTMLInputElement> = {\n target: input,\n currentTarget: input,\n type: 'change',\n nativeEvent: new Event('change', { bubbles: true }),\n bubbles: true,\n cancelable: false,\n defaultPrevented: false,\n eventPhase: 2, // AT_TARGET\n isTrusted: false, // Synthetic events are not trusted\n preventDefault: () => {}, // Provide dummy functions if not needed\n isDefaultPrevented: () => false,\n stopPropagation: () => {},\n isPropagationStopped: () => false,\n persist: () => {},\n timeStamp: Date.now(),\n };\n\n Object.defineProperty(changeEvent, 'target', {\n value: input,\n writable: false,\n });\n\n return changeEvent;\n};\n","export const keyCodes = {\n ENTER: 'Enter',\n ESCAPE: 'Escape',\n SPACE: ' ',\n};\n","import type { ComponentProps } from 'react';\nimport { Content, Portal } from '@radix-ui/react-tooltip';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nimport { useArgoDesign } from '../ThemeProvider/context';\n\nconst tooltipVariants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:inline-block',\n 'tw:break-anywhere',\n 'tw:max-h-96',\n 'tw:overflow-y-auto',\n 'tw:z-[1060]',\n\n // legacy (dark) chrome — default\n 'tw:rounded',\n 'tw:bg-neutral-800',\n 'tw:text-white',\n\n // argo chrome overrides — semantic floating-panel tokens\n 'tw:data-[argo=true]:rounded-2xl',\n 'tw:data-[argo=true]:border',\n 'tw:data-[argo=true]:border-solid',\n 'tw:data-[argo=true]:border-border',\n 'tw:data-[argo=true]:bg-popover',\n 'tw:data-[argo=true]:text-popover-foreground',\n 'tw:data-[argo=true]:shadow-md',\n\n // argo open animation\n 'tw:data-[argo=true]:data-[state=delayed-open]:animate-in',\n 'tw:data-[argo=true]:data-[state=instant-open]:animate-in',\n 'tw:data-[argo=true]:data-[state=delayed-open]:fade-in-0',\n 'tw:data-[argo=true]:data-[state=instant-open]:fade-in-0',\n 'tw:data-[argo=true]:data-[state=delayed-open]:zoom-in-95',\n 'tw:data-[argo=true]:data-[state=instant-open]:zoom-in-95',\n\n // argo closed animation\n 'tw:data-[argo=true]:data-[state=closed]:animate-out',\n 'tw:data-[argo=true]:data-[state=closed]:fade-out-0',\n 'tw:data-[argo=true]:data-[state=closed]:zoom-out-95',\n\n // argo position animation\n 'tw:data-[argo=true]:data-[side=bottom]:slide-in-from-top-2',\n 'tw:data-[argo=true]:data-[side=left]:slide-in-from-right-2',\n 'tw:data-[argo=true]:data-[side=right]:slide-in-from-left-2',\n 'tw:data-[argo=true]:data-[side=top]:slide-in-from-bottom-2',\n ],\n {\n defaultVariants: {\n variant: 'action',\n },\n variants: {\n variant: {\n action: [\n 'tw:max-w-fit',\n 'tw:px-3',\n 'tw:py-2',\n\n 'tw:text-center',\n 'tw:text-xs',\n 'tw:font-medium',\n // Casing is the legacy brands' to ask for: `keboola-legacy-*` uppercases the action\n // tooltip, every other brand reads standard case. Same rule, same shape, as `Button`\n // and `Badge`.\n 'tw:[[data-brand^=keboola-legacy]_&]:uppercase',\n 'tw:[[data-brand^=keboola-legacy]_&]:tracking-wider',\n ],\n explanatory: [\n 'tw:max-w-80',\n 'tw:px-4',\n 'tw:py-3',\n 'tw:text-left',\n\n 'tw:text-sm',\n 'tw:font-normal',\n ],\n },\n },\n },\n);\n\ntype Props = {\n keepOpenOnPointerDownOutside?: boolean;\n placement?: ComponentProps<typeof Content>['side'];\n} & Omit<ComponentProps<typeof Content>, 'side'> &\n VariantProps<typeof tooltipVariants>;\n\nexport const TooltipContent = ({\n className,\n variant,\n keepOpenOnPointerDownOutside = false,\n children,\n onPointerDownOutside,\n sideOffset = 8,\n collisionPadding = 8,\n hideWhenDetached = true,\n placement = 'right',\n ...rest\n}: Props) => {\n const renderArgo = useArgoDesign();\n\n const handlePointerDownOutside: ComponentProps<typeof Content>['onPointerDownOutside'] = (\n event,\n ) => {\n if (keepOpenOnPointerDownOutside) event.preventDefault();\n onPointerDownOutside?.(event);\n };\n\n return (\n <Portal>\n <Content\n {...rest}\n // Marks the dark (non-argo) tooltip chrome so styles.css can invert\n // nested `.tw\\:prose` for contrast.\n data-tooltip-content={renderArgo ? undefined : true}\n data-argo={renderArgo}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n onPointerDownOutside={handlePointerDownOutside}\n className={tooltipVariants({ className, variant })}\n hideWhenDetached={hideWhenDetached}\n side={placement}\n >\n {children}\n </Content>\n </Portal>\n );\n};\n","import type { ComponentProps } from 'react';\nimport { Root } from '@radix-ui/react-tooltip';\n\ntype Props = ComponentProps<typeof Root>;\n\nconst DELAY_SHOW_TOOLTIP = 300;\n\nexport const TooltipRoot = ({ children, delayDuration = DELAY_SHOW_TOOLTIP, ...rest }: Props) => (\n <Root {...rest} delayDuration={delayDuration}>\n {children}\n </Root>\n);\n","import type { ComponentProps } from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { Trigger } from '@radix-ui/react-tooltip';\n\nimport { cn } from '../../utils';\n\n/**\n * Radix stamps the tooltip's own open/closed `data-state` onto the trigger. Merged onto an\n * `asChild` child that keeps a `data-state` of its own — `ToggleGroup.Item`, `Switch`, a `Tabs`\n * trigger — it wins, because those primitives spread incoming props *after* their own attribute.\n * The child then silently loses every `data-[state=…]` style it has, which is usually the only\n * thing marking it as selected.\n *\n * The tooltip's trigger state is styled nowhere, so it is dropped before it reaches the child.\n */\nconst WithoutTooltipState = ({\n children,\n ...props\n // `Slot`'s own props, plus the one attribute this exists to remove: React's types declare no\n // `data-*`, so it has to be named to be destructured away.\n}: ComponentProps<typeof Slot> & { 'data-state'?: string }) => {\n const { 'data-state': _tooltipState, ...rest } = props;\n\n return <Slot {...rest}>{children}</Slot>;\n};\n\ntype Props = {\n keepOpenOnClick?: boolean;\n} & ComponentProps<typeof Trigger>;\n\nexport const TooltipTrigger = ({\n ref,\n children,\n className,\n keepOpenOnClick = false,\n onClick,\n onPointerDown,\n asChild,\n ...rest\n}: Props) => {\n const handleClick: ComponentProps<typeof Trigger>['onClick'] = (event) => {\n if (keepOpenOnClick) event.preventDefault();\n onClick?.(event);\n };\n\n const handlePointerDown: ComponentProps<typeof Trigger>['onPointerDown'] = (event) => {\n if (keepOpenOnClick) event.preventDefault();\n onPointerDown?.(event);\n };\n\n return (\n <Trigger\n {...rest}\n asChild\n ref={ref}\n className={cn('tailwindcss-preflight', className)}\n onClick={handleClick}\n onPointerDown={handlePointerDown}\n >\n {asChild ? (\n <WithoutTooltipState>{children}</WithoutTooltipState>\n ) : (\n // Default-mode trigger wraps children in a span so Radix has a\n // single DOM element to attach handlers to. `tailwindcss-preflight`\n // (merged in via Slot) activates Tailwind's preflight inside the\n // span, which sets `svg { display: block }` — without an inline-flex\n // container that would stack any bare Lucide icon onto its own\n // line. `tw:inline-flex tw:items-center` keeps icon + text aligned.\n <span className=\"tw:inline-flex tw:items-center\">{children}</span>\n )}\n </Trigger>\n );\n};\n","import { useState } from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport type { Content, Trigger } from '@radix-ui/react-tooltip';\nimport { Provider } from '@radix-ui/react-tooltip';\n\nimport { keyCodes } from '../../constants/keyCodes';\n\nimport { TooltipContent } from './TooltipContent';\nimport { TooltipRoot } from './TooltipRoot';\nimport { TooltipTrigger } from './TooltipTrigger';\n\nconst ACTION_TOOLTIP_LIMIT = 30;\n\nexport const HINT_UNDERLINE_CLASS_NAME =\n 'tw:cursor-help tw:underline tw:decoration-dashed tw:decoration-neutral-300 tw:underline-offset-2';\n\ntype TriggerProps = {\n triggerAsChild?: boolean;\n};\n\n/**\n * Props for `Tooltip`. `tooltip` is the popup content; `children` is the trigger element.\n * `variant` auto-resolves to `\"explanatory\"` for strings >30 chars, else `\"action\"`.\n */\nexport type Props = {\n /** Keep the tooltip visible when the user clicks the trigger (useful for click-to-copy feedback). */\n keepOpenOnTriggerClick?: boolean;\n /** Content rendered inside the tooltip. Plain text only — no interactive elements (use `HoverCard` or `Popover` for that). */\n tooltip: ReactNode;\n children: ReactNode;\n placement?: ComponentProps<typeof Content>['side'];\n /** Forcibly hide the tooltip regardless of hover state. */\n forceHide?: boolean;\n /** Forcibly show the tooltip regardless of hover state. Useful for guided-tour overlays. */\n forceShow?: boolean;\n /** Hover delay before the tooltip opens, in ms. Defaults to the shared 300ms. */\n delayDuration?: number;\n /** Mark the trigger with the shared dashed-underline hover affordance. Works with `triggerAsChild`. */\n hintUnderline?: boolean;\n className?: string;\n} & TriggerProps &\n Pick<ComponentProps<typeof TooltipContent>, 'variant' | 'className'>;\n\n/** Re-export of Radix `Tooltip.Provider`. Mount once at the app root so tooltips share delay state. */\nexport const TooltipProvider = Provider;\n\n/**\n * Short plain-text label that appears on hover or focus.\n *\n * **When to use:** describing an icon-only `Button`, explaining a disabled control, or labelling a\n * truncated value. Plain text only — auto-switches to the longer `\"explanatory\"` variant when the string\n * exceeds 30 characters.\n * **When NOT to use:** for rich preview content (multiple lines, formatted text, structured data) use\n * `HoverCard`; for tooltips containing links or buttons use `Popover` (interactive elements break a11y\n * inside a `Tooltip`).\n * **Composition:** wrap any focusable element via `triggerAsChild` so the tooltip targets the underlying\n * native element. Mount `TooltipProvider` once at the app root.\n *\n * @see RECIPES.md#disabled-button-tooltip — for the disabled-button + tooltip pattern\n */\nexport const Tooltip = ({\n tooltip,\n children,\n className,\n keepOpenOnTriggerClick = false,\n variant,\n placement = 'right',\n forceHide = false,\n forceShow = false,\n delayDuration,\n // trigger props\n triggerAsChild = false,\n hintUnderline = false,\n}: Props) => {\n const [open, setOpen] = useState(false);\n\n const resolvedVariant = (() => {\n if (!!variant) return variant;\n if (typeof tooltip === 'string' && tooltip.length > ACTION_TOOLTIP_LIMIT) return 'explanatory';\n\n return 'action';\n })();\n\n const isActionVariant = resolvedVariant === 'action';\n\n const handleKeyUp: ComponentProps<typeof Trigger>['onKeyUp'] = (event) => {\n if (![keyCodes.ENTER, keyCodes.SPACE].includes(event.key)) return;\n event.stopPropagation();\n };\n\n return (\n <TooltipRoot\n open={!!tooltip && (open || forceShow) && !forceHide}\n onOpenChange={setOpen}\n delayDuration={delayDuration}\n disableHoverableContent={isActionVariant}\n >\n <TooltipTrigger\n asChild={triggerAsChild}\n keepOpenOnClick={keepOpenOnTriggerClick}\n onKeyUp={handleKeyUp}\n className={hintUnderline ? HINT_UNDERLINE_CLASS_NAME : undefined}\n >\n {children}\n </TooltipTrigger>\n\n <TooltipContent\n className={className}\n variant={resolvedVariant}\n placement={placement}\n keepOpenOnPointerDownOutside={keepOpenOnTriggerClick}\n >\n {tooltip}\n </TooltipContent>\n </TooltipRoot>\n );\n};\n\nTooltip.Root = TooltipRoot;\nTooltip.Content = TooltipContent;\nTooltip.Trigger = TooltipTrigger;\n","import type { ComponentType } from 'react';\n\nimport { TooltipProvider } from '../components/Tooltip';\n\nexport const withTooltipProvider = (Story: ComponentType) => (\n <TooltipProvider>\n <Story />\n </TooltipProvider>\n);\n\n// Marks a story whose final render arrives asynchronously (lazy chunk, debounced\n// parse). The visual suite waits for every `[data-skeleton]` inside this box to\n// unmount before capturing, so the baseline is the settled content, never the\n// placeholder it briefly shows.\nexport const withVisualSettle = (Story: ComponentType) => (\n <div data-visual-settle>\n <Story />\n </div>\n);\n\n// position:fixed only fills the Storybook iframe, not the browser window.\nexport const withHiddenFullscreen = (Story: ComponentType) => (\n <div className=\"tw:[&_[aria-label=Fullscreen]]:hidden\">\n <Story />\n </div>\n);\n","export const createPrefixedString = (prefix: string) => (literals: TemplateStringsArray) =>\n literals.reduce((acc, literal) => acc + literal, `${prefix}-`);\n","export const noop = () => void 0;\n","type DebouncedFn<T extends (...args: any[]) => void> = {\n (...args: Parameters<T>): void;\n cancel: () => void;\n};\n\nexport const debounce = <T extends (...args: any[]) => void>(\n fn: T,\n delay: number,\n): DebouncedFn<T> => {\n let timeoutId: ReturnType<typeof setTimeout>;\n const debounced = (...args: Parameters<T>) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n debounced.cancel = () => clearTimeout(timeoutId);\n return debounced;\n};\n","// Platform detection\ntype NavigatorUAData = {\n platform: string;\n brands: { brand: string; version: string }[];\n mobile: boolean;\n};\n\nconst getIsMac = (): boolean => {\n // Modern approach using navigator.userAgentData\n if (typeof navigator !== 'undefined' && 'userAgentData' in navigator) {\n const platform = (navigator.userAgentData as NavigatorUAData).platform;\n\n if (typeof platform === 'string') {\n return platform.toLowerCase() === 'macos';\n }\n }\n\n if (typeof navigator !== 'undefined' && typeof navigator.platform === 'string') {\n return navigator.platform.toUpperCase().indexOf('MAC') >= 0;\n }\n\n // Server-side rendering fallback\n return false;\n};\n\nexport const isMac = getIsMac();\n","import { useEffect, useState } from 'react';\n\n// https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string\nconst sha256 = async (text: string) => {\n const msgUint8 = new TextEncoder().encode(text);\n const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);\n const hashArray = Array.from(new Uint8Array(hashBuffer));\n return hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');\n};\n\nexport const useSHA256 = (text?: string) => {\n const [hash, setHash] = useState('');\n\n useEffect(() => {\n if (!text) return;\n let cancelled = false;\n sha256(text).then((h) => {\n if (!cancelled) setHash(h);\n });\n return () => {\n cancelled = true;\n };\n }, [text]);\n\n // Empty input has no hash — derive it during render instead of syncing state\n // in the effect (avoids the extra render and a stale-value frame).\n return text ? hash : '';\n};\n","/** The separator a typed entry is split on when the caller names none. */\nexport const DEFAULT_ENTRY_SEPARATOR = ',';\n\n/**\n * The strings one typed entry stands for.\n *\n * - `id1, id2,` is two values: the blanks a stray separator leaves are dropped.\n * - Every part is trimmed.\n * - A repeat collapses to its first occurrence, case-insensitively, as everything a combobox\n * matches by display string does — one entry cannot add the same value twice.\n * - A `null` separator yields the entry verbatim, for a value that can contain the separator.\n * Nothing is trimmed or dropped there, so a caller that can reach this with blank text has to\n * reject it itself.\n */\nexport const splitEntry = (entry: string, separator: string | RegExp | null): string[] => {\n if (separator === null) return [entry];\n\n const seen = new Set<string>();\n return entry\n .split(separator)\n .map((part) => part.trim())\n .filter((part) => {\n if (part === '') return false;\n const key = part.toLowerCase();\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;AAOA,MAAM,oBAAoB,SAAiB;CACzC,MAAM,OAAO,SAAS,cAAc,UAAU;CAC9C,KAAK,QAAQ;CACb,KAAK,aAAa,YAAY,EAAE;CAChC,KAAK,MAAM,UAAU;CACrB,SAAS,KAAK,OAAO,IAAI;CACzB,KAAK,OAAO;CAEZ,IAAI;EACF,OAAO,SAAS,YAAY,MAAM;CACpC,UAAU;EACR,KAAK,OAAO;CACd;AACF;AAEA,MAAa,kBAAkB,OAAO,SAAiB;CACrD,IAAI;EACF,MAAM,UAAU,UAAU,UAAU,IAAI;CAC1C,SAAS,OAAO;EACd,IAAI,CAAC,iBAAiB,IAAI,GAAG,MAAM;CACrC;AACF;;;AC1BA,MAAa,0BAA0B,UAA4B;CACjE,MAAM,cAA6C;EACjD,QAAQ;EACR,eAAe;EACf,MAAM;EACN,aAAa,IAAI,MAAM,UAAU,EAAE,SAAS,KAAK,CAAC;EAClD,SAAS;EACT,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ,WAAW;EACX,sBAAsB,CAAC;EACvB,0BAA0B;EAC1B,uBAAuB,CAAC;EACxB,4BAA4B;EAC5B,eAAe,CAAC;EAChB,WAAW,KAAK,IAAI;CACtB;CAEA,OAAO,eAAe,aAAa,UAAU;EAC3C,OAAO;EACP,UAAU;CACZ,CAAC;CAED,OAAO;AACT;;;AC3BA,MAAa,WAAW;CACtB,OAAO;CACP,QAAQ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AC,KAAK,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;AACtE;AAEA,MAAa,aAAa,SAAkB;CAC1C,MAAM,CAAC,MAAM,WAAW,SAAS,EAAE;CAEnC,gBAAgB;EACd,IAAI,CAAC,MAAM;EACX,IAAI,YAAY;EAChB,OAAO,IAAI,CAAC,CAAC,MAAM,MAAM;GACvB,IAAI,CAAC,WAAW,QAAQ,CAAC;EAC3B,CAAC;EACD,aAAa;GACX,YAAY;EACd;CACF,GAAG,CAAC,IAAI,CAAC;CAIT,OAAO,OAAO,OAAO;AACvB;;;;AC1BA,MAAa,0BAA0B;;;;;;;;;;;;AAavC,MAAa,cAAc,OAAe,cAAgD;CACxF,IAAI,cAAc,MAAM,OAAO,CAAC,KAAK;CAErC,MAAM,uBAAO,IAAI,IAAY;CAC7B,OAAO,MACJ,MAAM,SAAS,CAAC,CAChB,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,QAAQ,SAAS;EAChB,IAAI,SAAS,IAAI,OAAO;EACxB,MAAM,MAAM,KAAK,YAAY;EAC7B,IAAI,KAAK,IAAI,GAAG,GAAG,OAAO;EAC1B,KAAK,IAAI,GAAG;EACZ,OAAO;CACT,CAAC;AACL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"vegaTheme-CSvFEMBl.js","names":[],"sources":["../src/vega/vegaTokens.ts","../src/vega/vegaTheme.ts"],"sourcesContent":["import type { ResolvedColorScheme } from '../components/ThemeProvider/types';\nimport { createChannelResolver } from '../utils/themeTokens';\n\n/**\n * Serializes `\"R G B\"` channels comma-separated, the only form vega parses.\n *\n * - vega reads colours through d3-color 3.1, which answers `null` for the\n * space-separated CSS Color 4 form the rest of the package emits.\n * - A flat fill survives that anyway — the string reaches the SVG attribute and\n * the browser parses it. An interpolated one does not: both endpoints of a\n * sequential ramp collapse, and a quantitative scale paints solid black.\n */\nexport const vegaRgb = (channels: string, alpha?: number): string => {\n const c = channels.split(/\\s+/).join(', ');\n return alpha === undefined ? `rgb(${c})` : `rgba(${c}, ${alpha})`;\n};\n\n/** The `--chart-*` slots, in series order. */\nexport const SERIES_TOKENS = ['chart-1', 'chart-2', 'chart-3', 'chart-4', 'chart-5'] as const;\n\n/**\n * Fallback channels for the tokens a vega chart reads, mirroring the `:root` /\n * `[data-theme='dark']` blocks of `styles.css`. The resolver reaches these only\n * when the live custom property is missing — SSR, or a unit test that loads no\n * CSS.\n */\nconst FALLBACK_CHANNELS = {\n foreground: { light: '30 41 59', dark: '229 230 236' },\n 'muted-foreground': { light: '100 116 139', dark: '141 144 153' },\n border: { light: '229 231 235', dark: '52 53 62' },\n 'chart-1': { light: '31 143 255', dark: '92 173 255' },\n 'chart-2': { light: '0 194 135', dark: '0 230 161' },\n 'chart-3': { light: '146 92 255', dark: '173 133 255' },\n 'chart-4': { light: '245 147 0', dark: '255 190 92' },\n 'chart-5': { light: '237 94 223', dark: '242 140 232' },\n // The sequential ramp's low end and the surface it must stay legible against.\n accent: { light: '224 242 254', dark: '30 58 95' },\n card: { light: '255 255 255', dark: '34 34 40' },\n} as const;\n\nexport type VegaTokenName = keyof typeof FALLBACK_CHANNELS;\n\n/**\n * A vega-serializing token resolver bound to one `getComputedStyle` snapshot.\n *\n * - Answers `rgb(R, G, B)` / `rgba(R, G, B, a)` — see {@link vegaRgb}.\n * - Falls back per scheme when the custom property is not painted.\n * - Build one per palette, never at module level: the values change whenever\n * the scheme or the brand does.\n */\nexport const createVegaColorResolver = (scheme: ResolvedColorScheme, from?: Element | null) => {\n const resolve = createChannelResolver(from);\n\n return (token: VegaTokenName, alpha?: number): string =>\n vegaRgb(resolve(token, FALLBACK_CHANNELS[token][scheme]), alpha);\n};\n","import type { Config } from 'vega-lite';\n\nimport type { ResolvedColorScheme } from '../components/ThemeProvider/types';\n\nimport { createVegaColorResolver, SERIES_TOKENS } from './vegaTokens';\n\nconst CHART_FONT = 'Inter, system-ui, sans-serif';\n\n/**\n * Scheme-following Vega-Lite config — the design system's chart look as a plain\n * `Config`, for any consumer that compiles or renders a Vega-Lite spec.\n *\n * - `background: 'transparent'` drops vega's opaque white backdrop, so the page\n * surface shows through in both schemes.\n * - Axis/legend/header/title text and lines read the live semantic tokens, so a\n * dark scheme (and a customer brand) recolour the chart chrome for free.\n * - `range.category` is `--chart-1..5` in series order — the same decorative\n * palette the recharts wrappers in `@keboola/design/charts` use — so a\n * categorical encoding matches the rest of the platform's data-viz instead of\n * falling back to vega's `tableau10`.\n * - `range.ramp` puts the low end of a quantitative scale on `--accent` rather\n * than vega's blue-only default, which keeps the pale end legible on a dark\n * surface.\n * - A range set on the spec's own scale still wins, which is how a Flint chart\n * keeps the series colours it resolves during assembly.\n * - Colours are resolved to concrete `rgb(R, G, B)` strings, not `var()`\n * references: vega does its colour maths in JS and never consults the\n * stylesheet. Rebuild the config when the scheme or brand changes —\n * `useVegaTheme` does that for you.\n */\nexport const vegaTheme = (scheme: ResolvedColorScheme, from?: Element | null): Config => {\n const token = createVegaColorResolver(scheme, from);\n\n const label = token('muted-foreground');\n const heading = token('foreground');\n const line = token('border');\n\n return {\n background: 'transparent',\n font: CHART_FONT,\n axis: {\n labelColor: label,\n titleColor: heading,\n gridColor: token('border', 0.6),\n domainColor: line,\n tickColor: line,\n },\n legend: { labelColor: label, titleColor: heading },\n header: { labelColor: label, titleColor: heading },\n title: { color: heading, subtitleColor: label },\n text: { color: heading },\n range: {\n category: SERIES_TOKENS.map((name) => token(name)),\n ramp: [token('accent'), token('chart-1')],\n },\n };\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,WAAW,UAAkB,UAA2B;CACnE,MAAM,IAAI,SAAS,MAAM,KAAK,CAAC,CAAC,KAAK,IAAI;CACzC,OAAO,UAAU,KAAA,IAAY,OAAO,EAAE,KAAK,QAAQ,EAAE,IAAI,MAAM;AACjE;;AAGA,MAAa,gBAAgB;CAAC;CAAW;CAAW;CAAW;CAAW;AAAS;;;;;;;AAQnF,MAAM,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