mirror of
https://github.com/jnsahaj/tweakcn.git
synced 2026-09-21 12:50:29 +08:00
41 lines
973 B
TypeScript
41 lines
973 B
TypeScript
import { ThemeStyles } from "./theme";
|
|
|
|
// Base interface for any editor's state
|
|
export interface BaseEditorState {
|
|
styles: ThemeStyles;
|
|
}
|
|
|
|
// Interface for editor-specific controls
|
|
export interface EditorControls {
|
|
// Controls can be added per editor type as needed
|
|
}
|
|
|
|
// Interface for editor-specific preview props
|
|
export interface EditorPreviewProps {
|
|
styles: ThemeStyles;
|
|
}
|
|
|
|
export interface ThemeEditorState extends BaseEditorState {
|
|
preset?: string;
|
|
styles: ThemeStyles;
|
|
currentMode: "light" | "dark";
|
|
hslAdjustments?: {
|
|
hueShift: number;
|
|
saturationScale: number;
|
|
lightnessScale: number;
|
|
};
|
|
}
|
|
|
|
// Type for available editors
|
|
export type EditorType = "button" | "input" | "card" | "dialog" | "theme";
|
|
|
|
// Interface for editor configuration
|
|
export interface EditorConfig {
|
|
type: EditorType;
|
|
name: string;
|
|
description: string;
|
|
defaultState: BaseEditorState;
|
|
controls: React.ComponentType<any>;
|
|
preview: React.ComponentType<any>;
|
|
}
|