react-router 8.3.1 → 8.5.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 (218) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/development/dom-export.d.ts +2 -1
  3. package/dist/development/dom-export.js +1 -1
  4. package/dist/development/index-react-server-client.js +2 -2
  5. package/dist/development/index-react-server.d.ts +601 -189
  6. package/dist/development/index-react-server.js +100 -48
  7. package/dist/development/index.d.ts +10 -9
  8. package/dist/development/index.js +6 -5
  9. package/dist/development/lib/actions.js +1 -1
  10. package/dist/development/lib/components.js +66 -10
  11. package/dist/development/lib/context.d.ts +19 -6
  12. package/dist/development/lib/context.js +11 -3
  13. package/dist/development/lib/dom/dom.d.ts +3 -0
  14. package/dist/development/lib/dom/dom.js +1 -1
  15. package/dist/development/lib/dom/global.d.ts +35 -0
  16. package/dist/development/lib/dom/lib.d.ts +34 -9
  17. package/dist/development/lib/dom/lib.js +30 -37
  18. package/dist/development/lib/dom/server.d.ts +6 -1
  19. package/dist/development/lib/dom/server.js +41 -15
  20. package/dist/development/lib/dom/ssr/components.js +26 -31
  21. package/dist/development/lib/dom/ssr/data.js +1 -1
  22. package/dist/development/lib/dom/ssr/entry.d.ts +13 -2
  23. package/dist/development/lib/dom/ssr/errorBoundaries.js +1 -1
  24. package/dist/development/lib/dom/ssr/fallback.js +1 -1
  25. package/dist/development/lib/dom/ssr/fog-of-war.d.ts +3 -2
  26. package/dist/development/lib/dom/ssr/fog-of-war.js +46 -22
  27. package/dist/development/lib/dom/ssr/hydration.d.ts +3 -1
  28. package/dist/development/lib/dom/ssr/hydration.js +6 -4
  29. package/dist/development/lib/dom/ssr/invariant.js +1 -1
  30. package/dist/development/lib/dom/ssr/links.js +1 -1
  31. package/dist/development/lib/dom/ssr/markup.js +5 -2
  32. package/dist/development/lib/dom/ssr/route-discovery.d.ts +120 -0
  33. package/dist/development/lib/dom/ssr/route-discovery.js +415 -0
  34. package/dist/development/lib/dom/ssr/routeModules.js +1 -1
  35. package/dist/development/lib/dom/ssr/routes-test-stub.js +2 -2
  36. package/dist/development/lib/dom/ssr/routes.d.ts +2 -2
  37. package/dist/development/lib/dom/ssr/routes.js +8 -8
  38. package/dist/development/lib/dom/ssr/server.js +4 -2
  39. package/dist/development/lib/dom/ssr/single-fetch.d.ts +28 -2
  40. package/dist/development/lib/dom/ssr/single-fetch.js +80 -71
  41. package/dist/development/lib/dom-export/dom-router-provider.js +1 -1
  42. package/dist/development/lib/dom-export/hydrated-router.d.ts +28 -0
  43. package/dist/development/lib/dom-export/hydrated-router.js +33 -12
  44. package/dist/development/lib/errors.js +1 -1
  45. package/dist/development/lib/hooks.d.ts +3 -3
  46. package/dist/development/lib/hooks.js +52 -47
  47. package/dist/development/lib/href.js +1 -1
  48. package/dist/development/lib/router/history.js +1 -1
  49. package/dist/development/lib/router/instrumentation.js +1 -1
  50. package/dist/development/lib/router/matcher-route-pattern.d.ts +2 -0
  51. package/dist/development/lib/router/matcher-route-pattern.js +216 -0
  52. package/dist/development/lib/router/matcher-route-pattern.preload.d.ts +20 -0
  53. package/dist/development/lib/router/matcher-route-pattern.preload.js +36 -0
  54. package/dist/development/lib/router/matcher.d.ts +2 -0
  55. package/dist/development/lib/router/matcher.js +29 -0
  56. package/dist/development/lib/router/navigation.js +1 -1
  57. package/dist/development/lib/router/router.d.ts +19 -7
  58. package/dist/development/lib/router/router.js +235 -128
  59. package/dist/development/lib/router/url.js +1 -1
  60. package/dist/development/lib/router/utils.d.ts +30 -5
  61. package/dist/development/lib/router/utils.js +8 -5
  62. package/dist/development/lib/rsc/browser.js +3 -2
  63. package/dist/development/lib/rsc/errorBoundaries.js +1 -1
  64. package/dist/development/lib/rsc/html-stream/browser.js +1 -1
  65. package/dist/development/lib/rsc/html-stream/server.js +25 -15
  66. package/dist/development/lib/rsc/route-modules.js +1 -1
  67. package/dist/development/lib/rsc/server.rsc.d.ts +10 -2
  68. package/dist/development/lib/rsc/server.ssr.js +25 -21
  69. package/dist/development/lib/server-runtime/build.d.ts +14 -0
  70. package/dist/development/lib/server-runtime/cookies.js +1 -1
  71. package/dist/development/lib/server-runtime/crypto.js +1 -1
  72. package/dist/development/lib/server-runtime/data.js +1 -1
  73. package/dist/development/lib/server-runtime/dev.js +1 -1
  74. package/dist/development/lib/server-runtime/entry.js +1 -1
  75. package/dist/development/lib/server-runtime/errors.js +1 -1
  76. package/dist/development/lib/server-runtime/headers.js +1 -1
  77. package/dist/development/lib/server-runtime/invariant.js +1 -1
  78. package/dist/development/lib/server-runtime/mode.js +1 -1
  79. package/dist/development/lib/server-runtime/routeMatching.js +3 -4
  80. package/dist/development/lib/server-runtime/routes.d.ts +1 -1
  81. package/dist/development/lib/server-runtime/routes.js +1 -1
  82. package/dist/development/lib/server-runtime/server.js +18 -9
  83. package/dist/development/lib/server-runtime/serverHandoff.d.ts +17 -0
  84. package/dist/development/lib/server-runtime/serverHandoff.js +1 -1
  85. package/dist/development/lib/server-runtime/sessions/cookieStorage.js +1 -1
  86. package/dist/development/lib/server-runtime/sessions/memoryStorage.js +1 -1
  87. package/dist/development/lib/server-runtime/sessions.js +1 -1
  88. package/dist/development/lib/server-runtime/single-fetch.js +1 -1
  89. package/dist/development/lib/server-runtime/urls.js +1 -1
  90. package/dist/development/lib/server-runtime/warnings.js +1 -1
  91. package/dist/development/lib/types/internal.js +1 -1
  92. package/dist/development/lib/types/route-data.d.ts +2 -2
  93. package/dist/development/lib/types/route-module-annotations.d.ts +1 -1
  94. package/dist/development/route-pattern.d.ts +3 -0
  95. package/dist/development/route-pattern.js +12 -0
  96. package/dist/development/vendor/turbo-stream-v2/flatten.js +1 -1
  97. package/dist/development/vendor/turbo-stream-v2/turbo-stream.js +1 -1
  98. package/dist/development/vendor/turbo-stream-v2/unflatten.js +1 -1
  99. package/dist/development/vendor/turbo-stream-v2/utils.js +1 -1
  100. package/dist/production/dom-export.d.ts +2 -1
  101. package/dist/production/dom-export.js +1 -1
  102. package/dist/production/index-react-server-client.js +2 -2
  103. package/dist/production/index-react-server.d.ts +601 -189
  104. package/dist/production/index-react-server.js +100 -48
  105. package/dist/production/index.d.ts +10 -9
  106. package/dist/production/index.js +6 -5
  107. package/dist/production/lib/actions.js +1 -1
  108. package/dist/production/lib/components.js +66 -10
  109. package/dist/production/lib/context.d.ts +19 -6
  110. package/dist/production/lib/context.js +11 -3
  111. package/dist/production/lib/dom/dom.d.ts +3 -0
  112. package/dist/production/lib/dom/dom.js +1 -1
  113. package/dist/production/lib/dom/global.d.ts +35 -0
  114. package/dist/production/lib/dom/lib.d.ts +34 -9
  115. package/dist/production/lib/dom/lib.js +30 -37
  116. package/dist/production/lib/dom/server.d.ts +6 -1
  117. package/dist/production/lib/dom/server.js +41 -15
  118. package/dist/production/lib/dom/ssr/components.js +26 -31
  119. package/dist/production/lib/dom/ssr/data.js +1 -1
  120. package/dist/production/lib/dom/ssr/entry.d.ts +13 -2
  121. package/dist/production/lib/dom/ssr/errorBoundaries.js +1 -1
  122. package/dist/production/lib/dom/ssr/fallback.js +1 -1
  123. package/dist/production/lib/dom/ssr/fog-of-war.d.ts +3 -2
  124. package/dist/production/lib/dom/ssr/fog-of-war.js +46 -22
  125. package/dist/production/lib/dom/ssr/hydration.d.ts +3 -1
  126. package/dist/production/lib/dom/ssr/hydration.js +6 -4
  127. package/dist/production/lib/dom/ssr/invariant.js +1 -1
  128. package/dist/production/lib/dom/ssr/links.js +1 -1
  129. package/dist/production/lib/dom/ssr/markup.js +5 -2
  130. package/dist/production/lib/dom/ssr/route-discovery.d.ts +120 -0
  131. package/dist/production/lib/dom/ssr/route-discovery.js +415 -0
  132. package/dist/production/lib/dom/ssr/routeModules.js +1 -1
  133. package/dist/production/lib/dom/ssr/routes-test-stub.js +2 -2
  134. package/dist/production/lib/dom/ssr/routes.d.ts +2 -2
  135. package/dist/production/lib/dom/ssr/routes.js +8 -8
  136. package/dist/production/lib/dom/ssr/server.js +4 -2
  137. package/dist/production/lib/dom/ssr/single-fetch.d.ts +28 -2
  138. package/dist/production/lib/dom/ssr/single-fetch.js +80 -71
  139. package/dist/production/lib/dom-export/dom-router-provider.js +1 -1
  140. package/dist/production/lib/dom-export/hydrated-router.d.ts +28 -0
  141. package/dist/production/lib/dom-export/hydrated-router.js +33 -12
  142. package/dist/production/lib/errors.js +1 -1
  143. package/dist/production/lib/hooks.d.ts +3 -3
  144. package/dist/production/lib/hooks.js +51 -46
  145. package/dist/production/lib/href.js +1 -1
  146. package/dist/production/lib/router/history.js +1 -1
  147. package/dist/production/lib/router/instrumentation.js +1 -1
  148. package/dist/production/lib/router/matcher-route-pattern.d.ts +2 -0
  149. package/dist/production/lib/router/matcher-route-pattern.js +216 -0
  150. package/dist/production/lib/router/matcher-route-pattern.preload.d.ts +20 -0
  151. package/dist/production/lib/router/matcher-route-pattern.preload.js +36 -0
  152. package/dist/production/lib/router/matcher.d.ts +2 -0
  153. package/dist/production/lib/router/matcher.js +29 -0
  154. package/dist/production/lib/router/navigation.js +1 -1
  155. package/dist/production/lib/router/router.d.ts +19 -7
  156. package/dist/production/lib/router/router.js +235 -128
  157. package/dist/production/lib/router/url.js +1 -1
  158. package/dist/production/lib/router/utils.d.ts +30 -5
  159. package/dist/production/lib/router/utils.js +8 -5
  160. package/dist/production/lib/rsc/browser.js +3 -2
  161. package/dist/production/lib/rsc/errorBoundaries.js +1 -1
  162. package/dist/production/lib/rsc/html-stream/browser.js +1 -1
  163. package/dist/production/lib/rsc/html-stream/server.js +25 -15
  164. package/dist/production/lib/rsc/route-modules.js +1 -1
  165. package/dist/production/lib/rsc/server.rsc.d.ts +10 -2
  166. package/dist/production/lib/rsc/server.ssr.js +25 -21
  167. package/dist/production/lib/server-runtime/build.d.ts +14 -0
  168. package/dist/production/lib/server-runtime/cookies.js +1 -1
  169. package/dist/production/lib/server-runtime/crypto.js +1 -1
  170. package/dist/production/lib/server-runtime/data.js +1 -1
  171. package/dist/production/lib/server-runtime/dev.js +1 -1
  172. package/dist/production/lib/server-runtime/entry.js +1 -1
  173. package/dist/production/lib/server-runtime/errors.js +1 -1
  174. package/dist/production/lib/server-runtime/headers.js +1 -1
  175. package/dist/production/lib/server-runtime/invariant.js +1 -1
  176. package/dist/production/lib/server-runtime/mode.js +1 -1
  177. package/dist/production/lib/server-runtime/routeMatching.js +3 -4
  178. package/dist/production/lib/server-runtime/routes.d.ts +1 -1
  179. package/dist/production/lib/server-runtime/routes.js +1 -1
  180. package/dist/production/lib/server-runtime/server.js +18 -9
  181. package/dist/production/lib/server-runtime/serverHandoff.d.ts +17 -0
  182. package/dist/production/lib/server-runtime/serverHandoff.js +1 -1
  183. package/dist/production/lib/server-runtime/sessions/cookieStorage.js +1 -1
  184. package/dist/production/lib/server-runtime/sessions/memoryStorage.js +1 -1
  185. package/dist/production/lib/server-runtime/sessions.js +1 -1
  186. package/dist/production/lib/server-runtime/single-fetch.js +1 -1
  187. package/dist/production/lib/server-runtime/urls.js +1 -1
  188. package/dist/production/lib/server-runtime/warnings.js +1 -1
  189. package/dist/production/lib/types/internal.js +1 -1
  190. package/dist/production/lib/types/route-data.d.ts +2 -2
  191. package/dist/production/lib/types/route-module-annotations.d.ts +1 -1
  192. package/dist/production/route-pattern.d.ts +3 -0
  193. package/dist/production/route-pattern.js +12 -0
  194. package/dist/production/vendor/turbo-stream-v2/flatten.js +1 -1
  195. package/dist/production/vendor/turbo-stream-v2/turbo-stream.js +1 -1
  196. package/dist/production/vendor/turbo-stream-v2/unflatten.js +1 -1
  197. package/dist/production/vendor/turbo-stream-v2/utils.js +1 -1
  198. package/docs/explanation/lazy-route-discovery.md +4 -0
  199. package/docs/explanation/sessions-and-cookies.md +108 -4
  200. package/docs/how-to/custom-fetch.md +218 -0
  201. package/docs/how-to/data-strategy.md +23 -1
  202. package/docs/how-to/fetchers.md +6 -1
  203. package/docs/how-to/middleware.md +4 -1
  204. package/docs/how-to/optimize-revalidation.md +178 -5
  205. package/docs/how-to/pre-rendering.md +23 -1
  206. package/docs/how-to/react-server-components.md +26 -3
  207. package/docs/how-to/resource-routes.md +3 -0
  208. package/docs/how-to/route-discovery.md +145 -0
  209. package/docs/how-to/spa.md +2 -0
  210. package/docs/how-to/view-transitions.md +80 -13
  211. package/docs/start/data/actions.md +2 -1
  212. package/docs/start/data/route-object.md +21 -6
  213. package/docs/start/framework/actions.md +4 -2
  214. package/docs/start/framework/navigating.md +5 -9
  215. package/docs/start/framework/rendering.md +37 -0
  216. package/docs/start/framework/route-module.md +32 -5
  217. package/docs/upgrading/future.md +68 -0
  218. package/package.json +19 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v8.3.1
