@tanstack/react-router 0.0.1-beta.160 → 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 +0 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +0 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +62 -62
- package/build/types/index.d.ts +7 -7
- package/build/umd/index.development.js +40 -35
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -2
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +10 -14
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
|
}
|
|
@@ -490,7 +490,6 @@ function Matches() {
|
|
|
490
490
|
})
|
|
491
491
|
|
|
492
492
|
if (hasPendingComponent) {
|
|
493
|
-
console.log('hasPending')
|
|
494
493
|
return state.pendingMatchIds
|
|
495
494
|
}
|
|
496
495
|
|
|
@@ -613,10 +612,7 @@ export type RouteFromIdOrRoute<T> = T extends ParseRoute<
|
|
|
613
612
|
export function useLoader<
|
|
614
613
|
TFrom extends RouteIds<RegisteredRouter['routeTree']>,
|
|
615
614
|
TStrict extends boolean = true,
|
|
616
|
-
TLoader = RouteById<
|
|
617
|
-
RegisteredRouter['routeTree'],
|
|
618
|
-
TFrom
|
|
619
|
-
>['__types']['loader'],
|
|
615
|
+
TLoader = RouteById<RegisteredRouter['routeTree'], TFrom>['types']['loader'],
|
|
620
616
|
TSelected = TLoader,
|
|
621
617
|
>(opts?: {
|
|
622
618
|
from: TFrom
|
|
@@ -637,7 +633,7 @@ export function useRouterContext<
|
|
|
637
633
|
TContext = RouteById<
|
|
638
634
|
RegisteredRouter['routeTree'],
|
|
639
635
|
TFrom
|
|
640
|
-
>['
|
|
636
|
+
>['types']['context'],
|
|
641
637
|
TSelected = TContext,
|
|
642
638
|
>(opts?: {
|
|
643
639
|
from: TFrom
|
|
@@ -657,7 +653,7 @@ export function useRouteContext<
|
|
|
657
653
|
TRouteContext = RouteById<
|
|
658
654
|
RegisteredRouter['routeTree'],
|
|
659
655
|
TFrom
|
|
660
|
-
>['
|
|
656
|
+
>['types']['routeContext'],
|
|
661
657
|
TSelected = TRouteContext,
|
|
662
658
|
>(opts?: {
|
|
663
659
|
from: TFrom
|
|
@@ -678,7 +674,7 @@ export function useSearch<
|
|
|
678
674
|
TSearch = RouteById<
|
|
679
675
|
RegisteredRouter['routeTree'],
|
|
680
676
|
TFrom
|
|
681
|
-
>['
|
|
677
|
+
>['types']['fullSearchSchema'],
|
|
682
678
|
TSelected = TSearch,
|
|
683
679
|
>(opts?: {
|
|
684
680
|
from: TFrom
|
|
@@ -697,7 +693,7 @@ export function useSearch<
|
|
|
697
693
|
export function useParams<
|
|
698
694
|
TFrom extends RouteIds<RegisteredRouter['routeTree']> = '/',
|
|
699
695
|
TDefaultSelected = AllParams<RegisteredRouter['routeTree']> &
|
|
700
|
-
RouteById<RegisteredRouter['routeTree'], TFrom>['
|
|
696
|
+
RouteById<RegisteredRouter['routeTree'], TFrom>['types']['allParams'],
|
|
701
697
|
TSelected = TDefaultSelected,
|
|
702
698
|
>(opts?: {
|
|
703
699
|
from: TFrom
|