@tulip-systems/core 0.5.16 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (936) hide show
  1. package/dist/auth/server.d.mts +1 -1
  2. package/dist/auth/server.mjs +1 -1
  3. package/dist/commands/client.d.mts +2 -1
  4. package/dist/commands/client.mjs +2 -1
  5. package/dist/components/client.d.mts +1 -1
  6. package/dist/components/client.mjs +1 -1
  7. package/dist/components/common/icons.d.mts +52 -52
  8. package/dist/components/common/icons.d.mts.map +1 -1
  9. package/dist/components/common/icons.mjs.map +1 -1
  10. package/dist/components/common/status.d.mts +3 -3
  11. package/dist/components/common/status.d.mts.map +1 -1
  12. package/dist/components/common/status.mjs.map +1 -1
  13. package/dist/components/editor/components/content.client.d.mts +2 -2
  14. package/dist/components/editor/components/content.client.d.mts.map +1 -1
  15. package/dist/components/editor/components/content.client.mjs.map +1 -1
  16. package/dist/components/editor/components/editor.client.d.mts +6 -6
  17. package/dist/components/editor/components/editor.client.d.mts.map +1 -1
  18. package/dist/components/editor/components/editor.client.mjs +2 -2
  19. package/dist/components/editor/components/editor.client.mjs.map +1 -1
  20. package/dist/components/editor/components/menu-nodes.client.mjs +3 -3
  21. package/dist/components/editor/components/menu-nodes.client.mjs.map +1 -1
  22. package/dist/components/editor/components/menu.client.d.mts +3 -3
  23. package/dist/components/editor/components/menu.client.d.mts.map +1 -1
  24. package/dist/components/editor/components/menu.client.mjs.map +1 -1
  25. package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -1
  26. package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -1
  27. package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -1
  28. package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -1
  29. package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
  30. package/dist/components/editor/extensions/image/extension.d.mts.map +1 -1
  31. package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
  32. package/dist/components/editor/extensions/skeleton/renderer.mjs +1 -1
  33. package/dist/components/editor/extensions/skeleton/renderer.mjs.map +1 -1
  34. package/dist/components/editor/lib/constants.d.mts +27 -27
  35. package/dist/components/editor/lib/constants.d.mts.map +1 -1
  36. package/dist/components/editor/lib/extensions.d.mts +0 -1
  37. package/dist/components/editor/lib/extensions.d.mts.map +1 -1
  38. package/dist/components/editor/lib/extensions.mjs +6 -8
  39. package/dist/components/editor/lib/extensions.mjs.map +1 -1
  40. package/dist/components/editor/lib/helpers.d.mts +0 -1
  41. package/dist/components/editor/lib/helpers.d.mts.map +1 -1
  42. package/dist/components/editor/lib/helpers.mjs.map +1 -1
  43. package/dist/components/editor/lib/types.d.mts +0 -1
  44. package/dist/components/editor/lib/types.d.mts.map +1 -1
  45. package/dist/components/editor/lib/variants.mjs.map +1 -1
  46. package/dist/components/emails/forget-password-email.mjs +1 -2
  47. package/dist/components/emails/forget-password-email.mjs.map +1 -1
  48. package/dist/components/header/back-button.client.d.mts +2 -2
  49. package/dist/components/header/back-button.client.d.mts.map +1 -1
  50. package/dist/components/header/back-button.client.mjs.map +1 -1
  51. package/dist/components/header/bottom-bar.client.d.mts +3 -3
  52. package/dist/components/header/bottom-bar.client.d.mts.map +1 -1
  53. package/dist/components/header/bottom-bar.client.mjs.map +1 -1
  54. package/dist/components/header/breadcrumbs.client.d.mts +7 -7
  55. package/dist/components/header/breadcrumbs.client.d.mts.map +1 -1
  56. package/dist/components/header/breadcrumbs.client.mjs.map +1 -1
  57. package/dist/components/header/header.client.d.mts +2 -2
  58. package/dist/components/header/header.client.d.mts.map +1 -1
  59. package/dist/components/header/header.client.mjs.map +1 -1
  60. package/dist/components/header/indicator.client.mjs.map +1 -1
  61. package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
  62. package/dist/components/header/mobile-nav-switcher.client.d.mts.map +1 -1
  63. package/dist/components/header/top-bar.client.d.mts +4 -4
  64. package/dist/components/header/top-bar.client.d.mts.map +1 -1
  65. package/dist/components/header/top-bar.client.mjs.map +1 -1
  66. package/dist/components/layouts/admin-content.client.d.mts +2 -2
  67. package/dist/components/layouts/admin-content.client.d.mts.map +1 -1
  68. package/dist/components/layouts/admin-content.client.mjs.map +1 -1
  69. package/dist/components/layouts/admin-error-pages.d.mts +4 -4
  70. package/dist/components/layouts/admin-error-pages.d.mts.map +1 -1
  71. package/dist/components/layouts/admin-error-pages.mjs.map +1 -1
  72. package/dist/components/layouts/admin-layout.d.mts +2 -2
  73. package/dist/components/layouts/admin-layout.d.mts.map +1 -1
  74. package/dist/components/layouts/admin-layout.mjs.map +1 -1
  75. package/dist/components/layouts/admin-loading.d.mts +2 -2
  76. package/dist/components/layouts/admin-loading.d.mts.map +1 -1
  77. package/dist/components/layouts/admin-loading.mjs.map +1 -1
  78. package/dist/components/layouts/empty-page.d.mts +4 -4
  79. package/dist/components/layouts/empty-page.d.mts.map +1 -1
  80. package/dist/components/layouts/empty-page.mjs.map +1 -1
  81. package/dist/components/layouts/error-page.d.mts +9 -9
  82. package/dist/components/layouts/error-page.d.mts.map +1 -1
  83. package/dist/components/layouts/error-page.mjs.map +1 -1
  84. package/dist/components/layouts/error-sections.d.mts +5 -5
  85. package/dist/components/layouts/error-sections.d.mts.map +1 -1
  86. package/dist/components/layouts/error-sections.mjs.map +1 -1
  87. package/dist/components/layouts/list-layout.d.mts +2 -2
  88. package/dist/components/layouts/list-layout.d.mts.map +1 -1
  89. package/dist/components/layouts/list-layout.mjs.map +1 -1
  90. package/dist/components/layouts/providers.client.d.mts +2 -2
  91. package/dist/components/layouts/providers.client.d.mts.map +1 -1
  92. package/dist/components/layouts/providers.client.mjs +1 -1
  93. package/dist/components/layouts/providers.client.mjs.map +1 -1
  94. package/dist/components/layouts/root-error-pages.d.mts +2 -2
  95. package/dist/components/layouts/root-error-pages.d.mts.map +1 -1
  96. package/dist/components/layouts/root-layout.server.d.mts +2 -2
  97. package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
  98. package/dist/components/layouts/root-layout.server.mjs.map +1 -1
  99. package/dist/components/layouts/root-loading.d.mts +2 -2
  100. package/dist/components/layouts/root-loading.d.mts.map +1 -1
  101. package/dist/components/layouts/tab-layout.d.mts +2 -2
  102. package/dist/components/layouts/tab-layout.d.mts.map +1 -1
  103. package/dist/components/layouts/tab-layout.mjs +3 -3
  104. package/dist/components/layouts/tab-layout.mjs.map +1 -1
  105. package/dist/components/lists/data-list.d.mts +5 -5
  106. package/dist/components/lists/data-list.d.mts.map +1 -1
  107. package/dist/components/lists/data-list.mjs.map +1 -1
  108. package/dist/components/lists/data-stack.d.mts +8 -8
  109. package/dist/components/lists/data-stack.d.mts.map +1 -1
  110. package/dist/components/lists/data-stack.mjs.map +1 -1
  111. package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
  112. package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
  113. package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
  114. package/dist/components/navigation/admin-sidebar-paths.client.mjs.map +1 -1
  115. package/dist/components/navigation/admin-sidebar-skeleton.mjs.map +1 -1
  116. package/dist/components/ui/accordion.d.mts +5 -5
  117. package/dist/components/ui/accordion.d.mts.map +1 -1
  118. package/dist/components/ui/accordion.mjs +0 -1
  119. package/dist/components/ui/accordion.mjs.map +1 -1
  120. package/dist/components/ui/alert-dialog.d.mts +12 -12
  121. package/dist/components/ui/alert-dialog.d.mts.map +1 -1
  122. package/dist/components/ui/alert-dialog.mjs +0 -1
  123. package/dist/components/ui/alert-dialog.mjs.map +1 -1
  124. package/dist/components/ui/alert.d.mts +4 -4
  125. package/dist/components/ui/alert.d.mts.map +1 -1
  126. package/dist/components/ui/alert.mjs +0 -1
  127. package/dist/components/ui/alert.mjs.map +1 -1
  128. package/dist/components/ui/aspect-ratio.d.mts +2 -2
  129. package/dist/components/ui/aspect-ratio.d.mts.map +1 -1
  130. package/dist/components/ui/avatar.client.d.mts +4 -4
  131. package/dist/components/ui/avatar.client.d.mts.map +1 -1
  132. package/dist/components/ui/avatar.client.mjs +0 -1
  133. package/dist/components/ui/avatar.client.mjs.map +1 -1
  134. package/dist/components/ui/badge.d.mts +3 -3
  135. package/dist/components/ui/badge.d.mts.map +1 -1
  136. package/dist/components/ui/badge.mjs +0 -1
  137. package/dist/components/ui/badge.mjs.map +1 -1
  138. package/dist/components/ui/breadcrumb.d.mts +8 -8
  139. package/dist/components/ui/breadcrumb.d.mts.map +1 -1
  140. package/dist/components/ui/breadcrumb.mjs +1 -2
  141. package/dist/components/ui/breadcrumb.mjs.map +1 -1
  142. package/dist/components/ui/button.d.mts +5 -5
  143. package/dist/components/ui/button.d.mts.map +1 -1
  144. package/dist/components/ui/button.mjs +0 -1
  145. package/dist/components/ui/button.mjs.map +1 -1
  146. package/dist/components/ui/calendar.d.mts +3 -3
  147. package/dist/components/ui/calendar.d.mts.map +1 -1
  148. package/dist/components/ui/calendar.mjs +12 -12
  149. package/dist/components/ui/calendar.mjs.map +1 -1
  150. package/dist/components/ui/card.d.mts +7 -7
  151. package/dist/components/ui/card.d.mts.map +1 -1
  152. package/dist/components/ui/card.mjs +0 -1
  153. package/dist/components/ui/card.mjs.map +1 -1
  154. package/dist/components/ui/carousel.d.mts +6 -6
  155. package/dist/components/ui/carousel.d.mts.map +1 -1
  156. package/dist/components/ui/carousel.mjs +4 -4
  157. package/dist/components/ui/carousel.mjs.map +1 -1
  158. package/dist/components/ui/chart.client.d.mts +5 -5
  159. package/dist/components/ui/chart.client.d.mts.map +1 -1
  160. package/dist/components/ui/chart.client.mjs +6 -6
  161. package/dist/components/ui/chart.client.mjs.map +1 -1
  162. package/dist/components/ui/checkbox.d.mts +2 -2
  163. package/dist/components/ui/checkbox.d.mts.map +1 -1
  164. package/dist/components/ui/checkbox.mjs +0 -1
  165. package/dist/components/ui/checkbox.mjs.map +1 -1
  166. package/dist/components/ui/collapsible.client.d.mts +4 -4
  167. package/dist/components/ui/collapsible.client.d.mts.map +1 -1
  168. package/dist/components/ui/color-picker.client.d.mts +2 -2
  169. package/dist/components/ui/color-picker.client.d.mts.map +1 -1
  170. package/dist/components/ui/color-picker.client.mjs +6 -5
  171. package/dist/components/ui/color-picker.client.mjs.map +1 -1
  172. package/dist/components/ui/combobox-dropdown.client.d.mts +2 -3
  173. package/dist/components/ui/combobox-dropdown.client.d.mts.map +1 -1
  174. package/dist/components/ui/combobox-dropdown.client.mjs +3 -3
  175. package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
  176. package/dist/components/ui/combobox.client.d.mts +2 -2
  177. package/dist/components/ui/combobox.client.d.mts.map +1 -1
  178. package/dist/components/ui/combobox.client.mjs +2 -2
  179. package/dist/components/ui/combobox.client.mjs.map +1 -1
  180. package/dist/components/ui/command.d.mts +10 -10
  181. package/dist/components/ui/command.d.mts.map +1 -1
  182. package/dist/components/ui/command.mjs +0 -1
  183. package/dist/components/ui/command.mjs.map +1 -1
  184. package/dist/components/ui/context-menu.d.mts +16 -16
  185. package/dist/components/ui/context-menu.d.mts.map +1 -1
  186. package/dist/components/ui/context-menu.mjs +0 -1
  187. package/dist/components/ui/context-menu.mjs.map +1 -1
  188. package/dist/components/ui/date-picker.client.d.mts +2 -2
  189. package/dist/components/ui/date-picker.client.d.mts.map +1 -1
  190. package/dist/components/ui/date-picker.client.mjs +3 -3
  191. package/dist/components/ui/date-picker.client.mjs.map +1 -1
  192. package/dist/components/ui/dialog.client.d.mts +11 -11
  193. package/dist/components/ui/dialog.client.d.mts.map +1 -1
  194. package/dist/components/ui/dialog.client.mjs +0 -1
  195. package/dist/components/ui/dialog.client.mjs.map +1 -1
  196. package/dist/components/ui/drawer.client.d.mts +11 -11
  197. package/dist/components/ui/drawer.client.d.mts.map +1 -1
  198. package/dist/components/ui/drawer.client.mjs +0 -1
  199. package/dist/components/ui/drawer.client.mjs.map +1 -1
  200. package/dist/components/ui/dropdown-menu.d.mts +16 -16
  201. package/dist/components/ui/dropdown-menu.d.mts.map +1 -1
  202. package/dist/components/ui/dropdown-menu.mjs +0 -1
  203. package/dist/components/ui/dropdown-menu.mjs.map +1 -1
  204. package/dist/components/ui/form.client.d.mts +7 -7
  205. package/dist/components/ui/form.client.d.mts.map +1 -1
  206. package/dist/components/ui/form.client.mjs.map +1 -1
  207. package/dist/components/ui/hover-card.client.d.mts +4 -4
  208. package/dist/components/ui/hover-card.client.d.mts.map +1 -1
  209. package/dist/components/ui/hover-card.client.mjs +0 -1
  210. package/dist/components/ui/hover-card.client.mjs.map +1 -1
  211. package/dist/components/ui/input-date-time.d.mts +6 -6
  212. package/dist/components/ui/input-date-time.d.mts.map +1 -1
  213. package/dist/components/ui/input-date-time.mjs +4 -6
  214. package/dist/components/ui/input-date-time.mjs.map +1 -1
  215. package/dist/components/ui/input-date.d.mts +2 -2
  216. package/dist/components/ui/input-date.d.mts.map +1 -1
  217. package/dist/components/ui/input-recipient.d.mts +2 -2
  218. package/dist/components/ui/input-recipient.d.mts.map +1 -1
  219. package/dist/components/ui/input-recipient.mjs +2 -2
  220. package/dist/components/ui/input-recipient.mjs.map +1 -1
  221. package/dist/components/ui/input-time.d.mts +2 -2
  222. package/dist/components/ui/input-time.d.mts.map +1 -1
  223. package/dist/components/ui/input.d.mts +2 -2
  224. package/dist/components/ui/input.d.mts.map +1 -1
  225. package/dist/components/ui/input.mjs +0 -1
  226. package/dist/components/ui/input.mjs.map +1 -1
  227. package/dist/components/ui/label.d.mts +2 -2
  228. package/dist/components/ui/label.d.mts.map +1 -1
  229. package/dist/components/ui/label.mjs +0 -1
  230. package/dist/components/ui/label.mjs.map +1 -1
  231. package/dist/components/ui/navigation-menu.d.mts +11 -11
  232. package/dist/components/ui/navigation-menu.d.mts.map +1 -1
  233. package/dist/components/ui/navigation-menu.mjs +0 -1
  234. package/dist/components/ui/navigation-menu.mjs.map +1 -1
  235. package/dist/components/ui/pagination.d.mts +8 -8
  236. package/dist/components/ui/pagination.d.mts.map +1 -1
  237. package/dist/components/ui/pagination.mjs +0 -1
  238. package/dist/components/ui/pagination.mjs.map +1 -1
  239. package/dist/components/ui/popover.d.mts +5 -5
  240. package/dist/components/ui/popover.d.mts.map +1 -1
  241. package/dist/components/ui/popover.mjs +0 -1
  242. package/dist/components/ui/popover.mjs.map +1 -1
  243. package/dist/components/ui/progress.client.d.mts +2 -2
  244. package/dist/components/ui/progress.client.d.mts.map +1 -1
  245. package/dist/components/ui/progress.client.mjs +0 -1
  246. package/dist/components/ui/progress.client.mjs.map +1 -1
  247. package/dist/components/ui/radio-group.d.mts +3 -3
  248. package/dist/components/ui/radio-group.d.mts.map +1 -1
  249. package/dist/components/ui/radio-group.mjs +0 -1
  250. package/dist/components/ui/radio-group.mjs.map +1 -1
  251. package/dist/components/ui/resizable.client.d.mts +4 -4
  252. package/dist/components/ui/resizable.client.d.mts.map +1 -1
  253. package/dist/components/ui/resizable.client.mjs +0 -1
  254. package/dist/components/ui/resizable.client.mjs.map +1 -1
  255. package/dist/components/ui/scroll-area.d.mts +3 -3
  256. package/dist/components/ui/scroll-area.d.mts.map +1 -1
  257. package/dist/components/ui/scroll-area.mjs +0 -1
  258. package/dist/components/ui/scroll-area.mjs.map +1 -1
  259. package/dist/components/ui/select.client.d.mts +11 -11
  260. package/dist/components/ui/select.client.d.mts.map +1 -1
  261. package/dist/components/ui/select.client.mjs +0 -1
  262. package/dist/components/ui/select.client.mjs.map +1 -1
  263. package/dist/components/ui/separator.d.mts +2 -2
  264. package/dist/components/ui/separator.d.mts.map +1 -1
  265. package/dist/components/ui/separator.mjs +0 -1
  266. package/dist/components/ui/separator.mjs.map +1 -1
  267. package/dist/components/ui/sheet.client.d.mts +9 -9
  268. package/dist/components/ui/sheet.client.d.mts.map +1 -1
  269. package/dist/components/ui/sheet.client.mjs +0 -1
  270. package/dist/components/ui/sheet.client.mjs.map +1 -1
  271. package/dist/components/ui/sidebar.client.d.mts +26 -26
  272. package/dist/components/ui/sidebar.client.d.mts.map +1 -1
  273. package/dist/components/ui/sidebar.client.mjs +2 -2
  274. package/dist/components/ui/sidebar.client.mjs.map +1 -1
  275. package/dist/components/ui/skeleton.d.mts +2 -2
  276. package/dist/components/ui/skeleton.d.mts.map +1 -1
  277. package/dist/components/ui/slider.d.mts +2 -2
  278. package/dist/components/ui/slider.d.mts.map +1 -1
  279. package/dist/components/ui/sonner.client.d.mts +2 -2
  280. package/dist/components/ui/sonner.client.d.mts.map +1 -1
  281. package/dist/components/ui/sonner.client.mjs.map +1 -1
  282. package/dist/components/ui/switch.d.mts +2 -2
  283. package/dist/components/ui/switch.d.mts.map +1 -1
  284. package/dist/components/ui/switch.mjs +0 -1
  285. package/dist/components/ui/switch.mjs.map +1 -1
  286. package/dist/components/ui/tabs.d.mts +5 -5
  287. package/dist/components/ui/tabs.d.mts.map +1 -1
  288. package/dist/components/ui/tabs.mjs +0 -1
  289. package/dist/components/ui/tabs.mjs.map +1 -1
  290. package/dist/components/ui/textarea.d.mts +2 -2
  291. package/dist/components/ui/textarea.d.mts.map +1 -1
  292. package/dist/components/ui/textarea.mjs +0 -1
  293. package/dist/components/ui/textarea.mjs.map +1 -1
  294. package/dist/components/ui/toggle-group.client.d.mts +3 -3
  295. package/dist/components/ui/toggle-group.client.d.mts.map +1 -1
  296. package/dist/components/ui/toggle-group.client.mjs.map +1 -1
  297. package/dist/components/ui/toggle.d.mts +4 -4
  298. package/dist/components/ui/toggle.d.mts.map +1 -1
  299. package/dist/components/ui/toggle.mjs +0 -1
  300. package/dist/components/ui/toggle.mjs.map +1 -1
  301. package/dist/components/ui/tooltip.client.d.mts +5 -5
  302. package/dist/components/ui/tooltip.client.d.mts.map +1 -1
  303. package/dist/components/ui/tooltip.client.mjs +0 -1
  304. package/dist/components/ui/tooltip.client.mjs.map +1 -1
  305. package/dist/components.d.mts +1 -1
  306. package/dist/components.mjs +1 -1
  307. package/dist/data-tables/client.d.mts +4 -4
  308. package/dist/data-tables/client.mjs +4 -4
  309. package/dist/inline-edit/client.d.mts +4 -4
  310. package/dist/inline-edit/client.mjs +2 -2
  311. package/dist/lib/config/constants.d.mts.map +1 -1
  312. package/dist/lib/config/constants.mjs.map +1 -1
  313. package/dist/lib/hooks/use-action.d.mts +0 -1
  314. package/dist/lib/hooks/use-action.d.mts.map +1 -1
  315. package/dist/lib/hooks/use-action.mjs.map +1 -1
  316. package/dist/lib/hooks/use-indicator.d.mts +2 -2
  317. package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
  318. package/dist/lib/hooks/use-indicator.mjs +14 -11
  319. package/dist/lib/hooks/use-indicator.mjs.map +1 -1
  320. package/dist/lib/hooks/use-mobile.client.d.mts.map +1 -1
  321. package/dist/lib/types/config.d.mts.map +1 -1
  322. package/dist/lib/utils/array-move.d.mts.map +1 -1
  323. package/dist/lib/utils/cn.d.mts.map +1 -1
  324. package/dist/lib/utils/cn.mjs.map +1 -1
  325. package/dist/lib/utils/fonts.d.mts.map +1 -1
  326. package/dist/lib/utils/format.d.mts.map +1 -1
  327. package/dist/lib/utils/manifest.d.mts.map +1 -1
  328. package/dist/lib/utils/manifest.mjs.map +1 -1
  329. package/dist/lib/utils/url.d.mts.map +1 -1
  330. package/dist/lib/utils/url.mjs +1 -1
  331. package/dist/lib/utils/url.mjs.map +1 -1
  332. package/dist/modules/auth/components/allowed.client.d.mts +2 -2
  333. package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
  334. package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
  335. package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
  336. package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
  337. package/dist/modules/auth/components/auth-layout.server.mjs +1 -1
  338. package/dist/modules/auth/components/auth-layout.server.mjs.map +1 -1
  339. package/dist/modules/auth/components/auth-loading.d.mts +2 -2
  340. package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
  341. package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
  342. package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
  343. package/dist/modules/auth/components/create-first-user-page.client.mjs +1 -1
  344. package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
  345. package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
  346. package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
  347. package/dist/modules/auth/components/forget-password-page.client.mjs +2 -2
  348. package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
  349. package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
  350. package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
  351. package/dist/modules/auth/components/guard-first-user.server.mjs.map +1 -1
  352. package/dist/modules/auth/components/guard.server.d.mts +2 -2
  353. package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
  354. package/dist/modules/auth/components/guard.server.mjs.map +1 -1
  355. package/dist/modules/auth/components/login-page.client.d.mts +2 -2
  356. package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
  357. package/dist/modules/auth/components/login-page.client.mjs +1 -1
  358. package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
  359. package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
  360. package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
  361. package/dist/modules/auth/components/reset-password-page.client.mjs +2 -2
  362. package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
  363. package/dist/modules/auth/components/update-password-command.d.mts +2 -2
  364. package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
  365. package/dist/modules/auth/components/update-password-command.mjs +0 -1
  366. package/dist/modules/auth/components/update-password-command.mjs.map +1 -1
  367. package/dist/modules/auth/db/schema.d.mts +73 -73
  368. package/dist/modules/auth/db/schema.d.mts.map +1 -1
  369. package/dist/modules/auth/db/schema.mjs +1 -1
  370. package/dist/modules/auth/db/schema.mjs.map +1 -1
  371. package/dist/modules/auth/handler/create-client.client.d.mts +159 -159
  372. package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -1
  373. package/dist/modules/auth/handler/create-client.client.mjs.map +1 -1
  374. package/dist/modules/auth/handler/init.d.mts +98 -98
  375. package/dist/modules/auth/handler/init.d.mts.map +1 -1
  376. package/dist/modules/auth/handler/init.mjs +2 -2
  377. package/dist/modules/auth/handler/init.mjs.map +1 -1
  378. package/dist/modules/auth/handler/proxy.server.d.mts +0 -1
  379. package/dist/modules/auth/handler/proxy.server.d.mts.map +1 -1
  380. package/dist/modules/auth/handler/proxy.server.mjs +0 -1
  381. package/dist/modules/auth/handler/proxy.server.mjs.map +1 -1
  382. package/dist/modules/auth/handler/route.server.d.mts +0 -1
  383. package/dist/modules/auth/handler/route.server.d.mts.map +1 -1
  384. package/dist/modules/auth/handler/route.server.mjs.map +1 -1
  385. package/dist/modules/auth/hooks/use-auth-client.d.mts +4 -4
  386. package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -1
  387. package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -1
  388. package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
  389. package/dist/modules/auth/hooks/use-permission.mjs +2 -2
  390. package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
  391. package/dist/modules/auth/hooks/use-session.d.mts +2 -2
  392. package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
  393. package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
  394. package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
  395. package/dist/modules/auth/lib/helpers.server.mjs +2 -2
  396. package/dist/modules/auth/lib/helpers.server.mjs.map +1 -1
  397. package/dist/modules/auth/lib/permissions.d.mts.map +1 -1
  398. package/dist/modules/auth/lib/validators.d.mts +2 -3
  399. package/dist/modules/auth/lib/validators.d.mts.map +1 -1
  400. package/dist/modules/commands/components/alert-dialog-command.client.d.mts +10 -10
  401. package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
  402. package/dist/modules/commands/components/alert-dialog-command.client.mjs.map +1 -1
  403. package/dist/modules/commands/components/click-command.client.d.mts +2 -2
  404. package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
  405. package/dist/modules/commands/components/click-command.client.mjs +0 -1
  406. package/dist/modules/commands/components/click-command.client.mjs.map +1 -1
  407. package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
  408. package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
  409. package/dist/modules/commands/components/command-trigger.client.mjs.map +1 -1
  410. package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
  411. package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
  412. package/dist/modules/commands/components/dialog-command.client.mjs.map +1 -1
  413. package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
  414. package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
  415. package/dist/modules/commands/components/dropdown-command.client.mjs.map +1 -1
  416. package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
  417. package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
  418. package/dist/modules/commands/components/empty-command.client.mjs +0 -1
  419. package/dist/modules/commands/components/empty-command.client.mjs.map +1 -1
  420. package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -11
  421. package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
  422. package/dist/modules/commands/components/form-dialog-command.client.mjs.map +1 -1
  423. package/dist/modules/commands/components/render-command.mjs.map +1 -1
  424. package/dist/modules/commands/hooks/context.client.mjs.map +1 -1
  425. package/dist/modules/commands/hooks/use-command-menu.client.d.mts +8 -1
  426. package/dist/modules/commands/hooks/use-command-menu.client.d.mts.map +1 -1
  427. package/dist/modules/commands/hooks/use-command-menu.client.mjs +1 -1
  428. package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
  429. package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
  430. package/dist/modules/commands/hooks/use-command-mutation.client.d.mts.map +1 -1
  431. package/dist/modules/commands/hooks/use-command-mutation.client.mjs.map +1 -1
  432. package/dist/modules/commands/lib/definitions.d.mts +0 -1
  433. package/dist/modules/commands/lib/definitions.d.mts.map +1 -1
  434. package/dist/modules/commands/lib/factory.d.mts.map +1 -1
  435. package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
  436. package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
  437. package/dist/modules/commands/menus/context-menu.client.mjs +5 -5
  438. package/dist/modules/commands/menus/context-menu.client.mjs.map +1 -1
  439. package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
  440. package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
  441. package/dist/modules/commands/menus/dropdown-menu.client.mjs.map +1 -1
  442. package/dist/modules/commands/menus/floating-menu.client.d.mts +19 -0
  443. package/dist/modules/commands/menus/floating-menu.client.d.mts.map +1 -0
  444. package/dist/modules/commands/menus/{data-table-menu.client.mjs → floating-menu.client.mjs} +10 -10
  445. package/dist/modules/commands/menus/floating-menu.client.mjs.map +1 -0
  446. package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
  447. package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
  448. package/dist/modules/commands/menus/inline-menu.client.mjs +0 -1
  449. package/dist/modules/commands/menus/inline-menu.client.mjs.map +1 -1
  450. package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
  451. package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
  452. package/dist/modules/commands/menus/responsive-menu.client.mjs.map +1 -1
  453. package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
  454. package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
  455. package/dist/modules/commands/utils/archive-command.client.mjs.map +1 -1
  456. package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
  457. package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
  458. package/dist/modules/commands/utils/delete-command.client.mjs.map +1 -1
  459. package/dist/modules/config/db/helpers.d.mts +5 -5
  460. package/dist/modules/config/db/helpers.d.mts.map +1 -1
  461. package/dist/modules/config/db/helpers.mjs.map +1 -1
  462. package/dist/modules/config/db/init.d.mts.map +1 -1
  463. package/dist/modules/config/db/init.mjs.map +1 -1
  464. package/dist/modules/config/db/types.d.mts.map +1 -1
  465. package/dist/modules/config/lib/config.d.mts.map +1 -1
  466. package/dist/modules/config/lib/context.d.mts.map +1 -1
  467. package/dist/modules/config/lib/context.mjs.map +1 -1
  468. package/dist/modules/config/paths/helpers.d.mts +0 -1
  469. package/dist/modules/config/paths/helpers.d.mts.map +1 -1
  470. package/dist/modules/config/paths/helpers.mjs.map +1 -1
  471. package/dist/modules/config/paths/types.d.mts +0 -1
  472. package/dist/modules/config/paths/types.d.mts.map +1 -1
  473. package/dist/modules/config/providers/email.d.mts.map +1 -1
  474. package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
  475. package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
  476. package/dist/modules/data-tables/components/cell/common.client.mjs.map +1 -1
  477. package/dist/modules/data-tables/components/cell/index.client.d.mts.map +1 -1
  478. package/dist/modules/data-tables/components/cell/select.client.d.mts.map +1 -1
  479. package/dist/modules/data-tables/components/column-header.d.mts +2 -2
  480. package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
  481. package/dist/modules/data-tables/components/column-header.mjs.map +1 -1
  482. package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
  483. package/dist/modules/data-tables/components/filters/combobox.client.d.mts.map +1 -1
  484. package/dist/modules/data-tables/components/filters/combobox.client.mjs.map +1 -1
  485. package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
  486. package/dist/modules/data-tables/components/filters/slider.client.d.mts.map +1 -1
  487. package/dist/modules/data-tables/components/filters/slider.client.mjs +1 -1
  488. package/dist/modules/data-tables/components/filters/slider.client.mjs.map +1 -1
  489. package/dist/modules/data-tables/components/footer.mjs.map +1 -1
  490. package/dist/modules/data-tables/components/header.d.mts +4 -4
  491. package/dist/modules/data-tables/components/header.d.mts.map +1 -1
  492. package/dist/modules/data-tables/components/header.mjs.map +1 -1
  493. package/dist/modules/data-tables/components/layout.d.mts +2 -2
  494. package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
  495. package/dist/modules/data-tables/components/layout.mjs.map +1 -1
  496. package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
  497. package/dist/modules/data-tables/components/search-input.client.d.mts.map +1 -1
  498. package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
  499. package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
  500. package/dist/modules/data-tables/components/skeleton.mjs +4 -4
  501. package/dist/modules/data-tables/components/skeleton.mjs.map +1 -1
  502. package/dist/modules/data-tables/components/table.d.mts +7 -7
  503. package/dist/modules/data-tables/components/table.d.mts.map +1 -1
  504. package/dist/modules/data-tables/components/table.mjs +0 -1
  505. package/dist/modules/data-tables/components/table.mjs.map +1 -1
  506. package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
  507. package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
  508. package/dist/modules/data-tables/components/toolbar.mjs.map +1 -1
  509. package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
  510. package/dist/modules/data-tables/hooks/use-context.client.d.mts.map +1 -1
  511. package/dist/modules/data-tables/hooks/use-context.client.mjs.map +1 -1
  512. package/dist/modules/data-tables/hooks/use-selection.client.mjs.map +1 -1
  513. package/dist/modules/data-tables/hooks/use-table.client.d.mts.map +1 -1
  514. package/dist/modules/data-tables/hooks/use-table.client.mjs.map +1 -1
  515. package/dist/modules/data-tables/lib/converters/cursor.d.mts +0 -1
  516. package/dist/modules/data-tables/lib/converters/cursor.d.mts.map +1 -1
  517. package/dist/modules/data-tables/lib/converters/cursor.mjs.map +1 -1
  518. package/dist/modules/data-tables/lib/converters/dto.d.mts +0 -1
  519. package/dist/modules/data-tables/lib/converters/dto.d.mts.map +1 -1
  520. package/dist/modules/data-tables/lib/converters/dto.mjs.map +1 -1
  521. package/dist/modules/data-tables/lib/converters/filter.d.mts.map +1 -1
  522. package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
  523. package/dist/modules/data-tables/lib/converters/search.d.mts.map +1 -1
  524. package/dist/modules/data-tables/lib/converters/search.mjs.map +1 -1
  525. package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
  526. package/dist/modules/data-tables/lib/converters/sorting.d.mts.map +1 -1
  527. package/dist/modules/data-tables/lib/converters/sorting.mjs.map +1 -1
  528. package/dist/modules/data-tables/lib/filters/config.d.mts.map +1 -1
  529. package/dist/modules/data-tables/lib/filters/config.mjs.map +1 -1
  530. package/dist/modules/data-tables/lib/filters/helpers.d.mts.map +1 -1
  531. package/dist/modules/data-tables/lib/filters/helpers.mjs +4 -4
  532. package/dist/modules/data-tables/lib/filters/helpers.mjs.map +1 -1
  533. package/dist/modules/data-tables/lib/filters/parsers.d.mts.map +1 -1
  534. package/dist/modules/data-tables/lib/filters/parsers.mjs.map +1 -1
  535. package/dist/modules/data-tables/lib/filters/resolvers.d.mts.map +1 -1
  536. package/dist/modules/data-tables/lib/filters/resolvers.mjs +1 -1
  537. package/dist/modules/data-tables/lib/filters/resolvers.mjs.map +1 -1
  538. package/dist/modules/data-tables/lib/helpers/create-column.mjs.map +1 -1
  539. package/dist/modules/data-tables/lib/search-params.d.mts +6 -6
  540. package/dist/modules/data-tables/lib/search-params.d.mts.map +1 -1
  541. package/dist/modules/data-tables/lib/types.d.mts +0 -1
  542. package/dist/modules/data-tables/lib/types.d.mts.map +1 -1
  543. package/dist/modules/data-tables/lib/validators.d.mts +0 -1
  544. package/dist/modules/data-tables/lib/validators.d.mts.map +1 -1
  545. package/dist/modules/data-tables/server/get-data.server.d.mts +1 -1
  546. package/dist/modules/data-tables/server/get-data.server.d.mts.map +1 -1
  547. package/dist/modules/data-tables/server/get-data.server.mjs.map +1 -1
  548. package/dist/modules/data-tables/strategies/helpers/sorting.mjs.map +1 -1
  549. package/dist/modules/data-tables/strategies/infinite/components.mjs +1 -1
  550. package/dist/modules/data-tables/strategies/infinite/components.mjs.map +1 -1
  551. package/dist/modules/data-tables/strategies/infinite/strategy.d.mts.map +1 -1
  552. package/dist/modules/data-tables/strategies/infinite/strategy.mjs.map +1 -1
  553. package/dist/modules/data-tables/strategies/pagination/components.mjs.map +1 -1
  554. package/dist/modules/data-tables/strategies/pagination/strategy.d.mts.map +1 -1
  555. package/dist/modules/data-tables/strategies/pagination/strategy.mjs.map +1 -1
  556. package/dist/modules/data-tables/tables/data-table/components/body.mjs.map +1 -1
  557. package/dist/modules/data-tables/tables/data-table/components/header.mjs.map +1 -1
  558. package/dist/modules/data-tables/tables/data-table/components/row.mjs +0 -1
  559. package/dist/modules/data-tables/tables/data-table/components/row.mjs.map +1 -1
  560. package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
  561. package/dist/modules/data-tables/tables/data-table/components/table.d.mts.map +1 -1
  562. package/dist/modules/data-tables/tables/data-table/components/table.mjs +8 -2
  563. package/dist/modules/data-tables/tables/data-table/components/table.mjs.map +1 -1
  564. package/dist/modules/data-tables/tables/inline-table/components/body.mjs.map +1 -1
  565. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
  566. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts.map +1 -1
  567. package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs +0 -1
  568. package/dist/modules/data-tables/tables/inline-table/components/cells/common.mjs.map +1 -1
  569. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
  570. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts.map +1 -1
  571. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs.map +1 -1
  572. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
  573. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts.map +1 -1
  574. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs +0 -1
  575. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.mjs.map +1 -1
  576. package/dist/modules/data-tables/tables/inline-table/components/header.mjs.map +1 -1
  577. package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs +0 -1
  578. package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs.map +1 -1
  579. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
  580. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
  581. package/dist/modules/data-tables/tables/inline-table/components/table.mjs +8 -2
  582. package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
  583. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
  584. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
  585. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs.map +1 -1
  586. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
  587. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
  588. package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +5 -1
  589. package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
  590. package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
  591. package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
  592. package/dist/modules/inline-edit/components/combobox.client.mjs +8 -4
  593. package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
  594. package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
  595. package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
  596. package/dist/modules/inline-edit/components/date-input.client.mjs +5 -1
  597. package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
  598. package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
  599. package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
  600. package/dist/modules/inline-edit/components/date-picker.client.mjs +8 -4
  601. package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
  602. package/dist/modules/inline-edit/components/date-time.client.d.mts +2 -2
  603. package/dist/modules/inline-edit/components/date-time.client.d.mts.map +1 -1
  604. package/dist/modules/inline-edit/components/date-time.client.mjs +6 -1
  605. package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
  606. package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
  607. package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
  608. package/dist/modules/inline-edit/components/editor.client.mjs +7 -3
  609. package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
  610. package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
  611. package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
  612. package/dist/modules/inline-edit/components/input-recipient.client.mjs +5 -1
  613. package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
  614. package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
  615. package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
  616. package/dist/modules/inline-edit/components/input-toggle.client.mjs +5 -1
  617. package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
  618. package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
  619. package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
  620. package/dist/modules/inline-edit/components/input.client.mjs +16 -4
  621. package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
  622. package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
  623. package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
  624. package/dist/modules/inline-edit/components/select.client.mjs +8 -4
  625. package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
  626. package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
  627. package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
  628. package/dist/modules/inline-edit/components/switch.client.mjs +5 -1
  629. package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
  630. package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
  631. package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
  632. package/dist/modules/inline-edit/components/toggle.client.mjs +8 -4
  633. package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
  634. package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
  635. package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
  636. package/dist/modules/inline-edit/hooks/context.client.mjs +1 -1
  637. package/dist/modules/inline-edit/hooks/context.client.mjs.map +1 -1
  638. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +22 -7
  639. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
  640. package/dist/modules/inline-edit/hooks/use-inline.client.mjs +12 -9
  641. package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
  642. package/dist/modules/inline-edit/lib/validators.d.mts +0 -1
  643. package/dist/modules/inline-edit/lib/validators.d.mts.map +1 -1
  644. package/dist/modules/inline-edit/lib/validators.mjs.map +1 -1
  645. package/dist/modules/inline-edit/lib/variants.d.mts +3 -3
  646. package/dist/modules/inline-edit/lib/variants.d.mts.map +1 -1
  647. package/dist/modules/inline-edit/lib/variants.mjs.map +1 -1
  648. package/dist/modules/router/handler/caller.client.d.mts +0 -1
  649. package/dist/modules/router/handler/caller.client.d.mts.map +1 -1
  650. package/dist/modules/router/handler/caller.client.mjs.map +1 -1
  651. package/dist/modules/router/handler/caller.server.d.mts.map +1 -1
  652. package/dist/modules/router/handler/context.server.d.mts.map +1 -1
  653. package/dist/modules/router/handler/context.server.mjs.map +1 -1
  654. package/dist/modules/router/handler/init.server.d.mts +6 -6
  655. package/dist/modules/router/handler/init.server.d.mts.map +1 -1
  656. package/dist/modules/router/handler/init.server.mjs.map +1 -1
  657. package/dist/modules/router/handler/register.server.d.mts.map +1 -1
  658. package/dist/modules/router/handler/register.server.mjs.map +1 -1
  659. package/dist/modules/router/handler/route.server.d.mts +0 -1
  660. package/dist/modules/router/handler/route.server.d.mts.map +1 -1
  661. package/dist/modules/router/handler/route.server.mjs.map +1 -1
  662. package/dist/modules/router/lib/query-client.d.mts +0 -1
  663. package/dist/modules/router/lib/query-client.d.mts.map +1 -1
  664. package/dist/modules/router/lib/query-client.mjs.map +1 -1
  665. package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
  666. package/dist/modules/router/lib/validators.d.mts +0 -1
  667. package/dist/modules/router/lib/validators.d.mts.map +1 -1
  668. package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
  669. package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
  670. package/dist/modules/storage/components/dropzone-context.client.mjs.map +1 -1
  671. package/dist/modules/storage/components/dropzone.client.d.mts +3 -3
  672. package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
  673. package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
  674. package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
  675. package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
  676. package/dist/modules/storage/components/image-grid.client.mjs +2 -0
  677. package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
  678. package/dist/modules/storage/components/upload-zone-context.client.d.mts +1 -1
  679. package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
  680. package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
  681. package/dist/modules/storage/components/upload-zone.client.d.mts +4 -3
  682. package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
  683. package/dist/modules/storage/components/upload-zone.client.mjs +9 -7
  684. package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
  685. package/dist/modules/storage/config/filters.d.mts.map +1 -1
  686. package/dist/modules/storage/config/filters.mjs.map +1 -1
  687. package/dist/modules/storage/lib/constants.d.mts.map +1 -1
  688. package/dist/modules/storage/lib/create-client.server.d.mts.map +1 -1
  689. package/dist/modules/storage/lib/create-client.server.mjs.map +1 -1
  690. package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
  691. package/dist/modules/storage/lib/create-upload.client.mjs.map +1 -1
  692. package/dist/modules/storage/lib/helpers.d.mts +0 -1
  693. package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
  694. package/dist/modules/storage/lib/helpers.mjs.map +1 -1
  695. package/dist/modules/storage/lib/proxy.server.d.mts.map +1 -1
  696. package/dist/modules/storage/lib/proxy.server.mjs.map +1 -1
  697. package/dist/modules/storage/lib/router.server.d.mts +27 -27
  698. package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
  699. package/dist/modules/storage/lib/router.server.mjs.map +1 -1
  700. package/dist/modules/storage/lib/schema.d.mts +92 -92
  701. package/dist/modules/storage/lib/schema.d.mts.map +1 -1
  702. package/dist/modules/storage/lib/schema.mjs +1 -1
  703. package/dist/modules/storage/lib/schema.mjs.map +1 -1
  704. package/dist/modules/storage/lib/service.server.d.mts +18 -18
  705. package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
  706. package/dist/modules/storage/lib/service.server.mjs.map +1 -1
  707. package/dist/modules/storage/lib/validators.d.mts +92 -92
  708. package/dist/modules/storage/lib/validators.d.mts.map +1 -1
  709. package/dist/modules/storage/lib/validators.mjs.map +1 -1
  710. package/dist/storage/client.d.mts +1 -1
  711. package/package.json +89 -92
  712. package/src/components/common/icons.tsx +2 -2
  713. package/src/components/common/status.tsx +1 -1
  714. package/src/components/editor/components/content.client.tsx +1 -1
  715. package/src/components/editor/components/editor.client.tsx +6 -6
  716. package/src/components/editor/components/menu-nodes.client.tsx +11 -11
  717. package/src/components/editor/components/menu.client.tsx +5 -5
  718. package/src/components/editor/components/spinner.tsx +2 -8
  719. package/src/components/editor/extensions/file-handler/extension.ts +1 -1
  720. package/src/components/editor/extensions/file-handler/strategy.ts +4 -4
  721. package/src/components/editor/extensions/file-handler/utils.ts +4 -2
  722. package/src/components/editor/extensions/image/extension.ts +4 -1
  723. package/src/components/editor/extensions/skeleton/renderer.tsx +4 -3
  724. package/src/components/editor/lib/extensions.ts +23 -26
  725. package/src/components/editor/lib/helpers.ts +1 -1
  726. package/src/components/editor/lib/utils.ts +1 -33
  727. package/src/components/editor/lib/variants.ts +1 -1
  728. package/src/components/emails/forget-password-email.tsx +1 -1
  729. package/src/components/entry.client.ts +1 -1
  730. package/src/components/entry.ts +1 -1
  731. package/src/components/header/back-button.client.tsx +1 -1
  732. package/src/components/header/bottom-bar.client.tsx +3 -3
  733. package/src/components/header/breadcrumbs.client.tsx +2 -2
  734. package/src/components/header/header.client.tsx +1 -1
  735. package/src/components/header/indicator.client.tsx +2 -2
  736. package/src/components/header/top-bar.client.tsx +3 -3
  737. package/src/components/layouts/admin-content.client.tsx +1 -1
  738. package/src/components/layouts/admin-error-pages.tsx +1 -1
  739. package/src/components/layouts/admin-layout.tsx +1 -1
  740. package/src/components/layouts/admin-loading.tsx +1 -1
  741. package/src/components/layouts/empty-page.tsx +1 -1
  742. package/src/components/layouts/error-page.tsx +2 -2
  743. package/src/components/layouts/error-sections.tsx +1 -1
  744. package/src/components/layouts/list-layout.tsx +1 -1
  745. package/src/components/layouts/providers.client.tsx +4 -4
  746. package/src/components/layouts/root-layout.server.tsx +3 -3
  747. package/src/components/layouts/tab-layout.tsx +3 -3
  748. package/src/components/lists/data-list.tsx +1 -1
  749. package/src/components/lists/data-stack.tsx +1 -1
  750. package/src/components/navigation/admin-sidebar-header.client.tsx +13 -13
  751. package/src/components/navigation/admin-sidebar-paths.client.tsx +6 -6
  752. package/src/components/navigation/admin-sidebar-skeleton.tsx +1 -1
  753. package/src/components/navigation/admin-sidebar.client.tsx +6 -5
  754. package/src/components/ui/accordion.tsx +1 -2
  755. package/src/components/ui/alert-dialog.tsx +1 -1
  756. package/src/components/ui/alert.tsx +1 -1
  757. package/src/components/ui/avatar.client.tsx +1 -1
  758. package/src/components/ui/badge.tsx +1 -1
  759. package/src/components/ui/breadcrumb.tsx +4 -2
  760. package/src/components/ui/button.tsx +1 -1
  761. package/src/components/ui/calendar.tsx +2 -3
  762. package/src/components/ui/card.tsx +1 -1
  763. package/src/components/ui/carousel.tsx +2 -0
  764. package/src/components/ui/chart.client.tsx +12 -10
  765. package/src/components/ui/checkbox.tsx +1 -1
  766. package/src/components/ui/color-picker.client.tsx +4 -3
  767. package/src/components/ui/combobox-dropdown.client.tsx +2 -4
  768. package/src/components/ui/combobox.client.tsx +2 -2
  769. package/src/components/ui/command.tsx +1 -1
  770. package/src/components/ui/context-menu.tsx +1 -1
  771. package/src/components/ui/date-picker.client.tsx +2 -2
  772. package/src/components/ui/dialog.client.tsx +1 -1
  773. package/src/components/ui/drawer.client.tsx +1 -1
  774. package/src/components/ui/dropdown-menu.tsx +1 -1
  775. package/src/components/ui/form.client.tsx +4 -4
  776. package/src/components/ui/hover-card.client.tsx +1 -1
  777. package/src/components/ui/input-date-time.tsx +13 -11
  778. package/src/components/ui/input-recipient.tsx +6 -3
  779. package/src/components/ui/input.tsx +1 -1
  780. package/src/components/ui/label.tsx +1 -1
  781. package/src/components/ui/navigation-menu.tsx +1 -1
  782. package/src/components/ui/pagination.tsx +4 -2
  783. package/src/components/ui/popover.tsx +1 -1
  784. package/src/components/ui/progress.client.tsx +1 -1
  785. package/src/components/ui/radio-group.tsx +1 -1
  786. package/src/components/ui/resizable.client.tsx +1 -1
  787. package/src/components/ui/scroll-area.tsx +1 -1
  788. package/src/components/ui/select.client.tsx +1 -1
  789. package/src/components/ui/separator.tsx +1 -1
  790. package/src/components/ui/sheet.client.tsx +1 -1
  791. package/src/components/ui/sidebar.client.tsx +5 -2
  792. package/src/components/ui/sonner.client.tsx +1 -1
  793. package/src/components/ui/switch.tsx +1 -1
  794. package/src/components/ui/tabs.tsx +1 -1
  795. package/src/components/ui/textarea.tsx +1 -1
  796. package/src/components/ui/toggle-group.client.tsx +1 -1
  797. package/src/components/ui/toggle.tsx +1 -1
  798. package/src/components/ui/tooltip.client.tsx +1 -1
  799. package/src/lib/config/constants.ts +1 -1
  800. package/src/lib/hooks/use-action.ts +3 -3
  801. package/src/lib/hooks/use-indicator.tsx +17 -8
  802. package/src/lib/types/config.ts +1 -1
  803. package/src/lib/utils/cn.ts +1 -1
  804. package/src/lib/utils/manifest.ts +3 -2
  805. package/src/lib/utils/time-picker.ts +2 -2
  806. package/src/lib/utils/url.ts +1 -1
  807. package/src/modules/auth/components/allowed.client.tsx +2 -2
  808. package/src/modules/auth/components/auth-layout.server.tsx +2 -2
  809. package/src/modules/auth/components/create-first-user-page.client.tsx +10 -11
  810. package/src/modules/auth/components/forget-password-page.client.tsx +5 -5
  811. package/src/modules/auth/components/guard-first-user.server.tsx +2 -5
  812. package/src/modules/auth/components/guard.server.tsx +3 -3
  813. package/src/modules/auth/components/login-page.client.tsx +5 -5
  814. package/src/modules/auth/components/reset-password-page.client.tsx +7 -7
  815. package/src/modules/auth/components/update-password-command.tsx +5 -5
  816. package/src/modules/auth/db/schema.ts +2 -2
  817. package/src/modules/auth/entry.server.ts +1 -1
  818. package/src/modules/auth/handler/create-client.client.ts +3 -3
  819. package/src/modules/auth/handler/init.ts +6 -6
  820. package/src/modules/auth/handler/proxy.server.ts +1 -2
  821. package/src/modules/auth/handler/route.server.ts +2 -2
  822. package/src/modules/auth/hooks/use-auth-client.tsx +3 -3
  823. package/src/modules/auth/hooks/use-permission.ts +1 -1
  824. package/src/modules/auth/hooks/use-session.ts +1 -2
  825. package/src/modules/auth/lib/helpers.server.ts +4 -4
  826. package/src/modules/commands/components/alert-dialog-command.client.tsx +8 -8
  827. package/src/modules/commands/components/click-command.client.tsx +3 -3
  828. package/src/modules/commands/components/command-trigger.client.tsx +1 -1
  829. package/src/modules/commands/components/dialog-command.client.tsx +3 -3
  830. package/src/modules/commands/components/dropdown-command.client.tsx +2 -2
  831. package/src/modules/commands/components/empty-command.client.tsx +1 -1
  832. package/src/modules/commands/components/form-dialog-command.client.tsx +5 -5
  833. package/src/modules/commands/components/render-command.tsx +2 -2
  834. package/src/modules/commands/entry.client.ts +16 -0
  835. package/src/modules/commands/hooks/context.client.tsx +1 -1
  836. package/src/modules/commands/hooks/use-command-menu.client.tsx +6 -4
  837. package/src/modules/commands/hooks/use-command-mutation.client.tsx +1 -1
  838. package/src/modules/commands/menus/context-menu.client.tsx +20 -19
  839. package/src/modules/commands/menus/dropdown-menu.client.tsx +6 -3
  840. package/src/modules/commands/menus/floating-menu.client.tsx +54 -0
  841. package/src/modules/commands/menus/inline-menu.client.tsx +6 -2
  842. package/src/modules/commands/menus/responsive-menu.client.tsx +1 -1
  843. package/src/modules/commands/utils/archive-command.client.tsx +1 -1
  844. package/src/modules/commands/utils/delete-command.client.tsx +1 -1
  845. package/src/modules/config/db/helpers.ts +1 -1
  846. package/src/modules/config/db/init.ts +2 -2
  847. package/src/modules/config/lib/context.ts +5 -5
  848. package/src/modules/config/paths/helpers.ts +1 -1
  849. package/src/modules/config/paths/types.ts +4 -5
  850. package/src/modules/data-tables/components/cell/common.client.tsx +1 -1
  851. package/src/modules/data-tables/components/column-header.tsx +2 -2
  852. package/src/modules/data-tables/components/filters/combobox.client.tsx +3 -3
  853. package/src/modules/data-tables/components/filters/slider.client.tsx +5 -5
  854. package/src/modules/data-tables/components/footer.tsx +2 -2
  855. package/src/modules/data-tables/components/header.tsx +2 -2
  856. package/src/modules/data-tables/components/layout.tsx +1 -1
  857. package/src/modules/data-tables/components/skeleton.tsx +22 -29
  858. package/src/modules/data-tables/components/table.tsx +1 -1
  859. package/src/modules/data-tables/components/toolbar.tsx +1 -1
  860. package/src/modules/data-tables/entry.client.ts +9 -13
  861. package/src/modules/data-tables/hooks/use-context.client.tsx +6 -6
  862. package/src/modules/data-tables/hooks/use-selection.client.ts +1 -1
  863. package/src/modules/data-tables/hooks/use-table.client.ts +1 -1
  864. package/src/modules/data-tables/lib/converters/cursor.ts +1 -1
  865. package/src/modules/data-tables/lib/converters/dto.ts +1 -1
  866. package/src/modules/data-tables/lib/converters/search.ts +2 -2
  867. package/src/modules/data-tables/lib/converters/sorting.ts +2 -2
  868. package/src/modules/data-tables/lib/filters/config.ts +2 -2
  869. package/src/modules/data-tables/lib/filters/helpers.ts +4 -4
  870. package/src/modules/data-tables/lib/filters/parsers.ts +2 -2
  871. package/src/modules/data-tables/lib/filters/resolvers.ts +2 -2
  872. package/src/modules/data-tables/lib/helpers/create-column.ts +1 -1
  873. package/src/modules/data-tables/lib/types.ts +6 -5
  874. package/src/modules/data-tables/server/get-data.server.ts +8 -8
  875. package/src/modules/data-tables/strategies/helpers/sorting.ts +7 -3
  876. package/src/modules/data-tables/strategies/infinite/components.tsx +4 -4
  877. package/src/modules/data-tables/strategies/infinite/strategy.ts +2 -2
  878. package/src/modules/data-tables/strategies/pagination/components.tsx +2 -2
  879. package/src/modules/data-tables/strategies/pagination/strategy.ts +2 -2
  880. package/src/modules/data-tables/tables/data-table/components/body.tsx +3 -3
  881. package/src/modules/data-tables/tables/data-table/components/header.tsx +1 -1
  882. package/src/modules/data-tables/tables/data-table/components/row.tsx +3 -3
  883. package/src/modules/data-tables/tables/data-table/components/table.tsx +13 -4
  884. package/src/modules/data-tables/tables/inline-table/components/body.tsx +5 -5
  885. package/src/modules/data-tables/tables/inline-table/components/cells/common.tsx +1 -1
  886. package/src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx +9 -5
  887. package/src/modules/data-tables/tables/inline-table/components/cells/read-only.tsx +1 -1
  888. package/src/modules/data-tables/tables/inline-table/components/header.tsx +1 -1
  889. package/src/modules/data-tables/tables/inline-table/components/row.client.tsx +5 -5
  890. package/src/modules/data-tables/tables/inline-table/components/table.tsx +14 -5
  891. package/src/modules/data-tables/tables/inline-table/hooks/context.client.tsx +2 -2
  892. package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +6 -2
  893. package/src/modules/inline-edit/components/combobox.client.tsx +6 -2
  894. package/src/modules/inline-edit/components/date-input.client.tsx +8 -4
  895. package/src/modules/inline-edit/components/date-picker.client.tsx +7 -3
  896. package/src/modules/inline-edit/components/date-time.client.tsx +20 -4
  897. package/src/modules/inline-edit/components/editor.client.tsx +7 -3
  898. package/src/modules/inline-edit/components/input-recipient.client.tsx +7 -3
  899. package/src/modules/inline-edit/components/input-toggle.client.tsx +7 -3
  900. package/src/modules/inline-edit/components/input.client.tsx +15 -3
  901. package/src/modules/inline-edit/components/select.client.tsx +12 -8
  902. package/src/modules/inline-edit/components/switch.client.tsx +5 -1
  903. package/src/modules/inline-edit/components/toggle.client.tsx +5 -1
  904. package/src/modules/inline-edit/entry.client.ts +3 -2
  905. package/src/modules/inline-edit/hooks/context.client.tsx +3 -2
  906. package/src/modules/inline-edit/hooks/use-inline.client.tsx +42 -18
  907. package/src/modules/inline-edit/lib/parsers.ts +9 -0
  908. package/src/modules/inline-edit/lib/validators.ts +1 -1
  909. package/src/modules/inline-edit/lib/variants.ts +1 -1
  910. package/src/modules/router/handler/caller.client.tsx +2 -2
  911. package/src/modules/router/handler/context.server.ts +4 -4
  912. package/src/modules/router/handler/init.server.ts +3 -3
  913. package/src/modules/router/handler/register.server.ts +3 -3
  914. package/src/modules/router/handler/route.server.ts +3 -3
  915. package/src/modules/router/lib/query-client.ts +0 -1
  916. package/src/modules/storage/components/dropzone-context.client.tsx +1 -1
  917. package/src/modules/storage/components/dropzone.client.tsx +3 -3
  918. package/src/modules/storage/components/image-grid.client.tsx +23 -19
  919. package/src/modules/storage/components/upload-button.client.tsx +2 -2
  920. package/src/modules/storage/components/upload-zone-context.client.tsx +3 -2
  921. package/src/modules/storage/components/upload-zone.client.tsx +13 -7
  922. package/src/modules/storage/config/filters.ts +1 -1
  923. package/src/modules/storage/entry.client.ts +3 -2
  924. package/src/modules/storage/lib/create-client.server.ts +2 -2
  925. package/src/modules/storage/lib/create-upload.client.ts +2 -2
  926. package/src/modules/storage/lib/helpers.ts +3 -3
  927. package/src/modules/storage/lib/proxy.server.ts +4 -4
  928. package/src/modules/storage/lib/router.server.ts +5 -5
  929. package/src/modules/storage/lib/schema.ts +2 -2
  930. package/src/modules/storage/lib/service.server.ts +21 -21
  931. package/src/modules/storage/lib/validators.ts +3 -3
  932. package/src/styles.css +1 -1
  933. package/dist/modules/commands/menus/data-table-menu.client.mjs.map +0 -1
  934. package/src/modules/auth/lib/utils.ts +0 -17
  935. package/src/modules/commands/menus/data-table-menu.client.tsx +0 -46
  936. package/src/modules/config/db/create-client.ts +0 -40
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-command.client.mjs","names":[],"sources":["../../../../src/modules/commands/components/dropdown-command.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport {\n ContextMenuItem,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n} from \"@/components/ui/context-menu\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport React from \"react\";\nimport { useCommand } from \"../hooks/context.client\";\nimport { useCommandMutation } from \"../hooks/use-command-mutation.client\";\nimport { CommandTrigger } from \"./command-trigger.client\";\n\n/**\n * CommandDropdownContext\n */\ntype CommandDropdownContextValue = {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nconst CommandDropdownContext = React.createContext({} as CommandDropdownContextValue);\n\n/**\n * CommandDropdown\n */\nexport type CommandDropdownProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function CommandDropdown({ children, ...props }: CommandDropdownProps) {\n const [open, setOpen] = React.useState(false);\n const { menu } = useCommand();\n\n if (menu === \"inline\" || menu === \"table\") {\n return (\n <DropdownMenu {...props} open={open} onOpenChange={setOpen}>\n <CommandDropdownContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandDropdownContext.Provider>\n </DropdownMenu>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <DropdownMenuSub {...props} open={open} onOpenChange={setOpen}>\n <CommandDropdownContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandDropdownContext.Provider>\n </DropdownMenuSub>\n );\n }\n\n if (menu === \"context\") {\n return (\n <ContextMenuSub {...props} open={open} onOpenChange={setOpen}>\n <CommandDropdownContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandDropdownContext.Provider>\n </ContextMenuSub>\n );\n }\n\n return null;\n}\n\n/**\n * CommandDropdownContent\n */\ntype CommandDropdownContentProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function CommandDropdownContent({ children, ...props }: CommandDropdownContentProps) {\n const { menu } = useCommand();\n\n if (menu === \"inline\" || menu === \"table\") {\n return <DropdownMenuContent {...props}>{children}</DropdownMenuContent>;\n }\n\n if (menu === \"dropdown\") {\n return <DropdownMenuSubContent {...props}>{children}</DropdownMenuSubContent>;\n }\n\n if (menu === \"context\") {\n return <ContextMenuSubContent {...props}>{children}</ContextMenuSubContent>;\n }\n\n return null;\n}\n\n/**\n * CommandDropdownTrigger\n */\ntype CommandDropdownTriggerProps = {\n children: React.ReactNode;\n className?: string;\n label?: string;\n disabled?: boolean;\n};\n\nexport function CommandDropdownTrigger({\n label,\n disabled,\n children,\n ...props\n}: CommandDropdownTriggerProps) {\n const { menu, status } = useCommand();\n\n const isDisabled = disabled || status === \"pending\";\n\n if (menu === \"inline\" || menu === \"table\") {\n return (\n <CommandTrigger label={label}>\n <DropdownMenuTrigger\n {...props}\n disabled={isDisabled}\n className={cn(buttonVariants({ variant: \"outline\", size: \"sm\" }), props.className)}\n >\n {children}\n </DropdownMenuTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <CommandTrigger label={label}>\n <DropdownMenuSubTrigger {...props} disabled={isDisabled}>\n {children}\n </DropdownMenuSubTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"context\") {\n return (\n <CommandTrigger label={label}>\n <ContextMenuSubTrigger {...props} disabled={isDisabled}>\n {children}\n </ContextMenuSubTrigger>\n </CommandTrigger>\n );\n }\n\n return null;\n}\n\n/**\n * CommandDropdownItem\n */\ntype CommandDropdownItemProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n> = {\n variables: TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n children: React.ReactNode;\n className?: string;\n};\n\nexport function CommandDropdownItem<\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n>({\n variables,\n mutation,\n children,\n ...props\n}: CommandDropdownItemProps<TData, TError, TVariables, TOnMutateResult>) {\n const { setOpen } = React.useContext(CommandDropdownContext);\n const { menu, status } = useCommand();\n\n const { mutateAsync } = useCommandMutation({\n ...mutation,\n onSuccess: async (...params) => {\n setOpen(false);\n\n return await mutation?.onSuccess?.(...params);\n },\n });\n\n if (menu === \"inline\" || menu === \"table\" || menu === \"dropdown\") {\n return (\n <DropdownMenuItem\n {...props}\n disabled={status === \"pending\"}\n onClick={() => mutateAsync(variables)}\n >\n {children}\n </DropdownMenuItem>\n );\n }\n\n if (menu === \"context\") {\n return (\n <ContextMenuItem\n {...props}\n disabled={status === \"pending\"}\n onClick={() => mutateAsync(variables)}\n >\n {children}\n </ContextMenuItem>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,yBAAyB,MAAM,cAAc,EAAE,CAAgC;AAUrF,SAAgB,gBAAgB,EAAE,UAAU,GAAG,SAA+B;CAC5E,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,MAAM;CAC7C,MAAM,EAAE,SAAS,YAAY;AAE7B,KAAI,SAAS,YAAY,SAAS,QAChC,QACE,oBAAC;EAAa,GAAI;EAAa;EAAM,cAAc;YACjD,oBAAC,uBAAuB;GAAS,OAAO;IAAE;IAAM;IAAS;GACtD;IAC+B;GACrB;AAInB,KAAI,SAAS,WACX,QACE,oBAAC;EAAgB,GAAI;EAAa;EAAM,cAAc;YACpD,oBAAC,uBAAuB;GAAS,OAAO;IAAE;IAAM;IAAS;GACtD;IAC+B;GAClB;AAItB,KAAI,SAAS,UACX,QACE,oBAAC;EAAe,GAAI;EAAa;EAAM,cAAc;YACnD,oBAAC,uBAAuB;GAAS,OAAO;IAAE;IAAM;IAAS;GACtD;IAC+B;GACnB;AAIrB,QAAO;;AAWT,SAAgB,uBAAuB,EAAE,UAAU,GAAG,SAAsC;CAC1F,MAAM,EAAE,SAAS,YAAY;AAE7B,KAAI,SAAS,YAAY,SAAS,QAChC,QAAO,oBAAC;EAAoB,GAAI;EAAQ;GAA+B;AAGzE,KAAI,SAAS,WACX,QAAO,oBAAC;EAAuB,GAAI;EAAQ;GAAkC;AAG/E,KAAI,SAAS,UACX,QAAO,oBAAC;EAAsB,GAAI;EAAQ;GAAiC;AAG7E,QAAO;;AAaT,SAAgB,uBAAuB,EACrC,OACA,UACA,UACA,GAAG,SAC2B;CAC9B,MAAM,EAAE,MAAM,WAAW,YAAY;CAErC,MAAM,aAAa,YAAY,WAAW;AAE1C,KAAI,SAAS,YAAY,SAAS,QAChC,QACE,oBAAC;EAAsB;YACrB,oBAAC;GACC,GAAI;GACJ,UAAU;GACV,WAAW,GAAG,eAAe;IAAE,SAAS;IAAW,MAAM;IAAM,CAAC,EAAE,MAAM,UAAU;GAEjF;IACmB;GACP;AAIrB,KAAI,SAAS,WACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAuB,GAAI;GAAO,UAAU;GAC1C;IACsB;GACV;AAIrB,KAAI,SAAS,UACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAsB,GAAI;GAAO,UAAU;GACzC;IACqB;GACT;AAIrB,QAAO;;AAkBT,SAAgB,oBAKd,EACA,WACA,UACA,UACA,GAAG,SACoE;CACvE,MAAM,EAAE,YAAY,MAAM,WAAW,uBAAuB;CAC5D,MAAM,EAAE,MAAM,WAAW,YAAY;CAErC,MAAM,EAAE,gBAAgB,mBAAmB;EACzC,GAAG;EACH,WAAW,OAAO,GAAG,WAAW;AAC9B,WAAQ,MAAM;AAEd,UAAO,MAAM,UAAU,YAAY,GAAG,OAAO;;EAEhD,CAAC;AAEF,KAAI,SAAS,YAAY,SAAS,WAAW,SAAS,WACpD,QACE,oBAAC;EACC,GAAI;EACJ,UAAU,WAAW;EACrB,eAAe,YAAY,UAAU;EAEpC;GACgB;AAIvB,KAAI,SAAS,UACX,QACE,oBAAC;EACC,GAAI;EACJ,UAAU,WAAW;EACrB,eAAe,YAAY,UAAU;EAEpC;GACe;AAItB,QAAO"}
1
+ {"version":3,"file":"dropdown-command.client.mjs","names":[],"sources":["../../../../src/modules/commands/components/dropdown-command.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport React from \"react\";\nimport { buttonVariants } from \"@/components/ui/button\";\nimport {\n ContextMenuItem,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n} from \"@/components/ui/context-menu\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { useCommand } from \"../hooks/context.client\";\nimport { useCommandMutation } from \"../hooks/use-command-mutation.client\";\nimport { CommandTrigger } from \"./command-trigger.client\";\n\n/**\n * CommandDropdownContext\n */\ntype CommandDropdownContextValue = {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nconst CommandDropdownContext = React.createContext({} as CommandDropdownContextValue);\n\n/**\n * CommandDropdown\n */\nexport type CommandDropdownProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function CommandDropdown({ children, ...props }: CommandDropdownProps) {\n const [open, setOpen] = React.useState(false);\n const { menu } = useCommand();\n\n if (menu === \"inline\" || menu === \"table\") {\n return (\n <DropdownMenu {...props} open={open} onOpenChange={setOpen}>\n <CommandDropdownContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandDropdownContext.Provider>\n </DropdownMenu>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <DropdownMenuSub {...props} open={open} onOpenChange={setOpen}>\n <CommandDropdownContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandDropdownContext.Provider>\n </DropdownMenuSub>\n );\n }\n\n if (menu === \"context\") {\n return (\n <ContextMenuSub {...props} open={open} onOpenChange={setOpen}>\n <CommandDropdownContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandDropdownContext.Provider>\n </ContextMenuSub>\n );\n }\n\n return null;\n}\n\n/**\n * CommandDropdownContent\n */\ntype CommandDropdownContentProps = {\n children: React.ReactNode;\n className?: string;\n};\n\nexport function CommandDropdownContent({ children, ...props }: CommandDropdownContentProps) {\n const { menu } = useCommand();\n\n if (menu === \"inline\" || menu === \"table\") {\n return <DropdownMenuContent {...props}>{children}</DropdownMenuContent>;\n }\n\n if (menu === \"dropdown\") {\n return <DropdownMenuSubContent {...props}>{children}</DropdownMenuSubContent>;\n }\n\n if (menu === \"context\") {\n return <ContextMenuSubContent {...props}>{children}</ContextMenuSubContent>;\n }\n\n return null;\n}\n\n/**\n * CommandDropdownTrigger\n */\ntype CommandDropdownTriggerProps = {\n children: React.ReactNode;\n className?: string;\n label?: string;\n disabled?: boolean;\n};\n\nexport function CommandDropdownTrigger({\n label,\n disabled,\n children,\n ...props\n}: CommandDropdownTriggerProps) {\n const { menu, status } = useCommand();\n\n const isDisabled = disabled || status === \"pending\";\n\n if (menu === \"inline\" || menu === \"table\") {\n return (\n <CommandTrigger label={label}>\n <DropdownMenuTrigger\n {...props}\n disabled={isDisabled}\n className={cn(buttonVariants({ variant: \"outline\", size: \"sm\" }), props.className)}\n >\n {children}\n </DropdownMenuTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <CommandTrigger label={label}>\n <DropdownMenuSubTrigger {...props} disabled={isDisabled}>\n {children}\n </DropdownMenuSubTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"context\") {\n return (\n <CommandTrigger label={label}>\n <ContextMenuSubTrigger {...props} disabled={isDisabled}>\n {children}\n </ContextMenuSubTrigger>\n </CommandTrigger>\n );\n }\n\n return null;\n}\n\n/**\n * CommandDropdownItem\n */\ntype CommandDropdownItemProps<\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n> = {\n variables: TVariables;\n mutation: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n children: React.ReactNode;\n className?: string;\n};\n\nexport function CommandDropdownItem<\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n>({\n variables,\n mutation,\n children,\n ...props\n}: CommandDropdownItemProps<TData, TError, TVariables, TOnMutateResult>) {\n const { setOpen } = React.useContext(CommandDropdownContext);\n const { menu, status } = useCommand();\n\n const { mutateAsync } = useCommandMutation({\n ...mutation,\n onSuccess: async (...params) => {\n setOpen(false);\n\n return await mutation?.onSuccess?.(...params);\n },\n });\n\n if (menu === \"inline\" || menu === \"table\" || menu === \"dropdown\") {\n return (\n <DropdownMenuItem\n {...props}\n disabled={status === \"pending\"}\n onClick={() => mutateAsync(variables)}\n >\n {children}\n </DropdownMenuItem>\n );\n }\n\n if (menu === \"context\") {\n return (\n <ContextMenuItem\n {...props}\n disabled={status === \"pending\"}\n onClick={() => mutateAsync(variables)}\n >\n {children}\n </ContextMenuItem>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;AAiCA,MAAM,yBAAyB,MAAM,cAAc,EAAE,CAAgC;AAUrF,SAAgB,gBAAgB,EAAE,UAAU,GAAG,SAA+B;CAC5E,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,MAAM;CAC7C,MAAM,EAAE,SAAS,YAAY;AAE7B,KAAI,SAAS,YAAY,SAAS,QAChC,QACE,oBAAC;EAAa,GAAI;EAAa;EAAM,cAAc;YACjD,oBAAC,uBAAuB;GAAS,OAAO;IAAE;IAAM;IAAS;GACtD;IAC+B;GACrB;AAInB,KAAI,SAAS,WACX,QACE,oBAAC;EAAgB,GAAI;EAAa;EAAM,cAAc;YACpD,oBAAC,uBAAuB;GAAS,OAAO;IAAE;IAAM;IAAS;GACtD;IAC+B;GAClB;AAItB,KAAI,SAAS,UACX,QACE,oBAAC;EAAe,GAAI;EAAa;EAAM,cAAc;YACnD,oBAAC,uBAAuB;GAAS,OAAO;IAAE;IAAM;IAAS;GACtD;IAC+B;GACnB;AAIrB,QAAO;;AAWT,SAAgB,uBAAuB,EAAE,UAAU,GAAG,SAAsC;CAC1F,MAAM,EAAE,SAAS,YAAY;AAE7B,KAAI,SAAS,YAAY,SAAS,QAChC,QAAO,oBAAC;EAAoB,GAAI;EAAQ;GAA+B;AAGzE,KAAI,SAAS,WACX,QAAO,oBAAC;EAAuB,GAAI;EAAQ;GAAkC;AAG/E,KAAI,SAAS,UACX,QAAO,oBAAC;EAAsB,GAAI;EAAQ;GAAiC;AAG7E,QAAO;;AAaT,SAAgB,uBAAuB,EACrC,OACA,UACA,UACA,GAAG,SAC2B;CAC9B,MAAM,EAAE,MAAM,WAAW,YAAY;CAErC,MAAM,aAAa,YAAY,WAAW;AAE1C,KAAI,SAAS,YAAY,SAAS,QAChC,QACE,oBAAC;EAAsB;YACrB,oBAAC;GACC,GAAI;GACJ,UAAU;GACV,WAAW,GAAG,eAAe;IAAE,SAAS;IAAW,MAAM;IAAM,CAAC,EAAE,MAAM,UAAU;GAEjF;IACmB;GACP;AAIrB,KAAI,SAAS,WACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAuB,GAAI;GAAO,UAAU;GAC1C;IACsB;GACV;AAIrB,KAAI,SAAS,UACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAsB,GAAI;GAAO,UAAU;GACzC;IACqB;GACT;AAIrB,QAAO;;AAkBT,SAAgB,oBAKd,EACA,WACA,UACA,UACA,GAAG,SACoE;CACvE,MAAM,EAAE,YAAY,MAAM,WAAW,uBAAuB;CAC5D,MAAM,EAAE,MAAM,WAAW,YAAY;CAErC,MAAM,EAAE,gBAAgB,mBAAmB;EACzC,GAAG;EACH,WAAW,OAAO,GAAG,WAAW;AAC9B,WAAQ,MAAM;AAEd,UAAO,MAAM,UAAU,YAAY,GAAG,OAAO;;EAEhD,CAAC;AAEF,KAAI,SAAS,YAAY,SAAS,WAAW,SAAS,WACpD,QACE,oBAAC;EACC,GAAI;EACJ,UAAU,WAAW;EACrB,eAAe,YAAY,UAAU;EAEpC;GACgB;AAIvB,KAAI,SAAS,UACX,QACE,oBAAC;EACC,GAAI;EACJ,UAAU,WAAW;EACrB,eAAe,YAAY,UAAU;EAEpC;GACe;AAItB,QAAO"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime75 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
 
4
4
  //#region src/modules/commands/components/empty-command.client.d.ts
@@ -13,7 +13,7 @@ declare function CommandEmpty({
13
13
  children,
14
14
  disabled,
15
15
  ...props
16
- }: CommandEmptyProps): react_jsx_runtime75.JSX.Element | null;
16
+ }: CommandEmptyProps): react_jsx_runtime0.JSX.Element | null;
17
17
  //#endregion
