react-router 7.3.0 → 7.4.0

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 (36) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/development/{chunk-K6CSEXPM.mjs → chunk-GNGMS2XR.mjs} +60 -47
  3. package/dist/development/dom-export.d.mts +2 -2
  4. package/dist/development/dom-export.d.ts +2 -2
  5. package/dist/development/dom-export.js +37 -29
  6. package/dist/development/dom-export.mjs +9 -3
  7. package/dist/development/{fog-of-war-Da8gpnoZ.d.mts → fog-of-war-BQyvjjKg.d.mts} +1 -1
  8. package/dist/{production/fog-of-war-CvttGpNz.d.ts → development/fog-of-war-CGNKxM4z.d.ts} +1 -1
  9. package/dist/development/index.d.mts +6 -6
  10. package/dist/development/index.d.ts +6 -6
  11. package/dist/development/index.js +60 -47
  12. package/dist/development/index.mjs +2 -2
  13. package/dist/development/lib/types/route-module.d.mts +2 -2
  14. package/dist/development/lib/types/route-module.d.ts +2 -2
  15. package/dist/development/lib/types/route-module.js +1 -1
  16. package/dist/development/lib/types/route-module.mjs +1 -1
  17. package/dist/development/{route-data-H2S3hwhf.d.ts → route-data-CGHGzi13.d.mts} +5 -5
  18. package/dist/{production/route-data-H2S3hwhf.d.mts → development/route-data-CGHGzi13.d.ts} +5 -5
  19. package/dist/production/{chunk-RFJZTPXA.mjs → chunk-SXJRHUAY.mjs} +60 -47
  20. package/dist/production/dom-export.d.mts +2 -2
  21. package/dist/production/dom-export.d.ts +2 -2
  22. package/dist/production/dom-export.js +37 -29
  23. package/dist/production/dom-export.mjs +9 -3
  24. package/dist/production/{fog-of-war-Da8gpnoZ.d.mts → fog-of-war-BQyvjjKg.d.mts} +1 -1
  25. package/dist/{development/fog-of-war-CvttGpNz.d.ts → production/fog-of-war-CGNKxM4z.d.ts} +1 -1
  26. package/dist/production/index.d.mts +6 -6
  27. package/dist/production/index.d.ts +6 -6
  28. package/dist/production/index.js +60 -47
  29. package/dist/production/index.mjs +2 -2
  30. package/dist/production/lib/types/route-module.d.mts +2 -2
  31. package/dist/production/lib/types/route-module.d.ts +2 -2
  32. package/dist/production/lib/types/route-module.js +1 -1
  33. package/dist/production/lib/types/route-module.mjs +1 -1
  34. package/dist/production/{route-data-H2S3hwhf.d.ts → route-data-CGHGzi13.d.mts} +5 -5
  35. package/dist/{development/route-data-H2S3hwhf.d.mts → production/route-data-CGHGzi13.d.ts} +5 -5
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.4.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix root loader data on initial load redirects in SPA mode ([#13222](https://github.com/remix-run/react-router/pull/13222))
8
+ - Load ancestor pathless/index routes in lazy route discovery for upwards non-eager-discoery routing ([#13203](https://github.com/remix-run/react-router/pull/13203))
9
+ - Fix `shouldRevalidate` behavior for `clientLoader`-only routes in `ssr:true` apps ([#13221](https://github.com/remix-run/react-router/pull/13221))
10
+ - UNSTABLE: Fix `RequestHandler` `loadContext` parameter type when middleware is enabled ([#13204](https://github.com/remix-run/react-router/pull/13204))
11
+ - UNSTABLE: Update `Route.unstable_MiddlewareFunction` to have a return value of `Response | undefined` instead of `Response | void` becaue you should not return anything if you aren't returning the `Response` ([#13199](https://github.com/remix-run/react-router/pull/13199))
12
+ - UNSTABLE(BREAKING): If a middleware throws an error, ensure we only bubble the error itself via `next()` and are no longer leaking the `MiddlewareError` implementation detail ([#13180](https://github.com/remix-run/react-router/pull/13180))
13
+
3
14
  ## 7.3.0
4
15
 
5
16
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.3.0
2
+ * react-router v7.4.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -2684,7 +2684,7 @@ function createStaticHandler(routes, opts) {
2684
2684
  if (respond && matches.some((m) => m.route.unstable_middleware)) {
2685
2685
  invariant(
2686
2686
  requestContext instanceof unstable_RouterContextProvider,
2687
- "When using middleware in `staticHandler.query()`, any provided `requestContext` must bean instance of `unstable_RouterContextProvider`"
2687
+ "When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"
2688
2688
  );
2689
2689
  try {
2690
2690
  let renderedStaticContext;
@@ -2717,20 +2717,20 @@ function createStaticHandler(routes, opts) {
2717
2717
  let res = await respond(renderedStaticContext);
2718
2718
  return res;
2719
2719
  },
2720
- async (e) => {
2721
- if (isResponse(e.error)) {
2722
- return e.error;
2720
+ async (error, routeId) => {
2721
+ if (isResponse(error)) {
2722
+ return error;
2723
2723
  }
2724
2724
  if (renderedStaticContext) {
2725
- if (e.routeId in renderedStaticContext.loaderData) {
2726
- renderedStaticContext.loaderData[e.routeId] = void 0;
2725
+ if (routeId in renderedStaticContext.loaderData) {
2726
+ renderedStaticContext.loaderData[routeId] = void 0;
2727
2727
  }
2728
2728
  return respond(
2729
2729
  getStaticContextFromError(
2730
2730
  dataRoutes,
2731
2731
  renderedStaticContext,
2732
- e.error,
2733
- findNearestBoundary(matches, e.routeId).route.id
2732
+ error,
2733
+ findNearestBoundary(matches, routeId).route.id
2734
2734
  )
2735
2735
  );
2736
2736
  } else {
@@ -2743,9 +2743,9 @@ function createStaticHandler(routes, opts) {
2743
2743
  loaderData: {},
2744
2744
  actionData: null,
2745
2745
  errors: {
2746
- [boundary.route.id]: e.error
2746
+ [boundary.route.id]: error
2747
2747
  },
2748
- statusCode: isRouteErrorResponse(e.error) ? e.error.status : 500,
2748
+ statusCode: isRouteErrorResponse(error) ? error.status : 500,
2749
2749
  actionHeaders: {},
2750
2750
  loaderHeaders: {}
2751
2751
  });
@@ -2805,7 +2805,7 @@ function createStaticHandler(routes, opts) {
2805
2805
  if (respond && matches.some((m) => m.route.unstable_middleware)) {
2806
2806
  invariant(
2807
2807
  requestContext instanceof unstable_RouterContextProvider,
2808
- "When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must bean instance of `unstable_RouterContextProvider`"
2808
+ "When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `unstable_RouterContextProvider`"
2809
2809
  );
2810
2810
  let response = await runMiddlewarePipeline(
2811
2811
  {
@@ -2839,11 +2839,11 @@ function createStaticHandler(routes, opts) {
2839
2839
  let value = result2.actionData ? Object.values(result2.actionData)[0] : Object.values(result2.loaderData)[0];
2840
2840
  return typeof value === "string" ? new Response(value) : Response.json(value);
2841
2841
  },
2842
- (e) => {
2843
- if (isResponse(e.error)) {
2844
- return respond(e.error);
2842
+ (error2) => {
2843
+ if (isResponse(error2)) {
2844
+ return respond(error2);
2845
2845
  }
2846
- return new Response(String(e.error), {
2846
+ return new Response(String(error2), {
2847
2847
  status: 500,
2848
2848
  statusText: "Unexpected Server Error"
2849
2849
  });
@@ -3576,14 +3576,13 @@ async function defaultDataStrategyWithMiddleware(args) {
3576
3576
  args,
3577
3577
  false,
3578
3578
  () => defaultDataStrategy(args),
3579
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
3579
+ (error, routeId) => ({ [routeId]: { type: "error", result: error } })
3580
3580
  );
3581
3581
  }
3582
3582
  async function runMiddlewarePipeline(args, propagateResult, handler, errorHandler) {
3583
3583
  let { matches, request, params, context } = args;
3584
3584
  let middlewareState = {
3585
- handlerResult: void 0,
3586
- propagateResult
3585
+ handlerResult: void 0
3587
3586
  };
3588
3587
  try {
3589
3588
  let tuples = matches.flatMap(
@@ -3592,28 +3591,26 @@ async function runMiddlewarePipeline(args, propagateResult, handler, errorHandle
3592
3591
  let result = await callRouteMiddleware(
3593
3592
  { request, params, context },
3594
3593
  tuples,
3594
+ propagateResult,
3595
3595
  middlewareState,
3596
3596
  handler
3597
3597
  );
3598
- return middlewareState.propagateResult ? result : middlewareState.handlerResult;
3598
+ return propagateResult ? result : middlewareState.handlerResult;
3599
3599
  } catch (e) {
3600
- if (!(e instanceof MiddlewareError)) {
3600
+ if (!middlewareState.middlewareError) {
3601
3601
  throw e;
3602
3602
  }
3603
- let result = await errorHandler(e);
3603
+ let result = await errorHandler(
3604
+ middlewareState.middlewareError.error,
3605
+ middlewareState.middlewareError.routeId
3606
+ );
3604
3607
  if (propagateResult || !middlewareState.handlerResult) {
3605
3608
  return result;
3606
3609
  }
3607
3610
  return Object.assign(middlewareState.handlerResult, result);
3608
3611
  }
3609
3612
  }
3610
- var MiddlewareError = class {
3611
- constructor(routeId, error) {
3612
- this.routeId = routeId;
3613
- this.error = error;
3614
- }
3615
- };
3616
- async function callRouteMiddleware(args, middlewares, middlewareState, handler, idx = 0) {
3613
+ async function callRouteMiddleware(args, middlewares, propagateResult, middlewareState, handler, idx = 0) {
3617
3614
  let { request } = args;
3618
3615
  if (request.signal.aborted) {
3619
3616
  if (request.signal.reason) {
@@ -3639,11 +3636,12 @@ async function callRouteMiddleware(args, middlewares, middlewareState, handler,
3639
3636
  let result = await callRouteMiddleware(
3640
3637
  args,
3641
3638
  middlewares,
3639
+ propagateResult,
3642
3640
  middlewareState,
3643
3641
  handler,
3644
3642
  idx + 1
3645
3643
  );
3646
- if (middlewareState.propagateResult) {
3644
+ if (propagateResult) {
3647
3645
  nextResult = result;
3648
3646
  return nextResult;
3649
3647
  }
@@ -3666,11 +3664,13 @@ async function callRouteMiddleware(args, middlewares, middlewareState, handler,
3666
3664
  } else {
3667
3665
  return next();
3668
3666
  }
3669
- } catch (e) {
3670
- if (e instanceof MiddlewareError) {
3671
- throw e;
3667
+ } catch (error) {
3668
+ if (!middlewareState.middlewareError) {
3669
+ middlewareState.middlewareError = { routeId, error };
3670
+ } else if (middlewareState.middlewareError.error !== error) {
3671
+ middlewareState.middlewareError = { routeId, error };
3672
3672
  }
3673
- throw new MiddlewareError(routeId, e);
3673
+ throw error;
3674
3674
  }
3675
3675
  }
3676
3676
  async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties2, scopedContext, enableMiddleware) {
@@ -6004,6 +6004,9 @@ function StreamTransfer({
6004
6004
  )));
6005
6005
  }
6006
6006
  }
6007
+ function handleMiddlewareError(error, routeId) {
6008
+ return { [routeId]: { type: "error", result: error } };
6009
+ }
6007
6010
  function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRouter) {
6008
6011
  return async (args) => {
6009
6012
  let { request, matches, fetcherKey } = args;
@@ -6012,7 +6015,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
6012
6015
  args,
6013
6016
  false,
6014
6017
  () => singleFetchActionStrategy(request, matches, basename),
6015
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
6018
+ handleMiddlewareError
6016
6019
  );
6017
6020
  }
6018
6021
  if (!ssr) {
@@ -6024,7 +6027,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
6024
6027
  args,
6025
6028
  false,
6026
6029
  () => nonSsrStrategy(manifest, request, matches, basename),
6027
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
6030
+ handleMiddlewareError
6028
6031
  );
6029
6032
  }
6030
6033
  }
@@ -6033,7 +6036,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
6033
6036
  args,
6034
6037
  false,
6035
6038
  () => singleFetchLoaderFetcherStrategy(request, matches, basename),
6036
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
6039
+ handleMiddlewareError
6037
6040
  );
6038
6041
  }
6039
6042
  return runMiddlewarePipeline(
@@ -6048,7 +6051,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
6048
6051
  matches,
6049
6052
  basename
6050
6053
  ),
6051
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
6054
+ handleMiddlewareError
6052
6055
  );
6053
6056
  };
6054
6057
  }
@@ -6098,9 +6101,6 @@ async function nonSsrStrategy(manifest, request, matches, basename) {
6098
6101
  );
6099
6102
  return results;
6100
6103
  }
6101
- function isOptedOut(manifestRoute, routeModule, match, router) {
6102
- return match.route.id in router.state.loaderData && manifestRoute && manifestRoute.hasLoader && routeModule && routeModule.shouldRevalidate;
6103
- }
6104
6104
  async function singleFetchLoaderNavigationStrategy(manifest, routeModules, ssr, router, request, matches, basename) {
6105
6105
  let routesParams = /* @__PURE__ */ new Set();
6106
6106
  let foundOptOutRoute = false;
@@ -6119,8 +6119,10 @@ async function singleFetchLoaderNavigationStrategy(manifest, routeModules, ssr,
6119
6119
  if (!router.state.initialized) {
6120
6120
  return;
6121
6121
  }
6122
- if (isOptedOut(manifestRoute, routeModules[m.route.id], m, router)) {
6123
- foundOptOutRoute = true;
6122
+ if (m.route.id in router.state.loaderData && manifestRoute && m.route.shouldRevalidate) {
6123
+ if (manifestRoute.hasLoader) {
6124
+ foundOptOutRoute = true;
6125
+ }
6124
6126
  return;
6125
6127
  }
6126
6128
  }
@@ -7515,7 +7517,7 @@ function mergeRefs(...refs) {
7515
7517
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7516
7518
  try {
7517
7519
  if (isBrowser) {
7518
- window.__reactRouterVersion = "7.3.0";
7520
+ window.__reactRouterVersion = "7.4.0";
7519
7521
  }
7520
7522
  } catch (e) {
7521
7523
  }
@@ -9676,8 +9678,8 @@ var createRequestHandler = (build, mode) => {
9676
9678
  } else {
9677
9679
  let { pathname } = url;
9678
9680
  let criticalCss = void 0;
9679
- if (_build.getCriticalCss) {
9680
- criticalCss = await _build.getCriticalCss({ pathname });
9681
+ if (_build.unstable_getCriticalCss) {
9682
+ criticalCss = await _build.unstable_getCriticalCss({ pathname });
9681
9683
  } else if (mode === "development" /* Development */ && getDevServerHooks()?.getCriticalCss) {
9682
9684
  criticalCss = await getDevServerHooks()?.getCriticalCss?.(pathname);
9683
9685
  }
@@ -9712,7 +9714,18 @@ async function handleManifestRequest(build, routes, url) {
9712
9714
  }
9713
9715
  let patches = {};
9714
9716
  if (url.searchParams.has("p")) {
9715
- for (let path of url.searchParams.getAll("p")) {
9717
+ let paths = /* @__PURE__ */ new Set();
9718
+ url.searchParams.getAll("p").forEach((path) => {
9719
+ if (!path.startsWith("/")) {
9720
+ path = `/${path}`;
9721
+ }
9722
+ let segments = path.split("/").slice(1);
9723
+ segments.forEach((_, i) => {
9724
+ let partialPath = segments.slice(0, i + 1).join("/");
9725
+ paths.add(`/${partialPath}`);
9726
+ });
9727
+ });
9728
+ for (let path of paths) {
9716
9729
  let matches = matchServerRoutes(routes, path, build.basename);
9717
9730
  if (matches) {
9718
9731
  for (let match of matches) {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-Da8gpnoZ.mjs';
3
- import { R as RouterInit } from './route-data-H2S3hwhf.mjs';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-BQyvjjKg.mjs';
3
+ import { R as RouterInit } from './route-data-CGHGzi13.mjs';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-CvttGpNz.js';
3
- import { R as RouterInit } from './route-data-H2S3hwhf.js';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-CGNKxM4z.js';
3
+ import { R as RouterInit } from './route-data-CGHGzi13.js';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.3.0
2
+ * react-router v7.4.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -2872,14 +2872,13 @@ async function defaultDataStrategyWithMiddleware(args) {
2872
2872
  args,
2873
2873
  false,
2874
2874
  () => defaultDataStrategy(args),
2875
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
2875
+ (error, routeId) => ({ [routeId]: { type: "error", result: error } })
2876
2876
  );
2877
2877
  }
2878
2878
  async function runMiddlewarePipeline(args, propagateResult, handler, errorHandler) {
2879
2879
  let { matches, request, params, context } = args;
2880
2880
  let middlewareState = {
2881
- handlerResult: void 0,
2882
- propagateResult
2881
+ handlerResult: void 0
2883
2882
  };
2884
2883
  try {
2885
2884
  let tuples = matches.flatMap(
@@ -2888,28 +2887,26 @@ async function runMiddlewarePipeline(args, propagateResult, handler, errorHandle
2888
2887
  let result = await callRouteMiddleware(
2889
2888
  { request, params, context },
2890
2889
  tuples,
2890
+ propagateResult,
2891
2891
  middlewareState,
2892
2892
  handler
2893
2893
  );
2894
- return middlewareState.propagateResult ? result : middlewareState.handlerResult;
2894
+ return propagateResult ? result : middlewareState.handlerResult;
2895
2895
  } catch (e) {
2896
- if (!(e instanceof MiddlewareError)) {
2896
+ if (!middlewareState.middlewareError) {
2897
2897
  throw e;
2898
2898
  }
2899
- let result = await errorHandler(e);
2899
+ let result = await errorHandler(
2900
+ middlewareState.middlewareError.error,
2901
+ middlewareState.middlewareError.routeId
2902
+ );
2900
2903
  if (propagateResult || !middlewareState.handlerResult) {
2901
2904
  return result;
2902
2905
  }
2903
2906
  return Object.assign(middlewareState.handlerResult, result);
2904
2907
  }
2905
2908
  }
2906
- var MiddlewareError = class {
2907
- constructor(routeId, error) {
2908
- this.routeId = routeId;
2909
- this.error = error;
2910
- }
2911
- };
2912
- async function callRouteMiddleware(args, middlewares, middlewareState, handler, idx = 0) {
2909
+ async function callRouteMiddleware(args, middlewares, propagateResult, middlewareState, handler, idx = 0) {
2913
2910
  let { request } = args;
2914
2911
  if (request.signal.aborted) {
2915
2912
  if (request.signal.reason) {
@@ -2935,11 +2932,12 @@ async function callRouteMiddleware(args, middlewares, middlewareState, handler,
2935
2932
  let result = await callRouteMiddleware(
2936
2933
  args,
2937
2934
  middlewares,
2935
+ propagateResult,
2938
2936
  middlewareState,
2939
2937
  handler,
2940
2938
  idx + 1
2941
2939
  );
2942
- if (middlewareState.propagateResult) {
2940
+ if (propagateResult) {
2943
2941
  nextResult = result;
2944
2942
  return nextResult;
2945
2943
  }
@@ -2962,11 +2960,13 @@ async function callRouteMiddleware(args, middlewares, middlewareState, handler,
2962
2960
  } else {
2963
2961
  return next();
2964
2962
  }
2965
- } catch (e) {
2966
- if (e instanceof MiddlewareError) {
2967
- throw e;
2963
+ } catch (error) {
2964
+ if (!middlewareState.middlewareError) {
2965
+ middlewareState.middlewareError = { routeId, error };
2966
+ } else if (middlewareState.middlewareError.error !== error) {
2967
+ middlewareState.middlewareError = { routeId, error };
2968
2968
  }
2969
- throw new MiddlewareError(routeId, e);
2969
+ throw error;
2970
2970
  }
2971
2971
  }
2972
2972
  async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties2, scopedContext, enableMiddleware) {
@@ -4512,6 +4512,9 @@ async function createRequestInit(request) {
4512
4512
 
4513
4513
  // lib/dom/ssr/single-fetch.tsx
4514
4514
  var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
4515
+ function handleMiddlewareError(error, routeId) {
4516
+ return { [routeId]: { type: "error", result: error } };
4517
+ }
4515
4518
  function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRouter) {
4516
4519
  return async (args) => {
4517
4520
  let { request, matches, fetcherKey } = args;
@@ -4520,7 +4523,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
4520
4523
  args,
4521
4524
  false,
4522
4525
  () => singleFetchActionStrategy(request, matches, basename),
4523
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
4526
+ handleMiddlewareError
4524
4527
  );
4525
4528
  }
4526
4529
  if (!ssr) {
@@ -4532,7 +4535,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
4532
4535
  args,
4533
4536
  false,
4534
4537
  () => nonSsrStrategy(manifest, request, matches, basename),
4535
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
4538
+ handleMiddlewareError
4536
4539
  );
4537
4540
  }
4538
4541
  }
@@ -4541,7 +4544,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
4541
4544
  args,
4542
4545
  false,
4543
4546
  () => singleFetchLoaderFetcherStrategy(request, matches, basename),
4544
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
4547
+ handleMiddlewareError
4545
4548
  );
4546
4549
  }
4547
4550
  return runMiddlewarePipeline(
@@ -4556,7 +4559,7 @@ function getSingleFetchDataStrategy(manifest, routeModules, ssr, basename, getRo
4556
4559
  matches,
4557
4560
  basename
4558
4561
  ),
4559
- (e) => ({ [e.routeId]: { type: "error", result: e.error } })
4562
+ handleMiddlewareError
4560
4563
  );
4561
4564
  };
4562
4565
  }
@@ -4606,9 +4609,6 @@ async function nonSsrStrategy(manifest, request, matches, basename) {
4606
4609
  );
4607
4610
  return results;
4608
4611
  }
4609
- function isOptedOut(manifestRoute, routeModule, match, router2) {
4610
- return match.route.id in router2.state.loaderData && manifestRoute && manifestRoute.hasLoader && routeModule && routeModule.shouldRevalidate;
4611
- }
4612
4612
  async function singleFetchLoaderNavigationStrategy(manifest, routeModules, ssr, router2, request, matches, basename) {
4613
4613
  let routesParams = /* @__PURE__ */ new Set();
4614
4614
  let foundOptOutRoute = false;
@@ -4627,8 +4627,10 @@ async function singleFetchLoaderNavigationStrategy(manifest, routeModules, ssr,
4627
4627
  if (!router2.state.initialized) {
4628
4628
  return;
4629
4629
  }
4630
- if (isOptedOut(manifestRoute, routeModules[m.route.id], m, router2)) {
4631
- foundOptOutRoute = true;
4630
+ if (m.route.id in router2.state.loaderData && manifestRoute && m.route.shouldRevalidate) {
4631
+ if (manifestRoute.hasLoader) {
4632
+ foundOptOutRoute = true;
4633
+ }
4632
4634
  return;
4633
4635
  }
4634
4636
  }
@@ -5770,7 +5772,13 @@ function createHydratedRouter({
5770
5772
  let hydrationData = void 0;
5771
5773
  let loaderData = ssrInfo.context.state.loaderData;
5772
5774
  if (ssrInfo.context.isSpaMode) {
5773
- hydrationData = { loaderData };
5775
+ if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && "root" in loaderData) {
5776
+ hydrationData = {
5777
+ loaderData: {
5778
+ root: loaderData.root
5779
+ }
5780
+ };
5781
+ }
5774
5782
  } else {
5775
5783
  hydrationData = {
5776
5784
  ...ssrInfo.context.state,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.3.0
2
+ * react-router v7.4.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  matchRoutes,
26
26
  shouldHydrateRouteLoader,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-K6CSEXPM.mjs";
28
+ } from "./chunk-GNGMS2XR.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -87,7 +87,13 @@ function createHydratedRouter({
87
87
  let hydrationData = void 0;
88
88
  let loaderData = ssrInfo.context.state.loaderData;
89
89
  if (ssrInfo.context.isSpaMode) {
90
- hydrationData = { loaderData };
90
+ if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && "root" in loaderData) {
91
+ hydrationData = {
92
+ loaderData: {
93
+ root: loaderData.root
94
+ }
95
+ };
96
+ }
91
97
  } else {
92
98
  hydrationData = {
93
99
  ...ssrInfo.context.state,
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-H2S3hwhf.mjs';
2
+ import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-CGHGzi13.mjs';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-H2S3hwhf.js';
2
+ import { k as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, ar as PatchRoutesOnNavigationFunction, b as Router$1, T as To, d as RelativeRoutingType, x as NonIndexRouteObject, a2 as LazyRouteFunction, s as IndexRouteObject, e as Location, f as Action, aq as Navigator, at as RouteMatch, p as StaticHandlerContext, c as RouteManifest, a as RouteModules, ap as DataRouteObject, aR as RouteModule, a1 as HTMLFormMethod, $ as FormEncType, aC as PageLinkDescriptor, aS as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, n as SerializeFrom, B as BlockerFunction } from './route-data-CGHGzi13.js';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,7 +1,7 @@
1
- import { a as RouteModules, b as Router, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, M as MetaFunction, w as LinksFunction, x as NonIndexRouteObject, E as Equal, y as RouterState } from './route-data-H2S3hwhf.mjs';
2
- export { au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunction, ax as ClientLoaderFunctionArgs, ao as DataRouteMatch, ap as DataRouteObject, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, J as Fetcher, $ as FormEncType, a0 as FormMethod, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ae as IDLE_BLOCKER, ad as IDLE_FETCHER, ac as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, aq as Navigator, aC as PageLinkDescriptor, ar as PatchRoutesOnNavigationFunction, as as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, at as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a7 as ShouldRevalidateFunction, a8 as ShouldRevalidateFunctionArgs, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, Z as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, aa as createPath, af as data, ag as generatePath, ah as isRouteErrorResponse, ai as matchPath, aj as matchRoutes, ab as parsePath, ak as redirect, al as redirectDocument, am as replace, an as resolvePath, a3 as unstable_MiddlewareFunction, a6 as unstable_RouterContext, aF as unstable_SerializesTo, a9 as unstable_createContext } from './route-data-H2S3hwhf.mjs';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-Da8gpnoZ.mjs';
4
- export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, aj as UNSAFE_FrameworkContext, am as UNSAFE_createClientRoutes, an as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ak as UNSAFE_getPatchRoutesOnNavigationFunction, ai as UNSAFE_mapRouteProperties, ao as UNSAFE_shouldHydrateRouteLoader, al as UNSAFE_useFogOFWarDiscovery, ap as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './fog-of-war-Da8gpnoZ.mjs';
1
+ import { a as RouteModules, b as Router, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, M as MetaFunction, w as LinksFunction, x as NonIndexRouteObject, E as Equal, y as RouterState } from './route-data-CGHGzi13.mjs';
2
+ export { au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunction, ax as ClientLoaderFunctionArgs, ao as DataRouteMatch, ap as DataRouteObject, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, J as Fetcher, $ as FormEncType, a0 as FormMethod, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ae as IDLE_BLOCKER, ad as IDLE_FETCHER, ac as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, aq as Navigator, aC as PageLinkDescriptor, ar as PatchRoutesOnNavigationFunction, as as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, at as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a7 as ShouldRevalidateFunction, a8 as ShouldRevalidateFunctionArgs, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, Z as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, aa as createPath, af as data, ag as generatePath, ah as isRouteErrorResponse, ai as matchPath, aj as matchRoutes, ab as parsePath, ak as redirect, al as redirectDocument, am as replace, an as resolvePath, a3 as unstable_MiddlewareFunction, a6 as unstable_RouterContext, aF as unstable_SerializesTo, a9 as unstable_createContext } from './route-data-CGHGzi13.mjs';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-BQyvjjKg.mjs';
4
+ export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, aj as UNSAFE_FrameworkContext, am as UNSAFE_createClientRoutes, an as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ak as UNSAFE_getPatchRoutesOnNavigationFunction, ai as UNSAFE_mapRouteProperties, ao as UNSAFE_shouldHydrateRouteLoader, al as UNSAFE_useFogOFWarDiscovery, ap as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './fog-of-war-BQyvjjKg.mjs';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -46,7 +46,7 @@ interface ServerBuild {
46
46
  assetsBuildDirectory: string;
47
47
  future: FutureConfig;
48
48
  ssr: boolean;
49
- getCriticalCss?: (args: {
49
+ unstable_getCriticalCss?: (args: {
50
50
  pathname: string;
51
51
  }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
52
52
  /**
@@ -603,7 +603,7 @@ type IsCookieFunction = (object: any) => object is Cookie;
603
603
  */
604
604
  declare const isCookie: IsCookieFunction;
605
605
 
606
- type RequestHandler = (request: Request, loadContext?: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext) => Promise<Response>;
606
+ type RequestHandler = (request: Request, loadContext?: MiddlewareEnabled extends true ? unstable_InitialContext : AppLoadContext) => Promise<Response>;
607
607
  type CreateRequestHandlerFunction = (build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>), mode?: string) => RequestHandler;
608
608
  declare const createRequestHandler: CreateRequestHandlerFunction;
609
609
 
@@ -1,7 +1,7 @@
1
- import { a as RouteModules, b as Router, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, M as MetaFunction, w as LinksFunction, x as NonIndexRouteObject, E as Equal, y as RouterState } from './route-data-H2S3hwhf.js';
2
- export { au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunction, ax as ClientLoaderFunctionArgs, ao as DataRouteMatch, ap as DataRouteObject, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, J as Fetcher, $ as FormEncType, a0 as FormMethod, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ae as IDLE_BLOCKER, ad as IDLE_FETCHER, ac as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, aq as Navigator, aC as PageLinkDescriptor, ar as PatchRoutesOnNavigationFunction, as as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, at as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a7 as ShouldRevalidateFunction, a8 as ShouldRevalidateFunctionArgs, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, Z as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, aa as createPath, af as data, ag as generatePath, ah as isRouteErrorResponse, ai as matchPath, aj as matchRoutes, ab as parsePath, ak as redirect, al as redirectDocument, am as replace, an as resolvePath, a3 as unstable_MiddlewareFunction, a6 as unstable_RouterContext, aF as unstable_SerializesTo, a9 as unstable_createContext } from './route-data-H2S3hwhf.js';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-CvttGpNz.js';
4
- export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, aj as UNSAFE_FrameworkContext, am as UNSAFE_createClientRoutes, an as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ak as UNSAFE_getPatchRoutesOnNavigationFunction, ai as UNSAFE_mapRouteProperties, ao as UNSAFE_shouldHydrateRouteLoader, al as UNSAFE_useFogOFWarDiscovery, ap as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './fog-of-war-CvttGpNz.js';
1
+ import { a as RouteModules, b as Router, D as DataStrategyFunction, c as RouteManifest, S as ServerRouteModule, u as unstable_RouterContextProvider, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, d as RelativeRoutingType, e as Location, f as Action, P as ParamParseKey, g as Path, h as PathPattern, i as PathMatch, N as NavigateOptions, j as Params$1, k as RouteObject, l as Navigation, m as RevalidationState, U as UIMatch, n as SerializeFrom, B as BlockerFunction, o as Blocker, p as StaticHandlerContext, q as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, r as unstable_InitialContext, s as IndexRouteObject, t as LoaderFunction, v as ActionFunction, M as MetaFunction, w as LinksFunction, x as NonIndexRouteObject, E as Equal, y as RouterState } from './route-data-CGHGzi13.js';
2
+ export { au as ClientActionFunction, av as ClientActionFunctionArgs, aw as ClientLoaderFunction, ax as ClientLoaderFunctionArgs, ao as DataRouteMatch, ap as DataRouteObject, W as DataStrategyFunctionArgs, X as DataStrategyMatch, Y as DataStrategyResult, _ as ErrorResponse, J as Fetcher, $ as FormEncType, a0 as FormMethod, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a1 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ae as IDLE_BLOCKER, ad as IDLE_FETCHER, ac as IDLE_NAVIGATION, a2 as LazyRouteFunction, aE as LinkDescriptor, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, aq as Navigator, aC as PageLinkDescriptor, ar as PatchRoutesOnNavigationFunction, as as PatchRoutesOnNavigationFunctionArgs, a4 as PathParam, a5 as RedirectFunction, at as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a7 as ShouldRevalidateFunction, a8 as ShouldRevalidateFunctionArgs, aK as UNSAFE_DataRouterContext, aL as UNSAFE_DataRouterStateContext, Z as UNSAFE_DataWithResponseInit, aJ as UNSAFE_ErrorResponseImpl, aM as UNSAFE_FetchersContext, aN as UNSAFE_LocationContext, aO as UNSAFE_NavigationContext, aP as UNSAFE_RouteContext, aQ as UNSAFE_ViewTransitionContext, aG as UNSAFE_createBrowserHistory, aI as UNSAFE_createRouter, aH as UNSAFE_invariant, aa as createPath, af as data, ag as generatePath, ah as isRouteErrorResponse, ai as matchPath, aj as matchRoutes, ab as parsePath, ak as redirect, al as redirectDocument, am as replace, an as resolvePath, a3 as unstable_MiddlewareFunction, a6 as unstable_RouterContext, aF as unstable_SerializesTo, a9 as unstable_createContext } from './route-data-CGHGzi13.js';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext, C as CriticalCss } from './fog-of-war-CGNKxM4z.js';
4
+ export { g as Await, b as AwaitProps, T as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, w as FetcherFormProps, G as FetcherSubmitFunction, a7 as FetcherSubmitOptions, J as FetcherWithComponents, Y as Form, x as FormProps, U as HashRouter, H as HashRouterProps, s as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, V as Link, t as LinkProps, ae as Links, h as MemoryRouter, M as MemoryRouterOpts, c as MemoryRouterProps, ad as Meta, X as NavLink, u as NavLinkProps, v as NavLinkRenderProps, i as Navigate, N as NavigateProps, j as Outlet, O as OutletProps, a8 as ParamKeyValuePair, P as PathRouteProps, ag as PrefetchPageLinks, k as Route, d as RouteProps, l as Router, e as RouterProps, m as RouterProvider, R as RouterProviderProps, n as Routes, f as RoutesProps, af as Scripts, ah as ScriptsProps, Z as ScrollRestoration, S as ScrollRestorationProps, y as SetURLSearchParams, z as SubmitFunction, a9 as SubmitOptions, ab as SubmitTarget, aj as UNSAFE_FrameworkContext, am as UNSAFE_createClientRoutes, an as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ak as UNSAFE_getPatchRoutesOnNavigationFunction, ai as UNSAFE_mapRouteProperties, ao as UNSAFE_shouldHydrateRouteLoader, al as UNSAFE_useFogOFWarDiscovery, ap as UNSAFE_useScrollRestoration, aa as URLSearchParamsInit, K as createBrowserRouter, Q as createHashRouter, o as createMemoryRouter, p as createRoutesFromChildren, q as createRoutesFromElements, ac as createSearchParams, r as renderMatches, W as unstable_HistoryRouter, a5 as unstable_usePrompt, a4 as useBeforeUnload, a2 as useFetcher, a3 as useFetchers, a1 as useFormAction, _ as useLinkClickHandler, $ as useSearchParams, a0 as useSubmit, a6 as useViewTransitionState } from './fog-of-war-CGNKxM4z.js';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -46,7 +46,7 @@ interface ServerBuild {
46
46
  assetsBuildDirectory: string;
47
47
  future: FutureConfig;
48
48
  ssr: boolean;
49
- getCriticalCss?: (args: {
49
+ unstable_getCriticalCss?: (args: {
50
50
  pathname: string;
51
51
  }) => OptionalCriticalCss | Promise<OptionalCriticalCss>;
52
52
  /**
@@ -603,7 +603,7 @@ type IsCookieFunction = (object: any) => object is Cookie;
603
603
  */
604
604
  declare const isCookie: IsCookieFunction;
605
605
 
606
- type RequestHandler = (request: Request, loadContext?: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext) => Promise<Response>;
606
+ type RequestHandler = (request: Request, loadContext?: MiddlewareEnabled extends true ? unstable_InitialContext : AppLoadContext) => Promise<Response>;
607
607
  type CreateRequestHandlerFunction = (build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>), mode?: string) => RequestHandler;
608
608
  declare const createRequestHandler: CreateRequestHandlerFunction;
609
609