react-router-dom 6.21.2 → 6.21.3-pre.0
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/CHANGELOG.md +12 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/react-router-dom.development.js +6 -2
- package/dist/react-router-dom.development.js.map +1 -1
- package/dist/react-router-dom.production.min.js +2 -2
- package/dist/react-router-dom.production.min.js.map +1 -1
- package/dist/umd/react-router-dom.development.js +6 -2
- package/dist/umd/react-router-dom.development.js.map +1 -1
- package/dist/umd/react-router-dom.production.min.js +2 -2
- package/dist/umd/react-router-dom.production.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# `react-router-dom`
|
|
2
2
|
|
|
3
|
+
## 6.21.3-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix `NavLink` `isPending` when a `basename` is used ([#11195](https://github.com/remix-run/react-router/pull/11195))
|
|
8
|
+
- Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- `react-router@6.21.3-pre.0`
|
|
11
|
+
|
|
3
12
|
## 6.21.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -162,7 +171,7 @@
|
|
|
162
171
|
|
|
163
172
|
### Patch Changes
|
|
164
173
|
|
|
165
|
-
- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
|
|
174
|
+
- Revert the `useResolvedPath` fix for splat routes due to a large number of applications that were relying on the buggy behavior (see <https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329>). We plan to re-introduce this fix behind a future flag in the next minor version. ([#11078](https://github.com/remix-run/react-router/pull/11078))
|
|
166
175
|
- Updated dependencies:
|
|
167
176
|
- `react-router@6.20.1`
|
|
168
177
|
- `@remix-run/router@1.13.1`
|
|
@@ -417,7 +426,7 @@
|
|
|
417
426
|
|
|
418
427
|
## 6.12.1
|
|
419
428
|
|
|
420
|
-
> [!WARNING]
|
|
429
|
+
> \[!WARNING]
|
|
421
430
|
> Please use version `6.13.0` or later instead of `6.12.1`. This version suffers from a `webpack`/`terser` minification issue resulting in invalid minified code in your resulting production bundles which can cause issues in your application. See [#10579](https://github.com/remix-run/react-router/issues/10579) for more details.
|
|
422
431
|
|
|
423
432
|
### Patch Changes
|
|
@@ -752,7 +761,7 @@
|
|
|
752
761
|
|
|
753
762
|
## 6.4.0
|
|
754
763
|
|
|
755
|
-
Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs]
|
|
764
|
+
Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs over from Remix. Here's a quick high level overview, but it's recommended you go check out the [docs](https://reactrouter.com), especially the [feature overview](https://reactrouter.com/start/overview) and the [tutorial](https://reactrouter.com/start/tutorial).
|
|
756
765
|
|
|
757
766
|
**New APIs**
|
|
758
767
|
|
|
@@ -778,7 +787,3 @@ Whoa this is a big one! `6.4.0` brings all the data loading and mutation APIs ov
|
|
|
778
787
|
**Updated Dependencies**
|
|
779
788
|
|
|
780
789
|
- `react-router@6.4.0`
|
|
781
|
-
|
|
782
|
-
[rr-docs]: https://reactrouter.com
|
|
783
|
-
[rr-feature-overview]: https://reactrouter.com/start/overview
|
|
784
|
-
[rr-tutorial]: https://reactrouter.com/start/tutorial
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { SubmitOptions, ParamKeyValuePair, URLSearchParamsInit, SubmitTarge
|
|
|
9
9
|
import { createSearchParams } from "./dom";
|
|
10
10
|
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, V7_FormMethod, };
|
|
11
11
|
export { createSearchParams };
|
|
12
|
-
export type { ActionFunction, ActionFunctionArgs, AwaitProps,
|
|
12
|
+
export type { ActionFunction, ActionFunctionArgs, AwaitProps, Blocker, BlockerFunction, DataRouteMatch, DataRouteObject, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LazyRouteFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, Params, ParamParseKey, Path, PathMatch, Pathname, PathParam, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, } from "react-router";
|
|
13
13
|
export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, isRouteErrorResponse, generatePath, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, } from "react-router";
|
|
14
14
|
/** @internal */
|
|
15
15
|
export { UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_NavigationContext, UNSAFE_LocationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, } from "react-router";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router DOM v6.21.
|
|
2
|
+
* React Router DOM v6.21.3-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -798,7 +798,8 @@ const NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref8, ref
|
|
|
798
798
|
let location = useLocation();
|
|
799
799
|
let routerState = React.useContext(UNSAFE_DataRouterStateContext);
|
|
800
800
|
let {
|
|
801
|
-
navigator
|
|
801
|
+
navigator,
|
|
802
|
+
basename
|
|
802
803
|
} = React.useContext(UNSAFE_NavigationContext);
|
|
803
804
|
let isTransitioning = routerState != null &&
|
|
804
805
|
// Conditional usage is OK here because the usage of a data router is static
|
|
@@ -812,6 +813,9 @@ const NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref8, ref
|
|
|
812
813
|
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
813
814
|
toPathname = toPathname.toLowerCase();
|
|
814
815
|
}
|
|
816
|
+
if (nextLocationPathname && basename) {
|
|
817
|
+
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
818
|
+
}
|
|
815
819
|
// If the `to` has a trailing slash, look at that exact spot. Otherwise,
|
|
816
820
|
// we're looking for a slash _after_ what's in `to`. For example:
|
|
817
821
|
//
|