@tulip-systems/core 0.2.1 → 0.4.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 (368) hide show
  1. package/dist/auth/client.d.ts +3 -1
  2. package/dist/auth/client.js +4 -2
  3. package/dist/auth/server.d.ts +2 -2
  4. package/dist/auth/server.js +3 -3
  5. package/dist/auth.d.ts +2 -1
  6. package/dist/auth.js +3 -2
  7. package/dist/commands/client.d.ts +4 -4
  8. package/dist/commands/client.js +4 -4
  9. package/dist/components/client.d.ts +5 -3
  10. package/dist/components/client.js +6 -4
  11. package/dist/components/common/icons.d.ts +5 -2
  12. package/dist/components/common/icons.d.ts.map +1 -1
  13. package/dist/components/common/icons.js +4 -1
  14. package/dist/components/common/icons.js.map +1 -1
  15. package/dist/components/common/status.d.ts +3 -3
  16. package/dist/components/editor/components/content.client.d.ts +2 -2
  17. package/dist/components/editor/components/fixed-menu.client.d.ts +2 -2
  18. package/dist/components/editor/context.client.d.ts +2 -2
  19. package/dist/components/editor/index.client.d.ts +2 -2
  20. package/dist/components/editor/preview.client.d.ts +2 -2
  21. package/dist/components/header/back-button.client.d.ts +2 -2
  22. package/dist/components/header/bottom-bar.client.d.ts +5 -5
  23. package/dist/components/header/bottom-bar.client.d.ts.map +1 -1
  24. package/dist/components/header/bottom-bar.client.js.map +1 -1
  25. package/dist/components/header/breadcrumbs.client.d.ts +7 -7
  26. package/dist/components/header/breadcrumbs.client.js +1 -1
  27. package/dist/components/header/header.client.d.ts +2 -2
  28. package/dist/components/header/mobile-nav-switcher.client.d.ts +2 -2
  29. package/dist/components/header/top-bar.client.d.ts +4 -4
  30. package/dist/components/layouts/admin-content.client.d.ts +13 -0
  31. package/dist/components/layouts/admin-content.client.d.ts.map +1 -0
  32. package/dist/components/layouts/admin-layout.d.ts +8 -0
  33. package/dist/components/layouts/admin-layout.d.ts.map +1 -0
  34. package/dist/components/layouts/admin-layout.js +15 -0
  35. package/dist/components/layouts/admin-layout.js.map +1 -0
  36. package/dist/components/layouts/admin-loading.d.ts +3 -3
  37. package/dist/components/layouts/admin-loading.d.ts.map +1 -1
  38. package/dist/components/layouts/admin-loading.js +2 -2
  39. package/dist/components/layouts/admin-loading.js.map +1 -1
  40. package/dist/components/layouts/empty-page.d.ts +4 -4
  41. package/dist/components/layouts/list-layout.d.ts +2 -2
  42. package/dist/components/layouts/not-found-page.d.ts +4 -3
  43. package/dist/components/layouts/not-found-page.d.ts.map +1 -1
  44. package/dist/components/layouts/not-found-page.js +8 -2
  45. package/dist/components/layouts/not-found-page.js.map +1 -1
  46. package/dist/components/layouts/not-found-section.js +1 -1
  47. package/dist/components/layouts/not-found-section.js.map +1 -1
  48. package/dist/components/layouts/providers.client.d.ts +2 -2
  49. package/dist/components/layouts/root-layout.server.d.ts +2 -2
  50. package/dist/components/layouts/root-layout.server.d.ts.map +1 -1
  51. package/dist/components/layouts/root-loading.d.ts +7 -0
  52. package/dist/components/layouts/root-loading.d.ts.map +1 -0
  53. package/dist/components/layouts/root-loading.js +14 -0
  54. package/dist/components/layouts/root-loading.js.map +1 -0
  55. package/dist/components/layouts/tab-layout.d.ts +2 -2
  56. package/dist/components/lists/data-list.d.ts +5 -5
  57. package/dist/components/lists/data-stack.d.ts +8 -8
  58. package/dist/components/{layouts → navigation}/admin-sidebar-header.client.js +8 -9
  59. package/dist/components/navigation/admin-sidebar-header.client.js.map +1 -0
  60. package/dist/components/navigation/admin-sidebar-paths.client.d.ts +81 -0
  61. package/dist/components/navigation/admin-sidebar-paths.client.d.ts.map +1 -0
  62. package/dist/components/navigation/admin-sidebar-paths.client.js +143 -0
  63. package/dist/components/navigation/admin-sidebar-paths.client.js.map +1 -0
  64. package/dist/components/navigation/admin-sidebar-skeleton.js +31 -0
  65. package/dist/components/navigation/admin-sidebar-skeleton.js.map +1 -0
  66. package/dist/components/server.d.ts +1 -1
  67. package/dist/components/server.js +1 -1
  68. package/dist/components/ui/accordion.d.ts +5 -5
  69. package/dist/components/ui/alert-dialog.d.ts +12 -12
  70. package/dist/components/ui/alert.d.ts +6 -6
  71. package/dist/components/ui/aspect-ratio.d.ts +2 -2
  72. package/dist/components/ui/avatar.client.d.ts +4 -4
  73. package/dist/components/ui/badge.d.ts +4 -4
  74. package/dist/components/ui/breadcrumb.d.ts +8 -8
  75. package/dist/components/ui/button.d.ts +4 -4
  76. package/dist/components/ui/calendar.d.ts +2 -2
  77. package/dist/components/ui/card.d.ts +7 -7
  78. package/dist/components/ui/carousel.d.ts +6 -6
  79. package/dist/components/ui/chart.client.d.ts +5 -5
  80. package/dist/components/ui/checkbox.d.ts +2 -2
  81. package/dist/components/ui/collapsible.client.d.ts +4 -4
  82. package/dist/components/ui/color-picker.client.d.ts +2 -2
  83. package/dist/components/ui/combobox-dropdown.client.d.ts +2 -2
  84. package/dist/components/ui/combobox.client.d.ts +2 -2
  85. package/dist/components/ui/command.d.ts +10 -10
  86. package/dist/components/ui/context-menu.d.ts +16 -16
  87. package/dist/components/ui/dialog.client.d.ts +11 -11
  88. package/dist/components/ui/drawer.client.d.ts +11 -11
  89. package/dist/components/ui/dropdown-menu.d.ts +16 -16
  90. package/dist/components/ui/form.client.d.ts +8 -8
  91. package/dist/components/ui/hover-card.client.d.ts +4 -4
  92. package/dist/components/ui/input.d.ts +2 -2
  93. package/dist/components/ui/label.d.ts +2 -2
  94. package/dist/components/ui/navigation-menu.d.ts +11 -11
  95. package/dist/components/ui/pagination.d.ts +8 -8
  96. package/dist/components/ui/popover.d.ts +5 -5
  97. package/dist/components/ui/progress.client.d.ts +2 -2
  98. package/dist/components/ui/radio-group.d.ts +3 -3
  99. package/dist/components/ui/resizable.client.d.ts +4 -4
  100. package/dist/components/ui/scroll-area.d.ts +3 -3
  101. package/dist/components/ui/select.client.d.ts +11 -11
  102. package/dist/components/ui/separator.d.ts +2 -2
  103. package/dist/components/ui/sheet.client.d.ts +9 -9
  104. package/dist/components/ui/sidebar.client.d.ts +24 -24
  105. package/dist/components/ui/sidebar.client.js +1 -1
  106. package/dist/components/ui/skeleton.d.ts +2 -2
  107. package/dist/components/ui/slider.d.ts +2 -2
  108. package/dist/components/ui/sonner.client.d.ts +2 -2
  109. package/dist/components/ui/sonner.client.js +1 -1
  110. package/dist/components/ui/spinner.js +63 -0
  111. package/dist/components/ui/spinner.js.map +1 -0
  112. package/dist/components/ui/switch.d.ts +2 -2
  113. package/dist/components/ui/tabs.d.ts +5 -5
  114. package/dist/components/ui/textarea.d.ts +2 -2
  115. package/dist/components/ui/time-input.client.d.ts +2 -2
  116. package/dist/components/ui/toggle-group.client.d.ts +3 -3
  117. package/dist/components/ui/toggle.d.ts +4 -4
  118. package/dist/components/ui/tooltip.client.d.ts +5 -5
  119. package/dist/components/ui/tree.client.d.ts +5 -5
  120. package/dist/components/ui/tree.client.d.ts.map +1 -1
  121. package/dist/components.d.ts +6 -5
  122. package/dist/components.js +8 -7
  123. package/dist/config/server.d.ts +2 -3
  124. package/dist/config/server.js +3 -4
  125. package/dist/config.d.ts +3 -2
  126. package/dist/config.js +2 -1
  127. package/dist/lib/client.js +1 -1
  128. package/dist/lib/hooks/use-action.d.ts +2 -2
  129. package/dist/modules/auth/components/allowed.client.js +1 -1
  130. package/dist/modules/auth/components/allowed.client.js.map +1 -1
  131. package/dist/modules/auth/components/auth-layout.server.d.ts +3 -4
  132. package/dist/modules/auth/components/auth-layout.server.d.ts.map +1 -1
  133. package/dist/modules/auth/components/auth-layout.server.js +1 -4
  134. package/dist/modules/auth/components/auth-layout.server.js.map +1 -1
  135. package/dist/modules/auth/components/auth-loading.d.ts +7 -0
  136. package/dist/modules/auth/components/auth-loading.d.ts.map +1 -0
  137. package/dist/modules/auth/components/auth-loading.js +18 -0
  138. package/dist/modules/auth/components/auth-loading.js.map +1 -0
  139. package/dist/modules/auth/components/forget-password-page.client.js +2 -2
  140. package/dist/modules/auth/components/guard.client.js +16 -0
  141. package/dist/modules/auth/components/guard.client.js.map +1 -0
  142. package/dist/modules/auth/components/login-page.client.d.ts +1 -5
  143. package/dist/modules/auth/components/login-page.client.d.ts.map +1 -1
  144. package/dist/modules/auth/components/login-page.client.js +41 -31
  145. package/dist/modules/auth/components/login-page.client.js.map +1 -1
  146. package/dist/modules/auth/components/reset-password-page.client.js +3 -3
  147. package/dist/modules/auth/components/update-password-command.d.ts +1 -1
  148. package/dist/modules/auth/components/update-password-command.js +1 -1
  149. package/dist/modules/auth/handler/client.client.d.ts +48 -48
  150. package/dist/modules/auth/handler/client.client.d.ts.map +1 -1
  151. package/dist/modules/auth/handler/proxy.server.d.ts +13 -0
  152. package/dist/modules/auth/handler/proxy.server.d.ts.map +1 -0
  153. package/dist/modules/auth/handler/proxy.server.js +22 -0
  154. package/dist/modules/auth/handler/proxy.server.js.map +1 -0
  155. package/dist/modules/auth/handler/server.server.js +3 -1
  156. package/dist/modules/auth/handler/server.server.js.map +1 -1
  157. package/dist/modules/auth/hooks/use-permission.d.ts +26 -0
  158. package/dist/modules/auth/hooks/use-permission.d.ts.map +1 -0
  159. package/dist/modules/auth/hooks/{use-permission.client.js → use-permission.js} +5 -3
  160. package/dist/modules/auth/hooks/use-permission.js.map +1 -0
  161. package/dist/modules/auth/hooks/use-session.d.ts +34 -0
  162. package/dist/modules/auth/hooks/use-session.d.ts.map +1 -0
  163. package/dist/modules/auth/hooks/use-session.js +21 -0
  164. package/dist/modules/auth/hooks/use-session.js.map +1 -0
  165. package/dist/modules/auth/lib/helpers.server.d.ts +2 -2
  166. package/dist/modules/auth/lib/helpers.server.d.ts.map +1 -1
  167. package/dist/modules/auth/lib/helpers.server.js +3 -6
  168. package/dist/modules/auth/lib/helpers.server.js.map +1 -1
  169. package/dist/modules/auth/lib/validators.d.ts +4 -4
  170. package/dist/modules/auth/lib/validators.d.ts.map +1 -1
  171. package/dist/modules/auth/lib/validators.js +1 -1
  172. package/dist/modules/auth/lib/validators.js.map +1 -1
  173. package/dist/modules/commands/components/alert-dialog-command.client.d.ts +11 -11
  174. package/dist/modules/commands/components/alert-dialog-command.client.js +1 -1
  175. package/dist/modules/commands/components/click-command.client.d.ts +2 -2
  176. package/dist/modules/commands/components/command-trigger.client.d.ts +4 -4
  177. package/dist/modules/commands/components/command-trigger.client.js +1 -1
  178. package/dist/modules/commands/components/dialog-command.client.d.ts +8 -8
  179. package/dist/modules/commands/components/dialog-command.client.js +1 -1
  180. package/dist/modules/commands/components/dropdown-command.client.d.ts +5 -5
  181. package/dist/modules/commands/components/empty-command.client.d.ts +2 -2
  182. package/dist/modules/commands/components/form-dialog-command.client.d.ts +12 -12
  183. package/dist/modules/commands/components/form-dialog-command.client.js +1 -1
  184. package/dist/modules/commands/hooks/use-command-action.client.js +1 -1
  185. package/dist/modules/commands/hooks/use-command-menu.client.js +1 -1
  186. package/dist/modules/commands/hooks/use-command-menu.client.js.map +1 -1
  187. package/dist/modules/commands/menus/context-menu.client.d.ts +2 -2
  188. package/dist/modules/commands/menus/dropdown-menu.client.d.ts +8 -4
  189. package/dist/modules/commands/menus/dropdown-menu.client.d.ts.map +1 -1
  190. package/dist/modules/commands/menus/dropdown-menu.client.js +9 -1
  191. package/dist/modules/commands/menus/dropdown-menu.client.js.map +1 -1
  192. package/dist/modules/commands/menus/inline-menu.client.d.ts +8 -4
  193. package/dist/modules/commands/menus/inline-menu.client.d.ts.map +1 -1
  194. package/dist/modules/commands/menus/inline-menu.client.js +12 -1
  195. package/dist/modules/commands/menus/inline-menu.client.js.map +1 -1
  196. package/dist/modules/commands/menus/responsive-menu.client.d.ts +2 -1
  197. package/dist/modules/commands/menus/responsive-menu.client.d.ts.map +1 -1
  198. package/dist/modules/commands/menus/responsive-menu.client.js +6 -3
  199. package/dist/modules/commands/menus/responsive-menu.client.js.map +1 -1
  200. package/dist/modules/commands/utils/archive-command.client.d.ts +3 -3
  201. package/dist/modules/commands/utils/delete-command.client.d.ts +2 -2
  202. package/dist/modules/commands/utils/send-mail-command.client.d.ts +2 -2
  203. package/dist/modules/commands/utils/send-mail-command.client.d.ts.map +1 -1
  204. package/dist/modules/commands/utils/send-mail-command.client.js +3 -3
  205. package/dist/modules/config/db/helpers.d.ts +5 -5
  206. package/dist/modules/config/db/helpers.d.ts.map +1 -1
  207. package/dist/modules/config/lib/config.server.d.ts +0 -2
  208. package/dist/modules/config/lib/config.server.d.ts.map +1 -1
  209. package/dist/modules/config/lib/config.server.js.map +1 -1
  210. package/dist/modules/config/lib/resolve.server.d.ts +192 -190
  211. package/dist/modules/config/lib/resolve.server.d.ts.map +1 -1
  212. package/dist/modules/config/paths/helpers.d.ts +11 -0
  213. package/dist/modules/config/paths/helpers.d.ts.map +1 -0
  214. package/dist/modules/config/paths/helpers.js +9 -0
  215. package/dist/modules/config/paths/helpers.js.map +1 -0
  216. package/dist/modules/config/paths/types.d.ts +8 -37
  217. package/dist/modules/config/paths/types.d.ts.map +1 -1
  218. package/dist/modules/config/router/client.server.d.ts +4 -4
  219. package/dist/modules/config/router/client.server.d.ts.map +1 -1
  220. package/dist/modules/config/router/context.server.d.ts +194 -192
  221. package/dist/modules/config/router/context.server.d.ts.map +1 -1
  222. package/dist/modules/config/router/init.server.d.ts +200 -198
  223. package/dist/modules/config/router/init.server.d.ts.map +1 -1
  224. package/dist/modules/data-tables/components/cell/common.client.d.ts +5 -5
  225. package/dist/modules/data-tables/components/cell/common.client.d.ts.map +1 -1
  226. package/dist/modules/data-tables/components/column-header.d.ts +2 -2
  227. package/dist/modules/data-tables/components/filters/combobox.client.d.ts +2 -2
  228. package/dist/modules/data-tables/components/filters/combobox.client.d.ts.map +1 -1
  229. package/dist/modules/data-tables/components/filters/combobox.client.js +1 -1
  230. package/dist/modules/data-tables/components/filters/combobox.client.js.map +1 -1
  231. package/dist/modules/data-tables/components/filters/slider.client.d.ts +2 -2
  232. package/dist/modules/data-tables/components/filters/slider.client.d.ts.map +1 -1
  233. package/dist/modules/data-tables/components/header.d.ts +4 -4
  234. package/dist/modules/data-tables/components/layout.d.ts +2 -2
  235. package/dist/modules/data-tables/components/search-input.client.d.ts +2 -2
  236. package/dist/modules/data-tables/components/search-input.client.d.ts.map +1 -1
  237. package/dist/modules/data-tables/components/skeleton.d.ts +2 -2
  238. package/dist/modules/data-tables/components/table.d.ts +7 -7
  239. package/dist/modules/data-tables/components/toolbar.d.ts +3 -3
  240. package/dist/modules/data-tables/hooks/use-context.client.d.ts +2 -2
  241. package/dist/modules/data-tables/hooks/use-context.client.d.ts.map +1 -1
  242. package/dist/modules/data-tables/lib/filters/resolvers.d.ts +1 -1
  243. package/dist/modules/data-tables/lib/filters/resolvers.d.ts.map +1 -1
  244. package/dist/modules/data-tables/lib/search-params.d.ts +5 -5
  245. package/dist/modules/data-tables/lib/search-params.d.ts.map +1 -1
  246. package/dist/modules/data-tables/lib/types.d.ts +1 -1
  247. package/dist/modules/data-tables/tables/data-table/components/table.d.ts +2 -2
  248. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts +2 -2
  249. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts.map +1 -1
  250. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts +2 -2
  251. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts.map +1 -1
  252. package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts +2 -2
  253. package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts +3 -3
  254. package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts +2 -2
  255. package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.ts +2 -2
  256. package/dist/modules/data-tables/tables/inline-table/components/table.d.ts +2 -2
  257. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.ts +2 -2
  258. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.js +1 -1
  259. package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js +1 -1
  260. package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js.map +1 -1
  261. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts +2 -2
  262. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts.map +1 -1
  263. package/dist/modules/inline-edit/components/combobox.client.d.ts +2 -2
  264. package/dist/modules/inline-edit/components/combobox.client.d.ts.map +1 -1
  265. package/dist/modules/inline-edit/components/date-input.client.d.ts +2 -2
  266. package/dist/modules/inline-edit/components/date-input.client.js +1 -1
  267. package/dist/modules/inline-edit/components/date-picker.client.d.ts +2 -2
  268. package/dist/modules/inline-edit/components/editor.client.d.ts +2 -2
  269. package/dist/modules/inline-edit/components/input-toggle.client.d.ts +2 -2
  270. package/dist/modules/inline-edit/components/input.client.d.ts +3 -3
  271. package/dist/modules/inline-edit/components/richtext.client.d.ts +2 -2
  272. package/dist/modules/inline-edit/components/select.client.d.ts +6 -6
  273. package/dist/modules/inline-edit/components/switch.client.d.ts +2 -2
  274. package/dist/modules/inline-edit/components/toggle.client.d.ts +2 -2
  275. package/dist/modules/inline-edit/hooks/context.client.d.ts +2 -2
  276. package/dist/modules/inline-edit/hooks/use-inline.client.js +1 -1
  277. package/dist/modules/inline-edit/hooks/use-inline.client.js.map +1 -1
  278. package/dist/modules/uploads/components/button.client.d.ts +2 -2
  279. package/dist/modules/uploads/components/button.client.d.ts.map +1 -1
  280. package/dist/modules/uploads/components/images/grid.client.d.ts +2 -2
  281. package/dist/modules/uploads/components/images/grid.client.d.ts.map +1 -1
  282. package/dist/modules/uploads/components/images/grid.client.js +1 -1
  283. package/dist/modules/uploads/components/images/input.client.d.ts +2 -2
  284. package/dist/modules/uploads/components/images/input.client.d.ts.map +1 -1
  285. package/dist/modules/uploads/components/preview-dialog.client.d.ts +2 -2
  286. package/dist/modules/uploads/components/preview-dialog.client.d.ts.map +1 -1
  287. package/dist/modules/uploads/components/zone.client.d.ts +2 -2
  288. package/dist/modules/uploads/components/zone.client.d.ts.map +1 -1
  289. package/dist/modules/uploads/hooks/use-upload-image.client.js +1 -1
  290. package/dist/modules/uploads/lib/proxy.server.d.ts +1 -1
  291. package/dist/modules/uploads/lib/proxy.server.js +4 -4
  292. package/dist/modules/uploads/lib/route.server.d.ts +1 -1
  293. package/dist/modules/uploads/lib/route.server.js +2 -2
  294. package/dist/modules/uploads/lib/router.server.d.ts +965 -965
  295. package/dist/modules/uploads/lib/router.server.d.ts.map +1 -1
  296. package/dist/modules/uploads/lib/router.server.js +2 -2
  297. package/dist/modules/uploads/lib/schema.d.ts +61 -61
  298. package/dist/modules/uploads/lib/validators.d.ts +56 -56
  299. package/dist/modules/uploads/lib/validators.d.ts.map +1 -1
  300. package/package.json +5 -4
  301. package/src/components/common/icons.tsx +6 -0
  302. package/src/components/entry.client.ts +6 -0
  303. package/src/components/entry.server.ts +1 -1
  304. package/src/components/entry.ts +1 -0
  305. package/src/components/header/bottom-bar.client.tsx +2 -2
  306. package/src/components/layouts/admin-layout.tsx +13 -0
  307. package/src/components/layouts/admin-loading.tsx +1 -1
  308. package/src/components/layouts/not-found-page.tsx +9 -1
  309. package/src/components/layouts/not-found-section.tsx +10 -5
  310. package/src/components/layouts/root-loading.tsx +9 -0
  311. package/src/components/{layouts → navigation}/admin-sidebar-header.client.tsx +11 -6
  312. package/src/components/navigation/admin-sidebar-paths.client.tsx +190 -0
  313. package/src/components/navigation/admin-sidebar-skeleton.tsx +44 -0
  314. package/src/components/navigation/admin-sidebar.client.tsx +123 -0
  315. package/src/components/ui/spinner.tsx +51 -0
  316. package/src/modules/auth/components/allowed.client.tsx +1 -1
  317. package/src/modules/auth/components/auth-layout.server.tsx +2 -10
  318. package/src/modules/auth/components/auth-loading.tsx +11 -0
  319. package/src/modules/auth/components/guard.client.tsx +12 -0
  320. package/src/modules/auth/components/login-page.client.tsx +45 -37
  321. package/src/modules/auth/entry.client.ts +2 -0
  322. package/src/modules/auth/entry.server.ts +1 -1
  323. package/src/modules/auth/entry.ts +1 -0
  324. package/src/modules/auth/handler/proxy.server.ts +28 -0
  325. package/src/modules/auth/handler/server.server.ts +5 -0
  326. package/src/modules/auth/hooks/{use-permission.client.ts → use-permission.ts} +4 -2
  327. package/src/modules/auth/hooks/use-session.ts +18 -0
  328. package/src/modules/auth/lib/helpers.server.ts +1 -5
  329. package/src/modules/auth/lib/validators.ts +1 -1
  330. package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -7
  331. package/src/modules/commands/menus/dropdown-menu.client.tsx +11 -2
  332. package/src/modules/commands/menus/inline-menu.client.tsx +14 -1
  333. package/src/modules/commands/menus/responsive-menu.client.tsx +11 -2
  334. package/src/modules/config/entry.server.ts +1 -2
  335. package/src/modules/config/entry.ts +3 -0
  336. package/src/modules/config/lib/config.server.ts +1 -2
  337. package/src/modules/config/lib/router.server.ts +64 -0
  338. package/src/modules/config/paths/helpers.ts +6 -0
  339. package/src/modules/config/paths/types.ts +26 -38
  340. package/src/modules/data-tables/components/filters/combobox.client.tsx +1 -1
  341. package/src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts +1 -1
  342. package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
  343. package/dist/components/layouts/admin-layout.server.d.ts +0 -14
  344. package/dist/components/layouts/admin-layout.server.d.ts.map +0 -1
  345. package/dist/components/layouts/admin-layout.server.js +0 -26
  346. package/dist/components/layouts/admin-layout.server.js.map +0 -1
  347. package/dist/components/layouts/admin-sidebar-context.client.js +0 -28
  348. package/dist/components/layouts/admin-sidebar-context.client.js.map +0 -1
  349. package/dist/components/layouts/admin-sidebar-header.client.js.map +0 -1
  350. package/dist/components/layouts/admin-sidebar.client.js +0 -51
  351. package/dist/components/layouts/admin-sidebar.client.js.map +0 -1
  352. package/dist/modules/auth/components/allowed.server.d.ts +0 -23
  353. package/dist/modules/auth/components/allowed.server.d.ts.map +0 -1
  354. package/dist/modules/auth/components/allowed.server.js +0 -24
  355. package/dist/modules/auth/components/allowed.server.js.map +0 -1
  356. package/dist/modules/auth/hooks/use-permission.client.js.map +0 -1
  357. package/dist/modules/config/paths/create.server.d.ts +0 -14
  358. package/dist/modules/config/paths/create.server.d.ts.map +0 -1
  359. package/dist/modules/config/paths/create.server.js +0 -12
  360. package/dist/modules/config/paths/create.server.js.map +0 -1
  361. package/dist/modules/config/paths/get.server.js +0 -47
  362. package/dist/modules/config/paths/get.server.js.map +0 -1
  363. package/src/components/layouts/admin-layout.server.tsx +0 -31
  364. package/src/components/layouts/admin-sidebar-context.client.tsx +0 -34
  365. package/src/components/layouts/admin-sidebar.client.tsx +0 -88
  366. package/src/modules/auth/components/allowed.server.tsx +0 -41
  367. package/src/modules/config/paths/create.server.ts +0 -10
  368. package/src/modules/config/paths/get.server.ts +0 -69
