@tulip-systems/core 0.5.13 → 0.5.15

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 (229) hide show
  1. package/dist/auth/client.d.mts +5 -4
  2. package/dist/auth/client.mjs +6 -5
  3. package/dist/auth.mjs +2 -2
  4. package/dist/components/client.mjs +2 -2
  5. package/dist/components/common/icons.d.mts +52 -52
  6. package/dist/components/common/status.d.mts +3 -3
  7. package/dist/components/editor/components/content.client.d.mts +2 -2
  8. package/dist/components/editor/components/editor.client.d.mts +6 -6
  9. package/dist/components/editor/components/editor.client.d.mts.map +1 -1
  10. package/dist/components/editor/components/menu.client.d.mts +3 -3
  11. package/dist/components/header/back-button.client.d.mts +2 -2
  12. package/dist/components/header/bottom-bar.client.d.mts +3 -3
  13. package/dist/components/header/breadcrumbs.client.d.mts +7 -7
  14. package/dist/components/header/header.client.d.mts +2 -2
  15. package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
  16. package/dist/components/header/top-bar.client.d.mts +4 -4
  17. package/dist/components/layouts/admin-content.client.d.mts +2 -2
  18. package/dist/components/layouts/admin-error-pages.d.mts +4 -4
  19. package/dist/components/layouts/admin-layout.d.mts +2 -2
  20. package/dist/components/layouts/admin-layout.mjs +1 -1
  21. package/dist/components/layouts/admin-layout.mjs.map +1 -1
  22. package/dist/components/layouts/admin-loading.d.mts +2 -2
  23. package/dist/components/layouts/empty-page.d.mts +4 -4
  24. package/dist/components/layouts/error-page.d.mts +9 -9
  25. package/dist/components/layouts/error-sections.d.mts +5 -5
  26. package/dist/components/layouts/list-layout.d.mts +2 -2
  27. package/dist/components/layouts/providers.client.d.mts +2 -2
  28. package/dist/components/layouts/root-error-pages.d.mts +2 -2
  29. package/dist/components/layouts/root-layout.server.d.mts +4 -4
  30. package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
  31. package/dist/components/layouts/root-loading.d.mts +2 -2
  32. package/dist/components/layouts/tab-layout.d.mts +2 -2
  33. package/dist/components/lists/data-list.d.mts +5 -5
  34. package/dist/components/lists/data-stack.d.mts +8 -8
  35. package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -2
  36. package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
  37. package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
  38. package/dist/components/ui/accordion.d.mts +5 -5
  39. package/dist/components/ui/alert-dialog.d.mts +12 -12
  40. package/dist/components/ui/alert.d.mts +6 -6
  41. package/dist/components/ui/aspect-ratio.d.mts +2 -2
  42. package/dist/components/ui/avatar.client.d.mts +4 -4
  43. package/dist/components/ui/badge.d.mts +4 -4
  44. package/dist/components/ui/breadcrumb.d.mts +8 -8
  45. package/dist/components/ui/button.d.mts +4 -4
  46. package/dist/components/ui/calendar.d.mts +3 -3
  47. package/dist/components/ui/card.d.mts +7 -7
  48. package/dist/components/ui/carousel.d.mts +6 -6
  49. package/dist/components/ui/chart.client.d.mts +5 -5
  50. package/dist/components/ui/checkbox.d.mts +2 -2
  51. package/dist/components/ui/collapsible.client.d.mts +4 -4
  52. package/dist/components/ui/color-picker.client.d.mts +2 -2
  53. package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
  54. package/dist/components/ui/combobox.client.d.mts +2 -2
  55. package/dist/components/ui/command.d.mts +10 -10
  56. package/dist/components/ui/context-menu.d.mts +16 -16
  57. package/dist/components/ui/date-picker.client.d.mts +2 -2
  58. package/dist/components/ui/dialog.client.d.mts +11 -11
  59. package/dist/components/ui/drawer.client.d.mts +11 -11
  60. package/dist/components/ui/dropdown-menu.d.mts +16 -16
  61. package/dist/components/ui/form.client.d.mts +7 -7
  62. package/dist/components/ui/hover-card.client.d.mts +4 -4
  63. package/dist/components/ui/input-recipient.d.mts +2 -2
  64. package/dist/components/ui/input.d.mts +2 -2
  65. package/dist/components/ui/label.d.mts +2 -2
  66. package/dist/components/ui/navigation-menu.d.mts +11 -11
  67. package/dist/components/ui/pagination.d.mts +8 -8
  68. package/dist/components/ui/popover.d.mts +5 -5
  69. package/dist/components/ui/progress.client.d.mts +2 -2
  70. package/dist/components/ui/radio-group.d.mts +3 -3
  71. package/dist/components/ui/resizable.client.d.mts +4 -4
  72. package/dist/components/ui/scroll-area.d.mts +3 -3
  73. package/dist/components/ui/select.client.d.mts +11 -11
  74. package/dist/components/ui/separator.d.mts +2 -2
  75. package/dist/components/ui/sheet.client.d.mts +9 -9
  76. package/dist/components/ui/sidebar.client.d.mts +26 -26
  77. package/dist/components/ui/skeleton.d.mts +2 -2
  78. package/dist/components/ui/slider.d.mts +2 -2
  79. package/dist/components/ui/sonner.client.d.mts +2 -2
  80. package/dist/components/ui/sonner.client.mjs +1 -1
  81. package/dist/components/ui/switch.d.mts +2 -2
  82. package/dist/components/ui/tabs.d.mts +5 -5
  83. package/dist/components/ui/textarea.d.mts +2 -2
  84. package/dist/components/ui/time-input.client.d.mts +2 -2
  85. package/dist/components/ui/toggle-group.client.d.mts +3 -3
  86. package/dist/components/ui/toggle.d.mts +4 -4
  87. package/dist/components/ui/toggle.d.mts.map +1 -1
  88. package/dist/components/ui/tooltip.client.d.mts +5 -5
  89. package/dist/components.mjs +2 -2
  90. package/dist/lib/client.mjs +1 -1
  91. package/dist/lib/hooks/use-action.d.mts +2 -2
  92. package/dist/lib/hooks/use-indicator.d.mts +2 -2
  93. package/dist/modules/auth/components/allowed.client.d.mts +2 -2
  94. package/dist/modules/auth/components/allowed.client.mjs +2 -3
  95. package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
  96. package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
  97. package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
  98. package/dist/modules/auth/components/auth-loading.d.mts +2 -2
  99. package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
  100. package/dist/modules/auth/components/create-first-user-page.client.mjs +4 -3
  101. package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
  102. package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
  103. package/dist/modules/auth/components/forget-password-page.client.mjs +4 -3
  104. package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
  105. package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
  106. package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
  107. package/dist/modules/auth/components/guard.server.d.mts +3 -2
  108. package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
  109. package/dist/modules/auth/components/guard.server.mjs +1 -0
  110. package/dist/modules/auth/components/guard.server.mjs.map +1 -1
  111. package/dist/modules/auth/components/login-page.client.d.mts +2 -2
  112. package/dist/modules/auth/components/login-page.client.mjs +4 -3
  113. package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
  114. package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
  115. package/dist/modules/auth/components/reset-password-page.client.mjs +4 -3
  116. package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
  117. package/dist/modules/auth/components/update-password-command.d.mts +2 -2
  118. package/dist/modules/auth/components/update-password-command.mjs +1 -1
  119. package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +288 -168
  120. package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -0
  121. package/dist/modules/auth/handler/create-client.client.mjs +26 -0
  122. package/dist/modules/auth/handler/create-client.client.mjs.map +1 -0
  123. package/dist/modules/auth/handler/init.d.mts +133 -133
  124. package/dist/modules/auth/handler/init.d.mts.map +1 -1
  125. package/dist/modules/auth/hooks/use-auth-client.d.mts +24 -0
  126. package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -0
  127. package/dist/modules/auth/hooks/use-auth-client.mjs +31 -0
  128. package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -0
  129. package/dist/modules/auth/hooks/use-permission.d.mts +8 -35
  130. package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
  131. package/dist/modules/auth/hooks/use-permission.mjs +47 -93
  132. package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
  133. package/dist/modules/auth/hooks/use-session.d.mts +5 -119
  134. package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
  135. package/dist/modules/auth/hooks/use-session.mjs +15 -17
  136. package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
  137. package/dist/modules/auth/lib/helpers.server.mjs +1 -1
  138. package/dist/modules/auth/lib/validators.d.mts +2 -2
  139. package/dist/modules/auth/lib/validators.d.mts.map +1 -1
  140. package/dist/modules/commands/components/alert-dialog-command.client.d.mts +11 -11
  141. package/dist/modules/commands/components/click-command.client.d.mts +2 -2
  142. package/dist/modules/commands/components/command-trigger.client.d.mts +4 -4
  143. package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
  144. package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
  145. package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
  146. package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
  147. package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
  148. package/dist/modules/commands/hooks/use-command-mutation.client.mjs +1 -1
  149. package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
  150. package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
  151. package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
  152. package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
  153. package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
  154. package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
  155. package/dist/modules/config/db/helpers.d.mts +5 -5
  156. package/dist/modules/config/db/helpers.d.mts.map +1 -1
  157. package/dist/modules/config/lib/config.d.mts +1 -1
  158. package/dist/modules/config/lib/config.mjs.map +1 -1
  159. package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
  160. package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
  161. package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
  162. package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
  163. package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
  164. package/dist/modules/data-tables/strategies/helpers/sorting.mjs +1 -1
  165. package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
  166. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
  167. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
  168. package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
  169. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
  170. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
  171. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
  172. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
  173. package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
  174. package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
  175. package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
  176. package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
  177. package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
  178. package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
  179. package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
  180. package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
  181. package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
  182. package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
  183. package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
  184. package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
  185. package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
  186. package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
  187. package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
  188. package/dist/modules/inline-edit/hooks/use-inline.client.mjs +2 -6
  189. package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
  190. package/dist/modules/storage/components/dropzone.client.d.mts +4 -4
  191. package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
  192. package/dist/modules/storage/components/image-grid.client.mjs +1 -1
  193. package/dist/modules/storage/components/upload-zone.client.d.mts +2 -2
  194. package/dist/modules/storage/components/upload-zone.client.mjs +1 -2
  195. package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
  196. package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
  197. package/dist/modules/storage/lib/proxy.server.mjs +1 -1
  198. package/dist/modules/storage/lib/router.server.d.mts +2354 -2324
  199. package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
  200. package/dist/modules/storage/lib/router.server.mjs +2 -3
  201. package/dist/modules/storage/lib/router.server.mjs.map +1 -1
  202. package/dist/modules/storage/lib/service.server.d.mts +18 -18
  203. package/dist/modules/storage/lib/validators.d.mts +90 -90
  204. package/dist/modules/storage/lib/validators.d.mts.map +1 -1
  205. package/package.json +1 -1
  206. package/src/components/layouts/admin-layout.tsx +1 -3
  207. package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
  208. package/src/modules/auth/components/allowed.client.tsx +2 -2
  209. package/src/modules/auth/components/create-first-user-page.client.tsx +3 -2
  210. package/src/modules/auth/components/forget-password-page.client.tsx +2 -1
  211. package/src/modules/auth/components/guard.server.tsx +2 -0
  212. package/src/modules/auth/components/login-page.client.tsx +2 -1
  213. package/src/modules/auth/components/reset-password-page.client.tsx +3 -1
  214. package/src/modules/auth/entry.client.ts +13 -1
  215. package/src/modules/auth/entry.ts +11 -0
  216. package/src/modules/auth/handler/create-client.client.ts +53 -0
  217. package/src/modules/auth/hooks/use-auth-client.tsx +38 -0
  218. package/src/modules/auth/hooks/use-permission.ts +49 -94
  219. package/src/modules/auth/hooks/use-session.ts +16 -16
  220. package/src/modules/commands/hooks/use-command-menu.client.tsx +0 -6
  221. package/src/modules/config/lib/config.ts +3 -2
  222. package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
  223. package/src/modules/storage/components/upload-zone.client.tsx +0 -2
  224. package/src/modules/storage/lib/router.server.ts +5 -4
  225. package/dist/modules/auth/handler/client.client.d.mts.map +0 -1
  226. package/dist/modules/auth/handler/client.client.mjs +0 -21
  227. package/dist/modules/auth/handler/client.client.mjs.map +0 -1
  228. package/src/modules/auth/components/guard.client.tsx +0 -12
  229. package/src/modules/auth/handler/client.client.ts +0 -16
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime48 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
4
4
  import { Keys } from "react-hotkeys-hook";
