/** * @file Default settings: appearance */ import type { SettingDefinition } from "../types"; export const appearanceSettings = [ { key: "appearance.theme", label: "Theme", description: "Visual theme", category: "appearance", type: "select", defaultValue: "light", options: [ { value: "light", label: "Light" }, { value: "dark", label: "Dark" }, { value: "auto", label: "Auto (System)" }, ], order: 1, }, { key: "appearance.fontSize", label: "Font Size", description: "Base font size in pixels", category: "appearance", type: "range", defaultValue: 14, min: 10, max: 24, step: 1, order: 2, }, { key: "appearance.fontFamily", label: "Font Family", description: "Font family for the interface", category: "appearance", type: "select", defaultValue: "system", options: [ { value: "system", label: "System Default" }, { value: "Inter", label: "Inter" }, { value: "Roboto", label: "Roboto" }, { value: "Arial", label: "Arial" }, { value: "monospace", label: "Monospace" }, ], order: 3, }, { key: "appearance.showGrid", label: "Show Grid", description: "Display grid lines on canvas", category: "appearance", type: "boolean", defaultValue: true, order: 4, }, { key: "appearance.gridSize", label: "Grid Size", description: "Grid size in pixels", category: "appearance", type: "number", defaultValue: 20, min: 5, max: 100, dependsOn: "appearance.showGrid", showWhen: (settings) => settings["appearance.showGrid"] === true, order: 5, }, { key: "appearance.gridOpacity", label: "Grid Opacity", description: "Grid line opacity", category: "appearance", type: "range", defaultValue: 0.3, min: 0.1, max: 1, step: 0.1, dependsOn: "appearance.showGrid", showWhen: (settings) => settings["appearance.showGrid"] === true, order: 6, }, { key: "appearance.gridVisibilityThreshold", label: "Grid Visibility Threshold", description: "Hide grid when zoom level is below this value", category: "appearance", type: "range", defaultValue: 0.3, min: 0.01, max: 1.0, step: 0.05, dependsOn: "appearance.showGrid", showWhen: (settings) => settings["appearance.showGrid"] === true, order: 7, }, { key: "appearance.portLabelVisibilityThreshold", label: "Port Label Visibility Threshold", description: "Hide port labels when zoom level is below this value", category: "appearance", type: "range", defaultValue: 0.5, min: 0.01, max: 1.0, step: 0.05, order: 8, }, { key: "appearance.snapToGrid", label: "Snap to Grid", description: "Snap nodes to grid when moving", category: "appearance", type: "boolean", defaultValue: false, order: 9, }, { key: "appearance.showMinimap", label: "Show Minimap", description: "Display minimap overlay", category: "appearance", type: "boolean", defaultValue: true, order: 10, }, { key: "appearance.showStatusBar", label: "Show Status Bar", description: "Display status bar at bottom", category: "appearance", type: "boolean", defaultValue: true, order: 11, }, { key: "appearance.showToolbar", label: "Show Toolbar", description: "Display toolbar", category: "appearance", type: "boolean", defaultValue: true, order: 12, }, { key: "appearance.canvasBackground", label: "Canvas Background", description: "Canvas background color", category: "appearance", type: "color", defaultValue: "#ffffff", order: 13, }, { key: "appearance.canvasSnapshotThreshold", label: "Canvas Snapshot Threshold", description: "Freeze canvas rendering when zoom level is below this value for better performance", category: "appearance", type: "range", defaultValue: 0.3, min: 0.01, max: 1.0, step: 0.05, order: 14, }, ] as const satisfies readonly SettingDefinition[];