UNPKG

994 BTypeScriptView Raw
1import type { PICKED_PKG_FIELDS } from "../../constants";
2import type { AtomComponentAsset } from 'dumi-assets-types';
3import { type ComponentType } from 'react';
4import type { ILocalesConfig, IPreviewerProps, IThemeConfig } from './types';
5interface ISiteContext {
6 pkg: Partial<Record<keyof typeof PICKED_PKG_FIELDS, any>>;
7 historyType: 'browser' | 'hash' | 'memory';
8 entryExports: Record<string, any>;
9 demos: Record<string, {
10 component: ComponentType;
11 asset: IPreviewerProps['asset'];
12 routeId: string;
13 }>;
14 components: Record<string, AtomComponentAsset>;
15 locales: ILocalesConfig;
16 themeConfig: IThemeConfig;
17 hostname?: string;
18 loading: boolean;
19 setLoading: (status: boolean) => void;
20 /**
21 * private field, do not use it in your code
22 */
23 _2_level_nav_available: boolean;
24}
25export declare const SiteContext: import("react").Context<ISiteContext>;
26export declare const useSiteData: () => ISiteContext;
27export {};