@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.d.cts
CHANGED
|
@@ -42,7 +42,7 @@ export type HydrationCtx = {
|
|
|
42
42
|
router: DehydratedRouter;
|
|
43
43
|
payload: Record<string, any>;
|
|
44
44
|
};
|
|
45
|
-
export type InferRouterContext<TRouteTree extends AnyRoute> = TRouteTree extends RootRoute<any, infer TRouterContext extends AnyContext, any, any, any, any, any> ? TRouterContext : AnyContext;
|
|
45
|
+
export type InferRouterContext<TRouteTree extends AnyRoute> = TRouteTree extends RootRoute<any, infer TRouterContext extends AnyContext, any, any, any, any, any, any> ? TRouterContext : AnyContext;
|
|
46
46
|
export type ExtractedEntry = {
|
|
47
47
|
dataType: '__beforeLoadContext' | 'loaderData';
|
|
48
48
|
type: 'promise' | 'stream';
|
package/dist/esm/router.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type HydrationCtx = {
|
|
|
42
42
|
router: DehydratedRouter;
|
|
43
43
|
payload: Record<string, any>;
|
|
44
44
|
};
|
|
45
|
-
export type InferRouterContext<TRouteTree extends AnyRoute> = TRouteTree extends RootRoute<any, infer TRouterContext extends AnyContext, any, any, any, any, any> ? TRouterContext : AnyContext;
|
|
45
|
+
export type InferRouterContext<TRouteTree extends AnyRoute> = TRouteTree extends RootRoute<any, infer TRouterContext extends AnyContext, any, any, any, any, any, any> ? TRouterContext : AnyContext;
|
|
46
46
|
export type ExtractedEntry = {
|
|
47
47
|
dataType: '__beforeLoadContext' | 'loaderData';
|
|
48
48
|
type: 'promise' | 'stream';
|
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;
|