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.
Files changed (60) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{production/chunk-BCLZG6QW.js → development/chunk-4EVDZJGM.js} +130 -130
  3. package/dist/development/{chunk-HSC5IU24.mjs → chunk-I22FVTOY.mjs} +2 -2
  4. package/dist/development/{chunk-IW6UADHO.js → chunk-NGF2R4G7.js} +65 -32
  5. package/dist/development/{chunk-SC4OUYO4.mjs → chunk-XFFANEXU.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-BzBbJLAD.d.ts} +1 -1
  12. package/dist/{production/index-react-server-client-BUK-oRcG.d.mts → development/index-react-server-client-CuajY2vy.d.mts} +3 -3
  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 +44 -11
  20. package/dist/development/index-react-server.mjs +44 -11
  21. package/dist/development/index.d.mts +8 -8
  22. package/dist/development/index.d.ts +4 -4
  23. package/dist/development/index.js +97 -97
  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/{development/chunk-Z4NNCWGU.js → production/chunk-4PESVXQ2.js} +130 -130
  32. package/dist/production/{chunk-KQ5567DT.mjs → chunk-JJOMWYJ4.mjs} +2 -2
  33. package/dist/production/{chunk-X2NPJMV2.mjs → chunk-P2ZJHOXZ.mjs} +45 -12
  34. package/dist/production/{chunk-YC2ENCM3.js → chunk-RLJ23MYZ.js} +65 -32
  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-BzBbJLAD.d.ts} +1 -1
  41. package/dist/{development/index-react-server-client-BUK-oRcG.d.mts → production/index-react-server-client-CuajY2vy.d.mts} +3 -3
  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 +44 -11
  49. package/dist/production/index-react-server.mjs +44 -11
  50. package/dist/production/index.d.mts +8 -8
  51. package/dist/production/index.d.ts +4 -4
  52. package/dist/production/index.js +97 -97
  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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.0
2
+ * react-router v7.8.0-pre.1
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-X2NPJMV2.mjs";
60
+ } from "./chunk-P2ZJHOXZ.mjs";
61
61
 
62
62
  // lib/dom/ssr/server.tsx
63
63
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.0
2
+ * react-router v7.8.0-pre.1
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
+ data2.init?.status ?? 500,
4686
+ data2.init?.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
  }
@@ -8908,7 +8941,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
8908
8941
  try {
8909
8942
  if (isBrowser) {
8910
8943
  window.__reactRouterVersion = // @ts-expect-error
8911
- "7.8.0-pre.0";
8944
+ "7.8.0-pre.1";
8912
8945
  }
8913
8946
  } catch (e) {
8914
8947
  }
@@ -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.1
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(
@@ -1,4 +1,4 @@
1
- import { R as Router$1, I as InitialEntry, T as To, a as RelativeRoutingType, N as NonIndexRouteObject, L as LazyRouteFunction, b as IndexRouteObject, c as Location, A as Action, d as Navigator, e as RouterInit, F as FutureConfig, H as HydrationState, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, f as RouteObject, g as RouteMatch, h as Params, U as UIMatch } from './context-DZWGFcKX.mjs';
1
+ import { R as Router$1, I as InitialEntry, T as To, a as RelativeRoutingType, N as NonIndexRouteObject, L as LazyRouteFunction, b as IndexRouteObject, c as Location, A as Action, d as Navigator, e as RouterInit, F as FutureConfig, H as HydrationState, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, f as RouteObject, g as RouteMatch, h as Params, U as UIMatch } from './context-DohQKLID.mjs';
2
2
  import * as React from 'react';
3
3
 
4
4
  declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
@@ -280,12 +280,10 @@ interface unstable_RouterContext<T = unknown> {
280
280
  }
281
281
  /**
282
282
  * Creates a type-safe {@link unstable_RouterContext} object that can be used to
283
- * * store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,
284
- * * [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
285
- * * Similar to React's [`createContext`](https://react.dev/reference/react/createContext),
286
- * * but specifically designed for React Router's request/response lifecycle.
287
- *
288
- * <docs-warning>Enable this API with the `future.unstable_middleware` flag.</docs-warning>
283
+ * store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,
284
+ * [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
285
+ * Similar to React's [`createContext`](https://react.dev/reference/react/createContext),
286
+ * but specifically designed for React Router's request/response lifecycle.
289
287
  *
290
288
  * If a `defaultValue` is provided, it will be returned from `context.get()`
291
289
  * when no value has been set for the context. Otherwise, reading this context
@@ -352,6 +350,7 @@ declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterCon
352
350
  * const userContext = unstable_createContext<User | null>(null);
353
351
  * const contextProvider = new unstable_RouterContextProvider();
354
352
  * contextProvider.set(userContext, getUser());
353
+ * // ^ Type-safe
355
354
  * const user = contextProvider.get(userContext);
356
355
  * // ^ User
357
356
  *
@@ -422,7 +421,7 @@ interface DataFunctionArgs<Context> {
422
421
  * middlewares from the bottom-up
423
422
  */
424
423
  interface unstable_MiddlewareNextFunction<Result = unknown> {
425
- (): MaybePromise<Result>;
424
+ (): Promise<Result>;
426
425
  }
427
426
  /**
428
427
  * Route middleware function signature. Receives the same "data" arguments as a
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './components-uUh0svuC.mjs';
2
+ import { R as RouterProviderProps$1 } from './components-CuPfnyiZ.mjs';
3
3
  import './browser-z32v5KVN.mjs';
4
- import { e as RouterInit } from './context-DZWGFcKX.mjs';
4
+ import { e as RouterInit } from './context-DohQKLID.mjs';
5
5
 
6
6
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
7
7
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -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 _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.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -11,7 +11,7 @@
11
11
  "use client";
12
12
 
13
13
 
14
- var _chunkYC2ENCM3js = require('./chunk-YC2ENCM3.js');
14
+ var _chunkRLJ23MYZjs = require('./chunk-RLJ23MYZ.js');
15
15
 
16
16
  // lib/dom-export/dom-router-provider.tsx
17
17
  var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react);
@@ -180,7 +180,7 @@ function HydratedRouter(props) {
180
180
  }, []);
181
181
  React2.useEffect(() => {
182
182
  if (process.env.NODE_ENV === "development" && criticalCss === void 0) {
183
- document.querySelectorAll(`[${_chunkYC2ENCM3js.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
183
+ document.querySelectorAll(`[${_chunkRLJ23MYZjs.CRITICAL_CSS_DATA_ATTRIBUTE}]`).forEach((element) => element.remove());
184
184
  }
185
185
  }, [criticalCss]);
186
186
  let [location, setLocation] = React2.useState(router.state.location);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.0
2
+ * react-router v7.8.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -12,7 +12,7 @@
12
12
  import {
13
13
  deserializeErrors,
14
14
  getHydrationData
15
- } from "./chunk-KQ5567DT.mjs";
15
+ } from "./chunk-JJOMWYJ4.mjs";
16
16
  import {
17
17
  CRITICAL_CSS_DATA_ATTRIBUTE,
18
18
  FrameworkContext,
@@ -29,7 +29,7 @@ import {
29
29
  invariant,
30
30
  mapRouteProperties,
31
31
  useFogOFWarDiscovery
32
- } from "./chunk-X2NPJMV2.mjs";
32
+ } from "./chunk-P2ZJHOXZ.mjs";
33
33
 
34
34
  // lib/dom-export/dom-router-provider.tsx
35
35
  import * as React from "react";
@@ -1,4 +1,4 @@
1
- import { I as InitialEntry, T as To, i as RelativeRoutingType, w as NonIndexRouteObject, af as LazyRouteFunction, q as IndexRouteObject, a as Location, A as Action, aC as Navigator, d as Router$1, Q as RouterInit, aY as FutureConfig$1, H as HydrationState, D as DataStrategyFunction, W as PatchRoutesOnNavigationFunction, p as RouteObject, aE as RouteMatch, o as Params, U as UIMatch, ae as HTMLFormMethod, ac as FormEncType, aZ as RouteManifest, a_ as ServerRouteModule, z as MiddlewareEnabled, y as unstable_RouterContextProvider, x as AppLoadContext, ag as LoaderFunctionArgs, a6 as ActionFunctionArgs, e as RouteModules, X as DataRouteObject, J as ClientLoaderFunction, $ as StaticHandlerContext, aJ as PageLinkDescriptor, a$ as History, _ as GetScrollRestorationKeyFunction, f as NavigateOptions, a0 as Fetcher, h as SerializeFrom, B as BlockerFunction, b0 as CreateStaticHandlerOptions$1, Y as StaticHandler } from './routeModules-D5bppTB2.js';
1
+ import { I as InitialEntry, T as To, i as RelativeRoutingType, w as NonIndexRouteObject, af as LazyRouteFunction, q as IndexRouteObject, a as Location, A as Action, aC as Navigator, d as Router$1, Q as RouterInit, aY as FutureConfig$1, H as HydrationState, D as DataStrategyFunction, W as PatchRoutesOnNavigationFunction, p as RouteObject, aE as RouteMatch, o as Params, U as UIMatch, ae as HTMLFormMethod, ac as FormEncType, aZ as RouteManifest, a_ as ServerRouteModule, z as MiddlewareEnabled, y as unstable_RouterContextProvider, x as AppLoadContext, ag as LoaderFunctionArgs, a6 as ActionFunctionArgs, e as RouteModules, X as DataRouteObject, J as ClientLoaderFunction, $ as StaticHandlerContext, aJ as PageLinkDescriptor, a$ as History, _ as GetScrollRestorationKeyFunction, f as NavigateOptions, a0 as Fetcher, h as SerializeFrom, B as BlockerFunction, b0 as CreateStaticHandlerOptions$1, Y as StaticHandler } from './routeModules-qBivMBjd.js';
2
2
  import * as React from 'react';
3
3
 
4
4
  declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
@@ -1,7 +1,7 @@
1
- import './components-uUh0svuC.mjs';
1
+ import './components-CuPfnyiZ.mjs';
2
2
  import * as React from 'react';
3
- import { az as RouteManifest, M as MiddlewareEnabled, o as unstable_RouterContextProvider, j as LoaderFunctionArgs, i as ActionFunctionArgs, J as StaticHandlerContext, H as HydrationState, z as DataRouteObject, a2 as HTMLFormMethod, a0 as FormEncType, a as RelativeRoutingType, T as To, aA as History, E as GetScrollRestorationKeyFunction, e as RouterInit, F as FutureConfig$1, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, q as NavigateOptions, K as Fetcher, f as RouteObject, R as Router, B as BlockerFunction, c as Location, aB as CreateStaticHandlerOptions$1, C as StaticHandler } from './context-DZWGFcKX.mjs';
4
- import { o as ServerRouteModule, A as AppLoadContext, c as RouteModules, h as ClientLoaderFunction, m as PageLinkDescriptor, d as SerializeFrom } from './route-data-UTmTa8an.mjs';
3
+ import { az as RouteManifest, M as MiddlewareEnabled, o as unstable_RouterContextProvider, j as LoaderFunctionArgs, i as ActionFunctionArgs, J as StaticHandlerContext, H as HydrationState, z as DataRouteObject, a2 as HTMLFormMethod, a0 as FormEncType, a as RelativeRoutingType, T as To, aA as History, E as GetScrollRestorationKeyFunction, e as RouterInit, F as FutureConfig$1, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, q as NavigateOptions, K as Fetcher, f as RouteObject, R as Router, B as BlockerFunction, c as Location, aB as CreateStaticHandlerOptions$1, C as StaticHandler } from './context-DohQKLID.mjs';
4
+ import { o as ServerRouteModule, A as AppLoadContext, c as RouteModules, h as ClientLoaderFunction, m as PageLinkDescriptor, d as SerializeFrom } from './route-data-CpB5xtMm.mjs';
5
5
 
6
6
  type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
7
7
  interface ServerRoute extends Route {
@@ -1,5 +1,5 @@
1
- export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes, W as UNSAFE_WithComponentProps, v as UNSAFE_WithErrorBoundaryProps, t as UNSAFE_WithHydrateFallbackProps } from './components-uUh0svuC.mjs';
2
- export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BUK-oRcG.mjs';
3
- import './context-DZWGFcKX.mjs';
1
+ export { f as Await, g as MemoryRouter, h as Navigate, i as Outlet, j as Route, k as Router, l as RouterProvider, m as Routes, W as UNSAFE_WithComponentProps, v as UNSAFE_WithErrorBoundaryProps, t as UNSAFE_WithHydrateFallbackProps } from './components-CuPfnyiZ.mjs';
2
+ export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-CuajY2vy.mjs';
3
+ import './context-DohQKLID.mjs';
4
4
  import 'react';
5
- import './route-data-UTmTa8an.mjs';
5
+ import './route-data-CpB5xtMm.mjs';
@@ -1,3 +1,3 @@
1
- export { h as Await, V as BrowserRouter, _ as Form, W as HashRouter, X as Link, am as Links, i as MemoryRouter, al as Meta, Z as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, $ as ScrollRestoration, aj as StaticRouter, ak as StaticRouterProvider, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, Y as unstable_HistoryRouter } from './index-react-server-client-DSU6bZil.js';
2
- import './routeModules-D5bppTB2.js';
1
+ export { h as Await, V as BrowserRouter, _ as Form, W as HashRouter, X as Link, am as Links, i as MemoryRouter, al as Meta, Z as NavLink, j as Navigate, k as Outlet, l as Route, m as Router, n as RouterProvider, o as Routes, $ as ScrollRestoration, aj as StaticRouter, ak as StaticRouterProvider, az as UNSAFE_WithComponentProps, aD as UNSAFE_WithErrorBoundaryProps, aB as UNSAFE_WithHydrateFallbackProps, Y as unstable_HistoryRouter } from './index-react-server-client-BzBbJLAD.js';
2
+ import './routeModules-qBivMBjd.js';
3
3
  import 'react';
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * react-router v7.8.0-pre.0
2
+ * react-router v7.8.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -30,11 +30,11 @@
30
30
 
31
31
 
32
32
 
33
- var _chunkBCLZG6QWjs = require('./chunk-BCLZG6QW.js');
33
+ var _chunk4PESVXQ2js = require('./chunk-4PESVXQ2.js');
34
34
 
35
35
 
36
36
 
37
- var _chunkYC2ENCM3js = require('./chunk-YC2ENCM3.js');
37
+ var _chunkRLJ23MYZjs = require('./chunk-RLJ23MYZ.js');
38
38
 
39
39
 
40
40
 
@@ -58,4 +58,4 @@ var _chunkYC2ENCM3js = require('./chunk-YC2ENCM3.js');
58
58
 
59
59
 
60
60
 
61
- exports.Await = _chunkBCLZG6QWjs.Await; exports.BrowserRouter = _chunkBCLZG6QWjs.BrowserRouter; exports.Form = _chunkBCLZG6QWjs.Form; exports.HashRouter = _chunkBCLZG6QWjs.HashRouter; exports.Link = _chunkBCLZG6QWjs.Link; exports.Links = _chunkYC2ENCM3js.Links; exports.MemoryRouter = _chunkBCLZG6QWjs.MemoryRouter; exports.Meta = _chunkYC2ENCM3js.Meta; exports.NavLink = _chunkBCLZG6QWjs.NavLink; exports.Navigate = _chunkBCLZG6QWjs.Navigate; exports.Outlet = _chunkBCLZG6QWjs.Outlet; exports.Route = _chunkBCLZG6QWjs.Route; exports.Router = _chunkBCLZG6QWjs.Router; exports.RouterProvider = _chunkBCLZG6QWjs.RouterProvider; exports.Routes = _chunkBCLZG6QWjs.Routes; exports.ScrollRestoration = _chunkBCLZG6QWjs.ScrollRestoration; exports.StaticRouter = _chunkBCLZG6QWjs.StaticRouter; exports.StaticRouterProvider = _chunkBCLZG6QWjs.StaticRouterProvider; exports.UNSAFE_WithComponentProps = _chunkBCLZG6QWjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkBCLZG6QWjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkBCLZG6QWjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkBCLZG6QWjs.HistoryRouter;
61
+ exports.Await = _chunk4PESVXQ2js.Await; exports.BrowserRouter = _chunk4PESVXQ2js.BrowserRouter; exports.Form = _chunk4PESVXQ2js.Form; exports.HashRouter = _chunk4PESVXQ2js.HashRouter; exports.Link = _chunk4PESVXQ2js.Link; exports.Links = _chunkRLJ23MYZjs.Links; exports.MemoryRouter = _chunk4PESVXQ2js.MemoryRouter; exports.Meta = _chunkRLJ23MYZjs.Meta; exports.NavLink = _chunk4PESVXQ2js.NavLink; exports.Navigate = _chunk4PESVXQ2js.Navigate; exports.Outlet = _chunk4PESVXQ2js.Outlet; exports.Route = _chunk4PESVXQ2js.Route; exports.Router = _chunk4PESVXQ2js.Router; exports.RouterProvider = _chunk4PESVXQ2js.RouterProvider; exports.Routes = _chunk4PESVXQ2js.Routes; exports.ScrollRestoration = _chunk4PESVXQ2js.ScrollRestoration; exports.StaticRouter = _chunk4PESVXQ2js.StaticRouter; exports.StaticRouterProvider = _chunk4PESVXQ2js.StaticRouterProvider; exports.UNSAFE_WithComponentProps = _chunk4PESVXQ2js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk4PESVXQ2js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk4PESVXQ2js.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunk4PESVXQ2js.HistoryRouter;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.8.0-pre.0
2
+ * react-router v7.8.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -32,7 +32,7 @@ import {
32
32
  WithComponentProps,
33
33
  WithErrorBoundaryProps,
34
34
  WithHydrateFallbackProps
35
- } from "./chunk-X2NPJMV2.mjs";
35
+ } from "./chunk-P2ZJHOXZ.mjs";
36
36
  export {
37
37
  Await,
38
38
  BrowserRouter,
@@ -237,12 +237,10 @@ interface unstable_RouterContext<T = unknown> {
237
237
  }
238
238
  /**
239
239
  * Creates a type-safe {@link unstable_RouterContext} object that can be used to
240
- * * store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,
241
- * * [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
242
- * * Similar to React's [`createContext`](https://react.dev/reference/react/createContext),
243
- * * but specifically designed for React Router's request/response lifecycle.
244
- *
245
- * <docs-warning>Enable this API with the `future.unstable_middleware` flag.</docs-warning>
240
+ * store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s,
241
+ * [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware).
242
+ * Similar to React's [`createContext`](https://react.dev/reference/react/createContext),
243
+ * but specifically designed for React Router's request/response lifecycle.
246
244
  *
247
245
  * If a `defaultValue` is provided, it will be returned from `context.get()`
248
246
  * when no value has been set for the context. Otherwise, reading this context
@@ -309,6 +307,7 @@ declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterCon
309
307
  * const userContext = unstable_createContext<User | null>(null);
310
308
  * const contextProvider = new unstable_RouterContextProvider();
311
309
  * contextProvider.set(userContext, getUser());
310
+ * // ^ Type-safe
312
311
  * const user = contextProvider.get(userContext);
313
312
  * // ^ User
314
313
  *
@@ -379,7 +378,7 @@ interface DataFunctionArgs<Context> {
379
378
  * middlewares from the bottom-up
380
379
  */
381
380
  interface unstable_MiddlewareNextFunction<Result = unknown> {
382
- (): MaybePromise<Result>;
381
+ (): Promise<Result>;
383
382
  }
384
383
  /**
385
384
  * Route middleware function signature. Receives the same "data" arguments as a