Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
6
Maintainers
0
Versions
431
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0-nightly-bb58afdfd-20240520 to 0.0.0-nightly-c846a2e1e-20240627

dist/lib/dom/ssr/entry.d.ts

14

CHANGELOG.md
# `react-router`
## 6.24.0
### Minor Changes
- Add support for Lazy Route Discovery (a.k.a. Fog of War) ([#11626](https://github.com/remix-run/react-router/pull/11626))
- RFC: <https://github.com/remix-run/react-router/discussions/11113>
- `unstable_patchRoutesOnMiss` docs: <https://reactrouter.com/en/main/routers/create-browser-router>
### Patch Changes
- Updated dependencies:
- `@remix-run/router@1.17.0`
## 6.23.1

@@ -4,0 +18,0 @@

61

dist/index.d.ts

@@ -1,5 +0,5 @@

import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult } from "./lib/router";
import type { ActionFunction, ActionFunctionArgs, Blocker, BlockerFunction, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, NavigationStates, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, unstable_HandlerResult } from "./lib/router";
import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath, UNSAFE_ErrorResponseImpl } from "./lib/router";
import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components";
import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches, createMemoryRouter, mapRouteProperties } from "./lib/components";
import type { AwaitProps, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RoutesProps, unstable_PatchRoutesOnMissFunction } from "./lib/components";
import { Await, MemoryRouter, Navigate, Outlet, Route, Router, Routes, createRoutesFromChildren, renderMatches, createMemoryRouter, mapRouteProperties } from "./lib/components";
import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./lib/context";

@@ -12,10 +12,10 @@ import { DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RouteContext } from "./lib/context";

type Search = string;
export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataRouteMatch, DataRouteObject, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, Blocker, BlockerFunction, unstable_HandlerResult, };
export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
export type { AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, HydrationState, InitialEntry, StaticHandler, TrackedPromise, UNSAFE_DeferredData, } from "./lib/router";
export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataRouteMatch, DataRouteObject, unstable_DataStrategyFunction, unstable_DataStrategyFunctionArgs, unstable_DataStrategyMatch, ErrorResponse, Fetcher, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, NavigationStates, Navigator, NonIndexRouteObject, OutletProps, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, Blocker, BlockerFunction, unstable_HandlerResult, unstable_PatchRoutesOnMissFunction, };
export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
export type { AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, HydrationState, InitialEntry, LowerCaseFormMethod, StaticHandler, TrackedPromise, FetcherStates, UpperCaseFormMethod, UNSAFE_DeferredData, } from "./lib/router";
export { getStaticContextFromError, stripBasename, UNSAFE_DEFERRED_SYMBOL, UNSAFE_convertRoutesToDataRoutes, } from "./lib/router";
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, StaticHandlerContext, V7_FormMethod, } from "./lib/router";
export type { BrowserRouterProps, HashRouterProps, HistoryRouterProps, LinkProps, NavLinkProps, NavLinkRenderProps, FetcherFormProps, FormProps, ScrollRestorationProps, SetURLSearchParams, SubmitFunction, FetcherSubmitFunction, FetcherWithComponents, } from "./lib/dom/lib";
export { createBrowserRouter, createHashRouter, BrowserRouter, HashRouter, Link, UNSAFE_ViewTransitionContext, UNSAFE_FetchersContext, unstable_HistoryRouter, NavLink, Form, ScrollRestoration, useLinkClickHandler, useSearchParams, useSubmit, useFormAction, useFetcher, useFetchers, UNSAFE_useScrollRestoration, useBeforeUnload, unstable_usePrompt, unstable_useViewTransitionState, } from "./lib/dom/lib";
export type { ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, } from "./lib/dom/dom";
export type { FormEncType, FormMethod, GetScrollRestorationKeyFunction, StaticHandlerContext, Submission, } from "./lib/router";
export type { BrowserRouterProps, HashRouterProps, HistoryRouterProps, LinkProps, NavLinkProps, NavLinkRenderProps, FetcherFormProps, FormProps, ScrollRestorationProps, SetURLSearchParams, SubmitFunction, FetcherSubmitFunction, FetcherWithComponents, RouterProviderProps, } from "./lib/dom/lib";
export { createBrowserRouter, createHashRouter, BrowserRouter, HashRouter, Link, UNSAFE_ViewTransitionContext, UNSAFE_FetchersContext, unstable_HistoryRouter, NavLink, Form, RouterProvider, ScrollRestoration, useLinkClickHandler, useSearchParams, useSubmit, useFormAction, useFetcher, useFetchers, UNSAFE_useScrollRestoration, useBeforeUnload, unstable_usePrompt, unstable_useViewTransitionState, } from "./lib/dom/lib";
export type { ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, SubmitTarget, } from "./lib/dom/dom";
export { createSearchParams } from "./lib/dom/dom";

@@ -26,16 +26,45 @@ export type { StaticRouterProps, StaticRouterProviderProps, } from "./lib/dom/server";

export { Meta, Links, Scripts, PrefetchPageLinks, } from "./lib/dom/ssr/components";
export type { ScriptsProps } from "./lib/dom/ssr/components";
export type { EntryContext } from "./lib/dom/ssr/entry";
export type { HtmlLinkDescriptor, LinkDescriptor, PrefetchPageDescriptor, } from "./lib/dom/ssr/links";
export type { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, MetaArgs, MetaDescriptor, MetaFunction, LinksFunction, } from "./lib/dom/ssr/routeModules";
export type { RemixServerProps } from "./lib/dom/ssr/server";
export { RemixServer } from "./lib/dom/ssr/server";
export type { RemixStubProps } from "./lib/dom/ssr/create-remix-stub";
export { createRemixStub } from "./lib/dom/ssr/create-remix-stub";
export type { ServerRouterProps } from "./lib/dom/ssr/server";
export { ServerRouter } from "./lib/dom/ssr/server";
export type { RoutesTestStubProps } from "./lib/dom/ssr/routes-test-stub";
export { createRoutesStub } from "./lib/dom/ssr/routes-test-stub";
export { defineRoute, type Match, type MetaMatch, } from "./lib/router/define-route";
export { createCookieFactory, isCookie } from "./lib/server-runtime/cookies";
export { composeUploadHandlers as unstable_composeUploadHandlers, parseMultipartFormData as unstable_parseMultipartFormData, } from "./lib/server-runtime/formData";
export { createRequestHandler } from "./lib/server-runtime/server";
export { createSession, createSessionStorageFactory, isSession, } from "./lib/server-runtime/sessions";
export { createCookieSessionStorageFactory } from "./lib/server-runtime/sessions/cookieStorage";
export { createMemorySessionStorageFactory } from "./lib/server-runtime/sessions/memoryStorage";
export { createMemoryUploadHandler as unstable_createMemoryUploadHandler } from "./lib/server-runtime/upload/memoryUploadHandler";
export { MaxPartSizeExceededError } from "./lib/server-runtime/upload/errors";
export { setDevServerHooks as unstable_setDevServerHooks } from "./lib/server-runtime/dev";
export type { CreateCookieFunction, IsCookieFunction, } from "./lib/server-runtime/cookies";
export type { CreateRequestHandlerFunction } from "./lib/server-runtime/server";
export type { CreateSessionFunction, CreateSessionStorageFunction, IsSessionFunction, } from "./lib/server-runtime/sessions";
export type { CreateCookieSessionStorageFunction } from "./lib/server-runtime/sessions/cookieStorage";
export type { CreateMemorySessionStorageFunction } from "./lib/server-runtime/sessions/memoryStorage";
export type { HandleDataRequestFunction, HandleDocumentRequestFunction, HandleErrorFunction, ServerBuild, ServerEntryModule, } from "./lib/server-runtime/build";
export type { UploadHandlerPart, UploadHandler, } from "./lib/server-runtime/formData";
export type { MemoryUploadHandlerOptions, MemoryUploadHandlerFilterArgs, } from "./lib/server-runtime/upload/memoryUploadHandler";
export type { Cookie, CookieOptions, CookieParseOptions, CookieSerializeOptions, CookieSignatureOptions, } from "./lib/server-runtime/cookies";
export type { SignFunction, UnsignFunction } from "./lib/server-runtime/crypto";
export type { AppLoadContext } from "./lib/server-runtime/data";
export type { PageLinkDescriptor, } from "./lib/server-runtime/links";
export type { TypedDeferredData, TypedResponse, } from "./lib/server-runtime/responses";
export type { DataFunctionArgs, HeadersArgs, HeadersFunction, } from "./lib/server-runtime/routeModules";
export type { RequestHandler } from "./lib/server-runtime/server";
export type { Session, SessionData, SessionIdStorageStrategy, SessionStorage, FlashSessionData, } from "./lib/server-runtime/sessions";
export { ServerMode as UNSAFE_ServerMode } from "./lib/server-runtime/mode";
/** @internal */
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, UNSAFE_ErrorResponseImpl, };
/** @internal */
export { RemixContext as UNSAFE_RemixContext } from "./lib/dom/ssr/components";
export { FrameworkContext as UNSAFE_FrameworkContext } from "./lib/dom/ssr/components";
/** @internal */
export type { RouteModules as UNSAFE_RouteModules } from "./lib/dom/ssr/routeModules";
/** @internal */
export type { FutureConfig as UNSAFE_FutureConfig, AssetsManifest as UNSAFE_AssetsManifest, RemixContextObject as UNSAFE_RemixContextObject, } from "./lib/dom/ssr/entry";
export type { FutureConfig as UNSAFE_FutureConfig, AssetsManifest as UNSAFE_AssetsManifest, FrameworkContextObject as UNSAFE_FrameworkContextObject, } from "./lib/dom/ssr/entry";
/** @internal */

