// // ZyquoTheme.swift // Zyquo Atlas // // Author: Simon-Pierre Boucher // Mail: contact@spboucher.ai // // The non-color design tokens: typography, spacing, radii, shadows, and layout // metrics — views contain zero magic numbers. Colors live in AtlasTheme / // BuiltInThemes and are applied live by ThemeEngine (the flagship "Atlas Light" // theme is the Phase 4.1 base spec); fonts scale with the user's uiScale via // LayoutSettings. Atlas's identity is a balanced teal-indigo "map/atlas" story. // import SwiftUI extension NSColor { /// 0xRRGGBB → NSColor (sRGB). convenience init(hex: UInt32) { self.init( srgbRed: CGFloat((hex >> 16) & 0xFF) / 255, green: CGFloat((hex >> 8) & 0xFF) / 255, blue: CGFloat(hex & 0xFF) / 255, alpha: 1 ) } } // MARK: - Typography /// Type scale (SF Pro system font; SF Mono for code). Body is 13.5pt/1.45 per /// the family spec. enum ZyquoFont { /// 20pt semibold — window/section titles. static let title = Font.system(size: 20, weight: .semibold) /// UI body at a given size (default 13.5). static func body(size: Double = 13.5) -> Font { .system(size: size, weight: .regular) } static func bodyEmphasis(size: Double = 13.5) -> Font { .system(size: size, weight: .medium) } /// 12.5pt medium — omnibox / tab titles. static let control = Font.system(size: 12.5, weight: .medium) /// 11pt — captions, status. static let caption = Font.system(size: 11, weight: .regular) static func code(size: Double = 12.5) -> Font { .system(size: size, weight: .regular, design: .monospaced) } /// Generous line height for body text (spec: 1.45 → factor 0.45). static let bodyLineSpacingFactor: Double = 0.45 } // MARK: - Spacing, radii, shadows, metrics /// Spacing scale: 4 / 8 / 12 / 16 / 20 / 24 / 32. enum ZyquoSpacing { static let xxs: CGFloat = 4 static let xs: CGFloat = 8 static let sm: CGFloat = 12 static let md: CGFloat = 16 static let lg: CGFloat = 20 static let xl: CGFloat = 24 static let xxl: CGFloat = 32 } /// Corner radii: 6 (small controls), 10 (cards/tabs), 14 (floating panels). enum ZyquoRadius { static let small: CGFloat = 6 static let medium: CGFloat = 10 static let large: CGFloat = 14 } /// Shadows: extremely soft, used sparingly (floating panels, popovers). enum ZyquoShadow { static let soft = ShadowStyle(color: .black.opacity(0.06), radius: 12, y: 2) struct ShadowStyle { let color: Color let radius: CGFloat var x: CGFloat = 0 var y: CGFloat = 0 } } /// Fixed layout metrics (chrome must be quiet so web content is the star). enum ZyquoMetrics { static let toolbarHeight: CGFloat = 44 static let tabBarHeight: CGFloat = 36 static let tabMinWidth: CGFloat = 120 static let tabMaxWidth: CGFloat = 240 static let aiSidebarWidth: CGFloat = 360 static let hairline: CGFloat = 0.5 }