@tulip-systems/core 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/dist/auth/client.d.ts +3 -1
  2. package/dist/auth/client.js +4 -2
  3. package/dist/auth.d.ts +2 -1
  4. package/dist/auth.js +3 -2
  5. package/dist/commands/client.d.ts +4 -4
  6. package/dist/commands/client.js +4 -4
  7. package/dist/components/client.d.ts +5 -3
  8. package/dist/components/client.js +6 -4
  9. package/dist/components/common/icons.d.ts +51 -48
  10. package/dist/components/common/icons.d.ts.map +1 -1
  11. package/dist/components/common/icons.js +4 -1
  12. package/dist/components/common/icons.js.map +1 -1
  13. package/dist/components/common/status.d.ts +3 -3
  14. package/dist/components/common/status.d.ts.map +1 -1
  15. package/dist/components/editor/components/content.client.d.ts +2 -2
  16. package/dist/components/editor/components/content.client.d.ts.map +1 -1
  17. package/dist/components/editor/components/fixed-menu.client.d.ts +2 -2
  18. package/dist/components/editor/components/fixed-menu.client.d.ts.map +1 -1
  19. package/dist/components/editor/context.client.d.ts +4 -4
  20. package/dist/components/editor/context.client.d.ts.map +1 -1
  21. package/dist/components/editor/index.client.d.ts +2 -2
  22. package/dist/components/editor/index.client.d.ts.map +1 -1
  23. package/dist/components/editor/preview.client.d.ts +2 -2
  24. package/dist/components/editor/preview.client.d.ts.map +1 -1
  25. package/dist/components/header/back-button.client.d.ts +2 -2
  26. package/dist/components/header/back-button.client.d.ts.map +1 -1
  27. package/dist/components/header/bottom-bar.client.d.ts +5 -5
  28. package/dist/components/header/bottom-bar.client.d.ts.map +1 -1
  29. package/dist/components/header/bottom-bar.client.js.map +1 -1
  30. package/dist/components/header/breadcrumbs.client.d.ts +7 -7
  31. package/dist/components/header/breadcrumbs.client.d.ts.map +1 -1
  32. package/dist/components/header/breadcrumbs.client.js +1 -1
  33. package/dist/components/header/header.client.d.ts +2 -2
  34. package/dist/components/header/header.client.d.ts.map +1 -1
  35. package/dist/components/header/mobile-nav-switcher.client.d.ts +2 -2
  36. package/dist/components/header/mobile-nav-switcher.client.d.ts.map +1 -1
  37. package/dist/components/header/top-bar.client.d.ts +4 -4
  38. package/dist/components/header/top-bar.client.d.ts.map +1 -1
  39. package/dist/components/layouts/admin-content.client.d.ts +13 -0
  40. package/dist/components/layouts/admin-content.client.d.ts.map +1 -0
  41. package/dist/components/layouts/admin-layout.d.ts +8 -0
  42. package/dist/components/layouts/admin-layout.d.ts.map +1 -0
  43. package/dist/components/layouts/admin-layout.js +15 -0
  44. package/dist/components/layouts/admin-layout.js.map +1 -0
  45. package/dist/components/layouts/admin-loading.d.ts +3 -3
  46. package/dist/components/layouts/admin-loading.d.ts.map +1 -1
  47. package/dist/components/layouts/admin-loading.js +2 -2
  48. package/dist/components/layouts/admin-loading.js.map +1 -1
  49. package/dist/components/layouts/empty-page.d.ts +4 -4
  50. package/dist/components/layouts/empty-page.d.ts.map +1 -1
  51. package/dist/components/layouts/list-layout.d.ts +2 -2
  52. package/dist/components/layouts/list-layout.d.ts.map +1 -1
  53. package/dist/components/layouts/not-found-page.d.ts +2 -2
  54. package/dist/components/layouts/not-found-page.d.ts.map +1 -1
  55. package/dist/components/layouts/providers.client.d.ts +2 -2
  56. package/dist/components/layouts/providers.client.d.ts.map +1 -1
  57. package/dist/components/layouts/root-layout.server.d.ts +2 -2
  58. package/dist/components/layouts/root-layout.server.d.ts.map +1 -1
  59. package/dist/components/layouts/root-loading.d.ts +7 -0
  60. package/dist/components/layouts/root-loading.d.ts.map +1 -0
  61. package/dist/components/layouts/root-loading.js +14 -0
  62. package/dist/components/layouts/root-loading.js.map +1 -0
  63. package/dist/components/layouts/tab-layout.d.ts +2 -2
  64. package/dist/components/layouts/tab-layout.d.ts.map +1 -1
  65. package/dist/components/lists/data-list.d.ts +5 -5
  66. package/dist/components/lists/data-list.d.ts.map +1 -1
  67. package/dist/components/lists/data-stack.d.ts +8 -8
  68. package/dist/components/lists/data-stack.d.ts.map +1 -1
  69. package/dist/components/{layouts → navigation}/admin-sidebar-header.client.js +8 -9
  70. package/dist/components/navigation/admin-sidebar-header.client.js.map +1 -0
  71. package/dist/components/navigation/admin-sidebar-paths.client.d.ts +81 -0
  72. package/dist/components/navigation/admin-sidebar-paths.client.d.ts.map +1 -0
  73. package/dist/components/navigation/admin-sidebar-paths.client.js +143 -0
  74. package/dist/components/navigation/admin-sidebar-paths.client.js.map +1 -0
  75. package/dist/components/navigation/admin-sidebar-skeleton.js +31 -0
  76. package/dist/components/navigation/admin-sidebar-skeleton.js.map +1 -0
  77. package/dist/components/server.d.ts +1 -1
  78. package/dist/components/server.js +1 -1
  79. package/dist/components/ui/accordion.d.ts +5 -5
  80. package/dist/components/ui/accordion.d.ts.map +1 -1
  81. package/dist/components/ui/alert-dialog.d.ts +12 -12
  82. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  83. package/dist/components/ui/alert.d.ts +6 -6
  84. package/dist/components/ui/alert.d.ts.map +1 -1
  85. package/dist/components/ui/aspect-ratio.d.ts +2 -2
  86. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  87. package/dist/components/ui/avatar.client.d.ts +4 -4
  88. package/dist/components/ui/avatar.client.d.ts.map +1 -1
  89. package/dist/components/ui/badge.d.ts +4 -4
  90. package/dist/components/ui/badge.d.ts.map +1 -1
  91. package/dist/components/ui/breadcrumb.d.ts +8 -8
  92. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  93. package/dist/components/ui/button.d.ts +5 -5
  94. package/dist/components/ui/button.d.ts.map +1 -1
  95. package/dist/components/ui/calendar.d.ts +2 -2
  96. package/dist/components/ui/calendar.d.ts.map +1 -1
  97. package/dist/components/ui/card.d.ts +7 -7
  98. package/dist/components/ui/card.d.ts.map +1 -1
  99. package/dist/components/ui/carousel.d.ts +6 -6
  100. package/dist/components/ui/carousel.d.ts.map +1 -1
  101. package/dist/components/ui/chart.client.d.ts +5 -5
  102. package/dist/components/ui/chart.client.d.ts.map +1 -1
  103. package/dist/components/ui/checkbox.d.ts +2 -2
  104. package/dist/components/ui/checkbox.d.ts.map +1 -1
  105. package/dist/components/ui/collapsible.client.d.ts +4 -4
  106. package/dist/components/ui/collapsible.client.d.ts.map +1 -1
  107. package/dist/components/ui/color-picker.client.d.ts +2 -2
  108. package/dist/components/ui/color-picker.client.d.ts.map +1 -1
  109. package/dist/components/ui/combobox-dropdown.client.d.ts +2 -2
  110. package/dist/components/ui/combobox-dropdown.client.d.ts.map +1 -1
  111. package/dist/components/ui/combobox.client.d.ts +2 -2
  112. package/dist/components/ui/combobox.client.d.ts.map +1 -1
  113. package/dist/components/ui/command.d.ts +10 -10
  114. package/dist/components/ui/command.d.ts.map +1 -1
  115. package/dist/components/ui/context-menu.d.ts +16 -16
  116. package/dist/components/ui/dialog.client.d.ts +11 -11
  117. package/dist/components/ui/dialog.client.d.ts.map +1 -1
  118. package/dist/components/ui/drawer.client.d.ts +11 -11
  119. package/dist/components/ui/drawer.client.d.ts.map +1 -1
  120. package/dist/components/ui/dropdown-menu.d.ts +16 -16
  121. package/dist/components/ui/form.client.d.ts +8 -8
  122. package/dist/components/ui/form.client.d.ts.map +1 -1
  123. package/dist/components/ui/hover-card.client.d.ts +4 -4
  124. package/dist/components/ui/hover-card.client.d.ts.map +1 -1
  125. package/dist/components/ui/input.d.ts +2 -2
  126. package/dist/components/ui/label.d.ts +2 -2
  127. package/dist/components/ui/navigation-menu.d.ts +11 -11
  128. package/dist/components/ui/pagination.d.ts +8 -8
  129. package/dist/components/ui/pagination.d.ts.map +1 -1
  130. package/dist/components/ui/popover.d.ts +5 -5
  131. package/dist/components/ui/progress.client.d.ts +2 -2
  132. package/dist/components/ui/progress.client.d.ts.map +1 -1
  133. package/dist/components/ui/radio-group.d.ts +3 -3
  134. package/dist/components/ui/resizable.client.d.ts +4 -4
  135. package/dist/components/ui/resizable.client.d.ts.map +1 -1
  136. package/dist/components/ui/scroll-area.d.ts +3 -3
  137. package/dist/components/ui/select.client.d.ts +11 -11
  138. package/dist/components/ui/select.client.d.ts.map +1 -1
  139. package/dist/components/ui/separator.d.ts +2 -2
  140. package/dist/components/ui/sheet.client.d.ts +9 -9
  141. package/dist/components/ui/sidebar.client.d.ts +26 -26
  142. package/dist/components/ui/sidebar.client.js +1 -1
  143. package/dist/components/ui/skeleton.d.ts +2 -2
  144. package/dist/components/ui/slider.d.ts +2 -2
  145. package/dist/components/ui/sonner.client.d.ts +2 -2
  146. package/dist/components/ui/sonner.client.js +1 -1
  147. package/dist/components/ui/spinner.js +63 -0
  148. package/dist/components/ui/spinner.js.map +1 -0
  149. package/dist/components/ui/switch.d.ts +2 -2
  150. package/dist/components/ui/tabs.d.ts +5 -5
  151. package/dist/components/ui/textarea.d.ts +2 -2
  152. package/dist/components/ui/time-input.client.d.ts +2 -2
  153. package/dist/components/ui/toggle-group.client.d.ts +3 -3
  154. package/dist/components/ui/toggle.d.ts +2 -2
  155. package/dist/components/ui/tooltip.client.d.ts +5 -5
  156. package/dist/components/ui/tree.client.d.ts +5 -5
  157. package/dist/components/ui/tree.client.d.ts.map +1 -1
  158. package/dist/components.d.ts +5 -4
  159. package/dist/components.js +7 -6
  160. package/dist/config/server.d.ts +2 -3
  161. package/dist/config/server.js +3 -4
  162. package/dist/config.d.ts +3 -2
  163. package/dist/config.js +2 -1
  164. package/dist/lib/client.js +1 -1
  165. package/dist/lib/hooks/use-action.d.ts +2 -2
  166. package/dist/lib/hooks/use-indicator.d.ts +2 -2
  167. package/dist/modules/auth/components/allowed.client.d.ts +2 -2
  168. package/dist/modules/auth/components/allowed.client.js +1 -1
  169. package/dist/modules/auth/components/allowed.client.js.map +1 -1
  170. package/dist/modules/auth/components/allowed.server.d.ts +2 -2
  171. package/dist/modules/auth/components/allowed.server.js +1 -1
  172. package/dist/modules/auth/components/auth-layout.server.d.ts +4 -5
  173. package/dist/modules/auth/components/auth-layout.server.d.ts.map +1 -1
  174. package/dist/modules/auth/components/auth-layout.server.js +1 -4
  175. package/dist/modules/auth/components/auth-layout.server.js.map +1 -1
  176. package/dist/modules/auth/components/auth-loading.d.ts +7 -0
  177. package/dist/modules/auth/components/auth-loading.d.ts.map +1 -0
  178. package/dist/modules/auth/components/auth-loading.js +18 -0
  179. package/dist/modules/auth/components/auth-loading.js.map +1 -0
  180. package/dist/modules/auth/components/forget-password-page.client.d.ts +2 -2
  181. package/dist/modules/auth/components/forget-password-page.client.js +2 -2
  182. package/dist/modules/auth/components/guard.js +16 -0
  183. package/dist/modules/auth/components/guard.js.map +1 -0
  184. package/dist/modules/auth/components/login-page.client.d.ts +2 -6
  185. package/dist/modules/auth/components/login-page.client.d.ts.map +1 -1
  186. package/dist/modules/auth/components/login-page.client.js +7 -6
  187. package/dist/modules/auth/components/login-page.client.js.map +1 -1
  188. package/dist/modules/auth/components/reset-password-page.client.d.ts +2 -2
  189. package/dist/modules/auth/components/reset-password-page.client.js +3 -3
  190. package/dist/modules/auth/components/update-password-command.d.ts +3 -3
  191. package/dist/modules/auth/components/update-password-command.js +1 -1
  192. package/dist/modules/auth/handler/client.client.d.ts +48 -48
  193. package/dist/modules/auth/handler/client.client.d.ts.map +1 -1
  194. package/dist/modules/auth/hooks/use-permission.d.ts +26 -0
  195. package/dist/modules/auth/hooks/use-permission.d.ts.map +1 -0
  196. package/dist/modules/auth/hooks/{use-permission.client.js → use-permission.js} +5 -3
  197. package/dist/modules/auth/hooks/use-permission.js.map +1 -0
  198. package/dist/modules/auth/hooks/use-session.d.ts +34 -0
  199. package/dist/modules/auth/hooks/use-session.d.ts.map +1 -0
  200. package/dist/modules/auth/hooks/use-session.js +21 -0
  201. package/dist/modules/auth/hooks/use-session.js.map +1 -0
  202. package/dist/modules/auth/lib/helpers.server.d.ts +1 -1
  203. package/dist/modules/auth/lib/helpers.server.js +2 -2
  204. package/dist/modules/auth/lib/validators.d.ts +1 -1
  205. package/dist/modules/auth/lib/validators.d.ts.map +1 -1
  206. package/dist/modules/auth/lib/validators.js +1 -1
  207. package/dist/modules/auth/lib/validators.js.map +1 -1
  208. package/dist/modules/commands/components/alert-dialog-command.client.d.ts +11 -11
  209. package/dist/modules/commands/components/alert-dialog-command.client.js +1 -1
  210. package/dist/modules/commands/components/click-command.client.d.ts +2 -2
  211. package/dist/modules/commands/components/command-trigger.client.d.ts +6 -6
  212. package/dist/modules/commands/components/command-trigger.client.d.ts.map +1 -1
  213. package/dist/modules/commands/components/command-trigger.client.js +1 -1
  214. package/dist/modules/commands/components/dialog-command.client.d.ts +8 -8
  215. package/dist/modules/commands/components/dialog-command.client.js +1 -1
  216. package/dist/modules/commands/components/dropdown-command.client.d.ts +5 -5
  217. package/dist/modules/commands/components/empty-command.client.d.ts +2 -2
  218. package/dist/modules/commands/components/form-dialog-command.client.d.ts +12 -12
  219. package/dist/modules/commands/components/form-dialog-command.client.js +1 -1
  220. package/dist/modules/commands/hooks/use-command-action.client.js +1 -1
  221. package/dist/modules/commands/hooks/use-command-menu.client.js +1 -1
  222. package/dist/modules/commands/hooks/use-command-menu.client.js.map +1 -1
  223. package/dist/modules/commands/menus/context-menu.client.d.ts +2 -2
  224. package/dist/modules/commands/menus/dropdown-menu.client.d.ts +8 -4
  225. package/dist/modules/commands/menus/dropdown-menu.client.d.ts.map +1 -1
  226. package/dist/modules/commands/menus/dropdown-menu.client.js +9 -1
  227. package/dist/modules/commands/menus/dropdown-menu.client.js.map +1 -1
  228. package/dist/modules/commands/menus/inline-menu.client.d.ts +8 -4
  229. package/dist/modules/commands/menus/inline-menu.client.d.ts.map +1 -1
  230. package/dist/modules/commands/menus/inline-menu.client.js +12 -1
  231. package/dist/modules/commands/menus/inline-menu.client.js.map +1 -1
  232. package/dist/modules/commands/menus/responsive-menu.client.d.ts +4 -3
  233. package/dist/modules/commands/menus/responsive-menu.client.d.ts.map +1 -1
  234. package/dist/modules/commands/menus/responsive-menu.client.js +6 -3
  235. package/dist/modules/commands/menus/responsive-menu.client.js.map +1 -1
  236. package/dist/modules/commands/utils/archive-command.client.d.ts +3 -3
  237. package/dist/modules/commands/utils/delete-command.client.d.ts +2 -2
  238. package/dist/modules/commands/utils/send-mail-command.client.d.ts +2 -2
  239. package/dist/modules/commands/utils/send-mail-command.client.d.ts.map +1 -1
  240. package/dist/modules/commands/utils/send-mail-command.client.js +3 -3
  241. package/dist/modules/config/db/helpers.d.ts +5 -5
  242. package/dist/modules/config/db/helpers.d.ts.map +1 -1
  243. package/dist/modules/config/lib/config.server.d.ts +0 -2
  244. package/dist/modules/config/lib/config.server.d.ts.map +1 -1
  245. package/dist/modules/config/lib/config.server.js.map +1 -1
  246. package/dist/modules/config/lib/resolve.server.d.ts +189 -190
  247. package/dist/modules/config/lib/resolve.server.d.ts.map +1 -1
  248. package/dist/modules/config/paths/helpers.d.ts +11 -0
  249. package/dist/modules/config/paths/helpers.d.ts.map +1 -0
  250. package/dist/modules/config/paths/helpers.js +9 -0
  251. package/dist/modules/config/paths/helpers.js.map +1 -0
  252. package/dist/modules/config/paths/types.d.ts +8 -37
  253. package/dist/modules/config/paths/types.d.ts.map +1 -1
  254. package/dist/modules/config/router/client.server.d.ts +4 -4
  255. package/dist/modules/config/router/client.server.d.ts.map +1 -1
  256. package/dist/modules/config/router/context.server.d.ts +191 -192
  257. package/dist/modules/config/router/context.server.d.ts.map +1 -1
  258. package/dist/modules/config/router/init.server.d.ts +196 -197
  259. package/dist/modules/config/router/init.server.d.ts.map +1 -1
  260. package/dist/modules/data-tables/components/cell/common.client.d.ts +5 -5
  261. package/dist/modules/data-tables/components/cell/common.client.d.ts.map +1 -1
  262. package/dist/modules/data-tables/components/column-header.d.ts +2 -2
  263. package/dist/modules/data-tables/components/filters/combobox.client.d.ts +2 -2
  264. package/dist/modules/data-tables/components/filters/combobox.client.d.ts.map +1 -1
  265. package/dist/modules/data-tables/components/filters/combobox.client.js +1 -1
  266. package/dist/modules/data-tables/components/filters/combobox.client.js.map +1 -1
  267. package/dist/modules/data-tables/components/filters/slider.client.d.ts +2 -2
  268. package/dist/modules/data-tables/components/filters/slider.client.d.ts.map +1 -1
  269. package/dist/modules/data-tables/components/header.d.ts +4 -4
  270. package/dist/modules/data-tables/components/layout.d.ts +2 -2
  271. package/dist/modules/data-tables/components/search-input.client.d.ts +2 -2
  272. package/dist/modules/data-tables/components/search-input.client.d.ts.map +1 -1
  273. package/dist/modules/data-tables/components/skeleton.d.ts +2 -2
  274. package/dist/modules/data-tables/components/table.d.ts +7 -7
  275. package/dist/modules/data-tables/components/toolbar.d.ts +3 -3
  276. package/dist/modules/data-tables/hooks/use-context.client.d.ts +2 -2
  277. package/dist/modules/data-tables/hooks/use-context.client.d.ts.map +1 -1
  278. package/dist/modules/data-tables/lib/filters/resolvers.d.ts +1 -1
  279. package/dist/modules/data-tables/lib/filters/resolvers.d.ts.map +1 -1
  280. package/dist/modules/data-tables/lib/search-params.d.ts +5 -5
  281. package/dist/modules/data-tables/lib/search-params.d.ts.map +1 -1
  282. package/dist/modules/data-tables/lib/types.d.ts +1 -1
  283. package/dist/modules/data-tables/tables/data-table/components/table.d.ts +2 -2
  284. package/dist/modules/data-tables/tables/data-table/components/table.d.ts.map +1 -1
  285. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts +2 -2
  286. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts.map +1 -1
  287. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts +2 -2
  288. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts.map +1 -1
  289. package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts +2 -2
  290. package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts.map +1 -1
  291. package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts +3 -3
  292. package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts.map +1 -1
  293. package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts +2 -2
  294. package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts.map +1 -1
  295. package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.ts +2 -2
  296. package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.ts.map +1 -1
  297. package/dist/modules/data-tables/tables/inline-table/components/table.d.ts +2 -2
  298. package/dist/modules/data-tables/tables/inline-table/components/table.d.ts.map +1 -1
  299. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.ts +2 -2
  300. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.ts.map +1 -1
  301. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.js +1 -1
  302. package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js +1 -1
  303. package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js.map +1 -1
  304. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts +2 -2
  305. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts.map +1 -1
  306. package/dist/modules/inline-edit/components/combobox.client.d.ts +2 -2
  307. package/dist/modules/inline-edit/components/combobox.client.d.ts.map +1 -1
  308. package/dist/modules/inline-edit/components/date-input.client.d.ts +2 -2
  309. package/dist/modules/inline-edit/components/date-input.client.d.ts.map +1 -1
  310. package/dist/modules/inline-edit/components/date-input.client.js +1 -1
  311. package/dist/modules/inline-edit/components/date-picker.client.d.ts +2 -2
  312. package/dist/modules/inline-edit/components/date-picker.client.d.ts.map +1 -1
  313. package/dist/modules/inline-edit/components/editor.client.d.ts +2 -2
  314. package/dist/modules/inline-edit/components/editor.client.d.ts.map +1 -1
  315. package/dist/modules/inline-edit/components/input-toggle.client.d.ts +2 -2
  316. package/dist/modules/inline-edit/components/input-toggle.client.d.ts.map +1 -1
  317. package/dist/modules/inline-edit/components/input.client.d.ts +3 -3
  318. package/dist/modules/inline-edit/components/input.client.d.ts.map +1 -1
  319. package/dist/modules/inline-edit/components/richtext.client.d.ts +2 -2
  320. package/dist/modules/inline-edit/components/richtext.client.d.ts.map +1 -1
  321. package/dist/modules/inline-edit/components/select.client.d.ts +6 -6
  322. package/dist/modules/inline-edit/components/select.client.d.ts.map +1 -1
  323. package/dist/modules/inline-edit/components/switch.client.d.ts +2 -2
  324. package/dist/modules/inline-edit/components/switch.client.d.ts.map +1 -1
  325. package/dist/modules/inline-edit/components/toggle.client.d.ts +2 -2
  326. package/dist/modules/inline-edit/components/toggle.client.d.ts.map +1 -1
  327. package/dist/modules/inline-edit/hooks/context.client.d.ts +2 -2
  328. package/dist/modules/inline-edit/hooks/context.client.d.ts.map +1 -1
  329. package/dist/modules/inline-edit/hooks/use-inline.client.js +1 -1
  330. package/dist/modules/inline-edit/hooks/use-inline.client.js.map +1 -1
  331. package/dist/modules/uploads/components/button.client.d.ts +2 -2
  332. package/dist/modules/uploads/components/button.client.d.ts.map +1 -1
  333. package/dist/modules/uploads/components/images/grid.client.d.ts +2 -2
  334. package/dist/modules/uploads/components/images/grid.client.d.ts.map +1 -1
  335. package/dist/modules/uploads/components/images/grid.client.js +1 -1
  336. package/dist/modules/uploads/components/images/input.client.d.ts +2 -2
  337. package/dist/modules/uploads/components/preview-dialog.client.d.ts +2 -2
  338. package/dist/modules/uploads/components/zone.client.d.ts +2 -2
  339. package/dist/modules/uploads/hooks/use-upload-image.client.js +1 -1
  340. package/dist/modules/uploads/lib/proxy.server.d.ts +1 -1
  341. package/dist/modules/uploads/lib/proxy.server.js +3 -3
  342. package/dist/modules/uploads/lib/route.server.d.ts +1 -1
  343. package/dist/modules/uploads/lib/route.server.js +1 -1
  344. package/dist/modules/uploads/lib/router.server.d.ts +933 -933
  345. package/dist/modules/uploads/lib/router.server.js +1 -1
  346. package/dist/modules/uploads/lib/schema.d.ts +61 -61
  347. package/dist/modules/uploads/lib/validators.d.ts +51 -51
  348. package/package.json +4 -4
  349. package/src/components/common/icons.tsx +6 -0
  350. package/src/components/entry.client.ts +6 -0
  351. package/src/components/entry.server.ts +1 -1
  352. package/src/components/entry.ts +1 -0
  353. package/src/components/header/bottom-bar.client.tsx +2 -2
  354. package/src/components/layouts/admin-layout.tsx +13 -0
  355. package/src/components/layouts/admin-loading.tsx +1 -1
  356. package/src/components/layouts/root-loading.tsx +9 -0
  357. package/src/components/{layouts → navigation}/admin-sidebar-header.client.tsx +11 -6
  358. package/src/components/navigation/admin-sidebar-paths.client.tsx +190 -0
  359. package/src/components/navigation/admin-sidebar-skeleton.tsx +44 -0
  360. package/src/components/navigation/admin-sidebar.client.tsx +123 -0
  361. package/src/components/ui/spinner.tsx +51 -0
  362. package/src/modules/auth/components/allowed.client.tsx +1 -1
  363. package/src/modules/auth/components/auth-layout.server.tsx +2 -10
  364. package/src/modules/auth/components/auth-loading.tsx +11 -0
  365. package/src/modules/auth/components/guard.tsx +12 -0
  366. package/src/modules/auth/components/login-page.client.tsx +4 -3
  367. package/src/modules/auth/entry.client.ts +2 -0
  368. package/src/modules/auth/entry.ts +1 -0
  369. package/src/modules/auth/hooks/{use-permission.client.ts → use-permission.ts} +4 -2
  370. package/src/modules/auth/hooks/use-session.ts +18 -0
  371. package/src/modules/auth/lib/validators.ts +1 -1
  372. package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -7
  373. package/src/modules/commands/menus/dropdown-menu.client.tsx +11 -2
  374. package/src/modules/commands/menus/inline-menu.client.tsx +14 -1
  375. package/src/modules/commands/menus/responsive-menu.client.tsx +11 -2
  376. package/src/modules/config/entry.server.ts +1 -2
  377. package/src/modules/config/entry.ts +3 -0
  378. package/src/modules/config/lib/config.server.ts +1 -2
  379. package/src/modules/config/lib/router.server.ts +64 -0
  380. package/src/modules/config/paths/helpers.ts +6 -0
  381. package/src/modules/config/paths/types.ts +26 -38
  382. package/src/modules/data-tables/components/filters/combobox.client.tsx +1 -1
  383. package/src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts +1 -1
  384. package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
  385. package/dist/components/layouts/admin-layout.server.d.ts +0 -14
  386. package/dist/components/layouts/admin-layout.server.d.ts.map +0 -1
  387. package/dist/components/layouts/admin-layout.server.js +0 -26
  388. package/dist/components/layouts/admin-layout.server.js.map +0 -1
  389. package/dist/components/layouts/admin-sidebar-context.client.js +0 -28
  390. package/dist/components/layouts/admin-sidebar-context.client.js.map +0 -1
  391. package/dist/components/layouts/admin-sidebar-header.client.js.map +0 -1
  392. package/dist/components/layouts/admin-sidebar.client.js +0 -51
  393. package/dist/components/layouts/admin-sidebar.client.js.map +0 -1
  394. package/dist/modules/auth/hooks/use-permission.client.js.map +0 -1
  395. package/dist/modules/config/paths/create.server.d.ts +0 -14
  396. package/dist/modules/config/paths/create.server.d.ts.map +0 -1
  397. package/dist/modules/config/paths/create.server.js +0 -12
  398. package/dist/modules/config/paths/create.server.js.map +0 -1
  399. package/dist/modules/config/paths/get.server.js +0 -47
  400. package/dist/modules/config/paths/get.server.js.map +0 -1
  401. package/src/components/layouts/admin-layout.server.tsx +0 -31
  402. package/src/components/layouts/admin-sidebar-context.client.tsx +0 -34
  403. package/src/components/layouts/admin-sidebar.client.tsx +0 -88
  404. package/src/modules/config/paths/create.server.ts +0 -10
  405. package/src/modules/config/paths/get.server.ts +0 -69
