react-router 7.8.0-pre.0 → 7.8.0-pre.2

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/development/{chunk-HSC5IU24.mjs → chunk-3D24XHV2.mjs} +19 -4
  3. package/dist/development/{chunk-IW6UADHO.js → chunk-74TFO7SN.js} +65 -32
  4. package/dist/{production/chunk-BCLZG6QW.js → development/chunk-HQ37R3FK.js} +130 -130
  5. package/dist/development/{chunk-SC4OUYO4.mjs → chunk-WSV33ENW.mjs} +45 -12
  6. package/dist/development/{components-uUh0svuC.d.mts → components-CuPfnyiZ.d.mts} +1 -1
  7. package/dist/{production/context-DZWGFcKX.d.mts → development/context-DohQKLID.d.mts} +6 -7
  8. package/dist/development/dom-export.d.mts +2 -2
  9. package/dist/development/dom-export.js +3 -3
  10. package/dist/development/dom-export.mjs +3 -3
  11. package/dist/{production/index-react-server-client-DSU6bZil.d.ts → development/index-react-server-client-CMphySRb.d.ts} +19 -2
  12. package/dist/{production/index-react-server-client-BUK-oRcG.d.mts → development/index-react-server-client-DXb0OgpJ.d.mts} +21 -4
  13. package/dist/development/index-react-server-client.d.mts +4 -4
  14. package/dist/development/index-react-server-client.d.ts +2 -2
  15. package/dist/development/index-react-server-client.js +4 -4
  16. package/dist/development/index-react-server-client.mjs +2 -2
  17. package/dist/development/index-react-server.d.mts +6 -7
  18. package/dist/development/index-react-server.d.ts +6 -7
  19. package/dist/development/index-react-server.js +82 -35
  20. package/dist/development/index-react-server.mjs +82 -35
  21. package/dist/development/index.d.mts +8 -8
  22. package/dist/development/index.d.ts +4 -4
  23. package/dist/development/index.js +117 -102
  24. package/dist/development/index.mjs +3 -3
  25. package/dist/development/lib/types/internal.d.mts +2 -2
  26. package/dist/development/lib/types/internal.d.ts +1 -1
  27. package/dist/development/lib/types/internal.js +1 -1
  28. package/dist/development/lib/types/internal.mjs +1 -1
  29. package/dist/development/{route-data-UTmTa8an.d.mts → route-data-CpB5xtMm.d.mts} +1 -1
  30. package/dist/development/{routeModules-D5bppTB2.d.ts → routeModules-qBivMBjd.d.ts} +6 -7
  31. package/dist/production/{chunk-YC2ENCM3.js → chunk-DDK3XFL6.js} +65 -32
  32. package/dist/{development/chunk-Z4NNCWGU.js → production/chunk-GSF7DANI.js} +130 -130
  33. package/dist/production/{chunk-X2NPJMV2.mjs → chunk-IEIDJVF4.mjs} +45 -12
  34. package/dist/production/{chunk-KQ5567DT.mjs → chunk-Q6IGLNPQ.mjs} +19 -4
  35. package/dist/production/{components-uUh0svuC.d.mts → components-CuPfnyiZ.d.mts} +1 -1
  36. package/dist/{development/context-DZWGFcKX.d.mts → production/context-DohQKLID.d.mts} +6 -7
  37. package/dist/production/dom-export.d.mts +2 -2
  38. package/dist/production/dom-export.js +3 -3
  39. package/dist/production/dom-export.mjs +3 -3
  40. package/dist/{development/index-react-server-client-DSU6bZil.d.ts → production/index-react-server-client-CMphySRb.d.ts} +19 -2
  41. package/dist/{development/index-react-server-client-BUK-oRcG.d.mts → production/index-react-server-client-DXb0OgpJ.d.mts} +21 -4
  42. package/dist/production/index-react-server-client.d.mts +4 -4
  43. package/dist/production/index-react-server-client.d.ts +2 -2
  44. package/dist/production/index-react-server-client.js +4 -4
  45. package/dist/production/index-react-server-client.mjs +2 -2
  46. package/dist/production/index-react-server.d.mts +6 -7
  47. package/dist/production/index-react-server.d.ts +6 -7
  48. package/dist/production/index-react-server.js +82 -35
  49. package/dist/production/index-react-server.mjs +82 -35
  50. package/dist/production/index.d.mts +8 -8
  51. package/dist/production/index.d.ts +4 -4
  52. package/dist/production/index.js +117 -102
  53. package/dist/production/index.mjs +3 -3
  54. package/dist/production/lib/types/internal.d.mts +2 -2
  55. package/dist/production/lib/types/internal.d.ts +1 -1
  56. package/dist/production/lib/types/internal.js +1 -1
  57. package/dist/production/lib/types/internal.mjs +1 -1
  58. package/dist/production/{route-data-UTmTa8an.d.mts → route-data-CpB5xtMm.d.mts} +1 -1
  59. package/dist/production/{routeModules-D5bppTB2.d.ts → routeModules-qBivMBjd.d.ts} +6 -7
  60. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.8.0-pre.2
