@nextsparkjs/core 0.1.0-beta.83 → 0.1.0-beta.85
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/styles/classes.json +1 -1
- package/dist/templates/app/(auth)/forgot-password/page.tsx +216 -0
- package/dist/templates/app/(auth)/layout.tsx +51 -0
- package/dist/templates/app/(auth)/login/page.tsx +21 -0
- package/dist/templates/app/(auth)/reset-password/page.tsx +212 -0
- package/dist/templates/app/(auth)/signup/page.tsx +21 -0
- package/dist/templates/app/(auth)/verify-email/page.tsx +190 -0
- package/dist/templates/app/(public)/[...slug]/page.tsx +378 -0
- package/dist/templates/app/(public)/docs/[section]/[page]/page.tsx +90 -0
- package/dist/templates/app/(public)/docs/layout.tsx +25 -0
- package/dist/templates/app/(public)/docs/page.tsx +81 -0
- package/dist/templates/app/(public)/layout.tsx +41 -0
- package/dist/templates/app/(public)/page.tsx +19 -0
- package/dist/templates/app/403/page.tsx +89 -0
- package/dist/templates/app/api/auth/[...all]/route.ts +78 -0
- package/dist/templates/app/api/cron/billing/lifecycle/route.ts +98 -0
- package/dist/templates/app/api/csp-report/route.ts +175 -0
- package/dist/templates/app/api/devtools/config/entities/route.ts +108 -0
- package/dist/templates/app/api/devtools/config/theme/route.ts +66 -0
- package/dist/templates/app/api/devtools/tests/[...path]/route.ts +130 -0
- package/dist/templates/app/api/devtools/tests/route.ts +134 -0
- package/dist/templates/app/api/health/route.ts +29 -0
- package/dist/templates/app/api/internal/user-metadata/route.ts +36 -0
- package/dist/templates/app/api/superadmin/subscriptions/route.ts +310 -0
- package/dist/templates/app/api/superadmin/teams/[teamId]/route.ts +286 -0
- package/dist/templates/app/api/superadmin/teams/route.ts +188 -0
- package/dist/templates/app/api/superadmin/users/[userId]/route.ts +540 -0
- package/dist/templates/app/api/superadmin/users/route.ts +323 -0
- package/dist/templates/app/api/user/delete-account/route.ts +55 -0
- package/dist/templates/app/api/user/plan-flags/route.ts +283 -0
- package/dist/templates/app/api/user/profile/route.ts +133 -0
- package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +210 -0
- package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/route.ts +331 -0
- package/dist/templates/app/api/v1/[entity]/[id]/route.ts +35 -0
- package/dist/templates/app/api/v1/[entity]/docs.md +369 -0
- package/dist/templates/app/api/v1/[entity]/presets.ts +194 -0
- package/dist/templates/app/api/v1/[entity]/route.ts +31 -0
- package/dist/templates/app/api/v1/api-keys/[id]/route.ts +303 -0
- package/dist/templates/app/api/v1/api-keys/docs.md +101 -0
- package/dist/templates/app/api/v1/api-keys/presets.ts +31 -0
- package/dist/templates/app/api/v1/api-keys/route.ts +250 -0
- package/dist/templates/app/api/v1/auth/docs.md +184 -0
- package/dist/templates/app/api/v1/auth/presets.ts +44 -0
- package/dist/templates/app/api/v1/auth/signup-with-invite/route.ts +227 -0
- package/dist/templates/app/api/v1/billing/cancel/route.ts +206 -0
- package/dist/templates/app/api/v1/billing/change-plan/route.ts +97 -0
- package/dist/templates/app/api/v1/billing/check-action/route.ts +81 -0
- package/dist/templates/app/api/v1/billing/checkout/route.ts +124 -0
- package/dist/templates/app/api/v1/billing/docs.md +209 -0
- package/dist/templates/app/api/v1/billing/plans/route.ts +85 -0
- package/dist/templates/app/api/v1/billing/portal/route.ts +90 -0
- package/dist/templates/app/api/v1/billing/presets.ts +121 -0
- package/dist/templates/app/api/v1/billing/webhooks/stripe/route.ts +428 -0
- package/dist/templates/app/api/v1/blocks/[slug]/route.ts +29 -0
- package/dist/templates/app/api/v1/blocks/docs.md +173 -0
- package/dist/templates/app/api/v1/blocks/presets.ts +121 -0
- package/dist/templates/app/api/v1/blocks/route.ts +45 -0
- package/dist/templates/app/api/v1/blocks/validate/route.ts +45 -0
- package/dist/templates/app/api/v1/cron/docs.md +116 -0
- package/dist/templates/app/api/v1/cron/presets.ts +26 -0
- package/dist/templates/app/api/v1/cron/process/route.ts +108 -0
- package/dist/templates/app/api/v1/devtools/blocks/route.ts +82 -0
- package/dist/templates/app/api/v1/devtools/docs/route.ts +150 -0
- package/dist/templates/app/api/v1/devtools/docs.md +204 -0
- package/dist/templates/app/api/v1/devtools/features/route.ts +61 -0
- package/dist/templates/app/api/v1/devtools/flows/route.ts +61 -0
- package/dist/templates/app/api/v1/devtools/presets.ts +113 -0
- package/dist/templates/app/api/v1/devtools/scheduled-actions/route.ts +120 -0
- package/dist/templates/app/api/v1/devtools/testing/route.ts +82 -0
- package/dist/templates/app/api/v1/media/docs.md +117 -0
- package/dist/templates/app/api/v1/media/presets.ts +24 -0
- package/dist/templates/app/api/v1/media/upload/route.ts +150 -0
- package/dist/templates/app/api/v1/patterns/[id]/usages/route.ts +116 -0
- package/dist/templates/app/api/v1/plugin/[...path]/route.ts +373 -0
- package/dist/templates/app/api/v1/plugin/docs.md +79 -0
- package/dist/templates/app/api/v1/plugin/presets.ts +21 -0
- package/dist/templates/app/api/v1/plugin/route.ts +96 -0
- package/dist/templates/app/api/v1/post-categories/[id]/route.ts +255 -0
- package/dist/templates/app/api/v1/post-categories/docs.md +134 -0
- package/dist/templates/app/api/v1/post-categories/presets.ts +78 -0
- package/dist/templates/app/api/v1/post-categories/route.ts +119 -0
- package/dist/templates/app/api/v1/team-invitations/[token]/accept/route.ts +179 -0
- package/dist/templates/app/api/v1/team-invitations/[token]/decline/route.ts +120 -0
- package/dist/templates/app/api/v1/team-invitations/[token]/route.ts +89 -0
- package/dist/templates/app/api/v1/team-invitations/docs.md +88 -0
- package/dist/templates/app/api/v1/team-invitations/presets.ts +43 -0
- package/dist/templates/app/api/v1/team-invitations/route.ts +114 -0
- package/dist/templates/app/api/v1/teams/[teamId]/invitations/route.ts +171 -0
- package/dist/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +105 -0
- package/dist/templates/app/api/v1/teams/[teamId]/invoices/route.ts +125 -0
- package/dist/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +263 -0
- package/dist/templates/app/api/v1/teams/[teamId]/members/route.ts +358 -0
- package/dist/templates/app/api/v1/teams/[teamId]/route.ts +322 -0
- package/dist/templates/app/api/v1/teams/[teamId]/subscription/route.ts +50 -0
- package/dist/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +91 -0
- package/dist/templates/app/api/v1/teams/docs.md +320 -0
- package/dist/templates/app/api/v1/teams/presets.ts +178 -0
- package/dist/templates/app/api/v1/teams/route.ts +293 -0
- package/dist/templates/app/api/v1/teams/switch/route.ts +88 -0
- package/dist/templates/app/api/v1/theme/[...path]/route.ts +361 -0
- package/dist/templates/app/api/v1/theme/docs.md +74 -0
- package/dist/templates/app/api/v1/theme/presets.ts +21 -0
- package/dist/templates/app/api/v1/theme/route.ts +96 -0
- package/dist/templates/app/api/v1/users/[id]/meta/[key]/route.ts +363 -0
- package/dist/templates/app/api/v1/users/[id]/route.ts +302 -0
- package/dist/templates/app/api/v1/users/docs.md +93 -0
- package/dist/templates/app/api/v1/users/presets.ts +59 -0
- package/dist/templates/app/api/v1/users/route.ts +197 -0
- package/dist/templates/app/dashboard/(main)/[entity]/[id]/edit/page.tsx +117 -0
- package/dist/templates/app/dashboard/(main)/[entity]/[id]/page.tsx +103 -0
- package/dist/templates/app/dashboard/(main)/[entity]/create/page.tsx +95 -0
- package/dist/templates/app/dashboard/(main)/[entity]/error.tsx +51 -0
- package/dist/templates/app/dashboard/(main)/[entity]/layout.tsx +113 -0
- package/dist/templates/app/dashboard/(main)/[entity]/loading.tsx +61 -0
- package/dist/templates/app/dashboard/(main)/[entity]/page.tsx +90 -0
- package/dist/templates/app/dashboard/(main)/layout.tsx +98 -0
- package/dist/templates/app/dashboard/(main)/loading.tsx +5 -0
- package/dist/templates/app/dashboard/(main)/page.tsx +201 -0
- package/dist/templates/app/dashboard/(main)/patterns/[id]/edit/page.tsx +114 -0
- package/dist/templates/app/dashboard/(main)/patterns/[id]/page.tsx +20 -0
- package/dist/templates/app/dashboard/(main)/patterns/[id]/reports/page.tsx +171 -0
- package/dist/templates/app/dashboard/(main)/patterns/create/page.tsx +86 -0
- package/dist/templates/app/dashboard/(main)/patterns/page.tsx +444 -0
- package/dist/templates/app/dashboard/features/analytics/page.tsx +35 -0
- package/dist/templates/app/dashboard/features/automation/page.tsx +35 -0
- package/dist/templates/app/dashboard/features/layout.tsx +13 -0
- package/dist/templates/app/dashboard/features/loading.tsx +5 -0
- package/dist/templates/app/dashboard/features/webhooks/page.tsx +35 -0
- package/dist/templates/app/dashboard/layout.tsx +86 -0
- package/dist/templates/app/dashboard/permission-denied/page.tsx +29 -0
- package/dist/templates/app/dashboard/settings/api-keys/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/api-keys/page.tsx +513 -0
- package/dist/templates/app/dashboard/settings/billing/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/billing/page.tsx +284 -0
- package/dist/templates/app/dashboard/settings/invoices/[invoiceNumber]/page.tsx +222 -0
- package/dist/templates/app/dashboard/settings/invoices/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/invoices/page.tsx +82 -0
- package/dist/templates/app/dashboard/settings/layout.tsx +151 -0
- package/dist/templates/app/dashboard/settings/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/notifications/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/notifications/page.tsx +462 -0
- package/dist/templates/app/dashboard/settings/page.tsx +92 -0
- package/dist/templates/app/dashboard/settings/password/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/password/page.tsx +306 -0
- package/dist/templates/app/dashboard/settings/plans/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/plans/page.tsx +40 -0
- package/dist/templates/app/dashboard/settings/profile/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/profile/page.tsx +686 -0
- package/dist/templates/app/dashboard/settings/security/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/security/page.tsx +505 -0
- package/dist/templates/app/dashboard/settings/teams/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/teams/page.tsx +272 -0
- package/dist/templates/app/dashboard/settings/teams/permissions/page.tsx +92 -0
- package/dist/templates/app/devtools/blocks/[slug]/page.tsx +39 -0
- package/dist/templates/app/devtools/blocks/page.tsx +31 -0
- package/dist/templates/app/devtools/config/page.tsx +31 -0
- package/dist/templates/app/devtools/features/page.tsx +31 -0
- package/dist/templates/app/devtools/flows/page.tsx +31 -0
- package/dist/templates/app/devtools/layout.tsx +58 -0
- package/dist/templates/app/devtools/page.tsx +121 -0
- package/dist/templates/app/devtools/scheduled-actions/page.tsx +157 -0
- package/dist/templates/app/devtools/style/page.tsx +330 -0
- package/dist/templates/app/devtools/tags/page.tsx +31 -0
- package/dist/templates/app/devtools/tests/[[...path]]/page.tsx +47 -0
- package/dist/templates/app/favicon.ico +0 -0
- package/dist/templates/app/globals.css +12 -0
- package/dist/templates/app/layout.tsx +96 -0
- package/dist/templates/app/public/page.tsx +30 -0
- package/dist/templates/app/superadmin/docs/[section]/[page]/page.tsx +92 -0
- package/dist/templates/app/superadmin/docs/page.tsx +75 -0
- package/dist/templates/app/superadmin/layout.tsx +67 -0
- package/dist/templates/app/superadmin/page.tsx +149 -0
- package/dist/templates/app/superadmin/subscriptions/page.tsx +655 -0
- package/dist/templates/app/superadmin/team-roles/page.tsx +493 -0
- package/dist/templates/app/superadmin/teams/[teamId]/page.tsx +687 -0
- package/dist/templates/app/superadmin/teams/page.tsx +302 -0
- package/dist/templates/app/superadmin/users/[userId]/page.tsx +548 -0
- package/dist/templates/app/superadmin/users/page.tsx +528 -0
- package/package.json +15 -15
- package/scripts/build/docs-registry.mjs +0 -0
- package/scripts/create-theme.mjs +0 -0
- package/scripts/deploy/release-version.mjs +0 -0
- package/scripts/deploy/vercel-deploy.mjs +0 -0
- package/scripts/dev/watch-plugins.mjs +0 -0
- package/scripts/maintenance/update-core.mjs +0 -0
- package/scripts/setup/npm-postinstall.mjs +0 -0
- package/scripts/setup/setup-claude.mjs +0 -0
- package/scripts/validation/check-imports.sh +0 -0
- package/templates/app/(auth)/forgot-password/page.tsx +216 -0
- package/templates/app/(auth)/layout.tsx +51 -0
- package/templates/app/(auth)/login/page.tsx +21 -0
- package/templates/app/(auth)/reset-password/page.tsx +212 -0
- package/templates/app/(auth)/signup/page.tsx +21 -0
- package/templates/app/(auth)/verify-email/page.tsx +190 -0
- package/templates/app/(public)/[...slug]/page.tsx +378 -0
- package/templates/app/(public)/docs/[section]/[page]/page.tsx +90 -0
- package/templates/app/(public)/docs/layout.tsx +25 -0
- package/templates/app/(public)/docs/page.tsx +81 -0
- package/templates/app/(public)/layout.tsx +41 -0
- package/templates/app/(public)/page.tsx +19 -0
- package/templates/app/403/page.tsx +89 -0
- package/templates/app/api/auth/[...all]/route.ts +78 -0
- package/templates/app/api/cron/billing/lifecycle/route.ts +98 -0
- package/templates/app/api/csp-report/route.ts +175 -0
- package/templates/app/api/devtools/config/entities/route.ts +108 -0
- package/templates/app/api/devtools/config/theme/route.ts +66 -0
- package/templates/app/api/devtools/tests/[...path]/route.ts +130 -0
- package/templates/app/api/devtools/tests/route.ts +134 -0
- package/templates/app/api/health/route.ts +29 -0
- package/templates/app/api/internal/user-metadata/route.ts +36 -0
- package/templates/app/api/superadmin/subscriptions/route.ts +310 -0
- package/templates/app/api/superadmin/teams/[teamId]/route.ts +286 -0
- package/templates/app/api/superadmin/teams/route.ts +188 -0
- package/templates/app/api/superadmin/users/[userId]/route.ts +540 -0
- package/templates/app/api/superadmin/users/route.ts +323 -0
- package/templates/app/api/user/delete-account/route.ts +55 -0
- package/templates/app/api/user/plan-flags/route.ts +283 -0
- package/templates/app/api/user/profile/route.ts +133 -0
- package/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +210 -0
- package/templates/app/api/v1/[entity]/[id]/child/[childType]/route.ts +331 -0
- package/templates/app/api/v1/[entity]/[id]/route.ts +35 -0
- package/templates/app/api/v1/[entity]/docs.md +369 -0
- package/templates/app/api/v1/[entity]/presets.ts +194 -0
- package/templates/app/api/v1/[entity]/route.ts +31 -0
- package/templates/app/api/v1/api-keys/[id]/route.ts +303 -0
- package/templates/app/api/v1/api-keys/docs.md +101 -0
- package/templates/app/api/v1/api-keys/presets.ts +31 -0
- package/templates/app/api/v1/api-keys/route.ts +250 -0
- package/templates/app/api/v1/auth/docs.md +184 -0
- package/templates/app/api/v1/auth/presets.ts +44 -0
- package/templates/app/api/v1/auth/signup-with-invite/route.ts +227 -0
- package/templates/app/api/v1/billing/cancel/route.ts +206 -0
- package/templates/app/api/v1/billing/change-plan/route.ts +97 -0
- package/templates/app/api/v1/billing/check-action/route.ts +81 -0
- package/templates/app/api/v1/billing/checkout/route.ts +124 -0
- package/templates/app/api/v1/billing/docs.md +209 -0
- package/templates/app/api/v1/billing/plans/route.ts +85 -0
- package/templates/app/api/v1/billing/portal/route.ts +90 -0
- package/templates/app/api/v1/billing/presets.ts +121 -0
- package/templates/app/api/v1/billing/webhooks/stripe/route.ts +428 -0
- package/templates/app/api/v1/blocks/[slug]/route.ts +29 -0
- package/templates/app/api/v1/blocks/docs.md +173 -0
- package/templates/app/api/v1/blocks/presets.ts +121 -0
- package/templates/app/api/v1/blocks/route.ts +45 -0
- package/templates/app/api/v1/blocks/validate/route.ts +45 -0
- package/templates/app/api/v1/cron/docs.md +116 -0
- package/templates/app/api/v1/cron/presets.ts +26 -0
- package/templates/app/api/v1/cron/process/route.ts +108 -0
- package/templates/app/api/v1/devtools/blocks/route.ts +82 -0
- package/templates/app/api/v1/devtools/docs/route.ts +150 -0
- package/templates/app/api/v1/devtools/docs.md +204 -0
- package/templates/app/api/v1/devtools/features/route.ts +61 -0
- package/templates/app/api/v1/devtools/flows/route.ts +61 -0
- package/templates/app/api/v1/devtools/presets.ts +113 -0
- package/templates/app/api/v1/devtools/scheduled-actions/route.ts +120 -0
- package/templates/app/api/v1/devtools/testing/route.ts +82 -0
- package/templates/app/api/v1/media/docs.md +117 -0
- package/templates/app/api/v1/media/presets.ts +24 -0
- package/templates/app/api/v1/media/upload/route.ts +150 -0
- package/templates/app/api/v1/patterns/[id]/usages/route.ts +116 -0
- package/templates/app/api/v1/plugin/[...path]/route.ts +373 -0
- package/templates/app/api/v1/plugin/docs.md +79 -0
- package/templates/app/api/v1/plugin/presets.ts +21 -0
- package/templates/app/api/v1/plugin/route.ts +96 -0
- package/templates/app/api/v1/post-categories/[id]/route.ts +255 -0
- package/templates/app/api/v1/post-categories/docs.md +134 -0
- package/templates/app/api/v1/post-categories/presets.ts +78 -0
- package/templates/app/api/v1/post-categories/route.ts +119 -0
- package/templates/app/api/v1/team-invitations/[token]/accept/route.ts +179 -0
- package/templates/app/api/v1/team-invitations/[token]/decline/route.ts +120 -0
- package/templates/app/api/v1/team-invitations/[token]/route.ts +89 -0
- package/templates/app/api/v1/team-invitations/docs.md +88 -0
- package/templates/app/api/v1/team-invitations/presets.ts +43 -0
- package/templates/app/api/v1/team-invitations/route.ts +114 -0
- package/templates/app/api/v1/teams/[teamId]/invitations/route.ts +171 -0
- package/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +105 -0
- package/templates/app/api/v1/teams/[teamId]/invoices/route.ts +125 -0
- package/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +263 -0
- package/templates/app/api/v1/teams/[teamId]/members/route.ts +358 -0
- package/templates/app/api/v1/teams/[teamId]/route.ts +322 -0
- package/templates/app/api/v1/teams/[teamId]/subscription/route.ts +50 -0
- package/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +91 -0
- package/templates/app/api/v1/teams/docs.md +320 -0
- package/templates/app/api/v1/teams/presets.ts +178 -0
- package/templates/app/api/v1/teams/route.ts +293 -0
- package/templates/app/api/v1/teams/switch/route.ts +88 -0
- package/templates/app/api/v1/theme/[...path]/route.ts +361 -0
- package/templates/app/api/v1/theme/docs.md +74 -0
- package/templates/app/api/v1/theme/presets.ts +21 -0
- package/templates/app/api/v1/theme/route.ts +96 -0
- package/templates/app/api/v1/users/[id]/meta/[key]/route.ts +363 -0
- package/templates/app/api/v1/users/[id]/route.ts +302 -0
- package/templates/app/api/v1/users/docs.md +93 -0
- package/templates/app/api/v1/users/presets.ts +59 -0
- package/templates/app/api/v1/users/route.ts +197 -0
- package/templates/app/dashboard/(main)/[entity]/[id]/edit/page.tsx +117 -0
- package/templates/app/dashboard/(main)/[entity]/[id]/page.tsx +103 -0
- package/templates/app/dashboard/(main)/[entity]/create/page.tsx +95 -0
- package/templates/app/dashboard/(main)/[entity]/error.tsx +51 -0
- package/templates/app/dashboard/(main)/[entity]/layout.tsx +113 -0
- package/templates/app/dashboard/(main)/[entity]/loading.tsx +61 -0
- package/templates/app/dashboard/(main)/[entity]/page.tsx +90 -0
- package/templates/app/dashboard/(main)/layout.tsx +98 -0
- package/templates/app/dashboard/(main)/loading.tsx +5 -0
- package/templates/app/dashboard/(main)/page.tsx +201 -0
- package/templates/app/dashboard/(main)/patterns/[id]/edit/page.tsx +114 -0
- package/templates/app/dashboard/(main)/patterns/[id]/page.tsx +20 -0
- package/templates/app/dashboard/(main)/patterns/[id]/reports/page.tsx +171 -0
- package/templates/app/dashboard/(main)/patterns/create/page.tsx +86 -0
- package/templates/app/dashboard/(main)/patterns/page.tsx +444 -0
- package/templates/app/dashboard/features/analytics/page.tsx +35 -0
- package/templates/app/dashboard/features/automation/page.tsx +35 -0
- package/templates/app/dashboard/features/layout.tsx +13 -0
- package/templates/app/dashboard/features/loading.tsx +5 -0
- package/templates/app/dashboard/features/webhooks/page.tsx +35 -0
- package/templates/app/dashboard/layout.tsx +86 -0
- package/templates/app/dashboard/permission-denied/page.tsx +29 -0
- package/templates/app/dashboard/settings/api-keys/loading.tsx +5 -0
- package/templates/app/dashboard/settings/api-keys/page.tsx +513 -0
- package/templates/app/dashboard/settings/billing/loading.tsx +5 -0
- package/templates/app/dashboard/settings/billing/page.tsx +284 -0
- package/templates/app/dashboard/settings/invoices/[invoiceNumber]/page.tsx +222 -0
- package/templates/app/dashboard/settings/invoices/loading.tsx +5 -0
- package/templates/app/dashboard/settings/invoices/page.tsx +82 -0
- package/templates/app/dashboard/settings/layout.tsx +151 -0
- package/templates/app/dashboard/settings/loading.tsx +5 -0
- package/templates/app/dashboard/settings/notifications/loading.tsx +5 -0
- package/templates/app/dashboard/settings/notifications/page.tsx +462 -0
- package/templates/app/dashboard/settings/page.tsx +92 -0
- package/templates/app/dashboard/settings/password/loading.tsx +5 -0
- package/templates/app/dashboard/settings/password/page.tsx +306 -0
- package/templates/app/dashboard/settings/plans/loading.tsx +5 -0
- package/templates/app/dashboard/settings/plans/page.tsx +40 -0
- package/templates/app/dashboard/settings/profile/loading.tsx +5 -0
- package/templates/app/dashboard/settings/profile/page.tsx +686 -0
- package/templates/app/dashboard/settings/security/loading.tsx +5 -0
- package/templates/app/dashboard/settings/security/page.tsx +505 -0
- package/templates/app/dashboard/settings/teams/loading.tsx +5 -0
- package/templates/app/dashboard/settings/teams/page.tsx +272 -0
- package/templates/app/dashboard/settings/teams/permissions/page.tsx +92 -0
- package/templates/app/devtools/blocks/[slug]/page.tsx +39 -0
- package/templates/app/devtools/blocks/page.tsx +31 -0
- package/templates/app/devtools/config/page.tsx +31 -0
- package/templates/app/devtools/features/page.tsx +31 -0
- package/templates/app/devtools/flows/page.tsx +31 -0
- package/templates/app/devtools/layout.tsx +58 -0
- package/templates/app/devtools/page.tsx +121 -0
- package/templates/app/devtools/scheduled-actions/page.tsx +157 -0
- package/templates/app/devtools/style/page.tsx +330 -0
- package/templates/app/devtools/tags/page.tsx +31 -0
- package/templates/app/devtools/tests/[[...path]]/page.tsx +47 -0
- package/templates/app/favicon.ico +0 -0
- package/templates/app/globals.css +12 -0
- package/templates/app/layout.tsx +96 -0
- package/templates/app/public/page.tsx +30 -0
- package/templates/app/superadmin/docs/[section]/[page]/page.tsx +92 -0
- package/templates/app/superadmin/docs/page.tsx +75 -0
- package/templates/app/superadmin/layout.tsx +67 -0
- package/templates/app/superadmin/page.tsx +149 -0
- package/templates/app/superadmin/subscriptions/page.tsx +655 -0
- package/templates/app/superadmin/team-roles/page.tsx +493 -0
- package/templates/app/superadmin/teams/[teamId]/page.tsx +687 -0
- package/templates/app/superadmin/teams/page.tsx +302 -0
- package/templates/app/superadmin/users/[userId]/page.tsx +548 -0
- package/templates/app/superadmin/users/page.tsx +528 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
import { useTranslations } from 'next-intl'
|
|
5
|
+
import { Users, Plus, Settings, ChevronRight, Crown, Shield, Eye, Loader2 } from 'lucide-react'
|
|
6
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@nextsparkjs/core/components/ui/card'
|
|
7
|
+
import { Button } from '@nextsparkjs/core/components/ui/button'
|
|
8
|
+
import { Badge } from '@nextsparkjs/core/components/ui/badge'
|
|
9
|
+
import { Avatar, AvatarFallback, AvatarImage } from '@nextsparkjs/core/components/ui/avatar'
|
|
10
|
+
import { Separator } from '@nextsparkjs/core/components/ui/separator'
|
|
11
|
+
import { useTeamContext } from '@nextsparkjs/core/contexts/TeamContext'
|
|
12
|
+
import { useTeamsConfig } from '@nextsparkjs/core/hooks/useTeamsConfig'
|
|
13
|
+
import { TeamMembersList } from '@nextsparkjs/core/components/teams/TeamMembersList'
|
|
14
|
+
import { TeamPendingInvitations } from '@nextsparkjs/core/components/teams/TeamPendingInvitations'
|
|
15
|
+
import { CreateTeamDialog } from '@nextsparkjs/core/components/teams/CreateTeamDialog'
|
|
16
|
+
import { InlineEditableField } from '@nextsparkjs/core/components/teams/InlineEditableField'
|
|
17
|
+
import { sel } from '@nextsparkjs/core/selectors'
|
|
18
|
+
import { TeamRole } from '@nextsparkjs/core/lib/teams/types'
|
|
19
|
+
import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-registry.client'
|
|
20
|
+
|
|
21
|
+
// Role icons map - core roles only, custom roles use fallback
|
|
22
|
+
const roleIconsMap: Record<string, typeof Crown | null> = {
|
|
23
|
+
owner: Crown,
|
|
24
|
+
admin: Shield,
|
|
25
|
+
member: null,
|
|
26
|
+
viewer: Eye,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Role colors map - core roles only, custom roles use fallback
|
|
30
|
+
const roleColorsMap: Record<string, 'destructive' | 'default' | 'secondary' | 'outline'> = {
|
|
31
|
+
owner: 'destructive',
|
|
32
|
+
admin: 'default',
|
|
33
|
+
member: 'secondary',
|
|
34
|
+
viewer: 'outline',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Type-safe helpers - fallback handles any custom theme roles
|
|
38
|
+
const getRoleIcon = (role: TeamRole) => roleIconsMap[role] ?? Eye
|
|
39
|
+
const getRoleColor = (role: TeamRole) => roleColorsMap[role] ?? 'outline'
|
|
40
|
+
|
|
41
|
+
function TeamsSettingsPage() {
|
|
42
|
+
const t = useTranslations('settings')
|
|
43
|
+
const tTeams = useTranslations('teams')
|
|
44
|
+
const { userTeams, currentTeam, isLoading } = useTeamContext()
|
|
45
|
+
const { mode, canCreate, canSwitch } = useTeamsConfig()
|
|
46
|
+
const [selectedTeamId, setSelectedTeamId] = useState<string | null>(null)
|
|
47
|
+
const [showCreateDialog, setShowCreateDialog] = useState(false)
|
|
48
|
+
|
|
49
|
+
// In single-user mode, hide the teams settings page content
|
|
50
|
+
// since there's only one team and no collaboration features
|
|
51
|
+
const isSingleUserMode = mode === 'single-user'
|
|
52
|
+
|
|
53
|
+
// Find selected team membership
|
|
54
|
+
const selectedMembership = selectedTeamId
|
|
55
|
+
? userTeams.find(m => m.team.id === selectedTeamId)
|
|
56
|
+
: null
|
|
57
|
+
|
|
58
|
+
if (isLoading) {
|
|
59
|
+
return (
|
|
60
|
+
<div
|
|
61
|
+
className="flex flex-col items-center justify-center py-12 gap-3"
|
|
62
|
+
role="status"
|
|
63
|
+
aria-label={tTeams('messages.loading')}
|
|
64
|
+
data-cy={sel('settings.teams.loading')}
|
|
65
|
+
>
|
|
66
|
+
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
|
67
|
+
<div className="text-sm text-muted-foreground">
|
|
68
|
+
{tTeams('messages.loading')}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<>
|
|
76
|
+
<div
|
|
77
|
+
className="max-w-4xl space-y-6"
|
|
78
|
+
data-cy={sel('settings.teams.container')}
|
|
79
|
+
>
|
|
80
|
+
{/* Header */}
|
|
81
|
+
<header data-cy={sel('settings.teams.header')}>
|
|
82
|
+
<h1
|
|
83
|
+
className="text-2xl font-bold"
|
|
84
|
+
id="teams-settings-heading"
|
|
85
|
+
>
|
|
86
|
+
{t('teams.title')}
|
|
87
|
+
</h1>
|
|
88
|
+
<p className="text-muted-foreground mt-1">
|
|
89
|
+
{t('teams.description')}
|
|
90
|
+
</p>
|
|
91
|
+
</header>
|
|
92
|
+
|
|
93
|
+
{/* Single-user mode: show simplified view */}
|
|
94
|
+
{isSingleUserMode && currentTeam && (
|
|
95
|
+
<Card data-cy={sel('settings.teams.singleUserMode')}>
|
|
96
|
+
<CardHeader>
|
|
97
|
+
<div className="flex items-center gap-2">
|
|
98
|
+
<Users className="h-5 w-5" aria-hidden="true" />
|
|
99
|
+
<CardTitle>{t('teams.yourTeam')}</CardTitle>
|
|
100
|
+
</div>
|
|
101
|
+
<CardDescription>
|
|
102
|
+
{t('teams.singleUserDescription', { fallback: 'Your personal workspace.' })}
|
|
103
|
+
</CardDescription>
|
|
104
|
+
</CardHeader>
|
|
105
|
+
<CardContent>
|
|
106
|
+
<div className="flex items-center gap-3 p-4 rounded-lg border">
|
|
107
|
+
<Avatar className="h-10 w-10">
|
|
108
|
+
<AvatarImage src={currentTeam.avatarUrl || undefined} alt={currentTeam.name} />
|
|
109
|
+
<AvatarFallback>
|
|
110
|
+
{currentTeam.name.slice(0, 2).toUpperCase()}
|
|
111
|
+
</AvatarFallback>
|
|
112
|
+
</Avatar>
|
|
113
|
+
<div>
|
|
114
|
+
<div className="font-medium">{currentTeam.name}</div>
|
|
115
|
+
<div className="text-sm text-muted-foreground">{currentTeam.slug}</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</CardContent>
|
|
119
|
+
</Card>
|
|
120
|
+
)}
|
|
121
|
+
|
|
122
|
+
{/* Teams List Card - only show if not single-user mode */}
|
|
123
|
+
{!isSingleUserMode && (
|
|
124
|
+
<Card data-cy={sel('settings.teams.list.container')}>
|
|
125
|
+
<CardHeader>
|
|
126
|
+
<div className="flex items-center justify-between">
|
|
127
|
+
<div className="flex items-center gap-2">
|
|
128
|
+
<Users className="h-5 w-5" aria-hidden="true" />
|
|
129
|
+
<CardTitle>{canSwitch ? t('teams.yourTeams') : t('teams.yourTeam')}</CardTitle>
|
|
130
|
+
</div>
|
|
131
|
+
{/* Only show Create Team button if mode allows it */}
|
|
132
|
+
{canCreate && (
|
|
133
|
+
<Button
|
|
134
|
+
onClick={() => setShowCreateDialog(true)}
|
|
135
|
+
size="sm"
|
|
136
|
+
data-cy="create-team-button"
|
|
137
|
+
>
|
|
138
|
+
<Plus className="h-4 w-4 mr-2" aria-hidden="true" />
|
|
139
|
+
{tTeams('actions.create')}
|
|
140
|
+
</Button>
|
|
141
|
+
)}
|
|
142
|
+
</div>
|
|
143
|
+
<CardDescription>
|
|
144
|
+
{t('teams.yourTeamsDescription')}
|
|
145
|
+
</CardDescription>
|
|
146
|
+
</CardHeader>
|
|
147
|
+
<CardContent>
|
|
148
|
+
<div className="space-y-2">
|
|
149
|
+
{userTeams.length === 0 ? (
|
|
150
|
+
<div className="text-center py-8 text-muted-foreground">
|
|
151
|
+
{t('teams.noTeams')}
|
|
152
|
+
</div>
|
|
153
|
+
) : (
|
|
154
|
+
userTeams.map((membership) => {
|
|
155
|
+
const team = membership.team
|
|
156
|
+
const role = membership.role as TeamRole
|
|
157
|
+
const RoleIcon = getRoleIcon(role)
|
|
158
|
+
const isSelected = selectedTeamId === team.id
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<button
|
|
162
|
+
key={team.id}
|
|
163
|
+
onClick={() => setSelectedTeamId(isSelected ? null : team.id)}
|
|
164
|
+
className={`w-full flex items-center justify-between p-4 rounded-lg border transition-colors hover:bg-accent/50 ${
|
|
165
|
+
isSelected ? 'bg-accent border-accent' : 'border-border'
|
|
166
|
+
}`}
|
|
167
|
+
data-cy={`team-item-${team.id}`}
|
|
168
|
+
>
|
|
169
|
+
<div className="flex items-center gap-3">
|
|
170
|
+
<Avatar className="h-10 w-10">
|
|
171
|
+
<AvatarImage src={team.avatarUrl || undefined} alt={team.name} />
|
|
172
|
+
<AvatarFallback>
|
|
173
|
+
{team.name.slice(0, 2).toUpperCase()}
|
|
174
|
+
</AvatarFallback>
|
|
175
|
+
</Avatar>
|
|
176
|
+
<div className="text-left">
|
|
177
|
+
<div className="flex items-center gap-2">
|
|
178
|
+
<span className="font-medium">{team.name}</span>
|
|
179
|
+
</div>
|
|
180
|
+
<div className="text-sm text-muted-foreground">
|
|
181
|
+
{team.slug}
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div className="flex items-center gap-3">
|
|
186
|
+
<Badge variant={getRoleColor(role)}>
|
|
187
|
+
{RoleIcon && <RoleIcon className="h-3 w-3 mr-1" aria-hidden="true" />}
|
|
188
|
+
{tTeams(`roles.${role}`)}
|
|
189
|
+
</Badge>
|
|
190
|
+
<ChevronRight className={`h-4 w-4 text-muted-foreground transition-transform ${isSelected ? 'rotate-90' : ''}`} />
|
|
191
|
+
</div>
|
|
192
|
+
</button>
|
|
193
|
+
)
|
|
194
|
+
})
|
|
195
|
+
)}
|
|
196
|
+
</div>
|
|
197
|
+
</CardContent>
|
|
198
|
+
</Card>
|
|
199
|
+
)}
|
|
200
|
+
|
|
201
|
+
{/* Selected Team Details - only show if not single-user mode */}
|
|
202
|
+
{!isSingleUserMode && selectedMembership && (
|
|
203
|
+
<Card data-cy={sel('settings.teams.list.details', { id: selectedMembership.team.id })}>
|
|
204
|
+
<CardHeader>
|
|
205
|
+
<div className="flex items-center gap-2">
|
|
206
|
+
<Settings className="h-5 w-5" aria-hidden="true" />
|
|
207
|
+
<CardTitle className="flex-1">
|
|
208
|
+
<InlineEditableField
|
|
209
|
+
value={selectedMembership.team.name}
|
|
210
|
+
fieldType="name"
|
|
211
|
+
teamId={selectedMembership.team.id}
|
|
212
|
+
placeholder={tTeams('createTeam.namePlaceholder')}
|
|
213
|
+
disabled={selectedMembership.role !== 'owner'}
|
|
214
|
+
/>
|
|
215
|
+
</CardTitle>
|
|
216
|
+
</div>
|
|
217
|
+
<CardDescription className="mt-2">
|
|
218
|
+
<InlineEditableField
|
|
219
|
+
value={selectedMembership.team.description}
|
|
220
|
+
fieldType="description"
|
|
221
|
+
teamId={selectedMembership.team.id}
|
|
222
|
+
placeholder={tTeams('createTeam.descriptionPlaceholder')}
|
|
223
|
+
multiline={true}
|
|
224
|
+
disabled={selectedMembership.role !== 'owner'}
|
|
225
|
+
/>
|
|
226
|
+
</CardDescription>
|
|
227
|
+
</CardHeader>
|
|
228
|
+
<CardContent className="space-y-6">
|
|
229
|
+
{/* Team Info */}
|
|
230
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
231
|
+
<div>
|
|
232
|
+
<label className="text-sm font-medium text-muted-foreground">
|
|
233
|
+
{tTeams('fields.slug')}
|
|
234
|
+
</label>
|
|
235
|
+
<p className="mt-1">{selectedMembership.team.slug}</p>
|
|
236
|
+
</div>
|
|
237
|
+
<div>
|
|
238
|
+
<label className="text-sm font-medium text-muted-foreground">
|
|
239
|
+
{tTeams('fields.role')}
|
|
240
|
+
</label>
|
|
241
|
+
<div className="mt-1">
|
|
242
|
+
<Badge variant={getRoleColor(selectedMembership.role as TeamRole)}>
|
|
243
|
+
{tTeams(`roles.${selectedMembership.role}`)}
|
|
244
|
+
</Badge>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<Separator />
|
|
250
|
+
|
|
251
|
+
{/* Team Members */}
|
|
252
|
+
<TeamMembersList teamId={selectedMembership.team.id} />
|
|
253
|
+
|
|
254
|
+
{/* Pending Invitations */}
|
|
255
|
+
<TeamPendingInvitations teamId={selectedMembership.team.id} />
|
|
256
|
+
</CardContent>
|
|
257
|
+
</Card>
|
|
258
|
+
)}
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
{/* Create Team Dialog - only render if mode allows team creation */}
|
|
262
|
+
{canCreate && (
|
|
263
|
+
<CreateTeamDialog
|
|
264
|
+
open={showCreateDialog}
|
|
265
|
+
onOpenChange={setShowCreateDialog}
|
|
266
|
+
/>
|
|
267
|
+
)}
|
|
268
|
+
</>
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export default getTemplateOrDefaultClient('app/dashboard/settings/teams/page.tsx', TeamsSettingsPage)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useTranslations } from 'next-intl'
|
|
2
|
+
import { PermissionsMatrix } from '@nextsparkjs/core/components/permissions'
|
|
3
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@nextsparkjs/core/components/ui/tabs'
|
|
4
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@nextsparkjs/core/components/ui/card'
|
|
5
|
+
// Use PermissionService which reads from the build-time generated registry
|
|
6
|
+
import { PermissionService } from '@nextsparkjs/core/lib/services/permission.service'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Team Permissions Page
|
|
10
|
+
*
|
|
11
|
+
* Displays a visual permissions matrix showing what each team role can do.
|
|
12
|
+
* Organized by categories with tabs for easy navigation.
|
|
13
|
+
*/
|
|
14
|
+
export default function TeamPermissionsPage() {
|
|
15
|
+
const t = useTranslations('permissions')
|
|
16
|
+
|
|
17
|
+
// Get all unique categories from registry
|
|
18
|
+
const categories = PermissionService.getCategories()
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="space-y-6" data-cy="team-permissions-page">
|
|
22
|
+
{/* Header */}
|
|
23
|
+
<div>
|
|
24
|
+
<h1 className="text-2xl font-bold tracking-tight">{t('title')}</h1>
|
|
25
|
+
<p className="text-muted-foreground">{t('description')}</p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
{/* Info Card with Role Overview */}
|
|
29
|
+
<Card>
|
|
30
|
+
<CardHeader>
|
|
31
|
+
<CardTitle>{t('rolesOverview')}</CardTitle>
|
|
32
|
+
<CardDescription>{t('rolesOverviewDescription')}</CardDescription>
|
|
33
|
+
</CardHeader>
|
|
34
|
+
<CardContent>
|
|
35
|
+
<div className="grid gap-4 md:grid-cols-4">
|
|
36
|
+
<RoleCard role="owner" />
|
|
37
|
+
<RoleCard role="admin" />
|
|
38
|
+
<RoleCard role="member" />
|
|
39
|
+
<RoleCard role="viewer" />
|
|
40
|
+
</div>
|
|
41
|
+
</CardContent>
|
|
42
|
+
</Card>
|
|
43
|
+
|
|
44
|
+
{/* Permissions Matrix with Tabs */}
|
|
45
|
+
<Tabs defaultValue="all" className="space-y-4">
|
|
46
|
+
<TabsList>
|
|
47
|
+
<TabsTrigger value="all" data-cy="tab-all">
|
|
48
|
+
{t('allPermissions')}
|
|
49
|
+
</TabsTrigger>
|
|
50
|
+
{categories.map(cat => (
|
|
51
|
+
<TabsTrigger key={cat} value={cat} data-cy={`tab-${cat.toLowerCase()}`}>
|
|
52
|
+
{cat}
|
|
53
|
+
</TabsTrigger>
|
|
54
|
+
))}
|
|
55
|
+
</TabsList>
|
|
56
|
+
|
|
57
|
+
<TabsContent value="all">
|
|
58
|
+
<PermissionsMatrix />
|
|
59
|
+
</TabsContent>
|
|
60
|
+
|
|
61
|
+
{categories.map(cat => (
|
|
62
|
+
<TabsContent key={cat} value={cat}>
|
|
63
|
+
<PermissionsMatrix category={cat} />
|
|
64
|
+
</TabsContent>
|
|
65
|
+
))}
|
|
66
|
+
</Tabs>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* RoleCard component
|
|
73
|
+
*
|
|
74
|
+
* Displays a visual card for each team role with color coding
|
|
75
|
+
*/
|
|
76
|
+
function RoleCard({ role }: { role: 'owner' | 'admin' | 'member' | 'viewer' }) {
|
|
77
|
+
const t = useTranslations('permissions')
|
|
78
|
+
|
|
79
|
+
const roleColors = {
|
|
80
|
+
owner: 'border-purple-200 bg-purple-50 dark:border-purple-800 dark:bg-purple-900/20',
|
|
81
|
+
admin: 'border-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-900/20',
|
|
82
|
+
member: 'border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-900/20',
|
|
83
|
+
viewer: 'border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800/20',
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<div className={`rounded-lg border p-4 ${roleColors[role]}`} data-cy={`role-card-${role}`}>
|
|
88
|
+
<h3 className="font-semibold">{t(`roles.${role}.title`)}</h3>
|
|
89
|
+
<p className="text-sm text-muted-foreground">{t(`roles.${role}.description`)}</p>
|
|
90
|
+
</div>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BlockDetailViewer } from "@nextsparkjs/core/components/devtools/BlockDetailViewer";
|
|
2
|
+
import { BLOCK_REGISTRY } from "@nextsparkjs/registries/block-registry";
|
|
3
|
+
import { notFound } from "next/navigation";
|
|
4
|
+
|
|
5
|
+
interface BlockDetailPageProps {
|
|
6
|
+
params: Promise<{
|
|
7
|
+
slug: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Block Detail Page
|
|
13
|
+
*
|
|
14
|
+
* Displays detailed information about a specific page builder block.
|
|
15
|
+
* Shows fields, configuration, and test coverage.
|
|
16
|
+
*/
|
|
17
|
+
export default async function BlockDetailPage({ params }: BlockDetailPageProps) {
|
|
18
|
+
const { slug } = await params;
|
|
19
|
+
|
|
20
|
+
// Verify block exists
|
|
21
|
+
if (!BLOCK_REGISTRY[slug]) {
|
|
22
|
+
notFound();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className="space-y-6" data-cy={`devtools-block-detail-${slug}`}>
|
|
27
|
+
<BlockDetailViewer slug={slug} />
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Generate static params for all blocks
|
|
34
|
+
*/
|
|
35
|
+
export async function generateStaticParams() {
|
|
36
|
+
return Object.keys(BLOCK_REGISTRY).map((slug) => ({
|
|
37
|
+
slug,
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BlocksViewer } from "@nextsparkjs/core/components/devtools/BlocksViewer";
|
|
2
|
+
import { LayoutGrid } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Blocks Registry Page
|
|
7
|
+
*
|
|
8
|
+
* Displays all page builder blocks with field definitions and coverage info.
|
|
9
|
+
* Provides filtering and search capabilities.
|
|
10
|
+
*/
|
|
11
|
+
export default async function DevBlocksPage() {
|
|
12
|
+
const t = await getTranslations("devtools.blocks");
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="space-y-6" data-cy="devtools-blocks-page">
|
|
16
|
+
{/* Header */}
|
|
17
|
+
<div className="flex items-center gap-3">
|
|
18
|
+
<div className="flex items-center justify-center w-12 h-12 bg-violet-100 dark:bg-violet-950 rounded-lg">
|
|
19
|
+
<LayoutGrid className="h-6 w-6 text-violet-600 dark:text-violet-400" />
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<h1 className="text-3xl font-bold">{t("title")}</h1>
|
|
23
|
+
<p className="text-muted-foreground">{t("description")}</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{/* Blocks Viewer */}
|
|
28
|
+
<BlocksViewer />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ConfigViewer } from "@nextsparkjs/core/components/devtools";
|
|
2
|
+
import { Settings } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Configuration Viewer Page
|
|
7
|
+
*
|
|
8
|
+
* Displays theme configuration and entity registry information.
|
|
9
|
+
* Provides read-only view with JSON formatting and copy functionality.
|
|
10
|
+
*/
|
|
11
|
+
export default async function DevConfigPage() {
|
|
12
|
+
const t = await getTranslations('dev.config');
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="space-y-6" data-cy="devtools-config-page">
|
|
16
|
+
{/* Header */}
|
|
17
|
+
<div className="flex items-center gap-3">
|
|
18
|
+
<div className="flex items-center justify-center w-12 h-12 bg-violet-100 dark:bg-violet-950 rounded-lg">
|
|
19
|
+
<Settings className="h-6 w-6 text-violet-600 dark:text-violet-400" />
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<h1 className="text-3xl font-bold">{t('title')}</h1>
|
|
23
|
+
<p className="text-muted-foreground">{t('description')}</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{/* Config Viewer */}
|
|
28
|
+
<ConfigViewer />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FeaturesViewer } from "@nextsparkjs/core/components/devtools/FeaturesViewer";
|
|
2
|
+
import { Layers } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Features Registry Page
|
|
7
|
+
*
|
|
8
|
+
* Displays all features from the testing registry with coverage information.
|
|
9
|
+
* Provides filtering and search capabilities.
|
|
10
|
+
*/
|
|
11
|
+
export default async function DevFeaturesPage() {
|
|
12
|
+
const t = await getTranslations("devtools.features");
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="space-y-6" data-cy="devtools-features-page">
|
|
16
|
+
{/* Header */}
|
|
17
|
+
<div className="flex items-center gap-3">
|
|
18
|
+
<div className="flex items-center justify-center w-12 h-12 bg-violet-100 dark:bg-violet-950 rounded-lg">
|
|
19
|
+
<Layers className="h-6 w-6 text-violet-600 dark:text-violet-400" />
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<h1 className="text-3xl font-bold">{t("title")}</h1>
|
|
23
|
+
<p className="text-muted-foreground">{t("description")}</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{/* Features Viewer */}
|
|
28
|
+
<FeaturesViewer />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FlowsViewer } from "@nextsparkjs/core/components/devtools/FlowsViewer";
|
|
2
|
+
import { GitBranch } from "lucide-react";
|
|
3
|
+
import { getTranslations } from "next-intl/server";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Flows Registry Page
|
|
7
|
+
*
|
|
8
|
+
* Displays all user journey flows from the testing registry with coverage information.
|
|
9
|
+
* Provides filtering and search capabilities.
|
|
10
|
+
*/
|
|
11
|
+
export default async function DevFlowsPage() {
|
|
12
|
+
const t = await getTranslations("devtools.flows");
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div className="space-y-6" data-cy="devtools-flows-page">
|
|
16
|
+
{/* Header */}
|
|
17
|
+
<div className="flex items-center gap-3">
|
|
18
|
+
<div className="flex items-center justify-center w-12 h-12 bg-violet-100 dark:bg-violet-950 rounded-lg">
|
|
19
|
+
<GitBranch className="h-6 w-6 text-violet-600 dark:text-violet-400" />
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<h1 className="text-3xl font-bold">{t("title")}</h1>
|
|
23
|
+
<p className="text-muted-foreground">{t("description")}</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{/* Flows Viewer */}
|
|
28
|
+
<FlowsViewer />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DeveloperGuard } from "@nextsparkjs/core/components/app/guards/DeveloperGuard";
|
|
2
|
+
import { DevtoolsSidebar, DevtoolsMobileHeader } from "@nextsparkjs/core/components/devtools";
|
|
3
|
+
import { Metadata } from "next";
|
|
4
|
+
import { getTemplateOrDefault, getMetadataOrDefault } from '@nextsparkjs/core/lib/template-resolver'
|
|
5
|
+
|
|
6
|
+
const defaultMetadata: Metadata = {
|
|
7
|
+
title: "DevTools",
|
|
8
|
+
description: "Development tools and documentation",
|
|
9
|
+
robots: "noindex, nofollow", // Prevent search engine indexing
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const metadata: Metadata = getMetadataOrDefault(
|
|
13
|
+
'app/devtools/layout.tsx',
|
|
14
|
+
defaultMetadata
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
interface DevLayoutProps {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Developer Area Layout
|
|
23
|
+
*
|
|
24
|
+
* Protected layout for developer-only sections with dedicated sidebar navigation.
|
|
25
|
+
* Applies DeveloperGuard protection to all child routes.
|
|
26
|
+
* Includes responsive design for mobile and desktop.
|
|
27
|
+
* Uses purple/violet color scheme to differentiate from Admin Panel (red).
|
|
28
|
+
*/
|
|
29
|
+
function DevLayout({ children }: DevLayoutProps) {
|
|
30
|
+
return (
|
|
31
|
+
<DeveloperGuard>
|
|
32
|
+
<div className="flex h-screen bg-background">
|
|
33
|
+
{/* Sidebar - Hidden on mobile, visible on desktop */}
|
|
34
|
+
<div className="hidden lg:block">
|
|
35
|
+
<DevtoolsSidebar />
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
{/* Main content area */}
|
|
39
|
+
<div className="flex-1 flex flex-col overflow-hidden">
|
|
40
|
+
{/* Mobile header for DevTools - Only visible on mobile */}
|
|
41
|
+
<DevtoolsMobileHeader />
|
|
42
|
+
|
|
43
|
+
{/* Content area with scrolling */}
|
|
44
|
+
<main className="flex-1 overflow-y-auto overflow-x-hidden">
|
|
45
|
+
<div className="container mx-auto p-6 max-w-7xl">
|
|
46
|
+
{children}
|
|
47
|
+
</div>
|
|
48
|
+
</main>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
{/* Mobile sidebar overlay (future enhancement) */}
|
|
52
|
+
{/* Could add a mobile drawer/overlay sidebar here if needed */}
|
|
53
|
+
</div>
|
|
54
|
+
</DeveloperGuard>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default getTemplateOrDefault('app/devtools/layout.tsx', DevLayout)
|