@@ -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_runtime8 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime23 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_runtime8.JSX.Element;
14
+ }: InlineEditComboboxDropdownProps<TValue>): react_jsx_runtime23.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,kBAAA,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,mBAAA,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_runtime9 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime25 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_runtime9.JSX.Element;
12
+ }: InlineComboboxProps<TValue>): react_jsx_runtime25.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,kBAAA,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,mBAAA,CAAA,GAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime26 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_runtime10.JSX.Element;
11
+ }: ComponentProps<"div"> & useInlineEditOptions<Date>): react_jsx_runtime26.JSX.Element;
12
12
  //#endregion
13
13
  export { InlineDateInput };
14
14
  //# sourceMappingURL=date-input.client.d.ts.map
@@ -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_runtime11 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime27 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_runtime11.JSX.Element;
13
+ }: InlineEditDatePickerProps): react_jsx_runtime27.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineDatePicker };
16
16
  //# sourceMappingURL=date-picker.client.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime28 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_runtime12.JSX.Element;
13
+ }: Omit<ComponentProps<"input">, "type"> & useInlineEditOptions<JSONContent>): react_jsx_runtime28.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineEditor };
16
16
  //# sourceMappingURL=editor.client.d.ts.map
@@ -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_runtime13 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime29 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_runtime13.JSX.Element;
14
+ }: InlineStringInputToggleProps<string>): react_jsx_runtime29.JSX.Element;
15
15
  //#endregion
