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-058b57f14-20240621 to 0.0.0-nightly-05a94eca8-20240625

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 @@

35

dist/index.d.ts
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, RoutesProps } from "./lib/components";
import type { AwaitProps, FutureConfig, 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";

@@ -12,3 +12,3 @@ import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } 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, 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, };
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, 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, };

@@ -27,2 +27,3 @@ export type { AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, HydrationState, InitialEntry, LowerCaseFormMethod, StaticHandler, TrackedPromise, FetcherStates, UpperCaseFormMethod, UNSAFE_DeferredData, } from "./lib/router";

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";

@@ -35,10 +36,36 @@ export type { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, MetaArgs, MetaDescriptor, MetaFunction, LinksFunction, } from "./lib/dom/ssr/routeModules";

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 */

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

7

dist/lib/components.d.ts

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

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";

@@ -15,2 +15,4 @@ import * as React from "react";

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

@@ -26,2 +28,3 @@ * @category Routers

unstable_dataStrategy?: unstable_DataStrategyFunction;
unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
}): RemixRouter;

@@ -93,3 +96,3 @@ /**

```
@category Components

@@ -96,0 +99,0 @@ */

@@ -48,3 +48,6 @@ import type { FormEncType, HTMLFormMethod, RelativeRoutingType } from "../router";

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

@@ -66,10 +69,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

@@ -85,17 +105,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

@@ -102,0 +115,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 { SubmitOptions, URLSearchParamsInit, SubmitTarget, FetcherSubmitOptions } from "./dom";
import type { PrefetchBehavior, ScriptsProps } from "./ssr/components";
import type { FutureConfig, FutureConfig as RenderFutureConfig } from "../components";
import type { FutureConfig, FutureConfig as RenderFutureConfig, unstable_PatchRoutesOnMissFunction } from "../components";
import type { RouteObject, NavigateOptions } from "../context";

@@ -13,2 +13,3 @@ interface DOMRouterOpts {

unstable_dataStrategy?: unstable_DataStrategyFunction;
unstable_patchRoutesOnMiss?: unstable_PatchRoutesOnMissFunction;
window?: Window;

@@ -382,3 +383,6 @@ }

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> {
/**

@@ -418,5 +422,12 @@ * The HTTP verb to use when the form is submitted. Supports "get", "post",

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

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

*/
target: SubmitTarget, options?: Omit<SubmitOptions, "replace" | "state">): Promise<void>;
target: SubmitTarget, options?: FetcherSubmitOptions): Promise<void>;
}

