@goodfellow-cms/next 0.3.0 → 0.5.0
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/README.md +2 -2
- package/bin/goodfellow-next.js +249 -11
- package/dist/admin.d.ts +26 -9
- package/dist/admin.js +89 -18
- package/dist/components.d.ts +21 -0
- package/dist/components.js +27 -1
- package/dist/config.d.ts +11 -0
- package/dist/config.js +84 -10
- package/dist/dev-editor-DiPKrIAS.js +124 -0
- package/dist/editor.d.ts +14 -0
- package/dist/editor.js +32 -0
- package/dist/export.d.ts +102 -3
- package/dist/export.js +218 -12
- package/dist/index.d.ts +12 -4
- package/dist/index.js +86 -41
- package/dist/server.d.ts +57 -0
- package/dist/server.js +45 -0
- package/dist/site-files-BeLnLxCl.js +50 -0
- package/package.json +23 -9
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/site-files.ts
|
|
2
|
+
/** The release whose Next.js sites have the editor's sandboxed frames at `app/admin/editor/`. */
|
|
3
|
+
const FRAMES_RELEASE = "0.5.0";
|
|
4
|
+
/** `app/admin/page.tsx` as every release before the frames wrote it, loading the site's config itself. */
|
|
5
|
+
const CLIENT_ADMIN_PAGE = `"use client";
|
|
6
|
+
|
|
7
|
+
import { GoodfellowAdmin } from "@goodfellow-cms/next/admin";
|
|
8
|
+
import config from "@/goodfellow.config";
|
|
9
|
+
|
|
10
|
+
export default function AdminPage() {
|
|
11
|
+
return <GoodfellowAdmin config={config} />;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
const ADMIN_PAGE = `import { GoodfellowAdmin } from "@goodfellow-cms/next/admin";
|
|
15
|
+
import { site } from "@/lib/site";
|
|
16
|
+
|
|
17
|
+
// The admin panel's page never loads the site's config: it's told about the site's blocks here, on the server,
|
|
18
|
+
// and the blocks themselves run in the editor's frames, at /admin/editor/.
|
|
19
|
+
export default function AdminPage() {
|
|
20
|
+
return <GoodfellowAdmin site={site.admin()} />;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const EDITOR_PAGE = `"use client";
|
|
24
|
+
|
|
25
|
+
import { GoodfellowEditor } from "@goodfellow-cms/next/editor";
|
|
26
|
+
import config from "@/goodfellow.config";
|
|
27
|
+
|
|
28
|
+
// The editor's frames: Puck and the site's blocks, sandboxed away from the admin panel's page.
|
|
29
|
+
export default function EditorPage() {
|
|
30
|
+
return <GoodfellowEditor config={config} />;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
/**
|
|
34
|
+
* The Next.js starter's files that `goodfellow-next update` keeps up to date
|
|
35
|
+
* where nobody has changed them, as the starter now has them. A test checks
|
|
36
|
+
* they match `templates/next`.
|
|
37
|
+
*/
|
|
38
|
+
const NEXT_SITE_FILES = [{
|
|
39
|
+
path: "app/admin/page.tsx",
|
|
40
|
+
since: FRAMES_RELEASE,
|
|
41
|
+
content: ADMIN_PAGE,
|
|
42
|
+
earlier: [CLIENT_ADMIN_PAGE]
|
|
43
|
+
}, {
|
|
44
|
+
path: "app/admin/editor/page.tsx",
|
|
45
|
+
since: FRAMES_RELEASE,
|
|
46
|
+
content: EDITOR_PAGE,
|
|
47
|
+
earlier: []
|
|
48
|
+
}];
|
|
49
|
+
//#endregion
|
|
50
|
+
export { EDITOR_PAGE as n, NEXT_SITE_FILES as r, ADMIN_PAGE as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodfellow-cms/next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Goodfellow pages and the admin panel in a Next.js site.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goodfellow",
|
|
@@ -38,11 +38,21 @@
|
|
|
38
38
|
"import": "./dist/admin.js",
|
|
39
39
|
"default": "./dist/admin.js"
|
|
40
40
|
},
|
|
41
|
+
"./editor": {
|
|
42
|
+
"types": "./dist/editor.d.ts",
|
|
43
|
+
"import": "./dist/editor.js",
|
|
44
|
+
"default": "./dist/editor.js"
|
|
45
|
+
},
|
|
41
46
|
"./export": {
|
|
42
47
|
"types": "./dist/export.d.ts",
|
|
43
48
|
"import": "./dist/export.js",
|
|
44
49
|
"default": "./dist/export.js"
|
|
45
50
|
},
|
|
51
|
+
"./server": {
|
|
52
|
+
"types": "./dist/server.d.ts",
|
|
53
|
+
"import": "./dist/server.js",
|
|
54
|
+
"default": "./dist/server.js"
|
|
55
|
+
},
|
|
46
56
|
"./package.json": "./package.json"
|
|
47
57
|
},
|
|
48
58
|
"bin": {
|
|
@@ -53,28 +63,32 @@
|
|
|
53
63
|
"dist"
|
|
54
64
|
],
|
|
55
65
|
"dependencies": {
|
|
56
|
-
"@goodfellow-cms/
|
|
57
|
-
"@goodfellow-cms/
|
|
66
|
+
"@goodfellow-cms/ai": "0.5.0",
|
|
67
|
+
"@goodfellow-cms/core": "0.5.0",
|
|
68
|
+
"@goodfellow-cms/react": "0.5.0",
|
|
69
|
+
"rolldown": "1.2.12"
|
|
58
70
|
},
|
|
59
71
|
"peerDependencies": {
|
|
72
|
+
"@goodfellow-cms/admin": "0.5.0",
|
|
60
73
|
"@puckeditor/core": "0.23.0",
|
|
61
74
|
"next": "^16.0.0",
|
|
62
75
|
"react": "^19.0.0",
|
|
63
|
-
"react-dom": "^19.0.0"
|
|
64
|
-
"@goodfellow-cms/admin": "0.3.0"
|
|
76
|
+
"react-dom": "^19.0.0"
|
|
65
77
|
},
|
|
66
78
|
"devDependencies": {
|
|
79
|
+
"@goodfellow-cms/admin": "0.5.0",
|
|
80
|
+
"@goodfellow-cms/github": "0.5.0",
|
|
81
|
+
"@goodfellow-cms/gitlab": "0.5.0",
|
|
67
82
|
"@puckeditor/core": "0.23.0",
|
|
68
83
|
"@tailwindcss/browser": "4.3.3",
|
|
69
84
|
"@types/react": "^19.2.0",
|
|
70
85
|
"@types/react-dom": "^19.2.0",
|
|
71
|
-
"next": "16.3
|
|
86
|
+
"next": "16.4.3",
|
|
72
87
|
"react": "19.3.0",
|
|
73
|
-
"react-dom": "19.3.0"
|
|
74
|
-
"@goodfellow-cms/admin": "0.3.0"
|
|
88
|
+
"react-dom": "19.3.0"
|
|
75
89
|
},
|
|
76
90
|
"engines": {
|
|
77
|
-
"node": ">=
|
|
91
|
+
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
|
|
78
92
|
},
|
|
79
93
|
"publishConfig": {
|
|
80
94
|
"access": "public"
|