@@ -21,7 +21,7 @@ declare function CommandClick<TData = unknown, TError = DefaultError, TVariables
21
21
  hotkey,
22
22
  disabled,
23
23
  ...props
24
- }: CommandClickProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime48.JSX.Element | null;
24
+ }: CommandClickProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime20.JSX.Element | null;
25
25
  //#endregion
26
26
  export { CommandClick, CommandClickProps };
27
27
  //# sourceMappingURL=click-command.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime49 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
2
2
  import * as react6 from "react";
3
3
  import { PropsWithChildren } from "react";
4
4
 
@@ -18,17 +18,17 @@ declare function CommandTrigger({
18
18
  children
19
19
  }: PropsWithChildren<{
20
20
  label?: string;
21
- }>): react_jsx_runtime49.JSX.Element;
21
+ }>): react_jsx_runtime21.JSX.Element;
22
22
  /**
23
23
  * Command label
24
24
  */
25
- declare function CommandLabel(): react_jsx_runtime49.JSX.Element | null;
25
+ declare function CommandLabel(): react_jsx_runtime21.JSX.Element | null;
26
26
  /**
27
27
  * Command icon
28
28
  */
29
29
  declare function CommandIcon({
30
30
  children
31
- }: PropsWithChildren): react_jsx_runtime49.JSX.Element;
31
+ }: PropsWithChildren): react_jsx_runtime21.JSX.Element;
32
32
  //#endregion
