import type { ThemeAccent } from './colors'; import type { LlmsOption } from './config'; import type { UiTranslations } from './translations'; import type { HeadConfig } from './page/head'; export type ThemeMode = 'light' | 'dark' | 'system'; export type ThemeModeControl = 'segmented-control' | 'button' | 'switch' | 'select' | false; export type RadiusScale = 'none' | 'small' | 'medium' | 'large' | 'full'; export { accentScales } from './colors'; export type { AccentScale, ThemeAccent } from './colors'; export interface ThemeLink { label: string; href: string; external?: boolean; translations?: Record; } export type SiteNavVariant = 'text' | 'soft' | 'outline' | 'solid'; export type SiteNavColor = 'neutral' | 'accent'; export interface SiteNavItem extends ThemeLink { icon?: string; trailingIcon?: string; variant?: SiteNavVariant; color?: SiteNavColor; } export interface ThemeSocialLink extends ThemeLink { icon: string; } export type SidebarBadgePosition = 'leading' | 'trailing'; export type SidebarBadgeVariant = 'solid' | 'soft' | 'subtle' | 'outline'; export type SidebarBadgeColor = | 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger'; export type SidebarBadge = | string | { label: string; position?: SidebarBadgePosition; variant?: SidebarBadgeVariant; color?: SidebarBadgeColor; }; export type MaybePromise = T | Promise; export interface OpenApiSchemaBudgetOptions { maxDepth?: number; maxArrayItems?: number; maxObjectEntries?: number; maxNodes?: number; } export interface OpenApiOperationGroupInput { method: string; operationId?: string; path: string; summary: string; tags: string[]; prosefly?: Record; } export type OpenApiGroupBy = | 'auto' | 'path' | 'tag' | ((operation: OpenApiOperationGroupInput) => | string | { label?: string; slug?: string } | undefined); export interface OpenApiSourceConfig { file: string; base?: string; operationBase?: string; groupBy?: OpenApiGroupBy; schemaBudget?: OpenApiSchemaBudgetOptions; } export interface OpenApiIntegrationConfig { sources: Record; } export type OpenApiConfig = OpenApiSourceConfig | OpenApiIntegrationConfig; export interface SidebarOpenApiOptions { source?: string; introduction?: | false | { label?: string; link?: string; }; methodBadge?: | false | { position?: SidebarBadgePosition; variant?: SidebarBadgeVariant; }; } export interface SidebarLinkItem { label: string; link: string; slug?: string; external?: boolean; icon?: string; badge?: SidebarBadge; translations?: Record; } export interface SidebarGroupItem { label: string; icon?: string; collapsed?: boolean; translations?: Record; items: MaybePromise; } export interface SidebarAutogenerateItem { autogenerate: { directory: string; depth?: number; exclude?: string | string[]; structure?: 'flat' | 'tree'; }; } export interface SidebarOpenApiItem { openapi: SidebarOpenApiOptions; } export type SidebarItemConfig = | string | SidebarLinkItem | SidebarGroupItem | SidebarAutogenerateItem | SidebarOpenApiItem; export interface DocsNavConfig { slug?: string; label: string; icon?: string; translations?: Record; items: MaybePromise; } export interface FooterSection { title: string; links: ThemeLink[]; } export type PageActionType = | 'copy-page' | 'view-markdown' | 'open-chatgpt' | 'open-claude' | 'open-grok' | 'open-perplexity'; export interface PageActionConfig { type?: PageActionType | (string & {}); label?: string; icon?: string; href?: string; external?: boolean; } export interface ContributorInfo { name: string; email?: string; username?: string; avatarUrl?: string; profileUrl?: string; commits: number; lastCommit?: string; } export interface ContributorsConfig { avatar?: 'github' | 'gravatar' | false; exclude?: string[]; github?: string; branch?: string; max?: number; githubProfileLimit?: number; } export type ContributorsOption = boolean | ContributorsConfig; export type OverrideComponentName = | 'Assistant' | 'FooterLinks' | 'HeaderNavbar' | 'HeaderSocialIcons' | 'PageActions' | 'PageAside' | 'PageHeader' | 'PageMeta' | 'PageNavigation' | 'SearchDialog' | 'SiteBrand' | 'ThemeSwitch'; export type OverrideComponentsConfig = Partial>; export interface ThemeLogoConfig { light: string; dark: string; href?: string; width?: number; height?: number; variant?: 'mark' | 'lockup'; } export type ThemeLogo = string | ThemeLogoConfig; export interface ThemeFaviconLink { href: string; rel?: string; type?: string; sizes?: string; media?: string; color?: string; } export type ThemeFavicon = string | ThemeFaviconLink | ThemeFaviconLink[]; export interface LocaleConfig { label: string; lang?: string; dir?: 'ltr' | 'rtl'; directory?: string; } export type SearchConfig = | false | { provider?: 'local'; } | { provider: 'pagefind'; excludeSelectors?: string[]; outputSubdir?: string; rootSelector?: string; } | { provider: 'docsearch'; appId: string; apiKey: string; indexName: string | Record; askAi?: string; disableUserPersonalization?: boolean; insights?: boolean; maxResultsPerGroup?: number; searchParameters?: Record; cssUrl?: string; jsUrl?: string; } | { provider: 'algolia'; appId: string; apiKey: string; indexName: string | Record; }; export type AssistantConfig = | false | { provider: 'inkeep'; apiKey: string; organizationDisplayName?: string; primaryBrandColor?: string; integrationId?: string; organizationId?: string; scriptUrl?: string; baseSettings?: Record; modalSettings?: Record; searchSettings?: Record; aiChatSettings?: Record; } | { provider: 'kapa'; websiteId: string; projectName?: string; projectColor?: string; projectLogo?: string; scriptUrl?: string; attributes?: Record; } | { provider: 'custom'; }; export interface ThemeSourceConfig { branch?: string; github?: string; gitlab?: string; codeberg?: string; } export interface EditLinkBaseConfig { branch?: string; } export interface EditLinkPatternConfig extends EditLinkBaseConfig { pattern: string; } export interface EditLinkGithubConfig extends EditLinkBaseConfig { github: string; } export interface EditLinkGitlabConfig extends EditLinkBaseConfig { gitlab: string; } export interface EditLinkCodebergConfig extends EditLinkBaseConfig { codeberg: string; } export type EditLinkConfig = | EditLinkPatternConfig | EditLinkGithubConfig | EditLinkGitlabConfig | EditLinkCodebergConfig; export interface LotusThemeConfig { name: string; description: string; logo?: ThemeLogo; favicon?: ThemeFavicon; appearance: { accent: ThemeAccent; gray: 'slate' | 'zinc' | 'neutral' | 'stone'; defaultMode: ThemeMode; radius: RadiusScale; }; siteNav: SiteNavItem[]; socials: ThemeSocialLink[]; themeModeControl: ThemeModeControl; docsNav: DocsNavConfig[]; openapi?: OpenApiConfig; search: SearchConfig; assistant: AssistantConfig; llms: LlmsOption; pageActions: PageActionConfig[]; contributors?: ContributorsOption; components?: OverrideComponentsConfig; head: HeadConfig; credits: boolean; docsBase: string; source?: ThemeSourceConfig; editLink?: boolean | EditLinkConfig; defaultLocale?: string; locales?: Record; ui?: Record>; iconify?: { apiBase?: string; preload?: string[]; scan?: boolean; }; footer: { copyright: string; sections: FooterSection[]; }; }