react-router 0.0.0-experimental-320d16107 → 0.0.0-experimental-7aea711dd

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 (147) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/development/dom-export.js +1 -1
  3. package/dist/development/index-react-server-client.js +1 -1
  4. package/dist/development/index-react-server.d.ts +13 -27
  5. package/dist/development/index-react-server.js +112 -96
  6. package/dist/development/index.d.ts +2 -2
  7. package/dist/development/index.js +3 -3
  8. package/dist/development/lib/actions.js +10 -5
  9. package/dist/development/lib/components.js +45 -6
  10. package/dist/development/lib/context.d.ts +14 -5
  11. package/dist/development/lib/context.js +11 -3
  12. package/dist/development/lib/dom/dom.js +1 -1
  13. package/dist/development/lib/dom/lib.js +29 -32
  14. package/dist/development/lib/dom/server.js +33 -11
  15. package/dist/development/lib/dom/ssr/components.js +12 -19
  16. package/dist/development/lib/dom/ssr/data.js +1 -1
  17. package/dist/development/lib/dom/ssr/entry.d.ts +4 -0
  18. package/dist/development/lib/dom/ssr/errorBoundaries.js +1 -1
  19. package/dist/development/lib/dom/ssr/fallback.js +1 -1
  20. package/dist/development/lib/dom/ssr/fog-of-war.js +2 -1
  21. package/dist/development/lib/dom/ssr/hydration.js +1 -1
  22. package/dist/development/lib/dom/ssr/invariant.js +1 -1
  23. package/dist/development/lib/dom/ssr/links.js +1 -1
  24. package/dist/development/lib/dom/ssr/markup.js +1 -1
  25. package/dist/development/lib/dom/ssr/routeModules.js +1 -1
  26. package/dist/development/lib/dom/ssr/routes-test-stub.js +1 -1
  27. package/dist/development/lib/dom/ssr/routes.js +1 -1
  28. package/dist/development/lib/dom/ssr/server.js +1 -1
  29. package/dist/development/lib/dom/ssr/single-fetch.js +1 -1
  30. package/dist/development/lib/dom-export/dom-router-provider.js +1 -1
  31. package/dist/development/lib/dom-export/hydrated-router.js +1 -1
  32. package/dist/development/lib/errors.js +1 -1
  33. package/dist/development/lib/hooks.js +50 -45
  34. package/dist/development/lib/href.js +1 -1
  35. package/dist/development/lib/router/history.js +1 -1
  36. package/dist/development/lib/router/instrumentation.js +1 -1
  37. package/dist/development/lib/router/matcher-route-pattern.js +63 -54
  38. package/dist/development/lib/router/matcher.js +1 -2
  39. package/dist/development/lib/router/navigation.js +45 -0
  40. package/dist/development/lib/router/router.d.ts +14 -4
  41. package/dist/development/lib/router/router.js +39 -18
  42. package/dist/development/lib/router/url.js +1 -1
  43. package/dist/development/lib/router/utils.js +10 -6
  44. package/dist/development/lib/rsc/browser.js +4 -1
  45. package/dist/development/lib/rsc/errorBoundaries.js +1 -1
  46. package/dist/development/lib/rsc/html-stream/browser.js +1 -1
  47. package/dist/development/lib/rsc/html-stream/server.js +1 -1
  48. package/dist/development/lib/rsc/route-modules.js +1 -1
  49. package/dist/development/lib/rsc/server.ssr.js +22 -18
  50. package/dist/development/lib/server-runtime/cookies.js +1 -1
  51. package/dist/development/lib/server-runtime/crypto.js +1 -1
  52. package/dist/development/lib/server-runtime/data.js +1 -1
  53. package/dist/development/lib/server-runtime/dev.js +1 -1
  54. package/dist/development/lib/server-runtime/entry.js +1 -1
  55. package/dist/development/lib/server-runtime/errors.js +1 -1
  56. package/dist/development/lib/server-runtime/headers.js +1 -1
  57. package/dist/development/lib/server-runtime/invariant.js +1 -1
  58. package/dist/development/lib/server-runtime/mode.js +1 -1
  59. package/dist/development/lib/server-runtime/routeMatching.js +3 -3
  60. package/dist/development/lib/server-runtime/routes.js +1 -1
  61. package/dist/development/lib/server-runtime/server.js +8 -9
  62. package/dist/development/lib/server-runtime/serverHandoff.js +1 -1
  63. package/dist/development/lib/server-runtime/sessions/cookieStorage.js +1 -1
  64. package/dist/development/lib/server-runtime/sessions/memoryStorage.js +1 -1
  65. package/dist/development/lib/server-runtime/sessions.js +1 -1
  66. package/dist/development/lib/server-runtime/single-fetch.js +1 -1
  67. package/dist/development/lib/server-runtime/urls.js +1 -1
  68. package/dist/development/lib/server-runtime/warnings.js +1 -1
  69. package/dist/development/lib/types/internal.js +1 -1
  70. package/dist/development/vendor/turbo-stream-v2/flatten.js +1 -1
  71. package/dist/development/vendor/turbo-stream-v2/turbo-stream.js +1 -1
  72. package/dist/development/vendor/turbo-stream-v2/unflatten.js +1 -1
  73. package/dist/development/vendor/turbo-stream-v2/utils.js +1 -1
  74. package/dist/production/dom-export.js +1 -1
  75. package/dist/production/index-react-server-client.js +1 -1
  76. package/dist/production/index-react-server.d.ts +13 -27
  77. package/dist/production/index-react-server.js +112 -96
  78. package/dist/production/index.d.ts +2 -2
  79. package/dist/production/index.js +3 -3
  80. package/dist/production/lib/actions.js +10 -5
  81. package/dist/production/lib/components.js +45 -6
  82. package/dist/production/lib/context.d.ts +14 -5
  83. package/dist/production/lib/context.js +11 -3
  84. package/dist/production/lib/dom/dom.js +1 -1
  85. package/dist/production/lib/dom/lib.js +29 -32
  86. package/dist/production/lib/dom/server.js +33 -11
  87. package/dist/production/lib/dom/ssr/components.js +12 -19
  88. package/dist/production/lib/dom/ssr/data.js +1 -1
  89. package/dist/production/lib/dom/ssr/entry.d.ts +4 -0
  90. package/dist/production/lib/dom/ssr/errorBoundaries.js +1 -1
  91. package/dist/production/lib/dom/ssr/fallback.js +1 -1
  92. package/dist/production/lib/dom/ssr/fog-of-war.js +2 -1
  93. package/dist/production/lib/dom/ssr/hydration.js +1 -1
  94. package/dist/production/lib/dom/ssr/invariant.js +1 -1
  95. package/dist/production/lib/dom/ssr/links.js +1 -1
  96. package/dist/production/lib/dom/ssr/markup.js +1 -1
  97. package/dist/production/lib/dom/ssr/routeModules.js +1 -1
  98. package/dist/production/lib/dom/ssr/routes-test-stub.js +1 -1
  99. package/dist/production/lib/dom/ssr/routes.js +1 -1
  100. package/dist/production/lib/dom/ssr/server.js +1 -1
  101. package/dist/production/lib/dom/ssr/single-fetch.js +1 -1
  102. package/dist/production/lib/dom-export/dom-router-provider.js +1 -1
  103. package/dist/production/lib/dom-export/hydrated-router.js +1 -1
  104. package/dist/production/lib/errors.js +1 -1
  105. package/dist/production/lib/hooks.js +50 -45
  106. package/dist/production/lib/href.js +1 -1
  107. package/dist/production/lib/router/history.js +1 -1
  108. package/dist/production/lib/router/instrumentation.js +1 -1
  109. package/dist/production/lib/router/matcher-route-pattern.js +63 -54
  110. package/dist/production/lib/router/matcher.js +1 -2
  111. package/dist/production/lib/router/navigation.js +45 -0
  112. package/dist/production/lib/router/router.d.ts +14 -4
  113. package/dist/production/lib/router/router.js +39 -18
  114. package/dist/production/lib/router/url.js +1 -1
  115. package/dist/production/lib/router/utils.js +10 -6
  116. package/dist/production/lib/rsc/browser.js +4 -1
  117. package/dist/production/lib/rsc/errorBoundaries.js +1 -1
  118. package/dist/production/lib/rsc/html-stream/browser.js +1 -1
  119. package/dist/production/lib/rsc/html-stream/server.js +1 -1
  120. package/dist/production/lib/rsc/route-modules.js +1 -1
  121. package/dist/production/lib/rsc/server.ssr.js +22 -18
  122. package/dist/production/lib/server-runtime/cookies.js +1 -1
  123. package/dist/production/lib/server-runtime/crypto.js +1 -1
  124. package/dist/production/lib/server-runtime/data.js +1 -1
  125. package/dist/production/lib/server-runtime/dev.js +1 -1
  126. package/dist/production/lib/server-runtime/entry.js +1 -1
  127. package/dist/production/lib/server-runtime/errors.js +1 -1
  128. package/dist/production/lib/server-runtime/headers.js +1 -1
  129. package/dist/production/lib/server-runtime/invariant.js +1 -1
  130. package/dist/production/lib/server-runtime/mode.js +1 -1
  131. package/dist/production/lib/server-runtime/routeMatching.js +3 -3
  132. package/dist/production/lib/server-runtime/routes.js +1 -1
  133. package/dist/production/lib/server-runtime/server.js +8 -9
  134. package/dist/production/lib/server-runtime/serverHandoff.js +1 -1
  135. package/dist/production/lib/server-runtime/sessions/cookieStorage.js +1 -1
  136. package/dist/production/lib/server-runtime/sessions/memoryStorage.js +1 -1
  137. package/dist/production/lib/server-runtime/sessions.js +1 -1
  138. package/dist/production/lib/server-runtime/single-fetch.js +1 -1
  139. package/dist/production/lib/server-runtime/urls.js +1 -1
  140. package/dist/production/lib/server-runtime/warnings.js +1 -1
  141. package/dist/production/lib/types/internal.js +1 -1
  142. package/dist/production/vendor/turbo-stream-v2/flatten.js +1 -1
  143. package/dist/production/vendor/turbo-stream-v2/turbo-stream.js +1 -1
  144. package/dist/production/vendor/turbo-stream-v2/unflatten.js +1 -1
  145. package/dist/production/vendor/turbo-stream-v2/utils.js +1 -1
  146. package/docs/upgrading/future.md +47 -0
  147. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # `react-router`
