@tulip-systems/core 0.2.1 → 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 (396) 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/fixed-menu.client.d.ts +2 -2
  17. package/dist/components/editor/context.client.d.ts +4 -4
  18. package/dist/components/editor/context.client.d.ts.map +1 -1
  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/empty-page.d.ts.map +1 -1
  42. package/dist/components/layouts/list-layout.d.ts +2 -2
  43. package/dist/components/layouts/list-layout.d.ts.map +1 -1
  44. package/dist/components/layouts/not-found-page.d.ts +2 -2
  45. package/dist/components/layouts/not-found-page.d.ts.map +1 -1
  46. package/dist/components/layouts/providers.client.d.ts +2 -2
  47. package/dist/components/layouts/root-layout.server.d.ts +2 -2
  48. package/dist/components/layouts/root-layout.server.d.ts.map +1 -1
  49. package/dist/components/layouts/root-loading.d.ts +7 -0
  50. package/dist/components/layouts/root-loading.d.ts.map +1 -0
  51. package/dist/components/layouts/root-loading.js +14 -0
  52. package/dist/components/layouts/root-loading.js.map +1 -0
  53. package/dist/components/layouts/tab-layout.d.ts +2 -2
  54. package/dist/components/layouts/tab-layout.d.ts.map +1 -1
  55. package/dist/components/lists/data-list.d.ts +5 -5
  56. package/dist/components/lists/data-list.d.ts.map +1 -1
  57. package/dist/components/lists/data-stack.d.ts +8 -8
  58. package/dist/components/lists/data-stack.d.ts.map +1 -1
  59. package/dist/components/{layouts → navigation}/admin-sidebar-header.client.js +8 -9
  60. package/dist/components/navigation/admin-sidebar-header.client.js.map +1 -0
  61. package/dist/components/navigation/admin-sidebar-paths.client.d.ts +81 -0
  62. package/dist/components/navigation/admin-sidebar-paths.client.d.ts.map +1 -0
  63. package/dist/components/navigation/admin-sidebar-paths.client.js +143 -0
  64. package/dist/components/navigation/admin-sidebar-paths.client.js.map +1 -0
  65. package/dist/components/navigation/admin-sidebar-skeleton.js +31 -0
  66. package/dist/components/navigation/admin-sidebar-skeleton.js.map +1 -0
  67. package/dist/components/server.d.ts +1 -1
  68. package/dist/components/server.js +1 -1
  69. package/dist/components/ui/accordion.d.ts +5 -5
  70. package/dist/components/ui/accordion.d.ts.map +1 -1
  71. package/dist/components/ui/alert-dialog.d.ts +12 -12
  72. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  73. package/dist/components/ui/alert.d.ts +6 -6
  74. package/dist/components/ui/alert.d.ts.map +1 -1
  75. package/dist/components/ui/aspect-ratio.d.ts +2 -2
  76. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  77. package/dist/components/ui/avatar.client.d.ts +4 -4
  78. package/dist/components/ui/badge.d.ts +4 -4
  79. package/dist/components/ui/badge.d.ts.map +1 -1
  80. package/dist/components/ui/breadcrumb.d.ts +8 -8
  81. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  82. package/dist/components/ui/button.d.ts +5 -5
  83. package/dist/components/ui/button.d.ts.map +1 -1
  84. package/dist/components/ui/calendar.d.ts +2 -2
  85. package/dist/components/ui/calendar.d.ts.map +1 -1
  86. package/dist/components/ui/card.d.ts +7 -7
  87. package/dist/components/ui/card.d.ts.map +1 -1
  88. package/dist/components/ui/carousel.d.ts +6 -6
  89. package/dist/components/ui/carousel.d.ts.map +1 -1
  90. package/dist/components/ui/chart.client.d.ts +5 -5
  91. package/dist/components/ui/checkbox.d.ts +2 -2
  92. package/dist/components/ui/checkbox.d.ts.map +1 -1
  93. package/dist/components/ui/collapsible.client.d.ts +4 -4
  94. package/dist/components/ui/color-picker.client.d.ts +2 -2
  95. package/dist/components/ui/combobox-dropdown.client.d.ts +2 -2
  96. package/dist/components/ui/combobox.client.d.ts +2 -2
  97. package/dist/components/ui/command.d.ts +10 -10
  98. package/dist/components/ui/command.d.ts.map +1 -1
  99. package/dist/components/ui/context-menu.d.ts +16 -16
  100. package/dist/components/ui/dialog.client.d.ts +11 -11
  101. package/dist/components/ui/drawer.client.d.ts +11 -11
  102. package/dist/components/ui/dropdown-menu.d.ts +16 -16
  103. package/dist/components/ui/form.client.d.ts +8 -8
  104. package/dist/components/ui/hover-card.client.d.ts +4 -4
  105. package/dist/components/ui/input.d.ts +2 -2
  106. package/dist/components/ui/label.d.ts +2 -2
  107. package/dist/components/ui/navigation-menu.d.ts +11 -11
  108. package/dist/components/ui/pagination.d.ts +8 -8
  109. package/dist/components/ui/pagination.d.ts.map +1 -1
  110. package/dist/components/ui/popover.d.ts +5 -5
  111. package/dist/components/ui/progress.client.d.ts +2 -2
  112. package/dist/components/ui/radio-group.d.ts +3 -3
  113. package/dist/components/ui/resizable.client.d.ts +4 -4
  114. package/dist/components/ui/scroll-area.d.ts +3 -3
  115. package/dist/components/ui/select.client.d.ts +11 -11
  116. package/dist/components/ui/separator.d.ts +2 -2
  117. package/dist/components/ui/sheet.client.d.ts +9 -9
  118. package/dist/components/ui/sidebar.client.d.ts +26 -26
  119. package/dist/components/ui/sidebar.client.js +1 -1
  120. package/dist/components/ui/skeleton.d.ts +2 -2
  121. package/dist/components/ui/slider.d.ts +2 -2
  122. package/dist/components/ui/sonner.client.d.ts +2 -2
  123. package/dist/components/ui/sonner.client.js +1 -1
  124. package/dist/components/ui/spinner.js +63 -0
  125. package/dist/components/ui/spinner.js.map +1 -0
  126. package/dist/components/ui/switch.d.ts +2 -2
  127. package/dist/components/ui/tabs.d.ts +5 -5
  128. package/dist/components/ui/textarea.d.ts +2 -2
  129. package/dist/components/ui/time-input.client.d.ts +2 -2
  130. package/dist/components/ui/toggle-group.client.d.ts +3 -3
  131. package/dist/components/ui/toggle.d.ts +2 -2
  132. package/dist/components/ui/toggle.d.ts.map +1 -1
  133. package/dist/components/ui/tooltip.client.d.ts +5 -5
  134. package/dist/components/ui/tree.client.d.ts +5 -5
  135. package/dist/components.d.ts +5 -4
  136. package/dist/components.js +7 -6
  137. package/dist/config/server.d.ts +2 -3
  138. package/dist/config/server.js +3 -4
  139. package/dist/config.d.ts +3 -2
  140. package/dist/config.js +2 -1
  141. package/dist/lib/client.js +1 -1
  142. package/dist/lib/hooks/use-action.d.ts +2 -2
  143. package/dist/lib/hooks/use-indicator.d.ts +2 -2
  144. package/dist/modules/auth/components/allowed.client.d.ts +2 -2
  145. package/dist/modules/auth/components/allowed.client.js +1 -1
  146. package/dist/modules/auth/components/allowed.client.js.map +1 -1
  147. package/dist/modules/auth/components/allowed.server.d.ts +2 -2
  148. package/dist/modules/auth/components/allowed.server.d.ts.map +1 -1
  149. package/dist/modules/auth/components/allowed.server.js +1 -1
  150. package/dist/modules/auth/components/auth-layout.server.d.ts +4 -5
  151. package/dist/modules/auth/components/auth-layout.server.d.ts.map +1 -1
  152. package/dist/modules/auth/components/auth-layout.server.js +1 -4
  153. package/dist/modules/auth/components/auth-layout.server.js.map +1 -1
  154. package/dist/modules/auth/components/auth-loading.d.ts +7 -0
  155. package/dist/modules/auth/components/auth-loading.d.ts.map +1 -0
  156. package/dist/modules/auth/components/auth-loading.js +18 -0
  157. package/dist/modules/auth/components/auth-loading.js.map +1 -0
  158. package/dist/modules/auth/components/forget-password-page.client.d.ts +2 -2
  159. package/dist/modules/auth/components/forget-password-page.client.js +2 -2
  160. package/dist/modules/auth/components/guard.js +16 -0
  161. package/dist/modules/auth/components/guard.js.map +1 -0
  162. package/dist/modules/auth/components/login-page.client.d.ts +2 -6
  163. package/dist/modules/auth/components/login-page.client.d.ts.map +1 -1
  164. package/dist/modules/auth/components/login-page.client.js +7 -6
  165. package/dist/modules/auth/components/login-page.client.js.map +1 -1
  166. package/dist/modules/auth/components/reset-password-page.client.d.ts +2 -2
  167. package/dist/modules/auth/components/reset-password-page.client.js +3 -3
  168. package/dist/modules/auth/components/update-password-command.d.ts +3 -3
  169. package/dist/modules/auth/components/update-password-command.js +1 -1
  170. package/dist/modules/auth/handler/client.client.d.ts +48 -48
  171. package/dist/modules/auth/handler/client.client.d.ts.map +1 -1
  172. package/dist/modules/auth/hooks/use-permission.d.ts +26 -0
  173. package/dist/modules/auth/hooks/use-permission.d.ts.map +1 -0
  174. package/dist/modules/auth/hooks/{use-permission.client.js → use-permission.js} +5 -3
  175. package/dist/modules/auth/hooks/use-permission.js.map +1 -0
  176. package/dist/modules/auth/hooks/use-session.d.ts +34 -0
  177. package/dist/modules/auth/hooks/use-session.d.ts.map +1 -0
  178. package/dist/modules/auth/hooks/use-session.js +21 -0
  179. package/dist/modules/auth/hooks/use-session.js.map +1 -0
  180. package/dist/modules/auth/lib/helpers.server.d.ts +1 -1
  181. package/dist/modules/auth/lib/helpers.server.js +2 -2
  182. package/dist/modules/auth/lib/validators.d.ts +1 -1
  183. package/dist/modules/auth/lib/validators.d.ts.map +1 -1
  184. package/dist/modules/auth/lib/validators.js +1 -1
  185. package/dist/modules/auth/lib/validators.js.map +1 -1
  186. package/dist/modules/commands/components/alert-dialog-command.client.d.ts +11 -11
  187. package/dist/modules/commands/components/alert-dialog-command.client.d.ts.map +1 -1
  188. package/dist/modules/commands/components/alert-dialog-command.client.js +1 -1
  189. package/dist/modules/commands/components/click-command.client.d.ts +2 -2
  190. package/dist/modules/commands/components/click-command.client.d.ts.map +1 -1
  191. package/dist/modules/commands/components/command-trigger.client.d.ts +6 -6
  192. package/dist/modules/commands/components/command-trigger.client.d.ts.map +1 -1
  193. package/dist/modules/commands/components/command-trigger.client.js +1 -1
  194. package/dist/modules/commands/components/dialog-command.client.d.ts +8 -8
  195. package/dist/modules/commands/components/dialog-command.client.d.ts.map +1 -1
  196. package/dist/modules/commands/components/dialog-command.client.js +1 -1
  197. package/dist/modules/commands/components/dropdown-command.client.d.ts +5 -5
  198. package/dist/modules/commands/components/dropdown-command.client.d.ts.map +1 -1
  199. package/dist/modules/commands/components/empty-command.client.d.ts +2 -2
  200. package/dist/modules/commands/components/empty-command.client.d.ts.map +1 -1
  201. package/dist/modules/commands/components/form-dialog-command.client.d.ts +12 -12
  202. package/dist/modules/commands/components/form-dialog-command.client.d.ts.map +1 -1
  203. package/dist/modules/commands/components/form-dialog-command.client.js +1 -1
  204. package/dist/modules/commands/hooks/use-command-action.client.js +1 -1
  205. package/dist/modules/commands/hooks/use-command-menu.client.js +1 -1
  206. package/dist/modules/commands/hooks/use-command-menu.client.js.map +1 -1
  207. package/dist/modules/commands/menus/context-menu.client.d.ts +2 -2
  208. package/dist/modules/commands/menus/context-menu.client.d.ts.map +1 -1
  209. package/dist/modules/commands/menus/dropdown-menu.client.d.ts +8 -4
  210. package/dist/modules/commands/menus/dropdown-menu.client.d.ts.map +1 -1
  211. package/dist/modules/commands/menus/dropdown-menu.client.js +9 -1
  212. package/dist/modules/commands/menus/dropdown-menu.client.js.map +1 -1
  213. package/dist/modules/commands/menus/inline-menu.client.d.ts +8 -4
  214. package/dist/modules/commands/menus/inline-menu.client.d.ts.map +1 -1
  215. package/dist/modules/commands/menus/inline-menu.client.js +12 -1
  216. package/dist/modules/commands/menus/inline-menu.client.js.map +1 -1
  217. package/dist/modules/commands/menus/responsive-menu.client.d.ts +4 -3
  218. package/dist/modules/commands/menus/responsive-menu.client.d.ts.map +1 -1
  219. package/dist/modules/commands/menus/responsive-menu.client.js +6 -3
  220. package/dist/modules/commands/menus/responsive-menu.client.js.map +1 -1
  221. package/dist/modules/commands/utils/archive-command.client.d.ts +3 -3
  222. package/dist/modules/commands/utils/archive-command.client.d.ts.map +1 -1
  223. package/dist/modules/commands/utils/delete-command.client.d.ts +2 -2
  224. package/dist/modules/commands/utils/delete-command.client.d.ts.map +1 -1
  225. package/dist/modules/commands/utils/send-mail-command.client.d.ts +2 -2
  226. package/dist/modules/commands/utils/send-mail-command.client.d.ts.map +1 -1
  227. package/dist/modules/commands/utils/send-mail-command.client.js +3 -3
  228. package/dist/modules/config/db/helpers.d.ts +5 -5
  229. package/dist/modules/config/db/helpers.d.ts.map +1 -1
  230. package/dist/modules/config/lib/config.server.d.ts +0 -2
  231. package/dist/modules/config/lib/config.server.d.ts.map +1 -1
  232. package/dist/modules/config/lib/config.server.js.map +1 -1
  233. package/dist/modules/config/lib/resolve.server.d.ts +189 -190
  234. package/dist/modules/config/lib/resolve.server.d.ts.map +1 -1
  235. package/dist/modules/config/paths/helpers.d.ts +11 -0
  236. package/dist/modules/config/paths/helpers.d.ts.map +1 -0
  237. package/dist/modules/config/paths/helpers.js +9 -0
  238. package/dist/modules/config/paths/helpers.js.map +1 -0
  239. package/dist/modules/config/paths/types.d.ts +8 -37
  240. package/dist/modules/config/paths/types.d.ts.map +1 -1
  241. package/dist/modules/config/router/client.server.d.ts +4 -4
  242. package/dist/modules/config/router/client.server.d.ts.map +1 -1
  243. package/dist/modules/config/router/context.server.d.ts +191 -192
  244. package/dist/modules/config/router/context.server.d.ts.map +1 -1
  245. package/dist/modules/config/router/init.server.d.ts +196 -197
  246. package/dist/modules/config/router/init.server.d.ts.map +1 -1
  247. package/dist/modules/data-tables/components/cell/common.client.d.ts +5 -5
  248. package/dist/modules/data-tables/components/cell/common.client.d.ts.map +1 -1
  249. package/dist/modules/data-tables/components/column-header.d.ts +2 -2
  250. package/dist/modules/data-tables/components/column-header.d.ts.map +1 -1
  251. package/dist/modules/data-tables/components/filters/combobox.client.d.ts +2 -2
  252. package/dist/modules/data-tables/components/filters/combobox.client.d.ts.map +1 -1
  253. package/dist/modules/data-tables/components/filters/combobox.client.js +1 -1
  254. package/dist/modules/data-tables/components/filters/combobox.client.js.map +1 -1
  255. package/dist/modules/data-tables/components/filters/slider.client.d.ts +2 -2
  256. package/dist/modules/data-tables/components/filters/slider.client.d.ts.map +1 -1
  257. package/dist/modules/data-tables/components/header.d.ts +4 -4
  258. package/dist/modules/data-tables/components/header.d.ts.map +1 -1
  259. package/dist/modules/data-tables/components/layout.d.ts +2 -2
  260. package/dist/modules/data-tables/components/layout.d.ts.map +1 -1
  261. package/dist/modules/data-tables/components/search-input.client.d.ts +2 -2
  262. package/dist/modules/data-tables/components/search-input.client.d.ts.map +1 -1
  263. package/dist/modules/data-tables/components/skeleton.d.ts +2 -2
  264. package/dist/modules/data-tables/components/skeleton.d.ts.map +1 -1
  265. package/dist/modules/data-tables/components/table.d.ts +7 -7
  266. package/dist/modules/data-tables/components/table.d.ts.map +1 -1
  267. package/dist/modules/data-tables/components/toolbar.d.ts +3 -3
  268. package/dist/modules/data-tables/components/toolbar.d.ts.map +1 -1
  269. package/dist/modules/data-tables/hooks/use-context.client.d.ts +2 -2
  270. package/dist/modules/data-tables/hooks/use-context.client.d.ts.map +1 -1
  271. package/dist/modules/data-tables/lib/filters/resolvers.d.ts +1 -1
  272. package/dist/modules/data-tables/lib/filters/resolvers.d.ts.map +1 -1
  273. package/dist/modules/data-tables/lib/search-params.d.ts +5 -5
  274. package/dist/modules/data-tables/lib/search-params.d.ts.map +1 -1
  275. package/dist/modules/data-tables/lib/types.d.ts +1 -1
  276. package/dist/modules/data-tables/tables/data-table/components/table.d.ts +2 -2
  277. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts +2 -2
  278. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.ts.map +1 -1
  279. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts +2 -2
  280. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.ts.map +1 -1
  281. package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.ts +2 -2
  282. package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.ts +3 -3
  283. package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.ts +2 -2
  284. package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.ts +2 -2
  285. package/dist/modules/data-tables/tables/inline-table/components/table.d.ts +2 -2
  286. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.ts +2 -2
  287. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.js +1 -1
  288. package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js +1 -1
  289. package/dist/modules/data-tables/tables/inline-table/hooks/use-input.client.js.map +1 -1
  290. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts +2 -2
  291. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.ts.map +1 -1
  292. package/dist/modules/inline-edit/components/combobox.client.d.ts +2 -2
  293. package/dist/modules/inline-edit/components/combobox.client.d.ts.map +1 -1
  294. package/dist/modules/inline-edit/components/date-input.client.d.ts +2 -2
  295. package/dist/modules/inline-edit/components/date-input.client.d.ts.map +1 -1
  296. package/dist/modules/inline-edit/components/date-input.client.js +1 -1
  297. package/dist/modules/inline-edit/components/date-picker.client.d.ts +2 -2
  298. package/dist/modules/inline-edit/components/date-picker.client.d.ts.map +1 -1
  299. package/dist/modules/inline-edit/components/editor.client.d.ts +2 -2
  300. package/dist/modules/inline-edit/components/editor.client.d.ts.map +1 -1
  301. package/dist/modules/inline-edit/components/input-toggle.client.d.ts +2 -2
  302. package/dist/modules/inline-edit/components/input-toggle.client.d.ts.map +1 -1
  303. package/dist/modules/inline-edit/components/input.client.d.ts +3 -3
  304. package/dist/modules/inline-edit/components/input.client.d.ts.map +1 -1
  305. package/dist/modules/inline-edit/components/richtext.client.d.ts +2 -2
  306. package/dist/modules/inline-edit/components/richtext.client.d.ts.map +1 -1
  307. package/dist/modules/inline-edit/components/select.client.d.ts +6 -6
  308. package/dist/modules/inline-edit/components/select.client.d.ts.map +1 -1
  309. package/dist/modules/inline-edit/components/switch.client.d.ts +2 -2
  310. package/dist/modules/inline-edit/components/switch.client.d.ts.map +1 -1
  311. package/dist/modules/inline-edit/components/toggle.client.d.ts +2 -2
  312. package/dist/modules/inline-edit/components/toggle.client.d.ts.map +1 -1
  313. package/dist/modules/inline-edit/hooks/context.client.d.ts +2 -2
  314. package/dist/modules/inline-edit/hooks/context.client.d.ts.map +1 -1
  315. package/dist/modules/inline-edit/hooks/use-inline.client.js +1 -1
  316. package/dist/modules/inline-edit/hooks/use-inline.client.js.map +1 -1
  317. package/dist/modules/uploads/components/button.client.d.ts +2 -2
  318. package/dist/modules/uploads/components/button.client.d.ts.map +1 -1
  319. package/dist/modules/uploads/components/images/grid.client.d.ts +2 -2
  320. package/dist/modules/uploads/components/images/grid.client.d.ts.map +1 -1
  321. package/dist/modules/uploads/components/images/grid.client.js +1 -1
  322. package/dist/modules/uploads/components/images/input.client.d.ts +2 -2
  323. package/dist/modules/uploads/components/images/input.client.d.ts.map +1 -1
  324. package/dist/modules/uploads/components/preview-dialog.client.d.ts +2 -2
  325. package/dist/modules/uploads/components/preview-dialog.client.d.ts.map +1 -1
  326. package/dist/modules/uploads/components/zone.client.d.ts +2 -2
  327. package/dist/modules/uploads/components/zone.client.d.ts.map +1 -1
  328. package/dist/modules/uploads/hooks/use-upload-image.client.js +1 -1
  329. package/dist/modules/uploads/lib/proxy.server.d.ts +1 -1
  330. package/dist/modules/uploads/lib/proxy.server.js +3 -3
  331. package/dist/modules/uploads/lib/route.server.d.ts +1 -1
  332. package/dist/modules/uploads/lib/route.server.js +1 -1
  333. package/dist/modules/uploads/lib/router.server.d.ts +938 -938
  334. package/dist/modules/uploads/lib/router.server.d.ts.map +1 -1
  335. package/dist/modules/uploads/lib/router.server.js +1 -1
  336. package/dist/modules/uploads/lib/schema.d.ts +61 -61
  337. package/dist/modules/uploads/lib/validators.d.ts +56 -56
  338. package/dist/modules/uploads/lib/validators.d.ts.map +1 -1
  339. package/package.json +4 -4
  340. package/src/components/common/icons.tsx +6 -0
  341. package/src/components/entry.client.ts +6 -0
  342. package/src/components/entry.server.ts +1 -1
  343. package/src/components/entry.ts +1 -0
  344. package/src/components/header/bottom-bar.client.tsx +2 -2
  345. package/src/components/layouts/admin-layout.tsx +13 -0
  346. package/src/components/layouts/admin-loading.tsx +1 -1
  347. package/src/components/layouts/root-loading.tsx +9 -0
  348. package/src/components/{layouts → navigation}/admin-sidebar-header.client.tsx +11 -6
  349. package/src/components/navigation/admin-sidebar-paths.client.tsx +190 -0
  350. package/src/components/navigation/admin-sidebar-skeleton.tsx +44 -0
  351. package/src/components/navigation/admin-sidebar.client.tsx +123 -0
  352. package/src/components/ui/spinner.tsx +51 -0
  353. package/src/modules/auth/components/allowed.client.tsx +1 -1
  354. package/src/modules/auth/components/auth-layout.server.tsx +2 -10
  355. package/src/modules/auth/components/auth-loading.tsx +11 -0
  356. package/src/modules/auth/components/guard.tsx +12 -0
  357. package/src/modules/auth/components/login-page.client.tsx +4 -3
  358. package/src/modules/auth/entry.client.ts +2 -0
  359. package/src/modules/auth/entry.ts +1 -0
  360. package/src/modules/auth/hooks/{use-permission.client.ts → use-permission.ts} +4 -2
  361. package/src/modules/auth/hooks/use-session.ts +18 -0
  362. package/src/modules/auth/lib/validators.ts +1 -1
  363. package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -7
  364. package/src/modules/commands/menus/dropdown-menu.client.tsx +11 -2
  365. package/src/modules/commands/menus/inline-menu.client.tsx +14 -1
  366. package/src/modules/commands/menus/responsive-menu.client.tsx +11 -2
  367. package/src/modules/config/entry.server.ts +1 -2
  368. package/src/modules/config/entry.ts +3 -0
  369. package/src/modules/config/lib/config.server.ts +1 -2
  370. package/src/modules/config/lib/router.server.ts +64 -0
  371. package/src/modules/config/paths/helpers.ts +6 -0
  372. package/src/modules/config/paths/types.ts +26 -38
  373. package/src/modules/data-tables/components/filters/combobox.client.tsx +1 -1
  374. package/src/modules/data-tables/tables/inline-table/hooks/use-input.client.ts +1 -1
  375. package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
  376. package/dist/components/layouts/admin-layout.server.d.ts +0 -14
  377. package/dist/components/layouts/admin-layout.server.d.ts.map +0 -1
  378. package/dist/components/layouts/admin-layout.server.js +0 -26
  379. package/dist/components/layouts/admin-layout.server.js.map +0 -1
  380. package/dist/components/layouts/admin-sidebar-context.client.js +0 -28
  381. package/dist/components/layouts/admin-sidebar-context.client.js.map +0 -1
  382. package/dist/components/layouts/admin-sidebar-header.client.js.map +0 -1
  383. package/dist/components/layouts/admin-sidebar.client.js +0 -51
  384. package/dist/components/layouts/admin-sidebar.client.js.map +0 -1
  385. package/dist/modules/auth/hooks/use-permission.client.js.map +0 -1
  386. package/dist/modules/config/paths/create.server.d.ts +0 -14
  387. package/dist/modules/config/paths/create.server.d.ts.map +0 -1
  388. package/dist/modules/config/paths/create.server.js +0 -12
  389. package/dist/modules/config/paths/create.server.js.map +0 -1
  390. package/dist/modules/config/paths/get.server.js +0 -47
  391. package/dist/modules/config/paths/get.server.js.map +0 -1
  392. package/src/components/layouts/admin-layout.server.tsx +0 -31
  393. package/src/components/layouts/admin-sidebar-context.client.tsx +0 -34
  394. package/src/components/layouts/admin-sidebar.client.tsx +0 -88
  395. package/src/modules/config/paths/create.server.ts +0 -10
  396. package/src/modules/config/paths/get.server.ts +0 -69
