@tanstack/react-router 0.0.1-beta.161 → 0.0.1-beta.162
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/build/cjs/index.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +59 -59
- package/build/types/index.d.ts +7 -7
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +10 -13
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "0.0.1-beta.
|
|
4
|
+
"version": "0.0.1-beta.162",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "tanstack/router",
|
|
7
7
|
"homepage": "https://tanstack.com/router",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"tiny-invariant": "^1.3.1",
|
|
44
44
|
"tiny-warning": "^1.0.3",
|
|
45
45
|
"@gisatcz/cross-package-react-context": "^0.2.0",
|
|
46
|
-
"@tanstack/router-core": "0.0.1-beta.
|
|
47
|
-
"@tanstack/react-store": "0.0.1-beta.
|
|
46
|
+
"@tanstack/router-core": "0.0.1-beta.162",
|
|
47
|
+
"@tanstack/react-store": "0.0.1-beta.162"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup --config rollup.config.js"
|
package/src/index.tsx
CHANGED
|
@@ -76,14 +76,14 @@ declare module '@tanstack/router-core' {
|
|
|
76
76
|
string
|
|
77
77
|
>,
|
|
78
78
|
TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent<
|
|
79
|
-
TParentRoute['
|
|
79
|
+
TParentRoute['types']['allParams'],
|
|
80
80
|
TParams
|
|
81
81
|
>,
|
|
82
|
-
TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['
|
|
83
|
-
TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['
|
|
82
|
+
TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['types']['routeContext'],
|
|
83
|
+
TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['types']['context'],
|
|
84
84
|
TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext,
|
|
85
85
|
TAllContext extends RouteConstraints['TAllContext'] = MergeParamsFromParent<
|
|
86
|
-
TParentRoute['
|
|
86
|
+
TParentRoute['types']['context'],
|
|
87
87
|
TRouteContext
|
|
88
88
|
>,
|
|
89
89
|
TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext,
|
|
@@ -246,7 +246,7 @@ export type MakeMatchRouteOptions<
|
|
|
246
246
|
params?: RouteByPath<
|
|
247
247
|
RegisteredRouter['routeTree'],
|
|
248
248
|
ResolveRelativePath<TFrom, NoInfer<TTo>>
|
|
249
|
-
>['
|
|
249
|
+
>['types']['allParams'],
|
|
250
250
|
) => ReactNode)
|
|
251
251
|
| React.ReactNode
|
|
252
252
|
}
|
|
@@ -612,10 +612,7 @@ export type RouteFromIdOrRoute<T> = T extends ParseRoute<
|
|
|
612
612
|
export function useLoader<
|
|
613
613
|
TFrom extends RouteIds<RegisteredRouter['routeTree']>,
|
|
614
614
|
TStrict extends boolean = true,
|
|
615
|
-
TLoader = RouteById<
|
|
616
|
-
RegisteredRouter['routeTree'],
|
|
617
|
-
TFrom
|
|
618
|
-
>['__types']['loader'],
|
|
615
|
+
TLoader = RouteById<RegisteredRouter['routeTree'], TFrom>['types']['loader'],
|
|
619
616
|
TSelected = TLoader,
|
|
620
617
|
>(opts?: {
|
|
621
618
|
from: TFrom
|
|
@@ -636,7 +633,7 @@ export function useRouterContext<
|
|
|
636
633
|
TContext = RouteById<
|
|
637
634
|
RegisteredRouter['routeTree'],
|
|
638
635
|
TFrom
|
|
639
|
-
>['
|
|
636
|
+
>['types']['context'],
|
|
640
637
|
TSelected = TContext,
|
|
641
638
|
>(opts?: {
|
|
642
639
|
from: TFrom
|
|
@@ -656,7 +653,7 @@ export function useRouteContext<
|
|
|
656
653
|
TRouteContext = RouteById<
|
|
657
654
|
RegisteredRouter['routeTree'],
|
|
658
655
|
TFrom
|
|
659
|
-
>['
|
|
656
|
+
>['types']['routeContext'],
|
|
660
657
|
TSelected = TRouteContext,
|
|
661
658
|
>(opts?: {
|
|
662
659
|
from: TFrom
|
|
@@ -677,7 +674,7 @@ export function useSearch<
|
|
|
677
674
|
TSearch = RouteById<
|
|
678
675
|
RegisteredRouter['routeTree'],
|
|
679
676
|
TFrom
|
|
680
|
-
>['
|
|
677
|
+
>['types']['fullSearchSchema'],
|
|
681
678
|
TSelected = TSearch,
|
|
682
679
|
>(opts?: {
|
|
683
680
|
from: TFrom
|
|
@@ -696,7 +693,7 @@ export function useSearch<
|
|
|
696
693
|
export function useParams<
|
|
697
694
|
TFrom extends RouteIds<RegisteredRouter['routeTree']> = '/',
|
|
698
695
|
TDefaultSelected = AllParams<RegisteredRouter['routeTree']> &
|
|
699
|
-
RouteById<RegisteredRouter['routeTree'], TFrom>['
|
|
696
|
+
RouteById<RegisteredRouter['routeTree'], TFrom>['types']['allParams'],
|
|
700
697
|
TSelected = TDefaultSelected,
|
|
701
698
|
>(opts?: {
|
|
702
699
|
from: TFrom
|