4
+
5
+ ### Patch Changes
6
+
7
+ - proxy server action side-effect redirects from actions for document and callServer requests ([#14131](https://github.com/remix-run/react-router/pull/14131))
8
+
9
+ ## 7.8.0-pre.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [REMOVE] Few additional fixes for returning/throwing data from middleware - attach to #14093 ([#14128](https://github.com/remix-run/react-router/pull/14128))
14
+
3
15
  ## 7.8.0-pre.0
4
16
 
5
17
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.0
2
+ * react-router v7.8.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -57,7 +57,7 @@ import {
57
57
  withComponentProps,
58
58
  withErrorBoundaryProps,
59
59
  withHydrateFallbackProps
60
- } from "./chunk-SC4OUYO4.mjs";
60
+ } from "./chunk-WSV33ENW.mjs";
61
61
 
62
62
  // lib/dom/ssr/server.tsx
63
63
  import * as React from "react";
@@ -703,7 +703,7 @@ function getDocumentHeaders(context, build) {
703
703
  return route.module.headers;
704
704
  });
705
705
  }
706
- function getDocumentHeadersImpl(context, getRouteHeadersFn) {
706
+ function getDocumentHeadersImpl(context, getRouteHeadersFn, _defaultHeaders) {
707
707
  let boundaryIdx = context.errors ? context.matches.findIndex((m) => context.errors[m.route.id]) : -1;
708
708
  let matches = boundaryIdx >= 0 ? context.matches.slice(0, boundaryIdx + 1) : context.matches;
709
709
  let errorHeaders;
@@ -719,6 +719,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
719
719
  return errorHeaders != null;
720
720
  });
721
721
  }
722
+ const defaultHeaders = new Headers(_defaultHeaders);
722
723
  return matches.reduce((parentHeaders, match, idx) => {
723
724
  let { id } = match.route;
724
725
  let loaderHeaders = context.loaderHeaders[id] || new Headers();
@@ -750,7 +751,7 @@ function getDocumentHeadersImpl(context, getRouteHeadersFn) {
750
751
  prependCookies(loaderHeaders, headers);
751
752
  prependCookies(parentHeaders, headers);
752
753
  return headers;
753
- }, new Headers());
754
+ }, new Headers(defaultHeaders));
754
755
  }