@@ -1,8 +1,8 @@
1
1
  import { CommandAction } from "../hooks/use-command-action.client.js";
2
- import * as react_jsx_runtime81 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime217 from "react/jsx-runtime";
3
3
  import React, { ComponentProps } from "react";
4
- import { DialogContentProps, DialogProps } from "@radix-ui/react-dialog";
5
4
  import { FieldValues, Form } from "react-hook-form";
5
+ import { DialogContentProps, DialogProps } from "@radix-ui/react-dialog";
6
6
  import { Keys } from "react-hotkeys-hook";
7
7
 
8
8
  //#region src/modules/commands/components/form-dialog-command.client.d.ts
@@ -12,7 +12,7 @@ import { Keys } from "react-hotkeys-hook";
12
12
  declare function CommandFormDialog({
13
13
  children,
14
14
  ...props
15
- }: DialogProps): react_jsx_runtime81.JSX.Element;
15
+ }: DialogProps): react_jsx_runtime217.JSX.Element;
16
16
  /**
17
17
  * CommandFormDialogTrigger
18
18
  */
@@ -29,28 +29,28 @@ declare function CommandFormDialogTrigger({
29
29
  children,
30
30
  disabled,
31
31
  ...props
32
- }: CommandFormDialogTriggerProps): react_jsx_runtime81.JSX.Element | undefined;
32
+ }: CommandFormDialogTriggerProps): react_jsx_runtime217.JSX.Element | undefined;
33
33
  /**
34
34
  * CommandFormDialogHeader
35
35
  */
