diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..fb95e8f Binary files /dev/null and b/.DS_Store differ diff --git a/Sources/TsuzuKit/Extension/ArrayExtension.swift b/Sources/TsuzuKit/Extension/ArrayExtension.swift index 0fb7b10..89d3c8f 100644 --- a/Sources/TsuzuKit/Extension/ArrayExtension.swift +++ b/Sources/TsuzuKit/Extension/ArrayExtension.swift @@ -1,12 +1,12 @@ import Foundation -extension Array { +public extension Array { subscript (safe index: Index) -> Element? { return indices.contains(index) ? self[index] : nil } } -extension RandomAccessCollection { +public extension RandomAccessCollection { func indexed() -> Array<(offset: Int, element: Element)> { return Array(enumerated()) } diff --git a/Sources/TsuzuKit/Extension/ColorExtension.swift b/Sources/TsuzuKit/Extension/ColorExtension.swift index c3875d2..63dc048 100644 --- a/Sources/TsuzuKit/Extension/ColorExtension.swift +++ b/Sources/TsuzuKit/Extension/ColorExtension.swift @@ -3,7 +3,6 @@ import SwiftUI @available(iOS 13.0, *) @available(macOS 12.0, *) public extension Color { - init( hue: Double, saturation: Double, diff --git a/Sources/TsuzuKit/Extension/ViewExtension.swift b/Sources/TsuzuKit/Extension/ViewExtension.swift index 98df4bf..8b40830 100644 --- a/Sources/TsuzuKit/Extension/ViewExtension.swift +++ b/Sources/TsuzuKit/Extension/ViewExtension.swift @@ -1,6 +1,6 @@ import SwiftUI -extension View { +public extension View { @ViewBuilder func `if`( _ condition: Bool,