@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.
@@ -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';
@@ -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';
@@ -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
- ((_b = (_a = shouldViewTransition && typeof document !== "undefined" ? document : void 0) == null ? void 0 : _a.startViewTransition) == null ? void 0 : _b.call(_a, fn)) || fn();
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;