@valbuild/next 0.148.1 → 0.148.3

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 +48 -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-35d0b521.cjs.js +7 -0
  6. package/dist/{ValNextProvider-3f8bc508.cjs.prod.js → ValNextProvider-35d0b521.cjs.prod.js} +18 -13
  7. package/dist/{ValNextProvider-d6de5d9a.cjs.dev.js → ValNextProvider-a85a1d33.cjs.dev.js} +18 -13
  8. package/dist/{ValNextProvider-9934c628.esm.js → ValNextProvider-df6f351e.esm.js} +18 -13
  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-95a90ddb.cjs.dev.js → version-39c46a15.cjs.dev.js} +1 -1
  24. package/dist/{version-a793fedf.cjs.prod.js → version-435b0b50.cjs.prod.js} +1 -1
  25. package/dist/{version-ce556420.esm.js → version-87844cb8.esm.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,53 @@
1
1
  # @valbuild/next
2
2
 
3
+ ## 0.148.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#881](https://github.com/valbuild/val/pull/881) [`0139436`](https://github.com/valbuild/val/commit/0139436426142d91cbb29ec6c696dfb86f34ab9d) Thanks [@freekh](https://github.com/freekh)! - The content analytics script. With analytics on (it is off by default, and turned on in a hosted project's settings), a TanStack site counts which content each visitor's page **rendered** and which they actually **viewed** (at least half on screen for a second), and sends it to `/api/val/analytics`.
8
+
9
+ - No cookies, no storage, no visitor IDs. Each page view also says where it came from (the referring site's host and any `utm_source` / `utm_medium` / `utm_campaign`) and whether it was a phone, tablet or desktop.
10
+ - A page is sent as its route's pattern (`/posts/$postId`), never its address, so a path that holds something about one visitor (an order number, a token) is never stored. `startValAnalytics` takes this as `routeFor`; `ValProvider` passes TanStack's matched route.
11
+ - Editors are never counted: nothing is sent in draft mode, in the Studio, with Val enabled, or at a proposal's address, and nothing from automated browsers. A page the browser prerenders counts nothing until it is shown.
12
+ - The script is the new `@valbuild/react/analytics` entry, loaded only for visitors of a site with analytics on, after the page has hydrated. It imports nothing else from Val.
13
+ - Storing the counts and showing them is part of Val's hosting, which takes these beacons before they reach the site. Anywhere else, `/api/val/analytics` checks each beacon and stores nothing; in local development, with `VAL_DEBUG=1`, it logs a line per beacon, so you can see it working.
14
+ - `ValProvider`'s Studio check now matches `/val` and what is below it only, not every route starting with those letters (`/values`). The same fix is in `@valbuild/next`.
15
+
16
+ - Updated dependencies [[`0139436`](https://github.com/valbuild/val/commit/0139436426142d91cbb29ec6c696dfb86f34ab9d), [`5eff8a0`](https://github.com/valbuild/val/commit/5eff8a055a4ef50d476797c28f9c3e50deb73c89)]:
17
+ - @valbuild/react@0.148.3
18
+ - @valbuild/shared@0.148.3
19
+ - @valbuild/server@0.148.3
20
+ - @valbuild/ui@0.148.3
21
+ - @valbuild/language-server@0.148.3
22
+ - @valbuild/mcp@0.148.3
23
+
24
+ ## 0.148.2
25
+
26
+ ### Patch Changes
27
+
28
+ - [#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
29
+ print, now prefixed with `[val]` so you can filter them. Val's own debug
30
+ output, which used to reach your terminal and browser console, is now off by
31
+ default. That includes the `Invalid JWT` line that printed on every request
32
+ with an expired session cookie, the "verifying draft mode" and polling notices,
33
+ and the Studio's sync and WebSocket chatter.
34
+
35
+ To turn the debug output back on, for example when reporting a bug:
36
+
37
+ - on the server, set `VAL_DEBUG=1`
38
+ - in the browser, run `localStorage.setItem("val:debug", "1")` in the console.
39
+ It takes effect immediately, with no reload. Remove the key to turn it off
40
+ again.
41
+
42
+ - Updated dependencies [[`dc7c8cc`](https://github.com/valbuild/val/commit/dc7c8ccd82f643e662d00225fabec411b5d39e3a)]:
43
+ - @valbuild/core@0.148.2
44
+ - @valbuild/shared@0.148.2
45
+ - @valbuild/server@0.148.2
46
+ - @valbuild/react@0.148.2
47
+ - @valbuild/ui@0.148.2
48
+ - @valbuild/language-server@0.148.2
49
+ - @valbuild/mcp@0.148.2
50
+
3
51
  ## 0.148.1
4
52
 
5
53
  ### 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);
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./ValNextProvider-35d0b521.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./ValNextProvider-35d0b521.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
  }
@@ -870,8 +870,13 @@ function getPositionClassName(dropZone) {
870
870
  }
871
871
  return className;
872
872
  }
873
+
874
+ /**
875
+ * The Studio is `/val` and what is below it -- not every route that starts
876
+ * with the letters, which would leave `/values` without its overlay.
877
+ */
873
878
  function isValStudioPath(pathname) {
874
- return pathname.startsWith("/val");
879
+ return pathname === "/val" || pathname.startsWith("/val/");
875
880
  }
876
881
 
877
882
  /**
@@ -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
  }
@@ -870,8 +870,13 @@ function getPositionClassName(dropZone) {
870
870
  }
871
871
  return className;
872
872
  }
873
+
874
+ /**
875
+ * The Studio is `/val` and what is below it -- not every route that starts
876
+ * with the letters, which would leave `/values` without its overlay.
877
+ */
873
878
  function isValStudioPath(pathname) {
874
- return pathname.startsWith("/val");
879
+ return pathname === "/val" || pathname.startsWith("/val/");
875
880
  }
876
881
 
877
882
  /**
@@ -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
  }
@@ -843,8 +843,13 @@ function getPositionClassName(dropZone) {
843
843
  }
844
844
  return className;
845
845
  }
846
+
847
+ /**
848
+ * The Studio is `/val` and what is below it -- not every route that starts
849
+ * with the letters, which would leave `/values` without its overlay.
850
+ */
846
851
  function isValStudioPath(pathname) {
847
- return pathname.startsWith("/val");
852
+ return pathname === "/val" || pathname.startsWith("/val/");
848
853
  }
849
854
 
850
855
  /**
@@ -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;