@valbuild/next 0.148.0 → 0.148.2

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 (35) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/client/dist/valbuild-next-client.cjs.dev.js +3 -3
  3. package/client/dist/valbuild-next-client.cjs.prod.js +3 -3
  4. package/client/dist/valbuild-next-client.esm.js +3 -3
  5. package/dist/{ValNextProvider-d6de5d9a.cjs.dev.js → ValNextProvider-24c782da.cjs.dev.js} +12 -12
  6. package/dist/{ValNextProvider-9934c628.esm.js → ValNextProvider-bc46c45f.esm.js} +12 -12
  7. package/dist/ValNextProvider-ca21da63.cjs.js +7 -0
  8. package/dist/{ValNextProvider-3f8bc508.cjs.prod.js → ValNextProvider-ca21da63.cjs.prod.js} +12 -12
  9. package/dist/{ValOverlayContext-398baef3.esm.js → ValOverlayContext-1a45e03d.esm.js} +2 -1
  10. package/dist/{ValOverlayContext-98d33d86.cjs.dev.js → ValOverlayContext-262899b3.cjs.dev.js} +2 -1
  11. package/dist/ValOverlayContext-405ca70c.cjs.js +7 -0
  12. package/dist/{ValOverlayContext-9c4ae06d.cjs.prod.js → ValOverlayContext-405ca70c.cjs.prod.js} +2 -1
  13. package/dist/{ValVideo-b8130c1b.cjs.dev.js → ValVideo-6e410ad8.cjs.dev.js} +2 -1
  14. package/dist/{ValVideo-19f2ab05.esm.js → ValVideo-d377f06e.esm.js} +2 -1
  15. package/dist/ValVideo-dcd2b9f8.cjs.js +7 -0
  16. package/dist/{ValVideo-94e5aa28.cjs.prod.js → ValVideo-dcd2b9f8.cjs.prod.js} +2 -1
  17. package/dist/{routeFromVal-1cdcfed4.cjs.dev.js → routeFromVal-4df1157a.cjs.dev.js} +12 -12
  18. package/dist/{routeFromVal-3e1c7e8b.esm.js → routeFromVal-64cba2a6.esm.js} +12 -12
  19. package/dist/{routeFromVal-e447aa07.cjs.prod.js → routeFromVal-812be6ea.cjs.prod.js} +12 -12
  20. package/dist/valbuild-next.cjs.dev.js +3 -3
  21. package/dist/valbuild-next.cjs.prod.js +3 -3
  22. package/dist/valbuild-next.esm.js +3 -3
  23. package/dist/{version-416534b0.esm.js → version-8470e2d9.esm.js} +1 -1
  24. package/dist/{version-359f9b47.cjs.prod.js → version-d8807d9f.cjs.prod.js} +1 -1
  25. package/dist/{version-b2110ee0.cjs.dev.js → version-efc556d6.cjs.dev.js} +1 -1
  26. package/package.json +8 -8
  27. package/rsc/dist/valbuild-next-rsc.cjs.dev.js +9 -9
  28. package/rsc/dist/valbuild-next-rsc.cjs.prod.js +9 -9
  29. package/rsc/dist/valbuild-next-rsc.esm.js +9 -9
  30. package/server/dist/valbuild-next-server.cjs.dev.js +1 -1
  31. package/server/dist/valbuild-next-server.cjs.prod.js +1 -1
  32. package/server/dist/valbuild-next-server.esm.js +1 -1
  33. package/dist/ValNextProvider-3f8bc508.cjs.js +0 -7
  34. package/dist/ValOverlayContext-9c4ae06d.cjs.js +0 -7
  35. package/dist/ValVideo-94e5aa28.cjs.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @valbuild/next
2
2
 
