@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
@@ -10,15 +10,18 @@
10
10
  <key>DebugSymbolsPath</key>
11
11
  <string>dSYMs</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64</string>
13
+ <string>ios-arm64_x86_64-simulator</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>Mason.framework</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
+ <string>x86_64</string>
19
20
  </array>
20
21
  <key>SupportedPlatform</key>
21
22
  <string>ios</string>
23
+ <key>SupportedPlatformVariant</key>
24
+ <string>simulator</string>
22
25
  </dict>
23
26
  <dict>
24
27
  <key>BinaryPath</key>
@@ -26,18 +29,15 @@
26
29
  <key>DebugSymbolsPath</key>
27
30
  <string>dSYMs</string>
28
31
  <key>LibraryIdentifier</key>
29
- <string>ios-arm64_x86_64-simulator</string>
32
+ <string>ios-arm64</string>
30
33
  <key>LibraryPath</key>
31
34
  <string>Mason.framework</string>
32
35
  <key>SupportedArchitectures</key>
33
36
  <array>
34
37
  <string>arm64</string>
35
- <string>x86_64</string>
36
38
  </array>
37
39
  <key>SupportedPlatform</key>
38
40
  <string>ios</string>
39
- <key>SupportedPlatformVariant</key>
40
- <string>simulator</string>
41
41
  </dict>
42
42
  </array>
43
43
  <key>CFBundlePackageType</key>
@@ -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;
@@ -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 {