@valbuild/next 0.64.0 → 0.65.0
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 +36 -91
- package/client/dist/valbuild-next-client.cjs.d.ts +2 -2
- package/client/dist/valbuild-next-client.cjs.dev.js +19 -31
- package/client/dist/valbuild-next-client.cjs.prod.js +19 -31
- package/client/dist/valbuild-next-client.esm.js +19 -31
- package/dist/ValApp-50ec1e10.esm.js +53 -0
- package/dist/ValApp-9eefeefd.cjs.js +7 -0
- package/dist/ValApp-9eefeefd.cjs.prod.js +61 -0
- package/dist/ValApp-de156df4.cjs.dev.js +61 -0
- package/dist/ValNextProvider-0b711372.esm.js +430 -0
- package/dist/ValNextProvider-313af7bb.cjs.js +7 -0
- package/dist/ValNextProvider-313af7bb.cjs.prod.js +439 -0
- package/dist/ValNextProvider-abfbfdb5.cjs.dev.js +439 -0
- package/dist/{ValContext-06fe6f7e.cjs.dev.js → ValOverlayContext-55dae3ea.cjs.dev.js} +62 -71
- package/dist/ValOverlayContext-811e9be9.cjs.js +7 -0
- package/dist/{ValContext-12a3eca2.cjs.prod.js → ValOverlayContext-811e9be9.cjs.prod.js} +62 -71
- package/dist/{ValContext-8a8d9183.esm.js → ValOverlayContext-a2fdbce0.esm.js} +59 -69
- package/dist/{asyncToGenerator-0859ab5c.esm.js → asyncToGenerator-5f8c02f3.esm.js} +19 -24
- package/dist/{asyncToGenerator-ba66657c.cjs.dev.js → asyncToGenerator-67a5ff70.cjs.prod.js} +19 -24
- package/dist/{asyncToGenerator-3551d940.cjs.prod.js → asyncToGenerator-6ba61221.cjs.dev.js} +19 -24
- package/dist/declarations/src/ValApp.d.ts +1 -1
- package/dist/declarations/src/ValImage.d.ts +0 -1
- package/dist/declarations/src/ValProvider.d.ts +3 -5
- package/dist/declarations/src/external_exempt_from_val_quickjs.d.ts +31 -2
- package/dist/declarations/src/rsc/initValRsc.d.ts +1 -1
- package/dist/declarations/src/server/initValServer.d.ts +1 -1
- package/dist/{objectSpread2-bb9509e8.cjs.dev.js → objectSpread2-3c87fb4f.cjs.prod.js} +12 -18
- package/dist/{objectSpread2-24e737a6.cjs.prod.js → objectSpread2-792eb2c2.cjs.dev.js} +12 -18
- package/dist/{objectSpread2-439bdcdd.esm.js → objectSpread2-c1340c1c.esm.js} +12 -18
- package/dist/{slicedToArray-c03b6356.cjs.dev.js → slicedToArray-44036a76.cjs.dev.js} +5 -5
- package/dist/{slicedToArray-1ff80c5e.esm.js → slicedToArray-aa291011.esm.js} +5 -5
- package/dist/{slicedToArray-1d91551a.cjs.prod.js → slicedToArray-ce613de6.cjs.prod.js} +5 -5
- package/dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js +17 -0
- package/dist/unsupportedIterableToArray-5baabfdc.esm.js +15 -0
- package/dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js +17 -0
- package/dist/valbuild-next.cjs.d.ts +2 -2
- package/dist/valbuild-next.cjs.dev.js +23 -28
- package/dist/valbuild-next.cjs.prod.js +23 -28
- package/dist/valbuild-next.esm.js +23 -28
- package/package.json +6 -6
- package/rsc/dist/valbuild-next-rsc.cjs.d.ts +2 -2
- package/rsc/dist/valbuild-next-rsc.cjs.dev.js +10 -12
- package/rsc/dist/valbuild-next-rsc.cjs.prod.js +10 -9
- package/rsc/dist/valbuild-next-rsc.esm.js +11 -13
- package/server/dist/valbuild-next-server.cjs.d.ts +2 -2
- package/server/dist/valbuild-next-server.cjs.dev.js +8 -8
- package/server/dist/valbuild-next-server.cjs.prod.js +8 -8
- package/server/dist/valbuild-next-server.esm.js +8 -8
- package/client/dist/valbuild-next-client.cjs.d.ts.map +0 -1
- package/dist/ValApp-0ec0c7f3.cjs.js +0 -7
- package/dist/ValApp-0ec0c7f3.cjs.prod.js +0 -34
- package/dist/ValApp-61103149.esm.js +0 -26
- package/dist/ValApp-aff60572.cjs.dev.js +0 -34
- package/dist/ValContext-12a3eca2.cjs.js +0 -7
- package/dist/ValNextProvider-5226c452.cjs.js +0 -7
- package/dist/ValNextProvider-5226c452.cjs.prod.js +0 -101
- package/dist/ValNextProvider-ccbea1bd.cjs.dev.js +0 -101
- package/dist/ValNextProvider-d94cd904.esm.js +0 -92
- package/dist/unsupportedIterableToArray-51bb61c2.esm.js +0 -16
- package/dist/unsupportedIterableToArray-9e97e24a.cjs.dev.js +0 -18
- package/dist/unsupportedIterableToArray-afbea1dd.cjs.prod.js +0 -18
- package/dist/valbuild-next.cjs.d.ts.map +0 -1
- package/rsc/dist/valbuild-next-rsc.cjs.d.ts.map +0 -1
- package/server/dist/valbuild-next-server.cjs.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"next",
|
|
9
9
|
"react"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.65.0",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
14
|
"test": "jest"
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"exports": true
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@valbuild/core": "~0.
|
|
49
|
-
"@valbuild/react": "~0.
|
|
50
|
-
"@valbuild/server": "~0.
|
|
51
|
-
"@valbuild/shared": "~0.
|
|
52
|
-
"@valbuild/ui": "~0.
|
|
48
|
+
"@valbuild/core": "~0.65.0",
|
|
49
|
+
"@valbuild/react": "~0.65.0",
|
|
50
|
+
"@valbuild/server": "~0.65.0",
|
|
51
|
+
"@valbuild/shared": "~0.65.0",
|
|
52
|
+
"@valbuild/ui": "~0.65.0",
|
|
53
53
|
"client-only": "^0.0.1",
|
|
54
54
|
"server-only": "^0.0.1"
|
|
55
55
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "../../dist/declarations/src/rsc/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "../../dist/declarations/src/rsc/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsYnVpbGQtbmV4dC1yc2MuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvcnNjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('server-only');
|
|
6
|
-
var objectSpread2 = require('../../dist/objectSpread2-
|
|
7
|
-
var asyncToGenerator = require('../../dist/asyncToGenerator-
|
|
6
|
+
var objectSpread2 = require('../../dist/objectSpread2-792eb2c2.cjs.dev.js');
|
|
7
|
+
var asyncToGenerator = require('../../dist/asyncToGenerator-6ba61221.cjs.dev.js');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
9
9
|
var core = require('@valbuild/core');
|
|
10
10
|
var internal = require('@valbuild/shared/internal');
|
|
11
11
|
var server = require('@valbuild/server');
|
|
12
12
|
var version = require('../../dist/version-82faa1d0.cjs.dev.js');
|
|
13
13
|
|
|
14
|
+
stega.SET_RSC(true);
|
|
14
15
|
var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
|
|
15
16
|
return function (selector) {
|
|
16
17
|
var enabled = false;
|
|
@@ -41,8 +42,8 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
41
42
|
}();
|
|
42
43
|
var host = headers && getHost(headers);
|
|
43
44
|
if (host && cookies) {
|
|
44
|
-
return valServerPromise.then(
|
|
45
|
-
var _ref = asyncToGenerator._asyncToGenerator(
|
|
45
|
+
return valServerPromise.then(/*#__PURE__*/function () {
|
|
46
|
+
var _ref = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee(valServer) {
|
|
46
47
|
var _cookies$get, _cookies$get2;
|
|
47
48
|
var patchesRes, allPatches, treeRes, modules;
|
|
48
49
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -69,7 +70,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
69
70
|
case 6:
|
|
70
71
|
allPatches = Object.keys(patchesRes.json.patches);
|
|
71
72
|
_context.next = 9;
|
|
72
|
-
return valServer["/
|
|
73
|
+
return valServer["/sources"]["PUT"]({
|
|
73
74
|
path: "/",
|
|
74
75
|
query: {
|
|
75
76
|
validate_sources: true,
|
|
@@ -119,9 +120,6 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
119
120
|
};
|
|
120
121
|
}())["catch"](function (err) {
|
|
121
122
|
console.error("Val: failed while fetching modules", err);
|
|
122
|
-
if (process.env.NODE_ENV === "development") {
|
|
123
|
-
throw Error("Val: Could not fetch data. This is likely due to a misconfiguration or a bug. Check the console for more details.");
|
|
124
|
-
}
|
|
125
123
|
return stega.stegaEncode(selector, {});
|
|
126
124
|
});
|
|
127
125
|
}
|
|
@@ -188,9 +186,9 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
188
186
|
next: nextVersion,
|
|
189
187
|
core: coreVersion
|
|
190
188
|
}
|
|
191
|
-
}, config), {
|
|
189
|
+
}, config), config, {
|
|
192
190
|
isEnabled: function isEnabled() {
|
|
193
|
-
return asyncToGenerator._asyncToGenerator(
|
|
191
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee2() {
|
|
194
192
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
195
193
|
while (1) switch (_context2.prev = _context2.next) {
|
|
196
194
|
case 0:
|
|
@@ -203,7 +201,7 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
203
201
|
}))();
|
|
204
202
|
},
|
|
205
203
|
onEnable: function onEnable() {
|
|
206
|
-
return asyncToGenerator._asyncToGenerator(
|
|
204
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
|
|
207
205
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
208
206
|
while (1) switch (_context3.prev = _context3.next) {
|
|
209
207
|
case 0:
|
|
@@ -216,7 +214,7 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
216
214
|
}))();
|
|
217
215
|
},
|
|
218
216
|
onDisable: function onDisable() {
|
|
219
|
-
return asyncToGenerator._asyncToGenerator(
|
|
217
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee4() {
|
|
220
218
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
221
219
|
while (1) switch (_context4.prev = _context4.next) {
|
|
222
220
|
case 0:
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('server-only');
|
|
6
|
-
var objectSpread2 = require('../../dist/objectSpread2-
|
|
7
|
-
var asyncToGenerator = require('../../dist/asyncToGenerator-
|
|
6
|
+
var objectSpread2 = require('../../dist/objectSpread2-3c87fb4f.cjs.prod.js');
|
|
7
|
+
var asyncToGenerator = require('../../dist/asyncToGenerator-67a5ff70.cjs.prod.js');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
9
9
|
var core = require('@valbuild/core');
|
|
10
10
|
var internal = require('@valbuild/shared/internal');
|
|
11
11
|
var server = require('@valbuild/server');
|
|
12
12
|
var version = require('../../dist/version-a9a6a619.cjs.prod.js');
|
|
13
13
|
|
|
14
|
+
stega.SET_RSC(true);
|
|
14
15
|
var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
|
|
15
16
|
return function (selector) {
|
|
16
17
|
var enabled = false;
|
|
@@ -41,8 +42,8 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
41
42
|
}();
|
|
42
43
|
var host = headers && getHost(headers);
|
|
43
44
|
if (host && cookies) {
|
|
44
|
-
return valServerPromise.then(
|
|
45
|
-
var _ref = asyncToGenerator._asyncToGenerator(
|
|
45
|
+
return valServerPromise.then(/*#__PURE__*/function () {
|
|
46
|
+
var _ref = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee(valServer) {
|
|
46
47
|
var _cookies$get, _cookies$get2;
|
|
47
48
|
var patchesRes, allPatches, treeRes, modules;
|
|
48
49
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -69,7 +70,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
69
70
|
case 6:
|
|
70
71
|
allPatches = Object.keys(patchesRes.json.patches);
|
|
71
72
|
_context.next = 9;
|
|
72
|
-
return valServer["/
|
|
73
|
+
return valServer["/sources"]["PUT"]({
|
|
73
74
|
path: "/",
|
|
74
75
|
query: {
|
|
75
76
|
validate_sources: true,
|
|
@@ -185,9 +186,9 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
185
186
|
next: nextVersion,
|
|
186
187
|
core: coreVersion
|
|
187
188
|
}
|
|
188
|
-
}, config), {
|
|
189
|
+
}, config), config, {
|
|
189
190
|
isEnabled: function isEnabled() {
|
|
190
|
-
return asyncToGenerator._asyncToGenerator(
|
|
191
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee2() {
|
|
191
192
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
192
193
|
while (1) switch (_context2.prev = _context2.next) {
|
|
193
194
|
case 0:
|
|
@@ -200,7 +201,7 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
200
201
|
}))();
|
|
201
202
|
},
|
|
202
203
|
onEnable: function onEnable() {
|
|
203
|
-
return asyncToGenerator._asyncToGenerator(
|
|
204
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
|
|
204
205
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
205
206
|
while (1) switch (_context3.prev = _context3.next) {
|
|
206
207
|
case 0:
|
|
@@ -213,7 +214,7 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
213
214
|
}))();
|
|
214
215
|
},
|
|
215
216
|
onDisable: function onDisable() {
|
|
216
|
-
return asyncToGenerator._asyncToGenerator(
|
|
217
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee4() {
|
|
217
218
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
218
219
|
while (1) switch (_context4.prev = _context4.next) {
|
|
219
220
|
case 0:
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
|
-
import { _ as _objectSpread2, a as _defineProperty } from '../../dist/objectSpread2-
|
|
3
|
-
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/asyncToGenerator-
|
|
4
|
-
import { SET_AUTO_TAG_JSX_ENABLED, stegaEncode } from '@valbuild/react/stega';
|
|
2
|
+
import { _ as _objectSpread2, a as _defineProperty } from '../../dist/objectSpread2-c1340c1c.esm.js';
|
|
3
|
+
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/asyncToGenerator-5f8c02f3.esm.js';
|
|
4
|
+
import { SET_RSC, SET_AUTO_TAG_JSX_ENABLED, stegaEncode } from '@valbuild/react/stega';
|
|
5
5
|
import { Internal } from '@valbuild/core';
|
|
6
6
|
import { VAL_SESSION_COOKIE } from '@valbuild/shared/internal';
|
|
7
7
|
import { createValServer } from '@valbuild/server';
|
|
8
8
|
import { V as VERSION } from '../../dist/version-98ec5c7a.esm.js';
|
|
9
9
|
|
|
10
|
+
SET_RSC(true);
|
|
10
11
|
var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
|
|
11
12
|
return function (selector) {
|
|
12
13
|
var enabled = false;
|
|
@@ -37,8 +38,8 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
37
38
|
}();
|
|
38
39
|
var host = headers && getHost(headers);
|
|
39
40
|
if (host && cookies) {
|
|
40
|
-
return valServerPromise.then(
|
|
41
|
-
var _ref = _asyncToGenerator(
|
|
41
|
+
return valServerPromise.then(/*#__PURE__*/function () {
|
|
42
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(valServer) {
|
|
42
43
|
var _cookies$get, _cookies$get2;
|
|
43
44
|
var patchesRes, allPatches, treeRes, modules;
|
|
44
45
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -65,7 +66,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
65
66
|
case 6:
|
|
66
67
|
allPatches = Object.keys(patchesRes.json.patches);
|
|
67
68
|
_context.next = 9;
|
|
68
|
-
return valServer["/
|
|
69
|
+
return valServer["/sources"]["PUT"]({
|
|
69
70
|
path: "/",
|
|
70
71
|
query: {
|
|
71
72
|
validate_sources: true,
|
|
@@ -115,9 +116,6 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
|
|
|
115
116
|
};
|
|
116
117
|
}())["catch"](function (err) {
|
|
117
118
|
console.error("Val: failed while fetching modules", err);
|
|
118
|
-
if (process.env.NODE_ENV === "development") {
|
|
119
|
-
throw Error("Val: Could not fetch data. This is likely due to a misconfiguration or a bug. Check the console for more details.");
|
|
120
|
-
}
|
|
121
119
|
return stegaEncode(selector, {});
|
|
122
120
|
});
|
|
123
121
|
}
|
|
@@ -184,9 +182,9 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
184
182
|
next: nextVersion,
|
|
185
183
|
core: coreVersion
|
|
186
184
|
}
|
|
187
|
-
}, config), {
|
|
185
|
+
}, config), config, {
|
|
188
186
|
isEnabled: function isEnabled() {
|
|
189
|
-
return _asyncToGenerator(
|
|
187
|
+
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
190
188
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
191
189
|
while (1) switch (_context2.prev = _context2.next) {
|
|
192
190
|
case 0:
|
|
@@ -199,7 +197,7 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
199
197
|
}))();
|
|
200
198
|
},
|
|
201
199
|
onEnable: function onEnable() {
|
|
202
|
-
return _asyncToGenerator(
|
|
200
|
+
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
203
201
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
204
202
|
while (1) switch (_context3.prev = _context3.next) {
|
|
205
203
|
case 0:
|
|
@@ -212,7 +210,7 @@ function initValRsc(config, valModules, rscNextConfig) {
|
|
|
212
210
|
}))();
|
|
213
211
|
},
|
|
214
212
|
onDisable: function onDisable() {
|
|
215
|
-
return _asyncToGenerator(
|
|
213
|
+
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
216
214
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
217
215
|
while (1) switch (_context4.prev = _context4.next) {
|
|
218
216
|
case 0:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "../../dist/declarations/src/server/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "../../dist/declarations/src/server/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsYnVpbGQtbmV4dC1zZXJ2ZXIuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvc2VydmVyL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('server-only');
|
|
6
|
-
var slicedToArray = require('../../dist/slicedToArray-
|
|
7
|
-
var asyncToGenerator = require('../../dist/asyncToGenerator-
|
|
8
|
-
var objectSpread2 = require('../../dist/objectSpread2-
|
|
6
|
+
var slicedToArray = require('../../dist/slicedToArray-44036a76.cjs.dev.js');
|
|
7
|
+
var asyncToGenerator = require('../../dist/asyncToGenerator-6ba61221.cjs.dev.js');
|
|
8
|
+
var objectSpread2 = require('../../dist/objectSpread2-792eb2c2.cjs.dev.js');
|
|
9
9
|
var core = require('@valbuild/core');
|
|
10
10
|
var server = require('@valbuild/server');
|
|
11
11
|
var server$1 = require('next/server');
|
|
12
12
|
var version = require('../../dist/version-82faa1d0.cjs.dev.js');
|
|
13
|
-
require('../../dist/unsupportedIterableToArray-
|
|
13
|
+
require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
|
|
14
14
|
|
|
15
15
|
var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
|
|
16
16
|
var route = "/api/val"; // TODO: get from config
|
|
@@ -27,9 +27,9 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
27
27
|
next: nextVersion,
|
|
28
28
|
core: coreVersion
|
|
29
29
|
}
|
|
30
|
-
}, config), {
|
|
30
|
+
}, config), config, {
|
|
31
31
|
isEnabled: function isEnabled() {
|
|
32
|
-
return asyncToGenerator._asyncToGenerator(
|
|
32
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee() {
|
|
33
33
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
34
34
|
while (1) switch (_context.prev = _context.next) {
|
|
35
35
|
case 0:
|
|
@@ -42,7 +42,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
42
42
|
}))();
|
|
43
43
|
},
|
|
44
44
|
onEnable: function onEnable() {
|
|
45
|
-
return asyncToGenerator._asyncToGenerator(
|
|
45
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee2() {
|
|
46
46
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
47
47
|
while (1) switch (_context2.prev = _context2.next) {
|
|
48
48
|
case 0:
|
|
@@ -55,7 +55,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
55
55
|
}))();
|
|
56
56
|
},
|
|
57
57
|
onDisable: function onDisable() {
|
|
58
|
-
return asyncToGenerator._asyncToGenerator(
|
|
58
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
|
|
59
59
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
60
60
|
while (1) switch (_context3.prev = _context3.next) {
|
|
61
61
|
case 0:
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('server-only');
|
|
6
|
-
var slicedToArray = require('../../dist/slicedToArray-
|
|
7
|
-
var asyncToGenerator = require('../../dist/asyncToGenerator-
|
|
8
|
-
var objectSpread2 = require('../../dist/objectSpread2-
|
|
6
|
+
var slicedToArray = require('../../dist/slicedToArray-ce613de6.cjs.prod.js');
|
|
7
|
+
var asyncToGenerator = require('../../dist/asyncToGenerator-67a5ff70.cjs.prod.js');
|
|
8
|
+
var objectSpread2 = require('../../dist/objectSpread2-3c87fb4f.cjs.prod.js');
|
|
9
9
|
var core = require('@valbuild/core');
|
|
10
10
|
var server = require('@valbuild/server');
|
|
11
11
|
var server$1 = require('next/server');
|
|
12
12
|
var version = require('../../dist/version-a9a6a619.cjs.prod.js');
|
|
13
|
-
require('../../dist/unsupportedIterableToArray-
|
|
13
|
+
require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
|
|
14
14
|
|
|
15
15
|
var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
|
|
16
16
|
var route = "/api/val"; // TODO: get from config
|
|
@@ -27,9 +27,9 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
27
27
|
next: nextVersion,
|
|
28
28
|
core: coreVersion
|
|
29
29
|
}
|
|
30
|
-
}, config), {
|
|
30
|
+
}, config), config, {
|
|
31
31
|
isEnabled: function isEnabled() {
|
|
32
|
-
return asyncToGenerator._asyncToGenerator(
|
|
32
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee() {
|
|
33
33
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee$(_context) {
|
|
34
34
|
while (1) switch (_context.prev = _context.next) {
|
|
35
35
|
case 0:
|
|
@@ -42,7 +42,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
42
42
|
}))();
|
|
43
43
|
},
|
|
44
44
|
onEnable: function onEnable() {
|
|
45
|
-
return asyncToGenerator._asyncToGenerator(
|
|
45
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee2() {
|
|
46
46
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
47
47
|
while (1) switch (_context2.prev = _context2.next) {
|
|
48
48
|
case 0:
|
|
@@ -55,7 +55,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
55
55
|
}))();
|
|
56
56
|
},
|
|
57
57
|
onDisable: function onDisable() {
|
|
58
|
-
return asyncToGenerator._asyncToGenerator(
|
|
58
|
+
return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
|
|
59
59
|
return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
60
60
|
while (1) switch (_context3.prev = _context3.next) {
|
|
61
61
|
case 0:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import 'server-only';
|
|
2
|
-
import { _ as _slicedToArray } from '../../dist/slicedToArray-
|
|
3
|
-
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/asyncToGenerator-
|
|
4
|
-
import { _ as _objectSpread2 } from '../../dist/objectSpread2-
|
|
2
|
+
import { _ as _slicedToArray } from '../../dist/slicedToArray-aa291011.esm.js';
|
|
3
|
+
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../dist/asyncToGenerator-5f8c02f3.esm.js';
|
|
4
|
+
import { _ as _objectSpread2 } from '../../dist/objectSpread2-c1340c1c.esm.js';
|
|
5
5
|
import { Internal } from '@valbuild/core';
|
|
6
6
|
import { createValApiRouter, createValServer } from '@valbuild/server';
|
|
7
7
|
import { NextResponse } from 'next/server';
|
|
8
8
|
import { V as VERSION } from '../../dist/version-98ec5c7a.esm.js';
|
|
9
|
-
import '../../dist/unsupportedIterableToArray-
|
|
9
|
+
import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
|
|
10
10
|
|
|
11
11
|
var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
|
|
12
12
|
var route = "/api/val"; // TODO: get from config
|
|
@@ -23,9 +23,9 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
23
23
|
next: nextVersion,
|
|
24
24
|
core: coreVersion
|
|
25
25
|
}
|
|
26
|
-
}, config), {
|
|
26
|
+
}, config), config, {
|
|
27
27
|
isEnabled: function isEnabled() {
|
|
28
|
-
return _asyncToGenerator(
|
|
28
|
+
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29
29
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
30
30
|
while (1) switch (_context.prev = _context.next) {
|
|
31
31
|
case 0:
|
|
@@ -38,7 +38,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
38
38
|
}))();
|
|
39
39
|
},
|
|
40
40
|
onEnable: function onEnable() {
|
|
41
|
-
return _asyncToGenerator(
|
|
41
|
+
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
42
42
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
43
43
|
while (1) switch (_context2.prev = _context2.next) {
|
|
44
44
|
case 0:
|
|
@@ -51,7 +51,7 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
|
|
|
51
51
|
}))();
|
|
52
52
|
},
|
|
53
53
|
onDisable: function onDisable() {
|
|
54
|
-
return _asyncToGenerator(
|
|
54
|
+
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
55
55
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
56
56
|
while (1) switch (_context3.prev = _context3.next) {
|
|
57
57
|
case 0:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"valbuild-next-client.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/client/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var ui = require('@valbuild/ui');
|
|
7
|
-
var Script = require('next/script');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
13
|
-
|
|
14
|
-
function _objectDestructuringEmpty(obj) {
|
|
15
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var ValApp = function ValApp(_ref) {
|
|
19
|
-
_objectDestructuringEmpty(_ref);
|
|
20
|
-
var route = "/api/val";
|
|
21
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
22
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("link", {
|
|
23
|
-
rel: "stylesheet",
|
|
24
|
-
href: "".concat(route , "/static").concat(ui.VAL_CSS_PATH)
|
|
25
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Script__default["default"], {
|
|
26
|
-
type: "module",
|
|
27
|
-
src: "".concat(route, "/static").concat(ui.VAL_APP_PATH)
|
|
28
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
29
|
-
id: ui.VAL_APP_ID
|
|
30
|
-
})]
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.ValApp = ValApp;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { VAL_CSS_PATH, VAL_APP_PATH, VAL_APP_ID } from '@valbuild/ui';
|
|
3
|
-
import Script from 'next/script';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function _objectDestructuringEmpty(obj) {
|
|
7
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
var ValApp = function ValApp(_ref) {
|
|
11
|
-
_objectDestructuringEmpty(_ref);
|
|
12
|
-
var route = "/api/val";
|
|
13
|
-
return /*#__PURE__*/jsxs("div", {
|
|
14
|
-
children: [/*#__PURE__*/jsx("link", {
|
|
15
|
-
rel: "stylesheet",
|
|
16
|
-
href: "".concat(route , "/static").concat(VAL_CSS_PATH)
|
|
17
|
-
}), /*#__PURE__*/jsx(Script, {
|
|
18
|
-
type: "module",
|
|
19
|
-
src: "".concat(route, "/static").concat(VAL_APP_PATH)
|
|
20
|
-
}), /*#__PURE__*/jsx("div", {
|
|
21
|
-
id: VAL_APP_ID
|
|
22
|
-
})]
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { ValApp };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var ui = require('@valbuild/ui');
|
|
7
|
-
var Script = require('next/script');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
13
|
-
|
|
14
|
-
function _objectDestructuringEmpty(obj) {
|
|
15
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var ValApp = function ValApp(_ref) {
|
|
19
|
-
_objectDestructuringEmpty(_ref);
|
|
20
|
-
var route = "/api/val";
|
|
21
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
22
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("link", {
|
|
23
|
-
rel: "stylesheet",
|
|
24
|
-
href: "".concat(route , "/static").concat(ui.VAL_CSS_PATH)
|
|
25
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Script__default["default"], {
|
|
26
|
-
type: "module",
|
|
27
|
-
src: "".concat(route, "/static").concat(ui.VAL_APP_PATH)
|
|
28
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
29
|
-
id: ui.VAL_APP_ID
|
|
30
|
-
})]
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.ValApp = ValApp;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var slicedToArray = require('./slicedToArray-1d91551a.cjs.prod.js');
|
|
7
|
-
var core = require('@valbuild/core');
|
|
8
|
-
var ui = require('@valbuild/ui');
|
|
9
|
-
var navigation = require('next/navigation');
|
|
10
|
-
var Script = require('next/script');
|
|
11
|
-
var React = require('react');
|
|
12
|
-
var ValContext = require('./ValContext-12a3eca2.cjs.prod.js');
|
|
13
|
-
var stega = require('@valbuild/react/stega');
|
|
14
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
15
|
-
require('./unsupportedIterableToArray-afbea1dd.cjs.prod.js');
|
|
16
|
-
|
|
17
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var Script__default = /*#__PURE__*/_interopDefault(Script);
|
|
20
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
21
|
-
|
|
22
|
-
var ValNextProvider = function ValNextProvider(props) {
|
|
23
|
-
var pathname = navigation.usePathname();
|
|
24
|
-
|
|
25
|
-
// TODO: use config to get /val and /api/val
|
|
26
|
-
if (pathname.startsWith("/val")) {
|
|
27
|
-
return props.children;
|
|
28
|
-
}
|
|
29
|
-
var route = "/api/val";
|
|
30
|
-
|
|
31
|
-
// TODO: move below into react package
|
|
32
|
-
var valEvents = React__default["default"].useMemo(function () {
|
|
33
|
-
return new ValContext.ValEvents();
|
|
34
|
-
}, []);
|
|
35
|
-
var _React$useTransition = React__default["default"].useTransition(),
|
|
36
|
-
_React$useTransition2 = slicedToArray._slicedToArray(_React$useTransition, 2),
|
|
37
|
-
startTransition = _React$useTransition2[1];
|
|
38
|
-
var router = navigation.useRouter();
|
|
39
|
-
var _React$useState = React__default["default"].useState(false),
|
|
40
|
-
_React$useState2 = slicedToArray._slicedToArray(_React$useState, 2),
|
|
41
|
-
enabled = _React$useState2[0],
|
|
42
|
-
setEnabled = _React$useState2[1];
|
|
43
|
-
React__default["default"].useEffect(function () {
|
|
44
|
-
setEnabled(document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true")));
|
|
45
|
-
}, []);
|
|
46
|
-
React__default["default"].useEffect(function () {
|
|
47
|
-
if (enabled) {
|
|
48
|
-
stega.SET_AUTO_TAG_JSX_ENABLED(true);
|
|
49
|
-
var valEventListener = function valEventListener(event) {
|
|
50
|
-
if (event instanceof CustomEvent) {
|
|
51
|
-
if (event.detail.type === "module-update") {
|
|
52
|
-
var _event$detail = event.detail,
|
|
53
|
-
path = _event$detail.path,
|
|
54
|
-
source = _event$detail.source;
|
|
55
|
-
if (typeof path === "string" && source !== undefined) {
|
|
56
|
-
valEvents.update(path, source);
|
|
57
|
-
} else {
|
|
58
|
-
console.error("Val: invalid event detail", event.detail);
|
|
59
|
-
}
|
|
60
|
-
} else if (event.detail.type === "overlay-submit") {
|
|
61
|
-
var refreshRequired = event.detail.refreshRequired;
|
|
62
|
-
if (refreshRequired && !props.disableRefresh) {
|
|
63
|
-
startTransition(function () {
|
|
64
|
-
router.refresh();
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
console.error("Val: invalid event", event);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
window.addEventListener("val-event", valEventListener);
|
|
73
|
-
return function () {
|
|
74
|
-
window.removeEventListener("val-event", valEventListener);
|
|
75
|
-
};
|
|
76
|
-
} else {
|
|
77
|
-
stega.SET_AUTO_TAG_JSX_ENABLED(false);
|
|
78
|
-
if (process.env["NODE_ENV"] === "development" && !document.cookie.includes("".concat(core.Internal.VAL_ENABLE_COOKIE_NAME, "=true"))) {
|
|
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."));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}, [enabled]);
|
|
83
|
-
|
|
84
|
-
// TODO: use portal to mount overlay
|
|
85
|
-
return /*#__PURE__*/jsxRuntime.jsxs(ValContext.ValContext.Provider, {
|
|
86
|
-
value: {
|
|
87
|
-
valEvents: valEvents,
|
|
88
|
-
enabled: enabled
|
|
89
|
-
},
|
|
90
|
-
children: [props.children, enabled && /*#__PURE__*/jsxRuntime.jsxs(React__default["default"].Fragment, {
|
|
91
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Script__default["default"], {
|
|
92
|
-
type: "module",
|
|
93
|
-
src: "".concat(route, "/static").concat(ui.VAL_APP_PATH)
|
|
94
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
95
|
-
id: ui.VAL_OVERLAY_ID
|
|
96
|
-
})]
|
|
97
|
-
})]
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
exports.ValNextProvider = ValNextProvider;
|