33
33
  export { CommandIcon, CommandLabel, CommandTrigger, CommandTriggerContext };
34
34
  //# sourceMappingURL=command-trigger.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime52 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime24 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { DialogContentProps, DialogProps } from "@radix-ui/react-dialog";
4
4
  import { Keys } from "react-hotkeys-hook";
@@ -20,7 +20,7 @@ declare function CommandDialog({
20
20
  ...props
21
21
  }: Omit<DialogProps, "open" | "onOpenChange"> & {
22
22
  openState?: CommandDialogOpenState;
23
- }): react_jsx_runtime52.JSX.Element;
23
+ }): react_jsx_runtime24.JSX.Element;
24
24
  /**
25
25
  * CommandDialogTrigger
26
26
  */
@@ -37,42 +37,42 @@ declare function CommandDialogTrigger({
37
37
  children,
38
38
  disabled,
39
39
  ...props
40
- }: CommandDialogTriggerProps): react_jsx_runtime52.JSX.Element | undefined;
40
+ }: CommandDialogTriggerProps): react_jsx_runtime24.JSX.Element | undefined;
41
41
  /**
42
42
  * CommandDialogContent
43
43
  */
44
44
  declare function CommandDialogContent({
45
45
  children,
46
46
  ...props
47
- }: DialogContentProps): react_jsx_runtime52.JSX.Element;
47
+ }: DialogContentProps): react_jsx_runtime24.JSX.Element;
48
48
  /**
49
49
  * CommandDialogHeader
50
50
  */
