@valbuild/next 0.60.3 → 0.60.4
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/client/dist/valbuild-next-client.cjs.dev.js +10 -6
- package/client/dist/valbuild-next-client.cjs.prod.js +10 -6
- package/client/dist/valbuild-next-client.esm.js +7 -7
- package/dist/{ValNextProvider-79a4f66e.esm.js → ValNextProvider-35917b1e.esm.js} +6 -6
- package/dist/ValNextProvider-6d9a7495.cjs.js +7 -0
- package/dist/{ValNextProvider-bdce5efd.cjs.prod.js → ValNextProvider-6d9a7495.cjs.prod.js} +6 -5
- package/dist/{ValNextProvider-d06cae18.cjs.dev.js → ValNextProvider-a2f9e10b.cjs.dev.js} +6 -5
- package/dist/valbuild-next.cjs.dev.js +1 -1
- package/dist/valbuild-next.cjs.prod.js +1 -1
- package/dist/valbuild-next.esm.js +1 -1
- package/package.json +5 -5
- package/dist/ValNextProvider-bdce5efd.cjs.js +0 -7
|
@@ -10,18 +10,22 @@ var React = require('react');
|
|
|
10
10
|
var ValContext = require('../../dist/ValContext-b1d2da47.cjs.dev.js');
|
|
11
11
|
require('../../dist/unsupportedIterableToArray-9e97e24a.cjs.dev.js');
|
|
12
12
|
|
|
13
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
16
|
+
|
|
13
17
|
function useValStega(selector) {
|
|
14
18
|
var valEvents = ValContext.useValEvents();
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
enabled =
|
|
18
|
-
setEnabled =
|
|
19
|
-
|
|
19
|
+
var _React$useState = React__default["default"].useState(false),
|
|
20
|
+
_React$useState2 = slicedToArray._slicedToArray(_React$useState, 2),
|
|
21
|
+
enabled = _React$useState2[0],
|
|
22
|
+
setEnabled = _React$useState2[1];
|
|
23
|
+
React__default["default"].useEffect(function () {
|
|
20
24
|
setEnabled(document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true")));
|
|
21
25
|
}, [valEvents]);
|
|
22
26
|
if (valEvents) {
|
|
23
27
|
var moduleIds = stega.getModuleIds(selector);
|
|
24
|
-
var moduleMap =
|
|
28
|
+
var moduleMap = React__default["default"].useSyncExternalStore(valEvents.subscribe(moduleIds), valEvents.getSnapshot(moduleIds), valEvents.getServerSnapshot(moduleIds));
|
|
25
29
|
return stega.stegaEncode(selector, {
|
|
26
30
|
disabled: !enabled,
|
|
27
31
|
getModule: function getModule(moduleId) {
|
|
@@ -10,18 +10,22 @@ var React = require('react');
|
|
|
10
10
|
var ValContext = require('../../dist/ValContext-b64043dd.cjs.prod.js');
|
|
11
11
|
require('../../dist/unsupportedIterableToArray-afbea1dd.cjs.prod.js');
|
|
12
12
|
|
|
13
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
16
|
+
|
|
13
17
|
function useValStega(selector) {
|
|
14
18
|
var valEvents = ValContext.useValEvents();
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
enabled =
|
|
18
|
-
setEnabled =
|
|
19
|
-
|
|
19
|
+
var _React$useState = React__default["default"].useState(false),
|
|
20
|
+
_React$useState2 = slicedToArray._slicedToArray(_React$useState, 2),
|
|
21
|
+
enabled = _React$useState2[0],
|
|
22
|
+
setEnabled = _React$useState2[1];
|
|
23
|
+
React__default["default"].useEffect(function () {
|
|
20
24
|
setEnabled(document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true")));
|
|
21
25
|
}, [valEvents]);
|
|
22
26
|
if (valEvents) {
|
|
23
27
|
var moduleIds = stega.getModuleIds(selector);
|
|
24
|
-
var moduleMap =
|
|
28
|
+
var moduleMap = React__default["default"].useSyncExternalStore(valEvents.subscribe(moduleIds), valEvents.getSnapshot(moduleIds), valEvents.getServerSnapshot(moduleIds));
|
|
25
29
|
return stega.stegaEncode(selector, {
|
|
26
30
|
disabled: !enabled,
|
|
27
31
|
getModule: function getModule(moduleId) {
|
|
@@ -2,22 +2,22 @@ import 'client-only';
|
|
|
2
2
|
import { _ as _slicedToArray } from '../../dist/slicedToArray-1ff80c5e.esm.js';
|
|
3
3
|
import { Internal } from '@valbuild/core';
|
|
4
4
|
import { getModuleIds, stegaEncode } from '@valbuild/react/stega';
|
|
5
|
-
import
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import { useValEvents } from '../../dist/ValContext-059d6dd7.esm.js';
|
|
7
7
|
import '../../dist/unsupportedIterableToArray-51bb61c2.esm.js';
|
|
8
8
|
|
|
9
9
|
function useValStega(selector) {
|
|
10
10
|
var valEvents = useValEvents();
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
enabled =
|
|
14
|
-
setEnabled =
|
|
15
|
-
useEffect(function () {
|
|
11
|
+
var _React$useState = React.useState(false),
|
|
12
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13
|
+
enabled = _React$useState2[0],
|
|
14
|
+
setEnabled = _React$useState2[1];
|
|
15
|
+
React.useEffect(function () {
|
|
16
16
|
setEnabled(document.cookie.includes("".concat(Internal.VAL_ENABLE_COOKIE_NAME, "=true")));
|
|
17
17
|
}, [valEvents]);
|
|
18
18
|
if (valEvents) {
|
|
19
19
|
var moduleIds = getModuleIds(selector);
|
|
20
|
-
var moduleMap = useSyncExternalStore(valEvents.subscribe(moduleIds), valEvents.getSnapshot(moduleIds), valEvents.getServerSnapshot(moduleIds));
|
|
20
|
+
var moduleMap = React.useSyncExternalStore(valEvents.subscribe(moduleIds), valEvents.getSnapshot(moduleIds), valEvents.getServerSnapshot(moduleIds));
|
|
21
21
|
return stegaEncode(selector, {
|
|
22
22
|
disabled: !enabled,
|
|
23
23
|
getModule: function getModule(moduleId) {
|
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from './slicedToArray-1ff80c5e.esm.js';
|
|
|
3
3
|
import { VAL_APP_PATH, VAL_OVERLAY_ID } from '@valbuild/ui';
|
|
4
4
|
import { usePathname, useRouter } from 'next/navigation';
|
|
5
5
|
import Script from 'next/script';
|
|
6
|
-
import
|
|
6
|
+
import React from 'react';
|
|
7
7
|
import { ValEvents, ValContext } from './ValContext-059d6dd7.esm.js';
|
|
8
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
9
|
import './unsupportedIterableToArray-51bb61c2.esm.js';
|
|
@@ -16,14 +16,14 @@ var ValNextProvider = function ValNextProvider(props) {
|
|
|
16
16
|
return props.children;
|
|
17
17
|
}
|
|
18
18
|
var route = "/api/val";
|
|
19
|
-
var valEvents = useMemo(function () {
|
|
19
|
+
var valEvents = React.useMemo(function () {
|
|
20
20
|
return new ValEvents();
|
|
21
21
|
}, []);
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
startTransition =
|
|
22
|
+
var _React$useTransition = React.useTransition(),
|
|
23
|
+
_React$useTransition2 = _slicedToArray(_React$useTransition, 2),
|
|
24
|
+
startTransition = _React$useTransition2[1];
|
|
25
25
|
var router = useRouter();
|
|
26
|
-
useEffect(function () {
|
|
26
|
+
React.useEffect(function () {
|
|
27
27
|
var valEventListener = function valEventListener(event) {
|
|
28
28
|
if (event instanceof CustomEvent) {
|
|
29
29
|
if (event.detail.type === "module-update") {
|
|
@@ -15,6 +15,7 @@ require('./unsupportedIterableToArray-afbea1dd.cjs.prod.js');
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
17
|
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
18
19
|
|
|
19
20
|
var ValNextProvider = function ValNextProvider(props) {
|
|
20
21
|
var pathname = navigation.usePathname();
|
|
@@ -24,14 +25,14 @@ var ValNextProvider = function ValNextProvider(props) {
|
|
|
24
25
|
return props.children;
|
|
25
26
|
}
|
|
26
27
|
var route = "/api/val";
|
|
27
|
-
var valEvents =
|
|
28
|
+
var valEvents = React__default["default"].useMemo(function () {
|
|
28
29
|
return new ValContext.ValEvents();
|
|
29
30
|
}, []);
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
startTransition =
|
|
31
|
+
var _React$useTransition = React__default["default"].useTransition(),
|
|
32
|
+
_React$useTransition2 = slicedToArray._slicedToArray(_React$useTransition, 2),
|
|
33
|
+
startTransition = _React$useTransition2[1];
|
|
33
34
|
var router = navigation.useRouter();
|
|
34
|
-
|
|
35
|
+
React__default["default"].useEffect(function () {
|
|
35
36
|
var valEventListener = function valEventListener(event) {
|
|
36
37
|
if (event instanceof CustomEvent) {
|
|
37
38
|
if (event.detail.type === "module-update") {
|
|
@@ -15,6 +15,7 @@ require('./unsupportedIterableToArray-9e97e24a.cjs.dev.js');
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
17
|
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
18
19
|
|
|
19
20
|
var ValNextProvider = function ValNextProvider(props) {
|
|
20
21
|
var pathname = navigation.usePathname();
|
|
@@ -24,14 +25,14 @@ var ValNextProvider = function ValNextProvider(props) {
|
|
|
24
25
|
return props.children;
|
|
25
26
|
}
|
|
26
27
|
var route = "/api/val";
|
|
27
|
-
var valEvents =
|
|
28
|
+
var valEvents = React__default["default"].useMemo(function () {
|
|
28
29
|
return new ValContext.ValEvents();
|
|
29
30
|
}, []);
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
startTransition =
|
|
31
|
+
var _React$useTransition = React__default["default"].useTransition(),
|
|
32
|
+
_React$useTransition2 = slicedToArray._slicedToArray(_React$useTransition, 2),
|
|
33
|
+
startTransition = _React$useTransition2[1];
|
|
33
34
|
var router = navigation.useRouter();
|
|
34
|
-
|
|
35
|
+
React__default["default"].useEffect(function () {
|
|
35
36
|
var valEventListener = function valEventListener(event) {
|
|
36
37
|
if (event instanceof CustomEvent) {
|
|
37
38
|
if (event.detail.type === "module-update") {
|
|
@@ -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-
|
|
9
|
+
var ValNextProvider = require('./ValNextProvider-a2f9e10b.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-
|
|
9
|
+
var ValNextProvider = require('./ValNextProvider-6d9a7495.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-
|
|
8
|
+
import { ValNextProvider } from './ValNextProvider-35917b1e.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.
|
|
11
|
+
"version": "0.60.4",
|
|
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.
|
|
49
|
-
"@valbuild/react": "~0.60.
|
|
50
|
-
"@valbuild/server": "~0.60.
|
|
51
|
-
"@valbuild/ui": "~0.60.
|
|
48
|
+
"@valbuild/core": "~0.60.4",
|
|
49
|
+
"@valbuild/react": "~0.60.4",
|
|
50
|
+
"@valbuild/server": "~0.60.4",
|
|
51
|
+
"@valbuild/ui": "~0.60.4",
|
|
52
52
|
"client-only": "^0.0.1",
|
|
53
53
|
"server-only": "^0.0.1"
|
|
54
54
|
},
|