import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as RouteModules, c as StaticHandlerContext, H as HydrationState, D as DataRouteObject, C as ClientLoaderFunction, d as Router$1, e as DataStrategyFunction, T as To, N as NavigateOptions, B as BlockerFunction, f as Blocker, g as SerializeFrom, h as RelativeRoutingType, i as Location, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, U as UIMatch, m as Navigation, n as Action, o as Params, p as RouteObject, I as IndexRouteObject, q as LazyRouteFunction, r as NonIndexRouteObject, s as RouterInit, F as FutureConfig$1, t as InitialEntry, v as PatchRoutesOnNavigationFunction, w as Navigator, x as RouteMatch, y as HTMLFormMethod, z as FormEncType, E as PageLinkDescriptor, G as History, J as GetScrollRestorationKeyFunction, K as Fetcher, O as CreateStaticHandlerOptions$1, Q as StaticHandler, V as LoaderFunction, W as ActionFunction, X as MetaFunction, Y as LinksFunction, Z as unstable_InitialContext, _ as Pages, $ as Equal, a0 as RouterState } from './register-COAKzST_.js'; export { aA as ClientActionFunction, aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, ay as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, ac as FormMethod, aJ as Future, a1 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ao as IDLE_BLOCKER, an as IDLE_FETCHER, am as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a2 as NavigationStates, az as PatchRoutesOnNavigationFunctionArgs, ae as PathParam, af as RedirectFunction, aL as Register, a6 as RevalidationState, a5 as RouterFetchOptions, a4 as RouterNavigateOptions, a3 as RouterSubscriber, ah as ShouldRevalidateFunction, ai as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, ak as createPath, ap as data, aq as generatePath, ar as isRouteErrorResponse, as as matchPath, at as matchRoutes, al as parsePath, au as redirect, av as redirectDocument, aw as replace, ax as resolvePath, ad as unstable_MiddlewareFunction, ag as unstable_RouterContext, aK as unstable_SerializesTo, aj as unstable_createContext } from './register-COAKzST_.js'; import * as React from 'react'; import { ReactElement } from 'react'; import { ParseOptions, SerializeOptions } from 'cookie'; export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie'; type ServerRouteManifest = RouteManifest>; interface ServerRoute extends Route$1 { children: ServerRoute[]; module: ServerRouteModule; } type OptionalCriticalCss = CriticalCss | undefined; /** * The output of the compiler for the server build. */ interface ServerBuild { entry: { module: ServerEntryModule; }; routes: ServerRouteManifest; assets: AssetsManifest; basename?: string; publicPath: string; assetsBuildDirectory: string; future: FutureConfig; ssr: boolean; unstable_getCriticalCss?: (args: { pathname: string; }) => OptionalCriticalCss | Promise; /** * @deprecated This is now done via a custom header during prerendering */ isSpaMode: boolean; prerender: string[]; routeDiscovery: { mode: "lazy" | "initial"; manifestPath: string; }; } interface HandleDocumentRequestFunction { (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext): Promise | Response; } interface HandleDataRequestFunction { (response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise | Response; } interface HandleErrorFunction { (error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void; } /** * A module that serves as the entry point for a Remix app during server * rendering. */ interface ServerEntryModule { default: HandleDocumentRequestFunction; handleDataRequest?: HandleDataRequestFunction; handleError?: HandleErrorFunction; streamTimeout?: number; } type SerializedError = { message: string; stack?: string; }; interface FrameworkContextObject { manifest: AssetsManifest; routeModules: RouteModules; criticalCss?: CriticalCss; serverHandoffString?: string; future: FutureConfig; ssr: boolean; isSpaMode: boolean; routeDiscovery: ServerBuild["routeDiscovery"]; serializeError?(error: Error): SerializedError; renderMeta?: { didRenderScripts?: boolean; streamCache?: Record & { result?: { done: boolean; value: string; }; error?: unknown; }>; }; } interface EntryContext extends FrameworkContextObject { staticHandlerContext: StaticHandlerContext; serverHandoffStream?: ReadableStream; } interface FutureConfig { unstable_subResourceIntegrity: boolean; unstable_middleware: boolean; } type CriticalCss = string | { rel: "stylesheet"; href: string; }; interface AssetsManifest { entry: { imports: string[]; module: string; }; routes: RouteManifest; url: string; version: string; hmr?: { timestamp?: number; runtime: string; }; sri?: Record | true; } interface Route$1 { index?: boolean; caseSensitive?: boolean; id: string; parentId?: string; path?: string; } interface EntryRoute extends Route$1 { hasAction: boolean; hasLoader: boolean; hasClientAction: boolean; hasClientLoader: boolean; hasClientMiddleware: boolean; hasErrorBoundary: boolean; imports?: string[]; css?: string[]; module: string; clientActionModule: string | undefined; clientLoaderModule: string | undefined; clientMiddlewareModule: string | undefined; hydrateFallbackModule: string | undefined; parentId?: string; } declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set, manifest: RouteManifest, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[]; declare function createClientRoutes(manifest: RouteManifest, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record[]>, needsRevalidation?: Set): DataRouteObject[]; declare function shouldHydrateRouteLoader(routeId: string, clientLoader: ClientLoaderFunction | undefined, hasLoader: boolean, isSpaMode: boolean): boolean; declare const SingleFetchRedirectSymbol: unique symbol; declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router$1, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction; declare function decodeViaTurboStream(body: ReadableStream, global: Window | typeof globalThis): Promise<{ done: Promise; value: unknown; }>; /** * The mode to use when running the server. */ declare enum ServerMode { Development = "development", Production = "production", Test = "test" } /** 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 */ declare function useHref(to: To, { relative }?: { relative?: RelativeRoutingType; }): string; /** * Returns true if this component is a descendant of a Router, useful to ensure * a component is used within a Router. * * @category Hooks */ declare function useInRouterContext(): boolean; /** 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 */ declare function useLocation(): Location; /** * Returns the current navigation action which describes how the router came to * the current location, either by a pop, push, or replace on the history stack. * * @category Hooks */ declare function useNavigationType(): Action; /** * Returns a PathMatch object if the given pattern matches the current URL. * This is useful for components that need to know "active" state, e.g. * ``. * * @category Hooks */ declare function useMatch, Path extends string>(pattern: PathPattern | Path): PathMatch | null; /** * The interface for the navigate() function returned from useNavigate(). */ interface NavigateFunction { (to: To, options?: NavigateOptions): void | Promise; (delta: number): void | Promise; } /** 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 (