@@ -1,6 +1,6 @@
1
1
  import { Table } from "../../../components/table.js";
2
2
  import { InlineTableProvider } from "../hooks/context.client.js";
3
- import * as react_jsx_runtime173 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
4
4
  import { ComponentProps } from "react";
5
5
 
6
6
  //#region src/modules/data-tables/tables/inline-table/components/table.d.ts
@@ -10,7 +10,7 @@ declare function InlineTable<TData extends {
10
10
  disabledColumns,
11
11
  moveRowAction,
12
12
  ...props
13
- }: ComponentProps<typeof Table> & ComponentProps<typeof InlineTableProvider>): react_jsx_runtime173.JSX.Element;
13
+ }: ComponentProps<typeof Table> & ComponentProps<typeof InlineTableProvider>): react_jsx_runtime15.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineTable };
16
16
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/table.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAagB;;;;;;GAIb,sBAAsB,SAAS,sBAAsB,uBAAoB,oBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"table.d.ts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/components/table.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAagB;;;;;;GAIb,sBAAsB,SAAS,sBAAsB,uBAAoB,mBAAA,CAAA,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime174 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
2
2
  import { PropsWithChildren } from "react";
3
3
  import { VisibilityState } from "@tanstack/react-table";
4
4
 
@@ -41,7 +41,7 @@ declare function InlineTableProvider<TData extends {
41
41
  fromIndex: number;
42
42
  toIndex: number;
43
43
  }) => Promise<unknown>;
