@valbuild/next 0.83.0 → 0.84.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.
Files changed (33) hide show
  1. package/client/dist/valbuild-next-client.cjs.dev.js +26 -2
  2. package/client/dist/valbuild-next-client.cjs.prod.js +26 -2
  3. package/client/dist/valbuild-next-client.esm.js +26 -2
  4. package/dist/{ValNextProvider-5f8b7338.esm.js → ValNextProvider-25f1f5c9.esm.js} +2 -2
  5. package/dist/ValNextProvider-a618d775.cjs.js +7 -0
  6. package/dist/{ValNextProvider-9ff1bb92.cjs.prod.js → ValNextProvider-a618d775.cjs.prod.js} +2 -2
  7. package/dist/{ValNextProvider-99b4552f.cjs.dev.js → ValNextProvider-c7952bdc.cjs.dev.js} +2 -2
  8. package/dist/{ValOverlayContext-a2fdbce0.esm.js → ValOverlayContext-6635a4d7.esm.js} +2 -50
  9. package/dist/ValOverlayContext-942f1294.cjs.js +7 -0
  10. package/dist/{ValOverlayContext-811e9be9.cjs.prod.js → ValOverlayContext-942f1294.cjs.prod.js} +3 -51
  11. package/dist/{ValOverlayContext-55dae3ea.cjs.dev.js → ValOverlayContext-c82a4507.cjs.dev.js} +3 -51
  12. package/dist/createForOfIteratorHelper-0445603c.cjs.dev.js +54 -0
  13. package/dist/createForOfIteratorHelper-5758a730.esm.js +52 -0
  14. package/dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js +54 -0
  15. package/dist/declarations/src/client/initValClient.d.ts +4 -1
  16. package/dist/declarations/src/external_exempt_from_val_quickjs.d.ts +1 -0
  17. package/dist/declarations/src/initVal.d.ts +3 -1
  18. package/dist/declarations/src/rsc/initValRsc.d.ts +11 -1
  19. package/dist/initValRouteFromVal-12bdc5f5.cjs.dev.js +116 -0
  20. package/dist/initValRouteFromVal-b9806908.cjs.prod.js +116 -0
  21. package/dist/initValRouteFromVal-d84b3563.esm.js +114 -0
  22. package/dist/typeof-16428c61.cjs.prod.js +13 -0
  23. package/dist/typeof-a1531d8f.esm.js +11 -0
  24. package/dist/typeof-b568f48f.cjs.dev.js +13 -0
  25. package/dist/valbuild-next.cjs.dev.js +6 -13
  26. package/dist/valbuild-next.cjs.prod.js +6 -13
  27. package/dist/valbuild-next.esm.js +5 -12
  28. package/package.json +6 -6
  29. package/rsc/dist/valbuild-next-rsc.cjs.dev.js +119 -36
  30. package/rsc/dist/valbuild-next-rsc.cjs.prod.js +119 -36
  31. package/rsc/dist/valbuild-next-rsc.esm.js +119 -36
  32. package/dist/ValNextProvider-9ff1bb92.cjs.js +0 -7
  33. package/dist/ValOverlayContext-811e9be9.cjs.js +0 -7
