@cmssy/remix 14.2.0 → 15.0.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/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -35,11 +35,11 @@ function createCmssyLoader(config, options = {}) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
const segments = url.pathname.split("/").filter(Boolean);
|
|
38
|
-
const
|
|
38
|
+
const regions = options.regions ?? internal.layoutRegionIds(config.layout);
|
|
39
39
|
const blocks = options.blocks ?? [];
|
|
40
40
|
const headerLocale = request.headers.get(internal.CMSSY_LOCALE_HEADER) ?? void 0;
|
|
41
41
|
const slot = await react.resolveCmssyLayoutSlot(config, {
|
|
42
|
-
|
|
42
|
+
region: regions[0] ?? "header",
|
|
43
43
|
blocks,
|
|
44
44
|
editMode: isEdit,
|
|
45
45
|
path: segments,
|
|
@@ -54,14 +54,14 @@ function createCmssyLoader(config, options = {}) {
|
|
|
54
54
|
let editorData;
|
|
55
55
|
if (isEdit && slot.data && slot.resolvedContent) {
|
|
56
56
|
editorData = {
|
|
57
|
-
[
|
|
57
|
+
[regions[0] ?? "header"]: {
|
|
58
58
|
data: slot.data,
|
|
59
59
|
resolvedContent: slot.resolvedContent
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
for (const
|
|
62
|
+
for (const region of regions.slice(1)) {
|
|
63
63
|
const extra = await react.resolveCmssyLayoutSlot(config, {
|
|
64
|
-
|
|
64
|
+
region,
|
|
65
65
|
blocks,
|
|
66
66
|
editMode: true,
|
|
67
67
|
path: segments,
|
|
@@ -70,7 +70,7 @@ function createCmssyLoader(config, options = {}) {
|
|
|
70
70
|
retry
|
|
71
71
|
});
|
|
72
72
|
if (extra.data && extra.resolvedContent) {
|
|
73
|
-
editorData[
|
|
73
|
+
editorData[region] = {
|
|
74
74
|
data: extra.data,
|
|
75
75
|
resolvedContent: extra.resolvedContent
|
|
76
76
|
};
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -35,11 +35,11 @@ function createCmssyLoader(config, options = {}) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
const segments = url.pathname.split("/").filter(Boolean);
|
|
38
|
-
const
|
|
38
|
+
const regions = options.regions ?? layoutRegionIds(config.layout);
|
|
39
39
|
const blocks = options.blocks ?? [];
|
|
40
40
|
const headerLocale = request.headers.get(CMSSY_LOCALE_HEADER) ?? void 0;
|
|
41
41
|
const slot = await resolveCmssyLayoutSlot(config, {
|
|
42
|
-
|
|
42
|
+
region: regions[0] ?? "header",
|
|
43
43
|
blocks,
|
|
44
44
|
editMode: isEdit,
|
|
45
45
|
path: segments,
|
|
@@ -54,14 +54,14 @@ function createCmssyLoader(config, options = {}) {
|
|
|
54
54
|
let editorData;
|
|
55
55
|
if (isEdit && slot.data && slot.resolvedContent) {
|
|
56
56
|
editorData = {
|
|
57
|
-
[
|
|
57
|
+
[regions[0] ?? "header"]: {
|
|
58
58
|
data: slot.data,
|
|
59
59
|
resolvedContent: slot.resolvedContent
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
for (const
|
|
62
|
+
for (const region of regions.slice(1)) {
|
|
63
63
|
const extra = await resolveCmssyLayoutSlot(config, {
|
|
64
|
-
|
|
64
|
+
region,
|
|
65
65
|
blocks,
|
|
66
66
|
editMode: true,
|
|
67
67
|
path: segments,
|
|
@@ -70,7 +70,7 @@ function createCmssyLoader(config, options = {}) {
|
|
|
70
70
|
retry
|
|
71
71
|
});
|
|
72
72
|
if (extra.data && extra.resolvedContent) {
|
|
73
|
-
editorData[
|
|
73
|
+
editorData[region] = {
|
|
74
74
|
data: extra.data,
|
|
75
75
|
resolvedContent: extra.resolvedContent
|
|
76
76
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/remix",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "React Router 7 bindings for cmssy headless sites: page loader, framing CSP, sitemap and robots.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cmssy",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react-router": ">=7",
|
|
54
|
-
"@cmssy/react": "^
|
|
54
|
+
"@cmssy/react": "^15.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/node": "^20.0.0",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"tsup": "^8.3.0",
|
|
60
60
|
"typescript": "^5.6.0",
|
|
61
61
|
"vitest": "^2.1.0",
|
|
62
|
-
"@cmssy/react": "
|
|
62
|
+
"@cmssy/react": "15.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@cmssy/core": "
|
|
65
|
+
"@cmssy/core": "15.0.0"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "tsup",
|