@hopepaddy/dumi-theme
Version:
dumi-theme-hopepaddy is a documentation site theme package designed for dumi2. It provides a more beautiful and user-friendly development and reading experience based on @lobehub/ui
36 lines (35 loc) • 1.27 kB
TypeScript
import { AtomAsset } from 'dumi-assets-types';
import { ILocale, ILocalesConfig, INavItem, IPreviewerProps, IRouteMeta, ISidebarGroup } from 'dumi/dist/client/theme-api/types';
import { PICKED_PKG_FIELDS } from 'dumi/dist/constants';
import type { Location } from 'history';
import { ComponentType } from 'react';
import { SiteThemeConfig } from "../types";
export type NavData = (INavItem & {
children?: INavItem[] | undefined;
})[];
export interface ISiteData {
components: Record<string, AtomAsset>;
demos: Record<string, {
asset: IPreviewerProps['asset'];
component: ComponentType;
routeId: string;
}>;
entryExports: Record<string, any>;
loading: boolean;
locales: ILocalesConfig;
pkg: Partial<Record<keyof typeof PICKED_PKG_FIELDS, any>>;
setLoading: (status: boolean) => void;
themeConfig: SiteThemeConfig;
}
export interface SiteStore {
locale: ILocale;
location: Location;
navData: NavData;
routeMeta: IRouteMeta;
sidebar?: ISidebarGroup[];
siteData: ISiteData;
tabMeta?: NonNullable<IRouteMeta['tabs']>[0]['meta'];
}
export declare const initialThemeConfig: Partial<SiteThemeConfig>;
export declare const styles: string[];
export declare const initialState: SiteStore;