react-router 0.0.0-experimental-208f173a8 → 0.0.0-experimental-8e9d8ef63

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 (35) hide show
  1. package/dist/development/{chunk-TMQ5JBAV.mjs → chunk-EJSPM7NW.mjs} +21 -15
  2. package/dist/development/dom-export.d.mts +2 -2
  3. package/dist/development/dom-export.d.ts +2 -2
  4. package/dist/development/dom-export.js +8 -8
  5. package/dist/development/dom-export.mjs +2 -2
  6. package/dist/{production/fog-of-war-BDX71M75.d.ts → development/fog-of-war-BBVWdkR1.d.ts} +1 -1
  7. package/dist/development/{fog-of-war-CNAMmxww.d.mts → fog-of-war-BOz-S1N8.d.mts} +1 -1
  8. package/dist/development/index.d.mts +37 -6
  9. package/dist/development/index.d.ts +37 -6
  10. package/dist/development/index.js +20 -14
  11. package/dist/development/index.mjs +2 -2
  12. package/dist/development/lib/types/route-module.d.mts +1 -1
  13. package/dist/development/lib/types/route-module.d.ts +1 -1
  14. package/dist/development/lib/types/route-module.js +1 -1
  15. package/dist/development/lib/types/route-module.mjs +1 -1
  16. package/dist/development/{route-data-ii4CGe_J.d.ts → route-data-CfLfC_Bh.d.mts} +8 -22
  17. package/dist/{production/route-data-ii4CGe_J.d.mts → development/route-data-CfLfC_Bh.d.ts} +8 -22
  18. package/dist/production/{chunk-MU3TF2QX.mjs → chunk-7VURRAOS.mjs} +21 -15
  19. package/dist/production/dom-export.d.mts +2 -2
  20. package/dist/production/dom-export.d.ts +2 -2
  21. package/dist/production/dom-export.js +8 -8
  22. package/dist/production/dom-export.mjs +2 -2
  23. package/dist/{development/fog-of-war-BDX71M75.d.ts → production/fog-of-war-BBVWdkR1.d.ts} +1 -1
  24. package/dist/production/{fog-of-war-CNAMmxww.d.mts → fog-of-war-BOz-S1N8.d.mts} +1 -1
  25. package/dist/production/index.d.mts +37 -6
  26. package/dist/production/index.d.ts +37 -6
  27. package/dist/production/index.js +20 -14
  28. package/dist/production/index.mjs +2 -2
  29. package/dist/production/lib/types/route-module.d.mts +1 -1
  30. package/dist/production/lib/types/route-module.d.ts +1 -1
  31. package/dist/production/lib/types/route-module.js +1 -1
  32. package/dist/production/lib/types/route-module.mjs +1 -1
  33. package/dist/production/{route-data-ii4CGe_J.d.ts → route-data-CfLfC_Bh.d.mts} +8 -22
  34. package/dist/{development/route-data-ii4CGe_J.d.mts → production/route-data-CfLfC_Bh.d.ts} +8 -22
  35. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -840,18 +840,6 @@ var ErrorResponseImpl = class {
840
840
  function isRouteErrorResponse(error) {
841
841
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
842
842
  }
843
- function href(path, ...args) {
844
- let params = args[0];
845
- return path.split("/").map((segment) => {
846
- const match = segment.match(/^:([\w-]+)(\?)?/);
847
- if (!match) return segment;
848
- const param = match[1];
849
- if (params === void 0) {
850
- throw Error(`Path '${path}' requires params but none were provided`);
851
- }
852
- return params[param];
853
- }).join("/");
854
- }
855
843
 
856
844
  // lib/router/router.ts
857
845
  var validMutationMethodsArr = [
@@ -7099,7 +7087,7 @@ function mergeRefs(...refs) {
7099
7087
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7100
7088
  try {
7101
7089
  if (isBrowser) {
7102
- window.__reactRouterVersion = "0.0.0-experimental-208f173a8";
7090
+ window.__reactRouterVersion = "0.0.0-experimental-8e9d8ef63";
7103
7091
  }
7104
7092
  } catch (e) {
7105
7093
  }
@@ -9598,6 +9586,24 @@ function createMemorySessionStorage({ cookie } = {}) {
9598
9586
  });
9599
9587
  }
9600
9588
 
9589
+ // lib/href.ts
9590
+ function href(path, ...args) {
9591
+ let params = args[0];
9592
+ return path.split("/").map((segment) => {
9593
+ const match = segment.match(/^:([\w-]+)(\?)?/);
9594
+ if (!match) return segment;
9595
+ const param = match[1];
9596
+ const value = params ? params[param] : void 0;
9597
+ const isRequired = match[2] === void 0;
9598
+ if (isRequired && value === void 0) {
9599
+ throw Error(
9600
+ `Path '${path}' requires param '${param}' but it was not provided`
9601
+ );
9602
+ }
9603
+ return value;
9604
+ }).filter((segment) => segment !== void 0).join("/");
9605
+ }
9606
+
9601
9607
  // lib/dom/ssr/errors.ts
9602
9608
  function deserializeErrors2(errors) {
9603
9609
  if (!errors) return null;
@@ -9651,7 +9657,6 @@ export {
9651
9657
  replace,
9652
9658
  ErrorResponseImpl,
9653
9659
  isRouteErrorResponse,
9654
- href,
9655
9660
  IDLE_NAVIGATION,
9656
9661
  IDLE_FETCHER,
9657
9662
  IDLE_BLOCKER,
@@ -9747,5 +9752,6 @@ export {
9747
9752
  createSessionStorage,
9748
9753
  createCookieSessionStorage,
9749
9754
  createMemorySessionStorage,
9755
+ href,
9750
9756
  deserializeErrors2 as deserializeErrors
9751
9757
  };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-CNAMmxww.mjs';
3
- import './route-data-ii4CGe_J.mjs';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-BOz-S1N8.mjs';
3
+ import './route-data-CfLfC_Bh.mjs';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-BDX71M75.js';
3
- import './route-data-ii4CGe_J.js';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-BBVWdkR1.js';
3
+ import './route-data-CfLfC_Bh.js';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -197,13 +197,13 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options =
197
197
  }
198
198
  function createURL(to) {
199
199
  let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href;
200
- let href2 = typeof to === "string" ? to : createPath(to);
201
- href2 = href2.replace(/ $/, "%20");
200
+ let href = typeof to === "string" ? to : createPath(to);
201
+ href = href.replace(/ $/, "%20");
202
202
  invariant(
203
203
  base,
204
- `No window.location.(origin|href) available to create URL for href: ${href2}`
204
+ `No window.location.(origin|href) available to create URL for href: ${href}`
205
205
  );
206
- return new URL(href2, base);
206
+ return new URL(href, base);
207
207
  }
208
208
  let history = {
209
209
  get action() {
@@ -1567,7 +1567,7 @@ function createRouter(init) {
1567
1567
  });
1568
1568
  return new Map(state.fetchers);
1569
1569
  }
1570
- async function fetch2(key, routeId, href2, opts) {
1570
+ async function fetch2(key, routeId, href, opts) {
1571
1571
  abortFetcher(key);
1572
1572
  let flushSync2 = (opts && opts.flushSync) === true;
1573
1573
  let routesToUse = inFlightDataRoutes || dataRoutes;
@@ -1575,7 +1575,7 @@ function createRouter(init) {
1575
1575
  state.location,
1576
1576
  state.matches,
1577
1577
  basename,
1578
- href2,
1578
+ href,
1579
1579
  routeId,
1580
1580
  opts?.relative
1581
1581
  );
@@ -4228,7 +4228,7 @@ async function loadRouteModule(route, routeModulesCache) {
4228
4228
  // lib/dom/ssr/links.ts
4229
4229
  function getRouteCssDescriptors(route) {
4230
4230
  if (!route.css) return [];
4231
- return route.css.map((href2) => ({ rel: "stylesheet", href: href2 }));
4231
+ return route.css.map((href) => ({ rel: "stylesheet", href }));
4232
4232
  }
4233
4233
  async function prefetchRouteCss(route) {
4234
4234
  if (!route.css) return;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  matchRoutes,
26
26
  shouldHydrateRouteLoader,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-TMQ5JBAV.mjs";
28
+ } from "./chunk-EJSPM7NW.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aM as RouteModule, _ as HTMLFormMethod, Y as FormEncType, ax as PageLinkDescriptor, aN as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-ii4CGe_J.js';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, a0 as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aL as RouteModule, $ as HTMLFormMethod, Z as FormEncType, ax as PageLinkDescriptor, aM as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-CfLfC_Bh.js';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aM as RouteModule, _ as HTMLFormMethod, Y as FormEncType, ax as PageLinkDescriptor, aN as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-ii4CGe_J.mjs';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, a0 as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aL as RouteModule, $ as HTMLFormMethod, Z as FormEncType, ax as PageLinkDescriptor, aM as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-CfLfC_Bh.mjs';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-ii4CGe_J.mjs';
2
- export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, aA as Register, ao as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aF as UNSAFE_DataRouterContext, aG as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aH as UNSAFE_FetchersContext, aI as UNSAFE_LocationContext, aJ as UNSAFE_NavigationContext, aK as UNSAFE_RouteContext, aL as UNSAFE_ViewTransitionContext, aB as UNSAFE_createBrowserHistory, aD as UNSAFE_createRouter, aC as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as href, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a5 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-ii4CGe_J.mjs';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CNAMmxww.mjs';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-CNAMmxww.mjs';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params$1, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, E as Equal, v as RouterState } from './route-data-CfLfC_Bh.mjs';
2
+ export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, x as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, z as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aE as UNSAFE_DataRouterContext, aF as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, aD as UNSAFE_ErrorResponseImpl, aG as UNSAFE_FetchersContext, aH as UNSAFE_LocationContext, aI as UNSAFE_NavigationContext, aJ as UNSAFE_RouteContext, aK as UNSAFE_ViewTransitionContext, aA as UNSAFE_createBrowserHistory, aC as UNSAFE_createRouter, aB as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-CfLfC_Bh.mjs';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-BOz-S1N8.mjs';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-BOz-S1N8.mjs';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -190,7 +190,7 @@ declare function useOutlet(context?: unknown): React.ReactElement | null;
190
190
  */
191
191
  declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
192
192
  ParamsOrKey
193
- ] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
193
+ ] extends [string] ? Params$1<ParamsOrKey> : Partial<ParamsOrKey>>;
194
194
  /**
195
195
  Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
196
196
 
@@ -778,6 +778,37 @@ type DevServerHooks = {
778
778
  };
779
779
  declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
780
780
 
781
+ /**
782
+ * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
783
+ * React Router should handle this for you via type generation.
784
+ *
785
+ * For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
786
+ */
787
+ interface Register {
788
+ }
789
+
790
+ type AnyParams = Record<string, Record<string, string | undefined>>;
791
+ type Params = Register extends {
792
+ params: infer RegisteredParams extends AnyParams;
793
+ } ? RegisteredParams : AnyParams;
794
+ type Args = {
795
+ [K in keyof Params]: ToArgs<Params[K]>;
796
+ };
797
+ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
798
+ T
799
+ ];
800
+ /**
801
+ Returns a resolved URL path for the specified route.
802
+
803
+ ```tsx
804
+ const h = href("/:lang?/about", { lang: "en" })
805
+ // -> `/en/about`
806
+
807
+ <Link to={href("/products/:id", { id: "abc123" })} />
808
+ ```
809
+ */
810
+ declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
811
+
781
812
  declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
782
813
 
783
814
  type RemixErrorBoundaryProps = React.PropsWithChildren<{
@@ -801,4 +832,4 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
801
832
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
802
833
  }
803
834
 
804
- export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
835
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-ii4CGe_J.js';
2
- export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, aA as Register, ao as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aF as UNSAFE_DataRouterContext, aG as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aH as UNSAFE_FetchersContext, aI as UNSAFE_LocationContext, aJ as UNSAFE_NavigationContext, aK as UNSAFE_RouteContext, aL as UNSAFE_ViewTransitionContext, aB as UNSAFE_createBrowserHistory, aD as UNSAFE_createRouter, aC as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as href, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a5 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-ii4CGe_J.js';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-BDX71M75.js';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-BDX71M75.js';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params$1, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, E as Equal, v as RouterState } from './route-data-CfLfC_Bh.js';
2
+ export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, x as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, z as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aE as UNSAFE_DataRouterContext, aF as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, aD as UNSAFE_ErrorResponseImpl, aG as UNSAFE_FetchersContext, aH as UNSAFE_LocationContext, aI as UNSAFE_NavigationContext, aJ as UNSAFE_RouteContext, aK as UNSAFE_ViewTransitionContext, aA as UNSAFE_createBrowserHistory, aC as UNSAFE_createRouter, aB as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-CfLfC_Bh.js';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-BBVWdkR1.js';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-BBVWdkR1.js';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -190,7 +190,7 @@ declare function useOutlet(context?: unknown): React.ReactElement | null;
190
190
  */
191
191
  declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
192
192
  ParamsOrKey
193
- ] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
193
+ ] extends [string] ? Params$1<ParamsOrKey> : Partial<ParamsOrKey>>;
194
194
  /**
195
195
  Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
196
196
 
@@ -778,6 +778,37 @@ type DevServerHooks = {
778
778
  };
779
779
  declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
780
780
 
781
+ /**
782
+ * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
783
+ * React Router should handle this for you via type generation.
784
+ *
785
+ * For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
786
+ */
787
+ interface Register {
788
+ }
789
+
790
+ type AnyParams = Record<string, Record<string, string | undefined>>;
791
+ type Params = Register extends {
792
+ params: infer RegisteredParams extends AnyParams;
793
+ } ? RegisteredParams : AnyParams;
794
+ type Args = {
795
+ [K in keyof Params]: ToArgs<Params[K]>;
796
+ };
797
+ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
798
+ T
799
+ ];
800
+ /**
801
+ Returns a resolved URL path for the specified route.
802
+
803
+ ```tsx
804
+ const h = href("/:lang?/about", { lang: "en" })
805
+ // -> `/en/about`
806
+
807
+ <Link to={href("/products/:id", { id: "abc123" })} />
808
+ ```
809
+ */
810
+ declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
811
+
781
812
  declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
