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

react-router

Package Overview
Dependencies
Maintainers
0
Versions
588
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-d1bb8941a-20240920 to 0.0.0-nightly-d294ab274-20241007

dist/lib/dom-export.d.ts

8

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, 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 type { HydrationState, StaticHandler, GetScrollPositionFunction, GetScrollRestorationKeyFunction, StaticHandlerContext, Fetcher, Navigation, NavigationStates, RelativeRoutingType, Blocker, BlockerFunction, Router as DataRouter, RouterState, RouterInit, RouterSubscriber, RouterNavigateOptions, RouterFetchOptions, RevalidationState, } from "./lib/router/router";
export type { ActionFunction, ActionFunctionArgs, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, DataWithResponseInit as UNSAFE_DataWithResponseInit, ErrorResponse, FormEncType, FormMethod, HTMLFormMethod, 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";

@@ -13,3 +13,3 @@ export { IDLE_NAVIGATION, IDLE_FETCHER, IDLE_BLOCKER, } from "./lib/router/router";

export type { BrowserRouterProps, HashRouterProps, HistoryRouterProps, LinkProps, NavLinkProps, NavLinkRenderProps, FetcherFormProps, FormProps, ScrollRestorationProps, SetURLSearchParams, SubmitFunction, FetcherSubmitFunction, FetcherWithComponents, } from "./lib/dom/lib";
export { createBrowserRouter, createHashRouter, BrowserRouter, HashRouter, Link, 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 { createBrowserRouter, createHashRouter, BrowserRouter, HashRouter, Link, HistoryRouter as unstable_HistoryRouter, NavLink, Form, ScrollRestoration, useLinkClickHandler, useSearchParams, useSubmit, useFormAction, useFetcher, useFetchers, useBeforeUnload, usePrompt as unstable_usePrompt, useViewTransitionState, } from "./lib/dom/lib";
export type { FetcherSubmitOptions, ParamKeyValuePair, SubmitOptions, URLSearchParamsInit, SubmitTarget, } from "./lib/dom/dom";

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

export type { PageLinkDescriptor, HtmlLinkDescriptor, LinkDescriptor, } from "./lib/router/links";
export type { TypedResponse } from "./lib/server-runtime/responses";
export type { TypedResponse, JsonFunction, } from "./lib/server-runtime/responses";
export type { DataFunctionArgs, HeadersArgs, HeadersFunction, } from "./lib/server-runtime/routeModules";

@@ -43,0 +43,0 @@ export type { RequestHandler } from "./lib/server-runtime/server";

import * as React from "react";
import type { InitialEntry, Location, To } from "./router/history";
import { Action as NavigationType } from "./router/history";
import type { FutureConfig, HydrationState, RelativeRoutingType, Router as RemixRouter } from "./router/router";
import type { FutureConfig, HydrationState, RelativeRoutingType, Router as DataRouter } from "./router/router";
import type { DataStrategyFunction, LazyRouteFunction, TrackedPromise } from "./router/utils";

@@ -24,5 +24,5 @@ import type { IndexRouteObject, Navigator, NonIndexRouteObject, PatchRoutesOnNavigationFunction, RouteMatch, RouteObject } from "./context";

patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
}): RemixRouter;
}): DataRouter;
export interface RouterProviderProps {
router: RemixRouter;
router: DataRouter;
flushSync?: (fn: () => unknown) => undefined;

@@ -29,0 +29,0 @@ }

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

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

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

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

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

import * as React from "react";
import type { History, To } from "../router/history";
import type { BlockerFunction, Fetcher, FutureConfig, GetScrollRestorationKeyFunction, HydrationState, RelativeRoutingType, Router as RemixRouter } from "../router/router";
import type { BlockerFunction, Fetcher, FutureConfig, GetScrollRestorationKeyFunction, HydrationState, RelativeRoutingType, Router as DataRouter } from "../router/router";
import type { DataStrategyFunction, HTMLFormMethod } from "../router/utils";

@@ -20,7 +20,7 @@ import "./global";

