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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-e89ad3012
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunkROJMZUUVjs = require('./chunk-ROJMZUUV.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -142,7 +142,7 @@ var _chunkGSZ4XTPZjs = require('./chunk-GSZ4XTPZ.js');
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
var
|
|
145
|
+
var _chunkJJHCVRDZjs = require('./chunk-JJHCVRDZ.js');
|
|
146
146
|
|
|
147
147
|
// lib/dom/ssr/server.tsx
|
|
148
148
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -155,7 +155,7 @@ function ServerRouter({
|
|
|
155
155
|
url = new URL(url);
|
|
156
156
|
}
|
|
157
157
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
158
|
-
let routes =
|
|
158
|
+
let routes = _chunkJJHCVRDZjs.createServerRoutes.call(void 0,
|
|
159
159
|
manifest.routes,
|
|
160
160
|
routeModules,
|
|
161
161
|
context.future,
|
|
@@ -168,7 +168,7 @@ function ServerRouter({
|
|
|
168
168
|
let routeId = match.route.id;
|
|
169
169
|
let route = routeModules[routeId];
|
|
170
170
|
let manifestRoute = context.manifest.routes[routeId];
|
|
171
|
-
if (route && manifestRoute &&
|
|
171
|
+
if (route && manifestRoute && _chunkJJHCVRDZjs.shouldHydrateRouteLoader.call(void 0,
|
|
172
172
|
routeId,
|
|
173
173
|
route.clientLoader,
|
|
174
174
|
manifestRoute.hasLoader,
|
|
@@ -177,9 +177,9 @@ function ServerRouter({
|
|
|
177
177
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
let router =
|
|
180
|
+
let router = _chunkROJMZUUVjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
181
181
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
182
|
-
|
|
182
|
+
_chunkJJHCVRDZjs.FrameworkContext.Provider,
|
|
183
183
|
{
|
|
184
184
|
value: {
|
|
185
185
|
manifest,
|
|
@@ -194,8 +194,8 @@ function ServerRouter({
|
|
|
194
194
|
renderMeta: context.renderMeta
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
-
/* @__PURE__ */ React.createElement(
|
|
198
|
-
|
|
197
|
+
/* @__PURE__ */ React.createElement(_chunkJJHCVRDZjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
198
|
+
_chunkROJMZUUVjs.StaticRouterProvider,
|
|
199
199
|
{
|
|
200
200
|
router,
|
|
201
201
|
context: context.staticHandlerContext,
|
|
@@ -203,7 +203,7 @@ function ServerRouter({
|
|
|
203
203
|
}
|
|
204
204
|
))
|
|
205
205
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
206
|
-
|
|
206
|
+
_chunkJJHCVRDZjs.StreamTransfer,
|
|
207
207
|
{
|
|
208
208
|
context,
|
|
209
209
|
identifier: 0,
|
|
@@ -245,18 +245,18 @@ function createRoutesStub(routes, _context) {
|
|
|
245
245
|
let patched = processRoutes(
|
|
246
246
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
247
247
|
// types compared to `AgnosticRouteObject`
|
|
248
|
-
|
|
249
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.unstable_middleware]) ? new (0,
|
|
248
|
+
_chunkJJHCVRDZjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
249
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.unstable_middleware]) ? new (0, _chunkJJHCVRDZjs.unstable_RouterContextProvider)() : {},
|
|
250
250
|
frameworkContextRef.current.manifest,
|
|
251
251
|
frameworkContextRef.current.routeModules
|
|
252
252
|
);
|
|
253
|
-
routerRef.current =
|
|
253
|
+
routerRef.current = _chunkROJMZUUVjs.createMemoryRouter.call(void 0, patched, {
|
|
254
254
|
initialEntries,
|
|
255
255
|
initialIndex,
|
|
256
256
|
hydrationData
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
return /* @__PURE__ */ React2.createElement(
|
|
259
|
+
return /* @__PURE__ */ React2.createElement(_chunkJJHCVRDZjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkROJMZUUVjs.RouterProvider, { router: routerRef.current }));
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
262
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -270,9 +270,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
270
270
|
id: route.id,
|
|
271
271
|
path: route.path,
|
|
272
272
|
index: route.index,
|
|
273
|
-
Component: route.Component ?
|
|
274
|
-
HydrateFallback: route.HydrateFallback ?
|
|
275
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
273
|
+
Component: route.Component ? _chunkROJMZUUVjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
274
|
+
HydrateFallback: route.HydrateFallback ? _chunkROJMZUUVjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
275
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkROJMZUUVjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
276
276
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
277
277
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
278
278
|
handle: route.handle,
|
|
@@ -301,7 +301,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
301
301
|
};
|
|
302
302
|
manifest.routes[newRoute.id] = entryRoute;
|
|
303
303
|
routeModules[route.id] = {
|
|
304
|
-
default: newRoute.Component ||
|
|
304
|
+
default: newRoute.Component || _chunkROJMZUUVjs.Outlet,
|
|
305
305
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
306
306
|
handle: route.handle,
|
|
307
307
|
links: route.links,
|
|
@@ -496,7 +496,7 @@ function myUnescape(value) {
|
|
|
496
496
|
return result;
|
|
497
497
|
}
|
|
498
498
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
499
|
-
|
|
499
|
+
_chunkJJHCVRDZjs.warnOnce.call(void 0,
|
|
500
500
|
!expires,
|
|
501
501
|
`The "${name}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`
|
|
502
502
|
);
|
|
@@ -550,7 +550,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
550
550
|
let entries = Object.entries(errors);
|
|
551
551
|
let serialized = {};
|
|
552
552
|
for (let [key, val] of entries) {
|
|
553
|
-
if (
|
|
553
|
+
if (_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, val)) {
|
|
554
554
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
555
555
|
} else if (val instanceof Error) {
|
|
556
556
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -575,7 +575,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
575
575
|
|
|
576
576
|
// lib/server-runtime/routeMatching.ts
|
|
577
577
|
function matchServerRoutes(routes, pathname, basename) {
|
|
578
|
-
let matches =
|
|
578
|
+
let matches = _chunkJJHCVRDZjs.matchRoutes.call(void 0,
|
|
579
579
|
routes,
|
|
580
580
|
pathname,
|
|
581
581
|
basename
|
|
@@ -595,7 +595,7 @@ async function callRouteHandler(handler, args) {
|
|
|
595
595
|
params: args.params,
|
|
596
596
|
context: args.context
|
|
597
597
|
});
|
|
598
|
-
if (
|
|
598
|
+
if (_chunkJJHCVRDZjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkJJHCVRDZjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
599
599
|
throw new Response(null, result.init);
|
|
600
600
|
}
|
|
601
601
|
return result;
|
|
@@ -714,17 +714,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
714
714
|
controller.close();
|
|
715
715
|
}
|
|
716
716
|
});
|
|
717
|
-
let decoded = await
|
|
717
|
+
let decoded = await _chunkJJHCVRDZjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
718
718
|
let data2 = decoded.value;
|
|
719
|
-
if (data2 &&
|
|
720
|
-
let result = data2[
|
|
719
|
+
if (data2 && _chunkJJHCVRDZjs.SingleFetchRedirectSymbol in data2) {
|
|
720
|
+
let result = data2[_chunkJJHCVRDZjs.SingleFetchRedirectSymbol];
|
|
721
721
|
let init = { status: result.status };
|
|
722
722
|
if (result.reload) {
|
|
723
|
-
throw
|
|
723
|
+
throw _chunkJJHCVRDZjs.redirectDocument.call(void 0, result.redirect, init);
|
|
724
724
|
} else if (result.replace) {
|
|
725
|
-
throw
|
|
725
|
+
throw _chunkJJHCVRDZjs.replace.call(void 0, result.redirect, init);
|
|
726
726
|
} else {
|
|
727
|
-
throw
|
|
727
|
+
throw _chunkJJHCVRDZjs.redirect.call(void 0, result.redirect, init);
|
|
728
728
|
}
|
|
729
729
|
} else {
|
|
730
730
|
invariant2(
|
|
@@ -852,47 +852,11 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
852
852
|
|
|
853
853
|
// lib/server-runtime/single-fetch.ts
|
|
854
854
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
855
|
-
...
|
|
855
|
+
..._chunkJJHCVRDZjs.NO_BODY_STATUS_CODES,
|
|
856
856
|
304
|
|
857
857
|
]);
|
|
858
858
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
859
859
|
try {
|
|
860
|
-
let respond2 = function(context) {
|
|
861
|
-
let headers = getDocumentHeaders(context, build);
|
|
862
|
-
if (_chunkJRLTRGBEjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
863
|
-
return generateSingleFetchResponse(request, build, serverMode, {
|
|
864
|
-
result: getSingleFetchRedirect(
|
|
865
|
-
context.statusCode,
|
|
866
|
-
headers,
|
|
867
|
-
build.basename
|
|
868
|
-
),
|
|
869
|
-
headers,
|
|
870
|
-
status: _chunkJRLTRGBEjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
if (context.errors) {
|
|
874
|
-
Object.values(context.errors).forEach((err) => {
|
|
875
|
-
if (!_chunkJRLTRGBEjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
876
|
-
handleError(err);
|
|
877
|
-
}
|
|
878
|
-
});
|
|
879
|
-
context.errors = sanitizeErrors(context.errors, serverMode);
|
|
880
|
-
}
|
|
881
|
-
let singleFetchResult;
|
|
882
|
-
if (context.errors) {
|
|
883
|
-
singleFetchResult = { error: Object.values(context.errors)[0] };
|
|
884
|
-
} else {
|
|
885
|
-
singleFetchResult = {
|
|
886
|
-
data: Object.values(context.actionData || {})[0]
|
|
887
|
-
};
|
|
888
|
-
}
|
|
889
|
-
return generateSingleFetchResponse(request, build, serverMode, {
|
|
890
|
-
result: singleFetchResult,
|
|
891
|
-
headers,
|
|
892
|
-
status: context.statusCode
|
|
893
|
-
});
|
|
894
|
-
};
|
|
895
|
-
var respond = respond2;
|
|
896
860
|
let handlerRequest = new Request(handlerUrl, {
|
|
897
861
|
method: request.method,
|
|
898
862
|
body: request.body,
|
|
@@ -904,12 +868,24 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
904
868
|
requestContext: loadContext,
|
|
905
869
|
skipLoaderErrorBubbling: true,
|
|
906
870
|
skipRevalidation: true,
|
|
907
|
-
|
|
871
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
872
|
+
try {
|
|
873
|
+
let innerResult = await query(handlerRequest);
|
|
874
|
+
return handleQueryResult(innerResult);
|
|
875
|
+
} catch (error) {
|
|
876
|
+
return handleQueryError(error);
|
|
877
|
+
}
|
|
878
|
+
} : void 0
|
|
908
879
|
});
|
|
909
|
-
|
|
910
|
-
|
|
880
|
+
return handleQueryResult(result);
|
|
881
|
+
} catch (error) {
|
|
882
|
+
return handleQueryError(error);
|
|
883
|
+
}
|
|
884
|
+
function handleQueryResult(result) {
|
|
885
|
+
if (!_chunkJJHCVRDZjs.isResponse.call(void 0, result)) {
|
|
886
|
+
result = staticContextToResponse(result);
|
|
911
887
|
}
|
|
912
|
-
if (
|
|
888
|
+
if (_chunkJJHCVRDZjs.isRedirectResponse.call(void 0, result)) {
|
|
913
889
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
914
890
|
result: getSingleFetchRedirect(
|
|
915
891
|
result.status,
|
|
@@ -917,11 +893,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
917
893
|
build.basename
|
|
918
894
|
),
|
|
919
895
|
headers: result.headers,
|
|
920
|
-
status:
|
|
896
|
+
status: _chunkJJHCVRDZjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
921
897
|
});
|
|
922
898
|
}
|
|
923
899
|
return result;
|
|
924
|
-
}
|
|
900
|
+
}
|
|
901
|
+
function handleQueryError(error) {
|
|
925
902
|
handleError(error);
|
|
926
903
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
927
904
|
result: { error },
|
|
@@ -929,92 +906,137 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
929
906
|
status: 500
|
|
930
907
|
});
|
|
931
908
|
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
let respond2 = function(context) {
|
|
936
|
-
let headers = getDocumentHeaders(context, build);
|
|
937
|
-
if (_chunkJRLTRGBEjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
938
|
-
return generateSingleFetchResponse(request, build, serverMode, {
|
|
939
|
-
result: {
|
|
940
|
-
[_chunkJRLTRGBEjs.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
941
|
-
context.statusCode,
|
|
942
|
-
headers,
|
|
943
|
-
build.basename
|
|
944
|
-
)
|
|
945
|
-
},
|
|
946
|
-
headers,
|
|
947
|
-
status: _chunkJRLTRGBEjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
if (context.errors) {
|
|
951
|
-
Object.values(context.errors).forEach((err) => {
|
|
952
|
-
if (!_chunkJRLTRGBEjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
953
|
-
handleError(err);
|
|
954
|
-
}
|
|
955
|
-
});
|
|
956
|
-
context.errors = sanitizeErrors(context.errors, serverMode);
|
|
957
|
-
}
|
|
958
|
-
let results = {};
|
|
959
|
-
let loadedMatches = new Set(
|
|
960
|
-
context.matches.filter(
|
|
961
|
-
(m) => loadRouteIds ? loadRouteIds.has(m.route.id) : m.route.loader != null
|
|
962
|
-
).map((m) => m.route.id)
|
|
963
|
-
);
|
|
964
|
-
if (context.errors) {
|
|
965
|
-
for (let [id, error] of Object.entries(context.errors)) {
|
|
966
|
-
results[id] = { error };
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
for (let [id, data2] of Object.entries(context.loaderData)) {
|
|
970
|
-
if (!(id in results) && loadedMatches.has(id)) {
|
|
971
|
-
results[id] = { data: data2 };
|
|
972
|
-
}
|
|
973
|
-
}
|
|
909
|
+
function staticContextToResponse(context) {
|
|
910
|
+
let headers = getDocumentHeaders(context, build);
|
|
911
|
+
if (_chunkJJHCVRDZjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
974
912
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
975
|
-
result:
|
|
913
|
+
result: getSingleFetchRedirect(
|
|
914
|
+
context.statusCode,
|
|
915
|
+
headers,
|
|
916
|
+
build.basename
|
|
917
|
+
),
|
|
976
918
|
headers,
|
|
977
|
-
status:
|
|
919
|
+
status: _chunkJJHCVRDZjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
978
920
|
});
|
|
979
|
-
}
|
|
980
|
-
|
|
921
|
+
}
|
|
922
|
+
if (context.errors) {
|
|
923
|
+
Object.values(context.errors).forEach((err) => {
|
|
924
|
+
if (!_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
925
|
+
handleError(err);
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
context.errors = sanitizeErrors(context.errors, serverMode);
|
|
929
|
+
}
|
|
930
|
+
let singleFetchResult;
|
|
931
|
+
if (context.errors) {
|
|
932
|
+
singleFetchResult = { error: Object.values(context.errors)[0] };
|
|
933
|
+
} else {
|
|
934
|
+
singleFetchResult = {
|
|
935
|
+
data: Object.values(context.actionData || {})[0]
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
939
|
+
result: singleFetchResult,
|
|
940
|
+
headers,
|
|
941
|
+
status: context.statusCode
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
async function singleFetchLoaders(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
946
|
+
let routesParam = new URL(request.url).searchParams.get("_routes");
|
|
947
|
+
let loadRouteIds = routesParam ? new Set(routesParam.split(",")) : null;
|
|
948
|
+
try {
|
|
981
949
|
let handlerRequest = new Request(handlerUrl, {
|
|
982
950
|
headers: request.headers,
|
|
983
951
|
signal: request.signal
|
|
984
952
|
});
|
|
985
|
-
let routesParam = new URL(request.url).searchParams.get("_routes");
|
|
986
|
-
let loadRouteIds = routesParam ? new Set(routesParam.split(",")) : null;
|
|
987
953
|
let result = await staticHandler.query(handlerRequest, {
|
|
988
954
|
requestContext: loadContext,
|
|
989
955
|
filterMatchesToLoad: (m) => !loadRouteIds || loadRouteIds.has(m.route.id),
|
|
990
956
|
skipLoaderErrorBubbling: true,
|
|
991
|
-
|
|
957
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
958
|
+
try {
|
|
959
|
+
let innerResult = await query(handlerRequest);
|
|
960
|
+
return handleQueryResult(innerResult);
|
|
961
|
+
} catch (error) {
|
|
962
|
+
return handleQueryError(error);
|
|
963
|
+
}
|
|
964
|
+
} : void 0
|
|
992
965
|
});
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
966
|
+
return handleQueryResult(result);
|
|
967
|
+
} catch (error) {
|
|
968
|
+
return handleQueryError(error);
|
|
969
|
+
}
|
|
970
|
+
function handleQueryResult(result) {
|
|
971
|
+
let response = _chunkJJHCVRDZjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
972
|
+
if (_chunkJJHCVRDZjs.isRedirectResponse.call(void 0, response)) {
|
|
997
973
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
998
974
|
result: {
|
|
999
|
-
[
|
|
1000
|
-
|
|
1001
|
-
|
|
975
|
+
[_chunkJJHCVRDZjs.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
976
|
+
response.status,
|
|
977
|
+
response.headers,
|
|
1002
978
|
build.basename
|
|
1003
979
|
)
|
|
1004
980
|
},
|
|
1005
|
-
headers:
|
|
1006
|
-
status:
|
|
981
|
+
headers: response.headers,
|
|
982
|
+
status: _chunkJJHCVRDZjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1007
983
|
});
|
|
1008
984
|
}
|
|
1009
|
-
return
|
|
1010
|
-
}
|
|
985
|
+
return response;
|
|
986
|
+
}
|
|
987
|
+
function handleQueryError(error) {
|
|
1011
988
|
handleError(error);
|
|
1012
989
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1013
|
-
result: {
|
|
990
|
+
result: { error },
|
|
1014
991
|
headers: new Headers(),
|
|
1015
992
|
status: 500
|
|
1016
993
|
});
|
|
1017
994
|
}
|
|
995
|
+
function staticContextToResponse(context) {
|
|
996
|
+
let headers = getDocumentHeaders(context, build);
|
|
997
|
+
if (_chunkJJHCVRDZjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
998
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
999
|
+
result: {
|
|
1000
|
+
[_chunkJJHCVRDZjs.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
1001
|
+
context.statusCode,
|
|
1002
|
+
headers,
|
|
1003
|
+
build.basename
|
|
1004
|
+
)
|
|
1005
|
+
},
|
|
1006
|
+
headers,
|
|
1007
|
+
status: _chunkJJHCVRDZjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
if (context.errors) {
|
|
1011
|
+
Object.values(context.errors).forEach((err) => {
|
|
1012
|
+
if (!_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1013
|
+
handleError(err);
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
context.errors = sanitizeErrors(context.errors, serverMode);
|
|
1017
|
+
}
|
|
1018
|
+
let results = {};
|
|
1019
|
+
let loadedMatches = new Set(
|
|
1020
|
+
context.matches.filter(
|
|
1021
|
+
(m) => loadRouteIds ? loadRouteIds.has(m.route.id) : m.route.loader != null
|
|
1022
|
+
).map((m) => m.route.id)
|
|
1023
|
+
);
|
|
1024
|
+
if (context.errors) {
|
|
1025
|
+
for (let [id, error] of Object.entries(context.errors)) {
|
|
1026
|
+
results[id] = { error };
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
for (let [id, data2] of Object.entries(context.loaderData)) {
|
|
1030
|
+
if (!(id in results) && loadedMatches.has(id)) {
|
|
1031
|
+
results[id] = { data: data2 };
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1035
|
+
result: results,
|
|
1036
|
+
headers,
|
|
1037
|
+
status: context.statusCode
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1018
1040
|
}
|
|
1019
1041
|
function generateSingleFetchResponse(request, build, serverMode, {
|
|
1020
1042
|
result,
|
|
@@ -1044,7 +1066,7 @@ function generateSingleFetchResponse(request, build, serverMode, {
|
|
|
1044
1066
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1045
1067
|
let redirect2 = headers.get("Location");
|
|
1046
1068
|
if (basename) {
|
|
1047
|
-
redirect2 =
|
|
1069
|
+
redirect2 = _chunkJJHCVRDZjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1048
1070
|
}
|
|
1049
1071
|
return {
|
|
1050
1072
|
redirect: redirect2,
|
|
@@ -1070,7 +1092,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1070
1092
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1071
1093
|
);
|
|
1072
1094
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1073
|
-
return
|
|
1095
|
+
return _chunkJJHCVRDZjs.encode.call(void 0, data2, {
|
|
1074
1096
|
signal: controller.signal,
|
|
1075
1097
|
plugins: [
|
|
1076
1098
|
(value) => {
|
|
@@ -1078,12 +1100,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1078
1100
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1079
1101
|
return ["SanitizedError", name, message, stack];
|
|
1080
1102
|
}
|
|
1081
|
-
if (value instanceof
|
|
1103
|
+
if (value instanceof _chunkJJHCVRDZjs.ErrorResponseImpl) {
|
|
1082
1104
|
let { data: data3, status, statusText } = value;
|
|
1083
1105
|
return ["ErrorResponse", data3, status, statusText];
|
|
1084
1106
|
}
|
|
1085
|
-
if (value && typeof value === "object" &&
|
|
1086
|
-
return ["SingleFetchRedirect", value[
|
|
1107
|
+
if (value && typeof value === "object" && _chunkJJHCVRDZjs.SingleFetchRedirectSymbol in value) {
|
|
1108
|
+
return ["SingleFetchRedirect", value[_chunkJJHCVRDZjs.SingleFetchRedirectSymbol]];
|
|
1087
1109
|
}
|
|
1088
1110
|
}
|
|
1089
1111
|
],
|
|
@@ -1106,14 +1128,14 @@ function derive(build, mode) {
|
|
|
1106
1128
|
let routes = createRoutes(build.routes);
|
|
1107
1129
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1108
1130
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1109
|
-
let staticHandler =
|
|
1131
|
+
let staticHandler = _chunkJJHCVRDZjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1110
1132
|
basename: build.basename
|
|
1111
1133
|
});
|
|
1112
1134
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1113
1135
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1114
1136
|
console.error(
|
|
1115
1137
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1116
|
-
|
|
1138
|
+
_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1117
1139
|
);
|
|
1118
1140
|
}
|
|
1119
1141
|
});
|
|
@@ -1159,26 +1181,26 @@ var createRequestHandler = (build, mode) => {
|
|
|
1159
1181
|
});
|
|
1160
1182
|
};
|
|
1161
1183
|
if (_build.future.unstable_middleware) {
|
|
1162
|
-
if (initialContext && !(initialContext instanceof
|
|
1184
|
+
if (initialContext && !(initialContext instanceof _chunkJJHCVRDZjs.unstable_RouterContextProvider)) {
|
|
1163
1185
|
let error = new Error(
|
|
1164
1186
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `unstable_RouterContextProvider` from your `getLoadContext` function."
|
|
1165
1187
|
);
|
|
1166
1188
|
handleError(error);
|
|
1167
1189
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1168
1190
|
}
|
|
1169
|
-
loadContext = initialContext || new (0,
|
|
1191
|
+
loadContext = initialContext || new (0, _chunkJJHCVRDZjs.unstable_RouterContextProvider)();
|
|
1170
1192
|
} else {
|
|
1171
1193
|
loadContext = initialContext || {};
|
|
1172
1194
|
}
|
|
1173
1195
|
let url = new URL(request.url);
|
|
1174
1196
|
let normalizedBasename = _build.basename || "/";
|
|
1175
1197
|
let normalizedPath = url.pathname;
|
|
1176
|
-
if (
|
|
1198
|
+
if (_chunkJJHCVRDZjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1177
1199
|
normalizedPath = normalizedBasename;
|
|
1178
1200
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1179
1201
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1180
1202
|
}
|
|
1181
|
-
if (
|
|
1203
|
+
if (_chunkJJHCVRDZjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1182
1204
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1183
1205
|
}
|
|
1184
1206
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
@@ -1189,7 +1211,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1189
1211
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1190
1212
|
if (url.pathname.endsWith(".data")) {
|
|
1191
1213
|
errorHandler(
|
|
1192
|
-
new (0,
|
|
1214
|
+
new (0, _chunkJJHCVRDZjs.ErrorResponseImpl)(
|
|
1193
1215
|
404,
|
|
1194
1216
|
"Not Found",
|
|
1195
1217
|
`Refusing to SSR the path \`${decodedPath}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
|
|
@@ -1209,7 +1231,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1209
1231
|
}
|
|
1210
1232
|
}
|
|
1211
1233
|
}
|
|
1212
|
-
let manifestUrl =
|
|
1234
|
+
let manifestUrl = _chunkJJHCVRDZjs.getManifestPath.call(void 0,
|
|
1213
1235
|
_build.routeDiscovery.manifestPath,
|
|
1214
1236
|
normalizedBasename
|
|
1215
1237
|
);
|
|
@@ -1250,7 +1272,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1250
1272
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1251
1273
|
request
|
|
1252
1274
|
});
|
|
1253
|
-
if (
|
|
1275
|
+
if (_chunkJJHCVRDZjs.isRedirectResponse.call(void 0, response)) {
|
|
1254
1276
|
let result = getSingleFetchRedirect(
|
|
1255
1277
|
response.status,
|
|
1256
1278
|
response.headers,
|
|
@@ -1258,7 +1280,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1258
1280
|
);
|
|
1259
1281
|
if (request.method === "GET") {
|
|
1260
1282
|
result = {
|
|
1261
|
-
[
|
|
1283
|
+
[_chunkJJHCVRDZjs.SingleFetchRedirectSymbol]: result
|
|
1262
1284
|
};
|
|
1263
1285
|
}
|
|
1264
1286
|
let headers = new Headers(response.headers);
|
|
@@ -1271,7 +1293,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1271
1293
|
serverMode
|
|
1272
1294
|
),
|
|
1273
1295
|
{
|
|
1274
|
-
status:
|
|
1296
|
+
status: _chunkJJHCVRDZjs.SINGLE_FETCH_REDIRECT_STATUS,
|
|
1275
1297
|
headers
|
|
1276
1298
|
}
|
|
1277
1299
|
);
|
|
@@ -1380,26 +1402,37 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
|
|
|
1380
1402
|
}
|
|
1381
1403
|
async function handleDocumentRequest(serverMode, build, staticHandler, request, loadContext, handleError, isSpaMode, criticalCss) {
|
|
1382
1404
|
try {
|
|
1383
|
-
let
|
|
1405
|
+
let result = await staticHandler.query(request, {
|
|
1384
1406
|
requestContext: loadContext,
|
|
1385
|
-
|
|
1407
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
1408
|
+
try {
|
|
1409
|
+
let innerResult = await query(request);
|
|
1410
|
+
if (!_chunkJJHCVRDZjs.isResponse.call(void 0, innerResult)) {
|
|
1411
|
+
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1412
|
+
}
|
|
1413
|
+
return innerResult;
|
|
1414
|
+
} catch (error) {
|
|
1415
|
+
handleError(error);
|
|
1416
|
+
return new Response(null, { status: 500 });
|
|
1417
|
+
}
|
|
1418
|
+
} : void 0
|
|
1386
1419
|
});
|
|
1387
|
-
|
|
1420
|
+
if (!_chunkJJHCVRDZjs.isResponse.call(void 0, result)) {
|
|
1421
|
+
result = await renderHtml(result, isSpaMode);
|
|
1422
|
+
}
|
|
1423
|
+
return result;
|
|
1388
1424
|
} catch (error) {
|
|
1389
1425
|
handleError(error);
|
|
1390
1426
|
return new Response(null, { status: 500 });
|
|
1391
1427
|
}
|
|
1392
1428
|
async function renderHtml(context, isSpaMode2) {
|
|
1393
|
-
if (_chunkJRLTRGBEjs.isResponse.call(void 0, context)) {
|
|
1394
|
-
return context;
|
|
1395
|
-
}
|
|
1396
1429
|
let headers = getDocumentHeaders(context, build);
|
|
1397
1430
|
if (SERVER_NO_BODY_STATUS_CODES.has(context.statusCode)) {
|
|
1398
1431
|
return new Response(null, { status: context.statusCode, headers });
|
|
1399
1432
|
}
|
|
1400
1433
|
if (context.errors) {
|
|
1401
1434
|
Object.values(context.errors).forEach((err) => {
|
|
1402
|
-
if (!
|
|
1435
|
+
if (!_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1403
1436
|
handleError(err);
|
|
1404
1437
|
}
|
|
1405
1438
|
});
|
|
@@ -1451,10 +1484,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1451
1484
|
} catch (error) {
|
|
1452
1485
|
handleError(error);
|
|
1453
1486
|
let errorForSecondRender = error;
|
|
1454
|
-
if (
|
|
1487
|
+
if (_chunkJJHCVRDZjs.isResponse.call(void 0, error)) {
|
|
1455
1488
|
try {
|
|
1456
1489
|
let data2 = await unwrapResponse(error);
|
|
1457
|
-
errorForSecondRender = new (0,
|
|
1490
|
+
errorForSecondRender = new (0, _chunkJJHCVRDZjs.ErrorResponseImpl)(
|
|
1458
1491
|
error.status,
|
|
1459
1492
|
error.statusText,
|
|
1460
1493
|
data2
|
|
@@ -1462,7 +1495,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1462
1495
|
} catch (e) {
|
|
1463
1496
|
}
|
|
1464
1497
|
}
|
|
1465
|
-
context =
|
|
1498
|
+
context = _chunkJJHCVRDZjs.getStaticContextFromError.call(void 0,
|
|
1466
1499
|
staticHandler.dataRoutes,
|
|
1467
1500
|
context,
|
|
1468
1501
|
errorForSecondRender
|
|
@@ -1504,55 +1537,38 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1504
1537
|
}
|
|
1505
1538
|
async function handleResourceRequest(serverMode, build, staticHandler, routeId, request, loadContext, handleError) {
|
|
1506
1539
|
try {
|
|
1507
|
-
let
|
|
1540
|
+
let result = await staticHandler.queryRoute(request, {
|
|
1508
1541
|
routeId,
|
|
1509
1542
|
requestContext: loadContext,
|
|
1510
|
-
|
|
1543
|
+
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (queryRoute) => {
|
|
1511
1544
|
try {
|
|
1512
|
-
let
|
|
1513
|
-
|
|
1514
|
-
return result;
|
|
1515
|
-
}
|
|
1516
|
-
if (typeof result === "string") {
|
|
1517
|
-
return new Response(result);
|
|
1518
|
-
}
|
|
1519
|
-
return Response.json(result);
|
|
1545
|
+
let innerResult = await queryRoute(request);
|
|
1546
|
+
return handleQueryRouteResult(innerResult);
|
|
1520
1547
|
} catch (error) {
|
|
1521
|
-
|
|
1522
|
-
return error;
|
|
1523
|
-
}
|
|
1524
|
-
if (_chunkJRLTRGBEjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1525
|
-
handleError(error);
|
|
1526
|
-
return errorResponseToJson(error, serverMode);
|
|
1527
|
-
}
|
|
1528
|
-
if (error instanceof Error && error.message === "Expected a response from queryRoute") {
|
|
1529
|
-
let newError = new Error(
|
|
1530
|
-
"Expected a Response to be returned from resource route handler"
|
|
1531
|
-
);
|
|
1532
|
-
handleError(newError);
|
|
1533
|
-
return returnLastResortErrorResponse(newError, serverMode);
|
|
1534
|
-
}
|
|
1535
|
-
handleError(error);
|
|
1536
|
-
return returnLastResortErrorResponse(error, serverMode);
|
|
1548
|
+
return handleQueryRouteError(error);
|
|
1537
1549
|
}
|
|
1538
1550
|
} : void 0
|
|
1539
1551
|
});
|
|
1540
|
-
|
|
1541
|
-
|
|
1552
|
+
return handleQueryRouteResult(result);
|
|
1553
|
+
} catch (error) {
|
|
1554
|
+
return handleQueryRouteError(error);
|
|
1555
|
+
}
|
|
1556
|
+
function handleQueryRouteResult(result) {
|
|
1557
|
+
if (_chunkJJHCVRDZjs.isResponse.call(void 0, result)) {
|
|
1558
|
+
return result;
|
|
1542
1559
|
}
|
|
1543
|
-
if (typeof
|
|
1544
|
-
return new Response(
|
|
1560
|
+
if (typeof result === "string") {
|
|
1561
|
+
return new Response(result);
|
|
1545
1562
|
}
|
|
1546
|
-
return Response.json(
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1563
|
+
return Response.json(result);
|
|
1564
|
+
}
|
|
1565
|
+
function handleQueryRouteError(error) {
|
|
1566
|
+
if (_chunkJJHCVRDZjs.isResponse.call(void 0, error)) {
|
|
1549
1567
|
error.headers.set("X-Remix-Catch", "yes");
|
|
1550
1568
|
return error;
|
|
1551
1569
|
}
|
|
1552
|
-
if (
|
|
1553
|
-
|
|
1554
|
-
handleError(error);
|
|
1555
|
-
}
|
|
1570
|
+
if (_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1571
|
+
handleError(error);
|
|
1556
1572
|
return errorResponseToJson(error, serverMode);
|
|
1557
1573
|
}
|
|
1558
1574
|
if (error instanceof Error && error.message === "Expected a response from queryRoute") {
|
|
@@ -1677,7 +1693,7 @@ function createSessionStorage({
|
|
|
1677
1693
|
};
|
|
1678
1694
|
}
|
|
1679
1695
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1680
|
-
|
|
1696
|
+
_chunkJJHCVRDZjs.warnOnce.call(void 0,
|
|
1681
1697
|
cookie.isSigned,
|
|
1682
1698
|
`The "${cookie.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`
|
|
1683
1699
|
);
|
|
@@ -1772,12 +1788,12 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
1772
1788
|
...state,
|
|
1773
1789
|
loaderData: { ...state.loaderData }
|
|
1774
1790
|
};
|
|
1775
|
-
let initialMatches =
|
|
1791
|
+
let initialMatches = _chunkJJHCVRDZjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1776
1792
|
if (initialMatches) {
|
|
1777
1793
|
for (let match of initialMatches) {
|
|
1778
1794
|
let routeId = match.route.id;
|
|
1779
1795
|
let routeInfo = getRouteInfo(routeId);
|
|
1780
|
-
if (
|
|
1796
|
+
if (_chunkJJHCVRDZjs.shouldHydrateRouteLoader.call(void 0,
|
|
1781
1797
|
routeId,
|
|
1782
1798
|
routeInfo.clientLoader,
|
|
1783
1799
|
routeInfo.hasLoader,
|
|
@@ -1855,7 +1871,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1855
1871
|
}
|
|
1856
1872
|
}
|
|
1857
1873
|
);
|
|
1858
|
-
if (
|
|
1874
|
+
if (_chunkJJHCVRDZjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1859
1875
|
return /* @__PURE__ */ React.default.createElement(
|
|
1860
1876
|
ErrorWrapper,
|
|
1861
1877
|
{
|
|
@@ -1863,7 +1879,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1863
1879
|
title: "Unhandled Thrown Response!"
|
|
1864
1880
|
},
|
|
1865
1881
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1866
|
-
|
|
1882
|
+
_chunkJJHCVRDZjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1867
1883
|
);
|
|
1868
1884
|
}
|
|
1869
1885
|
let errorInstance;
|
|
@@ -1889,7 +1905,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1889
1905
|
function RSCDefaultRootErrorBoundary({
|
|
1890
1906
|
hasRootLayout
|
|
1891
1907
|
}) {
|
|
1892
|
-
let error =
|
|
1908
|
+
let error = _chunkJJHCVRDZjs.useRouteError.call(void 0, );
|
|
1893
1909
|
if (hasRootLayout === void 0) {
|
|
1894
1910
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1895
1911
|
}
|
|
@@ -2003,7 +2019,7 @@ function createRouterFromPayload({
|
|
|
2003
2019
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2004
2020
|
let patches = /* @__PURE__ */ new Map();
|
|
2005
2021
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2006
|
-
|
|
2022
|
+
_chunkJJHCVRDZjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2007
2023
|
if (!patches.has(patch.parentId)) {
|
|
2008
2024
|
patches.set(patch.parentId, []);
|
|
2009
2025
|
}
|
|
@@ -2025,11 +2041,11 @@ function createRouterFromPayload({
|
|
|
2025
2041
|
}
|
|
2026
2042
|
return [route];
|
|
2027
2043
|
}, []);
|
|
2028
|
-
globalVar.__router =
|
|
2044
|
+
globalVar.__router = _chunkJJHCVRDZjs.createRouter.call(void 0, {
|
|
2029
2045
|
routes,
|
|
2030
2046
|
unstable_getContext,
|
|
2031
2047
|
basename: payload.basename,
|
|
2032
|
-
history:
|
|
2048
|
+
history: _chunkJJHCVRDZjs.createBrowserHistory.call(void 0, ),
|
|
2033
2049
|
hydrationData: getHydrationData(
|
|
2034
2050
|
{
|
|
2035
2051
|
loaderData: payload.loaderData,
|
|
@@ -2039,7 +2055,7 @@ function createRouterFromPayload({
|
|
|
2039
2055
|
routes,
|
|
2040
2056
|
(routeId) => {
|
|
2041
2057
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2042
|
-
|
|
2058
|
+
_chunkJJHCVRDZjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2043
2059
|
return {
|
|
2044
2060
|
clientLoader: match.clientLoader,
|
|
2045
2061
|
hasLoader: match.hasLoader,
|
|
@@ -2084,9 +2100,9 @@ function createRouterFromPayload({
|
|
|
2084
2100
|
});
|
|
2085
2101
|
return globalVar.__router;
|
|
2086
2102
|
}
|
|
2087
|
-
var renderedRoutesContext =
|
|
2103
|
+
var renderedRoutesContext = _chunkJJHCVRDZjs.unstable_createContext.call(void 0, );
|
|
2088
2104
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2089
|
-
let dataStrategy =
|
|
2105
|
+
let dataStrategy = _chunkJJHCVRDZjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2090
2106
|
getRouter,
|
|
2091
2107
|
(match) => {
|
|
2092
2108
|
let M = match;
|
|
@@ -2140,20 +2156,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2140
2156
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2141
2157
|
return async (args, basename, targetRoutes) => {
|
|
2142
2158
|
let { request, context } = args;
|
|
2143
|
-
let url =
|
|
2159
|
+
let url = _chunkJJHCVRDZjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2144
2160
|
if (request.method === "GET") {
|
|
2145
|
-
url =
|
|
2161
|
+
url = _chunkJJHCVRDZjs.stripIndexParam.call(void 0, url);
|
|
2146
2162
|
if (targetRoutes) {
|
|
2147
2163
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2148
2164
|
}
|
|
2149
2165
|
}
|
|
2150
2166
|
let res = await fetchImplementation(
|
|
2151
|
-
new Request(url, await
|
|
2167
|
+
new Request(url, await _chunkJJHCVRDZjs.createRequestInit.call(void 0, request))
|
|
2152
2168
|
);
|
|
2153
2169
|
if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
|
|
2154
|
-
throw new (0,
|
|
2170
|
+
throw new (0, _chunkJJHCVRDZjs.ErrorResponseImpl)(404, "Not Found", true);
|
|
2155
2171
|
}
|
|
2156
|
-
|
|
2172
|
+
_chunkJJHCVRDZjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2157
2173
|
try {
|
|
2158
2174
|
const payload = await createFromReadableStream(res.body, {
|
|
2159
2175
|
temporaryReferences: void 0
|
|
@@ -2177,7 +2193,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2177
2193
|
}
|
|
2178
2194
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2179
2195
|
let results = { routes: {} };
|
|
2180
|
-
const dataKey =
|
|
2196
|
+
const dataKey = _chunkJJHCVRDZjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2181
2197
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2182
2198
|
results.routes[routeId] = { data: data2 };
|
|
2183
2199
|
}
|
|
@@ -2299,7 +2315,7 @@ function RSCHydratedRouter({
|
|
|
2299
2315
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2300
2316
|
routeModules: {}
|
|
2301
2317
|
};
|
|
2302
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2318
|
+
return /* @__PURE__ */ React4.createElement(_chunkJJHCVRDZjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkJJHCVRDZjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkROJMZUUVjs.RouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2303
2319
|
}
|
|
2304
2320
|
function createRouteFromServerManifest(match, payload) {
|
|
2305
2321
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2359,7 +2375,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2359
2375
|
return await callSingleFetch(singleFetch);
|
|
2360
2376
|
}
|
|
2361
2377
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2362
|
-
throw
|
|
2378
|
+
throw _chunkJJHCVRDZjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2363
2379
|
},
|
|
2364
2380
|
path: match.path,
|
|
2365
2381
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2372,7 +2388,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2372
2388
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2373
2389
|
};
|
|
2374
2390
|
if (typeof dataRoute.loader === "function") {
|
|
2375
|
-
dataRoute.loader.hydrate =
|
|
2391
|
+
dataRoute.loader.hydrate = _chunkJJHCVRDZjs.shouldHydrateRouteLoader.call(void 0,
|
|
2376
2392
|
match.id,
|
|
2377
2393
|
match.clientLoader,
|
|
2378
2394
|
match.hasLoader,
|
|
@@ -2382,7 +2398,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2382
2398
|
return dataRoute;
|
|
2383
2399
|
}
|
|
2384
2400
|
function callSingleFetch(singleFetch) {
|
|
2385
|
-
|
|
2401
|
+
_chunkJJHCVRDZjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2386
2402
|
return singleFetch();
|
|
2387
2403
|
}
|
|
2388
2404
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2390,7 +2406,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2390
2406
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2391
2407
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2392
2408
|
console.error(msg);
|
|
2393
|
-
throw new (0,
|
|
2409
|
+
throw new (0, _chunkJJHCVRDZjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2394
2410
|
}
|
|
2395
2411
|
}
|
|
2396
2412
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2610,7 +2626,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2610
2626
|
if (payload.type !== "render") return null;
|
|
2611
2627
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2612
2628
|
for (const match of payload.matches) {
|
|
2613
|
-
if (
|
|
2629
|
+
if (_chunkJJHCVRDZjs.shouldHydrateRouteLoader.call(void 0,
|
|
2614
2630
|
match.id,
|
|
2615
2631
|
match.clientLoader,
|
|
2616
2632
|
match.hasLoader,
|
|
@@ -2644,7 +2660,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2644
2660
|
}
|
|
2645
2661
|
}))
|
|
2646
2662
|
};
|
|
2647
|
-
const router =
|
|
2663
|
+
const router = _chunkROJMZUUVjs.createStaticRouter.call(void 0,
|
|
2648
2664
|
payload.matches.reduceRight((previous, match) => {
|
|
2649
2665
|
const route = {
|
|
2650
2666
|
id: match.id,
|
|
@@ -2688,8 +2704,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2688
2704
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2689
2705
|
routeModules: {}
|
|
2690
2706
|
};
|
|
2691
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2692
|
-
|
|
2707
|
+
return /* @__PURE__ */ React5.createElement(_chunkJJHCVRDZjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkJJHCVRDZjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2708
|
+
_chunkROJMZUUVjs.StaticRouterProvider,
|
|
2693
2709
|
{
|
|
2694
2710
|
context,
|
|
2695
2711
|
router,
|
|
@@ -2747,7 +2763,7 @@ function deserializeErrors(errors) {
|
|
|
2747
2763
|
let serialized = {};
|
|
2748
2764
|
for (let [key, val] of entries) {
|
|
2749
2765
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2750
|
-
serialized[key] = new (0,
|
|
2766
|
+
serialized[key] = new (0, _chunkJJHCVRDZjs.ErrorResponseImpl)(
|
|
2751
2767
|
val.status,
|
|
2752
2768
|
val.statusText,
|
|
2753
2769
|
val.data,
|
|
@@ -2905,4 +2921,4 @@ function deserializeErrors(errors) {
|
|
|
2905
2921
|
|
|
2906
2922
|
|
|
2907
2923
|
|
|
2908
|
-
exports.Await =
|
|
2924
|
+
exports.Await = _chunkROJMZUUVjs.Await; exports.BrowserRouter = _chunkROJMZUUVjs.BrowserRouter; exports.Form = _chunkROJMZUUVjs.Form; exports.HashRouter = _chunkROJMZUUVjs.HashRouter; exports.IDLE_BLOCKER = _chunkJJHCVRDZjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkJJHCVRDZjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkJJHCVRDZjs.IDLE_NAVIGATION; exports.Link = _chunkROJMZUUVjs.Link; exports.Links = _chunkJJHCVRDZjs.Links; exports.MemoryRouter = _chunkROJMZUUVjs.MemoryRouter; exports.Meta = _chunkJJHCVRDZjs.Meta; exports.NavLink = _chunkROJMZUUVjs.NavLink; exports.Navigate = _chunkROJMZUUVjs.Navigate; exports.NavigationType = _chunkJJHCVRDZjs.Action; exports.Outlet = _chunkROJMZUUVjs.Outlet; exports.PrefetchPageLinks = _chunkJJHCVRDZjs.PrefetchPageLinks; exports.Route = _chunkROJMZUUVjs.Route; exports.Router = _chunkROJMZUUVjs.Router; exports.RouterProvider = _chunkROJMZUUVjs.RouterProvider; exports.Routes = _chunkROJMZUUVjs.Routes; exports.Scripts = _chunkJJHCVRDZjs.Scripts; exports.ScrollRestoration = _chunkROJMZUUVjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkROJMZUUVjs.StaticRouter; exports.StaticRouterProvider = _chunkROJMZUUVjs.StaticRouterProvider; exports.UNSAFE_DataRouterContext = _chunkJJHCVRDZjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkJJHCVRDZjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkJJHCVRDZjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkJJHCVRDZjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkJJHCVRDZjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkJJHCVRDZjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkJJHCVRDZjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkJJHCVRDZjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkJJHCVRDZjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkJJHCVRDZjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkJJHCVRDZjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkROJMZUUVjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkROJMZUUVjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkROJMZUUVjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkJJHCVRDZjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkJJHCVRDZjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkJJHCVRDZjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkJJHCVRDZjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkJJHCVRDZjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkJJHCVRDZjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkJJHCVRDZjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkROJMZUUVjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkJJHCVRDZjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkROJMZUUVjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkJJHCVRDZjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkJJHCVRDZjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkROJMZUUVjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkROJMZUUVjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkROJMZUUVjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkROJMZUUVjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkROJMZUUVjs.createBrowserRouter; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkROJMZUUVjs.createHashRouter; exports.createMemoryRouter = _chunkROJMZUUVjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkJJHCVRDZjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkROJMZUUVjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkROJMZUUVjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkROJMZUUVjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkROJMZUUVjs.createStaticHandler; exports.createStaticRouter = _chunkROJMZUUVjs.createStaticRouter; exports.data = _chunkJJHCVRDZjs.data; exports.generatePath = _chunkJJHCVRDZjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkJJHCVRDZjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkJJHCVRDZjs.matchPath; exports.matchRoutes = _chunkJJHCVRDZjs.matchRoutes; exports.parsePath = _chunkJJHCVRDZjs.parsePath; exports.redirect = _chunkJJHCVRDZjs.redirect; exports.redirectDocument = _chunkJJHCVRDZjs.redirectDocument; exports.renderMatches = _chunkROJMZUUVjs.renderMatches; exports.replace = _chunkJJHCVRDZjs.replace; exports.resolvePath = _chunkJJHCVRDZjs.resolvePath; exports.unstable_HistoryRouter = _chunkROJMZUUVjs.HistoryRouter; exports.unstable_RSCHydratedRouter = RSCHydratedRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_RouterContextProvider = _chunkJJHCVRDZjs.unstable_RouterContextProvider; exports.unstable_createCallServer = createCallServer; exports.unstable_createContext = _chunkJJHCVRDZjs.unstable_createContext; exports.unstable_getRSCStream = getRSCStream; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkROJMZUUVjs.usePrompt; exports.useActionData = _chunkJJHCVRDZjs.useActionData; exports.useAsyncError = _chunkJJHCVRDZjs.useAsyncError; exports.useAsyncValue = _chunkJJHCVRDZjs.useAsyncValue; exports.useBeforeUnload = _chunkROJMZUUVjs.useBeforeUnload; exports.useBlocker = _chunkJJHCVRDZjs.useBlocker; exports.useFetcher = _chunkROJMZUUVjs.useFetcher; exports.useFetchers = _chunkROJMZUUVjs.useFetchers; exports.useFormAction = _chunkROJMZUUVjs.useFormAction; exports.useHref = _chunkJJHCVRDZjs.useHref; exports.useInRouterContext = _chunkJJHCVRDZjs.useInRouterContext; exports.useLinkClickHandler = _chunkROJMZUUVjs.useLinkClickHandler; exports.useLoaderData = _chunkJJHCVRDZjs.useLoaderData; exports.useLocation = _chunkJJHCVRDZjs.useLocation; exports.useMatch = _chunkJJHCVRDZjs.useMatch; exports.useMatches = _chunkJJHCVRDZjs.useMatches; exports.useNavigate = _chunkJJHCVRDZjs.useNavigate; exports.useNavigation = _chunkJJHCVRDZjs.useNavigation; exports.useNavigationType = _chunkJJHCVRDZjs.useNavigationType; exports.useOutlet = _chunkJJHCVRDZjs.useOutlet; exports.useOutletContext = _chunkJJHCVRDZjs.useOutletContext; exports.useParams = _chunkJJHCVRDZjs.useParams; exports.useResolvedPath = _chunkJJHCVRDZjs.useResolvedPath; exports.useRevalidator = _chunkJJHCVRDZjs.useRevalidator; exports.useRouteError = _chunkJJHCVRDZjs.useRouteError; exports.useRouteLoaderData = _chunkJJHCVRDZjs.useRouteLoaderData; exports.useRoutes = _chunkJJHCVRDZjs.useRoutes; exports.useSearchParams = _chunkROJMZUUVjs.useSearchParams; exports.useSubmit = _chunkROJMZUUVjs.useSubmit; exports.useViewTransitionState = _chunkROJMZUUVjs.useViewTransitionState;
|