@nextsparkjs/core 0.1.0-beta.67 → 0.1.0-beta.69
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/dashboard/block-editor/block-picker.d.ts +7 -2
- package/dist/components/dashboard/block-editor/block-picker.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/block-picker.js +27 -20
- package/dist/components/dashboard/block-editor/block-preview-canvas.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/block-preview-canvas.js +37 -37
- package/dist/components/dashboard/block-editor/block-settings-panel.js +3 -3
- package/dist/components/dashboard/block-editor/builder-editor-view.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/builder-editor-view.js +124 -82
- package/dist/components/dashboard/block-editor/config-panel.d.ts +18 -0
- package/dist/components/dashboard/block-editor/config-panel.d.ts.map +1 -0
- package/dist/components/dashboard/block-editor/config-panel.js +413 -0
- package/dist/components/dashboard/block-editor/floating-block-toolbar.js +1 -1
- package/dist/components/dashboard/block-editor/pattern-card.js +1 -1
- package/dist/components/dashboard/block-editor/pattern-reference-preview.js +1 -1
- package/dist/components/dashboard/block-editor/sortable-block.js +1 -1
- package/dist/components/dashboard/block-editor/tree-view-node.d.ts +11 -0
- package/dist/components/dashboard/block-editor/tree-view-node.d.ts.map +1 -0
- package/dist/components/dashboard/block-editor/tree-view-node.js +91 -0
- package/dist/components/dashboard/block-editor/tree-view.d.ts +17 -0
- package/dist/components/dashboard/block-editor/tree-view.d.ts.map +1 -0
- package/dist/components/dashboard/block-editor/tree-view.js +125 -0
- package/dist/components/dashboard/block-editor/viewport-toggle.d.ts +10 -0
- package/dist/components/dashboard/block-editor/viewport-toggle.d.ts.map +1 -0
- package/dist/components/dashboard/block-editor/viewport-toggle.js +55 -0
- package/dist/components/public/pageBuilder/PageRenderer.d.ts.map +1 -1
- package/dist/components/public/pageBuilder/PageRenderer.js +10 -1
- package/dist/components/settings/layouts/SettingsSidebar.d.ts.map +1 -1
- package/dist/components/settings/layouts/SettingsSidebar.js +14 -0
- package/dist/components/ui/dynamic-icon.d.ts +12 -0
- package/dist/components/ui/dynamic-icon.d.ts.map +1 -0
- package/dist/components/ui/dynamic-icon.js +11 -0
- package/dist/components/ui/index.d.ts +7 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +7 -0
- package/dist/components/ui/skeleton-dashboard.d.ts +32 -0
- package/dist/components/ui/skeleton-dashboard.d.ts.map +1 -0
- package/dist/components/ui/skeleton-dashboard.js +69 -0
- package/dist/components/ui/skeleton-detail.d.ts.map +1 -1
- package/dist/components/ui/skeleton-detail.js +0 -1
- package/dist/components/ui/skeleton-features.d.ts +27 -0
- package/dist/components/ui/skeleton-features.d.ts.map +1 -0
- package/dist/components/ui/skeleton-features.js +90 -0
- package/dist/components/ui/skeleton-form.d.ts.map +1 -1
- package/dist/components/ui/skeleton-form.js +0 -1
- package/dist/components/ui/skeleton-list.d.ts.map +1 -1
- package/dist/components/ui/skeleton-list.js +0 -1
- package/dist/components/ui/skeleton-public.d.ts +26 -0
- package/dist/components/ui/skeleton-public.d.ts.map +1 -0
- package/dist/components/ui/skeleton-public.js +61 -0
- package/dist/components/ui/skeleton-settings.d.ts +54 -0
- package/dist/components/ui/skeleton-settings.d.ts.map +1 -0
- package/dist/components/ui/skeleton-settings.js +332 -0
- package/dist/components/ui/skeleton.d.ts +23 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +46 -2
- package/dist/contexts/TeamContext.d.ts +2 -0
- package/dist/contexts/TeamContext.d.ts.map +1 -1
- package/dist/contexts/TeamContext.js +78 -68
- package/dist/hooks/usePrefetch.d.ts +43 -0
- package/dist/hooks/usePrefetch.d.ts.map +1 -0
- package/dist/hooks/usePrefetch.js +56 -0
- package/dist/lib/actions/index.d.ts +27 -14
- package/dist/lib/actions/index.d.ts.map +1 -1
- package/dist/lib/actions/index.js +19 -1
- package/dist/lib/actions/team.actions.d.ts +107 -0
- package/dist/lib/actions/team.actions.d.ts.map +1 -0
- package/dist/lib/actions/team.actions.js +220 -0
- package/dist/lib/actions/user.actions.d.ts +99 -0
- package/dist/lib/actions/user.actions.d.ts.map +1 -0
- package/dist/lib/actions/user.actions.js +149 -0
- package/dist/lib/selectors/core-selectors.d.ts +98 -44
- package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/block-editor.selectors.d.ts +136 -71
- package/dist/lib/selectors/domains/block-editor.selectors.d.ts.map +1 -1
- package/dist/lib/selectors/domains/block-editor.selectors.js +130 -60
- package/dist/lib/selectors/selectors.d.ts +196 -88
- package/dist/lib/selectors/selectors.d.ts.map +1 -1
- package/dist/messages/de/devtools.json +4 -0
- package/dist/messages/de/index.d.ts +4 -0
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/en/admin.json +15 -1
- package/dist/messages/en/devtools.json +16 -0
- package/dist/messages/en/index.d.ts +30 -0
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/es/admin.json +16 -1
- package/dist/messages/es/devtools.json +4 -0
- package/dist/messages/es/index.d.ts +19 -0
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/fr/devtools.json +4 -0
- package/dist/messages/fr/index.d.ts +4 -0
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/it/devtools.json +4 -0
- package/dist/messages/it/index.d.ts +4 -0
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/pt/devtools.json +4 -0
- package/dist/messages/pt/index.d.ts +4 -0
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/nextspark-entities.d.ts +59 -0
- package/dist/presets/blocks/cta-section/component.tsx +4 -4
- package/dist/presets/blocks/features-grid/component.tsx +5 -5
- package/dist/presets/blocks/hero/component.tsx +2 -2
- package/dist/presets/blocks/testimonials/component.tsx +4 -4
- package/dist/presets/blocks/text-content/component.tsx +2 -2
- package/dist/presets/theme/blocks/hero/component.tsx +2 -2
- package/dist/presets/theme/tests/cypress/src/core/BlockEditorBasePOM.ts +123 -24
- package/dist/styles/classes.json +22 -2
- package/dist/styles/ui.css +1 -1
- package/dist/templates/app/(public)/[...slug]/page.tsx +2 -1
- package/dist/templates/app/(public)/docs/[section]/[page]/page.tsx +1 -1
- package/dist/templates/app/api/devtools/config/entities/route.ts +2 -1
- package/dist/templates/app/api/user/plan-flags/route.ts +1 -1
- package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +4 -2
- package/dist/templates/app/dashboard/(main)/layout.tsx +2 -1
- package/dist/templates/app/dashboard/(main)/loading.tsx +5 -0
- package/dist/templates/app/dashboard/features/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/api-keys/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/billing/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/invoices/loading.tsx +5 -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/password/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/plans/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/profile/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/security/loading.tsx +5 -0
- package/dist/templates/app/dashboard/settings/teams/loading.tsx +5 -0
- package/dist/templates/app/devtools/config/page.tsx +1 -1
- package/dist/templates/app/devtools/page.tsx +1 -1
- package/dist/templates/app/devtools/tests/[[...path]]/page.tsx +1 -1
- package/dist/templates/contents/themes/starter/messages/de/common.json +4 -1
- package/dist/templates/contents/themes/starter/messages/de/index.ts +15 -0
- package/dist/templates/contents/themes/starter/messages/en/common.json +4 -1
- package/dist/templates/contents/themes/starter/messages/en/index.ts +15 -0
- package/dist/templates/contents/themes/starter/messages/es/common.json +4 -1
- package/dist/templates/contents/themes/starter/messages/es/index.ts +15 -0
- package/dist/templates/contents/themes/starter/messages/fr/common.json +4 -1
- package/dist/templates/contents/themes/starter/messages/fr/index.ts +15 -0
- package/dist/templates/contents/themes/starter/messages/it/common.json +4 -1
- package/dist/templates/contents/themes/starter/messages/it/index.ts +13 -0
- package/dist/templates/contents/themes/starter/messages/pt/common.json +4 -1
- package/dist/templates/contents/themes/starter/messages/pt/index.ts +13 -0
- package/dist/templates/contents/themes/starter/styles/globals.css +3 -1
- package/dist/templates/contents/themes/starter/templates/(dashboard)/analytics/loading.tsx +5 -0
- package/dist/templates/contents/themes/starter/templates/(public)/loading.tsx +5 -0
- package/dist/templates/features/blog/blocks/post-content/component.tsx +2 -2
- package/dist/templates/features/pages/blocks/hero/component.tsx +2 -2
- package/dist/templates/next.config.mjs +10 -3
- package/dist/templates/{middleware.ts → proxy.ts} +5 -6
- package/globals.css +54 -0
- package/nextspark-entities.d.ts +59 -0
- package/package.json +18 -16
- package/scripts/build/registry/discovery/api-presets.mjs +20 -12
- package/scripts/build/registry/generators/api-presets-registry.mjs +18 -5
- package/scripts/build/registry/generators/block-registry.mjs +14 -3
- package/scripts/build/registry/generators/docs-registry.mjs +21 -3
- package/scripts/build/registry/generators/translation-registry.mjs +16 -7
- package/scripts/build/theme.mjs +2 -1
- package/templates/app/(public)/[...slug]/page.tsx +2 -1
- package/templates/app/(public)/docs/[section]/[page]/page.tsx +1 -1
- package/templates/app/api/auth/[...all]/route.ts +13 -5
- package/templates/app/api/devtools/config/entities/route.ts +2 -1
- package/templates/app/api/user/plan-flags/route.ts +1 -1
- package/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +4 -2
- package/templates/app/dashboard/(main)/layout.tsx +2 -1
- package/templates/app/dashboard/(main)/loading.tsx +5 -0
- package/templates/app/dashboard/features/loading.tsx +5 -0
- package/templates/app/dashboard/settings/api-keys/loading.tsx +5 -0
- package/templates/app/dashboard/settings/billing/loading.tsx +5 -0
- package/templates/app/dashboard/settings/invoices/loading.tsx +5 -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/password/loading.tsx +5 -0
- package/templates/app/dashboard/settings/plans/loading.tsx +5 -0
- package/templates/app/dashboard/settings/profile/loading.tsx +5 -0
- package/templates/app/dashboard/settings/security/loading.tsx +5 -0
- package/templates/app/dashboard/settings/teams/loading.tsx +5 -0
- package/templates/app/devtools/config/page.tsx +1 -1
- package/templates/app/devtools/page.tsx +1 -1
- package/templates/app/devtools/tests/[[...path]]/page.tsx +1 -1
- package/templates/contents/themes/starter/config/app.config.ts +8 -7
- package/templates/contents/themes/starter/messages/de/common.json +4 -1
- package/templates/contents/themes/starter/messages/de/index.ts +15 -0
- package/templates/contents/themes/starter/messages/en/common.json +4 -1
- package/templates/contents/themes/starter/messages/en/index.ts +15 -0
- package/templates/contents/themes/starter/messages/es/common.json +4 -1
- package/templates/contents/themes/starter/messages/es/index.ts +15 -0
- package/templates/contents/themes/starter/messages/fr/common.json +4 -1
- package/templates/contents/themes/starter/messages/fr/index.ts +15 -0
- package/templates/contents/themes/starter/messages/it/common.json +4 -1
- package/templates/contents/themes/starter/messages/it/index.ts +13 -0
- package/templates/contents/themes/starter/messages/pt/common.json +4 -1
- package/templates/contents/themes/starter/messages/pt/index.ts +13 -0
- package/templates/contents/themes/starter/styles/globals.css +3 -1
- package/templates/contents/themes/starter/templates/(dashboard)/analytics/loading.tsx +5 -0
- package/templates/contents/themes/starter/templates/(public)/loading.tsx +5 -0
- package/templates/features/blog/blocks/post-content/component.tsx +2 -2
- package/templates/features/pages/blocks/hero/component.tsx +2 -2
- package/templates/next.config.mjs +10 -3
- package/templates/pnpm-workspace.yaml +5 -0
- package/templates/{middleware.ts → proxy.ts} +5 -6
- package/tests/jest/setup.ts +5 -0
- package/dist/presets/plugin/.env.example.template +0 -19
|
@@ -45,7 +45,8 @@ function getEntityConfigs(): Record<string, EntityConfig> {
|
|
|
45
45
|
const registry = getEntityRegistry()
|
|
46
46
|
const configs: Record<string, EntityConfig> = {}
|
|
47
47
|
for (const [key, entry] of Object.entries(registry)) {
|
|
48
|
-
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
configs[key] = (entry as any).config as EntityConfig
|
|
49
50
|
}
|
|
50
51
|
return configs
|
|
51
52
|
}
|
|
@@ -16,7 +16,7 @@ interface DocsPageProps {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export async function generateStaticParams() {
|
|
19
|
-
const params = []
|
|
19
|
+
const params: Array<{ section: string; page: string }> = []
|
|
20
20
|
|
|
21
21
|
// Generate params for public docs only
|
|
22
22
|
for (const section of DOCS_REGISTRY.public) {
|
|
@@ -60,7 +60,8 @@ export const GET = withRateLimitTier(async (request: Request) => {
|
|
|
60
60
|
const registry = getEntityRegistry();
|
|
61
61
|
|
|
62
62
|
for (const [, entry] of Object.entries(registry)) {
|
|
63
|
-
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
+
const config = (entry as any).config;
|
|
64
65
|
if (!isEntityConfig(config)) continue;
|
|
65
66
|
|
|
66
67
|
entities.push({
|
|
@@ -219,7 +219,7 @@ export const POST = withRateLimitTier(async (request: NextRequest) => {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
const { updates } = validation.data
|
|
222
|
-
const results = []
|
|
222
|
+
const results: Array<{ success: boolean; userId: string; plan?: boolean; flags?: boolean; error?: string }> = []
|
|
223
223
|
|
|
224
224
|
// Process each update
|
|
225
225
|
for (const update of updates) {
|
|
@@ -94,9 +94,11 @@ export const PUT = withRateLimitTier(async (
|
|
|
94
94
|
|
|
95
95
|
// Handle relation-multi fields - store as JSONB array of IDs
|
|
96
96
|
if (field?.type === 'relation-multi') {
|
|
97
|
-
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
|
+
let relationIds: any[] = []
|
|
98
99
|
if (Array.isArray(value)) {
|
|
99
|
-
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101
|
+
relationIds = value.map((item: any) =>
|
|
100
102
|
typeof item === 'object' && item && 'id' in item ? item.id : item
|
|
101
103
|
).filter(id => id && String(id).trim() !== '')
|
|
102
104
|
}
|
|
@@ -61,7 +61,8 @@ async function DefaultMainDashboardLayout({
|
|
|
61
61
|
children: React.ReactNode
|
|
62
62
|
}) {
|
|
63
63
|
// Get entities directly from the imported registry
|
|
64
|
-
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
const allEntities = Object.values(ENTITY_REGISTRY).map(entry => (entry as any).config)
|
|
65
66
|
// Filter to only include full EntityConfig (not child entities)
|
|
66
67
|
const entities = allEntities.filter(isEntityConfig)
|
|
67
68
|
const serializedEntities: SerializableEntityConfig[] = entities.map(serializeEntityConfig)
|
|
@@ -9,7 +9,7 @@ import { getTranslations } from "next-intl/server";
|
|
|
9
9
|
* Provides read-only view with JSON formatting and copy functionality.
|
|
10
10
|
*/
|
|
11
11
|
export default async function DevConfigPage() {
|
|
12
|
-
const t = await getTranslations('
|
|
12
|
+
const t = await getTranslations('devtools.config');
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<div className="space-y-6" data-cy="devtools-config-page">
|
|
@@ -10,7 +10,7 @@ import { getTranslations } from "next-intl/server";
|
|
|
10
10
|
* Shows overview of available sections in the dev area.
|
|
11
11
|
*/
|
|
12
12
|
export default async function DevHomePage() {
|
|
13
|
-
const t = await getTranslations('
|
|
13
|
+
const t = await getTranslations('devtools');
|
|
14
14
|
const tCommon = await getTranslations('common');
|
|
15
15
|
|
|
16
16
|
const sections = [
|
|
@@ -19,7 +19,7 @@ interface DevTestsPageProps {
|
|
|
19
19
|
*/
|
|
20
20
|
export default async function DevTestsPage({ params }: DevTestsPageProps) {
|
|
21
21
|
const { path } = await params;
|
|
22
|
-
const t = await getTranslations("
|
|
22
|
+
const t = await getTranslations("devtools.tests");
|
|
23
23
|
|
|
24
24
|
// Convert path array to string (e.g., ['auth', 'login.bdd.md'] -> 'auth/login.bdd.md')
|
|
25
25
|
const initialPath = path?.join("/") || null;
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"delete": "Löschen",
|
|
9
9
|
"edit": "Bearbeiten",
|
|
10
10
|
"create": "Erstellen",
|
|
11
|
-
"search":
|
|
11
|
+
"search": {
|
|
12
|
+
"placeholder": "Suchen...",
|
|
13
|
+
"label": "Suchen"
|
|
14
|
+
},
|
|
12
15
|
"noResults": "Keine Ergebnisse gefunden",
|
|
13
16
|
"confirm": "Bestätigen",
|
|
14
17
|
"back": "Zurück",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import analytics from './analytics.json'
|
|
2
|
+
import common from './common.json'
|
|
3
|
+
import features from './features.json'
|
|
4
|
+
import home from './home.json'
|
|
5
|
+
import navigation from './navigation.json'
|
|
6
|
+
import public_ from './public.json'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
analytics,
|
|
10
|
+
common,
|
|
11
|
+
features,
|
|
12
|
+
home,
|
|
13
|
+
navigation,
|
|
14
|
+
public: public_
|
|
15
|
+
} as const
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import analytics from './analytics.json'
|
|
2
|
+
import common from './common.json'
|
|
3
|
+
import features from './features.json'
|
|
4
|
+
import home from './home.json'
|
|
5
|
+
import navigation from './navigation.json'
|
|
6
|
+
import public_ from './public.json'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
analytics,
|
|
10
|
+
common,
|
|
11
|
+
features,
|
|
12
|
+
home,
|
|
13
|
+
navigation,
|
|
14
|
+
public: public_
|
|
15
|
+
} as const
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"delete": "Eliminar",
|
|
9
9
|
"edit": "Editar",
|
|
10
10
|
"create": "Crear",
|
|
11
|
-
"search":
|
|
11
|
+
"search": {
|
|
12
|
+
"placeholder": "Buscar...",
|
|
13
|
+
"label": "Buscar"
|
|
14
|
+
},
|
|
12
15
|
"noResults": "No se encontraron resultados",
|
|
13
16
|
"confirm": "Confirmar",
|
|
14
17
|
"back": "Volver",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import analytics from './analytics.json'
|
|
2
|
+
import common from './common.json'
|
|
3
|
+
import features from './features.json'
|
|
4
|
+
import home from './home.json'
|
|
5
|
+
import navigation from './navigation.json'
|
|
6
|
+
import public_ from './public.json'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
analytics,
|
|
10
|
+
common,
|
|
11
|
+
features,
|
|
12
|
+
home,
|
|
13
|
+
navigation,
|
|
14
|
+
public: public_
|
|
15
|
+
} as const
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"delete": "Supprimer",
|
|
9
9
|
"edit": "Modifier",
|
|
10
10
|
"create": "Créer",
|
|
11
|
-
"search":
|
|
11
|
+
"search": {
|
|
12
|
+
"placeholder": "Rechercher...",
|
|
13
|
+
"label": "Rechercher"
|
|
14
|
+
},
|
|
12
15
|
"noResults": "Aucun résultat trouvé",
|
|
13
16
|
"confirm": "Confirmer",
|
|
14
17
|
"back": "Retour",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import analytics from './analytics.json'
|
|
2
|
+
import common from './common.json'
|
|
3
|
+
import features from './features.json'
|
|
4
|
+
import home from './home.json'
|
|
5
|
+
import navigation from './navigation.json'
|
|
6
|
+
import public_ from './public.json'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
analytics,
|
|
10
|
+
common,
|
|
11
|
+
features,
|
|
12
|
+
home,
|
|
13
|
+
navigation,
|
|
14
|
+
public: public_
|
|
15
|
+
} as const
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import analytics from './analytics.json'
|
|
2
|
+
import common from './common.json'
|
|
3
|
+
import features from './features.json'
|
|
4
|
+
import home from './home.json'
|
|
5
|
+
import navigation from './navigation.json'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
analytics,
|
|
9
|
+
common,
|
|
10
|
+
features,
|
|
11
|
+
home,
|
|
12
|
+
navigation
|
|
13
|
+
} as const
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"delete": "Excluir",
|
|
9
9
|
"edit": "Editar",
|
|
10
10
|
"create": "Criar",
|
|
11
|
-
"search":
|
|
11
|
+
"search": {
|
|
12
|
+
"placeholder": "Pesquisar...",
|
|
13
|
+
"label": "Pesquisar"
|
|
14
|
+
},
|
|
12
15
|
"noResults": "Nenhum resultado encontrado",
|
|
13
16
|
"confirm": "Confirmar",
|
|
14
17
|
"back": "Voltar",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import analytics from './analytics.json'
|
|
2
|
+
import common from './common.json'
|
|
3
|
+
import features from './features.json'
|
|
4
|
+
import home from './home.json'
|
|
5
|
+
import navigation from './navigation.json'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
analytics,
|
|
9
|
+
common,
|
|
10
|
+
features,
|
|
11
|
+
home,
|
|
12
|
+
navigation
|
|
13
|
+
} as const
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
IMPORTS
|
|
11
11
|
============================================= */
|
|
12
12
|
@import "tailwindcss";
|
|
13
|
-
@import "@nextsparkjs/core/styles/ui.css";
|
|
14
13
|
@import "@nextsparkjs/core/styles/utilities.css";
|
|
15
14
|
@import "@nextsparkjs/core/styles/docs.css";
|
|
16
15
|
@source "../../../**/*.{js,ts,jsx,tsx}";
|
|
16
|
+
/* Core package: monorepo (short path) + npm projects (long path) */
|
|
17
|
+
@source "../node_modules/@nextsparkjs/core/dist/**/*.js";
|
|
18
|
+
@source "../../../../node_modules/@nextsparkjs/core/dist/**/*.js";
|
|
17
19
|
|
|
18
20
|
/* =============================================
|
|
19
21
|
THEME VARIABLES - LIGHT MODE (OKLCH)
|
|
@@ -79,7 +79,7 @@ export function PostContentBlock({
|
|
|
79
79
|
|
|
80
80
|
// Build section classes with background
|
|
81
81
|
const sectionClasses = buildSectionClasses(
|
|
82
|
-
'py-16 px-4 md:py-24',
|
|
82
|
+
'py-16 px-4 @md:py-24',
|
|
83
83
|
{ backgroundColor, className }
|
|
84
84
|
)
|
|
85
85
|
|
|
@@ -119,7 +119,7 @@ export function PostContentBlock({
|
|
|
119
119
|
{/* Optional Section Title */}
|
|
120
120
|
{title && (
|
|
121
121
|
<div className={cn('mb-12 text-center', maxWidthClasses[maxWidth], 'mx-auto')}>
|
|
122
|
-
<h2 className="text-4xl font-bold md:text-5xl lg:text-6xl tracking-tight">
|
|
122
|
+
<h2 className="text-4xl font-bold @md:text-5xl @lg:text-6xl tracking-tight">
|
|
123
123
|
{title}
|
|
124
124
|
</h2>
|
|
125
125
|
</div>
|
|
@@ -83,13 +83,13 @@ export function HeroBlock({
|
|
|
83
83
|
alignmentClasses[alignment]
|
|
84
84
|
)}>
|
|
85
85
|
{title && (
|
|
86
|
-
<h1 className="mb-6 text-5xl font-bold leading-tight md:text-6xl lg:text-7xl">
|
|
86
|
+
<h1 className="mb-6 text-5xl font-bold leading-tight @md:text-6xl @lg:text-7xl">
|
|
87
87
|
{title}
|
|
88
88
|
</h1>
|
|
89
89
|
)}
|
|
90
90
|
|
|
91
91
|
{displayContent && (
|
|
92
|
-
<p className="mb-8 text-xl md:text-2xl opacity-90 max-w-2xl">
|
|
92
|
+
<p className="mb-8 text-xl @md:text-2xl opacity-90 max-w-2xl">
|
|
93
93
|
{displayContent}
|
|
94
94
|
</p>
|
|
95
95
|
)}
|
|
@@ -10,6 +10,11 @@ const withNextIntl = createNextIntlPlugin('./i18n.ts');
|
|
|
10
10
|
|
|
11
11
|
/** @type {import('next').NextConfig} */
|
|
12
12
|
const nextConfig = {
|
|
13
|
+
// Ignore TypeScript build errors - needed until DTS generation is enabled for @nextsparkjs/core
|
|
14
|
+
// Without this, production builds fail due to missing declaration files for deep imports
|
|
15
|
+
typescript: {
|
|
16
|
+
ignoreBuildErrors: true,
|
|
17
|
+
},
|
|
13
18
|
transpilePackages: ['@nextsparkjs/core'],
|
|
14
19
|
serverExternalPackages: ['handlebars'],
|
|
15
20
|
experimental: {
|
|
@@ -142,8 +147,9 @@ const nextConfig = {
|
|
|
142
147
|
"font-src 'self' data:",
|
|
143
148
|
// wss: needed for Next.js hot reload in development
|
|
144
149
|
`connect-src 'self' https://api.stripe.com${!isProduction ? ' wss:' : ''}`,
|
|
145
|
-
"frame-src https://js.stripe.com https://hooks.stripe.com",
|
|
146
|
-
|
|
150
|
+
"frame-src 'self' https://js.stripe.com https://hooks.stripe.com",
|
|
151
|
+
// Allow embedding in iframes from same origin (needed for page builder preview)
|
|
152
|
+
"frame-ancestors 'self'",
|
|
147
153
|
"object-src 'none'",
|
|
148
154
|
"base-uri 'self'",
|
|
149
155
|
// CSP violation reporting - sends violations to /api/csp-report
|
|
@@ -165,8 +171,9 @@ const nextConfig = {
|
|
|
165
171
|
value: 'nosniff'
|
|
166
172
|
},
|
|
167
173
|
{
|
|
174
|
+
// SAMEORIGIN allows same-origin iframes (needed for page builder preview)
|
|
168
175
|
key: 'X-Frame-Options',
|
|
169
|
-
value: '
|
|
176
|
+
value: 'SAMEORIGIN'
|
|
170
177
|
},
|
|
171
178
|
// X-XSS-Protection is deprecated but kept for legacy browser support
|
|
172
179
|
// Modern browsers use CSP instead
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* NextSpark
|
|
2
|
+
* NextSpark Proxy (Next.js 16+)
|
|
3
3
|
*
|
|
4
4
|
* Handles authentication, route protection, and user context injection.
|
|
5
|
+
* Note: In Next.js 16, "middleware" was renamed to "proxy" with nodejs runtime.
|
|
5
6
|
*
|
|
6
7
|
* Key responsibilities:
|
|
7
8
|
* 1. Theme middleware override support
|
|
@@ -14,7 +15,6 @@
|
|
|
14
15
|
*/
|
|
15
16
|
import { betterFetch } from '@better-fetch/fetch'
|
|
16
17
|
import { NextRequest, NextResponse } from 'next/server'
|
|
17
|
-
// Edge-compatible imports (do NOT use lib/services or lib/auth - they have Node.js dependencies)
|
|
18
18
|
import {
|
|
19
19
|
hasThemeMiddleware,
|
|
20
20
|
executeThemeMiddleware,
|
|
@@ -22,8 +22,7 @@ import {
|
|
|
22
22
|
} from '@nextsparkjs/core/lib/middleware'
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Session type for
|
|
26
|
-
* We can't import from @nextsparkjs/core/lib/auth because it has Node.js dependencies
|
|
25
|
+
* Session type for proxy (inline definition)
|
|
27
26
|
*/
|
|
28
27
|
interface Session {
|
|
29
28
|
user: {
|
|
@@ -65,7 +64,7 @@ function isPublicPath(pathname: string): boolean {
|
|
|
65
64
|
)
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
export async function
|
|
67
|
+
export async function proxy(request: NextRequest) {
|
|
69
68
|
const { pathname } = request.nextUrl
|
|
70
69
|
|
|
71
70
|
// 1. Check for theme middleware override
|
|
@@ -178,7 +177,7 @@ export async function middleware(request: NextRequest) {
|
|
|
178
177
|
request: { headers: requestHeaders },
|
|
179
178
|
})
|
|
180
179
|
} catch (error) {
|
|
181
|
-
console.error('
|
|
180
|
+
console.error('Proxy error:', error)
|
|
182
181
|
const loginUrl = new URL('/login', request.url)
|
|
183
182
|
loginUrl.searchParams.set('callbackUrl', pathname)
|
|
184
183
|
return NextResponse.redirect(loginUrl)
|
package/globals.css
CHANGED
|
@@ -292,6 +292,60 @@ body {
|
|
|
292
292
|
@apply my-8 border-border;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
/* =============================================
|
|
296
|
+
SKELETON - INP OPTIMIZED ANIMATIONS
|
|
297
|
+
High-performance skeleton loading states
|
|
298
|
+
============================================= */
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* GPU-accelerated skeleton pulse animation
|
|
302
|
+
* Uses opacity with will-change hint for smooth GPU-composited animation
|
|
303
|
+
* Respects prefers-reduced-motion for accessibility
|
|
304
|
+
*/
|
|
305
|
+
@keyframes skeleton-pulse {
|
|
306
|
+
0%, 100% {
|
|
307
|
+
opacity: 1;
|
|
308
|
+
}
|
|
309
|
+
50% {
|
|
310
|
+
opacity: 0.5;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* Skeleton animation class - GPU accelerated */
|
|
315
|
+
.animate-skeleton-pulse {
|
|
316
|
+
animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
317
|
+
will-change: opacity;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Respect reduced motion preference */
|
|
321
|
+
@media (prefers-reduced-motion: reduce) {
|
|
322
|
+
.animate-skeleton-pulse {
|
|
323
|
+
animation: none;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* CSS Containment for skeleton elements
|
|
329
|
+
* Isolates layout/paint calculations to improve INP
|
|
330
|
+
*/
|
|
331
|
+
.skeleton-contained {
|
|
332
|
+
contain: content;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Skeleton container with content-visibility optimization
|
|
337
|
+
* Skips rendering of off-screen skeleton items
|
|
338
|
+
*/
|
|
339
|
+
.skeleton-container {
|
|
340
|
+
contain: layout style;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* Apply content-visibility to direct children for virtualization effect */
|
|
344
|
+
.skeleton-container > * {
|
|
345
|
+
content-visibility: auto;
|
|
346
|
+
contain-intrinsic-size: auto 100px;
|
|
347
|
+
}
|
|
348
|
+
|
|
295
349
|
/* =============================================
|
|
296
350
|
THEME SYSTEM - BUILD-TIME LOADING
|
|
297
351
|
Custom theme CSS is automatically injected based on activeTheme config
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ambient type declarations for @nextsparkjs/core entity configs
|
|
3
|
+
*
|
|
4
|
+
* These declarations provide TypeScript with type information for
|
|
5
|
+
* deep imports to entity config files when DTS generation is disabled.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This file must NOT have any imports to work as global declarations.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// EntityConfig type for reference (simplified version for ambient declarations)
|
|
11
|
+
interface AmbientEntityConfig {
|
|
12
|
+
slug: string
|
|
13
|
+
enabled: boolean
|
|
14
|
+
names: {
|
|
15
|
+
singular: string
|
|
16
|
+
plural: string
|
|
17
|
+
}
|
|
18
|
+
icon?: unknown
|
|
19
|
+
access?: {
|
|
20
|
+
public?: boolean
|
|
21
|
+
api?: boolean
|
|
22
|
+
metadata?: boolean
|
|
23
|
+
shared?: boolean
|
|
24
|
+
basePath?: string
|
|
25
|
+
}
|
|
26
|
+
ui?: {
|
|
27
|
+
dashboard?: {
|
|
28
|
+
showInMenu?: boolean
|
|
29
|
+
showInTopbar?: boolean
|
|
30
|
+
}
|
|
31
|
+
public?: {
|
|
32
|
+
hasArchivePage?: boolean
|
|
33
|
+
hasSinglePage?: boolean
|
|
34
|
+
}
|
|
35
|
+
features?: {
|
|
36
|
+
searchable?: boolean
|
|
37
|
+
sortable?: boolean
|
|
38
|
+
filterable?: boolean
|
|
39
|
+
bulkOperations?: boolean
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
table?: {
|
|
43
|
+
name?: string
|
|
44
|
+
columns?: unknown[]
|
|
45
|
+
relations?: unknown
|
|
46
|
+
}
|
|
47
|
+
schemas?: {
|
|
48
|
+
create?: unknown
|
|
49
|
+
update?: unknown
|
|
50
|
+
}
|
|
51
|
+
fields?: unknown[]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Core entity: patterns
|
|
55
|
+
declare module '@nextsparkjs/core/entities/patterns/patterns.config' {
|
|
56
|
+
export const patternsEntityConfig: AmbientEntityConfig
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Add more core entities here as needed
|