react-router 6.23.1 → 6.24.0-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,19 @@
1
1
  # `react-router`
2
2
 
3
+ ## 6.24.0-pre.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626))
8
+
9
+ - RFC: https://github.com/remix-run/react-router/discussions/11113
10
+ - `unstable_patchRoutesOnMiss` docs: https://reactrouter.com/en/main/routers/create-browser-router
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies:
15
+ - `@remix-run/router@1.17.0-pre.0`
16
+
3
17
  ## 6.23.1
4
18
 
5
19
  ### Patch 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 } 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_AgnosticPatchRoutesOnMissFunction } from "@remix-run/router";
2
2
  import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, 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,6 +14,8 @@ 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> {
18
+ }
17
19
  export declare function createMemoryRouter(routes: RouteObject[], opts?: {
18
20
  basename?: string;
19
21
  future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
@@ -21,6 +23,7 @@ export declare function createMemoryRouter(routes: RouteObject[], opts?: {
21
23
  initialEntries?: InitialEntry[];
22
24
  initialIndex?: number;
23
25
  unstable_dataStrategy?: unstable_DataStrategyFunction;
26
+ unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
24
27
  }): RemixRouter;
25
28
  /** @internal */
26
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.23.1
2
+ * React Router v6.24.0-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1447,7 +1447,8 @@ function createMemoryRouter(routes, opts) {
1447
1447
  hydrationData: opts == null ? void 0 : opts.hydrationData,
1448
1448
  routes,
1449
1449
  mapRouteProperties,
1450
- unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy
1450
+ unstable_dataStrategy: opts == null ? void 0 : opts.unstable_dataStrategy,
1451
+ unstable_patchRoutesOnMiss: opts == null ? void 0 : opts.unstable_patchRoutesOnMiss
1451
1452
  }).initialize();
1452
1453
  }
1453
1454