spb/poche Public
Agent personnel 100 % on-device — SwiftUI + Apple Foundation Models + EventKit + SwiftData. Aucune API, aucun serveur.
Swift 100%
1//2// Theme.swift3// Poche4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//89import SwiftUI1011enum Theme {12 // Brand: indigo → violet. Matches the AccentColor asset.13 static let accentA = Color(red: 0.39, green: 0.35, blue: 0.96)14 static let accentB = Color(red: 0.72, green: 0.33, blue: 0.98)1516 static var accentGradient: LinearGradient {17 LinearGradient(18 colors: [accentA, accentB],19 startPoint: .topLeading,20 endPoint: .bottomTrailing21 )22 }2324 static let background = Color(.systemGroupedBackground)25 static let surface = Color(.secondarySystemGroupedBackground)2627 static let spacingSmall: CGFloat = 628 static let spacingMedium: CGFloat = 1229 static let spacingLarge: CGFloat = 243031 static let bubbleCornerRadius: CGFloat = 2232 static let cardCornerRadius: CGFloat = 2033}3435/// Soft app-wide backdrop: grouped background with a discreet brand wash36/// at the top. Adapts to dark mode through the system colors.37struct AppBackground: View {38 var body: some View {39 ZStack {40 Theme.background41 RadialGradient(42 colors: [Theme.accentA.opacity(0.12), .clear],43 center: .top,44 startRadius: 0,45 endRadius: 52046 )47 }48 .ignoresSafeArea()49 }50}5152/// The Poche mark: gradient disc + sparkles.53struct BrandMark: View {54 var size: CGFloat = 305556 var body: some View {57 Circle()58 .fill(Theme.accentGradient)59 .overlay {60 Image(systemName: "sparkles")61 .font(.system(size: size * 0.48, weight: .semibold))62 .foregroundStyle(.white)63 }64 .frame(width: size, height: size)65 .shadow(color: Theme.accentA.opacity(0.35), radius: size * 0.18, y: size * 0.08)66 }67}68