@@ -42,0 +71,0 @@ export type { EntryRoute as UNSAFE_EntryRoute, RouteManifest as UNSAFE_RouteManifest, } from "./lib/dom/ssr/routes";

@@ -1,9 +0,5 @@

import type { FutureConfig as RouterFutureConfig, HydrationState, InitialEntry, LazyRouteFunction, Location, RelativeRoutingType, Router as RemixRouter, To, TrackedPromise, unstable_DataStrategyFunction } from "./router";
import type { FutureConfig as RouterFutureConfig, HydrationState, InitialEntry, LazyRouteFunction, Location, RelativeRoutingType, Router as RemixRouter, To, TrackedPromise, unstable_DataStrategyFunction, unstable_AgnosticPatchRoutesOnMissFunction } from "./router";
import { Action as NavigationType } from "./router";
import * as React from "react";
import type { IndexRouteObject, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./context";
export interface FutureConfig {
v7_relativeSplatPath: boolean;
v7_startTransition: boolean;
}
/**

@@ -15,2 +11,4 @@ * @private

};
export interface unstable_PatchRoutesOnMissFunction extends unstable_AgnosticPatchRoutesOnMissFunction<RouteMatch> {
}
/**

@@ -21,3 +19,3 @@ * @category Routers

basename?: string;
future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
future?: Partial<RouterFutureConfig>;
hydrationData?: HydrationState;

@@ -27,14 +25,7 @@ initialEntries?: InitialEntry[];

unstable_dataStrategy?: unstable_DataStrategyFunction;
unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
}): RemixRouter;
export interface RouterProviderProps {
fallbackElement?: React.ReactNode;
router: RemixRouter;
future?: Partial<Pick<FutureConfig, "v7_startTransition">>;
}
/**
* Given a Remix Router instance, render the appropriate UI
*
* @category Components
* @category Types
*/
export declare function RouterProvider({ fallbackElement, router, future, }: RouterProviderProps): React.ReactElement;
export interface MemoryRouterProps {

@@ -45,3 +36,2 @@ basename?: string;

initialIndex?: number;
future?: Partial<FutureConfig>;
}

@@ -51,5 +41,8 @@ /**

*
* @category Components
* @category Router Components
*/
export declare function MemoryRouter({ basename, children, initialEntries, initialIndex, future, }: MemoryRouterProps): React.ReactElement;
export declare function MemoryRouter({ basename, children, initialEntries, initialIndex, }: MemoryRouterProps): React.ReactElement;
/**
* @category Types
*/
export interface NavigateProps {

@@ -71,2 +64,5 @@ to: To;

export declare function Navigate({ to, replace, state, relative, }: NavigateProps): null;
/**
* @category Types
*/
export interface OutletProps {

@@ -99,6 +95,9 @@ /**

```
@category Components
*/
export declare function Outlet(props: OutletProps): React.ReactElement | null;
/**
* @category Types
*/
export interface PathRouteProps {

@@ -123,4 +122,10 @@ caseSensitive?: NonIndexRouteObject["caseSensitive"];

}
/**
* @category Types
*/
export interface LayoutRouteProps extends PathRouteProps {
}
/**
* @category Types
*/
export interface IndexRouteProps {

@@ -147,3 +152,6 @@ caseSensitive?: IndexRouteObject["caseSensitive"];

/**
* Declares an element that should be rendered at a certain URL path.
* Configures an element to render when a pattern matches the current location.
* It must be rendered within a {@link Routes} element. Note that these routes
* do not participate in data loading, actions, code splitting, or any other
* route module features.
*

@@ -153,2 +161,5 @@ * @category Components

export declare function Route(_props: RouteProps): React.ReactElement | null;
/**
* @category Types
*/
export interface RouterProps {

@@ -161,3 +172,2 @@ basename?: string;

static?: boolean;
future?: Partial<Pick<FutureConfig, "v7_relativeSplatPath">>;
}

@@ -173,12 +183,32 @@ /**

*/
export declare function Router({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp, future, }: RouterProps): React.ReactElement | null;
export declare function Router({ basename: basenameProp, children, location: locationProp, navigationType, navigator, static: staticProp, }: RouterProps): React.ReactElement | null;
/**
* @category Types
*/
export interface RoutesProps {
/**
* Nested {@link Route} elements
*/
children?: React.ReactNode;
/**
* The location to match against. Defaults to the current location.
*/
location?: Partial<Location> | string;
}
/**
* A container for a nested tree of `<Route>` elements that renders the branch
* that best matches the current location.
*
* @category Components
Renders a branch of {@link Route | `<Routes>`} that best matches the current
location. Note that these routes do not participate in data loading, actions,
code splitting, or any other route module features.
```tsx
import { Routes, Route } from "react-router"
<Routes>
<Route index element={<StepOne />} />
<Route path="step-2" element={<StepTwo />} />
<Route path="step-3" element={<StepThree />}>
</Routes>
```
@category Components
*/

@@ -189,2 +219,5 @@ export declare function Routes({ children, location, }: RoutesProps): React.ReactElement | null;

}
/**
* @category Types
*/
export interface AwaitProps {

@@ -335,2 +368,4 @@ /**

* `<Routes>` to create a route config from its children.
*
* @category Utils
*/

@@ -340,3 +375,5 @@ export declare function createRoutesFromChildren(children: React.ReactNode, parentPath?: number[]): RouteObject[];

* Renders the result of `matchRoutes()` into a React element.
*
* @category Utils
*/
export declare function renderMatches(matches: RouteMatch[] | null): React.ReactElement | null;

@@ -85,5 +85,3 @@ import * as React from "react";

static: boolean;
future: {
v7_relativeSplatPath: boolean;
};
future: {};
}

@@ -90,0 +88,0 @@ export declare const NavigationContext: React.Context<NavigationContextObject>;

@@ -12,21 +12,26 @@ import type { FormEncType, HTMLFormMethod, RelativeRoutingType } from "../router";

/**
* Creates a URLSearchParams object using the given initializer.
*
* This is identical to `new URLSearchParams(init)` except it also
* supports arrays as values in the object form of the initializer
* instead of just strings. This is convenient when you need multiple
* values for a given key, but don't want to use an array initializer.
*
* For example, instead of:
*
* let searchParams = new URLSearchParams([
* ['sort', 'name'],
* ['sort', 'price']
* ]);
*
* you can do:
*
* let searchParams = createSearchParams({
* sort: ['name', 'price']
* });
Creates a URLSearchParams object using the given initializer.
This is identical to `new URLSearchParams(init)` except it also
supports arrays as values in the object form of the initializer
instead of just strings. This is convenient when you need multiple
values for a given key, but don't want to use an array initializer.
For example, instead of:
```tsx
let searchParams = new URLSearchParams([
['sort', 'name'],
['sort', 'price']
]);
```
you can do:
```
let searchParams = createSearchParams({
sort: ['name', 'price']
});
```
@category Utils
*/

@@ -44,3 +49,6 @@ export declare function createSearchParams(init?: URLSearchParamsInit): URLSearchParams;

export type SubmitTarget = HTMLFormElement | HTMLButtonElement | HTMLInputElement | FormData | URLSearchParams | JsonValue | null;
export interface SubmitOptions {
/**
* Submit options shared by both navigations and fetchers
*/
interface SharedSubmitOptions {
/**

@@ -62,10 +70,27 @@ * The HTTP method used to submit the form. Overrides `<form method>`.

/**
* Indicate a specific fetcherKey to use when using navigate=false
* Determines whether the form action is relative to the route hierarchy or
* the pathname. Use this if you want to opt out of navigating the route
* hierarchy and want to instead route based on /-delimited URL segments
*/
fetcherKey?: string;
relative?: RelativeRoutingType;
/**
* navigate=false will use a fetcher instead of a navigation
* In browser-based environments, prevent resetting scroll after this
* navigation when using the <ScrollRestoration> component
*/
navigate?: boolean;
preventScrollReset?: boolean;
/**
* Enable flushSync for this submission's state updates
*/
unstable_flushSync?: boolean;
}
/**
* Submit options available to fetchers
*/
export interface FetcherSubmitOptions extends SharedSubmitOptions {
}
/**
* Submit options available to navigations
*/
export interface SubmitOptions extends FetcherSubmitOptions {
/**
* Set `true` to replace the current entry in the browser's history stack

@@ -81,17 +106,10 @@ * instead of creating a new one (i.e. stay on "the same page"). Defaults

/**
* Determines whether the form action is relative to the route hierarchy or
* the pathname. Use this if you want to opt out of navigating the route
* hierarchy and want to instead route based on /-delimited URL segments
* Indicate a specific fetcherKey to use when using navigate=false
*/
relative?: RelativeRoutingType;
fetcherKey?: string;
/**
* In browser-based environments, prevent resetting scroll after this
* navigation when using the <ScrollRestoration> component
* navigate=false will use a fetcher instead of a navigation
*/
preventScrollReset?: boolean;
navigate?: boolean;
/**
* Enable flushSync for this navigation's state updates
*/
unstable_flushSync?: boolean;
/**
* Enable view transitions on this submission navigation

@@ -98,0 +116,0 @@ */

import * as React from "react";
import type { unstable_DataStrategyFunction, Fetcher, FutureConfig as RouterFutureConfig, GetScrollRestorationKeyFunction, History, HTMLFormMethod, HydrationState, Router as RemixRouter, BlockerFunction, Location, RelativeRoutingType, To } from "../router";
import "./global";
import type { SubmitOptions, URLSearchParamsInit, SubmitTarget } from "./dom";
import type { PrefetchBehavior, ScriptProps } from "./ssr/components";
import type { RouterProviderProps, FutureConfig as RenderFutureConfig } from "../components";
import type { SubmitOptions, URLSearchParamsInit, SubmitTarget, FetcherSubmitOptions } from "./dom";
import type { PrefetchBehavior, ScriptsProps } from "./ssr/components";
import type { unstable_PatchRoutesOnMissFunction } from "../components";
import type { RouteObject, NavigateOptions } from "../context";
interface DOMRouterOpts {
basename?: string;
future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
future?: Partial<RouterFutureConfig>;
hydrationData?: HydrationState;
unstable_dataStrategy?: unstable_DataStrategyFunction;
unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
window?: Window;
}
/**
* @category Routers
*/
export declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): RemixRouter;
/**
* @category Routers
*/
export declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): RemixRouter;

@@ -36,10 +43,15 @@ type ViewTransitionContextObject = {

}
export interface RouterProviderProps {
router: RemixRouter;
}
/**
* Given a Remix Router instance, render the appropriate UI
*/
export declare function RouterProvider({ fallbackElement, router, future, }: RouterProviderProps): React.ReactElement;
export declare function RouterProvider({ router, }: RouterProviderProps): React.ReactElement;
/**
* @category Types
*/
export interface BrowserRouterProps {
basename?: string;
children?: React.ReactNode;
future?: Partial<RenderFutureConfig>;
window?: Window;

@@ -49,8 +61,12 @@ }

* A `<Router>` for use in web browsers. Provides the cleanest URLs.
*
* @category Router Components
*/
export declare function BrowserRouter({ basename, children, future, window, }: BrowserRouterProps): React.JSX.Element;
export declare function BrowserRouter({ basename, children, window, }: BrowserRouterProps): React.JSX.Element;
/**
* @category Types
*/
export interface HashRouterProps {
basename?: string;
children?: React.ReactNode;
future?: Partial<RenderFutureConfig>;
window?: Window;

@@ -61,8 +77,12 @@ }

* portion of the URL so it is not sent to the server.
*
* @category Router Components
*/
export declare function HashRouter({ basename, children, future, window, }: HashRouterProps): React.JSX.Element;
export declare function HashRouter({ basename, children, window }: HashRouterProps): React.JSX.Element;
/**
* @category Types
*/
export interface HistoryRouterProps {
basename?: string;
children?: React.ReactNode;
future?: RenderFutureConfig;
history: History;

@@ -75,4 +95,6 @@ }

* version of the history library that React Router uses internally.
*
* @category Router Components
*/
declare function HistoryRouter({ basename, children, future, history, }: HistoryRouterProps): React.JSX.Element;
declare function HistoryRouter({ basename, children, history }: HistoryRouterProps): React.JSX.Element;
declare namespace HistoryRouter {

@@ -82,2 +104,5 @@ var displayName: string;

export { HistoryRouter as unstable_HistoryRouter };
/**
* @category Types
*/
export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {

@@ -277,2 +302,5 @@ /**

};
/**
* @category Types
*/
export interface NavLinkProps extends Omit<LinkProps, "className" | "style" | "children"> {

@@ -313,3 +341,3 @@ /**

/**
Changes the matching logic for the `active` and `pending` states to only match to the "end" of the {@link NavLink#to}. If the URL is longer, it will no longer be considered active.
Changes the matching logic for the `active` and `pending` states to only match to the "end" of the {@link NavLinkProps.to}. If the URL is longer, it will no longer be considered active.

@@ -330,3 +358,3 @@ | Link | URL | isActive |

Wraps {@link Link | `<Link>`} with additional props for styling active and pending states.
- Automatically applies classes to the link based on its active and pending states, see {@link NavLinkProps.className}.

@@ -356,3 +384,6 @@ - Automatically applies `aria-current="page"` to the link when the link is active. See [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current) on MDN.

export declare const NavLink: React.ForwardRefExoticComponent<NavLinkProps & React.RefAttributes<HTMLAnchorElement>>;
export interface FetcherFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
/**
* Form props shared by navigations and fetchers
*/
interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
/**

@@ -391,3 +422,13 @@ * The HTTP verb to use when the form is submitted. Supports "get", "post",

}
export interface FormProps extends FetcherFormProps {
/**
* Form props available to fetchers
* @category Types
*/
export interface FetcherFormProps extends SharedFormProps {
}
/**
* Form props available to navigations
* @category Types
*/
export interface FormProps extends SharedFormProps {
/**

@@ -453,3 +494,15 @@ * Indicates a specific fetcherKey to use when using `navigate={false}` so you

export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
export type ScrollRestorationProps = ScriptProps & {
export type ScrollRestorationProps = ScriptsProps & {
/**
Defines the key used to restore scroll positions.
```tsx
<ScrollRestoration
getKey={(location, matches) => {
// default behavior
return location.key
}}
/>
```
*/
getKey?: GetScrollRestorationKeyFunction;

@@ -459,4 +512,26 @@ storageKey?: string;

/**
* This component will emulate the browser's scroll restoration on location
* changes.
Emulates the browser's scroll restoration on location changes. Apps should only render one of these, right before the {@link Scripts} component.
```tsx
import { ScrollRestoration } from "react-router";
export default function Root() {
return (
<html>
<body>
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
```
This component renders an inline `<script>` to prevent scroll flashing. The `nonce` prop will be passed down to the script tag to allow CSP nonce usage.
```tsx
<ScrollRestoration nonce={cspNonce} />
```
@category Components
*/

@@ -471,2 +546,4 @@ export declare function ScrollRestoration({ getKey, storageKey, ...props }: ScrollRestorationProps): React.JSX.Element | null;

* use in our exported `<Link>`.
*
* @category Hooks
*/

@@ -482,6 +559,44 @@ export declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, unstable_viewTransition, }?: {

/**
* A convenient wrapper for reading and writing search parameters via the
* URLSearchParams interface.
Returns a tuple of the current URL's {@link URLSearchParams} and a function to update them. Setting the search params causes a navigation.
```tsx
import { useSearchParams } from "react-router";
export function SomeComponent() {
const [searchParams, setSearchParams] = useSearchParams();
// ...
}
```
@category Hooks
*/
export declare function useSearchParams(defaultInit?: URLSearchParamsInit): [URLSearchParams, SetURLSearchParams];
/**
Sets new search params and causes a navigation when called.
```tsx
<button
onClick={() => {
const params = new URLSearchParams();
params.set("someKey", "someValue");
setSearchParams(params, {
preventScrollReset: true,
});
}}
/>
```
It also supports a function for setting new search params.
```tsx
<button
onClick={() => {
setSearchParams((prev) => {
prev.set("someKey", "someValue");
return prev;
});
}}
/>
```
*/
export type SetURLSearchParams = (nextInit?: URLSearchParamsInit | ((prev: URLSearchParams) => URLSearchParamsInit), navigateOpts?: NavigateOptions) => void;

@@ -494,8 +609,36 @@ /**

/**
* Specifies the `<form>` to be submitted to the server, a specific
* `<button>` or `<input type="submit">` to use to submit the form, or some
* arbitrary data to submit.
*
* Note: When using a `<button>` its `name` and `value` will also be
* included in the form data that is submitted.
Can be multiple types of elements and objects
**`HTMLFormElement`**
```tsx
<Form
onSubmit={(event) => {
submit(event.currentTarget);
}}
/>
```
**`FormData`**
```tsx
const formData = new FormData();
formData.append("myKey", "myValue");
submit(formData, { method: "post" });
```
**Plain object that will be serialized as `FormData`**
```tsx
submit({ myKey: "myValue" }, { method: "post" });
```
**Plain object that will be serialized as JSON**
```tsx
submit(
{ myKey: "myValue" },
{ method: "post", encType: "application/json" }
);
```
*/

@@ -513,16 +656,174 @@ target: SubmitTarget,

export interface FetcherSubmitFunction {
(target: SubmitTarget, options?: Omit<SubmitOptions, "replace" | "state">): Promise<void>;
(
/**
Can be multiple types of elements and objects
**`HTMLFormElement`**
```tsx
<fetcher.Form
onSubmit={(event) => {
fetcher.submit(event.currentTarget);
}}
/>
```
**`FormData`**
```tsx
const formData = new FormData();
formData.append("myKey", "myValue");
fetcher.submit(formData, { method: "post" });
```
**Plain object that will be serialized as `FormData`**
```tsx
fetcher.submit({ myKey: "myValue" }, { method: "post" });
```
**Plain object that will be serialized as JSON**
```tsx
fetcher.submit(
{ myKey: "myValue" },
{ method: "post", encType: "application/json" }
);
```
*/
target: SubmitTarget, options?: FetcherSubmitOptions): Promise<void>;
}
/**
* Returns a function that may be used to programmatically submit a form (or
* some arbitrary data) to the server.
The imperative version of {@link Form | `<Form>`} that lets you submit a form from code instead of a user interaction.
```tsx
import { useSubmit } from "react-router";
function SomeComponent() {
const submit = useSubmit();
return (
<Form
onChange={(event) => {
submit(event.currentTarget);
}}
/>
);
}
```
@category Hooks
*/
export declare function useSubmit(): SubmitFunction;
export declare function useFormAction(action?: string, { relative }?: {
/**
Resolves the URL to the closest route in the component hierarchy instead of the current URL of the app.
This is used internally by {@link Form} resolve the action to the closest route, but can be used generically as well.
```tsx
import { useFormAction } from "react-router";
function SomeComponent() {
// closest route URL
let action = useFormAction();
// closest route URL + "destroy"
let destroyAction = useFormAction("destroy");
}
```
@category Hooks
*/
export declare function useFormAction(
/**
* The action to append to the closest route URL.
*/
action?: string, { relative }?: {
relative?: RelativeRoutingType;
}): string;
/**
The return value of `useFetcher` that keeps track of the state of a fetcher.
```tsx
let fetcher = useFetcher();
```
*/
export type FetcherWithComponents<TData> = Fetcher<TData> & {
/**
Just like {@link Form} except it doesn't cause a navigation.
```tsx
function SomeComponent() {
const fetcher = useFetcher()
return (
<fetcher.Form method="post" action="/some/route">
<input type="text" />
</fetcher.Form>
)
}
```
*/
Form: React.ForwardRefExoticComponent<FetcherFormProps & React.RefAttributes<HTMLFormElement>>;
/**
Submits form data to a route. While multiple nested routes can match a URL, only the leaf route will be called.
The `formData` can be multiple types:
- [`FormData`][form_data] - A `FormData` instance.
- [`HTMLFormElement`][html_form_element] - A [`<form>`][form_element] DOM element.
- `Object` - An object of key/value pairs that will be converted to a `FormData` instance by default. You can pass a more complex object and serialize it as JSON by specifying `encType: "application/json"`. See [`useSubmit`][use-submit] for more details.
If the method is `GET`, then the route [`loader`][loader] is being called and with the `formData` serialized to the url as [`URLSearchParams`][url_search_params]. If `DELETE`, `PATCH`, `POST`, or `PUT`, then the route [`action`][action] is being called with `formData` as the body.
```tsx
// Submit a FormData instance (GET request)
const formData = new FormData();
fetcher.submit(formData);
// Submit the HTML form element
fetcher.submit(event.currentTarget.form, {
method: "POST",
});
// Submit key/value JSON as a FormData instance
fetcher.submit(
{ serialized: "values" },
{ method: "POST" }
);
// Submit raw JSON
fetcher.submit(
{
deeply: {
nested: {
json: "values",
},
},
},
{
method: "POST",
encType: "application/json",
}
);
```
*/
submit: FetcherSubmitFunction;
/**
Loads data from a route. Useful for loading data imperatively inside of user events outside of a normal button or form, like a combobox or search input.
```tsx
let fetcher = useFetcher()
<input onChange={e => {
fetcher.load(`/search?q=${e.target.value}`)
}} />
```
*/
load: (href: string, opts?: {
/**
* Wraps the initial state update for this `fetcher.load` in a
* `ReactDOM.flushSync` call instead of the default `React.startTransition`.
* This allows you to perform synchronous DOM actions immediately after the
* update is flushed to the DOM.
*/
unstable_flushSync?: boolean;

@@ -532,11 +833,68 @@ }) => Promise<void>;

/**
* Interacts with route loaders and actions without causing a navigation. Great
* for any interaction that stays on the same page.
Useful for creating complex, dynamic user interfaces that require multiple, concurrent data interactions without causing a navigation.
Fetchers track their own, independent state and can be used to load data, submit forms, and generally interact with loaders and actions.
```tsx
import { useFetcher } from "react-router"
function SomeComponent() {
let fetcher = useFetcher()
// states are available on the fetcher
fetcher.state // "idle" | "loading" | "submitting"
fetcher.data // the data returned from the action or loader
// render a form
<fetcher.Form method="post" />
// load data
fetcher.load("/some/route")
// submit data
fetcher.submit(someFormRef, { method: "post" })
fetcher.submit(someData, {
method: "post",
encType: "application/json"
})
}
```
@category Hooks
*/
export declare function useFetcher<TData = any>({ key, }?: {
/**
By default, `useFetcher` generate a unique fetcher scoped to that component. If you want to identify a fetcher with your own key such that you can access it from elsewhere in your app, you can do that with the `key` option:
```tsx
function SomeComp() {
let fetcher = useFetcher({ key: "my-key" })
// ...
}
// Somewhere else
function AnotherComp() {
// this will be the same fetcher, sharing the state across the app
let fetcher = useFetcher({ key: "my-key" });
// ...
}
```
*/
key?: string;
}): FetcherWithComponents<TData>;
/**
* Provides all fetchers currently on the page. Useful for layouts and parent
* routes that need to provide pending/optimistic UI regarding the fetch.
Returns an array of all in-flight fetchers. This is useful for components throughout the app that didn't create the fetchers but want to use their submissions to participate in optimistic UI.
```tsx
import { useFetchers } from "react-router";
function SomeComponent() {
const fetchers = useFetchers();
fetchers[0].formData; // FormData
fetchers[0].state; // etc.
// ...
}
```
@category Hooks
*/

@@ -555,8 +913,5 @@ export declare function useFetchers(): (Fetcher & {

/**
* Setup a callback to be fired on the window's `beforeunload` event. This is
* useful for saving some data to `window.localStorage` just before the page
* refreshes.
* Setup a callback to be fired on the window's `beforeunload` event.
*
* Note: The `callback` argument should be a function created with
* `React.useCallback()`.
* @category Hooks
*/

@@ -567,8 +922,35 @@ export declare function useBeforeUnload(callback: (event: BeforeUnloadEvent) => any, options?: {

/**
* Wrapper around useBlocker to show a window.confirm prompt to users instead
* of building a custom UI with useBlocker.
*
* Warning: This has *a lot of rough edges* and behaves very differently (and
* very incorrectly in some cases) across browsers if user click addition
* back/forward navigations while the confirm is open. Use at your own risk.
Wrapper around useBlocker to show a window.confirm prompt to users instead of building a custom UI with {@link useBlocker}.
The `unstable_` flag will not be removed because this technique has a lot of rough edges and behaves very differently (and incorrectly sometimes) across browsers if users click addition back/forward navigations while the confirmation is open. Use at your own risk.
```tsx
function ImportantForm() {
let [value, setValue] = React.useState("");
// Block navigating elsewhere when data has been entered into the input
unstable_usePrompt({
message: "Are you sure?",
when: ({ currentLocation, nextLocation }) =>
value !== "" &&
currentLocation.pathname !== nextLocation.pathname,
});
return (
<Form method="post">
<label>
Enter some important data:
<input
name="data"
value={value}
onChange={(e) => setValue(e.target.value)}
/>
</label>
<button type="submit">Save</button>
</Form>
);
}
```
@category Hooks
*/

@@ -581,8 +963,5 @@ declare function usePrompt({ when, message, }: {

/**
* Return a boolean indicating if there is an active view transition to the
* given href. You can use this value to render CSS classes or viewTransitionName
* styles onto your elements
*
* @param href The destination href
* @param [opts.relative] Relative routing type ("route" | "path")
This hook returns `true` when there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) to the specified location. This can be used to apply finer-grained styles to elements to further customize the view transition. This requires that view transitions have been enabled for the given navigation via {@link LinkProps.unstable_viewTransition} (or the `Form`, `submit`, or `navigate` call)
@category Hooks
*/

@@ -589,0 +968,0 @@ declare function useViewTransitionState(to: To, opts?: {

import * as React from "react";
import type { Location, Router as RemixRouter, StaticHandlerContext, CreateStaticHandlerOptions as RouterCreateStaticHandlerOptions, FutureConfig as RouterFutureConfig } from "../router";
import { type FutureConfig } from "../components";
import type { Location, Router as RemixRouter, StaticHandlerContext, CreateStaticHandlerOptions as RouterCreateStaticHandlerOptions } from "../router";
import type { RouteObject } from "../context";

@@ -9,3 +8,2 @@ export interface StaticRouterProps {

location: Partial<Location> | string;
future?: Partial<FutureConfig>;
}

@@ -15,4 +13,6 @@ /**

* on the server where there is no stateful UI.
*
* @category Router Components
*/
export declare function StaticRouter({ basename, children, location: locationProp, future, }: StaticRouterProps): React.JSX.Element;
export declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
export interface StaticRouterProviderProps {

@@ -27,9 +27,15 @@ context: StaticHandlerContext;

* on the server where there is no stateful UI.
*
* @category Router Components
*/
export declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
type CreateStaticHandlerOptions = Omit<RouterCreateStaticHandlerOptions, "detectErrorBoundary" | "mapRouteProperties">;
/**
* @category Utils
*/
export declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): import("../router").StaticHandler;
export declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
future?: Partial<Pick<RouterFutureConfig, "v7_partialHydration" | "v7_relativeSplatPath">>;
}): RemixRouter;
/**
* @category Routers
*/
export declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {}): RemixRouter;
export {};
import * as React from "react";
import "../global";
/**
* @category Router Components
*/
export declare function HydratedRouter(): React.JSX.Element;
import type { FocusEventHandler, MouseEventHandler, TouchEventHandler } from "react";
import * as React from "react";
import type { RemixContextObject } from "./entry";
import type { FrameworkContextObject } from "./entry";
import type { PrefetchPageDescriptor } from "./links";
export type SerializeFrom<D> = D extends () => {} ? Awaited<ReturnType<D>> : D;
export declare const RemixContext: React.Context<RemixContextObject | undefined>;
export declare function useRemixContext(): RemixContextObject;
export declare const FrameworkContext: React.Context<FrameworkContextObject | undefined>;
export declare function useFrameworkContext(): FrameworkContextObject;
/**

@@ -81,15 +81,37 @@ * Defines the prefetching behavior of the link:

export declare function Meta(): React.JSX.Element;
export type ScriptProps = Omit<React.HTMLProps<HTMLScriptElement>, "children" | "async" | "defer" | "src" | "type" | "noModule" | "dangerouslySetInnerHTML" | "suppressHydrationWarning">;
/**
* Renders the `<script>` tags needed for the initial render. Bundles for
* additional routes are loaded later as needed.
*
* @param props Additional properties to add to each script tag that is rendered.
* In addition to scripts, \<link rel="modulepreload"> tags receive the crossOrigin
* property if provided.
*
* @see https://remix.run/components/scripts
A couple common attributes:
- `<Scripts crossOrigin>` for hosting your static assets on a different server than your app.
- `<Scripts nonce>` to support a [content security policy for scripts](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) with [nonce-sources](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources) for your `<script>` tags.
You cannot pass through attributes such as `async`, `defer`, `src`, `type`, `noModule` because they are managed by React Router internally.
@category Types
*/
export declare function Scripts(props: ScriptProps): React.JSX.Element | null;
export type ScriptsProps = Omit<React.HTMLProps<HTMLScriptElement>, "children" | "async" | "defer" | "src" | "type" | "noModule" | "dangerouslySetInnerHTML" | "suppressHydrationWarning">;
/**
Renders the client runtime of your app. It should be rendered inside the `<body>` of the document.
```tsx
import { Scripts } from "react-router";
export default function Root() {
return (
<html>
<head />
<body>
<Scripts />
</body>
</html>
);
}
```
If server rendering, you can omit `<Scripts/>` and the app will work as a traditional web app without JavaScript, relying solely on HTML and browser behaviors.
@category Components
*/
export declare function Scripts(props: ScriptsProps): React.JSX.Element | null;
export declare function mergeRefs<T = any>(...refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T>;
export {};

@@ -5,2 +5,3 @@ import * as React from "react";

location: Location;
isOutsideRemixApp?: boolean;
error?: Error;

@@ -26,10 +27,12 @@ }>;

*/
export declare function RemixRootDefaultErrorBoundary({ error }: {
export declare function RemixRootDefaultErrorBoundary({ error, isOutsideRemixApp, }: {
error: unknown;
isOutsideRemixApp?: boolean;
}): React.JSX.Element;
export declare function BoundaryShell({ title, renderScripts, children, }: {
export declare function BoundaryShell({ title, renderScripts, isOutsideRemixApp, children, }: {
title: string;
renderScripts?: boolean;
isOutsideRemixApp?: boolean;
children: React.ReactNode | React.ReactNode[];
}): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
export {};
import type { ReactElement } from "react";
import type { EntryContext } from "./entry";
export interface RemixServerProps {
export interface ServerRouterProps {
context: EntryContext;

@@ -13,3 +13,5 @@ url: string | URL;

* response from the server.
*
* @category Components
*/
export declare function RemixServer({ context, url, abortDelay, nonce, }: RemixServerProps): ReactElement;
export declare function ServerRouter({ context, url, abortDelay, nonce, }: ServerRouterProps): ReactElement;

@@ -6,6 +6,14 @@ import * as React from "react";

/**
* Returns the full href for the given "to" value. This is useful for building
* custom links that are also accessible and preserve right-click behavior.
*
* @category Hooks
Resolves a URL against the current location.
```tsx
import { useHref } from "react-router"
function SomeComponent() {
let href = useHref("some/where");
// "/resolved/some/where"
}
```
@category Hooks
*/

@@ -16,3 +24,4 @@ export declare function useHref(to: To, { relative }?: {

/**
* Returns true if this component is a descendant of a `<Router>`.
* Returns true if this component is a descendant of a Router, useful to ensure
* a component is used within a Router.
*

@@ -23,10 +32,23 @@ * @category Hooks

/**
* Returns the current location object, which represents the current URL in web
* browsers.
*
* Note: If you're using this it may mean you're doing some of your own
* "routing" in your app, and we'd like to know what your use case is. We may
* be able to provide something higher-level to better suit your needs.
*
* @category Hooks
Returns the current {@link Location}. This can be useful if you'd like to perform some side effect whenever it changes.
```tsx
import * as React from 'react'
import { useLocation } from 'react-router'
function SomeComponent() {
let location = useLocation()
React.useEffect(() => {
// Google Analytics
ga('send', 'pageview')
}, [location]);
return (
// ...
);
}
```
@category Hooks
*/

@@ -51,4 +73,2 @@ export declare function useLocation(): Location;

* The interface for the navigate() function returned from useNavigate().
*
* @category Types
*/

@@ -60,11 +80,26 @@ export interface NavigateFunction {

/**
* Returns an imperative method for changing the location. Used by `<Link>`s, but
* may also be used by other elements to change the location.
*
* @category Hooks
Returns a function that lets you navigate programmatically in the browser in response to user interactions or effects.
```tsx
import { useNavigate } from "react-router";
function SomeComponent() {
let navigate = useNavigate();
return (
<button
onClick={() => {
navigate(-1);
}}
/>
);
}
```
It's often better to use {@link redirect} in {@link ActionFunction | actions} and {@link LoaderFunction | loaders} than this hook.
@category Hooks
*/
export declare function useNavigate(): NavigateFunction;
/**
* Returns the context (if provided) for the child route at this level of the route
* hierarchy.
* Returns the parent route {@link OutletProps.context | `<Outlet context>`}.
*

@@ -82,6 +117,16 @@ * @category Hooks

/**
* Returns an object of key/value pairs of the dynamic params from the current
* URL that were matched by the route path.
*
* @category Hooks
Returns an object of key/value pairs of the dynamic params from the current URL that were matched by the routes. Child routes inherit all params from their parent routes.
```tsx
import { useParams } from "react-router"
function SomeComponent() {
let params = useParams()
params.postId
}
```
Assuming a route pattern like `/posts/:postId` is matched by `/posts/123` then `params.postId` will be `"123"`.
@category Hooks
*/

@@ -92,5 +137,17 @@ export declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[

/**
* Resolves the pathname of the given `to` value against the current location.
*
* @category Hooks
Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
```tsx
import { useResolvedPath } from "react-router"
function SomeComponent() {
// if the user is at /dashboard/profile
let path = useResolvedPath("../accounts")
path.pathname // "/dashboard/accounts"
path.search // ""
path.hash // ""
}
```
@category Hooks
*/

@@ -101,8 +158,31 @@ export declare function useResolvedPath(to: To, { relative }?: {

/**
* Returns the element of the route that matched the current location, prepared
* with the correct context to render the remainder of the route tree. Route
* elements in the tree must render an `<Outlet>` to render their child route's
* element.
*
* @category Hooks
Hook version of {@link Routes | `<Routes>`} that uses objects instead of components. These objects have the same properties as the component props.
The return value of `useRoutes` is either a valid React element you can use to render the route tree, or `null` if nothing matched.
```tsx
import * as React from "react";
import { useRoutes } from "react-router";
function App() {
let element = useRoutes([
{
path: "/",
element: <Dashboard />,
children: [
{
path: "messages",
element: <DashboardMessages />,
},
{ path: "tasks", element: <DashboardTasks /> },
],
},
{ path: "team", element: <AboutPage /> },
]);
return element;
}
```
@category Hooks
*/

@@ -148,13 +228,42 @@ export declare function useRoutes(routes: RouteObject[], locationArg?: Partial<Location> | string): React.ReactElement | null;

/**
* Returns the current navigation, defaulting to an "idle" navigation when
* no navigation is in progress
*
* @category Hooks
Returns the current navigation, defaulting to an "idle" navigation when no navigation is in progress. You can use this to render pending UI (like a global spinner) or read FormData from a form navigation.
```tsx
import { useNavigation } from "react-router"
function SomeComponent() {
let navigation = useNavigation();
navigation.state
navigation.formData
// etc.
}
```
@category Hooks
*/
export declare function useNavigation(): import("./router").Navigation;
/**
* Returns a revalidate function for manually triggering revalidation, as well
* as the current state of any manual revalidations
*
* @category Hooks
Revalidate the data on the page for reasons outside of normal data mutations like window focus or polling on an interval.
```tsx
import { useRevalidator } from "react-router";
function WindowFocusRevalidator() {
const revalidator = useRevalidator();
useFakeWindowFocus(() => {
revalidator.revalidate();
});
return (
<div hidden={revalidator.state === "idle"}>
Revalidating...
</div>
);
}
```
Note that page data is already revalidated automatically after actions. If you find yourself using this for normal CRUD operations on your data in response to user interactions, you're probably not taking advantage of the other APIs like {@link useFetcher}, {@link Form}, {@link useSubmit} that do this automatically.
@category Hooks
*/

@@ -173,37 +282,126 @@ export declare function useRevalidator(): {

/**
* Returns the loader data for the nearest ancestor Route loader
*
* @category Hooks
Returns the data from the closest route {@link LoaderFunction | loader} or {@link ClientLoaderFunction | client loader}.
```tsx
import { useLoaderData } from "react-router"
export async function loader() {
return await fakeDb.invoices.findAll();
}
export default function Invoices() {
let invoices = useLoaderData<typeof loader>();
// ...
}
```
@category Hooks
*/
export declare function useLoaderData(): unknown;
/**
* Returns the loaderData for the given routeId
*
* @category Hooks
Returns the loader data for a given route by route ID.
```tsx
import { useRouteLoaderData } from "react-router";
function SomeComponent() {
const { user } = useRouteLoaderData("root");
}
```
Route IDs are created automatically. They are simply the path of the route file relative to the app folder without the extension.
| Route Filename | Route ID |
| -------------------------- | -------------------- |
| `app/root.tsx` | `"root"` |
| `app/routes/teams.tsx` | `"routes/teams"` |
| `app/whatever/teams.$id.tsx` | `"whatever/teams.$id"` |
If you created an ID manually, you can use that instead:
```tsx
route("/", "containers/app.tsx", { id: "app" }})
```
@category Hooks
*/
export declare function useRouteLoaderData(routeId: string): unknown;
/**
* Returns the action data for the nearest ancestor Route action
*
* @category Hooks
Returns the action data from the most recent POST navigation form submission or `undefined` if there hasn't been one.
```tsx
import { Form, useActionData } from "react-router"
export async function action({ request }) {
const body = await request.formData()
const name = body.get("visitorsName")
return { message: `Hello, ${name}` }
}
export default function Invoices() {
const data = useActionData()
return (
<Form method="post">
<input type="text" name="visitorsName" />
{data ? data.message : "Waiting..."}
</Form>
)
}
```
@category Hooks
*/
export declare function useActionData(): unknown;
/**
* Returns the nearest ancestor Route error, which could be a loader/action
* error or a render error. This is intended to be called from your
* ErrorBoundary/errorElement to display a proper error message.
*
* @category Hooks
Accesses the error thrown during an {@link ActionFunction | action}, {@link LoaderFunction | loader}, or component render to be used in a route module Error Boundary.
```tsx
export function ErrorBoundary() {
const error = useRouteError();
return <div>{error.message}</div>;
}
```
@category Hooks
*/
export declare function useRouteError(): unknown;
/**
* Returns the happy-path data from the nearest ancestor `<Await />` value
*
* @category Hooks
Returns the resolved promise value from the closest {@link Await | `<Await>`}.
```tsx
function SomeDescendant() {
const value = useAsyncValue();
// ...
}
// somewhere in your app
<Await resolve={somePromise}>
<SomeDescendant />
</Await>
```
@category Hooks
*/
export declare function useAsyncValue(): unknown;
/**
* Returns the error from the nearest ancestor `<Await />` value
*
* @category Hooks
Returns the rejection value from the closest {@link Await | `<Await>`}.
```tsx
import { Await, useAsyncError } from "react-router"
function ErrorElement() {
const error = useAsyncError();
return (
<p>Uh Oh, something went wrong! {error.message}</p>
);
}
// somewhere in your app
<Await
resolve={promiseThatRejects}
errorElement={<ErrorElement />}
/>
```
@category Hooks
*/

@@ -210,0 +408,0 @@ export declare function useAsyncError(): unknown;

@@ -238,2 +238,4 @@ /**

* Creates a string URL path from the given pathname, search, and hash components.
*
* @category Utils
*/

@@ -243,2 +245,4 @@ export declare function createPath({ pathname, search, hash, }: Partial<Path>): string;

* Parses a string URL path into its separate pathname, search, and hash components.
*
* @category Utils
*/

@@ -245,0 +249,0 @@ export declare function parsePath(path: string): Partial<Path>;

@@ -1,2 +0,2 @@

export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, DataStrategyFunction as unstable_DataStrategyFunction, DataStrategyFunctionArgs as unstable_DataStrategyFunctionArgs, DataStrategyMatch as unstable_DataStrategyMatch, ErrorResponse, FormEncType, FormMethod, HandlerResult as unstable_HandlerResult, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, TrackedPromise, UIMatch, V7_FormMethod, } from "./utils";
export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, DataStrategyFunction as unstable_DataStrategyFunction, DataStrategyFunctionArgs as unstable_DataStrategyFunctionArgs, DataStrategyMatch as unstable_DataStrategyMatch, ErrorResponse, FormEncType, FormMethod, HandlerResult as unstable_HandlerResult, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, LowerCaseFormMethod, ParamParseKey, Params, AgnosticPatchRoutesOnMissFunction as unstable_AgnosticPatchRoutesOnMissFunction, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, Submission, TrackedPromise, UIMatch, UpperCaseFormMethod, } from "./utils";
export { AbortedDeferredError, defer, generatePath, getToPathname, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, redirectDocument, resolvePath, resolveTo, stripBasename, } from "./utils";

@@ -8,3 +8,3 @@ export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } from "./history";

export type { RouteManifest as UNSAFE_RouteManifest } from "./utils";
export { DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, getResolveToMatches as UNSAFE_getResolveToMatches, } from "./utils";
export { DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, } from "./utils";
export { invariant as UNSAFE_invariant, warning as UNSAFE_warning, } from "./history";
import type { History, Location, Path, To } from "./history";
import { Action as HistoryAction } from "./history";
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DataStrategyFunction, DeferredData, DetectErrorBoundaryFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch } from "./utils";
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DataStrategyFunction, DeferredData, DetectErrorBoundaryFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch, AgnosticPatchRoutesOnMissFunction } from "./utils";
/**

@@ -9,3 +9,3 @@ * A Router instance manages all navigation and data loading/mutations

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -17,3 +17,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -25,3 +25,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -33,3 +33,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -41,3 +41,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -49,3 +49,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -59,3 +59,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -69,3 +69,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -82,3 +82,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -97,3 +97,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -110,3 +110,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -118,3 +118,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -127,3 +127,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -137,3 +137,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -146,3 +146,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -155,3 +155,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -163,3 +163,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -173,3 +173,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -182,3 +182,12 @@ *

/**
* @internal
* @private
* PRIVATE DO NOT USE
*
* Patch additional children routes into an existing parent route
* @param routeId The parent route id
* @param children The additional children routes
*/
patchRoutes(routeId: string | null, children: AgnosticRouteObject[]): void;
/**
* @private
* PRIVATE - DO NOT USE

@@ -191,3 +200,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -199,3 +208,3 @@ *

/**
* @internal
* @private
* PRIVATE - DO NOT USE

@@ -278,6 +287,2 @@ *

v7_fetcherPersist: boolean;
v7_normalizeFormMethod: boolean;
v7_partialHydration: boolean;
v7_prependBasename: boolean;
v7_relativeSplatPath: boolean;
unstable_skipActionErrorRevalidation: boolean;

@@ -300,2 +305,3 @@ }

window?: Window;
unstable_patchRoutesOnMiss?: AgnosticPatchRoutesOnMissFunction;
unstable_dataStrategy?: DataStrategyFunction;

@@ -363,4 +369,4 @@ }

/**
* - "route": relative to the route hierarchy
* - "path": relative to the pathname
- "route": relative to the route hierarchy so `..` means remove all segments of the current route even if it has many. For example, a `route("posts/:id")` would have both `:id` and `posts` removed from the url.
- "path": relative to the pathname so `..` means remove one segment of the pathname. For example, a `route("posts/:id")` would have only `:id` removed from the url.
*/

@@ -453,3 +459,10 @@ export type RelativeRoutingType = "route" | "path";

*/
type FetcherStates<TData = any> = {
export type FetcherStates<TData = any> = {
/**
* The fetcher is not calling a loader or action
*
* ```tsx
* fetcher.state === "idle"
* ```
*/
Idle: {

@@ -463,4 +476,19 @@ state: "idle";

json: undefined;
/**
* If the fetcher has never been called, this will be undefined.
*/
data: TData | undefined;
};
/**
* The fetcher is loading data from a {@link LoaderFunction | loader} from a
* call to {@link FetcherWithComponents.load | `fetcher.load`}.
*
* ```tsx
* // somewhere
* <button onClick={() => fetcher.load("/some/route") }>Load</button>
*
* // the state will update
* fetcher.state === "loading"
* ```
*/
Loading: {

@@ -476,2 +504,20 @@ state: "loading";

};
/**
The fetcher is submitting to a {@link LoaderFunction} (GET) or {@link ActionFunction} (POST) from a {@link FetcherWithComponents.Form | `fetcher.Form`} or {@link FetcherWithComponents.submit | `fetcher.submit`}.
```tsx
// somewhere
<input
onChange={e => {
fetcher.submit(event.currentTarget.form, { method: "post" });
}}
/>
// the state will update
fetcher.state === "submitting"
// and formData will be available
fetcher.formData
```
*/
Submitting: {

@@ -521,9 +567,2 @@ state: "submitting";

export declare const UNSAFE_DEFERRED_SYMBOL: unique symbol;
/**
* Future flags to toggle new feature behavior
*/
export interface StaticHandlerFutureConfig {
v7_relativeSplatPath: boolean;
v7_throwAbortReason: boolean;
}
export interface CreateStaticHandlerOptions {

@@ -536,3 +575,3 @@ basename?: string;

mapRouteProperties?: MapRoutePropertiesFunction;
future?: Partial<StaticHandlerFutureConfig>;
future?: {};
}

@@ -543,2 +582,4 @@ export declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;

* provide an updated StaticHandlerContext suitable for a second SSR render
*
* @category Utils
*/

@@ -545,0 +586,0 @@ export declare function getStaticContextFromError(routes: AgnosticDataRouteObject[], context: StaticHandlerContext, error: any): StaticHandlerContext;

@@ -60,4 +60,4 @@ import type { Location, Path, To } from "./history";

}
type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
export type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
export type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
/**

@@ -69,13 +69,7 @@ * Users can specify either lowercase or uppercase form methods on `<Form>`,

/**
* Active navigation/fetcher form methods are exposed in lowercase on the
* RouterState
* Active navigation/fetcher form methods are exposed in uppercase on the
* RouterState. This is to align with the normalization done via fetch().
*/
export type FormMethod = LowerCaseFormMethod;
export type MutationFormMethod = Exclude<FormMethod, "get">;
/**
* In v7, active navigation/fetcher form methods are exposed in uppercase on the
* RouterState. This is to align with the normalization done via fetch().
*/
export type V7_FormMethod = UpperCaseFormMethod;
export type V7_MutationFormMethod = Exclude<V7_FormMethod, "GET">;
export type FormMethod = UpperCaseFormMethod;
export type MutationFormMethod = Exclude<FormMethod, "GET">;
export type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";

@@ -96,3 +90,3 @@ type JsonObject = {

export type Submission = {
formMethod: FormMethod | V7_FormMethod;
formMethod: FormMethod;
formAction: string;

@@ -104,3 +98,3 @@ formEncType: FormEncType;

} | {
formMethod: FormMethod | V7_FormMethod;
formMethod: FormMethod;
formAction: string;

@@ -112,3 +106,3 @@ formEncType: FormEncType;

} | {
formMethod: FormMethod | V7_FormMethod;
formMethod: FormMethod;
formAction: string;

@@ -208,2 +202,9 @@ formEncType: FormEncType;

}
export interface AgnosticPatchRoutesOnMissFunction<M extends AgnosticRouteMatch = AgnosticRouteMatch> {
(opts: {
path: string;
matches: M[];
patch: (routeId: string | null, children: AgnosticRouteObject[]) => void;
}): void | Promise<void>;
}
/**

@@ -323,9 +324,10 @@ * Function provided by the framework-aware layers to set any framework-specific

}
export declare function convertRoutesToDataRoutes(routes: AgnosticRouteObject[], mapRouteProperties: MapRoutePropertiesFunction, parentPath?: number[], manifest?: RouteManifest): AgnosticDataRouteObject[];
export declare function convertRoutesToDataRoutes(routes: AgnosticRouteObject[], mapRouteProperties: MapRoutePropertiesFunction, parentPath?: string[], manifest?: RouteManifest): AgnosticDataRouteObject[];
/**
* Matches the given routes to a location and returns the match data.
*
* @see https://reactrouter.com/utils/match-routes
* @category Utils
*/
export declare function matchRoutes<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename?: string): AgnosticRouteMatch<string, RouteObjectType>[] | null;
export declare function matchRoutesImpl<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename: string, allowPartial: boolean): AgnosticRouteMatch<string, RouteObjectType>[] | null;
export interface UIMatch<Data = unknown, Handle = unknown> {

@@ -342,3 +344,3 @@ id: string;

*
* @see https://reactrouter.com/utils/generate-path
* @category Utils
*/

@@ -393,3 +395,3 @@ export declare function generatePath<Path extends string>(originalPath: Path, params?: {

*
* @see https://reactrouter.com/utils/match-path
* @category Utils
*/

@@ -404,3 +406,3 @@ export declare function matchPath<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamKey> | null;

*
* @see https://reactrouter.com/utils/resolve-path
* @category Utils
*/

@@ -432,3 +434,3 @@ export declare function resolvePath(to: To, fromPathname?: string): Path;

export declare function getPathContributingMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[]): T[];
export declare function getResolveToMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[], v7_relativeSplatPath: boolean): string[];
export declare function getResolveToMatches<T extends AgnosticRouteMatch = AgnosticRouteMatch>(matches: T[]): string[];
/**

@@ -462,2 +464,4 @@ * @private

* to JSON and sets the `Content-Type` header.
*
* @category Utils
*/

@@ -493,2 +497,5 @@ export declare const json: JsonFunction;

export type DeferFunction = (data: Record<string, unknown>, init?: number | ResponseInit) => DeferredData;
/**
* @category Utils
*/
export declare const defer: DeferFunction;

@@ -499,2 +506,4 @@ export type RedirectFunction = (url: string, init?: number | ResponseInit) => Response;

* Defaults to "302 Found".
*
* @category Utils
*/

@@ -506,2 +515,4 @@ export declare const redirect: RedirectFunction;

* Defaults to "302 Found".
*
* @category Utils
*/

@@ -533,4 +544,6 @@ export declare const redirectDocument: RedirectFunction;

* Response thrown from an action/loader
*
* @category Utils
*/
export declare function isRouteErrorResponse(error: any): error is ErrorResponse;
export {};
/**
* React Router v0.0.0-nightly-bb58afdfd-20240520
* React Router v0.0.0-nightly-c846a2e1e-20240627
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

{
"name": "react-router",
"version": "0.0.0-nightly-bb58afdfd-20240520",
"version": "0.0.0-nightly-c846a2e1e-20240627",
"description": "Declarative routing for React",

@@ -26,3 +26,8 @@ "keywords": [

"dependencies": {
"turbo-stream": "^2.0.0"
"@types/cookie": "^0.6.0",
"@web3-storage/multipart-parser": "^1.0.0",
"cookie": "^0.6.0",
"source-map": "^0.7.3",
"turbo-stream": "^2.2.0",
"react-router": "0.0.0-nightly-c846a2e1e-20240627"
},

@@ -34,4 +39,4 @@ "devDependencies": {

"peerDependencies": {
"react": ">=16.8",
"react-dom": ">=16.8"
"react": ">=18",
"react-dom": ">=18"
},

@@ -50,4 +55,4 @@ "peerDependenciesMeta": {

"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc