@tulip-systems/core 0.5.16 → 0.6.1

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 (936) hide show
  1. package/dist/auth/server.d.mts +1 -1
  2. package/dist/auth/server.mjs +1 -1
  3. package/dist/commands/client.d.mts +2 -1
  4. package/dist/commands/client.mjs +2 -1
  5. package/dist/components/client.d.mts +1 -1
  6. package/dist/components/client.mjs +1 -1
  7. package/dist/components/common/icons.d.mts +52 -52
  8. package/dist/components/common/icons.d.mts.map +1 -1
  9. package/dist/components/common/icons.mjs.map +1 -1
  10. package/dist/components/common/status.d.mts +3 -3
  11. package/dist/components/common/status.d.mts.map +1 -1
  12. package/dist/components/common/status.mjs.map +1 -1
  13. package/dist/components/editor/components/content.client.d.mts +2 -2
  14. package/dist/components/editor/components/content.client.d.mts.map +1 -1
  15. package/dist/components/editor/components/content.client.mjs.map +1 -1
  16. package/dist/components/editor/components/editor.client.d.mts +6 -6
  17. package/dist/components/editor/components/editor.client.d.mts.map +1 -1
  18. package/dist/components/editor/components/editor.client.mjs +2 -2
  19. package/dist/components/editor/components/editor.client.mjs.map +1 -1
  20. package/dist/components/editor/components/menu-nodes.client.mjs +3 -3
  21. package/dist/components/editor/components/menu-nodes.client.mjs.map +1 -1
  22. package/dist/components/editor/components/menu.client.d.mts +3 -3
  23. package/dist/components/editor/components/menu.client.d.mts.map +1 -1
  24. package/dist/components/editor/components/menu.client.mjs.map +1 -1
  25. package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -1
  26. package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -1
  27. package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -1
  28. package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -1
  29. package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
  30. package/dist/components/editor/extensions/image/extension.d.mts.map +1 -1
  31. package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
  32. package/dist/components/editor/extensions/skeleton/renderer.mjs +1 -1
  33. package/dist/components/editor/extensions/skeleton/renderer.mjs.map +1 -1
  34. package/dist/components/editor/lib/constants.d.mts +27 -27
  35. package/dist/components/editor/lib/constants.d.mts.map +1 -1
  36. package/dist/components/editor/lib/extensions.d.mts +0 -1
  37. package/dist/components/editor/lib/extensions.d.mts.map +1 -1
  38. package/dist/components/editor/lib/extensions.mjs +6 -8
  39. package/dist/components/editor/lib/extensions.mjs.map +1 -1
  40. package/dist/components/editor/lib/helpers.d.mts +0 -1
  41. package/dist/components/editor/lib/helpers.d.mts.map +1 -1
  42. package/dist/components/editor/lib/helpers.mjs.map +1 -1
  43. package/dist/components/editor/lib/types.d.mts +0 -1
  44. package/dist/components/editor/lib/types.d.mts.map +1 -1
  45. package/dist/components/editor/lib/variants.mjs.map +1 -1
  46. package/dist/components/emails/forget-password-email.mjs +1 -2
  47. package/dist/components/emails/forget-password-email.mjs.map +1 -1
  48. package/dist/components/header/back-button.client.d.mts +2 -2
  49. package/dist/components/header/back-button.client.d.mts.map +1 -1
  50. package/dist/components/header/back-button.client.mjs.map +1 -1
  51. package/dist/components/header/bottom-bar.client.d.mts +3 -3
  52. package/dist/components/header/bottom-bar.client.d.mts.map +1 -1
  53. package/dist/components/header/bottom-bar.client.mjs.map +1 -1
  54. package/dist/components/header/breadcrumbs.client.d.mts +7 -7
  55. package/dist/components/header/breadcrumbs.client.d.mts.map +1 -1
  56. package/dist/components/header/breadcrumbs.client.mjs.map +1 -1
  57. package/dist/components/header/header.client.d.mts +2 -2
  58. package/dist/components/header/header.client.d.mts.map +1 -1
  59. package/dist/components/header/header.client.mjs.map +1 -1
  60. package/dist/components/header/indicator.client.mjs.map +1 -1
  61. package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
  62. package/dist/components/header/mobile-nav-switcher.client.d.mts.map +1 -1
  63. package/dist/components/header/top-bar.client.d.mts +4 -4
  64. package/dist/components/header/top-bar.client.d.mts.map +1 -1
  65. package/dist/components/header/top-bar.client.mjs.map +1 -1
  66. package/dist/components/layouts/admin-content.client.d.mts +2 -2
  67. package/dist/components/layouts/admin-content.client.d.mts.map +1 -1
  68. package/dist/components/layouts/admin-content.client.mjs.map +1 -1
  69. package/dist/components/layouts/admin-error-pages.d.mts +4 -4
  70. package/dist/components/layouts/admin-error-pages.d.mts.map +1 -1
  71. package/dist/components/layouts/admin-error-pages.mjs.map +1 -1
  72. package/dist/components/layouts/admin-layout.d.mts +2 -2
  73. package/dist/components/layouts/admin-layout.d.mts.map +1 -1
  74. package/dist/components/layouts/admin-layout.mjs.map +1 -1
  75. package/dist/components/layouts/admin-loading.d.mts +2 -2
  76. package/dist/components/layouts/admin-loading.d.mts.map +1 -1
  77. package/dist/components/layouts/admin-loading.mjs.map +1 -1
  78. package/dist/components/layouts/empty-page.d.mts +4 -4
  79. package/dist/components/layouts/empty-page.d.mts.map +1 -1
  80. package/dist/components/layouts/empty-page.mjs.map +1 -1
  81. package/dist/components/layouts/error-page.d.mts +9 -9
  82. package/dist/components/layouts/error-page.d.mts.map +1 -1
  83. package/dist/components/layouts/error-page.mjs.map +1 -1
  84. package/dist/components/layouts/error-sections.d.mts +5 -5
  85. package/dist/components/layouts/error-sections.d.mts.map +1 -1
  86. package/dist/components/layouts/error-sections.mjs.map +1 -1
  87. package/dist/components/layouts/list-layout.d.mts +2 -2
  88. package/dist/components/layouts/list-layout.d.mts.map +1 -1
  89. package/dist/components/layouts/list-layout.mjs.map +1 -1
  90. package/dist/components/layouts/providers.client.d.mts +2 -2
  91. package/dist/components/layouts/providers.client.d.mts.map +1 -1
  92. package/dist/components/layouts/providers.client.mjs +1 -1
  93. package/dist/components/layouts/providers.client.mjs.map +1 -1
  94. package/dist/components/layouts/root-error-pages.d.mts +2 -2
  95. package/dist/components/layouts/root-error-pages.d.mts.map +1 -1
  96. package/dist/components/layouts/root-layout.server.d.mts +2 -2
  97. package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
  98. package/dist/components/layouts/root-layout.server.mjs.map +1 -1
  99. package/dist/components/layouts/root-loading.d.mts +2 -2
  100. package/dist/components/layouts/root-loading.d.mts.map +1 -1
  101. package/dist/components/layouts/tab-layout.d.mts +2 -2
  102. package/dist/components/layouts/tab-layout.d.mts.map +1 -1
  103. package/dist/components/layouts/tab-layout.mjs +3 -3
  104. package/dist/components/layouts/tab-layout.mjs.map +1 -1
  105. package/dist/components/lists/data-list.d.mts +5 -5
  106. package/dist/components/lists/data-list.d.mts.map +1 -1
  107. package/dist/components/lists/data-list.mjs.map +1 -1
  108. package/dist/components/lists/data-stack.d.mts +8 -8
  109. package/dist/components/lists/data-stack.d.mts.map +1 -1
  110. package/dist/components/lists/data-stack.mjs.map +1 -1
  111. package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
  112. package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
  113. package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
  114. package/dist/components/navigation/admin-sidebar-paths.client.mjs.map +1 -1
  115. package/dist/components/navigation/admin-sidebar-skeleton.mjs.map +1 -1
  116. package/dist/components/ui/accordion.d.mts +5 -5
  117. package/dist/components/ui/accordion.d.mts.map +1 -1
  118. package/dist/components/ui/accordion.mjs +0 -1
  119. package/dist/components/ui/accordion.mjs.map +1 -1
  120. package/dist/components/ui/alert-dialog.d.mts +12 -12
  121. package/dist/components/ui/alert-dialog.d.mts.map +1 -1
  122. package/dist/components/ui/alert-dialog.mjs +0 -1
  123. package/dist/components/ui/alert-dialog.mjs.map +1 -1
  124. package/dist/components/ui/alert.d.mts +4 -4
  125. package/dist/components/ui/alert.d.mts.map +1 -1
  126. package/dist/components/ui/alert.mjs +0 -1
  127. package/dist/components/ui/alert.mjs.map +1 -1
  128. package/dist/components/ui/aspect-ratio.d.mts +2 -2
  129. package/dist/components/ui/aspect-ratio.d.mts.map +1 -1
  130. package/dist/components/ui/avatar.client.d.mts +4 -4
  131. package/dist/components/ui/avatar.client.d.mts.map +1 -1
  132. package/dist/components/ui/avatar.client.mjs +0 -1
  133. package/dist/components/ui/avatar.client.mjs.map +1 -1
  134. package/dist/components/ui/badge.d.mts +3 -3
  135. package/dist/components/ui/badge.d.mts.map +1 -1
  136. package/dist/components/ui/badge.mjs +0 -1
  137. package/dist/components/ui/badge.mjs.map +1 -1
  138. package/dist/components/ui/breadcrumb.d.mts +8 -8
  139. package/dist/components/ui/breadcrumb.d.mts.map +1 -1
  140. package/dist/components/ui/breadcrumb.mjs +1 -2
  141. package/dist/components/ui/breadcrumb.mjs.map +1 -1
  142. package/dist/components/ui/button.d.mts +5 -5
  143. package/dist/components/ui/button.d.mts.map +1 -1
  144. package/dist/components/ui/button.mjs +0 -1
  145. package/dist/components/ui/button.mjs.map +1 -1
  146. package/dist/components/ui/calendar.d.mts +3 -3
  147. package/dist/components/ui/calendar.d.mts.map +1 -1
  148. package/dist/components/ui/calendar.mjs +12 -12
  149. package/dist/components/ui/calendar.mjs.map +1 -1
  150. package/dist/components/ui/card.d.mts +7 -7
  151. package/dist/components/ui/card.d.mts.map +1 -1
  152. package/dist/components/ui/card.mjs +0 -1
  153. package/dist/components/ui/card.mjs.map +1 -1
  154. package/dist/components/ui/carousel.d.mts +6 -6
  155. package/dist/components/ui/carousel.d.mts.map +1 -1
  156. package/dist/components/ui/carousel.mjs +4 -4
  157. package/dist/components/ui/carousel.mjs.map +1 -1
  158. package/dist/components/ui/chart.client.d.mts +5 -5
  159. package/dist/components/ui/chart.client.d.mts.map +1 -1
  160. package/dist/components/ui/chart.client.mjs +6 -6
  161. package/dist/components/ui/chart.client.mjs.map +1 -1
  162. package/dist/components/ui/checkbox.d.mts +2 -2
  163. package/dist/components/ui/checkbox.d.mts.map +1 -1
  164. package/dist/components/ui/checkbox.mjs +0 -1
  165. package/dist/components/ui/checkbox.mjs.map +1 -1
  166. package/dist/components/ui/collapsible.client.d.mts +4 -4
  167. package/dist/components/ui/collapsible.client.d.mts.map +1 -1
  168. package/dist/components/ui/color-picker.client.d.mts +2 -2
  169. package/dist/components/ui/color-picker.client.d.mts.map +1 -1
  170. package/dist/components/ui/color-picker.client.mjs +6 -5
  171. package/dist/components/ui/color-picker.client.mjs.map +1 -1
  172. package/dist/components/ui/combobox-dropdown.client.d.mts +2 -3
  173. package/dist/components/ui/combobox-dropdown.client.d.mts.map +1 -1
  174. package/dist/components/ui/combobox-dropdown.client.mjs +3 -3
  175. package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
  176. package/dist/components/ui/combobox.client.d.mts +2 -2
  177. package/dist/components/ui/combobox.client.d.mts.map +1 -1
  178. package/dist/components/ui/combobox.client.mjs +2 -2
  179. package/dist/components/ui/combobox.client.mjs.map +1 -1
  180. package/dist/components/ui/command.d.mts +10 -10
  181. package/dist/components/ui/command.d.mts.map +1 -1
  182. package/dist/components/ui/command.mjs +0 -1
  183. package/dist/components/ui/command.mjs.map +1 -1
  184. package/dist/components/ui/context-menu.d.mts +16 -16
  185. package/dist/components/ui/context-menu.d.mts.map +1 -1
  186. package/dist/components/ui/context-menu.mjs +0 -1
  187. package/dist/components/ui/context-menu.mjs.map +1 -1
  188. package/dist/components/ui/date-picker.client.d.mts +2 -2
  189. package/dist/components/ui/date-picker.client.d.mts.map +1 -1
  190. package/dist/components/ui/date-picker.client.mjs +3 -3
  191. package/dist/components/ui/date-picker.client.mjs.map +1 -1
  192. package/dist/components/ui/dialog.client.d.mts +11 -11
  193. package/dist/components/ui/dialog.client.d.mts.map +1 -1
  194. package/dist/components/ui/dialog.client.mjs +0 -1
  195. package/dist/components/ui/dialog.client.mjs.map +1 -1
  196. package/dist/components/ui/drawer.client.d.mts +11 -11
  197. package/dist/components/ui/drawer.client.d.mts.map +1 -1
  198. package/dist/components/ui/drawer.client.mjs +0 -1
  199. package/dist/components/ui/drawer.client.mjs.map +1 -1
  200. package/dist/components/ui/dropdown-menu.d.mts +16 -16
  201. package/dist/components/ui/dropdown-menu.d.mts.map +1 -1
  202. package/dist/components/ui/dropdown-menu.mjs +0 -1
  203. package/dist/components/ui/dropdown-menu.mjs.map +1 -1
  204. package/dist/components/ui/form.client.d.mts +7 -7
  205. package/dist/components/ui/form.client.d.mts.map +1 -1
  206. package/dist/components/ui/form.client.mjs.map +1 -1
  207. package/dist/components/ui/hover-card.client.d.mts +4 -4
  208. package/dist/components/ui/hover-card.client.d.mts.map +1 -1
  209. package/dist/components/ui/hover-card.client.mjs +0 -1
  210. package/dist/components/ui/hover-card.client.mjs.map +1 -1
  211. package/dist/components/ui/input-date-time.d.mts +6 -6
  212. package/dist/components/ui/input-date-time.d.mts.map +1 -1
  213. package/dist/components/ui/input-date-time.mjs +4 -6
  214. package/dist/components/ui/input-date-time.mjs.map +1 -1
  215. package/dist/components/ui/input-date.d.mts +2 -2
  216. package/dist/components/ui/input-date.d.mts.map +1 -1
  217. package/dist/components/ui/input-recipient.d.mts +2 -2
  218. package/dist/components/ui/input-recipient.d.mts.map +1 -1
  219. package/dist/components/ui/input-recipient.mjs +2 -2
  220. package/dist/components/ui/input-recipient.mjs.map +1 -1
  221. package/dist/components/ui/input-time.d.mts +2 -2
  222. package/dist/components/ui/input-time.d.mts.map +1 -1
  223. package/dist/components/ui/input.d.mts +2 -2
  224. package/dist/components/ui/input.d.mts.map +1 -1
  225. package/dist/components/ui/input.mjs +0 -1
  226. package/dist/components/ui/input.mjs.map +1 -1
  227. package/dist/components/ui/label.d.mts +2 -2
  228. package/dist/components/ui/label.d.mts.map +1 -1
  229. package/dist/components/ui/label.mjs +0 -1
  230. package/dist/components/ui/label.mjs.map +1 -1
  231. package/dist/components/ui/navigation-menu.d.mts +11 -11
  232. package/dist/components/ui/navigation-menu.d.mts.map +1 -1
  233. package/dist/components/ui/navigation-menu.mjs +0 -1
  234. package/dist/components/ui/navigation-menu.mjs.map +1 -1
  235. package/dist/components/ui/pagination.d.mts +8 -8
  236. package/dist/components/ui/pagination.d.mts.map +1 -1
  237. package/dist/components/ui/pagination.mjs +0 -1
  238. package/dist/components/ui/pagination.mjs.map +1 -1
  239. package/dist/components/ui/popover.d.mts +5 -5
  240. package/dist/components/ui/popover.d.mts.map +1 -1
  241. package/dist/components/ui/popover.mjs +0 -1
  242. package/dist/components/ui/popover.mjs.map +1 -1
  243. package/dist/components/ui/progress.client.d.mts +2 -2
  244. package/dist/components/ui/progress.client.d.mts.map +1 -1
  245. package/dist/components/ui/progress.client.mjs +0 -1
  246. package/dist/components/ui/progress.client.mjs.map +1 -1
  247. package/dist/components/ui/radio-group.d.mts +3 -3
  248. package/dist/components/ui/radio-group.d.mts.map +1 -1
  249. package/dist/components/ui/radio-group.mjs +0 -1
  250. package/dist/components/ui/radio-group.mjs.map +1 -1
  251. package/dist/components/ui/resizable.client.d.mts +4 -4
  252. package/dist/components/ui/resizable.client.d.mts.map +1 -1
  253. package/dist/components/ui/resizable.client.mjs +0 -1
  254. package/dist/components/ui/resizable.client.mjs.map +1 -1
  255. package/dist/components/ui/scroll-area.d.mts +3 -3
  256. package/dist/components/ui/scroll-area.d.mts.map +1 -1
  257. package/dist/components/ui/scroll-area.mjs +0 -1
  258. package/dist/components/ui/scroll-area.mjs.map +1 -1
  259. package/dist/components/ui/select.client.d.mts +11 -11
  260. package/dist/components/ui/select.client.d.mts.map +1 -1
  261. package/dist/components/ui/select.client.mjs +0 -1
  262. package/dist/components/ui/select.client.mjs.map +1 -1
  263. package/dist/components/ui/separator.d.mts +2 -2
  264. package/dist/components/ui/separator.d.mts.map +1 -1
  265. package/dist/components/ui/separator.mjs +0 -1
  266. package/dist/components/ui/separator.mjs.map +1 -1
  267. package/dist/components/ui/sheet.client.d.mts +9 -9
  268. package/dist/components/ui/sheet.client.d.mts.map +1 -1
  269. package/dist/components/ui/sheet.client.mjs +0 -1
  270. package/dist/components/ui/sheet.client.mjs.map +1 -1
  271. package/dist/components/ui/sidebar.client.d.mts +26 -26
  272. package/dist/components/ui/sidebar.client.d.mts.map +1 -1
  273. package/dist/components/ui/sidebar.client.mjs +2 -2
  274. package/dist/components/ui/sidebar.client.mjs.map +1 -1
  275. package/dist/components/ui/skeleton.d.mts +2 -2
  276. package/dist/components/ui/skeleton.d.mts.map +1 -1
  277. package/dist/components/ui/slider.d.mts +2 -2
  278. package/dist/components/ui/slider.d.mts.map +1 -1
  279. package/dist/components/ui/sonner.client.d.mts +2 -2
  280. package/dist/components/ui/sonner.client.d.mts.map +1 -1
  281. package/dist/components/ui/sonner.client.mjs.map +1 -1
  282. package/dist/components/ui/switch.d.mts +2 -2
  283. package/dist/components/ui/switch.d.mts.map +1 -1
  284. package/dist/components/ui/switch.mjs +0 -1
  285. package/dist/components/ui/switch.mjs.map +1 -1
  286. package/dist/components/ui/tabs.d.mts +5 -5
  287. package/dist/components/ui/tabs.d.mts.map +1 -1
  288. package/dist/components/ui/tabs.mjs +0 -1
  289. package/dist/components/ui/tabs.mjs.map +1 -1
  290. package/dist/components/ui/textarea.d.mts +2 -2
  291. package/dist/components/ui/textarea.d.mts.map +1 -1
  292. package/dist/components/ui/textarea.mjs +0 -1
  293. package/dist/components/ui/textarea.mjs.map +1 -1
  294. package/dist/components/ui/toggle-group.client.d.mts +3 -3
  295. package/dist/components/ui/toggle-group.client.d.mts.map +1 -1
  296. package/dist/components/ui/toggle-group.client.mjs.map +1 -1
  297. package/dist/components/ui/toggle.d.mts +4 -4
  298. package/dist/components/ui/toggle.d.mts.map +1 -1
  299. package/dist/components/ui/toggle.mjs +0 -1
  300. package/dist/components/ui/toggle.mjs.map +1 -1
  301. package/dist/components/ui/tooltip.client.d.mts +5 -5
  302. package/dist/components/ui/tooltip.client.d.mts.map +1 -1
  303. package/dist/components/ui/tooltip.client.mjs +0 -1
  304. package/dist/components/ui/tooltip.client.mjs.map +1 -1
  305. package/dist/components.d.mts +1 -1
  306. package/dist/components.mjs +1 -1
  307. package/dist/data-tables/client.d.mts +4 -4
  308. package/dist/data-tables/client.mjs +4 -4
  309. package/dist/inline-edit/client.d.mts +4 -4
  310. package/dist/inline-edit/client.mjs +2 -2
  311. package/dist/lib/config/constants.d.mts.map +1 -1
  312. package/dist/lib/config/constants.mjs.map +1 -1
  313. package/dist/lib/hooks/use-action.d.mts +0 -1
  314. package/dist/lib/hooks/use-action.d.mts.map +1 -1
  315. package/dist/lib/hooks/use-action.mjs.map +1 -1
  316. package/dist/lib/hooks/use-indicator.d.mts +2 -2
  317. package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
  318. package/dist/lib/hooks/use-indicator.mjs +14 -11
  319. package/dist/lib/hooks/use-indicator.mjs.map +1 -1
  320. package/dist/lib/hooks/use-mobile.client.d.mts.map +1 -1
  321. package/dist/lib/types/config.d.mts.map +1 -1
  322. package/dist/lib/utils/array-move.d.mts.map +1 -1
  323. package/dist/lib/utils/cn.d.mts.map +1 -1
  324. package/dist/lib/utils/cn.mjs.map +1 -1
  325. package/dist/lib/utils/fonts.d.mts.map +1 -1
  326. package/dist/lib/utils/format.d.mts.map +1 -1
  327. package/dist/lib/utils/manifest.d.mts.map +1 -1
  328. package/dist/lib/utils/manifest.mjs.map +1 -1
  329. package/dist/lib/utils/url.d.mts.map +1 -1
  330. package/dist/lib/utils/url.mjs +1 -1
  331. package/dist/lib/utils/url.mjs.map +1 -1
  332. package/dist/modules/auth/components/allowed.client.d.mts +2 -2
  333. package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
  334. package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
  335. package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
  336. package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
  337. package/dist/modules/auth/components/auth-layout.server.mjs +1 -1
  338. package/dist/modules/auth/components/auth-layout.server.mjs.map +1 -1
  339. package/dist/modules/auth/components/auth-loading.d.mts +2 -2
  340. package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
  341. package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
  342. package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
  343. package/dist/modules/auth/components/create-first-user-page.client.mjs +1 -1
  344. package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
  345. package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
  346. package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
  347. package/dist/modules/auth/components/forget-password-page.client.mjs +2 -2
  348. package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
  349. package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
  350. package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
  351. package/dist/modules/auth/components/guard-first-user.server.mjs.map +1 -1
  352. package/dist/modules/auth/components/guard.server.d.mts +2 -2
  353. package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
  354. package/dist/modules/auth/components/guard.server.mjs.map +1 -1
  355. package/dist/modules/auth/components/login-page.client.d.mts +2 -2
  356. package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
  357. package/dist/modules/auth/components/login-page.client.mjs +1 -1
  358. package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
  359. package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
  360. package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
  361. package/dist/modules/auth/components/reset-password-page.client.mjs +2 -2
  362. package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
  363. package/dist/modules/auth/components/update-password-command.d.mts +2 -2
  364. package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
  365. package/dist/modules/auth/components/update-password-command.mjs +0 -1
  366. package/dist/modules/auth/components/update-password-command.mjs.map +1 -1
  367. package/dist/modules/auth/db/schema.d.mts +73 -73
  368. package/dist/modules/auth/db/schema.d.mts.map +1 -1
  369. package/dist/modules/auth/db/schema.mjs +1 -1
  370. package/dist/modules/auth/db/schema.mjs.map +1 -1
  371. package/dist/modules/auth/handler/create-client.client.d.mts +159 -159
  372. package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -1
  373. package/dist/modules/auth/handler/create-client.client.mjs.map +1 -1
  374. package/dist/modules/auth/handler/init.d.mts +98 -98
  375. package/dist/modules/auth/handler/init.d.mts.map +1 -1
  376. package/dist/modules/auth/handler/init.mjs +2 -2
  377. package/dist/modules/auth/handler/init.mjs.map +1 -1
  378. package/dist/modules/auth/handler/proxy.server.d.mts +0 -1
  379. package/dist/modules/auth/handler/proxy.server.d.mts.map +1 -1
  380. package/dist/modules/auth/handler/proxy.server.mjs +0 -1
  381. package/dist/modules/auth/handler/proxy.server.mjs.map +1 -1
  382. package/dist/modules/auth/handler/route.server.d.mts +0 -1
  383. package/dist/modules/auth/handler/route.server.d.mts.map +1 -1
  384. package/dist/modules/auth/handler/route.server.mjs.map +1 -1
  385. package/dist/modules/auth/hooks/use-auth-client.d.mts +4 -4
  386. package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -1
  387. package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -1
  388. package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
  389. package/dist/modules/auth/hooks/use-permission.mjs +2 -2
  390. package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
  391. package/dist/modules/auth/hooks/use-session.d.mts +2 -2
  392. package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
  393. package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
  394. package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
  395. package/dist/modules/auth/lib/helpers.server.mjs +2 -2
  396. package/dist/modules/auth/lib/helpers.server.mjs.map +1 -1
  397. package/dist/modules/auth/lib/permissions.d.mts.map +1 -1
  398. package/dist/modules/auth/lib/validators.d.mts +2 -3
  399. package/dist/modules/auth/lib/validators.d.mts.map +1 -1
  400. package/dist/modules/commands/components/alert-dialog-command.client.d.mts +10 -10
  401. package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
  402. package/dist/modules/commands/components/alert-dialog-command.client.mjs.map +1 -1
  403. package/dist/modules/commands/components/click-command.client.d.mts +2 -2
  404. package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
  405. package/dist/modules/commands/components/click-command.client.mjs +0 -1
  406. package/dist/modules/commands/components/click-command.client.mjs.map +1 -1
  407. package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
  408. package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
  409. package/dist/modules/commands/components/command-trigger.client.mjs.map +1 -1
  410. package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
  411. package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
  412. package/dist/modules/commands/components/dialog-command.client.mjs.map +1 -1
  413. package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
  414. package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
  415. package/dist/modules/commands/components/dropdown-command.client.mjs.map +1 -1
  416. package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
  417. package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
  418. package/dist/modules/commands/components/empty-command.client.mjs +0 -1
  419. package/dist/modules/commands/components/empty-command.client.mjs.map +1 -1
  420. package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -11
  421. package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
  422. package/dist/modules/commands/components/form-dialog-command.client.mjs.map +1 -1
  423. package/dist/modules/commands/components/render-command.mjs.map +1 -1
  424. package/dist/modules/commands/hooks/context.client.mjs.map +1 -1
  425. package/dist/modules/commands/hooks/use-command-menu.client.d.mts +8 -1
  426. package/dist/modules/commands/hooks/use-command-menu.client.d.mts.map +1 -1
  427. package/dist/modules/commands/hooks/use-command-menu.client.mjs +1 -1
  428. package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
  429. package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
  430. package/dist/modules/commands/hooks/use-command-mutation.client.d.mts.map +1 -1
  431. package/dist/modules/commands/hooks/use-command-mutation.client.mjs.map +1 -1
  432. package/dist/modules/commands/lib/definitions.d.mts +0 -1
  433. package/dist/modules/commands/lib/definitions.d.mts.map +1 -1
  434. package/dist/modules/commands/lib/factory.d.mts.map +1 -1
  435. package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
  436. package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
  437. package/dist/modules/commands/menus/context-menu.client.mjs +5 -5
  438. package/dist/modules/commands/menus/context-menu.client.mjs.map +1 -1
  439. package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
  440. package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
  441. package/dist/modules/commands/menus/dropdown-menu.client.mjs.map +1 -1
  442. package/dist/modules/commands/menus/floating-menu.client.d.mts +19 -0
  443. package/dist/modules/commands/menus/floating-menu.client.d.mts.map +1 -0
  444. package/dist/modules/commands/menus/{data-table-menu.client.mjs → floating-menu.client.mjs} +10 -10
  445. package/dist/modules/commands/menus/floating-menu.client.mjs.map +1 -0
  446. package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
  447. package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
  448. package/dist/modules/commands/menus/inline-menu.client.mjs +0 -1
  449. package/dist/modules/commands/menus/inline-menu.client.mjs.map +1 -1
  450. package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
  451. package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
  452. package/dist/modules/commands/menus/responsive-menu.client.mjs.map +1 -1
  453. package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
  454. package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
  455. package/dist/modules/commands/utils/archive-command.client.mjs.map +1 -1
  456. package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
  457. package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
  458. package/dist/modules/commands/utils/delete-command.client.mjs.map +1 -1
  459. package/dist/modules/config/db/helpers.d.mts +5 -5
  460. package/dist/modules/config/db/helpers.d.mts.map +1 -1
  461. package/dist/modules/config/db/helpers.mjs.map +1 -1
  462. package/dist/modules/config/db/init.d.mts.map +1 -1
  463. package/dist/modules/config/db/init.mjs.map +1 -1
  464. package/dist/modules/config/db/types.d.mts.map +1 -1
  465. package/dist/modules/config/lib/config.d.mts.map +1 -1
  466. package/dist/modules/config/lib/context.d.mts.map +1 -1
  467. package/dist/modules/config/lib/context.mjs.map +1 -1
  468. package/dist/modules/config/paths/helpers.d.mts +0 -1
  469. package/dist/modules/config/paths/helpers.d.mts.map +1 -1
  470. package/dist/modules/config/paths/helpers.mjs.map +1 -1
  471. package/dist/modules/config/paths/types.d.mts +0 -1
  472. package/dist/modules/config/paths/types.d.mts.map +1 -1
  473. package/dist/modules/config/providers/email.d.mts.map +1 -1
  474. package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
  475. package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
  476. package/dist/modules/data-tables/components/cell/common.client.mjs.map +1 -1
  477. package/dist/modules/data-tables/components/cell/index.client.d.mts.map +1 -1
  478. package/dist/modules/data-tables/components/cell/select.client.d.mts.map +1 -1
  479. package/dist/modules/data-tables/components/column-header.d.mts +2 -2
  480. package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
  481. package/dist/modules/data-tables/components/column-header.mjs.map +1 -1
  482. package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
  483. package/dist/modules/data-tables/components/filters/combobox.client.d.mts.map +1 -1
  484. package/dist/modules/data-tables/components/filters/combobox.client.mjs.map +1 -1
  485. package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
  486. package/dist/modules/data-tables/components/filters/slider.client.d.mts.map +1 -1
  487. package/dist/modules/data-tables/components/filters/slider.client.mjs +1 -1
  488. package/dist/modules/data-tables/components/filters/slider.client.mjs.map +1 -1
  489. package/dist/modules/data-tables/components/footer.mjs.map +1 -1
  490. package/dist/modules/data-tables/components/header.d.mts +4 -4
  491. package/dist/modules/data-tables/components/header.d.mts.map +1 -1
  492. package/dist/modules/data-tables/components/header.mjs.map +1 -1
  493. package/dist/modules/data-tables/components/layout.d.mts +2 -2
  494. package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
  495. package/dist/modules/data-tables/components/layout.mjs.map +1 -1
  496. package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
  497. package/dist/modules/data-tables/components/search-input.client.d.mts.map +1 -1
  498. package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
  499. package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
  500. package/dist/modules/data-tables/components/skeleton.mjs +4 -4
  501. package/dist/modules/data-tables/components/skeleton.mjs.map +1 -1
  502. package/dist/modules/data-tables/components/table.d.mts +7 -7
  503. package/dist/modules/data-tables/components/table.d.mts.map +1 -1
  504. package/dist/modules/data-tables/components/table.mjs +0 -1
  505. package/dist/modules/data-tables/components/table.mjs.map +1 -1
  506. package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
  507. package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
  508. package/dist/modules/data-tables/components/toolbar.mjs.map +1 -1
  509. package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
  510. package/dist/modules/data-tables/hooks/use-context.client.d.mts.map +1 -1
  511. package/dist/modules/data-tables/hooks/use-context.client.mjs.map +1 -1
  512. package/dist/modules/data-tables/hooks/use-selection.client.mjs.map +1 -1
  513. package/dist/modules/data-tables/hooks/use-table.client.d.mts.map +1 -1
  514. package/dist/modules/data-tables/hooks/use-table.client.mjs.map +1 -1
  515. package/dist/modules/data-tables/lib/converters/cursor.d.mts +0 -1
  516. package/dist/modules/data-tables/lib/converters/cursor.d.mts.map +1 -1
  517. package/dist/modules/data-tables/lib/converters/cursor.mjs.map +1 -1
  518. package/dist/modules/data-tables/lib/converters/dto.d.mts +0 -1
  519. package/dist/modules/data-tables/lib/converters/dto.d.mts.map +1 -1
  520. package/dist/modules/data-tables/lib/converters/dto.mjs.map +1 -1
  521. package/dist/modules/data-tables/lib/converters/filter.d.mts.map +1 -1
  522. package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
  523. package/dist/modules/data-tables/lib/converters/search.d.mts.map +1 -1
  524. package/dist/modules/data-tables/lib/converters/search.mjs.map +1 -1
  525. package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
  526. package/dist/modules/data-tables/lib/converters/sorting.d.mts.map +1 -1
  527. package/dist/modules/data-tables/lib/converters/sorting.mjs.map +1 -1
  528. package/dist/modules/data-tables/lib/filters/config.d.mts.map +1 -1
  529. package/dist/modules/data-tables/lib/filters/config.mjs.map +1 -1
  530. package/dist/modules/data-tables/lib/filters/helpers.d.mts.map +1 -1
  531. package/dist/modules/data-tables/lib/filters/helpers.mjs +4 -4
  532. package/dist/modules/data-tables/lib/filters/helpers.mjs.map +1 -1
  533. package/dist/modules/data-tables/lib/filters/parsers.d.mts.map +1 -1
  534. package/dist/modules/data-tables/lib/filters/parsers.mjs.map +1 -1
  535. package/dist/modules/data-tables/lib/filters/resolvers.d.mts.map +1 -1
  536. package/dist/modules/data-tables/lib/filters/resolvers.mjs +1 -1
  537. package/dist/modules/data-tables/lib/filters/resolvers.mjs.map +1 -1
  538. package/dist/modules/data-tables/lib/helpers/create-column.mjs.map +1 -1
  539. package/dist/modules/data-tables/lib/search-params.d.mts +6 -6
  540. package/dist/modules/data-tables/lib/search-params.d.mts.map +1 -1
  541. package/dist/modules/data-tables/lib/types.d.mts +0 -1
  542. package/dist/modules/data-tables/lib/types.d.mts.map +1 -1
  543. package/dist/modules/data-tables/lib/validators.d.mts +0 -1
  544. package/dist/modules/data-tables/lib/validators.d.mts.map +1 -1
  545. package/dist/modules/data-tables/server/get-data.server.d.mts +1 -1
  546. package/dist/modules/data-tables/server/get-data.server.d.mts.map +1 -1
  547. package/dist/modules/data-tables/server/get-data.server.mjs.map +1 -1
  548. package/dist/modules/data-tables/strategies/helpers/sorting.mjs.map +1 -1
  549. package/dist/modules/data-tables/strategies/infinite/components.mjs +1 -1
  550. package/dist/modules/data-tables/strategies/infinite/components.mjs.map +1 -1
  551. package/dist/modules/data-tables/strategies/infinite/strategy.d.mts.map +1 -1
  552. package/dist/modules/data-tables/strategies/infinite/strategy.mjs.map +1 -1
  553. package/dist/modules/data-tables/strategies/pagination/components.mjs.map +1 -1
  554. package/dist/modules/data-tables/strategies/pagination/strategy.d.mts.map +1 -1
  555. package/dist/modules/data-tables/strategies/pagination/strategy.mjs.map +1 -1
  556. package/dist/modules/data-tables/tables/data-table/components/body.mjs.map +1 -1
  557. package/dist/modules/data-tables/tables/data-table/components/header.mjs.map +1 -1
  558. package/dist/modules/data-tables/tables/data-table/components/row.mjs +0 -1
  559. package/dist/modules/data-tables/tables/data-table/components/row.mjs.map +1 -1
  560. package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
  561. package/dist/modules/data-tables/tables/data-table/components/table.d.mts.map +1 -1
  562. package/dist/modules/data-tables/tables/data-table/components/table.mjs +8 -2
  563. package/dist/modules/data-tables/tables/data-table/components/table.mjs.map +1 -1
  564. package/dist/modules/data-tables/tables/inline-table/components/body.mjs.map +1 -1
  565. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
  566. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts.map +1 -1
  567. package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs +0 -1
  568. package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs.map +1 -1
  569. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
  570. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts.map +1 -1
  571. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs.map +1 -1
  572. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
  573. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts.map +1 -1
  574. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs +0 -1
  575. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs.map +1 -1
  576. package/dist/modules/data-tables/tables/inline-table/components/header.mjs.map +1 -1
  577. package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs +0 -1
  578. package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs.map +1 -1
  579. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
  580. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
  581. package/dist/modules/data-tables/tables/inline-table/components/table.mjs +8 -2
  582. package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
  583. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
  584. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
  585. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs.map +1 -1
  586. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
  587. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
  588. package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +5 -1
  589. package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
  590. package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
  591. package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
  592. package/dist/modules/inline-edit/components/combobox.client.mjs +8 -4
  593. package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
  594. package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
  595. package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
  596. package/dist/modules/inline-edit/components/date-input.client.mjs +5 -1
  597. package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
  598. package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
  599. package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
  600. package/dist/modules/inline-edit/components/date-picker.client.mjs +8 -4
  601. package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
  602. package/dist/modules/inline-edit/components/date-time.client.d.mts +2 -2
  603. package/dist/modules/inline-edit/components/date-time.client.d.mts.map +1 -1
  604. package/dist/modules/inline-edit/components/date-time.client.mjs +6 -1
  605. package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
  606. package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
  607. package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
  608. package/dist/modules/inline-edit/components/editor.client.mjs +7 -3
  609. package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
  610. package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
  611. package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
  612. package/dist/modules/inline-edit/components/input-recipient.client.mjs +5 -1
  613. package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
  614. package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
  615. package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
  616. package/dist/modules/inline-edit/components/input-toggle.client.mjs +5 -1
  617. package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
  618. package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
  619. package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
  620. package/dist/modules/inline-edit/components/input.client.mjs +16 -4
  621. package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
  622. package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
  623. package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
  624. package/dist/modules/inline-edit/components/select.client.mjs +8 -4
  625. package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
  626. package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
  627. package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
  628. package/dist/modules/inline-edit/components/switch.client.mjs +5 -1
  629. package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
  630. package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
  631. package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
  632. package/dist/modules/inline-edit/components/toggle.client.mjs +8 -4
  633. package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
  634. package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
  635. package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
  636. package/dist/modules/inline-edit/hooks/context.client.mjs +1 -1
  637. package/dist/modules/inline-edit/hooks/context.client.mjs.map +1 -1
  638. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +22 -7
  639. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
  640. package/dist/modules/inline-edit/hooks/use-inline.client.mjs +12 -9
  641. package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
  642. package/dist/modules/inline-edit/lib/validators.d.mts +0 -1
  643. package/dist/modules/inline-edit/lib/validators.d.mts.map +1 -1
  644. package/dist/modules/inline-edit/lib/validators.mjs.map +1 -1
  645. package/dist/modules/inline-edit/lib/variants.d.mts +3 -3
  646. package/dist/modules/inline-edit/lib/variants.d.mts.map +1 -1
  647. package/dist/modules/inline-edit/lib/variants.mjs.map +1 -1
  648. package/dist/modules/router/handler/caller.client.d.mts +0 -1
  649. package/dist/modules/router/handler/caller.client.d.mts.map +1 -1
  650. package/dist/modules/router/handler/caller.client.mjs.map +1 -1
  651. package/dist/modules/router/handler/caller.server.d.mts.map +1 -1
  652. package/dist/modules/router/handler/context.server.d.mts.map +1 -1
  653. package/dist/modules/router/handler/context.server.mjs.map +1 -1
  654. package/dist/modules/router/handler/init.server.d.mts +6 -6
  655. package/dist/modules/router/handler/init.server.d.mts.map +1 -1
  656. package/dist/modules/router/handler/init.server.mjs.map +1 -1
  657. package/dist/modules/router/handler/register.server.d.mts.map +1 -1
  658. package/dist/modules/router/handler/register.server.mjs.map +1 -1
  659. package/dist/modules/router/handler/route.server.d.mts +0 -1
  660. package/dist/modules/router/handler/route.server.d.mts.map +1 -1
  661. package/dist/modules/router/handler/route.server.mjs.map +1 -1
  662. package/dist/modules/router/lib/query-client.d.mts +0 -1
  663. package/dist/modules/router/lib/query-client.d.mts.map +1 -1
  664. package/dist/modules/router/lib/query-client.mjs.map +1 -1
  665. package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
  666. package/dist/modules/router/lib/validators.d.mts +0 -1
  667. package/dist/modules/router/lib/validators.d.mts.map +1 -1
  668. package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
  669. package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
  670. package/dist/modules/storage/components/dropzone-context.client.mjs.map +1 -1
  671. package/dist/modules/storage/components/dropzone.client.d.mts +3 -3
  672. package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
  673. package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
  674. package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
  675. package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
  676. package/dist/modules/storage/components/image-grid.client.mjs +2 -0
  677. package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
  678. package/dist/modules/storage/components/upload-zone-context.client.d.mts +1 -1
  679. package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
  680. package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
  681. package/dist/modules/storage/components/upload-zone.client.d.mts +4 -3
  682. package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
  683. package/dist/modules/storage/components/upload-zone.client.mjs +9 -7
  684. package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
  685. package/dist/modules/storage/config/filters.d.mts.map +1 -1
  686. package/dist/modules/storage/config/filters.mjs.map +1 -1
  687. package/dist/modules/storage/lib/constants.d.mts.map +1 -1
  688. package/dist/modules/storage/lib/create-client.server.d.mts.map +1 -1
  689. package/dist/modules/storage/lib/create-client.server.mjs.map +1 -1
  690. package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
  691. package/dist/modules/storage/lib/create-upload.client.mjs.map +1 -1
  692. package/dist/modules/storage/lib/helpers.d.mts +0 -1
  693. package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
  694. package/dist/modules/storage/lib/helpers.mjs.map +1 -1
  695. package/dist/modules/storage/lib/proxy.server.d.mts.map +1 -1
  696. package/dist/modules/storage/lib/proxy.server.mjs.map +1 -1
  697. package/dist/modules/storage/lib/router.server.d.mts +27 -27
  698. package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
  699. package/dist/modules/storage/lib/router.server.mjs.map +1 -1
  700. package/dist/modules/storage/lib/schema.d.mts +92 -92
  701. package/dist/modules/storage/lib/schema.d.mts.map +1 -1
  702. package/dist/modules/storage/lib/schema.mjs +1 -1
  703. package/dist/modules/storage/lib/schema.mjs.map +1 -1
  704. package/dist/modules/storage/lib/service.server.d.mts +18 -18
  705. package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
  706. package/dist/modules/storage/lib/service.server.mjs.map +1 -1
  707. package/dist/modules/storage/lib/validators.d.mts +92 -92
  708. package/dist/modules/storage/lib/validators.d.mts.map +1 -1
  709. package/dist/modules/storage/lib/validators.mjs.map +1 -1
  710. package/dist/storage/client.d.mts +1 -1
  711. package/package.json +89 -92
  712. package/src/components/common/icons.tsx +2 -2
  713. package/src/components/common/status.tsx +1 -1
  714. package/src/components/editor/components/content.client.tsx +1 -1
  715. package/src/components/editor/components/editor.client.tsx +6 -6
  716. package/src/components/editor/components/menu-nodes.client.tsx +11 -11
  717. package/src/components/editor/components/menu.client.tsx +5 -5
  718. package/src/components/editor/components/spinner.tsx +2 -8
  719. package/src/components/editor/extensions/file-handler/extension.ts +1 -1
  720. package/src/components/editor/extensions/file-handler/strategy.ts +4 -4
  721. package/src/components/editor/extensions/file-handler/utils.ts +4 -2
  722. package/src/components/editor/extensions/image/extension.ts +4 -1
  723. package/src/components/editor/extensions/skeleton/renderer.tsx +4 -3
  724. package/src/components/editor/lib/extensions.ts +23 -26
  725. package/src/components/editor/lib/helpers.ts +1 -1
  726. package/src/components/editor/lib/utils.ts +1 -33
  727. package/src/components/editor/lib/variants.ts +1 -1
  728. package/src/components/emails/forget-password-email.tsx +1 -1
  729. package/src/components/entry.client.ts +1 -1
  730. package/src/components/entry.ts +1 -1
  731. package/src/components/header/back-button.client.tsx +1 -1
  732. package/src/components/header/bottom-bar.client.tsx +3 -3
  733. package/src/components/header/breadcrumbs.client.tsx +2 -2
  734. package/src/components/header/header.client.tsx +1 -1
  735. package/src/components/header/indicator.client.tsx +2 -2
  736. package/src/components/header/top-bar.client.tsx +3 -3
  737. package/src/components/layouts/admin-content.client.tsx +1 -1
  738. package/src/components/layouts/admin-error-pages.tsx +1 -1
  739. package/src/components/layouts/admin-layout.tsx +1 -1
  740. package/src/components/layouts/admin-loading.tsx +1 -1
  741. package/src/components/layouts/empty-page.tsx +1 -1
  742. package/src/components/layouts/error-page.tsx +2 -2
  743. package/src/components/layouts/error-sections.tsx +1 -1
  744. package/src/components/layouts/list-layout.tsx +1 -1
  745. package/src/components/layouts/providers.client.tsx +4 -4
  746. package/src/components/layouts/root-layout.server.tsx +3 -3
  747. package/src/components/layouts/tab-layout.tsx +3 -3
  748. package/src/components/lists/data-list.tsx +1 -1
  749. package/src/components/lists/data-stack.tsx +1 -1
  750. package/src/components/navigation/admin-sidebar-header.client.tsx +13 -13
  751. package/src/components/navigation/admin-sidebar-paths.client.tsx +6 -6
  752. package/src/components/navigation/admin-sidebar-skeleton.tsx +1 -1
  753. package/src/components/navigation/admin-sidebar.client.tsx +6 -5
  754. package/src/components/ui/accordion.tsx +1 -2
  755. package/src/components/ui/alert-dialog.tsx +1 -1
  756. package/src/components/ui/alert.tsx +1 -1
  757. package/src/components/ui/avatar.client.tsx +1 -1
  758. package/src/components/ui/badge.tsx +1 -1
  759. package/src/components/ui/breadcrumb.tsx +4 -2
  760. package/src/components/ui/button.tsx +1 -1
  761. package/src/components/ui/calendar.tsx +2 -3
  762. package/src/components/ui/card.tsx +1 -1
  763. package/src/components/ui/carousel.tsx +2 -0
  764. package/src/components/ui/chart.client.tsx +12 -10
  765. package/src/components/ui/checkbox.tsx +1 -1
  766. package/src/components/ui/color-picker.client.tsx +4 -3
  767. package/src/components/ui/combobox-dropdown.client.tsx +2 -4
  768. package/src/components/ui/combobox.client.tsx +2 -2
  769. package/src/components/ui/command.tsx +1 -1
  770. package/src/components/ui/context-menu.tsx +1 -1
  771. package/src/components/ui/date-picker.client.tsx +2 -2
  772. package/src/components/ui/dialog.client.tsx +1 -1
  773. package/src/components/ui/drawer.client.tsx +1 -1
  774. package/src/components/ui/dropdown-menu.tsx +1 -1
  775. package/src/components/ui/form.client.tsx +4 -4
  776. package/src/components/ui/hover-card.client.tsx +1 -1
  777. package/src/components/ui/input-date-time.tsx +13 -11
  778. package/src/components/ui/input-recipient.tsx +6 -3
  779. package/src/components/ui/input.tsx +1 -1
  780. package/src/components/ui/label.tsx +1 -1
  781. package/src/components/ui/navigation-menu.tsx +1 -1
  782. package/src/components/ui/pagination.tsx +4 -2
  783. package/src/components/ui/popover.tsx +1 -1
  784. package/src/components/ui/progress.client.tsx +1 -1
  785. package/src/components/ui/radio-group.tsx +1 -1
  786. package/src/components/ui/resizable.client.tsx +1 -1
  787. package/src/components/ui/scroll-area.tsx +1 -1
  788. package/src/components/ui/select.client.tsx +1 -1
  789. package/src/components/ui/separator.tsx +1 -1
  790. package/src/components/ui/sheet.client.tsx +1 -1
  791. package/src/components/ui/sidebar.client.tsx +5 -2
  792. package/src/components/ui/sonner.client.tsx +1 -1
  793. package/src/components/ui/switch.tsx +1 -1
  794. package/src/components/ui/tabs.tsx +1 -1
  795. package/src/components/ui/textarea.tsx +1 -1
  796. package/src/components/ui/toggle-group.client.tsx +1 -1
  797. package/src/components/ui/toggle.tsx +1 -1
  798. package/src/components/ui/tooltip.client.tsx +1 -1
  799. package/src/lib/config/constants.ts +1 -1
  800. package/src/lib/hooks/use-action.ts +3 -3
  801. package/src/lib/hooks/use-indicator.tsx +17 -8
  802. package/src/lib/types/config.ts +1 -1
  803. package/src/lib/utils/cn.ts +1 -1
  804. package/src/lib/utils/manifest.ts +3 -2
  805. package/src/lib/utils/time-picker.ts +2 -2
  806. package/src/lib/utils/url.ts +1 -1
  807. package/src/modules/auth/components/allowed.client.tsx +2 -2
  808. package/src/modules/auth/components/auth-layout.server.tsx +2 -2
  809. package/src/modules/auth/components/create-first-user-page.client.tsx +10 -11
  810. package/src/modules/auth/components/forget-password-page.client.tsx +5 -5
  811. package/src/modules/auth/components/guard-first-user.server.tsx +2 -5
  812. package/src/modules/auth/components/guard.server.tsx +3 -3
  813. package/src/modules/auth/components/login-page.client.tsx +5 -5
  814. package/src/modules/auth/components/reset-password-page.client.tsx +7 -7
  815. package/src/modules/auth/components/update-password-command.tsx +5 -5
  816. package/src/modules/auth/db/schema.ts +2 -2
  817. package/src/modules/auth/entry.server.ts +1 -1
  818. package/src/modules/auth/handler/create-client.client.ts +3 -3
  819. package/src/modules/auth/handler/init.ts +6 -6
  820. package/src/modules/auth/handler/proxy.server.ts +1 -2
  821. package/src/modules/auth/handler/route.server.ts +2 -2
  822. package/src/modules/auth/hooks/use-auth-client.tsx +3 -3
  823. package/src/modules/auth/hooks/use-permission.ts +1 -1
  824. package/src/modules/auth/hooks/use-session.ts +1 -2
  825. package/src/modules/auth/lib/helpers.server.ts +4 -4
  826. package/src/modules/commands/components/alert-dialog-command.client.tsx +8 -8
  827. package/src/modules/commands/components/click-command.client.tsx +3 -3
  828. package/src/modules/commands/components/command-trigger.client.tsx +1 -1
  829. package/src/modules/commands/components/dialog-command.client.tsx +3 -3
  830. package/src/modules/commands/components/dropdown-command.client.tsx +2 -2
  831. package/src/modules/commands/components/empty-command.client.tsx +1 -1
  832. package/src/modules/commands/components/form-dialog-command.client.tsx +5 -5
  833. package/src/modules/commands/components/render-command.tsx +2 -2
  834. package/src/modules/commands/entry.client.ts +16 -0
  835. package/src/modules/commands/hooks/context.client.tsx +1 -1
  836. package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -4
  837. package/src/modules/commands/hooks/use-command-mutation.client.tsx +1 -1
  838. package/src/modules/commands/menus/context-menu.client.tsx +20 -19
  839. package/src/modules/commands/menus/dropdown-menu.client.tsx +6 -3
  840. package/src/modules/commands/menus/floating-menu.client.tsx +54 -0
  841. package/src/modules/commands/menus/inline-menu.client.tsx +6 -2
  842. package/src/modules/commands/menus/responsive-menu.client.tsx +1 -1
  843. package/src/modules/commands/utils/archive-command.client.tsx +1 -1
  844. package/src/modules/commands/utils/delete-command.client.tsx +1 -1
  845. package/src/modules/config/db/helpers.ts +1 -1
  846. package/src/modules/config/db/init.ts +2 -2
  847. package/src/modules/config/lib/context.ts +5 -5
  848. package/src/modules/config/paths/helpers.ts +1 -1
  849. package/src/modules/config/paths/types.ts +4 -5
  850. package/src/modules/data-tables/components/cell/common.client.tsx +1 -1
  851. package/src/modules/data-tables/components/column-header.tsx +2 -2
  852. package/src/modules/data-tables/components/filters/combobox.client.tsx +3 -3
  853. package/src/modules/data-tables/components/filters/slider.client.tsx +5 -5
  854. package/src/modules/data-tables/components/footer.tsx +2 -2
  855. package/src/modules/data-tables/components/header.tsx +2 -2
  856. package/src/modules/data-tables/components/layout.tsx +1 -1
  857. package/src/modules/data-tables/components/skeleton.tsx +22 -29
  858. package/src/modules/data-tables/components/table.tsx +1 -1
  859. package/src/modules/data-tables/components/toolbar.tsx +1 -1
  860. package/src/modules/data-tables/entry.client.ts +9 -13
  861. package/src/modules/data-tables/hooks/use-context.client.tsx +6 -6
  862. package/src/modules/data-tables/hooks/use-selection.client.ts +1 -1
  863. package/src/modules/data-tables/hooks/use-table.client.ts +1 -1
  864. package/src/modules/data-tables/lib/converters/cursor.ts +1 -1
  865. package/src/modules/data-tables/lib/converters/dto.ts +1 -1
  866. package/src/modules/data-tables/lib/converters/search.ts +2 -2
  867. package/src/modules/data-tables/lib/converters/sorting.ts +2 -2
  868. package/src/modules/data-tables/lib/filters/config.ts +2 -2
  869. package/src/modules/data-tables/lib/filters/helpers.ts +4 -4
  870. package/src/modules/data-tables/lib/filters/parsers.ts +2 -2
  871. package/src/modules/data-tables/lib/filters/resolvers.ts +2 -2
  872. package/src/modules/data-tables/lib/helpers/create-column.ts +1 -1
  873. package/src/modules/data-tables/lib/types.ts +6 -5
  874. package/src/modules/data-tables/server/get-data.server.ts +8 -8
  875. package/src/modules/data-tables/strategies/helpers/sorting.ts +7 -3
  876. package/src/modules/data-tables/strategies/infinite/components.tsx +4 -4
  877. package/src/modules/data-tables/strategies/infinite/strategy.ts +2 -2
  878. package/src/modules/data-tables/strategies/pagination/components.tsx +2 -2
  879. package/src/modules/data-tables/strategies/pagination/strategy.ts +2 -2
  880. package/src/modules/data-tables/tables/data-table/components/body.tsx +3 -3
  881. package/src/modules/data-tables/tables/data-table/components/header.tsx +1 -1
  882. package/src/modules/data-tables/tables/data-table/components/row.tsx +3 -3
  883. package/src/modules/data-tables/tables/data-table/components/table.tsx +13 -4
  884. package/src/modules/data-tables/tables/inline-table/components/body.tsx +5 -5
  885. package/src/modules/data-tables/tables/inline-table/components/cells/common.tsx +1 -1
  886. package/src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx +9 -5
  887. package/src/modules/data-tables/tables/inline-table/components/cells/read-only.tsx +1 -1
  888. package/src/modules/data-tables/tables/inline-table/components/header.tsx +1 -1
  889. package/src/modules/data-tables/tables/inline-table/components/row.client.tsx +5 -5
  890. package/src/modules/data-tables/tables/inline-table/components/table.tsx +14 -5
  891. package/src/modules/data-tables/tables/inline-table/hooks/context.client.tsx +2 -2
  892. package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +6 -2
  893. package/src/modules/inline-edit/components/combobox.client.tsx +6 -2
  894. package/src/modules/inline-edit/components/date-input.client.tsx +8 -4
  895. package/src/modules/inline-edit/components/date-picker.client.tsx +7 -3
  896. package/src/modules/inline-edit/components/date-time.client.tsx +20 -4
  897. package/src/modules/inline-edit/components/editor.client.tsx +7 -3
  898. package/src/modules/inline-edit/components/input-recipient.client.tsx +7 -3
  899. package/src/modules/inline-edit/components/input-toggle.client.tsx +7 -3
  900. package/src/modules/inline-edit/components/input.client.tsx +15 -3
  901. package/src/modules/inline-edit/components/select.client.tsx +12 -8
  902. package/src/modules/inline-edit/components/switch.client.tsx +5 -1
  903. package/src/modules/inline-edit/components/toggle.client.tsx +5 -1
  904. package/src/modules/inline-edit/entry.client.ts +3 -2
  905. package/src/modules/inline-edit/hooks/context.client.tsx +3 -2
  906. package/src/modules/inline-edit/hooks/use-inline.client.tsx +42 -18
  907. package/src/modules/inline-edit/lib/parsers.ts +9 -0
  908. package/src/modules/inline-edit/lib/validators.ts +1 -1
  909. package/src/modules/inline-edit/lib/variants.ts +1 -1
  910. package/src/modules/router/handler/caller.client.tsx +2 -2
  911. package/src/modules/router/handler/context.server.ts +4 -4
  912. package/src/modules/router/handler/init.server.ts +3 -3
  913. package/src/modules/router/handler/register.server.ts +3 -3
  914. package/src/modules/router/handler/route.server.ts +3 -3
  915. package/src/modules/router/lib/query-client.ts +0 -1
  916. package/src/modules/storage/components/dropzone-context.client.tsx +1 -1
  917. package/src/modules/storage/components/dropzone.client.tsx +3 -3
  918. package/src/modules/storage/components/image-grid.client.tsx +23 -19
  919. package/src/modules/storage/components/upload-button.client.tsx +2 -2
  920. package/src/modules/storage/components/upload-zone-context.client.tsx +3 -2
  921. package/src/modules/storage/components/upload-zone.client.tsx +13 -7
  922. package/src/modules/storage/config/filters.ts +1 -1
  923. package/src/modules/storage/entry.client.ts +3 -2
  924. package/src/modules/storage/lib/create-client.server.ts +2 -2
  925. package/src/modules/storage/lib/create-upload.client.ts +2 -2
  926. package/src/modules/storage/lib/helpers.ts +3 -3
  927. package/src/modules/storage/lib/proxy.server.ts +4 -4
  928. package/src/modules/storage/lib/router.server.ts +5 -5
  929. package/src/modules/storage/lib/schema.ts +2 -2
  930. package/src/modules/storage/lib/service.server.ts +21 -21
  931. package/src/modules/storage/lib/validators.ts +3 -3
  932. package/src/styles.css +1 -1
  933. package/dist/modules/commands/menus/data-table-menu.client.mjs.map +0 -1
  934. package/src/modules/auth/lib/utils.ts +0 -17
  935. package/src/modules/commands/menus/data-table-menu.client.tsx +0 -46
  936. package/src/modules/config/db/create-client.ts +0 -40
