@cmssy/next 8.0.0 → 8.0.2
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-D-mfavEO.d.cts → index-C7l1HgN0.d.cts} +1 -0
- package/dist/{index-D-mfavEO.d.ts → index-C7l1HgN0.d.ts} +1 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/server.cjs +11 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +12 -2
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_LOCALE_HEADER, CMSSY_SECRET_QUERY_PARAM, CMSSY_SESSION_COOKIE, CmssyAuthConfig, CmssyConfig, CmssyEnvConfig, CmssyPageData, CmssyPageMeta, CmssyPageSummary, DEFAULT_CMSSY_EDITOR_ORIGINS, assertAuthConfig, defineCmssyConfig, resolveEditorOrigin } from '@cmssy/core';
|
|
2
|
-
export { C as CmssyEditorProps, a as CreateCmssyPageOptions } from './index-
|
|
2
|
+
export { C as CmssyEditorProps, a as CreateCmssyPageOptions } from './index-C7l1HgN0.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@cmssy/react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_LOCALE_HEADER, CMSSY_SECRET_QUERY_PARAM, CMSSY_SESSION_COOKIE, CmssyAuthConfig, CmssyConfig, CmssyEnvConfig, CmssyPageData, CmssyPageMeta, CmssyPageSummary, DEFAULT_CMSSY_EDITOR_ORIGINS, assertAuthConfig, defineCmssyConfig, resolveEditorOrigin } from '@cmssy/core';
|
|
2
|
-
export { C as CmssyEditorProps, a as CreateCmssyPageOptions } from './index-
|
|
2
|
+
export { C as CmssyEditorProps, a as CreateCmssyPageOptions } from './index-C7l1HgN0.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@cmssy/react';
|
package/dist/server.cjs
CHANGED
|
@@ -123,6 +123,15 @@ function buildCmssyPageRenderer(config, blocks, options, editRoute) {
|
|
|
123
123
|
};
|
|
124
124
|
if (editorActive && Editor) {
|
|
125
125
|
const bridgeOrigin = resolveBridgeOrigin(config.editorOrigin);
|
|
126
|
+
const editorData = await react.resolveBlockData({
|
|
127
|
+
page,
|
|
128
|
+
blocks,
|
|
129
|
+
locale,
|
|
130
|
+
defaultLocale,
|
|
131
|
+
enabledLocales,
|
|
132
|
+
forms,
|
|
133
|
+
isPreview: true
|
|
134
|
+
});
|
|
126
135
|
return /* @__PURE__ */ jsxRuntime.jsx(client.CmssyLocaleProvider, { value: localeContext, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
127
136
|
Editor,
|
|
128
137
|
{
|
|
@@ -131,7 +140,8 @@ function buildCmssyPageRenderer(config, blocks, options, editRoute) {
|
|
|
131
140
|
defaultLocale,
|
|
132
141
|
enabledLocales,
|
|
133
142
|
edit: { editorOrigin: bridgeOrigin },
|
|
134
|
-
forms
|
|
143
|
+
forms,
|
|
144
|
+
data: editorData
|
|
135
145
|
}
|
|
136
146
|
) });
|
|
137
147
|
}
|
package/dist/server.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CmssyEditorProps, a as CreateCmssyPageOptions, c as createCmssyEditPage, b as createCmssyPage } from './index-
|
|
1
|
+
export { C as CmssyEditorProps, a as CreateCmssyPageOptions, c as createCmssyEditPage, b as createCmssyPage } from './index-C7l1HgN0.cjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { ReactNode, ComponentType } from 'react';
|
|
4
4
|
import { BlockDefinition, CmssyLayoutGroup } from '@cmssy/react';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CmssyEditorProps, a as CreateCmssyPageOptions, c as createCmssyEditPage, b as createCmssyPage } from './index-
|
|
1
|
+
export { C as CmssyEditorProps, a as CreateCmssyPageOptions, c as createCmssyEditPage, b as createCmssyPage } from './index-C7l1HgN0.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { ReactNode, ComponentType } from 'react';
|
|
4
4
|
import { BlockDefinition, CmssyLayoutGroup } from '@cmssy/react';
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
2
|
import { draftMode, headers, cookies } from 'next/headers';
|
|
3
3
|
import { notFound, redirect } from 'next/navigation';
|
|
4
|
-
import { createCmssyClient, resolveSiteLocales, splitLocaleFromPath, fetchPage, resolveForms, CmssyServerPage, fetchSiteConfig, fetchPageById, fetchLayouts, CmssyServerLayout, normalizeSlug, fetchPageMeta, fetchPages } from '@cmssy/react';
|
|
4
|
+
import { createCmssyClient, resolveSiteLocales, splitLocaleFromPath, fetchPage, resolveForms, resolveBlockData, CmssyServerPage, fetchSiteConfig, fetchPageById, fetchLayouts, CmssyServerLayout, normalizeSlug, fetchPageMeta, fetchPages } from '@cmssy/react';
|
|
5
5
|
import { CmssyLocaleProvider } from '@cmssy/react/client';
|
|
6
6
|
import { isDevelopment, resolveEditorOrigin, toCspOrigin, CMSSY_EDIT_HEADER, localeForPath, CMSSY_LOCALE_HEADER, resolveSiteLocales as resolveSiteLocales$1, resolveSeoLocales, localizedPath, normalizeSlug as normalizeSlug$1, assertAuthConfig, backendProduct, backendCheckout, backendMergeCart, backendSetShippingMethod, backendRemoveDiscount, backendApplyDiscount, backendClearCart, backendRemoveItem, backendUpdateItem, backendAddToCart, backendGetCart, backendMyOrder, backendMyOrders, cmssySecretsMatch, fetchProducts as fetchProducts$1, fetchProduct as fetchProduct$1, backendSignIn, toSessionPayload, backendRegister, backendSignOut, isAccessExpired, backendSignOutEverywhere, backendForgotPassword, backendResetPassword, backendVerifyEmail, CMSSY_SESSION_COOKIE, openSession, CMSSY_EDIT_QUERY_PARAM, CMSSY_SECRET_QUERY_PARAM, sealSession, sessionCookieOptions, backendRefresh } from '@cmssy/core';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -121,6 +121,15 @@ function buildCmssyPageRenderer(config, blocks, options, editRoute) {
|
|
|
121
121
|
};
|
|
122
122
|
if (editorActive && Editor) {
|
|
123
123
|
const bridgeOrigin = resolveBridgeOrigin(config.editorOrigin);
|
|
124
|
+
const editorData = await resolveBlockData({
|
|
125
|
+
page,
|
|
126
|
+
blocks,
|
|
127
|
+
locale,
|
|
128
|
+
defaultLocale,
|
|
129
|
+
enabledLocales,
|
|
130
|
+
forms,
|
|
131
|
+
isPreview: true
|
|
132
|
+
});
|
|
124
133
|
return /* @__PURE__ */ jsx(CmssyLocaleProvider, { value: localeContext, children: /* @__PURE__ */ jsx(
|
|
125
134
|
Editor,
|
|
126
135
|
{
|
|
@@ -129,7 +138,8 @@ function buildCmssyPageRenderer(config, blocks, options, editRoute) {
|
|
|
129
138
|
defaultLocale,
|
|
130
139
|
enabledLocales,
|
|
131
140
|
edit: { editorOrigin: bridgeOrigin },
|
|
132
|
-
forms
|
|
141
|
+
forms,
|
|
142
|
+
data: editorData
|
|
133
143
|
}
|
|
134
144
|
) });
|
|
135
145
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/next",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Next.js App Router bindings for cmssy headless sites (createCmssyPage + draft preview)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cmssy",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"tsup": "^8.3.0",
|
|
71
71
|
"typescript": "^5.6.0",
|
|
72
72
|
"vitest": "^2.1.0",
|
|
73
|
-
"@cmssy/react": "8.0.
|
|
73
|
+
"@cmssy/react": "8.0.2"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@cmssy/types": "0.28.0",
|
|
77
77
|
"server-only": "^0.0.1",
|
|
78
|
-
"@cmssy/core": "8.0.
|
|
78
|
+
"@cmssy/core": "8.0.2"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsup",
|