@cmssy/next 0.7.4 → 0.7.5

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 CHANGED
@@ -230,7 +230,7 @@ function createCmssyPage(config, blocks, options) {
230
230
  const editMode = isEnabled || hasEditFlag(query[EDIT_QUERY_PARAM]);
231
231
  const devAllowed = isDevelopment() && Boolean(config.devToken?.trim());
232
232
  const devFlagged = hasEditFlag(query[DEV_QUERY_PARAM]);
233
- const devPreview = devAllowed && (devFlagged || config.preview === "dev");
233
+ const devPreview = devAllowed && devFlagged;
234
234
  const editorActive = editMode || devAllowed && devFlagged;
235
235
  let locale;
236
236
  let pagePath = path;
package/dist/index.d.cts CHANGED
@@ -12,7 +12,6 @@ interface CmssyAuthConfig {
12
12
  modelSlug: string;
13
13
  sessionSecret: string;
14
14
  }
15
- type CmssyPreviewMode = "dev" | "live";
16
15
  interface CmssyNextConfig {
17
16
  /**
18
17
  * Full GraphQL delivery endpoint. Defaults to the cmssy cloud endpoint
@@ -22,13 +21,6 @@ interface CmssyNextConfig {
22
21
  workspaceSlug: string;
23
22
  draftSecret: string;
24
23
  devToken?: string;
25
- /**
26
- * Local content-source mode. `"dev"` (with NODE_ENV=development + a devToken)
27
- * serves the caller's dev-draft overlay on every request without the
28
- * `?cmssyDev` flag; `"live"` (or unset) serves published content. Ignored in
29
- * production. Pass the raw env value through - the SDK owns the semantics.
30
- */
31
- preview?: CmssyPreviewMode | (string & {});
32
24
  /**
33
25
  * Origin allowed to frame your app in the editor. Defaults to
34
26
  * {@link DEFAULT_CMSSY_EDITOR_ORIGINS}; set it only for self-hosted admins.
package/dist/index.d.ts CHANGED
@@ -12,7 +12,6 @@ interface CmssyAuthConfig {
12
12
  modelSlug: string;
13
13
  sessionSecret: string;
14
14
  }
15
- type CmssyPreviewMode = "dev" | "live";
16
15
  interface CmssyNextConfig {
17
16
  /**
18
17
  * Full GraphQL delivery endpoint. Defaults to the cmssy cloud endpoint
@@ -22,13 +21,6 @@ interface CmssyNextConfig {
22
21
  workspaceSlug: string;
23
22
  draftSecret: string;
24
23
  devToken?: string;
25
- /**
26
- * Local content-source mode. `"dev"` (with NODE_ENV=development + a devToken)
27
- * serves the caller's dev-draft overlay on every request without the
28
- * `?cmssyDev` flag; `"live"` (or unset) serves published content. Ignored in
29
- * production. Pass the raw env value through - the SDK owns the semantics.
30
- */
31
- preview?: CmssyPreviewMode | (string & {});
32
24
  /**
33
25
  * Origin allowed to frame your app in the editor. Defaults to
34
26
  * {@link DEFAULT_CMSSY_EDITOR_ORIGINS}; set it only for self-hosted admins.
package/dist/index.js CHANGED
@@ -229,7 +229,7 @@ function createCmssyPage(config, blocks, options) {
229
229
  const editMode = isEnabled || hasEditFlag(query[EDIT_QUERY_PARAM]);
230
230
  const devAllowed = isDevelopment() && Boolean(config.devToken?.trim());
231
231
  const devFlagged = hasEditFlag(query[DEV_QUERY_PARAM]);
232
- const devPreview = devAllowed && (devFlagged || config.preview === "dev");
232
+ const devPreview = devAllowed && devFlagged;
233
233
  const editorActive = editMode || devAllowed && devFlagged;
234
234
  let locale;
235
235
  let pagePath = path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/next",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "Next.js App Router bindings for cmssy headless sites (createCmssyPage + draft preview)",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -41,7 +41,7 @@
41
41
  "dist"
42
42
  ],
43
43
  "peerDependencies": {
44
- "@cmssy/react": "^0.7.4",
44
+ "@cmssy/react": "^0.7.5",
45
45
  "next": ">=15",
46
46
  "react": "^18.2.0 || ^19.0.0",
47
47
  "react-dom": "^18.2.0 || ^19.0.0"
@@ -54,7 +54,7 @@
54
54
  "tsup": "^8.3.0",
55
55
  "typescript": "^5.6.0",
56
56
  "vitest": "^2.1.0",
57
- "@cmssy/react": "0.7.4"
57
+ "@cmssy/react": "0.7.5"
58
58
  },
59
59
  "dependencies": {
60
60
  "jose": "^6.2.3"