@valbuild/tanstack 0.150.2 → 0.150.4
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.
- package/CHANGELOG.md +21 -0
- package/dist/valbuild-tanstack.cjs.dev.js +37 -5
- package/dist/valbuild-tanstack.cjs.prod.js +37 -5
- package/dist/valbuild-tanstack.esm.js +37 -5
- package/dist/{version-ab8eb07b.cjs.dev.js → version-05d76d75.cjs.dev.js} +1 -1
- package/dist/{version-31885370.esm.js → version-72323654.esm.js} +1 -1
- package/dist/{version-13331723.cjs.prod.js → version-90e26ce5.cjs.prod.js} +1 -1
- package/package.json +8 -8
- package/server/dist/valbuild-tanstack-server.cjs.dev.js +1 -1
- package/server/dist/valbuild-tanstack-server.cjs.prod.js +1 -1
- package/server/dist/valbuild-tanstack-server.esm.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @valbuild/tanstack
|
|
2
2
|
|
|
3
|
+
## 0.150.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#957](https://github.com/valbuild/val/pull/957) [`820cd47`](https://github.com/valbuild/val/commit/820cd479ff6c44e7db195b9dd320a001129c17a4) Thanks [@freekh](https://github.com/freekh)! - Content analytics can be turned on while developing: `VAL_ANALYTICS=true` in the app's `.env.development` turns it on under `vite dev` for a `<ValProvider>` that is passed no `analytics`, so the leak warning shows you where an edit tag leaves React before any visitor gets it. It is read only on the development server; a hosted site is still switched on in its project settings.
|
|
8
|
+
|
|
9
|
+
The "Val is currently hidden" note in the browser console now shows in development with TanStack Start. It looked for `process.env.NODE_ENV`, which the development server does not set in the browser.
|
|
10
|
+
|
|
11
|
+
## 0.150.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`bc0cc43`](https://github.com/valbuild/val/commit/bc0cc433e157cca08f9ee384a4fb8be9bd3dad2c)]:
|
|
16
|
+
- @valbuild/ui@0.150.3
|
|
17
|
+
- @valbuild/core@0.150.3
|
|
18
|
+
- @valbuild/shared@0.150.3
|
|
19
|
+
- @valbuild/react@0.150.3
|
|
20
|
+
- @valbuild/server@0.150.3
|
|
21
|
+
- @valbuild/language-server@0.150.3
|
|
22
|
+
- @valbuild/mcp@0.150.3
|
|
23
|
+
|
|
3
24
|
## 0.150.2
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ var asyncToGenerator = require('./asyncToGenerator-c3823d62.cjs.dev.js');
|
|
|
6
6
|
var _typeof = require('./typeof-dd0246a1.cjs.dev.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
9
|
-
var version = require('./version-
|
|
9
|
+
var version = require('./version-05d76d75.cjs.dev.js');
|
|
10
10
|
var internal = require('@valbuild/react/internal');
|
|
11
11
|
var ui = require('@valbuild/ui');
|
|
12
12
|
var reactRouter = require('@tanstack/react-router');
|
|
@@ -888,7 +888,8 @@ function shouldSafetyRefresh(state) {
|
|
|
888
888
|
* Only what the platform HANDED this isolate is read, never `process.env`:
|
|
889
889
|
* that is baked into the bundle at build time, and a `VAL_ANALYTICS` there
|
|
890
890
|
* would be a second switch, in the code, that keeps counting after the owner
|
|
891
|
-
* has turned it off.
|
|
891
|
+
* has turned it off. The one exception is the development server
|
|
892
|
+
* (`analyticsFromDevelopment`), which no visitor ever reaches.
|
|
892
893
|
*/
|
|
893
894
|
|
|
894
895
|
/** The element the server render writes the setting into. */
|
|
@@ -915,6 +916,29 @@ function analyticsFromPlatform() {
|
|
|
915
916
|
} : {});
|
|
916
917
|
}
|
|
917
918
|
|
|
919
|
+
/**
|
|
920
|
+
* `VAL_ANALYTICS=true` in the app's `.env.development`, while `vite dev`
|
|
921
|
+
* serves it: so a developer sees what analytics does to their pages --
|
|
922
|
+
* above all the leak warning, which names content whose edit tag reached
|
|
923
|
+
* the page outside React -- before a hosted site counts anything. Null in
|
|
924
|
+
* any other build: `NODE_ENV` is `development` only on the development
|
|
925
|
+
* server, so the setting cannot follow the code into production, where the
|
|
926
|
+
* platform's switch is the only one.
|
|
927
|
+
*/
|
|
928
|
+
function analyticsFromDevelopment() {
|
|
929
|
+
if (typeof process === "undefined") return null;
|
|
930
|
+
var env = process.env;
|
|
931
|
+
if (env["NODE_ENV"] !== "development" || env["VAL_ANALYTICS"] !== "true") {
|
|
932
|
+
return null;
|
|
933
|
+
}
|
|
934
|
+
var contentVersion = env["VAL_CONTENT_VERSION"];
|
|
935
|
+
return _typeof._objectSpread2({
|
|
936
|
+
enabled: true
|
|
937
|
+
}, contentVersion !== undefined && contentVersion !== "" ? {
|
|
938
|
+
contentVersion: contentVersion
|
|
939
|
+
} : {});
|
|
940
|
+
}
|
|
941
|
+
|
|
918
942
|
/**
|
|
919
943
|
* What the page said, once it said it. The element lives inside the provider,
|
|
920
944
|
* so a client navigation that unmounts the provider takes it with it, and the
|
|
@@ -951,9 +975,13 @@ function analyticsFromPage() {
|
|
|
951
975
|
return readFromPage;
|
|
952
976
|
}
|
|
953
977
|
|
|
954
|
-
/**
|
|
978
|
+
/**
|
|
979
|
+
* On the server, what the platform handed it, or the development server's
|
|
980
|
+
* own setting; in the browser, what the server wrote.
|
|
981
|
+
*/
|
|
955
982
|
function analyticsOfThisPage() {
|
|
956
|
-
|
|
983
|
+
var _analyticsFromPlatfor;
|
|
984
|
+
return typeof document === "undefined" ? (_analyticsFromPlatfor = analyticsFromPlatform()) !== null && _analyticsFromPlatfor !== void 0 ? _analyticsFromPlatfor : analyticsFromDevelopment() : analyticsFromPage();
|
|
957
985
|
}
|
|
958
986
|
|
|
959
987
|
/**
|
|
@@ -1874,7 +1902,11 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1874
1902
|
};
|
|
1875
1903
|
function useConsoleLogEnableVal(showOverlay) {
|
|
1876
1904
|
React__default["default"].useEffect(function () {
|
|
1877
|
-
if (
|
|
1905
|
+
if (
|
|
1906
|
+
// Not `process.env.NODE_ENV`: the dev server does not define it in
|
|
1907
|
+
// the browser, so the banner never showed. React's development build
|
|
1908
|
+
// is what `vite dev` serves.
|
|
1909
|
+
stega.isReactDevelopmentBuild() && showOverlay === false && !isValStudioPath(location.pathname)) {
|
|
1878
1910
|
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."));
|
|
1879
1911
|
}
|
|
1880
1912
|
}, [showOverlay]);
|
|
@@ -6,7 +6,7 @@ var asyncToGenerator = require('./asyncToGenerator-8e5c36c8.cjs.prod.js');
|
|
|
6
6
|
var _typeof = require('./typeof-8998e126.cjs.prod.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
9
|
-
var version = require('./version-
|
|
9
|
+
var version = require('./version-90e26ce5.cjs.prod.js');
|
|
10
10
|
var internal = require('@valbuild/react/internal');
|
|
11
11
|
var ui = require('@valbuild/ui');
|
|
12
12
|
var reactRouter = require('@tanstack/react-router');
|
|
@@ -888,7 +888,8 @@ function shouldSafetyRefresh(state) {
|
|
|
888
888
|
* Only what the platform HANDED this isolate is read, never `process.env`:
|
|
889
889
|
* that is baked into the bundle at build time, and a `VAL_ANALYTICS` there
|
|
890
890
|
* would be a second switch, in the code, that keeps counting after the owner
|
|
891
|
-
* has turned it off.
|
|
891
|
+
* has turned it off. The one exception is the development server
|
|
892
|
+
* (`analyticsFromDevelopment`), which no visitor ever reaches.
|
|
892
893
|
*/
|
|
893
894
|
|
|
894
895
|
/** The element the server render writes the setting into. */
|
|
@@ -915,6 +916,29 @@ function analyticsFromPlatform() {
|
|
|
915
916
|
} : {});
|
|
916
917
|
}
|
|
917
918
|
|
|
919
|
+
/**
|
|
920
|
+
* `VAL_ANALYTICS=true` in the app's `.env.development`, while `vite dev`
|
|
921
|
+
* serves it: so a developer sees what analytics does to their pages --
|
|
922
|
+
* above all the leak warning, which names content whose edit tag reached
|
|
923
|
+
* the page outside React -- before a hosted site counts anything. Null in
|
|
924
|
+
* any other build: `NODE_ENV` is `development` only on the development
|
|
925
|
+
* server, so the setting cannot follow the code into production, where the
|
|
926
|
+
* platform's switch is the only one.
|
|
927
|
+
*/
|
|
928
|
+
function analyticsFromDevelopment() {
|
|
929
|
+
if (typeof process === "undefined") return null;
|
|
930
|
+
var env = process.env;
|
|
931
|
+
if (env["NODE_ENV"] !== "development" || env["VAL_ANALYTICS"] !== "true") {
|
|
932
|
+
return null;
|
|
933
|
+
}
|
|
934
|
+
var contentVersion = env["VAL_CONTENT_VERSION"];
|
|
935
|
+
return _typeof._objectSpread2({
|
|
936
|
+
enabled: true
|
|
937
|
+
}, contentVersion !== undefined && contentVersion !== "" ? {
|
|
938
|
+
contentVersion: contentVersion
|
|
939
|
+
} : {});
|
|
940
|
+
}
|
|
941
|
+
|
|
918
942
|
/**
|
|
919
943
|
* What the page said, once it said it. The element lives inside the provider,
|
|
920
944
|
* so a client navigation that unmounts the provider takes it with it, and the
|
|
@@ -951,9 +975,13 @@ function analyticsFromPage() {
|
|
|
951
975
|
return readFromPage;
|
|
952
976
|
}
|
|
953
977
|
|
|
954
|
-
/**
|
|
978
|
+
/**
|
|
979
|
+
* On the server, what the platform handed it, or the development server's
|
|
980
|
+
* own setting; in the browser, what the server wrote.
|
|
981
|
+
*/
|
|
955
982
|
function analyticsOfThisPage() {
|
|
956
|
-
|
|
983
|
+
var _analyticsFromPlatfor;
|
|
984
|
+
return typeof document === "undefined" ? (_analyticsFromPlatfor = analyticsFromPlatform()) !== null && _analyticsFromPlatfor !== void 0 ? _analyticsFromPlatfor : analyticsFromDevelopment() : analyticsFromPage();
|
|
957
985
|
}
|
|
958
986
|
|
|
959
987
|
/**
|
|
@@ -1874,7 +1902,11 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1874
1902
|
};
|
|
1875
1903
|
function useConsoleLogEnableVal(showOverlay) {
|
|
1876
1904
|
React__default["default"].useEffect(function () {
|
|
1877
|
-
if (
|
|
1905
|
+
if (
|
|
1906
|
+
// Not `process.env.NODE_ENV`: the dev server does not define it in
|
|
1907
|
+
// the browser, so the banner never showed. React's development build
|
|
1908
|
+
// is what `vite dev` serves.
|
|
1909
|
+
stega.isReactDevelopmentBuild() && showOverlay === false && !isValStudioPath(location.pathname)) {
|
|
1878
1910
|
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."));
|
|
1879
1911
|
}
|
|
1880
1912
|
}, [showOverlay]);
|
|
@@ -5,7 +5,7 @@ import * as core from '@valbuild/core';
|
|
|
5
5
|
export { core as expr };
|
|
6
6
|
export { GenericSelector, Schema, VAL_EXTENSION, derefPatch, modules } from '@valbuild/core';
|
|
7
7
|
import { stegaEncode, stegaDecodeStrings, attrs, raw, isReactDevelopmentBuild, watchStegaLeaks, stegaLeakMessage, SET_AUTO_TAG_JSX_ENABLED, autoTagJSX } from '@valbuild/react/stega';
|
|
8
|
-
import { r as readValEnableCookie, _ as _toConsumableArray, V as VERSION$1 } from './version-
|
|
8
|
+
import { r as readValEnableCookie, _ as _toConsumableArray, V as VERSION$1 } from './version-72323654.esm.js';
|
|
9
9
|
export { ValRichText } from '@valbuild/react/internal';
|
|
10
10
|
import { VERSION, VAL_APP_PATH, VAL_OVERLAY_ID, VAL_APP_ID } from '@valbuild/ui';
|
|
11
11
|
import { useRouter, useRouterState } from '@tanstack/react-router';
|
|
@@ -864,7 +864,8 @@ function shouldSafetyRefresh(state) {
|
|
|
864
864
|
* Only what the platform HANDED this isolate is read, never `process.env`:
|
|
865
865
|
* that is baked into the bundle at build time, and a `VAL_ANALYTICS` there
|
|
866
866
|
* would be a second switch, in the code, that keeps counting after the owner
|
|
867
|
-
* has turned it off.
|
|
867
|
+
* has turned it off. The one exception is the development server
|
|
868
|
+
* (`analyticsFromDevelopment`), which no visitor ever reaches.
|
|
868
869
|
*/
|
|
869
870
|
|
|
870
871
|
/** The element the server render writes the setting into. */
|
|
@@ -891,6 +892,29 @@ function analyticsFromPlatform() {
|
|
|
891
892
|
} : {});
|
|
892
893
|
}
|
|
893
894
|
|
|
895
|
+
/**
|
|
896
|
+
* `VAL_ANALYTICS=true` in the app's `.env.development`, while `vite dev`
|
|
897
|
+
* serves it: so a developer sees what analytics does to their pages --
|
|
898
|
+
* above all the leak warning, which names content whose edit tag reached
|
|
899
|
+
* the page outside React -- before a hosted site counts anything. Null in
|
|
900
|
+
* any other build: `NODE_ENV` is `development` only on the development
|
|
901
|
+
* server, so the setting cannot follow the code into production, where the
|
|
902
|
+
* platform's switch is the only one.
|
|
903
|
+
*/
|
|
904
|
+
function analyticsFromDevelopment() {
|
|
905
|
+
if (typeof process === "undefined") return null;
|
|
906
|
+
var env = process.env;
|
|
907
|
+
if (env["NODE_ENV"] !== "development" || env["VAL_ANALYTICS"] !== "true") {
|
|
908
|
+
return null;
|
|
909
|
+
}
|
|
910
|
+
var contentVersion = env["VAL_CONTENT_VERSION"];
|
|
911
|
+
return _objectSpread2({
|
|
912
|
+
enabled: true
|
|
913
|
+
}, contentVersion !== undefined && contentVersion !== "" ? {
|
|
914
|
+
contentVersion: contentVersion
|
|
915
|
+
} : {});
|
|
916
|
+
}
|
|
917
|
+
|
|
894
918
|
/**
|
|
895
919
|
* What the page said, once it said it. The element lives inside the provider,
|
|
896
920
|
* so a client navigation that unmounts the provider takes it with it, and the
|
|
@@ -927,9 +951,13 @@ function analyticsFromPage() {
|
|
|
927
951
|
return readFromPage;
|
|
928
952
|
}
|
|
929
953
|
|
|
930
|
-
/**
|
|
954
|
+
/**
|
|
955
|
+
* On the server, what the platform handed it, or the development server's
|
|
956
|
+
* own setting; in the browser, what the server wrote.
|
|
957
|
+
*/
|
|
931
958
|
function analyticsOfThisPage() {
|
|
932
|
-
|
|
959
|
+
var _analyticsFromPlatfor;
|
|
960
|
+
return typeof document === "undefined" ? (_analyticsFromPlatfor = analyticsFromPlatform()) !== null && _analyticsFromPlatfor !== void 0 ? _analyticsFromPlatfor : analyticsFromDevelopment() : analyticsFromPage();
|
|
933
961
|
}
|
|
934
962
|
|
|
935
963
|
/**
|
|
@@ -1850,7 +1878,11 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1850
1878
|
};
|
|
1851
1879
|
function useConsoleLogEnableVal(showOverlay) {
|
|
1852
1880
|
React.useEffect(function () {
|
|
1853
|
-
if (
|
|
1881
|
+
if (
|
|
1882
|
+
// Not `process.env.NODE_ENV`: the dev server does not define it in
|
|
1883
|
+
// the browser, so the banner never showed. React's development build
|
|
1884
|
+
// is what `vite dev` serves.
|
|
1885
|
+
isReactDevelopmentBuild() && showOverlay === false && !isValStudioPath(location.pathname)) {
|
|
1854
1886
|
Internal$1.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."));
|
|
1855
1887
|
}
|
|
1856
1888
|
}, [showOverlay]);
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"tanstack-router",
|
|
15
15
|
"react"
|
|
16
16
|
],
|
|
17
|
-
"version": "0.150.
|
|
17
|
+
"version": "0.150.4",
|
|
18
18
|
"main": "dist/valbuild-tanstack.cjs.js",
|
|
19
19
|
"module": "dist/valbuild-tanstack.esm.js",
|
|
20
20
|
"exports": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"exports": true
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@valbuild/core": "0.150.
|
|
51
|
-
"@valbuild/
|
|
52
|
-
"@valbuild/
|
|
53
|
-
"@valbuild/
|
|
54
|
-
"@valbuild/
|
|
55
|
-
"@valbuild/shared": "0.150.
|
|
56
|
-
"@valbuild/ui": "0.150.
|
|
50
|
+
"@valbuild/core": "0.150.3",
|
|
51
|
+
"@valbuild/language-server": "0.150.3",
|
|
52
|
+
"@valbuild/react": "0.150.3",
|
|
53
|
+
"@valbuild/server": "0.150.3",
|
|
54
|
+
"@valbuild/mcp": "0.150.3",
|
|
55
|
+
"@valbuild/shared": "0.150.3",
|
|
56
|
+
"@valbuild/ui": "0.150.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@tanstack/react-router": "^1.170.41",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('../../dist/version-
|
|
5
|
+
var version = require('../../dist/version-05d76d75.cjs.dev.js');
|
|
6
6
|
var asyncToGenerator = require('../../dist/asyncToGenerator-c3823d62.cjs.dev.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var _typeof = require('../../dist/typeof-dd0246a1.cjs.dev.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('../../dist/version-
|
|
5
|
+
var version = require('../../dist/version-90e26ce5.cjs.prod.js');
|
|
6
6
|
var asyncToGenerator = require('../../dist/asyncToGenerator-8e5c36c8.cjs.prod.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var _typeof = require('../../dist/typeof-8998e126.cjs.prod.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VERSION, _ as _toConsumableArray, s as setValEnableCookieReader } from '../../dist/version-
|
|
1
|
+
import { V as VERSION, _ as _toConsumableArray, s as setValEnableCookieReader } from '../../dist/version-72323654.esm.js';
|
|
2
2
|
import { _ as _asyncToGenerator, a as _regenerator } from '../../dist/asyncToGenerator-500f022f.esm.js';
|
|
3
3
|
import { Internal } from '@valbuild/core';
|
|
4
4
|
import { _ as _objectSpread2, a as _slicedToArray, b as _createForOfIteratorHelper, g as _defineProperty, c as _typeof } from '../../dist/typeof-66e2d869.esm.js';
|