Io Astrology Software For Mac -

func saveBirthData(_ data: BirthData) if let encoded = try? JSONEncoder().encode(data) savedData = encoded

import Foundation class PlanetCalculator

func updateNSView(_ nsView: MTKView, context: Context) context.coordinator.positions = positions io astrology software for mac

static let example = BirthData( name: "Example", date: Date(), latitude: 40.7128, longitude: -74.0060, timezone: .current ) enum Planet: String, CaseIterable case sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto case chiron, northNode, trueLilith var symbol: String switch self case .sun: return "☉" case .moon: return "☽" case .mercury: return "☿" case .venus: return "♀" case .mars: return "♂" case .jupiter: return "♃" case .saturn: return "♄" case .uranus: return "♅" case .neptune: return "♆" case .pluto: return "♇" case .chiron: return "⚷" case .northNode: return "☊" case .trueLilith: return "⚸"

var zodiacSign: String let signs = ["Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"] let index = Int((longitude / 30).rounded(.down)) % 12 return signs[index] func saveBirthData(_ data: BirthData) if let encoded = try

func makeCoordinator() -> Coordinator Coordinator(positions: positions)

var body: some Scene WindowGroup ContentView() .windowStyle(.titleBar) .commands CommandMenu("Chart") Button("Recalculate Now") NotificationCenter.default.post(name: .init("recalculate"), object: nil) .keyboardShortcut("R") timezone: .current ) enum Planet: String

@objc func togglePopover() if popover == nil popover = NSPopover() popover?.contentViewController = NSHostingController(rootView: QuickWidgetView()) if let popover = popover, let button = statusItem?.button if popover.isShown popover.performClose(nil) else popover.show(relativeTo: button.bounds, of: button, preferredEdge: .minY)

.padding() .frame(width: 200)

import CoreSpotlight import MobileCoreServices class SpotlightIndexer static func indexChart(_ birthData: BirthData, positions: [PlanetaryPosition]) let attributeSet = CSSearchableItemAttributeSet(contentType: .text) attributeSet.title = "(birthData.name)'s Natal Chart" attributeSet.contentDescription = positions.map "($0.planet.symbol) in ($0.zodiacSign)" .joined(separator: ", ")

func getMoonPhase(date: Date) -> String // Simplified lunar cycle let lunarMonth: Double = 29.53058867 let referenceNewMoon = Date(timeIntervalSince1970: 946684800) // Jan 1 2000 let daysSince = date.timeIntervalSince(referenceNewMoon) / 86400 let phase = daysSince.truncatingRemainder(dividingBy: lunarMonth) / lunarMonth switch phase case 0..<0.125: return "🌑 New" case 0.125..<0.25: return "🌒 Waxing" case 0.25..<0.375: return "🌓 First Q" case 0.375..<0.5: return "🌔 Gibbous" case 0.5..<0.625: return "🌕 Full" case 0.625..<0.75: return "🌖 Waning" case 0.75..<0.875: return "🌗 Last Q" default: return "🌘 Balsamic"