755
756
  function prependCookies(parentHeaders, childHeaders) {
756
757
  let parentSetCookieString = parentHeaders.get("Set-Cookie");
@@ -2512,6 +2513,20 @@ async function routeRSCServerRequest({
2512
2513
  return payloadPromise;
2513
2514
  };
2514
2515
  try {
2516
+ const payload = await getPayload();
2517
+ if (serverResponse.status === SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
2518
+ const headers2 = new Headers(serverResponse.headers);
2519
+ headers2.delete("Content-Encoding");
2520
+ headers2.delete("Content-Length");
2521
+ headers2.delete("Content-Type");
2522
+ headers2.delete("x-remix-response");
2523
+ headers2.set("Location", payload.location);
2524
+ return new Response(serverResponseB?.body || "", {
2525
+ headers: headers2,
2526
+ status: payload.status,
2527
+ statusText: serverResponse.statusText
2528
+ });
2529
+ }
2515
2530
  const html = await renderHTML(getPayload);
2516
2531
  const headers = new Headers(serverResponse.headers);
2517
2532
  headers.set("Content-Type", "text/html");
@@ -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.0
2
+ * react-router v7.8.0-pre.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -2942,6 +2942,9 @@ function createStaticHandler(routes, opts) {
2942
2942
  return res;
2943
2943
  },
2944
2944
  (error) => {
2945
+ if (isRouteErrorResponse(error)) {
2946
+ return Promise.resolve(errorResponseToResponse(error));
2947
+ }
2945
2948
  if (isResponse(error)) {
2946
2949
  return Promise.resolve(error);
2947
2950
  }
@@ -3934,12 +3937,6 @@ async function runServerMiddlewarePipeline(args, handler, errorHandler) {
3934
3937
  handler,
3935
3938
  errorHandler
3936
3939
  );
3937
- if (isDataWithResponseInit(result)) {
3938
- return new Response(
3939
- typeof result.data === "string" ? result.data : JSON.stringify(result.data),
3940
- { ...result.init }
3941
- );
3942
- }
3943
3940
  if (isResponse(result)) {
3944
3941
  return result;
3945
3942
  }
@@ -3976,10 +3973,17 @@ async function callServerRouteMiddleware(args, middlewares, handler, errorHandle
3976
3973
  errorHandler,
3977
3974
  idx + 1
3978
3975
  );
3976
+ if (isDataWithResponseInit(result)) {
3977
+ result = dataWithResponseInitToResponse(result);
3978
+ }
3979
3979
  nextResult = result;
3980
3980
  return nextResult;
3981
3981
  } catch (e) {
3982
- nextResult = await errorHandler(e, routeId);
3982
+ nextResult = await errorHandler(
3983
+ // Convert thrown data() values to ErrorResponses
3984
+ isDataWithResponseInit(e) ? dataWithResponseInitToErrorResponse(e) : e,
3985
+ routeId
3986
+ );
3983
3987
  return nextResult;
3984
3988
  }
3985
3989
  };
@@ -3992,16 +3996,23 @@ async function callServerRouteMiddleware(args, middlewares, handler, errorHandle
3992
3996
  },
3993
3997
  next
3994
3998
  );
3999
+ if (isDataWithResponseInit(result)) {
4000
+ result = dataWithResponseInitToResponse(result);
4001
+ }
3995
4002
  if (nextCalled) {
3996
4003
  return typeof result === "undefined" ? nextResult : result;
3997
- } else if (isResponse(result) || isDataWithResponseInit(result)) {
4004
+ } else if (isResponse(result)) {
3998
4005
  return result;
3999
4006
  } else {
4000
4007
  nextResult = await next();
4001
4008
  return nextResult;
4002
4009
  }
4003
- } catch (error) {
4004
- let response = await errorHandler(error, routeId);
4010
+ } catch (e) {
4011
+ let response = await errorHandler(
4012
+ // Convert thrown data() values to ErrorResponses
4013
+ isDataWithResponseInit(e) ? dataWithResponseInitToErrorResponse(e) : e,
4014
+ routeId
4015
+ );
4005
4016
  return response;
4006
4017
  }
4007
4018
  }
@@ -4663,6 +4674,28 @@ function isHashChangeOnly(a, b) {
4663
4674
  }
4664
4675
  return false;
4665
4676
  }
4677
+ function dataWithResponseInitToResponse(data2) {
4678
+ return new Response(
4679
+ typeof data2.data === "string" ? data2.data : JSON.stringify(data2.data),
4680
+ data2.init || void 0
4681
+ );
4682
+ }
4683
+ function dataWithResponseInitToErrorResponse(data2) {
4684
+ return new ErrorResponseImpl(
4685
+ _nullishCoalesce(_optionalChain([data2, 'access', _61 => _61.init, 'optionalAccess', _62 => _62.status]), () => ( 500)),
4686
+ _nullishCoalesce(_optionalChain([data2, 'access', _63 => _63.init, 'optionalAccess', _64 => _64.statusText]), () => ( "Internal Server Error")),
4687
+ data2.data
4688
+ );
4689
+ }
4690
+ function errorResponseToResponse(error) {
4691
+ return new Response(
4692
+ typeof error.data === "string" ? error.data : JSON.stringify(error.data),
4693
+ {
4694
+ status: error.status,
4695
+ statusText: error.statusText
4696
+ }
4697
+ );
4698
+ }
4666
4699
  function isDataStrategyResult(result) {
4667
4700
  return result != null && typeof result === "object" && "type" in result && "result" in result && (result.type === "data" /* data */ || result.type === "error" /* error */);
4668
4701
  }
