react-router 0.0.0-experimental-2a6c7bc → 0.0.0-experimental-e89ad3012
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-VEWXUMGM.mjs → chunk-3O4L5GVQ.mjs} +90 -125
- package/dist/development/{chunk-JRLTRGBE.js → chunk-JJHCVRDZ.js} +89 -124
- package/dist/development/{chunk-GSZ4XTPZ.js → chunk-ROJMZUUV.js} +130 -130
- package/dist/{production/chunk-ATNMTWNA.mjs → development/chunk-XKV32KFX.mjs} +157 -141
- package/dist/development/{components-CFzgj3gZ.d.mts → components-BkK38HPd.d.mts} +16 -16
- package/dist/development/{context-AvZz33Zq.d.mts → context-CphUWOpx.d.mts} +238 -22
- package/dist/development/dom-export.d.mts +3 -3
- package/dist/development/dom-export.d.ts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-DIZWnqdE.d.ts → development/index-react-server-client-D-lyvxf_.d.ts} +25 -26
- package/dist/{production/index-react-server-client-BuCmY0hu.d.mts → development/index-react-server-client-pe1TAKAq.d.mts} +12 -13
- package/dist/development/index-react-server-client.d.mts +4 -4
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +193 -14
- package/dist/development/index-react-server.d.ts +193 -14
- package/dist/development/index-react-server.js +115 -147
- package/dist/development/index-react-server.mjs +115 -147
- package/dist/development/index.d.mts +8 -8
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +240 -224
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-BnrIwdAP.d.mts → route-data-DJXZgnJq.d.mts} +1 -1
- package/dist/development/{routeModules-BbH0xTnc.d.ts → routeModules-DH3xUx4Z.d.ts} +238 -22
- package/dist/{development/chunk-M2KD4YIT.mjs → production/chunk-J6PLTU3O.mjs} +157 -141
- package/dist/production/{chunk-3UOGQQWX.js → chunk-NFNPXIQE.js} +89 -124
- package/dist/production/{chunk-P2JVUBYL.mjs → chunk-QI3NR5VQ.mjs} +90 -125
- package/dist/production/{chunk-ZIOZTUIH.js → chunk-X3M2F3OK.js} +130 -130
- package/dist/production/{components-CFzgj3gZ.d.mts → components-BkK38HPd.d.mts} +16 -16
- package/dist/production/{context-AvZz33Zq.d.mts → context-CphUWOpx.d.mts} +238 -22
- package/dist/production/dom-export.d.mts +3 -3
- package/dist/production/dom-export.d.ts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-DIZWnqdE.d.ts → production/index-react-server-client-D-lyvxf_.d.ts} +25 -26
- package/dist/{development/index-react-server-client-BuCmY0hu.d.mts → production/index-react-server-client-pe1TAKAq.d.mts} +12 -13
- package/dist/production/index-react-server-client.d.mts +4 -4
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +193 -14
- package/dist/production/index-react-server.d.ts +193 -14
- package/dist/production/index-react-server.js +115 -147
- package/dist/production/index-react-server.mjs +115 -147
- package/dist/production/index.d.mts +8 -8
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +240 -224
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-BnrIwdAP.d.mts → route-data-DJXZgnJq.d.mts} +1 -1
- package/dist/production/{routeModules-BbH0xTnc.d.ts → routeModules-DH3xUx4Z.d.ts} +238 -22
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export { Await, BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta
|
|
|
6
6
|
import { serialize, parse } from 'cookie';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* react-router v0.0.0-experimental-
|
|
9
|
+
* react-router v0.0.0-experimental-e89ad3012
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Remix Software Inc.
|
|
12
12
|
*
|
|
@@ -92,6 +92,10 @@ function unstable_createContext(defaultValue) {
|
|
|
92
92
|
}
|
|
93
93
|
var _map;
|
|
94
94
|
var unstable_RouterContextProvider = class {
|
|
95
|
+
/**
|
|
96
|
+
* Create a new `unstable_RouterContextProvider` instance
|
|
97
|
+
* @param init An optional initial context map to populate the provider with
|
|
98
|
+
*/
|
|
95
99
|
constructor(init) {
|
|
96
100
|
__privateAdd(this, _map, /* @__PURE__ */ new Map());
|
|
97
101
|
if (init) {
|
|
@@ -100,6 +104,14 @@ var unstable_RouterContextProvider = class {
|
|
|
100
104
|
}
|
|
101
105
|
}
|
|
102
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Access a value from the context. If no value has been set for the
|
|
109
|
+
* context, it will return the context's `defaultValue` if provided, or throw an
|
|
110
|
+
* error if no `defaultValue` was set.
|
|
111
|
+
* @param context The context to get the value for
|
|
112
|
+
* @returns The value for the context, or the contexts `defaultValue` if no
|
|
113
|
+
* value was set
|
|
114
|
+
*/
|
|
103
115
|
get(context) {
|
|
104
116
|
if (__privateGet(this, _map).has(context)) {
|
|
105
117
|
return __privateGet(this, _map).get(context);
|
|
@@ -109,6 +121,14 @@ var unstable_RouterContextProvider = class {
|
|
|
109
121
|
}
|
|
110
122
|
throw new Error("No value found for context");
|
|
111
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Set a value for the context. If the context already has a value set,
|
|
126
|
+
* this will overwrite it.
|
|
127
|
+
*
|
|
128
|
+
* @param context The context to set the value for
|
|
129
|
+
* @param value The value to set for the context
|
|
130
|
+
* @returns {void}
|
|
131
|
+
*/
|
|
112
132
|
set(context, value) {
|
|
113
133
|
__privateGet(this, _map).set(context, value);
|
|
114
134
|
}
|
|
@@ -645,20 +665,13 @@ function createStaticHandler(routes, opts) {
|
|
|
645
665
|
skipLoaderErrorBubbling,
|
|
646
666
|
skipRevalidation,
|
|
647
667
|
dataStrategy,
|
|
648
|
-
|
|
649
|
-
unstable_respond: respond
|
|
668
|
+
unstable_generateMiddlewareResponse: generateMiddlewareResponse
|
|
650
669
|
} = {}) {
|
|
651
670
|
let url = new URL(request.url);
|
|
652
671
|
let method = request.method;
|
|
653
672
|
let location = createLocation("", createPath(url), null, "default");
|
|
654
673
|
let matches = matchRoutes(dataRoutes, location, basename);
|
|
655
674
|
requestContext = requestContext != null ? requestContext : new unstable_RouterContextProvider();
|
|
656
|
-
let shortCircuitResult = (ctx) => {
|
|
657
|
-
return stream ? stream(
|
|
658
|
-
requestContext,
|
|
659
|
-
() => Promise.resolve(ctx)
|
|
660
|
-
) : respond ? respond(ctx) : ctx;
|
|
661
|
-
};
|
|
662
675
|
if (!isValidMethod(method) && method !== "HEAD") {
|
|
663
676
|
let error = getInternalRouterError(405, { method });
|
|
664
677
|
let { matches: methodNotAllowedMatches, route } = getShortCircuitMatches(dataRoutes);
|
|
@@ -675,7 +688,7 @@ function createStaticHandler(routes, opts) {
|
|
|
675
688
|
loaderHeaders: {},
|
|
676
689
|
actionHeaders: {}
|
|
677
690
|
};
|
|
678
|
-
return
|
|
691
|
+
return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;
|
|
679
692
|
} else if (!matches) {
|
|
680
693
|
let error = getInternalRouterError(404, { pathname: location.pathname });
|
|
681
694
|
let { matches: notFoundMatches, route } = getShortCircuitMatches(dataRoutes);
|
|
@@ -692,11 +705,9 @@ function createStaticHandler(routes, opts) {
|
|
|
692
705
|
loaderHeaders: {},
|
|
693
706
|
actionHeaders: {}
|
|
694
707
|
};
|
|
695
|
-
return
|
|
708
|
+
return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;
|
|
696
709
|
}
|
|
697
|
-
if (
|
|
698
|
-
(m) => m.route.unstable_middleware || typeof m.route.lazy === "object" && m.route.lazy.unstable_middleware
|
|
699
|
-
)) {
|
|
710
|
+
if (generateMiddlewareResponse) {
|
|
700
711
|
invariant(
|
|
701
712
|
requestContext instanceof unstable_RouterContextProvider,
|
|
702
713
|
"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"
|
|
@@ -719,43 +730,26 @@ function createStaticHandler(routes, opts) {
|
|
|
719
730
|
},
|
|
720
731
|
true,
|
|
721
732
|
async () => {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
return isResponse(result3) ? result3 : { location, basename, ...result3 };
|
|
733
|
+
let res = await generateMiddlewareResponse(
|
|
734
|
+
async (revalidationRequest) => {
|
|
735
|
+
let result2 = await queryImpl(
|
|
736
|
+
revalidationRequest,
|
|
737
|
+
location,
|
|
738
|
+
matches,
|
|
739
|
+
requestContext,
|
|
740
|
+
dataStrategy || null,
|
|
741
|
+
skipLoaderErrorBubbling === true,
|
|
742
|
+
null,
|
|
743
|
+
filterMatchesToLoad || null,
|
|
744
|
+
skipRevalidation === true
|
|
745
|
+
);
|
|
746
|
+
if (isResponse(result2)) {
|
|
747
|
+
return result2;
|
|
738
748
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
invariant(respond, "Expected respond to be defined");
|
|
743
|
-
let result2 = await queryImpl(
|
|
744
|
-
request,
|
|
745
|
-
location,
|
|
746
|
-
matches,
|
|
747
|
-
requestContext,
|
|
748
|
-
dataStrategy || null,
|
|
749
|
-
skipLoaderErrorBubbling === true,
|
|
750
|
-
null,
|
|
751
|
-
filterMatchesToLoad || null,
|
|
752
|
-
skipRevalidation === true
|
|
749
|
+
renderedStaticContext = { location, basename, ...result2 };
|
|
750
|
+
return renderedStaticContext;
|
|
751
|
+
}
|
|
753
752
|
);
|
|
754
|
-
if (isResponse(result2)) {
|
|
755
|
-
return result2;
|
|
756
|
-
}
|
|
757
|
-
renderedStaticContext = { location, basename, ...result2 };
|
|
758
|
-
let res = await respond(renderedStaticContext);
|
|
759
753
|
return res;
|
|
760
754
|
},
|
|
761
755
|
async (error, routeId) => {
|
|
@@ -772,7 +766,9 @@ function createStaticHandler(routes, opts) {
|
|
|
772
766
|
error,
|
|
773
767
|
skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, routeId).route.id
|
|
774
768
|
);
|
|
775
|
-
return
|
|
769
|
+
return generateMiddlewareResponse(
|
|
770
|
+
() => Promise.resolve(staticContext)
|
|
771
|
+
);
|
|
776
772
|
} else {
|
|
777
773
|
let boundaryRouteId = skipLoaderErrorBubbling ? routeId : findNearestBoundary(
|
|
778
774
|
matches,
|
|
@@ -793,7 +789,9 @@ function createStaticHandler(routes, opts) {
|
|
|
793
789
|
actionHeaders: {},
|
|
794
790
|
loaderHeaders: {}
|
|
795
791
|
};
|
|
796
|
-
return
|
|
792
|
+
return generateMiddlewareResponse(
|
|
793
|
+
() => Promise.resolve(staticContext)
|
|
794
|
+
);
|
|
797
795
|
}
|
|
798
796
|
}
|
|
799
797
|
);
|
|
@@ -826,8 +824,7 @@ function createStaticHandler(routes, opts) {
|
|
|
826
824
|
routeId,
|
|
827
825
|
requestContext,
|
|
828
826
|
dataStrategy,
|
|
829
|
-
|
|
830
|
-
unstable_stream: stream
|
|
827
|
+
unstable_generateMiddlewareResponse: generateMiddlewareResponse
|
|
831
828
|
} = {}) {
|
|
832
829
|
let url = new URL(request.url);
|
|
833
830
|
let method = request.method;
|
|
@@ -848,9 +845,7 @@ function createStaticHandler(routes, opts) {
|
|
|
848
845
|
} else if (!match) {
|
|
849
846
|
throw getInternalRouterError(404, { pathname: location.pathname });
|
|
850
847
|
}
|
|
851
|
-
if (
|
|
852
|
-
(m) => m.route.unstable_middleware || typeof m.route.lazy === "object" && m.route.lazy.unstable_middleware
|
|
853
|
-
)) {
|
|
848
|
+
if (generateMiddlewareResponse) {
|
|
854
849
|
invariant(
|
|
855
850
|
requestContext instanceof unstable_RouterContextProvider,
|
|
856
851
|
"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"
|
|
@@ -867,63 +862,30 @@ function createStaticHandler(routes, opts) {
|
|
|
867
862
|
},
|
|
868
863
|
true,
|
|
869
864
|
async () => {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
return result3;
|
|
887
|
-
}
|
|
888
|
-
let error3 = result3.errors ? Object.values(result3.errors)[0] : void 0;
|
|
889
|
-
if (error3 !== void 0) {
|
|
890
|
-
throw error3;
|
|
891
|
-
}
|
|
892
|
-
let value2 = result3.actionData ? Object.values(result3.actionData)[0] : Object.values(result3.loaderData)[0];
|
|
893
|
-
return typeof value2 === "string" ? new Response(value2) : Response.json(value2);
|
|
894
|
-
}
|
|
895
|
-
);
|
|
896
|
-
return res;
|
|
897
|
-
}
|
|
898
|
-
invariant(respond, "Expected respond to be defined");
|
|
899
|
-
let result2 = await queryImpl(
|
|
900
|
-
request,
|
|
901
|
-
location,
|
|
902
|
-
matches,
|
|
903
|
-
requestContext,
|
|
904
|
-
dataStrategy || null,
|
|
905
|
-
false,
|
|
906
|
-
match,
|
|
907
|
-
null,
|
|
908
|
-
false
|
|
909
|
-
);
|
|
910
|
-
if (isResponse(result2)) {
|
|
911
|
-
return respond(result2);
|
|
912
|
-
}
|
|
913
|
-
let error2 = result2.errors ? Object.values(result2.errors)[0] : void 0;
|
|
914
|
-
if (error2 !== void 0) {
|
|
915
|
-
throw error2;
|
|
916
|
-
}
|
|
917
|
-
let value = result2.actionData ? Object.values(result2.actionData)[0] : Object.values(result2.loaderData)[0];
|
|
918
|
-
return respond(
|
|
919
|
-
typeof value === "string" ? new Response(value) : Response.json(value)
|
|
865
|
+
let res = await generateMiddlewareResponse(
|
|
866
|
+
async (innerRequest) => {
|
|
867
|
+
let result2 = await queryImpl(
|
|
868
|
+
innerRequest,
|
|
869
|
+
location,
|
|
870
|
+
matches,
|
|
871
|
+
requestContext,
|
|
872
|
+
dataStrategy || null,
|
|
873
|
+
false,
|
|
874
|
+
match,
|
|
875
|
+
null,
|
|
876
|
+
false
|
|
877
|
+
);
|
|
878
|
+
let processed = handleQueryResult(result2);
|
|
879
|
+
return isResponse(processed) ? processed : typeof processed === "string" ? new Response(processed) : Response.json(processed);
|
|
880
|
+
}
|
|
920
881
|
);
|
|
882
|
+
return res;
|
|
921
883
|
},
|
|
922
|
-
(
|
|
923
|
-
if (isResponse(
|
|
924
|
-
return
|
|
884
|
+
(error) => {
|
|
885
|
+
if (isResponse(error)) {
|
|
886
|
+
return error;
|
|
925
887
|
}
|
|
926
|
-
throw
|
|
888
|
+
throw error;
|
|
927
889
|
}
|
|
928
890
|
);
|
|
929
891
|
return response;
|
|
@@ -939,20 +901,23 @@ function createStaticHandler(routes, opts) {
|
|
|
939
901
|
null,
|
|
940
902
|
false
|
|
941
903
|
);
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
904
|
+
return handleQueryResult(result);
|
|
905
|
+
function handleQueryResult(result2) {
|
|
906
|
+
if (isResponse(result2)) {
|
|
907
|
+
return result2;
|
|
908
|
+
}
|
|
909
|
+
let error = result2.errors ? Object.values(result2.errors)[0] : void 0;
|
|
910
|
+
if (error !== void 0) {
|
|
911
|
+
throw error;
|
|
912
|
+
}
|
|
913
|
+
if (result2.actionData) {
|
|
914
|
+
return Object.values(result2.actionData)[0];
|
|
915
|
+
}
|
|
916
|
+
if (result2.loaderData) {
|
|
917
|
+
return Object.values(result2.loaderData)[0];
|
|
918
|
+
}
|
|
919
|
+
return void 0;
|
|
954
920
|
}
|
|
955
|
-
return void 0;
|
|
956
921
|
}
|
|
957
922
|
async function queryImpl(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, filterMatchesToLoad, skipRevalidation) {
|
|
958
923
|
invariant(
|
|
@@ -2378,7 +2343,6 @@ async function processServerAction(request, basename, decodeReply, loadServerAct
|
|
|
2378
2343
|
}
|
|
2379
2344
|
}
|
|
2380
2345
|
async function generateResourceResponse(request, routes, basename, routeId, requestContext, onError) {
|
|
2381
|
-
let result;
|
|
2382
2346
|
try {
|
|
2383
2347
|
const staticHandler = createStaticHandler(routes, {
|
|
2384
2348
|
basename
|
|
@@ -2386,41 +2350,45 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
|
|
|
2386
2350
|
let response = await staticHandler.queryRoute(request, {
|
|
2387
2351
|
routeId,
|
|
2388
2352
|
requestContext,
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
} else {
|
|
2397
|
-
result = Response.json(response);
|
|
2353
|
+
async unstable_generateMiddlewareResponse(queryRoute) {
|
|
2354
|
+
try {
|
|
2355
|
+
let response2 = await queryRoute(request);
|
|
2356
|
+
return generateResourceResponse2(response2);
|
|
2357
|
+
} catch (error) {
|
|
2358
|
+
return generateErrorResponse(error);
|
|
2359
|
+
}
|
|
2398
2360
|
}
|
|
2399
|
-
}
|
|
2361
|
+
});
|
|
2362
|
+
return response;
|
|
2400
2363
|
} catch (error) {
|
|
2364
|
+
return generateErrorResponse(error);
|
|
2365
|
+
}
|
|
2366
|
+
function generateErrorResponse(error) {
|
|
2367
|
+
let response;
|
|
2401
2368
|
if (isResponse(error)) {
|
|
2402
|
-
|
|
2369
|
+
response = error;
|
|
2403
2370
|
} else if (isRouteErrorResponse(error)) {
|
|
2404
2371
|
onError?.(error);
|
|
2405
2372
|
const errorMessage = typeof error.data === "string" ? error.data : error.statusText;
|
|
2406
|
-
|
|
2373
|
+
response = new Response(errorMessage, {
|
|
2407
2374
|
status: error.status,
|
|
2408
2375
|
statusText: error.statusText
|
|
2409
2376
|
});
|
|
2410
2377
|
} else {
|
|
2411
2378
|
onError?.(error);
|
|
2412
|
-
|
|
2413
|
-
status: 500
|
|
2414
|
-
});
|
|
2379
|
+
response = new Response("Internal Server Error", { status: 500 });
|
|
2415
2380
|
}
|
|
2381
|
+
return generateResourceResponse2(response);
|
|
2382
|
+
}
|
|
2383
|
+
function generateResourceResponse2(response) {
|
|
2384
|
+
const headers = new Headers(response.headers);
|
|
2385
|
+
headers.set("React-Router-Resource", "true");
|
|
2386
|
+
return new Response(response.body, {
|
|
2387
|
+
status: response.status,
|
|
2388
|
+
statusText: response.statusText,
|
|
2389
|
+
headers
|
|
2390
|
+
});
|
|
2416
2391
|
}
|
|
2417
|
-
const headers = new Headers(result.headers);
|
|
2418
|
-
headers.set("React-Router-Resource", "true");
|
|
2419
|
-
return new Response(result.body, {
|
|
2420
|
-
status: result.status,
|
|
2421
|
-
statusText: result.statusText,
|
|
2422
|
-
headers
|
|
2423
|
-
});
|
|
2424
2392
|
}
|
|
2425
2393
|
async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences) {
|
|
2426
2394
|
let statusCode = 200;
|
|
@@ -2442,7 +2410,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
|
|
|
2442
2410
|
skipLoaderErrorBubbling: isDataRequest,
|
|
2443
2411
|
skipRevalidation: isSubmission,
|
|
2444
2412
|
...routeIdsToLoad ? { filterMatchesToLoad: (m) => routeIdsToLoad.includes(m.route.id) } : null,
|
|
2445
|
-
async
|
|
2413
|
+
async unstable_generateMiddlewareResponse(query) {
|
|
2446
2414
|
let formState;
|
|
2447
2415
|
if (request.method === "POST") {
|
|
2448
2416
|
let result2 = await processServerAction(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as Router, D as DataStrategyFunction, T as To, q as NavigateOptions, B as BlockerFunction, r as Blocker, a as RelativeRoutingType, c as Location, s as ParamParseKey, t as Path, v as PathPattern, w as PathMatch, U as UIMatch, x as Navigation, A as Action, h as Params, f as RouteObject, I as InitialEntry, H as HydrationState, b as IndexRouteObject, l as LoaderFunction, k as ActionFunction, N as NonIndexRouteObject, o as unstable_RouterContextProvider, M as MiddlewareEnabled, S as ShouldRevalidateFunction, e as RouterInit, y as RouterState, P as PatchRoutesOnNavigationFunction, z as DataRouteObject } from './context-
|
|
2
|
-
export { i as ActionFunctionArgs, m as DataRouteMatch, Y as DataStrategyFunctionArgs, Z as DataStrategyMatch, _ as DataStrategyResult, $ as ErrorResponse, K as Fetcher, a0 as FormEncType, a1 as FormMethod, an as Future, G as GetScrollPositionFunction, E as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ac as IDLE_BLOCKER, ab as IDLE_FETCHER, aa as IDLE_NAVIGATION, L as LazyRouteFunction, j as LoaderFunctionArgs, O as NavigationStates, d as Navigator, am as PatchRoutesOnNavigationFunctionArgs, a3 as PathParam, a4 as RedirectFunction, X as RevalidationState, g as RouteMatch, W as RouterFetchOptions, V as RouterNavigateOptions, Q as RouterSubscriber, a6 as ShouldRevalidateFunctionArgs, C as StaticHandler, J as StaticHandlerContext, as as UNSAFE_DataRouterContext, at as UNSAFE_DataRouterStateContext, p as UNSAFE_DataWithResponseInit, ar as UNSAFE_ErrorResponseImpl, au as UNSAFE_FetchersContext, av as UNSAFE_LocationContext, aw as UNSAFE_NavigationContext, ax as UNSAFE_RouteContext, ay as UNSAFE_ViewTransitionContext, ao as UNSAFE_createBrowserHistory, aq as UNSAFE_createRouter, ap 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, n as unstable_MiddlewareFunction, a5 as unstable_RouterContext, a7 as unstable_createContext } from './context-
|
|
3
|
-
import { a as RouteComponentType, H as HydrateFallbackType, E as ErrorBoundaryType } from './components-
|
|
4
|
-
export { f as Await, A as AwaitProps, I as IndexRouteProps, L as LayoutRouteProps, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, P as PathRouteProps, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, W as UNSAFE_WithComponentProps, v as UNSAFE_WithErrorBoundaryProps, t as UNSAFE_WithHydrateFallbackProps, q as UNSAFE_hydrationRouteProperties, s as UNSAFE_mapRouteProperties, w as UNSAFE_withComponentProps, x as UNSAFE_withErrorBoundaryProps, u as UNSAFE_withHydrateFallbackProps, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, r as renderMatches } from './components-
|
|
1
|
+
import { R as Router, D as DataStrategyFunction, T as To, q as NavigateOptions, B as BlockerFunction, r as Blocker, a as RelativeRoutingType, c as Location, s as ParamParseKey, t as Path, v as PathPattern, w as PathMatch, U as UIMatch, x as Navigation, A as Action, h as Params, f as RouteObject, I as InitialEntry, H as HydrationState, b as IndexRouteObject, l as LoaderFunction, k as ActionFunction, N as NonIndexRouteObject, o as unstable_RouterContextProvider, M as MiddlewareEnabled, S as ShouldRevalidateFunction, e as RouterInit, y as RouterState, P as PatchRoutesOnNavigationFunction, z as DataRouteObject } from './context-CphUWOpx.mjs';
|
|
2
|
+
export { i as ActionFunctionArgs, m as DataRouteMatch, Y as DataStrategyFunctionArgs, Z as DataStrategyMatch, _ as DataStrategyResult, $ as ErrorResponse, K as Fetcher, a0 as FormEncType, a1 as FormMethod, an as Future, G as GetScrollPositionFunction, E as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ac as IDLE_BLOCKER, ab as IDLE_FETCHER, aa as IDLE_NAVIGATION, L as LazyRouteFunction, j as LoaderFunctionArgs, O as NavigationStates, d as Navigator, am as PatchRoutesOnNavigationFunctionArgs, a3 as PathParam, a4 as RedirectFunction, X as RevalidationState, g as RouteMatch, W as RouterFetchOptions, V as RouterNavigateOptions, Q as RouterSubscriber, a6 as ShouldRevalidateFunctionArgs, C as StaticHandler, J as StaticHandlerContext, as as UNSAFE_DataRouterContext, at as UNSAFE_DataRouterStateContext, p as UNSAFE_DataWithResponseInit, ar as UNSAFE_ErrorResponseImpl, au as UNSAFE_FetchersContext, av as UNSAFE_LocationContext, aw as UNSAFE_NavigationContext, ax as UNSAFE_RouteContext, ay as UNSAFE_ViewTransitionContext, ao as UNSAFE_createBrowserHistory, aq as UNSAFE_createRouter, ap 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, n as unstable_MiddlewareFunction, a5 as unstable_RouterContext, a7 as unstable_createContext } from './context-CphUWOpx.mjs';
|
|
3
|
+
import { a as RouteComponentType, H as HydrateFallbackType, E as ErrorBoundaryType } from './components-BkK38HPd.mjs';
|
|
4
|
+
export { f as Await, A as AwaitProps, I as IndexRouteProps, L as LayoutRouteProps, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, P as PathRouteProps, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, W as UNSAFE_WithComponentProps, v as UNSAFE_WithErrorBoundaryProps, t as UNSAFE_WithHydrateFallbackProps, q as UNSAFE_hydrationRouteProperties, s as UNSAFE_mapRouteProperties, w as UNSAFE_withComponentProps, x as UNSAFE_withErrorBoundaryProps, u as UNSAFE_withHydrateFallbackProps, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, r as renderMatches } from './components-BkK38HPd.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { ReactElement } from 'react';
|
|
7
|
-
import { c as RouteModules, d as SerializeFrom, e as MetaFunction, f as LinksFunction, A as AppLoadContext, E as Equal, g as ClientActionFunction, h as ClientLoaderFunction, H as HeadersFunction } from './route-data-
|
|
8
|
-
export { i as ClientActionFunctionArgs, j as ClientLoaderFunctionArgs, k as HeadersArgs, n as HtmlLinkDescriptor, L as LinkDescriptor, l as MetaArgs, M as MetaDescriptor, m as PageLinkDescriptor, u as unstable_SerializesTo } from './route-data-
|
|
9
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig, S as ServerBuild } from './index-react-server-client-
|
|
10
|
-
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts,
|
|
7
|
+
import { c as RouteModules, d as SerializeFrom, e as MetaFunction, f as LinksFunction, A as AppLoadContext, E as Equal, g as ClientActionFunction, h as ClientLoaderFunction, H as HeadersFunction } from './route-data-DJXZgnJq.mjs';
|
|
8
|
+
export { i as ClientActionFunctionArgs, j as ClientLoaderFunctionArgs, k as HeadersArgs, n as HtmlLinkDescriptor, L as LinkDescriptor, l as MetaArgs, M as MetaDescriptor, m as PageLinkDescriptor, u as unstable_SerializesTo } from './route-data-DJXZgnJq.mjs';
|
|
9
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig, S as ServerBuild } from './index-react-server-client-pe1TAKAq.mjs';
|
|
10
|
+
export { l as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, a1 as DiscoverBehavior, c as FetcherFormProps, h as FetcherSubmitFunction, G as FetcherSubmitOptions, i as FetcherWithComponents, q as Form, d as FormProps, a2 as HandleDataRequestFunction, a3 as HandleDocumentRequestFunction, a4 as HandleErrorFunction, m as HashRouter, H as HashRouterProps, a as HistoryRouterProps, n as Link, L as LinkProps, X as Links, _ as LinksProps, W as Meta, p as NavLink, N as NavLinkProps, b as NavLinkRenderProps, P as ParamKeyValuePair, a0 as PrefetchBehavior, Z as PrefetchPageLinks, Y as Scripts, $ as ScriptsProps, r as ScrollRestoration, e as ScrollRestorationProps, a5 as ServerEntryModule, f as SetURLSearchParams, T as StaticRouter, M as StaticRouterProps, V as StaticRouterProvider, O as StaticRouterProviderProps, g as SubmitFunction, I as SubmitOptions, J as SubmitTarget, a6 as UNSAFE_FrameworkContext, a7 as UNSAFE_createClientRoutes, a8 as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, a9 as UNSAFE_shouldHydrateRouteLoader, aa as UNSAFE_useScrollRestoration, U as URLSearchParamsInit, j as createBrowserRouter, k as createHashRouter, K as createSearchParams, Q as createStaticHandler, R as createStaticRouter, o as unstable_HistoryRouter, z as unstable_usePrompt, y as useBeforeUnload, w as useFetcher, x as useFetchers, v as useFormAction, u as useLinkClickHandler, s as useSearchParams, t as useSubmit, C as useViewTransitionState } from './index-react-server-client-pe1TAKAq.mjs';
|
|
11
11
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
12
12
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
13
13
|
import { P as Pages } from './register-DiOIlEq5.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as Router, e as RouteModules, D as DataStrategyFunction, T as To, f as NavigateOptions, B as BlockerFunction, g as Blocker, h as SerializeFrom, i as RelativeRoutingType, a as Location, j as ParamParseKey, k as Path, l as PathPattern, m as PathMatch, U as UIMatch, n as Navigation, A as Action, o as Params, p as RouteObject, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, t as MetaFunction, v as LinksFunction, w as NonIndexRouteObject, x as AppLoadContext, y as unstable_RouterContextProvider, z as MiddlewareEnabled, E as Equal, F as ClientActionFunction, J as ClientLoaderFunction, K as HeadersFunction, O as ShouldRevalidateFunction, Q as RouterInit, V as RouterState, W as PatchRoutesOnNavigationFunction, X as DataRouteObject } from './routeModules-
|
|
2
|
-
export { a6 as ActionFunctionArgs, aF as ClientActionFunctionArgs, aG as ClientLoaderFunctionArgs, aB as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, a0 as Fetcher, ac as FormEncType, ad as FormMethod, aL as Future, Z as GetScrollPositionFunction, _ as GetScrollRestorationKeyFunction, ae as HTMLFormMethod, aH as HeadersArgs, aK as HtmlLinkDescriptor, ar as IDLE_BLOCKER, aq as IDLE_FETCHER, ap as IDLE_NAVIGATION, af as LazyRouteFunction, L as LinkDescriptor, ag as LoaderFunctionArgs, aI as MetaArgs, M as MetaDescriptor, a1 as NavigationStates, aC as Navigator, aJ as PageLinkDescriptor, aD as PatchRoutesOnNavigationFunctionArgs, ai as PathParam, aj as RedirectFunction, a5 as RevalidationState, aE as RouteMatch, a4 as RouterFetchOptions, a3 as RouterNavigateOptions, a2 as RouterSubscriber, al as ShouldRevalidateFunctionArgs, Y as StaticHandler, $ as StaticHandlerContext, aR as UNSAFE_DataRouterContext, aS as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aQ as UNSAFE_ErrorResponseImpl, aT as UNSAFE_FetchersContext, aU as UNSAFE_LocationContext, aV as UNSAFE_NavigationContext, aW as UNSAFE_RouteContext, aX as UNSAFE_ViewTransitionContext, aN as UNSAFE_createBrowserHistory, aP as UNSAFE_createRouter, aO as UNSAFE_invariant, an as createPath, as as data, at as generatePath, au as isRouteErrorResponse, av as matchPath, aw as matchRoutes, ao as parsePath, ax as redirect, ay as redirectDocument, az as replace, aA as resolvePath, ah as unstable_MiddlewareFunction, ak as unstable_RouterContext, aM as unstable_SerializesTo, am as unstable_createContext } from './routeModules-
|
|
3
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig, R as RouteComponentType, H as HydrateFallbackType, a as ErrorBoundaryType, S as ServerBuild } from './index-react-server-client-
|
|
4
|
-
export { h as Await, b as AwaitProps, V as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts,
|
|
1
|
+
import { d as Router, e as RouteModules, D as DataStrategyFunction, T as To, f as NavigateOptions, B as BlockerFunction, g as Blocker, h as SerializeFrom, i as RelativeRoutingType, a as Location, j as ParamParseKey, k as Path, l as PathPattern, m as PathMatch, U as UIMatch, n as Navigation, A as Action, o as Params, p as RouteObject, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, t as MetaFunction, v as LinksFunction, w as NonIndexRouteObject, x as AppLoadContext, y as unstable_RouterContextProvider, z as MiddlewareEnabled, E as Equal, F as ClientActionFunction, J as ClientLoaderFunction, K as HeadersFunction, O as ShouldRevalidateFunction, Q as RouterInit, V as RouterState, W as PatchRoutesOnNavigationFunction, X as DataRouteObject } from './routeModules-DH3xUx4Z.js';
|
|
2
|
+
export { a6 as ActionFunctionArgs, aF as ClientActionFunctionArgs, aG as ClientLoaderFunctionArgs, aB as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, a0 as Fetcher, ac as FormEncType, ad as FormMethod, aL as Future, Z as GetScrollPositionFunction, _ as GetScrollRestorationKeyFunction, ae as HTMLFormMethod, aH as HeadersArgs, aK as HtmlLinkDescriptor, ar as IDLE_BLOCKER, aq as IDLE_FETCHER, ap as IDLE_NAVIGATION, af as LazyRouteFunction, L as LinkDescriptor, ag as LoaderFunctionArgs, aI as MetaArgs, M as MetaDescriptor, a1 as NavigationStates, aC as Navigator, aJ as PageLinkDescriptor, aD as PatchRoutesOnNavigationFunctionArgs, ai as PathParam, aj as RedirectFunction, a5 as RevalidationState, aE as RouteMatch, a4 as RouterFetchOptions, a3 as RouterNavigateOptions, a2 as RouterSubscriber, al as ShouldRevalidateFunctionArgs, Y as StaticHandler, $ as StaticHandlerContext, aR as UNSAFE_DataRouterContext, aS as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aQ as UNSAFE_ErrorResponseImpl, aT as UNSAFE_FetchersContext, aU as UNSAFE_LocationContext, aV as UNSAFE_NavigationContext, aW as UNSAFE_RouteContext, aX as UNSAFE_ViewTransitionContext, aN as UNSAFE_createBrowserHistory, aP as UNSAFE_createRouter, aO as UNSAFE_invariant, an as createPath, as as data, at as generatePath, au as isRouteErrorResponse, av as matchPath, aw as matchRoutes, ao as parsePath, ax as redirect, ay as redirectDocument, az as replace, aA as resolvePath, ah as unstable_MiddlewareFunction, ak as unstable_RouterContext, aM as unstable_SerializesTo, am as unstable_createContext } from './routeModules-DH3xUx4Z.js';
|
|
3
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig, R as RouteComponentType, H as HydrateFallbackType, a as ErrorBoundaryType, S as ServerBuild } from './index-react-server-client-D-lyvxf_.js';
|
|
4
|
+
export { h as Await, b as AwaitProps, V as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, as as DiscoverBehavior, y as FetcherFormProps, K as FetcherSubmitFunction, a9 as FetcherSubmitOptions, Q as FetcherWithComponents, _ as Form, z as FormProps, at as HandleDataRequestFunction, au as HandleDocumentRequestFunction, av as HandleErrorFunction, W as HashRouter, t as HashRouterProps, u as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, X as Link, v as LinkProps, am as Links, ap as LinksProps, i as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, al as Meta, Z as NavLink, w as NavLinkProps, x as NavLinkRenderProps, j as Navigate, N as NavigateProps, k as Outlet, O as OutletProps, aa as ParamKeyValuePair, P as PathRouteProps, ar as PrefetchBehavior, ao as PrefetchPageLinks, l as Route, d as RouteProps, m as Router, e as RouterProps, n as RouterProvider, f as RouterProviderProps, o as Routes, g as RoutesProps, an as Scripts, aq as ScriptsProps, $ as ScrollRestoration, C as ScrollRestorationProps, aw as ServerEntryModule, G as SetURLSearchParams, aj as StaticRouter, af as StaticRouterProps, ak as StaticRouterProvider, ag as StaticRouterProviderProps, J as SubmitFunction, ab as SubmitOptions, ad as SubmitTarget, aF as UNSAFE_FrameworkContext, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, aG as UNSAFE_createClientRoutes, aH as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ax as UNSAFE_hydrationRouteProperties, ay as UNSAFE_mapRouteProperties, aI as UNSAFE_shouldHydrateRouteLoader, aJ as UNSAFE_useScrollRestoration, aA as UNSAFE_withComponentProps, aE as UNSAFE_withErrorBoundaryProps, aC as UNSAFE_withHydrateFallbackProps, ac as URLSearchParamsInit, T as createBrowserRouter, U as createHashRouter, p as createMemoryRouter, q as createRoutesFromChildren, r as createRoutesFromElements, ae as createSearchParams, ah as createStaticHandler, ai as createStaticRouter, s as renderMatches, Y as unstable_HistoryRouter, a7 as unstable_usePrompt, a6 as useBeforeUnload, a4 as useFetcher, a5 as useFetchers, a3 as useFormAction, a0 as useLinkClickHandler, a1 as useSearchParams, a2 as useSubmit, a8 as useViewTransitionState } from './index-react-server-client-D-lyvxf_.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|