@valbuild/tanstack 0.146.2 → 0.146.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @valbuild/tanstack
2
2
 
3
+ ## 0.146.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#873](https://github.com/valbuild/val/pull/873) [`289b2f3`](https://github.com/valbuild/val/commit/289b2f3dc6503393697d09ba3ed802b569a914c9) Thanks [@freekh](https://github.com/freekh)! - Opening the Studio no longer flashes an empty page. The loading screen now stays
8
+ up until the Studio is ready to be seen, instead of disappearing as soon as the
9
+ page loaded and leaving a blank page while the Studio downloaded.
10
+
3
11
  ## 0.146.2
4
12
 
5
13
  ### Patch Changes
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = require('./version-5162728d.cjs.dev.js');
5
+ var version = require('./version-1226397e.cjs.dev.js');
6
6
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-4497beef.cjs.dev.js');
7
7
  var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
@@ -2004,6 +2004,20 @@ function ValVideo(props) {
2004
2004
  }
2005
2005
 
2006
2006
  var VAL_READY_PING_MS = 100;
2007
+
2008
+ /**
2009
+ * Whether the Studio's stylesheet has loaded in this page. `val-css-loaded`
2010
+ * fires once per page, so a `ValApp` that mounts again after it -- the `/val`
2011
+ * route left and come back to -- must not wait for it a second time.
2012
+ */
2013
+ var studioStylesLoaded = false;
2014
+
2015
+ /**
2016
+ * The longest the loading screen covers the page. Past it, whatever the Studio
2017
+ * shows -- unstyled, or its own error -- is better than a spinner that never
2018
+ * ends.
2019
+ */
2020
+ var LOADING_SCREEN_MAX_MS = 15000;
2007
2021
  var ValApp = function ValApp(_ref) {
2008
2022
  var config = _ref.config,
2009
2023
  children = _ref.children;
@@ -2037,11 +2051,40 @@ var ValApp = function ValApp(_ref) {
2037
2051
  }
2038
2052
  });
2039
2053
 
2040
- // this theme is used to avoid flickering
2041
- var _useState3 = React.useState(config.defaultTheme || null),
2054
+ /*
2055
+ * Whether the loading screen still covers the page: until the Studio's
2056
+ * stylesheet has loaded, or the wait runs out. Its own state rather than
2057
+ * `loadingTheme`, which a new `config` sets again after the event has fired.
2058
+ */
2059
+ var _useState3 = React.useState(function () {
2060
+ return !studioStylesLoaded;
2061
+ }),
2042
2062
  _useState4 = createForOfIteratorHelper._slicedToArray(_useState3, 2),