51
51
  declare function CommandDialogHeader({
52
52
  children,
53
53
  ...props
54
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime52.JSX.Element;
54
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime24.JSX.Element;
55
55
  /**
56
56
  * CommandDialogTitle
57
57
  */
58
58
  declare function CommandDialogTitle({
59
59
  children,
60
60
  ...props
61
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime52.JSX.Element;
61
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime24.JSX.Element;
62
62
  /**
63
63
  * CommandDialogDescription
64
64
  */
65
65
  declare function CommandDialogDescription({
66
66
  children,
67
67
  ...props
68
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime52.JSX.Element;
68
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime24.JSX.Element;
69
69
  /**
70
70
  * CommandDialogFooter
71
71
  */
72
72
  declare function CommandDialogFooter({
73
73
  children,
74
74
  ...props
75
- }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime52.JSX.Element;
75
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime24.JSX.Element;
76
76
  //#endregion
77
77
  export { CommandDialog, CommandDialogContent, CommandDialogDescription, CommandDialogFooter, CommandDialogHeader, CommandDialogTitle, CommandDialogTrigger };
78
78
  //# sourceMappingURL=dialog-command.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime59 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime31 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
4
4
 
@@ -13,7 +13,7 @@ type CommandDropdownProps = {
13
13
  declare function CommandDropdown({
14
14
  children,
15
15
  ...props
16
- }: CommandDropdownProps): react_jsx_runtime59.JSX.Element | null;
16
+ }: CommandDropdownProps): react_jsx_runtime31.JSX.Element | null;
17
17
  /**
18
18
  * CommandDropdownContent
19
19
  */
@@ -24,7 +24,7 @@ type CommandDropdownContentProps = {
24
24
  declare function CommandDropdownContent({
25
25
  children,
26
26
  ...props
27
- }: CommandDropdownContentProps): react_jsx_runtime59.JSX.Element | null;
27
+ }: CommandDropdownContentProps): react_jsx_runtime31.JSX.Element | null;
28
28
  /**
29
29
  * CommandDropdownTrigger
30
30
  */
@@ -39,7 +39,7 @@ declare function CommandDropdownTrigger({
39
39
  disabled,
40
40
  children,
41
41
  ...props
42
- }: CommandDropdownTriggerProps): react_jsx_runtime59.JSX.Element | null;
42
+ }: CommandDropdownTriggerProps): react_jsx_runtime31.JSX.Element | null;
43
43
  /**
44
44
  * CommandDropdownItem
45
45
  */
@@ -54,7 +54,7 @@ declare function CommandDropdownItem<TData = unknown, TError = DefaultError, TVa
54
54
  mutation,
55
55
  children,
56
56
  ...props
57
- }: CommandDropdownItemProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime59.JSX.Element | null;
57
+ }: CommandDropdownItemProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime31.JSX.Element | null;
58
58
  //#endregion
59
59
  export { CommandDropdown, CommandDropdownContent, CommandDropdownItem, CommandDropdownProps, CommandDropdownTrigger };
60
60
  //# sourceMappingURL=dropdown-command.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime63 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime35 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_runtime63.JSX.Element | null;
16
+ }: CommandEmptyProps): react_jsx_runtime35.JSX.Element | null;
17
17
  //#endregion
18
18
  export { CommandEmpty, CommandEmptyProps };
19
19
  //# sourceMappingURL=empty-command.client.d.mts.map
@@ -1,8 +1,8 @@
1
- import * as react_jsx_runtime64 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
2
2
  import React, { ComponentProps } from "react";
3
3
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
4
- import { FieldValues, Form } from "react-hook-form";
5
4
  import { DialogContentProps, DialogProps } from "@radix-ui/react-dialog";
5
+ import { FieldValues, Form } from "react-hook-form";
6
6
  import { Keys } from "react-hotkeys-hook";
7
7
 
8
8
  //#region src/modules/commands/components/form-dialog-command.client.d.ts
@@ -12,7 +12,7 @@ import { Keys } from "react-hotkeys-hook";
12
12
  declare function CommandFormDialog({
13
13
  children,
14
14
  ...props
15
- }: DialogProps): react_jsx_runtime64.JSX.Element;
15
+ }: DialogProps): react_jsx_runtime36.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_runtime64.JSX.Element | undefined;
32
+ }: CommandFormDialogTriggerProps): react_jsx_runtime36.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_runtime64.JSX.Element;
39
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime36.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_runtime64.JSX.Element;
46
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime36.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_runtime64.JSX.Element;
53
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime36.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_runtime64.JSX.Element;
68
+ }: CommandFormDialogContentProps<TValues, TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime36.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_runtime64.JSX.Element;
76
+ }: ComponentProps<"div">): react_jsx_runtime36.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_runtime64.JSX.Element;
83
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime36.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_runtime64.JSX.Element;
90
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime36.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_runtime64.JSX.Element;
97
+ }: React.HTMLAttributes<HTMLElement>): react_jsx_runtime36.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":"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 // const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];\n // usePermission(mergePermissions(permissions));\n\n // filter out commands that don't have valid conditions\n const validCommands = commands.filter((command) =>\n command.mode === \"single\"\n ? validateSingleCommand({ data, command })\n : validateBulkCommand({ data: [data], command }),\n );\n\n function renderCommand(command: (typeof validCommands)[number]) {\n return command.mode === \"single\"\n ? renderSingleCommand({ command, data, meta })\n : renderBulkCommand({ command, data: [data], meta });\n }\n\n return [validCommands, renderCommand] as const;\n}\n\n/**\n * useBulkCommandMenu\n */\nexport function useBulkCommandMenu<TData, TMeta>({\n data,\n commands,\n meta,\n}: BulkCommandMenuProps<TData, TMeta>) {\n // const permissions = commands.map((command) => command.permission).filter(Boolean) as Permission[];\n // usePermission(mergePermissions(permissions));\n\n /**\n * Filter out commands that don't have valid conditions\n */\n const validCommands = commands\n // filter out commands that have mode \"bulk\"\n .filter((command) => command.mode === \"bulk\")\n // filter out commands that don't have valid conditions\n .filter((command) => command.mode === \"bulk\" && validateBulkCommand({ data, command }));\n\n /**\n * Render command\n */\n function renderCommand(command: (typeof commands)[number]) {\n if (command.mode === \"single\") return null;\n\n return renderBulkCommand({ command, data, meta });\n }\n\n return [validCommands, renderCommand] as const;\n}\n\n// export function useBulkCommandMenu<TData, TMeta>({\n// data,\n// commands,\n// meta,\n// }: BulkCommandMenuProps<TData, TMeta>) {\n// /**\n// * Filter out commands that don't have valid conditions\n// */\n// const validCommands = useSuspenseQueries({\n// queries: commands.flatMap((command) => ({\n// queryKey: [\"command\", command],\n// queryFn: async () => {\n// const { mode, permission } = command;\n\n// // filter out commands that have mode \"bulk\"\n// if (mode !== \"bulk\") return null;\n\n// // filter out commands that don't have valid conditions\n// if (!validateBulkCommand({ data, command })) return null;\n\n// // filter out commands that don't have a permissions defined\n// if (!permission) return command;\n\n// // filter out commands that don't have valid permissions\n// const session = await authClient.getSession();\n// const userId = session.data?.user.id;\n// const hasPermission = await authClient.admin.hasPermission({ permission, userId });\n// if (!hasPermission.data?.success) return null;\n\n// return command;\n// },\n// })),\n// combine: (items) =>\n// items.filter(({ data }) => data).map(({ data }) => data as NonNullable<typeof data>),\n// });\n\n// /**\n// * Render command\n// */\n// const renderCommand = (command: (typeof validCommands)[number]) =>\n// renderBulkCommand({ command, data, meta });\n\n// return [validCommands, renderCommand] as const;\n// }\n\n// */\n// export function useSingleCommandMenu<TData, TMeta>({\n// data,\n// commands,\n// meta,\n// }: SingleCommandMenuProps<TData, TMeta> & { data: TData }) {\n// /**\n// * Filter out commands that don't have valid conditions\n// */\n// const validCommands = useSuspenseQueries({\n// queries: commands.flatMap((command) => ({\n// queryKey: [\"command\", command],\n// queryFn: async () => {\n// const { mode, permission } = command;\n\n// // filter out commands that don't have valid conditions\n// if (mode === \"single\" && !validateSingleCommand({ data, command })) return null;\n// if (mode === \"bulk\" && !validateBulkCommand({ data: [data], command })) return null;\n\n// // filter out commands that don't have a permissions defined\n// if (!permission) return command;\n\n// // filter out commands that don't have valid permissions\n// const session = await authClient.getSession();\n// const userId = session.data?.user.id;\n// const hasPermission = await authClient.admin.hasPermission({ permission, userId });\n// if (!hasPermission.data?.success) return null;\n\n// return command;\n// },\n// })),\n// combine: (items) =>\n// items.filter(({ data }) => data).map(({ data }) => data as NonNullable<typeof data>),\n// });\n\n// /**\n// * Render command\n// */\n// function renderCommand(command: (typeof validCommands)[number]) {\n// return command.mode === \"single\"\n// ? renderSingleCommand({ command, data, meta })\n// : renderBulkCommand({ command, data: [data], meta });\n// }\n\n// return [validCommands, renderCommand] as const;\n// }\n"],"mappings":";;;;;;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;CAKzD,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;;;;CAOrC,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":["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,7 +1,7 @@
1
1
  "use client";
2
2
 
3
- import { useCommand } from "./context.client.mjs";
4
3
  import { useAction } from "../../../lib/hooks/use-action.mjs";
4
+ import { useCommand } from "./context.client.mjs";
5
5
  import { useRouter } from "next/navigation";
6
6
 
7
7
  //#region src/modules/commands/hooks/use-command-mutation.client.tsx
@@ -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_runtime74 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime46 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_runtime74.JSX.Element;
24
+ }: SingleCommandMenuProps<TData, TMeta> & ContextMenuContentProps): react_jsx_runtime46.JSX.Element;
25
25
  //#endregion
26
26
  export { ContextCommandMenu, ContextCommandMenuContent, ContextCommandMenuTrigger };
27
27
  //# sourceMappingURL=context-menu.client.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.mjs";