36
36
  declare function CommandFormDialogHeader({
37
37
  children,
38
38
  ...props
39
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime81.JSX.Element;
39
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime217.JSX.Element;
40
40
  /**
41
41
  * CommandFormDialogTitle
42
42
  */
43
43
  declare function CommandFormDialogTitle({
44
44
  children,
45
45
  ...props
46
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime81.JSX.Element;
46
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime217.JSX.Element;
47
47
  /**
48
48
  * CommandFormDialogDescription
49
49
  */
50
50
  declare function CommandFormDialogDescription({
51
51
  children,
52
52
  ...props
53
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime81.JSX.Element;
53
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime217.JSX.Element;
54
54
  declare const CommandFormDialogContentProvider: typeof Form;
55
55
  /**
56
56
  * CommandFormDialogContent
@@ -65,7 +65,7 @@ declare function CommandFormDialogContent<TSchema extends FieldValues>({
65
65
  message,
66
66
  children,
67
67
  ...props
68
- }: CommandFormDialogContentProps<TSchema>): react_jsx_runtime81.JSX.Element;
68
+ }: CommandFormDialogContentProps<TSchema>): react_jsx_runtime217.JSX.Element;
69
69
  /**
70
70
  * FormDialogFields
71
71
  */
@@ -73,28 +73,28 @@ declare function CommandFormDialogFields({
73
73
  children,
74
74
  className,
75
75
  ...props
76
- }: ComponentProps<"div">): react_jsx_runtime81.JSX.Element;
76
+ }: ComponentProps<"div">): react_jsx_runtime217.JSX.Element;
77
77
  /**
78
78
  * CommandFormDialogFooter
79
79
  */
80
80
  declare function CommandFormDialogFooter({
81
81
  children,
82
82
  ...props
83
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime81.JSX.Element;
83
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime217.JSX.Element;
84
84
  /**
85
85
  * CommandFormDialogCancel
86
86
  */
87
87
  declare function CommandFormDialogCancel({
88
88
  children,
89
89
  ...props
90
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime81.JSX.Element;
90
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime217.JSX.Element;
91
91
  /**
92
92
  * CommandFormDialogSubmit
93
93
  */
94
94
  declare function CommandFormDialogSubmit({
95
95
  children,
96
96
  ...props
97
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime81.JSX.Element;
97
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime217.JSX.Element;
98
98
  //#endregion
99
99
  export { CommandFormDialog, CommandFormDialogCancel, CommandFormDialogContent, CommandFormDialogContentProps, CommandFormDialogContentProvider, CommandFormDialogDescription, CommandFormDialogFields, CommandFormDialogFooter, CommandFormDialogHeader, CommandFormDialogSubmit, CommandFormDialogTitle, CommandFormDialogTrigger };
100
100
  //# sourceMappingURL=form-dialog-command.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/components/form-dialog-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAqCgB,iBAAA,iBAAA,CAAiB;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAyB,WAAzB,CAAA,EAAoC,mBAAA,CAAA,GAAA,CAAA,OAApC;;;;KAe5B,6BAAA,GAfgE;EAAA,QAAA,EAgBzD,KAAA,CAAM,SAhBmD;EAehE,SAAA,CAAA,EAAA,MAAA;EAA6B,KAAA,CAAA,EAAA,MAAA;UACtB,CAAM,EAAA,OAAA;QAIP,CAAA,EAAA,IAAA;CAAI;AAGC,iBAAA,wBAAA,CAAwB;EAAA,KAAA;EAAA,MAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAMrC,6BANqC,CAAA,EAMR,mBAAA,CAAA,GAAA,CAAA,OAAA,GANQ,SAAA;;;;AAGtC,iBAmEc,uBAAA,CAnEd;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAmE8D,KAAA,CAAM,cAnEpE,CAmEmF,WAnEnF,CAAA,CAAA,EAmE+F,mBAAA,CAAA,GAAA,CAAA,OAnE/F;;;;AAG8B,iBAuEhB,sBAAA,CAvEgB;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAuE+B,KAAA,CAAM,cAvErC,CAuEoD,WAvEpD,CAAA,CAAA,EAuEgE,mBAAA,CAAA,GAAA,CAAA,OAvEhE;AAgEhC;;;AAAqF,iBAcrE,4BAAA,CAdqE;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAiBlF,KAAA,CAAM,cAjB4E,CAiB7D,WAjB6D,CAAA,CAAA,EAiBjD,mBAAA,CAAA,GAAA,CAAA,OAjBiD;AAArB,cAqBnD,gCArByD,EAAA,OAqBzB,IArByB;;;AAOtE;AAAsC,KAmB1B,6BAnB0B,CAAA,gBAmBoB,WAnBpB,CAAA,GAmBmC,kBAnBnC,GAAA;QAAG,EAoB/B,aApB+B,CAoBjB,OApBiB,CAAA;SAA2C,CAAA,EAAA,MAAA;UAArB,EAsBnD,KAAA,CAAM,SAtBmD;;AAA2B,iBAyBhF,wBAzBgF,CAAA,gBAyBvC,WAzBuC,CAAA,CAAA;EAAA,MAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA8B7F,6BA9B6F,CA8B/D,OA9B+D,CAAA,CAAA,EA8BvD,mBAAA,CAAA,GAAA,CAAA,OA9BuD;AAOhG;;;AAGwB,iBA8CR,uBAAA,CA9CQ;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA8CmD,cA9CnD,CAAA,KAAA,CAAA,CAAA,EA8CwE,mBAAA,CAAA,GAAA,CAAA,OA9CxE;;;;AAIX,iBAqDG,uBAAA,CArDoC;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAqDY,KAAA,CAAM,cArDlB,CAqDiC,WArDjC,CAAA,CAAA,EAqD6C,mBAAA,CAAA,GAAA,CAAA,OArD7C;AAKpD;;;AAAyE,iBAuDzD,uBAAA,CAvDyD;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAuDT,KAAA,CAAM,cAvDG,CAuDY,WAvDZ,CAAA,CAAA,EAuDwB,mBAAA,CAAA,GAAA,CAAA,OAvDxB;;;;AAG9C,iBA0EX,uBAAA,CA1EW;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA0EqC,KAAA,CAAM,cA1E3C,CA0E0D,WA1E1D,CAAA,CAAA,EA0EsE,mBAAA,CAAA,GAAA,CAAA,OA1EtE"}
1
+ {"version":3,"file":"form-dialog-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/components/form-dialog-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAqCgB,iBAAA,iBAAA,CAAiB;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAyB,WAAzB,CAAA,EAAoC,oBAAA,CAAA,GAAA,CAAA,OAApC;;;;KAe5B,6BAAA,GAfgE;EAAA,QAAA,EAgBzD,KAAA,CAAM,SAhBmD;EAehE,SAAA,CAAA,EAAA,MAAA;EAA6B,KAAA,CAAA,EAAA,MAAA;UACtB,CAAM,EAAA,OAAA;QAIP,CAAA,EAAA,IAAA;CAAI;AAGC,iBAAA,wBAAA,CAAwB;EAAA,KAAA;EAAA,MAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAMrC,6BANqC,CAAA,EAMR,oBAAA,CAAA,GAAA,CAAA,OAAA,GANQ,SAAA;;;;AAGtC,iBAmEc,uBAAA,CAnEd;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAmE8D,KAAA,CAAM,cAnEpE,CAmEmF,WAnEnF,CAAA,CAAA,EAmE+F,oBAAA,CAAA,GAAA,CAAA,OAnE/F;;;;AAG8B,iBAuEhB,sBAAA,CAvEgB;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAuE+B,KAAA,CAAM,cAvErC,CAuEoD,WAvEpD,CAAA,CAAA,EAuEgE,oBAAA,CAAA,GAAA,CAAA,OAvEhE;AAgEhC;;;AAAqF,iBAcrE,4BAAA,CAdqE;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAiBlF,KAAA,CAAM,cAjB4E,CAiB7D,WAjB6D,CAAA,CAAA,EAiBjD,oBAAA,CAAA,GAAA,CAAA,OAjBiD;AAArB,cAqBnD,gCArByD,EAAA,OAqBzB,IArByB;;;AAOtE;AAAsC,KAmB1B,6BAnB0B,CAAA,gBAmBoB,WAnBpB,CAAA,GAmBmC,kBAnBnC,GAAA;QAAG,EAoB/B,aApB+B,CAoBjB,OApBiB,CAAA;SAA2C,CAAA,EAAA,MAAA;UAArB,EAsBnD,KAAA,CAAM,SAtBmD;;AAA2B,iBAyBhF,wBAzBgF,CAAA,gBAyBvC,WAzBuC,CAAA,CAAA;EAAA,MAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA8B7F,6BA9B6F,CA8B/D,OA9B+D,CAAA,CAAA,EA8BvD,oBAAA,CAAA,GAAA,CAAA,OA9BuD;AAOhG;;;AAGwB,iBA8CR,uBAAA,CA9CQ;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA8CmD,cA9CnD,CAAA,KAAA,CAAA,CAAA,EA8CwE,oBAAA,CAAA,GAAA,CAAA,OA9CxE;;;;AAIX,iBAqDG,uBAAA,CArDoC;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAqDY,KAAA,CAAM,cArDlB,CAqDiC,WArDjC,CAAA,CAAA,EAqD6C,oBAAA,CAAA,GAAA,CAAA,OArD7C;AAKpD;;;AAAyE,iBAuDzD,uBAAA,CAvDyD;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAuDT,KAAA,CAAM,cAvDG,CAuDY,WAvDZ,CAAA,CAAA,EAuDwB,oBAAA,CAAA,GAAA,CAAA,OAvDxB;;;;AAG9C,iBA0EX,uBAAA,CA1EW;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA0EqC,KAAA,CAAM,cA1E3C,CA0E0D,WA1E1D,CAAA,CAAA,EA0EsE,oBAAA,CAAA,GAAA,CAAA,OA1EtE"}
@@ -4,8 +4,8 @@
4
4
  import { Icons } from "../../../components/common/icons.js";
5
5
  import { cn } from "../../../lib/utils/cn.js";
6
6
  import { Button, buttonVariants } from "../../../components/ui/button.js";
7
- import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "../../../components/ui/dialog.client.js";
8
7
  import { ContextMenuItem } from "../../../components/ui/context-menu.js";
8
+ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "../../../components/ui/dialog.client.js";
9
9
  import { DropdownMenuItem } from "../../../components/ui/dropdown-menu.js";
10
10
  import { useCommand } from "../hooks/context.client.js";
11
11
  import { useCommandAction } from "../hooks/use-command-action.client.js";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { useAction } from "../../../lib/hooks/use-action.js";
5
4
  import { useCommand } from "./context.client.js";
5
+ import { useAction } from "../../../lib/hooks/use-action.js";
6
6
  import { toast } from "sonner";
7
7
 
8
8
  //#region src/modules/commands/hooks/use-command-action.client.tsx
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { usePermission } from "../../auth/hooks/use-permission.client.js";
4
+ import { usePermission } from "../../auth/hooks/use-permission.js";
5
5
  import { mergePermissions } from "../../auth/lib/utils.js";
6
6
 
7
7
  //#region src/modules/commands/hooks/use-command-menu.client.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"use-command-menu.client.js","names":["data"],"sources":["../../../../src/modules/commands/hooks/use-command-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Permission } from \"@/modules/auth/entry\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission.client\";\nimport { mergePermissions } from \"@/modules/auth/lib/utils\";\nimport {\n type BulkCommandDefRenderParams,\n type CommandDef,\n type SingleCommandDefRenderParams,\n} from \"../lib/definitions\";\n\n/**\n * Command menu props\n */\nexport type SingleCommandMenuProps<TData, TMeta> = {\n data: TData;\n commands: CommandDef<TData, TMeta>[];\n meta?: TMeta;\n};\n\nexport type BulkCommandMenuProps<TData, TMeta> = {\n data: TData[];\n commands: CommandDef<TData, TMeta>[];\n meta?: TMeta;\n};\n\n/**\n * Check if a command has an id field in the data\n */\nfunction dataHasId<TData>(data: TData) {\n return data && typeof data === \"object\" && \"id\" in data && typeof data.id === \"string\";\n}\n\n/**\n * Single command validation\n */\ntype ValidateSingleCommandParams<TData, TMeta> = {\n data: TData;\n command: CommandDef<TData, TMeta> & { mode: \"single\" };\n};\n\nfunction validateSingleCommand<TData, TMeta>({\n data,\n command,\n}: ValidateSingleCommandParams<TData, TMeta>) {\n const valid = command.conditions?.({ data });\n return Array.isArray(valid) ? valid.every(Boolean) : (valid ?? true);\n}\n\n/**\n * Single command rendering\n */\ntype RenderSingleCommandParams<TData, TMeta> = {\n data: TData;\n meta?: TMeta;\n command: CommandDef<TData, TMeta> & { mode: \"single\" };\n};\n\nfunction renderSingleCommand<TData, TMeta>({\n data,\n command,\n meta,\n}: RenderSingleCommandParams<TData, TMeta>) {\n return command.render({\n data,\n meta: meta ?? ({} as TMeta),\n ...(dataHasId(data) ? { id: (data as TData & { id: string }).id } : {}),\n } as SingleCommandDefRenderParams<TData, TMeta>);\n}\n\n/**\n * Bulk command validation\n */\ntype ValidateBulkCommandParams<TData, TMeta> = {\n data: TData[];\n command: CommandDef<TData, TMeta> & { mode: \"bulk\" };\n};\n\nfunction validateBulkCommand<TData, TMeta>({\n data,\n command,\n}: ValidateBulkCommandParams<TData, TMeta>) {\n const valid = command.conditions?.({ data });\n return Array.isArray(valid) ? valid.every(Boolean) : (valid ?? true);\n}\n\n/**\n * Bulk command rendering\n */\ntype RenderBulkCommandParams<TData, TMeta> = {\n data: TData[];\n command: CommandDef<TData, TMeta> & { mode: \"bulk\" };\n meta?: TMeta;\n};\n\nfunction renderBulkCommand<TData, TMeta>({\n data,\n command,\n meta,\n}: RenderBulkCommandParams<TData, TMeta>) {\n const ids = data.filter(dataHasId).map((data) => (data as TData & { id: string }).id);\n\n return command.render({\n data,\n meta: meta ?? ({} as TMeta),\n ...(ids.length > 0 ? { ids } : {}),\n } as BulkCommandDefRenderParams<TData, TMeta>);\n}\n\n/**\n * useSingleCommandMenu\n */\nexport function useSingleCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n}: SingleCommandMenuProps<TData, TMeta> & { data: TData }) {\n const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];\n usePermission(mergePermissions(permissions));\n\n // filter out commands that don't have valid conditions\n const validCommands = commands\n .filter((command) =>\n command.mode === \"single\"\n ? validateSingleCommand({ data, command })\n : validateBulkCommand({ data: [data], command }),\n );\n\n function renderCommand(command: (typeof validCommands)[number]) {\n return command.mode === \"single\"\n ? renderSingleCommand({ command, data, meta })\n : renderBulkCommand({ command, data: [data], meta });\n }\n\n return [validCommands, renderCommand] as const;\n}\n\n/**\n * useBulkCommandMenu\n */\nexport function useBulkCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n}: BulkCommandMenuProps<TData, TMeta>) {\n const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];\n usePermission(mergePermissions(permissions));\n\n /**\n * Filter out commands that don't have valid conditions\n */\n const validCommands = commands\n // filter out commands that have mode \"bulk\"\n .filter((command) => command.mode === \"bulk\")\n // filter out commands that don't have valid conditions\n .filter((command) => command.mode === \"bulk\" && validateBulkCommand({ data, command }));\n\n /**\n * Render command\n */\n function renderCommand(command: (typeof commands)[number]) {\n if (command.mode === \"single\") return null;\n\n return renderBulkCommand({ command, data, meta });\n }\n\n return [validCommands, renderCommand] as const;\n}\n\n// export function useBulkCommandMenu<TData, TMeta>({\n// data,\n// commands,\n// meta,\n// }: BulkCommandMenuProps<TData, TMeta>) {\n// /**\n// * Filter out commands that don't have valid conditions\n// */\n// const validCommands = useSuspenseQueries({\n// queries: commands.flatMap((command) => ({\n// queryKey: [\"command\", command],\n// queryFn: async () => {\n// const { mode, permission } = command;\n\n// // filter out commands that have mode \"bulk\"\n// if (mode !== \"bulk\") return null;\n\n// // filter out commands that don't have valid conditions\n// if (!validateBulkCommand({ data, command })) return null;\n\n// // filter out commands that don't have a permissions defined\n// if (!permission) return command;\n\n// // filter out commands that don't have valid permissions\n// const session = await authClient.getSession();\n// const userId = session.data?.user.id;\n// const hasPermission = await authClient.admin.hasPermission({ permission, userId });\n// if (!hasPermission.data?.success) return null;\n\n// return command;\n// },\n// })),\n// combine: (items) =>\n// items.filter(({ data }) => data).map(({ data }) => data as NonNullable<typeof data>),\n// });\n\n// /**\n// * Render command\n// */\n// const renderCommand = (command: (typeof validCommands)[number]) =>\n// renderBulkCommand({ command, data, meta });\n\n// return [validCommands, renderCommand] as const;\n// }\n\n// */\n// export function useSingleCommandMenu<TData, TMeta>({\n// data,\n// commands,\n// meta,\n// }: SingleCommandMenuProps<TData, TMeta> & { data: TData }) {\n// /**\n// * Filter out commands that don't have valid conditions\n// */\n// const validCommands = useSuspenseQueries({\n// queries: commands.flatMap((command) => ({\n// queryKey: [\"command\", command],\n// queryFn: async () => {\n// const { mode, permission } = command;\n\n// // filter out commands that don't have valid conditions\n// if (mode === \"single\" && !validateSingleCommand({ data, command })) return null;\n// if (mode === \"bulk\" && !validateBulkCommand({ data: [data], command })) return null;\n\n// // filter out commands that don't have a permissions defined\n// if (!permission) return command;\n\n// // filter out commands that don't have valid permissions\n// const session = await authClient.getSession();\n// const userId = session.data?.user.id;\n// const hasPermission = await authClient.admin.hasPermission({ permission, userId });\n// if (!hasPermission.data?.success) return null;\n\n// return command;\n// },\n// })),\n// combine: (items) =>\n// items.filter(({ data }) => data).map(({ data }) => data as NonNullable<typeof data>),\n// });\n\n// /**\n// * Render command\n// */\n// function renderCommand(command: (typeof validCommands)[number]) {\n// return command.mode === \"single\"\n// ? renderSingleCommand({ command, data, meta })\n// : renderBulkCommand({ command, data: [data], meta });\n// }\n\n// return [validCommands, renderCommand] as const;\n// }\n"],"mappings":";;;;;;;;;;AA6BA,SAAS,UAAiB,MAAa;AACrC,QAAO,QAAQ,OAAO,SAAS,YAAY,QAAQ,QAAQ,OAAO,KAAK,OAAO;;AAWhF,SAAS,sBAAoC,EAC3C,MACA,WAC4C;CAC5C,MAAM,QAAQ,QAAQ,aAAa,EAAE,MAAM,CAAC;AAC5C,QAAO,MAAM,QAAQ,MAAM,GAAG,MAAM,MAAM,QAAQ,GAAI,SAAS;;AAYjE,SAAS,oBAAkC,EACzC,MACA,SACA,QAC0C;AAC1C,QAAO,QAAQ,OAAO;EACpB;EACA,MAAM,QAAS,EAAE;EACjB,GAAI,UAAU,KAAK,GAAG,EAAE,IAAK,KAAgC,IAAI,GAAG,EAAE;EACvE,CAA+C;;AAWlD,SAAS,oBAAkC,EACzC,MACA,WAC0C;CAC1C,MAAM,QAAQ,QAAQ,aAAa,EAAE,MAAM,CAAC;AAC5C,QAAO,MAAM,QAAQ,MAAM,GAAG,MAAM,MAAM,QAAQ,GAAI,SAAS;;AAYjE,SAAS,kBAAgC,EACvC,MACA,SACA,QACwC;CACxC,MAAM,MAAM,KAAK,OAAO,UAAU,CAAC,KAAK,WAAUA,OAAgC,GAAG;AAErF,QAAO,QAAQ,OAAO;EACpB;EACA,MAAM,QAAS,EAAE;EACjB,GAAI,IAAI,SAAS,IAAI,EAAE,KAAK,GAAG,EAAE;EAClC,CAA6C;;;;;AAMhD,SAAgB,qBAAmC,EACjD,MACA,UACA,QACyD;AAEzD,eAAc,iBADM,SAAS,KAAK,YAAY,QAAQ,WAAW,CAAC,OAAO,QAAQ,CACtC,CAAC;CAG5C,MAAM,gBAAgB,SACnB,QAAQ,YACP,QAAQ,SAAS,WACb,sBAAsB;EAAE;EAAM;EAAS,CAAC,GACxC,oBAAoB;EAAE,MAAM,CAAC,KAAK;EAAE;EAAS,CAAC,CACnD;CAEH,SAAS,cAAc,SAAyC;AAC9D,SAAO,QAAQ,SAAS,WACpB,oBAAoB;GAAE;GAAS;GAAM;GAAM,CAAC,GAC5C,kBAAkB;GAAE;GAAS,MAAM,CAAC,KAAK;GAAE;GAAM,CAAC;;AAGxD,QAAO,CAAC,eAAe,cAAc;;;;;AAMvC,SAAgB,mBAAiC,EAC/C,MACA,UACA,QACqC;AAErC,eAAc,iBADM,SAAS,KAAK,YAAY,QAAQ,WAAW,CAAC,OAAO,QAAQ,CACtC,CAAC;;;;CAK5C,MAAM,gBAAgB,SAEnB,QAAQ,YAAY,QAAQ,SAAS,OAAO,CAE5C,QAAQ,YAAY,QAAQ,SAAS,UAAU,oBAAoB;EAAE;EAAM;EAAS,CAAC,CAAC;;;;CAKzF,SAAS,cAAc,SAAoC;AACzD,MAAI,QAAQ,SAAS,SAAU,QAAO;AAEtC,SAAO,kBAAkB;GAAE;GAAS;GAAM;GAAM,CAAC;;AAGnD,QAAO,CAAC,eAAe,cAAc"}
1
+ {"version":3,"file":"use-command-menu.client.js","names":["data"],"sources":["../../../../src/modules/commands/hooks/use-command-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Permission } from \"@/modules/auth/entry\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { mergePermissions } from \"@/modules/auth/lib/utils\";\nimport {\n type BulkCommandDefRenderParams,\n type CommandDef,\n type SingleCommandDefRenderParams,\n} from \"../lib/definitions\";\n\n/**\n * Command menu props\n */\nexport type SingleCommandMenuProps<TData, TMeta> = {\n data: TData;\n commands: CommandDef<TData, TMeta>[];\n meta?: TMeta;\n};\n\nexport type BulkCommandMenuProps<TData, TMeta> = {\n data: TData[];\n commands: CommandDef<TData, TMeta>[];\n meta?: TMeta;\n};\n\n/**\n * Check if a command has an id field in the data\n */\nfunction dataHasId<TData>(data: TData) {\n return data && typeof data === \"object\" && \"id\" in data && typeof data.id === \"string\";\n}\n\n/**\n * Single command validation\n */\ntype ValidateSingleCommandParams<TData, TMeta> = {\n data: TData;\n command: CommandDef<TData, TMeta> & { mode: \"single\" };\n};\n\nfunction validateSingleCommand<TData, TMeta>({\n data,\n command,\n}: ValidateSingleCommandParams<TData, TMeta>) {\n const valid = command.conditions?.({ data });\n return Array.isArray(valid) ? valid.every(Boolean) : (valid ?? true);\n}\n\n/**\n * Single command rendering\n */\ntype RenderSingleCommandParams<TData, TMeta> = {\n data: TData;\n meta?: TMeta;\n command: CommandDef<TData, TMeta> & { mode: \"single\" };\n};\n\nfunction renderSingleCommand<TData, TMeta>({\n data,\n command,\n meta,\n}: RenderSingleCommandParams<TData, TMeta>) {\n return command.render({\n data,\n meta: meta ?? ({} as TMeta),\n ...(dataHasId(data) ? { id: (data as TData & { id: string }).id } : {}),\n } as SingleCommandDefRenderParams<TData, TMeta>);\n}\n\n/**\n * Bulk command validation\n */\ntype ValidateBulkCommandParams<TData, TMeta> = {\n data: TData[];\n command: CommandDef<TData, TMeta> & { mode: \"bulk\" };\n};\n\nfunction validateBulkCommand<TData, TMeta>({\n data,\n command,\n}: ValidateBulkCommandParams<TData, TMeta>) {\n const valid = command.conditions?.({ data });\n return Array.isArray(valid) ? valid.every(Boolean) : (valid ?? true);\n}\n\n/**\n * Bulk command rendering\n */\ntype RenderBulkCommandParams<TData, TMeta> = {\n data: TData[];\n command: CommandDef<TData, TMeta> & { mode: \"bulk\" };\n meta?: TMeta;\n};\n\nfunction renderBulkCommand<TData, TMeta>({\n data,\n command,\n meta,\n}: RenderBulkCommandParams<TData, TMeta>) {\n const ids = data.filter(dataHasId).map((data) => (data as TData & { id: string }).id);\n\n return command.render({\n data,\n meta: meta ?? ({} as TMeta),\n ...(ids.length > 0 ? { ids } : {}),\n } as BulkCommandDefRenderParams<TData, TMeta>);\n}\n\n/**\n * useSingleCommandMenu\n */\nexport function useSingleCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n}: SingleCommandMenuProps<TData, TMeta> & { data: TData }) {\n const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];\n usePermission(mergePermissions(permissions));\n\n // filter out commands that don't have valid conditions\n const validCommands = commands.filter((command) =>\n command.mode === \"single\"\n ? validateSingleCommand({ data, command })\n : validateBulkCommand({ data: [data], command }),\n );\n\n function renderCommand(command: (typeof validCommands)[number]) {\n return command.mode === \"single\"\n ? renderSingleCommand({ command, data, meta })\n : renderBulkCommand({ command, data: [data], meta });\n }\n\n return [validCommands, renderCommand] as const;\n}\n\n/**\n * useBulkCommandMenu\n */\nexport function useBulkCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n}: BulkCommandMenuProps<TData, TMeta>) {\n const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];\n usePermission(mergePermissions(permissions));\n\n /**\n * Filter out commands that don't have valid conditions\n */\n const validCommands = commands\n // filter out commands that have mode \"bulk\"\n .filter((command) => command.mode === \"bulk\")\n // filter out commands that don't have valid conditions\n .filter((command) => command.mode === \"bulk\" && validateBulkCommand({ data, command }));\n\n /**\n * Render command\n */\n function renderCommand(command: (typeof commands)[number]) {\n if (command.mode === \"single\") return null;\n\n return renderBulkCommand({ command, data, meta });\n }\n\n return [validCommands, renderCommand] as const;\n}\n\n// export function useBulkCommandMenu<TData, TMeta>({\n// data,\n// commands,\n// meta,\n// }: BulkCommandMenuProps<TData, TMeta>) {\n// /**\n// * Filter out commands that don't have valid conditions\n// */\n// const validCommands = useSuspenseQueries({\n// queries: commands.flatMap((command) => ({\n// queryKey: [\"command\", command],\n// queryFn: async () => {\n// const { mode, permission } = command;\n\n// // filter out commands that have mode \"bulk\"\n// if (mode !== \"bulk\") return null;\n\n// // filter out commands that don't have valid conditions\n// if (!validateBulkCommand({ data, command })) return null;\n\n// // filter out commands that don't have a permissions defined\n// if (!permission) return command;\n\n// // filter out commands that don't have valid permissions\n// const session = await authClient.getSession();\n// const userId = session.data?.user.id;\n// const hasPermission = await authClient.admin.hasPermission({ permission, userId });\n// if (!hasPermission.data?.success) return null;\n\n// return command;\n// },\n// })),\n// combine: (items) =>\n// items.filter(({ data }) => data).map(({ data }) => data as NonNullable<typeof data>),\n// });\n\n// /**\n// * Render command\n// */\n// const renderCommand = (command: (typeof validCommands)[number]) =>\n// renderBulkCommand({ command, data, meta });\n\n// return [validCommands, renderCommand] as const;\n// }\n\n// */\n// export function useSingleCommandMenu<TData, TMeta>({\n// data,\n// commands,\n// meta,\n// }: SingleCommandMenuProps<TData, TMeta> & { data: TData }) {\n// /**\n// * Filter out commands that don't have valid conditions\n// */\n// const validCommands = useSuspenseQueries({\n// queries: commands.flatMap((command) => ({\n// queryKey: [\"command\", command],\n// queryFn: async () => {\n// const { mode, permission } = command;\n\n// // filter out commands that don't have valid conditions\n// if (mode === \"single\" && !validateSingleCommand({ data, command })) return null;\n// if (mode === \"bulk\" && !validateBulkCommand({ data: [data], command })) return null;\n\n// // filter out commands that don't have a permissions defined\n// if (!permission) return command;\n\n// // filter out commands that don't have valid permissions\n// const session = await authClient.getSession();\n// const userId = session.data?.user.id;\n// const hasPermission = await authClient.admin.hasPermission({ permission, userId });\n// if (!hasPermission.data?.success) return null;\n\n// return command;\n// },\n// })),\n// combine: (items) =>\n// items.filter(({ data }) => data).map(({ data }) => data as NonNullable<typeof data>),\n// });\n\n// /**\n// * Render command\n// */\n// function renderCommand(command: (typeof validCommands)[number]) {\n// return command.mode === \"single\"\n// ? renderSingleCommand({ command, data, meta })\n// : renderBulkCommand({ command, data: [data], meta });\n// }\n\n// return [validCommands, renderCommand] as const;\n// }\n"],"mappings":";;;;;;;;;;AA6BA,SAAS,UAAiB,MAAa;AACrC,QAAO,QAAQ,OAAO,SAAS,YAAY,QAAQ,QAAQ,OAAO,KAAK,OAAO;;AAWhF,SAAS,sBAAoC,EAC3C,MACA,WAC4C;CAC5C,MAAM,QAAQ,QAAQ,aAAa,EAAE,MAAM,CAAC;AAC5C,QAAO,MAAM,QAAQ,MAAM,GAAG,MAAM,MAAM,QAAQ,GAAI,SAAS;;AAYjE,SAAS,oBAAkC,EACzC,MACA,SACA,QAC0C;AAC1C,QAAO,QAAQ,OAAO;EACpB;EACA,MAAM,QAAS,EAAE;EACjB,GAAI,UAAU,KAAK,GAAG,EAAE,IAAK,KAAgC,IAAI,GAAG,EAAE;EACvE,CAA+C;;AAWlD,SAAS,oBAAkC,EACzC,MACA,WAC0C;CAC1C,MAAM,QAAQ,QAAQ,aAAa,EAAE,MAAM,CAAC;AAC5C,QAAO,MAAM,QAAQ,MAAM,GAAG,MAAM,MAAM,QAAQ,GAAI,SAAS;;AAYjE,SAAS,kBAAgC,EACvC,MACA,SACA,QACwC;CACxC,MAAM,MAAM,KAAK,OAAO,UAAU,CAAC,KAAK,WAAUA,OAAgC,GAAG;AAErF,QAAO,QAAQ,OAAO;EACpB;EACA,MAAM,QAAS,EAAE;EACjB,GAAI,IAAI,SAAS,IAAI,EAAE,KAAK,GAAG,EAAE;EAClC,CAA6C;;;;;AAMhD,SAAgB,qBAAmC,EACjD,MACA,UACA,QACyD;AAEzD,eAAc,iBADM,SAAS,KAAK,YAAY,QAAQ,WAAW,CAAC,OAAO,QAAQ,CACtC,CAAC;CAG5C,MAAM,gBAAgB,SAAS,QAAQ,YACrC,QAAQ,SAAS,WACb,sBAAsB;EAAE;EAAM;EAAS,CAAC,GACxC,oBAAoB;EAAE,MAAM,CAAC,KAAK;EAAE;EAAS,CAAC,CACnD;CAED,SAAS,cAAc,SAAyC;AAC9D,SAAO,QAAQ,SAAS,WACpB,oBAAoB;GAAE;GAAS;GAAM;GAAM,CAAC,GAC5C,kBAAkB;GAAE;GAAS,MAAM,CAAC,KAAK;GAAE;GAAM,CAAC;;AAGxD,QAAO,CAAC,eAAe,cAAc;;;;;AAMvC,SAAgB,mBAAiC,EAC/C,MACA,UACA,QACqC;AAErC,eAAc,iBADM,SAAS,KAAK,YAAY,QAAQ,WAAW,CAAC,OAAO,QAAQ,CACtC,CAAC;;;;CAK5C,MAAM,gBAAgB,SAEnB,QAAQ,YAAY,QAAQ,SAAS,OAAO,CAE5C,QAAQ,YAAY,QAAQ,SAAS,UAAU,oBAAoB;EAAE;EAAM;EAAS,CAAC,CAAC;;;;CAKzF,SAAS,cAAc,SAAoC;AACzD,MAAI,QAAQ,SAAS,SAAU,QAAO;AAEtC,SAAO,kBAAkB;GAAE;GAAS;GAAM;GAAM,CAAC;;AAGnD,QAAO,CAAC,eAAe,cAAc"}
@@ -1,6 +1,6 @@
1
1
  import { ContextMenu, ContextMenuTrigger } from "../../../components/ui/context-menu.js";
2
2
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.js";
3
- import * as react_jsx_runtime91 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime227 from "react/jsx-runtime";
4
4
  import { ContextMenuContentProps } from "@radix-ui/react-context-menu";
5
5
 
6
6
  //#region src/modules/commands/menus/context-menu.client.d.ts
@@ -21,7 +21,7 @@ declare function ContextCommandMenuContent<TData, TMeta>({
21
21
  meta,
22
22
  className,
23
23
  ...props
24
- }: SingleCommandMenuProps<TData, TMeta> & ContextMenuContentProps): react_jsx_runtime91.JSX.Element;
24
+ }: SingleCommandMenuProps<TData, TMeta> & ContextMenuContentProps): react_jsx_runtime227.JSX.Element;
25
25
  //#endregion
26
26
  export { ContextCommandMenu, ContextCommandMenuContent, ContextCommandMenuTrigger };
27
27
  //# sourceMappingURL=context-menu.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/context-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAkBa,cAAA,kBAAkB,EAAA,OAAA,WAAc;AAK7C;AAKA;;AACE,cANW,yBAMX,EAAA,OANoC,kBAMpC;;;;AAKwB,iBANV,yBAMU,CAAA,KAAA,EAAA,KAAA,CAAA,CAAA;EAAA,IAAA;EAAA,QAAA;EAAA,IAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAAvB,sBAAuB,CAAA,KAAA,EAAO,KAAP,CAAA,GAAgB,uBAAhB,CAAA,EAAuC,mBAAA,CAAA,GAAA,CAAA,OAAvC"}
1
+ {"version":3,"file":"context-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/context-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAkBa,cAAA,kBAAkB,EAAA,OAAA,WAAc;AAK7C;AAKA;;AACE,cANW,yBAMX,EAAA,OANoC,kBAMpC;;;;AAKwB,iBANV,yBAMU,CAAA,KAAA,EAAA,KAAA,CAAA,CAAA;EAAA,IAAA;EAAA,QAAA;EAAA,IAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAAvB,sBAAuB,CAAA,KAAA,EAAO,KAAP,CAAA,GAAgB,uBAAhB,CAAA,EAAuC,oBAAA,CAAA,GAAA,CAAA,OAAvC"}
@@ -1,6 +1,6 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.js";
2
- import * as react_jsx_runtime92 from "react/jsx-runtime";
3
- import React from "react";
2
+ import * as react_jsx_runtime228 from "react/jsx-runtime";
3
+ import React, { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/commands/menus/dropdown-menu.client.d.ts
6
6
  declare function DropdownCommandMenu<TData, TMeta>({
@@ -9,7 +9,11 @@ declare function DropdownCommandMenu<TData, TMeta>({
9
9
  meta,
10
10
  className,
11
11
  ...props
12
- }: SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>): react_jsx_runtime92.JSX.Element | null;
12
+ }: SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>): react_jsx_runtime228.JSX.Element | null;
13
+ declare function DropdownCommandMenuLoading({
14
+ className,
15
+ ...props
16
+ }: ComponentProps<"div">): react_jsx_runtime228.JSX.Element;
13
17
  //#endregion
14
- export { DropdownCommandMenu };
18
+ export { DropdownCommandMenu, DropdownCommandMenuLoading };
15
19
  //# sourceMappingURL=dropdown-menu.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAegB;;;;;;GAMb,uBAAuB,OAAO,SAAS,KAAA,CAAM,eAAe,eAAY,mBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"dropdown-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAgBgB;;;;;;GAMb,uBAAuB,OAAO,SAAS,KAAA,CAAM,eAAe,eAAY,oBAAA,CAAA,GAAA,CAAA,OAAA;iBA8B3D,0BAAA;;;GAAoD,wBAAqB,oBAAA,CAAA,GAAA,CAAA"}
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
  import { cn } from "../../../lib/utils/cn.js";
5
+ import { Skeleton } from "../../../components/ui/skeleton.js";
5
6
  import { Button } from "../../../components/ui/button.js";
6
7
  import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../components/ui/dropdown-menu.js";
7
8
  import { CommandContextProvider } from "../hooks/context.client.js";
@@ -50,7 +51,14 @@ function DropdownCommandMenu({ data, commands, meta, className,...props }) {
50
51
  })]
51
52
  });
52
53
  }
54
+ function DropdownCommandMenuLoading({ className,...props }) {
55
+ return /* @__PURE__ */ jsx("div", {
56
+ ...props,
57
+ className: cn("flex w-fit items-center", className),
58
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8" })
59
+ });
60
+ }
53
61
 
54
62
  //#endregion
55
- export { DropdownCommandMenu };
63
+ export { DropdownCommandMenu, DropdownCommandMenuLoading };
56
64
  //# sourceMappingURL=dropdown-menu.client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.client.js","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { MoreHorizontal } from \"lucide-react\";\nimport React from \"react\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport { SingleCommandMenuProps, useSingleCommandMenu } from \"../hooks/use-command-menu.client\";\nimport { RenderCommand } from \"../components/render-command\";\n\nexport function DropdownCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n className,\n ...props\n}: SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>) {\n const [open, setOpen] = React.useState(false);\n const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });\n\n if (!validCommands.length) return null;\n\n return (\n <DropdownMenu open={open} onOpenChange={setOpen}>\n <DropdownMenuTrigger asChild>\n <Button\n {...props}\n variant=\"ghost\"\n className={cn(\"data-[state=open]:bg-secondary size-8 p-0\", className)}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">Open menu</span>\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\" className=\"min-w-[10rem]\">\n <CommandContextProvider value={{ menu: \"dropdown\", onSuccess: () => setOpen(false) }}>\n {validCommands.map((command) => (\n <RenderCommand key={command.name} command={command} render={renderCommand} />\n ))}\n </CommandContextProvider>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,SAAgB,oBAAkC,EAChD,MACA,UACA,MACA,UACA,GAAG,SACwE;CAC3E,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,MAAM;CAC7C,MAAM,CAAC,eAAe,iBAAiB,qBAAqB;EAAE;EAAM;EAAU;EAAM,CAAC;AAErF,KAAI,CAAC,cAAc,OAAQ,QAAO;AAElC,QACE,qBAAC;EAAmB;EAAM,cAAc;aACtC,oBAAC;GAAoB;aACnB,qBAAC;IACC,GAAI;IACJ,SAAQ;IACR,WAAW,GAAG,6CAA6C,UAAU;eAErE,oBAAC,kBAAe,WAAU,YAAY,EACtC,oBAAC;KAAK,WAAU;eAAU;MAAgB;KACnC;IACW,EAEtB,oBAAC;GAAoB,OAAM;GAAM,WAAU;aACzC,oBAAC;IAAuB,OAAO;KAAE,MAAM;KAAY,iBAAiB,QAAQ,MAAM;KAAE;cACjF,cAAc,KAAK,YAClB,oBAAC;KAA0C;KAAS,QAAQ;OAAxC,QAAQ,KAAiD,CAC7E;KACqB;IACL;GACT"}
1
+ {"version":3,"file":"dropdown-menu.client.js","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Skeleton } from \"@/components/entry\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { MoreHorizontal } from \"lucide-react\";\nimport React, { ComponentProps } from \"react\";\nimport { RenderCommand } from \"../components/render-command\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport { SingleCommandMenuProps, useSingleCommandMenu } from \"../hooks/use-command-menu.client\";\n\nexport function DropdownCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n className,\n ...props\n}: SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>) {\n const [open, setOpen] = React.useState(false);\n const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });\n\n if (!validCommands.length) return null;\n\n return (\n <DropdownMenu open={open} onOpenChange={setOpen}>\n <DropdownMenuTrigger asChild>\n <Button\n {...props}\n variant=\"ghost\"\n className={cn(\"data-[state=open]:bg-secondary size-8 p-0\", className)}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">Open menu</span>\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\" className=\"min-w-[10rem]\">\n <CommandContextProvider value={{ menu: \"dropdown\", onSuccess: () => setOpen(false) }}>\n {validCommands.map((command) => (\n <RenderCommand key={command.name} command={command} render={renderCommand} />\n ))}\n </CommandContextProvider>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nexport function DropdownCommandMenuLoading({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div {...props} className={cn(\"flex w-fit items-center\", className)}>\n <Skeleton className=\"h-8 w-8\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,SAAgB,oBAAkC,EAChD,MACA,UACA,MACA,UACA,GAAG,SACwE;CAC3E,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,MAAM;CAC7C,MAAM,CAAC,eAAe,iBAAiB,qBAAqB;EAAE;EAAM;EAAU;EAAM,CAAC;AAErF,KAAI,CAAC,cAAc,OAAQ,QAAO;AAElC,QACE,qBAAC;EAAmB;EAAM,cAAc;aACtC,oBAAC;GAAoB;aACnB,qBAAC;IACC,GAAI;IACJ,SAAQ;IACR,WAAW,GAAG,6CAA6C,UAAU;eAErE,oBAAC,kBAAe,WAAU,YAAY,EACtC,oBAAC;KAAK,WAAU;eAAU;MAAgB;KACnC;IACW,EAEtB,oBAAC;GAAoB,OAAM;GAAM,WAAU;aACzC,oBAAC;IAAuB,OAAO;KAAE,MAAM;KAAY,iBAAiB,QAAQ,MAAM;KAAE;cACjF,cAAc,KAAK,YAClB,oBAAC;KAA0C;KAAS,QAAQ;OAAxC,QAAQ,KAAiD,CAC7E;KACqB;IACL;GACT;;AAInB,SAAgB,2BAA2B,EAAE,UAAW,GAAG,SAAgC;AACzF,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,2BAA2B,UAAU;YACjE,oBAAC,YAAS,WAAU,YAAY;GAC5B"}
@@ -1,6 +1,6 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.js";
2
- import * as react_jsx_runtime93 from "react/jsx-runtime";
3
- import React from "react";
2
+ import * as react_jsx_runtime230 from "react/jsx-runtime";
3
+ import React, { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/commands/menus/inline-menu.client.d.ts
6
6
  type InlineCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>;
@@ -10,7 +10,11 @@ declare function InlineCommandMenu<TData, TMeta>({
10
10
  commands,
11
11
  className,
12
12
  ...props
13
- }: InlineCommandMenuProps<TData, TMeta>): react_jsx_runtime93.JSX.Element | null;
13
+ }: InlineCommandMenuProps<TData, TMeta>): react_jsx_runtime230.JSX.Element | null;
14
+ declare function InlineCommandMenuLoading({
15
+ className,
16
+ ...props
17
+ }: ComponentProps<"div">): react_jsx_runtime230.JSX.Element;
14
18
  //#endregion
15
- export { InlineCommandMenu, InlineCommandMenuProps };
19
+ export { InlineCommandMenu, InlineCommandMenuLoading, InlineCommandMenuProps };
16
20
  //# sourceMappingURL=inline-menu.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inline-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/inline-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAQY,uCAAuC,uBAAuB,OAAO,SAC/E,KAAA,CAAM,eAAe;iBAEP;;;;;;GAMb,uBAAuB,OAAO,SAAM,mBAAA,CAAA,GAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"inline-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/inline-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;KASY,uCAAuC,uBAAuB,OAAO,SAC/E,KAAA,CAAM,eAAe;iBAEP;;;;;;GAMb,uBAAuB,OAAO,SAAM,oBAAA,CAAA,GAAA,CAAA,OAAA;iBAkBvB,wBAAA;;;GAAkD,wBAAqB,oBAAA,CAAA,GAAA,CAAA"}
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
  import { cn } from "../../../lib/utils/cn.js";
5
+ import { Skeleton } from "../../../components/ui/skeleton.js";
5
6
  import { CommandContextProvider } from "../hooks/context.client.js";
6
7
  import { RenderCommand } from "../components/render-command.js";
7
8
  import { useSingleCommandMenu } from "../hooks/use-command-menu.client.js";
@@ -31,7 +32,17 @@ function InlineCommandMenu({ data, meta, commands, className,...props }) {
31
32
  })
32
33
  });
