@tanstack/router-core 1.115.3 → 1.117.0

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.
@@ -774,9 +774,17 @@ class RouterCore {
774
774
  if (shouldViewTransition && typeof document !== "undefined" && "startViewTransition" in document && typeof document.startViewTransition === "function") {
775
775
  let startViewTransitionParams;
776
776
  if (typeof shouldViewTransition === "object" && this.isViewTransitionTypesSupported) {
777
+ const next = this.latestLocation;
778
+ const prevLocation = this.state.resolvedLocation;
779
+ const resolvedViewTransitionTypes = typeof shouldViewTransition.types === "function" ? shouldViewTransition.types(
780
+ getLocationChangeInfo({
781
+ resolvedLocation: prevLocation,
782
+ location: next
783
+ })
784
+ ) : shouldViewTransition.types;
777
785
  startViewTransitionParams = {
778
786
  update: fn,
779
- types: shouldViewTransition.types
787
+ types: resolvedViewTransitionTypes
780
788
  };
781
789
  } else {
782
790
  startViewTransitionParams = fn;