@tanstack/react-router 0.0.1-beta.10 → 0.0.1-beta.12
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-router/src/index.js +2 -3
- package/build/cjs/react-router/src/index.js.map +1 -1
- package/build/cjs/router-core/build/esm/index.js +5 -10
- package/build/cjs/router-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +6 -14
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +29 -29
- package/build/types/index.d.ts +3 -1
- package/build/umd/index.development.js +7 -13
- 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 -2
- package/src/index.tsx +2 -2
package/build/esm/index.js
CHANGED
|
@@ -1923,6 +1923,9 @@ function createRouter(userOptions) {
|
|
|
1923
1923
|
exiting.push(d);
|
|
1924
1924
|
}
|
|
1925
1925
|
});
|
|
1926
|
+
const entering = matches.filter(d => {
|
|
1927
|
+
return !previousMatches.find(dd => dd.matchId === d.matchId);
|
|
1928
|
+
});
|
|
1926
1929
|
const now = Date.now();
|
|
1927
1930
|
exiting.forEach(d => {
|
|
1928
1931
|
var _ref, _d$options$loaderGcMa, _ref2, _d$options$loaderMaxA;
|
|
@@ -1930,12 +1933,7 @@ function createRouter(userOptions) {
|
|
|
1930
1933
|
d.__.onExit == null ? void 0 : d.__.onExit({
|
|
1931
1934
|
params: d.params,
|
|
1932
1935
|
search: d.routeSearch
|
|
1933
|
-
}); //
|
|
1934
|
-
// if (d.action) {
|
|
1935
|
-
// d.action.current = undefined
|
|
1936
|
-
// d.action.submissions = []
|
|
1937
|
-
// }
|
|
1938
|
-
// Clear idle error states when match leaves
|
|
1936
|
+
}); // Clear idle error states when match leaves
|
|
1939
1937
|
|
|
1940
1938
|
if (d.status === 'error' && !d.isFetching) {
|
|
1941
1939
|
d.status = 'idle';
|
|
@@ -1957,16 +1955,13 @@ function createRouter(userOptions) {
|
|
|
1957
1955
|
search: d.routeSearch
|
|
1958
1956
|
});
|
|
1959
1957
|
});
|
|
1960
|
-
const entering = matches.filter(d => {
|
|
1961
|
-
return !previousMatches.find(dd => dd.matchId === d.matchId);
|
|
1962
|
-
});
|
|
1963
1958
|
entering.forEach(d => {
|
|
1964
1959
|
d.__.onExit = d.options.onMatch == null ? void 0 : d.options.onMatch({
|
|
1965
1960
|
params: d.params,
|
|
1966
1961
|
search: d.search
|
|
1967
1962
|
});
|
|
1968
1963
|
delete router.matchCache[d.matchId];
|
|
1969
|
-
});
|
|
1964
|
+
});
|
|
1970
1965
|
|
|
1971
1966
|
if (router.startedLoadingAt !== id) {
|
|
1972
1967
|
// Ignore side-effects of match loading
|
|
@@ -2723,18 +2718,15 @@ function RouterProvider(_ref2) {
|
|
|
2723
2718
|
value: router.state.matches
|
|
2724
2719
|
}, children != null ? children : /*#__PURE__*/React.createElement(Outlet, null)));
|
|
2725
2720
|
}
|
|
2726
|
-
|
|
2727
2721
|
function useRouter() {
|
|
2728
2722
|
const value = React.useContext(routerContext);
|
|
2729
2723
|
warning(!value, 'useRouter must be used inside a <Router> component!');
|
|
2730
2724
|
useRouterSubscription(value.router);
|
|
2731
2725
|
return value.router;
|
|
2732
2726
|
}
|
|
2733
|
-
|
|
2734
2727
|
function useMatches() {
|
|
2735
2728
|
return React.useContext(matchesContext);
|
|
2736
2729
|
}
|
|
2737
|
-
|
|
2738
2730
|
function Outlet() {
|
|
2739
2731
|
var _match$options$catchE;
|
|
2740
2732
|
|
|
@@ -2878,5 +2870,5 @@ function Prompt(_ref7) {
|
|
|
2878
2870
|
return children != null ? children : null;
|
|
2879
2871
|
}
|
|
2880
2872
|
|
|
2881
|
-
export { DefaultErrorBoundary, MatchesProvider, Outlet, Prompt, RouterProvider, cleanPath, createBrowserHistory, createHashHistory, createMemoryHistory, createReactRouter, createRoute, createRouteConfig, createRouteMatch, createRouter, decode, defaultParseSearch, defaultStringifySearch, encode, functionalUpdate, interpolatePath, invariant, joinPaths, last, matchByPath, matchPathname, parsePathname, parseSearchWith, pick, replaceEqualDeep, resolvePath, rootRouteId, stringifySearchWith, trimPath, trimPathLeft, trimPathRight, usePrompt, warning };
|
|
2873
|
+
export { DefaultErrorBoundary, MatchesProvider, Outlet, Prompt, RouterProvider, cleanPath, createBrowserHistory, createHashHistory, createMemoryHistory, createReactRouter, createRoute, createRouteConfig, createRouteMatch, createRouter, decode, defaultParseSearch, defaultStringifySearch, encode, functionalUpdate, interpolatePath, invariant, joinPaths, last, matchByPath, matchPathname, parsePathname, parseSearchWith, pick, replaceEqualDeep, resolvePath, rootRouteId, stringifySearchWith, trimPath, trimPathLeft, trimPathRight, useMatches, usePrompt, useRouter, warning };
|
|
2882
2874
|
//# sourceMappingURL=index.js.map
|