@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
package/dist/config.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { baseColumns } from "./modules/config/db/helpers.js";
2
+ import { createPaths } from "./modules/config/paths/helpers.js";
2
3
  import { createRPCClient } from "./modules/config/router/client.js";
3
4
  import { bulkActionSchema } from "./modules/config/router/validators.js";
4
5
 
5
- export { baseColumns, bulkActionSchema, createRPCClient };
6
+ export { baseColumns, bulkActionSchema, createPaths, createRPCClient };
@@ -1,5 +1,5 @@
1
1
  import { IndicatorContext, IndicatorContextProvider, useIndicator } from "./hooks/use-indicator.js";
2
- import { useIsMobile } from "./hooks/use-mobile.client.js";
3
2
  import { useAction } from "./hooks/use-action.js";
3
+ import { useIsMobile } from "./hooks/use-mobile.client.js";
4
4
 
5
5
  export { IndicatorContext, IndicatorContextProvider, useAction, useIndicator, useIsMobile };
@@ -1,4 +1,4 @@
1
- import * as _tanstack_react_query0 from "@tanstack/react-query";
1
+ import * as _tanstack_react_query1 from "@tanstack/react-query";
2
2
  import { DefaultError, MutationFunctionContext, UseMutationOptions } from "@tanstack/react-query";
3
3
  import "client-only";
4
4
 
@@ -12,7 +12,7 @@ import "client-only";
12
12
  */
13
13
  declare function useAction<TData = unknown, TError = DefaultError, TVariables = void, TContext = MutationFunctionContext>(options?: UseMutationOptions<TData, TError, TVariables, TContext> & {
14
14
  onRedirect?: () => void;
15
- }): _tanstack_react_query0.UseMutationResult<TData, TError, TVariables, TContext>;
15
+ }): _tanstack_react_query1.UseMutationResult<TData, TError, TVariables, TContext>;
16
16
  //#endregion
17
17
  export { useAction };
18
18
  //# sourceMappingURL=use-action.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime225 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime374 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
 
4
4
  //#region src/lib/hooks/use-indicator.d.ts
@@ -26,7 +26,7 @@ declare function IndicatorContextProvider({
26
26
  children
27
27
  }: {
28
28
  children: React.ReactNode;
29
- }): react_jsx_runtime225.JSX.Element;
29
+ }): react_jsx_runtime374.JSX.Element;
30
30
  //#endregion
31
31
  export { IndicatorContext, IndicatorContextProvider, IndicatorStatus, useIndicator };
32
32
  //# sourceMappingURL=use-indicator.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { Permission } from "../lib/permissions.js";
2
- import * as react_jsx_runtime220 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime238 from "react/jsx-runtime";
3
3
  import { JSX } from "react";
4
4
 
5
5
  //#region src/modules/auth/components/allowed.client.d.ts
@@ -15,7 +15,7 @@ declare function Allowed({
15
15
  permission,
16
16
  fallback,
17
17
  children
18
- }: AllowedProps): react_jsx_runtime220.JSX.Element;
18
+ }: AllowedProps): react_jsx_runtime238.JSX.Element;
19
19
  //#endregion
20
20
  export { Allowed };
21
21
  //# sourceMappingURL=allowed.client.d.ts.map
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { usePermission } from "../hooks/use-permission.client.js";
4
+ import { usePermission } from "../hooks/use-permission.js";
5
5
  import { Fragment, jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/modules/auth/components/allowed.client.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"allowed.client.js","names":[],"sources":["../../../../src/modules/auth/components/allowed.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { JSX } from \"react\";\nimport { usePermission } from \"../hooks/use-permission.client\";\nimport { type Permission } from \"../lib/permissions\";\n\n/**\n * Allowed\n */\ntype AllowedProps = {\n permission: Permission;\n fallback?: JSX.Element | string;\n children: React.ReactNode;\n};\n\nexport function Allowed({ permission, fallback, children }: AllowedProps) {\n const { data } = usePermission(permission);\n\n if (data?.success) return <>{children}</>;\n\n return <>{fallback}</>;\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,QAAQ,EAAE,YAAY,UAAU,YAA0B;CACxE,MAAM,EAAE,SAAS,cAAc,WAAW;AAE1C,KAAI,MAAM,QAAS,QAAO,gCAAG,WAAY;AAEzC,QAAO,0CAAG,WAAY"}
1
+ {"version":3,"file":"allowed.client.js","names":[],"sources":["../../../../src/modules/auth/components/allowed.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { JSX } from \"react\";\nimport { usePermission } from \"../hooks/use-permission\";\nimport { type Permission } from \"../lib/permissions\";\n\n/**\n * Allowed\n */\ntype AllowedProps = {\n permission: Permission;\n fallback?: JSX.Element | string;\n children: React.ReactNode;\n};\n\nexport function Allowed({ permission, fallback, children }: AllowedProps) {\n const { data } = usePermission(permission);\n\n if (data?.success) return <>{children}</>;\n\n return <>{fallback}</>;\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,QAAQ,EAAE,YAAY,UAAU,YAA0B;CACxE,MAAM,EAAE,SAAS,cAAc,WAAW;AAE1C,KAAI,MAAM,QAAS,QAAO,gCAAG,WAAY;AAEzC,QAAO,0CAAG,WAAY"}
@@ -1,7 +1,7 @@
1
1
  import { Permission } from "../lib/permissions.js";
2
2
  import { TDatabaseSchema } from "../../config/db/types.js";
3
3
  import { TulipConfig } from "../../config/lib/config.server.js";
4
- import * as react_jsx_runtime218 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime190 from "react/jsx-runtime";
5
5
  import { JSX } from "react";
6
6
  import "server-cli-only";
7
7
 
@@ -17,7 +17,7 @@ declare function Allowed<TSchema extends TDatabaseSchema>({
17
17
  permission,
18
18
  fallback,
19
19
  children
20
- }: AllowedProps<TSchema>): Promise<react_jsx_runtime218.JSX.Element>;
20
+ }: AllowedProps<TSchema>): Promise<react_jsx_runtime190.JSX.Element>;
21
21
  //#endregion
22
22
  export { Allowed };
23
23
  //# sourceMappingURL=allowed.server.d.ts.map
@@ -1,5 +1,5 @@
1
- import { getSession } from "../lib/helpers.server.js";
2
1
  import { getTulip } from "../../config/lib/resolve.server.js";
2
+ import { getSession } from "../lib/helpers.server.js";
3
3
  import { Fragment, jsx } from "react/jsx-runtime";
4
4
  import "server-cli-only";
5
5
 
@@ -1,11 +1,10 @@
1
- import { TDatabaseSchema } from "../../config/db/types.js";
2
- import { GetTulipParams } from "../../config/lib/resolve.server.js";
3
- import * as react_jsx_runtime219 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime191 from "react/jsx-runtime";
4
2
  import { PropsWithChildren } from "react";
5
- import "server-cli-only";
6
3
 
7
4
  //#region src/modules/auth/components/auth-layout.server.d.ts
8
- declare function AuthLayout<TSchema extends TDatabaseSchema>(props: PropsWithChildren<GetTulipParams<TSchema>>): Promise<react_jsx_runtime219.JSX.Element>;
5
+ declare function AuthLayout(props: PropsWithChildren<{
6
+ name: string;
7
+ }>): Promise<react_jsx_runtime191.JSX.Element>;
9
8
  //#endregion
10
9
  export { AuthLayout };
11
10
  //# sourceMappingURL=auth-layout.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-layout.server.d.ts","names":[],"sources":["../../../../src/modules/auth/components/auth-layout.server.tsx"],"sourcesContent":[],"mappings":";;;;;;;iBAQsB,2BAA2B,wBACxC,kBAAkB,eAAe,YAAS,QAAA,oBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"auth-layout.server.d.ts","names":[],"sources":["../../../../src/modules/auth/components/auth-layout.server.tsx"],"sourcesContent":[],"mappings":";;;;iBAIsB,UAAA,QAAkB;;KAAmC,QAAA,oBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,12 +1,9 @@
1
- import { getTulip } from "../../config/lib/resolve.server.js";
2
1
  import { jsx, jsxs } from "react/jsx-runtime";
3
2
  import Link from "next/link";
4
- import "server-cli-only";
5
3
  import Image from "next/image";
6
4
 
7
5
  //#region src/modules/auth/components/auth-layout.server.tsx
8
6
  async function AuthLayout(props) {
9
- const { general } = await getTulip(props);
10
7
  return /* @__PURE__ */ jsxs("div", {
11
8
  className: "container relative mx-auto grid h-[100dvh] flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0",
12
9
  children: [/* @__PURE__ */ jsxs("div", {
@@ -21,7 +18,7 @@ async function AuthLayout(props) {
21
18
  /* @__PURE__ */ jsx(Link, {
22
19
  href: "/",
23
20
  className: "relative z-20 flex items-center text-lg font-bold",
24
- children: general.name
21
+ children: props.name
25
22
  }),
26
23
  /* @__PURE__ */ jsx("div", {
27
24
  className: "relative z-20 mt-auto",
@@ -1 +1 @@
1
- {"version":3,"file":"auth-layout.server.js","names":[],"sources":["../../../../src/modules/auth/components/auth-layout.server.tsx"],"sourcesContent":["import \"server-cli-only\";\n\nimport { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { getTulip, GetTulipParams } from \"@/modules/config/lib/resolve.server\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { PropsWithChildren } from \"react\";\n\nexport async function AuthLayout<TSchema extends TDatabaseSchema>(\n props: PropsWithChildren<GetTulipParams<TSchema>>,\n) {\n const { general } = await getTulip(props);\n\n return (\n <div className=\"container relative mx-auto grid h-[100dvh] flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0\">\n <div className=\"bg-muted relative hidden h-full flex-col p-10 text-white lg:flex dark:border-r\">\n <Image src=\"/images/auth-background.jpeg\" alt=\"Background\" className=\"object-cover\" fill />\n\n <Link href=\"/\" className=\"relative z-20 flex items-center text-lg font-bold\">\n {general.name}\n </Link>\n\n <div className=\"relative z-20 mt-auto\">\n <blockquote className=\"space-y-2 text-sm\">Developed by NewCode</blockquote>\n </div>\n </div>\n\n {props.children}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAQA,eAAsB,WACpB,OACA;CACA,MAAM,EAAE,YAAY,MAAM,SAAS,MAAM;AAEzC,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;;IACb,oBAAC;KAAM,KAAI;KAA+B,KAAI;KAAa,WAAU;KAAe;MAAO;IAE3F,oBAAC;KAAK,MAAK;KAAI,WAAU;eACtB,QAAQ;MACJ;IAEP,oBAAC;KAAI,WAAU;eACb,oBAAC;MAAW,WAAU;gBAAoB;OAAiC;MACvE;;IACF,EAEL,MAAM;GACH"}
1
+ {"version":3,"file":"auth-layout.server.js","names":[],"sources":["../../../../src/modules/auth/components/auth-layout.server.tsx"],"sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\nimport { PropsWithChildren } from \"react\";\n\nexport async function AuthLayout(props: PropsWithChildren<{ name: string }>) {\n return (\n <div className=\"container relative mx-auto grid h-[100dvh] flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0\">\n <div className=\"bg-muted relative hidden h-full flex-col p-10 text-white lg:flex dark:border-r\">\n <Image src=\"/images/auth-background.jpeg\" alt=\"Background\" className=\"object-cover\" fill />\n\n <Link href=\"/\" className=\"relative z-20 flex items-center text-lg font-bold\">\n {props.name}\n </Link>\n\n <div className=\"relative z-20 mt-auto\">\n <blockquote className=\"space-y-2 text-sm\">Developed by NewCode</blockquote>\n </div>\n </div>\n\n {props.children}\n </div>\n );\n}\n"],"mappings":";;;;;AAIA,eAAsB,WAAW,OAA4C;AAC3E,QACE,qBAAC;EAAI,WAAU;aACb,qBAAC;GAAI,WAAU;;IACb,oBAAC;KAAM,KAAI;KAA+B,KAAI;KAAa,WAAU;KAAe;MAAO;IAE3F,oBAAC;KAAK,MAAK;KAAI,WAAU;eACtB,MAAM;MACF;IAEP,oBAAC;KAAI,WAAU;eACb,oBAAC;MAAW,WAAU;gBAAoB;OAAiC;MACvE;;IACF,EAEL,MAAM;GACH"}
@@ -0,0 +1,7 @@
1
+ import * as react_jsx_runtime243 from "react/jsx-runtime";
2
+
3
+ //#region src/modules/auth/components/auth-loading.d.ts
4
+ declare function AuthLoading(): react_jsx_runtime243.JSX.Element;
5
+ //#endregion
6
+ export { AuthLoading };
7
+ //# sourceMappingURL=auth-loading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-loading.d.ts","names":[],"sources":["../../../../src/modules/auth/components/auth-loading.tsx"],"sourcesContent":[],"mappings":";;;iBAEgB,WAAA,CAAA,GAAW,oBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { Skeleton } from "../../../components/ui/skeleton.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region src/modules/auth/components/auth-loading.tsx
5
+ function AuthLoading() {
6
+ return /* @__PURE__ */ jsxs("div", {
7
+ className: "flex flex-col gap-4",
8
+ children: [
9
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-full" }),
10
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-48 w-full" }),
11
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-full" })
12
+ ]
13
+ });
14
+ }
15
+
16
+ //#endregion
17
+ export { AuthLoading };
18
+ //# sourceMappingURL=auth-loading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-loading.js","names":[],"sources":["../../../../src/modules/auth/components/auth-loading.tsx"],"sourcesContent":["import { Skeleton } from \"@/components/ui/skeleton\";\n\nexport function AuthLoading() {\n return (\n <div className=\"flex flex-col gap-4\">\n <Skeleton className=\"h-7 w-full\" />\n <Skeleton className=\"h-48 w-full\" />\n <Skeleton className=\"h-12 w-full\" />\n </div>\n );\n}\n"],"mappings":";;;;AAEA,SAAgB,cAAc;AAC5B,QACE,qBAAC;EAAI,WAAU;;GACb,oBAAC,YAAS,WAAU,eAAe;GACnC,oBAAC,YAAS,WAAU,gBAAgB;GACpC,oBAAC,YAAS,WAAU,gBAAgB;;GAChC"}
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime221 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime239 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/modules/auth/components/forget-password-page.client.d.ts
4
- declare function ForgetPasswordPage(): react_jsx_runtime221.JSX.Element;
4
+ declare function ForgetPasswordPage(): react_jsx_runtime239.JSX.Element;
5
5
  //#endregion
6
6
  export { ForgetPasswordPage };
7
7
  //# sourceMappingURL=forget-password-page.client.d.ts.map
@@ -4,14 +4,14 @@
4
4
  import { Icons } from "../../../components/common/icons.js";
5
5
  import { Button } from "../../../components/ui/button.js";
6
6
  import { authClient } from "../handler/client.client.js";
7
- import { Input } from "../../../components/ui/input.js";
8
7
  import { Form as Form$1, FormControl, FormField, FormItem, FormMessage } from "../../../components/ui/form.client.js";
8
+ import { Input } from "../../../components/ui/input.js";
9
9
  import { forgotPasswordSchema } from "../lib/validators.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import React from "react";
12
- import { toast } from "sonner";
13
12
  import { useForm } from "react-hook-form";
14
13
  import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
14
+ import { toast } from "sonner";
15
15
 
16
16
  //#region src/modules/auth/components/forget-password-page.client.tsx
17
17
  function ForgetPasswordPage() {
@@ -0,0 +1,16 @@
1
+ "use client";
2
+
3
+
4
+ import { useSession } from "../hooks/use-session.js";
5
+ import { Fragment, jsx } from "react/jsx-runtime";
6
+ import { redirect } from "next/navigation";
7
+
8
+ //#region src/modules/auth/components/guard.tsx
9
+ function AuthGuard({ children }) {
10
+ if (!useSession().data) redirect("/auth/login");
11
+ return /* @__PURE__ */ jsx(Fragment, { children });
12
+ }
13
+
14
+ //#endregion
15
+ export { AuthGuard };
16
+ //# sourceMappingURL=guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard.js","names":[],"sources":["../../../../src/modules/auth/components/guard.tsx"],"sourcesContent":["\"use client\";\n\nimport { redirect } from \"next/navigation\";\nimport { PropsWithChildren } from \"react\";\nimport { useSession } from \"../hooks/use-session\";\n\nexport function AuthGuard({ children }: PropsWithChildren) {\n const session = useSession();\n if (!session.data) redirect(\"/auth/login\");\n\n return <>{children}</>;\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,UAAU,EAAE,YAA+B;AAEzD,KAAI,CADY,YAAY,CACf,KAAM,UAAS,cAAc;AAE1C,QAAO,gCAAG,WAAY"}
@@ -1,11 +1,7 @@
1
- import * as react_jsx_runtime222 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime240 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/modules/auth/components/login-page.client.d.ts
4
- declare function LoginPage(props: {
5
- searchParams: Promise<{
6
- callbackURL?: string;
7
- }>;
8
- }): react_jsx_runtime222.JSX.Element;
4
+ declare function LoginPage(): react_jsx_runtime240.JSX.Element;
9
5
  //#endregion
10
6
  export { LoginPage };
11
7
  //# sourceMappingURL=login-page.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-page.client.d.ts","names":[],"sources":["../../../../src/modules/auth/components/login-page.client.tsx"],"sourcesContent":[],"mappings":";;;iBAgBgB,SAAA;gBAAiC;;EAAjC,CAAA,CAAA;CAAS,CAAA,EAA2D,oBAAA,CAAA,GAAA,CAAA,OAA3D"}
1
+ {"version":3,"file":"login-page.client.d.ts","names":[],"sources":["../../../../src/modules/auth/components/login-page.client.tsx"],"sourcesContent":[],"mappings":";;;iBAiBgB,SAAA,CAAA,GAAS,oBAAA,CAAA,GAAA,CAAA"}
@@ -4,20 +4,21 @@
4
4
  import { Icons } from "../../../components/common/icons.js";
5
5
  import { Button } from "../../../components/ui/button.js";
6
6
  import { authClient } from "../handler/client.client.js";
7
- import { Input } from "../../../components/ui/input.js";
8
7
  import { Form as Form$1, FormControl, FormField, FormItem, FormMessage } from "../../../components/ui/form.client.js";
8
+ import { Input } from "../../../components/ui/input.js";
9
9
  import { loginSchema } from "../lib/validators.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
- import React, { use } from "react";
11
+ import React from "react";
12
12
  import Link from "next/link";
13
- import { useRouter } from "next/navigation";
14
- import { toast } from "sonner";
15
13
  import { useForm } from "react-hook-form";
16
14
  import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
15
+ import { toast } from "sonner";
16
+ import { useRouter } from "next/navigation";
17
+ import { parseAsString, useQueryState } from "nuqs";
17
18
 
18
19
  //#region src/modules/auth/components/login-page.client.tsx
19
- function LoginPage(props) {
20
- const { callbackURL } = use(props.searchParams);
20
+ function LoginPage() {
21
+ const [callbackURL] = useQueryState("callbackURL", parseAsString);
21
22
  const router = useRouter();
22
23
  const [isPending, startTransition$1] = React.useTransition();
23
24
  const form = useForm({
@@ -1 +1 @@
1
- {"version":3,"file":"login-page.client.js","names":["startTransition","Form"],"sources":["../../../../src/modules/auth/components/login-page.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { Form, FormControl, FormField, FormItem, FormMessage } from \"@/components/ui/form.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/navigation\";\nimport React, { use } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport * as z from \"zod\";\nimport { authClient } from \"../handler/client.client\";\nimport { loginSchema } from \"../lib/validators\";\n\nexport function LoginPage(props: { searchParams: Promise<{ callbackURL?: string }> }) {\n const { callbackURL } = use(props.searchParams);\n\n const router = useRouter();\n\n const [isPending, startTransition] = React.useTransition();\n\n const form = useForm<z.infer<typeof loginSchema>>({\n resolver: standardSchemaResolver(loginSchema),\n defaultValues: { email: \"\", password: \"\" },\n disabled: isPending,\n });\n\n return (\n <div className=\"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]\">\n <div className=\"flex flex-col space-y-2 text-center\">\n <h1 className=\"text-3xl font-semibold tracking-tight\">Login</h1>\n <p className=\"text-muted-foreground text-sm\">\n Schrijf je email en wachtwoord in om in te loggen.\n </p>\n </div>\n\n <Form {...form}>\n <form\n className=\"space-y-6\"\n onSubmit={form.handleSubmit((data) =>\n startTransition(async () => {\n await authClient.signIn.email(data, {\n onSuccess: () => {\n router.replace(callbackURL ?? \"/\");\n toast.success(\"Succesvol ingelogd\");\n },\n onError: ({ error }) => {\n console.error(\"Login error: \", error);\n\n if (error.status === 401) {\n toast.error(\"Ongeldige email of wachtwoord\");\n return;\n }\n\n if (error.status === 403) {\n toast.error(\"Account is geblokkeerd\");\n return;\n }\n\n if (error.status === 429) {\n toast.error(\"Te veel login pogingen\");\n return;\n }\n\n toast.error(\"Er is iets misgegaan\");\n },\n });\n }),\n )}\n >\n <div className=\"flex flex-col gap-3\">\n <FormField\n control={form.control}\n name=\"email\"\n render={({ field }) => (\n <FormItem>\n <FormControl>\n <Input placeholder=\"email@example.be\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n control={form.control}\n name=\"password\"\n render={({ field }) => (\n <FormItem>\n <FormControl>\n <Input type=\"password\" placeholder=\"********\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </div>\n\n <Button disabled={form.formState.disabled} className=\"w-full\">\n {isPending && <Icons.spinner className=\"mr-2 h-4 w-4 animate-spin\" />}\n Inloggen\n </Button>\n </form>\n </Form>\n\n <p className=\"text-muted-foreground px-8 text-center text-sm\">\n <Link\n href=\"/auth/forget-password\"\n className=\"hover:text-primary underline underline-offset-4\"\n >\n Wachtwoord vergeten\n </Link>\n </p>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,SAAgB,UAAU,OAA4D;CACpF,MAAM,EAAE,gBAAgB,IAAI,MAAM,aAAa;CAE/C,MAAM,SAAS,WAAW;CAE1B,MAAM,CAAC,WAAWA,qBAAmB,MAAM,eAAe;CAE1D,MAAM,OAAO,QAAqC;EAChD,UAAU,uBAAuB,YAAY;EAC7C,eAAe;GAAE,OAAO;GAAI,UAAU;GAAI;EAC1C,UAAU;EACX,CAAC;AAEF,QACE,qBAAC;EAAI,WAAU;;GACb,qBAAC;IAAI,WAAU;eACb,oBAAC;KAAG,WAAU;eAAwC;MAAU,EAChE,oBAAC;KAAE,WAAU;eAAgC;MAEzC;KACA;GAEN,oBAACC;IAAK,GAAI;cACR,qBAAC;KACC,WAAU;KACV,UAAU,KAAK,cAAc,SAC3BD,kBAAgB,YAAY;AAC1B,YAAM,WAAW,OAAO,MAAM,MAAM;OAClC,iBAAiB;AACf,eAAO,QAAQ,eAAe,IAAI;AAClC,cAAM,QAAQ,qBAAqB;;OAErC,UAAU,EAAE,YAAY;AACtB,gBAAQ,MAAM,iBAAiB,MAAM;AAErC,YAAI,MAAM,WAAW,KAAK;AACxB,eAAM,MAAM,gCAAgC;AAC5C;;AAGF,YAAI,MAAM,WAAW,KAAK;AACxB,eAAM,MAAM,yBAAyB;AACrC;;AAGF,YAAI,MAAM,WAAW,KAAK;AACxB,eAAM,MAAM,yBAAyB;AACrC;;AAGF,cAAM,MAAM,uBAAuB;;OAEtC,CAAC;OACF,CACH;gBAED,qBAAC;MAAI,WAAU;iBACb,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC,uBACC,oBAAC,yBACC,oBAAC;QAAM,aAAY;QAAmB,GAAI;SAAS,GACvC,EACd,oBAAC,gBAAc,IACN;QAEb,EAEF,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC,uBACC,oBAAC,yBACC,oBAAC;QAAM,MAAK;QAAW,aAAY;QAAW,GAAI;SAAS,GAC/C,EACd,oBAAC,gBAAc,IACN;QAEb;OACE,EAEN,qBAAC;MAAO,UAAU,KAAK,UAAU;MAAU,WAAU;iBAClD,aAAa,oBAAC,MAAM,WAAQ,WAAU,8BAA8B,EAAC;OAE/D;MACJ;KACF;GAEP,oBAAC;IAAE,WAAU;cACX,oBAAC;KACC,MAAK;KACL,WAAU;eACX;MAEM;KACL;;GACA"}
1
+ {"version":3,"file":"login-page.client.js","names":["startTransition","Form"],"sources":["../../../../src/modules/auth/components/login-page.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { Form, FormControl, FormField, FormItem, FormMessage } from \"@/components/ui/form.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { standardSchemaResolver } from \"@hookform/resolvers/standard-schema\";\nimport Link from \"next/link\";\nimport { useRouter } from \"next/navigation\";\nimport { parseAsString, useQueryState } from \"nuqs\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport * as z from \"zod\";\nimport { authClient } from \"../handler/client.client\";\nimport { loginSchema } from \"../lib/validators\";\n\nexport function LoginPage() {\n const [callbackURL] = useQueryState(\"callbackURL\", parseAsString);\n\n const router = useRouter();\n\n const [isPending, startTransition] = React.useTransition();\n\n const form = useForm<z.infer<typeof loginSchema>>({\n resolver: standardSchemaResolver(loginSchema),\n defaultValues: { email: \"\", password: \"\" },\n disabled: isPending,\n });\n\n return (\n <div className=\"mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]\">\n <div className=\"flex flex-col space-y-2 text-center\">\n <h1 className=\"text-3xl font-semibold tracking-tight\">Login</h1>\n <p className=\"text-muted-foreground text-sm\">\n Schrijf je email en wachtwoord in om in te loggen.\n </p>\n </div>\n\n <Form {...form}>\n <form\n className=\"space-y-6\"\n onSubmit={form.handleSubmit((data) =>\n startTransition(async () => {\n await authClient.signIn.email(data, {\n onSuccess: () => {\n router.replace(callbackURL ?? \"/\");\n toast.success(\"Succesvol ingelogd\");\n },\n onError: ({ error }) => {\n console.error(\"Login error: \", error);\n\n if (error.status === 401) {\n toast.error(\"Ongeldige email of wachtwoord\");\n return;\n }\n\n if (error.status === 403) {\n toast.error(\"Account is geblokkeerd\");\n return;\n }\n\n if (error.status === 429) {\n toast.error(\"Te veel login pogingen\");\n return;\n }\n\n toast.error(\"Er is iets misgegaan\");\n },\n });\n }),\n )}\n >\n <div className=\"flex flex-col gap-3\">\n <FormField\n control={form.control}\n name=\"email\"\n render={({ field }) => (\n <FormItem>\n <FormControl>\n <Input placeholder=\"email@example.be\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n control={form.control}\n name=\"password\"\n render={({ field }) => (\n <FormItem>\n <FormControl>\n <Input type=\"password\" placeholder=\"********\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </div>\n\n <Button disabled={form.formState.disabled} className=\"w-full\">\n {isPending && <Icons.spinner className=\"mr-2 h-4 w-4 animate-spin\" />}\n Inloggen\n </Button>\n </form>\n </Form>\n\n <p className=\"text-muted-foreground px-8 text-center text-sm\">\n <Link\n href=\"/auth/forget-password\"\n className=\"hover:text-primary underline underline-offset-4\"\n >\n Wachtwoord vergeten\n </Link>\n </p>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,SAAgB,YAAY;CAC1B,MAAM,CAAC,eAAe,cAAc,eAAe,cAAc;CAEjE,MAAM,SAAS,WAAW;CAE1B,MAAM,CAAC,WAAWA,qBAAmB,MAAM,eAAe;CAE1D,MAAM,OAAO,QAAqC;EAChD,UAAU,uBAAuB,YAAY;EAC7C,eAAe;GAAE,OAAO;GAAI,UAAU;GAAI;EAC1C,UAAU;EACX,CAAC;AAEF,QACE,qBAAC;EAAI,WAAU;;GACb,qBAAC;IAAI,WAAU;eACb,oBAAC;KAAG,WAAU;eAAwC;MAAU,EAChE,oBAAC;KAAE,WAAU;eAAgC;MAEzC;KACA;GAEN,oBAACC;IAAK,GAAI;cACR,qBAAC;KACC,WAAU;KACV,UAAU,KAAK,cAAc,SAC3BD,kBAAgB,YAAY;AAC1B,YAAM,WAAW,OAAO,MAAM,MAAM;OAClC,iBAAiB;AACf,eAAO,QAAQ,eAAe,IAAI;AAClC,cAAM,QAAQ,qBAAqB;;OAErC,UAAU,EAAE,YAAY;AACtB,gBAAQ,MAAM,iBAAiB,MAAM;AAErC,YAAI,MAAM,WAAW,KAAK;AACxB,eAAM,MAAM,gCAAgC;AAC5C;;AAGF,YAAI,MAAM,WAAW,KAAK;AACxB,eAAM,MAAM,yBAAyB;AACrC;;AAGF,YAAI,MAAM,WAAW,KAAK;AACxB,eAAM,MAAM,yBAAyB;AACrC;;AAGF,cAAM,MAAM,uBAAuB;;OAEtC,CAAC;OACF,CACH;gBAED,qBAAC;MAAI,WAAU;iBACb,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC,uBACC,oBAAC,yBACC,oBAAC;QAAM,aAAY;QAAmB,GAAI;SAAS,GACvC,EACd,oBAAC,gBAAc,IACN;QAEb,EAEF,oBAAC;OACC,SAAS,KAAK;OACd,MAAK;OACL,SAAS,EAAE,YACT,qBAAC,uBACC,oBAAC,yBACC,oBAAC;QAAM,MAAK;QAAW,aAAY;QAAW,GAAI;SAAS,GAC/C,EACd,oBAAC,gBAAc,IACN;QAEb;OACE,EAEN,qBAAC;MAAO,UAAU,KAAK,UAAU;MAAU,WAAU;iBAClD,aAAa,oBAAC,MAAM,WAAQ,WAAU,8BAA8B,EAAC;OAE/D;MACJ;KACF;GAEP,oBAAC;IAAE,WAAU;cACX,oBAAC;KACC,MAAK;KACL,WAAU;eACX;MAEM;KACL;;GACA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime223 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime241 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/modules/auth/components/reset-password-page.client.d.ts
4
4
  declare function ResetPasswordPage(params: {
@@ -6,7 +6,7 @@ declare function ResetPasswordPage(params: {
6
6
  email: string;
7
7
  otp: string;
8
8
  }>;
9
- }): react_jsx_runtime223.JSX.Element;
9
+ }): react_jsx_runtime241.JSX.Element;
10
10
  //#endregion
11
11
  export { ResetPasswordPage };
12
12
  //# sourceMappingURL=reset-password-page.client.d.ts.map
@@ -4,15 +4,15 @@
4
4
  import { Icons } from "../../../components/common/icons.js";
5
5
  import { Button } from "../../../components/ui/button.js";
6
6
  import { authClient } from "../handler/client.client.js";
7
- import { Input } from "../../../components/ui/input.js";
8
7
  import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.client.js";
8
+ import { Input } from "../../../components/ui/input.js";
9
9
  import { resetPasswordSchema } from "../lib/validators.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import React, { use } from "react";
12
- import { useRouter } from "next/navigation";
13
- import { toast } from "sonner";
14
12
  import { useForm } from "react-hook-form";
15
13
  import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
14
+ import { toast } from "sonner";
15
+ import { useRouter } from "next/navigation";
16
16
 
17
17
  //#region src/modules/auth/components/reset-password-page.client.tsx
18
18
  function ResetPasswordPage(params) {
@@ -1,6 +1,6 @@
1
- import { CommandFormDialogTrigger } from "../../commands/components/form-dialog-command.client.js";
2
1
  import { UpdatePasswordSchema } from "../lib/validators.js";
3
- import * as react_jsx_runtime224 from "react/jsx-runtime";
2
+ import { CommandFormDialogTrigger } from "../../commands/components/form-dialog-command.client.js";
3
+ import * as react_jsx_runtime242 from "react/jsx-runtime";
4
4
  import React from "react";
5
5
 
6
6
  //#region src/modules/auth/components/update-password-command.d.ts
@@ -13,7 +13,7 @@ declare function UpdatePasswordCommand({
13
13
  action,
14
14
  defaultValues,
15
15
  children
16
- }: UpdatePasswordCommandProps): react_jsx_runtime224.JSX.Element;
16
+ }: UpdatePasswordCommandProps): react_jsx_runtime242.JSX.Element;
17
17
  declare const UpdatePasswordCommandTrigger: typeof CommandFormDialogTrigger;
18
18
  //#endregion
19
19
  export { UpdatePasswordCommand, UpdatePasswordCommandProps, UpdatePasswordCommandTrigger };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { Input } from "../../../components/ui/input.js";
5
4
  import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.client.js";
5
+ import { Input } from "../../../components/ui/input.js";
6
6
  import { updatePasswordSchema } from "../lib/validators.js";
7
7
  import { CommandFormDialog, CommandFormDialogCancel, CommandFormDialogContent, CommandFormDialogFooter, CommandFormDialogHeader, CommandFormDialogSubmit, CommandFormDialogTitle, CommandFormDialogTrigger } from "../../commands/components/form-dialog-command.client.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";