16
16
  export { InlineStringInputToggle };
17
17
  //# sourceMappingURL=input-toggle.client.d.ts.map
@@ -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_runtime14 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime30 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_runtime14.JSX.Element;
17
+ }: InlineEditInputProps<string>): react_jsx_runtime30.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_runtime14.JSX.Element;
27
+ }: InlineEditInputProps<number>): react_jsx_runtime30.JSX.Element;
28
28
  //#endregion
29
29
  export { InlineNumberInput, InlineStringInput };
30
30
  //# sourceMappingURL=input.client.d.ts.map
@@ -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_runtime16 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime32 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_runtime16.JSX.Element;
11
+ }: Omit<ComponentProps<typeof Input>, "type"> & useInlineEditOptions<string>): react_jsx_runtime32.JSX.Element;
12
12
  //#endregion
13
13
  export { InlineRichtext };
14
14
  //# sourceMappingURL=richtext.client.d.ts.map
@@ -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_runtime33 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_runtime17.JSX.Element;
11
+ }: InlineSelectProps): react_jsx_runtime33.JSX.Element;
12
12
  type InlineSelectTriggerProps = SelectTriggerProps;
13
- declare function InlineSelectTrigger(props: InlineSelectTriggerProps): react_jsx_runtime17.JSX.Element;
13
+ declare function InlineSelectTrigger(props: InlineSelectTriggerProps): react_jsx_runtime33.JSX.Element;
14
14
  type InlineSelectContentProps = SelectContentProps;
