@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.
- package/dist/cjs/router.cjs +9 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +7 -1
- package/dist/esm/router.d.ts +7 -1
- package/dist/esm/router.js +9 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +23 -2
package/dist/cjs/router.cjs
CHANGED
|
@@ -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:
|
|
787
|
+
types: resolvedViewTransitionTypes
|
|
780
788
|
};
|
|
781
789
|
} else {
|
|
782
790
|
startViewTransitionParams = fn;
|