@valbuild/next 0.64.0 → 0.65.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 (64) hide show
  1. package/README.md +36 -91
  2. package/client/dist/valbuild-next-client.cjs.d.ts +2 -2
  3. package/client/dist/valbuild-next-client.cjs.dev.js +19 -31
  4. package/client/dist/valbuild-next-client.cjs.prod.js +19 -31
  5. package/client/dist/valbuild-next-client.esm.js +19 -31
  6. package/dist/ValApp-50ec1e10.esm.js +53 -0
  7. package/dist/ValApp-9eefeefd.cjs.js +7 -0
  8. package/dist/ValApp-9eefeefd.cjs.prod.js +61 -0
  9. package/dist/ValApp-de156df4.cjs.dev.js +61 -0
  10. package/dist/ValNextProvider-0b711372.esm.js +430 -0
  11. package/dist/ValNextProvider-313af7bb.cjs.js +7 -0
  12. package/dist/ValNextProvider-313af7bb.cjs.prod.js +439 -0
  13. package/dist/ValNextProvider-abfbfdb5.cjs.dev.js +439 -0
  14. package/dist/{ValContext-06fe6f7e.cjs.dev.js → ValOverlayContext-55dae3ea.cjs.dev.js} +62 -71
  15. package/dist/ValOverlayContext-811e9be9.cjs.js +7 -0
  16. package/dist/{ValContext-12a3eca2.cjs.prod.js → ValOverlayContext-811e9be9.cjs.prod.js} +62 -71
  17. package/dist/{ValContext-8a8d9183.esm.js → ValOverlayContext-a2fdbce0.esm.js} +59 -69
  18. package/dist/{asyncToGenerator-0859ab5c.esm.js → asyncToGenerator-5f8c02f3.esm.js} +19 -24
  19. package/dist/{asyncToGenerator-ba66657c.cjs.dev.js → asyncToGenerator-67a5ff70.cjs.prod.js} +19 -24
  20. package/dist/{asyncToGenerator-3551d940.cjs.prod.js → asyncToGenerator-6ba61221.cjs.dev.js} +19 -24
  21. package/dist/declarations/src/ValApp.d.ts +1 -1
  22. package/dist/declarations/src/ValImage.d.ts +0 -1
  23. package/dist/declarations/src/ValProvider.d.ts +3 -5
  24. package/dist/declarations/src/external_exempt_from_val_quickjs.d.ts +31 -2
  25. package/dist/declarations/src/rsc/initValRsc.d.ts +4 -2
  26. package/dist/declarations/src/server/initValServer.d.ts +1 -1
  27. package/dist/{objectSpread2-bb9509e8.cjs.dev.js → objectSpread2-3c87fb4f.cjs.prod.js} +12 -18
  28. package/dist/{objectSpread2-24e737a6.cjs.prod.js → objectSpread2-792eb2c2.cjs.dev.js} +12 -18
  29. package/dist/{objectSpread2-439bdcdd.esm.js → objectSpread2-c1340c1c.esm.js} +12 -18
  30. package/dist/{slicedToArray-c03b6356.cjs.dev.js → slicedToArray-44036a76.cjs.dev.js} +5 -5
  31. package/dist/{slicedToArray-1ff80c5e.esm.js → slicedToArray-aa291011.esm.js} +5 -5
  32. package/dist/{slicedToArray-1d91551a.cjs.prod.js → slicedToArray-ce613de6.cjs.prod.js} +5 -5
  33. package/dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js +17 -0
  34. package/dist/unsupportedIterableToArray-5baabfdc.esm.js +15 -0
  35. package/dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js +17 -0
  36. package/dist/valbuild-next.cjs.d.ts +2 -2
  37. package/dist/valbuild-next.cjs.dev.js +23 -28
  38. package/dist/valbuild-next.cjs.prod.js +23 -28
  39. package/dist/valbuild-next.esm.js +23 -28
  40. package/package.json +6 -6
  41. package/rsc/dist/valbuild-next-rsc.cjs.d.ts +2 -2
  42. package/rsc/dist/valbuild-next-rsc.cjs.dev.js +202 -134
  43. package/rsc/dist/valbuild-next-rsc.cjs.prod.js +203 -132
  44. package/rsc/dist/valbuild-next-rsc.esm.js +203 -135
  45. package/server/dist/valbuild-next-server.cjs.d.ts +2 -2
  46. package/server/dist/valbuild-next-server.cjs.dev.js +23 -14
  47. package/server/dist/valbuild-next-server.cjs.prod.js +23 -14
  48. package/server/dist/valbuild-next-server.esm.js +23 -14
  49. package/client/dist/valbuild-next-client.cjs.d.ts.map +0 -1
  50. package/dist/ValApp-0ec0c7f3.cjs.js +0 -7
  51. package/dist/ValApp-0ec0c7f3.cjs.prod.js +0 -34
  52. package/dist/ValApp-61103149.esm.js +0 -26
  53. package/dist/ValApp-aff60572.cjs.dev.js +0 -34
  54. package/dist/ValContext-12a3eca2.cjs.js +0 -7
  55. package/dist/ValNextProvider-5226c452.cjs.js +0 -7
  56. package/dist/ValNextProvider-5226c452.cjs.prod.js +0 -101
  57. package/dist/ValNextProvider-ccbea1bd.cjs.dev.js +0 -101
  58. package/dist/ValNextProvider-d94cd904.esm.js +0 -92
  59. package/dist/unsupportedIterableToArray-51bb61c2.esm.js +0 -16
  60. package/dist/unsupportedIterableToArray-9e97e24a.cjs.dev.js +0 -18
  61. package/dist/unsupportedIterableToArray-afbea1dd.cjs.prod.js +0 -18
  62. package/dist/valbuild-next.cjs.d.ts.map +0 -1
  63. package/rsc/dist/valbuild-next-rsc.cjs.d.ts.map +0 -1
  64. package/server/dist/valbuild-next-server.cjs.d.ts.map +0 -1
