First refactor without AI

This commit is contained in:
Your Name
2025-03-15 18:32:10 -04:00
commit ab5380a399
25 changed files with 1661 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
export interface WidgetData {
id: string;
type: WidgetTypes;
gridX: number;
gridY: number;
gridWidth: number;
gridHeight: number;
[key: string]: any;
}
export interface SearchWidgetData extends WidgetData {
type: 'search';
engine: 'Google' | 'Bing' | 'DuckDuckGo' | 'Yandex';
}
export interface ClockWidgetData extends WidgetData {
type: 'clock';
showSeconds: boolean;
use24Hour: boolean;
timezone: string;
}
export type WidgetTypes = (SearchWidgetData | ClockWidgetData)['type']
export interface GlobalSettings {
backgroundUrl: string;
widgets: WidgetData[];
dragEnabled: boolean;
showGrid: boolean;
}
export type WidgetExport<W = React.FC<any>, S = (...a:any[]) =>JSX.Element > = {
widget: W,
settings: S
}