3
+ ## 0.148.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#889](https://github.com/valbuild/val/pull/889) [`dc7c8cc`](https://github.com/valbuild/val/commit/dc7c8ccd82f643e662d00225fabec411b5d39e3a) Thanks [@freekh](https://github.com/freekh)! - Val is quieter in your app's console. Errors and warnings you can act on still
8
+ print, now prefixed with `[val]` so you can filter them. Val's own debug
9
+ output, which used to reach your terminal and browser console, is now off by
10
+ default. That includes the `Invalid JWT` line that printed on every request
11
+ with an expired session cookie, the "verifying draft mode" and polling notices,
12
+ and the Studio's sync and WebSocket chatter.
13
+
14
+ To turn the debug output back on, for example when reporting a bug:
15
+
16
+ - on the server, set `VAL_DEBUG=1`
17
+ - in the browser, run `localStorage.setItem("val:debug", "1")` in the console.
18
+ It takes effect immediately, with no reload. Remove the key to turn it off
19
+ again.
20
+
21
+ - Updated dependencies [[`dc7c8cc`](https://github.com/valbuild/val/commit/dc7c8ccd82f643e662d00225fabec411b5d39e3a)]:
22
+ - @valbuild/core@0.148.2
23
+ - @valbuild/shared@0.148.2
24
+ - @valbuild/server@0.148.2
25
+ - @valbuild/react@0.148.2
26
+ - @valbuild/ui@0.148.2
27
+ - @valbuild/language-server@0.148.2
28
+ - @valbuild/mcp@0.148.2
29
+
30
+ ## 0.148.1
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`fff5681`](https://github.com/valbuild/val/commit/fff5681b9ac9a24b873ba74ca636240d83404e46)]:
35
+ - @valbuild/ui@0.148.1
36
+ - @valbuild/react@0.148.1
37
+ - @valbuild/server@0.148.1
38
+ - @valbuild/language-server@0.148.1
39
+ - @valbuild/mcp@0.148.1
40
+
3
41
  ## 0.148.0
4
42
 
5
43
  ### Patch Changes
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('client-only');
6
- var routeFromVal = require('../../dist/routeFromVal-1cdcfed4.cjs.dev.js');
6
+ var routeFromVal = require('../../dist/routeFromVal-4df1157a.cjs.dev.js');
7
7
  var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
9
9
  var React = require('react');
10
- var ValOverlayContext = require('../../dist/ValOverlayContext-98d33d86.cjs.dev.js');
10
+ var ValOverlayContext = require('../../dist/ValOverlayContext-262899b3.cjs.dev.js');
11
11
  require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
12
12
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
13
13
  require('../../dist/objectSpread2-58024783.cjs.dev.js');
@@ -258,7 +258,7 @@ function resolveParams(params) {
258
258
  // diagnosable error instead of a cryptic `TypeError: React.use is not a
259
259
  // function`. Callers treat null as the error sentinel.
260
260
  if (!("use" in React__default["default"])) {
261
- console.error("Val: useValRoute received a Promise params argument but React.use is unavailable. Upgrade to React 19+ or pre-resolve the promise before passing it.");
261
+ core.Internal.log.error("useValRoute received a Promise params argument but React.use is unavailable. Upgrade to React 19+ or pre-resolve the promise before passing it.");
262
262
  return null;
263
263
  }
264
264
  return React__default["default"].use(params);
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('client-only');
6
- var routeFromVal = require('../../dist/routeFromVal-e447aa07.cjs.prod.js');
6
+ var routeFromVal = require('../../dist/routeFromVal-812be6ea.cjs.prod.js');
7
7
  var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
9
9
  var React = require('react');
10
- var ValOverlayContext = require('../../dist/ValOverlayContext-9c4ae06d.cjs.prod.js');
10
+ var ValOverlayContext = require('../../dist/ValOverlayContext-405ca70c.cjs.prod.js');
11
11
  require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
12
12
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
13
13
  require('../../dist/objectSpread2-13f847a9.cjs.prod.js');
@@ -258,7 +258,7 @@ function resolveParams(params) {
258
258
  // diagnosable error instead of a cryptic `TypeError: React.use is not a
259
259
  // function`. Callers treat null as the error sentinel.
260
260
  if (!("use" in React__default["default"])) {
261
- console.error("Val: useValRoute received a Promise params argument but React.use is unavailable. Upgrade to React 19+ or pre-resolve the promise before passing it.");
261
+ core.Internal.log.error("useValRoute received a Promise params argument but React.use is unavailable. Upgrade to React 19+ or pre-resolve the promise before passing it.");
262
262
  return null;
263
263
  }
264
264
  return React__default["default"].use(params);
@@ -1,9 +1,9 @@
1
1
  import 'client-only';
2
- import { j as jsonValuesRecordToFill, f as fillJsonValuesRecord, g as getJsonEntryStegaRoot, _ as _typeof, c as bundledJsonEntryImport, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, i as initValRouteFromVal } from '../../dist/routeFromVal-3e1c7e8b.esm.js';
2
+ import { j as jsonValuesRecordToFill, f as fillJsonValuesRecord, g as getJsonEntryStegaRoot, _ as _typeof, c as bundledJsonEntryImport, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, i as initValRouteFromVal } from '../../dist/routeFromVal-64cba2a6.esm.js';
3
3
  import { Internal } from '@valbuild/core';
4
4
  import { getModuleIds, stegaEncode } from '@valbuild/react/stega';
5
5
  import React from 'react';
6
- import { useValOverlayContext } from '../../dist/ValOverlayContext-398baef3.esm.js';
6
+ import { useValOverlayContext } from '../../dist/ValOverlayContext-1a45e03d.esm.js';
7
7
  import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
8
8
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
9
9
  import '../../dist/objectSpread2-60d1bd93.esm.js';
@@ -250,7 +250,7 @@ function resolveParams(params) {
250
250
  // diagnosable error instead of a cryptic `TypeError: React.use is not a
251
251
  // function`. Callers treat null as the error sentinel.
252
252
  if (!("use" in React)) {
253
- console.error("Val: useValRoute received a Promise params argument but React.use is unavailable. Upgrade to React 19+ or pre-resolve the promise before passing it.");
253
+ Internal.log.error("useValRoute received a Promise params argument but React.use is unavailable. Upgrade to React 19+ or pre-resolve the promise before passing it.");
254
254
  return null;
255
255
  }
256
256
  return React.use(params);
@@ -11,7 +11,7 @@ var ui = require('@valbuild/ui');
11
11
  var navigation = require('next/navigation');
12
12
  var Script = require('next/script');
13
13
  var React = require('react');
14
- var ValOverlayContext = require('./ValOverlayContext-98d33d86.cjs.dev.js');
14
+ var ValOverlayContext = require('./ValOverlayContext-262899b3.cjs.dev.js');
15
15
  var stega = require('@valbuild/react/stega');
16
16
  var fallbackColors = require('./fallbackColors-080c1bbc.cjs.dev.js');
17
17
  var client = require('@valbuild/shared/client');
@@ -359,7 +359,7 @@ var ValNextProvider = function ValNextProvider(props) {
359
359
  useConsoleLogEnableVal(mountOverlay);
360
360
  React__default["default"].useEffect(function () {
361
361
  if (location.search === "?message_onready=true") {
362
- console.warn("Val is verifying draft mode...");
362
+ core.Internal.log.debug("verifying draft mode...");
363
363
  return;
364
364
  }
365
365
  if (isValStudioPath(location.pathname)) {
@@ -489,7 +489,7 @@ var ValNextProvider = function ValNextProvider(props) {
489
489
  var valProviderOverlayListener = function valProviderOverlayListener(event) {
490
490
  if (event instanceof CustomEvent) {
491
491
  if (!(event !== null && event !== void 0 && event.detail.type)) {
492
- console.error("Val: invalid event detail (val-overlay-provider)", event);
492
+ core.Internal.log.error("invalid event detail (val-overlay-provider)", event);
493
493
  }
494
494
  if (event.detail.type === "spa-ready") {
495
495
  setSpaReady(true);
@@ -511,10 +511,10 @@ var ValNextProvider = function ValNextProvider(props) {
511
511
  });
512
512
  }
513
513
  } else {
514
- console.error("Val: invalid event detail (val-overlay-provider)", event.detail);
514
+ core.Internal.log.error("invalid event detail (val-overlay-provider)", event.detail);
515
515
  }
516
516
  } else {
517
- console.error("Val: invalid event (val-overlay-provider)", event);
517
+ core.Internal.log.error("invalid event (val-overlay-provider)", event);
518
518
  }
519
519
  };
520
520
  window.addEventListener("val-overlay-provider", valProviderOverlayListener);
@@ -557,7 +557,7 @@ var ValNextProvider = function ValNextProvider(props) {
557
557
  return;
558
558
  }
559
559
  if (res.status !== 200) {
560
- console.error("Val: could not get draft mode status", res);
560
+ core.Internal.log.error("could not get draft mode status", res);
561
561
  return;
562
562
  }
563
563
  setDraftMode(function (prev) {
@@ -569,7 +569,7 @@ var ValNextProvider = function ValNextProvider(props) {
569
569
  return prev;
570
570
  });
571
571
  })["catch"](function (err) {
572
- console.error("Val: could not get draft mode status", err);
572
+ core.Internal.log.error("could not get draft mode status", err);
573
573
  })["finally"](function () {
574
574
  if (pollDraftStatIdRef.current !== pollDraftStatId) {
575
575
  return;
@@ -586,7 +586,7 @@ var ValNextProvider = function ValNextProvider(props) {
586
586
  * unrecoverable, because the ONLY other thing that clears it is the
587
587
  * `val-ready` message the frame never sent.
588
588
  */
589
- console.warn("Val: draft mode did not confirm in time. Falling back to the " + "idle poll — try toggling preview again.");
589
+ core.Internal.log.warn("draft mode did not confirm in time. Falling back to the " + "idle poll — try toggling preview again.");
590
590
  setIframeSrc(null);
591
591
  return;
592
592
  }
@@ -656,13 +656,13 @@ var ValNextProvider = function ValNextProvider(props) {
656
656
  window.dispatchEvent(new Event(VAL_EDIT_LANDED));
657
657
  }
658
658
  } else {
659
- console.error("Val: invalid event detail", event.detail);
659
+ core.Internal.log.error("invalid event detail", event.detail);
660
660
  }
661
661
  } else {
662
- console.error("Val: invalid custom event details (val-event)", event.detail);
662
+ core.Internal.log.error("invalid custom event details (val-event)", event.detail);
663
663
  }
664
664
  } else {
665
- console.error("Val: invalid custom event (val-event)", event);
665
+ core.Internal.log.error("invalid custom event (val-event)", event);
666
666
  }
667
667
  };
668
668
  window.addEventListener("val-event", reactServerComponentRefreshListener);
@@ -831,7 +831,7 @@ var ValNextProvider = function ValNextProvider(props) {
831
831
  function useConsoleLogEnableVal(showOverlay) {
832
832
  React__default["default"].useEffect(function () {
833
833
  if (process.env["NODE_ENV"] === "development" && showOverlay === false && !isValStudioPath(location.pathname)) {
834
- console.warn("\n###########\n###########\n########### @@@@\n########### @@\n########### @@ @@ @@@@@@ @ @@\n########### @@ @@ @@ @@ @@\n########### @@ @@ %@ @ @@\n#### ##### @@ @@ .@ .@ @@\n### #### @@@@ @@: @@@. @@\n#### ##### @@@@ @@@@ =@@@@@@@@@\n###########\n\nThis page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden.\n\nTo show Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
834
+ core.Internal.log.warn("\n###########\n###########\n########### @@@@\n########### @@\n########### @@ @@ @@@@@@ @ @@\n########### @@ @@ @@ @@ @@\n########### @@ @@ %@ @ @@\n#### ##### @@ @@ .@ .@ @@\n### #### @@@@ @@: @@@. @@\n#### ##### @@@@ @@@@ =@@@@@@@@@\n###########\n\nThis page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden.\n\nTo show Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
835
835
  }
836
836
  }, [showOverlay]);
837
837
  }
@@ -7,7 +7,7 @@ import { VERSION, VAL_APP_PATH, VAL_OVERLAY_ID } from '@valbuild/ui';
7
7
  import { useRouter, usePathname } from 'next/navigation';
8
8
  import Script from 'next/script';
9
9
  import React, { useEffect } from 'react';
10
- import { ValExternalStore, ValOverlayProvider } from './ValOverlayContext-398baef3.esm.js';
10
+ import { ValExternalStore, ValOverlayProvider } from './ValOverlayContext-1a45e03d.esm.js';
11
11
  import { SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/stega';
12
12
  import { p as prefixStyles, u as useConfigStorageSave, f as floatDarkBg, d as floatLightBg, v as valPrefixedClass, c as cn } from './fallbackColors-149dfbc9.esm.js';
13
13
  import { VAL_THEME_SESSION_STORAGE_KEY, isValCanvasFrame } from '@valbuild/shared/client';
@@ -332,7 +332,7 @@ var ValNextProvider = function ValNextProvider(props) {
332
332
  useConsoleLogEnableVal(mountOverlay);
333
333
  React.useEffect(function () {
334
334
  if (location.search === "?message_onready=true") {
335
- console.warn("Val is verifying draft mode...");
335
+ Internal.log.debug("verifying draft mode...");
336
336
  return;
337
337
  }
338
338
  if (isValStudioPath(location.pathname)) {
@@ -462,7 +462,7 @@ var ValNextProvider = function ValNextProvider(props) {
462
462
  var valProviderOverlayListener = function valProviderOverlayListener(event) {
463
463
  if (event instanceof CustomEvent) {
464
464
  if (!(event !== null && event !== void 0 && event.detail.type)) {
465
- console.error("Val: invalid event detail (val-overlay-provider)", event);
465
+ Internal.log.error("invalid event detail (val-overlay-provider)", event);
466
466
  }
467
467
  if (event.detail.type === "spa-ready") {
468
468
  setSpaReady(true);
@@ -484,10 +484,10 @@ var ValNextProvider = function ValNextProvider(props) {
484
484
  });
485
485
  }
486
486
  } else {
487
- console.error("Val: invalid event detail (val-overlay-provider)", event.detail);
487
+ Internal.log.error("invalid event detail (val-overlay-provider)", event.detail);
488
488
  }
489
489
  } else {
490
- console.error("Val: invalid event (val-overlay-provider)", event);
490
+ Internal.log.error("invalid event (val-overlay-provider)", event);
491
491
  }
492
492
  };
493
493
  window.addEventListener("val-overlay-provider", valProviderOverlayListener);
@@ -530,7 +530,7 @@ var ValNextProvider = function ValNextProvider(props) {
530
530
  return;
531
531
  }
532
532
  if (res.status !== 200) {
533
- console.error("Val: could not get draft mode status", res);
533
+ Internal.log.error("could not get draft mode status", res);
534
534
  return;
535
535
  }
536
536
  setDraftMode(function (prev) {
@@ -542,7 +542,7 @@ var ValNextProvider = function ValNextProvider(props) {
542
542
  return prev;
543
543
  });
544
544
  })["catch"](function (err) {
545
- console.error("Val: could not get draft mode status", err);
545
+ Internal.log.error("could not get draft mode status", err);
546
546
  })["finally"](function () {
547
547
  if (pollDraftStatIdRef.current !== pollDraftStatId) {
548
548
  return;
@@ -559,7 +559,7 @@ var ValNextProvider = function ValNextProvider(props) {
559
559
  * unrecoverable, because the ONLY other thing that clears it is the
560
560
  * `val-ready` message the frame never sent.
561
561
  */
562
- console.warn("Val: draft mode did not confirm in time. Falling back to the " + "idle poll — try toggling preview again.");
562
+ Internal.log.warn("draft mode did not confirm in time. Falling back to the " + "idle poll — try toggling preview again.");
563
563
  setIframeSrc(null);
564
564
  return;
565
565
  }
@@ -629,13 +629,13 @@ var ValNextProvider = function ValNextProvider(props) {
629
629
  window.dispatchEvent(new Event(VAL_EDIT_LANDED));
630
630
  }
631
631
  } else {
632
- console.error("Val: invalid event detail", event.detail);
632
+ Internal.log.error("invalid event detail", event.detail);
633
633
  }
634
634
  } else {
635
- console.error("Val: invalid custom event details (val-event)", event.detail);
635
+ Internal.log.error("invalid custom event details (val-event)", event.detail);
636
636
  }
637
637
  } else {
638
- console.error("Val: invalid custom event (val-event)", event);
638
+ Internal.log.error("invalid custom event (val-event)", event);
639
639
  }
640
640
  };
641
641
  window.addEventListener("val-event", reactServerComponentRefreshListener);
@@ -804,7 +804,7 @@ var ValNextProvider = function ValNextProvider(props) {
804
804
  function useConsoleLogEnableVal(showOverlay) {
805
805
  React.useEffect(function () {
806
806
  if (process.env["NODE_ENV"] === "development" && showOverlay === false && !isValStudioPath(location.pathname)) {
807
- console.warn("\n###########\n###########\n########### @@@@\n########### @@\n########### @@ @@ @@@@@@ @ @@\n########### @@ @@ @@ @@ @@\n########### @@ @@ %@ @ @@\n#### ##### @@ @@ .@ .@ @@\n### #### @@@@ @@: @@@. @@\n#### ##### @@@@ @@@@ =@@@@@@@@@\n###########\n\nThis page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden.\n\nTo show Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
807
+ Internal.log.warn("\n###########\n###########\n########### @@@@\n########### @@\n########### @@ @@ @@@@@@ @ @@\n########### @@ @@ @@ @@ @@\n########### @@ @@ %@ @ @@\n#### ##### @@ @@ .@ .@ @@\n### #### @@@@ @@: @@@. @@\n#### ##### @@@@ @@@@ =@@@@@@@@@\n###########\n\nThis page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden.\n\nTo show Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
808
808
  }
809
809
  }, [showOverlay]);
810
810
  }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValNextProvider-ca21da63.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValNextProvider-ca21da63.cjs.dev.js");
7
+ }
@@ -11,7 +11,7 @@ var ui = require('@valbuild/ui');
11
11
  var navigation = require('next/navigation');
12
12
  var Script = require('next/script');
13
13
  var React = require('react');
14
- var ValOverlayContext = require('./ValOverlayContext-9c4ae06d.cjs.prod.js');
14
+ var ValOverlayContext = require('./ValOverlayContext-405ca70c.cjs.prod.js');
15
15
  var stega = require('@valbuild/react/stega');
16
16
  var fallbackColors = require('./fallbackColors-e1d73b36.cjs.prod.js');
17
17
  var client = require('@valbuild/shared/client');
@@ -359,7 +359,7 @@ var ValNextProvider = function ValNextProvider(props) {
359
359
  useConsoleLogEnableVal(mountOverlay);
360
360
  React__default["default"].useEffect(function () {
361
361
  if (location.search === "?message_onready=true") {
362
- console.warn("Val is verifying draft mode...");
362
+ core.Internal.log.debug("verifying draft mode...");
363
363
  return;
364
364
  }
365
365
  if (isValStudioPath(location.pathname)) {
@@ -489,7 +489,7 @@ var ValNextProvider = function ValNextProvider(props) {
489
489
  var valProviderOverlayListener = function valProviderOverlayListener(event) {
490
490
  if (event instanceof CustomEvent) {
491
491
  if (!(event !== null && event !== void 0 && event.detail.type)) {
492
- console.error("Val: invalid event detail (val-overlay-provider)", event);
492
+ core.Internal.log.error("invalid event detail (val-overlay-provider)", event);
493
493
  }
494
494
  if (event.detail.type === "spa-ready") {
495
495
  setSpaReady(true);
@@ -511,10 +511,10 @@ var ValNextProvider = function ValNextProvider(props) {
511
511
  });
512
512
  }
513
513
  } else {
514
- console.error("Val: invalid event detail (val-overlay-provider)", event.detail);
514
+ core.Internal.log.error("invalid event detail (val-overlay-provider)", event.detail);
515
515
  }
516
516
  } else {
517
- console.error("Val: invalid event (val-overlay-provider)", event);
517
+ core.Internal.log.error("invalid event (val-overlay-provider)", event);
518
518
  }
519
519
  };
520
520
  window.addEventListener("val-overlay-provider", valProviderOverlayListener);
@@ -557,7 +557,7 @@ var ValNextProvider = function ValNextProvider(props) {
557
557
  return;
558
558
  }
559
559
  if (res.status !== 200) {
560
- console.error("Val: could not get draft mode status", res);
560
+ core.Internal.log.error("could not get draft mode status", res);
561
561
  return;
562
562
  }
563
563
  setDraftMode(function (prev) {
@@ -569,7 +569,7 @@ var ValNextProvider = function ValNextProvider(props) {
569
569
  return prev;
570
570
  });
571
571
  })["catch"](function (err) {
572
- console.error("Val: could not get draft mode status", err);
572
+ core.Internal.log.error("could not get draft mode status", err);
573
573
  })["finally"](function () {
574
574
  if (pollDraftStatIdRef.current !== pollDraftStatId) {
575
575
  return;
@@ -586,7 +586,7 @@ var ValNextProvider = function ValNextProvider(props) {
586
586
  * unrecoverable, because the ONLY other thing that clears it is the
587
587
  * `val-ready` message the frame never sent.
588
588
  */
589
- console.warn("Val: draft mode did not confirm in time. Falling back to the " + "idle poll — try toggling preview again.");
589
+ core.Internal.log.warn("draft mode did not confirm in time. Falling back to the " + "idle poll — try toggling preview again.");
590
590
  setIframeSrc(null);
591
591
  return;
592
592
  }
@@ -656,13 +656,13 @@ var ValNextProvider = function ValNextProvider(props) {
656
656
  window.dispatchEvent(new Event(VAL_EDIT_LANDED));
657
657
  }
658
658
  } else {
659
- console.error("Val: invalid event detail", event.detail);
659
+ core.Internal.log.error("invalid event detail", event.detail);
660
660
  }
661
661
  } else {
662
- console.error("Val: invalid custom event details (val-event)", event.detail);
662
+ core.Internal.log.error("invalid custom event details (val-event)", event.detail);
663
663
  }
664
664
  } else {
665
- console.error("Val: invalid custom event (val-event)", event);
665
+ core.Internal.log.error("invalid custom event (val-event)", event);
666
666
  }
667
667
  };
668
668
  window.addEventListener("val-event", reactServerComponentRefreshListener);
@@ -831,7 +831,7 @@ var ValNextProvider = function ValNextProvider(props) {
831
831
  function useConsoleLogEnableVal(showOverlay) {
832
832
  React__default["default"].useEffect(function () {
833
833
  if (process.env["NODE_ENV"] === "development" && showOverlay === false && !isValStudioPath(location.pathname)) {
834
- console.warn("\n###########\n###########\n########### @@@@\n########### @@\n########### @@ @@ @@@@@@ @ @@\n########### @@ @@ @@ @@ @@\n########### @@ @@ %@ @ @@\n#### ##### @@ @@ .@ .@ @@\n### #### @@@@ @@: @@@. @@\n#### ##### @@@@ @@@@ =@@@@@@@@@\n###########\n\nThis page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden.\n\nTo show Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
834
+ core.Internal.log.warn("\n###########\n###########\n########### @@@@\n########### @@\n########### @@ @@ @@@@@@ @ @@\n########### @@ @@ @@ @@ @@\n########### @@ @@ %@ @ @@\n#### ##### @@ @@ .@ .@ @@\n### #### @@@@ @@: @@@. @@\n#### ##### @@@@ @@@@ =@@@@@@@@@\n###########\n\nThis page is built with Val Build - the lightweight CMS where content is code.\n\nVal is currently hidden.\n\nTo show Val, go to the following URL:\n".concat(window.location.origin, "/api/val/enable?redirect_to=").concat(encodeURIComponent(window.location.href), "\n \nYou are seeing this message because you are in development mode."));
835
835
  }
836
836
  }, [showOverlay]);
837
837
  }
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
3
3
  import { a as _toPropertyKey, _ as _defineProperty } from './defineProperty-cca5affa.esm.js';
4
+ import { Internal } from '@valbuild/core';
4
5
  import { deepEqual } from '@valbuild/core/patch';
5
6
  import React from 'react';
6
7
  import { jsx } from 'react/jsx-runtime';
@@ -153,7 +154,7 @@ var ValExternalStore = /*#__PURE__*/function () {
153
154
  var missing = paths.filter(function (p) {
154
155
  return !_this.loadedSources.has(p);
155
156
  });
156
- console.error("Val: draft module(s) did not load within ".concat(LOAD_TIMEOUT_MS, "ms; rendering with partial data. Missing: ").concat(missing.join(", ")));
157
+ Internal.log.error("draft module(s) did not load within ".concat(LOAD_TIMEOUT_MS, "ms; rendering with partial data. Missing: ").concat(missing.join(", ")));
157
158
  cleanup();
158
159
  resolve();
159
160
  }, LOAD_TIMEOUT_MS);
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
7
7
  var defineProperty = require('./defineProperty-f90345d7.cjs.dev.js');
8
+ var core = require('@valbuild/core');
8
9
  var patch = require('@valbuild/core/patch');
9
10
  var React = require('react');
10
11
  var jsxRuntime = require('react/jsx-runtime');
@@ -161,7 +162,7 @@ var ValExternalStore = /*#__PURE__*/function () {
161
162
  var missing = paths.filter(function (p) {
162
163
  return !_this.loadedSources.has(p);
163
164
  });
164
- console.error("Val: draft module(s) did not load within ".concat(LOAD_TIMEOUT_MS, "ms; rendering with partial data. Missing: ").concat(missing.join(", ")));
165
+ core.Internal.log.error("draft module(s) did not load within ".concat(LOAD_TIMEOUT_MS, "ms; rendering with partial data. Missing: ").concat(missing.join(", ")));
165
166
  cleanup();
166
167
  resolve();
167
168
  }, LOAD_TIMEOUT_MS);
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValOverlayContext-405ca70c.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValOverlayContext-405ca70c.cjs.dev.js");
7
+ }
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
7
7
  var defineProperty = require('./defineProperty-8951f469.cjs.prod.js');
8
+ var core = require('@valbuild/core');
8
9
  var patch = require('@valbuild/core/patch');
9
10
  var React = require('react');
10
11
  var jsxRuntime = require('react/jsx-runtime');
@@ -161,7 +162,7 @@ var ValExternalStore = /*#__PURE__*/function () {
161
162
  var missing = paths.filter(function (p) {
162
163
  return !_this.loadedSources.has(p);
163
164
  });
164
- console.error("Val: draft module(s) did not load within ".concat(LOAD_TIMEOUT_MS, "ms; rendering with partial data. Missing: ").concat(missing.join(", ")));
165
+ core.Internal.log.error("draft module(s) did not load within ".concat(LOAD_TIMEOUT_MS, "ms; rendering with partial data. Missing: ").concat(missing.join(", ")));
165
166
  cleanup();
166
167
  resolve();
167
168
  }, LOAD_TIMEOUT_MS);
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var objectSpread2 = require('./objectSpread2-58024783.cjs.dev.js');
7
7
  var objectWithoutProperties = require('./objectWithoutProperties-8f93848f.cjs.dev.js');
8
+ var core = require('@valbuild/core');
8
9
  var React = require('react');
9
10
  var stega = require('@valbuild/react/stega');
10
11
  var jsxRuntime = require('react/jsx-runtime');
@@ -59,7 +60,7 @@ function ValVideo(props) {
59
60
  }
60
61
  var loadHls = hlsRef.current;
61
62
  if (!loadHls) {
62
- console.warn('Val: this browser cannot play HLS streams on its own. Pass `hls={() => import("hls.js")}` to ValVideo.');
63
+ core.Internal.log.warn('this browser cannot play HLS streams on its own. Pass `hls={() => import("hls.js")}` to ValVideo.');
63
64
  return;
64
65
  }
65
66
  var destroyed = false;
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { _ as _objectSpread2 } from './objectSpread2-60d1bd93.esm.js';
3
3
  import { _ as _objectWithoutProperties, d as decodeValPathsOfString } from './objectWithoutProperties-2daec22c.esm.js';
4
+ import { Internal } from '@valbuild/core';
4
5
  import { useRef, useEffect } from 'react';
5
6
  import { raw } from '@valbuild/react/stega';
6
7
  import { jsx } from 'react/jsx-runtime';
@@ -55,7 +56,7 @@ function ValVideo(props) {
55
56
  }
56
57
  var loadHls = hlsRef.current;
57
58
  if (!loadHls) {
58
- console.warn('Val: this browser cannot play HLS streams on its own. Pass `hls={() => import("hls.js")}` to ValVideo.');
59
+ Internal.log.warn('this browser cannot play HLS streams on its own. Pass `hls={() => import("hls.js")}` to ValVideo.');
59
60
  return;
60
61
  }
61
62
  var destroyed = false;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValVideo-dcd2b9f8.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValVideo-dcd2b9f8.cjs.dev.js");
7
+ }
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var objectSpread2 = require('./objectSpread2-13f847a9.cjs.prod.js');
7
7
  var objectWithoutProperties = require('./objectWithoutProperties-107dcb46.cjs.prod.js');
8
+ var core = require('@valbuild/core');
8
9
  var React = require('react');
9
10
  var stega = require('@valbuild/react/stega');
10
11
  var jsxRuntime = require('react/jsx-runtime');
@@ -59,7 +60,7 @@ function ValVideo(props) {
59
60
  }
60
61
  var loadHls = hlsRef.current;
61
62
  if (!loadHls) {
62
- console.warn('Val: this browser cannot play HLS streams on its own. Pass `hls={() => import("hls.js")}` to ValVideo.');
63
+ core.Internal.log.warn('this browser cannot play HLS streams on its own. Pass `hls={() => import("hls.js")}` to ValVideo.');
63
64
  return;
64
65
  }
65
66
  var destroyed = false;
@@ -174,46 +174,46 @@ schema,
174
174
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
175
175
  val) {
176
176
  if (!path) {
177
- console.error("Val: ".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
177
+ core.Internal.log.error("".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
178
178
  return null;
179
179
  }
180
180
  if (val === null) {
181
181
  return null;
182
182
  }
183
183
  if (_typeof(val) !== "object") {
184
- 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)."));
184
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof(val), " instead)."));
185
185
  return null;
186
186
  }
187
187
  if (Array.isArray(val)) {
188
- 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)."));
188
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found array instead)."));
189
189
  return null;
190
190
  }
191
191
  if (!schema) {
192
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
192
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
193
193
  return null;
194
194
  }
195
195
  if (!(schema instanceof core.RecordSchema)) {
196
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
196
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
197
197
  } else if (!schema["currentRouter"]) {
198
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
198
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
199
199
  } else if (schema["currentRouter"].getRouterId() !== core.Internal.nextAppRouter.getRouterId() && schema["currentRouter"].getRouterId() !== core.Internal.externalPageRouter.getRouterId()) {
200
- 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 or External URL Page Router)."));
200
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router or External URL Page Router)."));
201
201
  return null;
202
202
  }
203
203
  if (_typeof(resolvedParams) !== "object") {
204
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
204
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
205
205
  return null;
206
206
  }
207
207
  var _Internal$splitModule = core.Internal.splitModuleFilePathAndModulePath(path),
208
208
  _Internal$splitModule2 = slicedToArray._slicedToArray(_Internal$splitModule, 1),
209
209
  moduleFilePath = _Internal$splitModule2[0];
210
210
  if (!(moduleFilePath.endsWith("page.val.ts") || moduleFilePath.endsWith("page.val.js"))) {
211
- 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."));
211
+ core.Internal.log.error("".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."));
212
212
  return null;
213
213
  }
214
214
  var srcFolder = client.getNextAppRouterSourceFolder(moduleFilePath);
215
215
  if (!srcFolder) {
216
- console.error("Val: ".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
216
+ core.Internal.log.error("".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
217
217
  return null;
218
218
  }
219
219
  var pattern = client.getPatternFromModuleFilePath(moduleFilePath, srcFolder);
@@ -280,11 +280,11 @@ val) {
280
280
  return "[...".concat(part.paramName, "]");
281
281
  }
282
282
  });
283
- 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."));
283
+ core.Internal.log.error("".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."));
284
284
  return null;
285
285
  }
286
286
  if (Object.keys(missingParamKeys).length > 0) {
287
- 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."));
287
+ core.Internal.log.error("".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."));
288
288
  // We do not return null here since we found a route that matches the path
289
289
  // though chances are that there's something wrong in the way ${methodName} is used
290
290
  }
@@ -172,46 +172,46 @@ schema,
172
172
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
173
173
  val) {
174
174
  if (!path) {
175
- console.error("Val: ".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
175
+ Internal.log.error("".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
176
176
  return null;
177
177
  }
178
178
  if (val === null) {
179
179
  return null;
180
180
  }
181
181
  if (_typeof(val) !== "object") {
182
- 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)."));
182
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof(val), " instead)."));
183
183
  return null;
184
184
  }
185
185
  if (Array.isArray(val)) {
186
- 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)."));
186
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found array instead)."));
187
187
  return null;
188
188
  }
189
189
  if (!schema) {
190
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
190
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
191
191
  return null;
192
192
  }
193
193
  if (!(schema instanceof RecordSchema)) {
194
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
194
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
195
195
  } else if (!schema["currentRouter"]) {
196
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
196
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
197
197
  } else if (schema["currentRouter"].getRouterId() !== Internal.nextAppRouter.getRouterId() && schema["currentRouter"].getRouterId() !== Internal.externalPageRouter.getRouterId()) {
198
- 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 or External URL Page Router)."));
198
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router or External URL Page Router)."));
199
199
  return null;
200
200
  }
201
201
  if (_typeof(resolvedParams) !== "object") {
202
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
202
+ Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
203
203
  return null;
204
204
  }
205
205
  var _Internal$splitModule = Internal.splitModuleFilePathAndModulePath(path),
206
206
  _Internal$splitModule2 = _slicedToArray(_Internal$splitModule, 1),
207
207
  moduleFilePath = _Internal$splitModule2[0];
208
208
  if (!(moduleFilePath.endsWith("page.val.ts") || moduleFilePath.endsWith("page.val.js"))) {
209
- 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."));
209
+ Internal.log.error("".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."));
210
210
  return null;
211
211
  }
212
212
  var srcFolder = getNextAppRouterSourceFolder(moduleFilePath);
213
213
  if (!srcFolder) {
214
- console.error("Val: ".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
214
+ Internal.log.error("".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
215
215
  return null;
216
216
  }
217
217
  var pattern = getPatternFromModuleFilePath(moduleFilePath, srcFolder);
@@ -278,11 +278,11 @@ val) {
278
278
  return "[...".concat(part.paramName, "]");
279
279
  }
280
280
  });
281
- 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."));
281
+ Internal.log.error("".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."));
282
282
  return null;
283
283
  }
284
284
  if (Object.keys(missingParamKeys).length > 0) {
285
- 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."));
285
+ Internal.log.error("".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."));
286
286
  // We do not return null here since we found a route that matches the path
287
287
  // though chances are that there's something wrong in the way ${methodName} is used
288
288
  }
@@ -174,46 +174,46 @@ schema,
174
174
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
175
175
  val) {
176
176
  if (!path) {
177
- console.error("Val: ".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
177
+ core.Internal.log.error("".concat(methodName, " can only be used with a Val module (details: no Val path found)."));
178
178
  return null;
179
179
  }
180
180
  if (val === null) {
181
181
  return null;
182
182
  }
183
183
  if (_typeof(val) !== "object") {
184
- 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)."));
184
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof(val), " instead)."));
185
185
  return null;
186
186
  }
187
187
  if (Array.isArray(val)) {
188
- 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)."));
188
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found array instead)."));
189
189
  return null;
