Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ let package = Package(
),
]
)

for target in package.targets {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings? += [
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InternalImportsByDefault"),
]
}
2 changes: 1 addition & 1 deletion Sources/Introspect.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if !os(watchOS)
import SwiftUI
public import SwiftUI

/// The scope of introspection i.e. where introspect should look to find
/// the desired target view relative to the applied `.introspect(...)`
Expand Down
2 changes: 1 addition & 1 deletion Sources/PlatformView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if !os(watchOS)
import SwiftUI
public import SwiftUI

#if canImport(UIKit)
public typealias PlatformView = UIView
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/Button.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `Button` type in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -35,6 +33,8 @@ extension IntrospectableViewType where Self == ButtonType {
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
public import AppKit

extension macOSViewVersion<ButtonType, NSButton> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/ColorPicker.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `ColorPicker` type in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -59,6 +57,8 @@ extension IntrospectableViewType where Self == ColorPickerType {
}

#if canImport(UIKit)
public import UIKit

@available(iOS 14, *)
extension iOSViewVersion<ColorPickerType, UIColorWell> {
@available(*, unavailable, message: "ColorPicker isn't available on iOS 13")
Expand All @@ -78,6 +78,8 @@ extension visionOSViewVersion<ColorPickerType, UIColorWell> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

@available(macOS 11, *)
extension macOSViewVersion<ColorPickerType, NSColorWell> {
@available(*, unavailable, message: "ColorPicker isn't available on macOS 10.15")
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/DatePicker.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `DatePicker` type in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -57,6 +55,8 @@ extension IntrospectableViewType where Self == DatePickerType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<DatePickerType, UIDatePicker> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
Expand All @@ -73,6 +73,8 @@ extension visionOSViewVersion<DatePickerType, UIDatePicker> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

extension macOSViewVersion<DatePickerType, NSDatePicker> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/DatePickerWithCompactStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `DatePicker` type in SwiftUI, with `.compact` style.
///
/// ### iOS
Expand Down Expand Up @@ -66,6 +64,8 @@ extension IntrospectableViewType where Self == DatePickerWithCompactStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
@available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on iOS 13")
public static let v13 = Self.unavailable()
Expand All @@ -83,6 +83,8 @@ extension visionOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
public import AppKit

extension macOSViewVersion<DatePickerWithCompactStyleType, NSDatePicker> {
@available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on macOS 10.15")
public static let v10_15 = Self.unavailable()
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/DatePickerWithFieldStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `DatePicker` type in SwiftUI, with `.field` style.
///
/// ### iOS
Expand Down Expand Up @@ -42,6 +40,8 @@ extension IntrospectableViewType where Self == DatePickerWithFieldStyleType {
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
public import AppKit

extension macOSViewVersion<DatePickerWithFieldStyleType, NSDatePicker> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/DatePickerWithGraphicalStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `DatePicker` type in SwiftUI, with `.graphical` style.
///
/// ### iOS
Expand Down Expand Up @@ -66,6 +64,8 @@ extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<DatePickerWithGraphicalStyleType, UIDatePicker> {
@available(*, unavailable, message: ".datePickerStyle(.graphical) isn't available on iOS 13")
public static let v13 = Self(for: .v13)
Expand All @@ -83,6 +83,8 @@ extension visionOSViewVersion<DatePickerWithGraphicalStyleType, UIDatePicker> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
public import AppKit

extension macOSViewVersion<DatePickerWithGraphicalStyleType, NSDatePicker> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `DatePicker` type in SwiftUI, with `.stepperField` style.
///
/// ### iOS
Expand Down Expand Up @@ -42,6 +40,8 @@ extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleTy
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
public import AppKit

extension macOSViewVersion<DatePickerWithStepperFieldStyleType, NSDatePicker> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/DatePickerWithWheelStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `DatePicker` type in SwiftUI, with `.wheel` style.
///
/// ### iOS
Expand Down Expand Up @@ -54,6 +52,8 @@ extension IntrospectableViewType where Self == DatePickerWithWheelStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<DatePickerWithWheelStyleType, UIDatePicker> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/Form.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `Form` type in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -68,6 +66,8 @@ extension IntrospectableViewType where Self == FormType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<FormType, UITableView> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/FormWithGroupedStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `Form` type in SwiftUI, with `.grouped` style.
///
/// ### iOS
Expand Down Expand Up @@ -85,6 +83,8 @@ extension IntrospectableViewType where Self == FormWithGroupedStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<FormWithGroupedStyleType, UITableView> {
@available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 13")
public static let v13 = Self.unavailable()
Expand Down Expand Up @@ -120,6 +120,8 @@ extension visionOSViewVersion<FormWithGroupedStyleType, UICollectionView> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

extension macOSViewVersion<FormWithGroupedStyleType, NSScrollView> {
@available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 10.15")
public static let v10_15 = Self.unavailable()
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/FullScreenCover.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of `.fullScreenCover` in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -70,6 +68,8 @@ extension IntrospectableViewType where Self == FullScreenCoverType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<FullScreenCoverType, UIPresentationController> {
@available(*, unavailable, message: ".fullScreenCover isn't available on iOS 13")
public static let v13 = Self.unavailable()
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/List.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `List` type in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -85,6 +83,8 @@ extension IntrospectableViewType where Self == ListType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<ListType, UITableView> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
Expand Down Expand Up @@ -114,6 +114,8 @@ extension visionOSViewVersion<ListType, UICollectionView> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

extension macOSViewVersion<ListType, NSTableView> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/ListCell.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of a `List` cell type in SwiftUI.
///
/// ### iOS
Expand Down Expand Up @@ -82,6 +80,8 @@ extension IntrospectableViewType where Self == ListCellType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<ListCellType, UITableViewCell> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
Expand Down Expand Up @@ -111,6 +111,8 @@ extension visionOSViewVersion<ListCellType, UICollectionViewCell> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

extension macOSViewVersion<ListCellType, NSTableCellView> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/ListWithBorderedStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `List` type in SwiftUI, with `.bordered` style.
///
/// ### iOS
Expand Down Expand Up @@ -44,6 +42,8 @@ extension IntrospectableViewType where Self == ListWithBorderedStyleType {
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
public import AppKit

extension macOSViewVersion<ListWithBorderedStyleType, NSTableView> {
@available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on macOS 10.15")
public static let v10_15 = Self.unavailable()
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/ListWithGroupedStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `List` type in SwiftUI, with `.grouped` style.
///
/// ### iOS
Expand Down Expand Up @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithGroupedStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<ListWithGroupedStyleType, UITableView> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/ListWithInsetGroupedStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `List` type in SwiftUI, with `.insetGrouped` style.
///
/// ### iOS
Expand Down Expand Up @@ -61,6 +59,8 @@ extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<ListWithInsetGroupedStyleType, UITableView> {
@available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on iOS 13")
public static let v13 = Self(for: .v13)
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/ListWithInsetStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `List` type in SwiftUI, with `.inset` style.
///
/// ### iOS
Expand Down Expand Up @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithInsetStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<ListWithInsetStyleType, UITableView> {
@available(*, unavailable, message: ".listStyle(.inset) isn't available on iOS 13")
public static let v13 = Self.unavailable()
Expand All @@ -95,6 +95,8 @@ extension visionOSViewVersion<ListWithInsetStyleType, UICollectionView> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

extension macOSViewVersion<ListWithInsetStyleType, NSTableView> {
@available(*, unavailable, message: ".listStyle(.inset) isn't available on macOS 10.15")
public static let v10_15 = Self.unavailable()
Expand Down
6 changes: 4 additions & 2 deletions Sources/ViewTypes/ListWithSidebarStyle.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if !os(watchOS)
import SwiftUI

/// An abstract representation of the `List` type in SwiftUI, with `.sidebar` style.
///
/// ### iOS
Expand Down Expand Up @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithSidebarStyleType {
}

#if canImport(UIKit)
public import UIKit

extension iOSViewVersion<ListWithSidebarStyleType, UITableView> {
@available(*, unavailable, message: ".listStyle(.sidebar) isn't available on iOS 13")
public static let v13 = Self.unavailable()
Expand All @@ -95,6 +95,8 @@ extension visionOSViewVersion<ListWithSidebarStyleType, UICollectionView> {
public static let v26 = Self(for: .v26)
}
#elseif canImport(AppKit)
public import AppKit

extension macOSViewVersion<ListWithSidebarStyleType, NSTableView> {
public static let v10_15 = Self(for: .v10_15)
public static let v11 = Self(for: .v11)
Expand Down
Loading