@valbuild/next 0.96.2 → 0.97.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.
Files changed (44) hide show
  1. package/README.md +33 -0
  2. package/client/dist/valbuild-next-client.cjs.dev.js +29 -10
  3. package/client/dist/valbuild-next-client.cjs.prod.js +29 -10
  4. package/client/dist/valbuild-next-client.esm.js +29 -10
  5. package/dist/{ValNextProvider-26ef0c1c.cjs.dev.js → ValNextProvider-03a9f8fd.cjs.dev.js} +103 -25
  6. package/dist/ValNextProvider-6103cb74.cjs.js +7 -0
  7. package/dist/{ValNextProvider-b0d9fa24.cjs.prod.js → ValNextProvider-6103cb74.cjs.prod.js} +103 -25
  8. package/dist/{ValNextProvider-e163e127.esm.js → ValNextProvider-7302b8af.esm.js} +104 -26
  9. package/dist/ValOverlayContext-3c37e5a7.esm.js +251 -0
  10. package/dist/ValOverlayContext-c6f27a6d.cjs.dev.js +262 -0
  11. package/dist/ValOverlayContext-f7f45bc7.cjs.js +7 -0
  12. package/dist/ValOverlayContext-f7f45bc7.cjs.prod.js +262 -0
  13. package/dist/declarations/src/ValProvider.d.ts +1 -0
  14. package/dist/declarations/src/initVal.d.ts +25 -0
  15. package/dist/defineProperty-8951f469.cjs.prod.js +29 -0
  16. package/dist/defineProperty-cca5affa.esm.js +26 -0
  17. package/dist/defineProperty-f90345d7.cjs.dev.js +29 -0
  18. package/dist/{objectSpread2-3c87fb4f.cjs.prod.js → objectSpread2-13f847a9.cjs.prod.js} +2 -27
  19. package/dist/{objectSpread2-792eb2c2.cjs.dev.js → objectSpread2-58024783.cjs.dev.js} +2 -27
  20. package/dist/{objectSpread2-c1340c1c.esm.js → objectSpread2-60d1bd93.esm.js} +2 -25
  21. package/dist/{routeFromVal-ef8c304a.cjs.prod.js → routeFromVal-13c832b2.cjs.prod.js} +1 -1
  22. package/dist/{routeFromVal-748d2aec.esm.js → routeFromVal-8855a5cc.esm.js} +1 -1
  23. package/dist/{routeFromVal-8fdaa0d0.cjs.dev.js → routeFromVal-9b610e77.cjs.dev.js} +1 -1
  24. package/dist/valbuild-next.cjs.dev.js +46 -3
  25. package/dist/valbuild-next.cjs.prod.js +46 -3
  26. package/dist/valbuild-next.esm.js +46 -3
  27. package/dist/{asyncToGenerator-8e5c36c8.cjs.prod.js → version-0e6da9a7.cjs.prod.js} +10 -0
  28. package/dist/{asyncToGenerator-500f022f.esm.js → version-4d7b692c.esm.js} +10 -1
  29. package/dist/{asyncToGenerator-c3823d62.cjs.dev.js → version-c311d818.cjs.dev.js} +10 -0
  30. package/package.json +14 -8
  31. package/rsc/dist/valbuild-next-rsc.cjs.dev.js +35 -35
  32. package/rsc/dist/valbuild-next-rsc.cjs.prod.js +35 -35
  33. package/rsc/dist/valbuild-next-rsc.esm.js +4 -4
  34. package/server/dist/valbuild-next-server.cjs.dev.js +9 -9
  35. package/server/dist/valbuild-next-server.cjs.prod.js +9 -9
  36. package/server/dist/valbuild-next-server.esm.js +3 -3
  37. package/dist/ValNextProvider-b0d9fa24.cjs.js +0 -7
  38. package/dist/ValOverlayContext-6635a4d7.esm.js +0 -114
  39. package/dist/ValOverlayContext-942f1294.cjs.js +0 -7
  40. package/dist/ValOverlayContext-942f1294.cjs.prod.js +0 -125
  41. package/dist/ValOverlayContext-c82a4507.cjs.dev.js +0 -125
  42. package/dist/version-16f6b0ce.esm.js +0 -10
  43. package/dist/version-d034b2fc.cjs.dev.js +0 -12
  44. package/dist/version-d2061026.cjs.prod.js +0 -12
