77#if os(iOS)
88import UIKit
99import ReactiveDataDisplayManager
10+ import Macro
1011
1112/// Base view to implement label within cell
1213public class MessageView : UIView {
@@ -23,6 +24,7 @@ extension MessageView: ConfigurableItem {
2324
2425 // MARK: - Model
2526
27+ @Mutable
2628 public struct Model : Equatable , AlignmentProvider {
2729
2830 // MARK: - Editor
@@ -51,15 +53,15 @@ extension MessageView: ConfigurableItem {
5153 public static func style( _ value: TextStyle ) -> Property {
5254 . init( closure: { model in
5355 var model = model
54- model. set ( style : value)
56+ model. set ( textStyle : value)
5557 return model
5658 } )
5759 }
5860
5961 public static func layout( _ value: TextLayout ) -> Property {
6062 . init( closure: { model in
6163 var model = model
62- model. set ( layout : value)
64+ model. set ( textLayout : value)
6365 return model
6466 } )
6567 }
@@ -83,23 +85,23 @@ extension MessageView: ConfigurableItem {
8385 public static func insets( _ value: UIEdgeInsets ) -> Property {
8486 . init( closure: { model in
8587 var model = model
86- model. set ( insets : value)
88+ model. set ( internalEdgeInsets : value)
8789 return model
8890 } )
8991 }
9092
9193 public static func background( _ value: BackgroundStyle ) -> Property {
9294 . init( closure: { model in
9395 var model = model
94- model. set ( background : value)
96+ model. set ( backgroundStyle : value)
9597 return model
9698 } )
9799 }
98100
99101 public static func border( _ value: BorderStyle ) -> Property {
100102 . init( closure: { model in
101103 var model = model
102- model. set ( border : value)
104+ model. set ( borderStyle : value)
103105 return model
104106 } )
105107 }
@@ -116,40 +118,6 @@ extension MessageView: ConfigurableItem {
116118 private( set) public var internalEdgeInsets : UIEdgeInsets = . zero
117119 private( set) public var borderStyle : BorderStyle ?
118120
119- // MARK: - Mutation
120-
121- mutating func set( text: TextValue ) {
122- self . text = text
123- }
124-
125- mutating func set( style: TextStyle ) {
126- self . textStyle = style
127- }
128-
129- mutating func set( layout: TextLayout ) {
130- self . textLayout = layout
131- }
132-
133- mutating func set( alignment: Alignment ) {
134- self . alignment = alignment
135- }
136-
137- mutating func set( textAlignment: NSTextAlignment ) {
138- self . textAlignment = textAlignment
139- }
140-
141- mutating func set( insets: UIEdgeInsets ) {
142- self . internalEdgeInsets = insets
143- }
144-
145- mutating func set( background: BackgroundStyle ) {
146- self . backgroundStyle = background
147- }
148-
149- mutating func set( border: BorderStyle ) {
150- self . borderStyle = border
151- }
152-
153121 // MARK: - Builder
154122
155123 public static func build( @EditorBuilder < Property > content: ( Property . Type ) -> [ Property ] ) -> Self {
0 commit comments