@tulip-systems/core 0.5.2 → 0.5.3

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 (366) hide show
  1. package/dist/components/common/icons.d.mts +2 -2
  2. package/dist/components/common/status.d.mts +3 -3
  3. package/dist/components/editor/components/content.client.d.mts +2 -2
  4. package/dist/components/editor/components/editor.client.d.mts +2 -2
  5. package/dist/components/editor/components/editor.client.mjs +2 -2
  6. package/dist/components/editor/components/editor.client.mjs.map +1 -1
  7. package/dist/components/editor/components/menu.client.d.mts +3 -3
  8. package/dist/components/editor/components/menu.client.mjs +3 -0
  9. package/dist/components/editor/components/menu.client.mjs.map +1 -1
  10. package/dist/components/editor/extensions/file-handler/extension.d.mts +21 -0
  11. package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -0
  12. package/dist/components/editor/extensions/file-handler/extension.mjs +40 -0
  13. package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -0
  14. package/dist/components/editor/extensions/file-handler/strategy.d.mts +29 -0
  15. package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -0
  16. package/dist/components/editor/extensions/file-handler/strategy.mjs +111 -0
  17. package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -0
  18. package/dist/components/editor/extensions/file-handler/utils.mjs +50 -0
  19. package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -0
  20. package/dist/components/editor/extensions/image/extension.d.mts +8 -0
  21. package/dist/components/editor/extensions/image/extension.d.mts.map +1 -0
  22. package/dist/components/editor/extensions/image/extension.mjs +52 -0
  23. package/dist/components/editor/extensions/image/extension.mjs.map +1 -0
  24. package/dist/components/editor/extensions/skeleton/extension.mjs +41 -0
  25. package/dist/components/editor/extensions/skeleton/extension.mjs.map +1 -0
  26. package/dist/components/editor/extensions/skeleton/renderer.mjs +25 -0
  27. package/dist/components/editor/extensions/skeleton/renderer.mjs.map +1 -0
  28. package/dist/components/editor/lib/constants.d.mts +29 -26
  29. package/dist/components/editor/lib/constants.d.mts.map +1 -1
  30. package/dist/components/editor/lib/constants.mjs +14 -2
  31. package/dist/components/editor/lib/constants.mjs.map +1 -1
  32. package/dist/components/editor/lib/extensions.d.mts +5 -1
  33. package/dist/components/editor/lib/extensions.d.mts.map +1 -1
  34. package/dist/components/editor/lib/extensions.mjs.map +1 -1
  35. package/dist/components/editor/lib/variants.mjs +10 -2
  36. package/dist/components/editor/lib/variants.mjs.map +1 -1
  37. package/dist/components/header/back-button.client.d.mts +2 -2
  38. package/dist/components/header/bottom-bar.client.d.mts +3 -3
  39. package/dist/components/header/breadcrumbs.client.d.mts +7 -7
  40. package/dist/components/header/header.client.d.mts +2 -2
  41. package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
  42. package/dist/components/header/top-bar.client.d.mts +4 -4
  43. package/dist/components/layouts/admin-content.client.d.mts +2 -2
  44. package/dist/components/layouts/admin-layout.d.mts +2 -2
  45. package/dist/components/layouts/admin-layout.d.mts.map +1 -1
  46. package/dist/components/layouts/admin-loading.d.mts +2 -2
  47. package/dist/components/layouts/empty-page.d.mts +4 -4
  48. package/dist/components/layouts/list-layout.d.mts +2 -2
  49. package/dist/components/layouts/not-found-page.d.mts +3 -3
  50. package/dist/components/layouts/providers.client.d.mts +2 -2
  51. package/dist/components/layouts/root-layout.server.d.mts +2 -2
  52. package/dist/components/layouts/root-loading.d.mts +2 -2
  53. package/dist/components/layouts/tab-layout.d.mts +2 -2
  54. package/dist/components/lists/data-list.d.mts +5 -5
  55. package/dist/components/lists/data-stack.d.mts +8 -8
  56. package/dist/components/lists/data-stack.d.mts.map +1 -1
  57. package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
  58. package/dist/components/ui/accordion.d.mts +5 -5
  59. package/dist/components/ui/accordion.d.mts.map +1 -1
  60. package/dist/components/ui/alert-dialog.d.mts +12 -12
  61. package/dist/components/ui/alert-dialog.d.mts.map +1 -1
  62. package/dist/components/ui/alert.d.mts +4 -4
  63. package/dist/components/ui/alert.d.mts.map +1 -1
  64. package/dist/components/ui/aspect-ratio.d.mts +2 -2
  65. package/dist/components/ui/aspect-ratio.d.mts.map +1 -1
  66. package/dist/components/ui/avatar.client.d.mts +4 -4
  67. package/dist/components/ui/badge.d.mts +2 -2
  68. package/dist/components/ui/badge.d.mts.map +1 -1
  69. package/dist/components/ui/breadcrumb.d.mts +8 -8
  70. package/dist/components/ui/breadcrumb.d.mts.map +1 -1
  71. package/dist/components/ui/button.d.mts +2 -2
  72. package/dist/components/ui/button.d.mts.map +1 -1
  73. package/dist/components/ui/calendar.d.mts +3 -3
  74. package/dist/components/ui/calendar.d.mts.map +1 -1
  75. package/dist/components/ui/card.d.mts +7 -7
  76. package/dist/components/ui/card.d.mts.map +1 -1
  77. package/dist/components/ui/carousel.d.mts +6 -6
  78. package/dist/components/ui/carousel.d.mts.map +1 -1
  79. package/dist/components/ui/chart.client.d.mts +5 -5
  80. package/dist/components/ui/checkbox.d.mts +2 -2
  81. package/dist/components/ui/checkbox.d.mts.map +1 -1
  82. package/dist/components/ui/collapsible.client.d.mts +4 -4
  83. package/dist/components/ui/color-picker.client.d.mts +2 -2
  84. package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
  85. package/dist/components/ui/combobox.client.d.mts +2 -2
  86. package/dist/components/ui/command.d.mts +10 -10
  87. package/dist/components/ui/command.d.mts.map +1 -1
  88. package/dist/components/ui/context-menu.d.mts +16 -16
  89. package/dist/components/ui/context-menu.d.mts.map +1 -1
  90. package/dist/components/ui/date-picker.client.d.mts +2 -2
  91. package/dist/components/ui/dialog.client.d.mts +11 -11
  92. package/dist/components/ui/drawer.client.d.mts +11 -11
  93. package/dist/components/ui/dropdown-menu.d.mts +16 -16
  94. package/dist/components/ui/form.client.d.mts +7 -7
  95. package/dist/components/ui/hover-card.client.d.mts +4 -4
  96. package/dist/components/ui/input-recipient.d.mts +2 -2
  97. package/dist/components/ui/input.d.mts +2 -2
  98. package/dist/components/ui/label.d.mts +2 -2
  99. package/dist/components/ui/navigation-menu.d.mts +9 -9
  100. package/dist/components/ui/pagination.d.mts +8 -8
  101. package/dist/components/ui/popover.d.mts +5 -5
  102. package/dist/components/ui/popover.d.mts.map +1 -1
  103. package/dist/components/ui/progress.client.d.mts +2 -2
  104. package/dist/components/ui/radio-group.d.mts +3 -3
  105. package/dist/components/ui/resizable.client.d.mts +4 -4
  106. package/dist/components/ui/scroll-area.d.mts +3 -3
  107. package/dist/components/ui/select.client.d.mts +11 -11
  108. package/dist/components/ui/separator.d.mts +2 -2
  109. package/dist/components/ui/sheet.client.d.mts +9 -9
  110. package/dist/components/ui/sidebar.client.d.mts +24 -24
  111. package/dist/components/ui/skeleton.d.mts +2 -2
  112. package/dist/components/ui/slider.d.mts +2 -2
  113. package/dist/components/ui/sonner.client.d.mts +2 -2
  114. package/dist/components/ui/switch.d.mts +2 -2
  115. package/dist/components/ui/tabs.d.mts +5 -5
  116. package/dist/components/ui/textarea.d.mts +2 -2
  117. package/dist/components/ui/time-input.client.d.mts +2 -2
  118. package/dist/components/ui/toggle-group.client.d.mts +3 -3
  119. package/dist/components/ui/toggle.d.mts +2 -2
  120. package/dist/components/ui/tooltip.client.d.mts +5 -5
  121. package/dist/components.d.mts +2 -1
  122. package/dist/components.mjs +3 -2
  123. package/dist/data-tables.d.mts +2 -2
  124. package/dist/data-tables.mjs +2 -2
  125. package/dist/inline-edit/client.d.mts +2 -3
  126. package/dist/inline-edit/client.mjs +1 -2
  127. package/dist/lib/client.d.mts +2 -2
  128. package/dist/lib/client.mjs +2 -2
  129. package/dist/lib/hooks/use-action.d.mts +2 -2
  130. package/dist/lib/hooks/use-indicator.d.mts +11 -3
  131. package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
  132. package/dist/lib/hooks/use-indicator.mjs +19 -8
  133. package/dist/lib/hooks/use-indicator.mjs.map +1 -1
  134. package/dist/modules/auth/components/allowed.client.d.mts +2 -2
  135. package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
  136. package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
  137. package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
  138. package/dist/modules/auth/components/auth-loading.d.mts +2 -2
  139. package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
  140. package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
  141. package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
  142. package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
  143. package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
  144. package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
  145. package/dist/modules/auth/components/guard.server.d.mts +2 -2
  146. package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
  147. package/dist/modules/auth/components/login-page.client.d.mts +2 -2
  148. package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
  149. package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
  150. package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
  151. package/dist/modules/auth/components/update-password-command.d.mts +2 -2
  152. package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
  153. package/dist/modules/auth/db/schema.d.mts +73 -73
  154. package/dist/modules/auth/db/schema.d.mts.map +1 -1
  155. package/dist/modules/auth/handler/client.client.d.mts +6 -6
  156. package/dist/modules/auth/hooks/use-permission.d.mts +2 -2
  157. package/dist/modules/auth/hooks/use-session.d.mts +4 -4
  158. package/dist/modules/auth/lib/validators.d.mts +2 -2
  159. package/dist/modules/auth/lib/validators.d.mts.map +1 -1
  160. package/dist/modules/commands/components/alert-dialog-command.client.d.mts +10 -10
  161. package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
  162. package/dist/modules/commands/components/click-command.client.d.mts +2 -2
  163. package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
  164. package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
  165. package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
  166. package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
  167. package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
  168. package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
  169. package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
  170. package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
  171. package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
  172. package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -11
  173. package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
  174. package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
  175. package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
  176. package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
  177. package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
  178. package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
  179. package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
  180. package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
  181. package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
  182. package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
  183. package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
  184. package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
  185. package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
  186. package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
  187. package/dist/modules/config/db/helpers.d.mts +5 -5
  188. package/dist/modules/config/db/helpers.d.mts.map +1 -1
  189. package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
  190. package/dist/modules/data-tables/components/column-header.d.mts +2 -2
  191. package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
  192. package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
  193. package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
  194. package/dist/modules/data-tables/components/header.d.mts +4 -4
  195. package/dist/modules/data-tables/components/header.d.mts.map +1 -1
  196. package/dist/modules/data-tables/components/layout.d.mts +2 -2
  197. package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
  198. package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
  199. package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
  200. package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
  201. package/dist/modules/data-tables/components/table.d.mts +7 -7
  202. package/dist/modules/data-tables/components/table.d.mts.map +1 -1
  203. package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
  204. package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
  205. package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
  206. package/dist/modules/data-tables/lib/filters/parsers.d.mts +6 -1
  207. package/dist/modules/data-tables/lib/filters/parsers.d.mts.map +1 -1
  208. package/dist/modules/data-tables/lib/filters/parsers.mjs +6 -1
  209. package/dist/modules/data-tables/lib/filters/parsers.mjs.map +1 -1
  210. package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
  211. package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
  212. package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
  213. package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.mts +2 -2
  214. package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts +2 -2
  215. package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts +3 -3
  216. package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts +2 -2
  217. package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.mts +2 -2
  218. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
  219. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
  220. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +6 -4
  221. package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
  222. package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +11 -6
  223. package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
  224. package/dist/modules/inline-edit/components/combobox.client.d.mts +6 -4
  225. package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
  226. package/dist/modules/inline-edit/components/combobox.client.mjs +7 -5
  227. package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
  228. package/dist/modules/inline-edit/components/date-input.client.d.mts +5 -3
  229. package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
  230. package/dist/modules/inline-edit/components/date-input.client.mjs +26 -13
  231. package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
  232. package/dist/modules/inline-edit/components/date-picker.client.d.mts +6 -4
  233. package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
  234. package/dist/modules/inline-edit/components/date-picker.client.mjs +12 -7
  235. package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
  236. package/dist/modules/inline-edit/components/editor.client.d.mts +6 -4
  237. package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
  238. package/dist/modules/inline-edit/components/editor.client.mjs +11 -6
  239. package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
  240. package/dist/modules/inline-edit/components/input-recipient.client.d.mts +6 -4
  241. package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
  242. package/dist/modules/inline-edit/components/input-recipient.client.mjs +11 -6
  243. package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
  244. package/dist/modules/inline-edit/components/input-toggle.client.d.mts +6 -4
  245. package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
  246. package/dist/modules/inline-edit/components/input-toggle.client.mjs +9 -7
  247. package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
  248. package/dist/modules/inline-edit/components/input.client.d.mts +13 -10
  249. package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
  250. package/dist/modules/inline-edit/components/input.client.mjs +35 -19
  251. package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
  252. package/dist/modules/inline-edit/components/select.client.d.mts +10 -9
  253. package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
  254. package/dist/modules/inline-edit/components/select.client.mjs +14 -7
  255. package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
  256. package/dist/modules/inline-edit/components/switch.client.d.mts +5 -3
  257. package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
  258. package/dist/modules/inline-edit/components/switch.client.mjs +8 -6
  259. package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
  260. package/dist/modules/inline-edit/components/toggle.client.d.mts +6 -4
  261. package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
  262. package/dist/modules/inline-edit/components/toggle.client.mjs +9 -7
  263. package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
  264. package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
  265. package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
  266. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +35 -3
  267. package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
  268. package/dist/modules/inline-edit/hooks/use-inline.client.mjs +71 -9
  269. package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
  270. package/dist/modules/inline-edit/lib/variants.d.mts +1 -0
  271. package/dist/modules/inline-edit/lib/variants.d.mts.map +1 -1
  272. package/dist/modules/inline-edit/lib/variants.mjs +12 -4
  273. package/dist/modules/inline-edit/lib/variants.mjs.map +1 -1
  274. package/dist/modules/router/handler/init.server.d.mts +6 -6
  275. package/dist/modules/router/handler/init.server.d.mts.map +1 -1
  276. package/dist/modules/router/lib/query-client.server.d.mts +2 -2
  277. package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
  278. package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
  279. package/dist/modules/storage/components/dropzone.client.d.mts +5 -5
  280. package/dist/modules/storage/components/dropzone.client.mjs +1 -1
  281. package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
  282. package/dist/modules/storage/components/image-grid.client.mjs +3 -3
  283. package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
  284. package/dist/modules/storage/components/upload-zone-context.client.d.mts +3 -11
  285. package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
  286. package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
  287. package/dist/modules/storage/components/upload-zone.client.d.mts +10 -33
  288. package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
  289. package/dist/modules/storage/components/upload-zone.client.mjs +19 -93
  290. package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
  291. package/dist/modules/storage/config/filters.d.mts +1 -0
  292. package/dist/modules/storage/config/filters.d.mts.map +1 -1
  293. package/dist/modules/storage/config/filters.mjs +1 -0
  294. package/dist/modules/storage/config/filters.mjs.map +1 -1
  295. package/dist/modules/storage/lib/create-upload.client.d.mts +56 -0
  296. package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -0
  297. package/dist/modules/storage/lib/create-upload.client.mjs +98 -0
  298. package/dist/modules/storage/lib/create-upload.client.mjs.map +1 -0
  299. package/dist/modules/storage/lib/helpers.d.mts +1 -1
  300. package/dist/modules/storage/lib/router.server.d.mts +3265 -2345
  301. package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
  302. package/dist/modules/storage/lib/router.server.mjs +5 -2
  303. package/dist/modules/storage/lib/router.server.mjs.map +1 -1
  304. package/dist/modules/storage/lib/schema.d.mts +124 -90
  305. package/dist/modules/storage/lib/schema.d.mts.map +1 -1
  306. package/dist/modules/storage/lib/schema.mjs +2 -1
  307. package/dist/modules/storage/lib/schema.mjs.map +1 -1
  308. package/dist/modules/storage/lib/service.server.d.mts +31 -42
  309. package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
  310. package/dist/modules/storage/lib/service.server.mjs +5 -5
  311. package/dist/modules/storage/lib/service.server.mjs.map +1 -1
  312. package/dist/modules/storage/lib/validators.d.mts +170 -90
  313. package/dist/modules/storage/lib/validators.d.mts.map +1 -1
  314. package/dist/modules/storage/lib/validators.mjs +2 -1
  315. package/dist/modules/storage/lib/validators.mjs.map +1 -1
  316. package/dist/storage/client.d.mts +2 -1
  317. package/dist/storage/client.mjs +2 -8
  318. package/dist/storage.d.mts +2 -2
  319. package/dist/storage.mjs +1 -1
  320. package/package.json +4 -3
  321. package/src/components/editor/components/editor.client.tsx +7 -2
  322. package/src/components/editor/components/menu.client.tsx +26 -0
  323. package/src/components/editor/extensions/file-handler/extension.ts +69 -0
  324. package/src/components/editor/extensions/file-handler/strategy.ts +167 -0
  325. package/src/components/editor/extensions/file-handler/utils.ts +51 -0
  326. package/src/components/editor/extensions/image/extension.ts +57 -0
  327. package/src/components/editor/extensions/skeleton/extension.ts +35 -0
  328. package/src/components/editor/extensions/skeleton/renderer.tsx +14 -0
  329. package/src/components/editor/lib/constants.ts +16 -2
  330. package/src/components/editor/lib/extensions.ts +4 -1
  331. package/src/components/editor/lib/utils.ts +32 -0
  332. package/src/components/editor/lib/variants.ts +72 -1
  333. package/src/components/entry.ts +2 -1
  334. package/src/lib/hooks/use-indicator.tsx +27 -18
  335. package/src/modules/data-tables/lib/filters/parsers.ts +14 -0
  336. package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +21 -12
  337. package/src/modules/inline-edit/components/combobox.client.tsx +13 -6
  338. package/src/modules/inline-edit/components/date-input.client.tsx +29 -13
  339. package/src/modules/inline-edit/components/date-picker.client.tsx +13 -9
  340. package/src/modules/inline-edit/components/editor.client.tsx +14 -14
  341. package/src/modules/inline-edit/components/input-recipient.client.tsx +15 -8
  342. package/src/modules/inline-edit/components/input-toggle.client.tsx +16 -9
  343. package/src/modules/inline-edit/components/input.client.tsx +38 -24
  344. package/src/modules/inline-edit/components/select.client.tsx +16 -9
  345. package/src/modules/inline-edit/components/switch.client.tsx +10 -6
  346. package/src/modules/inline-edit/components/toggle.client.tsx +13 -9
  347. package/src/modules/inline-edit/entry.client.ts +0 -1
  348. package/src/modules/inline-edit/hooks/use-inline.client copy.tsx +97 -0
  349. package/src/modules/inline-edit/hooks/use-inline.client.tsx +139 -20
  350. package/src/modules/inline-edit/lib/variants.ts +7 -0
  351. package/src/modules/storage/components/image-grid.client.tsx +2 -2
  352. package/src/modules/storage/components/upload-zone-context.client.tsx +3 -4
  353. package/src/modules/storage/components/upload-zone.client.tsx +17 -116
  354. package/src/modules/storage/config/filters.ts +1 -0
  355. package/src/modules/storage/entry.client.ts +2 -1
  356. package/src/modules/storage/lib/create-upload.client.ts +134 -0
  357. package/src/modules/storage/lib/router.server.ts +1 -0
  358. package/src/modules/storage/lib/schema.ts +1 -0
  359. package/src/modules/storage/lib/service.server.ts +10 -4
  360. package/src/modules/storage/lib/validators.ts +1 -0
  361. package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts +0 -21
  362. package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts.map +0 -1
  363. package/dist/modules/inline-edit/components/deprecated-editor.client.mjs +0 -37
  364. package/dist/modules/inline-edit/components/deprecated-editor.client.mjs.map +0 -1
  365. package/dist/storage/client.mjs.map +0 -1
  366. package/src/modules/inline-edit/components/deprecated-editor.client.tsx +0 -48