2
- import * as react_jsx_runtime75 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime47 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_runtime75.JSX.Element | null;
12
+ }: SingleCommandMenuProps<TData, TMeta> & React.HTMLAttributes<HTMLElement>): react_jsx_runtime47.JSX.Element | null;
13
13
  declare function DropdownCommandMenuLoading({
14
14
  className,
15
15
  ...props
16
- }: ComponentProps<"div">): react_jsx_runtime75.JSX.Element;
16
+ }: ComponentProps<"div">): react_jsx_runtime47.JSX.Element;
17
17
  //#endregion
18
18
  export { DropdownCommandMenu, DropdownCommandMenuLoading };
19
19
  //# sourceMappingURL=dropdown-menu.client.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.mjs";
2
- import * as react_jsx_runtime77 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime49 from "react/jsx-runtime";
3
3
  import React, { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/commands/menus/inline-menu.client.d.ts
@@ -10,11 +10,11 @@ declare function InlineCommandMenu<TData, TMeta>({
10
10
  commands,
11
11
  className,
12
12
  ...props
13
- }: InlineCommandMenuProps<TData, TMeta>): react_jsx_runtime77.JSX.Element | null;
13
+ }: InlineCommandMenuProps<TData, TMeta>): react_jsx_runtime49.JSX.Element | null;
14
14
  declare function InlineCommandMenuLoading({
15
15
  className,
16
16
  ...props
17
- }: ComponentProps<"div">): react_jsx_runtime77.JSX.Element;
17
+ }: ComponentProps<"div">): react_jsx_runtime49.JSX.Element;
18
18
  //#endregion
19
19
  export { InlineCommandMenu, InlineCommandMenuLoading, InlineCommandMenuProps };
20
20
  //# sourceMappingURL=inline-menu.client.d.mts.map
@@ -1,10 +1,10 @@
1
1
  import { SingleCommandMenuProps } from "../hooks/use-command-menu.client.mjs";
2
- import * as react_jsx_runtime79 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime51 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/modules/commands/menus/responsive-menu.client.d.ts
5
5
  type ResponsiveCommandMenuProps<TData, TMeta> = SingleCommandMenuProps<TData, TMeta>;
6
- declare function ResponsiveCommandMenu<TData, TMeta>(props: ResponsiveCommandMenuProps<TData, TMeta>): react_jsx_runtime79.JSX.Element;
7
- declare function ResponsiveCommandMenuLoading(): react_jsx_runtime79.JSX.Element;
6
+ declare function ResponsiveCommandMenu<TData, TMeta>(props: ResponsiveCommandMenuProps<TData, TMeta>): react_jsx_runtime51.JSX.Element;
7
+ declare function ResponsiveCommandMenuLoading(): react_jsx_runtime51.JSX.Element;
8
8
  //#endregion
9
9
  export { ResponsiveCommandMenu, ResponsiveCommandMenuLoading };
10
10
  //# sourceMappingURL=responsive-menu.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime81 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime53 from "react/jsx-runtime";
2
2
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
3
3
 
4
4
  //#region src/modules/commands/utils/archive-command.client.d.ts
@@ -17,7 +17,7 @@ declare function ArchiveCommand<TData = unknown, TError = DefaultError, TVariabl
17
17
  }, TOnMutateResult = unknown>({
18
18
  variables,
19
19
  mutation
20
- }: ArchiveCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime81.JSX.Element;
20
+ }: ArchiveCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime53.JSX.Element;
21
21
  /**
22
22
  * Unarchive command
23
23
  * @description command to unarchive a resource
@@ -27,7 +27,7 @@ declare function RestoreCommand<TData = unknown, TError = DefaultError, TVariabl
27
27
  }, TOnMutateResult = unknown>({
28
28
  variables,
29
29
  mutation
30
- }: ArchiveCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime81.JSX.Element;
30
+ }: ArchiveCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime53.JSX.Element;
31
31
  //#endregion
32
32
  export { ArchiveCommand, ArchiveCommandProps, RestoreCommand };
33
33
  //# sourceMappingURL=archive-command.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime83 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime55 from "react/jsx-runtime";
2
2
  import { DefaultError, MutationOptions } from "@tanstack/react-query";
3
3
 
4
4
  //#region src/modules/commands/utils/delete-command.client.d.ts
@@ -13,7 +13,7 @@ type DeleteCommandProps<TData = unknown, TError = DefaultError, TVariables = unk
13
13
  declare function DeleteCommand<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown>({
14
14
  variables,
15
15
  mutation
16
- }: DeleteCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime83.JSX.Element;
16
+ }: DeleteCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime55.JSX.Element;
17
17
  /**
18
18
  * Single Delete command
19
19
  */
@@ -22,7 +22,7 @@ declare function SingleDeleteCommand<TData = unknown, TError = DefaultError, TVa
22
22
  }, TOnMutateResult = unknown>({
23
23
  variables,
24
24
  mutation
25
- }: DeleteCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime83.JSX.Element;
25
+ }: DeleteCommandProps<TData, TError, TVariables, TOnMutateResult>): react_jsx_runtime55.JSX.Element;
26
26
  //#endregion
27
27
  export { DeleteCommand, DeleteCommandProps, SingleDeleteCommand };
28
28
  //# sourceMappingURL=delete-command.client.d.mts.map
