From 3abb938ff256e04ec9f5eacb01e95d94b0521cd2 Mon Sep 17 00:00:00 2001 From: Doug Date: Sun, 28 Sep 2025 15:39:20 +0100 Subject: [PATCH] Fix Compound Inspector and run SwiftFormat. --- .../Inspector.xcodeproj/project.pbxproj | 6 ++++++ .../Sources/Components/ListScreen.swift | 2 +- .../Sources/Components/TextFieldsScreen.swift | 2 +- .../Sources/CompoundInspectorApp.swift | 12 ++++++------ .../System Components/ActionSheetScreen.swift | 2 +- .../System Components/AlertScreen.swift | 2 +- .../System Components/ContextMenuScreen.swift | 2 +- .../NavigationBarScreen.swift | 18 +++++++++--------- .../System Components/ShareSheetScreen.swift | 2 +- .../Inspector/Sources/Tokens/AllCases.swift | 2 +- .../Sources/Tokens/ColorsScreen.swift | 4 ++-- .../Inspector/Sources/Tokens/FontsScreen.swift | 2 +- .../Sources/Tokens/GradientsScreen.swift | 2 +- .../Inspector/Sources/Tokens/IconsScreen.swift | 2 +- 14 files changed, 33 insertions(+), 27 deletions(-) diff --git a/compound-ios/Inspector/Inspector.xcodeproj/project.pbxproj b/compound-ios/Inspector/Inspector.xcodeproj/project.pbxproj index 197c56663..26292b661 100644 --- a/compound-ios/Inspector/Inspector.xcodeproj/project.pbxproj +++ b/compound-ios/Inspector/Inspector.xcodeproj/project.pbxproj @@ -256,10 +256,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Compound Inspector/Pods-Compound Inspector-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Compound Inspector/Pods-Compound Inspector-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Compound Inspector/Pods-Compound Inspector-frameworks.sh\"\n"; @@ -450,6 +454,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -485,6 +490,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/compound-ios/Inspector/Sources/Components/ListScreen.swift b/compound-ios/Inspector/Sources/Components/ListScreen.swift index c9eb35369..e64206ebd 100644 --- a/compound-ios/Inspector/Sources/Components/ListScreen.swift +++ b/compound-ios/Inspector/Sources/Components/ListScreen.swift @@ -5,9 +5,9 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound import HyperionCore +import SwiftUI struct ListScreen: View { var body: some View { diff --git a/compound-ios/Inspector/Sources/Components/TextFieldsScreen.swift b/compound-ios/Inspector/Sources/Components/TextFieldsScreen.swift index 9d9058bd1..4162cfea9 100644 --- a/compound-ios/Inspector/Sources/Components/TextFieldsScreen.swift +++ b/compound-ios/Inspector/Sources/Components/TextFieldsScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import DesignKit +import SwiftUI struct TextFieldsScreen: View { var body: some View { diff --git a/compound-ios/Inspector/Sources/CompoundInspectorApp.swift b/compound-ios/Inspector/Sources/CompoundInspectorApp.swift index 522f5570b..82473eb68 100644 --- a/compound-ios/Inspector/Sources/CompoundInspectorApp.swift +++ b/compound-ios/Inspector/Sources/CompoundInspectorApp.swift @@ -5,9 +5,9 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound import HyperionCore +import SwiftUI @main struct CompoundInspectorApp: App { @@ -24,11 +24,11 @@ struct CompoundInspectorApp: App { .navigationTitle("Components") .navigationDestination(for: Screen.self) { screen in screen - #if targetEnvironment(macCatalyst) - .dynamicTypeSize(dynamicTypeSize) - #endif - .navigationBarTitleDisplayMode(.inline) - .toolbar { screenToolbar } + #if targetEnvironment(macCatalyst) + .dynamicTypeSize(dynamicTypeSize) + #endif + .navigationBarTitleDisplayMode(.inline) + .toolbar { screenToolbar } } } detail: { EmptyView() diff --git a/compound-ios/Inspector/Sources/System Components/ActionSheetScreen.swift b/compound-ios/Inspector/Sources/System Components/ActionSheetScreen.swift index 0b96b5e54..18cd0dc9c 100644 --- a/compound-ios/Inspector/Sources/System Components/ActionSheetScreen.swift +++ b/compound-ios/Inspector/Sources/System Components/ActionSheetScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct ActionSheetScreen: View { @State private var isPresentingConfirmationDialog = true diff --git a/compound-ios/Inspector/Sources/System Components/AlertScreen.swift b/compound-ios/Inspector/Sources/System Components/AlertScreen.swift index 433bb7126..0747eed73 100644 --- a/compound-ios/Inspector/Sources/System Components/AlertScreen.swift +++ b/compound-ios/Inspector/Sources/System Components/AlertScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct AlertScreen: View { @State private var isPresentingActionAlert = false diff --git a/compound-ios/Inspector/Sources/System Components/ContextMenuScreen.swift b/compound-ios/Inspector/Sources/System Components/ContextMenuScreen.swift index 7356f9ce1..16b1cbd08 100644 --- a/compound-ios/Inspector/Sources/System Components/ContextMenuScreen.swift +++ b/compound-ios/Inspector/Sources/System Components/ContextMenuScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct ContextMenuScreen: View { var body: some View { diff --git a/compound-ios/Inspector/Sources/System Components/NavigationBarScreen.swift b/compound-ios/Inspector/Sources/System Components/NavigationBarScreen.swift index d6d18a031..c49ca6ae7 100644 --- a/compound-ios/Inspector/Sources/System Components/NavigationBarScreen.swift +++ b/compound-ios/Inspector/Sources/System Components/NavigationBarScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct NavigationBarScreen: View { enum TitleMode { @@ -42,16 +42,16 @@ struct NavigationBarScreen: View { Section { ListRow(label: .plain(title: "Title"), kind: .picker(selection: $titleMode, items: [ - (title: "Large", tag: .large), - (title: "Inline", tag: .inline), - (title: "Hidden", tag: .hidden) - ])) + (title: "Large", tag: .large), + (title: "Inline", tag: .inline), + (title: "Hidden", tag: .hidden) + ])) ListRow(label: .plain(title: "Back Button"), kind: .picker(selection: $backButtonMode, items: [ - (title: "Navigation", tag: .navigation), - (title: "Cancelation Action", tag: .cancellationAction), - (title: "Hidden", tag: .hidden) - ])) + (title: "Navigation", tag: .navigation), + (title: "Cancelation Action", tag: .cancellationAction), + (title: "Hidden", tag: .hidden) + ])) ListRow(label: .plain(title: "Confirmation Action"), kind: .toggle($hasConfirmationAction)) diff --git a/compound-ios/Inspector/Sources/System Components/ShareSheetScreen.swift b/compound-ios/Inspector/Sources/System Components/ShareSheetScreen.swift index 685ad91a2..58edaed00 100644 --- a/compound-ios/Inspector/Sources/System Components/ShareSheetScreen.swift +++ b/compound-ios/Inspector/Sources/System Components/ShareSheetScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct ShareSheetScreen: View { var body: some View { diff --git a/compound-ios/Inspector/Sources/Tokens/AllCases.swift b/compound-ios/Inspector/Sources/Tokens/AllCases.swift index 6fef44c62..2582e2859 100644 --- a/compound-ios/Inspector/Sources/Tokens/AllCases.swift +++ b/compound-ios/Inspector/Sources/Tokens/AllCases.swift @@ -61,6 +61,6 @@ extension CompoundIcons { } private subscript(checkedMirrorDescendant key: String) -> Any { - return Mirror(reflecting: self).descendant(key)! + Mirror(reflecting: self).descendant(key)! } } diff --git a/compound-ios/Inspector/Sources/Tokens/ColorsScreen.swift b/compound-ios/Inspector/Sources/Tokens/ColorsScreen.swift index 81f5bb0e1..5914620d2 100644 --- a/compound-ios/Inspector/Sources/Tokens/ColorsScreen.swift +++ b/compound-ios/Inspector/Sources/Tokens/ColorsScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct ColorsScreen: View { var body: some View { @@ -71,7 +71,7 @@ private extension Color { private extension CGFloat { var asHex: String { - String(format:"%02X", Int((self * 255).rounded())) + String(format: "%02X", Int((self * 255).rounded())) } } diff --git a/compound-ios/Inspector/Sources/Tokens/FontsScreen.swift b/compound-ios/Inspector/Sources/Tokens/FontsScreen.swift index 92f26f098..94743ce91 100644 --- a/compound-ios/Inspector/Sources/Tokens/FontsScreen.swift +++ b/compound-ios/Inspector/Sources/Tokens/FontsScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct FontsScreen: View { var body: some View { diff --git a/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift b/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift index a216064ca..17729a4e5 100644 --- a/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift +++ b/compound-ios/Inspector/Sources/Tokens/GradientsScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct GradientsScreen: View { var body: some View { diff --git a/compound-ios/Inspector/Sources/Tokens/IconsScreen.swift b/compound-ios/Inspector/Sources/Tokens/IconsScreen.swift index 65656e231..4d00b37f9 100644 --- a/compound-ios/Inspector/Sources/Tokens/IconsScreen.swift +++ b/compound-ios/Inspector/Sources/Tokens/IconsScreen.swift @@ -5,8 +5,8 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI import Compound +import SwiftUI struct IconsScreen: View { let icons = Image.compound.allValues.sorted(by: { $0.name < $1.name })