betterstart-cli 0.0.97 → 0.0.99
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/assets/adapters/next/integrations/mailchimp/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/r2/actions/r2.ts +1 -1
- package/dist/assets/adapters/next/integrations/r2/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/railway-bucket/actions/railway-bucket.ts +1 -1
- package/dist/assets/adapters/next/integrations/railway-bucket/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/resend/integration.ts +1 -1
- package/dist/assets/adapters/next/integrations/vercel-blob/actions/vercel-blob.ts +1 -1
- package/dist/assets/adapters/next/integrations/vercel-blob/integration.ts +1 -1
- package/dist/assets/adapters/next/presets/blog/preset.ts +1 -1
- package/dist/assets/adapters/next/presets/portfolio/preset.ts +1 -1
- package/dist/assets/adapters/next/templates/init/api/storage-read-route.ts +2 -1
- package/dist/assets/adapters/next/templates/init/api/upload-route.ts +3 -2
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-providers.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-nav-link-skeleton.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-grid.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table-pagination.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table.tsx +2 -5
- package/dist/assets/adapters/next/templates/init/components/shared/delete-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/lifecycle-hooks-tab.tsx +7 -17
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/snippets-tab.tsx +3 -13
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-version-restore-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-button.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog-content.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-dialog.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-delete-drawer.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-filters-bar.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-gallery-dialog.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-item.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-pagination.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-preview.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-url-importer.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/search-input.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-dialog.tsx +3 -4
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-item.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-blockquote.ts +1 -70
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-code-block.ts +1 -77
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-color-highlight.ts +3 -51
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-media-insertion.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-slash-menu.ts +6 -8
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-source-mode.tsx +10 -8
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-table-add-controls.ts +4 -4
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +7 -4
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-heading-dropdown-menu.ts +3 -66
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-heading.ts +1 -41
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-is-breakpoint.ts +0 -8
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-link-popover.ts +1 -83
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-list-dropdown-menu.ts +3 -61
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-list.ts +1 -43
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-mark.ts +1 -72
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-menu-navigation.ts +0 -35
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-table-button.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-tiptap-editor.ts +0 -11
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-undo-redo.ts +1 -65
- package/dist/assets/adapters/next/templates/init/hooks/use-admin-theme.tsx +2 -4
- package/dist/assets/adapters/next/templates/init/hooks/use-dev-mode-integration.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-entity-versions.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-local-storage.ts +2 -7
- package/dist/assets/adapters/next/templates/init/hooks/use-media-filters-bar.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-media.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/use-page-boundary-blur-visibility.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-page-scroll-threshold.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-table-utils.ts +2 -2
- package/dist/assets/adapters/next/templates/init/hooks/use-upload.ts +6 -12
- package/dist/assets/adapters/next/templates/init/hooks/use-users.ts +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-webhooks.ts +3 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/cleanup-audit-logs.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/get-audit-logs.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/audit/record-audit-event.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/auth/auth.ts +4 -4
- package/dist/assets/adapters/next/templates/init/lib/actions/auth/middleware.ts +2 -10
- package/dist/assets/adapters/next/templates/init/lib/actions/email/form-delivery.ts +2 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/email/provider.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/entity-versions/get-entity-versions.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/entity-versions/internal-create-entity-version.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/get-all-form-settings.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/get-form-settings.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/forms/upsert-form-settings.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/create-media.ts +2 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media-bulk.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/delete-media.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media-by-id.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media-by-ids.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/get-media.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/media/update-media.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/profile/change-own-password.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/profile/update-email.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/storage/provider.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-files.ts +2 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/upload/upload-media-from-url.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/change-user-password.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/create-user.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/delete-user.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/get-users.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/users/update-user-role.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/create-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/delete-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/dispatch.ts +1 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-deliveries.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-secret.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhook-subscriptions.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/get-webhooks.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/regenerate-webhook-secret.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/register.ts +2 -2
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/send-test-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/actions/webhooks/update-webhook.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/db/client.ts +1 -1
- package/dist/assets/adapters/next/templates/init/lib/db/core/schema.ts +0 -24
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/register.ts +0 -7
- package/dist/assets/adapters/next/templates/init/lib/lifecycle-hooks/runner.ts +1 -1
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/media/media-page-content.tsx +4 -4
- package/dist/assets/adapters/next/templates/init/pages/profile/profile-form.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-columns.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page-content.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-table.tsx +3 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page-content.tsx +3 -2
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-table.tsx +4 -3
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-columns.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-columns.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page-content.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-table.tsx +2 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page-content.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-table.tsx +2 -1
- package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/columns.tsx +3 -2
- package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/delete-user-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/edit-role-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/users/users-page-content.tsx +2 -1
- package/dist/assets/adapters/next/templates/init/pages/users/users-table.tsx +4 -3
- package/dist/assets/adapters/next/templates/init/types/index.ts +0 -5
- package/dist/assets/adapters/next/templates/init/utils/date/date.ts +1 -6
- package/dist/assets/adapters/next/templates/init/utils/editor/content-editor-rich-extensions.ts +2 -2
- package/dist/assets/adapters/next/templates/init/utils/editor/markdown.ts +5 -5
- package/dist/assets/adapters/next/templates/init/utils/editor/slash-commands.ts +2 -2
- package/dist/assets/adapters/next/templates/init/utils/editor/table-add-controls.ts +1 -1
- package/dist/assets/adapters/next/templates/init/utils/editor/tiptap.ts +8 -127
- package/dist/assets/adapters/next/templates/init/utils/media/query.ts +1 -1
- package/dist/assets/adapters/next/templates/init/utils/seo/seo.ts +0 -10
- package/dist/assets/adapters/next/templates/init/utils/shared/cn.ts +2 -1
- package/dist/assets/adapters/next/templates/init/utils/validation/validation.ts +0 -12
- package/dist/assets/shared-assets/react-admin/custom/content-editor/editor-toolbar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/horizontal-rule-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/index.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-bubble-menu.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-editor-controls.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/math-popover-button.tsx +4 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/remove-table-part-icon.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/slash-command-menu.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode-dropdown-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode.tsx +5 -11
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-add-controls.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-bubble-menu.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-extension/node-background-extension.ts +2 -25
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node-extension.ts +0 -20
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/media-gallery-placeholder-node/media-gallery-placeholder-node.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/removable-image-node/removable-image-node.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-button.tsx +3 -18
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-button.tsx +3 -18
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/color-highlight-button.tsx +2 -37
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-button.tsx +3 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover-content.tsx +3 -9
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/color-highlight-popover.tsx +6 -12
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/highlight-color-button.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/highlight-colors.ts +2 -4
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-popover/source-color-highlight-popover.tsx +4 -9
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu-item.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +4 -19
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-button.tsx +3 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-control-popover.tsx +5 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-main.tsx +1 -13
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-popover.tsx +5 -16
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu-item.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +4 -19
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-button.tsx +3 -19
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/undo-redo-button.tsx +3 -19
- package/dist/assets/shared-assets/react-admin/custom/date-picker.tsx +1 -3
- package/dist/assets/shared-assets/react-admin/custom/date-range-picker.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/gallery-field.tsx +5 -10
- package/dist/assets/shared-assets/react-admin/custom/icon-picker.tsx +7 -4
- package/dist/assets/shared-assets/react-admin/custom/media-field-empty-state.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/media-field.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/nested-object-list-field.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/placeholder-card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/placeholder.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/progressive-blur.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/sortable-gallery-item.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/upload-dropzone.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/accordion.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/alert-dialog.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/alert.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/avatar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/badge.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/breadcrumb.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/button-group.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/button.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/carousel.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/chart.tsx +1 -2
- package/dist/assets/shared-assets/react-admin/ui/checkbox.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/command.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/context-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/dialog.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/direction.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/dropdown-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/empty.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/field.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/form.tsx +4 -10
- package/dist/assets/shared-assets/react-admin/ui/hover-card.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/input-otp.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/item.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/label.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/menubar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/native-select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/navigation-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/pagination.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/popover.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/progress.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/radio-group.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/resizable.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/scroll-area.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/separator.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sheet.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +3 -10
- package/dist/assets/shared-assets/react-admin/ui/slider.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sonner.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/switch.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/table.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/toggle-group.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/toggle.tsx +3 -2
- package/dist/assets/shared-assets/react-admin/ui/tooltip.tsx +1 -1
- package/dist/{chunk-MJWUGEMK.js → chunk-SO2CAJFC.js} +137 -9
- package/dist/chunk-SO2CAJFC.js.map +1 -0
- package/dist/cli.js +1097 -1194
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{template-reader-R2JIWUNK.js → template-reader-XMWPFYIK.js} +2 -2
- package/package.json +3 -3
- package/dist/assets/shared-assets/react-admin/dependencies.ts +0 -74
- package/dist/chunk-MJWUGEMK.js.map +0 -1
- /package/dist/{template-reader-R2JIWUNK.js.map → template-reader-XMWPFYIK.js.map} +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { ContentEditorInlineMathDelimiter, ContentEditorMathKind } from './markdown'
|
|
1
2
|
import type { JSONContent } from '@tiptap/core'
|
|
2
3
|
import type { Node as PMNode } from '@tiptap/pm/model'
|
|
3
4
|
import type { Transaction } from '@tiptap/pm/state'
|
|
5
|
+
import type { TableRect } from '@tiptap/pm/tables'
|
|
6
|
+
import type { Editor, NodeWithPos } from '@tiptap/react'
|
|
4
7
|
import { AllSelection, NodeSelection, Selection, TextSelection } from '@tiptap/pm/state'
|
|
5
8
|
import {
|
|
6
9
|
addColumn,
|
|
@@ -8,15 +11,10 @@ import {
|
|
|
8
11
|
CellSelection,
|
|
9
12
|
cellAround,
|
|
10
13
|
selectedRect,
|
|
11
|
-
TableMap
|
|
12
|
-
type TableRect
|
|
14
|
+
TableMap
|
|
13
15
|
} from '@tiptap/pm/tables'
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
type ContentEditorInlineMathDelimiter,
|
|
17
|
-
type ContentEditorMathKind,
|
|
18
|
-
parseContentEditorMathInput
|
|
19
|
-
} from './markdown'
|
|
16
|
+
import { findParentNodeClosestToPos } from '@tiptap/react'
|
|
17
|
+
import { parseContentEditorMathInput } from './markdown'
|
|
20
18
|
|
|
21
19
|
export { cn } from '@admin/utils/shared/cn'
|
|
22
20
|
|
|
@@ -451,21 +449,10 @@ export function setActiveTableColumnAlignment(
|
|
|
451
449
|
return true
|
|
452
450
|
}
|
|
453
451
|
|
|
454
|
-
/**
|
|
455
|
-
* Determines if the current platform is macOS
|
|
456
|
-
* @returns boolean indicating if the current platform is Mac
|
|
457
|
-
*/
|
|
458
452
|
export function isMac(): boolean {
|
|
459
453
|
return typeof navigator !== 'undefined' && navigator.platform.toLowerCase().includes('mac')
|
|
460
454
|
}
|
|
461
455
|
|
|
462
|
-
/**
|
|
463
|
-
* Formats a shortcut key based on the platform (Mac or non-Mac)
|
|
464
|
-
* @param key - The key to format (e.g., "ctrl", "alt", "shift")
|
|
465
|
-
* @param isMac - Boolean indicating if the platform is Mac
|
|
466
|
-
* @param capitalize - Whether to capitalize the key (default: true)
|
|
467
|
-
* @returns Formatted shortcut key symbol
|
|
468
|
-
*/
|
|
469
456
|
export const formatShortcutKey = (key: string, isMac: boolean, capitalize: boolean = true) => {
|
|
470
457
|
if (isMac) {
|
|
471
458
|
const lowerKey = key.toLowerCase()
|
|
@@ -475,13 +462,6 @@ export const formatShortcutKey = (key: string, isMac: boolean, capitalize: boole
|
|
|
475
462
|
return capitalize ? key.charAt(0).toUpperCase() + key.slice(1) : key
|
|
476
463
|
}
|
|
477
464
|
|
|
478
|
-
/**
|
|
479
|
-
* Parses a shortcut key string into an array of formatted key symbols
|
|
480
|
-
* @param shortcutKeys - The string of shortcut keys (e.g., "ctrl-alt-shift")
|
|
481
|
-
* @param delimiter - The delimiter used to split the keys (default: "-")
|
|
482
|
-
* @param capitalize - Whether to capitalize the keys (default: true)
|
|
483
|
-
* @returns Array of formatted shortcut key symbols
|
|
484
|
-
*/
|
|
485
465
|
export const parseShortcutKeys = (props: {
|
|
486
466
|
shortcutKeys: string | undefined
|
|
487
467
|
delimiter?: string
|
|
@@ -497,33 +477,16 @@ export const parseShortcutKeys = (props: {
|
|
|
497
477
|
.map((key) => formatShortcutKey(key, isMac(), capitalize))
|
|
498
478
|
}
|
|
499
479
|
|
|
500
|
-
/**
|
|
501
|
-
* Checks if a mark exists in the editor schema
|
|
502
|
-
* @param markName - The name of the mark to check
|
|
503
|
-
* @param editor - The editor instance
|
|
504
|
-
* @returns boolean indicating if the mark exists in the schema
|
|
505
|
-
*/
|
|
506
480
|
export const isMarkInSchema = (markName: string, editor: Editor | null): boolean => {
|
|
507
481
|
if (!editor?.schema) return false
|
|
508
482
|
return editor.schema.spec.marks.get(markName) !== undefined
|
|
509
483
|
}
|
|
510
484
|
|
|
511
|
-
/**
|
|
512
|
-
* Checks if a node exists in the editor schema
|
|
513
|
-
* @param nodeName - The name of the node to check
|
|
514
|
-
* @param editor - The editor instance
|
|
515
|
-
* @returns boolean indicating if the node exists in the schema
|
|
516
|
-
*/
|
|
517
485
|
export const isNodeInSchema = (nodeName: string, editor: Editor | null): boolean => {
|
|
518
486
|
if (!editor?.schema) return false
|
|
519
487
|
return editor.schema.spec.nodes.get(nodeName) !== undefined
|
|
520
488
|
}
|
|
521
489
|
|
|
522
|
-
/**
|
|
523
|
-
* Moves the focus to the next node in the editor
|
|
524
|
-
* @param editor - The editor instance
|
|
525
|
-
* @returns boolean indicating if the focus was moved
|
|
526
|
-
*/
|
|
527
490
|
export function focusNextNode(editor: Editor) {
|
|
528
491
|
const { state, view } = editor
|
|
529
492
|
const { doc, selection } = state
|
|
@@ -544,28 +507,16 @@ export function focusNextNode(editor: Editor) {
|
|
|
544
507
|
const para = paragraphType.create()
|
|
545
508
|
let tr = state.tr.insert(end, para)
|
|
546
509
|
|
|
547
|
-
// Place the selection inside the new paragraph
|
|
548
510
|
const $inside = tr.doc.resolve(end + 1)
|
|
549
511
|
tr = tr.setSelection(TextSelection.near($inside)).scrollIntoView()
|
|
550
512
|
view.dispatch(tr)
|
|
551
513
|
return true
|
|
552
514
|
}
|
|
553
515
|
|
|
554
|
-
/**
|
|
555
|
-
* Checks if a value is a valid number (not null, undefined, or NaN)
|
|
556
|
-
* @param value - The value to check
|
|
557
|
-
* @returns boolean indicating if the value is a valid number
|
|
558
|
-
*/
|
|
559
516
|
export function isValidPosition(pos: number | null | undefined): pos is number {
|
|
560
517
|
return typeof pos === 'number' && pos >= 0
|
|
561
518
|
}
|
|
562
519
|
|
|
563
|
-
/**
|
|
564
|
-
* Checks if one or more extensions are registered in the Tiptap editor.
|
|
565
|
-
* @param editor - The Tiptap editor instance
|
|
566
|
-
* @param extensionNames - A single extension name or an array of names to check
|
|
567
|
-
* @returns True if at least one of the extensions is available, false otherwise
|
|
568
|
-
*/
|
|
569
520
|
export function isExtensionAvailable(
|
|
570
521
|
editor: Editor | null,
|
|
571
522
|
extensionNames: string | string[]
|
|
@@ -587,12 +538,6 @@ export function isExtensionAvailable(
|
|
|
587
538
|
return found
|
|
588
539
|
}
|
|
589
540
|
|
|
590
|
-
/**
|
|
591
|
-
* Finds a node at the specified position with error handling
|
|
592
|
-
* @param editor The Tiptap editor instance
|
|
593
|
-
* @param position The position in the document to find the node
|
|
594
|
-
* @returns The node at the specified position, or null if not found
|
|
595
|
-
*/
|
|
596
541
|
export function findNodeAtPosition(editor: Editor, position: number) {
|
|
597
542
|
try {
|
|
598
543
|
const node = editor.state.doc.nodeAt(position)
|
|
@@ -607,14 +552,6 @@ export function findNodeAtPosition(editor: Editor, position: number) {
|
|
|
607
552
|
}
|
|
608
553
|
}
|
|
609
554
|
|
|
610
|
-
/**
|
|
611
|
-
* Finds the position and instance of a node in the document
|
|
612
|
-
* @param props Object containing editor, node (optional), and nodePos (optional)
|
|
613
|
-
* @param props.editor The Tiptap editor instance
|
|
614
|
-
* @param props.node The node to find (optional if nodePos is provided)
|
|
615
|
-
* @param props.nodePos The position of the node to find (optional if node is provided)
|
|
616
|
-
* @returns An object with the position and node, or null if not found
|
|
617
|
-
*/
|
|
618
555
|
export function findNodePosition(props: {
|
|
619
556
|
editor: Editor | null
|
|
620
557
|
node?: PMNode | null
|
|
@@ -624,7 +561,6 @@ export function findNodePosition(props: {
|
|
|
624
561
|
|
|
625
562
|
if (!editor || !editor.state?.doc) return null
|
|
626
563
|
|
|
627
|
-
// Zero is valid position
|
|
628
564
|
const hasValidNode = node !== undefined && node !== null
|
|
629
565
|
const hasValidPos = isValidPosition(nodePos)
|
|
630
566
|
|
|
@@ -632,7 +568,6 @@ export function findNodePosition(props: {
|
|
|
632
568
|
return null
|
|
633
569
|
}
|
|
634
570
|
|
|
635
|
-
// First search for the node in the document if we have a node
|
|
636
571
|
if (hasValidNode) {
|
|
637
572
|
let foundPos = -1
|
|
638
573
|
let foundNode: PMNode | null = null
|
|
@@ -651,7 +586,6 @@ export function findNodePosition(props: {
|
|
|
651
586
|
}
|
|
652
587
|
}
|
|
653
588
|
|
|
654
|
-
// If we have a valid position, use findNodeAtPosition
|
|
655
589
|
if (isValidPosition(nodePos)) {
|
|
656
590
|
const nodeAtPos = findNodeAtPosition(editor, nodePos)
|
|
657
591
|
if (nodeAtPos) {
|
|
@@ -662,13 +596,6 @@ export function findNodePosition(props: {
|
|
|
662
596
|
return null
|
|
663
597
|
}
|
|
664
598
|
|
|
665
|
-
/**
|
|
666
|
-
* Determines whether the current selection contains a node whose type matches
|
|
667
|
-
* any of the provided node type names.
|
|
668
|
-
* @param editor Tiptap editor instance
|
|
669
|
-
* @param nodeTypeNames List of node type names to match against
|
|
670
|
-
* @param checkAncestorNodes Whether to check ancestor node types up the depth chain
|
|
671
|
-
*/
|
|
672
599
|
export function isNodeTypeSelected(
|
|
673
600
|
editor: Editor | null,
|
|
674
601
|
nodeTypeNames: string[] = [],
|
|
@@ -679,13 +606,11 @@ export function isNodeTypeSelected(
|
|
|
679
606
|
const { selection } = editor.state
|
|
680
607
|
if (selection.empty) return false
|
|
681
608
|
|
|
682
|
-
// Direct node selection check
|
|
683
609
|
if (selection instanceof NodeSelection) {
|
|
684
610
|
const selectedNode = selection.node
|
|
685
611
|
return selectedNode ? nodeTypeNames.includes(selectedNode.type.name) : false
|
|
686
612
|
}
|
|
687
613
|
|
|
688
|
-
// Depth-based ancestor node check
|
|
689
614
|
if (checkAncestorNodes) {
|
|
690
615
|
const { $from } = selection
|
|
691
616
|
for (let depth = $from.depth; depth > 0; depth--) {
|
|
@@ -699,13 +624,6 @@ export function isNodeTypeSelected(
|
|
|
699
624
|
return false
|
|
700
625
|
}
|
|
701
626
|
|
|
702
|
-
/**
|
|
703
|
-
* Check whether the current selection is fully within nodes
|
|
704
|
-
* whose type names are in the provided `types` list.
|
|
705
|
-
*
|
|
706
|
-
* - NodeSelection → checks the selected node.
|
|
707
|
-
* - Text/AllSelection → ensures all textblocks within [from, to) are allowed.
|
|
708
|
-
*/
|
|
709
627
|
export function selectionWithinConvertibleTypes(editor: Editor, types: string[] = []): boolean {
|
|
710
628
|
if (!editor || types.length === 0) return false
|
|
711
629
|
|
|
@@ -723,7 +641,7 @@ export function selectionWithinConvertibleTypes(editor: Editor, types: string[]
|
|
|
723
641
|
state.doc.nodesBetween(selection.from, selection.to, (node) => {
|
|
724
642
|
if (node.isTextblock && !allowed.has(node.type.name)) {
|
|
725
643
|
valid = false
|
|
726
|
-
return false
|
|
644
|
+
return false
|
|
727
645
|
}
|
|
728
646
|
return valid
|
|
729
647
|
})
|
|
@@ -734,19 +652,8 @@ export function selectionWithinConvertibleTypes(editor: Editor, types: string[]
|
|
|
734
652
|
}
|
|
735
653
|
|
|
736
654
|
type ProtocolOptions = {
|
|
737
|
-
/**
|
|
738
|
-
* The protocol scheme to be registered.
|
|
739
|
-
* @default '''
|
|
740
|
-
* @example 'ftp'
|
|
741
|
-
* @example 'git'
|
|
742
|
-
*/
|
|
743
655
|
scheme: string
|
|
744
656
|
|
|
745
|
-
/**
|
|
746
|
-
* If enabled, it allows optional slashes after the protocol.
|
|
747
|
-
* @default false
|
|
748
|
-
* @example true
|
|
749
|
-
*/
|
|
750
657
|
optionalSlashes?: boolean
|
|
751
658
|
}
|
|
752
659
|
|
|
@@ -800,22 +707,10 @@ export function sanitizeUrl(inputUrl: string, baseUrl: string, protocols?: Proto
|
|
|
800
707
|
if (isAllowedUri(url.href, protocols)) {
|
|
801
708
|
return url.href
|
|
802
709
|
}
|
|
803
|
-
} catch {
|
|
804
|
-
// If URL creation fails, it's considered invalid
|
|
805
|
-
}
|
|
710
|
+
} catch {}
|
|
806
711
|
return '#'
|
|
807
712
|
}
|
|
808
713
|
|
|
809
|
-
/**
|
|
810
|
-
* Update a single attribute on multiple nodes.
|
|
811
|
-
*
|
|
812
|
-
* @param tr - The transaction to mutate
|
|
813
|
-
* @param targets - Array of { node, pos }
|
|
814
|
-
* @param attrName - Attribute key to update
|
|
815
|
-
* @param next - New value OR updater function receiving previous value
|
|
816
|
-
* Pass `undefined` to remove the attribute.
|
|
817
|
-
* @returns true if at least one node was updated, false otherwise
|
|
818
|
-
*/
|
|
819
714
|
export function updateNodesAttr<A extends string = string, V = unknown>(
|
|
820
715
|
tr: Transaction,
|
|
821
716
|
targets: readonly NodeWithPos[],
|
|
@@ -827,7 +722,6 @@ export function updateNodesAttr<A extends string = string, V = unknown>(
|
|
|
827
722
|
let changed = false
|
|
828
723
|
|
|
829
724
|
for (const { pos } of targets) {
|
|
830
|
-
// Always re-read from the transaction's current doc
|
|
831
725
|
const currentNode = tr.doc.nodeAt(pos)
|
|
832
726
|
if (!currentNode) continue
|
|
833
727
|
|
|
@@ -839,7 +733,6 @@ export function updateNodesAttr<A extends string = string, V = unknown>(
|
|
|
839
733
|
|
|
840
734
|
const nextAttrs: Record<string, unknown> = { ...currentNode.attrs }
|
|
841
735
|
if (resolvedNext === undefined) {
|
|
842
|
-
// Remove the key entirely instead of setting null
|
|
843
736
|
delete nextAttrs[attrName]
|
|
844
737
|
} else {
|
|
845
738
|
nextAttrs[attrName] = resolvedNext
|
|
@@ -852,11 +745,6 @@ export function updateNodesAttr<A extends string = string, V = unknown>(
|
|
|
852
745
|
return changed
|
|
853
746
|
}
|
|
854
747
|
|
|
855
|
-
/**
|
|
856
|
-
* Selects the entire content of the current block node if the selection is empty.
|
|
857
|
-
* If the selection is not empty, it does nothing.
|
|
858
|
-
* @param editor The Tiptap editor instance
|
|
859
|
-
*/
|
|
860
748
|
export function selectCurrentBlockContent(editor: Editor) {
|
|
861
749
|
const { selection, doc } = editor.state
|
|
862
750
|
|
|
@@ -893,12 +781,6 @@ export function selectCurrentBlockContent(editor: Editor) {
|
|
|
893
781
|
}
|
|
894
782
|
}
|
|
895
783
|
|
|
896
|
-
/**
|
|
897
|
-
* Retrieves all nodes of specified types from the current selection.
|
|
898
|
-
* @param selection The current editor selection
|
|
899
|
-
* @param allowedNodeTypes An array of node type names to look for (e.g., ["image", "table"])
|
|
900
|
-
* @returns An array of objects containing the node and its position
|
|
901
|
-
*/
|
|
902
784
|
export function getSelectedNodesOfType(
|
|
903
785
|
selection: Selection,
|
|
904
786
|
allowedNodeTypes: string[]
|
|
@@ -934,7 +816,6 @@ export function getSelectedNodesOfType(
|
|
|
934
816
|
}
|
|
935
817
|
}
|
|
936
818
|
|
|
937
|
-
// Fallback: find parent nodes of allowed types
|
|
938
819
|
const parentNode = findParentNodeClosestToPos($anchor, (node) => allowed.has(node.type.name))
|
|
939
820
|
|
|
940
821
|
if (parentNode) {
|
|
@@ -8,10 +8,6 @@ interface CreateMetadataOptions {
|
|
|
8
8
|
noIndex?: boolean
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Create consistent Next.js metadata for Admin-generated pages.
|
|
13
|
-
* Use this in page.tsx files for entities that have public-facing pages.
|
|
14
|
-
*/
|
|
15
11
|
export function createMetadata({
|
|
16
12
|
title,
|
|
17
13
|
description,
|
|
@@ -47,9 +43,6 @@ export function createMetadata({
|
|
|
47
43
|
return metadata
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
/**
|
|
51
|
-
* Generate JSON-LD structured data for a blog post / article.
|
|
52
|
-
*/
|
|
53
46
|
export function generateArticleSchema({
|
|
54
47
|
title,
|
|
55
48
|
description,
|
|
@@ -82,9 +75,6 @@ export function generateArticleSchema({
|
|
|
82
75
|
}
|
|
83
76
|
}
|
|
84
77
|
|
|
85
|
-
/**
|
|
86
|
-
* Serialize a JSON-LD schema object to a string for embedding in a script tag.
|
|
87
|
-
*/
|
|
88
78
|
export function schemaToJson(schema: Record<string, unknown>): string {
|
|
89
79
|
return JSON.stringify(schema)
|
|
90
80
|
}
|
|
@@ -28,9 +28,6 @@ function isFileTypeAllowed(file: File, allowedTypes: string[]): boolean {
|
|
|
28
28
|
return false
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Validate an array of files against size, type, and count constraints.
|
|
33
|
-
*/
|
|
34
31
|
export function validateFiles(
|
|
35
32
|
files: File[],
|
|
36
33
|
config: FileValidationConfig = {}
|
|
@@ -66,9 +63,6 @@ export function validateFiles(
|
|
|
66
63
|
return { valid: errors.length === 0, errors }
|
|
67
64
|
}
|
|
68
65
|
|
|
69
|
-
/**
|
|
70
|
-
* Format bytes to a human-readable string.
|
|
71
|
-
*/
|
|
72
66
|
export function formatFileSize(
|
|
73
67
|
bytes: number,
|
|
74
68
|
options: {
|
|
@@ -88,9 +82,6 @@ export function formatFileSize(
|
|
|
88
82
|
return `${trimTrailingZeros ? Number.parseFloat(value) : value} ${units[i]}`
|
|
89
83
|
}
|
|
90
84
|
|
|
91
|
-
/**
|
|
92
|
-
* Check if a string is a valid URL.
|
|
93
|
-
*/
|
|
94
85
|
export function isValidUrl(str: string): boolean {
|
|
95
86
|
try {
|
|
96
87
|
new URL(str)
|
|
@@ -100,9 +91,6 @@ export function isValidUrl(str: string): boolean {
|
|
|
100
91
|
}
|
|
101
92
|
}
|
|
102
93
|
|
|
103
|
-
/**
|
|
104
|
-
* Slugify a string for use in URLs.
|
|
105
|
-
*/
|
|
106
94
|
export function slugify(text: string): string {
|
|
107
95
|
return text
|
|
108
96
|
.toLowerCase()
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/horizontal-rule-button.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button } from '@admin/components/ui/button'
|
|
2
1
|
import type { Editor } from '@tiptap/core'
|
|
2
|
+
import { Button } from '@admin/components/ui/button'
|
|
3
3
|
import { Minus } from 'lucide-react'
|
|
4
4
|
|
|
5
5
|
export function HorizontalRuleButton({ editor }: { editor: Editor | null }) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import type { ContentEditorMode } from '@admin/utils/editor/content-editor'
|
|
3
4
|
import { Card, CardContent } from '@admin/components/ui/card'
|
|
4
5
|
import { useContentEditor } from '@admin/hooks/content-editor/use-content-editor'
|
|
5
6
|
import { useContentEditorMobileToolbar } from '@admin/hooks/content-editor/use-content-editor-mobile-toolbar'
|
|
6
7
|
import { useContentEditorTableAddControls } from '@admin/hooks/content-editor/use-content-editor-table-add-controls'
|
|
7
|
-
import type { ContentEditorMode } from '@admin/utils/editor/content-editor'
|
|
8
8
|
import { cn } from '@admin/utils/shared/cn'
|
|
9
9
|
import { EditorContent, EditorContext } from '@tiptap/react'
|
|
10
10
|
import { EditorToolbar } from './editor-toolbar'
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import type { Editor } from '@tiptap/core'
|
|
3
4
|
import { BlockquoteButton } from '@admin/components/custom/content-editor/tiptap-ui/blockquote-button'
|
|
4
5
|
import { CodeBlockButton } from '@admin/components/custom/content-editor/tiptap-ui/code-block-button'
|
|
5
6
|
import {
|
|
@@ -17,7 +18,6 @@ import { UndoRedoButton } from '@admin/components/custom/content-editor/tiptap-u
|
|
|
17
18
|
import { Button } from '@admin/components/ui/button'
|
|
18
19
|
import { Separator } from '@admin/components/ui/separator'
|
|
19
20
|
import { useContentEditorMediaInsertion } from '@admin/hooks/content-editor/use-content-editor-media-insertion'
|
|
20
|
-
import type { Editor } from '@tiptap/core'
|
|
21
21
|
import { ImagePlusIcon } from 'lucide-react'
|
|
22
22
|
import { HorizontalRuleButton } from './horizontal-rule-button'
|
|
23
23
|
import { MathButton, MathPopoverButton } from './math-popover'
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import type { Editor } from '@tiptap/core'
|
|
3
5
|
import {
|
|
4
6
|
getSelectedContentEditorMath,
|
|
5
7
|
removeSelectedContentEditorMath,
|
|
6
8
|
updateSelectedContentEditorMath
|
|
7
9
|
} from '@admin/utils/editor/tiptap'
|
|
8
10
|
import { cn } from '@admin/utils/shared/cn'
|
|
9
|
-
import type { Editor } from '@tiptap/core'
|
|
10
11
|
import { BubbleMenu } from '@tiptap/react/menus'
|
|
11
|
-
import * as React from 'react'
|
|
12
12
|
import { MathEditorControls } from './math-editor-controls'
|
|
13
13
|
|
|
14
14
|
export function MathBubbleMenu({ editor }: { editor: Editor }) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import type * as React from 'react'
|
|
3
4
|
import { Button } from '@admin/components/ui/button'
|
|
4
5
|
import { SigmaIcon } from 'lucide-react'
|
|
5
|
-
import type * as React from 'react'
|
|
6
6
|
|
|
7
7
|
export interface MathButtonProps extends Omit<React.ComponentProps<typeof Button>, 'type'> {
|
|
8
8
|
text?: string
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/math-editor-controls.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
3
4
|
import { Button } from '@admin/components/ui/button'
|
|
4
5
|
import { Textarea } from '@admin/components/ui/textarea'
|
|
5
6
|
import { TrashIcon } from 'lucide-react'
|
|
6
|
-
import * as React from 'react'
|
|
7
7
|
|
|
8
8
|
export interface MathEditorControlsProps {
|
|
9
9
|
disabled?: boolean
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import type { MathButtonProps } from './math-button'
|
|
5
|
+
import type { Editor } from '@tiptap/core'
|
|
3
6
|
import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
|
|
4
7
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
5
8
|
import { insertContentEditorMath } from '@admin/utils/editor/tiptap'
|
|
6
|
-
import
|
|
7
|
-
import * as React from 'react'
|
|
8
|
-
import { MathButton, type MathButtonProps } from './math-button'
|
|
9
|
+
import { MathButton } from './math-button'
|
|
9
10
|
import { MathEditorControls } from './math-editor-controls'
|
|
10
11
|
|
|
11
12
|
export interface MathPopoverButtonProps extends Omit<MathButtonProps, 'onClick'> {
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import type { Editor } from '@tiptap/core'
|
|
1
3
|
import { ColorHighlightPopover } from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
|
|
2
4
|
import { HeadingDropdownMenu } from '@admin/components/custom/content-editor/tiptap-ui/heading-dropdown-menu'
|
|
3
5
|
import {
|
|
@@ -8,9 +10,7 @@ import { ListDropdownMenu } from '@admin/components/custom/content-editor/tiptap
|
|
|
8
10
|
import { MarkButton } from '@admin/components/custom/content-editor/tiptap-ui/mark-button'
|
|
9
11
|
import { Separator } from '@admin/components/ui/separator'
|
|
10
12
|
import { cn } from '@admin/utils/shared/cn'
|
|
11
|
-
import type { Editor } from '@tiptap/core'
|
|
12
13
|
import { BubbleMenu } from '@tiptap/react/menus'
|
|
13
|
-
import * as React from 'react'
|
|
14
14
|
|
|
15
15
|
const HIDDEN_SELECTION_TOOLBAR_TYPES = [
|
|
16
16
|
'mediaGalleryPlaceholder',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import type { ContentEditorSlashCommand } from '@admin/utils/editor/slash-commands'
|
|
5
|
+
import type { SlashMenuState } from '@admin/utils/editor/tiptap'
|
|
3
6
|
import {
|
|
4
7
|
Combobox,
|
|
5
8
|
ComboboxContent,
|
|
@@ -8,10 +11,7 @@ import {
|
|
|
8
11
|
ComboboxItem,
|
|
9
12
|
ComboboxList
|
|
10
13
|
} from '@admin/components/ui/combobox'
|
|
11
|
-
import type { ContentEditorSlashCommand } from '@admin/utils/editor/slash-commands'
|
|
12
|
-
import type { SlashMenuState } from '@admin/utils/editor/tiptap'
|
|
13
14
|
import { cn } from '@admin/utils/shared/cn'
|
|
14
|
-
import * as React from 'react'
|
|
15
15
|
|
|
16
16
|
export function SlashCommandMenu({
|
|
17
17
|
activeIndex,
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode-dropdown-button.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
3
4
|
import { Button } from '@admin/components/ui/button'
|
|
4
5
|
import {
|
|
5
6
|
DropdownMenu,
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
DropdownMenuTrigger
|
|
9
10
|
} from '@admin/components/ui/dropdown-menu'
|
|
10
11
|
import { ChevronDownIcon } from 'lucide-react'
|
|
11
|
-
import * as React from 'react'
|
|
12
12
|
|
|
13
13
|
type SvgIcon = React.ComponentType<{ className?: string }>
|
|
14
14
|
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import type * as React from 'react'
|
|
4
|
+
import type { ContentEditorSelectionRequest } from '@admin/utils/editor/content-editor'
|
|
5
|
+
import type { MarkdownHeadingLevel, MarkdownListType } from '@admin/utils/editor/markdown'
|
|
3
6
|
import { SourceColorHighlightPopover } from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
|
|
4
7
|
import { LinkControlPopover } from '@admin/components/custom/content-editor/tiptap-ui/link-popover'
|
|
5
8
|
import { Button } from '@admin/components/ui/button'
|
|
6
9
|
import { DropdownMenuItem } from '@admin/components/ui/dropdown-menu'
|
|
7
10
|
import { Separator } from '@admin/components/ui/separator'
|
|
8
11
|
import { useContentEditorSourceMode } from '@admin/hooks/content-editor/use-content-editor-source-mode'
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
getContentEditorHighlightColorName
|
|
12
|
-
} from '@admin/utils/editor/content-editor'
|
|
13
|
-
import {
|
|
14
|
-
MARKDOWN_HEADING_OPTIONS,
|
|
15
|
-
MARKDOWN_LIST_OPTIONS,
|
|
16
|
-
type MarkdownHeadingLevel,
|
|
17
|
-
type MarkdownListType
|
|
18
|
-
} from '@admin/utils/editor/markdown'
|
|
12
|
+
import { getContentEditorHighlightColorName } from '@admin/utils/editor/content-editor'
|
|
13
|
+
import { MARKDOWN_HEADING_OPTIONS, MARKDOWN_LIST_OPTIONS } from '@admin/utils/editor/markdown'
|
|
19
14
|
import { cn } from '@admin/utils/shared/cn'
|
|
20
15
|
import CodeMirror from '@uiw/react-codemirror'
|
|
21
16
|
import {
|
|
@@ -40,7 +35,6 @@ import {
|
|
|
40
35
|
UnderlineIcon,
|
|
41
36
|
Undo2Icon
|
|
42
37
|
} from 'lucide-react'
|
|
43
|
-
import type * as React from 'react'
|
|
44
38
|
import { EditorToolbar } from './editor-toolbar'
|
|
45
39
|
import { MathPopoverButton } from './math-popover'
|
|
46
40
|
import { SourceModeDropdownButton } from './source-mode-dropdown-button'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { Button } from '@admin/components/ui/button'
|
|
4
3
|
import type { ContentEditorTableAddControls } from '@admin/hooks/content-editor/use-content-editor-table-add-controls'
|
|
4
|
+
import { Button } from '@admin/components/ui/button'
|
|
5
5
|
import { PlusIcon } from 'lucide-react'
|
|
6
6
|
import { createPortal } from 'react-dom'
|
|
7
7
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import type { ContentEditorTableAlignment } from '@admin/utils/editor/tiptap'
|
|
5
|
+
import type { Editor } from '@tiptap/core'
|
|
3
6
|
import { Button } from '@admin/components/ui/button'
|
|
4
7
|
import { Separator } from '@admin/components/ui/separator'
|
|
5
8
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
@@ -14,12 +17,10 @@ import {
|
|
|
14
17
|
showTablePartPreview
|
|
15
18
|
} from '@admin/utils/editor/table-bubble'
|
|
16
19
|
import {
|
|
17
|
-
type ContentEditorTableAlignment,
|
|
18
20
|
getActiveTableColumnAlignment,
|
|
19
21
|
setActiveTableColumnAlignment
|
|
20
22
|
} from '@admin/utils/editor/tiptap'
|
|
21
23
|
import { cn } from '@admin/utils/shared/cn'
|
|
22
|
-
import type { Editor } from '@tiptap/core'
|
|
23
24
|
import { BubbleMenu } from '@tiptap/react/menus'
|
|
24
25
|
import {
|
|
25
26
|
AlignCenterIcon,
|
|
@@ -28,7 +29,6 @@ import {
|
|
|
28
29
|
Columns3Icon,
|
|
29
30
|
Rows3Icon
|
|
30
31
|
} from 'lucide-react'
|
|
31
|
-
import * as React from 'react'
|
|
32
32
|
import { RemoveTablePartIcon } from './remove-table-part-icon'
|
|
33
33
|
|
|
34
34
|
const ALIGNMENT_CONTROLS: Array<{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
+
import type { Editor } from '@tiptap/core'
|
|
3
4
|
import { Button } from '@admin/components/ui/button'
|
|
4
5
|
import { Input } from '@admin/components/ui/input'
|
|
5
6
|
import { Label } from '@admin/components/ui/label'
|
|
6
7
|
import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
|
|
7
8
|
import { useTableButton } from '@admin/hooks/content-editor/use-table-button'
|
|
8
|
-
import type { Editor } from '@tiptap/core'
|
|
9
9
|
import { TableIcon } from 'lucide-react'
|
|
10
10
|
|
|
11
11
|
interface TableButtonProps {
|