@triniwiz/nativescript-masonkit 1.0.0-beta.3 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/common.d.ts +1 -0
  2. package/common.js +169 -14
  3. package/common.js.map +1 -1
  4. package/index.android.d.ts +1 -1
  5. package/index.android.js +1 -1
  6. package/index.android.js.map +1 -1
  7. package/index.d.ts +2 -0
  8. package/index.ios.d.ts +1 -1
  9. package/index.ios.js +1 -1
  10. package/index.ios.js.map +1 -1
  11. package/package.json +1 -1
  12. package/platforms/android/masonkit-release.aar +0 -0
  13. package/platforms/ios/Mason.xcframework/Info.plist +5 -5
  14. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +55 -42
  15. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +1 -0
  16. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  17. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  18. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +9627 -9103
  19. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +199 -183
  20. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +199 -183
  21. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  22. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4294 -4265
  23. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +110 -84
  24. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +1 -0
  25. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  26. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  27. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  28. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +14538 -14014
  29. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +199 -183
  30. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +199 -183
  31. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +14538 -14014
  32. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +199 -183
  33. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +199 -183
  34. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +24 -24
  35. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  36. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4287 -4260
  37. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +4165 -4138
  38. package/style.d.ts +3 -0
  39. package/style.js +47 -16
  40. package/style.js.map +1 -1
  41. package/text/index.android.d.ts +10 -0
  42. package/text/index.android.js +67 -1
  43. package/text/index.android.js.map +1 -1
  44. package/text/index.ios.d.ts +10 -0
  45. package/text/index.ios.js +88 -3
  46. package/text/index.ios.js.map +1 -1
  47. package/tree/index.android.d.ts +1 -0
  48. package/tree/index.android.js +4 -0
  49. package/tree/index.android.js.map +1 -1
  50. package/tree/index.ios.d.ts +1 -0
  51. package/tree/index.ios.js +4 -0
  52. package/tree/index.ios.js.map +1 -1
  53. package/view/index.ios.js +2 -2
  54. package/view/index.ios.js.map +1 -1
@@ -372,6 +372,7 @@ SWIFT_PROTOCOL_NAMED("TextContainer")
372
372
  @protocol MasonTextContainer <NSObject>
373
373
  @property (nonatomic, readonly, strong) MasonTextEngine * _Nonnull engine;
374
374
  @property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
375
+ - (void)onTextStyleChangedWithChange:(int64_t)change;
375
376
  @end
376
377
 
377
378
  @class MasonStyle;
@@ -400,6 +401,7 @@ SWIFT_CLASS_NAMED("Button")
400
401
  - (void)addView:(UIView * _Nonnull)view at:(NSInteger)at;
401
402
  - (void)drawRect:(CGRect)rect;
402
403
  @property (nonatomic, readonly, strong) NSMutableData * _Nonnull textValues;
404
+ - (void)onTextStyleChangedWithChange:(int64_t)change;
403
405
  - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
404
406
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
405
407
  @end
