react-router
Advanced tools
Comparing version 0.0.0-nightly-9bf91e47c-20240822 to 0.0.0-nightly-a096ebc81-20240919
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"; | ||
@@ -46,3 +45,3 @@ export type { ServerRouterProps } from "./lib/dom/ssr/server"; | ||
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"; | ||
@@ -49,0 +48,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): { |
@@ -5,3 +5,2 @@ import type { HydrationState, Router as RemixRouter } from "../router/router"; | ||
export type WindowRemixContext = { | ||
url: 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 { 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 { 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; |
/** | ||
* React Router v0.0.0-nightly-9bf91e47c-20240822 | ||
* React Router v0.0.0-nightly-a096ebc81-20240919 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* React Router v0.0.0-nightly-9bf91e47c-20240822 | ||
* React Router v0.0.0-nightly-a096ebc81-20240919 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* React Router v0.0.0-nightly-9bf91e47c-20240822 | ||
* React Router v0.0.0-nightly-a096ebc81-20240919 | ||
* | ||
@@ -35,18 +35,2 @@ * Copyright (c) Remix Software Inc. | ||
// 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 | ||
@@ -128,4 +112,4 @@ // window.__remixContext.state | ||
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) | ||
}); | ||
@@ -132,0 +116,0 @@ ssrInfo.router = router; |
/** | ||
* React Router v0.0.0-nightly-9bf91e47c-20240822 | ||
* React Router v0.0.0-nightly-a096ebc81-20240919 | ||
* | ||
@@ -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 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-9bf91e47c-20240822 | ||
* React Router v0.0.0-nightly-a096ebc81-20240919 | ||
* | ||
@@ -73,18 +73,2 @@ * Copyright (c) Remix Software Inc. | ||
// 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 | ||
@@ -164,4 +148,4 @@ // window.__remixContext.state | ||
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) | ||
}); | ||
@@ -168,0 +152,0 @@ ssrInfo.router = router; |
/** | ||
* React Router v0.0.0-nightly-9bf91e47c-20240822 | ||
* React Router v0.0.0-nightly-a096ebc81-20240919 | ||
* | ||
@@ -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 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-9bf91e47c-20240822", | ||
"version": "0.0.0-nightly-a096ebc81-20240919", | ||
"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-9bf91e47c-20240822" | ||
"turbo-stream": "2.4.0", | ||
"react-router": "0.0.0-nightly-a096ebc81-20240919" | ||
}, | ||
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6554477
42036
91
+ Addedturbo-stream@2.4.0(transitive)
- Removedturbo-stream@2.3.0(transitive)
Updatedturbo-stream@2.4.0