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