This repository was archived by the owner on Jan 5, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,4 +10,36 @@ public enum PropertyBuilder {
1010 public static func buildBlock( _ components: Property ... ) -> [ Property ] {
1111 components
1212 }
13+
14+ public static func buildBlock( _ components: [ Property ] ) -> [ Property ] {
15+ components
16+ }
17+
18+ public static func buildBlock( _ components: [ Property ] ... ) -> [ Property ] {
19+ components. flatMap { $0 }
20+ }
21+
22+ public static func buildEither( first component: [ Property ] ) -> [ Property ] {
23+ component
24+ }
25+
26+ public static func buildEither( second component: [ Property ] ) -> [ Property ] {
27+ component
28+ }
29+
30+ public static func buildOptional( _ component: [ Property ] ? ) -> [ Property ] {
31+ component ?? [ ]
32+ }
33+
34+ public static func buildExpression( _ expression: Property ) -> [ Property ] {
35+ [ expression]
36+ }
37+
38+ public static func buildExpression( _ expression: [ Property ] ) -> [ Property ] {
39+ expression
40+ }
41+
42+ public static func buildArray( _ components: [ [ Property ] ] ) -> [ Property ] {
43+ components. flatMap { $0 }
44+ }
1345}
Original file line number Diff line number Diff line change @@ -10,4 +10,36 @@ public enum RuleBuilder {
1010 public static func buildBlock( _ components: Rule ... ) -> [ Rule ] {
1111 components
1212 }
13+
14+ public static func buildBlock( _ components: [ Rule ] ) -> [ Rule ] {
15+ components
16+ }
17+
18+ public static func buildBlock( _ components: [ Rule ] ... ) -> [ Rule ] {
19+ components. flatMap { $0 }
20+ }
21+
22+ public static func buildEither( first component: [ Rule ] ) -> [ Rule ] {
23+ component
24+ }
25+
26+ public static func buildEither( second component: [ Rule ] ) -> [ Rule ] {
27+ component
28+ }
29+
30+ public static func buildOptional( _ component: [ Rule ] ? ) -> [ Rule ] {
31+ component ?? [ ]
32+ }
33+
34+ public static func buildExpression( _ expression: Rule ) -> [ Rule ] {
35+ [ expression]
36+ }
37+
38+ public static func buildExpression( _ expression: [ Rule ] ) -> [ Rule ] {
39+ expression
40+ }
41+
42+ public static func buildArray( _ components: [ [ Rule ] ] ) -> [ Rule ] {
43+ components. flatMap { $0 }
44+ }
1345}
Original file line number Diff line number Diff line change @@ -10,5 +10,36 @@ public enum SelectorBuilder {
1010 public static func buildBlock( _ components: Selector ... ) -> [ Selector ] {
1111 components
1212 }
13- }
1413
14+ public static func buildBlock( _ components: [ Selector ] ) -> [ Selector ] {
15+ components
16+ }
17+
18+ public static func buildBlock( _ components: [ Selector ] ... ) -> [ Selector ] {
19+ components. flatMap { $0 }
20+ }
21+
22+ public static func buildEither( first component: [ Selector ] ) -> [ Selector ] {
23+ component
24+ }
25+
26+ public static func buildEither( second component: [ Selector ] ) -> [ Selector ] {
27+ component
28+ }
29+
30+ public static func buildOptional( _ component: [ Selector ] ? ) -> [ Selector ] {
31+ component ?? [ ]
32+ }
33+
34+ public static func buildExpression( _ expression: Selector ) -> [ Selector ] {
35+ [ expression]
36+ }
37+
38+ public static func buildExpression( _ expression: [ Selector ] ) -> [ Selector ] {
39+ expression
40+ }
41+
42+ public static func buildArray( _ components: [ [ Selector ] ] ) -> [ Selector ] {
43+ components. flatMap { $0 }
44+ }
45+ }
Original file line number Diff line number Diff line change 77
88/// https://www.w3schools.com/cssref/
99public struct Property {
10- var name : String
11- var value : String
10+ public var name : String
11+ public var value : String
1212 var isImportant : Bool = false
1313
1414 public init ( name: String , value: String , isImportant: Bool = false ) {
You can’t perform that action at this time.
0 commit comments