@@ -680,0 +691,0 @@ /**

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;
/**

@@ -9,0 +9,0 @@ * Defines the prefetching behavior of the link:

import type { ReactNode } from "react";
import type { MetaDescriptor, MetaMatch as _MetaMatch } from "../dom/ssr/routeModules";
import type { LinkDescriptor } from "../dom/ssr/links";
import type { AppLoadContext } from "../server-runtime/data";
import type { Location } from "./history";
import type { UIMatch } from "./utils";
interface Context {
}
type MaybePromise<T> = T | Promise<T>;

@@ -21,3 +20,3 @@ type Pretty<T> = {

type LoaderArgs<Param extends string> = {
context: Context;
context: AppLoadContext;
request: Request;

@@ -28,3 +27,3 @@ params: Params<Param>;

type ActionArgs<Param extends string> = {
context: Context;
context: AppLoadContext;
request: Request;

@@ -41,5 +40,5 @@ params: Params<Param>;

}>;
type IsDefined<T> = undefined extends T ? false : true;
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
type _LoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HydrateFallback> = Awaited<[
IsDefined<HydrateFallback>,
undefined extends HydrateFallback ? false : true,
ClientLoaderHydrate

@@ -49,3 +48,3 @@ ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [

IsDefined<ServerLoaderData>
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? IsDefined<ClientLoaderHydrate> extends true ? ClientLoaderData : ClientLoaderData | undefined : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined>;
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderHydrate extends true ? ClientLoaderData : ClientLoaderData | undefined : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined>;
type LoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HydrateFallback> = _LoaderData<Awaited<ServerLoaderData>, Awaited<ClientLoaderData>, ClientLoaderHydrate, HydrateFallback>;

@@ -59,3 +58,3 @@ type ActionData<ServerActionData, ClientActionData> = Awaited<[

}) => ReactNode;
type Route<Param extends string, ServerLoaderData extends Data | undefined, ClientLoaderData extends Data | undefined, ClientLoaderHydrate extends boolean, HydrateFallback extends HydrateFallbackComponent<Param> | undefined, ServerActionData extends Data | undefined, ClientActionData extends Data | undefined> = {
type Route<Param extends string, ClientLoaderHydrate extends boolean, HydrateFallback extends HydrateFallbackComponent<Param> | undefined, ServerLoaderData extends Data | undefined, ClientLoaderData, ServerActionData extends Data | undefined, ClientActionData> = {
params?: Param[];

@@ -95,4 +94,4 @@ links?: (args: {

};
export declare function defineRoute<const Param extends string, ServerLoaderData extends Data | undefined, ClientLoaderData extends Data | undefined, ClientLoaderHydrate extends boolean, HydrateFallback extends HydrateFallbackComponent<Param> | undefined, ServerActionData extends Data | undefined, ClientActionData extends Data | undefined, T>(route: T & Route<Param, ServerLoaderData, ClientLoaderData, ClientLoaderHydrate, HydrateFallback, ServerActionData, ClientActionData>): T;
export declare function defineRootRoute<const Param extends string, ServerLoaderData extends Data | undefined, ClientLoaderData extends Data | undefined, ClientLoaderHydrate extends boolean, HydrateFallback extends HydrateFallbackComponent<Param> | undefined, ServerActionData extends Data | undefined, ClientActionData extends Data | undefined, T>(route: T & Route<Param, ServerLoaderData, ClientLoaderData, ClientLoaderHydrate, HydrateFallback, ServerActionData, ClientActionData> & {
export declare function defineRoute<T, const Param extends string, ClientLoaderHydrate extends boolean, HydrateFallback extends HydrateFallbackComponent<Param> | undefined, ServerLoaderData extends Data | undefined = undefined, ClientLoaderData = undefined, ServerActionData extends Data | undefined = undefined, ClientActionData = undefined>(route: T & Route<Param, ClientLoaderHydrate, HydrateFallback, ServerLoaderData, ClientLoaderData, ServerActionData, ClientActionData>): T;
export declare function defineRootRoute<T, const Param extends string, ClientLoaderHydrate extends boolean, HydrateFallback extends HydrateFallbackComponent<Param> | undefined, ServerLoaderData extends Data | undefined = undefined, ClientLoaderData = undefined, ServerActionData extends Data | undefined = undefined, ClientActionData = undefined>(route: T & Route<Param, ClientLoaderHydrate, HydrateFallback, ServerLoaderData, ClientLoaderData, ServerActionData, ClientActionData> & {
Layout: (args: {

@@ -105,5 +104,6 @@ params: Params<Param>;

}): T;
type LoaderDataFromRoute<R> = R extends Route<any, infer ServerLoaderData, infer ClientLoaderData, infer ClientLoaderHydrate, infer HydrateFallback, any, any> ? LoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate, HydrateFallback> : never;
type LoaderDataFromRoute<R> = R extends Route<any, infer ClientLoaderHydrate, infer HydrateFallback, infer ServerLoaderData, infer ClientLoaderData, any, any> ? LoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate, HydrateFallback> : never;
export type MetaMatch<R extends Route<any, any, any, any, any, any, any>> = _MetaMatch<string, LoaderDataFromRoute<R>>;
export type Match<R extends Route<any, any, any, any, any, any, any>> = Pretty<UIMatch<LoaderDataFromRoute<R>>>;
type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
export {};

@@ -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, LowerCaseFormMethod, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, Submission, TrackedPromise, UIMatch, UpperCaseFormMethod, 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, V7_FormMethod, } from "./utils";
export { AbortedDeferredError, defer, generatePath, getToPathname, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, redirectDocument, resolvePath, resolveTo, stripBasename, } from "./utils";

@@ -3,0 +3,0 @@ export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } 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";
/**

@@ -165,2 +165,11 @@ * A Router instance manages all navigation and data loading/mutations

* @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

@@ -279,2 +288,3 @@ *

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

@@ -281,0 +291,0 @@ }

@@ -203,2 +203,9 @@ import type { Location, Path, To } from "./history";

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

@@ -318,3 +325,3 @@ * 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[];
/**

@@ -326,2 +333,3 @@ * Matches the given routes to a location and returns the match data.

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> {

@@ -328,0 +336,0 @@ id: string;

/**
* React Router v0.0.0-nightly-058b57f14-20240621
* React Router v0.0.0-nightly-05a94eca8-20240625
*

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

{
"name": "react-router",
"version": "0.0.0-nightly-058b57f14-20240621",
"version": "0.0.0-nightly-05a94eca8-20240625",
"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.0.0",
"react-router": "0.0.0-nightly-05a94eca8-20240625"
},

@@ -29,0 +34,0 @@ "devDependencies": {

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