@valbuild/next 0.96.3 → 0.97.1
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/README.md +33 -0
- package/client/dist/valbuild-next-client.cjs.dev.js +29 -10
- package/client/dist/valbuild-next-client.cjs.prod.js +29 -10
- package/client/dist/valbuild-next-client.esm.js +29 -10
- package/dist/{ValApp-3df36e0d.cjs.dev.js → ValApp-1992d8b3.cjs.dev.js} +3 -2
- package/dist/{ValApp-e2e1dfed.esm.js → ValApp-8912fc8b.esm.js} +3 -2
- package/dist/ValApp-bb207e96.cjs.js +7 -0
- package/dist/{ValApp-22147086.cjs.prod.js → ValApp-bb207e96.cjs.prod.js} +3 -2
- package/dist/ValModulesClient-0dd601a1.esm.js +48 -0
- package/dist/ValModulesClient-10c0721c.cjs.js +7 -0
- package/dist/ValModulesClient-10c0721c.cjs.prod.js +53 -0
- package/dist/ValModulesClient-4ecabf99.cjs.dev.js +53 -0
- package/dist/{ValNextProvider-26ef0c1c.cjs.dev.js → ValNextProvider-03a9f8fd.cjs.dev.js} +103 -25
- package/dist/ValNextProvider-6103cb74.cjs.js +7 -0
- package/dist/{ValNextProvider-b0d9fa24.cjs.prod.js → ValNextProvider-6103cb74.cjs.prod.js} +103 -25
- package/dist/{ValNextProvider-e163e127.esm.js → ValNextProvider-7302b8af.esm.js} +104 -26
- package/dist/ValOverlayContext-3c37e5a7.esm.js +251 -0
- package/dist/ValOverlayContext-c6f27a6d.cjs.dev.js +262 -0
- package/dist/ValOverlayContext-f7f45bc7.cjs.js +7 -0
- package/dist/ValOverlayContext-f7f45bc7.cjs.prod.js +262 -0
- package/dist/declarations/src/ValApp.d.ts +3 -1
- package/dist/declarations/src/ValModulesClient.d.ts +38 -0
- package/dist/declarations/src/ValProvider.d.ts +1 -0
- package/dist/declarations/src/external_exempt_from_val_quickjs.d.ts +1 -0
- package/dist/declarations/src/initVal.d.ts +25 -0
- package/dist/defineProperty-8951f469.cjs.prod.js +29 -0
- package/dist/defineProperty-cca5affa.esm.js +26 -0
- package/dist/defineProperty-f90345d7.cjs.dev.js +29 -0
- package/dist/{objectSpread2-3c87fb4f.cjs.prod.js → objectSpread2-13f847a9.cjs.prod.js} +2 -27
- package/dist/{objectSpread2-792eb2c2.cjs.dev.js → objectSpread2-58024783.cjs.dev.js} +2 -27
- package/dist/{objectSpread2-c1340c1c.esm.js → objectSpread2-60d1bd93.esm.js} +2 -25
- package/dist/{routeFromVal-ef8c304a.cjs.prod.js → routeFromVal-13c832b2.cjs.prod.js} +1 -1
- package/dist/{routeFromVal-748d2aec.esm.js → routeFromVal-8855a5cc.esm.js} +1 -1
- package/dist/{routeFromVal-8fdaa0d0.cjs.dev.js → routeFromVal-9b610e77.cjs.dev.js} +1 -1
- package/dist/valbuild-next.cjs.dev.js +56 -4
- package/dist/valbuild-next.cjs.prod.js +56 -4
- package/dist/valbuild-next.esm.js +48 -4
- package/dist/{asyncToGenerator-8e5c36c8.cjs.prod.js → version-0e6da9a7.cjs.prod.js} +10 -0
- package/dist/{asyncToGenerator-500f022f.esm.js → version-4d7b692c.esm.js} +10 -1
- package/dist/{asyncToGenerator-c3823d62.cjs.dev.js → version-c311d818.cjs.dev.js} +10 -0
- package/package.json +14 -8
- package/rsc/dist/valbuild-next-rsc.cjs.dev.js +38 -36
- package/rsc/dist/valbuild-next-rsc.cjs.prod.js +38 -36
- package/rsc/dist/valbuild-next-rsc.esm.js +7 -5
- package/server/dist/valbuild-next-server.cjs.dev.js +9 -9
- package/server/dist/valbuild-next-server.cjs.prod.js +9 -9
- package/server/dist/valbuild-next-server.esm.js +3 -3
- package/dist/ValApp-22147086.cjs.js +0 -7
- package/dist/ValNextProvider-b0d9fa24.cjs.js +0 -7
- package/dist/ValOverlayContext-6635a4d7.esm.js +0 -114
- package/dist/ValOverlayContext-942f1294.cjs.js +0 -7
- package/dist/ValOverlayContext-942f1294.cjs.prod.js +0 -125
- package/dist/ValOverlayContext-c82a4507.cjs.dev.js +0 -125
- package/dist/version-16f6b0ce.esm.js +0 -10
- package/dist/version-d034b2fc.cjs.dev.js +0 -12
- package/dist/version-d2061026.cjs.prod.js +0 -12
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var version = require('./version-c311d818.cjs.dev.js');
|
|
6
|
+
var objectSpread2 = require('./objectSpread2-58024783.cjs.dev.js');
|
|
6
7
|
var core = require('@valbuild/core');
|
|
7
8
|
var stega = require('@valbuild/react/stega');
|
|
8
9
|
var internal = require('@valbuild/react/internal');
|
|
9
|
-
var ValNextProvider = require('./ValNextProvider-
|
|
10
|
+
var ValNextProvider = require('./ValNextProvider-03a9f8fd.cjs.dev.js');
|
|
10
11
|
var NextImage = require('next/image');
|
|
11
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
-
var ValApp = require('./ValApp-
|
|
13
|
-
var
|
|
13
|
+
var ValApp = require('./ValApp-1992d8b3.cjs.dev.js');
|
|
14
|
+
var ValModulesClient = require('./ValModulesClient-4ecabf99.cjs.dev.js');
|
|
14
15
|
var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
|
|
16
|
+
require('./defineProperty-f90345d7.cjs.dev.js');
|
|
15
17
|
require('./unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
|
|
16
18
|
|
|
17
19
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -51,6 +53,47 @@ function decodeValPathsOfString(encodedString) {
|
|
|
51
53
|
|
|
52
54
|
var nextAppRouter = core.Internal.nextAppRouter;
|
|
53
55
|
var externalPageRouter = core.Internal.externalPageRouter;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the Val Enable cookie is set. Must be called in a
|
|
59
|
+
* Server Component, Server Action, or Route Handler — it reads from
|
|
60
|
+
* `next/headers` and returns false in any other context.
|
|
61
|
+
*
|
|
62
|
+
* ⚠️ Reading cookies opts the route into **dynamic rendering**: calling this
|
|
63
|
+
* in a layout or page disables static generation and the full route cache for
|
|
64
|
+
* every route it covers, for all visitors. It is NOT needed for the
|
|
65
|
+
* `suspend` prop on ValProvider (which detects the cookie client-side) —
|
|
66
|
+
* reserve it for advanced server-side conditionals.
|
|
67
|
+
*/
|
|
68
|
+
function isValEnabled() {
|
|
69
|
+
return _isValEnabled.apply(this, arguments);
|
|
70
|
+
}
|
|
71
|
+
function _isValEnabled() {
|
|
72
|
+
_isValEnabled = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee() {
|
|
73
|
+
var _cookieStore$get, _yield$import, cookies, cookieStore;
|
|
74
|
+
return version._regenerator().w(function (_context) {
|
|
75
|
+
while (1) switch (_context.p = _context.n) {
|
|
76
|
+
case 0:
|
|
77
|
+
_context.p = 0;
|
|
78
|
+
_context.n = 1;
|
|
79
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('next/headers')); });
|
|
80
|
+
case 1:
|
|
81
|
+
_yield$import = _context.v;
|
|
82
|
+
cookies = _yield$import.cookies;
|
|
83
|
+
_context.n = 2;
|
|
84
|
+
return cookies();
|
|
85
|
+
case 2:
|
|
86
|
+
cookieStore = _context.v;
|
|
87
|
+
return _context.a(2, ((_cookieStore$get = cookieStore.get(core.Internal.VAL_ENABLE_COOKIE_NAME)) === null || _cookieStore$get === void 0 ? void 0 : _cookieStore$get.value) === "true");
|
|
88
|
+
case 3:
|
|
89
|
+
_context.p = 3;
|
|
90
|
+
_context.v;
|
|
91
|
+
return _context.a(2, false);
|
|
92
|
+
}
|
|
93
|
+
}, _callee, null, [[0, 3]]);
|
|
94
|
+
}));
|
|
95
|
+
return _isValEnabled.apply(this, arguments);
|
|
96
|
+
}
|
|
54
97
|
var initVal = function initVal(config) {
|
|
55
98
|
var _createValSystem = core.initVal(config),
|
|
56
99
|
s = _createValSystem.s,
|
|
@@ -61,6 +104,7 @@ var initVal = function initVal(config) {
|
|
|
61
104
|
return {
|
|
62
105
|
s: s,
|
|
63
106
|
c: c,
|
|
107
|
+
isValEnabled: isValEnabled,
|
|
64
108
|
nextAppRouter: nextAppRouter,
|
|
65
109
|
externalPageRouter: externalPageRouter,
|
|
66
110
|
val: objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, val), {}, {
|
|
@@ -194,6 +238,14 @@ Object.defineProperty(exports, 'ValApp', {
|
|
|
194
238
|
enumerable: true,
|
|
195
239
|
get: function () { return ValApp.ValApp; }
|
|
196
240
|
});
|
|
241
|
+
Object.defineProperty(exports, 'ValModulesClient', {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function () { return ValModulesClient.ValModulesClient; }
|
|
244
|
+
});
|
|
245
|
+
Object.defineProperty(exports, 'useRegisterValModules', {
|
|
246
|
+
enumerable: true,
|
|
247
|
+
get: function () { return ValModulesClient.useRegisterValModules; }
|
|
248
|
+
});
|
|
197
249
|
exports.Internal = Internal;
|
|
198
250
|
exports.ValImage = ValImage;
|
|
199
251
|
exports.ValProvider = ValProvider;
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var version = require('./version-0e6da9a7.cjs.prod.js');
|
|
6
|
+
var objectSpread2 = require('./objectSpread2-13f847a9.cjs.prod.js');
|
|
6
7
|
var core = require('@valbuild/core');
|
|
7
8
|
var stega = require('@valbuild/react/stega');
|
|
8
9
|
var internal = require('@valbuild/react/internal');
|
|
9
|
-
var ValNextProvider = require('./ValNextProvider-
|
|
10
|
+
var ValNextProvider = require('./ValNextProvider-6103cb74.cjs.prod.js');
|
|
10
11
|
var NextImage = require('next/image');
|
|
11
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
-
var ValApp = require('./ValApp-
|
|
13
|
-
var
|
|
13
|
+
var ValApp = require('./ValApp-bb207e96.cjs.prod.js');
|
|
14
|
+
var ValModulesClient = require('./ValModulesClient-10c0721c.cjs.prod.js');
|
|
14
15
|
var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
|
|
16
|
+
require('./defineProperty-8951f469.cjs.prod.js');
|
|
15
17
|
require('./unsupportedIterableToArray-0d2087a2.cjs.prod.js');
|
|
16
18
|
|
|
17
19
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -51,6 +53,47 @@ function decodeValPathsOfString(encodedString) {
|
|
|
51
53
|
|
|
52
54
|
var nextAppRouter = core.Internal.nextAppRouter;
|
|
53
55
|
var externalPageRouter = core.Internal.externalPageRouter;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the Val Enable cookie is set. Must be called in a
|
|
59
|
+
* Server Component, Server Action, or Route Handler — it reads from
|
|
60
|
+
* `next/headers` and returns false in any other context.
|
|
61
|
+
*
|
|
62
|
+
* ⚠️ Reading cookies opts the route into **dynamic rendering**: calling this
|
|
63
|
+
* in a layout or page disables static generation and the full route cache for
|
|
64
|
+
* every route it covers, for all visitors. It is NOT needed for the
|
|
65
|
+
* `suspend` prop on ValProvider (which detects the cookie client-side) —
|
|
66
|
+
* reserve it for advanced server-side conditionals.
|
|
67
|
+
*/
|
|
68
|
+
function isValEnabled() {
|
|
69
|
+
return _isValEnabled.apply(this, arguments);
|
|
70
|
+
}
|
|
71
|
+
function _isValEnabled() {
|
|
72
|
+
_isValEnabled = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee() {
|
|
73
|
+
var _cookieStore$get, _yield$import, cookies, cookieStore;
|
|
74
|
+
return version._regenerator().w(function (_context) {
|
|
75
|
+
while (1) switch (_context.p = _context.n) {
|
|
76
|
+
case 0:
|
|
77
|
+
_context.p = 0;
|
|
78
|
+
_context.n = 1;
|
|
79
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('next/headers')); });
|
|
80
|
+
case 1:
|
|
81
|
+
_yield$import = _context.v;
|
|
82
|
+
cookies = _yield$import.cookies;
|
|
83
|
+
_context.n = 2;
|
|
84
|
+
return cookies();
|
|
85
|
+
case 2:
|
|
86
|
+
cookieStore = _context.v;
|
|
87
|
+
return _context.a(2, ((_cookieStore$get = cookieStore.get(core.Internal.VAL_ENABLE_COOKIE_NAME)) === null || _cookieStore$get === void 0 ? void 0 : _cookieStore$get.value) === "true");
|
|
88
|
+
case 3:
|
|
89
|
+
_context.p = 3;
|
|
90
|
+
_context.v;
|
|
91
|
+
return _context.a(2, false);
|
|
92
|
+
}
|
|
93
|
+
}, _callee, null, [[0, 3]]);
|
|
94
|
+
}));
|
|
95
|
+
return _isValEnabled.apply(this, arguments);
|
|
96
|
+
}
|
|
54
97
|
var initVal = function initVal(config) {
|
|
55
98
|
var _createValSystem = core.initVal(config),
|
|
56
99
|
s = _createValSystem.s,
|
|
@@ -61,6 +104,7 @@ var initVal = function initVal(config) {
|
|
|
61
104
|
return {
|
|
62
105
|
s: s,
|
|
63
106
|
c: c,
|
|
107
|
+
isValEnabled: isValEnabled,
|
|
64
108
|
nextAppRouter: nextAppRouter,
|
|
65
109
|
externalPageRouter: externalPageRouter,
|
|
66
110
|
val: objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, val), {}, {
|
|
@@ -194,6 +238,14 @@ Object.defineProperty(exports, 'ValApp', {
|
|
|
194
238
|
enumerable: true,
|
|
195
239
|
get: function () { return ValApp.ValApp; }
|
|
196
240
|
});
|
|
241
|
+
Object.defineProperty(exports, 'ValModulesClient', {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function () { return ValModulesClient.ValModulesClient; }
|
|
244
|
+
});
|
|
245
|
+
Object.defineProperty(exports, 'useRegisterValModules', {
|
|
246
|
+
enumerable: true,
|
|
247
|
+
get: function () { return ValModulesClient.useRegisterValModules; }
|
|
248
|
+
});
|
|
197
249
|
exports.Internal = Internal;
|
|
198
250
|
exports.ValImage = ValImage;
|
|
199
251
|
exports.ValProvider = ValProvider;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _asyncToGenerator, a as _regenerator, V as VERSION } from './version-4d7b692c.esm.js';
|
|
2
|
+
import { _ as _objectSpread2 } from './objectSpread2-60d1bd93.esm.js';
|
|
2
3
|
import { Internal as Internal$1, initVal as initVal$1 } from '@valbuild/core';
|
|
3
4
|
import * as core from '@valbuild/core';
|
|
4
5
|
export { core as expr };
|
|
5
6
|
export { FILE_REF_PROP, GenericSelector, Schema, VAL_EXTENSION, derefPatch, modules } from '@valbuild/core';
|
|
6
7
|
import { stegaEncode, stegaDecodeStrings, attrs, raw, autoTagJSX } from '@valbuild/react/stega';
|
|
7
8
|
export { ValRichText } from '@valbuild/react/internal';
|
|
8
|
-
import { ValNextProvider } from './ValNextProvider-
|
|
9
|
+
import { ValNextProvider } from './ValNextProvider-7302b8af.esm.js';
|
|
9
10
|
import NextImage from 'next/image';
|
|
10
11
|
import { jsx } from 'react/jsx-runtime';
|
|
11
|
-
export { ValApp } from './ValApp-
|
|
12
|
-
|
|
12
|
+
export { ValApp } from './ValApp-8912fc8b.esm.js';
|
|
13
|
+
export { ValModulesClient, useRegisterValModules } from './ValModulesClient-0dd601a1.esm.js';
|
|
13
14
|
import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
|
|
15
|
+
import './defineProperty-cca5affa.esm.js';
|
|
14
16
|
import './unsupportedIterableToArray-5baabfdc.esm.js';
|
|
15
17
|
|
|
16
18
|
function getUnpatchedUnencodedVal(selector) {
|
|
@@ -27,6 +29,47 @@ function decodeValPathsOfString(encodedString) {
|
|
|
27
29
|
|
|
28
30
|
var nextAppRouter = Internal$1.nextAppRouter;
|
|
29
31
|
var externalPageRouter = Internal$1.externalPageRouter;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns true if the Val Enable cookie is set. Must be called in a
|
|
35
|
+
* Server Component, Server Action, or Route Handler — it reads from
|
|
36
|
+
* `next/headers` and returns false in any other context.
|
|
37
|
+
*
|
|
38
|
+
* ⚠️ Reading cookies opts the route into **dynamic rendering**: calling this
|
|
39
|
+
* in a layout or page disables static generation and the full route cache for
|
|
40
|
+
* every route it covers, for all visitors. It is NOT needed for the
|
|
41
|
+
* `suspend` prop on ValProvider (which detects the cookie client-side) —
|
|
42
|
+
* reserve it for advanced server-side conditionals.
|
|
43
|
+
*/
|
|
44
|
+
function isValEnabled() {
|
|
45
|
+
return _isValEnabled.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
function _isValEnabled() {
|
|
48
|
+
_isValEnabled = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
49
|
+
var _cookieStore$get, _yield$import, cookies, cookieStore;
|
|
50
|
+
return _regenerator().w(function (_context) {
|
|
51
|
+
while (1) switch (_context.p = _context.n) {
|
|
52
|
+
case 0:
|
|
53
|
+
_context.p = 0;
|
|
54
|
+
_context.n = 1;
|
|
55
|
+
return import('next/headers');
|
|
56
|
+
case 1:
|
|
57
|
+
_yield$import = _context.v;
|
|
58
|
+
cookies = _yield$import.cookies;
|
|
59
|
+
_context.n = 2;
|
|
60
|
+
return cookies();
|
|
61
|
+
case 2:
|
|
62
|
+
cookieStore = _context.v;
|
|
63
|
+
return _context.a(2, ((_cookieStore$get = cookieStore.get(Internal$1.VAL_ENABLE_COOKIE_NAME)) === null || _cookieStore$get === void 0 ? void 0 : _cookieStore$get.value) === "true");
|
|
64
|
+
case 3:
|
|
65
|
+
_context.p = 3;
|
|
66
|
+
_context.v;
|
|
67
|
+
return _context.a(2, false);
|
|
68
|
+
}
|
|
69
|
+
}, _callee, null, [[0, 3]]);
|
|
70
|
+
}));
|
|
71
|
+
return _isValEnabled.apply(this, arguments);
|
|
72
|
+
}
|
|
30
73
|
var initVal = function initVal(config) {
|
|
31
74
|
var _createValSystem = initVal$1(config),
|
|
32
75
|
s = _createValSystem.s,
|
|
@@ -37,6 +80,7 @@ var initVal = function initVal(config) {
|
|
|
37
80
|
return {
|
|
38
81
|
s: s,
|
|
39
82
|
c: c,
|
|
83
|
+
isValEnabled: isValEnabled,
|
|
40
84
|
nextAppRouter: nextAppRouter,
|
|
41
85
|
externalPageRouter: externalPageRouter,
|
|
42
86
|
val: _objectSpread2(_objectSpread2({}, val), {}, {
|
|
@@ -136,5 +136,15 @@ function _asyncToGenerator(n) {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
var VERSION = function () {
|
|
140
|
+
try {
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
142
|
+
return require("../package.json").version;
|
|
143
|
+
} catch (_unused) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
}();
|
|
147
|
+
|
|
148
|
+
exports.VERSION = VERSION;
|
|
139
149
|
exports._asyncToGenerator = _asyncToGenerator;
|
|
140
150
|
exports._regenerator = _regenerator;
|
|
@@ -134,4 +134,13 @@ function _asyncToGenerator(n) {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
var VERSION = function () {
|
|
138
|
+
try {
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
140
|
+
return require("../package.json").version;
|
|
141
|
+
} catch (_unused) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}();
|
|
145
|
+
|
|
146
|
+
export { VERSION as V, _asyncToGenerator as _, _regenerator as a };
|
|
@@ -136,5 +136,15 @@ function _asyncToGenerator(n) {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
var VERSION = function () {
|
|
140
|
+
try {
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
142
|
+
return require("../package.json").version;
|
|
143
|
+
} catch (_unused) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
}();
|
|
147
|
+
|
|
148
|
+
exports.VERSION = VERSION;
|
|
139
149
|
exports._asyncToGenerator = _asyncToGenerator;
|
|
140
150
|
exports._regenerator = _regenerator;
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"next",
|
|
13
13
|
"react"
|
|
14
14
|
],
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.97.1",
|
|
16
16
|
"main": "dist/valbuild-next.cjs.js",
|
|
17
17
|
"module": "dist/valbuild-next.esm.js",
|
|
18
18
|
"exports": {
|
|
@@ -47,20 +47,26 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"client-only": "^0.0.1",
|
|
49
49
|
"server-only": "^0.0.1",
|
|
50
|
-
"@valbuild/core": "0.
|
|
51
|
-
"@valbuild/react": "0.
|
|
52
|
-
"@valbuild/server": "0.
|
|
53
|
-
"@valbuild/shared": "0.
|
|
54
|
-
"@valbuild/ui": "0.
|
|
50
|
+
"@valbuild/core": "0.97.1",
|
|
51
|
+
"@valbuild/react": "0.97.1",
|
|
52
|
+
"@valbuild/server": "0.97.1",
|
|
53
|
+
"@valbuild/shared": "0.97.1",
|
|
54
|
+
"@valbuild/ui": "0.97.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
+
"@testing-library/react": "^14.0.0",
|
|
57
58
|
"@types/react": "^18.2.38",
|
|
59
|
+
"@types/react-dom": "^18.2.0",
|
|
60
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
58
61
|
"next": "^13.4.0",
|
|
62
|
+
"react": "^18.2.0",
|
|
63
|
+
"react-dom": "^18.2.0",
|
|
59
64
|
"typescript": "^5.9.3"
|
|
60
65
|
},
|
|
61
66
|
"peerDependencies": {
|
|
62
|
-
"next": ">=
|
|
63
|
-
"react": ">=
|
|
67
|
+
"next": ">=14.3.0",
|
|
68
|
+
"react": ">=19.0.0",
|
|
69
|
+
"react-dom": ">=19.0.0"
|
|
64
70
|
},
|
|
65
71
|
"externals": [
|
|
66
72
|
"next"
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('server-only');
|
|
6
|
-
var objectSpread2 = require('../../dist/objectSpread2-
|
|
7
|
-
var
|
|
6
|
+
var objectSpread2 = require('../../dist/objectSpread2-58024783.cjs.dev.js');
|
|
7
|
+
var version = require('../../dist/version-c311d818.cjs.dev.js');
|
|
8
|
+
var defineProperty = require('../../dist/defineProperty-f90345d7.cjs.dev.js');
|
|
8
9
|
var stega = require('@valbuild/react/stega');
|
|
9
10
|
var core = require('@valbuild/core');
|
|
10
11
|
var internal = require('@valbuild/shared/internal');
|
|
11
12
|
var server = require('@valbuild/server');
|
|
12
|
-
var
|
|
13
|
-
var routeFromVal = require('../../dist/routeFromVal-8fdaa0d0.cjs.dev.js');
|
|
13
|
+
var routeFromVal = require('../../dist/routeFromVal-9b610e77.cjs.dev.js');
|
|
14
14
|
require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
|
|
15
15
|
require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
|
|
16
16
|
require('../../dist/slicedToArray-44036a76.cjs.dev.js');
|
|
@@ -19,9 +19,9 @@ stega.SET_RSC(true);
|
|
|
19
19
|
var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
|
|
20
20
|
return function (selector) {
|
|
21
21
|
var exec = /*#__PURE__*/function () {
|
|
22
|
-
var _ref =
|
|
22
|
+
var _ref = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee() {
|
|
23
23
|
var enabled, headers, cookies, host, _cookies, valServer, treeRes, modules, _t, _t2, _t3;
|
|
24
|
-
return
|
|
24
|
+
return version._regenerator().w(function (_context) {
|
|
25
25
|
while (1) switch (_context.p = _context.n) {
|
|
26
26
|
case 0:
|
|
27
27
|
enabled = false;
|
|
@@ -89,9 +89,11 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
89
89
|
query: {
|
|
90
90
|
validate_sources: true,
|
|
91
91
|
validate_binary_files: false,
|
|
92
|
-
exclude_patches: false
|
|
92
|
+
exclude_patches: false,
|
|
93
|
+
// RSC pre-render uses the legacy "server applies patches" path.
|
|
94
|
+
apply_patches: undefined
|
|
93
95
|
},
|
|
94
|
-
cookies:
|
|
96
|
+
cookies: defineProperty._defineProperty({}, internal.VAL_SESSION_COOKIE, (_cookies = cookies) === null || _cookies === void 0 || (_cookies = _cookies.get(internal.VAL_SESSION_COOKIE)) === null || _cookies === void 0 ? void 0 : _cookies.value)
|
|
95
97
|
});
|
|
96
98
|
case 14:
|
|
97
99
|
treeRes = _context.v;
|
|
@@ -179,9 +181,9 @@ function getHost(headers) {
|
|
|
179
181
|
|
|
180
182
|
var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
|
|
181
183
|
return /*#__PURE__*/function () {
|
|
182
|
-
var _ref2 =
|
|
184
|
+
var _ref2 = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee2(selector, params) {
|
|
183
185
|
var fetchVal, resolvedParams, path, schema, val, route, _t4;
|
|
184
|
-
return
|
|
186
|
+
return version._regenerator().w(function (_context2) {
|
|
185
187
|
while (1) switch (_context2.n) {
|
|
186
188
|
case 0:
|
|
187
189
|
fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
|
|
@@ -214,9 +216,9 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
|
|
|
214
216
|
};
|
|
215
217
|
var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
|
|
216
218
|
return /*#__PURE__*/function () {
|
|
217
|
-
var _ref3 =
|
|
219
|
+
var _ref3 = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee3(selector, params) {
|
|
218
220
|
var fetchVal, resolvedParams, path, schema, val, route, _t5, _t6;
|
|
219
|
-
return
|
|
221
|
+
return version._regenerator().w(function (_context3) {
|
|
220
222
|
while (1) switch (_context3.n) {
|
|
221
223
|
case 0:
|
|
222
224
|
fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
|
|
@@ -274,8 +276,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
274
276
|
}
|
|
275
277
|
}, config), config, {
|
|
276
278
|
isEnabled: function isEnabled() {
|
|
277
|
-
return
|
|
278
|
-
return
|
|
279
|
+
return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee4() {
|
|
280
|
+
return version._regenerator().w(function (_context4) {
|
|
279
281
|
while (1) switch (_context4.n) {
|
|
280
282
|
case 0:
|
|
281
283
|
_context4.n = 1;
|
|
@@ -287,8 +289,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
287
289
|
}))();
|
|
288
290
|
},
|
|
289
291
|
onEnable: function onEnable() {
|
|
290
|
-
return
|
|
291
|
-
return
|
|
292
|
+
return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee5() {
|
|
293
|
+
return version._regenerator().w(function (_context5) {
|
|
292
294
|
while (1) switch (_context5.n) {
|
|
293
295
|
case 0:
|
|
294
296
|
_context5.n = 1;
|
|
@@ -302,8 +304,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
302
304
|
}))();
|
|
303
305
|
},
|
|
304
306
|
onDisable: function onDisable() {
|
|
305
|
-
return
|
|
306
|
-
return
|
|
307
|
+
return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee6() {
|
|
308
|
+
return version._regenerator().w(function (_context6) {
|
|
307
309
|
while (1) switch (_context6.n) {
|
|
308
310
|
case 0:
|
|
309
311
|
_context6.n = 1;
|
|
@@ -320,8 +322,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
320
322
|
return {
|
|
321
323
|
fetchValStega: initFetchValStega(config, valApiEndpoints,
|
|
322
324
|
// TODO: get from config
|
|
323
|
-
valServerPromise, /*#__PURE__*/
|
|
324
|
-
return
|
|
325
|
+
valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee7() {
|
|
326
|
+
return version._regenerator().w(function (_context7) {
|
|
325
327
|
while (1) switch (_context7.n) {
|
|
326
328
|
case 0:
|
|
327
329
|
_context7.n = 1;
|
|
@@ -330,8 +332,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
330
332
|
return _context7.a(2, _context7.v.isEnabled);
|
|
331
333
|
}
|
|
332
334
|
}, _callee7);
|
|
333
|
-
})), /*#__PURE__*/
|
|
334
|
-
return
|
|
335
|
+
})), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee8() {
|
|
336
|
+
return version._regenerator().w(function (_context8) {
|
|
335
337
|
while (1) switch (_context8.n) {
|
|
336
338
|
case 0:
|
|
337
339
|
_context8.n = 1;
|
|
@@ -340,8 +342,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
340
342
|
return _context8.a(2, _context8.v);
|
|
341
343
|
}
|
|
342
344
|
}, _callee8);
|
|
343
|
-
})), /*#__PURE__*/
|
|
344
|
-
return
|
|
345
|
+
})), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee9() {
|
|
346
|
+
return version._regenerator().w(function (_context9) {
|
|
345
347
|
while (1) switch (_context9.n) {
|
|
346
348
|
case 0:
|
|
347
349
|
_context9.n = 1;
|
|
@@ -351,8 +353,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
351
353
|
}
|
|
352
354
|
}, _callee9);
|
|
353
355
|
}))),
|
|
354
|
-
fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/
|
|
355
|
-
return
|
|
356
|
+
fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee0() {
|
|
357
|
+
return version._regenerator().w(function (_context0) {
|
|
356
358
|
while (1) switch (_context0.n) {
|
|
357
359
|
case 0:
|
|
358
360
|
_context0.n = 1;
|
|
@@ -361,8 +363,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
361
363
|
return _context0.a(2, _context0.v.isEnabled);
|
|
362
364
|
}
|
|
363
365
|
}, _callee0);
|
|
364
|
-
})), /*#__PURE__*/
|
|
365
|
-
return
|
|
366
|
+
})), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee1() {
|
|
367
|
+
return version._regenerator().w(function (_context1) {
|
|
366
368
|
while (1) switch (_context1.n) {
|
|
367
369
|
case 0:
|
|
368
370
|
_context1.n = 1;
|
|
@@ -371,8 +373,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
371
373
|
return _context1.a(2, _context1.v);
|
|
372
374
|
}
|
|
373
375
|
}, _callee1);
|
|
374
|
-
})), /*#__PURE__*/
|
|
375
|
-
return
|
|
376
|
+
})), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee10() {
|
|
377
|
+
return version._regenerator().w(function (_context10) {
|
|
376
378
|
while (1) switch (_context10.n) {
|
|
377
379
|
case 0:
|
|
378
380
|
_context10.n = 1;
|
|
@@ -382,8 +384,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
382
384
|
}
|
|
383
385
|
}, _callee10);
|
|
384
386
|
}))),
|
|
385
|
-
fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/
|
|
386
|
-
return
|
|
387
|
+
fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee11() {
|
|
388
|
+
return version._regenerator().w(function (_context11) {
|
|
387
389
|
while (1) switch (_context11.n) {
|
|
388
390
|
case 0:
|
|
389
391
|
_context11.n = 1;
|
|
@@ -392,8 +394,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
392
394
|
return _context11.a(2, _context11.v.isEnabled);
|
|
393
395
|
}
|
|
394
396
|
}, _callee11);
|
|
395
|
-
})), /*#__PURE__*/
|
|
396
|
-
return
|
|
397
|
+
})), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee12() {
|
|
398
|
+
return version._regenerator().w(function (_context12) {
|
|
397
399
|
while (1) switch (_context12.n) {
|
|
398
400
|
case 0:
|
|
399
401
|
_context12.n = 1;
|
|
@@ -402,8 +404,8 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
402
404
|
return _context12.a(2, _context12.v);
|
|
403
405
|
}
|
|
404
406
|
}, _callee12);
|
|
405
|
-
})), /*#__PURE__*/
|
|
406
|
-
return
|
|
407
|
+
})), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee13() {
|
|
408
|
+
return version._regenerator().w(function (_context13) {
|
|
407
409
|
while (1) switch (_context13.n) {
|
|
408
410
|
case 0:
|
|
409
411
|
_context13.n = 1;
|