@@ -5689,7 +5722,7 @@ function getTurboStreamSingleFetchDataStrategy(getRouter, manifest, routeModules
5689
5722
  return {
5690
5723
  hasLoader: manifestRoute.hasLoader,
5691
5724
  hasClientLoader: manifestRoute.hasClientLoader,
5692
- hasShouldRevalidate: Boolean(_optionalChain([routeModule, 'optionalAccess', _61 => _61.shouldRevalidate]))
5725
+ hasShouldRevalidate: Boolean(_optionalChain([routeModule, 'optionalAccess', _65 => _65.shouldRevalidate]))
5693
5726
  };
5694
5727
  },
5695
5728
  fetchAndDecodeViaTurboStream,
@@ -5856,7 +5889,7 @@ async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams,
5856
5889
  let routeResult = fetchedData.routes[match.route.id];
5857
5890
  if ("error" in routeResult) {
5858
5891
  middlewareError = routeResult.error;
5859
- if (_optionalChain([results, 'access', _62 => _62[match.route.id], 'optionalAccess', _63 => _63.result]) == null) {
5892
+ if (_optionalChain([results, 'access', _66 => _66[match.route.id], 'optionalAccess', _67 => _67.result]) == null) {
5860
5893
  results[match.route.id] = {
5861
5894
  type: "error",
5862
5895
  result: middlewareError
@@ -5969,7 +6002,7 @@ async function fetchAndDecodeViaTurboStream(args, basename, targetRoutes) {
5969
6002
  }
5970
6003
  } else {
5971
6004
  let typed = decoded.value;
5972
- let routeId = _optionalChain([targetRoutes, 'optionalAccess', _64 => _64[0]]);
6005
+ let routeId = _optionalChain([targetRoutes, 'optionalAccess', _68 => _68[0]]);
5973
6006
  invariant2(routeId, "No routeId found for single fetch call decoding");
5974
6007
  if ("redirect" in typed) {
5975
6008
  data2 = { redirect: typed };
@@ -6280,7 +6313,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
6280
6313
  if (locationArg) {
6281
6314
  let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
6282
6315
  invariant(
6283
- parentPathnameBase === "/" || _optionalChain([parsedLocationArg, 'access', _65 => _65.pathname, 'optionalAccess', _66 => _66.startsWith, 'call', _67 => _67(parentPathnameBase)]),
6316
+ parentPathnameBase === "/" || _optionalChain([parsedLocationArg, 'access', _69 => _69.pathname, 'optionalAccess', _70 => _70.startsWith, 'call', _71 => _71(parentPathnameBase)]),
6284
6317
  `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`
6285
6318
  );
6286
6319
  location = parsedLocationArg;
@@ -6428,10 +6461,10 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, fut
6428
6461
  }
6429
6462
  }
6430
6463
  let renderedMatches = matches;
6431
- let errors = _optionalChain([dataRouterState, 'optionalAccess', _68 => _68.errors]);
6464
+ let errors = _optionalChain([dataRouterState, 'optionalAccess', _72 => _72.errors]);
6432
6465
  if (errors != null) {
6433
6466
  let errorIndex = renderedMatches.findIndex(
6434
- (m) => m.route.id && _optionalChain([errors, 'optionalAccess', _69 => _69[m.route.id]]) !== void 0
6467
+ (m) => m.route.id && _optionalChain([errors, 'optionalAccess', _73 => _73[m.route.id]]) !== void 0
6435
6468
  );
6436
6469
  invariant(
6437
6470
  errorIndex >= 0,
@@ -6608,15 +6641,15 @@ function useRouteError() {
6608
6641
  if (error !== void 0) {
6609
6642
  return error;
6610
6643
  }
6611
- return _optionalChain([state, 'access', _70 => _70.errors, 'optionalAccess', _71 => _71[routeId]]);
6644
+ return _optionalChain([state, 'access', _74 => _74.errors, 'optionalAccess', _75 => _75[routeId]]);
6612
6645
  }
6613
6646
  function useAsyncValue() {
6614
6647
  let value = React3.useContext(AwaitContext);
6615
- return _optionalChain([value, 'optionalAccess', _72 => _72._data]);
6648
+ return _optionalChain([value, 'optionalAccess', _76 => _76._data]);
6616
6649
  }
6617
6650
  function useAsyncError() {
6618
6651
  let value = React3.useContext(AwaitContext);
6619
- return _optionalChain([value, 'optionalAccess', _73 => _73._error]);
6652
+ return _optionalChain([value, 'optionalAccess', _77 => _77._error]);
6620
6653
  }
6621
6654
  var blockerId = 0;
6622
6655
  function useBlocker(shouldBlock) {
@@ -6728,7 +6761,7 @@ function getKeyedLinksForMatches(matches, routeModules, manifest) {
6728
6761
  let route = manifest.routes[match.route.id];
6729
6762
  return [
6730
6763
  route && route.css ? route.css.map((href) => ({ rel: "stylesheet", href })) : [],
6731
- _optionalChain([module, 'optionalAccess', _74 => _74.links, 'optionalCall', _75 => _75()]) || []
6764
+ _optionalChain([module, 'optionalAccess', _78 => _78.links, 'optionalCall', _79 => _79()]) || []
6732
6765
  ];
6733
6766
  }).flat(2);
6734
6767
  let preloads = getModuleLinkHrefs(matches, manifest);
@@ -6829,7 +6862,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
6829
6862
  // param change, /users/123 -> /users/456
6830
6863
  currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
6831
6864
  // e.g. /files/images/avatar.jpg -> files/finances.xls
6832
- _optionalChain([currentMatches, 'access', _76 => _76[index], 'access', _77 => _77.route, 'access', _78 => _78.path, 'optionalAccess', _79 => _79.endsWith, 'call', _80 => _80("*")]) && currentMatches[index].params["*"] !== match.params["*"]
6865
+ _optionalChain([currentMatches, 'access', _80 => _80[index], 'access', _81 => _81.route, 'access', _82 => _82.path, 'optionalAccess', _83 => _83.endsWith, 'call', _84 => _84("*")]) && currentMatches[index].params["*"] !== match.params["*"]
6833
6866
  );
6834
6867
  };
6835
6868
  if (mode === "assets") {
@@ -6852,7 +6885,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
6852
6885
  location.pathname + location.search + location.hash,
6853
6886
  window.origin
6854
6887
  ),
6855
- currentParams: _optionalChain([currentMatches, 'access', _81 => _81[0], 'optionalAccess', _82 => _82.params]) || {},
6888
+ currentParams: _optionalChain([currentMatches, 'access', _85 => _85[0], 'optionalAccess', _86 => _86.params]) || {},
6856
6889
  nextUrl: new URL(page, window.origin),
6857
6890
  nextParams: match.params,
6858
6891
  defaultShouldRevalidate: true
@@ -7124,10 +7157,10 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
7124
7157
  )
7125
7158
  });
7126
7159
  let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
7127
- let initialData = hasInitialData ? _optionalChain([initialState, 'optionalAccess', _83 => _83.loaderData, 'optionalAccess', _84 => _84[route.id]]) : void 0;
7160
+ let initialData = hasInitialData ? _optionalChain([initialState, 'optionalAccess', _87 => _87.loaderData, 'optionalAccess', _88 => _88[route.id]]) : void 0;
7128
7161
  let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;
7129
- let initialError = hasInitialError ? _optionalChain([initialState, 'optionalAccess', _85 => _85.errors, 'optionalAccess', _86 => _86[route.id]]) : void 0;
7130
- let isHydrationRequest = needsRevalidation == null && (_optionalChain([routeModule, 'access', _87 => _87.clientLoader, 'optionalAccess', _88 => _88.hydrate]) === true || !route.hasLoader);
7162
+ let initialError = hasInitialError ? _optionalChain([initialState, 'optionalAccess', _89 => _89.errors, 'optionalAccess', _90 => _90[route.id]]) : void 0;
7163
+ let isHydrationRequest = needsRevalidation == null && (_optionalChain([routeModule, 'access', _91 => _91.clientLoader, 'optionalAccess', _92 => _92.hydrate]) === true || !route.hasLoader);
7131
7164
  dataRoute.loader = async ({ request, params, context }, singleFetch) => {
7132
7165
  try {
7133
7166
  let result = await prefetchStylesAndCallHandler(async () => {
@@ -7424,7 +7457,7 @@ function getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, routeDi
7424
7457
  function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {
7425
7458
  React6.useEffect(() => {
7426
7459
  if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet
7427
- _optionalChain([window, 'access', _89 => _89.navigator, 'optionalAccess', _90 => _90.connection, 'optionalAccess', _91 => _91.saveData]) === true) {
7460
+ _optionalChain([window, 'access', _93 => _93.navigator, 'optionalAccess', _94 => _94.connection, 'optionalAccess', _95 => _95.saveData]) === true) {
7428
7461
  return;
7429
7462
  }
7430
7463
  function registerElement(el) {
@@ -7527,7 +7560,7 @@ async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, ro
7527
7560
  sessionStorage.removeItem(MANIFEST_VERSION_STORAGE_KEY);
7528
7561
  serverPatches = await res.json();
7529
7562
  } catch (e) {
7530
- if (_optionalChain([signal, 'optionalAccess', _92 => _92.aborted])) return;
7563
+ if (_optionalChain([signal, 'optionalAccess', _96 => _96.aborted])) return;
7531
7564
  throw e;
7532
7565
  }
7533
7566
  let knownRoutes = new Set(Object.keys(manifest.routes));
@@ -7768,7 +7801,7 @@ function PrefetchPageLinksImpl({
7768
7801
  if (!manifestRoute || !manifestRoute.hasLoader) {
7769
7802
  return;
7770
7803
  }
7771
- if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && _optionalChain([routeModules, 'access', _93 => _93[m.route.id], 'optionalAccess', _94 => _94.shouldRevalidate])) {
7804
+ if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && _optionalChain([routeModules, 'access', _97 => _97[m.route.id], 'optionalAccess', _98 => _98.shouldRevalidate])) {
7772
7805
  foundOptOutRoute = true;
7773
7806
  } else if (manifestRoute.hasClientLoader) {
7774
7807
  foundOptOutRoute = true;
@@ -7842,7 +7875,7 @@ function Meta() {
7842
7875
  error
7843
7876
  };
7844
7877
  matches[i] = match;
7845
- if (_optionalChain([routeModule, 'optionalAccess', _95 => _95.meta])) {
7878
+ if (_optionalChain([routeModule, 'optionalAccess', _99 => _99.meta])) {
7846
7879
  routeMeta = typeof routeModule.meta === "function" ? routeModule.meta({
7847
7880
  data: data2,
7848
7881
  loaderData: data2,
@@ -7938,7 +7971,7 @@ function Scripts(scriptProps) {
7938
7971
  }
7939
7972
  let streamScript = "window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());";
7940
7973
  let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : " ";
7941
- let routeModulesScript = !isStatic ? " " : `${_optionalChain([manifest, 'access', _96 => _96.hmr, 'optionalAccess', _97 => _97.runtime]) ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
7974
+ let routeModulesScript = !isStatic ? " " : `${_optionalChain([manifest, 'access', _100 => _100.hmr, 'optionalAccess', _101 => _101.runtime]) ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
7942
7975
  ${matches.map((match, routeIndex) => {
7943
7976
  let routeVarName = `route${routeIndex}`;
7944
7977
  let manifestEntry = manifest.routes[match.route.id];
@@ -8168,7 +8201,7 @@ function BoundaryShell({
8168
8201
  children
8169
8202
  }) {
8170
8203
  let { routeModules } = useFrameworkContext();
8171
- if (_optionalChain([routeModules, 'access', _98 => _98.root, 'optionalAccess', _99 => _99.Layout]) && !isOutsideRemixApp) {
8204
+ if (_optionalChain([routeModules, 'access', _102 => _102.root, 'optionalAccess', _103 => _103.Layout]) && !isOutsideRemixApp) {
8172
8205
  return children;
8173
8206
  }
8174
8207
  return /* @__PURE__ */ React8.createElement("html", { lang: "en" }, /* @__PURE__ */ React8.createElement("head", null, /* @__PURE__ */ React8.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ React8.createElement(