@tanstack/react-router 0.0.1-beta.151 → 0.0.1-beta.152
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 +61 -61
- package/build/types/index.d.ts +2 -2
- package/build/umd/index.development.js +1 -0
- 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 +18 -20
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.152",
|
|
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/
|
|
47
|
-
"@tanstack/
|
|
46
|
+
"@tanstack/react-store": "0.0.1-beta.152",
|
|
47
|
+
"@tanstack/router-core": "0.0.1-beta.152"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup --config rollup.config.js"
|
package/src/index.tsx
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
UseLoaderResult,
|
|
32
32
|
ResolveFullSearchSchema,
|
|
33
33
|
Route,
|
|
34
|
+
RouteConstraints,
|
|
34
35
|
} from '@tanstack/router-core'
|
|
35
36
|
|
|
36
37
|
//
|
|
@@ -49,45 +50,42 @@ declare module '@tanstack/router-core' {
|
|
|
49
50
|
|
|
50
51
|
// Extend the Route class to have some React-Specific methods
|
|
51
52
|
interface Route<
|
|
52
|
-
TParentRoute extends
|
|
53
|
-
TPath extends
|
|
54
|
-
TFullPath extends
|
|
53
|
+
TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute,
|
|
54
|
+
TPath extends RouteConstraints['TPath'] = '/',
|
|
55
|
+
TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<
|
|
55
56
|
TParentRoute,
|
|
56
57
|
TPath
|
|
57
58
|
>,
|
|
58
|
-
TCustomId extends
|
|
59
|
-
TId extends
|
|
59
|
+
TCustomId extends RouteConstraints['TCustomId'] = string,
|
|
60
|
+
TId extends RouteConstraints['TId'] = ResolveId<
|
|
60
61
|
TParentRoute,
|
|
61
62
|
TCustomId,
|
|
62
63
|
TPath
|
|
63
64
|
>,
|
|
64
65
|
TLoader = unknown,
|
|
65
|
-
TSearchSchema extends
|
|
66
|
-
TFullSearchSchema extends
|
|
66
|
+
TSearchSchema extends RouteConstraints['TSearchSchema'] = {},
|
|
67
|
+
TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<
|
|
67
68
|
TParentRoute,
|
|
68
69
|
TSearchSchema
|
|
69
70
|
>,
|
|
70
|
-
TParams extends
|
|
71
|
+
TParams extends RouteConstraints['TParams'] = Record<
|
|
71
72
|
ParsePathParams<TPath>,
|
|
72
73
|
string
|
|
73
74
|
>,
|
|
74
|
-
TAllParams extends MergeParamsFromParent<
|
|
75
|
+
TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent<
|
|
75
76
|
TParentRoute['__types']['allParams'],
|
|
76
77
|
TParams
|
|
77
|
-
|
|
78
|
-
TParentContext extends
|
|
79
|
-
TAllParentContext extends
|
|
80
|
-
TRouteContext extends
|
|
81
|
-
TContext extends MergeParamsFromParent<
|
|
82
|
-
TParentRoute['__types']['context'],
|
|
83
|
-
TRouteContext
|
|
84
|
-
> = MergeParamsFromParent<
|
|
78
|
+
>,
|
|
79
|
+
TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['__types']['routeContext'],
|
|
80
|
+
TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['__types']['context'],
|
|
81
|
+
TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext,
|
|
82
|
+
TContext extends RouteConstraints['TContext'] = MergeParamsFromParent<
|
|
85
83
|
TParentRoute['__types']['context'],
|
|
86
84
|
TRouteContext
|
|
87
85
|
>,
|
|
88
|
-
TRouterContext extends
|
|
89
|
-
TChildren extends
|
|
90
|
-
TRoutesInfo extends
|
|
86
|
+
TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext,
|
|
87
|
+
TChildren extends RouteConstraints['TChildren'] = unknown,
|
|
88
|
+
TRoutesInfo extends RouteConstraints['TRoutesInfo'] = DefaultRoutesInfo,
|
|
91
89
|
> {
|
|
92
90
|
useMatch: <TStrict extends boolean = true, TSelected = TContext>(opts?: {
|
|
93
91
|
strict?: TStrict
|