@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/dist/cjs/global.d.cts +7 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +4 -15
- package/dist/esm/global.d.ts +7 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/router.d.ts +4 -15
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/global.ts +9 -0
- package/src/index.ts +2 -0
- package/src/router.ts +5 -17
package/dist/cjs/router.d.cts
CHANGED
|
@@ -12,11 +12,6 @@ import { Manifest } from './manifest.cjs';
|
|
|
12
12
|
import { AnySchema } from './validators.cjs';
|
|
13
13
|
import { NavigateOptions, ResolveRelativePath, ToOptions } from './link.cjs';
|
|
14
14
|
import { NotFoundError } from './not-found.cjs';
|
|
15
|
-
declare global {
|
|
16
|
-
interface Window {
|
|
17
|
-
__TSR_ROUTER__?: AnyRouter;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
15
|
export type ControllablePromise<T = any> = Promise<T> & {
|
|
21
16
|
resolve: (value: T) => void;
|
|
22
17
|
reject: (value?: any) => void;
|
|
@@ -412,7 +407,10 @@ export type LoadFn = (opts?: {
|
|
|
412
407
|
export type CommitLocationFn = ({ viewTransition, ignoreBlocker, ...next }: ParsedLocation & CommitLocationOptions) => Promise<void>;
|
|
413
408
|
export type StartTransitionFn = (fn: () => void) => void;
|
|
414
409
|
export interface MatchRoutesFn {
|
|
415
|
-
(pathname: string, locationSearch
|
|
410
|
+
(pathname: string, locationSearch?: AnySchema, opts?: MatchRoutesOpts): Array<MakeRouteMatchUnion>;
|
|
411
|
+
/**
|
|
412
|
+
* @deprecated use the following signature instead
|
|
413
|
+
*/
|
|
416
414
|
(next: ParsedLocation, opts?: MatchRoutesOpts): Array<AnyRouteMatch>;
|
|
417
415
|
(pathnameOrNext: string | ParsedLocation, locationSearchOrOpts?: AnySchema | MatchRoutesOpts, opts?: MatchRoutesOpts): Array<AnyRouteMatch>;
|
|
418
416
|
}
|
|
@@ -496,15 +494,6 @@ export declare class RouterCore<in out TRouteTree extends AnyRoute, in out TTrai
|
|
|
496
494
|
parseLocation: ParseLocationFn<TRouteTree>;
|
|
497
495
|
resolvePathWithBase: (from: string, path: string) => string;
|
|
498
496
|
get looseRoutesById(): Record<string, AnyRoute>;
|
|
499
|
-
/**
|
|
500
|
-
@deprecated use the following signature instead
|
|
501
|
-
```ts
|
|
502
|
-
matchRoutes (
|
|
503
|
-
next: ParsedLocation,
|
|
504
|
-
opts?: { preload?: boolean; throwOnError?: boolean },
|
|
505
|
-
): Array<AnyRouteMatch>;
|
|
506
|
-
```
|
|
507
|
-
*/
|
|
508
497
|
matchRoutes: MatchRoutesFn;
|
|
509
498
|
private matchRoutesInternal;
|
|
510
499
|
getMatchedRoutes: GetMatchRoutesFn;
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/router.d.ts
CHANGED
|
@@ -12,11 +12,6 @@ import { Manifest } from './manifest.js';
|
|
|
12
12
|
import { AnySchema } from './validators.js';
|
|
13
13
|
import { NavigateOptions, ResolveRelativePath, ToOptions } from './link.js';
|
|
14
14
|
import { NotFoundError } from './not-found.js';
|
|
15
|
-
declare global {
|
|
16
|
-
interface Window {
|
|
17
|
-
__TSR_ROUTER__?: AnyRouter;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
15
|
export type ControllablePromise<T = any> = Promise<T> & {
|
|
21
16
|
resolve: (value: T) => void;
|
|
22
17
|
reject: (value?: any) => void;
|
|
@@ -412,7 +407,10 @@ export type LoadFn = (opts?: {
|
|
|
412
407
|
export type CommitLocationFn = ({ viewTransition, ignoreBlocker, ...next }: ParsedLocation & CommitLocationOptions) => Promise<void>;
|
|
413
408
|
export type StartTransitionFn = (fn: () => void) => void;
|
|
414
409
|
export interface MatchRoutesFn {
|
|
415
|
-
(pathname: string, locationSearch
|
|
410
|
+
(pathname: string, locationSearch?: AnySchema, opts?: MatchRoutesOpts): Array<MakeRouteMatchUnion>;
|
|
411
|
+
/**
|
|
412
|
+
* @deprecated use the following signature instead
|
|
413
|
+
*/
|
|
416
414
|
(next: ParsedLocation, opts?: MatchRoutesOpts): Array<AnyRouteMatch>;
|
|
417
415
|
(pathnameOrNext: string | ParsedLocation, locationSearchOrOpts?: AnySchema | MatchRoutesOpts, opts?: MatchRoutesOpts): Array<AnyRouteMatch>;
|
|
418
416
|
}
|
|
@@ -496,15 +494,6 @@ export declare class RouterCore<in out TRouteTree extends AnyRoute, in out TTrai
|
|
|
496
494
|
parseLocation: ParseLocationFn<TRouteTree>;
|
|
497
495
|
resolvePathWithBase: (from: string, path: string) => string;
|
|
498
496
|
get looseRoutesById(): Record<string, AnyRoute>;
|
|
499
|
-
/**
|
|
500
|
-
@deprecated use the following signature instead
|
|
501
|
-
```ts
|
|
502
|
-
matchRoutes (
|
|
503
|
-
next: ParsedLocation,
|
|
504
|
-
opts?: { preload?: boolean; throwOnError?: boolean },
|
|
505
|
-
): Array<AnyRouteMatch>;
|
|
506
|
-
```
|
|
507
|
-
*/
|
|
508
497
|
matchRoutes: MatchRoutesFn;
|
|
509
498
|
private matchRoutesInternal;
|
|
510
499
|
getMatchedRoutes: GetMatchRoutesFn;
|