18
18
  export { CommandEmpty, CommandEmptyProps };
19
19
  //# sourceMappingURL=empty-command.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty-command.client.d.mts","names":[],"sources":["../../../../src/modules/commands/components/empty-command.client.tsx"],"sourcesContent":[],"mappings":";;;;KASY,iBAAA;YACA,KAAA,CAAM;;EADN,QAAA,CAAA,EAAA,OAAA;EAOI,KAAA,CAAA,EAAA,MAAA;CAAe;AAAO,iBAAtB,YAAA,CAAsB;EAAA,KAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAgC,iBAAhC,CAAA,EAAiD,mBAAA,CAAA,GAAA,CAAA,OAAA,GAAjD,IAAA"}
1
+ {"version":3,"file":"empty-command.client.d.mts","names":[],"sources":["../../../../src/modules/commands/components/empty-command.client.tsx"],"mappings":";;;;KASY,iBAAA;EACV,QAAA,EAAU,KAAA,CAAM,SAAA;EAChB,SAAA;EACA,QAAA;EACA,KAAA;AAAA;AAAA,iBAGc,YAAA,CAAA;EAAe,KAAA;EAAO,QAAA;EAAU,QAAA;EAAA,GAAa;AAAA,GAAS,iBAAA,GAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -6,7 +6,6 @@ import { DropdownMenuItem } from "../../../components/ui/dropdown-menu.mjs";
6
6
  import { useCommand } from "../hooks/context.client.mjs";
7
7
  import { CommandTrigger } from "./command-trigger.client.mjs";
8
8
  import { jsx } from "react/jsx-runtime";
9
- import React from "react";
10
9
 
11
10
  //#region src/modules/commands/components/empty-command.client.tsx
12
11
  function CommandEmpty({ label, children, disabled, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"empty-command.client.mjs","names":[],"sources":["../../../../src/modules/commands/components/empty-command.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { ContextMenuItem } from \"@/components/ui/context-menu\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport React from \"react\";\nimport { useCommand } from \"../hooks/context.client\";\nimport { CommandTrigger } from \"./command-trigger.client\";\n\nexport type CommandEmptyProps = {\n children: React.ReactNode;\n className?: string;\n disabled?: boolean;\n label?: string;\n};\n\nexport function CommandEmpty({ label, children, disabled, ...props }: CommandEmptyProps) {\n const { menu, status } = useCommand();\n\n const isDisabled = disabled ?? status === \"pending\";\n\n if (menu === \"inline\") {\n return (\n <CommandTrigger label={label}>\n <Button {...props} variant=\"outline\" size=\"sm\" disabled={isDisabled}>\n {children}\n </Button>\n </CommandTrigger>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <CommandTrigger label={label}>\n <DropdownMenuItem {...props} disabled={isDisabled}>\n {children}\n </DropdownMenuItem>\n </CommandTrigger>\n );\n }\n\n if (menu === \"context\") {\n return (\n <CommandTrigger label={label}>\n <ContextMenuItem {...props} disabled={isDisabled}>\n {children}\n </ContextMenuItem>\n </CommandTrigger>\n );\n }\n\n if (menu === \"table\") {\n return (\n <CommandTrigger label={label}>\n <Button {...props} variant=\"outline\" size=\"sm\" disabled={isDisabled}>\n {children}\n </Button>\n </CommandTrigger>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,aAAa,EAAE,OAAO,UAAU,UAAU,GAAG,SAA4B;CACvF,MAAM,EAAE,MAAM,WAAW,YAAY;CAErC,MAAM,aAAa,YAAY,WAAW;AAE1C,KAAI,SAAS,SACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAO,GAAI;GAAO,SAAQ;GAAU,MAAK;GAAK,UAAU;GACtD;IACM;GACM;AAIrB,KAAI,SAAS,WACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAiB,GAAI;GAAO,UAAU;GACpC;IACgB;GACJ;AAIrB,KAAI,SAAS,UACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAgB,GAAI;GAAO,UAAU;GACnC;IACe;GACH;AAIrB,KAAI,SAAS,QACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAO,GAAI;GAAO,SAAQ;GAAU,MAAK;GAAK,UAAU;GACtD;IACM;GACM;AAIrB,QAAO"}
1
+ {"version":3,"file":"empty-command.client.mjs","names":[],"sources":["../../../../src/modules/commands/components/empty-command.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { ContextMenuItem } from \"@/components/ui/context-menu\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { useCommand } from \"../hooks/context.client\";\nimport { CommandTrigger } from \"./command-trigger.client\";\n\nexport type CommandEmptyProps = {\n children: React.ReactNode;\n className?: string;\n disabled?: boolean;\n label?: string;\n};\n\nexport function CommandEmpty({ label, children, disabled, ...props }: CommandEmptyProps) {\n const { menu, status } = useCommand();\n\n const isDisabled = disabled ?? status === \"pending\";\n\n if (menu === \"inline\") {\n return (\n <CommandTrigger label={label}>\n <Button {...props} variant=\"outline\" size=\"sm\" disabled={isDisabled}>\n {children}\n </Button>\n </CommandTrigger>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <CommandTrigger label={label}>\n <DropdownMenuItem {...props} disabled={isDisabled}>\n {children}\n </DropdownMenuItem>\n </CommandTrigger>\n );\n }\n\n if (menu === \"context\") {\n return (\n <CommandTrigger label={label}>\n <ContextMenuItem {...props} disabled={isDisabled}>\n {children}\n </ContextMenuItem>\n </CommandTrigger>\n );\n }\n\n if (menu === \"table\") {\n return (\n <CommandTrigger label={label}>\n <Button {...props} variant=\"outline\" size=\"sm\" disabled={isDisabled}>\n {children}\n </Button>\n </CommandTrigger>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;AAgBA,SAAgB,aAAa,EAAE,OAAO,UAAU,UAAU,GAAG,SAA4B;CACvF,MAAM,EAAE,MAAM,WAAW,YAAY;CAErC,MAAM,aAAa,YAAY,WAAW;AAE1C,KAAI,SAAS,SACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAO,GAAI;GAAO,SAAQ;GAAU,MAAK;GAAK,UAAU;GACtD;IACM;GACM;AAIrB,KAAI,SAAS,WACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAiB,GAAI;GAAO,UAAU;GACpC;IACgB;GACJ;AAIrB,KAAI,SAAS,UACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAgB,GAAI;GAAO,UAAU;GACnC;IACe;GACH;AAIrB,KAAI,SAAS,QACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAO,GAAI;GAAO,SAAQ;GAAU,MAAK;GAAK,UAAU;GACtD;IACM;GACM;AAIrB,QAAO"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime76 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import React, { ComponentProps } from "react";
3
3
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
4
4
  import { DialogContentProps, DialogProps } from "@radix-ui/react-dialog";
@@ -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_runtime76.JSX.Element;
15
+ }: DialogProps): react_jsx_runtime0.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_runtime76.JSX.Element | undefined;
32
+ }: CommandFormDialogTriggerProps): react_jsx_runtime0.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_runtime76.JSX.Element;
39
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.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_runtime76.JSX.Element;
46
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.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_runtime76.JSX.Element;
53
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.JSX.Element;
54
54
  declare const CommandFormDialogContentProvider: typeof Form;
55
55
  /**
56
56
  * CommandFormDialogContent
@@ -65,7 +65,7 @@ declare function CommandFormDialogContent<TValues extends FieldValues, TData = u
65
65
  mutation,
66
66
  children,
67
67
  ...props
68
- }: CommandFormDialogContentProps<TValues, TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime76.JSX.Element;
68
+ }: CommandFormDialogContentProps<TValues, TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime0.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_runtime76.JSX.Element;
76
+ }: ComponentProps<"div">): react_jsx_runtime0.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_runtime76.JSX.Element;
83
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.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_runtime76.JSX.Element;
90
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.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_runtime76.JSX.Element;
97
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.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.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog-command.client.d.mts","names":[],"sources":["../../../../src/modules/commands/components/form-dialog-command.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAsCgB,iBAAA,iBAAA,CAAiB;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAyB,WAAzB,CAAA,EAAoC,mBAAA,CAAA,GAAA,CAAA,OAApC;;;;KAe5B,6BAAA,GAfgE;EAehE,QAAA,EACO,KAAA,CAAM,SADb;EAQW,SAAA,CAAA,EAAA,MAAA;EACd,KAAA,CAAA,EAAA,MAAA;EACA,QAAA,CAAA,EAAA,OAAA;EACA,MAAA,CAAA,EANS,IAMT;CACA;AAEC,iBANa,wBAAA,CAMb;EAAA,KAAA;EAAA,MAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAA,6BAAA,CAAA,EAA6B,mBAAA,CAAA,GAAA,CAAA,OAAA,GAA7B,SAAA;;;AAgEH;AAA0C,iBAA1B,uBAAA,CAA0B;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAAsB,KAAA,CAAM,cAA5B,CAA2C,WAA3C,CAAA,CAAA,EAAuD,mBAAA,CAAA,GAAA,CAAA,OAAvD;;;;AAAuD,iBAOjF,sBAAA,CAPiF;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAOlC,KAAA,CAAM,cAP4B,CAOb,WAPa,CAAA,CAAA,EAOD,mBAAA,CAAA,GAAA,CAAA,OAPC;AAOjG;;;AAAqE,iBAOrD,4BAAA,CAPqD;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAUlE,KAAA,CAAM,cAV4D,CAU7C,WAV6C,CAAA,CAAA,EAUjC,mBAAA,CAAA,GAAA,CAAA,OAViC;AAA2B,cAcnF,gCAdmF,EAAA,OAcnD,IAdmD;;AAOhG;;AAGwB,KASZ,6BATY,CAAA,gBAUN,WAVM,EAAA,QAAA,OAAA,EAAA,SAYb,YAZa,EAAA,aAAA,SAAA,EAAA,kBAAA,OAAA,CAAA,GAepB,kBAfoB,GAAA;EAArB,SAAM,EAAA,CAAA,MAAA,EAgBa,OAhBb,EAAA,GAgByB,UAhBzB;EAA2B,QAAA,CAAA,EAiBvB,eAjBuB,CAiBP,KAjBO,EAiBA,MAjBA,EAiBQ,UAjBR,EAiBoB,eAjBpB,CAAA;EAAA,QAAA,EAkBxB,KAAA,CAAM,SAlBkB;AAIpC,CAAA;AAKY,iBAkBI,wBAlByB,CAAA,gBAmBvB,WAnBuB,EAAA,QAAA,OAAA,EAAA,SAqB9B,YArB8B,EAAA,aAAA,SAAA,EAAA,kBAAA,OAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA6BtC,6BA7BsC,CA6BR,OA7BQ,EA6BC,KA7BD,EA6BQ,MA7BR,EA6BgB,UA7BhB,EA6B4B,eA7B5B,CAAA,CAAA,EA6B4C,mBAAA,CAAA,GAAA,CAAA,OA7B5C;;;;AAOnB,iBAyDN,uBAAA,CAzDM;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAyDqD,cAzDrD,CAAA,KAAA,CAAA,CAAA,EAyD0E,mBAAA,CAAA,GAAA,CAAA,OAzD1E;;;;AACsB,iBAmE5B,uBAAA,CAnE4B;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAmEoB,KAAA,CAAM,cAnE1B,CAmEyC,WAnEzC,CAAA,CAAA,EAmEqD,mBAAA,CAAA,GAAA,CAAA,OAnErD;;;;AACjB,iBAyEX,uBAAA,CAzEW;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAyEqC,KAAA,CAAM,cAzE3C,CAyE0D,WAzE1D,CAAA,CAAA,EAyEsE,mBAAA,CAAA,GAAA,CAAA,OAzEtE;AAS3B;;;AAOE,iBA+Ec,uBAAA,CA/Ed;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA+E8D,KAAA,CAAM,cA/EpE,CA+EmF,WA/EnF,CAAA,CAAA,EA+E+F,mBAAA,CAAA,GAAA,CAAA,OA/E/F"}
1
+ {"version":3,"file":"form-dialog-command.client.d.mts","names":[],"sources":["../../../../src/modules/commands/components/form-dialog-command.client.tsx"],"mappings":";;;;;;;;;;;iBAsCgB,iBAAA,CAAA;EAAoB,QAAA;EAAA,GAAa;AAAA,GAAS,WAAA,GAAW,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;KAehE,6BAAA;EACH,QAAA,EAAU,KAAA,CAAM,SAAA;EAChB,SAAA;EACA,KAAA;EACA,QAAA;EACA,MAAA,GAAS,IAAA;AAAA;AAAA,iBAGK,wBAAA,CAAA;EACd,KAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,6BAAA,GAA6B,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAgEhB,uBAAA,CAAA;EAA0B,QAAA;EAAA,GAAa;AAAA,GAAS,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA;AAnFhG;;;AAAA,iBA0Fe,sBAAA,CAAA;EAAyB,QAAA;EAAA,GAAa;AAAA,GAAS,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAOhF,4BAAA,CAAA;EACd,QAAA;EAAA,GACG;AAAA,GACF,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAIvB,gCAAA,SAAgC,IAAA;;;;KAKjC,6BAAA,iBACM,WAAA,4BAEP,YAAA,uDAGP,kBAAA;EACF,SAAA,GAAY,MAAA,EAAQ,OAAA,KAAY,UAAA;EAChC,QAAA,GAAW,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA;EACtD,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,iBASF,wBAAA,iBACE,WAAA,4BAEP,YAAA,oDAAA,CAAA;EAIT,SAAA;EACA,QAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,6BAAA,CAA8B,OAAA,EAAS,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAmCrE,uBAAA,CAAA;EAA0B,QAAA;EAAU,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAWhF,uBAAA,CAAA;EAA0B,QAAA;EAAA,GAAa;AAAA,GAAS,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAOjF,uBAAA,CAAA;EAA0B,QAAA;EAAA,GAAa;AAAA,GAAS,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;iBAsBjF,uBAAA,CAAA;EAA0B,QAAA;EAAA,GAAa;AAAA,GAAS,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog-command.client.mjs","names":[],"sources":["../../../../src/modules/commands/components/form-dialog-command.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icons } from \"@/components/common/icons\";\nimport { Button, buttonVariants } from \"@/components/ui/button\";\nimport { ContextMenuItem } from \"@/components/ui/context-menu\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/components/ui/dialog.client\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport type { DialogContentProps, DialogProps } from \"@radix-ui/react-dialog\";\nimport { type DefaultError, type MutationOptions } from \"@tanstack/react-query\";\nimport React, { type ComponentProps } from \"react\";\nimport { type FieldValues, Form, useFormContext } from \"react-hook-form\";\nimport { type Keys, useHotkeys } from \"react-hotkeys-hook\";\nimport { useCommandMutation } from \"../entry.client\";\nimport { useCommand } from \"../hooks/context.client\";\nimport { CommandTrigger } from \"./command-trigger.client\";\n\n/**\n * CommandFormDialogContext\n */\ntype CommandFormDialogContextValue = {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nconst CommandFormDialogContext = React.createContext({} as CommandFormDialogContextValue);\n\n/**\n * CommandFormDialog\n */\nexport function CommandFormDialog({ children, ...props }: DialogProps) {\n const [open, setOpen] = React.useState(false);\n\n return (\n <Dialog {...props} open={open} onOpenChange={setOpen}>\n <CommandFormDialogContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandFormDialogContext.Provider>\n </Dialog>\n );\n}\n\n/**\n * CommandFormDialogTrigger\n */\ntype CommandFormDialogTriggerProps = {\n children: React.ReactNode;\n className?: string;\n label?: string;\n disabled?: boolean;\n hotkey?: Keys;\n};\n\nexport function CommandFormDialogTrigger({\n label,\n hotkey,\n children,\n disabled,\n ...props\n}: CommandFormDialogTriggerProps) {\n const { menu, status } = useCommand();\n const { setOpen } = React.useContext(CommandFormDialogContext);\n\n const isDisabled = disabled || status === \"pending\";\n\n useHotkeys(hotkey ?? \"\", () => setOpen(true), { enabled: !isDisabled && hotkey !== undefined });\n\n if (menu === \"inline\" || menu === \"table\") {\n return (\n <CommandTrigger label={label}>\n <DialogTrigger\n {...props}\n disabled={isDisabled}\n className={cn(buttonVariants({ variant: \"outline\", size: \"sm\" }), props.className)}\n >\n {children}\n </DialogTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <CommandTrigger label={label}>\n <DialogTrigger asChild>\n <DropdownMenuItem\n {...props}\n disabled={isDisabled}\n onClick={(e) => {\n e.preventDefault();\n setOpen(true);\n }}\n >\n {children}\n </DropdownMenuItem>\n </DialogTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"context\") {\n return (\n <CommandTrigger label={label}>\n <DialogTrigger asChild>\n <ContextMenuItem\n {...props}\n disabled={isDisabled}\n onClick={(e) => {\n e.preventDefault();\n setOpen(true);\n }}\n >\n {children}\n </ContextMenuItem>\n </DialogTrigger>\n </CommandTrigger>\n );\n }\n}\n\n/**\n * CommandFormDialogHeader\n */\nexport function CommandFormDialogHeader({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n return <DialogHeader {...props}>{children}</DialogHeader>;\n}\n\n/**\n * CommandFormDialogTitle\n */\nexport function CommandFormDialogTitle({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n return <DialogTitle {...props}>{children}</DialogTitle>;\n}\n\n/**\n * CommandFormDialogDescription\n */\nexport function CommandFormDialogDescription({\n children,\n ...props\n}: React.HTMLAttributes<HTMLElement>) {\n return <DialogDescription {...props}>{children}</DialogDescription>;\n}\n\nexport const CommandFormDialogContentProvider = Form;\n\n/**\n * CommandFormDialogContent\n */\nexport type CommandFormDialogContentProps<\n TValues extends FieldValues,\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n> = DialogContentProps & {\n variables: (values: TValues) => TVariables;\n mutation?: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n children: React.ReactNode;\n};\n// export type CommandFormDialogContentProps<TSchema extends FieldValues> = DialogContentProps & {\n// action: CommandAction<TSchema>;\n// mutation?: MutationOptions<TSchema>;\n// message?: string;\n// children: React.ReactNode;\n// };\n\nexport function CommandFormDialogContent<\n TValues extends FieldValues,\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n>({\n variables,\n mutation,\n children,\n ...props\n}: CommandFormDialogContentProps<TValues, TData, TError, TVariables, TOnMutateResult>) {\n const { setOpen } = React.useContext(CommandFormDialogContext);\n const form = useFormContext<TValues>();\n\n const { mutateAsync } = useCommandMutation({\n ...mutation,\n onSuccess: async (...params) => {\n form.reset();\n setOpen(false);\n\n return await mutation?.onSuccess?.(...params);\n },\n });\n\n if (Object.keys(form?.formState?.errors || {})?.length > 0) {\n console.error(form.formState.errors);\n }\n\n return (\n <DialogContent {...props}>\n <form\n onSubmit={form.handleSubmit((data) => {\n const params = variables(data);\n mutateAsync(params);\n })}\n >\n {children}\n </form>\n </DialogContent>\n );\n}\n\n/**\n * FormDialogFields\n */\nexport function CommandFormDialogFields({ children, className, ...props }: ComponentProps<\"div\">) {\n return (\n <div {...props} className={cn(\"space-y-5 py-10\", className)}>\n {children}\n </div>\n );\n}\n\n/**\n * CommandFormDialogFooter\n */\nexport function CommandFormDialogFooter({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n return <DialogFooter {...props}>{children}</DialogFooter>;\n}\n\n/**\n * CommandFormDialogCancel\n */\nexport function CommandFormDialogCancel({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n const { setOpen } = React.useContext(CommandFormDialogContext);\n const form = useFormContext();\n\n return (\n <Button\n {...props}\n variant=\"ghost\"\n type=\"button\"\n onClick={() => {\n form.reset();\n setOpen(false);\n }}\n >\n {children}\n </Button>\n );\n}\n\n/**\n * CommandFormDialogSubmit\n */\nexport function CommandFormDialogSubmit({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n const { status } = useCommand();\n\n return (\n <Button {...props} disabled={status === \"pending\"} type=\"submit\">\n {status === \"pending\" && <Icons.spinner className=\"mr-2 h-4 w-4 animate-spin\" />}\n {children}\n </Button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,MAAM,2BAA2B,MAAM,cAAc,EAAE,CAAkC;;;;AAKzF,SAAgB,kBAAkB,EAAE,UAAU,GAAG,SAAsB;CACrE,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,MAAM;AAE7C,QACE,oBAAC;EAAO,GAAI;EAAa;EAAM,cAAc;YAC3C,oBAAC,yBAAyB;GAAS,OAAO;IAAE;IAAM;IAAS;GACxD;IACiC;GAC7B;;AAeb,SAAgB,yBAAyB,EACvC,OACA,QACA,UACA,UACA,GAAG,SAC6B;CAChC,MAAM,EAAE,MAAM,WAAW,YAAY;CACrC,MAAM,EAAE,YAAY,MAAM,WAAW,yBAAyB;CAE9D,MAAM,aAAa,YAAY,WAAW;AAE1C,YAAW,UAAU,UAAU,QAAQ,KAAK,EAAE,EAAE,SAAS,CAAC,cAAc,WAAW,QAAW,CAAC;AAE/F,KAAI,SAAS,YAAY,SAAS,QAChC,QACE,oBAAC;EAAsB;YACrB,oBAAC;GACC,GAAI;GACJ,UAAU;GACV,WAAW,GAAG,eAAe;IAAE,SAAS;IAAW,MAAM;IAAM,CAAC,EAAE,MAAM,UAAU;GAEjF;IACa;GACD;AAIrB,KAAI,SAAS,WACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAc;aACb,oBAAC;IACC,GAAI;IACJ,UAAU;IACV,UAAU,MAAM;AACd,OAAE,gBAAgB;AAClB,aAAQ,KAAK;;IAGd;KACgB;IACL;GACD;AAIrB,KAAI,SAAS,UACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAc;aACb,oBAAC;IACC,GAAI;IACJ,UAAU;IACV,UAAU,MAAM;AACd,OAAE,gBAAgB;AAClB,aAAQ,KAAK;;IAGd;KACe;IACJ;GACD;;;;;AAQvB,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;AACjG,QAAO,oBAAC;EAAa,GAAI;EAAQ;GAAwB;;;;;AAM3D,SAAgB,uBAAuB,EAAE,UAAU,GAAG,SAA4C;AAChG,QAAO,oBAAC;EAAY,GAAI;EAAQ;GAAuB;;;;;AAMzD,SAAgB,6BAA6B,EAC3C,UACA,GAAG,SACiC;AACpC,QAAO,oBAAC;EAAkB,GAAI;EAAQ;GAA6B;;AAGrE,MAAa,mCAAmC;AAuBhD,SAAgB,yBAMd,EACA,WACA,UACA,UACA,GAAG,SACkF;CACrF,MAAM,EAAE,YAAY,MAAM,WAAW,yBAAyB;CAC9D,MAAM,OAAO,gBAAyB;CAEtC,MAAM,EAAE,gBAAgB,mBAAmB;EACzC,GAAG;EACH,WAAW,OAAO,GAAG,WAAW;AAC9B,QAAK,OAAO;AACZ,WAAQ,MAAM;AAEd,UAAO,MAAM,UAAU,YAAY,GAAG,OAAO;;EAEhD,CAAC;AAEF,KAAI,OAAO,KAAK,MAAM,WAAW,UAAU,EAAE,CAAC,EAAE,SAAS,EACvD,SAAQ,MAAM,KAAK,UAAU,OAAO;AAGtC,QACE,oBAAC;EAAc,GAAI;YACjB,oBAAC;GACC,UAAU,KAAK,cAAc,SAAS;AAEpC,gBADe,UAAU,KAAK,CACX;KACnB;GAED;IACI;GACO;;;;;AAOpB,SAAgB,wBAAwB,EAAE,UAAU,WAAW,GAAG,SAAgC;AAChG,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,mBAAmB,UAAU;EACxD;GACG;;;;;AAOV,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;AACjG,QAAO,oBAAC;EAAa,GAAI;EAAQ;GAAwB;;;;;AAM3D,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;CACjG,MAAM,EAAE,YAAY,MAAM,WAAW,yBAAyB;CAC9D,MAAM,OAAO,gBAAgB;AAE7B,QACE,oBAAC;EACC,GAAI;EACJ,SAAQ;EACR,MAAK;EACL,eAAe;AACb,QAAK,OAAO;AACZ,WAAQ,MAAM;;EAGf;GACM;;;;;AAOb,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;CACjG,MAAM,EAAE,WAAW,YAAY;AAE/B,QACE,qBAAC;EAAO,GAAI;EAAO,UAAU,WAAW;EAAW,MAAK;aACrD,WAAW,aAAa,oBAAC,MAAM,WAAQ,WAAU,8BAA8B,EAC/E;GACM"}
1
+ {"version":3,"file":"form-dialog-command.client.mjs","names":[],"sources":["../../../../src/modules/commands/components/form-dialog-command.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DialogContentProps, DialogProps } from \"@radix-ui/react-dialog\";\nimport type { DefaultError, MutationOptions } from \"@tanstack/react-query\";\nimport React, { type ComponentProps } from \"react\";\nimport { type FieldValues, Form, useFormContext } from \"react-hook-form\";\nimport { type Keys, useHotkeys } from \"react-hotkeys-hook\";\nimport { Icons } from \"@/components/common/icons\";\nimport { Button, buttonVariants } from \"@/components/ui/button\";\nimport { ContextMenuItem } from \"@/components/ui/context-menu\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/components/ui/dialog.client\";\nimport { DropdownMenuItem } from \"@/components/ui/dropdown-menu\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { useCommandMutation } from \"../entry.client\";\nimport { useCommand } from \"../hooks/context.client\";\nimport { CommandTrigger } from \"./command-trigger.client\";\n\n/**\n * CommandFormDialogContext\n */\ntype CommandFormDialogContextValue = {\n open: boolean;\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nconst CommandFormDialogContext = React.createContext({} as CommandFormDialogContextValue);\n\n/**\n * CommandFormDialog\n */\nexport function CommandFormDialog({ children, ...props }: DialogProps) {\n const [open, setOpen] = React.useState(false);\n\n return (\n <Dialog {...props} open={open} onOpenChange={setOpen}>\n <CommandFormDialogContext.Provider value={{ open, setOpen }}>\n {children}\n </CommandFormDialogContext.Provider>\n </Dialog>\n );\n}\n\n/**\n * CommandFormDialogTrigger\n */\ntype CommandFormDialogTriggerProps = {\n children: React.ReactNode;\n className?: string;\n label?: string;\n disabled?: boolean;\n hotkey?: Keys;\n};\n\nexport function CommandFormDialogTrigger({\n label,\n hotkey,\n children,\n disabled,\n ...props\n}: CommandFormDialogTriggerProps) {\n const { menu, status } = useCommand();\n const { setOpen } = React.useContext(CommandFormDialogContext);\n\n const isDisabled = disabled || status === \"pending\";\n\n useHotkeys(hotkey ?? \"\", () => setOpen(true), { enabled: !isDisabled && hotkey !== undefined });\n\n if (menu === \"inline\" || menu === \"table\") {\n return (\n <CommandTrigger label={label}>\n <DialogTrigger\n {...props}\n disabled={isDisabled}\n className={cn(buttonVariants({ variant: \"outline\", size: \"sm\" }), props.className)}\n >\n {children}\n </DialogTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"dropdown\") {\n return (\n <CommandTrigger label={label}>\n <DialogTrigger asChild>\n <DropdownMenuItem\n {...props}\n disabled={isDisabled}\n onClick={(e) => {\n e.preventDefault();\n setOpen(true);\n }}\n >\n {children}\n </DropdownMenuItem>\n </DialogTrigger>\n </CommandTrigger>\n );\n }\n\n if (menu === \"context\") {\n return (\n <CommandTrigger label={label}>\n <DialogTrigger asChild>\n <ContextMenuItem\n {...props}\n disabled={isDisabled}\n onClick={(e) => {\n e.preventDefault();\n setOpen(true);\n }}\n >\n {children}\n </ContextMenuItem>\n </DialogTrigger>\n </CommandTrigger>\n );\n }\n}\n\n/**\n * CommandFormDialogHeader\n */\nexport function CommandFormDialogHeader({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n return <DialogHeader {...props}>{children}</DialogHeader>;\n}\n\n/**\n * CommandFormDialogTitle\n */\nexport function CommandFormDialogTitle({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n return <DialogTitle {...props}>{children}</DialogTitle>;\n}\n\n/**\n * CommandFormDialogDescription\n */\nexport function CommandFormDialogDescription({\n children,\n ...props\n}: React.HTMLAttributes<HTMLElement>) {\n return <DialogDescription {...props}>{children}</DialogDescription>;\n}\n\nexport const CommandFormDialogContentProvider = Form;\n\n/**\n * CommandFormDialogContent\n */\nexport type CommandFormDialogContentProps<\n TValues extends FieldValues,\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n> = DialogContentProps & {\n variables: (values: TValues) => TVariables;\n mutation?: MutationOptions<TData, TError, TVariables, TOnMutateResult>;\n children: React.ReactNode;\n};\n// export type CommandFormDialogContentProps<TSchema extends FieldValues> = DialogContentProps & {\n// action: CommandAction<TSchema>;\n// mutation?: MutationOptions<TSchema>;\n// message?: string;\n// children: React.ReactNode;\n// };\n\nexport function CommandFormDialogContent<\n TValues extends FieldValues,\n TData = unknown,\n TError = DefaultError,\n TVariables = undefined,\n TOnMutateResult = unknown,\n>({\n variables,\n mutation,\n children,\n ...props\n}: CommandFormDialogContentProps<TValues, TData, TError, TVariables, TOnMutateResult>) {\n const { setOpen } = React.useContext(CommandFormDialogContext);\n const form = useFormContext<TValues>();\n\n const { mutateAsync } = useCommandMutation({\n ...mutation,\n onSuccess: async (...params) => {\n form.reset();\n setOpen(false);\n\n return await mutation?.onSuccess?.(...params);\n },\n });\n\n if (Object.keys(form?.formState?.errors || {})?.length > 0) {\n console.error(form.formState.errors);\n }\n\n return (\n <DialogContent {...props}>\n <form\n onSubmit={form.handleSubmit((data) => {\n const params = variables(data);\n mutateAsync(params);\n })}\n >\n {children}\n </form>\n </DialogContent>\n );\n}\n\n/**\n * FormDialogFields\n */\nexport function CommandFormDialogFields({ children, className, ...props }: ComponentProps<\"div\">) {\n return (\n <div {...props} className={cn(\"space-y-5 py-10\", className)}>\n {children}\n </div>\n );\n}\n\n/**\n * CommandFormDialogFooter\n */\nexport function CommandFormDialogFooter({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n return <DialogFooter {...props}>{children}</DialogFooter>;\n}\n\n/**\n * CommandFormDialogCancel\n */\nexport function CommandFormDialogCancel({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n const { setOpen } = React.useContext(CommandFormDialogContext);\n const form = useFormContext();\n\n return (\n <Button\n {...props}\n variant=\"ghost\"\n type=\"button\"\n onClick={() => {\n form.reset();\n setOpen(false);\n }}\n >\n {children}\n </Button>\n );\n}\n\n/**\n * CommandFormDialogSubmit\n */\nexport function CommandFormDialogSubmit({ children, ...props }: React.HTMLAttributes<HTMLElement>) {\n const { status } = useCommand();\n\n return (\n <Button {...props} disabled={status === \"pending\"} type=\"submit\">\n {status === \"pending\" && <Icons.spinner className=\"mr-2 h-4 w-4 animate-spin\" />}\n {children}\n </Button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,MAAM,2BAA2B,MAAM,cAAc,EAAE,CAAkC;;;;AAKzF,SAAgB,kBAAkB,EAAE,UAAU,GAAG,SAAsB;CACrE,MAAM,CAAC,MAAM,WAAW,MAAM,SAAS,MAAM;AAE7C,QACE,oBAAC;EAAO,GAAI;EAAa;EAAM,cAAc;YAC3C,oBAAC,yBAAyB;GAAS,OAAO;IAAE;IAAM;IAAS;GACxD;IACiC;GAC7B;;AAeb,SAAgB,yBAAyB,EACvC,OACA,QACA,UACA,UACA,GAAG,SAC6B;CAChC,MAAM,EAAE,MAAM,WAAW,YAAY;CACrC,MAAM,EAAE,YAAY,MAAM,WAAW,yBAAyB;CAE9D,MAAM,aAAa,YAAY,WAAW;AAE1C,YAAW,UAAU,UAAU,QAAQ,KAAK,EAAE,EAAE,SAAS,CAAC,cAAc,WAAW,QAAW,CAAC;AAE/F,KAAI,SAAS,YAAY,SAAS,QAChC,QACE,oBAAC;EAAsB;YACrB,oBAAC;GACC,GAAI;GACJ,UAAU;GACV,WAAW,GAAG,eAAe;IAAE,SAAS;IAAW,MAAM;IAAM,CAAC,EAAE,MAAM,UAAU;GAEjF;IACa;GACD;AAIrB,KAAI,SAAS,WACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAc;aACb,oBAAC;IACC,GAAI;IACJ,UAAU;IACV,UAAU,MAAM;AACd,OAAE,gBAAgB;AAClB,aAAQ,KAAK;;IAGd;KACgB;IACL;GACD;AAIrB,KAAI,SAAS,UACX,QACE,oBAAC;EAAsB;YACrB,oBAAC;GAAc;aACb,oBAAC;IACC,GAAI;IACJ,UAAU;IACV,UAAU,MAAM;AACd,OAAE,gBAAgB;AAClB,aAAQ,KAAK;;IAGd;KACe;IACJ;GACD;;;;;AAQvB,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;AACjG,QAAO,oBAAC;EAAa,GAAI;EAAQ;GAAwB;;;;;AAM3D,SAAgB,uBAAuB,EAAE,UAAU,GAAG,SAA4C;AAChG,QAAO,oBAAC;EAAY,GAAI;EAAQ;GAAuB;;;;;AAMzD,SAAgB,6BAA6B,EAC3C,UACA,GAAG,SACiC;AACpC,QAAO,oBAAC;EAAkB,GAAI;EAAQ;GAA6B;;AAGrE,MAAa,mCAAmC;AAuBhD,SAAgB,yBAMd,EACA,WACA,UACA,UACA,GAAG,SACkF;CACrF,MAAM,EAAE,YAAY,MAAM,WAAW,yBAAyB;CAC9D,MAAM,OAAO,gBAAyB;CAEtC,MAAM,EAAE,gBAAgB,mBAAmB;EACzC,GAAG;EACH,WAAW,OAAO,GAAG,WAAW;AAC9B,QAAK,OAAO;AACZ,WAAQ,MAAM;AAEd,UAAO,MAAM,UAAU,YAAY,GAAG,OAAO;;EAEhD,CAAC;AAEF,KAAI,OAAO,KAAK,MAAM,WAAW,UAAU,EAAE,CAAC,EAAE,SAAS,EACvD,SAAQ,MAAM,KAAK,UAAU,OAAO;AAGtC,QACE,oBAAC;EAAc,GAAI;YACjB,oBAAC;GACC,UAAU,KAAK,cAAc,SAAS;AAEpC,gBADe,UAAU,KAAK,CACX;KACnB;GAED;IACI;GACO;;;;;AAOpB,SAAgB,wBAAwB,EAAE,UAAU,WAAW,GAAG,SAAgC;AAChG,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,mBAAmB,UAAU;EACxD;GACG;;;;;AAOV,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;AACjG,QAAO,oBAAC;EAAa,GAAI;EAAQ;GAAwB;;;;;AAM3D,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;CACjG,MAAM,EAAE,YAAY,MAAM,WAAW,yBAAyB;CAC9D,MAAM,OAAO,gBAAgB;AAE7B,QACE,oBAAC;EACC,GAAI;EACJ,SAAQ;EACR,MAAK;EACL,eAAe;AACb,QAAK,OAAO;AACZ,WAAQ,MAAM;;EAGf;GACM;;;;;AAOb,SAAgB,wBAAwB,EAAE,UAAU,GAAG,SAA4C;CACjG,MAAM,EAAE,WAAW,YAAY;AAE/B,QACE,qBAAC;EAAO,GAAI;EAAO,UAAU,WAAW;EAAW,MAAK;aACrD,WAAW,aAAa,oBAAC,MAAM,WAAQ,WAAU,8BAA8B,EAC/E;GACM"}
@@ -1 +1 @@
1
- {"version":3,"file":"render-command.mjs","names":[],"sources":["../../../../src/modules/commands/components/render-command.tsx"],"sourcesContent":["import { Allowed } from \"@/modules/auth/components/allowed.client\";\nimport { Fragment } from \"react/jsx-runtime\";\nimport { CommandDef } from \"../lib/definitions\";\n\ntype RenderCommandProps<TData, TMeta> = {\n command: CommandDef<TData, TMeta>;\n render: (command: CommandDef<TData, TMeta>) => React.ReactNode;\n};\n\nexport function RenderCommand<TData, TMeta>({ command, render }: RenderCommandProps<TData, TMeta>) {\n const children = <Fragment key={command.name}>{render(command)}</Fragment>;\n\n if (!command.permission) return children;\n\n return (\n <Allowed key={command.name} permission={command.permission}>\n {children}\n </Allowed>\n );\n}\n"],"mappings":";;;;AASA,SAAgB,cAA4B,EAAE,SAAS,UAA4C;CACjG,MAAM,WAAW,oBAAC,sBAA6B,OAAO,QAAQ,IAA9B,QAAQ,KAAkC;AAE1E,KAAI,CAAC,QAAQ,WAAY,QAAO;AAEhC,QACE,oBAAC;EAA2B,YAAY,QAAQ;EAC7C;IADW,QAAQ,KAEZ"}
1
+ {"version":3,"file":"render-command.mjs","names":[],"sources":["../../../../src/modules/commands/components/render-command.tsx"],"sourcesContent":["import { Fragment } from \"react/jsx-runtime\";\nimport { Allowed } from \"@/modules/auth/components/allowed.client\";\nimport type { CommandDef } from \"../lib/definitions\";\n\ntype RenderCommandProps<TData, TMeta> = {\n command: CommandDef<TData, TMeta>;\n render: (command: CommandDef<TData, TMeta>) => React.ReactNode;\n};\n\nexport function RenderCommand<TData, TMeta>({ command, render }: RenderCommandProps<TData, TMeta>) {\n const children = <Fragment key={command.name}>{render(command)}</Fragment>;\n\n if (!command.permission) return children;\n\n return (\n <Allowed key={command.name} permission={command.permission}>\n {children}\n </Allowed>\n );\n}\n"],"mappings":";;;;AASA,SAAgB,cAA4B,EAAE,SAAS,UAA4C;CACjG,MAAM,WAAW,oBAAC,sBAA6B,OAAO,QAAQ,IAA9B,QAAQ,KAAkC;AAE1E,KAAI,CAAC,QAAQ,WAAY,QAAO;AAEhC,QACE,oBAAC;EAA2B,YAAY,QAAQ;EAC7C;IADW,QAAQ,KAEZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.client.mjs","names":[],"sources":["../../../../src/modules/commands/hooks/context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { PropsWithChildren } from \"react\";\n\nexport type CommandContextValue = {\n // data: TData[]\n menu: \"dropdown\" | \"context\" | \"table\" | \"inline\";\n status: \"idle\" | \"pending\" | \"success\" | \"error\";\n setStatus: React.Dispatch<React.SetStateAction<\"idle\" | \"pending\" | \"success\" | \"error\">>;\n onSuccess?: () => Promise<void> | void;\n onError?: () => Promise<void> | void;\n};\n\n/**\n * CommandContext\n */\nconst CommandContext = React.createContext({} as CommandContextValue);\n\n/**\n * useCommand\n */\nexport const useCommand = () => React.useContext(CommandContext);\n\n/**\n * CommandContextProvider\n */\nexport function CommandContextProvider({\n value,\n children,\n}: PropsWithChildren<{ value: Omit<CommandContextValue, \"status\" | \"setStatus\"> }>) {\n const [status, setStatus] = React.useState<\"idle\" | \"pending\" | \"success\" | \"error\">(\"idle\");\n\n return (\n <CommandContext.Provider value={{ ...value, status, setStatus }}>\n {children}\n </CommandContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;AAgBA,MAAM,iBAAiB,MAAM,cAAc,EAAE,CAAwB;;;;AAKrE,MAAa,mBAAmB,MAAM,WAAW,eAAe;;;;AAKhE,SAAgB,uBAAuB,EACrC,OACA,YACkF;CAClF,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAmD,OAAO;AAE5F,QACE,oBAAC,eAAe;EAAS,OAAO;GAAE,GAAG;GAAO;GAAQ;GAAW;EAC5D;GACuB"}
1
+ {"version":3,"file":"context.client.mjs","names":[],"sources":["../../../../src/modules/commands/hooks/context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { type PropsWithChildren } from \"react\";\n\nexport type CommandContextValue = {\n // data: TData[]\n menu: \"dropdown\" | \"context\" | \"table\" | \"inline\";\n status: \"idle\" | \"pending\" | \"success\" | \"error\";\n setStatus: React.Dispatch<React.SetStateAction<\"idle\" | \"pending\" | \"success\" | \"error\">>;\n onSuccess?: () => Promise<void> | void;\n onError?: () => Promise<void> | void;\n};\n\n/**\n * CommandContext\n */\nconst CommandContext = React.createContext({} as CommandContextValue);\n\n/**\n * useCommand\n */\nexport const useCommand = () => React.useContext(CommandContext);\n\n/**\n * CommandContextProvider\n */\nexport function CommandContextProvider({\n value,\n children,\n}: PropsWithChildren<{ value: Omit<CommandContextValue, \"status\" | \"setStatus\"> }>) {\n const [status, setStatus] = React.useState<\"idle\" | \"pending\" | \"success\" | \"error\">(\"idle\");\n\n return (\n <CommandContext.Provider value={{ ...value, status, setStatus }}>\n {children}\n </CommandContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;AAgBA,MAAM,iBAAiB,MAAM,cAAc,EAAE,CAAwB;;;;AAKrE,MAAa,mBAAmB,MAAM,WAAW,eAAe;;;;AAKhE,SAAgB,uBAAuB,EACrC,OACA,YACkF;CAClF,MAAM,CAAC,QAAQ,aAAa,MAAM,SAAmD,OAAO;AAE5F,QACE,oBAAC,eAAe;EAAS,OAAO;GAAE,GAAG;GAAO;GAAQ;GAAW;EAC5D;GACuB"}
@@ -11,7 +11,14 @@ type SingleCommandMenuProps<TData, TMeta> = {
11
11
  data: TData;
12
12
  commands: CommandDef<TData, TMeta>[];
13
13
  meta?: TMeta;
14
+ onSuccess?: () => void;
15
+ };
16
+ type BulkCommandMenuProps<TData, TMeta> = {
17
+ data: TData[];
18
+ commands: CommandDef<TData, TMeta>[];
19
+ meta?: TMeta;
20
+ onSuccess?: () => void;
14
21
  };
15
22
  //#endregion
16
- export { SingleCommandMenuProps };
23
+ export { BulkCommandMenuProps, SingleCommandMenuProps };
17
24
  //# sourceMappingURL=use-command-menu.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-command-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAWY;QACJ;EADI,QAAA,EAEA,UAFA,CAEW,KAFW,EAEJ,KAFI,CAAA,EAAA;EAC1B,IAAA,CAAA,EAEC,KAFD;CACe"}
1
+ {"version":3,"file":"use-command-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-menu.client.tsx"],"mappings":";;;;;;;;;KAWY,sBAAA;EACV,IAAA,EAAM,KAAA;EACN,QAAA,EAAU,UAAA,CAAW,KAAA,EAAO,KAAA;EAC5B,IAAA,GAAO,KAAA;EACP,SAAA;AAAA;AAAA,KAGU,oBAAA;EACV,IAAA,EAAM,KAAA;EACN,QAAA,EAAU,UAAA,CAAW,KAAA,EAAO,KAAA;EAC5B,IAAA,GAAO,KAAA;EACP,SAAA;AAAA"}
@@ -23,7 +23,7 @@ function validateBulkCommand({ data, command }) {
23
23
  return Array.isArray(valid) ? valid.every(Boolean) : valid ?? true;
24
24
  }
25
25
  function renderBulkCommand({ data, command, meta }) {
26
- const ids = data.filter(dataHasId).map((data$1) => data$1.id);
26
+ const ids = data.filter(dataHasId).map((data) => data.id);
27
27
  return command.render({
28
28
  data,
29
29
  meta: meta ?? {},
@@ -1 +1 @@
1
- {"version":3,"file":"use-command-menu.client.mjs","names":["data"],"sources":["../../../../src/modules/commands/hooks/use-command-menu.client.tsx"],"sourcesContent":["\"use client\";\n\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 // 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 /**\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":";;;;;;AA0BA,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;CAEzD,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;;;;CAIrC,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.mjs","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type {\n BulkCommandDefRenderParams,\n CommandDef,\n 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 onSuccess?: () => void;\n};\n\nexport type BulkCommandMenuProps<TData, TMeta> = {\n data: TData[];\n commands: CommandDef<TData, TMeta>[];\n meta?: TMeta;\n onSuccess?: () => void;\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 // 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 /**\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":";;;;;;AA4BA,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,SAAU,KAAgC,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;CAEzD,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;;;;CAIrC,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,5 +1,5 @@
1
1
  import { useRouter } from "next/navigation";
2
- import * as _tanstack_react_query1 from "@tanstack/react-query";
2
+ import * as _tanstack_react_query0 from "@tanstack/react-query";
3
3
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
4
4
 
5
5
  //#region src/modules/commands/hooks/use-command-mutation.client.d.ts
@@ -11,7 +11,7 @@ type BulkCommandAction = (params: {
11
11
  type CommandMutationMeta = {
12
12
  router: ReturnType<typeof useRouter>;
13
13
  };
14
- declare function useCommandMutation<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options?: MutationOptions<TData, TError, TVariables, TOnMutateResult>): _tanstack_react_query1.UseMutationResult<TData, TError, TVariables, TOnMutateResult>;
14
+ declare function useCommandMutation<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options?: MutationOptions<TData, TError, TVariables, TOnMutateResult>): _tanstack_react_query0.UseMutationResult<TData, TError, TVariables, TOnMutateResult>;
15
15
  //#endregion
16
16
  export { BulkCommandAction, CommandAction, CommandActionResult, CommandMutationMeta, useCommandMutation };
17
17
  //# sourceMappingURL=use-command-mutation.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-command-mutation.client.d.mts","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-mutation.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,mBAAA,GAAsB;KAEtB,uCAAuC,WAAW;KAClD,iBAAA;EAHA,GAAA,EAAA,MAAA,EAAA;AAEZ,CAAA,EAAA,GAC+D,mBADtC;AACb,KAEA,mBAAA,GAFiB;EAEjB,MAAA,EACF,UADE,CAAA,OACgB,SAAA,CAAA;AAG5B,CAAA;AAEW,iBAFK,kBAEL,CAAA,QAAA,OAAA,EAAA,SAAA,YAAA,EAAA,aAAA,IAAA,EAAA,kBAAA,OAAA,CAAA,CAAA,OAAA,CAAA,EAGC,eAHD,CAGiB,KAHjB,EAGwB,MAHxB,EAGgC,UAHhC,EAG4C,eAH5C,CAAA,CAAA,EAG4D,sBAAA,CAAA,iBAH5D,CAG4D,KAH5D,EAG4D,MAH5D,EAG4D,UAH5D,EAG4D,eAH5D,CAAA"}
1
+ {"version":3,"file":"use-command-mutation.client.d.mts","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-mutation.client.tsx"],"mappings":";;;;;KAOY,mBAAA,GAAsB,OAAA;AAAA,KAEtB,aAAA,mBAAgC,KAAA,EAAO,MAAA,KAAW,mBAAA;AAAA,KAClD,iBAAA,IAAqB,MAAA;EAAU,GAAA;AAAA,MAAoB,mBAAA;AAAA,KAEnD,mBAAA;EACV,MAAA,EAAQ,UAAA,QAAkB,SAAA;AAAA;AAAA,iBAGZ,kBAAA,2BAEL,YAAA,+CAAA,CAGT,OAAA,GAAU,eAAA,CAAgB,KAAA,EAAO,MAAA,EAAQ,UAAA,EAAY,eAAA,IAAgB,sBAAA,CAAA,iBAAA,CAAA,KAAA,EAAA,MAAA,EAAA,UAAA,EAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-command-mutation.client.mjs","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-mutation.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport type { DefaultError, MutationFunction, MutationOptions } from \"@tanstack/react-query\";\nimport { useRouter } from \"next/navigation\";\nimport { useCommand } from \"./context.client\";\n\nexport type CommandActionResult = Promise<unknown>;\n\nexport type CommandAction<TInput = void> = (input: TInput) => CommandActionResult;\nexport type BulkCommandAction = (params: { ids: string[] }) => CommandActionResult;\n\nexport type CommandMutationMeta = {\n router: ReturnType<typeof useRouter>;\n};\n\nexport function useCommandMutation<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(options?: MutationOptions<TData, TError, TVariables, TOnMutateResult>) {\n const router = useRouter();\n const commandContext = useCommand();\n\n const mutation = useAction({\n ...options,\n mutationFn: options?.mutationFn as MutationFunction<TData, TVariables>,\n onMutate: async (...params) => {\n const result = options?.onMutate?.(...params);\n\n commandContext.setStatus(\"pending\");\n\n return (await result) as TOnMutateResult;\n },\n onSuccess: async (...params) => {\n const result = options?.onSuccess?.(...params);\n\n commandContext.setStatus(\"success\");\n await commandContext.onSuccess?.();\n\n return await result;\n },\n onError: async (...params) => {\n const result = options?.onError?.(...params);\n\n commandContext.setStatus(\"error\");\n await commandContext.onError?.();\n\n return await result;\n },\n onSettled: async (...params) => {\n const result = options?.onSettled?.(...params);\n\n commandContext.setStatus(\"idle\");\n\n return await result;\n },\n meta: {\n router,\n } satisfies CommandMutationMeta,\n });\n\n return mutation;\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,mBAKd,SAAuE;CACvE,MAAM,SAAS,WAAW;CAC1B,MAAM,iBAAiB,YAAY;AAwCnC,QAtCiB,UAAU;EACzB,GAAG;EACH,YAAY,SAAS;EACrB,UAAU,OAAO,GAAG,WAAW;GAC7B,MAAM,SAAS,SAAS,WAAW,GAAG,OAAO;AAE7C,kBAAe,UAAU,UAAU;AAEnC,UAAQ,MAAM;;EAEhB,WAAW,OAAO,GAAG,WAAW;GAC9B,MAAM,SAAS,SAAS,YAAY,GAAG,OAAO;AAE9C,kBAAe,UAAU,UAAU;AACnC,SAAM,eAAe,aAAa;AAElC,UAAO,MAAM;;EAEf,SAAS,OAAO,GAAG,WAAW;GAC5B,MAAM,SAAS,SAAS,UAAU,GAAG,OAAO;AAE5C,kBAAe,UAAU,QAAQ;AACjC,SAAM,eAAe,WAAW;AAEhC,UAAO,MAAM;;EAEf,WAAW,OAAO,GAAG,WAAW;GAC9B,MAAM,SAAS,SAAS,YAAY,GAAG,OAAO;AAE9C,kBAAe,UAAU,OAAO;AAEhC,UAAO,MAAM;;EAEf,MAAM,EACJ,QACD;EACF,CAAC"}
1
+ {"version":3,"file":"use-command-mutation.client.mjs","names":[],"sources":["../../../../src/modules/commands/hooks/use-command-mutation.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DefaultError, MutationFunction, MutationOptions } from \"@tanstack/react-query\";\nimport { useRouter } from \"next/navigation\";\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { useCommand } from \"./context.client\";\n\nexport type CommandActionResult = Promise<unknown>;\n\nexport type CommandAction<TInput = void> = (input: TInput) => CommandActionResult;\nexport type BulkCommandAction = (params: { ids: string[] }) => CommandActionResult;\n\nexport type CommandMutationMeta = {\n router: ReturnType<typeof useRouter>;\n};\n\nexport function useCommandMutation<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(options?: MutationOptions<TData, TError, TVariables, TOnMutateResult>) {\n const router = useRouter();\n const commandContext = useCommand();\n\n const mutation = useAction({\n ...options,\n mutationFn: options?.mutationFn as MutationFunction<TData, TVariables>,\n onMutate: async (...params) => {\n const result = options?.onMutate?.(...params);\n\n commandContext.setStatus(\"pending\");\n\n return (await result) as TOnMutateResult;\n },\n onSuccess: async (...params) => {\n const result = options?.onSuccess?.(...params);\n\n commandContext.setStatus(\"success\");\n await commandContext.onSuccess?.();\n\n return await result;\n },\n onError: async (...params) => {\n const result = options?.onError?.(...params);\n\n commandContext.setStatus(\"error\");\n await commandContext.onError?.();\n\n return await result;\n },\n onSettled: async (...params) => {\n const result = options?.onSettled?.(...params);\n\n commandContext.setStatus(\"idle\");\n\n return await result;\n },\n meta: {\n router,\n } satisfies CommandMutationMeta,\n });\n\n return mutation;\n}\n"],"mappings":";;;;;;;AAgBA,SAAgB,mBAKd,SAAuE;CACvE,MAAM,SAAS,WAAW;CAC1B,MAAM,iBAAiB,YAAY;AAwCnC,QAtCiB,UAAU;EACzB,GAAG;EACH,YAAY,SAAS;EACrB,UAAU,OAAO,GAAG,WAAW;GAC7B,MAAM,SAAS,SAAS,WAAW,GAAG,OAAO;AAE7C,kBAAe,UAAU,UAAU;AAEnC,UAAQ,MAAM;;EAEhB,WAAW,OAAO,GAAG,WAAW;GAC9B,MAAM,SAAS,SAAS,YAAY,GAAG,OAAO;AAE9C,kBAAe,UAAU,UAAU;AACnC,SAAM,eAAe,aAAa;AAElC,UAAO,MAAM;;EAEf,SAAS,OAAO,GAAG,WAAW;GAC5B,MAAM,SAAS,SAAS,UAAU,GAAG,OAAO;AAE5C,kBAAe,UAAU,QAAQ;AACjC,SAAM,eAAe,WAAW;AAEhC,UAAO,MAAM;;EAEf,WAAW,OAAO,GAAG,WAAW;GAC9B,MAAM,SAAS,SAAS,YAAY,GAAG,OAAO;AAE9C,kBAAe,UAAU,OAAO;AAEhC,UAAO,MAAM;;EAEf,MAAM,EACJ,QACD;EACF,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { Permission } from "../../auth/lib/permissions.mjs";
2
2
 
3
3
  //#region src/modules/commands/lib/definitions.d.ts
4
-
5
4
  /**
6
5
  * Command mode
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.mts","names":[],"sources":["../../../../src/modules/commands/lib/definitions.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AAKY,KALA,WAAA,GAAc,IAKJ,CALS,UAKT,CAAA,KAAA,EAAA,KAAA,CAAA,EAAA,MAAA,CAAA,CAAA,MAAA,CAAA;;;;AAGjB,KAHO,UAGP,CAAA,QAAA,MAAA,EAAA,QAAA,MAAA,CAAA,GAAA;EAAgD,IAAA,EAAA,MAAA;EAAO,UAAA,CAAA,EAD7C,UAC6C;CAAtB,GAAA,CAAjC,gBAAiC,CAAhB,KAAgB,EAAT,KAAS,CAAA,GAAA,cAAA,CAAe,KAAf,EAAsB,KAAtB,CAAA,CAAA;;AAKtC;;AAGgD,KAHpC,gBAGoC,CAAA,KAAA,EAAA,KAAA,CAAA,GAAA;EAAO,IAAA,EAAA,QAAA;EAApC,UAAA,CAAA,EAAA,CAAA,MAAA,EAAA;IAAqD,IAAA,EADxC,KACwC;EAAS,CAAA,EAAA,GAAA,OAAA,GAAA,OAAA,EAAA;EAGrE,MAAA,EAAA,CAAA,MAAA,EAHO,4BAGqB,CAHQ,KAGR,EAHe,KAGf,CAAA,EAAA,GAH0B,KAAA,CAAM,SAGhC;CAChC;AACA,KAFI,4BAEJ,CAAA,KAAA,EAAA,KAAA,CAAA,GAAA;EACH,IAAA,EAFG,KAEH;EAAK,IAAA,EADF,KACE;AAKV,CAAA,GAAY,CALP,KAKO,SAAA;EAEoB,EAAA,EAAA,MAAA;CACc,GAAA;EAAO,EAAA,EAAA,MAAA;CAAlC,GAAA,MAAA,CAAA;;;AAGnB;AACQ,KAPI,cAOJ,CAAA,KAAA,EAAA,KAAA,CAAA,GAAA;EACA,IAAA,EAAA,MAAA;EACH,UAAA,CAAA,EAAA,CAAA,MAAA,EAAA;IAAK,IAAA,EAPsB,KAOtB,EAAA;;mBANS,2BAA2B,OAAO,WAAW,KAAA,CAAM;;KAG1D;QACJ;QACA;KACH"}
1
+ {"version":3,"file":"definitions.d.mts","names":[],"sources":["../../../../src/modules/commands/lib/definitions.ts"],"mappings":";;;;;AAKA;KAAY,WAAA,GAAc,IAAA,CAAK,UAAA;;;;KAKnB,UAAA;EACV,IAAA;EACA,UAAA,GAAa,UAAA;AAAA,KACV,gBAAA,CAAiB,KAAA,EAAO,KAAA,IAAS,cAAA,CAAe,KAAA,EAAO,KAAA;;;;KAKhD,gBAAA;EACV,IAAA;EACA,UAAA,IAAc,MAAA;IAAU,IAAA,EAAM,KAAA;EAAA;EAC9B,MAAA,GAAS,MAAA,EAAQ,4BAAA,CAA6B,KAAA,EAAO,KAAA,MAAW,KAAA,CAAM,SAAA;AAAA;AAAA,KAG5D,4BAAA;EACV,IAAA,EAAM,KAAA;EACN,IAAA,EAAM,KAAA;AAAA,KACH,KAAA;EAAgB,EAAA;AAAA;EAAiB,EAAA;AAAA;;;;KAK1B,cAAA;EACV,IAAA;EACA,UAAA,IAAc,MAAA;IAAU,IAAA,EAAM,KAAA;EAAA;EAC9B,MAAA,GAAS,MAAA,EAAQ,0BAAA,CAA2B,KAAA,EAAO,KAAA,MAAW,KAAA,CAAM,SAAA;AAAA;AAAA,KAG1D,0BAAA;EACV,IAAA,EAAM,KAAA;EACN,IAAA,EAAM,KAAA;AAAA,KACH,KAAA;EAAgB,EAAA;AAAA;EAAiB,GAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.mts","names":[],"sources":["../../../../src/modules/commands/lib/factory.ts"],"sourcesContent":[],"mappings":";;;;;iBAEgB,sDAAsD,WAAW,OAAO;;eAAR;;EAAhE,UAAA,CAAA,EAAA,CAAA,CAAA,MAAa,EAAA;IAAoD,IAAA,OAAA;EAAO,CAAA,EAAA,GAAA,OAAA,GAAA,OAAA,EAAA,CAAA,GAAA,SAAA;EAAlB,MAAA,EAAA,CAAA,MAAA,8BAAA,MAAA,OAAA,CAAA,EAAA,kBAAA;CAAU,GAAA"}
1
+ {"version":3,"file":"factory.d.mts","names":[],"sources":["../../../../src/modules/commands/lib/factory.ts"],"mappings":";;;;;iBAEgB,aAAA,gCAAA,CAA8C,MAAA,EAAQ,UAAA,CAAW,KAAA,EAAO,KAAA;;eAAR,UAAA"}
@@ -1,6 +1,6 @@
1
1
  import { ContextMenu, ContextMenuTrigger } from "../../../components/ui/context-menu.mjs";
2
2
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.mjs";
3
- import * as react_jsx_runtime86 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime0 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_runtime86.JSX.Element;
24
+ }: SingleCommandMenuProps<TData, TMeta> & ContextMenuContentProps): react_jsx_runtime0.JSX.Element;
25
25
  //#endregion
26
26
  export { ContextCommandMenu, ContextCommandMenuContent, ContextCommandMenuTrigger };
27
27
  //# sourceMappingURL=context-menu.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/menus/context-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAkBa,cAAA,kBAAkB,EAAA,OAAA,WAAc;AAK7C;AAKA;;AAEE,cAPW,yBAOX,EAAA,OAPoC,kBAOpC;;;;AAI+B,iBANjB,yBAMiB,CAAA,KAAA,EAAA,KAAA,CAAA,CAAA;EAAA,IAAA;EAAA,QAAA;EAAA,IAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAA9B,sBAA8B,CAAP,KAAO,EAAA,KAAA,CAAA,GAAS,uBAAT,CAAA,EAAgC,mBAAA,CAAA,GAAA,CAAA,OAAhC"}
1
+ {"version":3,"file":"context-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/menus/context-menu.client.tsx"],"mappings":";;;;;;;;;cAqBa,kBAAA,SAAkB,WAAA;;;;cAKlB,yBAAA,SAAyB,kBAAA;AAAtC;;;AAAA,iBAKgB,yBAAA,cAAA,CAAA;EACd,IAAA;EACA,QAAA;EACA,IAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,sBAAA,CAAuB,KAAA,EAAO,KAAA,IAAS,uBAAA,GAAuB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -6,7 +6,7 @@ import { CommandContextProvider } from "../hooks/context.client.mjs";
6
6
  import { RenderCommand } from "../components/render-command.mjs";
7
7
  import { useSingleCommandMenu } from "../hooks/use-command-menu.client.mjs";
8
8
  import { jsx } from "react/jsx-runtime";
9
- import { Fragment as Fragment$1, useState } from "react";
9
+ import { useState } from "react";
10
10
 
11
11
  //#region src/modules/commands/menus/context-menu.client.tsx
12
12
  /**
@@ -31,7 +31,7 @@ function ContextCommandMenuContent({ data, commands, meta, className, ...props }
31
31
  value: { menu: "context" },
32
32
  children: /* @__PURE__ */ jsx(ContextMenuContent, {
33
33
  ...props,
34
- className: cn("min-w-[10rem]", className),
34
+ className: cn("min-w-40", className),
35
35
  children: /* @__PURE__ */ jsx(ContextMenuItem, {
36
36
  className: "font-medium",
37
37
  disabled: true,
@@ -39,11 +39,11 @@ function ContextCommandMenuContent({ data, commands, meta, className, ...props }
39
39
  })
40
40
  })
41
41
  });
42
- return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(CommandContextProvider, {
42
+ return /* @__PURE__ */ jsx(CommandContextProvider, {
43
43
  value: { menu: "context" },
44
44
  children: /* @__PURE__ */ jsx(ContextMenuContent, {
45
45
  ...props,
46
- className: cn("min-w-[10rem]", className),
46
+ className: cn("min-w-40", className),
47
47
  ref: (ref) => {
48
48
  if (ref?.childNodes.length === 0) setHasCommands(false);
49
49
  },
@@ -52,7 +52,7 @@ function ContextCommandMenuContent({ data, commands, meta, className, ...props }
52
52
  render: renderCommand
53
53
  }, command.name))
54
54
  })
55
- }) });
55
+ });
56
56
  }
57
57
 
58
58
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.client.mjs","names":["Fragment"],"sources":["../../../../src/modules/commands/menus/context-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n ContextMenu,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuTrigger,\n} from \"@/components/ui/context-menu\";\nimport { cn } from \"@/lib/entry\";\nimport { ContextMenuContentProps } from \"@radix-ui/react-context-menu\";\nimport { Fragment, useState } from \"react\";\nimport { RenderCommand } from \"../components/render-command\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport { SingleCommandMenuProps, useSingleCommandMenu } from \"../hooks/use-command-menu.client\";\n\n/**\n * ContextCommandMenu\n */\nexport const ContextCommandMenu = ContextMenu;\n\n/**\n * ContextCommandMenuTrigger\n */\nexport const ContextCommandMenuTrigger = ContextMenuTrigger;\n\n/**\n * ContextCommandMenuContent\n */\nexport function ContextCommandMenuContent<TData, TMeta>({\n data,\n commands,\n meta,\n className,\n ...props\n}: SingleCommandMenuProps<TData, TMeta> & ContextMenuContentProps) {\n const [hasCommands, setHasCommands] = useState(true);\n\n const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });\n\n if (!hasCommands) {\n return (\n <CommandContextProvider value={{ menu: \"context\" }}>\n <ContextMenuContent {...props} className={cn(\"min-w-[10rem]\", className)}>\n <ContextMenuItem className=\"font-medium\" disabled>\n Geen acties beschikbaar\n </ContextMenuItem>\n </ContextMenuContent>\n </CommandContextProvider>\n );\n }\n\n return (\n <Fragment>\n <CommandContextProvider value={{ menu: \"context\" }}>\n <ContextMenuContent\n {...props}\n className={cn(\"min-w-[10rem]\", className)}\n ref={(ref) => {\n if (ref?.childNodes.length === 0) setHasCommands(false);\n }}\n >\n {validCommands.map((command) => (\n <RenderCommand key={command.name} command={command} render={renderCommand} />\n ))}\n </ContextMenuContent>\n </CommandContextProvider>\n </Fragment>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAa,qBAAqB;;;;AAKlC,MAAa,4BAA4B;;;;AAKzC,SAAgB,0BAAwC,EACtD,MACA,UACA,MACA,WACA,GAAG,SAC8D;CACjE,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CAEpD,MAAM,CAAC,eAAe,iBAAiB,qBAAqB;EAAE;EAAM;EAAU;EAAM,CAAC;AAErF,KAAI,CAAC,YACH,QACE,oBAAC;EAAuB,OAAO,EAAE,MAAM,WAAW;YAChD,oBAAC;GAAmB,GAAI;GAAO,WAAW,GAAG,iBAAiB,UAAU;aACtE,oBAAC;IAAgB,WAAU;IAAc;cAAS;KAEhC;IACC;GACE;AAI7B,QACE,oBAACA,wBACC,oBAAC;EAAuB,OAAO,EAAE,MAAM,WAAW;YAChD,oBAAC;GACC,GAAI;GACJ,WAAW,GAAG,iBAAiB,UAAU;GACzC,MAAM,QAAQ;AACZ,QAAI,KAAK,WAAW,WAAW,EAAG,gBAAe,MAAM;;aAGxD,cAAc,KAAK,YAClB,oBAAC;IAA0C;IAAS,QAAQ;MAAxC,QAAQ,KAAiD,CAC7E;IACiB;GACE,GAChB"}
1
+ {"version":3,"file":"context-menu.client.mjs","names":[],"sources":["../../../../src/modules/commands/menus/context-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ContextMenuContentProps } from \"@radix-ui/react-context-menu\";\nimport { useState } from \"react\";\nimport {\n ContextMenu,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuTrigger,\n} from \"@/components/ui/context-menu\";\nimport { cn } from \"@/lib/entry\";\nimport { RenderCommand } from \"../components/render-command\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport {\n type SingleCommandMenuProps,\n useSingleCommandMenu,\n} from \"../hooks/use-command-menu.client\";\n\n/**\n * ContextCommandMenu\n */\nexport const ContextCommandMenu = ContextMenu;\n\n/**\n * ContextCommandMenuTrigger\n */\nexport const ContextCommandMenuTrigger = ContextMenuTrigger;\n\n/**\n * ContextCommandMenuContent\n */\nexport function ContextCommandMenuContent<TData, TMeta>({\n data,\n commands,\n meta,\n className,\n ...props\n}: SingleCommandMenuProps<TData, TMeta> & ContextMenuContentProps) {\n const [hasCommands, setHasCommands] = useState(true);\n\n const [validCommands, renderCommand] = useSingleCommandMenu({ data, commands, meta });\n\n if (!hasCommands) {\n return (\n <CommandContextProvider value={{ menu: \"context\" }}>\n <ContextMenuContent {...props} className={cn(\"min-w-40\", className)}>\n <ContextMenuItem className=\"font-medium\" disabled>\n Geen acties beschikbaar\n </ContextMenuItem>\n </ContextMenuContent>\n </CommandContextProvider>\n );\n }\n\n return (\n <CommandContextProvider value={{ menu: \"context\" }}>\n <ContextMenuContent\n {...props}\n className={cn(\"min-w-40\", className)}\n ref={(ref) => {\n if (ref?.childNodes.length === 0) setHasCommands(false);\n }}\n >\n {validCommands.map((command) => (\n <RenderCommand key={command.name} command={command} render={renderCommand} />\n ))}\n </ContextMenuContent>\n </CommandContextProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAa,qBAAqB;;;;AAKlC,MAAa,4BAA4B;;;;AAKzC,SAAgB,0BAAwC,EACtD,MACA,UACA,MACA,WACA,GAAG,SAC8D;CACjE,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CAEpD,MAAM,CAAC,eAAe,iBAAiB,qBAAqB;EAAE;EAAM;EAAU;EAAM,CAAC;AAErF,KAAI,CAAC,YACH,QACE,oBAAC;EAAuB,OAAO,EAAE,MAAM,WAAW;YAChD,oBAAC;GAAmB,GAAI;GAAO,WAAW,GAAG,YAAY,UAAU;aACjE,oBAAC;IAAgB,WAAU;IAAc;cAAS;KAEhC;IACC;GACE;AAI7B,QACE,oBAAC;EAAuB,OAAO,EAAE,MAAM,WAAW;YAChD,oBAAC;GACC,GAAI;GACJ,WAAW,GAAG,YAAY,UAAU;GACpC,MAAM,QAAQ;AACZ,QAAI,KAAK,WAAW,WAAW,EAAG,gBAAe,MAAM;;aAGxD,cAAc,KAAK,YAClB,oBAAC;IAA0C;IAAS,QAAQ;MAAxC,QAAQ,KAAiD,CAC7E;IACiB;GACE"}
@@ -1,5 +1,5 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.mjs";
2
- import * as react_jsx_runtime87 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import React, { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/commands/menus/dropdown-menu.client.d.ts
@@ -9,11 +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_runtime87.JSX.Element | null;
12
+ }: SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>): react_jsx_runtime0.JSX.Element | null;
13
13
  declare function DropdownCommandMenuLoading({
14
14
  className,
15
15
  ...props
16
- }: ComponentProps<"div">): react_jsx_runtime87.JSX.Element;
16
+ }: ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
17
17
  //#endregion
