@nextsparkjs/core 0.1.0-beta.137 → 0.1.0-beta.139
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/array-field.d.ts.map +1 -1
- package/dist/components/dashboard/block-editor/array-field.js +11 -0
- package/dist/styles/classes.json +1 -1
- package/dist/templates/app/(public)/[...slug]/page.tsx +2 -0
- package/dist/templates/app/devtools/blocks/[slug]/page.tsx +1 -3
- package/dist/templates/app/layout.tsx +2 -10
- package/package.json +3 -2
- package/templates/app/(public)/[...slug]/page.tsx +2 -0
- package/templates/app/devtools/blocks/[slug]/page.tsx +1 -3
- package/templates/app/layout.tsx +2 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-field.d.ts","sourceRoot":"","sources":["../../../../src/components/dashboard/block-editor/array-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"array-field.d.ts","sourceRoot":"","sources":["../../../../src/components/dashboard/block-editor/array-field.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAG5D,UAAU,eAAe;IACvB,KAAK,EAAE,eAAe,CAAA;IACtB,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;CACrC;AAuDD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAkSrE"}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
SelectValue
|
|
15
15
|
} from "../../ui/select.js";
|
|
16
16
|
import { ImageUpload } from "../../ui/image-upload.js";
|
|
17
|
+
import { RichTextEditor } from "../../ui/rich-text-editor.js";
|
|
17
18
|
import { MediaLibrary } from "../../media/MediaLibrary.js";
|
|
18
19
|
import { Card, CardContent, CardHeader } from "../../ui/card.js";
|
|
19
20
|
import { ChevronUp, ChevronDown, Trash2, Plus, ImageIcon, X } from "lucide-react";
|
|
@@ -191,6 +192,16 @@ function ArrayField({ field, value, onChange }) {
|
|
|
191
192
|
fieldName: `${field.name}-${itemIndex}-${itemField.name}`
|
|
192
193
|
}
|
|
193
194
|
);
|
|
195
|
+
case "rich-text":
|
|
196
|
+
return /* @__PURE__ */ jsx(
|
|
197
|
+
RichTextEditor,
|
|
198
|
+
{
|
|
199
|
+
value: String(fieldValue),
|
|
200
|
+
onChange: (newValue) => handleItemFieldChange(itemIndex, itemField.name, newValue),
|
|
201
|
+
placeholder: itemField.placeholder,
|
|
202
|
+
"data-cy": sel("blockEditor.blockPropertiesPanel.form.arrayField.itemField", { name: field.name, index: itemIndex, field: itemField.name })
|
|
203
|
+
}
|
|
204
|
+
);
|
|
194
205
|
case "color":
|
|
195
206
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
196
207
|
/* @__PURE__ */ jsx(
|
package/dist/styles/classes.json
CHANGED
|
@@ -52,6 +52,8 @@ function getEntityConfigs(): Record<string, EntityConfig> {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// Enable ISR with 1 hour revalidation
|
|
55
|
+
// On Next.js 16 with cacheComponents, this is superseded by 'use cache' + cacheLife()
|
|
56
|
+
export const revalidate = 3600
|
|
55
57
|
|
|
56
58
|
interface PageProps {
|
|
57
59
|
params: Promise<{ slug: string[] }>
|
|
@@ -33,9 +33,7 @@ export default async function BlockDetailPage({ params }: BlockDetailPageProps)
|
|
|
33
33
|
* Generate static params for all blocks
|
|
34
34
|
*/
|
|
35
35
|
export async function generateStaticParams() {
|
|
36
|
-
|
|
37
|
-
if (keys.length === 0) return [{ slug: '_placeholder' }];
|
|
38
|
-
return keys.map((slug) => ({
|
|
36
|
+
return Object.keys(BLOCK_REGISTRY).map((slug) => ({
|
|
39
37
|
slug,
|
|
40
38
|
}));
|
|
41
39
|
}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Uses async data fetching for locale, messages, and theme mode.
|
|
5
|
-
* Compatible with all Next.js versions (15+, 16+).
|
|
6
|
-
*
|
|
7
|
-
* For PPR-optimized layout (requires Next.js 16.2.2+ with cacheComponents: true),
|
|
8
|
-
* see layout.ppr.tsx which uses pre-merged static imports for faster shell rendering.
|
|
9
|
-
*
|
|
2
|
+
* AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
10
3
|
* Generated by @nextspark/core
|
|
11
4
|
* Regenerate with: npx nextspark generate
|
|
12
5
|
*/
|
|
13
6
|
|
|
14
7
|
import type { Metadata } from "next"
|
|
15
|
-
import { Suspense } from "react"
|
|
16
8
|
import { Geist, Geist_Mono } from "next/font/google"
|
|
17
9
|
import { NextIntlClientProvider } from 'next-intl'
|
|
18
10
|
import { getMessages } from 'next-intl/server'
|
|
@@ -100,7 +92,7 @@ export default async function RootLayout({
|
|
|
100
92
|
<SubscriptionProvider>
|
|
101
93
|
<TranslationContextManager />
|
|
102
94
|
<main>{children}</main>
|
|
103
|
-
<
|
|
95
|
+
<Toaster position="bottom-left" />
|
|
104
96
|
</SubscriptionProvider>
|
|
105
97
|
</TeamProvider>
|
|
106
98
|
</QueryProvider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextsparkjs/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.139",
|
|
4
4
|
"description": "NextSpark - The complete SaaS framework for Next.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "NextSpark <hello@nextspark.dev>",
|
|
@@ -392,6 +392,7 @@
|
|
|
392
392
|
"typescript": "^5"
|
|
393
393
|
},
|
|
394
394
|
"dependencies": {
|
|
395
|
+
"@babel/runtime": "^7.0.0",
|
|
395
396
|
"@codemirror/lang-json": "^6.0.2",
|
|
396
397
|
"@dnd-kit/core": "^6.3.1",
|
|
397
398
|
"@dnd-kit/sortable": "^10.0.0",
|
|
@@ -462,7 +463,7 @@
|
|
|
462
463
|
"tailwind-merge": "^3.3.1",
|
|
463
464
|
"uuid": "^13.0.0",
|
|
464
465
|
"zod": "^4.1.5",
|
|
465
|
-
"@nextsparkjs/testing": "0.1.0-beta.
|
|
466
|
+
"@nextsparkjs/testing": "0.1.0-beta.139"
|
|
466
467
|
},
|
|
467
468
|
"scripts": {
|
|
468
469
|
"postinstall": "node scripts/postinstall.mjs || true",
|
|
@@ -52,6 +52,8 @@ function getEntityConfigs(): Record<string, EntityConfig> {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// Enable ISR with 1 hour revalidation
|
|
55
|
+
// On Next.js 16 with cacheComponents, this is superseded by 'use cache' + cacheLife()
|
|
56
|
+
export const revalidate = 3600
|
|
55
57
|
|
|
56
58
|
interface PageProps {
|
|
57
59
|
params: Promise<{ slug: string[] }>
|
|
@@ -33,9 +33,7 @@ export default async function BlockDetailPage({ params }: BlockDetailPageProps)
|
|
|
33
33
|
* Generate static params for all blocks
|
|
34
34
|
*/
|
|
35
35
|
export async function generateStaticParams() {
|
|
36
|
-
|
|
37
|
-
if (keys.length === 0) return [{ slug: '_placeholder' }];
|
|
38
|
-
return keys.map((slug) => ({
|
|
36
|
+
return Object.keys(BLOCK_REGISTRY).map((slug) => ({
|
|
39
37
|
slug,
|
|
40
38
|
}));
|
|
41
39
|
}
|
package/templates/app/layout.tsx
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Uses async data fetching for locale, messages, and theme mode.
|
|
5
|
-
* Compatible with all Next.js versions (15+, 16+).
|
|
6
|
-
*
|
|
7
|
-
* For PPR-optimized layout (requires Next.js 16.2.2+ with cacheComponents: true),
|
|
8
|
-
* see layout.ppr.tsx which uses pre-merged static imports for faster shell rendering.
|
|
9
|
-
*
|
|
2
|
+
* AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
10
3
|
* Generated by @nextspark/core
|
|
11
4
|
* Regenerate with: npx nextspark generate
|
|
12
5
|
*/
|
|
13
6
|
|
|
14
7
|
import type { Metadata } from "next"
|
|
15
|
-
import { Suspense } from "react"
|
|
16
8
|
import { Geist, Geist_Mono } from "next/font/google"
|
|
17
9
|
import { NextIntlClientProvider } from 'next-intl'
|
|
18
10
|
import { getMessages } from 'next-intl/server'
|
|
@@ -100,7 +92,7 @@ export default async function RootLayout({
|
|
|
100
92
|
<SubscriptionProvider>
|
|
101
93
|
<TranslationContextManager />
|
|
102
94
|
<main>{children}</main>
|
|
103
|
-
<
|
|
95
|
+
<Toaster position="bottom-left" />
|
|
104
96
|
</SubscriptionProvider>
|
|
105
97
|
</TeamProvider>
|
|
106
98
|
</QueryProvider>
|