33
34
  }
35
+ function InlineCommandMenuLoading({ className,...props }) {
36
+ return /* @__PURE__ */ jsx("div", {
37
+ ...props,
38
+ className: cn("flex w-fit items-center", className),
39
+ children: /* @__PURE__ */ jsx("div", {
40
+ className: "flex gap-2",
41
+ children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8" }, index))
42
+ })
43
+ });
44
+ }
34
45
 
35
46
  //#endregion
36
- export { InlineCommandMenu };
47
+ export { InlineCommandMenu, InlineCommandMenuLoading };
37
48
  //# sourceMappingURL=inline-menu.client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inline-menu.client.js","names":[],"sources":["../../../../src/modules/commands/menus/inline-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"@/lib/utils/cn\";\nimport React from \"react\";\nimport { RenderCommand } from \"../components/render-command\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport { SingleCommandMenuProps, useSingleCommandMenu } from \"../hooks/use-command-menu.client\";\n\nexport type InlineCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta> &\n React.HTMLAttributes<HTMLElement>;\n\nexport function InlineCommandMenu<TData, TMeta>({\n data,\n meta,\n commands,\n className,\n ...props\n}: InlineCommandMenuProps<TData, TMeta>) {\n const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });\n\n if (!validCommands.length) return null;\n\n return (\n <div {...props} className={cn(\"flex w-fit items-center\", className)}>\n <div className=\"flex gap-2\">\n <CommandContextProvider value={{ menu: \"inline\" }}>\n {validCommands.map((command) => (\n <RenderCommand key={command.name} command={command} render={renderCommand} />\n ))}\n </CommandContextProvider>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,kBAAgC,EAC9C,MACA,MACA,UACA,UACA,GAAG,SACoC;CACvC,MAAM,CAAC,eAAe,iBAAiB,qBAAqB;EAAE;EAAM;EAAU;EAAM,CAAC;AAErF,KAAI,CAAC,cAAc,OAAQ,QAAO;AAElC,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,2BAA2B,UAAU;YACjE,oBAAC;GAAI,WAAU;aACb,oBAAC;IAAuB,OAAO,EAAE,MAAM,UAAU;cAC9C,cAAc,KAAK,YAClB,oBAAC;KAA0C;KAAS,QAAQ;OAAxC,QAAQ,KAAiD,CAC7E;KACqB;IACrB;GACF"}
