1 | import { ReactNode } from 'react';
|
2 | import * as R from "./_modules/react-router-dom-index";
|
3 | export declare const BaseLocationProvider: typeof R.Router;
|
4 | export declare const DEEPLY_EQUAL: unique symbol;
|
5 | export declare const Link: {
|
6 | ({ to, children, ...rest }: LinkProps): JSX.Element;
|
7 | displayName: string;
|
8 | };
|
9 | export declare const Location: {
|
10 | ({ children }: LocationProps): JSX.Element;
|
11 | displayName: string;
|
12 | };
|
13 | export declare const LocationProvider: typeof R.BrowserRouter;
|
14 | export declare const Match: {
|
15 | ({ children, path: targetPath, startsWith }: MatchProps): JSX.Element;
|
16 | displayName: string;
|
17 | };
|
18 | export declare const Route: {
|
19 | ({ path, children, startsWith, hideOnly }: RouteProps): JSX.Element;
|
20 | displayName: string;
|
21 | };
|
22 | export declare const buildArgsParam: (initialArgs: Args, args: Args) => string;
|
23 | export declare const deepDiff: (value: any, update: any) => any;
|
24 | export declare const getMatch: (current: string, target: string, startsWith?: any) => Match | null;
|
25 | export declare const parsePath: (path: string | undefined) => StoryData;
|
26 | export declare const queryFromLocation: (location: Partial<Location>) => Query;
|
27 | export declare const queryFromString: (s: string) => Query;
|
28 | export declare const stringifyQuery: (query: Query) => string;
|
29 | export declare const useNavigate: () => (to: string | number, { plain, ...options }?: any) => void;
|
30 | export declare type Match = {
|
31 | path: string;
|
32 | };
|
33 | export declare type NavigateOptions = ReturnType<typeof R.useNavigate> & {
|
34 | plain?: boolean;
|
35 | };
|
36 | export declare type RenderData = Pick<RouterData, "location"> & Other;
|
37 | export declare type RouterData = {
|
38 | location: Partial<Location>;
|
39 | navigate: ReturnType<typeof useNavigate>;
|
40 | } & Other;
|
41 | export interface Args {
|
42 | [key: string]: any;
|
43 | }
|
44 | export interface LinkProps {
|
45 | to: string;
|
46 | children: ReactNode;
|
47 | }
|
48 | export interface LocationProps {
|
49 | children: (renderData: RenderData) => ReactNode;
|
50 | }
|
51 | export interface MatchProps {
|
52 | path: string;
|
53 | startsWith: boolean;
|
54 | children: (matchingData: MatchingData) => ReactNode;
|
55 | }
|
56 | export interface MatchingData {
|
57 | match: null | {
|
58 | path: string;
|
59 | };
|
60 | }
|
61 | export interface Other extends StoryData {
|
62 | path: string;
|
63 | singleStory?: boolean;
|
64 | }
|
65 | export interface Query {
|
66 | [key: string]: any;
|
67 | }
|
68 | export interface RouteProps {
|
69 | path: string;
|
70 | startsWith?: boolean;
|
71 | hideOnly?: boolean;
|
72 | children: ReactNode;
|
73 | }
|
74 | export interface StoryData {
|
75 | viewMode?: string;
|
76 | storyId?: string;
|
77 | refId?: string;
|
78 | }
|
79 | export {}; |
\ | No newline at end of file |