import { default as React, ReactNode } from 'react'; import { default as IpldExploreError } from '../lib/errors.js'; import { NormalizedDagNode } from '../types.js'; interface ExploreContextProps { exploreState: ExploreState; explorePathPrefix: string; isLoading: boolean; setExplorePath(path: string | null): void; doExploreLink(link: any): void; doExploreUserProvidedPath(path: string): void; doUploadUserProvidedCar(file: File, uploadImage: string): Promise; } export interface ExploreState { path: string | null; /** * The NormalizedDagNode version of the currently viewed dag node */ targetNode: NormalizedDagNode | null; /** * The absolute, canonical, path to the currently viewed node, including the root CID. */ canonicalPath: string; /** * The currently displayed path, relative to the root CID. */ localPath: string; nodes: any[]; pathBoundaries: any[]; error: IpldExploreError | null; } export declare const ExploreContext: React.Context; export interface ExploreProviderProps { children?: ReactNode | ReactNode[]; state?: Partial; explorePathPrefix?: string; } export declare const ExploreProvider: ({ children, state, explorePathPrefix }: ExploreProviderProps) => React.ReactNode; export declare const useExplore: () => ExploreContextProps; export {};