react-router-dom-v5-compat 6.21.2 → 6.21.3

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # `react-router-dom-v5-compat`
2
2
 
3
+ ## 6.21.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Remove leftover `unstable_` prefix from `Blocker`/`BlockerFunction` types ([#11187](https://github.com/remix-run/react-router/pull/11187))
8
+ - Updated dependencies:
9
+ - `react-router-dom@6.21.3`
10
+ - `react-router@6.21.3`
11
+
3
12
  ## 6.21.2
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -46,7 +46,7 @@
46
46
  * would break. We could stop doing two bundles in v6 "react-router-dom" and
47
47
  * deprecate the deep require if we wanted to avoid the duplication here.
48
48
  */
49
- export type { ActionFunction, ActionFunctionArgs, AwaitProps, BrowserRouterProps, DataRouteMatch, DataRouteObject, ErrorResponse, Fetcher, FetcherWithComponents, FormEncType, FormMethod, FormProps, FutureConfig, GetScrollRestorationKeyFunction, Hash, HashRouterProps, HistoryRouterProps, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LinkProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavLinkProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, ParamKeyValuePair, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, ScrollRestorationProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, SubmitFunction, SubmitOptions, To, URLSearchParamsInit, UIMatch, unstable_Blocker, unstable_BlockerFunction, } from "./react-router-dom";
49
+ export type { ActionFunction, ActionFunctionArgs, AwaitProps, BrowserRouterProps, DataRouteMatch, DataRouteObject, ErrorResponse, Fetcher, FetcherWithComponents, FormEncType, FormMethod, FormProps, FutureConfig, GetScrollRestorationKeyFunction, Hash, HashRouterProps, HistoryRouterProps, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LinkProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavLinkProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, ParamKeyValuePair, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, ScrollRestorationProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, SubmitFunction, SubmitOptions, To, URLSearchParamsInit, UIMatch, Blocker, BlockerFunction, } from "./react-router-dom";
50
50
  export { AbortedDeferredError, Await, BrowserRouter, Form, HashRouter, Link, MemoryRouter, NavLink, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, ScrollRestoration, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, createSearchParams, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, unstable_HistoryRouter, useBlocker, unstable_usePrompt, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, } from "./react-router-dom";
51
51
  export type { StaticRouterProps } from "./lib/components";
52
52
  export { CompatRoute, CompatRouter, StaticRouter } from "./lib/components";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v5 Compat v6.21.2
2
+ * React Router DOM v5 Compat v6.21.3
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -800,7 +800,8 @@ const NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref8, ref
800
800
  let location = useLocation();
801
801
  let routerState = React.useContext(UNSAFE_DataRouterStateContext);
802
802
  let {
803
- navigator
803
+ navigator,
804
+ basename
804
805
  } = React.useContext(UNSAFE_NavigationContext);
805
806
  let isTransitioning = routerState != null &&
806
807
  // Conditional usage is OK here because the usage of a data router is static
@@ -814,6 +815,9 @@ const NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref8, ref
814
815
  nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
815
816
  toPathname = toPathname.toLowerCase();
816
817
  }
818
+ if (nextLocationPathname && basename) {
819
+ nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
820
+ }
817
821
  // If the `to` has a trailing slash, look at that exact spot. Otherwise,
818
822
  // we're looking for a slash _after_ what's in `to`. For example:
819
823
  //