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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update `Route.MetaArgs` to reflect that `data` can be potentially `undefined` ([#13563](https://github.com/remix-run/react-router/pull/13563))
|
|
8
|
+
|
|
9
|
+
This is primarily for cases where a route `loader` threw an error to it's own `ErrorBoundary`. but it also arises in the case of a 404 which renders the root `ErrorBoundary`/`meta` but the root loader did not run because not routes matched.
|
|
10
|
+
|
|
11
|
+
- Partially revert optimization added in `7.1.4` to reduce calls to `matchRoutes` because it surfaced other issues ([#13562](https://github.com/remix-run/react-router/pull/13562))
|
|
12
|
+
|
|
13
|
+
- Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))
|
|
14
|
+
|
|
15
|
+
For example, `routes/route.tsx` is used at 4 different paths here:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { type RouteConfig, route } from "@react-router/dev/routes";
|
|
19
|
+
export default [
|
|
20
|
+
route("base/:base", "routes/base.tsx", [
|
|
21
|
+
route("home/:home", "routes/route.tsx", { id: "home" }),
|
|
22
|
+
route("changelog/:changelog", "routes/route.tsx", { id: "changelog" }),
|
|
23
|
+
route("splat/*", "routes/route.tsx", { id: "splat" }),
|
|
24
|
+
]),
|
|
25
|
+
route("other/:other", "routes/route.tsx", { id: "other" }),
|
|
26
|
+
] satisfies RouteConfig;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Previously, typegen would arbitrarily pick one of these paths to be the "winner" and generate types for the route module based on that path.
|
|
30
|
+
Now, typegen creates unions as necessary for alternate paths for the same route file.
|
|
31
|
+
|
|
32
|
+
- Better types for `params` ([#13543](https://github.com/remix-run/react-router/pull/13543))
|
|
33
|
+
|
|
34
|
+
For example:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
// routes.ts
|
|
38
|
+
import { type RouteConfig, route } from "@react-router/dev/routes";
|
|
39
|
+
|
|
40
|
+
export default [
|
|
41
|
+
route("parent/:p", "routes/parent.tsx", [
|
|
42
|
+
route("layout/:l", "routes/layout.tsx", [
|
|
43
|
+
route("child1/:c1a/:c1b", "routes/child1.tsx"),
|
|
44
|
+
route("child2/:c2a/:c2b", "routes/child2.tsx"),
|
|
45
|
+
]),
|
|
46
|
+
]),
|
|
47
|
+
] satisfies RouteConfig;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Previously, `params` for the `routes/layout.tsx` route were calculated as `{ p: string, l: string }`.
|
|
51
|
+
This incorrectly ignores params that could come from child routes.
|
|
52
|
+
If visiting `/parent/1/layout/2/child1/3/4`, the actual params passed to `routes/layout.tsx` will have a type of `{ p: string, l: string, c1a: string, c1b: string }`.
|
|
53
|
+
|
|
54
|
+
Now, `params` are aware of child routes and autocompletion will include child params as optionals:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
params.|
|
|
58
|
+
// ^ cursor is here and you ask for autocompletion
|
|
59
|
+
// p: string
|
|
60
|
+
// l: string
|
|
61
|
+
// c1a?: string
|
|
62
|
+
// c1b?: string
|
|
63
|
+
// c2a?: string
|
|
64
|
+
// c2b?: string
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
You can also narrow the types for `params` as it is implemented as a normalized union of params for each page that includes `routes/layout.tsx`:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
if (typeof params.c1a === 'string') {
|
|
71
|
+
params.|
|
|
72
|
+
// ^ cursor is here and you ask for autocompletion
|
|
73
|
+
// p: string
|
|
74
|
+
// l: string
|
|
75
|
+
// c1a: string
|
|
76
|
+
// c1b: string
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
***
|
|
81
|
+
|
|
82
|
+
UNSTABLE: renamed internal `react-router/route-module` export to `react-router/internal`
|
|
83
|
+
UNSTABLE: removed `Info` export from generated `+types/*` files
|
|
84
|
+
|
|
85
|
+
- Avoid initial fetcher execution 404 error when Lazy Route Discovery is interrupted by a navigation ([#13564](https://github.com/remix-run/react-router/pull/13564))
|
|
86
|
+
|
|
87
|
+
- href replaces splats `*` ([#13593](https://github.com/remix-run/react-router/pull/13593))
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
const a = href("/products/*", { "*": "/1/edit" });
|
|
91
|
+
// -> /products/1/edit
|
|
92
|
+
```
|
|
93
|
+
|
|
3
94
|
## 7.6.0
|
|
4
95
|
|
|
5
96
|
### Minor Changes
|
|
@@ -406,8 +497,6 @@
|
|
|
406
497
|
|
|
407
498
|
For library and framework authors using `unstable_SerializesTo`, you may need to add `as unknown` casts before casting to `unstable_SerializesTo`.
|
|
408
499
|
|
|
409
|
-
- \[REMOVE] Remove middleware depth logic and always call middlware for all matches ([#13172](https://github.com/remix-run/react-router/pull/13172))
|
|
410
|
-
|
|
411
500
|
- Fix single fetch `_root.data` requests when a `basename` is used ([#12898](https://github.com/remix-run/react-router/pull/12898))
|
|
412
501
|
|
|
413
502
|
- Add `context` support to client side data routers (unstable) ([#12941](https://github.com/remix-run/react-router/pull/12941))
|
|
@@ -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-SHQJZRZ7.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 };
|