react-router 0.0.0-experimental-a2c4d7fad → 0.0.0-experimental-902325fda

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 (43) hide show
  1. package/dist/development/{chunk-O7PZGOV2.mjs → chunk-XX7SEIOE.mjs} +70 -23
  2. package/dist/development/dom-export.d.mts +2 -2
  3. package/dist/development/dom-export.d.ts +2 -2
  4. package/dist/development/dom-export.js +51 -21
  5. package/dist/development/dom-export.mjs +12 -5
  6. package/dist/{production/fog-of-war-DhdpvlSf.d.mts → development/fog-of-war-Ax4Jg2xL.d.ts} +3 -3
  7. package/dist/development/{fog-of-war-DstSnxnE.d.ts → fog-of-war-Cyo_TZuh.d.mts} +3 -3
  8. package/dist/development/index.d.mts +9 -5
  9. package/dist/development/index.d.ts +9 -5
  10. package/dist/development/index.js +70 -23
  11. package/dist/development/index.mjs +2 -2
  12. package/dist/development/lib/types/route-module.d.mts +5 -1
  13. package/dist/development/lib/types/route-module.d.ts +5 -1
  14. package/dist/development/lib/types/route-module.js +1 -1
  15. package/dist/development/lib/types/route-module.mjs +1 -1
  16. package/dist/development/{route-data-Cceggzl6.d.mts → route-data-DQbTMaUY.d.mts} +1 -1
  17. package/dist/{production/route-data-Cceggzl6.d.mts → development/route-data-DQbTMaUY.d.ts} +1 -1
  18. package/dist/production/{chunk-EAHMQJZV.mjs → chunk-IS6LEE6H.mjs} +70 -23
  19. package/dist/production/dom-export.d.mts +2 -2
  20. package/dist/production/dom-export.d.ts +2 -2
  21. package/dist/production/dom-export.js +51 -21
  22. package/dist/production/dom-export.mjs +12 -5
  23. package/dist/{development/fog-of-war-DhdpvlSf.d.mts → production/fog-of-war-Ax4Jg2xL.d.ts} +3 -3
  24. package/dist/production/{fog-of-war-DstSnxnE.d.ts → fog-of-war-Cyo_TZuh.d.mts} +3 -3
  25. package/dist/production/index.d.mts +9 -5
  26. package/dist/production/index.d.ts +9 -5
  27. package/dist/production/index.js +70 -23
  28. package/dist/production/index.mjs +2 -2
  29. package/dist/production/lib/types/route-module.d.mts +5 -1
  30. package/dist/production/lib/types/route-module.d.ts +5 -1
  31. package/dist/production/lib/types/route-module.js +1 -1
  32. package/dist/production/lib/types/route-module.mjs +1 -1
  33. package/dist/production/{route-data-Cceggzl6.d.ts → route-data-DQbTMaUY.d.mts} +1 -1
  34. package/dist/{development/route-data-Cceggzl6.d.ts → production/route-data-DQbTMaUY.d.ts} +1 -1
  35. package/package.json +1 -9
  36. package/dist/development/lib/types/index.d.mts +0 -73
  37. package/dist/development/lib/types/index.d.ts +0 -73
  38. package/dist/development/lib/types/index.js +0 -28
  39. package/dist/development/lib/types/index.mjs +0 -10
  40. package/dist/production/lib/types/index.d.mts +0 -73
  41. package/dist/production/lib/types/index.d.ts +0 -73
  42. package/dist/production/lib/types/index.js +0 -28
  43. package/dist/production/lib/types/index.mjs +0 -10
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-a2c4d7fad
2
+ * react-router v0.0.0-experimental-902325fda
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -5664,11 +5664,24 @@ function StreamTransfer({
5664
5664
  )));
5665
5665
  }
5666
5666
  }