2
2
 
3
+ ## v8.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix `Expected fetcher: <key>` error thrown on navigation when a fetcher is aborted during its post-action revalidation ([#15365](https://github.com/remix-run/react-router/pull/15365))
8
+ - Fix lazy route discovery caching a path as discovered when the triggering navigation was aborted after the manifest response settled but before the route tree was patched, which permanently (for the session) shadowed the real route behind a catch-all or produced 404s on every subsequent visit ([#15399](https://github.com/remix-run/react-router/pull/15399))
9
+ - Improve route matching performance for long paths ([#15417](https://github.com/remix-run/react-router/pull/15417))
10
+ - Improve validation of action request origins ([#15419](https://github.com/remix-run/react-router/pull/15419))
11
+ - Fix `<ScrollRestoration>` leaving `history.scrollRestoration` set to `"auto"` after a bfcache restore, which let the browser restore scroll on subsequent history traversals before the destination route had rendered ([#15397](https://github.com/remix-run/react-router/pull/15397))
12
+ - Properly respect the `relative` option in `useSubmit`/`fetcher.submit` when resolivng the `action` path ([#15400](https://github.com/remix-run/react-router/pull/15400))
13
+ - Add additional URL validation on client side navigations/redirects ([#15445](https://github.com/remix-run/react-router/pull/15445))
14
+
3
15
  ## v8.3.0
4
16
 
5
17
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-320d16107
2
+ * react-router v0.0.0-experimental-7aea711dd
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-320d16107
2
+ * react-router v0.0.0-experimental-7aea711dd
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -816,30 +816,6 @@ interface UIMatch<Data = unknown, Handle = unknown> {
816
816
  */
817
817
  handle: Handle;
818
818
  }
819
- interface RouteMeta<RouteObjectType extends RouteObject = RouteObject> {
820
- relativePath: string;
821
- caseSensitive: boolean;
822
- childrenIndex: number;
823
- route: RouteObjectType;
824
- matcher?: RegExp;
825
- compiledParams?: CompiledPathParam[];
826
- }
827
- /**
828
- * @private
829
- * PRIVATE - DO NOT USE
830
- *
831
- * A "branch" of routes that match a given route pattern.
832
- * This is an internal interface not intended for direct external usage.
833
- */
834
- interface RouteBranch<RouteObjectType extends RouteObject = RouteObject> {
835
- path: string;
836
- score: number;
837
- routesMeta: RouteMeta<RouteObjectType>[];
838
- }
839
- type CompiledPathParam = {
840
- paramName: string;
841
- isOptional?: boolean;
842
- };
843
819
  declare class DataWithResponseInit<D> {
844
820
  type: string;
845
821
  data: D;
@@ -1237,6 +1213,14 @@ interface Router$1 {
1237
1213
  * @param location
1238
1214
  */
1239
1215
  createHref(location: Location$1 | URL): string;
1216
+ /**
1217
+ * @private
1218
+ * PRIVATE - DO NOT USE
1219
+ *
1220
+ * Utility function to create a URL for the given location
1221
+ * @param location
1222
+ */
1223
+ createURL?(to: To): URL;
1240
1224
  /**
1241
1225
  * @private
1242
1226
  * PRIVATE - DO NOT USE
@@ -1439,6 +1423,8 @@ interface StaticHandlerContext {
1439
1423
  loaderHeaders: Record<string, Headers>;
1440
1424
  actionHeaders: Record<string, Headers>;
1441
1425
  _deepestRenderedBoundaryId?: string | null;
1426
+ /** @private */
1427
+ _match: StaticHandler["match"];
1442
1428
  }
1443
1429
  /**
1444
1430
  * A StaticHandler instance manages a singular SSR navigation/fetch event
@@ -1452,10 +1438,10 @@ interface StaticHandler {
1452
1438
  * @private
1453
1439
  * PRIVATE - DO NOT USE
1454
1440
  *
1455
- * The route branches derived from the data routes, used for internal route
1456
- * matching in Framework Mode
1441
+ * Match routes against a location using the handler's configured route
1442
+ * matching implementation.
1457
1443
  */
1458
- _internalRouteBranches: RouteBranch<DataRouteObject>[];
1444
+ match(locationArg: Partial<Location$1> | string): DataRouteMatch[] | null;
1459
1445
  /**
1460
1446
  * Perform a query for a given request - executing all matched route
1461
1447
  * loaders/actions. Used for document requests.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-320d16107
2
+ * react-router v0.0.0-experimental-7aea711dd
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -11,6 +11,7 @@
11
11
  import { AsyncLocalStorage } from "node:async_hooks";
12
12
  import * as React from "react";
13
13
  import { createMultiMatcher } from "@remix-run/route-pattern/match";
14
+ import { descending } from "@remix-run/route-pattern/specificity";
14
15
  import { parse, serialize, splitSetCookieString } from "cookie-es";
15
16
  import { BrowserRouter, Form, HashRouter, Link, Links, MemoryRouter, Meta, NavLink, Navigate, Outlet, Outlet as Outlet$1, Route, Router, RouterProvider, Routes, ScrollRestoration, StaticRouter, StaticRouterProvider, UNSAFE_AwaitContextProvider, UNSAFE_WithComponentProps, UNSAFE_WithErrorBoundaryProps, UNSAFE_WithHydrateFallbackProps, unstable_HistoryRouter } from "react-router/internal/react-server-client";
16
17
  //#region lib/router/url.ts
@@ -518,13 +519,13 @@ function matchPathImpl(pattern, pathname, matcher, compiledParams) {
518
519
  let match = pathname.match(matcher);
519
520
  if (!match) return null;
520
521
  let matchedPathname = match[0];
521
- let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
522
+ let pathnameBase = removeTrailingSlash(matchedPathname, 1);
522
523
  let captureGroups = match.slice(1);
523
524
  return {
524
525
  params: compiledParams.reduce((memo, { paramName, isOptional }, index) => {
525
526
  if (paramName === "*") {
526
527
  let splatValue = captureGroups[index] || "";
527
- pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
528
+ pathnameBase = removeTrailingSlash(matchedPathname.slice(0, matchedPathname.length - splatValue.length), 1);
528
529
  }
529
530
  const value = captureGroups[index];
530
531
  if (isOptional && !value) memo[paramName] = void 0;
@@ -593,7 +594,7 @@ function resolvePath(to, fromPathname = "/") {
593
594
  let pathname;
594
595
  if (toPathname) {
595
596
  toPathname = removeDoubleSlashes(toPathname);
596
- if (toPathname.startsWith("/")) pathname = resolvePathname(toPathname.substring(1), "/");
597
+ if (toPathname.startsWith("/") || toPathname.startsWith("\\")) pathname = resolvePathname(toPathname.substring(1), "/");
597
598
  else pathname = resolvePathname(toPathname, fromPathname);
598
599
  } else pathname = fromPathname;
599
600
  return {
@@ -654,7 +655,11 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
654
655
  }
655
656
  const removeDoubleSlashes = (path) => path.replace(/[\\/]{2,}/g, "/");
656
657
  const joinPaths = (paths) => removeDoubleSlashes(paths.join("/"));
657
- const removeTrailingSlash = (path) => path.replace(/\/+$/, "");
658
+ function removeTrailingSlash(path, minLength = 0) {
659
+ let end = path.length;
660
+ while (end > minLength && path.charCodeAt(end - 1) === 47) end--;
661
+ return end === path.length ? path : path.slice(0, end);
662
+ }
658
663
  const normalizePathname = (pathname) => removeTrailingSlash(pathname).replace(/^\/*/, "/");
659
664
  const normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
660
665
  const normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
@@ -1048,8 +1053,8 @@ var RoutePatternDataRouteMatcher = class {
1048
1053
  }
1049
1054
  update(routes) {
1050
1055
  let branches = flattenRoutes(routes);
1051
- let matcher = createMultiMatcher();
1052
- let partialMatcher = createMultiMatcher();
1056
+ let matcher = createMultiMatcher({ ignoreCase: true });
1057
+ let partialMatcher = createMultiMatcher({ ignoreCase: true });
1053
1058
  for (let branch of branches) {
1054
1059
  let routePattern = convertReactRouterPathToRoutePattern(branch.path);
1055
1060
  validateRoutePatternSplat(branch.path, routePattern);
@@ -1068,12 +1073,13 @@ var RoutePatternDataRouteMatcher = class {
1068
1073
  let pathname = stripBasename((typeof locationArg === "string" ? parsePath(locationArg) : locationArg).pathname || "/", this.#basename);
1069
1074
  if (pathname == null) return null;
1070
1075
  let decoded = decodePath(pathname);
1071
- let url = new URL(decoded, "http://reactrouter.local");
1076
+ let url = new URL("http://reactrouter.local");
1077
+ url.pathname = pathname;
1072
1078
  invariant$1(this.#state, "Route pattern routes must be initialized before matching.");
1073
1079
  let matches = this.#state.matcher.matchAll(url);
1074
1080
  if (allowPartial) matches.push(...this.#state.partialMatcher.matchAll(url));
1075
1081
  for (let match of prioritizeValidatedMatches(matches)) {
1076
- let routeMatches = convertRoutePatternMatchToRouteMatches(match, pathname, allowPartial);
1082
+ let routeMatches = convertRoutePatternMatchToRouteMatches(match, decoded, allowPartial);
1077
1083
  if (routeMatches && validateRouteMatchParams(routeMatches)) return routeMatches;
1078
1084
  }
1079
1085
  return null;
@@ -1119,12 +1125,15 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "")
1119
1125
  childrenIndex: index,
1120
1126
  route
1121
1127
  };
1128
+ let absolutePath;
1122
1129
  if (meta.relativePath.startsWith("/")) {
1123
- invariant$1(meta.relativePath.startsWith(parentPath), `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`);
1124
- meta.relativePath = meta.relativePath.slice(parentPath.length);
1130
+ absolutePath = meta.relativePath;
1131
+ let parentPathMatch = explodeOptionalSegments(parentPath).find((path) => meta.relativePath.startsWith(path));
1132
+ invariant$1(parentPathMatch != null, `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`);
1133
+ meta.relativePath = meta.relativePath.slice(parentPathMatch.length);
1125
1134
  }
1126
1135
  let routesMeta = parentsMeta.concat(meta);
1127
- let path = meta.relativePath ? joinPaths([parentPath, meta.relativePath]) : parentPath;
1136
+ let path = absolutePath ?? (meta.relativePath ? joinPaths([parentPath, meta.relativePath]) : parentPath);
1128
1137
  if (route.children && route.children.length > 0) {
1129
1138
  invariant$1(route.index !== true, `Index routes must not have child routes. Please remove all child routes from route path "${path}".`);
1130
1139
  flattenRoutes(route.children, branches, routesMeta, path);
@@ -1181,55 +1190,59 @@ function validateRouteMatchParams(matches) {
1181
1190
  return matches.every(({ route, params }) => route.unstable_validateParams == null || Object.keys(route.unstable_validateParams).length === 0 || Object.entries(route.unstable_validateParams).every(([param, re]) => params[param] != null ? new RegExp(re.source, re.flags).test(params[param]) : true));
1182
1191
  }
1183
1192
  function prioritizeValidatedMatches(matches) {
1184
- let validatedMatches = [];
1185
- let unvalidatedMatches = [];
1186
- for (let match of matches) if (match.data.routesMeta.some((meta) => meta.route.unstable_validateParams != null && Object.keys(meta.route.unstable_validateParams).length > 0)) validatedMatches.push(match);
1187
- else unvalidatedMatches.push(match);
1188
- return validatedMatches.concat(unvalidatedMatches);
1193
+ return matches.sort((a, b) => {
1194
+ let specificity = descending(a, b);
1195
+ if (specificity !== 0) return specificity;
1196
+ return Number(hasParamValidators(b)) - Number(hasParamValidators(a));
1197
+ });
1198
+ }
1199
+ function hasParamValidators(match) {
1200
+ return match.data.routesMeta.some((meta) => meta.route.unstable_validateParams != null && Object.keys(meta.route.unstable_validateParams).length > 0);
1189
1201
  }
1190
1202
  function convertRoutePatternMatchToRouteMatches(match, pathname, allowPartial) {
1191
- let pathSegments = pathname.replace(/^\//, "").split("/").filter(Boolean);
1192
- let splatParamName = match.paramsMeta.pathname.find((meta) => meta.type === "*")?.name;
1193
- let matchedParams = Object.entries(match.params).reduce((params, [key, value]) => {
1194
- if (key === "__rr_partial" || value === void 0) return params;
1195
- params[key === "__rr_splat" || key === splatParamName ? "*" : key] = value;
1196
- return params;
1197
- }, {});
1198
- let consumedSegments = 0;
1199
- let matches = [];
1200
- for (let i = 0; i < match.data.routesMeta.length; i++) {
1201
- let meta = match.data.routesMeta[i];
1202
- let splatBaseSegments = null;
1203
- let routeSegments = meta.relativePath.replace(/^\//, "").split("/").filter(Boolean);
1204
- for (let segment of routeSegments) {
1205
- if (segment === "*") {
1206
- splatBaseSegments = consumedSegments;
1207
- consumedSegments = pathSegments.length;
1208
- break;
1209
- }
1210
- if (segment.endsWith("?")) {
1211
- let routeSegment = segment.slice(0, -1);
1212
- if (routeSegment.startsWith(":")) {
1213
- if (matchedParams[routeSegment.slice(1)] !== void 0) consumedSegments++;
1214
- } else if (pathSegments[consumedSegments] === routeSegment) consumedSegments++;
1215
- continue;
1216
- }
1217
- consumedSegments++;
1218
- }
1219
- let routePathname = getRoutePatternMatchPathname(pathSegments, consumedSegments);
1220
- let pathnameBase = splatBaseSegments == null ? routePathname : getRoutePatternMatchPathname(pathSegments, splatBaseSegments);
1221
- matches.push({
1222
- params: matchedParams,
1223
- pathname: routePathname,
1224
- pathnameBase,
1203
+ let result = matchRoutePatternBranch(match.data, pathname, allowPartial, 0, "/", {});
1204
+ if (result == null) return null;
1205
+ for (let routeMatch of result.matches) routeMatch.params = result.params;
1206
+ return result.matches;
1207
+ }
1208
+ function matchRoutePatternBranch(branch, pathname, allowPartial, metaIndex, matchedPathname, matchedParams) {
1209
+ let meta = branch.routesMeta[metaIndex];
1210
+ let end = metaIndex === branch.routesMeta.length - 1;
1211
+ let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
1212
+ for (let relativePath of explodeOptionalSegments(meta.relativePath)) {
1213
+ let pattern = {
1214
+ path: relativePath,
1215
+ caseSensitive: false,
1216
+ end
1217
+ };
1218
+ let pathMatch = matchPath(pattern, remainingPathname);
1219
+ if (!pathMatch && end && allowPartial && !meta.route.index) pathMatch = matchPath({
1220
+ ...pattern,
1221
+ end: false
1222
+ }, remainingPathname);
1223
+ if (!pathMatch) continue;
1224
+ let params = {
1225
+ ...matchedParams,
1226
+ ...pathMatch.params
1227
+ };
1228
+ let routeMatch = {
1229
+ params,
1230
+ pathname: joinPaths([matchedPathname, pathMatch.pathname]),
1231
+ pathnameBase: normalizePathname(joinPaths([matchedPathname, pathMatch.pathnameBase])),
1225
1232
  route: meta.route
1226
- });
1233
+ };
1234
+ let nextMatchedPathname = pathMatch.pathnameBase === "/" ? matchedPathname : joinPaths([matchedPathname, pathMatch.pathnameBase]);
1235
+ if (end) return {
1236
+ matches: [routeMatch],
1237
+ params
1238
+ };
1239
+ let childResult = matchRoutePatternBranch(branch, pathname, allowPartial, metaIndex + 1, nextMatchedPathname, params);
1240
+ if (childResult) return {
1241
+ matches: [routeMatch, ...childResult.matches],
1242
+ params: childResult.params
1243
+ };
1227
1244
  }
1228
- if (!allowPartial && pathSegments.length > consumedSegments && !match.data.routesMeta[match.data.routesMeta.length - 1].route.index) return null;
1229
- return matches;
1230
- }
1231
- function getRoutePatternMatchPathname(pathSegments, consumedSegments) {
1232
- return consumedSegments === 0 ? "/" : `/${pathSegments.slice(0, consumedSegments).join("/")}`;
1245
+ return null;
1233
1246
  }
1234
1247
  //#endregion
1235
1248
  //#region lib/router/matcher.ts
@@ -1243,7 +1256,6 @@ var V6RegExMatcher = class {
1243
1256
  update(routes) {
1244
1257
  this.#routes = routes;
1245
1258
  this.#branches = flattenAndRankRoutes(routes);
1246
- return this.#branches;
1247
1259
  }
1248
1260
  match(locationArg, allowPartial = false) {
1249
1261
  return matchRoutesImpl(this.#routes, locationArg, this.#basename, allowPartial, this.#branches);
@@ -1318,7 +1330,8 @@ function createStaticHandler(routes, opts) {
1318
1330
  };
1319
1331
  }
1320
1332
  let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, void 0, manifest);
1321
- let routeBranches = dataRouteMatcher.update(dataRoutes);
1333
+ dataRouteMatcher.update(dataRoutes);
1334
+ let match = (locationArg) => dataRouteMatcher.match(locationArg);
1322
1335
  /**
1323
1336
  * The query() method is intended for document requests, in which we want to
1324
1337
  * call an optional action and potentially multiple loaders for all nested
@@ -1363,7 +1376,8 @@ function createStaticHandler(routes, opts) {
1363
1376
  errors: { [route.id]: error },
1364
1377
  statusCode: error.status,
1365
1378
  loaderHeaders: {},
1366
- actionHeaders: {}
1379
+ actionHeaders: {},
1380
+ _match: match
1367
1381
  };
1368
1382
  return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;
1369
1383
  } else if (!matches) {
@@ -1378,7 +1392,8 @@ function createStaticHandler(routes, opts) {
1378
1392
  errors: { [route.id]: error },
1379
1393
  statusCode: error.status,
1380
1394
  loaderHeaders: {},
1381
- actionHeaders: {}
1395
+ actionHeaders: {},
1396
+ _match: match
1382
1397
  };
1383
1398
  return generateMiddlewareResponse ? generateMiddlewareResponse(() => Promise.resolve(staticContext)) : staticContext;
1384
1399
  }
@@ -1401,7 +1416,8 @@ function createStaticHandler(routes, opts) {
1401
1416
  renderedStaticContext = {
1402
1417
  location,
1403
1418
  basename,
1404
- ...result
1419
+ ...result,
1420
+ _match: match
1405
1421
  };
1406
1422
  return renderedStaticContext;
1407
1423
  });
@@ -1427,7 +1443,8 @@ function createStaticHandler(routes, opts) {
1427
1443
  errors: { [skipLoaderErrorBubbling ? routeId : findNearestBoundary(matches, matches.find((m) => m.route.id === routeId || m.route.loader)?.route.id || routeId).route.id]: error },
1428
1444
  statusCode: isRouteErrorResponse(error) ? error.status : 500,
1429
1445
  actionHeaders: {},
1430
- loaderHeaders: {}
1446
+ loaderHeaders: {},
1447
+ _match: match
1431
1448
  };
1432
1449
  return generateMiddlewareResponse(() => Promise.resolve(staticContext));
1433
1450
  }
@@ -1444,7 +1461,8 @@ function createStaticHandler(routes, opts) {
1444
1461
  return {
1445
1462
  location,
1446
1463
  basename,
1447
- ...result
1464
+ ...result,
1465
+ _match: match
1448
1466
  };
1449
1467
  }
1450
1468
  /**
@@ -1658,7 +1676,7 @@ function createStaticHandler(routes, opts) {
1658
1676
  }
1659
1677
  return {
1660
1678
  dataRoutes,
1661
- _internalRouteBranches: routeBranches,
1679
+ match,
1662
1680
  query,
1663
1681
  queryRoute
1664
1682
  };
@@ -2434,14 +2452,19 @@ function getPathsWithAncestors(paths) {
2434
2452
  function throwIfPotentialCSRFAttack(request, allowedActionOrigins) {
2435
2453
  let originHeader = request.headers.get("origin");
2436
2454
  let originDomain = null;
2455
+ let originUrl = null;
2437
2456
  try {
2438
- originDomain = typeof originHeader === "string" && originHeader !== "null" ? new URL(originHeader).host : originHeader;
2457
+ if (typeof originHeader === "string" && originHeader !== "null") {
2458
+ originUrl = new URL(originHeader);
2459
+ originDomain = originUrl.host;
2460
+ } else originDomain = originHeader;
2439
2461
  } catch {
2440
2462
  throw new Error(`\`origin\` header is not a valid URL. Aborting the action.`);
2441
2463
  }
2442
- let host = new URL(request.url).host;
2443
- if (originDomain && originDomain !== host) {
2444
- if (!isAllowedOrigin(originDomain, allowedActionOrigins)) throw new Error("The `request.url` host does not match `origin` header from a forwarded action request. Aborting the action.");
2464
+ let requestUrl = new URL(request.url);
2465
+ let originMatchesRequest = originUrl ? originUrl.origin === requestUrl.origin : originDomain === requestUrl.host;
2466
+ if (originDomain && !originMatchesRequest) {
2467
+ if (!isAllowedOrigin(originDomain, allowedActionOrigins)) throw new Error("The `request.url` origin does not match `origin` header from a forwarded action request. Aborting the action.");
2445
2468
  }
2446
2469
  }
2447
2470
  function matchWildcardDomain(domain, pattern) {
@@ -2538,11 +2561,6 @@ const Await = (async ({ children, resolve, errorElement }) => {
2538
2561
  }
2539
2562
  });
2540
2563
  });
2541
- function createRSCDataRouteMatcher(routes, basename) {
2542
- let dataRouteMatcher = createDataRouteMatcher({}, basename ?? "/");
2543
- dataRouteMatcher.update(routes);
2544
- return dataRouteMatcher;
2545
- }
2546
2564
  /**
2547
2565
  * Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
2548
2566
  * and returns an [RSC](https://react.dev/reference/rsc/server-components)
@@ -2637,11 +2655,12 @@ async function matchRSCServerRequest({ allowedActionOrigins, createTemporaryRefe
2637
2655
  const requestUrl = new URL(request.url);
2638
2656
  if (isManifestRequest(requestUrl)) return await generateManifestResponse(routes, basename, request, generateResponse, temporaryReferences, routeDiscovery, clientVersion);
2639
2657
  let isDataRequest = isReactServerRequest(requestUrl);
2640
- let matches = createRSCDataRouteMatcher(routes, basename).match(url.pathname);
2658
+ let staticHandler = createStaticHandler(routes, { basename });
2659
+ let matches = staticHandler.match(url.pathname);
2641
2660
  if (matches) await Promise.all(matches.map((m) => explodeLazyRoute(m.route)));
2642
2661
  const leafMatch = matches?.[matches.length - 1];
2643
- if (!isDataRequest && leafMatch && !leafMatch.route.Component && !leafMatch.route.ErrorBoundary) return generateResourceResponse(routerRequest, routes, basename, leafMatch.route.id, requestContext, onError);
2644
- let response = await generateRenderResponse(routerRequest, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion);
2662
+ if (!isDataRequest && leafMatch && !leafMatch.route.Component && !leafMatch.route.ErrorBoundary) return generateResourceResponse(routerRequest, staticHandler, leafMatch.route.id, requestContext, onError);
2663
+ let response = await generateRenderResponse(routerRequest, staticHandler, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion);
2645
2664
  response.headers.set("X-Remix-Response", "yes");
2646
2665
  return response;
2647
2666
  }
@@ -2674,10 +2693,10 @@ async function generateManifestResponse(routes, basename, request, generateRespo
2674
2693
  }
2675
2694
  let pathParam = url.searchParams.get("paths");
2676
2695
  let pathnames = pathParam ? pathParam.split(",").filter(Boolean) : [url.pathname.replace(/\.manifest$/, "")];
2677
- let dataRouteMatcher = createRSCDataRouteMatcher(routes, basename);
2696
+ let staticHandler = routes.length > 0 ? createStaticHandler(routes, { basename }) : void 0;
2678
2697
  let routeIds = /* @__PURE__ */ new Set();
2679
- let matchedRoutes = pathnames.flatMap((pathname) => {
2680
- let pathnameMatches = dataRouteMatcher.match(pathname);
2698
+ let matchedRoutes = staticHandler ? pathnames.flatMap((pathname) => {
2699
+ let pathnameMatches = staticHandler.match(pathname);
2681
2700
  return pathnameMatches?.map((m, i) => ({
2682
2701
  ...m.route,
2683
2702
  parentId: pathnameMatches[i - 1]?.route.id
@@ -2688,10 +2707,10 @@ async function generateManifestResponse(routes, basename, request, generateRespo
2688
2707
  return true;
2689
2708
  }
2690
2709
  return false;
2691
- });
2710
+ }) : [];
2692
2711
  let payload = {
2693
2712
  type: "manifest",
2694
- patches: Promise.all([...matchedRoutes.map((route) => getManifestRoute(route)), getAdditionalRoutePatches(pathnames, dataRouteMatcher, Array.from(routeIds))]).then((r) => r.flat(1))
2713
+ patches: Promise.all([...matchedRoutes.map((route) => getManifestRoute(route)), staticHandler ? getAdditionalRoutePatches(pathnames, staticHandler, Array.from(routeIds)) : Promise.resolve([])]).then((r) => r.flat(1))
2695
2714
  };
2696
2715
  return generateResponse({
2697
2716
  statusCode: 200,
@@ -2761,9 +2780,9 @@ async function processServerAction(request, basename, decodeReply, loadServerAct
2761
2780
  }
2762
2781
  }
2763
2782
  }
2764
- async function generateResourceResponse(request, routes, basename, routeId, requestContext, onError) {
2783
+ async function generateResourceResponse(request, staticHandler, routeId, requestContext, onError) {
2765
2784
  try {
2766
- return await createStaticHandler(routes, { basename }).queryRoute(request, {
2785
+ return await staticHandler.queryRoute(request, {
2767
2786
  routeId,
2768
2787
  requestContext,
2769
2788
  async generateMiddlewareResponse(queryRoute) {
@@ -2804,12 +2823,11 @@ async function generateResourceResponse(request, routes, basename, routeId, requ
2804
2823
  });
2805
2824
  }
2806
2825
  }
2807
- async function generateRenderResponse(request, routes, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion) {
2826
+ async function generateRenderResponse(request, staticHandler, basename, isDataRequest, decodeReply, requestContext, loadServerAction, decodeAction, decodeFormState, onError, generateResponse, temporaryReferences, allowedActionOrigins, routeDiscovery, clientVersion) {
2808
2827
  let statusCode = 200;
2809
2828
  let url = new URL(request.url);
2810
2829
  let isSubmission = isMutationMethod(request.method);
2811
2830
  let routeIdsToLoad = !isSubmission && url.searchParams.has("_routes") ? url.searchParams.get("_routes").split(",") : null;
2812
- const staticHandler = createStaticHandler(routes, { basename });
2813
2831
  let actionResult;
2814
2832
  const ctx = {
2815
2833
  request,
@@ -2857,7 +2875,7 @@ async function generateRenderResponse(request, routes, basename, isDataRequest,
2857
2875
  staticContext.errors[staticContext.matches[0].route.id] = potentialCSRFAttackError;
2858
2876
  staticContext.statusCode = 400;
2859
2877
  }
2860
- return generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, ctx.redirect?.headers, routeDiscovery, clientVersion);
2878
+ return generateStaticContextResponse(staticHandler, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, ctx.redirect?.headers, routeDiscovery, clientVersion);
2861
2879
  }
2862
2880
  }));
2863
2881
  if (isRedirectResponse(result)) return generateRedirectResponse(result, actionResult, basename, isDataRequest, generateResponse, temporaryReferences, ctx.redirect?.headers);
@@ -2891,7 +2909,7 @@ function generateRedirectResponse(response, actionResult, basename, isDataReques
2891
2909
  onError: defaultOnError
2892
2910
  });
2893
2911
  }
2894
- async function generateStaticContextResponse(routes, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery, clientVersion) {
2912
+ async function generateStaticContextResponse(staticHandler, basename, generateResponse, statusCode, routeIdsToLoad, isDataRequest, isSubmission, actionResult, formState, staticContext, temporaryReferences, skipRevalidation, sideEffectRedirectHeaders, routeDiscovery, clientVersion) {
2895
2913
  statusCode = staticContext.statusCode ?? statusCode;
2896
2914
  if (staticContext.errors) staticContext.errors = Object.fromEntries(Object.entries(staticContext.errors).map(([key, error]) => [key, isRouteErrorResponse(error) ? Object.fromEntries(Object.entries(error)) : error]));
2897
2915
  staticContext.matches.forEach((m) => {
@@ -2912,7 +2930,7 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
2912
2930
  location: staticContext.location,
2913
2931
  formState
2914
2932
  };
2915
- const renderPayloadPromise = () => getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery);
2933
+ const renderPayloadPromise = () => getRenderPayload(baseRenderPayload, staticHandler, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery);
2916
2934
  let payload;
2917
2935
  if (actionResult) payload = {
2918
2936
  type: "action",
@@ -2934,7 +2952,8 @@ async function generateStaticContextResponse(routes, basename, generateResponse,
2934
2952
  onError: defaultOnError
2935
2953
  });
2936
2954
  }
2937
- async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery) {
2955
+ async function getRenderPayload(baseRenderPayload, staticHandler, basename, routeIdsToLoad, isDataRequest, staticContext, routeDiscovery) {
2956
+ let routes = staticHandler.dataRoutes;
2938
2957
  let deepestRenderedRouteIdx = staticContext.matches.length - 1;
2939
2958
  let parentIds = {};
2940
2959
  staticContext.matches.forEach((m, i) => {
@@ -2954,10 +2973,7 @@ async function getRenderPayload(baseRenderPayload, routes, basename, routeIdsToL
2954
2973
  }));
2955
2974
  let patches;
2956
2975
  if (routeDiscovery?.mode === "initial" && !isDataRequest) patches = getAllRoutePatches(routes, basename).then((patches) => patches.filter((patch) => !staticContext.matches.some((m) => m.route.id === patch.id)));
2957
- else {
2958
- let dataRouteMatcher = createRSCDataRouteMatcher(routes, basename);
2959
- patches = getAdditionalRoutePatches(getPathsWithAncestors([staticContext.location.pathname]), dataRouteMatcher, staticContext.matches.map((m) => m.route.id));
2960
- }
2976
+ else patches = getAdditionalRoutePatches(getPathsWithAncestors([staticContext.location.pathname]), staticHandler, staticContext.matches.map((m) => m.route.id));
2961
2977
  return {
2962
2978
  ...baseRenderPayload,
2963
2979
  matches: await matchesPromise,
@@ -3061,13 +3077,13 @@ async function getAllRoutePatches(routes, basename) {
3061
3077
  for (let route of routes) await traverse(route, void 0);
3062
3078
  return patches.filter((p) => !!p.parentId);
3063
3079
  }
3064
- async function getAdditionalRoutePatches(pathnames, dataRouteMatcher, matchedRouteIds) {
3080
+ async function getAdditionalRoutePatches(pathnames, staticHandler, matchedRouteIds) {
3065
3081
  let patchRouteMatches = /* @__PURE__ */ new Map();
3066
3082
  let matchedPaths = /* @__PURE__ */ new Set();
3067
3083
  for (const pathname of pathnames) {
3068
3084
  if (matchedPaths.has(pathname)) continue;
3069
3085
  matchedPaths.add(pathname);
3070
- let matches = dataRouteMatcher.match(pathname) || [];
3086
+ let matches = staticHandler.match(pathname) || [];
3071
3087
  matches.forEach((m, i) => {
3072
3088
  if (patchRouteMatches.get(m.route.id)) return;
3073
3089
  patchRouteMatches.set(m.route.id, {
@@ -4,7 +4,7 @@ import { ActionFunction, ActionFunctionArgs, BaseRouteObject, DataRouteMatch, Da
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
5
  import { HtmlLinkDescriptor, LinkDescriptor, PageLinkDescriptor } from "./lib/router/links.js";
6
6
  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";
7
+ import { AwaitContextProvider, DataRouterContext, DataRouterDataContext, DataRouterNavigationContext, DataRouterStateContext, FetchersContext, LocationContext, NavigateOptions, NavigationContext, Navigator, RouteContext, ViewTransitionContext } from "./lib/context.js";
8
8
  import { Register } from "./lib/types/register.js";
9
9
  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
10
  import { FetcherSubmitOptions, ParamKeyValuePair, SubmitOptions, SubmitTarget, URLSearchParamsInit, createSearchParams } from "./lib/dom/dom.js";
@@ -41,4 +41,4 @@ import { ClientInstrumentation, InstrumentRequestHandlerFunction, InstrumentRout
41
41
  declare const unstable_getRequest: typeof getRequest;
42
42
  declare const unstable_matchRSCServerRequest: typeof matchRSCServerRequest;
43
43
  //#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 };
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, 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, 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 };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-320d16107
2
+ * react-router v0.0.0-experimental-7aea711dd
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -12,7 +12,7 @@
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
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
18
  import { createSearchParams } from "./lib/dom/dom.js";
@@ -42,4 +42,4 @@ import { getHydrationData } from "./lib/dom/ssr/hydration.js";
42
42
  * @mergeModuleWith react-router
43
43
  */
44
44
  //#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 };
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, 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, 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 };