2043
- loadingTheme = _useState4[0],
2044
- setLoadingTheme = _useState4[1];
2063
+ covering = _useState4[0],
2064
+ setCovering = _useState4[1];
2065
+ React.useEffect(function () {
2066
+ if (!covering) {
2067
+ return;
2068
+ }
2069
+ var onCssLoaded = function onCssLoaded() {
2070
+ studioStylesLoaded = true;
2071
+ setCovering(false);
2072
+ };
2073
+ window.addEventListener("val-css-loaded", onCssLoaded);
2074
+ var timeout = setTimeout(function () {
2075
+ return setCovering(false);
2076
+ }, LOADING_SCREEN_MAX_MS);
2077
+ return function () {
2078
+ window.removeEventListener("val-css-loaded", onCssLoaded);
2079
+ clearTimeout(timeout);
2080
+ };
2081
+ }, [covering]);
2082
+
2083
+ // this theme is used to avoid flickering
2084
+ var _useState5 = React.useState(config.defaultTheme || null),
2085
+ _useState6 = createForOfIteratorHelper._slicedToArray(_useState5, 2),
2086
+ loadingTheme = _useState6[0],
2087
+ setLoadingTheme = _useState6[1];
2045
2088
  React.useEffect(function () {
2046
2089
  var theme = localStorage.getItem("val-theme-" + ((config === null || config === void 0 ? void 0 : config.project) || "unknown"));
2047
2090
  if (theme === "dark") {
@@ -2082,36 +2125,49 @@ var ValApp = function ValApp(_ref) {
2082
2125
  window.removeEventListener("val-css-loaded", onCssLoaded);
2083
2126
  };
2084
2127
  }, [inMessageMode, loadingTheme]);
2085
- if (loadingTheme !== null && isClientSIde) {
2086
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
2087
- style: {
2088
- color: loadingTheme === "dark" ? "white" : "black",
2089
- display: "flex",
2090
- justifyContent: "center",
2091
- alignItems: "center",
2092
- padding: "1rem",
2093
- backgroundColor: loadingTheme === "dark" ? darkBg : lightBg,
2094
- minHeight: "100vh",
2095
- minWidth: "100%"
2096
- },
2097
- children: [/*#__PURE__*/jsxRuntime.jsx("style", {
2098
- children: ".".concat(valPrefixedClass, "animate-spin {\n animation: ").concat(valPrefixedClass, "spin 2s linear infinite;\n}\n@keyframes ").concat(valPrefixedClass, "spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}")
2099
- }), /*#__PURE__*/jsxRuntime.jsx("svg", {
2100
- xmlns: "http://www.w3.org/2000/svg",
2101
- width: "24",
2102
- height: "24",
2103
- viewBox: "0 0 24 24",
2104
- fill: "none",
2105
- stroke: "currentColor",
2106
- strokeWidth: "2",
2107
- strokeLinecap: "round",
2108
- strokeLinejoin: "round",
2109
- className: cn(["animate-spin"]),
2110
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
2111
- d: "M21 12a9 9 0 1 1-6.219-8.56"
2112
- })
2113
- })]
2114
- });
2128
+
2129
+ /*
2130
+ * The loading screen stays up until the Studio's stylesheet has loaded, as
2131
+ * an overlay above the Studio mounting underneath it. It used to be rendered
2132
+ * INSTEAD of the Studio and dropped at hydration, which was before the
2133
+ * Studio's script had even been requested: the spinner went, an empty page
2134
+ * stood there while the Studio downloaded, and then the Studio appeared.
2135
+ * It is the first element both in the server render and after, so hydration
2136
+ * keeps it rather than restarting it. Only with a theme to draw it in --
2137
+ * `config.defaultTheme`, as the templates set -- as before.
2138
+ */
2139
+ var loadingScreen = !covering || loadingTheme === null || inMessageMode ? null : /*#__PURE__*/jsxRuntime.jsxs("div", {
2140
+ style: {
2141
+ color: loadingTheme === "dark" ? "white" : "black",
2142
+ display: "flex",
2143
+ justifyContent: "center",
2144
+ alignItems: "center",
2145
+ padding: "1rem",
2146
+ backgroundColor: loadingTheme === "dark" ? darkBg : lightBg,
2147
+ position: "fixed",
2148
+ inset: 0,
2149
+ zIndex: 2147483647
2150
+ },
2151
+ children: [/*#__PURE__*/jsxRuntime.jsx("style", {
2152
+ children: ".".concat(valPrefixedClass, "animate-spin {\n animation: ").concat(valPrefixedClass, "spin 2s linear infinite;\n}\n@keyframes ").concat(valPrefixedClass, "spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}")
2153
+ }), /*#__PURE__*/jsxRuntime.jsx("svg", {
2154
+ xmlns: "http://www.w3.org/2000/svg",
2155
+ width: "24",
2156
+ height: "24",
2157
+ viewBox: "0 0 24 24",
2158
+ fill: "none",
2159
+ stroke: "currentColor",
2160
+ strokeWidth: "2",
2161
+ strokeLinecap: "round",
2162
+ strokeLinejoin: "round",
2163
+ className: cn(["animate-spin"]),
2164
+ children: /*#__PURE__*/jsxRuntime.jsx("path", {
2165
+ d: "M21 12a9 9 0 1 1-6.219-8.56"
2166
+ })
2167
+ })]
2168
+ });
2169
+ if (isClientSIde && loadingScreen !== null) {
2170
+ return loadingScreen;
2115
2171
  }