18
18
  export { DropdownCommandMenu, DropdownCommandMenuLoading };
19
19
  //# sourceMappingURL=dropdown-menu.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAgBgB;;;;;;GAMb,uBAAuB,OAAO,SAAS,KAAA,CAAM,eAAe,eAAY,mBAAA,CAAA,GAAA,CAAA,OAAA;iBA8B3D,0BAAA;;;GAAoD,wBAAqB,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"dropdown-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"mappings":";;;;;iBAmBgB,mBAAA,cAAA,CAAA;EACd,IAAA;EACA,QAAA;EACA,IAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,sBAAA,CAAuB,KAAA,EAAO,KAAA,IAAS,KAAA,CAAM,cAAA,CAAe,WAAA,IAAY,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBA8B3D,0BAAA,CAAA;EAA6B,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,UAAqB,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.client.mjs","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,WACA,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,WAAW,GAAG,SAAgC;AACzF,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,2BAA2B,UAAU;YACjE,oBAAC,YAAS,WAAU,YAAY;GAC5B"}
1
+ {"version":3,"file":"dropdown-menu.client.mjs","names":[],"sources":["../../../../src/modules/commands/menus/dropdown-menu.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { MoreHorizontal } from \"lucide-react\";\nimport React, { type ComponentProps } from \"react\";\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 { RenderCommand } from \"../components/render-command\";\nimport { CommandContextProvider } from \"../hooks/context.client\";\nimport {\n type SingleCommandMenuProps,\n useSingleCommandMenu,\n} 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":";;;;;;;;;;;;;;AAmBA,SAAgB,oBAAkC,EAChD,MACA,UACA,MACA,WACA,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,WAAW,GAAG,SAAgC;AACzF,QACE,oBAAC;EAAI,GAAI;EAAO,WAAW,GAAG,2BAA2B,UAAU;YACjE,oBAAC,YAAS,WAAU,YAAY;GAC5B"}
@@ -0,0 +1,19 @@
1
+ import { BulkCommandMenuProps } from "../hooks/use-command-menu.client.mjs";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/modules/commands/menus/floating-menu.client.d.ts
5
+ type FloatingCommandMenuProps<TData, TMeta> = BulkCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement> & {
6
+ state: "open" | "closed";
7
+ };
8
+ declare function FloatingCommandMenu<TData, TMeta>({
9
+ data,
10
+ commands,
11
+ meta,
12
+ state,
13
+ onSuccess,
14
+ className,
15
+ ...props
16
+ }: FloatingCommandMenuProps<TData, TMeta>): react_jsx_runtime0.JSX.Element;
17
+ //#endregion
18
+ export { FloatingCommandMenu };
19
+ //# sourceMappingURL=floating-menu.client.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floating-menu.client.d.mts","names":[],"sources":["../../../../src/modules/commands/menus/floating-menu.client.tsx"],"mappings":";;;;KAQK,wBAAA,iBAAyC,oBAAA,CAAqB,KAAA,EAAO,KAAA,IACxE,KAAA,CAAM,cAAA,CAAe,WAAA;EACnB,KAAA;AAAA;AAAA,iBAGY,mBAAA,cAAA,CAAA;EACd,IAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EAAA,GACG;AAAA,GACF,wBAAA,CAAyB,KAAA,EAAO,KAAA,IAAM,kBAAA,CAAA,GAAA,CAAA,OAAA"}