2
+ * react-router v8.5.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -207,7 +207,8 @@ const unsupportedLazyRouteObjectKeys = new Set([
207
207
  "path",
208
208
  "id",
209
209
  "index",
210
- "children"
210
+ "children",
211
+ "unstable_validateParams"
211
212
  ]);
212
213
  function isUnsupportedLazyRouteObjectKey(key) {
213
214
  return unsupportedLazyRouteObjectKeys.has(key);
@@ -219,7 +220,8 @@ const unsupportedLazyRouteFunctionKeys = new Set([
219
220
  "id",
220
221
  "index",
221
222
  "middleware",
222
- "children"
223
+ "children",
224
+ "unstable_validateParams"
223
225
  ]);
224
226
  function isUnsupportedLazyRouteFunctionKey(key) {
225
227
  return unsupportedLazyRouteFunctionKeys.has(key);
@@ -538,7 +540,7 @@ function compilePath(path, caseSensitive = false, end = true) {
538
540
  return "(?:/([^\\/]*))?";
539
541
  }
540
542
  return "/([^\\/]+)";
541
- }).replace(/\/([\w-]+)\?(?=\/|$|\()/g, "(?:/$1)?");
543
+ }).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g, "(?:/$1)?");
542
544
  if (path.endsWith("*")) {
543
545
  params.push({ paramName: "*" });
544
546
  regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
@@ -1031,6 +1033,23 @@ function getReadonlyContext(context) {
1031
1033
  return { get: (ctx) => context.get(ctx) };
1032
1034
  }
1033
1035
  //#endregion
1036
+ //#region lib/router/matcher.ts
1037
+ var V6RegExMatcher = class {
1038
+ #routes = [];
1039
+ #branches = [];
1040
+ #basename;
1041
+ constructor(basename) {
1042
+ this.#basename = basename;
1043
+ }
1044
+ update(routes) {
1045
+ this.#routes = routes;
1046
+ this.#branches = flattenAndRankRoutes(routes);
1047
+ }
1048
+ match(locationArg, allowPartial = false) {
1049
+ return matchRoutesImpl(this.#routes, locationArg, this.#basename, allowPartial, this.#branches);
1050
+ }
1051
+ };
1052
+ //#endregion
1034
1053
  //#region lib/router/router.ts
1035
1054
  const validMutationMethodsArr = [
1036
1055
  "POST",
@@ -1049,6 +1068,14 @@ const redirectStatusCodes = new Set([
1049
1068
  308
1050
1069
  ]);
1051
1070
  const ResetLoaderDataSymbol = Symbol("ResetLoaderData");
1071
+ function createDataRouteMatcher(future, basename) {
1072
+ if (future.unstable_routePatternMatching) {
1073
+ let RoutePatternMatcher = void 0;
1074
+ invariant$1(RoutePatternMatcher, "You must call unstable_preloadRoutePattern() from \"react-router/route-pattern\" before enabling future.unstable_routePatternMatching.");
1075
+ return new RoutePatternMatcher(basename);
1076
+ }
1077
+ return new V6RegExMatcher(basename);
1078
+ }
1052
1079
  /**
1053
1080
  * Create a static handler to perform server-side data loading
1054
1081
  *
@@ -1085,7 +1112,7 @@ function createStaticHandler(routes, opts) {
1085
1112
  let basename = (opts ? opts.basename : null) || "/";
1086
1113
  let _mapRouteProperties = opts?.mapRouteProperties;
1087
1114
  let mapRouteProperties = _mapRouteProperties ? _mapRouteProperties : () => ({});
1088
- ({ ...opts?.future });
1115
+ let dataRouteMatcher = createDataRouteMatcher({ ...opts?.future }, basename);
1089
1116
  if (opts?.instrumentations) {
1090
1117
  let instrumentations = opts.instrumentations;
1091
1118
  mapRouteProperties = (route) => {
@@ -1096,7 +1123,8 @@ function createStaticHandler(routes, opts) {
1096
1123
  };
1097
1124
  }
1098
1125
  let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, void 0, manifest);
1099
- let routeBranches = flattenAndRankRoutes(dataRoutes);
1126
+ dataRouteMatcher.update(dataRoutes);
1127
+ let match = (locationArg) => dataRouteMatcher.match(locationArg);
1100
1128
  /**
1101
1129
  * The query() method is intended for document requests, in which we want to
1102
1130
  * call an optional action and potentially multiple loaders for all nested
@@ -1127,7 +1155,7 @@ function createStaticHandler(routes, opts) {
1127
1155
  let normalizePathImpl = normalizePath || defaultNormalizePath;
1128
1156
  let method = request.method;
1129
1157
  let location = createLocation("", normalizePathImpl(request), null, "default");
1130
- let matches = matchRoutesImpl(dataRoutes, location, basename, false, routeBranches);
1158
+ let matches = dataRouteMatcher.match(location);
1131
1159
  requestContext = requestContext != null ? requestContext : new RouterContextProvider();
1132
1160
  if (!isValidMethod(method) && method !== "HEAD") {
1133
1161
  let error = getInternalRouterError(405, { method });
@@ -1141,7 +1169,8 @@ function createStaticHandler(routes, opts) {
1141
1169
  errors: { [route.id]: error },
1142
1170
  statusCode: error.status,
1143
1171
  loaderHeaders: {},
1144
- actionHeaders: {}
1172
+ actionHeaders: {},
1173
+ _match: match
1145
1174
  };
1146
1175
  return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;
1147
1176
  } else if (!matches) {
@@ -1156,7 +1185,8 @@ function createStaticHandler(routes, opts) {
1156
1185
  errors: { [route.id]: error },
1157
1186
  statusCode: error.status,
1158
1187
  loaderHeaders: {},
1159
- actionHeaders: {}
1188
+ actionHeaders: {},
1189
+ _match: match
1160
1190
  };
1161
1191
  return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;
1162
1192
  }
@@ -1179,7 +1209,8 @@ function createStaticHandler(routes, opts) {
1179
1209
  renderedStaticContext = {
1180
1210
  location,
1181
1211
  basename,
1182
- ...result
1212
+ ...result,
1213
+ _match: match
1183
1214
  };
1184
1215
  return renderedStaticContext;
1185
1216
  });
@@ -1205,7 +1236,8 @@ function createStaticHandler(routes, opts) {
1205
1236
  errors: { [skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, matches.find((m) => m.route.id === routeId || m.route.loader)?.route.id || routeId).route.id]: error },
1206
1237
  statusCode: isRouteErrorResponse(error) ? error.status : 500,
1207
1238
  actionHeaders: {},
1208
- loaderHeaders: {}
1239
+ loaderHeaders: {},
1240
+ _match: match
1209
1241
  };
1210
1242
  return generateMiddlewareResponse(() => Promise.resolve(staticContext));
1211
1243
  }
@@ -1222,7 +1254,8 @@ function createStaticHandler(routes, opts) {
1222
1254
  return {
1223
1255
  location,
1224
1256
  basename,
1225
- ...result
1257
+ ...result,
1258
+ _match: match
1226
1259
  };
1227
1260
  }
1228
1261
  /**
@@ -1255,7 +1288,7 @@ function createStaticHandler(routes, opts) {
1255
1288
  let normalizePathImpl = normalizePath || defaultNormalizePath;
1256
1289
  let method = request.method;
1257
1290
  let location = createLocation("", normalizePathImpl(request), null, "default");
1258
- let matches = matchRoutesImpl(dataRoutes, location, basename, false, routeBranches);
1291
+ let matches = dataRouteMatcher.match(location);
1259
1292
  requestContext = requestContext != null ? requestContext : new RouterContextProvider();
1260
1293
  if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") throw getInternalRouterError(405, { method });
1261
1294
  else if (!matches) throw getInternalRouterError(404, { pathname: location.pathname });
@@ -1417,7 +1450,7 @@ function createStaticHandler(routes, opts) {
1417
1450
  };
1418
1451
  }
1419
1452
  async function callDataStrategy(request, location, matches, isRouteRequest, requestContext, dataStrategy) {
1420
- let results = await callDataStrategyImpl(dataStrategy || defaultDataStrategy, request, location, matches, null, requestContext, true);
1453
+ let results = await callDataStrategyImpl(dataStrategy || defaultDataStrategy, request, location, matches, null, "static", requestContext, true);
1421
1454
  let dataResults = {};
1422
1455
  await Promise.all(matches.map(async (match) => {
1423
1456
  if (!(match.route.id in results)) return;
@@ -1436,7 +1469,7 @@ function createStaticHandler(routes, opts) {
1436
1469
  }
1437
1470
  return {
1438
1471
  dataRoutes,
1439
- _internalRouteBranches: routeBranches,
1472
+ match,
1440
1473
  query,
1441
1474
  queryRoute
1442
1475
  };
@@ -1780,7 +1813,7 @@ function getTargetedDataStrategyMatches(mapRouteProperties, manifest, request, p
1780
1813
  return getDataStrategyMatch(mapRouteProperties, manifest, request, path, getRoutePattern(matches), match, lazyRoutePropertiesToSkip, scopedContext, true, shouldRevalidateArgs);
1781
1814
  });
1782
1815
  }
1783
- async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, isStaticHandler) {
1816
+ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, initiator, scopedContext, isStaticHandler, navigationType = null) {
1784
1817
  if (matches.some((m) => m._lazyPromises?.middleware)) await Promise.all(matches.map((m) => m._lazyPromises?.middleware));
1785
1818
  let dataStrategyArgs = {
1786
1819
  request,
@@ -1788,7 +1821,9 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
1788
1821
  pattern: getRoutePattern(matches),
1789
1822
  params: matches[0].params,
1790
1823
  context: scopedContext,
1791
- matches
1824
+ matches,
1825
+ unstable_initiator: initiator,
1826
+ unstable_navigationType: initiator === "navigation" ? navigationType : null
1792
1827
  };
1793
1828
  let runClientMiddleware = isStaticHandler ? () => {
1794
1829
  throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`");
@@ -2328,6 +2363,13 @@ const Await = (async ({ children, resolve, errorElement }) => {
2328
2363
  * encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
2329
2364
  * enabled client router.
2330
2365
  *
2366
+ * Treat every React Server Function as a public endpoint. Server Functions are
2367
+ * not inherently associated with a route. Any route middleware that runs is
2368
+ * selected from the URL used to call a Server Function, but the client controls
2369
+ * both the Server Function identifier and the URL. Perform all access control
2370
+ * checks within each Server Function, or use a route action for
2371
+ * middleware-driven access control.
2372
+ *
2331
2373
  * @example
2332
2374
  * import {
2333
2375
  * createTemporaryReferenceSet,
@@ -2395,7 +2437,12 @@ const Await = (async ({ children, resolve, errorElement }) => {
2395
2437
  * that contains the [RSC](https://react.dev/reference/rsc/server-components)
2396
2438
  * data for hydration.
2397
2439
  */
2398
- async function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, routeDiscovery, loadServerAction, decodeAction, decodeFormState, clientVersion, onError, request, routes, generateResponse }) {
2440
+ async function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, routeDiscovery, loadServerAction, decodeAction, decodeFormState, clientVersion, onError, request, routes, generateResponse: encodeResponse }) {
2441
+ let generateResponse = (match, options) => {
2442
+ let response = encodeResponse(match, options);
2443
+ response.headers.set("Content-Type", "text/x-component");
2444
+ return response;
2445
+ };
2399
2446
  let url = new URL(request.url);
2400
2447
  basename = basename || "/";
2401
2448
  let normalizedPath = url.pathname;
@@ -2415,11 +2462,12 @@ async function matchRSCServerRequest({ allowedActionOrigins, createTemporaryRefe
2415
2462
  const requestUrl = new URL(request.url);
2416
2463
  if (isManifestRequest(requestUrl)) return await generateManifestResponse(routes, basename, request, generateResponse, temporaryReferences, routeDiscovery, clientVersion);
2417
2464
  let isDataRequest = isReactServerRequest(requestUrl);
2418
- let matches = matchRoutes(routes, url.pathname, basename);
2465
+ let staticHandler = createStaticHandler(routes, { basename });
2466
+ let matches = staticHandler.match(url.pathname);
2419
2467
  if (matches) await Promise.all(matches.map((m) => explodeLazyRoute(m.route)));
2420
2468
  const leafMatch = matches?.[matches.length - 1];
2421
- if (!isDataRequest && leafMatch && !leafMatch.route.Component && !leafMatch.route.ErrorBoundary) return generateResourceResponse(routerRequest, routes, basename, leafMatch.route.id, requestContext, onError);
2422
- let response = await generateRenderResponse(routerRequest, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion);
2469
+ if (!isDataRequest && leafMatch && !leafMatch.route.Component && !leafMatch.route.ErrorBoundary) return generateResourceResponse(routerRequest, staticHandler, leafMatch.route.id, requestContext, onError);
2470
+ let response = await generateRenderResponse(routerRequest, staticHandler, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion);
2423
2471
  response.headers.set("X-Remix-Response", "yes");
2424
2472
  return response;
2425
2473
  }
@@ -2452,9 +2500,10 @@ async function generateManifestResponse(routes, basename, request, generateRespo
2452
2500
  }
2453
2501
  let pathParam = url.searchParams.get("paths");
2454
2502
  let pathnames = pathParam ? pathParam.split(",").filter(Boolean) : [url.pathname.replace(/\.manifest$/, "")];
2503
+ let staticHandler = routes.length > 0 ? createStaticHandler(routes, { basename }) : void 0;
2455
2504
  let routeIds = /* @__PURE__ */ new Set();
2456
- let matchedRoutes = pathnames.flatMap((pathname) => {
2457
- let pathnameMatches = matchRoutes(routes, pathname, basename);
2505
+ let matchedRoutes = staticHandler ? pathnames.flatMap((pathname) => {
2506
+ let pathnameMatches = staticHandler.match(pathname);
2458
2507
  return pathnameMatches?.map((m, i) => ({
2459
2508
  ...m.route,
2460
2509
  parentId: pathnameMatches[i - 1]?.route.id
@@ -2465,10 +2514,10 @@ async function generateManifestResponse(routes, basename, request, generateRespo
2465
2514
  return true;
2466
2515
  }
2467
2516
  return false;
2468
- });
2517
+ }) : [];
2469
2518
  let payload = {
2470
2519
  type: "manifest",
2471
- patches: Promise.all([...matchedRoutes.map((route) => getManifestRoute(route)), getAdditionalRoutePatches(pathnames, routes, basename, Array.from(routeIds))]).then((r) => r.flat(1))
2520
+ patches: Promise.all([...matchedRoutes.map((route) => getManifestRoute(route)), staticHandler ? getAdditionalRoutePatches(pathnames, staticHandler, Array.from(routeIds)) : Promise.resolve([])]).then((r) => r.flat(1))
2472
2521
  };
2473
2522
  return generateResponse({
2474
2523
  statusCode: 200,
@@ -2538,20 +2587,20 @@ async function processServerAction(request, basename, decodeReply, loadServerAct
2538
2587
  }
2539
2588
  }
2540
2589
  }
2541
- async function generateResourceResponse(request, routes, basename, routeId, requestContext, onError) {
2590
+ async function generateResourceResponse(request, staticHandler, routeId, requestContext, onError) {
2542
2591
  try {
2543
- return await createStaticHandler(routes, { basename }).queryRoute(request, {
2592
+ return tagResourceResponse(await staticHandler.queryRoute(request, {
2544
2593
  routeId,
2545
2594
  requestContext,
2546
2595
  async generateMiddlewareResponse(queryRoute) {
2547
2596
  try {
2548
- return generateResourceResponse(await queryRoute(request));
2597
+ return tagResourceResponse(await queryRoute(request));
2549
2598
  } catch (error) {
2550
2599
  return generateErrorResponse(error);
2551
2600
  }
2552
2601
  },
2553
2602
  normalizePath: (r) => getNormalizedPath(r)
2554
- });
2603
+ }));
2555
2604
  } catch (error) {
2556
2605
  return generateErrorResponse(error);
2557
2606
  }
@@ -2569,24 +2618,23 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
2569
2618
  onError?.(error);
2570
2619
  response = new Response("Internal Server Error", { status: 500 });
2571
2620
  }
2572
- return generateResourceResponse(response);
2573
- }
2574
- function generateResourceResponse(response) {
2575
- const headers = new Headers(response.headers);
2576
- headers.set("React-Router-Resource", "true");
2577
- return new Response(response.body, {
2578
- status: response.status,
2579
- statusText: response.statusText,
2580
- headers
2581
- });
2621
+ return tagResourceResponse(response);
2582
2622
  }
2583
2623
  }
2584
- async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion) {
2624
+ function tagResourceResponse(response) {
2625
+ const headers = new Headers(response.headers);
2626
+ headers.set("React-Router-Resource", "true");
2627
+ return new Response(response.body, {
2628
+ status: response.status,
2629
+ statusText: response.statusText,
2630
+ headers
2631
+ });
2632
+ }
2633
+ async function generateRenderResponse(request, staticHandler, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion) {
2585
2634
  let statusCode = 200;
2586
2635
  let url = new URL(request.url);
2587
2636
  let isSubmission = isMutationMethod(request.method);
2588
2637
  let routeIdsToLoad = !isSubmission && url.searchParams.has("_routes") ? url.searchParams.get("_routes").split(",") : null;
2589
- const staticHandler = createStaticHandler(routes, { basename });
2590
2638
  let actionResult;
2591
2639
  const ctx = {
2592
2640
  request,
@@ -2634,11 +2682,12 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2634
2682
  staticContext.errors[staticContext.matches[0].route.id] = potentialCSRFAttackError;
2635
2683
  staticContext.statusCode = 400;
2636
2684
  }
2637
- return generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, ctx.redirect?.headers, routeDiscovery, clientVersion);
2685
+ return generateStaticContextResponse(staticHandler, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, ctx.redirect?.headers, routeDiscovery, clientVersion);
2638
2686
  }
2639
2687
  }));
