@constructive-io/ui 0.12.0 → 0.14.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 (493) hide show
  1. package/README.md +1 -1
  2. package/dist/{ai-CiaH2sfF.js → ai-4JrVVL3q.js} +1794 -250
  3. package/dist/ai-4JrVVL3q.js.map +1 -0
  4. package/dist/{ai-lAkichk8.cjs → ai-B08ufcbD.cjs} +1888 -248
  5. package/dist/ai-B08ufcbD.cjs.map +1 -0
  6. package/dist/{alert-BXuP0ayz.d.ts → alert-CJ4Qyk6W.d.cts} +4 -2
  7. package/dist/{alert-BXuP0ayz.d.cts → alert-CJ4Qyk6W.d.ts} +4 -2
  8. package/dist/components/accordion.cjs +60 -0
  9. package/dist/components/accordion.cjs.map +1 -0
  10. package/dist/components/accordion.d.cts +14 -0
  11. package/dist/components/accordion.d.ts +14 -0
  12. package/dist/components/accordion.js +54 -0
  13. package/dist/components/accordion.js.map +1 -0
  14. package/dist/components/ai/index.cjs +17 -1
  15. package/dist/components/ai/index.d.cts +2 -2
  16. package/dist/components/ai/index.d.ts +2 -2
  17. package/dist/components/ai/index.js +2 -2
  18. package/dist/components/alert-dialog.cjs +17 -8
  19. package/dist/components/alert-dialog.cjs.map +1 -1
  20. package/dist/components/alert-dialog.d.cts +1 -1
  21. package/dist/components/alert-dialog.d.ts +1 -1
  22. package/dist/components/alert-dialog.js +17 -8
  23. package/dist/components/alert-dialog.js.map +1 -1
  24. package/dist/components/alert.cjs +18 -8
  25. package/dist/components/alert.cjs.map +1 -1
  26. package/dist/components/alert.d.cts +2 -2
  27. package/dist/components/alert.d.ts +2 -2
  28. package/dist/components/alert.js +18 -9
  29. package/dist/components/alert.js.map +1 -1
  30. package/dist/components/autocomplete.cjs +9 -5
  31. package/dist/components/autocomplete.cjs.map +1 -1
  32. package/dist/components/autocomplete.js +9 -5
  33. package/dist/components/autocomplete.js.map +1 -1
  34. package/dist/components/avatar.cjs +9 -3
  35. package/dist/components/avatar.cjs.map +1 -1
  36. package/dist/components/avatar.d.cts +6 -0
  37. package/dist/components/avatar.d.ts +6 -0
  38. package/dist/components/avatar.js +9 -3
  39. package/dist/components/avatar.js.map +1 -1
  40. package/dist/components/badge.cjs +25 -18
  41. package/dist/components/badge.cjs.map +1 -1
  42. package/dist/components/badge.d.cts +2 -2
  43. package/dist/components/badge.d.ts +2 -2
  44. package/dist/components/badge.js +25 -18
  45. package/dist/components/badge.js.map +1 -1
  46. package/dist/components/breadcrumb.cjs +9 -6
  47. package/dist/components/breadcrumb.cjs.map +1 -1
  48. package/dist/components/breadcrumb.js +9 -6
  49. package/dist/components/breadcrumb.js.map +1 -1
  50. package/dist/components/button-group.cjs +57 -0
  51. package/dist/components/button-group.cjs.map +1 -0
  52. package/dist/components/button-group.d.cts +16 -0
  53. package/dist/components/button-group.d.ts +16 -0
  54. package/dist/components/button-group.js +51 -0
  55. package/dist/components/button-group.js.map +1 -0
  56. package/dist/components/button.cjs +62 -18
  57. package/dist/components/button.cjs.map +1 -1
  58. package/dist/components/button.d.cts +32 -2
  59. package/dist/components/button.d.ts +32 -2
  60. package/dist/components/button.js +62 -18
  61. package/dist/components/button.js.map +1 -1
  62. package/dist/components/calendar-rac.cjs +14 -8
  63. package/dist/components/calendar-rac.cjs.map +1 -1
  64. package/dist/components/calendar-rac.js +14 -8
  65. package/dist/components/calendar-rac.js.map +1 -1
  66. package/dist/components/card.cjs +35 -23
  67. package/dist/components/card.cjs.map +1 -1
  68. package/dist/components/card.d.cts +3 -2
  69. package/dist/components/card.d.ts +3 -2
  70. package/dist/components/card.js +35 -23
  71. package/dist/components/card.js.map +1 -1
  72. package/dist/components/checkbox.cjs +5 -5
  73. package/dist/components/checkbox.cjs.map +1 -1
  74. package/dist/components/checkbox.js +5 -5
  75. package/dist/components/checkbox.js.map +1 -1
  76. package/dist/components/collapsible.cjs +3 -3
  77. package/dist/components/collapsible.cjs.map +1 -1
  78. package/dist/components/collapsible.js +3 -3
  79. package/dist/components/collapsible.js.map +1 -1
  80. package/dist/components/combobox.cjs +24 -12
  81. package/dist/components/combobox.cjs.map +1 -1
  82. package/dist/components/combobox.d.cts +2 -1
  83. package/dist/components/combobox.d.ts +2 -1
  84. package/dist/components/combobox.js +24 -12
  85. package/dist/components/combobox.js.map +1 -1
  86. package/dist/components/command.cjs +30 -14
  87. package/dist/components/command.cjs.map +1 -1
  88. package/dist/components/command.d.cts +9 -2
  89. package/dist/components/command.d.ts +9 -2
  90. package/dist/components/command.js +30 -14
  91. package/dist/components/command.js.map +1 -1
  92. package/dist/components/dialog.cjs +22 -12
  93. package/dist/components/dialog.cjs.map +1 -1
  94. package/dist/components/dialog.d.cts +5 -2
  95. package/dist/components/dialog.d.ts +5 -2
  96. package/dist/components/dialog.js +22 -12
  97. package/dist/components/dialog.js.map +1 -1
  98. package/dist/components/dock.cjs +50 -27
  99. package/dist/components/dock.cjs.map +1 -1
  100. package/dist/components/dock.d.cts +1 -1
  101. package/dist/components/dock.d.ts +1 -1
  102. package/dist/components/dock.js +51 -28
  103. package/dist/components/dock.js.map +1 -1
  104. package/dist/components/drawer.cjs +22 -14
  105. package/dist/components/drawer.cjs.map +1 -1
  106. package/dist/components/drawer.js +22 -14
  107. package/dist/components/drawer.js.map +1 -1
  108. package/dist/components/dropdown-menu.cjs +34 -28
  109. package/dist/components/dropdown-menu.cjs.map +1 -1
  110. package/dist/components/dropdown-menu.d.cts +2 -2
  111. package/dist/components/dropdown-menu.d.ts +2 -2
  112. package/dist/components/dropdown-menu.js +52 -46
  113. package/dist/components/dropdown-menu.js.map +1 -1
  114. package/dist/components/empty.cjs +4 -4
  115. package/dist/components/empty.cjs.map +1 -1
  116. package/dist/components/empty.js +4 -4
  117. package/dist/components/empty.js.map +1 -1
  118. package/dist/components/field.cjs +33 -33
  119. package/dist/components/field.cjs.map +1 -1
  120. package/dist/components/field.js +34 -34
  121. package/dist/components/field.js.map +1 -1
  122. package/dist/components/flickering-grid.cjs +1 -1
  123. package/dist/components/flickering-grid.cjs.map +1 -1
  124. package/dist/components/flickering-grid.js +1 -1
  125. package/dist/components/flickering-grid.js.map +1 -1
  126. package/dist/components/flow-zoom-panel.cjs +10 -5
  127. package/dist/components/flow-zoom-panel.cjs.map +1 -1
  128. package/dist/components/flow-zoom-panel.d.cts +8 -1
  129. package/dist/components/flow-zoom-panel.d.ts +8 -1
  130. package/dist/components/flow-zoom-panel.js +10 -5
  131. package/dist/components/flow-zoom-panel.js.map +1 -1
  132. package/dist/components/form-control.cjs +12 -8
  133. package/dist/components/form-control.cjs.map +1 -1
  134. package/dist/components/form-control.js +12 -8
  135. package/dist/components/form-control.js.map +1 -1
  136. package/dist/components/form.cjs +5 -5
  137. package/dist/components/form.cjs.map +1 -1
  138. package/dist/components/form.js +5 -5
  139. package/dist/components/form.js.map +1 -1
  140. package/dist/components/input-group.cjs +13 -7
  141. package/dist/components/input-group.cjs.map +1 -1
  142. package/dist/components/input-group.d.cts +2 -2
  143. package/dist/components/input-group.d.ts +2 -2
  144. package/dist/components/input-group.js +11 -7
  145. package/dist/components/input-group.js.map +1 -1
  146. package/dist/components/input-otp.cjs +252 -0
  147. package/dist/components/input-otp.cjs.map +1 -0
  148. package/dist/components/input-otp.d.cts +44 -0
  149. package/dist/components/input-otp.d.ts +44 -0
  150. package/dist/components/input-otp.js +251 -0
  151. package/dist/components/input-otp.js.map +1 -0
  152. package/dist/components/input.cjs +10 -4
  153. package/dist/components/input.cjs.map +1 -1
  154. package/dist/components/input.d.cts +11 -2
  155. package/dist/components/input.d.ts +11 -2
  156. package/dist/components/input.js +10 -4
  157. package/dist/components/input.js.map +1 -1
  158. package/dist/components/item.cjs +151 -0
  159. package/dist/components/item.cjs.map +1 -0
  160. package/dist/components/item.d.cts +37 -0
  161. package/dist/components/item.d.ts +37 -0
  162. package/dist/components/item.js +137 -0
  163. package/dist/components/item.js.map +1 -0
  164. package/dist/components/json-input.cjs +4 -143
  165. package/dist/components/json-input.d.cts +6 -4
  166. package/dist/components/json-input.d.ts +6 -4
  167. package/dist/components/json-input.js +2 -140
  168. package/dist/components/kbd.cjs +35 -0
  169. package/dist/components/kbd.cjs.map +1 -0
  170. package/dist/components/kbd.d.cts +16 -0
  171. package/dist/components/kbd.d.ts +16 -0
  172. package/dist/components/kbd.js +31 -0
  173. package/dist/components/kbd.js.map +1 -0
  174. package/dist/components/label.cjs +3 -3
  175. package/dist/components/label.cjs.map +1 -1
  176. package/dist/components/label.js +3 -3
  177. package/dist/components/label.js.map +1 -1
  178. package/dist/components/motion-grid.cjs +20 -8
  179. package/dist/components/motion-grid.cjs.map +1 -1
  180. package/dist/components/motion-grid.js +20 -8
  181. package/dist/components/motion-grid.js.map +1 -1
  182. package/dist/components/multi-select.cjs +77 -67
  183. package/dist/components/multi-select.cjs.map +1 -1
  184. package/dist/components/multi-select.js +77 -67
  185. package/dist/components/multi-select.js.map +1 -1
  186. package/dist/components/page-header.cjs +12 -9
  187. package/dist/components/page-header.cjs.map +1 -1
  188. package/dist/components/page-header.js +12 -9
  189. package/dist/components/page-header.js.map +1 -1
  190. package/dist/components/pagination.cjs +10 -4
  191. package/dist/components/pagination.cjs.map +1 -1
  192. package/dist/components/pagination.d.cts +1 -1
  193. package/dist/components/pagination.d.ts +1 -1
  194. package/dist/components/pagination.js +10 -4
  195. package/dist/components/pagination.js.map +1 -1
  196. package/dist/components/phone-input.cjs +228 -0
  197. package/dist/components/phone-input.cjs.map +1 -0
  198. package/dist/components/phone-input.d.cts +42 -0
  199. package/dist/components/phone-input.d.ts +42 -0
  200. package/dist/components/phone-input.js +220 -0
  201. package/dist/components/phone-input.js.map +1 -0
  202. package/dist/components/popover.cjs +12 -4
  203. package/dist/components/popover.cjs.map +1 -1
  204. package/dist/components/popover.d.cts +7 -1
  205. package/dist/components/popover.d.ts +7 -1
  206. package/dist/components/popover.js +12 -5
  207. package/dist/components/popover.js.map +1 -1
  208. package/dist/components/progress.cjs +20 -3
  209. package/dist/components/progress.cjs.map +1 -1
  210. package/dist/components/progress.d.cts +1 -1
  211. package/dist/components/progress.d.ts +1 -1
  212. package/dist/components/progress.js +20 -3
  213. package/dist/components/progress.js.map +1 -1
  214. package/dist/components/progressive-blur-scroll-container.cjs +2 -2
  215. package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
  216. package/dist/components/progressive-blur-scroll-container.d.cts +1 -1
  217. package/dist/components/progressive-blur-scroll-container.d.ts +1 -1
  218. package/dist/components/progressive-blur-scroll-container.js +2 -2
  219. package/dist/components/progressive-blur-scroll-container.js.map +1 -1
  220. package/dist/components/progressive-blur.cjs +3 -2
  221. package/dist/components/progressive-blur.cjs.map +1 -1
  222. package/dist/components/progressive-blur.js +3 -2
  223. package/dist/components/progressive-blur.js.map +1 -1
  224. package/dist/components/radio-group.cjs +2 -2
  225. package/dist/components/radio-group.cjs.map +1 -1
  226. package/dist/components/radio-group.js +2 -2
  227. package/dist/components/radio-group.js.map +1 -1
  228. package/dist/components/record-picker.cjs +1 -1
  229. package/dist/components/record-picker.js +1 -1
  230. package/dist/components/resizable.cjs +2 -2
  231. package/dist/components/resizable.cjs.map +1 -1
  232. package/dist/components/resizable.js +2 -2
  233. package/dist/components/resizable.js.map +1 -1
  234. package/dist/components/responsive-diagram.cjs +43 -21
  235. package/dist/components/responsive-diagram.cjs.map +1 -1
  236. package/dist/components/responsive-diagram.d.cts +7 -1
  237. package/dist/components/responsive-diagram.d.ts +7 -1
  238. package/dist/components/responsive-diagram.js +43 -21
  239. package/dist/components/responsive-diagram.js.map +1 -1
  240. package/dist/components/scroll-area.cjs +2 -2
  241. package/dist/components/scroll-area.cjs.map +1 -1
  242. package/dist/components/scroll-area.js +2 -2
  243. package/dist/components/scroll-area.js.map +1 -1
  244. package/dist/components/select.cjs +84 -20
  245. package/dist/components/select.cjs.map +1 -1
  246. package/dist/components/select.d.cts +12 -7
  247. package/dist/components/select.d.ts +12 -7
  248. package/dist/components/select.js +84 -20
  249. package/dist/components/select.js.map +1 -1
  250. package/dist/components/separator.cjs +1 -1
  251. package/dist/components/separator.cjs.map +1 -1
  252. package/dist/components/separator.d.cts +11 -2
  253. package/dist/components/separator.d.ts +11 -2
  254. package/dist/components/separator.js +1 -1
  255. package/dist/components/separator.js.map +1 -1
  256. package/dist/components/sheet.cjs +1 -1
  257. package/dist/components/sheet.d.cts +11 -5
  258. package/dist/components/sheet.d.ts +12 -6
  259. package/dist/components/sheet.js +1 -1
  260. package/dist/components/sidebar.cjs +2 -1
  261. package/dist/components/sidebar.d.cts +8 -7
  262. package/dist/components/sidebar.d.ts +8 -7
  263. package/dist/components/sidebar.js +2 -1
  264. package/dist/components/slider.cjs +47 -0
  265. package/dist/components/slider.cjs.map +1 -0
  266. package/dist/components/slider.d.cts +8 -0
  267. package/dist/components/slider.d.ts +8 -0
  268. package/dist/components/slider.js +44 -0
  269. package/dist/components/slider.js.map +1 -0
  270. package/dist/components/sonner.cjs +15 -4
  271. package/dist/components/sonner.cjs.map +1 -1
  272. package/dist/components/sonner.d.cts +10 -1
  273. package/dist/components/sonner.d.ts +10 -1
  274. package/dist/components/sonner.js +16 -5
  275. package/dist/components/sonner.js.map +1 -1
  276. package/dist/components/spinner.cjs +25 -0
  277. package/dist/components/spinner.cjs.map +1 -0
  278. package/dist/components/spinner.d.cts +16 -0
  279. package/dist/components/spinner.d.ts +16 -0
  280. package/dist/components/spinner.js +22 -0
  281. package/dist/components/spinner.js.map +1 -0
  282. package/dist/components/stack/index.cjs +1 -1
  283. package/dist/components/stack/index.d.cts +1 -1
  284. package/dist/components/stack/index.d.ts +1 -1
  285. package/dist/components/stack/index.js +1 -1
  286. package/dist/components/stepper.cjs +23 -17
  287. package/dist/components/stepper.cjs.map +1 -1
  288. package/dist/components/stepper.d.cts +2 -2
  289. package/dist/components/stepper.d.ts +2 -2
  290. package/dist/components/stepper.js +23 -17
  291. package/dist/components/stepper.js.map +1 -1
  292. package/dist/components/switch.cjs +5 -5
  293. package/dist/components/switch.cjs.map +1 -1
  294. package/dist/components/switch.js +5 -5
  295. package/dist/components/switch.js.map +1 -1
  296. package/dist/components/table.cjs +26 -7
  297. package/dist/components/table.cjs.map +1 -1
  298. package/dist/components/table.d.cts +20 -2
  299. package/dist/components/table.d.ts +20 -2
  300. package/dist/components/table.js +26 -8
  301. package/dist/components/table.js.map +1 -1
  302. package/dist/components/tabs.cjs +64 -8
  303. package/dist/components/tabs.cjs.map +1 -1
  304. package/dist/components/tabs.d.cts +13 -2
  305. package/dist/components/tabs.d.ts +13 -2
  306. package/dist/components/tabs.js +66 -11
  307. package/dist/components/tabs.js.map +1 -1
  308. package/dist/components/tags.cjs +10 -5
  309. package/dist/components/tags.cjs.map +1 -1
  310. package/dist/components/tags.d.cts +1 -1
  311. package/dist/components/tags.d.ts +1 -1
  312. package/dist/components/tags.js +10 -5
  313. package/dist/components/tags.js.map +1 -1
  314. package/dist/components/textarea.cjs +5 -4
  315. package/dist/components/textarea.cjs.map +1 -1
  316. package/dist/components/textarea.js +5 -4
  317. package/dist/components/textarea.js.map +1 -1
  318. package/dist/components/toast/index.cjs +1 -1
  319. package/dist/components/toast/index.d.cts +2 -2
  320. package/dist/components/toast/index.d.ts +2 -2
  321. package/dist/components/toast/index.js +1 -1
  322. package/dist/components/toggle-group.cjs +69 -0
  323. package/dist/components/toggle-group.cjs.map +1 -0
  324. package/dist/components/toggle-group.d.cts +27 -0
  325. package/dist/components/toggle-group.d.ts +27 -0
  326. package/dist/components/toggle-group.js +65 -0
  327. package/dist/components/toggle-group.js.map +1 -0
  328. package/dist/components/toggle.cjs +54 -0
  329. package/dist/components/toggle.cjs.map +1 -0
  330. package/dist/components/toggle.d.cts +13 -0
  331. package/dist/components/toggle.d.ts +13 -0
  332. package/dist/components/toggle.js +50 -0
  333. package/dist/components/toggle.js.map +1 -0
  334. package/dist/components/tooltip.cjs +18 -6
  335. package/dist/components/tooltip.cjs.map +1 -1
  336. package/dist/components/tooltip.d.cts +1 -1
  337. package/dist/components/tooltip.d.ts +1 -1
  338. package/dist/components/tooltip.js +18 -6
  339. package/dist/components/tooltip.js.map +1 -1
  340. package/dist/components/unlink-button.cjs +2 -2
  341. package/dist/components/unlink-button.cjs.map +1 -1
  342. package/dist/components/unlink-button.d.cts +1 -0
  343. package/dist/components/unlink-button.d.ts +1 -0
  344. package/dist/components/unlink-button.js +2 -2
  345. package/dist/components/unlink-button.js.map +1 -1
  346. package/dist/components/workspace-kit/index.cjs +1507 -0
  347. package/dist/components/workspace-kit/index.cjs.map +1 -0
  348. package/dist/components/workspace-kit/index.d.cts +728 -0
  349. package/dist/components/workspace-kit/index.d.ts +728 -0
  350. package/dist/components/workspace-kit/index.js +1440 -0
  351. package/dist/components/workspace-kit/index.js.map +1 -0
  352. package/dist/compose-refs-Mbma1O3M.js +47 -0
  353. package/dist/compose-refs-Mbma1O3M.js.map +1 -0
  354. package/dist/compose-refs-uPrvNoiU.cjs +52 -0
  355. package/dist/compose-refs-uPrvNoiU.cjs.map +1 -0
  356. package/dist/fluid-highlight-CNELHV8o.js +134 -0
  357. package/dist/fluid-highlight-CNELHV8o.js.map +1 -0
  358. package/dist/fluid-highlight-YWFRZXsw.cjs +145 -0
  359. package/dist/fluid-highlight-YWFRZXsw.cjs.map +1 -0
  360. package/dist/{index-BzLmDsId.d.cts → index-B7cT7gZU.d.cts} +3 -3
  361. package/dist/{index-BzLmDsId.d.ts → index-B7cT7gZU.d.ts} +3 -3
  362. package/dist/{index-UnM04j0t.d.ts → index-BQZxmMpw.d.cts} +11 -31
  363. package/dist/{index-UnM04j0t.d.cts → index-BQZxmMpw.d.ts} +11 -31
  364. package/dist/{index-CyaFaZe2.d.cts → index-Cluc_xc5.d.ts} +345 -20
  365. package/dist/{index-B0wXxIAb.d.ts → index-DXoG0ghv.d.cts} +345 -20
  366. package/dist/index.cjs +107 -17
  367. package/dist/index.d.cts +64 -14
  368. package/dist/index.d.ts +64 -14
  369. package/dist/index.js +27 -14
  370. package/dist/initial-focus-B8RLtyOZ.cjs +67 -0
  371. package/dist/initial-focus-B8RLtyOZ.cjs.map +1 -0
  372. package/dist/initial-focus-j2E0EnIx.js +61 -0
  373. package/dist/initial-focus-j2E0EnIx.js.map +1 -0
  374. package/dist/initials-DSkWTOb0.cjs +127 -0
  375. package/dist/initials-DSkWTOb0.cjs.map +1 -0
  376. package/dist/initials-kCcHgrSy.js +97 -0
  377. package/dist/initials-kCcHgrSy.js.map +1 -0
  378. package/dist/json-input-CH5aEmoA.js +293 -0
  379. package/dist/json-input-CH5aEmoA.js.map +1 -0
  380. package/dist/json-input-D8yM578l.cjs +311 -0
  381. package/dist/json-input-D8yM578l.cjs.map +1 -0
  382. package/dist/{motion-config-COCFHq1L.cjs → motion-config-DZ7w5Uhq.cjs} +32 -2
  383. package/dist/motion-config-DZ7w5Uhq.cjs.map +1 -0
  384. package/dist/{motion-config-COsZ6azM.js → motion-config-DoFp4I8f.js} +21 -3
  385. package/dist/motion-config-DoFp4I8f.js.map +1 -0
  386. package/dist/{record-picker-Bz4FApxD.cjs → record-picker-BQ1-Vx0g.cjs} +23 -8
  387. package/dist/record-picker-BQ1-Vx0g.cjs.map +1 -0
  388. package/dist/{record-picker-BbxngCeV.js → record-picker-DSRo4RXV.js} +23 -8
  389. package/dist/record-picker-DSRo4RXV.js.map +1 -0
  390. package/dist/{sheet-BdA0rfIz.cjs → sheet-OxWlnT_G.cjs} +25 -32
  391. package/dist/sheet-OxWlnT_G.cjs.map +1 -0
  392. package/dist/{sheet-BLHnhLRH.js → sheet-wPF_l9Cn.js} +25 -32
  393. package/dist/sheet-wPF_l9Cn.js.map +1 -0
  394. package/dist/{sidebar-BavjjJp0.cjs → sidebar-BEEWmJwC.cjs} +74 -57
  395. package/dist/sidebar-BEEWmJwC.cjs.map +1 -0
  396. package/dist/{sidebar-DeoL2ttp.js → sidebar-DWl1Azyv.js} +74 -57
  397. package/dist/sidebar-DWl1Azyv.js.map +1 -0
  398. package/dist/{stack-ci2lkfkr.cjs → stack-CEvmUSwF.cjs} +12 -10
  399. package/dist/stack-CEvmUSwF.cjs.map +1 -0
  400. package/dist/{stack-C9GROTGA.js → stack-Kqu7YaR0.js} +12 -10
  401. package/dist/stack-Kqu7YaR0.js.map +1 -0
  402. package/dist/text-runs-CdmlS5C7.cjs +52 -0
  403. package/dist/text-runs-CdmlS5C7.cjs.map +1 -0
  404. package/dist/text-runs-DqcEO8L_.js +45 -0
  405. package/dist/text-runs-DqcEO8L_.js.map +1 -0
  406. package/dist/theme-CKpIa4Fj.d.cts +536 -0
  407. package/dist/theme-CKpIa4Fj.d.ts +536 -0
  408. package/dist/theme-dials-config.cjs +273 -0
  409. package/dist/theme-dials-config.cjs.map +1 -0
  410. package/dist/theme-dials-config.d.cts +95 -0
  411. package/dist/theme-dials-config.d.ts +95 -0
  412. package/dist/theme-dials-config.js +269 -0
  413. package/dist/theme-dials-config.js.map +1 -0
  414. package/dist/theme-presets.cjs +922 -0
  415. package/dist/theme-presets.cjs.map +1 -0
  416. package/dist/theme-presets.d.cts +89 -0
  417. package/dist/theme-presets.d.ts +89 -0
  418. package/dist/theme-presets.js +912 -0
  419. package/dist/theme-presets.js.map +1 -0
  420. package/dist/theme-tuning-CTOHSrsh.d.cts +158 -0
  421. package/dist/theme-tuning-DOko6Pmy.d.ts +158 -0
  422. package/dist/theme-tuning.cjs +349 -0
  423. package/dist/theme-tuning.cjs.map +1 -0
  424. package/dist/theme-tuning.d.cts +2 -0
  425. package/dist/theme-tuning.d.ts +2 -0
  426. package/dist/theme-tuning.js +333 -0
  427. package/dist/theme-tuning.js.map +1 -0
  428. package/dist/theme.cjs +438 -0
  429. package/dist/theme.cjs.map +1 -0
  430. package/dist/theme.d.cts +2 -0
  431. package/dist/theme.d.ts +2 -0
  432. package/dist/theme.js +436 -0
  433. package/dist/theme.js.map +1 -0
  434. package/dist/toast-08jF1DBQ.cjs +193 -0
  435. package/dist/toast-08jF1DBQ.cjs.map +1 -0
  436. package/dist/toast-CVW5XY4u.js +164 -0
  437. package/dist/toast-CVW5XY4u.js.map +1 -0
  438. package/dist/toast-details-BdxxSLlN.cjs +209 -0
  439. package/dist/toast-details-BdxxSLlN.cjs.map +1 -0
  440. package/dist/toast-details-CfsB1Vxb.js +198 -0
  441. package/dist/toast-details-CfsB1Vxb.js.map +1 -0
  442. package/dist/{tooltip-CTRQoN1A.d.ts → tooltip-Fqb4JK-g.d.cts} +2 -2
  443. package/dist/{tooltip-CTRQoN1A.d.cts → tooltip-Fqb4JK-g.d.ts} +2 -2
  444. package/dist/tuning-BKVFsxLr.js +48 -0
  445. package/dist/tuning-BKVFsxLr.js.map +1 -0
  446. package/dist/tuning-BRPG7U1U.cjs +71 -0
  447. package/dist/tuning-BRPG7U1U.cjs.map +1 -0
  448. package/dist/use-document-theme-BSEuNsEE.cjs +43 -0
  449. package/dist/use-document-theme-BSEuNsEE.cjs.map +1 -0
  450. package/dist/use-document-theme-Ch_PqxZz.js +38 -0
  451. package/dist/use-document-theme-Ch_PqxZz.js.map +1 -0
  452. package/dist/use-scroll-fade-CaHp52u4.cjs +79 -0
  453. package/dist/use-scroll-fade-CaHp52u4.cjs.map +1 -0
  454. package/dist/use-scroll-fade-ilq-o00-.js +72 -0
  455. package/dist/use-scroll-fade-ilq-o00-.js.map +1 -0
  456. package/package.json +166 -27
  457. package/src/styles/globals.css +194 -97
  458. package/dist/ai-CiaH2sfF.js.map +0 -1
  459. package/dist/ai-lAkichk8.cjs.map +0 -1
  460. package/dist/button-Bvh83YGs.d.cts +0 -20
  461. package/dist/button-Bvh83YGs.d.ts +0 -20
  462. package/dist/components/app-bar.cjs +0 -81
  463. package/dist/components/app-bar.cjs.map +0 -1
  464. package/dist/components/app-bar.d.cts +0 -27
  465. package/dist/components/app-bar.d.ts +0 -27
  466. package/dist/components/app-bar.js +0 -77
  467. package/dist/components/app-bar.js.map +0 -1
  468. package/dist/components/app-shell.cjs +0 -267
  469. package/dist/components/app-shell.cjs.map +0 -1
  470. package/dist/components/app-shell.d.cts +0 -98
  471. package/dist/components/app-shell.d.ts +0 -98
  472. package/dist/components/app-shell.js +0 -264
  473. package/dist/components/app-shell.js.map +0 -1
  474. package/dist/components/json-input.cjs.map +0 -1
  475. package/dist/components/json-input.js.map +0 -1
  476. package/dist/input-CBrCuMH8.d.cts +0 -11
  477. package/dist/input-CBrCuMH8.d.ts +0 -11
  478. package/dist/motion-config-COCFHq1L.cjs.map +0 -1
  479. package/dist/motion-config-COsZ6azM.js.map +0 -1
  480. package/dist/record-picker-BbxngCeV.js.map +0 -1
  481. package/dist/record-picker-Bz4FApxD.cjs.map +0 -1
  482. package/dist/separator-BQEsr0Rc.d.cts +0 -11
  483. package/dist/separator-BQEsr0Rc.d.ts +0 -11
  484. package/dist/sheet-BLHnhLRH.js.map +0 -1
  485. package/dist/sheet-BdA0rfIz.cjs.map +0 -1
  486. package/dist/sidebar-BavjjJp0.cjs.map +0 -1
  487. package/dist/sidebar-DeoL2ttp.js.map +0 -1
  488. package/dist/stack-C9GROTGA.js.map +0 -1
  489. package/dist/stack-ci2lkfkr.cjs.map +0 -1
  490. package/dist/toast-D6MqijT2.cjs +0 -316
  491. package/dist/toast-D6MqijT2.cjs.map +0 -1
  492. package/dist/toast-D_BOLzm3.js +0 -287
  493. package/dist/toast-D_BOLzm3.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"progressive-blur-scroll-container.cjs","names":["cn","ProgressiveBlur"],"sources":["../../src/components/progressive-blur-scroll-container.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { ProgressiveBlur, type ProgressiveBlurProps } from './progressive-blur';\n\nexport interface ProgressiveBlurScrollContainerProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n\t/** Class name for the scrollable inner div */\n\tscrollClassName?: string;\n\t/** Minimum number of items to show blur (prevents blur on sparse content) */\n\tminItemsForBlur?: number;\n\t/** Current item count for minItemsForBlur check */\n\titemCount?: number;\n\t/** Props to pass to ProgressiveBlur */\n\tblurProps?: Partial<ProgressiveBlurProps>;\n\t/** Whether to show blur (in addition to overflow check) */\n\tshowBlur?: boolean;\n}\n\n/**\n * A scrollable container that shows progressive blur effects at the top and bottom\n * when content overflows. Top blur appears when scrolled, bottom blur when more content below.\n */\nexport function ProgressiveBlurScrollContainer({\n\tchildren,\n\tclassName,\n\tscrollClassName,\n\tminItemsForBlur = 0,\n\titemCount = 0,\n\tblurProps,\n\tshowBlur = true,\n}: ProgressiveBlurScrollContainerProps) {\n\tconst [hasOverflow, setHasOverflow] = useState(false);\n\tconst [isScrolledFromTop, setIsScrolledFromTop] = useState(false);\n\tconst [isScrolledFromBottom, setIsScrolledFromBottom] = useState(true);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\n\tconst checkScrollPosition = useCallback(() => {\n\t\tif (scrollRef.current) {\n\t\t\tconst el = scrollRef.current;\n\t\t\tconst scrollTop = el.scrollTop;\n\t\t\tconst scrollHeight = el.scrollHeight;\n\t\t\tconst clientHeight = el.clientHeight;\n\n\t\t\t// Show top blur if scrolled more than 10px from top\n\t\t\tsetIsScrolledFromTop(scrollTop > 10);\n\t\t\t// Show bottom blur if not scrolled to bottom (with 10px threshold)\n\t\t\tsetIsScrolledFromBottom(scrollTop + clientHeight < scrollHeight - 10);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst checkOverflow = () => {\n\t\t\tif (scrollRef.current) {\n\t\t\t\tconst el = scrollRef.current;\n\t\t\t\tsetHasOverflow(el.scrollHeight > el.clientHeight);\n\t\t\t\tcheckScrollPosition();\n\t\t\t}\n\t\t};\n\t\tcheckOverflow();\n\t\twindow.addEventListener('resize', checkOverflow);\n\t\treturn () => window.removeEventListener('resize', checkOverflow);\n\t}, [children, checkScrollPosition]);\n\n\t// Listen to scroll events\n\tuseEffect(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (!el) return;\n\n\t\tel.addEventListener('scroll', checkScrollPosition, { passive: true });\n\t\treturn () => el.removeEventListener('scroll', checkScrollPosition);\n\t}, [checkScrollPosition]);\n\n\tconst canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount > minItemsForBlur);\n\n\treturn (\n\t\t<div className={cn('relative min-h-0 flex-1', className)}>\n\t\t\t<div\n\t\t\t\tref={scrollRef}\n\t\t\t\tclassName={cn('absolute inset-0 overflow-y-auto', scrollClassName)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{canShowBlur && isScrolledFromTop && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='top'\n\t\t\t\t\theight='48px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.2}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{canShowBlur && isScrolledFromBottom && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='bottom'\n\t\t\t\t\theight='64px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.25}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;AA2BA,SAAgB,+BAA+B,EAC9C,UACA,WACA,iBACA,kBAAkB,GAClB,YAAY,GACZ,WACA,WAAW,QAC4B;CACvC,MAAM,CAAC,aAAa,sCAA2B,KAAK;CACpD,MAAM,CAAC,mBAAmB,4CAAiC,KAAK;CAChE,MAAM,CAAC,sBAAsB,+CAAoC,IAAI;CACrE,MAAM,8BAAmC,IAAI;CAE7C,MAAM,mDAAwC;EAC7C,IAAI,UAAU,SAAS;GACtB,MAAM,KAAK,UAAU;GACrB,MAAM,YAAY,GAAG;GACrB,MAAM,eAAe,GAAG;GACxB,MAAM,eAAe,GAAG;GAGxB,qBAAqB,YAAY,EAAE;GAEnC,wBAAwB,YAAY,eAAe,eAAe,EAAE;EACrE;CACD,GAAG,CAAC,CAAC;CAEL,2BAAgB;EACf,MAAM,sBAAsB;GAC3B,IAAI,UAAU,SAAS;IACtB,MAAM,KAAK,UAAU;IACrB,eAAe,GAAG,eAAe,GAAG,YAAY;IAChD,oBAAoB;GACrB;EACD;EACA,cAAc;EACd,OAAO,iBAAiB,UAAU,aAAa;EAC/C,aAAa,OAAO,oBAAoB,UAAU,aAAa;CAChE,GAAG,CAAC,UAAU,mBAAmB,CAAC;CAGlC,2BAAgB;EACf,MAAM,KAAK,UAAU;EACrB,IAAI,CAAC,IAAI;EAET,GAAG,iBAAiB,UAAU,qBAAqB,EAAE,SAAS,KAAK,CAAC;EACpE,aAAa,GAAG,oBAAoB,UAAU,mBAAmB;CAClE,GAAG,CAAC,mBAAmB,CAAC;CAExB,MAAM,cAAc,YAAY,gBAAgB,oBAAoB,KAAK,YAAY;CAErF,OACC,4CAAC,OAAD;EAAK,WAAWA,iBAAG,2BAA2B,SAAS;YAAvD;GACC,2CAAC,OAAD;IACC,KAAK;IACL,WAAWA,iBAAG,oCAAoC,eAAe;IAEhE;GACG;GACJ,eAAe,qBACf,2CAACC,qDAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;GAED,eAAe,wBACf,2CAACA,qDAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;EAEE;;AAEP"}
