@tanstack/react-router 0.0.1-beta.264 → 0.0.1-beta.266
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/Matches.js.map +1 -1
- package/build/cjs/RouterProvider.js +0 -1
- package/build/cjs/RouterProvider.js.map +1 -1
- package/build/cjs/router.js +2 -0
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +2 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +355 -355
- package/build/types/Matches.d.ts +1 -0
- package/build/umd/index.development.js +2 -1
- 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/Matches.tsx +1 -0
- package/src/RouterProvider.tsx +0 -1
- package/src/router.ts +5 -2
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.266",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "tanstack/router",
|
|
7
7
|
"homepage": "https://tanstack.com/router",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@tanstack/store": "^0.1.3",
|
|
45
45
|
"tiny-invariant": "^1.3.1",
|
|
46
46
|
"tiny-warning": "^1.0.3",
|
|
47
|
-
"@tanstack/history": "0.0.1-beta.
|
|
47
|
+
"@tanstack/history": "0.0.1-beta.266"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup --config rollup.config.js"
|
package/src/Matches.tsx
CHANGED
|
@@ -37,6 +37,7 @@ export interface RouteMatch<
|
|
|
37
37
|
loadPromise?: Promise<void>
|
|
38
38
|
loaderData?: RouteById<TRouteTree, TRouteId>['types']['loaderData']
|
|
39
39
|
__resolveLoadPromise?: () => void
|
|
40
|
+
routeContext: RouteById<TRouteTree, TRouteId>['types']['routeContext']
|
|
40
41
|
context: RouteById<TRouteTree, TRouteId>['types']['allContext']
|
|
41
42
|
search: FullSearchSchema<TRouteTree> &
|
|
42
43
|
RouteById<TRouteTree, TRouteId>['types']['fullSearchSchema']
|
package/src/RouterProvider.tsx
CHANGED
package/src/router.ts
CHANGED
|
@@ -667,6 +667,7 @@ export class Router<
|
|
|
667
667
|
error: undefined,
|
|
668
668
|
paramsError: parseErrors[index],
|
|
669
669
|
loadPromise: Promise.resolve(),
|
|
670
|
+
routeContext: undefined!,
|
|
670
671
|
context: undefined!,
|
|
671
672
|
abortController: new AbortController(),
|
|
672
673
|
shouldReloadDeps: undefined,
|
|
@@ -997,8 +998,6 @@ export class Router<
|
|
|
997
998
|
}))
|
|
998
999
|
}
|
|
999
1000
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
1001
|
// Check each match middleware to see if the route can be accessed
|
|
1003
1002
|
try {
|
|
1004
1003
|
for (let [index, match] of matches.entries()) {
|
|
@@ -1071,6 +1070,10 @@ export class Router<
|
|
|
1071
1070
|
|
|
1072
1071
|
matches[index] = match = {
|
|
1073
1072
|
...match,
|
|
1073
|
+
routeContext: replaceEqualDeep(
|
|
1074
|
+
match.routeContext,
|
|
1075
|
+
beforeLoadContext,
|
|
1076
|
+
),
|
|
1074
1077
|
context: replaceEqualDeep(match.context, context),
|
|
1075
1078
|
abortController,
|
|
1076
1079
|
}
|