From 0ec5f54986d9a992212015dc053ae6a22f925ec4 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Tue, 8 Jul 2025 19:22:09 +0100 Subject: [PATCH 1/6] WIP --- Package.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Package.swift b/Package.swift index f7084dbd..a31ff59d 100644 --- a/Package.swift +++ b/Package.swift @@ -21,3 +21,11 @@ let package = Package( ), ] ) + +for target in package.targets { + target.swiftSettings = target.swiftSettings ?? [] + target.swiftSettings? += [ + .enableUpcomingFeature("ExistentialAny"), + .enableUpcomingFeature("InternalImportsByDefault"), + ] +} From 21bdb817515d6313f2f7c86b4d7e15d4633be87d Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 9 Jul 2025 08:28:55 +0100 Subject: [PATCH 2/6] WIP --- Sources/Introspect.swift | 2 +- Sources/PlatformView.swift | 2 +- Sources/ViewTypes/ColorPicker.swift | 2 +- Sources/ViewTypes/DatePicker.swift | 2 +- Sources/ViewTypes/DatePickerWithCompactStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithGraphicalStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithWheelStyle.swift | 2 +- Sources/ViewTypes/Form.swift | 2 +- Sources/ViewTypes/FormWithGroupedStyle.swift | 2 +- Sources/ViewTypes/FullScreenCover.swift | 2 +- Sources/ViewTypes/List.swift | 2 +- Sources/ViewTypes/ListCell.swift | 2 +- Sources/ViewTypes/ListWithGroupedStyle.swift | 2 +- Sources/ViewTypes/ListWithInsetGroupedStyle.swift | 2 +- Sources/ViewTypes/ListWithInsetStyle.swift | 2 +- Sources/ViewTypes/ListWithSidebarStyle.swift | 2 +- Sources/ViewTypes/Map.swift | 2 +- Sources/ViewTypes/NavigationSplitView.swift | 2 +- Sources/ViewTypes/NavigationStack.swift | 2 +- Sources/ViewTypes/NavigationViewWithColumnsStyle.swift | 2 +- Sources/ViewTypes/NavigationViewWithStackStyle.swift | 2 +- Sources/ViewTypes/PageControl.swift | 2 +- Sources/ViewTypes/PickerWithSegmentedStyle.swift | 2 +- Sources/ViewTypes/PickerWithWheelStyle.swift | 2 +- Sources/ViewTypes/Popover.swift | 2 +- Sources/ViewTypes/ProgressViewWithCircularStyle.swift | 2 +- Sources/ViewTypes/ProgressViewWithLinearStyle.swift | 2 +- Sources/ViewTypes/ScrollView.swift | 2 +- Sources/ViewTypes/SearchField.swift | 2 +- Sources/ViewTypes/SecureField.swift | 2 +- Sources/ViewTypes/Sheet.swift | 2 +- Sources/ViewTypes/Slider.swift | 2 +- Sources/ViewTypes/Stepper.swift | 2 +- Sources/ViewTypes/TabView.swift | 2 +- Sources/ViewTypes/TabViewWithPageStyle.swift | 2 +- Sources/ViewTypes/Table.swift | 2 +- Sources/ViewTypes/TextEditor.swift | 2 +- Sources/ViewTypes/TextField.swift | 2 +- Sources/ViewTypes/TextFieldWithVerticalAxis.swift | 2 +- Sources/ViewTypes/Toggle.swift | 2 +- Sources/ViewTypes/ToggleWithSwitchStyle.swift | 2 +- Sources/ViewTypes/VideoPlayer.swift | 2 +- Sources/ViewTypes/View.swift | 2 +- Sources/ViewTypes/ViewController.swift | 2 +- Sources/ViewTypes/WebView.swift | 2 +- Sources/ViewTypes/Window.swift | 2 +- 46 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Sources/Introspect.swift b/Sources/Introspect.swift index 8935b4d4..3adf8ddf 100644 --- a/Sources/Introspect.swift +++ b/Sources/Introspect.swift @@ -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(...)` diff --git a/Sources/PlatformView.swift b/Sources/PlatformView.swift index 11bc6f30..f6f0c6bc 100644 --- a/Sources/PlatformView.swift +++ b/Sources/PlatformView.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI #if canImport(UIKit) public typealias PlatformView = UIView diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index b1c2626d..ef158d54 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `ColorPicker` type in SwiftUI. /// diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index f2a6580f..36c64dee 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `DatePicker` type in SwiftUI. /// diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index 891b306f..1d69c402 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `DatePicker` type in SwiftUI, with `.compact` style. /// diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index e21a8dbd..586ea9cb 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `DatePicker` type in SwiftUI, with `.graphical` style. /// diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index 3968ff7b..af82992d 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `DatePicker` type in SwiftUI, with `.wheel` style. /// diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 10623953..40931a1c 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Form` type in SwiftUI. /// diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 2a1e7323..60131c55 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Form` type in SwiftUI, with `.grouped` style. /// diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index 53925c3e..d68c211a 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of `.fullScreenCover` in SwiftUI. /// diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index a3ae9f6c..9a6f6166 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `List` type in SwiftUI. /// diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index 70c28f9d..e4ba61c8 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of a `List` cell type in SwiftUI. /// diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index cecb6071..d9b7e039 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `List` type in SwiftUI, with `.grouped` style. /// diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index 19fe700e..0d44e9d5 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `List` type in SwiftUI, with `.insetGrouped` style. /// diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index e76bbff5..5197121b 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `List` type in SwiftUI, with `.inset` style. /// diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index 47973905..a43658a7 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `List` type in SwiftUI, with `.sidebar` style. /// diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index c24cabb6..3cc21770 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -65,7 +65,7 @@ import SwiftUI public struct MapType: IntrospectableViewType {} #if canImport(MapKit) -import MapKit +public import MapKit extension IntrospectableViewType where Self == MapType { public static var map: Self { .init() } diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 26182bfe..6d2b6b44 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `NavigationSplitView` type in SwiftUI. /// diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index 846cdefb..ec4605da 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `NavigationStack` type in SwiftUI. /// diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index 389e4fac..4ff9226f 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `NavigationView` type in SwiftUI, with `.columns` style. /// diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index 970b392f..cbb0d13d 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `NavigationView` type in SwiftUI, with `.stack` style. /// diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index 6750e4d3..97896140 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the page control type in SwiftUI. /// diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index be513511..03822cd1 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Picker` type in SwiftUI, with `.segmented` style. /// diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index 54a99bd8..04d07a7e 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Picker` type in SwiftUI, with `.wheel` style. /// diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index 1ef12137..208598d7 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of `.popover` in SwiftUI. /// diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index b7301e43..79a812e2 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `ProgressView` type in SwiftUI, with `.circular` style. /// diff --git a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift index 3617a8f5..87b23527 100644 --- a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `ProgressView` type in SwiftUI, with `.linear` style. /// diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index bb8a29d4..1baf90dc 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `ScrollView` type in SwiftUI. /// diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index 02ba40f4..d7a3340c 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the search field displayed via the `.searchable` modifier in SwiftUI. /// diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index 53366f35..6a17b16b 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `SecureField` type in SwiftUI. /// diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index f9feea88..4b358799 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of `.sheet` in SwiftUI. /// diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index c0b7a0e5..654bd786 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Slider` type in SwiftUI. /// diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index 5db0fed0..bd83cfbe 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Stepper` type in SwiftUI. /// diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index 3108905c..41e7d131 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `TabView` type in SwiftUI. /// diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 2e8c5bcf..9d7f7a6f 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `TabView` type in SwiftUI, with `.page` style. /// diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index a439069a..ea105a41 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Table` type in SwiftUI, with any style. /// diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index e8d54b3d..26fceb73 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `TextEditor` type in SwiftUI. /// diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index f6635df1..0765b8f5 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `TextField` type in SwiftUI. /// diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index 70cc88c7..d523946b 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `TextField` type in SwiftUI, with `.vertical` axis. /// diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index 8e5cb0fb..4b6eaedb 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Toggle` type in SwiftUI. /// diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index bab5bb91..3e3b8fd5 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Toggle` type in SwiftUI, with `.switch` style. /// diff --git a/Sources/ViewTypes/VideoPlayer.swift b/Sources/ViewTypes/VideoPlayer.swift index 8143ae35..c1a4b4d7 100644 --- a/Sources/ViewTypes/VideoPlayer.swift +++ b/Sources/ViewTypes/VideoPlayer.swift @@ -57,7 +57,7 @@ import SwiftUI public struct VideoPlayerType: IntrospectableViewType {} #if canImport(AVKit) -import AVKit +public import AVKit extension IntrospectableViewType where Self == VideoPlayerType { public static var videoPlayer: Self { .init() } diff --git a/Sources/ViewTypes/View.swift b/Sources/ViewTypes/View.swift index 8eed8665..174d546f 100644 --- a/Sources/ViewTypes/View.swift +++ b/Sources/ViewTypes/View.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of a generic SwiftUI view type. /// diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index 08c2cbed..f6ef4c4b 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the receiving SwiftUI view's view controller, /// or the closest ancestor view controller if missing. diff --git a/Sources/ViewTypes/WebView.swift b/Sources/ViewTypes/WebView.swift index ad18914a..759480a7 100644 --- a/Sources/ViewTypes/WebView.swift +++ b/Sources/ViewTypes/WebView.swift @@ -69,7 +69,7 @@ import SwiftUI public struct WebViewType: IntrospectableViewType {} #if canImport(WebKit) -import WebKit +public import WebKit extension IntrospectableViewType where Self == WebViewType { public static var webView: Self { .init() } diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index 86f58aa9..470be3f0 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of a view's window in SwiftUI. /// From dbd832b8acc8b8a1fab8fa9f0e2483fb8c37b56b Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:19:44 +0100 Subject: [PATCH 3/6] WIP --- Sources/ViewTypes/Button.swift | 2 +- Sources/ViewTypes/DatePickerWithFieldStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift | 2 +- Sources/ViewTypes/DatePickerWithWheelStyle.swift | 4 ++-- Sources/ViewTypes/Form.swift | 4 ++-- Sources/ViewTypes/FullScreenCover.swift | 4 ++-- Sources/ViewTypes/ListWithBorderedStyle.swift | 2 +- Sources/ViewTypes/ListWithGroupedStyle.swift | 4 ++-- Sources/ViewTypes/ListWithInsetGroupedStyle.swift | 4 ++-- Sources/ViewTypes/NavigationStack.swift | 4 ++-- Sources/ViewTypes/NavigationViewWithStackStyle.swift | 4 ++-- Sources/ViewTypes/PageControl.swift | 4 ++-- Sources/ViewTypes/PickerWithMenuStyle.swift | 2 +- Sources/ViewTypes/PickerWithWheelStyle.swift | 4 ++-- Sources/ViewTypes/Popover.swift | 4 ++-- Sources/ViewTypes/SearchField.swift | 4 ++-- Sources/ViewTypes/Sheet.swift | 4 ++-- Sources/ViewTypes/TabViewWithPageStyle.swift | 4 ++-- Sources/ViewTypes/ToggleWithButtonStyle.swift | 2 +- Sources/ViewTypes/ToggleWithCheckboxStyle.swift | 2 +- Sources/ViewTypes/ViewController.swift | 4 ++-- 21 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Sources/ViewTypes/Button.swift b/Sources/ViewTypes/Button.swift index 1303f55e..d806e0dd 100644 --- a/Sources/ViewTypes/Button.swift +++ b/Sources/ViewTypes/Button.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Button` type in SwiftUI. /// diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index ad465f69..80d785e3 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `DatePicker` type in SwiftUI, with `.field` style. /// diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index 4712ba85..9d6326b9 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `DatePicker` type in SwiftUI, with `.stepperField` style. /// diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index af82992d..ac5746bc 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `DatePicker` type in SwiftUI, with `.wheel` style. /// /// ### iOS @@ -54,6 +52,8 @@ extension IntrospectableViewType where Self == DatePickerWithWheelStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 40931a1c..f7786e7a 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Form` type in SwiftUI. /// /// ### iOS @@ -68,6 +66,8 @@ extension IntrospectableViewType where Self == FormType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index d68c211a..5b2351df 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of `.fullScreenCover` in SwiftUI. /// /// ### iOS @@ -70,6 +68,8 @@ extension IntrospectableViewType where Self == FullScreenCoverType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".fullScreenCover isn't available on iOS 13") public static let v13 = Self.unavailable() diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index c14eee91..9f84dc1b 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `List` type in SwiftUI, with `.bordered` style. /// diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index d9b7e039..1c4f7725 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `List` type in SwiftUI, with `.grouped` style. /// /// ### iOS @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithGroupedStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index 0d44e9d5..3d01a512 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `List` type in SwiftUI, with `.insetGrouped` style. /// /// ### iOS @@ -61,6 +59,8 @@ extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on iOS 13") public static let v13 = Self(for: .v13) diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index ec4605da..d18eba8c 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `NavigationStack` type in SwiftUI. /// /// ### iOS @@ -58,6 +56,8 @@ extension IntrospectableViewType where Self == NavigationStackType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: "NavigationStack isn't available on iOS 13") public static let v13 = Self.unavailable() diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index cbb0d13d..7d888aab 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `NavigationView` type in SwiftUI, with `.stack` style. /// /// ### iOS @@ -65,6 +63,8 @@ extension IntrospectableViewType where Self == NavigationViewWithStackStyleType } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index 97896140..2d280aa8 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the page control type in SwiftUI. /// /// ### iOS @@ -64,6 +62,8 @@ extension IntrospectableViewType where Self == PageControlType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on iOS 13") public static let v13 = Self(for: .v13) diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index 388a8c5e..115fe211 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Picker` type in SwiftUI, with `.menu` style. /// diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index 04d07a7e..34747584 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Picker` type in SwiftUI, with `.wheel` style. /// /// ### iOS @@ -62,6 +60,8 @@ extension IntrospectableViewType where Self == PickerWithWheelStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index 208598d7..6204476a 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of `.popover` in SwiftUI. /// /// ### iOS @@ -56,6 +54,8 @@ extension IntrospectableViewType where Self == PopoverType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index d7a3340c..e72ea079 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the search field displayed via the `.searchable` modifier in SwiftUI. /// /// ### iOS @@ -70,6 +68,8 @@ extension IntrospectableViewType where Self == SearchFieldType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".searchable isn't available on iOS 13") public static let v13 = Self.unavailable() diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index 4b358799..91600433 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of `.sheet` in SwiftUI. /// /// ### iOS @@ -70,6 +68,8 @@ extension IntrospectableViewType where Self == SheetType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 9d7f7a6f..0fbfacdf 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `TabView` type in SwiftUI, with `.page` style. /// /// ### iOS @@ -69,6 +67,8 @@ extension IntrospectableViewType where Self == TabViewWithPageStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".tabViewStyle(.page) isn't available on iOS 13") public static let v13 = Self.unavailable() diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index 9c0b3f99..f109489f 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Toggle` type in SwiftUI, with `.button` style. /// diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index ac17b97a..ec1070c0 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -1,5 +1,5 @@ #if !os(watchOS) -import SwiftUI +public import SwiftUI /// An abstract representation of the `Toggle` type in SwiftUI, with `.checkbox` style. /// diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index f6ef4c4b..77e20110 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the receiving SwiftUI view's view controller, /// or the closest ancestor view controller if missing. /// @@ -73,6 +71,8 @@ extension IntrospectableViewType where Self == ViewControllerType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) From 569c4ee650ebe5b16ab9aeb8ab6c0f4c50b0611a Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:21:15 +0100 Subject: [PATCH 4/6] WIP --- Sources/ViewTypes/Button.swift | 4 ++-- Sources/ViewTypes/DatePickerWithFieldStyle.swift | 4 ++-- Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift | 4 ++-- Sources/ViewTypes/ListWithBorderedStyle.swift | 4 ++-- Sources/ViewTypes/PickerWithMenuStyle.swift | 4 ++-- Sources/ViewTypes/ToggleWithButtonStyle.swift | 4 ++-- Sources/ViewTypes/ToggleWithCheckboxStyle.swift | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Sources/ViewTypes/Button.swift b/Sources/ViewTypes/Button.swift index d806e0dd..dda84a0c 100644 --- a/Sources/ViewTypes/Button.swift +++ b/Sources/ViewTypes/Button.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Button` type in SwiftUI. /// /// ### iOS @@ -35,6 +33,8 @@ extension IntrospectableViewType where Self == ButtonType { } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index 80d785e3..7461fbba 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `DatePicker` type in SwiftUI, with `.field` style. /// /// ### iOS @@ -42,6 +40,8 @@ extension IntrospectableViewType where Self == DatePickerWithFieldStyleType { } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index 9d6326b9..0c9cb709 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `DatePicker` type in SwiftUI, with `.stepperField` style. /// /// ### iOS @@ -42,6 +40,8 @@ extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleTy } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index 9f84dc1b..d909ded6 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `List` type in SwiftUI, with `.bordered` style. /// /// ### iOS @@ -44,6 +42,8 @@ extension IntrospectableViewType where Self == ListWithBorderedStyleType { } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".listStyle(.insetGrouped) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index 115fe211..96ac5b4e 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Picker` type in SwiftUI, with `.menu` style. /// /// ### iOS @@ -46,6 +44,8 @@ extension IntrospectableViewType where Self == PickerWithMenuStyleType { } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".pickerStyle(.menu) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index f109489f..aa51f0c1 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Toggle` type in SwiftUI, with `.button` style. /// /// ### iOS @@ -42,6 +40,8 @@ extension IntrospectableViewType where Self == ToggleWithButtonStyleType { } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".toggleStyle(.button) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index ec1070c0..1b16d9d5 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Toggle` type in SwiftUI, with `.checkbox` style. /// /// ### iOS @@ -42,6 +40,8 @@ extension IntrospectableViewType where Self == ToggleWithCheckboxStyleType { } #if canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) From c61f92751705e727795424eb0029dae1d50c0bd5 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:26:48 +0100 Subject: [PATCH 5/6] WIP --- Sources/ViewTypes/ColorPicker.swift | 6 ++++-- Sources/ViewTypes/DatePicker.swift | 6 ++++-- Sources/ViewTypes/DatePickerWithCompactStyle.swift | 6 ++++-- Sources/ViewTypes/DatePickerWithGraphicalStyle.swift | 6 ++++-- Sources/ViewTypes/FormWithGroupedStyle.swift | 6 ++++-- Sources/ViewTypes/List.swift | 6 ++++-- Sources/ViewTypes/ListCell.swift | 6 ++++-- Sources/ViewTypes/ListWithInsetStyle.swift | 6 ++++-- Sources/ViewTypes/ListWithSidebarStyle.swift | 6 ++++-- Sources/ViewTypes/NavigationSplitView.swift | 6 ++++-- Sources/ViewTypes/NavigationViewWithColumnsStyle.swift | 6 ++++-- Sources/ViewTypes/PickerWithSegmentedStyle.swift | 6 ++++-- Sources/ViewTypes/ProgressViewWithCircularStyle.swift | 6 ++++-- Sources/ViewTypes/ProgressViewWithLinearStyle.swift | 6 ++++-- Sources/ViewTypes/ScrollView.swift | 6 ++++-- Sources/ViewTypes/SecureField.swift | 6 ++++-- Sources/ViewTypes/Slider.swift | 6 ++++-- Sources/ViewTypes/Stepper.swift | 6 ++++-- Sources/ViewTypes/TabView.swift | 6 ++++-- Sources/ViewTypes/Table.swift | 6 ++++-- Sources/ViewTypes/TextEditor.swift | 6 ++++-- Sources/ViewTypes/TextField.swift | 6 ++++-- Sources/ViewTypes/TextFieldWithVerticalAxis.swift | 6 ++++-- Sources/ViewTypes/Toggle.swift | 6 ++++-- Sources/ViewTypes/ToggleWithSwitchStyle.swift | 6 ++++-- Sources/ViewTypes/View.swift | 6 ++++-- Sources/ViewTypes/Window.swift | 6 ++++-- 27 files changed, 108 insertions(+), 54 deletions(-) diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index ef158d54..cfb3e7f0 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `ColorPicker` type in SwiftUI. /// /// ### iOS @@ -59,6 +57,8 @@ extension IntrospectableViewType where Self == ColorPickerType { } #if canImport(UIKit) +public import UIKit + @available(iOS 14, *) extension iOSViewVersion { @available(*, unavailable, message: "ColorPicker isn't available on iOS 13") @@ -78,6 +78,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + @available(macOS 11, *) extension macOSViewVersion { @available(*, unavailable, message: "ColorPicker isn't available on macOS 10.15") diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index 36c64dee..271f1687 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `DatePicker` type in SwiftUI. /// /// ### iOS @@ -57,6 +55,8 @@ extension IntrospectableViewType where Self == DatePickerType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -73,6 +73,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index 1d69c402..d468c30c 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `DatePicker` type in SwiftUI, with `.compact` style. /// /// ### iOS @@ -66,6 +64,8 @@ extension IntrospectableViewType where Self == DatePickerWithCompactStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -83,6 +83,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.compact) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index 586ea9cb..d9deb75b 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `DatePicker` type in SwiftUI, with `.graphical` style. /// /// ### iOS @@ -66,6 +64,8 @@ extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".datePickerStyle(.graphical) isn't available on iOS 13") public static let v13 = Self(for: .v13) @@ -83,6 +83,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 60131c55..2d2b1913 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Form` type in SwiftUI, with `.grouped` style. /// /// ### iOS @@ -85,6 +83,8 @@ extension IntrospectableViewType where Self == FormWithGroupedStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -120,6 +120,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".formStyle(.grouped) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index 9a6f6166..1c1e6112 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `List` type in SwiftUI. /// /// ### iOS @@ -85,6 +83,8 @@ extension IntrospectableViewType where Self == ListType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -114,6 +114,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index e4ba61c8..0d8229e3 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of a `List` cell type in SwiftUI. /// /// ### iOS @@ -82,6 +80,8 @@ extension IntrospectableViewType where Self == ListCellType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -111,6 +111,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index 5197121b..a142c34e 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `List` type in SwiftUI, with `.inset` style. /// /// ### iOS @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithInsetStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.inset) isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -95,6 +95,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".listStyle(.inset) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index a43658a7..e5951bdd 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `List` type in SwiftUI, with `.sidebar` style. /// /// ### iOS @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == ListWithSidebarStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".listStyle(.sidebar) isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -95,6 +95,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 6d2b6b44..3efe3dd5 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `NavigationSplitView` type in SwiftUI. /// /// ### iOS @@ -77,6 +75,8 @@ extension IntrospectableViewType where Self == NavigationSplitViewType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -125,6 +125,8 @@ extension visionOSViewVersion { } } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: "NavigationSplitView isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index 4ff9226f..9b681573 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `NavigationView` type in SwiftUI, with `.columns` style. /// /// ### iOS @@ -77,6 +75,8 @@ extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleTyp } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) @@ -115,6 +115,8 @@ extension visionOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index 03822cd1..f567693c 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Picker` type in SwiftUI, with `.segmented` style. /// /// ### iOS @@ -93,6 +91,8 @@ extension IntrospectableViewType where Self == PickerWithSegmentedStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -119,6 +119,8 @@ extension visionOSViewVersion public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index 79a812e2..168a075a 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `ProgressView` type in SwiftUI, with `.circular` style. /// /// ### iOS @@ -69,6 +67,8 @@ extension IntrospectableViewType where Self == ProgressViewWithCircularStyleType } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on iOS 13") public static let v13 = Self(for: .v13) @@ -97,6 +97,8 @@ extension visionOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.circular) isn't available on macOS 10.15") public static let v10_15 = Self(for: .v10_15) diff --git a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift index 87b23527..2f20bfbd 100644 --- a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `ProgressView` type in SwiftUI, with `.linear` style. /// /// ### iOS @@ -69,6 +67,8 @@ extension IntrospectableViewType where Self == ProgressViewWithLinearStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on iOS 13") public static let v13 = Self(for: .v13) @@ -97,6 +97,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: ".progressViewStyle(.linear) isn't available on macOS 10.15") public static let v10_15 = Self(for: .v10_15) diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index 1baf90dc..26d2c1fb 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `ScrollView` type in SwiftUI. /// /// ### iOS @@ -69,6 +67,8 @@ extension IntrospectableViewType where Self == ScrollViewType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -95,6 +95,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index 6a17b16b..3a41247b 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `SecureField` type in SwiftUI. /// /// ### iOS @@ -69,6 +67,8 @@ extension IntrospectableViewType where Self == SecureFieldType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -95,6 +95,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index 654bd786..d4691c68 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Slider` type in SwiftUI. /// /// ### iOS @@ -48,6 +46,8 @@ extension IntrospectableViewType where Self == SliderType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -58,6 +58,8 @@ extension iOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index bd83cfbe..163d459f 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Stepper` type in SwiftUI. /// /// ### iOS @@ -48,6 +46,8 @@ extension IntrospectableViewType where Self == StepperType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -58,6 +58,8 @@ extension iOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index 41e7d131..6e739599 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `TabView` type in SwiftUI. /// /// ### iOS @@ -62,6 +60,8 @@ extension IntrospectableViewType where Self == TabViewType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) @@ -92,6 +92,8 @@ extension tvOSViewVersion { } } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index ea105a41..52f6b090 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Table` type in SwiftUI, with any style. /// /// ### iOS @@ -110,6 +108,8 @@ extension IntrospectableViewType where Self == TableType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: "Table isn't available on iOS 13") public static let v13 = Self(for: .v13) @@ -129,6 +129,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: "Table isn't available on macOS 10.15") public static let v10_15 = Self(for: .v10_15) diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index 26fceb73..88a0cb53 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `TextEditor` type in SwiftUI. /// /// ### iOS @@ -59,6 +57,8 @@ extension IntrospectableViewType where Self == TextEditorType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: "TextEditor isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -76,6 +76,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: "TextEditor isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index 0765b8f5..090e8aea 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `TextField` type in SwiftUI. /// /// ### iOS @@ -69,6 +67,8 @@ extension IntrospectableViewType where Self == TextFieldType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -95,6 +95,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index d523946b..ae765a1c 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `TextField` type in SwiftUI, with `.vertical` axis. /// /// ### iOS @@ -75,6 +73,8 @@ extension IntrospectableViewType where Self == TextFieldWithVerticalAxisType { // MARK: SwiftUI.TextField(..., axis: .vertical) - iOS #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on iOS 13") public static let v13 = Self.unavailable() @@ -109,6 +109,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { @available(*, unavailable, message: "TextField(..., axis: .vertical) isn't available on macOS 10.15") public static let v10_15 = Self.unavailable() diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index 4b6eaedb..5875b960 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Toggle` type in SwiftUI. /// /// ### iOS @@ -48,6 +46,8 @@ extension IntrospectableViewType where Self == ToggleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -58,6 +58,8 @@ extension iOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index 3e3b8fd5..935e327d 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of the `Toggle` type in SwiftUI, with `.switch` style. /// /// ### iOS @@ -54,6 +52,8 @@ extension IntrospectableViewType where Self == ToggleWithSwitchStyleType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -64,6 +64,8 @@ extension iOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/View.swift b/Sources/ViewTypes/View.swift index 174d546f..ff3946a6 100644 --- a/Sources/ViewTypes/View.swift +++ b/Sources/ViewTypes/View.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of a generic SwiftUI view type. /// /// ### iOS @@ -73,6 +71,8 @@ extension IntrospectableViewType where Self == ViewType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) @@ -99,6 +99,8 @@ extension visionOSViewVersion { public static let v26 = Self(for: .v26) } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15) public static let v11 = Self(for: .v11) diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index 470be3f0..4e188cd0 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -public import SwiftUI - /// An abstract representation of a view's window in SwiftUI. /// /// ### iOS @@ -61,6 +59,8 @@ extension IntrospectableViewType where Self == WindowType { } #if canImport(UIKit) +public import UIKit + extension iOSViewVersion { public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) @@ -99,6 +99,8 @@ extension visionOSViewVersion { } } #elseif canImport(AppKit) +public import AppKit + extension macOSViewVersion { public static let v10_15 = Self(for: .v10_15, selector: selector) public static let v11 = Self(for: .v11, selector: selector) From 9ce14f9abb3a3fe63b35b19f6bdc37cf1dfc2678 Mon Sep 17 00:00:00 2001 From: David Roman <2538074+davdroman@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:27:53 +0100 Subject: [PATCH 6/6] WIP --- Sources/ViewTypes/Map.swift | 2 -- Sources/ViewTypes/WebView.swift | 2 -- 2 files changed, 4 deletions(-) diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index 3cc21770..39f80cea 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -import SwiftUI - /// An abstract representation of the `Map` type in SwiftUI. /// /// ### iOS diff --git a/Sources/ViewTypes/WebView.swift b/Sources/ViewTypes/WebView.swift index 759480a7..b2120a81 100644 --- a/Sources/ViewTypes/WebView.swift +++ b/Sources/ViewTypes/WebView.swift @@ -1,6 +1,4 @@ #if !os(watchOS) -import SwiftUI - /// An abstract representation of the `WebView` type in SwiftUI. /// /// ### iOS