2640
2688
  if (isRedirectResponse(result)) return generateRedirectResponse(result, actionResult, basename, isDataRequest, generateResponse, temporaryReferences, ctx.redirect?.headers);
2641
2689
  invariant(isResponse(result), "Expected a response from query");
2690
+ if (result.headers.get("Content-Type")?.split(";")[0].trim().toLowerCase() !== "text/x-component") return tagResourceResponse(result);
2642
2691
  return result;
2643
2692
  }
2644
2693
  function generateRedirectResponse(response, actionResult, basename, isDataRequest, generateResponse, temporaryReferences, sideEffectRedirectHeaders) {
@@ -2668,7 +2717,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
2668
2717
  onError: defaultOnError
2669
2718
  });
2670
2719
  }
2671
- async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery, clientVersion) {
2720
+ async function generateStaticContextResponse(staticHandler, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery, clientVersion) {
2672
2721
  statusCode = staticContext.statusCode ?? statusCode;
2673
2722
  if (staticContext.errors) staticContext.errors = Object.fromEntries(Object.entries(staticContext.errors).map(([key, error]) => [key, isRouteErrorResponse(error) ? Object.fromEntries(Object.entries(error)) : error]));
2674
2723
  staticContext.matches.forEach((m) => {
@@ -2689,7 +2738,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
2689
2738
  location: staticContext.location,
2690
2739
  formState
2691
2740
  };
2692
- const renderPayloadPromise = () => getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery);
2741
+ const renderPayloadPromise = () => getRenderPayload(baseRenderPayload, staticHandler, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery);
2693
2742
  let payload;
2694
2743
  if (actionResult) payload = {
2695
2744
  type: "action",
@@ -2711,7 +2760,8 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
2711
2760
  onError: defaultOnError
2712
2761
  });
2713
2762
  }
