@sanity/sdk-react 3.5.0-next.20260923074348 → 3.5.0-next.20260923144041

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/dist/index.js CHANGED
@@ -1058,7 +1058,7 @@ function deriveConfigFromWorkspace(workspace) {
1058
1058
  * ```
1059
1059
  */
1060
1060
  function SanityApp(t0) {
1061
- let $ = c(18), children, configProp, fallback, props;
1061
+ let $ = c(19), children, configProp, fallback, props;
1062
1062
  $[0] === t0 ? (children = $[1], configProp = $[2], fallback = $[3], props = $[4]) : ({children, fallback, config: configProp, ...props} = t0, $[0] = t0, $[1] = children, $[2] = configProp, $[3] = fallback, $[4] = props);
1063
1063
  let studioWorkspace = useContext(SDKStudioContext), t1;
1064
1064
  bb0: {
@@ -1074,22 +1074,25 @@ function SanityApp(t0) {
1074
1074
  let t2;
1075
1075
  $[7] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[7] = t2) : t2 = $[7], t1 = t2;
1076
1076
  }
1077
- let resolvedConfig = t1, t2, t3;
1078
- $[8] !== configProp || $[9] !== resolvedConfig || $[10] !== studioWorkspace ? (t2 = () => {
1079
- let timeout, primaryConfig = Array.isArray(resolvedConfig) ? resolvedConfig[0] : resolvedConfig, shouldRedirectWithoutConfig = configProp === void 0 && !studioWorkspace && !primaryConfig;
1080
- return !isInIframe() && !isLocalUrl(window) && (shouldRedirectWithoutConfig || primaryConfig && !isStudioConfig(primaryConfig)) && (timeout = setTimeout(_temp$4, 1e3)), () => clearTimeout(timeout);
1081
- }, t3 = [
1077
+ let resolvedConfig = t1, t2;
1078
+ $[8] === Symbol.for("react.memo_cache_sentinel") ? (t2 = !isInIframe() && !isDashboardEnvironment() && !isLocalUrl(window), $[8] = t2) : t2 = $[8];
1079
+ let shouldRedirect = t2, t3, t4;
1080
+ $[9] !== configProp || $[10] !== resolvedConfig || $[11] !== studioWorkspace ? (t3 = () => {
1081
+ let timeout, primaryConfig = Array.isArray(resolvedConfig) ? resolvedConfig[0] : resolvedConfig;
1082
+ return shouldRedirect && (configProp === void 0 && !studioWorkspace && !primaryConfig || primaryConfig && !isStudioConfig(primaryConfig)) && (timeout = setTimeout(_temp$4, 1e3)), () => clearTimeout(timeout);
1083
+ }, t4 = [
1082
1084
  configProp,
1083
1085
  resolvedConfig,
1086
+ shouldRedirect,
1084
1087
  studioWorkspace
1085
- ], $[8] = configProp, $[9] = resolvedConfig, $[10] = studioWorkspace, $[11] = t2, $[12] = t3) : (t2 = $[11], t3 = $[12]), useEffect(t2, t3);
1086
- let t4;
1087
- return $[13] !== children || $[14] !== fallback || $[15] !== props || $[16] !== resolvedConfig ? (t4 = /* @__PURE__ */ jsx(SDKProvider, {
1088
+ ], $[9] = configProp, $[10] = resolvedConfig, $[11] = studioWorkspace, $[12] = t3, $[13] = t4) : (t3 = $[12], t4 = $[13]), useEffect(t3, t4);
1089
+ let t5;
1090
+ return $[14] !== children || $[15] !== fallback || $[16] !== props || $[17] !== resolvedConfig ? (t5 = /* @__PURE__ */ jsx(SDKProvider, {
1088
1091
  ...props,
1089
1092
  fallback,
1090
1093
  config: resolvedConfig,
1091
1094
  children
1092
- }), $[13] = children, $[14] = fallback, $[15] = props, $[16] = resolvedConfig, $[17] = t4) : t4 = $[17], t4;
1095
+ }), $[14] = children, $[15] = fallback, $[16] = props, $[17] = resolvedConfig, $[18] = t5) : t5 = $[18], t5;
1093
1096
  }
1094
1097
  function _temp$4() {
1095
1098
  console.warn("Redirecting to core", REDIRECT_URL), window.location.replace(REDIRECT_URL);
@@ -4172,7 +4175,7 @@ function useUsers(options) {
4172
4175
  loadMore
4173
4176
  }, $[20] = data, $[21] = hasMore, $[22] = isPending, $[23] = loadMore, $[24] = t8) : t8 = $[24], t8;
4174
4177
  }
4175
- var version = "3.5.0-next.20260923074348";
4178
+ var version = "3.5.0-next.20260923144041";
4176
4179
  function getEnv(key) {
4177
4180
  if (import.meta.env) return import.meta.env[key];
4178
4181
  if (typeof process < "u" && process.env) return process.env[key];