44
- }>): react_jsx_runtime174.JSX.Element;
44
+ }>): react_jsx_runtime16.JSX.Element;
45
45
  //#endregion
46
46
  export { InlineTableContextValue, InlineTableProvider, useInlineTableContext };
47
47
  //# sourceMappingURL=context.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.client.d.ts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAMiD,KAK5C,aAAA,GAAa;EAaN,WAAA,EAAA,KAAA;EAAuB,OAAA,EAAA,SAAA;;aACf,EAAA,IAAA;EAAe,OAAA,EAAA,CAAA,MAAA,EAAA;IAYnB,SAAA,EAAA,MAAA;IAUA,OAAA,EAAA,MAAA;EAAmB,CAAA,EAAA,GAAA,IAAA;;;;;AAMkC,KA7BzD,uBAAA,GAA0B,aA6B+B,GAAA;iBAFlE,CAAA,EA1BiB,eA0BjB;;;;;iBAda,qBAAA,CAAA,GAAqB;;;;iBAUrB;;;;;;GAIb;oBACiB;;;;QACiD;KACnE,oBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"context.client.d.ts","names":[],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAMiD,KAK5C,aAAA,GAAa;EAaN,WAAA,EAAA,KAAA;EAAuB,OAAA,EAAA,SAAA;;aACf,EAAA,IAAA;EAAe,OAAA,EAAA,CAAA,MAAA,EAAA;IAYnB,SAAA,EAAA,MAAA;IAUA,OAAA,EAAA,MAAA;EAAmB,CAAA,EAAA,GAAA,IAAA;;;;;AAMkC,KA7BzD,uBAAA,GAA0B,aA6B+B,GAAA;iBAFlE,CAAA,EA1BiB,eA0BjB;;;;;iBAda,qBAAA,CAAA,GAAqB;;;;iBAUrB;;;;;;GAIb;oBACiB;;;;QACiD;KACnE,mBAAA,CAAA,GAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { arrayMove } from "../../../../../lib/utils/array-move.js";