1
+ {"version":3,"file":"inline-menu.client.js","names":[],"sources":["../../../../src/modules/commands/menus/inline-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Skeleton } from \"@/components/entry\";\nimport { cn } from \"@/lib/utils/cn\";\nimport React, { ComponentProps } from \"react\";\nimport { RenderCommand } from \"../components/render-command\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport { SingleCommandMenuProps, useSingleCommandMenu } from \"../hooks/use-command-menu.client\";\n\nexport type InlineCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta> &\n React.HTMLAttributes<HTMLElement>;\n\nexport function InlineCommandMenu<TData, TMeta>({\n data,\n meta,\n commands,\n className,\n ...props\n}: InlineCommandMenuProps<TData, TMeta>) {\n const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });\n\n if (!validCommands.length) return null;\n\n return (\n <div {...props} className={cn(\"flex w-fit items-center\", className)}>\n <div className=\"flex gap-2\">\n <CommandContextProvider value={{ menu: \"inline\" }}>\n {validCommands.map((command) => (\n <RenderCommand key={command.name} command={command} render={renderCommand} />\n ))}\n </CommandContextProvider>\n </div>\n </div>\n );\n}\n\nexport function InlineCommandMenuLoading({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div {...props} className={cn(\"flex w-fit items-center\", className)}>\n <div className=\"flex gap-2\">\n {Array.from({ length: 3 }).map((_, index) => (\n <Skeleton key={index} className=\"h-8 w-8\" />\n ))}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,kBAAgC,EAC9C,MACA,MACA,UACA,UACA,GAAG,SACoC;CACvC,MAAM,CAAC,eAAe,iBAAiB,qBAAqB;EAAE;EAAM;EAAU;EAAM,CAAC;AAErF,KAAI,CAAC,cAAc,OAAQ,QAAO;AAElC,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,2BAA2B,UAAU;YACjE,oBAAC;GAAI,WAAU;aACb,oBAAC;IAAuB,OAAO,EAAE,MAAM,UAAU;cAC9C,cAAc,KAAK,YAClB,oBAAC;KAA0C;KAAS,QAAQ;OAAxC,QAAQ,KAAiD,CAC7E;KACqB;IACrB;GACF;;AAIV,SAAgB,yBAAyB,EAAE,UAAW,GAAG,SAAgC;AACvF,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,2BAA2B,UAAU;YACjE,oBAAC;GAAI,WAAU;aACZ,MAAM,KAAK,EAAE,QAAQ,GAAG,CAAC,CAAC,KAAK,GAAG,UACjC,oBAAC,YAAqB,WAAU,aAAjB,MAA6B,CAC5C;IACE;GACF"}
@@ -1,9 +1,10 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.js";
2
- import * as react_jsx_runtime94 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime232 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/modules/commands/menus/responsive-menu.client.d.ts
5
5
  type ResponsiveCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta>;
6
- declare function ResponsiveCommandMenu<TData, TMeta>(props: ResponsiveCommandMenuProps<TData, TMeta>): react_jsx_runtime94.JSX.Element;
6
+ declare function ResponsiveCommandMenu<TData, TMeta>(props: ResponsiveCommandMenuProps<TData, TMeta>): react_jsx_runtime232.JSX.Element;
7
+ declare function ResponsiveCommandMenuLoading(): react_jsx_runtime232.JSX.Element;
7
8
  //#endregion
8
- export { ResponsiveCommandMenu };
9
+ export { ResponsiveCommandMenu, ResponsiveCommandMenuLoading };
9
10
  //# sourceMappingURL=responsive-menu.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/responsive-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,2CAA2C,uBAAuB,OAAO;iBAE9D,2CACP,2BAA2B,OAAO,SAAM,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"responsive-menu.client.d.ts","names":[],"sources":["../../../../src/modules/commands/menus/responsive-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,2CAA2C,uBAAuB,OAAO;iBAE9D,2CACP,2BAA2B,OAAO,SAAM,oBAAA,CAAA,GAAA,CAAA;iBAUjC,4BAAA,CAAA,GAA4B,oBAAA,CAAA,GAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { DropdownCommandMenu } from "./dropdown-menu.client.js";
5
- import { InlineCommandMenu } from "./inline-menu.client.js";
4
+ import { DropdownCommandMenu, DropdownCommandMenuLoading } from "./dropdown-menu.client.js";
5
+ import { InlineCommandMenu, InlineCommandMenuLoading } from "./inline-menu.client.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/modules/commands/menus/responsive-menu.client.tsx
@@ -15,7 +15,10 @@ function ResponsiveCommandMenu(props) {
15
15
  ...props
16
16
  })] });