@@ -1,5 +1,5 @@
1
- import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
2
- import * as drizzle_orm0 from "drizzle-orm";
1
+ import * as drizzle_orm_pg_core1919 from "drizzle-orm/pg-core";
2
+ import * as drizzle_orm449 from "drizzle-orm";
3
3
 
4
4
  //#region src/modules/config/db/helpers.d.ts
5
5
  declare const generateDefaultUUID: () => string;
@@ -7,9 +7,9 @@ declare const generateDefaultUUID: () => string;
7
7
  * Base columns4
8
8
  */
9
9
  declare const baseColumns: {
10
- id: drizzle_orm0.HasRuntimeDefault<drizzle_orm0.HasDefault<drizzle_orm0.IsPrimaryKey<drizzle_orm0.NotNull<drizzle_orm_pg_core0.PgUUIDBuilderInitial<"">>>>>;
11
- createdAt: drizzle_orm0.NotNull<drizzle_orm0.HasDefault<drizzle_orm_pg_core0.PgTimestampBuilderInitial<"">>>;
12
- updatedAt: drizzle_orm0.HasDefault<drizzle_orm0.NotNull<drizzle_orm0.HasDefault<drizzle_orm_pg_core0.PgTimestampBuilderInitial<"">>>>;
10
+ id: drizzle_orm449.HasRuntimeDefault<drizzle_orm449.HasDefault<drizzle_orm449.IsPrimaryKey<drizzle_orm449.NotNull<drizzle_orm_pg_core1919.PgUUIDBuilderInitial<"">>>>>;
11
+ createdAt: drizzle_orm449.NotNull<drizzle_orm449.HasDefault<drizzle_orm_pg_core1919.PgTimestampBuilderInitial<"">>>;
12
+ updatedAt: drizzle_orm449.HasDefault<drizzle_orm449.NotNull<drizzle_orm449.HasDefault<drizzle_orm_pg_core1919.PgTimestampBuilderInitial<"">>>>;
13
13
  };
14
14
  //#endregion
15
15
  export { baseColumns, generateDefaultUUID };
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../../src/modules/config/db/helpers.ts"],"sourcesContent":[],"mappings":";;;;cAGa;;;;AAAA,cAKA,WALoC,EAAA;EAKpC,EAAA,gCAWZ,wBAAA,0BAAA,qBAAA,CAAA,oBAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAA,SAAA,sBAAA,wBAAA,+CAAA,CAAA,EAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"helpers.d.mts","names":[],"sources":["../../../../src/modules/config/db/helpers.ts"],"sourcesContent":[],"mappings":";;;;cAGa;;;;AAAA,cAKA,WALoC,EAAA;EAKpC,EAAA,kCAWZ,0BAAA,4BAAA,uBAAA,CAAA,uBAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAAA,SAAA,wBAAA,0BAAA,kDAAA,CAAA,EAAA,CAAA,CAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  //#region src/modules/config/lib/config.d.ts
2
- type TulipConfig<TValues> = {
2
+ type TulipConfig<TValues = object> = {
3
3
  general: {
4
4
  name: string;
5
5
  shortName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.mjs","names":[],"sources":["../../../../src/modules/config/lib/config.ts"],"sourcesContent":["export type TulipConfig<TValues> = {\n general: {\n name: string;\n shortName: string;\n };\n email: {\n defaultFrom: string;\n };\n} & TValues;\n\n/**\n * Build the Tulip config\n */\n\nexport const defineTulipConfig = <TValues>(config: TulipConfig<TValues>): TulipConfig<TValues> => config;\n"],"mappings":";;;;AAcA,MAAa,qBAA8B,WAAuD"}
1
+ {"version":3,"file":"config.mjs","names":[],"sources":["../../../../src/modules/config/lib/config.ts"],"sourcesContent":["export type TulipConfig<TValues = object> = {\n general: {\n name: string;\n shortName: string;\n };\n email: {\n defaultFrom: string;\n };\n} & TValues;\n\n/**\n * Build the Tulip config\n */\n\nexport const defineTulipConfig = <TValues>(config: TulipConfig<TValues>): TulipConfig<TValues> =>\n config;\n"],"mappings":";;;;AAcA,MAAa,qBAA8B,WACzC"}
@@ -1,5 +1,5 @@
1
1
  import { TableCell } from "../table.mjs";
2
- import * as react_jsx_runtime24 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime84 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/data-tables/components/cell/common.client.d.ts
@@ -7,21 +7,21 @@ declare function TableTextCell({
7
7
  children,
8
8
  className,
9
9
  ...props
10
- }: ComponentProps<typeof TableCell>): react_jsx_runtime24.JSX.Element;
10
+ }: ComponentProps<typeof TableCell>): react_jsx_runtime84.JSX.Element;
11
11
  declare function TableNumberCell({
12
12
  children,
13
13
  className,
14
14
  ...props
15
- }: ComponentProps<typeof TableCell>): react_jsx_runtime24.JSX.Element;
15
+ }: ComponentProps<typeof TableCell>): react_jsx_runtime84.JSX.Element;
16
16
  declare function TableDateCell({
17
17
  children,
18
18
  className,
19
19
  ...props
20
- }: ComponentProps<typeof TableCell>): react_jsx_runtime24.JSX.Element;
20
+ }: ComponentProps<typeof TableCell>): react_jsx_runtime84.JSX.Element;
21
21
  declare function TableStatusCell({
22
22
  children,
23
23
  ...props
24
- }: ComponentProps<typeof TableCell>): react_jsx_runtime24.JSX.Element;
24
+ }: ComponentProps<typeof TableCell>): react_jsx_runtime84.JSX.Element;
25
25
  //#endregion