5
4
  import { useAction } from "../../../../../lib/hooks/use-action.js";
5
+ import { arrayMove } from "../../../../../lib/utils/array-move.js";
6
6
  import { useTableConfigContext } from "../../../hooks/use-context.client.js";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import React from "react";
@@ -1,5 +1,5 @@
1
- import { usePermission } from "../../../../auth/hooks/use-permission.client.js";
2
1
  import { useAction } from "../../../../../lib/hooks/use-action.js";
2
+ import { usePermission } from "../../../../auth/hooks/use-permission.js";
3
3
  import { useEffect, useState } from "react";
4
4
  import { toast } from "sonner";
5
5
  import "client-only";
@@ -1 +1 @@
1
- {"version":3,"file":"use-input.client.js","names":["value"],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts"],"sourcesContent":["import \"client-only\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { Permission } from \"@/modules/auth/entry\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission.client\";\nimport { InlineEditSchema } from \"@/modules/inline-edit/entry\";\nimport { type CellContext } from \"@tanstack/react-table\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\n\nexport type UseInlineDataTableInputParams<TData, TValue> = {\n context: CellContext<TData, TValue>;\n action: (params: InlineEditSchema<TValue>) => Promise<void> | void;\n permission?: Permission;\n};\n\n/**\n * Inline form table input\n */\nexport function useInlineDataTableInput<TData extends { id: string }, TValue>({\n context,\n action,\n permission,\n}: UseInlineDataTableInputParams<TData, TValue>) {\n const initialValue = context.getValue();\n\n const [value, setValue] = useState(initialValue);\n\n useEffect(() => setValue(initialValue), [initialValue]);\n\n const permissionData = usePermission(permission);\n const isAllowed = permissionData.data?.success;\n\n /**\n * Update value mutation\n */\n const { mutate } = useAction({\n mutationFn: async (value: TValue) => {\n if (initialValue === value) return;\n\n const { id } = context.row.original as TData;\n await action({ id, value });\n },\n onError: () => {\n setValue(initialValue);\n },\n });\n\n /**\n * Handle the update of the value.\n */\n const handleUpdate = (value: TValue) => {\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 === initialValue) return;\n\n return mutate(value);\n };\n\n return { value, setValue, mutate: handleUpdate, isAllowed };\n}\n"],"mappings":";;;;;;;;;;AAmBA,SAAgB,wBAA8D,EAC5E,SACA,QACA,cAC+C;CAC/C,MAAM,eAAe,QAAQ,UAAU;CAEvC,MAAM,CAAC,OAAO,YAAY,SAAS,aAAa;AAEhD,iBAAgB,SAAS,aAAa,EAAE,CAAC,aAAa,CAAC;CAGvD,MAAM,YADiB,cAAc,WAAW,CACf,MAAM;;;;CAKvC,MAAM,EAAE,WAAW,UAAU;EAC3B,YAAY,OAAO,YAAkB;AACnC,OAAI,iBAAiBA,QAAO;GAE5B,MAAM,EAAE,OAAO,QAAQ,IAAI;AAC3B,SAAM,OAAO;IAAE;IAAI;IAAO,CAAC;;EAE7B,eAAe;AACb,YAAS,aAAa;;EAEzB,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,aAAc;AAE5B,SAAO,OAAOA,QAAM;;AAGtB,QAAO;EAAE;EAAO;EAAU,QAAQ;EAAc;EAAW"}
1
+ {"version":3,"file":"use-input.client.js","names":["value"],"sources":["../../../../../../src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts"],"sourcesContent":["import \"client-only\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { Permission } from \"@/modules/auth/entry\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { InlineEditSchema } from \"@/modules/inline-edit/entry\";\nimport { type CellContext } from \"@tanstack/react-table\";\nimport { useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\n\nexport type UseInlineDataTableInputParams<TData, TValue> = {\n context: CellContext<TData, TValue>;\n action: (params: InlineEditSchema<TValue>) => Promise<void> | void;\n permission?: Permission;\n};\n\n/**\n * Inline form table input\n */\nexport function useInlineDataTableInput<TData extends { id: string }, TValue>({\n context,\n action,\n permission,\n}: UseInlineDataTableInputParams<TData, TValue>) {\n const initialValue = context.getValue();\n\n const [value, setValue] = useState(initialValue);\n\n useEffect(() => setValue(initialValue), [initialValue]);\n\n const permissionData = usePermission(permission);\n const isAllowed = permissionData.data?.success;\n\n /**\n * Update value mutation\n */\n const { mutate } = useAction({\n mutationFn: async (value: TValue) => {\n if (initialValue === value) return;\n\n const { id } = context.row.original as TData;\n await action({ id, value });\n },\n onError: () => {\n setValue(initialValue);\n },\n });\n\n /**\n * Handle the update of the value.\n */\n const handleUpdate = (value: TValue) => {\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 === initialValue) return;\n\n return mutate(value);\n };\n\n return { value, setValue, mutate: handleUpdate, isAllowed };\n}\n"],"mappings":";;;;;;;;;;AAmBA,SAAgB,wBAA8D,EAC5E,SACA,QACA,cAC+C;CAC/C,MAAM,eAAe,QAAQ,UAAU;CAEvC,MAAM,CAAC,OAAO,YAAY,SAAS,aAAa;AAEhD,iBAAgB,SAAS,aAAa,EAAE,CAAC,aAAa,CAAC;CAGvD,MAAM,YADiB,cAAc,WAAW,CACf,MAAM;;;;CAKvC,MAAM,EAAE,WAAW,UAAU;EAC3B,YAAY,OAAO,YAAkB;AACnC,OAAI,iBAAiBA,QAAO;GAE5B,MAAM,EAAE,OAAO,QAAQ,IAAI;AAC3B,SAAM,OAAO;IAAE;IAAI;IAAO,CAAC;;EAE7B,eAAe;AACb,YAAS,aAAa;;EAEzB,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,aAAc;AAE5B,SAAO,OAAOA,QAAM;;AAGtB,QAAO;EAAE;EAAO;EAAU,QAAQ;EAAc;EAAW"}
@@ -1,6 +1,6 @@
1
1
  import { ComboboxDropdownItem, ComboboxDropdownProps } from "../../../components/ui/combobox-dropdown.client.js";
