Skip to content

Commit c61f927

Browse files
committed
WIP
1 parent 569c4ee commit c61f927

27 files changed

+108
-54
lines changed

Sources/ViewTypes/ColorPicker.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `ColorPicker` type in SwiftUI.
53
///
64
/// ### iOS
@@ -59,6 +57,8 @@ extension IntrospectableViewType where Self == ColorPickerType {
5957
}
6058

6159
#if canImport(UIKit)
60+
public import UIKit
61+
6262
@available(iOS 14, *)
6363
extension iOSViewVersion<ColorPickerType, UIColorWell> {
6464
@available(*, unavailable, message: "ColorPicker isn't available on iOS 13")
@@ -78,6 +78,8 @@ extension visionOSViewVersion<ColorPickerType, UIColorWell> {
7878
public static let v26 = Self(for: .v26)
7979
}
8080
#elseif canImport(AppKit)
81+
public import AppKit
82+
8183
@available(macOS 11, *)
8284
extension macOSViewVersion<ColorPickerType, NSColorWell> {
8385
@available(*, unavailable, message: "ColorPicker isn't available on macOS 10.15")

Sources/ViewTypes/DatePicker.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `DatePicker` type in SwiftUI.
53
///
64
/// ### iOS
@@ -57,6 +55,8 @@ extension IntrospectableViewType where Self == DatePickerType {
5755
}
5856

5957
#if canImport(UIKit)
58+
public import UIKit
59+
6060
extension iOSViewVersion<DatePickerType, UIDatePicker> {
6161
public static let v13 = Self(for: .v13)
6262
public static let v14 = Self(for: .v14)
@@ -73,6 +73,8 @@ extension visionOSViewVersion<DatePickerType, UIDatePicker> {
7373
public static let v26 = Self(for: .v26)
7474
}
7575
#elseif canImport(AppKit)
76+
public import AppKit
77+
7678
extension macOSViewVersion<DatePickerType, NSDatePicker> {
7779
public static let v10_15 = Self(for: .v10_15)
7880
public static let v11 = Self(for: .v11)

Sources/ViewTypes/DatePickerWithCompactStyle.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `DatePicker` type in SwiftUI, with `.compact` style.
53
///
64
/// ### iOS
@@ -66,6 +64,8 @@ extension IntrospectableViewType where Self == DatePickerWithCompactStyleType {
6664
}
6765

6866
#if canImport(UIKit)
67+
public import UIKit
68+
6969
extension iOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
7070
@available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on iOS 13")
7171
public static let v13 = Self.unavailable()
@@ -83,6 +83,8 @@ extension visionOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
8383
public static let v26 = Self(for: .v26)
8484
}
8585
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
86+
public import AppKit
87+
8688
extension macOSViewVersion<DatePickerWithCompactStyleType, NSDatePicker> {
8789
@available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on macOS 10.15")
8890
public static let v10_15 = Self.unavailable()

Sources/ViewTypes/DatePickerWithGraphicalStyle.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `DatePicker` type in SwiftUI, with `.graphical` style.
53
///
64
/// ### iOS
@@ -66,6 +64,8 @@ extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType
6664
}
6765

6866
#if canImport(UIKit)
67+
public import UIKit
68+
6969
extension iOSViewVersion<DatePickerWithGraphicalStyleType, UIDatePicker> {
7070
@available(*, unavailable, message: ".datePickerStyle(.graphical) isn't available on iOS 13")
7171
public static let v13 = Self(for: .v13)
@@ -83,6 +83,8 @@ extension visionOSViewVersion<DatePickerWithGraphicalStyleType, UIDatePicker> {
8383
public static let v26 = Self(for: .v26)
8484
}
8585
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
86+
public import AppKit
87+
8688
extension macOSViewVersion<DatePickerWithGraphicalStyleType, NSDatePicker> {
8789
public static let v10_15 = Self(for: .v10_15)
8890
public static let v11 = Self(for: .v11)

Sources/ViewTypes/FormWithGroupedStyle.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `Form` type in SwiftUI, with `.grouped` style.
53
///
64
/// ### iOS
@@ -85,6 +83,8 @@ extension IntrospectableViewType where Self == FormWithGroupedStyleType {
8583
}
8684

8785
#if canImport(UIKit)
86+
public import UIKit
87+
8888
extension iOSViewVersion<FormWithGroupedStyleType, UITableView> {
8989
@available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 13")
9090
public static let v13 = Self.unavailable()
@@ -120,6 +120,8 @@ extension visionOSViewVersion<FormWithGroupedStyleType, UICollectionView> {
120120
public static let v26 = Self(for: .v26)
121121
}
122122
#elseif canImport(AppKit)
123+
public import AppKit
124+
123125
extension macOSViewVersion<FormWithGroupedStyleType, NSScrollView> {
124126
@available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 10.15")
125127
public static let v10_15 = Self.unavailable()

Sources/ViewTypes/List.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `List` type in SwiftUI.
53
///
64
/// ### iOS
@@ -85,6 +83,8 @@ extension IntrospectableViewType where Self == ListType {
8583
}
8684

8785
#if canImport(UIKit)
86+
public import UIKit
87+
8888
extension iOSViewVersion<ListType, UITableView> {
8989
public static let v13 = Self(for: .v13)
9090
public static let v14 = Self(for: .v14)
@@ -114,6 +114,8 @@ extension visionOSViewVersion<ListType, UICollectionView> {
114114
public static let v26 = Self(for: .v26)
115115
}
116116
#elseif canImport(AppKit)
117+
public import AppKit
118+
117119
extension macOSViewVersion<ListType, NSTableView> {
118120
public static let v10_15 = Self(for: .v10_15)
119121
public static let v11 = Self(for: .v11)

Sources/ViewTypes/ListCell.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of a `List` cell type in SwiftUI.
53
///
64
/// ### iOS
@@ -82,6 +80,8 @@ extension IntrospectableViewType where Self == ListCellType {
8280
}
8381

8482
#if canImport(UIKit)
83+
public import UIKit
84+
8585
extension iOSViewVersion<ListCellType, UITableViewCell> {
8686
public static let v13 = Self(for: .v13)
8787
public static let v14 = Self(for: .v14)
@@ -111,6 +111,8 @@ extension visionOSViewVersion<ListCellType, UICollectionViewCell> {
111111
public static let v26 = Self(for: .v26)
112112
}
113113
#elseif canImport(AppKit)
114+
public import AppKit
115+
114116
extension macOSViewVersion<ListCellType, NSTableCellView> {
115117
public static let v10_15 = Self(for: .v10_15)
116118
public static let v11 = Self(for: .v11)

Sources/ViewTypes/ListWithInsetStyle.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `List` type in SwiftUI, with `.inset` style.
53
///
64
/// ### iOS
@@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithInsetStyleType {
7573
}
7674

7775
#if canImport(UIKit)
76+
public import UIKit
77+
7878
extension iOSViewVersion<ListWithInsetStyleType, UITableView> {
7979
@available(*, unavailable, message: ".listStyle(.inset) isn't available on iOS 13")
8080
public static let v13 = Self.unavailable()
@@ -95,6 +95,8 @@ extension visionOSViewVersion<ListWithInsetStyleType, UICollectionView> {
9595
public static let v26 = Self(for: .v26)
9696
}
9797
#elseif canImport(AppKit)
98+
public import AppKit
99+
98100
extension macOSViewVersion<ListWithInsetStyleType, NSTableView> {
99101
@available(*, unavailable, message: ".listStyle(.inset) isn't available on macOS 10.15")
100102
public static let v10_15 = Self.unavailable()

Sources/ViewTypes/ListWithSidebarStyle.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `List` type in SwiftUI, with `.sidebar` style.
53
///
64
/// ### iOS
@@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithSidebarStyleType {
7573
}
7674

7775
#if canImport(UIKit)
76+
public import UIKit
77+
7878
extension iOSViewVersion<ListWithSidebarStyleType, UITableView> {
7979
@available(*, unavailable, message: ".listStyle(.sidebar) isn't available on iOS 13")
8080
public static let v13 = Self.unavailable()
@@ -95,6 +95,8 @@ extension visionOSViewVersion<ListWithSidebarStyleType, UICollectionView> {
9595
public static let v26 = Self(for: .v26)
9696
}
9797
#elseif canImport(AppKit)
98+
public import AppKit
99+
98100
extension macOSViewVersion<ListWithSidebarStyleType, NSTableView> {
99101
public static let v10_15 = Self(for: .v10_15)
100102
public static let v11 = Self(for: .v11)

Sources/ViewTypes/NavigationSplitView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#if !os(watchOS)
2-
public import SwiftUI
3-
42
/// An abstract representation of the `NavigationSplitView` type in SwiftUI.
53
///
64
/// ### iOS
@@ -77,6 +75,8 @@ extension IntrospectableViewType where Self == NavigationSplitViewType {
7775
}
7876

7977
#if canImport(UIKit)
78+
public import UIKit
79+
8080
extension iOSViewVersion<NavigationSplitViewType, UISplitViewController> {
8181
@available(*, unavailable, message: "NavigationSplitView isn't available on iOS 13")
8282
public static let v13 = Self.unavailable()
@@ -125,6 +125,8 @@ extension visionOSViewVersion<NavigationSplitViewType, UISplitViewController> {
125125
}
126126
}
127127
#elseif canImport(AppKit)
128+
public import AppKit
129+
128130
extension macOSViewVersion<NavigationSplitViewType, NSSplitView> {
129131
@available(*, unavailable, message: "NavigationSplitView isn't available on macOS 10.15")
130132
public static let v10_15 = Self.unavailable()

0 commit comments

Comments
 (0)