@vitnode/core 1.2.0-canary.53 → 1.2.0-canary.55
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/scripts/get-config.d.ts.map +1 -1
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts +0 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +4 -4
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts +3 -0
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +1 -0
- package/dist/src/api/adapters/cron/node-cron.adapter.js +11 -0
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +22 -9
- package/dist/src/api/lib/cron.d.ts +18 -0
- package/dist/src/api/lib/cron.d.ts.map +1 -0
- package/dist/src/api/lib/cron.js +22 -0
- package/dist/src/api/lib/logger-middleware.js +1 -1
- package/dist/src/api/lib/module.d.ts +4 -1
- package/dist/src/api/lib/module.d.ts.map +1 -1
- package/dist/src/api/lib/module.js +3 -2
- package/dist/src/api/lib/plugin.d.ts +2 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/plugin.js +9 -1
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/with-pagination.d.ts +1 -1
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
- package/dist/src/api/middlewares/cron-auth.middleware.d.ts +3 -0
- package/dist/src/api/middlewares/cron-auth.middleware.d.ts.map +1 -0
- package/dist/src/api/middlewares/cron-auth.middleware.js +19 -0
- package/dist/src/api/middlewares/global.middleware.d.ts +8 -2
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +33 -23
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +1 -1
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +1 -2
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/sso.d.ts.map +1 -1
- package/dist/src/api/models/sso.js +1 -1
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +1 -0
- package/dist/src/api/models/user.d.ts +1 -1
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +163 -1
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +6 -3
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts +164 -0
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +11 -0
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts +164 -0
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.js +12 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts +98 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.js +66 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts +70 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.js +95 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -1
- package/dist/src/api/modules/admin/routes/session.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/list.route.js +1 -1
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +3 -3
- package/dist/src/api/modules/admin/users/routes/users.route.js +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/cron/cron/clean.cron.d.ts +2 -0
- package/dist/src/api/modules/cron/cron/clean.cron.d.ts.map +1 -0
- package/dist/src/api/modules/cron/cron/clean.cron.js +24 -0
- package/dist/src/api/modules/cron/cron.module.d.ts +26 -0
- package/dist/src/api/modules/cron/cron.module.d.ts.map +1 -0
- package/dist/src/api/modules/cron/cron.module.js +14 -0
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts +36 -0
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -0
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +72 -0
- package/dist/src/api/modules/cron/routes/cron.route.d.ts +27 -0
- package/dist/src/api/modules/cron/routes/cron.route.d.ts.map +1 -0
- package/dist/src/api/modules/cron/routes/cron.route.js +95 -0
- package/dist/src/api/modules/middleware/middleware.module.js +1 -1
- package/dist/src/api/modules/middleware/route.js +1 -1
- package/dist/src/api/modules/users/routes/change-password.route.js +1 -1
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -1
- package/dist/src/api/modules/users/routes/session.route.js +1 -1
- package/dist/src/api/modules/users/routes/sign-in.route.js +1 -1
- package/dist/src/api/modules/users/routes/sign-out.route.js +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.js +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +1 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.js +1 -1
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +1 -1
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.js +1 -1
- package/dist/src/api/plugin.d.ts.map +1 -1
- package/dist/src/api/plugin.js +4 -2
- package/dist/src/app_admin/core/advanced/cron/page.d.ts +11 -0
- package/dist/src/app_admin/core/advanced/cron/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/advanced/cron/page.js +42 -0
- package/dist/src/app_admin/core/debug/page.js +1 -1
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +1 -1
- package/dist/src/components/confirm-action/content.d.ts.map +1 -1
- package/dist/src/components/confirm-action/content.js +1 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +0 -1
- package/dist/src/components/form/fields/checkbox.d.ts +1 -1
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.d.ts +1 -1
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/switch.js +1 -1
- package/dist/src/components/switchers/langs/{language-swietcher.d.ts → language-switcher.d.ts} +1 -1
- package/dist/src/components/switchers/langs/language-switcher.d.ts.map +1 -0
- package/dist/src/components/table/content.d.ts.map +1 -1
- package/dist/src/components/table/data-table.d.ts +1 -1
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/order-table-head.d.ts.map +1 -1
- package/dist/src/components/table/pagination.js +1 -1
- package/dist/src/components/tiptap/extension.d.ts +4 -0
- package/dist/src/components/tiptap/extension.d.ts.map +1 -0
- package/dist/src/components/tiptap/extension.js +33 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.js +91 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/bold-action.js +39 -0
- package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/headings-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/headings-action.js +93 -0
- package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/italic-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/italic-action.js +38 -0
- package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/list-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/list-action.js +61 -0
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +59 -0
- package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/underline-action.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/underline-action.js +38 -0
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts +2 -0
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +63 -0
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts +4 -0
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.js +11 -0
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts +5 -0
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +55 -0
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts +9 -0
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.d.ts.map +1 -0
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.js +5 -0
- package/dist/src/components/ui/accordion.d.ts +1 -1
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/alert.d.ts +1 -1
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/badge.d.ts +1 -1
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/button-client.d.ts.map +1 -1
- package/dist/src/components/ui/button-client.js +1 -1
- package/dist/src/components/ui/button.d.ts +2 -2
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +1 -1
- package/dist/src/components/ui/checkbox.d.ts +1 -1
- package/dist/src/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/components/ui/command.d.ts +1 -1
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.d.ts +1 -1
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/editor-content.d.ts +4 -0
- package/dist/src/components/ui/editor-content.d.ts.map +1 -0
- package/dist/src/components/ui/editor-content.js +10 -0
- package/dist/src/components/ui/editor.d.ts +6 -0
- package/dist/src/components/ui/editor.d.ts.map +1 -0
- package/dist/src/components/ui/editor.js +35 -0
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.d.ts +1 -1
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/label.d.ts +1 -1
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.d.ts +1 -1
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.d.ts +1 -1
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/popover.d.ts +1 -1
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/progress.d.ts +1 -1
- package/dist/src/components/ui/progress.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.d.ts +1 -1
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/scroll-area.d.ts +6 -0
- package/dist/src/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/src/components/ui/scroll-area.js +33 -0
- package/dist/src/components/ui/select.d.ts +1 -1
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/separator.d.ts +1 -1
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.d.ts +1 -1
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.js +14 -15
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/switch.d.ts +1 -1
- package/dist/src/components/ui/switch.d.ts.map +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.d.ts +1 -1
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.d.ts +1 -1
- package/dist/src/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.js +1 -1
- package/dist/src/components/ui/tooltip.d.ts +5 -2
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +18 -2
- package/dist/src/database/cron.d.ts +171 -0
- package/dist/src/database/cron.d.ts.map +1 -0
- package/dist/src/database/cron.js +22 -0
- package/dist/src/database/users.d.ts +2 -2
- package/dist/src/database/users.js +1 -1
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +1 -1
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +20 -21
- package/dist/src/hooks/use-captcha.d.ts +20 -0
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +19 -18
- package/dist/src/hooks/use-mobile.d.ts.map +1 -1
- package/dist/src/hooks/use-mobile.js +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.d.ts +2 -0
- package/dist/src/lib/api/get-next-cron-run-date.d.ts.map +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.js +14 -0
- package/dist/src/lib/api/get-next-cron-run-date.test.d.ts +2 -0
- package/dist/src/lib/api/get-next-cron-run-date.test.d.ts.map +1 -0
- package/dist/src/lib/api/get-next-cron-run-date.test.js +55 -0
- package/dist/src/lib/api/should-cron-job-run.d.ts +2 -0
- package/dist/src/lib/api/should-cron-job-run.d.ts.map +1 -0
- package/dist/src/lib/api/should-cron-job-run.js +16 -0
- package/dist/src/lib/api/should-cron-job-run.test.d.ts +2 -0
- package/dist/src/lib/api/should-cron-job-run.test.d.ts.map +1 -0
- package/dist/src/lib/api/should-cron-job-run.test.js +213 -0
- package/dist/src/lib/config.d.ts +1 -0
- package/dist/src/lib/config.d.ts.map +1 -1
- package/dist/src/lib/config.js +7 -5
- package/dist/src/lib/ctrl-or-command-character.d.ts +2 -0
- package/dist/src/lib/ctrl-or-command-character.d.ts.map +1 -0
- package/dist/src/lib/ctrl-or-command-character.js +5 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +1 -2
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.js +0 -1
- package/dist/src/lib/navigation.d.ts +2 -2
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/lib/tiptap/toolbar/actions/bold-action.d.ts +1 -0
- package/dist/src/lib/tiptap/toolbar/actions/bold-action.d.ts.map +1 -0
- package/dist/src/lib/tiptap/toolbar/actions/bold-action.js +0 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +5 -2
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +0 -3
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +12 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts +5 -0
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +97 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts +4 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.js +23 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts +4 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +38 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +12 -21
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/test.js +116 -106
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/components/password-input.js +2 -1
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.js +6 -3
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.js +2 -1
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
- package/dist/src/vitnode.config.d.ts +2 -0
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +17 -0
- package/package.json +37 -27
- package/src/app_admin/core/advanced/cron/page.tsx +42 -0
- package/src/app_admin/core/debug/page.tsx +1 -1
- package/src/app_admin/core/users/page.tsx +2 -1
- package/src/locales/en.json +51 -0
- package/src/tiptap.css +28 -0
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +0 -1
- /package/dist/src/components/switchers/langs/{language-swietcher.js → language-switcher.js} +0 -0
|
@@ -7,7 +7,7 @@ export const AutoFormSwitch = ({ label, field, labelRight, otherProps: { isOptio
|
|
|
7
7
|
return /*#__PURE__*/ _jsxs(FormItem, {
|
|
8
8
|
className: "flex flex-row items-center justify-between rounded-lg border p-4",
|
|
9
9
|
children: [
|
|
10
|
-
(label
|
|
10
|
+
(label ?? description) && /*#__PURE__*/ _jsxs("div", {
|
|
11
11
|
className: "space-y-0.5",
|
|
12
12
|
children: [
|
|
13
13
|
label && /*#__PURE__*/ _jsx(AutoFormLabel, {
|
package/dist/src/components/switchers/langs/{language-swietcher.d.ts → language-switcher.d.ts}
RENAMED
|
@@ -2,4 +2,4 @@ import type { LocaleConfig } from "../../../vitnode.config";
|
|
|
2
2
|
export declare const LanguageSwitcher: ({ locales }: {
|
|
3
3
|
locales: LocaleConfig[];
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
//# sourceMappingURL=language-
|
|
5
|
+
//# sourceMappingURL=language-switcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-switcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/switchers/langs/language-switcher.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAYrD,eAAO,MAAM,gBAAgB,GAAI,aAAa;IAAE,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,4CAwCxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAc7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,aAAa,EAAE,EACxD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,uBAAuB,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,2CAkF3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,OAAO;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,4CAqDjE,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,SAAS,aAAa,EAC/C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,SAAS,CAAC,GACxD,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,GAAG;IACjD,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAAC,GAAG,EAAE,CAAC,CAAA;SAAE,KAAK,KAAK,CAAC,SAAS,CAAC;QAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,uBAAuB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1C,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QACtB,YAAY,EAAE;YACZ,MAAM,EAAE,MAAM,CAAC,CAAC;YAChB,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;CACH,2CAOJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-table-head.d.ts","sourceRoot":"","sources":["../../../../src/components/table/order-table-head.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"order-table-head.d.ts","sourceRoot":"","sources":["../../../../src/components/table/order-table-head.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,aAAa,EAAE,EAC/D,EAAE,EACF,QAAQ,EACR,KAAK,EAAE,EAAE,YAAY,EAAE,GACxB,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAC5D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;CACnE,2CA8CA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
-
import { useSearchParams } from "next/navigation";
|
|
5
4
|
import { useTranslations } from "next-intl";
|
|
5
|
+
import { useSearchParams } from "next/navigation";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { usePathname, useRouter } from "../../lib/navigation.js";
|
|
8
8
|
import { Button } from "../ui/button.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../../src/components/tiptap/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAKhD,eAAO,MAAM,yBAAyB,uBAAwB,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,UAmB9B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import TextAlign from "@tiptap/extension-text-align";
|
|
2
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
3
|
+
export const SUPPORTED_HEADINGS_LEVELS = [
|
|
4
|
+
1,
|
|
5
|
+
2,
|
|
6
|
+
3,
|
|
7
|
+
4
|
|
8
|
+
];
|
|
9
|
+
export const tiptapExtensions = [
|
|
10
|
+
StarterKit.configure({
|
|
11
|
+
orderedList: {
|
|
12
|
+
HTMLAttributes: {
|
|
13
|
+
class: "list-decimal"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
bulletList: {
|
|
17
|
+
HTMLAttributes: {
|
|
18
|
+
class: "list-disc"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
heading: {
|
|
22
|
+
levels: [
|
|
23
|
+
...SUPPORTED_HEADINGS_LEVELS
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
TextAlign.configure({
|
|
28
|
+
types: [
|
|
29
|
+
"heading",
|
|
30
|
+
"paragraph"
|
|
31
|
+
]
|
|
32
|
+
})
|
|
33
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alignment-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/alignment-action.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,eAAe,+CA2E3B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ChevronDown } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Button } from "../../../ui/button.js";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuShortcut, DropdownMenuTrigger } from "../../../ui/dropdown-menu.js";
|
|
7
|
+
import { CtrlOrCommandCharacter } from "../../../../lib/ctrl-or-command-character.js";
|
|
8
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
9
|
+
export const AlignmentAction = ()=>{
|
|
10
|
+
const t = useTranslations("core.global.editor");
|
|
11
|
+
const { editor } = useToolbarEditor();
|
|
12
|
+
const activeValue = useEditorState({
|
|
13
|
+
editor,
|
|
14
|
+
selector: (ctx)=>{
|
|
15
|
+
return [
|
|
16
|
+
"left",
|
|
17
|
+
"center",
|
|
18
|
+
"right",
|
|
19
|
+
"justify"
|
|
20
|
+
].find((align)=>ctx.editor.isActive({
|
|
21
|
+
textAlign: align
|
|
22
|
+
})) ?? "left";
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const alignments = [
|
|
26
|
+
{
|
|
27
|
+
label: t("alignments.left"),
|
|
28
|
+
value: "left",
|
|
29
|
+
icon: /*#__PURE__*/ _jsx(AlignLeftIcon, {}),
|
|
30
|
+
shortcut: "L"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: t("alignments.center"),
|
|
34
|
+
value: "center",
|
|
35
|
+
icon: /*#__PURE__*/ _jsx(AlignCenterIcon, {}),
|
|
36
|
+
shortcut: "E"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: t("alignments.right"),
|
|
40
|
+
value: "right",
|
|
41
|
+
icon: /*#__PURE__*/ _jsx(AlignRightIcon, {}),
|
|
42
|
+
shortcut: "R"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: t("alignments.justify"),
|
|
46
|
+
value: "justify",
|
|
47
|
+
icon: /*#__PURE__*/ _jsx(AlignJustifyIcon, {}),
|
|
48
|
+
shortcut: "J"
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
const activeAlignment = alignments.find((a)=>a.value === activeValue) ?? alignments[0];
|
|
52
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
55
|
+
asChild: true,
|
|
56
|
+
children: /*#__PURE__*/ _jsxs(Button, {
|
|
57
|
+
className: "w-40 justify-between",
|
|
58
|
+
variant: "ghost",
|
|
59
|
+
children: [
|
|
60
|
+
activeAlignment.icon,
|
|
61
|
+
t(`alignments.${activeAlignment.value}`),
|
|
62
|
+
/*#__PURE__*/ _jsx(ChevronDown, {
|
|
63
|
+
className: "ml-auto"
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
69
|
+
className: "min-w-[16rem]",
|
|
70
|
+
children: /*#__PURE__*/ _jsx(DropdownMenuRadioGroup, {
|
|
71
|
+
value: activeAlignment.value,
|
|
72
|
+
children: alignments.map((item)=>/*#__PURE__*/ _jsxs(DropdownMenuRadioItem, {
|
|
73
|
+
onClick: ()=>editor.chain().focus().setTextAlign(item.value).run(),
|
|
74
|
+
value: item.value,
|
|
75
|
+
children: [
|
|
76
|
+
item.icon,
|
|
77
|
+
t(`alignments.${item.value}`),
|
|
78
|
+
/*#__PURE__*/ _jsxs(DropdownMenuShortcut, {
|
|
79
|
+
children: [
|
|
80
|
+
/*#__PURE__*/ _jsx(CtrlOrCommandCharacter, {}),
|
|
81
|
+
"+Shift+",
|
|
82
|
+
item.shortcut
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}, item.value))
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bold-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/bold-action.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,+CA+BtB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { BoldIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Toggle } from "../../../ui/toggle.js";
|
|
6
|
+
import { TooltipWithContent } from "../../../ui/tooltip.js";
|
|
7
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
8
|
+
import { TooltipShortcut } from "./utils/tooltip-shortcut.js";
|
|
9
|
+
export const BoldAction = ()=>{
|
|
10
|
+
const t = useTranslations("core.global.editor");
|
|
11
|
+
const { editor } = useToolbarEditor();
|
|
12
|
+
const { isBold } = useEditorState({
|
|
13
|
+
editor,
|
|
14
|
+
selector: (ctx)=>{
|
|
15
|
+
return {
|
|
16
|
+
isBold: ctx.editor.isActive("bold")
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/ _jsx(TooltipWithContent, {
|
|
21
|
+
text: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
22
|
+
children: [
|
|
23
|
+
t("bold"),
|
|
24
|
+
" ",
|
|
25
|
+
/*#__PURE__*/ _jsx(TooltipShortcut, {
|
|
26
|
+
children: "+B"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
31
|
+
children: /*#__PURE__*/ _jsx(Toggle, {
|
|
32
|
+
"aria-label": t("bold"),
|
|
33
|
+
onClick: ()=>editor.chain().focus().toggleBold().run(),
|
|
34
|
+
pressed: isBold,
|
|
35
|
+
children: /*#__PURE__*/ _jsx(BoldIcon, {})
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headings-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/headings-action.tsx"],"names":[],"mappings":"AAiCA,eAAO,MAAM,cAAc,+CAuE1B,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { ChevronDown, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, PilcrowIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Button } from "../../../ui/button.js";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuShortcut, DropdownMenuTrigger } from "../../../ui/dropdown-menu.js";
|
|
7
|
+
import { CtrlOrCommandCharacter } from "../../../../lib/ctrl-or-command-character.js";
|
|
8
|
+
import { SUPPORTED_HEADINGS_LEVELS } from "../../extension.js";
|
|
9
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
10
|
+
const ICONS = {
|
|
11
|
+
paragraph: /*#__PURE__*/ _jsx(PilcrowIcon, {}),
|
|
12
|
+
heading_1: /*#__PURE__*/ _jsx(Heading1Icon, {}),
|
|
13
|
+
heading_2: /*#__PURE__*/ _jsx(Heading2Icon, {}),
|
|
14
|
+
heading_3: /*#__PURE__*/ _jsx(Heading3Icon, {}),
|
|
15
|
+
heading_4: /*#__PURE__*/ _jsx(Heading4Icon, {})
|
|
16
|
+
};
|
|
17
|
+
export const HeadingsAction = ()=>{
|
|
18
|
+
const t = useTranslations("core.global.editor");
|
|
19
|
+
const { editor } = useToolbarEditor();
|
|
20
|
+
const activeValue = useEditorState({
|
|
21
|
+
editor,
|
|
22
|
+
selector: (ctx)=>{
|
|
23
|
+
if (!ctx.editor.isActive("heading")) return "paragraph";
|
|
24
|
+
const level = ctx.editor.getAttributes("heading").level;
|
|
25
|
+
return `heading-${level}`;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const options = [
|
|
29
|
+
{
|
|
30
|
+
value: "paragraph",
|
|
31
|
+
label: t("paragraph"),
|
|
32
|
+
icon: ICONS.paragraph,
|
|
33
|
+
shortcut: "0"
|
|
34
|
+
},
|
|
35
|
+
...SUPPORTED_HEADINGS_LEVELS.map((level)=>({
|
|
36
|
+
value: `heading-${level}`,
|
|
37
|
+
label: t("heading", {
|
|
38
|
+
level
|
|
39
|
+
}),
|
|
40
|
+
icon: ICONS[`heading_${level}`],
|
|
41
|
+
shortcut: level.toString()
|
|
42
|
+
}))
|
|
43
|
+
];
|
|
44
|
+
const activeOption = options.find((o)=>o.value === activeValue) ?? options[0];
|
|
45
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
48
|
+
asChild: true,
|
|
49
|
+
children: /*#__PURE__*/ _jsxs(Button, {
|
|
50
|
+
className: "w-32 justify-between",
|
|
51
|
+
variant: "ghost",
|
|
52
|
+
children: [
|
|
53
|
+
activeOption.icon,
|
|
54
|
+
activeOption.label,
|
|
55
|
+
/*#__PURE__*/ _jsx(ChevronDown, {
|
|
56
|
+
className: "ml-auto"
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
})
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
62
|
+
className: "min-w-[14rem]",
|
|
63
|
+
children: /*#__PURE__*/ _jsx(DropdownMenuRadioGroup, {
|
|
64
|
+
value: activeValue,
|
|
65
|
+
children: options.map((item)=>/*#__PURE__*/ _jsxs(DropdownMenuRadioItem, {
|
|
66
|
+
onClick: ()=>{
|
|
67
|
+
if (item.value === "paragraph") {
|
|
68
|
+
editor.chain().focus().setParagraph().run();
|
|
69
|
+
} else {
|
|
70
|
+
const level = parseInt(item.value.split("-")[1]);
|
|
71
|
+
editor.chain().focus().toggleHeading({
|
|
72
|
+
level
|
|
73
|
+
}).run();
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
value: item.value,
|
|
77
|
+
children: [
|
|
78
|
+
item.icon,
|
|
79
|
+
item.label,
|
|
80
|
+
/*#__PURE__*/ _jsxs(DropdownMenuShortcut, {
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ _jsx(CtrlOrCommandCharacter, {}),
|
|
83
|
+
"+Alt+",
|
|
84
|
+
item.shortcut
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
}, item.value))
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"italic-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/italic-action.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY,+CAgCxB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { ItalicIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Toggle } from "../../../ui/toggle.js";
|
|
6
|
+
import { TooltipWithContent } from "../../../ui/tooltip.js";
|
|
7
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
8
|
+
import { TooltipShortcut } from "./utils/tooltip-shortcut.js";
|
|
9
|
+
export const ItalicAction = ()=>{
|
|
10
|
+
const t = useTranslations("core.global.editor");
|
|
11
|
+
const { editor } = useToolbarEditor();
|
|
12
|
+
const { isItalic } = useEditorState({
|
|
13
|
+
editor,
|
|
14
|
+
selector: (ctx)=>{
|
|
15
|
+
return {
|
|
16
|
+
isItalic: ctx.editor.isActive("italic")
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/ _jsx(TooltipWithContent, {
|
|
21
|
+
text: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
22
|
+
children: [
|
|
23
|
+
t("italic"),
|
|
24
|
+
/*#__PURE__*/ _jsx(TooltipShortcut, {
|
|
25
|
+
children: "+I"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}),
|
|
29
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
30
|
+
children: /*#__PURE__*/ _jsx(Toggle, {
|
|
31
|
+
"aria-label": t("italic"),
|
|
32
|
+
onClick: ()=>editor.chain().focus().toggleItalic().run(),
|
|
33
|
+
pressed: isItalic,
|
|
34
|
+
children: /*#__PURE__*/ _jsx(ItalicIcon, {})
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/list-action.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,+CAsDtB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { ListIcon, ListOrderedIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Toggle } from "../../../ui/toggle.js";
|
|
6
|
+
import { TooltipWithContent } from "../../../ui/tooltip.js";
|
|
7
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
8
|
+
import { TooltipShortcut } from "./utils/tooltip-shortcut.js";
|
|
9
|
+
export const ListAction = ()=>{
|
|
10
|
+
const t = useTranslations("core.global.editor");
|
|
11
|
+
const { editor } = useToolbarEditor();
|
|
12
|
+
const { isBulletList, isOrderedList } = useEditorState({
|
|
13
|
+
editor,
|
|
14
|
+
selector: (ctx)=>{
|
|
15
|
+
return {
|
|
16
|
+
isOrderedList: ctx.editor.isActive("orderedList"),
|
|
17
|
+
isBulletList: ctx.editor.isActive("bulletList")
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ _jsx(TooltipWithContent, {
|
|
24
|
+
text: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
25
|
+
children: [
|
|
26
|
+
t("bullet_list"),
|
|
27
|
+
/*#__PURE__*/ _jsx(TooltipShortcut, {
|
|
28
|
+
children: "+I"
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
}),
|
|
32
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
33
|
+
children: /*#__PURE__*/ _jsx(Toggle, {
|
|
34
|
+
"aria-label": t("bullet_list"),
|
|
35
|
+
onClick: ()=>editor.chain().focus().toggleBulletList().run(),
|
|
36
|
+
pressed: isBulletList,
|
|
37
|
+
children: /*#__PURE__*/ _jsx(ListIcon, {})
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsx(TooltipWithContent, {
|
|
42
|
+
text: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
43
|
+
children: [
|
|
44
|
+
t("ordered_list"),
|
|
45
|
+
/*#__PURE__*/ _jsx(TooltipShortcut, {
|
|
46
|
+
children: "+I"
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
51
|
+
children: /*#__PURE__*/ _jsx(Toggle, {
|
|
52
|
+
"aria-label": t("ordered_list"),
|
|
53
|
+
onClick: ()=>editor.chain().focus().toggleOrderedList().run(),
|
|
54
|
+
pressed: isOrderedList,
|
|
55
|
+
children: /*#__PURE__*/ _jsx(ListOrderedIcon, {})
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-format-more.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/tiptap/toolbar/actions/text-format-more/text-format-more.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,+CA+C1B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { EllipsisVerticalIcon, StrikethroughIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Button } from "../../../../ui/button.js";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuShortcut, DropdownMenuTrigger } from "../../../../ui/dropdown-menu.js";
|
|
7
|
+
import { CtrlOrCommandCharacter } from "../../../../../lib/ctrl-or-command-character.js";
|
|
8
|
+
import { cn } from "../../../../../lib/utils.js";
|
|
9
|
+
import { useToolbarEditor } from "../../use-toolbar-editor.js";
|
|
10
|
+
export const TextFormatMore = ()=>{
|
|
11
|
+
const t = useTranslations("core.global.editor.text_format_more");
|
|
12
|
+
const { editor } = useToolbarEditor();
|
|
13
|
+
const { isStrike } = useEditorState({
|
|
14
|
+
editor,
|
|
15
|
+
selector: (ctx)=>{
|
|
16
|
+
return {
|
|
17
|
+
isStrike: ctx.editor.isActive("strike")
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ _jsx(DropdownMenuTrigger, {
|
|
24
|
+
asChild: true,
|
|
25
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
26
|
+
"aria-label": t("label"),
|
|
27
|
+
className: cn({
|
|
28
|
+
"bg-accent": isStrike
|
|
29
|
+
}),
|
|
30
|
+
size: "icon",
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
children: /*#__PURE__*/ _jsx(EllipsisVerticalIcon, {})
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
36
|
+
className: "min-w-[12rem]",
|
|
37
|
+
children: /*#__PURE__*/ _jsxs(DropdownMenuItem, {
|
|
38
|
+
className: cn({
|
|
39
|
+
"bg-accent": isStrike
|
|
40
|
+
}),
|
|
41
|
+
onClick: ()=>{
|
|
42
|
+
editor.chain().focus().toggleStrike().run();
|
|
43
|
+
editor.view.focus();
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ _jsx(StrikethroughIcon, {}),
|
|
47
|
+
t("strike"),
|
|
48
|
+
/*#__PURE__*/ _jsxs(DropdownMenuShortcut, {
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ _jsx(CtrlOrCommandCharacter, {}),
|
|
51
|
+
"+S"
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"underline-action.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/underline-action.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,+CAgC3B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEditorState } from "@tiptap/react";
|
|
3
|
+
import { UnderlineIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Toggle } from "../../../ui/toggle.js";
|
|
6
|
+
import { TooltipWithContent } from "../../../ui/tooltip.js";
|
|
7
|
+
import { useToolbarEditor } from "../use-toolbar-editor.js";
|
|
8
|
+
import { TooltipShortcut } from "./utils/tooltip-shortcut.js";
|
|
9
|
+
export const UnderlineAction = ()=>{
|
|
10
|
+
const t = useTranslations("core.global.editor");
|
|
11
|
+
const { editor } = useToolbarEditor();
|
|
12
|
+
const { isUnderline } = useEditorState({
|
|
13
|
+
editor,
|
|
14
|
+
selector: (ctx)=>{
|
|
15
|
+
return {
|
|
16
|
+
isUnderline: ctx.editor.isActive("underline")
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/ _jsx(TooltipWithContent, {
|
|
21
|
+
text: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
22
|
+
children: [
|
|
23
|
+
t("underline"),
|
|
24
|
+
/*#__PURE__*/ _jsx(TooltipShortcut, {
|
|
25
|
+
children: "+U"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}),
|
|
29
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
30
|
+
children: /*#__PURE__*/ _jsx(Toggle, {
|
|
31
|
+
"aria-label": t("underline"),
|
|
32
|
+
onClick: ()=>editor.chain().focus().toggleUnderline().run(),
|
|
33
|
+
pressed: isUnderline,
|
|
34
|
+
children: /*#__PURE__*/ _jsx(UnderlineIcon, {})
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undo-redo-actions.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tiptap/toolbar/actions/undo-redo-actions.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,+CAoD3B,CAAC"}
|