17
17
  }
18
+ function ResponsiveCommandMenuLoading() {
19
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(InlineCommandMenuLoading, { className: "hidden xl:flex" }), /* @__PURE__ */ jsx(DropdownCommandMenuLoading, { className: "xl:hidden" })] });
20
+ }
18
21
 
19
22
  //#endregion
20
- export { ResponsiveCommandMenu };
23
+ export { ResponsiveCommandMenu, ResponsiveCommandMenuLoading };
21
24
  //# sourceMappingURL=responsive-menu.client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-menu.client.js","names":[],"sources":["../../../../src/modules/commands/menus/responsive-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { SingleCommandMenuProps } from \"../hooks/use-command-menu.client\";\nimport { DropdownCommandMenu } from \"./dropdown-menu.client\";\nimport { InlineCommandMenu } from \"./inline-menu.client\";\n\ntype ResponsiveCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta>;\n\nexport function ResponsiveCommandMenu<TData, TMeta>(\n props: ResponsiveCommandMenuProps<TData, TMeta>,\n) {\n return (\n <>\n <InlineCommandMenu className=\"hidden xl:flex\" {...props} />\n <DropdownCommandMenu className=\"xl:hidden\" {...props} />\n </>\n );\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,sBACd,OACA;AACA,QACE,4CACE,oBAAC;EAAkB,WAAU;EAAiB,GAAI;GAAS,EAC3D,oBAAC;EAAoB,WAAU;EAAY,GAAI;GAAS,IACvD"}
