react-router 6.26.0 → 6.26.1-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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # `react-router`
2
2
 
3
+ ## 6.26.1-pre.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` because it will now be called on the first navigation to paths matching splat/param routes in case there exists a higher-scoring route match not yet discovered ([#11888](https://github.com/remix-run/react-router/pull/11888))
8
+ - Updated dependencies:
9
+ - `@remix-run/router@1.19.1-pre.0`
10
+
3
11
  ## 6.26.0
4
12
 
5
13
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult, unstable_AgnosticPatchRoutesOnMissFunction } from "@remix-run/router";
1
+ import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult, unstable_AgnosticPatchRoutesOnNavigationFunction } from "@remix-run/router";
2
2
  import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, resolvePath } from "@remix-run/router";
3
3
  import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components";
4
4
  import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } from "./lib/components";
@@ -14,7 +14,7 @@ export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Ou
14
14
  declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
15
15
  hasErrorBoundary: boolean;
16
16
  };
17
- export interface unstable_PatchRoutesOnMissFunction extends unstable_AgnosticPatchRoutesOnMissFunction<RouteMatch> {
17
+ export interface unstable_PatchRoutesOnNavigationFunction extends unstable_AgnosticPatchRoutesOnNavigationFunction<RouteMatch> {
18
18
  }
19
19
  export declare function createMemoryRouter(routes: RouteObject[], opts?: {
20
20
  basename?: string;
@@ -23,7 +23,7 @@ export declare function createMemoryRouter(routes: RouteObject[], opts?: {
23
23
  initialEntries?: InitialEntry[];
24
24
  initialIndex?: number;
25
25
  unstable_dataStrategy?: unstable_DataStrategyFunction;
26
- unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
26
+ unstable_patchRoutesOnNavigation?: unstable_PatchRoutesOnNavigationFunction;
27
27
  }): RemixRouter;
28
28
  /** @internal */
29
29
  export { DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, mapRouteProperties as UNSAFE_mapRouteProperties, useRouteId as UNSAFE_useRouteId, useRoutesImpl as UNSAFE_useRoutesImpl, };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.26.0
2
+ * React Router v6.26.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -551,7 +551,7 @@ function _renderMatches(matches, parentMatches, dataRouterState, future) {
551
551
  matches = dataRouterState.matches;
552
552
  } else if ((_future = future) != null && _future.v7_partialHydration && parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {
553
553
  // Don't bail if we're initializing with partial hydration and we have
554
- // router matches. That means we're actively running `patchRoutesOnMiss`
554
+ // router matches. That means we're actively running `patchRoutesOnNavigation`
555
555
  // so we should render down the partial matches to the appropriate
556
556
  // `HydrateFallback`. We only do this if `parentMatches` is empty so it
557
557
  // only impacts the root matches for `RouterProvider` and no descendant
@@ -1459,7 +1459,7 @@ function createMemoryRouter(routes, opts) {
1459
1459
  routes,
1460
1460
  mapRouteProperties,
1461
1461
  unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,
1462
- unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss
1462
+ unstable_patchRoutesOnNavigation: opts == null ? void 0 : opts.unstable_patchRoutesOnNavigation
1463
1463
  }).initialize();
1464
1464
  }
1465
1465