@@ -1,51 +1,113 @@
1
1
  "use client";
2
2
 
3
+ import { useLocalIndicator } from "../../../lib/hooks/use-indicator.mjs";
3
4
  import { useAction } from "../../../lib/hooks/use-action.mjs";
4
5
  import { usePermission } from "../../auth/hooks/use-permission.mjs";
5
6
  import { useInlineEditContext } from "./context.client.mjs";
6
- import { useState } from "react";
7
+ import { useCallback, useState } from "react";
7
8
  import { toast } from "sonner";
9
+ import { useDebouncedCallback } from "use-debounce";
8
10
 
9
11
  //#region src/modules/inline-edit/hooks/use-inline.client.tsx
12
+ const defaultUpdateStrategy = { mode: "blur" };
13
+ /**
14
+ * Use the inline edit hook.
15
+ */
10
16
  function useInlineEdit(props) {
17
+ /**
18
+ * The update strategy.
19
+ */
20
+ const strategy = props.updateStrategy ?? defaultUpdateStrategy;
21
+ const delay = strategy.mode === "change" ? strategy.delay ?? 0 : 0;
11
22
  /**
12
23
  * The inline edit context.
13
24
  */
14
25
  const context = useInlineEditContext();
15
- const { data } = usePermission(props.permission ?? context.permission);
16
- const isAllowed = data?.success;
17
26
  /**
18
27
  * The current value of the inline edit.
19
28
  */
20
29
  const [value, setValue] = useState(props.initialValue);
21
30
  /**
31
+ * The indicator status.
32
+ */
33
+ const { status, setStatus } = useLocalIndicator();
34
+ /**
35
+ * Permission guard
36
+ */
37
+ const { data } = usePermission(props.permission ?? context.permission);
38
+ const isAllowed = data?.success;
39
+ /**
22
40
  * Execute the action to update the value.
23
41
  */
24
- const { mutate, status } = useAction({
42
+ const mutation = useAction({
25
43
  mutationFn: props.action,
44
+ onMutate: () => {
45
+ setStatus("pending");
46
+ },
47
+ onSuccess: () => {
48
+ setStatus("success");
49
+ },
26
50
  onError: (error) => {
27
51
  setValue(props.initialValue);
28
52
  toast.error("Er is iets misgegaan", { description: error instanceof Error ? error.message : void 0 });
29
53
  }
30
54
  });
31
55
  /**
32
- * Handle the update of the value.
56
+ * Handle instant mutate
33
57
  */
34
- const handleUpdate = (value$1) => {
58
+ const handleMutateInstant = useCallback((value$1) => {
35
59
  if (!isAllowed) {
36
60
  toast.error("Je hebt geen toestemming om dit te bewerken");
37
61
  return;
38
62
  }
39
63
  if (value$1 === props.initialValue) return;
40
- return mutate({
64
+ return mutation.mutate({
41
65
  id: context.id,
42
66
  value: value$1
43
67
  });
44
- };
68
+ }, [
69
+ isAllowed,
70
+ props.initialValue,
71
+ mutation,
72
+ context.id
73
+ ]);
74
+ /**
75
+ * Handle mutate with debounce
76
+ */
77
+ const handleMutateDebounced = useDebouncedCallback(handleMutateInstant, delay);
78
+ /**
79
+ * Handle change updates
80
+ */
81
+ function handleChange(next) {
82
+ setValue(next ?? void 0);
83
+ if (strategy.mode !== "change") return;
84
+ if (props.isRequired && next === null) {
85
+ setValue(props.initialValue ?? void 0);
86
+ setStatus("error");
87
+ toast.error("Dit veld is verplicht");
88
+ return;
89
+ }
90
+ handleMutateDebounced(next);
91
+ }
92
+ /**
93
+ * Handle blur updates
94
+ */
95
+ function handleBlur(next) {
96
+ setValue(next ?? void 0);
97
+ if (strategy.mode !== "blur") return;
98
+ if (props.isRequired && next === null) {
99
+ setValue(props.initialValue ?? void 0);
100
+ setStatus("error");
101
+ toast.error("Dit veld is verplicht");
102
+ return;
103
+ }
104
+ handleMutateInstant(next);
105
+ }
45
106
  return {
46
107
  value,
47
108
  setValue,
48
- handleUpdate,
109
+ handleChange,
110
+ handleBlur,
49
111
  status,
50
112
  isAllowed
51
113
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-inline.client.mjs","names":["value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { EditorJSONContent } from \"@/components/entry\";\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useInlineEditContext } from \"./context.client\";\n\nexport type useInlineEditOptions<TValue> = {\n initialValue?: TValue;\n action: (value: { id: string; value: TValue }) => Promise<unknown>;\n permission?: Permission;\n};\n\nexport function useInlineEdit<\n TValue extends string | number | Date | boolean | JSON | EditorJSONContent | undefined,\n>(props: useInlineEditOptions<TValue>) {\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n const { data } = usePermission(props.permission ?? context.permission);\n const isAllowed = data?.success;\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState(props.initialValue);\n\n /**\n * Execute the action to update the value.\n */\n const { mutate, status } = useAction({\n mutationFn: props.action,\n onError: (error) => {\n setValue(props.initialValue);\n toast.error(\"Er is iets misgegaan\", {\n description: error instanceof Error ? error.message : undefined,\n });\n },\n });\n\n /**\n * Handle the update of the value.\n */\n const handleUpdate = (value: TValue) => {\n if (!isAllowed) {\n toast.error(\"Je hebt geen toestemming om dit te bewerken\");\n return;\n }\n\n // If the value is the same as the initial value, do nothing\n if (value === props.initialValue) return;\n\n return mutate({ id: context.id, value });\n };\n\n return { value, setValue, handleUpdate, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAgB,cAEd,OAAqC;;;;CAIrC,MAAM,UAAU,sBAAsB;CAEtC,MAAM,EAAE,SAAS,cAAc,MAAM,cAAc,QAAQ,WAAW;CACtE,MAAM,YAAY,MAAM;;;;CAKxB,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM,aAAa;;;;CAKtD,MAAM,EAAE,QAAQ,WAAW,UAAU;EACnC,YAAY,MAAM;EAClB,UAAU,UAAU;AAClB,YAAS,MAAM,aAAa;AAC5B,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,gBAAgB,YAAkB;AACtC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIA,YAAU,MAAM,aAAc;AAElC,SAAO,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;;AAG1C,QAAO;EAAE;EAAO;EAAU;EAAc;EAAQ;EAAW"}
1
+ {"version":3,"file":"use-inline.client.mjs","names":["defaultUpdateStrategy: UpdateStrategy","value"],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { EditorJSONContent } from \"@/components/entry\";\nimport { useLocalIndicator } from \"@/lib/entry.client\";\nimport { useAction } from \"@/lib/hooks/use-action\";\nimport { usePermission } from \"@/modules/auth/hooks/use-permission\";\nimport { Permission } from \"@/modules/auth/lib/permissions\";\nimport { useCallback, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { useDebouncedCallback } from \"use-debounce\";\nimport { useInlineEditContext } from \"./context.client\";\n\ntype UpdateStrategy =\n | {\n mode: \"change\";\n delay?: number;\n }\n | {\n mode: \"blur\";\n };\n\nconst defaultUpdateStrategy: UpdateStrategy = {\n mode: \"blur\",\n};\n\ntype MaybeValue<TValue, Required extends boolean> = Required extends true ? TValue : TValue | null;\n\n/**\n * Use the inline edit hook options.\n */\nexport type useInlineEditOptions<TValue, Required extends boolean = false> = {\n /**\n * Initial value\n */\n initialValue?: MaybeValue<TValue, Required>;\n /**\n * Action to execute on update\n */\n action: (value: { id: string; value: MaybeValue<TValue, Required> }) => Promise<unknown>;\n /**\n * Permission required to edit\n */\n permission?: Permission;\n /**\n * Update strategy\n * - trigger: when to update the value (default: \"blur\")\n * - delay: delay in milliseconds before updating the value (only for \"change\" trigger)\n * @default { trigger: \"blur\" }\n */\n updateStrategy?: UpdateStrategy;\n /**\n * Is the value required\n * @default false\n */\n isRequired?: Required;\n};\n\n/**\n * Use the inline edit hook.\n */\nexport function useInlineEdit<\n TValue extends string | number | Date | boolean | JSON | EditorJSONContent,\n Required extends boolean = false,\n>(props: useInlineEditOptions<TValue, Required>) {\n /**\n * The update strategy.\n */\n const strategy = props.updateStrategy ?? defaultUpdateStrategy;\n const delay = strategy.mode === \"change\" ? (strategy.delay ?? 0) : 0;\n\n /**\n * The inline edit context.\n */\n const context = useInlineEditContext();\n\n /**\n * The current value of the inline edit.\n */\n const [value, setValue] = useState<MaybeValue<TValue, Required> | undefined>(props.initialValue);\n\n /**\n * The indicator status.\n */\n const { status, setStatus } = useLocalIndicator();\n\n /**\n * Permission guard\n */\n const { data } = usePermission(props.permission ?? context.permission);\n const isAllowed = data?.success;\n\n /**\n * Execute the action to update the value.\n */\n const mutation = useAction({\n mutationFn: props.action,\n onMutate: () => {\n setStatus(\"pending\");\n },\n onSuccess: () => {\n setStatus(\"success\");\n },\n onError: (error) => {\n setValue(props.initialValue);\n toast.error(\"Er is iets misgegaan\", {\n description: error instanceof Error ? error.message : undefined,\n });\n },\n });\n\n /**\n * Handle instant mutate\n */\n const handleMutateInstant = useCallback(\n (value: MaybeValue<TValue, Required>) => {\n // Permission guard\n if (!isAllowed) {\n toast.error(\"Je hebt geen toestemming om dit te bewerken\");\n return;\n }\n\n // If the value is the same as the initial value, do nothing\n if (value === props.initialValue) return;\n\n // Update the value\n return mutation.mutate({ id: context.id, value });\n },\n [isAllowed, props.initialValue, mutation, context.id],\n );\n\n /**\n * Handle mutate with debounce\n */\n const handleMutateDebounced = useDebouncedCallback(handleMutateInstant, delay);\n\n /**\n * Handle change updates\n */\n function handleChange(next: MaybeValue<TValue, Required> | null) {\n // Set value in state\n setValue(next ?? undefined);\n\n // If the strategy is not change, exit\n if (strategy.mode !== \"change\") return;\n\n // If it is required and the value is null or empty, reset to initial value\n if (props.isRequired && next === null) {\n setValue(props.initialValue ?? undefined);\n setStatus(\"error\");\n toast.error(\"Dit veld is verplicht\");\n return;\n }\n\n // If the strategy is change, update the value after the delay\n handleMutateDebounced(next as MaybeValue<TValue, Required>);\n }\n\n /**\n * Handle blur updates\n */\n function handleBlur(next: MaybeValue<TValue, Required> | null) {\n // Set value in state\n setValue(next ?? undefined);\n\n // If the strategy is not blur, exit\n if (strategy.mode !== \"blur\") return;\n\n // If it is required and the value is null or empty, reset to initial value\n if (props.isRequired && next === null) {\n setValue(props.initialValue ?? undefined);\n setStatus(\"error\");\n toast.error(\"Dit veld is verplicht\");\n return;\n }\n\n // If the strategy is blur, update the value\n handleMutateInstant(next as MaybeValue<TValue, Required>);\n }\n\n return { value, setValue, handleChange, handleBlur, status, isAllowed };\n}\n"],"mappings":";;;;;;;;;;;AAqBA,MAAMA,wBAAwC,EAC5C,MAAM,QACP;;;;AAqCD,SAAgB,cAGd,OAA+C;;;;CAI/C,MAAM,WAAW,MAAM,kBAAkB;CACzC,MAAM,QAAQ,SAAS,SAAS,WAAY,SAAS,SAAS,IAAK;;;;CAKnE,MAAM,UAAU,sBAAsB;;;;CAKtC,MAAM,CAAC,OAAO,YAAY,SAAmD,MAAM,aAAa;;;;CAKhG,MAAM,EAAE,QAAQ,cAAc,mBAAmB;;;;CAKjD,MAAM,EAAE,SAAS,cAAc,MAAM,cAAc,QAAQ,WAAW;CACtE,MAAM,YAAY,MAAM;;;;CAKxB,MAAM,WAAW,UAAU;EACzB,YAAY,MAAM;EAClB,gBAAgB;AACd,aAAU,UAAU;;EAEtB,iBAAiB;AACf,aAAU,UAAU;;EAEtB,UAAU,UAAU;AAClB,YAAS,MAAM,aAAa;AAC5B,SAAM,MAAM,wBAAwB,EAClC,aAAa,iBAAiB,QAAQ,MAAM,UAAU,QACvD,CAAC;;EAEL,CAAC;;;;CAKF,MAAM,sBAAsB,aACzB,YAAwC;AAEvC,MAAI,CAAC,WAAW;AACd,SAAM,MAAM,8CAA8C;AAC1D;;AAIF,MAAIC,YAAU,MAAM,aAAc;AAGlC,SAAO,SAAS,OAAO;GAAE,IAAI,QAAQ;GAAI;GAAO,CAAC;IAEnD;EAAC;EAAW,MAAM;EAAc;EAAU,QAAQ;EAAG,CACtD;;;;CAKD,MAAM,wBAAwB,qBAAqB,qBAAqB,MAAM;;;;CAK9E,SAAS,aAAa,MAA2C;AAE/D,WAAS,QAAQ,OAAU;AAG3B,MAAI,SAAS,SAAS,SAAU;AAGhC,MAAI,MAAM,cAAc,SAAS,MAAM;AACrC,YAAS,MAAM,gBAAgB,OAAU;AACzC,aAAU,QAAQ;AAClB,SAAM,MAAM,wBAAwB;AACpC;;AAIF,wBAAsB,KAAqC;;;;;CAM7D,SAAS,WAAW,MAA2C;AAE7D,WAAS,QAAQ,OAAU;AAG3B,MAAI,SAAS,SAAS,OAAQ;AAG9B,MAAI,MAAM,cAAc,SAAS,MAAM;AACrC,YAAS,MAAM,gBAAgB,OAAU;AACzC,aAAU,QAAQ;AAClB,SAAM,MAAM,wBAAwB;AACpC;;AAIF,sBAAoB,KAAqC;;AAG3D,QAAO;EAAE;EAAO;EAAU;EAAc;EAAY;EAAQ;EAAW"}
@@ -4,6 +4,7 @@ import * as class_variance_authority_types6 from "class-variance-authority/types
4
4
  //#region src/modules/inline-edit/lib/variants.d.ts
5
5
  declare const inlineEditVariants: (props?: ({
6
6
  variant?: "default" | "table" | null | undefined;
7
+ status?: "success" | "error" | "idle" | "pending" | null | undefined;
7
8
  } & class_variance_authority_types6.ClassProp) | undefined) => string;
8
9
  type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;
9
10
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":[],"mappings":";;;;cAEa;;IAWX,+BAAA,CAAA;AAXW,KAaD,uBAAA,GAA0B,YAFpC,CAAA,OAEwD,kBAFxD,CAAA"}
1
+ {"version":3,"file":"variants.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":[],"mappings":";;;;cAEa,0BAkBX;;;AAlBF,CAAA,GAkBE,+BAAA,CAAA,SAAA,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;AAEU,KAAA,uBAAA,GAA0B,YAAoB,CAAA,OAAA,kBAAR,CAAA"}
@@ -2,10 +2,18 @@ import { cva } from "class-variance-authority";
2
2
 
3
3
  //#region src/modules/inline-edit/lib/variants.ts
4
4
  const inlineEditVariants = cva("", {
5
- variants: { variant: {
6
- default: "",
7
- table: "min-h-9 px-3 py-1 text-base md:text-sm rounded-none h-full w-full border-none outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0"
8
- } },
5
+ variants: {
6
+ variant: {
7
+ default: "",
8
+ table: "min-h-9 px-3 py-1 text-base md:text-sm rounded-none h-full w-full border-none outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0"
9
+ },
10
+ status: {
11
+ idle: "",
12
+ pending: "opacity-70 animate-pulse",
13
+ success: "",
14
+ error: "border-destructive text-destructive"
15
+ }
16
+ },
9
17
  defaultVariants: { variant: "default" }
10
18
  });
11
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"variants.mjs","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\n\nexport const inlineEditVariants = cva(\"\", {\n variants: {\n variant: {\n default: \"\",\n table:\n \"min-h-9 px-3 py-1 text-base md:text-sm rounded-none h-full w-full border-none outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;\n"],"mappings":";;;AAEA,MAAa,qBAAqB,IAAI,IAAI;CACxC,UAAU,EACR,SAAS;EACP,SAAS;EACT,OACE;EACH,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CAAC"}
1
+ {"version":3,"file":"variants.mjs","names":[],"sources":["../../../../src/modules/inline-edit/lib/variants.ts"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\n\nexport const inlineEditVariants = cva(\"\", {\n variants: {\n variant: {\n default: \"\",\n table:\n \"min-h-9 px-3 py-1 text-base md:text-sm rounded-none h-full w-full border-none outline-none ring-0 focus:border-0 focus:outline-none focus:ring-0 focus:ring-offset-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0\",\n },\n status: {\n idle: \"\",\n pending: \"opacity-70 animate-pulse\",\n success: \"\",\n error: \"border-destructive text-destructive\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n // status: \"idle\",\n },\n});\n\nexport type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;\n"],"mappings":";;;AAEA,MAAa,qBAAqB,IAAI,IAAI;CACxC,UAAU;EACR,SAAS;GACP,SAAS;GACT,OACE;GACH;EACD,QAAQ;GACN,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACR;EACF;CACD,iBAAiB,EACf,SAAS,WAEV;CACF,CAAC"}
@@ -8,19 +8,19 @@ import { AuthClient } from "../../auth/handler/init.mjs";
8
8
  import "../../../auth/server.mjs";
9
9
  import { ProtectedRPCContext, RPCContext } from "./context.server.mjs";
10
10
  import "server-cli-only";
11
- import * as _orpc_server29 from "@orpc/server";
11
+ import * as _orpc_server0 from "@orpc/server";
12
12
  import * as next_dist_server_web_spec_extension_adapters_headers0 from "next/dist/server/web/spec-extension/adapters/headers";
13
- import * as _orpc_contract2 from "@orpc/contract";
13
+ import * as _orpc_contract0 from "@orpc/contract";
14
14
 
15
15
  //#region src/modules/router/handler/init.server.d.ts
16
16
  /**
17
17
  * Initialize TRPC
18
18
  */
19
19
  declare function initRPC<TSchema extends TDatabaseSchema>(): {
20
- publicProcedure: _orpc_server29.Builder<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>, _orpc_contract2.Schema<unknown, unknown>, _orpc_contract2.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
21
- protectedProcedure: _orpc_server29.BuilderWithMiddlewares<_orpc_server29.MergedInitialContext<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>>, _orpc_server29.MergedCurrentContext<RPCContext<TSchema>, ProtectedRPCContext<TSchema>>, _orpc_contract2.Schema<unknown, unknown>, _orpc_contract2.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
22
- authMiddleware: _orpc_server29.DecoratedMiddleware<RPCContext<TSchema> & Record<never, never>, ProtectedRPCContext<TSchema>, unknown, any, any, Record<never, never>>;
23
- permissionMiddleware: (permission: Permission) => _orpc_server29.DecoratedMiddleware<{
20
+ publicProcedure: _orpc_server0.Builder<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>, _orpc_contract0.Schema<unknown, unknown>, _orpc_contract0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
21
+ protectedProcedure: _orpc_server0.BuilderWithMiddlewares<_orpc_server0.MergedInitialContext<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>>, _orpc_server0.MergedCurrentContext<RPCContext<TSchema>, ProtectedRPCContext<TSchema>>, _orpc_contract0.Schema<unknown, unknown>, _orpc_contract0.Schema<unknown, unknown>, Record<never, never>, Record<never, never>>;
22
+ authMiddleware: _orpc_server0.DecoratedMiddleware<RPCContext<TSchema> & Record<never, never>, ProtectedRPCContext<TSchema>, unknown, any, any, Record<never, never>>;
23
+ permissionMiddleware: (permission: Permission) => _orpc_server0.DecoratedMiddleware<{
24
24
  session: {
25
25
  session: {
26
26
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"init.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/init.server.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;iBAWgB,wBAAwB;;;;qCAwBI,8BAAU;;;;QAxB/B,SAAA,MAAA;QAAiB,SAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwBI,SAAA,MAAA"}
1
+ {"version":3,"file":"init.server.d.mts","names":[],"sources":["../../../../src/modules/router/handler/init.server.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;iBAWgB,wBAAwB;;;;qCAwBI,6BAAU;;;;QAxB/B,SAAA,MAAA;QAAiB,SAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwBI,SAAA,MAAA"}
@@ -1,5 +1,5 @@
1
1
  import { createQueryClient } from "./query-client.mjs";
2
- import * as react_jsx_runtime157 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import "server-cli-only";
4
4
 
5
5
  //#region src/modules/router/lib/query-client.server.d.ts
@@ -12,7 +12,7 @@ declare const getQueryClient: typeof createQueryClient;
12
12
  */
13
13
  declare function HydrateClient(props: {
14
14
  children: React.ReactNode;
15
- }): react_jsx_runtime157.JSX.Element;
15
+ }): react_jsx_runtime0.JSX.Element;
16
16
  //#endregion
17
17
  export { HydrateClient, getQueryClient };
18
18
  //# sourceMappingURL=query-client.server.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-client.server.d.mts","names":[],"sources":["../../../../src/modules/router/lib/query-client.server.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASa,cAAA,cAAc,EAAA,OAAA,iBAA2B;AAKtD;;;iBAAgB,aAAA;YAAiC,KAAA,CAAM;IAAW,oBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"query-client.server.d.mts","names":[],"sources":["../../../../src/modules/router/lib/query-client.server.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASa,cAAA,cAAc,EAAA,OAAA,iBAA2B;AAKtD;;;iBAAgB,aAAA;YAAiC,KAAA,CAAM;IAAW,kBAAA,CAAA,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as react97 from "react";
1
+ import * as react98 from "react";
2
2
  import { DropzoneOptions } from "react-dropzone";
3
3
 
4
4
  //#region src/modules/storage/components/dropzone-context.client.d.ts
@@ -9,7 +9,7 @@ type DropzoneContextType = {
9
9
  minSize?: DropzoneOptions["minSize"];
10
10
  maxFiles?: DropzoneOptions["maxFiles"];
11
11
  };
12
- declare const DropzoneContext: react97.Context<DropzoneContextType | undefined>;
12
+ declare const DropzoneContext: react98.Context<DropzoneContextType | undefined>;
13
13
  /**
14
14
  * Dropzone context hook
15
15
  */
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime152 from "react/jsx-runtime";
2
- import * as react98 from "react";
1
+ import * as react_jsx_runtime240 from "react/jsx-runtime";
2
+ import * as react99 from "react";
3
3
  import { ReactNode } from "react";
4
4
  import { DropEvent, DropzoneOptions, FileRejection } from "react-dropzone";
5
5
 
@@ -25,7 +25,7 @@ declare function Dropzone({
25
25
  className,
26
26
  children,
27
27
  ...props
28
- }: DropzoneProps): react_jsx_runtime152.JSX.Element;
28
+ }: DropzoneProps): react_jsx_runtime240.JSX.Element;
29
29
  /**
30
30
  * DropzoneContent
31
31
  */
@@ -36,7 +36,7 @@ type DropzoneContentProps = {
36
36
  declare function DropzoneContent({
37
37
  children,
38
38
  className
39
- }: DropzoneContentProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react98.ReactPortal | react98.ReactElement<unknown, string | react98.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime152.JSX.Element | null;
39
+ }: DropzoneContentProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react99.ReactPortal | react99.ReactElement<unknown, string | react99.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime240.JSX.Element | null;
40
40
  /**
41
41
  * DropzoneEmptyState
42
42
  */
@@ -47,7 +47,7 @@ type DropzoneEmptyStateProps = {
47
47
  declare function DropzoneEmptyState({
48
48
  children,
49
49
  className
50
- }: DropzoneEmptyStateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react98.ReactPortal | react98.ReactElement<unknown, string | react98.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime152.JSX.Element | null;
50
+ }: DropzoneEmptyStateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react99.ReactPortal | react99.ReactElement<unknown, string | react99.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime240.JSX.Element | null;
51
51
  //#endregion
52
52
  export { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps };
53
53
  //# sourceMappingURL=dropzone.client.d.mts.map
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
  import { cn } from "../../../lib/utils/cn.mjs";
4
- import { Button } from "../../../components/ui/button.mjs";
5
4
  import { renderBytes } from "../lib/helpers.mjs";
5
+ import { Button } from "../../../components/ui/button.mjs";
6
6
  import { DropzoneContext, useDropzoneContext } from "./dropzone-context.client.mjs";
7
7
  import { UploadIcon } from "lucide-react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { FileNode } from "../lib/validators.mjs";
2
- import * as react_jsx_runtime155 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime243 from "react/jsx-runtime";
3
3
  import { ComponentProps } from "react";
4
4
 
5
5
  //#region src/modules/storage/components/image-grid.client.d.ts
@@ -19,8 +19,8 @@ declare function ImageGrid({
19
19
  moveAction,
20
20
  disabled,
21
21
  ...props
22
- }: ImageGridProps): react_jsx_runtime155.JSX.Element;
23
- declare function ImageGridSkeleton(props: ComponentProps<"div">): react_jsx_runtime155.JSX.Element;
22
+ }: ImageGridProps): react_jsx_runtime243.JSX.Element;
23
+ declare function ImageGridSkeleton(props: ComponentProps<"div">): react_jsx_runtime243.JSX.Element;
24
24
  //#endregion
25
25
  export { ImageGrid, ImageGridSkeleton };
26
26
  //# sourceMappingURL=image-grid.client.d.mts.map
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Icons } from "../../../components/common/icons.mjs";
4
4
  import { cn } from "../../../lib/utils/cn.mjs";
5
+ import { getFileUrl, imageLoader } from "../lib/helpers.mjs";
5
6
  import { Skeleton } from "../../../components/ui/skeleton.mjs";
6
7
  import { Button } from "../../../components/ui/button.mjs";
7
8
  import { Input } from "../../../components/ui/input.mjs";
@@ -10,7 +11,6 @@ import { useAction } from "../../../lib/hooks/use-action.mjs";
10
11
  import { arrayMove } from "../../../lib/utils/array-move.mjs";
11
12
  import { Card } from "../../../components/ui/card.mjs";
12
13
  import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../../../components/ui/carousel.mjs";
13
- import { getFileUrl, imageLoader } from "../lib/helpers.mjs";
14
14
  import { useUploadZone } from "./upload-zone-context.client.mjs";
15
15
  import { GripIcon, UploadIcon } from "lucide-react";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -114,7 +114,7 @@ function ImageGrid({ nodes, moveAction, disabled, ...props }) {
114
114
  });
115
115
  }
116
116
  function ImageGridItem({ node, index, setCurrent }) {
117
- const { deleteMutation } = useUploadZone();
117
+ const { uploadClient } = useUploadZone();
118
118
  const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: node.id });