@@ -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-792eb2c2.cjs.dev.js');
7
- var asyncToGenerator = require('../../dist/asyncToGenerator-c3823d62.cjs.dev.js');
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 version = require('../../dist/version-d034b2fc.cjs.dev.js');
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 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee() {
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 asyncToGenerator._regenerator().w(function (_context) {
24
+ return version._regenerator().w(function (_context) {
25
25
  while (1) switch (_context.p = _context.n) {
26
26
  case 0:
27
27
  enabled = false;
@@ -91,7 +91,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
91
91
  validate_binary_files: false,
92
92
  exclude_patches: false
93
93
  },
94
- cookies: objectSpread2._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)
94
+ 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
95
  });
96
96
  case 14:
97
97
  treeRes = _context.v;
@@ -179,9 +179,9 @@ function getHost(headers) {
179
179
 
180
180
  var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
181
181
  return /*#__PURE__*/function () {
182
- var _ref2 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee2(selector, params) {
182
+ var _ref2 = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee2(selector, params) {
183
183
  var fetchVal, resolvedParams, path, schema, val, route, _t4;
184
- return asyncToGenerator._regenerator().w(function (_context2) {
184
+ return version._regenerator().w(function (_context2) {
185
185
  while (1) switch (_context2.n) {
186
186
  case 0:
187
187
  fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
@@ -214,9 +214,9 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
214
214
  };
215
215
  var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
216
216
  return /*#__PURE__*/function () {
217
- var _ref3 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee3(selector, params) {
217
+ var _ref3 = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee3(selector, params) {
218
218
  var fetchVal, resolvedParams, path, schema, val, route, _t5, _t6;
219
- return asyncToGenerator._regenerator().w(function (_context3) {
219
+ return version._regenerator().w(function (_context3) {
220
220
  while (1) switch (_context3.n) {
221
221
  case 0:
222
222
  fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
@@ -274,8 +274,8 @@ function initValRsc(config, valModules, rscNextConfig) {
274
274
  }
275
275
  }, config), config, {
276
276
  isEnabled: function isEnabled() {
277
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee4() {
278
- return asyncToGenerator._regenerator().w(function (_context4) {
277
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee4() {
278
+ return version._regenerator().w(function (_context4) {
279
279
  while (1) switch (_context4.n) {
280
280
  case 0:
281
281
  _context4.n = 1;
@@ -287,8 +287,8 @@ function initValRsc(config, valModules, rscNextConfig) {
287
287
  }))();
288
288
  },
289
289
  onEnable: function onEnable() {
290
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee5() {
291
- return asyncToGenerator._regenerator().w(function (_context5) {
290
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee5() {
291
+ return version._regenerator().w(function (_context5) {
292
292
  while (1) switch (_context5.n) {
293
293
  case 0:
294
294
  _context5.n = 1;
@@ -302,8 +302,8 @@ function initValRsc(config, valModules, rscNextConfig) {
302
302
  }))();
303
303
  },
304
304
  onDisable: function onDisable() {
305
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee6() {
306
- return asyncToGenerator._regenerator().w(function (_context6) {
305
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee6() {
306
+ return version._regenerator().w(function (_context6) {
307
307
  while (1) switch (_context6.n) {
308
308
  case 0:
309
309
  _context6.n = 1;
@@ -320,8 +320,8 @@ function initValRsc(config, valModules, rscNextConfig) {
320
320
  return {
321
321
  fetchValStega: initFetchValStega(config, valApiEndpoints,
322
322
  // TODO: get from config
323
- valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee7() {
324
- return asyncToGenerator._regenerator().w(function (_context7) {
323
+ valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee7() {
324
+ return version._regenerator().w(function (_context7) {
325
325
  while (1) switch (_context7.n) {
326
326
  case 0:
327
327
  _context7.n = 1;
@@ -330,8 +330,8 @@ function initValRsc(config, valModules, rscNextConfig) {
330
330
  return _context7.a(2, _context7.v.isEnabled);
331
331
  }
332
332
  }, _callee7);
333
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee8() {
334
- return asyncToGenerator._regenerator().w(function (_context8) {
333
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee8() {
334
+ return version._regenerator().w(function (_context8) {
335
335
  while (1) switch (_context8.n) {
336
336
  case 0:
337
337
  _context8.n = 1;
@@ -340,8 +340,8 @@ function initValRsc(config, valModules, rscNextConfig) {
340
340
  return _context8.a(2, _context8.v);
341
341
  }
342
342
  }, _callee8);
343
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee9() {
344
- return asyncToGenerator._regenerator().w(function (_context9) {
343
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee9() {
344
+ return version._regenerator().w(function (_context9) {
345
345
  while (1) switch (_context9.n) {
346
346
  case 0:
347
347
  _context9.n = 1;
@@ -351,8 +351,8 @@ function initValRsc(config, valModules, rscNextConfig) {
351
351
  }
352
352
  }, _callee9);
353
353
  }))),
354
- fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee0() {
355
- return asyncToGenerator._regenerator().w(function (_context0) {
354
+ fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee0() {
355
+ return version._regenerator().w(function (_context0) {
356
356
  while (1) switch (_context0.n) {
357
357
  case 0:
358
358
  _context0.n = 1;
@@ -361,8 +361,8 @@ function initValRsc(config, valModules, rscNextConfig) {
361
361
  return _context0.a(2, _context0.v.isEnabled);
362
362
  }
363
363
  }, _callee0);
364
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee1() {
365
- return asyncToGenerator._regenerator().w(function (_context1) {
364
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee1() {
365
+ return version._regenerator().w(function (_context1) {
366
366
  while (1) switch (_context1.n) {
367
367
  case 0:
368
368
  _context1.n = 1;
@@ -371,8 +371,8 @@ function initValRsc(config, valModules, rscNextConfig) {
371
371
  return _context1.a(2, _context1.v);
372
372
  }
373
373
  }, _callee1);
374
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee10() {
375
- return asyncToGenerator._regenerator().w(function (_context10) {
374
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee10() {
375
+ return version._regenerator().w(function (_context10) {
376
376
  while (1) switch (_context10.n) {
377
377
  case 0:
378
378
  _context10.n = 1;
@@ -382,8 +382,8 @@ function initValRsc(config, valModules, rscNextConfig) {
382
382
  }
383
383
  }, _callee10);
384
384
  }))),
385
- fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee11() {
386
- return asyncToGenerator._regenerator().w(function (_context11) {
385
+ fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee11() {
386
+ return version._regenerator().w(function (_context11) {
387
387
  while (1) switch (_context11.n) {
388
388
  case 0:
389
389
  _context11.n = 1;
@@ -392,8 +392,8 @@ function initValRsc(config, valModules, rscNextConfig) {
392
392
  return _context11.a(2, _context11.v.isEnabled);
393
393
  }
394
394
  }, _callee11);
395
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee12() {
396
- return asyncToGenerator._regenerator().w(function (_context12) {
395
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee12() {
396
+ return version._regenerator().w(function (_context12) {
397
397
  while (1) switch (_context12.n) {
398
398
  case 0:
399
399
  _context12.n = 1;
@@ -402,8 +402,8 @@ function initValRsc(config, valModules, rscNextConfig) {
402
402
  return _context12.a(2, _context12.v);
403
403
  }
404
404
  }, _callee12);
405
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee13() {
406
- return asyncToGenerator._regenerator().w(function (_context13) {
405
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee13() {
406
+ return version._regenerator().w(function (_context13) {
407
407
  while (1) switch (_context13.n) {
408
408
  case 0:
409
409
  _context13.n = 1;
@@ -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-3c87fb4f.cjs.prod.js');
7
- var asyncToGenerator = require('../../dist/asyncToGenerator-8e5c36c8.cjs.prod.js');
6
+ var objectSpread2 = require('../../dist/objectSpread2-13f847a9.cjs.prod.js');
7
+ var version = require('../../dist/version-0e6da9a7.cjs.prod.js');
8
+ var defineProperty = require('../../dist/defineProperty-8951f469.cjs.prod.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 version = require('../../dist/version-d2061026.cjs.prod.js');
13
- var routeFromVal = require('../../dist/routeFromVal-ef8c304a.cjs.prod.js');
13
+ var routeFromVal = require('../../dist/routeFromVal-13c832b2.cjs.prod.js');
14
14
  require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
15
15
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
16
16
  require('../../dist/slicedToArray-ce613de6.cjs.prod.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 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee() {
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 asyncToGenerator._regenerator().w(function (_context) {
24
+ return version._regenerator().w(function (_context) {
25
25
  while (1) switch (_context.p = _context.n) {
26
26
  case 0:
27
27
  enabled = false;
@@ -91,7 +91,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
91
91
  validate_binary_files: false,
92
92
  exclude_patches: false
93
93
  },
94
- cookies: objectSpread2._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)
94
+ 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
95
  });
96
96
  case 14:
97
97
  treeRes = _context.v;
@@ -179,9 +179,9 @@ function getHost(headers) {
179
179
 
180
180
  var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
181
181
  return /*#__PURE__*/function () {
182
- var _ref2 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee2(selector, params) {
182
+ var _ref2 = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee2(selector, params) {
183
183
  var fetchVal, resolvedParams, path, schema, val, route, _t4;
184
- return asyncToGenerator._regenerator().w(function (_context2) {
184
+ return version._regenerator().w(function (_context2) {
185
185
  while (1) switch (_context2.n) {
186
186
  case 0:
187
187
  fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
@@ -214,9 +214,9 @@ var initFetchValRouteStega = function initFetchValRouteStega(config, valApiEndpo
214
214
  };
215
215
  var initFetchValRouteUrl = function initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies) {
216
216
  return /*#__PURE__*/function () {
217
- var _ref3 = asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee3(selector, params) {
217
+ var _ref3 = version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee3(selector, params) {
218
218
  var fetchVal, resolvedParams, path, schema, val, route, _t5, _t6;
219
- return asyncToGenerator._regenerator().w(function (_context3) {
219
+ return version._regenerator().w(function (_context3) {
220
220
  while (1) switch (_context3.n) {
221
221
  case 0:
222
222
  fetchVal = initFetchValStega(config, valApiEndpoints, valServerPromise, isEnabled, getHeaders, getCookies);
@@ -274,8 +274,8 @@ function initValRsc(config, valModules, rscNextConfig) {
274
274
  }
275
275
  }, config), config, {
276
276
  isEnabled: function isEnabled() {
277
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee4() {
278
- return asyncToGenerator._regenerator().w(function (_context4) {
277
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee4() {
278
+ return version._regenerator().w(function (_context4) {
279
279
  while (1) switch (_context4.n) {
280
280
  case 0:
281
281
  _context4.n = 1;
@@ -287,8 +287,8 @@ function initValRsc(config, valModules, rscNextConfig) {
287
287
  }))();
288
288
  },
289
289
  onEnable: function onEnable() {
290
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee5() {
291
- return asyncToGenerator._regenerator().w(function (_context5) {
290
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee5() {
291
+ return version._regenerator().w(function (_context5) {
292
292
  while (1) switch (_context5.n) {
293
293
  case 0:
294
294
  _context5.n = 1;
@@ -302,8 +302,8 @@ function initValRsc(config, valModules, rscNextConfig) {
302
302
  }))();
303
303
  },
304
304
  onDisable: function onDisable() {
305
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee6() {
306
- return asyncToGenerator._regenerator().w(function (_context6) {
305
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee6() {
306
+ return version._regenerator().w(function (_context6) {
307
307
  while (1) switch (_context6.n) {
308
308
  case 0:
309
309
  _context6.n = 1;
@@ -320,8 +320,8 @@ function initValRsc(config, valModules, rscNextConfig) {
320
320
  return {
321
321
  fetchValStega: initFetchValStega(config, valApiEndpoints,
322
322
  // TODO: get from config
323
- valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee7() {
324
- return asyncToGenerator._regenerator().w(function (_context7) {
323
+ valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee7() {
324
+ return version._regenerator().w(function (_context7) {
325
325
  while (1) switch (_context7.n) {
326
326
  case 0:
327
327
  _context7.n = 1;
@@ -330,8 +330,8 @@ function initValRsc(config, valModules, rscNextConfig) {
330
330
  return _context7.a(2, _context7.v.isEnabled);
331
331
  }
332
332
  }, _callee7);
333
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee8() {
334
- return asyncToGenerator._regenerator().w(function (_context8) {
333
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee8() {
334
+ return version._regenerator().w(function (_context8) {
335
335
  while (1) switch (_context8.n) {
336
336
  case 0:
337
337
  _context8.n = 1;
@@ -340,8 +340,8 @@ function initValRsc(config, valModules, rscNextConfig) {
340
340
  return _context8.a(2, _context8.v);
341
341
  }
342
342
  }, _callee8);
343
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee9() {
344
- return asyncToGenerator._regenerator().w(function (_context9) {
343
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee9() {
344
+ return version._regenerator().w(function (_context9) {
345
345
  while (1) switch (_context9.n) {
346
346
  case 0:
347
347
  _context9.n = 1;
@@ -351,8 +351,8 @@ function initValRsc(config, valModules, rscNextConfig) {
351
351
  }
352
352
  }, _callee9);
353
353
  }))),
354
- fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee0() {
355
- return asyncToGenerator._regenerator().w(function (_context0) {
354
+ fetchValRouteStega: initFetchValRouteStega(config, valApiEndpoints, valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee0() {
355
+ return version._regenerator().w(function (_context0) {
356
356
  while (1) switch (_context0.n) {
357
357
  case 0:
358
358
  _context0.n = 1;
@@ -361,8 +361,8 @@ function initValRsc(config, valModules, rscNextConfig) {
361
361
  return _context0.a(2, _context0.v.isEnabled);
362
362
  }
363
363
  }, _callee0);
364
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee1() {
365
- return asyncToGenerator._regenerator().w(function (_context1) {
364
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee1() {
365
+ return version._regenerator().w(function (_context1) {
366
366
  while (1) switch (_context1.n) {
367
367
  case 0:
368
368
  _context1.n = 1;
@@ -371,8 +371,8 @@ function initValRsc(config, valModules, rscNextConfig) {
371
371
  return _context1.a(2, _context1.v);
372
372
  }
373
373
  }, _callee1);
374
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee10() {
375
- return asyncToGenerator._regenerator().w(function (_context10) {
374
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee10() {
375
+ return version._regenerator().w(function (_context10) {
376
376
  while (1) switch (_context10.n) {
377
377
  case 0:
378
378
  _context10.n = 1;
@@ -382,8 +382,8 @@ function initValRsc(config, valModules, rscNextConfig) {
382
382
  }
383
383
  }, _callee10);
384
384
  }))),
385
- fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee11() {
386
- return asyncToGenerator._regenerator().w(function (_context11) {
385
+ fetchValRouteUrl: initFetchValRouteUrl(config, valApiEndpoints, valServerPromise, /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee11() {
386
+ return version._regenerator().w(function (_context11) {
387
387
  while (1) switch (_context11.n) {
388
388
  case 0:
389
389
  _context11.n = 1;
@@ -392,8 +392,8 @@ function initValRsc(config, valModules, rscNextConfig) {
392
392
  return _context11.a(2, _context11.v.isEnabled);
393
393
  }
394
394
  }, _callee11);
395
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee12() {
396
- return asyncToGenerator._regenerator().w(function (_context12) {
395
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee12() {
396
+ return version._regenerator().w(function (_context12) {
397
397
  while (1) switch (_context12.n) {
398
398
  case 0:
399
399
  _context12.n = 1;
@@ -402,8 +402,8 @@ function initValRsc(config, valModules, rscNextConfig) {
402
402
  return _context12.a(2, _context12.v);
403
403
  }
404
404
  }, _callee12);
405
- })), /*#__PURE__*/asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee13() {
406
- return asyncToGenerator._regenerator().w(function (_context13) {
405
+ })), /*#__PURE__*/version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee13() {
406
+ return version._regenerator().w(function (_context13) {
407
407
  while (1) switch (_context13.n) {
408
408
  case 0:
409
409
  _context13.n = 1;
@@ -1,12 +1,12 @@
1
1
  import 'server-only';
2
- import { _ as _objectSpread2, a as _defineProperty } from '../../dist/objectSpread2-c1340c1c.esm.js';
3
- import { _ as _asyncToGenerator, a as _regenerator } from '../../dist/asyncToGenerator-500f022f.esm.js';
2
+ import { _ as _objectSpread2 } from '../../dist/objectSpread2-60d1bd93.esm.js';
3
+ import { _ as _asyncToGenerator, V as VERSION, a as _regenerator } from '../../dist/version-4d7b692c.esm.js';
4
+ import { _ as _defineProperty } from '../../dist/defineProperty-cca5affa.esm.js';
4
5
  import { SET_RSC, stegaEncode, SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/stega';
5
6
  import { Internal } from '@valbuild/core';
6
7
  import { VAL_SESSION_COOKIE } from '@valbuild/shared/internal';
7
8
  import { createValServer } from '@valbuild/server';
8
- import { V as VERSION } from '../../dist/version-16f6b0ce.esm.js';
9
- import { i as initValRouteFromVal, g as getValRouteUrlFromVal } from '../../dist/routeFromVal-748d2aec.esm.js';
9
+ import { i as initValRouteFromVal, g as getValRouteUrlFromVal } from '../../dist/routeFromVal-8855a5cc.esm.js';
10
10
  import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
11
11
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
12
12
  import '../../dist/slicedToArray-aa291011.esm.js';
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
6
  var slicedToArray = require('../../dist/slicedToArray-44036a76.cjs.dev.js');
7
- var asyncToGenerator = require('../../dist/asyncToGenerator-c3823d62.cjs.dev.js');
8
- var objectSpread2 = require('../../dist/objectSpread2-792eb2c2.cjs.dev.js');
7
+ var version = require('../../dist/version-c311d818.cjs.dev.js');
8
+ var objectSpread2 = require('../../dist/objectSpread2-58024783.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
- var version = require('../../dist/version-d034b2fc.cjs.dev.js');
13
12
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
13
+ require('../../dist/defineProperty-f90345d7.cjs.dev.js');
14
14
 
15
15
  var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
16
16
  var route = "/api/val"; // TODO: get from config
@@ -29,8 +29,8 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
29
29
  }
30
30
  }, config), config, {
31
31
  isEnabled: function isEnabled() {
32
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee() {
33
- return asyncToGenerator._regenerator().w(function (_context) {
32
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee() {
33
+ return version._regenerator().w(function (_context) {
34
34
  while (1) switch (_context.n) {
35
35
  case 0:
36
36
  _context.n = 1;
@@ -42,8 +42,8 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
42
42
  }))();
43
43
  },
44
44
  onEnable: function onEnable() {
45
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee2() {
46
- return asyncToGenerator._regenerator().w(function (_context2) {
45
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee2() {
46
+ return version._regenerator().w(function (_context2) {
47
47
  while (1) switch (_context2.n) {
48
48
  case 0:
49
49
  _context2.n = 1;
@@ -57,8 +57,8 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
57
57
  }))();
58
58
  },
59
59
  onDisable: function onDisable() {
60
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee3() {
61
- return asyncToGenerator._regenerator().w(function (_context3) {
60
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee3() {
61
+ return version._regenerator().w(function (_context3) {
62
62
  while (1) switch (_context3.n) {
63
63
  case 0:
64
64
  _context3.n = 1;
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
6
  var slicedToArray = require('../../dist/slicedToArray-ce613de6.cjs.prod.js');
7
- var asyncToGenerator = require('../../dist/asyncToGenerator-8e5c36c8.cjs.prod.js');
8
- var objectSpread2 = require('../../dist/objectSpread2-3c87fb4f.cjs.prod.js');
7
+ var version = require('../../dist/version-0e6da9a7.cjs.prod.js');
8
+ var objectSpread2 = require('../../dist/objectSpread2-13f847a9.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
- var version = require('../../dist/version-d2061026.cjs.prod.js');
13
12
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
13
+ require('../../dist/defineProperty-8951f469.cjs.prod.js');
14
14
 
15
15
  var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
16
16
  var route = "/api/val"; // TODO: get from config
@@ -29,8 +29,8 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
29
29
  }
30
30
  }, config), config, {
31
31
  isEnabled: function isEnabled() {
32
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee() {
33
- return asyncToGenerator._regenerator().w(function (_context) {
32
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee() {
33
+ return version._regenerator().w(function (_context) {
34
34
  while (1) switch (_context.n) {
35
35
  case 0:
36
36
  _context.n = 1;
@@ -42,8 +42,8 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
42
42
  }))();
43
43
  },
44
44
  onEnable: function onEnable() {
45
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee2() {
46
- return asyncToGenerator._regenerator().w(function (_context2) {
45
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee2() {
46
+ return version._regenerator().w(function (_context2) {
47
47
  while (1) switch (_context2.n) {
48
48
  case 0:
49
49
  _context2.n = 1;
@@ -57,8 +57,8 @@ var initValNextAppRouter = function initValNextAppRouter(valModules, config, nex
57
57
  }))();
58
58
  },
59
59
  onDisable: function onDisable() {
60
- return asyncToGenerator._asyncToGenerator(/*#__PURE__*/asyncToGenerator._regenerator().m(function _callee3() {
61
- return asyncToGenerator._regenerator().w(function (_context3) {
60
+ return version._asyncToGenerator(/*#__PURE__*/version._regenerator().m(function _callee3() {
61
+ return version._regenerator().w(function (_context3) {
62
62
  while (1) switch (_context3.n) {
63
63
  case 0:
64
64
  _context3.n = 1;
@@ -1,12 +1,12 @@
1
1
  import 'server-only';
2
2
  import { _ as _slicedToArray } from '../../dist/slicedToArray-aa291011.esm.js';
3
- import { _ as _asyncToGenerator, a as _regenerator } from '../../dist/asyncToGenerator-500f022f.esm.js';
4
- import { _ as _objectSpread2 } from '../../dist/objectSpread2-c1340c1c.esm.js';
3
+ import { _ as _asyncToGenerator, a as _regenerator, V as VERSION } from '../../dist/version-4d7b692c.esm.js';
4
+ import { _ as _objectSpread2 } from '../../dist/objectSpread2-60d1bd93.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
- import { V as VERSION } from '../../dist/version-16f6b0ce.esm.js';
9
8
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
9
+ import '../../dist/defineProperty-cca5affa.esm.js';
10
10
 
11
11
  var initValNextAppRouter = function initValNextAppRouter(valModules, config, nextConfig) {
12
12
  var route = "/api/val"; // TODO: get from config
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValNextProvider-b0d9fa24.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValNextProvider-b0d9fa24.cjs.dev.js");
7
- }
@@ -1,114 +0,0 @@
1
- 'use client';
2
- import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
3
- import { b as _toPropertyKey, _ as _objectSpread2, a as _defineProperty } from './objectSpread2-c1340c1c.esm.js';
4
- import React from 'react';
5
- import { jsx } from 'react/jsx-runtime';
6
- import './unsupportedIterableToArray-5baabfdc.esm.js';
7
-
8
- function _classCallCheck(a, n) {
9
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
10
- }
11
-
12
- function _defineProperties(e, r) {
13
- for (var t = 0; t < r.length; t++) {
14
- var o = r[t];
15
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
16
- }
17
- }
18
- function _createClass(e, r, t) {
19
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
20
- writable: !1
21
- }), e;
22
- }
23
-
24
- var ValExternalStore = /*#__PURE__*/function () {
25
- // uncertain whether this is the optimal way of returning
26
-
27
- function ValExternalStore() {
28
- var _this = this;
29
- _classCallCheck(this, ValExternalStore);
30
- _defineProperty(this, "subscribe", function (paths) {
31
- return function (listener) {
32
- var subscriberId = createSubscriberId(paths);
33
- if (!_this.listeners[subscriberId]) {
34
- _this.listeners[subscriberId] = [];
35
- _this.subscribers.set(subscriberId, {});
36
- }
37
- _this.listeners[subscriberId].push(listener);
38
- return function () {
39
- _this.listeners[subscriberId].splice(_this.listeners[subscriberId].indexOf(listener), 1);
40
- };
41
- };
42
- });
43
- _defineProperty(this, "getSnapshot", function (paths) {
44
- return function () {
45
- return _this.get(paths);
46
- };
47
- });
48
- _defineProperty(this, "getServerSnapshot", function (paths) {
49
- return function () {
50
- return _this.get(paths);
51
- };
52
- });
53
- _defineProperty(this, "get", function (paths) {
54
- var subscriberId = createSubscriberId(paths);
55
- return _this.subscribers.get(subscriberId);
56
- });
57
- this.subscribers = new Map();
58
- this.listeners = {};
59
- }
60
- return _createClass(ValExternalStore, [{
61
- key: "update",
62
- value: function update(path, source) {
63
- var subscriberIds = Array.from(this.subscribers.keys());
64
- for (var _i = 0, _subscriberIds = subscriberIds; _i < _subscriberIds.length; _i++) {
65
- var subscriberId = _subscriberIds[_i];
66
- var isSubscribedToModule = subscriberId.includes(path); // TODO: hash paths instead
67
- if (isSubscribedToModule) {
68
- this.subscribers.set(subscriberId, _objectSpread2(_objectSpread2({}, this.subscribers.get(subscriberId)), {}, _defineProperty({}, path, source)));
69
- this.emitChange(subscriberId);
70
- }
71
- }
72
- }
73
- }, {
74
- key: "emitChange",
75
- value: function emitChange(subscriberId) {
76
- var _iterator = _createForOfIteratorHelper(this.listeners[subscriberId]),
77
- _step;
78
- try {
79
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
80
- var listener = _step.value;
81
- listener();
82
- }
83
- } catch (err) {
84
- _iterator.e(err);
85
- } finally {
86
- _iterator.f();
87
- }
88
- }
89
- }]);
90
- }();
91
- function createSubscriberId(paths) {
92
- return paths.slice().sort().join("&");
93
- }
94
- var ValOverlayContext = /*#__PURE__*/React.createContext({
95
- store: undefined,
96
- draftMode: false
97
- });
98
- function ValOverlayProvider(_ref) {
99
- var store = _ref.store,
100
- draftMode = _ref.draftMode,
101
- children = _ref.children;
102
- return /*#__PURE__*/jsx(ValOverlayContext.Provider, {
103
- value: {
104
- store: store,
105
- draftMode: draftMode
106
- },
107
- children: children
108
- });
109
- }
110
- var useValOverlayContext = function useValOverlayContext() {
111
- return React.useContext(ValOverlayContext);
112
- };
113
-
114
- export { ValExternalStore, ValOverlayContext, ValOverlayProvider, useValOverlayContext };