@valbuild/next 0.62.3 → 0.62.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.
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValNextProvider-5226c452.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValNextProvider-5226c452.cjs.dev.js");
7
+ }
@@ -10,6 +10,7 @@ var navigation = require('next/navigation');
10
10
  var Script = require('next/script');
11
11
  var React = require('react');
12
12
  var ValContext = require('./ValContext-df4a9ae7.cjs.prod.js');
13
+ var stega = require('@valbuild/react/stega');
13
14
  var jsxRuntime = require('react/jsx-runtime');
14
15
  require('./unsupportedIterableToArray-afbea1dd.cjs.prod.js');
15
16
 
@@ -44,6 +45,7 @@ var ValNextProvider = function ValNextProvider(props) {
44
45
  }, []);
45
46
  React__default["default"].useEffect(function () {
46
47
  if (enabled) {
48
+ stega.SET_AUTO_TAG_JSX_ENABLED(true);
47
49
  var valEventListener = function valEventListener(event) {
48
50
  if (event instanceof CustomEvent) {
49
51
  if (event.detail.type === "module-update") {
@@ -72,6 +74,7 @@ var ValNextProvider = function ValNextProvider(props) {
72
74
  window.removeEventListener("val-event", valEventListener);
73
75
  };
74
76
  } else {
77
+ stega.SET_AUTO_TAG_JSX_ENABLED(false);
75
78
  if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
76
79
  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
80
  }
@@ -10,6 +10,7 @@ var navigation = require('next/navigation');
10
10
  var Script = require('next/script');
11
11
  var React = require('react');
12
12
  var ValContext = require('./ValContext-8eb2ec77.cjs.dev.js');
13
+ var stega = require('@valbuild/react/stega');
13
14
  var jsxRuntime = require('react/jsx-runtime');
14
15
  require('./unsupportedIterableToArray-9e97e24a.cjs.dev.js');
15
16
 
@@ -44,6 +45,7 @@ var ValNextProvider = function ValNextProvider(props) {
44
45
  }, []);
45
46
  React__default["default"].useEffect(function () {
46
47
  if (enabled) {
48
+ stega.SET_AUTO_TAG_JSX_ENABLED(true);
47
49
  var valEventListener = function valEventListener(event) {
48
50
  if (event instanceof CustomEvent) {
49
51
  if (event.detail.type === "module-update") {
@@ -72,6 +74,7 @@ var ValNextProvider = function ValNextProvider(props) {
72
74
  window.removeEventListener("val-event", valEventListener);
73
75
  };
74
76
  } else {
77
+ stega.SET_AUTO_TAG_JSX_ENABLED(false);
75
78
  if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
76
79
  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
80
  }
@@ -6,6 +6,7 @@ import { usePathname, useRouter } from 'next/navigation';
6
6
  import Script from 'next/script';
7
7
  import React from 'react';
8
8
  import { ValEvents, ValContext } from './ValContext-ea0b967a.esm.js';
9
+ import { SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/stega';
9
10
  import { jsxs, jsx } from 'react/jsx-runtime';
10
11
  import './unsupportedIterableToArray-51bb61c2.esm.js';
11
12
 
@@ -35,6 +36,7 @@ var ValNextProvider = function ValNextProvider(props) {
35
36
  }, []);
36
37
  React.useEffect(function () {
37
38
  if (enabled) {
39
+ SET_AUTO_TAG_JSX_ENABLED(true);
38
40
  var valEventListener = function valEventListener(event) {
39
41
  if (event instanceof CustomEvent) {
40
42
  if (event.detail.type === "module-update") {
@@ -63,6 +65,7 @@ var ValNextProvider = function ValNextProvider(props) {
63
65
  window.removeEventListener("val-event", valEventListener);
64
66
  };
65
67
  } else {
68
+ SET_AUTO_TAG_JSX_ENABLED(false);
66
69
  if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
67
70
  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
71
  }
@@ -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-3df6c619.cjs.dev.js');
9
+ var ValNextProvider = require('./ValNextProvider-ccbea1bd.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-06d5c71e.cjs.prod.js');
9
+ var ValNextProvider = require('./ValNextProvider-5226c452.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, modules } 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-259bf24d.esm.js';
8
+ import { ValNextProvider } from './ValNextProvider-d94cd904.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.62.3",
11
+ "version": "0.62.5",
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.62.3",
49
- "@valbuild/react": "~0.62.3",
50
- "@valbuild/server": "~0.62.3",
51
- "@valbuild/ui": "~0.62.3",
48
+ "@valbuild/core": "~0.62.5",
49
+ "@valbuild/react": "~0.62.5",
50
+ "@valbuild/server": "~0.62.5",
51
+ "@valbuild/ui": "~0.62.5",
52
52
  "client-only": "^0.0.1",
53
53
  "server-only": "^0.0.1"
54
54
  },
@@ -17,6 +17,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
17
17
  console.error("Val: could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", err);
18
18
  }
19
19
  if (enabled) {
20
+ stega.SET_AUTO_TAG_JSX_ENABLED(true);
20
21
  var headers;
21
22
  try {
22
23
  headers = getHeaders();
@@ -17,6 +17,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
17
17
  console.error("Val: could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", err);
18
18
  }
19
19
  if (enabled) {
20
+ stega.SET_AUTO_TAG_JSX_ENABLED(true);
20
21
  var headers;
21
22
  try {
22
23
  headers = getHeaders();
@@ -1,6 +1,6 @@
1
1
  import 'server-only';
2
2
  import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/asyncToGenerator-0859ab5c.esm.js';
3
- import { stegaEncode } from '@valbuild/react/stega';
3
+ import { SET_AUTO_TAG_JSX_ENABLED, stegaEncode } from '@valbuild/react/stega';
4
4
  import { ValApi } from '@valbuild/core';
5
5
  import { result } from '@valbuild/core/fp';
6
6
 
@@ -13,6 +13,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, isEn
13
13
  console.error("Val: could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", err);
14
14
  }
15
15
  if (enabled) {
16
+ SET_AUTO_TAG_JSX_ENABLED(true);
16
17
  var headers;
17
18
  try {
18
19
  headers = getHeaders();
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValNextProvider-06d5c71e.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValNextProvider-06d5c71e.cjs.dev.js");
7
- }