15
- declare function InlineSelectContent(props: InlineSelectContentProps): react_jsx_runtime17.JSX.Element;
15
+ declare function InlineSelectContent(props: InlineSelectContentProps): react_jsx_runtime33.JSX.Element;
16
16
  type InlineSelectValueProps = SelectValueProps;
17
- declare function InlineSelectValue(props: InlineSelectValueProps): react_jsx_runtime17.JSX.Element;
17
+ declare function InlineSelectValue(props: InlineSelectValueProps): react_jsx_runtime33.JSX.Element;
18
18
  type InlineSelectItenProps = SelectItemProps;
19
- declare function InlineSelectItem(props: InlineSelectItenProps): react_jsx_runtime17.JSX.Element;
19
+ declare function InlineSelectItem(props: InlineSelectItenProps): react_jsx_runtime33.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,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_runtime38 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_runtime22.JSX.Element;
11
+ }: SwitchProps & useInlineEditOptions<boolean>): react_jsx_runtime38.JSX.Element;
12
12
  //#endregion
13
13
  export { InlineSwitch };
14
14
  //# sourceMappingURL=switch.client.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { useInlineEditOptions } from "../hooks/use-inline.client.js";
2
- import * as react_jsx_runtime23 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime39 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_runtime23.JSX.Element;
13
+ }: InlineEditToggleProps): react_jsx_runtime39.JSX.Element;
14
14
  //#endregion
