@tanstack/react-router 0.0.1-beta.191 → 0.0.1-beta.193
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/react.js +1 -1
- package/build/cjs/react.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +98 -98
- package/build/types/react.d.ts +21 -21
- package/build/umd/index.development.js +30 -19
- 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 +2 -2
- package/src/react.tsx +60 -78
package/build/stats-react.json
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "@tanstack+store@0.0.1/node_modules/@tanstack/store/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "0f4b-159"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "@tanstack+react-store@0.0.1/node_modules/@tanstack/react-store/build/esm/index.js",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "0f4b-161"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
22
|
-
"uid": "
|
|
22
|
+
"uid": "0f4b-163"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
|
|
26
|
-
"uid": "
|
|
26
|
+
"uid": "0f4b-165"
|
|
27
27
|
}
|
|
28
28
|
]
|
|
29
29
|
},
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
"children": [
|
|
33
33
|
{
|
|
34
34
|
"name": "router-core/build/esm/index.js",
|
|
35
|
-
"uid": "
|
|
35
|
+
"uid": "0f4b-167"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"name": "react-router/src",
|
|
39
39
|
"children": [
|
|
40
40
|
{
|
|
41
|
-
"uid": "
|
|
41
|
+
"uid": "0f4b-171",
|
|
42
42
|
"name": "react.tsx"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
"uid": "
|
|
45
|
+
"uid": "0f4b-173",
|
|
46
46
|
"name": "scroll-restoration.tsx"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"uid": "
|
|
49
|
+
"uid": "0f4b-175",
|
|
50
50
|
"name": "awaited.tsx"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
"uid": "
|
|
53
|
+
"uid": "0f4b-177",
|
|
54
54
|
"name": "index.tsx"
|
|
55
55
|
}
|
|
56
56
|
]
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "0f4b-169",
|
|
62
62
|
"name": "\u0000rollupPluginBabelHelpers.js"
|
|
63
63
|
}
|
|
64
64
|
]
|
|
@@ -67,302 +67,302 @@
|
|
|
67
67
|
"isRoot": true
|
|
68
68
|
},
|
|
69
69
|
"nodeParts": {
|
|
70
|
-
"
|
|
70
|
+
"0f4b-159": {
|
|
71
71
|
"renderedLength": 1843,
|
|
72
72
|
"gzipLength": 644,
|
|
73
73
|
"brotliLength": 0,
|
|
74
|
-
"mainUid": "
|
|
74
|
+
"mainUid": "0f4b-158"
|
|
75
75
|
},
|
|
76
|
-
"
|
|
76
|
+
"0f4b-161": {
|
|
77
77
|
"renderedLength": 1006,
|
|
78
78
|
"gzipLength": 479,
|
|
79
79
|
"brotliLength": 0,
|
|
80
|
-
"mainUid": "
|
|
80
|
+
"mainUid": "0f4b-160"
|
|
81
81
|
},
|
|
82
|
-
"
|
|
82
|
+
"0f4b-163": {
|
|
83
83
|
"renderedLength": 181,
|
|
84
84
|
"gzipLength": 129,
|
|
85
85
|
"brotliLength": 0,
|
|
86
|
-
"mainUid": "
|
|
86
|
+
"mainUid": "0f4b-162"
|
|
87
87
|
},
|
|
88
|
-
"
|
|
88
|
+
"0f4b-165": {
|
|
89
89
|
"renderedLength": 44,
|
|
90
90
|
"gzipLength": 62,
|
|
91
91
|
"brotliLength": 0,
|
|
92
|
-
"mainUid": "
|
|
92
|
+
"mainUid": "0f4b-164"
|
|
93
93
|
},
|
|
94
|
-
"
|
|
95
|
-
"renderedLength":
|
|
96
|
-
"gzipLength":
|
|
94
|
+
"0f4b-167": {
|
|
95
|
+
"renderedLength": 68572,
|
|
96
|
+
"gzipLength": 16202,
|
|
97
97
|
"brotliLength": 0,
|
|
98
|
-
"mainUid": "
|
|
98
|
+
"mainUid": "0f4b-166"
|
|
99
99
|
},
|
|
100
|
-
"
|
|
100
|
+
"0f4b-169": {
|
|
101
101
|
"renderedLength": 429,
|
|
102
102
|
"gzipLength": 238,
|
|
103
103
|
"brotliLength": 0,
|
|
104
|
-
"mainUid": "
|
|
104
|
+
"mainUid": "0f4b-168"
|
|
105
105
|
},
|
|
106
|
-
"
|
|
107
|
-
"renderedLength":
|
|
108
|
-
"gzipLength":
|
|
106
|
+
"0f4b-171": {
|
|
107
|
+
"renderedLength": 17451,
|
|
108
|
+
"gzipLength": 3775,
|
|
109
109
|
"brotliLength": 0,
|
|
110
|
-
"mainUid": "
|
|
110
|
+
"mainUid": "0f4b-170"
|
|
111
111
|
},
|
|
112
|
-
"
|
|
112
|
+
"0f4b-173": {
|
|
113
113
|
"renderedLength": 466,
|
|
114
114
|
"gzipLength": 228,
|
|
115
115
|
"brotliLength": 0,
|
|
116
|
-
"mainUid": "
|
|
116
|
+
"mainUid": "0f4b-172"
|
|
117
117
|
},
|
|
118
|
-
"
|
|
118
|
+
"0f4b-175": {
|
|
119
119
|
"renderedLength": 641,
|
|
120
120
|
"gzipLength": 305,
|
|
121
121
|
"brotliLength": 0,
|
|
122
|
-
"mainUid": "
|
|
122
|
+
"mainUid": "0f4b-174"
|
|
123
123
|
},
|
|
124
|
-
"
|
|
124
|
+
"0f4b-177": {
|
|
125
125
|
"renderedLength": 0,
|
|
126
126
|
"gzipLength": 0,
|
|
127
127
|
"brotliLength": 0,
|
|
128
|
-
"mainUid": "
|
|
128
|
+
"mainUid": "0f4b-176"
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
"nodeMetas": {
|
|
132
|
-
"
|
|
132
|
+
"0f4b-158": {
|
|
133
133
|
"id": "/node_modules/.pnpm/@tanstack+store@0.0.1/node_modules/@tanstack/store/build/esm/index.js",
|
|
134
134
|
"moduleParts": {
|
|
135
|
-
"index.production.js": "
|
|
135
|
+
"index.production.js": "0f4b-159"
|
|
136
136
|
},
|
|
137
137
|
"imported": [],
|
|
138
138
|
"importedBy": [
|
|
139
139
|
{
|
|
140
|
-
"uid": "
|
|
140
|
+
"uid": "0f4b-160"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
|
-
"uid": "
|
|
143
|
+
"uid": "0f4b-166"
|
|
144
144
|
}
|
|
145
145
|
]
|
|
146
146
|
},
|
|
147
|
-
"
|
|
147
|
+
"0f4b-160": {
|
|
148
148
|
"id": "/node_modules/.pnpm/@tanstack+react-store@0.0.1/node_modules/@tanstack/react-store/build/esm/index.js",
|
|
149
149
|
"moduleParts": {
|
|
150
|
-
"index.production.js": "
|
|
150
|
+
"index.production.js": "0f4b-161"
|
|
151
151
|
},
|
|
152
152
|
"imported": [
|
|
153
153
|
{
|
|
154
|
-
"uid": "
|
|
154
|
+
"uid": "0f4b-178"
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
|
-
"uid": "
|
|
157
|
+
"uid": "0f4b-158"
|
|
158
158
|
}
|
|
159
159
|
],
|
|
160
160
|
"importedBy": [
|
|
161
161
|
{
|
|
162
|
-
"uid": "
|
|
162
|
+
"uid": "0f4b-176"
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
|
-
"uid": "
|
|
165
|
+
"uid": "0f4b-170"
|
|
166
166
|
}
|
|
167
167
|
]
|
|
168
168
|
},
|
|
169
|
-
"
|
|
169
|
+
"0f4b-162": {
|
|
170
170
|
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js",
|
|
171
171
|
"moduleParts": {
|
|
172
|
-
"index.production.js": "
|
|
172
|
+
"index.production.js": "0f4b-163"
|
|
173
173
|
},
|
|
174
174
|
"imported": [],
|
|
175
175
|
"importedBy": [
|
|
176
176
|
{
|
|
177
|
-
"uid": "
|
|
177
|
+
"uid": "0f4b-166"
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
"uid": "
|
|
180
|
+
"uid": "0f4b-170"
|
|
181
181
|
}
|
|
182
182
|
]
|
|
183
183
|
},
|
|
184
|
-
"
|
|
184
|
+
"0f4b-164": {
|
|
185
185
|
"id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js",
|
|
186
186
|
"moduleParts": {
|
|
187
|
-
"index.production.js": "
|
|
187
|
+
"index.production.js": "0f4b-165"
|
|
188
188
|
},
|
|
189
189
|
"imported": [],
|
|
190
190
|
"importedBy": [
|
|
191
191
|
{
|
|
192
|
-
"uid": "
|
|
192
|
+
"uid": "0f4b-166"
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
|
-
"uid": "
|
|
195
|
+
"uid": "0f4b-170"
|
|
196
196
|
}
|
|
197
197
|
]
|
|
198
198
|
},
|
|
199
|
-
"
|
|
199
|
+
"0f4b-166": {
|
|
200
200
|
"id": "/packages/router-core/build/esm/index.js",
|
|
201
201
|
"moduleParts": {
|
|
202
|
-
"index.production.js": "
|
|
202
|
+
"index.production.js": "0f4b-167"
|
|
203
203
|
},
|
|
204
204
|
"imported": [
|
|
205
205
|
{
|
|
206
|
-
"uid": "
|
|
206
|
+
"uid": "0f4b-162"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
|
-
"uid": "
|
|
209
|
+
"uid": "0f4b-164"
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
"uid": "
|
|
212
|
+
"uid": "0f4b-158"
|
|
213
213
|
}
|
|
214
214
|
],
|
|
215
215
|
"importedBy": [
|
|
216
216
|
{
|
|
217
|
-
"uid": "
|
|
217
|
+
"uid": "0f4b-176"
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
"uid": "
|
|
220
|
+
"uid": "0f4b-170"
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
"uid": "
|
|
223
|
+
"uid": "0f4b-172"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
"uid": "
|
|
226
|
+
"uid": "0f4b-174"
|
|
227
227
|
}
|
|
228
228
|
]
|
|
229
229
|
},
|
|
230
|
-
"
|
|
230
|
+
"0f4b-168": {
|
|
231
231
|
"id": "\u0000rollupPluginBabelHelpers.js",
|
|
232
232
|
"moduleParts": {
|
|
233
|
-
"index.production.js": "
|
|
233
|
+
"index.production.js": "0f4b-169"
|
|
234
234
|
},
|
|
235
235
|
"imported": [],
|
|
236
236
|
"importedBy": [
|
|
237
237
|
{
|
|
238
|
-
"uid": "
|
|
238
|
+
"uid": "0f4b-170"
|
|
239
239
|
}
|
|
240
240
|
]
|
|
241
241
|
},
|
|
242
|
-
"
|
|
242
|
+
"0f4b-170": {
|
|
243
243
|
"id": "/packages/react-router/src/react.tsx",
|
|
244
244
|
"moduleParts": {
|
|
245
|
-
"index.production.js": "
|
|
245
|
+
"index.production.js": "0f4b-171"
|
|
246
246
|
},
|
|
247
247
|
"imported": [
|
|
248
248
|
{
|
|
249
|
-
"uid": "
|
|
249
|
+
"uid": "0f4b-168"
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
|
-
"uid": "
|
|
252
|
+
"uid": "0f4b-179"
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
|
-
"uid": "
|
|
255
|
+
"uid": "0f4b-160"
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
|
-
"uid": "
|
|
258
|
+
"uid": "0f4b-162"
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
|
-
"uid": "
|
|
261
|
+
"uid": "0f4b-164"
|
|
262
262
|
},
|
|
263
263
|
{
|
|
264
|
-
"uid": "
|
|
264
|
+
"uid": "0f4b-166"
|
|
265
265
|
}
|
|
266
266
|
],
|
|
267
267
|
"importedBy": [
|
|
268
268
|
{
|
|
269
|
-
"uid": "
|
|
269
|
+
"uid": "0f4b-176"
|
|
270
270
|
},
|
|
271
271
|
{
|
|
272
|
-
"uid": "
|
|
272
|
+
"uid": "0f4b-172"
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
|
-
"uid": "
|
|
275
|
+
"uid": "0f4b-174"
|
|
276
276
|
}
|
|
277
277
|
]
|
|
278
278
|
},
|
|
279
|
-
"
|
|
279
|
+
"0f4b-172": {
|
|
280
280
|
"id": "/packages/react-router/src/scroll-restoration.tsx",
|
|
281
281
|
"moduleParts": {
|
|
282
|
-
"index.production.js": "
|
|
282
|
+
"index.production.js": "0f4b-173"
|
|
283
283
|
},
|
|
284
284
|
"imported": [
|
|
285
285
|
{
|
|
286
|
-
"uid": "
|
|
286
|
+
"uid": "0f4b-179"
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
|
-
"uid": "
|
|
289
|
+
"uid": "0f4b-166"
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
|
-
"uid": "
|
|
292
|
+
"uid": "0f4b-170"
|
|
293
293
|
}
|
|
294
294
|
],
|
|
295
295
|
"importedBy": [
|
|
296
296
|
{
|
|
297
|
-
"uid": "
|
|
297
|
+
"uid": "0f4b-176"
|
|
298
298
|
}
|
|
299
299
|
]
|
|
300
300
|
},
|
|
301
|
-
"
|
|
301
|
+
"0f4b-174": {
|
|
302
302
|
"id": "/packages/react-router/src/awaited.tsx",
|
|
303
303
|
"moduleParts": {
|
|
304
|
-
"index.production.js": "
|
|
304
|
+
"index.production.js": "0f4b-175"
|
|
305
305
|
},
|
|
306
306
|
"imported": [
|
|
307
307
|
{
|
|
308
|
-
"uid": "
|
|
308
|
+
"uid": "0f4b-166"
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
|
-
"uid": "
|
|
311
|
+
"uid": "0f4b-170"
|
|
312
312
|
}
|
|
313
313
|
],
|
|
314
314
|
"importedBy": [
|
|
315
315
|
{
|
|
316
|
-
"uid": "
|
|
316
|
+
"uid": "0f4b-176"
|
|
317
317
|
}
|
|
318
318
|
]
|
|
319
319
|
},
|
|
320
|
-
"
|
|
320
|
+
"0f4b-176": {
|
|
321
321
|
"id": "/packages/react-router/src/index.tsx",
|
|
322
322
|
"moduleParts": {
|
|
323
|
-
"index.production.js": "
|
|
323
|
+
"index.production.js": "0f4b-177"
|
|
324
324
|
},
|
|
325
325
|
"imported": [
|
|
326
326
|
{
|
|
327
|
-
"uid": "
|
|
327
|
+
"uid": "0f4b-160"
|
|
328
328
|
},
|
|
329
329
|
{
|
|
330
|
-
"uid": "
|
|
330
|
+
"uid": "0f4b-166"
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
|
-
"uid": "
|
|
333
|
+
"uid": "0f4b-170"
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
|
-
"uid": "
|
|
336
|
+
"uid": "0f4b-172"
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
|
-
"uid": "
|
|
339
|
+
"uid": "0f4b-174"
|
|
340
340
|
}
|
|
341
341
|
],
|
|
342
342
|
"importedBy": [],
|
|
343
343
|
"isEntry": true
|
|
344
344
|
},
|
|
345
|
-
"
|
|
345
|
+
"0f4b-178": {
|
|
346
346
|
"id": "use-sync-external-store/shim/with-selector",
|
|
347
347
|
"moduleParts": {},
|
|
348
348
|
"imported": [],
|
|
349
349
|
"importedBy": [
|
|
350
350
|
{
|
|
351
|
-
"uid": "
|
|
351
|
+
"uid": "0f4b-160"
|
|
352
352
|
}
|
|
353
353
|
],
|
|
354
354
|
"isExternal": true
|
|
355
355
|
},
|
|
356
|
-
"
|
|
356
|
+
"0f4b-179": {
|
|
357
357
|
"id": "react",
|
|
358
358
|
"moduleParts": {},
|
|
359
359
|
"imported": [],
|
|
360
360
|
"importedBy": [
|
|
361
361
|
{
|
|
362
|
-
"uid": "
|
|
362
|
+
"uid": "0f4b-170"
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
|
-
"uid": "
|
|
365
|
+
"uid": "0f4b-172"
|
|
366
366
|
}
|
|
367
367
|
],
|
|
368
368
|
"isExternal": true
|
package/build/types/react.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ declare module '@tanstack/router-core' {
|
|
|
8
8
|
dehydratedState?: TDehydrated;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
|
-
interface RegisterRouteComponent<TLoader = unknown, TFullSearchSchema extends
|
|
11
|
+
interface RegisterRouteComponent<TLoader = unknown, TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> {
|
|
12
12
|
RouteComponent: RouteComponent<RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>>;
|
|
13
13
|
}
|
|
14
|
-
interface RegisterErrorRouteComponent<TFullSearchSchema extends
|
|
14
|
+
interface RegisterErrorRouteComponent<TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> {
|
|
15
15
|
ErrorRouteComponent: RouteComponent<ErrorRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>>;
|
|
16
16
|
}
|
|
17
|
-
interface RegisterPendingRouteComponent<TFullSearchSchema extends
|
|
17
|
+
interface RegisterPendingRouteComponent<TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> {
|
|
18
18
|
PendingRouteComponent: RouteComponent<PendingRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>>;
|
|
19
19
|
}
|
|
20
|
-
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'] = Expand<Record<ParsePathParams<TPath>, string>>, TAllParams extends RouteConstraints['TAllParams'] = ResolveAllParams<TParentRoute, TParams>, TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['types']['routeContext'], TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['types']['context'], TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext, TAllContext extends RouteConstraints['TAllContext'] = MergeFromFromParent<TParentRoute['types']['context'], TRouteContext>, TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext, TChildren extends RouteConstraints['TChildren'] = unknown, TRouteTree extends RouteConstraints['TRouteTree'] = AnyRoute> {
|
|
20
|
+
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>, TLoaderContext extends RouteConstraints['TLoaderContext'] = AnyContext, TLoader = unknown, TSearchSchema extends RouteConstraints['TSearchSchema'] = {}, TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends RouteConstraints['TParams'] = Expand<Record<ParsePathParams<TPath>, string>>, TAllParams extends RouteConstraints['TAllParams'] = ResolveAllParams<TParentRoute, TParams>, TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['types']['routeContext'], TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['types']['context'], TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext, TAllContext extends RouteConstraints['TAllContext'] = MergeFromFromParent<TParentRoute['types']['context'], TRouteContext>, TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext, TChildren extends RouteConstraints['TChildren'] = unknown, TRouteTree extends RouteConstraints['TRouteTree'] = AnyRoute> {
|
|
21
21
|
useMatch: <TSelected = TAllContext>(opts?: {
|
|
22
22
|
select?: (search: TAllContext) => TSelected;
|
|
23
23
|
}) => TSelected;
|
|
@@ -37,17 +37,17 @@ declare module '@tanstack/router-core' {
|
|
|
37
37
|
select?: (search: TAllParams) => TSelected;
|
|
38
38
|
}) => TSelected;
|
|
39
39
|
}
|
|
40
|
-
interface RegisterRouteProps<TLoader = unknown, TFullSearchSchema extends
|
|
40
|
+
interface RegisterRouteProps<TLoader = unknown, TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> {
|
|
41
41
|
RouteProps: RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>;
|
|
42
42
|
}
|
|
43
|
-
interface RegisterPendingRouteProps<TFullSearchSchema extends
|
|
43
|
+
interface RegisterPendingRouteProps<TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> {
|
|
44
44
|
PendingRouteProps: PendingRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>;
|
|
45
45
|
}
|
|
46
|
-
interface RegisterErrorRouteProps<TFullSearchSchema extends
|
|
46
|
+
interface RegisterErrorRouteProps<TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> {
|
|
47
47
|
ErrorRouteProps: ErrorRouteProps;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
export type RouteProps<TLoader = unknown, TFullSearchSchema extends
|
|
50
|
+
export type RouteProps<TLoader = unknown, TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> = {
|
|
51
51
|
useLoader: <TSelected = TLoader>(opts?: {
|
|
52
52
|
select?: (search: TLoader) => TSelected;
|
|
53
53
|
}) => UseLoaderResult<TSelected>;
|
|
@@ -67,13 +67,13 @@ export type RouteProps<TLoader = unknown, TFullSearchSchema extends AnySearchSch
|
|
|
67
67
|
select?: (search: TAllParams) => TSelected;
|
|
68
68
|
}) => TSelected;
|
|
69
69
|
};
|
|
70
|
-
export type ErrorRouteProps<TFullSearchSchema extends
|
|
70
|
+
export type ErrorRouteProps<TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> = {
|
|
71
71
|
error: unknown;
|
|
72
72
|
info: {
|
|
73
73
|
componentStack: string;
|
|
74
74
|
};
|
|
75
75
|
} & Omit<RouteProps<unknown, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>, 'useLoader'>;
|
|
76
|
-
export type PendingRouteProps<TFullSearchSchema extends
|
|
76
|
+
export type PendingRouteProps<TFullSearchSchema extends Record<string, any> = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends Record<string, any> = AnyContext, TAllContext extends Record<string, any> = AnyContext> = Omit<RouteProps<unknown, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>, 'useLoader'>;
|
|
77
77
|
type ReactNode = any;
|
|
78
78
|
export type SyncRouteComponent<TProps> = ((props: TProps) => ReactNode) | React.LazyExoticComponent<(props: TProps) => ReactNode>;
|
|
79
79
|
export type AsyncRouteComponent<TProps> = SyncRouteComponent<TProps> & {
|
|
@@ -89,14 +89,14 @@ export type ErrorRouteComponentProps = {
|
|
|
89
89
|
export type AnyRouteComponent = RouteComponent<AnyRouteProps>;
|
|
90
90
|
export type RouteComponent<TProps> = AsyncRouteComponent<TProps>;
|
|
91
91
|
export declare function lazyRouteComponent<T extends Record<string, any>, TKey extends keyof T = 'default'>(importer: () => Promise<T>, exportName?: TKey): T[TKey] extends (props: infer TProps) => any ? AsyncRouteComponent<TProps> : never;
|
|
92
|
-
export type LinkPropsOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = LinkOptions<
|
|
92
|
+
export type LinkPropsOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = LinkOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> & {
|
|
93
93
|
activeProps?: React.AnchorHTMLAttributes<HTMLAnchorElement> | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>);
|
|
94
94
|
inactiveProps?: React.AnchorHTMLAttributes<HTMLAnchorElement> | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>);
|
|
95
95
|
startTransition?: boolean;
|
|
96
96
|
};
|
|
97
97
|
export type MakeUseMatchRouteOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = ToOptions<RegisteredRouter['routeTree'], TFrom, TTo, TMaskFrom, TMaskTo> & MatchRouteOptions;
|
|
98
|
-
export type MakeMatchRouteOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = ToOptions<
|
|
99
|
-
children?: ((params?: RouteByPath<
|
|
98
|
+
export type MakeMatchRouteOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = ToOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> & MatchRouteOptions & {
|
|
99
|
+
children?: ((params?: RouteByPath<TRouteTree, ResolveRelativePath<TFrom, NoInfer<TTo>>>['types']['allParams']) => ReactNode) | React.ReactNode;
|
|
100
100
|
};
|
|
101
101
|
export type MakeLinkPropsOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = LinkPropsOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
102
102
|
export type MakeLinkOptions<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''> = LinkPropsOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & {
|
|
@@ -114,7 +114,7 @@ export interface LinkComponent<TProps extends Record<string, any> = {}> {
|
|
|
114
114
|
<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''>(props: MakeLinkOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> & TProps & React.RefAttributes<HTMLAnchorElement>): ReactNode;
|
|
115
115
|
}
|
|
116
116
|
export declare const Link: LinkComponent;
|
|
117
|
-
export declare function Navigate<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''>(props: NavigateOptions<
|
|
117
|
+
export declare function Navigate<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RoutePaths<TRouteTree> = '/', TTo extends string = '', TMaskFrom extends RoutePaths<TRouteTree> = '/', TMaskTo extends string = ''>(props: NavigateOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo>): null;
|
|
118
118
|
export declare const matchIdsContext: React.Context<string[]>;
|
|
119
119
|
export declare const routerContext: React.Context<import("@tanstack/router-core").AnyRouter>;
|
|
120
120
|
export type RouterProps<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TDehydrated extends Record<string, any> = Record<string, any>> = Omit<RouterOptions<TRouteTree, TDehydrated>, 'context'> & {
|
|
@@ -136,23 +136,23 @@ type StrictOrFrom<TFrom> = {
|
|
|
136
136
|
from?: never;
|
|
137
137
|
strict: false;
|
|
138
138
|
};
|
|
139
|
-
export declare function useMatch<
|
|
139
|
+
export declare function useMatch<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TStrict extends boolean = true, TRouteMatchState = RouteMatch<TRouteTree, TFrom>, TSelected = TRouteMatchState>(opts: StrictOrFrom<TFrom> & {
|
|
140
140
|
select?: (match: TRouteMatchState) => TSelected;
|
|
141
141
|
}): TStrict extends true ? TRouteMatchState : TRouteMatchState | undefined;
|
|
142
|
-
export type RouteFromIdOrRoute<T
|
|
143
|
-
export declare function useLoader<
|
|
142
|
+
export type RouteFromIdOrRoute<T, TRouteTree extends AnyRoute = RegisteredRouter['routeTree']> = T extends ParseRoute<TRouteTree> ? T : T extends RouteIds<TRouteTree> ? RoutesById<TRouteTree>[T] : T extends string ? RouteIds<TRouteTree> : never;
|
|
143
|
+
export declare function useLoader<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TStrict extends boolean = true, TLoader = RouteById<TRouteTree, TFrom>['types']['loader'], TSelected = TLoader>(opts: StrictOrFrom<TFrom> & {
|
|
144
144
|
select?: (search: TLoader) => TSelected;
|
|
145
145
|
}): TStrict extends true ? TSelected : TSelected | undefined;
|
|
146
|
-
export declare function useRouterContext<
|
|
146
|
+
export declare function useRouterContext<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TStrict extends boolean = true, TContext = RouteById<TRouteTree, TFrom>['types']['context'], TSelected = TContext>(opts: StrictOrFrom<TFrom> & {
|
|
147
147
|
select?: (search: TContext) => TSelected;
|
|
148
148
|
}): TStrict extends true ? TSelected : TSelected | undefined;
|
|
149
|
-
export declare function useRouteContext<
|
|
149
|
+
export declare function useRouteContext<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TStrict extends boolean = true, TRouteContext = RouteById<TRouteTree, TFrom>['types']['context'], TSelected = TRouteContext>(opts: StrictOrFrom<TFrom> & {
|
|
150
150
|
select?: (search: TRouteContext) => TSelected;
|
|
151
151
|
}): TStrict extends true ? TSelected : TSelected | undefined;
|
|
152
|
-
export declare function useSearch<
|
|
152
|
+
export declare function useSearch<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TStrict extends boolean = true, TSearch = RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'], TSelected = TSearch>(opts: StrictOrFrom<TFrom> & {
|
|
153
153
|
select?: (search: TSearch) => TSelected;
|
|
154
154
|
}): TStrict extends true ? TSelected : TSelected | undefined;
|
|
155
|
-
export declare function useParams<
|
|
155
|
+
export declare function useParams<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>, TDefaultSelected = AllParams<TRouteTree> & RouteById<TRouteTree, TFrom>['types']['allParams'], TSelected = TDefaultSelected>(opts: StrictOrFrom<TFrom> & {
|
|
156
156
|
select?: (search: TDefaultSelected) => TSelected;
|
|
157
157
|
}): TSelected;
|
|
158
158
|
export declare function useNavigate<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TDefaultFrom extends RoutePaths<TRouteTree> = '/'>(defaultOpts?: {
|