Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-router

Package Overview
Dependencies
Maintainers
3
Versions
610
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 0.0.0-nightly-854031618-20240819 to 0.0.0-nightly-8b31f25af-20240926

dist/lib/router/links.d.ts

33

dist/index.d.ts
export type { InitialEntry, Location, Path, To } from "./lib/router/history";
export type { HydrationState, StaticHandler, GetScrollPositionFunction, GetScrollRestorationKeyFunction, StaticHandlerContext, Fetcher, Navigation, NavigationStates, RelativeRoutingType, Blocker, BlockerFunction, Router as RemixRouter, RouterState, RouterInit, RouterSubscriber, RouterNavigateOptions, RouterFetchOptions, RevalidationState, } from "./lib/router/router";
export type { ActionFunction, ActionFunctionArgs, DataStrategyFunction as unstable_DataStrategyFunction, DataStrategyFunctionArgs as unstable_DataStrategyFunctionArgs, DataStrategyMatch as unstable_DataStrategyMatch, DataWithResponseInit as UNSAFE_DataWithResponseInit, ErrorResponse, FormEncType, FormMethod, HandlerResult as unstable_HandlerResult, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, UIMatch, } from "./lib/router/utils";
export type { ActionFunction, ActionFunctionArgs, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, DataWithResponseInit as UNSAFE_DataWithResponseInit, ErrorResponse, FormEncType, FormMethod, HTMLFormMethod, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathParam, PathPattern, RedirectFunction, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, UIMatch, } from "./lib/router/utils";
export { Action as NavigationType, createPath, parsePath, } from "./lib/router/history";
export { IDLE_NAVIGATION, IDLE_FETCHER, IDLE_BLOCKER, } from "./lib/router/router";
export { data as unstable_data, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, redirect, redirectDocument, replace, resolvePath, } from "./lib/router/utils";
export type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject, } from "./lib/context";
export type { AwaitProps, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps, PatchRoutesOnNavigationFunction as unstable_PatchRoutesOnNavigationFunction, } from "./lib/components";
export { data, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, redirect, redirectDocument, replace, resolvePath, } from "./lib/router/utils";
export type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, PatchRoutesOnNavigationFunction, PatchRoutesOnNavigationFunctionArgs, RouteMatch, RouteObject, } from "./lib/context";
export type { AwaitProps, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps, } from "./lib/components";
export type { NavigateFunction } from "./lib/hooks";

@@ -13,3 +13,3 @@ export { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createMemoryRouter, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, renderMatches, } from "./lib/components";

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, HistoryRouter as unstable_HistoryRouter, NavLink, Form, ScrollRestoration, useLinkClickHandler, useSearchParams, useSubmit, useFormAction, useFetcher, useFetchers, useBeforeUnload, usePrompt as unstable_usePrompt, useViewTransitionState as unstable_useViewTransitionState, } from "./lib/dom/lib";
export { createBrowserRouter, createHashRouter, BrowserRouter, HashRouter, Link, HistoryRouter as unstable_HistoryRouter, NavLink, Form, ScrollRestoration, useLinkClickHandler, useSearchParams, useSubmit, useFormAction, useFetcher, useFetchers, useBeforeUnload, usePrompt as unstable_usePrompt, useViewTransitionState as useViewTransitionState, } from "./lib/dom/lib";
export type { FetcherSubmitOptions, ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, SubmitTarget, } from "./lib/dom/dom";

@@ -22,3 +22,2 @@ export { createSearchParams } from "./lib/dom/dom";

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

@@ -29,23 +28,15 @@ export type { ServerRouterProps } from "./lib/dom/ssr/server";

export { createRoutesStub } from "./lib/dom/ssr/routes-test-stub";
export { createCookieFactory, isCookie } from "./lib/server-runtime/cookies";
export { composeUploadHandlers as unstable_composeUploadHandlers, parseMultipartFormData as unstable_parseMultipartFormData, } from "./lib/server-runtime/formData";
export { createCookie, isCookie } from "./lib/server-runtime/cookies";
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 { createSession, createSessionStorage, isSession, } from "./lib/server-runtime/sessions";
export { createCookieSessionStorage } from "./lib/server-runtime/sessions/cookieStorage";
export { createMemorySessionStorage } from "./lib/server-runtime/sessions/memoryStorage";
export { setDevServerHooks as unstable_setDevServerHooks } from "./lib/server-runtime/dev";
export type { CreateCookieFunction, IsCookieFunction, } from "./lib/server-runtime/cookies";
export type { 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 { IsSessionFunction } from "./lib/server-runtime/sessions";
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 { PageLinkDescriptor, HtmlLinkDescriptor, LinkDescriptor, } from "./lib/router/links";
export type { TypedResponse } from "./lib/server-runtime/responses";

@@ -52,0 +43,0 @@ export type { DataFunctionArgs, HeadersArgs, HeadersFunction, } from "./lib/server-runtime/routeModules";

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

import type { FutureConfig, HydrationState, RelativeRoutingType, Router as RemixRouter } from "./router/router";
import type { AgnosticPatchRoutesOnNavigationFunction, DataStrategyFunction, LazyRouteFunction, TrackedPromise } from "./router/utils";
import type { IndexRouteObject, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./context";
import type { DataStrategyFunction, LazyRouteFunction, TrackedPromise } from "./router/utils";
import type { IndexRouteObject, Navigator, NonIndexRouteObject, PatchRoutesOnNavigationFunction, RouteMatch, RouteObject } from "./context";
/**

@@ -14,4 +14,2 @@ * @private

};
export interface PatchRoutesOnNavigationFunction extends AgnosticPatchRoutesOnNavigationFunction<RouteMatch> {
}
/**

@@ -26,4 +24,4 @@ * @category Routers

initialIndex?: number;
unstable_dataStrategy?: DataStrategyFunction;
unstable_patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
dataStrategy?: DataStrategyFunction;
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
}): RemixRouter;

@@ -30,0 +28,0 @@ export interface RouterProviderProps {

import * as React from "react";
import type { History, Action as NavigationType, Location, To } from "./router/history";
import type { RelativeRoutingType, Router, StaticHandlerContext } from "./router/router";
import type { AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, LazyRouteFunction, TrackedPromise } from "./router/utils";
import type { AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticPatchRoutesOnNavigationFunction, AgnosticPatchRoutesOnNavigationFunctionArgs, AgnosticRouteMatch, LazyRouteFunction, TrackedPromise } from "./router/utils";
export interface IndexRouteObject {

@@ -52,2 +52,4 @@ caseSensitive?: AgnosticIndexRouteObject["caseSensitive"];

}
export type PatchRoutesOnNavigationFunctionArgs = AgnosticPatchRoutesOnNavigationFunctionArgs<RouteObject, RouteMatch>;
export type PatchRoutesOnNavigationFunction = AgnosticPatchRoutesOnNavigationFunction<RouteObject, RouteMatch>;
export interface DataRouterContextObject extends Omit<NavigationContextObject, "future"> {

@@ -76,4 +78,4 @@ router: Router;

relative?: RelativeRoutingType;
unstable_flushSync?: boolean;
unstable_viewTransition?: boolean;
flushSync?: boolean;
viewTransition?: boolean;
}

@@ -80,0 +82,0 @@ /**

@@ -82,3 +82,3 @@ import type { RelativeRoutingType } from "../router/router";

*/
unstable_flushSync?: boolean;
flushSync?: boolean;
}

@@ -115,3 +115,3 @@ /**

*/
unstable_viewTransition?: boolean;
viewTransition?: boolean;
}