1
+ {"version":3,"file":"responsive-menu.client.js","names":[],"sources":["../../../../src/modules/commands/menus/responsive-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { SingleCommandMenuProps } from \"../hooks/use-command-menu.client\";\nimport { DropdownCommandMenu, DropdownCommandMenuLoading } from \"./dropdown-menu.client\";\nimport { InlineCommandMenu, InlineCommandMenuLoading } from \"./inline-menu.client\";\n\ntype ResponsiveCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta>;\n\nexport function ResponsiveCommandMenu<TData, TMeta>(\n props: ResponsiveCommandMenuProps<TData, TMeta>,\n) {\n return (\n <>\n <InlineCommandMenu className=\"hidden xl:flex\" {...props} />\n <DropdownCommandMenu className=\"xl:hidden\" {...props} />\n </>\n );\n}\n\nexport function ResponsiveCommandMenuLoading() {\n return (\n <>\n <InlineCommandMenuLoading className=\"hidden xl:flex\" />\n <DropdownCommandMenuLoading className=\"xl:hidden\" />\n </>\n );\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,sBACd,OACA;AACA,QACE,4CACE,oBAAC;EAAkB,WAAU;EAAiB,GAAI;GAAS,EAC3D,oBAAC;EAAoB,WAAU;EAAY,GAAI;GAAS,IACvD;;AAIP,SAAgB,+BAA+B;AAC7C,QACE,4CACE,oBAAC,4BAAyB,WAAU,mBAAmB,EACvD,oBAAC,8BAA2B,WAAU,cAAc,IACnD"}
@@ -1,6 +1,6 @@
1
1
  import { BulkCommandAction } from "../hooks/use-command-action.client.js";
2
2
  import { BulkCommandDefRenderParams } from "../lib/definitions.js";
3
- import * as react_jsx_runtime95 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime234 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/modules/commands/utils/archive-command.client.d.ts
6
6
  type ArchiveCommandProps<TData extends {
@@ -17,7 +17,7 @@ declare function ArchiveCommand<TData extends {
17
17
  }, TMeta>({
18
18
  ids,
19
19
  action
20
- }: ArchiveCommandProps<TData, TMeta>): react_jsx_runtime95.JSX.Element;
20
+ }: ArchiveCommandProps<TData, TMeta>): react_jsx_runtime234.JSX.Element;
21
21
  /**
22
22
  * Unarchive command
23
23
  * @description command to unarchive a resource
@@ -27,7 +27,7 @@ declare function RestoreCommand<TData extends {
27
27
  }, TMeta>({
28
28
  ids,
29
29
  action
30
- }: ArchiveCommandProps<TData, TMeta>): react_jsx_runtime95.JSX.Element;
30
+ }: ArchiveCommandProps<TData, TMeta>): react_jsx_runtime234.JSX.Element;
31
31
  //#endregion
32
32
  export { ArchiveCommand, ArchiveCommandProps, RestoreCommand };
33
33
  //# sourceMappingURL=archive-command.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"archive-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/utils/archive-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAQY;;;EAAA,MAAA,EACF,iBADqB;CAAA,GAE3B,IAF2B,CAEtB,0BAFsB,CAEK,KAFL,EAEY,KAFZ,CAAA,EAAA,KAAA,CAAA;;;;;AAE3B,iBAMY,cANZ,CAAA,cAAA;EAAI,EAAA,EAAA,MAAA;AAMR,CAAA,EAAA,KAAgB,CAAA,CAAA;EAAA,GAAA;EAAA;AAAc,CAAA,EAG3B,mBAH2B,CAGP,KAHO,EAGA,KAHA,CAAA,CAAA,EAGM,mBAAA,CAAA,GAAA,CAAA,OAHN;;;;;AAGA,iBAkBd,cAlBc,CAAA,cAAA;MAA3B,MAAA;QAAiC,CAAA,CAAA;EAAA,GAAA;EAAA;AAAA,CAAA,EAqBjC,mBArBiC,CAqBb,KArBa,EAqBN,KArBM,CAAA,CAAA,EAqBA,mBAAA,CAAA,GAAA,CAAA,OArBA"}
1
+ {"version":3,"file":"archive-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/utils/archive-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAQY;;;EAAA,MAAA,EACF,iBADqB;CAAA,GAE3B,IAF2B,CAEtB,0BAFsB,CAEK,KAFL,EAEY,KAFZ,CAAA,EAAA,KAAA,CAAA;;;;;AAE3B,iBAMY,cANZ,CAAA,cAAA;EAAI,EAAA,EAAA,MAAA;AAMR,CAAA,EAAA,KAAgB,CAAA,CAAA;EAAA,GAAA;EAAA;AAAc,CAAA,EAG3B,mBAH2B,CAGP,KAHO,EAGA,KAHA,CAAA,CAAA,EAGM,oBAAA,CAAA,GAAA,CAAA,OAHN;;;;;AAGA,iBAkBd,cAlBc,CAAA,cAAA;MAA3B,MAAA;QAAiC,CAAA,CAAA;EAAA,GAAA;EAAA;AAAA,CAAA,EAqBjC,mBArBiC,CAqBb,KArBa,EAqBN,KArBM,CAAA,CAAA,EAqBA,oBAAA,CAAA,GAAA,CAAA,OArBA"}
@@ -1,6 +1,6 @@
1
1
  import { BulkCommandAction } from "../hooks/use-command-action.client.js";
2
2
  import { BulkCommandDefRenderParams } from "../lib/definitions.js";
3
- import * as react_jsx_runtime97 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime236 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/modules/commands/utils/delete-command.client.d.ts
6
6
  type DeleteCommandProps<TData extends {
@@ -17,7 +17,7 @@ declare function DeleteCommand<TData extends {
17
17
  }, TMeta>({
18
18
  ids,
19
19
  action
20
- }: DeleteCommandProps<TData, TMeta>): react_jsx_runtime97.JSX.Element;
20
+ }: DeleteCommandProps<TData, TMeta>): react_jsx_runtime236.JSX.Element;
21
21
  //#endregion
22
22
  export { DeleteCommand, DeleteCommandProps };
23
23
  //# sourceMappingURL=delete-command.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/utils/delete-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAkBY;;;EAAA,MAAA,EACF,iBADoB;CAAA,GAE1B,IAF0B,CAErB,0BAFqB,CAEM,KAFN,EAEa,KAFb,CAAA,EAAA,KAAA,CAAA;;;;;AAE1B,iBAMY,aANZ,CAAA,cAAA;EAAI,EAAA,EAAA,MAAA;AAMR,CAAA,EAAA,KAAgB,CAAA,CAAA;EAAA,GAAA;EAAA;AAAa,CAAA,EAG1B,kBAH0B,CAGP,KAHO,EAGA,KAHA,CAAA,CAAA,EAGM,mBAAA,CAAA,GAAA,CAAA,OAHN"}
1
+ {"version":3,"file":"delete-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/utils/delete-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAkBY;;;EAAA,MAAA,EACF,iBADoB;CAAA,GAE1B,IAF0B,CAErB,0BAFqB,CAEM,KAFN,EAEa,KAFb,CAAA,EAAA,KAAA,CAAA;;;;;AAE1B,iBAMY,aANZ,CAAA,cAAA;EAAI,EAAA,EAAA,MAAA;AAMR,CAAA,EAAA,KAAgB,CAAA,CAAA;EAAA,GAAA;EAAA;AAAa,CAAA,EAG1B,kBAH0B,CAGP,KAHO,EAGA,KAHA,CAAA,CAAA,EAGM,oBAAA,CAAA,GAAA,CAAA,OAHN"}
@@ -2,7 +2,7 @@ import { CommandAction } from "../hooks/use-command-action.client.js";
2
2
  import { CommandFormDialogTrigger } from "../components/form-dialog-command.client.js";
3
3
  import { SingleCommandDefRenderParams } from "../lib/definitions.js";
4
4
  import { SendEmailSchema } from "../lib/schema.js";
5
- import * as react_jsx_runtime1 from "react/jsx-runtime";
5
+ import * as react_jsx_runtime237 from "react/jsx-runtime";
6
6
  import { DefaultValues, FieldValues } from "react-hook-form";
7
7
  import { ZodSchema } from "zod";
8
8
 
@@ -34,7 +34,7 @@ declare function SendMailCommand<TSchema extends SendEmailSchema, TData extends
34
34
  defaultValues,
35
35
  meta,
36
36
  children
37
- }: SendMailCommandProps<TSchema, TData, TMeta>): react_jsx_runtime1.JSX.Element;
37
+ }: SendMailCommandProps<TSchema, TData, TMeta>): react_jsx_runtime237.JSX.Element;
38
38
  declare const SendMailCommandTrigger: typeof CommandFormDialogTrigger;
39
39
  //#endregion
40
40
  export { SendMailCommand, SendMailCommandMeta, SendMailCommandProps, SendMailCommandTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"send-mail-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/utils/send-mail-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAuCY,mBAAA;;;IAAA,IAAA,EAAA,MAAA;IAIA,KAAA,EAAA,MAAA;EAAoB,CAAA,EAAA;;AAGhB,KAHJ,oBAGI,CAAA,gBAFE,WAEF,EAAA,cAAA;MAEI,MAAA;iBAFJ,mBAEN,CAAA,GAAA;QACc,EADd,SACc,CADJ,OACI,CAAA;QAAd,EAAA,aAAA,CAAc,OAAd,CAAA;eACsB,CAAA,EAAd,aAAc,CAAA,OAAA,CAAA;UAAd,CAAA,EACL,KAAA,CAAM,SADD;IAEd,IADS,CACJ,4BADU,CACmB,KADnB,EAC0B,KAD1B,CAAA,EAAA,MAAA,CAAA;;;;;AACX,iBAMQ,eANR,CAAA,gBAOU,eAPV,EAAA,cAAA;EAMQ,EAAA,EAAA,MAAA;CAAe,EAAA,cAGf,mBAHe,CAAA,CAAA;EAAA,MAAA;EAAA,MAAA;EAAA,aAAA;EAAA,IAAA;EAAA;AAAA,CAAA,EAIsB,oBAJtB,CAI2C,OAJ3C,EAIoD,KAJpD,EAI2D,KAJ3D,CAAA,CAAA,EAIiE,kBAAA,CAAA,GAAA,CAAA,OAJjE;AACb,cA+HL,sBA/HK,EAAA,OA+HiB,wBA/HjB"}
1
+ {"version":3,"file":"send-mail-command.client.d.ts","names":[],"sources":["../../../../src/modules/commands/utils/send-mail-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAuCY,mBAAA;;;IAAA,IAAA,EAAA,MAAA;IAIA,KAAA,EAAA,MAAA;EAAoB,CAAA,EAAA;;AAGhB,KAHJ,oBAGI,CAAA,gBAFE,WAEF,EAAA,cAAA;MAEI,MAAA;iBAFJ,mBAEN,CAAA,GAAA;QACc,EADd,SACc,CADJ,OACI,CAAA;QAAd,EAAA,aAAA,CAAc,OAAd,CAAA;eACsB,CAAA,EAAd,aAAc,CAAA,OAAA,CAAA;UAAd,CAAA,EACL,KAAA,CAAM,SADD;IAEd,IADS,CACJ,4BADU,CACmB,KADnB,EAC0B,KAD1B,CAAA,EAAA,MAAA,CAAA;;;;;AACX,iBAMQ,eANR,CAAA,gBAOU,eAPV,EAAA,cAAA;EAMQ,EAAA,EAAA,MAAA;CAAe,EAAA,cAGf,mBAHe,CAAA,CAAA;EAAA,MAAA;EAAA,MAAA;EAAA,aAAA;EAAA,IAAA;EAAA;AAAA,CAAA,EAIsB,oBAJtB,CAI2C,OAJ3C,EAIoD,KAJpD,EAI2D,KAJ3D,CAAA,CAAA,EAIiE,oBAAA,CAAA,GAAA,CAAA,OAJjE;AACb,cA+HL,sBA/HK,EAAA,OA+HiB,wBA/HjB"}
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
 
4
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
4
+ import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.client.js";
5
5
  import { Input } from "../../../components/ui/input.js";
6
+ import { CommandFormDialog, CommandFormDialogCancel, CommandFormDialogContent, CommandFormDialogDescription, CommandFormDialogFields, CommandFormDialogFooter, CommandFormDialogHeader, CommandFormDialogSubmit, CommandFormDialogTitle, CommandFormDialogTrigger } from "../components/form-dialog-command.client.js";
7
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
6
8
  import { Textarea } from "../../../components/ui/textarea.js";
7
9
  import { ComboboxDropdown } from "../../../components/ui/combobox-dropdown.client.js";
8
- import { Form as Form$1, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../../../components/ui/form.client.js";
9
- import { CommandFormDialog, CommandFormDialogCancel, CommandFormDialogContent, CommandFormDialogDescription, CommandFormDialogFields, CommandFormDialogFooter, CommandFormDialogHeader, CommandFormDialogSubmit, CommandFormDialogTitle, CommandFormDialogTrigger } from "../components/form-dialog-command.client.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { useForm } from "react-hook-form";
12
12
  import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
@@ -1,14 +1,14 @@
1
- import * as drizzle_orm189 from "drizzle-orm";
2
- import * as drizzle_orm_pg_core843 from "drizzle-orm/pg-core";
1
+ import * as drizzle_orm0 from "drizzle-orm";
2
+ import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
3
3
 
4
4
  //#region src/modules/config/db/helpers.d.ts
5
5
  /**
6
6
  * Base columns4
7
7
  */
