diff --git a/Sources/Ignite/Actions/Action.swift b/Sources/Ignite/Actions/Action.swift index 86a2a33..ab2ed5f 100644 --- a/Sources/Ignite/Actions/Action.swift +++ b/Sources/Ignite/Actions/Action.swift @@ -9,7 +9,7 @@ import Foundation /// One action that can be triggered on the page. Actions compile /// to JavaScript. -public protocol Action { +public protocol Action: Sendable { /// Convert this action into the equivalent JavaScript code. func compile() -> String } diff --git a/Sources/Ignite/Actions/ShowModal.swift b/Sources/Ignite/Actions/ShowModal.swift index d64f4cf..4fc9a55 100644 --- a/Sources/Ignite/Actions/ShowModal.swift +++ b/Sources/Ignite/Actions/ShowModal.swift @@ -8,10 +8,10 @@ import Foundation /// Shows a modal dialog with the content of the page element identified by ID -public struct ShowModal: Action { +public struct ShowModal: Action, Sendable { /// The options used to configure the modal presentation - public enum Option { + public enum Option: Sendable { /// Shows the modal with a backdrop optionally dismissible by clicking on the backdrop. /// - Parameter dismissible: Whether the modal can be dismissed by clicking on the backdrop. Default is `true`. case backdrop(dismissible: Bool) diff --git a/Sources/Ignite/Elements/Card.swift b/Sources/Ignite/Elements/Card.swift index d2a82b3..2800606 100644 --- a/Sources/Ignite/Elements/Card.swift +++ b/Sources/Ignite/Elements/Card.swift @@ -22,8 +22,8 @@ public struct Card: BlockElement { } /// Where to position the content of the card relative to it image. - public enum ContentPosition: CaseIterable { - public static var allCases: [Card.ContentPosition] = [ + public enum ContentPosition: CaseIterable, Sendable { + public static let allCases: [Card.ContentPosition] = [ .bottom, .top, .overlay(alignment: .topLeading) ] @@ -83,7 +83,7 @@ public struct Card: BlockElement { case end = "align-content-end" } - public enum ContentAlignment: CaseIterable { + public enum ContentAlignment: CaseIterable, Sendable { case topLeading case top case topTrailing diff --git a/Sources/Ignite/Elements/MetaLink.swift b/Sources/Ignite/Elements/MetaLink.swift index 721aabe..3cc5bba 100644 --- a/Sources/Ignite/Elements/MetaLink.swift +++ b/Sources/Ignite/Elements/MetaLink.swift @@ -9,7 +9,7 @@ import Foundation /// An item of metadata that links to an external resource somehow, such as /// a stylesheet. -public struct MetaLink: HeadElement { +public struct MetaLink: HeadElement, Sendable { /// The standard CSS you should include on all Ignite pages. public static let standardCSS = MetaLink(href: "/css/bootstrap.min.css", rel: "stylesheet") diff --git a/Sources/Ignite/Elements/MetaTag.swift b/Sources/Ignite/Elements/MetaTag.swift index faf72c1..f1e011f 100644 --- a/Sources/Ignite/Elements/MetaTag.swift +++ b/Sources/Ignite/Elements/MetaTag.swift @@ -9,7 +9,7 @@ import Foundation /// An item of metadata that helps browsers and search engines understand /// your page better. -public struct MetaTag: HeadElement { +public struct MetaTag: HeadElement, Sendable { /// Allows mobile browsers to scale this page appropriately for the device. public static let flexibleViewport = MetaTag(name: "viewport", content: "width=device-width, initial-scale=1") diff --git a/Sources/Ignite/Framework/Event.swift b/Sources/Ignite/Framework/Event.swift index 636bed2..84d2ce9 100644 --- a/Sources/Ignite/Framework/Event.swift +++ b/Sources/Ignite/Framework/Event.swift @@ -9,7 +9,7 @@ import Foundation /// One event that can trigger a series of actions, such as /// an onClick event hiding an element on the page. -struct Event { +struct Event: Sendable { var name: String var actions: [Action] } diff --git a/Sources/Ignite/Framework/FeedConfiguration.swift b/Sources/Ignite/Framework/FeedConfiguration.swift index 9398d2b..f41cf69 100644 --- a/Sources/Ignite/Framework/FeedConfiguration.swift +++ b/Sources/Ignite/Framework/FeedConfiguration.swift @@ -8,9 +8,9 @@ import Foundation /// Configures feed generation for a site. -public struct FeedConfiguration { +public struct FeedConfiguration: Sendable { /// How much content should be provided in this feed. - public enum ContentMode { + public enum ContentMode: Sendable { /// Disable the feed entirely. case disabled @@ -23,7 +23,7 @@ public struct FeedConfiguration { /// Configures an image to be used with your feed, to customize its /// appearance in feed readers. - public struct FeedImage { + public struct FeedImage: Sendable { /// The URL to your feed image. var url: String diff --git a/Sources/Ignite/Framework/UnitPoint.swift b/Sources/Ignite/Framework/UnitPoint.swift index c02f719..6f12623 100644 --- a/Sources/Ignite/Framework/UnitPoint.swift +++ b/Sources/Ignite/Framework/UnitPoint.swift @@ -8,7 +8,7 @@ import Foundation // An x/y coordinate in the ranges 0 through 1. -public struct UnitPoint { +public struct UnitPoint: Sendable { var x: Double // swiftlint:disable:this identifier_name var y: Double // swiftlint:disable:this identifier_name diff --git a/Sources/Ignite/Ignite.swift b/Sources/Ignite/Ignite.swift index 1397c20..9d6d0ea 100644 --- a/Sources/Ignite/Ignite.swift +++ b/Sources/Ignite/Ignite.swift @@ -12,5 +12,5 @@ public struct Ignite { public static var bundle: Bundle { Bundle.module } /// The current version. Used to write generator information. - public static var version = "Ignite v0.1.0" + public static let version = "Ignite v0.2.1" } diff --git a/Sources/Ignite/Modifiers/Cursor.swift b/Sources/Ignite/Modifiers/Cursor.swift index 06024b2..40bfad7 100644 --- a/Sources/Ignite/Modifiers/Cursor.swift +++ b/Sources/Ignite/Modifiers/Cursor.swift @@ -10,10 +10,10 @@ import Foundation public enum Cursor: String { /// The cursor to display based on the current context. E.g., equivalent to text when hovering text. case auto - + /// Default cursor. Typically an arrow. case `default` - + /// No cursor is rendered. case pointer diff --git a/Sources/Ignite/Modifiers/HoverEffect.swift b/Sources/Ignite/Modifiers/HoverEffect.swift index eba9547..37e05f7 100644 --- a/Sources/Ignite/Modifiers/HoverEffect.swift +++ b/Sources/Ignite/Modifiers/HoverEffect.swift @@ -29,7 +29,7 @@ public struct EmptyHoverEffect: PageElement { public func render(context: PublishingContext) -> String { "" } - + public var attributes = CoreAttributes() } diff --git a/Sources/Ignite/Rendering/AttributeValue.swift b/Sources/Ignite/Rendering/AttributeValue.swift index cbb5764..eb8c4a5 100644 --- a/Sources/Ignite/Rendering/AttributeValue.swift +++ b/Sources/Ignite/Rendering/AttributeValue.swift @@ -8,7 +8,7 @@ import Foundation /// A simple key-value pair of strings that is able to store custom attributes. -public struct AttributeValue { +public struct AttributeValue: Sendable { /// The attribute's name, e.g. "target" or "rel". var name: String diff --git a/Sources/Ignite/Styles/Color.swift b/Sources/Ignite/Styles/Color.swift index 7936b08..1d34cc3 100644 --- a/Sources/Ignite/Styles/Color.swift +++ b/Sources/Ignite/Styles/Color.swift @@ -13,7 +13,7 @@ import Foundation /// Colors that can be used for backgrounds and foregrounds. Comes with all /// the standard HTML color names, can be created using RGB values as /// integer or doubles, can be created a grayscale, or using a hex string. -public struct Color: CustomStringConvertible { +public struct Color: CustomStringConvertible, Sendable { /// The CSS representation of this color. public var description: String { "rgb(\(red) \(green) \(blue) / \(opacity)%)" diff --git a/Sources/Ignite/Styles/CoreAttributes.swift b/Sources/Ignite/Styles/CoreAttributes.swift index 0563d92..0e09831 100644 --- a/Sources/Ignite/Styles/CoreAttributes.swift +++ b/Sources/Ignite/Styles/CoreAttributes.swift @@ -9,7 +9,7 @@ import Foundation /// A handful of attributes that all HTML types must support, either for /// rendering or for publishing purposes. -public struct CoreAttributes { +public struct CoreAttributes: Sendable { /// A unique identifier. Can be empty. var id = "" diff --git a/Sources/Ignite/Styles/DiagonalEdge.swift b/Sources/Ignite/Styles/DiagonalEdge.swift index 742d61a..7527e5b 100644 --- a/Sources/Ignite/Styles/DiagonalEdge.swift +++ b/Sources/Ignite/Styles/DiagonalEdge.swift @@ -9,7 +9,7 @@ import Foundation /// Describes diagonal edges on an element, e.g. top-leading, or bottom-trailing, along /// with groups of edges such as "top" (top leading *and* top-trailing). -public struct DiagonalEdge: OptionSet { +public struct DiagonalEdge: OptionSet, Sendable { /// The internal value used to represent this edge. public let rawValue: Int diff --git a/Sources/Ignite/Styles/Edge.swift b/Sources/Ignite/Styles/Edge.swift index 519fd78..817ee63 100644 --- a/Sources/Ignite/Styles/Edge.swift +++ b/Sources/Ignite/Styles/Edge.swift @@ -9,7 +9,7 @@ import Foundation /// Describes edges on an element, e.g. top or leading, along /// with groups of edges such as "horizontal" (leading *and* trailing). -public struct Edge: OptionSet { +public struct Edge: OptionSet, Sendable { /// The internal value used to represent this edge. public let rawValue: Int