react-router 0.0.0-experimental-47c4c03cf → 0.0.0-experimental-2e661fbb4
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/dist/development/{chunk-ZLEU4KOV.mjs → chunk-J5BQFBPQ.mjs} +41 -31
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +40 -30
- package/dist/development/dom-export.mjs +2 -2
- package/dist/{production/fog-of-war-CZjBjtU4.d.ts → development/fog-of-war-BaM-ohjc.d.ts} +1 -1
- package/dist/development/{fog-of-war-DiCDrvSo.d.mts → fog-of-war-BjgPfDmv.d.mts} +1 -1
- package/dist/development/index.d.mts +4 -4
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +41 -31
- 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-BLKiKwdV.d.ts → route-data-BL8ToWby.d.mts} +3 -3
- package/dist/{production/route-data-BLKiKwdV.d.mts → development/route-data-BL8ToWby.d.ts} +3 -3
- package/dist/production/{chunk-2V6PYXBT.mjs → chunk-XSS6E6T7.mjs} +41 -31
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +40 -30
- package/dist/production/dom-export.mjs +2 -2
- package/dist/{development/fog-of-war-CZjBjtU4.d.ts → production/fog-of-war-BaM-ohjc.d.ts} +1 -1
- package/dist/production/{fog-of-war-DiCDrvSo.d.mts → fog-of-war-BjgPfDmv.d.mts} +1 -1
- package/dist/production/index.d.mts +4 -4
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +41 -31
- 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-BLKiKwdV.d.ts → route-data-BL8ToWby.d.mts} +3 -3
- package/dist/{development/route-data-BLKiKwdV.d.mts → production/route-data-BL8ToWby.d.ts} +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -383,7 +383,7 @@ 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",
|
|
@@ -3531,42 +3531,52 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
3531
3531
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
3532
3532
|
);
|
|
3533
3533
|
}
|
|
3534
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
3534
3535
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
3536
|
+
let routeToUpdate = manifest[route.id];
|
|
3537
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
3535
3538
|
if (!route.lazy) {
|
|
3536
3539
|
return;
|
|
3537
3540
|
}
|
|
3538
|
-
let
|
|
3539
|
-
if (
|
|
3541
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
3542
|
+
if (cachedPromise) {
|
|
3543
|
+
await cachedPromise;
|
|
3540
3544
|
return;
|
|
3541
3545
|
}
|
|
3542
|
-
let
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
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
|
+
}
|
|
3560
3568
|
}
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
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
|
+
});
|
|
3569
3577
|
});
|
|
3578
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
3579
|
+
await lazyRoutePromise;
|
|
3570
3580
|
}
|
|
3571
3581
|
async function loadLazyMiddleware(route, manifest) {
|
|
3572
3582
|
if (!route.unstable_lazyMiddleware) {
|
|
@@ -7576,7 +7586,7 @@ function mergeRefs(...refs) {
|
|
|
7576
7586
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7577
7587
|
try {
|
|
7578
7588
|
if (isBrowser) {
|
|
7579
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7589
|
+
window.__reactRouterVersion = "0.0.0-experimental-2e661fbb4";
|
|
7580
7590
|
}
|
|
7581
7591
|
} catch (e) {
|
|
7582
7592
|
}
|
|
@@ -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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -275,7 +275,7 @@ 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",
|
|
@@ -2823,42 +2823,52 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
2823
2823
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
2824
2824
|
);
|
|
2825
2825
|
}
|
|
2826
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
2826
2827
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
2828
|
+
let routeToUpdate = manifest[route.id];
|
|
2829
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
2827
2830
|
if (!route.lazy) {
|
|
2828
2831
|
return;
|
|
2829
2832
|
}
|
|
2830
|
-
let
|
|
2831
|
-
if (
|
|
2833
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
2834
|
+
if (cachedPromise) {
|
|
2835
|
+
await cachedPromise;
|
|
2832
2836
|
return;
|
|
2833
2837
|
}
|
|
2834
|
-
let
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
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
|
+
}
|
|
2852
2860
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
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
|
+
});
|
|
2861
2869
|
});
|
|
2870
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
2871
|
+
await lazyRoutePromise;
|
|
2862
2872
|
}
|
|
2863
2873
|
async function loadLazyMiddleware(route, manifest) {
|
|
2864
2874
|
if (!route.unstable_lazyMiddleware) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
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-J5BQFBPQ.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
|
|
@@ -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
|
|
@@ -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';
|
|
@@ -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.js';
|
|
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.js';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-BaM-ohjc.js';
|
|
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-BaM-ohjc.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -531,7 +531,7 @@ var unstable_RouterContextProvider = class {
|
|
|
531
531
|
}
|
|
532
532
|
};
|
|
533
533
|
_map = new WeakMap();
|
|
534
|
-
var
|
|
534
|
+
var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
|
|
535
535
|
"lazy",
|
|
536
536
|
"caseSensitive",
|
|
537
537
|
"path",
|
|
@@ -3679,42 +3679,52 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
3679
3679
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
3680
3680
|
);
|
|
3681
3681
|
}
|
|
3682
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
3682
3683
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
3684
|
+
let routeToUpdate = manifest[route.id];
|
|
3685
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
3683
3686
|
if (!route.lazy) {
|
|
3684
3687
|
return;
|
|
3685
3688
|
}
|
|
3686
|
-
let
|
|
3687
|
-
if (
|
|
3689
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
3690
|
+
if (cachedPromise) {
|
|
3691
|
+
await cachedPromise;
|
|
3688
3692
|
return;
|
|
3689
3693
|
}
|
|
3690
|
-
let
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3694
|
+
let lazyRoutePromise = route.lazy().then((lazyRoute) => {
|
|
3695
|
+
let routeUpdates = {};
|
|
3696
|
+
for (let lazyRouteProperty in lazyRoute) {
|
|
3697
|
+
let staticRouteValue = routeToUpdate[lazyRouteProperty];
|
|
3698
|
+
let isPropertyStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based
|
|
3699
|
+
// on the route updates
|
|
3700
|
+
lazyRouteProperty !== "hasErrorBoundary";
|
|
3701
|
+
warning(
|
|
3702
|
+
!isPropertyStaticallyDefined,
|
|
3703
|
+
`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.`
|
|
3704
|
+
);
|
|
3705
|
+
warning(
|
|
3706
|
+
!unsupportedLazyRouteFunctionKeys.has(
|
|
3707
|
+
lazyRouteProperty
|
|
3708
|
+
),
|
|
3709
|
+
"Route property " + lazyRouteProperty + " is not a supported property to be returned from a lazy route function. This property will be ignored."
|
|
3710
|
+
);
|
|
3711
|
+
if (!isPropertyStaticallyDefined && !unsupportedLazyRouteFunctionKeys.has(
|
|
3712
|
+
lazyRouteProperty
|
|
3713
|
+
)) {
|
|
3714
|
+
routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
|
|
3715
|
+
}
|
|
3708
3716
|
}
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
+
Object.assign(routeToUpdate, routeUpdates);
|
|
3718
|
+
Object.assign(routeToUpdate, {
|
|
3719
|
+
// To keep things framework agnostic, we use the provided `mapRouteProperties`
|
|
3720
|
+
// function to set the framework-aware properties (`element`/`hasErrorBoundary`)
|
|
3721
|
+
// since the logic will differ between frameworks.
|
|
3722
|
+
...mapRouteProperties2(routeToUpdate),
|
|
3723
|
+
lazy: void 0
|
|
3724
|
+
});
|
|
3717
3725
|
});
|
|
3726
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
3727
|
+
await lazyRoutePromise;
|
|
3718
3728
|
}
|
|
3719
3729
|
async function loadLazyMiddleware(route, manifest) {
|
|
3720
3730
|
if (!route.unstable_lazyMiddleware) {
|
|
@@ -7724,7 +7734,7 @@ function mergeRefs(...refs) {
|
|
|
7724
7734
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7725
7735
|
try {
|
|
7726
7736
|
if (isBrowser) {
|
|
7727
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7737
|
+
window.__reactRouterVersion = "0.0.0-experimental-2e661fbb4";
|
|
7728
7738
|
}
|
|
7729
7739
|
} catch (e) {
|
|
7730
7740
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
useSearchParams,
|
|
124
124
|
useSubmit,
|
|
125
125
|
useViewTransitionState
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-J5BQFBPQ.mjs";
|
|
127
127
|
export {
|
|
128
128
|
Await,
|
|
129
129
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-
|
|
1
|
+
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-BL8ToWby.mjs';
|
|
2
2
|
import { M as MiddlewareEnabled, A as AppLoadContext } from '../../future-ldDp5FKH.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -139,8 +139,8 @@ type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
|
139
139
|
*/
|
|
140
140
|
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
141
141
|
};
|
|
142
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response |
|
|
143
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<
|
|
142
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
143
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
144
144
|
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
145
145
|
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
146
146
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-
|
|
1
|
+
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-BL8ToWby.js';
|
|
2
2
|
import { M as MiddlewareEnabled, A as AppLoadContext } from '../../future-ldDp5FKH.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -139,8 +139,8 @@ type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
|
139
139
|
*/
|
|
140
140
|
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
141
141
|
};
|
|
142
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response |
|
|
143
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<
|
|
142
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
143
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
144
144
|
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
145
145
|
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
146
146
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
@@ -332,7 +332,7 @@ interface unstable_MiddlewareNextFunction<Result = unknown> {
|
|
|
332
332
|
* a `next` function as the second parameter which will call downstream handlers
|
|
333
333
|
* and then complete middlewares from the bottom-up
|
|
334
334
|
*/
|
|
335
|
-
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result |
|
|
335
|
+
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result | void>;
|
|
336
336
|
/**
|
|
337
337
|
* Arguments passed to loader functions
|
|
338
338
|
*/
|
|
@@ -468,7 +468,7 @@ interface MapRoutePropertiesFunction {
|
|
|
468
468
|
* onto the route. Either they're meaningful to the router, or they'll get
|
|
469
469
|
* ignored.
|
|
470
470
|
*/
|
|
471
|
-
type
|
|
471
|
+
type UnsupportedLazyRouteFunctionKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "unstable_middleware" | "unstable_lazyMiddleware" | "children";
|
|
472
472
|
type RequireOne<T, Key = keyof T> = Exclude<{
|
|
473
473
|
[K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
|
|
474
474
|
}[keyof T], undefined>;
|
|
@@ -477,7 +477,7 @@ type RequireOne<T, Key = keyof T> = Exclude<{
|
|
|
477
477
|
* related properties to a route
|
|
478
478
|
*/
|
|
479
479
|
interface LazyRouteFunction<R extends AgnosticRouteObject> {
|
|
480
|
-
(): Promise<RequireOne<Omit<R,
|
|
480
|
+
(): Promise<RequireOne<Omit<R, UnsupportedLazyRouteFunctionKey>>>;
|
|
481
481
|
}
|
|
482
482
|
interface LazyMiddlewareFunction {
|
|
483
483
|
(): Promise<unstable_MiddlewareFunction[]>;
|
|
@@ -332,7 +332,7 @@ interface unstable_MiddlewareNextFunction<Result = unknown> {
|
|
|
332
332
|
* a `next` function as the second parameter which will call downstream handlers
|
|
333
333
|
* and then complete middlewares from the bottom-up
|
|
334
334
|
*/
|
|
335
|
-
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result |
|
|
335
|
+
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result | void>;
|
|
336
336
|
/**
|
|
337
337
|
* Arguments passed to loader functions
|
|
338
338
|
*/
|
|
@@ -468,7 +468,7 @@ interface MapRoutePropertiesFunction {
|
|
|
468
468
|
* onto the route. Either they're meaningful to the router, or they'll get
|
|
469
469
|
* ignored.
|
|
470
470
|
*/
|
|
471
|
-
type
|
|
471
|
+
type UnsupportedLazyRouteFunctionKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "unstable_middleware" | "unstable_lazyMiddleware" | "children";
|
|
472
472
|
type RequireOne<T, Key = keyof T> = Exclude<{
|
|
473
473
|
[K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
|
|
474
474
|
}[keyof T], undefined>;
|
|
@@ -477,7 +477,7 @@ type RequireOne<T, Key = keyof T> = Exclude<{
|
|
|
477
477
|
* related properties to a route
|
|
478
478
|
*/
|
|
479
479
|
interface LazyRouteFunction<R extends AgnosticRouteObject> {
|
|
480
|
-
(): Promise<RequireOne<Omit<R,
|
|
480
|
+
(): Promise<RequireOne<Omit<R, UnsupportedLazyRouteFunctionKey>>>;
|
|
481
481
|
}
|
|
482
482
|
interface LazyMiddlewareFunction {
|
|
483
483
|
(): Promise<unstable_MiddlewareFunction[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -383,7 +383,7 @@ 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",
|
|
@@ -3531,42 +3531,52 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
3531
3531
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
3532
3532
|
);
|
|
3533
3533
|
}
|
|
3534
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
3534
3535
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
3536
|
+
let routeToUpdate = manifest[route.id];
|
|
3537
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
3535
3538
|
if (!route.lazy) {
|
|
3536
3539
|
return;
|
|
3537
3540
|
}
|
|
3538
|
-
let
|
|
3539
|
-
if (
|
|
3541
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
3542
|
+
if (cachedPromise) {
|
|
3543
|
+
await cachedPromise;
|
|
3540
3544
|
return;
|
|
3541
3545
|
}
|
|
3542
|
-
let
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
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
|
+
}
|
|
3560
3568
|
}
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
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
|
+
});
|
|
3569
3577
|
});
|
|
3578
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
3579
|
+
await lazyRoutePromise;
|
|
3570
3580
|
}
|
|
3571
3581
|
async function loadLazyMiddleware(route, manifest) {
|
|
3572
3582
|
if (!route.unstable_lazyMiddleware) {
|
|
@@ -7576,7 +7586,7 @@ function mergeRefs(...refs) {
|
|
|
7576
7586
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7577
7587
|
try {
|
|
7578
7588
|
if (isBrowser) {
|
|
7579
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7589
|
+
window.__reactRouterVersion = "0.0.0-experimental-2e661fbb4";
|
|
7580
7590
|
}
|
|
7581
7591
|
} catch (e) {
|
|
7582
7592
|
}
|
|
@@ -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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -275,7 +275,7 @@ 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",
|
|
@@ -2823,42 +2823,52 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
2823
2823
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
2824
2824
|
);
|
|
2825
2825
|
}
|
|
2826
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
2826
2827
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
2828
|
+
let routeToUpdate = manifest[route.id];
|
|
2829
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
2827
2830
|
if (!route.lazy) {
|
|
2828
2831
|
return;
|
|
2829
2832
|
}
|
|
2830
|
-
let
|
|
2831
|
-
if (
|
|
2833
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
2834
|
+
if (cachedPromise) {
|
|
2835
|
+
await cachedPromise;
|
|
2832
2836
|
return;
|
|
2833
2837
|
}
|
|
2834
|
-
let
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
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
|
+
}
|
|
2852
2860
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
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
|
+
});
|
|
2861
2869
|
});
|
|
2870
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
2871
|
+
await lazyRoutePromise;
|
|
2862
2872
|
}
|
|
2863
2873
|
async function loadLazyMiddleware(route, manifest) {
|
|
2864
2874
|
if (!route.unstable_lazyMiddleware) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
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-XSS6E6T7.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
|
|
@@ -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
|
|
@@ -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';
|
|
@@ -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.js';
|
|
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.js';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-BaM-ohjc.js';
|
|
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-BaM-ohjc.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
package/dist/production/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -531,7 +531,7 @@ var unstable_RouterContextProvider = class {
|
|
|
531
531
|
}
|
|
532
532
|
};
|
|
533
533
|
_map = new WeakMap();
|
|
534
|
-
var
|
|
534
|
+
var unsupportedLazyRouteFunctionKeys = /* @__PURE__ */ new Set([
|
|
535
535
|
"lazy",
|
|
536
536
|
"caseSensitive",
|
|
537
537
|
"path",
|
|
@@ -3679,42 +3679,52 @@ function isSameRoute(newRoute, existingRoute) {
|
|
|
3679
3679
|
(aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
|
|
3680
3680
|
);
|
|
3681
3681
|
}
|
|
3682
|
+
var lazyRouteFunctionCache = /* @__PURE__ */ new WeakMap();
|
|
3682
3683
|
async function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
|
|
3684
|
+
let routeToUpdate = manifest[route.id];
|
|
3685
|
+
invariant(routeToUpdate, "No route found in manifest");
|
|
3683
3686
|
if (!route.lazy) {
|
|
3684
3687
|
return;
|
|
3685
3688
|
}
|
|
3686
|
-
let
|
|
3687
|
-
if (
|
|
3689
|
+
let cachedPromise = lazyRouteFunctionCache.get(routeToUpdate);
|
|
3690
|
+
if (cachedPromise) {
|
|
3691
|
+
await cachedPromise;
|
|
3688
3692
|
return;
|
|
3689
3693
|
}
|
|
3690
|
-
let
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3694
|
+
let lazyRoutePromise = route.lazy().then((lazyRoute) => {
|
|
3695
|
+
let routeUpdates = {};
|
|
3696
|
+
for (let lazyRouteProperty in lazyRoute) {
|
|
3697
|
+
let staticRouteValue = routeToUpdate[lazyRouteProperty];
|
|
3698
|
+
let isPropertyStaticallyDefined = staticRouteValue !== void 0 && // This property isn't static since it should always be updated based
|
|
3699
|
+
// on the route updates
|
|
3700
|
+
lazyRouteProperty !== "hasErrorBoundary";
|
|
3701
|
+
warning(
|
|
3702
|
+
!isPropertyStaticallyDefined,
|
|
3703
|
+
`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.`
|
|
3704
|
+
);
|
|
3705
|
+
warning(
|
|
3706
|
+
!unsupportedLazyRouteFunctionKeys.has(
|
|
3707
|
+
lazyRouteProperty
|
|
3708
|
+
),
|
|
3709
|
+
"Route property " + lazyRouteProperty + " is not a supported property to be returned from a lazy route function. This property will be ignored."
|
|
3710
|
+
);
|
|
3711
|
+
if (!isPropertyStaticallyDefined && !unsupportedLazyRouteFunctionKeys.has(
|
|
3712
|
+
lazyRouteProperty
|
|
3713
|
+
)) {
|
|
3714
|
+
routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
|
|
3715
|
+
}
|
|
3708
3716
|
}
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
+
Object.assign(routeToUpdate, routeUpdates);
|
|
3718
|
+
Object.assign(routeToUpdate, {
|
|
3719
|
+
// To keep things framework agnostic, we use the provided `mapRouteProperties`
|
|
3720
|
+
// function to set the framework-aware properties (`element`/`hasErrorBoundary`)
|
|
3721
|
+
// since the logic will differ between frameworks.
|
|
3722
|
+
...mapRouteProperties2(routeToUpdate),
|
|
3723
|
+
lazy: void 0
|
|
3724
|
+
});
|
|
3717
3725
|
});
|
|
3726
|
+
lazyRouteFunctionCache.set(routeToUpdate, lazyRoutePromise);
|
|
3727
|
+
await lazyRoutePromise;
|
|
3718
3728
|
}
|
|
3719
3729
|
async function loadLazyMiddleware(route, manifest) {
|
|
3720
3730
|
if (!route.unstable_lazyMiddleware) {
|
|
@@ -7724,7 +7734,7 @@ function mergeRefs(...refs) {
|
|
|
7724
7734
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7725
7735
|
try {
|
|
7726
7736
|
if (isBrowser) {
|
|
7727
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7737
|
+
window.__reactRouterVersion = "0.0.0-experimental-2e661fbb4";
|
|
7728
7738
|
}
|
|
7729
7739
|
} catch (e) {
|
|
7730
7740
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
useSearchParams,
|
|
124
124
|
useSubmit,
|
|
125
125
|
useViewTransitionState
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-XSS6E6T7.mjs";
|
|
127
127
|
export {
|
|
128
128
|
Await,
|
|
129
129
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-
|
|
1
|
+
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-BL8ToWby.mjs';
|
|
2
2
|
import { M as MiddlewareEnabled, A as AppLoadContext } from '../../future-ldDp5FKH.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -139,8 +139,8 @@ type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
|
139
139
|
*/
|
|
140
140
|
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
141
141
|
};
|
|
142
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response |
|
|
143
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<
|
|
142
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
143
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
144
144
|
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
145
145
|
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
146
146
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-
|
|
1
|
+
import { aE as LinkDescriptor, aB as MetaDescriptor, aT as ServerDataFrom, aU as ClientDataFrom, aV as Func, aW as unstable_MiddlewareNextFunction, E as Equal, u as unstable_RouterContextProvider, aX as Pretty } from '../../route-data-BL8ToWby.js';
|
|
2
2
|
import { M as MiddlewareEnabled, A as AppLoadContext } from '../../future-ldDp5FKH.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -139,8 +139,8 @@ type ServerDataFunctionArgs<T extends RouteInfo> = {
|
|
|
139
139
|
*/
|
|
140
140
|
context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
|
141
141
|
};
|
|
142
|
-
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response |
|
|
143
|
-
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<
|
|
142
|
+
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
|
|
143
|
+
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T>, next: unstable_MiddlewareNextFunction<undefined>) => MaybePromise<void>;
|
|
144
144
|
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T>;
|
|
145
145
|
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T> & {
|
|
146
146
|
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
|
|
@@ -332,7 +332,7 @@ interface unstable_MiddlewareNextFunction<Result = unknown> {
|
|
|
332
332
|
* a `next` function as the second parameter which will call downstream handlers
|
|
333
333
|
* and then complete middlewares from the bottom-up
|
|
334
334
|
*/
|
|
335
|
-
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result |
|
|
335
|
+
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result | void>;
|
|
336
336
|
/**
|
|
337
337
|
* Arguments passed to loader functions
|
|
338
338
|
*/
|
|
@@ -468,7 +468,7 @@ interface MapRoutePropertiesFunction {
|
|
|
468
468
|
* onto the route. Either they're meaningful to the router, or they'll get
|
|
469
469
|
* ignored.
|
|
470
470
|
*/
|
|
471
|
-
type
|
|
471
|
+
type UnsupportedLazyRouteFunctionKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "unstable_middleware" | "unstable_lazyMiddleware" | "children";
|
|
472
472
|
type RequireOne<T, Key = keyof T> = Exclude<{
|
|
473
473
|
[K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
|
|
474
474
|
}[keyof T], undefined>;
|
|
@@ -477,7 +477,7 @@ type RequireOne<T, Key = keyof T> = Exclude<{
|
|
|
477
477
|
* related properties to a route
|
|
478
478
|
*/
|
|
479
479
|
interface LazyRouteFunction<R extends AgnosticRouteObject> {
|
|
480
|
-
(): Promise<RequireOne<Omit<R,
|
|
480
|
+
(): Promise<RequireOne<Omit<R, UnsupportedLazyRouteFunctionKey>>>;
|
|
481
481
|
}
|
|
482
482
|
interface LazyMiddlewareFunction {
|
|
483
483
|
(): Promise<unstable_MiddlewareFunction[]>;
|
|
@@ -332,7 +332,7 @@ interface unstable_MiddlewareNextFunction<Result = unknown> {
|
|
|
332
332
|
* a `next` function as the second parameter which will call downstream handlers
|
|
333
333
|
* and then complete middlewares from the bottom-up
|
|
334
334
|
*/
|
|
335
|
-
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result |
|
|
335
|
+
type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result | void>;
|
|
336
336
|
/**
|
|
337
337
|
* Arguments passed to loader functions
|
|
338
338
|
*/
|
|
@@ -468,7 +468,7 @@ interface MapRoutePropertiesFunction {
|
|
|
468
468
|
* onto the route. Either they're meaningful to the router, or they'll get
|
|
469
469
|
* ignored.
|
|
470
470
|
*/
|
|
471
|
-
type
|
|
471
|
+
type UnsupportedLazyRouteFunctionKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "unstable_middleware" | "unstable_lazyMiddleware" | "children";
|
|
472
472
|
type RequireOne<T, Key = keyof T> = Exclude<{
|
|
473
473
|
[K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
|
|
474
474
|
}[keyof T], undefined>;
|
|
@@ -477,7 +477,7 @@ type RequireOne<T, Key = keyof T> = Exclude<{
|
|
|
477
477
|
* related properties to a route
|
|
478
478
|
*/
|
|
479
479
|
interface LazyRouteFunction<R extends AgnosticRouteObject> {
|
|
480
|
-
(): Promise<RequireOne<Omit<R,
|
|
480
|
+
(): Promise<RequireOne<Omit<R, UnsupportedLazyRouteFunctionKey>>>;
|
|
481
481
|
}
|
|
482
482
|
interface LazyMiddlewareFunction {
|
|
483
483
|
(): Promise<unstable_MiddlewareFunction[]>;
|