1
+ {"version":3,"file":"progressive-blur-scroll-container.cjs","names":["cn","ProgressiveBlur"],"sources":["../../src/components/progressive-blur-scroll-container.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { ProgressiveBlur, type ProgressiveBlurProps } from './progressive-blur';\n\nexport interface ProgressiveBlurScrollContainerProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n\t/** Class name for the scrollable inner div */\n\tscrollClassName?: string;\n\t/** Minimum number of items to show blur (prevents blur on sparse content) */\n\tminItemsForBlur?: number;\n\t/** Current item count for the `minItemsForBlur` check. Leave it out and the threshold is ignored. */\n\titemCount?: number;\n\t/** Props to pass to ProgressiveBlur */\n\tblurProps?: Partial<ProgressiveBlurProps>;\n\t/** Whether to show blur (in addition to overflow check) */\n\tshowBlur?: boolean;\n}\n\n/**\n * A scrollable container that shows progressive blur effects at the top and bottom\n * when content overflows. Top blur appears when scrolled, bottom blur when more content below.\n */\nexport function ProgressiveBlurScrollContainer({\n\tchildren,\n\tclassName,\n\tscrollClassName,\n\tminItemsForBlur = 0,\n\titemCount,\n\tblurProps,\n\tshowBlur = true,\n}: ProgressiveBlurScrollContainerProps) {\n\tconst [hasOverflow, setHasOverflow] = useState(false);\n\tconst [isScrolledFromTop, setIsScrolledFromTop] = useState(false);\n\tconst [isScrolledFromBottom, setIsScrolledFromBottom] = useState(true);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\n\tconst checkScrollPosition = useCallback(() => {\n\t\tif (scrollRef.current) {\n\t\t\tconst el = scrollRef.current;\n\t\t\tconst scrollTop = el.scrollTop;\n\t\t\tconst scrollHeight = el.scrollHeight;\n\t\t\tconst clientHeight = el.clientHeight;\n\n\t\t\t// Show top blur if scrolled more than 10px from top\n\t\t\tsetIsScrolledFromTop(scrollTop > 10);\n\t\t\t// Show bottom blur if not scrolled to bottom (with 10px threshold)\n\t\t\tsetIsScrolledFromBottom(scrollTop + clientHeight < scrollHeight - 10);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst checkOverflow = () => {\n\t\t\tif (scrollRef.current) {\n\t\t\t\tconst el = scrollRef.current;\n\t\t\t\tsetHasOverflow(el.scrollHeight > el.clientHeight);\n\t\t\t\tcheckScrollPosition();\n\t\t\t}\n\t\t};\n\t\tcheckOverflow();\n\t\twindow.addEventListener('resize', checkOverflow);\n\t\treturn () => window.removeEventListener('resize', checkOverflow);\n\t}, [children, checkScrollPosition]);\n\n\t// Listen to scroll events\n\tuseEffect(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (!el) return;\n\n\t\tel.addEventListener('scroll', checkScrollPosition, { passive: true });\n\t\treturn () => el.removeEventListener('scroll', checkScrollPosition);\n\t}, [checkScrollPosition]);\n\n\tconst canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount === undefined || itemCount > minItemsForBlur);\n\n\treturn (\n\t\t<div className={cn('relative min-h-0 flex-1', className)}>\n\t\t\t<div\n\t\t\t\tref={scrollRef}\n\t\t\t\tclassName={cn('absolute inset-0 overflow-y-auto', scrollClassName)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{canShowBlur && isScrolledFromTop && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='top'\n\t\t\t\t\theight='48px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.2}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{canShowBlur && isScrolledFromBottom && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='bottom'\n\t\t\t\t\theight='64px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.25}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;AA2BA,SAAgB,+BAA+B,EAC9C,UACA,WACA,iBACA,kBAAkB,GAClB,WACA,WACA,WAAW,QAC4B;CACvC,MAAM,CAAC,aAAa,sCAA2B,KAAK;CACpD,MAAM,CAAC,mBAAmB,4CAAiC,KAAK;CAChE,MAAM,CAAC,sBAAsB,+CAAoC,IAAI;CACrE,MAAM,8BAAmC,IAAI;CAE7C,MAAM,mDAAwC;EAC7C,IAAI,UAAU,SAAS;GACtB,MAAM,KAAK,UAAU;GACrB,MAAM,YAAY,GAAG;GACrB,MAAM,eAAe,GAAG;GACxB,MAAM,eAAe,GAAG;GAGxB,qBAAqB,YAAY,EAAE;GAEnC,wBAAwB,YAAY,eAAe,eAAe,EAAE;EACrE;CACD,GAAG,CAAC,CAAC;CAEL,2BAAgB;EACf,MAAM,sBAAsB;GAC3B,IAAI,UAAU,SAAS;IACtB,MAAM,KAAK,UAAU;IACrB,eAAe,GAAG,eAAe,GAAG,YAAY;IAChD,oBAAoB;GACrB;EACD;EACA,cAAc;EACd,OAAO,iBAAiB,UAAU,aAAa;EAC/C,aAAa,OAAO,oBAAoB,UAAU,aAAa;CAChE,GAAG,CAAC,UAAU,mBAAmB,CAAC;CAGlC,2BAAgB;EACf,MAAM,KAAK,UAAU;EACrB,IAAI,CAAC,IAAI;EAET,GAAG,iBAAiB,UAAU,qBAAqB,EAAE,SAAS,KAAK,CAAC;EACpE,aAAa,GAAG,oBAAoB,UAAU,mBAAmB;CAClE,GAAG,CAAC,mBAAmB,CAAC;CAExB,MAAM,cAAc,YAAY,gBAAgB,oBAAoB,KAAK,cAAc,UAAa,YAAY;CAEhH,OACC,4CAAC,OAAD;EAAK,WAAWA,iBAAG,2BAA2B,SAAS;YAAvD;GACC,2CAAC,OAAD;IACC,KAAK;IACL,WAAWA,iBAAG,oCAAoC,eAAe;IAEhE;GACG;GACJ,eAAe,qBACf,2CAACC,qDAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;GAED,eAAe,wBACf,2CAACA,qDAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;EAEE;;AAEP"}
@@ -8,7 +8,7 @@ interface ProgressiveBlurScrollContainerProps {
8
8
  scrollClassName?: string;
9
9
  /** Minimum number of items to show blur (prevents blur on sparse content) */
10
10
  minItemsForBlur?: number;
11
- /** Current item count for minItemsForBlur check */
11
+ /** Current item count for the `minItemsForBlur` check. Leave it out and the threshold is ignored. */
12
12
  itemCount?: number;
13
13
  /** Props to pass to ProgressiveBlur */
14
14
  blurProps?: Partial<ProgressiveBlurProps>;
@@ -8,7 +8,7 @@ interface ProgressiveBlurScrollContainerProps {
8
8
  scrollClassName?: string;
9
9
  /** Minimum number of items to show blur (prevents blur on sparse content) */
10
10
  minItemsForBlur?: number;
11
- /** Current item count for minItemsForBlur check */
11
+ /** Current item count for the `minItemsForBlur` check. Leave it out and the threshold is ignored. */
12
12
  itemCount?: number;
13
13
  /** Props to pass to ProgressiveBlur */
14
14
  blurProps?: Partial<ProgressiveBlurProps>;
@@ -10,7 +10,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  * A scrollable container that shows progressive blur effects at the top and bottom
11
11
  * when content overflows. Top blur appears when scrolled, bottom blur when more content below.
12
12
  */
13
- function ProgressiveBlurScrollContainer({ children, className, scrollClassName, minItemsForBlur = 0, itemCount = 0, blurProps, showBlur = true }) {
13
+ function ProgressiveBlurScrollContainer({ children, className, scrollClassName, minItemsForBlur = 0, itemCount, blurProps, showBlur = true }) {
14
14
  const [hasOverflow, setHasOverflow] = useState(false);
15
15
  const [isScrolledFromTop, setIsScrolledFromTop] = useState(false);
16
16
  const [isScrolledFromBottom, setIsScrolledFromBottom] = useState(true);
@@ -43,7 +43,7 @@ function ProgressiveBlurScrollContainer({ children, className, scrollClassName,
43
43
  el.addEventListener("scroll", checkScrollPosition, { passive: true });
44
44
  return () => el.removeEventListener("scroll", checkScrollPosition);
45
45
  }, [checkScrollPosition]);
46
- const canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount > minItemsForBlur);
46
+ const canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount === void 0 || itemCount > minItemsForBlur);
47
47
  return /* @__PURE__ */ jsxs("div", {
48
48
  className: cn("relative min-h-0 flex-1", className),
49
49
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"progressive-blur-scroll-container.js","names":[],"sources":["../../src/components/progressive-blur-scroll-container.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { ProgressiveBlur, type ProgressiveBlurProps } from './progressive-blur';\n\nexport interface ProgressiveBlurScrollContainerProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n\t/** Class name for the scrollable inner div */\n\tscrollClassName?: string;\n\t/** Minimum number of items to show blur (prevents blur on sparse content) */\n\tminItemsForBlur?: number;\n\t/** Current item count for minItemsForBlur check */\n\titemCount?: number;\n\t/** Props to pass to ProgressiveBlur */\n\tblurProps?: Partial<ProgressiveBlurProps>;\n\t/** Whether to show blur (in addition to overflow check) */\n\tshowBlur?: boolean;\n}\n\n/**\n * A scrollable container that shows progressive blur effects at the top and bottom\n * when content overflows. Top blur appears when scrolled, bottom blur when more content below.\n */\nexport function ProgressiveBlurScrollContainer({\n\tchildren,\n\tclassName,\n\tscrollClassName,\n\tminItemsForBlur = 0,\n\titemCount = 0,\n\tblurProps,\n\tshowBlur = true,\n}: ProgressiveBlurScrollContainerProps) {\n\tconst [hasOverflow, setHasOverflow] = useState(false);\n\tconst [isScrolledFromTop, setIsScrolledFromTop] = useState(false);\n\tconst [isScrolledFromBottom, setIsScrolledFromBottom] = useState(true);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\n\tconst checkScrollPosition = useCallback(() => {\n\t\tif (scrollRef.current) {\n\t\t\tconst el = scrollRef.current;\n\t\t\tconst scrollTop = el.scrollTop;\n\t\t\tconst scrollHeight = el.scrollHeight;\n\t\t\tconst clientHeight = el.clientHeight;\n\n\t\t\t// Show top blur if scrolled more than 10px from top\n\t\t\tsetIsScrolledFromTop(scrollTop > 10);\n\t\t\t// Show bottom blur if not scrolled to bottom (with 10px threshold)\n\t\t\tsetIsScrolledFromBottom(scrollTop + clientHeight < scrollHeight - 10);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst checkOverflow = () => {\n\t\t\tif (scrollRef.current) {\n\t\t\t\tconst el = scrollRef.current;\n\t\t\t\tsetHasOverflow(el.scrollHeight > el.clientHeight);\n\t\t\t\tcheckScrollPosition();\n\t\t\t}\n\t\t};\n\t\tcheckOverflow();\n\t\twindow.addEventListener('resize', checkOverflow);\n\t\treturn () => window.removeEventListener('resize', checkOverflow);\n\t}, [children, checkScrollPosition]);\n\n\t// Listen to scroll events\n\tuseEffect(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (!el) return;\n\n\t\tel.addEventListener('scroll', checkScrollPosition, { passive: true });\n\t\treturn () => el.removeEventListener('scroll', checkScrollPosition);\n\t}, [checkScrollPosition]);\n\n\tconst canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount > minItemsForBlur);\n\n\treturn (\n\t\t<div className={cn('relative min-h-0 flex-1', className)}>\n\t\t\t<div\n\t\t\t\tref={scrollRef}\n\t\t\t\tclassName={cn('absolute inset-0 overflow-y-auto', scrollClassName)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{canShowBlur && isScrolledFromTop && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='top'\n\t\t\t\t\theight='48px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.2}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{canShowBlur && isScrolledFromBottom && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='bottom'\n\t\t\t\t\theight='64px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.25}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAgB,+BAA+B,EAC9C,UACA,WACA,iBACA,kBAAkB,GAClB,YAAY,GACZ,WACA,WAAW,QAC4B;CACvC,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,KAAK;CAChE,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,IAAI;CACrE,MAAM,YAAY,OAAuB,IAAI;CAE7C,MAAM,sBAAsB,kBAAkB;EAC7C,IAAI,UAAU,SAAS;GACtB,MAAM,KAAK,UAAU;GACrB,MAAM,YAAY,GAAG;GACrB,MAAM,eAAe,GAAG;GACxB,MAAM,eAAe,GAAG;GAGxB,qBAAqB,YAAY,EAAE;GAEnC,wBAAwB,YAAY,eAAe,eAAe,EAAE;EACrE;CACD,GAAG,CAAC,CAAC;CAEL,gBAAgB;EACf,MAAM,sBAAsB;GAC3B,IAAI,UAAU,SAAS;IACtB,MAAM,KAAK,UAAU;IACrB,eAAe,GAAG,eAAe,GAAG,YAAY;IAChD,oBAAoB;GACrB;EACD;EACA,cAAc;EACd,OAAO,iBAAiB,UAAU,aAAa;EAC/C,aAAa,OAAO,oBAAoB,UAAU,aAAa;CAChE,GAAG,CAAC,UAAU,mBAAmB,CAAC;CAGlC,gBAAgB;EACf,MAAM,KAAK,UAAU;EACrB,IAAI,CAAC,IAAI;EAET,GAAG,iBAAiB,UAAU,qBAAqB,EAAE,SAAS,KAAK,CAAC;EACpE,aAAa,GAAG,oBAAoB,UAAU,mBAAmB;CAClE,GAAG,CAAC,mBAAmB,CAAC;CAExB,MAAM,cAAc,YAAY,gBAAgB,oBAAoB,KAAK,YAAY;CAErF,OACC,qBAAC,OAAD;EAAK,WAAW,GAAG,2BAA2B,SAAS;YAAvD;GACC,oBAAC,OAAD;IACC,KAAK;IACL,WAAW,GAAG,oCAAoC,eAAe;IAEhE;GACG;GACJ,eAAe,qBACf,oBAAC,iBAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;GAED,eAAe,wBACf,oBAAC,iBAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;EAEE;;AAEP"}
1
+ {"version":3,"file":"progressive-blur-scroll-container.js","names":[],"sources":["../../src/components/progressive-blur-scroll-container.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState, type ReactNode } from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { ProgressiveBlur, type ProgressiveBlurProps } from './progressive-blur';\n\nexport interface ProgressiveBlurScrollContainerProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n\t/** Class name for the scrollable inner div */\n\tscrollClassName?: string;\n\t/** Minimum number of items to show blur (prevents blur on sparse content) */\n\tminItemsForBlur?: number;\n\t/** Current item count for the `minItemsForBlur` check. Leave it out and the threshold is ignored. */\n\titemCount?: number;\n\t/** Props to pass to ProgressiveBlur */\n\tblurProps?: Partial<ProgressiveBlurProps>;\n\t/** Whether to show blur (in addition to overflow check) */\n\tshowBlur?: boolean;\n}\n\n/**\n * A scrollable container that shows progressive blur effects at the top and bottom\n * when content overflows. Top blur appears when scrolled, bottom blur when more content below.\n */\nexport function ProgressiveBlurScrollContainer({\n\tchildren,\n\tclassName,\n\tscrollClassName,\n\tminItemsForBlur = 0,\n\titemCount,\n\tblurProps,\n\tshowBlur = true,\n}: ProgressiveBlurScrollContainerProps) {\n\tconst [hasOverflow, setHasOverflow] = useState(false);\n\tconst [isScrolledFromTop, setIsScrolledFromTop] = useState(false);\n\tconst [isScrolledFromBottom, setIsScrolledFromBottom] = useState(true);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\n\tconst checkScrollPosition = useCallback(() => {\n\t\tif (scrollRef.current) {\n\t\t\tconst el = scrollRef.current;\n\t\t\tconst scrollTop = el.scrollTop;\n\t\t\tconst scrollHeight = el.scrollHeight;\n\t\t\tconst clientHeight = el.clientHeight;\n\n\t\t\t// Show top blur if scrolled more than 10px from top\n\t\t\tsetIsScrolledFromTop(scrollTop > 10);\n\t\t\t// Show bottom blur if not scrolled to bottom (with 10px threshold)\n\t\t\tsetIsScrolledFromBottom(scrollTop + clientHeight < scrollHeight - 10);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst checkOverflow = () => {\n\t\t\tif (scrollRef.current) {\n\t\t\t\tconst el = scrollRef.current;\n\t\t\t\tsetHasOverflow(el.scrollHeight > el.clientHeight);\n\t\t\t\tcheckScrollPosition();\n\t\t\t}\n\t\t};\n\t\tcheckOverflow();\n\t\twindow.addEventListener('resize', checkOverflow);\n\t\treturn () => window.removeEventListener('resize', checkOverflow);\n\t}, [children, checkScrollPosition]);\n\n\t// Listen to scroll events\n\tuseEffect(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (!el) return;\n\n\t\tel.addEventListener('scroll', checkScrollPosition, { passive: true });\n\t\treturn () => el.removeEventListener('scroll', checkScrollPosition);\n\t}, [checkScrollPosition]);\n\n\tconst canShowBlur = showBlur && hasOverflow && (minItemsForBlur === 0 || itemCount === undefined || itemCount > minItemsForBlur);\n\n\treturn (\n\t\t<div className={cn('relative min-h-0 flex-1', className)}>\n\t\t\t<div\n\t\t\t\tref={scrollRef}\n\t\t\t\tclassName={cn('absolute inset-0 overflow-y-auto', scrollClassName)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{canShowBlur && isScrolledFromTop && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='top'\n\t\t\t\t\theight='48px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.2}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{canShowBlur && isScrolledFromBottom && (\n\t\t\t\t<ProgressiveBlur\n\t\t\t\t\tposition='bottom'\n\t\t\t\t\theight='64px'\n\t\t\t\t\tsurface='background'\n\t\t\t\t\tintensity={0.25}\n\t\t\t\t\t{...blurProps}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAgB,+BAA+B,EAC9C,UACA,WACA,iBACA,kBAAkB,GAClB,WACA,WACA,WAAW,QAC4B;CACvC,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,KAAK;CAChE,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,IAAI;CACrE,MAAM,YAAY,OAAuB,IAAI;CAE7C,MAAM,sBAAsB,kBAAkB;EAC7C,IAAI,UAAU,SAAS;GACtB,MAAM,KAAK,UAAU;GACrB,MAAM,YAAY,GAAG;GACrB,MAAM,eAAe,GAAG;GACxB,MAAM,eAAe,GAAG;GAGxB,qBAAqB,YAAY,EAAE;GAEnC,wBAAwB,YAAY,eAAe,eAAe,EAAE;EACrE;CACD,GAAG,CAAC,CAAC;CAEL,gBAAgB;EACf,MAAM,sBAAsB;GAC3B,IAAI,UAAU,SAAS;IACtB,MAAM,KAAK,UAAU;IACrB,eAAe,GAAG,eAAe,GAAG,YAAY;IAChD,oBAAoB;GACrB;EACD;EACA,cAAc;EACd,OAAO,iBAAiB,UAAU,aAAa;EAC/C,aAAa,OAAO,oBAAoB,UAAU,aAAa;CAChE,GAAG,CAAC,UAAU,mBAAmB,CAAC;CAGlC,gBAAgB;EACf,MAAM,KAAK,UAAU;EACrB,IAAI,CAAC,IAAI;EAET,GAAG,iBAAiB,UAAU,qBAAqB,EAAE,SAAS,KAAK,CAAC;EACpE,aAAa,GAAG,oBAAoB,UAAU,mBAAmB;CAClE,GAAG,CAAC,mBAAmB,CAAC;CAExB,MAAM,cAAc,YAAY,gBAAgB,oBAAoB,KAAK,cAAc,UAAa,YAAY;CAEhH,OACC,qBAAC,OAAD;EAAK,WAAW,GAAG,2BAA2B,SAAS;YAAvD;GACC,oBAAC,OAAD;IACC,KAAK;IACL,WAAW,GAAG,oCAAoC,eAAe;IAEhE;GACG;GACJ,eAAe,qBACf,oBAAC,iBAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;GAED,eAAe,wBACf,oBAAC,iBAAD;IACC,UAAS;IACT,QAAO;IACP,SAAQ;IACR,WAAW;IACX,GAAI;GACJ;EAEE;;AAEP"}
@@ -12,6 +12,7 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
12
12
  const isBottom = position === "bottom";
13
13
  const isTop = position === "top";
14
14
  const clampedIntensity = Math.max(0, Math.min(1, intensity));
15
+ const radius = Math.max(0, blurPx);
15
16
  const surfaceVar = surface === "card" ? "--card" : surface === "sidebar" ? "--sidebar" : "--background";
16
17
  const mask = isBottom ? "linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : isTop ? "linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : "linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)";
17
18
  const overlayMask = isBottom ? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : isTop ? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;
@@ -25,8 +26,8 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
25
26
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
26
27
  className: "absolute inset-0",
27
28
  style: {
28
- backdropFilter: `blur(${blurPx}px)`,
29
- WebkitBackdropFilter: `blur(${blurPx}px)`,
29
+ backdropFilter: `blur(${radius}px)`,
30
+ WebkitBackdropFilter: `blur(${radius}px)`,
30
31
  maskImage: mask,
31
32
  WebkitMaskImage: mask
32
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"progressive-blur.cjs","names":["cn"],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${blurPx}px)`,\n\t\t\t\t\tWebkitBackdropFilter: `blur(${blurPx}px)`,\n\t\t\t\t\tmaskImage: mask,\n\t\t\t\t\tWebkitMaskImage: mask,\n\t\t\t\t}}\n\t\t\t/>\n\n\t\t\t{/* Color overlay: gradient from transparent to solid background for seamless blending */}\n\t\t\t<div\n\t\t\t\tclassName={cn('absolute inset-0')}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: `var(${surfaceVar})`,\n\t\t\t\t\tmaskImage: overlayMask,\n\t\t\t\t\tWebkitMaskImage: overlayMask,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC/B,WACA,SAAS,OACT,WAAW,UACX,SAAS,GACT,UAAU,cACV,YAAY,IACZ,SAAS,OACe;CACxB,MAAM,WAAW,aAAa;CAC9B,MAAM,QAAQ,aAAa;CAC3B,MAAM,mBAAmB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,SAAS,CAAC;CAC3D,MAAM,aAAa,YAAY,SAAS,WAAW,YAAY,YAAY,cAAc;CAGzF,MAAM,OAAO,WACV,wFACA,QACC,qFACA;CAEJ,MAAM,cAAc,WACjB,2DAA2D,iBAAiB,iDAC5E,QACC,wDAAwD,iBAAiB,iDACzE,2DAA2D,iBAAiB,uCAAuC,iBAAiB;CAExI,OACC,4CAAC,OAAD;EACC,WAAWA,iBACV,+DACA,WACA,QAAQ,UAAU,WAAW,aAAa,WAC3C;EACA,OAAO;GACN,QAAQ,aAAa,SAAS,SAAS;GACvC,MAAM;GACN,OAAO;EACR;YAVD,CAaC,2CAAC,OAAD;GACC,WAAU;GACV,OAAO;IACN,gBAAgB,QAAQ,OAAO;IAC/B,sBAAsB,QAAQ,OAAO;IACrC,WAAW;IACX,iBAAiB;GAClB;EACA,IAGD,2CAAC,OAAD;GACC,WAAWA,iBAAG,kBAAkB;GAChC,OAAO;IACN,iBAAiB,OAAO,WAAW;IACnC,WAAW;IACX,iBAAiB;GAClB;EACA,EACG;;AAEP"}
1
+ {"version":3,"file":"progressive-blur.cjs","names":["cn"],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\t// A negative radius is invalid CSS and would silently turn the blur off.\n\tconst radius = Math.max(0, blurPx);\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tWebkitBackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tmaskImage: mask,\n\t\t\t\t\tWebkitMaskImage: mask,\n\t\t\t\t}}\n\t\t\t/>\n\n\t\t\t{/* Color overlay: gradient from transparent to solid background for seamless blending */}\n\t\t\t<div\n\t\t\t\tclassName={cn('absolute inset-0')}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: `var(${surfaceVar})`,\n\t\t\t\t\tmaskImage: overlayMask,\n\t\t\t\t\tWebkitMaskImage: overlayMask,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC/B,WACA,SAAS,OACT,WAAW,UACX,SAAS,GACT,UAAU,cACV,YAAY,IACZ,SAAS,OACe;CACxB,MAAM,WAAW,aAAa;CAC9B,MAAM,QAAQ,aAAa;CAC3B,MAAM,mBAAmB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,SAAS,CAAC;CAE3D,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM;CACjC,MAAM,aAAa,YAAY,SAAS,WAAW,YAAY,YAAY,cAAc;CAGzF,MAAM,OAAO,WACV,wFACA,QACC,qFACA;CAEJ,MAAM,cAAc,WACjB,2DAA2D,iBAAiB,iDAC5E,QACC,wDAAwD,iBAAiB,iDACzE,2DAA2D,iBAAiB,uCAAuC,iBAAiB;CAExI,OACC,4CAAC,OAAD;EACC,WAAWA,iBACV,+DACA,WACA,QAAQ,UAAU,WAAW,aAAa,WAC3C;EACA,OAAO;GACN,QAAQ,aAAa,SAAS,SAAS;GACvC,MAAM;GACN,OAAO;EACR;YAVD,CAaC,2CAAC,OAAD;GACC,WAAU;GACV,OAAO;IACN,gBAAgB,QAAQ,OAAO;IAC/B,sBAAsB,QAAQ,OAAO;IACrC,WAAW;IACX,iBAAiB;GAClB;EACA,IAGD,2CAAC,OAAD;GACC,WAAWA,iBAAG,kBAAkB;GAChC,OAAO;IACN,iBAAiB,OAAO,WAAW;IACnC,WAAW;IACX,iBAAiB;GAClB;EACA,EACG;;AAEP"}
@@ -9,6 +9,7 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
9
9
  const isBottom = position === "bottom";
10
10
  const isTop = position === "top";
11
11
  const clampedIntensity = Math.max(0, Math.min(1, intensity));
12
+ const radius = Math.max(0, blurPx);
12
13
  const surfaceVar = surface === "card" ? "--card" : surface === "sidebar" ? "--sidebar" : "--background";
13
14
  const mask = isBottom ? "linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : isTop ? "linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)" : "linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)";
14
15
  const overlayMask = isBottom ? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : isTop ? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)` : `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;
@@ -22,8 +23,8 @@ function ProgressiveBlur({ className, height = "24%", position = "bottom", blurP
22
23
  children: [/* @__PURE__ */ jsx("div", {
23
24
  className: "absolute inset-0",
24
25
  style: {
25
- backdropFilter: `blur(${blurPx}px)`,
26
- WebkitBackdropFilter: `blur(${blurPx}px)`,
26
+ backdropFilter: `blur(${radius}px)`,
27
+ WebkitBackdropFilter: `blur(${radius}px)`,
27
28
  maskImage: mask,
28
29
  WebkitMaskImage: mask
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"progressive-blur.js","names":[],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${blurPx}px)`,\n\t\t\t\t\tWebkitBackdropFilter: `blur(${blurPx}px)`,\n\t\t\t\t\tmaskImage: mask,\n\t\t\t\t\tWebkitMaskImage: mask,\n\t\t\t\t}}\n\t\t\t/>\n\n\t\t\t{/* Color overlay: gradient from transparent to solid background for seamless blending */}\n\t\t\t<div\n\t\t\t\tclassName={cn('absolute inset-0')}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: `var(${surfaceVar})`,\n\t\t\t\t\tmaskImage: overlayMask,\n\t\t\t\t\tWebkitMaskImage: overlayMask,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,gBAAgB,EAC/B,WACA,SAAS,OACT,WAAW,UACX,SAAS,GACT,UAAU,cACV,YAAY,IACZ,SAAS,OACe;CACxB,MAAM,WAAW,aAAa;CAC9B,MAAM,QAAQ,aAAa;CAC3B,MAAM,mBAAmB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,SAAS,CAAC;CAC3D,MAAM,aAAa,YAAY,SAAS,WAAW,YAAY,YAAY,cAAc;CAGzF,MAAM,OAAO,WACV,wFACA,QACC,qFACA;CAEJ,MAAM,cAAc,WACjB,2DAA2D,iBAAiB,iDAC5E,QACC,wDAAwD,iBAAiB,iDACzE,2DAA2D,iBAAiB,uCAAuC,iBAAiB;CAExI,OACC,qBAAC,OAAD;EACC,WAAW,GACV,+DACA,WACA,QAAQ,UAAU,WAAW,aAAa,WAC3C;EACA,OAAO;GACN,QAAQ,aAAa,SAAS,SAAS;GACvC,MAAM;GACN,OAAO;EACR;YAVD,CAaC,oBAAC,OAAD;GACC,WAAU;GACV,OAAO;IACN,gBAAgB,QAAQ,OAAO;IAC/B,sBAAsB,QAAQ,OAAO;IACrC,WAAW;IACX,iBAAiB;GAClB;EACA,IAGD,oBAAC,OAAD;GACC,WAAW,GAAG,kBAAkB;GAChC,OAAO;IACN,iBAAiB,OAAO,WAAW;IACnC,WAAW;IACX,iBAAiB;GAClB;EACA,EACG;;AAEP"}
1
+ {"version":3,"file":"progressive-blur.js","names":[],"sources":["../../src/components/progressive-blur.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface ProgressiveBlurProps {\n\tclassName?: string;\n\theight?: string;\n\tposition?: 'top' | 'bottom' | 'both';\n\t/** Strength of the blur kernel in pixels (simpler, fewer artifacts) */\n\tblurPx?: number;\n\tsurface?: 'background' | 'card' | 'sidebar';\n\tintensity?: number;\n\t/** Optional horizontal inset to avoid edge bleeding (e.g. '0.5rem') */\n\tinsetX?: string;\n}\n\nexport function ProgressiveBlur({\n\tclassName,\n\theight = '24%',\n\tposition = 'bottom',\n\tblurPx = 8,\n\tsurface = 'background',\n\tintensity = 0.3,\n\tinsetX = '0',\n}: ProgressiveBlurProps) {\n\tconst isBottom = position === 'bottom';\n\tconst isTop = position === 'top';\n\tconst clampedIntensity = Math.max(0, Math.min(1, intensity));\n\t// A negative radius is invalid CSS and would silently turn the blur off.\n\tconst radius = Math.max(0, blurPx);\n\tconst surfaceVar = surface === 'card' ? '--card' : surface === 'sidebar' ? '--sidebar' : '--background';\n\n\t// Vertical-only blur layer with a smooth single gradient mask\n\tconst mask = isBottom\n\t\t? 'linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t: isTop\n\t\t\t? 'linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 100%)'\n\t\t\t: 'linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 95%, rgba(0,0,0,0) 100%)';\n\n\tconst overlayMask = isBottom\n\t\t? `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t: isTop\n\t\t\t? `linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 55%, rgba(0,0,0,1) 85%, rgba(0,0,0,1) 100%)`\n\t\t\t: `linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,${clampedIntensity}) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,${clampedIntensity}) 75%, rgba(0,0,0,0) 100%)`;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'pointer-events-none absolute inset-x-0 z-10 overflow-hidden',\n\t\t\t\tclassName,\n\t\t\t\tisTop ? 'top-0' : isBottom ? 'bottom-0' : 'inset-y-0',\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\theight: position === 'both' ? '100%' : height,\n\t\t\t\tleft: insetX,\n\t\t\t\tright: insetX,\n\t\t\t}}\n\t\t>\n\t\t\t{/* Backdrop blur with vertical mask only (no horizontal bleeding) */}\n\t\t\t<div\n\t\t\t\tclassName='absolute inset-0'\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tWebkitBackdropFilter: `blur(${radius}px)`,\n\t\t\t\t\tmaskImage: mask,\n\t\t\t\t\tWebkitMaskImage: mask,\n\t\t\t\t}}\n\t\t\t/>\n\n\t\t\t{/* Color overlay: gradient from transparent to solid background for seamless blending */}\n\t\t\t<div\n\t\t\t\tclassName={cn('absolute inset-0')}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackgroundColor: `var(${surfaceVar})`,\n\t\t\t\t\tmaskImage: overlayMask,\n\t\t\t\t\tWebkitMaskImage: overlayMask,\n\t\t\t\t}}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,gBAAgB,EAC/B,WACA,SAAS,OACT,WAAW,UACX,SAAS,GACT,UAAU,cACV,YAAY,IACZ,SAAS,OACe;CACxB,MAAM,WAAW,aAAa;CAC9B,MAAM,QAAQ,aAAa;CAC3B,MAAM,mBAAmB,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,SAAS,CAAC;CAE3D,MAAM,SAAS,KAAK,IAAI,GAAG,MAAM;CACjC,MAAM,aAAa,YAAY,SAAS,WAAW,YAAY,YAAY,cAAc;CAGzF,MAAM,OAAO,WACV,wFACA,QACC,qFACA;CAEJ,MAAM,cAAc,WACjB,2DAA2D,iBAAiB,iDAC5E,QACC,wDAAwD,iBAAiB,iDACzE,2DAA2D,iBAAiB,uCAAuC,iBAAiB;CAExI,OACC,qBAAC,OAAD;EACC,WAAW,GACV,+DACA,WACA,QAAQ,UAAU,WAAW,aAAa,WAC3C;EACA,OAAO;GACN,QAAQ,aAAa,SAAS,SAAS;GACvC,MAAM;GACN,OAAO;EACR;YAVD,CAaC,oBAAC,OAAD;GACC,WAAU;GACV,OAAO;IACN,gBAAgB,QAAQ,OAAO;IAC/B,sBAAsB,QAAQ,OAAO;IACrC,WAAW;IACX,iBAAiB;GAClB;EACA,IAGD,oBAAC,OAAD;GACC,WAAW,GAAG,kBAAkB;GAChC,OAAO;IACN,iBAAiB,OAAO,WAAW;IACnC,WAAW;IACX,iBAAiB;GAClB;EACA,EACG;;AAEP"}
@@ -16,7 +16,7 @@ function RadioGroup({ className, ...props }) {
16
16
  }
17
17
  function Radio({ className, ...props }) {
18
18
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_radio.Radio.Root, {
19
- className: require_utils.cn("relative inline-flex size-10 shrink-0 items-center justify-center outline-none transition-transform duration-150 ease-out motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none pointer-coarse:size-11 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-2 focus-visible:[&_[data-slot=radio-control]]:ring-ring focus-visible:[&_[data-slot=radio-control]]:ring-offset-1 focus-visible:[&_[data-slot=radio-control]]:ring-offset-background focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
19
+ className: require_utils.cn("relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[''] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
20
20
  "data-slot": "radio",
21
21
  ...props,
22
22
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -25,7 +25,7 @@ function Radio({ className, ...props }) {
25
25
  "data-slot": "radio-control"
26
26
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_radio.Radio.Indicator, {
27
27
  keepMounted: true,
28
- className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
28
+ className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
29
29
  "data-slot": "radio-indicator"
30
30
  })]
31
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.cjs","names":["RadioGroupPrimitive","cn","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-10 shrink-0 items-center justify-center outline-none transition-transform duration-150 ease-out motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none pointer-coarse:size-11 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-2 focus-visible:[&_[data-slot=radio-control]]:ring-ring focus-visible:[&_[data-slot=radio-control]]:ring-offset-1 focus-visible:[&_[data-slot=radio-control]]:ring-offset-background focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,2CAACA,uCAAD;EAAqB,WAAWC,iBAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,4CAACC,2BAAe,MAAhB;EACC,WAAWD,iBACV,qyBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,2CAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,2CAACC,2BAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
1
+ {"version":3,"file":"radio-group.cjs","names":["RadioGroupPrimitive","cn","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[\\'\\'] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,2CAACA,uCAAD;EAAqB,WAAWC,iBAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,4CAACC,2BAAe,MAAhB;EACC,WAAWD,iBACV,wwBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,2CAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,2CAACC,2BAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
@@ -15,7 +15,7 @@ function RadioGroup({ className, ...props }) {
15
15
  }
16
16
  function Radio({ className, ...props }) {
17
17
  return /* @__PURE__ */ jsxs(Radio$1.Root, {
18
- className: cn("relative inline-flex size-10 shrink-0 items-center justify-center outline-none transition-transform duration-150 ease-out motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none pointer-coarse:size-11 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-2 focus-visible:[&_[data-slot=radio-control]]:ring-ring focus-visible:[&_[data-slot=radio-control]]:ring-offset-1 focus-visible:[&_[data-slot=radio-control]]:ring-offset-background focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
18
+ className: cn("relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[''] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24", className),
19
19
  "data-slot": "radio",
20
20
  ...props,
21
21
  children: [/* @__PURE__ */ jsx("span", {
@@ -24,7 +24,7 @@ function Radio({ className, ...props }) {
24
24
  "data-slot": "radio-control"
25
25
  }), /* @__PURE__ */ jsx(Radio$1.Indicator, {
26
26
  keepMounted: true,
27
- className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
27
+ className: "absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5",
28
28
  "data-slot": "radio-indicator"
29
29
  })]
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-10 shrink-0 items-center justify-center outline-none transition-transform duration-150 ease-out motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none pointer-coarse:size-11 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-2 focus-visible:[&_[data-slot=radio-control]]:ring-ring focus-visible:[&_[data-slot=radio-control]]:ring-offset-1 focus-visible:[&_[data-slot=radio-control]]:ring-offset-background focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,oBAACA,cAAD;EAAqB,WAAW,GAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,qBAACC,QAAe,MAAhB;EACC,WAAW,GACV,qyBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,oBAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,oBAACA,QAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport { Radio as RadioPrimitive } from '@base-ui/react/radio';\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';\n\nimport { cn } from '../lib/utils';\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\ntype RadioProps = RadioPrimitive.Root.Props;\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n\treturn (\n\t\t<RadioGroupPrimitive className={cn('flex flex-col gap-3', className)} data-slot=\"radio-group\" {...props} />\n\t);\n}\n\nfunction Radio({ className, ...props }: RadioProps) {\n\treturn (\n\t\t<RadioPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex size-4.5 shrink-0 items-center justify-center outline-none transition-transform duration-(--duration-moderate) ease-out before:absolute before:-inset-2 before:content-[\\'\\'] motion-safe:active:not-data-disabled:scale-[0.96] motion-reduce:transition-none sm:size-4 pointer-coarse:before:-inset-3 data-disabled:cursor-not-allowed data-disabled:opacity-64 aria-invalid:[&_[data-slot=radio-control]]:border-destructive/36 focus-visible:[&_[data-slot=radio-control]]:ring-[3px] focus-visible:[&_[data-slot=radio-control]]:ring-ring/50 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:border-destructive/64 focus-visible:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/48 dark:aria-invalid:[&_[data-slot=radio-control]]:ring-destructive/24',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"radio\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<span\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName=\"pointer-events-none absolute size-4.5 rounded-full border border-input bg-background bg-clip-padding shadow-xs sm:size-4 dark:bg-input/32 dark:bg-clip-border\"\n\t\t\t\tdata-slot=\"radio-control\"\n\t\t\t/>\n\t\t\t<RadioPrimitive.Indicator\n\t\t\t\tkeepMounted\n\t\t\t\tclassName=\"absolute flex size-4.5 items-center justify-center rounded-full transition-[opacity,scale,filter] duration-(--duration-slow) ease-out before:size-2 before:rounded-full before:bg-primary-foreground data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] data-checked:bg-primary motion-reduce:transition-none sm:size-4 sm:before:size-1.5\"\n\t\t\t\tdata-slot=\"radio-indicator\"\n\t\t\t/>\n\t\t</RadioPrimitive.Root>\n\t);\n}\n\nexport { RadioGroup, Radio, Radio as RadioGroupItem };\nexport type { RadioGroupProps, RadioProps };\n"],"mappings":";;;;;;;;AAUA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;CAC7D,OACC,oBAACA,cAAD;EAAqB,WAAW,GAAG,uBAAuB,SAAS;EAAG,aAAU;EAAc,GAAI;CAAQ;AAE5G;AAEA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,qBAACC,QAAe,MAAhB;EACC,WAAW,GACV,wwBACA,SACD;EACA,aAAU;EACV,GAAI;YANL,CAQC,oBAAC,QAAD;GACC,eAAY;GACZ,WAAU;GACV,aAAU;EACV,IACD,oBAACA,QAAe,WAAhB;GACC;GACA,WAAU;GACV,aAAU;EACV,EACmB;;AAEvB"}
@@ -3,6 +3,6 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  require('./checkbox.cjs');
5
5
  require('./input-group.cjs');
6
- const require_record_picker = require('../record-picker-Bz4FApxD.cjs');
6
+ const require_record_picker = require('../record-picker-BQ1-Vx0g.cjs');
7
7
 
8
8
  exports.RecordPicker = require_record_picker.RecordPicker;
@@ -2,6 +2,6 @@
2
2
 
3
3
  import "./checkbox.js";
4
4
  import "./input-group.js";
5
- import { t as RecordPicker } from "../record-picker-BbxngCeV.js";
5
+ import { t as RecordPicker } from "../record-picker-DSRo4RXV.js";
6
6
 
7
7
  export { RecordPicker };
@@ -28,10 +28,10 @@ function ResizableHandle({ withHandle, className, ...props }) {
28
28
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.PanelResizeHandle, {
29
29
  "data-slot": "resizable-handle",
30
30
  className: require_utils.cn(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0
31
- after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1
31
+ after:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50
32
32
  focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px
33
33
  data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0
34
- data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full
34
+ data-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full
35
35
  data-[panel-group-direction=vertical]:after:translate-x-0
36
36
  data-[panel-group-direction=vertical]:after:-translate-y-1/2
37
37
  [&[data-panel-group-direction=vertical]>div]:rotate-90`, className),
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.cjs","names":["ResizablePrimitive","cn","GripVerticalIcon"],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,2CAACA,uBAAmB,YAApB;EACC,aAAU;EACV,WAAWC,iBAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,2CAACD,uBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,2CAACA,uBAAmB,mBAApB;EACC,aAAU;EACV,WAAWC,iBACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,2CAAC,OAAD;GAAK,WAAU;aACd,2CAACC,+BAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
1
+ {"version":3,"file":"resizable.cjs","names":["ResizablePrimitive","cn","GripVerticalIcon"],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,2CAACA,uBAAmB,YAApB;EACC,aAAU;EACV,WAAWC,iBAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,2CAACD,uBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,2CAACA,uBAAmB,mBAApB;EACC,aAAU;EACV,WAAWC,iBACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,2CAAC,OAAD;GAAK,WAAU;aACd,2CAACC,+BAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
@@ -24,10 +24,10 @@ function ResizableHandle({ withHandle, className, ...props }) {
24
24
  return /* @__PURE__ */ jsx(ResizablePrimitive.PanelResizeHandle, {
25
25
  "data-slot": "resizable-handle",
26
26
  className: cn(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0
27
- after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1
27
+ after:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50
28
28
  focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px
29
29
  data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0
30
- data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full
30
+ data-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full
31
31
  data-[panel-group-direction=vertical]:after:translate-x-0
32
32
  data-[panel-group-direction=vertical]:after:-translate-y-1/2
33
33
  [&[data-panel-group-direction=vertical]>div]:rotate-90`, className),
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,oBAAC,mBAAmB,YAApB;EACC,aAAU;EACV,WAAW,GAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,oBAAC,mBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,oBAAC,mBAAmB,mBAApB;EACC,aAAU;EACV,WAAW,GACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,oBAAC,OAAD;GAAK,WAAU;aACd,oBAAC,kBAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
1
+ {"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { GripVerticalIcon } from 'lucide-react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\nimport { cn } from '../lib/utils';\n\nfunction ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0\n\t\t\t\tafter:left-1/2 after:w-2 after:-translate-x-1/2 pointer-coarse:after:w-6 focus-visible:ring-[3px] focus-visible:ring-ring/50\n\t\t\t\tfocus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px\n\t\t\t\tdata-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:h-2 data-[panel-group-direction=vertical]:pointer-coarse:after:h-6 data-[panel-group-direction=vertical]:after:w-full\n\t\t\t\tdata-[panel-group-direction=vertical]:after:translate-x-0\n\t\t\t\tdata-[panel-group-direction=vertical]:after:-translate-y-1/2\n\t\t\t\t[&[data-panel-group-direction=vertical]>div]:rotate-90`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className='bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border'>\n\t\t\t\t\t<GripVerticalIcon className='size-2.5' />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"mappings":";;;;;;;;;AAQA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAqE;CACjH,OACC,oBAAC,mBAAmB,YAApB;EACC,aAAU;EACV,WAAW,GAAG,qEAAqE,SAAS;EAC5F,GAAI;CACJ;AAEH;AAEA,SAAS,eAAe,EAAE,GAAG,SAAgE;CAC5F,OAAO,oBAAC,mBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ;AAC1E;AAEA,SAAS,gBAAgB,EACxB,YACA,WACA,GAAG,SAGD;CACF,OACC,oBAAC,mBAAmB,mBAApB;EACC,aAAU;EACV,WAAW,GACV;;;;;;;6DAQA,SACD;EACA,GAAI;YAEH,cACA,oBAAC,OAAD;GAAK,WAAU;aACd,oBAAC,kBAAD,EAAkB,WAAU,WAAY;EACpC;CAE+B;AAExC"}
@@ -6,22 +6,34 @@ let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
 
8
8
  //#region src/components/responsive-diagram.tsx
9
- function ResponsiveDiagram({ children, targetRatio = .95, className }) {
9
+ function ResponsiveDiagram({ children, targetRatio = .95, minZoom = .6, className }) {
10
10
  const containerRef = (0, react.useRef)(null);
11
11
  const contentRef = (0, react.useRef)(null);
12
- const [zoom, setZoom] = (0, react.useState)(1);
12
+ const [fit, setFit] = (0, react.useState)({
13
+ zoom: 1,
14
+ width: 0,
15
+ height: 0,
16
+ scrollable: false
17
+ });
13
18
  const calculateZoom = (0, react.useCallback)(() => {
14
- if (!containerRef.current || !contentRef.current) return;
15
- contentRef.current.style.transform = "scale(1)";
16
- const style = getComputedStyle(containerRef.current);
17
- const padH = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
18
- const containerW = containerRef.current.clientWidth - padH;
19
- const contentW = contentRef.current.scrollWidth;
20
- const targetW = containerW * targetRatio;
21
- const newZoom = contentW > targetW ? targetW / contentW : 1;
22
- setZoom(newZoom);
23
- contentRef.current.style.transform = `scale(${newZoom})`;
24
- }, [targetRatio]);
19
+ const container = containerRef.current;
20
+ const content = contentRef.current;
21
+ if (!container || !content) return;
22
+ const { offsetWidth: width, offsetHeight: height } = content;
23
+ const style = getComputedStyle(container);
24
+ const room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
25
+ const natural = width > 0 && width > room * targetRatio ? room * targetRatio / width : 1;
26
+ const zoom = Math.min(1, Math.max(minZoom, natural));
27
+ setFit((current) => {
28
+ const scrollable = Math.ceil(width * zoom) > room;
29
+ return current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable ? current : {
30
+ zoom,
31
+ width,
32
+ height,
33
+ scrollable
34
+ };
35
+ });
36
+ }, [targetRatio, minZoom]);
25
37
  (0, react.useLayoutEffect)(() => {
26
38
  const rafId = requestAnimationFrame(() => {
27
39
  calculateZoom();
@@ -29,24 +41,34 @@ function ResponsiveDiagram({ children, targetRatio = .95, className }) {
29
41
  return () => cancelAnimationFrame(rafId);
30
42
  }, [calculateZoom, children]);
31
43
  (0, react.useEffect)(() => {
44
+ if (typeof ResizeObserver === "undefined") return;
32
45
  const resizeObserver = new ResizeObserver(() => {
33
46
  calculateZoom();
34
47
  });
35
48
  if (containerRef.current) resizeObserver.observe(containerRef.current);
49
+ if (contentRef.current) resizeObserver.observe(contentRef.current);
36
50
  return () => resizeObserver.disconnect();
37
51
  }, [calculateZoom]);
38
52
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
39
53
  ref: containerRef,
40
- className: require_utils.cn(`flex items-center justify-center overflow-hidden rounded-lg border bg-neutral-50 px-4 py-6
54
+ tabIndex: fit.scrollable ? 0 : void 0,
55
+ className: require_utils.cn(`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6
41
56
  dark:bg-neutral-900/50`, className),
42
57
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
43
- ref: contentRef,
44
- className: "flex shrink-0 items-center justify-center",
45
- style: {
46
- transform: `scale(${zoom})`,
47
- transformOrigin: "center center"
48
- },
49
- children
58
+ className: "m-auto shrink-0",
59
+ style: fit.width > 0 ? {
60
+ width: fit.width * fit.zoom,
61
+ height: fit.height * fit.zoom
62
+ } : void 0,
63
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
64
+ ref: contentRef,
65
+ className: "flex w-max items-center justify-center",
66
+ style: {
67
+ transform: `scale(${fit.zoom})`,
68
+ transformOrigin: "top left"
69
+ },
70
+ children
71
+ })
50
72
  })
51
73
  });
52
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-diagram.cjs","names":["cn"],"sources":["../../src/components/responsive-diagram.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { cn } from '../lib/utils';\n\ninterface ResponsiveDiagramProps {\n\tchildren: React.ReactNode;\n\ttargetRatio?: number;\n\tclassName?: string;\n}\n\nexport function ResponsiveDiagram({ children, targetRatio = 0.95, className }: ResponsiveDiagramProps) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst [zoom, setZoom] = useState(1);\n\n\tconst calculateZoom = useCallback(() => {\n\t\tif (!containerRef.current || !contentRef.current) return;\n\n\t\tcontentRef.current.style.transform = 'scale(1)';\n\n\t\tconst style = getComputedStyle(containerRef.current);\n\t\tconst padH = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);\n\t\tconst containerW = containerRef.current.clientWidth - padH;\n\t\tconst contentW = contentRef.current.scrollWidth;\n\n\t\tconst targetW = containerW * targetRatio;\n\t\tconst newZoom = contentW > targetW ? targetW / contentW : 1;\n\n\t\tsetZoom(newZoom);\n\t\tcontentRef.current.style.transform = `scale(${newZoom})`;\n\t}, [targetRatio]);\n\n\tuseLayoutEffect(() => {\n\t\t// Defer measurement to next frame to avoid blocking animations\n\t\t// This prevents layout thrashing during Stack card enter/exit\n\t\tconst rafId = requestAnimationFrame(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, [calculateZoom, children]);\n\n\tuseEffect(() => {\n\t\tconst resizeObserver = new ResizeObserver(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\n\t\tif (containerRef.current) {\n\t\t\tresizeObserver.observe(containerRef.current);\n\t\t}\n\n\t\treturn () => resizeObserver.disconnect();\n\t}, [calculateZoom]);\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\tclassName={cn(\n\t\t\t\t`flex items-center justify-center overflow-hidden rounded-lg border bg-neutral-50 px-4 py-6\n\t\t\t\tdark:bg-neutral-900/50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<div\n\t\t\t\tref={contentRef}\n\t\t\t\tclassName='flex shrink-0 items-center justify-center'\n\t\t\t\tstyle={{ transform: `scale(${zoom})`, transformOrigin: 'center center' }}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAYA,SAAgB,kBAAkB,EAAE,UAAU,cAAc,KAAM,aAAqC;CACtG,MAAM,iCAAsC,IAAI;CAChD,MAAM,+BAAoC,IAAI;CAC9C,MAAM,CAAC,MAAM,+BAAoB,CAAC;CAElC,MAAM,6CAAkC;EACvC,IAAI,CAAC,aAAa,WAAW,CAAC,WAAW,SAAS;EAElD,WAAW,QAAQ,MAAM,YAAY;EAErC,MAAM,QAAQ,iBAAiB,aAAa,OAAO;EACnD,MAAM,OAAO,WAAW,MAAM,WAAW,IAAI,WAAW,MAAM,YAAY;EAC1E,MAAM,aAAa,aAAa,QAAQ,cAAc;EACtD,MAAM,WAAW,WAAW,QAAQ;EAEpC,MAAM,UAAU,aAAa;EAC7B,MAAM,UAAU,WAAW,UAAU,UAAU,WAAW;EAE1D,QAAQ,OAAO;EACf,WAAW,QAAQ,MAAM,YAAY,SAAS,QAAQ;CACvD,GAAG,CAAC,WAAW,CAAC;CAEhB,iCAAsB;EAGrB,MAAM,QAAQ,4BAA4B;GACzC,cAAc;EACf,CAAC;EACD,aAAa,qBAAqB,KAAK;CACxC,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,2BAAgB;EACf,MAAM,iBAAiB,IAAI,qBAAqB;GAC/C,cAAc;EACf,CAAC;EAED,IAAI,aAAa,SAChB,eAAe,QAAQ,aAAa,OAAO;EAG5C,aAAa,eAAe,WAAW;CACxC,GAAG,CAAC,aAAa,CAAC;CAElB,OACC,2CAAC,OAAD;EACC,KAAK;EACL,WAAWA,iBACV;6BAEA,SACD;YAEA,2CAAC,OAAD;GACC,KAAK;GACL,WAAU;GACV,OAAO;IAAE,WAAW,SAAS,KAAK;IAAI,iBAAiB;GAAgB;GAEtE;EACG;CACD;AAEP"}
1
+ {"version":3,"file":"responsive-diagram.cjs","names":["cn"],"sources":["../../src/components/responsive-diagram.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { cn } from '../lib/utils';\n\ninterface ResponsiveDiagramProps {\n\tchildren: React.ReactNode;\n\t/** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */\n\ttargetRatio?: number;\n\t/**\n\t * Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways\n\t * instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).\n\t */\n\tminZoom?: number;\n\tclassName?: string;\n}\n\ntype Fit = { zoom: number; width: number; height: number; scrollable: boolean };\n\nexport function ResponsiveDiagram({ children, targetRatio = 0.95, minZoom = 0.6, className }: ResponsiveDiagramProps) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst contentRef = useRef<HTMLDivElement>(null);\n\tconst [fit, setFit] = useState<Fit>({ zoom: 1, width: 0, height: 0, scrollable: false });\n\n\tconst calculateZoom = useCallback(() => {\n\t\tconst container = containerRef.current;\n\t\tconst content = contentRef.current;\n\t\tif (!container || !content) return;\n\n\t\t// `offsetWidth` and `offsetHeight` are the diagram's natural size: transforms do not change them.\n\t\tconst { offsetWidth: width, offsetHeight: height } = content;\n\t\tconst style = getComputedStyle(container);\n\t\tconst room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);\n\t\tconst natural = width > 0 && width > room * targetRatio ? (room * targetRatio) / width : 1;\n\t\tconst zoom = Math.min(1, Math.max(minZoom, natural));\n\n\t\tsetFit((current) => {\n\t\t\tconst scrollable = Math.ceil(width * zoom) > room;\n\t\t\treturn current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable\n\t\t\t\t? current\n\t\t\t\t: { zoom, width, height, scrollable };\n\t\t});\n\t}, [targetRatio, minZoom]);\n\n\tuseLayoutEffect(() => {\n\t\t// Defer measurement to next frame to avoid blocking animations\n\t\t// This prevents layout thrashing during Stack card enter/exit\n\t\tconst rafId = requestAnimationFrame(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, [calculateZoom, children]);\n\n\tuseEffect(() => {\n\t\t// ResizeObserver is absent in jsdom and some embedded webviews.\n\t\tif (typeof ResizeObserver === 'undefined') return;\n\t\tconst resizeObserver = new ResizeObserver(() => {\n\t\t\tcalculateZoom();\n\t\t});\n\n\t\tif (containerRef.current) resizeObserver.observe(containerRef.current);\n\t\tif (contentRef.current) resizeObserver.observe(contentRef.current);\n\n\t\treturn () => resizeObserver.disconnect();\n\t}, [calculateZoom]);\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\t// A scroller must be reachable without a pointer.\n\t\t\ttabIndex={fit.scrollable ? 0 : undefined}\n\t\t\tclassName={cn(\n\t\t\t\t`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6\n\t\t\t\tdark:bg-neutral-900/50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{/* `transform` leaves the unscaled size behind, so this box takes the scaled size: the container then\n\t\t\t gets the right height, and scrolls (rather than clips) when the diagram stops at `minZoom`. */}\n\t\t\t<div\n\t\t\t\tclassName=\"m-auto shrink-0\"\n\t\t\t\tstyle={fit.width > 0 ? { width: fit.width * fit.zoom, height: fit.height * fit.zoom } : undefined}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={contentRef}\n\t\t\t\t\tclassName=\"flex w-max items-center justify-center\"\n\t\t\t\t\tstyle={{ transform: `scale(${fit.zoom})`, transformOrigin: 'top left' }}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAoBA,SAAgB,kBAAkB,EAAE,UAAU,cAAc,KAAM,UAAU,IAAK,aAAqC;CACrH,MAAM,iCAAsC,IAAI;CAChD,MAAM,+BAAoC,IAAI;CAC9C,MAAM,CAAC,KAAK,8BAAwB;EAAE,MAAM;EAAG,OAAO;EAAG,QAAQ;EAAG,YAAY;CAAM,CAAC;CAEvF,MAAM,6CAAkC;EACvC,MAAM,YAAY,aAAa;EAC/B,MAAM,UAAU,WAAW;EAC3B,IAAI,CAAC,aAAa,CAAC,SAAS;EAG5B,MAAM,EAAE,aAAa,OAAO,cAAc,WAAW;EACrD,MAAM,QAAQ,iBAAiB,SAAS;EACxC,MAAM,OAAO,UAAU,eAAe,WAAW,MAAM,WAAW,KAAK,MAAM,WAAW,MAAM,YAAY,KAAK;EAC/G,MAAM,UAAU,QAAQ,KAAK,QAAQ,OAAO,cAAe,OAAO,cAAe,QAAQ;EACzF,MAAM,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,OAAO,CAAC;EAEnD,QAAQ,YAAY;GACnB,MAAM,aAAa,KAAK,KAAK,QAAQ,IAAI,IAAI;GAC7C,OAAO,QAAQ,SAAS,QAAQ,QAAQ,UAAU,SAAS,QAAQ,WAAW,UAAU,QAAQ,eAAe,aAC5G,UACA;IAAE;IAAM;IAAO;IAAQ;GAAW;EACtC,CAAC;CACF,GAAG,CAAC,aAAa,OAAO,CAAC;CAEzB,iCAAsB;EAGrB,MAAM,QAAQ,4BAA4B;GACzC,cAAc;EACf,CAAC;EACD,aAAa,qBAAqB,KAAK;CACxC,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,2BAAgB;EAEf,IAAI,OAAO,mBAAmB,aAAa;EAC3C,MAAM,iBAAiB,IAAI,qBAAqB;GAC/C,cAAc;EACf,CAAC;EAED,IAAI,aAAa,SAAS,eAAe,QAAQ,aAAa,OAAO;EACrE,IAAI,WAAW,SAAS,eAAe,QAAQ,WAAW,OAAO;EAEjE,aAAa,eAAe,WAAW;CACxC,GAAG,CAAC,aAAa,CAAC;CAElB,OACC,2CAAC,OAAD;EACC,KAAK;EAEL,UAAU,IAAI,aAAa,IAAI;EAC/B,WAAWA,iBACV;6BAEA,SACD;YAIA,2CAAC,OAAD;GACC,WAAU;GACV,OAAO,IAAI,QAAQ,IAAI;IAAE,OAAO,IAAI,QAAQ,IAAI;IAAM,QAAQ,IAAI,SAAS,IAAI;GAAK,IAAI;aAExF,2CAAC,OAAD;IACC,KAAK;IACL,WAAU;IACV,OAAO;KAAE,WAAW,SAAS,IAAI,KAAK;KAAI,iBAAiB;IAAW;IAErE;GACG;EACD;CACD;AAEP"}
@@ -1,10 +1,16 @@
1
1
  //#region src/components/responsive-diagram.d.ts
2
2
  interface ResponsiveDiagramProps {
3
3
  children: React.ReactNode;
4
+ /** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */
4
5
  targetRatio?: number;
6
+ /**
7
+ * Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways
8
+ * instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).
9
+ */
10
+ minZoom?: number;
5
11
  className?: string;
6
12
  }
7
- declare function ResponsiveDiagram({ children, targetRatio, className }: ResponsiveDiagramProps): import("react").JSX.Element;
13
+ declare function ResponsiveDiagram({ children, targetRatio, minZoom, className }: ResponsiveDiagramProps): import("react").JSX.Element;
8
14
  //#endregion
9
15
  export { ResponsiveDiagram };
10
16
  //# sourceMappingURL=responsive-diagram.d.cts.map
@@ -1,10 +1,16 @@
1
1
  //#region src/components/responsive-diagram.d.ts
2
2
  interface ResponsiveDiagramProps {
3
3
  children: React.ReactNode;
4
+ /** Share of the container the diagram may fill before it scales down to fit. Default: 0.95. */
4
5
  targetRatio?: number;
6
+ /**
7
+ * Smallest scale. A diagram that would need to shrink below this stops shrinking and scrolls sideways
8
+ * instead, because text at a few pixels cannot be read. Default: 0.6 (about 10px for 16px text).
9
+ */
10
+ minZoom?: number;
5
11
  className?: string;
6
12
  }
7
- declare function ResponsiveDiagram({ children, targetRatio, className }: ResponsiveDiagramProps): import("react").JSX.Element;
13
+ declare function ResponsiveDiagram({ children, targetRatio, minZoom, className }: ResponsiveDiagramProps): import("react").JSX.Element;
8
14
  //#endregion
9
15
  export { ResponsiveDiagram };
10
16
  //# sourceMappingURL=responsive-diagram.d.ts.map
@@ -5,22 +5,34 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react
5
5
  import { jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/responsive-diagram.tsx
8
- function ResponsiveDiagram({ children, targetRatio = .95, className }) {
8
+ function ResponsiveDiagram({ children, targetRatio = .95, minZoom = .6, className }) {
9
9
  const containerRef = useRef(null);
10
10
  const contentRef = useRef(null);
11
- const [zoom, setZoom] = useState(1);
11
+ const [fit, setFit] = useState({
12
+ zoom: 1,
13
+ width: 0,
14
+ height: 0,
15
+ scrollable: false
16
+ });
12
17
  const calculateZoom = useCallback(() => {
13
- if (!containerRef.current || !contentRef.current) return;
14
- contentRef.current.style.transform = "scale(1)";
15
- const style = getComputedStyle(containerRef.current);
16
- const padH = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
17
- const containerW = containerRef.current.clientWidth - padH;
18
- const contentW = contentRef.current.scrollWidth;
19
- const targetW = containerW * targetRatio;
20
- const newZoom = contentW > targetW ? targetW / contentW : 1;
21
- setZoom(newZoom);
22
- contentRef.current.style.transform = `scale(${newZoom})`;
23
- }, [targetRatio]);
18
+ const container = containerRef.current;
19
+ const content = contentRef.current;
20
+ if (!container || !content) return;
21
+ const { offsetWidth: width, offsetHeight: height } = content;
22
+ const style = getComputedStyle(container);
23
+ const room = container.clientWidth - (parseFloat(style.paddingLeft) || 0) - (parseFloat(style.paddingRight) || 0);
24
+ const natural = width > 0 && width > room * targetRatio ? room * targetRatio / width : 1;
25
+ const zoom = Math.min(1, Math.max(minZoom, natural));
26
+ setFit((current) => {
27
+ const scrollable = Math.ceil(width * zoom) > room;
28
+ return current.zoom === zoom && current.width === width && current.height === height && current.scrollable === scrollable ? current : {
29
+ zoom,
30
+ width,
31
+ height,
32
+ scrollable
33
+ };
34
+ });
35
+ }, [targetRatio, minZoom]);
24
36
  useLayoutEffect(() => {
25
37
  const rafId = requestAnimationFrame(() => {
26
38
  calculateZoom();
@@ -28,24 +40,34 @@ function ResponsiveDiagram({ children, targetRatio = .95, className }) {
28
40
  return () => cancelAnimationFrame(rafId);
29
41
  }, [calculateZoom, children]);
30
42
  useEffect(() => {
43
+ if (typeof ResizeObserver === "undefined") return;
31
44
  const resizeObserver = new ResizeObserver(() => {
32
45
  calculateZoom();
33
46
  });
34
47
  if (containerRef.current) resizeObserver.observe(containerRef.current);
48
+ if (contentRef.current) resizeObserver.observe(contentRef.current);
35
49
  return () => resizeObserver.disconnect();
36
50
  }, [calculateZoom]);
37
51
  return /* @__PURE__ */ jsx("div", {
38
52
  ref: containerRef,
39
- className: cn(`flex items-center justify-center overflow-hidden rounded-lg border bg-neutral-50 px-4 py-6
53
+ tabIndex: fit.scrollable ? 0 : void 0,
54
+ className: cn(`flex overflow-x-auto overflow-y-hidden rounded-lg border bg-neutral-50 px-4 py-6
40
55
  dark:bg-neutral-900/50`, className),
41
56
  children: /* @__PURE__ */ jsx("div", {
42
- ref: contentRef,
43
- className: "flex shrink-0 items-center justify-center",
44
- style: {
45
- transform: `scale(${zoom})`,
46
- transformOrigin: "center center"
47
- },
48
- children
57
+ className: "m-auto shrink-0",
58
+ style: fit.width > 0 ? {
59
+ width: fit.width * fit.zoom,
60
+ height: fit.height * fit.zoom
61
+ } : void 0,
62
+ children: /* @__PURE__ */ jsx("div", {
63
+ ref: contentRef,
64
+ className: "flex w-max items-center justify-center",
65
+ style: {
66
+ transform: `scale(${fit.zoom})`,
67
+ transformOrigin: "top left"
68
+ },
69
+ children
70
+ })
49
71
  })
50
72
  });
51
73
  }