@cmssy/remix 12.14.1 → 13.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 +7 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ function createCmssyLoader(config, options = {}) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
const segments = url.pathname.split("/").filter(Boolean);
|
|
37
|
-
const positions = options.positions ??
|
|
37
|
+
const positions = options.positions ?? internal.layoutRegionIds(config.layout);
|
|
38
38
|
const blocks = options.blocks ?? [];
|
|
39
39
|
const headerLocale = request.headers.get(internal.CMSSY_LOCALE_HEADER) ?? void 0;
|
|
40
40
|
const slot = await react.resolveCmssyLayoutSlot(config, {
|
|
@@ -84,7 +84,8 @@ function createCmssyLoader(config, options = {}) {
|
|
|
84
84
|
enabledLocales: slot.enabledLocales,
|
|
85
85
|
isEdit,
|
|
86
86
|
editorOrigin: core.resolveEditorOrigin(config.editorOrigin),
|
|
87
|
-
editorData
|
|
87
|
+
editorData,
|
|
88
|
+
...config.layout ? { layoutRegions: config.layout.regions } : {}
|
|
88
89
|
};
|
|
89
90
|
};
|
|
90
91
|
}
|
|
@@ -125,6 +126,10 @@ Object.defineProperty(exports, "defineCmssyConfig", {
|
|
|
125
126
|
enumerable: true,
|
|
126
127
|
get: function () { return core.defineCmssyConfig; }
|
|
127
128
|
});
|
|
129
|
+
Object.defineProperty(exports, "defineCmssyLayout", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () { return core.defineCmssyLayout; }
|
|
132
|
+
});
|
|
128
133
|
Object.defineProperty(exports, "isVerifiedEditUrl", {
|
|
129
134
|
enumerable: true,
|
|
130
135
|
get: function () { return core.isVerifiedEditUrl; }
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CmssyPageData, CmssyLayoutGroup, RetryOption, CmssyConfig } from '@cmssy/core';
|
|
2
|
-
export { CMSSY_LOCALE_HEADER, CmssyBlockContext, CmssyConfig, CmssyEnvConfig, CmssyLayoutGroup, CmssyPageData, CmssyRetryMode, CmssyWebhookError, CmssyWebhookEvent, RetryOption, RetryPolicy, VerifyCmssyWebhookOptions, createCmssyClient, defineCmssyConfig, isVerifiedEditUrl, localizeHref, verifyCmssyWebhook } from '@cmssy/core';
|
|
1
|
+
import { CmssyPageData, CmssyLayoutGroup, LayoutRegion, RetryOption, CmssyConfig } from '@cmssy/core';
|
|
2
|
+
export { CMSSY_LOCALE_HEADER, CmssyBlockContext, CmssyConfig, CmssyEnvConfig, CmssyLayout, CmssyLayoutGroup, CmssyPageData, CmssyRegion, CmssyRegionOf, CmssyRetryMode, CmssyWebhookError, CmssyWebhookEvent, LayoutRegion, RetryOption, RetryPolicy, VerifyCmssyWebhookOptions, createCmssyClient, defineCmssyConfig, defineCmssyLayout, isVerifiedEditUrl, localizeHref, verifyCmssyWebhook } from '@cmssy/core';
|
|
3
3
|
import { BlockDefinition } from '@cmssy/react';
|
|
4
4
|
|
|
5
5
|
interface CmssyRouteData {
|
|
@@ -12,6 +12,7 @@ interface CmssyRouteData {
|
|
|
12
12
|
editorOrigin: string | string[];
|
|
13
13
|
diagnostics?: string;
|
|
14
14
|
editorData?: Record<string, CmssyLayoutEditorData>;
|
|
15
|
+
layoutRegions?: readonly LayoutRegion[];
|
|
15
16
|
}
|
|
16
17
|
interface CmssyLayoutEditorData {
|
|
17
18
|
data: Record<string, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CmssyPageData, CmssyLayoutGroup, RetryOption, CmssyConfig } from '@cmssy/core';
|
|
2
|
-
export { CMSSY_LOCALE_HEADER, CmssyBlockContext, CmssyConfig, CmssyEnvConfig, CmssyLayoutGroup, CmssyPageData, CmssyRetryMode, CmssyWebhookError, CmssyWebhookEvent, RetryOption, RetryPolicy, VerifyCmssyWebhookOptions, createCmssyClient, defineCmssyConfig, isVerifiedEditUrl, localizeHref, verifyCmssyWebhook } from '@cmssy/core';
|
|
1
|
+
import { CmssyPageData, CmssyLayoutGroup, LayoutRegion, RetryOption, CmssyConfig } from '@cmssy/core';
|
|
2
|
+
export { CMSSY_LOCALE_HEADER, CmssyBlockContext, CmssyConfig, CmssyEnvConfig, CmssyLayout, CmssyLayoutGroup, CmssyPageData, CmssyRegion, CmssyRegionOf, CmssyRetryMode, CmssyWebhookError, CmssyWebhookEvent, LayoutRegion, RetryOption, RetryPolicy, VerifyCmssyWebhookOptions, createCmssyClient, defineCmssyConfig, defineCmssyLayout, isVerifiedEditUrl, localizeHref, verifyCmssyWebhook } from '@cmssy/core';
|
|
3
3
|
import { BlockDefinition } from '@cmssy/react';
|
|
4
4
|
|
|
5
5
|
interface CmssyRouteData {
|
|
@@ -12,6 +12,7 @@ interface CmssyRouteData {
|
|
|
12
12
|
editorOrigin: string | string[];
|
|
13
13
|
diagnostics?: string;
|
|
14
14
|
editorData?: Record<string, CmssyLayoutEditorData>;
|
|
15
|
+
layoutRegions?: readonly LayoutRegion[];
|
|
15
16
|
}
|
|
16
17
|
interface CmssyLayoutEditorData {
|
|
17
18
|
data: Record<string, unknown>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isVerifiedEditUrl, CMSSY_EDIT_QUERY_PARAM, CMSSY_SECRET_QUERY_PARAM, resolveEditorOrigin } from '@cmssy/core';
|
|
2
|
-
export { CMSSY_LOCALE_HEADER, CmssyWebhookError, createCmssyClient, defineCmssyConfig, isVerifiedEditUrl, localizeHref, verifyCmssyWebhook } from '@cmssy/core';
|
|
3
|
-
import { isDevelopment, resolveSiteLocales, CMSSY_LOCALE_HEADER, fetchPage, cmssyCspHeaders } from '@cmssy/core/internal';
|
|
2
|
+
export { CMSSY_LOCALE_HEADER, CmssyWebhookError, createCmssyClient, defineCmssyConfig, defineCmssyLayout, isVerifiedEditUrl, localizeHref, verifyCmssyWebhook } from '@cmssy/core';
|
|
3
|
+
import { isDevelopment, resolveSiteLocales, layoutRegionIds, CMSSY_LOCALE_HEADER, fetchPage, cmssyCspHeaders } from '@cmssy/core/internal';
|
|
4
4
|
import { resolveCmssyLayoutSlot } from '@cmssy/react';
|
|
5
5
|
import { useMatches } from 'react-router';
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ function createCmssyLoader(config, options = {}) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
const segments = url.pathname.split("/").filter(Boolean);
|
|
36
|
-
const positions = options.positions ??
|
|
36
|
+
const positions = options.positions ?? layoutRegionIds(config.layout);
|
|
37
37
|
const blocks = options.blocks ?? [];
|
|
38
38
|
const headerLocale = request.headers.get(CMSSY_LOCALE_HEADER) ?? void 0;
|
|
39
39
|
const slot = await resolveCmssyLayoutSlot(config, {
|
|
@@ -83,7 +83,8 @@ function createCmssyLoader(config, options = {}) {
|
|
|
83
83
|
enabledLocales: slot.enabledLocales,
|
|
84
84
|
isEdit,
|
|
85
85
|
editorOrigin: resolveEditorOrigin(config.editorOrigin),
|
|
86
|
-
editorData
|
|
86
|
+
editorData,
|
|
87
|
+
...config.layout ? { layoutRegions: config.layout.regions } : {}
|
|
87
88
|
};
|
|
88
89
|
};
|
|
89
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/remix",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.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": "^13.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": "13.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@cmssy/core": "
|
|
65
|
+
"@cmssy/core": "13.0.0"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "tsup",
|