sanity 3.71.1 → 3.71.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.
@@ -1,4 +1,4 @@
1
- const SANITY_VERSION = "3.71.1";
1
+ const SANITY_VERSION = "3.71.2";
2
2
  export {
3
3
  SANITY_VERSION
4
4
  };
@@ -1664,10 +1664,14 @@ const MotionFlex = motion.create(Flex), Preview = memo(forwardRef(function(props
1664
1664
  perspective,
1665
1665
  viewport,
1666
1666
  vercelProtectionBypass
1667
- } = props, previewUrl = useMemo(() => {
1667
+ } = props, [stablePerspective, setStablePerspective] = useState(null), urlPerspective = stablePerspective === null ? perspective : stablePerspective, previewUrl = useMemo(() => {
1668
1668
  const url = new URL(initialUrl);
1669
- return url.searchParams.get(urlSearchParamPreviewPerspective) || url.searchParams.set(urlSearchParamPreviewPerspective, perspective), (vercelProtectionBypass || url.searchParams.get(urlSearchParamVercelProtectionBypass)) && url.searchParams.set(urlSearchParamVercelSetBypassCookie, "samesitenone"), vercelProtectionBypass && !url.searchParams.get(urlSearchParamVercelProtectionBypass) && url.searchParams.set(urlSearchParamVercelProtectionBypass, vercelProtectionBypass), url;
1670
- }, [initialUrl, perspective, vercelProtectionBypass]), {
1669
+ return url.searchParams.get(urlSearchParamPreviewPerspective) || url.searchParams.set(urlSearchParamPreviewPerspective, urlPerspective), (vercelProtectionBypass || url.searchParams.get(urlSearchParamVercelProtectionBypass)) && url.searchParams.set(urlSearchParamVercelSetBypassCookie, "samesitenone"), vercelProtectionBypass && !url.searchParams.get(urlSearchParamVercelProtectionBypass) && url.searchParams.set(urlSearchParamVercelProtectionBypass, vercelProtectionBypass), url;
1670
+ }, [initialUrl, urlPerspective, vercelProtectionBypass]);
1671
+ useEffect(() => {
1672
+ loadersConnection === "connected" && setStablePerspective((prev) => prev === null ? perspective : prev);
1673
+ }, [loadersConnection, perspective]);
1674
+ const {
1671
1675
  t
1672
1676
  } = useTranslation(presentationLocaleNamespace), {
1673
1677
  devMode