2116
2172
  if (inMessageMode) {
2117
2173
  return /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -2119,7 +2175,7 @@ var ValApp = function ValApp(_ref) {
2119
2175
  });
2120
2176
  }
2121
2177
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2122
- children: [/*#__PURE__*/jsxRuntime.jsx(ValScript, {
2178
+ children: [loadingScreen, /*#__PURE__*/jsxRuntime.jsx(ValScript, {
2123
2179
  src: "".concat(route, "/static").concat(ui.VERSION ? "/".concat(ui.VERSION) : "").concat(ui.VAL_APP_PATH)
2124
2180
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2125
2181
  id: ui.VAL_APP_ID,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = require('./version-e4ae0afe.cjs.prod.js');
5
+ var version = require('./version-2e1a465b.cjs.prod.js');
6
6
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-9afd7d2d.cjs.prod.js');
7
7
  var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
@@ -2004,6 +2004,20 @@ function ValVideo(props) {
2004
2004
  }
2005
2005
 
2006
2006
  var VAL_READY_PING_MS = 100;
2007
+
2008
+ /**
2009
+ * Whether the Studio's stylesheet has loaded in this page. `val-css-loaded`
2010
+ * fires once per page, so a `ValApp` that mounts again after it -- the `/val`
2011
+ * route left and come back to -- must not wait for it a second time.
2012
+ */
2013
+ var studioStylesLoaded = false;
2014
+
2015
+ /**
2016
+ * The longest the loading screen covers the page. Past it, whatever the Studio
2017
+ * shows -- unstyled, or its own error -- is better than a spinner that never
2018
+ * ends.
2019
+ */
2020
+ var LOADING_SCREEN_MAX_MS = 15000;
2007
2021
  var ValApp = function ValApp(_ref) {
2008
2022
  var config = _ref.config,
2009
2023
  children = _ref.children;
@@ -2037,11 +2051,40 @@ var ValApp = function ValApp(_ref) {
2037
2051
  }
2038
2052
  });
2039
2053
 
2040
- // this theme is used to avoid flickering
2041
- var _useState3 = React.useState(config.defaultTheme || null),
2054
+ /*
2055
+ * Whether the loading screen still covers the page: until the Studio's
2056
+ * stylesheet has loaded, or the wait runs out. Its own state rather than
2057
+ * `loadingTheme`, which a new `config` sets again after the event has fired.
2058
+ */
2059
+ var _useState3 = React.useState(function () {
2060
+ return !studioStylesLoaded;
2061
+ }),
2042
2062
  _useState4 = createForOfIteratorHelper._slicedToArray(_useState3, 2),
2043
- loadingTheme = _useState4[0],
2044
- setLoadingTheme = _useState4[1];
2063
+ covering = _useState4[0],
2064
+ setCovering = _useState4[1];
2065
+ React.useEffect(function () {
2066
+ if (!covering) {
2067
+ return;
2068
+ }
2069
+ var onCssLoaded = function onCssLoaded() {
2070
+ studioStylesLoaded = true;
2071
+ setCovering(false);
2072
+ };
2073
+ window.addEventListener("val-css-loaded", onCssLoaded);
2074
+ var timeout = setTimeout(function () {
2075
+ return setCovering(false);
2076
+ }, LOADING_SCREEN_MAX_MS);
2077
+ return function () {
2078
+ window.removeEventListener("val-css-loaded", onCssLoaded);
2079
+ clearTimeout(timeout);
2080
+ };
2081
+ }, [covering]);
2082
+
2083
+ // this theme is used to avoid flickering
2084
+ var _useState5 = React.useState(config.defaultTheme || null),
2085
+ _useState6 = createForOfIteratorHelper._slicedToArray(_useState5, 2),
2086
+ loadingTheme = _useState6[0],
2087
+ setLoadingTheme = _useState6[1];
2045
2088
  React.useEffect(function () {
2046
2089
  var theme = localStorage.getItem("val-theme-" + ((config === null || config === void 0 ? void 0 : config.project) || "unknown"));
2047
2090
  if (theme === "dark") {
@@ -2082,36 +2125,49 @@ var ValApp = function ValApp(_ref) {
2082
2125
  window.removeEventListener("val-css-loaded", onCssLoaded);
2083
2126
  };
2084
2127
  }, [inMessageMode, loadingTheme]);
2085
- if (loadingTheme !== null && isClientSIde) {
2086
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
2087
- style: {
2088
- color: loadingTheme === "dark" ? "white" : "black",
2089
- display: "flex",
2090
- justifyContent: "center",
2091
- alignItems: "center",
2092
- padding: "1rem",
2093
- backgroundColor: loadingTheme === "dark" ? darkBg : lightBg,
2094
- minHeight: "100vh",
2095
- minWidth: "100%"
2096
- },
2097
- children: [/*#__PURE__*/jsxRuntime.jsx("style", {
2098
- children: ".".concat(valPrefixedClass, "animate-spin {\n animation: ").concat(valPrefixedClass, "spin 2s linear infinite;\n}\n@keyframes ").concat(valPrefixedClass, "spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}")
2099
- }), /*#__PURE__*/jsxRuntime.jsx("svg", {
2100
- xmlns: "http://www.w3.org/2000/svg",
2101
- width: "24",
2102
- height: "24",
2103
- viewBox: "0 0 24 24",
2104
- fill: "none",
2105
- stroke: "currentColor",
2106
- strokeWidth: "2",
2107
- strokeLinecap: "round",
2108
- strokeLinejoin: "round",
2109
- className: cn(["animate-spin"]),
2110
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
2111
- d: "M21 12a9 9 0 1 1-6.219-8.56"
2112
- })
2113
- })]
2114
- });
2128
+
2129
+ /*
2130
+ * The loading screen stays up until the Studio's stylesheet has loaded, as
2131
+ * an overlay above the Studio mounting underneath it. It used to be rendered
2132
+ * INSTEAD of the Studio and dropped at hydration, which was before the
2133
+ * Studio's script had even been requested: the spinner went, an empty page
2134
+ * stood there while the Studio downloaded, and then the Studio appeared.
2135
+ * It is the first element both in the server render and after, so hydration
2136
+ * keeps it rather than restarting it. Only with a theme to draw it in --
2137
+ * `config.defaultTheme`, as the templates set -- as before.
2138
+ */
2139
+ var loadingScreen = !covering || loadingTheme === null || inMessageMode ? null : /*#__PURE__*/jsxRuntime.jsxs("div", {
2140
+ style: {
2141
+ color: loadingTheme === "dark" ? "white" : "black",
2142
+ display: "flex",
2143
+ justifyContent: "center",
2144
+ alignItems: "center",
2145
+ padding: "1rem",
2146
+ backgroundColor: loadingTheme === "dark" ? darkBg : lightBg,
2147
+ position: "fixed",
2148
+ inset: 0,
2149
+ zIndex: 2147483647
2150
+ },
2151
+ children: [/*#__PURE__*/jsxRuntime.jsx("style", {
2152
+ children: ".".concat(valPrefixedClass, "animate-spin {\n animation: ").concat(valPrefixedClass, "spin 2s linear infinite;\n}\n@keyframes ").concat(valPrefixedClass, "spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}")
2153
+ }), /*#__PURE__*/jsxRuntime.jsx("svg", {
2154
+ xmlns: "http://www.w3.org/2000/svg",
2155
+ width: "24",
2156
+ height: "24",
2157
+ viewBox: "0 0 24 24",
2158
+ fill: "none",
2159
+ stroke: "currentColor",
2160
+ strokeWidth: "2",
2161
+ strokeLinecap: "round",
2162
+ strokeLinejoin: "round",
2163
+ className: cn(["animate-spin"]),
2164
+ children: /*#__PURE__*/jsxRuntime.jsx("path", {
2165
+ d: "M21 12a9 9 0 1 1-6.219-8.56"
2166
+ })
2167
+ })]
2168
+ });
2169
+ if (isClientSIde && loadingScreen !== null) {
2170
+ return loadingScreen;
2115
2171
  }
2116
2172
  if (inMessageMode) {
2117
2173
  return /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -2119,7 +2175,7 @@ var ValApp = function ValApp(_ref) {
2119
2175
  });
2120
2176
  }
2121
2177
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2122
- children: [/*#__PURE__*/jsxRuntime.jsx(ValScript, {
2178
+ children: [loadingScreen, /*#__PURE__*/jsxRuntime.jsx(ValScript, {
2123
2179
  src: "".concat(route, "/static").concat(ui.VERSION ? "/".concat(ui.VERSION) : "").concat(ui.VAL_APP_PATH)
2124
2180
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
2125
2181
  id: ui.VAL_APP_ID,
@@ -1,4 +1,4 @@
1
- import { _ as _asyncToGenerator, a as _regenerator, r as readValEnableCookie, V as VERSION$1 } from './version-f105d9fa.esm.js';
1
+ import { _ as _asyncToGenerator, a as _regenerator, r as readValEnableCookie, V as VERSION$1 } from './version-d506fa5a.esm.js';
2
2
  import { _ as _objectSpread2, a as _slicedToArray, b as _createForOfIteratorHelper } from './createForOfIteratorHelper-93a62170.esm.js';
3
3
  import { Internal as Internal$1, initVal as initVal$1, DEFAULT_CONTENT_HOST } from '@valbuild/core';
4
4
  import * as core from '@valbuild/core';
@@ -1980,6 +1980,20 @@ function ValVideo(props) {
1980
1980
  }
1981
1981
 
1982
1982
  var VAL_READY_PING_MS = 100;
1983
+
1984
+ /**
1985
+ * Whether the Studio's stylesheet has loaded in this page. `val-css-loaded`
1986
+ * fires once per page, so a `ValApp` that mounts again after it -- the `/val`
1987
+ * route left and come back to -- must not wait for it a second time.
1988
+ */
1989
+ var studioStylesLoaded = false;
1990
+
1991
+ /**
1992
+ * The longest the loading screen covers the page. Past it, whatever the Studio
1993
+ * shows -- unstyled, or its own error -- is better than a spinner that never
1994
+ * ends.
1995
+ */
1996
+ var LOADING_SCREEN_MAX_MS = 15000;
1983
1997
  var ValApp = function ValApp(_ref) {
1984
1998
  var config = _ref.config,
1985
1999
  children = _ref.children;
@@ -2013,11 +2027,40 @@ var ValApp = function ValApp(_ref) {
2013
2027
  }
2014
2028
  });
2015
2029
 
2016
- // this theme is used to avoid flickering
2017
- var _useState3 = useState(config.defaultTheme || null),
2030
+ /*
2031
+ * Whether the loading screen still covers the page: until the Studio's
2032
+ * stylesheet has loaded, or the wait runs out. Its own state rather than
2033
+ * `loadingTheme`, which a new `config` sets again after the event has fired.
2034
+ */
2035
+ var _useState3 = useState(function () {
2036
+ return !studioStylesLoaded;
2037
+ }),
2018
2038
  _useState4 = _slicedToArray(_useState3, 2),
2019
- loadingTheme = _useState4[0],
2020
- setLoadingTheme = _useState4[1];
2039
+ covering = _useState4[0],
2040
+ setCovering = _useState4[1];
2041
+ useEffect(function () {
2042
+ if (!covering) {
2043
+ return;
2044
+ }
2045
+ var onCssLoaded = function onCssLoaded() {
2046
+ studioStylesLoaded = true;
2047
+ setCovering(false);
2048
+ };
2049
+ window.addEventListener("val-css-loaded", onCssLoaded);
2050
+ var timeout = setTimeout(function () {
2051
+ return setCovering(false);
2052
+ }, LOADING_SCREEN_MAX_MS);
2053
+ return function () {
2054
+ window.removeEventListener("val-css-loaded", onCssLoaded);
2055
+ clearTimeout(timeout);
2056
+ };
2057
+ }, [covering]);
2058
+
2059
+ // this theme is used to avoid flickering
2060
+ var _useState5 = useState(config.defaultTheme || null),
2061
+ _useState6 = _slicedToArray(_useState5, 2),
2062
+ loadingTheme = _useState6[0],
2063
+ setLoadingTheme = _useState6[1];
2021
2064
  useEffect(function () {
2022
2065
  var theme = localStorage.getItem("val-theme-" + ((config === null || config === void 0 ? void 0 : config.project) || "unknown"));
2023
2066
  if (theme === "dark") {
@@ -2058,36 +2101,49 @@ var ValApp = function ValApp(_ref) {
2058
2101
  window.removeEventListener("val-css-loaded", onCssLoaded);
2059
2102
  };
2060
2103
  }, [inMessageMode, loadingTheme]);
2061
- if (loadingTheme !== null && isClientSIde) {
2062
- return /*#__PURE__*/jsxs("div", {
2063
- style: {
2064
- color: loadingTheme === "dark" ? "white" : "black",
2065
- display: "flex",
2066
- justifyContent: "center",
2067
- alignItems: "center",
2068
- padding: "1rem",
2069
- backgroundColor: loadingTheme === "dark" ? darkBg : lightBg,
2070
- minHeight: "100vh",
2071
- minWidth: "100%"
2072
- },
2073
- children: [/*#__PURE__*/jsx("style", {
2074
- children: ".".concat(valPrefixedClass, "animate-spin {\n animation: ").concat(valPrefixedClass, "spin 2s linear infinite;\n}\n@keyframes ").concat(valPrefixedClass, "spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}")
2075
- }), /*#__PURE__*/jsx("svg", {
2076
- xmlns: "http://www.w3.org/2000/svg",
2077
- width: "24",
2078
- height: "24",
2079
- viewBox: "0 0 24 24",
2080
- fill: "none",
2081
- stroke: "currentColor",
2082
- strokeWidth: "2",
2083
- strokeLinecap: "round",
2084
- strokeLinejoin: "round",
2085
- className: cn(["animate-spin"]),
2086
- children: /*#__PURE__*/jsx("path", {
2087
- d: "M21 12a9 9 0 1 1-6.219-8.56"
2088
- })
2089
- })]
2090
- });
2104
+
2105
+ /*
2106
+ * The loading screen stays up until the Studio's stylesheet has loaded, as
2107
+ * an overlay above the Studio mounting underneath it. It used to be rendered
2108
+ * INSTEAD of the Studio and dropped at hydration, which was before the
2109
+ * Studio's script had even been requested: the spinner went, an empty page
2110
+ * stood there while the Studio downloaded, and then the Studio appeared.
2111
+ * It is the first element both in the server render and after, so hydration
2112
+ * keeps it rather than restarting it. Only with a theme to draw it in --
2113
+ * `config.defaultTheme`, as the templates set -- as before.
2114
+ */
2115
+ var loadingScreen = !covering || loadingTheme === null || inMessageMode ? null : /*#__PURE__*/jsxs("div", {
2116
+ style: {
2117
+ color: loadingTheme === "dark" ? "white" : "black",
2118
+ display: "flex",
2119
+ justifyContent: "center",
2120
+ alignItems: "center",
2121
+ padding: "1rem",
2122
+ backgroundColor: loadingTheme === "dark" ? darkBg : lightBg,
2123
+ position: "fixed",
2124
+ inset: 0,
2125
+ zIndex: 2147483647
2126
+ },
2127
+ children: [/*#__PURE__*/jsx("style", {
2128
+ children: ".".concat(valPrefixedClass, "animate-spin {\n animation: ").concat(valPrefixedClass, "spin 2s linear infinite;\n}\n@keyframes ").concat(valPrefixedClass, "spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}")
2129
+ }), /*#__PURE__*/jsx("svg", {
2130
+ xmlns: "http://www.w3.org/2000/svg",
2131
+ width: "24",
2132
+ height: "24",
2133
+ viewBox: "0 0 24 24",
2134
+ fill: "none",
2135
+ stroke: "currentColor",
2136
+ strokeWidth: "2",
2137
+ strokeLinecap: "round",
2138
+ strokeLinejoin: "round",
2139
+ className: cn(["animate-spin"]),
2140
+ children: /*#__PURE__*/jsx("path", {
2141
+ d: "M21 12a9 9 0 1 1-6.219-8.56"
2142
+ })
2143
+ })]
2144
+ });
2145
+ if (isClientSIde && loadingScreen !== null) {
2146
+ return loadingScreen;
2091
2147
  }
2092
2148
  if (inMessageMode) {
2093
2149
  return /*#__PURE__*/jsx("div", {
@@ -2095,7 +2151,7 @@ var ValApp = function ValApp(_ref) {
2095
2151
  });
2096
2152
  }
2097
2153
  return /*#__PURE__*/jsxs(Fragment, {
2098
- children: [/*#__PURE__*/jsx(ValScript, {
2154
+ children: [loadingScreen, /*#__PURE__*/jsx(ValScript, {
2099
2155
  src: "".concat(route, "/static").concat(VERSION ? "/".concat(VERSION) : "").concat(VAL_APP_PATH)
2100
2156
  }), /*#__PURE__*/jsx("div", {
2101
2157
  id: VAL_APP_ID,
@@ -212,7 +212,7 @@ var packageJson = {
212
212
  "tanstack-router",
213
213
  "react"
214
214
  ],
215
- version: "0.146.2",
215
+ version: "0.146.3",
216
216
  scripts: {
217
217
  typecheck: "tsc --noEmit",
218
218
  test: "jest"
@@ -212,7 +212,7 @@ var packageJson = {
212
212
  "tanstack-router",
213
213
  "react"
214
214
  ],
215
- version: "0.146.2",
215
+ version: "0.146.3",
216
216
  scripts: {
217
217
  typecheck: "tsc --noEmit",
218
218
  test: "jest"
@@ -210,7 +210,7 @@ var packageJson = {
210
210
  "tanstack-router",
211
211
  "react"
212
212
  ],
213
- version: "0.146.2",
213
+ version: "0.146.3",
214
214
  scripts: {
215
215
  typecheck: "tsc --noEmit",
216
216
  test: "jest"
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "tanstack-router",
15
15
  "react"
16
16
  ],
17
- "version": "0.146.2",
17
+ "version": "0.146.3",
18
18
  "main": "dist/valbuild-tanstack.cjs.js",
19
19
  "module": "dist/valbuild-tanstack.esm.js",
20
20
  "exports": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = require('../../dist/version-5162728d.cjs.dev.js');
5
+ var version = require('../../dist/version-1226397e.cjs.dev.js');
6
6
  var core = require('@valbuild/core');
7
7
  var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-4497beef.cjs.dev.js');
8
8
  var server = require('@valbuild/server');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = require('../../dist/version-e4ae0afe.cjs.prod.js');
5
+ var version = require('../../dist/version-2e1a465b.cjs.prod.js');
6
6
  var core = require('@valbuild/core');
7
7
  var createForOfIteratorHelper = require('../../dist/createForOfIteratorHelper-9afd7d2d.cjs.prod.js');
8
8
  var server = require('@valbuild/server');
@@ -1,4 +1,4 @@
1
- import { _ as _asyncToGenerator, a as _regenerator, V as VERSION, s as setValEnableCookieReader } from '../../dist/version-f105d9fa.esm.js';
1
+ import { _ as _asyncToGenerator, a as _regenerator, V as VERSION, s as setValEnableCookieReader } from '../../dist/version-d506fa5a.esm.js';
2
2
  import { Internal } from '@valbuild/core';
3
3
  import { _ as _objectSpread2, a as _slicedToArray, e as _arrayLikeToArray, f as _unsupportedIterableToArray, b as _createForOfIteratorHelper, d as _defineProperty } from '../../dist/createForOfIteratorHelper-93a62170.esm.js';
4
4
  import { createValApiRouter, createValServer, layeredSnapshot, proposalSnapshotForReaders, proposalSnapshot } from '@valbuild/server';