@tulip-systems/core 0.5.1 → 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.
- 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/common/status.d.mts.map +1 -1
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/editor.client.d.mts +4 -4
- package/dist/components/editor/components/editor.client.mjs +2 -2
- package/dist/components/editor/components/editor.client.mjs.map +1 -1
- package/dist/components/editor/components/menu.client.d.mts +3 -3
- package/dist/components/editor/components/menu.client.mjs +3 -0
- package/dist/components/editor/components/menu.client.mjs.map +1 -1
- package/dist/components/editor/extensions/file-handler/extension.d.mts +21 -0
- package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -0
- package/dist/components/editor/extensions/file-handler/extension.mjs +40 -0
- package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -0
- package/dist/components/editor/extensions/file-handler/strategy.d.mts +29 -0
- package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -0
- package/dist/components/editor/extensions/file-handler/strategy.mjs +111 -0
- package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -0
- package/dist/components/editor/extensions/file-handler/utils.mjs +50 -0
- package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -0
- package/dist/components/editor/extensions/image/extension.d.mts +8 -0
- package/dist/components/editor/extensions/image/extension.d.mts.map +1 -0
- package/dist/components/editor/extensions/image/extension.mjs +52 -0
- package/dist/components/editor/extensions/image/extension.mjs.map +1 -0
- package/dist/components/editor/extensions/skeleton/extension.mjs +41 -0
- package/dist/components/editor/extensions/skeleton/extension.mjs.map +1 -0
- package/dist/components/editor/extensions/skeleton/renderer.mjs +25 -0
- package/dist/components/editor/extensions/skeleton/renderer.mjs.map +1 -0
- package/dist/components/editor/lib/constants.d.mts +29 -26
- package/dist/components/editor/lib/constants.d.mts.map +1 -1
- package/dist/components/editor/lib/constants.mjs +14 -2
- package/dist/components/editor/lib/constants.mjs.map +1 -1
- package/dist/components/editor/lib/extensions.d.mts +5 -1
- package/dist/components/editor/lib/extensions.d.mts.map +1 -1
- package/dist/components/editor/lib/extensions.mjs.map +1 -1
- package/dist/components/editor/lib/variants.mjs +10 -2
- package/dist/components/editor/lib/variants.mjs.map +1 -1
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/admin-loading.d.mts.map +1 -1
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/empty-page.d.mts.map +1 -1
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/list-layout.d.mts.map +1 -1
- package/dist/components/layouts/not-found-page.d.mts +3 -3
- package/dist/components/layouts/not-found-page.d.mts.map +1 -1
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +2 -2
- 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/root-loading.d.mts.map +1 -1
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts.map +1 -1
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-list.d.mts.map +1 -1
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- 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/badge.d.mts +4 -4
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/breadcrumb.d.mts.map +1 -1
- package/dist/components/ui/button.d.mts +5 -5
- package/dist/components/ui/button.d.mts.map +1 -1
- package/dist/components/ui/calendar.d.mts +3 -3
- package/dist/components/ui/calendar.d.mts.map +1 -1
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/card.d.mts.map +1 -1
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/carousel.d.mts.map +1 -1
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/checkbox.d.mts.map +1 -1
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/command.d.mts.map +1 -1
- 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/dialog.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/input-recipient.d.mts +2 -2
- 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/popover.d.mts.map +1 -1
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sidebar.client.d.mts +24 -24
- 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/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/time-input.client.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +2 -2
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components.d.mts +2 -1
- package/dist/components.mjs +3 -2
- package/dist/data-tables.d.mts +2 -2
- package/dist/data-tables.mjs +2 -2
- package/dist/inline-edit/client.d.mts +2 -3
- package/dist/inline-edit/client.mjs +1 -2
- package/dist/lib/client.d.mts +2 -2
- package/dist/lib/client.mjs +2 -2
- package/dist/lib/hooks/use-action.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts +11 -3
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/lib/hooks/use-indicator.mjs +19 -8
- package/dist/lib/hooks/use-indicator.mjs.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/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/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/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/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 +2 -2
- package/dist/modules/auth/components/guard.server.d.mts.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/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/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +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 +8 -8
- package/dist/modules/auth/hooks/use-permission.d.mts +2 -2
- package/dist/modules/auth/hooks/use-session.d.mts +4 -4
- 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 +10 -10
- 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 +11 -11
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
- 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/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/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/header.d.mts +4 -4
- package/dist/modules/data-tables/components/layout.d.mts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/components/search-input.client.d.mts.map +1 -1
- package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
- package/dist/modules/data-tables/components/table.d.mts +7 -7
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/hooks/use-context.client.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/parsers.d.mts +6 -1
- package/dist/modules/data-tables/lib/filters/parsers.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/parsers.mjs +6 -1
- package/dist/modules/data-tables/lib/filters/parsers.mjs.map +1 -1
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts.map +1 -1
- 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/common.d.mts.map +1 -1
- 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/drag-handle.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts +3 -3
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +11 -6
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.mjs +7 -5
- package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +5 -3
- package/dist/modules/inline-edit/components/date-input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.mjs +26 -13
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +12 -7
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +11 -6
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +11 -6
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +9 -7
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts +13 -10
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +35 -19
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +10 -9
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs +14 -7
- package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +5 -3
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs +8 -6
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.d.mts +6 -4
- package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +9 -7
- package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts +35 -3
- package/dist/modules/inline-edit/hooks/use-inline.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs +71 -9
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/inline-edit/lib/variants.d.mts +1 -0
- package/dist/modules/inline-edit/lib/variants.d.mts.map +1 -1
- package/dist/modules/inline-edit/lib/variants.mjs +12 -4
- package/dist/modules/inline-edit/lib/variants.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/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/dropzone.client.mjs +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 +3 -3
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone-context.client.d.mts +3 -11
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +10 -31
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +19 -91
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/config/filters.d.mts +2 -0
- package/dist/modules/storage/config/filters.d.mts.map +1 -1
- package/dist/modules/storage/config/filters.mjs +3 -1
- package/dist/modules/storage/config/filters.mjs.map +1 -1
- package/dist/modules/storage/lib/create-upload.client.d.mts +56 -0
- package/dist/modules/storage/lib/create-upload.client.d.mts.map +1 -0
- package/dist/modules/storage/lib/create-upload.client.mjs +98 -0
- package/dist/modules/storage/lib/create-upload.client.mjs.map +1 -0
- package/dist/modules/storage/lib/helpers.d.mts +2 -2
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
- package/dist/modules/storage/lib/helpers.mjs +1 -0
- package/dist/modules/storage/lib/helpers.mjs.map +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +4181 -2283
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +5 -2
- package/dist/modules/storage/lib/router.server.mjs.map +1 -1
- package/dist/modules/storage/lib/schema.d.mts +156 -88
- package/dist/modules/storage/lib/schema.d.mts.map +1 -1
- package/dist/modules/storage/lib/schema.mjs +3 -1
- package/dist/modules/storage/lib/schema.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +54 -38
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/service.server.mjs +11 -5
- package/dist/modules/storage/lib/service.server.mjs.map +1 -1
- package/dist/modules/storage/lib/validators.d.mts +232 -71
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/dist/modules/storage/lib/validators.mjs +16 -25
- package/dist/modules/storage/lib/validators.mjs.map +1 -1
- package/dist/storage/client.d.mts +2 -1
- package/dist/storage/client.mjs +2 -8
- package/dist/storage.d.mts +3 -3
- package/dist/storage.mjs +3 -3
- package/package.json +2 -1
- package/src/components/editor/components/editor.client.tsx +7 -2
- package/src/components/editor/components/menu.client.tsx +26 -0
- package/src/components/editor/extensions/file-handler/extension.ts +69 -0
- package/src/components/editor/extensions/file-handler/strategy.ts +167 -0
- package/src/components/editor/extensions/file-handler/utils.ts +51 -0
- package/src/components/editor/extensions/image/extension.ts +57 -0
- package/src/components/editor/extensions/skeleton/extension.ts +35 -0
- package/src/components/editor/extensions/skeleton/renderer.tsx +14 -0
- package/src/components/editor/lib/constants.ts +16 -2
- package/src/components/editor/lib/extensions.ts +4 -1
- package/src/components/editor/lib/utils.ts +32 -0
- package/src/components/editor/lib/variants.ts +72 -1
- package/src/components/entry.ts +2 -1
- package/src/lib/hooks/use-indicator.tsx +27 -18
- package/src/modules/data-tables/lib/filters/parsers.ts +14 -0
- package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +21 -12
- package/src/modules/inline-edit/components/combobox.client.tsx +13 -6
- package/src/modules/inline-edit/components/date-input.client.tsx +29 -13
- package/src/modules/inline-edit/components/date-picker.client.tsx +13 -9
- package/src/modules/inline-edit/components/editor.client.tsx +14 -14
- package/src/modules/inline-edit/components/input-recipient.client.tsx +15 -8
- package/src/modules/inline-edit/components/input-toggle.client.tsx +16 -9
- package/src/modules/inline-edit/components/input.client.tsx +38 -24
- package/src/modules/inline-edit/components/select.client.tsx +16 -9
- package/src/modules/inline-edit/components/switch.client.tsx +10 -6
- package/src/modules/inline-edit/components/toggle.client.tsx +13 -9
- package/src/modules/inline-edit/entry.client.ts +0 -1
- package/src/modules/inline-edit/hooks/use-inline.client copy.tsx +97 -0
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +139 -20
- package/src/modules/inline-edit/lib/variants.ts +7 -0
- package/src/modules/storage/components/image-grid.client.tsx +2 -2
- package/src/modules/storage/components/upload-zone-context.client.tsx +3 -4
- package/src/modules/storage/components/upload-zone.client.tsx +17 -113
- package/src/modules/storage/config/filters.ts +2 -0
- package/src/modules/storage/entry.client.ts +2 -1
- package/src/modules/storage/lib/create-upload.client.ts +134 -0
- package/src/modules/storage/lib/helpers.ts +3 -2
- package/src/modules/storage/lib/router.server.ts +1 -0
- package/src/modules/storage/lib/schema.ts +2 -0
- package/src/modules/storage/lib/service.server.ts +18 -4
- package/src/modules/storage/lib/validators.ts +21 -31
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts +0 -21
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts.map +0 -1
- package/dist/modules/inline-edit/components/deprecated-editor.client.mjs +0 -37
- package/dist/modules/inline-edit/components/deprecated-editor.client.mjs.map +0 -1
- package/dist/storage/client.mjs.map +0 -1
- package/src/modules/inline-edit/components/deprecated-editor.client.tsx +0 -48
|
@@ -165,6 +165,23 @@ declare const createNodeSchema: drizzle_zod0.BuildSchema<"insert", {
|
|
|
165
165
|
identity: undefined;
|
|
166
166
|
generated: undefined;
|
|
167
167
|
}, {}, {}>;
|
|
168
|
+
hidden: drizzle_orm_pg_core0.PgColumn<{
|
|
169
|
+
name: "hidden";
|
|
170
|
+
tableName: "nodes";
|
|
171
|
+
dataType: "boolean";
|
|
172
|
+
columnType: "PgBoolean";
|
|
173
|
+
data: boolean;
|
|
174
|
+
driverParam: boolean;
|
|
175
|
+
notNull: false;
|
|
176
|
+
hasDefault: true;
|
|
177
|
+
isPrimaryKey: false;
|
|
178
|
+
isAutoincrement: false;
|
|
179
|
+
hasRuntimeDefault: false;
|
|
180
|
+
enumValues: undefined;
|
|
181
|
+
baseColumn: never;
|
|
182
|
+
identity: undefined;
|
|
183
|
+
generated: undefined;
|
|
184
|
+
}, {}, {}>;
|
|
168
185
|
createdBy: drizzle_orm_pg_core0.PgColumn<{
|
|
169
186
|
name: "createdBy";
|
|
170
187
|
tableName: "nodes";
|
|
@@ -216,6 +233,23 @@ declare const createNodeSchema: drizzle_zod0.BuildSchema<"insert", {
|
|
|
216
233
|
identity: undefined;
|
|
217
234
|
generated: undefined;
|
|
218
235
|
}, {}, {}>;
|
|
236
|
+
orphanedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
237
|
+
name: "orphanedAt";
|
|
238
|
+
tableName: "nodes";
|
|
239
|
+
dataType: "date";
|
|
240
|
+
columnType: "PgTimestamp";
|
|
241
|
+
data: Date;
|
|
242
|
+
driverParam: string;
|
|
243
|
+
notNull: false;
|
|
244
|
+
hasDefault: false;
|
|
245
|
+
isPrimaryKey: false;
|
|
246
|
+
isAutoincrement: false;
|
|
247
|
+
hasRuntimeDefault: false;
|
|
248
|
+
enumValues: undefined;
|
|
249
|
+
baseColumn: never;
|
|
250
|
+
identity: undefined;
|
|
251
|
+
generated: undefined;
|
|
252
|
+
}, {}, {}>;
|
|
219
253
|
parentId: drizzle_orm_pg_core0.PgColumn<{
|
|
220
254
|
name: "parentId";
|
|
221
255
|
tableName: "nodes";
|
|
@@ -431,6 +465,23 @@ declare const updateNodeSchema: drizzle_zod0.BuildSchema<"update", {
|
|
|
431
465
|
identity: undefined;
|
|
432
466
|
generated: undefined;
|
|
433
467
|
}, {}, {}>;
|
|
468
|
+
hidden: drizzle_orm_pg_core0.PgColumn<{
|
|
469
|
+
name: "hidden";
|
|
470
|
+
tableName: "nodes";
|
|
471
|
+
dataType: "boolean";
|
|
472
|
+
columnType: "PgBoolean";
|
|
473
|
+
data: boolean;
|
|
474
|
+
driverParam: boolean;
|
|
475
|
+
notNull: false;
|
|
476
|
+
hasDefault: true;
|
|
477
|
+
isPrimaryKey: false;
|
|
478
|
+
isAutoincrement: false;
|
|
479
|
+
hasRuntimeDefault: false;
|
|
480
|
+
enumValues: undefined;
|
|
481
|
+
baseColumn: never;
|
|
482
|
+
identity: undefined;
|
|
483
|
+
generated: undefined;
|
|
484
|
+
}, {}, {}>;
|
|
434
485
|
createdBy: drizzle_orm_pg_core0.PgColumn<{
|
|
435
486
|
name: "createdBy";
|
|
436
487
|
tableName: "nodes";
|
|
@@ -482,6 +533,23 @@ declare const updateNodeSchema: drizzle_zod0.BuildSchema<"update", {
|
|
|
482
533
|
identity: undefined;
|
|
483
534
|
generated: undefined;
|
|
484
535
|
}, {}, {}>;
|
|
536
|
+
orphanedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
537
|
+
name: "orphanedAt";
|
|
538
|
+
tableName: "nodes";
|
|
539
|
+
dataType: "date";
|
|
540
|
+
columnType: "PgTimestamp";
|
|
541
|
+
data: Date;
|
|
542
|
+
driverParam: string;
|
|
543
|
+
notNull: false;
|
|
544
|
+
hasDefault: false;
|
|
545
|
+
isPrimaryKey: false;
|
|
546
|
+
isAutoincrement: false;
|
|
547
|
+
hasRuntimeDefault: false;
|
|
548
|
+
enumValues: undefined;
|
|
549
|
+
baseColumn: never;
|
|
550
|
+
identity: undefined;
|
|
551
|
+
generated: undefined;
|
|
552
|
+
}, {}, {}>;
|
|
485
553
|
parentId: drizzle_orm_pg_core0.PgColumn<{
|
|
486
554
|
name: "parentId";
|
|
487
555
|
tableName: "nodes";
|
|
@@ -553,63 +621,6 @@ declare const updateNodeSchema: drizzle_zod0.BuildSchema<"update", {
|
|
|
553
621
|
}, undefined, undefined>;
|
|
554
622
|
type UpdateNodeInput = z$1.input<typeof updateNodeSchema>;
|
|
555
623
|
type UpdateNodeSchema = z$1.infer<typeof updateNodeSchema>;
|
|
556
|
-
/**
|
|
557
|
-
* Create folder node
|
|
558
|
-
*/
|
|
559
|
-
declare const createFolderNodeSchema: z$1.ZodObject<{
|
|
560
|
-
id: z$1.ZodOptional<z$1.ZodUUID>;
|
|
561
|
-
createdAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
562
|
-
updatedAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
563
|
-
name: z$1.ZodString;
|
|
564
|
-
readonly: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
565
|
-
mode: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodEnum<{
|
|
566
|
-
private: "private";
|
|
567
|
-
public: "public";
|
|
568
|
-
}>>>;
|
|
569
|
-
namespace: z$1.ZodString;
|
|
570
|
-
createdBy: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
571
|
-
isPending: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
572
|
-
isDeleted: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
573
|
-
parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
574
|
-
}, {
|
|
575
|
-
out: {};
|
|
576
|
-
in: {};
|
|
577
|
-
}>;
|
|
578
|
-
type CreateFolderNodeSchema = z$1.infer<typeof createFolderNodeSchema>;
|
|
579
|
-
/**
|
|
580
|
-
* Create file node
|
|
581
|
-
*/
|
|
582
|
-
declare const createFileNodeSchema: z$1.ZodObject<{
|
|
583
|
-
id: z$1.ZodOptional<z$1.ZodUUID>;
|
|
584
|
-
createdAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
585
|
-
updatedAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
586
|
-
name: z$1.ZodString;
|
|
587
|
-
readonly: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
588
|
-
mode: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodEnum<{
|
|
589
|
-
private: "private";
|
|
590
|
-
public: "public";
|
|
591
|
-
}>>>;
|
|
592
|
-
size: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodInt>>;
|
|
593
|
-
namespace: z$1.ZodString;
|
|
594
|
-
subtype: z$1.ZodOptional<z$1.ZodEnum<{
|
|
595
|
-
image: "image";
|
|
596
|
-
document: "document";
|
|
597
|
-
spreadsheet: "spreadsheet";
|
|
598
|
-
video: "video";
|
|
599
|
-
audio: "audio";
|
|
600
|
-
archive: "archive";
|
|
601
|
-
other: "other";
|
|
602
|
-
}>>;
|
|
603
|
-
contentType: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
604
|
-
createdBy: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
605
|
-
isPending: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
606
|
-
isDeleted: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
607
|
-
parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
608
|
-
}, {
|
|
609
|
-
out: {};
|
|
610
|
-
in: {};
|
|
611
|
-
}>;
|
|
612
|
-
type CreateFileNodeSchema = z$1.infer<typeof createFileNodeSchema>;
|
|
613
624
|
/**
|
|
614
625
|
* Select node
|
|
615
626
|
*/
|
|
@@ -752,6 +763,23 @@ declare const selectNodeSchema: drizzle_zod0.BuildSchema<"select", {
|
|
|
752
763
|
identity: undefined;
|
|
753
764
|
generated: undefined;
|
|
754
765
|
}, {}, {}>;
|
|
766
|
+
hidden: drizzle_orm_pg_core0.PgColumn<{
|
|
767
|
+
name: "hidden";
|
|
768
|
+
tableName: "nodes";
|
|
769
|
+
dataType: "boolean";
|
|
770
|
+
columnType: "PgBoolean";
|
|
771
|
+
data: boolean;
|
|
772
|
+
driverParam: boolean;
|
|
773
|
+
notNull: false;
|
|
774
|
+
hasDefault: true;
|
|
775
|
+
isPrimaryKey: false;
|
|
776
|
+
isAutoincrement: false;
|
|
777
|
+
hasRuntimeDefault: false;
|
|
778
|
+
enumValues: undefined;
|
|
779
|
+
baseColumn: never;
|
|
780
|
+
identity: undefined;
|
|
781
|
+
generated: undefined;
|
|
782
|
+
}, {}, {}>;
|
|
755
783
|
createdBy: drizzle_orm_pg_core0.PgColumn<{
|
|
756
784
|
name: "createdBy";
|
|
757
785
|
tableName: "nodes";
|
|
@@ -803,6 +831,23 @@ declare const selectNodeSchema: drizzle_zod0.BuildSchema<"select", {
|
|
|
803
831
|
identity: undefined;
|
|
804
832
|
generated: undefined;
|
|
805
833
|
}, {}, {}>;
|
|
834
|
+
orphanedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
835
|
+
name: "orphanedAt";
|
|
836
|
+
tableName: "nodes";
|
|
837
|
+
dataType: "date";
|
|
838
|
+
columnType: "PgTimestamp";
|
|
839
|
+
data: Date;
|
|
840
|
+
driverParam: string;
|
|
841
|
+
notNull: false;
|
|
842
|
+
hasDefault: false;
|
|
843
|
+
isPrimaryKey: false;
|
|
844
|
+
isAutoincrement: false;
|
|
845
|
+
hasRuntimeDefault: false;
|
|
846
|
+
enumValues: undefined;
|
|
847
|
+
baseColumn: never;
|
|
848
|
+
identity: undefined;
|
|
849
|
+
generated: undefined;
|
|
850
|
+
}, {}, {}>;
|
|
806
851
|
parentId: drizzle_orm_pg_core0.PgColumn<{
|
|
807
852
|
name: "parentId";
|
|
808
853
|
tableName: "nodes";
|
|
@@ -895,9 +940,11 @@ declare const selectNodeWithChildrenSchema: z$1.ZodObject<{
|
|
|
895
940
|
size: z$1.ZodNullable<z$1.ZodInt>;
|
|
896
941
|
contentType: z$1.ZodNullable<z$1.ZodString>;
|
|
897
942
|
readonly: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
943
|
+
hidden: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
898
944
|
createdBy: z$1.ZodNullable<z$1.ZodUUID>;
|
|
899
945
|
isPending: z$1.ZodBoolean;
|
|
900
946
|
isDeleted: z$1.ZodBoolean;
|
|
947
|
+
orphanedAt: z$1.ZodNullable<z$1.ZodDate>;
|
|
901
948
|
parentId: z$1.ZodNullable<z$1.ZodUUID>;
|
|
902
949
|
id: z$1.ZodUUID;
|
|
903
950
|
createdAt: z$1.ZodDate;
|
|
@@ -1041,6 +1088,23 @@ declare const selectNodeWithChildrenSchema: z$1.ZodObject<{
|
|
|
1041
1088
|
identity: undefined;
|
|
1042
1089
|
generated: undefined;
|
|
1043
1090
|
}, {}, {}>;
|
|
1091
|
+
hidden: drizzle_orm_pg_core0.PgColumn<{
|
|
1092
|
+
name: "hidden";
|
|
1093
|
+
tableName: "nodes";
|
|
1094
|
+
dataType: "boolean";
|
|
1095
|
+
columnType: "PgBoolean";
|
|
1096
|
+
data: boolean;
|
|
1097
|
+
driverParam: boolean;
|
|
1098
|
+
notNull: false;
|
|
1099
|
+
hasDefault: true;
|
|
1100
|
+
isPrimaryKey: false;
|
|
1101
|
+
isAutoincrement: false;
|
|
1102
|
+
hasRuntimeDefault: false;
|
|
1103
|
+
enumValues: undefined;
|
|
1104
|
+
baseColumn: never;
|
|
1105
|
+
identity: undefined;
|
|
1106
|
+
generated: undefined;
|
|
1107
|
+
}, {}, {}>;
|
|
1044
1108
|
createdBy: drizzle_orm_pg_core0.PgColumn<{
|
|
1045
1109
|
name: "createdBy";
|
|
1046
1110
|
tableName: "nodes";
|
|
@@ -1092,6 +1156,23 @@ declare const selectNodeWithChildrenSchema: z$1.ZodObject<{
|
|
|
1092
1156
|
identity: undefined;
|
|
1093
1157
|
generated: undefined;
|
|
1094
1158
|
}, {}, {}>;
|
|
1159
|
+
orphanedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
1160
|
+
name: "orphanedAt";
|
|
1161
|
+
tableName: "nodes";
|
|
1162
|
+
dataType: "date";
|
|
1163
|
+
columnType: "PgTimestamp";
|
|
1164
|
+
data: Date;
|
|
1165
|
+
driverParam: string;
|
|
1166
|
+
notNull: false;
|
|
1167
|
+
hasDefault: false;
|
|
1168
|
+
isPrimaryKey: false;
|
|
1169
|
+
isAutoincrement: false;
|
|
1170
|
+
hasRuntimeDefault: false;
|
|
1171
|
+
enumValues: undefined;
|
|
1172
|
+
baseColumn: never;
|
|
1173
|
+
identity: undefined;
|
|
1174
|
+
generated: undefined;
|
|
1175
|
+
}, {}, {}>;
|
|
1095
1176
|
parentId: drizzle_orm_pg_core0.PgColumn<{
|
|
1096
1177
|
name: "parentId";
|
|
1097
1178
|
tableName: "nodes";
|
|
@@ -1177,36 +1258,89 @@ declare const nodesTableFiltersSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
1177
1258
|
}>>>>;
|
|
1178
1259
|
nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
1179
1260
|
isDeleted: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1261
|
+
isOrphaned: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1262
|
+
hidden: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1180
1263
|
namespace: z$1.ZodString;
|
|
1181
1264
|
parentId: z$1.ZodNullable<z$1.ZodString>;
|
|
1182
1265
|
}, z$1.core.$strip>, z$1.ZodTransform<{
|
|
1266
|
+
hidden: boolean;
|
|
1183
1267
|
isDeleted: boolean;
|
|
1268
|
+
orphanedAt: boolean;
|
|
1184
1269
|
namespace: string;
|
|
1185
1270
|
parentId: string | null;
|
|
1186
1271
|
types?: ("file" | "folder")[] | null | undefined;
|
|
1187
1272
|
nodeIds?: string[] | null | undefined;
|
|
1273
|
+
isOrphaned?: boolean | null | undefined;
|
|
1188
1274
|
}, {
|
|
1189
1275
|
namespace: string;
|
|
1190
1276
|
parentId: string | null;
|
|
1191
1277
|
types?: ("file" | "folder")[] | null | undefined;
|
|
1192
1278
|
nodeIds?: string[] | null | undefined;
|
|
1193
1279
|
isDeleted?: boolean | null | undefined;
|
|
1280
|
+
isOrphaned?: boolean | null | undefined;
|
|
1281
|
+
hidden?: boolean | null | undefined;
|
|
1194
1282
|
}>>;
|
|
1195
1283
|
type NodesTableFilters = z$1.input<typeof nodesTableFiltersSchema>;
|
|
1284
|
+
/**
|
|
1285
|
+
* Create folder node
|
|
1286
|
+
*/
|
|
1287
|
+
declare const createFolderNodeSchema: z$1.ZodObject<{
|
|
1288
|
+
name: z$1.ZodString;
|
|
1289
|
+
namespace: z$1.ZodString;
|
|
1290
|
+
mode: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodEnum<{
|
|
1291
|
+
private: "private";
|
|
1292
|
+
public: "public";
|
|
1293
|
+
}>>>;
|
|
1294
|
+
readonly: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1295
|
+
hidden: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1296
|
+
id: z$1.ZodOptional<z$1.ZodUUID>;
|
|
1297
|
+
createdAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
1298
|
+
updatedAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
1299
|
+
createdBy: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
1300
|
+
isPending: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1301
|
+
isDeleted: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1302
|
+
orphanedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodDate>>;
|
|
1303
|
+
parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
1304
|
+
}, {
|
|
1305
|
+
out: {};
|
|
1306
|
+
in: {};
|
|
1307
|
+
}>;
|
|
1308
|
+
type CreateFolderNodeSchema = z$1.infer<typeof createFolderNodeSchema>;
|
|
1196
1309
|
/**
|
|
1197
1310
|
* Upload file schema
|
|
1198
1311
|
*/
|
|
1199
1312
|
declare const uploadFileSchema: z$1.ZodObject<{
|
|
1200
1313
|
name: z$1.ZodString;
|
|
1201
1314
|
namespace: z$1.ZodString;
|
|
1202
|
-
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1315
|
+
mode: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodEnum<{
|
|
1203
1316
|
private: "private";
|
|
1204
1317
|
public: "public";
|
|
1318
|
+
}>>>;
|
|
1319
|
+
subtype: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1320
|
+
image: "image";
|
|
1321
|
+
document: "document";
|
|
1322
|
+
spreadsheet: "spreadsheet";
|
|
1323
|
+
video: "video";
|
|
1324
|
+
audio: "audio";
|
|
1325
|
+
archive: "archive";
|
|
1326
|
+
other: "other";
|
|
1205
1327
|
}>>;
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1328
|
+
size: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodInt>>;
|
|
1329
|
+
contentType: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1330
|
+
readonly: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1331
|
+
hidden: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1332
|
+
id: z$1.ZodOptional<z$1.ZodUUID>;
|
|
1333
|
+
createdAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
1334
|
+
updatedAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
1335
|
+
createdBy: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
1336
|
+
isPending: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1337
|
+
isDeleted: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1338
|
+
orphanedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodDate>>;
|
|
1339
|
+
parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
1340
|
+
}, {
|
|
1341
|
+
out: {};
|
|
1342
|
+
in: {};
|
|
1343
|
+
}>;
|
|
1210
1344
|
type UploadFileSchema = z$1.infer<typeof uploadFileSchema>;
|
|
1211
1345
|
/**
|
|
1212
1346
|
* Presign file schema
|
|
@@ -1214,15 +1348,35 @@ type UploadFileSchema = z$1.infer<typeof uploadFileSchema>;
|
|
|
1214
1348
|
declare const presignFileSchema: z$1.ZodObject<{
|
|
1215
1349
|
name: z$1.ZodString;
|
|
1216
1350
|
namespace: z$1.ZodString;
|
|
1217
|
-
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1351
|
+
mode: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodEnum<{
|
|
1218
1352
|
private: "private";
|
|
1219
1353
|
public: "public";
|
|
1354
|
+
}>>>;
|
|
1355
|
+
subtype: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1356
|
+
image: "image";
|
|
1357
|
+
document: "document";
|
|
1358
|
+
spreadsheet: "spreadsheet";
|
|
1359
|
+
video: "video";
|
|
1360
|
+
audio: "audio";
|
|
1361
|
+
archive: "archive";
|
|
1362
|
+
other: "other";
|
|
1220
1363
|
}>>;
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1364
|
+
size: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodInt>>;
|
|
1365
|
+
contentType: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1366
|
+
readonly: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1367
|
+
hidden: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1368
|
+
createdAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
1369
|
+
updatedAt: z$1.ZodOptional<z$1.ZodDate>;
|
|
1370
|
+
createdBy: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
1371
|
+
isPending: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1372
|
+
isDeleted: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1373
|
+
orphanedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodDate>>;
|
|
1374
|
+
parentId: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodUUID>>;
|
|
1224
1375
|
id: z$1.ZodUUID;
|
|
1225
|
-
},
|
|
1376
|
+
}, {
|
|
1377
|
+
out: {};
|
|
1378
|
+
in: {};
|
|
1379
|
+
}>;
|
|
1226
1380
|
type PresignFileSchema = z$1.infer<typeof presignFileSchema>;
|
|
1227
1381
|
/**
|
|
1228
1382
|
* Get file url schema
|
|
@@ -1247,8 +1401,8 @@ type GetFileURLSchema = z$1.infer<typeof getFileURLSchema>;
|
|
|
1247
1401
|
* Get by parent id input
|
|
1248
1402
|
*/
|
|
1249
1403
|
declare const getNodesByParentIdSchema: z$1.ZodObject<{
|
|
1250
|
-
search: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1251
1404
|
sort: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1405
|
+
search: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1252
1406
|
order: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodEnum<{
|
|
1253
1407
|
asc: "asc";
|
|
1254
1408
|
desc: "desc";
|
|
@@ -1260,20 +1414,27 @@ declare const getNodesByParentIdSchema: z$1.ZodObject<{
|
|
|
1260
1414
|
}>>>>;
|
|
1261
1415
|
nodeIds: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>>;
|
|
1262
1416
|
isDeleted: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1417
|
+
isOrphaned: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1418
|
+
hidden: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodBoolean>>;
|
|
1263
1419
|
namespace: z$1.ZodString;
|
|
1264
1420
|
parentId: z$1.ZodNullable<z$1.ZodString>;
|
|
1265
1421
|
}, z$1.core.$strip>, z$1.ZodTransform<{
|
|
1422
|
+
hidden: boolean;
|
|
1266
1423
|
isDeleted: boolean;
|
|
1424
|
+
orphanedAt: boolean;
|
|
1267
1425
|
namespace: string;
|
|
1268
1426
|
parentId: string | null;
|
|
1269
1427
|
types?: ("file" | "folder")[] | null | undefined;
|
|
1270
1428
|
nodeIds?: string[] | null | undefined;
|
|
1429
|
+
isOrphaned?: boolean | null | undefined;
|
|
1271
1430
|
}, {
|
|
1272
1431
|
namespace: string;
|
|
1273
1432
|
parentId: string | null;
|
|
1274
1433
|
types?: ("file" | "folder")[] | null | undefined;
|
|
1275
1434
|
nodeIds?: string[] | null | undefined;
|
|
1276
1435
|
isDeleted?: boolean | null | undefined;
|
|
1436
|
+
isOrphaned?: boolean | null | undefined;
|
|
1437
|
+
hidden?: boolean | null | undefined;
|
|
1277
1438
|
}>>;
|
|
1278
1439
|
}, z$1.core.$strip>;
|
|
1279
1440
|
type GetNodesByParentIdInput = z$1.input<typeof getNodesByParentIdSchema>;
|
|
@@ -1301,13 +1462,13 @@ declare const putObjectSchema: z$1.ZodObject<{
|
|
|
1301
1462
|
main: "main";
|
|
1302
1463
|
}>>>;
|
|
1303
1464
|
body: z$1.ZodOptional<z$1.ZodAny>;
|
|
1304
|
-
contentType: z$1.
|
|
1305
|
-
size: z$1.
|
|
1465
|
+
contentType: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
1466
|
+
size: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
|
|
1306
1467
|
}, z$1.core.$strip>;
|
|
1307
1468
|
type PutObjectInput = z$1.input<typeof putObjectSchema> & {
|
|
1308
1469
|
body?: PutObjectCommandInput["Body"];
|
|
1309
1470
|
};
|
|
1310
1471
|
type PutObjectSchema = z$1.infer<typeof putObjectSchema>;
|
|
1311
1472
|
//#endregion
|
|
1312
|
-
export {
|
|
1473
|
+
export { CreateFolderNodeSchema, CreateNodeInput, CreateNodeSchema, FileNode, FolderNode, GetFileURLSchema, GetFileUrlInput, GetNodesByParentIdInput, GetObjectInput, GetObjectSchema, Node, NodeMode, NodesTableFilters, PresignFileSchema, PutObjectInput, PutObjectSchema, SelectNodeSchema, SelectNodeWithChildrenSchema, UpdateNodeInput, UpdateNodeSchema, UploadFileSchema, createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema };
|
|
1313
1474
|
//# sourceMappingURL=validators.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/storage/lib/validators.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAYY,IAAA,UAAc,KAAA,CAAM;AAApB,KACA,QAAA,GADc,OACI,KAAA,CAAM,YADQ,GAAA;EAChC,IAAA,EAAA,MAAQ;AACpB,CAAA;AAKa,KALD,UAAA,GAKiD,OAL7B,KAAA,CAAM,YAKX,GAAA;EACf,IAAA,EAAA,QAAQ;AAKpB,CAAA;;;;cANa,gBAAc,GAAA,CAAA;;;;KACf,QAAA,GAAW,GAAA,CAAE,aAAa;;;;cAKzB,+BAAgB;QAE3B,oBAAA,CAAA
|
|
1
|
+
{"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/storage/lib/validators.ts"],"sourcesContent":[],"mappings":"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"}
|
|
@@ -20,19 +20,6 @@ const createNodeSchema = createInsertSchema(nodes, { namespace: z$1.string() });
|
|
|
20
20
|
*/
|
|
21
21
|
const updateNodeSchema = createUpdateSchema(nodes);
|
|
22
22
|
/**
|
|
23
|
-
* Create folder node
|
|
24
|
-
*/
|
|
25
|
-
const createFolderNodeSchema = createNodeSchema.omit({
|
|
26
|
-
type: true,
|
|
27
|
-
contentType: true,
|
|
28
|
-
size: true,
|
|
29
|
-
subtype: true
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* Create file node
|
|
33
|
-
*/
|
|
34
|
-
const createFileNodeSchema = createNodeSchema.omit({ type: true });
|
|
35
|
-
/**
|
|
36
23
|
* Select node
|
|
37
24
|
*/
|
|
38
25
|
const selectNodeSchema = createSelectSchema(nodes);
|
|
@@ -45,20 +32,24 @@ const nodesTableFiltersSchema = resolveFiltersSchema(nodesTableFilters).partial(
|
|
|
45
32
|
parentId: z$1.string().nullable()
|
|
46
33
|
}).transform((input) => ({
|
|
47
34
|
...input,
|
|
48
|
-
|
|
35
|
+
hidden: input?.hidden ?? false,
|
|
36
|
+
isDeleted: input?.isDeleted ?? false,
|
|
37
|
+
orphanedAt: input?.isOrphaned ?? false
|
|
49
38
|
}));
|
|
50
39
|
/**
|
|
51
|
-
*
|
|
40
|
+
* Create folder node
|
|
52
41
|
*/
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
size: z$1.number().optional().default(0),
|
|
59
|
-
contentType: z$1.string().optional().default("")
|
|
42
|
+
const createFolderNodeSchema = createNodeSchema.omit({
|
|
43
|
+
type: true,
|
|
44
|
+
contentType: true,
|
|
45
|
+
size: true,
|
|
46
|
+
subtype: true
|
|
60
47
|
});
|
|
61
48
|
/**
|
|
49
|
+
* Upload file schema
|
|
50
|
+
*/
|
|
51
|
+
const uploadFileSchema = createNodeSchema.omit({ type: true });
|
|
52
|
+
/**
|
|
62
53
|
* Presign file schema
|
|
63
54
|
*/
|
|
64
55
|
const presignFileSchema = uploadFileSchema.extend({ id: z$1.uuid() });
|
|
@@ -97,10 +88,10 @@ const putObjectSchema = z$1.object({
|
|
|
97
88
|
name: z$1.string().optional().default(""),
|
|
98
89
|
variant: z$1.enum(imageVariants).optional().default("main"),
|
|
99
90
|
body: z$1.any().optional(),
|
|
100
|
-
contentType: z$1.string().
|
|
101
|
-
size: z$1.number().
|
|
91
|
+
contentType: z$1.string().nullable().optional(),
|
|
92
|
+
size: z$1.number().nullable().optional()
|
|
102
93
|
});
|
|
103
94
|
|
|
104
95
|
//#endregion
|
|
105
|
-
export {
|
|
96
|
+
export { createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema };
|
|
106
97
|
//# sourceMappingURL=validators.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.mjs","names":["z"],"sources":["../../../../src/modules/storage/lib/validators.ts"],"sourcesContent":["import { tableQuerySchema } from \"@/modules/data-tables/entry\";\nimport { resolveFiltersSchema } from \"@/modules/data-tables/lib/filters/resolvers\";\nimport { PutObjectCommandInput } from \"@aws-sdk/client-s3\";\nimport { createInsertSchema, createSelectSchema, createUpdateSchema } from \"drizzle-zod\";\nimport { z } from \"zod\";\nimport { nodesTableFilters } from \"../config/filters\";\nimport { imageDispositions, imageVariants } from \"./constants\";\nimport { nodeModeEnum, nodes } from \"./schema\";\n\n/**\n * Nodes\n */\nexport type Node = typeof nodes.$inferSelect;\nexport type FileNode = typeof nodes.$inferSelect & { type: \"file\" };\nexport type FolderNode = typeof nodes.$inferSelect & { type: \"folder\" };\n\n/**\n * Node mode\n */\nexport const nodeModeSchema = z.enum(nodeModeEnum.enumValues);\nexport type NodeMode = z.infer<typeof nodeModeSchema>;\n\n/**\n * Create node\n */\nexport const createNodeSchema = createInsertSchema(nodes, {\n namespace: z.string(),\n});\n\nexport type CreateNodeInput = z.input<typeof createNodeSchema>;\nexport type CreateNodeSchema = z.infer<typeof createNodeSchema>;\n\n/**\n * Update node\n */\nexport const updateNodeSchema = createUpdateSchema(nodes);\n\nexport type UpdateNodeInput = z.input<typeof updateNodeSchema>;\nexport type UpdateNodeSchema = z.infer<typeof updateNodeSchema>;\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"validators.mjs","names":["z"],"sources":["../../../../src/modules/storage/lib/validators.ts"],"sourcesContent":["import { tableQuerySchema } from \"@/modules/data-tables/entry\";\nimport { resolveFiltersSchema } from \"@/modules/data-tables/lib/filters/resolvers\";\nimport { PutObjectCommandInput } from \"@aws-sdk/client-s3\";\nimport { createInsertSchema, createSelectSchema, createUpdateSchema } from \"drizzle-zod\";\nimport { z } from \"zod\";\nimport { nodesTableFilters } from \"../config/filters\";\nimport { imageDispositions, imageVariants } from \"./constants\";\nimport { nodeModeEnum, nodes } from \"./schema\";\n\n/**\n * Nodes\n */\nexport type Node = typeof nodes.$inferSelect;\nexport type FileNode = typeof nodes.$inferSelect & { type: \"file\" };\nexport type FolderNode = typeof nodes.$inferSelect & { type: \"folder\" };\n\n/**\n * Node mode\n */\nexport const nodeModeSchema = z.enum(nodeModeEnum.enumValues);\nexport type NodeMode = z.infer<typeof nodeModeSchema>;\n\n/**\n * Create node\n */\nexport const createNodeSchema = createInsertSchema(nodes, {\n namespace: z.string(),\n});\n\nexport type CreateNodeInput = z.input<typeof createNodeSchema>;\nexport type CreateNodeSchema = z.infer<typeof createNodeSchema>;\n\n/**\n * Update node\n */\nexport const updateNodeSchema = createUpdateSchema(nodes);\n\nexport type UpdateNodeInput = z.input<typeof updateNodeSchema>;\nexport type UpdateNodeSchema = z.infer<typeof updateNodeSchema>;\n\n/**\n * Select node\n */\nexport const selectNodeSchema = createSelectSchema(nodes);\nexport const selectNodeWithChildrenSchema = selectNodeSchema.extend({\n children: z.array(selectNodeSchema),\n});\n\nexport type SelectNodeSchema = z.infer<typeof selectNodeSchema>;\nexport type SelectNodeWithChildrenSchema = z.infer<typeof selectNodeWithChildrenSchema>;\n\n/**\n * Where input\n */\nexport const nodesTableFiltersSchema = resolveFiltersSchema(nodesTableFilters)\n .partial()\n .extend({\n namespace: z.string(),\n parentId: z.string().nullable(),\n })\n .transform((input) => ({\n ...input,\n hidden: input?.hidden ?? false,\n isDeleted: input?.isDeleted ?? false,\n orphanedAt: input?.isOrphaned ?? false,\n }));\n\nexport type NodesTableFilters = z.input<typeof nodesTableFiltersSchema>;\n\n/**\n * Create folder node\n */\nexport const createFolderNodeSchema = createNodeSchema.omit({\n type: true,\n contentType: true,\n size: true,\n subtype: true,\n});\n\nexport type CreateFolderNodeSchema = z.infer<typeof createFolderNodeSchema>;\n\n/**\n * Upload file schema\n */\nexport const uploadFileSchema = createNodeSchema.omit({ type: true });\n\nexport type UploadFileSchema = z.infer<typeof uploadFileSchema>;\n\n/**\n * Presign file schema\n */\nexport const presignFileSchema = uploadFileSchema.extend({ id: z.uuid() });\n\nexport type PresignFileSchema = z.infer<typeof presignFileSchema>;\n\n/**\n * Get file url schema\n */\nexport const getFileURLSchemaDefaults = { variant: \"main\", disposition: \"inline\" } as const;\n\nexport const getFileURLSchema = z.object({\n variant: z.enum(imageVariants).optional().default(getFileURLSchemaDefaults.variant),\n disposition: z.enum(imageDispositions).optional().default(getFileURLSchemaDefaults.disposition),\n});\n\nexport type GetFileUrlInput = z.input<typeof getFileURLSchema>;\nexport type GetFileURLSchema = z.infer<typeof getFileURLSchema>;\n\n/**\n * Get by parent id input\n */\nexport const getNodesByParentIdSchema = tableQuerySchema\n .pick({ order: true, sort: true, search: true })\n .extend({ filters: nodesTableFiltersSchema });\n\nexport type GetNodesByParentIdInput = z.input<typeof getNodesByParentIdSchema>;\n\n/**\n * Get object input\n */\nexport const getObjectSchema = z.object({\n id: z.string(),\n variant: z.enum(imageVariants).optional().default(getFileURLSchemaDefaults.variant),\n disposition: z.string().optional().default(getFileURLSchemaDefaults.disposition),\n});\n\nexport type GetObjectInput = z.input<typeof getObjectSchema>;\nexport type GetObjectSchema = z.infer<typeof getObjectSchema>;\n\n/**\n * Put object input\n */\nexport const putObjectSchema = z.object({\n id: z.string(),\n name: z.string().optional().default(\"\"),\n variant: z.enum(imageVariants).optional().default(\"main\"),\n body: z.any().optional(),\n contentType: z.string().nullable().optional(),\n size: z.number().nullable().optional(),\n});\n\nexport type PutObjectInput = z.input<typeof putObjectSchema> & {\n body?: PutObjectCommandInput[\"Body\"];\n};\n\nexport type PutObjectSchema = z.infer<typeof putObjectSchema>;\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,iBAAiBA,IAAE,KAAK,aAAa,WAAW;;;;AAM7D,MAAa,mBAAmB,mBAAmB,OAAO,EACxD,WAAWA,IAAE,QAAQ,EACtB,CAAC;;;;AAQF,MAAa,mBAAmB,mBAAmB,MAAM;;;;AAQzD,MAAa,mBAAmB,mBAAmB,MAAM;AACzD,MAAa,+BAA+B,iBAAiB,OAAO,EAClE,UAAUA,IAAE,MAAM,iBAAiB,EACpC,CAAC;;;;AAQF,MAAa,0BAA0B,qBAAqB,kBAAkB,CAC3E,SAAS,CACT,OAAO;CACN,WAAWA,IAAE,QAAQ;CACrB,UAAUA,IAAE,QAAQ,CAAC,UAAU;CAChC,CAAC,CACD,WAAW,WAAW;CACrB,GAAG;CACH,QAAQ,OAAO,UAAU;CACzB,WAAW,OAAO,aAAa;CAC/B,YAAY,OAAO,cAAc;CAClC,EAAE;;;;AAOL,MAAa,yBAAyB,iBAAiB,KAAK;CAC1D,MAAM;CACN,aAAa;CACb,MAAM;CACN,SAAS;CACV,CAAC;;;;AAOF,MAAa,mBAAmB,iBAAiB,KAAK,EAAE,MAAM,MAAM,CAAC;;;;AAOrE,MAAa,oBAAoB,iBAAiB,OAAO,EAAE,IAAIA,IAAE,MAAM,EAAE,CAAC;;;;AAO1E,MAAa,2BAA2B;CAAE,SAAS;CAAQ,aAAa;CAAU;AAElF,MAAa,mBAAmBA,IAAE,OAAO;CACvC,SAASA,IAAE,KAAK,cAAc,CAAC,UAAU,CAAC,QAAQ,yBAAyB,QAAQ;CACnF,aAAaA,IAAE,KAAK,kBAAkB,CAAC,UAAU,CAAC,QAAQ,yBAAyB,YAAY;CAChG,CAAC;;;;AAQF,MAAa,2BAA2B,iBACrC,KAAK;CAAE,OAAO;CAAM,MAAM;CAAM,QAAQ;CAAM,CAAC,CAC/C,OAAO,EAAE,SAAS,yBAAyB,CAAC;;;;AAO/C,MAAa,kBAAkBA,IAAE,OAAO;CACtC,IAAIA,IAAE,QAAQ;CACd,SAASA,IAAE,KAAK,cAAc,CAAC,UAAU,CAAC,QAAQ,yBAAyB,QAAQ;CACnF,aAAaA,IAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,yBAAyB,YAAY;CACjF,CAAC;;;;AAQF,MAAa,kBAAkBA,IAAE,OAAO;CACtC,IAAIA,IAAE,QAAQ;CACd,MAAMA,IAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,GAAG;CACvC,SAASA,IAAE,KAAK,cAAc,CAAC,UAAU,CAAC,QAAQ,OAAO;CACzD,MAAMA,IAAE,KAAK,CAAC,UAAU;CACxB,aAAaA,IAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;CAC7C,MAAMA,IAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;CACvC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DropzoneContext, useDropzoneContext } from "../modules/storage/components/dropzone-context.client.mjs";
|
|
2
2
|
import { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps } from "../modules/storage/components/dropzone.client.mjs";
|
|
3
3
|
import { ImageGrid, ImageGridSkeleton } from "../modules/storage/components/image-grid.client.mjs";
|
|
4
|
+
import { PrepareUploadInput, UploadClient, UploadFileRequest, UploadHooks, createUploadClient } from "../modules/storage/lib/create-upload.client.mjs";
|
|
4
5
|
import { UploadZoneContext, UploadZoneContextValue, useUploadZone } from "../modules/storage/components/upload-zone-context.client.mjs";
|
|
5
6
|
import { UploadZone, UploadZoneProps } from "../modules/storage/components/upload-zone.client.mjs";
|
|
6
|
-
export { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneContext, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps, ImageGrid, ImageGridSkeleton, UploadZone, UploadZoneContext, UploadZoneContextValue, UploadZoneProps, useDropzoneContext, useUploadZone };
|
|
7
|
+
export { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneContext, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps, ImageGrid, ImageGridSkeleton, PrepareUploadInput, UploadClient, UploadFileRequest, UploadHooks, UploadZone, UploadZoneContext, UploadZoneContextValue, UploadZoneProps, createUploadClient, useDropzoneContext, useUploadZone };
|
package/dist/storage/client.mjs
CHANGED
|
@@ -3,12 +3,6 @@ import { Dropzone, DropzoneContent, DropzoneEmptyState } from "../modules/storag
|
|
|
3
3
|
import { UploadZoneContext, useUploadZone } from "../modules/storage/components/upload-zone-context.client.mjs";
|
|
4
4
|
import { ImageGrid, ImageGridSkeleton } from "../modules/storage/components/image-grid.client.mjs";
|
|
5
5
|
import { UploadZone } from "../modules/storage/components/upload-zone.client.mjs";
|
|
6
|
+
import { createUploadClient } from "../modules/storage/lib/create-upload.client.mjs";
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Hooks
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Dropzone, DropzoneContent, DropzoneContext, DropzoneEmptyState, ImageGrid, ImageGridSkeleton, UploadZone, UploadZoneContext, useDropzoneContext, useUploadZone };
|
|
14
|
-
//# sourceMappingURL=client.mjs.map
|
|
8
|
+
export { Dropzone, DropzoneContent, DropzoneContext, DropzoneEmptyState, ImageGrid, ImageGridSkeleton, UploadZone, UploadZoneContext, createUploadClient, useDropzoneContext, useUploadZone };
|
package/dist/storage.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DriveSchema, nodeModeEnum, nodePresignedUrls, nodePresignedUrlsRelations, nodeTypeEnum, nodeVariants, nodeVariantsRelations, nodes, nodesRelations } from "./modules/storage/lib/schema.mjs";
|
|
2
|
-
import { CreateFileNodeSchema, CreateFolderNodeSchema, CreateNodeInput, CreateNodeSchema, FileNode, FolderNode, GetFileURLSchema, GetFileUrlInput, GetNodesByParentIdInput, GetObjectInput, GetObjectSchema, Node, NodeMode, NodesTableFilters, PresignFileSchema, PutObjectInput, PutObjectSchema, SelectNodeSchema, SelectNodeWithChildrenSchema, UpdateNodeInput, UpdateNodeSchema, UploadFileSchema, createFileNodeSchema, createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema } from "./modules/storage/lib/validators.mjs";
|
|
3
1
|
import { nodesTableFilters } from "./modules/storage/config/filters.mjs";
|
|
4
2
|
import { ImageDisposition, ImageVariant, deviceSizes, imageDispositions, imageSizes, imageVariants } from "./modules/storage/lib/constants.mjs";
|
|
3
|
+
import { DriveSchema, nodeModeEnum, nodePresignedUrls, nodePresignedUrlsRelations, nodeTypeEnum, nodeVariants, nodeVariantsRelations, nodes, nodesRelations } from "./modules/storage/lib/schema.mjs";
|
|
4
|
+
import { CreateFolderNodeSchema, CreateNodeInput, CreateNodeSchema, FileNode, FolderNode, GetFileURLSchema, GetFileUrlInput, GetNodesByParentIdInput, GetObjectInput, GetObjectSchema, Node, NodeMode, NodesTableFilters, PresignFileSchema, PutObjectInput, PutObjectSchema, SelectNodeSchema, SelectNodeWithChildrenSchema, UpdateNodeInput, UpdateNodeSchema, UploadFileSchema, createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema } from "./modules/storage/lib/validators.mjs";
|
|
5
5
|
import { NodeSubtype, getDriveBucketKey, getFileUrl, imageLoader, inferNodeSubtype, isFile, isFolder, nodeSubtypes, renderBytes } from "./modules/storage/lib/helpers.mjs";
|
|
6
|
-
export {
|
|
6
|
+
export { CreateFolderNodeSchema, CreateNodeInput, CreateNodeSchema, DriveSchema, FileNode, FolderNode, GetFileURLSchema, GetFileUrlInput, GetNodesByParentIdInput, GetObjectInput, GetObjectSchema, ImageDisposition, ImageVariant, Node, NodeMode, NodeSubtype, NodesTableFilters, PresignFileSchema, PutObjectInput, PutObjectSchema, SelectNodeSchema, SelectNodeWithChildrenSchema, UpdateNodeInput, UpdateNodeSchema, UploadFileSchema, createFolderNodeSchema, createNodeSchema, deviceSizes, getDriveBucketKey, getFileURLSchema, getFileURLSchemaDefaults, getFileUrl, getNodesByParentIdSchema, getObjectSchema, imageDispositions, imageLoader, imageSizes, imageVariants, inferNodeSubtype, isFile, isFolder, nodeModeEnum, nodeModeSchema, nodePresignedUrls, nodePresignedUrlsRelations, nodeSubtypes, nodeTypeEnum, nodeVariants, nodeVariantsRelations, nodes, nodesRelations, nodesTableFilters, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, renderBytes, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema };
|
package/dist/storage.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { deviceSizes, imageDispositions, imageSizes, imageVariants } from "./modules/storage/lib/constants.mjs";
|
|
2
1
|
import { getDriveBucketKey, getFileUrl, imageLoader, inferNodeSubtype, isFile, isFolder, nodeSubtypes, renderBytes } from "./modules/storage/lib/helpers.mjs";
|
|
2
|
+
import { deviceSizes, imageDispositions, imageSizes, imageVariants } from "./modules/storage/lib/constants.mjs";
|
|
3
3
|
import { nodeModeEnum, nodePresignedUrls, nodePresignedUrlsRelations, nodeTypeEnum, nodeVariants, nodeVariantsRelations, nodes, nodesRelations } from "./modules/storage/lib/schema.mjs";
|
|
4
4
|
import { nodesTableFilters } from "./modules/storage/config/filters.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema } from "./modules/storage/lib/validators.mjs";
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { createFolderNodeSchema, createNodeSchema, deviceSizes, getDriveBucketKey, getFileURLSchema, getFileURLSchemaDefaults, getFileUrl, getNodesByParentIdSchema, getObjectSchema, imageDispositions, imageLoader, imageSizes, imageVariants, inferNodeSubtype, isFile, isFolder, nodeModeEnum, nodeModeSchema, nodePresignedUrls, nodePresignedUrlsRelations, nodeSubtypes, nodeTypeEnum, nodeVariants, nodeVariantsRelations, nodes, nodesRelations, nodesTableFilters, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, renderBytes, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tulip-systems/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"@tiptap/extension-bold": "^3.14.0",
|
|
68
68
|
"@tiptap/extension-color": "^3.14.0",
|
|
69
69
|
"@tiptap/extension-document": "^3.14.0",
|
|
70
|
+
"@tiptap/extension-file-handler": "^3.15.3",
|
|
70
71
|
"@tiptap/extension-hard-break": "^3.14.0",
|
|
71
72
|
"@tiptap/extension-heading": "^3.14.0",
|
|
72
73
|
"@tiptap/extension-highlight": "^3.14.0",
|