782
813
 
783
814
  type RemixErrorBoundaryProps = React.PropsWithChildren<{
@@ -801,4 +832,4 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
801
832
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
802
833
  }
803
834
 
804
- export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
835
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -986,18 +986,6 @@ var ErrorResponseImpl = class {
986
986
  function isRouteErrorResponse(error) {
987
987
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
988
988
  }
989
- function href(path, ...args) {
990
- let params = args[0];
991
- return path.split("/").map((segment) => {
992
- const match = segment.match(/^:([\w-]+)(\?)?/);
993
- if (!match) return segment;
994
- const param = match[1];
995
- if (params === void 0) {
996
- throw Error(`Path '${path}' requires params but none were provided`);
997
- }
998
- return params[param];
999
- }).join("/");
1000
- }
1001
989
 
1002
990
  // lib/router/router.ts
1003
991
  var validMutationMethodsArr = [
@@ -7245,7 +7233,7 @@ function mergeRefs(...refs) {
7245
7233
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7246
7234
  try {
7247
7235
  if (isBrowser) {
7248
- window.__reactRouterVersion = "0.0.0-experimental-208f173a8";
7236
+ window.__reactRouterVersion = "0.0.0-experimental-8e9d8ef63";
7249
7237
  }
7250
7238
  } catch (e) {
7251
7239
  }
@@ -9744,6 +9732,24 @@ function createMemorySessionStorage({ cookie } = {}) {
9744
9732
  });
9745
9733
  }
9746
9734
 
9735
+ // lib/href.ts
9736
+ function href(path, ...args) {
9737
+ let params = args[0];
9738
+ return path.split("/").map((segment) => {
9739
+ const match = segment.match(/^:([\w-]+)(\?)?/);
9740
+ if (!match) return segment;
9741
+ const param = match[1];
9742
+ const value = params ? params[param] : void 0;
9743
+ const isRequired = match[2] === void 0;
9744
+ if (isRequired && value === void 0) {
9745
+ throw Error(
9746
+ `Path '${path}' requires param '${param}' but it was not provided`
9747
+ );
9748
+ }
9749
+ return value;
9750
+ }).filter((segment) => segment !== void 0).join("/");
9751
+ }
9752
+
9747
9753
  // lib/dom/ssr/errors.ts
9748
9754
  function deserializeErrors2(errors) {
9749
9755
  if (!errors) return null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -121,7 +121,7 @@ import {
121
121
  useSearchParams,
122
122
  useSubmit,
123
123
  useViewTransitionState
124
- } from "./chunk-TMQ5JBAV.mjs";
124
+ } from "./chunk-EJSPM7NW.mjs";
125
125
  export {
126
126
  Await,
127
127
  BrowserRouter,
@@ -1,4 +1,4 @@
1
- import { az as LinkDescriptor, aw as MetaDescriptor, aO as ServerDataFrom, aP as ClientDataFrom, aQ as Func, aR as Equal, aS as Pretty } from '../../route-data-ii4CGe_J.mjs';
1
+ import { az as LinkDescriptor, aw as MetaDescriptor, aN as ServerDataFrom, aO as ClientDataFrom, aP as Func, E as Equal, aQ as Pretty } from '../../route-data-CfLfC_Bh.mjs';
2
2
  import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
3
3
  import 'react';
4
4
 
@@ -1,4 +1,4 @@
1
- import { az as LinkDescriptor, aw as MetaDescriptor, aO as ServerDataFrom, aP as ClientDataFrom, aQ as Func, aR as Equal, aS as Pretty } from '../../route-data-ii4CGe_J.js';
1
+ import { az as LinkDescriptor, aw as MetaDescriptor, aN as ServerDataFrom, aO as ClientDataFrom, aP as Func, E as Equal, aQ as Pretty } from '../../route-data-CfLfC_Bh.js';
2
2
  import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
3
3
  import 'react';
4
4
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -206,16 +206,6 @@ type UrlHistoryOptions = {
206
206
  v5Compat?: boolean;
207
207
  };
208
208
 
209
- interface Register {
210
- }
211
-
212
- type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
213
- type IsAny<T> = 0 extends 1 & T ? true : false;
214
- type Func = (...args: any[]) => unknown;
215
- type Pretty<T> = {
216
- [K in keyof T]: T[K];
217
- } & {};
218
-
219
209
  /**
220
210
  * Map of routeId -> data returned from a loader/action/error
221
211
  */
@@ -615,17 +605,6 @@ declare class ErrorResponseImpl implements ErrorResponse {
615
605
  * @category Utils
616
606
  */
617
607
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
618
- type AnyParams = Record<string, Record<string, string | undefined>>;
619
- type HrefParams = Register extends {
620
- params: infer TParams extends AnyParams;
621
- } ? TParams : AnyParams;
622
- type HrefArgs = {
623
- [K in keyof HrefParams]: ToHrefArgs<HrefParams[K]>;
624
- };
625
- type ToHrefArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
626
- T
627
- ];
628
- declare function href<Path extends keyof HrefArgs>(path: Path, ...args: HrefArgs[Path]): string;
629
608
 
630
609
  /**
631
610
  * A Router instance manages all navigation and data loading/mutations
@@ -1579,6 +1558,13 @@ type Serializable = undefined | null | boolean | string | symbol | number | Arra
1579
1558
  [key: PropertyKey]: Serializable;
1580
1559
  } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
1581
1560
 
1561
+ type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
1562
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1563
+ type Func = (...args: any[]) => unknown;
1564
+ type Pretty<T> = {
1565
+ [K in keyof T]: T[K];
1566
+ } & {};
1567
+
1582
1568
  type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
1583
1569
  [K in keyof T]: Serialize<T[K]>;
1584
1570
  } : undefined;
@@ -1590,4 +1576,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1590
1576
  type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1591
1577
  type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1592
1578
 
1593
- export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, type Register as aA, createBrowserHistory as aB, invariant as aC, createRouter as aD, ErrorResponseImpl as aE, DataRouterContext as aF, DataRouterStateContext as aG, FetchersContext as aH, LocationContext as aI, NavigationContext as aJ, RouteContext as aK, ViewTransitionContext as aL, type RouteModule as aM, type History as aN, type ServerDataFrom as aO, type ClientDataFrom as aP, type Func as aQ, type Equal as aR, type Pretty as aS, generatePath as aa, href as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
1579
+ export { type HTMLFormMethod as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterSubscriber as J, type RouterNavigateOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type RouterFetchOptions as O, type ParamParseKey as P, type DataStrategyFunctionArgs as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyMatch as V, type DataStrategyResult as W, DataWithResponseInit as X, type ErrorResponse as Y, type FormEncType as Z, type FormMethod as _, type Router as a, type LazyRouteFunction as a0, type PathParam as a1, type RedirectFunction as a2, type ShouldRevalidateFunction as a3, type ShouldRevalidateFunctionArgs as a4, createPath as a5, parsePath as a6, IDLE_NAVIGATION as a7, IDLE_FETCHER as a8, IDLE_BLOCKER as a9, createBrowserHistory as aA, invariant as aB, createRouter as aC, ErrorResponseImpl as aD, DataRouterContext as aE, DataRouterStateContext as aF, FetchersContext as aG, LocationContext as aH, NavigationContext as aI, RouteContext as aJ, ViewTransitionContext as aK, type RouteModule as aL, type History as aM, type ServerDataFrom as aN, type ClientDataFrom as aO, type Func as aP, type Pretty as aQ, data as aa, generatePath as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
@@ -206,16 +206,6 @@ type UrlHistoryOptions = {
206
206
  v5Compat?: boolean;
207
207
  };
208
208
 
209
- interface Register {
210
- }
211
-
212
- type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
213
- type IsAny<T> = 0 extends 1 & T ? true : false;
214
- type Func = (...args: any[]) => unknown;
215
- type Pretty<T> = {
216
- [K in keyof T]: T[K];
217
- } & {};
218
-
219
209
  /**
220
210
  * Map of routeId -> data returned from a loader/action/error
221
211
  */
@@ -615,17 +605,6 @@ declare class ErrorResponseImpl implements ErrorResponse {
615
605
  * @category Utils
616
606
  */
617
607
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
618
- type AnyParams = Record<string, Record<string, string | undefined>>;
619
- type HrefParams = Register extends {
620
- params: infer TParams extends AnyParams;
621
- } ? TParams : AnyParams;
622
- type HrefArgs = {
623
- [K in keyof HrefParams]: ToHrefArgs<HrefParams[K]>;
624
- };
625
- type ToHrefArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
626
- T
627
- ];
628
- declare function href<Path extends keyof HrefArgs>(path: Path, ...args: HrefArgs[Path]): string;
629
608
 
630
609
  /**
631
610
  * A Router instance manages all navigation and data loading/mutations
@@ -1579,6 +1558,13 @@ type Serializable = undefined | null | boolean | string | symbol | number | Arra
1579
1558
  [key: PropertyKey]: Serializable;
1580
1559
  } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
1581
1560
 
1561
+ type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
1562
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1563
+ type Func = (...args: any[]) => unknown;
1564
+ type Pretty<T> = {
1565
+ [K in keyof T]: T[K];
1566
+ } & {};
1567
+
1582
1568
  type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
1583
1569
  [K in keyof T]: Serialize<T[K]>;
1584
1570
  } : undefined;
@@ -1590,4 +1576,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1590
1576
  type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1591
1577
  type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1592
1578
 
1593
- export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, type Register as aA, createBrowserHistory as aB, invariant as aC, createRouter as aD, ErrorResponseImpl as aE, DataRouterContext as aF, DataRouterStateContext as aG, FetchersContext as aH, LocationContext as aI, NavigationContext as aJ, RouteContext as aK, ViewTransitionContext as aL, type RouteModule as aM, type History as aN, type ServerDataFrom as aO, type ClientDataFrom as aP, type Func as aQ, type Equal as aR, type Pretty as aS, generatePath as aa, href as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
1579
+ export { type HTMLFormMethod as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterSubscriber as J, type RouterNavigateOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type RouterFetchOptions as O, type ParamParseKey as P, type DataStrategyFunctionArgs as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyMatch as V, type DataStrategyResult as W, DataWithResponseInit as X, type ErrorResponse as Y, type FormEncType as Z, type FormMethod as _, type Router as a, type LazyRouteFunction as a0, type PathParam as a1, type RedirectFunction as a2, type ShouldRevalidateFunction as a3, type ShouldRevalidateFunctionArgs as a4, createPath as a5, parsePath as a6, IDLE_NAVIGATION as a7, IDLE_FETCHER as a8, IDLE_BLOCKER as a9, createBrowserHistory as aA, invariant as aB, createRouter as aC, ErrorResponseImpl as aD, DataRouterContext as aE, DataRouterStateContext as aF, FetchersContext as aG, LocationContext as aH, NavigationContext as aI, RouteContext as aJ, ViewTransitionContext as aK, type RouteModule as aL, type History as aM, type ServerDataFrom as aN, type ClientDataFrom as aO, type Func as aP, type Pretty as aQ, data as aa, generatePath as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -840,18 +840,6 @@ var ErrorResponseImpl = class {
840
840
  function isRouteErrorResponse(error) {
841
841
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
842
842
  }
843
- function href(path, ...args) {
844
- let params = args[0];
845
- return path.split("/").map((segment) => {
846
- const match = segment.match(/^:([\w-]+)(\?)?/);
847
- if (!match) return segment;
848
- const param = match[1];
849
- if (params === void 0) {
850
- throw Error(`Path '${path}' requires params but none were provided`);
851
- }
852
- return params[param];
853
- }).join("/");
854
- }
855
843
 
856
844
  // lib/router/router.ts
857
845
  var validMutationMethodsArr = [
@@ -7099,7 +7087,7 @@ function mergeRefs(...refs) {
7099
7087
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7100
7088
  try {
7101
7089
  if (isBrowser) {
7102
- window.__reactRouterVersion = "0.0.0-experimental-208f173a8";
7090
+ window.__reactRouterVersion = "0.0.0-experimental-8e9d8ef63";
7103
7091
  }
7104
7092
  } catch (e) {
7105
7093
  }
@@ -9598,6 +9586,24 @@ function createMemorySessionStorage({ cookie } = {}) {
9598
9586
  });
9599
9587
  }
9600
9588
 
9589
+ // lib/href.ts
9590
+ function href(path, ...args) {
9591
+ let params = args[0];
9592
+ return path.split("/").map((segment) => {
9593
+ const match = segment.match(/^:([\w-]+)(\?)?/);
9594
+ if (!match) return segment;
9595
+ const param = match[1];
9596
+ const value = params ? params[param] : void 0;
9597
+ const isRequired = match[2] === void 0;
9598
+ if (isRequired && value === void 0) {
9599
+ throw Error(
9600
+ `Path '${path}' requires param '${param}' but it was not provided`
9601
+ );
9602
+ }
9603
+ return value;
9604
+ }).filter((segment) => segment !== void 0).join("/");
9605
+ }
9606
+
9601
9607
  // lib/dom/ssr/errors.ts
9602
9608
  function deserializeErrors2(errors) {
9603
9609
  if (!errors) return null;
@@ -9651,7 +9657,6 @@ export {
9651
9657
  replace,
9652
9658
  ErrorResponseImpl,
9653
9659
  isRouteErrorResponse,
9654
- href,
9655
9660
  IDLE_NAVIGATION,
9656
9661
  IDLE_FETCHER,
9657
9662
  IDLE_BLOCKER,
@@ -9747,5 +9752,6 @@ export {
9747
9752
  createSessionStorage,
9748
9753
  createCookieSessionStorage,
9749
9754
  createMemorySessionStorage,
9755
+ href,
9750
9756
  deserializeErrors2 as deserializeErrors
9751
9757
  };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-CNAMmxww.mjs';
3
- import './route-data-ii4CGe_J.mjs';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-BOz-S1N8.mjs';
3
+ import './route-data-CfLfC_Bh.mjs';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { R as RouterProviderProps$1 } from './fog-of-war-BDX71M75.js';
3
- import './route-data-ii4CGe_J.js';
2
+ import { R as RouterProviderProps$1 } from './fog-of-war-BBVWdkR1.js';
3
+ import './route-data-CfLfC_Bh.js';
4
4
 
5
5
  type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
6
6
  declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -197,13 +197,13 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options =
197
197
  }
198
198
  function createURL(to) {
199
199
  let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href;
200
- let href2 = typeof to === "string" ? to : createPath(to);
201
- href2 = href2.replace(/ $/, "%20");
200
+ let href = typeof to === "string" ? to : createPath(to);
201
+ href = href.replace(/ $/, "%20");
202
202
  invariant(
203
203
  base,
204
- `No window.location.(origin|href) available to create URL for href: ${href2}`
204
+ `No window.location.(origin|href) available to create URL for href: ${href}`
205
205
  );
206
- return new URL(href2, base);
206
+ return new URL(href, base);
207
207
  }
208
208
  let history = {
209
209
  get action() {
@@ -1567,7 +1567,7 @@ function createRouter(init) {
1567
1567
  });
1568
1568
  return new Map(state.fetchers);
1569
1569
  }
1570
- async function fetch2(key, routeId, href2, opts) {
1570
+ async function fetch2(key, routeId, href, opts) {
1571
1571
  abortFetcher(key);
1572
1572
  let flushSync2 = (opts && opts.flushSync) === true;
1573
1573
  let routesToUse = inFlightDataRoutes || dataRoutes;
@@ -1575,7 +1575,7 @@ function createRouter(init) {
1575
1575
  state.location,
1576
1576
  state.matches,
1577
1577
  basename,
1578
- href2,
1578
+ href,
1579
1579
  routeId,
1580
1580
  opts?.relative
1581
1581
  );
@@ -4228,7 +4228,7 @@ async function loadRouteModule(route, routeModulesCache) {
4228
4228
  // lib/dom/ssr/links.ts
4229
4229
  function getRouteCssDescriptors(route) {
4230
4230
  if (!route.css) return [];
4231
- return route.css.map((href2) => ({ rel: "stylesheet", href: href2 }));
4231
+ return route.css.map((href) => ({ rel: "stylesheet", href }));
4232
4232
  }
4233
4233
  async function prefetchRouteCss(route) {
4234
4234
  if (!route.css) return;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  matchRoutes,
26
26
  shouldHydrateRouteLoader,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-MU3TF2QX.mjs";
28
+ } from "./chunk-7VURRAOS.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aM as RouteModule, _ as HTMLFormMethod, Y as FormEncType, ax as PageLinkDescriptor, aN as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-ii4CGe_J.js';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, a0 as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aL as RouteModule, $ as HTMLFormMethod, Z as FormEncType, ax as PageLinkDescriptor, aM as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-CfLfC_Bh.js';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, $ as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aM as RouteModule, _ as HTMLFormMethod, Y as FormEncType, ax as PageLinkDescriptor, aN as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-ii4CGe_J.mjs';
2
+ import { j as RouteObject, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, am as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, u as NonIndexRouteObject, a0 as LazyRouteFunction, q as IndexRouteObject, d as Location, e as Action, al as Navigator, ao as RouteMatch, o as StaticHandlerContext, b as RouteManifest, R as RouteModules, ak as DataRouteObject, aL as RouteModule, $ as HTMLFormMethod, Z as FormEncType, ax as PageLinkDescriptor, aM as History, w as GetScrollRestorationKeyFunction, N as NavigateOptions, x as Fetcher, m as SerializeFrom, B as BlockerFunction } from './route-data-CfLfC_Bh.mjs';
3
3
 
4
4
  /**
5
5
  * @private
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-ii4CGe_J.mjs';
2
- export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, aA as Register, ao as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aF as UNSAFE_DataRouterContext, aG as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aH as UNSAFE_FetchersContext, aI as UNSAFE_LocationContext, aJ as UNSAFE_NavigationContext, aK as UNSAFE_RouteContext, aL as UNSAFE_ViewTransitionContext, aB as UNSAFE_createBrowserHistory, aD as UNSAFE_createRouter, aC as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as href, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a5 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-ii4CGe_J.mjs';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CNAMmxww.mjs';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-CNAMmxww.mjs';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params$1, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, E as Equal, v as RouterState } from './route-data-CfLfC_Bh.mjs';
2
+ export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, x as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, z as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aE as UNSAFE_DataRouterContext, aF as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, aD as UNSAFE_ErrorResponseImpl, aG as UNSAFE_FetchersContext, aH as UNSAFE_LocationContext, aI as UNSAFE_NavigationContext, aJ as UNSAFE_RouteContext, aK as UNSAFE_ViewTransitionContext, aA as UNSAFE_createBrowserHistory, aC as UNSAFE_createRouter, aB as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-CfLfC_Bh.mjs';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-BOz-S1N8.mjs';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-BOz-S1N8.mjs';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -190,7 +190,7 @@ declare function useOutlet(context?: unknown): React.ReactElement | null;
190
190
  */
191
191
  declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
192
192
  ParamsOrKey
193
- ] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
193
+ ] extends [string] ? Params$1<ParamsOrKey> : Partial<ParamsOrKey>>;
194
194
  /**
195
195
  Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
196
196
 
@@ -778,6 +778,37 @@ type DevServerHooks = {
778
778
  };
779
779
  declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
780
780
 
781
+ /**
782
+ * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
783
+ * React Router should handle this for you via type generation.
784
+ *
785
+ * For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
786
+ */
787
+ interface Register {
788
+ }
789
+
790
+ type AnyParams = Record<string, Record<string, string | undefined>>;
791
+ type Params = Register extends {
792
+ params: infer RegisteredParams extends AnyParams;
793
+ } ? RegisteredParams : AnyParams;
794
+ type Args = {
795
+ [K in keyof Params]: ToArgs<Params[K]>;
796
+ };
797
+ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
798
+ T
799
+ ];
800
+ /**
801
+ Returns a resolved URL path for the specified route.
802
+
803
+ ```tsx
804
+ const h = href("/:lang?/about", { lang: "en" })
805
+ // -> `/en/about`
806
+
807
+ <Link to={href("/products/:id", { id: "abc123" })} />
808
+ ```
809
+ */
810
+ declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
811
+
781
812
  declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