2
2
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
3
- import * as react_jsx_runtime13 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime160 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/modules/inline-edit/components/combobox-dropdown.client.d.ts
6
6
  type InlineEditComboboxDropdownProps<TValue extends ComboboxDropdownItem> = useInlineEditOptions<string> & Omit<ComboboxDropdownProps<TValue>, "onSelect"> & {
@@ -11,7 +11,7 @@ declare function InlineComboboxDropdown<TValue extends ComboboxDropdownItem>({
11
11
  onSelect,
12
12
  disabled,
13
13
  ...props
14
- }: InlineEditComboboxDropdownProps<TValue>): react_jsx_runtime13.JSX.Element;
14
+ }: InlineEditComboboxDropdownProps<TValue>): react_jsx_runtime160.JSX.Element;
15
15
  //#endregion
16
16
  export { InlineComboboxDropdown, InlineEditComboboxDropdownProps };
17
17
  //# sourceMappingURL=combobox-dropdown.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-dropdown.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox-dropdown.client.tsx"],"sourcesContent":[],"mappings":";;;;;KASY,+CAA+C,wBACzD,+BACE,KAAK,sBAAsB;aACd,sBAAsB;;AAH3B,iBAMI,sBAN2B,CAAA,eAMW,oBANX,CAAA,CAAA;EAAA,YAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAWxC,+BAXwC,CAWR,MAXQ,CAAA,CAAA,EAWD,mBAAA,CAAA,GAAA,CAAA,OAXC"}
1
+ {"version":3,"file":"combobox-dropdown.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox-dropdown.client.tsx"],"sourcesContent":[],"mappings":";;;;;KASY,+CAA+C,wBACzD,+BACE,KAAK,sBAAsB;aACd,sBAAsB;;AAH3B,iBAMI,sBAN2B,CAAA,eAMW,oBANX,CAAA,CAAA;EAAA,YAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAWxC,+BAXwC,CAWR,MAXQ,CAAA,CAAA,EAWD,oBAAA,CAAA,GAAA,CAAA,OAXC"}
@@ -1,6 +1,6 @@
1
1
  import { ComboboxProps } from "../../../components/ui/combobox.client.js";
2
2
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
3
- import * as react_jsx_runtime14 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime161 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/modules/inline-edit/components/combobox.client.d.ts
6
6
  type InlineComboboxProps<TValue> = useInlineEditOptions<string> & Omit<ComboboxProps<TValue>, "value">;
@@ -9,7 +9,7 @@ declare function InlineCombobox<TValue>({
9
9
  onBlur,
10
10
  disabled,
11
11
  ...props
12
- }: InlineComboboxProps<TValue>): react_jsx_runtime14.JSX.Element;
12
+ }: InlineComboboxProps<TValue>): react_jsx_runtime161.JSX.Element;
13
13
  //#endregion
14
14
  export { InlineCombobox, InlineComboboxProps };
15
15
  //# sourceMappingURL=combobox.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAKY,8BAA8B,+BACxC,KAAK,cAAc;iBAEL;;;;;GAKb,oBAAoB,UAAO,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"combobox.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/combobox.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAKY,8BAA8B,+BACxC,KAAK,cAAc;iBAEL;;;;;GAKb,oBAAoB,UAAO,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime162 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/inline-edit/components/date-input.client.d.ts
@@ -8,7 +8,7 @@ declare function InlineDateInput({
8
8
  className,
9
9
  action,
10
10
  ...props
11
- }: ComponentProps<"div"> & useInlineEditOptions<Date>): react_jsx_runtime15.JSX.Element;
11
+ }: ComponentProps<"div"> & useInlineEditOptions<Date>): react_jsx_runtime162.JSX.Element;
12
12
  //#endregion
13
13
  export { InlineDateInput };
14
14
  //# sourceMappingURL=date-input.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-input.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/date-input.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAegB,eAAA;;;;;GAKb,wBAAwB,qBAAqB,QAAK,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"date-input.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/date-input.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAegB,eAAA;;;;;GAKb,wBAAwB,qBAAqB,QAAK,oBAAA,CAAA,GAAA,CAAA"}
@@ -3,8 +3,8 @@
3
3
 
4
4
  import { cn } from "../../../lib/utils/cn.js";
5
5
  import { Button } from "../../../components/ui/button.js";
6
- import { Calendar } from "../../../components/ui/calendar.js";
7
6
  import { Input } from "../../../components/ui/input.js";
7
+ import { Calendar } from "../../../components/ui/calendar.js";
8
8
  import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
9
9
  import { useInlineEdit } from "../hooks/use-inline.client.js";
10
10
  import { CalendarIcon } from "lucide-react";
@@ -1,6 +1,6 @@
1
1
  import { Button } from "../../../components/ui/button.js";
2
2
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
3
- import * as react_jsx_runtime16 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime163 from "react/jsx-runtime";
4
4
  import { ComponentProps } from "react";
5
5
 
6
6
  //#region src/modules/inline-edit/components/date-picker.client.d.ts
@@ -10,7 +10,7 @@ declare function InlineDatePicker({
10
10
  className,
11
11
  disabled,
12
12
  ...props
13
- }: InlineEditDatePickerProps): react_jsx_runtime16.JSX.Element;
13
+ }: InlineEditDatePickerProps): react_jsx_runtime163.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineDatePicker };
16
16
  //# sourceMappingURL=date-picker.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/date-picker.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAWK,yBAAA,GAA4B,sBAAsB,UAAU,qBAAqB;iBAEtE,gBAAA;;;;;GAKb,4BAAyB,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"date-picker.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/date-picker.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAWK,yBAAA,GAA4B,sBAAsB,UAAU,qBAAqB;iBAEtE,gBAAA;;;;;GAKb,4BAAyB,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime17 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime164 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
  import { JSONContent } from "@tiptap/react";
5
5
 
@@ -10,7 +10,7 @@ declare function InlineEditor({
10
10
  className,
11
11
  disabled,
12
12
  ...props
13
- }: Omit<ComponentProps<"input">, "type"> & useInlineEditOptions<JSONContent>): react_jsx_runtime17.JSX.Element;
13
+ }: Omit<ComponentProps<"input">, "type"> & useInlineEditOptions<JSONContent>): react_jsx_runtime164.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineEditor };
16
16
  //# sourceMappingURL=editor.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/editor.client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBASgB,YAAA;;;;;;GAMb,KAAK,mCAAmC,qBAAqB,eAAY,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"editor.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/editor.client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBASgB,YAAA;;;;;;GAMb,KAAK,mCAAmC,qBAAqB,eAAY,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Input } from "../../../components/ui/input.js";
2
2
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
3
- import * as react_jsx_runtime18 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime165 from "react/jsx-runtime";
4
4
  import { ComponentProps } from "react";
5
5
 
6
6
  //#region src/modules/inline-edit/components/input-toggle.client.d.ts
@@ -11,7 +11,7 @@ declare function InlineStringInputToggle({
11
11
  disabled,
12
12
  className,
13
13
  ...props
14
- }: InlineStringInputToggleProps<string>): react_jsx_runtime18.JSX.Element;
14
+ }: InlineStringInputToggleProps<string>): react_jsx_runtime165.JSX.Element;
15
15
  //#endregion
16
16
  export { InlineStringInputToggle };
17
17
  //# sourceMappingURL=input-toggle.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-toggle.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/input-toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KASK,uCAAuC,KAAK,sBAAsB,kBACrE,qBAAqB;iBAEP,uBAAA;;;;;;GAMb,uCAAoC,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"input-toggle.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/input-toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KASK,uCAAuC,KAAK,sBAAsB,kBACrE,qBAAqB;iBAEP,uBAAA;;;;;;GAMb,uCAAoC,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Input } from "../../../components/ui/input.js";
2
2
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
3
- import * as react_jsx_runtime19 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime166 from "react/jsx-runtime";
4
4
  import { ComponentProps } from "react";
5
5
 
6
6
  //#region src/modules/inline-edit/components/input.client.d.ts
@@ -14,7 +14,7 @@ declare function InlineStringInput({
14
14
  className,
15
15
  disabled,
16
16
  ...props
17
- }: InlineEditInputProps<string>): react_jsx_runtime19.JSX.Element;
17
+ }: InlineEditInputProps<string>): react_jsx_runtime166.JSX.Element;
18
18
  /**
19
19
  * The inline edit number input component.
20
20
  */
@@ -24,7 +24,7 @@ declare function InlineNumberInput({
24
24
  className,
25
25
  disabled,
26
26
  ...props
27
- }: InlineEditInputProps<number>): react_jsx_runtime19.JSX.Element;
27
+ }: InlineEditInputProps<number>): react_jsx_runtime166.JSX.Element;
28
28
  //#endregion
29
29
  export { InlineNumberInput, InlineStringInput };
30
30
  //# sourceMappingURL=input.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAOK,+BAA+B,KAAK,sBAAsB,kBAC7D,qBAAqB;;;AAH+D;AAE7D,iBAMT,iBAAA,CANS;EAAA,YAAA;EAAA,MAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAYtB,oBAZsB,CAAA,MAAA,CAAA,CAAA,EAYM,mBAAA,CAAA,GAAA,CAAA,OAZN;;;;AACF,iBAiCP,iBAAA,CAjCO;EAAA,YAAA;EAAA,MAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAuCpB,oBAvCoB,CAAA,MAAA,CAAA,CAAA,EAuCQ,mBAAA,CAAA,GAAA,CAAA,OAvCR"}
1
+ {"version":3,"file":"input.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAOK,+BAA+B,KAAK,sBAAsB,kBAC7D,qBAAqB;;;AAH+D;AAE7D,iBAMT,iBAAA,CANS;EAAA,YAAA;EAAA,MAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAYtB,oBAZsB,CAAA,MAAA,CAAA,CAAA,EAYM,oBAAA,CAAA,GAAA,CAAA,OAZN;;;;AACF,iBAiCP,iBAAA,CAjCO;EAAA,YAAA;EAAA,MAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAuCpB,oBAvCoB,CAAA,MAAA,CAAA,CAAA,EAuCQ,oBAAA,CAAA,GAAA,CAAA,OAvCR"}
@@ -1,6 +1,6 @@
1
1
  import { Input } from "../../../components/ui/input.js";
2
2
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
3
- import * as react_jsx_runtime21 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime168 from "react/jsx-runtime";
4
4
  import { ComponentProps } from "react";
5
5
 
6
6
  //#region src/modules/inline-edit/components/richtext.client.d.ts
@@ -8,7 +8,7 @@ declare function InlineRichtext({
8
8
  initialValue,
9
9
  action,
10
10
  ...props
11
- }: Omit<ComponentProps<typeof Input>, "type"> & useInlineEditOptions<string>): react_jsx_runtime21.JSX.Element;
11
+ }: Omit<ComponentProps<typeof Input>, "type"> & useInlineEditOptions<string>): react_jsx_runtime168.JSX.Element;
12
12
  //#endregion
13
13
  export { InlineRichtext };
14
14
  //# sourceMappingURL=richtext.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"richtext.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/richtext.client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBASgB,cAAA;;;;GAIb,KAAK,sBAAsB,kBAAkB,+BAA4B,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"richtext.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/richtext.client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBASgB,cAAA;;;;GAIb,KAAK,sBAAsB,kBAAkB,+BAA4B,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime22 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime169 from "react/jsx-runtime";
3
3
  import { SelectContentProps, SelectItemProps, SelectProps, SelectTriggerProps, SelectValueProps } from "@radix-ui/react-select";
4
4
 
5
5
  //#region src/modules/inline-edit/components/select.client.d.ts
@@ -8,15 +8,15 @@ declare function InlineSelect({
8
8
  initialValue,
9
9
  disabled,
10
10
  ...props
11
- }: InlineSelectProps): react_jsx_runtime22.JSX.Element;
11
+ }: InlineSelectProps): react_jsx_runtime169.JSX.Element;
12
12
  type InlineSelectTriggerProps = SelectTriggerProps;
13
- declare function InlineSelectTrigger(props: InlineSelectTriggerProps): react_jsx_runtime22.JSX.Element;
13
+ declare function InlineSelectTrigger(props: InlineSelectTriggerProps): react_jsx_runtime169.JSX.Element;
14
14
  type InlineSelectContentProps = SelectContentProps;
15
- declare function InlineSelectContent(props: InlineSelectContentProps): react_jsx_runtime22.JSX.Element;
15
+ declare function InlineSelectContent(props: InlineSelectContentProps): react_jsx_runtime169.JSX.Element;
16
16
  type InlineSelectValueProps = SelectValueProps;
17
- declare function InlineSelectValue(props: InlineSelectValueProps): react_jsx_runtime22.JSX.Element;
17
+ declare function InlineSelectValue(props: InlineSelectValueProps): react_jsx_runtime169.JSX.Element;
18
18
  type InlineSelectItenProps = SelectItemProps;
19
- declare function InlineSelectItem(props: InlineSelectItenProps): react_jsx_runtime22.JSX.Element;
19
+ declare function InlineSelectItem(props: InlineSelectItenProps): react_jsx_runtime169.JSX.Element;
20
20
  //#endregion
