@tanstack/react-router 1.56.5 → 1.57.7
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 +5 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +5 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +3 -3
- package/src/router.ts +10 -6
package/dist/esm/router.js
CHANGED
|
@@ -550,10 +550,13 @@ class Router {
|
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
552
|
this.startViewTransition = (fn) => {
|
|
553
|
-
var _a, _b;
|
|
554
553
|
const shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;
|
|
555
554
|
delete this.shouldViewTransition;
|
|
556
|
-
|
|
555
|
+
if (shouldViewTransition && typeof document !== "undefined" && "startViewTransition" in document && typeof document.startViewTransition === "function") {
|
|
556
|
+
document.startViewTransition(fn);
|
|
557
|
+
} else {
|
|
558
|
+
fn();
|
|
559
|
+
}
|
|
557
560
|
};
|
|
558
561
|
this.updateMatch = (id, updater) => {
|
|
559
562
|
var _a;
|