@@ -602,6 +604,55 @@ SWIFT_PROTOCOL("_TtP5Mason18MasonCharacterData_")
602
604
  - (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
603
605
  @end
604
606
 
607
+ @class MasonLayout;
608
+ @class MasonDocument;
609
+ enum MasonNodeType : int32_t;
610
+ SWIFT_CLASS_NAMED("MasonNode")
611
+ @interface MasonNode : NSObject
612
+ @property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
613
+ @property (nonatomic, copy) void (^ _Nullable onNodeAttached)(void);
614
+ @property (nonatomic, copy) void (^ _Nullable onNodeDetached)(void);
615
+ @property (nonatomic, readonly) void * _Nullable nativePtr;
616
+ @property (nonatomic, readonly, strong) MasonLayout * _Nonnull computedLayout;
617
+ @property (nonatomic, readonly, strong) MasonDocument * _Nullable document;
618
+ - (MasonNode * _Nonnull)getRootNode SWIFT_WARN_UNUSED_RESULT;
619
+ @property (nonatomic, readonly, strong) MasonNode * _Nullable parent;
620
+ @property (nonatomic, readonly, strong) MasonNode * _Nullable parentNode;
621
+ @property (nonatomic, readonly) enum MasonNodeType type;
622
+ - (NSArray<MasonNode *> * _Nonnull)getChildren SWIFT_WARN_UNUSED_RESULT;
623
+ - (NSArray<MasonNode *> * _Nonnull)getLayoutChildren SWIFT_WARN_UNUSED_RESULT;
624
+ @property (nonatomic) BOOL inBatch;
625
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes OBJC_DESIGNATED_INITIALIZER;
626
+ @property (nonatomic, readonly) BOOL isDirty;
627
+ - (void)markDirty;
628
+ - (UIView * _Nullable)getRoot SWIFT_WARN_UNUSED_RESULT;
629
+ /// Helper to get default text attributes for new text nodes
630
+ - (NSDictionary<NSAttributedStringKey, id> * _Nonnull)getDefaultAttributes SWIFT_WARN_UNUSED_RESULT;
631
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
632
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
633
+ @end
634
+
635
+ SWIFT_CLASS_NAMED("MasonTextNode")
636
+ @interface MasonTextNode : MasonNode <MasonCharacterData>
637
+ @property (nonatomic, copy) NSString * _Nonnull data;
638
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
639
+ - (void)appendChild:(MasonNode * _Nonnull)child;
640
+ @property (nonatomic, readonly) NSInteger length;
641
+ - (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
642
+ - (nonnull instancetype)appendData:(NSString * _Nonnull)s;
643
+ - (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
644
+ - (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
645
+ - (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
646
+ - (nonnull instancetype)deleteDataWithRange:(NSRange)range;
647
+ - (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
648
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes SWIFT_UNAVAILABLE;
649
+ @end
650
+
651
+ SWIFT_CLASS_NAMED("MasonBr")
652
+ @interface MasonBr : MasonTextNode
653
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
654
+ @end
655
+
605
656
  enum MasonDimensionCompatType : NSInteger;
606
657
  SWIFT_CLASS_NAMED("MasonDimensionCompat")
607
658
  @interface MasonDimensionCompat : NSObject
@@ -788,32 +839,6 @@ SWIFT_CLASS_NAMED("MasonLengthPercentageSizeCompat")
788
839
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
789
840
  @end
790
841
 
791
- enum MasonNodeType : int32_t;
792
- SWIFT_CLASS_NAMED("MasonNode")
793
- @interface MasonNode : NSObject
794
- @property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
795
- @property (nonatomic, copy) void (^ _Nullable onNodeAttached)(void);
796
- @property (nonatomic, copy) void (^ _Nullable onNodeDetached)(void);
797
- @property (nonatomic, readonly) void * _Nullable nativePtr;
798
- @property (nonatomic, readonly, strong) MasonLayout * _Nonnull computedLayout;
799
- @property (nonatomic, readonly, strong) MasonDocument * _Nullable document;
800
- - (MasonNode * _Nonnull)getRootNode SWIFT_WARN_UNUSED_RESULT;
801
- @property (nonatomic, readonly, strong) MasonNode * _Nullable parent;
802
- @property (nonatomic, readonly, strong) MasonNode * _Nullable parentNode;
803
- @property (nonatomic, readonly) enum MasonNodeType type;
804
- - (NSArray<MasonNode *> * _Nonnull)getChildren SWIFT_WARN_UNUSED_RESULT;
805
- - (NSArray<MasonNode *> * _Nonnull)getLayoutChildren SWIFT_WARN_UNUSED_RESULT;
806
- @property (nonatomic) BOOL inBatch;
807
- - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes OBJC_DESIGNATED_INITIALIZER;
808
- @property (nonatomic, readonly) BOOL isDirty;
809
- - (void)markDirty;
810
- - (UIView * _Nullable)getRoot SWIFT_WARN_UNUSED_RESULT;
811
- /// Helper to get default text attributes for new text nodes
812
- - (NSDictionary<NSAttributedStringKey, id> * _Nonnull)getDefaultAttributes SWIFT_WARN_UNUSED_RESULT;
813
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
814
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
815
- @end
816
-
817
842
  @interface MasonNode (SWIFT_EXTENSION(Mason))
818
843
  - (void)setChildrenWithValue:(NSArray<MasonNode *> * _Nonnull)value;
819
844
  - (void)appendChild:(MasonNode * _Nonnull)child;
@@ -858,6 +883,7 @@ SWIFT_CLASS_NAMED("MasonStyle")
858
883
  @property (nonatomic) enum MasonClear clear;
859
884
  @property (nonatomic) uint32_t color;
860
885
  - (void)setColorWithUi:(UIColor * _Nonnull)color;
886
+ - (void)setColorWithCss:(NSString * _Nonnull)color;
861
887
  @property (nonatomic, copy) NSString * _Nonnull filter;
862
888
  @property (nonatomic, copy) NSString * _Nonnull background;
863
889
  @property (nonatomic, copy) NSString * _Nonnull backgroundImage;
@@ -917,6 +943,7 @@ SWIFT_CLASS_NAMED("MasonStyle")
917
943
  - (void)setPaddingTop:(float)value :(NSInteger)type;
918
944
  - (void)setPaddingBottom:(float)value :(NSInteger)type;
919
945
  - (void)setPaddingWithValueType:(float)value :(NSInteger)type;
946
+ @property (nonatomic, copy) NSString * _Nonnull textShadow;
920
947
  @property (nonatomic, copy) NSString * _Nonnull borderRadius;
921
948
  @property (nonatomic, copy) NSString * _Nonnull border;
922
949
  @property (nonatomic, strong) MasonLengthPercentageRectCompat * _Nonnull borderWidthCompat;
@@ -979,6 +1006,7 @@ SWIFT_CLASS_NAMED("MasonText")
979
1006
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) Class _Nonnull layerClass;)
980
1007
  + (Class _Nonnull)layerClass SWIFT_WARN_UNUSED_RESULT;
981
1008
  @property (nonatomic, readonly, strong) NSMutableData * _Nonnull textValues;
1009
+ - (void)onTextStyleChangedWithChange:(int64_t)change;
982
1010
  @property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
983
1011
  @property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
984
1012
  - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)mason type:(enum MasonTextType)textType OBJC_DESIGNATED_INITIALIZER;
@@ -1026,22 +1054,6 @@ SWIFT_CLASS("_TtC5Mason14MasonTextLayer")
1026
1054
  - (void)drawInContext:(CGContextRef _Nonnull)context;
1027
1055
  @end
1028
1056
 
1029
- SWIFT_CLASS_NAMED("MasonTextNode")
1030
- @interface MasonTextNode : MasonNode <MasonCharacterData>
1031
- @property (nonatomic, copy) NSString * _Nonnull data;
1032
- - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
1033
- - (void)appendChild:(MasonNode * _Nonnull)child;
1034
- @property (nonatomic, readonly) NSInteger length;
1035
- - (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
1036
- - (nonnull instancetype)appendData:(NSString * _Nonnull)s;
1037
- - (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
1038
- - (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
1039
- - (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
1040
- - (nonnull instancetype)deleteDataWithRange:(NSRange)range;
1041
- - (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
1042
- - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes SWIFT_UNAVAILABLE;
1043
- @end
1044
-
1045
1057
  @class NSAttributedString;
1046
1058
  @interface MasonTextNode (SWIFT_EXTENSION(Mason))
1047
1059
  /// Get attributed string representation of this text node
@@ -1364,6 +1376,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) NSCMason * _Nonnull sh
1364
1376
  - (MasonScroll * _Nonnull)createScrollView SWIFT_WARN_UNUSED_RESULT;
1365
1377
  - (MasonButton * _Nonnull)createButton SWIFT_WARN_UNUSED_RESULT;
1366
1378
  - (MasonNode * _Nonnull)createNode SWIFT_WARN_UNUSED_RESULT;
1379
+ - (MasonBr * _Nonnull)createBr SWIFT_WARN_UNUSED_RESULT;
1367
1380
  - (void)printTree:(MasonNode * _Nonnull)node;
1368
1381
  - (MasonNode * _Nonnull)createTextNode SWIFT_WARN_UNUSED_RESULT;
1369
1382
  - (MasonNode * _Nonnull)createImageNode SWIFT_WARN_UNUSED_RESULT;
@@ -1935,6 +1948,7 @@ SWIFT_PROTOCOL_NAMED("TextContainer")
1935
1948
  @protocol MasonTextContainer <NSObject>
1936
1949
  @property (nonatomic, readonly, strong) MasonTextEngine * _Nonnull engine;
1937
1950
  @property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
1951
+ - (void)onTextStyleChangedWithChange:(int64_t)change;
1938
1952
  @end
1939
1953
 
1940
1954
  @class MasonStyle;
@@ -1963,6 +1977,7 @@ SWIFT_CLASS_NAMED("Button")
1963
1977
  - (void)addView:(UIView * _Nonnull)view at:(NSInteger)at;
1964
1978
  - (void)drawRect:(CGRect)rect;
1965
1979
  @property (nonatomic, readonly, strong) NSMutableData * _Nonnull textValues;
1980
+ - (void)onTextStyleChangedWithChange:(int64_t)change;
1966
1981
  - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
1967
1982
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
1968
1983
  @end
@@ -2165,6 +2180,55 @@ SWIFT_PROTOCOL("_TtP5Mason18MasonCharacterData_")
2165
2180
  - (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
2166
2181
  @end
2167
2182
 
2183
+ @class MasonLayout;
2184
+ @class MasonDocument;
2185
+ enum MasonNodeType : int32_t;
2186
+ SWIFT_CLASS_NAMED("MasonNode")
2187
+ @interface MasonNode : NSObject
2188
+ @property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
2189
+ @property (nonatomic, copy) void (^ _Nullable onNodeAttached)(void);
2190
+ @property (nonatomic, copy) void (^ _Nullable onNodeDetached)(void);
2191
+ @property (nonatomic, readonly) void * _Nullable nativePtr;
2192
+ @property (nonatomic, readonly, strong) MasonLayout * _Nonnull computedLayout;
2193
+ @property (nonatomic, readonly, strong) MasonDocument * _Nullable document;
2194
+ - (MasonNode * _Nonnull)getRootNode SWIFT_WARN_UNUSED_RESULT;
2195
+ @property (nonatomic, readonly, strong) MasonNode * _Nullable parent;
2196
+ @property (nonatomic, readonly, strong) MasonNode * _Nullable parentNode;
2197
+ @property (nonatomic, readonly) enum MasonNodeType type;
2198
+ - (NSArray<MasonNode *> * _Nonnull)getChildren SWIFT_WARN_UNUSED_RESULT;
2199
+ - (NSArray<MasonNode *> * _Nonnull)getLayoutChildren SWIFT_WARN_UNUSED_RESULT;
2200
+ @property (nonatomic) BOOL inBatch;
2201
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes OBJC_DESIGNATED_INITIALIZER;
2202
+ @property (nonatomic, readonly) BOOL isDirty;
2203
+ - (void)markDirty;
2204
+ - (UIView * _Nullable)getRoot SWIFT_WARN_UNUSED_RESULT;
2205
+ /// Helper to get default text attributes for new text nodes
2206
+ - (NSDictionary<NSAttributedStringKey, id> * _Nonnull)getDefaultAttributes SWIFT_WARN_UNUSED_RESULT;
2207
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2208
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2209
+ @end
2210
+
2211
+ SWIFT_CLASS_NAMED("MasonTextNode")
2212
+ @interface MasonTextNode : MasonNode <MasonCharacterData>
2213
+ @property (nonatomic, copy) NSString * _Nonnull data;
2214
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
2215
+ - (void)appendChild:(MasonNode * _Nonnull)child;
2216
+ @property (nonatomic, readonly) NSInteger length;
2217
+ - (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
2218
+ - (nonnull instancetype)appendData:(NSString * _Nonnull)s;
2219
+ - (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
2220
+ - (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
2221
+ - (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
2222
+ - (nonnull instancetype)deleteDataWithRange:(NSRange)range;
2223
+ - (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
2224
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes SWIFT_UNAVAILABLE;
2225
+ @end
2226
+
2227
+ SWIFT_CLASS_NAMED("MasonBr")
2228
+ @interface MasonBr : MasonTextNode
2229
+ - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
2230
+ @end
2231
+
2168
2232
  enum MasonDimensionCompatType : NSInteger;
2169
2233
  SWIFT_CLASS_NAMED("MasonDimensionCompat")
2170
2234
  @interface MasonDimensionCompat : NSObject
@@ -2351,32 +2415,6 @@ SWIFT_CLASS_NAMED("MasonLengthPercentageSizeCompat")
2351
2415
  + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2352
2416
  @end
2353
2417
 
2354
- enum MasonNodeType : int32_t;
2355
- SWIFT_CLASS_NAMED("MasonNode")
2356
- @interface MasonNode : NSObject
2357
- @property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
2358
- @property (nonatomic, copy) void (^ _Nullable onNodeAttached)(void);
2359
- @property (nonatomic, copy) void (^ _Nullable onNodeDetached)(void);
2360
- @property (nonatomic, readonly) void * _Nullable nativePtr;
2361
- @property (nonatomic, readonly, strong) MasonLayout * _Nonnull computedLayout;
2362
- @property (nonatomic, readonly, strong) MasonDocument * _Nullable document;
2363
- - (MasonNode * _Nonnull)getRootNode SWIFT_WARN_UNUSED_RESULT;
2364
- @property (nonatomic, readonly, strong) MasonNode * _Nullable parent;
2365
- @property (nonatomic, readonly, strong) MasonNode * _Nullable parentNode;
2366
- @property (nonatomic, readonly) enum MasonNodeType type;
2367
- - (NSArray<MasonNode *> * _Nonnull)getChildren SWIFT_WARN_UNUSED_RESULT;
2368
- - (NSArray<MasonNode *> * _Nonnull)getLayoutChildren SWIFT_WARN_UNUSED_RESULT;
2369
- @property (nonatomic) BOOL inBatch;
2370
- - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes OBJC_DESIGNATED_INITIALIZER;
2371
- @property (nonatomic, readonly) BOOL isDirty;
2372
- - (void)markDirty;
2373
- - (UIView * _Nullable)getRoot SWIFT_WARN_UNUSED_RESULT;
2374
- /// Helper to get default text attributes for new text nodes
2375
- - (NSDictionary<NSAttributedStringKey, id> * _Nonnull)getDefaultAttributes SWIFT_WARN_UNUSED_RESULT;
2376
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
2377
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
2378
- @end
2379
-
2380
2418
  @interface MasonNode (SWIFT_EXTENSION(Mason))
2381
2419
  - (void)setChildrenWithValue:(NSArray<MasonNode *> * _Nonnull)value;
2382
2420
  - (void)appendChild:(MasonNode * _Nonnull)child;
@@ -2421,6 +2459,7 @@ SWIFT_CLASS_NAMED("MasonStyle")
2421
2459
  @property (nonatomic) enum MasonClear clear;
2422
2460
  @property (nonatomic) uint32_t color;
2423
2461
  - (void)setColorWithUi:(UIColor * _Nonnull)color;
2462
+ - (void)setColorWithCss:(NSString * _Nonnull)color;
2424
2463
  @property (nonatomic, copy) NSString * _Nonnull filter;
2425
2464
  @property (nonatomic, copy) NSString * _Nonnull background;
2426
2465
  @property (nonatomic, copy) NSString * _Nonnull backgroundImage;
@@ -2480,6 +2519,7 @@ SWIFT_CLASS_NAMED("MasonStyle")
2480
2519
  - (void)setPaddingTop:(float)value :(NSInteger)type;
2481
2520
  - (void)setPaddingBottom:(float)value :(NSInteger)type;
2482
2521
  - (void)setPaddingWithValueType:(float)value :(NSInteger)type;
2522
+ @property (nonatomic, copy) NSString * _Nonnull textShadow;
2483
2523
  @property (nonatomic, copy) NSString * _Nonnull borderRadius;
2484
2524
  @property (nonatomic, copy) NSString * _Nonnull border;
2485
2525
  @property (nonatomic, strong) MasonLengthPercentageRectCompat * _Nonnull borderWidthCompat;
@@ -2542,6 +2582,7 @@ SWIFT_CLASS_NAMED("MasonText")
2542
2582
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) Class _Nonnull layerClass;)
2543
2583
  + (Class _Nonnull)layerClass SWIFT_WARN_UNUSED_RESULT;
2544
2584
  @property (nonatomic, readonly, strong) NSMutableData * _Nonnull textValues;
2585
+ - (void)onTextStyleChangedWithChange:(int64_t)change;
2545
2586
  @property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
2546
2587
  @property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
2547
2588
  - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)mason type:(enum MasonTextType)textType OBJC_DESIGNATED_INITIALIZER;
@@ -2589,22 +2630,6 @@ SWIFT_CLASS("_TtC5Mason14MasonTextLayer")
2589
2630
  - (void)drawInContext:(CGContextRef _Nonnull)context;
2590
2631
  @end
2591
2632
 
2592
- SWIFT_CLASS_NAMED("MasonTextNode")
2593
- @interface MasonTextNode : MasonNode <MasonCharacterData>
2594
- @property (nonatomic, copy) NSString * _Nonnull data;
2595
- - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
2596
- - (void)appendChild:(MasonNode * _Nonnull)child;
2597
- @property (nonatomic, readonly) NSInteger length;
2598
- - (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
2599
- - (nonnull instancetype)appendData:(NSString * _Nonnull)s;
2600
- - (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
2601
- - (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
2602
- - (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
2603
- - (nonnull instancetype)deleteDataWithRange:(NSRange)range;
2604
- - (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
2605
- - (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes SWIFT_UNAVAILABLE;
2606
- @end
2607
-
2608
2633
  @class NSAttributedString;
2609
2634
  @interface MasonTextNode (SWIFT_EXTENSION(Mason))
2610
2635
  /// Get attributed string representation of this text node
@@ -2927,6 +2952,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) NSCMason * _Nonnull sh
2927
2952
  - (MasonScroll * _Nonnull)createScrollView SWIFT_WARN_UNUSED_RESULT;
2928
2953
  - (MasonButton * _Nonnull)createButton SWIFT_WARN_UNUSED_RESULT;
2929
2954
  - (MasonNode * _Nonnull)createNode SWIFT_WARN_UNUSED_RESULT;
2955
+ - (MasonBr * _Nonnull)createBr SWIFT_WARN_UNUSED_RESULT;
2930
2956
  - (void)printTree:(MasonNode * _Nonnull)node;
2931
2957
  - (MasonNode * _Nonnull)createTextNode SWIFT_WARN_UNUSED_RESULT;
2932
2958
  - (MasonNode * _Nonnull)createImageNode SWIFT_WARN_UNUSED_RESULT;
@@ -26,6 +26,7 @@ typedef struct CMasonInlineChildSegment {
26
26
  typedef enum CMasonSegment_Tag {
27
27
  Text,
28
28
  InlineChild,
29
+ LineBreak,
29
30
  } CMasonSegment_Tag;
30
31
 
31
32
  typedef struct CMasonSegment {