15
15
  export { InlineEditToggleProps, InlineToggle };
16
16
  //# sourceMappingURL=toggle.client.d.ts.map
@@ -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_runtime3 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_runtime3.JSX.Element;
26
26
  //#endregion
27
27
  export { InlineEditContextParams, InlineEditProvider, useInlineEditContext };
28
28
  //# sourceMappingURL=context.client.d.ts.map
@@ -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_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime233 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_runtime3.JSX.Element;
9
+ }: ComponentProps<typeof Button>): react_jsx_runtime233.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,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,11 +1,11 @@
1
- import * as react_jsx_runtime4 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime234 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_runtime4.JSX.Element;
8
+ declare function ImageGrid(props: HTMLAttributes<HTMLElement>): react_jsx_runtime234.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,oBAAA,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_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime232 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_runtime5.JSX.Element;
13
+ }: ImageInputProps): react_jsx_runtime232.JSX.Element;
14
14
  //#endregion
15
15
  export { ImageInput, ImageInputProps };
16
16
  //# sourceMappingURL=input.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,eAAA,GAAkB,KAAA,CAAM,eAAe;mBAChC;;AADP,iBAII,UAAA,CAJW;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAImC,eAJnC,CAAA,EAIkD,kBAAA,CAAA,GAAA,CAAA,OAJlD"}
