react-router 7.4.0-pre.0 → 7.4.1-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -5
- package/dist/development/{chunk-RYZWEUVP.mjs → chunk-EC6TQTU3.mjs} +108 -37
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +93 -28
- package/dist/development/dom-export.mjs +2 -2
- package/dist/{production/fog-of-war-BQyvjjKg.d.mts → development/fog-of-war-BaM-ohjc.d.ts} +3 -1
- package/dist/development/{fog-of-war-CGNKxM4z.d.ts → fog-of-war-BjgPfDmv.d.mts} +3 -1
- package/dist/development/index.d.mts +4 -4
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +108 -37
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/route-module.d.mts +3 -3
- package/dist/development/lib/types/route-module.d.ts +3 -3
- package/dist/development/lib/types/route-module.js +1 -1
- package/dist/development/lib/types/route-module.mjs +1 -1
- package/dist/development/{route-data-CGHGzi13.d.ts → route-data-BL8ToWby.d.mts} +9 -3
- package/dist/{production/route-data-CGHGzi13.d.mts → development/route-data-BL8ToWby.d.ts} +9 -3
- package/dist/production/{chunk-RRIVZUCN.mjs → chunk-WRG2THOC.mjs} +108 -37
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +93 -28
- package/dist/production/dom-export.mjs +2 -2
- package/dist/{development/fog-of-war-BQyvjjKg.d.mts → production/fog-of-war-BaM-ohjc.d.ts} +3 -1
- package/dist/production/{fog-of-war-CGNKxM4z.d.ts → fog-of-war-BjgPfDmv.d.mts} +3 -1
- package/dist/production/index.d.mts +4 -4
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +108 -37
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/route-module.d.mts +3 -3
- package/dist/production/lib/types/route-module.d.ts +3 -3
- package/dist/production/lib/types/route-module.js +1 -1
- package/dist/production/lib/types/route-module.mjs +1 -1
- package/dist/production/{route-data-CGHGzi13.d.ts → route-data-BL8ToWby.d.mts} +9 -3
- package/dist/{development/route-data-CGHGzi13.d.mts → production/route-data-BL8ToWby.d.ts} +9 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
-
## 7.4.
|
|
3
|
+
## 7.4.1-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix types on `unstable_MiddlewareFunction` to avoid type errors when a middleware doesn't return a value ([#13311](https://github.com/remix-run/react-router/pull/13311))
|
|
8
|
+
- Dedupe calls to `route.lazy` functions ([#13260](https://github.com/remix-run/react-router/pull/13260))
|
|
9
|
+
- Add support for `route.unstable_lazyMiddleware` function to allow lazy loading of middleware logic. ([#13210](https://github.com/remix-run/react-router/pull/13210))
|
|
10
|
+
|
|
11
|
+
**Breaking change for `unstable_middleware` consumers**
|
|
12
|
+
|
|
13
|
+
The `route.unstable_middleware` property is no longer supported in the return value from `route.lazy`. If you want to lazily load middleware, you must use `route.unstable_lazyMiddleware`.
|
|
14
|
+
|
|
15
|
+
## 7.4.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
6
18
|
|
|
7
|
-
- - UNSTABLE(BREAKING): If a middleware throws an error, ensure we only bubble the error itself via `next()` and are no longer leaking the `MiddlewareError` implementation detail ([#13180](https://github.com/remix-run/react-router/pull/13180))
|
|
8
|
-
- Fix `RequestHandler` `loadContext` parameter type when middleware is enabled ([#13204](https://github.com/remix-run/react-router/pull/13204))
|
|
9
19
|
- Fix root loader data on initial load redirects in SPA mode ([#13222](https://github.com/remix-run/react-router/pull/13222))
|
|
10
20
|
- Load ancestor pathless/index routes in lazy route discovery for upwards non-eager-discoery routing ([#13203](https://github.com/remix-run/react-router/pull/13203))
|
|
11
21
|
- Fix `shouldRevalidate` behavior for `clientLoader`-only routes in `ssr:true` apps ([#13221](https://github.com/remix-run/react-router/pull/13221))
|
|
12
|
-
-
|
|
22
|
+
- UNSTABLE: Fix `RequestHandler` `loadContext` parameter type when middleware is enabled ([#13204](https://github.com/remix-run/react-router/pull/13204))
|
|
23
|
+
- UNSTABLE: Update `Route.unstable_MiddlewareFunction` to have a return value of `Response | undefined` instead of `Response | void` becaue you should not return anything if you aren't returning the `Response` ([#13199](https://github.com/remix-run/react-router/pull/13199))
|
|
24
|
+
- UNSTABLE(BREAKING): If a middleware throws an error, ensure we only bubble the error itself via `next()` and are no longer leaking the `MiddlewareError` implementation detail ([#13180](https://github.com/remix-run/react-router/pull/13180))
|
|
13
25
|
|
|
14
26
|
## 7.3.0
|
|
15
27
|
|
|
@@ -431,7 +443,7 @@ _No changes_
|
|
|
431
443
|
- Collapse `@remix-run/server-runtime` into `react-router`
|
|
432
444
|
- Collapse `@remix-run/testing` into `react-router`
|
|
433
445
|
|
|
434
|
-
- Remove
|
|
446
|
+
- Remove single fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
|
|
435
447
|
|
|
436
448
|
- Drop support for Node 16, React Router SSR now requires Node 18 or higher ([#11391](https://github.com/remix-run/react-router/pull/11391))
|
|
437
449
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.4.
|
|
2
|
+
* react-router v7.4.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -383,12 +383,14 @@ var unstable_RouterContextProvider = class {
|
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
_map = new WeakMap();
|
|
386
|
-
var
|
|
386
|
+
var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
|
|
387
387
|
"lazy",
|
|
388
388
|
"caseSensitive",
|
|
389
389
|
"path",
|
|
390
390
|
"id",
|
|
391
391
|
"index",
|
|
392
|
+
"unstable_middleware",
|
|
393
|
+
"unstable_lazyMiddleware",
|
|
392
394
|
"children"
|
|
393
395
|
]);
|
|
394
396
|
function isIndexRoute(route) {
|
|
@@ -2207,8 +2209,7 @@ function createRouter(init) {
|
|
|
2207
2209
|
fetcherKey,
|
|
2208
2210
|
manifest,
|
|
2209
2211
|
mapRouteProperties2,
|
|
2210
|
-
scopedContext
|
|
2211
|
-
future.unstable_middleware
|
|
2212
|
+
scopedContext
|
|
2212
2213
|
);
|
|
2213
2214
|
} catch (e) {
|
|
2214
2215
|
matchesToLoad.forEach((m) => {
|
|
@@ -2681,12 +2682,15 @@ function createStaticHandler(routes, opts) {
|
|
|
2681
2682
|
};
|
|
2682
2683
|
return respond ? respond(staticContext) : staticContext;
|
|
2683
2684
|
}
|
|
2684
|
-
if (respond && matches.some(
|
|
2685
|
+
if (respond && matches.some(
|
|
2686
|
+
(m) => m.route.unstable_middleware || m.route.unstable_lazyMiddleware
|
|
2687
|
+
)) {
|
|
2685
2688
|
invariant(
|
|
2686
2689
|
requestContext instanceof unstable_RouterContextProvider,
|
|
2687
2690
|
"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"
|
|
2688
2691
|
);
|
|
2689
2692
|
try {
|
|
2693
|
+
await loadLazyMiddlewareForMatches(matches, manifest);
|
|
2690
2694
|
let renderedStaticContext;
|
|
2691
2695
|
let response = await runMiddlewarePipeline(
|
|
2692
2696
|
{
|
|
@@ -2802,11 +2806,14 @@ function createStaticHandler(routes, opts) {
|
|
|
2802
2806
|
} else if (!match) {
|
|
2803
2807
|
throw getInternalRouterError(404, { pathname: location.pathname });
|
|
2804
2808
|
}
|
|
2805
|
-
if (respond && matches.some(
|
|
2809
|
+
if (respond && matches.some(
|
|
2810
|
+
(m) => m.route.unstable_middleware || m.route.unstable_lazyMiddleware
|
|
2811
|
+
)) {
|
|
2806
2812
|
invariant(
|
|
2807
2813
|
requestContext instanceof unstable_RouterContextProvider,
|
|
2808
2814
|
"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"
|
|
2809
2815
|
);
|
|
2816
|
+
await loadLazyMiddlewareForMatches(matches, manifest);
|
|
2810
2817
|
let response = await runMiddlewarePipeline(
|
|
2811
2818
|
{
|
|
2812
2819
|
request,
|
|
@@ -3123,9 +3130,7 @@ function createStaticHandler(routes, opts) {
|
|
|
3123
3130
|
null,
|
|
3124
3131
|
manifest,
|
|
3125
3132
|
mapRouteProperties2,
|
|
3126
|
-
requestContext
|
|
3127
|
-
false
|
|
3128
|
-
// middleware not done via dataStrategy in the static handler
|
|
3133
|
+
requestContext
|
|
3129
3134
|
);
|
|
3130
3135
|
let dataResults = {};
|
|
3131
3136
|
await Promise.all(
|
|
@@ -3526,38 +3531,80 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
3526
3531
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
3527
3532
|
);
|
|
3528
3533
|
}
|
|
3534
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
3529
3535
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
3536
|
+
let routeToUpdate = manifest[route.id];
|
|
3537
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
3530
3538
|
if (!route.lazy) {
|
|
3531
3539
|
return;
|
|
3532
3540
|
}
|
|
3533
|
-
let
|
|
3534
|
-
if (
|
|
3541
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
3542
|
+
if (cachedPromise) {
|
|
3543
|
+
await cachedPromise;
|
|
3544
|
+
return;
|
|
3545
|
+
}
|
|
3546
|
+
let lazyRoutePromise = route.lazy().then((lazyRoute) => {
|
|
3547
|
+
let routeUpdates = {};
|
|
3548
|
+
for (let lazyRouteProperty in lazyRoute) {
|
|
3549
|
+
let staticRouteValue = routeToUpdate[lazyRouteProperty];
|
|
3550
|
+
let isPropertyStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based
|
|
3551
|
+
// on the route updates
|
|
3552
|
+
lazyRouteProperty !== "hasErrorBoundary";
|
|
3553
|
+
warning(
|
|
3554
|
+
!isPropertyStaticallyDefined,
|
|
3555
|
+
`Route "${routeToUpdate.id}" has a static property "${lazyRouteProperty}" defined but its lazy function is also returning a value for this property. The lazy route property "${lazyRouteProperty}" will be ignored.`
|
|
3556
|
+
);
|
|
3557
|
+
warning(
|
|
3558
|
+
!unsupportedLazyRouteFunctionKeys.has(
|
|
3559
|
+
lazyRouteProperty
|
|
3560
|
+
),
|
|
3561
|
+
"Route property " + lazyRouteProperty + " is not a supported property to be returned from a lazy route function. This property will be ignored."
|
|
3562
|
+
);
|
|
3563
|
+
if (!isPropertyStaticallyDefined && !unsupportedLazyRouteFunctionKeys.has(
|
|
3564
|
+
lazyRouteProperty
|
|
3565
|
+
)) {
|
|
3566
|
+
routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
|
|
3567
|
+
}
|
|
3568
|
+
}
|
|
3569
|
+
Object.assign(routeToUpdate, routeUpdates);
|
|
3570
|
+
Object.assign(routeToUpdate, {
|
|
3571
|
+
// To keep things framework agnostic, we use the provided `mapRouteProperties`
|
|
3572
|
+
// function to set the framework-aware properties (`element`/`hasErrorBoundary`)
|
|
3573
|
+
// since the logic will differ between frameworks.
|
|
3574
|
+
...mapRouteProperties2(routeToUpdate),
|
|
3575
|
+
lazy: void 0
|
|
3576
|
+
});
|
|
3577
|
+
});
|
|
3578
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
3579
|
+
await lazyRoutePromise;
|
|
3580
|
+
}
|
|
3581
|
+
async function loadLazyMiddleware(route, manifest) {
|
|
3582
|
+
if (!route.unstable_lazyMiddleware) {
|
|
3535
3583
|
return;
|
|
3536
3584
|
}
|
|
3537
3585
|
let routeToUpdate = manifest[route.id];
|
|
3538
3586
|
invariant(routeToUpdate, "No route found in manifest");
|
|
3539
|
-
|
|
3540
|
-
for (let lazyRouteProperty in lazyRoute) {
|
|
3541
|
-
let staticRouteValue = routeToUpdate[lazyRouteProperty];
|
|
3542
|
-
let isPropertyStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based
|
|
3543
|
-
// on the route updates
|
|
3544
|
-
lazyRouteProperty !== "hasErrorBoundary";
|
|
3587
|
+
if (routeToUpdate.unstable_middleware) {
|
|
3545
3588
|
warning(
|
|
3546
|
-
|
|
3547
|
-
`Route "${routeToUpdate.id}" has a static property "
|
|
3589
|
+
false,
|
|
3590
|
+
`Route "${routeToUpdate.id}" has a static property "unstable_middleware" defined. The "unstable_lazyMiddleware" function will be ignored.`
|
|
3548
3591
|
);
|
|
3549
|
-
|
|
3550
|
-
|
|
3592
|
+
} else {
|
|
3593
|
+
let middleware = await route.unstable_lazyMiddleware();
|
|
3594
|
+
if (!route.unstable_lazyMiddleware) {
|
|
3595
|
+
return;
|
|
3596
|
+
}
|
|
3597
|
+
if (!routeToUpdate.unstable_middleware) {
|
|
3598
|
+
routeToUpdate.unstable_middleware = middleware;
|
|
3551
3599
|
}
|
|
3552
3600
|
}
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
});
|
|
3601
|
+
routeToUpdate.unstable_lazyMiddleware = void 0;
|
|
3602
|
+
}
|
|
3603
|
+
function loadLazyMiddlewareForMatches(matches, manifest) {
|
|
3604
|
+
let promises = matches.map(
|
|
3605
|
+
(m) => m.route.unstable_lazyMiddleware ? loadLazyMiddleware(m.route, manifest) : void 0
|
|
3606
|
+
).filter(Boolean);
|
|
3607
|
+
return promises.length > 0 ? Promise.all(promises) : void 0;
|
|
3561
3608
|
}
|
|
3562
3609
|
async function defaultDataStrategy(args) {
|
|
3563
3610
|
let matchesToLoad = args.matches.filter((m) => m.shouldLoad);
|
|
@@ -3673,12 +3720,13 @@ async function callRouteMiddleware(args, middlewares, propagateResult, middlewar
|
|
|
3673
3720
|
throw error;
|
|
3674
3721
|
}
|
|
3675
3722
|
}
|
|
3676
|
-
async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties2, scopedContext
|
|
3723
|
+
async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties2, scopedContext) {
|
|
3724
|
+
let loadMiddlewarePromise = loadLazyMiddlewareForMatches(matches, manifest);
|
|
3677
3725
|
let loadRouteDefinitionsPromises = matches.map(
|
|
3678
3726
|
(m) => m.route.lazy ? loadLazyRouteModule(m.route, mapRouteProperties2, manifest) : void 0
|
|
3679
3727
|
);
|
|
3680
|
-
if (
|
|
3681
|
-
await
|
|
3728
|
+
if (loadMiddlewarePromise) {
|
|
3729
|
+
await loadMiddlewarePromise;
|
|
3682
3730
|
}
|
|
3683
3731
|
let dsMatches = matches.map((match, i) => {
|
|
3684
3732
|
let loadRoutePromise = loadRouteDefinitionsPromises[i];
|
|
@@ -6740,6 +6788,21 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
6740
6788
|
});
|
|
6741
6789
|
};
|
|
6742
6790
|
}
|
|
6791
|
+
if (route.hasClientMiddleware) {
|
|
6792
|
+
dataRoute.unstable_lazyMiddleware = async () => {
|
|
6793
|
+
invariant2(route);
|
|
6794
|
+
let clientMiddlewareModule = await import(
|
|
6795
|
+
/* @vite-ignore */
|
|
6796
|
+
/* webpackIgnore: true */
|
|
6797
|
+
route.clientMiddlewareModule || route.module
|
|
6798
|
+
);
|
|
6799
|
+
invariant2(
|
|
6800
|
+
clientMiddlewareModule?.unstable_clientMiddleware,
|
|
6801
|
+
"No `unstable_clientMiddleware` export in chunk"
|
|
6802
|
+
);
|
|
6803
|
+
return clientMiddlewareModule.unstable_clientMiddleware;
|
|
6804
|
+
};
|
|
6805
|
+
}
|
|
6743
6806
|
dataRoute.lazy = async () => {
|
|
6744
6807
|
if (route.clientLoaderModule || route.clientActionModule) {
|
|
6745
6808
|
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
@@ -6774,7 +6837,6 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
6774
6837
|
return {
|
|
6775
6838
|
...lazyRoute.loader ? { loader: lazyRoute.loader } : {},
|
|
6776
6839
|
...lazyRoute.action ? { action: lazyRoute.action } : {},
|
|
6777
|
-
unstable_middleware: mod.unstable_clientMiddleware,
|
|
6778
6840
|
hasErrorBoundary: lazyRoute.hasErrorBoundary,
|
|
6779
6841
|
shouldRevalidate: getShouldRevalidateFunction(
|
|
6780
6842
|
lazyRoute,
|
|
@@ -7408,6 +7470,7 @@ ${matches.map((match, routeIndex) => {
|
|
|
7408
7470
|
let {
|
|
7409
7471
|
clientActionModule,
|
|
7410
7472
|
clientLoaderModule,
|
|
7473
|
+
clientMiddlewareModule,
|
|
7411
7474
|
hydrateFallbackModule,
|
|
7412
7475
|
module
|
|
7413
7476
|
} = manifestEntry;
|
|
@@ -7424,6 +7487,12 @@ ${matches.map((match, routeIndex) => {
|
|
|
7424
7487
|
varName: `${routeVarName}_clientLoader`
|
|
7425
7488
|
}
|
|
7426
7489
|
] : [],
|
|
7490
|
+
...clientMiddlewareModule ? [
|
|
7491
|
+
{
|
|
7492
|
+
module: clientMiddlewareModule,
|
|
7493
|
+
varName: `${routeVarName}_clientMiddleware`
|
|
7494
|
+
}
|
|
7495
|
+
] : [],
|
|
7427
7496
|
...hydrateFallbackModule ? [
|
|
7428
7497
|
{
|
|
7429
7498
|
module: hydrateFallbackModule,
|
|
@@ -7517,7 +7586,7 @@ function mergeRefs(...refs) {
|
|
|
7517
7586
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7518
7587
|
try {
|
|
7519
7588
|
if (isBrowser) {
|
|
7520
|
-
window.__reactRouterVersion = "7.4.
|
|
7589
|
+
window.__reactRouterVersion = "7.4.1-pre.0";
|
|
7521
7590
|
}
|
|
7522
7591
|
} catch (e) {
|
|
7523
7592
|
}
|
|
@@ -8727,16 +8796,18 @@ function processRoutes(routes, manifest, routeModules, parentId) {
|
|
|
8727
8796
|
parentId,
|
|
8728
8797
|
hasAction: route.action != null,
|
|
8729
8798
|
hasLoader: route.loader != null,
|
|
8730
|
-
// When testing routes, you should
|
|
8731
|
-
// trying to re-implement the full loader/clientLoader/SSR/hydration
|
|
8732
|
-
// That is better tested via E2E tests.
|
|
8799
|
+
// When testing routes, you should be stubbing loader/action/middleware,
|
|
8800
|
+
// not trying to re-implement the full loader/clientLoader/SSR/hydration
|
|
8801
|
+
// flow. That is better tested via E2E tests.
|
|
8733
8802
|
hasClientAction: false,
|
|
8734
8803
|
hasClientLoader: false,
|
|
8804
|
+
hasClientMiddleware: false,
|
|
8735
8805
|
hasErrorBoundary: route.ErrorBoundary != null,
|
|
8736
8806
|
// any need for these?
|
|
8737
8807
|
module: "build/stub-path-to-module.js",
|
|
8738
8808
|
clientActionModule: void 0,
|
|
8739
8809
|
clientLoaderModule: void 0,
|
|
8810
|
+
clientMiddlewareModule: void 0,
|
|
8740
8811
|
hydrateFallbackModule: void 0
|
|
8741
8812
|
};
|
|
8742
8813
|
manifest.routes[newRoute.id] = entryRoute;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-BjgPfDmv.mjs';
|
|
3
|
+
import { R as RouterInit } from './route-data-BL8ToWby.mjs';
|
|
4
4
|
|
|
5
5
|
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
|
|
6
6
|
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-BaM-ohjc.js';
|
|
3
|
+
import { R as RouterInit } from './route-data-BL8ToWby.js';
|
|
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 v7.4.
|
|
2
|
+
* react-router v7.4.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -275,12 +275,14 @@ var unstable_RouterContextProvider = class {
|
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
277
|
_map = new WeakMap();
|
|
278
|
-
var
|
|
278
|
+
var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
|
|
279
279
|
"lazy",
|
|
280
280
|
"caseSensitive",
|
|
281
281
|
"path",
|
|
282
282
|
"id",
|
|
283
283
|
"index",
|
|
284
|
+
"unstable_middleware",
|
|
285
|
+
"unstable_lazyMiddleware",
|
|
284
286
|
"children"
|
|
285
287
|
]);
|
|
286
288
|
function isIndexRoute(route) {
|
|
@@ -2061,8 +2063,7 @@ function createRouter(init) {
|
|
|
2061
2063
|
fetcherKey,
|
|
2062
2064
|
manifest,
|
|
2063
2065
|
mapRouteProperties2,
|
|
2064
|
-
scopedContext
|
|
2065
|
-
future.unstable_middleware
|
|
2066
|
+
scopedContext
|
|
2066
2067
|
);
|
|
2067
2068
|
} catch (e) {
|
|
2068
2069
|
matchesToLoad.forEach((m) => {
|
|
@@ -2822,38 +2823,80 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
2822
2823
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
2823
2824
|
);
|
|
2824
2825
|
}
|
|
2826
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
2825
2827
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
2828
|
+
let routeToUpdate = manifest[route.id];
|
|
2829
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
2826
2830
|
if (!route.lazy) {
|
|
2827
2831
|
return;
|
|
2828
2832
|
}
|
|
2829
|
-
let
|
|
2830
|
-
if (
|
|
2833
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
2834
|
+
if (cachedPromise) {
|
|
2835
|
+
await cachedPromise;
|
|
2836
|
+
return;
|
|
2837
|
+
}
|
|
2838
|
+
let lazyRoutePromise = route.lazy().then((lazyRoute) => {
|
|
2839
|
+
let routeUpdates = {};
|
|
2840
|
+
for (let lazyRouteProperty in lazyRoute) {
|
|
2841
|
+
let staticRouteValue = routeToUpdate[lazyRouteProperty];
|
|
2842
|
+
let isPropertyStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based
|
|
2843
|
+
// on the route updates
|
|
2844
|
+
lazyRouteProperty !== "hasErrorBoundary";
|
|
2845
|
+
warning(
|
|
2846
|
+
!isPropertyStaticallyDefined,
|
|
2847
|
+
`Route "${routeToUpdate.id}" has a static property "${lazyRouteProperty}" defined but its lazy function is also returning a value for this property. The lazy route property "${lazyRouteProperty}" will be ignored.`
|
|
2848
|
+
);
|
|
2849
|
+
warning(
|
|
2850
|
+
!unsupportedLazyRouteFunctionKeys.has(
|
|
2851
|
+
lazyRouteProperty
|
|
2852
|
+
),
|
|
2853
|
+
"Route property " + lazyRouteProperty + " is not a supported property to be returned from a lazy route function. This property will be ignored."
|
|
2854
|
+
);
|
|
2855
|
+
if (!isPropertyStaticallyDefined && !unsupportedLazyRouteFunctionKeys.has(
|
|
2856
|
+
lazyRouteProperty
|
|
2857
|
+
)) {
|
|
2858
|
+
routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
Object.assign(routeToUpdate, routeUpdates);
|
|
2862
|
+
Object.assign(routeToUpdate, {
|
|
2863
|
+
// To keep things framework agnostic, we use the provided `mapRouteProperties`
|
|
2864
|
+
// function to set the framework-aware properties (`element`/`hasErrorBoundary`)
|
|
2865
|
+
// since the logic will differ between frameworks.
|
|
2866
|
+
...mapRouteProperties2(routeToUpdate),
|
|
2867
|
+
lazy: void 0
|
|
2868
|
+
});
|
|
2869
|
+
});
|
|
2870
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
2871
|
+
await lazyRoutePromise;
|
|
2872
|
+
}
|
|
2873
|
+
async function loadLazyMiddleware(route, manifest) {
|
|
2874
|
+
if (!route.unstable_lazyMiddleware) {
|
|
2831
2875
|
return;
|
|
2832
2876
|
}
|
|
2833
2877
|
let routeToUpdate = manifest[route.id];
|
|
2834
2878
|
invariant(routeToUpdate, "No route found in manifest");
|
|
2835
|
-
|
|
2836
|
-
for (let lazyRouteProperty in lazyRoute) {
|
|
2837
|
-
let staticRouteValue = routeToUpdate[lazyRouteProperty];
|
|
2838
|
-
let isPropertyStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based
|
|
2839
|
-
// on the route updates
|
|
2840
|
-
lazyRouteProperty !== "hasErrorBoundary";
|
|
2879
|
+
if (routeToUpdate.unstable_middleware) {
|
|
2841
2880
|
warning(
|
|
2842
|
-
|
|
2843
|
-
`Route "${routeToUpdate.id}" has a static property "
|
|
2881
|
+
false,
|
|
2882
|
+
`Route "${routeToUpdate.id}" has a static property "unstable_middleware" defined. The "unstable_lazyMiddleware" function will be ignored.`
|
|
2844
2883
|
);
|
|
2845
|
-
|
|
2846
|
-
|
|
2884
|
+
} else {
|
|
2885
|
+
let middleware = await route.unstable_lazyMiddleware();
|
|
2886
|
+
if (!route.unstable_lazyMiddleware) {
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
if (!routeToUpdate.unstable_middleware) {
|
|
2890
|
+
routeToUpdate.unstable_middleware = middleware;
|
|
2847
2891
|
}
|
|
2848
2892
|
}
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
});
|
|
2893
|
+
routeToUpdate.unstable_lazyMiddleware = void 0;
|
|
2894
|
+
}
|
|
2895
|
+
function loadLazyMiddlewareForMatches(matches, manifest) {
|
|
2896
|
+
let promises = matches.map(
|
|
2897
|
+
(m) => m.route.unstable_lazyMiddleware ? loadLazyMiddleware(m.route, manifest) : void 0
|
|
2898
|
+
).filter(Boolean);
|
|
2899
|
+
return promises.length > 0 ? Promise.all(promises) : void 0;
|
|
2857
2900
|
}
|
|
2858
2901
|
async function defaultDataStrategy(args) {
|
|
2859
2902
|
let matchesToLoad = args.matches.filter((m) => m.shouldLoad);
|
|
@@ -2969,12 +3012,13 @@ async function callRouteMiddleware(args, middlewares, propagateResult, middlewar
|
|
|
2969
3012
|
throw error;
|
|
2970
3013
|
}
|
|
2971
3014
|
}
|
|
2972
|
-
async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties2, scopedContext
|
|
3015
|
+
async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties2, scopedContext) {
|
|
3016
|
+
let loadMiddlewarePromise = loadLazyMiddlewareForMatches(matches, manifest);
|
|
2973
3017
|
let loadRouteDefinitionsPromises = matches.map(
|
|
2974
3018
|
(m) => m.route.lazy ? loadLazyRouteModule(m.route, mapRouteProperties2, manifest) : void 0
|
|
2975
3019
|
);
|
|
2976
|
-
if (
|
|
2977
|
-
await
|
|
3020
|
+
if (loadMiddlewarePromise) {
|
|
3021
|
+
await loadMiddlewarePromise;
|
|
2978
3022
|
}
|
|
2979
3023
|
let dsMatches = matches.map((match, i) => {
|
|
2980
3024
|
let loadRoutePromise = loadRouteDefinitionsPromises[i];
|
|
@@ -5208,6 +5252,21 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
5208
5252
|
});
|
|
5209
5253
|
};
|
|
5210
5254
|
}
|
|
5255
|
+
if (route.hasClientMiddleware) {
|
|
5256
|
+
dataRoute.unstable_lazyMiddleware = async () => {
|
|
5257
|
+
invariant2(route);
|
|
5258
|
+
let clientMiddlewareModule = await import(
|
|
5259
|
+
/* @vite-ignore */
|
|
5260
|
+
/* webpackIgnore: true */
|
|
5261
|
+
route.clientMiddlewareModule || route.module
|
|
5262
|
+
);
|
|
5263
|
+
invariant2(
|
|
5264
|
+
clientMiddlewareModule?.unstable_clientMiddleware,
|
|
5265
|
+
"No `unstable_clientMiddleware` export in chunk"
|
|
5266
|
+
);
|
|
5267
|
+
return clientMiddlewareModule.unstable_clientMiddleware;
|
|
5268
|
+
};
|
|
5269
|
+
}
|
|
5211
5270
|
dataRoute.lazy = async () => {
|
|
5212
5271
|
if (route.clientLoaderModule || route.clientActionModule) {
|
|
5213
5272
|
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
@@ -5242,7 +5301,6 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
|
|
|
5242
5301
|
return {
|
|
5243
5302
|
...lazyRoute.loader ? { loader: lazyRoute.loader } : {},
|
|
5244
5303
|
...lazyRoute.action ? { action: lazyRoute.action } : {},
|
|
5245
|
-
unstable_middleware: mod.unstable_clientMiddleware,
|
|
5246
5304
|
hasErrorBoundary: lazyRoute.hasErrorBoundary,
|
|
5247
5305
|
shouldRevalidate: getShouldRevalidateFunction(
|
|
5248
5306
|
lazyRoute,
|
|
@@ -5583,6 +5641,7 @@ ${matches.map((match, routeIndex) => {
|
|
|
5583
5641
|
let {
|
|
5584
5642
|
clientActionModule,
|
|
5585
5643
|
clientLoaderModule,
|
|
5644
|
+
clientMiddlewareModule,
|
|
5586
5645
|
hydrateFallbackModule,
|
|
5587
5646
|
module: module2
|
|
5588
5647
|
} = manifestEntry;
|
|
@@ -5599,6 +5658,12 @@ ${matches.map((match, routeIndex) => {
|
|
|
5599
5658
|
varName: `${routeVarName}_clientLoader`
|
|
5600
5659
|
}
|
|
5601
5660
|
] : [],
|
|
5661
|
+
...clientMiddlewareModule ? [
|
|
5662
|
+
{
|
|
5663
|
+
module: clientMiddlewareModule,
|
|
5664
|
+
varName: `${routeVarName}_clientMiddleware`
|
|
5665
|
+
}
|
|
5666
|
+
] : [],
|
|
5602
5667
|
...hydrateFallbackModule ? [
|
|
5603
5668
|
{
|
|
5604
5669
|
module: hydrateFallbackModule,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.4.
|
|
2
|
+
* react-router v7.4.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
matchRoutes,
|
|
26
26
|
shouldHydrateRouteLoader,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EC6TQTU3.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-BL8ToWby.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -472,12 +472,14 @@ interface EntryRoute extends Route {
|
|
|
472
472
|
hasLoader: boolean;
|
|
473
473
|
hasClientAction: boolean;
|
|
474
474
|
hasClientLoader: boolean;
|
|
475
|
+
hasClientMiddleware: boolean;
|
|
475
476
|
hasErrorBoundary: boolean;
|
|
476
477
|
imports?: string[];
|
|
477
478
|
css?: string[];
|
|
478
479
|
module: string;
|
|
479
480
|
clientActionModule: string | undefined;
|
|
480
481
|
clientLoaderModule: string | undefined;
|
|
482
|
+
clientMiddlewareModule: string | undefined;
|
|
481
483
|
hydrateFallbackModule: string | undefined;
|
|
482
484
|
parentId?: string;
|
|
483
485
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-BL8ToWby.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -472,12 +472,14 @@ interface EntryRoute extends Route {
|
|
|
472
472
|
hasLoader: boolean;
|
|
473
473
|
hasClientAction: boolean;
|
|
474
474
|
hasClientLoader: boolean;
|
|
475
|
+
hasClientMiddleware: boolean;
|
|
475
476
|
hasErrorBoundary: boolean;
|
|
476
477
|
imports?: string[];
|
|
477
478
|
css?: string[];
|
|
478
479
|
module: string;
|
|
479
480
|
clientActionModule: string | undefined;
|
|
480
481
|
clientLoaderModule: string | undefined;
|
|
482
|
+
clientMiddlewareModule: string | undefined;
|
|
481
483
|
hydrateFallbackModule: string | undefined;
|
|
482
484
|
parentId?: string;
|
|
483
485
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as RouteModules, b as Router, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, M as MetaFunction, w as LinksFunction, x as NonIndexRouteObject, E as Equal, y as RouterState } from './route-data-
|
|
2
|
-
export { au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunction, ax as ClientLoaderFunctionArgs, ao as DataRouteMatch, ap as DataRouteObject, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, J as Fetcher, $ as FormEncType, a0 as FormMethod, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ae as IDLE_BLOCKER, ad as IDLE_FETCHER, ac as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, aq as Navigator, aC as PageLinkDescriptor, ar as PatchRoutesOnNavigationFunction, as as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, at as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a7 as ShouldRevalidateFunction, a8 as ShouldRevalidateFunctionArgs, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, Z 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, aa as createPath, af as data, ag as generatePath, ah as isRouteErrorResponse, ai as matchPath, aj as matchRoutes, ab as parsePath, ak as redirect, al as redirectDocument, am as replace, an as resolvePath, a3 as unstable_MiddlewareFunction, a6 as unstable_RouterContext, aF as unstable_SerializesTo, a9 as unstable_createContext } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-
|
|
4
|
-
export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, aj as UNSAFE_FrameworkContext, am as UNSAFE_createClientRoutes, an as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ak as UNSAFE_getPatchRoutesOnNavigationFunction, ai as UNSAFE_mapRouteProperties, ao as UNSAFE_shouldHydrateRouteLoader, al as UNSAFE_useFogOFWarDiscovery, ap as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { a as RouteModules, b as Router, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, M as MetaFunction, w as LinksFunction, x as NonIndexRouteObject, E as Equal, y as RouterState } from './route-data-BL8ToWby.mjs';
|
|
2
|
+
export { au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunction, ax as ClientLoaderFunctionArgs, ao as DataRouteMatch, ap as DataRouteObject, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, J as Fetcher, $ as FormEncType, a0 as FormMethod, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ae as IDLE_BLOCKER, ad as IDLE_FETCHER, ac as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, aq as Navigator, aC as PageLinkDescriptor, ar as PatchRoutesOnNavigationFunction, as as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, at as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a7 as ShouldRevalidateFunction, a8 as ShouldRevalidateFunctionArgs, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, Z 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, aa as createPath, af as data, ag as generatePath, ah as isRouteErrorResponse, ai as matchPath, aj as matchRoutes, ab as parsePath, ak as redirect, al as redirectDocument, am as replace, an as resolvePath, a3 as unstable_MiddlewareFunction, a6 as unstable_RouterContext, aF as unstable_SerializesTo, a9 as unstable_createContext } from './route-data-BL8ToWby.mjs';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-BjgPfDmv.mjs';
|
|
4
|
+
export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, aj as UNSAFE_FrameworkContext, am as UNSAFE_createClientRoutes, an as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ak as UNSAFE_getPatchRoutesOnNavigationFunction, ai as UNSAFE_mapRouteProperties, ao as UNSAFE_shouldHydrateRouteLoader, al as UNSAFE_useFogOFWarDiscovery, ap as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './fog-of-war-BjgPfDmv.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|