import { type VIConfig } from '@varlet/icon-builder'; import { type CopyOptions } from '@varlet/vite-plugins'; import { Plugin, ProxyOptions } from 'vite-plus'; export interface VarletConfigIcons extends VIConfig { /** * @default true * Whether to generate png */ genPng?: boolean; } export interface VarletConfigEsbuild { target?: string | string[]; } export interface VarletConfigHtmlInjectPoint { position?: 'start' | 'end' | 'script-start'; content?: string; } export interface VarletConfigHtmlInject { head?: VarletConfigHtmlInjectPoint[]; body?: VarletConfigHtmlInjectPoint[]; } export interface VarletConfigPcMenu { text: Record; type: number; doc?: string; } export interface VarletConfigPcHeader { i18n?: Record; currentVersion?: string; github?: string; changelog?: string; playground?: string; ai?: string; themes?: Record[]; versions?: { name: string; items?: { label?: string; link?: string; }[]; }[]; } export interface VarletConfigPcAd { id?: string; logo?: string; logoHeight?: string; description?: Record; descriptionBackground?: string; descriptionTextColor?: string; link?: Record; background?: string; textColor?: string; } export interface VarletConfigMobileHeader { i18n?: Record; github?: string; themes?: Record[]; } export interface VarletConfigSeo { title?: string; description?: string; keywords?: string; } export interface VarletConfigPcIndexPage { description?: Record; started?: Record; viewOnGithub?: Record; features?: { name: Record; description: Record; link?: Record; }[]; teamMembers?: { label: Record; members: { name?: Record; title?: Record; description?: Record; avatar?: string; github?: string; twitter?: string; }[]; }; contributors?: { label?: Record; link?: string; image?: string; }; sponsors?: { label?: Record; link?: string; image?: string; }; license?: Record; copyright?: Record; } export interface VarletConfigPc { title?: Record; redirect?: string; clipboard?: Record; indexPage?: VarletConfigPcIndexPage; ad?: VarletConfigPcAd; header?: VarletConfigPcHeader; menu?: VarletConfigPcMenu[]; htmlInject?: VarletConfigHtmlInject; fold?: { defaultFold?: boolean; foldHeight?: number; }; } export interface VarletConfigMobile { title?: Record; redirect?: string; header?: VarletConfigMobileHeader; htmlInject?: VarletConfigHtmlInject; } export interface VarletConfig { /** * @default `Varlet` * UI library name. */ name?: string; /** * @default `var` * Component name prefix */ namespace?: string; /** * @default `localhost` * Local dev server host */ host?: string; /** * @default `8080` * Local dev server port */ port?: number; proxy?: Record; title?: string; logo?: string; themeKey?: string; seo?: { title?: string; description?: string; keywords?: string; }; defaultLanguage?: 'zh-CN' | 'en-US'; alias?: Record; /** * @default `false` * Show mobile component on the right. */ useMobile?: boolean; lightTheme?: Record; darkTheme?: Record; md3LightTheme?: Record; md3DarkTheme?: Record; defaultLightTheme?: 'lightTheme' | 'md3LightTheme'; defaultDarkTheme?: 'darkTheme' | 'md3DarkTheme'; highlight?: { style: string; }; analysis?: { baidu: string; }; pc?: VarletConfigPc; mobile?: VarletConfigMobile; copy?: CopyOptions['paths']; icons?: VarletConfigIcons; esbuild?: VarletConfigEsbuild; bundle?: { external?: string[]; globals?: Record; }; /** * @vitePlugins * @default `[]` * Vite plugins */ vitePlugins?: Plugin[] | ((plugins: Plugin[]) => Plugin[]); /** * @default `[]` * Directive folder name for component library. */ directives?: string[]; _cf?: string[]; } export declare function defineConfig(config: VarletConfig): VarletConfig; export declare function mergeStrategy(_: any, srcValue: any, key: any): any[] | undefined; export declare function getVarletConfig(emit?: boolean): Promise>;