react-router 7.11.0-pre.0 → 7.12.0-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -2
- package/dist/development/{browser-Cv4JZyZ5.d.mts → browser-BEPxnEBW.d.mts} +4 -2
- package/dist/{production/browser-Cv4JZyZ5.d.mts → development/browser-CJ9_du-U.d.ts} +4 -2
- package/dist/development/{chunk-QMKP6CC3.mjs → chunk-2RQJSHF5.mjs} +111 -11
- package/dist/development/{chunk-JKMHOZYW.js → chunk-AUGQXA25.js} +98 -108
- package/dist/development/{chunk-OVG6YSZ5.js → chunk-JBLDGBX7.js} +7 -7
- package/dist/development/{chunk-KRMLYMWA.mjs → chunk-KYKH2NCS.mjs} +122 -50
- package/dist/development/{chunk-UO7KGW2U.js → chunk-MNTWZBMV.js} +117 -35
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +35 -30
- package/dist/development/dom-export.mjs +12 -7
- package/dist/development/{index-react-server-client-P7VgYu6T.d.mts → index-react-server-client-IoJGLOqV.d.mts} +3 -1
- package/dist/{production/index-react-server-client-Cv5Q9lf0.d.ts → development/index-react-server-client-gGyf-7Xp.d.ts} +3 -1
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +3 -1
- package/dist/development/index-react-server.d.ts +3 -1
- package/dist/development/index-react-server.js +92 -7
- package/dist/development/index-react-server.mjs +92 -7
- package/dist/development/index.d.mts +9 -9
- package/dist/development/index.d.ts +9 -9
- package/dist/development/index.js +205 -101
- package/dist/development/index.mjs +7 -3
- package/dist/{production/instrumentation-BlrVzjbg.d.ts → development/instrumentation-DvHY1sgY.d.ts} +45 -1
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-BGQUMCK4.d.ts → register-Bm80E9qL.d.ts} +1 -1
- package/dist/development/{register-DTJJbt1o.d.mts → register-CS_tiXsm.d.mts} +1 -1
- package/dist/development/{router-5fbeEIMQ.d.mts → router-5iOvts3c.d.mts} +45 -1
- package/dist/{development/browser-o-qhcuhA.d.ts → production/browser-BEPxnEBW.d.mts} +4 -2
- package/dist/production/{browser-o-qhcuhA.d.ts → browser-CJ9_du-U.d.ts} +4 -2
- package/dist/production/{chunk-IDHO4Q57.mjs → chunk-HFQUWXEK.mjs} +122 -50
- package/dist/production/{chunk-J4JITZ76.mjs → chunk-ILRYJQTC.mjs} +111 -11
- package/dist/production/{chunk-YGB3JEIP.js → chunk-O6YLM5NB.js} +7 -7
- package/dist/production/{chunk-M5W3Q3T5.js → chunk-QWJQISZK.js} +98 -108
- package/dist/production/{chunk-AO22ZXHI.js → chunk-ZR2NIBH2.js} +117 -35
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +35 -30
- package/dist/production/dom-export.mjs +12 -7
- package/dist/production/{index-react-server-client-P7VgYu6T.d.mts → index-react-server-client-IoJGLOqV.d.mts} +3 -1
- package/dist/{development/index-react-server-client-Cv5Q9lf0.d.ts → production/index-react-server-client-gGyf-7Xp.d.ts} +3 -1
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +3 -1
- package/dist/production/index-react-server.d.ts +3 -1
- package/dist/production/index-react-server.js +92 -7
- package/dist/production/index-react-server.mjs +92 -7
- package/dist/production/index.d.mts +9 -9
- package/dist/production/index.d.ts +9 -9
- package/dist/production/index.js +205 -101
- package/dist/production/index.mjs +7 -3
- package/dist/{development/instrumentation-BlrVzjbg.d.ts → production/instrumentation-DvHY1sgY.d.ts} +45 -1
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-BGQUMCK4.d.ts → register-Bm80E9qL.d.ts} +1 -1
- package/dist/production/{register-DTJJbt1o.d.mts → register-CS_tiXsm.d.mts} +1 -1
- package/dist/production/{router-5fbeEIMQ.d.mts → router-5iOvts3c.d.mts} +45 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bG as RouteManifest, q as RouteModules, W as HydrationState, a3 as DataRouteObject, a as ClientLoaderFunction, a7 as StaticHandlerContext, bH as ServerRouteModule, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, an as LoaderFunctionArgs, ae as ActionFunctionArgs, aw as unstable_ServerInstrumentation, al as HTMLFormMethod, aj as FormEncType, y as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a6 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, r as DataStrategyFunction, a2 as PatchRoutesOnNavigationFunction, v as NavigateOptions, a8 as Fetcher, Q as RouteObject, p as Router, x as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a4 as StaticHandler } from './router-5iOvts3c.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
interface Route {
|
|
@@ -59,6 +59,7 @@ interface EntryContext extends FrameworkContextObject {
|
|
|
59
59
|
}
|
|
60
60
|
interface FutureConfig {
|
|
61
61
|
unstable_subResourceIntegrity: boolean;
|
|
62
|
+
unstable_trailingSlashAwareDataRequests: boolean;
|
|
62
63
|
v8_middleware: boolean;
|
|
63
64
|
}
|
|
64
65
|
type CriticalCss = string | {
|
|
@@ -113,6 +114,7 @@ interface ServerBuild {
|
|
|
113
114
|
mode: "lazy" | "initial";
|
|
114
115
|
manifestPath: string;
|
|
115
116
|
};
|
|
117
|
+
allowedActionOrigins?: string[] | false;
|
|
116
118
|
}
|
|
117
119
|
interface HandleDocumentRequestFunction {
|
|
118
120
|
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bG as RouteManifest, o as RouteModules, Q as HydrationState, a1 as DataRouteObject, a as ClientLoaderFunction, a5 as StaticHandlerContext, bH as ServerRouteModule, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, al as LoaderFunctionArgs, ac as ActionFunctionArgs, au as unstable_ServerInstrumentation, aj as HTMLFormMethod, ah as FormEncType, w as RelativeRoutingType, bh as PageLinkDescriptor, T as To, bI as History, a4 as GetScrollRestorationKeyFunction, e as RouterInit, bJ as FutureConfig$1, u as unstable_ClientInstrumentation, p as DataStrategyFunction, a0 as PatchRoutesOnNavigationFunction, s as NavigateOptions, a6 as Fetcher, K as RouteObject, n as Router, v as SerializeFrom, B as BlockerFunction, L as Location, bK as CreateStaticHandlerOptions$1, a2 as StaticHandler } from './instrumentation-DvHY1sgY.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
interface Route {
|
|
@@ -59,6 +59,7 @@ interface EntryContext extends FrameworkContextObject {
|
|
|
59
59
|
}
|
|
60
60
|
interface FutureConfig {
|
|
61
61
|
unstable_subResourceIntegrity: boolean;
|
|
62
|
+
unstable_trailingSlashAwareDataRequests: boolean;
|
|
62
63
|
v8_middleware: boolean;
|
|
63
64
|
}
|
|
64
65
|
type CriticalCss = string | {
|
|
@@ -113,6 +114,7 @@ interface ServerBuild {
|
|
|
113
114
|
mode: "lazy" | "initial";
|
|
114
115
|
manifestPath: string;
|
|
115
116
|
};
|
|
117
|
+
allowedActionOrigins?: string[] | false;
|
|
116
118
|
}
|
|
117
119
|
interface HandleDocumentRequestFunction {
|
|
118
120
|
(request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: MiddlewareEnabled extends true ? RouterContextProvider : AppLoadContext): Promise<Response> | Response;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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,
|
|
2
|
-
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-
|
|
1
|
+
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, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps } from './router-5iOvts3c.mjs';
|
|
2
|
+
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-IoJGLOqV.mjs';
|
|
3
3
|
import 'react';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
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,
|
|
2
|
-
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-
|
|
1
|
+
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, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps } from './instrumentation-DvHY1sgY.js';
|
|
2
|
+
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-gGyf-7Xp.js';
|
|
3
3
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.12.0-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkAUGQXA25js = require('./chunk-AUGQXA25.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -34,7 +34,7 @@ var _chunkJKMHOZYWjs = require('./chunk-JKMHOZYW.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkMNTWZBMVjs = require('./chunk-MNTWZBMV.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -58,4 +58,4 @@ var _chunkUO7KGW2Ujs = require('./chunk-UO7KGW2U.js');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
exports.BrowserRouter =
|
|
61
|
+
exports.BrowserRouter = _chunkAUGQXA25js.BrowserRouter; exports.Form = _chunkAUGQXA25js.Form; exports.HashRouter = _chunkAUGQXA25js.HashRouter; exports.Link = _chunkAUGQXA25js.Link; exports.Links = _chunkMNTWZBMVjs.Links; exports.MemoryRouter = _chunkMNTWZBMVjs.MemoryRouter; exports.Meta = _chunkMNTWZBMVjs.Meta; exports.NavLink = _chunkAUGQXA25js.NavLink; exports.Navigate = _chunkMNTWZBMVjs.Navigate; exports.Outlet = _chunkMNTWZBMVjs.Outlet; exports.Route = _chunkMNTWZBMVjs.Route; exports.Router = _chunkMNTWZBMVjs.Router; exports.RouterProvider = _chunkMNTWZBMVjs.RouterProvider; exports.Routes = _chunkMNTWZBMVjs.Routes; exports.ScrollRestoration = _chunkAUGQXA25js.ScrollRestoration; exports.StaticRouter = _chunkAUGQXA25js.StaticRouter; exports.StaticRouterProvider = _chunkAUGQXA25js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkMNTWZBMVjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkMNTWZBMVjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkMNTWZBMVjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkMNTWZBMVjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkAUGQXA25js.HistoryRouter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.12.0-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
WithComponentProps,
|
|
33
33
|
WithErrorBoundaryProps,
|
|
34
34
|
WithHydrateFallbackProps
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KYKH2NCS.mjs";
|
|
36
36
|
export {
|
|
37
37
|
BrowserRouter,
|
|
38
38
|
Form,
|
|
@@ -2238,6 +2238,7 @@ type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
|
2238
2238
|
* @category RSC
|
|
2239
2239
|
* @mode data
|
|
2240
2240
|
* @param opts Options
|
|
2241
|
+
* @param opts.allowedActionOrigins Origin patterns that are allowed to execute actions.
|
|
2241
2242
|
* @param opts.basename The basename to use when matching the request.
|
|
2242
2243
|
* @param opts.createTemporaryReferenceSet A function that returns a temporary
|
|
2243
2244
|
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
|
|
@@ -2267,7 +2268,8 @@ type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
|
2267
2268
|
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
|
2268
2269
|
* data for hydration.
|
|
2269
2270
|
*/
|
|
2270
|
-
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
|
2271
|
+
declare function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
|
2272
|
+
allowedActionOrigins?: string[];
|
|
2271
2273
|
createTemporaryReferenceSet: () => unknown;
|
|
2272
2274
|
basename?: string;
|
|
2273
2275
|
decodeReply?: DecodeReplyFunction;
|
|
@@ -2238,6 +2238,7 @@ type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
|
2238
2238
|
* @category RSC
|
|
2239
2239
|
* @mode data
|
|
2240
2240
|
* @param opts Options
|
|
2241
|
+
* @param opts.allowedActionOrigins Origin patterns that are allowed to execute actions.
|
|
2241
2242
|
* @param opts.basename The basename to use when matching the request.
|
|
2242
2243
|
* @param opts.createTemporaryReferenceSet A function that returns a temporary
|
|
2243
2244
|
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
|
|
@@ -2267,7 +2268,8 @@ type LoadServerActionFunction = (id: string) => Promise<Function>;
|
|
|
2267
2268
|
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
|
|
2268
2269
|
* data for hydration.
|
|
2269
2270
|
*/
|
|
2270
|
-
declare function matchRSCServerRequest({ createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
|
2271
|
+
declare function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
|
|
2272
|
+
allowedActionOrigins?: string[];
|
|
2271
2273
|
createTemporaryReferenceSet: () => unknown;
|
|
2272
2274
|
basename?: string;
|
|
2273
2275
|
decodeReply?: DecodeReplyFunction;
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* react-router v7.
|
|
30
|
+
* react-router v7.12.0-pre.0
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Remix Software Inc.
|
|
33
33
|
*
|
|
@@ -166,6 +166,9 @@ function getRouteInstrumentationUpdates(fns, route) {
|
|
|
166
166
|
(...args) => getHandlerInfo(args[0])
|
|
167
167
|
);
|
|
168
168
|
if (instrumented) {
|
|
169
|
+
if (key === "loader" && original.hydrate === true) {
|
|
170
|
+
instrumented.hydrate = true;
|
|
171
|
+
}
|
|
169
172
|
instrumented[UninstrumentedSymbol] = original;
|
|
170
173
|
updates[key] = instrumented;
|
|
171
174
|
}
|
|
@@ -2394,6 +2397,85 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
2394
2397
|
}
|
|
2395
2398
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
2396
2399
|
|
|
2400
|
+
// lib/actions.ts
|
|
2401
|
+
function throwIfPotentialCSRFAttack(headers, allowedActionOrigins) {
|
|
2402
|
+
let originHeader = headers.get("origin");
|
|
2403
|
+
let originDomain = typeof originHeader === "string" && originHeader !== "null" ? new URL(originHeader).host : originHeader;
|
|
2404
|
+
let host = parseHostHeader(headers);
|
|
2405
|
+
if (originDomain && (!host || originDomain !== host.value)) {
|
|
2406
|
+
if (!isAllowedOrigin(originDomain, allowedActionOrigins)) {
|
|
2407
|
+
if (host) {
|
|
2408
|
+
throw new Error(
|
|
2409
|
+
`${host.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`
|
|
2410
|
+
);
|
|
2411
|
+
} else {
|
|
2412
|
+
throw new Error(
|
|
2413
|
+
"`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action."
|
|
2414
|
+
);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
function matchWildcardDomain(domain, pattern) {
|
|
2420
|
+
const domainParts = domain.split(".");
|
|
2421
|
+
const patternParts = pattern.split(".");
|
|
2422
|
+
if (patternParts.length < 1) {
|
|
2423
|
+
return false;
|
|
2424
|
+
}
|
|
2425
|
+
if (domainParts.length < patternParts.length) {
|
|
2426
|
+
return false;
|
|
2427
|
+
}
|
|
2428
|
+
if (patternParts.length === 1 && (patternParts[0] === "*" || patternParts[0] === "**")) {
|
|
2429
|
+
return false;
|
|
2430
|
+
}
|
|
2431
|
+
while (patternParts.length) {
|
|
2432
|
+
const patternPart = patternParts.pop();
|
|
2433
|
+
const domainPart = domainParts.pop();
|
|
2434
|
+
switch (patternPart) {
|
|
2435
|
+
case "": {
|
|
2436
|
+
return false;
|
|
2437
|
+
}
|
|
2438
|
+
case "*": {
|
|
2439
|
+
if (domainPart) {
|
|
2440
|
+
continue;
|
|
2441
|
+
} else {
|
|
2442
|
+
return false;
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
case "**": {
|
|
2446
|
+
if (patternParts.length > 0) {
|
|
2447
|
+
return false;
|
|
2448
|
+
}
|
|
2449
|
+
return domainPart !== void 0;
|
|
2450
|
+
}
|
|
2451
|
+
case void 0:
|
|
2452
|
+
default: {
|
|
2453
|
+
if (domainPart !== patternPart) {
|
|
2454
|
+
return false;
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
return domainParts.length === 0;
|
|
2460
|
+
}
|
|
2461
|
+
function isAllowedOrigin(originDomain, allowedActionOrigins = []) {
|
|
2462
|
+
return allowedActionOrigins.some(
|
|
2463
|
+
(allowedOrigin) => allowedOrigin && (allowedOrigin === originDomain || matchWildcardDomain(originDomain, allowedOrigin))
|
|
2464
|
+
);
|
|
2465
|
+
}
|
|
2466
|
+
function parseHostHeader(headers) {
|
|
2467
|
+
let forwardedHostHeader = headers.get("x-forwarded-host");
|
|
2468
|
+
let forwardedHostValue = forwardedHostHeader?.split(",")[0]?.trim();
|
|
2469
|
+
let hostHeader = headers.get("host");
|
|
2470
|
+
return forwardedHostValue ? {
|
|
2471
|
+
type: "x-forwarded-host",
|
|
2472
|
+
value: forwardedHostValue
|
|
2473
|
+
} : hostHeader ? {
|
|
2474
|
+
type: "host",
|
|
2475
|
+
value: hostHeader
|
|
2476
|
+
} : void 0;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2397
2479
|
// lib/errors.ts
|
|
2398
2480
|
var ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR";
|
|
2399
2481
|
var ERROR_DIGEST_REDIRECT = "REDIRECT";
|
|
@@ -2489,6 +2571,7 @@ var Await = async ({
|
|
|
2489
2571
|
});
|
|
2490
2572
|
};
|
|
2491
2573
|
async function matchRSCServerRequest({
|
|
2574
|
+
allowedActionOrigins,
|
|
2492
2575
|
createTemporaryReferenceSet,
|
|
2493
2576
|
basename,
|
|
2494
2577
|
decodeReply,
|
|
@@ -2504,10 +2587,10 @@ async function matchRSCServerRequest({
|
|
|
2504
2587
|
let url = new URL(request.url);
|
|
2505
2588
|
basename = basename || "/";
|
|
2506
2589
|
let normalizedPath = url.pathname;
|
|
2507
|
-
if (
|
|
2508
|
-
normalizedPath =
|
|
2509
|
-
} else if (
|
|
2510
|
-
normalizedPath =
|
|
2590
|
+
if (url.pathname.endsWith("/_.rsc")) {
|
|
2591
|
+
normalizedPath = url.pathname.replace(/_\.rsc$/, "");
|
|
2592
|
+
} else if (url.pathname.endsWith(".rsc")) {
|
|
2593
|
+
normalizedPath = url.pathname.replace(/\.rsc$/, "");
|
|
2511
2594
|
}
|
|
2512
2595
|
if (stripBasename(normalizedPath, basename) !== "/" && normalizedPath.endsWith("/")) {
|
|
2513
2596
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
@@ -2561,7 +2644,8 @@ async function matchRSCServerRequest({
|
|
|
2561
2644
|
decodeFormState,
|
|
2562
2645
|
onError,
|
|
2563
2646
|
generateResponse,
|
|
2564
|
-
temporaryReferences
|
|
2647
|
+
temporaryReferences,
|
|
2648
|
+
allowedActionOrigins
|
|
2565
2649
|
);
|
|
2566
2650
|
response.headers.set("X-Remix-Response", "yes");
|
|
2567
2651
|
return response;
|
|
@@ -2740,7 +2824,7 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
|
|
|
2740
2824
|
});
|
|
2741
2825
|
}
|
|
2742
2826
|
}
|
|
2743
|
-
async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences) {
|
|
2827
|
+
async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins) {
|
|
2744
2828
|
let statusCode = 200;
|
|
2745
2829
|
let url = new URL(request.url);
|
|
2746
2830
|
let isSubmission = isMutationMethod(request.method);
|
|
@@ -2766,6 +2850,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
2766
2850
|
let formState;
|
|
2767
2851
|
let skipRevalidation = false;
|
|
2768
2852
|
if (request.method === "POST") {
|
|
2853
|
+
throwIfPotentialCSRFAttack(request.headers, allowedActionOrigins);
|
|
2769
2854
|
ctx.runningAction = true;
|
|
2770
2855
|
let result2 = await processServerAction(
|
|
2771
2856
|
request,
|
|
@@ -6,7 +6,7 @@ export { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLi
|
|
|
6
6
|
import { serialize, parse } from 'cookie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* react-router v7.
|
|
9
|
+
* react-router v7.12.0-pre.0
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -145,6 +145,9 @@ function getRouteInstrumentationUpdates(fns, route) {
|
|
|
145
145
|
(...args) => getHandlerInfo(args[0])
|
|
146
146
|
);
|
|
147
147
|
if (instrumented) {
|
|
148
|
+
if (key === "loader" && original.hydrate === true) {
|
|
149
|
+
instrumented.hydrate = true;
|
|
150
|
+
}
|
|
148
151
|
instrumented[UninstrumentedSymbol] = original;
|
|
149
152
|
updates[key] = instrumented;
|
|
150
153
|
}
|
|
@@ -2373,6 +2376,85 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
2373
2376
|
}
|
|
2374
2377
|
var SINGLE_FETCH_REDIRECT_STATUS = 202;
|
|
2375
2378
|
|
|
2379
|
+
// lib/actions.ts
|
|
2380
|
+
function throwIfPotentialCSRFAttack(headers, allowedActionOrigins) {
|
|
2381
|
+
let originHeader = headers.get("origin");
|
|
2382
|
+
let originDomain = typeof originHeader === "string" && originHeader !== "null" ? new URL(originHeader).host : originHeader;
|
|
2383
|
+
let host = parseHostHeader(headers);
|
|
2384
|
+
if (originDomain && (!host || originDomain !== host.value)) {
|
|
2385
|
+
if (!isAllowedOrigin(originDomain, allowedActionOrigins)) {
|
|
2386
|
+
if (host) {
|
|
2387
|
+
throw new Error(
|
|
2388
|
+
`${host.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`
|
|
2389
|
+
);
|
|
2390
|
+
} else {
|
|
2391
|
+
throw new Error(
|
|
2392
|
+
"`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action."
|
|
2393
|
+
);
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
function matchWildcardDomain(domain, pattern) {
|
|
2399
|
+
const domainParts = domain.split(".");
|
|
2400
|
+
const patternParts = pattern.split(".");
|
|
2401
|
+
if (patternParts.length < 1) {
|
|
2402
|
+
return false;
|
|
2403
|
+
}
|
|
2404
|
+
if (domainParts.length < patternParts.length) {
|
|
2405
|
+
return false;
|
|
2406
|
+
}
|
|
2407
|
+
if (patternParts.length === 1 && (patternParts[0] === "*" || patternParts[0] === "**")) {
|
|
2408
|
+
return false;
|
|
2409
|
+
}
|
|
2410
|
+
while (patternParts.length) {
|
|
2411
|
+
const patternPart = patternParts.pop();
|
|
2412
|
+
const domainPart = domainParts.pop();
|
|
2413
|
+
switch (patternPart) {
|
|
2414
|
+
case "": {
|
|
2415
|
+
return false;
|
|
2416
|
+
}
|
|
2417
|
+
case "*": {
|
|
2418
|
+
if (domainPart) {
|
|
2419
|
+
continue;
|
|
2420
|
+
} else {
|
|
2421
|
+
return false;
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
case "**": {
|
|
2425
|
+
if (patternParts.length > 0) {
|
|
2426
|
+
return false;
|
|
2427
|
+
}
|
|
2428
|
+
return domainPart !== void 0;
|
|
2429
|
+
}
|
|
2430
|
+
case void 0:
|
|
2431
|
+
default: {
|
|
2432
|
+
if (domainPart !== patternPart) {
|
|
2433
|
+
return false;
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
return domainParts.length === 0;
|
|
2439
|
+
}
|
|
2440
|
+
function isAllowedOrigin(originDomain, allowedActionOrigins = []) {
|
|
2441
|
+
return allowedActionOrigins.some(
|
|
2442
|
+
(allowedOrigin) => allowedOrigin && (allowedOrigin === originDomain || matchWildcardDomain(originDomain, allowedOrigin))
|
|
2443
|
+
);
|
|
2444
|
+
}
|
|
2445
|
+
function parseHostHeader(headers) {
|
|
2446
|
+
let forwardedHostHeader = headers.get("x-forwarded-host");
|
|
2447
|
+
let forwardedHostValue = forwardedHostHeader?.split(",")[0]?.trim();
|
|
2448
|
+
let hostHeader = headers.get("host");
|
|
2449
|
+
return forwardedHostValue ? {
|
|
2450
|
+
type: "x-forwarded-host",
|
|
2451
|
+
value: forwardedHostValue
|
|
2452
|
+
} : hostHeader ? {
|
|
2453
|
+
type: "host",
|
|
2454
|
+
value: hostHeader
|
|
2455
|
+
} : void 0;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2376
2458
|
// lib/errors.ts
|
|
2377
2459
|
var ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR";
|
|
2378
2460
|
var ERROR_DIGEST_REDIRECT = "REDIRECT";
|
|
@@ -2468,6 +2550,7 @@ var Await = async ({
|
|
|
2468
2550
|
});
|
|
2469
2551
|
};
|
|
2470
2552
|
async function matchRSCServerRequest({
|
|
2553
|
+
allowedActionOrigins,
|
|
2471
2554
|
createTemporaryReferenceSet,
|
|
2472
2555
|
basename,
|
|
2473
2556
|
decodeReply,
|
|
@@ -2483,10 +2566,10 @@ async function matchRSCServerRequest({
|
|
|
2483
2566
|
let url = new URL(request.url);
|
|
2484
2567
|
basename = basename || "/";
|
|
2485
2568
|
let normalizedPath = url.pathname;
|
|
2486
|
-
if (
|
|
2487
|
-
normalizedPath =
|
|
2488
|
-
} else if (
|
|
2489
|
-
normalizedPath =
|
|
2569
|
+
if (url.pathname.endsWith("/_.rsc")) {
|
|
2570
|
+
normalizedPath = url.pathname.replace(/_\.rsc$/, "");
|
|
2571
|
+
} else if (url.pathname.endsWith(".rsc")) {
|
|
2572
|
+
normalizedPath = url.pathname.replace(/\.rsc$/, "");
|
|
2490
2573
|
}
|
|
2491
2574
|
if (stripBasename(normalizedPath, basename) !== "/" && normalizedPath.endsWith("/")) {
|
|
2492
2575
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
@@ -2540,7 +2623,8 @@ async function matchRSCServerRequest({
|
|
|
2540
2623
|
decodeFormState,
|
|
2541
2624
|
onError,
|
|
2542
2625
|
generateResponse,
|
|
2543
|
-
temporaryReferences
|
|
2626
|
+
temporaryReferences,
|
|
2627
|
+
allowedActionOrigins
|
|
2544
2628
|
);
|
|
2545
2629
|
response.headers.set("X-Remix-Response", "yes");
|
|
2546
2630
|
return response;
|
|
@@ -2719,7 +2803,7 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
|
|
|
2719
2803
|
});
|
|
2720
2804
|
}
|
|
2721
2805
|
}
|
|
2722
|
-
async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences) {
|
|
2806
|
+
async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins) {
|
|
2723
2807
|
let statusCode = 200;
|
|
2724
2808
|
let url = new URL(request.url);
|
|
2725
2809
|
let isSubmission = isMutationMethod(request.method);
|
|
@@ -2745,6 +2829,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
2745
2829
|
let formState;
|
|
2746
2830
|
let skipRevalidation = false;
|
|
2747
2831
|
if (request.method === "POST") {
|
|
2832
|
+
throwIfPotentialCSRFAttack(request.headers, allowedActionOrigins);
|
|
2748
2833
|
ctx.runningAction = true;
|
|
2749
2834
|
let result2 = await processServerAction(
|
|
2750
2835
|
request,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { p as Router, q as RouteModules, r as DataStrategyFunction, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, T as To, v as NavigateOptions, B as BlockerFunction, w as Blocker, x as SerializeFrom, y as RelativeRoutingType, L as Location, z as ParamParseKey, E as Path, I as PathPattern, J as PathMatch, U as UIMatch, K as Navigation, O as Action, P as Params, Q as RouteObject, G as GetLoaderData, o as GetActionData, V as InitialEntry, W as HydrationState, X as IndexRouteObject, Y as RouteComponentType, Z as HydrateFallbackType, _ as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, $ as NonIndexRouteObject, a0 as Equal, a1 as RouterState, a2 as PatchRoutesOnNavigationFunction, a3 as DataRouteObject, a as ClientLoaderFunction } from './router-
|
|
2
|
-
export { ae as ActionFunctionArgs, b1 as Await, aS as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, g as ClientOnErrorFunction, aN as DataRouteMatch, af as DataStrategyFunctionArgs, ag as DataStrategyMatch, D as DataStrategyResult, ai as ErrorResponse, a8 as Fetcher, aj as FormEncType, ak as FormMethod, bj as Future, a5 as GetScrollPositionFunction, a6 as GetScrollRestorationKeyFunction, al as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aD as IDLE_BLOCKER, aC as IDLE_FETCHER, aB as IDLE_NAVIGATION, aT as IndexRouteProps, aU as LayoutRouteProps, am as LazyRouteFunction, h as LinkDescriptor, an as LoaderFunctionArgs, b2 as MemoryRouter, aV as MemoryRouterOpts, aW as MemoryRouterProps, bg as MetaArgs, j as MetaDescriptor, ao as MiddlewareFunction, b3 as Navigate, aX as NavigateProps, a9 as NavigationStates, aO as Navigator, b4 as Outlet, aY as OutletProps, bh as PageLinkDescriptor, aP as PatchRoutesOnNavigationFunctionArgs, ap as PathParam, aZ as PathRouteProps, aq as RedirectFunction, ad as RevalidationState, b5 as Route, aQ as RouteMatch, a_ as RouteProps, b6 as Router, ar as RouterContext, ac as RouterFetchOptions, e as RouterInit, ab as RouterNavigateOptions, a$ as RouterProps, b7 as RouterProvider, f as RouterProviderProps, aa as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, as as ShouldRevalidateFunctionArgs, a4 as StaticHandler, a7 as StaticHandlerContext, aR as UNSAFE_AwaitContextProvider,
|
|
1
|
+
import { p as Router, q as RouteModules, r as DataStrategyFunction, s as MiddlewareEnabled, c as RouterContextProvider, t as AppLoadContext, T as To, v as NavigateOptions, B as BlockerFunction, w as Blocker, x as SerializeFrom, y as RelativeRoutingType, L as Location, z as ParamParseKey, E as Path, I as PathPattern, J as PathMatch, U as UIMatch, K as Navigation, O as Action, P as Params, Q as RouteObject, G as GetLoaderData, o as GetActionData, V as InitialEntry, W as HydrationState, X as IndexRouteObject, Y as RouteComponentType, Z as HydrateFallbackType, _ as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, $ as NonIndexRouteObject, a0 as Equal, a1 as RouterState, a2 as PatchRoutesOnNavigationFunction, a3 as DataRouteObject, a as ClientLoaderFunction } from './router-5iOvts3c.mjs';
|
|
2
|
+
export { ae as ActionFunctionArgs, b1 as Await, aS as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, g as ClientOnErrorFunction, aN as DataRouteMatch, af as DataStrategyFunctionArgs, ag as DataStrategyMatch, D as DataStrategyResult, ai as ErrorResponse, a8 as Fetcher, aj as FormEncType, ak as FormMethod, bj as Future, a5 as GetScrollPositionFunction, a6 as GetScrollRestorationKeyFunction, al as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aD as IDLE_BLOCKER, aC as IDLE_FETCHER, aB as IDLE_NAVIGATION, aT as IndexRouteProps, aU as LayoutRouteProps, am as LazyRouteFunction, h as LinkDescriptor, an as LoaderFunctionArgs, b2 as MemoryRouter, aV as MemoryRouterOpts, aW as MemoryRouterProps, bg as MetaArgs, j as MetaDescriptor, ao as MiddlewareFunction, b3 as Navigate, aX as NavigateProps, a9 as NavigationStates, aO as Navigator, b4 as Outlet, aY as OutletProps, bh as PageLinkDescriptor, aP as PatchRoutesOnNavigationFunctionArgs, ap as PathParam, aZ as PathRouteProps, aq as RedirectFunction, ad as RevalidationState, b5 as Route, aQ as RouteMatch, a_ as RouteProps, b6 as Router, ar as RouterContext, ac as RouterFetchOptions, e as RouterInit, ab as RouterNavigateOptions, a$ as RouterProps, b7 as RouterProvider, f as RouterProviderProps, aa as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, as as ShouldRevalidateFunctionArgs, a4 as StaticHandler, a7 as StaticHandlerContext, aR as UNSAFE_AwaitContextProvider, br as UNSAFE_DataRouterContext, bs as UNSAFE_DataRouterStateContext, ah as UNSAFE_DataWithResponseInit, bq as UNSAFE_ErrorResponseImpl, bt as UNSAFE_FetchersContext, bu as UNSAFE_LocationContext, bv as UNSAFE_NavigationContext, bw as UNSAFE_RouteContext, bx as UNSAFE_ViewTransitionContext, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps, bm as UNSAFE_createBrowserHistory, bn as UNSAFE_createHashHistory, bl as UNSAFE_createMemoryHistory, bp as UNSAFE_createRouter, by as UNSAFE_hydrationRouteProperties, bo as UNSAFE_invariant, bz as UNSAFE_mapRouteProperties, bB as UNSAFE_withComponentProps, bF as UNSAFE_withErrorBoundaryProps, bD as UNSAFE_withHydrateFallbackProps, at as createContext, b9 as createMemoryRouter, au as createPath, ba as createRoutesFromChildren, bb as createRoutesFromElements, aE as data, aF as generatePath, aG as isRouteErrorResponse, aH as matchPath, aI as matchRoutes, av as parsePath, aJ as redirect, aK as redirectDocument, bc as renderMatches, aL as replace, aM as resolvePath, u as unstable_ClientInstrumentation, ax as unstable_InstrumentRequestHandlerFunction, az as unstable_InstrumentRouteFunction, ay as unstable_InstrumentRouterFunction, aA as unstable_InstrumentationHandlerResult, bk as unstable_SerializesTo, aw as unstable_ServerInstrumentation } from './router-5iOvts3c.mjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { ReactElement } from 'react';
|
|
5
|
-
import { a as RouteModules$1, P as Pages } from './register-
|
|
6
|
-
export { b as Register } from './register-
|
|
7
|
-
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
8
|
-
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-
|
|
5
|
+
import { a as RouteModules$1, P as Pages } from './register-CS_tiXsm.mjs';
|
|
6
|
+
export { b as Register } from './register-CS_tiXsm.mjs';
|
|
7
|
+
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-IoJGLOqV.mjs';
|
|
8
|
+
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-IoJGLOqV.mjs';
|
|
9
9
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
10
10
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
11
|
-
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-
|
|
12
|
-
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-
|
|
11
|
+
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-BEPxnEBW.mjs';
|
|
12
|
+
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-BEPxnEBW.mjs';
|
|
13
13
|
|
|
14
14
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
15
|
-
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction;
|
|
15
|
+
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined, trailingSlashAware: boolean): DataStrategyFunction;
|
|
16
16
|
declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
|
|
17
17
|
done: Promise<undefined>;
|
|
18
18
|
value: unknown;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { n as Router, o as RouteModules, p as DataStrategyFunction, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, T as To, s as NavigateOptions, B as BlockerFunction, t as Blocker, v as SerializeFrom, w as RelativeRoutingType, L as Location, x as ParamParseKey, y as Path, z as PathPattern, E as PathMatch, U as UIMatch, I as Navigation, J as Action, P as Params, K as RouteObject, G as GetLoaderData, m as GetActionData, O as InitialEntry, Q as HydrationState, V as IndexRouteObject, W as RouteComponentType, X as HydrateFallbackType, Y as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, Z as NonIndexRouteObject, _ as Equal, $ as RouterState, a0 as PatchRoutesOnNavigationFunction, a1 as DataRouteObject, a as ClientLoaderFunction } from './instrumentation-
|
|
2
|
-
export { ac as ActionFunctionArgs, b1 as Await, aQ as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, aS as ClientOnErrorFunction, aL as DataRouteMatch, ad as DataStrategyFunctionArgs, ae as DataStrategyMatch, D as DataStrategyResult, ag as ErrorResponse, a6 as Fetcher, ah as FormEncType, ai as FormMethod, bj as Future, a3 as GetScrollPositionFunction, a4 as GetScrollRestorationKeyFunction, aj as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aB as IDLE_BLOCKER, aA as IDLE_FETCHER, az as IDLE_NAVIGATION, aR as IndexRouteProps, aT as LayoutRouteProps, ak as LazyRouteFunction, f as LinkDescriptor, al as LoaderFunctionArgs, b2 as MemoryRouter, aU as MemoryRouterOpts, aV as MemoryRouterProps, bg as MetaArgs, h as MetaDescriptor, am as MiddlewareFunction, b3 as Navigate, aW as NavigateProps, a7 as NavigationStates, aM as Navigator, b4 as Outlet, aX as OutletProps, bh as PageLinkDescriptor, aN as PatchRoutesOnNavigationFunctionArgs, an as PathParam, aY as PathRouteProps, ao as RedirectFunction, ab as RevalidationState, b5 as Route, aO as RouteMatch, aZ as RouteProps, b6 as Router, ap as RouterContext, aa as RouterFetchOptions, e as RouterInit, a9 as RouterNavigateOptions, a_ as RouterProps, b7 as RouterProvider, a$ as RouterProviderProps, a8 as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, aq as ShouldRevalidateFunctionArgs, a2 as StaticHandler, a5 as StaticHandlerContext, aP as UNSAFE_AwaitContextProvider,
|
|
1
|
+
import { n as Router, o as RouteModules, p as DataStrategyFunction, q as MiddlewareEnabled, c as RouterContextProvider, r as AppLoadContext, T as To, s as NavigateOptions, B as BlockerFunction, t as Blocker, v as SerializeFrom, w as RelativeRoutingType, L as Location, x as ParamParseKey, y as Path, z as PathPattern, E as PathMatch, U as UIMatch, I as Navigation, J as Action, P as Params, K as RouteObject, G as GetLoaderData, m as GetActionData, O as InitialEntry, Q as HydrationState, V as IndexRouteObject, W as RouteComponentType, X as HydrateFallbackType, Y as ErrorBoundaryType, d as LoaderFunction, A as ActionFunction, M as MetaFunction, b as LinksFunction, Z as NonIndexRouteObject, _ as Equal, $ as RouterState, a0 as PatchRoutesOnNavigationFunction, a1 as DataRouteObject, a as ClientLoaderFunction } from './instrumentation-DvHY1sgY.js';
|
|
2
|
+
export { ac as ActionFunctionArgs, b1 as Await, aQ as AwaitProps, C as ClientActionFunction, bd as ClientActionFunctionArgs, be as ClientLoaderFunctionArgs, aS as ClientOnErrorFunction, aL as DataRouteMatch, ad as DataStrategyFunctionArgs, ae as DataStrategyMatch, D as DataStrategyResult, ag as ErrorResponse, a6 as Fetcher, ah as FormEncType, ai as FormMethod, bj as Future, a3 as GetScrollPositionFunction, a4 as GetScrollRestorationKeyFunction, aj as HTMLFormMethod, bf as HeadersArgs, H as HeadersFunction, bi as HtmlLinkDescriptor, aB as IDLE_BLOCKER, aA as IDLE_FETCHER, az as IDLE_NAVIGATION, aR as IndexRouteProps, aT as LayoutRouteProps, ak as LazyRouteFunction, f as LinkDescriptor, al as LoaderFunctionArgs, b2 as MemoryRouter, aU as MemoryRouterOpts, aV as MemoryRouterProps, bg as MetaArgs, h as MetaDescriptor, am as MiddlewareFunction, b3 as Navigate, aW as NavigateProps, a7 as NavigationStates, aM as Navigator, b4 as Outlet, aX as OutletProps, bh as PageLinkDescriptor, aN as PatchRoutesOnNavigationFunctionArgs, an as PathParam, aY as PathRouteProps, ao as RedirectFunction, ab as RevalidationState, b5 as Route, aO as RouteMatch, aZ as RouteProps, b6 as Router, ap as RouterContext, aa as RouterFetchOptions, e as RouterInit, a9 as RouterNavigateOptions, a_ as RouterProps, b7 as RouterProvider, a$ as RouterProviderProps, a8 as RouterSubscriber, b8 as Routes, b0 as RoutesProps, S as ShouldRevalidateFunction, aq as ShouldRevalidateFunctionArgs, a2 as StaticHandler, a5 as StaticHandlerContext, aP as UNSAFE_AwaitContextProvider, br as UNSAFE_DataRouterContext, bs as UNSAFE_DataRouterStateContext, af as UNSAFE_DataWithResponseInit, bq as UNSAFE_ErrorResponseImpl, bt as UNSAFE_FetchersContext, bu as UNSAFE_LocationContext, bv as UNSAFE_NavigationContext, bw as UNSAFE_RouteContext, bx as UNSAFE_ViewTransitionContext, bA as UNSAFE_WithComponentProps, bE as UNSAFE_WithErrorBoundaryProps, bC as UNSAFE_WithHydrateFallbackProps, bm as UNSAFE_createBrowserHistory, bn as UNSAFE_createHashHistory, bl as UNSAFE_createMemoryHistory, bp as UNSAFE_createRouter, by as UNSAFE_hydrationRouteProperties, bo as UNSAFE_invariant, bz as UNSAFE_mapRouteProperties, bB as UNSAFE_withComponentProps, bF as UNSAFE_withErrorBoundaryProps, bD as UNSAFE_withHydrateFallbackProps, ar as createContext, b9 as createMemoryRouter, as as createPath, ba as createRoutesFromChildren, bb as createRoutesFromElements, aC as data, aD as generatePath, aE as isRouteErrorResponse, aF as matchPath, aG as matchRoutes, at as parsePath, aH as redirect, aI as redirectDocument, bc as renderMatches, aJ as replace, aK as resolvePath, u as unstable_ClientInstrumentation, av as unstable_InstrumentRequestHandlerFunction, ax as unstable_InstrumentRouteFunction, aw as unstable_InstrumentRouterFunction, ay as unstable_InstrumentationHandlerResult, bk as unstable_SerializesTo, au as unstable_ServerInstrumentation } from './instrumentation-DvHY1sgY.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { ReactElement } from 'react';
|
|
5
|
-
import { a as RouteModules$1, P as Pages } from './register-
|
|
6
|
-
export { b as Register } from './register-
|
|
7
|
-
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-
|
|
8
|
-
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-
|
|
5
|
+
import { a as RouteModules$1, P as Pages } from './register-Bm80E9qL.js';
|
|
6
|
+
export { b as Register } from './register-Bm80E9qL.js';
|
|
7
|
+
import { A as AssetsManifest, S as ServerBuild, E as EntryContext, F as FutureConfig } from './index-react-server-client-gGyf-7Xp.js';
|
|
8
|
+
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-gGyf-7Xp.js';
|
|
9
9
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
10
10
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
11
|
-
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-
|
|
12
|
-
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-
|
|
11
|
+
import { e as RSCPayload, m as matchRSCServerRequest } from './browser-CJ9_du-U.js';
|
|
12
|
+
export { B as unstable_BrowserCreateFromReadableStreamFunction, D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, E as unstable_EncodeReplyFunction, L as unstable_LoadServerActionFunction, g as unstable_RSCHydratedRouterProps, d as unstable_RSCManifestPayload, h as unstable_RSCMatch, f as unstable_RSCRenderPayload, l as unstable_RSCRouteConfig, k as unstable_RSCRouteConfigEntry, i as unstable_RSCRouteManifest, j as unstable_RSCRouteMatch } from './browser-CJ9_du-U.js';
|
|
13
13
|
|
|
14
14
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
15
|
-
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction;
|
|
15
|
+
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined, trailingSlashAware: boolean): DataStrategyFunction;
|
|
16
16
|
declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
|
|
17
17
|
done: Promise<undefined>;
|
|
18
18
|
value: unknown;
|