1
+ {"version":3,"file":"input.client.d.ts","names":[],"sources":["../../../../../src/modules/uploads/components/images/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,eAAA,GAAkB,KAAA,CAAM,eAAe;mBAChC;;AADP,iBAII,UAAA,CAJW;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAImC,eAJnC,CAAA,EAIkD,oBAAA,CAAA,GAAA,CAAA,OAJlD"}
@@ -1,5 +1,5 @@
1
1
  import { DialogTrigger } from "../../../components/ui/dialog.client.js";
2
- import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime236 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_runtime6.JSX.Element;
12
+ }: AssetPreviewDialogProps): react_jsx_runtime236.JSX.Element;
13
13
  declare const AssetPreviewDialogTrigger: typeof DialogTrigger;
14
14
  //#endregion
15
15
  export { AssetPreviewDialog, AssetPreviewDialogTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"preview-dialog.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/preview-dialog.client.tsx"],"sourcesContent":[],"mappings":";;;;KAGK,uBAAA;YACO,KAAA,CAAM;;AAJmE,CAAA;AAQrE,iBAAA,kBAAA,CAAkB;EAAA,QAAA;EAAA;AAAA,CAAA,EAAoB,uBAApB,CAAA,EAA2C,kBAAA,CAAA,GAAA,CAAA,OAA3C;AAAA,cAYrB,yBAZqB,EAAA,OAYI,aAZJ"}
