@nextsparkjs/core 0.1.0-beta.189 → 0.1.0-beta.190
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/CreateApiKeyDialog.d.ts.map +1 -1
- package/dist/components/api/keys/CreateApiKeyDialog.js +2 -1
- package/dist/components/app/layouts/PublicFooter.d.ts.map +1 -1
- package/dist/components/app/layouts/PublicFooter.js +2 -23
- package/dist/components/app/misc/ThemeToggle.d.ts.map +1 -1
- package/dist/components/app/misc/ThemeToggle.js +2 -1
- package/dist/components/auth/forms/LoginForm.js +1 -1
- package/dist/components/auth/forms/SignupForm.d.ts.map +1 -1
- package/dist/components/auth/forms/SignupForm.js +2 -1
- package/dist/components/auth/pages/AuthErrorPage.d.ts.map +1 -1
- package/dist/components/auth/pages/AuthErrorPage.js +2 -1
- package/dist/components/billing/ManageBillingButton.d.ts.map +1 -1
- package/dist/components/billing/ManageBillingButton.js +2 -1
- package/dist/components/dashboard/block-editor/array-field.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/array-field.js +2 -1
- package/dist/components/dashboard/block-editor/block-picker.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/block-picker.js +2 -1
- package/dist/components/dashboard/block-editor/builder-editor-view.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/builder-editor-view.js +3 -2
- package/dist/components/dashboard/block-editor/config-panel.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/config-panel.js +3 -2
- package/dist/components/dashboard/block-editor/dynamic-form.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/dynamic-form.js +2 -1
- package/dist/components/dashboard/block-editor/entity-fields-sidebar.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/entity-fields-sidebar.js +3 -2
- package/dist/components/dashboard/block-editor/pattern-reference-preview.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/pattern-reference-preview.js +2 -1
- package/dist/components/dashboard/layouts/TopNavbar.d.ts.map +1 -1
- package/dist/components/dashboard/layouts/TopNavbar.js +4 -3
- package/dist/components/dashboard/misc/SearchDropdown.d.ts.map +1 -1
- package/dist/components/dashboard/misc/SearchDropdown.js +2 -1
- package/dist/components/dashboard/mobile/MobileTopBar.d.ts.map +1 -1
- package/dist/components/dashboard/mobile/MobileTopBar.js +2 -1
- package/dist/components/devtools/BlockDetailViewer.d.ts.map +1 -1
- package/dist/components/devtools/BlockDetailViewer.js +2 -1
- package/dist/components/devtools/BlocksViewer.d.ts.map +1 -1
- package/dist/components/devtools/BlocksViewer.js +2 -1
- package/dist/components/devtools/ConfigViewer.d.ts.map +1 -1
- package/dist/components/devtools/ConfigViewer.js +3 -2
- package/dist/components/devtools/TestCasesViewer.d.ts.map +1 -1
- package/dist/components/devtools/TestCasesViewer.js +3 -2
- package/dist/components/devtools/TestCoverageDashboard.d.ts.map +1 -1
- package/dist/components/devtools/TestCoverageDashboard.js +2 -1
- package/dist/components/devtools/api-explorer/ApiDocsModal.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiDocsModal.js +0 -0
- package/dist/components/devtools/api-explorer/ApiExplorer.d.ts.map +1 -1
- package/dist/components/devtools/api-explorer/ApiExplorer.js +2 -1
- package/dist/components/devtools/scheduled-actions/actions-table.d.ts.map +1 -1
- package/dist/components/devtools/scheduled-actions/actions-table.js +3 -2
- package/dist/components/docs/docs-sidebar.d.ts.map +1 -1
- package/dist/components/docs/docs-sidebar.js +3 -2
- package/dist/components/entities/EntityFieldRenderer.d.ts.map +1 -1
- package/dist/components/entities/EntityFieldRenderer.js +2 -1
- package/dist/components/entities/EntityList.d.ts.map +1 -1
- package/dist/components/entities/EntityList.js +2 -1
- package/dist/components/entities/EntityTable.d.ts.map +1 -1
- package/dist/components/entities/EntityTable.js +3 -2
- package/dist/components/entities/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/entities/ErrorBoundary.js +2 -1
- package/dist/components/entities/wrappers/EntityDetailWrapper.d.ts.map +1 -1
- package/dist/components/entities/wrappers/EntityDetailWrapper.js +3 -2
- package/dist/components/media/MediaCard.d.ts.map +1 -1
- package/dist/components/media/MediaCard.js +2 -1
- package/dist/components/media/MediaDetailPanel.d.ts.map +1 -1
- package/dist/components/media/MediaDetailPanel.js +2 -1
- package/dist/components/media/MediaList.d.ts.map +1 -1
- package/dist/components/media/MediaList.js +2 -1
- package/dist/components/media/MediaSelector.d.ts.map +1 -1
- package/dist/components/media/MediaSelector.js +2 -1
- package/dist/components/media/MediaUploadZone.d.ts.map +1 -1
- package/dist/components/media/MediaUploadZone.js +2 -1
- package/dist/components/public/entities/PublicEntityDetail.d.ts.map +1 -1
- package/dist/components/public/entities/PublicEntityDetail.js +2 -1
- package/dist/components/teams/TeamPendingInvitations.d.ts.map +1 -1
- package/dist/components/teams/TeamPendingInvitations.js +3 -2
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/audio-upload.d.ts.map +1 -1
- package/dist/components/ui/audio-upload.js +2 -1
- package/dist/components/ui/avatar.d.ts +17 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +29 -2
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/breadcrumb.d.ts +13 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +23 -10
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/file-upload.d.ts.map +1 -1
- package/dist/components/ui/file-upload.js +2 -1
- package/dist/components/ui/image-upload.d.ts.map +1 -1
- package/dist/components/ui/image-upload.js +4 -3
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/optimized-image.d.ts.map +1 -1
- package/dist/components/ui/optimized-image.js +5 -0
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +3 -0
- package/dist/components/ui/progress.js +1 -1
- package/dist/components/ui/relation-display.d.ts.map +1 -1
- package/dist/components/ui/relation-display.js +3 -2
- package/dist/components/ui/separator.js +1 -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/skeleton.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/user-display.d.ts.map +1 -1
- package/dist/components/ui/user-display.js +2 -1
- package/dist/components/ui/user-select.d.ts.map +1 -1
- package/dist/components/ui/user-select.js +2 -1
- package/dist/components/ui/video-upload.d.ts.map +1 -1
- package/dist/components/ui/video-upload.js +3 -2
- package/dist/components/users/tables/UsersTable.d.ts.map +1 -1
- package/dist/components/users/tables/UsersTable.js +3 -2
- package/dist/contexts/SubscriptionContext.d.ts.map +1 -1
- package/dist/contexts/SubscriptionContext.js +4 -3
- package/dist/contexts/TeamContext.d.ts.map +1 -1
- package/dist/contexts/TeamContext.js +3 -2
- package/dist/hooks/useAccountPreferencesSync.d.ts.map +1 -1
- package/dist/hooks/useAccountPreferencesSync.js +2 -1
- package/dist/hooks/useApiExplorerNavigation.d.ts.map +1 -1
- package/dist/hooks/useApiExplorerNavigation.js +2 -1
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +3 -2
- package/dist/hooks/useEnsureUserMetadata.d.ts.map +1 -1
- package/dist/hooks/useEnsureUserMetadata.js +3 -2
- package/dist/hooks/useEntityWithMeta.d.ts.map +1 -1
- package/dist/hooks/useEntityWithMeta.js +3 -2
- package/dist/hooks/useInvoice.d.ts.map +1 -1
- package/dist/hooks/useInvoice.js +2 -1
- package/dist/hooks/useInvoices.d.ts.map +1 -1
- package/dist/hooks/useInvoices.js +2 -1
- package/dist/hooks/useMedia.d.ts.map +1 -1
- package/dist/hooks/useMedia.js +10 -9
- package/dist/hooks/useMediaUpload.d.ts.map +1 -1
- package/dist/hooks/useMediaUpload.js +2 -1
- package/dist/hooks/useMembership.d.ts.map +1 -1
- package/dist/hooks/useMembership.js +3 -2
- package/dist/hooks/usePatternUsages.d.ts.map +1 -1
- package/dist/hooks/usePatternUsages.js +3 -2
- package/dist/hooks/usePrefetch.d.ts.map +1 -1
- package/dist/hooks/usePrefetch.js +3 -2
- package/dist/hooks/useQuota.d.ts.map +1 -1
- package/dist/hooks/useQuota.js +2 -1
- package/dist/hooks/useTeamInvitations.d.ts.map +1 -1
- package/dist/hooks/useTeamInvitations.js +4 -3
- package/dist/hooks/useTeamMembers.d.ts.map +1 -1
- package/dist/hooks/useTeamMembers.js +5 -4
- package/dist/hooks/useTeamUpdate.d.ts.map +1 -1
- package/dist/hooks/useTeamUpdate.js +2 -1
- package/dist/hooks/useUserProfile.d.ts.map +1 -1
- package/dist/hooks/useUserProfile.js +3 -2
- package/dist/hooks/useUserSettings.d.ts.map +1 -1
- package/dist/hooks/useUserSettings.js +3 -2
- package/dist/lib/actions/entity.actions.d.ts.map +1 -1
- package/dist/lib/actions/entity.actions.js +2 -1
- package/dist/lib/api/entities.d.ts.map +1 -1
- package/dist/lib/api/entities.js +4 -3
- package/dist/lib/auth/verify-email-link.d.ts +10 -0
- package/dist/lib/auth/verify-email-link.d.ts.map +1 -0
- package/dist/lib/auth/verify-email-link.js +14 -0
- package/dist/lib/auth-client.d.ts +2 -0
- package/dist/lib/auth-client.d.ts.map +1 -1
- package/dist/lib/auth-client.js +4 -0
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +10 -2
- package/dist/lib/base-path.d.ts +85 -0
- package/dist/lib/base-path.d.ts.map +1 -0
- package/dist/lib/base-path.js +79 -0
- package/dist/lib/billing/schema.d.ts +1 -1
- package/dist/lib/billing/schema.d.ts.map +1 -1
- package/dist/lib/billing/schema.js +1 -1
- package/dist/lib/blocks/sanitize-html.d.ts.map +1 -1
- package/dist/lib/blocks/sanitize-html.js +18 -2
- package/dist/lib/cache/revalidate-tag.d.ts +14 -0
- package/dist/lib/cache/revalidate-tag.d.ts.map +1 -0
- package/dist/lib/cache/revalidate-tag.js +8 -0
- package/dist/lib/config/dashboard-schema.d.ts +1 -1
- package/dist/lib/config/dashboard-schema.d.ts.map +1 -1
- package/dist/lib/config/dashboard-schema.js +1 -1
- package/dist/lib/config/types.d.ts +36 -16
- package/dist/lib/config/types.d.ts.map +1 -1
- package/dist/lib/docs/access.d.ts +28 -0
- package/dist/lib/docs/access.d.ts.map +1 -0
- package/dist/lib/docs/access.js +16 -0
- package/dist/lib/docs/parser.d.ts.map +1 -1
- package/dist/lib/docs/parser.js +2 -1
- package/dist/lib/docs/remark-doc-links.d.ts +14 -0
- package/dist/lib/docs/remark-doc-links.d.ts.map +1 -0
- package/dist/lib/docs/remark-doc-links.js +38 -0
- package/dist/lib/entities/api-generator.d.ts +1 -1
- package/dist/lib/entities/api-generator.d.ts.map +1 -1
- package/dist/lib/entities/api-generator.js +1 -1
- package/dist/lib/entities/schema-generator.d.ts +1 -1
- package/dist/lib/entities/schema-generator.d.ts.map +1 -1
- package/dist/lib/entities/schema-generator.js +1 -1
- package/dist/lib/mcp/engine.js +1 -1
- package/dist/lib/mcp/schema-builder.d.ts +1 -1
- package/dist/lib/mcp/schema-builder.d.ts.map +1 -1
- package/dist/lib/mcp/schema-builder.js +1 -1
- package/dist/lib/mcp/tool-generator.js +1 -1
- package/dist/lib/mcp/types.d.ts +1 -1
- package/dist/lib/mcp/types.d.ts.map +1 -1
- package/dist/lib/media/schemas.d.ts +1 -1
- package/dist/lib/media/schemas.d.ts.map +1 -1
- package/dist/lib/media/schemas.js +1 -1
- package/dist/lib/middleware/index.d.ts +5 -1
- package/dist/lib/middleware/index.d.ts.map +1 -1
- package/dist/lib/middleware/index.js +3 -2
- package/dist/lib/services/meta.service.d.ts +60 -0
- package/dist/lib/services/meta.service.d.ts.map +1 -1
- package/dist/lib/services/meta.service.js +132 -12
- package/dist/lib/services/middleware.service.d.ts.map +1 -1
- package/dist/lib/services/middleware.service.js +3 -2
- package/dist/lib/teams/schema.d.ts +1 -1
- package/dist/lib/teams/schema.d.ts.map +1 -1
- package/dist/lib/teams/schema.js +1 -1
- package/dist/lib/teams/teams.api.d.ts.map +1 -1
- package/dist/lib/teams/teams.api.js +4 -3
- package/dist/lib/user-data-client.d.ts.map +1 -1
- package/dist/lib/user-data-client.js +3 -2
- package/dist/lib/validation/invoices.d.ts +1 -1
- package/dist/lib/validation/invoices.d.ts.map +1 -1
- package/dist/lib/validation/invoices.js +1 -1
- package/dist/lib/validation-schemas.d.ts +1 -1
- package/dist/lib/validation-schemas.d.ts.map +1 -1
- package/dist/lib/validation-schemas.js +1 -1
- package/dist/lib/validation.d.ts +1 -1
- package/dist/lib/validation.d.ts.map +1 -1
- package/dist/lib/validation.js +1 -1
- package/dist/messages/de/footer.json +0 -1
- package/dist/messages/de/index.d.ts +0 -1
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/en/footer.json +0 -1
- package/dist/messages/en/index.d.ts +0 -1
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/es/footer.json +0 -1
- package/dist/messages/es/index.d.ts +0 -1
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/fr/footer.json +0 -1
- package/dist/messages/fr/index.d.ts +0 -1
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/it/footer.json +0 -1
- package/dist/messages/it/index.d.ts +0 -1
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/pt/footer.json +0 -1
- package/dist/messages/pt/index.d.ts +0 -1
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/templates/app/(auth)/accept-invite/[token]/page.tsx +4 -3
- package/dist/templates/app/(auth)/verify-email/page.tsx +4 -3
- package/dist/templates/app/(public)/docs/[section]/[page]/page.tsx +11 -0
- package/dist/templates/app/api/auth/[...all]/route.ts +15 -14
- package/dist/templates/app/api/internal/user-metadata/route.ts +6 -8
- package/dist/templates/app/api/user/plan-flags/route.ts +1 -1
- package/dist/templates/app/api/user/profile/route.ts +12 -17
- package/dist/templates/app/api/v1/api-keys/route.ts +1 -1
- package/dist/templates/app/api/v1/auth/signup-with-invite/route.ts +2 -1
- package/dist/templates/app/api/v1/billing/cancel/route.ts +1 -1
- package/dist/templates/app/api/v1/billing/change-plan/route.ts +1 -1
- package/dist/templates/app/api/v1/billing/check-action/route.ts +1 -1
- package/dist/templates/app/api/v1/billing/checkout/route.ts +1 -1
- package/dist/templates/app/api/v1/blocks/validate/route.ts +1 -1
- package/dist/templates/app/api/v1/media/[id]/tags/route.ts +1 -1
- package/dist/templates/app/api/v1/post-categories/[id]/route.ts +1 -1
- package/dist/templates/app/api/v1/post-categories/route.ts +1 -1
- package/dist/templates/app/api/v1/teams/[teamId]/members/route.ts +2 -1
- package/dist/templates/app/api/v1/teams/[teamId]/subscription/route.ts +3 -5
- package/dist/templates/app/api/v1/teams/docs.md +4 -9
- package/dist/templates/app/api/v1/teams/switch/route.ts +1 -1
- package/dist/templates/app/api/v1/users/[id]/meta/[key]/route.ts +1 -1
- package/dist/templates/app/api/v1/users/[id]/route.ts +1 -1
- package/dist/templates/app/api/v1/users/route.ts +1 -1
- package/dist/templates/app/dashboard/(main)/media/page.tsx +3 -1
- package/dist/templates/app/dashboard/settings/api-keys/page.tsx +5 -4
- package/dist/templates/app/dashboard/settings/profile/page.tsx +3 -2
- package/dist/templates/app/devtools/scheduled-actions/page.tsx +2 -1
- package/dist/templates/app/superadmin/docs/[section]/[page]/page.tsx +16 -0
- package/dist/templates/app/superadmin/subscriptions/page.tsx +3 -2
- package/dist/templates/app/superadmin/teams/[teamId]/page.tsx +5 -4
- package/dist/templates/app/superadmin/users/[userId]/page.tsx +2 -1
- package/dist/templates/app/superadmin/users/page.tsx +2 -1
- package/dist/templates/blocks/cta-section/component.tsx +3 -2
- package/dist/templates/blocks/cta-section/schema.ts +1 -1
- package/dist/templates/blocks/features-grid/component.tsx +2 -1
- package/dist/templates/blocks/features-grid/schema.ts +1 -1
- package/dist/templates/blocks/hero/component.tsx +3 -2
- package/dist/templates/blocks/hero/schema.ts +1 -1
- package/dist/templates/blocks/testimonials/component.tsx +2 -1
- package/dist/templates/blocks/testimonials/schema.ts +1 -1
- package/dist/templates/blocks/text-content/component.tsx +2 -1
- package/dist/templates/blocks/text-content/schema.ts +1 -1
- package/dist/templates/ci-workflows/README.md +1 -1
- package/dist/templates/ci-workflows/github/cypress-regression.yml +1 -1
- package/dist/templates/ci-workflows/github/cypress-smoke.yml +1 -1
- package/dist/templates/contents/plugins/starter/plugin/api/example/route.ts.template +1 -1
- package/dist/templates/contents/themes/starter/blocks/cta-section/component.tsx +3 -2
- package/dist/templates/contents/themes/starter/blocks/cta-section/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/features-grid/component.tsx +2 -1
- package/dist/templates/contents/themes/starter/blocks/features-grid/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/hero/component.tsx +3 -2
- package/dist/templates/contents/themes/starter/blocks/hero/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/testimonials/component.tsx +3 -2
- package/dist/templates/contents/themes/starter/blocks/testimonials/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/blocks/text-content/component.tsx +2 -1
- package/dist/templates/contents/themes/starter/blocks/text-content/schema.ts +1 -1
- package/dist/templates/contents/themes/starter/entities/posts/components/post-header.tsx +2 -1
- package/dist/templates/contents/themes/starter/lib/hooks/useAnalyticsData.ts +2 -1
- package/dist/templates/contents/themes/starter/lib/hooks/useTaskStats.ts +2 -1
- package/dist/templates/eslint.config.mjs +133 -9
- package/dist/templates/features/blog/blocks/post-content/component.tsx +2 -1
- package/dist/templates/features/blog/blocks/post-content/schema.ts +1 -1
- package/dist/templates/features/blog/entities/posts/components/post-header.tsx +2 -1
- package/dist/templates/features/pages/blocks/hero/component.tsx +3 -2
- package/dist/templates/features/pages/blocks/hero/schema.ts +1 -1
- package/dist/templates/next.config.mjs +50 -29
- package/dist/templates/proxy.ts +100 -21
- package/dist/templates/public/sw.js +2 -2
- package/dist/templates/scripts/cy-run-prod.cjs +5 -5
- package/dist/types/blocks.d.ts +1 -1
- package/dist/types/blocks.d.ts.map +1 -1
- package/dist/types/blocks.js +1 -1
- package/package.json +9 -5
- package/scripts/build/docs-registry.mjs +7 -7
- package/scripts/build/registry/__tests__/billing-registry.test.mjs +43 -0
- package/scripts/build/registry/__tests__/build-output.test.mjs +209 -0
- package/scripts/build/registry/__tests__/copy-race-child.mjs +14 -0
- package/scripts/build/registry/__tests__/direct-fs-writes.mjs +203 -0
- package/scripts/build/registry/__tests__/globals-css-tag.test.mjs +66 -0
- package/scripts/build/registry/__tests__/icons-discovery.test.mjs +530 -29
- package/scripts/build/registry/__tests__/page-generator.test.mjs +211 -37
- package/scripts/build/registry/__tests__/published-signatures.test.mjs +239 -0
- package/scripts/build/registry/__tests__/route-file-rule.test.mjs +170 -0
- package/scripts/build/registry/__tests__/safe-fs.test.mjs +333 -0
- package/scripts/build/registry/__tests__/template-analysis.test.mjs +142 -0
- package/scripts/build/registry/__tests__/template-registry.test.mjs +279 -9
- package/scripts/build/registry/__tests__/templates-plan.test.mjs +128 -0
- package/scripts/build/registry/__tests__/templates-tree.test.mjs +367 -0
- package/scripts/build/registry/__tests__/write-places.test.mjs +425 -0
- package/scripts/build/registry/config.mjs +6 -65
- package/scripts/build/registry/discovery/icons.mjs +498 -43
- package/scripts/build/registry/discovery/templates.mjs +1 -1
- package/scripts/build/registry/generators/billing-registry.mjs +1 -1
- package/scripts/build/registry/generators/docs-registry.mjs +3 -4
- package/scripts/build/registry/generators/feature-registry.mjs +1 -1
- package/scripts/build/registry/generators/permissions-registry.mjs +2 -2
- package/scripts/build/registry/generators/template-registry.mjs +65 -49
- package/scripts/build/registry/index.mjs +1 -2
- package/scripts/build/registry/post-build/index.mjs +1 -1
- package/scripts/build/registry/post-build/own-gitignores.mjs +220 -0
- package/scripts/build/registry/post-build/page-generator.mjs +512 -268
- package/scripts/build/registry/post-build/route-cleanup.mjs +16 -13
- package/scripts/build/registry/post-build/test-fixtures.mjs +26 -8
- package/scripts/build/registry/project-mode.mjs +76 -0
- package/scripts/build/registry/shared/typescript-compiler.mjs +77 -0
- package/scripts/build/registry/validate-env.test.mjs +12 -8
- package/scripts/build/registry/watch.mjs +3 -53
- package/scripts/build/registry/write-places.mjs +228 -0
- package/scripts/build/registry.mjs +53 -30
- package/scripts/build/safe-fs.mjs +279 -0
- package/scripts/build/templates-plan.mjs +44 -0
- package/scripts/build/theme.mjs +46 -42
- package/scripts/build/update-tsconfig.mjs +16 -15
- package/scripts/db/cluster-changes.mjs +205 -0
- package/scripts/db/connection-time-limits.mjs +53 -0
- package/scripts/db/inspect-server.mjs +108 -0
- package/scripts/db/migration-time-limit.mjs +695 -0
- package/scripts/db/run-migrations.mjs +46 -41
- package/scripts/db/ssl-config.mjs +194 -0
- package/scripts/db/theme-location.mjs +69 -0
- package/scripts/db/verify-tables.mjs +3 -8
- package/scripts/db/verify-teams.mjs +2 -6
- package/scripts/db/verify-theme-migrations.mjs +169 -0
- package/scripts/maintenance/core-updater.mjs +1003 -0
- package/scripts/maintenance/step-guard.mjs +74 -0
- package/scripts/maintenance/update-core.mjs +14 -831
- package/scripts/utils/console-guard.mjs +13 -0
- package/scripts/utils/generated-tag.mjs +66 -0
- package/scripts/utils/index.mjs +9 -1
- package/scripts/utils/logging.mjs +140 -0
- package/templates/app/(auth)/accept-invite/[token]/page.tsx +4 -3
- package/templates/app/(auth)/verify-email/page.tsx +4 -3
- package/templates/app/(public)/docs/[section]/[page]/page.tsx +11 -0
- package/templates/app/api/auth/[...all]/route.ts +15 -14
- package/templates/app/api/internal/user-metadata/route.ts +6 -8
- package/templates/app/api/user/plan-flags/route.ts +1 -1
- package/templates/app/api/user/profile/route.ts +12 -17
- package/templates/app/api/v1/api-keys/route.ts +1 -1
- package/templates/app/api/v1/auth/signup-with-invite/route.ts +2 -1
- package/templates/app/api/v1/billing/cancel/route.ts +1 -1
- package/templates/app/api/v1/billing/change-plan/route.ts +1 -1
- package/templates/app/api/v1/billing/check-action/route.ts +1 -1
- package/templates/app/api/v1/billing/checkout/route.ts +1 -1
- package/templates/app/api/v1/blocks/validate/route.ts +1 -1
- package/templates/app/api/v1/media/[id]/tags/route.ts +1 -1
- package/templates/app/api/v1/post-categories/[id]/route.ts +1 -1
- package/templates/app/api/v1/post-categories/route.ts +1 -1
- package/templates/app/api/v1/teams/[teamId]/members/route.ts +2 -1
- package/templates/app/api/v1/teams/[teamId]/subscription/route.ts +3 -5
- package/templates/app/api/v1/teams/docs.md +4 -9
- package/templates/app/api/v1/teams/switch/route.ts +1 -1
- package/templates/app/api/v1/users/[id]/meta/[key]/route.ts +1 -1
- package/templates/app/api/v1/users/[id]/route.ts +1 -1
- package/templates/app/api/v1/users/route.ts +1 -1
- package/templates/app/dashboard/(main)/media/page.tsx +3 -1
- package/templates/app/dashboard/settings/api-keys/page.tsx +5 -4
- package/templates/app/dashboard/settings/profile/page.tsx +3 -2
- package/templates/app/devtools/scheduled-actions/page.tsx +2 -1
- package/templates/app/superadmin/docs/[section]/[page]/page.tsx +16 -0
- package/templates/app/superadmin/subscriptions/page.tsx +3 -2
- package/templates/app/superadmin/teams/[teamId]/page.tsx +5 -4
- package/templates/app/superadmin/users/[userId]/page.tsx +2 -1
- package/templates/app/superadmin/users/page.tsx +2 -1
- package/templates/blocks/cta-section/component.tsx +3 -2
- package/templates/blocks/cta-section/schema.ts +1 -1
- package/templates/blocks/features-grid/component.tsx +2 -1
- package/templates/blocks/features-grid/schema.ts +1 -1
- package/templates/blocks/hero/component.tsx +3 -2
- package/templates/blocks/hero/schema.ts +1 -1
- package/templates/blocks/testimonials/component.tsx +2 -1
- package/templates/blocks/testimonials/schema.ts +1 -1
- package/templates/blocks/text-content/component.tsx +2 -1
- package/templates/blocks/text-content/schema.ts +1 -1
- package/templates/ci-workflows/README.md +1 -1
- package/templates/ci-workflows/github/cypress-regression.yml +1 -1
- package/templates/ci-workflows/github/cypress-smoke.yml +1 -1
- package/templates/contents/plugins/starter/plugin/api/example/route.ts.template +1 -1
- package/templates/contents/themes/starter/blocks/cta-section/component.tsx +3 -2
- package/templates/contents/themes/starter/blocks/cta-section/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/features-grid/component.tsx +2 -1
- package/templates/contents/themes/starter/blocks/features-grid/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/hero/component.tsx +3 -2
- package/templates/contents/themes/starter/blocks/hero/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/testimonials/component.tsx +3 -2
- package/templates/contents/themes/starter/blocks/testimonials/schema.ts +1 -1
- package/templates/contents/themes/starter/blocks/text-content/component.tsx +2 -1
- package/templates/contents/themes/starter/blocks/text-content/schema.ts +1 -1
- package/templates/contents/themes/starter/entities/posts/components/post-header.tsx +2 -1
- package/templates/contents/themes/starter/lib/hooks/useAnalyticsData.ts +2 -1
- package/templates/contents/themes/starter/lib/hooks/useTaskStats.ts +2 -1
- package/templates/eslint.config.mjs +133 -9
- package/templates/features/blog/blocks/post-content/component.tsx +2 -1
- package/templates/features/blog/blocks/post-content/schema.ts +1 -1
- package/templates/features/blog/entities/posts/components/post-header.tsx +2 -1
- package/templates/features/pages/blocks/hero/component.tsx +3 -2
- package/templates/features/pages/blocks/hero/schema.ts +1 -1
- package/templates/next.config.mjs +50 -29
- package/templates/proxy.ts +100 -21
- package/templates/public/sw.js +2 -2
- package/templates/scripts/cy-run-prod.cjs +5 -5
- package/tests/jest/__mocks__/@nextsparkjs/registries/template-registry.client.ts +11 -0
- package/tests/jest/__mocks__/next-server.js +10 -0
- package/scripts/build/docs.mjs +0 -392
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiExplorer.d.ts","sourceRoot":"","sources":["../../../../src/components/devtools/api-explorer/ApiExplorer.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"ApiExplorer.d.ts","sourceRoot":"","sources":["../../../../src/components/devtools/api-explorer/ApiExplorer.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAA;AA4B5F,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,CAAC,CAAA;IAC9C,eAAe,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAC1D;AAwBD,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,gBAAgB,2CA4dxE"}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
createPresetPlaceholderValues,
|
|
20
20
|
resolvePresetPlaceholders
|
|
21
21
|
} from "./preset-placeholders.js";
|
|
22
|
+
import { withBasePath } from "../../../lib/base-path.js";
|
|
22
23
|
function findRouteByPath(routes, path) {
|
|
23
24
|
for (const category of Object.keys(routes)) {
|
|
24
25
|
const found = routes[category].find((r) => r.path === path);
|
|
@@ -120,7 +121,7 @@ function ApiExplorer({ routes, initialEndpoint }) {
|
|
|
120
121
|
const handleSend = useCallback(async () => {
|
|
121
122
|
if (!selectedEndpoint) return;
|
|
122
123
|
const url = buildUrl(selectedEndpoint.path, pathParams, queryParams);
|
|
123
|
-
const fullUrl = (typeof window !== "undefined" ? window.location.origin : "") + url;
|
|
124
|
+
const fullUrl = (typeof window !== "undefined" ? window.location.origin : "") + withBasePath(url);
|
|
124
125
|
const customHeaders = {};
|
|
125
126
|
if (bypassMode) {
|
|
126
127
|
customHeaders["x-admin-bypass"] = "confirm-cross-team-access";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-table.d.ts","sourceRoot":"","sources":["../../../../src/components/devtools/scheduled-actions/actions-table.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"actions-table.d.ts","sourceRoot":"","sources":["../../../../src/components/devtools/scheduled-actions/actions-table.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AAI3E,UAAU,iBAAiB;IACzB,OAAO,EAAE,eAAe,EAAE,CAAA;CAC3B;AAsCD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,2CAuR1D"}
|
|
@@ -16,8 +16,9 @@ import { Button } from "../../ui/button.js";
|
|
|
16
16
|
import { ChevronDownIcon, ChevronRightIcon, RotateCcwIcon, PlayIcon } from "lucide-react";
|
|
17
17
|
import { sel } from "../../../lib/test/index.js";
|
|
18
18
|
import { toast } from "sonner";
|
|
19
|
+
import { withBasePath } from "../../../lib/base-path.js";
|
|
19
20
|
async function retryAction(actionId) {
|
|
20
|
-
const response = await fetch("/api/v1/devtools/scheduled-actions", {
|
|
21
|
+
const response = await fetch(withBasePath("/api/v1/devtools/scheduled-actions"), {
|
|
21
22
|
method: "POST",
|
|
22
23
|
headers: {
|
|
23
24
|
"Content-Type": "application/json"
|
|
@@ -32,7 +33,7 @@ async function retryAction(actionId) {
|
|
|
32
33
|
return data.data;
|
|
33
34
|
}
|
|
34
35
|
async function runAction(actionId) {
|
|
35
|
-
const response = await fetch("/api/v1/devtools/scheduled-actions/run", {
|
|
36
|
+
const response = await fetch(withBasePath("/api/v1/devtools/scheduled-actions/run"), {
|
|
36
37
|
method: "POST",
|
|
37
38
|
headers: {
|
|
38
39
|
"Content-Type": "application/json"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/docs/docs-sidebar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"docs-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/docs/docs-sidebar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAA;AAM3E,UAAU,gBAAgB;IACxB,QAAQ,EAAE,cAAc,EAAE,CAAA;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CAqMzD"}
|
|
@@ -8,8 +8,9 @@ import { useState } from "react";
|
|
|
8
8
|
import { useTranslations } from "next-intl";
|
|
9
9
|
import { Input } from "../ui/input.js";
|
|
10
10
|
import { THEME_REGISTRY } from "@nextsparkjs/registries/theme-registry";
|
|
11
|
+
import { getPublicDocsCategory } from "../../lib/docs/access.js";
|
|
11
12
|
function DocsSidebar({ sections }) {
|
|
12
|
-
var _a
|
|
13
|
+
var _a;
|
|
13
14
|
const pathname = usePathname();
|
|
14
15
|
const t = useTranslations("docs");
|
|
15
16
|
const getActiveSection = () => {
|
|
@@ -22,7 +23,7 @@ function DocsSidebar({ sections }) {
|
|
|
22
23
|
const activeSection = getActiveSection();
|
|
23
24
|
const activeTheme = process.env.NEXT_PUBLIC_ACTIVE_THEME || "default";
|
|
24
25
|
const themeAppConfig = (_a = THEME_REGISTRY[activeTheme]) == null ? void 0 : _a.appConfig;
|
|
25
|
-
const publicConfig = (
|
|
26
|
+
const publicConfig = getPublicDocsCategory(themeAppConfig == null ? void 0 : themeAppConfig.docs) ?? { enabled: true, open: true, label: "Documentation" };
|
|
26
27
|
const [expandedSections, setExpandedSections] = useState(() => {
|
|
27
28
|
return activeSection ? /* @__PURE__ */ new Set([activeSection]) : /* @__PURE__ */ new Set();
|
|
28
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityFieldRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/entities/EntityFieldRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6CH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"EntityFieldRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/entities/EntityFieldRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6CH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAM3D,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,CAAA;CACF;AAm1BD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,GACR,EAAE,wBAAwB,2CAyC1B"}
|
|
@@ -31,6 +31,7 @@ import { UserSelect } from "../ui/user-select.js";
|
|
|
31
31
|
import { ButtonGroup } from "../ui/button-group.js";
|
|
32
32
|
import { DoubleRange } from "../ui/double-range.js";
|
|
33
33
|
import { resolveMediaUrl } from "../../types/blocks.js";
|
|
34
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
34
35
|
function formatDisplayValue(value, field) {
|
|
35
36
|
if (value === null || value === void 0) {
|
|
36
37
|
return "-";
|
|
@@ -701,7 +702,7 @@ function renderDisplayField(field, value, mode, context) {
|
|
|
701
702
|
field.type === "json" ? /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsx("pre", { className: "text-xs overflow-auto max-h-40", children: formattedValue }) }) }) : field.type === "textarea" ? /* @__PURE__ */ jsx("p", { className: "text-base leading-relaxed whitespace-pre-wrap", children: formattedValue }) : field.type === "url" ? /* @__PURE__ */ jsx(
|
|
702
703
|
"a",
|
|
703
704
|
{
|
|
704
|
-
href: String(value),
|
|
705
|
+
href: withBasePathIfInApp(String(value)),
|
|
705
706
|
target: "_blank",
|
|
706
707
|
rel: "noopener noreferrer",
|
|
707
708
|
className: "text-base underline underline-offset-2 hover:no-underline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityList.d.ts","sourceRoot":"","sources":["../../../src/components/entities/EntityList.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAyC,MAAM,OAAO,CAAA;AA+C7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"EntityList.d.ts","sourceRoot":"","sources":["../../../src/components/entities/EntityList.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAyC,MAAM,OAAO,CAAA;AA+C7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAO5D,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,IAAI,CAAA;IAC3D,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC1C,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,GAAG,IAAI,CAAA;IAC/D,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,CAAA;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAGD,wBAAgB,UAAU,CAAC,EACzB,YAAY,EACZ,IAAI,EACJ,SAAiB,EACjB,KAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,oBAA4B,EAC5B,YAAmB,EACnB,gBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,WAAgB,EAChB,WAAgB,EAChB,QAAa,EACb,WAAe,EACf,UAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,EACT,MAAM,GACP,EAAE,eAAe,2CAudjB"}
|
|
@@ -50,6 +50,7 @@ import { SkeletonEntityList } from "../ui/skeleton-list.js";
|
|
|
50
50
|
import { EntityFieldRenderer } from "./EntityFieldRenderer.js";
|
|
51
51
|
import { sel } from "../../lib/test/index.js";
|
|
52
52
|
import { usePermission } from "../../lib/permissions/hooks.js";
|
|
53
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
53
54
|
function EntityList({
|
|
54
55
|
entityConfig,
|
|
55
56
|
data,
|
|
@@ -348,7 +349,7 @@ function EntityList({
|
|
|
348
349
|
getPublicUrl && getPublicUrl(item) && /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
349
350
|
"a",
|
|
350
351
|
{
|
|
351
|
-
href: getPublicUrl(item),
|
|
352
|
+
href: withBasePathIfInApp(getPublicUrl(item)),
|
|
352
353
|
target: "_blank",
|
|
353
354
|
rel: "noopener noreferrer",
|
|
354
355
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityTable.d.ts","sourceRoot":"","sources":["../../../src/components/entities/EntityTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA+DH,OAAO,KAAK,EACV,gBAAgB,EAMjB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"EntityTable.d.ts","sourceRoot":"","sources":["../../../src/components/entities/EntityTable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA+DH,OAAO,KAAK,EACV,gBAAgB,EAMjB,MAAM,sBAAsB,CAAA;AAG7B;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EACrE,YAAY,EACZ,IAAI,EACJ,OAAO,EAAE,aAAa,EACtB,UAAkB,EAClB,WAAW,EAAE,qBAAqB,EAClC,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,YAAY,EAAE,kBAAkB,EAChC,eAAe,EAAE,qBAAqB,EACtC,iBAAwB,EACxB,UAAU,EACV,WAAW,EACX,MAAM,EACN,WAAgB,EAChB,QAAQ,EACR,YAAmB,EACnB,WAAW,EACX,UAAU,EACV,OAAe,EACf,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,MAAM,EACN,aAAa,EACb,UAAiB,GAClB,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAwzBrB"}
|
|
@@ -58,6 +58,7 @@ import { SkeletonEntityList } from "../ui/skeleton-list.js";
|
|
|
58
58
|
import { EntityFieldRenderer } from "./EntityFieldRenderer.js";
|
|
59
59
|
import { sel } from "../../lib/test/index.js";
|
|
60
60
|
import { usePermission } from "../../lib/permissions/hooks.js";
|
|
61
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
61
62
|
function EntityTable({
|
|
62
63
|
entityConfig,
|
|
63
64
|
data,
|
|
@@ -158,7 +159,7 @@ function EntityTable({
|
|
|
158
159
|
icon: /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3" }),
|
|
159
160
|
onClick: (item) => {
|
|
160
161
|
const url = getPublicUrlForItem(item);
|
|
161
|
-
if (url) window.open(url, "_blank");
|
|
162
|
+
if (url) window.open(withBasePathIfInApp(url), "_blank");
|
|
162
163
|
},
|
|
163
164
|
visible: (item) => isPublished(item) && !!getPublicUrlForItem(item),
|
|
164
165
|
dataCySuffix: "view-public"
|
|
@@ -207,7 +208,7 @@ function EntityTable({
|
|
|
207
208
|
icon: /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4" }),
|
|
208
209
|
onClick: (item) => {
|
|
209
210
|
const url = getPublicUrlForItem(item);
|
|
210
|
-
if (url) window.open(url, "_blank");
|
|
211
|
+
if (url) window.open(withBasePathIfInApp(url), "_blank");
|
|
211
212
|
},
|
|
212
213
|
// Only show in dropdown for non-published items (published shows as quick action)
|
|
213
214
|
visible: (item) => !isPublished(item) && !!getPublicUrlForItem(item),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/entities/ErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/entities/ErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOnD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;IACtD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CACtD,wBAAwB,EACxB,wBAAwB,CACzB;IACC,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAI;gBAEnB,KAAK,EAAE,wBAAwB;IAK3C,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAWhF,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IA2BpD,OAAO,CAAC,WAAW,CAqBlB;IAED,OAAO,CAAC,WAAW,CAWlB;IAED,OAAO,CAAC,WAAW,CAOlB;IAED,OAAO,CAAC,YAAY,CAInB;IAED,OAAO,CAAC,YAAY,CAInB;IAED,OAAO,CAAC,YAAY,CAcnB;IAED,OAAO,CAAC,eAAe,CA8BtB;IAED,MAAM;CA2HP;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM;yBACT,KAAK,aAAa,SAAS;EAU1E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACtD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,UAAU,CAAC,EAAE,MAAM;YAEc,CAAC;;EASnC"}
|
|
@@ -5,6 +5,7 @@ import { Alert, AlertDescription, AlertTitle } from "../ui/alert.js";
|
|
|
5
5
|
import { Button } from "../ui/button.js";
|
|
6
6
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../ui/card.js";
|
|
7
7
|
import { AlertTriangle, RefreshCw, Home, Bug } from "lucide-react";
|
|
8
|
+
import { withBasePath } from "../../lib/base-path.js";
|
|
8
9
|
class EntityErrorBoundary extends React.Component {
|
|
9
10
|
retryCount = 0;
|
|
10
11
|
maxRetries = 3;
|
|
@@ -81,7 +82,7 @@ class EntityErrorBoundary extends React.Component {
|
|
|
81
82
|
};
|
|
82
83
|
handleGoHome = () => {
|
|
83
84
|
if (typeof window !== "undefined") {
|
|
84
|
-
window.location.href = "/dashboard";
|
|
85
|
+
window.location.href = withBasePath("/dashboard");
|
|
85
86
|
}
|
|
86
87
|
};
|
|
87
88
|
getErrorType = (error) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityDetailWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/entities/wrappers/EntityDetailWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAoD,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"EntityDetailWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/entities/wrappers/EntityDetailWrapper.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAoD,MAAM,OAAO,CAAA;AAaxE,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;CAChE;AAED,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,EAAE,EACF,gBAAqB,EACrB,OAAO,EACP,SAAS,EACT,oBAAyB,GAC1B,EAAE,wBAAwB,2CAoZ1B"}
|
|
@@ -8,6 +8,7 @@ import { useEntityConfig } from "../../../hooks/useEntityConfig.js";
|
|
|
8
8
|
import { useRouter } from "next/navigation";
|
|
9
9
|
import { getEntityData, deleteEntityData, fetchWithTeam } from "../../../lib/api/entities.js";
|
|
10
10
|
import { TeamDetailSection } from "../../teams/TeamDetailSection.js";
|
|
11
|
+
import { withBasePath } from "../../../lib/base-path.js";
|
|
11
12
|
function EntityDetailWrapper({
|
|
12
13
|
entityType,
|
|
13
14
|
id,
|
|
@@ -92,7 +93,7 @@ function EntityDetailWrapper({
|
|
|
92
93
|
console.log(`[EntityDetailWrapper] hasChildEntities:`, hasChildEntities);
|
|
93
94
|
if (hasChildEntities) {
|
|
94
95
|
const endpointPath = entityConfig.slug || `${entityType}s`;
|
|
95
|
-
const url = new URL(`/api/v1/${endpointPath}/${id}
|
|
96
|
+
const url = new URL(withBasePath(`/api/v1/${endpointPath}/${id}`), window.location.origin);
|
|
96
97
|
url.searchParams.set("child", "all");
|
|
97
98
|
url.searchParams.set("metas", "all");
|
|
98
99
|
console.log(`[EntityDetailWrapper] Loading parent+child data from:`, url.toString());
|
|
@@ -157,7 +158,7 @@ function EntityDetailWrapper({
|
|
|
157
158
|
dataLoadedRef.current = false;
|
|
158
159
|
if (hasChildEntities) {
|
|
159
160
|
const endpointPath = entityConfig.slug || `${entityType}s`;
|
|
160
|
-
const url = new URL(`/api/v1/${endpointPath}/${id}
|
|
161
|
+
const url = new URL(withBasePath(`/api/v1/${endpointPath}/${id}`), window.location.origin);
|
|
161
162
|
url.searchParams.set("child", "all");
|
|
162
163
|
url.searchParams.set("metas", "all");
|
|
163
164
|
const response = await fetchWithTeam(url.toString(), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAGlD,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAA;IACZ,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACnE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,SAAS,sDAyKpB,CAAA"}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from "../ui/dropdown-menu.js";
|
|
15
15
|
import { cn } from "../../lib/utils/index.js";
|
|
16
16
|
import { sel } from "../../lib/selectors/index.js";
|
|
17
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
17
18
|
const MediaCard = memo(function MediaCard2({
|
|
18
19
|
media,
|
|
19
20
|
isSelected,
|
|
@@ -66,7 +67,7 @@ const MediaCard = memo(function MediaCard2({
|
|
|
66
67
|
"img",
|
|
67
68
|
{
|
|
68
69
|
"data-cy": sel("media.grid.thumbnail", { id: media.id }),
|
|
69
|
-
src: media.url,
|
|
70
|
+
src: withBasePathIfInApp(media.url),
|
|
70
71
|
alt: media.alt || media.filename,
|
|
71
72
|
className: "w-full h-full object-cover",
|
|
72
73
|
loading: "lazy",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaDetailPanel.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaDetailPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,OAAO,KAAK,EAAE,KAAK,EAAY,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"MediaDetailPanel.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaDetailPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,OAAO,KAAK,EAAE,KAAK,EAAY,MAAM,uBAAuB,CAAA;AAG5D,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAQD,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,WAAkB,EAAE,QAAgB,EAAE,SAAS,EAAE,EAAE,qBAAqB,2CA+V1H"}
|
|
@@ -17,6 +17,7 @@ import { cn } from "../../lib/utils/index.js";
|
|
|
17
17
|
import { sel } from "../../lib/selectors/index.js";
|
|
18
18
|
import { useUpdateMedia, useMediaTags, useMediaItemTags, useAddMediaTag, useRemoveMediaTag, useCreateMediaTag } from "../../hooks/useMedia.js";
|
|
19
19
|
import { useToast } from "../../hooks/useToast.js";
|
|
20
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
20
21
|
function formatFileSize(bytes) {
|
|
21
22
|
if (bytes < 1024) return `${bytes} B`;
|
|
22
23
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
@@ -94,7 +95,7 @@ function MediaDetailPanel({ media, onClose, showPreview = true, readOnly = false
|
|
|
94
95
|
showPreview && /* @__PURE__ */ jsx("div", { className: "aspect-video w-full bg-neutral-950 rounded-lg overflow-hidden flex items-center justify-center mb-4", children: isImage ? /* @__PURE__ */ jsx(
|
|
95
96
|
"img",
|
|
96
97
|
{
|
|
97
|
-
src: media.url,
|
|
98
|
+
src: withBasePathIfInApp(media.url),
|
|
98
99
|
alt: media.alt || media.filename,
|
|
99
100
|
className: "w-full h-full object-contain"
|
|
100
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaList.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaList.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyBH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"MediaList.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaList.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyBH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAGlD,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACnE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAgBD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,IAAe,EACf,QAAgB,EAChB,SAAS,GACV,EAAE,cAAc,2CAoMhB"}
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import { Skeleton } from "../ui/skeleton.js";
|
|
22
22
|
import { cn } from "../../lib/utils/index.js";
|
|
23
23
|
import { sel } from "../../lib/selectors/index.js";
|
|
24
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
24
25
|
function formatFileSize(bytes) {
|
|
25
26
|
if (bytes < 1024) return `${bytes} B`;
|
|
26
27
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
@@ -127,7 +128,7 @@ function MediaList({
|
|
|
127
128
|
/* @__PURE__ */ jsx(TableCell, { children: isImage ? /* @__PURE__ */ jsx(
|
|
128
129
|
"img",
|
|
129
130
|
{
|
|
130
|
-
src: media.url,
|
|
131
|
+
src: withBasePathIfInApp(media.url),
|
|
131
132
|
alt: media.alt || media.filename,
|
|
132
133
|
className: "h-10 w-10 rounded object-cover",
|
|
133
134
|
loading: "lazy",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaSelector.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"MediaSelector.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaSelector.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAIlD,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,CAAA;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,IAAe,EACf,YAAY,EACZ,SAAS,EACT,QAAgB,GACjB,EAAE,kBAAkB,2CA8IpB"}
|
|
@@ -9,6 +9,7 @@ import { MediaLibrary } from "./MediaLibrary.js";
|
|
|
9
9
|
import { useMediaItem } from "../../hooks/useMedia.js";
|
|
10
10
|
import { cn } from "../../lib/utils/index.js";
|
|
11
11
|
import { sel } from "../../lib/selectors/index.js";
|
|
12
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
12
13
|
function MediaSelector({
|
|
13
14
|
value,
|
|
14
15
|
onChange,
|
|
@@ -84,7 +85,7 @@ function MediaSelector({
|
|
|
84
85
|
children: isImage ? /* @__PURE__ */ jsx(
|
|
85
86
|
"img",
|
|
86
87
|
{
|
|
87
|
-
src: selectedMedia.url,
|
|
88
|
+
src: withBasePathIfInApp(selectedMedia.url),
|
|
88
89
|
alt: selectedMedia.alt || selectedMedia.filename,
|
|
89
90
|
className: "w-full h-full object-cover"
|
|
90
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaUploadZone.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaUploadZone.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"MediaUploadZone.d.ts","sourceRoot":"","sources":["../../../src/components/media/MediaUploadZone.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AASlD,UAAU,oBAAoB;IAC5B,gBAAgB,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,IAAI,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,eAAe,CAAC,EAC9B,gBAAgB,EAChB,SAAc,EACd,aAAsC,EACtC,SAAS,GACV,EAAE,oBAAoB,2CAgQtB"}
|
|
@@ -10,6 +10,7 @@ import { cn } from "../../lib/utils/index.js";
|
|
|
10
10
|
import { sel } from "../../lib/selectors/index.js";
|
|
11
11
|
import { useMediaUpload } from "../../hooks/useMediaUpload.js";
|
|
12
12
|
import { useToast } from "../../hooks/useToast.js";
|
|
13
|
+
import { withBasePath } from "../../lib/base-path.js";
|
|
13
14
|
function MediaUploadZone({
|
|
14
15
|
onUploadComplete,
|
|
15
16
|
maxSizeMB = 10,
|
|
@@ -28,7 +29,7 @@ function MediaUploadZone({
|
|
|
28
29
|
const checkForDuplicates = async (files) => {
|
|
29
30
|
var _a;
|
|
30
31
|
try {
|
|
31
|
-
const res = await fetch("/api/v1/media/check-duplicates", {
|
|
32
|
+
const res = await fetch(withBasePath("/api/v1/media/check-duplicates"), {
|
|
32
33
|
method: "POST",
|
|
33
34
|
headers: { "Content-Type": "application/json" },
|
|
34
35
|
body: JSON.stringify({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicEntityDetail.d.ts","sourceRoot":"","sources":["../../../../src/components/public/entities/PublicEntityDetail.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"PublicEntityDetail.d.ts","sourceRoot":"","sources":["../../../../src/components/public/entities/PublicEntityDetail.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,UAAU,uBAAuB;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,uBAAuB,2CAwPpG"}
|
|
@@ -12,6 +12,7 @@ import { ArrowLeft, CalendarDays, Clock } from "lucide-react";
|
|
|
12
12
|
import { entityApi } from "../../../lib/api/entities.js";
|
|
13
13
|
import { getAllEntityConfigs } from "../../../lib/entities/registry.client.js";
|
|
14
14
|
import { SYSTEM_TIMESTAMP_FIELDS } from "../../../lib/entities/system-fields.js";
|
|
15
|
+
import { withBasePathIfInApp } from "../../../lib/base-path.js";
|
|
15
16
|
function PublicEntityDetail({ entityType, entitySlug, id, className }) {
|
|
16
17
|
const [data, setData] = useState(null);
|
|
17
18
|
const [loading, setLoading] = useState(true);
|
|
@@ -82,7 +83,7 @@ function PublicEntityDetail({ entityType, entitySlug, id, className }) {
|
|
|
82
83
|
case "email":
|
|
83
84
|
return /* @__PURE__ */ jsx("a", { href: `mailto:${value}`, className: "text-primary hover:underline", children: value });
|
|
84
85
|
case "url":
|
|
85
|
-
return /* @__PURE__ */ jsx("a", { href: value, target: "_blank", rel: "noopener noreferrer", className: "text-primary hover:underline", children: value });
|
|
86
|
+
return /* @__PURE__ */ jsx("a", { href: withBasePathIfInApp(value), target: "_blank", rel: "noopener noreferrer", className: "text-primary hover:underline", children: value });
|
|
86
87
|
case "select":
|
|
87
88
|
const option = (_a = field.options) == null ? void 0 : _a.find((opt) => opt.value === value);
|
|
88
89
|
return (option == null ? void 0 : option.label) || String(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamPendingInvitations.d.ts","sourceRoot":"","sources":["../../../src/components/teams/TeamPendingInvitations.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TeamPendingInvitations.d.ts","sourceRoot":"","sources":["../../../src/components/teams/TeamPendingInvitations.tsx"],"names":[],"mappings":"AAoDA,UAAU,2BAA2B;IACnC,MAAM,EAAE,MAAM,CAAA;CACf;AAOD,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EAAE,2BAA2B,2CAoL7E"}
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
import { toast } from "sonner";
|
|
28
28
|
import { useTeamMembers } from "../../hooks/useTeamMembers.js";
|
|
29
29
|
import { useAuth } from "../../hooks/useAuth.js";
|
|
30
|
+
import { withBasePath } from "../../lib/base-path.js";
|
|
30
31
|
const roleIconsMap = {
|
|
31
32
|
owner: Crown,
|
|
32
33
|
admin: Shield,
|
|
@@ -52,7 +53,7 @@ function TeamPendingInvitations({ teamId }) {
|
|
|
52
53
|
const { data: invitations = [], isLoading } = useQuery({
|
|
53
54
|
queryKey: ["team-invitations", teamId],
|
|
54
55
|
queryFn: async () => {
|
|
55
|
-
const response = await fetch(`/api/v1/teams/${teamId}/invitations?status=pending`);
|
|
56
|
+
const response = await fetch(withBasePath(`/api/v1/teams/${teamId}/invitations?status=pending`));
|
|
56
57
|
if (!response.ok) throw new Error("Failed to fetch invitations");
|
|
57
58
|
const json = await response.json();
|
|
58
59
|
return json.data || [];
|
|
@@ -61,7 +62,7 @@ function TeamPendingInvitations({ teamId }) {
|
|
|
61
62
|
});
|
|
62
63
|
const cancelMutation = useMutation({
|
|
63
64
|
mutationFn: async (invitationId) => {
|
|
64
|
-
const response = await fetch(`/api/v1/teams/${teamId}/invitations?id=${invitationId}
|
|
65
|
+
const response = await fetch(withBasePath(`/api/v1/teams/${teamId}/invitations?id=${invitationId}`), {
|
|
65
66
|
method: "DELETE"
|
|
66
67
|
});
|
|
67
68
|
if (!response.ok) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
|
|
4
|
-
// ../../node_modules/.pnpm/@nextsparkjs+ui@0.1.0-beta.79_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19.2.
|
|
4
|
+
// ../../node_modules/.pnpm/@nextsparkjs+ui@0.1.0-beta.79_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19.2._dxxt5y7ju3wjwumel4zkzoawsq/node_modules/@nextsparkjs/ui/dist/index.js
|
|
5
5
|
import { createContext, useContext, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import * as React from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-upload.d.ts","sourceRoot":"","sources":["../../../src/components/ui/audio-upload.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audio-upload.d.ts","sourceRoot":"","sources":["../../../src/components/ui/audio-upload.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,gBAAgB;IACxB,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAA;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAU,EACV,QAAQ,EACR,SAAa,EACb,OAAY,EAAE,eAAe;AAC7B,QAAgB,EAChB,SAAS,EACT,QAAe,EACf,eAAqD,EACrD,UAAiB,GAClB,EAAE,gBAAgB,2CAoSlB"}
|
|
@@ -5,6 +5,7 @@ import { X, Play, Pause, Download, Music } from "lucide-react";
|
|
|
5
5
|
import { Button } from "./button.js";
|
|
6
6
|
import { Progress } from "./progress.js";
|
|
7
7
|
import { cn } from "../../lib/utils/index.js";
|
|
8
|
+
import { withBasePathIfInApp } from "../../lib/base-path.js";
|
|
8
9
|
function AudioUpload({
|
|
9
10
|
value = [],
|
|
10
11
|
onChange,
|
|
@@ -244,7 +245,7 @@ function AudioUpload({
|
|
|
244
245
|
{
|
|
245
246
|
variant: "ghost",
|
|
246
247
|
size: "sm",
|
|
247
|
-
onClick: () => window.open(audio.url, "_blank"),
|
|
248
|
+
onClick: () => window.open(withBasePathIfInApp(audio.url), "_blank"),
|
|
248
249
|
children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
|
|
249
250
|
}
|
|
250
251
|
),
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type AvatarImageProps } from '@nextsparkjs/ui';
|
|
3
|
+
export { Avatar, AvatarFallback, getInitials, type AvatarProps, type AvatarImageProps, type AvatarFallbackProps, } from '@nextsparkjs/ui';
|
|
4
|
+
/**
|
|
5
|
+
* The shared AvatarImage with the base path on an in-app `src`.
|
|
6
|
+
*
|
|
7
|
+
* An avatar's URL is data: a file uploaded under /uploads, or a sign-in
|
|
8
|
+
* provider's https URL. The shared component, which mobile uses too, hands its
|
|
9
|
+
* `src` to the browser as given, and under a base path an upload asked for
|
|
10
|
+
* without it is a 404 that leaves only the initials showing.
|
|
11
|
+
*
|
|
12
|
+
* `src` takes a URL only. An `<img>` also accepts a Blob, but Radix loads the
|
|
13
|
+
* avatar by assigning `src` to an off-screen image, where a Blob does not load.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarImageProps, "src"> & {
|
|
16
|
+
src?: string;
|
|
17
|
+
} & React.RefAttributes<HTMLImageElement>>;
|
|
2
18
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAoC,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIzF,OAAO,EACL,MAAM,EACN,cAAc,EACd,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAA;AAExB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW;UAEkB,MAAM;0CAC+D,CAAA"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// dist/components/ui/avatar.js
|
|
4
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
5
|
+
import * as React15 from "react";
|
|
6
|
+
|
|
7
|
+
// ../../node_modules/.pnpm/@nextsparkjs+ui@0.1.0-beta.79_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19.2._dxxt5y7ju3wjwumel4zkzoawsq/node_modules/@nextsparkjs/ui/dist/index.js
|
|
4
8
|
import { createContext, useContext, useMemo } from "react";
|
|
5
9
|
import { jsx } from "react/jsx-runtime";
|
|
6
10
|
import * as React from "react";
|
|
@@ -654,9 +658,32 @@ var Slider = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
654
658
|
}
|
|
655
659
|
));
|
|
656
660
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
661
|
+
|
|
662
|
+
// dist/lib/base-path.js
|
|
663
|
+
function basePath() {
|
|
664
|
+
return (process.env.__NEXT_ROUTER_BASEPATH || "").replace(/\/+$/, "");
|
|
665
|
+
}
|
|
666
|
+
function withBasePath(path) {
|
|
667
|
+
const base = basePath();
|
|
668
|
+
if (!base) return path;
|
|
669
|
+
return path === "/" ? base : `${base}${path}`;
|
|
670
|
+
}
|
|
671
|
+
function withBasePathIfInApp(url) {
|
|
672
|
+
if (!url.startsWith("/") || url.startsWith("//")) return url;
|
|
673
|
+
const base = basePath();
|
|
674
|
+
if (base && carriesBasePath(url, base)) return url;
|
|
675
|
+
return withBasePath(url);
|
|
676
|
+
}
|
|
677
|
+
function carriesBasePath(url, base) {
|
|
678
|
+
return url.startsWith(base) && ["", "/", "?", "#"].includes(url.charAt(base.length));
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
// dist/components/ui/avatar.js
|
|
682
|
+
var AvatarImage2 = React15.forwardRef(({ src, ...props }, ref) => /* @__PURE__ */ jsx18(AvatarImage, { ref, ...props, src: src && withBasePathIfInApp(src) }));
|
|
683
|
+
AvatarImage2.displayName = AvatarImage.displayName;
|
|
657
684
|
export {
|
|
658
685
|
Avatar,
|
|
659
686
|
AvatarFallback,
|
|
660
|
-
AvatarImage,
|
|
687
|
+
AvatarImage2 as AvatarImage,
|
|
661
688
|
getInitials
|
|
662
689
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@nextsparkjs+ui@0.1.0-beta.79_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19.2.
|
|
3
|
+
// ../../node_modules/.pnpm/@nextsparkjs+ui@0.1.0-beta.79_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19.2._dxxt5y7ju3wjwumel4zkzoawsq/node_modules/@nextsparkjs/ui/dist/index.js
|
|
4
4
|
import { createContext, useContext, useMemo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as React from "react";
|
|
@@ -4,6 +4,19 @@ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTM
|
|
|
4
4
|
} & React.RefAttributes<HTMLElement>>;
|
|
5
5
|
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
6
|
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* A breadcrumb's link, with the base path on an in-app `href` once: Next.js
|
|
9
|
+
* adds it to a <Link> and not to an <a>, and a URL may be written with it or
|
|
10
|
+
* without it.
|
|
11
|
+
*
|
|
12
|
+
* With `asChild` the props go to the child, and a child `href` of its own wins
|
|
13
|
+
* over the link's. An <a> child gets the base path on whichever of the two it
|
|
14
|
+
* ends up with. A <Link> child puts the base path on by itself, so whichever it
|
|
15
|
+
* ends up with, and its `as`, reach it without the base path. Any other child
|
|
16
|
+
* gets the link's href with the base path on and keeps an href of its own
|
|
17
|
+
* untouched, since what it renders is not known here: a component that wraps
|
|
18
|
+
* <Link> and takes its href from the link puts the base path on twice.
|
|
19
|
+
*/
|
|
7
20
|
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
21
|
asChild?: boolean;
|
|
9
22
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/ui/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/ui/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,QAAA,MAAM,UAAU;gBAGA,KAAK,CAAC,SAAS;qCAE+C,CAAA;AAG9E,QAAA,MAAM,cAAc,2KAYlB,CAAA;AAGF,QAAA,MAAM,cAAc,kKASlB,CAAA;AAeF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,cAAc;cAGN,OAAO;2CAmCnB,CAAA;AAGF,QAAA,MAAM,cAAc,sKAYlB,CAAA;AAGF,QAAA,MAAM,mBAAmB;wCAItB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;;CAS5B,CAAA;AAGD,QAAA,MAAM,kBAAkB;8BAGrB,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;;CAU9B,CAAA;AAGD,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import Link from "next/link";
|
|
4
5
|
import { cn } from "../../lib/utils/index.js";
|
|
6
|
+
import { withBasePathIfInApp, withoutBasePath } from "../../lib/base-path.js";
|
|
5
7
|
import { ChevronRightIcon, DotsHorizontalIcon } from "@radix-ui/react-icons";
|
|
6
8
|
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
7
9
|
Breadcrumb.displayName = "Breadcrumb";
|
|
@@ -26,16 +28,27 @@ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
26
28
|
}
|
|
27
29
|
));
|
|
28
30
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
31
|
+
function withoutLinkBasePath(href) {
|
|
32
|
+
if (typeof href === "string") return withoutBasePath(href);
|
|
33
|
+
if (typeof href.pathname !== "string" || href.host || href.hostname || href.protocol) return href;
|
|
34
|
+
return { ...href, pathname: withoutBasePath(href.pathname) };
|
|
35
|
+
}
|
|
36
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, href, children, ...props }, ref) => {
|
|
37
|
+
const linkClassName = cn("transition-colors hover:text-foreground", className);
|
|
38
|
+
if (!asChild) {
|
|
39
|
+
return /* @__PURE__ */ jsx("a", { ref, className: linkClassName, ...props, href: href && withBasePathIfInApp(href), children });
|
|
40
|
+
}
|
|
41
|
+
if (React.isValidElement(children) && children.type === Link) {
|
|
42
|
+
const { href: ownHref, as: ownAs } = children.props;
|
|
43
|
+
const slotProps2 = { ...props, href: href && withoutBasePath(href) };
|
|
44
|
+
return /* @__PURE__ */ jsx(Slot, { ref, className: linkClassName, ...slotProps2, children: React.cloneElement(children, {
|
|
45
|
+
...ownHref !== void 0 && { href: withoutLinkBasePath(ownHref) },
|
|
46
|
+
...ownAs !== void 0 && { as: withoutLinkBasePath(ownAs) }
|
|
47
|
+
}) });
|
|
48
|
+
}
|
|
49
|
+
const child = React.isValidElement(children) ? children : void 0;
|
|
50
|
+
const slotProps = { ...props, href: href && withBasePathIfInApp(href) };
|
|
51
|
+
return /* @__PURE__ */ jsx(Slot, { ref, className: linkClassName, ...slotProps, children: (child == null ? void 0 : child.type) === "a" && typeof child.props.href === "string" ? React.cloneElement(child, { href: withBasePathIfInApp(child.props.href) }) : children });
|
|
39
52
|
});
|
|
40
53
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
41
54
|
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|