buid node modules
This commit is contained in:
1049
frontend/node_modules/react-router/CHANGELOG.md
generated
vendored
1049
frontend/node_modules/react-router/CHANGELOG.md
generated
vendored
File diff suppressed because it is too large
Load Diff
310
frontend/node_modules/react-router/dist/development/browser-DM83uryY.d.ts
generated
vendored
Normal file
310
frontend/node_modules/react-router/dist/development/browser-DM83uryY.d.ts
generated
vendored
Normal file
@@ -0,0 +1,310 @@
|
||||
import * as React from 'react';
|
||||
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-iAqbU5Q4.js';
|
||||
|
||||
type RSCRouteConfigEntryBase = {
|
||||
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 RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
|
||||
id: string;
|
||||
path?: string;
|
||||
Component?: React.ComponentType<any>;
|
||||
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
|
||||
default?: React.ComponentType<any>;
|
||||
Component?: never;
|
||||
} | {
|
||||
default?: never;
|
||||
Component?: React.ComponentType<any>;
|
||||
})>;
|
||||
} & ({
|
||||
index: true;
|
||||
} | {
|
||||
children?: RSCRouteConfigEntry[];
|
||||
});
|
||||
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
|
||||
type RSCRouteManifest = {
|
||||
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 RSCRouteMatch = RSCRouteManifest & {
|
||||
params: Params;
|
||||
pathname: string;
|
||||
pathnameBase: string;
|
||||
};
|
||||
type RSCRenderPayload = {
|
||||
type: "render";
|
||||
actionData: Record<string, any> | null;
|
||||
basename: string | undefined;
|
||||
errors: Record<string, any> | null;
|
||||
loaderData: Record<string, any>;
|
||||
location: Location;
|
||||
matches: RSCRouteMatch[];
|
||||
patches?: RSCRouteManifest[];
|
||||
nonce?: string;
|
||||
formState?: unknown;
|
||||
};
|
||||
type RSCManifestPayload = {
|
||||
type: "manifest";
|
||||
patches: RSCRouteManifest[];
|
||||
};
|
||||
type RSCActionPayload = {
|
||||
type: "action";
|
||||
actionResult: Promise<unknown>;
|
||||
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
|
||||
};
|
||||
type RSCRedirectPayload = {
|
||||
type: "redirect";
|
||||
status: number;
|
||||
location: string;
|
||||
replace: boolean;
|
||||
reload: boolean;
|
||||
actionResult?: Promise<unknown>;
|
||||
};
|
||||
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
|
||||
type RSCMatch = {
|
||||
statusCode: number;
|
||||
headers: Headers;
|
||||
payload: RSCPayload;
|
||||
};
|
||||
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
|
||||
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
|
||||
type DecodeReplyFunction = (reply: FormData | string, { temporaryReferences }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown[]>;
|
||||
type LoadServerActionFunction = (id: string) => Promise<Function>;
|
||||
/**
|
||||
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* enabled client router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* renderToReadableStream,
|
||||
* } from "@vitejs/plugin-rsc/rsc";
|
||||
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
|
||||
*
|
||||
* matchRSCServerRequest({
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeFormState,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* request,
|
||||
* routes: routes(),
|
||||
* generateResponse(match) {
|
||||
* return new Response(
|
||||
* renderToReadableStream(match.payload),
|
||||
* {
|
||||
* status: match.statusCode,
|
||||
* headers: match.headers,
|
||||
* }
|
||||
* );
|
||||
* },
|
||||
* });
|
||||
*
|
||||
* @name unstable_matchRSCServerRequest
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.basename The basename to use when matching the request.
|
||||
* @param opts.createTemporaryReferenceSet A function that returns a temporary
|
||||
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream.
|
||||
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
|
||||
* function, responsible for loading a server action.
|
||||
* @param opts.decodeFormState A function responsible for decoding form state for
|
||||
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
|
||||
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
|
||||
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
|
||||
* function, used to decode the server function's arguments and bind them to the
|
||||
* implementation for invocation by the router.
|
||||
* @param opts.generateResponse A function responsible for using your
|
||||
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding the {@link unstable_RSCPayload}.
|
||||
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
|
||||
* `loadServerAction` function, used to load a server action by ID.
|
||||
* @param opts.onError An optional error handler that will be called with any
|
||||
* errors that occur during the request processing.
|
||||
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* to match against.
|
||||
* @param opts.requestContext An instance of {@link RouterContextProvider}
|
||||
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
|
||||
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
basename?: string;
|
||||
decodeReply?: DecodeReplyFunction;
|
||||
decodeAction?: DecodeActionFunction;
|
||||
decodeFormState?: DecodeFormStateFunction;
|
||||
requestContext?: RouterContextProvider;
|
||||
loadServerAction?: LoadServerActionFunction;
|
||||
onError?: (error: unknown) => void;
|
||||
request: Request;
|
||||
routes: RSCRouteConfigEntry[];
|
||||
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Response;
|
||||
}): Promise<Response>;
|
||||
|
||||
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown>;
|
||||
type EncodeReplyFunction = (args: unknown[], options: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<BodyInit>;
|
||||
/**
|
||||
* Create a React `callServer` implementation for React Router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* setServerCallback,
|
||||
* } from "@vitejs/plugin-rsc/browser";
|
||||
* import { unstable_createCallServer as createCallServer } from "react-router";
|
||||
*
|
||||
* setServerCallback(
|
||||
* createCallServer({
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* })
|
||||
* );
|
||||
*
|
||||
* @name unstable_createCallServer
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
|
||||
* `createFromReadableStream`. Used to decode payloads from the server.
|
||||
* @param opts.createTemporaryReferenceSet A function that creates a temporary
|
||||
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* payload.
|
||||
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
|
||||
* Used when sending payloads to the server.
|
||||
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
|
||||
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
* @returns A function that can be used to call server actions.
|
||||
*/
|
||||
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
encodeReply: EncodeReplyFunction;
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
}): (id: string, args: unknown[]) => Promise<unknown>;
|
||||
/**
|
||||
* Props for the {@link unstable_RSCHydratedRouter} component.
|
||||
*
|
||||
* @name unstable_RSCHydratedRouterProps
|
||||
* @category Types
|
||||
*/
|
||||
interface RSCHydratedRouterProps {
|
||||
/**
|
||||
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
|
||||
* used to decode payloads from the server.
|
||||
*/
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
/**
|
||||
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
*/
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
/**
|
||||
* The decoded {@link unstable_RSCPayload} to hydrate.
|
||||
*/
|
||||
payload: RSCPayload;
|
||||
/**
|
||||
* `"eager"` or `"lazy"` - Determines if links are eagerly discovered, or
|
||||
* delayed until clicked.
|
||||
*/
|
||||
routeDiscovery?: "eager" | "lazy";
|
||||
/**
|
||||
* A function that returns an {@link RouterContextProvider} instance
|
||||
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* This function is called to generate a fresh `context` instance on each
|
||||
* navigation or fetcher call.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
}
|
||||
/**
|
||||
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then((payload) =>
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter
|
||||
* createFromReadableStream={createFromReadableStream}
|
||||
* payload={payload}
|
||||
* />
|
||||
* </StrictMode>,
|
||||
* { formState: await getFormState(payload) },
|
||||
* );
|
||||
* }),
|
||||
* );
|
||||
*
|
||||
* @name unstable_RSCHydratedRouter
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param props Props
|
||||
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.routeDiscovery} props.routeDiscovery n/a
|
||||
* @returns A hydrated {@link DataRouter} that can be used to navigate and
|
||||
* render routes.
|
||||
*/
|
||||
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, routeDiscovery, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, type RSCHydratedRouterProps as g, type RSCMatch as h, type RSCRouteManifest as i, type RSCRouteMatch as j, type RSCRouteConfigEntry as k, type RSCRouteConfig as l, matchRSCServerRequest as m };
|
||||
310
frontend/node_modules/react-router/dist/development/browser-DfMfSvsC.d.mts
generated
vendored
Normal file
310
frontend/node_modules/react-router/dist/development/browser-DfMfSvsC.d.mts
generated
vendored
Normal file
@@ -0,0 +1,310 @@
|
||||
import * as React from 'react';
|
||||
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-DIAPGK5f.mjs';
|
||||
|
||||
type RSCRouteConfigEntryBase = {
|
||||
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 RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
|
||||
id: string;
|
||||
path?: string;
|
||||
Component?: React.ComponentType<any>;
|
||||
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
|
||||
default?: React.ComponentType<any>;
|
||||
Component?: never;
|
||||
} | {
|
||||
default?: never;
|
||||
Component?: React.ComponentType<any>;
|
||||
})>;
|
||||
} & ({
|
||||
index: true;
|
||||
} | {
|
||||
children?: RSCRouteConfigEntry[];
|
||||
});
|
||||
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
|
||||
type RSCRouteManifest = {
|
||||
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 RSCRouteMatch = RSCRouteManifest & {
|
||||
params: Params;
|
||||
pathname: string;
|
||||
pathnameBase: string;
|
||||
};
|
||||
type RSCRenderPayload = {
|
||||
type: "render";
|
||||
actionData: Record<string, any> | null;
|
||||
basename: string | undefined;
|
||||
errors: Record<string, any> | null;
|
||||
loaderData: Record<string, any>;
|
||||
location: Location;
|
||||
matches: RSCRouteMatch[];
|
||||
patches?: RSCRouteManifest[];
|
||||
nonce?: string;
|
||||
formState?: unknown;
|
||||
};
|
||||
type RSCManifestPayload = {
|
||||
type: "manifest";
|
||||
patches: RSCRouteManifest[];
|
||||
};
|
||||
type RSCActionPayload = {
|
||||
type: "action";
|
||||
actionResult: Promise<unknown>;
|
||||
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
|
||||
};
|
||||
type RSCRedirectPayload = {
|
||||
type: "redirect";
|
||||
status: number;
|
||||
location: string;
|
||||
replace: boolean;
|
||||
reload: boolean;
|
||||
actionResult?: Promise<unknown>;
|
||||
};
|
||||
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
|
||||
type RSCMatch = {
|
||||
statusCode: number;
|
||||
headers: Headers;
|
||||
payload: RSCPayload;
|
||||
};
|
||||
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
|
||||
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
|
||||
type DecodeReplyFunction = (reply: FormData | string, { temporaryReferences }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown[]>;
|
||||
type LoadServerActionFunction = (id: string) => Promise<Function>;
|
||||
/**
|
||||
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* enabled client router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* renderToReadableStream,
|
||||
* } from "@vitejs/plugin-rsc/rsc";
|
||||
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
|
||||
*
|
||||
* matchRSCServerRequest({
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeFormState,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* request,
|
||||
* routes: routes(),
|
||||
* generateResponse(match) {
|
||||
* return new Response(
|
||||
* renderToReadableStream(match.payload),
|
||||
* {
|
||||
* status: match.statusCode,
|
||||
* headers: match.headers,
|
||||
* }
|
||||
* );
|
||||
* },
|
||||
* });
|
||||
*
|
||||
* @name unstable_matchRSCServerRequest
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.basename The basename to use when matching the request.
|
||||
* @param opts.createTemporaryReferenceSet A function that returns a temporary
|
||||
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream.
|
||||
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
|
||||
* function, responsible for loading a server action.
|
||||
* @param opts.decodeFormState A function responsible for decoding form state for
|
||||
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
|
||||
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
|
||||
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
|
||||
* function, used to decode the server function's arguments and bind them to the
|
||||
* implementation for invocation by the router.
|
||||
* @param opts.generateResponse A function responsible for using your
|
||||
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding the {@link unstable_RSCPayload}.
|
||||
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
|
||||
* `loadServerAction` function, used to load a server action by ID.
|
||||
* @param opts.onError An optional error handler that will be called with any
|
||||
* errors that occur during the request processing.
|
||||
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* to match against.
|
||||
* @param opts.requestContext An instance of {@link RouterContextProvider}
|
||||
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
|
||||
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
basename?: string;
|
||||
decodeReply?: DecodeReplyFunction;
|
||||
decodeAction?: DecodeActionFunction;
|
||||
decodeFormState?: DecodeFormStateFunction;
|
||||
requestContext?: RouterContextProvider;
|
||||
loadServerAction?: LoadServerActionFunction;
|
||||
onError?: (error: unknown) => void;
|
||||
request: Request;
|
||||
routes: RSCRouteConfigEntry[];
|
||||
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Response;
|
||||
}): Promise<Response>;
|
||||
|
||||
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown>;
|
||||
type EncodeReplyFunction = (args: unknown[], options: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<BodyInit>;
|
||||
/**
|
||||
* Create a React `callServer` implementation for React Router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* setServerCallback,
|
||||
* } from "@vitejs/plugin-rsc/browser";
|
||||
* import { unstable_createCallServer as createCallServer } from "react-router";
|
||||
*
|
||||
* setServerCallback(
|
||||
* createCallServer({
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* })
|
||||
* );
|
||||
*
|
||||
* @name unstable_createCallServer
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
|
||||
* `createFromReadableStream`. Used to decode payloads from the server.
|
||||
* @param opts.createTemporaryReferenceSet A function that creates a temporary
|
||||
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* payload.
|
||||
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
|
||||
* Used when sending payloads to the server.
|
||||
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
|
||||
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
* @returns A function that can be used to call server actions.
|
||||
*/
|
||||
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
encodeReply: EncodeReplyFunction;
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
}): (id: string, args: unknown[]) => Promise<unknown>;
|
||||
/**
|
||||
* Props for the {@link unstable_RSCHydratedRouter} component.
|
||||
*
|
||||
* @name unstable_RSCHydratedRouterProps
|
||||
* @category Types
|
||||
*/
|
||||
interface RSCHydratedRouterProps {
|
||||
/**
|
||||
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
|
||||
* used to decode payloads from the server.
|
||||
*/
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
/**
|
||||
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
*/
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
/**
|
||||
* The decoded {@link unstable_RSCPayload} to hydrate.
|
||||
*/
|
||||
payload: RSCPayload;
|
||||
/**
|
||||
* `"eager"` or `"lazy"` - Determines if links are eagerly discovered, or
|
||||
* delayed until clicked.
|
||||
*/
|
||||
routeDiscovery?: "eager" | "lazy";
|
||||
/**
|
||||
* A function that returns an {@link RouterContextProvider} instance
|
||||
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* This function is called to generate a fresh `context` instance on each
|
||||
* navigation or fetcher call.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
}
|
||||
/**
|
||||
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then((payload) =>
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter
|
||||
* createFromReadableStream={createFromReadableStream}
|
||||
* payload={payload}
|
||||
* />
|
||||
* </StrictMode>,
|
||||
* { formState: await getFormState(payload) },
|
||||
* );
|
||||
* }),
|
||||
* );
|
||||
*
|
||||
* @name unstable_RSCHydratedRouter
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param props Props
|
||||
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.routeDiscovery} props.routeDiscovery n/a
|
||||
* @returns A hydrated {@link DataRouter} that can be used to navigate and
|
||||
* render routes.
|
||||
*/
|
||||
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, routeDiscovery, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, type RSCHydratedRouterProps as g, type RSCMatch as h, type RSCRouteManifest as i, type RSCRouteMatch as j, type RSCRouteConfigEntry as k, type RSCRouteConfig as l, matchRSCServerRequest as m };
|
||||
188
frontend/node_modules/react-router/dist/development/chunk-FQEOJFGW.js
generated
vendored
Normal file
188
frontend/node_modules/react-router/dist/development/chunk-FQEOJFGW.js
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _chunkVNR6V74Njs = require('./chunk-VNR6V74N.js');
|
||||
|
||||
// lib/dom/ssr/hydration.tsx
|
||||
function getHydrationData({
|
||||
state,
|
||||
routes,
|
||||
getRouteInfo,
|
||||
location,
|
||||
basename,
|
||||
isSpaMode
|
||||
}) {
|
||||
let hydrationData = {
|
||||
...state,
|
||||
loaderData: { ...state.loaderData }
|
||||
};
|
||||
let initialMatches = _chunkVNR6V74Njs.matchRoutes.call(void 0, routes, location, basename);
|
||||
if (initialMatches) {
|
||||
for (let match of initialMatches) {
|
||||
let routeId = match.route.id;
|
||||
let routeInfo = getRouteInfo(routeId);
|
||||
if (_chunkVNR6V74Njs.shouldHydrateRouteLoader.call(void 0,
|
||||
routeId,
|
||||
routeInfo.clientLoader,
|
||||
routeInfo.hasLoader,
|
||||
isSpaMode
|
||||
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
|
||||
delete hydrationData.loaderData[routeId];
|
||||
} else if (!routeInfo.hasLoader) {
|
||||
hydrationData.loaderData[routeId] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return hydrationData;
|
||||
}
|
||||
|
||||
// lib/rsc/errorBoundaries.tsx
|
||||
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
||||
var RSCRouterGlobalErrorBoundary = class extends _react2.default.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { error: null, location: props.location };
|
||||
}
|
||||
static getDerivedStateFromError(error) {
|
||||
return { error };
|
||||
}
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
if (state.location !== props.location) {
|
||||
return { error: null, location: props.location };
|
||||
}
|
||||
return { error: state.error, location: state.location };
|
||||
}
|
||||
render() {
|
||||
if (this.state.error) {
|
||||
return /* @__PURE__ */ _react2.default.createElement(
|
||||
RSCDefaultRootErrorBoundaryImpl,
|
||||
{
|
||||
error: this.state.error,
|
||||
renderAppShell: true
|
||||
}
|
||||
);
|
||||
} else {
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
};
|
||||
function ErrorWrapper({
|
||||
renderAppShell,
|
||||
title,
|
||||
children
|
||||
}) {
|
||||
if (!renderAppShell) {
|
||||
return children;
|
||||
}
|
||||
return /* @__PURE__ */ _react2.default.createElement("html", { lang: "en" }, /* @__PURE__ */ _react2.default.createElement("head", null, /* @__PURE__ */ _react2.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ _react2.default.createElement(
|
||||
"meta",
|
||||
{
|
||||
name: "viewport",
|
||||
content: "width=device-width,initial-scale=1,viewport-fit=cover"
|
||||
}
|
||||
), /* @__PURE__ */ _react2.default.createElement("title", null, title)), /* @__PURE__ */ _react2.default.createElement("body", null, /* @__PURE__ */ _react2.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
|
||||
}
|
||||
function RSCDefaultRootErrorBoundaryImpl({
|
||||
error,
|
||||
renderAppShell
|
||||
}) {
|
||||
console.error(error);
|
||||
let heyDeveloper = /* @__PURE__ */ _react2.default.createElement(
|
||||
"script",
|
||||
{
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `
|
||||
console.log(
|
||||
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
||||
);
|
||||
`
|
||||
}
|
||||
}
|
||||
);
|
||||
if (_chunkVNR6V74Njs.isRouteErrorResponse.call(void 0, error)) {
|
||||
return /* @__PURE__ */ _react2.default.createElement(
|
||||
ErrorWrapper,
|
||||
{
|
||||
renderAppShell,
|
||||
title: "Unhandled Thrown Response!"
|
||||
},
|
||||
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
||||
_chunkVNR6V74Njs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
||||
);
|
||||
}
|
||||
let errorInstance;
|
||||
if (error instanceof Error) {
|
||||
errorInstance = error;
|
||||
} else {
|
||||
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
|
||||
errorInstance = new Error(errorString);
|
||||
}
|
||||
return /* @__PURE__ */ _react2.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ _react2.default.createElement(
|
||||
"pre",
|
||||
{
|
||||
style: {
|
||||
padding: "2rem",
|
||||
background: "hsla(10, 50%, 50%, 0.1)",
|
||||
color: "red",
|
||||
overflow: "auto"
|
||||
}
|
||||
},
|
||||
errorInstance.stack
|
||||
), heyDeveloper);
|
||||
}
|
||||
function RSCDefaultRootErrorBoundary({
|
||||
hasRootLayout
|
||||
}) {
|
||||
let error = _chunkVNR6V74Njs.useRouteError.call(void 0, );
|
||||
if (hasRootLayout === void 0) {
|
||||
throw new Error("Missing 'hasRootLayout' prop");
|
||||
}
|
||||
return /* @__PURE__ */ _react2.default.createElement(
|
||||
RSCDefaultRootErrorBoundaryImpl,
|
||||
{
|
||||
renderAppShell: !hasRootLayout,
|
||||
error
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// lib/rsc/route-modules.ts
|
||||
function createRSCRouteModules(payload) {
|
||||
const routeModules = {};
|
||||
for (const match of payload.matches) {
|
||||
populateRSCRouteModules(routeModules, match);
|
||||
}
|
||||
return routeModules;
|
||||
}
|
||||
function populateRSCRouteModules(routeModules, matches) {
|
||||
matches = Array.isArray(matches) ? matches : [matches];
|
||||
for (const match of matches) {
|
||||
routeModules[match.id] = {
|
||||
links: match.links,
|
||||
meta: match.meta,
|
||||
default: noopComponent
|
||||
};
|
||||
}
|
||||
}
|
||||
var noopComponent = () => null;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exports.getHydrationData = getHydrationData; exports.RSCRouterGlobalErrorBoundary = RSCRouterGlobalErrorBoundary; exports.RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.createRSCRouteModules = createRSCRouteModules; exports.populateRSCRouteModules = populateRSCRouteModules;
|
||||
1310
frontend/node_modules/react-router/dist/development/chunk-IXESJAGJ.js
generated
vendored
Normal file
1310
frontend/node_modules/react-router/dist/development/chunk-IXESJAGJ.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2283
frontend/node_modules/react-router/dist/development/chunk-JG3XND5A.mjs
generated
vendored
Normal file
2283
frontend/node_modules/react-router/dist/development/chunk-JG3XND5A.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
9454
frontend/node_modules/react-router/dist/development/chunk-VNR6V74N.js
generated
vendored
Normal file
9454
frontend/node_modules/react-router/dist/development/chunk-VNR6V74N.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
11
frontend/node_modules/react-router/dist/development/data-CQbyyGzl.d.mts
generated
vendored
11
frontend/node_modules/react-router/dist/development/data-CQbyyGzl.d.mts
generated
vendored
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* An object of unknown type for route loaders and actions provided by the
|
||||
* server's `getLoadContext()` function. This is defined as an empty interface
|
||||
* specifically so apps can leverage declaration merging to augment this type
|
||||
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
||||
*/
|
||||
interface AppLoadContext {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export type { AppLoadContext as A };
|
||||
11
frontend/node_modules/react-router/dist/development/data-CQbyyGzl.d.ts
generated
vendored
11
frontend/node_modules/react-router/dist/development/data-CQbyyGzl.d.ts
generated
vendored
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* An object of unknown type for route loaders and actions provided by the
|
||||
* server's `getLoadContext()` function. This is defined as an empty interface
|
||||
* specifically so apps can leverage declaration merging to augment this type
|
||||
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
||||
*/
|
||||
interface AppLoadContext {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export type { AppLoadContext as A };
|
||||
148
frontend/node_modules/react-router/dist/development/dom-export.d.mts
generated
vendored
148
frontend/node_modules/react-router/dist/development/dom-export.d.mts
generated
vendored
@@ -1,13 +1,151 @@
|
||||
import * as React from 'react';
|
||||
import { R as RouterProviderProps$1 } from './fog-of-war-D6dP9JIt.mjs';
|
||||
import './route-data-Cq_b5feC.mjs';
|
||||
import { f as RouterProviderProps$1, e as RouterInit, u as unstable_ClientInstrumentation, g as unstable_ClientOnErrorFunction } from './router-DIAPGK5f.mjs';
|
||||
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-DfMfSvsC.mjs';
|
||||
|
||||
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
||||
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
||||
|
||||
/**
|
||||
* @category Component Routers
|
||||
* Props for the {@link dom.HydratedRouter} component.
|
||||
*
|
||||
* @category Types
|
||||
*/
|
||||
declare function HydratedRouter(): React.JSX.Element;
|
||||
interface HydratedRouterProps {
|
||||
/**
|
||||
* Context factory function to be passed through to {@link createBrowserRouter}.
|
||||
* This function will be called to create a fresh `context` instance on each
|
||||
* navigation/fetch and made available to
|
||||
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
||||
* functions.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
/**
|
||||
* Array of instrumentation objects allowing you to instrument the router and
|
||||
* individual routes prior to router initialization (and on any subsequently
|
||||
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
||||
* mostly useful for observability such as wrapping navigations, fetches,
|
||||
* as well as route loaders/actions/middlewares with logging and/or performance
|
||||
* tracing.
|
||||
*
|
||||
* ```tsx
|
||||
* startTransition(() => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <HydratedRouter unstable_instrumentations={[logging]} />
|
||||
* );
|
||||
* });
|
||||
*
|
||||
* const logging = {
|
||||
* router({ instrument }) {
|
||||
* instrument({
|
||||
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
|
||||
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
|
||||
* });
|
||||
* },
|
||||
* route({ instrument, id }) {
|
||||
* instrument({
|
||||
* middleware: (impl, { request }) => logExecution(
|
||||
* `middleware ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* loader: (impl, { request }) => logExecution(
|
||||
* `loader ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* action: (impl, { request }) => logExecution(
|
||||
* `action ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* })
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* async function logExecution(label: string, impl: () => Promise<void>) {
|
||||
* let start = performance.now();
|
||||
* console.log(`start ${label}`);
|
||||
* await impl();
|
||||
* let duration = Math.round(performance.now() - start);
|
||||
* console.log(`end ${label} (${duration}ms)`);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
||||
/**
|
||||
* An error handler function that will be called for any loader/action/render
|
||||
* errors that are encountered in your application. This is useful for
|
||||
* logging or reporting errors instead of the `ErrorBoundary` because it's not
|
||||
* subject to re-rendering and will only run one time per error.
|
||||
*
|
||||
* The `errorInfo` parameter is passed along from
|
||||
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
|
||||
* and is only present for render errors.
|
||||
*
|
||||
* ```tsx
|
||||
* <HydratedRouter unstable_onError={(error, errorInfo) => {
|
||||
* console.error(error, errorInfo);
|
||||
* reportToErrorService(error, errorInfo);
|
||||
* }} />
|
||||
* ```
|
||||
*/
|
||||
unstable_onError?: unstable_ClientOnErrorFunction;
|
||||
}
|
||||
/**
|
||||
* Framework-mode router component to be used to hydrate a router from a
|
||||
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
||||
*
|
||||
* @public
|
||||
* @category Framework Routers
|
||||
* @mode framework
|
||||
* @param props Props
|
||||
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
|
||||
* @returns A React element that represents the hydrated application.
|
||||
*/
|
||||
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { HydratedRouter, RouterProvider, type RouterProviderProps };
|
||||
declare global {
|
||||
interface Window {
|
||||
__FLIGHT_DATA: any[];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream for hydration. Usually passed directly to your
|
||||
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then(
|
||||
* (payload: RSCServerPayload) => {
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter {...props} />
|
||||
* </StrictMode>,
|
||||
* {
|
||||
* // Options
|
||||
* }
|
||||
* );
|
||||
* });
|
||||
* }
|
||||
* );
|
||||
*
|
||||
* @name unstable_getRSCStream
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function getRSCStream(): ReadableStream;
|
||||
|
||||
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };
|
||||
|
||||
149
frontend/node_modules/react-router/dist/development/dom-export.d.ts
generated
vendored
149
frontend/node_modules/react-router/dist/development/dom-export.d.ts
generated
vendored
@@ -1,13 +1,152 @@
|
||||
import * as React from 'react';
|
||||
import { R as RouterProviderProps$1 } from './fog-of-war-CCAcUMgB.js';
|
||||
import './route-data-Cq_b5feC.js';
|
||||
import { RouterProviderProps as RouterProviderProps$1, RouterInit, unstable_ClientOnErrorFunction } from 'react-router';
|
||||
import { u as unstable_ClientInstrumentation } from './instrumentation-iAqbU5Q4.js';
|
||||
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-DM83uryY.js';
|
||||
|
||||
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
||||
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
||||
|
||||
/**
|
||||
* @category Component Routers
|
||||
* Props for the {@link dom.HydratedRouter} component.
|
||||
*
|
||||
* @category Types
|
||||
*/
|
||||
declare function HydratedRouter(): React.JSX.Element;
|
||||
interface HydratedRouterProps {
|
||||
/**
|
||||
* Context factory function to be passed through to {@link createBrowserRouter}.
|
||||
* This function will be called to create a fresh `context` instance on each
|
||||
* navigation/fetch and made available to
|
||||
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
||||
* functions.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
/**
|
||||
* Array of instrumentation objects allowing you to instrument the router and
|
||||
* individual routes prior to router initialization (and on any subsequently
|
||||
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
||||
* mostly useful for observability such as wrapping navigations, fetches,
|
||||
* as well as route loaders/actions/middlewares with logging and/or performance
|
||||
* tracing.
|
||||
*
|
||||
* ```tsx
|
||||
* startTransition(() => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <HydratedRouter unstable_instrumentations={[logging]} />
|
||||
* );
|
||||
* });
|
||||
*
|
||||
* const logging = {
|
||||
* router({ instrument }) {
|
||||
* instrument({
|
||||
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
|
||||
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
|
||||
* });
|
||||
* },
|
||||
* route({ instrument, id }) {
|
||||
* instrument({
|
||||
* middleware: (impl, { request }) => logExecution(
|
||||
* `middleware ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* loader: (impl, { request }) => logExecution(
|
||||
* `loader ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* action: (impl, { request }) => logExecution(
|
||||
* `action ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* })
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* async function logExecution(label: string, impl: () => Promise<void>) {
|
||||
* let start = performance.now();
|
||||
* console.log(`start ${label}`);
|
||||
* await impl();
|
||||
* let duration = Math.round(performance.now() - start);
|
||||
* console.log(`end ${label} (${duration}ms)`);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
||||
/**
|
||||
* An error handler function that will be called for any loader/action/render
|
||||
* errors that are encountered in your application. This is useful for
|
||||
* logging or reporting errors instead of the `ErrorBoundary` because it's not
|
||||
* subject to re-rendering and will only run one time per error.
|
||||
*
|
||||
* The `errorInfo` parameter is passed along from
|
||||
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
|
||||
* and is only present for render errors.
|
||||
*
|
||||
* ```tsx
|
||||
* <HydratedRouter unstable_onError={(error, errorInfo) => {
|
||||
* console.error(error, errorInfo);
|
||||
* reportToErrorService(error, errorInfo);
|
||||
* }} />
|
||||
* ```
|
||||
*/
|
||||
unstable_onError?: unstable_ClientOnErrorFunction;
|
||||
}
|
||||
/**
|
||||
* Framework-mode router component to be used to hydrate a router from a
|
||||
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
||||
*
|
||||
* @public
|
||||
* @category Framework Routers
|
||||
* @mode framework
|
||||
* @param props Props
|
||||
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
|
||||
* @returns A React element that represents the hydrated application.
|
||||
*/
|
||||
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { HydratedRouter, RouterProvider, type RouterProviderProps };
|
||||
declare global {
|
||||
interface Window {
|
||||
__FLIGHT_DATA: any[];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream for hydration. Usually passed directly to your
|
||||
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then(
|
||||
* (payload: RSCServerPayload) => {
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter {...props} />
|
||||
* </StrictMode>,
|
||||
* {
|
||||
* // Options
|
||||
* }
|
||||
* );
|
||||
* });
|
||||
* }
|
||||
* );
|
||||
*
|
||||
* @name unstable_getRSCStream
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function getRSCStream(): ReadableStream;
|
||||
|
||||
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };
|
||||
|
||||
6179
frontend/node_modules/react-router/dist/development/dom-export.js
generated
vendored
6179
frontend/node_modules/react-router/dist/development/dom-export.js
generated
vendored
File diff suppressed because it is too large
Load Diff
810
frontend/node_modules/react-router/dist/development/dom-export.mjs
generated
vendored
810
frontend/node_modules/react-router/dist/development/dom-export.mjs
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
@@ -8,24 +8,42 @@
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
import {
|
||||
RSCRouterGlobalErrorBoundary,
|
||||
deserializeErrors,
|
||||
getHydrationData,
|
||||
populateRSCRouteModules
|
||||
} from "./chunk-JG3XND5A.mjs";
|
||||
import {
|
||||
CRITICAL_CSS_DATA_ATTRIBUTE,
|
||||
ErrorResponseImpl,
|
||||
FrameworkContext,
|
||||
RSCRouterContext,
|
||||
RemixErrorBoundary,
|
||||
RouterProvider,
|
||||
UNSTABLE_TransitionEnabledRouterProvider,
|
||||
createBrowserHistory,
|
||||
createClientRoutes,
|
||||
createClientRoutesWithHMRRevalidationOptOut,
|
||||
createContext,
|
||||
createRequestInit,
|
||||
createRouter,
|
||||
decodeViaTurboStream,
|
||||
deserializeErrors,
|
||||
getPatchRoutesOnNavigationFunction,
|
||||
getSingleFetchDataStrategy,
|
||||
getSingleFetchDataStrategyImpl,
|
||||
getTurboStreamSingleFetchDataStrategy,
|
||||
hydrationRouteProperties,
|
||||
invariant,
|
||||
isMutationMethod,
|
||||
mapRouteProperties,
|
||||
matchRoutes,
|
||||
noActionDefinedError,
|
||||
setIsHydrated,
|
||||
shouldHydrateRouteLoader,
|
||||
singleFetchUrl,
|
||||
stripIndexParam,
|
||||
useFogOFWarDiscovery
|
||||
} from "./chunk-IR6S3I6Y.mjs";
|
||||
} from "./chunk-UIGDSWPH.mjs";
|
||||
|
||||
// lib/dom-export/dom-router-provider.tsx
|
||||
import * as React from "react";
|
||||
@@ -40,6 +58,18 @@ var ssrInfo = null;
|
||||
var router = null;
|
||||
function initSsrInfo() {
|
||||
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
|
||||
if (window.__reactRouterManifest.sri === true) {
|
||||
const importMap = document.querySelector("script[rr-importmap]");
|
||||
if (importMap?.textContent) {
|
||||
try {
|
||||
window.__reactRouterManifest.sri = JSON.parse(
|
||||
importMap.textContent
|
||||
).integrity;
|
||||
} catch (err) {
|
||||
console.error("Failed to parse import map", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
ssrInfo = {
|
||||
context: window.__reactRouterContext,
|
||||
manifest: window.__reactRouterManifest,
|
||||
@@ -50,7 +80,10 @@ function initSsrInfo() {
|
||||
};
|
||||
}
|
||||
}
|
||||
function createHydratedRouter() {
|
||||
function createHydratedRouter({
|
||||
getContext,
|
||||
unstable_instrumentations
|
||||
}) {
|
||||
initSsrInfo();
|
||||
if (!ssrInfo) {
|
||||
throw new Error(
|
||||
@@ -79,35 +112,32 @@ function createHydratedRouter() {
|
||||
ssrInfo.manifest.routes,
|
||||
ssrInfo.routeModules,
|
||||
ssrInfo.context.state,
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.isSpaMode
|
||||
);
|
||||
let hydrationData = void 0;
|
||||
if (!ssrInfo.context.isSpaMode) {
|
||||
hydrationData = {
|
||||
...ssrInfo.context.state,
|
||||
loaderData: { ...ssrInfo.context.state.loaderData }
|
||||
};
|
||||
let initialMatches = matchRoutes(
|
||||
routes,
|
||||
window.location,
|
||||
window.__reactRouterContext?.basename
|
||||
);
|
||||
if (initialMatches) {
|
||||
for (let match of initialMatches) {
|
||||
let routeId = match.route.id;
|
||||
let route = ssrInfo.routeModules[routeId];
|
||||
let manifestRoute = ssrInfo.manifest.routes[routeId];
|
||||
if (route && manifestRoute && shouldHydrateRouteLoader(
|
||||
manifestRoute,
|
||||
route,
|
||||
ssrInfo.context.isSpaMode
|
||||
) && (route.HydrateFallback || !manifestRoute.hasLoader)) {
|
||||
delete hydrationData.loaderData[routeId];
|
||||
} else if (manifestRoute && !manifestRoute.hasLoader) {
|
||||
hydrationData.loaderData[routeId] = null;
|
||||
if (ssrInfo.context.isSpaMode) {
|
||||
let { loaderData } = ssrInfo.context.state;
|
||||
if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && "root" in loaderData) {
|
||||
hydrationData = {
|
||||
loaderData: {
|
||||
root: loaderData.root
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
} else {
|
||||
hydrationData = getHydrationData({
|
||||
state: ssrInfo.context.state,
|
||||
routes,
|
||||
getRouteInfo: (routeId) => ({
|
||||
clientLoader: ssrInfo.routeModules[routeId]?.clientLoader,
|
||||
hasLoader: ssrInfo.manifest.routes[routeId]?.hasLoader === true,
|
||||
hasHydrateFallback: ssrInfo.routeModules[routeId]?.HydrateFallback != null
|
||||
}),
|
||||
location: window.location,
|
||||
basename: window.__reactRouterContext?.basename,
|
||||
isSpaMode: ssrInfo.context.isSpaMode
|
||||
});
|
||||
if (hydrationData && hydrationData.errors) {
|
||||
hydrationData.errors = deserializeErrors(hydrationData.errors);
|
||||
}
|
||||
@@ -116,16 +146,26 @@ function createHydratedRouter() {
|
||||
routes,
|
||||
history: createBrowserHistory(),
|
||||
basename: ssrInfo.context.basename,
|
||||
getContext,
|
||||
hydrationData,
|
||||
hydrationRouteProperties,
|
||||
unstable_instrumentations,
|
||||
mapRouteProperties,
|
||||
dataStrategy: getSingleFetchDataStrategy(
|
||||
future: {
|
||||
middleware: ssrInfo.context.future.v8_middleware
|
||||
},
|
||||
dataStrategy: getTurboStreamSingleFetchDataStrategy(
|
||||
() => router2,
|
||||
ssrInfo.manifest,
|
||||
ssrInfo.routeModules,
|
||||
() => router2
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.basename
|
||||
),
|
||||
patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(
|
||||
ssrInfo.manifest,
|
||||
ssrInfo.routeModules,
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.routeDiscovery,
|
||||
ssrInfo.context.isSpaMode,
|
||||
ssrInfo.context.basename
|
||||
)
|
||||
@@ -140,19 +180,27 @@ function createHydratedRouter() {
|
||||
window.__reactRouterDataRouter = router2;
|
||||
return router2;
|
||||
}
|
||||
function HydratedRouter() {
|
||||
function HydratedRouter(props) {
|
||||
if (!router) {
|
||||
router = createHydratedRouter();
|
||||
router = createHydratedRouter({
|
||||
getContext: props.getContext,
|
||||
unstable_instrumentations: props.unstable_instrumentations
|
||||
});
|
||||
}
|
||||
let [criticalCss, setCriticalCss] = React2.useState(
|
||||
process.env.NODE_ENV === "development" ? ssrInfo?.context.criticalCss : void 0
|
||||
);
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
if (ssrInfo) {
|
||||
window.__reactRouterClearCriticalCss = () => setCriticalCss(void 0);
|
||||
React2.useEffect(() => {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
setCriticalCss(void 0);
|
||||
}
|
||||
}
|
||||
let [location, setLocation] = React2.useState(router.state.location);
|
||||
}, []);
|
||||
React2.useEffect(() => {
|
||||
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
||||
document.querySelectorAll(`[${CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
||||
}
|
||||
}, [criticalCss]);
|
||||
let [location2, setLocation] = React2.useState(router.state.location);
|
||||
React2.useLayoutEffect(() => {
|
||||
if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {
|
||||
ssrInfo.routerInitialized = true;
|
||||
@@ -162,17 +210,19 @@ function HydratedRouter() {
|
||||
React2.useLayoutEffect(() => {
|
||||
if (ssrInfo && ssrInfo.router) {
|
||||
return ssrInfo.router.subscribe((newState) => {
|
||||
if (newState.location !== location) {
|
||||
if (newState.location !== location2) {
|
||||
setLocation(newState.location);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [location]);
|
||||
}, [location2]);
|
||||
invariant(ssrInfo, "ssrInfo unavailable for HydratedRouter");
|
||||
useFogOFWarDiscovery(
|
||||
router,
|
||||
ssrInfo.manifest,
|
||||
ssrInfo.routeModules,
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.routeDiscovery,
|
||||
ssrInfo.context.isSpaMode
|
||||
);
|
||||
return (
|
||||
@@ -186,14 +236,686 @@ function HydratedRouter() {
|
||||
routeModules: ssrInfo.routeModules,
|
||||
future: ssrInfo.context.future,
|
||||
criticalCss,
|
||||
isSpaMode: ssrInfo.context.isSpaMode
|
||||
ssr: ssrInfo.context.ssr,
|
||||
isSpaMode: ssrInfo.context.isSpaMode,
|
||||
routeDiscovery: ssrInfo.context.routeDiscovery
|
||||
}
|
||||
},
|
||||
/* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location }, /* @__PURE__ */ React2.createElement(RouterProvider2, { router }))
|
||||
/* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location: location2 }, /* @__PURE__ */ React2.createElement(
|
||||
RouterProvider2,
|
||||
{
|
||||
router,
|
||||
unstable_onError: props.unstable_onError
|
||||
}
|
||||
))
|
||||
), /* @__PURE__ */ React2.createElement(React2.Fragment, null))
|
||||
);
|
||||
}
|
||||
|
||||
// lib/rsc/browser.tsx
|
||||
import * as React3 from "react";
|
||||
import * as ReactDOM2 from "react-dom";
|
||||
function createCallServer({
|
||||
createFromReadableStream,
|
||||
createTemporaryReferenceSet,
|
||||
encodeReply,
|
||||
fetch: fetchImplementation = fetch
|
||||
}) {
|
||||
const globalVar = window;
|
||||
let landedActionId = 0;
|
||||
return async (id, args) => {
|
||||
let actionId = globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;
|
||||
const temporaryReferences = createTemporaryReferenceSet();
|
||||
const payloadPromise = fetchImplementation(
|
||||
new Request(location.href, {
|
||||
body: await encodeReply(args, { temporaryReferences }),
|
||||
method: "POST",
|
||||
headers: {
|
||||
Accept: "text/x-component",
|
||||
"rsc-action-id": id
|
||||
}
|
||||
})
|
||||
).then((response) => {
|
||||
if (!response.body) {
|
||||
throw new Error("No response body");
|
||||
}
|
||||
return createFromReadableStream(response.body, {
|
||||
temporaryReferences
|
||||
});
|
||||
});
|
||||
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
||||
Promise.resolve(payloadPromise).then(async (payload) => {
|
||||
if (payload.type === "redirect") {
|
||||
if (payload.reload || isExternalLocation(payload.location)) {
|
||||
window.location.href = payload.location;
|
||||
return () => {
|
||||
};
|
||||
}
|
||||
return () => {
|
||||
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
||||
replace: payload.replace
|
||||
});
|
||||
};
|
||||
}
|
||||
if (payload.type !== "action") {
|
||||
throw new Error("Unexpected payload type");
|
||||
}
|
||||
const rerender = await payload.rerender;
|
||||
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
||||
if (rerender.type === "redirect") {
|
||||
if (rerender.reload || isExternalLocation(rerender.location)) {
|
||||
window.location.href = rerender.location;
|
||||
return;
|
||||
}
|
||||
return () => {
|
||||
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
||||
replace: rerender.replace
|
||||
});
|
||||
};
|
||||
}
|
||||
return () => {
|
||||
let lastMatch;
|
||||
for (const match of rerender.matches) {
|
||||
globalVar.__reactRouterDataRouter.patchRoutes(
|
||||
lastMatch?.id ?? null,
|
||||
[createRouteFromServerManifest(match)],
|
||||
true
|
||||
);
|
||||
lastMatch = match;
|
||||
}
|
||||
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
||||
{
|
||||
loaderData: Object.assign(
|
||||
{},
|
||||
globalVar.__reactRouterDataRouter.state.loaderData,
|
||||
rerender.loaderData
|
||||
),
|
||||
errors: rerender.errors ? Object.assign(
|
||||
{},
|
||||
globalVar.__reactRouterDataRouter.state.errors,
|
||||
rerender.errors
|
||||
) : null
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
return () => {
|
||||
};
|
||||
}).catch(() => {
|
||||
})
|
||||
);
|
||||
return payloadPromise.then((payload) => {
|
||||
if (payload.type !== "action" && payload.type !== "redirect") {
|
||||
throw new Error("Unexpected payload type");
|
||||
}
|
||||
return payload.actionResult;
|
||||
});
|
||||
};
|
||||
}
|
||||
function createRouterFromPayload({
|
||||
fetchImplementation,
|
||||
createFromReadableStream,
|
||||
getContext,
|
||||
payload
|
||||
}) {
|
||||
const globalVar = window;
|
||||
if (globalVar.__reactRouterDataRouter && globalVar.__reactRouterRouteModules)
|
||||
return {
|
||||
router: globalVar.__reactRouterDataRouter,
|
||||
routeModules: globalVar.__reactRouterRouteModules
|
||||
};
|
||||
if (payload.type !== "render") throw new Error("Invalid payload type");
|
||||
globalVar.__reactRouterRouteModules = globalVar.__reactRouterRouteModules ?? {};
|
||||
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
||||
let patches = /* @__PURE__ */ new Map();
|
||||
payload.patches?.forEach((patch) => {
|
||||
invariant(patch.parentId, "Invalid patch parentId");
|
||||
if (!patches.has(patch.parentId)) {
|
||||
patches.set(patch.parentId, []);
|
||||
}
|
||||
patches.get(patch.parentId)?.push(patch);
|
||||
});
|
||||
let routes = payload.matches.reduceRight((previous, match) => {
|
||||
const route = createRouteFromServerManifest(
|
||||
match,
|
||||
payload
|
||||
);
|
||||
if (previous.length > 0) {
|
||||
route.children = previous;
|
||||
let childrenToPatch = patches.get(match.id);
|
||||
if (childrenToPatch) {
|
||||
route.children.push(
|
||||
...childrenToPatch.map((r) => createRouteFromServerManifest(r))
|
||||
);
|
||||
}
|
||||
}
|
||||
return [route];
|
||||
}, []);
|
||||
globalVar.__reactRouterDataRouter = createRouter({
|
||||
routes,
|
||||
getContext,
|
||||
basename: payload.basename,
|
||||
history: createBrowserHistory(),
|
||||
hydrationData: getHydrationData({
|
||||
state: {
|
||||
loaderData: payload.loaderData,
|
||||
actionData: payload.actionData,
|
||||
errors: payload.errors
|
||||
},
|
||||
routes,
|
||||
getRouteInfo: (routeId) => {
|
||||
let match = payload.matches.find((m) => m.id === routeId);
|
||||
invariant(match, "Route not found in payload");
|
||||
return {
|
||||
clientLoader: match.clientLoader,
|
||||
hasLoader: match.hasLoader,
|
||||
hasHydrateFallback: match.hydrateFallbackElement != null
|
||||
};
|
||||
},
|
||||
location: payload.location,
|
||||
basename: payload.basename,
|
||||
isSpaMode: false
|
||||
}),
|
||||
async patchRoutesOnNavigation({ path, signal }) {
|
||||
if (discoveredPaths.has(path)) {
|
||||
return;
|
||||
}
|
||||
await fetchAndApplyManifestPatches(
|
||||
[path],
|
||||
createFromReadableStream,
|
||||
fetchImplementation,
|
||||
signal
|
||||
);
|
||||
},
|
||||
// FIXME: Pass `build.ssr` into this function
|
||||
dataStrategy: getRSCSingleFetchDataStrategy(
|
||||
() => globalVar.__reactRouterDataRouter,
|
||||
true,
|
||||
payload.basename,
|
||||
createFromReadableStream,
|
||||
fetchImplementation
|
||||
)
|
||||
});
|
||||
if (globalVar.__reactRouterDataRouter.state.initialized) {
|
||||
globalVar.__routerInitialized = true;
|
||||
globalVar.__reactRouterDataRouter.initialize();
|
||||
} else {
|
||||
globalVar.__routerInitialized = false;
|
||||
}
|
||||
let lastLoaderData = void 0;
|
||||
globalVar.__reactRouterDataRouter.subscribe(({ loaderData, actionData }) => {
|
||||
if (lastLoaderData !== loaderData) {
|
||||
globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;
|
||||
}
|
||||
});
|
||||
globalVar.__reactRouterDataRouter._updateRoutesForHMR = (routeUpdateByRouteId) => {
|
||||
const oldRoutes = window.__reactRouterDataRouter.routes;
|
||||
const newRoutes = [];
|
||||
function walkRoutes(routes2, parentId) {
|
||||
return routes2.map((route) => {
|
||||
const routeUpdate = routeUpdateByRouteId.get(route.id);
|
||||
if (routeUpdate) {
|
||||
const {
|
||||
routeModule,
|
||||
hasAction,
|
||||
hasComponent,
|
||||
hasErrorBoundary,
|
||||
hasLoader
|
||||
} = routeUpdate;
|
||||
const newRoute = createRouteFromServerManifest({
|
||||
clientAction: routeModule.clientAction,
|
||||
clientLoader: routeModule.clientLoader,
|
||||
element: route.element,
|
||||
errorElement: route.errorElement,
|
||||
handle: route.handle,
|
||||
hasAction,
|
||||
hasComponent,
|
||||
hasErrorBoundary,
|
||||
hasLoader,
|
||||
hydrateFallbackElement: route.hydrateFallbackElement,
|
||||
id: route.id,
|
||||
index: route.index,
|
||||
links: routeModule.links,
|
||||
meta: routeModule.meta,
|
||||
parentId,
|
||||
path: route.path,
|
||||
shouldRevalidate: routeModule.shouldRevalidate
|
||||
});
|
||||
if (route.children) {
|
||||
newRoute.children = walkRoutes(route.children, route.id);
|
||||
}
|
||||
return newRoute;
|
||||
}
|
||||
const updatedRoute = { ...route };
|
||||
if (route.children) {
|
||||
updatedRoute.children = walkRoutes(route.children, route.id);
|
||||
}
|
||||
return updatedRoute;
|
||||
});
|
||||
}
|
||||
newRoutes.push(
|
||||
...walkRoutes(oldRoutes, void 0)
|
||||
);
|
||||
window.__reactRouterDataRouter._internalSetRoutes(newRoutes);
|
||||
};
|
||||
return {
|
||||
router: globalVar.__reactRouterDataRouter,
|
||||
routeModules: globalVar.__reactRouterRouteModules
|
||||
};
|
||||
}
|
||||
var renderedRoutesContext = createContext();
|
||||
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
||||
let dataStrategy = getSingleFetchDataStrategyImpl(
|
||||
getRouter,
|
||||
(match) => {
|
||||
let M = match;
|
||||
return {
|
||||
hasLoader: M.route.hasLoader,
|
||||
hasClientLoader: M.route.hasClientLoader,
|
||||
hasComponent: M.route.hasComponent,
|
||||
hasAction: M.route.hasAction,
|
||||
hasClientAction: M.route.hasClientAction,
|
||||
hasShouldRevalidate: M.route.hasShouldRevalidate
|
||||
};
|
||||
},
|
||||
// pass map into fetchAndDecode so it can add payloads
|
||||
getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation),
|
||||
ssr,
|
||||
basename,
|
||||
// If the route has a component but we don't have an element, we need to hit
|
||||
// the server loader flow regardless of whether the client loader calls
|
||||
// `serverLoader` or not, otherwise we'll have nothing to render.
|
||||
(match) => {
|
||||
let M = match;
|
||||
return M.route.hasComponent && !M.route.element;
|
||||
}
|
||||
);
|
||||
return async (args) => args.runClientMiddleware(async () => {
|
||||
let context = args.context;
|
||||
context.set(renderedRoutesContext, []);
|
||||
let results = await dataStrategy(args);
|
||||
const renderedRoutesById = /* @__PURE__ */ new Map();
|
||||
for (const route of context.get(renderedRoutesContext)) {
|
||||
if (!renderedRoutesById.has(route.id)) {
|
||||
renderedRoutesById.set(route.id, []);
|
||||
}
|
||||
renderedRoutesById.get(route.id).push(route);
|
||||
}
|
||||
for (const match of args.matches) {
|
||||
const renderedRoutes = renderedRoutesById.get(match.route.id);
|
||||
if (renderedRoutes) {
|
||||
for (const rendered of renderedRoutes) {
|
||||
window.__reactRouterDataRouter.patchRoutes(
|
||||
rendered.parentId ?? null,
|
||||
[createRouteFromServerManifest(rendered)],
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
});
|
||||
}
|
||||
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
||||
return async (args, basename, targetRoutes) => {
|
||||
let { request, context } = args;
|
||||
let url = singleFetchUrl(request.url, basename, "rsc");
|
||||
if (request.method === "GET") {
|
||||
url = stripIndexParam(url);
|
||||
if (targetRoutes) {
|
||||
url.searchParams.set("_routes", targetRoutes.join(","));
|
||||
}
|
||||
}
|
||||
let res = await fetchImplementation(
|
||||
new Request(url, await createRequestInit(request))
|
||||
);
|
||||
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
||||
throw new ErrorResponseImpl(res.status, res.statusText, await res.text());
|
||||
}
|
||||
invariant(res.body, "No response body to decode");
|
||||
try {
|
||||
const payload = await createFromReadableStream(res.body, {
|
||||
temporaryReferences: void 0
|
||||
});
|
||||
if (payload.type === "redirect") {
|
||||
return {
|
||||
status: res.status,
|
||||
data: {
|
||||
redirect: {
|
||||
redirect: payload.location,
|
||||
reload: payload.reload,
|
||||
replace: payload.replace,
|
||||
revalidate: false,
|
||||
status: payload.status
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
if (payload.type !== "render") {
|
||||
throw new Error("Unexpected payload type");
|
||||
}
|
||||
context.get(renderedRoutesContext).push(...payload.matches);
|
||||
let results = { routes: {} };
|
||||
const dataKey = isMutationMethod(request.method) ? "actionData" : "loaderData";
|
||||
for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
|
||||
results.routes[routeId] = { data };
|
||||
}
|
||||
if (payload.errors) {
|
||||
for (let [routeId, error] of Object.entries(payload.errors)) {
|
||||
results.routes[routeId] = { error };
|
||||
}
|
||||
}
|
||||
return { status: res.status, data: results };
|
||||
} catch (e) {
|
||||
throw new Error("Unable to decode RSC response");
|
||||
}
|
||||
};
|
||||
}
|
||||
function RSCHydratedRouter({
|
||||
createFromReadableStream,
|
||||
fetch: fetchImplementation = fetch,
|
||||
payload,
|
||||
routeDiscovery = "eager",
|
||||
getContext
|
||||
}) {
|
||||
if (payload.type !== "render") throw new Error("Invalid payload type");
|
||||
let { router: router2, routeModules } = React3.useMemo(
|
||||
() => createRouterFromPayload({
|
||||
payload,
|
||||
fetchImplementation,
|
||||
getContext,
|
||||
createFromReadableStream
|
||||
}),
|
||||
[createFromReadableStream, payload, fetchImplementation, getContext]
|
||||
);
|
||||
React3.useEffect(() => {
|
||||
setIsHydrated();
|
||||
}, []);
|
||||
React3.useLayoutEffect(() => {
|
||||
const globalVar = window;
|
||||
if (!globalVar.__routerInitialized) {
|
||||
globalVar.__routerInitialized = true;
|
||||
globalVar.__reactRouterDataRouter.initialize();
|
||||
}
|
||||
}, []);
|
||||
let [location2, setLocation] = React3.useState(router2.state.location);
|
||||
React3.useLayoutEffect(
|
||||
() => router2.subscribe((newState) => {
|
||||
if (newState.location !== location2) {
|
||||
setLocation(newState.location);
|
||||
}
|
||||
}),
|
||||
[router2, location2]
|
||||
);
|
||||
React3.useEffect(() => {
|
||||
if (routeDiscovery === "lazy" || // @ts-expect-error - TS doesn't know about this yet
|
||||
window.navigator?.connection?.saveData === true) {
|
||||
return;
|
||||
}
|
||||
function registerElement(el) {
|
||||
let path = el.tagName === "FORM" ? el.getAttribute("action") : el.getAttribute("href");
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
|
||||
if (!discoveredPaths.has(pathname)) {
|
||||
nextPaths.add(pathname);
|
||||
}
|
||||
}
|
||||
async function fetchPatches() {
|
||||
document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
|
||||
let paths = Array.from(nextPaths.keys()).filter((path) => {
|
||||
if (discoveredPaths.has(path)) {
|
||||
nextPaths.delete(path);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (paths.length === 0) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await fetchAndApplyManifestPatches(
|
||||
paths,
|
||||
createFromReadableStream,
|
||||
fetchImplementation
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Failed to fetch manifest patches", e);
|
||||
}
|
||||
}
|
||||
let debouncedFetchPatches = debounce(fetchPatches, 100);
|
||||
fetchPatches();
|
||||
let observer = new MutationObserver(() => debouncedFetchPatches());
|
||||
observer.observe(document.documentElement, {
|
||||
subtree: true,
|
||||
childList: true,
|
||||
attributes: true,
|
||||
attributeFilter: ["data-discover", "href", "action"]
|
||||
});
|
||||
}, [routeDiscovery, createFromReadableStream, fetchImplementation]);
|
||||
const frameworkContext = {
|
||||
future: {
|
||||
// These flags have no runtime impact so can always be false. If we add
|
||||
// flags that drive runtime behavior they'll need to be proxied through.
|
||||
v8_middleware: false,
|
||||
unstable_subResourceIntegrity: false
|
||||
},
|
||||
isSpaMode: false,
|
||||
ssr: true,
|
||||
criticalCss: "",
|
||||
manifest: {
|
||||
routes: {},
|
||||
version: "1",
|
||||
url: "",
|
||||
entry: {
|
||||
module: "",
|
||||
imports: []
|
||||
}
|
||||
},
|
||||
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
||||
routeModules
|
||||
};
|
||||
return /* @__PURE__ */ React3.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React3.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(UNSTABLE_TransitionEnabledRouterProvider, { router: router2, flushSync: ReactDOM2.flushSync }))));
|
||||
}
|
||||
function createRouteFromServerManifest(match, payload) {
|
||||
let hasInitialData = payload && match.id in payload.loaderData;
|
||||
let initialData = payload?.loaderData[match.id];
|
||||
let hasInitialError = payload?.errors && match.id in payload.errors;
|
||||
let initialError = payload?.errors?.[match.id];
|
||||
let isHydrationRequest = match.clientLoader?.hydrate === true || !match.hasLoader || // If the route has a component but we don't have an element, we need to hit
|
||||
// the server loader flow regardless of whether the client loader calls
|
||||
// `serverLoader` or not, otherwise we'll have nothing to render.
|
||||
match.hasComponent && !match.element;
|
||||
invariant(window.__reactRouterRouteModules);
|
||||
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
||||
let dataRoute = {
|
||||
id: match.id,
|
||||
element: match.element,
|
||||
errorElement: match.errorElement,
|
||||
handle: match.handle,
|
||||
hasErrorBoundary: match.hasErrorBoundary,
|
||||
hydrateFallbackElement: match.hydrateFallbackElement,
|
||||
index: match.index,
|
||||
loader: match.clientLoader ? async (args, singleFetch) => {
|
||||
try {
|
||||
let result = await match.clientLoader({
|
||||
...args,
|
||||
serverLoader: () => {
|
||||
preventInvalidServerHandlerCall(
|
||||
"loader",
|
||||
match.id,
|
||||
match.hasLoader
|
||||
);
|
||||
if (isHydrationRequest) {
|
||||
if (hasInitialData) {
|
||||
return initialData;
|
||||
}
|
||||
if (hasInitialError) {
|
||||
throw initialError;
|
||||
}
|
||||
}
|
||||
return callSingleFetch(singleFetch);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
} finally {
|
||||
isHydrationRequest = false;
|
||||
}
|
||||
} : (
|
||||
// We always make the call in this RSC world since even if we don't
|
||||
// have a `loader` we may need to get the `element` implementation
|
||||
(_, singleFetch) => callSingleFetch(singleFetch)
|
||||
),
|
||||
action: match.clientAction ? (args, singleFetch) => match.clientAction({
|
||||
...args,
|
||||
serverAction: async () => {
|
||||
preventInvalidServerHandlerCall(
|
||||
"action",
|
||||
match.id,
|
||||
match.hasLoader
|
||||
);
|
||||
return await callSingleFetch(singleFetch);
|
||||
}
|
||||
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
||||
throw noActionDefinedError("action", match.id);
|
||||
},
|
||||
path: match.path,
|
||||
shouldRevalidate: match.shouldRevalidate,
|
||||
// We always have a "loader" in this RSC world since even if we don't
|
||||
// have a `loader` we may need to get the `element` implementation
|
||||
hasLoader: true,
|
||||
hasClientLoader: match.clientLoader != null,
|
||||
hasAction: match.hasAction,
|
||||
hasClientAction: match.clientAction != null,
|
||||
hasShouldRevalidate: match.shouldRevalidate != null
|
||||
};
|
||||
if (typeof dataRoute.loader === "function") {
|
||||
dataRoute.loader.hydrate = shouldHydrateRouteLoader(
|
||||
match.id,
|
||||
match.clientLoader,
|
||||
match.hasLoader,
|
||||
false
|
||||
);
|
||||
}
|
||||
return dataRoute;
|
||||
}
|
||||
function callSingleFetch(singleFetch) {
|
||||
invariant(typeof singleFetch === "function", "Invalid singleFetch parameter");
|
||||
return singleFetch();
|
||||
}
|
||||
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
||||
if (!hasHandler) {
|
||||
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
||||
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
||||
console.error(msg);
|
||||
throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
|
||||
}
|
||||
}
|
||||
var nextPaths = /* @__PURE__ */ new Set();
|
||||
var discoveredPathsMaxSize = 1e3;
|
||||
var discoveredPaths = /* @__PURE__ */ new Set();
|
||||
var URL_LIMIT = 7680;
|
||||
function getManifestUrl(paths) {
|
||||
if (paths.length === 0) {
|
||||
return null;
|
||||
}
|
||||
if (paths.length === 1) {
|
||||
return new URL(`${paths[0]}.manifest`, window.location.origin);
|
||||
}
|
||||
const globalVar = window;
|
||||
let basename = (globalVar.__reactRouterDataRouter.basename ?? "").replace(
|
||||
/^\/|\/$/g,
|
||||
""
|
||||
);
|
||||
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
||||
url.searchParams.set("paths", paths.sort().join(","));
|
||||
return url;
|
||||
}
|
||||
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|
||||
let url = getManifestUrl(paths);
|
||||
if (url == null) {
|
||||
return;
|
||||
}
|
||||
if (url.toString().length > URL_LIMIT) {
|
||||
nextPaths.clear();
|
||||
return;
|
||||
}
|
||||
let response = await fetchImplementation(new Request(url, { signal }));
|
||||
if (!response.body || response.status < 200 || response.status >= 300) {
|
||||
throw new Error("Unable to fetch new route matches from the server");
|
||||
}
|
||||
let payload = await createFromReadableStream(response.body, {
|
||||
temporaryReferences: void 0
|
||||
});
|
||||
if (payload.type !== "manifest") {
|
||||
throw new Error("Failed to patch routes");
|
||||
}
|
||||
paths.forEach((p) => addToFifoQueue(p, discoveredPaths));
|
||||
payload.patches.forEach((p) => {
|
||||
window.__reactRouterDataRouter.patchRoutes(
|
||||
p.parentId ?? null,
|
||||
[createRouteFromServerManifest(p)]
|
||||
);
|
||||
});
|
||||
}
|
||||
function addToFifoQueue(path, queue) {
|
||||
if (queue.size >= discoveredPathsMaxSize) {
|
||||
let first = queue.values().next().value;
|
||||
queue.delete(first);
|
||||
}
|
||||
queue.add(path);
|
||||
}
|
||||
function debounce(callback, wait) {
|
||||
let timeoutId;
|
||||
return (...args) => {
|
||||
window.clearTimeout(timeoutId);
|
||||
timeoutId = window.setTimeout(() => callback(...args), wait);
|
||||
};
|
||||
}
|
||||
function isExternalLocation(location2) {
|
||||
const newLocation = new URL(location2, window.location.href);
|
||||
return newLocation.origin !== window.location.origin;
|
||||
}
|
||||
|
||||
// lib/rsc/html-stream/browser.ts
|
||||
function getRSCStream() {
|
||||
let encoder = new TextEncoder();
|
||||
let streamController = null;
|
||||
let rscStream = new ReadableStream({
|
||||
start(controller) {
|
||||
if (typeof window === "undefined") {
|
||||
return;
|
||||
}
|
||||
let handleChunk = (chunk) => {
|
||||
if (typeof chunk === "string") {
|
||||
controller.enqueue(encoder.encode(chunk));
|
||||
} else {
|
||||
controller.enqueue(chunk);
|
||||
}
|
||||
};
|
||||
window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []);
|
||||
window.__FLIGHT_DATA.forEach(handleChunk);
|
||||
window.__FLIGHT_DATA.push = (chunk) => {
|
||||
handleChunk(chunk);
|
||||
return 0;
|
||||
};
|
||||
streamController = controller;
|
||||
}
|
||||
});
|
||||
if (typeof document !== "undefined" && document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
streamController?.close();
|
||||
});
|
||||
} else {
|
||||
streamController?.close();
|
||||
}
|
||||
return rscStream;
|
||||
}
|
||||
export {
|
||||
HydratedRouter,
|
||||
RouterProvider2 as RouterProvider
|
||||
RouterProvider2 as RouterProvider,
|
||||
RSCHydratedRouter as unstable_RSCHydratedRouter,
|
||||
createCallServer as unstable_createCallServer,
|
||||
getRSCStream as unstable_getRSCStream
|
||||
};
|
||||
|
||||
1598
frontend/node_modules/react-router/dist/development/fog-of-war-CCAcUMgB.d.ts
generated
vendored
1598
frontend/node_modules/react-router/dist/development/fog-of-war-CCAcUMgB.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
1598
frontend/node_modules/react-router/dist/development/fog-of-war-D6dP9JIt.d.mts
generated
vendored
1598
frontend/node_modules/react-router/dist/development/fog-of-war-D6dP9JIt.d.mts
generated
vendored
File diff suppressed because it is too large
Load Diff
2584
frontend/node_modules/react-router/dist/development/index-react-server-client-B0vnxMMk.d.mts
generated
vendored
Normal file
2584
frontend/node_modules/react-router/dist/development/index-react-server-client-B0vnxMMk.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2584
frontend/node_modules/react-router/dist/development/index-react-server-client-BSxMvS7Z.d.ts
generated
vendored
Normal file
2584
frontend/node_modules/react-router/dist/development/index-react-server-client-BSxMvS7Z.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
frontend/node_modules/react-router/dist/development/index-react-server-client.d.mts
generated
vendored
Normal file
3
frontend/node_modules/react-router/dist/development/index-react-server-client.d.mts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aR as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './router-DIAPGK5f.mjs';
|
||||
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-B0vnxMMk.mjs';
|
||||
import 'react';
|
||||
3
frontend/node_modules/react-router/dist/development/index-react-server-client.d.ts
generated
vendored
Normal file
3
frontend/node_modules/react-router/dist/development/index-react-server-client.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aP as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './instrumentation-iAqbU5Q4.js';
|
||||
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BSxMvS7Z.js';
|
||||
import 'react';
|
||||
61
frontend/node_modules/react-router/dist/development/index-react-server-client.js
generated
vendored
Normal file
61
frontend/node_modules/react-router/dist/development/index-react-server-client.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _chunkIXESJAGJjs = require('./chunk-IXESJAGJ.js');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _chunkVNR6V74Njs = require('./chunk-VNR6V74N.js');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exports.BrowserRouter = _chunkIXESJAGJjs.BrowserRouter; exports.Form = _chunkIXESJAGJjs.Form; exports.HashRouter = _chunkIXESJAGJjs.HashRouter; exports.Link = _chunkIXESJAGJjs.Link; exports.Links = _chunkVNR6V74Njs.Links; exports.MemoryRouter = _chunkVNR6V74Njs.MemoryRouter; exports.Meta = _chunkVNR6V74Njs.Meta; exports.NavLink = _chunkIXESJAGJjs.NavLink; exports.Navigate = _chunkVNR6V74Njs.Navigate; exports.Outlet = _chunkVNR6V74Njs.Outlet; exports.Route = _chunkVNR6V74Njs.Route; exports.Router = _chunkVNR6V74Njs.Router; exports.RouterProvider = _chunkVNR6V74Njs.RouterProvider; exports.Routes = _chunkVNR6V74Njs.Routes; exports.ScrollRestoration = _chunkIXESJAGJjs.ScrollRestoration; exports.StaticRouter = _chunkIXESJAGJjs.StaticRouter; exports.StaticRouterProvider = _chunkIXESJAGJjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkVNR6V74Njs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkVNR6V74Njs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkVNR6V74Njs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkVNR6V74Njs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkIXESJAGJjs.HistoryRouter;
|
||||
59
frontend/node_modules/react-router/dist/development/index-react-server-client.mjs
generated
vendored
Normal file
59
frontend/node_modules/react-router/dist/development/index-react-server-client.mjs
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
import {
|
||||
AwaitContextProvider,
|
||||
BrowserRouter,
|
||||
Form,
|
||||
HashRouter,
|
||||
HistoryRouter,
|
||||
Link,
|
||||
Links,
|
||||
MemoryRouter,
|
||||
Meta,
|
||||
NavLink,
|
||||
Navigate,
|
||||
Outlet,
|
||||
Route,
|
||||
Router,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
ScrollRestoration,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
WithComponentProps,
|
||||
WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps
|
||||
} from "./chunk-UIGDSWPH.mjs";
|
||||
export {
|
||||
BrowserRouter,
|
||||
Form,
|
||||
HashRouter,
|
||||
Link,
|
||||
Links,
|
||||
MemoryRouter,
|
||||
Meta,
|
||||
NavLink,
|
||||
Navigate,
|
||||
Outlet,
|
||||
Route,
|
||||
Router,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
ScrollRestoration,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
AwaitContextProvider as UNSAFE_AwaitContextProvider,
|
||||
WithComponentProps as UNSAFE_WithComponentProps,
|
||||
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|
||||
HistoryRouter as unstable_HistoryRouter
|
||||
};
|
||||
2534
frontend/node_modules/react-router/dist/development/index-react-server.d.mts
generated
vendored
Normal file
2534
frontend/node_modules/react-router/dist/development/index-react-server.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2534
frontend/node_modules/react-router/dist/development/index-react-server.d.ts
generated
vendored
Normal file
2534
frontend/node_modules/react-router/dist/development/index-react-server.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3557
frontend/node_modules/react-router/dist/development/index-react-server.js
generated
vendored
Normal file
3557
frontend/node_modules/react-router/dist/development/index-react-server.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3446
frontend/node_modules/react-router/dist/development/index-react-server.mjs
generated
vendored
Normal file
3446
frontend/node_modules/react-router/dist/development/index-react-server.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1341
frontend/node_modules/react-router/dist/development/index.d.mts
generated
vendored
1341
frontend/node_modules/react-router/dist/development/index.d.mts
generated
vendored
File diff suppressed because it is too large
Load Diff
1341
frontend/node_modules/react-router/dist/development/index.d.ts
generated
vendored
1341
frontend/node_modules/react-router/dist/development/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
9965
frontend/node_modules/react-router/dist/development/index.js
generated
vendored
9965
frontend/node_modules/react-router/dist/development/index.js
generated
vendored
File diff suppressed because one or more lines are too long
73
frontend/node_modules/react-router/dist/development/index.mjs
generated
vendored
73
frontend/node_modules/react-router/dist/development/index.mjs
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
@@ -8,9 +8,31 @@
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
import {
|
||||
RSCDefaultRootErrorBoundary,
|
||||
RSCStaticRouter,
|
||||
ServerMode,
|
||||
ServerRouter,
|
||||
createCookie,
|
||||
createCookieSessionStorage,
|
||||
createMemorySessionStorage,
|
||||
createRequestHandler,
|
||||
createRoutesStub,
|
||||
createSession,
|
||||
createSessionStorage,
|
||||
deserializeErrors,
|
||||
getHydrationData,
|
||||
href,
|
||||
isCookie,
|
||||
isSession,
|
||||
routeRSCServerRequest,
|
||||
setDevServerHooks
|
||||
} from "./chunk-JG3XND5A.mjs";
|
||||
import {
|
||||
Action,
|
||||
Await,
|
||||
AwaitContextProvider,
|
||||
BrowserRouter,
|
||||
DataRouterContext,
|
||||
DataRouterStateContext,
|
||||
@@ -37,46 +59,40 @@ import {
|
||||
Route,
|
||||
RouteContext,
|
||||
Router,
|
||||
RouterContextProvider,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
Scripts,
|
||||
ScrollRestoration,
|
||||
ServerMode,
|
||||
ServerRouter,
|
||||
SingleFetchRedirectSymbol,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
ViewTransitionContext,
|
||||
WithComponentProps,
|
||||
WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps,
|
||||
createBrowserHistory,
|
||||
createBrowserRouter,
|
||||
createClientRoutes,
|
||||
createClientRoutesWithHMRRevalidationOptOut,
|
||||
createCookie,
|
||||
createCookieSessionStorage,
|
||||
createContext,
|
||||
createHashRouter,
|
||||
createMemoryRouter,
|
||||
createMemorySessionStorage,
|
||||
createPath,
|
||||
createRequestHandler,
|
||||
createRouter,
|
||||
createRoutesFromChildren,
|
||||
createRoutesFromElements,
|
||||
createRoutesStub,
|
||||
createSearchParams,
|
||||
createSession,
|
||||
createSessionStorage,
|
||||
createStaticHandler,
|
||||
createStaticHandler2 as createStaticHandler,
|
||||
createStaticRouter,
|
||||
data,
|
||||
decodeViaTurboStream,
|
||||
deserializeErrors,
|
||||
generatePath,
|
||||
getPatchRoutesOnNavigationFunction,
|
||||
getSingleFetchDataStrategy,
|
||||
getTurboStreamSingleFetchDataStrategy,
|
||||
hydrationRouteProperties,
|
||||
invariant,
|
||||
isCookie,
|
||||
isRouteErrorResponse,
|
||||
isSession,
|
||||
mapRouteProperties,
|
||||
matchPath,
|
||||
matchRoutes,
|
||||
@@ -86,7 +102,6 @@ import {
|
||||
renderMatches,
|
||||
replace,
|
||||
resolvePath,
|
||||
setDevServerHooks,
|
||||
shouldHydrateRouteLoader,
|
||||
useActionData,
|
||||
useAsyncError,
|
||||
@@ -113,14 +128,18 @@ import {
|
||||
usePrompt,
|
||||
useResolvedPath,
|
||||
useRevalidator,
|
||||
useRoute,
|
||||
useRouteError,
|
||||
useRouteLoaderData,
|
||||
useRoutes,
|
||||
useScrollRestoration,
|
||||
useSearchParams,
|
||||
useSubmit,
|
||||
useViewTransitionState
|
||||
} from "./chunk-IR6S3I6Y.mjs";
|
||||
useViewTransitionState,
|
||||
withComponentProps,
|
||||
withErrorBoundaryProps,
|
||||
withHydrateFallbackProps
|
||||
} from "./chunk-UIGDSWPH.mjs";
|
||||
export {
|
||||
Await,
|
||||
BrowserRouter,
|
||||
@@ -140,6 +159,7 @@ export {
|
||||
PrefetchPageLinks,
|
||||
Route,
|
||||
Router,
|
||||
RouterContextProvider,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
Scripts,
|
||||
@@ -147,6 +167,7 @@ export {
|
||||
ServerRouter,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
AwaitContextProvider as UNSAFE_AwaitContextProvider,
|
||||
DataRouterContext as UNSAFE_DataRouterContext,
|
||||
DataRouterStateContext as UNSAFE_DataRouterStateContext,
|
||||
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
|
||||
@@ -154,25 +175,35 @@ export {
|
||||
FrameworkContext as UNSAFE_FrameworkContext,
|
||||
LocationContext as UNSAFE_LocationContext,
|
||||
NavigationContext as UNSAFE_NavigationContext,
|
||||
RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary,
|
||||
RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
|
||||
RouteContext as UNSAFE_RouteContext,
|
||||
ServerMode as UNSAFE_ServerMode,
|
||||
SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
|
||||
ViewTransitionContext as UNSAFE_ViewTransitionContext,
|
||||
WithComponentProps as UNSAFE_WithComponentProps,
|
||||
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|
||||
createBrowserHistory as UNSAFE_createBrowserHistory,
|
||||
createClientRoutes as UNSAFE_createClientRoutes,
|
||||
createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
|
||||
createRouter as UNSAFE_createRouter,
|
||||
decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
|
||||
deserializeErrors as UNSAFE_deserializeErrors,
|
||||
getHydrationData as UNSAFE_getHydrationData,
|
||||
getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
|
||||
getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy,
|
||||
getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,
|
||||
hydrationRouteProperties as UNSAFE_hydrationRouteProperties,
|
||||
invariant as UNSAFE_invariant,
|
||||
mapRouteProperties as UNSAFE_mapRouteProperties,
|
||||
shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
|
||||
useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
|
||||
useScrollRestoration as UNSAFE_useScrollRestoration,
|
||||
withComponentProps as UNSAFE_withComponentProps,
|
||||
withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,
|
||||
withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,
|
||||
createBrowserRouter,
|
||||
createContext,
|
||||
createCookie,
|
||||
createCookieSessionStorage,
|
||||
createHashRouter,
|
||||
@@ -190,6 +221,7 @@ export {
|
||||
createStaticRouter,
|
||||
data,
|
||||
generatePath,
|
||||
href,
|
||||
isCookie,
|
||||
isRouteErrorResponse,
|
||||
isSession,
|
||||
@@ -202,8 +234,11 @@ export {
|
||||
replace,
|
||||
resolvePath,
|
||||
HistoryRouter as unstable_HistoryRouter,
|
||||
RSCStaticRouter as unstable_RSCStaticRouter,
|
||||
routeRSCServerRequest as unstable_routeRSCServerRequest,
|
||||
setDevServerHooks as unstable_setDevServerHooks,
|
||||
usePrompt as unstable_usePrompt,
|
||||
useRoute as unstable_useRoute,
|
||||
useActionData,
|
||||
useAsyncError,
|
||||
useAsyncValue,
|
||||
|
||||
3187
frontend/node_modules/react-router/dist/development/instrumentation-iAqbU5Q4.d.ts
generated
vendored
Normal file
3187
frontend/node_modules/react-router/dist/development/instrumentation-iAqbU5Q4.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
184
frontend/node_modules/react-router/dist/development/lib/types/internal.d.mts
generated
vendored
Normal file
184
frontend/node_modules/react-router/dist/development/lib/types/internal.d.mts
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
import { R as RouteModule, h as LinkDescriptor, L as Location, F as Func, i as Pretty, j as MetaDescriptor, G as GetLoaderData, k as ServerDataFunctionArgs, l as MiddlewareNextFunction, m as ClientDataFunctionArgs, D as DataStrategyResult, n as ServerDataFrom, N as Normalize, o as GetActionData } from '../../router-DIAPGK5f.mjs';
|
||||
import { R as RouteFiles, P as Pages } from '../../register-_G476ptB.mjs';
|
||||
import 'react';
|
||||
|
||||
type MaybePromise<T> = T | Promise<T>;
|
||||
type Props = {
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type RouteInfo = Props & {
|
||||
module: RouteModule;
|
||||
matches: Array<MatchInfo>;
|
||||
};
|
||||
type MatchInfo = {
|
||||
id: string;
|
||||
module: RouteModule;
|
||||
};
|
||||
type MetaMatch<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
/** @deprecated Use `MetaMatch.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
|
||||
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
|
||||
ErrorBoundary: Func;
|
||||
} ? true : false;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
||||
location: Location;
|
||||
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
|
||||
params: T["params"];
|
||||
/**
|
||||
* The return value for this route's server loader function
|
||||
*
|
||||
* @deprecated Use `Route.MetaArgs.loaderData` instead
|
||||
*/
|
||||
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** The return value for this route's server loader function */
|
||||
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
||||
error?: unknown;
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: MetaMatches<T["matches"]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
||||
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type IsServerFirstRoute<T extends RouteInfo, RSCEnabled extends boolean> = RSCEnabled extends true ? T["module"] extends {
|
||||
ServerComponent: Func;
|
||||
} ? true : false : false;
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
params: T["params"];
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type Match<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
/** @deprecated Use `Match.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export default function Component({
|
||||
* params,
|
||||
* }: Route.ComponentProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: Matches<T["matches"]>;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export function ErrorBoundary({
|
||||
* params,
|
||||
* }: Route.ErrorBoundaryProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type GetAnnotations<Info extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
LinkDescriptors: LinkDescriptor[];
|
||||
LinksFunction: () => LinkDescriptor[];
|
||||
MetaArgs: CreateMetaArgs<Info>;
|
||||
MetaDescriptors: MetaDescriptors;
|
||||
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
|
||||
HeadersArgs: HeadersArgs;
|
||||
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
|
||||
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
|
||||
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
|
||||
LoaderArgs: CreateServerLoaderArgs<Info>;
|
||||
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
|
||||
ActionArgs: CreateServerActionArgs<Info>;
|
||||
ClientActionArgs: CreateClientActionArgs<Info>;
|
||||
HydrateFallbackProps: CreateHydrateFallbackProps<Info, RSCEnabled>;
|
||||
ComponentProps: CreateComponentProps<Info, RSCEnabled>;
|
||||
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, RSCEnabled>;
|
||||
};
|
||||
|
||||
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
|
||||
|
||||
type GetInfo<T extends {
|
||||
file: keyof RouteFiles;
|
||||
module: RouteModule;
|
||||
}> = {
|
||||
params: Params<T["file"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
actionData: GetActionData<T["module"]>;
|
||||
};
|
||||
|
||||
export type { GetAnnotations, GetInfo };
|
||||
184
frontend/node_modules/react-router/dist/development/lib/types/internal.d.ts
generated
vendored
Normal file
184
frontend/node_modules/react-router/dist/development/lib/types/internal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
import { R as RouteModule, f as LinkDescriptor, L as Location, F as Func, g as Pretty, h as MetaDescriptor, G as GetLoaderData, i as ServerDataFunctionArgs, j as MiddlewareNextFunction, k as ClientDataFunctionArgs, D as DataStrategyResult, l as ServerDataFrom, N as Normalize, m as GetActionData } from '../../instrumentation-iAqbU5Q4.js';
|
||||
import { R as RouteFiles, P as Pages } from '../../register-c-dooqKE.js';
|
||||
import 'react';
|
||||
|
||||
type MaybePromise<T> = T | Promise<T>;
|
||||
type Props = {
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type RouteInfo = Props & {
|
||||
module: RouteModule;
|
||||
matches: Array<MatchInfo>;
|
||||
};
|
||||
type MatchInfo = {
|
||||
id: string;
|
||||
module: RouteModule;
|
||||
};
|
||||
type MetaMatch<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
/** @deprecated Use `MetaMatch.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
|
||||
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
|
||||
ErrorBoundary: Func;
|
||||
} ? true : false;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
||||
location: Location;
|
||||
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
|
||||
params: T["params"];
|
||||
/**
|
||||
* The return value for this route's server loader function
|
||||
*
|
||||
* @deprecated Use `Route.MetaArgs.loaderData` instead
|
||||
*/
|
||||
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** The return value for this route's server loader function */
|
||||
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
||||
error?: unknown;
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: MetaMatches<T["matches"]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
||||
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type IsServerFirstRoute<T extends RouteInfo, RSCEnabled extends boolean> = RSCEnabled extends true ? T["module"] extends {
|
||||
ServerComponent: Func;
|
||||
} ? true : false : false;
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
params: T["params"];
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type Match<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
/** @deprecated Use `Match.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export default function Component({
|
||||
* params,
|
||||
* }: Route.ComponentProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: Matches<T["matches"]>;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export function ErrorBoundary({
|
||||
* params,
|
||||
* }: Route.ErrorBoundaryProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type GetAnnotations<Info extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
LinkDescriptors: LinkDescriptor[];
|
||||
LinksFunction: () => LinkDescriptor[];
|
||||
MetaArgs: CreateMetaArgs<Info>;
|
||||
MetaDescriptors: MetaDescriptors;
|
||||
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
|
||||
HeadersArgs: HeadersArgs;
|
||||
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
|
||||
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
|
||||
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
|
||||
LoaderArgs: CreateServerLoaderArgs<Info>;
|
||||
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
|
||||
ActionArgs: CreateServerActionArgs<Info>;
|
||||
ClientActionArgs: CreateClientActionArgs<Info>;
|
||||
HydrateFallbackProps: CreateHydrateFallbackProps<Info, RSCEnabled>;
|
||||
ComponentProps: CreateComponentProps<Info, RSCEnabled>;
|
||||
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, RSCEnabled>;
|
||||
};
|
||||
|
||||
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
|
||||
|
||||
type GetInfo<T extends {
|
||||
file: keyof RouteFiles;
|
||||
module: RouteModule;
|
||||
}> = {
|
||||
params: Params<T["file"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
actionData: GetActionData<T["module"]>;
|
||||
};
|
||||
|
||||
export type { GetAnnotations, GetInfo };
|
||||
10
frontend/node_modules/react-router/dist/development/lib/types/internal.js
generated
vendored
Normal file
10
frontend/node_modules/react-router/dist/development/lib/types/internal.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
109
frontend/node_modules/react-router/dist/development/lib/types/route-module.d.mts
generated
vendored
109
frontend/node_modules/react-router/dist/development/lib/types/route-module.d.mts
generated
vendored
@@ -1,109 +0,0 @@
|
||||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.mjs';
|
||||
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
|
||||
import 'react';
|
||||
|
||||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
||||
type RouteModule = {
|
||||
meta?: Func;
|
||||
links?: Func;
|
||||
headers?: Func;
|
||||
loader?: Func;
|
||||
clientLoader?: Func;
|
||||
action?: Func;
|
||||
clientAction?: Func;
|
||||
HydrateFallback?: unknown;
|
||||
default?: unknown;
|
||||
ErrorBoundary?: unknown;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
type LinkDescriptors = LinkDescriptor[];
|
||||
type RouteInfo = {
|
||||
parents: RouteInfo[];
|
||||
module: RouteModule;
|
||||
id: unknown;
|
||||
file: string;
|
||||
path: string;
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
data: T["loaderData"];
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
location: Location;
|
||||
params: T["params"];
|
||||
data: T["loaderData"];
|
||||
error?: unknown;
|
||||
matches: MetaMatches<[...T["parents"], T]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type IsHydrate<ClientLoader> = ClientLoader extends {
|
||||
hydrate: true;
|
||||
} ? true : ClientLoader extends {
|
||||
hydrate: false;
|
||||
} ? false : false;
|
||||
type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
|
||||
HydrateFallback: Func;
|
||||
} ? true : false>;
|
||||
type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
|
||||
HasHydrateFallback,
|
||||
ClientLoaderHydrate
|
||||
] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
|
||||
IsDefined<ClientLoaderData>,
|
||||
IsDefined<ServerLoaderData>
|
||||
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
|
||||
type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
|
||||
type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
|
||||
IsDefined<ServerActionData>,
|
||||
IsDefined<ClientActionData>
|
||||
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
||||
type ClientDataFunctionArgs<T extends RouteInfo> = {
|
||||
request: Request;
|
||||
params: T["params"];
|
||||
};
|
||||
type ServerDataFunctionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
context: AppLoadContext;
|
||||
};
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
};
|
||||
type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
data: T["loaderData"];
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
loaderData: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
matches: Matches<[...T["parents"], T]>;
|
||||
};
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
loaderData?: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
};
|
||||
|
||||
export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, HeadersArgs, LinkDescriptors, MetaDescriptors };
|
||||
109
frontend/node_modules/react-router/dist/development/lib/types/route-module.d.ts
generated
vendored
109
frontend/node_modules/react-router/dist/development/lib/types/route-module.d.ts
generated
vendored
@@ -1,109 +0,0 @@
|
||||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.js';
|
||||
import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
|
||||
import 'react';
|
||||
|
||||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
||||
type RouteModule = {
|
||||
meta?: Func;
|
||||
links?: Func;
|
||||
headers?: Func;
|
||||
loader?: Func;
|
||||
clientLoader?: Func;
|
||||
action?: Func;
|
||||
clientAction?: Func;
|
||||
HydrateFallback?: unknown;
|
||||
default?: unknown;
|
||||
ErrorBoundary?: unknown;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
type LinkDescriptors = LinkDescriptor[];
|
||||
type RouteInfo = {
|
||||
parents: RouteInfo[];
|
||||
module: RouteModule;
|
||||
id: unknown;
|
||||
file: string;
|
||||
path: string;
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
data: T["loaderData"];
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
location: Location;
|
||||
params: T["params"];
|
||||
data: T["loaderData"];
|
||||
error?: unknown;
|
||||
matches: MetaMatches<[...T["parents"], T]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type IsHydrate<ClientLoader> = ClientLoader extends {
|
||||
hydrate: true;
|
||||
} ? true : ClientLoader extends {
|
||||
hydrate: false;
|
||||
} ? false : false;
|
||||
type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
|
||||
HydrateFallback: Func;
|
||||
} ? true : false>;
|
||||
type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
|
||||
HasHydrateFallback,
|
||||
ClientLoaderHydrate
|
||||
] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
|
||||
IsDefined<ClientLoaderData>,
|
||||
IsDefined<ServerLoaderData>
|
||||
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
|
||||
type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
|
||||
type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
|
||||
IsDefined<ServerActionData>,
|
||||
IsDefined<ClientActionData>
|
||||
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
||||
type ClientDataFunctionArgs<T extends RouteInfo> = {
|
||||
request: Request;
|
||||
params: T["params"];
|
||||
};
|
||||
type ServerDataFunctionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
context: AppLoadContext;
|
||||
};
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
};
|
||||
type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
data: T["loaderData"];
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
loaderData: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
matches: Matches<[...T["parents"], T]>;
|
||||
};
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
loaderData?: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
};
|
||||
|
||||
export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, HeadersArgs, LinkDescriptors, MetaDescriptors };
|
||||
28
frontend/node_modules/react-router/dist/development/lib/types/route-module.js
generated
vendored
28
frontend/node_modules/react-router/dist/development/lib/types/route-module.js
generated
vendored
@@ -1,28 +0,0 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// lib/types/route-module.ts
|
||||
var route_module_exports = {};
|
||||
module.exports = __toCommonJS(route_module_exports);
|
||||
30
frontend/node_modules/react-router/dist/development/register-_G476ptB.d.mts
generated
vendored
Normal file
30
frontend/node_modules/react-router/dist/development/register-_G476ptB.d.mts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { R as RouteModule } from './router-DIAPGK5f.mjs';
|
||||
|
||||
/**
|
||||
* 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, string | undefined>;
|
||||
type AnyPages = Record<string, {
|
||||
params: AnyParams;
|
||||
}>;
|
||||
type Pages = Register extends {
|
||||
pages: infer Registered extends AnyPages;
|
||||
} ? Registered : AnyPages;
|
||||
type AnyRouteFiles = Record<string, {
|
||||
id: string;
|
||||
page: string;
|
||||
}>;
|
||||
type RouteFiles = Register extends {
|
||||
routeFiles: infer Registered extends AnyRouteFiles;
|
||||
} ? Registered : AnyRouteFiles;
|
||||
type AnyRouteModules = Record<string, RouteModule>;
|
||||
type RouteModules = Register extends {
|
||||
routeModules: infer Registered extends AnyRouteModules;
|
||||
} ? Registered : AnyRouteModules;
|
||||
|
||||
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };
|
||||
30
frontend/node_modules/react-router/dist/development/register-c-dooqKE.d.ts
generated
vendored
Normal file
30
frontend/node_modules/react-router/dist/development/register-c-dooqKE.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { R as RouteModule } from './instrumentation-iAqbU5Q4.js';
|
||||
|
||||
/**
|
||||
* 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, string | undefined>;
|
||||
type AnyPages = Record<string, {
|
||||
params: AnyParams;
|
||||
}>;
|
||||
type Pages = Register extends {
|
||||
pages: infer Registered extends AnyPages;
|
||||
} ? Registered : AnyPages;
|
||||
type AnyRouteFiles = Record<string, {
|
||||
id: string;
|
||||
page: string;
|
||||
}>;
|
||||
type RouteFiles = Register extends {
|
||||
routeFiles: infer Registered extends AnyRouteFiles;
|
||||
} ? Registered : AnyRouteFiles;
|
||||
type AnyRouteModules = Record<string, RouteModule>;
|
||||
type RouteModules = Register extends {
|
||||
routeModules: infer Registered extends AnyRouteModules;
|
||||
} ? Registered : AnyRouteModules;
|
||||
|
||||
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };
|
||||
1578
frontend/node_modules/react-router/dist/development/route-data-Cq_b5feC.d.mts
generated
vendored
1578
frontend/node_modules/react-router/dist/development/route-data-Cq_b5feC.d.mts
generated
vendored
File diff suppressed because it is too large
Load Diff
1578
frontend/node_modules/react-router/dist/development/route-data-Cq_b5feC.d.ts
generated
vendored
1578
frontend/node_modules/react-router/dist/development/route-data-Cq_b5feC.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
3187
frontend/node_modules/react-router/dist/development/router-DIAPGK5f.d.mts
generated
vendored
Normal file
3187
frontend/node_modules/react-router/dist/development/router-DIAPGK5f.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
310
frontend/node_modules/react-router/dist/production/browser-DM83uryY.d.ts
generated
vendored
Normal file
310
frontend/node_modules/react-router/dist/production/browser-DM83uryY.d.ts
generated
vendored
Normal file
@@ -0,0 +1,310 @@
|
||||
import * as React from 'react';
|
||||
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-iAqbU5Q4.js';
|
||||
|
||||
type RSCRouteConfigEntryBase = {
|
||||
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 RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
|
||||
id: string;
|
||||
path?: string;
|
||||
Component?: React.ComponentType<any>;
|
||||
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
|
||||
default?: React.ComponentType<any>;
|
||||
Component?: never;
|
||||
} | {
|
||||
default?: never;
|
||||
Component?: React.ComponentType<any>;
|
||||
})>;
|
||||
} & ({
|
||||
index: true;
|
||||
} | {
|
||||
children?: RSCRouteConfigEntry[];
|
||||
});
|
||||
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
|
||||
type RSCRouteManifest = {
|
||||
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 RSCRouteMatch = RSCRouteManifest & {
|
||||
params: Params;
|
||||
pathname: string;
|
||||
pathnameBase: string;
|
||||
};
|
||||
type RSCRenderPayload = {
|
||||
type: "render";
|
||||
actionData: Record<string, any> | null;
|
||||
basename: string | undefined;
|
||||
errors: Record<string, any> | null;
|
||||
loaderData: Record<string, any>;
|
||||
location: Location;
|
||||
matches: RSCRouteMatch[];
|
||||
patches?: RSCRouteManifest[];
|
||||
nonce?: string;
|
||||
formState?: unknown;
|
||||
};
|
||||
type RSCManifestPayload = {
|
||||
type: "manifest";
|
||||
patches: RSCRouteManifest[];
|
||||
};
|
||||
type RSCActionPayload = {
|
||||
type: "action";
|
||||
actionResult: Promise<unknown>;
|
||||
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
|
||||
};
|
||||
type RSCRedirectPayload = {
|
||||
type: "redirect";
|
||||
status: number;
|
||||
location: string;
|
||||
replace: boolean;
|
||||
reload: boolean;
|
||||
actionResult?: Promise<unknown>;
|
||||
};
|
||||
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
|
||||
type RSCMatch = {
|
||||
statusCode: number;
|
||||
headers: Headers;
|
||||
payload: RSCPayload;
|
||||
};
|
||||
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
|
||||
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
|
||||
type DecodeReplyFunction = (reply: FormData | string, { temporaryReferences }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown[]>;
|
||||
type LoadServerActionFunction = (id: string) => Promise<Function>;
|
||||
/**
|
||||
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* enabled client router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* renderToReadableStream,
|
||||
* } from "@vitejs/plugin-rsc/rsc";
|
||||
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
|
||||
*
|
||||
* matchRSCServerRequest({
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeFormState,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* request,
|
||||
* routes: routes(),
|
||||
* generateResponse(match) {
|
||||
* return new Response(
|
||||
* renderToReadableStream(match.payload),
|
||||
* {
|
||||
* status: match.statusCode,
|
||||
* headers: match.headers,
|
||||
* }
|
||||
* );
|
||||
* },
|
||||
* });
|
||||
*
|
||||
* @name unstable_matchRSCServerRequest
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.basename The basename to use when matching the request.
|
||||
* @param opts.createTemporaryReferenceSet A function that returns a temporary
|
||||
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream.
|
||||
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
|
||||
* function, responsible for loading a server action.
|
||||
* @param opts.decodeFormState A function responsible for decoding form state for
|
||||
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
|
||||
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
|
||||
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
|
||||
* function, used to decode the server function's arguments and bind them to the
|
||||
* implementation for invocation by the router.
|
||||
* @param opts.generateResponse A function responsible for using your
|
||||
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding the {@link unstable_RSCPayload}.
|
||||
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
|
||||
* `loadServerAction` function, used to load a server action by ID.
|
||||
* @param opts.onError An optional error handler that will be called with any
|
||||
* errors that occur during the request processing.
|
||||
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* to match against.
|
||||
* @param opts.requestContext An instance of {@link RouterContextProvider}
|
||||
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
|
||||
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
basename?: string;
|
||||
decodeReply?: DecodeReplyFunction;
|
||||
decodeAction?: DecodeActionFunction;
|
||||
decodeFormState?: DecodeFormStateFunction;
|
||||
requestContext?: RouterContextProvider;
|
||||
loadServerAction?: LoadServerActionFunction;
|
||||
onError?: (error: unknown) => void;
|
||||
request: Request;
|
||||
routes: RSCRouteConfigEntry[];
|
||||
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Response;
|
||||
}): Promise<Response>;
|
||||
|
||||
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown>;
|
||||
type EncodeReplyFunction = (args: unknown[], options: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<BodyInit>;
|
||||
/**
|
||||
* Create a React `callServer` implementation for React Router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* setServerCallback,
|
||||
* } from "@vitejs/plugin-rsc/browser";
|
||||
* import { unstable_createCallServer as createCallServer } from "react-router";
|
||||
*
|
||||
* setServerCallback(
|
||||
* createCallServer({
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* })
|
||||
* );
|
||||
*
|
||||
* @name unstable_createCallServer
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
|
||||
* `createFromReadableStream`. Used to decode payloads from the server.
|
||||
* @param opts.createTemporaryReferenceSet A function that creates a temporary
|
||||
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* payload.
|
||||
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
|
||||
* Used when sending payloads to the server.
|
||||
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
|
||||
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
* @returns A function that can be used to call server actions.
|
||||
*/
|
||||
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
encodeReply: EncodeReplyFunction;
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
}): (id: string, args: unknown[]) => Promise<unknown>;
|
||||
/**
|
||||
* Props for the {@link unstable_RSCHydratedRouter} component.
|
||||
*
|
||||
* @name unstable_RSCHydratedRouterProps
|
||||
* @category Types
|
||||
*/
|
||||
interface RSCHydratedRouterProps {
|
||||
/**
|
||||
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
|
||||
* used to decode payloads from the server.
|
||||
*/
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
/**
|
||||
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
*/
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
/**
|
||||
* The decoded {@link unstable_RSCPayload} to hydrate.
|
||||
*/
|
||||
payload: RSCPayload;
|
||||
/**
|
||||
* `"eager"` or `"lazy"` - Determines if links are eagerly discovered, or
|
||||
* delayed until clicked.
|
||||
*/
|
||||
routeDiscovery?: "eager" | "lazy";
|
||||
/**
|
||||
* A function that returns an {@link RouterContextProvider} instance
|
||||
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* This function is called to generate a fresh `context` instance on each
|
||||
* navigation or fetcher call.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
}
|
||||
/**
|
||||
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then((payload) =>
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter
|
||||
* createFromReadableStream={createFromReadableStream}
|
||||
* payload={payload}
|
||||
* />
|
||||
* </StrictMode>,
|
||||
* { formState: await getFormState(payload) },
|
||||
* );
|
||||
* }),
|
||||
* );
|
||||
*
|
||||
* @name unstable_RSCHydratedRouter
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param props Props
|
||||
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.routeDiscovery} props.routeDiscovery n/a
|
||||
* @returns A hydrated {@link DataRouter} that can be used to navigate and
|
||||
* render routes.
|
||||
*/
|
||||
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, routeDiscovery, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, type RSCHydratedRouterProps as g, type RSCMatch as h, type RSCRouteManifest as i, type RSCRouteMatch as j, type RSCRouteConfigEntry as k, type RSCRouteConfig as l, matchRSCServerRequest as m };
|
||||
310
frontend/node_modules/react-router/dist/production/browser-DfMfSvsC.d.mts
generated
vendored
Normal file
310
frontend/node_modules/react-router/dist/production/browser-DfMfSvsC.d.mts
generated
vendored
Normal file
@@ -0,0 +1,310 @@
|
||||
import * as React from 'react';
|
||||
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-DIAPGK5f.mjs';
|
||||
|
||||
type RSCRouteConfigEntryBase = {
|
||||
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 RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
|
||||
id: string;
|
||||
path?: string;
|
||||
Component?: React.ComponentType<any>;
|
||||
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
|
||||
default?: React.ComponentType<any>;
|
||||
Component?: never;
|
||||
} | {
|
||||
default?: never;
|
||||
Component?: React.ComponentType<any>;
|
||||
})>;
|
||||
} & ({
|
||||
index: true;
|
||||
} | {
|
||||
children?: RSCRouteConfigEntry[];
|
||||
});
|
||||
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
|
||||
type RSCRouteManifest = {
|
||||
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 RSCRouteMatch = RSCRouteManifest & {
|
||||
params: Params;
|
||||
pathname: string;
|
||||
pathnameBase: string;
|
||||
};
|
||||
type RSCRenderPayload = {
|
||||
type: "render";
|
||||
actionData: Record<string, any> | null;
|
||||
basename: string | undefined;
|
||||
errors: Record<string, any> | null;
|
||||
loaderData: Record<string, any>;
|
||||
location: Location;
|
||||
matches: RSCRouteMatch[];
|
||||
patches?: RSCRouteManifest[];
|
||||
nonce?: string;
|
||||
formState?: unknown;
|
||||
};
|
||||
type RSCManifestPayload = {
|
||||
type: "manifest";
|
||||
patches: RSCRouteManifest[];
|
||||
};
|
||||
type RSCActionPayload = {
|
||||
type: "action";
|
||||
actionResult: Promise<unknown>;
|
||||
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
|
||||
};
|
||||
type RSCRedirectPayload = {
|
||||
type: "redirect";
|
||||
status: number;
|
||||
location: string;
|
||||
replace: boolean;
|
||||
reload: boolean;
|
||||
actionResult?: Promise<unknown>;
|
||||
};
|
||||
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
|
||||
type RSCMatch = {
|
||||
statusCode: number;
|
||||
headers: Headers;
|
||||
payload: RSCPayload;
|
||||
};
|
||||
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
|
||||
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
|
||||
type DecodeReplyFunction = (reply: FormData | string, { temporaryReferences }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown[]>;
|
||||
type LoadServerActionFunction = (id: string) => Promise<Function>;
|
||||
/**
|
||||
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* enabled client router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* renderToReadableStream,
|
||||
* } from "@vitejs/plugin-rsc/rsc";
|
||||
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
|
||||
*
|
||||
* matchRSCServerRequest({
|
||||
* createTemporaryReferenceSet,
|
||||
* decodeAction,
|
||||
* decodeFormState,
|
||||
* decodeReply,
|
||||
* loadServerAction,
|
||||
* request,
|
||||
* routes: routes(),
|
||||
* generateResponse(match) {
|
||||
* return new Response(
|
||||
* renderToReadableStream(match.payload),
|
||||
* {
|
||||
* status: match.statusCode,
|
||||
* headers: match.headers,
|
||||
* }
|
||||
* );
|
||||
* },
|
||||
* });
|
||||
*
|
||||
* @name unstable_matchRSCServerRequest
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.basename The basename to use when matching the request.
|
||||
* @param opts.createTemporaryReferenceSet A function that returns a temporary
|
||||
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream.
|
||||
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
|
||||
* function, responsible for loading a server action.
|
||||
* @param opts.decodeFormState A function responsible for decoding form state for
|
||||
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
|
||||
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
|
||||
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
|
||||
* function, used to decode the server function's arguments and bind them to the
|
||||
* implementation for invocation by the router.
|
||||
* @param opts.generateResponse A function responsible for using your
|
||||
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* encoding the {@link unstable_RSCPayload}.
|
||||
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
|
||||
* `loadServerAction` function, used to load a server action by ID.
|
||||
* @param opts.onError An optional error handler that will be called with any
|
||||
* errors that occur during the request processing.
|
||||
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
|
||||
* to match against.
|
||||
* @param opts.requestContext An instance of {@link RouterContextProvider}
|
||||
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
|
||||
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
basename?: string;
|
||||
decodeReply?: DecodeReplyFunction;
|
||||
decodeAction?: DecodeActionFunction;
|
||||
decodeFormState?: DecodeFormStateFunction;
|
||||
requestContext?: RouterContextProvider;
|
||||
loadServerAction?: LoadServerActionFunction;
|
||||
onError?: (error: unknown) => void;
|
||||
request: Request;
|
||||
routes: RSCRouteConfigEntry[];
|
||||
generateResponse: (match: RSCMatch, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Response;
|
||||
}): Promise<Response>;
|
||||
|
||||
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<unknown>;
|
||||
type EncodeReplyFunction = (args: unknown[], options: {
|
||||
temporaryReferences: unknown;
|
||||
}) => Promise<BodyInit>;
|
||||
/**
|
||||
* Create a React `callServer` implementation for React Router.
|
||||
*
|
||||
* @example
|
||||
* import {
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* setServerCallback,
|
||||
* } from "@vitejs/plugin-rsc/browser";
|
||||
* import { unstable_createCallServer as createCallServer } from "react-router";
|
||||
*
|
||||
* setServerCallback(
|
||||
* createCallServer({
|
||||
* createFromReadableStream,
|
||||
* createTemporaryReferenceSet,
|
||||
* encodeReply,
|
||||
* })
|
||||
* );
|
||||
*
|
||||
* @name unstable_createCallServer
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param opts Options
|
||||
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
|
||||
* `createFromReadableStream`. Used to decode payloads from the server.
|
||||
* @param opts.createTemporaryReferenceSet A function that creates a temporary
|
||||
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* payload.
|
||||
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
|
||||
* Used when sending payloads to the server.
|
||||
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
|
||||
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
* @returns A function that can be used to call server actions.
|
||||
*/
|
||||
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
createTemporaryReferenceSet: () => unknown;
|
||||
encodeReply: EncodeReplyFunction;
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
}): (id: string, args: unknown[]) => Promise<unknown>;
|
||||
/**
|
||||
* Props for the {@link unstable_RSCHydratedRouter} component.
|
||||
*
|
||||
* @name unstable_RSCHydratedRouterProps
|
||||
* @category Types
|
||||
*/
|
||||
interface RSCHydratedRouterProps {
|
||||
/**
|
||||
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
|
||||
* used to decode payloads from the server.
|
||||
*/
|
||||
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
|
||||
/**
|
||||
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
|
||||
*/
|
||||
fetch?: (request: Request) => Promise<Response>;
|
||||
/**
|
||||
* The decoded {@link unstable_RSCPayload} to hydrate.
|
||||
*/
|
||||
payload: RSCPayload;
|
||||
/**
|
||||
* `"eager"` or `"lazy"` - Determines if links are eagerly discovered, or
|
||||
* delayed until clicked.
|
||||
*/
|
||||
routeDiscovery?: "eager" | "lazy";
|
||||
/**
|
||||
* A function that returns an {@link RouterContextProvider} instance
|
||||
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
|
||||
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
|
||||
* This function is called to generate a fresh `context` instance on each
|
||||
* navigation or fetcher call.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
}
|
||||
/**
|
||||
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then((payload) =>
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter
|
||||
* createFromReadableStream={createFromReadableStream}
|
||||
* payload={payload}
|
||||
* />
|
||||
* </StrictMode>,
|
||||
* { formState: await getFormState(payload) },
|
||||
* );
|
||||
* }),
|
||||
* );
|
||||
*
|
||||
* @name unstable_RSCHydratedRouter
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @param props Props
|
||||
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
|
||||
* @param {unstable_RSCHydratedRouterProps.routeDiscovery} props.routeDiscovery n/a
|
||||
* @returns A hydrated {@link DataRouter} that can be used to navigate and
|
||||
* render routes.
|
||||
*/
|
||||
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, routeDiscovery, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, type RSCHydratedRouterProps as g, type RSCMatch as h, type RSCRouteManifest as i, type RSCRouteMatch as j, type RSCRouteConfigEntry as k, type RSCRouteConfig as l, matchRSCServerRequest as m };
|
||||
188
frontend/node_modules/react-router/dist/production/chunk-CWEARR4H.js
generated
vendored
Normal file
188
frontend/node_modules/react-router/dist/production/chunk-CWEARR4H.js
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _chunkEAE7427Ajs = require('./chunk-EAE7427A.js');
|
||||
|
||||
// lib/dom/ssr/hydration.tsx
|
||||
function getHydrationData({
|
||||
state,
|
||||
routes,
|
||||
getRouteInfo,
|
||||
location,
|
||||
basename,
|
||||
isSpaMode
|
||||
}) {
|
||||
let hydrationData = {
|
||||
...state,
|
||||
loaderData: { ...state.loaderData }
|
||||
};
|
||||
let initialMatches = _chunkEAE7427Ajs.matchRoutes.call(void 0, routes, location, basename);
|
||||
if (initialMatches) {
|
||||
for (let match of initialMatches) {
|
||||
let routeId = match.route.id;
|
||||
let routeInfo = getRouteInfo(routeId);
|
||||
if (_chunkEAE7427Ajs.shouldHydrateRouteLoader.call(void 0,
|
||||
routeId,
|
||||
routeInfo.clientLoader,
|
||||
routeInfo.hasLoader,
|
||||
isSpaMode
|
||||
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
|
||||
delete hydrationData.loaderData[routeId];
|
||||
} else if (!routeInfo.hasLoader) {
|
||||
hydrationData.loaderData[routeId] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return hydrationData;
|
||||
}
|
||||
|
||||
// lib/rsc/errorBoundaries.tsx
|
||||
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
||||
var RSCRouterGlobalErrorBoundary = class extends _react2.default.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { error: null, location: props.location };
|
||||
}
|
||||
static getDerivedStateFromError(error) {
|
||||
return { error };
|
||||
}
|
||||
static getDerivedStateFromProps(props, state) {
|
||||
if (state.location !== props.location) {
|
||||
return { error: null, location: props.location };
|
||||
}
|
||||
return { error: state.error, location: state.location };
|
||||
}
|
||||
render() {
|
||||
if (this.state.error) {
|
||||
return /* @__PURE__ */ _react2.default.createElement(
|
||||
RSCDefaultRootErrorBoundaryImpl,
|
||||
{
|
||||
error: this.state.error,
|
||||
renderAppShell: true
|
||||
}
|
||||
);
|
||||
} else {
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
};
|
||||
function ErrorWrapper({
|
||||
renderAppShell,
|
||||
title,
|
||||
children
|
||||
}) {
|
||||
if (!renderAppShell) {
|
||||
return children;
|
||||
}
|
||||
return /* @__PURE__ */ _react2.default.createElement("html", { lang: "en" }, /* @__PURE__ */ _react2.default.createElement("head", null, /* @__PURE__ */ _react2.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ _react2.default.createElement(
|
||||
"meta",
|
||||
{
|
||||
name: "viewport",
|
||||
content: "width=device-width,initial-scale=1,viewport-fit=cover"
|
||||
}
|
||||
), /* @__PURE__ */ _react2.default.createElement("title", null, title)), /* @__PURE__ */ _react2.default.createElement("body", null, /* @__PURE__ */ _react2.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
|
||||
}
|
||||
function RSCDefaultRootErrorBoundaryImpl({
|
||||
error,
|
||||
renderAppShell
|
||||
}) {
|
||||
console.error(error);
|
||||
let heyDeveloper = /* @__PURE__ */ _react2.default.createElement(
|
||||
"script",
|
||||
{
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `
|
||||
console.log(
|
||||
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
||||
);
|
||||
`
|
||||
}
|
||||
}
|
||||
);
|
||||
if (_chunkEAE7427Ajs.isRouteErrorResponse.call(void 0, error)) {
|
||||
return /* @__PURE__ */ _react2.default.createElement(
|
||||
ErrorWrapper,
|
||||
{
|
||||
renderAppShell,
|
||||
title: "Unhandled Thrown Response!"
|
||||
},
|
||||
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
||||
_chunkEAE7427Ajs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
||||
);
|
||||
}
|
||||
let errorInstance;
|
||||
if (error instanceof Error) {
|
||||
errorInstance = error;
|
||||
} else {
|
||||
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
|
||||
errorInstance = new Error(errorString);
|
||||
}
|
||||
return /* @__PURE__ */ _react2.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ _react2.default.createElement(
|
||||
"pre",
|
||||
{
|
||||
style: {
|
||||
padding: "2rem",
|
||||
background: "hsla(10, 50%, 50%, 0.1)",
|
||||
color: "red",
|
||||
overflow: "auto"
|
||||
}
|
||||
},
|
||||
errorInstance.stack
|
||||
), heyDeveloper);
|
||||
}
|
||||
function RSCDefaultRootErrorBoundary({
|
||||
hasRootLayout
|
||||
}) {
|
||||
let error = _chunkEAE7427Ajs.useRouteError.call(void 0, );
|
||||
if (hasRootLayout === void 0) {
|
||||
throw new Error("Missing 'hasRootLayout' prop");
|
||||
}
|
||||
return /* @__PURE__ */ _react2.default.createElement(
|
||||
RSCDefaultRootErrorBoundaryImpl,
|
||||
{
|
||||
renderAppShell: !hasRootLayout,
|
||||
error
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// lib/rsc/route-modules.ts
|
||||
function createRSCRouteModules(payload) {
|
||||
const routeModules = {};
|
||||
for (const match of payload.matches) {
|
||||
populateRSCRouteModules(routeModules, match);
|
||||
}
|
||||
return routeModules;
|
||||
}
|
||||
function populateRSCRouteModules(routeModules, matches) {
|
||||
matches = Array.isArray(matches) ? matches : [matches];
|
||||
for (const match of matches) {
|
||||
routeModules[match.id] = {
|
||||
links: match.links,
|
||||
meta: match.meta,
|
||||
default: noopComponent
|
||||
};
|
||||
}
|
||||
}
|
||||
var noopComponent = () => null;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exports.getHydrationData = getHydrationData; exports.RSCRouterGlobalErrorBoundary = RSCRouterGlobalErrorBoundary; exports.RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.createRSCRouteModules = createRSCRouteModules; exports.populateRSCRouteModules = populateRSCRouteModules;
|
||||
9454
frontend/node_modules/react-router/dist/production/chunk-EAE7427A.js
generated
vendored
Normal file
9454
frontend/node_modules/react-router/dist/production/chunk-EAE7427A.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1310
frontend/node_modules/react-router/dist/production/chunk-ERPFE3MR.js
generated
vendored
Normal file
1310
frontend/node_modules/react-router/dist/production/chunk-ERPFE3MR.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2283
frontend/node_modules/react-router/dist/production/chunk-TPBVZP6U.mjs
generated
vendored
Normal file
2283
frontend/node_modules/react-router/dist/production/chunk-TPBVZP6U.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
frontend/node_modules/react-router/dist/production/data-CQbyyGzl.d.mts
generated
vendored
11
frontend/node_modules/react-router/dist/production/data-CQbyyGzl.d.mts
generated
vendored
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* An object of unknown type for route loaders and actions provided by the
|
||||
* server's `getLoadContext()` function. This is defined as an empty interface
|
||||
* specifically so apps can leverage declaration merging to augment this type
|
||||
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
||||
*/
|
||||
interface AppLoadContext {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export type { AppLoadContext as A };
|
||||
11
frontend/node_modules/react-router/dist/production/data-CQbyyGzl.d.ts
generated
vendored
11
frontend/node_modules/react-router/dist/production/data-CQbyyGzl.d.ts
generated
vendored
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* An object of unknown type for route loaders and actions provided by the
|
||||
* server's `getLoadContext()` function. This is defined as an empty interface
|
||||
* specifically so apps can leverage declaration merging to augment this type
|
||||
* globally: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
||||
*/
|
||||
interface AppLoadContext {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export type { AppLoadContext as A };
|
||||
148
frontend/node_modules/react-router/dist/production/dom-export.d.mts
generated
vendored
148
frontend/node_modules/react-router/dist/production/dom-export.d.mts
generated
vendored
@@ -1,13 +1,151 @@
|
||||
import * as React from 'react';
|
||||
import { R as RouterProviderProps$1 } from './fog-of-war-D6dP9JIt.mjs';
|
||||
import './route-data-Cq_b5feC.mjs';
|
||||
import { f as RouterProviderProps$1, e as RouterInit, u as unstable_ClientInstrumentation, g as unstable_ClientOnErrorFunction } from './router-DIAPGK5f.mjs';
|
||||
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-DfMfSvsC.mjs';
|
||||
|
||||
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
||||
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
||||
|
||||
/**
|
||||
* @category Component Routers
|
||||
* Props for the {@link dom.HydratedRouter} component.
|
||||
*
|
||||
* @category Types
|
||||
*/
|
||||
declare function HydratedRouter(): React.JSX.Element;
|
||||
interface HydratedRouterProps {
|
||||
/**
|
||||
* Context factory function to be passed through to {@link createBrowserRouter}.
|
||||
* This function will be called to create a fresh `context` instance on each
|
||||
* navigation/fetch and made available to
|
||||
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
||||
* functions.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
/**
|
||||
* Array of instrumentation objects allowing you to instrument the router and
|
||||
* individual routes prior to router initialization (and on any subsequently
|
||||
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
||||
* mostly useful for observability such as wrapping navigations, fetches,
|
||||
* as well as route loaders/actions/middlewares with logging and/or performance
|
||||
* tracing.
|
||||
*
|
||||
* ```tsx
|
||||
* startTransition(() => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <HydratedRouter unstable_instrumentations={[logging]} />
|
||||
* );
|
||||
* });
|
||||
*
|
||||
* const logging = {
|
||||
* router({ instrument }) {
|
||||
* instrument({
|
||||
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
|
||||
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
|
||||
* });
|
||||
* },
|
||||
* route({ instrument, id }) {
|
||||
* instrument({
|
||||
* middleware: (impl, { request }) => logExecution(
|
||||
* `middleware ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* loader: (impl, { request }) => logExecution(
|
||||
* `loader ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* action: (impl, { request }) => logExecution(
|
||||
* `action ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* })
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* async function logExecution(label: string, impl: () => Promise<void>) {
|
||||
* let start = performance.now();
|
||||
* console.log(`start ${label}`);
|
||||
* await impl();
|
||||
* let duration = Math.round(performance.now() - start);
|
||||
* console.log(`end ${label} (${duration}ms)`);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
||||
/**
|
||||
* An error handler function that will be called for any loader/action/render
|
||||
* errors that are encountered in your application. This is useful for
|
||||
* logging or reporting errors instead of the `ErrorBoundary` because it's not
|
||||
* subject to re-rendering and will only run one time per error.
|
||||
*
|
||||
* The `errorInfo` parameter is passed along from
|
||||
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
|
||||
* and is only present for render errors.
|
||||
*
|
||||
* ```tsx
|
||||
* <HydratedRouter unstable_onError={(error, errorInfo) => {
|
||||
* console.error(error, errorInfo);
|
||||
* reportToErrorService(error, errorInfo);
|
||||
* }} />
|
||||
* ```
|
||||
*/
|
||||
unstable_onError?: unstable_ClientOnErrorFunction;
|
||||
}
|
||||
/**
|
||||
* Framework-mode router component to be used to hydrate a router from a
|
||||
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
||||
*
|
||||
* @public
|
||||
* @category Framework Routers
|
||||
* @mode framework
|
||||
* @param props Props
|
||||
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
|
||||
* @returns A React element that represents the hydrated application.
|
||||
*/
|
||||
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { HydratedRouter, RouterProvider, type RouterProviderProps };
|
||||
declare global {
|
||||
interface Window {
|
||||
__FLIGHT_DATA: any[];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream for hydration. Usually passed directly to your
|
||||
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then(
|
||||
* (payload: RSCServerPayload) => {
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter {...props} />
|
||||
* </StrictMode>,
|
||||
* {
|
||||
* // Options
|
||||
* }
|
||||
* );
|
||||
* });
|
||||
* }
|
||||
* );
|
||||
*
|
||||
* @name unstable_getRSCStream
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function getRSCStream(): ReadableStream;
|
||||
|
||||
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };
|
||||
|
||||
149
frontend/node_modules/react-router/dist/production/dom-export.d.ts
generated
vendored
149
frontend/node_modules/react-router/dist/production/dom-export.d.ts
generated
vendored
@@ -1,13 +1,152 @@
|
||||
import * as React from 'react';
|
||||
import { R as RouterProviderProps$1 } from './fog-of-war-CCAcUMgB.js';
|
||||
import './route-data-Cq_b5feC.js';
|
||||
import { RouterProviderProps as RouterProviderProps$1, RouterInit, unstable_ClientOnErrorFunction } from 'react-router';
|
||||
import { u as unstable_ClientInstrumentation } from './instrumentation-iAqbU5Q4.js';
|
||||
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-DM83uryY.js';
|
||||
|
||||
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
||||
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
||||
|
||||
/**
|
||||
* @category Component Routers
|
||||
* Props for the {@link dom.HydratedRouter} component.
|
||||
*
|
||||
* @category Types
|
||||
*/
|
||||
declare function HydratedRouter(): React.JSX.Element;
|
||||
interface HydratedRouterProps {
|
||||
/**
|
||||
* Context factory function to be passed through to {@link createBrowserRouter}.
|
||||
* This function will be called to create a fresh `context` instance on each
|
||||
* navigation/fetch and made available to
|
||||
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
|
||||
* functions.
|
||||
*/
|
||||
getContext?: RouterInit["getContext"];
|
||||
/**
|
||||
* Array of instrumentation objects allowing you to instrument the router and
|
||||
* individual routes prior to router initialization (and on any subsequently
|
||||
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
|
||||
* mostly useful for observability such as wrapping navigations, fetches,
|
||||
* as well as route loaders/actions/middlewares with logging and/or performance
|
||||
* tracing.
|
||||
*
|
||||
* ```tsx
|
||||
* startTransition(() => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <HydratedRouter unstable_instrumentations={[logging]} />
|
||||
* );
|
||||
* });
|
||||
*
|
||||
* const logging = {
|
||||
* router({ instrument }) {
|
||||
* instrument({
|
||||
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
|
||||
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
|
||||
* });
|
||||
* },
|
||||
* route({ instrument, id }) {
|
||||
* instrument({
|
||||
* middleware: (impl, { request }) => logExecution(
|
||||
* `middleware ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* loader: (impl, { request }) => logExecution(
|
||||
* `loader ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* action: (impl, { request }) => logExecution(
|
||||
* `action ${request.url} (route ${id})`,
|
||||
* impl
|
||||
* ),
|
||||
* })
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* async function logExecution(label: string, impl: () => Promise<void>) {
|
||||
* let start = performance.now();
|
||||
* console.log(`start ${label}`);
|
||||
* await impl();
|
||||
* let duration = Math.round(performance.now() - start);
|
||||
* console.log(`end ${label} (${duration}ms)`);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
unstable_instrumentations?: unstable_ClientInstrumentation[];
|
||||
/**
|
||||
* An error handler function that will be called for any loader/action/render
|
||||
* errors that are encountered in your application. This is useful for
|
||||
* logging or reporting errors instead of the `ErrorBoundary` because it's not
|
||||
* subject to re-rendering and will only run one time per error.
|
||||
*
|
||||
* The `errorInfo` parameter is passed along from
|
||||
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
|
||||
* and is only present for render errors.
|
||||
*
|
||||
* ```tsx
|
||||
* <HydratedRouter unstable_onError={(error, errorInfo) => {
|
||||
* console.error(error, errorInfo);
|
||||
* reportToErrorService(error, errorInfo);
|
||||
* }} />
|
||||
* ```
|
||||
*/
|
||||
unstable_onError?: unstable_ClientOnErrorFunction;
|
||||
}
|
||||
/**
|
||||
* Framework-mode router component to be used to hydrate a router from a
|
||||
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
|
||||
*
|
||||
* @public
|
||||
* @category Framework Routers
|
||||
* @mode framework
|
||||
* @param props Props
|
||||
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
|
||||
* @param {dom.HydratedRouterProps.unstable_onError} props.unstable_onError n/a
|
||||
* @returns A React element that represents the hydrated application.
|
||||
*/
|
||||
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
|
||||
|
||||
export { HydratedRouter, RouterProvider, type RouterProviderProps };
|
||||
declare global {
|
||||
interface Window {
|
||||
__FLIGHT_DATA: any[];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* stream for hydration. Usually passed directly to your
|
||||
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
|
||||
*
|
||||
* @example
|
||||
* import { startTransition, StrictMode } from "react";
|
||||
* import { hydrateRoot } from "react-dom/client";
|
||||
* import {
|
||||
* unstable_getRSCStream as getRSCStream,
|
||||
* unstable_RSCHydratedRouter as RSCHydratedRouter,
|
||||
* } from "react-router";
|
||||
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
|
||||
*
|
||||
* createFromReadableStream(getRSCStream()).then(
|
||||
* (payload: RSCServerPayload) => {
|
||||
* startTransition(async () => {
|
||||
* hydrateRoot(
|
||||
* document,
|
||||
* <StrictMode>
|
||||
* <RSCHydratedRouter {...props} />
|
||||
* </StrictMode>,
|
||||
* {
|
||||
* // Options
|
||||
* }
|
||||
* );
|
||||
* });
|
||||
* }
|
||||
* );
|
||||
*
|
||||
* @name unstable_getRSCStream
|
||||
* @public
|
||||
* @category RSC
|
||||
* @mode data
|
||||
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
|
||||
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
||||
* data for hydration.
|
||||
*/
|
||||
declare function getRSCStream(): ReadableStream;
|
||||
|
||||
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };
|
||||
|
||||
6179
frontend/node_modules/react-router/dist/production/dom-export.js
generated
vendored
6179
frontend/node_modules/react-router/dist/production/dom-export.js
generated
vendored
File diff suppressed because it is too large
Load Diff
810
frontend/node_modules/react-router/dist/production/dom-export.mjs
generated
vendored
810
frontend/node_modules/react-router/dist/production/dom-export.mjs
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
@@ -8,24 +8,42 @@
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
import {
|
||||
RSCRouterGlobalErrorBoundary,
|
||||
deserializeErrors,
|
||||
getHydrationData,
|
||||
populateRSCRouteModules
|
||||
} from "./chunk-TPBVZP6U.mjs";
|
||||
import {
|
||||
CRITICAL_CSS_DATA_ATTRIBUTE,
|
||||
ErrorResponseImpl,
|
||||
FrameworkContext,
|
||||
RSCRouterContext,
|
||||
RemixErrorBoundary,
|
||||
RouterProvider,
|
||||
UNSTABLE_TransitionEnabledRouterProvider,
|
||||
createBrowserHistory,
|
||||
createClientRoutes,
|
||||
createClientRoutesWithHMRRevalidationOptOut,
|
||||
createContext,
|
||||
createRequestInit,
|
||||
createRouter,
|
||||
decodeViaTurboStream,
|
||||
deserializeErrors,
|
||||
getPatchRoutesOnNavigationFunction,
|
||||
getSingleFetchDataStrategy,
|
||||
getSingleFetchDataStrategyImpl,
|
||||
getTurboStreamSingleFetchDataStrategy,
|
||||
hydrationRouteProperties,
|
||||
invariant,
|
||||
isMutationMethod,
|
||||
mapRouteProperties,
|
||||
matchRoutes,
|
||||
noActionDefinedError,
|
||||
setIsHydrated,
|
||||
shouldHydrateRouteLoader,
|
||||
singleFetchUrl,
|
||||
stripIndexParam,
|
||||
useFogOFWarDiscovery
|
||||
} from "./chunk-JRAGQQ3X.mjs";
|
||||
} from "./chunk-RZ6LZWMW.mjs";
|
||||
|
||||
// lib/dom-export/dom-router-provider.tsx
|
||||
import * as React from "react";
|
||||
@@ -40,6 +58,18 @@ var ssrInfo = null;
|
||||
var router = null;
|
||||
function initSsrInfo() {
|
||||
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
|
||||
if (window.__reactRouterManifest.sri === true) {
|
||||
const importMap = document.querySelector("script[rr-importmap]");
|
||||
if (importMap?.textContent) {
|
||||
try {
|
||||
window.__reactRouterManifest.sri = JSON.parse(
|
||||
importMap.textContent
|
||||
).integrity;
|
||||
} catch (err) {
|
||||
console.error("Failed to parse import map", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
ssrInfo = {
|
||||
context: window.__reactRouterContext,
|
||||
manifest: window.__reactRouterManifest,
|
||||
@@ -50,7 +80,10 @@ function initSsrInfo() {
|
||||
};
|
||||
}
|
||||
}
|
||||
function createHydratedRouter() {
|
||||
function createHydratedRouter({
|
||||
getContext,
|
||||
unstable_instrumentations
|
||||
}) {
|
||||
initSsrInfo();
|
||||
if (!ssrInfo) {
|
||||
throw new Error(
|
||||
@@ -79,35 +112,32 @@ function createHydratedRouter() {
|
||||
ssrInfo.manifest.routes,
|
||||
ssrInfo.routeModules,
|
||||
ssrInfo.context.state,
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.isSpaMode
|
||||
);
|
||||
let hydrationData = void 0;
|
||||
if (!ssrInfo.context.isSpaMode) {
|
||||
hydrationData = {
|
||||
...ssrInfo.context.state,
|
||||
loaderData: { ...ssrInfo.context.state.loaderData }
|
||||
};
|
||||
let initialMatches = matchRoutes(
|
||||
routes,
|
||||
window.location,
|
||||
window.__reactRouterContext?.basename
|
||||
);
|
||||
if (initialMatches) {
|
||||
for (let match of initialMatches) {
|
||||
let routeId = match.route.id;
|
||||
let route = ssrInfo.routeModules[routeId];
|
||||
let manifestRoute = ssrInfo.manifest.routes[routeId];
|
||||
if (route && manifestRoute && shouldHydrateRouteLoader(
|
||||
manifestRoute,
|
||||
route,
|
||||
ssrInfo.context.isSpaMode
|
||||
) && (route.HydrateFallback || !manifestRoute.hasLoader)) {
|
||||
delete hydrationData.loaderData[routeId];
|
||||
} else if (manifestRoute && !manifestRoute.hasLoader) {
|
||||
hydrationData.loaderData[routeId] = null;
|
||||
if (ssrInfo.context.isSpaMode) {
|
||||
let { loaderData } = ssrInfo.context.state;
|
||||
if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && "root" in loaderData) {
|
||||
hydrationData = {
|
||||
loaderData: {
|
||||
root: loaderData.root
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
} else {
|
||||
hydrationData = getHydrationData({
|
||||
state: ssrInfo.context.state,
|
||||
routes,
|
||||
getRouteInfo: (routeId) => ({
|
||||
clientLoader: ssrInfo.routeModules[routeId]?.clientLoader,
|
||||
hasLoader: ssrInfo.manifest.routes[routeId]?.hasLoader === true,
|
||||
hasHydrateFallback: ssrInfo.routeModules[routeId]?.HydrateFallback != null
|
||||
}),
|
||||
location: window.location,
|
||||
basename: window.__reactRouterContext?.basename,
|
||||
isSpaMode: ssrInfo.context.isSpaMode
|
||||
});
|
||||
if (hydrationData && hydrationData.errors) {
|
||||
hydrationData.errors = deserializeErrors(hydrationData.errors);
|
||||
}
|
||||
@@ -116,16 +146,26 @@ function createHydratedRouter() {
|
||||
routes,
|
||||
history: createBrowserHistory(),
|
||||
basename: ssrInfo.context.basename,
|
||||
getContext,
|
||||
hydrationData,
|
||||
hydrationRouteProperties,
|
||||
unstable_instrumentations,
|
||||
mapRouteProperties,
|
||||
dataStrategy: getSingleFetchDataStrategy(
|
||||
future: {
|
||||
middleware: ssrInfo.context.future.v8_middleware
|
||||
},
|
||||
dataStrategy: getTurboStreamSingleFetchDataStrategy(
|
||||
() => router2,
|
||||
ssrInfo.manifest,
|
||||
ssrInfo.routeModules,
|
||||
() => router2
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.basename
|
||||
),
|
||||
patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(
|
||||
ssrInfo.manifest,
|
||||
ssrInfo.routeModules,
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.routeDiscovery,
|
||||
ssrInfo.context.isSpaMode,
|
||||
ssrInfo.context.basename
|
||||
)
|
||||
@@ -140,19 +180,27 @@ function createHydratedRouter() {
|
||||
window.__reactRouterDataRouter = router2;
|
||||
return router2;
|
||||
}
|
||||
function HydratedRouter() {
|
||||
function HydratedRouter(props) {
|
||||
if (!router) {
|
||||
router = createHydratedRouter();
|
||||
router = createHydratedRouter({
|
||||
getContext: props.getContext,
|
||||
unstable_instrumentations: props.unstable_instrumentations
|
||||
});
|
||||
}
|
||||
let [criticalCss, setCriticalCss] = React2.useState(
|
||||
process.env.NODE_ENV === "development" ? ssrInfo?.context.criticalCss : void 0
|
||||
);
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
if (ssrInfo) {
|
||||
window.__reactRouterClearCriticalCss = () => setCriticalCss(void 0);
|
||||
React2.useEffect(() => {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
setCriticalCss(void 0);
|
||||
}
|
||||
}
|
||||
let [location, setLocation] = React2.useState(router.state.location);
|
||||
}, []);
|
||||
React2.useEffect(() => {
|
||||
if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
|
||||
document.querySelectorAll(`[${CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
|
||||
}
|
||||
}, [criticalCss]);
|
||||
let [location2, setLocation] = React2.useState(router.state.location);
|
||||
React2.useLayoutEffect(() => {
|
||||
if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {
|
||||
ssrInfo.routerInitialized = true;
|
||||
@@ -162,17 +210,19 @@ function HydratedRouter() {
|
||||
React2.useLayoutEffect(() => {
|
||||
if (ssrInfo && ssrInfo.router) {
|
||||
return ssrInfo.router.subscribe((newState) => {
|
||||
if (newState.location !== location) {
|
||||
if (newState.location !== location2) {
|
||||
setLocation(newState.location);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [location]);
|
||||
}, [location2]);
|
||||
invariant(ssrInfo, "ssrInfo unavailable for HydratedRouter");
|
||||
useFogOFWarDiscovery(
|
||||
router,
|
||||
ssrInfo.manifest,
|
||||
ssrInfo.routeModules,
|
||||
ssrInfo.context.ssr,
|
||||
ssrInfo.context.routeDiscovery,
|
||||
ssrInfo.context.isSpaMode
|
||||
);
|
||||
return (
|
||||
@@ -186,14 +236,686 @@ function HydratedRouter() {
|
||||
routeModules: ssrInfo.routeModules,
|
||||
future: ssrInfo.context.future,
|
||||
criticalCss,
|
||||
isSpaMode: ssrInfo.context.isSpaMode
|
||||
ssr: ssrInfo.context.ssr,
|
||||
isSpaMode: ssrInfo.context.isSpaMode,
|
||||
routeDiscovery: ssrInfo.context.routeDiscovery
|
||||
}
|
||||
},
|
||||
/* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location }, /* @__PURE__ */ React2.createElement(RouterProvider2, { router }))
|
||||
/* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location: location2 }, /* @__PURE__ */ React2.createElement(
|
||||
RouterProvider2,
|
||||
{
|
||||
router,
|
||||
unstable_onError: props.unstable_onError
|
||||
}
|
||||
))
|
||||
), /* @__PURE__ */ React2.createElement(React2.Fragment, null))
|
||||
);
|
||||
}
|
||||
|
||||
// lib/rsc/browser.tsx
|
||||
import * as React3 from "react";
|
||||
import * as ReactDOM2 from "react-dom";
|
||||
function createCallServer({
|
||||
createFromReadableStream,
|
||||
createTemporaryReferenceSet,
|
||||
encodeReply,
|
||||
fetch: fetchImplementation = fetch
|
||||
}) {
|
||||
const globalVar = window;
|
||||
let landedActionId = 0;
|
||||
return async (id, args) => {
|
||||
let actionId = globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;
|
||||
const temporaryReferences = createTemporaryReferenceSet();
|
||||
const payloadPromise = fetchImplementation(
|
||||
new Request(location.href, {
|
||||
body: await encodeReply(args, { temporaryReferences }),
|
||||
method: "POST",
|
||||
headers: {
|
||||
Accept: "text/x-component",
|
||||
"rsc-action-id": id
|
||||
}
|
||||
})
|
||||
).then((response) => {
|
||||
if (!response.body) {
|
||||
throw new Error("No response body");
|
||||
}
|
||||
return createFromReadableStream(response.body, {
|
||||
temporaryReferences
|
||||
});
|
||||
});
|
||||
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
||||
Promise.resolve(payloadPromise).then(async (payload) => {
|
||||
if (payload.type === "redirect") {
|
||||
if (payload.reload || isExternalLocation(payload.location)) {
|
||||
window.location.href = payload.location;
|
||||
return () => {
|
||||
};
|
||||
}
|
||||
return () => {
|
||||
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
||||
replace: payload.replace
|
||||
});
|
||||
};
|
||||
}
|
||||
if (payload.type !== "action") {
|
||||
throw new Error("Unexpected payload type");
|
||||
}
|
||||
const rerender = await payload.rerender;
|
||||
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
||||
if (rerender.type === "redirect") {
|
||||
if (rerender.reload || isExternalLocation(rerender.location)) {
|
||||
window.location.href = rerender.location;
|
||||
return;
|
||||
}
|
||||
return () => {
|
||||
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
||||
replace: rerender.replace
|
||||
});
|
||||
};
|
||||
}
|
||||
return () => {
|
||||
let lastMatch;
|
||||
for (const match of rerender.matches) {
|
||||
globalVar.__reactRouterDataRouter.patchRoutes(
|
||||
lastMatch?.id ?? null,
|
||||
[createRouteFromServerManifest(match)],
|
||||
true
|
||||
);
|
||||
lastMatch = match;
|
||||
}
|
||||
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
||||
{
|
||||
loaderData: Object.assign(
|
||||
{},
|
||||
globalVar.__reactRouterDataRouter.state.loaderData,
|
||||
rerender.loaderData
|
||||
),
|
||||
errors: rerender.errors ? Object.assign(
|
||||
{},
|
||||
globalVar.__reactRouterDataRouter.state.errors,
|
||||
rerender.errors
|
||||
) : null
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
return () => {
|
||||
};
|
||||
}).catch(() => {
|
||||
})
|
||||
);
|
||||
return payloadPromise.then((payload) => {
|
||||
if (payload.type !== "action" && payload.type !== "redirect") {
|
||||
throw new Error("Unexpected payload type");
|
||||
}
|
||||
return payload.actionResult;
|
||||
});
|
||||
};
|
||||
}
|
||||
function createRouterFromPayload({
|
||||
fetchImplementation,
|
||||
createFromReadableStream,
|
||||
getContext,
|
||||
payload
|
||||
}) {
|
||||
const globalVar = window;
|
||||
if (globalVar.__reactRouterDataRouter && globalVar.__reactRouterRouteModules)
|
||||
return {
|
||||
router: globalVar.__reactRouterDataRouter,
|
||||
routeModules: globalVar.__reactRouterRouteModules
|
||||
};
|
||||
if (payload.type !== "render") throw new Error("Invalid payload type");
|
||||
globalVar.__reactRouterRouteModules = globalVar.__reactRouterRouteModules ?? {};
|
||||
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
||||
let patches = /* @__PURE__ */ new Map();
|
||||
payload.patches?.forEach((patch) => {
|
||||
invariant(patch.parentId, "Invalid patch parentId");
|
||||
if (!patches.has(patch.parentId)) {
|
||||
patches.set(patch.parentId, []);
|
||||
}
|
||||
patches.get(patch.parentId)?.push(patch);
|
||||
});
|
||||
let routes = payload.matches.reduceRight((previous, match) => {
|
||||
const route = createRouteFromServerManifest(
|
||||
match,
|
||||
payload
|
||||
);
|
||||
if (previous.length > 0) {
|
||||
route.children = previous;
|
||||
let childrenToPatch = patches.get(match.id);
|
||||
if (childrenToPatch) {
|
||||
route.children.push(
|
||||
...childrenToPatch.map((r) => createRouteFromServerManifest(r))
|
||||
);
|
||||
}
|
||||
}
|
||||
return [route];
|
||||
}, []);
|
||||
globalVar.__reactRouterDataRouter = createRouter({
|
||||
routes,
|
||||
getContext,
|
||||
basename: payload.basename,
|
||||
history: createBrowserHistory(),
|
||||
hydrationData: getHydrationData({
|
||||
state: {
|
||||
loaderData: payload.loaderData,
|
||||
actionData: payload.actionData,
|
||||
errors: payload.errors
|
||||
},
|
||||
routes,
|
||||
getRouteInfo: (routeId) => {
|
||||
let match = payload.matches.find((m) => m.id === routeId);
|
||||
invariant(match, "Route not found in payload");
|
||||
return {
|
||||
clientLoader: match.clientLoader,
|
||||
hasLoader: match.hasLoader,
|
||||
hasHydrateFallback: match.hydrateFallbackElement != null
|
||||
};
|
||||
},
|
||||
location: payload.location,
|
||||
basename: payload.basename,
|
||||
isSpaMode: false
|
||||
}),
|
||||
async patchRoutesOnNavigation({ path, signal }) {
|
||||
if (discoveredPaths.has(path)) {
|
||||
return;
|
||||
}
|
||||
await fetchAndApplyManifestPatches(
|
||||
[path],
|
||||
createFromReadableStream,
|
||||
fetchImplementation,
|
||||
signal
|
||||
);
|
||||
},
|
||||
// FIXME: Pass `build.ssr` into this function
|
||||
dataStrategy: getRSCSingleFetchDataStrategy(
|
||||
() => globalVar.__reactRouterDataRouter,
|
||||
true,
|
||||
payload.basename,
|
||||
createFromReadableStream,
|
||||
fetchImplementation
|
||||
)
|
||||
});
|
||||
if (globalVar.__reactRouterDataRouter.state.initialized) {
|
||||
globalVar.__routerInitialized = true;
|
||||
globalVar.__reactRouterDataRouter.initialize();
|
||||
} else {
|
||||
globalVar.__routerInitialized = false;
|
||||
}
|
||||
let lastLoaderData = void 0;
|
||||
globalVar.__reactRouterDataRouter.subscribe(({ loaderData, actionData }) => {
|
||||
if (lastLoaderData !== loaderData) {
|
||||
globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;
|
||||
}
|
||||
});
|
||||
globalVar.__reactRouterDataRouter._updateRoutesForHMR = (routeUpdateByRouteId) => {
|
||||
const oldRoutes = window.__reactRouterDataRouter.routes;
|
||||
const newRoutes = [];
|
||||
function walkRoutes(routes2, parentId) {
|
||||
return routes2.map((route) => {
|
||||
const routeUpdate = routeUpdateByRouteId.get(route.id);
|
||||
if (routeUpdate) {
|
||||
const {
|
||||
routeModule,
|
||||
hasAction,
|
||||
hasComponent,
|
||||
hasErrorBoundary,
|
||||
hasLoader
|
||||
} = routeUpdate;
|
||||
const newRoute = createRouteFromServerManifest({
|
||||
clientAction: routeModule.clientAction,
|
||||
clientLoader: routeModule.clientLoader,
|
||||
element: route.element,
|
||||
errorElement: route.errorElement,
|
||||
handle: route.handle,
|
||||
hasAction,
|
||||
hasComponent,
|
||||
hasErrorBoundary,
|
||||
hasLoader,
|
||||
hydrateFallbackElement: route.hydrateFallbackElement,
|
||||
id: route.id,
|
||||
index: route.index,
|
||||
links: routeModule.links,
|
||||
meta: routeModule.meta,
|
||||
parentId,
|
||||
path: route.path,
|
||||
shouldRevalidate: routeModule.shouldRevalidate
|
||||
});
|
||||
if (route.children) {
|
||||
newRoute.children = walkRoutes(route.children, route.id);
|
||||
}
|
||||
return newRoute;
|
||||
}
|
||||
const updatedRoute = { ...route };
|
||||
if (route.children) {
|
||||
updatedRoute.children = walkRoutes(route.children, route.id);
|
||||
}
|
||||
return updatedRoute;
|
||||
});
|
||||
}
|
||||
newRoutes.push(
|
||||
...walkRoutes(oldRoutes, void 0)
|
||||
);
|
||||
window.__reactRouterDataRouter._internalSetRoutes(newRoutes);
|
||||
};
|
||||
return {
|
||||
router: globalVar.__reactRouterDataRouter,
|
||||
routeModules: globalVar.__reactRouterRouteModules
|
||||
};
|
||||
}
|
||||
var renderedRoutesContext = createContext();
|
||||
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
||||
let dataStrategy = getSingleFetchDataStrategyImpl(
|
||||
getRouter,
|
||||
(match) => {
|
||||
let M = match;
|
||||
return {
|
||||
hasLoader: M.route.hasLoader,
|
||||
hasClientLoader: M.route.hasClientLoader,
|
||||
hasComponent: M.route.hasComponent,
|
||||
hasAction: M.route.hasAction,
|
||||
hasClientAction: M.route.hasClientAction,
|
||||
hasShouldRevalidate: M.route.hasShouldRevalidate
|
||||
};
|
||||
},
|
||||
// pass map into fetchAndDecode so it can add payloads
|
||||
getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation),
|
||||
ssr,
|
||||
basename,
|
||||
// If the route has a component but we don't have an element, we need to hit
|
||||
// the server loader flow regardless of whether the client loader calls
|
||||
// `serverLoader` or not, otherwise we'll have nothing to render.
|
||||
(match) => {
|
||||
let M = match;
|
||||
return M.route.hasComponent && !M.route.element;
|
||||
}
|
||||
);
|
||||
return async (args) => args.runClientMiddleware(async () => {
|
||||
let context = args.context;
|
||||
context.set(renderedRoutesContext, []);
|
||||
let results = await dataStrategy(args);
|
||||
const renderedRoutesById = /* @__PURE__ */ new Map();
|
||||
for (const route of context.get(renderedRoutesContext)) {
|
||||
if (!renderedRoutesById.has(route.id)) {
|
||||
renderedRoutesById.set(route.id, []);
|
||||
}
|
||||
renderedRoutesById.get(route.id).push(route);
|
||||
}
|
||||
for (const match of args.matches) {
|
||||
const renderedRoutes = renderedRoutesById.get(match.route.id);
|
||||
if (renderedRoutes) {
|
||||
for (const rendered of renderedRoutes) {
|
||||
window.__reactRouterDataRouter.patchRoutes(
|
||||
rendered.parentId ?? null,
|
||||
[createRouteFromServerManifest(rendered)],
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
});
|
||||
}
|
||||
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
||||
return async (args, basename, targetRoutes) => {
|
||||
let { request, context } = args;
|
||||
let url = singleFetchUrl(request.url, basename, "rsc");
|
||||
if (request.method === "GET") {
|
||||
url = stripIndexParam(url);
|
||||
if (targetRoutes) {
|
||||
url.searchParams.set("_routes", targetRoutes.join(","));
|
||||
}
|
||||
}
|
||||
let res = await fetchImplementation(
|
||||
new Request(url, await createRequestInit(request))
|
||||
);
|
||||
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
||||
throw new ErrorResponseImpl(res.status, res.statusText, await res.text());
|
||||
}
|
||||
invariant(res.body, "No response body to decode");
|
||||
try {
|
||||
const payload = await createFromReadableStream(res.body, {
|
||||
temporaryReferences: void 0
|
||||
});
|
||||
if (payload.type === "redirect") {
|
||||
return {
|
||||
status: res.status,
|
||||
data: {
|
||||
redirect: {
|
||||
redirect: payload.location,
|
||||
reload: payload.reload,
|
||||
replace: payload.replace,
|
||||
revalidate: false,
|
||||
status: payload.status
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
if (payload.type !== "render") {
|
||||
throw new Error("Unexpected payload type");
|
||||
}
|
||||
context.get(renderedRoutesContext).push(...payload.matches);
|
||||
let results = { routes: {} };
|
||||
const dataKey = isMutationMethod(request.method) ? "actionData" : "loaderData";
|
||||
for (let [routeId, data] of Object.entries(payload[dataKey] || {})) {
|
||||
results.routes[routeId] = { data };
|
||||
}
|
||||
if (payload.errors) {
|
||||
for (let [routeId, error] of Object.entries(payload.errors)) {
|
||||
results.routes[routeId] = { error };
|
||||
}
|
||||
}
|
||||
return { status: res.status, data: results };
|
||||
} catch (e) {
|
||||
throw new Error("Unable to decode RSC response");
|
||||
}
|
||||
};
|
||||
}
|
||||
function RSCHydratedRouter({
|
||||
createFromReadableStream,
|
||||
fetch: fetchImplementation = fetch,
|
||||
payload,
|
||||
routeDiscovery = "eager",
|
||||
getContext
|
||||
}) {
|
||||
if (payload.type !== "render") throw new Error("Invalid payload type");
|
||||
let { router: router2, routeModules } = React3.useMemo(
|
||||
() => createRouterFromPayload({
|
||||
payload,
|
||||
fetchImplementation,
|
||||
getContext,
|
||||
createFromReadableStream
|
||||
}),
|
||||
[createFromReadableStream, payload, fetchImplementation, getContext]
|
||||
);
|
||||
React3.useEffect(() => {
|
||||
setIsHydrated();
|
||||
}, []);
|
||||
React3.useLayoutEffect(() => {
|
||||
const globalVar = window;
|
||||
if (!globalVar.__routerInitialized) {
|
||||
globalVar.__routerInitialized = true;
|
||||
globalVar.__reactRouterDataRouter.initialize();
|
||||
}
|
||||
}, []);
|
||||
let [location2, setLocation] = React3.useState(router2.state.location);
|
||||
React3.useLayoutEffect(
|
||||
() => router2.subscribe((newState) => {
|
||||
if (newState.location !== location2) {
|
||||
setLocation(newState.location);
|
||||
}
|
||||
}),
|
||||
[router2, location2]
|
||||
);
|
||||
React3.useEffect(() => {
|
||||
if (routeDiscovery === "lazy" || // @ts-expect-error - TS doesn't know about this yet
|
||||
window.navigator?.connection?.saveData === true) {
|
||||
return;
|
||||
}
|
||||
function registerElement(el) {
|
||||
let path = el.tagName === "FORM" ? el.getAttribute("action") : el.getAttribute("href");
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
|
||||
if (!discoveredPaths.has(pathname)) {
|
||||
nextPaths.add(pathname);
|
||||
}
|
||||
}
|
||||
async function fetchPatches() {
|
||||
document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
|
||||
let paths = Array.from(nextPaths.keys()).filter((path) => {
|
||||
if (discoveredPaths.has(path)) {
|
||||
nextPaths.delete(path);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (paths.length === 0) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await fetchAndApplyManifestPatches(
|
||||
paths,
|
||||
createFromReadableStream,
|
||||
fetchImplementation
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Failed to fetch manifest patches", e);
|
||||
}
|
||||
}
|
||||
let debouncedFetchPatches = debounce(fetchPatches, 100);
|
||||
fetchPatches();
|
||||
let observer = new MutationObserver(() => debouncedFetchPatches());
|
||||
observer.observe(document.documentElement, {
|
||||
subtree: true,
|
||||
childList: true,
|
||||
attributes: true,
|
||||
attributeFilter: ["data-discover", "href", "action"]
|
||||
});
|
||||
}, [routeDiscovery, createFromReadableStream, fetchImplementation]);
|
||||
const frameworkContext = {
|
||||
future: {
|
||||
// These flags have no runtime impact so can always be false. If we add
|
||||
// flags that drive runtime behavior they'll need to be proxied through.
|
||||
v8_middleware: false,
|
||||
unstable_subResourceIntegrity: false
|
||||
},
|
||||
isSpaMode: false,
|
||||
ssr: true,
|
||||
criticalCss: "",
|
||||
manifest: {
|
||||
routes: {},
|
||||
version: "1",
|
||||
url: "",
|
||||
entry: {
|
||||
module: "",
|
||||
imports: []
|
||||
}
|
||||
},
|
||||
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
||||
routeModules
|
||||
};
|
||||
return /* @__PURE__ */ React3.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React3.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(UNSTABLE_TransitionEnabledRouterProvider, { router: router2, flushSync: ReactDOM2.flushSync }))));
|
||||
}
|
||||
function createRouteFromServerManifest(match, payload) {
|
||||
let hasInitialData = payload && match.id in payload.loaderData;
|
||||
let initialData = payload?.loaderData[match.id];
|
||||
let hasInitialError = payload?.errors && match.id in payload.errors;
|
||||
let initialError = payload?.errors?.[match.id];
|
||||
let isHydrationRequest = match.clientLoader?.hydrate === true || !match.hasLoader || // If the route has a component but we don't have an element, we need to hit
|
||||
// the server loader flow regardless of whether the client loader calls
|
||||
// `serverLoader` or not, otherwise we'll have nothing to render.
|
||||
match.hasComponent && !match.element;
|
||||
invariant(window.__reactRouterRouteModules);
|
||||
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
||||
let dataRoute = {
|
||||
id: match.id,
|
||||
element: match.element,
|
||||
errorElement: match.errorElement,
|
||||
handle: match.handle,
|
||||
hasErrorBoundary: match.hasErrorBoundary,
|
||||
hydrateFallbackElement: match.hydrateFallbackElement,
|
||||
index: match.index,
|
||||
loader: match.clientLoader ? async (args, singleFetch) => {
|
||||
try {
|
||||
let result = await match.clientLoader({
|
||||
...args,
|
||||
serverLoader: () => {
|
||||
preventInvalidServerHandlerCall(
|
||||
"loader",
|
||||
match.id,
|
||||
match.hasLoader
|
||||
);
|
||||
if (isHydrationRequest) {
|
||||
if (hasInitialData) {
|
||||
return initialData;
|
||||
}
|
||||
if (hasInitialError) {
|
||||
throw initialError;
|
||||
}
|
||||
}
|
||||
return callSingleFetch(singleFetch);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
} finally {
|
||||
isHydrationRequest = false;
|
||||
}
|
||||
} : (
|
||||
// We always make the call in this RSC world since even if we don't
|
||||
// have a `loader` we may need to get the `element` implementation
|
||||
(_, singleFetch) => callSingleFetch(singleFetch)
|
||||
),
|
||||
action: match.clientAction ? (args, singleFetch) => match.clientAction({
|
||||
...args,
|
||||
serverAction: async () => {
|
||||
preventInvalidServerHandlerCall(
|
||||
"action",
|
||||
match.id,
|
||||
match.hasLoader
|
||||
);
|
||||
return await callSingleFetch(singleFetch);
|
||||
}
|
||||
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
||||
throw noActionDefinedError("action", match.id);
|
||||
},
|
||||
path: match.path,
|
||||
shouldRevalidate: match.shouldRevalidate,
|
||||
// We always have a "loader" in this RSC world since even if we don't
|
||||
// have a `loader` we may need to get the `element` implementation
|
||||
hasLoader: true,
|
||||
hasClientLoader: match.clientLoader != null,
|
||||
hasAction: match.hasAction,
|
||||
hasClientAction: match.clientAction != null,
|
||||
hasShouldRevalidate: match.shouldRevalidate != null
|
||||
};
|
||||
if (typeof dataRoute.loader === "function") {
|
||||
dataRoute.loader.hydrate = shouldHydrateRouteLoader(
|
||||
match.id,
|
||||
match.clientLoader,
|
||||
match.hasLoader,
|
||||
false
|
||||
);
|
||||
}
|
||||
return dataRoute;
|
||||
}
|
||||
function callSingleFetch(singleFetch) {
|
||||
invariant(typeof singleFetch === "function", "Invalid singleFetch parameter");
|
||||
return singleFetch();
|
||||
}
|
||||
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
||||
if (!hasHandler) {
|
||||
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
||||
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
||||
console.error(msg);
|
||||
throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
|
||||
}
|
||||
}
|
||||
var nextPaths = /* @__PURE__ */ new Set();
|
||||
var discoveredPathsMaxSize = 1e3;
|
||||
var discoveredPaths = /* @__PURE__ */ new Set();
|
||||
var URL_LIMIT = 7680;
|
||||
function getManifestUrl(paths) {
|
||||
if (paths.length === 0) {
|
||||
return null;
|
||||
}
|
||||
if (paths.length === 1) {
|
||||
return new URL(`${paths[0]}.manifest`, window.location.origin);
|
||||
}
|
||||
const globalVar = window;
|
||||
let basename = (globalVar.__reactRouterDataRouter.basename ?? "").replace(
|
||||
/^\/|\/$/g,
|
||||
""
|
||||
);
|
||||
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
||||
url.searchParams.set("paths", paths.sort().join(","));
|
||||
return url;
|
||||
}
|
||||
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|
||||
let url = getManifestUrl(paths);
|
||||
if (url == null) {
|
||||
return;
|
||||
}
|
||||
if (url.toString().length > URL_LIMIT) {
|
||||
nextPaths.clear();
|
||||
return;
|
||||
}
|
||||
let response = await fetchImplementation(new Request(url, { signal }));
|
||||
if (!response.body || response.status < 200 || response.status >= 300) {
|
||||
throw new Error("Unable to fetch new route matches from the server");
|
||||
}
|
||||
let payload = await createFromReadableStream(response.body, {
|
||||
temporaryReferences: void 0
|
||||
});
|
||||
if (payload.type !== "manifest") {
|
||||
throw new Error("Failed to patch routes");
|
||||
}
|
||||
paths.forEach((p) => addToFifoQueue(p, discoveredPaths));
|
||||
payload.patches.forEach((p) => {
|
||||
window.__reactRouterDataRouter.patchRoutes(
|
||||
p.parentId ?? null,
|
||||
[createRouteFromServerManifest(p)]
|
||||
);
|
||||
});
|
||||
}
|
||||
function addToFifoQueue(path, queue) {
|
||||
if (queue.size >= discoveredPathsMaxSize) {
|
||||
let first = queue.values().next().value;
|
||||
queue.delete(first);
|
||||
}
|
||||
queue.add(path);
|
||||
}
|
||||
function debounce(callback, wait) {
|
||||
let timeoutId;
|
||||
return (...args) => {
|
||||
window.clearTimeout(timeoutId);
|
||||
timeoutId = window.setTimeout(() => callback(...args), wait);
|
||||
};
|
||||
}
|
||||
function isExternalLocation(location2) {
|
||||
const newLocation = new URL(location2, window.location.href);
|
||||
return newLocation.origin !== window.location.origin;
|
||||
}
|
||||
|
||||
// lib/rsc/html-stream/browser.ts
|
||||
function getRSCStream() {
|
||||
let encoder = new TextEncoder();
|
||||
let streamController = null;
|
||||
let rscStream = new ReadableStream({
|
||||
start(controller) {
|
||||
if (typeof window === "undefined") {
|
||||
return;
|
||||
}
|
||||
let handleChunk = (chunk) => {
|
||||
if (typeof chunk === "string") {
|
||||
controller.enqueue(encoder.encode(chunk));
|
||||
} else {
|
||||
controller.enqueue(chunk);
|
||||
}
|
||||
};
|
||||
window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []);
|
||||
window.__FLIGHT_DATA.forEach(handleChunk);
|
||||
window.__FLIGHT_DATA.push = (chunk) => {
|
||||
handleChunk(chunk);
|
||||
return 0;
|
||||
};
|
||||
streamController = controller;
|
||||
}
|
||||
});
|
||||
if (typeof document !== "undefined" && document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
streamController?.close();
|
||||
});
|
||||
} else {
|
||||
streamController?.close();
|
||||
}
|
||||
return rscStream;
|
||||
}
|
||||
export {
|
||||
HydratedRouter,
|
||||
RouterProvider2 as RouterProvider
|
||||
RouterProvider2 as RouterProvider,
|
||||
RSCHydratedRouter as unstable_RSCHydratedRouter,
|
||||
createCallServer as unstable_createCallServer,
|
||||
getRSCStream as unstable_getRSCStream
|
||||
};
|
||||
|
||||
1598
frontend/node_modules/react-router/dist/production/fog-of-war-CCAcUMgB.d.ts
generated
vendored
1598
frontend/node_modules/react-router/dist/production/fog-of-war-CCAcUMgB.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
1598
frontend/node_modules/react-router/dist/production/fog-of-war-D6dP9JIt.d.mts
generated
vendored
1598
frontend/node_modules/react-router/dist/production/fog-of-war-D6dP9JIt.d.mts
generated
vendored
File diff suppressed because it is too large
Load Diff
2584
frontend/node_modules/react-router/dist/production/index-react-server-client-B0vnxMMk.d.mts
generated
vendored
Normal file
2584
frontend/node_modules/react-router/dist/production/index-react-server-client-B0vnxMMk.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2584
frontend/node_modules/react-router/dist/production/index-react-server-client-BSxMvS7Z.d.ts
generated
vendored
Normal file
2584
frontend/node_modules/react-router/dist/production/index-react-server-client-BSxMvS7Z.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
frontend/node_modules/react-router/dist/production/index-react-server-client.d.mts
generated
vendored
Normal file
3
frontend/node_modules/react-router/dist/production/index-react-server-client.d.mts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aR as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './router-DIAPGK5f.mjs';
|
||||
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-B0vnxMMk.mjs';
|
||||
import 'react';
|
||||
3
frontend/node_modules/react-router/dist/production/index-react-server-client.d.ts
generated
vendored
Normal file
3
frontend/node_modules/react-router/dist/production/index-react-server-client.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { b2 as MemoryRouter, b3 as Navigate, b4 as Outlet, b5 as Route, b6 as Router, b7 as RouterProvider, b8 as Routes, aP as UNSAFE_AwaitContextProvider, by as UNSAFE_WithComponentProps, bC as UNSAFE_WithErrorBoundaryProps, bA as UNSAFE_WithHydrateFallbackProps } from './instrumentation-iAqbU5Q4.js';
|
||||
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BSxMvS7Z.js';
|
||||
import 'react';
|
||||
61
frontend/node_modules/react-router/dist/production/index-react-server-client.js
generated
vendored
Normal file
61
frontend/node_modules/react-router/dist/production/index-react-server-client.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _chunkERPFE3MRjs = require('./chunk-ERPFE3MR.js');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var _chunkEAE7427Ajs = require('./chunk-EAE7427A.js');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exports.BrowserRouter = _chunkERPFE3MRjs.BrowserRouter; exports.Form = _chunkERPFE3MRjs.Form; exports.HashRouter = _chunkERPFE3MRjs.HashRouter; exports.Link = _chunkERPFE3MRjs.Link; exports.Links = _chunkEAE7427Ajs.Links; exports.MemoryRouter = _chunkEAE7427Ajs.MemoryRouter; exports.Meta = _chunkEAE7427Ajs.Meta; exports.NavLink = _chunkERPFE3MRjs.NavLink; exports.Navigate = _chunkEAE7427Ajs.Navigate; exports.Outlet = _chunkEAE7427Ajs.Outlet; exports.Route = _chunkEAE7427Ajs.Route; exports.Router = _chunkEAE7427Ajs.Router; exports.RouterProvider = _chunkEAE7427Ajs.RouterProvider; exports.Routes = _chunkEAE7427Ajs.Routes; exports.ScrollRestoration = _chunkERPFE3MRjs.ScrollRestoration; exports.StaticRouter = _chunkERPFE3MRjs.StaticRouter; exports.StaticRouterProvider = _chunkERPFE3MRjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkEAE7427Ajs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkEAE7427Ajs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkEAE7427Ajs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkEAE7427Ajs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkERPFE3MRjs.HistoryRouter;
|
||||
59
frontend/node_modules/react-router/dist/production/index-react-server-client.mjs
generated
vendored
Normal file
59
frontend/node_modules/react-router/dist/production/index-react-server-client.mjs
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
import {
|
||||
AwaitContextProvider,
|
||||
BrowserRouter,
|
||||
Form,
|
||||
HashRouter,
|
||||
HistoryRouter,
|
||||
Link,
|
||||
Links,
|
||||
MemoryRouter,
|
||||
Meta,
|
||||
NavLink,
|
||||
Navigate,
|
||||
Outlet,
|
||||
Route,
|
||||
Router,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
ScrollRestoration,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
WithComponentProps,
|
||||
WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps
|
||||
} from "./chunk-RZ6LZWMW.mjs";
|
||||
export {
|
||||
BrowserRouter,
|
||||
Form,
|
||||
HashRouter,
|
||||
Link,
|
||||
Links,
|
||||
MemoryRouter,
|
||||
Meta,
|
||||
NavLink,
|
||||
Navigate,
|
||||
Outlet,
|
||||
Route,
|
||||
Router,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
ScrollRestoration,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
AwaitContextProvider as UNSAFE_AwaitContextProvider,
|
||||
WithComponentProps as UNSAFE_WithComponentProps,
|
||||
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|
||||
HistoryRouter as unstable_HistoryRouter
|
||||
};
|
||||
2534
frontend/node_modules/react-router/dist/production/index-react-server.d.mts
generated
vendored
Normal file
2534
frontend/node_modules/react-router/dist/production/index-react-server.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2534
frontend/node_modules/react-router/dist/production/index-react-server.d.ts
generated
vendored
Normal file
2534
frontend/node_modules/react-router/dist/production/index-react-server.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3557
frontend/node_modules/react-router/dist/production/index-react-server.js
generated
vendored
Normal file
3557
frontend/node_modules/react-router/dist/production/index-react-server.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3446
frontend/node_modules/react-router/dist/production/index-react-server.mjs
generated
vendored
Normal file
3446
frontend/node_modules/react-router/dist/production/index-react-server.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1341
frontend/node_modules/react-router/dist/production/index.d.mts
generated
vendored
1341
frontend/node_modules/react-router/dist/production/index.d.mts
generated
vendored
File diff suppressed because it is too large
Load Diff
1341
frontend/node_modules/react-router/dist/production/index.d.ts
generated
vendored
1341
frontend/node_modules/react-router/dist/production/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
9965
frontend/node_modules/react-router/dist/production/index.js
generated
vendored
9965
frontend/node_modules/react-router/dist/production/index.js
generated
vendored
File diff suppressed because one or more lines are too long
73
frontend/node_modules/react-router/dist/production/index.mjs
generated
vendored
73
frontend/node_modules/react-router/dist/production/index.mjs
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
@@ -8,9 +8,31 @@
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use client";
|
||||
import {
|
||||
RSCDefaultRootErrorBoundary,
|
||||
RSCStaticRouter,
|
||||
ServerMode,
|
||||
ServerRouter,
|
||||
createCookie,
|
||||
createCookieSessionStorage,
|
||||
createMemorySessionStorage,
|
||||
createRequestHandler,
|
||||
createRoutesStub,
|
||||
createSession,
|
||||
createSessionStorage,
|
||||
deserializeErrors,
|
||||
getHydrationData,
|
||||
href,
|
||||
isCookie,
|
||||
isSession,
|
||||
routeRSCServerRequest,
|
||||
setDevServerHooks
|
||||
} from "./chunk-TPBVZP6U.mjs";
|
||||
import {
|
||||
Action,
|
||||
Await,
|
||||
AwaitContextProvider,
|
||||
BrowserRouter,
|
||||
DataRouterContext,
|
||||
DataRouterStateContext,
|
||||
@@ -37,46 +59,40 @@ import {
|
||||
Route,
|
||||
RouteContext,
|
||||
Router,
|
||||
RouterContextProvider,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
Scripts,
|
||||
ScrollRestoration,
|
||||
ServerMode,
|
||||
ServerRouter,
|
||||
SingleFetchRedirectSymbol,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
ViewTransitionContext,
|
||||
WithComponentProps,
|
||||
WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps,
|
||||
createBrowserHistory,
|
||||
createBrowserRouter,
|
||||
createClientRoutes,
|
||||
createClientRoutesWithHMRRevalidationOptOut,
|
||||
createCookie,
|
||||
createCookieSessionStorage,
|
||||
createContext,
|
||||
createHashRouter,
|
||||
createMemoryRouter,
|
||||
createMemorySessionStorage,
|
||||
createPath,
|
||||
createRequestHandler,
|
||||
createRouter,
|
||||
createRoutesFromChildren,
|
||||
createRoutesFromElements,
|
||||
createRoutesStub,
|
||||
createSearchParams,
|
||||
createSession,
|
||||
createSessionStorage,
|
||||
createStaticHandler,
|
||||
createStaticHandler2 as createStaticHandler,
|
||||
createStaticRouter,
|
||||
data,
|
||||
decodeViaTurboStream,
|
||||
deserializeErrors,
|
||||
generatePath,
|
||||
getPatchRoutesOnNavigationFunction,
|
||||
getSingleFetchDataStrategy,
|
||||
getTurboStreamSingleFetchDataStrategy,
|
||||
hydrationRouteProperties,
|
||||
invariant,
|
||||
isCookie,
|
||||
isRouteErrorResponse,
|
||||
isSession,
|
||||
mapRouteProperties,
|
||||
matchPath,
|
||||
matchRoutes,
|
||||
@@ -86,7 +102,6 @@ import {
|
||||
renderMatches,
|
||||
replace,
|
||||
resolvePath,
|
||||
setDevServerHooks,
|
||||
shouldHydrateRouteLoader,
|
||||
useActionData,
|
||||
useAsyncError,
|
||||
@@ -113,14 +128,18 @@ import {
|
||||
usePrompt,
|
||||
useResolvedPath,
|
||||
useRevalidator,
|
||||
useRoute,
|
||||
useRouteError,
|
||||
useRouteLoaderData,
|
||||
useRoutes,
|
||||
useScrollRestoration,
|
||||
useSearchParams,
|
||||
useSubmit,
|
||||
useViewTransitionState
|
||||
} from "./chunk-JRAGQQ3X.mjs";
|
||||
useViewTransitionState,
|
||||
withComponentProps,
|
||||
withErrorBoundaryProps,
|
||||
withHydrateFallbackProps
|
||||
} from "./chunk-RZ6LZWMW.mjs";
|
||||
export {
|
||||
Await,
|
||||
BrowserRouter,
|
||||
@@ -140,6 +159,7 @@ export {
|
||||
PrefetchPageLinks,
|
||||
Route,
|
||||
Router,
|
||||
RouterContextProvider,
|
||||
RouterProvider,
|
||||
Routes,
|
||||
Scripts,
|
||||
@@ -147,6 +167,7 @@ export {
|
||||
ServerRouter,
|
||||
StaticRouter,
|
||||
StaticRouterProvider,
|
||||
AwaitContextProvider as UNSAFE_AwaitContextProvider,
|
||||
DataRouterContext as UNSAFE_DataRouterContext,
|
||||
DataRouterStateContext as UNSAFE_DataRouterStateContext,
|
||||
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
|
||||
@@ -154,25 +175,35 @@ export {
|
||||
FrameworkContext as UNSAFE_FrameworkContext,
|
||||
LocationContext as UNSAFE_LocationContext,
|
||||
NavigationContext as UNSAFE_NavigationContext,
|
||||
RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary,
|
||||
RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
|
||||
RouteContext as UNSAFE_RouteContext,
|
||||
ServerMode as UNSAFE_ServerMode,
|
||||
SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
|
||||
ViewTransitionContext as UNSAFE_ViewTransitionContext,
|
||||
WithComponentProps as UNSAFE_WithComponentProps,
|
||||
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
|
||||
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
|
||||
createBrowserHistory as UNSAFE_createBrowserHistory,
|
||||
createClientRoutes as UNSAFE_createClientRoutes,
|
||||
createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
|
||||
createRouter as UNSAFE_createRouter,
|
||||
decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
|
||||
deserializeErrors as UNSAFE_deserializeErrors,
|
||||
getHydrationData as UNSAFE_getHydrationData,
|
||||
getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
|
||||
getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy,
|
||||
getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,
|
||||
hydrationRouteProperties as UNSAFE_hydrationRouteProperties,
|
||||
invariant as UNSAFE_invariant,
|
||||
mapRouteProperties as UNSAFE_mapRouteProperties,
|
||||
shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
|
||||
useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
|
||||
useScrollRestoration as UNSAFE_useScrollRestoration,
|
||||
withComponentProps as UNSAFE_withComponentProps,
|
||||
withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,
|
||||
withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,
|
||||
createBrowserRouter,
|
||||
createContext,
|
||||
createCookie,
|
||||
createCookieSessionStorage,
|
||||
createHashRouter,
|
||||
@@ -190,6 +221,7 @@ export {
|
||||
createStaticRouter,
|
||||
data,
|
||||
generatePath,
|
||||
href,
|
||||
isCookie,
|
||||
isRouteErrorResponse,
|
||||
isSession,
|
||||
@@ -202,8 +234,11 @@ export {
|
||||
replace,
|
||||
resolvePath,
|
||||
HistoryRouter as unstable_HistoryRouter,
|
||||
RSCStaticRouter as unstable_RSCStaticRouter,
|
||||
routeRSCServerRequest as unstable_routeRSCServerRequest,
|
||||
setDevServerHooks as unstable_setDevServerHooks,
|
||||
usePrompt as unstable_usePrompt,
|
||||
useRoute as unstable_useRoute,
|
||||
useActionData,
|
||||
useAsyncError,
|
||||
useAsyncValue,
|
||||
|
||||
3187
frontend/node_modules/react-router/dist/production/instrumentation-iAqbU5Q4.d.ts
generated
vendored
Normal file
3187
frontend/node_modules/react-router/dist/production/instrumentation-iAqbU5Q4.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
184
frontend/node_modules/react-router/dist/production/lib/types/internal.d.mts
generated
vendored
Normal file
184
frontend/node_modules/react-router/dist/production/lib/types/internal.d.mts
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
import { R as RouteModule, h as LinkDescriptor, L as Location, F as Func, i as Pretty, j as MetaDescriptor, G as GetLoaderData, k as ServerDataFunctionArgs, l as MiddlewareNextFunction, m as ClientDataFunctionArgs, D as DataStrategyResult, n as ServerDataFrom, N as Normalize, o as GetActionData } from '../../router-DIAPGK5f.mjs';
|
||||
import { R as RouteFiles, P as Pages } from '../../register-_G476ptB.mjs';
|
||||
import 'react';
|
||||
|
||||
type MaybePromise<T> = T | Promise<T>;
|
||||
type Props = {
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type RouteInfo = Props & {
|
||||
module: RouteModule;
|
||||
matches: Array<MatchInfo>;
|
||||
};
|
||||
type MatchInfo = {
|
||||
id: string;
|
||||
module: RouteModule;
|
||||
};
|
||||
type MetaMatch<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
/** @deprecated Use `MetaMatch.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
|
||||
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
|
||||
ErrorBoundary: Func;
|
||||
} ? true : false;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
||||
location: Location;
|
||||
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
|
||||
params: T["params"];
|
||||
/**
|
||||
* The return value for this route's server loader function
|
||||
*
|
||||
* @deprecated Use `Route.MetaArgs.loaderData` instead
|
||||
*/
|
||||
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** The return value for this route's server loader function */
|
||||
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
||||
error?: unknown;
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: MetaMatches<T["matches"]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
||||
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type IsServerFirstRoute<T extends RouteInfo, RSCEnabled extends boolean> = RSCEnabled extends true ? T["module"] extends {
|
||||
ServerComponent: Func;
|
||||
} ? true : false : false;
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
params: T["params"];
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type Match<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
/** @deprecated Use `Match.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export default function Component({
|
||||
* params,
|
||||
* }: Route.ComponentProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: Matches<T["matches"]>;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export function ErrorBoundary({
|
||||
* params,
|
||||
* }: Route.ErrorBoundaryProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type GetAnnotations<Info extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
LinkDescriptors: LinkDescriptor[];
|
||||
LinksFunction: () => LinkDescriptor[];
|
||||
MetaArgs: CreateMetaArgs<Info>;
|
||||
MetaDescriptors: MetaDescriptors;
|
||||
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
|
||||
HeadersArgs: HeadersArgs;
|
||||
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
|
||||
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
|
||||
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
|
||||
LoaderArgs: CreateServerLoaderArgs<Info>;
|
||||
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
|
||||
ActionArgs: CreateServerActionArgs<Info>;
|
||||
ClientActionArgs: CreateClientActionArgs<Info>;
|
||||
HydrateFallbackProps: CreateHydrateFallbackProps<Info, RSCEnabled>;
|
||||
ComponentProps: CreateComponentProps<Info, RSCEnabled>;
|
||||
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, RSCEnabled>;
|
||||
};
|
||||
|
||||
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
|
||||
|
||||
type GetInfo<T extends {
|
||||
file: keyof RouteFiles;
|
||||
module: RouteModule;
|
||||
}> = {
|
||||
params: Params<T["file"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
actionData: GetActionData<T["module"]>;
|
||||
};
|
||||
|
||||
export type { GetAnnotations, GetInfo };
|
||||
184
frontend/node_modules/react-router/dist/production/lib/types/internal.d.ts
generated
vendored
Normal file
184
frontend/node_modules/react-router/dist/production/lib/types/internal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
import { R as RouteModule, f as LinkDescriptor, L as Location, F as Func, g as Pretty, h as MetaDescriptor, G as GetLoaderData, i as ServerDataFunctionArgs, j as MiddlewareNextFunction, k as ClientDataFunctionArgs, D as DataStrategyResult, l as ServerDataFrom, N as Normalize, m as GetActionData } from '../../instrumentation-iAqbU5Q4.js';
|
||||
import { R as RouteFiles, P as Pages } from '../../register-c-dooqKE.js';
|
||||
import 'react';
|
||||
|
||||
type MaybePromise<T> = T | Promise<T>;
|
||||
type Props = {
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type RouteInfo = Props & {
|
||||
module: RouteModule;
|
||||
matches: Array<MatchInfo>;
|
||||
};
|
||||
type MatchInfo = {
|
||||
id: string;
|
||||
module: RouteModule;
|
||||
};
|
||||
type MetaMatch<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
/** @deprecated Use `MetaMatch.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
|
||||
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
|
||||
ErrorBoundary: Func;
|
||||
} ? true : false;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
||||
location: Location;
|
||||
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
|
||||
params: T["params"];
|
||||
/**
|
||||
* The return value for this route's server loader function
|
||||
*
|
||||
* @deprecated Use `Route.MetaArgs.loaderData` instead
|
||||
*/
|
||||
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** The return value for this route's server loader function */
|
||||
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
|
||||
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
|
||||
error?: unknown;
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: MetaMatches<T["matches"]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
||||
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
|
||||
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type IsServerFirstRoute<T extends RouteInfo, RSCEnabled extends boolean> = RSCEnabled extends true ? T["module"] extends {
|
||||
ServerComponent: Func;
|
||||
} ? true : false : false;
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
params: T["params"];
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type Match<T extends MatchInfo> = Pretty<{
|
||||
id: T["id"];
|
||||
params: Record<string, string | undefined>;
|
||||
pathname: string;
|
||||
/** @deprecated Use `Match.loaderData` instead */
|
||||
data: GetLoaderData<T["module"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export default function Component({
|
||||
* params,
|
||||
* }: Route.ComponentProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html route matches}, including parent route matches. */
|
||||
matches: Matches<T["matches"]>;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
/**
|
||||
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
||||
* @example
|
||||
* // app/routes.ts
|
||||
* route("teams/:teamId", "./team.tsx"),
|
||||
*
|
||||
* // app/team.tsx
|
||||
* export function ErrorBoundary({
|
||||
* params,
|
||||
* }: Route.ErrorBoundaryProps) {
|
||||
* params.teamId;
|
||||
* // ^ string
|
||||
* }
|
||||
**/
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
} & (IsServerFirstRoute<T, RSCEnabled> extends true ? {
|
||||
/** The data returned from the `loader` */
|
||||
loaderData?: ServerDataFrom<T["module"]["loader"]>;
|
||||
/** The data returned from the `action` following an action submission. */
|
||||
actionData?: ServerDataFrom<T["module"]["action"]>;
|
||||
} : {
|
||||
/** The data returned from the `loader` or `clientLoader` */
|
||||
loaderData?: T["loaderData"];
|
||||
/** The data returned from the `action` or `clientAction` following an action submission. */
|
||||
actionData?: T["actionData"];
|
||||
});
|
||||
type GetAnnotations<Info extends RouteInfo, RSCEnabled extends boolean> = {
|
||||
LinkDescriptors: LinkDescriptor[];
|
||||
LinksFunction: () => LinkDescriptor[];
|
||||
MetaArgs: CreateMetaArgs<Info>;
|
||||
MetaDescriptors: MetaDescriptors;
|
||||
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
|
||||
HeadersArgs: HeadersArgs;
|
||||
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
|
||||
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
|
||||
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
|
||||
LoaderArgs: CreateServerLoaderArgs<Info>;
|
||||
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
|
||||
ActionArgs: CreateServerActionArgs<Info>;
|
||||
ClientActionArgs: CreateClientActionArgs<Info>;
|
||||
HydrateFallbackProps: CreateHydrateFallbackProps<Info, RSCEnabled>;
|
||||
ComponentProps: CreateComponentProps<Info, RSCEnabled>;
|
||||
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, RSCEnabled>;
|
||||
};
|
||||
|
||||
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
|
||||
|
||||
type GetInfo<T extends {
|
||||
file: keyof RouteFiles;
|
||||
module: RouteModule;
|
||||
}> = {
|
||||
params: Params<T["file"]>;
|
||||
loaderData: GetLoaderData<T["module"]>;
|
||||
actionData: GetActionData<T["module"]>;
|
||||
};
|
||||
|
||||
export type { GetAnnotations, GetInfo };
|
||||
10
frontend/node_modules/react-router/dist/production/lib/types/internal.js
generated
vendored
Normal file
10
frontend/node_modules/react-router/dist/production/lib/types/internal.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
109
frontend/node_modules/react-router/dist/production/lib/types/route-module.d.mts
generated
vendored
109
frontend/node_modules/react-router/dist/production/lib/types/route-module.d.mts
generated
vendored
@@ -1,109 +0,0 @@
|
||||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.mjs';
|
||||
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
|
||||
import 'react';
|
||||
|
||||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
||||
type RouteModule = {
|
||||
meta?: Func;
|
||||
links?: Func;
|
||||
headers?: Func;
|
||||
loader?: Func;
|
||||
clientLoader?: Func;
|
||||
action?: Func;
|
||||
clientAction?: Func;
|
||||
HydrateFallback?: unknown;
|
||||
default?: unknown;
|
||||
ErrorBoundary?: unknown;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
type LinkDescriptors = LinkDescriptor[];
|
||||
type RouteInfo = {
|
||||
parents: RouteInfo[];
|
||||
module: RouteModule;
|
||||
id: unknown;
|
||||
file: string;
|
||||
path: string;
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
data: T["loaderData"];
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
location: Location;
|
||||
params: T["params"];
|
||||
data: T["loaderData"];
|
||||
error?: unknown;
|
||||
matches: MetaMatches<[...T["parents"], T]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type IsHydrate<ClientLoader> = ClientLoader extends {
|
||||
hydrate: true;
|
||||
} ? true : ClientLoader extends {
|
||||
hydrate: false;
|
||||
} ? false : false;
|
||||
type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
|
||||
HydrateFallback: Func;
|
||||
} ? true : false>;
|
||||
type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
|
||||
HasHydrateFallback,
|
||||
ClientLoaderHydrate
|
||||
] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
|
||||
IsDefined<ClientLoaderData>,
|
||||
IsDefined<ServerLoaderData>
|
||||
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
|
||||
type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
|
||||
type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
|
||||
IsDefined<ServerActionData>,
|
||||
IsDefined<ClientActionData>
|
||||
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
||||
type ClientDataFunctionArgs<T extends RouteInfo> = {
|
||||
request: Request;
|
||||
params: T["params"];
|
||||
};
|
||||
type ServerDataFunctionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
context: AppLoadContext;
|
||||
};
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
};
|
||||
type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
data: T["loaderData"];
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
loaderData: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
matches: Matches<[...T["parents"], T]>;
|
||||
};
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
loaderData?: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
};
|
||||
|
||||
export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, HeadersArgs, LinkDescriptors, MetaDescriptors };
|
||||
109
frontend/node_modules/react-router/dist/production/lib/types/route-module.d.ts
generated
vendored
109
frontend/node_modules/react-router/dist/production/lib/types/route-module.d.ts
generated
vendored
@@ -1,109 +0,0 @@
|
||||
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, aP as Equal, aQ as Pretty } from '../../route-data-Cq_b5feC.js';
|
||||
import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
|
||||
import 'react';
|
||||
|
||||
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
||||
type RouteModule = {
|
||||
meta?: Func;
|
||||
links?: Func;
|
||||
headers?: Func;
|
||||
loader?: Func;
|
||||
clientLoader?: Func;
|
||||
action?: Func;
|
||||
clientAction?: Func;
|
||||
HydrateFallback?: unknown;
|
||||
default?: unknown;
|
||||
ErrorBoundary?: unknown;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
type LinkDescriptors = LinkDescriptor[];
|
||||
type RouteInfo = {
|
||||
parents: RouteInfo[];
|
||||
module: RouteModule;
|
||||
id: unknown;
|
||||
file: string;
|
||||
path: string;
|
||||
params: unknown;
|
||||
loaderData: unknown;
|
||||
actionData: unknown;
|
||||
};
|
||||
type MetaMatch<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
meta: MetaDescriptor[];
|
||||
data: T["loaderData"];
|
||||
handle?: unknown;
|
||||
error?: unknown;
|
||||
}>;
|
||||
type MetaMatches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
|
||||
type CreateMetaArgs<T extends RouteInfo> = {
|
||||
location: Location;
|
||||
params: T["params"];
|
||||
data: T["loaderData"];
|
||||
error?: unknown;
|
||||
matches: MetaMatches<[...T["parents"], T]>;
|
||||
};
|
||||
type MetaDescriptors = MetaDescriptor[];
|
||||
type HeadersArgs = {
|
||||
loaderHeaders: Headers;
|
||||
parentHeaders: Headers;
|
||||
actionHeaders: Headers;
|
||||
errorHeaders: Headers | undefined;
|
||||
};
|
||||
type IsHydrate<ClientLoader> = ClientLoader extends {
|
||||
hydrate: true;
|
||||
} ? true : ClientLoader extends {
|
||||
hydrate: false;
|
||||
} ? false : false;
|
||||
type CreateLoaderData<T extends RouteModule> = _CreateLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
|
||||
HydrateFallback: Func;
|
||||
} ? true : false>;
|
||||
type _CreateLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
|
||||
HasHydrateFallback,
|
||||
ClientLoaderHydrate
|
||||
] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
|
||||
IsDefined<ClientLoaderData>,
|
||||
IsDefined<ServerLoaderData>
|
||||
] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
|
||||
type CreateActionData<T extends RouteModule> = _CreateActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
|
||||
type _CreateActionData<ServerActionData, ClientActionData> = Awaited<[
|
||||
IsDefined<ServerActionData>,
|
||||
IsDefined<ClientActionData>
|
||||
] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
||||
type ClientDataFunctionArgs<T extends RouteInfo> = {
|
||||
request: Request;
|
||||
params: T["params"];
|
||||
};
|
||||
type ServerDataFunctionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
context: AppLoadContext;
|
||||
};
|
||||
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
|
||||
};
|
||||
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
||||
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
||||
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
|
||||
};
|
||||
type CreateHydrateFallbackProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
};
|
||||
type Match<T extends RouteInfo> = Pretty<Pick<T, "id" | "params"> & {
|
||||
pathname: string;
|
||||
data: T["loaderData"];
|
||||
handle: unknown;
|
||||
}>;
|
||||
type Matches<T extends RouteInfo[]> = T extends [infer F extends RouteInfo, ...infer R extends RouteInfo[]] ? [Match<F>, ...Matches<R>] : Array<Match<RouteInfo> | undefined>;
|
||||
type CreateComponentProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
loaderData: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
matches: Matches<[...T["parents"], T]>;
|
||||
};
|
||||
type CreateErrorBoundaryProps<T extends RouteInfo> = {
|
||||
params: T["params"];
|
||||
error: unknown;
|
||||
loaderData?: T["loaderData"];
|
||||
actionData?: T["actionData"];
|
||||
};
|
||||
|
||||
export type { CreateActionData, CreateClientActionArgs, CreateClientLoaderArgs, CreateComponentProps, CreateErrorBoundaryProps, CreateHydrateFallbackProps, CreateLoaderData, CreateMetaArgs, CreateServerActionArgs, CreateServerLoaderArgs, HeadersArgs, LinkDescriptors, MetaDescriptors };
|
||||
28
frontend/node_modules/react-router/dist/production/lib/types/route-module.js
generated
vendored
28
frontend/node_modules/react-router/dist/production/lib/types/route-module.js
generated
vendored
@@ -1,28 +0,0 @@
|
||||
/**
|
||||
* react-router v7.1.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// lib/types/route-module.ts
|
||||
var route_module_exports = {};
|
||||
module.exports = __toCommonJS(route_module_exports);
|
||||
30
frontend/node_modules/react-router/dist/production/register-_G476ptB.d.mts
generated
vendored
Normal file
30
frontend/node_modules/react-router/dist/production/register-_G476ptB.d.mts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { R as RouteModule } from './router-DIAPGK5f.mjs';
|
||||
|
||||
/**
|
||||
* 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, string | undefined>;
|
||||
type AnyPages = Record<string, {
|
||||
params: AnyParams;
|
||||
}>;
|
||||
type Pages = Register extends {
|
||||
pages: infer Registered extends AnyPages;
|
||||
} ? Registered : AnyPages;
|
||||
type AnyRouteFiles = Record<string, {
|
||||
id: string;
|
||||
page: string;
|
||||
}>;
|
||||
type RouteFiles = Register extends {
|
||||
routeFiles: infer Registered extends AnyRouteFiles;
|
||||
} ? Registered : AnyRouteFiles;
|
||||
type AnyRouteModules = Record<string, RouteModule>;
|
||||
type RouteModules = Register extends {
|
||||
routeModules: infer Registered extends AnyRouteModules;
|
||||
} ? Registered : AnyRouteModules;
|
||||
|
||||
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };
|
||||
30
frontend/node_modules/react-router/dist/production/register-c-dooqKE.d.ts
generated
vendored
Normal file
30
frontend/node_modules/react-router/dist/production/register-c-dooqKE.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { R as RouteModule } from './instrumentation-iAqbU5Q4.js';
|
||||
|
||||
/**
|
||||
* 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, string | undefined>;
|
||||
type AnyPages = Record<string, {
|
||||
params: AnyParams;
|
||||
}>;
|
||||
type Pages = Register extends {
|
||||
pages: infer Registered extends AnyPages;
|
||||
} ? Registered : AnyPages;
|
||||
type AnyRouteFiles = Record<string, {
|
||||
id: string;
|
||||
page: string;
|
||||
}>;
|
||||
type RouteFiles = Register extends {
|
||||
routeFiles: infer Registered extends AnyRouteFiles;
|
||||
} ? Registered : AnyRouteFiles;
|
||||
type AnyRouteModules = Record<string, RouteModule>;
|
||||
type RouteModules = Register extends {
|
||||
routeModules: infer Registered extends AnyRouteModules;
|
||||
} ? Registered : AnyRouteModules;
|
||||
|
||||
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };
|
||||
1578
frontend/node_modules/react-router/dist/production/route-data-Cq_b5feC.d.mts
generated
vendored
1578
frontend/node_modules/react-router/dist/production/route-data-Cq_b5feC.d.mts
generated
vendored
File diff suppressed because it is too large
Load Diff
1578
frontend/node_modules/react-router/dist/production/route-data-Cq_b5feC.d.ts
generated
vendored
1578
frontend/node_modules/react-router/dist/production/route-data-Cq_b5feC.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
3187
frontend/node_modules/react-router/dist/production/router-DIAPGK5f.d.mts
generated
vendored
Normal file
3187
frontend/node_modules/react-router/dist/production/router-DIAPGK5f.d.mts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
81
frontend/node_modules/react-router/package.json
generated
vendored
81
frontend/node_modules/react-router/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-router",
|
||||
"version": "7.1.5",
|
||||
"version": "7.9.5",
|
||||
"description": "Declarative routing for React",
|
||||
"keywords": [
|
||||
"react",
|
||||
@@ -23,11 +23,20 @@
|
||||
"module": "./dist/development/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"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": {
|
||||
"types": "./dist/development/index.d.mts",
|
||||
"default": "./dist/development/index.mjs"
|
||||
@@ -37,20 +46,17 @@
|
||||
"default": "./dist/development/index.js"
|
||||
}
|
||||
},
|
||||
"./route-module": {
|
||||
"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": {
|
||||
"types": "./dist/development/dom-export.d.mts",
|
||||
"default": "./dist/development/dom-export.mjs"
|
||||
@@ -60,11 +66,46 @@
|
||||
"default": "./dist/development/dom-export.js"
|
||||
}
|
||||
},
|
||||
"./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"
|
||||
},
|
||||
"wireit": {
|
||||
"build": {
|
||||
"command": "rimraf dist && tsup",
|
||||
"command": "premove dist && tsup && tsup --config tsup.config.rsc.ts",
|
||||
"files": [
|
||||
"lib/**",
|
||||
"*.ts",
|
||||
@@ -77,18 +118,22 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/cookie": "^0.6.0",
|
||||
"cookie": "^1.0.1",
|
||||
"set-cookie-parser": "^2.6.0",
|
||||
"turbo-stream": "2.4.0"
|
||||
"set-cookie-parser": "^2.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@testing-library/user-event": "^14.6.1",
|
||||
"@types/set-cookie-parser": "^2.4.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"jest-environment-jsdom": "^29.6.2",
|
||||
"premove": "^4.0.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-test-renderer": "^19.1.0",
|
||||
"tsup": "^8.3.0",
|
||||
"typescript": "^5.1.6",
|
||||
"undici": "^6.19.2",
|
||||
"wireit": "0.14.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -110,6 +155,8 @@
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "wireit"
|
||||
"build": "wireit",
|
||||
"watch": "tsup --watch & tsup --config tsup.config.rsc.ts --watch",
|
||||
"typecheck": "tsc"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user