5667
- function getSingleFetchDataStrategy(manifest, routeModules, getRouter) {
5667
+ function getSingleFetchDataStrategy(manifest, routeModules, ssr, getRouter) {
5668
5668
  return async ({ request, matches, fetcherKey }) => {
5669
5669
  if (request.method !== "GET") {
5670
5670
  return singleFetchActionStrategy(request, matches);
5671
5671
  }
5672
+ if (!ssr) {
5673
+ let foundLoaderBelowRoot = matches.some(
5674
+ (m) => m.route.id !== "root" && manifest.routes[m.route.id]?.hasLoader
5675
+ );
5676
+ if (!foundLoaderBelowRoot) {
5677
+ let matchesToLoad = matches.filter((m) => m.shouldLoad);
5678
+ let results = await Promise.all(matchesToLoad.map((m) => m.resolve()));
5679
+ return results.reduce(
5680
+ (acc, result, i) => Object.assign(acc, { [matchesToLoad[i].route.id]: result }),
5681
+ {}
5682
+ );
5683
+ }
5684
+ }
5672
5685
  if (fetcherKey) {
5673
5686
  return singleFetchLoaderFetcherStrategy(request, matches);
5674
5687
  }
@@ -6142,11 +6155,12 @@ function createServerRoutes(manifest, routeModules, future, isSpaMode, parentId
6142
6155
  return dataRoute;
6143
6156
  });
6144
6157
  }
6145
- function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, initialState, future, isSpaMode) {
6158
+ function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, initialState, ssr, isSpaMode) {
6146
6159
  return createClientRoutes(
6147
6160
  manifest,
6148
6161
  routeModulesCache,
6149
6162
  initialState,
6163
+ ssr,
6150
6164
  isSpaMode,
6151
6165
  "",
6152
6166
  groupRoutesByParentId(manifest),
@@ -6155,14 +6169,14 @@ function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest
6155
6169
  }
6156
6170
  function preventInvalidServerHandlerCall(type, route, isSpaMode) {
6157
6171
  if (isSpaMode) {
6158
- let fn2 = type === "action" ? "serverAction()" : "serverLoader()";
6159
- let msg2 = `You cannot call ${fn2} in SPA Mode (routeId: "${route.id}")`;
6160
- console.error(msg2);
6161
- throw new ErrorResponseImpl(400, "Bad Request", new Error(msg2), true);
6172
+ let fn = type === "action" ? "serverAction()" : "serverLoader()";
6173
+ let msg = `You cannot call ${fn} in SPA Mode (routeId: "${route.id}")`;
6174
+ console.error(msg);
6175
+ throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
6162
6176
  }
6163
- let fn = type === "action" ? "serverAction()" : "serverLoader()";
6164
- let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${route.id}")`;
6165
6177
  if (type === "loader" && !route.hasLoader || type === "action" && !route.hasAction) {
6178
+ let fn = type === "action" ? "serverAction()" : "serverLoader()";
6179
+ let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${route.id}")`;
6166
6180
  console.error(msg);
6167
6181
  throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
6168
6182
  }
@@ -6173,7 +6187,7 @@ function noActionDefinedError(type, routeId) {
6173
6187
  console.error(msg);
6174
6188
  throw new ErrorResponseImpl(405, "Method Not Allowed", new Error(msg), true);
6175
6189
  }
6176
- function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
6190
+ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
6177
6191
  return (routesByParentId[parentId] || []).map((route) => {
6178
6192
  let routeModule = routeModulesCache[route.id];
6179
6193
  function fetchServerHandler(singleFetch) {
@@ -6227,10 +6241,18 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
6227
6241
  ...dataRoute,
6228
6242
  ...getRouteComponents(route, routeModule, isSpaMode),
6229
6243
  handle: routeModule.handle,
6230
- shouldRevalidate: getShouldRevalidateFunction(
6231
- routeModule,
6232
- route.id,
6233
- needsRevalidation
6244
+ shouldRevalidate: (
6245
+ // When ssr is false and the root route has a `loader` without a
6246
+ // `clientLoader`, the `loader` data is static because it was rendered
6247
+ // at build time so we can just turn off revalidations. That way when
6248
+ // submitting to a clientAction on a non-prerendered path, we don't
6249
+ // try to reach out for a non-existent `.data` file which would have
6250
+ // the "revalidated" root data
6251
+ !ssr && route.id === "root" && route.hasLoader && !route.hasClientLoader ? () => false : getShouldRevalidateFunction(
6252
+ routeModule,
6253
+ route.id,
6254
+ needsRevalidation
6255
+ )
6234
6256
  )
6235
6257
  });
6236
6258
  let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
@@ -6246,7 +6268,6 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
6246
6268
  "No `routeModule` available for critical-route loader"
6247
6269
  );
6248
6270
  if (!routeModule.clientLoader) {
6249
- if (isSpaMode) return null;
6250
6271
  return fetchServerLoader(singleFetch);
6251
6272
  }
6252
6273
  return routeModule.clientLoader({
@@ -6301,7 +6322,6 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
6301
6322
  } else {
6302
6323
  if (!route.hasClientLoader) {
6303
6324
  dataRoute.loader = ({ request }, singleFetch) => prefetchStylesAndCallHandler(() => {
6304
- if (isSpaMode) return Promise.resolve(null);
6305
6325
  return fetchServerLoader(singleFetch);
6306
6326
  });
6307
6327
  } else if (route.clientLoaderModule) {
@@ -6398,6 +6418,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
6398
6418
  manifest,
6399
6419
  routeModulesCache,
6400
6420
  initialState,
6421
+ ssr,
6401
6422
  isSpaMode,
6402
6423
  route.id,
6403
6424
  routesByParentId,
@@ -6505,6 +6526,7 @@ function getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, isSpaMo
6505
6526
  [path],
6506
6527
  manifest,
6507
6528
  routeModules,
6529
+ ssr,
6508
6530
  isSpaMode,
6509
6531
  basename,
6510
6532
  patch,
@@ -6544,6 +6566,7 @@ function useFogOFWarDiscovery(router, manifest, routeModules, ssr, isSpaMode) {
6544
6566
  lazyPaths,
6545
6567
  manifest,
6546
6568
  routeModules,
6569
+ ssr,
6547
6570
  isSpaMode,
6548
6571
  router.basename,
6549
6572
  router.patchRoutes
@@ -6564,7 +6587,7 @@ function useFogOFWarDiscovery(router, manifest, routeModules, ssr, isSpaMode) {
6564
6587
  return () => observer.disconnect();
6565
6588
  }, [ssr, isSpaMode, manifest, routeModules, router]);
6566
6589
  }
6567
- async function fetchAndApplyManifestPatches(paths, manifest, routeModules, isSpaMode, basename, patchRoutes, signal) {
6590
+ async function fetchAndApplyManifestPatches(paths, manifest, routeModules, ssr, isSpaMode, basename, patchRoutes, signal) {
6568
6591
  let manifestPath = `${basename != null ? basename : "/"}/__manifest`.replace(
6569
6592
  /\/+/g,
6570
6593
  "/"
@@ -6607,7 +6630,7 @@ async function fetchAndApplyManifestPatches(paths, manifest, routeModules, isSpa
6607
6630
  parentIds.forEach(
6608
6631
  (parentId) => patchRoutes(
6609
6632
  parentId || null,
6610
- createClientRoutes(patches, routeModules, null, isSpaMode, parentId)
6633
+ createClientRoutes(patches, routeModules, null, ssr, isSpaMode, parentId)
6611
6634
  )
6612
6635
  );
6613
6636
  }
@@ -7087,7 +7110,7 @@ function mergeRefs(...refs) {
7087
7110
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7088
7111
  try {
7089
7112
  if (isBrowser) {
7090
- window.__reactRouterVersion = "0.0.0-experimental-a2c4d7fad";
7113
+ window.__reactRouterVersion = "0.0.0-experimental-902325fda";
7091
7114
  }
7092
7115
  } catch (e) {
7093
7116
  }
@@ -9092,6 +9115,10 @@ var createRequestHandler = (build, mode) => {
9092
9115
  errorHandler = derived.errorHandler;
9093
9116
  }
9094
9117
  let url = new URL(request.url);
9118
+ let normalizedPath = url.pathname.replace(/\.data$/, "").replace(/^\/_root$/, "/");
9119
+ if (normalizedPath !== "/" && normalizedPath.endsWith("/")) {
9120
+ normalizedPath = normalizedPath.slice(0, -1);
9121
+ }
9095
9122
  let params = {};
9096
9123
  let handleError = (error) => {
9097
9124
  if (mode === "development" /* Development */) {
@@ -9103,6 +9130,25 @@ var createRequestHandler = (build, mode) => {
9103
9130
  request
9104
9131
  });
9105
9132
  };
9133
+ if (!_build.ssr && _build.prerender.length > 0 && normalizedPath !== "/" && // Look with/without the trailing slash to be sure
9134
+ !_build.prerender.includes(normalizedPath) && !_build.prerender.includes(normalizedPath + "/")) {
9135
+ errorHandler(
9136
+ new ErrorResponseImpl(
9137
+ 404,
9138
+ "Not Found",
9139
+ `Refusing to SSR the path \`${normalizedPath}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
9140
+ ),
9141
+ {
9142
+ context: loadContext,
9143
+ params,
9144
+ request
9145
+ }
9146
+ );
9147
+ return new Response("Not Found", {
9148
+ status: 404,
9149
+ statusText: "Not Found"
9150
+ });
9151
+ }
9106
9152
  let manifestUrl = `${_build.basename ?? "/"}/__manifest`.replace(
9107
9153
  /\/+/g,
9108
9154
  "/"
@@ -9123,7 +9169,7 @@ var createRequestHandler = (build, mode) => {
9123
9169
  let response;
9124
9170
  if (url.pathname.endsWith(".data")) {
9125
9171
  let handlerUrl = new URL(request.url);
9126
- handlerUrl.pathname = handlerUrl.pathname.replace(/\.data$/, "").replace(/^\/_root$/, "/");
9172
+ handlerUrl.pathname = normalizedPath;
9127
9173
  let singleFetchMatches = matchServerRoutes(
9128
9174
  routes,
9129
9175
  handlerUrl.pathname,
@@ -9263,6 +9309,7 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
9263
9309
  );
9264
9310
  }
9265
9311
  async function handleDocumentRequest(serverMode, build, staticHandler, request, loadContext, handleError, criticalCss) {
9312
+ let isSpaMode = request.headers.has("X-React-Router-SPA-Mode");
9266
9313
  let context;
9267
9314
  try {
9268
9315
  context = await staticHandler.query(request, {
@@ -9302,7 +9349,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
9302
9349
  criticalCss,
9303
9350
  future: build.future,
9304
9351
  ssr: build.ssr,
9305
- isSpaMode: build.isSpaMode
9352
+ isSpaMode
9306
9353
  }),
9307
9354
  serverHandoffStream: encodeViaTurboStream(
9308
9355
  state,
@@ -9313,7 +9360,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
9313
9360
  renderMeta: {},
9314
9361
  future: build.future,
9315
9362
  ssr: build.ssr,
9316
- isSpaMode: build.isSpaMode,
9363
+ isSpaMode,
9317
9364
  serializeError: (err) => serializeError(err, serverMode)
9318
9365
  };
9319
9366
  let handleDocumentRequestFunction = build.entry.module.default;
@@ -9359,7 +9406,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
9359
9406
  basename: build.basename,
9360
9407
  future: build.future,
9361
9408
  ssr: build.ssr,
9362
- isSpaMode: build.isSpaMode
9409
+ isSpaMode
9363
9410
  }),
9364
9411
  serverHandoffStream: encodeViaTurboStream(
9365
9412
  state2,
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-DhdpvlSf.mjs';
3
- import './route-data-Cceggzl6.mjs';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-Cyo_TZuh.mjs';
3
+ import './route-data-DQbTMaUY.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-DstSnxnE.js';
3
- import './route-data-Cceggzl6.js';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-Ax4Jg2xL.js';
3
+ import './route-data-DQbTMaUY.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 v0.0.0-experimental-a2c4d7fad
2
+ * react-router v0.0.0-experimental-902325fda
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -4353,11 +4353,24 @@ async function createRequestInit(request) {
4353
4353
 
4354
4354
  // lib/dom/ssr/single-fetch.tsx
4355
4355
  var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
4356
- function getSingleFetchDataStrategy(manifest, routeModules, getRouter) {
4356
+ function getSingleFetchDataStrategy(manifest, routeModules, ssr, getRouter) {
4357
4357
  return async ({ request, matches, fetcherKey }) => {
4358
4358
  if (request.method !== "GET") {
4359
4359
  return singleFetchActionStrategy(request, matches);
4360
4360
  }
4361
+ if (!ssr) {
4362
+ let foundLoaderBelowRoot = matches.some(
4363
+ (m) => m.route.id !== "root" && manifest.routes[m.route.id]?.hasLoader
4364
+ );
4365
+ if (!foundLoaderBelowRoot) {
4366
+ let matchesToLoad = matches.filter((m) => m.shouldLoad);
4367
+ let results = await Promise.all(matchesToLoad.map((m) => m.resolve()));
4368
+ return results.reduce(
4369
+ (acc, result, i) => Object.assign(acc, { [matchesToLoad[i].route.id]: result }),
4370
+ {}
4371
+ );
4372
+ }
4373
+ }
4361
4374
  if (fetcherKey) {
4362
4375
  return singleFetchLoaderFetcherStrategy(request, matches);
4363
4376
  }
@@ -4791,11 +4804,12 @@ function getRouteComponents(route, routeModule, isSpaMode) {
4791
4804
  }
4792
4805
  return { Component: Component4, ErrorBoundary, HydrateFallback };
4793
4806
  }
4794
- function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, initialState, future, isSpaMode) {
4807
+ function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, initialState, ssr, isSpaMode) {
4795
4808
  return createClientRoutes(
4796
4809
  manifest,
4797
4810
  routeModulesCache,
4798
4811
  initialState,
4812
+ ssr,
4799
4813
  isSpaMode,
4800
4814
  "",
4801
4815
  groupRoutesByParentId(manifest),
@@ -4804,14 +4818,14 @@ function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest
4804
4818
  }
4805
4819
  function preventInvalidServerHandlerCall(type, route, isSpaMode) {
4806
4820
  if (isSpaMode) {
4807
- let fn2 = type === "action" ? "serverAction()" : "serverLoader()";
4808
- let msg2 = `You cannot call ${fn2} in SPA Mode (routeId: "${route.id}")`;
4809
- console.error(msg2);
4810
- throw new ErrorResponseImpl(400, "Bad Request", new Error(msg2), true);
4821
+ let fn = type === "action" ? "serverAction()" : "serverLoader()";
4822
+ let msg = `You cannot call ${fn} in SPA Mode (routeId: "${route.id}")`;
4823
+ console.error(msg);
4824
+ throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
4811
4825
  }
4812
- let fn = type === "action" ? "serverAction()" : "serverLoader()";
4813
- let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${route.id}")`;
4814
4826
  if (type === "loader" && !route.hasLoader || type === "action" && !route.hasAction) {
4827
+ let fn = type === "action" ? "serverAction()" : "serverLoader()";
4828
+ let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${route.id}")`;
4815
4829
  console.error(msg);
4816
4830
  throw new ErrorResponseImpl(400, "Bad Request", new Error(msg), true);
4817
4831
  }
@@ -4822,7 +4836,7 @@ function noActionDefinedError(type, routeId) {
4822
4836
  console.error(msg);
4823
4837
  throw new ErrorResponseImpl(405, "Method Not Allowed", new Error(msg), true);
4824
4838
  }
4825
- function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
4839
+ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
4826
4840
  return (routesByParentId[parentId] || []).map((route) => {
4827
4841
  let routeModule = routeModulesCache[route.id];
4828
4842
  function fetchServerHandler(singleFetch) {
@@ -4876,10 +4890,18 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
4876
4890
  ...dataRoute,
4877
4891
  ...getRouteComponents(route, routeModule, isSpaMode),
4878
4892
  handle: routeModule.handle,
4879
- shouldRevalidate: getShouldRevalidateFunction(
4880
- routeModule,
4881
- route.id,
4882
- needsRevalidation
4893
+ shouldRevalidate: (
4894
+ // When ssr is false and the root route has a `loader` without a
4895
+ // `clientLoader`, the `loader` data is static because it was rendered
4896
+ // at build time so we can just turn off revalidations. That way when
4897
+ // submitting to a clientAction on a non-prerendered path, we don't
4898
+ // try to reach out for a non-existent `.data` file which would have
4899
+ // the "revalidated" root data
4900
+ !ssr && route.id === "root" && route.hasLoader && !route.hasClientLoader ? () => false : getShouldRevalidateFunction(
4901
+ routeModule,
4902
+ route.id,
4903
+ needsRevalidation
4904
+ )
4883
4905
  )
4884
4906
  });
4885
4907
  let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
@@ -4895,7 +4917,6 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
4895
4917
  "No `routeModule` available for critical-route loader"
4896
4918
  );
4897
4919
  if (!routeModule.clientLoader) {
4898
- if (isSpaMode) return null;
4899
4920
  return fetchServerLoader(singleFetch);
4900
4921
  }
4901
4922
  return routeModule.clientLoader({
@@ -4950,7 +4971,6 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
4950
4971
  } else {
4951
4972
  if (!route.hasClientLoader) {
4952
4973
  dataRoute.loader = ({ request }, singleFetch) => prefetchStylesAndCallHandler(() => {
4953
- if (isSpaMode) return Promise.resolve(null);
4954
4974
  return fetchServerLoader(singleFetch);
4955
4975
  });
4956
4976
  } else if (route.clientLoaderModule) {
@@ -5047,6 +5067,7 @@ function createClientRoutes(manifest, routeModulesCache, initialState, isSpaMode
5047
5067
  manifest,
5048
5068
  routeModulesCache,
5049
5069
  initialState,
5070
+ ssr,
5050
5071
  isSpaMode,
5051
5072
  route.id,
5052
5073
  routesByParentId,
@@ -5154,6 +5175,7 @@ function getPatchRoutesOnNavigationFunction(manifest, routeModules, ssr, isSpaMo
5154
5175
  [path],
5155
5176
  manifest,
5156
5177
  routeModules,
5178
+ ssr,
5157
5179
  isSpaMode,
5158
5180
  basename,
5159
5181
  patch,
@@ -5193,6 +5215,7 @@ function useFogOFWarDiscovery(router2, manifest, routeModules, ssr, isSpaMode) {
5193
5215
  lazyPaths,
5194
5216
  manifest,
5195
5217
  routeModules,
5218
+ ssr,
5196
5219
  isSpaMode,
5197
5220
  router2.basename,
5198
5221
  router2.patchRoutes
@@ -5213,7 +5236,7 @@ function useFogOFWarDiscovery(router2, manifest, routeModules, ssr, isSpaMode) {
5213
5236
  return () => observer.disconnect();
5214
5237
  }, [ssr, isSpaMode, manifest, routeModules, router2]);
5215
5238
  }
5216
- async function fetchAndApplyManifestPatches(paths, manifest, routeModules, isSpaMode, basename, patchRoutes, signal) {
5239
+ async function fetchAndApplyManifestPatches(paths, manifest, routeModules, ssr, isSpaMode, basename, patchRoutes, signal) {
5217
5240
  let manifestPath = `${basename != null ? basename : "/"}/__manifest`.replace(
5218
5241
  /\/+/g,
5219
5242
  "/"
@@ -5256,7 +5279,7 @@ async function fetchAndApplyManifestPatches(paths, manifest, routeModules, isSpa
5256
5279
  parentIds.forEach(
5257
5280
  (parentId) => patchRoutes(
5258
5281
  parentId || null,
5259
- createClientRoutes(patches, routeModules, null, isSpaMode, parentId)
5282
+ createClientRoutes(patches, routeModules, null, ssr, isSpaMode, parentId)
5260
5283
  )
5261
5284
  );
5262
5285
  }
@@ -5517,13 +5540,17 @@ function createHydratedRouter() {
5517
5540
  ssrInfo.manifest.routes,
5518
5541
  ssrInfo.routeModules,
5519
5542
  ssrInfo.context.state,
5543
+ ssrInfo.context.ssr,
5520
5544
  ssrInfo.context.isSpaMode
5521
5545
  );
5522
5546
  let hydrationData = void 0;
5523
- if (!ssrInfo.context.isSpaMode) {
5547
+ let loaderData = ssrInfo.context.state.loaderData;
5548
+ if (ssrInfo.context.isSpaMode) {
5549
+ hydrationData = { loaderData };
5550
+ } else {
5524
5551
  hydrationData = {
5525
5552
  ...ssrInfo.context.state,
5526
- loaderData: { ...ssrInfo.context.state.loaderData }
5553
+ loaderData: { ...loaderData }
5527
5554
  };
5528
5555
  let initialMatches = matchRoutes(
5529
5556
  routes,
@@ -5556,9 +5583,12 @@ function createHydratedRouter() {
5556
5583
  basename: ssrInfo.context.basename,
5557
5584
  hydrationData,
5558
5585
  mapRouteProperties,
5559
- dataStrategy: getSingleFetchDataStrategy(
5586
+ // Single fetch doesn't apply in SPA mode because there's no running server
5587
+ // to fetch `.data` requests from and no prerendered `.data` files to serve
5588
+ dataStrategy: ssrInfo.context.isSpaMode ? void 0 : getSingleFetchDataStrategy(
5560
5589
  ssrInfo.manifest,
5561
5590
  ssrInfo.routeModules,
5591
+ ssrInfo.context.ssr,
5562
5592
  () => router2
5563
5593
  ),
5564
5594
  patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-a2c4d7fad
2
+ * react-router v0.0.0-experimental-902325fda
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-O7PZGOV2.mjs";
28
+ } from "./chunk-XX7SEIOE.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -79,13 +79,17 @@ function createHydratedRouter() {
79
79
  ssrInfo.manifest.routes,
80
80
  ssrInfo.routeModules,
81
81
  ssrInfo.context.state,
82
+ ssrInfo.context.ssr,
82
83
  ssrInfo.context.isSpaMode
83
84
  );
84
85
  let hydrationData = void 0;
85
- if (!ssrInfo.context.isSpaMode) {
86
+ let loaderData = ssrInfo.context.state.loaderData;
87
+ if (ssrInfo.context.isSpaMode) {
88
+ hydrationData = { loaderData };
89
+ } else {
86
90
  hydrationData = {
87
91
  ...ssrInfo.context.state,
88
- loaderData: { ...ssrInfo.context.state.loaderData }
92
+ loaderData: { ...loaderData }
89
93
  };
90
94
  let initialMatches = matchRoutes(
91
95
  routes,
@@ -118,9 +122,12 @@ function createHydratedRouter() {
118
122
  basename: ssrInfo.context.basename,
119
123
  hydrationData,
120
124
  mapRouteProperties,
121
- dataStrategy: getSingleFetchDataStrategy(
125
+ // Single fetch doesn't apply in SPA mode because there's no running server
126
+ // to fetch `.data` requests from and no prerendered `.data` files to serve
127
+ dataStrategy: ssrInfo.context.isSpaMode ? void 0 : getSingleFetchDataStrategy(
122
128
  ssrInfo.manifest,
123
129
  ssrInfo.routeModules,
130
+ ssrInfo.context.ssr,
124
131
  () => router2
125
132
  ),
126
133
  patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, al as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, ak as Navigator, an as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, aj as DataRouteObject, aK as RouteModule, _ as HTMLFormMethod, Y as FormEncType, aw as PageLinkDescriptor, aL as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-Cceggzl6.mjs';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, al as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, ak as Navigator, an as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, aj as DataRouteObject, aK as RouteModule, _ as HTMLFormMethod, Y as FormEncType, aw as PageLinkDescriptor, aL as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-DQbTMaUY.js';
3
3
 
4
4
  /**
5
5
  * @private
@@ -437,8 +437,8 @@ interface EntryRoute extends Route {
437
437
  hydrateFallbackModule: string | undefined;
438
438
  parentId?: string;
439
439
  }
440
- declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, future: FutureConfig, isSpaMode: boolean): DataRouteObject[];
441
- declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
440
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
441
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
442
442
  declare function shouldHydrateRouteLoader(route: EntryRoute, routeModule: RouteModule, isSpaMode: boolean): boolean;
443
443
 
444
444
  type ParamKeyValuePair = [string, string];
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, al as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, ak as Navigator, an as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, aj as DataRouteObject, aK as RouteModule, _ as HTMLFormMethod, Y as FormEncType, aw as PageLinkDescriptor, aL as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-Cceggzl6.js';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, al as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, ak as Navigator, an as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, aj as DataRouteObject, aK as RouteModule, _ as HTMLFormMethod, Y as FormEncType, aw as PageLinkDescriptor, aL as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-DQbTMaUY.mjs';
3
3
 
4
4
  /**
5
5
  * @private
@@ -437,8 +437,8 @@ interface EntryRoute extends Route {
437
437
  hydrateFallbackModule: string | undefined;
438
438
  parentId?: string;
439
439
  }
440
- declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, future: FutureConfig, isSpaMode: boolean): DataRouteObject[];
441
- declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
440
+ declare function createClientRoutesWithHMRRevalidationOptOut(needsRevalidation: Set<string>, manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState, ssr: boolean, isSpaMode: boolean): DataRouteObject[];
441
+ declare function createClientRoutes(manifest: RouteManifest<EntryRoute>, routeModulesCache: RouteModules, initialState: HydrationState | null, ssr: boolean, isSpaMode: boolean, parentId?: string, routesByParentId?: Record<string, Omit<EntryRoute, "children">[]>, needsRevalidation?: Set<string>): DataRouteObject[];
442
442
  declare function shouldHydrateRouteLoader(route: EntryRoute, routeModule: RouteModule, isSpaMode: boolean): boolean;
443
443
 
444
444
  type ParamKeyValuePair = [string, string];
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-Cceggzl6.mjs';
2
- export { ao as ClientActionFunction, ap as ClientActionFunctionArgs, aq as ClientLoaderFunction, ar as ClientLoaderFunctionArgs, ai as DataRouteMatch, aj as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, as as HeadersArgs, at as HeadersFunction, ax as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, y as NavigationStates, ak as Navigator, aw as PageLinkDescriptor, al as PatchRoutesOnNavigationFunction, am as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, an as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as isRouteErrorResponse, ac as matchPath, ad as matchRoutes, a5 as parsePath, ae as redirect, af as redirectDocument, ag as replace, ah as resolvePath } from './route-data-Cceggzl6.mjs';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-DhdpvlSf.mjs';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-DhdpvlSf.mjs';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-DQbTMaUY.mjs';
2
+ export { ao as ClientActionFunction, ap as ClientActionFunctionArgs, aq as ClientLoaderFunction, ar as ClientLoaderFunctionArgs, ai as DataRouteMatch, aj as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, as as HeadersArgs, at as HeadersFunction, ax as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, y as NavigationStates, ak as Navigator, aw as PageLinkDescriptor, al as PatchRoutesOnNavigationFunction, am as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, an as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as isRouteErrorResponse, ac as matchPath, ad as matchRoutes, a5 as parsePath, ae as redirect, af as redirectDocument, ag as replace, ah as resolvePath } from './route-data-DQbTMaUY.mjs';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-Cyo_TZuh.mjs';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-Cyo_TZuh.mjs';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -9,7 +9,7 @@ export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerialize
9
9
  import { A as AppLoadContext$1 } from './data-CQbyyGzl.mjs';
10
10
 
11
11
  declare const SingleFetchRedirectSymbol: unique symbol;
12
- declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules, getRouter: () => Router): DataStrategyFunction;
12
+ declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, getRouter: () => Router): DataStrategyFunction;
13
13
  declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
14
14
  done: Promise<undefined>;
15
15
  value: unknown;
@@ -44,7 +44,11 @@ interface ServerBuild {
44
44
  assetsBuildDirectory: string;
45
45
  future: FutureConfig;
46
46
  ssr: boolean;
47
+ /**
48
+ * @deprecated This is now done via a custom header during prerendering
49
+ */
47
50
  isSpaMode: boolean;
51
+ prerender: string[];
48
52
  }
49
53
  interface HandleDocumentRequestFunction {
50
54
  (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: AppLoadContext$1): Promise<Response> | Response;
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-Cceggzl6.js';
2
- export { ao as ClientActionFunction, ap as ClientActionFunctionArgs, aq as ClientLoaderFunction, ar as ClientLoaderFunctionArgs, ai as DataRouteMatch, aj as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, as as HeadersArgs, at as HeadersFunction, ax as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, y as NavigationStates, ak as Navigator, aw as PageLinkDescriptor, al as PatchRoutesOnNavigationFunction, am as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, an as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as isRouteErrorResponse, ac as matchPath, ad as matchRoutes, a5 as parsePath, ae as redirect, af as redirectDocument, ag as replace, ah as resolvePath } from './route-data-Cceggzl6.js';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-DstSnxnE.js';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-DstSnxnE.js';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-DQbTMaUY.js';
2
+ export { ao as ClientActionFunction, ap as ClientActionFunctionArgs, aq as ClientLoaderFunction, ar as ClientLoaderFunctionArgs, ai as DataRouteMatch, aj as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, as as HeadersArgs, at as HeadersFunction, ax as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, ay as LinkDescriptor, au as MetaArgs, av as MetaDescriptor, y as NavigationStates, ak as Navigator, aw as PageLinkDescriptor, al as PatchRoutesOnNavigationFunction, am as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, an as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aD as UNSAFE_DataRouterContext, aE as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aC as UNSAFE_ErrorResponseImpl, aF as UNSAFE_FetchersContext, aG as UNSAFE_LocationContext, aH as UNSAFE_NavigationContext, aI as UNSAFE_RouteContext, aJ as UNSAFE_ViewTransitionContext, az as UNSAFE_createBrowserHistory, aB as UNSAFE_createRouter, aA as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as isRouteErrorResponse, ac as matchPath, ad as matchRoutes, a5 as parsePath, ae as redirect, af as redirectDocument, ag as replace, ah as resolvePath } from './route-data-DQbTMaUY.js';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-Ax4Jg2xL.js';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-Ax4Jg2xL.js';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -9,7 +9,7 @@ export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerialize
9
9
  import { A as AppLoadContext$1 } from './data-CQbyyGzl.js';
10
10
 
11
11
  declare const SingleFetchRedirectSymbol: unique symbol;
12
- declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules, getRouter: () => Router): DataStrategyFunction;
12
+ declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, getRouter: () => Router): DataStrategyFunction;
13
13
  declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
14
14
  done: Promise<undefined>;
15
15
  value: unknown;
@@ -44,7 +44,11 @@ interface ServerBuild {
44
44
  assetsBuildDirectory: string;
45
45
  future: FutureConfig;
46
46
  ssr: boolean;
47
+ /**
48
+ * @deprecated This is now done via a custom header during prerendering
49
+ */
47
50
  isSpaMode: boolean;
51
+ prerender: string[];
48
52
  }
49
53
  interface HandleDocumentRequestFunction {
50
54
  (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: AppLoadContext$1): Promise<Response> | Response;