21
21
  export { InlineSelect, InlineSelectContent, InlineSelectContentProps, InlineSelectItem, InlineSelectItenProps, InlineSelectProps, InlineSelectTrigger, InlineSelectTriggerProps, InlineSelectValue, InlineSelectValueProps };
22
22
  //# sourceMappingURL=select.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/select.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAkBY,iBAAA,GAAoB,cAAc;iBAE9B,YAAA;;;;GAAmD,oBAAiB,mBAAA,CAAA,GAAA,CAAA;KAmBxE,wBAAA,GAA2B;AArB3B,iBAuBI,mBAAA,CAvBa,KAAA,EAuBc,wBAvBd,CAAA,EAuBsC,mBAAA,CAAA,GAAA,CAAA,OAvBtC;AAAA,KA2BjB,wBAAA,GAA2B,kBA3BV;AAAG,iBA6BhB,mBAAA,CA7BgB,KAAA,EA6BW,wBA7BX,CAAA,EA6BmC,mBAAA,CAAA,GAAA,CAAA,OA7BnC;AAAc,KAiClC,sBAAA,GAAyB,gBAjCS;AAAoB,iBAmClD,iBAAA,CAnCkD,KAAA,EAmCzB,sBAnCyB,CAAA,EAmCH,mBAAA,CAAA,GAAA,CAAA,OAnCG;AAElD,KAqCJ,qBAAA,GAAwB,eArCR;AAAA,iBAuCZ,gBAAA,CAvCY,KAAA,EAuCY,qBAvCZ,CAAA,EAuCiC,mBAAA,CAAA,GAAA,CAAA,OAvCjC"}
1
+ {"version":3,"file":"select.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/select.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAkBY,iBAAA,GAAoB,cAAc;iBAE9B,YAAA;;;;GAAmD,oBAAiB,oBAAA,CAAA,GAAA,CAAA;KAmBxE,wBAAA,GAA2B;AArB3B,iBAuBI,mBAAA,CAvBa,KAAA,EAuBc,wBAvBd,CAAA,EAuBsC,oBAAA,CAAA,GAAA,CAAA,OAvBtC;AAAA,KA2BjB,wBAAA,GAA2B,kBA3BV;AAAG,iBA6BhB,mBAAA,CA7BgB,KAAA,EA6BW,wBA7BX,CAAA,EA6BmC,oBAAA,CAAA,GAAA,CAAA,OA7BnC;AAAc,KAiClC,sBAAA,GAAyB,gBAjCS;AAAoB,iBAmClD,iBAAA,CAnCkD,KAAA,EAmCzB,sBAnCyB,CAAA,EAmCH,oBAAA,CAAA,GAAA,CAAA,OAnCG;AAElD,KAqCJ,qBAAA,GAAwB,eArCR;AAAA,iBAuCZ,gBAAA,CAvCY,KAAA,EAuCY,qBAvCZ,CAAA,EAuCiC,oBAAA,CAAA,GAAA,CAAA,OAvCjC"}
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime27 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime174 from "react/jsx-runtime";
3
3
  import { SwitchProps } from "@radix-ui/react-switch";
4
4
 
5
5
  //#region src/modules/inline-edit/components/switch.client.d.ts
@@ -8,7 +8,7 @@ declare function InlineSwitch({
8
8
  action,
9
9
  disabled,
10
10
  ...props
11
- }: SwitchProps & useInlineEditOptions<boolean>): react_jsx_runtime27.JSX.Element;
11
+ }: SwitchProps & useInlineEditOptions<boolean>): react_jsx_runtime174.JSX.Element;
12
12
  //#endregion
13
13
  export { InlineSwitch };
14
14
  //# sourceMappingURL=switch.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/switch.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAMgB,YAAA;;;;;GAKb,cAAc,gCAA6B,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"switch.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/switch.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAMgB,YAAA;;;;;GAKb,cAAc,gCAA6B,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime28 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime175 from "react/jsx-runtime";
3
3
  import React from "react";
4
4
 
5
5
  //#region src/modules/inline-edit/components/toggle.client.d.ts
@@ -10,7 +10,7 @@ declare function InlineToggle({
10
10
  children,
11
11
  className,
12
12
  ...props
13
- }: InlineEditToggleProps): react_jsx_runtime28.JSX.Element;
13
+ }: InlineEditToggleProps): react_jsx_runtime175.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineEditToggleProps, InlineToggle };
16
16
  //# sourceMappingURL=toggle.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,qBAAA,GAAwB,KAAA,CAAM,eAAe,kBACvD;iBAEc,YAAA;;;;;;GAMb,wBAAqB,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"toggle.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/components/toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,qBAAA,GAAwB,KAAA,CAAM,eAAe,kBACvD;iBAEc,YAAA;;;;;;GAMb,wBAAqB,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Permission } from "../../auth/lib/permissions.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime159 from "react/jsx-runtime";
3
3
  import React from "react";
4
4
 
5
5
  //#region src/modules/inline-edit/hooks/context.client.d.ts
@@ -22,7 +22,7 @@ declare function InlineEditProvider({
22
22
  ...value
23
23
  }: InlineEditContextParams & {
24
24
  children: React.ReactNode;
25
- }): react_jsx_runtime0.JSX.Element;
25
+ }): react_jsx_runtime159.JSX.Element;
26
26
  //#endregion
27
27
  export { InlineEditContextParams, InlineEditProvider, useInlineEditContext };
28
28
  //# sourceMappingURL=context.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/hooks/context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQY,KAAA,uBAAA,GAAuB;EAMnB,EAAA,EAAA,MAAA;EASA,UAAA,CAAA,EAfiD,UAe/B;CAAA;;;;AAGwB,iBAZ1C,oBAAA,CAAA,CAY0C,EAZtB,uBAYsB;;;;iBAH1C,kBAAA;;;GAGb;YAAsC,KAAA,CAAM;IAAW,kBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"context.client.d.ts","names":[],"sources":["../../../../src/modules/inline-edit/hooks/context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQY,KAAA,uBAAA,GAAuB;EAMnB,EAAA,EAAA,MAAA;EASA,UAAA,CAAA,EAfiD,UAe/B;CAAA;;;;AAGwB,iBAZ1C,oBAAA,CAAA,CAY0C,EAZtB,uBAYsB;;;;iBAH1C,kBAAA;;;GAGb;YAAsC,KAAA,CAAM;IAAW,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { usePermission } from "../../auth/hooks/use-permission.client.js";
5
4
  import { useAction } from "../../../lib/hooks/use-action.js";
5
+ import { usePermission } from "../../auth/hooks/use-permission.js";
6
6
  import { useInlineEditContext } from "./context.client.js";
7
7
  import { useState } from "react";
8
8
  import { toast } from "sonner";
@@ -1 +1 @@
1
- {"version":3,"file":"use-inline.client.js","names":["value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission.client\";\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { JSONContent } from \"@tiptap/react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useInlineEditContext } from \"./context.client\";\n\nexport type useInlineEditOptions<TValue> = {\n initialValue?: TValue;\n action: (value: { id: string; value: TValue }) => Promise<unknown>;\n permission?: Permission;\n};\n\nexport function useInlineEdit<TValue extends string | number | Date | boolean | JSON | JSONContent>(\n props: useInlineEditOptions<TValue>,\n) {\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n const { data } = usePermission(props.permission ?? context.permission);\n const isAllowed = data?.success;\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState(props.initialValue);\n\n /**\n * Execute the action to update the value.\n */\n const { mutate, status } = useAction({\n mutationFn: props.action,\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 the update of the value.\n */\n const handleUpdate = (value: TValue) => {\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 return mutate({ id: context.id, value });\n };\n\n return { value, setValue, handleUpdate, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,cACd,OACA;;;;CAIA,MAAM,UAAU,sBAAsB;CAEtC,MAAM,EAAE,SAAS,cAAc,MAAM,cAAc,QAAQ,WAAW;CACtE,MAAM,YAAY,MAAM;;;;CAKxB,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM,aAAa;;;;CAKtD,MAAM,EAAE,QAAQ,WAAW,UAAU;EACnC,YAAY,MAAM;EAClB,UAAU,UAAU;AAClB,YAAS,MAAM,aAAa;AAC5B,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,MAAM,aAAc;AAElC,SAAO,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;;AAG1C,QAAO;EAAE;EAAO;EAAU;EAAc;EAAQ;EAAW"}
1
+ {"version":3,"file":"use-inline.client.js","names":["value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { JSONContent } from \"@tiptap/react\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useInlineEditContext } from \"./context.client\";\n\nexport type useInlineEditOptions<TValue> = {\n initialValue?: TValue;\n action: (value: { id: string; value: TValue }) => Promise<unknown>;\n permission?: Permission;\n};\n\nexport function useInlineEdit<TValue extends string | number | Date | boolean | JSON | JSONContent>(\n props: useInlineEditOptions<TValue>,\n) {\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n const { data } = usePermission(props.permission ?? context.permission);\n const isAllowed = data?.success;\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState(props.initialValue);\n\n /**\n * Execute the action to update the value.\n */\n const { mutate, status } = useAction({\n mutationFn: props.action,\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 the update of the value.\n */\n const handleUpdate = (value: TValue) => {\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 return mutate({ id: context.id, value });\n };\n\n return { value, setValue, handleUpdate, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,cACd,OACA;;;;CAIA,MAAM,UAAU,sBAAsB;CAEtC,MAAM,EAAE,SAAS,cAAc,MAAM,cAAc,QAAQ,WAAW;CACtE,MAAM,YAAY,MAAM;;;;CAKxB,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM,aAAa;;;;CAKtD,MAAM,EAAE,QAAQ,WAAW,UAAU;EACnC,YAAY,MAAM;EAClB,UAAU,UAAU;AAClB,YAAS,MAAM,aAAa;AAC5B,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,MAAM,aAAc;AAElC,SAAO,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;;AAG1C,QAAO;EAAE;EAAO;EAAU;EAAc;EAAQ;EAAW"}
@@ -1,12 +1,12 @@
1
1
  import { Button } from "../../../components/ui/button.js";
2
- import * as react_jsx_runtime8 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/uploads/components/button.client.d.ts
6
6
  declare function UploadButton({
7
7
  className,
8
8
  ...props
9
- }: ComponentProps<typeof Button>): react_jsx_runtime8.JSX.Element;
9
+ }: ComponentProps<typeof Button>): react_jsx_runtime18.JSX.Element;
10
10
  //#endregion