@@ -1 +1 @@
1
- {"version":3,"file":"use-inline.client.mjs","names":["defaultUpdateStrategy: UpdateStrategy","value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { EditorJSONContent } from \"@/components/entry\";\nimport { useLocalIndicator } from \"@/lib/entry.client\";\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { useCallback, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useDebouncedCallback } from \"use-debounce\";\nimport { useInlineEditContext } from \"./context.client\";\n\ntype UpdateStrategy =\n | {\n mode: \"change\";\n delay?: number;\n }\n | {\n mode: \"blur\";\n };\n\nconst defaultUpdateStrategy: UpdateStrategy = {\n mode: \"blur\",\n};\n\ntype MaybeValue<TValue, Required extends boolean> = Required extends true ? TValue : TValue | null;\n\n/**\n * Use the inline edit hook options.\n */\nexport type useInlineEditOptions<TValue, Required extends boolean = false> = {\n /**\n * Initial value\n */\n initialValue?: MaybeValue<TValue, Required>;\n /**\n * Action to execute on update\n */\n action: (value: { id: string; value: MaybeValue<TValue, Required> }) => Promise<unknown>;\n /**\n * Permission required to edit\n */\n permission?: Permission;\n /**\n * Update strategy\n * - trigger: when to update the value (default: \"blur\")\n * - delay: delay in milliseconds before updating the value (only for \"change\" trigger)\n * @default { trigger: \"blur\" }\n */\n updateStrategy?: UpdateStrategy;\n /**\n * Is the value required\n * @default false\n */\n isRequired?: Required;\n};\n\n/**\n * Use the inline edit hook.\n */\nexport function useInlineEdit<\n TValue extends string | number | Date | boolean | JSON | EditorJSONContent,\n Required extends boolean = false,\n>(props: useInlineEditOptions<TValue, Required>) {\n /**\n * The update strategy.\n */\n const strategy = props.updateStrategy ?? defaultUpdateStrategy;\n const delay = strategy.mode === \"change\" ? (strategy.delay ?? 0) : 0;\n\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState<MaybeValue<TValue, Required> | undefined>(props.initialValue);\n\n /**\n * The indicator status.\n */\n const { status, setStatus } = useLocalIndicator();\n\n /**\n * Permission guard\n */\n const data = usePermission(props.permission ?? context.permission ?? {});\n const isAllowed = data?.success;\n\n /**\n * Execute the action to update the value.\n */\n const mutation = useAction({\n mutationFn: props.action,\n onMutate: () => {\n setStatus(\"pending\");\n },\n onSuccess: () => {\n setStatus(\"success\");\n },\n onError: (error) => {\n setValue(props.initialValue);\n toast.error(\"Er is iets misgegaan\", {\n description: error instanceof Error ? error.message : undefined,\n });\n },\n });\n\n /**\n * Handle instant mutate\n */\n const handleMutateInstant = useCallback(\n (value: MaybeValue<TValue, Required>) => {\n // Permission guard\n if (!isAllowed) {\n toast.error(\"Je hebt geen toestemming om dit te bewerken\");\n return;\n }\n\n // If the value is the same as the initial value, do nothing\n if (value === props.initialValue) return;\n\n // Update the value\n return mutation.mutate({ id: context.id, value });\n },\n [isAllowed, props.initialValue, mutation, context.id],\n );\n\n /**\n * Handle mutate with debounce\n */\n const handleMutateDebounced = useDebouncedCallback(handleMutateInstant, delay);\n\n /**\n * Handle change updates\n */\n function handleChange(next: MaybeValue<TValue, Required> | null) {\n // Set value in state\n setValue(next ?? undefined);\n\n // If the strategy is not change, exit\n if (strategy.mode !== \"change\") return;\n\n // If it is required and the value is null or empty, reset to initial value\n if (props.isRequired && next === null) {\n setValue(props.initialValue ?? undefined);\n setStatus(\"error\");\n toast.error(\"Dit veld is verplicht\");\n return;\n }\n\n // If the strategy is change, update the value after the delay\n handleMutateDebounced(next as MaybeValue<TValue, Required>);\n }\n\n /**\n * Handle blur updates\n */\n function handleBlur(next: MaybeValue<TValue, Required> | null) {\n // Set value in state\n setValue(next ?? undefined);\n\n // If the strategy is not blur, exit\n if (strategy.mode !== \"blur\") return;\n\n // If it is required and the value is null or empty, reset to initial value\n if (props.isRequired && next === null) {\n setValue(props.initialValue ?? undefined);\n setStatus(\"error\");\n toast.error(\"Dit veld is verplicht\");\n return;\n }\n\n // If the strategy is blur, update the value\n handleMutateInstant(next as MaybeValue<TValue, Required>);\n }\n\n return { value, setValue, handleChange, handleBlur, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;;;AAqBA,MAAMA,wBAAwC,EAC5C,MAAM,QACP;;;;AAqCD,SAAgB,cAGd,OAA+C;;;;CAI/C,MAAM,WAAW,MAAM,kBAAkB;CACzC,MAAM,QAAQ,SAAS,SAAS,WAAY,SAAS,SAAS,IAAK;;;;CAKnE,MAAM,UAAU,sBAAsB;;;;CAKtC,MAAM,CAAC,OAAO,YAAY,SAAmD,MAAM,aAAa;;;;CAKhG,MAAM,EAAE,QAAQ,cAAc,mBAAmB;CAMjD,MAAM,YADO,cAAc,MAAM,cAAc,QAAQ,cAAc,EAAE,CAAC,EAChD;;;;CAKxB,MAAM,WAAW,UAAU;EACzB,YAAY,MAAM;EAClB,gBAAgB;AACd,aAAU,UAAU;;EAEtB,iBAAiB;AACf,aAAU,UAAU;;EAEtB,UAAU,UAAU;AAClB,YAAS,MAAM,aAAa;AAC5B,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,sBAAsB,aACzB,YAAwC;AAEvC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIC,YAAU,MAAM,aAAc;AAGlC,SAAO,SAAS,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;IAEnD;EAAC;EAAW,MAAM;EAAc;EAAU,QAAQ;EAAG,CACtD;;;;CAKD,MAAM,wBAAwB,qBAAqB,qBAAqB,MAAM;;;;CAK9E,SAAS,aAAa,MAA2C;AAE/D,WAAS,QAAQ,OAAU;AAG3B,MAAI,SAAS,SAAS,SAAU;AAGhC,MAAI,MAAM,cAAc,SAAS,MAAM;AACrC,YAAS,MAAM,gBAAgB,OAAU;AACzC,aAAU,QAAQ;AAClB,SAAM,MAAM,wBAAwB;AACpC;;AAIF,wBAAsB,KAAqC;;;;;CAM7D,SAAS,WAAW,MAA2C;AAE7D,WAAS,QAAQ,OAAU;AAG3B,MAAI,SAAS,SAAS,OAAQ;AAG9B,MAAI,MAAM,cAAc,SAAS,MAAM;AACrC,YAAS,MAAM,gBAAgB,OAAU;AACzC,aAAU,QAAQ;AAClB,SAAM,MAAM,wBAAwB;AACpC;;AAIF,sBAAoB,KAAqC;;AAG3D,QAAO;EAAE;EAAO;EAAU;EAAc;EAAY;EAAQ;EAAW"}
1
+ {"version":3,"file":"use-inline.client.mjs","names":[],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useDebouncedCallback } from \"use-debounce\";\nimport type { EditorJSONContent } from \"@/components/entry\";\nimport { useLocalIndicator } from \"@/lib/entry.client\";\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport type { Permission } from \"@/modules/auth/lib/permissions\";\nimport { useInlineEditContext } from \"./context.client\";\n\ntype UpdateStrategy =\n | {\n mode: \"change\";\n delay?: number;\n }\n | {\n mode: \"blur\";\n };\n\nconst defaultUpdateStrategy: UpdateStrategy = {\n mode: \"blur\",\n};\n\ntype MaybeValue<TValue, Required extends boolean> = Required extends true ? TValue : TValue | null;\n\n/**\n * Use the inline edit hook options.\n */\nexport type useInlineEditOptions<TResult, Required extends boolean = false> = {\n /**\n * Initial value\n */\n initialValue?: MaybeValue<TResult, Required>;\n /**\n * Action to execute on update\n */\n action: (value: { id: string; value: MaybeValue<TResult, Required> }) => Promise<unknown>;\n /**\n * Permission required to edit\n */\n permission?: Permission;\n /**\n * Update strategy\n * - trigger: when to update the value (default: \"blur\")\n * - delay: delay in milliseconds before updating the value (only for \"change\" trigger)\n * @default { trigger: \"blur\" }\n */\n updateStrategy?: UpdateStrategy;\n /**\n * Is the value required\n * @default false\n */\n isRequired?: Required;\n};\n\n/**\n * Inline edit hook props\n */\nexport type UseInlineEditProps<\n TValue extends string | number | Date | boolean | JSON | EditorJSONContent,\n TResult extends string | number | Date | boolean | JSON | EditorJSONContent,\n Required extends boolean = false,\n> = useInlineEditOptions<TResult, Required> & {\n parser: {\n /**\n * Transform the value from the result type to the value type\n */\n decode: (value: TResult) => TValue;\n /**\n * Transform the value from the value type to the result type\n */\n encode: (value: TValue) => TResult;\n };\n};\n\n/**\n * Use the inline edit hook.\n */\nexport function useInlineEdit<\n TValue extends string | number | Date | boolean | JSON | EditorJSONContent,\n TResult extends string | number | Date | boolean | JSON | EditorJSONContent = TValue,\n Required extends boolean = false,\n>(props: UseInlineEditProps<TValue, TResult, Required>) {\n /**\n * The update strategy.\n */\n const strategy = props.updateStrategy ?? defaultUpdateStrategy;\n const delay = strategy.mode === \"change\" ? (strategy.delay ?? 0) : 0;\n const initialValue = props.parser.decode(props.initialValue as TResult) ?? undefined;\n\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState<MaybeValue<TValue, Required> | undefined>(initialValue);\n\n /**\n * The indicator status.\n */\n const { status, setStatus } = useLocalIndicator();\n\n /**\n * Permission guard\n */\n const data = usePermission(props.permission ?? context.permission ?? {});\n const isAllowed = data?.success;\n\n /**\n * Execute the action to update the value.\n */\n const mutation = useAction({\n mutationFn: props.action,\n onMutate: () => {\n setStatus(\"pending\");\n },\n onSuccess: () => {\n setStatus(\"success\");\n },\n onError: (error) => {\n setValue(initialValue);\n toast.error(\"Er is iets misgegaan\", {\n description: error instanceof Error ? error.message : undefined,\n });\n },\n });\n\n /**\n * Handle instant mutate\n */\n const handleMutateInstant = useCallback(\n (input: TValue) => {\n // Permission guard\n if (!isAllowed) {\n toast.error(\"Je hebt geen toestemming om dit te bewerken\");\n return;\n }\n\n // If the value is the same as the initial value, do nothing\n if (input === initialValue) return;\n\n const value = props.parser.encode(input as TValue);\n\n // Update the value\n return mutation.mutate({ id: context.id, value });\n },\n [isAllowed, initialValue, mutation, context.id, props.parser],\n );\n\n /**\n * Handle mutate with debounce\n */\n const handleMutateDebounced = useDebouncedCallback(handleMutateInstant, delay);\n\n /**\n * Handle change updates\n */\n function handleChange(next: MaybeValue<TValue, Required> | null) {\n // Set value in state\n setValue(next ?? undefined);\n\n // If the strategy is not change, exit\n if (strategy.mode !== \"change\") return;\n\n // If it is required and the value is null or empty, reset to initial value\n if (props.isRequired && next === null) {\n setValue(initialValue ?? undefined);\n setStatus(\"error\");\n toast.error(\"Dit veld is verplicht\");\n return;\n }\n\n // If the strategy is change, update the value after the delay\n handleMutateDebounced(next as TValue);\n }\n\n /**\n * Handle blur updates\n */\n function handleBlur(next: MaybeValue<TValue, Required> | null) {\n // Set value in state\n setValue(next ?? undefined);\n\n // If the strategy is not blur, exit\n if (strategy.mode !== \"blur\") return;\n\n // If it is required and the value is null or empty, reset to initial value\n if (props.isRequired && next === null) {\n setValue(initialValue ?? undefined);\n setStatus(\"error\");\n toast.error(\"Dit veld is verplicht\");\n return;\n }\n\n // If the strategy is blur, update the value\n handleMutateInstant(next as TValue);\n }\n\n return { value, setValue, handleChange, handleBlur, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;;;AAqBA,MAAM,wBAAwC,EAC5C,MAAM,QACP;;;;AAyDD,SAAgB,cAId,OAAsD;;;;CAItD,MAAM,WAAW,MAAM,kBAAkB;CACzC,MAAM,QAAQ,SAAS,SAAS,WAAY,SAAS,SAAS,IAAK;CACnE,MAAM,eAAe,MAAM,OAAO,OAAO,MAAM,aAAwB,IAAI;;;;CAK3E,MAAM,UAAU,sBAAsB;;;;CAKtC,MAAM,CAAC,OAAO,YAAY,SAAmD,aAAa;;;;CAK1F,MAAM,EAAE,QAAQ,cAAc,mBAAmB;CAMjD,MAAM,YADO,cAAc,MAAM,cAAc,QAAQ,cAAc,EAAE,CAAC,EAChD;;;;CAKxB,MAAM,WAAW,UAAU;EACzB,YAAY,MAAM;EAClB,gBAAgB;AACd,aAAU,UAAU;;EAEtB,iBAAiB;AACf,aAAU,UAAU;;EAEtB,UAAU,UAAU;AAClB,YAAS,aAAa;AACtB,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,sBAAsB,aACzB,UAAkB;AAEjB,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAI,UAAU,aAAc;EAE5B,MAAM,QAAQ,MAAM,OAAO,OAAO,MAAgB;AAGlD,SAAO,SAAS,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;IAEnD;EAAC;EAAW;EAAc;EAAU,QAAQ;EAAI,MAAM;EAAO,CAC9D;;;;CAKD,MAAM,wBAAwB,qBAAqB,qBAAqB,MAAM;;;;CAK9E,SAAS,aAAa,MAA2C;AAE/D,WAAS,QAAQ,OAAU;AAG3B,MAAI,SAAS,SAAS,SAAU;AAGhC,MAAI,MAAM,cAAc,SAAS,MAAM;AACrC,YAAS,gBAAgB,OAAU;AACnC,aAAU,QAAQ;AAClB,SAAM,MAAM,wBAAwB;AACpC;;AAIF,wBAAsB,KAAe;;;;;CAMvC,SAAS,WAAW,MAA2C;AAE7D,WAAS,QAAQ,OAAU;AAG3B,MAAI,SAAS,SAAS,OAAQ;AAG9B,MAAI,MAAM,cAAc,SAAS,MAAM;AACrC,YAAS,gBAAgB,OAAU;AACnC,aAAU,QAAQ;AAClB,SAAM,MAAM,wBAAwB;AACpC;;AAIF,sBAAoB,KAAe;;AAGrC,QAAO;EAAE;EAAO;EAAU;EAAc;EAAY;EAAQ;EAAW"}
@@ -1,7 +1,6 @@
1
1
  import { ZodType, z as z$1 } from "zod";
