Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
3
Versions
501
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-bf23aaf61-20240802 to 0.0.0-nightly-bf7ecb711-20240911

dist/lib/router/links.d.ts

12

CHANGELOG.md
# `react-router`
## 6.26.1
### Patch Changes
- Rename `unstable_patchRoutesOnMiss` to `unstable_patchRoutesOnNavigation` to match new behavior ([#11888](https://github.com/remix-run/react-router/pull/11888))
- Updated dependencies:
- `@remix-run/router@1.19.1`
## 6.26.0

@@ -18,6 +26,4 @@

### Patch Changes
No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md) for an overview of all changes in v6.25.1.
- Memoize some `RouterProvider` internals to reduce unnecessary re-renders ([#11803](https://github.com/remix-run/react-router/pull/11803))
## 6.25.0

@@ -24,0 +30,0 @@

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, PatchRoutesOnMissFunction as unstable_PatchRoutesOnMissFunction, } 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";

@@ -21,3 +21,2 @@ export { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createMemoryRouter, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, renderMatches, } from "./lib/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";

@@ -28,16 +27,14 @@ 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 { createCookie, 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 { 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 { 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 { 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";

@@ -47,5 +44,4 @@ export type { UploadHandlerPart, UploadHandler, } from "./lib/server-runtime/formData";

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

@@ -74,3 +70,3 @@ export type { DataFunctionArgs, HeadersArgs, HeadersFunction, } from "./lib/server-runtime/routeModules";

/** @internal */
export { initFogOfWar as UNSAFE_initFogOfWar, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, } from "./lib/dom/ssr/fog-of-war";
export { getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, } from "./lib/dom/ssr/fog-of-war";
/** @internal */

@@ -77,0 +73,0 @@ export type { RouteModules as UNSAFE_RouteModules } from "./lib/dom/ssr/routeModules";

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

import type { FutureConfig, HydrationState, RelativeRoutingType, Router as RemixRouter } from "./router/router";
import type { AgnosticPatchRoutesOnMissFunction, 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 PatchRoutesOnMissFunction extends AgnosticPatchRoutesOnMissFunction<RouteMatch> {
}
/**

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

initialIndex?: number;
unstable_dataStrategy?: DataStrategyFunction;
unstable_patchRoutesOnMiss?: PatchRoutesOnMissFunction;
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"> {

@@ -54,0 +56,0 @@ router: Router;

@@ -5,3 +5,2 @@ import type { HydrationState, Router as RemixRouter } from "../router/router";

export type WindowRemixContext = {
ssrMatches: string[];
basename?: string;

@@ -36,3 +35,3 @@ state: HydrationState;

var __remixRouter: RemixRouter | undefined;
var __remixRevalidation: number | undefined;
var __remixHdrActive: boolean;
var __remixClearCriticalCss: (() => void) | undefined;

@@ -39,0 +38,0 @@ var $RefreshRuntime$: {

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

import type { DiscoverBehavior, PrefetchBehavior, ScriptsProps } from "./ssr/components";
import type { PatchRoutesOnMissFunction } 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_patchRoutesOnMiss?: PatchRoutesOnMissFunction;
dataStrategy?: DataStrategyFunction;
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
window?: Window;

@@ -19,0 +18,0 @@ }

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 { PatchRoutesOnMissFunction } from "../../components";
import type { PatchRoutesOnNavigationFunction } from "../../context";
import type { Router as RemixRouter } from "../../router/router";

@@ -12,7 +12,2 @@ import type { AssetsManifest } from "./entry";

}
type FogOfWarInfo = {
nextPaths: Set<string>;
knownGoodPaths: Set<string>;
known404Paths: Set<string>;
};
export declare function isFogOfWarEnabled(isSpaMode: boolean): boolean;

@@ -32,8 +27,4 @@ export declare function getPartialManifest(manifest: AssetsManifest, router: RemixRouter): {

};
export declare function initFogOfWar(manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean, basename: string | undefined): {
enabled: boolean;
patchRoutesOnMiss?: PatchRoutesOnMissFunction;
};
export declare function getPatchRoutesOnNavigationFunction(manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean, basename: string | undefined): PatchRoutesOnNavigationFunction | undefined;
export declare function useFogOFWarDiscovery(router: RemixRouter, manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean): void;
export declare function fetchAndApplyManifestPatches(paths: string[], _fogOfWar: FogOfWarInfo, manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean, basename: string | undefined, patchRoutes: RemixRouter["patchRoutes"]): Promise<void>;
export {};
export declare function fetchAndApplyManifestPatches(paths: string[], manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean, basename: string | undefined, patchRoutes: RemixRouter["patchRoutes"]): Promise<void>;

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

import type { History, Location, Path, To } from "./history";
import { Action as NavigationType } from "./history";
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DataStrategyFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch, AgnosticPatchRoutesOnMissFunction, DataWithResponseInit } from "./utils";
import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticRouteObject, DataStrategyFunction, FormEncType, HTMLFormMethod, MapRoutePropertiesFunction, RouteData, Submission, UIMatch, AgnosticPatchRoutesOnNavigationFunction, DataWithResponseInit } from "./utils";
/**

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

window?: Window;
unstable_patchRoutesOnMiss?: AgnosticPatchRoutesOnMissFunction;
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>;

@@ -307,0 +307,0 @@ }

@@ -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 AgnosticPatchRoutesOnMissFunction<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;
ssrMatches: 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 {};
import type { StaticHandler } from "../router/router";
import type { DataStrategyFunction } from "../router/utils";
import { type SingleFetchRedirectResult, type SingleFetchResult, type SingleFetchResults, SingleFetchRedirectSymbol } from "../dom/ssr/single-fetch";
import type { SingleFetchRedirectResult, SingleFetchResult, SingleFetchResults } from "../dom/ssr/single-fetch";
import { SingleFetchRedirectSymbol } from "../dom/ssr/single-fetch";
import type { AppLoadContext } from "./data";

@@ -24,3 +25,3 @@ import { ServerMode } from "./mode";

}>;
export declare function getSingleFetchRedirect(status: number, headers: Headers): SingleFetchRedirectResult;
export declare function getSingleFetchRedirect(status: number, headers: Headers, basename: string | undefined): SingleFetchRedirectResult;
type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {

@@ -27,0 +28,0 @@ [key: PropertyKey]: Serializable;

/**
* React Router v0.0.0-nightly-bf23aaf61-20240802
* React Router v0.0.0-nightly-bf7ecb711-20240911
*

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

/**
* React Router v0.0.0-nightly-bf23aaf61-20240802
* React Router v0.0.0-nightly-bf7ecb711-20240911
*

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

/**
* React Router v0.0.0-nightly-bf23aaf61-20240802
* React Router v0.0.0-nightly-bf7ecb711-20240911
*

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

import * as ReactDOM from 'react-dom';
import { UNSAFE_invariant, UNSAFE_useFogOFWarDiscovery, UNSAFE_FrameworkContext, UNSAFE_RemixErrorBoundary, UNSAFE_decodeViaTurboStream, UNSAFE_createClientRoutes, matchRoutes, UNSAFE_shouldHydrateRouteLoader, UNSAFE_deserializeErrors, UNSAFE_initFogOfWar, UNSAFE_createRouter, UNSAFE_createBrowserHistory, UNSAFE_mapRouteProperties, UNSAFE_getSingleFetchDataStrategy, UNSAFE_createClientRoutesWithHMRRevalidationOptOut, RouterProvider as RouterProvider$1 } from 'react-router';
import { UNSAFE_invariant, UNSAFE_useFogOFWarDiscovery, UNSAFE_FrameworkContext, UNSAFE_RemixErrorBoundary, UNSAFE_decodeViaTurboStream, UNSAFE_createClientRoutes, matchRoutes, UNSAFE_shouldHydrateRouteLoader, UNSAFE_deserializeErrors, UNSAFE_createRouter, UNSAFE_createBrowserHistory, UNSAFE_mapRouteProperties, UNSAFE_getSingleFetchDataStrategy, UNSAFE_getPatchRoutesOnNavigationFunction, UNSAFE_createClientRoutesWithHMRRevalidationOptOut, RouterProvider as RouterProvider$1 } from 'react-router';

@@ -76,21 +76,2 @@ let ssrInfo = null;

let initialMatches = matchRoutes(routes, window.location, window.__remixContext?.basename);
// Hard reload if the matches we rendered on the server aren't the matches
// we matched in the client, otherwise we'll try to hydrate without the
// right modules and throw a hydration error, which can put React into an
// infinite hydration loop when hydrating the full `<html>` document.
// 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.
let ssrMatches = ssrInfo.context.ssrMatches;
let hasDifferentSSRMatches = (initialMatches || []).length !== ssrMatches.length || !(initialMatches || []).every((m, i) => ssrMatches[i] === m.route.id);
if (hasDifferentSSRMatches && !ssrInfo.context.isSpaMode) {
let ssr = ssrMatches.join(",");
let client = (initialMatches || []).map(m => m.route.id).join(",");
let errorMsg = `SSR Matches (${ssr}) do not match client matches (${client}) at ` + `time of hydration , reloading page...`;
console.error(errorMsg);
window.location.reload();
throw new Error("SSR/Client mismatch - reloading current URL");
}
if (initialMatches) {

@@ -123,6 +104,2 @@ for (let match of initialMatches) {

}
let {
enabled: isFogOfWarEnabled,
patchRoutesOnMiss
} = UNSAFE_initFogOfWar(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename);

@@ -137,6 +114,4 @@ // We don't use createBrowserRouter here because we need fine-grained control

mapRouteProperties: UNSAFE_mapRouteProperties,
unstable_dataStrategy: UNSAFE_getSingleFetchDataStrategy(ssrInfo.manifest, ssrInfo.routeModules),
...(isFogOfWarEnabled ? {
unstable_patchRoutesOnMiss: patchRoutesOnMiss
} : {})
dataStrategy: UNSAFE_getSingleFetchDataStrategy(ssrInfo.manifest, ssrInfo.routeModules, () => router),
patchRoutesOnNavigation: UNSAFE_getPatchRoutesOnNavigationFunction(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename)
});

@@ -143,0 +118,0 @@ ssrInfo.router = router;

/**
* React Router v0.0.0-nightly-bf23aaf61-20240802
* React Router v0.0.0-nightly-bf7ecb711-20240911
*

@@ -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_initFogOfWar as c,UNSAFE_createRouter as m,UNSAFE_createBrowserHistory as f,UNSAFE_mapRouteProperties as x,UNSAFE_getSingleFetchDataStrategy as w,UNSAFE_createClientRoutesWithHMRRevalidationOptOut as M,RouterProvider as h}from"react-router";let p=null,g=null;function S(){if(!p&&window.__remixContext&&window.__remixManifest&&window.__remixRouteModules&&(p={context:window.__remixContext,manifest:window.__remixManifest,routeModules:window.__remixRouteModules,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.__remixContext?.basename),o=p.context.ssrMatches;if(((e||[]).length!==o.length||!(e||[]).every(((e,t)=>o[t]===e.route.id)))&&!p.context.isSpaMode){let t=`SSR Matches (${o.join(",")}) do not match client matches (${(e||[]).map((e=>e.route.id)).join(",")}) at time of hydration , reloading page...`;throw console.error(t),window.location.reload(),new Error("SSR/Client mismatch - reloading current URL")}if(e)for(let r of e){let e=r.route.id,o=p.routeModules[e],i=p.manifest.routes[e];o&&l(i,o,p.context.isSpaMode)&&(o.HydrateFallback||!i.hasLoader)?t.loaderData[e]=void 0:i&&!i.hasLoader&&(t.loaderData[e]=null)}t&&t.errors&&(t.errors=d(t.errors))}let{enabled:i,patchRoutesOnMiss:a}=c(p.manifest,p.routeModules,p.context.isSpaMode,p.context.basename),h=m({routes:r,history:f(),basename:p.context.basename,hydrationData:t,mapRouteProperties:x,unstable_dataStrategy:w(p.manifest,p.routeModules),...i?{unstable_patchRoutesOnMiss:a}:{}});return p.router=h,h.state.initialized&&(p.routerInitialized=!0,h.initialize()),h.createRoutesForHMR=M,window.__remixRouter=h,h}function _(){g||(g=S());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(i.Provider,{value:{manifest:p.manifest,routeModules:p.routeModules,future:p.context.future,criticalCss:t,isSpaMode:p.context.isSpaMode}},e.createElement(a,{location:s},e.createElement(R,{router:g}))),e.createElement(e.Fragment,null))}function R(o){return e.createElement(h,Object.assign({flushSync:t.flushSync},o))}export{_ 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 i,UNSAFE_RemixErrorBoundary as a,UNSAFE_decodeViaTurboStream as n,UNSAFE_createClientRoutes as s,matchRoutes as u,UNSAFE_shouldHydrateRouteLoader as d,UNSAFE_deserializeErrors as l,UNSAFE_createRouter as c,UNSAFE_createBrowserHistory as m,UNSAFE_mapRouteProperties as f,UNSAFE_getSingleFetchDataStrategy as x,UNSAFE_getPatchRoutesOnNavigationFunction as w,UNSAFE_createClientRoutesWithHMRRevalidationOptOut as M,RouterProvider as p}from"react-router";let g=null,_=null;function D(){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;if(!g.stateDecodingPromise){let t=g.context.stream;t||o(!1),g.context.stream=void 0,g.stateDecodingPromise=n(t,window).then((t=>{g.context.state=t.value,e.stateDecodingPromise.value=!0})).catch((t=>{e.stateDecodingPromise.error=t}))}if(g.stateDecodingPromise.error)throw g.stateDecodingPromise.error;if(!g.stateDecodingPromise.value)throw g.stateDecodingPromise;let t,r=s(g.manifest.routes,g.routeModules,g.context.state,g.context.isSpaMode);if(!g.context.isSpaMode){t={...g.context.state,loaderData:{...g.context.state.loaderData}};let e=u(r,window.location,window.__remixContext?.basename);if(e)for(let o of e){let e=o.route.id,r=g.routeModules[e],i=g.manifest.routes[e];r&&d(i,r,g.context.isSpaMode)&&(r.HydrateFallback||!i.hasLoader)?t.loaderData[e]=void 0:i&&!i.hasLoader&&(t.loaderData[e]=null)}t&&t.errors&&(t.errors=l(t.errors))}let i=c({routes:r,history:m(),basename:g.context.basename,hydrationData:t,mapRouteProperties:f,dataStrategy:x(g.manifest,g.routeModules,(()=>i)),patchRoutesOnNavigation:w(g.manifest,g.routeModules,g.context.isSpaMode,g.context.basename)});return g.router=i,i.state.initialized&&(g.routerInitialized=!0,i.initialize()),i.createRoutesForHMR=M,window.__remixRouter=i,i}function S(){_||(_=D());let[t,n]=e.useState(void 0),[s,u]=e.useState(_.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(_,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(h,{router:_}))),e.createElement(e.Fragment,null))}function h(o){return e.createElement(p,Object.assign({flushSync:t.flushSync},o))}export{S as HydratedRouter,h as RouterProvider};
//# sourceMappingURL=react-router-dom.production.min.js.map
/**
* React Router v0.0.0-nightly-bf23aaf61-20240802
* React Router v0.0.0-nightly-bf7ecb711-20240911
*

@@ -111,21 +111,2 @@ * Copyright (c) Remix Software Inc.

let initialMatches = reactRouter.matchRoutes(routes, window.location, (_window$__remixContex = window.__remixContext) == null ? void 0 : _window$__remixContex.basename);
// Hard reload if the matches we rendered on the server aren't the matches
// we matched in the client, otherwise we'll try to hydrate without the
// right modules and throw a hydration error, which can put React into an
// infinite hydration loop when hydrating the full `<html>` document.
// 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.
let ssrMatches = ssrInfo.context.ssrMatches;
let hasDifferentSSRMatches = (initialMatches || []).length !== ssrMatches.length || !(initialMatches || []).every((m, i) => ssrMatches[i] === m.route.id);
if (hasDifferentSSRMatches && !ssrInfo.context.isSpaMode) {
let ssr = ssrMatches.join(",");
let client = (initialMatches || []).map(m => m.route.id).join(",");
let errorMsg = "SSR Matches (" + ssr + ") do not match client matches (" + client + ") at " + "time of hydration , reloading page...";
console.error(errorMsg);
window.location.reload();
throw new Error("SSR/Client mismatch - reloading current URL");
}
if (initialMatches) {

@@ -158,10 +139,6 @@ for (let match of initialMatches) {

}
let {
enabled: isFogOfWarEnabled,
patchRoutesOnMiss
} = reactRouter.UNSAFE_initFogOfWar(ssrInfo.manifest, ssrInfo.routeModules, ssrInfo.context.isSpaMode, ssrInfo.context.basename);
// We don't use createBrowserRouter here because we need fine-grained control
// over initialization to support synchronous `clientLoader` flows.
let router = reactRouter.UNSAFE_createRouter(_extends({
let router = reactRouter.UNSAFE_createRouter({
routes,

@@ -172,6 +149,5 @@ history: reactRouter.UNSAFE_createBrowserHistory(),

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

@@ -178,0 +154,0 @@

/**
* React Router v0.0.0-nightly-bf23aaf61-20240802
* React Router v0.0.0-nightly-bf7ecb711-20240911
*

@@ -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,r,o){"use strict";function i(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 a=i(t),n=i(r);function s(){return s=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},s.apply(this,arguments)}let u=null,c=null;function d(){if(!u&&window.__remixContext&&window.__remixManifest&&window.__remixRouteModules&&(u={context:window.__remixContext,manifest:window.__remixManifest,routeModules:window.__remixRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}),!u)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=u;if(!u.stateDecodingPromise){let t=u.context.stream;t||o.UNSAFE_invariant(!1),u.context.stream=void 0,u.stateDecodingPromise=o.UNSAFE_decodeViaTurboStream(t,window).then((t=>{u.context.state=t.value,e.stateDecodingPromise.value=!0})).catch((t=>{e.stateDecodingPromise.error=t}))}if(u.stateDecodingPromise.error)throw u.stateDecodingPromise.error;if(!u.stateDecodingPromise.value)throw u.stateDecodingPromise;let t,r=o.UNSAFE_createClientRoutes(u.manifest.routes,u.routeModules,u.context.state,u.context.isSpaMode);if(!u.context.isSpaMode){var i;t=s({},u.context.state,{loaderData:s({},u.context.state.loaderData)});let e=o.matchRoutes(r,window.location,null==(i=window.__remixContext)?void 0:i.basename),a=u.context.ssrMatches;if(((e||[]).length!==a.length||!(e||[]).every(((e,t)=>a[t]===e.route.id)))&&!u.context.isSpaMode){let t="SSR Matches ("+a.join(",")+") do not match client matches ("+(e||[]).map((e=>e.route.id)).join(",")+") at time of hydration , reloading page...";throw console.error(t),window.location.reload(),new Error("SSR/Client mismatch - reloading current URL")}if(e)for(let r of e){let e=r.route.id,i=u.routeModules[e],a=u.manifest.routes[e];i&&o.UNSAFE_shouldHydrateRouteLoader(a,i,u.context.isSpaMode)&&(i.HydrateFallback||!a.hasLoader)?t.loaderData[e]=void 0:a&&!a.hasLoader&&(t.loaderData[e]=null)}t&&t.errors&&(t.errors=o.UNSAFE_deserializeErrors(t.errors))}let{enabled:a,patchRoutesOnMiss:n}=o.UNSAFE_initFogOfWar(u.manifest,u.routeModules,u.context.isSpaMode,u.context.basename),c=o.UNSAFE_createRouter(s({routes:r,history:o.UNSAFE_createBrowserHistory(),basename:u.context.basename,hydrationData:t,mapRouteProperties:o.UNSAFE_mapRouteProperties,unstable_dataStrategy:o.UNSAFE_getSingleFetchDataStrategy(u.manifest,u.routeModules)},a?{unstable_patchRoutesOnMiss:n}:{}));return u.router=c,c.state.initialized&&(u.routerInitialized=!0,c.initialize()),c.createRoutesForHMR=o.UNSAFE_createClientRoutesWithHMRRevalidationOptOut,window.__remixRouter=c,c}function l(e){return a.createElement(o.RouterProvider,s({flushSync:n.flushSync},e))}e.HydratedRouter=function(){c||(c=d());let[e,t]=a.useState(void 0),[r,i]=a.useState(c.state.location);return a.useLayoutEffect((()=>{u&&u.router&&!u.routerInitialized&&(u.routerInitialized=!0,u.router.initialize())}),[]),a.useLayoutEffect((()=>{if(u&&u.router)return u.router.subscribe((e=>{e.location!==r&&i(e.location)}))}),[r]),u||o.UNSAFE_invariant(!1),o.UNSAFE_useFogOFWarDiscovery(c,u.manifest,u.routeModules,u.context.isSpaMode),a.createElement(a.Fragment,null,a.createElement(o.UNSAFE_FrameworkContext.Provider,{value:{manifest:u.manifest,routeModules:u.routeModules,future:u.context.future,criticalCss:e,isSpaMode:u.context.isSpaMode}},a.createElement(o.UNSAFE_RemixErrorBoundary,{location:r},a.createElement(l,{router:c}))),a.createElement(a.Fragment,null))},e.RouterProvider=l,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 i(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 a=i(t),n=i(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.__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;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 i;t=u({},s.context.state,{loaderData:u({},s.context.state.loaderData)});let e=o.matchRoutes(r,window.location,null==(i=window.__remixContext)?void 0:i.basename);if(e)for(let r of e){let e=r.route.id,i=s.routeModules[e],a=s.manifest.routes[e];i&&o.UNSAFE_shouldHydrateRouteLoader(a,i,s.context.isSpaMode)&&(i.HydrateFallback||!a.hasLoader)?t.loaderData[e]=void 0:a&&!a.hasLoader&&(t.loaderData[e]=null)}t&&t.errors&&(t.errors=o.UNSAFE_deserializeErrors(t.errors))}let a=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,(()=>a)),patchRoutesOnNavigation:o.UNSAFE_getPatchRoutesOnNavigationFunction(s.manifest,s.routeModules,s.context.isSpaMode,s.context.basename)});return s.router=a,a.state.initialized&&(s.routerInitialized=!0,a.initialize()),a.createRoutesForHMR=o.UNSAFE_createClientRoutesWithHMRRevalidationOptOut,window.__remixRouter=a,a}function l(e){return a.createElement(o.RouterProvider,u({flushSync:n.flushSync},e))}e.HydratedRouter=function(){c||(c=d());let[e,t]=a.useState(void 0),[r,i]=a.useState(c.state.location);return a.useLayoutEffect((()=>{s&&s.router&&!s.routerInitialized&&(s.routerInitialized=!0,s.router.initialize())}),[]),a.useLayoutEffect((()=>{if(s&&s.router)return s.router.subscribe((e=>{e.location!==r&&i(e.location)}))}),[r]),s||o.UNSAFE_invariant(!1),o.UNSAFE_useFogOFWarDiscovery(c,s.manifest,s.routeModules,s.context.isSpaMode),a.createElement(a.Fragment,null,a.createElement(o.UNSAFE_FrameworkContext.Provider,{value:{manifest:s.manifest,routeModules:s.routeModules,future:s.context.future,criticalCss:e,isSpaMode:s.context.isSpaMode}},a.createElement(o.UNSAFE_RemixErrorBoundary,{location:r},a.createElement(l,{router:c}))),a.createElement(a.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-bf23aaf61-20240802",
"version": "0.0.0-nightly-bf7ecb711-20240911",
"description": "Declarative routing for React",

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

"source-map": "^0.7.3",
"turbo-stream": "^2.2.0",
"react-router": "0.0.0-nightly-bf23aaf61-20240802"
"turbo-stream": "2.4.0",
"react-router": "0.0.0-nightly-bf7ecb711-20240911"
},

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