119
119
  return /* @__PURE__ */ jsx(Card, {
120
120
  id: node.id,
@@ -149,7 +149,7 @@ function ImageGridItem({ node, index, setCurrent }) {
149
149
  type: "button",
150
150
  variant: "destructive",
151
151
  size: "icon",
152
- onClick: () => deleteMutation({ ids: [node.id] }),
152
+ onClick: () => uploadClient.deleteFiles([node.id]),
153
153
  className: "absolute left-2 top-2 hidden p-1 group-hover:flex",
154
154
  children: /* @__PURE__ */ jsx(Icons.trash, { className: "size-4" })
155
155
  })
@@ -1 +1 @@
1
- {"version":3,"file":"image-grid.client.mjs","names":["Image"],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselNext,\n CarouselPrevious,\n} from \"@/components/ui/carousel\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { useAction } from \"@/lib/entry.client\";\nimport { arrayMove } from \"@/lib/utils/array-move\";\nimport { cn } from \"@/lib/utils/cn\";\nimport {\n closestCenter,\n DndContext,\n DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useDroppable,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { GripIcon, UploadIcon } from \"lucide-react\";\nimport Image from \"next/image\";\nimport React, { ComponentProps } from \"react\";\nimport { getFileUrl, imageLoader } from \"../lib/helpers\";\nimport { FileNode } from \"../lib/validators\";\nimport { useUploadZone } from \"./upload-zone-context.client\";\n\n/**\n * Image Grid\n */\ntype ImageGridProps = ComponentProps<\"div\"> & {\n nodes: FileNode[];\n disabled?: boolean;\n moveAction: (params: { fromIndex: number; toIndex: number }) => Promise<void>;\n};\n\nexport function ImageGrid({ nodes, moveAction, disabled, ...props }: ImageGridProps) {\n const { onUpload, updateData, invalidateQuery } = useUploadZone();\n\n const images = nodes.flatMap((node) => ({ ...node, url: getFileUrl(node.id) }));\n\n const [current, setCurrent] = React.useState<number>(0);\n\n const { setNodeRef } = useDroppable({ id: \"image-grid\" });\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const moveMuration = useAction({\n mutationFn: async ({ active, over }: DragEndEvent) => {\n if (!moveAction) return Promise.resolve();\n\n const activeId = active.id;\n const overId = over?.id;\n if (!activeId || !overId || activeId === overId) return Promise.resolve();\n\n const fromIndex = images.findIndex((image) => image.id === activeId);\n const toIndex = images.findIndex((image) => image.id === overId);\n\n await updateData((prev) => arrayMove(prev, { fromIndex, toIndex }));\n await moveAction({ fromIndex, toIndex });\n },\n onSuccess: async () => {\n setCurrent(0);\n await invalidateQuery();\n },\n onError: (error) => {\n console.error(\"Error moving image:\", error);\n },\n });\n\n return (\n <Dialog {...props}>\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={moveMuration.mutate}\n >\n <div\n ref={setNodeRef}\n className=\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\"\n >\n <SortableContext items={images.map((image) => image.id)} strategy={rectSortingStrategy}>\n {images.map((node, index) => (\n <ImageGridItem key={node.id} node={node} index={index} setCurrent={setCurrent} />\n ))}\n\n {!disabled && (\n <label className=\"border-muted-foreground bg-muted hover:border-primary relative flex aspect-square w-full cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed\">\n <UploadIcon className=\"h-8 w-8\" />\n <Input\n type=\"file\"\n accept=\"image/jpeg, image/png, image/webp, image/gif\"\n className=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n multiple\n onChange={(e) => {\n if (!e.target.files) return;\n return Array.from(e.target.files).map(onUpload);\n }}\n />\n </label>\n )}\n </SortableContext>\n </div>\n </DndContext>\n\n <Carousel className=\"w-full\" opts={{ startIndex: current }}>\n <DialogContent className=\"border-none bg-transparent p-0 shadow-none md:max-w-[80vw] xl:max-w-[60vw]\">\n <CarouselContent className=\"md:max-h-[80vh]\">\n {images.map(({ id, url }) => (\n <CarouselItem key={id} className=\"overflow-hidden rounded-xl\">\n <Image\n src={url}\n alt=\"Image Preview\"\n width={1920}\n height={1080}\n className=\"h-full w-full rounded-xl object-contain\"\n loader={imageLoader}\n />\n </CarouselItem>\n ))}\n </CarouselContent>\n <CarouselPrevious />\n <CarouselNext />\n </DialogContent>\n </Carousel>\n </Dialog>\n );\n}\n\n/**\n * Image Grid Item\n */\ntype ImageGridItemProps = {\n node: FileNode & { url: string };\n index: number;\n setCurrent: React.Dispatch<React.SetStateAction<number>>;\n};\n\nfunction ImageGridItem({ node, index, setCurrent }: ImageGridItemProps) {\n const { deleteMutation } = useUploadZone();\n\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: node.id });\n\n return (\n <Card\n id={node.id}\n ref={setNodeRef}\n style={{\n transform: CSS.Transform.toString(transform),\n transition,\n }}\n className={cn(\"group relative aspect-square w-full\", node.isPending && \"opacity-30\")}\n >\n {!node.isPending ? (\n <>\n <DialogTrigger onClick={() => setCurrent(index)}>\n <Image\n src={node.url}\n alt=\"Image Preview\"\n width={100}\n height={100}\n className=\"bg-muted absolute inset-0 h-full w-full cursor-pointer rounded-lg object-contain\"\n loader={imageLoader}\n />\n </DialogTrigger>\n\n <Button\n {...attributes}\n {...listeners}\n type=\"button\"\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-2 top-2 hidden p-1 group-hover:flex\"\n >\n <GripIcon className=\"size-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon\"\n onClick={() => deleteMutation({ ids: [node.id] })}\n className=\"absolute left-2 top-2 hidden p-1 group-hover:flex\"\n >\n <Icons.trash className=\"size-4\" />\n </Button>\n </>\n ) : (\n <Skeleton className=\"absolute inset-0 h-full w-full rounded-lg\" />\n )}\n </Card>\n );\n}\n\nexport function ImageGridSkeleton(props: ComponentProps<\"div\">) {\n return (\n <div\n {...props}\n className={cn(\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\", props.className)}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <Skeleton key={index} className=\"aspect-square w-full rounded-lg\" />\n ))}\n </div>\n );\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"image-grid.client.mjs","names":["Image"],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icons } from \"@/components/common/icons\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport {\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselNext,\n CarouselPrevious,\n} from \"@/components/ui/carousel\";\nimport { Dialog, DialogContent, DialogTrigger } from \"@/components/ui/dialog.client\";\nimport { Input } from \"@/components/ui/input\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { useAction } from \"@/lib/entry.client\";\nimport { arrayMove } from \"@/lib/utils/array-move\";\nimport { cn } from \"@/lib/utils/cn\";\nimport {\n closestCenter,\n DndContext,\n DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useDroppable,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { GripIcon, UploadIcon } from \"lucide-react\";\nimport Image from \"next/image\";\nimport React, { ComponentProps } from \"react\";\nimport { getFileUrl, imageLoader } from \"../lib/helpers\";\nimport { FileNode } from \"../lib/validators\";\nimport { useUploadZone } from \"./upload-zone-context.client\";\n\n/**\n * Image Grid\n */\ntype ImageGridProps = ComponentProps<\"div\"> & {\n nodes: FileNode[];\n disabled?: boolean;\n moveAction: (params: { fromIndex: number; toIndex: number }) => Promise<void>;\n};\n\nexport function ImageGrid({ nodes, moveAction, disabled, ...props }: ImageGridProps) {\n const { onUpload, updateData, invalidateQuery } = useUploadZone();\n\n const images = nodes.flatMap((node) => ({ ...node, url: getFileUrl(node.id) }));\n\n const [current, setCurrent] = React.useState<number>(0);\n\n const { setNodeRef } = useDroppable({ id: \"image-grid\" });\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const moveMuration = useAction({\n mutationFn: async ({ active, over }: DragEndEvent) => {\n if (!moveAction) return Promise.resolve();\n\n const activeId = active.id;\n const overId = over?.id;\n if (!activeId || !overId || activeId === overId) return Promise.resolve();\n\n const fromIndex = images.findIndex((image) => image.id === activeId);\n const toIndex = images.findIndex((image) => image.id === overId);\n\n await updateData((prev) => arrayMove(prev, { fromIndex, toIndex }));\n await moveAction({ fromIndex, toIndex });\n },\n onSuccess: async () => {\n setCurrent(0);\n await invalidateQuery();\n },\n onError: (error) => {\n console.error(\"Error moving image:\", error);\n },\n });\n\n return (\n <Dialog {...props}>\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={moveMuration.mutate}\n >\n <div\n ref={setNodeRef}\n className=\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\"\n >\n <SortableContext items={images.map((image) => image.id)} strategy={rectSortingStrategy}>\n {images.map((node, index) => (\n <ImageGridItem key={node.id} node={node} index={index} setCurrent={setCurrent} />\n ))}\n\n {!disabled && (\n <label className=\"border-muted-foreground bg-muted hover:border-primary relative flex aspect-square w-full cursor-pointer flex-col items-center justify-center rounded-lg border border-dashed\">\n <UploadIcon className=\"h-8 w-8\" />\n <Input\n type=\"file\"\n accept=\"image/jpeg, image/png, image/webp, image/gif\"\n className=\"absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0\"\n multiple\n onChange={(e) => {\n if (!e.target.files) return;\n return Array.from(e.target.files).map(onUpload);\n }}\n />\n </label>\n )}\n </SortableContext>\n </div>\n </DndContext>\n\n <Carousel className=\"w-full\" opts={{ startIndex: current }}>\n <DialogContent className=\"border-none bg-transparent p-0 shadow-none md:max-w-[80vw] xl:max-w-[60vw]\">\n <CarouselContent className=\"md:max-h-[80vh]\">\n {images.map(({ id, url }) => (\n <CarouselItem key={id} className=\"overflow-hidden rounded-xl\">\n <Image\n src={url}\n alt=\"Image Preview\"\n width={1920}\n height={1080}\n className=\"h-full w-full rounded-xl object-contain\"\n loader={imageLoader}\n />\n </CarouselItem>\n ))}\n </CarouselContent>\n <CarouselPrevious />\n <CarouselNext />\n </DialogContent>\n </Carousel>\n </Dialog>\n );\n}\n\n/**\n * Image Grid Item\n */\ntype ImageGridItemProps = {\n node: FileNode & { url: string };\n index: number;\n setCurrent: React.Dispatch<React.SetStateAction<number>>;\n};\n\nfunction ImageGridItem({ node, index, setCurrent }: ImageGridItemProps) {\n const { uploadClient } = useUploadZone();\n\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: node.id });\n\n return (\n <Card\n id={node.id}\n ref={setNodeRef}\n style={{\n transform: CSS.Transform.toString(transform),\n transition,\n }}\n className={cn(\"group relative aspect-square w-full\", node.isPending && \"opacity-30\")}\n >\n {!node.isPending ? (\n <>\n <DialogTrigger onClick={() => setCurrent(index)}>\n <Image\n src={node.url}\n alt=\"Image Preview\"\n width={100}\n height={100}\n className=\"bg-muted absolute inset-0 h-full w-full cursor-pointer rounded-lg object-contain\"\n loader={imageLoader}\n />\n </DialogTrigger>\n\n <Button\n {...attributes}\n {...listeners}\n type=\"button\"\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-2 top-2 hidden p-1 group-hover:flex\"\n >\n <GripIcon className=\"size-4\" />\n </Button>\n\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon\"\n onClick={() => uploadClient.deleteFiles([node.id])}\n className=\"absolute left-2 top-2 hidden p-1 group-hover:flex\"\n >\n <Icons.trash className=\"size-4\" />\n </Button>\n </>\n ) : (\n <Skeleton className=\"absolute inset-0 h-full w-full rounded-lg\" />\n )}\n </Card>\n );\n}\n\nexport function ImageGridSkeleton(props: ComponentProps<\"div\">) {\n return (\n <div\n {...props}\n className={cn(\"grid grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] gap-5\", props.className)}\n >\n {Array.from({ length: 12 }).map((_, index) => (\n <Skeleton key={index} className=\"aspect-square w-full rounded-lg\" />\n ))}\n </div>\n );\n}\n"],"mappings":"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"}
@@ -1,4 +1,5 @@
1
- import { FileNode, Node, PresignFileSchema } from "../lib/validators.mjs";
1
+ import { FileNode, Node } from "../lib/validators.mjs";
2
+ import { UploadClient } from "../lib/create-upload.client.mjs";
2
3
  import React from "react";
3
4
 
4
5
  //#region src/modules/storage/components/upload-zone-context.client.d.ts
@@ -7,16 +8,7 @@ import React from "react";
7
8
  * Upload Zone Context Value
8
9
  */
9
10
  type UploadZoneContextValue = {
10
- presignMutation: (params: PresignFileSchema) => Promise<{
11
- id: string;
12
- presignedUrl: string;
13
- }>;
14
- confirmMutation: (params: {
15
- id: string;
16
- }) => Promise<Node>;
17
- deleteMutation: (params: {
18
- ids: string[];
19
- }) => Promise<unknown>;
11
+ uploadClient: UploadClient;
20
12
  updateData: (newValue: FileNode[] | ((oldValue: FileNode[]) => FileNode[])) => Promise<void>;
21
13
  invalidateQuery: () => Promise<void> | void;
22
14
  onUpload: (file: File) => Promise<Node>;
@@ -1 +1 @@
1
- {"version":3,"file":"upload-zone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAQA;AAC4B,KADhB,sBAAA,GACgB;EAAsB,eAAA,EAAA,CAAA,MAAA,EAAtB,iBAAsB,EAAA,GAAA,OAAA,CAAA;IACK,EAAA,EAAA,MAAA;IAAR,YAAA,EAAA,MAAA;EACE,CAAA,CAAA;EACxB,eAAA,EAAA,CAAA,MAAA,EAAA;IAAyB,EAAA,EAAA,MAAA;EAAe,CAAA,EAAA,GAFlB,OAEkB,CAFV,IAEU,CAAA;EAAgB,cAAA,EAAA,CAAA,MAAA,EAAA;IACxD,GAAA,EAAA,MAAA,EAAA;EACN,CAAA,EAAA,GAH8B,OAG9B,CAAA,OAAA,CAAA;EAAiB,UAAA,EAAA,CAAA,QAAA,EAFX,QAEW,EAAA,GAAA,CAAA,CAAA,QAAA,EAFc,QAEd,EAAA,EAAA,GAF6B,QAE7B,EAAA,CAAA,EAAA,GAF6C,OAE7C,CAAA,IAAA,CAAA;EAAR,eAAA,EAAA,GAAA,GADH,OACG,CAAA,IAAA,CAAA,GAAA,IAAA;EAAO,QAAA,EAAA,CAAA,IAAA,EAAhB,IAAgB,EAAA,GAAP,OAAO,CAAC,IAAD,CAAA;AAMnC,CAAA;AAKA;;;cALa,mBAAiB,KAAA,CAAA,QAAA;;;;iBAKd,aAAA,CAAA,GAAa"}
1
+ {"version":3,"file":"upload-zone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AASA;AACgB,KADJ,sBAAA,GACI;EACS,YAAA,EADT,YACS;EAAyB,UAAA,EAAA,CAAA,QAAA,EAAzB,QAAyB,EAAA,GAAA,CAAA,CAAA,QAAA,EAAA,QAAA,EAAA,EAAA,GAAe,QAAf,EAAA,CAAA,EAAA,GAA+B,OAA/B,CAAA,IAAA,CAAA;EAAe,eAAA,EAAA,GAAA,GACxC,OADwC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAgB,QAAA,EAAA,CAAA,IAAA,EAE9D,IAF8D,EAAA,GAErD,OAFqD,CAE7C,IAF6C,CAAA;CACxD;;;;AACU,cAMtB,iBANsB,EAML,KAAA,CAAA,OANK,CAML,sBANK,CAAA;AAMnC;AAKA;;iBAAgB,aAAA,CAAA,GAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"upload-zone-context.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { FileNode, Node, PresignFileSchema } from \"../lib/validators\";\n\n/**\n * Upload Zone Context Value\n */\nexport type UploadZoneContextValue = {\n presignMutation: (params: PresignFileSchema) => Promise<{ id: string; presignedUrl: string }>;\n confirmMutation: (params: { id: string }) => Promise<Node>;\n deleteMutation: (params: { ids: string[] }) => Promise<unknown>;\n updateData: (newValue: FileNode[] | ((oldValue: FileNode[]) => FileNode[])) => Promise<void>;\n invalidateQuery: () => Promise<void> | void;\n onUpload: (file: File) => Promise<Node>;\n};\n\n/**\n * Upload Zone Context\n */\nexport const UploadZoneContext = React.createContext({} as UploadZoneContextValue);\n\n/**\n * Upload Zone Hook\n */\nexport function useUploadZone() {\n const context = React.useContext(UploadZoneContext);\n if (!context) {\n throw new Error(\"useUploadZone must be used within an UploadZoneProvider\");\n }\n return context;\n}\n"],"mappings":";;;;;;;;AAoBA,MAAa,oBAAoB,MAAM,cAAc,EAAE,CAA2B;;;;AAKlF,SAAgB,gBAAgB;CAC9B,MAAM,UAAU,MAAM,WAAW,kBAAkB;AACnD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO"}
1
+ {"version":3,"file":"upload-zone-context.client.mjs","names":[],"sources":["../../../../src/modules/storage/components/upload-zone-context.client.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { UploadClient } from \"../lib/create-upload.client\";\nimport { FileNode, Node } from \"../lib/validators\";\n\n/**\n * Upload Zone Context Value\n */\nexport type UploadZoneContextValue = {\n uploadClient: UploadClient;\n updateData: (newValue: FileNode[] | ((oldValue: FileNode[]) => FileNode[])) => Promise<void>;\n invalidateQuery: () => Promise<void> | void;\n onUpload: (file: File) => Promise<Node>;\n};\n\n/**\n * Upload Zone Context\n */\nexport const UploadZoneContext = React.createContext({} as UploadZoneContextValue);\n\n/**\n * Upload Zone Hook\n */\nexport function useUploadZone() {\n const context = React.useContext(UploadZoneContext);\n if (!context) {\n throw new Error(\"useUploadZone must be used within an UploadZoneProvider\");\n }\n return context;\n}\n"],"mappings":";;;;;;;;AAmBA,MAAa,oBAAoB,MAAM,cAAc,EAAE,CAA2B;;;;AAKlF,SAAgB,gBAAgB;CAC9B,MAAM,UAAU,MAAM,WAAW,kBAAkB;AACnD,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO"}
@@ -1,45 +1,22 @@
1
- import { Node, PresignFileSchema, UploadFileSchema } from "../lib/validators.mjs";
2
- import * as react_jsx_runtime151 from "react/jsx-runtime";
1
+ import { Node, UploadFileSchema } from "../lib/validators.mjs";
2
+ import { UploadClient, UploadHooks } from "../lib/create-upload.client.mjs";
3
+ import * as react_jsx_runtime245 from "react/jsx-runtime";
3
4
  import { ComponentProps } from "react";