@@ -0,0 +1,116 @@
1
+ 'use strict';
2
+
3
+ var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
4
+ var objectSpread2 = require('./objectSpread2-792eb2c2.cjs.dev.js');
5
+ var slicedToArray = require('./slicedToArray-44036a76.cjs.dev.js');
6
+ var _typeof = require('./typeof-b568f48f.cjs.dev.js');
7
+ var core = require('@valbuild/core');
8
+ var internal = require('@valbuild/shared/internal');
9
+
10
+ function initValRouteFromVal(resolvedParams, methodName,
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ path,
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ schema,
15
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
+ val) {
17
+ if (!path) {
18
+ console.error("Val: ".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
19
+ return null;
20
+ }
21
+ if (val === null) {
22
+ return null;
23
+ }
24
+ if (_typeof._typeof(val) !== "object") {
25
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof._typeof(val), " instead)."));
26
+ return null;
27
+ }
28
+ if (Array.isArray(val)) {
29
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found array instead)."));
30
+ return null;
31
+ }
32
+ if (!schema) {
33
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
34
+ return null;
35
+ }
36
+ if (!(schema instanceof core.RecordSchema)) {
37
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
38
+ } else if (!schema["currentRouter"]) {
39
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
40
+ } else if (schema["currentRouter"].getRouterId() !== core.Internal.nextAppRouter.getRouterId()) {
41
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router)."));
42
+ return null;
43
+ }
44
+ if (_typeof._typeof(resolvedParams) !== "object") {
45
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
46
+ return null;
47
+ }
48
+ var _Internal$splitModule = core.Internal.splitModuleFilePathAndModulePath(path),
49
+ _Internal$splitModule2 = slicedToArray._slicedToArray(_Internal$splitModule, 1),
50
+ moduleFilePath = _Internal$splitModule2[0];
51
+ if (!(moduleFilePath.endsWith("page.val.ts") || moduleFilePath.endsWith("page.val.js"))) {
52
+ console.error("Val: ".concat(methodName, " is used with a Val module that does not have a page.val.ts or page.val.js file. Make sure the Val module is in the same directory as your page.tsx or page.js file."));
53
+ return null;
54
+ }
55
+ var srcFolder = internal.getNextAppRouterSourceFolder(moduleFilePath);
56
+ if (!srcFolder) {
57
+ console.error("Val: ".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
58
+ return null;
59
+ }
60
+ var pattern = internal.getPatternFromModuleFilePath(moduleFilePath, srcFolder);
61
+ var parsedPattern = internal.parseRoutePattern(pattern);
62
+ var missingPatterns = [];
63
+ var fullPathParts = [];
64
+ var missingParamKeys = objectSpread2._objectSpread2({}, resolvedParams);
65
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(parsedPattern !== null && parsedPattern !== void 0 ? parsedPattern : []),
66
+ _step;
67
+ try {
68
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
69
+ var part = _step.value;
70
+ if (part.type === "literal") {
71
+ fullPathParts.push(part.name);
72
+ } else if (part.type === "array-param" || part.type === "string-param") {
73
+ var value = resolvedParams[part.paramName];
74
+ if (typeof value !== "string" && !Array.isArray(value)) {
75
+ missingPatterns.push(part);
76
+ } else if (Array.isArray(value)) {
77
+ delete missingParamKeys[part.paramName];
78
+ fullPathParts.push(value.join("/"));
79
+ } else {
80
+ delete missingParamKeys[part.paramName];
81
+ fullPathParts.push(value);
82
+ }
83
+ }
84
+ }
85
+ } catch (err) {
86
+ _iterator.e(err);
87
+ } finally {
88
+ _iterator.f();
89
+ }
90
+ if (missingPatterns.length > 0) {
91
+ var errorMessageParams = missingPatterns.map(function (part) {
92
+ if (part.type === "literal") {
93
+ return part.name;
94
+ } else if (part.type === "string-param") {
95
+ return "[".concat(part.paramName, "]");
96
+ } else if (part.type === "array-param") {
97
+ return "[...".concat(part.paramName, "]");
98
+ }
99
+ });
100
+ console.error("Val: ".concat(methodName, " could not find route since parameters: ").concat(errorMessageParams.join(", "), " where not provided. Make sure the Val module is in the same directory as your page.tsx or page.js file and that the Val module filename is called page.val.ts or page.val.js."));
101
+ return null;
102
+ }
103
+ if (Object.keys(missingParamKeys).length > 0) {
104
+ console.error("Val: ".concat(methodName, " could not find route since parameters: ").concat(Object.keys(missingParamKeys).join(", "), " where not found in the path of: ").concat(moduleFilePath, ". Make sure ").concat(moduleFilePath, " in the same directory as your page.tsx or page.js file."));
105
+ // We do not return null here since we found a route that matches the path
106
+ // though chances are that there's something wrong in the way ${methodName} is used
107
+ }
108
+ var fullPath = fullPathParts.join("/");
109
+ var actualRoute = val["/".concat(fullPath)];
110
+ if (!actualRoute) {
111
+ return null;
112
+ }
113
+ return actualRoute;
114
+ }
115
+
116
+ exports.initValRouteFromVal = initValRouteFromVal;
@@ -0,0 +1,116 @@
1
+ 'use strict';
2
+
3
+ var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
4
+ var objectSpread2 = require('./objectSpread2-3c87fb4f.cjs.prod.js');
5
+ var slicedToArray = require('./slicedToArray-ce613de6.cjs.prod.js');
6
+ var _typeof = require('./typeof-16428c61.cjs.prod.js');
7
+ var core = require('@valbuild/core');
8
+ var internal = require('@valbuild/shared/internal');
9
+
10
+ function initValRouteFromVal(resolvedParams, methodName,
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ path,
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ schema,
15
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
+ val) {
17
+ if (!path) {
18
+ console.error("Val: ".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
19
+ return null;
20
+ }
21
+ if (val === null) {
22
+ return null;
23
+ }
24
+ if (_typeof._typeof(val) !== "object") {
25
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof._typeof(val), " instead)."));
26
+ return null;
27
+ }
28
+ if (Array.isArray(val)) {
29
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found array instead)."));
30
+ return null;
31
+ }
32
+ if (!schema) {
33
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
34
+ return null;
35
+ }
36
+ if (!(schema instanceof core.RecordSchema)) {
37
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
38
+ } else if (!schema["currentRouter"]) {
39
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
40
+ } else if (schema["currentRouter"].getRouterId() !== core.Internal.nextAppRouter.getRouterId()) {
41
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router)."));
42
+ return null;
43
+ }
44
+ if (_typeof._typeof(resolvedParams) !== "object") {
45
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
46
+ return null;
47
+ }
48
+ var _Internal$splitModule = core.Internal.splitModuleFilePathAndModulePath(path),
49
+ _Internal$splitModule2 = slicedToArray._slicedToArray(_Internal$splitModule, 1),
50
+ moduleFilePath = _Internal$splitModule2[0];
51
+ if (!(moduleFilePath.endsWith("page.val.ts") || moduleFilePath.endsWith("page.val.js"))) {
52
+ console.error("Val: ".concat(methodName, " is used with a Val module that does not have a page.val.ts or page.val.js file. Make sure the Val module is in the same directory as your page.tsx or page.js file."));
53
+ return null;
54
+ }
55
+ var srcFolder = internal.getNextAppRouterSourceFolder(moduleFilePath);
56
+ if (!srcFolder) {
57
+ console.error("Val: ".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
58
+ return null;
59
+ }
60
+ var pattern = internal.getPatternFromModuleFilePath(moduleFilePath, srcFolder);
61
+ var parsedPattern = internal.parseRoutePattern(pattern);
62
+ var missingPatterns = [];
63
+ var fullPathParts = [];
64
+ var missingParamKeys = objectSpread2._objectSpread2({}, resolvedParams);
65
+ var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(parsedPattern !== null && parsedPattern !== void 0 ? parsedPattern : []),
66
+ _step;
67
+ try {
68
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
69
+ var part = _step.value;
70
+ if (part.type === "literal") {
71
+ fullPathParts.push(part.name);
72
+ } else if (part.type === "array-param" || part.type === "string-param") {
73
+ var value = resolvedParams[part.paramName];
74
+ if (typeof value !== "string" && !Array.isArray(value)) {
75
+ missingPatterns.push(part);
76
+ } else if (Array.isArray(value)) {
77
+ delete missingParamKeys[part.paramName];
78
+ fullPathParts.push(value.join("/"));
79
+ } else {
80
+ delete missingParamKeys[part.paramName];
81
+ fullPathParts.push(value);
82
+ }
83
+ }
84
+ }
85
+ } catch (err) {
86
+ _iterator.e(err);
87
+ } finally {
88
+ _iterator.f();
89
+ }
90
+ if (missingPatterns.length > 0) {
91
+ var errorMessageParams = missingPatterns.map(function (part) {
92
+ if (part.type === "literal") {
93
+ return part.name;
94
+ } else if (part.type === "string-param") {
95
+ return "[".concat(part.paramName, "]");
96
+ } else if (part.type === "array-param") {
97
+ return "[...".concat(part.paramName, "]");
98
+ }
99
+ });
100
+ console.error("Val: ".concat(methodName, " could not find route since parameters: ").concat(errorMessageParams.join(", "), " where not provided. Make sure the Val module is in the same directory as your page.tsx or page.js file and that the Val module filename is called page.val.ts or page.val.js."));
101
+ return null;
102
+ }
103
+ if (Object.keys(missingParamKeys).length > 0) {
104
+ console.error("Val: ".concat(methodName, " could not find route since parameters: ").concat(Object.keys(missingParamKeys).join(", "), " where not found in the path of: ").concat(moduleFilePath, ". Make sure ").concat(moduleFilePath, " in the same directory as your page.tsx or page.js file."));
105
+ // We do not return null here since we found a route that matches the path
106
+ // though chances are that there's something wrong in the way ${methodName} is used
107
+ }
108
+ var fullPath = fullPathParts.join("/");
109
+ var actualRoute = val["/".concat(fullPath)];
110
+ if (!actualRoute) {
111
+ return null;
112
+ }
113
+ return actualRoute;
114
+ }
115
+
116
+ exports.initValRouteFromVal = initValRouteFromVal;
@@ -0,0 +1,114 @@
1
+ import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
2
+ import { _ as _objectSpread2 } from './objectSpread2-c1340c1c.esm.js';
3
+ import { _ as _slicedToArray } from './slicedToArray-aa291011.esm.js';
4
+ import { _ as _typeof } from './typeof-a1531d8f.esm.js';
5
+ import { RecordSchema, Internal } from '@valbuild/core';
6
+ import { getNextAppRouterSourceFolder, getPatternFromModuleFilePath, parseRoutePattern } from '@valbuild/shared/internal';
7
+
8
+ function initValRouteFromVal(resolvedParams, methodName,
9
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
+ path,
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ schema,
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ val) {
15
+ if (!path) {
16
+ console.error("Val: ".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
17
+ return null;
18
+ }
19
+ if (val === null) {
20
+ return null;
21
+ }
22
+ if (_typeof(val) !== "object") {
23
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof(val), " instead)."));
24
+ return null;
25
+ }
26
+ if (Array.isArray(val)) {
27
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found array instead)."));
28
+ return null;
29
+ }
30
+ if (!schema) {
31
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
32
+ return null;
33
+ }
34
+ if (!(schema instanceof RecordSchema)) {
35
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
36
+ } else if (!schema["currentRouter"]) {
37
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
38
+ } else if (schema["currentRouter"].getRouterId() !== Internal.nextAppRouter.getRouterId()) {
39
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router)."));
40
+ return null;
41
+ }
42
+ if (_typeof(resolvedParams) !== "object") {
43
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
44
+ return null;
45
+ }
46
+ var _Internal$splitModule = Internal.splitModuleFilePathAndModulePath(path),
47
+ _Internal$splitModule2 = _slicedToArray(_Internal$splitModule, 1),
48
+ moduleFilePath = _Internal$splitModule2[0];
49
+ if (!(moduleFilePath.endsWith("page.val.ts") || moduleFilePath.endsWith("page.val.js"))) {
50
+ console.error("Val: ".concat(methodName, " is used with a Val module that does not have a page.val.ts or page.val.js file. Make sure the Val module is in the same directory as your page.tsx or page.js file."));
51
+ return null;
52
+ }
53
+ var srcFolder = getNextAppRouterSourceFolder(moduleFilePath);
54
+ if (!srcFolder) {
55
+ console.error("Val: ".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
56
+ return null;
57
+ }
58
+ var pattern = getPatternFromModuleFilePath(moduleFilePath, srcFolder);
59
+ var parsedPattern = parseRoutePattern(pattern);
60
+ var missingPatterns = [];
61
+ var fullPathParts = [];
62
+ var missingParamKeys = _objectSpread2({}, resolvedParams);
63
+ var _iterator = _createForOfIteratorHelper(parsedPattern !== null && parsedPattern !== void 0 ? parsedPattern : []),
64
+ _step;
65
+ try {
66
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
67
+ var part = _step.value;
68
+ if (part.type === "literal") {
69
+ fullPathParts.push(part.name);
70
+ } else if (part.type === "array-param" || part.type === "string-param") {
71
+ var value = resolvedParams[part.paramName];
72
+ if (typeof value !== "string" && !Array.isArray(value)) {
73
+ missingPatterns.push(part);
74
+ } else if (Array.isArray(value)) {
75
+ delete missingParamKeys[part.paramName];
76
+ fullPathParts.push(value.join("/"));
77
+ } else {
78
+ delete missingParamKeys[part.paramName];
79
+ fullPathParts.push(value);
80
+ }
81
+ }
82
+ }
83
+ } catch (err) {
84
+ _iterator.e(err);
85
+ } finally {
86
+ _iterator.f();
87
+ }
88
+ if (missingPatterns.length > 0) {
89
+ var errorMessageParams = missingPatterns.map(function (part) {
90
+ if (part.type === "literal") {
91
+ return part.name;
92
+ } else if (part.type === "string-param") {
93
+ return "[".concat(part.paramName, "]");
94
+ } else if (part.type === "array-param") {
95
+ return "[...".concat(part.paramName, "]");
96
+ }
97
+ });
98
+ console.error("Val: ".concat(methodName, " could not find route since parameters: ").concat(errorMessageParams.join(", "), " where not provided. Make sure the Val module is in the same directory as your page.tsx or page.js file and that the Val module filename is called page.val.ts or page.val.js."));
99
+ return null;
100
+ }
101
+ if (Object.keys(missingParamKeys).length > 0) {
102
+ console.error("Val: ".concat(methodName, " could not find route since parameters: ").concat(Object.keys(missingParamKeys).join(", "), " where not found in the path of: ").concat(moduleFilePath, ". Make sure ").concat(moduleFilePath, " in the same directory as your page.tsx or page.js file."));
103
+ // We do not return null here since we found a route that matches the path
104
+ // though chances are that there's something wrong in the way ${methodName} is used
105
+ }
106
+ var fullPath = fullPathParts.join("/");
107
+ var actualRoute = val["/".concat(fullPath)];
108
+ if (!actualRoute) {
109
+ return null;
110
+ }
111
+ return actualRoute;
112
+ }
113
+
114
+ export { initValRouteFromVal as i };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
12
+
13
+ exports._typeof = _typeof;
@@ -0,0 +1,11 @@
1
+ function _typeof(o) {
2
+ "@babel/helpers - typeof";
3
+
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
+ return typeof o;
6
+ } : function (o) {
7
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
+ }, _typeof(o);
9
+ }
10
+
11
+ export { _typeof as _ };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
12
+
13
+ exports._typeof = _typeof;
@@ -2,11 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _typeof = require('./typeof-b568f48f.cjs.dev.js');
5
6
  var objectSpread2 = require('./objectSpread2-792eb2c2.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-99b4552f.cjs.dev.js');
