react-router 0.0.0-experimental-aecfb0db1 → 0.0.0-experimental-5bbc45fb6
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.
- package/dist/development/{chunk-RXFCVJK2.mjs → chunk-EKICUOCX.mjs} +10 -19
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +2 -2
- package/dist/development/index.d.mts +16 -21
- package/dist/development/index.d.ts +13 -19
- package/dist/development/index.js +10 -19
- package/dist/development/index.mjs +2 -2
- package/dist/development/lib/types/{route-module.d.mts → internal.d.mts} +83 -16
- package/dist/{production/lib/types/route-module.d.mts → development/lib/types/internal.d.ts} +82 -16
- package/dist/development/lib/types/{route-module.js → internal.js} +4 -4
- package/dist/development/lib/types/{route-module.mjs → internal.mjs} +1 -1
- package/dist/development/{lib-BJBhVBWN.d.mts → lib-DOOHL1pK.d.mts} +1 -1
- package/dist/development/{route-data-fNWkI-4T.d.ts → register-DEZBC9Yl.d.ts} +19 -1
- package/dist/development/register-e9PGCFx1.d.mts +10 -0
- package/dist/development/{route-data-BmDen1H_.d.mts → route-data-BwJdBC92.d.mts} +10 -1
- package/dist/production/{chunk-TLRBG5AD.mjs → chunk-5UK3OH7I.mjs} +10 -19
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +2 -2
- package/dist/production/index.d.mts +16 -21
- package/dist/production/index.d.ts +13 -19
- package/dist/production/index.js +10 -19
- package/dist/production/index.mjs +2 -2
- package/dist/{development/lib/types/route-module.d.ts → production/lib/types/internal.d.mts} +83 -16
- package/dist/production/lib/types/{route-module.d.ts → internal.d.ts} +82 -16
- package/dist/production/lib/types/{route-module.js → internal.js} +4 -4
- package/dist/production/lib/types/{route-module.mjs → internal.mjs} +1 -1
- package/dist/production/{lib-BJBhVBWN.d.mts → lib-DOOHL1pK.d.mts} +1 -1
- package/dist/production/{route-data-fNWkI-4T.d.ts → register-DEZBC9Yl.d.ts} +19 -1
- package/dist/production/register-e9PGCFx1.d.mts +10 -0
- package/dist/production/{route-data-BmDen1H_.d.mts → route-data-BwJdBC92.d.mts} +10 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { h as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, w as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, r as NonIndexRouteObject, a3 as LazyRouteFunction, n as IndexRouteObject, L as Location, A as Action, as as Navigator, au as RouteMatch, aS as RouteManifest, aT as ServerRouteModule, s as MiddlewareEnabled, ac as unstable_RouterContextProvider, t as AppLoadContext, a4 as LoaderFunctionArgs, W as ActionFunctionArgs, l as StaticHandlerContext, b as RouteModules, x as DataRouteObject, y as ClientLoaderFunction, a2 as HTMLFormMethod, a0 as FormEncType, aC as PageLinkDescriptor, aU as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-
|
|
2
|
+
import { h as RouteObject, R as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, w as PatchRoutesOnNavigationFunction, a as Router$1, T as To, c as RelativeRoutingType, r as NonIndexRouteObject, a3 as LazyRouteFunction, n as IndexRouteObject, L as Location, A as Action, as as Navigator, au as RouteMatch, aS as RouteManifest, aT as ServerRouteModule, s as MiddlewareEnabled, ac as unstable_RouterContextProvider, t as AppLoadContext, a4 as LoaderFunctionArgs, W as ActionFunctionArgs, l as StaticHandlerContext, b as RouteModules, x as DataRouteObject, y as ClientLoaderFunction, a2 as HTMLFormMethod, a0 as FormEncType, aC as PageLinkDescriptor, aU as History, z as GetScrollRestorationKeyFunction, N as NavigateOptions, J as Fetcher, S as SerializeFrom, B as BlockerFunction } from './route-data-BwJdBC92.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
@@ -1734,6 +1734,15 @@ type Func = (...args: any[]) => unknown;
|
|
|
1734
1734
|
type Pretty<T> = {
|
|
1735
1735
|
[K in keyof T]: T[K];
|
|
1736
1736
|
} & {};
|
|
1737
|
+
type Normalize<T> = _Normalize<UnionKeys<T>, T>;
|
|
1738
|
+
type _Normalize<Key extends keyof any, T> = T extends infer U ? Pretty<{
|
|
1739
|
+
[K in Key as K extends keyof U ? undefined extends U[K] ? never : K : never]: K extends keyof U ? U[K] : never;
|
|
1740
|
+
} & {
|
|
1741
|
+
[K in Key as K extends keyof U ? undefined extends U[K] ? K : never : never]?: K extends keyof U ? U[K] : never;
|
|
1742
|
+
} & {
|
|
1743
|
+
[K in Key as K extends keyof U ? never : K]?: undefined;
|
|
1744
|
+
}> : never;
|
|
1745
|
+
type UnionKeys<T> = T extends any ? keyof T : never;
|
|
1737
1746
|
|
|
1738
1747
|
type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : 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> ? {
|
|
1739
1748
|
[K in keyof T]: Serialize<T[K]>;
|
|
@@ -1746,4 +1755,13 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1746
1755
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1747
1756
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1748
1757
|
|
|
1749
|
-
|
|
1758
|
+
/**
|
|
1759
|
+
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
|
|
1760
|
+
* React Router should handle this for you via type generation.
|
|
1761
|
+
*
|
|
1762
|
+
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
|
|
1763
|
+
*/
|
|
1764
|
+
interface Register {
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
export { type Equal as $, Action as A, type BlockerFunction as B, type ClientLoaderFunction as C, type DataStrategyFunction as D, type FormEncType as E, type FutureConfig as F, type PageLinkDescriptor as G, type HydrationState as H, type InitialEntry as I, type History as J, type GetScrollRestorationKeyFunction as K, type LazyRouteFunction as L, type MiddlewareEnabled as M, type NonIndexRouteObject as N, type Fetcher as O, type PatchRoutesOnNavigationFunction as P, type StaticHandler as Q, type RouteObject as R, type ServerRouteModule as S, type To as T, type UIMatch as U, type CreateStaticHandlerOptions as V, type unstable_InitialContext as W, type LoaderFunction as X, type ActionFunction as Y, type MetaFunction as Z, type LinksFunction as _, type RouterInit as a, type Pretty as a$, type Register as a0, type RouterState as a1, type GetScrollPositionFunction as a2, type NavigationStates as a3, type RouterSubscriber as a4, type RouterNavigateOptions as a5, type RouterFetchOptions as a6, type DataStrategyFunctionArgs as a7, type DataStrategyMatch as a8, type DataStrategyResult as a9, type ClientActionFunction as aA, type ClientActionFunctionArgs as aB, type ClientLoaderFunctionArgs as aC, type HeadersArgs as aD, type HeadersFunction as aE, type MetaArgs as aF, type MetaDescriptor as aG, type HtmlLinkDescriptor as aH, type LinkDescriptor as aI, type Future as aJ, type unstable_SerializesTo as aK, createBrowserHistory as aL, invariant as aM, createRouter as aN, ErrorResponseImpl as aO, DataRouterContext as aP, DataRouterStateContext as aQ, FetchersContext as aR, LocationContext as aS, NavigationContext as aT, RouteContext as aU, ViewTransitionContext as aV, type Normalize as aW, type ServerDataFrom as aX, type ClientDataFrom as aY, type Func as aZ, type unstable_MiddlewareNextFunction as a_, DataWithResponseInit as aa, type ErrorResponse as ab, type FormMethod as ac, type unstable_MiddlewareFunction as ad, type PathParam as ae, type RedirectFunction as af, type unstable_RouterContext as ag, type ShouldRevalidateFunction as ah, type ShouldRevalidateFunctionArgs as ai, unstable_createContext as aj, createPath as ak, parsePath as al, IDLE_NAVIGATION as am, IDLE_FETCHER as an, IDLE_BLOCKER as ao, data as ap, generatePath as aq, isRouteErrorResponse as ar, matchPath as as, matchRoutes as at, redirect as au, redirectDocument as av, replace as aw, resolvePath as ax, type DataRouteMatch as ay, type PatchRoutesOnNavigationFunctionArgs as az, type Router as b, type RelativeRoutingType as c, type IndexRouteObject as d, type Location as e, type Navigator as f, type RouteMatch as g, type RouteManifest as h, type AppLoadContext as i, type LoaderFunctionArgs as j, type ActionFunctionArgs as k, type StaticHandlerContext as l, type RouteModules as m, type DataRouteObject as n, type ParamParseKey as o, type Path as p, type PathPattern as q, type PathMatch as r, type NavigateOptions as s, type Params as t, unstable_RouterContextProvider as u, type Navigation as v, type RevalidationState as w, type SerializeFrom as x, type Blocker as y, type HTMLFormMethod as z };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
|
|
3
|
+
* React Router should handle this for you via type generation.
|
|
4
|
+
*
|
|
5
|
+
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
|
|
6
|
+
*/
|
|
7
|
+
interface Register {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type { Register as R };
|
|
@@ -1734,6 +1734,15 @@ type Func = (...args: any[]) => unknown;
|
|
|
1734
1734
|
type Pretty<T> = {
|
|
1735
1735
|
[K in keyof T]: T[K];
|
|
1736
1736
|
} & {};
|
|
1737
|
+
type Normalize<T> = _Normalize<UnionKeys<T>, T>;
|
|
1738
|
+
type _Normalize<Key extends keyof any, T> = T extends infer U ? Pretty<{
|
|
1739
|
+
[K in Key as K extends keyof U ? undefined extends U[K] ? never : K : never]: K extends keyof U ? U[K] : never;
|
|
1740
|
+
} & {
|
|
1741
|
+
[K in Key as K extends keyof U ? undefined extends U[K] ? K : never : never]?: K extends keyof U ? U[K] : never;
|
|
1742
|
+
} & {
|
|
1743
|
+
[K in Key as K extends keyof U ? never : K]?: undefined;
|
|
1744
|
+
}> : never;
|
|
1745
|
+
type UnionKeys<T> = T extends any ? keyof T : never;
|
|
1737
1746
|
|
|
1738
1747
|
type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : 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> ? {
|
|
1739
1748
|
[K in keyof T]: Serialize<T[K]>;
|
|
@@ -1746,4 +1755,4 @@ type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
|
|
1746
1755
|
type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
|
1747
1756
|
type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [ClientLoaderFunctionArgs | ClientActionFunctionArgs] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
|
1748
1757
|
|
|
1749
|
-
export { type ErrorResponse as $, Action 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 Fetcher as J, type NavigationStates as K, type Location as L, type MetaFunction as M, type NavigateOptions as N, type RouterSubscriber as O, type ParamParseKey as P, type RouterNavigateOptions as Q, type RouterInit as R, type SerializeFrom as S, type To as T, type UIMatch as U, type RouterFetchOptions as V, type ActionFunctionArgs as W, type DataStrategyFunctionArgs as X, type DataStrategyMatch as Y, type DataStrategyResult as Z, DataWithResponseInit as _, type Router as a, type FormEncType as a0, type FormMethod as a1, type HTMLFormMethod as a2, type LazyRouteFunction as a3, type LoaderFunctionArgs as a4, type unstable_MiddlewareFunction as a5, type PathParam as a6, type RedirectFunction as a7, type unstable_RouterContext as a8, type ShouldRevalidateFunction as a9, type MetaArgs as aA, type MetaDescriptor as aB, type PageLinkDescriptor as aC, type HtmlLinkDescriptor as aD, type LinkDescriptor as aE, type Future as aF, type unstable_SerializesTo as aG, createBrowserHistory as aH, invariant as aI, createRouter as aJ, ErrorResponseImpl as aK, DataRouterContext as aL, DataRouterStateContext as aM, FetchersContext as aN, LocationContext as aO, NavigationContext as aP, RouteContext as aQ, ViewTransitionContext as aR, type RouteManifest as aS, type ServerRouteModule as aT, type History as aU, type
|
|
1758
|
+
export { type ErrorResponse as $, Action 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 Fetcher as J, type NavigationStates as K, type Location as L, type MetaFunction as M, type NavigateOptions as N, type RouterSubscriber as O, type ParamParseKey as P, type RouterNavigateOptions as Q, type RouterInit as R, type SerializeFrom as S, type To as T, type UIMatch as U, type RouterFetchOptions as V, type ActionFunctionArgs as W, type DataStrategyFunctionArgs as X, type DataStrategyMatch as Y, type DataStrategyResult as Z, DataWithResponseInit as _, type Router as a, type FormEncType as a0, type FormMethod as a1, type HTMLFormMethod as a2, type LazyRouteFunction as a3, type LoaderFunctionArgs as a4, type unstable_MiddlewareFunction as a5, type PathParam as a6, type RedirectFunction as a7, type unstable_RouterContext as a8, type ShouldRevalidateFunction as a9, type MetaArgs as aA, type MetaDescriptor as aB, type PageLinkDescriptor as aC, type HtmlLinkDescriptor as aD, type LinkDescriptor as aE, type Future as aF, type unstable_SerializesTo as aG, createBrowserHistory as aH, invariant as aI, createRouter as aJ, ErrorResponseImpl as aK, DataRouterContext as aL, DataRouterStateContext as aM, FetchersContext as aN, LocationContext as aO, NavigationContext as aP, RouteContext as aQ, ViewTransitionContext as aR, type RouteManifest as aS, type ServerRouteModule as aT, type History as aU, type Normalize as aV, type ServerDataFrom as aW, type ClientDataFrom as aX, type Func as aY, type unstable_MiddlewareNextFunction as aZ, type Pretty as a_, type ShouldRevalidateFunctionArgs as aa, unstable_createContext as ab, unstable_RouterContextProvider as ac, createPath as ad, parsePath as ae, IDLE_NAVIGATION as af, IDLE_FETCHER as ag, IDLE_BLOCKER as ah, data as ai, generatePath as aj, isRouteErrorResponse as ak, matchPath as al, matchRoutes as am, redirect as an, redirectDocument as ao, replace as ap, resolvePath as aq, type DataRouteMatch as ar, type Navigator as as, type PatchRoutesOnNavigationFunctionArgs as at, type RouteMatch as au, type ClientActionFunction as av, type ClientActionFunctionArgs as aw, type ClientLoaderFunctionArgs as ax, type HeadersArgs as ay, type HeadersFunction as az, type RouteModules as b, type RelativeRoutingType as c, type Path as d, type PathPattern as e, type PathMatch as f, type Params as g, type RouteObject as h, type Navigation as i, type RevalidationState as j, type Blocker as k, type StaticHandlerContext as l, type StaticHandler as m, type IndexRouteObject as n, type LoaderFunction as o, type ActionFunction as p, type LinksFunction as q, type NonIndexRouteObject as r, type MiddlewareEnabled as s, type AppLoadContext as t, type unstable_InitialContext as u, type RouterState as v, type PatchRoutesOnNavigationFunction as w, type DataRouteObject as x, type ClientLoaderFunction as y, type GetScrollRestorationKeyFunction as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-5bbc45fb6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -5502,25 +5502,11 @@ function RouterProvider({
|
|
|
5502
5502
|
viewTransitionOpts == null || isViewTransitionAvailable,
|
|
5503
5503
|
"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
|
|
5504
5504
|
);
|
|
5505
|
-
const resetTransition = () => {
|
|
5506
|
-
setRenderDfd(void 0);
|
|
5507
|
-
setTransition(void 0);
|
|
5508
|
-
setPendingState(void 0);
|
|
5509
|
-
setVtContext({ isTransitioning: false });
|
|
5510
|
-
};
|
|
5511
5505
|
if (!viewTransitionOpts || !isViewTransitionAvailable) {
|
|
5512
|
-
renderDfd?.resolve();
|
|
5513
|
-
transition?.skipTransition();
|
|
5514
5506
|
if (reactDomFlushSyncImpl && flushSync) {
|
|
5515
|
-
reactDomFlushSyncImpl(() =>
|
|
5516
|
-
setStateImpl(newState);
|
|
5517
|
-
resetTransition();
|
|
5518
|
-
});
|
|
5507
|
+
reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
5519
5508
|
} else {
|
|
5520
|
-
React3.startTransition(() =>
|
|
5521
|
-
setStateImpl(newState);
|
|
5522
|
-
resetTransition();
|
|
5523
|
-
});
|
|
5509
|
+
React3.startTransition(() => setStateImpl(newState));
|
|
5524
5510
|
}
|
|
5525
5511
|
return;
|
|
5526
5512
|
}
|
|
@@ -5541,7 +5527,12 @@ function RouterProvider({
|
|
|
5541
5527
|
reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
5542
5528
|
});
|
|
5543
5529
|
t.finished.finally(() => {
|
|
5544
|
-
reactDomFlushSyncImpl(() =>
|
|
5530
|
+
reactDomFlushSyncImpl(() => {
|
|
5531
|
+
setRenderDfd(void 0);
|
|
5532
|
+
setTransition(void 0);
|
|
5533
|
+
setPendingState(void 0);
|
|
5534
|
+
setVtContext({ isTransitioning: false });
|
|
5535
|
+
});
|
|
5545
5536
|
});
|
|
5546
5537
|
reactDomFlushSyncImpl(() => setTransition(t));
|
|
5547
5538
|
return;
|
|
@@ -8649,7 +8640,7 @@ function mergeRefs(...refs) {
|
|
|
8649
8640
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8650
8641
|
try {
|
|
8651
8642
|
if (isBrowser) {
|
|
8652
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8643
|
+
window.__reactRouterVersion = "0.0.0-experimental-5bbc45fb6";
|
|
8653
8644
|
}
|
|
8654
8645
|
} catch (e) {
|
|
8655
8646
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterProviderProps$1 } from './lib-
|
|
3
|
-
import { R as RouterInit } from './route-data-
|
|
2
|
+
import { R as RouterProviderProps$1 } from './lib-DOOHL1pK.mjs';
|
|
3
|
+
import { R as RouterInit } from './route-data-BwJdBC92.mjs';
|
|
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-
|
|
2
|
+
* react-router v0.0.0-experimental-5bbc45fb6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
invariant,
|
|
26
26
|
mapRouteProperties,
|
|
27
27
|
useFogOFWarDiscovery
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-5UK3OH7I.mjs";
|
|
29
29
|
|
|
30
30
|
// lib/dom-export/dom-router-provider.tsx
|
|
31
31
|
import * as React from "react";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { a as Router, b as RouteModules, D as DataStrategyFunction, T as To, c as RelativeRoutingType, L as Location, A as Action, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, N as NavigateOptions, g as Params
|
|
2
|
-
export { W as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, ar as DataRouteMatch, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, J as Fetcher, a0 as FormEncType, a1 as FormMethod, aF as Future, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ah as IDLE_BLOCKER, ag as IDLE_FETCHER, af as IDLE_NAVIGATION, a3 as LazyRouteFunction, aE as LinkDescriptor, a4 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, as as Navigator, aC as PageLinkDescriptor, at as PatchRoutesOnNavigationFunctionArgs, a6 as PathParam, a7 as RedirectFunction, au as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a9 as ShouldRevalidateFunction, aa as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aK as UNSAFE_ErrorResponseImpl, aN as UNSAFE_FetchersContext, aO as UNSAFE_LocationContext, aP as UNSAFE_NavigationContext, aQ as UNSAFE_RouteContext, aR as UNSAFE_ViewTransitionContext, aH as UNSAFE_createBrowserHistory, aJ as UNSAFE_createRouter, aI as UNSAFE_invariant, ad as createPath, ai as data, aj as generatePath, ak as isRouteErrorResponse, al as matchPath, am as matchRoutes, ae as parsePath, an as redirect, ao as redirectDocument, ap as replace, aq as resolvePath, a5 as unstable_MiddlewareFunction, a8 as unstable_RouterContext, ac as unstable_RouterContextProvider, aG as unstable_SerializesTo, ab as unstable_createContext } from './route-data-
|
|
3
|
-
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild } from './lib-
|
|
4
|
-
export { f as Await, a as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, v as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, w as FormProps, ah as HandleDataRequestFunction, ai as HandleDocumentRequestFunction, aj as HandleErrorFunction, T as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, s as LinkProps, ad as Links, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, ac as Meta, W as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af 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, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, x as ScrollRestorationProps, ak as ServerEntryModule, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, an as UNSAFE_FrameworkContext, ao as UNSAFE_createClientRoutes, ap as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, al as UNSAFE_hydrationRouteProperties, am as UNSAFE_mapRouteProperties, aq as UNSAFE_shouldHydrateRouteLoader, ar as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './lib-
|
|
1
|
+
import { a as Router, b as RouteModules, D as DataStrategyFunction, T as To, c as RelativeRoutingType, L as Location, A as Action, P as ParamParseKey, d as Path, e as PathPattern, f as PathMatch, N as NavigateOptions, g as Params, h as RouteObject, i as Navigation, j as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, k as Blocker, l as StaticHandlerContext, m as StaticHandler, F as FutureConfig, C as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as unstable_InitialContext, n as IndexRouteObject, o as LoaderFunction, p as ActionFunction, M as MetaFunction, q as LinksFunction, r as NonIndexRouteObject, s as MiddlewareEnabled, t as AppLoadContext, E as Equal, v as RouterState, w as PatchRoutesOnNavigationFunction, x as DataRouteObject, y as ClientLoaderFunction } from './route-data-BwJdBC92.mjs';
|
|
2
|
+
export { W as ActionFunctionArgs, av as ClientActionFunction, aw as ClientActionFunctionArgs, ax as ClientLoaderFunctionArgs, ar as DataRouteMatch, X as DataStrategyFunctionArgs, Y as DataStrategyMatch, Z as DataStrategyResult, $ as ErrorResponse, J as Fetcher, a0 as FormEncType, a1 as FormMethod, aF as Future, G as GetScrollPositionFunction, z as GetScrollRestorationKeyFunction, a2 as HTMLFormMethod, ay as HeadersArgs, az as HeadersFunction, aD as HtmlLinkDescriptor, ah as IDLE_BLOCKER, ag as IDLE_FETCHER, af as IDLE_NAVIGATION, a3 as LazyRouteFunction, aE as LinkDescriptor, a4 as LoaderFunctionArgs, aA as MetaArgs, aB as MetaDescriptor, K as NavigationStates, as as Navigator, aC as PageLinkDescriptor, at as PatchRoutesOnNavigationFunctionArgs, a6 as PathParam, a7 as RedirectFunction, au as RouteMatch, V as RouterFetchOptions, R as RouterInit, Q as RouterNavigateOptions, O as RouterSubscriber, a9 as ShouldRevalidateFunction, aa as ShouldRevalidateFunctionArgs, aL as UNSAFE_DataRouterContext, aM as UNSAFE_DataRouterStateContext, _ as UNSAFE_DataWithResponseInit, aK as UNSAFE_ErrorResponseImpl, aN as UNSAFE_FetchersContext, aO as UNSAFE_LocationContext, aP as UNSAFE_NavigationContext, aQ as UNSAFE_RouteContext, aR as UNSAFE_ViewTransitionContext, aH as UNSAFE_createBrowserHistory, aJ as UNSAFE_createRouter, aI as UNSAFE_invariant, ad as createPath, ai as data, aj as generatePath, ak as isRouteErrorResponse, al as matchPath, am as matchRoutes, ae as parsePath, an as redirect, ao as redirectDocument, ap as replace, aq as resolvePath, a5 as unstable_MiddlewareFunction, a8 as unstable_RouterContext, ac as unstable_RouterContextProvider, aG as unstable_SerializesTo, ab as unstable_createContext } from './route-data-BwJdBC92.mjs';
|
|
3
|
+
import { A as AssetsManifest, E as EntryContext, F as FutureConfig$1, S as ServerBuild } from './lib-DOOHL1pK.mjs';
|
|
4
|
+
export { f as Await, a as AwaitProps, Q as BrowserRouter, B as BrowserRouterProps, D as DOMRouterOpts, v as FetcherFormProps, C as FetcherSubmitFunction, a6 as FetcherSubmitOptions, G as FetcherWithComponents, X as Form, w as FormProps, ah as HandleDataRequestFunction, ai as HandleDocumentRequestFunction, aj as HandleErrorFunction, T as HashRouter, H as HashRouterProps, q as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, U as Link, s as LinkProps, ad as Links, g as MemoryRouter, M as MemoryRouterOpts, b as MemoryRouterProps, ac as Meta, W as NavLink, t as NavLinkProps, u as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a7 as ParamKeyValuePair, P as PathRouteProps, af 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, ae as Scripts, ag as ScriptsProps, Y as ScrollRestoration, x as ScrollRestorationProps, ak as ServerEntryModule, y as SetURLSearchParams, z as SubmitFunction, a8 as SubmitOptions, aa as SubmitTarget, an as UNSAFE_FrameworkContext, ao as UNSAFE_createClientRoutes, ap as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, al as UNSAFE_hydrationRouteProperties, am as UNSAFE_mapRouteProperties, aq as UNSAFE_shouldHydrateRouteLoader, ar as UNSAFE_useScrollRestoration, a9 as URLSearchParamsInit, J as createBrowserRouter, K as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, p as createRoutesFromElements, ab as createSearchParams, r as renderMatches, V as unstable_HistoryRouter, a4 as unstable_usePrompt, a3 as useBeforeUnload, a1 as useFetcher, a2 as useFetchers, a0 as useFormAction, Z as useLinkClickHandler, _ as useSearchParams, $ as useSubmit, a5 as useViewTransitionState } from './lib-DOOHL1pK.mjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ReactElement } from 'react';
|
|
7
7
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
8
8
|
export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
|
9
|
+
import { R as Register } from './register-e9PGCFx1.mjs';
|
|
9
10
|
|
|
10
11
|
declare const SingleFetchRedirectSymbol: unique symbol;
|
|
11
12
|
declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, basename: string | undefined): DataStrategyFunction;
|
|
@@ -147,7 +148,7 @@ declare function useOutlet(context?: unknown): React.ReactElement | null;
|
|
|
147
148
|
*/
|
|
148
149
|
declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
|
|
149
150
|
ParamsOrKey
|
|
150
|
-
] extends [string] ? Params
|
|
151
|
+
] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
|
|
151
152
|
/**
|
|
152
153
|
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.
|
|
153
154
|
|
|
@@ -730,23 +731,17 @@ type DevServerHooks = {
|
|
|
730
731
|
};
|
|
731
732
|
declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
|
|
732
733
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
type AnyParams = Record<string, Record<string, string | undefined>>;
|
|
743
|
-
type Params = Register extends {
|
|
744
|
-
params: infer RegisteredParams extends AnyParams;
|
|
745
|
-
} ? RegisteredParams : AnyParams;
|
|
734
|
+
type AnyParams = Record<string, string | undefined>;
|
|
735
|
+
type AnyPages = Record<string, {
|
|
736
|
+
params: AnyParams;
|
|
737
|
+
}>;
|
|
738
|
+
type Pages = Register extends {
|
|
739
|
+
pages: infer RegisteredPages extends AnyPages;
|
|
740
|
+
} ? RegisteredPages : AnyPages;
|
|
746
741
|
type Args = {
|
|
747
|
-
[K in keyof
|
|
742
|
+
[K in keyof Pages]: ToArgs<Pages[K]["params"]>;
|
|
748
743
|
};
|
|
749
|
-
type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
|
|
744
|
+
type ToArgs<T extends AnyParams> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
|
|
750
745
|
T
|
|
751
746
|
];
|
|
752
747
|
/**
|
|
@@ -797,4 +792,4 @@ declare function getHydrationData(state: {
|
|
|
797
792
|
hasHydrateFallback: boolean;
|
|
798
793
|
}, location: Path, basename: string | undefined, isSpaMode: boolean): HydrationState;
|
|
799
794
|
|
|
800
|
-
export { ActionFunction, AppLoadContext, Blocker, BlockerFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params
|
|
795
|
+
export { ActionFunction, AppLoadContext, Blocker, BlockerFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, DataRouteObject, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, PatchRoutesOnNavigationFunction, Path, PathMatch, PathPattern, Register, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, ServerBuild, 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, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, unstable_InitialContext, 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
|
-
import { R as RouteObject, a as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, b as Router$1, T as To, c as RelativeRoutingType, N as NonIndexRouteObject, L as LazyRouteFunction, d as IndexRouteObject, e as Location, A as Action, f as Navigator, g as RouteMatch, h as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, i as AppLoadContext, j as LoaderFunctionArgs, k as ActionFunctionArgs, l as StaticHandlerContext, m as RouteModules, n as DataRouteObject, C as ClientLoaderFunction, o as ParamParseKey, p as Path, q as PathPattern, r as PathMatch, s as NavigateOptions, t as Params
|
|
2
|
-
export {
|
|
1
|
+
import { R as RouteObject, a as RouterInit, F as FutureConfig$1, H as HydrationState, I as InitialEntry, D as DataStrategyFunction, P as PatchRoutesOnNavigationFunction, b as Router$1, T as To, c as RelativeRoutingType, N as NonIndexRouteObject, L as LazyRouteFunction, d as IndexRouteObject, e as Location, A as Action, f as Navigator, g as RouteMatch, h as RouteManifest, S as ServerRouteModule, M as MiddlewareEnabled, u as unstable_RouterContextProvider, i as AppLoadContext, j as LoaderFunctionArgs, k as ActionFunctionArgs, l as StaticHandlerContext, m as RouteModules, n as DataRouteObject, C as ClientLoaderFunction, o as ParamParseKey, p as Path, q as PathPattern, r as PathMatch, s as NavigateOptions, t as Params, v as Navigation, w as RevalidationState, U as UIMatch, x as SerializeFrom, B as BlockerFunction, y as Blocker, z as HTMLFormMethod, E as FormEncType, G as PageLinkDescriptor, J as History, K as GetScrollRestorationKeyFunction, O as Fetcher, Q as StaticHandler, V as CreateStaticHandlerOptions$1, W as unstable_InitialContext, X as LoaderFunction, Y as ActionFunction, Z as MetaFunction, _ as LinksFunction, $ as Equal, a0 as Register, a1 as RouterState } from './register-DEZBC9Yl.js';
|
|
2
|
+
export { aA as ClientActionFunction, aB as ClientActionFunctionArgs, aC as ClientLoaderFunctionArgs, ay as DataRouteMatch, a7 as DataStrategyFunctionArgs, a8 as DataStrategyMatch, a9 as DataStrategyResult, ab as ErrorResponse, ac as FormMethod, aJ as Future, a2 as GetScrollPositionFunction, aD as HeadersArgs, aE as HeadersFunction, aH as HtmlLinkDescriptor, ao as IDLE_BLOCKER, an as IDLE_FETCHER, am as IDLE_NAVIGATION, aI as LinkDescriptor, aF as MetaArgs, aG as MetaDescriptor, a3 as NavigationStates, az as PatchRoutesOnNavigationFunctionArgs, ae as PathParam, af as RedirectFunction, a6 as RouterFetchOptions, a5 as RouterNavigateOptions, a4 as RouterSubscriber, ah as ShouldRevalidateFunction, ai as ShouldRevalidateFunctionArgs, aP as UNSAFE_DataRouterContext, aQ as UNSAFE_DataRouterStateContext, aa as UNSAFE_DataWithResponseInit, aO as UNSAFE_ErrorResponseImpl, aR as UNSAFE_FetchersContext, aS as UNSAFE_LocationContext, aT as UNSAFE_NavigationContext, aU as UNSAFE_RouteContext, aV as UNSAFE_ViewTransitionContext, aL as UNSAFE_createBrowserHistory, aN as UNSAFE_createRouter, aM as UNSAFE_invariant, ak as createPath, ap as data, aq as generatePath, ar as isRouteErrorResponse, as as matchPath, at as matchRoutes, al as parsePath, au as redirect, av as redirectDocument, aw as replace, ax as resolvePath, ad as unstable_MiddlewareFunction, ag as unstable_RouterContext, aK as unstable_SerializesTo, aj as unstable_createContext } from './register-DEZBC9Yl.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
import { ParseOptions, SerializeOptions } from 'cookie';
|
|
@@ -689,7 +689,7 @@ declare function useOutlet(context?: unknown): React.ReactElement | null;
|
|
|
689
689
|
*/
|
|
690
690
|
declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
|
|
691
691
|
ParamsOrKey
|
|
692
|
-
] extends [string] ? Params
|
|
692
|
+
] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
|
|
693
693
|
/**
|
|
694
694
|
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.
|
|
695
695
|
|
|
@@ -2460,23 +2460,17 @@ type DevServerHooks = {
|
|
|
2460
2460
|
};
|
|
2461
2461
|
declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
|
|
2462
2462
|
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
type AnyParams = Record<string, Record<string, string | undefined>>;
|
|
2473
|
-
type Params = Register extends {
|
|
2474
|
-
params: infer RegisteredParams extends AnyParams;
|
|
2475
|
-
} ? RegisteredParams : AnyParams;
|
|
2463
|
+
type AnyParams = Record<string, string | undefined>;
|
|
2464
|
+
type AnyPages = Record<string, {
|
|
2465
|
+
params: AnyParams;
|
|
2466
|
+
}>;
|
|
2467
|
+
type Pages = Register extends {
|
|
2468
|
+
pages: infer RegisteredPages extends AnyPages;
|
|
2469
|
+
} ? RegisteredPages : AnyPages;
|
|
2476
2470
|
type Args = {
|
|
2477
|
-
[K in keyof
|
|
2471
|
+
[K in keyof Pages]: ToArgs<Pages[K]["params"]>;
|
|
2478
2472
|
};
|
|
2479
|
-
type ToArgs<T> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
|
|
2473
|
+
type ToArgs<T extends AnyParams> = Equal<T, {}> extends true ? [] : Partial<T> extends T ? [T] | [] : [
|
|
2480
2474
|
T
|
|
2481
2475
|
];
|
|
2482
2476
|
/**
|
|
@@ -2527,4 +2521,4 @@ declare function getHydrationData(state: {
|
|
|
2527
2521
|
hasHydrateFallback: boolean;
|
|
2528
2522
|
}, location: Path, basename: string | undefined, isSpaMode: boolean): HydrationState;
|
|
2529
2523
|
|
|
2530
|
-
export { ActionFunction, ActionFunctionArgs, AppLoadContext, Await, type AwaitProps, Blocker, BlockerFunction, BrowserRouter, type BrowserRouterProps, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, DataRouteObject, Router$1 as DataRouter, DataStrategyFunction, type EntryContext, Fetcher, type FetcherFormProps, type FetcherSubmitFunction, type FetcherSubmitOptions, type FetcherWithComponents, type FlashSessionData, Form, FormEncType, type FormProps, GetScrollRestorationKeyFunction, HTMLFormMethod, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HashRouter, type HashRouterProps, type HistoryRouterProps, HydrationState, IndexRouteObject, type IndexRouteProps, InitialEntry, type IsCookieFunction, type IsSessionFunction, type LayoutRouteProps, LazyRouteFunction, Link, type LinkProps, Links, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouter, type MemoryRouterOpts, type MemoryRouterProps, Meta, MetaFunction, NavLink, type NavLinkProps, type NavLinkRenderProps, Navigate, type NavigateFunction, NavigateOptions, type NavigateProps, Navigation, Action as NavigationType, Navigator, NonIndexRouteObject, Outlet, type OutletProps, PageLinkDescriptor, type ParamKeyValuePair, ParamParseKey, Params
|
|
2524
|
+
export { ActionFunction, ActionFunctionArgs, AppLoadContext, Await, type AwaitProps, Blocker, BlockerFunction, BrowserRouter, type BrowserRouterProps, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, type DOMRouterOpts, DataRouteObject, Router$1 as DataRouter, DataStrategyFunction, type EntryContext, Fetcher, type FetcherFormProps, type FetcherSubmitFunction, type FetcherSubmitOptions, type FetcherWithComponents, type FlashSessionData, Form, FormEncType, type FormProps, GetScrollRestorationKeyFunction, HTMLFormMethod, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, HashRouter, type HashRouterProps, type HistoryRouterProps, HydrationState, IndexRouteObject, type IndexRouteProps, InitialEntry, type IsCookieFunction, type IsSessionFunction, type LayoutRouteProps, LazyRouteFunction, Link, type LinkProps, Links, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouter, type MemoryRouterOpts, type MemoryRouterProps, Meta, MetaFunction, NavLink, type NavLinkProps, type NavLinkRenderProps, Navigate, type NavigateFunction, NavigateOptions, type NavigateProps, Navigation, Action as NavigationType, Navigator, NonIndexRouteObject, Outlet, type OutletProps, PageLinkDescriptor, type ParamKeyValuePair, ParamParseKey, Params, PatchRoutesOnNavigationFunction, Path, PathMatch, PathPattern, type PathRouteProps, PrefetchPageLinks, Register, RelativeRoutingType, type RequestHandler, RevalidationState, Route$1 as Route, RouteMatch, RouteObject, type RouteProps, Router, RouterInit, type RouterProps, RouterProvider, type RouterProviderProps, RouterState, Routes, type RoutesProps, type RoutesTestStubProps, Scripts, type ScriptsProps, ScrollRestoration, type ScrollRestorationProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, type SetURLSearchParams, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, type SubmitFunction, type SubmitOptions, type SubmitTarget, To, UIMatch, type AssetsManifest as UNSAFE_AssetsManifest, FrameworkContext as UNSAFE_FrameworkContext, MiddlewareEnabled as UNSAFE_MiddlewareEnabled, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, createClientRoutes as UNSAFE_createClientRoutes, createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getHydrationData as UNSAFE_getHydrationData, getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction, getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy, hydrationRouteProperties as UNSAFE_hydrationRouteProperties, mapRouteProperties as UNSAFE_mapRouteProperties, shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader, useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery, useScrollRestoration as UNSAFE_useScrollRestoration, type URLSearchParamsInit, createBrowserRouter, createCookie, createCookieSessionStorage, createHashRouter, createMemoryRouter, createMemorySessionStorage, createRequestHandler, createRoutesFromChildren, createRoutesFromElements, createRoutesStub, createSearchParams, createSession, createSessionStorage, createStaticHandler, createStaticRouter, href, isCookie, isSession, renderMatches, HistoryRouter as unstable_HistoryRouter, unstable_InitialContext, unstable_RouterContextProvider, setDevServerHooks as unstable_setDevServerHooks, usePrompt as unstable_usePrompt, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit, useViewTransitionState };
|
package/dist/production/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-5bbc45fb6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -5652,25 +5652,11 @@ function RouterProvider({
|
|
|
5652
5652
|
viewTransitionOpts == null || isViewTransitionAvailable,
|
|
5653
5653
|
"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
|
|
5654
5654
|
);
|
|
5655
|
-
const resetTransition = () => {
|
|
5656
|
-
setRenderDfd(void 0);
|
|
5657
|
-
setTransition(void 0);
|
|
5658
|
-
setPendingState(void 0);
|
|
5659
|
-
setVtContext({ isTransitioning: false });
|
|
5660
|
-
};
|
|
5661
5655
|
if (!viewTransitionOpts || !isViewTransitionAvailable) {
|
|
5662
|
-
renderDfd?.resolve();
|
|
5663
|
-
transition?.skipTransition();
|
|
5664
5656
|
if (reactDomFlushSyncImpl && flushSync) {
|
|
5665
|
-
reactDomFlushSyncImpl(() =>
|
|
5666
|
-
setStateImpl(newState);
|
|
5667
|
-
resetTransition();
|
|
5668
|
-
});
|
|
5657
|
+
reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
5669
5658
|
} else {
|
|
5670
|
-
React3.startTransition(() =>
|
|
5671
|
-
setStateImpl(newState);
|
|
5672
|
-
resetTransition();
|
|
5673
|
-
});
|
|
5659
|
+
React3.startTransition(() => setStateImpl(newState));
|
|
5674
5660
|
}
|
|
5675
5661
|
return;
|
|
5676
5662
|
}
|
|
@@ -5691,7 +5677,12 @@ function RouterProvider({
|
|
|
5691
5677
|
reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
5692
5678
|
});
|
|
5693
5679
|
t.finished.finally(() => {
|
|
5694
|
-
reactDomFlushSyncImpl(() =>
|
|
5680
|
+
reactDomFlushSyncImpl(() => {
|
|
5681
|
+
setRenderDfd(void 0);
|
|
5682
|
+
setTransition(void 0);
|
|
5683
|
+
setPendingState(void 0);
|
|
5684
|
+
setVtContext({ isTransitioning: false });
|
|
5685
|
+
});
|
|
5695
5686
|
});
|
|
5696
5687
|
reactDomFlushSyncImpl(() => setTransition(t));
|
|
5697
5688
|
return;
|
|
@@ -8799,7 +8790,7 @@ function mergeRefs(...refs) {
|
|
|
8799
8790
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
8800
8791
|
try {
|
|
8801
8792
|
if (isBrowser) {
|
|
8802
|
-
window.__reactRouterVersion = "0.0.0-experimental-
|
|
8793
|
+
window.__reactRouterVersion = "0.0.0-experimental-5bbc45fb6";
|
|
8803
8794
|
}
|
|
8804
8795
|
} catch (e) {
|
|
8805
8796
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-5bbc45fb6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
useSearchParams,
|
|
126
126
|
useSubmit,
|
|
127
127
|
useViewTransitionState
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-5UK3OH7I.mjs";
|
|
129
129
|
export {
|
|
130
130
|
Await,
|
|
131
131
|
BrowserRouter,
|
package/dist/{development/lib/types/route-module.d.ts → production/lib/types/internal.d.mts}
RENAMED
|
@@ -1,6 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as Register } from '../../register-e9PGCFx1.mjs';
|
|
2
|
+
import { aV as Normalize, aW as ServerDataFrom, aX as ClientDataFrom, aY as Func, aE as LinkDescriptor, E as Equal, L as Location, aB as MetaDescriptor, aZ as unstable_MiddlewareNextFunction, ac as unstable_RouterContextProvider, s as MiddlewareEnabled, t as AppLoadContext, a_ as Pretty } from '../../route-data-BwJdBC92.mjs';
|
|
2
3
|
import 'react';
|
|
3
4
|
|
|
5
|
+
type AnyRoutes = Record<string, {
|
|
6
|
+
parentId?: string;
|
|
7
|
+
path?: string;
|
|
8
|
+
index?: boolean;
|
|
9
|
+
file: string;
|
|
10
|
+
params: Record<string, string | undefined>;
|
|
11
|
+
}>;
|
|
12
|
+
type RoutesPre = Register extends {
|
|
13
|
+
routesPre: infer RegisteredRoutes extends AnyRoutes;
|
|
14
|
+
} ? RegisteredRoutes : AnyRoutes;
|
|
15
|
+
type RouteId = keyof RoutesPre;
|
|
16
|
+
type GetParents<Id extends RouteId> = RoutesPre[Id] extends {
|
|
17
|
+
parentId: infer P extends RouteId;
|
|
18
|
+
} ? [
|
|
19
|
+
...GetParents<P>,
|
|
20
|
+
P
|
|
21
|
+
] : [
|
|
22
|
+
];
|
|
23
|
+
type _GetChildren<Id extends RouteId> = {
|
|
24
|
+
[K in RouteId]: RoutesPre[K] extends {
|
|
25
|
+
parentId: Id;
|
|
26
|
+
} ? RoutesPre[K] extends {
|
|
27
|
+
index: true;
|
|
28
|
+
} ? [K] : RoutesPre[K] extends {
|
|
29
|
+
path: undefined;
|
|
30
|
+
} ? [K, ...GetChildren<K>] : [
|
|
31
|
+
K
|
|
32
|
+
] | [K, ...GetChildren<K>] : [
|
|
33
|
+
];
|
|
34
|
+
}[RouteId];
|
|
35
|
+
type GetChildren<Id extends RouteId> = _GetChildren<Id> extends [] ? [] : Exclude<_GetChildren<Id>, []>;
|
|
36
|
+
type GetBranch<Id extends RouteId> = [
|
|
37
|
+
...GetParents<Id>,
|
|
38
|
+
Id,
|
|
39
|
+
..._GetChildren<Id>
|
|
40
|
+
];
|
|
41
|
+
type Branches = {
|
|
42
|
+
[Id in RouteId]: GetBranch<Id>;
|
|
43
|
+
};
|
|
44
|
+
type PartialParams = {
|
|
45
|
+
[Id in RouteId]: RoutesPre[Id]["params"];
|
|
46
|
+
};
|
|
47
|
+
type BranchParams<Branch extends Array<RouteId>> = Branch extends [
|
|
48
|
+
infer Id extends RouteId,
|
|
49
|
+
...infer Ids extends Array<RouteId>
|
|
50
|
+
] ? PartialParams[Id] & BranchParams<Ids> : {};
|
|
51
|
+
type Params = {
|
|
52
|
+
[Id in RouteId]: Normalize<BranchParams<Branches[Id]>>;
|
|
53
|
+
};
|
|
54
|
+
|
|
4
55
|
type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
|
5
56
|
type MaybePromise<T> = T | Promise<T>;
|
|
6
57
|
type RouteModule = {
|
|
@@ -11,30 +62,28 @@ type RouteModule = {
|
|
|
11
62
|
clientLoader?: Func;
|
|
12
63
|
action?: Func;
|
|
13
64
|
clientAction?: Func;
|
|
14
|
-
HydrateFallback?:
|
|
15
|
-
default?:
|
|
16
|
-
ErrorBoundary?:
|
|
65
|
+
HydrateFallback?: Func;
|
|
66
|
+
default?: Func;
|
|
67
|
+
ErrorBoundary?: Func;
|
|
17
68
|
[key: string]: unknown;
|
|
18
69
|
};
|
|
19
|
-
type
|
|
20
|
-
type RouteInfo = {
|
|
21
|
-
parents: RouteInfo[];
|
|
22
|
-
module: RouteModule;
|
|
23
|
-
id: unknown;
|
|
24
|
-
file: string;
|
|
25
|
-
path: string;
|
|
70
|
+
type Props = {
|
|
26
71
|
params: unknown;
|
|
27
72
|
loaderData: unknown;
|
|
28
73
|
actionData: unknown;
|
|
29
74
|
};
|
|
30
|
-
type
|
|
75
|
+
type RouteInfo = Props & {
|
|
76
|
+
parents: Props[];
|
|
77
|
+
module: RouteModule;
|
|
78
|
+
};
|
|
79
|
+
type MetaMatch<T extends Props> = Pretty<Pick<T, "params"> & {
|
|
31
80
|
pathname: string;
|
|
32
81
|
meta: MetaDescriptor[];
|
|
33
82
|
data: T["loaderData"];
|
|
34
83
|
handle?: unknown;
|
|
35
84
|
error?: unknown;
|
|
36
85
|
}>;
|
|
37
|
-
type MetaMatches<T extends
|
|
86
|
+
type MetaMatches<T extends Props[]> = T extends [infer F extends Props, ...infer R extends Props[]] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<RouteInfo> | undefined>;
|
|
38
87
|
type CreateMetaArgs<T extends RouteInfo> = {
|
|
39
88
|
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
|
|
40
89
|
location: Location;
|
|
@@ -155,12 +204,12 @@ type CreateHydrateFallbackProps<T extends RouteInfo> = {
|
|
|
155
204
|
loaderData?: T["loaderData"];
|
|
156
205
|
actionData?: T["actionData"];
|
|
157
206
|
};
|
|
158
|
-
type Match<T extends
|
|
207
|
+
type Match<T extends Props> = Pretty<Pick<T, "params"> & {
|
|
159
208
|
pathname: string;
|
|
160
209
|
data: T["loaderData"];
|
|
161
210
|
handle: unknown;
|
|
162
211
|
}>;
|
|
163
|
-
type Matches<T extends
|
|
212
|
+
type Matches<T extends Props[]> = T extends [infer F extends Props, ...infer R extends Props[]] ? [Match<F>, ...Matches<R>] : Array<Match<Props> | undefined>;
|
|
164
213
|
type CreateComponentProps<T extends RouteInfo> = {
|
|
165
214
|
/**
|
|
166
215
|
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
|
|
@@ -204,5 +253,23 @@ type CreateErrorBoundaryProps<T extends RouteInfo> = {
|
|
|
204
253
|
loaderData?: T["loaderData"];
|
|
205
254
|
actionData?: T["actionData"];
|
|
206
255
|
};
|
|
256
|
+
type RouteModuleAnnotations<Info extends RouteInfo> = {
|
|
257
|
+
LinkDescriptors: LinkDescriptor[];
|
|
258
|
+
LinksFunction: () => LinkDescriptor[];
|
|
259
|
+
MetaArgs: CreateMetaArgs<Info>;
|
|
260
|
+
MetaDescriptors: MetaDescriptors;
|
|
261
|
+
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
|
|
262
|
+
HeadersArgs: HeadersArgs;
|
|
263
|
+
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
|
|
264
|
+
unstable_MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
|
|
265
|
+
unstable_ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
|
|
266
|
+
LoaderArgs: CreateServerLoaderArgs<Info>;
|
|
267
|
+
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
|
|
268
|
+
ActionArgs: CreateServerActionArgs<Info>;
|
|
269
|
+
ClientActionArgs: CreateClientActionArgs<Info>;
|
|
270
|
+
HydrateFallbackProps: CreateHydrateFallbackProps<Info>;
|
|
271
|
+
ComponentProps: CreateComponentProps<Info>;
|
|
272
|
+
ErrorBoundaryProps: CreateErrorBoundaryProps<Info>;
|
|
273
|
+
};
|
|
207
274
|
|
|
208
|
-
export type { CreateActionData,
|
|
275
|
+
export type { CreateActionData, CreateLoaderData, Params, RouteModuleAnnotations };
|