190
190
  }
191
191
  if (!schema) {
192
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
192
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: no schema found)."));
193
193
  return null;
194
194
  }
195
195
  if (!(schema instanceof core.RecordSchema)) {
196
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
196
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: schema is not a record)."));
197
197
  } else if (!schema["currentRouter"]) {
198
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
198
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not set)."));
199
199
  } else if (schema["currentRouter"].getRouterId() !== core.Internal.nextAppRouter.getRouterId() && schema["currentRouter"].getRouterId() !== core.Internal.externalPageRouter.getRouterId()) {
200
- 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 or External URL Page Router)."));
200
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router or External URL Page Router)."));
201
201
  return null;
202
202
  }
203
203
  if (_typeof(resolvedParams) !== "object") {
204
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
204
+ core.Internal.log.error("".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
205
205
  return null;
206
206
  }
207
207
  var _Internal$splitModule = core.Internal.splitModuleFilePathAndModulePath(path),
208
208
  _Internal$splitModule2 = slicedToArray._slicedToArray(_Internal$splitModule, 1),
209
209
  moduleFilePath = _Internal$splitModule2[0];
210
210
  if (!(moduleFilePath.endsWith("page.val.ts") || moduleFilePath.endsWith("page.val.js"))) {
211
- 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."));
211
+ core.Internal.log.error("".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."));
212
212
  return null;
213
213
  }
214
214
  var srcFolder = client.getNextAppRouterSourceFolder(moduleFilePath);
215
215
  if (!srcFolder) {
216
- console.error("Val: ".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
216
+ core.Internal.log.error("".concat(methodName, " was used with a Val module that is not in the /app or /src/app folder"));
217
217
  return null;
218
218
  }
219
219
  var pattern = client.getPatternFromModuleFilePath(moduleFilePath, srcFolder);
@@ -280,11 +280,11 @@ val) {
280
280
  return "[...".concat(part.paramName, "]");
281
281
  }
282
282
  });
