@cmssy/cli 12.7.0 → 12.8.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { resolveCmssyLocale } from "@cmssy/core";
|
|
3
3
|
import { cmssy } from "@/cmssy.config";
|
|
4
|
+
import { SiteProviders } from "@/cmssy/site-providers";
|
|
4
5
|
|
|
5
6
|
type LayoutProps = {
|
|
6
7
|
children: ReactNode;
|
|
@@ -13,7 +14,9 @@ export default async function RootLayout({ children, params }: LayoutProps) {
|
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<html lang={locale}>
|
|
16
|
-
<body>
|
|
17
|
+
<body>
|
|
18
|
+
<SiteProviders>{children}</SiteProviders>
|
|
19
|
+
</body>
|
|
17
20
|
</html>
|
|
18
21
|
);
|
|
19
22
|
}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { resolveCmssyLocale } from "@cmssy/core";
|
|
3
3
|
import { cmssy } from "@/cmssy.config";
|
|
4
|
+
import { SiteProviders } from "@/cmssy/site-providers";
|
|
4
5
|
|
|
5
6
|
type LayoutProps = {
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
params: Promise<{ path?: string[] }>;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
|
-
export default async function EditRootLayout({
|
|
11
|
+
export default async function EditRootLayout({
|
|
12
|
+
children,
|
|
13
|
+
params,
|
|
14
|
+
}: LayoutProps) {
|
|
11
15
|
const { path } = await params;
|
|
12
16
|
const locale = await resolveCmssyLocale(cmssy, path);
|
|
13
17
|
|
|
14
18
|
return (
|
|
15
19
|
<html lang={locale}>
|
|
16
|
-
<body>
|
|
20
|
+
<body>
|
|
21
|
+
<SiteProviders>{children}</SiteProviders>
|
|
22
|
+
</body>
|
|
17
23
|
</html>
|
|
18
24
|
);
|
|
19
25
|
}
|
package/dist/index.js
CHANGED
|
@@ -187,6 +187,10 @@ var FRAMEWORKS = [
|
|
|
187
187
|
path: "cmssy/editable-layout.tsx",
|
|
188
188
|
purpose: "mounts header and footer through the edit bridge; without it the editor can select them and cannot fill them"
|
|
189
189
|
},
|
|
190
|
+
{
|
|
191
|
+
path: "cmssy/site-providers.tsx",
|
|
192
|
+
purpose: "the one place your own providers go - both roots render it, so a provider added here reaches the editor too"
|
|
193
|
+
},
|
|
190
194
|
{
|
|
191
195
|
path: "blocks/hero/block.ts",
|
|
192
196
|
purpose: "an example block: schema beside the component that reads it (loaders: docs/building-blocks/server-loaders.md)"
|
|
@@ -197,7 +201,7 @@ var FRAMEWORKS = [
|
|
|
197
201
|
},
|
|
198
202
|
{
|
|
199
203
|
path: "app/[[...path]]/layout.tsx",
|
|
200
|
-
purpose: "the public root layout; <html lang> comes from the route, so put your global CSS and metadata here"
|
|
204
|
+
purpose: "the public root layout; <html lang> comes from the route, so put your global CSS and metadata here, and your providers in cmssy/site-providers.tsx"
|
|
201
205
|
},
|
|
202
206
|
{
|
|
203
207
|
path: "app/[[...path]]/page.tsx",
|
|
@@ -205,7 +209,7 @@ var FRAMEWORKS = [
|
|
|
205
209
|
},
|
|
206
210
|
{
|
|
207
211
|
path: "app/cmssy-edit/[[...path]]/layout.tsx",
|
|
208
|
-
purpose: "the editor's root layout - a separate root, so CSS and metadata have to be repeated here"
|
|
212
|
+
purpose: "the editor's root layout - a separate root, so CSS and metadata have to be repeated here; anything only the public layout mounts is missing from every preview"
|
|
209
213
|
},
|
|
210
214
|
{
|
|
211
215
|
path: "app/cmssy-edit/[[...path]]/page.tsx",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/cli",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.8.0",
|
|
4
4
|
"description": "The cmssy CLI: `cmssy init` wires cmssy into an existing Next.js, Astro or React Router app; `cmssy link` connects it to a workspace and verifies the editor wiring.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cmssy",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"assets"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cmssy/core": "12.
|
|
30
|
+
"@cmssy/core": "12.8.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^20.0.0",
|