@tanstack/router-core 1.128.8 → 1.129.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
- "version": "1.128.8",
3
+ "version": "1.129.2",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/global.ts ADDED
@@ -0,0 +1,9 @@
1
+ import type { AnyRouter } from './router'
2
+
3
+ declare global {
4
+ interface Window {
5
+ __TSR_ROUTER__?: AnyRouter
6
+ }
7
+ }
8
+
9
+ export {}
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './global'
2
+
1
3
  export { TSR_DEFERRED_PROMISE, defer } from './defer'
2
4
  export type { DeferredPromiseState, DeferredPromise } from './defer'
3
5
  export { preloadWarning } from './link'
package/src/router.ts CHANGED
@@ -86,12 +86,6 @@ import type { AnySchema, AnyValidator } from './validators'
86
86
  import type { NavigateOptions, ResolveRelativePath, ToOptions } from './link'
87
87
  import type { NotFoundError } from './not-found'
88
88
 
89
- declare global {
90
- interface Window {
91
- __TSR_ROUTER__?: AnyRouter
92
- }
93
- }
94
-
95
89
  export type ControllablePromise<T = any> = Promise<T> & {
96
90
  resolve: (value: T) => void
97
91
  reject: (value?: any) => void
@@ -631,9 +625,12 @@ export type StartTransitionFn = (fn: () => void) => void
631
625
  export interface MatchRoutesFn {
632
626
  (
633
627
  pathname: string,
634
- locationSearch: AnySchema,
628
+ locationSearch?: AnySchema,
635
629
  opts?: MatchRoutesOpts,
636
- ): Array<AnyRouteMatch>
630
+ ): Array<MakeRouteMatchUnion>
631
+ /**
632
+ * @deprecated use the following signature instead
633
+ */
637
634
  (next: ParsedLocation, opts?: MatchRoutesOpts): Array<AnyRouteMatch>
638
635
  (
639
636
  pathnameOrNext: string | ParsedLocation,
@@ -1025,15 +1022,6 @@ export class RouterCore<
1025
1022
  return this.routesById as Record<string, AnyRoute>
1026
1023
  }
1027
1024
 
1028
- /**
1029
- @deprecated use the following signature instead
1030
- ```ts
1031
- matchRoutes (
1032
- next: ParsedLocation,
1033
- opts?: { preload?: boolean; throwOnError?: boolean },
1034
- ): Array<AnyRouteMatch>;
1035
- ```
1036
- */
1037
1025
  matchRoutes: MatchRoutesFn = (
1038
1026
  pathnameOrNext: string | ParsedLocation,
1039
1027
  locationSearchOrOpts?: AnySchema | MatchRoutesOpts,