@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ImageOptions } from "@tiptap/extension-image";
|
|
2
|
+
import "@tiptap/core";
|
|
3
|
+
|
|
4
|
+
//#region src/components/editor/extensions/image/extension.d.ts
|
|
5
|
+
interface ImageOptions$1 extends ImageOptions {}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ImageOptions$1 as ImageOptions };
|
|
8
|
+
//# sourceMappingURL=extension.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../../../../src/components/editor/extensions/image/extension.ts"],"sourcesContent":[],"mappings":";;;;UAKiB,cAAA,SAAqB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { getFileUrl } from "../../../../modules/storage/lib/helpers.mjs";
|
|
4
|
+
import { Image } from "@tiptap/extension-image";
|
|
5
|
+
|
|
6
|
+
//#region src/components/editor/extensions/image/extension.ts
|
|
7
|
+
const Image$1 = Image.extend({
|
|
8
|
+
atom: true,
|
|
9
|
+
addAttributes() {
|
|
10
|
+
return {
|
|
11
|
+
...this.parent?.(),
|
|
12
|
+
nodeId: {
|
|
13
|
+
default: null,
|
|
14
|
+
parseHTML: (el) => el.getAttribute("data-node-id"),
|
|
15
|
+
renderHTML: (attrs) => {
|
|
16
|
+
if (!attrs.nodeId) return {};
|
|
17
|
+
return {
|
|
18
|
+
"data-node-id": attrs.nodeId,
|
|
19
|
+
...attrs.nodeId && !attrs.isPending ? { src: getFileUrl(attrs.nodeId) } : {}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
alt: { default: null },
|
|
24
|
+
title: { default: null },
|
|
25
|
+
width: { default: null },
|
|
26
|
+
height: { default: null },
|
|
27
|
+
isPending: {
|
|
28
|
+
default: false,
|
|
29
|
+
renderHTML: (attrs) => attrs.isPending ? { "data-pending": "true" } : {}
|
|
30
|
+
},
|
|
31
|
+
fileName: { default: null }
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
parseHTML() {
|
|
35
|
+
return [{ tag: "img[data-node-id]" }];
|
|
36
|
+
},
|
|
37
|
+
renderHTML({ HTMLAttributes }) {
|
|
38
|
+
const { src: _, ...attrs } = HTMLAttributes;
|
|
39
|
+
console.log("attrs", attrs);
|
|
40
|
+
const nodeId = attrs.nodeId;
|
|
41
|
+
const isPending = Boolean(attrs.isPending);
|
|
42
|
+
const src = nodeId && !isPending ? getFileUrl(nodeId) : null;
|
|
43
|
+
return ["img", {
|
|
44
|
+
...attrs,
|
|
45
|
+
...src ? { src } : {}
|
|
46
|
+
}];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Image$1 as Image };
|
|
52
|
+
//# sourceMappingURL=extension.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension.mjs","names":["Image","TiptapImage"],"sources":["../../../../../src/components/editor/extensions/image/extension.ts"],"sourcesContent":["\"use client\";\n\nimport { getFileUrl } from \"@/modules/storage/lib/helpers\";\nimport { Image as TiptapImage, ImageOptions as TiptapImageOptions } from \"@tiptap/extension-image\";\n\nexport interface ImageOptions extends TiptapImageOptions {}\n\nexport const Image = TiptapImage.extend<ImageOptions>({\n atom: true,\n addAttributes() {\n return {\n ...this.parent?.(),\n // node id\n nodeId: {\n default: null,\n parseHTML: (el) => el.getAttribute(\"data-node-id\"),\n renderHTML: (attrs) => {\n if (!attrs.nodeId) return {};\n return {\n \"data-node-id\": attrs.nodeId,\n ...(attrs.nodeId && !attrs.isPending ? { src: getFileUrl(attrs.nodeId) } : {}),\n };\n },\n },\n\n // semantics\n alt: { default: null },\n title: { default: null },\n\n // layout stability\n width: { default: null },\n height: { default: null },\n\n // upload UX\n isPending: {\n default: false,\n renderHTML: (attrs) => (attrs.isPending ? { \"data-pending\": \"true\" } : {}),\n },\n fileName: { default: null },\n };\n },\n parseHTML() {\n return [{ tag: \"img[data-node-id]\" }];\n },\n renderHTML({ HTMLAttributes }) {\n const { src: _, ...attrs } = HTMLAttributes;\n\n console.log(\"attrs\", attrs);\n\n const nodeId = attrs.nodeId as string | null;\n const isPending = Boolean(attrs.isPending);\n\n const src = nodeId && !isPending ? getFileUrl(nodeId) : null;\n\n return [\"img\", { ...attrs, ...(src ? { src } : {}) }];\n },\n});\n"],"mappings":";;;;;;AAOA,MAAaA,UAAQC,MAAY,OAAqB;CACpD,MAAM;CACN,gBAAgB;AACd,SAAO;GACL,GAAG,KAAK,UAAU;GAElB,QAAQ;IACN,SAAS;IACT,YAAY,OAAO,GAAG,aAAa,eAAe;IAClD,aAAa,UAAU;AACrB,SAAI,CAAC,MAAM,OAAQ,QAAO,EAAE;AAC5B,YAAO;MACL,gBAAgB,MAAM;MACtB,GAAI,MAAM,UAAU,CAAC,MAAM,YAAY,EAAE,KAAK,WAAW,MAAM,OAAO,EAAE,GAAG,EAAE;MAC9E;;IAEJ;GAGD,KAAK,EAAE,SAAS,MAAM;GACtB,OAAO,EAAE,SAAS,MAAM;GAGxB,OAAO,EAAE,SAAS,MAAM;GACxB,QAAQ,EAAE,SAAS,MAAM;GAGzB,WAAW;IACT,SAAS;IACT,aAAa,UAAW,MAAM,YAAY,EAAE,gBAAgB,QAAQ,GAAG,EAAE;IAC1E;GACD,UAAU,EAAE,SAAS,MAAM;GAC5B;;CAEH,YAAY;AACV,SAAO,CAAC,EAAE,KAAK,qBAAqB,CAAC;;CAEvC,WAAW,EAAE,kBAAkB;EAC7B,MAAM,EAAE,KAAK,GAAG,GAAG,UAAU;AAE7B,UAAQ,IAAI,SAAS,MAAM;EAE3B,MAAM,SAAS,MAAM;EACrB,MAAM,YAAY,QAAQ,MAAM,UAAU;EAE1C,MAAM,MAAM,UAAU,CAAC,YAAY,WAAW,OAAO,GAAG;AAExD,SAAO,CAAC,OAAO;GAAE,GAAG;GAAO,GAAI,MAAM,EAAE,KAAK,GAAG,EAAE;GAAG,CAAC;;CAExD,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { SkeletonNodeRenderer } from "./renderer.mjs";
|
|
4
|
+
import { Node } from "@tiptap/core";
|
|
5
|
+
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/editor/extensions/skeleton/extension.ts
|
|
8
|
+
const Skeleton = Node.create({
|
|
9
|
+
name: "skeleton",
|
|
10
|
+
atom: true,
|
|
11
|
+
inline: true,
|
|
12
|
+
group: "inline",
|
|
13
|
+
selectable: false,
|
|
14
|
+
draggable: false,
|
|
15
|
+
addAttributes() {
|
|
16
|
+
return {
|
|
17
|
+
imageNodeId: { default: null },
|
|
18
|
+
width: { default: null },
|
|
19
|
+
height: { default: null }
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
addOptions() {
|
|
23
|
+
return { addToHistory: false };
|
|
24
|
+
},
|
|
25
|
+
parseHTML() {
|
|
26
|
+
return [{ tag: "span[data-skeleton]" }];
|
|
27
|
+
},
|
|
28
|
+
renderHTML({ HTMLAttributes }) {
|
|
29
|
+
return ["span", {
|
|
30
|
+
...HTMLAttributes,
|
|
31
|
+
"data-skeleton": "true"
|
|
32
|
+
}];
|
|
33
|
+
},
|
|
34
|
+
addNodeView() {
|
|
35
|
+
return ReactNodeViewRenderer(SkeletonNodeRenderer);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Skeleton };
|
|
41
|
+
//# sourceMappingURL=extension.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension.mjs","names":[],"sources":["../../../../../src/components/editor/extensions/skeleton/extension.ts"],"sourcesContent":["\"use client\";\n\nimport { Node } from \"@tiptap/core\";\nimport { ReactNodeViewRenderer } from \"@tiptap/react\";\nimport { SkeletonNodeRenderer } from \"./renderer\";\n\nexport const Skeleton = Node.create({\n name: \"skeleton\",\n atom: true,\n inline: true,\n group: \"inline\",\n selectable: false,\n draggable: false,\n addAttributes() {\n return {\n imageNodeId: { default: null },\n width: { default: null },\n height: { default: null },\n };\n },\n addOptions() {\n return {\n addToHistory: false,\n };\n },\n parseHTML() {\n return [{ tag: \"span[data-skeleton]\" }];\n },\n renderHTML({ HTMLAttributes }) {\n return [\"span\", { ...HTMLAttributes, \"data-skeleton\": \"true\" }];\n },\n addNodeView() {\n return ReactNodeViewRenderer(SkeletonNodeRenderer);\n },\n});\n"],"mappings":";;;;;;;AAMA,MAAa,WAAW,KAAK,OAAO;CAClC,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,WAAW;CACX,gBAAgB;AACd,SAAO;GACL,aAAa,EAAE,SAAS,MAAM;GAC9B,OAAO,EAAE,SAAS,MAAM;GACxB,QAAQ,EAAE,SAAS,MAAM;GAC1B;;CAEH,aAAa;AACX,SAAO,EACL,cAAc,OACf;;CAEH,YAAY;AACV,SAAO,CAAC,EAAE,KAAK,uBAAuB,CAAC;;CAEzC,WAAW,EAAE,kBAAkB;AAC7B,SAAO,CAAC,QAAQ;GAAE,GAAG;GAAgB,iBAAiB;GAAQ,CAAC;;CAEjE,cAAc;AACZ,SAAO,sBAAsB,qBAAqB;;CAErD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Skeleton } from "../../../ui/skeleton.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { NodeViewWrapper } from "@tiptap/react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/editor/extensions/skeleton/renderer.tsx
|
|
8
|
+
function SkeletonNodeRenderer(props) {
|
|
9
|
+
const { width, height } = props.node.attrs;
|
|
10
|
+
return /* @__PURE__ */ jsx(NodeViewWrapper, {
|
|
11
|
+
as: "span",
|
|
12
|
+
"data-skeleton": "true",
|
|
13
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
14
|
+
className: "min-h-[500px] w-full",
|
|
15
|
+
style: {
|
|
16
|
+
width,
|
|
17
|
+
height
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { SkeletonNodeRenderer };
|
|
25
|
+
//# sourceMappingURL=renderer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.mjs","names":[],"sources":["../../../../../src/components/editor/extensions/skeleton/renderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { NodeViewWrapper } from \"@tiptap/react\";\n\nexport function SkeletonNodeRenderer(props: { node: any }) {\n const { width, height } = props.node.attrs;\n\n return (\n <NodeViewWrapper as=\"span\" data-skeleton=\"true\">\n <Skeleton className=\"min-h-[500px] w-full\" style={{ width, height }} />\n </NodeViewWrapper>\n );\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,qBAAqB,OAAsB;CACzD,MAAM,EAAE,OAAO,WAAW,MAAM,KAAK;AAErC,QACE,oBAAC;EAAgB,IAAG;EAAO,iBAAc;YACvC,oBAAC;GAAS,WAAU;GAAuB,OAAO;IAAE;IAAO;IAAQ;IAAI;GACvD"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { FileHandlerOptions } from "../extensions/file-handler/extension.mjs";
|
|
2
|
+
import { ImageOptions } from "../extensions/image/extension.mjs";
|
|
1
3
|
import * as _tiptap_extension_blockquote0 from "@tiptap/extension-blockquote";
|
|
2
4
|
import * as _tiptap_extension_bold0 from "@tiptap/extension-bold";
|
|
3
5
|
import * as _tiptap_extension_hard_break0 from "@tiptap/extension-hard-break";
|
|
4
6
|
import * as _tiptap_extension_heading0 from "@tiptap/extension-heading";
|
|
5
7
|
import * as _tiptap_extension_highlight0 from "@tiptap/extension-highlight";
|
|
6
8
|
import * as _tiptap_extension_horizontal_rule0 from "@tiptap/extension-horizontal-rule";
|
|
7
|
-
import * as _tiptap_extension_image0 from "@tiptap/extension-image";
|
|
8
9
|
import * as _tiptap_extension_italic0 from "@tiptap/extension-italic";
|
|
9
10
|
import * as _tiptap_extension_link0 from "@tiptap/extension-link";
|
|
10
11
|
import * as _tiptap_extension_list0 from "@tiptap/extension-list";
|
|
@@ -13,7 +14,7 @@ import * as _tiptap_extension_strike0 from "@tiptap/extension-strike";
|
|
|
13
14
|
import * as _tiptap_extension_text_style0 from "@tiptap/extension-text-style";
|
|
14
15
|
import * as _tiptap_extension_underline0 from "@tiptap/extension-underline";
|
|
15
16
|
import * as _tiptap_extensions0 from "@tiptap/extensions";
|
|
16
|
-
import * as
|
|
17
|
+
import * as _tiptap_core12 from "@tiptap/core";
|
|
17
18
|
|
|
18
19
|
//#region src/components/editor/lib/constants.d.ts
|
|
19
20
|
/**
|
|
@@ -23,36 +24,38 @@ declare const EDITOR_EXTENSIONS: {
|
|
|
23
24
|
/**
|
|
24
25
|
* Nodes
|
|
25
26
|
*/
|
|
26
|
-
blockquote:
|
|
27
|
-
document:
|
|
28
|
-
hardBreak:
|
|
29
|
-
heading:
|
|
30
|
-
horizontalRule:
|
|
31
|
-
listItem:
|
|
32
|
-
orderedList:
|
|
33
|
-
bulletList:
|
|
34
|
-
paragraph:
|
|
35
|
-
text:
|
|
36
|
-
image:
|
|
27
|
+
blockquote: _tiptap_core12.Node<_tiptap_extension_blockquote0.BlockquoteOptions, any>;
|
|
28
|
+
document: _tiptap_core12.Node<any, any>;
|
|
29
|
+
hardBreak: _tiptap_core12.Node<_tiptap_extension_hard_break0.HardBreakOptions, any>;
|
|
30
|
+
heading: _tiptap_core12.Node<_tiptap_extension_heading0.HeadingOptions, any>;
|
|
31
|
+
horizontalRule: _tiptap_core12.Node<_tiptap_extension_horizontal_rule0.HorizontalRuleOptions, any>;
|
|
32
|
+
listItem: _tiptap_core12.Node<_tiptap_extension_list0.ListItemOptions, any>;
|
|
33
|
+
orderedList: _tiptap_core12.Node<_tiptap_extension_list0.OrderedListOptions, any>;
|
|
34
|
+
bulletList: _tiptap_core12.Node<_tiptap_extension_list0.BulletListOptions, any>;
|
|
35
|
+
paragraph: _tiptap_core12.Node<_tiptap_extension_paragraph0.ParagraphOptions, any>;
|
|
36
|
+
text: _tiptap_core12.Node<any, any>;
|
|
37
|
+
image: _tiptap_core12.Node<ImageOptions, any>;
|
|
38
|
+
fileHandler: _tiptap_core12.Extension<FileHandlerOptions, any>;
|
|
39
|
+
skeleton: _tiptap_core12.Node<any, any>;
|
|
37
40
|
/**
|
|
38
41
|
* Marks
|
|
39
42
|
*/
|
|
40
|
-
bold:
|
|
41
|
-
italic:
|
|
42
|
-
link:
|
|
43
|
-
strike:
|
|
44
|
-
underline:
|
|
45
|
-
highlight:
|
|
43
|
+
bold: _tiptap_core12.Mark<_tiptap_extension_bold0.BoldOptions, any>;
|
|
44
|
+
italic: _tiptap_core12.Mark<_tiptap_extension_italic0.ItalicOptions, any>;
|
|
45
|
+
link: _tiptap_core12.Mark<_tiptap_extension_link0.LinkOptions, any>;
|
|
46
|
+
strike: _tiptap_core12.Mark<_tiptap_extension_strike0.StrikeOptions, any>;
|
|
47
|
+
underline: _tiptap_core12.Mark<_tiptap_extension_underline0.UnderlineOptions, any>;
|
|
48
|
+
highlight: _tiptap_core12.Mark<_tiptap_extension_highlight0.HighlightOptions, any>;
|
|
46
49
|
/**
|
|
47
50
|
* Extensions
|
|
48
51
|
*/
|
|
49
|
-
dropcursor:
|
|
50
|
-
gapcursor:
|
|
51
|
-
undoRedo:
|
|
52
|
-
listKeymap:
|
|
53
|
-
trailingNode:
|
|
54
|
-
textStyle:
|
|
55
|
-
color:
|
|
52
|
+
dropcursor: _tiptap_core12.Extension<_tiptap_extensions0.DropcursorOptions, any>;
|
|
53
|
+
gapcursor: _tiptap_core12.Extension<any, any>;
|
|
54
|
+
undoRedo: _tiptap_core12.Extension<_tiptap_extensions0.UndoRedoOptions, any>;
|
|
55
|
+
listKeymap: _tiptap_core12.Extension<_tiptap_extension_list0.ListKeymapOptions, any>;
|
|
56
|
+
trailingNode: _tiptap_core12.Extension<_tiptap_extensions0.TrailingNodeOptions, any>;
|
|
57
|
+
textStyle: _tiptap_core12.Mark<_tiptap_extension_text_style0.TextStyleOptions, any>;
|
|
58
|
+
color: _tiptap_core12.Extension<_tiptap_extension_text_style0.ColorOptions, any>;
|
|
56
59
|
};
|
|
57
60
|
type EditorExtensions = typeof EDITOR_EXTENSIONS;
|
|
58
61
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.mts","names":[],"sources":["../../../../src/components/editor/lib/constants.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.mts","names":[],"sources":["../../../../src/components/editor/lib/constants.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;cAwBa;;;;kCAoCZ,6BAAA,CAAA,iBAAA;;;;;;;;;;;;EApCY,QAAA,qBAoCZ,CAAA,GAAA,EAAA,GAAA,CAAA;EAAA;;;;;;;;;;;;;;;;;;;;KAEW,gBAAA,UAA0B"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { FileHandler } from "../extensions/file-handler/extension.mjs";
|
|
2
|
+
import { Image } from "../extensions/image/extension.mjs";
|
|
3
|
+
import { Skeleton } from "../extensions/skeleton/extension.mjs";
|
|
1
4
|
import { createExtensionConfig } from "./extensions.mjs";
|
|
2
5
|
import Blockquote from "@tiptap/extension-blockquote";
|
|
3
6
|
import Bold from "@tiptap/extension-bold";
|
|
@@ -6,7 +9,6 @@ import HardBreak from "@tiptap/extension-hard-break";
|
|
|
6
9
|
import Heading from "@tiptap/extension-heading";
|
|
7
10
|
import Highlight from "@tiptap/extension-highlight";
|
|
8
11
|
import HorizontalRule from "@tiptap/extension-horizontal-rule";
|
|
9
|
-
import Image from "@tiptap/extension-image";
|
|
10
12
|
import Italic from "@tiptap/extension-italic";
|
|
11
13
|
import Link from "@tiptap/extension-link";
|
|
12
14
|
import { BulletList, ListItem, ListKeymap, OrderedList } from "@tiptap/extension-list";
|
|
@@ -33,6 +35,8 @@ const EDITOR_EXTENSIONS = {
|
|
|
33
35
|
paragraph: Paragraph,
|
|
34
36
|
text: Text,
|
|
35
37
|
image: Image,
|
|
38
|
+
fileHandler: FileHandler,
|
|
39
|
+
skeleton: Skeleton,
|
|
36
40
|
bold: Bold,
|
|
37
41
|
italic: Italic,
|
|
38
42
|
link: Link,
|
|
@@ -69,7 +73,15 @@ const EDITOR_EXTENSIONS_CONFIG = [
|
|
|
69
73
|
createExtensionConfig("bulletList"),
|
|
70
74
|
createExtensionConfig("paragraph"),
|
|
71
75
|
createExtensionConfig("text"),
|
|
72
|
-
createExtensionConfig("image", {
|
|
76
|
+
createExtensionConfig("image", { resize: {
|
|
77
|
+
enabled: true,
|
|
78
|
+
directions: ["left", "right"],
|
|
79
|
+
minHeight: 50,
|
|
80
|
+
minWidth: 50,
|
|
81
|
+
alwaysPreserveAspectRatio: true
|
|
82
|
+
} }),
|
|
83
|
+
createExtensionConfig("fileHandler"),
|
|
84
|
+
createExtensionConfig("skeleton"),
|
|
73
85
|
createExtensionConfig("bold"),
|
|
74
86
|
createExtensionConfig("italic"),
|
|
75
87
|
createExtensionConfig("link"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../../src/components/editor/lib/constants.ts"],"sourcesContent":["import Blockquote from \"@tiptap/extension-blockquote\";\nimport Bold from \"@tiptap/extension-bold\";\nimport Document from \"@tiptap/extension-document\";\nimport HardBreak from \"@tiptap/extension-hard-break\";\nimport Heading from \"@tiptap/extension-heading\";\nimport Highlight from \"@tiptap/extension-highlight\";\nimport HorizontalRule from \"@tiptap/extension-horizontal-rule\";\nimport
|
|
1
|
+
{"version":3,"file":"constants.mjs","names":[],"sources":["../../../../src/components/editor/lib/constants.ts"],"sourcesContent":["import Blockquote from \"@tiptap/extension-blockquote\";\nimport Bold from \"@tiptap/extension-bold\";\nimport Document from \"@tiptap/extension-document\";\nimport HardBreak from \"@tiptap/extension-hard-break\";\nimport Heading from \"@tiptap/extension-heading\";\nimport Highlight from \"@tiptap/extension-highlight\";\nimport HorizontalRule from \"@tiptap/extension-horizontal-rule\";\nimport Italic from \"@tiptap/extension-italic\";\nimport Link from \"@tiptap/extension-link\";\nimport { BulletList, ListItem, ListKeymap, OrderedList } from \"@tiptap/extension-list\";\nimport Paragraph from \"@tiptap/extension-paragraph\";\nimport Strike from \"@tiptap/extension-strike\";\nimport Text from \"@tiptap/extension-text\";\nimport { Color, TextStyle } from \"@tiptap/extension-text-style\";\nimport Underline from \"@tiptap/extension-underline\";\nimport { Dropcursor, Gapcursor, TrailingNode, UndoRedo } from \"@tiptap/extensions\";\nimport { FileHandler } from \"../extensions/file-handler/extension\";\nimport { Image } from \"../extensions/image/extension\";\nimport { Skeleton } from \"../extensions/skeleton/extension\";\nimport { createExtensionConfig } from \"./extensions\";\n\n/**\n * Editor extensions map\n */\nexport const EDITOR_EXTENSIONS = {\n /**\n * Nodes\n */\n blockquote: Blockquote,\n document: Document,\n hardBreak: HardBreak,\n heading: Heading,\n horizontalRule: HorizontalRule,\n listItem: ListItem,\n orderedList: OrderedList,\n bulletList: BulletList,\n paragraph: Paragraph,\n text: Text,\n image: Image,\n fileHandler: FileHandler,\n skeleton: Skeleton,\n /**\n * Marks\n */\n bold: Bold,\n italic: Italic,\n link: Link,\n strike: Strike,\n underline: Underline,\n highlight: Highlight,\n /**\n * Extensions\n */\n dropcursor: Dropcursor,\n gapcursor: Gapcursor,\n undoRedo: UndoRedo,\n listKeymap: ListKeymap,\n trailingNode: TrailingNode,\n textStyle: TextStyle,\n color: Color,\n};\n\nexport type EditorExtensions = typeof EDITOR_EXTENSIONS;\n\n/**\n * Editor extensions keys\n */\nexport const EDITOR_EXTENSIONS_KEYS = Object.keys(EDITOR_EXTENSIONS);\nexport type EditorExtensionsKeys = keyof typeof EDITOR_EXTENSIONS;\n\n/**\n * Editor extensions values\n */\nexport const EDITOR_EXTENSIONS_VALUES = Object.values(EDITOR_EXTENSIONS);\n\n/**\n * Editor extensions config\n */\nexport const EDITOR_EXTENSIONS_CONFIG = [\n /**\n * Nodes\n */\n createExtensionConfig(\"blockquote\"),\n createExtensionConfig(\"document\"),\n createExtensionConfig(\"hardBreak\"),\n createExtensionConfig(\"heading\"),\n createExtensionConfig(\"horizontalRule\"),\n createExtensionConfig(\"listItem\"),\n createExtensionConfig(\"orderedList\"),\n createExtensionConfig(\"bulletList\"),\n createExtensionConfig(\"paragraph\"),\n createExtensionConfig(\"text\"),\n createExtensionConfig(\"image\", {\n resize: {\n enabled: true,\n directions: [\"left\", \"right\"],\n minHeight: 50,\n minWidth: 50,\n alwaysPreserveAspectRatio: true,\n },\n }),\n createExtensionConfig(\"fileHandler\"),\n createExtensionConfig(\"skeleton\"),\n /**\n * Marks\n */\n createExtensionConfig(\"bold\"),\n createExtensionConfig(\"italic\"),\n createExtensionConfig(\"link\"),\n createExtensionConfig(\"strike\"),\n createExtensionConfig(\"underline\"),\n createExtensionConfig(\"highlight\", { multicolor: true }),\n /**\n * Extensions\n */\n createExtensionConfig(\"dropcursor\"),\n createExtensionConfig(\"gapcursor\"),\n createExtensionConfig(\"undoRedo\"),\n createExtensionConfig(\"listKeymap\"),\n createExtensionConfig(\"trailingNode\"),\n createExtensionConfig(\"textStyle\"),\n createExtensionConfig(\"color\"),\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAa,oBAAoB;CAI/B,YAAY;CACZ,UAAU;CACV,WAAW;CACX,SAAS;CACT,gBAAgB;CAChB,UAAU;CACV,aAAa;CACb,YAAY;CACZ,WAAW;CACX,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CAIV,MAAM;CACN,QAAQ;CACR,MAAM;CACN,QAAQ;CACR,WAAW;CACX,WAAW;CAIX,YAAY;CACZ,WAAW;CACX,UAAU;CACV,YAAY;CACZ,cAAc;CACd,WAAW;CACX,OAAO;CACR;;;;AAOD,MAAa,yBAAyB,OAAO,KAAK,kBAAkB;;;;AAMpE,MAAa,2BAA2B,OAAO,OAAO,kBAAkB;;;;AAKxE,MAAa,2BAA2B;CAItC,sBAAsB,aAAa;CACnC,sBAAsB,WAAW;CACjC,sBAAsB,YAAY;CAClC,sBAAsB,UAAU;CAChC,sBAAsB,iBAAiB;CACvC,sBAAsB,WAAW;CACjC,sBAAsB,cAAc;CACpC,sBAAsB,aAAa;CACnC,sBAAsB,YAAY;CAClC,sBAAsB,OAAO;CAC7B,sBAAsB,SAAS,EAC7B,QAAQ;EACN,SAAS;EACT,YAAY,CAAC,QAAQ,QAAQ;EAC7B,WAAW;EACX,UAAU;EACV,2BAA2B;EAC5B,EACF,CAAC;CACF,sBAAsB,cAAc;CACpC,sBAAsB,WAAW;CAIjC,sBAAsB,OAAO;CAC7B,sBAAsB,SAAS;CAC/B,sBAAsB,OAAO;CAC7B,sBAAsB,SAAS;CAC/B,sBAAsB,YAAY;CAClC,sBAAsB,aAAa,EAAE,YAAY,MAAM,CAAC;CAIxD,sBAAsB,aAAa;CACnC,sBAAsB,YAAY;CAClC,sBAAsB,WAAW;CACjC,sBAAsB,aAAa;CACnC,sBAAsB,eAAe;CACrC,sBAAsB,YAAY;CAClC,sBAAsB,QAAQ;CAC/B"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FileHandlerOptions } from "../extensions/file-handler/extension.mjs";
|
|
2
|
+
import { ImageOptions } from "../extensions/image/extension.mjs";
|
|
1
3
|
import { EditorExtensions } from "./constants.mjs";
|
|
2
4
|
import { BlockquoteOptions } from "@tiptap/extension-blockquote";
|
|
3
5
|
import { BoldOptions } from "@tiptap/extension-bold";
|
|
@@ -5,7 +7,6 @@ import { HardBreakOptions } from "@tiptap/extension-hard-break";
|
|
|
5
7
|
import { HeadingOptions } from "@tiptap/extension-heading";
|
|
6
8
|
import { HighlightOptions } from "@tiptap/extension-highlight";
|
|
7
9
|
import { HorizontalRuleOptions } from "@tiptap/extension-horizontal-rule";
|
|
8
|
-
import { ImageOptions } from "@tiptap/extension-image";
|
|
9
10
|
import { ItalicOptions } from "@tiptap/extension-italic";
|
|
10
11
|
import { LinkOptions } from "@tiptap/extension-link";
|
|
11
12
|
import { BulletListOptions, ListItemOptions, ListKeymapOptions, OrderedListOptions } from "@tiptap/extension-list";
|
|
@@ -14,6 +15,7 @@ import { StrikeOptions } from "@tiptap/extension-strike";
|
|
|
14
15
|
import { ColorOptions, TextStyleOptions } from "@tiptap/extension-text-style";
|
|
15
16
|
import { UnderlineOptions } from "@tiptap/extension-underline";
|
|
16
17
|
import { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from "@tiptap/extensions";
|
|
18
|
+
import "@tiptap/core";
|
|
17
19
|
import "@tiptap/react";
|
|
18
20
|
|
|
19
21
|
//#region src/components/editor/lib/extensions.d.ts
|
|
@@ -39,6 +41,8 @@ type EditorExtensionsConfig = {
|
|
|
39
41
|
paragraph: Partial<ParagraphOptions> | boolean;
|
|
40
42
|
text: Partial<TextStyleOptions> | boolean;
|
|
41
43
|
image: Partial<ImageOptions> | boolean;
|
|
44
|
+
fileHandler: Partial<FileHandlerOptions> | boolean;
|
|
45
|
+
skeleton: boolean;
|
|
42
46
|
/**
|
|
43
47
|
* Marks
|
|
44
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.mts","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extensions.d.mts","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;;;AAKsB,KALV,sBAAA,GAKU;EAAR;;;EAGK,UAAA,EAJL,OAIK,CAJG,iBAIH,CAAA,GAAA,OAAA;EAAR,UAAA,EAHG,OAGH,CAHW,iBAGX,CAAA,GAAA,OAAA;EACe,QAAA,EAAA,OAAA;EAAR,SAAA,EAFL,OAEK,CAFG,gBAEH,CAAA,GAAA,OAAA;EACE,OAAA,EAFT,OAES,CAFD,cAEC,CAAA,GAAA,OAAA;EAAR,cAAA,EADM,OACN,CADc,qBACd,CAAA,GAAA,OAAA;EACW,QAAA,EADX,OACW,CADH,eACG,CAAA,GAAA,OAAA;EAAR,WAAA,EAAA,OAAA,CAAQ,kBAAR,CAAA,GAAA,OAAA;EACM,SAAA,EAAR,OAAQ,CAAA,gBAAA,CAAA,GAAA,OAAA;EAAR,IAAA,EACL,OADK,CACG,gBADH,CAAA,GAAA,OAAA;EACG,KAAA,EACP,OADO,CACC,YADD,CAAA,GAAA,OAAA;EAAR,WAAA,EAEO,OAFP,CAEe,kBAFf,CAAA,GAAA,OAAA;EACS,QAAA,EAAA,OAAA;EAAR;;;EAMO,IAAA,EAAR,OAAQ,CAAA,WAAA,CAAA,GAAA,OAAA;EAAR,MAAA,EACE,OADF,CACU,aADV,CAAA,GAAA,OAAA;EACU,IAAA,EACV,OADU,CACF,WADE,CAAA,GAAA,OAAA;EAAR,MAAA,EAEA,OAFA,CAEQ,aAFR,CAAA,GAAA,OAAA;EACM,SAAA,EAEH,OAFG,CAEK,gBAFL,CAAA,GAAA,OAAA;EAAR,SAAA,EAGK,OAHL,CAGa,gBAHb,CAAA,GAAA,OAAA;EACU;;;EACL,UAAA,EAKC,OALD,CAKS,iBALT,CAAA,GAAA,OAAA;EACQ,SAAA,EAAA,OAAA;EAAR,QAAA,EAMD,OANC,CAMO,eANP,CAAA,GAAA,OAAA;EAIS,UAAA,EAGR,OAHQ,CAGA,iBAHA,CAAA,GAAA,OAAA;EAAR,YAAA,EAIE,OAJF,CAIU,mBAJV,CAAA,GAAA,OAAA;EAEM,SAAA,EAGP,OAHO,CAGC,gBAHD,CAAA,GAAA,OAAA;EAAR,KAAA,EAIH,OAJG,CAIK,YAJL,CAAA,GAAA,OAAA;CACU;KA2EV,4BAAA,GAA+B,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.mjs","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":["import { BlockquoteOptions } from \"@tiptap/extension-blockquote\";\nimport { BoldOptions } from \"@tiptap/extension-bold\";\nimport { HardBreakOptions } from \"@tiptap/extension-hard-break\";\nimport { HeadingOptions } from \"@tiptap/extension-heading\";\nimport { HighlightOptions } from \"@tiptap/extension-highlight\";\nimport { HorizontalRuleOptions } from \"@tiptap/extension-horizontal-rule\";\nimport {
|
|
1
|
+
{"version":3,"file":"extensions.mjs","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":["import { BlockquoteOptions } from \"@tiptap/extension-blockquote\";\nimport { BoldOptions } from \"@tiptap/extension-bold\";\nimport { HardBreakOptions } from \"@tiptap/extension-hard-break\";\nimport { HeadingOptions } from \"@tiptap/extension-heading\";\nimport { HighlightOptions } from \"@tiptap/extension-highlight\";\nimport { HorizontalRuleOptions } from \"@tiptap/extension-horizontal-rule\";\nimport { ItalicOptions } from \"@tiptap/extension-italic\";\nimport { LinkOptions } from \"@tiptap/extension-link\";\nimport {\n BulletListOptions,\n ListItemOptions,\n ListKeymapOptions,\n OrderedListOptions,\n} from \"@tiptap/extension-list\";\nimport { ParagraphOptions } from \"@tiptap/extension-paragraph\";\nimport { StrikeOptions } from \"@tiptap/extension-strike\";\nimport { ColorOptions, TextStyleOptions } from \"@tiptap/extension-text-style\";\nimport { UnderlineOptions } from \"@tiptap/extension-underline\";\nimport { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from \"@tiptap/extensions\";\nimport { Extension } from \"@tiptap/react\";\nimport deepmerge from \"deepmerge\";\nimport { FileHandlerOptions } from \"../extensions/file-handler/extension\";\nimport { ImageOptions } from \"../extensions/image/extension\";\nimport {\n EDITOR_EXTENSIONS,\n EDITOR_EXTENSIONS_CONFIG,\n EDITOR_EXTENSIONS_KEYS,\n EditorExtensions,\n} from \"./constants\";\n\n/**\n * Editor extensions defaults\n */\n/**\n * Editor extensions map\n */\nexport type EditorExtensionsConfig = {\n /**\n * Nodes\n */\n blockquote: Partial<BlockquoteOptions> | boolean;\n bulletList: Partial<BulletListOptions> | boolean;\n document: boolean;\n hardBreak: Partial<HardBreakOptions> | boolean;\n heading: Partial<HeadingOptions> | boolean;\n horizontalRule: Partial<HorizontalRuleOptions> | boolean;\n listItem: Partial<ListItemOptions> | boolean;\n orderedList: Partial<OrderedListOptions> | boolean;\n paragraph: Partial<ParagraphOptions> | boolean;\n text: Partial<TextStyleOptions> | boolean;\n image: Partial<ImageOptions> | boolean;\n fileHandler: Partial<FileHandlerOptions> | boolean;\n skeleton: boolean;\n /**\n * Marks\n */\n bold: Partial<BoldOptions> | boolean;\n italic: Partial<ItalicOptions> | boolean;\n link: Partial<LinkOptions> | boolean;\n strike: Partial<StrikeOptions> | boolean;\n underline: Partial<UnderlineOptions> | boolean;\n highlight: Partial<HighlightOptions> | boolean;\n /**\n * Extensions\n */\n dropcursor: Partial<DropcursorOptions> | boolean;\n gapcursor: boolean;\n undoRedo: Partial<UndoRedoOptions> | boolean;\n listKeymap: Partial<ListKeymapOptions> | boolean;\n trailingNode: Partial<TrailingNodeOptions> | boolean;\n textStyle: Partial<TextStyleOptions> | boolean;\n color: Partial<ColorOptions> | boolean;\n};\n\n/**\n * Create extension config\n * @param name\n * @param defaultOptions\n * @returns\n */\nexport function createExtensionConfig<TName extends keyof EditorExtensionsConfig>(\n name: TName,\n defaultOptions: Partial<Exclude<EditorExtensionsConfig[TName], boolean>> = {},\n) {\n return {\n name,\n configure: (options: EditorExtensionsConfig[TName]) => {\n // Get extension\n const extension = EDITOR_EXTENSIONS[name];\n\n // If no options or no extension, return undefined\n if (!options || !extension) return undefined;\n\n // If no options are provided, return extension\n if (typeof options === \"boolean\") return extension.configure(defaultOptions);\n\n const extensionOptions = deepmerge(defaultOptions, options as object);\n\n // If no options are provided, return extension else configure\n return extension.configure(extensionOptions);\n },\n };\n}\n\n/**\n * Editor extensions config to extensions\n */\nexport function editorExtensionsConfigToExtensions(extensions?: Partial<EditorExtensionsConfig>) {\n return EDITOR_EXTENSIONS_CONFIG.flatMap(({ name, configure }) => {\n // Get the extension config\n const value = extensions?.[name];\n\n // if no value is provided, return extension\n if (value === undefined) return configure(true) as Extension;\n\n // If value is boolean, return extension\n return configure(value as any) as Extension;\n });\n}\n\n/**\n * Editor extensions config result\n */\nexport function flattenEditorExtensionsConfig(\n extensions?: Partial<EditorExtensionsConfig>,\n): EditorExtensionsConfigResult {\n return EDITOR_EXTENSIONS_KEYS.reduce((acc, key) => {\n const value = extensions?.[key as keyof EditorExtensionsConfig];\n\n if (value === undefined) {\n return {\n ...acc,\n [key]: true,\n };\n }\n\n return {\n ...acc,\n [key]: typeof value === \"boolean\" ? value : true,\n };\n }, {} as EditorExtensionsConfigResult);\n}\n\nexport type EditorExtensionsConfigResult = Record<keyof EditorExtensions, boolean>;\n\n// const { uploadImage } = useUploadEditor();\n// StarterKit,\n// Underline,\n// Link,\n// TextStyle,\n// Color,\n// Highlight.configure({ multicolor: true }),\n// Image.configure({\n// allowBase64: false,\n// }),\n// FileHandler.configure({\n// allowedMimeTypes: [\"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\"],\n// onDrop: (currentEditor, files, pos) => {\n// files.forEach((file) => {\n// const fileReader = new FileReader();\n\n// fileReader.readAsArrayBuffer(file);\n// fileReader.onload = async () => {\n// const response = await uploadImage(file);\n// if (!response) return;\n\n// currentEditor\n// .chain()\n// .insertContentAt(pos, {\n// type: \"image\",\n// attrs: { src: response.url },\n// })\n// .focus()\n// .run();\n// };\n// });\n// },\n// onPaste: (currentEditor, files) => {\n// files.forEach((file) => {\n// const fileReader = new FileReader();\n\n// fileReader.readAsArrayBuffer(file);\n// fileReader.onload = async () => {\n// const response = await uploadImage(file);\n// if (!response) return;\n\n// currentEditor\n// .chain()\n// .insertContentAt(currentEditor.state.selection.anchor, {\n// type: \"image\",\n// attrs: { src: response.url },\n// })\n// .focus()\n// .run();\n// };\n// });\n// },\n// }),\n"],"mappings":";;;;;;;;;;AAgFA,SAAgB,sBACd,MACA,iBAA2E,EAAE,EAC7E;AACA,QAAO;EACL;EACA,YAAY,YAA2C;GAErD,MAAM,YAAY,kBAAkB;AAGpC,OAAI,CAAC,WAAW,CAAC,UAAW,QAAO;AAGnC,OAAI,OAAO,YAAY,UAAW,QAAO,UAAU,UAAU,eAAe;GAE5E,MAAM,mBAAmB,UAAU,gBAAgB,QAAkB;AAGrE,UAAO,UAAU,UAAU,iBAAiB;;EAE/C;;;;;AAMH,SAAgB,mCAAmC,YAA8C;AAC/F,QAAO,yBAAyB,SAAS,EAAE,MAAM,gBAAgB;EAE/D,MAAM,QAAQ,aAAa;AAG3B,MAAI,UAAU,OAAW,QAAO,UAAU,KAAK;AAG/C,SAAO,UAAU,MAAa;GAC9B;;;;;AAMJ,SAAgB,8BACd,YAC8B;AAC9B,QAAO,uBAAuB,QAAQ,KAAK,QAAQ;EACjD,MAAM,QAAQ,aAAa;AAE3B,MAAI,UAAU,OACZ,QAAO;GACL,GAAG;IACF,MAAM;GACR;AAGH,SAAO;GACL,GAAG;IACF,MAAM,OAAO,UAAU,YAAY,QAAQ;GAC7C;IACA,EAAE,CAAiC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils/cn.mjs";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
|
|
3
4
|
//#region src/components/editor/lib/variants.ts
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Prose variants
|
|
7
|
+
*/
|
|
8
|
+
const editorProseVariants = cva(cn("prose dark:prose-invert", "prose-a:text-primary", "prose-headings:scroll-mt-20", "prose-h1:mt-6 prose-h1:mb-3", "prose-h2:mt-6 prose-h2:mb-3", "prose-h3:mt-5 prose-h3:mb-2", "prose-h4:mt-4 prose-h4:mb-2", "prose-ul:my-3 prose-ol:my-3", "prose-ul:pl-6 prose-ol:pl-6", "prose-li:my-1", "prose-li:marker:text-primary", "prose-li:p-0", "prose-img:my-0 prose-img:rounded-lg", "prose-blockquote:my-4 prose-blockquote:py-1", "prose-hr:my-6", "prose-pre:my-4"));
|
|
9
|
+
/**
|
|
10
|
+
* Image variants
|
|
11
|
+
*/
|
|
12
|
+
const editorImageVariants = cva(cn("[&_[data-resize-wrapper]]:!inline-block", "[&_[data-resize-wrapper]]:!relative", "[&_[data-resize-wrapper]]:max-w-full", "[&_[data-resize-wrapper]]:overflow-hidden", "[&_[data-resize-handle]]:absolute", "[&_[data-resize-handle]]:z-10", "[&_[data-resize-handle]]:rounded-full", "[&_[data-resize-handle]]:bg-muted/40", "[&_[data-resize-handle]]:w-1.5", "[&_[data-resize-handle]]:cursor-ew-resize", "[&_[data-resize-handle]]:opacity-0", "[&_[data-resize-handle]]:transition-opacity", "[&:hover_[data-resize-handle]]:opacity-100", "[&_[data-resize-state='true']_[data-resize-handle]]:opacity-100", "[&_[data-resize-handle]]:!top-1/2", "[&_[data-resize-handle]]:!bottom-auto", "[&_[data-resize-handle]]:!-translate-y-1/2", "[&_[data-resize-handle]]:!h-1/2", "[&_[data-resize-handle='left']]:!left-2", "[&_[data-resize-handle='right']]:!right-2", "[&_[data-resize-container]:has(img[data-pending='true'])]:[visibility:visible!important]", "[&_[data-resize-container]:has(img[data-pending='true'])]:[pointer-events:auto!important]", "[&_img[data-pending='true']]:bg-primary/10", "[&_img[data-pending='true']]:animate-pulse", "[&_img[data-pending='true']]:rounded-md", "[&_img[data-pending='true']]:opacity-0", "[&_img[data-pending='true']]:min-h-[500px]"));
|
|
5
13
|
|
|
6
14
|
//#endregion
|
|
7
|
-
export { editorProseVariants };
|
|
15
|
+
export { editorImageVariants, editorProseVariants };
|
|
8
16
|
//# sourceMappingURL=variants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.mjs","names":[],"sources":["../../../../src/components/editor/lib/variants.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\n\nexport const editorProseVariants = cva(\n \"prose dark:prose-invert
|
|
1
|
+
{"version":3,"file":"variants.mjs","names":[],"sources":["../../../../src/components/editor/lib/variants.ts"],"sourcesContent":["import { cn } from \"@/lib/utils/cn\";\nimport { cva } from \"class-variance-authority\";\n\n/**\n * Prose variants\n */\nexport const editorProseVariants = cva(\n cn(\n \"prose dark:prose-invert\",\n \"prose-a:text-primary\",\n \"prose-headings:scroll-mt-20\",\n \"prose-h1:mt-6 prose-h1:mb-3\",\n \"prose-h2:mt-6 prose-h2:mb-3\",\n \"prose-h3:mt-5 prose-h3:mb-2\",\n \"prose-h4:mt-4 prose-h4:mb-2\",\n \"prose-ul:my-3 prose-ol:my-3\",\n \"prose-ul:pl-6 prose-ol:pl-6\",\n \"prose-li:my-1\",\n \"prose-li:marker:text-primary\",\n \"prose-li:p-0\",\n \"prose-img:my-0 prose-img:rounded-lg\",\n \"prose-blockquote:my-4 prose-blockquote:py-1\",\n \"prose-hr:my-6\",\n \"prose-pre:my-4\",\n ),\n);\n\n/**\n * Image variants\n */\nexport const editorImageVariants = cva(\n cn(\n // wrapper (TipTap sets display:block inline → override with !)\n \"[&_[data-resize-wrapper]]:!inline-block\",\n \"[&_[data-resize-wrapper]]:!relative\",\n \"[&_[data-resize-wrapper]]:max-w-full\",\n \"[&_[data-resize-wrapper]]:overflow-hidden\",\n\n // handle base\n \"[&_[data-resize-handle]]:absolute\",\n \"[&_[data-resize-handle]]:z-10\",\n \"[&_[data-resize-handle]]:rounded-full\",\n \"[&_[data-resize-handle]]:bg-muted/40\",\n \"[&_[data-resize-handle]]:w-1.5\",\n \"[&_[data-resize-handle]]:cursor-ew-resize\",\n \"[&_[data-resize-handle]]:opacity-0\",\n \"[&_[data-resize-handle]]:transition-opacity\",\n\n // show on hover / active\n \"[&:hover_[data-resize-handle]]:opacity-100\",\n \"[&_[data-resize-state='true']_[data-resize-handle]]:opacity-100\",\n\n // ✅ override TipTap inline: top:0; bottom:0;\n \"[&_[data-resize-handle]]:!top-1/2\",\n \"[&_[data-resize-handle]]:!bottom-auto\",\n \"[&_[data-resize-handle]]:!-translate-y-1/2\",\n\n // ✅ half height (also must beat inline)\n \"[&_[data-resize-handle]]:!h-1/2\",\n\n // ✅ spacing from edge (beat inline left:0 / right:0)\n \"[&_[data-resize-handle='left']]:!left-2\",\n \"[&_[data-resize-handle='right']]:!right-2\",\n\n // ✅ override inline visibility:hidden on the resize container while pending\n \"[&_[data-resize-container]:has(img[data-pending='true'])]:[visibility:visible!important]\",\n \"[&_[data-resize-container]:has(img[data-pending='true'])]:[pointer-events:auto!important]\",\n\n // Pending img should behave like a skeleton block (even before wrapper exists)\n \"[&_img[data-pending='true']]:bg-primary/10\",\n \"[&_img[data-pending='true']]:animate-pulse\",\n \"[&_img[data-pending='true']]:rounded-md\",\n \"[&_img[data-pending='true']]:opacity-0\",\n \"[&_img[data-pending='true']]:min-h-[500px]\",\n ),\n);\n"],"mappings":";;;;;;;AAMA,MAAa,sBAAsB,IACjC,GACE,2BACA,wBACA,+BACA,+BACA,+BACA,+BACA,+BACA,+BACA,+BACA,iBACA,gCACA,gBACA,uCACA,+CACA,iBACA,iBACD,CACF;;;;AAKD,MAAa,sBAAsB,IACjC,GAEE,2CACA,uCACA,wCACA,6CAGA,qCACA,iCACA,yCACA,wCACA,kCACA,6CACA,sCACA,+CAGA,8CACA,mEAGA,qCACA,yCACA,8CAGA,mCAGA,2CACA,6CAGA,4FACA,6FAGA,8CACA,8CACA,2CACA,0CACA,6CACD,CACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime263 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/header/back-button.client.d.ts
|
|
4
4
|
declare function HeaderTopbarBackButton({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
7
|
-
}: React.HtmlHTMLAttributes<HTMLButtonElement>):
|
|
7
|
+
}: React.HtmlHTMLAttributes<HTMLButtonElement>): react_jsx_runtime263.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { HeaderTopbarBackButton };
|
|
10
10
|
//# sourceMappingURL=back-button.client.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Path } from "../../modules/config/paths/types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime264 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/header/bottom-bar.client.d.ts
|
|
@@ -11,7 +11,7 @@ type BottomBarProps = {
|
|
|
11
11
|
};
|
|
12
12
|
declare function BottomBar({
|
|
13
13
|
children
|
|
14
|
-
}: BottomBarProps):
|
|
14
|
+
}: BottomBarProps): react_jsx_runtime264.JSX.Element;
|
|
15
15
|
/**
|
|
16
16
|
* Bottombar link component
|
|
17
17
|
*/
|
|
@@ -23,7 +23,7 @@ declare function BottomBarLinks({
|
|
|
23
23
|
paths,
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: BottomBarLinksProps):
|
|
26
|
+
}: BottomBarLinksProps): react_jsx_runtime264.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { BottomBar, BottomBarLink, BottomBarLinks, BottomBarLinksProps, BottomBarProps };
|
|
29
29
|
//# sourceMappingURL=bottom-bar.client.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BreadcrumbSeparator } from "../ui/breadcrumb.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime266 from "react/jsx-runtime";
|
|
3
3
|
import { PropsWithChildren } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/header/breadcrumbs.client.d.ts
|
|
@@ -10,26 +10,26 @@ type HeaderBreadcrumb = {
|
|
|
10
10
|
type HeaderBreadcrumbProps = {
|
|
11
11
|
breadcrumbs: HeaderBreadcrumb[];
|
|
12
12
|
};
|
|
13
|
-
declare function HeaderBreadcrumbs(props: PropsWithChildren):
|
|
13
|
+
declare function HeaderBreadcrumbs(props: PropsWithChildren): react_jsx_runtime266.JSX.Element;
|
|
14
14
|
declare const HeaderBreadcrumbSeparator: typeof BreadcrumbSeparator;
|
|
15
15
|
/**
|
|
16
16
|
* Dropdown menu
|
|
17
17
|
*/
|
|
18
|
-
declare function HeaderBreadcrumbsDropdownMenu(props: PropsWithChildren):
|
|
18
|
+
declare function HeaderBreadcrumbsDropdownMenu(props: PropsWithChildren): react_jsx_runtime266.JSX.Element;
|
|
19
19
|
declare function HeaderBreadcrumbsDropdownMenuItem(props: {
|
|
20
20
|
breadcrumb: HeaderBreadcrumb;
|
|
21
|
-
}):
|
|
21
|
+
}): react_jsx_runtime266.JSX.Element;
|
|
22
22
|
/**
|
|
23
23
|
* Links
|
|
24
24
|
*/
|
|
25
25
|
declare function HeaderBreadcrumbsLink(props: {
|
|
26
26
|
breadcrumb: HeaderBreadcrumb;
|
|
27
|
-
}):
|
|
27
|
+
}): react_jsx_runtime266.JSX.Element;
|
|
28
28
|
/**
|
|
29
29
|
* Lists
|
|
30
30
|
*/
|
|
31
|
-
declare function HeaderBreadcrumbsMobileList(props: PropsWithChildren):
|
|
32
|
-
declare function HeaderBreadcrumbsDesktopList(props: PropsWithChildren):
|
|
31
|
+
declare function HeaderBreadcrumbsMobileList(props: PropsWithChildren): react_jsx_runtime266.JSX.Element;
|
|
32
|
+
declare function HeaderBreadcrumbsDesktopList(props: PropsWithChildren): react_jsx_runtime266.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { HeaderBreadcrumb, HeaderBreadcrumbProps, HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList };
|
|
35
35
|
//# sourceMappingURL=breadcrumbs.client.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime272 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/header/header.client.d.ts
|
|
@@ -6,7 +6,7 @@ declare function Header({
|
|
|
6
6
|
children,
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
|
-
}: ComponentProps<"header">):
|
|
9
|
+
}: ComponentProps<"header">): react_jsx_runtime272.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Header };
|
|
12
12
|
//# sourceMappingURL=header.client.d.mts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime273 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/header/mobile-nav-switcher.client.d.ts
|
|
4
4
|
declare function HeaderTopbarMobileNavSwitcher({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
7
|
-
}: React.HtmlHTMLAttributes<HTMLButtonElement>):
|
|
7
|
+
}: React.HtmlHTMLAttributes<HTMLButtonElement>): react_jsx_runtime273.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { HeaderTopbarMobileNavSwitcher };
|
|
10
10
|
//# sourceMappingURL=mobile-nav-switcher.client.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HeaderBreadcrumb } from "./breadcrumbs.client.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime274 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/header/top-bar.client.d.ts
|
|
@@ -11,7 +11,7 @@ type TopbarProps = {
|
|
|
11
11
|
};
|
|
12
12
|
declare function Topbar({
|
|
13
13
|
children
|
|
14
|
-
}: TopbarProps):
|
|
14
|
+
}: TopbarProps): react_jsx_runtime274.JSX.Element;
|
|
15
15
|
/**
|
|
16
16
|
* Topbar title component
|
|
17
17
|
*/
|
|
@@ -26,7 +26,7 @@ declare function TopbarTitle({
|
|
|
26
26
|
isDeleted,
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: TopbarTitleProps):
|
|
29
|
+
}: TopbarTitleProps): react_jsx_runtime274.JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* Topbar tools component
|
|
32
32
|
*/
|
|
@@ -37,7 +37,7 @@ declare function TopbarTools({
|
|
|
37
37
|
children,
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: TopbarToolsProps):
|
|
40
|
+
}: TopbarToolsProps): react_jsx_runtime274.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { Topbar, TopbarProps, TopbarTitle, TopbarTitleProps, TopbarTools, TopbarToolsProps };
|
|
43
43
|
//# sourceMappingURL=top-bar.client.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScrollArea } from "../ui/scroll-area.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime277 from "react/jsx-runtime";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/layouts/admin-content.client.d.ts
|
|
@@ -7,7 +7,7 @@ declare function AdminContent({
|
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}: ComponentProps<typeof ScrollArea>):
|
|
10
|
+
}: ComponentProps<typeof ScrollArea>): react_jsx_runtime277.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { AdminContent };
|
|
13
13
|
//# sourceMappingURL=admin-content.client.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime68 from "react/jsx-runtime";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/admin-layout.d.ts
|
|
5
|
-
declare function AdminLayout(props: PropsWithChildren):
|
|
5
|
+
declare function AdminLayout(props: PropsWithChildren): react_jsx_runtime68.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AdminLayout };
|
|
8
8
|
//# sourceMappingURL=admin-layout.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime90 from "react/jsx-runtime";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/layouts/admin-loading.d.ts
|
|
5
|
-
declare function AdminLoadingLayout(props: PropsWithChildren):
|
|
5
|
+
declare function AdminLoadingLayout(props: PropsWithChildren): react_jsx_runtime90.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AdminLoadingLayout };
|
|
8
8
|
//# sourceMappingURL=admin-loading.d.mts.map
|