2714
- async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery) {
2763
+ async function getRenderPayload(baseRenderPayload, staticHandler, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery) {
2764
+ let routes = staticHandler.dataRoutes;
2715
2765
  let deepestRenderedRouteIdx = staticContext.matches.length - 1;
2716
2766
  let parentIds = {};
2717
2767
  staticContext.matches.forEach((m, i) => {
@@ -2729,7 +2779,9 @@ async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToL
2729
2779
  parentId
2730
2780
  });
2731
2781
  }));
2732
- let patches = routeDiscovery?.mode === "initial" && !isDataRequest ? getAllRoutePatches(routes, basename).then((patches) => patches.filter((patch) => !staticContext.matches.some((m) => m.route.id === patch.id))) : getAdditionalRoutePatches(getPathsWithAncestors([staticContext.location.pathname]), routes, basename, staticContext.matches.map((m) => m.route.id));
2782
+ let patches;
2783
+ if (routeDiscovery?.mode === "initial" && !isDataRequest) patches = getAllRoutePatches(routes, basename).then((patches) => patches.filter((patch) => !staticContext.matches.some((m) => m.route.id === patch.id)));
2784
+ else patches = getAdditionalRoutePatches(getPathsWithAncestors([staticContext.location.pathname]), staticHandler, staticContext.matches.map((m) => m.route.id));
2733
2785
  return {
2734
2786
  ...baseRenderPayload,
2735
2787
  matches: await matchesPromise,
@@ -2833,13 +2885,13 @@ async function getAllRoutePatches(routes, basename) {
2833
2885
  for (let route of routes) await traverse(route, void 0);
2834
2886
  return patches.filter((p) => !!p.parentId);
2835
2887
  }
2836
- async function getAdditionalRoutePatches(pathnames, routes, basename, matchedRouteIds) {
2888
+ async function getAdditionalRoutePatches(pathnames, staticHandler, matchedRouteIds) {
2837
2889
  let patchRouteMatches = /* @__PURE__ */ new Map();
2838
2890
  let matchedPaths = /* @__PURE__ */ new Set();
2839
2891
  for (const pathname of pathnames) {
2840
2892
  if (matchedPaths.has(pathname)) continue;
2841
2893
  matchedPaths.add(pathname);
2842
- let matches = matchRoutes(routes, pathname, basename) || [];
2894
+ let matches = staticHandler.match(pathname) || [];
2843
2895
  matches.forEach((m, i) => {
2844
2896
  if (patchRouteMatches.get(m.route.id)) return;
2845
2897
  patchRouteMatches.set(m.route.id, {
@@ -1,10 +1,15 @@
1
1
 
2
2
  import { Action, InitialEntry, Location, Path, To, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, invariant, parsePath } from "./lib/router/history.js";
3
- import { ActionFunction, ActionFunctionArgs, BaseRouteObject, DataRouteMatch, DataRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, DataWithResponseInit, ErrorResponse, ErrorResponseImpl, FormEncType, FormMethod, HTMLFormMethod, IndexRouteObject, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, MiddlewareFunction, NonIndexRouteObject, ParamParseKey, Params, PatchRoutesOnNavigationFunction, PatchRoutesOnNavigationFunctionArgs, PathMatch, PathParam, PathPattern, RedirectFunction, RouteMatch, RouteObject, RouterContext, RouterContextProvider, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, UIMatch, createContext, data, defaultMapRouteProperties, generatePath, isRouteErrorResponse, matchPath, matchRoutes, redirect, redirectDocument, replace, resolvePath } from "./lib/router/utils.js";
3
+ import { ActionFunction, ActionFunctionArgs, BaseRouteObject, DataRouteMatch, DataRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyInitiator, DataStrategyMatch, DataStrategyResult, DataWithResponseInit, ErrorResponse, ErrorResponseImpl, FormEncType, FormMethod, HTMLFormMethod, IndexRouteObject, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, MiddlewareFunction, NonIndexRouteObject, ParamParseKey, Params, PatchRoutesOnNavigationFunction, PatchRoutesOnNavigationFunctionArgs, PathMatch, PathParam, PathPattern, RedirectFunction, RouteMatch, RouteObject, RouterContext, RouterContextProvider, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, UIMatch, createContext, data, defaultMapRouteProperties, generatePath, isRouteErrorResponse, matchPath, matchRoutes, redirect, redirectDocument, replace, resolvePath } from "./lib/router/utils.js";
4
4
  import { Blocker, BlockerFunction, Fetcher, GetScrollPositionFunction, GetScrollRestorationKeyFunction, HydrationState, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, Navigation, NavigationStates, RelativeRoutingType, RevalidationState, Router, RouterFetchOptions, RouterInit, RouterNavigateOptions, RouterState, RouterSubscriber, StaticHandler, StaticHandlerContext, createRouter, createStaticHandler } from "./lib/router/router.js";
5
- import { HtmlLinkDescriptor, LinkDescriptor, PageLinkDescriptor } from "./lib/router/links.js";
6
5
  import { Await, AwaitProps, ClientOnErrorFunction, IndexRouteProps, LayoutRouteProps, MemoryRouter, MemoryRouterOpts, MemoryRouterProps, Navigate, NavigateProps, Outlet, OutletProps, PathRouteProps, Route, RouteProps, Router as Router$1, RouterProps, RouterProvider, RouterProviderProps, Routes, RoutesProps, WithComponentProps, WithErrorBoundaryProps, WithHydrateFallbackProps, createMemoryRouter, createRoutesFromChildren, createRoutesFromElements, hydrationRouteProperties, renderMatches, withComponentProps, withErrorBoundaryProps, withHydrateFallbackProps } from "./lib/components.js";
7
- import { AwaitContextProvider, DataRouterContext, DataRouterStateContext, FetchersContext, LocationContext, NavigateOptions, NavigationContext, Navigator, RouteContext, ViewTransitionContext } from "./lib/context.js";
6
+ import { AwaitContextProvider, DataRouterContext, DataRouterDataContext, DataRouterNavigationContext, DataRouterStateContext, FetchersContext, LocationContext, NavigateOptions, NavigationContext, Navigator, RouteContext, ViewTransitionContext } from "./lib/context.js";
7
+ import { createClientRoutes, createClientRoutesWithHMRRevalidationOptOut, shouldHydrateRouteLoader } from "./lib/dom/ssr/routes.js";
8
+ import { HtmlLinkDescriptor, LinkDescriptor, PageLinkDescriptor } from "./lib/router/links.js";
9
+ import { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, HeadersArgs, HeadersFunction, LinksFunction, MetaArgs, MetaDescriptor, MetaFunction, RouteModules } from "./lib/dom/ssr/routeModules.js";
10
+ import { SingleFetchRedirectSymbol, decodeViaTurboStream, getTurboStreamSingleFetchDataStrategy } from "./lib/dom/ssr/single-fetch.js";
11
+ import { ServerMode } from "./lib/server-runtime/mode.js";
12
+ import { unstable_SerializesTo } from "./lib/types/serializes-to.js";
8
13
  import { Register } from "./lib/types/register.js";
9
14
  import { NavigateFunction, unstable_RouterState, unstable_RouterStateActiveVariant, unstable_RouterStatePendingVariant, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRoute, useRouteError, useRouteLoaderData, useRouterState, useRoutes } from "./lib/hooks.js";
10
15
  import { FetcherSubmitOptions, ParamKeyValuePair, SubmitOptions, SubmitTarget, URLSearchParamsInit, createSearchParams } from "./lib/dom/dom.js";
@@ -19,7 +24,6 @@ import { createCookieSessionStorage } from "./lib/server-runtime/sessions/cookie
19
24
  import { createMemorySessionStorage } from "./lib/server-runtime/sessions/memoryStorage.js";
20
25
  import { setDevServerHooks } from "./lib/server-runtime/dev.js";
21
26
  import { Future } from "./lib/types/future.js";
22
- import { unstable_SerializesTo } from "./lib/types/serializes-to.js";
23
27
  import { href } from "./lib/href.js";
24
28
  import { DecodeActionFunction, DecodeFormStateFunction, DecodeReplyFunction, LoadServerActionFunction, RSCManifestPayload, RSCMatch, RSCPayload, RSCRenderPayload, RSCRouteConfig, RSCRouteConfigEntry, RSCRouteManifest, RSCRouteMatch, getRequest, matchRSCServerRequest } from "./lib/rsc/server.rsc.js";
25
29
  import { BrowserCreateFromReadableStreamFunction, EncodeReplyFunction, RSCHydratedRouterProps } from "./lib/rsc/browser.js";
@@ -28,10 +32,7 @@ import { RSCDefaultRootErrorBoundary } from "./lib/rsc/errorBoundaries.js";
28
32
  import { RemixErrorBoundary } from "./lib/dom/ssr/errorBoundaries.js";
29
33
  import { getPatchRoutesOnNavigationFunction, useFogOFWarDiscovery } from "./lib/dom/ssr/fog-of-war.js";
30
34
  import { getHydrationData } from "./lib/dom/ssr/hydration.js";
31
- import { SingleFetchRedirectSymbol, decodeViaTurboStream, getTurboStreamSingleFetchDataStrategy } from "./lib/dom/ssr/single-fetch.js";
32
- import { ServerMode } from "./lib/server-runtime/mode.js";
33
- import { ClientActionFunction, ClientActionFunctionArgs, ClientLoaderFunction, ClientLoaderFunctionArgs, HeadersArgs, HeadersFunction, LinksFunction, MetaArgs, MetaDescriptor, MetaFunction, RouteModules } from "./lib/dom/ssr/routeModules.js";
34
- import { createClientRoutes, createClientRoutesWithHMRRevalidationOptOut, shouldHydrateRouteLoader } from "./lib/dom/ssr/routes.js";
35
+ import { DiscoveryResult, ManifestMismatchEvent, RouteDiscoveryOptions, RouteDiscoveryRuntime, getCustomPatchRoutesOnNavigationFunction, useCustomRouteDiscovery, useRouteDiscovery } from "./lib/dom/ssr/route-discovery.js";
35
36
  import { AssetsManifest, EntryContext } from "./lib/dom/ssr/entry.js";
36
37
  import { HandleDataRequestFunction, HandleDocumentRequestFunction, HandleErrorFunction, ServerBuild, ServerEntryModule } from "./lib/server-runtime/build.js";
37
38
  import { CreateRequestHandlerFunction, RequestHandler, createRequestHandler } from "./lib/server-runtime/server.js";
@@ -41,4 +42,4 @@ import { ClientInstrumentation, InstrumentRequestHandlerFunction, InstrumentRout
41
42
  declare const unstable_getRequest: typeof getRequest;
42
43
  declare const unstable_matchRSCServerRequest: typeof matchRSCServerRequest;
43
44
  //#endregion
44
- export { type ActionFunction, type ActionFunctionArgs, Await, type AwaitProps, type BaseRouteObject, type Blocker, type BlockerFunction, BrowserRouter, type BrowserRouterProps, type ClientActionFunction, type ClientActionFunctionArgs, type ClientInstrumentation, type ClientLoaderFunction, type ClientLoaderFunctionArgs, type ClientOnErrorFunction, type Cookie, type CookieOptions, type CookieParseOptions, type CookieSerializeOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, type DataRouteMatch, type DataRouteObject, type Router as DataRouter, type DataStrategyFunction, type DataStrategyFunctionArgs, type DataStrategyMatch, type DataStrategyResult, type DiscoverBehavior, type EntryContext, type ErrorResponse, type Fetcher, type FetcherFormProps, type FetcherSubmitFunction, type FetcherSubmitOptions, type FetcherWithComponents, type FlashSessionData, Form, type FormEncType, type FormMethod, type FormProps, type Future, type GetScrollPositionFunction, type GetScrollRestorationKeyFunction, type HTMLFormMethod, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HashRouter, type HashRouterProps, type HeadersArgs, type HeadersFunction, type HistoryRouterProps, type HtmlLinkDescriptor, type HydrationState, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, type IndexRouteObject, type IndexRouteProps, type InitialEntry, type InstrumentRequestHandlerFunction, type InstrumentRouteFunction, type InstrumentRouterFunction, type InstrumentationClientRouterResult, type InstrumentationHandlerResult, type InstrumentationServerHandlerResult, type IsCookieFunction, type IsSessionFunction, type LayoutRouteProps, type LazyRouteFunction, Link, type LinkDescriptor, type LinkProps, Links, type LinksFunction, type LinksProps, type LoaderFunction, type LoaderFunctionArgs, type Location, MemoryRouter, type MemoryRouterOpts, type MemoryRouterProps, Meta, type MetaArgs, type MetaDescriptor, type MetaFunction, type MiddlewareFunction, NavLink, type NavLinkProps, type NavLinkRenderProps, Navigate, type NavigateFunction, type NavigateOptions, type NavigateProps, type Navigation, type NavigationStates, Action as NavigationType, type Navigator, type NonIndexRouteObject, Outlet, type OutletProps, type PageLinkDescriptor, type ParamKeyValuePair, type ParamParseKey, type Params, type PatchRoutesOnNavigationFunction, type PatchRoutesOnNavigationFunctionArgs, type Path, type PathMatch, type PathParam, type PathPattern, type PathRouteProps, type PrefetchBehavior, PrefetchPageLinks, type RedirectFunction, type Register, type RelativeRoutingType, type RequestHandler, type RevalidationState, Route, type RouteMatch, type RouteObject, type RouteProps, Router$1 as Router, type RouterContext, RouterContextProvider, type RouterFetchOptions, type RouterInit, type RouterNavigateOptions, type RouterProps, RouterProvider, type RouterProviderProps, type RouterState, type RouterSubscriber, Routes, type RoutesProps, type RoutesTestStubProps, Scripts, type ScriptsProps, ScrollRestoration, type ScrollRestorationProps, type ServerBuild, type ServerEntryModule, type ServerInstrumentation, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, type SetURLSearchParams, type ShouldRevalidateFunction, type ShouldRevalidateFunctionArgs, type StaticHandler, type StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, type SubmitFunction, type SubmitOptions, type SubmitTarget, type To, type UIMatch, type AssetsManifest as UNSAFE_AssetsManifest, AwaitContextProvider as UNSAFE_AwaitContextProvider, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, type DataWithResponseInit as UNSAFE_DataWithResponseInit, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, FetchersContext as UNSAFE_FetchersContext, FrameworkContext as UNSAFE_FrameworkContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteContext as UNSAFE_RouteContext, type RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, ViewTransitionContext as UNSAFE_ViewTransitionContext, WithComponentProps as UNSAFE_WithComponentProps, WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps, WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps, createBrowserHistory as UNSAFE_createBrowserHistory, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, createHashHistory as UNSAFE_createHashHistory, createMemoryHistory as UNSAFE_createMemoryHistory, createRouter as UNSAFE_createRouter, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, defaultMapRouteProperties as UNSAFE_defaultMapRouteProperties, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, invariant as UNSAFE_invariant, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, withComponentProps as UNSAFE_withComponentProps, withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps, withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps, type URLSearchParamsInit, createBrowserRouter, createContext, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createPath, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, data, generatePath, href, isCookie, isRouteErrorResponse, isSession, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, type BrowserCreateFromReadableStreamFunction as unstable_BrowserCreateFromReadableStreamFunction, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, type EncodeReplyFunction as unstable_EncodeReplyFunction, HistoryRouter as unstable_HistoryRouter, type LoadServerActionFunction as unstable_LoadServerActionFunction, type RSCHydratedRouterProps as unstable_RSCHydratedRouterProps, type RSCManifestPayload as unstable_RSCManifestPayload, type RSCMatch as unstable_RSCMatch, type RSCPayload as unstable_RSCPayload, type RSCRenderPayload as unstable_RSCRenderPayload, type RSCRouteConfig as unstable_RSCRouteConfig, type RSCRouteConfigEntry as unstable_RSCRouteConfigEntry, type RSCRouteManifest as unstable_RSCRouteManifest, type RSCRouteMatch as unstable_RSCRouteMatch, RSCStaticRouter as unstable_RSCStaticRouter, type RSCStaticRouterProps as unstable_RSCStaticRouterProps, type unstable_RouterState, type unstable_RouterStateActiveVariant, type unstable_RouterStatePendingVariant, type SSRCreateFromReadableStreamFunction as unstable_SSRCreateFromReadableStreamFunction, type unstable_SerializesTo, unstable_getRequest, unstable_matchRSCServerRequest, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useRoute as unstable_useRoute, useRouterState as unstable_useRouterState, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
45
+ export { type ActionFunction, type ActionFunctionArgs, Await, type AwaitProps, type BaseRouteObject, type Blocker, type BlockerFunction, BrowserRouter, type BrowserRouterProps, type ClientActionFunction, type ClientActionFunctionArgs, type ClientInstrumentation, type ClientLoaderFunction, type ClientLoaderFunctionArgs, type ClientOnErrorFunction, type Cookie, type CookieOptions, type CookieParseOptions, type CookieSerializeOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, type DataRouteMatch, type DataRouteObject, type Router as DataRouter, type DataStrategyFunction, type DataStrategyFunctionArgs, type DataStrategyMatch, type DataStrategyResult, type DiscoverBehavior, type EntryContext, type ErrorResponse, type Fetcher, type FetcherFormProps, type FetcherSubmitFunction, type FetcherSubmitOptions, type FetcherWithComponents, type FlashSessionData, Form, type FormEncType, type FormMethod, type FormProps, type Future, type GetScrollPositionFunction, type GetScrollRestorationKeyFunction, type HTMLFormMethod, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HashRouter, type HashRouterProps, type HeadersArgs, type HeadersFunction, type HistoryRouterProps, type HtmlLinkDescriptor, type HydrationState, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, type IndexRouteObject, type IndexRouteProps, type InitialEntry, type InstrumentRequestHandlerFunction, type InstrumentRouteFunction, type InstrumentRouterFunction, type InstrumentationClientRouterResult, type InstrumentationHandlerResult, type InstrumentationServerHandlerResult, type IsCookieFunction, type IsSessionFunction, type LayoutRouteProps, type LazyRouteFunction, Link, type LinkDescriptor, type LinkProps, Links, type LinksFunction, type LinksProps, type LoaderFunction, type LoaderFunctionArgs, type Location, MemoryRouter, type MemoryRouterOpts, type MemoryRouterProps, Meta, type MetaArgs, type MetaDescriptor, type MetaFunction, type MiddlewareFunction, NavLink, type NavLinkProps, type NavLinkRenderProps, Navigate, type NavigateFunction, type NavigateOptions, type NavigateProps, type Navigation, type NavigationStates, Action as NavigationType, type Navigator, type NonIndexRouteObject, Outlet, type OutletProps, type PageLinkDescriptor, type ParamKeyValuePair, type ParamParseKey, type Params, type PatchRoutesOnNavigationFunction, type PatchRoutesOnNavigationFunctionArgs, type Path, type PathMatch, type PathParam, type PathPattern, type PathRouteProps, type PrefetchBehavior, PrefetchPageLinks, type RedirectFunction, type Register, type RelativeRoutingType, type RequestHandler, type RevalidationState, Route, type RouteMatch, type RouteObject, type RouteProps, Router$1 as Router, type RouterContext, RouterContextProvider, type RouterFetchOptions, type RouterInit, type RouterNavigateOptions, type RouterProps, RouterProvider, type RouterProviderProps, type RouterState, type RouterSubscriber, Routes, type RoutesProps, type RoutesTestStubProps, Scripts, type ScriptsProps, ScrollRestoration, type ScrollRestorationProps, type ServerBuild, type ServerEntryModule, type ServerInstrumentation, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, type SetURLSearchParams, type ShouldRevalidateFunction, type ShouldRevalidateFunctionArgs, type StaticHandler, type StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, type SubmitFunction, type SubmitOptions, type SubmitTarget, type To, type UIMatch, type AssetsManifest as UNSAFE_AssetsManifest, AwaitContextProvider as UNSAFE_AwaitContextProvider, DataRouterContext as UNSAFE_DataRouterContext, DataRouterDataContext as UNSAFE_DataRouterDataContext, DataRouterNavigationContext as UNSAFE_DataRouterNavigationContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, type DataWithResponseInit as UNSAFE_DataWithResponseInit, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, FetchersContext as UNSAFE_FetchersContext, FrameworkContext as UNSAFE_FrameworkContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteContext as UNSAFE_RouteContext, RouteDiscoveryRuntime as UNSAFE_RouteDiscoveryRuntime, type RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, ViewTransitionContext as UNSAFE_ViewTransitionContext, WithComponentProps as UNSAFE_WithComponentProps, WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps, WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps, createBrowserHistory as UNSAFE_createBrowserHistory, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, createHashHistory as UNSAFE_createHashHistory, createMemoryHistory as UNSAFE_createMemoryHistory, createRouter as UNSAFE_createRouter, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, defaultMapRouteProperties as UNSAFE_defaultMapRouteProperties, getCustomPatchRoutesOnNavigationFunction as UNSAFE_getCustomPatchRoutesOnNavigationFunction, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, invariant as UNSAFE_invariant, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useCustomRouteDiscovery as UNSAFE_useCustomRouteDiscovery, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, withComponentProps as UNSAFE_withComponentProps, withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps, withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps, type URLSearchParamsInit, createBrowserRouter, createContext, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createPath, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, data, generatePath, href, isCookie, isRouteErrorResponse, isSession, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, type BrowserCreateFromReadableStreamFunction as unstable_BrowserCreateFromReadableStreamFunction, type DataStrategyInitiator as unstable_DataStrategyInitiator, type DecodeActionFunction as unstable_DecodeActionFunction, type DecodeFormStateFunction as unstable_DecodeFormStateFunction, type DecodeReplyFunction as unstable_DecodeReplyFunction, type DiscoveryResult as unstable_DiscoveryResult, type EncodeReplyFunction as unstable_EncodeReplyFunction, HistoryRouter as unstable_HistoryRouter, type LoadServerActionFunction as unstable_LoadServerActionFunction, type ManifestMismatchEvent as unstable_ManifestMismatchEvent, type RSCHydratedRouterProps as unstable_RSCHydratedRouterProps, type RSCManifestPayload as unstable_RSCManifestPayload, type RSCMatch as unstable_RSCMatch, type RSCPayload as unstable_RSCPayload, type RSCRenderPayload as unstable_RSCRenderPayload, type RSCRouteConfig as unstable_RSCRouteConfig, type RSCRouteConfigEntry as unstable_RSCRouteConfigEntry, type RSCRouteManifest as unstable_RSCRouteManifest, type RSCRouteMatch as unstable_RSCRouteMatch, RSCStaticRouter as unstable_RSCStaticRouter, type RSCStaticRouterProps as unstable_RSCStaticRouterProps, type RouteDiscoveryOptions as unstable_RouteDiscoveryOptions, type unstable_RouterState, type unstable_RouterStateActiveVariant, type unstable_RouterStatePendingVariant, type SSRCreateFromReadableStreamFunction as unstable_SSRCreateFromReadableStreamFunction, type unstable_SerializesTo, unstable_getRequest, unstable_matchRSCServerRequest, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useRoute as unstable_useRoute, useRouteDiscovery as unstable_useRouteDiscovery, useRouterState as unstable_useRouterState, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v8.3.1
2
+ * react-router v8.5.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -12,15 +12,15 @@
12
12
  import { Action, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, invariant, parsePath } from "./lib/router/history.js";
13
13
  import { ErrorResponseImpl, RouterContextProvider, createContext, data, defaultMapRouteProperties, generatePath, isRouteErrorResponse, matchPath, matchRoutes, redirect, redirectDocument, replace, resolvePath } from "./lib/router/utils.js";
14
14
  import { IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, createRouter, createStaticHandler } from "./lib/router/router.js";
15
- import { AwaitContextProvider, DataRouterContext, DataRouterStateContext, FetchersContext, LocationContext, NavigationContext, RouteContext, ViewTransitionContext } from "./lib/context.js";
15
+ import { AwaitContextProvider, DataRouterContext, DataRouterDataContext, DataRouterNavigationContext, DataRouterStateContext, FetchersContext, LocationContext, NavigationContext, RouteContext, ViewTransitionContext } from "./lib/context.js";
16
16
  import { useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRoute, useRouteError, useRouteLoaderData, useRouterState, useRoutes } from "./lib/hooks.js";
17
- import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, WithComponentProps, WithErrorBoundaryProps, WithHydrateFallbackProps, createMemoryRouter, createRoutesFromChildren, createRoutesFromElements, hydrationRouteProperties, renderMatches, withComponentProps, withErrorBoundaryProps, withHydrateFallbackProps } from "./lib/components.js";
18
- import { createSearchParams } from "./lib/dom/dom.js";
19
17
  import { SingleFetchRedirectSymbol, decodeViaTurboStream, getTurboStreamSingleFetchDataStrategy } from "./lib/dom/ssr/single-fetch.js";
20
18
  import { RemixErrorBoundary } from "./lib/dom/ssr/errorBoundaries.js";
21
19
  import { createClientRoutes, createClientRoutesWithHMRRevalidationOptOut, shouldHydrateRouteLoader } from "./lib/dom/ssr/routes.js";
22
20
  import { getPatchRoutesOnNavigationFunction, useFogOFWarDiscovery } from "./lib/dom/ssr/fog-of-war.js";
23
21
  import { FrameworkContext, Links, Meta, PrefetchPageLinks, Scripts } from "./lib/dom/ssr/components.js";
22
+ import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, WithComponentProps, WithErrorBoundaryProps, WithHydrateFallbackProps, createMemoryRouter, createRoutesFromChildren, createRoutesFromElements, hydrationRouteProperties, renderMatches, withComponentProps, withErrorBoundaryProps, withHydrateFallbackProps } from "./lib/components.js";
23
+ import { createSearchParams } from "./lib/dom/dom.js";
24
24
  import { BrowserRouter, Form, HashRouter, HistoryRouter, Link, NavLink, ScrollRestoration, createBrowserRouter, createHashRouter, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, usePrompt, useScrollRestoration, useSearchParams, useSubmit, useViewTransitionState } from "./lib/dom/lib.js";
25
25
  import { StaticRouter, StaticRouterProvider, createStaticRouter } from "./lib/dom/server.js";
26
26
  import { ServerRouter } from "./lib/dom/ssr/server.js";
@@ -36,10 +36,11 @@ import { href } from "./lib/href.js";
36
36
  import { RSCDefaultRootErrorBoundary } from "./lib/rsc/errorBoundaries.js";
37
37
  import { RSCStaticRouter, routeRSCServerRequest } from "./lib/rsc/server.ssr.js";
38
38
  import { getHydrationData } from "./lib/dom/ssr/hydration.js";
39
+ import { RouteDiscoveryRuntime, getCustomPatchRoutesOnNavigationFunction, useCustomRouteDiscovery, useRouteDiscovery } from "./lib/dom/ssr/route-discovery.js";
39
40
  //#region index.ts
40
41
  /**
41
42
  * @module index
42
43
  * @mergeModuleWith react-router
43
44
  */
44
45
  //#endregion
45
- export { Await, BrowserRouter, Form, HashRouter, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, Link, Links, MemoryRouter, Meta, NavLink, Navigate, Action as NavigationType, Outlet, PrefetchPageLinks, Route, Router, RouterContextProvider, RouterProvider, Routes, Scripts, ScrollRestoration, ServerRouter, StaticRouter, StaticRouterProvider, AwaitContextProvider as UNSAFE_AwaitContextProvider, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, FetchersContext as UNSAFE_FetchersContext, FrameworkContext as UNSAFE_FrameworkContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteContext as UNSAFE_RouteContext, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, ViewTransitionContext as UNSAFE_ViewTransitionContext, WithComponentProps as UNSAFE_WithComponentProps, WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps, WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps, createBrowserHistory as UNSAFE_createBrowserHistory, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, createHashHistory as UNSAFE_createHashHistory, createMemoryHistory as UNSAFE_createMemoryHistory, createRouter as UNSAFE_createRouter, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, defaultMapRouteProperties as UNSAFE_defaultMapRouteProperties, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, invariant as UNSAFE_invariant, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, withComponentProps as UNSAFE_withComponentProps, withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps, withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps, createBrowserRouter, createContext, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createPath, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, data, generatePath, href, isCookie, isRouteErrorResponse, isSession, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, HistoryRouter as unstable_HistoryRouter, RSCStaticRouter as unstable_RSCStaticRouter, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useRoute as unstable_useRoute, useRouterState as unstable_useRouterState, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
46
+ export { Await, BrowserRouter, Form, HashRouter, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, Link, Links, MemoryRouter, Meta, NavLink, Navigate, Action as NavigationType, Outlet, PrefetchPageLinks, Route, Router, RouterContextProvider, RouterProvider, Routes, Scripts, ScrollRestoration, ServerRouter, StaticRouter, StaticRouterProvider, AwaitContextProvider as UNSAFE_AwaitContextProvider, DataRouterContext as UNSAFE_DataRouterContext, DataRouterDataContext as UNSAFE_DataRouterDataContext, DataRouterNavigationContext as UNSAFE_DataRouterNavigationContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, FetchersContext as UNSAFE_FetchersContext, FrameworkContext as UNSAFE_FrameworkContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteContext as UNSAFE_RouteContext, RouteDiscoveryRuntime as UNSAFE_RouteDiscoveryRuntime, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, ViewTransitionContext as UNSAFE_ViewTransitionContext, WithComponentProps as UNSAFE_WithComponentProps, WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps, WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps, createBrowserHistory as UNSAFE_createBrowserHistory, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, createHashHistory as UNSAFE_createHashHistory, createMemoryHistory as UNSAFE_createMemoryHistory, createRouter as UNSAFE_createRouter, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, defaultMapRouteProperties as UNSAFE_defaultMapRouteProperties, getCustomPatchRoutesOnNavigationFunction as UNSAFE_getCustomPatchRoutesOnNavigationFunction, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, invariant as UNSAFE_invariant, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useCustomRouteDiscovery as UNSAFE_useCustomRouteDiscovery, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, withComponentProps as UNSAFE_withComponentProps, withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps, withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps, createBrowserRouter, createContext, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createPath, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, data, generatePath, href, isCookie, isRouteErrorResponse, isSession, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, HistoryRouter as unstable_HistoryRouter, RSCStaticRouter as unstable_RSCStaticRouter, routeRSCServerRequest as unstable_routeRSCServerRequest, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useRoute as unstable_useRoute, useRouteDiscovery as unstable_useRouteDiscovery, useRouterState as unstable_useRouterState, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v8.3.1
2
+ * react-router v8.5.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *