@tulip-systems/core 0.5.14 → 0.5.16
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.
- package/dist/auth/client.d.mts +5 -4
- package/dist/auth/client.mjs +6 -5
- package/dist/auth.mjs +2 -2
- package/dist/components/client.d.mts +1 -3
- package/dist/components/client.mjs +3 -5
- package/dist/components/common/icons.d.mts +52 -52
- package/dist/components/common/icons.d.mts.map +1 -1
- package/dist/components/common/status.d.mts +3 -3
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/content.client.d.mts.map +1 -1
- package/dist/components/editor/components/editor.client.d.mts +6 -6
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/menu.client.d.mts +3 -3
- package/dist/components/editor/components/menu.client.d.mts.map +1 -1
- package/dist/components/editor/lib/constants.d.mts +27 -27
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/back-button.client.d.mts.map +1 -1
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/bottom-bar.client.d.mts.map +1 -1
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/breadcrumbs.client.d.mts.map +1 -1
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/header.client.d.mts.map +1 -1
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts.map +1 -1
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/header/top-bar.client.d.mts.map +1 -1
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-content.client.d.mts.map +1 -1
- package/dist/components/layouts/admin-error-pages.d.mts +4 -4
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts.map +1 -1
- package/dist/components/layouts/admin-layout.mjs +1 -1
- package/dist/components/layouts/admin-layout.mjs.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/error-page.d.mts +9 -9
- package/dist/components/layouts/error-page.d.mts.map +1 -1
- package/dist/components/layouts/error-sections.d.mts +5 -5
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/providers.client.d.mts.map +1 -1
- package/dist/components/layouts/root-error-pages.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +4 -4
- package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
- package/dist/components/layouts/root-loading.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-header.client.mjs +3 -2
- package/dist/components/navigation/admin-sidebar-header.client.mjs.map +1 -1
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts.map +1 -1
- package/dist/components/ui/accordion.d.mts +5 -5
- package/dist/components/ui/alert-dialog.d.mts +12 -12
- package/dist/components/ui/alert.d.mts +6 -6
- package/dist/components/ui/aspect-ratio.d.mts +2 -2
- package/dist/components/ui/avatar.client.d.mts +4 -4
- package/dist/components/ui/avatar.client.d.mts.map +1 -1
- package/dist/components/ui/badge.d.mts +5 -5
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +5 -5
- package/dist/components/ui/calendar.d.mts +3 -3
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/chart.client.d.mts.map +1 -1
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/collapsible.client.d.mts.map +1 -1
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/color-picker.client.d.mts.map +1 -1
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts.map +1 -1
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/context-menu.d.mts +16 -16
- package/dist/components/ui/date-picker.client.d.mts +2 -2
- package/dist/components/ui/date-picker.client.d.mts.map +1 -1
- package/dist/components/ui/dialog.client.d.mts +11 -11
- package/dist/components/ui/dialog.client.d.mts.map +1 -1
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/form.client.d.mts.map +1 -1
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/hover-card.client.d.mts.map +1 -1
- package/dist/components/ui/input-date-time.d.mts +23 -0
- package/dist/components/ui/input-date-time.d.mts.map +1 -0
- package/dist/components/ui/input-date-time.mjs +34 -0
- package/dist/components/ui/input-date-time.mjs.map +1 -0
- package/dist/components/ui/input-date.d.mts +14 -0
- package/dist/components/ui/input-date.d.mts.map +1 -0
- package/dist/components/ui/input-date.mjs +16 -0
- package/dist/components/ui/input-date.mjs.map +1 -0
- package/dist/components/ui/input-recipient.d.mts +2 -2
- package/dist/components/ui/input-time.d.mts +14 -0
- package/dist/components/ui/input-time.d.mts.map +1 -0
- package/dist/components/ui/input-time.mjs +16 -0
- package/dist/components/ui/input-time.mjs.map +1 -0
- package/dist/components/ui/input.d.mts +2 -2
- package/dist/components/ui/label.d.mts +2 -2
- package/dist/components/ui/navigation-menu.d.mts +11 -11
- package/dist/components/ui/pagination.d.mts +8 -8
- package/dist/components/ui/popover.d.mts +5 -5
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/progress.client.d.mts.map +1 -1
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/resizable.client.d.mts.map +1 -1
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/select.client.d.mts.map +1 -1
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sheet.client.d.mts.map +1 -1
- package/dist/components/ui/sidebar.client.d.mts +26 -26
- package/dist/components/ui/sidebar.client.d.mts.map +1 -1
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/slider.d.mts +2 -2
- package/dist/components/ui/sonner.client.d.mts +2 -2
- package/dist/components/ui/sonner.client.mjs +1 -1
- package/dist/components/ui/switch.d.mts +2 -2
- package/dist/components/ui/tabs.d.mts +5 -5
- package/dist/components/ui/textarea.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +4 -4
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components.d.mts +4 -1
- package/dist/components.mjs +6 -3
- package/dist/inline-edit/client.d.mts +3 -1
- package/dist/inline-edit/client.mjs +3 -1
- package/dist/lib/client.mjs +1 -1
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.mjs +2 -3
- package/dist/modules/auth/components/allowed.client.mjs.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
- package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.mts +2 -2
- package/dist/modules/auth/components/auth-loading.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/create-first-user-page.client.mjs +4 -3
- package/dist/modules/auth/components/create-first-user-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/forget-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +3 -2
- package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.mjs +1 -0
- package/dist/modules/auth/components/guard.server.mjs.map +1 -1
- package/dist/modules/auth/components/login-page.client.d.mts +2 -2
- package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/login-page.client.mjs +4 -3
- package/dist/modules/auth/components/login-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.mjs +4 -3
- package/dist/modules/auth/components/reset-password-page.client.mjs.map +1 -1
- package/dist/modules/auth/components/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
- package/dist/modules/auth/components/update-password-command.mjs +1 -1
- package/dist/modules/auth/db/schema.d.mts +73 -73
- package/dist/modules/auth/db/schema.d.mts.map +1 -1
- package/dist/modules/auth/handler/{client.client.d.mts → create-client.client.d.mts} +328 -188
- package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -0
- package/dist/modules/auth/handler/create-client.client.mjs +26 -0
- package/dist/modules/auth/handler/create-client.client.mjs.map +1 -0
- package/dist/modules/auth/handler/init.d.mts +116 -130
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-auth-client.d.mts +24 -0
- package/dist/modules/auth/hooks/use-auth-client.d.mts.map +1 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs +31 -0
- package/dist/modules/auth/hooks/use-auth-client.mjs.map +1 -0
- package/dist/modules/auth/hooks/use-permission.d.mts +8 -35
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +47 -93
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +5 -119
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-session.mjs +15 -17
- package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +2 -2
- package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
- package/dist/modules/auth/lib/helpers.server.mjs +1 -1
- package/dist/modules/auth/lib/validators.d.mts +2 -2
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
- package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +12 -12
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-menu.client.mjs.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs +1 -1
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
- package/dist/modules/config/db/helpers.d.mts +5 -5
- package/dist/modules/config/db/helpers.d.mts.map +1 -1
- package/dist/modules/config/lib/config.d.mts +1 -1
- package/dist/modules/config/lib/config.mjs.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/cell/common.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/column-header.d.mts +2 -2
- package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/header.d.mts +4 -4
- package/dist/modules/data-tables/components/header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/layout.d.mts +2 -2
- package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
- package/dist/modules/data-tables/components/table.d.mts +7 -7
- package/dist/modules/data-tables/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/strategies/helpers/sorting.mjs +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-time.client.d.mts +21 -0
- package/dist/modules/inline-edit/components/date-time.client.d.mts.map +1 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs +33 -0
- package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -0
- package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +15 -2
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs +2 -6
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +6 -6
- package/dist/modules/router/handler/init.server.d.mts.map +1 -1
- package/dist/modules/router/lib/query-client.server.d.mts +2 -2
- package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +5 -5
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.mjs +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +2 -2
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +1 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -1
- package/dist/modules/storage/lib/proxy.server.mjs +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +2359 -2359
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +1 -1
- package/dist/modules/storage/lib/schema.d.mts +92 -92
- package/dist/modules/storage/lib/service.server.d.mts +24 -24
- package/dist/modules/storage/lib/service.server.mjs +1 -1
- package/dist/modules/storage/lib/validators.d.mts +90 -90
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/package.json +3 -10
- package/src/components/entry.client.ts +0 -2
- package/src/components/entry.ts +3 -0
- package/src/components/layouts/admin-layout.tsx +1 -3
- package/src/components/navigation/admin-sidebar-header.client.tsx +3 -20
- package/src/components/ui/input-date-time.tsx +58 -0
- package/src/components/ui/input-date.tsx +20 -0
- package/src/components/ui/input-time.tsx +20 -0
- package/src/modules/auth/components/allowed.client.tsx +2 -2
- package/src/modules/auth/components/create-first-user-page.client.tsx +3 -2
- package/src/modules/auth/components/forget-password-page.client.tsx +2 -1
- package/src/modules/auth/components/guard.server.tsx +2 -0
- package/src/modules/auth/components/login-page.client.tsx +2 -1
- package/src/modules/auth/components/reset-password-page.client.tsx +3 -1
- package/src/modules/auth/entry.client.ts +13 -1
- package/src/modules/auth/entry.ts +11 -0
- package/src/modules/auth/handler/create-client.client.ts +53 -0
- package/src/modules/auth/hooks/use-auth-client.tsx +38 -0
- package/src/modules/auth/hooks/use-permission.ts +49 -94
- package/src/modules/auth/hooks/use-session.ts +16 -16
- package/src/modules/commands/hooks/use-command-menu.client.tsx +0 -6
- package/src/modules/config/lib/config.ts +3 -2
- package/src/modules/inline-edit/components/date-time.client.tsx +38 -0
- package/src/modules/inline-edit/entry.client.ts +9 -0
- package/src/modules/inline-edit/entry.server.ts +3 -0
- package/src/modules/inline-edit/entry.ts +3 -0
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +1 -1
- package/dist/components/ui/time-input.client.d.mts +0 -16
- package/dist/components/ui/time-input.client.d.mts.map +0 -1
- package/dist/components/ui/time-input.client.mjs +0 -53
- package/dist/components/ui/time-input.client.mjs.map +0 -1
- package/dist/components/ui/time-picker-input.client.d.mts +0 -15
- package/dist/components/ui/time-picker-input.client.d.mts.map +0 -1
- package/dist/components/ui/time-picker-input.client.mjs +0 -64
- package/dist/components/ui/time-picker-input.client.mjs.map +0 -1
- package/dist/lib/utils/time-picker.d.mts +0 -6
- package/dist/lib/utils/time-picker.d.mts.map +0 -1
- package/dist/lib/utils/time-picker.mjs +0 -104
- package/dist/lib/utils/time-picker.mjs.map +0 -1
- package/dist/modules/auth/handler/client.client.d.mts.map +0 -1
- package/dist/modules/auth/handler/client.client.mjs +0 -21
- package/dist/modules/auth/handler/client.client.mjs.map +0 -1
- package/src/components/ui/time-input.client.tsx +0 -56
- package/src/components/ui/time-picker-input.client.tsx +0 -107
- package/src/modules/auth/components/guard.client.tsx +0 -12
- package/src/modules/auth/handler/client.client.ts +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-toggle.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/input-toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KASK,iEAAiE,KACpE,sBAAsB,kBAGtB,6BAA6B;iBAEf;;;;;;;;;GASb,6BAA6B,YAAS,
|
|
1
|
+
{"version":3,"file":"input-toggle.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/input-toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;;KASK,iEAAiE,KACpE,sBAAsB,kBAGtB,6BAA6B;iBAEf;;;;;;;;;GASb,6BAA6B,YAAS,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Input } from "../../../components/ui/input.mjs";
|
|
2
2
|
import { useInlineEditOptions } from "../hooks/use-inline.client.mjs";
|
|
3
3
|
import { InlineEditVariantsProps } from "../lib/variants.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
5
5
|
import { ComponentProps } from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/inline-edit/components/input.client.d.ts
|
|
@@ -19,7 +19,7 @@ declare function InlineStringInput<Required extends boolean = false>({
|
|
|
19
19
|
isRequired,
|
|
20
20
|
disabled,
|
|
21
21
|
...props
|
|
22
|
-
}: InlineEditInputProps<string, Required>):
|
|
22
|
+
}: InlineEditInputProps<string, Required>): react_jsx_runtime14.JSX.Element;
|
|
23
23
|
declare function InlineNumberInput<Required extends boolean = false>({
|
|
24
24
|
initialValue,
|
|
25
25
|
action,
|
|
@@ -30,7 +30,7 @@ declare function InlineNumberInput<Required extends boolean = false>({
|
|
|
30
30
|
isRequired,
|
|
31
31
|
disabled,
|
|
32
32
|
...props
|
|
33
|
-
}: InlineEditInputProps<number, Required>):
|
|
33
|
+
}: InlineEditInputProps<number, Required>): react_jsx_runtime14.JSX.Element;
|
|
34
34
|
/**
|
|
35
35
|
* The inline edit decimal input component.
|
|
36
36
|
*/
|
|
@@ -44,7 +44,7 @@ declare function InlineDecimalInput({
|
|
|
44
44
|
isRequired,
|
|
45
45
|
disabled,
|
|
46
46
|
...props
|
|
47
|
-
}: InlineEditInputProps<string>):
|
|
47
|
+
}: InlineEditInputProps<string>): react_jsx_runtime14.JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { InlineDecimalInput, InlineNumberInput, InlineStringInput };
|
|
50
50
|
//# sourceMappingURL=input.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAQK,iEAAiE,KACpE,sBAAsB,kBAGtB,qBAAqB,QAAQ,YAC7B;;;AAP4E;AAGtD,iBASR,iBATQ,CAAA,iBAAA,OAAA,GAAA,KAAA,CAAA,CAAA;EAAA,YAAA;EAAA,MAAA;EAAA,OAAA;EAAA,SAAA;EAAA,UAAA;EAAA,cAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAmBrB,oBAnBqB,CAAA,MAAA,EAmBQ,QAnBR,CAAA,CAAA,EAmBiB,
|
|
1
|
+
{"version":3,"file":"input.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/input.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAQK,iEAAiE,KACpE,sBAAsB,kBAGtB,qBAAqB,QAAQ,YAC7B;;;AAP4E;AAGtD,iBASR,iBATQ,CAAA,iBAAA,OAAA,GAAA,KAAA,CAAA,CAAA;EAAA,YAAA;EAAA,MAAA;EAAA,OAAA;EAAA,SAAA;EAAA,UAAA;EAAA,cAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAmBrB,oBAnBqB,CAAA,MAAA,EAmBQ,QAnBR,CAAA,CAAA,EAmBiB,mBAAA,CAAA,GAAA,CAAA,OAnBjB;AAAtB,iBAmDc,iBAnDd,CAAA,iBAAA,OAAA,GAAA,KAAA,CAAA,CAAA;EAAA,YAAA;EAAA,MAAA;EAAA,OAAA;EAAA,SAAA;EAAA,UAAA;EAAA,cAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA6DC,oBA7DD,CAAA,MAAA,EA6D8B,QA7D9B,CAAA,CAAA,EA6DuC,mBAAA,CAAA,GAAA,CAAA,OA7DvC;;;;AAGA,iBAuFc,kBAAA,CAvFd;EAAA,YAAA;EAAA,MAAA;EAAA,OAAA;EAAA,SAAA;EAAA,UAAA;EAAA,cAAA;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAiGC,oBAjGD,CAAA,MAAA,CAAA,CAAA,EAiG6B,mBAAA,CAAA,GAAA,CAAA,OAjG7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.mjs";
|
|
2
2
|
import { InlineEditVariantsProps } from "../lib/variants.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
4
4
|
import { SelectContentProps, SelectItemProps, SelectProps, SelectTriggerProps, SelectValueProps } from "@radix-ui/react-select";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/inline-edit/components/select.client.d.ts
|
|
@@ -12,19 +12,19 @@ declare function InlineSelect<Required extends boolean = false>({
|
|
|
12
12
|
isRequired,
|
|
13
13
|
disabled,
|
|
14
14
|
...props
|
|
15
|
-
}: SelectProps & useInlineEditOptions<string, Required>):
|
|
15
|
+
}: SelectProps & useInlineEditOptions<string, Required>): react_jsx_runtime17.JSX.Element;
|
|
16
16
|
type InlineSelectTriggerProps = SelectTriggerProps;
|
|
17
17
|
declare function InlineSelectTrigger({
|
|
18
18
|
variant,
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
|
-
}: InlineSelectTriggerProps & InlineEditVariantsProps):
|
|
21
|
+
}: InlineSelectTriggerProps & InlineEditVariantsProps): react_jsx_runtime17.JSX.Element;
|
|
22
22
|
type InlineSelectContentProps = SelectContentProps;
|
|
23
|
-
declare function InlineSelectContent(props: InlineSelectContentProps):
|
|
23
|
+
declare function InlineSelectContent(props: InlineSelectContentProps): react_jsx_runtime17.JSX.Element;
|
|
24
24
|
type InlineSelectValueProps = SelectValueProps;
|
|
25
|
-
declare function InlineSelectValue(props: InlineSelectValueProps):
|
|
25
|
+
declare function InlineSelectValue(props: InlineSelectValueProps): react_jsx_runtime17.JSX.Element;
|
|
26
26
|
type InlineSelectItenProps = SelectItemProps;
|
|
27
|
-
declare function InlineSelectItem(props: InlineSelectItenProps):
|
|
27
|
+
declare function InlineSelectItem(props: InlineSelectItenProps): react_jsx_runtime17.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { InlineSelect, InlineSelectContent, InlineSelectContentProps, InlineSelectItem, InlineSelectItenProps, InlineSelectTrigger, InlineSelectTriggerProps, InlineSelectValue, InlineSelectValueProps };
|
|
30
30
|
//# sourceMappingURL=select.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/select.client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAqBgB;;;;;;;;GAQb,cAAc,6BAA6B,YAAS,
|
|
1
|
+
{"version":3,"file":"select.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/select.client.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAqBgB;;;;;;;;GAQb,cAAc,6BAA6B,YAAS,mBAAA,CAAA,GAAA,CAAA;KAsB3C,wBAAA,GAA2B;iBAEvB,mBAAA;;;;GAIb,2BAA2B,0BAAuB,mBAAA,CAAA,GAAA,CAAA;AApCrC,KA4CJ,wBAAA,GAA2B,kBA5CX;AAC1B,iBA6Cc,mBAAA,CA7Cd,KAAA,EA6CyC,wBA7CzC,CAAA,EA6CiE,mBAAA,CAAA,GAAA,CAAA,OA7CjE;AACA,KAgDU,sBAAA,GAAyB,gBAhDnC;AACA,iBAiDc,iBAAA,CAjDd,KAAA,EAiDuC,sBAjDvC,CAAA,EAiD6D,mBAAA,CAAA,GAAA,CAAA,OAjD7D;AACA,KAoDU,qBAAA,GAAwB,eApDlC;AACA,iBAqDc,gBAAA,CArDd,KAAA,EAqDsC,qBArDtC,CAAA,EAqD2D,mBAAA,CAAA,GAAA,CAAA,OArD3D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
3
|
import { SwitchProps } from "@radix-ui/react-switch";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/switch.client.d.ts
|
|
@@ -11,7 +11,7 @@ declare function InlineSwitch<Required extends boolean = false>({
|
|
|
11
11
|
isRequired,
|
|
12
12
|
disabled,
|
|
13
13
|
...props
|
|
14
|
-
}: SwitchProps & useInlineEditOptions<boolean, Required>):
|
|
14
|
+
}: SwitchProps & useInlineEditOptions<boolean, Required>): react_jsx_runtime22.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { InlineSwitch };
|
|
17
17
|
//# sourceMappingURL=switch.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/switch.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAMgB;;;;;;;;GAQb,cAAc,8BAA8B,YAAS,
|
|
1
|
+
{"version":3,"file":"switch.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/switch.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAMgB;;;;;;;;GAQb,cAAc,8BAA8B,YAAS,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useInlineEditOptions } from "../hooks/use-inline.client.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/components/toggle.client.d.ts
|
|
@@ -13,7 +13,7 @@ declare function InlineToggle<Required extends boolean = false>({
|
|
|
13
13
|
isRequired,
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: InlineEditToggleProps<Required>):
|
|
16
|
+
}: InlineEditToggleProps<Required>): react_jsx_runtime23.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { InlineEditToggleProps, InlineToggle };
|
|
19
19
|
//# sourceMappingURL=toggle.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,0DACV,KAAA,CAAM,eAAe,kBAAkB,8BAA8B;iBAEvD;;;;;;;;;GASb,sBAAsB,YAAS,
|
|
1
|
+
{"version":3,"file":"toggle.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/components/toggle.client.tsx"],"sourcesContent":[],"mappings":";;;;;KAOY,0DACV,KAAA,CAAM,eAAe,kBAAkB,8BAA8B;iBAEvD;;;;;;;;;GASb,sBAAsB,YAAS,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Permission } from "../../auth/lib/permissions.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/inline-edit/hooks/context.client.d.ts
|
|
@@ -22,7 +22,7 @@ declare function InlineEditProvider({
|
|
|
22
22
|
...value
|
|
23
23
|
}: InlineEditContextParams & {
|
|
24
24
|
children: React.ReactNode;
|
|
25
|
-
}):
|
|
25
|
+
}): react_jsx_runtime24.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { InlineEditContextParams, InlineEditProvider, useInlineEditContext };
|
|
28
28
|
//# sourceMappingURL=context.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/hooks/context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQY,KAAA,uBAAA,GAAuB;EAMnB,EAAA,EAAA,MAAA;EASA,UAAA,CAAA,EAfiD,UAe/B;CAChC;;;;AAEwD,iBAZ1C,oBAAA,CAAA,CAY0C,EAZtB,uBAYsB;;;;iBAH1C,kBAAA;;;GAGb;YAAsC,KAAA,CAAM;IAAW,
|
|
1
|
+
{"version":3,"file":"context.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/hooks/context.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQY,KAAA,uBAAA,GAAuB;EAMnB,EAAA,EAAA,MAAA;EASA,UAAA,CAAA,EAfiD,UAe/B;CAChC;;;;AAEwD,iBAZ1C,oBAAA,CAAA,CAY0C,EAZtB,uBAYsB;;;;iBAH1C,kBAAA;;;GAGb;YAAsC,KAAA,CAAM;IAAW,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EditorJSONContent } from "../../../components/editor/lib/types.mjs";
|
|
1
2
|
import { Permission } from "../../auth/lib/permissions.mjs";
|
|
2
3
|
import "../../../components.mjs";
|
|
4
|
+
import { IndicatorStatus } from "../../../lib/hooks/use-indicator.mjs";
|
|
3
5
|
import "../../../lib/client.mjs";
|
|
4
|
-
import "react";
|
|
6
|
+
import * as react0 from "react";
|
|
5
7
|
|
|
6
8
|
//#region src/modules/inline-edit/hooks/use-inline.client.d.ts
|
|
7
9
|
type UpdateStrategy = {
|
|
@@ -43,6 +45,17 @@ type useInlineEditOptions<TValue, Required extends boolean = false> = {
|
|
|
43
45
|
*/
|
|
44
46
|
isRequired?: Required;
|
|
45
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Use the inline edit hook.
|
|
50
|
+
*/
|
|
51
|
+
declare function useInlineEdit<TValue extends string | number | Date | boolean | JSON | EditorJSONContent, Required extends boolean = false>(props: useInlineEditOptions<TValue, Required>): {
|
|
52
|
+
value: MaybeValue<TValue, Required> | undefined;
|
|
53
|
+
setValue: react0.Dispatch<react0.SetStateAction<MaybeValue<TValue, Required> | undefined>>;
|
|
54
|
+
handleChange: (next: MaybeValue<TValue, Required> | null) => void;
|
|
55
|
+
handleBlur: (next: MaybeValue<TValue, Required> | null) => void;
|
|
56
|
+
status: IndicatorStatus;
|
|
57
|
+
isAllowed: boolean;
|
|
58
|
+
};
|
|
46
59
|
//#endregion
|
|
47
|
-
export { useInlineEditOptions };
|
|
60
|
+
export { useInlineEdit, useInlineEditOptions };
|
|
48
61
|
//# sourceMappingURL=use-inline.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-inline.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-inline.client.d.mts","names":[],"sources":["../../../../src/modules/inline-edit/hooks/use-inline.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;KAYK,cAAA;;;;;;AANuD,KAmBvD,UAbA,CAAA,MAAc,EAAA,iBAAA,OAAA,CAAA,GAaiC,QAbjC,SAAA,IAAA,GAayD,MAbzD,GAakE,MAblE,GAAA,IAAA;AAAA;;;AAakE,KAKzE,oBALyE,CAAA,MAAA,EAAA,iBAAA,OAAA,GAAA,KAAA,CAAA,GAAA;EAAM;AAK3F;;EAIoC,YAAA,CAAA,EAAnB,UAAmB,CAAR,MAAQ,EAAA,QAAA,CAAA;EAAnB;;;EAIsB,MAAA,EAAA,CAAA,KAAA,EAAA;IAAmC,EAAA,EAAA,MAAA;IAI3D,KAAA,EAJwB,UAIxB,CAJmC,MAInC,EAJ2C,QAI3C,CAAA;EAOI,CAAA,EAAA,GAXuD,OAWvD,CAAA,OAAA,CAAA;EAKJ;;AAMf;EACmC,UAAA,CAAA,EAnBpB,UAmBoB;EAAiB;;;;;;mBAZjC;;;;;eAKJ;;;;;AA0GwB,iBApGvB,aAoGuB,CAAA,eAAA,MAAA,GAAA,MAAA,GAnGJ,IAmGI,GAAA,OAAA,GAnGa,IAmGb,GAnGoB,iBAmGpB,EAAA,iBAAA,OAAA,GAAA,KAAA,CAAA,CAAA,KAAA,EAjG9B,oBAiG8B,CAjGT,MAiGS,EAjGD,QAiGC,CAAA,CAAA,EAAA;EAAQ,KAAA,YAAA,OAAA,UAAA,CAAA,GAAA,SAAA;EAAnB,QAAA,iBAAA,sBAAA,WAAA,OAAA,UAAA,CAAA,GAAA,SAAA,CAAA,CAAA;EAAU,YAAA,EAAA,CAAA,IAAA,EAtBR,UAsBQ,CAtBG,MAsBH,EAtBW,QAsBX,CAAA,GAAA,IAAA,EAAA,GAAA,IAAA;qBAAV,WAAW,QAAQ;UAAT"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useLocalIndicator } from "../../../lib/hooks/use-indicator.mjs";
|
|
4
|
-
import { useAction } from "../../../lib/hooks/use-action.mjs";
|
|
5
4
|
import { usePermission } from "../../auth/hooks/use-permission.mjs";
|
|
5
|
+
import { useAction } from "../../../lib/hooks/use-action.mjs";
|
|
6
6
|
import { useInlineEditContext } from "./context.client.mjs";
|
|
7
7
|
import { useCallback, useState } from "react";
|
|
8
8
|
import { toast } from "sonner";
|
|
@@ -31,11 +31,7 @@ function useInlineEdit(props) {
|
|
|
31
31
|
* The indicator status.
|
|
32
32
|
*/
|
|
33
33
|
const { status, setStatus } = useLocalIndicator();
|
|
34
|
-
|
|
35
|
-
* Permission guard
|
|
36
|
-
*/
|
|
37
|
-
const { data } = usePermission(props.permission ?? context.permission ?? {});
|
|
38
|
-
const isAllowed = data?.success;
|
|
34
|
+
const isAllowed = usePermission(props.permission ?? context.permission ?? {})?.success;
|
|
39
35
|
/**
|
|
40
36
|
* Execute the action to update the value.
|
|
41
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;CAMjD,MAAM,YADO,cAAc,MAAM,cAAc,QAAQ,cAAc,EAAE,CAAC,EAChD;;;;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"}
|
|
@@ -7,20 +7,20 @@ import { StorageService } from "../../storage/lib/service.server.mjs";
|
|
|
7
7
|
import { AuthClient } from "../../auth/handler/init.mjs";
|
|
8
8
|
import "../../../auth/server.mjs";
|
|
9
9
|
import { ProtectedRPCContext, RPCContext } from "./context.server.mjs";
|
|
10
|
-
import * as
|
|
10
|
+
import * as _orpc_server29 from "@orpc/server";
|
|
11
11
|
import "server-cli-only";
|
|
12
12
|
import * as next_dist_server_web_spec_extension_adapters_headers0 from "next/dist/server/web/spec-extension/adapters/headers";
|
|
13
|
-
import * as
|
|
13
|
+
import * as _orpc_contract1 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:
|
|
21
|
-
protectedProcedure:
|
|
22
|
-
authMiddleware:
|
|
23
|
-
permissionMiddleware: (permission: Permission) =>
|
|
20
|
+
publicProcedure: _orpc_server29.Builder<RPCContext<TSchema> & Record<never, never>, RPCContext<TSchema>, _orpc_contract1.Schema<unknown, unknown>, _orpc_contract1.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_contract1.Schema<unknown, unknown>, _orpc_contract1.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<{
|
|
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,
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { createQueryClient } from "./query-client.mjs";
|
|
2
|
-
import * as
|
|
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
|
-
}):
|
|
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,
|
|
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
|
|
1
|
+
import * as react1 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:
|
|
12
|
+
declare const DropzoneContext: react1.Context<DropzoneContextType | undefined>;
|
|
13
13
|
/**
|
|
14
14
|
* Dropzone context hook
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropzone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone-context.client.tsx"],"sourcesContent":[],"mappings":";;;;KAKK,mBAAA;QACG;WACG;EAFN,OAAA,CAAA,EAGO,eAHY,CAAA,SAAA,CAAA;EAChB,OAAA,CAAA,EAGI,eAHJ,CAAA,SAAA,CAAA;EACG,QAAA,CAAA,EAGE,eAHF,CAAA,UAAA,CAAA;CACC;AACA,cAIC,eAJD,EAIgB,
|
|
1
|
+
{"version":3,"file":"dropzone-context.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone-context.client.tsx"],"sourcesContent":[],"mappings":";;;;KAKK,mBAAA;QACG;WACG;EAFN,OAAA,CAAA,EAGO,eAHY,CAAA,SAAA,CAAA;EAChB,OAAA,CAAA,EAGI,eAHJ,CAAA,SAAA,CAAA;EACG,QAAA,CAAA,EAGE,eAHF,CAAA,UAAA,CAAA;CACC;AACA,cAIC,eAJD,EAIgB,MAAA,CAAA,OAJhB,CAIgB,mBAJhB,GAAA,SAAA,CAAA;;;AAIZ;AAKgB,iBAAA,kBAAA,CAAA,CAAkB,EAAA,mBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as react2 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):
|
|
28
|
+
}: DropzoneProps): react_jsx_runtime0.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 |
|
|
39
|
+
}: DropzoneContentProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react2.ReactPortal | react2.ReactElement<unknown, string | react2.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.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 |
|
|
50
|
+
}: DropzoneEmptyStateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react2.ReactPortal | react2.ReactElement<unknown, string | react2.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
|
|
51
51
|
//#endregion
|
|
52
52
|
export { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps };
|
|
53
53
|
//# sourceMappingURL=dropzone.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropzone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAcY,aAAA,GAAgB,KAAK;EAArB,GAAA,CAAA,EACJ,IADI,EAAA;EAAqB,SAAA,CAAA,EAAA,MAAA;EAAL,MAAA,CAAA,EAAA,CAAA,aAAA,EAGD,IAHC,EAAA,EAAA,cAAA,EAGuB,aAHvB,EAAA,EAAA,KAAA,EAG+C,SAH/C,EAAA,GAAA,IAAA;EACpB,QAAA,CAAA,EAGK,SAHL;CAEmB;AAAwB,iBAInC,QAAA,CAJmC;EAAA,MAAA;EAAA,QAAA;EAAA,OAAA;EAAA,OAAA;EAAA,MAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAgBhD,aAhBgD,CAAA,EAgBnC,
|
|
1
|
+
{"version":3,"file":"dropzone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/dropzone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAcY,aAAA,GAAgB,KAAK;EAArB,GAAA,CAAA,EACJ,IADI,EAAA;EAAqB,SAAA,CAAA,EAAA,MAAA;EAAL,MAAA,CAAA,EAAA,CAAA,aAAA,EAGD,IAHC,EAAA,EAAA,cAAA,EAGuB,aAHvB,EAAA,EAAA,KAAA,EAG+C,SAH/C,EAAA,GAAA,IAAA;EACpB,QAAA,CAAA,EAGK,SAHL;CAEmB;AAAwB,iBAInC,QAAA,CAJmC;EAAA,MAAA;EAAA,QAAA;EAAA,OAAA;EAAA,OAAA;EAAA,MAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;EAAA,SAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAgBhD,aAhBgD,CAAA,EAgBnC,kBAAA,CAAA,GAAA,CAAA,OAhBmC;;;;AAInC,KAsDJ,oBAAA,GAtDY;EACtB,QAAA,CAAA,EAsDW,SAtDX;EACA,SAAA,CAAA,EAAA,MAAA;CACA;AACA,iBAyDc,eAAA,CAzDd;EAAA,QAAA;EAAA;AAAA,CAAA,EAyDuD,oBAzDvD,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,IAAA,GAyD2E,QAzD3E,CAyD2E,SAzD3E,CAAA,GAyD2E,OAzD3E,CAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAyD2E,MAAA,CAAA,WAAA,GAAA,MAAA,CAAA,YAzD3E,CAAA,OAAA,EAAA,MAAA,GAyD2E,MAAA,CAAA,qBAzD3E,CAAA,GAAA,CAAA,CAAA,GAyD2E,QAzD3E,CAyD2E,SAzD3E,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,GAyD2E,kBAAA,CAAA,GAAA,CAAA,OAAA,GAzD3E,IAAA;;;;AAIA,KAmFU,uBAAA,GAnFV;EACA,QAAA,CAAA,EAmFW,SAnFX;EACA,SAAA,CAAA,EAAA,MAAA;CAEC;AAAa,iBAoFA,kBAAA,CApFA;EAAA,QAAA;EAAA;AAAA,CAAA,EAoF4C,uBApF5C,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,IAAA,GAoFmE,QApFnE,CAoFmE,SApFnE,CAAA,GAoFmE,OApFnE,CAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAoFmE,MAAA,CAAA,WAAA,GAAA,MAAA,CAAA,YApFnE,CAAA,OAAA,EAAA,MAAA,GAoFmE,MAAA,CAAA,qBApFnE,CAAA,GAAA,CAAA,CAAA,GAoFmE,QApFnE,CAoFmE,SApFnE,CAAA,GAAA,IAAA,GAAA,SAAA,CAAA,GAoFmE,kBAAA,CAAA,GAAA,CAAA,OAAA,GApFnE,IAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileNode } from "../lib/validators.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/storage/components/image-grid.client.d.ts
|
|
@@ -26,8 +26,8 @@ declare function ImageGrid({
|
|
|
26
26
|
optimistic,
|
|
27
27
|
disabled,
|
|
28
28
|
...props
|
|
29
|
-
}: ImageGridProps):
|
|
30
|
-
declare function ImageGridSkeleton(props: ComponentProps<"div">):
|
|
29
|
+
}: ImageGridProps): react_jsx_runtime3.JSX.Element;
|
|
30
|
+
declare function ImageGridSkeleton(props: ComponentProps<"div">): react_jsx_runtime3.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { ImageGrid, ImageGridSkeleton };
|
|
33
33
|
//# sourceMappingURL=image-grid.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-grid.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAsC6C,KAMxC,cAAA,GAAiB,cAAH,CAAA,KAAA,CAAA,GAAA;EAAG,KAAA,EACb,QADa,EAAA;EACb,QAAA,CAAA,EAAA,OAAA;EAEyD,UAAA,EAAA,CAAA,MAAA,EAAA;IAEH,SAAA,EAAA,MAAA;IAAO,OAAA,EAAA,MAAA;EAItD,CAAA,EAAA,GANkD,OAMzC,CAAA,IAAA,CAAA;EAAG,UAAA,CAAA,EAAA;IAAO,IAAA,CAAA,EAAA,CAAA,MAAA,EAAA;MAAY,SAAA,EAAA,MAAA;MAAY,OAAA,EAAA,MAAA;IAAsB,CAAA,EAAA,GAJlB,OAIkB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAc,CAAA;CAAA;AAkK/E,iBAlKA,SAAA,CAkKiB;EAAA,KAAQ;EAAA,UAAqB;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAlKmB,cAkKnB,CAAA,EAlKiC,
|
|
1
|
+
{"version":3,"file":"image-grid.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/image-grid.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAsC6C,KAMxC,cAAA,GAAiB,cAAH,CAAA,KAAA,CAAA,GAAA;EAAG,KAAA,EACb,QADa,EAAA;EACb,QAAA,CAAA,EAAA,OAAA;EAEyD,UAAA,EAAA,CAAA,MAAA,EAAA;IAEH,SAAA,EAAA,MAAA;IAAO,OAAA,EAAA,MAAA;EAItD,CAAA,EAAA,GANkD,OAMzC,CAAA,IAAA,CAAA;EAAG,UAAA,CAAA,EAAA;IAAO,IAAA,CAAA,EAAA,CAAA,MAAA,EAAA;MAAY,SAAA,EAAA,MAAA;MAAY,OAAA,EAAA,MAAA;IAAsB,CAAA,EAAA,GAJlB,OAIkB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAc,CAAA;CAAA;AAkK/E,iBAlKA,SAAA,CAkKiB;EAAA,KAAQ;EAAA,UAAqB;EAAA,UAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAlKmB,cAkKnB,CAAA,EAlKiC,kBAAA,CAAA,GAAA,CAAA,OAkKjC;iBAA9C,iBAAA,QAAyB,wBAAqB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -7,9 +7,9 @@ import { getFileUrl, imageLoader } from "../lib/helpers.mjs";
|
|
|
7
7
|
import { Skeleton } from "../../../components/ui/skeleton.mjs";
|
|
8
8
|
import { Input } from "../../../components/ui/input.mjs";
|
|
9
9
|
import { Dialog, DialogContent, DialogTrigger } from "../../../components/ui/dialog.client.mjs";
|
|
10
|
-
import { useAction } from "../../../lib/hooks/use-action.mjs";
|
|
11
10
|
import { Card } from "../../../components/ui/card.mjs";
|
|
12
11
|
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../../../components/ui/carousel.mjs";
|
|
12
|
+
import { useAction } from "../../../lib/hooks/use-action.mjs";
|
|
13
13
|
import { useUploadZone } from "./upload-zone-context.client.mjs";
|
|
14
14
|
import { GripIcon, UploadIcon } from "lucide-react";
|
|
15
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Node, UploadFileSchema } from "../lib/validators.mjs";
|
|
2
2
|
import { UploadHooks } from "../lib/create-upload.client.mjs";
|
|
3
3
|
import { UploadZoneContextValue } from "./upload-zone-context.client.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
5
5
|
import { ComponentProps } from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/storage/components/upload-zone.client.d.ts
|
|
@@ -21,7 +21,7 @@ declare function UploadZone({
|
|
|
21
21
|
children,
|
|
22
22
|
className,
|
|
23
23
|
...props
|
|
24
|
-
}: UploadZoneProps):
|
|
24
|
+
}: UploadZoneProps): react_jsx_runtime5.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { UploadZone, UploadZoneProps };
|
|
27
27
|
//# 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":";;;;;;;KAWY,eAAA,GAAkB,wBAC5B,KAAK;aACQ,KAAK;gBACF;EAHN,iBAAA,CAAe,EAAA,CAAA,IAAA,EAKI,IALJ,EAAA,GAKa,OALb,CAAA,IAAA,CAAA,GAAA,IAAA;EAAG,cAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAMW,OANX,CAAA,IAAA,CAAA,GAAA,IAAA;CACvB;AAAL,iBAQc,UAAA,CARd;EAAA,SAAA;EAAA,UAAA;EAAA,YAAA;EAAA,WAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkBC,eAlBD,CAAA,EAkBgB,
|
|
1
|
+
{"version":3,"file":"upload-zone.client.d.mts","names":[],"sources":["../../../../src/modules/storage/components/upload-zone.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAWY,eAAA,GAAkB,wBAC5B,KAAK;aACQ,KAAK;gBACF;EAHN,iBAAA,CAAe,EAAA,CAAA,IAAA,EAKI,IALJ,EAAA,GAKa,OALb,CAAA,IAAA,CAAA,GAAA,IAAA;EAAG,cAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAMW,OANX,CAAA,IAAA,CAAA,GAAA,IAAA;CACvB;AAAL,iBAQc,UAAA,CARd;EAAA,SAAA;EAAA,UAAA;EAAA,YAAA;EAAA,WAAA;EAAA,iBAAA;EAAA,cAAA;EAAA,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkBC,eAlBD,CAAA,EAkBgB,kBAAA,CAAA,GAAA,CAAA,OAlBhB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../../lib/utils/cn.mjs";
|
|
4
|
-
import { useAction } from "../../../lib/hooks/use-action.mjs";
|
|
5
4
|
import { toast } from "../../../components/ui/sonner.client.mjs";
|
|
5
|
+
import { useAction } from "../../../lib/hooks/use-action.mjs";
|
|
6
6
|
import { UploadZoneContext } from "./upload-zone-context.client.mjs";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useCallback } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-upload.client.d.mts","names":[],"sources":["../../../../src/modules/storage/lib/create-upload.client.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAOY,KAAA,kBAAA,GAAqB,
|
|
1
|
+
{"version":3,"file":"create-upload.client.d.mts","names":[],"sources":["../../../../src/modules/storage/lib/create-upload.client.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAOY,KAAA,kBAAA,GAAqB,IAAK,CAAA,iBAAA,EAAL,IAAI,GAAA,MAAA,GAAA,MAAA,GAAA,aAAA,CAAA;AACzB,KAAA,iBAAA,GAAoB,iBAAA,GAAA;EACpB,IAAA,EADgD,IAChD;CACc;AAAsB,KADpC,WAAA,GACoC;EAC0B,aAAA,CAAA,EAAA,CAAA,KAAA,EADhD,iBACgD,EAAA,GAD1B,OAC0B,CAAA,IAAA,CAAA,GAAA,IAAA;EACC,YAAA,CAAA,EAAA,CAAA,aAAA,EAAA;IACnD,EAAA,EAAA,MAAA;IAAqB,YAAA,EAAA,MAAA;EAAO,CAAA,EAAA,GAFsB,OAEtB,CAAA,IAAA,CAAA,GAAA,IAAA;EAMxC,aAAA,CAAA,EAAY,CAAA,aAAA,EAAA;IACC,EAAA,EAAA,MAAA;IAAuB,YAAA,EAAA,MAAA;EAC9B,CAAA,EAAA,GATyD,OASzD,CAAA,IAAA,CAAA,GAAA,IAAA;EAA2B,YAAA,CAAA,EAAA,CAAA,IAAA,EARrB,gBAQqB,EAAA,GARA,OAQA,CAAA,IAAA,CAAA,GAAA,IAAA;CAAwB;;;;AAEP,KAJlD,YAAA,GAIkD;EAAR,aAAA,EAAA,CAAA,KAAA,EAH7B,kBAG6B,EAAA,GAHN,iBAGM;EAAO,MAAA,EAAA,CAAA,KAAA,EAF3C,iBAE2C,EAAA,KAAA,CAAA,EAFhB,WAEgB,EAAA,GAFA,OAEA,CAFQ,gBAER,CAAA;EAMxD,WAAA,EAAA,CAAA,GAAA,EAAA,MAAA,EAAuB,EAAA,GAPM,OAON,CAAA,IAAA,CAAA;EAEP,UAAA,EAAA,CAAA,EAAA,EAAA,MAAA,EAAA,IAAA,EARY,gBAQZ,EAAA,GARiC,OAQjC,CARyC,gBAQzC,CAAA;CAAsB;;;;KAFtC,uBAAA,GAIyC;EACF,SAAA,EAAA;IAA+B,OAAA,EAAA,CAAA,KAAA,EAHtD,iBAGsD,EAAA,GAHhC,OAGgC,CAAA;MAAR,EAAA,EAAA,MAAA;MAAO,YAAA,EAAA,MAAA;IAI1D,CAAA,CAAA;;;UANwB,QAAQ;yBACvB,qBAAqB;;;YACF;UAAuB,QAAQ;;;iBAI3D,kBAAA,QAA0B,0BAA0B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSession } from "../../auth/lib/helpers.server.mjs";
|
|
2
2
|
import { nodes } from "./schema.mjs";
|
|
3
3
|
import { getFileURLSchema } from "./validators.mjs";
|
|
4
|
-
import { eq } from "drizzle-orm";
|
|
5
4
|
import "server-cli-only";
|
|
5
|
+
import { eq } from "drizzle-orm";
|
|
6
6
|
import { connection } from "next/server";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/storage/lib/proxy.server.ts
|