react-router 0.0.0-experimental-e41ede670 → 0.0.0-experimental-7a19e47ea
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-H3OBLXFX.mjs → chunk-4Q4PRAMB.mjs} +68 -18
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/{fog-of-war-Dz4n-TU-.d.mts → fog-of-war-CwUW4KXx.d.mts} +1 -1
- package/dist/{production/fog-of-war-Bt7PejVF.d.ts → development/fog-of-war-DyaXlex4.d.ts} +1 -1
- package/dist/development/index.d.mts +4 -4
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +68 -18
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/route-module.d.mts +1 -1
- package/dist/development/lib/types/route-module.d.ts +1 -1
- 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-C96IyGKo.d.ts → route-data-DjQzWkWv.d.mts} +2 -0
- package/dist/{production/route-data-C96IyGKo.d.mts → development/route-data-DjQzWkWv.d.ts} +2 -0
- package/dist/production/{chunk-YBZNESR7.mjs → chunk-OZAWGSDD.mjs} +68 -18
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/{fog-of-war-Dz4n-TU-.d.mts → fog-of-war-CwUW4KXx.d.mts} +1 -1
- package/dist/{development/fog-of-war-Bt7PejVF.d.ts → production/fog-of-war-DyaXlex4.d.ts} +1 -1
- package/dist/production/index.d.mts +4 -4
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +68 -18
- package/dist/production/index.mjs +2 -2
- package/dist/production/lib/types/route-module.d.mts +1 -1
- package/dist/production/lib/types/route-module.d.ts +1 -1
- 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-C96IyGKo.d.ts → route-data-DjQzWkWv.d.mts} +2 -0
- package/dist/{development/route-data-C96IyGKo.d.mts → production/route-data-DjQzWkWv.d.ts} +2 -0
- 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-7a19e47ea
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2581,7 +2581,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2581
2581
|
);
|
|
2582
2582
|
async function query(request, {
|
|
2583
2583
|
requestContext,
|
|
2584
|
+
filterMatchesToLoad,
|
|
2584
2585
|
skipLoaderErrorBubbling,
|
|
2586
|
+
skipRevalidation,
|
|
2585
2587
|
dataStrategy,
|
|
2586
2588
|
respond
|
|
2587
2589
|
} = {}) {
|
|
@@ -2624,6 +2626,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2624
2626
|
};
|
|
2625
2627
|
} else if (respond) {
|
|
2626
2628
|
try {
|
|
2629
|
+
let tailIdx = [...matches].reverse().findIndex((m) => !filterMatchesToLoad || filterMatchesToLoad(m));
|
|
2630
|
+
let lowestLoadingIdx = tailIdx < 0 ? 0 : matches.length - 1 - tailIdx;
|
|
2627
2631
|
let response = await runMiddlewarePipeline(
|
|
2628
2632
|
{
|
|
2629
2633
|
request,
|
|
@@ -2631,7 +2635,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2631
2635
|
params: matches[0].params,
|
|
2632
2636
|
context: requestContext
|
|
2633
2637
|
},
|
|
2634
|
-
|
|
2638
|
+
lowestLoadingIdx,
|
|
2635
2639
|
true,
|
|
2636
2640
|
async () => {
|
|
2637
2641
|
let result = await callQueryHandlers(
|
|
@@ -2641,7 +2645,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2641
2645
|
requestContext,
|
|
2642
2646
|
dataStrategy || defaultDataStrategyWithoutMiddleware,
|
|
2643
2647
|
skipLoaderErrorBubbling === true,
|
|
2644
|
-
null
|
|
2648
|
+
null,
|
|
2649
|
+
filterMatchesToLoad || null,
|
|
2650
|
+
skipRevalidation === true
|
|
2645
2651
|
);
|
|
2646
2652
|
if (isResponse(result)) {
|
|
2647
2653
|
return result;
|
|
@@ -2670,7 +2676,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2670
2676
|
requestContext,
|
|
2671
2677
|
dataStrategy || null,
|
|
2672
2678
|
skipLoaderErrorBubbling === true,
|
|
2673
|
-
null
|
|
2679
|
+
null,
|
|
2680
|
+
filterMatchesToLoad || null,
|
|
2681
|
+
skipRevalidation === true
|
|
2674
2682
|
);
|
|
2675
2683
|
if (isResponse(result)) {
|
|
2676
2684
|
return result;
|
|
@@ -2729,7 +2737,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2729
2737
|
requestContext,
|
|
2730
2738
|
dataStrategy || defaultDataStrategyWithoutMiddleware,
|
|
2731
2739
|
false,
|
|
2732
|
-
match
|
|
2740
|
+
match,
|
|
2741
|
+
null,
|
|
2742
|
+
false
|
|
2733
2743
|
);
|
|
2734
2744
|
if (isResponse(result)) {
|
|
2735
2745
|
return result;
|
|
@@ -2750,7 +2760,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2750
2760
|
requestContext,
|
|
2751
2761
|
dataStrategy || null,
|
|
2752
2762
|
false,
|
|
2753
|
-
match
|
|
2763
|
+
match,
|
|
2764
|
+
null,
|
|
2765
|
+
false
|
|
2754
2766
|
);
|
|
2755
2767
|
if (isResponse(result)) {
|
|
2756
2768
|
return result;
|
|
@@ -2768,7 +2780,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2768
2780
|
return void 0;
|
|
2769
2781
|
}
|
|
2770
2782
|
}
|
|
2771
|
-
async function callQueryHandlers(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch) {
|
|
2783
|
+
async function callQueryHandlers(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) {
|
|
2772
2784
|
invariant(
|
|
2773
2785
|
request.signal,
|
|
2774
2786
|
"query()/queryRoute() requests must contain an AbortController signal"
|
|
@@ -2782,7 +2794,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2782
2794
|
requestContext,
|
|
2783
2795
|
dataStrategy,
|
|
2784
2796
|
skipLoaderErrorBubbling,
|
|
2785
|
-
routeMatch != null
|
|
2797
|
+
routeMatch != null,
|
|
2798
|
+
filterMatchesToLoad,
|
|
2799
|
+
skipRevalidation
|
|
2786
2800
|
);
|
|
2787
2801
|
return result2;
|
|
2788
2802
|
}
|
|
@@ -2792,7 +2806,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2792
2806
|
requestContext,
|
|
2793
2807
|
dataStrategy,
|
|
2794
2808
|
skipLoaderErrorBubbling,
|
|
2795
|
-
routeMatch
|
|
2809
|
+
routeMatch,
|
|
2810
|
+
filterMatchesToLoad
|
|
2796
2811
|
);
|
|
2797
2812
|
return isResponse(result) ? result : {
|
|
2798
2813
|
...result,
|
|
@@ -2812,7 +2827,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2812
2827
|
throw e;
|
|
2813
2828
|
}
|
|
2814
2829
|
}
|
|
2815
|
-
async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {
|
|
2830
|
+
async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest, filterMatchesToLoad, skipRevalidation) {
|
|
2816
2831
|
let result;
|
|
2817
2832
|
if (!actionMatch.route.action && !actionMatch.route.lazy) {
|
|
2818
2833
|
let error = getInternalRouterError(405, {
|
|
@@ -2866,6 +2881,36 @@ function createStaticHandler(routes, opts) {
|
|
|
2866
2881
|
actionHeaders: {}
|
|
2867
2882
|
};
|
|
2868
2883
|
}
|
|
2884
|
+
if (skipRevalidation) {
|
|
2885
|
+
if (isErrorResult(result)) {
|
|
2886
|
+
let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);
|
|
2887
|
+
return {
|
|
2888
|
+
matches,
|
|
2889
|
+
loaderData: {},
|
|
2890
|
+
actionData: null,
|
|
2891
|
+
errors: {
|
|
2892
|
+
[boundaryMatch.route.id]: result.error
|
|
2893
|
+
},
|
|
2894
|
+
statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,
|
|
2895
|
+
loaderHeaders: {},
|
|
2896
|
+
actionHeaders: {
|
|
2897
|
+
...result.headers ? { [actionMatch.route.id]: result.headers } : {}
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
} else {
|
|
2901
|
+
return {
|
|
2902
|
+
matches,
|
|
2903
|
+
loaderData: {},
|
|
2904
|
+
actionData: {
|
|
2905
|
+
[actionMatch.route.id]: result.data
|
|
2906
|
+
},
|
|
2907
|
+
errors: null,
|
|
2908
|
+
statusCode: result.statusCode || 200,
|
|
2909
|
+
loaderHeaders: {},
|
|
2910
|
+
actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}
|
|
2911
|
+
};
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2869
2914
|
let loaderRequest = new Request(request.url, {
|
|
2870
2915
|
headers: request.headers,
|
|
2871
2916
|
redirect: request.redirect,
|
|
@@ -2880,6 +2925,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2880
2925
|
dataStrategy,
|
|
2881
2926
|
skipLoaderErrorBubbling,
|
|
2882
2927
|
null,
|
|
2928
|
+
filterMatchesToLoad,
|
|
2883
2929
|
[boundaryMatch.route.id, result]
|
|
2884
2930
|
);
|
|
2885
2931
|
return {
|
|
@@ -2897,7 +2943,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2897
2943
|
requestContext,
|
|
2898
2944
|
dataStrategy,
|
|
2899
2945
|
skipLoaderErrorBubbling,
|
|
2900
|
-
null
|
|
2946
|
+
null,
|
|
2947
|
+
filterMatchesToLoad
|
|
2901
2948
|
);
|
|
2902
2949
|
return {
|
|
2903
2950
|
...handlerContext,
|
|
@@ -2909,7 +2956,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2909
2956
|
actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}
|
|
2910
2957
|
};
|
|
2911
2958
|
}
|
|
2912
|
-
async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {
|
|
2959
|
+
async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) {
|
|
2913
2960
|
let isRouteRequest = routeMatch != null;
|
|
2914
2961
|
if (isRouteRequest && !routeMatch?.route.loader && !routeMatch?.route.lazy) {
|
|
2915
2962
|
throw getInternalRouterError(400, {
|
|
@@ -2920,7 +2967,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2920
2967
|
}
|
|
2921
2968
|
let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;
|
|
2922
2969
|
let matchesToLoad = requestMatches.filter(
|
|
2923
|
-
(m) => m.route.loader || m.route.lazy
|
|
2970
|
+
(m) => (m.route.loader || m.route.lazy) && (!filterMatchesToLoad || filterMatchesToLoad(m))
|
|
2924
2971
|
);
|
|
2925
2972
|
if (matchesToLoad.length === 0) {
|
|
2926
2973
|
return {
|
|
@@ -7240,7 +7287,7 @@ function mergeRefs(...refs) {
|
|
|
7240
7287
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7241
7288
|
try {
|
|
7242
7289
|
if (isBrowser) {
|
|
7243
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7290
|
+
window.__reactRouterVersion = "0.0.0-experimental-7a19e47ea";
|
|
7244
7291
|
}
|
|
7245
7292
|
} catch (e) {
|
|
7246
7293
|
}
|
|
@@ -8982,6 +9029,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
8982
9029
|
let result = await staticHandler.query(handlerRequest, {
|
|
8983
9030
|
requestContext: loadContext,
|
|
8984
9031
|
skipLoaderErrorBubbling: true,
|
|
9032
|
+
skipRevalidation: true,
|
|
8985
9033
|
async respond(context) {
|
|
8986
9034
|
let headers = getDocumentHeaders(build, context);
|
|
8987
9035
|
if (isRedirectStatusCode(context.statusCode) && headers.has("Location")) {
|
|
@@ -9046,9 +9094,11 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
9046
9094
|
headers: request.headers,
|
|
9047
9095
|
signal: request.signal
|
|
9048
9096
|
});
|
|
9049
|
-
let
|
|
9097
|
+
let routesParam = new URL(request.url).searchParams.get("_routes");
|
|
9098
|
+
let loadRouteIds = routesParam ? new Set(routesParam.split(",")) : null;
|
|
9050
9099
|
let result = await staticHandler.query(handlerRequest, {
|
|
9051
9100
|
requestContext: loadContext,
|
|
9101
|
+
filterMatchesToLoad: (m) => !loadRouteIds || loadRouteIds.has(m.route.id),
|
|
9052
9102
|
skipLoaderErrorBubbling: true,
|
|
9053
9103
|
async respond(context) {
|
|
9054
9104
|
let headers = getDocumentHeaders(build, context);
|
|
@@ -9074,9 +9124,9 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
9074
9124
|
context.errors = sanitizeErrors(context.errors, serverMode);
|
|
9075
9125
|
}
|
|
9076
9126
|
let results = {};
|
|
9077
|
-
let loadedMatches =
|
|
9078
|
-
(m) => m.route.loader && loadRouteIds.
|
|
9079
|
-
)
|
|
9127
|
+
let loadedMatches = context.matches.filter(
|
|
9128
|
+
(m) => m.route.loader && (!loadRouteIds || loadRouteIds.has(m.route.id))
|
|
9129
|
+
);
|
|
9080
9130
|
loadedMatches.forEach((m) => {
|
|
9081
9131
|
let { id } = m.route;
|
|
9082
9132
|
if (context.errors && context.errors.hasOwnProperty(id)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './fog-of-war-
|
|
3
|
-
import { D as DefaultRouterContext } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-CwUW4KXx.mjs';
|
|
3
|
+
import { D as DefaultRouterContext } from './route-data-DjQzWkWv.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 { D as DefaultRouterContext } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './fog-of-war-DyaXlex4.js';
|
|
3
|
+
import { D as DefaultRouterContext } from './route-data-DjQzWkWv.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-7a19e47ea
|
|
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-4Q4PRAMB.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 { q as RouteObject, D as DefaultRouterContext, F as FutureConfig$1, H as HydrationState, I as InitialEntry, b as DataStrategyFunction, ap as PatchRoutesOnNavigationFunction, a as Router$1, T as To, j as RelativeRoutingType, y as NonIndexRouteObject, a3 as LazyRouteFunction, x as IndexRouteObject, k as Location, l as Action, ao as Navigator, ar as RouteMatch, u as StaticHandlerContext, g as RouteManifest, R as RouteModules, an as DataRouteObject, aK as RouteModule, a2 as HTMLFormMethod, a0 as FormEncType, aw as PageLinkDescriptor, aL as History, E as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { q as RouteObject, D as DefaultRouterContext, F as FutureConfig$1, H as HydrationState, I as InitialEntry, b as DataStrategyFunction, ap as PatchRoutesOnNavigationFunction, a as Router$1, T as To, j as RelativeRoutingType, y as NonIndexRouteObject, a3 as LazyRouteFunction, x as IndexRouteObject, k as Location, l as Action, ao as Navigator, ar as RouteMatch, u as StaticHandlerContext, g as RouteManifest, R as RouteModules, an as DataRouteObject, aK as RouteModule, a2 as HTMLFormMethod, a0 as FormEncType, aw as PageLinkDescriptor, aL as History, E as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-DjQzWkWv.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { q as RouteObject, D as DefaultRouterContext, F as FutureConfig$1, H as HydrationState, I as InitialEntry, b as DataStrategyFunction, ap as PatchRoutesOnNavigationFunction, a as Router$1, T as To, j as RelativeRoutingType, y as NonIndexRouteObject, a3 as LazyRouteFunction, x as IndexRouteObject, k as Location, l as Action, ao as Navigator, ar as RouteMatch, u as StaticHandlerContext, g as RouteManifest, R as RouteModules, an as DataRouteObject, aK as RouteModule, a2 as HTMLFormMethod, a0 as FormEncType, aw as PageLinkDescriptor, aL as History, E as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { q as RouteObject, D as DefaultRouterContext, F as FutureConfig$1, H as HydrationState, I as InitialEntry, b as DataStrategyFunction, ap as PatchRoutesOnNavigationFunction, a as Router$1, T as To, j as RelativeRoutingType, y as NonIndexRouteObject, a3 as LazyRouteFunction, x as IndexRouteObject, k as Location, l as Action, ao as Navigator, ar as RouteMatch, u as StaticHandlerContext, g as RouteManifest, R as RouteModules, an as DataRouteObject, aK as RouteModule, a2 as HTMLFormMethod, a0 as FormEncType, aw as PageLinkDescriptor, aL as History, E as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-DjQzWkWv.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RouteModules, a as Router, b as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, M as MiddlewareFunction, C as ClientActionFunction, c as ClientLoaderFunction, d as ClientMiddlewareFunction, e as LinksFunction, f as MetaFunction, g as RouteManifest, h as LoaderFunctionArgs, i as ActionFunctionArgs, T as To, j as RelativeRoutingType, k as Location, l as Action, P as ParamParseKey, m as Path, n as PathPattern, o as PathMatch, N as NavigateOptions, p as Params, q as RouteObject, r as Navigation, s as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, t as Blocker, u as StaticHandlerContext, v as StaticHandler, F as FutureConfig$1, w as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, x as IndexRouteObject, y as NonIndexRouteObject, z as RouterState } from './route-data-
|
|
2
|
-
export { as as ClientActionFunctionArgs, at as ClientLoaderFunctionArgs, am as DataRouteMatch, an as DataRouteObject, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, J as Fetcher, a0 as FormEncType, a1 as FormMethod, G as GetScrollPositionFunction, E as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ax as HtmlLinkDescriptor, ac as IDLE_BLOCKER, ab as IDLE_FETCHER, aa as IDLE_NAVIGATION, a3 as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, K as NavigationStates, ao as Navigator, aw as PageLinkDescriptor, ap as PatchRoutesOnNavigationFunction, aq as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, ar as RouteMatch, W as RouterFetchOptions, O as RouterInit, V as RouterNavigateOptions, Q as RouterSubscriber, a6 as ShouldRevalidateFunction, a7 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a8 as createPath, ad as data, ae as generatePath, af as isRouteErrorResponse, ag as matchPath, ah as matchRoutes, a9 as parsePath, ai as redirect, aj as redirectDocument, ak as replace, al as resolvePath } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-
|
|
4
|
-
export { g as Await, b as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, x as FormProps, T as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, t as LinkProps, ad as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ac as Meta, W as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af 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, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, ai as UNSAFE_FrameworkContext, al as UNSAFE_createClientRoutes, am as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aj as UNSAFE_getPatchRoutesOnNavigationFunction, ah as UNSAFE_mapRouteProperties, an as UNSAFE_shouldHydrateRouteLoader, ak as UNSAFE_useFogOFWarDiscovery, ao as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { R as RouteModules, a as Router, b as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, M as MiddlewareFunction, C as ClientActionFunction, c as ClientLoaderFunction, d as ClientMiddlewareFunction, e as LinksFunction, f as MetaFunction, g as RouteManifest, h as LoaderFunctionArgs, i as ActionFunctionArgs, T as To, j as RelativeRoutingType, k as Location, l as Action, P as ParamParseKey, m as Path, n as PathPattern, o as PathMatch, N as NavigateOptions, p as Params, q as RouteObject, r as Navigation, s as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, t as Blocker, u as StaticHandlerContext, v as StaticHandler, F as FutureConfig$1, w as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, x as IndexRouteObject, y as NonIndexRouteObject, z as RouterState } from './route-data-DjQzWkWv.mjs';
|
|
2
|
+
export { as as ClientActionFunctionArgs, at as ClientLoaderFunctionArgs, am as DataRouteMatch, an as DataRouteObject, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, J as Fetcher, a0 as FormEncType, a1 as FormMethod, G as GetScrollPositionFunction, E as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ax as HtmlLinkDescriptor, ac as IDLE_BLOCKER, ab as IDLE_FETCHER, aa as IDLE_NAVIGATION, a3 as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, K as NavigationStates, ao as Navigator, aw as PageLinkDescriptor, ap as PatchRoutesOnNavigationFunction, aq as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, ar as RouteMatch, W as RouterFetchOptions, O as RouterInit, V as RouterNavigateOptions, Q as RouterSubscriber, a6 as ShouldRevalidateFunction, a7 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a8 as createPath, ad as data, ae as generatePath, af as isRouteErrorResponse, ag as matchPath, ah as matchRoutes, a9 as parsePath, ai as redirect, aj as redirectDocument, ak as replace, al as resolvePath } from './route-data-DjQzWkWv.mjs';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CwUW4KXx.mjs';
|
|
4
|
+
export { g as Await, b as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, x as FormProps, T as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, t as LinkProps, ad as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ac as Meta, W as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af 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, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, ai as UNSAFE_FrameworkContext, al as UNSAFE_createClientRoutes, am as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aj as UNSAFE_getPatchRoutesOnNavigationFunction, ah as UNSAFE_mapRouteProperties, an as UNSAFE_shouldHydrateRouteLoader, ak as UNSAFE_useFogOFWarDiscovery, ao as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-CwUW4KXx.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { A as AppLoadContext } from './data-CQbyyGzl.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RouteModules, a as Router, b as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, M as MiddlewareFunction, C as ClientActionFunction, c as ClientLoaderFunction, d as ClientMiddlewareFunction, e as LinksFunction, f as MetaFunction, g as RouteManifest, h as LoaderFunctionArgs, i as ActionFunctionArgs, T as To, j as RelativeRoutingType, k as Location, l as Action, P as ParamParseKey, m as Path, n as PathPattern, o as PathMatch, N as NavigateOptions, p as Params, q as RouteObject, r as Navigation, s as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, t as Blocker, u as StaticHandlerContext, v as StaticHandler, F as FutureConfig$1, w as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, x as IndexRouteObject, y as NonIndexRouteObject, z as RouterState } from './route-data-
|
|
2
|
-
export { as as ClientActionFunctionArgs, at as ClientLoaderFunctionArgs, am as DataRouteMatch, an as DataRouteObject, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, J as Fetcher, a0 as FormEncType, a1 as FormMethod, G as GetScrollPositionFunction, E as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ax as HtmlLinkDescriptor, ac as IDLE_BLOCKER, ab as IDLE_FETCHER, aa as IDLE_NAVIGATION, a3 as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, K as NavigationStates, ao as Navigator, aw as PageLinkDescriptor, ap as PatchRoutesOnNavigationFunction, aq as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, ar as RouteMatch, W as RouterFetchOptions, O as RouterInit, V as RouterNavigateOptions, Q as RouterSubscriber, a6 as ShouldRevalidateFunction, a7 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a8 as createPath, ad as data, ae as generatePath, af as isRouteErrorResponse, ag as matchPath, ah as matchRoutes, a9 as parsePath, ai as redirect, aj as redirectDocument, ak as replace, al as resolvePath } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-
|
|
4
|
-
export { g as Await, b as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, x as FormProps, T as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, t as LinkProps, ad as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ac as Meta, W as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af 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, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, ai as UNSAFE_FrameworkContext, al as UNSAFE_createClientRoutes, am as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aj as UNSAFE_getPatchRoutesOnNavigationFunction, ah as UNSAFE_mapRouteProperties, an as UNSAFE_shouldHydrateRouteLoader, ak as UNSAFE_useFogOFWarDiscovery, ao as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-
|
|
1
|
+
import { R as RouteModules, a as Router, b as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, M as MiddlewareFunction, C as ClientActionFunction, c as ClientLoaderFunction, d as ClientMiddlewareFunction, e as LinksFunction, f as MetaFunction, g as RouteManifest, h as LoaderFunctionArgs, i as ActionFunctionArgs, T as To, j as RelativeRoutingType, k as Location, l as Action, P as ParamParseKey, m as Path, n as PathPattern, o as PathMatch, N as NavigateOptions, p as Params, q as RouteObject, r as Navigation, s as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, t as Blocker, u as StaticHandlerContext, v as StaticHandler, F as FutureConfig$1, w as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, x as IndexRouteObject, y as NonIndexRouteObject, z as RouterState } from './route-data-DjQzWkWv.js';
|
|
2
|
+
export { as as ClientActionFunctionArgs, at as ClientLoaderFunctionArgs, am as DataRouteMatch, an as DataRouteObject, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, J as Fetcher, a0 as FormEncType, a1 as FormMethod, G as GetScrollPositionFunction, E as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ax as HtmlLinkDescriptor, ac as IDLE_BLOCKER, ab as IDLE_FETCHER, aa as IDLE_NAVIGATION, a3 as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, K as NavigationStates, ao as Navigator, aw as PageLinkDescriptor, ap as PatchRoutesOnNavigationFunction, aq as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, ar as RouteMatch, W as RouterFetchOptions, O as RouterInit, V as RouterNavigateOptions, Q as RouterSubscriber, a6 as ShouldRevalidateFunction, a7 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a8 as createPath, ad as data, ae as generatePath, af as isRouteErrorResponse, ag as matchPath, ah as matchRoutes, a9 as parsePath, ai as redirect, aj as redirectDocument, ak as replace, al as resolvePath } from './route-data-DjQzWkWv.js';
|
|
3
|
+
import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-DyaXlex4.js';
|
|
4
|
+
export { g as Await, b as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, x as FormProps, T as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, t as LinkProps, ad as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ac as Meta, W as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af 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, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, ai as UNSAFE_FrameworkContext, al as UNSAFE_createClientRoutes, am as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, aj as UNSAFE_getPatchRoutesOnNavigationFunction, ah as UNSAFE_mapRouteProperties, an as UNSAFE_shouldHydrateRouteLoader, ak as UNSAFE_useFogOFWarDiscovery, ao as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './fog-of-war-DyaXlex4.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { A as AppLoadContext } from './data-CQbyyGzl.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-7a19e47ea
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2726,7 +2726,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2726
2726
|
);
|
|
2727
2727
|
async function query(request, {
|
|
2728
2728
|
requestContext,
|
|
2729
|
+
filterMatchesToLoad,
|
|
2729
2730
|
skipLoaderErrorBubbling,
|
|
2731
|
+
skipRevalidation,
|
|
2730
2732
|
dataStrategy,
|
|
2731
2733
|
respond
|
|
2732
2734
|
} = {}) {
|
|
@@ -2769,6 +2771,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2769
2771
|
};
|
|
2770
2772
|
} else if (respond) {
|
|
2771
2773
|
try {
|
|
2774
|
+
let tailIdx = [...matches].reverse().findIndex((m) => !filterMatchesToLoad || filterMatchesToLoad(m));
|
|
2775
|
+
let lowestLoadingIdx = tailIdx < 0 ? 0 : matches.length - 1 - tailIdx;
|
|
2772
2776
|
let response = await runMiddlewarePipeline(
|
|
2773
2777
|
{
|
|
2774
2778
|
request,
|
|
@@ -2776,7 +2780,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2776
2780
|
params: matches[0].params,
|
|
2777
2781
|
context: requestContext
|
|
2778
2782
|
},
|
|
2779
|
-
|
|
2783
|
+
lowestLoadingIdx,
|
|
2780
2784
|
true,
|
|
2781
2785
|
async () => {
|
|
2782
2786
|
let result = await callQueryHandlers(
|
|
@@ -2786,7 +2790,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2786
2790
|
requestContext,
|
|
2787
2791
|
dataStrategy || defaultDataStrategyWithoutMiddleware,
|
|
2788
2792
|
skipLoaderErrorBubbling === true,
|
|
2789
|
-
null
|
|
2793
|
+
null,
|
|
2794
|
+
filterMatchesToLoad || null,
|
|
2795
|
+
skipRevalidation === true
|
|
2790
2796
|
);
|
|
2791
2797
|
if (isResponse(result)) {
|
|
2792
2798
|
return result;
|
|
@@ -2815,7 +2821,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2815
2821
|
requestContext,
|
|
2816
2822
|
dataStrategy || null,
|
|
2817
2823
|
skipLoaderErrorBubbling === true,
|
|
2818
|
-
null
|
|
2824
|
+
null,
|
|
2825
|
+
filterMatchesToLoad || null,
|
|
2826
|
+
skipRevalidation === true
|
|
2819
2827
|
);
|
|
2820
2828
|
if (isResponse(result)) {
|
|
2821
2829
|
return result;
|
|
@@ -2874,7 +2882,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2874
2882
|
requestContext,
|
|
2875
2883
|
dataStrategy || defaultDataStrategyWithoutMiddleware,
|
|
2876
2884
|
false,
|
|
2877
|
-
match
|
|
2885
|
+
match,
|
|
2886
|
+
null,
|
|
2887
|
+
false
|
|
2878
2888
|
);
|
|
2879
2889
|
if (isResponse(result)) {
|
|
2880
2890
|
return result;
|
|
@@ -2895,7 +2905,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2895
2905
|
requestContext,
|
|
2896
2906
|
dataStrategy || null,
|
|
2897
2907
|
false,
|
|
2898
|
-
match
|
|
2908
|
+
match,
|
|
2909
|
+
null,
|
|
2910
|
+
false
|
|
2899
2911
|
);
|
|
2900
2912
|
if (isResponse(result)) {
|
|
2901
2913
|
return result;
|
|
@@ -2913,7 +2925,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2913
2925
|
return void 0;
|
|
2914
2926
|
}
|
|
2915
2927
|
}
|
|
2916
|
-
async function callQueryHandlers(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch) {
|
|
2928
|
+
async function callQueryHandlers(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) {
|
|
2917
2929
|
invariant(
|
|
2918
2930
|
request.signal,
|
|
2919
2931
|
"query()/queryRoute() requests must contain an AbortController signal"
|
|
@@ -2927,7 +2939,9 @@ function createStaticHandler(routes, opts) {
|
|
|
2927
2939
|
requestContext,
|
|
2928
2940
|
dataStrategy,
|
|
2929
2941
|
skipLoaderErrorBubbling,
|
|
2930
|
-
routeMatch != null
|
|
2942
|
+
routeMatch != null,
|
|
2943
|
+
filterMatchesToLoad,
|
|
2944
|
+
skipRevalidation
|
|
2931
2945
|
);
|
|
2932
2946
|
return result2;
|
|
2933
2947
|
}
|
|
@@ -2937,7 +2951,8 @@ function createStaticHandler(routes, opts) {
|
|
|
2937
2951
|
requestContext,
|
|
2938
2952
|
dataStrategy,
|
|
2939
2953
|
skipLoaderErrorBubbling,
|
|
2940
|
-
routeMatch
|
|
2954
|
+
routeMatch,
|
|
2955
|
+
filterMatchesToLoad
|
|
2941
2956
|
);
|
|
2942
2957
|
return isResponse(result) ? result : {
|
|
2943
2958
|
...result,
|
|
@@ -2957,7 +2972,7 @@ function createStaticHandler(routes, opts) {
|
|
|
2957
2972
|
throw e;
|
|
2958
2973
|
}
|
|
2959
2974
|
}
|
|
2960
|
-
async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {
|
|
2975
|
+
async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest, filterMatchesToLoad, skipRevalidation) {
|
|
2961
2976
|
let result;
|
|
2962
2977
|
if (!actionMatch.route.action && !actionMatch.route.lazy) {
|
|
2963
2978
|
let error = getInternalRouterError(405, {
|
|
@@ -3011,6 +3026,36 @@ function createStaticHandler(routes, opts) {
|
|
|
3011
3026
|
actionHeaders: {}
|
|
3012
3027
|
};
|
|
3013
3028
|
}
|
|
3029
|
+
if (skipRevalidation) {
|
|
3030
|
+
if (isErrorResult(result)) {
|
|
3031
|
+
let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);
|
|
3032
|
+
return {
|
|
3033
|
+
matches,
|
|
3034
|
+
loaderData: {},
|
|
3035
|
+
actionData: null,
|
|
3036
|
+
errors: {
|
|
3037
|
+
[boundaryMatch.route.id]: result.error
|
|
3038
|
+
},
|
|
3039
|
+
statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,
|
|
3040
|
+
loaderHeaders: {},
|
|
3041
|
+
actionHeaders: {
|
|
3042
|
+
...result.headers ? { [actionMatch.route.id]: result.headers } : {}
|
|
3043
|
+
}
|
|
3044
|
+
};
|
|
3045
|
+
} else {
|
|
3046
|
+
return {
|
|
3047
|
+
matches,
|
|
3048
|
+
loaderData: {},
|
|
3049
|
+
actionData: {
|
|
3050
|
+
[actionMatch.route.id]: result.data
|
|
3051
|
+
},
|
|
3052
|
+
errors: null,
|
|
3053
|
+
statusCode: result.statusCode || 200,
|
|
3054
|
+
loaderHeaders: {},
|
|
3055
|
+
actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}
|
|
3056
|
+
};
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3014
3059
|
let loaderRequest = new Request(request.url, {
|
|
3015
3060
|
headers: request.headers,
|
|
3016
3061
|
redirect: request.redirect,
|
|
@@ -3025,6 +3070,7 @@ function createStaticHandler(routes, opts) {
|
|
|
3025
3070
|
dataStrategy,
|
|
3026
3071
|
skipLoaderErrorBubbling,
|
|
3027
3072
|
null,
|
|
3073
|
+
filterMatchesToLoad,
|
|
3028
3074
|
[boundaryMatch.route.id, result]
|
|
3029
3075
|
);
|
|
3030
3076
|
return {
|
|
@@ -3042,7 +3088,8 @@ function createStaticHandler(routes, opts) {
|
|
|
3042
3088
|
requestContext,
|
|
3043
3089
|
dataStrategy,
|
|
3044
3090
|
skipLoaderErrorBubbling,
|
|
3045
|
-
null
|
|
3091
|
+
null,
|
|
3092
|
+
filterMatchesToLoad
|
|
3046
3093
|
);
|
|
3047
3094
|
return {
|
|
3048
3095
|
...handlerContext,
|
|
@@ -3054,7 +3101,7 @@ function createStaticHandler(routes, opts) {
|
|
|
3054
3101
|
actionHeaders: result.headers ? { [actionMatch.route.id]: result.headers } : {}
|
|
3055
3102
|
};
|
|
3056
3103
|
}
|
|
3057
|
-
async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {
|
|
3104
|
+
async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, pendingActionResult) {
|
|
3058
3105
|
let isRouteRequest = routeMatch != null;
|
|
3059
3106
|
if (isRouteRequest && !routeMatch?.route.loader && !routeMatch?.route.lazy) {
|
|
3060
3107
|
throw getInternalRouterError(400, {
|
|
@@ -3065,7 +3112,7 @@ function createStaticHandler(routes, opts) {
|
|
|
3065
3112
|
}
|
|
3066
3113
|
let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;
|
|
3067
3114
|
let matchesToLoad = requestMatches.filter(
|
|
3068
|
-
(m) => m.route.loader || m.route.lazy
|
|
3115
|
+
(m) => (m.route.loader || m.route.lazy) && (!filterMatchesToLoad || filterMatchesToLoad(m))
|
|
3069
3116
|
);
|
|
3070
3117
|
if (matchesToLoad.length === 0) {
|
|
3071
3118
|
return {
|
|
@@ -7385,7 +7432,7 @@ function mergeRefs(...refs) {
|
|
|
7385
7432
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
7386
7433
|
try {
|
|
7387
7434
|
if (isBrowser) {
|
|
7388
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
7435
|
+
window.__reactRouterVersion = "0.0.0-experimental-7a19e47ea";
|
|
7389
7436
|
}
|
|
7390
7437
|
} catch (e) {
|
|
7391
7438
|
}
|
|
@@ -9127,6 +9174,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
9127
9174
|
let result = await staticHandler.query(handlerRequest, {
|
|
9128
9175
|
requestContext: loadContext,
|
|
9129
9176
|
skipLoaderErrorBubbling: true,
|
|
9177
|
+
skipRevalidation: true,
|
|
9130
9178
|
async respond(context) {
|
|
9131
9179
|
let headers = getDocumentHeaders(build, context);
|
|
9132
9180
|
if (isRedirectStatusCode(context.statusCode) && headers.has("Location")) {
|
|
@@ -9191,9 +9239,11 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
9191
9239
|
headers: request.headers,
|
|
9192
9240
|
signal: request.signal
|
|
9193
9241
|
});
|
|
9194
|
-
let
|
|
9242
|
+
let routesParam = new URL(request.url).searchParams.get("_routes");
|
|
9243
|
+
let loadRouteIds = routesParam ? new Set(routesParam.split(",")) : null;
|
|
9195
9244
|
let result = await staticHandler.query(handlerRequest, {
|
|
9196
9245
|
requestContext: loadContext,
|
|
9246
|
+
filterMatchesToLoad: (m) => !loadRouteIds || loadRouteIds.has(m.route.id),
|
|
9197
9247
|
skipLoaderErrorBubbling: true,
|
|
9198
9248
|
async respond(context) {
|
|
9199
9249
|
let headers = getDocumentHeaders(build, context);
|
|
@@ -9219,9 +9269,9 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
9219
9269
|
context.errors = sanitizeErrors(context.errors, serverMode);
|
|
9220
9270
|
}
|
|
9221
9271
|
let results = {};
|
|
9222
|
-
let loadedMatches =
|
|
9223
|
-
(m) => m.route.loader && loadRouteIds.
|
|
9224
|
-
)
|
|
9272
|
+
let loadedMatches = context.matches.filter(
|
|
9273
|
+
(m) => m.route.loader && (!loadRouteIds || loadRouteIds.has(m.route.id))
|
|
9274
|
+
);
|
|
9225
9275
|
loadedMatches.forEach((m) => {
|
|
9226
9276
|
let { id } = m.route;
|
|
9227
9277
|
if (context.errors && context.errors.hasOwnProperty(id)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-7a19e47ea
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
useSearchParams,
|
|
121
121
|
useSubmit,
|
|
122
122
|
useViewTransitionState
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-4Q4PRAMB.mjs";
|
|
124
124
|
export {
|
|
125
125
|
Await,
|
|
126
126
|
BrowserRouter,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, M as MiddlewareFunction, d as ClientMiddlewareFunction, aP as Equal, aQ as Pretty } from '../../route-data-
|
|
1
|
+
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, M as MiddlewareFunction, d as ClientMiddlewareFunction, aP as Equal, aQ as Pretty } from '../../route-data-DjQzWkWv.mjs';
|
|
2
2
|
import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, M as MiddlewareFunction, d as ClientMiddlewareFunction, aP as Equal, aQ as Pretty } from '../../route-data-
|
|
1
|
+
import { ay as LinkDescriptor, av as MetaDescriptor, aM as ServerDataFrom, aN as ClientDataFrom, aO as Func, M as MiddlewareFunction, d as ClientMiddlewareFunction, aP as Equal, aQ as Pretty } from '../../route-data-DjQzWkWv.js';
|
|
2
2
|
import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
@@ -914,7 +914,9 @@ interface StaticHandler {
|
|
|
914
914
|
dataRoutes: AgnosticDataRouteObject[];
|
|
915
915
|
query(request: Request, opts?: {
|
|
916
916
|
requestContext?: unknown;
|
|
917
|
+
filterMatchesToLoad?: (match: AgnosticDataRouteMatch) => boolean;
|
|
917
918
|
skipLoaderErrorBubbling?: boolean;
|
|
919
|
+
skipRevalidation?: boolean;
|
|
918
920
|
dataStrategy?: DataStrategyFunction;
|
|
919
921
|
respond?: (staticContext: StaticHandlerContext) => Promise<Response>;
|
|
920
922
|
}): Promise<StaticHandlerContext | Response>;
|
|
@@ -914,7 +914,9 @@ interface StaticHandler {
|
|
|
914
914
|
dataRoutes: AgnosticDataRouteObject[];
|
|
915
915
|
query(request: Request, opts?: {
|
|
916
916
|
requestContext?: unknown;
|
|
917
|
+
filterMatchesToLoad?: (match: AgnosticDataRouteMatch) => boolean;
|
|
917
918
|
skipLoaderErrorBubbling?: boolean;
|
|
919
|
+
skipRevalidation?: boolean;
|
|
918
920
|
dataStrategy?: DataStrategyFunction;
|
|
919
921
|
respond?: (staticContext: StaticHandlerContext) => Promise<Response>;
|
|
920
922
|
}): Promise<StaticHandlerContext | Response>;
|