Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ let package = Package(
.product(name: "Logging", package: "swift-log"),
.product(name: "NIO", package: "swift-nio")
],
exclude: ["Abstraction/README.md", "Framework/README.md"],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete")
]
Expand Down
2 changes: 1 addition & 1 deletion Sources/Commands/Converter/ConvertCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal struct ConvertCommand {
exit(0)

} else {
print("Unkown target path.")
print("Unknown target path.")

exit(1)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,9 @@ public protocol LabelAccessibilityAttribute: Attribute {
/// }
/// .accessibilityLabel("Lorem ipsum")
/// ```
/// - Parameter localizedKey: The localized key to label the element.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - localizedKey: The localized key to label the element.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func accessibilityLabel(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -1142,8 +1143,9 @@ public protocol HintAccessibilityAttribute: Attribute {
/// .role(.textbox)
/// .accessibilityHint("Lorem ipsum")
/// ```
/// - Parameter localizedKey: The localized key to give more context.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - localizedKey: The localized key to give more context.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func accessibilityHint(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -1397,8 +1399,9 @@ public protocol RoleDescriptionAccessibilityAttribute: Attribute {
/// .accessibilityRoleDescription("Lorem ipsum...")
/// ```
///
/// - Parameter localizedKey: The text to describe the role.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - localizedKey: The text to describe the role.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func accessibilityRoleDescription(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -1707,9 +1710,10 @@ public protocol ValueAccessibilityAttribute: Attribute {
/// .accessibilityValue(20.0, alternate: "Lorem ipsum...")
/// ```
///
/// - Parameter value: The current value within the range.
/// - Parameter localizedKey:The localized key to describe the value.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - value: The current value within the range.
/// - localizedKey:The localized key to describe the value.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func accessibilityValue(_ value: Float, description localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Foundation
import OrderedCollections

/// The alias combines the global attributes of the basic attributes.
/// The alias combines the global attributes of content attributes.
@_documentation(visibility: internal)
public typealias GlobalAttributes = AccessKeyAttribute & AutocapitalizeAttribute & AutofocusAttribute & ClassAttribute & EditAttribute & DirectionAttribute & DragAttribute & EnterKeyAttribute & HiddenAttribute & InputModeAttribute & IsAttribute & ItemAttribute & ItemPropertyAttribute & IdentifierAttribute & LanguageAttribute & NonceAttribute & RoleAttribute & SpellCheckAttribute & StyleAttribute & TabulatorAttribute & TitleAttribute & TranslateAttribute & InertAttribute & PopoverAttribute
public typealias GlobalContentAttributes = AccessKeyAttribute & AutocapitalizeAttribute & AutofocusAttribute & ClassAttribute & EditAttribute & DirectionAttribute & DragAttribute & EnterKeyAttribute & HiddenAttribute & InputModeAttribute & IsAttribute & ItemAttribute & ItemPropertyAttribute & IdentifierAttribute & LanguageAttribute & NonceAttribute & RoleAttribute & SpellCheckAttribute & StyleAttribute & TabulatorAttribute & TitleAttribute & TranslateAttribute & InertAttribute & PopoverAttribute

/// A type that provides the `accessKey` modifier.
@_documentation(visibility: internal)
Expand Down Expand Up @@ -175,8 +175,9 @@ public protocol AlternateAttribute: Attribute {
/// .alternate("Lorem ipsum...")
/// ```
///
/// - Parameter localizedKey: The string key to be translated.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - localizedKey: The string key to be translated.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func alternate(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -656,8 +657,9 @@ public protocol ContentAttribute: Attribute {
/// .content("Lorem ipsum...")
/// ```
///
/// - Parameter localizedKey: The string key to be translated
/// - Parameter tableName: The translation table to look in
/// - Parameters:
/// - localizedKey: The string key to be translated
/// - tableName: The translation table to look in
///
/// - Returns: The element
func content(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -1786,8 +1788,9 @@ public protocol LabelAttribute: Attribute {
/// .label("lorem")
/// ```
///
/// - Parameter localizedKey: The string key to be translated.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - localizedKey: The string key to be translated.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func label(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -2518,8 +2521,9 @@ public protocol PlaceholderAttribute: Attribute {
/// .placeholder("Lorem ipsum...")
/// ```
///
/// - Parameter localizedKey: The string key to be translated
/// - Parameter tableName: The translation table to look in
/// - Parameters:
/// - localizedKey: The string key to be translated
/// - tableName: The translation table to look in
///
/// - Returns: The element
func placeholder(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -3032,8 +3036,9 @@ public protocol ShapeAttribute: Attribute {
/// .shape(.rect, coordinates: "0, 0, 200, 100")
/// ```
///
/// - Parameter value: The shape used to interpret the coordinates.
/// - Parameter coordinates: The coordinates on which to base the shape.
/// - Parameters:
/// - value: The shape used to interpret the coordinates.
/// - coordinates: The coordinates on which to base the shape.
///
/// - Returns: The element
func shape(_ value: Values.Shape, coordinates: String) -> Self
Expand Down Expand Up @@ -3537,8 +3542,9 @@ public protocol TitleAttribute: Attribute {
/// .title("Lorem ipsum")
/// ```
///
/// - Parameter localizedKey: The string key to be translated.
/// - Parameter tableName: The translation table to look in.
/// - Parameters:
/// - localizedKey: The string key to be translated.
/// - tableName: The translation table to look in.
///
/// - Returns: The element
func title(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -3697,8 +3703,9 @@ public protocol ValueAttribute: Attribute {
/// .value("Lorem ipsum...")
/// ```
///
/// - Parameter localizedKey: The string key to be translated
/// - Parameter tableName: The translation table to look in
/// - Parameters:
/// - localizedKey: The string key to be translated
/// - tableName: The translation table to look in
///
/// - Returns: The element
func value(_ localizedKey: LocalizedStringKey, tableName: String?) -> Self
Expand Down Expand Up @@ -4146,8 +4153,9 @@ public protocol PopoverTargetAttribute: Attribute {
/// .popoverTarget("id", action: .hide)
/// ```
///
/// - Parameter id: The identifier of the target to bind the popover to.
/// - Parameter action: The action to perform when triggered.
/// - Parameters:
/// - id: The identifier of the target to bind the popover to.
/// - action: The action to perform when triggered.
///
/// - Returns: The element
func popoverTarget(_ id: String, action: Values.Popover.Action?) -> Self
Expand Down
16 changes: 9 additions & 7 deletions Sources/HTMLKit/Abstraction/Attributes/VectorAttributes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public protocol FillAttribute: Attribute {
/// }
/// ```
///
/// - Parameter color: The color to fill shape with.
/// - Parameter opacity: The opacity to apply.
/// - Parameters:
/// - color: The color to fill shape with.
/// - opacity: The opacity to apply.
///
/// - Returns: The element
func fill(_ color: String, opacity: Double?) -> Self
Expand Down Expand Up @@ -76,11 +77,12 @@ public protocol StrokeAttribute: Attribute {
/// }
/// ```
///
/// - Parameter color: The color to fill the stroke with.
/// - Parameter width: The thickness to apply to the stroke.
/// - Parameter opacity: The level to apply to the stroke.
/// - Parameter cap: The shape to end the stroke.
/// - Parameter join: The shape when two lines meet.
/// - Parameters:
/// - color: The color to fill the stroke with.
/// - width: The thickness to apply to the stroke.
/// - opacity: The level to apply to the stroke.
/// - cap: The shape to end the stroke.
/// - join: The shape when two lines meet.
///
/// - Returns: The element
func stroke(_ color: String, width: Int?, opacity: Double?, cap: Values.Linecap?, join: Values.Linejoin?) -> Self
Expand Down
4 changes: 2 additions & 2 deletions Sources/HTMLKit/Abstraction/Elements/BasicElements.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public struct Html: ContentNode, BasicElement {
self.content = content()
}

internal init(attributes: OrderedDictionary<String, AttributeData>?, context: EscapeContext, content: [HtmlElement]) {
internal init(attributes: OrderedDictionary<String, AttributeData>? = nil, context: EscapeContext = .trusted, content: [HtmlElement] = []) {

self.attributes = attributes
self.context = context
Expand Down Expand Up @@ -133,7 +133,7 @@ public struct Html: ContentNode, BasicElement {
}
}

extension Html: GlobalAttributes, GlobalEventAttributes {
extension Html: GlobalContentAttributes, GlobalEventAttributes {

public func accessKey(_ value: Character) -> Html {
return mutate(accesskey: .init("\(value)", context: .trusted))
Expand Down
Loading
Loading