diff --git a/Sources/TagKit/Slugs.swift b/Sources/TagKit/Slugs.swift index a147508..b7a035f 100644 --- a/Sources/TagKit/Slugs.swift +++ b/Sources/TagKit/Slugs.swift @@ -29,7 +29,7 @@ public extension String { /// /// The standard configuration allows `a-z0-9`, and will for /// instance slugify `Hello, world!` into `hello-world`. -public struct SlugConfiguration { +public struct SlugConfiguration : @unchecked Sendable{ /// Create a new slug configurator. /// diff --git a/Sources/TagKit/Views/TagList.swift b/Sources/TagKit/Views/TagList.swift index 02ba16e..d8c95b1 100644 --- a/Sources/TagKit/Views/TagList.swift +++ b/Sources/TagKit/Views/TagList.swift @@ -10,6 +10,7 @@ import SwiftUI + /// This enum specifies supported tag list container types. public enum TagListContainer { @@ -38,10 +39,11 @@ public struct TagList: View { public init( tags: [String], @ViewBuilder tagView: @escaping TagViewBuilder + ) { self.tags = tags self.tagView = tagView - } + } private let tags: [String] @@ -51,6 +53,7 @@ public struct TagList: View { /// This type defines the tag view builder for the list. public typealias TagViewBuilder = (_ tag: String) -> TagView + public var body: some View { ForEach(Array(tags.enumerated()), id: \.offset) { tagView($0.element) diff --git a/Sources/TagKit/Views/TagTextField.swift b/Sources/TagKit/Views/TagTextField.swift index 1b4923d..948e182 100644 --- a/Sources/TagKit/Views/TagTextField.swift +++ b/Sources/TagKit/Views/TagTextField.swift @@ -14,6 +14,9 @@ import SwiftUI This text field will also make it harder to type characters that are not in the configuration's allowed character set. + + You often want to add an ``onSubmit(of:_:)`` on + the use of this View in order to react on new tags. */ public struct TagTextField: View { diff --git a/Sources/TagKit/_Deprecated/TagCapsule.swift b/Sources/TagKit/_Deprecated/TagCapsule.swift index 986c468..48c745a 100644 --- a/Sources/TagKit/_Deprecated/TagCapsule.swift +++ b/Sources/TagKit/_Deprecated/TagCapsule.swift @@ -10,7 +10,7 @@ import SwiftUI @available(*, deprecated, message: "Just use a regular Text element and style it as you wish.") -public struct TagCapsule: View { +public struct TagCapsule: View , Sendable{ /// Create a tag capsule. /// @@ -66,7 +66,7 @@ private extension View { } @available(*, deprecated, message: "Just use a regular Text element and style it as you wish.") -private extension TagCapsuleStyle { +private extension TagCapsuleStyle { static var spiderman: Self { .init( diff --git a/Sources/TagKit/_Deprecated/TagCapsuleStyle.swift b/Sources/TagKit/_Deprecated/TagCapsuleStyle.swift index a473ec3..15627d0 100644 --- a/Sources/TagKit/_Deprecated/TagCapsuleStyle.swift +++ b/Sources/TagKit/_Deprecated/TagCapsuleStyle.swift @@ -10,7 +10,7 @@ import SwiftUI @available(*, deprecated, message: "Just use a regular Text element and style it as you wish.") -public struct TagCapsuleStyle { +public struct TagCapsuleStyle :Sendable{ /// Create a new tag capsule style. /// @@ -89,7 +89,7 @@ public struct TagCapsuleStyle { @available(*, deprecated, message: "Just use a regular Text element and style it as you wish.") public extension TagCapsuleStyle { - struct Border { + struct Border : Sendable { /// Create a new tag capsule border style. /// @@ -111,7 +111,7 @@ public extension TagCapsuleStyle { public var width: Double } - struct Shadow { + struct Shadow : Sendable{ /// Create a new tag capsule shadow style. ///