@tulip-systems/core 0.4.1 → 0.5.0
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 +2 -2
- package/dist/auth/client.mjs +2 -2
- package/dist/commands/client.d.mts +3 -3
- package/dist/commands/client.mjs +3 -3
- package/dist/components/client.d.mts +3 -5
- 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/common/status.d.mts.map +1 -1
- package/dist/components/editor/components/block-dropdown.mjs +28 -14
- package/dist/components/editor/components/block-dropdown.mjs.map +1 -1
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/content.client.mjs +1 -1
- package/dist/components/editor/components/content.client.mjs.map +1 -1
- package/dist/components/editor/components/editor.client.d.mts +48 -0
- package/dist/components/editor/components/editor.client.d.mts.map +1 -0
- package/dist/components/editor/components/editor.client.mjs +53 -0
- package/dist/components/editor/components/editor.client.mjs.map +1 -0
- package/dist/components/editor/components/menu-fixed.client.d.mts +7 -0
- package/dist/components/editor/components/menu-fixed.client.d.mts.map +1 -0
- package/dist/components/editor/components/{fixed-menu.client.mjs → menu-fixed.client.mjs} +21 -27
- package/dist/components/editor/components/menu-fixed.client.mjs.map +1 -0
- package/dist/components/editor/lib/constants.d.mts +60 -0
- package/dist/components/editor/lib/constants.d.mts.map +1 -0
- package/dist/components/editor/lib/constants.mjs +90 -0
- package/dist/components/editor/lib/constants.mjs.map +1 -0
- package/dist/components/editor/lib/extensions.d.mts +62 -0
- package/dist/components/editor/lib/extensions.d.mts.map +1 -0
- package/dist/components/editor/lib/extensions.mjs +52 -0
- package/dist/components/editor/lib/extensions.mjs.map +1 -0
- package/dist/components/editor/lib/helpers.mjs +3 -3
- package/dist/components/editor/lib/helpers.mjs.map +1 -1
- package/dist/components/editor/lib/variants.mjs +8 -0
- package/dist/components/editor/lib/variants.mjs.map +1 -0
- 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/header/top-bar.client.mjs +1 -1
- package/dist/components/header/top-bar.client.mjs.map +1 -1
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-content.client.mjs +1 -1
- package/dist/components/layouts/admin-content.client.mjs.map +1 -1
- 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-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 +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/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/lists/data-stack.d.mts.map +1 -1
- 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 +4 -4
- 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 +2 -2
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/calendar.d.mts +17 -4
- package/dist/components/ui/calendar.d.mts.map +1 -1
- package/dist/components/ui/calendar.mjs +90 -37
- package/dist/components/ui/calendar.mjs.map +1 -1
- 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/checkbox.d.mts +2 -2
- 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/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 +5 -3
- package/dist/components/ui/input-recipient.d.mts.map +1 -1
- package/dist/components/ui/input-recipient.mjs +2 -2
- package/dist/components/ui/input-recipient.mjs.map +1 -1
- 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 +9 -9
- 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/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 +26 -26
- 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 +4 -4
- package/dist/components/ui/toggle.d.mts.map +1 -1
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/components/ui/tooltip.client.d.mts.map +1 -1
- package/dist/components.d.mts +2 -2
- package/dist/components.mjs +2 -2
- package/dist/config/server.d.mts +1 -2
- package/dist/config/server.mjs +1 -2
- package/dist/data-tables.d.mts +6 -5
- package/dist/data-tables.mjs +4 -3
- package/dist/inline-edit/client.d.mts +4 -4
- package/dist/inline-edit/client.mjs +3 -3
- package/dist/lib/hooks/use-action.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/lib.mjs +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/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/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 +247 -230
- package/dist/modules/auth/db/schema.d.mts.map +1 -1
- package/dist/modules/auth/db/schema.mjs +12 -20
- package/dist/modules/auth/db/schema.mjs.map +1 -1
- package/dist/modules/auth/handler/client.client.d.mts +129 -129
- package/dist/modules/auth/handler/client.client.d.mts.map +1 -1
- package/dist/modules/auth/handler/client.client.mjs +10 -6
- package/dist/modules/auth/handler/client.client.mjs.map +1 -1
- package/dist/modules/auth/handler/init.d.mts +134 -131
- package/dist/modules/auth/handler/init.d.mts.map +1 -1
- package/dist/modules/auth/handler/init.mjs +5 -2
- package/dist/modules/auth/handler/init.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-permission.d.mts +2 -2
- package/dist/modules/auth/hooks/use-permission.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.mjs +7 -2
- package/dist/modules/auth/hooks/use-permission.mjs.map +1 -1
- package/dist/modules/auth/hooks/use-session.d.mts +119 -3
- package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-session.mjs +15 -10
- package/dist/modules/auth/hooks/use-session.mjs.map +1 -1
- package/dist/modules/auth/lib/helpers.server.d.mts +5 -5
- package/dist/modules/auth/lib/helpers.server.d.mts.map +1 -1
- package/dist/modules/auth/lib/validators.d.mts +1 -1
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/auth/lib/validators.mjs +1 -1
- package/dist/modules/auth/lib/validators.mjs.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/alert-dialog-command.client.mjs +2 -2
- package/dist/modules/commands/components/alert-dialog-command.client.mjs.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/click-command.client.mjs +2 -2
- package/dist/modules/commands/components/click-command.client.mjs.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 +18 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.mjs +12 -8
- package/dist/modules/commands/components/dialog-command.client.mjs.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/dropdown-command.client.mjs +2 -2
- package/dist/modules/commands/components/dropdown-command.client.mjs.map +1 -1
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/form-dialog-command.client.mjs +2 -2
- package/dist/modules/commands/components/form-dialog-command.client.mjs.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +17 -0
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts.map +1 -0
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs +42 -0
- package/dist/modules/commands/hooks/use-command-mutation.client.mjs.map +1 -0
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts +13 -8
- package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.mjs +10 -1
- package/dist/modules/commands/utils/delete-command.client.mjs.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 +3 -3
- package/dist/modules/config/lib/config.d.mts.map +1 -1
- package/dist/modules/config/lib/config.mjs.map +1 -1
- package/dist/modules/config/lib/context.d.mts +2 -2
- package/dist/modules/config/lib/context.d.mts.map +1 -1
- package/dist/modules/config/lib/context.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/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/combobox.client.mjs +5 -2
- package/dist/modules/data-tables/components/filters/combobox.client.mjs.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/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/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/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 +13 -10
- package/dist/modules/data-tables/hooks/use-context.client.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.mjs.map +1 -1
- package/dist/modules/data-tables/hooks/use-table.client.d.mts +2 -1
- package/dist/modules/data-tables/hooks/use-table.client.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-table.client.mjs.map +1 -1
- package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
- package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
- package/dist/modules/data-tables/lib/filters/config.d.mts +4 -1
- package/dist/modules/data-tables/lib/filters/config.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/config.mjs.map +1 -1
- package/dist/modules/data-tables/lib/filters/helpers.d.mts +11 -0
- package/dist/modules/data-tables/lib/filters/helpers.d.mts.map +1 -0
- package/dist/modules/data-tables/lib/filters/helpers.mjs +17 -0
- package/dist/modules/data-tables/lib/filters/helpers.mjs.map +1 -0
- package/dist/modules/data-tables/lib/filters/parsers.d.mts +7 -2
- 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/lib/filters/resolvers.d.mts +6 -1
- package/dist/modules/data-tables/lib/filters/resolvers.d.mts.map +1 -1
- package/dist/modules/data-tables/lib/filters/resolvers.mjs +8 -1
- package/dist/modules/data-tables/lib/filters/resolvers.mjs.map +1 -1
- package/dist/modules/data-tables/lib/types.d.mts +8 -5
- package/dist/modules/data-tables/lib/types.d.mts.map +1 -1
- package/dist/modules/data-tables/server/get-data.server.d.mts +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/cells/drag-handle.client.mjs +1 -1
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs.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 +5 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs +7 -3
- package/dist/modules/inline-edit/components/combobox-dropdown.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.d.mts +5 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/combobox.client.mjs +6 -2
- package/dist/modules/inline-edit/components/combobox.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-input.client.d.mts +6 -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 +5 -3
- package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +7 -3
- package/dist/modules/inline-edit/components/date-picker.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/date-picker.client.mjs +5 -3
- package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts +21 -0
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts.map +1 -0
- package/dist/modules/inline-edit/components/deprecated-editor.client.mjs +37 -0
- package/dist/modules/inline-edit/components/deprecated-editor.client.mjs.map +1 -0
- package/dist/modules/inline-edit/components/editor.client.d.mts +10 -7
- package/dist/modules/inline-edit/components/editor.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/editor.client.mjs +13 -18
- package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +4 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-recipient.client.mjs +7 -3
- package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input-toggle.client.mjs +3 -2
- package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/input.client.d.mts +18 -4
- package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/input.client.mjs +26 -5
- package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/select.client.d.mts +8 -6
- package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/select.client.mjs +3 -2
- package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/switch.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/switch.client.mjs +3 -2
- package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.d.mts +3 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts.map +1 -1
- package/dist/modules/inline-edit/components/toggle.client.mjs +3 -2
- package/dist/modules/inline-edit/components/toggle.client.mjs.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 +1 -1
- package/dist/modules/inline-edit/hooks/use-inline.client.mjs.map +1 -1
- package/dist/modules/inline-edit/lib/variants.d.mts +3 -3
- package/dist/modules/inline-edit/lib/variants.mjs +1 -1
- package/dist/modules/inline-edit/lib/variants.mjs.map +1 -1
- package/dist/modules/router/handler/context.server.d.mts +2 -2
- package/dist/modules/router/handler/context.server.d.mts.map +1 -1
- package/dist/modules/router/handler/init.server.d.mts +7 -7
- 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/{uploads/components/dropzone/context.d.mts → storage/components/dropzone-context.client.d.mts} +2 -2
- package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -0
- package/dist/modules/{uploads/components/dropzone/context.mjs → storage/components/dropzone-context.client.mjs} +2 -2
- package/dist/modules/storage/components/dropzone-context.client.mjs.map +1 -0
- package/dist/modules/{uploads/components/dropzone/index.d.mts → storage/components/dropzone.client.d.mts} +7 -7
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -0
- package/dist/modules/{uploads/components/dropzone/index.mjs → storage/components/dropzone.client.mjs} +6 -6
- package/dist/modules/storage/components/dropzone.client.mjs.map +1 -0
- package/dist/modules/storage/components/image-grid.client.d.mts +26 -0
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -0
- package/dist/modules/storage/components/image-grid.client.mjs +169 -0
- package/dist/modules/storage/components/image-grid.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts +34 -0
- package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-zone-context.client.mjs +21 -0
- package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -0
- package/dist/modules/storage/components/upload-zone.client.d.mts +51 -0
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -0
- package/dist/modules/storage/components/upload-zone.client.mjs +196 -0
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -0
- package/dist/modules/{uploads/lib → storage/config}/filters.d.mts +2 -2
- package/dist/modules/storage/config/filters.d.mts.map +1 -0
- package/dist/modules/{uploads/lib → storage/config}/filters.mjs +3 -3
- package/dist/modules/storage/config/filters.mjs.map +1 -0
- package/dist/modules/storage/lib/constants.d.mts +10 -0
- package/dist/modules/storage/lib/constants.d.mts.map +1 -0
- package/dist/modules/{uploads → storage}/lib/constants.mjs +3 -2
- package/dist/modules/storage/lib/constants.mjs.map +1 -0
- package/dist/modules/storage/lib/create-client.server.d.mts +11 -0
- package/dist/modules/storage/lib/create-client.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/create-client.server.mjs +11 -0
- package/dist/modules/storage/lib/create-client.server.mjs.map +1 -0
- package/dist/modules/storage/lib/helpers.d.mts +45 -0
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -0
- package/dist/modules/{uploads → storage}/lib/helpers.mjs +20 -6
- package/dist/modules/storage/lib/helpers.mjs.map +1 -0
- package/dist/modules/storage/lib/proxy.server.d.mts +21 -0
- package/dist/modules/storage/lib/proxy.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/proxy.server.mjs +46 -0
- package/dist/modules/storage/lib/proxy.server.mjs.map +1 -0
- package/dist/modules/storage/lib/router.server.d.mts +29074 -0
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/router.server.mjs +83 -0
- package/dist/modules/storage/lib/router.server.mjs.map +1 -0
- package/dist/modules/{uploads → storage}/lib/schema.d.mts +414 -150
- package/dist/modules/storage/lib/schema.d.mts.map +1 -0
- package/dist/modules/{uploads → storage}/lib/schema.mjs +23 -18
- package/dist/modules/storage/lib/schema.mjs.map +1 -0
- package/dist/modules/storage/lib/service.server.d.mts +188 -0
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -0
- package/dist/modules/storage/lib/service.server.mjs +297 -0
- package/dist/modules/storage/lib/service.server.mjs.map +1 -0
- package/dist/modules/{uploads → storage}/lib/validators.d.mts +413 -108
- package/dist/modules/storage/lib/validators.d.mts.map +1 -0
- package/dist/modules/storage/lib/validators.mjs +106 -0
- package/dist/modules/storage/lib/validators.mjs.map +1 -0
- package/dist/storage/client.d.mts +6 -0
- package/dist/storage/client.mjs +14 -0
- package/dist/storage/client.mjs.map +1 -0
- package/dist/storage/server.d.mts +4 -0
- package/dist/storage/server.mjs +5 -0
- package/dist/storage.d.mts +6 -0
- package/dist/storage.mjs +7 -0
- package/package.json +32 -20
- package/src/components/editor/components/block-dropdown.tsx +43 -25
- package/src/components/editor/components/content.client.tsx +1 -1
- package/src/components/editor/components/editor.client.tsx +95 -0
- package/src/components/editor/components/menu-fixed.client.tsx +165 -0
- package/src/components/editor/components/spinner.tsx +2 -2
- package/src/components/editor/lib/constants.ts +109 -0
- package/src/components/editor/lib/extensions.ts +195 -0
- package/src/components/editor/lib/helpers.ts +3 -3
- package/src/components/editor/lib/variants.ts +5 -0
- package/src/components/entry.client.ts +2 -4
- package/src/components/header/top-bar.client.tsx +1 -1
- package/src/components/layouts/admin-content.client.tsx +1 -1
- package/src/components/ui/calendar.tsx +152 -44
- package/src/components/ui/input-recipient.tsx +3 -0
- package/src/entry.ts +4 -4
- package/src/modules/auth/db/schema.ts +13 -21
- package/src/modules/auth/handler/client.client.ts +2 -0
- package/src/modules/auth/handler/init.ts +4 -1
- package/src/modules/auth/hooks/use-permission.ts +3 -2
- package/src/modules/auth/hooks/use-session.ts +16 -10
- package/src/modules/auth/lib/validators.ts +1 -1
- package/src/modules/commands/components/alert-dialog-command.client.tsx +2 -2
- package/src/modules/commands/components/click-command.client.tsx +2 -2
- package/src/modules/commands/components/dialog-command.client.tsx +20 -8
- package/src/modules/commands/components/dropdown-command.client.tsx +2 -2
- package/src/modules/commands/components/form-dialog-command.client.tsx +2 -2
- package/src/modules/commands/entry.client.ts +1 -1
- package/src/modules/commands/hooks/{use-command-action.client.tsx → use-command-mutation.client.tsx} +9 -47
- package/src/modules/commands/utils/delete-command.client.tsx +14 -2
- package/src/modules/config/db/create-client.ts +11 -4
- package/src/modules/config/entry.server.ts +0 -1
- package/src/modules/config/lib/config.ts +3 -3
- package/src/modules/config/lib/context.ts +2 -2
- package/src/modules/data-tables/components/filters/combobox.client.tsx +3 -3
- package/src/modules/data-tables/entry.ts +1 -1
- package/src/modules/data-tables/hooks/use-context.client.tsx +31 -13
- package/src/modules/data-tables/hooks/use-table.client.ts +6 -3
- package/src/modules/data-tables/lib/filters/config.ts +1 -0
- package/src/modules/data-tables/lib/filters/helpers.ts +19 -0
- package/src/modules/data-tables/lib/filters/parsers.ts +14 -1
- package/src/modules/data-tables/lib/filters/resolvers.ts +8 -0
- package/src/modules/data-tables/lib/types.ts +10 -3
- package/src/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.tsx +1 -1
- package/src/modules/inline-edit/components/combobox-dropdown.client.tsx +9 -2
- package/src/modules/inline-edit/components/combobox.client.tsx +8 -1
- package/src/modules/inline-edit/components/date-input.client.tsx +7 -3
- package/src/modules/inline-edit/components/date-picker.client.tsx +10 -3
- package/src/modules/inline-edit/components/deprecated-editor.client.tsx +48 -0
- package/src/modules/inline-edit/components/editor.client.tsx +32 -29
- package/src/modules/inline-edit/components/input-recipient.client.tsx +6 -2
- package/src/modules/inline-edit/components/input-toggle.client.tsx +2 -0
- package/src/modules/inline-edit/components/input.client.tsx +39 -0
- package/src/modules/inline-edit/components/select.client.tsx +9 -2
- package/src/modules/inline-edit/components/switch.client.tsx +2 -0
- package/src/modules/inline-edit/components/toggle.client.tsx +2 -0
- package/src/modules/inline-edit/entry.client.ts +1 -1
- package/src/modules/inline-edit/hooks/use-inline.client.tsx +2 -2
- package/src/modules/inline-edit/lib/variants.ts +1 -1
- package/src/modules/{uploads/components/dropzone/index.tsx → storage/components/dropzone.client.tsx} +2 -2
- package/src/modules/storage/components/image-grid.client.tsx +225 -0
- package/src/modules/{uploads/components/button.client.tsx → storage/components/upload-button.client.tsx} +1 -1
- package/src/modules/storage/components/upload-zone-context.client.tsx +32 -0
- package/src/modules/storage/components/upload-zone.client.tsx +258 -0
- package/src/modules/{uploads/lib → storage/config}/filters.ts +2 -2
- package/src/modules/storage/entry.client.ts +12 -0
- package/src/modules/storage/entry.server.ts +6 -0
- package/src/modules/{uploads → storage}/entry.ts +1 -1
- package/src/modules/storage/lib/constants.ts +14 -0
- package/src/modules/storage/lib/create-client.server.ts +14 -0
- package/src/modules/{uploads → storage}/lib/helpers.ts +23 -9
- package/src/modules/storage/lib/proxy.server.ts +63 -0
- package/src/modules/storage/lib/router.server.ts +174 -0
- package/src/modules/{uploads → storage}/lib/schema.ts +34 -13
- package/src/modules/storage/lib/service.server.ts +463 -0
- package/src/modules/storage/lib/validators.ts +156 -0
- package/dist/components/editor/components/fixed-menu.client.d.mts +0 -7
- package/dist/components/editor/components/fixed-menu.client.d.mts.map +0 -1
- package/dist/components/editor/components/fixed-menu.client.mjs.map +0 -1
- package/dist/components/editor/context.client.d.mts +0 -33
- package/dist/components/editor/context.client.d.mts.map +0 -1
- package/dist/components/editor/context.client.mjs +0 -45
- package/dist/components/editor/context.client.mjs.map +0 -1
- package/dist/components/editor/index.client.d.mts +0 -11
- package/dist/components/editor/index.client.d.mts.map +0 -1
- package/dist/components/editor/index.client.mjs +0 -17
- package/dist/components/editor/index.client.mjs.map +0 -1
- package/dist/components/editor/preview.client.d.mts +0 -12
- package/dist/components/editor/preview.client.d.mts.map +0 -1
- package/dist/components/editor/preview.client.mjs +0 -19
- package/dist/components/editor/preview.client.mjs.map +0 -1
- package/dist/modules/commands/hooks/use-command-action.client.d.mts +0 -22
- package/dist/modules/commands/hooks/use-command-action.client.d.mts.map +0 -1
- package/dist/modules/commands/hooks/use-command-action.client.mjs +0 -74
- package/dist/modules/commands/hooks/use-command-action.client.mjs.map +0 -1
- package/dist/modules/config/providers/blob.d.mts +0 -10
- package/dist/modules/config/providers/blob.d.mts.map +0 -1
- package/dist/modules/config/providers/blob.mjs +0 -11
- package/dist/modules/config/providers/blob.mjs.map +0 -1
- package/dist/modules/inline-edit/components/richtext.client.d.mts +0 -15
- package/dist/modules/inline-edit/components/richtext.client.d.mts.map +0 -1
- package/dist/modules/inline-edit/components/richtext.client.mjs +0 -31
- package/dist/modules/inline-edit/components/richtext.client.mjs.map +0 -1
- package/dist/modules/uploads/components/button.client.d.mts +0 -12
- package/dist/modules/uploads/components/button.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/button.client.mjs +0 -34
- package/dist/modules/uploads/components/button.client.mjs.map +0 -1
- package/dist/modules/uploads/components/dropzone/context.d.mts.map +0 -1
- package/dist/modules/uploads/components/dropzone/context.mjs.map +0 -1
- package/dist/modules/uploads/components/dropzone/index.d.mts.map +0 -1
- package/dist/modules/uploads/components/dropzone/index.mjs.map +0 -1
- package/dist/modules/uploads/components/images/grid.client.d.mts +0 -11
- package/dist/modules/uploads/components/images/grid.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/images/grid.client.mjs +0 -119
- package/dist/modules/uploads/components/images/grid.client.mjs.map +0 -1
- package/dist/modules/uploads/components/images/input.client.d.mts +0 -16
- package/dist/modules/uploads/components/images/input.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/images/input.client.mjs +0 -28
- package/dist/modules/uploads/components/images/input.client.mjs.map +0 -1
- package/dist/modules/uploads/components/preview-dialog.client.d.mts +0 -16
- package/dist/modules/uploads/components/preview-dialog.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/preview-dialog.client.mjs +0 -22
- package/dist/modules/uploads/components/preview-dialog.client.mjs.map +0 -1
- package/dist/modules/uploads/components/zone.client.d.mts +0 -21
- package/dist/modules/uploads/components/zone.client.d.mts.map +0 -1
- package/dist/modules/uploads/components/zone.client.mjs +0 -38
- package/dist/modules/uploads/components/zone.client.mjs.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-image.client.d.mts +0 -34
- package/dist/modules/uploads/hooks/use-upload-image.client.d.mts.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-image.client.mjs +0 -101
- package/dist/modules/uploads/hooks/use-upload-image.client.mjs.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-zone.client.d.mts +0 -39
- package/dist/modules/uploads/hooks/use-upload-zone.client.d.mts.map +0 -1
- package/dist/modules/uploads/hooks/use-upload-zone.client.mjs +0 -20
- package/dist/modules/uploads/hooks/use-upload-zone.client.mjs.map +0 -1
- package/dist/modules/uploads/lib/constants.d.mts +0 -9
- package/dist/modules/uploads/lib/constants.d.mts.map +0 -1
- package/dist/modules/uploads/lib/constants.mjs.map +0 -1
- package/dist/modules/uploads/lib/filters.d.mts.map +0 -1
- package/dist/modules/uploads/lib/filters.mjs.map +0 -1
- package/dist/modules/uploads/lib/helpers.d.mts +0 -36
- package/dist/modules/uploads/lib/helpers.d.mts.map +0 -1
- package/dist/modules/uploads/lib/helpers.mjs.map +0 -1
- package/dist/modules/uploads/lib/procedures.server.d.mts +0 -13628
- package/dist/modules/uploads/lib/procedures.server.d.mts.map +0 -1
- package/dist/modules/uploads/lib/procedures.server.mjs +0 -176
- package/dist/modules/uploads/lib/procedures.server.mjs.map +0 -1
- package/dist/modules/uploads/lib/proxy.server.d.mts +0 -54
- package/dist/modules/uploads/lib/proxy.server.d.mts.map +0 -1
- package/dist/modules/uploads/lib/proxy.server.mjs +0 -97
- package/dist/modules/uploads/lib/proxy.server.mjs.map +0 -1
- package/dist/modules/uploads/lib/route.server.d.mts +0 -43
- package/dist/modules/uploads/lib/route.server.d.mts.map +0 -1
- package/dist/modules/uploads/lib/route.server.mjs +0 -70
- package/dist/modules/uploads/lib/route.server.mjs.map +0 -1
- package/dist/modules/uploads/lib/schema.d.mts.map +0 -1
- package/dist/modules/uploads/lib/schema.mjs.map +0 -1
- package/dist/modules/uploads/lib/validators.d.mts.map +0 -1
- package/dist/modules/uploads/lib/validators.mjs +0 -26
- package/dist/modules/uploads/lib/validators.mjs.map +0 -1
- package/dist/uploads/client.d.mts +0 -10
- package/dist/uploads/client.mjs +0 -11
- package/dist/uploads/server.d.mts +0 -4
- package/dist/uploads/server.mjs +0 -5
- package/dist/uploads.d.mts +0 -6
- package/dist/uploads.mjs +0 -7
- package/src/components/editor/components/fixed-menu.client.tsx +0 -143
- package/src/components/editor/context.client.tsx +0 -116
- package/src/components/editor/index.client.tsx +0 -13
- package/src/components/editor/preview.client.tsx +0 -13
- package/src/modules/config/providers/blob.ts +0 -11
- package/src/modules/inline-edit/components/richtext.client.tsx +0 -38
- package/src/modules/uploads/components/images/grid.client.tsx +0 -162
- package/src/modules/uploads/components/images/input.client.tsx +0 -34
- package/src/modules/uploads/components/preview-dialog.client.tsx +0 -21
- package/src/modules/uploads/components/zone.client.tsx +0 -56
- package/src/modules/uploads/entry.client.ts +0 -16
- package/src/modules/uploads/entry.server.ts +0 -6
- package/src/modules/uploads/hooks/use-upload-image.client.tsx +0 -131
- package/src/modules/uploads/hooks/use-upload-zone.client.ts +0 -44
- package/src/modules/uploads/lib/constants.ts +0 -10
- package/src/modules/uploads/lib/procedures.server.ts +0 -332
- package/src/modules/uploads/lib/proxy.server.ts +0 -139
- package/src/modules/uploads/lib/route.server.ts +0 -93
- package/src/modules/uploads/lib/validators.ts +0 -50
- /package/src/modules/{uploads/components/dropzone/context.tsx → storage/components/dropzone-context.client.tsx} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.mts","names":[],"sources":["../../../../src/modules/storage/lib/validators.ts"],"sourcesContent":[],"mappings":"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"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { resolveFiltersSchema } from "../../data-tables/lib/filters/resolvers.mjs";
|
|
2
|
+
import { tableQuerySchema } from "../../data-tables/lib/validators.mjs";
|
|
3
|
+
import { imageDispositions, imageVariants } from "./constants.mjs";
|
|
4
|
+
import { nodeModeEnum, nodes } from "./schema.mjs";
|
|
5
|
+
import { nodesTableFilters } from "../config/filters.mjs";
|
|
6
|
+
import { createInsertSchema, createSelectSchema, createUpdateSchema } from "drizzle-zod";
|
|
7
|
+
import { z as z$1 } from "zod";
|
|
8
|
+
|
|
9
|
+
//#region src/modules/storage/lib/validators.ts
|
|
10
|
+
/**
|
|
11
|
+
* Node mode
|
|
12
|
+
*/
|
|
13
|
+
const nodeModeSchema = z$1.enum(nodeModeEnum.enumValues);
|
|
14
|
+
/**
|
|
15
|
+
* Create node
|
|
16
|
+
*/
|
|
17
|
+
const createNodeSchema = createInsertSchema(nodes, { namespace: z$1.string() });
|
|
18
|
+
/**
|
|
19
|
+
* Update node
|
|
20
|
+
*/
|
|
21
|
+
const updateNodeSchema = createUpdateSchema(nodes);
|
|
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
|
+
* Select node
|
|
37
|
+
*/
|
|
38
|
+
const selectNodeSchema = createSelectSchema(nodes);
|
|
39
|
+
const selectNodeWithChildrenSchema = selectNodeSchema.extend({ children: z$1.array(selectNodeSchema) });
|
|
40
|
+
/**
|
|
41
|
+
* Where input
|
|
42
|
+
*/
|
|
43
|
+
const nodesTableFiltersSchema = resolveFiltersSchema(nodesTableFilters).partial().extend({
|
|
44
|
+
namespace: z$1.string(),
|
|
45
|
+
parentId: z$1.string().nullable()
|
|
46
|
+
}).transform((input) => ({
|
|
47
|
+
...input,
|
|
48
|
+
isDeleted: input?.isDeleted ?? false
|
|
49
|
+
}));
|
|
50
|
+
/**
|
|
51
|
+
* Upload file schema
|
|
52
|
+
*/
|
|
53
|
+
const uploadFileSchema = z$1.object({
|
|
54
|
+
name: z$1.string().min(1),
|
|
55
|
+
namespace: z$1.string(),
|
|
56
|
+
mode: nodeModeSchema.optional(),
|
|
57
|
+
parentId: z$1.uuid().nullable(),
|
|
58
|
+
size: z$1.number().optional().default(0),
|
|
59
|
+
contentType: z$1.string().optional().default("")
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Presign file schema
|
|
63
|
+
*/
|
|
64
|
+
const presignFileSchema = uploadFileSchema.extend({ id: z$1.uuid() });
|
|
65
|
+
/**
|
|
66
|
+
* Get file url schema
|
|
67
|
+
*/
|
|
68
|
+
const getFileURLSchemaDefaults = {
|
|
69
|
+
variant: "main",
|
|
70
|
+
disposition: "inline"
|
|
71
|
+
};
|
|
72
|
+
const getFileURLSchema = z$1.object({
|
|
73
|
+
variant: z$1.enum(imageVariants).optional().default(getFileURLSchemaDefaults.variant),
|
|
74
|
+
disposition: z$1.enum(imageDispositions).optional().default(getFileURLSchemaDefaults.disposition)
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Get by parent id input
|
|
78
|
+
*/
|
|
79
|
+
const getNodesByParentIdSchema = tableQuerySchema.pick({
|
|
80
|
+
order: true,
|
|
81
|
+
sort: true,
|
|
82
|
+
search: true
|
|
83
|
+
}).extend({ filters: nodesTableFiltersSchema });
|
|
84
|
+
/**
|
|
85
|
+
* Get object input
|
|
86
|
+
*/
|
|
87
|
+
const getObjectSchema = z$1.object({
|
|
88
|
+
id: z$1.string(),
|
|
89
|
+
variant: z$1.enum(imageVariants).optional().default(getFileURLSchemaDefaults.variant),
|
|
90
|
+
disposition: z$1.string().optional().default(getFileURLSchemaDefaults.disposition)
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Put object input
|
|
94
|
+
*/
|
|
95
|
+
const putObjectSchema = z$1.object({
|
|
96
|
+
id: z$1.string(),
|
|
97
|
+
name: z$1.string().optional().default(""),
|
|
98
|
+
variant: z$1.enum(imageVariants).optional().default("main"),
|
|
99
|
+
body: z$1.any().optional(),
|
|
100
|
+
contentType: z$1.string().optional().default(""),
|
|
101
|
+
size: z$1.number().optional().default(0)
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
export { createFileNodeSchema, createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema };
|
|
106
|
+
//# sourceMappingURL=validators.mjs.map
|
|
@@ -0,0 +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 * 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 * Create file node\n */\nexport const createFileNodeSchema = createNodeSchema.omit({\n type: true,\n});\nexport type CreateFileNodeSchema = z.infer<typeof createFileNodeSchema>;\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) => ({ ...input, isDeleted: input?.isDeleted ?? false }));\n\nexport type NodesTableFilters = z.input<typeof nodesTableFiltersSchema>;\n\n/**\n * Upload file schema\n */\nexport const uploadFileSchema = z.object({\n name: z.string().min(1),\n namespace: z.string(),\n mode: nodeModeSchema.optional(),\n parentId: z.uuid().nullable(),\n size: z.number().optional().default(0),\n contentType: z.string().optional().default(\"\"),\n});\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().optional().default(\"\"),\n size: z.number().optional().default(0),\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,yBAAyB,iBAAiB,KAAK;CAC1D,MAAM;CACN,aAAa;CACb,MAAM;CACN,SAAS;CACV,CAAC;;;;AAOF,MAAa,uBAAuB,iBAAiB,KAAK,EACxD,MAAM,MACP,CAAC;;;;AAMF,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;CAAE,GAAG;CAAO,WAAW,OAAO,aAAa;CAAO,EAAE;;;;AAO7E,MAAa,mBAAmBA,IAAE,OAAO;CACvC,MAAMA,IAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,WAAWA,IAAE,QAAQ;CACrB,MAAM,eAAe,UAAU;CAC/B,UAAUA,IAAE,MAAM,CAAC,UAAU;CAC7B,MAAMA,IAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;CACtC,aAAaA,IAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,GAAG;CAC/C,CAAC;;;;AAOF,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,QAAQ,GAAG;CAC9C,MAAMA,IAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;CACvC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DropzoneContext, useDropzoneContext } from "../modules/storage/components/dropzone-context.client.mjs";
|
|
2
|
+
import { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps } from "../modules/storage/components/dropzone.client.mjs";
|
|
3
|
+
import { ImageGrid, ImageGridSkeleton } from "../modules/storage/components/image-grid.client.mjs";
|
|
4
|
+
import { UploadZoneContext, UploadZoneContextValue, useUploadZone } from "../modules/storage/components/upload-zone-context.client.mjs";
|
|
5
|
+
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 };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DropzoneContext, useDropzoneContext } from "../modules/storage/components/dropzone-context.client.mjs";
|
|
2
|
+
import { Dropzone, DropzoneContent, DropzoneEmptyState } from "../modules/storage/components/dropzone.client.mjs";
|
|
3
|
+
import { UploadZoneContext, useUploadZone } from "../modules/storage/components/upload-zone-context.client.mjs";
|
|
4
|
+
import { ImageGrid, ImageGridSkeleton } from "../modules/storage/components/image-grid.client.mjs";
|
|
5
|
+
import { UploadZone } from "../modules/storage/components/upload-zone.client.mjs";
|
|
6
|
+
|
|
7
|
+
//#region src/modules/storage/entry.client.ts
|
|
8
|
+
/**
|
|
9
|
+
* Hooks
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Dropzone, DropzoneContent, DropzoneContext, DropzoneEmptyState, ImageGrid, ImageGridSkeleton, UploadZone, UploadZoneContext, useDropzoneContext, useUploadZone };
|
|
14
|
+
//# sourceMappingURL=client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.mjs","names":[],"sources":["../../src/modules/storage/entry.client.ts"],"sourcesContent":["/**\n * Components\n */\nexport * from \"./components/dropzone-context.client\";\nexport * from \"./components/dropzone.client\";\nexport * from \"./components/image-grid.client\";\nexport * from \"./components/upload-zone-context.client\";\nexport * from \"./components/upload-zone.client\";\n\n/**\n * Hooks\n */\n"],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StorageClient, createStorageClient } from "../modules/storage/lib/create-client.server.mjs";
|
|
2
|
+
import { createDriveProxyRoute } from "../modules/storage/lib/proxy.server.mjs";
|
|
3
|
+
import { createDriveBaseProcedures } from "../modules/storage/lib/router.server.mjs";
|
|
4
|
+
export { StorageClient, createDriveBaseProcedures, createDriveProxyRoute, createStorageClient };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createStorageClient } from "../modules/storage/lib/create-client.server.mjs";
|
|
2
|
+
import { createDriveProxyRoute } from "../modules/storage/lib/proxy.server.mjs";
|
|
3
|
+
import { createDriveBaseProcedures } from "../modules/storage/lib/router.server.mjs";
|
|
4
|
+
|
|
5
|
+
export { createDriveBaseProcedures, createDriveProxyRoute, createStorageClient };
|
|
@@ -0,0 +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
|
+
import { nodesTableFilters } from "./modules/storage/config/filters.mjs";
|
|
4
|
+
import { ImageDisposition, ImageVariant, deviceSizes, imageDispositions, imageSizes, imageVariants } from "./modules/storage/lib/constants.mjs";
|
|
5
|
+
import { NodeSubtype, getDriveBucketKey, getFileUrl, imageLoader, inferNodeSubtype, isFile, isFolder, nodeSubtypes, renderBytes } from "./modules/storage/lib/helpers.mjs";
|
|
6
|
+
export { CreateFileNodeSchema, 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, createFileNodeSchema, 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
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { deviceSizes, imageDispositions, imageSizes, imageVariants } from "./modules/storage/lib/constants.mjs";
|
|
2
|
+
import { getDriveBucketKey, getFileUrl, imageLoader, inferNodeSubtype, isFile, isFolder, nodeSubtypes, renderBytes } from "./modules/storage/lib/helpers.mjs";
|
|
3
|
+
import { nodeModeEnum, nodePresignedUrls, nodePresignedUrlsRelations, nodeTypeEnum, nodeVariants, nodeVariantsRelations, nodes, nodesRelations } from "./modules/storage/lib/schema.mjs";
|
|
4
|
+
import { nodesTableFilters } from "./modules/storage/config/filters.mjs";
|
|
5
|
+
import { createFileNodeSchema, createFolderNodeSchema, createNodeSchema, getFileURLSchema, getFileURLSchemaDefaults, getNodesByParentIdSchema, getObjectSchema, nodeModeSchema, nodesTableFiltersSchema, presignFileSchema, putObjectSchema, selectNodeSchema, selectNodeWithChildrenSchema, updateNodeSchema, uploadFileSchema } from "./modules/storage/lib/validators.mjs";
|
|
6
|
+
|
|
7
|
+
export { createFileNodeSchema, 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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tulip-systems/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@types/react": "
|
|
9
|
-
"@types/react-dom": "
|
|
8
|
+
"@types/react": "19.2.7",
|
|
9
|
+
"@types/react-dom": "19.2.3",
|
|
10
10
|
"eslint": "^9.39.1",
|
|
11
11
|
"tailwindcss": "^4.1.17",
|
|
12
12
|
"tsdown": "^0.17.1",
|
|
@@ -62,36 +62,48 @@
|
|
|
62
62
|
"@tanstack/react-query-devtools": "^5.91.1",
|
|
63
63
|
"@tanstack/react-table": "^8.21.2",
|
|
64
64
|
"@tanstack/react-virtual": "^3.13.13",
|
|
65
|
-
"@tiptap/
|
|
66
|
-
"@tiptap/extension-
|
|
67
|
-
"@tiptap/extension-
|
|
68
|
-
"@tiptap/extension-
|
|
69
|
-
"@tiptap/extension-
|
|
70
|
-
"@tiptap/extension-
|
|
71
|
-
"@tiptap/
|
|
72
|
-
"@tiptap/
|
|
73
|
-
"@tiptap/
|
|
74
|
-
"@tiptap/
|
|
75
|
-
"@
|
|
65
|
+
"@tiptap/core": "^3.14.0",
|
|
66
|
+
"@tiptap/extension-blockquote": "^3.14.0",
|
|
67
|
+
"@tiptap/extension-bold": "^3.14.0",
|
|
68
|
+
"@tiptap/extension-color": "^3.14.0",
|
|
69
|
+
"@tiptap/extension-document": "^3.14.0",
|
|
70
|
+
"@tiptap/extension-hard-break": "^3.14.0",
|
|
71
|
+
"@tiptap/extension-heading": "^3.14.0",
|
|
72
|
+
"@tiptap/extension-highlight": "^3.14.0",
|
|
73
|
+
"@tiptap/extension-horizontal-rule": "^3.14.0",
|
|
74
|
+
"@tiptap/extension-image": "^3.14.0",
|
|
75
|
+
"@tiptap/extension-italic": "^3.14.0",
|
|
76
|
+
"@tiptap/extension-link": "^3.14.0",
|
|
77
|
+
"@tiptap/extension-list": "^3.14.0",
|
|
78
|
+
"@tiptap/extension-paragraph": "^3.14.0",
|
|
79
|
+
"@tiptap/extension-strike": "^3.14.0",
|
|
80
|
+
"@tiptap/extension-text": "^3.14.0",
|
|
81
|
+
"@tiptap/extension-text-style": "^3.14.0",
|
|
82
|
+
"@tiptap/extension-underline": "^3.14.0",
|
|
83
|
+
"@tiptap/extensions": "^3.14.0",
|
|
84
|
+
"@tiptap/html": "^3.14.0",
|
|
85
|
+
"@tiptap/pm": "^3.14.0",
|
|
86
|
+
"@tiptap/react": "^3.14.0",
|
|
76
87
|
"better-auth": "^1.4.5",
|
|
77
88
|
"class-variance-authority": "^0.7.1",
|
|
78
89
|
"client-only": "^0.0.1",
|
|
79
90
|
"clsx": "^2.1.1",
|
|
80
91
|
"cmdk": "1.1.1",
|
|
81
92
|
"date-fns": "^4.1.0",
|
|
93
|
+
"deepmerge": "^4.3.1",
|
|
82
94
|
"drizzle-orm": "^0.45.0",
|
|
83
95
|
"drizzle-zod": "^0.8.3",
|
|
84
96
|
"embla-carousel-react": "^8.5.2",
|
|
85
97
|
"lucide-react": "^0.556.0",
|
|
86
98
|
"motion": "^12.23.25",
|
|
87
|
-
"next": "16.
|
|
99
|
+
"next": "16.1.1",
|
|
88
100
|
"next-themes": "^0.4.6",
|
|
89
101
|
"nuqs": "2.8.3",
|
|
90
102
|
"postgres": "^3.4.5",
|
|
91
|
-
"react": "
|
|
103
|
+
"react": "19.2.3",
|
|
92
104
|
"react-colorful": "^5.6.1",
|
|
93
105
|
"react-day-picker": "9.12.0",
|
|
94
|
-
"react-dom": "
|
|
106
|
+
"react-dom": "19.2.3",
|
|
95
107
|
"react-dropzone": "^14.3.8",
|
|
96
108
|
"react-email": "^5.0.6",
|
|
97
109
|
"react-hook-form": "^7.68.0",
|
|
@@ -150,9 +162,9 @@
|
|
|
150
162
|
"./router": "./dist/router.mjs",
|
|
151
163
|
"./router/client": "./dist/router/client.mjs",
|
|
152
164
|
"./router/server": "./dist/router/server.mjs",
|
|
153
|
-
"./
|
|
154
|
-
"./
|
|
155
|
-
"./
|
|
165
|
+
"./storage": "./dist/storage.mjs",
|
|
166
|
+
"./storage/client": "./dist/storage/client.mjs",
|
|
167
|
+
"./storage/server": "./dist/storage/server.mjs",
|
|
156
168
|
"./package.json": "./package.json",
|
|
157
169
|
"./styles.css": "./src/styles.css"
|
|
158
170
|
},
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
DropdownMenuItem,
|
|
6
6
|
DropdownMenuTrigger,
|
|
7
7
|
} from "@/components/ui/dropdown-menu";
|
|
8
|
+
import { Separator } from "@/components/ui/separator";
|
|
8
9
|
import { Editor } from "@tiptap/react";
|
|
9
10
|
import {
|
|
10
11
|
ChevronDown,
|
|
@@ -18,7 +19,8 @@ import {
|
|
|
18
19
|
TextIcon,
|
|
19
20
|
} from "lucide-react";
|
|
20
21
|
import { useContext } from "react";
|
|
21
|
-
import {
|
|
22
|
+
import { EditorExtensionsConfigResult } from "../lib/extensions";
|
|
23
|
+
import { EditorContext } from "./editor.client";
|
|
22
24
|
|
|
23
25
|
const blocks = [
|
|
24
26
|
{
|
|
@@ -26,82 +28,98 @@ const blocks = [
|
|
|
26
28
|
icon: TextIcon,
|
|
27
29
|
selected: (editor: Editor) => editor.isActive("paragraph"),
|
|
28
30
|
handler: (editor: Editor) => editor.commands.setParagraph(),
|
|
31
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.paragraph,
|
|
29
32
|
},
|
|
30
33
|
{
|
|
31
34
|
label: "Titel 1",
|
|
32
35
|
icon: Heading1Icon,
|
|
33
36
|
selected: (editor: Editor) => editor.isActive("heading", { level: 1 }),
|
|
34
37
|
handler: (editor: Editor) => editor.commands.setHeading({ level: 1 }),
|
|
38
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,
|
|
35
39
|
},
|
|
36
40
|
{
|
|
37
41
|
label: "Titel 2",
|
|
38
42
|
icon: Heading2Icon,
|
|
39
43
|
selected: (editor: Editor) => editor.isActive("heading", { level: 2 }),
|
|
40
44
|
handler: (editor: Editor) => editor.commands.setHeading({ level: 2 }),
|
|
45
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,
|
|
41
46
|
},
|
|
42
47
|
{
|
|
43
48
|
label: "Titel 3",
|
|
44
49
|
icon: Heading3Icon,
|
|
45
50
|
selected: (editor: Editor) => editor.isActive("heading", { level: 3 }),
|
|
46
51
|
handler: (editor: Editor) => editor.commands.setHeading({ level: 3 }),
|
|
52
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,
|
|
47
53
|
},
|
|
48
54
|
{
|
|
49
55
|
label: "Titel 4",
|
|
50
56
|
icon: Heading4Icon,
|
|
51
57
|
selected: (editor: Editor) => editor.isActive("heading", { level: 4 }),
|
|
52
58
|
handler: (editor: Editor) => editor.commands.setHeading({ level: 4 }),
|
|
59
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,
|
|
53
60
|
},
|
|
54
61
|
{
|
|
55
62
|
label: "Titel 5",
|
|
56
63
|
icon: Heading5Icon,
|
|
57
64
|
selected: (editor: Editor) => editor.isActive("heading", { level: 5 }),
|
|
58
65
|
handler: (editor: Editor) => editor.commands.setHeading({ level: 5 }),
|
|
66
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,
|
|
59
67
|
},
|
|
60
68
|
{
|
|
61
69
|
label: "Numbered List",
|
|
62
70
|
icon: ListOrderedIcon,
|
|
63
71
|
selected: (editor: Editor) => editor.isActive("orderedList"),
|
|
64
72
|
handler: (editor: Editor) => editor.commands.toggleOrderedList(),
|
|
73
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.orderedList,
|
|
65
74
|
},
|
|
66
75
|
{
|
|
67
76
|
label: "Bulleted List",
|
|
68
77
|
icon: ListIcon,
|
|
69
78
|
selected: (editor: Editor) => editor.isActive("bulletList"),
|
|
70
79
|
handler: (editor: Editor) => editor.commands.toggleBulletList(),
|
|
80
|
+
hidden: (extensions: EditorExtensionsConfigResult) => !extensions.bulletList,
|
|
71
81
|
},
|
|
72
82
|
];
|
|
73
83
|
|
|
74
84
|
export function BlockDropdown() {
|
|
75
|
-
const { editor } = useContext(EditorContext);
|
|
85
|
+
const { editor, extensions } = useContext(EditorContext);
|
|
76
86
|
|
|
77
87
|
const selectedBlock = blocks.find((block) => block.selected(editor));
|
|
78
88
|
const Icon = selectedBlock?.icon;
|
|
79
89
|
|
|
90
|
+
const filteredBlocks = blocks.filter((block) => !block.hidden(extensions));
|
|
91
|
+
|
|
92
|
+
if (filteredBlocks.length === 0) return null;
|
|
93
|
+
|
|
80
94
|
return (
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
<
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
<>
|
|
96
|
+
<DropdownMenu>
|
|
97
|
+
<DropdownMenuTrigger asChild>
|
|
98
|
+
<Button variant="outline" size="sm" className="flex items-center gap-8 p-2">
|
|
99
|
+
<span className="flex items-center gap-2">
|
|
100
|
+
{Icon && <Icon className="size-3.5" />}
|
|
101
|
+
{selectedBlock?.label ?? "Select a block"}
|
|
102
|
+
</span>
|
|
103
|
+
|
|
104
|
+
<ChevronDown className="size-3.5" />
|
|
105
|
+
</Button>
|
|
106
|
+
</DropdownMenuTrigger>
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
<DropdownMenuContent>
|
|
109
|
+
{filteredBlocks.map(({ label, icon: Icon, handler }, index) => (
|
|
110
|
+
<DropdownMenuItem
|
|
111
|
+
key={index}
|
|
112
|
+
onClick={() => handler(editor)}
|
|
113
|
+
className="flex items-center gap-2"
|
|
114
|
+
>
|
|
115
|
+
{Icon && <Icon className="size-3.5" />}
|
|
116
|
+
{label}
|
|
117
|
+
</DropdownMenuItem>
|
|
118
|
+
))}
|
|
119
|
+
</DropdownMenuContent>
|
|
120
|
+
</DropdownMenu>
|
|
92
121
|
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
<DropdownMenuItem
|
|
96
|
-
key={index}
|
|
97
|
-
onClick={() => handler(editor)}
|
|
98
|
-
className="flex items-center gap-2"
|
|
99
|
-
>
|
|
100
|
-
{Icon && <Icon className="size-3.5" />}
|
|
101
|
-
{label}
|
|
102
|
-
</DropdownMenuItem>
|
|
103
|
-
))}
|
|
104
|
-
</DropdownMenuContent>
|
|
105
|
-
</DropdownMenu>
|
|
122
|
+
<Separator orientation="vertical" className="h-8" />
|
|
123
|
+
</>
|
|
106
124
|
);
|
|
107
125
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { TooltipProvider } from "@/components/ui/tooltip.client";
|
|
4
4
|
import { EditorContent as TiptapEditorContent } from "@tiptap/react";
|
|
5
5
|
import { useContext } from "react";
|
|
6
|
-
import { EditorContext } from "
|
|
6
|
+
import { EditorContext } from "./editor.client";
|
|
7
7
|
|
|
8
8
|
export function EditorContent() {
|
|
9
9
|
const { editor } = useContext(EditorContext);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils/cn";
|
|
4
|
+
import { Content, Editor as TiptapEditor, useEditor } from "@tiptap/react";
|
|
5
|
+
import { cva, VariantProps } from "class-variance-authority";
|
|
6
|
+
import { createContext, PropsWithChildren } from "react";
|
|
7
|
+
import {
|
|
8
|
+
EditorExtensionsConfig,
|
|
9
|
+
EditorExtensionsConfigResult,
|
|
10
|
+
editorExtensionsConfigToExtensions,
|
|
11
|
+
flattenEditorExtensionsConfig,
|
|
12
|
+
} from "../lib/extensions";
|
|
13
|
+
import { EditorJSONContent } from "../lib/types";
|
|
14
|
+
import { editorProseVariants } from "../lib/variants";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Editor context
|
|
18
|
+
*/
|
|
19
|
+
type EditorContextValue = {
|
|
20
|
+
editor: TiptapEditor;
|
|
21
|
+
extensions: EditorExtensionsConfigResult;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const EditorContext = createContext({} as EditorContextValue);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Editor variants
|
|
28
|
+
*/
|
|
29
|
+
export const editorVariants = cva("", {
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
default:
|
|
33
|
+
"border-input rounded-lg border [&_.editor-content]:p-3 [&_.editor-content[contenteditable='false']]:pointer-events-none [&_.editor-content[contenteditable='false']]:cursor-not-allowed [&_.editor-content[contenteditable='false']]:opacity-50",
|
|
34
|
+
table:
|
|
35
|
+
"[&_.editor-content[contenteditable='false']]:pointer-events-none [&_.editor-content[contenteditable='false']]:cursor-not-allowed [&_.editor-content[contenteditable='false']]:opacity-50",
|
|
36
|
+
preview: "bg-transparent [&_.editor-content]:p-0 [&_.editor-content]:min-h-0",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
variant: "default",
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Editor context provider
|
|
46
|
+
*/
|
|
47
|
+
export type EditorProps = VariantProps<typeof editorVariants> &
|
|
48
|
+
PropsWithChildren<{
|
|
49
|
+
value?: Content;
|
|
50
|
+
extensions?: Partial<EditorExtensionsConfig>;
|
|
51
|
+
onUpdate?: (value: EditorJSONContent) => void;
|
|
52
|
+
onBlur?: (value: EditorJSONContent) => void;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
className?: string;
|
|
55
|
+
}>;
|
|
56
|
+
|
|
57
|
+
export function Editor({
|
|
58
|
+
value,
|
|
59
|
+
extensions,
|
|
60
|
+
onUpdate,
|
|
61
|
+
onBlur,
|
|
62
|
+
disabled,
|
|
63
|
+
variant,
|
|
64
|
+
className,
|
|
65
|
+
children,
|
|
66
|
+
}: EditorProps) {
|
|
67
|
+
const editor = useEditor({
|
|
68
|
+
extensions: editorExtensionsConfigToExtensions(extensions),
|
|
69
|
+
content: value,
|
|
70
|
+
onUpdate: ({ editor }) => onUpdate?.(editor.getJSON()),
|
|
71
|
+
onBlur: ({ editor }) => onBlur?.(editor.getJSON()),
|
|
72
|
+
editable: !disabled,
|
|
73
|
+
injectCSS: false,
|
|
74
|
+
immediatelyRender: false,
|
|
75
|
+
editorProps: {
|
|
76
|
+
transformPastedHTML: (html) => html.replace(/<img.*?>/g, ""),
|
|
77
|
+
attributes: {
|
|
78
|
+
class: cn("editor-content text-sm max-w-full focus:outline-none", editorProseVariants(), className),
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
if (!editor) return null;
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<EditorContext.Provider
|
|
87
|
+
value={{
|
|
88
|
+
editor,
|
|
89
|
+
extensions: flattenEditorExtensionsConfig(extensions),
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
<div className={editorVariants({ variant })}>{children}</div>
|
|
93
|
+
</EditorContext.Provider>
|
|
94
|
+
);
|
|
95
|
+
}
|