2024-08-30 08:14:35 +08:00
|
|
|
import type { PropertiesHyphen } from 'csstype'
|
|
|
|
|
2024-09-16 17:07:47 +08:00
|
|
|
export type Block = `h1` | `h2` | `h3` | `h4` | `p` | `blockquote` | `blockquote_p` | `code_pre` | `code` | `image` | `ol` | `ul` | `footnotes` | `figure` | `hr`
|
|
|
|
export type Inline = `listitem` | `codespan` | `link` | `wx_link` | `strong` | `table` | `thead` | `td` | `footnote` | `figcaption` | `em`
|
2024-09-04 13:00:42 +08:00
|
|
|
|
|
|
|
interface CustomCSSProperties {
|
|
|
|
[`--md-primary-color`]?: string
|
|
|
|
[key: `--${string}`]: string | undefined
|
|
|
|
}
|
|
|
|
|
|
|
|
export type ExtendedProperties = PropertiesHyphen & CustomCSSProperties
|
2024-08-30 08:14:35 +08:00
|
|
|
|
|
|
|
export interface Theme {
|
2024-09-04 13:00:42 +08:00
|
|
|
base: ExtendedProperties
|
2024-08-30 08:14:35 +08:00
|
|
|
block: Record<Block, PropertiesHyphen>
|
|
|
|
inline: Record<Inline, PropertiesHyphen>
|
|
|
|
}
|
|
|
|
|
2024-09-04 13:00:42 +08:00
|
|
|
export interface IOpts {
|
|
|
|
theme: Theme
|
|
|
|
fonts: string
|
|
|
|
size: string
|
2024-09-16 17:07:47 +08:00
|
|
|
legend?: string
|
|
|
|
status?: boolean
|
2024-09-04 13:00:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export type ThemeStyles = Record<Block | Inline, ExtendedProperties>
|
|
|
|
|
2024-09-16 17:07:47 +08:00
|
|
|
export interface IConfigOption<VT = string> {
|
2024-08-24 23:38:39 +08:00
|
|
|
label: string
|
2024-09-16 17:07:47 +08:00
|
|
|
value: VT
|
2024-08-24 23:38:39 +08:00
|
|
|
desc: string
|
|
|
|
}
|