10
+ var ValNextProvider = require('./ValNextProvider-c7952bdc.cjs.dev.js');
10
11
  var NextImage = require('next/image');
11
12
  var jsxRuntime = require('react/jsx-runtime');
12
13
  var ValApp = require('./ValApp-0efa0e5d.cjs.dev.js');
@@ -35,16 +36,6 @@ function _interopNamespace(e) {
35
36
  var core__namespace = /*#__PURE__*/_interopNamespace(core);
36
37
  var NextImage__default = /*#__PURE__*/_interopDefault(NextImage);
37
38
 
38
- function _typeof(o) {
39
- "@babel/helpers - typeof";
40
-
41
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
42
- return typeof o;
43
- } : function (o) {
44
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
45
- }, _typeof(o);
46
- }
47
-
48
39
  function raw(val) {
49
40
  if (typeof val === "string") {
50
41
  return stega.stegaClean(val);
@@ -54,7 +45,7 @@ function raw(val) {
54
45
  return raw(item);
55
46
  });
56
47
  }
57
- if (_typeof(val) === "object" && val !== null) {
48
+ if (_typeof._typeof(val) === "object" && val !== null) {
58
49
  var result = {};
59
50
  for (var _key in val) {
60
51
  if (Object.prototype.hasOwnProperty.call(val, _key)) {
@@ -78,6 +69,7 @@ function decodeValPathOfString(encodedString) {
78
69
  return stega.stegaDecodeString(encodedString);
79
70
  }
80
71
 
72
+ var nextAppRouter = core.Internal.nextAppRouter;
81
73
  var initVal = function initVal(config) {
82
74
  var _createValSystem = core.initVal(config),
83
75
  s = _createValSystem.s,
@@ -88,6 +80,7 @@ var initVal = function initVal(config) {
88
80
  return {
89
81
  s: s,
90
82
  c: c,
83
+ nextAppRouter: nextAppRouter,
91
84
  val: objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, val), {}, {
92
85
  attrs: function attrs(target) {
93
86
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -97,7 +90,7 @@ var initVal = function initVal(config) {
97
90
  return {};
98
91
  }
99
92
  path = core.Internal.getValPath(anyTarget);
100
- if (!path && _typeof(anyTarget) === "object") {
93
+ if (!path && _typeof._typeof(anyTarget) === "object") {
101
94
  path = anyTarget["valPath"];
102
95
  }
103
96
  if (typeof anyTarget === "string") {
@@ -2,11 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _typeof = require('./typeof-16428c61.cjs.prod.js');
5
6
  var objectSpread2 = require('./objectSpread2-3c87fb4f.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-9ff1bb92.cjs.prod.js');
10
+ var ValNextProvider = require('./ValNextProvider-a618d775.cjs.prod.js');
10
11
  var NextImage = require('next/image');
11
12
  var jsxRuntime = require('react/jsx-runtime');
12
13
  var ValApp = require('./ValApp-a808cf89.cjs.prod.js');
@@ -35,16 +36,6 @@ function _interopNamespace(e) {
35
36
  var core__namespace = /*#__PURE__*/_interopNamespace(core);
36
37
  var NextImage__default = /*#__PURE__*/_interopDefault(NextImage);
37
38
 
38
- function _typeof(o) {
39
- "@babel/helpers - typeof";
40
-
41
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
42
- return typeof o;
43
- } : function (o) {
44
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
45
- }, _typeof(o);
46
- }
47
-
48
39
  function raw(val) {
49
40
  if (typeof val === "string") {
50
41
  return stega.stegaClean(val);
@@ -54,7 +45,7 @@ function raw(val) {
54
45
  return raw(item);
55
46
  });
56
47
  }
57
- if (_typeof(val) === "object" && val !== null) {
48
+ if (_typeof._typeof(val) === "object" && val !== null) {
58
49
  var result = {};
59
50
  for (var _key in val) {
60
51
  if (Object.prototype.hasOwnProperty.call(val, _key)) {
@@ -78,6 +69,7 @@ function decodeValPathOfString(encodedString) {
78
69
  return stega.stegaDecodeString(encodedString);
79
70
  }
80
71
 
72
+ var nextAppRouter = core.Internal.nextAppRouter;
81
73
  var initVal = function initVal(config) {
82
74
  var _createValSystem = core.initVal(config),
83
75
  s = _createValSystem.s,
@@ -88,6 +80,7 @@ var initVal = function initVal(config) {
88
80
  return {
89
81
  s: s,
90
82
  c: c,
83
+ nextAppRouter: nextAppRouter,
91
84
  val: objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, val), {}, {
92
85
  attrs: function attrs(target) {
93
86
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -97,7 +90,7 @@ var initVal = function initVal(config) {
97
90
  return {};
98
91
  }
99
92
  path = core.Internal.getValPath(anyTarget);
100
- if (!path && _typeof(anyTarget) === "object") {
93
+ if (!path && _typeof._typeof(anyTarget) === "object") {
101
94
  path = anyTarget["valPath"];
102
95
  }
103
96
  if (typeof anyTarget === "string") {
@@ -1,26 +1,17 @@
1
+ import { _ as _typeof } from './typeof-a1531d8f.esm.js';
1
2
  import { _ as _objectSpread2 } from './objectSpread2-c1340c1c.esm.js';
2
- import { initVal as initVal$1, Internal as Internal$1 } from '@valbuild/core';
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 { stegaClean, stegaEncode, stegaDecodeString, autoTagJSX } from '@valbuild/react/stega';
7
8
  export { ValRichText } from '@valbuild/react/internal';
8
- import { ValNextProvider } from './ValNextProvider-5f8b7338.esm.js';
9
+ import { ValNextProvider } from './ValNextProvider-25f1f5c9.esm.js';
9
10
  import NextImage from 'next/image';
10
11
  import { jsx } from 'react/jsx-runtime';
11
12
  export { ValApp } from './ValApp-3ab62a2b.esm.js';
12
13
  import { V as VERSION } from './version-98ec5c7a.esm.js';
13
14
 
14
- function _typeof(o) {
15
- "@babel/helpers - typeof";
16
-
17
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
18
- return typeof o;
19
- } : function (o) {
20
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
21
- }, _typeof(o);
22
- }
23
-
24
15
  function raw(val) {
25
16
  if (typeof val === "string") {
26
17
  return stegaClean(val);
@@ -54,6 +45,7 @@ function decodeValPathOfString(encodedString) {
54
45
  return stegaDecodeString(encodedString);
55
46
  }
56
47
 
48
+ var nextAppRouter = Internal$1.nextAppRouter;
57
49
  var initVal = function initVal(config) {
58
50
  var _createValSystem = initVal$1(config),
59
51
  s = _createValSystem.s,
@@ -64,6 +56,7 @@ var initVal = function initVal(config) {
64
56
  return {
65
57
  s: s,
66
58
  c: c,
59
+ nextAppRouter: nextAppRouter,
67
60
  val: _objectSpread2(_objectSpread2({}, val), {}, {
68
61
  attrs: function attrs(target) {
69
62
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "next",
9
9
  "react"
10
10
  ],
11
- "version": "0.83.0",
11
+ "version": "0.84.1",
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.83.0",
49
- "@valbuild/react": "~0.83.0",
50
- "@valbuild/server": "~0.83.0",
51
- "@valbuild/shared": "~0.83.0",
52
- "@valbuild/ui": "~0.83.0",
48
+ "@valbuild/core": "~0.84.1",
49
+ "@valbuild/react": "~0.84.1",
50
+ "@valbuild/server": "~0.84.1",
51
+ "@valbuild/shared": "~0.84.1",
52
+ "@valbuild/ui": "~0.84.1",
53
53
  "client-only": "^0.0.1",
54
54
  "server-only": "^0.0.1"
55
55
  },