1
+ {"version":3,"file":"preview-dialog.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/preview-dialog.client.tsx"],"sourcesContent":[],"mappings":";;;;KAGK,uBAAA;YACO,KAAA,CAAM;;AAJmE,CAAA;AAQrE,iBAAA,kBAAA,CAAkB;EAAA,QAAA;EAAA;AAAA,CAAA,EAAoB,uBAApB,CAAA,EAA2C,oBAAA,CAAA,GAAA,CAAA,OAA3C;AAAA,cAYrB,yBAZqB,EAAA,OAYI,aAZJ"}
@@ -1,5 +1,5 @@
1
1
  import { UploadFile, UploadZoneContextValue } from "../hooks/use-upload-zone.client.js";
2
- import * as react_jsx_runtime7 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime237 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_runtime7.JSX.Element;
18
+ }: UploadZoneProps<TFile>): react_jsx_runtime237.JSX.Element;
19
19
  //#endregion
20
20
  export { UploadZone };
21
21
  //# sourceMappingURL=zone.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zone.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASyC,KAKpC,eAAA,CAAA,cAA8B,UAAf,CAAA,GAA6B,cAA7B,CAA4C,WAA5C,CAAA,GAAA;EAAA,QAAA,CAAA,EACP,KAAA,CAAM,SADC;OAAe,EAE1B,sBAF0B,CAEH,KAFG,CAAA;;AAAc,iBAKjC,UALiC,CAAA,cAKR,UALQ,CAAA,CAAA;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAU9C,eAV8C,CAU9B,KAV8B,CAAA,CAAA,EAUxB,kBAAA,CAAA,GAAA,CAAA,OAVwB"}