*/
export declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): RemixRouter;
export declare function createBrowserRouter(routes: RouteObject[], opts?: DOMRouterOpts): DataRouter;
/**
* @category Routers
*/
export declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): RemixRouter;
export declare function createHashRouter(routes: RouteObject[], opts?: DOMRouterOpts): DataRouter;
/**

@@ -27,0 +27,0 @@ * @category Types

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

@@ -19,3 +19,3 @@ export interface StaticRouterProps {

context: StaticHandlerContext;
router: RemixRouter;
router: DataRouter;
hydrate?: boolean;

@@ -41,3 +41,3 @@ nonce?: string;

future?: Partial<FutureConfig>;
}): RemixRouter;
}): DataRouter;
export {};

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

import type { Router as RemixRouter } from "../../router/router";
export declare function deserializeErrors(errors: RemixRouter["state"]["errors"]): RemixRouter["state"]["errors"];
import type { RouterState } from "../../router/router";
export declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
import type { PatchRoutesOnNavigationFunction } from "../../context";
import type { Router as RemixRouter } from "../../router/router";
import type { Router as DataRouter } from "../../router/router";
import type { AssetsManifest } from "./entry";

@@ -13,3 +13,3 @@ import type { RouteModules } from "./routeModules";

export declare function isFogOfWarEnabled(isSpaMode: boolean): boolean;
export declare function getPartialManifest(manifest: AssetsManifest, router: RemixRouter): {
export declare function getPartialManifest(manifest: AssetsManifest, router: DataRouter): {
routes: {};

@@ -28,3 +28,3 @@ entry: {

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[], manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean, basename: string | undefined, patchRoutes: RemixRouter["patchRoutes"]): Promise<void>;
export declare function useFogOFWarDiscovery(router: DataRouter, manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean): void;
export declare function fetchAndApplyManifestPatches(paths: string[], manifest: AssetsManifest, routeModules: RouteModules, isSpaMode: boolean, basename: string | undefined, patchRoutes: DataRouter["patchRoutes"]): Promise<void>;
import * as React from "react";
import type { Router as RemixRouter } from "../../router/router";
import type { Router as DataRouter } from "../../router/router";
import type { DataStrategyFunction } from "../../router/utils";

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

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

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

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

import { Action as NavigationType } from "./router/history";
import type { Blocker, BlockerFunction, RelativeRoutingType, Router as RemixRouter, RevalidationState } from "./router/router";
import type { Blocker, BlockerFunction, RelativeRoutingType, Router as DataRouter, RevalidationState } from "./router/router";
import type { ParamParseKey, Params, PathMatch, PathPattern, UIMatch } from "./router/utils";

@@ -191,3 +191,3 @@ /**

*/
export declare function useRoutesImpl(routes: RouteObject[], locationArg?: Partial<Location> | string, dataRouterState?: RemixRouter["state"], future?: RemixRouter["future"]): React.ReactElement | null;
export declare function useRoutesImpl(routes: RouteObject[], locationArg?: Partial<Location> | string, dataRouterState?: DataRouter["state"], future?: DataRouter["future"]): React.ReactElement | null;
type RenderErrorBoundaryProps = React.PropsWithChildren<{

@@ -218,3 +218,3 @@ location: Location;

}
export declare function _renderMatches(matches: RouteMatch[] | null, parentMatches?: RouteMatch[], dataRouterState?: RemixRouter["state"] | null, future?: RemixRouter["future"] | null): React.ReactElement | null;
export declare function _renderMatches(matches: RouteMatch[] | null, parentMatches?: RouteMatch[], dataRouterState?: DataRouter["state"] | null, future?: DataRouter["future"] | null): React.ReactElement | null;
/**

@@ -221,0 +221,0 @@ * Returns the ID for the nearest contextual route

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

import type { JsonFunction } from "../server-runtime/responses";
import type { Location, Path, To } from "./history";

@@ -426,3 +427,2 @@ /**

export declare const normalizeHash: (hash: string) => string;
export type JsonFunction = <Data>(data: Data, init?: number | ResponseInit) => Response;
/**

@@ -429,0 +429,0 @@ * This is a shortcut for creating `application/json` responses. Converts `data`

@@ -15,15 +15,2 @@ import type { ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs } from "./routeModules";

export type AppData = unknown;
export declare function callRouteAction({ loadContext, action, params, request, routeId, }: {
request: Request;
action: ActionFunction;
params: ActionFunctionArgs["params"];
loadContext: AppLoadContext;
routeId: string;
}): Promise<{} | Response | null>;
export declare function callRouteLoader({ loadContext, loader, params, request, routeId, }: {
request: Request;
loader: LoaderFunction;
params: LoaderFunctionArgs["params"];
loadContext: AppLoadContext;
routeId: string;
}): Promise<{} | Response | null>;
export declare function callRouteHandler(handler: LoaderFunction | ActionFunction, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<{} | Response | null>;

@@ -26,3 +26,3 @@ import type { StaticHandler } from "../router/router";

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

@@ -29,0 +29,0 @@ } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;

/**
* React Router v0.0.0-nightly-d1bb8941a-20240920
* React Router v0.0.0-nightly-d294ab274-20241007
*

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

/**
* React Router v0.0.0-nightly-d1bb8941a-20240920
* React Router v0.0.0-nightly-d294ab274-20241007
*

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

/**
* React Router v0.0.0-nightly-d1bb8941a-20240920
* React Router v0.0.0-nightly-d294ab274-20241007
*

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

@@ -37,3 +37,3 @@ router: undefined,

// We need to suspend until the initial state snapshot is decoded into
// window.__remixContext.state
// window.__reactRouterContext.state

@@ -76,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) {

@@ -88,3 +88,3 @@ for (let match of initialMatches) {

if (route && UNSAFE_shouldHydrateRouteLoader(manifestRoute, route, ssrInfo.context.isSpaMode) && (route.HydrateFallback || !manifestRoute.hasLoader)) {
hydrationData.loaderData[routeId] = undefined;
delete hydrationData.loaderData[routeId];
} else if (manifestRoute && !manifestRoute.hasLoader) {

@@ -130,3 +130,3 @@ // Since every Remix route gets a `loader` on the client side to load

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

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

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

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

/**
* React Router v0.0.0-nightly-d1bb8941a-20240920
* React Router v0.0.0-nightly-d294ab274-20241007
*

@@ -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 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};
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)?delete t.loaderData[e]: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.__reactRouterDataRouter=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-d1bb8941a-20240920
* React Router v0.0.0-nightly-d294ab274-20241007
*

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

@@ -75,3 +75,3 @@ router: undefined,

// We need to suspend until the initial state snapshot is decoded into
// window.__remixContext.state
// window.__reactRouterContext.state

@@ -102,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.

@@ -113,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) {

@@ -125,3 +125,3 @@ for (let match of initialMatches) {

if (route && reactRouter.UNSAFE_shouldHydrateRouteLoader(manifestRoute, route, ssrInfo.context.isSpaMode) && (route.HydrateFallback || !manifestRoute.hasLoader)) {
hydrationData.loaderData[routeId] = undefined;
delete hydrationData.loaderData[routeId];
} else if (manifestRoute && !manifestRoute.hasLoader) {

@@ -167,3 +167,3 @@ // Since every Remix route gets a `loader` on the client side to load

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

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

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

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

/**
* React Router v0.0.0-nightly-d1bb8941a-20240920
* React Router v0.0.0-nightly-d294ab274-20241007
*

@@ -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 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})}));
!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)?delete t.loaderData[e]: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.__reactRouterDataRouter=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-d1bb8941a-20240920",
"version": "0.0.0-nightly-d294ab274-20241007",
"description": "Declarative routing for React",

@@ -31,2 +31,5 @@ "keywords": [

},
"./types": {
"types": "./dist/lib/types.d.ts"
},
"./dom": {

@@ -46,3 +49,3 @@ "types": "./dist/dom-export.d.ts",

"turbo-stream": "2.4.0",
"react-router": "0.0.0-nightly-d1bb8941a-20240920"
"react-router": "0.0.0-nightly-d294ab274-20241007"
},

@@ -49,0 +52,0 @@ "devDependencies": {

# React Router
The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all the core functionality.
If you'd like to extend React Router and you know what you're doing, you should
add `react-router` **as a peer dependency, not a regular dependency** in your
package.

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