8
8
  declare const baseColumns: {
9
- id: drizzle_orm189.HasRuntimeDefault<drizzle_orm189.HasDefault<drizzle_orm189.IsPrimaryKey<drizzle_orm189.NotNull<drizzle_orm_pg_core843.PgUUIDBuilderInitial<"">>>>>;
10
- createdAt: drizzle_orm189.NotNull<drizzle_orm189.HasDefault<drizzle_orm_pg_core843.PgTimestampBuilderInitial<"">>>;
11
- updatedAt: drizzle_orm189.HasDefault<drizzle_orm189.NotNull<drizzle_orm189.HasDefault<drizzle_orm_pg_core843.PgTimestampBuilderInitial<"">>>>;
9
+ id: drizzle_orm0.HasRuntimeDefault<drizzle_orm0.HasDefault<drizzle_orm0.IsPrimaryKey<drizzle_orm0.NotNull<drizzle_orm_pg_core0.PgUUIDBuilderInitial<"">>>>>;
10
+ createdAt: drizzle_orm0.NotNull<drizzle_orm0.HasDefault<drizzle_orm_pg_core0.PgTimestampBuilderInitial<"">>>;
11
+ updatedAt: drizzle_orm0.HasDefault<drizzle_orm0.NotNull<drizzle_orm0.HasDefault<drizzle_orm_pg_core0.PgTimestampBuilderInitial<"">>>>;
12
12
  };
13
13
  //#endregion
14
14
  export { baseColumns };
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","names":[],"sources":["../../../../src/modules/config/db/helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;cAMa;EAAA,EAAA,kCAWZ,0BAAA,4BAAA,uBAAA,CAAA,sBAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAA,SAAA,wBAAA,0BAAA,iDAAA,CAAA,EAAA,CAAA,CAAA,CAAA;WAAA,2BAAA,uBAAA,0BAAA,iDAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","names":[],"sources":["../../../../src/modules/config/db/helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;cAMa;EAAA,EAAA,gCAWZ,wBAAA,0BAAA,qBAAA,CAAA,oBAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAA,SAAA,sBAAA,wBAAA,+CAAA,CAAA,EAAA,CAAA,CAAA,CAAA;WAAA,yBAAA,qBAAA,wBAAA,+CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1,6 +1,5 @@
1
1
  import { Role, createAccessControl } from "../../auth/lib/permissions.js";
2
2
  import { TDatabaseSchema } from "../db/types.js";
3
- import { PathConfig } from "../paths/types.js";
4
3
  import "server-cli-only";
5
4
  import { S3ClientConfig } from "@aws-sdk/client-s3";
6
5
 
@@ -10,7 +9,6 @@ type TulipConfig<TSchema extends TDatabaseSchema> = {
10
9
  name: string;
11
10
  shortName: string;
12
11
  };
13
- paths: PathConfig<TSchema>;
14
12
  database: {
15
13
  schema: TSchema;
16
14
  pool: {
@@ -1 +1 @@
1
- {"version":3,"file":"config.server.d.ts","names":[],"sources":["../../../../src/modules/config/lib/config.server.ts"],"sourcesContent":[],"mappings":";;;;;;;KAOY,4BAA4B;;IAA5B,IAAA,EAAA,MAAW;IAAA,SAAA,EAAA,MAAA;;OAKH,EAAX,UAAW,CAAA,OAAA,CAAA;UAAX,EAAA;IAEG,MAAA,EAAA,OAAA;IAOc,IAAA,EAAA;MAAlB,gBAAA,EAAA,MAAA;MAEgB,GAAA,CAAA,EAAA,MAAA;IAOb,CAAA;EAAc,CAAA;EAOZ,IAAA,EAAA;IAEoB,EAAA,EAlBzB,UAkByB,CAAA,OAlBP,mBAkBO,CAAA;IAFY,KAAA,EAAA,UACvB,MAAA,IAfE,IAeF,EAAZ;;OACP,EAAA;IAAW,GAAA,EAAA,MAAA;;;WATH;;;;;cAOE,+BAAgC,yBACnC,YAAY,aACnB,YAAY"}
1
+ {"version":3,"file":"config.server.d.ts","names":[],"sources":["../../../../src/modules/config/lib/config.server.ts"],"sourcesContent":[],"mappings":";;;;;;KAMY,4BAA4B;;IAA5B,IAAA,EAAA,MAAW;IAAA,SAAA,EAAA,MAAA;;UAOX,EAAA;IAOc,MAAA,EAPd,OAOc;IAAlB,IAAA,EAAA;MAEgB,gBAAA,EAAA,MAAA;MAOb,GAAA,CAAA,EAAA,MAAA;IAAc,CAAA;EAOZ,CAAA;EAEoB,IAAA,EAAA;IAFY,EAAA,EAhBrC,UAgBqC,CAAA,OAhBnB,mBAgBmB,CAAA;IACvB,KAAA,EAAA,UAAZ,MAAA,IAfc,IAed,EACK;;EAAD,KAAA,EAAA;;;;WATH;;;;;cAOE,+BAAgC,yBACnC,YAAY,aACnB,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.server.js","names":[],"sources":["../../../../src/modules/config/lib/config.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport { createAccessControl, Role } from \"@/modules/auth/lib/permissions\";\nimport { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { S3ClientConfig } from \"@aws-sdk/client-s3\";\nimport { PathConfig } from \"../paths/types\";\n\nexport type TulipConfig<TSchema extends TDatabaseSchema> = {\n general: {\n name: string;\n shortName: string;\n };\n paths: PathConfig<TSchema>;\n database: {\n schema: TSchema;\n pool: {\n connectionString: string;\n max?: number;\n };\n };\n auth: {\n ac: ReturnType<typeof createAccessControl>;\n roles: {\n [key in string]?: Role;\n };\n };\n email: {\n key: string;\n from: string;\n };\n uploads: S3ClientConfig;\n};\n\n/**\n * Build the Tulip config\n */\n\nexport const defineConfig = <TSchema extends TDatabaseSchema>(\n config: TulipConfig<TSchema>,\n): TulipConfig<TSchema> => config;\n"],"mappings":";;;;;;AAqCA,MAAa,gBACX,WACyB"}
1
+ {"version":3,"file":"config.server.js","names":[],"sources":["../../../../src/modules/config/lib/config.server.ts"],"sourcesContent":["import \"server-cli-only\";\n\nimport { createAccessControl, Role } from \"@/modules/auth/lib/permissions\";\nimport { TDatabaseSchema } from \"@/modules/config/db/types\";\nimport { S3ClientConfig } from \"@aws-sdk/client-s3\";\n\nexport type TulipConfig<TSchema extends TDatabaseSchema> = {\n general: {\n name: string;\n shortName: string;\n };\n // paths: PathConfig;\n database: {\n schema: TSchema;\n pool: {\n connectionString: string;\n max?: number;\n };\n };\n auth: {\n ac: ReturnType<typeof createAccessControl>;\n roles: {\n [key in string]?: Role;\n };\n };\n email: {\n key: string;\n from: string;\n };\n uploads: S3ClientConfig;\n};\n\n/**\n * Build the Tulip config\n */\n\nexport const defineConfig = <TSchema extends TDatabaseSchema>(\n config: TulipConfig<TSchema>,\n): TulipConfig<TSchema> => config;\n"],"mappings":";;;;;;AAoCA,MAAa,gBACX,WACyB"}