You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-router

Package Overview
Dependencies
Maintainers
4
Versions
914
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

to
0.0.0-experimental-b65537812

dist/development/browser-DYcG-QSM.d.mts

3

dist/development/dom-export.d.ts
import * as React from 'react';
import { R as RouterProviderProps$1 } from './fog-of-war-k8KWkMZc.js';
import { R as RouterInit } from './route-data-BvrN3Sw4.js';
import { RouterProviderProps as RouterProviderProps$1, RouterInit } from 'react-router';

@@ -5,0 +4,0 @@ type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;

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

import { a as Router, b as RouteModules, D as DataStrategyFunction, T as To, c as RelativeRoutingType, L as Location, A as Action, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, N as NavigateOptions, g as Params$1, h as RouteObject, i as Navigation, j as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, k as Blocker, l as StaticHandlerContext, m as StaticHandler, F as FutureConfig, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as unstable_InitialContext, n as IndexRouteObject, o as LoaderFunction, p as ActionFunction, M as MetaFunction, q as LinksFunction, r as NonIndexRouteObject, s as MiddlewareEnabled, t as AppLoadContext, E as Equal, v as RouterState, w as DataRouteObject, x as ClientLoaderFunction } from './route-data-BvrN3Sw4.js';
export { V as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, aq as DataRouteMatch, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, z as Fetcher, $ as FormEncType, a0 as FormMethod, aF as Future, G as GetScrollPositionFunction, y as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ag as IDLE_BLOCKER, af as IDLE_FETCHER, ae as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, a3 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, J as NavigationStates, ar as Navigator, aC as PageLinkDescriptor, as as PatchRoutesOnNavigationFunction, at as PatchRoutesOnNavigationFunctionArgs, a5 as PathParam, a6 as RedirectFunction, au as RouteMatch, Q as RouterFetchOptions, R as RouterInit, O as RouterNavigateOptions, K as RouterSubscriber, a8 as ShouldRevalidateFunction, a9 as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, Z as UNSAFE_DataWithResponseInit, aK as UNSAFE_ErrorResponseImpl, aN as UNSAFE_FetchersContext, aO as UNSAFE_LocationContext, aP as UNSAFE_NavigationContext, aQ as UNSAFE_RouteContext, aR as UNSAFE_ViewTransitionContext, aH as UNSAFE_createBrowserHistory, aJ as UNSAFE_createRouter, aI as UNSAFE_invariant, ac as createPath, ah as data, ai as generatePath, aj as isRouteErrorResponse, ak as matchPath, al as matchRoutes, ad as parsePath, am as redirect, an as redirectDocument, ao as replace, ap as resolvePath, a4 as unstable_MiddlewareFunction, a7 as unstable_RouterContext, ab as unstable_RouterContextProvider, aG as unstable_SerializesTo, aa as unstable_createContext } from './route-data-BvrN3Sw4.js';
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild } from './fog-of-war-k8KWkMZc.js';
export { f as Await, a as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, v as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, w as FormProps, ah as HandleDataRequestFunction, ai as HandleDocumentRequestFunction, aj as HandleErrorFunction, T as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, s as LinkProps, ad as Links, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, ac as Meta, W as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, x as ScrollRestorationProps, ak as ServerEntryModule, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, an as UNSAFE_FrameworkContext, aq as UNSAFE_createClientRoutes, ar as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ao as UNSAFE_getPatchRoutesOnNavigationFunction, al as UNSAFE_hydrationRouteProperties, am as UNSAFE_mapRouteProperties, as as UNSAFE_shouldHydrateRouteLoader, ap as UNSAFE_useFogOFWarDiscovery, at as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-k8KWkMZc.js';
import { d as Router, e as RouteModules, D as DataStrategyFunction, I as InitialEntry, H as HydrationState, f as IndexRouteObject, g as LoaderFunction, A as ActionFunction, h as MetaFunction, i as LinksFunction, j as NonIndexRouteObject, k as unstable_InitialContext, l as MiddlewareEnabled, m as AppLoadContext, E as Equal, n as ClientActionFunction, o as ClientLoaderFunction, p as HeadersFunction, q as ShouldRevalidateFunction, a as Location, r as Params, s as RouterState, t as PatchRoutesOnNavigationFunction, v as DataRouteObject, w as Path } from './route-data-x_b_BLCv.js';
export { _ as ActionFunctionArgs, Q as Blocker, U as BlockerFunction, aF as ClientActionFunctionArgs, aG as ClientLoaderFunctionArgs, az as DataRouteMatch, $ as DataStrategyFunctionArgs, a0 as DataStrategyMatch, a1 as DataStrategyResult, a3 as ErrorResponse, F as Fetcher, a4 as FormEncType, a5 as FormMethod, aL as Future, y as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a6 as HTMLFormMethod, aH as HeadersArgs, aK as HtmlLinkDescriptor, ap as IDLE_BLOCKER, ao as IDLE_FETCHER, an as IDLE_NAVIGATION, a7 as LazyRouteFunction, L as LinkDescriptor, a8 as LoaderFunctionArgs, aI as MetaArgs, M as MetaDescriptor, aA as NavigateOptions, J as Navigation, K as NavigationStates, ak as NavigationType, aB as Navigator, aJ as PageLinkDescriptor, aa as ParamParseKey, aC as PatchRoutesOnNavigationFunctionArgs, ab as PathMatch, ac as PathParam, ad as PathPattern, ae as RedirectFunction, O as RelativeRoutingType, Z as RevalidationState, aD as RouteMatch, aE as RouteObject, Y as RouterFetchOptions, V as RouterInit, X as RouterNavigateOptions, W as RouterSubscriber, ag as ShouldRevalidateFunctionArgs, x as StaticHandler, B as StaticHandlerContext, T as To, ah as UIMatch, aR as UNSAFE_DataRouterContext, aS as UNSAFE_DataRouterStateContext, a2 as UNSAFE_DataWithResponseInit, aQ as UNSAFE_ErrorResponseImpl, aT as UNSAFE_FetchersContext, aU as UNSAFE_LocationContext, aV as UNSAFE_NavigationContext, aW as UNSAFE_RouteContext, aX as UNSAFE_ViewTransitionContext, aN as UNSAFE_createBrowserHistory, aP as UNSAFE_createRouter, aO as UNSAFE_invariant, al as createPath, aq as data, ar as generatePath, as as isRouteErrorResponse, at as matchPath, au as matchRoutes, am as parsePath, av as redirect, aw as redirectDocument, ax as replace, ay as resolvePath, a9 as unstable_MiddlewareFunction, af as unstable_RouterContext, aj as unstable_RouterContextProvider, aM as unstable_SerializesTo, ai as unstable_createContext } from './route-data-x_b_BLCv.js';
import { A as AssetsManifest, E as EntryContext, F as FutureConfig, R as RouteComponentType, H as HydrateFallbackType, a as ErrorBoundaryType, S as ServerBuild } from './index-react-server-client-unV28389.js';
export { h as Await, b as AwaitProps, af as BrowserRouter, $ as BrowserRouterProps, a0 as DOMRouterOpts, a6 as FetcherFormProps, ab as FetcherSubmitFunction, av as FetcherSubmitOptions, ac as FetcherWithComponents, ak as Form, a7 as FormProps, aM as HandleDataRequestFunction, aN as HandleDocumentRequestFunction, aO as HandleErrorFunction, ag as HashRouter, a1 as HashRouterProps, a2 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ah as Link, a3 as LinkProps, aI as Links, i as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, aH as Meta, aj as NavLink, a4 as NavLinkProps, a5 as NavLinkRenderProps, j as Navigate, t as NavigateFunction, N as NavigateProps, k as Outlet, O as OutletProps, aw as ParamKeyValuePair, P as PathRouteProps, aK as PrefetchPageLinks, l as Route, d as RouteProps, m as Router, e as RouterProps, n as RouterProvider, f as RouterProviderProps, o as Routes, g as RoutesProps, aJ as Scripts, aL as ScriptsProps, al as ScrollRestoration, a8 as ScrollRestorationProps, aP as ServerEntryModule, a9 as SetURLSearchParams, aF as StaticRouter, aB as StaticRouterProps, aG as StaticRouterProvider, aC as StaticRouterProviderProps, aa as SubmitFunction, ax as SubmitOptions, az as SubmitTarget, aV as UNSAFE_FrameworkContext, aW as UNSAFE_createClientRoutes, aX as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aQ as UNSAFE_hydrationRouteProperties, aR as UNSAFE_mapRouteProperties, aY as UNSAFE_shouldHydrateRouteLoader, aZ as UNSAFE_useScrollRestoration, aS as UNSAFE_withComponentProps, aU as UNSAFE_withErrorBoundaryProps, aT as UNSAFE_withHydrateFallbackProps, ay as URLSearchParamsInit, ad as createBrowserRouter, ae as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, aA as createSearchParams, aD as createStaticHandler, aE as createStaticRouter, s as renderMatches, ai as unstable_HistoryRouter, at as unstable_usePrompt, v as useActionData, w as useAsyncError, x as useAsyncValue, as as useBeforeUnload, u as useBlocker, aq as useFetcher, ar as useFetchers, ap as useFormAction, y as useHref, z as useInRouterContext, am as useLinkClickHandler, B as useLoaderData, C as useLocation, D as useMatch, G as useMatches, J as useNavigate, K as useNavigation, Q as useNavigationType, T as useOutlet, U as useOutletContext, V as useParams, W as useResolvedPath, X as useRevalidator, Y as useRouteError, Z as useRouteLoaderData, _ as useRoutes, an as useSearchParams, ao as useSubmit, au as useViewTransitionState } from './index-react-server-client-unV28389.js';
import * as React from 'react';
import { ReactElement } from 'react';
import React__default, { ReactElement } from 'react';
import { ParseOptions, SerializeOptions } from 'cookie';
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
import { P as Pages } from './register-DiOIlEq5.js';
export { a as Register } from './register-DiOIlEq5.js';
import { AsyncLocalStorage } from 'node:async_hooks';

@@ -26,406 +29,2 @@ declare const SingleFetchRedirectSymbol: unique symbol;

/**
Resolves a URL against the current location.
```tsx
import { useHref } from "react-router"
function SomeComponent() {
let href = useHref("some/where");
// "/resolved/some/where"
}
```
@category Hooks
*/
declare function useHref(to: To, { relative }?: {
relative?: RelativeRoutingType;
}): string;
/**
* Returns true if this component is a descendant of a Router, useful to ensure
* a component is used within a Router.
*
* @category Hooks
*/
declare function useInRouterContext(): boolean;
/**
Returns the current {@link Location}. This can be useful if you'd like to perform some side effect whenever it changes.
```tsx
import * as React from 'react'
import { useLocation } from 'react-router'
function SomeComponent() {
let location = useLocation()
React.useEffect(() => {
// Google Analytics
ga('send', 'pageview')
}, [location]);
return (
// ...
);
}
```
@category Hooks
*/
declare function useLocation(): Location;
/**
* Returns the current navigation action which describes how the router came to
* the current location, either by a pop, push, or replace on the history stack.
*
* @category Hooks
*/
declare function useNavigationType(): Action;
/**
* Returns a PathMatch object if the given pattern matches the current URL.
* This is useful for components that need to know "active" state, e.g.
* `<NavLink>`.
*
* @category Hooks
*/
declare function useMatch<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path): PathMatch<ParamKey> | null;
/**
* The interface for the navigate() function returned from useNavigate().
*/
interface NavigateFunction {
(to: To, options?: NavigateOptions): void | Promise<void>;
(delta: number): void | Promise<void>;
}
/**
Returns a function that lets you navigate programmatically in the browser in response to user interactions or effects.
```tsx
import { useNavigate } from "react-router";
function SomeComponent() {
let navigate = useNavigate();
return (
<button
onClick={() => {
navigate(-1);
}}
/>
);
}
```
It's often better to use {@link redirect} in {@link ActionFunction | actions} and {@link LoaderFunction | loaders} than this hook.
@category Hooks
*/
declare function useNavigate(): NavigateFunction;
/**
* Returns the parent route {@link OutletProps.context | `<Outlet context>`}.
*
* @category Hooks
*/
declare function useOutletContext<Context = unknown>(): Context;
/**
* Returns the element for the child route at this level of the route
* hierarchy. Used internally by `<Outlet>` to render child routes.
*
* @category Hooks
*/
declare function useOutlet(context?: unknown): React.ReactElement | null;
/**
Returns an object of key/value pairs of the dynamic params from the current URL that were matched by the routes. Child routes inherit all params from their parent routes.
```tsx
import { useParams } from "react-router"
function SomeComponent() {
let params = useParams()
params.postId
}
```
Assuming a route pattern like `/posts/:postId` is matched by `/posts/123` then `params.postId` will be `"123"`.
@category Hooks
*/
declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
ParamsOrKey
] extends [string] ? Params$1<ParamsOrKey> : Partial<ParamsOrKey>>;
/**
Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
```tsx
import { useResolvedPath } from "react-router"
function SomeComponent() {
// if the user is at /dashboard/profile
let path = useResolvedPath("../accounts")
path.pathname // "/dashboard/accounts"
path.search // ""
path.hash // ""
}
```
@category Hooks
*/
declare function useResolvedPath(to: To, { relative }?: {
relative?: RelativeRoutingType;
}): Path;
/**
Hook version of {@link Routes | `<Routes>`} that uses objects instead of components. These objects have the same properties as the component props.
The return value of `useRoutes` is either a valid React element you can use to render the route tree, or `null` if nothing matched.
```tsx
import * as React from "react";
import { useRoutes } from "react-router";
function App() {
let element = useRoutes([
{
path: "/",
element: <Dashboard />,
children: [
{
path: "messages",
element: <DashboardMessages />,
},
{ path: "tasks", element: <DashboardTasks /> },
],
},
{ path: "team", element: <AboutPage /> },
]);
return element;
}
```
@category Hooks
*/
declare function useRoutes(routes: RouteObject[], locationArg?: Partial<Location> | string): React.ReactElement | null;
/**
Returns the current navigation, defaulting to an "idle" navigation when no navigation is in progress. You can use this to render pending UI (like a global spinner) or read FormData from a form navigation.
```tsx
import { useNavigation } from "react-router"
function SomeComponent() {
let navigation = useNavigation();
navigation.state
navigation.formData
// etc.
}
```
@category Hooks
*/
declare function useNavigation(): Navigation;
/**
Revalidate the data on the page for reasons outside of normal data mutations like window focus or polling on an interval.
```tsx
import { useRevalidator } from "react-router";
function WindowFocusRevalidator() {
const revalidator = useRevalidator();
useFakeWindowFocus(() => {
revalidator.revalidate();
});
return (
<div hidden={revalidator.state === "idle"}>
Revalidating...
</div>
);
}
```
Note that page data is already revalidated automatically after actions. If you find yourself using this for normal CRUD operations on your data in response to user interactions, you're probably not taking advantage of the other APIs like {@link useFetcher}, {@link Form}, {@link useSubmit} that do this automatically.
@category Hooks
*/
declare function useRevalidator(): {
revalidate(): Promise<void>;
state: RevalidationState;
};
/**
* Returns the active route matches, useful for accessing loaderData for
* parent/child routes or the route "handle" property
*
* @category Hooks
*/
declare function useMatches(): UIMatch[];
/**
Returns the data from the closest route {@link LoaderFunction | loader} or {@link ClientLoaderFunction | client loader}.
```tsx
import { useLoaderData } from "react-router"
export async function loader() {
return await fakeDb.invoices.findAll();
}
export default function Invoices() {
let invoices = useLoaderData<typeof loader>();
// ...
}
```
@category Hooks
*/
declare function useLoaderData<T = any>(): SerializeFrom<T>;
/**
Returns the loader data for a given route by route ID.
```tsx
import { useRouteLoaderData } from "react-router";
function SomeComponent() {
const { user } = useRouteLoaderData("root");
}
```
Route IDs are created automatically. They are simply the path of the route file relative to the app folder without the extension.
| Route Filename | Route ID |
| -------------------------- | -------------------- |
| `app/root.tsx` | `"root"` |
| `app/routes/teams.tsx` | `"routes/teams"` |
| `app/whatever/teams.$id.tsx` | `"whatever/teams.$id"` |
If you created an ID manually, you can use that instead:
```tsx
route("/", "containers/app.tsx", { id: "app" }})
```
@category Hooks
*/
declare function useRouteLoaderData<T = any>(routeId: string): SerializeFrom<T> | undefined;
/**
Returns the action data from the most recent POST navigation form submission or `undefined` if there hasn't been one.
```tsx
import { Form, useActionData } from "react-router"
export async function action({ request }) {
const body = await request.formData()
const name = body.get("visitorsName")
return { message: `Hello, ${name}` }
}
export default function Invoices() {
const data = useActionData()
return (
<Form method="post">
<input type="text" name="visitorsName" />
{data ? data.message : "Waiting..."}
</Form>
)
}
```
@category Hooks
*/
declare function useActionData<T = any>(): SerializeFrom<T> | undefined;
/**
Accesses the error thrown during an {@link ActionFunction | action}, {@link LoaderFunction | loader}, or component render to be used in a route module Error Boundary.
```tsx
export function ErrorBoundary() {
const error = useRouteError();
return <div>{error.message}</div>;
}
```
@category Hooks
*/
declare function useRouteError(): unknown;
/**
Returns the resolved promise value from the closest {@link Await | `<Await>`}.
```tsx
function SomeDescendant() {
const value = useAsyncValue();
// ...
}
// somewhere in your app
<Await resolve={somePromise}>
<SomeDescendant />
</Await>
```
@category Hooks
*/
declare function useAsyncValue(): unknown;
/**
Returns the rejection value from the closest {@link Await | `<Await>`}.
```tsx
import { Await, useAsyncError } from "react-router"
function ErrorElement() {
const error = useAsyncError();
return (
<p>Uh Oh, something went wrong! {error.message}</p>
);
}
// somewhere in your app
<Await
resolve={promiseThatRejects}
errorElement={<ErrorElement />}
/>
```
@category Hooks
*/
declare function useAsyncError(): unknown;
/**
* Allow the application to block navigations within the SPA and present the
* user a confirmation dialog to confirm the navigation. Mostly used to avoid
* using half-filled form data. This does not handle hard-reloads or
* cross-origin navigations.
*
* @category Hooks
*/
declare function useBlocker(shouldBlock: boolean | BlockerFunction): Blocker;
interface StaticRouterProps {
basename?: string;
children?: React.ReactNode;
location: Partial<Location> | string;
}
/**
* A `<Router>` that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*
* @category Component Routers
*/
declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
interface StaticRouterProviderProps {
context: StaticHandlerContext;
router: Router;
hydrate?: boolean;
nonce?: string;
}
/**
* A Data Router that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*
* @category Component Routers
*/
declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRouteProperties">;
/**
* @category Utils
*/
declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
/**
* @category Data Routers
*/
declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
future?: Partial<FutureConfig>;
}): Router;
interface ServerRouterProps {

@@ -445,3 +44,6 @@ context: EntryContext;

interface StubIndexRouteObject extends Omit<IndexRouteObject, "loader" | "action" | "element" | "errorElement" | "children"> {
interface StubRouteExtensions {
Component?: RouteComponentType;
HydrateFallback?: HydrateFallbackType;
ErrorBoundary?: ErrorBoundaryType;
loader?: LoaderFunction;

@@ -453,9 +55,6 @@ action?: ActionFunction;

}
interface StubNonIndexRouteObject extends Omit<NonIndexRouteObject, "loader" | "action" | "element" | "errorElement" | "children"> {
loader?: LoaderFunction;
action?: ActionFunction;
children?: StubRouteObject[];
meta?: MetaFunction;
links?: LinksFunction;
interface StubIndexRouteObject extends Omit<IndexRouteObject, "Component" | "HydrateFallback" | "ErrorBoundary" | "loader" | "action" | "element" | "errorElement" | "children">, StubRouteExtensions {
}
interface StubNonIndexRouteObject extends Omit<NonIndexRouteObject, "Component" | "HydrateFallback" | "ErrorBoundary" | "loader" | "action" | "element" | "errorElement" | "children">, StubRouteExtensions {
}
type StubRouteObject = StubIndexRouteObject | StubNonIndexRouteObject;

@@ -489,3 +88,3 @@ interface RoutesTestStubProps {

*/
future?: Partial<FutureConfig$1>;
future?: Partial<FutureConfig>;
}

@@ -737,20 +336,7 @@ /**

/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, Record<string, string | undefined>>;
type Params = Register extends {
params: infer RegisteredParams extends AnyParams;
} ? RegisteredParams : AnyParams;
type Args = {
[K in keyof Params]: ToArgs<Params[K]>;
[K in keyof Pages]: ToArgs<Pages[K]["params"]>;
};
type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
T
type ToArgs<Params extends Record<string, string | undefined>> = Equal<Params, {}> extends true ? [] : Partial<Params> extends Params ? [Params] | [] : [
Params
];

@@ -769,2 +355,153 @@ /**

type ServerContext = {
redirect?: Response;
};
declare global {
var ___reactRouterServerStorage___: AsyncLocalStorage<ServerContext> | undefined;
}
type ServerRouteObjectBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type ServerRouteObject = ServerRouteObjectBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<ServerRouteObjectBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: ServerRouteObject[];
});
type RenderedRoute = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type ServerRouteMatch = RenderedRoute & {
params: Params;
pathname: string;
pathnameBase: string;
};
type ServerRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename?: string;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
matches: ServerRouteMatch[];
patches?: RenderedRoute[];
nonce?: string;
formState?: unknown;
};
type ServerManifestPayload = {
type: "manifest";
patches: RenderedRoute[];
};
type ServerActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<ServerRenderPayload | ServerRedirectPayload>;
};
type ServerRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type ServerPayload = ServerRenderPayload | ServerManifestPayload | ServerActionPayload | ServerRedirectPayload;
type ServerMatch = {
statusCode: number;
headers: Headers;
payload: ServerPayload;
};
type DecodeCallServerFunction = (id: string, reply: FormData | string) => Promise<() => Promise<unknown>>;
type DecodeFormActionFunction = (formData: FormData) => Promise<() => Promise<void>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
declare function matchRSCServerRequest({ decodeCallServer, decodeFormAction, decodeFormState, onError, request, routes, generateResponse, }: {
decodeCallServer?: DecodeCallServerFunction;
decodeFormAction?: DecodeFormActionFunction;
decodeFormState?: DecodeFormStateFunction;
onError?: (error: unknown) => void;
request: Request;
routes: ServerRouteObject[];
generateResponse: (match: ServerMatch) => Response;
}): Promise<Response>;
type DecodeServerResponseFunction = (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
type EncodeActionFunction = (args: unknown[]) => Promise<BodyInit>;
declare global {
interface Window {
__router: Router;
__routerInitialized: boolean;
__routerActionID: number;
}
}
declare function createCallServer({ decode, encodeAction, fetch: fetchImplementation, }: {
decode: DecodeServerResponseFunction;
encodeAction: EncodeActionFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
declare function RSCHydratedRouter({ decode, fetch: fetchImplementation, payload, routeDiscovery, }: {
decode: DecodeServerResponseFunction;
fetch?: (request: Request) => Promise<Response>;
payload: ServerPayload;
routeDiscovery?: "eager" | "lazy";
}): React.JSX.Element;
declare function routeRSCServerRequest({ request, callServer, decode, renderHTML, hydrate, }: {
request: Request;
callServer: (request: Request) => Promise<Response>;
decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;
hydrate?: boolean;
}): Promise<Response>;
declare function RSCStaticRouter({ getPayload, }: {
getPayload: () => Promise<ServerPayload>;
}): React.JSX.Element | null;
declare global {
interface Window {
__FLIGHT_DATA: any[];
}
}
declare function getServerStream(): ReadableStream<any>;
declare function RSCDefaultRootErrorBoundary({ hasRootLayout, }: {
hasRootLayout: boolean;
}): React__default.JSX.Element;
declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];

@@ -793,2 +530,5 @@

declare function getPatchRoutesOnNavigationFunction(manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean, basename: string | undefined): PatchRoutesOnNavigationFunction | undefined;
declare function useFogOFWarDiscovery(router: Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean): void;
declare function getHydrationData(state: {

@@ -804,2 +544,4 @@ loaderData?: Router["state"]["loaderData"];

export { ActionFunction, AppLoadContext, Blocker, BlockerFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, ServerBuild, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, unstable_InitialContext, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
declare const unstable_matchRSCServerRequest: typeof matchRSCServerRequest;
export { ActionFunction, AppLoadContext, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HeadersFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, NonIndexRouteObject, Params, PatchRoutesOnNavigationFunction, Path, type RequestHandler, RouterState, type RoutesTestStubProps, ServerBuild, type RenderedRoute as ServerRouteManifest, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, ShouldRevalidateFunction, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, href, isCookie, isSession, type DecodeCallServerFunction as unstable_DecodeCallServerFunction, type DecodeFormActionFunction as unstable_DecodeFormActionFunction, type DecodeServerResponseFunction as unstable_DecodeServerResponseFunction, type EncodeActionFunction as unstable_EncodeActionFunction, unstable_InitialContext, RSCHydratedRouter as unstable_RSCHydratedRouter, RSCStaticRouter as unstable_RSCStaticRouter, type ServerManifestPayload as unstable_ServerManifestPayload, type ServerMatch as unstable_ServerMatch, type ServerPayload as unstable_ServerPayload, type ServerRenderPayload as unstable_ServerRenderPayload, type ServerRouteMatch as unstable_ServerRouteMatch, type ServerRouteObject as unstable_ServerRouteObject, createCallServer as unstable_createCallServer, getServerStream as unstable_getServerStream, unstable_matchRSCServerRequest, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks };
import * as React from 'react';
import { R as RouterProviderProps$1 } from './fog-of-war-k8KWkMZc.js';
import { R as RouterInit } from './route-data-BvrN3Sw4.js';
import { RouterProviderProps as RouterProviderProps$1, RouterInit } from 'react-router';

@@ -5,0 +4,0 @@ type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;

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

import { a as Router, b as RouteModules, D as DataStrategyFunction, T as To, c as RelativeRoutingType, L as Location, A as Action, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, N as NavigateOptions, g as Params$1, h as RouteObject, i as Navigation, j as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, k as Blocker, l as StaticHandlerContext, m as StaticHandler, F as FutureConfig, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as unstable_InitialContext, n as IndexRouteObject, o as LoaderFunction, p as ActionFunction, M as MetaFunction, q as LinksFunction, r as NonIndexRouteObject, s as MiddlewareEnabled, t as AppLoadContext, E as Equal, v as RouterState, w as DataRouteObject, x as ClientLoaderFunction } from './route-data-BvrN3Sw4.js';
export { V as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, aq as DataRouteMatch, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, z as Fetcher, $ as FormEncType, a0 as FormMethod, aF as Future, G as GetScrollPositionFunction, y as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ag as IDLE_BLOCKER, af as IDLE_FETCHER, ae as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, a3 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, J as NavigationStates, ar as Navigator, aC as PageLinkDescriptor, as as PatchRoutesOnNavigationFunction, at as PatchRoutesOnNavigationFunctionArgs, a5 as PathParam, a6 as RedirectFunction, au as RouteMatch, Q as RouterFetchOptions, R as RouterInit, O as RouterNavigateOptions, K as RouterSubscriber, a8 as ShouldRevalidateFunction, a9 as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, Z as UNSAFE_DataWithResponseInit, aK as UNSAFE_ErrorResponseImpl, aN as UNSAFE_FetchersContext, aO as UNSAFE_LocationContext, aP as UNSAFE_NavigationContext, aQ as UNSAFE_RouteContext, aR as UNSAFE_ViewTransitionContext, aH as UNSAFE_createBrowserHistory, aJ as UNSAFE_createRouter, aI as UNSAFE_invariant, ac as createPath, ah as data, ai as generatePath, aj as isRouteErrorResponse, ak as matchPath, al as matchRoutes, ad as parsePath, am as redirect, an as redirectDocument, ao as replace, ap as resolvePath, a4 as unstable_MiddlewareFunction, a7 as unstable_RouterContext, ab as unstable_RouterContextProvider, aG as unstable_SerializesTo, aa as unstable_createContext } from './route-data-BvrN3Sw4.js';
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild } from './fog-of-war-k8KWkMZc.js';
export { f as Await, a as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, v as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, w as FormProps, ah as HandleDataRequestFunction, ai as HandleDocumentRequestFunction, aj as HandleErrorFunction, T as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, s as LinkProps, ad as Links, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, ac as Meta, W as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, x as ScrollRestorationProps, ak as ServerEntryModule, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, an as UNSAFE_FrameworkContext, aq as UNSAFE_createClientRoutes, ar as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ao as UNSAFE_getPatchRoutesOnNavigationFunction, al as UNSAFE_hydrationRouteProperties, am as UNSAFE_mapRouteProperties, as as UNSAFE_shouldHydrateRouteLoader, ap as UNSAFE_useFogOFWarDiscovery, at as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-k8KWkMZc.js';
import { d as Router, e as RouteModules, D as DataStrategyFunction, I as InitialEntry, H as HydrationState, f as IndexRouteObject, g as LoaderFunction, A as ActionFunction, h as MetaFunction, i as LinksFunction, j as NonIndexRouteObject, k as unstable_InitialContext, l as MiddlewareEnabled, m as AppLoadContext, E as Equal, n as ClientActionFunction, o as ClientLoaderFunction, p as HeadersFunction, q as ShouldRevalidateFunction, a as Location, r as Params, s as RouterState, t as PatchRoutesOnNavigationFunction, v as DataRouteObject, w as Path } from './route-data-x_b_BLCv.js';
export { _ as ActionFunctionArgs, Q as Blocker, U as BlockerFunction, aF as ClientActionFunctionArgs, aG as ClientLoaderFunctionArgs, az as DataRouteMatch, $ as DataStrategyFunctionArgs, a0 as DataStrategyMatch, a1 as DataStrategyResult, a3 as ErrorResponse, F as Fetcher, a4 as FormEncType, a5 as FormMethod, aL as Future, y as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a6 as HTMLFormMethod, aH as HeadersArgs, aK as HtmlLinkDescriptor, ap as IDLE_BLOCKER, ao as IDLE_FETCHER, an as IDLE_NAVIGATION, a7 as LazyRouteFunction, L as LinkDescriptor, a8 as LoaderFunctionArgs, aI as MetaArgs, M as MetaDescriptor, aA as NavigateOptions, J as Navigation, K as NavigationStates, ak as NavigationType, aB as Navigator, aJ as PageLinkDescriptor, aa as ParamParseKey, aC as PatchRoutesOnNavigationFunctionArgs, ab as PathMatch, ac as PathParam, ad as PathPattern, ae as RedirectFunction, O as RelativeRoutingType, Z as RevalidationState, aD as RouteMatch, aE as RouteObject, Y as RouterFetchOptions, V as RouterInit, X as RouterNavigateOptions, W as RouterSubscriber, ag as ShouldRevalidateFunctionArgs, x as StaticHandler, B as StaticHandlerContext, T as To, ah as UIMatch, aR as UNSAFE_DataRouterContext, aS as UNSAFE_DataRouterStateContext, a2 as UNSAFE_DataWithResponseInit, aQ as UNSAFE_ErrorResponseImpl, aT as UNSAFE_FetchersContext, aU as UNSAFE_LocationContext, aV as UNSAFE_NavigationContext, aW as UNSAFE_RouteContext, aX as UNSAFE_ViewTransitionContext, aN as UNSAFE_createBrowserHistory, aP as UNSAFE_createRouter, aO as UNSAFE_invariant, al as createPath, aq as data, ar as generatePath, as as isRouteErrorResponse, at as matchPath, au as matchRoutes, am as parsePath, av as redirect, aw as redirectDocument, ax as replace, ay as resolvePath, a9 as unstable_MiddlewareFunction, af as unstable_RouterContext, aj as unstable_RouterContextProvider, aM as unstable_SerializesTo, ai as unstable_createContext } from './route-data-x_b_BLCv.js';
import { A as AssetsManifest, E as EntryContext, F as FutureConfig, R as RouteComponentType, H as HydrateFallbackType, a as ErrorBoundaryType, S as ServerBuild } from './index-react-server-client-unV28389.js';
export { h as Await, b as AwaitProps, af as BrowserRouter, $ as BrowserRouterProps, a0 as DOMRouterOpts, a6 as FetcherFormProps, ab as FetcherSubmitFunction, av as FetcherSubmitOptions, ac as FetcherWithComponents, ak as Form, a7 as FormProps, aM as HandleDataRequestFunction, aN as HandleDocumentRequestFunction, aO as HandleErrorFunction, ag as HashRouter, a1 as HashRouterProps, a2 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ah as Link, a3 as LinkProps, aI as Links, i as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, aH as Meta, aj as NavLink, a4 as NavLinkProps, a5 as NavLinkRenderProps, j as Navigate, t as NavigateFunction, N as NavigateProps, k as Outlet, O as OutletProps, aw as ParamKeyValuePair, P as PathRouteProps, aK as PrefetchPageLinks, l as Route, d as RouteProps, m as Router, e as RouterProps, n as RouterProvider, f as RouterProviderProps, o as Routes, g as RoutesProps, aJ as Scripts, aL as ScriptsProps, al as ScrollRestoration, a8 as ScrollRestorationProps, aP as ServerEntryModule, a9 as SetURLSearchParams, aF as StaticRouter, aB as StaticRouterProps, aG as StaticRouterProvider, aC as StaticRouterProviderProps, aa as SubmitFunction, ax as SubmitOptions, az as SubmitTarget, aV as UNSAFE_FrameworkContext, aW as UNSAFE_createClientRoutes, aX as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aQ as UNSAFE_hydrationRouteProperties, aR as UNSAFE_mapRouteProperties, aY as UNSAFE_shouldHydrateRouteLoader, aZ as UNSAFE_useScrollRestoration, aS as UNSAFE_withComponentProps, aU as UNSAFE_withErrorBoundaryProps, aT as UNSAFE_withHydrateFallbackProps, ay as URLSearchParamsInit, ad as createBrowserRouter, ae as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, aA as createSearchParams, aD as createStaticHandler, aE as createStaticRouter, s as renderMatches, ai as unstable_HistoryRouter, at as unstable_usePrompt, v as useActionData, w as useAsyncError, x as useAsyncValue, as as useBeforeUnload, u as useBlocker, aq as useFetcher, ar as useFetchers, ap as useFormAction, y as useHref, z as useInRouterContext, am as useLinkClickHandler, B as useLoaderData, C as useLocation, D as useMatch, G as useMatches, J as useNavigate, K as useNavigation, Q as useNavigationType, T as useOutlet, U as useOutletContext, V as useParams, W as useResolvedPath, X as useRevalidator, Y as useRouteError, Z as useRouteLoaderData, _ as useRoutes, an as useSearchParams, ao as useSubmit, au as useViewTransitionState } from './index-react-server-client-unV28389.js';
import * as React from 'react';
import { ReactElement } from 'react';
import React__default, { ReactElement } from 'react';
import { ParseOptions, SerializeOptions } from 'cookie';
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
import { P as Pages } from './register-DiOIlEq5.js';
export { a as Register } from './register-DiOIlEq5.js';
import { AsyncLocalStorage } from 'node:async_hooks';

@@ -26,406 +29,2 @@ declare const SingleFetchRedirectSymbol: unique symbol;

/**
Resolves a URL against the current location.
```tsx
import { useHref } from "react-router"
function SomeComponent() {
let href = useHref("some/where");
// "/resolved/some/where"
}
```
@category Hooks
*/
declare function useHref(to: To, { relative }?: {
relative?: RelativeRoutingType;
}): string;
/**
* Returns true if this component is a descendant of a Router, useful to ensure
* a component is used within a Router.
*
* @category Hooks
*/
declare function useInRouterContext(): boolean;
/**
Returns the current {@link Location}. This can be useful if you'd like to perform some side effect whenever it changes.
```tsx
import * as React from 'react'
import { useLocation } from 'react-router'
function SomeComponent() {
let location = useLocation()
React.useEffect(() => {
// Google Analytics
ga('send', 'pageview')
}, [location]);
return (
// ...
);
}
```
@category Hooks
*/
declare function useLocation(): Location;
/**
* Returns the current navigation action which describes how the router came to
* the current location, either by a pop, push, or replace on the history stack.
*
* @category Hooks
*/
declare function useNavigationType(): Action;
/**
* Returns a PathMatch object if the given pattern matches the current URL.
* This is useful for components that need to know "active" state, e.g.
* `<NavLink>`.
*
* @category Hooks
*/
declare function useMatch<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path): PathMatch<ParamKey> | null;
/**
* The interface for the navigate() function returned from useNavigate().
*/
interface NavigateFunction {
(to: To, options?: NavigateOptions): void | Promise<void>;
(delta: number): void | Promise<void>;
}
/**
Returns a function that lets you navigate programmatically in the browser in response to user interactions or effects.
```tsx
import { useNavigate } from "react-router";
function SomeComponent() {
let navigate = useNavigate();
return (
<button
onClick={() => {
navigate(-1);
}}
/>
);
}
```
It's often better to use {@link redirect} in {@link ActionFunction | actions} and {@link LoaderFunction | loaders} than this hook.
@category Hooks
*/
declare function useNavigate(): NavigateFunction;
/**
* Returns the parent route {@link OutletProps.context | `<Outlet context>`}.
*
* @category Hooks
*/
declare function useOutletContext<Context = unknown>(): Context;
/**
* Returns the element for the child route at this level of the route
* hierarchy. Used internally by `<Outlet>` to render child routes.
*
* @category Hooks
*/
declare function useOutlet(context?: unknown): React.ReactElement | null;
/**
Returns an object of key/value pairs of the dynamic params from the current URL that were matched by the routes. Child routes inherit all params from their parent routes.
```tsx
import { useParams } from "react-router"
function SomeComponent() {
let params = useParams()
params.postId
}
```
Assuming a route pattern like `/posts/:postId` is matched by `/posts/123` then `params.postId` will be `"123"`.
@category Hooks
*/
declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
ParamsOrKey
] extends [string] ? Params$1<ParamsOrKey> : Partial<ParamsOrKey>>;
/**
Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
```tsx
import { useResolvedPath } from "react-router"
function SomeComponent() {
// if the user is at /dashboard/profile
let path = useResolvedPath("../accounts")
path.pathname // "/dashboard/accounts"
path.search // ""
path.hash // ""
}
```
@category Hooks
*/
declare function useResolvedPath(to: To, { relative }?: {
relative?: RelativeRoutingType;
}): Path;
/**
Hook version of {@link Routes | `<Routes>`} that uses objects instead of components. These objects have the same properties as the component props.
The return value of `useRoutes` is either a valid React element you can use to render the route tree, or `null` if nothing matched.
```tsx
import * as React from "react";
import { useRoutes } from "react-router";
function App() {
let element = useRoutes([
{
path: "/",
element: <Dashboard />,
children: [
{
path: "messages",
element: <DashboardMessages />,
},
{ path: "tasks", element: <DashboardTasks /> },
],
},
{ path: "team", element: <AboutPage /> },
]);
return element;
}
```
@category Hooks
*/
declare function useRoutes(routes: RouteObject[], locationArg?: Partial<Location> | string): React.ReactElement | null;
/**
Returns the current navigation, defaulting to an "idle" navigation when no navigation is in progress. You can use this to render pending UI (like a global spinner) or read FormData from a form navigation.
```tsx
import { useNavigation } from "react-router"
function SomeComponent() {
let navigation = useNavigation();
navigation.state
navigation.formData
// etc.
}
```
@category Hooks
*/
declare function useNavigation(): Navigation;
/**
Revalidate the data on the page for reasons outside of normal data mutations like window focus or polling on an interval.
```tsx
import { useRevalidator } from "react-router";
function WindowFocusRevalidator() {
const revalidator = useRevalidator();
useFakeWindowFocus(() => {
revalidator.revalidate();
});
return (
<div hidden={revalidator.state === "idle"}>
Revalidating...
</div>
);
}
```
Note that page data is already revalidated automatically after actions. If you find yourself using this for normal CRUD operations on your data in response to user interactions, you're probably not taking advantage of the other APIs like {@link useFetcher}, {@link Form}, {@link useSubmit} that do this automatically.
@category Hooks
*/
declare function useRevalidator(): {
revalidate(): Promise<void>;
state: RevalidationState;
};
/**
* Returns the active route matches, useful for accessing loaderData for
* parent/child routes or the route "handle" property
*
* @category Hooks
*/
declare function useMatches(): UIMatch[];
/**
Returns the data from the closest route {@link LoaderFunction | loader} or {@link ClientLoaderFunction | client loader}.
```tsx
import { useLoaderData } from "react-router"
export async function loader() {
return await fakeDb.invoices.findAll();
}
export default function Invoices() {
let invoices = useLoaderData<typeof loader>();
// ...
}
```
@category Hooks
*/
declare function useLoaderData<T = any>(): SerializeFrom<T>;
/**
Returns the loader data for a given route by route ID.
```tsx
import { useRouteLoaderData } from "react-router";
function SomeComponent() {
const { user } = useRouteLoaderData("root");
}
```
Route IDs are created automatically. They are simply the path of the route file relative to the app folder without the extension.
| Route Filename | Route ID |
| -------------------------- | -------------------- |
| `app/root.tsx` | `"root"` |
| `app/routes/teams.tsx` | `"routes/teams"` |
| `app/whatever/teams.$id.tsx` | `"whatever/teams.$id"` |
If you created an ID manually, you can use that instead:
```tsx
route("/", "containers/app.tsx", { id: "app" }})
```
@category Hooks
*/
declare function useRouteLoaderData<T = any>(routeId: string): SerializeFrom<T> | undefined;
/**
Returns the action data from the most recent POST navigation form submission or `undefined` if there hasn't been one.
```tsx
import { Form, useActionData } from "react-router"
export async function action({ request }) {
const body = await request.formData()
const name = body.get("visitorsName")
return { message: `Hello, ${name}` }
}
export default function Invoices() {
const data = useActionData()
return (
<Form method="post">
<input type="text" name="visitorsName" />
{data ? data.message : "Waiting..."}
</Form>
)
}
```
@category Hooks
*/
declare function useActionData<T = any>(): SerializeFrom<T> | undefined;
/**
Accesses the error thrown during an {@link ActionFunction | action}, {@link LoaderFunction | loader}, or component render to be used in a route module Error Boundary.
```tsx
export function ErrorBoundary() {
const error = useRouteError();
return <div>{error.message}</div>;
}
```
@category Hooks
*/
declare function useRouteError(): unknown;
/**
Returns the resolved promise value from the closest {@link Await | `<Await>`}.
```tsx
function SomeDescendant() {
const value = useAsyncValue();
// ...
}
// somewhere in your app
<Await resolve={somePromise}>
<SomeDescendant />
</Await>
```
@category Hooks
*/
declare function useAsyncValue(): unknown;
/**
Returns the rejection value from the closest {@link Await | `<Await>`}.
```tsx
import { Await, useAsyncError } from "react-router"
function ErrorElement() {
const error = useAsyncError();
return (
<p>Uh Oh, something went wrong! {error.message}</p>
);
}
// somewhere in your app
<Await
resolve={promiseThatRejects}
errorElement={<ErrorElement />}
/>
```
@category Hooks
*/
declare function useAsyncError(): unknown;
/**
* Allow the application to block navigations within the SPA and present the
* user a confirmation dialog to confirm the navigation. Mostly used to avoid
* using half-filled form data. This does not handle hard-reloads or
* cross-origin navigations.
*
* @category Hooks
*/
declare function useBlocker(shouldBlock: boolean | BlockerFunction): Blocker;
interface StaticRouterProps {
basename?: string;
children?: React.ReactNode;
location: Partial<Location> | string;
}
/**
* A `<Router>` that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*
* @category Component Routers
*/
declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
interface StaticRouterProviderProps {
context: StaticHandlerContext;
router: Router;
hydrate?: boolean;
nonce?: string;
}
/**
* A Data Router that may not navigate to any other location. This is useful
* on the server where there is no stateful UI.
*
* @category Component Routers
*/
declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRouteProperties">;
/**
* @category Utils
*/
declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
/**
* @category Data Routers
*/
declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
future?: Partial<FutureConfig>;
}): Router;
interface ServerRouterProps {

@@ -445,3 +44,6 @@ context: EntryContext;

interface StubIndexRouteObject extends Omit<IndexRouteObject, "loader" | "action" | "element" | "errorElement" | "children"> {
interface StubRouteExtensions {
Component?: RouteComponentType;
HydrateFallback?: HydrateFallbackType;
ErrorBoundary?: ErrorBoundaryType;
loader?: LoaderFunction;

@@ -453,9 +55,6 @@ action?: ActionFunction;

}
interface StubNonIndexRouteObject extends Omit<NonIndexRouteObject, "loader" | "action" | "element" | "errorElement" | "children"> {
loader?: LoaderFunction;
action?: ActionFunction;
children?: StubRouteObject[];
meta?: MetaFunction;
links?: LinksFunction;
interface StubIndexRouteObject extends Omit<IndexRouteObject, "Component" | "HydrateFallback" | "ErrorBoundary" | "loader" | "action" | "element" | "errorElement" | "children">, StubRouteExtensions {
}
interface StubNonIndexRouteObject extends Omit<NonIndexRouteObject, "Component" | "HydrateFallback" | "ErrorBoundary" | "loader" | "action" | "element" | "errorElement" | "children">, StubRouteExtensions {
}
type StubRouteObject = StubIndexRouteObject | StubNonIndexRouteObject;

@@ -489,3 +88,3 @@ interface RoutesTestStubProps {

*/
future?: Partial<FutureConfig$1>;
future?: Partial<FutureConfig>;
}

@@ -737,20 +336,7 @@ /**

/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, Record<string, string | undefined>>;
type Params = Register extends {
params: infer RegisteredParams extends AnyParams;
} ? RegisteredParams : AnyParams;
type Args = {
[K in keyof Params]: ToArgs<Params[K]>;
[K in keyof Pages]: ToArgs<Pages[K]["params"]>;
};
type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
T
type ToArgs<Params extends Record<string, string | undefined>> = Equal<Params, {}> extends true ? [] : Partial<Params> extends Params ? [Params] | [] : [
Params
];

@@ -769,2 +355,153 @@ /**

type ServerContext = {
redirect?: Response;
};
declare global {
var ___reactRouterServerStorage___: AsyncLocalStorage<ServerContext> | undefined;
}
type ServerRouteObjectBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type ServerRouteObject = ServerRouteObjectBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<ServerRouteObjectBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: ServerRouteObject[];
});
type RenderedRoute = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type ServerRouteMatch = RenderedRoute & {
params: Params;
pathname: string;
pathnameBase: string;
};
type ServerRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename?: string;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
matches: ServerRouteMatch[];
patches?: RenderedRoute[];
nonce?: string;
formState?: unknown;
};
type ServerManifestPayload = {
type: "manifest";
patches: RenderedRoute[];
};
type ServerActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<ServerRenderPayload | ServerRedirectPayload>;
};
type ServerRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type ServerPayload = ServerRenderPayload | ServerManifestPayload | ServerActionPayload | ServerRedirectPayload;
type ServerMatch = {
statusCode: number;
headers: Headers;
payload: ServerPayload;
};
type DecodeCallServerFunction = (id: string, reply: FormData | string) => Promise<() => Promise<unknown>>;
type DecodeFormActionFunction = (formData: FormData) => Promise<() => Promise<void>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
declare function matchRSCServerRequest({ decodeCallServer, decodeFormAction, decodeFormState, onError, request, routes, generateResponse, }: {
decodeCallServer?: DecodeCallServerFunction;
decodeFormAction?: DecodeFormActionFunction;
decodeFormState?: DecodeFormStateFunction;
onError?: (error: unknown) => void;
request: Request;
routes: ServerRouteObject[];
generateResponse: (match: ServerMatch) => Response;
}): Promise<Response>;
type DecodeServerResponseFunction = (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
type EncodeActionFunction = (args: unknown[]) => Promise<BodyInit>;
declare global {
interface Window {
__router: Router;
__routerInitialized: boolean;
__routerActionID: number;
}
}
declare function createCallServer({ decode, encodeAction, fetch: fetchImplementation, }: {
decode: DecodeServerResponseFunction;
encodeAction: EncodeActionFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
declare function RSCHydratedRouter({ decode, fetch: fetchImplementation, payload, routeDiscovery, }: {
decode: DecodeServerResponseFunction;
fetch?: (request: Request) => Promise<Response>;
payload: ServerPayload;
routeDiscovery?: "eager" | "lazy";
}): React.JSX.Element;
declare function routeRSCServerRequest({ request, callServer, decode, renderHTML, hydrate, }: {
request: Request;
callServer: (request: Request) => Promise<Response>;
decode: (body: ReadableStream<Uint8Array>) => Promise<ServerPayload>;
renderHTML: (getPayload: () => Promise<ServerPayload>) => ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;
hydrate?: boolean;
}): Promise<Response>;
declare function RSCStaticRouter({ getPayload, }: {
getPayload: () => Promise<ServerPayload>;
}): React.JSX.Element | null;
declare global {
interface Window {
__FLIGHT_DATA: any[];
}
}
declare function getServerStream(): ReadableStream<any>;
declare function RSCDefaultRootErrorBoundary({ hasRootLayout, }: {
hasRootLayout: boolean;
}): React__default.JSX.Element;
declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];

@@ -793,2 +530,5 @@

declare function getPatchRoutesOnNavigationFunction(manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean, basename: string | undefined): PatchRoutesOnNavigationFunction | undefined;
declare function useFogOFWarDiscovery(router: Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, routeDiscovery: ServerBuild["routeDiscovery"], isSpaMode: boolean): void;
declare function getHydrationData(state: {

@@ -804,2 +544,4 @@ loaderData?: Router["state"]["loaderData"];

export { ActionFunction, AppLoadContext, Blocker, BlockerFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, ServerBuild, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, unstable_InitialContext, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
declare const unstable_matchRSCServerRequest: typeof matchRSCServerRequest;
export { ActionFunction, AppLoadContext, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HeadersFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, NonIndexRouteObject, Params, PatchRoutesOnNavigationFunction, Path, type RequestHandler, RouterState, type RoutesTestStubProps, ServerBuild, type RenderedRoute as ServerRouteManifest, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, ShouldRevalidateFunction, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, href, isCookie, isSession, type DecodeCallServerFunction as unstable_DecodeCallServerFunction, type DecodeFormActionFunction as unstable_DecodeFormActionFunction, type DecodeServerResponseFunction as unstable_DecodeServerResponseFunction, type EncodeActionFunction as unstable_EncodeActionFunction, unstable_InitialContext, RSCHydratedRouter as unstable_RSCHydratedRouter, RSCStaticRouter as unstable_RSCStaticRouter, type ServerManifestPayload as unstable_ServerManifestPayload, type ServerMatch as unstable_ServerMatch, type ServerPayload as unstable_ServerPayload, type ServerRenderPayload as unstable_ServerRenderPayload, type ServerRouteMatch as unstable_ServerRouteMatch, type ServerRouteObject as unstable_ServerRouteObject, createCallServer as unstable_createCallServer, getServerStream as unstable_getServerStream, unstable_matchRSCServerRequest, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks };
{
"name": "react-router",
"version": "0.0.0-experimental-b571356c3",
"version": "0.0.0-experimental-b65537812",
"description": "Declarative routing for React",

@@ -26,7 +26,16 @@ "keywords": [

".": {
"react-server": {
"module": "./dist/development/index-react-server.mjs",
"default": "./dist/development/index-react-server.js"
},
"node": {
"types": "./dist/development/index.d.ts",
"module": "./dist/development/index.mjs",
"module-sync": "./dist/development/index.mjs",
"default": "./dist/development/index.js"
},
"module": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"import": {

@@ -41,19 +50,13 @@ "types": "./dist/development/index.d.mts",

},
"./route-module": {
"node": {
"types": "./dist/development/lib/types/route-module.d.ts"
},
"import": {
"types": "./dist/development/lib/types/route-module.d.mts"
},
"default": {
"types": "./dist/development/lib/types/route-module.d.ts"
}
},
"./dom": {
"node": {
"types": "./dist/development/dom-export.d.ts",
"module": "./dist/development/dom-export.mjs",
"module-sync": "./dist/development/dom-export.mjs",
"default": "./dist/development/dom-export.js"
},
"module": {
"types": "./dist/development/dom-export.d.mts",
"default": "./dist/development/dom-export.mjs"
},
"import": {

@@ -68,2 +71,37 @@ "types": "./dist/development/dom-export.d.mts",

},
"./internal": {
"node": {
"types": "./dist/development/lib/types/internal.d.ts"
},
"import": {
"types": "./dist/development/lib/types/internal.d.mts"
},
"default": {
"types": "./dist/development/lib/types/index.d.ts"
}
},
"./internal/react-server-client": {
"react-server": {
"module": "./dist/development/index-react-server-client.mjs",
"default": "./dist/development/index-react-server-client.js"
},
"node": {
"types": "./dist/development/index.d.ts",
"module": "./dist/development/index.mjs",
"module-sync": "./dist/development/index.mjs",
"default": "./dist/development/index.js"
},
"module": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"import": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"default": {
"types": "./dist/development/index.d.ts",
"default": "./dist/development/index.js"
}
},
"./package.json": "./package.json"

@@ -73,3 +111,3 @@ },

"build": {
"command": "rimraf dist && tsup",
"command": "rimraf dist && tsup && tsup --config tsup.config.rsc.ts",
"files": [

@@ -88,9 +126,8 @@ "lib/**",

"cookie": "^1.0.1",
"set-cookie-parser": "^2.6.0",
"turbo-stream": "2.4.0"
"set-cookie-parser": "^2.6.0"
},
"devDependencies": {
"@types/set-cookie-parser": "^2.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"rimraf": "^6.0.1",

@@ -121,4 +158,5 @@ "tsup": "^8.3.0",

"build": "wireit",
"watch": "tsup --watch & tsup --config tsup.config.rsc.ts --watch",
"typecheck": "tsc"
}
}

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 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 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 too big to display

Sorry, the diff of this file is not supported yet