react-router 7.8.0-pre.0 → 7.8.0-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{production/chunk-BCLZG6QW.js → development/chunk-4EVDZJGM.js} +130 -130
- package/dist/development/{chunk-HSC5IU24.mjs → chunk-I22FVTOY.mjs} +2 -2
- package/dist/development/{chunk-IW6UADHO.js → chunk-NGF2R4G7.js} +65 -32
- package/dist/development/{chunk-SC4OUYO4.mjs → chunk-XFFANEXU.mjs} +45 -12
- package/dist/development/{components-uUh0svuC.d.mts → components-CuPfnyiZ.d.mts} +1 -1
- package/dist/{production/context-DZWGFcKX.d.mts → development/context-DohQKLID.d.mts} +6 -7
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-DSU6bZil.d.ts → development/index-react-server-client-BzBbJLAD.d.ts} +1 -1
- package/dist/{production/index-react-server-client-BUK-oRcG.d.mts → development/index-react-server-client-CuajY2vy.d.mts} +3 -3
- 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 +6 -7
- package/dist/development/index-react-server.d.ts +6 -7
- package/dist/development/index-react-server.js +44 -11
- package/dist/development/index-react-server.mjs +44 -11
- package/dist/development/index.d.mts +8 -8
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +97 -97
- 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-UTmTa8an.d.mts → route-data-CpB5xtMm.d.mts} +1 -1
- package/dist/development/{routeModules-D5bppTB2.d.ts → routeModules-qBivMBjd.d.ts} +6 -7
- package/dist/{development/chunk-Z4NNCWGU.js → production/chunk-4PESVXQ2.js} +130 -130
- package/dist/production/{chunk-KQ5567DT.mjs → chunk-JJOMWYJ4.mjs} +2 -2
- package/dist/production/{chunk-X2NPJMV2.mjs → chunk-P2ZJHOXZ.mjs} +45 -12
- package/dist/production/{chunk-YC2ENCM3.js → chunk-RLJ23MYZ.js} +65 -32
- package/dist/production/{components-uUh0svuC.d.mts → components-CuPfnyiZ.d.mts} +1 -1
- package/dist/{development/context-DZWGFcKX.d.mts → production/context-DohQKLID.d.mts} +6 -7
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-DSU6bZil.d.ts → production/index-react-server-client-BzBbJLAD.d.ts} +1 -1
- package/dist/{development/index-react-server-client-BUK-oRcG.d.mts → production/index-react-server-client-CuajY2vy.d.mts} +3 -3
- 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 +6 -7
- package/dist/production/index-react-server.d.ts +6 -7
- package/dist/production/index-react-server.js +44 -11
- package/dist/production/index-react-server.mjs +44 -11
- package/dist/production/index.d.mts +8 -8
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +97 -97
- 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-UTmTa8an.d.mts → route-data-CpB5xtMm.d.mts} +1 -1
- package/dist/production/{routeModules-D5bppTB2.d.ts → routeModules-qBivMBjd.d.ts} +6 -7
- 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 v7.8.0-pre.
|
|
2
|
+
* react-router v7.8.0-pre.1
|
|
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 _chunk4EVDZJGMjs = require('./chunk-4EVDZJGM.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -142,7 +142,7 @@ var _chunkZ4NNCWGUjs = require('./chunk-Z4NNCWGU.js');
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
var
|
|
145
|
+
var _chunkNGF2R4G7js = require('./chunk-NGF2R4G7.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 = _chunkNGF2R4G7js.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 && _chunkNGF2R4G7js.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 = _chunk4EVDZJGMjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
181
181
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
182
|
-
|
|
182
|
+
_chunkNGF2R4G7js.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(_chunkNGF2R4G7js.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
198
|
+
_chunk4EVDZJGMjs.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
|
+
_chunkNGF2R4G7js.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
|
+
_chunkNGF2R4G7js.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
249
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.unstable_middleware]) ? new (0, _chunkNGF2R4G7js.unstable_RouterContextProvider)() : {},
|
|
250
250
|
frameworkContextRef.current.manifest,
|
|
251
251
|
frameworkContextRef.current.routeModules
|
|
252
252
|
);
|
|
253
|
-
routerRef.current =
|
|
253
|
+
routerRef.current = _chunk4EVDZJGMjs.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(_chunkNGF2R4G7js.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunk4EVDZJGMjs.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 ? _chunk4EVDZJGMjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
274
|
+
HydrateFallback: route.HydrateFallback ? _chunk4EVDZJGMjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
275
|
+
ErrorBoundary: route.ErrorBoundary ? _chunk4EVDZJGMjs.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 || _chunk4EVDZJGMjs.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
|
+
_chunkNGF2R4G7js.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 (_chunkNGF2R4G7js.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 = _chunkNGF2R4G7js.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 (_chunkNGF2R4G7js.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkNGF2R4G7js.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 _chunkNGF2R4G7js.decodeViaTurboStream.call(void 0, stream, global);
|
|
718
718
|
let data2 = decoded.value;
|
|
719
|
-
if (data2 &&
|
|
720
|
-
let result = data2[
|
|
719
|
+
if (data2 && _chunkNGF2R4G7js.SingleFetchRedirectSymbol in data2) {
|
|
720
|
+
let result = data2[_chunkNGF2R4G7js.SingleFetchRedirectSymbol];
|
|
721
721
|
let init = { status: result.status };
|
|
722
722
|
if (result.reload) {
|
|
723
|
-
throw
|
|
723
|
+
throw _chunkNGF2R4G7js.redirectDocument.call(void 0, result.redirect, init);
|
|
724
724
|
} else if (result.replace) {
|
|
725
|
-
throw
|
|
725
|
+
throw _chunkNGF2R4G7js.replace.call(void 0, result.redirect, init);
|
|
726
726
|
} else {
|
|
727
|
-
throw
|
|
727
|
+
throw _chunkNGF2R4G7js.redirect.call(void 0, result.redirect, init);
|
|
728
728
|
}
|
|
729
729
|
} else {
|
|
730
730
|
invariant2(
|
|
@@ -852,7 +852,7 @@ 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
|
+
..._chunkNGF2R4G7js.NO_BODY_STATUS_CODES,
|
|
856
856
|
304
|
|
857
857
|
]);
|
|
858
858
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -882,10 +882,10 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
882
882
|
return handleQueryError(error);
|
|
883
883
|
}
|
|
884
884
|
function handleQueryResult(result) {
|
|
885
|
-
if (!
|
|
885
|
+
if (!_chunkNGF2R4G7js.isResponse.call(void 0, result)) {
|
|
886
886
|
result = staticContextToResponse(result);
|
|
887
887
|
}
|
|
888
|
-
if (
|
|
888
|
+
if (_chunkNGF2R4G7js.isRedirectResponse.call(void 0, result)) {
|
|
889
889
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
890
890
|
result: getSingleFetchRedirect(
|
|
891
891
|
result.status,
|
|
@@ -893,7 +893,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
893
893
|
build.basename
|
|
894
894
|
),
|
|
895
895
|
headers: result.headers,
|
|
896
|
-
status:
|
|
896
|
+
status: _chunkNGF2R4G7js.SINGLE_FETCH_REDIRECT_STATUS
|
|
897
897
|
});
|
|
898
898
|
}
|
|
899
899
|
return result;
|
|
@@ -908,7 +908,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
908
908
|
}
|
|
909
909
|
function staticContextToResponse(context) {
|
|
910
910
|
let headers = getDocumentHeaders(context, build);
|
|
911
|
-
if (
|
|
911
|
+
if (_chunkNGF2R4G7js.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
912
912
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
913
913
|
result: getSingleFetchRedirect(
|
|
914
914
|
context.statusCode,
|
|
@@ -916,12 +916,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
916
916
|
build.basename
|
|
917
917
|
),
|
|
918
918
|
headers,
|
|
919
|
-
status:
|
|
919
|
+
status: _chunkNGF2R4G7js.SINGLE_FETCH_REDIRECT_STATUS
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
922
|
if (context.errors) {
|
|
923
923
|
Object.values(context.errors).forEach((err) => {
|
|
924
|
-
if (!
|
|
924
|
+
if (!_chunkNGF2R4G7js.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
925
925
|
handleError(err);
|
|
926
926
|
}
|
|
927
927
|
});
|
|
@@ -968,18 +968,18 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
968
968
|
return handleQueryError(error);
|
|
969
969
|
}
|
|
970
970
|
function handleQueryResult(result) {
|
|
971
|
-
let response =
|
|
972
|
-
if (
|
|
971
|
+
let response = _chunkNGF2R4G7js.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
972
|
+
if (_chunkNGF2R4G7js.isRedirectResponse.call(void 0, response)) {
|
|
973
973
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
974
974
|
result: {
|
|
975
|
-
[
|
|
975
|
+
[_chunkNGF2R4G7js.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
976
976
|
response.status,
|
|
977
977
|
response.headers,
|
|
978
978
|
build.basename
|
|
979
979
|
)
|
|
980
980
|
},
|
|
981
981
|
headers: response.headers,
|
|
982
|
-
status:
|
|
982
|
+
status: _chunkNGF2R4G7js.SINGLE_FETCH_REDIRECT_STATUS
|
|
983
983
|
});
|
|
984
984
|
}
|
|
985
985
|
return response;
|
|
@@ -994,22 +994,22 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
994
994
|
}
|
|
995
995
|
function staticContextToResponse(context) {
|
|
996
996
|
let headers = getDocumentHeaders(context, build);
|
|
997
|
-
if (
|
|
997
|
+
if (_chunkNGF2R4G7js.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
998
998
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
999
999
|
result: {
|
|
1000
|
-
[
|
|
1000
|
+
[_chunkNGF2R4G7js.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
1001
1001
|
context.statusCode,
|
|
1002
1002
|
headers,
|
|
1003
1003
|
build.basename
|
|
1004
1004
|
)
|
|
1005
1005
|
},
|
|
1006
1006
|
headers,
|
|
1007
|
-
status:
|
|
1007
|
+
status: _chunkNGF2R4G7js.SINGLE_FETCH_REDIRECT_STATUS
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
1010
|
if (context.errors) {
|
|
1011
1011
|
Object.values(context.errors).forEach((err) => {
|
|
1012
|
-
if (!
|
|
1012
|
+
if (!_chunkNGF2R4G7js.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1013
1013
|
handleError(err);
|
|
1014
1014
|
}
|
|
1015
1015
|
});
|
|
@@ -1066,7 +1066,7 @@ function generateSingleFetchResponse(request, build, serverMode, {
|
|
|
1066
1066
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1067
1067
|
let redirect2 = headers.get("Location");
|
|
1068
1068
|
if (basename) {
|
|
1069
|
-
redirect2 =
|
|
1069
|
+
redirect2 = _chunkNGF2R4G7js.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1070
1070
|
}
|
|
1071
1071
|
return {
|
|
1072
1072
|
redirect: redirect2,
|
|
@@ -1092,7 +1092,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1092
1092
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1093
1093
|
);
|
|
1094
1094
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1095
|
-
return
|
|
1095
|
+
return _chunkNGF2R4G7js.encode.call(void 0, data2, {
|
|
1096
1096
|
signal: controller.signal,
|
|
1097
1097
|
plugins: [
|
|
1098
1098
|
(value) => {
|
|
@@ -1100,12 +1100,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1100
1100
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1101
1101
|
return ["SanitizedError", name, message, stack];
|
|
1102
1102
|
}
|
|
1103
|
-
if (value instanceof
|
|
1103
|
+
if (value instanceof _chunkNGF2R4G7js.ErrorResponseImpl) {
|
|
1104
1104
|
let { data: data3, status, statusText } = value;
|
|
1105
1105
|
return ["ErrorResponse", data3, status, statusText];
|
|
1106
1106
|
}
|
|
1107
|
-
if (value && typeof value === "object" &&
|
|
1108
|
-
return ["SingleFetchRedirect", value[
|
|
1107
|
+
if (value && typeof value === "object" && _chunkNGF2R4G7js.SingleFetchRedirectSymbol in value) {
|
|
1108
|
+
return ["SingleFetchRedirect", value[_chunkNGF2R4G7js.SingleFetchRedirectSymbol]];
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
],
|
|
@@ -1128,14 +1128,14 @@ function derive(build, mode) {
|
|
|
1128
1128
|
let routes = createRoutes(build.routes);
|
|
1129
1129
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1130
1130
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1131
|
-
let staticHandler =
|
|
1131
|
+
let staticHandler = _chunkNGF2R4G7js.createStaticHandler.call(void 0, dataRoutes, {
|
|
1132
1132
|
basename: build.basename
|
|
1133
1133
|
});
|
|
1134
1134
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1135
1135
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1136
1136
|
console.error(
|
|
1137
1137
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1138
|
-
|
|
1138
|
+
_chunkNGF2R4G7js.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1139
1139
|
);
|
|
1140
1140
|
}
|
|
1141
1141
|
});
|
|
@@ -1181,26 +1181,26 @@ var createRequestHandler = (build, mode) => {
|
|
|
1181
1181
|
});
|
|
1182
1182
|
};
|
|
1183
1183
|
if (_build.future.unstable_middleware) {
|
|
1184
|
-
if (initialContext && !(initialContext instanceof
|
|
1184
|
+
if (initialContext && !(initialContext instanceof _chunkNGF2R4G7js.unstable_RouterContextProvider)) {
|
|
1185
1185
|
let error = new Error(
|
|
1186
1186
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `unstable_RouterContextProvider` from your `getLoadContext` function."
|
|
1187
1187
|
);
|
|
1188
1188
|
handleError(error);
|
|
1189
1189
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1190
1190
|
}
|
|
1191
|
-
loadContext = initialContext || new (0,
|
|
1191
|
+
loadContext = initialContext || new (0, _chunkNGF2R4G7js.unstable_RouterContextProvider)();
|
|
1192
1192
|
} else {
|
|
1193
1193
|
loadContext = initialContext || {};
|
|
1194
1194
|
}
|
|
1195
1195
|
let url = new URL(request.url);
|
|
1196
1196
|
let normalizedBasename = _build.basename || "/";
|
|
1197
1197
|
let normalizedPath = url.pathname;
|
|
1198
|
-
if (
|
|
1198
|
+
if (_chunkNGF2R4G7js.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1199
1199
|
normalizedPath = normalizedBasename;
|
|
1200
1200
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1201
1201
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1202
1202
|
}
|
|
1203
|
-
if (
|
|
1203
|
+
if (_chunkNGF2R4G7js.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1204
1204
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1205
1205
|
}
|
|
1206
1206
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
@@ -1211,7 +1211,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1211
1211
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1212
1212
|
if (url.pathname.endsWith(".data")) {
|
|
1213
1213
|
errorHandler(
|
|
1214
|
-
new (0,
|
|
1214
|
+
new (0, _chunkNGF2R4G7js.ErrorResponseImpl)(
|
|
1215
1215
|
404,
|
|
1216
1216
|
"Not Found",
|
|
1217
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.`
|
|
@@ -1231,7 +1231,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
let manifestUrl =
|
|
1234
|
+
let manifestUrl = _chunkNGF2R4G7js.getManifestPath.call(void 0,
|
|
1235
1235
|
_build.routeDiscovery.manifestPath,
|
|
1236
1236
|
normalizedBasename
|
|
1237
1237
|
);
|
|
@@ -1272,7 +1272,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1272
1272
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1273
1273
|
request
|
|
1274
1274
|
});
|
|
1275
|
-
if (
|
|
1275
|
+
if (_chunkNGF2R4G7js.isRedirectResponse.call(void 0, response)) {
|
|
1276
1276
|
let result = getSingleFetchRedirect(
|
|
1277
1277
|
response.status,
|
|
1278
1278
|
response.headers,
|
|
@@ -1280,7 +1280,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1280
1280
|
);
|
|
1281
1281
|
if (request.method === "GET") {
|
|
1282
1282
|
result = {
|
|
1283
|
-
[
|
|
1283
|
+
[_chunkNGF2R4G7js.SingleFetchRedirectSymbol]: result
|
|
1284
1284
|
};
|
|
1285
1285
|
}
|
|
1286
1286
|
let headers = new Headers(response.headers);
|
|
@@ -1293,7 +1293,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1293
1293
|
serverMode
|
|
1294
1294
|
),
|
|
1295
1295
|
{
|
|
1296
|
-
status:
|
|
1296
|
+
status: _chunkNGF2R4G7js.SINGLE_FETCH_REDIRECT_STATUS,
|
|
1297
1297
|
headers
|
|
1298
1298
|
}
|
|
1299
1299
|
);
|
|
@@ -1407,7 +1407,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1407
1407
|
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
1408
1408
|
try {
|
|
1409
1409
|
let innerResult = await query(request);
|
|
1410
|
-
if (!
|
|
1410
|
+
if (!_chunkNGF2R4G7js.isResponse.call(void 0, innerResult)) {
|
|
1411
1411
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1412
1412
|
}
|
|
1413
1413
|
return innerResult;
|
|
@@ -1417,7 +1417,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1417
1417
|
}
|
|
1418
1418
|
} : void 0
|
|
1419
1419
|
});
|
|
1420
|
-
if (!
|
|
1420
|
+
if (!_chunkNGF2R4G7js.isResponse.call(void 0, result)) {
|
|
1421
1421
|
result = await renderHtml(result, isSpaMode);
|
|
1422
1422
|
}
|
|
1423
1423
|
return result;
|
|
@@ -1432,7 +1432,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1432
1432
|
}
|
|
1433
1433
|
if (context.errors) {
|
|
1434
1434
|
Object.values(context.errors).forEach((err) => {
|
|
1435
|
-
if (!
|
|
1435
|
+
if (!_chunkNGF2R4G7js.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1436
1436
|
handleError(err);
|
|
1437
1437
|
}
|
|
1438
1438
|
});
|
|
@@ -1484,10 +1484,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1484
1484
|
} catch (error) {
|
|
1485
1485
|
handleError(error);
|
|
1486
1486
|
let errorForSecondRender = error;
|
|
1487
|
-
if (
|
|
1487
|
+
if (_chunkNGF2R4G7js.isResponse.call(void 0, error)) {
|
|
1488
1488
|
try {
|
|
1489
1489
|
let data2 = await unwrapResponse(error);
|
|
1490
|
-
errorForSecondRender = new (0,
|
|
1490
|
+
errorForSecondRender = new (0, _chunkNGF2R4G7js.ErrorResponseImpl)(
|
|
1491
1491
|
error.status,
|
|
1492
1492
|
error.statusText,
|
|
1493
1493
|
data2
|
|
@@ -1495,7 +1495,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1495
1495
|
} catch (e) {
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
|
-
context =
|
|
1498
|
+
context = _chunkNGF2R4G7js.getStaticContextFromError.call(void 0,
|
|
1499
1499
|
staticHandler.dataRoutes,
|
|
1500
1500
|
context,
|
|
1501
1501
|
errorForSecondRender
|
|
@@ -1554,7 +1554,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1554
1554
|
return handleQueryRouteError(error);
|
|
1555
1555
|
}
|
|
1556
1556
|
function handleQueryRouteResult(result) {
|
|
1557
|
-
if (
|
|
1557
|
+
if (_chunkNGF2R4G7js.isResponse.call(void 0, result)) {
|
|
1558
1558
|
return result;
|
|
1559
1559
|
}
|
|
1560
1560
|
if (typeof result === "string") {
|
|
@@ -1563,11 +1563,11 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1563
1563
|
return Response.json(result);
|
|
1564
1564
|
}
|
|
1565
1565
|
function handleQueryRouteError(error) {
|
|
1566
|
-
if (
|
|
1566
|
+
if (_chunkNGF2R4G7js.isResponse.call(void 0, error)) {
|
|
1567
1567
|
error.headers.set("X-Remix-Catch", "yes");
|
|
1568
1568
|
return error;
|
|
1569
1569
|
}
|
|
1570
|
-
if (
|
|
1570
|
+
if (_chunkNGF2R4G7js.isRouteErrorResponse.call(void 0, error)) {
|
|
1571
1571
|
handleError(error);
|
|
1572
1572
|
return errorResponseToJson(error, serverMode);
|
|
1573
1573
|
}
|
|
@@ -1693,7 +1693,7 @@ function createSessionStorage({
|
|
|
1693
1693
|
};
|
|
1694
1694
|
}
|
|
1695
1695
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1696
|
-
|
|
1696
|
+
_chunkNGF2R4G7js.warnOnce.call(void 0,
|
|
1697
1697
|
cookie.isSigned,
|
|
1698
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.`
|
|
1699
1699
|
);
|
|
@@ -1788,12 +1788,12 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
1788
1788
|
...state,
|
|
1789
1789
|
loaderData: { ...state.loaderData }
|
|
1790
1790
|
};
|
|
1791
|
-
let initialMatches =
|
|
1791
|
+
let initialMatches = _chunkNGF2R4G7js.matchRoutes.call(void 0, routes, location2, basename);
|
|
1792
1792
|
if (initialMatches) {
|
|
1793
1793
|
for (let match of initialMatches) {
|
|
1794
1794
|
let routeId = match.route.id;
|
|
1795
1795
|
let routeInfo = getRouteInfo(routeId);
|
|
1796
|
-
if (
|
|
1796
|
+
if (_chunkNGF2R4G7js.shouldHydrateRouteLoader.call(void 0,
|
|
1797
1797
|
routeId,
|
|
1798
1798
|
routeInfo.clientLoader,
|
|
1799
1799
|
routeInfo.hasLoader,
|
|
@@ -1871,7 +1871,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
1873
|
);
|
|
1874
|
-
if (
|
|
1874
|
+
if (_chunkNGF2R4G7js.isRouteErrorResponse.call(void 0, error)) {
|
|
1875
1875
|
return /* @__PURE__ */ React.default.createElement(
|
|
1876
1876
|
ErrorWrapper,
|
|
1877
1877
|
{
|
|
@@ -1879,7 +1879,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1879
1879
|
title: "Unhandled Thrown Response!"
|
|
1880
1880
|
},
|
|
1881
1881
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1882
|
-
|
|
1882
|
+
_chunkNGF2R4G7js.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1883
1883
|
);
|
|
1884
1884
|
}
|
|
1885
1885
|
let errorInstance;
|
|
@@ -1905,7 +1905,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1905
1905
|
function RSCDefaultRootErrorBoundary({
|
|
1906
1906
|
hasRootLayout
|
|
1907
1907
|
}) {
|
|
1908
|
-
let error =
|
|
1908
|
+
let error = _chunkNGF2R4G7js.useRouteError.call(void 0, );
|
|
1909
1909
|
if (hasRootLayout === void 0) {
|
|
1910
1910
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1911
1911
|
}
|
|
@@ -2019,7 +2019,7 @@ function createRouterFromPayload({
|
|
|
2019
2019
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2020
2020
|
let patches = /* @__PURE__ */ new Map();
|
|
2021
2021
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2022
|
-
|
|
2022
|
+
_chunkNGF2R4G7js.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2023
2023
|
if (!patches.has(patch.parentId)) {
|
|
2024
2024
|
patches.set(patch.parentId, []);
|
|
2025
2025
|
}
|
|
@@ -2041,11 +2041,11 @@ function createRouterFromPayload({
|
|
|
2041
2041
|
}
|
|
2042
2042
|
return [route];
|
|
2043
2043
|
}, []);
|
|
2044
|
-
globalVar.__router =
|
|
2044
|
+
globalVar.__router = _chunkNGF2R4G7js.createRouter.call(void 0, {
|
|
2045
2045
|
routes,
|
|
2046
2046
|
unstable_getContext,
|
|
2047
2047
|
basename: payload.basename,
|
|
2048
|
-
history:
|
|
2048
|
+
history: _chunkNGF2R4G7js.createBrowserHistory.call(void 0, ),
|
|
2049
2049
|
hydrationData: getHydrationData(
|
|
2050
2050
|
{
|
|
2051
2051
|
loaderData: payload.loaderData,
|
|
@@ -2055,7 +2055,7 @@ function createRouterFromPayload({
|
|
|
2055
2055
|
routes,
|
|
2056
2056
|
(routeId) => {
|
|
2057
2057
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2058
|
-
|
|
2058
|
+
_chunkNGF2R4G7js.invariant.call(void 0, match, "Route not found in payload");
|
|
2059
2059
|
return {
|
|
2060
2060
|
clientLoader: match.clientLoader,
|
|
2061
2061
|
hasLoader: match.hasLoader,
|
|
@@ -2100,9 +2100,9 @@ function createRouterFromPayload({
|
|
|
2100
2100
|
});
|
|
2101
2101
|
return globalVar.__router;
|
|
2102
2102
|
}
|
|
2103
|
-
var renderedRoutesContext =
|
|
2103
|
+
var renderedRoutesContext = _chunkNGF2R4G7js.unstable_createContext.call(void 0, );
|
|
2104
2104
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2105
|
-
let dataStrategy =
|
|
2105
|
+
let dataStrategy = _chunkNGF2R4G7js.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2106
2106
|
getRouter,
|
|
2107
2107
|
(match) => {
|
|
2108
2108
|
let M = match;
|
|
@@ -2156,20 +2156,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2156
2156
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2157
2157
|
return async (args, basename, targetRoutes) => {
|
|
2158
2158
|
let { request, context } = args;
|
|
2159
|
-
let url =
|
|
2159
|
+
let url = _chunkNGF2R4G7js.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2160
2160
|
if (request.method === "GET") {
|
|
2161
|
-
url =
|
|
2161
|
+
url = _chunkNGF2R4G7js.stripIndexParam.call(void 0, url);
|
|
2162
2162
|
if (targetRoutes) {
|
|
2163
2163
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2164
2164
|
}
|
|
2165
2165
|
}
|
|
2166
2166
|
let res = await fetchImplementation(
|
|
2167
|
-
new Request(url, await
|
|
2167
|
+
new Request(url, await _chunkNGF2R4G7js.createRequestInit.call(void 0, request))
|
|
2168
2168
|
);
|
|
2169
2169
|
if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
|
|
2170
|
-
throw new (0,
|
|
2170
|
+
throw new (0, _chunkNGF2R4G7js.ErrorResponseImpl)(404, "Not Found", true);
|
|
2171
2171
|
}
|
|
2172
|
-
|
|
2172
|
+
_chunkNGF2R4G7js.invariant.call(void 0, res.body, "No response body to decode");
|
|
2173
2173
|
try {
|
|
2174
2174
|
const payload = await createFromReadableStream(res.body, {
|
|
2175
2175
|
temporaryReferences: void 0
|
|
@@ -2193,7 +2193,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2193
2193
|
}
|
|
2194
2194
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2195
2195
|
let results = { routes: {} };
|
|
2196
|
-
const dataKey =
|
|
2196
|
+
const dataKey = _chunkNGF2R4G7js.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2197
2197
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2198
2198
|
results.routes[routeId] = { data: data2 };
|
|
2199
2199
|
}
|
|
@@ -2315,7 +2315,7 @@ function RSCHydratedRouter({
|
|
|
2315
2315
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2316
2316
|
routeModules: {}
|
|
2317
2317
|
};
|
|
2318
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2318
|
+
return /* @__PURE__ */ React4.createElement(_chunkNGF2R4G7js.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkNGF2R4G7js.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunk4EVDZJGMjs.RouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2319
2319
|
}
|
|
2320
2320
|
function createRouteFromServerManifest(match, payload) {
|
|
2321
2321
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2375,7 +2375,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2375
2375
|
return await callSingleFetch(singleFetch);
|
|
2376
2376
|
}
|
|
2377
2377
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2378
|
-
throw
|
|
2378
|
+
throw _chunkNGF2R4G7js.noActionDefinedError.call(void 0, "action", match.id);
|
|
2379
2379
|
},
|
|
2380
2380
|
path: match.path,
|
|
2381
2381
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2388,7 +2388,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2388
2388
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2389
2389
|
};
|
|
2390
2390
|
if (typeof dataRoute.loader === "function") {
|
|
2391
|
-
dataRoute.loader.hydrate =
|
|
2391
|
+
dataRoute.loader.hydrate = _chunkNGF2R4G7js.shouldHydrateRouteLoader.call(void 0,
|
|
2392
2392
|
match.id,
|
|
2393
2393
|
match.clientLoader,
|
|
2394
2394
|
match.hasLoader,
|
|
@@ -2398,7 +2398,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2398
2398
|
return dataRoute;
|
|
2399
2399
|
}
|
|
2400
2400
|
function callSingleFetch(singleFetch) {
|
|
2401
|
-
|
|
2401
|
+
_chunkNGF2R4G7js.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2402
2402
|
return singleFetch();
|
|
2403
2403
|
}
|
|
2404
2404
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2406,7 +2406,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2406
2406
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2407
2407
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2408
2408
|
console.error(msg);
|
|
2409
|
-
throw new (0,
|
|
2409
|
+
throw new (0, _chunkNGF2R4G7js.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
2412
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2634,7 +2634,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2634
2634
|
if (payload.type !== "render") return null;
|
|
2635
2635
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2636
2636
|
for (const match of payload.matches) {
|
|
2637
|
-
if (
|
|
2637
|
+
if (_chunkNGF2R4G7js.shouldHydrateRouteLoader.call(void 0,
|
|
2638
2638
|
match.id,
|
|
2639
2639
|
match.clientLoader,
|
|
2640
2640
|
match.hasLoader,
|
|
@@ -2668,7 +2668,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
}))
|
|
2670
2670
|
};
|
|
2671
|
-
const router =
|
|
2671
|
+
const router = _chunk4EVDZJGMjs.createStaticRouter.call(void 0,
|
|
2672
2672
|
payload.matches.reduceRight((previous, match) => {
|
|
2673
2673
|
const route = {
|
|
2674
2674
|
id: match.id,
|
|
@@ -2712,8 +2712,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2712
2712
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2713
2713
|
routeModules: {}
|
|
2714
2714
|
};
|
|
2715
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2716
|
-
|
|
2715
|
+
return /* @__PURE__ */ React5.createElement(_chunkNGF2R4G7js.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkNGF2R4G7js.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2716
|
+
_chunk4EVDZJGMjs.StaticRouterProvider,
|
|
2717
2717
|
{
|
|
2718
2718
|
context,
|
|
2719
2719
|
router,
|
|
@@ -2771,7 +2771,7 @@ function deserializeErrors(errors) {
|
|
|
2771
2771
|
let serialized = {};
|
|
2772
2772
|
for (let [key, val] of entries) {
|
|
2773
2773
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2774
|
-
serialized[key] = new (0,
|
|
2774
|
+
serialized[key] = new (0, _chunkNGF2R4G7js.ErrorResponseImpl)(
|
|
2775
2775
|
val.status,
|
|
2776
2776
|
val.statusText,
|
|
2777
2777
|
val.data,
|
|
@@ -2929,4 +2929,4 @@ function deserializeErrors(errors) {
|
|
|
2929
2929
|
|
|
2930
2930
|
|
|
2931
2931
|
|
|
2932
|
-
exports.Await =
|
|
2932
|
+
exports.Await = _chunk4EVDZJGMjs.Await; exports.BrowserRouter = _chunk4EVDZJGMjs.BrowserRouter; exports.Form = _chunk4EVDZJGMjs.Form; exports.HashRouter = _chunk4EVDZJGMjs.HashRouter; exports.IDLE_BLOCKER = _chunkNGF2R4G7js.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkNGF2R4G7js.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkNGF2R4G7js.IDLE_NAVIGATION; exports.Link = _chunk4EVDZJGMjs.Link; exports.Links = _chunkNGF2R4G7js.Links; exports.MemoryRouter = _chunk4EVDZJGMjs.MemoryRouter; exports.Meta = _chunkNGF2R4G7js.Meta; exports.NavLink = _chunk4EVDZJGMjs.NavLink; exports.Navigate = _chunk4EVDZJGMjs.Navigate; exports.NavigationType = _chunkNGF2R4G7js.Action; exports.Outlet = _chunk4EVDZJGMjs.Outlet; exports.PrefetchPageLinks = _chunkNGF2R4G7js.PrefetchPageLinks; exports.Route = _chunk4EVDZJGMjs.Route; exports.Router = _chunk4EVDZJGMjs.Router; exports.RouterProvider = _chunk4EVDZJGMjs.RouterProvider; exports.Routes = _chunk4EVDZJGMjs.Routes; exports.Scripts = _chunkNGF2R4G7js.Scripts; exports.ScrollRestoration = _chunk4EVDZJGMjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunk4EVDZJGMjs.StaticRouter; exports.StaticRouterProvider = _chunk4EVDZJGMjs.StaticRouterProvider; exports.UNSAFE_DataRouterContext = _chunkNGF2R4G7js.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkNGF2R4G7js.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkNGF2R4G7js.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkNGF2R4G7js.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkNGF2R4G7js.FrameworkContext; exports.UNSAFE_LocationContext = _chunkNGF2R4G7js.LocationContext; exports.UNSAFE_NavigationContext = _chunkNGF2R4G7js.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkNGF2R4G7js.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkNGF2R4G7js.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkNGF2R4G7js.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkNGF2R4G7js.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunk4EVDZJGMjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk4EVDZJGMjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk4EVDZJGMjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkNGF2R4G7js.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkNGF2R4G7js.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkNGF2R4G7js.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkNGF2R4G7js.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkNGF2R4G7js.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkNGF2R4G7js.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkNGF2R4G7js.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunk4EVDZJGMjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkNGF2R4G7js.invariant; exports.UNSAFE_mapRouteProperties = _chunk4EVDZJGMjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkNGF2R4G7js.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkNGF2R4G7js.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunk4EVDZJGMjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunk4EVDZJGMjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunk4EVDZJGMjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunk4EVDZJGMjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunk4EVDZJGMjs.createBrowserRouter; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunk4EVDZJGMjs.createHashRouter; exports.createMemoryRouter = _chunk4EVDZJGMjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkNGF2R4G7js.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunk4EVDZJGMjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunk4EVDZJGMjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunk4EVDZJGMjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunk4EVDZJGMjs.createStaticHandler; exports.createStaticRouter = _chunk4EVDZJGMjs.createStaticRouter; exports.data = _chunkNGF2R4G7js.data; exports.generatePath = _chunkNGF2R4G7js.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkNGF2R4G7js.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkNGF2R4G7js.matchPath; exports.matchRoutes = _chunkNGF2R4G7js.matchRoutes; exports.parsePath = _chunkNGF2R4G7js.parsePath; exports.redirect = _chunkNGF2R4G7js.redirect; exports.redirectDocument = _chunkNGF2R4G7js.redirectDocument; exports.renderMatches = _chunk4EVDZJGMjs.renderMatches; exports.replace = _chunkNGF2R4G7js.replace; exports.resolvePath = _chunkNGF2R4G7js.resolvePath; exports.unstable_HistoryRouter = _chunk4EVDZJGMjs.HistoryRouter; exports.unstable_RSCHydratedRouter = RSCHydratedRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_RouterContextProvider = _chunkNGF2R4G7js.unstable_RouterContextProvider; exports.unstable_createCallServer = createCallServer; exports.unstable_createContext = _chunkNGF2R4G7js.unstable_createContext; exports.unstable_getRSCStream = getRSCStream; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunk4EVDZJGMjs.usePrompt; exports.useActionData = _chunkNGF2R4G7js.useActionData; exports.useAsyncError = _chunkNGF2R4G7js.useAsyncError; exports.useAsyncValue = _chunkNGF2R4G7js.useAsyncValue; exports.useBeforeUnload = _chunk4EVDZJGMjs.useBeforeUnload; exports.useBlocker = _chunkNGF2R4G7js.useBlocker; exports.useFetcher = _chunk4EVDZJGMjs.useFetcher; exports.useFetchers = _chunk4EVDZJGMjs.useFetchers; exports.useFormAction = _chunk4EVDZJGMjs.useFormAction; exports.useHref = _chunkNGF2R4G7js.useHref; exports.useInRouterContext = _chunkNGF2R4G7js.useInRouterContext; exports.useLinkClickHandler = _chunk4EVDZJGMjs.useLinkClickHandler; exports.useLoaderData = _chunkNGF2R4G7js.useLoaderData; exports.useLocation = _chunkNGF2R4G7js.useLocation; exports.useMatch = _chunkNGF2R4G7js.useMatch; exports.useMatches = _chunkNGF2R4G7js.useMatches; exports.useNavigate = _chunkNGF2R4G7js.useNavigate; exports.useNavigation = _chunkNGF2R4G7js.useNavigation; exports.useNavigationType = _chunkNGF2R4G7js.useNavigationType; exports.useOutlet = _chunkNGF2R4G7js.useOutlet; exports.useOutletContext = _chunkNGF2R4G7js.useOutletContext; exports.useParams = _chunkNGF2R4G7js.useParams; exports.useResolvedPath = _chunkNGF2R4G7js.useResolvedPath; exports.useRevalidator = _chunkNGF2R4G7js.useRevalidator; exports.useRouteError = _chunkNGF2R4G7js.useRouteError; exports.useRouteLoaderData = _chunkNGF2R4G7js.useRouteLoaderData; exports.useRoutes = _chunkNGF2R4G7js.useRoutes; exports.useSearchParams = _chunk4EVDZJGMjs.useSearchParams; exports.useSubmit = _chunk4EVDZJGMjs.useSubmit; exports.useViewTransitionState = _chunk4EVDZJGMjs.useViewTransitionState;
|