782
813
 
783
814
  type RemixErrorBoundaryProps = React.PropsWithChildren<{
@@ -801,4 +832,4 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
801
832
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
802
833
  }
803
834
 
804
- export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
835
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
@@ -1,7 +1,7 @@
1
- import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, v as RouterState } from './route-data-ii4CGe_J.js';
2
- export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, O as DataStrategyFunctionArgs, Q as DataStrategyMatch, V as DataStrategyResult, X as ErrorResponse, x as Fetcher, Y as FormEncType, Z as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, _ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a8 as IDLE_BLOCKER, a7 as IDLE_FETCHER, a6 as IDLE_NAVIGATION, $ as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a0 as PathParam, a1 as RedirectFunction, aA as Register, ao as RouteMatch, K as RouterFetchOptions, z as RouterInit, J as RouterNavigateOptions, E as RouterSubscriber, a2 as ShouldRevalidateFunction, a3 as ShouldRevalidateFunctionArgs, aF as UNSAFE_DataRouterContext, aG as UNSAFE_DataRouterStateContext, W as UNSAFE_DataWithResponseInit, aE as UNSAFE_ErrorResponseImpl, aH as UNSAFE_FetchersContext, aI as UNSAFE_LocationContext, aJ as UNSAFE_NavigationContext, aK as UNSAFE_RouteContext, aL as UNSAFE_ViewTransitionContext, aB as UNSAFE_createBrowserHistory, aD as UNSAFE_createRouter, aC as UNSAFE_invariant, a4 as createPath, a9 as data, aa as generatePath, ab as href, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a5 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-ii4CGe_J.js';
3
- import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-BDX71M75.js';
4
- export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-BDX71M75.js';
1
+ import { R as RouteModules, a as Router, D as DataStrategyFunction, b as RouteManifest, S as ServerRouteModule, L as LoaderFunctionArgs, A as ActionFunctionArgs, T as To, c as RelativeRoutingType, d as Location, e as Action, P as ParamParseKey, f as Path, g as PathPattern, h as PathMatch, N as NavigateOptions, i as Params$1, j as RouteObject, k as Navigation, l as RevalidationState, U as UIMatch, m as SerializeFrom, B as BlockerFunction, n as Blocker, o as StaticHandlerContext, p as StaticHandler, F as FutureConfig$1, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, q as IndexRouteObject, r as LoaderFunction, s as ActionFunction, M as MetaFunction, t as LinksFunction, u as NonIndexRouteObject, E as Equal, v as RouterState } from './route-data-CfLfC_Bh.js';
2
+ export { ap as ClientActionFunction, aq as ClientActionFunctionArgs, ar as ClientLoaderFunction, as as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, x as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, w as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, at as HeadersArgs, au as HeadersFunction, ay as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, az as LinkDescriptor, av as MetaArgs, aw as MetaDescriptor, y as NavigationStates, al as Navigator, ax as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, z as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aE as UNSAFE_DataRouterContext, aF as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, aD as UNSAFE_ErrorResponseImpl, aG as UNSAFE_FetchersContext, aH as UNSAFE_LocationContext, aI as UNSAFE_NavigationContext, aJ as UNSAFE_RouteContext, aK as UNSAFE_ViewTransitionContext, aA as UNSAFE_createBrowserHistory, aC as UNSAFE_createRouter, aB as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-CfLfC_Bh.js';
3
+ import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-BBVWdkR1.js';
4
+ export { f as Await, b as AwaitProps, J as BrowserRouter, B as BrowserRouterProps, v as FetcherFormProps, z as FetcherSubmitFunction, a4 as FetcherSubmitOptions, C as FetcherWithComponents, V as Form, w as FormProps, K as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, Q as Link, s as LinkProps, ab as Links, g as MemoryRouter, M as MemoryRouterProps, aa as Meta, U as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a5 as ParamKeyValuePair, P as PathRouteProps, ad as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ac as Scripts, ae as ScriptsProps, W as ScrollRestoration, S as ScrollRestorationProps, x as SetURLSearchParams, y as SubmitFunction, a6 as SubmitOptions, a8 as SubmitTarget, ag as UNSAFE_FrameworkContext, aj as UNSAFE_createClientRoutes, ak as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ah as UNSAFE_getPatchRoutesOnNavigationFunction, af as UNSAFE_mapRouteProperties, al as UNSAFE_shouldHydrateRouteLoader, ai as UNSAFE_useFogOFWarDiscovery, am as UNSAFE_useScrollRestoration, a7 as URLSearchParamsInit, D as createBrowserRouter, G as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, a9 as createSearchParams, r as renderMatches, T as unstable_HistoryRouter, a2 as unstable_usePrompt, a1 as useBeforeUnload, $ as useFetcher, a0 as useFetchers, _ as useFormAction, X as useLinkClickHandler, Y as useSearchParams, Z as useSubmit, a3 as useViewTransitionState } from './fog-of-war-BBVWdkR1.js';
5
5
  import * as React from 'react';
6
6
  import { ReactElement } from 'react';
7
7
  import { ParseOptions, SerializeOptions } from 'cookie';
@@ -190,7 +190,7 @@ declare function useOutlet(context?: unknown): React.ReactElement | null;
190
190
  */
191
191
  declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
192
192
  ParamsOrKey
193
- ] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
193
+ ] extends [string] ? Params$1<ParamsOrKey> : Partial<ParamsOrKey>>;
194
194
  /**
195
195
  Resolves the pathname of the given `to` value against the current location. Similar to {@link useHref}, but returns a {@link Path} instead of a string.
196
196
 
@@ -778,6 +778,37 @@ type DevServerHooks = {
778
778
  };
779
779
  declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
780
780
 
781
+ /**
782
+ * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
783
+ * React Router should handle this for you via type generation.
784
+ *
785
+ * For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
786
+ */
787
+ interface Register {
788
+ }
789
+
790
+ type AnyParams = Record<string, Record<string, string | undefined>>;
791
+ type Params = Register extends {
792
+ params: infer RegisteredParams extends AnyParams;
793
+ } ? RegisteredParams : AnyParams;
794
+ type Args = {
795
+ [K in keyof Params]: ToArgs<Params[K]>;
796
+ };
797
+ type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
798
+ T
799
+ ];
800
+ /**
801
+ Returns a resolved URL path for the specified route.
802
+
803
+ ```tsx
804
+ const h = href("/:lang?/about", { lang: "en" })
805
+ // -> `/en/about`
806
+
807
+ <Link to={href("/products/:id", { id: "abc123" })} />
808
+ ```
809
+ */
810
+ declare function href<Path extends keyof Args>(path: Path, ...args: Args[Path]): string;
811
+
781
812
  declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
782
813
 
783
814
  type RemixErrorBoundaryProps = React.PropsWithChildren<{
@@ -801,4 +832,4 @@ declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps
801
832
  render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
802
833
  }
803
834
 
804
- export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
835
+ export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params$1 as Params, Path, PathMatch, PathPattern, type Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -986,18 +986,6 @@ var ErrorResponseImpl = class {
986
986
  function isRouteErrorResponse(error) {
987
987
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
988
988
  }
989
- function href(path, ...args) {
990
- let params = args[0];
991
- return path.split("/").map((segment) => {
992
- const match = segment.match(/^:([\w-]+)(\?)?/);
993
- if (!match) return segment;
994
- const param = match[1];
995
- if (params === void 0) {
996
- throw Error(`Path '${path}' requires params but none were provided`);
997
- }
998
- return params[param];
999
- }).join("/");
1000
- }
1001
989
 
1002
990
  // lib/router/router.ts
1003
991
  var validMutationMethodsArr = [
@@ -7245,7 +7233,7 @@ function mergeRefs(...refs) {
7245
7233
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
7246
7234
  try {
7247
7235
  if (isBrowser) {
7248
- window.__reactRouterVersion = "0.0.0-experimental-208f173a8";
7236
+ window.__reactRouterVersion = "0.0.0-experimental-8e9d8ef63";
7249
7237
  }
7250
7238
  } catch (e) {
7251
7239
  }
@@ -9744,6 +9732,24 @@ function createMemorySessionStorage({ cookie } = {}) {
9744
9732
  });
9745
9733
  }
9746
9734
 
9735
+ // lib/href.ts
9736
+ function href(path, ...args) {
9737
+ let params = args[0];
9738
+ return path.split("/").map((segment) => {
9739
+ const match = segment.match(/^:([\w-]+)(\?)?/);
9740
+ if (!match) return segment;
9741
+ const param = match[1];
9742
+ const value = params ? params[param] : void 0;
9743
+ const isRequired = match[2] === void 0;
9744
+ if (isRequired && value === void 0) {
9745
+ throw Error(
9746
+ `Path '${path}' requires param '${param}' but it was not provided`
9747
+ );
9748
+ }
9749
+ return value;
9750
+ }).filter((segment) => segment !== void 0).join("/");
9751
+ }
9752
+
9747
9753
  // lib/dom/ssr/errors.ts
9748
9754
  function deserializeErrors2(errors) {
9749
9755
  if (!errors) return null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -121,7 +121,7 @@ import {
121
121
  useSearchParams,
122
122
  useSubmit,
123
123
  useViewTransitionState
124
- } from "./chunk-MU3TF2QX.mjs";
124
+ } from "./chunk-7VURRAOS.mjs";
125
125
  export {
126
126
  Await,
127
127
  BrowserRouter,
@@ -1,4 +1,4 @@
1
- import { az as LinkDescriptor, aw as MetaDescriptor, aO as ServerDataFrom, aP as ClientDataFrom, aQ as Func, aR as Equal, aS as Pretty } from '../../route-data-ii4CGe_J.mjs';
1
+ import { az as LinkDescriptor, aw as MetaDescriptor, aN as ServerDataFrom, aO as ClientDataFrom, aP as Func, E as Equal, aQ as Pretty } from '../../route-data-CfLfC_Bh.mjs';
2
2
  import { A as AppLoadContext } from '../../data-CQbyyGzl.mjs';
3
3
  import 'react';
4
4
 
@@ -1,4 +1,4 @@
1
- import { az as LinkDescriptor, aw as MetaDescriptor, aO as ServerDataFrom, aP as ClientDataFrom, aQ as Func, aR as Equal, aS as Pretty } from '../../route-data-ii4CGe_J.js';
1
+ import { az as LinkDescriptor, aw as MetaDescriptor, aN as ServerDataFrom, aO as ClientDataFrom, aP as Func, E as Equal, aQ as Pretty } from '../../route-data-CfLfC_Bh.js';
2
2
  import { A as AppLoadContext } from '../../data-CQbyyGzl.js';
3
3
  import 'react';
4
4
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v0.0.0-experimental-208f173a8
2
+ * react-router v0.0.0-experimental-8e9d8ef63
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -206,16 +206,6 @@ type UrlHistoryOptions = {
206
206
  v5Compat?: boolean;
207
207
  };
208
208
 
209
- interface Register {
210
- }
211
-
212
- type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
213
- type IsAny<T> = 0 extends 1 & T ? true : false;
214
- type Func = (...args: any[]) => unknown;
215
- type Pretty<T> = {
216
- [K in keyof T]: T[K];
217
- } & {};
218
-
219
209
  /**
220
210
  * Map of routeId -> data returned from a loader/action/error
221
211
  */
@@ -615,17 +605,6 @@ declare class ErrorResponseImpl implements ErrorResponse {
615
605
  * @category Utils
616
606
  */
617
607
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
618
- type AnyParams = Record<string, Record<string, string | undefined>>;
619
- type HrefParams = Register extends {
620
- params: infer TParams extends AnyParams;
621
- } ? TParams : AnyParams;
622
- type HrefArgs = {
623
- [K in keyof HrefParams]: ToHrefArgs<HrefParams[K]>;
624
- };
625
- type ToHrefArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
626
- T
627
- ];
628
- declare function href<Path extends keyof HrefArgs>(path: Path, ...args: HrefArgs[Path]): string;
629
608
 
630
609
  /**
631
610
  * A Router instance manages all navigation and data loading/mutations
@@ -1579,6 +1558,13 @@ type Serializable = undefined | null | boolean | string | symbol | number | Arra
1579
1558
  [key: PropertyKey]: Serializable;
1580
1559
  } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
1581
1560
 
1561
+ type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
1562
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1563
+ type Func = (...args: any[]) => unknown;
1564
+ type Pretty<T> = {
1565
+ [K in keyof T]: T[K];
1566
+ } & {};
1567
+
1582
1568
  type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
1583
1569
  [K in keyof T]: Serialize<T[K]>;
1584
1570
  } : undefined;
@@ -1590,4 +1576,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1590
1576
  type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1591
1577
  type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1592
1578
 
1593
- export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, type Register as aA, createBrowserHistory as aB, invariant as aC, createRouter as aD, ErrorResponseImpl as aE, DataRouterContext as aF, DataRouterStateContext as aG, FetchersContext as aH, LocationContext as aI, NavigationContext as aJ, RouteContext as aK, ViewTransitionContext as aL, type RouteModule as aM, type History as aN, type ServerDataFrom as aO, type ClientDataFrom as aP, type Func as aQ, type Equal as aR, type Pretty as aS, generatePath as aa, href as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
1579
+ export { type HTMLFormMethod as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterSubscriber as J, type RouterNavigateOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type RouterFetchOptions as O, type ParamParseKey as P, type DataStrategyFunctionArgs as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyMatch as V, type DataStrategyResult as W, DataWithResponseInit as X, type ErrorResponse as Y, type FormEncType as Z, type FormMethod as _, type Router as a, type LazyRouteFunction as a0, type PathParam as a1, type RedirectFunction as a2, type ShouldRevalidateFunction as a3, type ShouldRevalidateFunctionArgs as a4, createPath as a5, parsePath as a6, IDLE_NAVIGATION as a7, IDLE_FETCHER as a8, IDLE_BLOCKER as a9, createBrowserHistory as aA, invariant as aB, createRouter as aC, ErrorResponseImpl as aD, DataRouterContext as aE, DataRouterStateContext as aF, FetchersContext as aG, LocationContext as aH, NavigationContext as aI, RouteContext as aJ, ViewTransitionContext as aK, type RouteModule as aL, type History as aM, type ServerDataFrom as aN, type ClientDataFrom as aO, type Func as aP, type Pretty as aQ, data as aa, generatePath as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
@@ -206,16 +206,6 @@ type UrlHistoryOptions = {
206
206
  v5Compat?: boolean;
207
207
  };
208
208
 
209
- interface Register {
210
- }
211
-
212
- type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
213
- type IsAny<T> = 0 extends 1 & T ? true : false;
214
- type Func = (...args: any[]) => unknown;
215
- type Pretty<T> = {
216
- [K in keyof T]: T[K];
217
- } & {};
218
-
219
209
  /**
220
210
  * Map of routeId -> data returned from a loader/action/error
221
211
  */
@@ -615,17 +605,6 @@ declare class ErrorResponseImpl implements ErrorResponse {
615
605
  * @category Utils
616
606
  */
617
607
  declare function isRouteErrorResponse(error: any): error is ErrorResponse;
618
- type AnyParams = Record<string, Record<string, string | undefined>>;
619
- type HrefParams = Register extends {
620
- params: infer TParams extends AnyParams;
621
- } ? TParams : AnyParams;
622
- type HrefArgs = {
623
- [K in keyof HrefParams]: ToHrefArgs<HrefParams[K]>;
624
- };
625
- type ToHrefArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
626
- T
627
- ];
628
- declare function href<Path extends keyof HrefArgs>(path: Path, ...args: HrefArgs[Path]): string;
629
608
 
630
609
  /**
631
610
  * A Router instance manages all navigation and data loading/mutations
@@ -1579,6 +1558,13 @@ type Serializable = undefined | null | boolean | string | symbol | number | Arra
1579
1558
  [key: PropertyKey]: Serializable;
1580
1559
  } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
1581
1560
 
1561
+ type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
1562
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1563
+ type Func = (...args: any[]) => unknown;
1564
+ type Pretty<T> = {
1565
+ [K in keyof T]: T[K];
1566
+ } & {};
1567
+
1582
1568
  type Serialize<T> = T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
1583
1569
  [K in keyof T]: Serialize<T[K]>;
1584
1570
  } : undefined;
@@ -1590,4 +1576,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
1590
1576
  type ClientDataFrom<T> = ClientData<DataFrom<T>>;
1591
1577
  type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
1592
1578
 
1593
- export { type LazyRouteFunction as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type RouterSubscriber as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterNavigateOptions as J, type RouterFetchOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type DataStrategyFunctionArgs as O, type ParamParseKey as P, type DataStrategyMatch as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyResult as V, DataWithResponseInit as W, type ErrorResponse as X, type FormEncType as Y, type FormMethod as Z, type HTMLFormMethod as _, type Router as a, type PathParam as a0, type RedirectFunction as a1, type ShouldRevalidateFunction as a2, type ShouldRevalidateFunctionArgs as a3, createPath as a4, parsePath as a5, IDLE_NAVIGATION as a6, IDLE_FETCHER as a7, IDLE_BLOCKER as a8, data as a9, type Register as aA, createBrowserHistory as aB, invariant as aC, createRouter as aD, ErrorResponseImpl as aE, DataRouterContext as aF, DataRouterStateContext as aG, FetchersContext as aH, LocationContext as aI, NavigationContext as aJ, RouteContext as aK, ViewTransitionContext as aL, type RouteModule as aM, type History as aN, type ServerDataFrom as aO, type ClientDataFrom as aP, type Func as aQ, type Equal as aR, type Pretty as aS, generatePath as aa, href as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
1579
+ export { type HTMLFormMethod as $, type ActionFunctionArgs as A, type BlockerFunction as B, type CreateStaticHandlerOptions as C, type DataStrategyFunction as D, type Equal as E, type FutureConfig as F, type GetScrollPositionFunction as G, type HydrationState as H, type InitialEntry as I, type RouterSubscriber as J, type RouterNavigateOptions as K, type LoaderFunctionArgs as L, type MetaFunction as M, type NavigateOptions as N, type RouterFetchOptions as O, type ParamParseKey as P, type DataStrategyFunctionArgs as Q, type RouteModules as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type DataStrategyMatch as V, type DataStrategyResult as W, DataWithResponseInit as X, type ErrorResponse as Y, type FormEncType as Z, type FormMethod as _, type Router as a, type LazyRouteFunction as a0, type PathParam as a1, type RedirectFunction as a2, type ShouldRevalidateFunction as a3, type ShouldRevalidateFunctionArgs as a4, createPath as a5, parsePath as a6, IDLE_NAVIGATION as a7, IDLE_FETCHER as a8, IDLE_BLOCKER as a9, createBrowserHistory as aA, invariant as aB, createRouter as aC, ErrorResponseImpl as aD, DataRouterContext as aE, DataRouterStateContext as aF, FetchersContext as aG, LocationContext as aH, NavigationContext as aI, RouteContext as aJ, ViewTransitionContext as aK, type RouteModule as aL, type History as aM, type ServerDataFrom as aN, type ClientDataFrom as aO, type Func as aP, type Pretty as aQ, data as aa, generatePath as ab, isRouteErrorResponse as ac, matchPath as ad, matchRoutes as ae, redirect as af, redirectDocument as ag, replace as ah, resolvePath as ai, type DataRouteMatch as aj, type DataRouteObject as ak, type Navigator as al, type PatchRoutesOnNavigationFunction as am, type PatchRoutesOnNavigationFunctionArgs as an, type RouteMatch as ao, type ClientActionFunction as ap, type ClientActionFunctionArgs as aq, type ClientLoaderFunction as ar, type ClientLoaderFunctionArgs as as, type HeadersArgs as at, type HeadersFunction as au, type MetaArgs as av, type MetaDescriptor as aw, type PageLinkDescriptor as ax, type HtmlLinkDescriptor as ay, type LinkDescriptor as az, type RouteManifest as b, type RelativeRoutingType as c, type Location as d, Action as e, type Path as f, type PathPattern as g, type PathMatch as h, type Params as i, type RouteObject as j, type Navigation as k, type RevalidationState as l, type SerializeFrom as m, type Blocker as n, type StaticHandlerContext as o, type StaticHandler as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type LinksFunction as t, type NonIndexRouteObject as u, type RouterState as v, type GetScrollRestorationKeyFunction as w, type Fetcher as x, type NavigationStates as y, type RouterInit as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "0.0.0-experimental-208f173a8",
3
+ "version": "0.0.0-experimental-8e9d8ef63",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",