@tanstack/react-router 0.0.1-beta.154 → 0.0.1-beta.156
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 +5 -5
- package/build/umd/index.development.js +4 -2
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +8 -5
package/build/stats-react.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"name": "index.production.js",
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"uid": "
|
|
10
|
+
"uid": "f64d-167",
|
|
11
11
|
"name": "\u0000rollupPluginBabelHelpers.js"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"children": [
|
|
16
16
|
{
|
|
17
17
|
"name": "store/build/esm/index.js",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "f64d-169"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "react-store/build/esm/index.js",
|
|
22
|
-
"uid": "
|
|
22
|
+
"uid": "f64d-171"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "router-core/build/esm/index.js",
|
|
26
|
-
"uid": "
|
|
26
|
+
"uid": "f64d-177"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"name": "react-router/src/index.tsx",
|
|
30
|
-
"uid": "
|
|
30
|
+
"uid": "f64d-179"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
},
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"children": [
|
|
37
37
|
{
|
|
38
38
|
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
39
|
-
"uid": "
|
|
39
|
+
"uid": "f64d-173"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
|
|
43
|
-
"uid": "
|
|
43
|
+
"uid": "f64d-175"
|
|
44
44
|
}
|
|
45
45
|
]
|
|
46
46
|
}
|
|
@@ -50,194 +50,194 @@
|
|
|
50
50
|
"isRoot": true
|
|
51
51
|
},
|
|
52
52
|
"nodeParts": {
|
|
53
|
-
"
|
|
53
|
+
"f64d-167": {
|
|
54
54
|
"renderedLength": 429,
|
|
55
55
|
"gzipLength": 238,
|
|
56
56
|
"brotliLength": 0,
|
|
57
|
-
"mainUid": "
|
|
57
|
+
"mainUid": "f64d-166"
|
|
58
58
|
},
|
|
59
|
-
"
|
|
59
|
+
"f64d-169": {
|
|
60
60
|
"renderedLength": 1843,
|
|
61
61
|
"gzipLength": 644,
|
|
62
62
|
"brotliLength": 0,
|
|
63
|
-
"mainUid": "
|
|
63
|
+
"mainUid": "f64d-168"
|
|
64
64
|
},
|
|
65
|
-
"
|
|
65
|
+
"f64d-171": {
|
|
66
66
|
"renderedLength": 1006,
|
|
67
67
|
"gzipLength": 479,
|
|
68
68
|
"brotliLength": 0,
|
|
69
|
-
"mainUid": "
|
|
69
|
+
"mainUid": "f64d-170"
|
|
70
70
|
},
|
|
71
|
-
"
|
|
71
|
+
"f64d-173": {
|
|
72
72
|
"renderedLength": 181,
|
|
73
73
|
"gzipLength": 129,
|
|
74
74
|
"brotliLength": 0,
|
|
75
|
-
"mainUid": "
|
|
75
|
+
"mainUid": "f64d-172"
|
|
76
76
|
},
|
|
77
|
-
"
|
|
77
|
+
"f64d-175": {
|
|
78
78
|
"renderedLength": 44,
|
|
79
79
|
"gzipLength": 62,
|
|
80
80
|
"brotliLength": 0,
|
|
81
|
-
"mainUid": "
|
|
81
|
+
"mainUid": "f64d-174"
|
|
82
82
|
},
|
|
83
|
-
"
|
|
84
|
-
"renderedLength":
|
|
85
|
-
"gzipLength":
|
|
83
|
+
"f64d-177": {
|
|
84
|
+
"renderedLength": 56115,
|
|
85
|
+
"gzipLength": 13303,
|
|
86
86
|
"brotliLength": 0,
|
|
87
|
-
"mainUid": "
|
|
87
|
+
"mainUid": "f64d-176"
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"f64d-179": {
|
|
90
90
|
"renderedLength": 17095,
|
|
91
91
|
"gzipLength": 3814,
|
|
92
92
|
"brotliLength": 0,
|
|
93
|
-
"mainUid": "
|
|
93
|
+
"mainUid": "f64d-178"
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"nodeMetas": {
|
|
97
|
-
"
|
|
97
|
+
"f64d-166": {
|
|
98
98
|
"id": "\u0000rollupPluginBabelHelpers.js",
|
|
99
99
|
"moduleParts": {
|
|
100
|
-
"index.production.js": "
|
|
100
|
+
"index.production.js": "f64d-167"
|
|
101
101
|
},
|
|
102
102
|
"imported": [],
|
|
103
103
|
"importedBy": [
|
|
104
104
|
{
|
|
105
|
-
"uid": "
|
|
105
|
+
"uid": "f64d-178"
|
|
106
106
|
}
|
|
107
107
|
]
|
|
108
108
|
},
|
|
109
|
-
"
|
|
109
|
+
"f64d-168": {
|
|
110
110
|
"id": "/packages/store/build/esm/index.js",
|
|
111
111
|
"moduleParts": {
|
|
112
|
-
"index.production.js": "
|
|
112
|
+
"index.production.js": "f64d-169"
|
|
113
113
|
},
|
|
114
114
|
"imported": [],
|
|
115
115
|
"importedBy": [
|
|
116
116
|
{
|
|
117
|
-
"uid": "
|
|
117
|
+
"uid": "f64d-170"
|
|
118
118
|
}
|
|
119
119
|
]
|
|
120
120
|
},
|
|
121
|
-
"
|
|
121
|
+
"f64d-170": {
|
|
122
122
|
"id": "/packages/react-store/build/esm/index.js",
|
|
123
123
|
"moduleParts": {
|
|
124
|
-
"index.production.js": "
|
|
124
|
+
"index.production.js": "f64d-171"
|
|
125
125
|
},
|
|
126
126
|
"imported": [
|
|
127
127
|
{
|
|
128
|
-
"uid": "
|
|
128
|
+
"uid": "f64d-181"
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
|
-
"uid": "
|
|
131
|
+
"uid": "f64d-168"
|
|
132
132
|
}
|
|
133
133
|
],
|
|
134
134
|
"importedBy": [
|
|
135
135
|
{
|
|
136
|
-
"uid": "
|
|
136
|
+
"uid": "f64d-178"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
"uid": "
|
|
139
|
+
"uid": "f64d-176"
|
|
140
140
|
}
|
|
141
141
|
]
|
|
142
142
|
},
|
|
143
|
-
"
|
|
143
|
+
"f64d-172": {
|
|
144
144
|
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
145
145
|
"moduleParts": {
|
|
146
|
-
"index.production.js": "
|
|
146
|
+
"index.production.js": "f64d-173"
|
|
147
147
|
},
|
|
148
148
|
"imported": [],
|
|
149
149
|
"importedBy": [
|
|
150
150
|
{
|
|
151
|
-
"uid": "
|
|
151
|
+
"uid": "f64d-178"
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"uid": "
|
|
154
|
+
"uid": "f64d-176"
|
|
155
155
|
}
|
|
156
156
|
]
|
|
157
157
|
},
|
|
158
|
-
"
|
|
158
|
+
"f64d-174": {
|
|
159
159
|
"id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
|
|
160
160
|
"moduleParts": {
|
|
161
|
-
"index.production.js": "
|
|
161
|
+
"index.production.js": "f64d-175"
|
|
162
162
|
},
|
|
163
163
|
"imported": [],
|
|
164
164
|
"importedBy": [
|
|
165
165
|
{
|
|
166
|
-
"uid": "
|
|
166
|
+
"uid": "f64d-178"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
"uid": "
|
|
169
|
+
"uid": "f64d-176"
|
|
170
170
|
}
|
|
171
171
|
]
|
|
172
172
|
},
|
|
173
|
-
"
|
|
173
|
+
"f64d-176": {
|
|
174
174
|
"id": "/packages/router-core/build/esm/index.js",
|
|
175
175
|
"moduleParts": {
|
|
176
|
-
"index.production.js": "
|
|
176
|
+
"index.production.js": "f64d-177"
|
|
177
177
|
},
|
|
178
178
|
"imported": [
|
|
179
179
|
{
|
|
180
|
-
"uid": "
|
|
180
|
+
"uid": "f64d-172"
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
|
-
"uid": "
|
|
183
|
+
"uid": "f64d-174"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
|
-
"uid": "
|
|
186
|
+
"uid": "f64d-170"
|
|
187
187
|
}
|
|
188
188
|
],
|
|
189
189
|
"importedBy": [
|
|
190
190
|
{
|
|
191
|
-
"uid": "
|
|
191
|
+
"uid": "f64d-178"
|
|
192
192
|
}
|
|
193
193
|
]
|
|
194
194
|
},
|
|
195
|
-
"
|
|
195
|
+
"f64d-178": {
|
|
196
196
|
"id": "/packages/react-router/src/index.tsx",
|
|
197
197
|
"moduleParts": {
|
|
198
|
-
"index.production.js": "
|
|
198
|
+
"index.production.js": "f64d-179"
|
|
199
199
|
},
|
|
200
200
|
"imported": [
|
|
201
201
|
{
|
|
202
|
-
"uid": "
|
|
202
|
+
"uid": "f64d-166"
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
|
-
"uid": "
|
|
205
|
+
"uid": "f64d-180"
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
|
-
"uid": "
|
|
208
|
+
"uid": "f64d-170"
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
"uid": "
|
|
211
|
+
"uid": "f64d-172"
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
|
-
"uid": "
|
|
214
|
+
"uid": "f64d-174"
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
|
-
"uid": "
|
|
217
|
+
"uid": "f64d-176"
|
|
218
218
|
}
|
|
219
219
|
],
|
|
220
220
|
"importedBy": [],
|
|
221
221
|
"isEntry": true
|
|
222
222
|
},
|
|
223
|
-
"
|
|
223
|
+
"f64d-180": {
|
|
224
224
|
"id": "react",
|
|
225
225
|
"moduleParts": {},
|
|
226
226
|
"imported": [],
|
|
227
227
|
"importedBy": [
|
|
228
228
|
{
|
|
229
|
-
"uid": "
|
|
229
|
+
"uid": "f64d-178"
|
|
230
230
|
}
|
|
231
231
|
],
|
|
232
232
|
"isExternal": true
|
|
233
233
|
},
|
|
234
|
-
"
|
|
234
|
+
"f64d-181": {
|
|
235
235
|
"id": "use-sync-external-store/shim/with-selector",
|
|
236
236
|
"moduleParts": {},
|
|
237
237
|
"imported": [],
|
|
238
238
|
"importedBy": [
|
|
239
239
|
{
|
|
240
|
-
"uid": "
|
|
240
|
+
"uid": "f64d-170"
|
|
241
241
|
}
|
|
242
242
|
],
|
|
243
243
|
"isExternal": true
|
package/build/types/index.d.ts
CHANGED
|
@@ -21,18 +21,18 @@ declare module '@tanstack/router-core' {
|
|
|
21
21
|
interface RegisterRouteErrorComponent<TProps extends Record<string, any>> {
|
|
22
22
|
RouteErrorComponent: RouteComponent<TProps>;
|
|
23
23
|
}
|
|
24
|
-
interface Route<TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, TPath extends RouteConstraints['TPath'] = '/', TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<TParentRoute, TPath>, TCustomId extends RouteConstraints['TCustomId'] = string, TId extends RouteConstraints['TId'] = ResolveId<TParentRoute, TCustomId, TPath>, TLoader = unknown, TSearchSchema extends RouteConstraints['TSearchSchema'] = {}, TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends RouteConstraints['TParams'] = Record<ParsePathParams<TPath>, string>, TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent<TParentRoute['__types']['allParams'], TParams>, TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['__types']['routeContext'], TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['__types']['context'], TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext,
|
|
25
|
-
useMatch: <TStrict extends boolean = true, TSelected =
|
|
24
|
+
interface Route<TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, TPath extends RouteConstraints['TPath'] = '/', TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<TParentRoute, TPath>, TCustomId extends RouteConstraints['TCustomId'] = string, TId extends RouteConstraints['TId'] = ResolveId<TParentRoute, TCustomId, TPath>, TLoader = unknown, TSearchSchema extends RouteConstraints['TSearchSchema'] = {}, TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends RouteConstraints['TParams'] = Record<ParsePathParams<TPath>, string>, TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent<TParentRoute['__types']['allParams'], TParams>, TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['__types']['routeContext'], TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['__types']['context'], TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext, TAllContext extends RouteConstraints['TAllContext'] = MergeParamsFromParent<TParentRoute['__types']['context'], TRouteContext>, TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext, TChildren extends RouteConstraints['TChildren'] = unknown, TRouteTree extends RouteConstraints['TRouteTree'] = AnyRoute> {
|
|
25
|
+
useMatch: <TStrict extends boolean = true, TSelected = TAllContext>(opts?: {
|
|
26
26
|
strict?: TStrict;
|
|
27
|
-
select?: (search:
|
|
27
|
+
select?: (search: TAllContext) => TSelected;
|
|
28
28
|
}) => TStrict extends true ? TSelected : TSelected | undefined;
|
|
29
29
|
useLoader: <TStrict extends boolean = true, TSelected = TLoader>(opts?: {
|
|
30
30
|
strict?: TStrict;
|
|
31
31
|
select?: (search: TLoader) => TSelected;
|
|
32
32
|
}) => TStrict extends true ? UseLoaderResult<TSelected> : UseLoaderResult<TSelected> | undefined;
|
|
33
|
-
useContext: <TStrict extends boolean = true, TSelected =
|
|
33
|
+
useContext: <TStrict extends boolean = true, TSelected = TAllContext>(opts?: {
|
|
34
34
|
strict?: TStrict;
|
|
35
|
-
select?: (search:
|
|
35
|
+
select?: (search: TAllContext) => TSelected;
|
|
36
36
|
}) => TStrict extends true ? TSelected : TSelected | undefined;
|
|
37
37
|
useRouteContext: <TStrict extends boolean = true, TSelected = TRouteContext>(opts?: {
|
|
38
38
|
strict?: TStrict;
|
|
@@ -1492,7 +1492,8 @@
|
|
|
1492
1492
|
activeOptions,
|
|
1493
1493
|
preload,
|
|
1494
1494
|
preloadDelay: userPreloadDelay,
|
|
1495
|
-
disabled
|
|
1495
|
+
disabled,
|
|
1496
|
+
state
|
|
1496
1497
|
}) => {
|
|
1497
1498
|
// If this link simply reloads the current route,
|
|
1498
1499
|
// make sure it has a new key so it will trigger a data refresh
|
|
@@ -1513,7 +1514,8 @@
|
|
|
1513
1514
|
search,
|
|
1514
1515
|
params,
|
|
1515
1516
|
hash,
|
|
1516
|
-
replace
|
|
1517
|
+
replace,
|
|
1518
|
+
state
|
|
1517
1519
|
};
|
|
1518
1520
|
const next = this.buildNext(nextOpts);
|
|
1519
1521
|
preload = preload ?? this.options.defaultPreload;
|