| 1 |
|
| 2 | import { Action, History, Location, To } from "./router/history.js";
|
| 3 | import { RouteMatch, TrackedPromise } from "./router/utils.js";
|
| 4 | import { RelativeRoutingType, Router, RouterState, StaticHandlerContext } from "./router/router.js";
|
| 5 | import { ClientOnErrorFunction } from "./components.js";
|
| 6 | import * as React$1 from "react";
|
| 7 |
|
| 8 |
|
| 9 | interface DataRouterContextObject extends Omit<NavigationContextObject, "future" | "useTransitions"> {
|
| 10 | router: Router;
|
| 11 | staticContext?: StaticHandlerContext;
|
| 12 | onError?: ClientOnErrorFunction;
|
| 13 | }
|
| 14 | declare const DataRouterContext: React$1.Context<DataRouterContextObject | null>;
|
| 15 | declare const DataRouterStateContext: React$1.Context<RouterState | null>;
|
| 16 | type ViewTransitionContextObject = {
|
| 17 | isTransitioning: false;
|
| 18 | } | {
|
| 19 | isTransitioning: true;
|
| 20 | flushSync: boolean;
|
| 21 | currentLocation: Location;
|
| 22 | nextLocation: Location;
|
| 23 | };
|
| 24 | declare const ViewTransitionContext: React$1.Context<ViewTransitionContextObject>;
|
| 25 | type FetchersContextObject = Map<string, any>;
|
| 26 | declare const FetchersContext: React$1.Context<FetchersContextObject>;
|
| 27 | declare const AwaitContext: React$1.Context<TrackedPromise | null>;
|
| 28 | declare const AwaitContextProvider: (props: React$1.ComponentProps<typeof AwaitContext.Provider>) => React$1.FunctionComponentElement<React$1.ProviderProps<TrackedPromise | null>>;
|
| 29 | interface NavigateOptions {
|
| 30 |
|
| 31 | replace?: boolean;
|
| 32 |
|
| 33 | mask?: To;
|
| 34 |
|
| 35 | state?: any;
|
| 36 |
|
| 37 | preventScrollReset?: boolean;
|
| 38 |
|
| 39 | relative?: RelativeRoutingType;
|
| 40 |
|
| 41 | flushSync?: boolean;
|
| 42 |
|
| 43 | viewTransition?: boolean;
|
| 44 |
|
| 45 | defaultShouldRevalidate?: boolean;
|
| 46 | }
|
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 |
|
| 56 | interface Navigator {
|
| 57 | createHref: History["createHref"];
|
| 58 | encodeLocation?: History["encodeLocation"];
|
| 59 | go: History["go"];
|
| 60 | push(to: To, state?: any, opts?: NavigateOptions): void;
|
| 61 | replace(to: To, state?: any, opts?: NavigateOptions): void;
|
| 62 | }
|
| 63 | interface NavigationContextObject {
|
| 64 | basename: string;
|
| 65 | navigator: Navigator;
|
| 66 | static: boolean;
|
| 67 | useTransitions: boolean | undefined;
|
| 68 | future: {};
|
| 69 | }
|
| 70 | declare const NavigationContext: React$1.Context<NavigationContextObject>;
|
| 71 | interface LocationContextObject {
|
| 72 | location: Location;
|
| 73 | navigationType: Action;
|
| 74 | }
|
| 75 | declare const LocationContext: React$1.Context<LocationContextObject>;
|
| 76 | interface RouteContextObject {
|
| 77 | outlet: React$1.ReactElement | null;
|
| 78 | matches: RouteMatch[];
|
| 79 | isDataRoute: boolean;
|
| 80 | }
|
| 81 | declare const RouteContext: React$1.Context<RouteContextObject>;
|
| 82 |
|
| 83 | export { AwaitContextProvider, DataRouterContext, DataRouterStateContext, FetchersContext, LocationContext, NavigateOptions, NavigationContext, Navigator, RouteContext, ViewTransitionContext }; |
| \ | No newline at end of file |