Skip to content

Commit

Permalink
Swift 6
Browse files Browse the repository at this point in the history
Swift 6 and static properties.
  • Loading branch information
Appracatappra committed Jun 12, 2024
1 parent 5ce442c commit a21b594
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftUIKit/Alerts/AlertTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ open class AlertTypes: AlertState<AlertTypes.State> {
/// Defines a type alias returned from a call to a CloudKit database function.
public typealias AlertAction = () -> Void

public static var shared:AlertTypes = AlertTypes()
public nonisolated(unsafe) static var shared:AlertTypes = AlertTypes()

// MARK: - Enumerations
/// A list of the available Alerts that can be displayed in the App
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftUIKit/Components/CircleText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public struct WidthPreferenceKey: PreferenceKey {

// MARK: - Properties
/// The default value.
public static var defaultValue = CGFloat(0)
public nonisolated(unsafe) static var defaultValue = CGFloat(0)

// MARK: - Computed Pproperties
/// Reduces the given value.
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftUIKit/Components/IconButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ public struct IconButton: View {

// MARK: - Static Properties
/// The default background color for the `IconButton`.
static public var defaultBackgroundColor:Color = .gray
static public nonisolated(unsafe) var defaultBackgroundColor:Color = .gray

/// The default sound source for the `IconButton`.
static public var defaultSoundSource:SwiftUIKit.Source = .packageBundle
static public nonisolated(unsafe) var defaultSoundSource:SwiftUIKit.Source = .packageBundle

/// The default button clicked sound `IconButton`.
static public var defaultButtonSound:String = "mouse-click.mp3"
static public nonisolated(unsafe) var defaultButtonSound:String = "mouse-click.mp3"

/// The default focused sound for the `IconButton`.
static public var defaultButtonFocusSound:String = "diamond-click.mp3"
static public nonisolated(unsafe) var defaultButtonFocusSound:String = "diamond-click.mp3"


// MARK: - Properties
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftUIKit/Components/IconDescriptionButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ public struct IconDescriptionButton: View {

// MARK: - Static Properties
/// The default background color for the `IconDescriptionButton`.
static public var defaultBackgroundColor:Color = .gray
static public nonisolated(unsafe) var defaultBackgroundColor:Color = .gray

/// The default sound source for the `IconDescriptionButton`.
static public var defaultSoundSource:SwiftUIKit.Source = .packageBundle
static public nonisolated(unsafe) var defaultSoundSource:SwiftUIKit.Source = .packageBundle

/// The default button clicked sound for the `IconDescriptionButton`.
static public var defaultButtonSound:String = "mouse-click.mp3"
static public nonisolated(unsafe) var defaultButtonSound:String = "mouse-click.mp3"

/// The defaut button focused sound for the `IconDescriptionButton`.
static public var defaultButtonFocusSound:String = "diamond-click.mp3"
static public nonisolated(unsafe) var defaultButtonFocusSound:String = "diamond-click.mp3"

// MARK: - Properties
/// The icon to display on the button.
Expand Down
10 changes: 5 additions & 5 deletions Sources/SwiftUIKit/Components/OnOffToggleButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ public struct OnOffToggleButton: View {

// MARK: - Static Properties
/// The default on background color for the `OnOffToggleButton`.
static public var defaultOnBackgroundColor:Color = .green
static public nonisolated(unsafe) var defaultOnBackgroundColor:Color = .green

/// The default off background color for the `OnOffToggleButton`.
static public var defaultOffBackgroundColor:Color = .red
static public nonisolated(unsafe) var defaultOffBackgroundColor:Color = .red

/// The default sound source for the `OnOffToggleButton`.
static public var defaultSoundSource:SwiftUIKit.Source = .packageBundle
static public nonisolated(unsafe) var defaultSoundSource:SwiftUIKit.Source = .packageBundle

/// The default clicked sound for the `OnOffToggleButton`.
static public var defaultButtonSound:String = "mouse-click.mp3"
static public nonisolated(unsafe) var defaultButtonSound:String = "mouse-click.mp3"

/// The default focused sound for the `OnOffToggleButton`.
static public var defaultButtonFocusSound:String = "diamond-click.mp3"
static public nonisolated(unsafe) var defaultButtonFocusSound:String = "diamond-click.mp3"

// MARK: - Properties
/// The description for the toggle.
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftUIKit/Components/ScaledImageButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public struct ScaledImageButton: View {

// MARK: - Static Properties
/// The default sound source for the `ScaledImageButton`.
static public var defaultSoundSource:SwiftUIKit.Source = .packageBundle
static public nonisolated(unsafe) var defaultSoundSource:SwiftUIKit.Source = .packageBundle

/// The default clicked sound for the `ScaledImageButton`.
static public var defaultButtonSound:String = "mouse-click.mp3"
static public nonisolated(unsafe) var defaultButtonSound:String = "mouse-click.mp3"

/// The default focused sound forr the `ScaledImageButton`.
static public var defaultButtonFocusSound:String = "diamond-click.mp3"
static public nonisolated(unsafe) var defaultButtonFocusSound:String = "diamond-click.mp3"

// MARK: - Properties
/// The name of the image to display.
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftUIKit/Components/SelectIntOptionsButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ public struct SelectIntOptionsButton: View {

// MARK: - Static Properties
/// The default background color for the `SelectIntOptionsButton`.
static public var defaultBackgroundColor:Color = .gray
static public nonisolated(unsafe) var defaultBackgroundColor:Color = .gray

/// The default sound source for the `SelectIntOptionsButton`.
static public var defaultSoundSource:SwiftUIKit.Source = .packageBundle
static public nonisolated(unsafe) var defaultSoundSource:SwiftUIKit.Source = .packageBundle

/// The default clicked sound for the`SelectIntOptionsButton`.
static public var defaultButtonSound:String = "mouse-click.mp3"
static public nonisolated(unsafe) var defaultButtonSound:String = "mouse-click.mp3"

/// The default focused sound for the `SelectIntOptionsButton`.
static public var defaultButtonFocusSound:String = "diamond-click.mp3"
static public nonisolated(unsafe) var defaultButtonFocusSound:String = "diamond-click.mp3"

// MARK: - Properties
/// The icon for the button.
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftUIKit/Components/WordArtButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public struct WordArtButton: View {

// MARK: - Static Properties
/// The default sound source for the `IconButton`.
static public var defaultSoundSource:SwiftUIKit.Source = .packageBundle
static public nonisolated(unsafe) var defaultSoundSource:SwiftUIKit.Source = .packageBundle

/// The default button clicked sound `IconButton`.
static public var defaultButtonSound:String = "mouse-click.mp3"
static public nonisolated(unsafe) var defaultButtonSound:String = "mouse-click.mp3"

/// The default focused sound for the `IconButton`.
static public var defaultButtonFocusSound:String = "diamond-click.mp3"
static public nonisolated(unsafe) var defaultButtonFocusSound:String = "diamond-click.mp3"

// MARK: - Properties
/// The text for the wor art.
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftUIKit/Views/TouchLocatingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ public struct TouchLocatingView: UIViewRepresentable {

// MARK: - Static Properties
/// Has the touch started?
public static let started = TouchType(rawValue: 1 << 0)
public nonisolated(unsafe) static let started = TouchType(rawValue: 1 << 0)

/// Has the touch moved?
public static let moved = TouchType(rawValue: 1 << 1)
public nonisolated(unsafe) static let moved = TouchType(rawValue: 1 << 1)

/// Has the Touch Ended?
public static let ended = TouchType(rawValue: 1 << 2)
public nonisolated(unsafe) static let ended = TouchType(rawValue: 1 << 2)

/// Holds all of the different touch types.
public static let all: TouchType = [.started, .moved, .ended]
public nonisolated(unsafe) static let all: TouchType = [.started, .moved, .ended]

// MARK: - Properties
/// The raw `Int` value.
Expand Down

0 comments on commit a21b594

Please sign in to comment.