77#if os(iOS)
88import UIKit
99import ReactiveDataDisplayManager
10+ import Macro
1011
1112/// Base view to implement label within cell
1213public class MessageView : UIView {
@@ -24,6 +25,7 @@ extension MessageView: ConfigurableItem {
2425
2526 // MARK: - Model
2627
28+ @Mutable
2729 public struct Model : Equatable , AlignmentProvider {
2830
2931 // MARK: - Editor
@@ -52,15 +54,15 @@ extension MessageView: ConfigurableItem {
5254 public static func style( _ value: TextStyle ) -> Property {
5355 . init( closure: { model in
5456 var model = model
55- model. set ( style : value)
57+ model. set ( textStyle : value)
5658 return model
5759 } )
5860 }
5961
6062 public static func layout( _ value: TextLayout ) -> Property {
6163 . init( closure: { model in
6264 var model = model
63- model. set ( layout : value)
65+ model. set ( textLayout : value)
6466 return model
6567 } )
6668 }
@@ -84,23 +86,23 @@ extension MessageView: ConfigurableItem {
8486 public static func insets( _ value: UIEdgeInsets ) -> Property {
8587 . init( closure: { model in
8688 var model = model
87- model. set ( insets : value)
89+ model. set ( internalEdgeInsets : value)
8890 return model
8991 } )
9092 }
9193
9294 public static func background( _ value: BackgroundStyle ) -> Property {
9395 . init( closure: { model in
9496 var model = model
95- model. set ( background : value)
97+ model. set ( backgroundStyle : value)
9698 return model
9799 } )
98100 }
99101
100102 public static func border( _ value: BorderStyle ) -> Property {
101103 . init( closure: { model in
102104 var model = model
103- model. set ( border : value)
105+ model. set ( borderStyle : value)
104106 return model
105107 } )
106108 }
@@ -136,48 +138,6 @@ extension MessageView: ConfigurableItem {
136138 private( set) public var dataDetection : DataDetectionStyle ?
137139 private( set) public var selectable : Bool = false
138140
139- // MARK: - Mutation
140-
141- mutating func set( text: TextValue ) {
142- self . text = text
143- }
144-
145- mutating func set( style: TextStyle ) {
146- self . textStyle = style
147- }
148-
149- mutating func set( layout: TextLayout ) {
150- self . textLayout = layout
151- }
152-
153- mutating func set( alignment: Alignment ) {
154- self . alignment = alignment
155- }
156-
157- mutating func set( textAlignment: NSTextAlignment ) {
158- self . textAlignment = textAlignment
159- }
160-
161- mutating func set( insets: UIEdgeInsets ) {
162- self . internalEdgeInsets = insets
163- }
164-
165- mutating func set( background: BackgroundStyle ) {
166- self . backgroundStyle = background
167- }
168-
169- mutating func set( border: BorderStyle ) {
170- self . borderStyle = border
171- }
172-
173- mutating func set( dataDetection: DataDetectionStyle ) {
174- self . dataDetection = dataDetection
175- }
176-
177- mutating func set( selectable: Bool ) {
178- self . selectable = selectable
179- }
180-
181141 // MARK: - Builder
182142
183143 public static func build( @EditorBuilder < Property > content: ( Property . Type ) -> [ Property ] ) -> Self {
0 commit comments