Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
davdroman committed Jul 16, 2024
1 parent 76dc7cd commit 3b2ba65
Show file tree
Hide file tree
Showing 48 changed files with 73 additions and 73 deletions.
2 changes: 1 addition & 1 deletion Sources/ViewTypes/Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct ButtonType: IntrospectableViewType {}

#if !os(iOS) && !os(tvOS) && !os(visionOS)
extension IntrospectableViewType where Self == ButtonType {
@MainActor public static var button: Self { .init() }
public static var button: Self { .init() }
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ColorPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public struct ColorPickerType: IntrospectableViewType {}

#if !os(tvOS)
extension IntrospectableViewType where Self == ColorPickerType {
@MainActor public static var colorPicker: Self { .init() }
public static var colorPicker: Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/DatePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public struct DatePickerType: IntrospectableViewType {}

#if !os(tvOS)
extension IntrospectableViewType where Self == DatePickerType {
@MainActor public static var datePicker: Self { .init() }
public static var datePicker: Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/DatePickerWithCompactStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public struct DatePickerWithCompactStyleType: IntrospectableViewType {

#if !os(tvOS)
extension IntrospectableViewType where Self == DatePickerWithCompactStyleType {
@MainActor public static func datePicker(style: Self.Style) -> Self { .init() }
public static func datePicker(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/DatePickerWithFieldStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public struct DatePickerWithFieldStyleType: IntrospectableViewType {

#if !os(iOS) && !os(tvOS) && !os(visionOS)
extension IntrospectableViewType where Self == DatePickerWithFieldStyleType {
@MainActor public static func datePicker(style: Self.Style) -> Self { .init() }
public static func datePicker(style: Self.Style) -> Self { .init() }
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/DatePickerWithGraphicalStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public struct DatePickerWithGraphicalStyleType: IntrospectableViewType {

#if !os(tvOS)
extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType {
@MainActor public static func datePicker(style: Self.Style) -> Self { .init() }
public static func datePicker(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public struct DatePickerWithStepperFieldStyleType: IntrospectableViewType {

#if !os(iOS) && !os(tvOS) && !os(visionOS)
extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleType {
@MainActor public static func datePicker(style: Self.Style) -> Self { .init() }
public static func datePicker(style: Self.Style) -> Self { .init() }
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/DatePickerWithWheelStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public struct DatePickerWithWheelStyleType: IntrospectableViewType {

#if !os(tvOS) && !os(macOS)
extension IntrospectableViewType where Self == DatePickerWithWheelStyleType {
@MainActor public static func datePicker(style: Self.Style) -> Self { .init() }
public static func datePicker(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/Form.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public struct FormType: IntrospectableViewType {}

#if !os(macOS)
extension IntrospectableViewType where Self == FormType {
@MainActor public static var form: Self { .init() }
public static var form: Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/FormWithGroupedStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public struct FormWithGroupedStyleType: IntrospectableViewType {
}

extension IntrospectableViewType where Self == FormWithGroupedStyleType {
@MainActor public static func form(style: Self.Style) -> Self { .init() }
public static func form(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
8 changes: 4 additions & 4 deletions Sources/ViewTypes/FullScreenCover.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public struct FullScreenCoverType: IntrospectableViewType {

#if !os(macOS)
extension IntrospectableViewType where Self == FullScreenCoverType {
@MainActor public static var fullScreenCover: Self { .init() }
public static var fullScreenCover: Self { .init() }
}

#if canImport(UIKit)
Expand All @@ -79,7 +79,7 @@ extension iOSViewVersion<FullScreenCoverType, UIPresentationController> {
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UIPresentationController> {
private static var selector: IntrospectionSelector<UIPresentationController> {
.from(UIViewController.self, selector: { $0.presentationController })
}
}
Expand All @@ -93,7 +93,7 @@ extension tvOSViewVersion<FullScreenCoverType, UIPresentationController> {
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UIPresentationController> {
private static var selector: IntrospectionSelector<UIPresentationController> {
.from(UIViewController.self, selector: { $0.presentationController })
}
}
Expand All @@ -102,7 +102,7 @@ extension visionOSViewVersion<FullScreenCoverType, UIPresentationController> {
public static let v1 = Self(for: .v1, selector: selector)
public static let v2 = Self(for: .v2, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UIPresentationController> {
private static var selector: IntrospectionSelector<UIPresentationController> {
.from(UIViewController.self, selector: { $0.presentationController })
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/ViewTypes/List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public struct ListType: IntrospectableViewType {
}

extension IntrospectableViewType where Self == ListType {
@MainActor public static var list: Self { .init() }
@MainActor public static func list(style: Self.Style) -> Self { .init() }
public static var list: Self { .init() }
public static func list(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ListCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public struct ListCellType: IntrospectableViewType {
}

extension IntrospectableViewType where Self == ListCellType {
@MainActor public static var listCell: Self { .init() }
public static var listCell: Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ListWithBorderedStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct ListWithBorderedStyleType: IntrospectableViewType {

#if !os(iOS) && !os(tvOS) && !os(visionOS)
extension IntrospectableViewType where Self == ListWithBorderedStyleType {
@MainActor public static func list(style: Self.Style) -> Self { .init() }
public static func list(style: Self.Style) -> Self { .init() }
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ListWithGroupedStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct ListWithGroupedStyleType: IntrospectableViewType {

#if !os(macOS)
extension IntrospectableViewType where Self == ListWithGroupedStyleType {
@MainActor public static func list(style: Self.Style) -> Self { .init() }
public static func list(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ListWithInsetGroupedStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct ListWithInsetGroupedStyleType: IntrospectableViewType {

#if !os(tvOS) && !os(macOS)
extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType {
@MainActor public static func list(style: Self.Style) -> Self { .init() }
public static func list(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ListWithInsetStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct ListWithInsetStyleType: IntrospectableViewType {

#if !os(tvOS)
extension IntrospectableViewType where Self == ListWithInsetStyleType {
@MainActor public static func list(style: Self.Style) -> Self { .init() }
public static func list(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/ListWithSidebarStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct ListWithSidebarStyleType: IntrospectableViewType {

#if !os(tvOS)
extension IntrospectableViewType where Self == ListWithSidebarStyleType {
@MainActor public static func list(style: Self.Style) -> Self { .init() }
public static func list(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public struct MapType: IntrospectableViewType {}
import MapKit

extension IntrospectableViewType where Self == MapType {
@MainActor public static var map: Self { .init() }
public static var map: Self { .init() }
}

extension iOSViewVersion<MapType, MKMapView> {
Expand Down
8 changes: 4 additions & 4 deletions Sources/ViewTypes/NavigationSplitView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import SwiftUI
public struct NavigationSplitViewType: IntrospectableViewType {}

extension IntrospectableViewType where Self == NavigationSplitViewType {
@MainActor public static var navigationSplitView: Self { .init() }
public static var navigationSplitView: Self { .init() }
}

#if canImport(UIKit)
Expand All @@ -89,7 +89,7 @@ extension iOSViewVersion<NavigationSplitViewType, UISplitViewController> {
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UISplitViewController> {
private static var selector: IntrospectionSelector<UISplitViewController> {
.default.withAncestorSelector { $0.splitViewController }
}
}
Expand All @@ -106,7 +106,7 @@ extension tvOSViewVersion<NavigationSplitViewType, UINavigationController> {
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand All @@ -115,7 +115,7 @@ extension visionOSViewVersion<NavigationSplitViewType, UISplitViewController> {
public static let v1 = Self(for: .v1, selector: selector)
public static let v2 = Self(for: .v2, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UISplitViewController> {
private static var selector: IntrospectionSelector<UISplitViewController> {
.default.withAncestorSelector { $0.splitViewController }
}
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/ViewTypes/NavigationStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import SwiftUI
public struct NavigationStackType: IntrospectableViewType {}

extension IntrospectableViewType where Self == NavigationStackType {
@MainActor public static var navigationStack: Self { .init() }
public static var navigationStack: Self { .init() }
}

#if canImport(UIKit)
Expand All @@ -70,7 +70,7 @@ extension iOSViewVersion<NavigationStackType, UINavigationController> {
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand All @@ -87,7 +87,7 @@ extension tvOSViewVersion<NavigationStackType, UINavigationController> {
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand All @@ -96,7 +96,7 @@ extension visionOSViewVersion<NavigationStackType, UINavigationController> {
public static let v1 = Self(for: .v1, selector: selector)
public static let v2 = Self(for: .v2, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/ViewTypes/NavigationViewWithColumnsStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public struct NavigationViewWithColumnsStyleType: IntrospectableViewType {
}

extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleType {
@MainActor public static func navigationView(style: Self.Style) -> Self { .init() }
public static func navigationView(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand All @@ -85,7 +85,7 @@ extension iOSViewVersion<NavigationViewWithColumnsStyleType, UISplitViewControll
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UISplitViewController> {
private static var selector: IntrospectionSelector<UISplitViewController> {
.default.withAncestorSelector { $0.splitViewController }
}
}
Expand All @@ -98,7 +98,7 @@ extension tvOSViewVersion<NavigationViewWithColumnsStyleType, UINavigationContro
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand All @@ -107,7 +107,7 @@ extension visionOSViewVersion<NavigationViewWithColumnsStyleType, UISplitViewCon
public static let v1 = Self(for: .v1, selector: selector)
public static let v2 = Self(for: .v2, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UISplitViewController> {
private static var selector: IntrospectionSelector<UISplitViewController> {
.default.withAncestorSelector { $0.splitViewController }
}
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/ViewTypes/NavigationViewWithStackStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct NavigationViewWithStackStyleType: IntrospectableViewType {
}

extension IntrospectableViewType where Self == NavigationViewWithStackStyleType {
@MainActor public static func navigationView(style: Self.Style) -> Self { .init() }
public static func navigationView(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand All @@ -73,7 +73,7 @@ extension iOSViewVersion<NavigationViewWithStackStyleType, UINavigationControlle
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand All @@ -86,7 +86,7 @@ extension tvOSViewVersion<NavigationViewWithStackStyleType, UINavigationControll
public static let v17 = Self(for: .v17, selector: selector)
public static let v18 = Self(for: .v18, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand All @@ -95,7 +95,7 @@ extension visionOSViewVersion<NavigationViewWithStackStyleType, UINavigationCont
public static let v1 = Self(for: .v1, selector: selector)
public static let v2 = Self(for: .v2, selector: selector)

@MainActor private static var selector: IntrospectionSelector<UINavigationController> {
private static var selector: IntrospectionSelector<UINavigationController> {
.default.withAncestorSelector { $0.navigationController }
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/PageControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import SwiftUI
public struct PageControlType: IntrospectableViewType {}

extension IntrospectableViewType where Self == PageControlType {
@MainActor public static var pageControl: Self { .init() }
public static var pageControl: Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/PickerWithMenuStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public struct PickerWithMenuStyleType: IntrospectableViewType {

#if !os(iOS) && !os(tvOS) && !os(visionOS)
extension IntrospectableViewType where Self == PickerWithMenuStyleType {
@MainActor public static func picker(style: Self.Style) -> Self { .init() }
public static func picker(style: Self.Style) -> Self { .init() }
}

#if canImport(AppKit) && !targetEnvironment(macCatalyst)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/PickerWithSegmentedStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public struct PickerWithSegmentedStyleType: IntrospectableViewType {
}

extension IntrospectableViewType where Self == PickerWithSegmentedStyleType {
@MainActor public static func picker(style: Self.Style) -> Self { .init() }
public static func picker(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
2 changes: 1 addition & 1 deletion Sources/ViewTypes/PickerWithWheelStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public struct PickerWithWheelStyleType: IntrospectableViewType {

#if !os(tvOS) && !os(macOS)
extension IntrospectableViewType where Self == PickerWithWheelStyleType {
@MainActor public static func picker(style: Self.Style) -> Self { .init() }
public static func picker(style: Self.Style) -> Self { .init() }
}

#if canImport(UIKit)
Expand Down
Loading

0 comments on commit 3b2ba65

Please sign in to comment.