4
5
 
5
6
  //#region src/modules/storage/components/upload-zone.client.d.ts
6
7
  type UploadZoneProps = ComponentProps<"div"> & {
7
- namespace: string;
8
- parentId: string | null;
9
- options?: Pick<UploadFileSchema, "readonly" | "hidden" | "mode">;
10
8
  queryKey: readonly unknown[];
11
- presignAction: (params: PresignFileSchema) => Promise<{
12
- id: string;
13
- presignedUrl: string;
14
- }>;
15
- onPresignStarted?: (file: PresignFileSchema) => Promise<void> | void;
16
- onPresignCompleted?: (data: {
17
- id: string;
18
- presignedUrl: string;
19
- }) => Promise<void> | void;
20
- confirmAction: (params: {
21
- id: string;
22
- }) => Promise<Node>;
23
- onConfirmStarted?: (id: string) => Promise<void> | void;
24
- onConfirmCompleted?: (node: Node) => Promise<void> | void;
25
- deleteAction: (params: {
26
- ids: string[];
27
- }) => Promise<unknown>;
9
+ variables: Pick<UploadFileSchema, "namespace" | "parentId" | "mode" | "hidden" | "readonly">;
10
+ uploadClient: UploadClient;
11
+ uploadHooks?: UploadHooks;
28
12
  onUploadCompleted?: (node: Node) => Promise<void> | void;
29
13
  onUploadFailed?: (error: unknown) => Promise<void> | void;
30
14
  };
