77#if os(iOS)
88import UIKit
99import ReactiveDataDisplayManager
10+ import Macro
1011
1112public typealias MessageProperty = MessageView . Model . Property
1213
@@ -25,6 +26,7 @@ extension MessageView: ConfigurableItem {
2526
2627 // MARK: - Model
2728
29+ @Mutable
2830 public struct Model : Equatable , AlignmentProvider {
2931
3032 // MARK: - Editor
@@ -53,15 +55,15 @@ extension MessageView: ConfigurableItem {
5355 public static func style( _ value: TextStyle ) -> Property {
5456 . init( closure: { model in
5557 var model = model
56- model. set ( style : value)
58+ model. set ( textStyle : value)
5759 return model
5860 } )
5961 }
6062
6163 public static func layout( _ value: TextLayout ) -> Property {
6264 . init( closure: { model in
6365 var model = model
64- model. set ( layout : value)
66+ model. set ( textLayout : value)
6567 return model
6668 } )
6769 }
@@ -85,23 +87,23 @@ extension MessageView: ConfigurableItem {
8587 public static func insets( _ value: UIEdgeInsets ) -> Property {
8688 . init( closure: { model in
8789 var model = model
88- model. set ( insets : value)
90+ model. set ( internalEdgeInsets : value)
8991 return model
9092 } )
9193 }
9294
9395 public static func background( _ value: BackgroundStyle ) -> Property {
9496 . init( closure: { model in
9597 var model = model
96- model. set ( background : value)
98+ model. set ( backgroundStyle : value)
9799 return model
98100 } )
99101 }
100102
101103 public static func border( _ value: BorderStyle ) -> Property {
102104 . init( closure: { model in
103105 var model = model
104- model. set ( border : value)
106+ model. set ( borderStyle : value)
105107 return model
106108 } )
107109 }
@@ -118,40 +120,6 @@ extension MessageView: ConfigurableItem {
118120 private( set) public var internalEdgeInsets : UIEdgeInsets = . zero
119121 private( set) public var borderStyle : BorderStyle ?
120122
121- // MARK: - Mutation
122-
123- mutating func set( text: TextValue ) {
124- self . text = text
125- }
126-
127- mutating func set( style: TextStyle ) {
128- self . textStyle = style
129- }
130-
131- mutating func set( layout: TextLayout ) {
132- self . textLayout = layout
133- }
134-
135- mutating func set( alignment: Alignment ) {
136- self . alignment = alignment
137- }
138-
139- mutating func set( textAlignment: NSTextAlignment ) {
140- self . textAlignment = textAlignment
141- }
142-
143- mutating func set( insets: UIEdgeInsets ) {
144- self . internalEdgeInsets = insets
145- }
146-
147- mutating func set( background: BackgroundStyle ) {
148- self . backgroundStyle = background
149- }
150-
151- mutating func set( border: BorderStyle ) {
152- self . borderStyle = border
153- }
154-
155123 // MARK: - Builder
156124
157125 public static func build( @EditorBuilder < Property > content: ( ) -> [ Property ] ) -> Self {
0 commit comments