#if os(macOS) && canImport(RastrilloMacUpdates) import RastrilloMacUpdates #endif import RastrilloApple import SheetsKit import SwiftUI @main struct SheetsApp: App { #if os(macOS) && canImport(RastrilloMacUpdates) @State private var updater = NativeUpdater() #endif #if os(macOS) @State private var windows = SheetsWindows() @NSApplicationDelegateAdaptor(SheetsApplicationDelegate.self) private var appDelegate #endif var body: some Scene { #if os(macOS) Window(sheetsMacString("Home"), id: "home") { SheetsAccountWindow(windows: windows) } .defaultSize(width: 1000, height: 760) .commands { SheetsWindowCommands(windows: windows) SheetsEditorCommands() #if canImport(RastrilloMacUpdates) NativeUpdateCommands(updater: updater) #endif } WindowGroup("Sheets", id: "document", for: UUID.self) { $id in SheetsDocumentWindow(windows: windows, id: id) } .defaultSize(width: 1120, height: 820) .restorationBehavior(.disabled) #else WindowGroup { SheetsAccountWindow() } #endif } }