use serde::{Deserialize, Serialize}; #[cfg(not(build_only))] use ts_rs::TS; #[cfg_attr(not(build_only), derive(TS))] #[cfg_attr(not(build_only), ts(rename_all = "camelCase"))] #[derive(Serialize, Deserialize, Debug, Default, Clone)] #[serde(rename_all = "camelCase")] pub struct Rect { x: f32, y: f32, width: f32, height: f32, } #[cfg_attr(not(build_only), derive(TS))] #[cfg_attr(not(build_only), ts(rename_all = "camelCase"))] #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "camelCase")] pub struct Config { pub initial_plan_window_position: Rect, pub hide_on_unfocus: bool, pub toggle_overlay: String, pub plan_bg: String, pub backdrop_bg: String, } impl Default for Config { fn default() -> Self { Self { initial_plan_window_position: Default::default(), hide_on_unfocus: true, toggle_overlay: "F6".into(), plan_bg: "#00000010".to_string(), backdrop_bg: "#00000030".to_string(), } } }