@nextsparkjs/core 0.1.0-beta.188 → 0.1.0-beta.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/api/keys/ApiKeyDisplay.js +19 -19
- package/dist/components/api/keys/CreateApiKeyDialog.js +21 -21
- package/dist/components/app/layouts/PublicNavbar.d.ts.map +1 -1
- package/dist/components/app/layouts/PublicNavbar.js +34 -16
- package/dist/components/app/misc/ThemeToggle.d.ts.map +1 -1
- package/dist/components/app/misc/ThemeToggle.js +3 -4
- package/dist/components/auth/SessionCookieRefresher.d.ts +5 -0
- package/dist/components/auth/SessionCookieRefresher.d.ts.map +1 -1
- package/dist/components/auth/SessionCookieRefresher.js +7 -1
- package/dist/components/auth/forms/LoginForm.d.ts.map +1 -1
- package/dist/components/auth/forms/LoginForm.js +49 -12
- package/dist/components/auth/forms/SignupForm.d.ts.map +1 -1
- package/dist/components/auth/forms/SignupForm.js +4 -3
- package/dist/components/dashboard/block-editor/block-settings-panel.js +1 -1
- package/dist/components/dashboard/block-editor/floating-block-toolbar.js +1 -1
- package/dist/components/dashboard/block-editor/sortable-block.js +1 -1
- package/dist/components/dashboard/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/Sidebar.js +8 -6
- package/dist/components/dashboard/layouts/TopNavbar.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/TopNavbar.js +51 -54
- package/dist/components/dashboard/misc/NotificationsDropdown.d.ts.map +1 -1
- package/dist/components/dashboard/misc/NotificationsDropdown.js +17 -15
- package/dist/components/dashboard/misc/SearchDropdown.d.ts.map +1 -1
- package/dist/components/dashboard/misc/SearchDropdown.js +19 -22
- package/dist/components/dashboard/mobile/MobileBottomNav.js +1 -1
- package/dist/components/dashboard/mobile/MobileTopBar.js +2 -2
- package/dist/components/dashboard/navigation/DynamicNavigation.js +5 -5
- package/dist/components/devtools/BlockDetailViewer.js +1 -1
- package/dist/components/devtools/BlocksViewer.js +1 -1
- package/dist/components/entities/EntityChildManager.js +5 -5
- package/dist/components/entities/EntityDetailPage.d.ts.map +1 -1
- package/dist/components/entities/EntityDetailPage.js +16 -15
- package/dist/components/entities/EntityFieldRenderer.d.ts.map +1 -1
- package/dist/components/entities/EntityFieldRenderer.js +12 -7
- package/dist/components/entities/EntityPageHeader.js +5 -5
- package/dist/components/entities/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/entities/ErrorBoundary.js +20 -21
- package/dist/components/entities/wrappers/EntityDetailWrapper.js +5 -5
- package/dist/components/entities/wrappers/EntityFormWrapper.js +2 -2
- package/dist/components/entities/wrappers/EntityListWrapper.js +3 -3
- package/dist/components/permissions/NoPermission.js +10 -10
- package/dist/components/public/pageBuilder/PageRenderer.d.ts.map +1 -1
- package/dist/components/public/pageBuilder/PageRenderer.js +2 -1
- package/dist/components/settings/SettingsPageSkeleton.js +4 -4
- package/dist/components/settings/layouts/SettingsSidebar.js +6 -6
- package/dist/components/shared/MultiSelectFilter.d.ts +3 -1
- package/dist/components/shared/MultiSelectFilter.d.ts.map +1 -1
- package/dist/components/shared/MultiSelectFilter.js +7 -3
- package/dist/components/shared/SearchInput.d.ts +2 -0
- package/dist/components/shared/SearchInput.d.ts.map +1 -1
- package/dist/components/shared/SearchInput.js +64 -6
- package/dist/components/ui/address-input.js +18 -18
- package/dist/components/ui/audio-upload.js +9 -9
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox.js +4 -4
- package/dist/components/ui/country-select.d.ts.map +1 -1
- package/dist/components/ui/country-select.js +3 -3
- package/dist/components/ui/currency-select.d.ts.map +1 -1
- package/dist/components/ui/currency-select.js +3 -3
- package/dist/components/ui/dynamic-icon.d.ts.map +1 -1
- package/dist/components/ui/dynamic-icon.js +3 -2
- package/dist/components/ui/file-upload.js +7 -7
- package/dist/components/ui/image-upload.js +8 -8
- package/dist/components/ui/multi-select.d.ts +2 -1
- package/dist/components/ui/multi-select.d.ts.map +1 -1
- package/dist/components/ui/multi-select.js +4 -3
- package/dist/components/ui/phone-input.d.ts.map +1 -1
- package/dist/components/ui/phone-input.js +3 -3
- package/dist/components/ui/relation-display.js +1 -1
- package/dist/components/ui/simple-relation-select.d.ts +2 -1
- package/dist/components/ui/simple-relation-select.d.ts.map +1 -1
- package/dist/components/ui/simple-relation-select.js +7 -6
- package/dist/components/ui/tags-input.d.ts.map +1 -1
- package/dist/components/ui/tags-input.js +1 -1
- package/dist/components/ui/timezone-select.d.ts.map +1 -1
- package/dist/components/ui/timezone-select.js +3 -3
- package/dist/components/ui/user-display.js +4 -4
- package/dist/components/ui/user-select.d.ts.map +1 -1
- package/dist/components/ui/user-select.js +9 -9
- package/dist/components/ui/video-upload.js +9 -9
- package/dist/contexts/SubscriptionContext.d.ts.map +1 -1
- package/dist/contexts/SubscriptionContext.js +5 -1
- package/dist/contexts/TeamContext.d.ts.map +1 -1
- package/dist/contexts/TeamContext.js +83 -26
- package/dist/emails/otp-verification.d.ts.map +1 -1
- package/dist/emails/otp-verification.js +3 -2
- package/dist/hooks/useAccountPreferencesSync.d.ts +13 -0
- package/dist/hooks/useAccountPreferencesSync.d.ts.map +1 -0
- package/dist/hooks/useAccountPreferencesSync.js +95 -0
- package/dist/hooks/useAuth.d.ts +202 -15
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +49 -13
- package/dist/hooks/useEntityConfig.js +2 -2
- package/dist/hooks/useEntitySearch.js +10 -10
- package/dist/hooks/useNotifications.js +12 -12
- package/dist/hooks/usePrefetch.d.ts.map +1 -1
- package/dist/hooks/usePrefetch.js +6 -2
- package/dist/hooks/useSearch.js +15 -15
- package/dist/hooks/useSessionCookieRefresh.d.ts +18 -1
- package/dist/hooks/useSessionCookieRefresh.d.ts.map +1 -1
- package/dist/hooks/useSessionCookieRefresh.js +17 -4
- package/dist/hooks/useSessionHint.d.ts +12 -0
- package/dist/hooks/useSessionHint.d.ts.map +1 -0
- package/dist/hooks/useSessionHint.js +15 -0
- package/dist/hooks/useTranslationPreload.js +6 -6
- package/dist/i18n.d.ts +13 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +2 -27
- package/dist/lib/actions/entity.actions.d.ts.map +1 -1
- package/dist/lib/actions/entity.actions.js +3 -2
- package/dist/lib/api/auth/dual-auth.d.ts +4 -1
- package/dist/lib/api/auth/dual-auth.d.ts.map +1 -1
- package/dist/lib/api/auth/dual-auth.js +5 -16
- package/dist/lib/api/entities.js +33 -33
- package/dist/lib/api/keys.d.ts +27 -27
- package/dist/lib/api/keys.js +27 -27
- package/dist/lib/auth/callback-url.d.ts +11 -0
- package/dist/lib/auth/callback-url.d.ts.map +1 -0
- package/dist/lib/auth/callback-url.js +14 -0
- package/dist/lib/auth/otp-config.d.ts +55 -0
- package/dist/lib/auth/otp-config.d.ts.map +1 -0
- package/dist/lib/auth/otp-config.js +48 -0
- package/dist/lib/auth/registration-helpers.d.ts.map +1 -1
- package/dist/lib/auth/registration-helpers.js +3 -1
- package/dist/lib/auth/session-hint.d.ts +31 -0
- package/dist/lib/auth/session-hint.d.ts.map +1 -0
- package/dist/lib/auth/session-hint.js +37 -0
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +6 -4
- package/dist/lib/blocks/loader.d.ts +3 -11
- package/dist/lib/blocks/loader.d.ts.map +1 -1
- package/dist/lib/blocks/loader.js +1 -9
- package/dist/lib/blocks/loader.server.d.ts +18 -0
- package/dist/lib/blocks/loader.server.d.ts.map +1 -0
- package/dist/lib/blocks/loader.server.js +11 -0
- package/dist/lib/blocks/sanitize-html.d.ts +31 -0
- package/dist/lib/blocks/sanitize-html.d.ts.map +1 -0
- package/dist/lib/blocks/sanitize-html.js +60 -0
- package/dist/lib/config/config-sync.d.ts +1 -0
- package/dist/lib/config/config-sync.d.ts.map +1 -1
- package/dist/lib/config/config-sync.js +4 -1
- package/dist/lib/config/types.d.ts +48 -0
- package/dist/lib/config/types.d.ts.map +1 -1
- package/dist/lib/email/types.d.ts +6 -0
- package/dist/lib/email/types.d.ts.map +1 -1
- package/dist/lib/entities/serialization.d.ts.map +1 -1
- package/dist/lib/entities/serialization.js +3 -6
- package/dist/lib/icons.d.ts +12 -0
- package/dist/lib/icons.d.ts.map +1 -0
- package/dist/lib/icons.js +30 -0
- package/dist/lib/locale.d.ts +25 -1
- package/dist/lib/locale.d.ts.map +1 -1
- package/dist/lib/locale.js +49 -35
- package/dist/lib/mcp/engine.js +1 -1
- package/dist/lib/mcp/errors.js +17 -17
- package/dist/lib/mcp/schema-builder.js +16 -16
- package/dist/lib/mcp/tool-generator.js +18 -18
- package/dist/lib/search-highlighting.d.ts +7 -0
- package/dist/lib/search-highlighting.d.ts.map +1 -1
- package/dist/lib/search-highlighting.js +6 -2
- package/dist/lib/selectors/core-selectors.d.ts +2 -0
- package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/auth.selectors.d.ts +1 -0
- package/dist/lib/selectors/domains/auth.selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/auth.selectors.js +1 -0
- package/dist/lib/selectors/domains/entities.selectors.d.ts +2 -0
- package/dist/lib/selectors/domains/entities.selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/entities.selectors.js +2 -0
- package/dist/lib/selectors/selectors.d.ts +4 -0
- package/dist/lib/selectors/selectors.d.ts.map +1 -1
- package/dist/lib/services/block.service.js +1 -1
- package/dist/lib/teams/active-team-cookie.d.ts +24 -0
- package/dist/lib/teams/active-team-cookie.d.ts.map +1 -0
- package/dist/lib/teams/active-team-cookie.js +17 -0
- package/dist/lib/teams/dashboard-team.d.ts +20 -0
- package/dist/lib/teams/dashboard-team.d.ts.map +1 -0
- package/dist/lib/teams/dashboard-team.js +38 -0
- package/dist/lib/teams/schema.d.ts.map +1 -1
- package/dist/lib/teams/schema.js +1 -1
- package/dist/lib/template-resolver.d.ts.map +1 -1
- package/dist/lib/template-resolver.js +0 -1
- package/dist/lib/theme/get-default-theme-mode.d.ts +7 -4
- package/dist/lib/theme/get-default-theme-mode.d.ts.map +1 -1
- package/dist/lib/theme/get-default-theme-mode.js +2 -44
- package/dist/messages/de/auth.json +4 -2
- package/dist/messages/de/common.json +83 -3
- package/dist/messages/de/email.json +1 -1
- package/dist/messages/de/index.d.ts +87 -0
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/de/settings.json +5 -0
- package/dist/messages/en/auth.json +4 -2
- package/dist/messages/en/common.json +83 -3
- package/dist/messages/en/email.json +1 -1
- package/dist/messages/en/index.d.ts +86 -0
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/en/settings.json +4 -0
- package/dist/messages/es/auth.json +4 -2
- package/dist/messages/es/common.json +83 -3
- package/dist/messages/es/email.json +1 -1
- package/dist/messages/es/index.d.ts +86 -0
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/es/settings.json +4 -0
- package/dist/messages/fr/auth.json +4 -2
- package/dist/messages/fr/common.json +83 -3
- package/dist/messages/fr/email.json +1 -1
- package/dist/messages/fr/index.d.ts +87 -0
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/fr/settings.json +5 -0
- package/dist/messages/it/auth.json +4 -2
- package/dist/messages/it/common.json +83 -3
- package/dist/messages/it/email.json +1 -1
- package/dist/messages/it/index.d.ts +87 -0
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/it/settings.json +5 -0
- package/dist/messages/pt/auth.json +4 -2
- package/dist/messages/pt/common.json +83 -3
- package/dist/messages/pt/email.json +1 -1
- package/dist/messages/pt/index.d.ts +87 -0
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/messages/pt/settings.json +5 -0
- package/dist/nextspark-registries.d.ts +54 -0
- package/dist/providers/DashboardProviders.d.ts +13 -10
- package/dist/providers/DashboardProviders.d.ts.map +1 -1
- package/dist/providers/DashboardProviders.js +7 -1
- package/dist/templates/app/(auth)/forgot-password/page.tsx +2 -2
- package/dist/templates/app/(auth)/reset-password/page.tsx +6 -6
- package/dist/templates/app/403/page.tsx +6 -6
- package/dist/templates/app/api/v1/teams/switch/route.ts +24 -5
- package/dist/templates/app/dashboard/(main)/[entity]/layout.tsx +9 -7
- package/dist/templates/app/dashboard/(main)/layout.tsx +4 -3
- package/dist/templates/app/dashboard/settings/api-keys/page.tsx +36 -34
- package/dist/templates/app/dashboard/settings/profile/page.tsx +7 -6
- package/dist/templates/app/dashboard/settings/security/page.tsx +5 -4
- package/dist/templates/app/layout.ppr.tsx +8 -8
- package/dist/templates/app/layout.tsx +12 -17
- package/dist/templates/blocks/cta-section/component.tsx +5 -2
- package/dist/templates/blocks/cta-section/config.ts +3 -2
- package/dist/templates/blocks/cta-section/fields.ts +2 -2
- package/dist/templates/blocks/cta-section/schema.ts +2 -2
- package/dist/templates/blocks/features-grid/component.tsx +10 -2
- package/dist/templates/blocks/features-grid/config.ts +3 -2
- package/dist/templates/blocks/features-grid/fields.ts +2 -2
- package/dist/templates/blocks/features-grid/schema.ts +2 -2
- package/dist/templates/blocks/hero/component.tsx +6 -3
- package/dist/templates/blocks/hero/config.ts +3 -2
- package/dist/templates/blocks/hero/fields.ts +2 -2
- package/dist/templates/blocks/hero/schema.ts +2 -2
- package/dist/templates/blocks/testimonials/component.tsx +6 -3
- package/dist/templates/blocks/testimonials/config.ts +3 -2
- package/dist/templates/blocks/testimonials/fields.ts +2 -2
- package/dist/templates/blocks/testimonials/schema.ts +2 -2
- package/dist/templates/blocks/text-content/component.tsx +7 -3
- package/dist/templates/blocks/text-content/config.ts +3 -2
- package/dist/templates/blocks/text-content/fields.ts +2 -2
- package/dist/templates/blocks/text-content/schema.ts +2 -2
- package/dist/templates/contents/themes/starter/blocks/cta-section/component.tsx +102 -0
- package/dist/templates/contents/themes/starter/blocks/cta-section/config.ts +11 -0
- package/dist/templates/contents/themes/starter/blocks/cta-section/fields.ts +89 -0
- package/dist/templates/contents/themes/starter/blocks/cta-section/index.ts +6 -0
- package/dist/templates/contents/themes/starter/blocks/cta-section/schema.ts +32 -0
- package/dist/templates/contents/themes/starter/blocks/cta-section/thumbnail.png +0 -0
- package/dist/templates/contents/themes/starter/blocks/features-grid/component.tsx +119 -0
- package/dist/templates/contents/themes/starter/blocks/features-grid/config.ts +11 -0
- package/dist/templates/contents/themes/starter/blocks/features-grid/fields.ts +97 -0
- package/dist/templates/contents/themes/starter/blocks/features-grid/index.ts +6 -0
- package/dist/templates/contents/themes/starter/blocks/features-grid/schema.ts +40 -0
- package/dist/templates/contents/themes/starter/blocks/features-grid/thumbnail.png +0 -0
- package/dist/templates/contents/themes/starter/blocks/hero/component.tsx +105 -0
- package/dist/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
- package/dist/templates/contents/themes/starter/blocks/hero/fields.ts +60 -0
- package/dist/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
- package/dist/templates/contents/themes/starter/blocks/hero/schema.ts +33 -0
- package/dist/templates/contents/themes/starter/blocks/hero/thumbnail.png +0 -0
- package/dist/templates/contents/themes/starter/blocks/testimonials/component.tsx +116 -0
- package/dist/templates/contents/themes/starter/blocks/testimonials/config.ts +11 -0
- package/dist/templates/contents/themes/starter/blocks/testimonials/fields.ts +105 -0
- package/dist/templates/contents/themes/starter/blocks/testimonials/index.ts +6 -0
- package/dist/templates/contents/themes/starter/blocks/testimonials/schema.ts +41 -0
- package/dist/templates/contents/themes/starter/blocks/testimonials/thumbnail.png +0 -0
- package/dist/templates/contents/themes/starter/blocks/text-content/component.tsx +100 -0
- package/dist/templates/contents/themes/starter/blocks/text-content/config.ts +11 -0
- package/dist/templates/contents/themes/starter/blocks/text-content/fields.ts +88 -0
- package/dist/templates/contents/themes/starter/blocks/text-content/index.ts +6 -0
- package/dist/templates/contents/themes/starter/blocks/text-content/schema.ts +30 -0
- package/dist/templates/contents/themes/starter/blocks/text-content/thumbnail.png +0 -0
- package/dist/templates/contents/themes/starter/config/app.config.ts +8 -0
- package/dist/templates/contents/themes/starter/entities/tasks/tasks.config.ts +7 -0
- package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +9 -1
- package/dist/templates/contents/themes/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +2 -2
- package/dist/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +45 -38
- package/dist/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +16 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +3 -1
- package/dist/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +3 -3
- package/dist/templates/contents/themes/starter/tests/cypress/src/entities/PagesPOM.ts +137 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +2 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/index.ts +1 -0
- package/dist/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +42 -11
- package/dist/templates/contents/themes/starter/tests/cypress/support/commands.ts +29 -18
- package/dist/templates/features/blog/blocks/post-content/component.tsx +5 -1
- package/dist/templates/features/blog/blocks/post-content/schema.ts +1 -1
- package/dist/templates/features/pages/blocks/hero/component.tsx +3 -0
- package/dist/templates/features/pages/blocks/hero/schema.ts +1 -1
- package/dist/templates/proxy.ts +138 -53
- package/dist/types/blocks.d.ts.map +1 -1
- package/dist/types/blocks.js +1 -1
- package/dist/types/task.types.d.ts +1 -1
- package/dist/types/task.types.js +7 -7
- package/dist/utils/dev/TranslationDebugger.js +2 -2
- package/package.json +14 -5
- package/scripts/build/registry/__tests__/block-registry.test.mjs +73 -0
- package/scripts/build/registry/__tests__/icons-discovery.test.mjs +130 -0
- package/scripts/build/registry/__tests__/identifier.test.mjs +65 -0
- package/scripts/build/registry/__tests__/page-generator.test.mjs +430 -0
- package/scripts/build/registry/__tests__/scheduled-actions-registry.test.mjs +41 -0
- package/scripts/build/registry/__tests__/template-registry.test.mjs +89 -0
- package/scripts/build/registry/discovery/icons.mjs +275 -0
- package/scripts/build/registry/discovery/index.mjs +1 -0
- package/scripts/build/registry/generators/block-registry.mjs +203 -55
- package/scripts/build/registry/generators/feature-registry.mjs +9 -2
- package/scripts/build/registry/generators/icon-registry.mjs +56 -0
- package/scripts/build/registry/generators/identifier.mjs +28 -0
- package/scripts/build/registry/generators/index.mjs +1 -0
- package/scripts/build/registry/generators/plugin-registry.mjs +4 -3
- package/scripts/build/registry/generators/scheduled-actions-registry.mjs +4 -2
- package/scripts/build/registry/generators/template-registry.mjs +49 -41
- package/scripts/build/registry/generators/theme-registry.mjs +6 -7
- package/scripts/build/registry/post-build/page-generator.mjs +380 -59
- package/scripts/build/registry.mjs +9 -1
- package/templates/app/(auth)/forgot-password/page.tsx +2 -2
- package/templates/app/(auth)/reset-password/page.tsx +6 -6
- package/templates/app/403/page.tsx +6 -6
- package/templates/app/api/v1/teams/switch/route.ts +24 -5
- package/templates/app/dashboard/(main)/[entity]/layout.tsx +9 -7
- package/templates/app/dashboard/(main)/layout.tsx +4 -3
- package/templates/app/dashboard/settings/api-keys/page.tsx +36 -34
- package/templates/app/dashboard/settings/profile/page.tsx +7 -6
- package/templates/app/dashboard/settings/security/page.tsx +5 -4
- package/templates/app/layout.ppr.tsx +8 -8
- package/templates/app/layout.tsx +12 -17
- package/templates/blocks/cta-section/component.tsx +5 -2
- package/templates/blocks/cta-section/config.ts +3 -2
- package/templates/blocks/cta-section/fields.ts +2 -2
- package/templates/blocks/cta-section/schema.ts +2 -2
- package/templates/blocks/features-grid/component.tsx +10 -2
- package/templates/blocks/features-grid/config.ts +3 -2
- package/templates/blocks/features-grid/fields.ts +2 -2
- package/templates/blocks/features-grid/schema.ts +2 -2
- package/templates/blocks/hero/component.tsx +6 -3
- package/templates/blocks/hero/config.ts +3 -2
- package/templates/blocks/hero/fields.ts +2 -2
- package/templates/blocks/hero/schema.ts +2 -2
- package/templates/blocks/testimonials/component.tsx +6 -3
- package/templates/blocks/testimonials/config.ts +3 -2
- package/templates/blocks/testimonials/fields.ts +2 -2
- package/templates/blocks/testimonials/schema.ts +2 -2
- package/templates/blocks/text-content/component.tsx +7 -3
- package/templates/blocks/text-content/config.ts +3 -2
- package/templates/blocks/text-content/fields.ts +2 -2
- package/templates/blocks/text-content/schema.ts +2 -2
- package/templates/contents/themes/starter/blocks/cta-section/component.tsx +102 -0
- package/templates/contents/themes/starter/blocks/cta-section/config.ts +11 -0
- package/templates/contents/themes/starter/blocks/cta-section/fields.ts +89 -0
- package/templates/contents/themes/starter/blocks/cta-section/index.ts +6 -0
- package/templates/contents/themes/starter/blocks/cta-section/schema.ts +32 -0
- package/templates/contents/themes/starter/blocks/cta-section/thumbnail.png +0 -0
- package/templates/contents/themes/starter/blocks/features-grid/component.tsx +119 -0
- package/templates/contents/themes/starter/blocks/features-grid/config.ts +11 -0
- package/templates/contents/themes/starter/blocks/features-grid/fields.ts +97 -0
- package/templates/contents/themes/starter/blocks/features-grid/index.ts +6 -0
- package/templates/contents/themes/starter/blocks/features-grid/schema.ts +40 -0
- package/templates/contents/themes/starter/blocks/features-grid/thumbnail.png +0 -0
- package/templates/contents/themes/starter/blocks/hero/component.tsx +105 -0
- package/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
- package/templates/contents/themes/starter/blocks/hero/fields.ts +60 -0
- package/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
- package/templates/contents/themes/starter/blocks/hero/schema.ts +33 -0
- package/templates/contents/themes/starter/blocks/hero/thumbnail.png +0 -0
- package/templates/contents/themes/starter/blocks/testimonials/component.tsx +116 -0
- package/templates/contents/themes/starter/blocks/testimonials/config.ts +11 -0
- package/templates/contents/themes/starter/blocks/testimonials/fields.ts +105 -0
- package/templates/contents/themes/starter/blocks/testimonials/index.ts +6 -0
- package/templates/contents/themes/starter/blocks/testimonials/schema.ts +41 -0
- package/templates/contents/themes/starter/blocks/testimonials/thumbnail.png +0 -0
- package/templates/contents/themes/starter/blocks/text-content/component.tsx +100 -0
- package/templates/contents/themes/starter/blocks/text-content/config.ts +11 -0
- package/templates/contents/themes/starter/blocks/text-content/fields.ts +88 -0
- package/templates/contents/themes/starter/blocks/text-content/index.ts +6 -0
- package/templates/contents/themes/starter/blocks/text-content/schema.ts +30 -0
- package/templates/contents/themes/starter/blocks/text-content/thumbnail.png +0 -0
- package/templates/contents/themes/starter/config/app.config.ts +8 -0
- package/templates/contents/themes/starter/entities/tasks/tasks.config.ts +7 -0
- package/templates/contents/themes/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +9 -1
- package/templates/contents/themes/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +2 -2
- package/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +45 -38
- package/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +16 -0
- package/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +3 -1
- package/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +3 -3
- package/templates/contents/themes/starter/tests/cypress/src/entities/PagesPOM.ts +137 -0
- package/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +2 -0
- package/templates/contents/themes/starter/tests/cypress/src/index.ts +1 -0
- package/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +42 -11
- package/templates/contents/themes/starter/tests/cypress/support/commands.ts +29 -18
- package/templates/features/blog/blocks/post-content/component.tsx +5 -1
- package/templates/features/blog/blocks/post-content/schema.ts +1 -1
- package/templates/features/pages/blocks/hero/component.tsx +3 -0
- package/templates/features/pages/blocks/hero/schema.ts +1 -1
- package/templates/proxy.ts +138 -53
- package/tests/jest/__mocks__/@nextsparkjs/registries/block-registry.client.ts +9 -0
- package/tests/jest/__mocks__/@nextsparkjs/registries/block-registry.lazy.ts +5 -0
- package/tests/jest/__mocks__/@nextsparkjs/registries/icon-registry.ts +42 -0
- package/tests/jest/__mocks__/next-intl-server.js +85 -5
- package/tests/jest/__mocks__/next-server.js +32 -0
|
@@ -255,6 +255,8 @@ declare const _default: {
|
|
|
255
255
|
sendCode: string;
|
|
256
256
|
sendingCode: string;
|
|
257
257
|
codeSent: string;
|
|
258
|
+
expiresIn: string;
|
|
259
|
+
expired: string;
|
|
258
260
|
codeLabel: string;
|
|
259
261
|
codePlaceholder: string;
|
|
260
262
|
verifyCode: string;
|
|
@@ -609,6 +611,62 @@ declare const _default: {
|
|
|
609
611
|
enrollments: string;
|
|
610
612
|
students: string;
|
|
611
613
|
};
|
|
614
|
+
a11y: {
|
|
615
|
+
accessDeveloperArea: string;
|
|
616
|
+
accessSuperAdminArea: string;
|
|
617
|
+
actionsAndSettings: string;
|
|
618
|
+
allNotificationsMarkedRead: string;
|
|
619
|
+
avatarForName: string;
|
|
620
|
+
closeNavigationMenu: string;
|
|
621
|
+
collapseSidebar: string;
|
|
622
|
+
currentPageSuffix: string;
|
|
623
|
+
dashboardNavigation: string;
|
|
624
|
+
deleteNotification: string;
|
|
625
|
+
developerArea: string;
|
|
626
|
+
developerAreaTitle: string;
|
|
627
|
+
expandSidebar: string;
|
|
628
|
+
goHome: string;
|
|
629
|
+
goHomeNamed: string;
|
|
630
|
+
goToBilling: string;
|
|
631
|
+
goToDeveloperArea: string;
|
|
632
|
+
goToProfile: string;
|
|
633
|
+
goToProfileOf: string;
|
|
634
|
+
goToSettings: string;
|
|
635
|
+
goToSuperAdminArea: string;
|
|
636
|
+
help: string;
|
|
637
|
+
loading: string;
|
|
638
|
+
loadingUserInfo: string;
|
|
639
|
+
logoOf: string;
|
|
640
|
+
mainNavigation: string;
|
|
641
|
+
markNotificationAsRead: string;
|
|
642
|
+
menuClosedAnnouncement: string;
|
|
643
|
+
mobileActions: string;
|
|
644
|
+
mobileMainNavigation: string;
|
|
645
|
+
mobileMenuClosedAnnouncement: string;
|
|
646
|
+
mobileMenuOpenedAnnouncement: string;
|
|
647
|
+
mobileNavigationMenu: string;
|
|
648
|
+
mobileTopBar: string;
|
|
649
|
+
navigatingToAnnouncement: string;
|
|
650
|
+
openHelpCenterNewTab: string;
|
|
651
|
+
openNavigationMenu: string;
|
|
652
|
+
settingsNavigation: string;
|
|
653
|
+
sidebarCollapsed: string;
|
|
654
|
+
sidebarCollapsedHint: string;
|
|
655
|
+
sidebarExpanded: string;
|
|
656
|
+
sidebarToggleCollapsed: string;
|
|
657
|
+
sidebarToggleExpanded: string;
|
|
658
|
+
signIn: string;
|
|
659
|
+
signOut: string;
|
|
660
|
+
signOutError: string;
|
|
661
|
+
signOutSuccess: string;
|
|
662
|
+
signUp: string;
|
|
663
|
+
signingOut: string;
|
|
664
|
+
superAdminArea: string;
|
|
665
|
+
superAdminAreaTitle: string;
|
|
666
|
+
taskSearch: string;
|
|
667
|
+
userInfo: string;
|
|
668
|
+
userMenuForName: string;
|
|
669
|
+
};
|
|
612
670
|
mobileNav: {
|
|
613
671
|
greeting: string;
|
|
614
672
|
home: string;
|
|
@@ -663,6 +721,7 @@ declare const _default: {
|
|
|
663
721
|
inactive: string;
|
|
664
722
|
on: string;
|
|
665
723
|
off: string;
|
|
724
|
+
user: string;
|
|
666
725
|
};
|
|
667
726
|
theme: {
|
|
668
727
|
selector: string;
|
|
@@ -680,11 +739,14 @@ declare const _default: {
|
|
|
680
739
|
notifications: {
|
|
681
740
|
title: string;
|
|
682
741
|
unread: string;
|
|
742
|
+
unreadStatus: string;
|
|
683
743
|
new: string;
|
|
684
744
|
markAllAsRead: string;
|
|
685
745
|
markAll: string;
|
|
686
746
|
empty: string;
|
|
687
747
|
configure: string;
|
|
748
|
+
read: string;
|
|
749
|
+
markAsRead: string;
|
|
688
750
|
};
|
|
689
751
|
search: {
|
|
690
752
|
placeholder: string;
|
|
@@ -694,6 +756,16 @@ declare const _default: {
|
|
|
694
756
|
searching: string;
|
|
695
757
|
noResults: string;
|
|
696
758
|
tryDifferent: string;
|
|
759
|
+
entityLabel: string;
|
|
760
|
+
settingLabel: string;
|
|
761
|
+
pageLabel: string;
|
|
762
|
+
resultLabel: string;
|
|
763
|
+
closedAnnouncement: string;
|
|
764
|
+
searchingFor: string;
|
|
765
|
+
resultsCount: string;
|
|
766
|
+
keyboardNavigate: string;
|
|
767
|
+
keyboardSelect: string;
|
|
768
|
+
keyboardClose: string;
|
|
697
769
|
};
|
|
698
770
|
userRoles: {
|
|
699
771
|
member: string;
|
|
@@ -758,6 +830,16 @@ declare const _default: {
|
|
|
758
830
|
completedDate: string;
|
|
759
831
|
deleteCompletedTask: string;
|
|
760
832
|
};
|
|
833
|
+
relativeTime: {
|
|
834
|
+
justNow: string;
|
|
835
|
+
minutesAgo: string;
|
|
836
|
+
hoursAgo: string;
|
|
837
|
+
daysAgo: string;
|
|
838
|
+
};
|
|
839
|
+
debug: {
|
|
840
|
+
hidePrefix: string;
|
|
841
|
+
hideSuffix: string;
|
|
842
|
+
};
|
|
761
843
|
};
|
|
762
844
|
readonly dashboard: {
|
|
763
845
|
title: string;
|
|
@@ -1498,6 +1580,10 @@ declare const _default: {
|
|
|
1498
1580
|
countryPlaceholder: string;
|
|
1499
1581
|
timezone: string;
|
|
1500
1582
|
timezonePlaceholder: string;
|
|
1583
|
+
countrySearchPlaceholder: string;
|
|
1584
|
+
countryNotFound: string;
|
|
1585
|
+
timezoneSearchPlaceholder: string;
|
|
1586
|
+
timezoneNotFound: string;
|
|
1501
1587
|
memberSince: string;
|
|
1502
1588
|
updateButton: string;
|
|
1503
1589
|
updating: string;
|
|
@@ -1824,6 +1910,7 @@ declare const _default: {
|
|
|
1824
1910
|
yourTeam: string;
|
|
1825
1911
|
yourTeams: string;
|
|
1826
1912
|
yourTeamsDescription: string;
|
|
1913
|
+
singleUserDescription: string;
|
|
1827
1914
|
noTeams: string;
|
|
1828
1915
|
manageTeamMembers: string;
|
|
1829
1916
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/pt/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/pt/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,wBAqBU"}
|
|
@@ -64,6 +64,10 @@
|
|
|
64
64
|
"countryPlaceholder": "Selecione seu pais",
|
|
65
65
|
"timezone": "Fuso Horario",
|
|
66
66
|
"timezonePlaceholder": "Selecione seu fuso horario",
|
|
67
|
+
"countrySearchPlaceholder": "Buscar pais...",
|
|
68
|
+
"countryNotFound": "Nenhum pais encontrado.",
|
|
69
|
+
"timezoneSearchPlaceholder": "Buscar fuso horario...",
|
|
70
|
+
"timezoneNotFound": "Nenhum fuso horario encontrado.",
|
|
67
71
|
"memberSince": "Membro desde",
|
|
68
72
|
"updateButton": "Atualizar Perfil",
|
|
69
73
|
"updating": "Atualizando...",
|
|
@@ -390,6 +394,7 @@
|
|
|
390
394
|
"yourTeam": "Sua Equipe",
|
|
391
395
|
"yourTeams": "Suas Equipes",
|
|
392
396
|
"yourTeamsDescription": "Equipes das quais voce e membro. Selecione uma para ver seus detalhes.",
|
|
397
|
+
"singleUserDescription": "Seu espaço de trabalho pessoal.",
|
|
393
398
|
"noTeams": "Voce ainda nao pertence a nenhuma equipe.",
|
|
394
399
|
"manageTeamMembers": "Gerencie os membros e configuracao da equipe."
|
|
395
400
|
},
|
|
@@ -187,6 +187,39 @@ declare module '@nextsparkjs/registries/block-registry' {
|
|
|
187
187
|
export function getAllBlocks(): BlockConfig[]
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
// ============================================================================
|
|
191
|
+
// Block Registry (client-safe) — the configs, with no component imports.
|
|
192
|
+
//
|
|
193
|
+
// A block component is a server component and may import server-only code, so
|
|
194
|
+
// a client component reading the registry has to take this half: importing the
|
|
195
|
+
// other one pulls every block component into the browser build, which fails as
|
|
196
|
+
// soon as one of them is server-only.
|
|
197
|
+
// ============================================================================
|
|
198
|
+
declare module '@nextsparkjs/registries/block-registry.client' {
|
|
199
|
+
export type {
|
|
200
|
+
FieldType,
|
|
201
|
+
FieldTab,
|
|
202
|
+
BlockCategory,
|
|
203
|
+
FieldDefinition,
|
|
204
|
+
BlockExample,
|
|
205
|
+
BlockConfig,
|
|
206
|
+
} from '@nextsparkjs/registries/block-registry'
|
|
207
|
+
|
|
208
|
+
export const BLOCK_REGISTRY: Record<string, import('@nextsparkjs/registries/block-registry').BlockConfig>
|
|
209
|
+
export const BLOCK_CATEGORIES: import('@nextsparkjs/registries/block-registry').BlockCategory[]
|
|
210
|
+
export const BLOCK_METADATA: {
|
|
211
|
+
totalBlocks: number
|
|
212
|
+
categories: string[]
|
|
213
|
+
blocksByCategory: Record<string, number>
|
|
214
|
+
generatedAt: string
|
|
215
|
+
blocks: string[]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare module '@nextsparkjs/registries/block-registry.lazy' {
|
|
220
|
+
export const BLOCK_COMPONENTS: Record<string, React.LazyExoticComponent<React.ComponentType<any>> | React.ComponentType<any>>
|
|
221
|
+
}
|
|
222
|
+
|
|
190
223
|
// ============================================================================
|
|
191
224
|
// Entity Registry (Server) — declared for completeness; no direct import
|
|
192
225
|
// found in packages/core/src today, but kept in case a consumer-facing
|
|
@@ -871,3 +904,24 @@ declare module '@nextsparkjs/registries/scheduled-actions-registry' {
|
|
|
871
904
|
|
|
872
905
|
export const SCHEDULED_ACTIONS_REGISTRY: Record<string, ScheduledActionsModule | undefined>
|
|
873
906
|
}
|
|
907
|
+
|
|
908
|
+
// ============================================================================
|
|
909
|
+
// Icon Registry
|
|
910
|
+
//
|
|
911
|
+
// Generated from every config that names an icon by string (entity configs,
|
|
912
|
+
// a theme's sidebar sections, block configs) so the app can resolve those
|
|
913
|
+
// names without a namespace import of lucide-react, which would keep the
|
|
914
|
+
// whole icon set in the bundle (#182). Inline `import(...)` type query for
|
|
915
|
+
// the same reason as middleware-registry below: this file must stay free of
|
|
916
|
+
// file-level imports.
|
|
917
|
+
// ============================================================================
|
|
918
|
+
declare module '@nextsparkjs/registries/icon-registry' {
|
|
919
|
+
export const ICON_REGISTRY: Record<string, import('lucide-react').LucideIcon>
|
|
920
|
+
|
|
921
|
+
export type IconName = string
|
|
922
|
+
|
|
923
|
+
export const ICON_METADATA: {
|
|
924
|
+
totalIcons: number
|
|
925
|
+
generatedAt: string
|
|
926
|
+
}
|
|
927
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DashboardProviders — Client providers needed by authenticated routes.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* fetch, the cookie sync and the TeamSwitchModal, and a second Toaster would
|
|
10
|
-
* show every toast twice.
|
|
4
|
+
* TeamProvider and SubscriptionProvider live here rather than in the root
|
|
5
|
+
* layout, so public pages never fetch a signed-in visitor's teams or
|
|
6
|
+
* subscription, nor re-sync the activeTeamId cookie. The areas that need a
|
|
7
|
+
* team (dashboard, superadmin, devtools) mount them through this component,
|
|
8
|
+
* which also keeps that cookie in sync.
|
|
11
9
|
*
|
|
12
|
-
*
|
|
13
|
-
* layout
|
|
14
|
-
*
|
|
10
|
+
* What gets mounted depends on the root layout above:
|
|
11
|
+
* - A root layout that provides QueryProvider and Toaster: only the team and
|
|
12
|
+
* subscription providers, so the app keeps one query cache and toasts are
|
|
13
|
+
* not shown twice.
|
|
14
|
+
* - An older root layout that already mounts TeamProvider: nothing, since a
|
|
15
|
+
* second TeamProvider would duplicate the teams fetch, the cookie sync and
|
|
16
|
+
* the TeamSwitchModal.
|
|
17
|
+
* - A root layout with no providers at all: the full stack, Toaster included.
|
|
15
18
|
*
|
|
16
19
|
* Used by: dashboard/layout.tsx, superadmin/layout.tsx, devtools/layout.tsx
|
|
17
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardProviders.d.ts","sourceRoot":"","sources":["../../src/providers/DashboardProviders.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardProviders.d.ts","sourceRoot":"","sources":["../../src/providers/DashboardProviders.tsx"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CA4B7E"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Suspense } from "react";
|
|
3
|
+
import { Suspense, useContext } from "react";
|
|
4
|
+
import { QueryClientContext } from "@tanstack/react-query";
|
|
4
5
|
import { QueryProvider } from "./query-provider.js";
|
|
5
6
|
import { TeamProvider, useOptionalTeamContext } from "../contexts/TeamContext.js";
|
|
6
7
|
import { SubscriptionProvider } from "../contexts/SubscriptionContext.js";
|
|
7
8
|
import { Toaster } from "../components/ui/sonner.js";
|
|
8
9
|
function DashboardProviders({ children }) {
|
|
9
10
|
const rootTeamContext = useOptionalTeamContext();
|
|
11
|
+
const rootQueryClient = useContext(QueryClientContext);
|
|
10
12
|
if (rootTeamContext) {
|
|
11
13
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
12
14
|
}
|
|
15
|
+
const teamProviders = /* @__PURE__ */ jsx(TeamProvider, { children: /* @__PURE__ */ jsx(SubscriptionProvider, { children }) });
|
|
16
|
+
if (rootQueryClient) {
|
|
17
|
+
return teamProviders;
|
|
18
|
+
}
|
|
13
19
|
return /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(TeamProvider, { children: /* @__PURE__ */ jsxs(SubscriptionProvider, { children: [
|
|
14
20
|
children,
|
|
15
21
|
/* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Toaster, { position: "bottom-left" }) })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { resetPasswordSchema, type ResetPasswordFormData } from '@nextsparkjs/core/lib/validation';
|
|
4
|
-
import {
|
|
4
|
+
import { useAuthActions } from '@nextsparkjs/core/hooks/useAuth';
|
|
5
5
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
6
6
|
import { AlertCircle, ArrowLeft, CheckCircle, Loader2, Mail } from 'lucide-react';
|
|
7
7
|
import Link from 'next/link';
|
|
@@ -18,7 +18,7 @@ import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-reg
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
function ForgotPasswordPage() {
|
|
21
|
-
const { resetPassword } =
|
|
21
|
+
const { resetPassword } = useAuthActions();
|
|
22
22
|
const [loading, setLoading] = useState(false);
|
|
23
23
|
const [error, setError] = useState<string | null>(null);
|
|
24
24
|
const [success, setSuccess] = useState(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { newPasswordSchema, type NewPasswordFormData } from "@nextsparkjs/core/lib/validation";
|
|
4
|
-
import {
|
|
4
|
+
import { useAuthActions } from "@nextsparkjs/core/hooks/useAuth";
|
|
5
5
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
6
6
|
import {
|
|
7
7
|
AlertCircle,
|
|
@@ -24,7 +24,7 @@ import { sel } from '@nextsparkjs/core/selectors'
|
|
|
24
24
|
function ResetPasswordContent() {
|
|
25
25
|
const searchParams = useSearchParams()!;
|
|
26
26
|
const token = searchParams.get("token") || "";
|
|
27
|
-
const { updatePassword } =
|
|
27
|
+
const { updatePassword } = useAuthActions();
|
|
28
28
|
|
|
29
29
|
const [loading, setLoading] = useState(false);
|
|
30
30
|
const [error, setError] = useState<string | null>(null);
|
|
@@ -57,13 +57,13 @@ function ResetPasswordContent() {
|
|
|
57
57
|
|
|
58
58
|
const onSubmit = useCallback(async (data: NewPasswordFormData) => {
|
|
59
59
|
if (!token) {
|
|
60
|
-
setError("
|
|
60
|
+
setError("Invalid recovery token");
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
setLoading(true);
|
|
65
65
|
setError(null);
|
|
66
|
-
console.log('
|
|
66
|
+
console.log('Updating password...');
|
|
67
67
|
|
|
68
68
|
try {
|
|
69
69
|
const result = await updatePassword(data.password, token);
|
|
@@ -73,10 +73,10 @@ function ResetPasswordContent() {
|
|
|
73
73
|
setError(errorMsg);
|
|
74
74
|
} else {
|
|
75
75
|
setSuccess(true);
|
|
76
|
-
console.log('
|
|
76
|
+
console.log('Password updated successfully');
|
|
77
77
|
}
|
|
78
78
|
} catch {
|
|
79
|
-
setError('
|
|
79
|
+
setError('Unexpected error updating password');
|
|
80
80
|
} finally {
|
|
81
81
|
setLoading(false);
|
|
82
82
|
}
|
|
@@ -10,7 +10,7 @@ import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-reg
|
|
|
10
10
|
|
|
11
11
|
function ForbiddenContent() {
|
|
12
12
|
const searchParams = useSearchParams()!
|
|
13
|
-
const reason = searchParams.get('reason') || '
|
|
13
|
+
const reason = searchParams.get('reason') || 'You do not have permission to access this resource'
|
|
14
14
|
const upgrade = searchParams.get('upgrade') === 'true'
|
|
15
15
|
|
|
16
16
|
return (
|
|
@@ -21,7 +21,7 @@ function ForbiddenContent() {
|
|
|
21
21
|
<AlertTriangle className="h-8 w-8 text-yellow-600" />
|
|
22
22
|
</div>
|
|
23
23
|
<CardTitle className="text-2xl">
|
|
24
|
-
⚠️
|
|
24
|
+
⚠️ Oops, you do not have permission to do this
|
|
25
25
|
</CardTitle>
|
|
26
26
|
<CardDescription className="text-gray-600">
|
|
27
27
|
{reason}
|
|
@@ -32,11 +32,11 @@ function ForbiddenContent() {
|
|
|
32
32
|
{upgrade && (
|
|
33
33
|
<div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
|
34
34
|
<p className="text-sm text-blue-800">
|
|
35
|
-
|
|
35
|
+
This feature requires an upgrade to your current plan.
|
|
36
36
|
</p>
|
|
37
37
|
<Link href="/dashboard/settings/billing" className="block mt-2">
|
|
38
38
|
<Button variant="outline" size="sm" className="w-full">
|
|
39
|
-
|
|
39
|
+
View plans
|
|
40
40
|
</Button>
|
|
41
41
|
</Link>
|
|
42
42
|
</div>
|
|
@@ -49,7 +49,7 @@ function ForbiddenContent() {
|
|
|
49
49
|
onClick={() => window.history.back()}
|
|
50
50
|
>
|
|
51
51
|
<ArrowLeft className="h-4 w-4 mr-2" />
|
|
52
|
-
|
|
52
|
+
Back
|
|
53
53
|
</Button>
|
|
54
54
|
|
|
55
55
|
<Link href="/dashboard" className="flex-1">
|
|
@@ -75,7 +75,7 @@ function ForbiddenPage() {
|
|
|
75
75
|
<AlertTriangle className="h-8 w-8 text-yellow-600" />
|
|
76
76
|
</div>
|
|
77
77
|
<CardTitle className="text-2xl">
|
|
78
|
-
⚠️
|
|
78
|
+
⚠️ Oops, you do not have permission to do this
|
|
79
79
|
</CardTitle>
|
|
80
80
|
</CardHeader>
|
|
81
81
|
</Card>
|
|
@@ -9,6 +9,11 @@ import {
|
|
|
9
9
|
import { authenticateRequest, createAuthFailureResponse } from '@nextsparkjs/core/lib/api/auth/dual-auth'
|
|
10
10
|
import { withRateLimitTier } from '@nextsparkjs/core/lib/api/rate-limit'
|
|
11
11
|
import { TeamService } from '@nextsparkjs/core/lib/services'
|
|
12
|
+
import {
|
|
13
|
+
ACTIVE_TEAM_COOKIE,
|
|
14
|
+
ACTIVE_TEAM_COOKIE_MAX_AGE,
|
|
15
|
+
activeTeamCookieValue,
|
|
16
|
+
} from '@nextsparkjs/core/lib/teams/active-team-cookie'
|
|
12
17
|
import { z } from 'zod'
|
|
13
18
|
|
|
14
19
|
const switchTeamSchema = z.object({
|
|
@@ -35,6 +40,19 @@ export const POST = withRateLimitTier(withApiLogging(async (req: NextRequest): P
|
|
|
35
40
|
return authResult.rateLimitResponse as NextResponse
|
|
36
41
|
}
|
|
37
42
|
|
|
43
|
+
// The active team is remembered per browser session, in the activeTeamId
|
|
44
|
+
// cookie. An API key chooses the team on each request with x-team-id, so for
|
|
45
|
+
// it there is nothing to switch.
|
|
46
|
+
if (authResult.type !== 'session' || !authResult.sessionId) {
|
|
47
|
+
const response = createApiError(
|
|
48
|
+
'API keys choose the team on each request with the x-team-id header',
|
|
49
|
+
400,
|
|
50
|
+
null,
|
|
51
|
+
'SESSION_REQUIRED'
|
|
52
|
+
)
|
|
53
|
+
return addCorsHeaders(response, req)
|
|
54
|
+
}
|
|
55
|
+
|
|
38
56
|
const body = await req.json()
|
|
39
57
|
const validatedData = switchTeamSchema.parse(body)
|
|
40
58
|
|
|
@@ -48,15 +66,16 @@ export const POST = withRateLimitTier(withApiLogging(async (req: NextRequest): P
|
|
|
48
66
|
message: 'Active team switched successfully',
|
|
49
67
|
})
|
|
50
68
|
|
|
51
|
-
//
|
|
52
|
-
//
|
|
69
|
+
// Remember the team for server-side reads (the dashboard layouts through
|
|
70
|
+
// the proxy, server actions, resolveTeamContext), bound to this session so
|
|
71
|
+
// a later session on the same browser does not inherit it.
|
|
53
72
|
// SECURITY: httpOnly prevents client-side JS manipulation
|
|
54
|
-
response.cookies.set(
|
|
73
|
+
response.cookies.set(ACTIVE_TEAM_COOKIE, activeTeamCookieValue(authResult.sessionId, validatedData.teamId), {
|
|
55
74
|
path: '/',
|
|
56
|
-
httpOnly: true,
|
|
75
|
+
httpOnly: true,
|
|
57
76
|
secure: process.env.NODE_ENV === 'production',
|
|
58
77
|
sameSite: 'lax',
|
|
59
|
-
maxAge:
|
|
78
|
+
maxAge: ACTIVE_TEAM_COOKIE_MAX_AGE,
|
|
60
79
|
})
|
|
61
80
|
|
|
62
81
|
return addCorsHeaders(response, req)
|
|
@@ -8,14 +8,17 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Flow:
|
|
10
10
|
* 1. User navigates to /dashboard/companies/create
|
|
11
|
-
* 2.
|
|
12
|
-
*
|
|
11
|
+
* 2. The proxy forwards the session's active team, taken from the
|
|
12
|
+
* activeTeamId cookie only when this session wrote it; without one, the
|
|
13
|
+
* user's default team is checked
|
|
14
|
+
* 3. This layout takes that team (getDashboardTeamId) and checks permission via checkPermission()
|
|
13
15
|
* 4. If denied, redirects to /dashboard/permission-denied
|
|
14
16
|
* 5. If allowed, renders the page (children)
|
|
15
17
|
*/
|
|
16
|
-
import { headers
|
|
18
|
+
import { headers } from 'next/headers'
|
|
17
19
|
import { redirect } from 'next/navigation'
|
|
18
20
|
import { checkPermission } from '@nextsparkjs/core/lib/permissions/check'
|
|
21
|
+
import { getDashboardTeamId } from '@nextsparkjs/core/lib/teams/dashboard-team'
|
|
19
22
|
import { isValidPermission } from '@nextsparkjs/core/lib/permissions/init'
|
|
20
23
|
import type { Permission } from '@nextsparkjs/core/lib/permissions/types'
|
|
21
24
|
|
|
@@ -59,7 +62,6 @@ export default async function EntityPermissionLayout({
|
|
|
59
62
|
}: EntityLayoutProps) {
|
|
60
63
|
const { entity } = await params
|
|
61
64
|
const headersList = await headers()
|
|
62
|
-
const cookieStore = await cookies()
|
|
63
65
|
|
|
64
66
|
// Get pathname from middleware header
|
|
65
67
|
const pathname = headersList.get('x-pathname') || ''
|
|
@@ -67,12 +69,12 @@ export default async function EntityPermissionLayout({
|
|
|
67
69
|
// Get userId from middleware header (set for all authenticated routes)
|
|
68
70
|
const userId = headersList.get('x-user-id')
|
|
69
71
|
|
|
70
|
-
//
|
|
71
|
-
const teamId =
|
|
72
|
+
// The team this session chose, or the user's default team until it has one
|
|
73
|
+
const teamId = userId ? await getDashboardTeamId(headersList, userId) : null
|
|
72
74
|
|
|
73
75
|
// Skip validation if missing required data
|
|
74
76
|
// - No userId: middleware will redirect to login (shouldn't happen for dashboard routes)
|
|
75
|
-
// - No teamId: user
|
|
77
|
+
// - No teamId: the user belongs to no team, let page handle it
|
|
76
78
|
if (!userId || !teamId) {
|
|
77
79
|
console.log('[EntityPermissionLayout] Skipping validation - missing data:', {
|
|
78
80
|
entity,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* IMPORTANT: Permission checking MUST be in this layout (not in [entity]/layout.tsx)
|
|
10
10
|
* because (templates) routes with specific paths take precedence over dynamic [entity] routes.
|
|
11
11
|
*/
|
|
12
|
-
import { headers
|
|
12
|
+
import { headers } from 'next/headers'
|
|
13
13
|
import { redirect } from 'next/navigation'
|
|
14
14
|
import { DashboardShell } from '@nextsparkjs/core/components/dashboard/layouts/DashboardShell'
|
|
15
15
|
import { serializeEntityConfig, type SerializableEntityConfig } from '@nextsparkjs/core/lib/entities/serialization'
|
|
@@ -17,6 +17,7 @@ import { setEntityRegistry } from '@nextsparkjs/core/lib/entities/queries'
|
|
|
17
17
|
import { getTemplateOrDefault } from '@nextsparkjs/core/lib/template-resolver'
|
|
18
18
|
import type { EntityConfig, ChildEntityDefinition } from '@nextsparkjs/core/lib/entities/types'
|
|
19
19
|
import { checkPermission } from '@nextsparkjs/core/lib/permissions/check'
|
|
20
|
+
import { getDashboardTeamId } from '@nextsparkjs/core/lib/teams/dashboard-team'
|
|
20
21
|
import { isValidPermission } from '@nextsparkjs/core/lib/permissions/init'
|
|
21
22
|
import type { Permission } from '@nextsparkjs/core/lib/permissions/types'
|
|
22
23
|
// Import registry directly - webpack resolves @nextsparkjs/registries alias at compile time
|
|
@@ -64,11 +65,11 @@ async function DefaultMainDashboardLayout({
|
|
|
64
65
|
|
|
65
66
|
// === PERMISSION CHECK ===
|
|
66
67
|
const headersList = await headers()
|
|
67
|
-
const cookieStore = await cookies()
|
|
68
68
|
|
|
69
69
|
const pathname = headersList.get('x-pathname') || ''
|
|
70
70
|
const userId = headersList.get('x-user-id')
|
|
71
|
-
|
|
71
|
+
// The team this session chose, or the user's default team until it has one
|
|
72
|
+
const teamId = userId ? await getDashboardTeamId(headersList, userId) : null
|
|
72
73
|
|
|
73
74
|
if (userId && teamId && pathname) {
|
|
74
75
|
const parsed = parseEntityFromPathname(pathname)
|