283
- 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."));
283
+ core.Internal.log.error("".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."));
284
284
  return null;
285
285
  }
286
286
  if (Object.keys(missingParamKeys).length > 0) {
287
- 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."));
287
+ core.Internal.log.error("".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."));
288
288
  // We do not return null here since we found a route that matches the path
289
289
  // though chances are that there's something wrong in the way ${methodName} is used
290
290
  }
@@ -8,13 +8,13 @@ var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
9
9
  var objectWithoutProperties = require('./objectWithoutProperties-8f93848f.cjs.dev.js');
10
10
  var internal = require('@valbuild/react/internal');
11
- var ValNextProvider = require('./ValNextProvider-d6de5d9a.cjs.dev.js');
11
+ var ValNextProvider = require('./ValNextProvider-24c782da.cjs.dev.js');
12
12
  var NextImage = require('next/image');
13
13
  var jsxRuntime = require('react/jsx-runtime');
14
- var ValVideo = require('./ValVideo-b8130c1b.cjs.dev.js');
14
+ var ValVideo = require('./ValVideo-6e410ad8.cjs.dev.js');
15
15
  var ValApp = require('./ValApp-cd14230d.cjs.dev.js');
16
16
  var ValModulesClient = require('./ValModulesClient-4ecabf99.cjs.dev.js');
17
- var version = require('./version-b2110ee0.cjs.dev.js');
17
+ var version = require('./version-efc556d6.cjs.dev.js');
18
18
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
19
19
  require('./defineProperty-f90345d7.cjs.dev.js');
20
20
  require('./unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
@@ -8,13 +8,13 @@ var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
9
9
  var objectWithoutProperties = require('./objectWithoutProperties-107dcb46.cjs.prod.js');
10
10
  var internal = require('@valbuild/react/internal');
11
- var ValNextProvider = require('./ValNextProvider-3f8bc508.cjs.prod.js');
11
+ var ValNextProvider = require('./ValNextProvider-ca21da63.cjs.prod.js');
12
12
  var NextImage = require('next/image');
13
13
  var jsxRuntime = require('react/jsx-runtime');
14
- var ValVideo = require('./ValVideo-94e5aa28.cjs.prod.js');
14
+ var ValVideo = require('./ValVideo-dcd2b9f8.cjs.prod.js');
15
15
  var ValApp = require('./ValApp-b17ac306.cjs.prod.js');
16
16
  var ValModulesClient = require('./ValModulesClient-10c0721c.cjs.prod.js');
17
- var version = require('./version-359f9b47.cjs.prod.js');
17
+ var version = require('./version-d8807d9f.cjs.prod.js');
18
18
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
19
19
  require('./defineProperty-8951f469.cjs.prod.js');
20
20
  require('./unsupportedIterableToArray-0d2087a2.cjs.prod.js');
@@ -7,13 +7,13 @@ export { GenericSelector, Schema, VAL_EXTENSION, derefPatch, modules } from '@va
7
7
  import { stegaEncode, attrs, raw, autoTagJSX } from '@valbuild/react/stega';
8
8
  import { d as decodeValPathsOfString, _ as _objectWithoutProperties } from './objectWithoutProperties-2daec22c.esm.js';
9
9
  export { ValRichText } from '@valbuild/react/internal';
10
- import { ValNextProvider } from './ValNextProvider-9934c628.esm.js';
10
+ import { ValNextProvider } from './ValNextProvider-bc46c45f.esm.js';
11
11
  import NextImage from 'next/image';
12
12
  import { jsx } from 'react/jsx-runtime';
13
- export { ValVideo } from './ValVideo-19f2ab05.esm.js';
13
+ export { ValVideo } from './ValVideo-d377f06e.esm.js';
14
14
  export { ValApp } from './ValApp-821536aa.esm.js';
15
15
  export { ValModulesClient, useRegisterValModules } from './ValModulesClient-0dd601a1.esm.js';
16
- import { V as VERSION } from './version-416534b0.esm.js';
16
+ import { V as VERSION } from './version-8470e2d9.esm.js';
17
17
  import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
18
18
  import './defineProperty-cca5affa.esm.js';
19
19
  import './unsupportedIterableToArray-5baabfdc.esm.js';
@@ -12,7 +12,7 @@ var packageJson = {
12
12
  "next",
13
13
  "react"
14
14
  ],
15
- version: "0.148.0",
15
+ version: "0.148.2",
16
16
  scripts: {
17
17
  typecheck: "tsc --noEmit",
18
18
  test: "jest"
@@ -14,7 +14,7 @@ var packageJson = {
14
14
  "next",
15
15
  "react"
16
16
  ],
17
- version: "0.148.0",
17
+ version: "0.148.2",
18
18
  scripts: {
19
19
  typecheck: "tsc --noEmit",
20
20
  test: "jest"
@@ -14,7 +14,7 @@ var packageJson = {
14
14
  "next",
15
15
  "react"
16
16
  ],
17
- version: "0.148.0",
17
+ version: "0.148.2",
18
18
  scripts: {
19
19
  typecheck: "tsc --noEmit",
20
20
  test: "jest"
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "next",
13
13
  "react"
14
14
  ],
15
- "version": "0.148.0",
15
+ "version": "0.148.2",
16
16
  "main": "dist/valbuild-next.cjs.js",
17
17
  "module": "dist/valbuild-next.esm.js",
18
18
  "exports": {
@@ -47,13 +47,13 @@
47
47
  "dependencies": {
48
48
  "client-only": "^0.0.1",
49
49
  "server-only": "^0.0.1",
50
- "@valbuild/core": "0.148.0",
51
- "@valbuild/language-server": "0.148.0",
52
- "@valbuild/mcp": "0.148.0",
53
- "@valbuild/react": "0.148.0",
54
- "@valbuild/server": "0.148.0",
55
- "@valbuild/shared": "0.148.0",
56
- "@valbuild/ui": "0.148.0"
50
+ "@valbuild/core": "0.148.2",
51
+ "@valbuild/language-server": "0.148.2",
52
+ "@valbuild/mcp": "0.148.2",
53
+ "@valbuild/react": "0.148.2",
54
+ "@valbuild/server": "0.148.2",
55
+ "@valbuild/shared": "0.148.2",
56
+ "@valbuild/ui": "0.148.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@testing-library/react": "^16.3.3",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
- var routeFromVal = require('../../dist/routeFromVal-1cdcfed4.cjs.dev.js');
6
+ var routeFromVal = require('../../dist/routeFromVal-4df1157a.cjs.dev.js');
7
7
  var defineProperty = require('../../dist/defineProperty-f90345d7.cjs.dev.js');
8
8
  var objectSpread2 = require('../../dist/objectSpread2-58024783.cjs.dev.js');
9
9
  var asyncToGenerator = require('../../dist/asyncToGenerator-c3823d62.cjs.dev.js');
@@ -12,7 +12,7 @@ var core = require('@valbuild/core');
12
12
  var React = require('react');
13
13
  var internal = require('@valbuild/shared/internal');
14
14
  var server = require('@valbuild/server');
15
- var version = require('../../dist/version-b2110ee0.cjs.dev.js');
15
+ var version = require('../../dist/version-efc556d6.cjs.dev.js');
16
16
  require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
17
17
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
18
18
  require('../../dist/slicedToArray-44036a76.cjs.dev.js');
@@ -132,7 +132,7 @@ function _loadDraftSources() {
132
132
  _context19.n = 4;
133
133
  break;
134
134
  }
135
- console.warn("Val: authentication error: ", treeRes.json.message);
135
+ core.Internal.log.debug("authentication error: ", treeRes.json.message);
136
136
  return _context19.a(2, null);
137
137
  case 4:
138
138
  throw Error(JSON.stringify(treeRes.json, null, 2));
@@ -162,7 +162,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
162
162
  case 3:
163
163
  _context2.p = 3;
164
164
  _t = _context2.v;
165
- console.error("Val: could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", _t);
165
+ core.Internal.log.error("could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", _t);
166
166
  case 4:
167
167
  if (!enabled) {
168
168
  _context2.n = 16;
@@ -185,7 +185,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
185
185
  case 8:
186
186
  _context2.p = 8;
187
187
  _t2 = _context2.v;
188
- console.error("Val: could not read headers! fetchVal can only be used server-side. Use useVal on clients.", _t2);
188
+ core.Internal.log.error("could not read headers! fetchVal can only be used server-side. Use useVal on clients.", _t2);
189
189
  headers = null;
190
190
  case 9:
191
191
  _context2.p = 9;
@@ -198,7 +198,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
198
198
  case 11:
199
199
  _context2.p = 11;
200
200
  _t3 = _context2.v;
201
- console.error("Val: could not read cookies! fetchVal can only be used server-side. Use useVal on clients.", _t3);
201
+ core.Internal.log.error("could not read cookies! fetchVal can only be used server-side. Use useVal on clients.", _t3);
202
202
  cookies = null;
203
203
  case 12:
204
204
  host = headers && getHost(headers);
@@ -274,7 +274,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
274
274
  return asyncToGenerator._regenerator().w(function (_context3) {
275
275
  while (1) switch (_context3.n) {
276
276
  case 0:
277
- console.error("Val: failed to fetch ", err);
277
+ core.Internal.log.error("failed to fetch ", err);
278
278
  _t11 = stega.stegaEncode;
279
279
  _t12 = selector;
280
280
  _context3.n = 1;
@@ -675,7 +675,7 @@ function _loadDraftJsonEntry() {
675
675
  _context24.n = 7;
676
676
  break;
677
677
  }
678
- console.warn("Val: authentication error: ", res.json.message);
678
+ core.Internal.log.debug("authentication error: ", res.json.message);
679
679
  return _context24.a(2, {
680
680
  status: "unavailable"
681
681
  });
@@ -688,7 +688,7 @@ function _loadDraftJsonEntry() {
688
688
  status: "absent"
689
689
  });
690
690
  case 8:
691
- console.error("Val: could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
691
+ core.Internal.log.error("could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
692
692
  return _context24.a(2, {
693
693
  status: "unavailable"
694
694
  });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
- var routeFromVal = require('../../dist/routeFromVal-e447aa07.cjs.prod.js');
6
+ var routeFromVal = require('../../dist/routeFromVal-812be6ea.cjs.prod.js');
7
7
  var defineProperty = require('../../dist/defineProperty-8951f469.cjs.prod.js');
8
8
  var objectSpread2 = require('../../dist/objectSpread2-13f847a9.cjs.prod.js');
9
9
  var asyncToGenerator = require('../../dist/asyncToGenerator-8e5c36c8.cjs.prod.js');
@@ -12,7 +12,7 @@ var core = require('@valbuild/core');
12
12
  var React = require('react');
13
13
  var internal = require('@valbuild/shared/internal');
14
14
  var server = require('@valbuild/server');
15
- var version = require('../../dist/version-359f9b47.cjs.prod.js');
15
+ var version = require('../../dist/version-d8807d9f.cjs.prod.js');
16
16
  require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
17
17
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
18
18
  require('../../dist/slicedToArray-ce613de6.cjs.prod.js');
@@ -132,7 +132,7 @@ function _loadDraftSources() {
132
132
  _context19.n = 4;
133
133
  break;
134
134
  }
135
- console.warn("Val: authentication error: ", treeRes.json.message);
135
+ core.Internal.log.debug("authentication error: ", treeRes.json.message);
136
136
  return _context19.a(2, null);
137
137
  case 4:
138
138
  throw Error(JSON.stringify(treeRes.json, null, 2));
@@ -162,7 +162,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
162
162
  case 3:
163
163
  _context2.p = 3;
164
164
  _t = _context2.v;
165
- console.error("Val: could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", _t);
165
+ core.Internal.log.error("could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", _t);
166
166
  case 4:
167
167
  if (!enabled) {
168
168
  _context2.n = 16;
@@ -185,7 +185,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
185
185
  case 8:
186
186
  _context2.p = 8;
187
187
  _t2 = _context2.v;
188
- console.error("Val: could not read headers! fetchVal can only be used server-side. Use useVal on clients.", _t2);
188
+ core.Internal.log.error("could not read headers! fetchVal can only be used server-side. Use useVal on clients.", _t2);
189
189
  headers = null;
190
190
  case 9:
191
191
  _context2.p = 9;
@@ -198,7 +198,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
198
198
  case 11:
199
199
  _context2.p = 11;
200
200
  _t3 = _context2.v;
201
- console.error("Val: could not read cookies! fetchVal can only be used server-side. Use useVal on clients.", _t3);
201
+ core.Internal.log.error("could not read cookies! fetchVal can only be used server-side. Use useVal on clients.", _t3);
202
202
  cookies = null;
203
203
  case 12:
204
204
  host = headers && getHost(headers);
@@ -274,7 +274,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
274
274
  return asyncToGenerator._regenerator().w(function (_context3) {
275
275
  while (1) switch (_context3.n) {
276
276
  case 0:
277
- console.error("Val: failed to fetch ", err);
277
+ core.Internal.log.error("failed to fetch ", err);
278
278
  _t11 = stega.stegaEncode;
279
279
  _t12 = selector;
280
280
  _context3.n = 1;
@@ -675,7 +675,7 @@ function _loadDraftJsonEntry() {
675
675
  _context24.n = 7;
676
676
  break;
677
677
  }
678
- console.warn("Val: authentication error: ", res.json.message);
678
+ core.Internal.log.debug("authentication error: ", res.json.message);
679
679
  return _context24.a(2, {
680
680
  status: "unavailable"
681
681
  });
@@ -688,7 +688,7 @@ function _loadDraftJsonEntry() {
688
688
  status: "absent"
689
689
  });
690
690
  case 8:
691
- console.error("Val: could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
691
+ core.Internal.log.error("could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
692
692
  return _context24.a(2, {
693
693
  status: "unavailable"
694
694
  });
@@ -1,5 +1,5 @@
1
1
  import 'server-only';
2
- import { f as fillJsonValuesRecord, j as jsonValuesRecordToFill, i as initValRouteFromVal, g as getJsonEntryStegaRoot, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, c as bundledJsonEntryImport, _ as _typeof } from '../../dist/routeFromVal-3e1c7e8b.esm.js';
2
+ import { f as fillJsonValuesRecord, j as jsonValuesRecordToFill, i as initValRouteFromVal, g as getJsonEntryStegaRoot, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, c as bundledJsonEntryImport, _ as _typeof } from '../../dist/routeFromVal-64cba2a6.esm.js';
3
3
  import { _ as _defineProperty } from '../../dist/defineProperty-cca5affa.esm.js';
4
4
  import { _ as _objectSpread2 } from '../../dist/objectSpread2-60d1bd93.esm.js';
5
5
  import { _ as _asyncToGenerator, a as _regenerator } from '../../dist/asyncToGenerator-500f022f.esm.js';
@@ -8,7 +8,7 @@ import { Internal } from '@valbuild/core';
8
8
  import { cache } from 'react';
9
9
  import { VAL_SESSION_COOKIE, memoizePerRequest } from '@valbuild/shared/internal';
10
10
  import { createValServer } from '@valbuild/server';
11
- import { V as VERSION } from '../../dist/version-416534b0.esm.js';
11
+ import { V as VERSION } from '../../dist/version-8470e2d9.esm.js';
12
12
  import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
13
13
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
14
14
  import '../../dist/slicedToArray-aa291011.esm.js';
@@ -128,7 +128,7 @@ function _loadDraftSources() {
128
128
  _context19.n = 4;
129
129
  break;
130
130
  }
131
- console.warn("Val: authentication error: ", treeRes.json.message);
131
+ Internal.log.debug("authentication error: ", treeRes.json.message);
132
132
  return _context19.a(2, null);
133
133
  case 4:
134
134
  throw Error(JSON.stringify(treeRes.json, null, 2));
@@ -158,7 +158,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
158
158
  case 3:
159
159
  _context2.p = 3;
160
160
  _t = _context2.v;
161
- console.error("Val: could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", _t);
161
+ Internal.log.error("could not check if Val is enabled! This might be due to an error to check draftMode. fetchVal can only be used server-side. Use useVal on clients.", _t);
162
162
  case 4:
163
163
  if (!enabled) {
164
164
  _context2.n = 16;
@@ -181,7 +181,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
181
181
  case 8:
182
182
  _context2.p = 8;
183
183
  _t2 = _context2.v;
184
- console.error("Val: could not read headers! fetchVal can only be used server-side. Use useVal on clients.", _t2);
184
+ Internal.log.error("could not read headers! fetchVal can only be used server-side. Use useVal on clients.", _t2);
185
185
  headers = null;
186
186
  case 9:
187
187
  _context2.p = 9;
@@ -194,7 +194,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
194
194
  case 11:
195
195
  _context2.p = 11;
196
196
  _t3 = _context2.v;
197
- console.error("Val: could not read cookies! fetchVal can only be used server-side. Use useVal on clients.", _t3);
197
+ Internal.log.error("could not read cookies! fetchVal can only be used server-side. Use useVal on clients.", _t3);
198
198
  cookies = null;
199
199
  case 12:
200
200
  host = headers && getHost(headers);
@@ -270,7 +270,7 @@ var initFetchValStega = function initFetchValStega(config, valApiEndpoints, valS
270
270
  return _regenerator().w(function (_context3) {
271
271
  while (1) switch (_context3.n) {
272
272
  case 0:
273
- console.error("Val: failed to fetch ", err);
273
+ Internal.log.error("failed to fetch ", err);
274
274
  _t11 = stegaEncode;
275
275
  _t12 = selector;
276
276
  _context3.n = 1;
@@ -671,7 +671,7 @@ function _loadDraftJsonEntry() {
671
671
  _context24.n = 7;
672
672
  break;
673
673
  }
674
- console.warn("Val: authentication error: ", res.json.message);
674
+ Internal.log.debug("authentication error: ", res.json.message);
675
675
  return _context24.a(2, {
676
676
  status: "unavailable"
677
677
  });
@@ -684,7 +684,7 @@ function _loadDraftJsonEntry() {
684
684
  status: "absent"
685
685
  });
686
686
  case 8:
687
- console.error("Val: could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
687
+ Internal.log.error("could not load draft JSON entry: ", "message" in res.json ? res.json.message : "status ".concat(res.status));
688
688
  return _context24.a(2, {
689
689
  status: "unavailable"
690
690
  });
@@ -9,7 +9,7 @@ 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-b2110ee0.cjs.dev.js');
12
+ var version = require('../../dist/version-efc556d6.cjs.dev.js');
13
13
  var mcp = require('@valbuild/mcp');
14
14
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
15
15
  require('../../dist/defineProperty-f90345d7.cjs.dev.js');
@@ -9,7 +9,7 @@ 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-359f9b47.cjs.prod.js');
12
+ var version = require('../../dist/version-d8807d9f.cjs.prod.js');
13
13
  var mcp = require('@valbuild/mcp');
14
14
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
15
15
  require('../../dist/defineProperty-8951f469.cjs.prod.js');
@@ -6,7 +6,7 @@ import { Internal } from '@valbuild/core';
6
6
  import { createValApiRouter, createValServer } from '@valbuild/server';
7
7
  export { createPrettierFormatter } from '@valbuild/server';
8
8
  import { NextResponse } from 'next/server';
9
- import { V as VERSION } from '../../dist/version-416534b0.esm.js';
9
+ import { V as VERSION } from '../../dist/version-8470e2d9.esm.js';
10
10
  import { initValMcp as initValMcp$1 } from '@valbuild/mcp';
11
11
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
12
12
  import '../../dist/defineProperty-cca5affa.esm.js';
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValNextProvider-3f8bc508.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValNextProvider-3f8bc508.cjs.dev.js");
7
- }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValOverlayContext-9c4ae06d.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValOverlayContext-9c4ae06d.cjs.dev.js");
7
- }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./ValVideo-94e5aa28.cjs.prod.js");
5
- } else {
6
- module.exports = require("./ValVideo-94e5aa28.cjs.dev.js");
7
- }