46 lines
941 B
TypeScript
46 lines
941 B
TypeScript
export type CodeBlock = {
|
|
code: string;
|
|
cpnName: string;
|
|
props: Record<string, unknown>;
|
|
};
|
|
|
|
export type UpdateThemeColor = {
|
|
/**
|
|
* @description 主题类名
|
|
*/
|
|
themeClass: string;
|
|
/**
|
|
* @description 颜色变量
|
|
*/
|
|
colorVariable: string;
|
|
/**
|
|
* @description 新颜色
|
|
*/
|
|
newColor: string;
|
|
};
|
|
|
|
export type NumStringWithBlank = ` ${number}` | `${number}` | `${number} `;
|
|
|
|
export type RGBString =
|
|
`rgb(${NumStringWithBlank},${NumStringWithBlank},${NumStringWithBlank})`;
|
|
|
|
export type RGBValue = {
|
|
r: number;
|
|
g: number;
|
|
b: number;
|
|
};
|
|
|
|
export type ThemeVariables = {
|
|
[key: string]: string;
|
|
};
|
|
|
|
export type ColorSchema = {
|
|
onLight: Record<string, string>;
|
|
onDark?: Record<string, string>;
|
|
};
|
|
|
|
export type ThemeSection = "dark" | "light" | "system";
|
|
|
|
export type ReverseHandlerType = "reverse" | "none" | "lighten" | "darken";
|
|
|
|
export type ReverseHandlerConfig = Record<string, ReverseHandlerType>; |