react-router 0.0.0-experimental-e87ed2fd4 → 0.0.0-experimental-e7eb25a7b
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 +91 -2
- package/dist/development/{browser-C9OqCpRB.d.mts → browser-BM9EKN98.d.mts} +3 -3
- package/dist/development/{chunk-PVJCBITV.mjs → chunk-SHQJZRZ7.mjs} +127 -36
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +2 -1
- package/dist/development/dom-export.mjs +3 -2
- package/dist/development/index.d.mts +5 -5
- package/dist/development/index.d.ts +5 -5
- package/dist/development/index.js +137 -46
- package/dist/development/index.mjs +7 -7
- package/dist/development/lib/types/internal.d.mts +1 -1
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/register-zy84znbA.d.ts → development/register-B0EYMBux.d.ts} +1 -1
- package/dist/{production/route-data-C-cmsWVs.d.mts → development/route-data-B3YkvRuy.d.mts} +1 -1
- package/dist/development/rsc-export.d.mts +1 -2
- package/dist/development/rsc-export.d.ts +1 -2
- package/dist/development/rsc-export.js +59 -37
- package/dist/development/rsc-export.mjs +60 -38
- package/dist/production/{browser-C9OqCpRB.d.mts → browser-BM9EKN98.d.mts} +3 -3
- package/dist/production/{chunk-FJS6IVQF.mjs → chunk-VMGK4BUZ.mjs} +127 -36
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +2 -1
- package/dist/production/dom-export.mjs +3 -2
- package/dist/production/index.d.mts +5 -5
- package/dist/production/index.d.ts +5 -5
- package/dist/production/index.js +137 -46
- package/dist/production/index.mjs +7 -7
- package/dist/production/lib/types/internal.d.mts +1 -1
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-zy84znbA.d.ts → production/register-B0EYMBux.d.ts} +1 -1
- package/dist/{development/route-data-C-cmsWVs.d.mts → production/route-data-B3YkvRuy.d.mts} +1 -1
- package/dist/production/rsc-export.d.mts +1 -2
- package/dist/production/rsc-export.d.ts +1 -2
- package/dist/production/rsc-export.js +59 -37
- package/dist/production/rsc-export.mjs +60 -38
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { serialize, parse } from 'cookie';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { splitCookiesString } from 'set-cookie-parser';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* react-router v0.0.0-experimental-
|
|
6
|
+
* react-router v0.0.0-experimental-e7eb25a7b
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) Remix Software Inc.
|
|
9
9
|
*
|
|
@@ -39,7 +39,7 @@ function createKey() {
|
|
|
39
39
|
}
|
|
40
40
|
function createLocation(current, to, state = null, key) {
|
|
41
41
|
let location = {
|
|
42
|
-
pathname:
|
|
42
|
+
pathname: "string" === "string" ? current : current.pathname,
|
|
43
43
|
search: "",
|
|
44
44
|
hash: "",
|
|
45
45
|
...typeof to === "string" ? parsePath(to) : to,
|
|
@@ -1484,10 +1484,9 @@ async function runMiddlewarePipeline(args, propagateResult, handler, errorHandle
|
|
|
1484
1484
|
middlewareState.middlewareError.error,
|
|
1485
1485
|
middlewareState.middlewareError.routeId
|
|
1486
1486
|
);
|
|
1487
|
-
|
|
1487
|
+
{
|
|
1488
1488
|
return result;
|
|
1489
1489
|
}
|
|
1490
|
-
return Object.assign(middlewareState.handlerResult, result);
|
|
1491
1490
|
}
|
|
1492
1491
|
}
|
|
1493
1492
|
async function callRouteMiddleware(args, middlewares, propagateResult, middlewareState, handler, idx = 0) {
|
|
@@ -1521,7 +1520,7 @@ async function callRouteMiddleware(args, middlewares, propagateResult, middlewar
|
|
|
1521
1520
|
handler,
|
|
1522
1521
|
idx + 1
|
|
1523
1522
|
);
|
|
1524
|
-
|
|
1523
|
+
{
|
|
1525
1524
|
nextResult = result;
|
|
1526
1525
|
return nextResult;
|
|
1527
1526
|
}
|
|
@@ -2454,19 +2453,28 @@ async function matchRSCServerRequest({
|
|
|
2454
2453
|
}
|
|
2455
2454
|
async function generateManifestResponse(routes, request, generateResponse) {
|
|
2456
2455
|
let url = new URL(request.url);
|
|
2457
|
-
let
|
|
2456
|
+
let pathnameParams = url.searchParams.getAll("p");
|
|
2457
|
+
let pathnames = pathnameParams.length ? pathnameParams : [url.pathname.replace(/\.manifest$/, "")];
|
|
2458
|
+
let routeIds = /* @__PURE__ */ new Set();
|
|
2459
|
+
let matchedRoutes = pathnames.flatMap((pathname) => {
|
|
2460
|
+
let pathnameMatches = matchRoutes(routes, pathname);
|
|
2461
|
+
return pathnameMatches?.map((m, i) => ({
|
|
2462
|
+
...m.route,
|
|
2463
|
+
parentId: pathnameMatches[i - 1]?.route.id
|
|
2464
|
+
})) ?? [];
|
|
2465
|
+
}).filter((route) => {
|
|
2466
|
+
if (!routeIds.has(route.id)) {
|
|
2467
|
+
routeIds.add(route.id);
|
|
2468
|
+
return true;
|
|
2469
|
+
}
|
|
2470
|
+
return false;
|
|
2471
|
+
});
|
|
2458
2472
|
let payload = {
|
|
2459
2473
|
type: "manifest",
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
),
|
|
2465
|
-
patches: await getAdditionalRoutePatches(
|
|
2466
|
-
url.pathname,
|
|
2467
|
-
routes,
|
|
2468
|
-
matches?.map((m) => m.route.id) ?? []
|
|
2469
|
-
)
|
|
2474
|
+
patches: (await Promise.all([
|
|
2475
|
+
...matchedRoutes.map((route) => getManifestRoute(route)),
|
|
2476
|
+
getAdditionalRoutePatches(pathnames, routes, Array.from(routeIds))
|
|
2477
|
+
])).flat(1)
|
|
2470
2478
|
};
|
|
2471
2479
|
return generateResponse({
|
|
2472
2480
|
statusCode: 200,
|
|
@@ -2533,7 +2541,11 @@ async function generateRenderResponse(request, routes, decodeCallServer, decodeF
|
|
|
2533
2541
|
if (matches) {
|
|
2534
2542
|
await Promise.all(matches.map((m) => explodeLazyRoute(m.route)));
|
|
2535
2543
|
}
|
|
2536
|
-
const handler = createStaticHandler(routes
|
|
2544
|
+
const handler = createStaticHandler(routes, {
|
|
2545
|
+
mapRouteProperties: (r) => ({
|
|
2546
|
+
hasErrorBoundary: r.ErrorBoundary != null
|
|
2547
|
+
})
|
|
2548
|
+
});
|
|
2537
2549
|
const result = await handler.query(request, {
|
|
2538
2550
|
skipLoaderErrorBubbling: isDataRequest,
|
|
2539
2551
|
skipRevalidation: isSubmission,
|
|
@@ -2671,7 +2683,7 @@ async function getRenderPayload(baseRenderPayload, routes, routeIdsToLoad, isDat
|
|
|
2671
2683
|
})
|
|
2672
2684
|
);
|
|
2673
2685
|
let patchesPromise = !isDataRequest ? getAdditionalRoutePatches(
|
|
2674
|
-
staticContext.location.pathname,
|
|
2686
|
+
[staticContext.location.pathname],
|
|
2675
2687
|
routes,
|
|
2676
2688
|
staticContext.matches.map((m) => m.route.id)
|
|
2677
2689
|
) : void 0;
|
|
@@ -2767,7 +2779,7 @@ async function getServerRouteMatch(staticContext, match, shouldRenderComponent,
|
|
|
2767
2779
|
shouldRevalidate: match.route.shouldRevalidate
|
|
2768
2780
|
};
|
|
2769
2781
|
}
|
|
2770
|
-
async function getManifestRoute(route
|
|
2782
|
+
async function getManifestRoute(route) {
|
|
2771
2783
|
await explodeLazyRoute(route);
|
|
2772
2784
|
const Layout = route.Layout || React.Fragment;
|
|
2773
2785
|
const errorElement = route.ErrorBoundary ? React.createElement(
|
|
@@ -2784,7 +2796,7 @@ async function getManifestRoute(route, parentId) {
|
|
|
2784
2796
|
errorElement,
|
|
2785
2797
|
hasLoader: !!route.loader,
|
|
2786
2798
|
id: route.id,
|
|
2787
|
-
parentId,
|
|
2799
|
+
parentId: route.parentId,
|
|
2788
2800
|
path: route.path,
|
|
2789
2801
|
index: "index" in route ? route.index : void 0,
|
|
2790
2802
|
links: route.links,
|
|
@@ -2800,26 +2812,36 @@ async function explodeLazyRoute(route) {
|
|
|
2800
2812
|
route.lazy = void 0;
|
|
2801
2813
|
}
|
|
2802
2814
|
}
|
|
2803
|
-
async function getAdditionalRoutePatches(
|
|
2815
|
+
async function getAdditionalRoutePatches(pathnames, routes, matchedRouteIds) {
|
|
2804
2816
|
let patchRouteMatches = /* @__PURE__ */ new Map();
|
|
2805
|
-
let
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
paths.push(`/${segments.join("/")}`);
|
|
2817
|
+
let matchedPaths = /* @__PURE__ */ new Set();
|
|
2818
|
+
for (const pathname of pathnames) {
|
|
2819
|
+
let segments = pathname.split("/").filter(Boolean);
|
|
2820
|
+
let paths = ["/"];
|
|
2810
2821
|
segments.pop();
|
|
2822
|
+
while (segments.length > 0) {
|
|
2823
|
+
paths.push(`/${segments.join("/")}`);
|
|
2824
|
+
segments.pop();
|
|
2825
|
+
}
|
|
2826
|
+
paths.forEach((path) => {
|
|
2827
|
+
if (matchedPaths.has(path)) {
|
|
2828
|
+
return;
|
|
2829
|
+
}
|
|
2830
|
+
matchedPaths.add(path);
|
|
2831
|
+
let matches = matchRoutes(routes, path) || [];
|
|
2832
|
+
matches.forEach((m, i) => {
|
|
2833
|
+
if (patchRouteMatches.get(m.route.id)) {
|
|
2834
|
+
return;
|
|
2835
|
+
}
|
|
2836
|
+
patchRouteMatches.set(m.route.id, {
|
|
2837
|
+
...m.route,
|
|
2838
|
+
parentId: matches[i - 1]?.route.id
|
|
2839
|
+
});
|
|
2840
|
+
});
|
|
2841
|
+
});
|
|
2811
2842
|
}
|
|
2812
|
-
paths.forEach((path) => {
|
|
2813
|
-
let matches = matchRoutes(routes, path) || [];
|
|
2814
|
-
matches.forEach(
|
|
2815
|
-
(m, i) => patchRouteMatches.set(m.route.id, {
|
|
2816
|
-
...m.route,
|
|
2817
|
-
parentId: matches[i - 1]?.route.id
|
|
2818
|
-
})
|
|
2819
|
-
);
|
|
2820
|
-
});
|
|
2821
2843
|
let patches = await Promise.all(
|
|
2822
|
-
[...patchRouteMatches.values()].filter((route) => !matchedRouteIds.some((id) => id === route.id)).map((route) => getManifestRoute(route
|
|
2844
|
+
[...patchRouteMatches.values()].filter((route) => !matchedRouteIds.some((id) => id === route.id)).map((route) => getManifestRoute(route))
|
|
2823
2845
|
);
|
|
2824
2846
|
return patches;
|
|
2825
2847
|
}
|
|
@@ -2831,4 +2853,4 @@ function canDecodeWithFormData(contentType) {
|
|
|
2831
2853
|
return contentType.match(/\bapplication\/x-www-form-urlencoded\b/) || contentType.match(/\bmultipart\/form-data\b/);
|
|
2832
2854
|
}
|
|
2833
2855
|
|
|
2834
|
-
export { createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession,
|
|
2856
|
+
export { createCookie, createCookieSessionStorage, createMemorySessionStorage, createSession, createSessionStorage, createStaticHandler, data, isCookie, isSession, matchRoutes, redirect, redirectDocument, replace, unstable_createContext, matchRSCServerRequest as unstable_matchRSCServerRequest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs,
|
|
1
|
+
import { aR as RouteManifest, aS as ServerRouteModule, h as MiddlewareEnabled, a9 as unstable_RouterContextProvider, i as AppLoadContext, Y as LoaderFunctionArgs, y as ActionFunctionArgs, b as RouteModules, S as StaticHandlerContext, H as HydrationState, k as DataRouteObject, l as ClientLoaderFunction, T as To, aq as NavigateOptions, s as BlockerFunction, B as Blocker, aT as SerializeFrom, r as RelativeRoutingType, L as Location, _ as ParamParseKey, m as Path, a2 as PathPattern, a0 as PathMatch, a7 as UIMatch, p as Navigation, aa as Action, $ as Params, a as Router$1, c as RouteObject, e as IndexRouteObject, X as LazyRouteFunction, N as NonIndexRouteObject, R as RouterInit, F as FutureConfig$1, I as InitialEntry, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, ar as Navigator, at as RouteMatch, W as HTMLFormMethod, U as FormEncType, aB as PageLinkDescriptor, aU as History, n as GetScrollRestorationKeyFunction, o as Fetcher, au as ClientActionFunction, g as LinksFunction, M as MetaFunction, a5 as ShouldRevalidateFunction } from './route-data-B3YkvRuy.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
|
@@ -2170,7 +2170,6 @@ type ServerRenderPayload = {
|
|
|
2170
2170
|
};
|
|
2171
2171
|
type ServerManifestPayload = {
|
|
2172
2172
|
type: "manifest";
|
|
2173
|
-
matches: RenderedRoute[];
|
|
2174
2173
|
patches: RenderedRoute[];
|
|
2175
2174
|
};
|
|
2176
2175
|
type ServerActionPayload = {
|
|
@@ -2200,9 +2199,10 @@ declare function createCallServer({ decode, encodeAction, }: {
|
|
|
2200
2199
|
decode: DecodeServerResponseFunction;
|
|
2201
2200
|
encodeAction: EncodeActionFunction;
|
|
2202
2201
|
}): (id: string, args: unknown[]) => Promise<unknown>;
|
|
2203
|
-
declare function RSCHydratedRouter({ decode, payload, }: {
|
|
2202
|
+
declare function RSCHydratedRouter({ decode, payload, routeDiscovery, }: {
|
|
2204
2203
|
decode: DecodeServerResponseFunction;
|
|
2205
2204
|
payload: ServerPayload;
|
|
2205
|
+
routeDiscovery?: "eager" | "lazy";
|
|
2206
2206
|
}): React.JSX.Element;
|
|
2207
2207
|
|
|
2208
2208
|
declare global {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-e7eb25a7b
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -7197,7 +7197,7 @@ function getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules
|
|
|
7197
7197
|
);
|
|
7198
7198
|
return async (args) => args.unstable_runClientMiddleware(dataStrategy);
|
|
7199
7199
|
}
|
|
7200
|
-
function getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, basename) {
|
|
7200
|
+
function getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode, ssr, basename, shouldAllowOptOut = () => true) {
|
|
7201
7201
|
return async (args) => {
|
|
7202
7202
|
let { request, matches, fetcherKey } = args;
|
|
7203
7203
|
let router = getRouter();
|
|
@@ -7220,7 +7220,8 @@ function getSingleFetchDataStrategyImpl(getRouter, getRouteInfo, fetchAndDecode,
|
|
|
7220
7220
|
getRouteInfo,
|
|
7221
7221
|
fetchAndDecode,
|
|
7222
7222
|
ssr,
|
|
7223
|
-
basename
|
|
7223
|
+
basename,
|
|
7224
|
+
shouldAllowOptOut
|
|
7224
7225
|
);
|
|
7225
7226
|
};
|
|
7226
7227
|
}
|
|
@@ -7272,7 +7273,7 @@ async function nonSsrStrategy(args, getRouteInfo, fetchAndDecode, basename) {
|
|
|
7272
7273
|
);
|
|
7273
7274
|
return results;
|
|
7274
7275
|
}
|
|
7275
|
-
async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, fetchAndDecode, ssr, basename) {
|
|
7276
|
+
async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, fetchAndDecode, ssr, basename, shouldAllowOptOut = () => true) {
|
|
7276
7277
|
let routesParams = /* @__PURE__ */ new Set();
|
|
7277
7278
|
let foundOptOutRoute = false;
|
|
7278
7279
|
let routeDfds = args.matches.map(() => createDeferred2());
|
|
@@ -7292,7 +7293,7 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
|
|
|
7292
7293
|
hasShouldRevalidate === true);
|
|
7293
7294
|
return;
|
|
7294
7295
|
}
|
|
7295
|
-
if (hasClientLoader) {
|
|
7296
|
+
if (shouldAllowOptOut(m) && hasClientLoader) {
|
|
7296
7297
|
if (hasLoader) {
|
|
7297
7298
|
foundOptOutRoute = true;
|
|
7298
7299
|
}
|
|
@@ -8793,7 +8794,7 @@ function mergeRefs(...refs) {
|
|
|
8793
8794
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8794
8795
|
try {
|
|
8795
8796
|
if (isBrowser) {
|
|
8796
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8797
|
+
window.__reactRouterVersion = "0.0.0-experimental-e7eb25a7b";
|
|
8797
8798
|
}
|
|
8798
8799
|
} catch (e) {
|
|
8799
8800
|
}
|
|
@@ -11619,23 +11620,11 @@ function createRouterFromPayload({
|
|
|
11619
11620
|
void 0,
|
|
11620
11621
|
false
|
|
11621
11622
|
),
|
|
11622
|
-
async patchRoutesOnNavigation({
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
let payload2 = await decode2(response.body);
|
|
11628
|
-
if (payload2.type !== "manifest") {
|
|
11629
|
-
throw new Error("Failed to patch routes on navigation");
|
|
11630
|
-
}
|
|
11631
|
-
payload2.matches.forEach(
|
|
11632
|
-
(match, i) => patch(payload2.matches[i - 1]?.id ?? null, [
|
|
11633
|
-
createRouteFromServerManifest(match)
|
|
11634
|
-
])
|
|
11635
|
-
);
|
|
11636
|
-
payload2.patches.forEach((p) => {
|
|
11637
|
-
patch(p.parentId ?? null, [createRouteFromServerManifest(p)]);
|
|
11638
|
-
});
|
|
11623
|
+
async patchRoutesOnNavigation({ path, signal }) {
|
|
11624
|
+
if (discoveredPaths2.has(path)) {
|
|
11625
|
+
return;
|
|
11626
|
+
}
|
|
11627
|
+
await fetchAndApplyManifestPatches2([path], decode2, signal);
|
|
11639
11628
|
},
|
|
11640
11629
|
// FIXME: Pass `build.ssr` and `build.basename` into this function
|
|
11641
11630
|
dataStrategy: getRSCSingleFetchDataStrategy(
|
|
@@ -11676,23 +11665,35 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, decode2) {
|
|
|
11676
11665
|
// pass map into fetchAndDecode so it can add payloads
|
|
11677
11666
|
getFetchAndDecodeViaRSC(decode2),
|
|
11678
11667
|
ssr,
|
|
11679
|
-
basename
|
|
11668
|
+
basename,
|
|
11669
|
+
// If we don't have an element, we need to hit the server loader flow
|
|
11670
|
+
// regardless of whether the client loader calls `serverLoader` or not,
|
|
11671
|
+
// otherwise we'll have nothing to render.
|
|
11672
|
+
// TODO: Do we need to account for API routes? Do we need a
|
|
11673
|
+
// `match.hasComponent` flag?
|
|
11674
|
+
(match) => match.route.element != null
|
|
11680
11675
|
);
|
|
11681
11676
|
return async (args) => args.unstable_runClientMiddleware(async () => {
|
|
11682
11677
|
let context = args.context;
|
|
11683
11678
|
context.set(renderedRoutesContext, []);
|
|
11684
11679
|
let results = await dataStrategy(args);
|
|
11685
|
-
const
|
|
11686
|
-
|
|
11687
|
-
|
|
11680
|
+
const renderedRoutesById = /* @__PURE__ */ new Map();
|
|
11681
|
+
for (const route of context.get(renderedRoutesContext)) {
|
|
11682
|
+
if (!renderedRoutesById.has(route.id)) {
|
|
11683
|
+
renderedRoutesById.set(route.id, []);
|
|
11684
|
+
}
|
|
11685
|
+
renderedRoutesById.get(route.id).push(route);
|
|
11686
|
+
}
|
|
11688
11687
|
for (const match of args.matches) {
|
|
11689
|
-
const
|
|
11690
|
-
if (
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11688
|
+
const renderedRoutes = renderedRoutesById.get(match.route.id);
|
|
11689
|
+
if (renderedRoutes) {
|
|
11690
|
+
for (const rendered of renderedRoutes) {
|
|
11691
|
+
window.__router.patchRoutes(
|
|
11692
|
+
rendered.parentId ?? null,
|
|
11693
|
+
[createRouteFromServerManifest(rendered)],
|
|
11694
|
+
true
|
|
11695
|
+
);
|
|
11696
|
+
}
|
|
11696
11697
|
}
|
|
11697
11698
|
}
|
|
11698
11699
|
return results;
|
|
@@ -11751,7 +11752,8 @@ function getFetchAndDecodeViaRSC(decode2) {
|
|
|
11751
11752
|
}
|
|
11752
11753
|
function RSCHydratedRouter({
|
|
11753
11754
|
decode: decode2,
|
|
11754
|
-
payload
|
|
11755
|
+
payload,
|
|
11756
|
+
routeDiscovery = "eager"
|
|
11755
11757
|
}) {
|
|
11756
11758
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
11757
11759
|
let router = React14.useMemo(
|
|
@@ -11765,6 +11767,49 @@ function RSCHydratedRouter({
|
|
|
11765
11767
|
window.__router.initialize();
|
|
11766
11768
|
}
|
|
11767
11769
|
}, []);
|
|
11770
|
+
React14.useEffect(() => {
|
|
11771
|
+
if (routeDiscovery === "lazy" || // @ts-expect-error - TS doesn't know about this yet
|
|
11772
|
+
window.navigator?.connection?.saveData === true) {
|
|
11773
|
+
return;
|
|
11774
|
+
}
|
|
11775
|
+
function registerElement(el) {
|
|
11776
|
+
let path = el.tagName === "FORM" ? el.getAttribute("action") : el.getAttribute("href");
|
|
11777
|
+
if (!path) {
|
|
11778
|
+
return;
|
|
11779
|
+
}
|
|
11780
|
+
let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
|
|
11781
|
+
if (!discoveredPaths2.has(pathname)) {
|
|
11782
|
+
nextPaths2.add(pathname);
|
|
11783
|
+
}
|
|
11784
|
+
}
|
|
11785
|
+
async function fetchPatches() {
|
|
11786
|
+
document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
|
|
11787
|
+
let paths = Array.from(nextPaths2.keys()).filter((path) => {
|
|
11788
|
+
if (discoveredPaths2.has(path)) {
|
|
11789
|
+
nextPaths2.delete(path);
|
|
11790
|
+
return false;
|
|
11791
|
+
}
|
|
11792
|
+
return true;
|
|
11793
|
+
});
|
|
11794
|
+
if (paths.length === 0) {
|
|
11795
|
+
return;
|
|
11796
|
+
}
|
|
11797
|
+
try {
|
|
11798
|
+
await fetchAndApplyManifestPatches2(paths, decode2);
|
|
11799
|
+
} catch (e) {
|
|
11800
|
+
console.error("Failed to fetch manifest patches", e);
|
|
11801
|
+
}
|
|
11802
|
+
}
|
|
11803
|
+
let debouncedFetchPatches = debounce2(fetchPatches, 100);
|
|
11804
|
+
fetchPatches();
|
|
11805
|
+
let observer = new MutationObserver(() => debouncedFetchPatches());
|
|
11806
|
+
observer.observe(document.documentElement, {
|
|
11807
|
+
subtree: true,
|
|
11808
|
+
childList: true,
|
|
11809
|
+
attributes: true,
|
|
11810
|
+
attributeFilter: ["data-discover", "href", "action"]
|
|
11811
|
+
});
|
|
11812
|
+
}, [routeDiscovery, decode2]);
|
|
11768
11813
|
const frameworkContext = {
|
|
11769
11814
|
future: {
|
|
11770
11815
|
// These flags have no runtime impact so can always be false. If we add
|
|
@@ -11794,7 +11839,12 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
11794
11839
|
let initialData = payload?.loaderData[match.id];
|
|
11795
11840
|
let hasInitialError = payload?.errors && match.id in payload.errors;
|
|
11796
11841
|
let initialError = payload?.errors?.[match.id];
|
|
11797
|
-
let isHydrationRequest = match.clientLoader?.hydrate === true || !match.hasLoader
|
|
11842
|
+
let isHydrationRequest = match.clientLoader?.hydrate === true || !match.hasLoader || // If we don't have an element, we need to hit the server loader flow
|
|
11843
|
+
// regardless of whether the client loader calls `serverLoader` or not,
|
|
11844
|
+
// otherwise we'll have nothing to render.
|
|
11845
|
+
// TODO: Do we need to account for API routes? Do we need a
|
|
11846
|
+
// `match.hasComponent` flag?
|
|
11847
|
+
!match.element;
|
|
11798
11848
|
let dataRoute = {
|
|
11799
11849
|
id: match.id,
|
|
11800
11850
|
element: match.element,
|
|
@@ -11876,6 +11926,47 @@ function preventInvalidServerHandlerCall2(type, routeId, hasHandler) {
|
|
|
11876
11926
|
throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
|
|
11877
11927
|
}
|
|
11878
11928
|
}
|
|
11929
|
+
var nextPaths2 = /* @__PURE__ */ new Set();
|
|
11930
|
+
var discoveredPathsMaxSize2 = 1e3;
|
|
11931
|
+
var discoveredPaths2 = /* @__PURE__ */ new Set();
|
|
11932
|
+
var URL_LIMIT2 = 7680;
|
|
11933
|
+
async function fetchAndApplyManifestPatches2(paths, decode2, signal) {
|
|
11934
|
+
let basename = (window.__router.basename ?? "").replace(/^\/|\/$/g, "");
|
|
11935
|
+
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
|
11936
|
+
paths.sort().forEach((path) => url.searchParams.append("p", path));
|
|
11937
|
+
if (url.toString().length > URL_LIMIT2) {
|
|
11938
|
+
nextPaths2.clear();
|
|
11939
|
+
return;
|
|
11940
|
+
}
|
|
11941
|
+
let response = await fetch(url, { signal });
|
|
11942
|
+
if (!response.body || response.status < 200 || response.status >= 300) {
|
|
11943
|
+
throw new Error("Unable to fetch new route matches from the server");
|
|
11944
|
+
}
|
|
11945
|
+
let payload = await decode2(response.body);
|
|
11946
|
+
if (payload.type !== "manifest") {
|
|
11947
|
+
throw new Error("Failed to patch routes");
|
|
11948
|
+
}
|
|
11949
|
+
paths.forEach((p) => addToFifoQueue2(p, discoveredPaths2));
|
|
11950
|
+
payload.patches.forEach((p) => {
|
|
11951
|
+
window.__router.patchRoutes(p.parentId ?? null, [
|
|
11952
|
+
createRouteFromServerManifest(p)
|
|
11953
|
+
]);
|
|
11954
|
+
});
|
|
11955
|
+
}
|
|
11956
|
+
function addToFifoQueue2(path, queue) {
|
|
11957
|
+
if (queue.size >= discoveredPathsMaxSize2) {
|
|
11958
|
+
let first = queue.values().next().value;
|
|
11959
|
+
queue.delete(first);
|
|
11960
|
+
}
|
|
11961
|
+
queue.add(path);
|
|
11962
|
+
}
|
|
11963
|
+
function debounce2(callback, wait) {
|
|
11964
|
+
let timeoutId;
|
|
11965
|
+
return (...args) => {
|
|
11966
|
+
window.clearTimeout(timeoutId);
|
|
11967
|
+
timeoutId = window.setTimeout(() => callback(...args), wait);
|
|
11968
|
+
};
|
|
11969
|
+
}
|
|
11879
11970
|
|
|
11880
11971
|
// lib/rsc/server.ssr.tsx
|
|
11881
11972
|
import * as React15 from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './browser-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './browser-BM9EKN98.mjs';
|
|
3
|
+
import { R as RouterInit } from './route-data-B3YkvRuy.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-e7eb25a7b
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
"use strict";
|
|
12
|
+
"use client";
|
|
12
13
|
var __create = Object.create;
|
|
13
14
|
var __defProp = Object.defineProperty;
|
|
14
15
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-e7eb25a7b
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
+
"use client";
|
|
11
12
|
import {
|
|
12
13
|
FrameworkContext,
|
|
13
14
|
RemixErrorBoundary,
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
invariant,
|
|
26
27
|
mapRouteProperties,
|
|
27
28
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VMGK4BUZ.mjs";
|
|
29
30
|
|
|
30
31
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
32
|
import * as React from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Router, b as RouteModules, D as DataStrategyFunction, L as Location, S as StaticHandlerContext, c as RouteObject,
|
|
2
|
-
export { y as ActionFunctionArgs, B as Blocker, s as BlockerFunction, au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunctionArgs, ap as DataRouteMatch, z as DataStrategyFunctionArgs, J as DataStrategyMatch, K as DataStrategyResult, Q as ErrorResponse, o as Fetcher, U as FormEncType, V as FormMethod, aE as Future, G as GetScrollPositionFunction, n as GetScrollRestorationKeyFunction, W as HTMLFormMethod, ax as HeadersArgs, ay as HeadersFunction, aC as HtmlLinkDescriptor, af as IDLE_BLOCKER, ae as IDLE_FETCHER, ad as IDLE_NAVIGATION, X as LazyRouteFunction, aD as LinkDescriptor, Y as LoaderFunctionArgs, az as MetaArgs, aA as MetaDescriptor, aq as NavigateOptions, p as Navigation, q as NavigationStates, aa as NavigationType, ar as Navigator, aB as PageLinkDescriptor, _ as ParamParseKey, $ as Params, as as PatchRoutesOnNavigationFunctionArgs, a0 as PathMatch, a1 as PathParam, a2 as PathPattern, a3 as RedirectFunction, r as RelativeRoutingType, x as RevalidationState, at as RouteMatch, w as RouterFetchOptions, R as RouterInit, v as RouterNavigateOptions, t as RouterSubscriber, a5 as ShouldRevalidateFunction, a6 as ShouldRevalidateFunctionArgs, T as To, a7 as UIMatch, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, O as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, ab as createPath, ag as data, ah as generatePath, ai as isRouteErrorResponse, aj as matchPath, ak as matchRoutes, ac as parsePath, al as redirect, am as redirectDocument, an as replace, ao as resolvePath, Z as unstable_MiddlewareFunction, a4 as unstable_RouterContext, a9 as unstable_RouterContextProvider, aF as unstable_SerializesTo, a8 as unstable_createContext } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, a as RouteComponentType, H as HydrateFallbackType, b as ErrorBoundaryType, S as ServerBuild, c as ServerPayload } from './browser-
|
|
4
|
-
export { i as Await, d as AwaitProps, ag as BrowserRouter, a0 as BrowserRouterProps, a1 as DOMRouterOpts,
|
|
1
|
+
import { a as Router, b as RouteModules, D as DataStrategyFunction, L as Location, S as StaticHandlerContext, c as RouteObject, C as CreateStaticHandlerOptions$1, d as StaticHandler, F as FutureConfig, I as InitialEntry, H as HydrationState, e as IndexRouteObject, f as LoaderFunction, A as ActionFunction, M as MetaFunction, g as LinksFunction, N as NonIndexRouteObject, u as unstable_InitialContext, h as MiddlewareEnabled, i as AppLoadContext, E as Equal, j as RouterState, P as PatchRoutesOnNavigationFunction, k as DataRouteObject, l as ClientLoaderFunction, m as Path } from './route-data-B3YkvRuy.mjs';
|
|
2
|
+
export { y as ActionFunctionArgs, B as Blocker, s as BlockerFunction, au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunctionArgs, ap as DataRouteMatch, z as DataStrategyFunctionArgs, J as DataStrategyMatch, K as DataStrategyResult, Q as ErrorResponse, o as Fetcher, U as FormEncType, V as FormMethod, aE as Future, G as GetScrollPositionFunction, n as GetScrollRestorationKeyFunction, W as HTMLFormMethod, ax as HeadersArgs, ay as HeadersFunction, aC as HtmlLinkDescriptor, af as IDLE_BLOCKER, ae as IDLE_FETCHER, ad as IDLE_NAVIGATION, X as LazyRouteFunction, aD as LinkDescriptor, Y as LoaderFunctionArgs, az as MetaArgs, aA as MetaDescriptor, aq as NavigateOptions, p as Navigation, q as NavigationStates, aa as NavigationType, ar as Navigator, aB as PageLinkDescriptor, _ as ParamParseKey, $ as Params, as as PatchRoutesOnNavigationFunctionArgs, a0 as PathMatch, a1 as PathParam, a2 as PathPattern, a3 as RedirectFunction, r as RelativeRoutingType, x as RevalidationState, at as RouteMatch, w as RouterFetchOptions, R as RouterInit, v as RouterNavigateOptions, t as RouterSubscriber, a5 as ShouldRevalidateFunction, a6 as ShouldRevalidateFunctionArgs, T as To, a7 as UIMatch, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, O as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, ab as createPath, ag as data, ah as generatePath, ai as isRouteErrorResponse, aj as matchPath, ak as matchRoutes, ac as parsePath, al as redirect, am as redirectDocument, an as replace, ao as resolvePath, Z as unstable_MiddlewareFunction, a4 as unstable_RouterContext, a9 as unstable_RouterContextProvider, aF as unstable_SerializesTo, a8 as unstable_createContext } from './route-data-B3YkvRuy.mjs';
|
|
3
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, a as RouteComponentType, H as HydrateFallbackType, b as ErrorBoundaryType, S as ServerBuild, c as ServerPayload } from './browser-BM9EKN98.mjs';
|
|
4
|
+
export { i as Await, d as AwaitProps, ag as BrowserRouter, a0 as BrowserRouterProps, a1 as DOMRouterOpts, a7 as FetcherFormProps, ac as FetcherSubmitFunction, aw as FetcherSubmitOptions, ad as FetcherWithComponents, al as Form, a8 as FormProps, aH as HandleDataRequestFunction, aI as HandleDocumentRequestFunction, aJ as HandleErrorFunction, ah as HashRouter, a2 as HashRouterProps, a3 as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, ai as Link, a4 as LinkProps, aD as Links, j as MemoryRouter, M as MemoryRouterOpts, e as MemoryRouterProps, aC as Meta, ak as NavLink, a5 as NavLinkProps, a6 as NavLinkRenderProps, k as Navigate, u as NavigateFunction, N as NavigateProps, l as Outlet, O as OutletProps, ax as ParamKeyValuePair, P as PathRouteProps, aF as PrefetchPageLinks, m as Route, f as RouteProps, n as Router, g as RouterProps, o as RouterProvider, R as RouterProviderProps, p as Routes, h as RoutesProps, aE as Scripts, aG as ScriptsProps, am as ScrollRestoration, a9 as ScrollRestorationProps, aK as ServerEntryModule, aa as SetURLSearchParams, ab as SubmitFunction, ay as SubmitOptions, aA as SubmitTarget, aV as UNSAFE_FrameworkContext, aW as UNSAFE_createClientRoutes, aX as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aQ as UNSAFE_hydrationRouteProperties, aR as UNSAFE_mapRouteProperties, aY as UNSAFE_shouldHydrateRouteLoader, aZ as UNSAFE_useScrollRestoration, aS as UNSAFE_withComponentProps, aU as UNSAFE_withErrorBoundaryProps, aT as UNSAFE_withHydrateFallbackProps, az as URLSearchParamsInit, ae as createBrowserRouter, af as createHashRouter, q as createMemoryRouter, r as createRoutesFromChildren, s as createRoutesFromElements, aB as createSearchParams, t as renderMatches, aL as unstable_DecodeServerResponseFunction, aM as unstable_EncodeActionFunction, aj as unstable_HistoryRouter, aO as unstable_RSCHydratedRouter, aN as unstable_createCallServer, aP as unstable_getServerStream, au as unstable_usePrompt, w as useActionData, x as useAsyncError, y as useAsyncValue, at as useBeforeUnload, v as useBlocker, ar as useFetcher, as as useFetchers, aq as useFormAction, z as useHref, B as useInRouterContext, an as useLinkClickHandler, C as useLoaderData, D as useLocation, G as useMatch, J as useMatches, K as useNavigate, Q as useNavigation, T as useNavigationType, U as useOutlet, V as useOutletContext, W as useParams, X as useResolvedPath, Y as useRevalidator, Z as useRouteError, _ as useRouteLoaderData, $ as useRoutes, ao as useSearchParams, ap as useSubmit, av as useViewTransitionState } from './browser-BM9EKN98.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -430,4 +430,4 @@ declare function getHydrationData(state: {
|
|
|
430
430
|
hasHydrateFallback: boolean;
|
|
431
431
|
}, location: Path, basename: string | undefined, isSpaMode: boolean): HydrationState;
|
|
432
432
|
|
|
433
|
-
export { ActionFunction, AppLoadContext, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, NonIndexRouteObject, PatchRoutesOnNavigationFunction, Path,
|
|
433
|
+
export { ActionFunction, AppLoadContext, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, NonIndexRouteObject, PatchRoutesOnNavigationFunction, Path, type RequestHandler, RouteObject, RouterState, type RoutesTestStubProps, ServerBuild, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, AssetsManifest as UNSAFE_AssetsManifest, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, unstable_InitialContext, RSCStaticRouter as unstable_RSCStaticRouter, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as
|
|
2
|
-
export { aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, az as DataRouteMatch, a9 as DataStrategyFunctionArgs, aa as DataStrategyMatch, ab as DataStrategyResult, ad as ErrorResponse, ae as FormMethod, aJ as Future, a3 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ap as IDLE_BLOCKER, ao as IDLE_FETCHER, an as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a4 as NavigationStates, aA as PatchRoutesOnNavigationFunctionArgs, ag as PathParam, ah as RedirectFunction, aL as Register, a8 as RevalidationState, a7 as RouterFetchOptions, a6 as RouterNavigateOptions, a5 as RouterSubscriber, aj as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, ac as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, al as createPath, aq as data, ar as generatePath, as as isRouteErrorResponse, at as matchPath, au as matchRoutes, am as parsePath, av as redirect, aw as redirectDocument, ax as replace, ay as resolvePath, af as unstable_MiddlewareFunction, ai as unstable_RouterContext, aK as unstable_SerializesTo, ak as unstable_createContext } from './register-
|
|
1
|
+
import { R as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, A as AppLoadContext, L as LoaderFunctionArgs, a as ActionFunctionArgs, b as RouteModules, c as StaticHandlerContext, H as HydrationState, D as DataRouteObject, C as ClientLoaderFunction, d as Router$1, e as DataStrategyFunction, T as To, N as NavigateOptions, B as BlockerFunction, f as Blocker, g as SerializeFrom, h as RelativeRoutingType, i as Location, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, U as UIMatch, m as Navigation, n as Action, o as Params, p as RouteObject, I as IndexRouteObject, q as LazyRouteFunction, r as NonIndexRouteObject, s as RouterInit, F as FutureConfig$1, t as InitialEntry, v as PatchRoutesOnNavigationFunction, w as Navigator, x as RouteMatch, y as HTMLFormMethod, z as FormEncType, E as PageLinkDescriptor, G as History, J as GetScrollRestorationKeyFunction, K as Fetcher, O as CreateStaticHandlerOptions$1, Q as StaticHandler, V as LoaderFunction, W as ActionFunction, X as MetaFunction, Y as LinksFunction, Z as unstable_InitialContext, _ as Pages, $ as Equal, a0 as ClientActionFunction, a1 as ShouldRevalidateFunction, a2 as RouterState } from './register-B0EYMBux.js';
|
|
2
|
+
export { aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, az as DataRouteMatch, a9 as DataStrategyFunctionArgs, aa as DataStrategyMatch, ab as DataStrategyResult, ad as ErrorResponse, ae as FormMethod, aJ as Future, a3 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ap as IDLE_BLOCKER, ao as IDLE_FETCHER, an as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a4 as NavigationStates, aA as PatchRoutesOnNavigationFunctionArgs, ag as PathParam, ah as RedirectFunction, aL as Register, a8 as RevalidationState, a7 as RouterFetchOptions, a6 as RouterNavigateOptions, a5 as RouterSubscriber, aj as ShouldRevalidateFunctionArgs, aQ as UNSAFE_DataRouterContext, aR as UNSAFE_DataRouterStateContext, ac as UNSAFE_DataWithResponseInit, aP as UNSAFE_ErrorResponseImpl, aS as UNSAFE_FetchersContext, aT as UNSAFE_LocationContext, aU as UNSAFE_NavigationContext, aV as UNSAFE_RouteContext, aW as UNSAFE_ViewTransitionContext, aM as UNSAFE_createBrowserHistory, aO as UNSAFE_createRouter, aN as UNSAFE_invariant, al as createPath, aq as data, ar as generatePath, as as isRouteErrorResponse, at as matchPath, au as matchRoutes, am as parsePath, av as redirect, aw as redirectDocument, ax as replace, ay as resolvePath, af as unstable_MiddlewareFunction, ai as unstable_RouterContext, aK as unstable_SerializesTo, ak as unstable_createContext } from './register-B0EYMBux.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -2548,7 +2548,6 @@ type ServerRenderPayload = {
|
|
|
2548
2548
|
};
|
|
2549
2549
|
type ServerManifestPayload = {
|
|
2550
2550
|
type: "manifest";
|
|
2551
|
-
matches: RenderedRoute[];
|
|
2552
2551
|
patches: RenderedRoute[];
|
|
2553
2552
|
};
|
|
2554
2553
|
type ServerActionPayload = {
|
|
@@ -2578,9 +2577,10 @@ declare function createCallServer({ decode, encodeAction, }: {
|
|
|
2578
2577
|
decode: DecodeServerResponseFunction;
|
|
2579
2578
|
encodeAction: EncodeActionFunction;
|
|
2580
2579
|
}): (id: string, args: unknown[]) => Promise<unknown>;
|
|
2581
|
-
declare function RSCHydratedRouter({ decode, payload, }: {
|
|
2580
|
+
declare function RSCHydratedRouter({ decode, payload, routeDiscovery, }: {
|
|
2582
2581
|
decode: DecodeServerResponseFunction;
|
|
2583
2582
|
payload: ServerPayload;
|
|
2583
|
+
routeDiscovery?: "eager" | "lazy";
|
|
2584
2584
|
}): React.JSX.Element;
|
|
2585
2585
|
|
|
2586
2586
|
declare function routeRSCServerRequest({ request, callServer, decode, renderHTML, hydrate, }: {
|
|
@@ -2637,4 +2637,4 @@ declare function getHydrationData(state: {
|
|
|
2637
2637
|
hasHydrateFallback: boolean;
|
|
2638
2638
|
}, location: Path, basename: string | undefined, isSpaMode: boolean): HydrationState;
|
|
2639
2639
|
|
|
2640
|
-
export { ActionFunction, ActionFunctionArgs, AppLoadContext, Await, type AwaitProps, Blocker, BlockerFunction, BrowserRouter, type BrowserRouterProps, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, DataRouteObject, Router$1 as DataRouter, DataStrategyFunction, type
|
|
2640
|
+
export { ActionFunction, ActionFunctionArgs, AppLoadContext, Await, type AwaitProps, Blocker, BlockerFunction, BrowserRouter, type BrowserRouterProps, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, DataRouteObject, Router$1 as DataRouter, DataStrategyFunction, type EntryContext, Fetcher, type FetcherFormProps, type FetcherSubmitFunction, type FetcherSubmitOptions, type FetcherWithComponents, type FlashSessionData, Form, FormEncType, type FormProps, GetScrollRestorationKeyFunction, HTMLFormMethod, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HashRouter, type HashRouterProps, type HistoryRouterProps, HydrationState, IndexRouteObject, type IndexRouteProps, InitialEntry, type IsCookieFunction, type IsSessionFunction, type LayoutRouteProps, LazyRouteFunction, Link, type LinkProps, Links, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouter, type MemoryRouterOpts, type MemoryRouterProps, Meta, MetaFunction, NavLink, type NavLinkProps, type NavLinkRenderProps, Navigate, type NavigateFunction, NavigateOptions, type NavigateProps, Navigation, Action as NavigationType, Navigator, NonIndexRouteObject, Outlet, type OutletProps, PageLinkDescriptor, type ParamKeyValuePair, ParamParseKey, Params, PatchRoutesOnNavigationFunction, Path, PathMatch, PathPattern, type PathRouteProps, PrefetchPageLinks, RelativeRoutingType, type RequestHandler, Route, RouteMatch, RouteObject, type RouteProps, Router, RouterInit, type RouterProps, RouterProvider, type RouterProviderProps, RouterState, Routes, type RoutesProps, type RoutesTestStubProps, Scripts, type ScriptsProps, ScrollRestoration, type ScrollRestorationProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, type SetURLSearchParams, ShouldRevalidateFunction, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, type SubmitFunction, type SubmitOptions, type SubmitTarget, To, UIMatch, type AssetsManifest as UNSAFE_AssetsManifest, FrameworkContext as UNSAFE_FrameworkContext, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, 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, type URLSearchParamsInit, createBrowserRouter, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, renderMatches, type DecodeServerResponseFunction as unstable_DecodeServerResponseFunction, type EncodeActionFunction as unstable_EncodeActionFunction, HistoryRouter as unstable_HistoryRouter, unstable_InitialContext, RSCHydratedRouter as unstable_RSCHydratedRouter, RSCStaticRouter as unstable_RSCStaticRouter, unstable_RouterContextProvider, createCallServer as unstable_createCallServer, getServerStream as unstable_getServerStream, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
|