11
11
  export { UploadButton };
12
12
  //# sourceMappingURL=button.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/button.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBASgB,YAAA;;;GAAsC,sBAAsB,UAAO,kBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"button.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/button.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBASgB,YAAA;;;GAAsC,sBAAsB,UAAO,mBAAA,CAAA,GAAA,CAAA"}
@@ -1,11 +1,11 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/modules/uploads/components/images/grid.client.d.ts
5
5
  /**
6
6
  * Image Grid
7
7
  */
8
- declare function ImageGrid(props: HTMLAttributes<HTMLElement>): react_jsx_runtime9.JSX.Element;
8
+ declare function ImageGrid(props: HTMLAttributes<HTMLElement>): react_jsx_runtime19.JSX.Element;
9
9
  //#endregion
10
10
  export { ImageGrid };
11
11
  //# sourceMappingURL=grid.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAuCgB,iBAAA,SAAA,CAAS,KAAA,EAAQ,cAAR,CAAuB,WAAvB,CAAA,CAAA,EAAmC,kBAAA,CAAA,GAAA,CAAA,OAAnC"}
1
+ {"version":3,"file":"grid.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAuCgB,iBAAA,SAAA,CAAS,KAAA,EAAQ,cAAR,CAAuB,WAAvB,CAAA,CAAA,EAAmC,mBAAA,CAAA,GAAA,CAAA,OAAnC"}
@@ -4,9 +4,9 @@
4
4
  import { Icons } from "../../../../components/common/icons.js";
5
5
  import { cn } from "../../../../lib/utils/cn.js";
6
6
  import { Button } from "../../../../components/ui/button.js";
7
+ import { Dialog, DialogContent, DialogTrigger } from "../../../../components/ui/dialog.client.js";
7
8
  import { Card } from "../../../../components/ui/card.js";
8
9
  import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../../../../components/ui/carousel.js";
9
- import { Dialog, DialogContent, DialogTrigger } from "../../../../components/ui/dialog.client.js";
10
10
  import { useUploadZone } from "../../hooks/use-upload-zone.client.js";
11
11
  import { ImageInput } from "./input.client.js";
12
12
  import { GripIcon } from "lucide-react";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import "client-only";
4
4
 
@@ -10,7 +10,7 @@ declare function ImageInput({
10
10
  onUpload,
11
11
  className,
12
12
  ...props
13
- }: ImageInputProps): react_jsx_runtime10.JSX.Element;
13
+ }: ImageInputProps): react_jsx_runtime20.JSX.Element;
14
14
  //#endregion
15
15
  export { ImageInput, ImageInputProps };
16
16
  //# sourceMappingURL=input.client.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { DialogTrigger } from "../../../components/ui/dialog.client.js";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/modules/uploads/components/preview-dialog.client.d.ts
5
5
  type AssetPreviewDialogProps = {
@@ -9,7 +9,7 @@ type AssetPreviewDialogProps = {
9
9
  declare function AssetPreviewDialog({
10
10
  children,
11
11
  src
12
- }: AssetPreviewDialogProps): react_jsx_runtime11.JSX.Element;
12
+ }: AssetPreviewDialogProps): react_jsx_runtime21.JSX.Element;
13
13
  declare const AssetPreviewDialogTrigger: typeof DialogTrigger;
14
14
  //#endregion
15
15
  export { AssetPreviewDialog, AssetPreviewDialogTrigger };
@@ -1,5 +1,5 @@
1
1
  import { UploadFile, UploadZoneContextValue } from "../hooks/use-upload-zone.client.js";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
3
3
  import React, { HTMLAttributes } from "react";
4
4
 
5
5
  //#region src/modules/uploads/components/zone.client.d.ts
@@ -15,7 +15,7 @@ declare function UploadZone<TFile extends UploadFile>({
15
15
  children,
16
16
  className,
17
17
  ...props
18
- }: UploadZoneProps<TFile>): react_jsx_runtime12.JSX.Element;
18
+ }: UploadZoneProps<TFile>): react_jsx_runtime22.JSX.Element;
19
19
  //#endregion
20
20
  export { UploadZone };
21
21
  //# sourceMappingURL=zone.client.d.ts.map
@@ -1,6 +1,6 @@
1
- import { arrayMove } from "../../../lib/utils/array-move.js";
2
1
  import { useIndicator } from "../../../lib/hooks/use-indicator.js";
3
2
  import { useAction } from "../../../lib/hooks/use-action.js";
3
+ import { arrayMove } from "../../../lib/utils/array-move.js";
4
4
  import { useState } from "react";
5
5
  import { toast } from "sonner";
6
6
  import { upload } from "@vercel/blob/client";
@@ -1,7 +1,7 @@
1
1
  import { GetTulipParams, GetTulipReturn } from "../../config/lib/resolve.server.js";
2
2
  import { DriveSchema } from "./schema.js";
3
- import "server-cli-only";
4
3
  import { z as z$1 } from "zod";
4
+ import "server-cli-only";
5
5
  import { NextRequest } from "next/server";
6
6
 
7
7
  //#region src/modules/uploads/lib/proxy.server.d.ts
@@ -1,12 +1,12 @@
1
1
  import { BUCKET_NAME } from "../../../lib/config/constants.js";
2
+ import { getTulip } from "../../config/lib/resolve.server.js";
2
3
  import { ServerError } from "../../config/router/error.server.js";
3
4
  import { getSession } from "../../auth/lib/helpers.server.js";
4
- import { getTulip } from "../../config/lib/resolve.server.js";
5
5
  import { imageDispositions, imageVariants } from "./constants.js";
6
6
  import { nodePresignedUrls, nodes } from "./schema.js";
7
- import "server-cli-only";
8
- import { and, eq } from "drizzle-orm";
9
7
  import { z as z$1 } from "zod";
8
+ import { and, eq } from "drizzle-orm";
9
+ import "server-cli-only";
10
10
  import { GetObjectCommand } from "@aws-sdk/client-s3";
11
11
  import { addSeconds } from "date-fns";
12
12
  import { after } from "next/server";
@@ -2,8 +2,8 @@ import { TDatabaseSchema } from "../../config/db/types.js";
2
2
  import { TulipConfig } from "../../config/lib/config.server.js";
3
3
  import { GetTulipReturn } from "../../config/lib/resolve.server.js";
4
4
  import { Asset } from "./validators.js";
5
- import "server-cli-only";
6
5
  import { z as z$1 } from "zod";
6
+ import "server-cli-only";
7
7
  import { NextRequest, NextResponse } from "next/server";
8
8
 
9
9
  //#region src/modules/uploads/lib/route.server.d.ts
@@ -1,7 +1,7 @@
1
1
  import { getTulip } from "../../config/lib/resolve.server.js";
2
2
  import { assets } from "./schema.js";
3
- import "server-cli-only";
4
3
  import { eq } from "drizzle-orm";
4
+ import "server-cli-only";
5
5
  import { handleUpload } from "@vercel/blob/client";
6
6
  import { del } from "@vercel/blob";
7
7
  import { NextResponse } from "next/server";