dumi
Version:
📖 Documentation Generator of React Component
28 lines (27 loc) • 994 B
TypeScript
import type { PICKED_PKG_FIELDS } from "../../constants";
import type { AtomComponentAsset } from 'dumi-assets-types';
import { type ComponentType } from 'react';
import type { ILocalesConfig, IPreviewerProps, IThemeConfig } from './types';
interface ISiteContext {
pkg: Partial<Record<keyof typeof PICKED_PKG_FIELDS, any>>;
historyType: 'browser' | 'hash' | 'memory';
entryExports: Record<string, any>;
demos: Record<string, {
component: ComponentType;
asset: IPreviewerProps['asset'];
routeId: string;
}>;
components: Record<string, AtomComponentAsset>;
locales: ILocalesConfig;
themeConfig: IThemeConfig;
hostname?: string;
loading: boolean;
setLoading: (status: boolean) => void;
/**
* private field, do not use it in your code
*/
_2_level_nav_available: boolean;
}
export declare const SiteContext: import("react").Context<ISiteContext>;
export declare const useSiteData: () => ISiteContext;
export {};