@@ -118,0 +118,0 @@ export declare function getFormSubmissionInfo(target: SubmitTarget, basename: string): {

import type { HydrationState, Router as RemixRouter } from "../router/router";
import type { AssetsManifest, FutureConfig as RemixFutureConfig } from "./ssr/entry";
import type { AssetsManifest, FutureConfig } from "./ssr/entry";
import type { RouteModules } from "./ssr/routeModules";
export type WindowRemixContext = {
url: string;
export type WindowReactRouterContext = {
basename?: string;
state: HydrationState;
criticalCss?: string;
future: RemixFutureConfig;
future: FutureConfig;
isSpaMode: boolean;

@@ -31,8 +30,8 @@ stream: ReadableStream<Uint8Array> | undefined;

}
var __remixContext: WindowRemixContext | undefined;
var __remixManifest: AssetsManifest | undefined;
var __remixRouteModules: RouteModules | undefined;
var __remixRouter: RemixRouter | undefined;
var __remixRevalidation: number | undefined;
var __remixClearCriticalCss: (() => void) | undefined;
var __reactRouterContext: WindowReactRouterContext | undefined;
var __reactRouterManifest: AssetsManifest | undefined;
var __reactRouterRouteModules: RouteModules | undefined;
var __reactRouterInstance: RemixRouter | undefined;
var __reactRouterHdrActive: boolean;
var __reactRouterClearCriticalCss: (() => void) | undefined;
var $RefreshRuntime$: {

@@ -39,0 +38,0 @@ performReactRefresh: () => void;

@@ -8,4 +8,3 @@ import * as React from "react";

import type { DiscoverBehavior, PrefetchBehavior, ScriptsProps } from "./ssr/components";
import type { PatchRoutesOnNavigationFunction } from "../components";
import type { RouteObject, NavigateOptions } from "../context";
import type { RouteObject, NavigateOptions, PatchRoutesOnNavigationFunction } from "../context";
interface DOMRouterOpts {

@@ -15,4 +14,4 @@ basename?: string;

hydrationData?: HydrationState;
unstable_dataStrategy?: DataStrategyFunction;
unstable_patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
dataStrategy?: DataStrategyFunction;
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
window?: Window;

@@ -211,3 +210,3 @@ }

```jsx
<Link to={to} unstable_viewTransition>
<Link to={to} viewTransition>
Click me

@@ -219,3 +218,3 @@ </Link>

*/
unstable_viewTransition?: boolean;
viewTransition?: boolean;
}

@@ -450,5 +449,5 @@ /**

* for this navigation. To apply specific styles during the transition see
* {@link unstable_useViewTransitionState}.
* {@link useViewTransitionState}.
*/
unstable_viewTransition?: boolean;
viewTransition?: boolean;
}

@@ -532,3 +531,3 @@ /**

*/
export declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, unstable_viewTransition, }?: {
export declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition, }?: {
target?: React.HTMLAttributeAnchorTarget;

@@ -539,3 +538,3 @@ replace?: boolean;

relative?: RelativeRoutingType;
unstable_viewTransition?: boolean;
viewTransition?: boolean;
}): (event: React.MouseEvent<E, MouseEvent>) => void;

@@ -810,3 +809,3 @@ /**

*/
unstable_flushSync?: boolean;
flushSync?: boolean;
}) => Promise<void>;

@@ -941,6 +940,6 @@ };

/**
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)
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.viewTransition} (or the `Form`, `submit`, or `navigate` call)
@category Hooks
@name unstable_useViewTransitionState
@name useViewTransitionState
*/

@@ -947,0 +946,0 @@ export declare function useViewTransitionState(to: To, opts?: {

import type { FocusEventHandler, MouseEventHandler, TouchEventHandler } from "react";
import * as React from "react";
import type { FrameworkContextObject } from "./entry";
import type { PrefetchPageDescriptor } from "./links";
import type { PageLinkDescriptor } from "../../router/links";
export type SerializeFrom<D> = D extends () => {} ? Awaited<ReturnType<D>> : D;

@@ -67,3 +67,3 @@ export declare const FrameworkContext: React.Context<FrameworkContextObject | undefined>;

*/
export declare function PrefetchPageLinks({ page, ...dataLinkProps }: PrefetchPageDescriptor): React.JSX.Element | null;
export declare function PrefetchPageLinks({ page, ...dataLinkProps }: PageLinkDescriptor): React.JSX.Element | null;
/**

@@ -70,0 +70,0 @@ Renders all the `<meta>` tags created by route module {@link MetaFunction} exports. You should render it inside the `<head>` of your HTML.

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

import type { PatchRoutesOnNavigationFunction } from "../../components";
import type { PatchRoutesOnNavigationFunction } from "../../context";
import type { Router as RemixRouter } from "../../router/router";

@@ -3,0 +3,0 @@ import type { AssetsManifest } from "./entry";

@@ -6,106 +6,4 @@ import type { Location } from "../../router/history";

import type { EntryRoute } from "./routes";
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
interface HtmlLinkProps {
/**
* Address of the hyperlink
*/
href?: string;
/**
* How the element handles crossorigin requests
*/
crossOrigin?: "anonymous" | "use-credentials";
/**
* Relationship between the document containing the hyperlink and the destination resource
*/
rel: LiteralUnion<"alternate" | "dns-prefetch" | "icon" | "manifest" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "search" | "stylesheet", string>;
/**
* Applicable media: "screen", "print", "(max-width: 764px)"
*/
media?: string;
/**
* Integrity metadata used in Subresource Integrity checks
*/
integrity?: string;
/**
* Language of the linked resource
*/
hrefLang?: string;
/**
* Hint for the type of the referenced resource
*/
type?: string;
/**
* Referrer policy for fetches initiated by the element
*/
referrerPolicy?: "" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
/**
* Sizes of the icons (for rel="icon")
*/
sizes?: string;
/**
* Potential destination for a preload request (for rel="preload" and rel="modulepreload")
*/
as?: LiteralUnion<"audio" | "audioworklet" | "document" | "embed" | "fetch" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "serviceworker" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt", string>;
/**
* Color to use when customizing a site's icon (for rel="mask-icon")
*/
color?: string;
/**
* Whether the link is disabled
*/
disabled?: boolean;
/**
* The title attribute has special semantics on this element: Title of the link; CSS style sheet set name.
*/
title?: string;
/**
* Images to use in different situations, e.g., high-resolution displays,
* small monitors, etc. (for rel="preload")
*/
imageSrcSet?: string;
/**
* Image sizes for different page layouts (for rel="preload")
*/
imageSizes?: string;
}
interface HtmlLinkPreloadImage extends HtmlLinkProps {
/**
* Relationship between the document containing the hyperlink and the destination resource
*/
rel: "preload";
/**
* Potential destination for a preload request (for rel="preload" and rel="modulepreload")
*/
as: "image";
/**
* Address of the hyperlink
*/
href?: string;
/**
* Images to use in different situations, e.g., high-resolution displays,
* small monitors, etc. (for rel="preload")
*/
imageSrcSet: string;
/**
* Image sizes for different page layouts (for rel="preload")
*/
imageSizes?: string;
}
import type { HtmlLinkDescriptor, LinkDescriptor, PageLinkDescriptor } from "../../router/links";
/**
* Represents a `<link>` element.
*
* WHATWG Specification: https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
*/
export type HtmlLinkDescriptor = (HtmlLinkProps & Pick<Required<HtmlLinkProps>, "href">) | (HtmlLinkPreloadImage & Pick<Required<HtmlLinkPreloadImage>, "imageSizes">) | (HtmlLinkPreloadImage & Pick<Required<HtmlLinkPreloadImage>, "href"> & {
imageSizes?: never;
});
export interface PrefetchPageDescriptor extends Omit<HtmlLinkDescriptor, "href" | "rel" | "type" | "sizes" | "imageSrcSet" | "imageSizes" | "as" | "color" | "title"> {
/**
* The absolute path of the page to prefetch.
*/
page: string;
}
export type LinkDescriptor = HtmlLinkDescriptor | PrefetchPageDescriptor;
/**
* Gets all the links for a set of matches. The modules are assumed to have been

@@ -116,3 +14,3 @@ * loaded already.

export declare function prefetchStyleLinks(route: EntryRoute, routeModule: RouteModule): Promise<void>;
export declare function isPageLinkDescriptor(object: any): object is PrefetchPageDescriptor;
export declare function isPageLinkDescriptor(object: any): object is PageLinkDescriptor;
export type KeyedHtmlLinkDescriptor = {

@@ -119,0 +17,0 @@ key: string;

@@ -6,5 +6,5 @@ import type { ComponentType, ReactElement } from "react";

import type { AppData } from "./data";
import type { LinkDescriptor } from "./links";
import type { EntryRoute } from "./routes";
import type { DataRouteMatch } from "../../context";
import type { LinkDescriptor } from "../../router/links";
export interface RouteModules {

@@ -11,0 +11,0 @@ [routeId: string]: RouteModule | undefined;

import * as React from "react";
import type { Router as RemixRouter } from "../../router/router";
import type { DataStrategyFunction } from "../../router/utils";
import type { AssetsManifest, EntryContext } from "./entry";
import type { RouteModules } from "./routeModules";
import type { DataRouteObject } from "../../context";
export declare const SingleFetchRedirectSymbol: unique symbol;

@@ -31,4 +31,3 @@ export type SingleFetchRedirectResult = {

export declare function StreamTransfer({ context, identifier, reader, textDecoder, nonce, }: StreamTransferProps): React.JSX.Element | null;
export declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules): DataStrategyFunction;
export declare function addRevalidationParam(manifest: AssetsManifest, routeModules: RouteModules, matchedRoutes: DataRouteObject[], loadRoutes: DataRouteObject[], url: URL): URL;
export declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules, getRouter: () => RemixRouter): DataStrategyFunction;
export declare function singleFetchUrl(reqUrl: URL | string): URL;

@@ -35,0 +34,0 @@ export declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{

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

window?: Window;
unstable_patchRoutesOnNavigation?: AgnosticPatchRoutesOnNavigationFunction;
unstable_dataStrategy?: DataStrategyFunction;
dataStrategy?: DataStrategyFunction;
patchRoutesOnNavigation?: AgnosticPatchRoutesOnNavigationFunction;
}

@@ -298,3 +298,3 @@ /**

skipLoaderErrorBubbling?: boolean;
unstable_dataStrategy?: DataStrategyFunction;
dataStrategy?: DataStrategyFunction;
}): Promise<StaticHandlerContext | Response>;

@@ -304,3 +304,3 @@ queryRoute(request: Request, opts?: {

requestContext?: unknown;
unstable_dataStrategy?: DataStrategyFunction;
dataStrategy?: DataStrategyFunction;
}): Promise<any>;

@@ -318,4 +318,4 @@ }

deletedFetchers: string[];
unstable_viewTransitionOpts?: ViewTransitionOpts;
unstable_flushSync: boolean;
viewTransitionOpts?: ViewTransitionOpts;
flushSync: boolean;
}): void;

@@ -344,3 +344,3 @@ }

relative?: RelativeRoutingType;
unstable_flushSync?: boolean;
flushSync?: boolean;
};

@@ -351,3 +351,3 @@ type BaseNavigateOptions = BaseNavigateOrFetchOptions & {

fromRouteId?: string;
unstable_viewTransition?: boolean;
viewTransition?: boolean;
};

@@ -354,0 +354,0 @@ type BaseSubmissionOptions = {

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

export type DataResult = SuccessResult | RedirectResult | ErrorResult;
/**
* Result from a loader or action called via dataStrategy
*/
export interface HandlerResult {
type: "data" | "error";
result: unknown;
}
export type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";

@@ -170,17 +163,24 @@ export type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;

shouldLoad: boolean;
resolve: (handlerOverride?: (handler: (ctx?: unknown) => DataFunctionReturnValue) => Promise<HandlerResult>) => Promise<HandlerResult>;
resolve: (handlerOverride?: (handler: (ctx?: unknown) => DataFunctionReturnValue) => DataFunctionReturnValue) => Promise<DataStrategyResult>;
}
export interface DataStrategyFunctionArgs<Context = any> extends DataFunctionArgs<Context> {
matches: DataStrategyMatch[];
fetcherKey: string | null;
}
/**
* Result from a loader or action called via dataStrategy
*/
export interface DataStrategyResult {
type: "data" | "error";
result: unknown;
}
export interface DataStrategyFunction {
(args: DataStrategyFunctionArgs): Promise<HandlerResult[]>;
(args: DataStrategyFunctionArgs): Promise<Record<string, DataStrategyResult>>;
}
export interface AgnosticPatchRoutesOnNavigationFunction<M extends AgnosticRouteMatch = AgnosticRouteMatch> {
(opts: {
path: string;
matches: M[];
patch: (routeId: string | null, children: AgnosticRouteObject[]) => void;
}): void | Promise<void>;
}
export type AgnosticPatchRoutesOnNavigationFunctionArgs<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = {
path: string;
matches: M[];
patch: (routeId: string | null, children: O[]) => void;
};
export type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = (opts: AgnosticPatchRoutesOnNavigationFunctionArgs<O, M>) => void | Promise<void>;
/**

@@ -187,0 +187,0 @@ * Function provided by the framework-aware layers to set any framework-specific

import type { CookieParseOptions, CookieSerializeOptions } from "cookie";
import type { SignFunction, UnsignFunction } from "./crypto";
export type { CookieParseOptions, CookieSerializeOptions };

@@ -53,12 +52,6 @@ export interface CookieSignatureOptions {

}
export type CreateCookieFunction = (name: string, cookieOptions?: CookieOptions) => Cookie;
/**
* Creates a logical container for managing a browser cookie from the server.
*
* @see https://remix.run/utils/cookies#createcookie
*/
export declare const createCookieFactory: ({ sign, unsign, }: {
sign: SignFunction;
unsign: UnsignFunction;
}) => CreateCookieFunction;
export declare const createCookie: (name: string, cookieOptions?: CookieOptions) => Cookie;
export type IsCookieFunction = (object: any) => object is Cookie;

@@ -65,0 +58,0 @@ /**

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

export type SignFunction = (value: string, secret: string) => Promise<string>;
export type UnsignFunction = (cookie: string, secret: string) => Promise<string | false>;
export declare const sign: (value: string, secret: string) => Promise<string>;
export declare const unsign: (cookie: string, secret: string) => Promise<string | false>;
import type { Location } from "../router/history";
import type { ActionFunction as RRActionFunction, ActionFunctionArgs as RRActionFunctionArgs, AgnosticRouteMatch, LoaderFunction as RRLoaderFunction, LoaderFunctionArgs as RRLoaderFunctionArgs, Params } from "../router/utils";
import type { AppData, AppLoadContext } from "./data";
import type { LinkDescriptor } from "./links";
import type { SerializeFrom } from "../dom/ssr/components";
import type { LinkDescriptor } from "../router/links";
export interface RouteModules<RouteModule> {

@@ -7,0 +7,0 @@ [routeId: string]: RouteModule | undefined;

@@ -7,3 +7,2 @@ import type { HydrationState } from "../router/router";

criticalCss?: string;
url: string;
basename: string | undefined;

@@ -10,0 +9,0 @@ future: FutureConfig;

import type { CookieParseOptions, CookieSerializeOptions } from "cookie";
import type { Cookie, CookieOptions, CreateCookieFunction } from "./cookies";
import type { Cookie, CookieOptions } from "./cookies";
/**

@@ -132,3 +132,2 @@ * An object of name/value pairs to be used in the session.

}
export type CreateSessionStorageFunction = <Data = SessionData, FlashData = Data>(strategy: SessionIdStorageStrategy<Data, FlashData>) => SessionStorage<Data, FlashData>;
/**

@@ -139,7 +138,5 @@ * Creates a SessionStorage object using a SessionIdStorageStrategy.

* existing session storage options meet your requirements.
*
* @see https://remix.run/utils/sessions#createsessionstorage
*/
export declare const createSessionStorageFactory: (createCookie: CreateCookieFunction) => CreateSessionStorageFunction;
export declare function createSessionStorage<Data = SessionData, FlashData = Data>({ cookie: cookieArg, createData, readData, updateData, deleteData, }: SessionIdStorageStrategy<Data, FlashData>): SessionStorage<Data, FlashData>;
export declare function warnOnceAboutSigningSessionCookie(cookie: Cookie): void;
export {};

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

import type { CreateCookieFunction } from "../cookies";
import type { SessionStorage, SessionIdStorageStrategy, SessionData } from "../sessions";

@@ -10,3 +9,2 @@ interface CookieSessionStorageOptions {

}
export type CreateCookieSessionStorageFunction = <Data = SessionData, FlashData = Data>(options?: CookieSessionStorageOptions) => SessionStorage<Data, FlashData>;
/**

@@ -20,6 +18,4 @@ * Creates and returns a SessionStorage object that stores all session data

* browser's maximum cookie size. Trade-offs!
*
* @see https://remix.run/utils/sessions#createcookiesessionstorage
*/
export declare const createCookieSessionStorageFactory: (createCookie: CreateCookieFunction) => CreateCookieSessionStorageFunction;
export declare function createCookieSessionStorage<Data = SessionData, FlashData = Data>({ cookie: cookieArg }?: CookieSessionStorageOptions): SessionStorage<Data, FlashData>;
export {};

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

import type { SessionData, SessionStorage, SessionIdStorageStrategy, CreateSessionStorageFunction } from "../sessions";
import type { SessionData, SessionStorage, SessionIdStorageStrategy } from "../sessions";
interface MemorySessionStorageOptions {

@@ -9,3 +9,2 @@ /**

}
export type CreateMemorySessionStorageFunction = <Data = SessionData, FlashData = Data>(options?: MemorySessionStorageOptions) => SessionStorage<Data, FlashData>;
/**

@@ -17,6 +16,4 @@ * Creates and returns a simple in-memory SessionStorage object, mostly useful

* suitable for most production scenarios.
*
* @see https://remix.run/utils/sessions#creatememorysessionstorage
*/
export declare const createMemorySessionStorageFactory: (createSessionStorage: CreateSessionStorageFunction) => CreateMemorySessionStorageFunction;
export declare function createMemorySessionStorage<Data = SessionData, FlashData = Data>({ cookie }?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
export {};
/**
* React Router v0.0.0-nightly-854031618-20240819
* React Router v0.0.0-nightly-8b31f25af-20240926
*

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

/**
* React Router v0.0.0-nightly-854031618-20240819
* React Router v0.0.0-nightly-8b31f25af-20240926
*

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

/**
* React Router v0.0.0-nightly-854031618-20240819
* React Router v0.0.0-nightly-8b31f25af-20240926
*

@@ -18,7 +18,7 @@ * Copyright (c) Remix Software Inc.

function initSsrInfo() {
if (!ssrInfo && window.__remixContext && window.__remixManifest && window.__remixRouteModules) {
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
ssrInfo = {
context: window.__remixContext,
manifest: window.__remixManifest,
routeModules: window.__remixRouteModules,
context: window.__reactRouterContext,
manifest: window.__reactRouterManifest,
routeModules: window.__reactRouterRouteModules,
stateDecodingPromise: undefined,

@@ -36,20 +36,4 @@ router: undefined,

// Hard reload if the path we tried to load is not the current path.
// This is usually the result of 2 rapid back/forward clicks from an
// external site into a Remix app, where we initially start the load for
// one URL and while the JS chunks are loading a second forward click moves
// us to a new URL. Avoid comparing search params because of CDNs which
// can be configured to ignore certain params and only pathname is relevant
// towards determining the route matches.
let initialPathname = ssrInfo.context.url;
let hydratedPathname = window.location.pathname;
if (initialPathname !== hydratedPathname && !ssrInfo.context.isSpaMode) {
let errorMsg = `Initial URL (${initialPathname}) does not match URL at time of hydration ` + `(${hydratedPathname}), reloading page...`;
console.error(errorMsg);
window.location.reload();
throw new Error("SSR/Client mismatch - reloading current URL");
}
// We need to suspend until the initial state snapshot is decoded into
// window.__remixContext.state
// window.__reactRouterContext.state

@@ -92,3 +76,3 @@ let localSsrInfo = ssrInfo;

};
let initialMatches = matchRoutes(routes, window.location, window.__remixContext?.basename);
let initialMatches = matchRoutes(routes, window.location, window.__reactRouterContext?.basename);
if (initialMatches) {

@@ -130,4 +114,4 @@ for (let match of initialMatches) {

mapRouteProperties: UNSAFE_mapRouteProperties,
unstable_dataStrategy: UNSAFE_getSingleFetchDataStrategy(ssrInfo.manifest, ssrInfo.routeModules),
unstable_patchRoutesOnNavigation: UNSAFE_getPatchRoutesOnNavigationFunction(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename)
dataStrategy: UNSAFE_getSingleFetchDataStrategy(ssrInfo.manifest, ssrInfo.routeModules, () => router),
patchRoutesOnNavigation: UNSAFE_getPatchRoutesOnNavigationFunction(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename)
});

@@ -146,3 +130,3 @@ ssrInfo.router = router;

UNSAFE_createClientRoutesWithHMRRevalidationOptOut;
window.__remixRouter = router;
window.__reactRouterInstance = router;
return router;

@@ -165,3 +149,3 @@ }

if (ssrInfo) {
window.__remixClearCriticalCss = () => setCriticalCss(undefined);
window.__reactRouterClearCriticalCss = () => setCriticalCss(undefined);
}

@@ -168,0 +152,0 @@ }

/**
* React Router v0.0.0-nightly-854031618-20240819
* React Router v0.0.0-nightly-8b31f25af-20240926
*

@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc.

*/
import*as e from"react";import*as t from"react-dom";import{UNSAFE_invariant as o,UNSAFE_useFogOFWarDiscovery as r,UNSAFE_FrameworkContext as i,UNSAFE_RemixErrorBoundary as a,UNSAFE_decodeViaTurboStream as n,UNSAFE_createClientRoutes as s,matchRoutes as u,UNSAFE_shouldHydrateRouteLoader as l,UNSAFE_deserializeErrors as d,UNSAFE_createRouter as c,UNSAFE_createBrowserHistory as m,UNSAFE_mapRouteProperties as f,UNSAFE_getSingleFetchDataStrategy as w,UNSAFE_getPatchRoutesOnNavigationFunction as x,UNSAFE_createClientRoutesWithHMRRevalidationOptOut as p,RouterProvider as M}from"react-router";let g=null,h=null;function _(){if(!g&&window.__remixContext&&window.__remixManifest&&window.__remixRouteModules&&(g={context:window.__remixContext,manifest:window.__remixManifest,routeModules:window.__remixRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}),!g)throw new Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let e=g.context.url,t=window.location.pathname;if(e!==t&&!g.context.isSpaMode){let o=`Initial URL (${e}) does not match URL at time of hydration (${t}), reloading page...`;throw console.error(o),window.location.reload(),new Error("SSR/Client mismatch - reloading current URL")}let r=g;if(!g.stateDecodingPromise){let e=g.context.stream;e||o(!1),g.context.stream=void 0,g.stateDecodingPromise=n(e,window).then((e=>{g.context.state=e.value,r.stateDecodingPromise.value=!0})).catch((e=>{r.stateDecodingPromise.error=e}))}if(g.stateDecodingPromise.error)throw g.stateDecodingPromise.error;if(!g.stateDecodingPromise.value)throw g.stateDecodingPromise;let i,a=s(g.manifest.routes,g.routeModules,g.context.state,g.context.isSpaMode);if(!g.context.isSpaMode){i={...g.context.state,loaderData:{...g.context.state.loaderData}};let e=u(a,window.location,window.__remixContext?.basename);if(e)for(let t of e){let e=t.route.id,o=g.routeModules[e],r=g.manifest.routes[e];o&&l(r,o,g.context.isSpaMode)&&(o.HydrateFallback||!r.hasLoader)?i.loaderData[e]=void 0:r&&!r.hasLoader&&(i.loaderData[e]=null)}i&&i.errors&&(i.errors=d(i.errors))}let M=c({routes:a,history:m(),basename:g.context.basename,hydrationData:i,mapRouteProperties:f,unstable_dataStrategy:w(g.manifest,g.routeModules),unstable_patchRoutesOnNavigation:x(g.manifest,g.routeModules,g.context.isSpaMode,g.context.basename)});return g.router=M,M.state.initialized&&(g.routerInitialized=!0,M.initialize()),M.createRoutesForHMR=p,window.__remixRouter=M,M}function S(){h||(h=_());let[t,n]=e.useState(void 0),[s,u]=e.useState(h.state.location);return e.useLayoutEffect((()=>{g&&g.router&&!g.routerInitialized&&(g.routerInitialized=!0,g.router.initialize())}),[]),e.useLayoutEffect((()=>{if(g&&g.router)return g.router.subscribe((e=>{e.location!==s&&u(e.location)}))}),[s]),g||o(!1),r(h,g.manifest,g.routeModules,g.context.isSpaMode),e.createElement(e.Fragment,null,e.createElement(i.Provider,{value:{manifest:g.manifest,routeModules:g.routeModules,future:g.context.future,criticalCss:t,isSpaMode:g.context.isSpaMode}},e.createElement(a,{location:s},e.createElement(R,{router:h}))),e.createElement(e.Fragment,null))}function R(o){return e.createElement(M,Object.assign({flushSync:t.flushSync},o))}export{S as HydratedRouter,R as RouterProvider};
import*as e from"react";import*as t from"react-dom";import{UNSAFE_invariant as o,UNSAFE_useFogOFWarDiscovery as r,UNSAFE_FrameworkContext as a,UNSAFE_RemixErrorBoundary as i,UNSAFE_decodeViaTurboStream as n,UNSAFE_createClientRoutes as s,matchRoutes as u,UNSAFE_shouldHydrateRouteLoader as c,UNSAFE_deserializeErrors as d,UNSAFE_createRouter as l,UNSAFE_createBrowserHistory as m,UNSAFE_mapRouteProperties as f,UNSAFE_getSingleFetchDataStrategy as w,UNSAFE_getPatchRoutesOnNavigationFunction as x,UNSAFE_createClientRoutesWithHMRRevalidationOptOut as M,RouterProvider as R}from"react-router";let p=null,g=null;function _(){if(!p&&window.__reactRouterContext&&window.__reactRouterManifest&&window.__reactRouterRouteModules&&(p={context:window.__reactRouterContext,manifest:window.__reactRouterManifest,routeModules:window.__reactRouterRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}),!p)throw new Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let e=p;if(!p.stateDecodingPromise){let t=p.context.stream;t||o(!1),p.context.stream=void 0,p.stateDecodingPromise=n(t,window).then((t=>{p.context.state=t.value,e.stateDecodingPromise.value=!0})).catch((t=>{e.stateDecodingPromise.error=t}))}if(p.stateDecodingPromise.error)throw p.stateDecodingPromise.error;if(!p.stateDecodingPromise.value)throw p.stateDecodingPromise;let t,r=s(p.manifest.routes,p.routeModules,p.context.state,p.context.isSpaMode);if(!p.context.isSpaMode){t={...p.context.state,loaderData:{...p.context.state.loaderData}};let e=u(r,window.location,window.__reactRouterContext?.basename);if(e)for(let o of e){let e=o.route.id,r=p.routeModules[e],a=p.manifest.routes[e];r&&c(a,r,p.context.isSpaMode)&&(r.HydrateFallback||!a.hasLoader)?t.loaderData[e]=void 0:a&&!a.hasLoader&&(t.loaderData[e]=null)}t&&t.errors&&(t.errors=d(t.errors))}let a=l({routes:r,history:m(),basename:p.context.basename,hydrationData:t,mapRouteProperties:f,dataStrategy:w(p.manifest,p.routeModules,(()=>a)),patchRoutesOnNavigation:x(p.manifest,p.routeModules,p.context.isSpaMode,p.context.basename)});return p.router=a,a.state.initialized&&(p.routerInitialized=!0,a.initialize()),a.createRoutesForHMR=M,window.__reactRouterInstance=a,a}function D(){g||(g=_());let[t,n]=e.useState(void 0),[s,u]=e.useState(g.state.location);return e.useLayoutEffect((()=>{p&&p.router&&!p.routerInitialized&&(p.routerInitialized=!0,p.router.initialize())}),[]),e.useLayoutEffect((()=>{if(p&&p.router)return p.router.subscribe((e=>{e.location!==s&&u(e.location)}))}),[s]),p||o(!1),r(g,p.manifest,p.routeModules,p.context.isSpaMode),e.createElement(e.Fragment,null,e.createElement(a.Provider,{value:{manifest:p.manifest,routeModules:p.routeModules,future:p.context.future,criticalCss:t,isSpaMode:p.context.isSpaMode}},e.createElement(i,{location:s},e.createElement(S,{router:g}))),e.createElement(e.Fragment,null))}function S(o){return e.createElement(R,Object.assign({flushSync:t.flushSync},o))}export{D as HydratedRouter,S as RouterProvider};
//# sourceMappingURL=react-router-dom.production.min.js.map
/**
* React Router v0.0.0-nightly-854031618-20240819
* React Router v0.0.0-nightly-8b31f25af-20240926
*

@@ -56,7 +56,7 @@ * Copyright (c) Remix Software Inc.

function initSsrInfo() {
if (!ssrInfo && window.__remixContext && window.__remixManifest && window.__remixRouteModules) {
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
ssrInfo = {
context: window.__remixContext,
manifest: window.__remixManifest,
routeModules: window.__remixRouteModules,
context: window.__reactRouterContext,
manifest: window.__reactRouterManifest,
routeModules: window.__reactRouterRouteModules,
stateDecodingPromise: undefined,

@@ -74,20 +74,4 @@ router: undefined,

// Hard reload if the path we tried to load is not the current path.
// This is usually the result of 2 rapid back/forward clicks from an
// external site into a Remix app, where we initially start the load for
// one URL and while the JS chunks are loading a second forward click moves
// us to a new URL. Avoid comparing search params because of CDNs which
// can be configured to ignore certain params and only pathname is relevant
// towards determining the route matches.
let initialPathname = ssrInfo.context.url;
let hydratedPathname = window.location.pathname;
if (initialPathname !== hydratedPathname && !ssrInfo.context.isSpaMode) {
let errorMsg = "Initial URL (" + initialPathname + ") does not match URL at time of hydration " + ("(" + hydratedPathname + "), reloading page...");
console.error(errorMsg);
window.location.reload();
throw new Error("SSR/Client mismatch - reloading current URL");
}
// We need to suspend until the initial state snapshot is decoded into
// window.__remixContext.state
// window.__reactRouterContext.state

@@ -118,3 +102,3 @@ let localSsrInfo = ssrInfo;

if (!ssrInfo.context.isSpaMode) {
var _window$__remixContex;
var _window$__reactRouter;
// Create a shallow clone of `loaderData` we can mutate for partial hydration.

@@ -129,3 +113,3 @@ // When a route exports a `clientLoader` and a `HydrateFallback`, the SSR will

});
let initialMatches = reactRouter.matchRoutes(routes, window.location, (_window$__remixContex = window.__remixContext) == null ? void 0 : _window$__remixContex.basename);
let initialMatches = reactRouter.matchRoutes(routes, window.location, (_window$__reactRouter = window.__reactRouterContext) == null ? void 0 : _window$__reactRouter.basename);
if (initialMatches) {

@@ -167,4 +151,4 @@ for (let match of initialMatches) {

mapRouteProperties: reactRouter.UNSAFE_mapRouteProperties,
unstable_dataStrategy: reactRouter.UNSAFE_getSingleFetchDataStrategy(ssrInfo.manifest, ssrInfo.routeModules),
unstable_patchRoutesOnNavigation: reactRouter.UNSAFE_getPatchRoutesOnNavigationFunction(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename)
dataStrategy: reactRouter.UNSAFE_getSingleFetchDataStrategy(ssrInfo.manifest, ssrInfo.routeModules, () => router),
patchRoutesOnNavigation: reactRouter.UNSAFE_getPatchRoutesOnNavigationFunction(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename)
});

@@ -183,3 +167,3 @@ ssrInfo.router = router;

reactRouter.UNSAFE_createClientRoutesWithHMRRevalidationOptOut;
window.__remixRouter = router;
window.__reactRouterInstance = router;
return router;

@@ -203,3 +187,3 @@ }

if (ssrInfo) {
window.__remixClearCriticalCss = () => setCriticalCss(undefined);
window.__reactRouterClearCriticalCss = () => setCriticalCss(undefined);
}

@@ -206,0 +190,0 @@ }

/**
* React Router v0.0.0-nightly-854031618-20240819
* React Router v0.0.0-nightly-8b31f25af-20240926
*

@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","react-router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRouterDomExport={},e.React,e.ReactDOM,e.ReactRouter)}(this,(function(e,t,o,r){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var i=a(t),n=a(o);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},u.apply(this,arguments)}let s=null,c=null;function l(){if(!s&&window.__remixContext&&window.__remixManifest&&window.__remixRouteModules&&(s={context:window.__remixContext,manifest:window.__remixManifest,routeModules:window.__remixRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}),!s)throw new Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let e=s.context.url,t=window.location.pathname;if(e!==t&&!s.context.isSpaMode){let o="Initial URL ("+e+") does not match URL at time of hydration ("+t+"), reloading page...";throw console.error(o),window.location.reload(),new Error("SSR/Client mismatch - reloading current URL")}let o=s;if(!s.stateDecodingPromise){let e=s.context.stream;e||r.UNSAFE_invariant(!1),s.context.stream=void 0,s.stateDecodingPromise=r.UNSAFE_decodeViaTurboStream(e,window).then((e=>{s.context.state=e.value,o.stateDecodingPromise.value=!0})).catch((e=>{o.stateDecodingPromise.error=e}))}if(s.stateDecodingPromise.error)throw s.stateDecodingPromise.error;if(!s.stateDecodingPromise.value)throw s.stateDecodingPromise;let a,i=r.UNSAFE_createClientRoutes(s.manifest.routes,s.routeModules,s.context.state,s.context.isSpaMode);if(!s.context.isSpaMode){var n;a=u({},s.context.state,{loaderData:u({},s.context.state.loaderData)});let e=r.matchRoutes(i,window.location,null==(n=window.__remixContext)?void 0:n.basename);if(e)for(let t of e){let e=t.route.id,o=s.routeModules[e],i=s.manifest.routes[e];o&&r.UNSAFE_shouldHydrateRouteLoader(i,o,s.context.isSpaMode)&&(o.HydrateFallback||!i.hasLoader)?a.loaderData[e]=void 0:i&&!i.hasLoader&&(a.loaderData[e]=null)}a&&a.errors&&(a.errors=r.UNSAFE_deserializeErrors(a.errors))}let c=r.UNSAFE_createRouter({routes:i,history:r.UNSAFE_createBrowserHistory(),basename:s.context.basename,hydrationData:a,mapRouteProperties:r.UNSAFE_mapRouteProperties,unstable_dataStrategy:r.UNSAFE_getSingleFetchDataStrategy(s.manifest,s.routeModules),unstable_patchRoutesOnNavigation:r.UNSAFE_getPatchRoutesOnNavigationFunction(s.manifest,s.routeModules,s.context.isSpaMode,s.context.basename)});return s.router=c,c.state.initialized&&(s.routerInitialized=!0,c.initialize()),c.createRoutesForHMR=r.UNSAFE_createClientRoutesWithHMRRevalidationOptOut,window.__remixRouter=c,c}function d(e){return i.createElement(r.RouterProvider,u({flushSync:n.flushSync},e))}e.HydratedRouter=function(){c||(c=l());let[e,t]=i.useState(void 0),[o,a]=i.useState(c.state.location);return i.useLayoutEffect((()=>{s&&s.router&&!s.routerInitialized&&(s.routerInitialized=!0,s.router.initialize())}),[]),i.useLayoutEffect((()=>{if(s&&s.router)return s.router.subscribe((e=>{e.location!==o&&a(e.location)}))}),[o]),s||r.UNSAFE_invariant(!1),r.UNSAFE_useFogOFWarDiscovery(c,s.manifest,s.routeModules,s.context.isSpaMode),i.createElement(i.Fragment,null,i.createElement(r.UNSAFE_FrameworkContext.Provider,{value:{manifest:s.manifest,routeModules:s.routeModules,future:s.context.future,criticalCss:e,isSpaMode:s.context.isSpaMode}},i.createElement(r.UNSAFE_RemixErrorBoundary,{location:o},i.createElement(d,{router:c}))),i.createElement(i.Fragment,null))},e.RouterProvider=d,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","react-router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRouterDomExport={},e.React,e.ReactDOM,e.ReactRouter)}(this,(function(e,t,r,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=a(t),n=a(r);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},u.apply(this,arguments)}let s=null,c=null;function d(){if(!s&&window.__reactRouterContext&&window.__reactRouterManifest&&window.__reactRouterRouteModules&&(s={context:window.__reactRouterContext,manifest:window.__reactRouterManifest,routeModules:window.__reactRouterRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}),!s)throw new Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let e=s;if(!s.stateDecodingPromise){let t=s.context.stream;t||o.UNSAFE_invariant(!1),s.context.stream=void 0,s.stateDecodingPromise=o.UNSAFE_decodeViaTurboStream(t,window).then((t=>{s.context.state=t.value,e.stateDecodingPromise.value=!0})).catch((t=>{e.stateDecodingPromise.error=t}))}if(s.stateDecodingPromise.error)throw s.stateDecodingPromise.error;if(!s.stateDecodingPromise.value)throw s.stateDecodingPromise;let t,r=o.UNSAFE_createClientRoutes(s.manifest.routes,s.routeModules,s.context.state,s.context.isSpaMode);if(!s.context.isSpaMode){var a;t=u({},s.context.state,{loaderData:u({},s.context.state.loaderData)});let e=o.matchRoutes(r,window.location,null==(a=window.__reactRouterContext)?void 0:a.basename);if(e)for(let r of e){let e=r.route.id,a=s.routeModules[e],i=s.manifest.routes[e];a&&o.UNSAFE_shouldHydrateRouteLoader(i,a,s.context.isSpaMode)&&(a.HydrateFallback||!i.hasLoader)?t.loaderData[e]=void 0:i&&!i.hasLoader&&(t.loaderData[e]=null)}t&&t.errors&&(t.errors=o.UNSAFE_deserializeErrors(t.errors))}let i=o.UNSAFE_createRouter({routes:r,history:o.UNSAFE_createBrowserHistory(),basename:s.context.basename,hydrationData:t,mapRouteProperties:o.UNSAFE_mapRouteProperties,dataStrategy:o.UNSAFE_getSingleFetchDataStrategy(s.manifest,s.routeModules,(()=>i)),patchRoutesOnNavigation:o.UNSAFE_getPatchRoutesOnNavigationFunction(s.manifest,s.routeModules,s.context.isSpaMode,s.context.basename)});return s.router=i,i.state.initialized&&(s.routerInitialized=!0,i.initialize()),i.createRoutesForHMR=o.UNSAFE_createClientRoutesWithHMRRevalidationOptOut,window.__reactRouterInstance=i,i}function l(e){return i.createElement(o.RouterProvider,u({flushSync:n.flushSync},e))}e.HydratedRouter=function(){c||(c=d());let[e,t]=i.useState(void 0),[r,a]=i.useState(c.state.location);return i.useLayoutEffect((()=>{s&&s.router&&!s.routerInitialized&&(s.routerInitialized=!0,s.router.initialize())}),[]),i.useLayoutEffect((()=>{if(s&&s.router)return s.router.subscribe((e=>{e.location!==r&&a(e.location)}))}),[r]),s||o.UNSAFE_invariant(!1),o.UNSAFE_useFogOFWarDiscovery(c,s.manifest,s.routeModules,s.context.isSpaMode),i.createElement(i.Fragment,null,i.createElement(o.UNSAFE_FrameworkContext.Provider,{value:{manifest:s.manifest,routeModules:s.routeModules,future:s.context.future,criticalCss:e,isSpaMode:s.context.isSpaMode}},i.createElement(o.UNSAFE_RemixErrorBoundary,{location:r},i.createElement(l,{router:c}))),i.createElement(i.Fragment,null))},e.RouterProvider=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=react-router-dom.production.min.js.map
{
"name": "react-router",
"version": "0.0.0-nightly-854031618-20240819",
"version": "0.0.0-nightly-8b31f25af-20240926",
"description": "Declarative routing for React",

@@ -44,4 +44,4 @@ "keywords": [

"source-map": "^0.7.3",
"turbo-stream": "2.3.0",
"react-router": "0.0.0-nightly-854031618-20240819"
"turbo-stream": "2.4.0",
"react-router": "0.0.0-nightly-8b31f25af-20240926"
},

@@ -48,0 +48,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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 not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc