1 | import * as React from "react";
|
2 | import type { AgnosticRouteMatch, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, History, Location, Router, StaticHandlerContext, To, TrackedPromise } from "@remix-run/router";
|
3 | import type { Action as NavigationType } from "@remix-run/router";
|
4 | export interface IndexRouteObject {
|
5 | caseSensitive?: AgnosticIndexRouteObject["caseSensitive"];
|
6 | path?: AgnosticIndexRouteObject["path"];
|
7 | id?: AgnosticIndexRouteObject["id"];
|
8 | loader?: AgnosticIndexRouteObject["loader"];
|
9 | action?: AgnosticIndexRouteObject["action"];
|
10 | hasErrorBoundary?: AgnosticIndexRouteObject["hasErrorBoundary"];
|
11 | shouldRevalidate?: AgnosticIndexRouteObject["shouldRevalidate"];
|
12 | handle?: AgnosticIndexRouteObject["handle"];
|
13 | index: true;
|
14 | children?: undefined;
|
15 | element?: React.ReactNode | null;
|
16 | errorElement?: React.ReactNode | null;
|
17 | }
|
18 | export interface NonIndexRouteObject {
|
19 | caseSensitive?: AgnosticNonIndexRouteObject["caseSensitive"];
|
20 | path?: AgnosticNonIndexRouteObject["path"];
|
21 | id?: AgnosticNonIndexRouteObject["id"];
|
22 | loader?: AgnosticNonIndexRouteObject["loader"];
|
23 | action?: AgnosticNonIndexRouteObject["action"];
|
24 | hasErrorBoundary?: AgnosticNonIndexRouteObject["hasErrorBoundary"];
|
25 | shouldRevalidate?: AgnosticNonIndexRouteObject["shouldRevalidate"];
|
26 | handle?: AgnosticNonIndexRouteObject["handle"];
|
27 | index?: false;
|
28 | children?: RouteObject[];
|
29 | element?: React.ReactNode | null;
|
30 | errorElement?: React.ReactNode | null;
|
31 | }
|
32 | export declare type RouteObject = IndexRouteObject | NonIndexRouteObject;
|
33 | export declare type DataRouteObject = RouteObject & {
|
34 | children?: DataRouteObject[];
|
35 | id: string;
|
36 | };
|
37 | export interface RouteMatch<ParamKey extends string = string, RouteObjectType extends RouteObject = RouteObject> extends AgnosticRouteMatch<ParamKey, RouteObjectType> {
|
38 | }
|
39 | export interface DataRouteMatch extends RouteMatch<string, DataRouteObject> {
|
40 | }
|
41 | export declare const DataStaticRouterContext: React.Context<StaticHandlerContext | null>;
|
42 | export interface DataRouterContextObject extends NavigationContextObject {
|
43 | router: Router;
|
44 | }
|
45 | export declare const DataRouterContext: React.Context<DataRouterContextObject | null>;
|
46 | export declare const DataRouterStateContext: React.Context<import("@remix-run/router").RouterState | null>;
|
47 | export declare const AwaitContext: React.Context<TrackedPromise | null>;
|
48 | export declare type RelativeRoutingType = "route" | "path";
|
49 | export interface NavigateOptions {
|
50 | replace?: boolean;
|
51 | state?: any;
|
52 | preventScrollReset?: boolean;
|
53 | relative?: RelativeRoutingType;
|
54 | }
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | export interface Navigator {
|
65 | createHref: History["createHref"];
|
66 | go: History["go"];
|
67 | push(to: To, state?: any, opts?: NavigateOptions): void;
|
68 | replace(to: To, state?: any, opts?: NavigateOptions): void;
|
69 | }
|
70 | interface NavigationContextObject {
|
71 | basename: string;
|
72 | navigator: Navigator;
|
73 | static: boolean;
|
74 | }
|
75 | export declare const NavigationContext: React.Context<NavigationContextObject>;
|
76 | interface LocationContextObject {
|
77 | location: Location;
|
78 | navigationType: NavigationType;
|
79 | }
|
80 | export declare const LocationContext: React.Context<LocationContextObject>;
|
81 | export interface RouteContextObject {
|
82 | outlet: React.ReactElement | null;
|
83 | matches: RouteMatch[];
|
84 | }
|
85 | export declare const RouteContext: React.Context<RouteContextObject>;
|
86 | export declare const RouteErrorContext: React.Context<any>;
|
87 | export {};
|