2
2
 
3
3
  //#region src/modules/inline-edit/lib/validators.d.ts
4
-
5
4
  /**
6
5
  * Inline edit schema
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/lib/validators.ts"],"sourcesContent":[],"mappings":";;;;;;AAAiC;cAK3B,kBAAgB,GAAA,CAAA;;CAAA,iBAAA,CAAA;AAAA,KAIV,gBAJU,CAAA,MAAA,CAAA,GAIiB,GAAA,CAAE,KAJnB,CAAA,OAIgC,gBAJhC,CAAA,GAAA;EAIV,KAAA,EACH,MADG;CAA0C;;;;AAOzC,cAAA,sBACuB,EAAA,CAAA,eADkB,OAClB,CAAA,CAAA,KAAA,EADkC,MAClC,EAAA,GADwC,GAAA,CAAA,SACxC,CAAA;EADkB,EAAA,eAAA;EAAgB,KAAA,QAAA;;;;;AAAM,cAM/D,sBAN+D,EAMzC,GAAA,CAAA,SANyC,CAAA;EAM/D,EAAA,eAAA;;;;;;AAKA,cAAA,sBAA2D,EAArC,GAAA,CAAA,SAAqC,CAAA;;;;;;AAKxE;cAAa,yBAAuB,GAAA,CAAA;;;CAAA,iBAAA,CAAA;;AAKpC;;cAAa,sBAAoB,GAAA,CAAA;;EAAA,KAAA,aAAA;CAAA,iBAAA,CAAA;AAKjC;;;cAAa,sBAAoB,GAAA,CAAA;EAAA,EAAA,eAAA;EAAA,KAAA,YAAA"}
1
+ {"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/lib/validators.ts"],"mappings":";;;;;AAAsC;cAKhC,gBAAA,EAAgB,GAAA,CAAA,SAAA;;;KAIV,gBAAA,WAA2B,GAAA,CAAE,KAAA,QAAa,gBAAA;EACpD,KAAA,EAAO,MAAA;AAAA;;;;cAMI,sBAAA,kBAAyC,OAAA,EAAS,KAAA,EAAO,MAAA,KAAM,GAAA,CAAA,SAAA;;;;;;;cAM/D,sBAAA,EAAsB,GAAA,CAAA,SAAA;;;;;;;cAKtB,sBAAA,EAAsB,GAAA,CAAA,SAAA;;;;;;;cAKtB,uBAAA,EAAuB,GAAA,CAAA,SAAA;;;;;;;cAKvB,oBAAA,EAAoB,GAAA,CAAA,SAAA;;;;;;;cAKpB,oBAAA,EAAoB,GAAA,CAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"validators.mjs","names":["z"],"sources":["../../../../src/modules/inline-edit/lib/validators.ts"],"sourcesContent":["import { z, ZodType } from \"zod\";\n\n/**\n * Inline edit schema\n */\nconst inlineEditSchema = z.object({\n id: z.string(),\n});\n\nexport type InlineEditSchema<TValue> = z.infer<typeof inlineEditSchema> & {\n value: TValue;\n};\n\n/**\n * Create inline edit schema\n */\nexport const createInlineEditSchema = <TValue extends ZodType>(value: TValue) =>\n inlineEditSchema.extend({ value });\n\n/**\n * Inline edit string schema\n */\nexport const inlineEditStringSchema = createInlineEditSchema(z.string());\n\n/**\n * Inline edit number schema\n */\nexport const inlineEditNumberSchema = createInlineEditSchema(z.number());\n\n/**\n * Inline edit boolean schema\n */\nexport const inlineEditBooleanSchema = createInlineEditSchema(z.boolean());\n\n/**\n * Inline edit date schema\n */\nexport const inlineEditDateSchema = createInlineEditSchema(z.date());\n\n/**\n * Inline edit json schema\n */\nexport const inlineEditJsonSchema = createInlineEditSchema(z.any());\n"],"mappings":";;;;;;AAKA,MAAM,mBAAmBA,IAAE,OAAO,EAChC,IAAIA,IAAE,QAAQ,EACf,CAAC;;;;AASF,MAAa,0BAAkD,UAC7D,iBAAiB,OAAO,EAAE,OAAO,CAAC;;;;AAKpC,MAAa,yBAAyB,uBAAuBA,IAAE,QAAQ,CAAC;;;;AAKxE,MAAa,yBAAyB,uBAAuBA,IAAE,QAAQ,CAAC;;;;AAKxE,MAAa,0BAA0B,uBAAuBA,IAAE,SAAS,CAAC;;;;AAK1E,MAAa,uBAAuB,uBAAuBA,IAAE,MAAM,CAAC;;;;AAKpE,MAAa,uBAAuB,uBAAuBA,IAAE,KAAK,CAAC"}
1
+ {"version":3,"file":"validators.mjs","names":["z"],"sources":["../../../../src/modules/inline-edit/lib/validators.ts"],"sourcesContent":["import { type ZodType, z } from \"zod\";\n\n/**\n * Inline edit schema\n */\nconst inlineEditSchema = z.object({\n id: z.string(),\n});\n\nexport type InlineEditSchema<TValue> = z.infer<typeof inlineEditSchema> & {\n value: TValue;\n};\n\n/**\n * Create inline edit schema\n */\nexport const createInlineEditSchema = <TValue extends ZodType>(value: TValue) =>\n inlineEditSchema.extend({ value });\n\n/**\n * Inline edit string schema\n */\nexport const inlineEditStringSchema = createInlineEditSchema(z.string());\n\n/**\n * Inline edit number schema\n */\nexport const inlineEditNumberSchema = createInlineEditSchema(z.number());\n\n/**\n * Inline edit boolean schema\n */\nexport const inlineEditBooleanSchema = createInlineEditSchema(z.boolean());\n\n/**\n * Inline edit date schema\n */\nexport const inlineEditDateSchema = createInlineEditSchema(z.date());\n\n/**\n * Inline edit json schema\n */\nexport const inlineEditJsonSchema = createInlineEditSchema(z.any());\n"],"mappings":";;;;;;AAKA,MAAM,mBAAmBA,IAAE,OAAO,EAChC,IAAIA,IAAE,QAAQ,EACf,CAAC;;;;AASF,MAAa,0BAAkD,UAC7D,iBAAiB,OAAO,EAAE,OAAO,CAAC;;;;AAKpC,MAAa,yBAAyB,uBAAuBA,IAAE,QAAQ,CAAC;;;;AAKxE,MAAa,yBAAyB,uBAAuBA,IAAE,QAAQ,CAAC;;;;AAKxE,MAAa,0BAA0B,uBAAuBA,IAAE,SAAS,CAAC;;;;AAK1E,MAAa,uBAAuB,uBAAuBA,IAAE,MAAM,CAAC;;;;AAKpE,MAAa,uBAAuB,uBAAuBA,IAAE,KAAK,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { VariantProps } from "class-variance-authority";
2
- import * as class_variance_authority_types6 from "class-variance-authority/types";
2
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
3
3
 
4
4
  //#region src/modules/inline-edit/lib/variants.d.ts
5
5
  declare const inlineEditVariants: (props?: ({
6
6
  variant?: "default" | "table" | null | undefined;
7
- status?: "error" | "success" | "idle" | "pending" | null | undefined;
8
- } & class_variance_authority_types6.ClassProp) | undefined) => string;
7
+ status?: "error" | "idle" | "pending" | "success" | null | undefined;
8
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
9
9
  type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;
10
10
  //#endregion
11
11
  export { InlineEditVariantsProps };
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":[],"mappings":";;;;cAEa,0BAkBX;;;AAlBF,CAAA,GAkBE,+BAAA,CAAA,SAAA,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;AAEU,KAAA,uBAAA,GAA0B,YAAoB,CAAA,OAAA,kBAAR,CAAA"}
1
+ {"version":3,"file":"variants.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"mappings":";;;;cAEa,kBAAA,GAAkB,KAAA;;;IAkB7B,+BAAA,CAAA,SAAA;AAAA,KAEU,uBAAA,GAA0B,YAAA,QAAoB,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"variants.mjs","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\n\nexport const inlineEditVariants = cva(\"\", {\n variants: {\n variant: {\n default: \"\",\n table:\n \"min-h-9 px-3 py-1 text-base md:text-sm rounded-none h-full w-full border-none outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0\",\n },\n status: {\n idle: \"\",\n pending: \"opacity-70 animate-pulse\",\n success: \"\",\n error: \"border-destructive text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n // status: \"idle\",\n },\n});\n\nexport type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;\n"],"mappings":";;;AAEA,MAAa,qBAAqB,IAAI,IAAI;CACxC,UAAU;EACR,SAAS;GACP,SAAS;GACT,OACE;GACH;EACD,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACR;EACF;CACD,iBAAiB,EACf,SAAS,WAEV;CACF,CAAC"}
1
+ {"version":3,"file":"variants.mjs","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\nexport const inlineEditVariants = cva(\"\", {\n variants: {\n variant: {\n default: \"\",\n table:\n \"min-h-9 px-3 py-1 text-base md:text-sm rounded-none h-full w-full border-none outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0\",\n },\n status: {\n idle: \"\",\n pending: \"opacity-70 animate-pulse\",\n success: \"\",\n error: \"border-destructive text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n // status: \"idle\",\n },\n});\n\nexport type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;\n"],"mappings":";;;AAEA,MAAa,qBAAqB,IAAI,IAAI;CACxC,UAAU;EACR,SAAS;GACP,SAAS;GACT,OACE;GACH;EACD,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACR;EACF;CACD,iBAAiB,EACf,SAAS,WAEV;CACF,CAAC"}
@@ -2,7 +2,6 @@ import { RouterClient as RouterClient$1 } from "./register.server.mjs";
2
2
  import { AnyRouter } from "@orpc/server";
3
3
 
4
4
  //#region src/modules/router/handler/caller.client.d.ts
5
-
6
5
  /**
7
6
  * Create a new RPC client
8
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"caller.client.d.mts","names":[],"sources":["../../../../src/modules/router/handler/caller.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AA6BA;AAAgD,iBAAhC,eAAgC,CAAA,gBAAA,SAAA,CAAA,CAAA,CAAA,EAAc,cAAd,CAA2B,OAA3B,CAAA"}
1
+ {"version":3,"file":"caller.client.d.mts","names":[],"sources":["../../../../src/modules/router/handler/caller.client.tsx"],"mappings":";;;;;;AA6BA;iBAAgB,eAAA,iBAAgC,SAAA,CAAA,CAAA,GAAc,cAAA,CAAa,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"caller.client.mjs","names":["client: ORPCRouterClient<AnyRouter>"],"sources":["../../../../src/modules/router/handler/caller.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { createORPCClient } from \"@orpc/client\";\nimport { RPCLink } from \"@orpc/client/fetch\";\nimport { AnyRouter, RouterClient as ORPCRouterClient } from \"@orpc/server\";\nimport { createTanstackQueryUtils } from \"@orpc/tanstack-query\";\nimport { RouterClient } from \"./register.server\";\n\n/**\n * Create a new RPC link\n */\nconst link = new RPCLink({\n url: () => {\n if (typeof window === \"undefined\") {\n throw new Error(\"RPCLink is not allowed on the server side.\");\n }\n\n return `${window.location.origin}/api/rpc`;\n },\n});\n\n/**\n * Create a new RPC client\n */\nconst client: ORPCRouterClient<AnyRouter> = createORPCClient(link);\n\n/**\n * Create a new RPC client\n */\nexport function createRPCClient<TRouter extends AnyRouter>(): RouterClient<TRouter> {\n return createTanstackQueryUtils(client as ORPCRouterClient<TRouter>);\n}\n"],"mappings":";;;;;;;;;;AAwBA,MAAMA,SAAsC,iBAb/B,IAAI,QAAQ,EACvB,WAAW;AACT,KAAI,OAAO,WAAW,YACpB,OAAM,IAAI,MAAM,6CAA6C;AAG/D,QAAO,GAAG,OAAO,SAAS,OAAO;GAEpC,CAAC,CAKgE;;;;AAKlE,SAAgB,kBAAoE;AAClF,QAAO,yBAAyB,OAAoC"}
1
+ {"version":3,"file":"caller.client.mjs","names":[],"sources":["../../../../src/modules/router/handler/caller.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { createORPCClient } from \"@orpc/client\";\nimport { RPCLink } from \"@orpc/client/fetch\";\nimport type { AnyRouter, RouterClient as ORPCRouterClient } from \"@orpc/server\";\nimport { createTanstackQueryUtils } from \"@orpc/tanstack-query\";\nimport type { RouterClient } from \"./register.server\";\n\n/**\n * Create a new RPC link\n */\nconst link = new RPCLink({\n url: () => {\n if (typeof window === \"undefined\") {\n throw new Error(\"RPCLink is not allowed on the server side.\");\n }\n\n return `${window.location.origin}/api/rpc`;\n },\n});\n\n/**\n * Create a new RPC client\n */\nconst client: ORPCRouterClient<AnyRouter> = createORPCClient(link);\n\n/**\n * Create a new RPC client\n */\nexport function createRPCClient<TRouter extends AnyRouter>(): RouterClient<TRouter> {\n return createTanstackQueryUtils(client as ORPCRouterClient<TRouter>);\n}\n"],"mappings":";;;;;;;;;;AAwBA,MAAM,SAAsC,iBAb/B,IAAI,QAAQ,EACvB,WAAW;AACT,KAAI,OAAO,WAAW,YACpB,OAAM,IAAI,MAAM,6CAA6C;AAG/D,QAAO,GAAG,OAAO,SAAS,OAAO;GAEpC,CAAC,CAKgE;;;;AAKlE,SAAgB,kBAAoE;AAClF,QAAO,yBAAyB,OAAoC"}
@@ -1 +1 @@
1
- {"version":3,"file":"caller.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/caller.server.ts"],"sourcesContent":[],"mappings":";;;cAEa,wBAAe"}
1
+ {"version":3,"file":"caller.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/caller.server.ts"],"mappings":";;;cAEa,eAAA,SAAe,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/context.server.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;cAYa,mCACY;WAAmC,aAAa;MAAU;;;;;MADtE,SAAA,MAOZ;MANwB,MAAA,EAAA,MAAA;MAAgD,SAAA,MAAA;MAAb,KAAA,EAAA,MAAA;;;;;;;;;;;;;;;MAAuB,MAAA,EAAA,OAAA,GAAA,IAAA,GAAA,SAAA;MAAA,IAAA,CAAA,EAAA,MAAA,GAAA,IAAA,GAAA,SAAA;MAQvE,SAAU,CAAA,EAAA,MAAA,GAAA,IAAA,GAAA,SAAA;MAAiB,UAAA,CAAA,MAAA,GAAA,IAAA,GAAA,SAAA;IACF,CAAA;EAAjB,CAAA,GAAA,IAAA;EAAlB,OAAA,uEAAA;EAD8D,EAAA,gBAAA,QAAA,CAAA;EAAO,MAAA,SAAA;EAI3D,IAAA,YAAmB;EAAiB,KAAA,aAAA;EAAoC,OAAA,gBAAA,QAAA,CAAA;CAAX,CAAA;AACvC,KALtB,UAKsB,CAAA,gBALK,eAKL,GAAA,GAAA,CAAA,GAL8B,OAK9B,CAJhC,UAIgC,CAAA,OAJd,gBAIc,CAJG,OAIH,CAAA,CAAA,CAAA;AAAX,KADX,mBACW,CAAA,gBADyB,eACzB,GAAA,GAAA,CAAA,GADkD,UAClD,CAD6D,OAC7D,CAAA,GAAA;EAAZ,OAAA,EAAA,WAAA,CAAY,UAAZ,CAAuB,OAAvB,CAAA,CAAA,SAAA,CAAA,CAAA;CAAW"}
1
+ {"version":3,"file":"context.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/context.server.ts"],"mappings":";;;;;;;;;;;;;;;;cAUa,gBAAA,mBACY,eAAA,EAAe,KAAA;EAAW,OAAA,EAAS,YAAA,CAAa,OAAA;AAAA,MAAU,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KASvE,UAAA,iBAA2B,eAAA,UAAyB,OAAA,CAC9D,UAAA,QAAkB,gBAAA,CAAiB,OAAA;AAAA,KAIzB,mBAAA,iBAAoC,eAAA,UAAyB,UAAA,CAAW,OAAA;EAClF,OAAA,EAAS,WAAA,CAAY,UAAA,CAAW,OAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.server.mjs","names":["headers","headersList"],"sources":["../../../../src/modules/router/handler/context.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { type TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { TulipContext } from \"@/modules/config/entry\";\nimport { headers as headersList } from \"next/headers\";\nimport { cache } from \"react\";\n\n/**\n * Create the router context\n */\nexport const createRPCContext = cache(\n async <TSchema extends TDatabaseSchema>(props: { context: TulipContext<TSchema> }) => {\n const headers = await headersList();\n const session = await props.context.auth.api.getSession({ headers });\n\n return { ...props.context, session, headers };\n },\n);\n\nexport type RPCContext<TSchema extends TDatabaseSchema = any> = Awaited<\n ReturnType<typeof createRPCContext<TSchema>>\n>;\n\nexport type ProtectedRPCContext<TSchema extends TDatabaseSchema = any> = RPCContext<TSchema> & {\n session: NonNullable<RPCContext<TSchema>[\"session\"]>;\n};\n"],"mappings":";;;;;;;;AAYA,MAAa,mBAAmB,MAC9B,OAAwC,UAA8C;CACpF,MAAMA,YAAU,MAAMC,SAAa;CACnC,MAAM,UAAU,MAAM,MAAM,QAAQ,KAAK,IAAI,WAAW,EAAE,oBAAS,CAAC;AAEpE,QAAO;EAAE,GAAG,MAAM;EAAS;EAAS;EAAS;EAEhD"}
1
+ {"version":3,"file":"context.server.mjs","names":["headers","headersList"],"sources":["../../../../src/modules/router/handler/context.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport { headers as headersList } from \"next/headers\";\nimport { cache } from \"react\";\nimport type { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport type { TulipContext } from \"@/modules/config/entry\";\n\n/**\n * Create the router context\n */\nexport const createRPCContext = cache(\n async <TSchema extends TDatabaseSchema>(props: { context: TulipContext<TSchema> }) => {\n const headers = await headersList();\n const session = await props.context.auth.api.getSession({ headers });\n\n return { ...props.context, session, headers };\n },\n);\n\n// biome-ignore lint/suspicious/noExplicitAny: This is needed to satisfy the system\nexport type RPCContext<TSchema extends TDatabaseSchema = any> = Awaited<\n ReturnType<typeof createRPCContext<TSchema>>\n>;\n\n// biome-ignore lint/suspicious/noExplicitAny: This is needed to satisfy the system\nexport type ProtectedRPCContext<TSchema extends TDatabaseSchema = any> = RPCContext<TSchema> & {\n session: NonNullable<RPCContext<TSchema>[\"session\"]>;\n};\n"],"mappings":";;;;;;;;AAUA,MAAa,mBAAmB,MAC9B,OAAwC,UAA8C;CACpF,MAAMA,YAAU,MAAMC,SAAa;CACnC,MAAM,UAAU,MAAM,MAAM,QAAQ,KAAK,IAAI,WAAW,EAAE,oBAAS,CAAC;AAEpE,QAAO;EAAE,GAAG,MAAM;EAAS;EAAS;EAAS;EAEhD"}
@@ -7,20 +7,20 @@ import { StorageService } from "../../storage/lib/service.server.mjs";
7
7
  import { AuthClient } from "../../auth/handler/init.mjs";
8
8
  import "../../../auth/server.mjs";
9
9
  import { ProtectedRPCContext, RPCContext } from "./context.server.mjs";
10
- import * as _orpc_server29 from "@orpc/server";
10
+ import * as _orpc_server0 from "@orpc/server";
11
11
  import "server-cli-only";
12
12
  import * as next_dist_server_web_spec_extension_adapters_headers0 from "next/dist/server/web/spec-extension/adapters/headers";
13
- import * as _orpc_contract1 from "@orpc/contract";
13
+ import * as _orpc_contract0 from "@orpc/contract";
14
14
 
15
15
  //#region src/modules/router/handler/init.server.d.ts
16
16
  /**
17
17
  * Initialize TRPC
18
18
  */
19
19
  declare function initRPC<TSchema extends TDatabaseSchema>(): {
20
- publicProcedure: _orpc_server29.Builder<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>, _orpc_contract1.Schema<unknown, unknown>, _orpc_contract1.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
21
- protectedProcedure: _orpc_server29.BuilderWithMiddlewares<_orpc_server29.MergedInitialContext<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>>, _orpc_server29.MergedCurrentContext<RPCContext<TSchema>, ProtectedRPCContext<TSchema>>, _orpc_contract1.Schema<unknown, unknown>, _orpc_contract1.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
22
- authMiddleware: _orpc_server29.DecoratedMiddleware<RPCContext<TSchema> & Record<never, never>, ProtectedRPCContext<TSchema>, unknown, any, any, Record<never, never>>;
23
- permissionMiddleware: (permission: Permission) => _orpc_server29.DecoratedMiddleware<{
20
+ publicProcedure: _orpc_server0.Builder<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>, _orpc_contract0.Schema<unknown, unknown>, _orpc_contract0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
21
+ protectedProcedure: _orpc_server0.BuilderWithMiddlewares<_orpc_server0.MergedInitialContext<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>>, _orpc_server0.MergedCurrentContext<RPCContext<TSchema>, ProtectedRPCContext<TSchema>>, _orpc_contract0.Schema<unknown, unknown>, _orpc_contract0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
22
+ authMiddleware: _orpc_server0.DecoratedMiddleware<RPCContext<TSchema> & Record<never, never>, ProtectedRPCContext<TSchema>, unknown, any, any, Record<never, never>>;
23
+ permissionMiddleware: (permission: Permission) => _orpc_server0.DecoratedMiddleware<{
24
24
  session: {
25
25
  session: {
26
26
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"init.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/init.server.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;iBAWgB,wBAAwB;;;;qCAwBI,8BAAU;;;;QAxB/B,SAAA,MAAA;QAAiB,SAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwBI,SAAA,MAAA"}
1
+ {"version":3,"file":"init.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/init.server.ts"],"mappings":";;;;;;;;;;;;;;;;;;iBAWgB,OAAA,iBAAwB,eAAA,CAAA,CAAA;;;;qCAwBI,UAAA,mBAAU,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.server.mjs","names":[],"sources":["../../../../src/modules/router/handler/init.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { os } from \"@orpc/server\";\nimport { ServerError } from \"../lib/error.server\";\nimport { ProtectedRPCContext, RPCContext } from \"./context.server\";\n\n/**\n * Initialize TRPC\n */\nexport function initRPC<TSchema extends TDatabaseSchema>() {\n /**\n * Create the router\n */\n const o = os.$context<RPCContext<TSchema>>();\n\n /**\n * Middleware function to check if the user is authenticated\n */\n const authMiddleware = o.middleware(async (opts) => {\n if (!opts.context.session) {\n throw new ServerError(\"UNAUTHORIZED\", {\n message: \"Jou hebt geen toegang om deze actie uit te voeren\",\n });\n }\n\n return opts.next({\n context: { ...opts.context, session: opts.context.session } as ProtectedRPCContext<TSchema>,\n });\n });\n\n /**\n * Middleware function to check if the user has the required permission\n */\n function permissionMiddleware(permission: Permission) {\n /**\n * Middleware function to check if the user has the required permission\n */\n return os.$context<ProtectedRPCContext<TSchema>>().middleware(async (opts) => {\n const { success, error } = await opts.context.auth.api.userHasPermission({\n body: {\n userId: opts.context.session.user.id,\n permission,\n },\n });\n\n if (error || !success) {\n throw new ServerError(\"UNAUTHORIZED\", {\n message: \"Jou hebt geen toegang om deze actie uit te voeren\",\n });\n }\n\n return opts.next({ context: { ...opts.context } as ProtectedRPCContext<TSchema> });\n });\n }\n\n /**\n * Public procedures\n */\n const publicProcedure = o;\n\n /**\n * Protected procedures\n */\n const protectedProcedure = o.use(authMiddleware);\n\n /**\n * Export\n */\n return {\n publicProcedure,\n protectedProcedure,\n authMiddleware,\n permissionMiddleware,\n };\n}\n"],"mappings":";;;;;;;;AAWA,SAAgB,UAA2C;;;;CAIzD,MAAM,IAAI,GAAG,UAA+B;;;;CAK5C,MAAM,iBAAiB,EAAE,WAAW,OAAO,SAAS;AAClD,MAAI,CAAC,KAAK,QAAQ,QAChB,OAAM,IAAI,YAAY,gBAAgB,EACpC,SAAS,qDACV,CAAC;AAGJ,SAAO,KAAK,KAAK,EACf,SAAS;GAAE,GAAG,KAAK;GAAS,SAAS,KAAK,QAAQ;GAAS,EAC5D,CAAC;GACF;;;;CAKF,SAAS,qBAAqB,YAAwB;;;;AAIpD,SAAO,GAAG,UAAwC,CAAC,WAAW,OAAO,SAAS;GAC5E,MAAM,EAAE,SAAS,UAAU,MAAM,KAAK,QAAQ,KAAK,IAAI,kBAAkB,EACvE,MAAM;IACJ,QAAQ,KAAK,QAAQ,QAAQ,KAAK;IAClC;IACD,EACF,CAAC;AAEF,OAAI,SAAS,CAAC,QACZ,OAAM,IAAI,YAAY,gBAAgB,EACpC,SAAS,qDACV,CAAC;AAGJ,UAAO,KAAK,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,SAAS,EAAkC,CAAC;IAClF;;;;;AAgBJ,QAAO;EACL,iBAXsB;EAYtB,oBAPyB,EAAE,IAAI,eAAe;EAQ9C;EACA;EACD"}
1
+ {"version":3,"file":"init.server.mjs","names":[],"sources":["../../../../src/modules/router/handler/init.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport { os } from \"@orpc/server\";\nimport type { Permission } from \"@/modules/auth/lib/permissions\";\nimport type { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { ServerError } from \"../lib/error.server\";\nimport type { ProtectedRPCContext, RPCContext } from \"./context.server\";\n\n/**\n * Initialize TRPC\n */\nexport function initRPC<TSchema extends TDatabaseSchema>() {\n /**\n * Create the router\n */\n const o = os.$context<RPCContext<TSchema>>();\n\n /**\n * Middleware function to check if the user is authenticated\n */\n const authMiddleware = o.middleware(async (opts) => {\n if (!opts.context.session) {\n throw new ServerError(\"UNAUTHORIZED\", {\n message: \"Jou hebt geen toegang om deze actie uit te voeren\",\n });\n }\n\n return opts.next({\n context: { ...opts.context, session: opts.context.session } as ProtectedRPCContext<TSchema>,\n });\n });\n\n /**\n * Middleware function to check if the user has the required permission\n */\n function permissionMiddleware(permission: Permission) {\n /**\n * Middleware function to check if the user has the required permission\n */\n return os.$context<ProtectedRPCContext<TSchema>>().middleware(async (opts) => {\n const { success, error } = await opts.context.auth.api.userHasPermission({\n body: {\n userId: opts.context.session.user.id,\n permission,\n },\n });\n\n if (error || !success) {\n throw new ServerError(\"UNAUTHORIZED\", {\n message: \"Jou hebt geen toegang om deze actie uit te voeren\",\n });\n }\n\n return opts.next({ context: { ...opts.context } as ProtectedRPCContext<TSchema> });\n });\n }\n\n /**\n * Public procedures\n */\n const publicProcedure = o;\n\n /**\n * Protected procedures\n */\n const protectedProcedure = o.use(authMiddleware);\n\n /**\n * Export\n */\n return {\n publicProcedure,\n protectedProcedure,\n authMiddleware,\n permissionMiddleware,\n };\n}\n"],"mappings":";;;;;;;;AAWA,SAAgB,UAA2C;;;;CAIzD,MAAM,IAAI,GAAG,UAA+B;;;;CAK5C,MAAM,iBAAiB,EAAE,WAAW,OAAO,SAAS;AAClD,MAAI,CAAC,KAAK,QAAQ,QAChB,OAAM,IAAI,YAAY,gBAAgB,EACpC,SAAS,qDACV,CAAC;AAGJ,SAAO,KAAK,KAAK,EACf,SAAS;GAAE,GAAG,KAAK;GAAS,SAAS,KAAK,QAAQ;GAAS,EAC5D,CAAC;GACF;;;;CAKF,SAAS,qBAAqB,YAAwB;;;;AAIpD,SAAO,GAAG,UAAwC,CAAC,WAAW,OAAO,SAAS;GAC5E,MAAM,EAAE,SAAS,UAAU,MAAM,KAAK,QAAQ,KAAK,IAAI,kBAAkB,EACvE,MAAM;IACJ,QAAQ,KAAK,QAAQ,QAAQ,KAAK;IAClC;IACD,EACF,CAAC;AAEF,OAAI,SAAS,CAAC,QACZ,OAAM,IAAI,YAAY,gBAAgB,EACpC,SAAS,qDACV,CAAC;AAGJ,UAAO,KAAK,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,SAAS,EAAkC,CAAC;IAClF;;;;;AAgBJ,QAAO;EACL,iBAXsB;EAYtB,oBAPyB,EAAE,IAAI,eAAe;EAQ9C;EACA;EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"register.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/register.server.ts"],"sourcesContent":[],"mappings":";;;;KAKY,+BAA6B,aAAa,YAAY,aAAiB;iBAEnE,qCAAqC,mBAAmB,aAAiB"}
1
+ {"version":3,"file":"register.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/register.server.ts"],"mappings":";;;;KAKY,cAAA,iBAA6B,SAAA,IAAa,WAAA,CAAY,YAAA,CAAiB,OAAA;AAAA,iBAEnE,oBAAA,iBAAqC,SAAA,CAAA,CAAW,MAAA,EAAQ,YAAA,CAAiB,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"register.server.mjs","names":[],"sources":["../../../../src/modules/router/handler/register.server.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { AnyRouter, RouterClient as ORPCRouterClient } from \"@orpc/server\";\nimport { createTanstackQueryUtils, RouterUtils } from \"@orpc/tanstack-query\";\n\nexport type RouterClient<TRouter extends AnyRouter> = RouterUtils<ORPCRouterClient<TRouter>>;\n\nexport function registerRouterClient<TRouter extends AnyRouter>(client: ORPCRouterClient<TRouter>) {\n if (!(globalThis as any).$client) {\n (globalThis as any).$client = createTanstackQueryUtils(client);\n }\n\n return (globalThis as any).$client;\n}\n"],"mappings":";;;AAOA,SAAgB,qBAAgD,QAAmC;AACjG,KAAI,CAAE,WAAmB,QACvB,CAAC,WAAmB,UAAU,yBAAyB,OAAO;AAGhE,QAAQ,WAAmB"}
1
+ {"version":3,"file":"register.server.mjs","names":[],"sources":["../../../../src/modules/router/handler/register.server.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: This is needed to satisfy the system */\n\nimport type { AnyRouter, RouterClient as ORPCRouterClient } from \"@orpc/server\";\nimport { createTanstackQueryUtils, type RouterUtils } from \"@orpc/tanstack-query\";\n\nexport type RouterClient<TRouter extends AnyRouter> = RouterUtils<ORPCRouterClient<TRouter>>;\n\nexport function registerRouterClient<TRouter extends AnyRouter>(client: ORPCRouterClient<TRouter>) {\n if (!(globalThis as any).$client) {\n (globalThis as any).$client = createTanstackQueryUtils(client);\n }\n\n return (globalThis as any).$client;\n}\n"],"mappings":";;;AAOA,SAAgB,qBAAgD,QAAmC;AACjG,KAAI,CAAE,WAAmB,QACvB,CAAC,WAAmB,UAAU,yBAAyB,OAAO;AAGhE,QAAQ,WAAmB"}
@@ -3,7 +3,6 @@ import { TulipContext } from "../../config/lib/context.mjs";
3
3
  import { AnyRouter } from "@orpc/server";
4
4
 
5
5
  //#region src/modules/router/handler/route.server.d.ts
6
-
7
6
  /**
8
7
  * RPC Route handler
9
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"route.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/route.server.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAUA;AAA+C,iBAA/B,cAA+B,CAAA,gBAAA,SAAA,EAAA,gBAA2B,eAA3B,CAAA,CAAA,KAAA,EAAA;EAA2B,SAAA,EAC7D,OAD6D;EAC7D,OAAA,EACF,YADE,CACW,OADX,CAAA;CACW,CAAA,EAAA;EAAb,IAAA,EAAA,CAAA,OAAA,EAU6B,OAV7B,EAAA,GAUoC,OAVpC,CAUoC,QAVpC,CAAA;EAU6B,GAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,GAAO,OAAP,CAAO,QAAP,CAAA;EAAO,IAAA,EAAA,CAAA,OAAA,EAAP,OAAO,EAAA,GAAA,OAAA,CAAA,QAAA,CAAA;EAAA,GAAA,EAAA,CAAA,OAAA,EAAP,OAAO,EAAA,GAAA,OAAA,CAAA,QAAA,CAAA;EAAP,KAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,GAAO,OAAP,CAAO,QAAP,CAAA;EAAO,MAAA,EAAA,CAAA,OAAA,EAAP,OAAO,EAAA,GAAA,OAAA,CAAA,QAAA,CAAA;CAAA"}
1
+ {"version":3,"file":"route.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/route.server.ts"],"mappings":";;;;;;;AAUA;iBAAgB,cAAA,iBAA+B,SAAA,kBAA2B,eAAA,CAAA,CAAiB,KAAA;EACzF,SAAA,EAAW,OAAA;EACX,OAAA,EAAS,YAAA,CAAa,OAAA;AAAA;kBAUgB,OAAA,KAAO,OAAA,CAAA,QAAA;iBAAP,OAAA,KAAO,OAAA,CAAA,QAAA;kBAAP,OAAA,KAAO,OAAA,CAAA,QAAA;iBAAP,OAAA,KAAO,OAAA,CAAA,QAAA;mBAAP,OAAA,KAAO,OAAA,CAAA,QAAA;oBAAP,OAAA,KAAO,OAAA,CAAA,QAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"route.server.mjs","names":[],"sources":["../../../../src/modules/router/handler/route.server.ts"],"sourcesContent":["import { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { TulipContext } from \"@/modules/config/lib/context\";\nimport { onError } from \"@orpc/client\";\nimport { AnyRouter } from \"@orpc/server\";\nimport { RPCHandler } from \"@orpc/server/fetch\";\nimport { createRPCContext } from \"./context.server\";\n\n/**\n * RPC Route handler\n */\nexport function handleRPCRoute<TRouter extends AnyRouter, TSchema extends TDatabaseSchema>(props: {\n appRouter: TRouter;\n context: TulipContext<TSchema>;\n}) {\n const handler = new RPCHandler(props.appRouter, {\n interceptors: [\n onError((error) => {\n console.error(JSON.stringify(error));\n }),\n ],\n });\n\n async function handleRequest(request: Request) {\n const rpcContext = await createRPCContext({ context: props.context });\n const { response } = await handler.handle(request, {\n prefix: \"/api/rpc\",\n context: rpcContext,\n });\n\n return response ?? new Response(\"Not found\", { status: 404 });\n }\n\n return {\n HEAD: handleRequest,\n GET: handleRequest,\n POST: handleRequest,\n PUT: handleRequest,\n PATCH: handleRequest,\n DELETE: handleRequest,\n };\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,eAA2E,OAGxF;CACD,MAAM,UAAU,IAAI,WAAW,MAAM,WAAW,EAC9C,cAAc,CACZ,SAAS,UAAU;AACjB,UAAQ,MAAM,KAAK,UAAU,MAAM,CAAC;GACpC,CACH,EACF,CAAC;CAEF,eAAe,cAAc,SAAkB;EAC7C,MAAM,aAAa,MAAM,iBAAiB,EAAE,SAAS,MAAM,SAAS,CAAC;EACrE,MAAM,EAAE,aAAa,MAAM,QAAQ,OAAO,SAAS;GACjD,QAAQ;GACR,SAAS;GACV,CAAC;AAEF,SAAO,YAAY,IAAI,SAAS,aAAa,EAAE,QAAQ,KAAK,CAAC;;AAG/D,QAAO;EACL,MAAM;EACN,KAAK;EACL,MAAM;EACN,KAAK;EACL,OAAO;EACP,QAAQ;EACT"}
1
+ {"version":3,"file":"route.server.mjs","names":[],"sources":["../../../../src/modules/router/handler/route.server.ts"],"sourcesContent":["import { onError } from \"@orpc/client\";\nimport type { AnyRouter } from \"@orpc/server\";\nimport { RPCHandler } from \"@orpc/server/fetch\";\nimport type { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport type { TulipContext } from \"@/modules/config/lib/context\";\nimport { createRPCContext } from \"./context.server\";\n\n/**\n * RPC Route handler\n */\nexport function handleRPCRoute<TRouter extends AnyRouter, TSchema extends TDatabaseSchema>(props: {\n appRouter: TRouter;\n context: TulipContext<TSchema>;\n}) {\n const handler = new RPCHandler(props.appRouter, {\n interceptors: [\n onError((error) => {\n console.error(JSON.stringify(error));\n }),\n ],\n });\n\n async function handleRequest(request: Request) {\n const rpcContext = await createRPCContext({ context: props.context });\n const { response } = await handler.handle(request, {\n prefix: \"/api/rpc\",\n context: rpcContext,\n });\n\n return response ?? new Response(\"Not found\", { status: 404 });\n }\n\n return {\n HEAD: handleRequest,\n GET: handleRequest,\n POST: handleRequest,\n PUT: handleRequest,\n PATCH: handleRequest,\n DELETE: handleRequest,\n };\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,eAA2E,OAGxF;CACD,MAAM,UAAU,IAAI,WAAW,MAAM,WAAW,EAC9C,cAAc,CACZ,SAAS,UAAU;AACjB,UAAQ,MAAM,KAAK,UAAU,MAAM,CAAC;GACpC,CACH,EACF,CAAC;CAEF,eAAe,cAAc,SAAkB;EAC7C,MAAM,aAAa,MAAM,iBAAiB,EAAE,SAAS,MAAM,SAAS,CAAC;EACrE,MAAM,EAAE,aAAa,MAAM,QAAQ,OAAO,SAAS;GACjD,QAAQ;GACR,SAAS;GACV,CAAC;AAEF,SAAO,YAAY,IAAI,SAAS,aAAa,EAAE,QAAQ,KAAK,CAAC;;AAG/D,QAAO;EACL,MAAM;EACN,KAAK;EACL,MAAM;EACN,KAAK;EACL,OAAO;EACP,QAAQ;EACT"}
@@ -1,7 +1,6 @@
1
1
  import { QueryClient } from "@tanstack/react-query";
2
2
 
3
3
  //#region src/modules/router/lib/query-client.d.ts
4
-
5
4
  /**
6
5
  * Create a new query client
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"query-client.d.mts","names":[],"sources":["../../../../src/modules/router/lib/query-client.ts"],"sourcesContent":[],"mappings":";;;;;;AAMA;iBAAgB,iBAAA,CAAA,GAAiB"}
1
+ {"version":3,"file":"query-client.d.mts","names":[],"sources":["../../../../src/modules/router/lib/query-client.ts"],"mappings":";;;;;AAMA;iBAAgB,iBAAA,CAAA,GAAiB,WAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"query-client.mjs","names":["queryClient: QueryClient","browserQueryClient: QueryClient"],"sources":["../../../../src/modules/router/lib/query-client.ts"],"sourcesContent":["import { isServer, MutationCache, QueryClient } from \"@tanstack/react-query\";\nimport { serializer } from \"./helpers\";\n\n/**\n * Create a new query client\n */\nexport function createQueryClient() {\n // eslint-disable-next-line prefer-const\n let queryClient: QueryClient;\n\n const mutationCache = new MutationCache({\n onSuccess: () => {\n // Invalidate all queries in the react-query cache:\n queryClient.invalidateQueries();\n },\n });\n\n queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n queryKeyHashFn(queryKey) {\n const [json, meta] = serializer.serialize(queryKey);\n return JSON.stringify({ json, meta });\n },\n staleTime: 60 * 1000, // > 0 to prevent immediate refetching on mount\n },\n dehydrate: {\n serializeData(data) {\n const [json, meta] = serializer.serialize(data);\n return { json, meta };\n },\n },\n hydrate: {\n deserializeData(data) {\n return serializer.deserialize(data.json, data.meta);\n },\n },\n },\n mutationCache,\n });\n\n return queryClient;\n}\n\n/**\n * Create a stable getter for the query client that will return the same client during the same request.\n */\nlet browserQueryClient: QueryClient;\n\nexport function getQueryClient() {\n if (isServer) {\n // Server: always make a new query client\n return createQueryClient();\n }\n\n // Browser: make a new query client if we don't already have one\n // This is very important, so we don't re-make a new client if React\n // suspends during the initial render. This may not be needed if we\n // have a suspense boundary BELOW the creation of the query client\n if (!browserQueryClient) browserQueryClient = createQueryClient();\n\n return browserQueryClient;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,oBAAoB;CAElC,IAAIA;AASJ,eAAc,IAAI,YAAY;EAC5B,gBAAgB;GACd,SAAS;IACP,eAAe,UAAU;KACvB,MAAM,CAAC,MAAM,QAAQ,WAAW,UAAU,SAAS;AACnD,YAAO,KAAK,UAAU;MAAE;MAAM;MAAM,CAAC;;IAEvC,WAAW,KAAK;IACjB;GACD,WAAW,EACT,cAAc,MAAM;IAClB,MAAM,CAAC,MAAM,QAAQ,WAAW,UAAU,KAAK;AAC/C,WAAO;KAAE;KAAM;KAAM;MAExB;GACD,SAAS,EACP,gBAAgB,MAAM;AACpB,WAAO,WAAW,YAAY,KAAK,MAAM,KAAK,KAAK;MAEtD;GACF;EACD,eA5BoB,IAAI,cAAc,EACtC,iBAAiB;AAEf,eAAY,mBAAmB;KAElC,CAAC;EAwBD,CAAC;AAEF,QAAO;;;;;AAMT,IAAIC;AAEJ,SAAgB,iBAAiB;AAC/B,KAAI,SAEF,QAAO,mBAAmB;AAO5B,KAAI,CAAC,mBAAoB,sBAAqB,mBAAmB;AAEjE,QAAO"}
1
+ {"version":3,"file":"query-client.mjs","names":[],"sources":["../../../../src/modules/router/lib/query-client.ts"],"sourcesContent":["import { isServer, MutationCache, QueryClient } from \"@tanstack/react-query\";\nimport { serializer } from \"./helpers\";\n\n/**\n * Create a new query client\n */\nexport function createQueryClient() {\n let queryClient: QueryClient;\n\n const mutationCache = new MutationCache({\n onSuccess: () => {\n // Invalidate all queries in the react-query cache:\n queryClient.invalidateQueries();\n },\n });\n\n queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n queryKeyHashFn(queryKey) {\n const [json, meta] = serializer.serialize(queryKey);\n return JSON.stringify({ json, meta });\n },\n staleTime: 60 * 1000, // > 0 to prevent immediate refetching on mount\n },\n dehydrate: {\n serializeData(data) {\n const [json, meta] = serializer.serialize(data);\n return { json, meta };\n },\n },\n hydrate: {\n deserializeData(data) {\n return serializer.deserialize(data.json, data.meta);\n },\n },\n },\n mutationCache,\n });\n\n return queryClient;\n}\n\n/**\n * Create a stable getter for the query client that will return the same client during the same request.\n */\nlet browserQueryClient: QueryClient;\n\nexport function getQueryClient() {\n if (isServer) {\n // Server: always make a new query client\n return createQueryClient();\n }\n\n // Browser: make a new query client if we don't already have one\n // This is very important, so we don't re-make a new client if React\n // suspends during the initial render. This may not be needed if we\n // have a suspense boundary BELOW the creation of the query client\n if (!browserQueryClient) browserQueryClient = createQueryClient();\n\n return browserQueryClient;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,oBAAoB;CAClC,IAAI;AASJ,eAAc,IAAI,YAAY;EAC5B,gBAAgB;GACd,SAAS;IACP,eAAe,UAAU;KACvB,MAAM,CAAC,MAAM,QAAQ,WAAW,UAAU,SAAS;AACnD,YAAO,KAAK,UAAU;MAAE;MAAM;MAAM,CAAC;;IAEvC,WAAW,KAAK;IACjB;GACD,WAAW,EACT,cAAc,MAAM;IAClB,MAAM,CAAC,MAAM,QAAQ,WAAW,UAAU,KAAK;AAC/C,WAAO;KAAE;KAAM;KAAM;MAExB;GACD,SAAS,EACP,gBAAgB,MAAM;AACpB,WAAO,WAAW,YAAY,KAAK,MAAM,KAAK,KAAK;MAEtD;GACF;EACD,eA5BoB,IAAI,cAAc,EACtC,iBAAiB;AAEf,eAAY,mBAAmB;KAElC,CAAC;EAwBD,CAAC;AAEF,QAAO;;;;;AAMT,IAAI;AAEJ,SAAgB,iBAAiB;AAC/B,KAAI,SAEF,QAAO,mBAAmB;AAO5B,KAAI,CAAC,mBAAoB,sBAAqB,mBAAmB;AAEjE,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"query-client.server.d.mts","names":[],"sources":["../../../../src/modules/router/lib/query-client.server.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASa,cAAA,cAAc,EAAA,OAAA,iBAA2B;AAKtD;;;iBAAgB,aAAA;YAAiC,KAAA,CAAM;IAAW,kBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"query-client.server.d.mts","names":[],"sources":["../../../../src/modules/router/lib/query-client.server.tsx"],"mappings":";;;;;;;;cASa,cAAA,SAAc,iBAAA;;;;iBAKX,aAAA,CAAc,KAAA;EAAS,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA,IAAW,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,7 +1,6 @@
1
1
  import { z as z$1 } from "zod";
2
2
 
3
3
  //#region src/modules/router/lib/validators.d.ts
4
-
5
4
  /**
6
5
  * Bulk action schema
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/router/lib/validators.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;cAAa,kBAAgB,GAAA,CAAA;;;AAAA,KAIjB,gBAAA,GAAmB,GAAA,CAAE,KAJJ,CAAA,OAIiB,gBAJjB,CAAA"}
1
+ {"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/router/lib/validators.ts"],"mappings":";;;;;AAKA;cAAa,gBAAA,EAAgB,GAAA,CAAA,SAAA;;;KAIjB,gBAAA,GAAmB,GAAA,CAAE,KAAA,QAAa,gBAAA"}
@@ -1,4 +1,4 @@
1
- import * as react1 from "react";
1
+ import * as react from "react";
2
2
  import { DropzoneOptions } from "react-dropzone";
3
3
 
4
4
  //#region src/modules/storage/components/dropzone-context.client.d.ts
@@ -9,7 +9,7 @@ type DropzoneContextType = {
9
9
  minSize?: DropzoneOptions["minSize"];
10
10
  maxFiles?: DropzoneOptions["maxFiles"];
11
11
  };
12
- declare const DropzoneContext: react1.Context<DropzoneContextType | undefined>;
12
+ declare const DropzoneContext: react.Context<DropzoneContextType | undefined>;
13
13
  /**
14
14
  * Dropzone context hook
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dropzone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone-context.client.tsx"],"sourcesContent":[],"mappings":";;;;KAKK,mBAAA;QACG;WACG;EAFN,OAAA,CAAA,EAGO,eAHY,CAAA,SAAA,CAAA;EAChB,OAAA,CAAA,EAGI,eAHJ,CAAA,SAAA,CAAA;EACG,QAAA,CAAA,EAGE,eAHF,CAAA,UAAA,CAAA;CACC;AACA,cAIC,eAJD,EAIgB,MAAA,CAAA,OAJhB,CAIgB,mBAJhB,GAAA,SAAA,CAAA;;;AAIZ;AAKgB,iBAAA,kBAAA,CAAA,CAAkB,EAAA,mBAAA"}
1
+ {"version":3,"file":"dropzone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone-context.client.tsx"],"mappings":";;;;KAKK,mBAAA;EACH,GAAA,GAAM,IAAA;EACN,MAAA,GAAS,eAAA;EACT,OAAA,GAAU,eAAA;EACV,OAAA,GAAU,eAAA;EACV,QAAA,GAAW,eAAA;AAAA;AAAA,cAGA,eAAA,EAAe,KAAA,CAAA,OAAA,CAAA,mBAAA;;;;iBAKZ,kBAAA,CAAA,GAAkB,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropzone-context.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/dropzone-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, use } from \"react\";\nimport { DropzoneOptions } from \"react-dropzone\";\n\ntype DropzoneContextType = {\n src?: File[];\n accept?: DropzoneOptions[\"accept\"];\n maxSize?: DropzoneOptions[\"maxSize\"];\n minSize?: DropzoneOptions[\"minSize\"];\n maxFiles?: DropzoneOptions[\"maxFiles\"];\n};\n\nexport const DropzoneContext = createContext<DropzoneContextType | undefined>(undefined);\n\n/**\n * Dropzone context hook\n */\nexport function useDropzoneContext() {\n const context = use(DropzoneContext);\n if (!context) throw new Error(\"useDropzoneContext must be used within a Dropzone\");\n return context;\n}\n"],"mappings":";;;;;AAaA,MAAa,kBAAkB,cAA+C,OAAU;;;;AAKxF,SAAgB,qBAAqB;CACnC,MAAM,UAAU,IAAI,gBAAgB;AACpC,KAAI,CAAC,QAAS,OAAM,IAAI,MAAM,oDAAoD;AAClF,QAAO"}
1
+ {"version":3,"file":"dropzone-context.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/dropzone-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, use } from \"react\";\nimport type { DropzoneOptions } from \"react-dropzone\";\n\ntype DropzoneContextType = {\n src?: File[];\n accept?: DropzoneOptions[\"accept\"];\n maxSize?: DropzoneOptions[\"maxSize\"];\n minSize?: DropzoneOptions[\"minSize\"];\n maxFiles?: DropzoneOptions[\"maxFiles\"];\n};\n\nexport const DropzoneContext = createContext<DropzoneContextType | undefined>(undefined);\n\n/**\n * Dropzone context hook\n */\nexport function useDropzoneContext() {\n const context = use(DropzoneContext);\n if (!context) throw new Error(\"useDropzoneContext must be used within a Dropzone\");\n return context;\n}\n"],"mappings":";;;;;AAaA,MAAa,kBAAkB,cAA+C,OAAU;;;;AAKxF,SAAgB,qBAAqB;CACnC,MAAM,UAAU,IAAI,gBAAgB;AACpC,KAAI,CAAC,QAAS,OAAM,IAAI,MAAM,oDAAoD;AAClF,QAAO"}
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime0 from "react/jsx-runtime";
2
- import * as react2 from "react";
2
+ import * as react from "react";
3
3
  import { ReactNode } from "react";
4
4
  import { DropEvent, DropzoneOptions, FileRejection } from "react-dropzone";
5
5
 
@@ -36,7 +36,7 @@ type DropzoneContentProps = {
36
36
  declare function DropzoneContent({
37
37
  children,
38
38
  className
39
- }: DropzoneContentProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react2.ReactPortal | react2.ReactElement<unknown, string | react2.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
39
+ }: DropzoneContentProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
40
40
  /**
41
41
  * DropzoneEmptyState
42
42
  */
@@ -47,7 +47,7 @@ type DropzoneEmptyStateProps = {
47
47
  declare function DropzoneEmptyState({
48
48
  children,
49
49
  className
50
- }: DropzoneEmptyStateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react2.ReactPortal | react2.ReactElement<unknown, string | react2.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
50
+ }: DropzoneEmptyStateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
51
51
  //#endregion
52
52
  export { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps };
53
53
  //# sourceMappingURL=dropzone.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropzone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAcY,aAAA,GAAgB,KAAK;EAArB,GAAA,CAAA,EACJ,IADI,EAAA;EAAqB,SAAA,CAAA,EAAA,MAAA;EAAL,MAAA,CAAA,EAAA,CAAA,aAAA,EAGD,IAHC,EAAA,EAAA,cAAA,EAGuB,aAHvB,EAAA,EAAA,KAAA,EAG+C,SAH/C,EAAA,GAAA,IAAA;EACpB,QAAA,CAAA,EAGK,SAHL;CAEmB;AAAwB,iBAInC,QAAA,CAJmC;EAAA,MAAA;EAAA,QAAA;EAAA,OAAA;EAAA,OAAA;EAAA,MAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAgBhD,aAhBgD,CAAA,EAgBnC,kBAAA,CAAA,GAAA,CAAA,OAhBmC;;;;AAInC,KAsDJ,oBAAA,GAtDY;EACtB,QAAA,CAAA,EAsDW,SAtDX;EACA,SAAA,CAAA,EAAA,MAAA;CACA;AACA,iBAyDc,eAAA,CAzDd;EAAA,QAAA;EAAA;AAAA,CAAA,EAyDuD,oBAzDvD,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,IAAA,GAyD2E,QAzD3E,CAyD2E,SAzD3E,CAAA,GAyD2E,OAzD3E,CAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAyD2E,MAAA,CAAA,WAAA,GAAA,MAAA,CAAA,YAzD3E,CAAA,OAAA,EAAA,MAAA,GAyD2E,MAAA,CAAA,qBAzD3E,CAAA,GAAA,CAAA,CAAA,GAyD2E,QAzD3E,CAyD2E,SAzD3E,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,GAyD2E,kBAAA,CAAA,GAAA,CAAA,OAAA,GAzD3E,IAAA;;;;AAIA,KAmFU,uBAAA,GAnFV;EACA,QAAA,CAAA,EAmFW,SAnFX;EACA,SAAA,CAAA,EAAA,MAAA;CAEC;AAAa,iBAoFA,kBAAA,CApFA;EAAA,QAAA;EAAA;AAAA,CAAA,EAoF4C,uBApF5C,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,IAAA,GAoFmE,QApFnE,CAoFmE,SApFnE,CAAA,GAoFmE,OApFnE,CAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAoFmE,MAAA,CAAA,WAAA,GAAA,MAAA,CAAA,YApFnE,CAAA,OAAA,EAAA,MAAA,GAoFmE,MAAA,CAAA,qBApFnE,CAAA,GAAA,CAAA,CAAA,GAoFmE,QApFnE,CAoFmE,SApFnE,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,GAoFmE,kBAAA,CAAA,GAAA,CAAA,OAAA,GApFnE,IAAA"}
1
+ {"version":3,"file":"dropzone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone.client.tsx"],"mappings":";;;;;;;;;KAcY,aAAA,GAAgB,IAAA,CAAK,eAAA;EAC/B,GAAA,GAAM,IAAA;EACN,SAAA;EACA,MAAA,IAAU,aAAA,EAAe,IAAA,IAAQ,cAAA,EAAgB,aAAA,IAAiB,KAAA,EAAO,SAAA;EACzE,QAAA,GAAW,SAAA;AAAA;AAAA,iBAGG,QAAA,CAAA;EACd,MAAA;EACA,QAAA;EACA,OAAA;EACA,OAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,GAAA;EACA,SAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,aAAA,GAAa,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;KA0CJ,oBAAA;EACV,QAAA,GAAW,SAAA;EACX,SAAA;AAAA;AAAA,iBAKc,eAAA,CAAA;EAAkB,QAAA;EAAU;AAAA,GAAa,oBAAA,qCAAoB,QAAA,CAAA,SAAA,IAAA,OAAA,sCAAA,KAAA,CAAA,WAAA,GAAA,KAAA,CAAA,YAAA,mBAAA,KAAA,CAAA,qBAAA,SAAA,QAAA,CAAA,SAAA,wBAAA,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;KA8BjE,uBAAA;EACV,QAAA,GAAW,SAAA;EACX,SAAA;AAAA;AAAA,iBAGc,kBAAA,CAAA;EAAqB,QAAA;EAAU;AAAA,GAAa,uBAAA,qCAAuB,QAAA,CAAA,SAAA,IAAA,OAAA,sCAAA,KAAA,CAAA,WAAA,GAAA,KAAA,CAAA,YAAA,mBAAA,KAAA,CAAA,qBAAA,SAAA,QAAA,CAAA,SAAA,wBAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropzone.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/dropzone.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { renderBytes } from \"@/modules/storage/lib/helpers\";\nimport { UploadIcon } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { DropEvent, DropzoneOptions, FileRejection } from \"react-dropzone\";\nimport { useDropzone } from \"react-dropzone\";\nimport { DropzoneContext, useDropzoneContext } from \"./dropzone-context.client\";\n\n/**\n * Dropzone\n */\nexport type DropzoneProps = Omit<DropzoneOptions, \"onDrop\"> & {\n src?: File[];\n className?: string;\n onDrop?: (acceptedFiles: File[], fileRejections: FileRejection[], event: DropEvent) => void;\n children?: ReactNode;\n};\n\nexport function Dropzone({\n accept,\n maxFiles = 1,\n maxSize,\n minSize,\n onDrop,\n onError,\n disabled,\n src,\n className,\n children,\n ...props\n}: DropzoneProps) {\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n accept,\n maxFiles,\n maxSize,\n minSize,\n onError,\n disabled,\n onDrop: (acceptedFiles, fileRejections, event) => {\n if (fileRejections.length > 0) {\n const message = fileRejections.at(0)?.errors.at(0)?.message;\n onError?.(new Error(message));\n return;\n }\n onDrop?.(acceptedFiles, fileRejections, event);\n },\n ...props,\n });\n\n return (\n <DropzoneContext key={JSON.stringify(src)} value={{ src, accept, maxSize, minSize, maxFiles }}>\n <Button\n className={cn(\n \"relative h-auto w-full flex-col overflow-hidden p-8\",\n isDragActive && \"ring-ring outline-none ring-1\",\n className,\n )}\n disabled={disabled}\n type=\"button\"\n variant=\"outline\"\n {...getRootProps()}\n >\n <input {...getInputProps()} disabled={disabled} />\n {children}\n </Button>\n </DropzoneContext>\n );\n}\n\n/**\n * DropzoneContent\n */\nexport type DropzoneContentProps = {\n children?: ReactNode;\n className?: string;\n};\n\nconst maxLabelItems = 3;\n\nexport function DropzoneContent({ children, className }: DropzoneContentProps) {\n const { src } = useDropzoneContext();\n if (!src) return null;\n\n if (children) return children;\n\n return (\n <div className={cn(\"flex flex-col items-center justify-center\", className)}>\n <div className=\"bg-muted text-muted-foreground flex size-8 items-center justify-center rounded-md\">\n <UploadIcon size={16} />\n </div>\n\n <p className=\"my-2 w-full truncate text-sm font-medium\">\n {src.length > maxLabelItems\n ? `${new Intl.ListFormat(\"en\").format(\n src.slice(0, maxLabelItems).map((file) => file.name),\n )} and ${src.length - maxLabelItems} more`\n : new Intl.ListFormat(\"en\").format(src.map((file) => file.name))}\n </p>\n\n <p className=\"text-muted-foreground w-full text-wrap text-xs\">\n Drag and drop or click to replace\n </p>\n </div>\n );\n}\n\n/**\n * DropzoneEmptyState\n */\nexport type DropzoneEmptyStateProps = {\n children?: ReactNode;\n className?: string;\n};\n\nexport function DropzoneEmptyState({ children, className }: DropzoneEmptyStateProps) {\n const { src, accept, maxSize, minSize, maxFiles } = useDropzoneContext();\n if (src) {\n return null;\n }\n if (children) {\n return children;\n }\n let caption = \"\";\n if (accept) {\n caption += \"Accepts \";\n caption += new Intl.ListFormat(\"en\").format(Object.keys(accept));\n }\n if (minSize && maxSize) {\n caption += ` between ${renderBytes(minSize)} and ${renderBytes(maxSize)}`;\n } else if (minSize) {\n caption += ` at least ${renderBytes(minSize)}`;\n } else if (maxSize) {\n caption += ` less than ${renderBytes(maxSize)}`;\n }\n return (\n <div className={cn(\"flex flex-col items-center justify-center\", className)}>\n <div className=\"bg-muted text-muted-foreground flex size-8 items-center justify-center rounded-md\">\n <UploadIcon size={16} />\n </div>\n <p className=\"my-2 w-full truncate text-wrap text-sm font-medium\">\n Upload {maxFiles === 1 ? \"a file\" : \"files\"}\n </p>\n <p className=\"text-muted-foreground w-full truncate text-wrap text-xs\">\n Drag and drop or click to upload\n </p>\n {caption && <p className=\"text-muted-foreground text-wrap text-xs\">{caption}.</p>}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAqBA,SAAgB,SAAS,EACvB,QACA,WAAW,GACX,SACA,SACA,QACA,SACA,UACA,KACA,WACA,UACA,GAAG,SACa;CAChB,MAAM,EAAE,cAAc,eAAe,iBAAiB,YAAY;EAChE;EACA;EACA;EACA;EACA;EACA;EACA,SAAS,eAAe,gBAAgB,UAAU;AAChD,OAAI,eAAe,SAAS,GAAG;IAC7B,MAAM,UAAU,eAAe,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE;AACpD,cAAU,IAAI,MAAM,QAAQ,CAAC;AAC7B;;AAEF,YAAS,eAAe,gBAAgB,MAAM;;EAEhD,GAAG;EACJ,CAAC;AAEF,QACE,oBAAC;EAA0C,OAAO;GAAE;GAAK;GAAQ;GAAS;GAAS;GAAU;YAC3F,qBAAC;GACC,WAAW,GACT,uDACA,gBAAgB,iCAChB,UACD;GACS;GACV,MAAK;GACL,SAAQ;GACR,GAAI,cAAc;cAElB,oBAAC;IAAM,GAAI,eAAe;IAAY;KAAY,EACjD;IACM;IAdW,KAAK,UAAU,IAAI,CAevB;;AAYtB,MAAM,gBAAgB;AAEtB,SAAgB,gBAAgB,EAAE,UAAU,aAAmC;CAC7E,MAAM,EAAE,QAAQ,oBAAoB;AACpC,KAAI,CAAC,IAAK,QAAO;AAEjB,KAAI,SAAU,QAAO;AAErB,QACE,qBAAC;EAAI,WAAW,GAAG,6CAA6C,UAAU;;GACxE,oBAAC;IAAI,WAAU;cACb,oBAAC,cAAW,MAAM,KAAM;KACpB;GAEN,oBAAC;IAAE,WAAU;cACV,IAAI,SAAS,gBACV,GAAG,IAAI,KAAK,WAAW,KAAK,CAAC,OAC3B,IAAI,MAAM,GAAG,cAAc,CAAC,KAAK,SAAS,KAAK,KAAK,CACrD,CAAC,OAAO,IAAI,SAAS,cAAc,SACpC,IAAI,KAAK,WAAW,KAAK,CAAC,OAAO,IAAI,KAAK,SAAS,KAAK,KAAK,CAAC;KAChE;GAEJ,oBAAC;IAAE,WAAU;cAAiD;KAE1D;;GACA;;AAYV,SAAgB,mBAAmB,EAAE,UAAU,aAAsC;CACnF,MAAM,EAAE,KAAK,QAAQ,SAAS,SAAS,aAAa,oBAAoB;AACxE,KAAI,IACF,QAAO;AAET,KAAI,SACF,QAAO;CAET,IAAI,UAAU;AACd,KAAI,QAAQ;AACV,aAAW;AACX,aAAW,IAAI,KAAK,WAAW,KAAK,CAAC,OAAO,OAAO,KAAK,OAAO,CAAC;;AAElE,KAAI,WAAW,QACb,YAAW,YAAY,YAAY,QAAQ,CAAC,OAAO,YAAY,QAAQ;UAC9D,QACT,YAAW,aAAa,YAAY,QAAQ;UACnC,QACT,YAAW,cAAc,YAAY,QAAQ;AAE/C,QACE,qBAAC;EAAI,WAAW,GAAG,6CAA6C,UAAU;;GACxE,oBAAC;IAAI,WAAU;cACb,oBAAC,cAAW,MAAM,KAAM;KACpB;GACN,qBAAC;IAAE,WAAU;eAAqD,WACxD,aAAa,IAAI,WAAW;KAClC;GACJ,oBAAC;IAAE,WAAU;cAA0D;KAEnE;GACH,WAAW,qBAAC;IAAE,WAAU;eAA2C,SAAQ;KAAK;;GAC7E"}
1
+ {"version":3,"file":"dropzone.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/dropzone.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { UploadIcon } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { DropEvent, DropzoneOptions, FileRejection } from \"react-dropzone\";\nimport { useDropzone } from \"react-dropzone\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { renderBytes } from \"@/modules/storage/lib/helpers\";\nimport { DropzoneContext, useDropzoneContext } from \"./dropzone-context.client\";\n\n/**\n * Dropzone\n */\nexport type DropzoneProps = Omit<DropzoneOptions, \"onDrop\"> & {\n src?: File[];\n className?: string;\n onDrop?: (acceptedFiles: File[], fileRejections: FileRejection[], event: DropEvent) => void;\n children?: ReactNode;\n};\n\nexport function Dropzone({\n accept,\n maxFiles = 1,\n maxSize,\n minSize,\n onDrop,\n onError,\n disabled,\n src,\n className,\n children,\n ...props\n}: DropzoneProps) {\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n accept,\n maxFiles,\n maxSize,\n minSize,\n onError,\n disabled,\n onDrop: (acceptedFiles, fileRejections, event) => {\n if (fileRejections.length > 0) {\n const message = fileRejections.at(0)?.errors.at(0)?.message;\n onError?.(new Error(message));\n return;\n }\n onDrop?.(acceptedFiles, fileRejections, event);\n },\n ...props,\n });\n\n return (\n <DropzoneContext key={JSON.stringify(src)} value={{ src, accept, maxSize, minSize, maxFiles }}>\n <Button\n className={cn(\n \"relative h-auto w-full flex-col overflow-hidden p-8\",\n isDragActive && \"ring-ring outline-none ring-1\",\n className,\n )}\n disabled={disabled}\n type=\"button\"\n variant=\"outline\"\n {...getRootProps()}\n >\n <input {...getInputProps()} disabled={disabled} />\n {children}\n </Button>\n </DropzoneContext>\n );\n}\n\n/**\n * DropzoneContent\n */\nexport type DropzoneContentProps = {\n children?: ReactNode;\n className?: string;\n};\n\nconst maxLabelItems = 3;\n\nexport function DropzoneContent({ children, className }: DropzoneContentProps) {\n const { src } = useDropzoneContext();\n if (!src) return null;\n\n if (children) return children;\n\n return (\n <div className={cn(\"flex flex-col items-center justify-center\", className)}>\n <div className=\"bg-muted text-muted-foreground flex size-8 items-center justify-center rounded-md\">\n <UploadIcon size={16} />\n </div>\n\n <p className=\"my-2 w-full truncate text-sm font-medium\">\n {src.length > maxLabelItems\n ? `${new Intl.ListFormat(\"en\").format(\n src.slice(0, maxLabelItems).map((file) => file.name),\n )} and ${src.length - maxLabelItems} more`\n : new Intl.ListFormat(\"en\").format(src.map((file) => file.name))}\n </p>\n\n <p className=\"text-muted-foreground w-full text-wrap text-xs\">\n Drag and drop or click to replace\n </p>\n </div>\n );\n}\n\n/**\n * DropzoneEmptyState\n */\nexport type DropzoneEmptyStateProps = {\n children?: ReactNode;\n className?: string;\n};\n\nexport function DropzoneEmptyState({ children, className }: DropzoneEmptyStateProps) {\n const { src, accept, maxSize, minSize, maxFiles } = useDropzoneContext();\n if (src) {\n return null;\n }\n if (children) {\n return children;\n }\n let caption = \"\";\n if (accept) {\n caption += \"Accepts \";\n caption += new Intl.ListFormat(\"en\").format(Object.keys(accept));\n }\n if (minSize && maxSize) {\n caption += ` between ${renderBytes(minSize)} and ${renderBytes(maxSize)}`;\n } else if (minSize) {\n caption += ` at least ${renderBytes(minSize)}`;\n } else if (maxSize) {\n caption += ` less than ${renderBytes(maxSize)}`;\n }\n return (\n <div className={cn(\"flex flex-col items-center justify-center\", className)}>\n <div className=\"bg-muted text-muted-foreground flex size-8 items-center justify-center rounded-md\">\n <UploadIcon size={16} />\n </div>\n <p className=\"my-2 w-full truncate text-wrap text-sm font-medium\">\n Upload {maxFiles === 1 ? \"a file\" : \"files\"}\n </p>\n <p className=\"text-muted-foreground w-full truncate text-wrap text-xs\">\n Drag and drop or click to upload\n </p>\n {caption && <p className=\"text-muted-foreground text-wrap text-xs\">{caption}.</p>}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAqBA,SAAgB,SAAS,EACvB,QACA,WAAW,GACX,SACA,SACA,QACA,SACA,UACA,KACA,WACA,UACA,GAAG,SACa;CAChB,MAAM,EAAE,cAAc,eAAe,iBAAiB,YAAY;EAChE;EACA;EACA;EACA;EACA;EACA;EACA,SAAS,eAAe,gBAAgB,UAAU;AAChD,OAAI,eAAe,SAAS,GAAG;IAC7B,MAAM,UAAU,eAAe,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE;AACpD,cAAU,IAAI,MAAM,QAAQ,CAAC;AAC7B;;AAEF,YAAS,eAAe,gBAAgB,MAAM;;EAEhD,GAAG;EACJ,CAAC;AAEF,QACE,oBAAC;EAA0C,OAAO;GAAE;GAAK;GAAQ;GAAS;GAAS;GAAU;YAC3F,qBAAC;GACC,WAAW,GACT,uDACA,gBAAgB,iCAChB,UACD;GACS;GACV,MAAK;GACL,SAAQ;GACR,GAAI,cAAc;cAElB,oBAAC;IAAM,GAAI,eAAe;IAAY;KAAY,EACjD;IACM;IAdW,KAAK,UAAU,IAAI,CAevB;;AAYtB,MAAM,gBAAgB;AAEtB,SAAgB,gBAAgB,EAAE,UAAU,aAAmC;CAC7E,MAAM,EAAE,QAAQ,oBAAoB;AACpC,KAAI,CAAC,IAAK,QAAO;AAEjB,KAAI,SAAU,QAAO;AAErB,QACE,qBAAC;EAAI,WAAW,GAAG,6CAA6C,UAAU;;GACxE,oBAAC;IAAI,WAAU;cACb,oBAAC,cAAW,MAAM,KAAM;KACpB;GAEN,oBAAC;IAAE,WAAU;cACV,IAAI,SAAS,gBACV,GAAG,IAAI,KAAK,WAAW,KAAK,CAAC,OAC3B,IAAI,MAAM,GAAG,cAAc,CAAC,KAAK,SAAS,KAAK,KAAK,CACrD,CAAC,OAAO,IAAI,SAAS,cAAc,SACpC,IAAI,KAAK,WAAW,KAAK,CAAC,OAAO,IAAI,KAAK,SAAS,KAAK,KAAK,CAAC;KAChE;GAEJ,oBAAC;IAAE,WAAU;cAAiD;KAE1D;;GACA;;AAYV,SAAgB,mBAAmB,EAAE,UAAU,aAAsC;CACnF,MAAM,EAAE,KAAK,QAAQ,SAAS,SAAS,aAAa,oBAAoB;AACxE,KAAI,IACF,QAAO;AAET,KAAI,SACF,QAAO;CAET,IAAI,UAAU;AACd,KAAI,QAAQ;AACV,aAAW;AACX,aAAW,IAAI,KAAK,WAAW,KAAK,CAAC,OAAO,OAAO,KAAK,OAAO,CAAC;;AAElE,KAAI,WAAW,QACb,YAAW,YAAY,YAAY,QAAQ,CAAC,OAAO,YAAY,QAAQ;UAC9D,QACT,YAAW,aAAa,YAAY,QAAQ;UACnC,QACT,YAAW,cAAc,YAAY,QAAQ;AAE/C,QACE,qBAAC;EAAI,WAAW,GAAG,6CAA6C,UAAU;;GACxE,oBAAC;IAAI,WAAU;cACb,oBAAC,cAAW,MAAM,KAAM;KACpB;GACN,qBAAC;IAAE,WAAU;eAAqD,WACxD,aAAa,IAAI,WAAW;KAClC;GACJ,oBAAC;IAAE,WAAU;cAA0D;KAEnE;GACH,WAAW,qBAAC;IAAE,WAAU;eAA2C,SAAQ;KAAK;;GAC7E"}
@@ -1,5 +1,5 @@
1
1
  import { FileNode } from "../lib/validators.mjs";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/storage/components/image-grid.client.d.ts
@@ -26,8 +26,8 @@ declare function ImageGrid({
26
26
  optimistic,
27
27
  disabled,
28
28
  ...props
29
- }: ImageGridProps): react_jsx_runtime3.JSX.Element;
30
- declare function ImageGridSkeleton(props: ComponentProps<"div">): react_jsx_runtime3.JSX.Element;
29
+ }: ImageGridProps): react_jsx_runtime0.JSX.Element;
30
+ declare function ImageGridSkeleton(props: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
32
  export { ImageGrid, ImageGridSkeleton };
33
33
  //# sourceMappingURL=image-grid.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-grid.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAsC6C,KAMxC,cAAA,GAAiB,cAAH,CAAA,KAAA,CAAA,GAAA;EAAG,KAAA,EACb,QADa,EAAA;EACb,QAAA,CAAA,EAAA,OAAA;EAEyD,UAAA,EAAA,CAAA,MAAA,EAAA;IAEH,SAAA,EAAA,MAAA;IAAO,OAAA,EAAA,MAAA;EAItD,CAAA,EAAA,GANkD,OAMzC,CAAA,IAAA,CAAA;EAAG,UAAA,CAAA,EAAA;IAAO,IAAA,CAAA,EAAA,CAAA,MAAA,EAAA;MAAY,SAAA,EAAA,MAAA;MAAY,OAAA,EAAA,MAAA;IAAsB,CAAA,EAAA,GAJlB,OAIkB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAc,CAAA;CAAA;AAkK/E,iBAlKA,SAAA,CAkKiB;EAAA,KAAQ;EAAA,UAAqB;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAlKmB,cAkKnB,CAAA,EAlKiC,kBAAA,CAAA,GAAA,CAAA,OAkKjC;iBAA9C,iBAAA,QAAyB,wBAAqB,kBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"image-grid.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"mappings":";;;;;;;;KA4CK,cAAA,GAAiB,cAAA;EACpB,KAAA,EAAO,QAAA;EACP,QAAA;EACA,UAAA,GAAa,MAAA;IAAU,SAAA;IAAmB,OAAA;EAAA,MAAsB,OAAA;EAChE,UAAA;IACE,IAAA,IAAQ,MAAA;MAAU,SAAA;MAAmB,OAAA;IAAA,MAAsB,OAAA;EAAA;AAAA;AAAA,iBAI/C,SAAA,CAAA;EAAY,KAAA;EAAO,UAAA;EAAY,UAAA;EAAY,QAAA;EAAA,GAAa;AAAA,GAAS,cAAA,GAAc,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAsK/E,iBAAA,CAAkB,KAAA,EAAO,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -71,8 +71,10 @@ function ImageGrid({ nodes, moveAction, optimistic, disabled, ...props }) {
71
71
  index,
72
72
  setCurrent
73
73
  }, node.id)), !disabled && /* @__PURE__ */ jsxs("label", {
74
+ htmlFor: "file-upload",
74
75
  className: "border-muted-foreground bg-muted hover:border-primary relative flex aspect-square w-full cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed",
75
76
  children: [/* @__PURE__ */ jsx(UploadIcon, { className: "h-8 w-8" }), /* @__PURE__ */ jsx(Input, {
77
+ id: "file-upload",
76
78
  type: "file",
77
79
  accept: "image/jpeg, image/png, image/webp, image/gif",
78
80
  className: "absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0",
@@ -1 +1 @@
1
- {"version":3,"file":"image-grid.client.mjs","names":["Image"],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselNext,\n CarouselPrevious,\n} from \"@/components/ui/carousel\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { useAction } from \"@/lib/entry.client\";\nimport { cn } from \"@/lib/utils/cn\";\nimport {\n closestCenter,\n DndContext,\n DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useDroppable,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { GripIcon, UploadIcon } from \"lucide-react\";\nimport Image from \"next/image\";\nimport React, { ComponentProps } from \"react\";\nimport { getFileUrl, imageLoader } from \"../lib/helpers\";\nimport { FileNode } from \"../lib/validators\";\nimport { useUploadZone } from \"./upload-zone-context.client\";\n\n/**\n * Image Grid\n */\ntype ImageGridProps = ComponentProps<\"div\"> & {\n nodes: FileNode[];\n disabled?: boolean;\n moveAction: (params: { fromIndex: number; toIndex: number }) => Promise<void>;\n optimistic?: {\n move?: (params: { fromIndex: number; toIndex: number }) => Promise<void> | void;\n };\n};\n\nexport function ImageGrid({ nodes, moveAction, optimistic, disabled, ...props }: ImageGridProps) {\n const uploadZone = useUploadZone();\n\n const images = nodes.flatMap((node) => ({ ...node, url: getFileUrl(node.id) }));\n\n const [current, setCurrent] = React.useState<number>(0);\n\n const { setNodeRef } = useDroppable({ id: \"image-grid\" });\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const moveMuration = useAction({\n mutationFn: async ({ active, over }: DragEndEvent) => {\n if (!moveAction) return Promise.resolve();\n\n const activeId = active.id;\n const overId = over?.id;\n if (!activeId || !overId || activeId === overId) return Promise.resolve();\n\n const fromIndex = images.findIndex((image) => image.id === activeId);\n const toIndex = images.findIndex((image) => image.id === overId);\n\n await optimistic?.move?.({ fromIndex, toIndex });\n await moveAction({ fromIndex, toIndex });\n },\n onSuccess: async () => {\n setCurrent(0);\n await uploadZone.optimistic?.invalidate?.();\n },\n onError: (error) => {\n console.error(\"Error moving image:\", error);\n },\n });\n\n return (\n <Dialog {...props}>\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={moveMuration.mutate}\n >\n <div\n ref={setNodeRef}\n className=\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\"\n >\n <SortableContext items={images.map((image) => image.id)} strategy={rectSortingStrategy}>\n {images.map((node, index) => (\n <ImageGridItem key={node.id} node={node} index={index} setCurrent={setCurrent} />\n ))}\n\n {!disabled && (\n <label className=\"border-muted-foreground bg-muted hover:border-primary relative flex aspect-square w-full cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed\">\n <UploadIcon className=\"h-8 w-8\" />\n <Input\n type=\"file\"\n accept=\"image/jpeg, image/png, image/webp, image/gif\"\n className=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n multiple\n onChange={(e) => {\n if (!e.target.files) return;\n return Array.from(e.target.files).map(uploadZone.onUpload);\n }}\n />\n </label>\n )}\n </SortableContext>\n </div>\n </DndContext>\n\n <Carousel className=\"w-full\" opts={{ startIndex: current }}>\n <DialogContent className=\"border-none bg-transparent p-0 shadow-none md:max-w-[80vw] xl:max-w-[60vw]\">\n <CarouselContent className=\"md:max-h-[80vh]\">\n {images.map(({ id, url }) => (\n <CarouselItem key={id} className=\"overflow-hidden rounded-xl\">\n <Image\n src={url}\n alt=\"Image Preview\"\n width={1920}\n height={1080}\n className=\"h-full w-full rounded-xl object-contain\"\n loader={imageLoader}\n />\n </CarouselItem>\n ))}\n </CarouselContent>\n <CarouselPrevious />\n <CarouselNext />\n </DialogContent>\n </Carousel>\n </Dialog>\n );\n}\n\n/**\n * Image Grid Item\n */\ntype ImageGridItemProps = {\n node: FileNode & { url: string };\n index: number;\n setCurrent: React.Dispatch<React.SetStateAction<number>>;\n};\n\nfunction ImageGridItem({ node, index, setCurrent }: ImageGridItemProps) {\n const uploadZone = useUploadZone();\n\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: node.id });\n\n return (\n <Card\n id={node.id}\n ref={setNodeRef}\n style={{\n transform: CSS.Transform.toString(transform),\n transition,\n }}\n className={cn(\"group relative aspect-square w-full\", node.isPending && \"opacity-30\")}\n >\n {!node.isPending ? (\n <>\n <DialogTrigger onClick={() => setCurrent(index)}>\n <Image\n src={node.url}\n alt=\"Image Preview\"\n width={100}\n height={100}\n className=\"bg-muted absolute inset-0 h-full w-full cursor-pointer rounded-lg object-contain\"\n loader={imageLoader}\n />\n </DialogTrigger>\n\n <Button\n {...attributes}\n {...listeners}\n type=\"button\"\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-2 top-2 hidden p-1 group-hover:flex\"\n >\n <GripIcon className=\"size-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon\"\n onClick={() => uploadZone.onRemove([node.id])}\n className=\"absolute left-2 top-2 hidden p-1 group-hover:flex\"\n >\n <Icons.trash className=\"size-4\" />\n </Button>\n </>\n ) : (\n <Skeleton className=\"absolute inset-0 h-full w-full rounded-lg\" />\n )}\n </Card>\n );\n}\n\nexport function ImageGridSkeleton(props: ComponentProps<\"div\">) {\n return (\n <div\n {...props}\n className={cn(\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\", props.className)}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <Skeleton key={index} className=\"aspect-square w-full rounded-lg\" />\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqDA,SAAgB,UAAU,EAAE,OAAO,YAAY,YAAY,UAAU,GAAG,SAAyB;CAC/F,MAAM,aAAa,eAAe;CAElC,MAAM,SAAS,MAAM,SAAS,UAAU;EAAE,GAAG;EAAM,KAAK,WAAW,KAAK,GAAG;EAAE,EAAE;CAE/E,MAAM,CAAC,SAAS,cAAc,MAAM,SAAiB,EAAE;CAEvD,MAAM,EAAE,eAAe,aAAa,EAAE,IAAI,cAAc,CAAC;CACzD,MAAM,UAAU,WACd,UAAU,cAAc,EACxB,UAAU,gBAAgB,EACxB,kBAAkB,6BACnB,CAAC,CACH;CAED,MAAM,eAAe,UAAU;EAC7B,YAAY,OAAO,EAAE,QAAQ,WAAyB;AACpD,OAAI,CAAC,WAAY,QAAO,QAAQ,SAAS;GAEzC,MAAM,WAAW,OAAO;GACxB,MAAM,SAAS,MAAM;AACrB,OAAI,CAAC,YAAY,CAAC,UAAU,aAAa,OAAQ,QAAO,QAAQ,SAAS;GAEzE,MAAM,YAAY,OAAO,WAAW,UAAU,MAAM,OAAO,SAAS;GACpE,MAAM,UAAU,OAAO,WAAW,UAAU,MAAM,OAAO,OAAO;AAEhE,SAAM,YAAY,OAAO;IAAE;IAAW;IAAS,CAAC;AAChD,SAAM,WAAW;IAAE;IAAW;IAAS,CAAC;;EAE1C,WAAW,YAAY;AACrB,cAAW,EAAE;AACb,SAAM,WAAW,YAAY,cAAc;;EAE7C,UAAU,UAAU;AAClB,WAAQ,MAAM,uBAAuB,MAAM;;EAE9C,CAAC;AAEF,QACE,qBAAC;EAAO,GAAI;aACV,oBAAC;GACU;GACT,oBAAoB;GACpB,WAAW,aAAa;aAExB,oBAAC;IACC,KAAK;IACL,WAAU;cAEV,qBAAC;KAAgB,OAAO,OAAO,KAAK,UAAU,MAAM,GAAG;KAAE,UAAU;gBAChE,OAAO,KAAK,MAAM,UACjB,oBAAC;MAAkC;MAAa;MAAmB;QAA/C,KAAK,GAAwD,CACjF,EAED,CAAC,YACA,qBAAC;MAAM,WAAU;iBACf,oBAAC,cAAW,WAAU,YAAY,EAClC,oBAAC;OACC,MAAK;OACL,QAAO;OACP,WAAU;OACV;OACA,WAAW,MAAM;AACf,YAAI,CAAC,EAAE,OAAO,MAAO;AACrB,eAAO,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC,IAAI,WAAW,SAAS;;QAE5D;OACI;MAEM;KACd;IACK,EAEb,oBAAC;GAAS,WAAU;GAAS,MAAM,EAAE,YAAY,SAAS;aACxD,qBAAC;IAAc,WAAU;;KACvB,oBAAC;MAAgB,WAAU;gBACxB,OAAO,KAAK,EAAE,IAAI,UACjB,oBAAC;OAAsB,WAAU;iBAC/B,oBAACA;QACC,KAAK;QACL,KAAI;QACJ,OAAO;QACP,QAAQ;QACR,WAAU;QACV,QAAQ;SACR;SARe,GASJ,CACf;OACc;KAClB,oBAAC,qBAAmB;KACpB,oBAAC,iBAAe;;KACF;IACP;GACJ;;AAab,SAAS,cAAc,EAAE,MAAM,OAAO,cAAkC;CACtE,MAAM,aAAa,eAAe;CAElC,MAAM,EAAE,YAAY,WAAW,YAAY,WAAW,eAAe,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;AAEjG,QACE,oBAAC;EACC,IAAI,KAAK;EACT,KAAK;EACL,OAAO;GACL,WAAW,IAAI,UAAU,SAAS,UAAU;GAC5C;GACD;EACD,WAAW,GAAG,uCAAuC,KAAK,aAAa,aAAa;YAEnF,CAAC,KAAK,YACL;GACE,oBAAC;IAAc,eAAe,WAAW,MAAM;cAC7C,oBAACA;KACC,KAAK,KAAK;KACV,KAAI;KACJ,OAAO;KACP,QAAQ;KACR,WAAU;KACV,QAAQ;MACR;KACY;GAEhB,oBAAC;IACC,GAAI;IACJ,GAAI;IACJ,MAAK;IACL,SAAQ;IACR,MAAK;IACL,WAAU;cAEV,oBAAC,YAAS,WAAU,WAAW;KACxB;GAET,oBAAC;IACC,MAAK;IACL,SAAQ;IACR,MAAK;IACL,eAAe,WAAW,SAAS,CAAC,KAAK,GAAG,CAAC;IAC7C,WAAU;cAEV,oBAAC,MAAM,SAAM,WAAU,WAAW;KAC3B;MACR,GAEH,oBAAC,YAAS,WAAU,8CAA8C;GAE/D;;AAIX,SAAgB,kBAAkB,OAA8B;AAC9D,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,8DAA8D,MAAM,UAAU;YAE3F,MAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,UAClC,oBAAC,YAAqB,WAAU,qCAAjB,MAAqD,CACpE;GACE"}
1
+ {"version":3,"file":"image-grid.client.mjs","names":["Image"],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useDroppable,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { GripIcon, UploadIcon } from \"lucide-react\";\nimport Image from \"next/image\";\nimport React, { type ComponentProps } from \"react\";\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselNext,\n CarouselPrevious,\n} from \"@/components/ui/carousel\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { useAction } from \"@/lib/entry.client\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { getFileUrl, imageLoader } from \"../lib/helpers\";\nimport type { FileNode } from \"../lib/validators\";\nimport { useUploadZone } from \"./upload-zone-context.client\";\n\n/**\n * Image Grid\n */\ntype ImageGridProps = ComponentProps<\"div\"> & {\n nodes: FileNode[];\n disabled?: boolean;\n moveAction: (params: { fromIndex: number; toIndex: number }) => Promise<void>;\n optimistic?: {\n move?: (params: { fromIndex: number; toIndex: number }) => Promise<void> | void;\n };\n};\n\nexport function ImageGrid({ nodes, moveAction, optimistic, disabled, ...props }: ImageGridProps) {\n const uploadZone = useUploadZone();\n\n const images = nodes.flatMap((node) => ({ ...node, url: getFileUrl(node.id) }));\n\n const [current, setCurrent] = React.useState<number>(0);\n\n const { setNodeRef } = useDroppable({ id: \"image-grid\" });\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const moveMuration = useAction({\n mutationFn: async ({ active, over }: DragEndEvent) => {\n if (!moveAction) return Promise.resolve();\n\n const activeId = active.id;\n const overId = over?.id;\n if (!activeId || !overId || activeId === overId) return Promise.resolve();\n\n const fromIndex = images.findIndex((image) => image.id === activeId);\n const toIndex = images.findIndex((image) => image.id === overId);\n\n await optimistic?.move?.({ fromIndex, toIndex });\n await moveAction({ fromIndex, toIndex });\n },\n onSuccess: async () => {\n setCurrent(0);\n await uploadZone.optimistic?.invalidate?.();\n },\n onError: (error) => {\n console.error(\"Error moving image:\", error);\n },\n });\n\n return (\n <Dialog {...props}>\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={moveMuration.mutate}\n >\n <div\n ref={setNodeRef}\n className=\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\"\n >\n <SortableContext items={images.map((image) => image.id)} strategy={rectSortingStrategy}>\n {images.map((node, index) => (\n <ImageGridItem key={node.id} node={node} index={index} setCurrent={setCurrent} />\n ))}\n\n {!disabled && (\n <label\n htmlFor=\"file-upload\"\n className=\"border-muted-foreground bg-muted hover:border-primary relative flex aspect-square w-full cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed\"\n >\n <UploadIcon className=\"h-8 w-8\" />\n <Input\n id=\"file-upload\"\n type=\"file\"\n accept=\"image/jpeg, image/png, image/webp, image/gif\"\n className=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n multiple\n onChange={(e) => {\n if (!e.target.files) return;\n return Array.from(e.target.files).map(uploadZone.onUpload);\n }}\n />\n </label>\n )}\n </SortableContext>\n </div>\n </DndContext>\n\n <Carousel className=\"w-full\" opts={{ startIndex: current }}>\n <DialogContent className=\"border-none bg-transparent p-0 shadow-none md:max-w-[80vw] xl:max-w-[60vw]\">\n <CarouselContent className=\"md:max-h-[80vh]\">\n {images.map(({ id, url }) => (\n <CarouselItem key={id} className=\"overflow-hidden rounded-xl\">\n <Image\n src={url}\n alt=\"Image Preview\"\n width={1920}\n height={1080}\n className=\"h-full w-full rounded-xl object-contain\"\n loader={imageLoader}\n />\n </CarouselItem>\n ))}\n </CarouselContent>\n <CarouselPrevious />\n <CarouselNext />\n </DialogContent>\n </Carousel>\n </Dialog>\n );\n}\n\n/**\n * Image Grid Item\n */\ntype ImageGridItemProps = {\n node: FileNode & { url: string };\n index: number;\n setCurrent: React.Dispatch<React.SetStateAction<number>>;\n};\n\nfunction ImageGridItem({ node, index, setCurrent }: ImageGridItemProps) {\n const uploadZone = useUploadZone();\n\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: node.id });\n\n return (\n <Card\n id={node.id}\n ref={setNodeRef}\n style={{\n transform: CSS.Transform.toString(transform),\n transition,\n }}\n className={cn(\"group relative aspect-square w-full\", node.isPending && \"opacity-30\")}\n >\n {!node.isPending ? (\n <>\n <DialogTrigger onClick={() => setCurrent(index)}>\n <Image\n src={node.url}\n alt=\"Image Preview\"\n width={100}\n height={100}\n className=\"bg-muted absolute inset-0 h-full w-full cursor-pointer rounded-lg object-contain\"\n loader={imageLoader}\n />\n </DialogTrigger>\n\n <Button\n {...attributes}\n {...listeners}\n type=\"button\"\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-2 top-2 hidden p-1 group-hover:flex\"\n >\n <GripIcon className=\"size-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon\"\n onClick={() => uploadZone.onRemove([node.id])}\n className=\"absolute left-2 top-2 hidden p-1 group-hover:flex\"\n >\n <Icons.trash className=\"size-4\" />\n </Button>\n </>\n ) : (\n <Skeleton className=\"absolute inset-0 h-full w-full rounded-lg\" />\n )}\n </Card>\n );\n}\n\nexport function ImageGridSkeleton(props: ComponentProps<\"div\">) {\n return (\n <div\n {...props}\n className={cn(\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\", props.className)}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <Skeleton key={index} className=\"aspect-square w-full rounded-lg\" />\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqDA,SAAgB,UAAU,EAAE,OAAO,YAAY,YAAY,UAAU,GAAG,SAAyB;CAC/F,MAAM,aAAa,eAAe;CAElC,MAAM,SAAS,MAAM,SAAS,UAAU;EAAE,GAAG;EAAM,KAAK,WAAW,KAAK,GAAG;EAAE,EAAE;CAE/E,MAAM,CAAC,SAAS,cAAc,MAAM,SAAiB,EAAE;CAEvD,MAAM,EAAE,eAAe,aAAa,EAAE,IAAI,cAAc,CAAC;CACzD,MAAM,UAAU,WACd,UAAU,cAAc,EACxB,UAAU,gBAAgB,EACxB,kBAAkB,6BACnB,CAAC,CACH;CAED,MAAM,eAAe,UAAU;EAC7B,YAAY,OAAO,EAAE,QAAQ,WAAyB;AACpD,OAAI,CAAC,WAAY,QAAO,QAAQ,SAAS;GAEzC,MAAM,WAAW,OAAO;GACxB,MAAM,SAAS,MAAM;AACrB,OAAI,CAAC,YAAY,CAAC,UAAU,aAAa,OAAQ,QAAO,QAAQ,SAAS;GAEzE,MAAM,YAAY,OAAO,WAAW,UAAU,MAAM,OAAO,SAAS;GACpE,MAAM,UAAU,OAAO,WAAW,UAAU,MAAM,OAAO,OAAO;AAEhE,SAAM,YAAY,OAAO;IAAE;IAAW;IAAS,CAAC;AAChD,SAAM,WAAW;IAAE;IAAW;IAAS,CAAC;;EAE1C,WAAW,YAAY;AACrB,cAAW,EAAE;AACb,SAAM,WAAW,YAAY,cAAc;;EAE7C,UAAU,UAAU;AAClB,WAAQ,MAAM,uBAAuB,MAAM;;EAE9C,CAAC;AAEF,QACE,qBAAC;EAAO,GAAI;aACV,oBAAC;GACU;GACT,oBAAoB;GACpB,WAAW,aAAa;aAExB,oBAAC;IACC,KAAK;IACL,WAAU;cAEV,qBAAC;KAAgB,OAAO,OAAO,KAAK,UAAU,MAAM,GAAG;KAAE,UAAU;gBAChE,OAAO,KAAK,MAAM,UACjB,oBAAC;MAAkC;MAAa;MAAmB;QAA/C,KAAK,GAAwD,CACjF,EAED,CAAC,YACA,qBAAC;MACC,SAAQ;MACR,WAAU;iBAEV,oBAAC,cAAW,WAAU,YAAY,EAClC,oBAAC;OACC,IAAG;OACH,MAAK;OACL,QAAO;OACP,WAAU;OACV;OACA,WAAW,MAAM;AACf,YAAI,CAAC,EAAE,OAAO,MAAO;AACrB,eAAO,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC,IAAI,WAAW,SAAS;;QAE5D;OACI;MAEM;KACd;IACK,EAEb,oBAAC;GAAS,WAAU;GAAS,MAAM,EAAE,YAAY,SAAS;aACxD,qBAAC;IAAc,WAAU;;KACvB,oBAAC;MAAgB,WAAU;gBACxB,OAAO,KAAK,EAAE,IAAI,UACjB,oBAAC;OAAsB,WAAU;iBAC/B,oBAACA;QACC,KAAK;QACL,KAAI;QACJ,OAAO;QACP,QAAQ;QACR,WAAU;QACV,QAAQ;SACR;SARe,GASJ,CACf;OACc;KAClB,oBAAC,qBAAmB;KACpB,oBAAC,iBAAe;;KACF;IACP;GACJ;;AAab,SAAS,cAAc,EAAE,MAAM,OAAO,cAAkC;CACtE,MAAM,aAAa,eAAe;CAElC,MAAM,EAAE,YAAY,WAAW,YAAY,WAAW,eAAe,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;AAEjG,QACE,oBAAC;EACC,IAAI,KAAK;EACT,KAAK;EACL,OAAO;GACL,WAAW,IAAI,UAAU,SAAS,UAAU;GAC5C;GACD;EACD,WAAW,GAAG,uCAAuC,KAAK,aAAa,aAAa;YAEnF,CAAC,KAAK,YACL;GACE,oBAAC;IAAc,eAAe,WAAW,MAAM;cAC7C,oBAACA;KACC,KAAK,KAAK;KACV,KAAI;KACJ,OAAO;KACP,QAAQ;KACR,WAAU;KACV,QAAQ;MACR;KACY;GAEhB,oBAAC;IACC,GAAI;IACJ,GAAI;IACJ,MAAK;IACL,SAAQ;IACR,MAAK;IACL,WAAU;cAEV,oBAAC,YAAS,WAAU,WAAW;KACxB;GAET,oBAAC;IACC,MAAK;IACL,SAAQ;IACR,MAAK;IACL,eAAe,WAAW,SAAS,CAAC,KAAK,GAAG,CAAC;IAC7C,WAAU;cAEV,oBAAC,MAAM,SAAM,WAAU,WAAW;KAC3B;MACR,GAEH,oBAAC,YAAS,WAAU,8CAA8C;GAE/D;;AAIX,SAAgB,kBAAkB,OAA8B;AAC9D,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,8DAA8D,MAAM,UAAU;YAE3F,MAAM,KAAK,EAAE,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,UAClC,oBAAC,YAAqB,WAAU,qCAAjB,MAAqD,CACpE;GACE"}
@@ -3,7 +3,6 @@ import { UploadClient } from "../lib/create-upload.client.mjs";
3
3
  import React from "react";
4
4
 
5
5
  //#region src/modules/storage/components/upload-zone-context.client.d.ts
6
-
7
6
  /**
8
7
  * Upload Zone Context Value
9
8
  */
@@ -17,6 +16,7 @@ type UploadZoneContextValue = {
17
16
  invalidate?: () => Promise<void> | void;
18
17
  cancel?: () => Promise<void> | void;
19
18
  };
19
+ disabled?: boolean;
20
20
  };
21
21
  /**
22
22
  * Upload Zone Context
@@ -1 +1 @@
1
- {"version":3,"file":"upload-zone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASA;AACgB,KADJ,sBAAA,GACI;EACG,YAAA,EADH,YACG;EAAiB,QAAA,EAAA,CAAA,IAAA,EAAjB,IAAiB,EAAA,GAAR,OAAQ,CAAA,IAAA,CAAA;EAAR,QAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,EAAA,GACG,OADH,CAAA,IAAA,CAAA;EACG,UAAA,CAAA,EAAA;IAEV,GAAA,CAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,GAAa,OAAb,CAAA,IAAA,CAAA,GAAA,IAAA;IAAa,MAAA,CAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAA,EAAA,GACF,OADE,CAAA,IAAA,CAAA,GAAA,IAAA;IACF,UAAA,CAAA,EAAA,GAAA,GACT,OADS,CAAA,IAAA,CAAA,GAAA,IAAA;IACT,MAAA,CAAA,EAAA,GAAA,GACJ,OADI,CAAA,IAAA,CAAA,GAAA,IAAA;EACJ,CAAA;CAAO;AAS1B;AAKA;;cALa,mBAAiB,KAAA,CAAA,QAAA;;;;iBAKd,aAAA,CAAA,GAAa"}
1
+ {"version":3,"file":"upload-zone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"mappings":";;;;;;;AASA;KAAY,sBAAA;EACV,YAAA,EAAc,YAAA;EACd,QAAA,GAAW,IAAA,EAAM,IAAA,KAAS,OAAA,CAAQ,IAAA;EAClC,QAAA,GAAW,GAAA,eAAkB,OAAA;EAC7B,UAAA;IACE,GAAA,IAAO,QAAA,EAAU,QAAA,KAAa,OAAA;IAC9B,MAAA,IAAU,GAAA,eAAkB,OAAA;IAC5B,UAAA,SAAmB,OAAA;IACnB,MAAA,SAAe,OAAA;EAAA;EAEjB,QAAA;AAAA;;;;cAQW,iBAAA,EAAiB,KAAA,CAAA,OAAA,CAAA,sBAAA;;;;iBAKd,aAAA,CAAA,GAAa,sBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"upload-zone-context.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { UploadClient } from \"../lib/create-upload.client\";\nimport { FileNode, Node } from \"../lib/validators\";\n\n/**\n * Upload Zone Context Value\n */\nexport type UploadZoneContextValue = {\n uploadClient: UploadClient;\n onUpload: (file: File) => Promise<Node>;\n onRemove: (ids: string[]) => Promise<void>;\n optimistic?: {\n add?: (newValue: FileNode) => Promise<void> | void;\n remove?: (ids: string[]) => Promise<void> | void;\n invalidate?: () => Promise<void> | void;\n cancel?: () => Promise<void> | void;\n };\n // updateData: (newValue: FileNode[] | ((oldValue: FileNode[]) => FileNode[])) => Promise<void>;\n // invalidateQuery: () => Promise<void> | void;\n};\n\n/**\n * Upload Zone Context\n */\nexport const UploadZoneContext = React.createContext({} as UploadZoneContextValue);\n\n/**\n * Upload Zone Hook\n */\nexport function useUploadZone() {\n const context = React.useContext(UploadZoneContext);\n if (!context) {\n throw new Error(\"useUploadZone must be used within an UploadZoneProvider\");\n }\n return context;\n}\n"],"mappings":";;;;;;;;AA0BA,MAAa,oBAAoB,MAAM,cAAc,EAAE,CAA2B;;;;AAKlF,SAAgB,gBAAgB;CAC9B,MAAM,UAAU,MAAM,WAAW,kBAAkB;AACnD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO"}
1
+ {"version":3,"file":"upload-zone-context.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport type { UploadClient } from \"../lib/create-upload.client\";\nimport type { FileNode, Node } from \"../lib/validators\";\n\n/**\n * Upload Zone Context Value\n */\nexport type UploadZoneContextValue = {\n uploadClient: UploadClient;\n onUpload: (file: File) => Promise<Node>;\n onRemove: (ids: string[]) => Promise<void>;\n optimistic?: {\n add?: (newValue: FileNode) => Promise<void> | void;\n remove?: (ids: string[]) => Promise<void> | void;\n invalidate?: () => Promise<void> | void;\n cancel?: () => Promise<void> | void;\n };\n disabled?: boolean;\n // updateData: (newValue: FileNode[] | ((oldValue: FileNode[]) => FileNode[])) => Promise<void>;\n // invalidateQuery: () => Promise<void> | void;\n};\n\n/**\n * Upload Zone Context\n */\nexport const UploadZoneContext = React.createContext({} as UploadZoneContextValue);\n\n/**\n * Upload Zone Hook\n */\nexport function useUploadZone() {\n const context = React.useContext(UploadZoneContext);\n if (!context) {\n throw new Error(\"useUploadZone must be used within an UploadZoneProvider\");\n }\n return context;\n}\n"],"mappings":";;;;;;;;AA2BA,MAAa,oBAAoB,MAAM,cAAc,EAAE,CAA2B;;;;AAKlF,SAAgB,gBAAgB;CAC9B,MAAM,UAAU,MAAM,WAAW,kBAAkB;AACnD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO"}
@@ -1,11 +1,11 @@
1
1
  import { Node, UploadFileSchema } from "../lib/validators.mjs";
2
2
  import { UploadHooks } from "../lib/create-upload.client.mjs";
3
3
  import { UploadZoneContextValue } from "./upload-zone-context.client.mjs";
4
- import * as react_jsx_runtime5 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import { ComponentProps } from "react";
6
6
 
7
7
  //#region src/modules/storage/components/upload-zone.client.d.ts
8
- type UploadZoneProps = ComponentProps<"div"> & Pick<UploadZoneContextValue, "optimistic" | "uploadClient"> & {
8
+ type UploadZoneProps = ComponentProps<"div"> & Pick<UploadZoneContextValue, "optimistic" | "uploadClient" | "disabled"> & {
9
9
  variables: Pick<UploadFileSchema, "namespace" | "parentId" | "mode" | "hidden" | "readonly">;
10
10
  uploadHooks?: UploadHooks;
11
11
  onUploadCompleted?: (node: Node) => Promise<void> | void;
@@ -18,10 +18,11 @@ declare function UploadZone({
18
18
  uploadHooks,
19
19
  onUploadCompleted,
20
20
  onUploadFailed,
21
+ disabled,
21
22
  children,
22
23
  className,
23
24
  ...props
24
- }: UploadZoneProps): react_jsx_runtime5.JSX.Element;
25
+ }: UploadZoneProps): react_jsx_runtime0.JSX.Element;
25
26
  //#endregion
26
27
  export { UploadZone, UploadZoneProps };
27
28
  //# sourceMappingURL=upload-zone.client.d.mts.map