31
15
  declare function UploadZone({
32
- namespace,
33
- parentId,
34
- options,
16
+ variables,
35
17
  queryKey,
36
- presignAction,
37
- confirmAction,
38
- deleteAction,
39
- onPresignStarted,
40
- onPresignCompleted,
41
- onConfirmStarted,
42
- onConfirmCompleted,
18
+ uploadClient,
19
+ uploadHooks,
43
20
  onUploadCompleted,
44
21
  onUploadFailed,
45
22
  children,
@@ -47,7 +24,7 @@ declare function UploadZone({
47
24
  onDragOver,
48
25
  onDragLeave,
49
26
  ...props
50
- }: UploadZoneProps): react_jsx_runtime151.JSX.Element;
27
+ }: UploadZoneProps): react_jsx_runtime245.JSX.Element;
51
28
  //#endregion
52
29
  export { UploadZone, UploadZoneProps };
53
30
  //# sourceMappingURL=upload-zone.client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-zone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAYY,eAAA,GAAkB;;;EAAlB,OAAA,CAAA,EAGA,IAHA,CAGK,gBAHU,EAAA,UAAA,GAAA,QAAA,GAAA,MAAA,CAAA;EAAG,QAAA,EAAA,SAAA,OAAA,EAAA;EAGb,aAAA,EAAA,CAAA,MAAA,EAIS,iBAJT,EAAA,GAI+B,OAJ/B,CAAA;IAAL,EAAA,EAAA,MAAA;IAIc,YAAA,EAAA,MAAA;EAAsB,CAAA,CAAA;EACpB,gBAAA,CAAA,EAAA,CAAA,IAAA,EAAA,iBAAA,EAAA,GAAsB,OAAtB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAsB,kBAAA,CAAA,EAAA,CAAA,IAAA,EAAA;IACqB,EAAA,EAAA,MAAA;IAElB,YAAA,EAAA,MAAA;EAAR,CAAA,EAAA,GAF0B,OAE1B,CAAA,IAAA,CAAA,GAAA,IAAA;EACR,aAAA,EAAA,CAAA,MAAA,EAAA;IACP,EAAA,EAAA,MAAA;EAAS,CAAA,EAAA,GAFM,OAEN,CAFc,IAEd,CAAA;EAEQ,gBAAA,CAAA,EAAA,CAAA,EAAA,EAAA,MAAA,EAAA,GAHV,OAGU,CAAA,IAAA,CAAA,GAAA,IAAA;EAElB,kBAAA,CAAA,EAAA,CAAA,IAAA,EAJC,IAID,EAAA,GAJU,OAIV,CAAA,IAAA,CAAA,GAAA,IAAA;EAAS,YAAA,EAAA,CAAA,MAAA,EAAA;IACC,GAAA,EAAA,MAAA,EAAA;EAAO,CAAA,EAAA,GAHC,OAGD,CAAA,OAAA,CAAA;EAG9B,iBAAU,CAAA,EAAA,CAAA,IAAA,EAJG,IAIH,EAAA,GAJY,OAIZ,CAAA,IAAA,CAAA,GAAA,IAAA;EACxB,cAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAJqC,OAIrC,CAAA,IAAA,CAAA,GAAA,IAAA;CACA;AACA,iBAHc,UAAA,CAGd;EAAA,SAAA;EAAA,QAAA;EAAA,OAAA;EAAA,QAAA;EAAA,aAAA;EAAA,aAAA;EAAA,YAAA;EAAA,gBAAA;EAAA,kBAAA;EAAA,gBAAA;EAAA,kBAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,QAAA;EAAA,SAAA;EAAA,UAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EAgBC,eAhBD,CAAA,EAgBgB,oBAAA,CAAA,GAAA,CAAA,OAhBhB"}
1
+ {"version":3,"file":"upload-zone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KAYY,eAAA,GAAkB;;aAGjB,KAAK;EAHN,YAAA,EAII,YAJW;EAAG,WAAA,CAAA,EAKd,WALc;EAGZ,iBAAA,CAAA,EAAA,CAAA,IAAA,EAIW,IAJX,EAAA,GAIoB,OAJpB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAL,cAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAK0B,OAL1B,CAAA,IAAA,CAAA,GAAA,IAAA;CACG;AACA,iBAMA,UAAA,CANA;EAAA,SAAA;EAAA,QAAA;EAAA,YAAA;EAAA,WAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,QAAA;EAAA,SAAA;EAAA,UAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EAkBb,eAlBa,CAAA,EAkBE,oBAAA,CAAA,GAAA,CAAA,OAlBF"}