@tanstack/react-router 0.0.1-beta.271 → 0.0.1-beta.272
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/RouterProvider.js +5 -4
- package/build/cjs/RouterProvider.js.map +1 -1
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +351 -351
- package/build/types/router.d.ts +3 -0
- package/build/umd/index.development.js +5 -4
- 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/RouterProvider.tsx +12 -4
- package/src/router.ts +1 -0
package/build/types/router.d.ts
CHANGED
|
@@ -52,6 +52,9 @@ export interface RouterOptions<TRouteTree extends AnyRoute, TDehydrated extends
|
|
|
52
52
|
Wrap?: (props: {
|
|
53
53
|
children: any;
|
|
54
54
|
}) => JSX.Element;
|
|
55
|
+
InnerWrap?: (props: {
|
|
56
|
+
children: any;
|
|
57
|
+
}) => JSX.Element;
|
|
55
58
|
notFoundRoute?: AnyRoute;
|
|
56
59
|
}
|
|
57
60
|
export interface RouterState<TRouteTree extends AnyRoute = AnyRoute> {
|
|
@@ -1097,13 +1097,14 @@
|
|
|
1097
1097
|
...rest?.context
|
|
1098
1098
|
}
|
|
1099
1099
|
});
|
|
1100
|
-
const
|
|
1100
|
+
const matches = router.options.InnerWrap ? /*#__PURE__*/React__namespace.createElement(router.options.InnerWrap, null, /*#__PURE__*/React__namespace.createElement(Matches, null)) : /*#__PURE__*/React__namespace.createElement(Matches, null);
|
|
1101
|
+
const provider = /*#__PURE__*/React__namespace.createElement(routerContext.Provider, {
|
|
1101
1102
|
value: router
|
|
1102
|
-
},
|
|
1103
|
+
}, matches, /*#__PURE__*/React__namespace.createElement(Transitioner, null));
|
|
1103
1104
|
if (router.options.Wrap) {
|
|
1104
|
-
return /*#__PURE__*/React__namespace.createElement(router.options.Wrap, null,
|
|
1105
|
+
return /*#__PURE__*/React__namespace.createElement(router.options.Wrap, null, provider);
|
|
1105
1106
|
}
|
|
1106
|
-
return
|
|
1107
|
+
return provider;
|
|
1107
1108
|
}
|
|
1108
1109
|
function Transitioner() {
|
|
1109
1110
|
const router = useRouter();
|