26
26
  export { TableDateCell, TableNumberCell, TableStatusCell, TableTextCell };
27
27
  //# sourceMappingURL=common.client.d.mts.map
@@ -1,5 +1,5 @@
1
1
  import { LucideIcon } from "lucide-react";
2
- import * as react_jsx_runtime28 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime88 from "react/jsx-runtime";
3
3
  import { ParserBuilder } from "nuqs";
4
4
 
5
5
  //#region src/modules/data-tables/components/filters/combobox.client.d.ts
@@ -22,7 +22,7 @@ declare function TableFilterCombobox<TValue extends string>({
22
22
  title,
23
23
  filter,
24
24
  options
25
- }: TableFilterComboboxProps<TValue>): react_jsx_runtime28.JSX.Element;
25
+ }: TableFilterComboboxProps<TValue>): react_jsx_runtime88.JSX.Element;
26
26
  //#endregion
27
27
  export { TableFilterCombobox, TableFilterComboboxOption, TableFilterComboboxProps };
28
28
  //# sourceMappingURL=combobox.client.d.mts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime29 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime89 from "react/jsx-runtime";
2
2
  import { ParserBuilder } from "nuqs";
3
3
 
4
4
  //#region src/modules/data-tables/components/filters/slider.client.d.ts
@@ -17,7 +17,7 @@ declare function TableFilterSlider({
17
17
  title,
18
18
  filter,
19
19
  options
20
- }: TableFilterSliderProps): react_jsx_runtime29.JSX.Element;
20
+ }: TableFilterSliderProps): react_jsx_runtime89.JSX.Element;
21
21
  //#endregion
22
22
  export { TableFilterSlider, TableFilterSliderProps };
23
23
  //# sourceMappingURL=slider.client.d.mts.map
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime30 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime90 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/modules/data-tables/components/search-input.client.d.ts
4
- declare function TableSearchInput(): react_jsx_runtime30.JSX.Element;
4
+ declare function TableSearchInput(): react_jsx_runtime90.JSX.Element;
5
5
  //#endregion
6
6
  export { TableSearchInput };
7
7
  //# sourceMappingURL=search-input.client.d.mts.map
@@ -1,7 +1,7 @@
1
1
  import { CommandDef } from "../../commands/lib/definitions.mjs";
2
2
  import { TableFiltersResult } from "../lib/filters/config.mjs";
3
3
  import { Selection, TableColumnDef, TableMetaInput, TableStrategy } from "../lib/types.mjs";
4
- import * as react_jsx_runtime31 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime92 from "react/jsx-runtime";
5
5
  import { Dispatch, PropsWithChildren, SetStateAction } from "react";
6
6
  import { TableOptions, VisibilityState } from "@tanstack/react-table";
7
7
 
@@ -44,7 +44,7 @@ declare function TableConfigProvider<TData extends {
44
44
  config
45
45
  }: PropsWithChildren<{
46
46
  config: CreateTableConfigInput<TData, TFilters, TMeta>;
47
- }>): react_jsx_runtime31.JSX.Element;
47
+ }>): react_jsx_runtime92.JSX.Element;
48
48
  /**
49
49
  * Create use table config hook
50
50
  */
@@ -1,5 +1,5 @@
1
- import { parseAsString, parseAsStringLiteral } from "nuqs";
2
1
  import { z as z$1 } from "zod";
2
+ import { parseAsString, parseAsStringLiteral } from "nuqs";
3
3
 
4
4
  //#region src/modules/data-tables/strategies/helpers/sorting.ts
5
5
  /**
@@ -1,11 +1,11 @@
1
1
  import { Table } from "../../../components/table.mjs";
2
- import * as react_jsx_runtime37 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime97 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/data-tables/tables/data-table/components/table.d.ts
6
6
  declare function DataTable<TData extends {
7
7
  id: string;
8
- }>(props: ComponentProps<typeof Table>): react_jsx_runtime37.JSX.Element;
8
+ }>(props: ComponentProps<typeof Table>): react_jsx_runtime97.JSX.Element;
9
9
  //#endregion
10
10
  export { DataTable };
11
11
  //# sourceMappingURL=table.d.mts.map
@@ -1,12 +1,12 @@
1
1
  import { TableCell } from "../../../../components/table.mjs";
2
- import * as react_jsx_runtime33 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime93 from "react/jsx-runtime";
3
3
  import * as React$1 from "react";
4
4
 
5
5
  //#region src/modules/data-tables/tables/inline-table/components/cells/common.d.ts
6
6
  declare function TableInlineCell({
7
7
  className,
8
8
  ...props
9
- }: React$1.ComponentProps<typeof TableCell>): react_jsx_runtime33.JSX.Element;
9
+ }: React$1.ComponentProps<typeof TableCell>): react_jsx_runtime93.JSX.Element;
10
10
  //#endregion
11
11
  export { TableInlineCell };
12
12
  //# sourceMappingURL=common.d.mts.map