SPB Git

spb/focale Public

Swift 100%
1.7 KB · 50 lines swift
Raw Blame History
1//2//  DesignTokens.swift3//  Focale4//5//  Author: Simon-Pierre Boucher6//  Contact: contact@spboucher.ai7//89import SwiftUI1011enum DesignTokens {12    // MARK: - Color1314    /// Warm amber accent — the aperture color of the app icon.15    static let accent = Color(red: 1.0, green: 0.58, blue: 0.16)16    static let surface = Color(red: 0.07, green: 0.08, blue: 0.10)17    static let surfaceRaised = Color(red: 0.12, green: 0.13, blue: 0.16)18    static let textSecondary = Color.white.opacity(0.6)1920    /// Generated (model) content is always visually distinct from real data21    /// (CLAUDE.md §8). This tint marks anything that came out of the LLM.22    static let generatedContent = Color(red: 0.62, green: 0.55, blue: 0.95)2324    // MARK: - Metrics2526    static let cornerRadius: CGFloat = 1427    static let controlSpacing: CGFloat = 1228    static let shutterDiameter: CGFloat = 762930    // MARK: - Typography3132    /// Monospaced digits so dial values don't jitter while scrubbing.33    static let controlValueFont = Font.system(size: 15, weight: .semibold, design: .rounded)34        .monospacedDigit()35    static let controlLabelFont = Font.system(size: 11, weight: .medium, design: .rounded)36}3738/// Small badge marking model-generated text, per CLAUDE.md §8:39/// a generated description must never look like a real datum.40struct GeneratedBadge: View {41    var body: some View {42        Label("Générée", systemImage: "sparkles")43            .font(.caption2.weight(.semibold))44            .padding(.horizontal, 6)45            .padding(.vertical, 2)46            .background(DesignTokens.generatedContent.opacity(0.2), in: Capsule())47            .foregroundStyle(DesignTokens.generatedContent)48    }49}50