@@ -31,6 +31,7 @@ export declare const Internal: {
31
31
  getSource: typeof import("@valbuild/core/dist/declarations/src/module").getSource;
32
32
  resolvePath: typeof import("@valbuild/core/dist/declarations/src/module").resolvePath;
33
33
  splitModuleFilePathAndModulePath: typeof import("@valbuild/core/dist/declarations/src/module").splitModuleFilePathAndModulePath;
34
+ joinModuleFilePathAndModulePath: typeof import("@valbuild/core/dist/declarations/src/module").joinModuleFilePathAndModulePath;
34
35
  isVal: typeof import("@valbuild/core/dist/declarations/src/val").isVal;
35
36
  createValPathOfItem: typeof import("@valbuild/core/dist/declarations/src/selector/SelectorProxy").createValPathOfItem;
36
37
  getSHA256Hash: (bits: Uint8Array) => string;
@@ -43,7 +44,30 @@ export declare const Internal: {
43
44
  [k: string]: string;
44
45
  };
45
46
  ModuleFilePathSep: string;
46
- notFileOp: (op: import("@valbuild/core/patch").Operation) => boolean;
47
+ notFileOp: (op: import("@valbuild/core/patch").Operation) => op is {
48
+ op: "add";
49
+ path: string[];
50
+ value: import("@valbuild/core/dist/declarations/src/patch").JSONValue;
51
+ } | {
52
+ op: "remove";
53
+ path: import("@valbuild/core/dist/declarations/src/fp/array").NonEmptyArray<string>;
54
+ } | {
55
+ op: "replace";
56
+ path: string[];
57
+ value: import("@valbuild/core/dist/declarations/src/patch").JSONValue;
58
+ } | {
59
+ op: "move";
60
+ from: import("@valbuild/core/dist/declarations/src/fp/array").NonEmptyArray<string>;
61
+ path: string[];
62
+ } | {
63
+ op: "copy";
64
+ from: string[];
65
+ path: string[];
66
+ } | {
67
+ op: "test";
68
+ path: string[];
69
+ value: import("@valbuild/core/dist/declarations/src/patch").JSONValue;
70
+ };
47
71
  isFileOp: (op: import("@valbuild/core/patch").Operation) => op is {
48
72
  op: "file";
49
73
  path: string[];
@@ -52,8 +76,13 @@ export declare const Internal: {
52
76
  };
53
77
  createPatchJSONPath: (modulePath: import("@valbuild/core").ModulePath) => string;
54
78
  createPatchPath: (modulePath: import("@valbuild/core").ModulePath) => string[];
55
- patchPathToModulePath: (patchPath: string[]) => import("@valbuild/core").ModulePath;
79
+ splitModulePath: typeof import("@valbuild/core/dist/declarations/src/module").splitModulePath;
80
+ splitModuleFilePath: typeof import("@valbuild/core/dist/declarations/src/module").splitModuleFilePath;
81
+ splitJoinedSourcePaths: typeof import("@valbuild/core/dist/declarations/src/module").splitJoinedSourcePaths;
82
+ parentOfSourcePath: typeof import("@valbuild/core/dist/declarations/src/module").parentOfSourcePath;
83
+ patchPathToModulePath: typeof import("@valbuild/core/dist/declarations/src/module").patchPathToModulePath;
56
84
  VAL_ENABLE_COOKIE_NAME: "val_enable";
57
85
  VAL_STATE_COOKIE: "val_state";
58
86
  VAL_SESSION_COOKIE: "val_session";
87
+ createFilename: (data: string | null, filename: string | null, metadata: import("@valbuild/core").FileMetadata | import("@valbuild/core").ImageMetadata | undefined, sha256: string) => string | null;
59
88
  };
@@ -2,12 +2,14 @@ import { type StegaOfSource } from "@valbuild/react/stega";
2
2
  import { SelectorSource, SelectorOf, GenericSelector, ValConfig, ValModules } from "@valbuild/core";
3
3
  import { cookies, draftMode, headers } from "next/headers";
4
4
  import { ValServer } from "@valbuild/server";
5
- declare const initFetchValStega: (config: ValConfig, valApiEndpoints: string, valServerPromise: Promise<ValServer>, isEnabled: () => boolean, getHeaders: () => Headers, getCookies: () => {
5
+ declare const initFetchValStega: (config: ValConfig, valApiEndpoints: string, valServerPromise: Promise<ValServer>, isEnabled: () => Promise<boolean>, getHeaders: () => Promise<{
6
+ get(name: string): string | null;
7
+ }>, getCookies: () => Promise<{
6
8
  get(name: string): {
7
9
  name: string;
8
10
  value: string;
9
11
  } | undefined;
10
- }) => <T extends SelectorSource>(selector: T) => SelectorOf<T> extends GenericSelector<infer S extends import("@valbuild/core").Source, undefined> ? Promise<StegaOfSource<S>> : never;
12
+ }>) => <T extends SelectorSource>(selector: T) => Promise<SelectorOf<T> extends GenericSelector<infer S> ? StegaOfSource<S> : never>;
11
13
  type ValNextRscConfig = {
12
14
  draftMode: typeof draftMode;
13
15
  headers: typeof headers;
@@ -2,7 +2,7 @@ import { ValConfig, ValModules } from "@valbuild/core";
2
2
  import type { draftMode } from "next/headers";
3
3
  import { NextResponse } from "next/server";
4
4
  declare const initValNextAppRouter: (valModules: ValModules, config: ValConfig, nextConfig: ValServerNextConfig & {
5
- formatter?: ((code: string, filePath: string) => Promise<string> | string) | undefined;
5
+ formatter?: (code: string, filePath: string) => Promise<string> | string;
6
6
  }) => (req: Request) => Promise<NextResponse<unknown>>;
7
7
  type ValServerNextConfig = {
8
8
  draftMode: typeof draftMode;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- function toPrimitive(t, r) {
3
+ function _toPrimitive(t, r) {
4
4
  if ("object" != typeof t || !t) return t;
5
5
  var e = t[Symbol.toPrimitive];
6
6
  if (void 0 !== e) {
@@ -11,24 +11,18 @@ function toPrimitive(t, r) {
11
11
  return ("string" === r ? String : Number)(t);
12
12
  }
13
13
 
14
- function toPropertyKey(t) {
15
- var i = toPrimitive(t, "string");
16
- return "symbol" == typeof i ? i : String(i);
14
+ function _toPropertyKey(t) {
15
+ var i = _toPrimitive(t, "string");
16
+ return "symbol" == typeof i ? i : i + "";
17
17
  }
18
18
 
19
- function _defineProperty(obj, key, value) {
20
- key = toPropertyKey(key);
21
- if (key in obj) {
22
- Object.defineProperty(obj, key, {
23
- value: value,
24
- enumerable: true,
25
- configurable: true,
26
- writable: true
27
- });
28
- } else {
29
- obj[key] = value;
30
- }
31
- return obj;
19
+ function _defineProperty(e, r, t) {
20
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
21
+ value: t,
22
+ enumerable: !0,
23
+ configurable: !0,
24
+ writable: !0
25
+ }) : e[r] = t, e;
32
26
  }
33
27
 
34
28
  function ownKeys(e, r) {
@@ -55,4 +49,4 @@ function _objectSpread2(e) {
55
49
 
56
50
  exports._defineProperty = _defineProperty;
57
51
  exports._objectSpread2 = _objectSpread2;
58
- exports.toPropertyKey = toPropertyKey;
52
+ exports._toPropertyKey = _toPropertyKey;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- function toPrimitive(t, r) {
3
+ function _toPrimitive(t, r) {
4
4
  if ("object" != typeof t || !t) return t;
5
5
  var e = t[Symbol.toPrimitive];
6
6
  if (void 0 !== e) {
@@ -11,24 +11,18 @@ function toPrimitive(t, r) {
11
11
  return ("string" === r ? String : Number)(t);
12
12
  }
13
13
 
14
- function toPropertyKey(t) {
15
- var i = toPrimitive(t, "string");
16
- return "symbol" == typeof i ? i : String(i);
14
+ function _toPropertyKey(t) {
15
+ var i = _toPrimitive(t, "string");
16
+ return "symbol" == typeof i ? i : i + "";
17
17
  }
18
18
 
19
- function _defineProperty(obj, key, value) {
20
- key = toPropertyKey(key);
21
- if (key in obj) {
22
- Object.defineProperty(obj, key, {
23
- value: value,
24
- enumerable: true,
25
- configurable: true,
26
- writable: true
27
- });
28
- } else {
29
- obj[key] = value;
30
- }
31
- return obj;
19
+ function _defineProperty(e, r, t) {
20
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
21
+ value: t,
22
+ enumerable: !0,
23
+ configurable: !0,
24
+ writable: !0
25
+ }) : e[r] = t, e;
32
26
  }
33
27
 
34
28
  function ownKeys(e, r) {
@@ -55,4 +49,4 @@ function _objectSpread2(e) {
55
49
 
56
50
  exports._defineProperty = _defineProperty;
57
51
  exports._objectSpread2 = _objectSpread2;
58
- exports.toPropertyKey = toPropertyKey;
52
+ exports._toPropertyKey = _toPropertyKey;
@@ -1,4 +1,4 @@
1
- function toPrimitive(t, r) {
1
+ function _toPrimitive(t, r) {
2
2
  if ("object" != typeof t || !t) return t;
3
3
  var e = t[Symbol.toPrimitive];
4
4
  if (void 0 !== e) {
@@ -9,24 +9,18 @@ function toPrimitive(t, r) {
9
9
  return ("string" === r ? String : Number)(t);
10
10
  }
11
11
 
12
- function toPropertyKey(t) {
13
- var i = toPrimitive(t, "string");
14
- return "symbol" == typeof i ? i : String(i);
12
+ function _toPropertyKey(t) {
13
+ var i = _toPrimitive(t, "string");
14
+ return "symbol" == typeof i ? i : i + "";
15
15
  }
16
16
 
17
- function _defineProperty(obj, key, value) {
18
- key = toPropertyKey(key);
19
- if (key in obj) {
20
- Object.defineProperty(obj, key, {
21
- value: value,
22
- enumerable: true,
23
- configurable: true,
24
- writable: true
25
- });
26
- } else {
27
- obj[key] = value;
28
- }
29
- return obj;
17
+ function _defineProperty(e, r, t) {
18
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
19
+ value: t,
20
+ enumerable: !0,
21
+ configurable: !0,
22
+ writable: !0
23
+ }) : e[r] = t, e;
30
24
  }
31
25
 
32
26
  function ownKeys(e, r) {
@@ -51,4 +45,4 @@ function _objectSpread2(e) {
51
45
  return e;
52
46
  }
53
47
 
54
- export { _objectSpread2 as _, _defineProperty as a, toPropertyKey as t };
48
+ export { _objectSpread2 as _, _defineProperty as a, _toPropertyKey as b };
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var unsupportedIterableToArray = require('./unsupportedIterableToArray-9e97e24a.cjs.dev.js');
3
+ var unsupportedIterableToArray = require('./unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
4
4
 
5
- function _arrayWithHoles(arr) {
6
- if (Array.isArray(arr)) return arr;
5
+ function _arrayWithHoles(r) {
6
+ if (Array.isArray(r)) return r;
7
7
  }
8
8
 
9
9
  function _iterableToArrayLimit(r, l) {
@@ -38,8 +38,8 @@ function _nonIterableRest() {
38
38
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
39
39
  }
40
40
 
41
- function _slicedToArray(arr, i) {
42
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray._unsupportedIterableToArray(arr, i) || _nonIterableRest();
41
+ function _slicedToArray(r, e) {
42
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || unsupportedIterableToArray._unsupportedIterableToArray(r, e) || _nonIterableRest();
43
43
  }
44
44
 
45
45
  exports._slicedToArray = _slicedToArray;
@@ -1,7 +1,7 @@
1
- import { _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-51bb61c2.esm.js';
1
+ import { _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-5baabfdc.esm.js';
2
2
 
3
- function _arrayWithHoles(arr) {
4
- if (Array.isArray(arr)) return arr;
3
+ function _arrayWithHoles(r) {
4
+ if (Array.isArray(r)) return r;
5
5
  }
6
6
 
7
7
  function _iterableToArrayLimit(r, l) {
@@ -36,8 +36,8 @@ function _nonIterableRest() {
36
36
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
37
37
  }
38
38
 
39
- function _slicedToArray(arr, i) {
40
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
39
+ function _slicedToArray(r, e) {
40
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
41
41
  }
42
42
 
43
43
  export { _slicedToArray as _ };
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var unsupportedIterableToArray = require('./unsupportedIterableToArray-afbea1dd.cjs.prod.js');
3
+ var unsupportedIterableToArray = require('./unsupportedIterableToArray-0d2087a2.cjs.prod.js');
4
4
 
5
- function _arrayWithHoles(arr) {
6
- if (Array.isArray(arr)) return arr;
5
+ function _arrayWithHoles(r) {
6
+ if (Array.isArray(r)) return r;
7
7
  }
8
8
 
9
9
  function _iterableToArrayLimit(r, l) {
@@ -38,8 +38,8 @@ function _nonIterableRest() {
38
38
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
39
39
  }
40
40
 
41
- function _slicedToArray(arr, i) {
42
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray._unsupportedIterableToArray(arr, i) || _nonIterableRest();
41
+ function _slicedToArray(r, e) {
42
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || unsupportedIterableToArray._unsupportedIterableToArray(r, e) || _nonIterableRest();
43
43
  }
44
44
 
45
45
  exports._slicedToArray = _slicedToArray;
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ function _arrayLikeToArray(r, a) {
4
+ (null == a || a > r.length) && (a = r.length);
5
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6
+ return n;
7
+ }
8
+
9
+ function _unsupportedIterableToArray(r, a) {
10
+ if (r) {
11
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
12
+ var t = {}.toString.call(r).slice(8, -1);
13
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
14
+ }
15
+ }
16
+
17
+ exports._unsupportedIterableToArray = _unsupportedIterableToArray;
@@ -0,0 +1,15 @@
1
+ function _arrayLikeToArray(r, a) {
2
+ (null == a || a > r.length) && (a = r.length);
3
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
4
+ return n;
5
+ }
6
+
7
+ function _unsupportedIterableToArray(r, a) {
8
+ if (r) {
9
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
10
+ var t = {}.toString.call(r).slice(8, -1);
11
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
12
+ }
13
+ }
14
+
15
+ export { _unsupportedIterableToArray as _ };
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ function _arrayLikeToArray(r, a) {
4
+ (null == a || a > r.length) && (a = r.length);
5
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6
+ return n;
7
+ }
8
+
9
+ function _unsupportedIterableToArray(r, a) {
10
+ if (r) {
11
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
12
+ var t = {}.toString.call(r).slice(8, -1);
13
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
14
+ }
15
+ }
16
+
17
+ exports._unsupportedIterableToArray = _unsupportedIterableToArray;
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=valbuild-next.cjs.d.ts.map
1
+ export * from "./declarations/src/index.js";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsYnVpbGQtbmV4dC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var objectSpread2 = require('./objectSpread2-bb9509e8.cjs.dev.js');
5
+ var objectSpread2 = require('./objectSpread2-792eb2c2.cjs.dev.js');
6
6
  var core = require('@valbuild/core');
7
7
  var stega = require('@valbuild/react/stega');
8
8
  var internal = require('@valbuild/react/internal');
9
- var ValNextProvider = require('./ValNextProvider-ccbea1bd.cjs.dev.js');
9
+ var ValNextProvider = require('./ValNextProvider-abfbfdb5.cjs.dev.js');
10
10
  var NextImage = require('next/image');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
- var ValApp = require('./ValApp-aff60572.cjs.dev.js');
12
+ var ValApp = require('./ValApp-de156df4.cjs.dev.js');
13
13
  var version = require('./version-82faa1d0.cjs.dev.js');
14
14
 
15
15
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -94,38 +94,31 @@ var initVal = function initVal(config) {
94
94
 
95
95
  var ValProvider = ValNextProvider.ValNextProvider;
96
96
 
97
- function _objectWithoutPropertiesLoose(source, excluded) {
98
- if (source == null) return {};
99
- var target = {};
100
- var sourceKeys = Object.keys(source);
101
- var key, i;
102
- for (i = 0; i < sourceKeys.length; i++) {
103
- key = sourceKeys[i];
104
- if (excluded.indexOf(key) >= 0) continue;
105
- target[key] = source[key];
97
+ function _objectWithoutPropertiesLoose(r, e) {
98
+ if (null == r) return {};
99
+ var t = {};
100
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
101
+ if (e.includes(n)) continue;
102
+ t[n] = r[n];
106
103
  }
107
- return target;
104
+ return t;
108
105
  }
109
106
 
110
- function _objectWithoutProperties(source, excluded) {
111
- if (source == null) return {};
112
- var target = _objectWithoutPropertiesLoose(source, excluded);
113
- var key, i;
107
+ function _objectWithoutProperties(e, t) {
108
+ if (null == e) return {};
109
+ var o,
110
+ r,
111
+ i = _objectWithoutPropertiesLoose(e, t);
114
112
  if (Object.getOwnPropertySymbols) {
115
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
116
- for (i = 0; i < sourceSymbolKeys.length; i++) {
117
- key = sourceSymbolKeys[i];
118
- if (excluded.indexOf(key) >= 0) continue;
119
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
120
- target[key] = source[key];
121
- }
113
+ var s = Object.getOwnPropertySymbols(e);
114
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
122
115
  }
123
- return target;
116
+ return i;
124
117
  }
125
118
 
126
119
  var _excluded = ["src", "alt", "style", "width", "disableHotspot", "height"];
127
120
  function ValImage(props) {
128
- var _src$metadata, _src$metadata2, _src$metadata3;
121
+ var _src$metadata, _src$metadata2, _src$metadata3, _src$metadata4;
129
122
  var src = props.src,
130
123
  alt = props.alt,
131
124
  style = props.style,
@@ -144,6 +137,7 @@ function ValImage(props) {
144
137
  objectPosition: "".concat(hotspot.x * 100, "% ").concat(hotspot.y * 100, "%")
145
138
  }) : style;
146
139
  var useMetadataDimensions = src.metadata !== undefined && !rest.fill && !width && !height;
140
+ var isUnoptimized = rest.unoptimized !== undefined ? rest.unoptimized : ((_src$metadata2 = src.metadata) === null || _src$metadata2 === void 0 ? void 0 : _src$metadata2.mimeType) === "image/svg+xml"; // SVGs are unoptimized by default
147
141
  return /*#__PURE__*/jsxRuntime.jsx(NextImage__default["default"], objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, rest), {}, {
148
142
  layout: undefined,
149
143
  objectFit: undefined,
@@ -158,8 +152,9 @@ function ValImage(props) {
158
152
  style: imageStyle,
159
153
  alt: raw(alt),
160
154
  fill: rest.fill,
161
- width: useMetadataDimensions ? (_src$metadata2 = src.metadata) === null || _src$metadata2 === void 0 ? void 0 : _src$metadata2.width : width,
162
- height: useMetadataDimensions ? (_src$metadata3 = src.metadata) === null || _src$metadata3 === void 0 ? void 0 : _src$metadata3.height : height
155
+ width: useMetadataDimensions ? (_src$metadata3 = src.metadata) === null || _src$metadata3 === void 0 ? void 0 : _src$metadata3.width : width,
156
+ height: useMetadataDimensions ? (_src$metadata4 = src.metadata) === null || _src$metadata4 === void 0 ? void 0 : _src$metadata4.height : height,
157
+ unoptimized: isUnoptimized
163
158
  }));
164
159
  }
165
160
 
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var objectSpread2 = require('./objectSpread2-24e737a6.cjs.prod.js');
5
+ var objectSpread2 = require('./objectSpread2-3c87fb4f.cjs.prod.js');
6
6
  var core = require('@valbuild/core');
7
7
  var stega = require('@valbuild/react/stega');
8
8
  var internal = require('@valbuild/react/internal');
9
- var ValNextProvider = require('./ValNextProvider-5226c452.cjs.prod.js');
9
+ var ValNextProvider = require('./ValNextProvider-313af7bb.cjs.prod.js');
10
10
  var NextImage = require('next/image');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
- var ValApp = require('./ValApp-0ec0c7f3.cjs.prod.js');
12
+ var ValApp = require('./ValApp-9eefeefd.cjs.prod.js');
13
13
  var version = require('./version-a9a6a619.cjs.prod.js');
14
14
 
15
15
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -94,38 +94,31 @@ var initVal = function initVal(config) {
94
94
 
95
95
  var ValProvider = ValNextProvider.ValNextProvider;
96
96
 
97
- function _objectWithoutPropertiesLoose(source, excluded) {
98
- if (source == null) return {};
99
- var target = {};
100
- var sourceKeys = Object.keys(source);
101
- var key, i;
102
- for (i = 0; i < sourceKeys.length; i++) {
103
- key = sourceKeys[i];
104
- if (excluded.indexOf(key) >= 0) continue;
105
- target[key] = source[key];
97
+ function _objectWithoutPropertiesLoose(r, e) {
98
+ if (null == r) return {};
99
+ var t = {};
100
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
101
+ if (e.includes(n)) continue;
102
+ t[n] = r[n];
106
103
  }
107
- return target;
104
+ return t;
108
105
  }
109
106
 
110
- function _objectWithoutProperties(source, excluded) {
111
- if (source == null) return {};
112
- var target = _objectWithoutPropertiesLoose(source, excluded);
113
- var key, i;
107
+ function _objectWithoutProperties(e, t) {
108
+ if (null == e) return {};
109
+ var o,
110
+ r,
111
+ i = _objectWithoutPropertiesLoose(e, t);
114
112
  if (Object.getOwnPropertySymbols) {
115
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
116
- for (i = 0; i < sourceSymbolKeys.length; i++) {
117
- key = sourceSymbolKeys[i];
118
- if (excluded.indexOf(key) >= 0) continue;
119
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
120
- target[key] = source[key];
121
- }
113
+ var s = Object.getOwnPropertySymbols(e);
114
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
122
115
  }
123
- return target;
116
+ return i;
124
117
  }
125
118
 
126
119
  var _excluded = ["src", "alt", "style", "width", "disableHotspot", "height"];
127
120
  function ValImage(props) {
128
- var _src$metadata, _src$metadata2, _src$metadata3;
121
+ var _src$metadata, _src$metadata2, _src$metadata3, _src$metadata4;
129
122
  var src = props.src,
130
123
  alt = props.alt,
131
124
  style = props.style,
@@ -144,6 +137,7 @@ function ValImage(props) {
144
137
  objectPosition: "".concat(hotspot.x * 100, "% ").concat(hotspot.y * 100, "%")
145
138
  }) : style;
146
139
  var useMetadataDimensions = src.metadata !== undefined && !rest.fill && !width && !height;
140
+ var isUnoptimized = rest.unoptimized !== undefined ? rest.unoptimized : ((_src$metadata2 = src.metadata) === null || _src$metadata2 === void 0 ? void 0 : _src$metadata2.mimeType) === "image/svg+xml"; // SVGs are unoptimized by default
147
141
  return /*#__PURE__*/jsxRuntime.jsx(NextImage__default["default"], objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, objectSpread2._objectSpread2(objectSpread2._objectSpread2({}, rest), {}, {
148
142
  layout: undefined,
149
143
  objectFit: undefined,
@@ -158,8 +152,9 @@ function ValImage(props) {
158
152
  style: imageStyle,
159
153
  alt: raw(alt),
160
154
  fill: rest.fill,
161
- width: useMetadataDimensions ? (_src$metadata2 = src.metadata) === null || _src$metadata2 === void 0 ? void 0 : _src$metadata2.width : width,
162
- height: useMetadataDimensions ? (_src$metadata3 = src.metadata) === null || _src$metadata3 === void 0 ? void 0 : _src$metadata3.height : height
155
+ width: useMetadataDimensions ? (_src$metadata3 = src.metadata) === null || _src$metadata3 === void 0 ? void 0 : _src$metadata3.width : width,
156
+ height: useMetadataDimensions ? (_src$metadata4 = src.metadata) === null || _src$metadata4 === void 0 ? void 0 : _src$metadata4.height : height,
157
+ unoptimized: isUnoptimized
163
158
  }));
164
159
  }
165
160
 
@@ -1,14 +1,14 @@
1
- import { _ as _objectSpread2 } from './objectSpread2-439bdcdd.esm.js';
1
+ import { _ as _objectSpread2 } from './objectSpread2-c1340c1c.esm.js';
2
2
  import { initVal as initVal$1, Internal as Internal$1 } from '@valbuild/core';
3
3
  import * as core from '@valbuild/core';
4
4
  export { core as expr };
5
5
  export { FILE_REF_PROP, GenericSelector, Schema, VAL_EXTENSION, derefPatch, modules } from '@valbuild/core';
6
6
  import { stegaClean, stegaDecodeString, autoTagJSX } from '@valbuild/react/stega';
7
7
  export { ValRichText } from '@valbuild/react/internal';
8
- import { ValNextProvider } from './ValNextProvider-d94cd904.esm.js';
8
+ import { ValNextProvider } from './ValNextProvider-0b711372.esm.js';
9
9
  import NextImage from 'next/image';
10
10
  import { jsx } from 'react/jsx-runtime';
11
- export { ValApp } from './ValApp-61103149.esm.js';
11
+ export { ValApp } from './ValApp-50ec1e10.esm.js';
12
12
  import { V as VERSION } from './version-98ec5c7a.esm.js';
13
13
 
14
14
  function _typeof(o) {
@@ -70,38 +70,31 @@ var initVal = function initVal(config) {
70
70
 
71
71
  var ValProvider = ValNextProvider;
72
72
 
73
- function _objectWithoutPropertiesLoose(source, excluded) {
74
- if (source == null) return {};
75
- var target = {};
76
- var sourceKeys = Object.keys(source);
77
- var key, i;
78
- for (i = 0; i < sourceKeys.length; i++) {
79
- key = sourceKeys[i];
80
- if (excluded.indexOf(key) >= 0) continue;
81
- target[key] = source[key];
73
+ function _objectWithoutPropertiesLoose(r, e) {
74
+ if (null == r) return {};
75
+ var t = {};
76
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
77
+ if (e.includes(n)) continue;
78
+ t[n] = r[n];
82
79
  }
83
- return target;
80
+ return t;
84
81
  }
85
82
 
86
- function _objectWithoutProperties(source, excluded) {
87
- if (source == null) return {};
88
- var target = _objectWithoutPropertiesLoose(source, excluded);
89
- var key, i;
83
+ function _objectWithoutProperties(e, t) {
84
+ if (null == e) return {};
85
+ var o,
86
+ r,
87
+ i = _objectWithoutPropertiesLoose(e, t);
90
88
  if (Object.getOwnPropertySymbols) {
91
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
92
- for (i = 0; i < sourceSymbolKeys.length; i++) {
93
- key = sourceSymbolKeys[i];
94
- if (excluded.indexOf(key) >= 0) continue;
95
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
96
- target[key] = source[key];
97
- }
89
+ var s = Object.getOwnPropertySymbols(e);
90
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
98
91
  }
99
- return target;
92
+ return i;
100
93
  }
101
94
 
102
95
  var _excluded = ["src", "alt", "style", "width", "disableHotspot", "height"];
103
96
  function ValImage(props) {
104
- var _src$metadata, _src$metadata2, _src$metadata3;
97
+ var _src$metadata, _src$metadata2, _src$metadata3, _src$metadata4;
105
98
  var src = props.src,
106
99
  alt = props.alt,
107
100
  style = props.style,
@@ -120,6 +113,7 @@ function ValImage(props) {
120
113
  objectPosition: "".concat(hotspot.x * 100, "% ").concat(hotspot.y * 100, "%")
121
114
  }) : style;
122
115
  var useMetadataDimensions = src.metadata !== undefined && !rest.fill && !width && !height;
116
+ var isUnoptimized = rest.unoptimized !== undefined ? rest.unoptimized : ((_src$metadata2 = src.metadata) === null || _src$metadata2 === void 0 ? void 0 : _src$metadata2.mimeType) === "image/svg+xml"; // SVGs are unoptimized by default
123
117
  return /*#__PURE__*/jsx(NextImage, _objectSpread2(_objectSpread2({}, _objectSpread2(_objectSpread2({}, rest), {}, {
124
118
  layout: undefined,
125
119
  objectFit: undefined,
@@ -134,8 +128,9 @@ function ValImage(props) {
134
128
  style: imageStyle,
135
129
  alt: raw(alt),
136
130
  fill: rest.fill,
137
- width: useMetadataDimensions ? (_src$metadata2 = src.metadata) === null || _src$metadata2 === void 0 ? void 0 : _src$metadata2.width : width,
138
- height: useMetadataDimensions ? (_src$metadata3 = src.metadata) === null || _src$metadata3 === void 0 ? void 0 : _src$metadata3.height : height
131
+ width: useMetadataDimensions ? (_src$metadata3 = src.metadata) === null || _src$metadata3 === void 0 ? void 0 : _src$metadata3.width : width,
132
+ height: useMetadataDimensions ? (_src$metadata4 = src.metadata) === null || _src$metadata4 === void 0 ? void 0 : _src$metadata4.height : height,
133
+ unoptimized: isUnoptimized
139
134
  }));
140
135
  }
141
136