@valbuild/next 0.60.6 → 0.60.7

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.
@@ -72,8 +72,8 @@ var ValNextProvider = function ValNextProvider(props) {
72
72
  window.removeEventListener("val-event", valEventListener);
73
73
  };
74
74
  } else {
75
- if (process.env["NODE_ENV"] === "development") {
76
- console.warn("Val is currently hidden.\n\nTo enable Val go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
75
+ if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
76
+ console.warn("This page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden and disabled.\n\nTo enable Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
77
77
  }
78
78
  }
79
79
  }, [enabled]);
@@ -63,8 +63,8 @@ var ValNextProvider = function ValNextProvider(props) {
63
63
  window.removeEventListener("val-event", valEventListener);
64
64
  };
65
65
  } else {
66
- if (process.env["NODE_ENV"] === "development") {
67
- console.warn("Val is currently hidden.\n\nTo enable Val go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
66
+ if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
67
+ console.warn("This page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden and disabled.\n\nTo enable Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
68
68
  }
69
69
  }
70
70
  }, [enabled]);
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValNextProvider-f46df77e.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValNextProvider-f46df77e.cjs.dev.js");
7
+ }
@@ -72,8 +72,8 @@ var ValNextProvider = function ValNextProvider(props) {
72
72
  window.removeEventListener("val-event", valEventListener);
73
73
  };
74
74
  } else {
75
- if (process.env["NODE_ENV"] === "development") {
76
- console.warn("Val is currently hidden.\n\nTo enable Val go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
75
+ if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
76
+ console.warn("This page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden and disabled.\n\nTo enable Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
77
77
  }
78
78
  }
79
79
  }, [enabled]);
@@ -6,7 +6,7 @@ var objectSpread2 = require('./objectSpread2-bb9509e8.cjs.dev.js');
6
6
  var core = require('@valbuild/core');
7
7
  var stega = require('@valbuild/react/stega');
8
8
  var internal = require('@valbuild/react/internal');
9
- var ValNextProvider = require('./ValNextProvider-1779e571.cjs.dev.js');
9
+ var ValNextProvider = require('./ValNextProvider-12f2ccc8.cjs.dev.js');
10
10
  var NextImage = require('next/image');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var ValApp = require('./ValApp-aff60572.cjs.dev.js');
@@ -6,7 +6,7 @@ var objectSpread2 = require('./objectSpread2-24e737a6.cjs.prod.js');
6
6
  var core = require('@valbuild/core');
7
7
  var stega = require('@valbuild/react/stega');
8
8
  var internal = require('@valbuild/react/internal');
9
- var ValNextProvider = require('./ValNextProvider-fef86d71.cjs.prod.js');
9
+ var ValNextProvider = require('./ValNextProvider-f46df77e.cjs.prod.js');
10
10
  var NextImage = require('next/image');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var ValApp = require('./ValApp-0ec0c7f3.cjs.prod.js');
@@ -5,7 +5,7 @@ export { core as expr };
5
5
  export { FILE_REF_PROP, GenericSelector, Schema, VAL_EXTENSION, derefPatch } from '@valbuild/core';
6
6
  import { stegaClean, stegaDecodeString, autoTagJSX } from '@valbuild/react/stega';
7
7
  export { ValRichText } from '@valbuild/react/internal';
8
- import { ValNextProvider } from './ValNextProvider-89c4f1ce.esm.js';
8
+ import { ValNextProvider } from './ValNextProvider-38fefdf7.esm.js';
9
9
  import NextImage from 'next/image';
10
10
  import { jsx } from 'react/jsx-runtime';
11
11
  export { ValApp } from './ValApp-61103149.esm.js';
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "next",
9
9
  "react"
10
10
  ],
11
- "version": "0.60.6",
11
+ "version": "0.60.7",
12
12
  "scripts": {
13
13
  "typecheck": "tsc --noEmit",
14
14
  "test": "jest"
@@ -45,10 +45,10 @@
45
45
  "exports": true
46
46
  },
47
47
  "dependencies": {
48
- "@valbuild/core": "~0.60.6",
49
- "@valbuild/react": "~0.60.6",
50
- "@valbuild/server": "~0.60.6",
51
- "@valbuild/ui": "~0.60.6",
48
+ "@valbuild/core": "~0.60.7",
49
+ "@valbuild/react": "~0.60.7",
50
+ "@valbuild/server": "~0.60.7",
51
+ "@valbuild/ui": "~0.60.7",
52
52
  "client-only": "^0.0.1",
53
53
  "server-only": "^0.0.1"
54
54
  },
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValNextProvider-fef86d71.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValNextProvider-fef86d71.cjs.dev.js");
7
- }