1
+ {"version":3,"file":"zone.client.d.ts","names":[],"sources":["../../../../src/modules/uploads/components/zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASyC,KAKpC,eAAA,CAAA,cAA8B,UAAf,CAAA,GAA6B,cAA7B,CAA4C,WAA5C,CAAA,GAAA;EAAA,QAAA,CAAA,EACP,KAAA,CAAM,SADC;OAAe,EAE1B,sBAF0B,CAEH,KAFG,CAAA;;AAAc,iBAKjC,UALiC,CAAA,cAKR,UALQ,CAAA,CAAA;EAAA,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAU9C,eAV8C,CAU9B,KAV8B,CAAA,CAAA,EAUxB,oBAAA,CAAA,GAAA,CAAA,OAVwB"}
@@ -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,15 +1,15 @@
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
+ import { after } from "next/server";
10
11
  import { GetObjectCommand } from "@aws-sdk/client-s3";
11
12
  import { addSeconds } from "date-fns";
12
- import { after } from "next/server";
13
13
  import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
14
14
 
15
15
  //#region src/modules/uploads/lib/proxy.server.ts
@@ -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,10 +1,10 @@
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
+ import { NextResponse } from "next/server";
5
6
  import { handleUpload } from "@vercel/blob/client";
6
7
  import { del } from "@vercel/blob";
7
- import { NextResponse } from "next/server";
8
8
 
9
9
  //#region src/modules/uploads/lib/route.server.ts
10
10
  /**