@triniwiz/nativescript-masonkit 1.0.0-beta.6 → 1.0.0-beta.61
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.
- package/DOCS.md +884 -0
- package/br/index.android.d.ts +10 -0
- package/br/index.android.js +31 -0
- package/br/index.android.js.map +1 -0
- package/br/index.ios.d.ts +11 -0
- package/br/index.ios.js +30 -0
- package/br/index.ios.js.map +1 -0
- package/button/index.android.d.ts +4 -2
- package/button/index.android.js +9 -4
- package/button/index.android.js.map +1 -1
- package/button/index.ios.d.ts +4 -5
- package/button/index.ios.js +9 -66
- package/button/index.ios.js.map +1 -1
- package/common.d.ts +135 -70
- package/common.js +775 -1337
- package/common.js.map +1 -1
- package/img/index.android.d.ts +5 -4
- package/img/index.android.js +18 -6
- package/img/index.android.js.map +1 -1
- package/img/index.ios.d.ts +3 -2
- package/img/index.ios.js +23 -19
- package/img/index.ios.js.map +1 -1
- package/index.android.d.ts +4 -1
- package/index.android.js +4 -1
- package/index.android.js.map +1 -1
- package/index.d.ts +21 -1
- package/index.ios.d.ts +4 -1
- package/index.ios.js +4 -1
- package/index.ios.js.map +1 -1
- package/input/common.d.ts +20 -0
- package/input/common.js +64 -0
- package/input/common.js.map +1 -0
- package/input/index.android.d.ts +20 -0
- package/input/index.android.js +118 -0
- package/input/index.android.js.map +1 -0
- package/input/index.ios.d.ts +23 -0
- package/input/index.ios.js +163 -0
- package/input/index.ios.js.map +1 -0
- package/package.json +3 -2
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/Info.plist +5 -5
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +281 -51
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +70 -42
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +39728 -27944
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +876 -247
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +876 -247
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +7413 -4294
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +562 -102
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +70 -42
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +34845 -23061
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +975 -346
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +975 -346
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +34845 -23061
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +975 -346
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +975 -346
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +29 -29
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +7408 -4287
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +7103 -4165
- package/properties.d.ts +49 -0
- package/properties.js +1147 -0
- package/properties.js.map +1 -0
- package/scroll/index.android.d.ts +3 -2
- package/scroll/index.android.js +16 -4
- package/scroll/index.android.js.map +1 -1
- package/scroll/index.ios.d.ts +3 -2
- package/scroll/index.ios.js +18 -5
- package/scroll/index.ios.js.map +1 -1
- package/style.d.ts +9 -5
- package/style.js +622 -367
- package/style.js.map +1 -1
- package/symbols.d.ts +10 -0
- package/symbols.js +11 -0
- package/symbols.js.map +1 -0
- package/text/index.android.d.ts +11 -5
- package/text/index.android.js +72 -103
- package/text/index.android.js.map +1 -1
- package/text/index.ios.d.ts +12 -10
- package/text/index.ios.js +69 -168
- package/text/index.ios.js.map +1 -1
- package/text-node/index.android.d.ts +13 -0
- package/text-node/index.android.js +35 -0
- package/text-node/index.android.js.map +1 -0
- package/text-node/index.ios.d.ts +13 -0
- package/text-node/index.ios.js +35 -0
- package/text-node/index.ios.js.map +1 -0
- package/tree/index.android.d.ts +10 -2
- package/tree/index.android.js +62 -1
- package/tree/index.android.js.map +1 -1
- package/tree/index.ios.d.ts +4 -1
- package/tree/index.ios.js +36 -1
- package/tree/index.ios.js.map +1 -1
- package/utils/index.android.d.ts +2 -1
- package/utils/index.android.js +1 -1
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.d.ts +2 -1
- package/utils/index.ios.js +1 -1
- package/utils/index.ios.js.map +1 -1
- package/view/index.android.d.ts +3 -2
- package/view/index.android.js +18 -4
- package/view/index.android.js.map +1 -1
- package/view/index.ios.d.ts +3 -2
- package/view/index.ios.js +18 -5
- package/view/index.ios.js.map +1 -1
- package/web.d.ts +6 -0
- package/web.js +22 -0
- package/web.js.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#if 0
|
|
2
2
|
#elif defined(__arm64__) && __arm64__
|
|
3
|
-
// Generated by Apple Swift version 6.
|
|
3
|
+
// Generated by Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
|
|
4
4
|
#ifndef MASON_SWIFT_H
|
|
5
5
|
#define MASON_SWIFT_H
|
|
6
6
|
#pragma clang diagnostic push
|
|
@@ -585,72 +585,47 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonLineHeight, "LineHeight", open) {
|
|
|
585
585
|
MasonLineHeightPreLine = 3,
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
+
typedef SWIFT_ENUM_NAMED(NSInteger, MasonListStylePosition, "ListStylePosition", open) {
|
|
589
|
+
MasonListStylePositionOutside = 0,
|
|
590
|
+
MasonListStylePositionInside = 1,
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
typedef SWIFT_ENUM_NAMED(NSInteger, MasonListStyleType, "ListStyleType", open) {
|
|
594
|
+
MasonListStyleTypeNone = 0,
|
|
595
|
+
MasonListStyleTypeCustom = 1,
|
|
596
|
+
MasonListStyleTypeDisc = 2,
|
|
597
|
+
MasonListStyleTypeCircle = 3,
|
|
598
|
+
MasonListStyleTypeSquare = 4,
|
|
599
|
+
MasonListStyleTypeDecimal = 5,
|
|
600
|
+
};
|
|
601
|
+
|
|
588
602
|
typedef SWIFT_ENUM_NAMED(NSInteger, MasonLoadingState, "LoadingState", open) {
|
|
589
603
|
MasonLoadingStateLoading = 0,
|
|
590
604
|
MasonLoadingStateLoaded = 1,
|
|
591
605
|
MasonLoadingStateError = 2,
|
|
592
606
|
};
|
|
593
607
|
|
|
594
|
-
|
|
595
|
-
@
|
|
596
|
-
@property (nonatomic, copy) NSString * _Nonnull data;
|
|
597
|
-
@property (nonatomic, readonly) NSInteger length;
|
|
598
|
-
- (nonnull instancetype)appendData:(NSString * _Nonnull)s;
|
|
599
|
-
- (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
|
|
600
|
-
- (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
|
|
601
|
-
- (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
|
|
602
|
-
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
603
|
-
- (nonnull instancetype)deleteDataWithRange:(NSRange)range;
|
|
604
|
-
- (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
|
|
605
|
-
@end
|
|
606
|
-
|
|
607
|
-
@class MasonLayout;
|
|
608
|
-
@class MasonDocument;
|
|
609
|
-
enum MasonNodeType : int32_t;
|
|
610
|
-
SWIFT_CLASS_NAMED("MasonNode")
|
|
611
|
-
@interface MasonNode : NSObject
|
|
608
|
+
SWIFT_CLASS_NAMED("MasonBr")
|
|
609
|
+
@interface MasonBr : NSObject <MasonElementObjc>
|
|
612
610
|
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
613
|
-
@property (nonatomic,
|
|
614
|
-
@property (nonatomic,
|
|
615
|
-
@property (nonatomic, readonly)
|
|
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;
|
|
611
|
+
@property (nonatomic, strong) MasonNode * _Nonnull node;
|
|
612
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
613
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
631
614
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
632
615
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
633
616
|
@end
|
|
634
617
|
|
|
635
|
-
|
|
636
|
-
@
|
|
618
|
+
SWIFT_PROTOCOL("_TtP5Mason18MasonCharacterData_")
|
|
619
|
+
@protocol MasonCharacterData
|
|
637
620
|
@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
621
|
@property (nonatomic, readonly) NSInteger length;
|
|
641
|
-
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
642
622
|
- (nonnull instancetype)appendData:(NSString * _Nonnull)s;
|
|
643
623
|
- (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
|
|
644
624
|
- (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
|
|
645
625
|
- (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
|
|
626
|
+
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
646
627
|
- (nonnull instancetype)deleteDataWithRange:(NSRange)range;
|
|
647
628
|
- (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
629
|
@end
|
|
655
630
|
|
|
656
631
|
enum MasonDimensionCompatType : NSInteger;
|
|
@@ -712,6 +687,44 @@ SWIFT_CLASS_NAMED("MasonDocument")
|
|
|
712
687
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
713
688
|
@end
|
|
714
689
|
|
|
690
|
+
@class MasonEventOptions;
|
|
691
|
+
SWIFT_CLASS_NAMED("MasonEvent")
|
|
692
|
+
@interface MasonEvent : NSObject
|
|
693
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull type;
|
|
694
|
+
@property (nonatomic, readonly) BOOL bubbles;
|
|
695
|
+
@property (nonatomic, readonly) BOOL cancelable;
|
|
696
|
+
@property (nonatomic, readonly) BOOL isComposing;
|
|
697
|
+
@property (nonatomic, readonly) double timeStamp;
|
|
698
|
+
@property (nonatomic, readonly) BOOL defaultPrevented;
|
|
699
|
+
@property (nonatomic, readonly) BOOL propagationStopped;
|
|
700
|
+
@property (nonatomic, readonly) BOOL immediatePropagationStopped;
|
|
701
|
+
@property (nonatomic, readonly) id _Nullable target;
|
|
702
|
+
@property (nonatomic, readonly) id _Nullable currentTarget;
|
|
703
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
|
|
704
|
+
- (void)preventDefault;
|
|
705
|
+
- (void)stopPropagation;
|
|
706
|
+
- (void)stopImmediatePropagation;
|
|
707
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
708
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
709
|
+
@end
|
|
710
|
+
|
|
711
|
+
SWIFT_CLASS_NAMED("MasonEventOptions")
|
|
712
|
+
@interface MasonEventOptions : NSObject
|
|
713
|
+
@property (nonatomic) BOOL isComposing;
|
|
714
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
715
|
+
- (nonnull instancetype)initWithIsComposing:(BOOL)isComposing OBJC_DESIGNATED_INITIALIZER;
|
|
716
|
+
@end
|
|
717
|
+
|
|
718
|
+
@class NSURL;
|
|
719
|
+
SWIFT_CLASS_NAMED("MasonFileInputEvent")
|
|
720
|
+
@interface MasonFileInputEvent : MasonEvent
|
|
721
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable data;
|
|
722
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable inputType;
|
|
723
|
+
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull rawData;
|
|
724
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type data:(NSString * _Nullable)inputData inputType:(NSString * _Nullable)masonInputType options:(MasonEventOptions * _Nullable)options rawData:(NSArray<NSURL *> * _Nonnull)inputRawData OBJC_DESIGNATED_INITIALIZER;
|
|
725
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options SWIFT_UNAVAILABLE;
|
|
726
|
+
@end
|
|
727
|
+
|
|
715
728
|
typedef SWIFT_ENUM_NAMED(NSInteger, MasonFloat, "MasonFloat", open) {
|
|
716
729
|
MasonFloatNone = 0,
|
|
717
730
|
MasonFloatLeft = 1,
|
|
@@ -721,11 +734,59 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonFloat, "MasonFloat", open) {
|
|
|
721
734
|
SWIFT_CLASS("_TtC5Mason15MasonImageLayer")
|
|
722
735
|
@interface MasonImageLayer : CALayer
|
|
723
736
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
724
|
-
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
725
737
|
- (nonnull instancetype)initWithLayer:(id _Nonnull)layer OBJC_DESIGNATED_INITIALIZER;
|
|
738
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
726
739
|
- (void)drawInContext:(CGContextRef _Nonnull)context;
|
|
740
|
+
- (void)layoutSublayers;
|
|
727
741
|
@end
|
|
728
742
|
|
|
743
|
+
enum MasonInputType : int8_t;
|
|
744
|
+
@class NSDate;
|
|
745
|
+
SWIFT_CLASS_NAMED("MasonInput")
|
|
746
|
+
@interface MasonInput : UIView
|
|
747
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
748
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
|
|
749
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
750
|
+
@property (nonatomic) BOOL multiple;
|
|
751
|
+
@property (nonatomic, copy) NSString * _Nonnull accept;
|
|
752
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
753
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
754
|
+
@property (nonatomic) enum MasonInputType type;
|
|
755
|
+
@property (nonatomic) int32_t size;
|
|
756
|
+
@property (nonatomic, copy) NSString * _Nonnull value;
|
|
757
|
+
@property (nonatomic) double valueAsNumber;
|
|
758
|
+
@property (nonatomic, copy) NSDate * _Nullable valueAsDate;
|
|
759
|
+
@property (nonatomic, copy) NSString * _Nonnull placeholder;
|
|
760
|
+
- (void)drawRect:(CGRect)rect;
|
|
761
|
+
- (void)layoutSubviews;
|
|
762
|
+
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
|
|
763
|
+
@end
|
|
764
|
+
|
|
765
|
+
SWIFT_CLASS_NAMED("MasonInputEvent")
|
|
766
|
+
@interface MasonInputEvent : MasonEvent
|
|
767
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable data;
|
|
768
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable inputType;
|
|
769
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type data:(NSString * _Nullable)inputData inputType:(NSString * _Nullable)masonInputType options:(MasonEventOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
|
|
770
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options SWIFT_UNAVAILABLE;
|
|
771
|
+
@end
|
|
772
|
+
|
|
773
|
+
typedef SWIFT_ENUM_NAMED(int8_t, MasonInputType, "MasonInputType", open) {
|
|
774
|
+
MasonInputTypeText = 0,
|
|
775
|
+
MasonInputTypeButton = 1,
|
|
776
|
+
MasonInputTypeCheckbox = 2,
|
|
777
|
+
MasonInputTypeEmail = 3,
|
|
778
|
+
MasonInputTypePassword = 4,
|
|
779
|
+
MasonInputTypeDate = 5,
|
|
780
|
+
MasonInputTypeRadio = 6,
|
|
781
|
+
MasonInputTypeNumber = 7,
|
|
782
|
+
MasonInputTypeRange = 8,
|
|
783
|
+
MasonInputTypeTel = 9,
|
|
784
|
+
MasonInputTypeUrl = 10,
|
|
785
|
+
MasonInputTypeColor = 11,
|
|
786
|
+
MasonInputTypeFile = 12,
|
|
787
|
+
MasonInputTypeSubmit = 13,
|
|
788
|
+
};
|
|
789
|
+
|
|
729
790
|
SWIFT_CLASS_NAMED("MasonLayout")
|
|
730
791
|
@interface MasonLayout : NSObject
|
|
731
792
|
@property (nonatomic, readonly) NSInteger order;
|
|
@@ -737,6 +798,28 @@ SWIFT_CLASS_NAMED("MasonLayout")
|
|
|
737
798
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) MasonLayout * _Nonnull zero;)
|
|
738
799
|
+ (MasonLayout * _Nonnull)zero SWIFT_WARN_UNUSED_RESULT;
|
|
739
800
|
@property (nonatomic, readonly) BOOL hasChildren;
|
|
801
|
+
@property (nonatomic, readonly) BOOL borderIsEmpty;
|
|
802
|
+
@property (nonatomic, readonly) float borderTop;
|
|
803
|
+
@property (nonatomic, readonly) float borderRight;
|
|
804
|
+
@property (nonatomic, readonly) float borderBottom;
|
|
805
|
+
@property (nonatomic, readonly) float borderLeft;
|
|
806
|
+
@property (nonatomic, readonly) BOOL marginIsEmpty;
|
|
807
|
+
@property (nonatomic, readonly) float marginTop;
|
|
808
|
+
@property (nonatomic, readonly) float marginRight;
|
|
809
|
+
@property (nonatomic, readonly) float marginBottom;
|
|
810
|
+
@property (nonatomic, readonly) float marginLeft;
|
|
811
|
+
@property (nonatomic, readonly) BOOL paddingIsEmpty;
|
|
812
|
+
@property (nonatomic, readonly) float paddingTop;
|
|
813
|
+
@property (nonatomic, readonly) float paddingRight;
|
|
814
|
+
@property (nonatomic, readonly) float paddingBottom;
|
|
815
|
+
@property (nonatomic, readonly) float paddingLeft;
|
|
816
|
+
@property (nonatomic, readonly) BOOL sizeIsEmpty;
|
|
817
|
+
@property (nonatomic, readonly) BOOL contentSizeIsEmpty;
|
|
818
|
+
@property (nonatomic, readonly) float contentSizeWidth;
|
|
819
|
+
@property (nonatomic, readonly) float contentSizeHeight;
|
|
820
|
+
@property (nonatomic, readonly) BOOL scrollbarSizeIsEmpty;
|
|
821
|
+
@property (nonatomic, readonly) float scrollbarSizeWidth;
|
|
822
|
+
@property (nonatomic, readonly) float scrollbarSizeHeight;
|
|
740
823
|
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
|
|
741
824
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
742
825
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
@@ -839,6 +922,112 @@ SWIFT_CLASS_NAMED("MasonLengthPercentageSizeCompat")
|
|
|
839
922
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
840
923
|
@end
|
|
841
924
|
|
|
925
|
+
SWIFT_CLASS_NAMED("MasonLi")
|
|
926
|
+
@interface MasonLi : UIView <MasonElementObjc>
|
|
927
|
+
- (void)requestLayout;
|
|
928
|
+
- (void)drawRect:(CGRect)rect;
|
|
929
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
|
|
930
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
931
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
932
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
933
|
+
@property (nonatomic) BOOL isOrdered;
|
|
934
|
+
- (void)layoutSubviews;
|
|
935
|
+
/// Reset view state for recycling
|
|
936
|
+
- (void)resetForRecycle;
|
|
937
|
+
/// Set marker value and position for this list item
|
|
938
|
+
- (void)bindWithPosition:(NSInteger)position isOrdered:(BOOL)isOrdered;
|
|
939
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
940
|
+
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
|
|
941
|
+
@end
|
|
942
|
+
|
|
943
|
+
@protocol MasonListDelegate;
|
|
944
|
+
@class UICollectionView;
|
|
945
|
+
@class NSIndexPath;
|
|
946
|
+
@class UICollectionViewCell;
|
|
947
|
+
SWIFT_CLASS_NAMED("MasonList")
|
|
948
|
+
@interface MasonList : UIView <MasonElementObjc, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
|
949
|
+
@property (nonatomic, strong) id <MasonListDelegate> _Nullable delegate;
|
|
950
|
+
- (void)drawRect:(CGRect)rect;
|
|
951
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
|
|
952
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
953
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
954
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
955
|
+
@property (nonatomic, strong) NSMutableData * _Nonnull values;
|
|
956
|
+
@property (nonatomic) NSInteger count;
|
|
957
|
+
- (void)layoutSubviews;
|
|
958
|
+
- (void)registerWithCellClass:(Class _Nullable)cellClass forCellWithReuseIdentifier:(NSString * _Nonnull)identifier;
|
|
959
|
+
- (void)reload;
|
|
960
|
+
@property (nonatomic) BOOL isOrdered;
|
|
961
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
962
|
+
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
|
963
|
+
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
|
|
964
|
+
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
|
965
|
+
- (void)collectionView:(UICollectionView * _Nonnull)collectionView willDisplayCell:(UICollectionViewCell * _Nonnull)cell forItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
|
|
966
|
+
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
|
|
967
|
+
@end
|
|
968
|
+
|
|
969
|
+
SWIFT_PROTOCOL_NAMED("MasonListDelegate")
|
|
970
|
+
@protocol MasonListDelegate
|
|
971
|
+
- (UICollectionViewCell * _Nonnull)list:(UICollectionView * _Nonnull)list cellForItemAt:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
|
972
|
+
- (void)list:(UICollectionView * _Nonnull)list willDisplay:(UICollectionViewCell * _Nonnull)cell forItemAt:(NSIndexPath * _Nonnull)indexPath;
|
|
973
|
+
@end
|
|
974
|
+
|
|
975
|
+
@class MasonMouseEventOptions;
|
|
976
|
+
SWIFT_CLASS_NAMED("MasonMouseEvent")
|
|
977
|
+
@interface MasonMouseEvent : MasonEvent
|
|
978
|
+
@property (nonatomic, readonly) NSInteger button;
|
|
979
|
+
@property (nonatomic, readonly) NSInteger buttons;
|
|
980
|
+
@property (nonatomic, readonly) float clientX;
|
|
981
|
+
@property (nonatomic, readonly) float clientY;
|
|
982
|
+
@property (nonatomic, readonly) BOOL ctrlKey;
|
|
983
|
+
@property (nonatomic, readonly) BOOL shiftKey;
|
|
984
|
+
@property (nonatomic, readonly) BOOL altKey;
|
|
985
|
+
@property (nonatomic, readonly) BOOL metaKey;
|
|
986
|
+
@property (nonatomic, readonly) NSInteger detail;
|
|
987
|
+
@property (nonatomic, readonly) float screenX;
|
|
988
|
+
@property (nonatomic, readonly) float screenY;
|
|
989
|
+
@property (nonatomic, readonly) id _Nullable relatedTarget;
|
|
990
|
+
@property (nonatomic, readonly) id _Nullable region;
|
|
991
|
+
@property (nonatomic, readonly) NSInteger movementX;
|
|
992
|
+
@property (nonatomic, readonly) NSInteger movementY;
|
|
993
|
+
@property (nonatomic, readonly) float pageX;
|
|
994
|
+
@property (nonatomic, readonly) float pageY;
|
|
995
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type options:(MasonMouseEventOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
|
|
996
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options SWIFT_UNAVAILABLE;
|
|
997
|
+
@end
|
|
998
|
+
|
|
999
|
+
SWIFT_CLASS_NAMED("MasonMouseEventOptions")
|
|
1000
|
+
@interface MasonMouseEventOptions : MasonEventOptions
|
|
1001
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
1002
|
+
- (nonnull instancetype)initWithIsComposing:(BOOL)isComposing OBJC_DESIGNATED_INITIALIZER;
|
|
1003
|
+
@end
|
|
1004
|
+
|
|
1005
|
+
enum MasonNodeType : int32_t;
|
|
1006
|
+
SWIFT_CLASS_NAMED("MasonNode")
|
|
1007
|
+
@interface MasonNode : NSObject
|
|
1008
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
1009
|
+
@property (nonatomic, copy) void (^ _Nullable onNodeAttached)(void);
|
|
1010
|
+
@property (nonatomic, copy) void (^ _Nullable onNodeDetached)(void);
|
|
1011
|
+
@property (nonatomic, readonly) void * _Nullable nativePtr;
|
|
1012
|
+
@property (nonatomic, readonly, strong) MasonLayout * _Nonnull computedLayout;
|
|
1013
|
+
@property (nonatomic, readonly, strong) MasonDocument * _Nullable document;
|
|
1014
|
+
- (MasonNode * _Nonnull)getRootNode SWIFT_WARN_UNUSED_RESULT;
|
|
1015
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nullable parent;
|
|
1016
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nullable parentNode;
|
|
1017
|
+
@property (nonatomic, readonly) enum MasonNodeType type;
|
|
1018
|
+
- (NSArray<MasonNode *> * _Nonnull)getChildren SWIFT_WARN_UNUSED_RESULT;
|
|
1019
|
+
- (NSArray<MasonNode *> * _Nonnull)getLayoutChildren SWIFT_WARN_UNUSED_RESULT;
|
|
1020
|
+
@property (nonatomic) BOOL inBatch;
|
|
1021
|
+
- (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes OBJC_DESIGNATED_INITIALIZER;
|
|
1022
|
+
@property (nonatomic, readonly) BOOL isDirty;
|
|
1023
|
+
- (void)markDirty;
|
|
1024
|
+
- (UIView * _Nullable)getRoot SWIFT_WARN_UNUSED_RESULT;
|
|
1025
|
+
/// Helper to get default text attributes for new text nodes
|
|
1026
|
+
- (NSDictionary<NSAttributedStringKey, id> * _Nonnull)getDefaultAttributes SWIFT_WARN_UNUSED_RESULT;
|
|
1027
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
1028
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
1029
|
+
@end
|
|
1030
|
+
|
|
842
1031
|
@interface MasonNode (SWIFT_EXTENSION(Mason))
|
|
843
1032
|
- (void)setChildrenWithValue:(NSArray<MasonNode *> * _Nonnull)value;
|
|
844
1033
|
- (void)appendChild:(MasonNode * _Nonnull)child;
|
|
@@ -874,9 +1063,13 @@ enum MasonTextAlign : NSInteger;
|
|
|
874
1063
|
SWIFT_CLASS_NAMED("MasonStyle")
|
|
875
1064
|
@interface MasonStyle : NSObject
|
|
876
1065
|
@property (nonatomic, readonly, strong) NSCFontFace * _Null_unspecified font;
|
|
877
|
-
|
|
1066
|
+
- (void)prepareMut;
|
|
1067
|
+
@property (nonatomic, readonly, strong) NSMutableData * _Nonnull values;
|
|
878
1068
|
@property (nonatomic, strong) NSMutableData * _Nonnull textValues;
|
|
879
1069
|
- (nonnull instancetype)initWithNode:(MasonNode * _Nonnull)node OBJC_DESIGNATED_INITIALIZER;
|
|
1070
|
+
@property (nonatomic) enum MasonListStylePosition listStylePosition;
|
|
1071
|
+
@property (nonatomic) enum MasonListStyleType listStyleType;
|
|
1072
|
+
@property (nonatomic) int32_t zIndex;
|
|
880
1073
|
@property (nonatomic, strong) MasonVerticalAlignValue * _Nonnull verticalAlign;
|
|
881
1074
|
@property (nonatomic) enum MasonObjectFit objectFit;
|
|
882
1075
|
@property (nonatomic, getter=float, setter=setFloat:) enum MasonFloat float_;
|
|
@@ -1054,6 +1247,22 @@ SWIFT_CLASS("_TtC5Mason14MasonTextLayer")
|
|
|
1054
1247
|
- (void)drawInContext:(CGContextRef _Nonnull)context;
|
|
1055
1248
|
@end
|
|
1056
1249
|
|
|
1250
|
+
SWIFT_CLASS_NAMED("MasonTextNode")
|
|
1251
|
+
@interface MasonTextNode : MasonNode <MasonCharacterData>
|
|
1252
|
+
@property (nonatomic, copy) NSString * _Nonnull data;
|
|
1253
|
+
- (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
|
|
1254
|
+
- (void)appendChild:(MasonNode * _Nonnull)child;
|
|
1255
|
+
@property (nonatomic, readonly) NSInteger length;
|
|
1256
|
+
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
1257
|
+
- (nonnull instancetype)appendData:(NSString * _Nonnull)s;
|
|
1258
|
+
- (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
|
|
1259
|
+
- (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
|
|
1260
|
+
- (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
|
|
1261
|
+
- (nonnull instancetype)deleteDataWithRange:(NSRange)range;
|
|
1262
|
+
- (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
|
|
1263
|
+
- (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes SWIFT_UNAVAILABLE;
|
|
1264
|
+
@end
|
|
1265
|
+
|
|
1057
1266
|
@class NSAttributedString;
|
|
1058
1267
|
@interface MasonTextNode (SWIFT_EXTENSION(Mason))
|
|
1059
1268
|
/// Get attributed string representation of this text node
|
|
@@ -1075,6 +1284,10 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonTextType, "MasonTextType", open) {
|
|
|
1075
1284
|
MasonTextTypeBlockquote = 11,
|
|
1076
1285
|
MasonTextTypeB = 12,
|
|
1077
1286
|
MasonTextTypePre = 13,
|
|
1287
|
+
MasonTextTypeStrong = 14,
|
|
1288
|
+
MasonTextTypeEm = 15,
|
|
1289
|
+
MasonTextTypeI = 16,
|
|
1290
|
+
MasonTextTypeA = 17,
|
|
1078
1291
|
};
|
|
1079
1292
|
|
|
1080
1293
|
SWIFT_CLASS_NAMED("MasonUIView")
|
|
@@ -1186,7 +1399,7 @@ SWIFT_CLASS_NAMED("MasonUIView")
|
|
|
1186
1399
|
- (MasonDimensionCompat * _Nonnull)getMaxSizeWidth SWIFT_WARN_UNUSED_RESULT;
|
|
1187
1400
|
- (MasonDimensionCompat * _Nonnull)getMaxSizeHeight SWIFT_WARN_UNUSED_RESULT;
|
|
1188
1401
|
- (void)setGap:(float)width :(float)height;
|
|
1189
|
-
- (void)setGapWithWidthHeightType:(float)width :(
|
|
1402
|
+
- (void)setGapWithWidthHeightType:(float)width :(int8_t)width_type :(float)height :(int8_t)height_type;
|
|
1190
1403
|
- (MasonLengthPercentageSizeCompat * _Nonnull)getGap SWIFT_WARN_UNUSED_RESULT;
|
|
1191
1404
|
- (void)setRowGap:(float)row :(NSInteger)type;
|
|
1192
1405
|
- (void)setColumnGap:(float)column :(NSInteger)type;
|
|
@@ -1320,6 +1533,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSCFontFaceS
|
|
|
1320
1533
|
@property (nonatomic, copy) void (^ _Nullable onStatus)(enum NSCFontFaceSetStatus);
|
|
1321
1534
|
- (NSEnumerator * _Nonnull)iter SWIFT_WARN_UNUSED_RESULT;
|
|
1322
1535
|
- (NSArray * _Nonnull)array SWIFT_WARN_UNUSED_RESULT;
|
|
1536
|
+
- (NSCFontFace * _Nonnull)get:(NSString * _Nonnull)fontFamily SWIFT_WARN_UNUSED_RESULT;
|
|
1537
|
+
- (NSCFontFace * _Nullable)getOrNil:(NSString * _Nonnull)fontFamily SWIFT_WARN_UNUSED_RESULT;
|
|
1323
1538
|
- (void)add:(NSCFontFace * _Nonnull)font;
|
|
1324
1539
|
- (void)clear;
|
|
1325
1540
|
- (void)delete:(NSCFontFace * _Nonnull)font;
|
|
@@ -1353,6 +1568,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontWeight, "NSCFontWeight", open) {
|
|
|
1353
1568
|
NSCFontWeightBlack = 8,
|
|
1354
1569
|
};
|
|
1355
1570
|
|
|
1571
|
+
@class NSUUID;
|
|
1356
1572
|
@class MasonScroll;
|
|
1357
1573
|
SWIFT_CLASS_NAMED("NSCMason")
|
|
1358
1574
|
@interface NSCMason : NSObject
|
|
@@ -1365,7 +1581,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) NSCMason * _Nonnull sh
|
|
|
1365
1581
|
- (MasonNode * _Nonnull)nodeForView:(UIView * _Nonnull)view :(BOOL)isLeaf SWIFT_WARN_UNUSED_RESULT;
|
|
1366
1582
|
- (void)configureStyleForView:(UIView * _Nonnull)view :(SWIFT_NOESCAPE void (^ _Nonnull)(MasonStyle * _Nonnull))block;
|
|
1367
1583
|
- (MasonStyle * _Nonnull)styleForView:(UIView * _Nonnull)view SWIFT_WARN_UNUSED_RESULT;
|
|
1584
|
+
- (MasonStyle * _Nullable)styleForViewOrNode:(id _Nullable)viewOrNode SWIFT_WARN_UNUSED_RESULT;
|
|
1368
1585
|
- (MasonLayout * _Nonnull)layoutForView:(UIView * _Nonnull)view;
|
|
1586
|
+
- (NSUUID * _Nonnull)addEventListener:(MasonNode * _Nonnull)node :(NSString * _Nonnull)event :(void (^ _Nonnull)(MasonEvent * _Nonnull))listener;
|
|
1587
|
+
- (BOOL)removeEventListener:(MasonNode * _Nonnull)node :(NSString * _Nonnull)event id:(NSUUID * _Nonnull)id;
|
|
1588
|
+
- (BOOL)removeEventListener:(MasonNode * _Nonnull)node :(NSString * _Nonnull)event;
|
|
1589
|
+
- (void)dispatch:(MasonEvent * _Nonnull)event :(MasonNode * _Nonnull)node;
|
|
1369
1590
|
- (void)clear;
|
|
1370
1591
|
- (MasonDocument * _Nonnull)createDocument SWIFT_WARN_UNUSED_RESULT;
|
|
1371
1592
|
- (MasonUIView * _Nonnull)createView SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -1377,12 +1598,21 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) NSCMason * _Nonnull sh
|
|
|
1377
1598
|
- (MasonButton * _Nonnull)createButton SWIFT_WARN_UNUSED_RESULT;
|
|
1378
1599
|
- (MasonNode * _Nonnull)createNode SWIFT_WARN_UNUSED_RESULT;
|
|
1379
1600
|
- (MasonBr * _Nonnull)createBr SWIFT_WARN_UNUSED_RESULT;
|
|
1601
|
+
- (MasonInput * _Nonnull)createInput:(enum MasonInputType)type SWIFT_WARN_UNUSED_RESULT;
|
|
1380
1602
|
- (void)printTree:(MasonNode * _Nonnull)node;
|
|
1381
1603
|
- (MasonNode * _Nonnull)createTextNode SWIFT_WARN_UNUSED_RESULT;
|
|
1382
1604
|
- (MasonNode * _Nonnull)createImageNode SWIFT_WARN_UNUSED_RESULT;
|
|
1605
|
+
- (MasonNode * _Nonnull)createLineBreakNode SWIFT_WARN_UNUSED_RESULT;
|
|
1606
|
+
- (MasonList * _Nonnull)createListViewWithIsOrdered:(BOOL)isOrdered SWIFT_WARN_UNUSED_RESULT;
|
|
1607
|
+
- (MasonNode * _Nonnull)createListItemNode SWIFT_WARN_UNUSED_RESULT;
|
|
1608
|
+
- (MasonLi * _Nonnull)createListItem SWIFT_WARN_UNUSED_RESULT;
|
|
1383
1609
|
@end
|
|
1384
1610
|
|
|
1385
1611
|
@interface NSObject (SWIFT_EXTENSION(Mason))
|
|
1612
|
+
- (NSUUID * _Nonnull)mason_addEventListener:(NSString * _Nonnull)event :(void (^ _Nonnull)(MasonEvent * _Nonnull))listener;
|
|
1613
|
+
- (BOOL)mason_removeEventListener:(NSString * _Nonnull)event id:(NSUUID * _Nonnull)id;
|
|
1614
|
+
- (BOOL)mason_removeEventListener:(NSString * _Nonnull)event;
|
|
1615
|
+
- (void)mason_dispatch:(MasonEvent * _Nonnull)event;
|
|
1386
1616
|
- (void)mason_syncStyle:(NSString * _Nonnull)state :(NSString * _Nonnull)textState;
|
|
1387
1617
|
- (void)mason_addView:(UIView * _Nonnull)view;
|
|
1388
1618
|
- (void)mason_addView:(UIView * _Nonnull)view at:(NSInteger)at;
|
|
@@ -1576,7 +1806,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonWhiteSpace, "WhiteSpace", open) {
|
|
|
1576
1806
|
#endif
|
|
1577
1807
|
|
|
1578
1808
|
#elif defined(__x86_64__) && __x86_64__
|
|
1579
|
-
// Generated by Apple Swift version 6.
|
|
1809
|
+
// Generated by Apple Swift version 6.2.3 effective-5.10 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
|
|
1580
1810
|
#ifndef MASON_SWIFT_H
|
|
1581
1811
|
#define MASON_SWIFT_H
|
|
1582
1812
|
#pragma clang diagnostic push
|
|
@@ -2161,72 +2391,47 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonLineHeight, "LineHeight", open) {
|
|
|
2161
2391
|
MasonLineHeightPreLine = 3,
|
|
2162
2392
|
};
|
|
2163
2393
|
|
|
2394
|
+
typedef SWIFT_ENUM_NAMED(NSInteger, MasonListStylePosition, "ListStylePosition", open) {
|
|
2395
|
+
MasonListStylePositionOutside = 0,
|
|
2396
|
+
MasonListStylePositionInside = 1,
|
|
2397
|
+
};
|
|
2398
|
+
|
|
2399
|
+
typedef SWIFT_ENUM_NAMED(NSInteger, MasonListStyleType, "ListStyleType", open) {
|
|
2400
|
+
MasonListStyleTypeNone = 0,
|
|
2401
|
+
MasonListStyleTypeCustom = 1,
|
|
2402
|
+
MasonListStyleTypeDisc = 2,
|
|
2403
|
+
MasonListStyleTypeCircle = 3,
|
|
2404
|
+
MasonListStyleTypeSquare = 4,
|
|
2405
|
+
MasonListStyleTypeDecimal = 5,
|
|
2406
|
+
};
|
|
2407
|
+
|
|
2164
2408
|
typedef SWIFT_ENUM_NAMED(NSInteger, MasonLoadingState, "LoadingState", open) {
|
|
2165
2409
|
MasonLoadingStateLoading = 0,
|
|
2166
2410
|
MasonLoadingStateLoaded = 1,
|
|
2167
2411
|
MasonLoadingStateError = 2,
|
|
2168
2412
|
};
|
|
2169
2413
|
|
|
2170
|
-
|
|
2171
|
-
@
|
|
2172
|
-
@property (nonatomic, copy) NSString * _Nonnull data;
|
|
2173
|
-
@property (nonatomic, readonly) NSInteger length;
|
|
2174
|
-
- (nonnull instancetype)appendData:(NSString * _Nonnull)s;
|
|
2175
|
-
- (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
|
|
2176
|
-
- (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
|
|
2177
|
-
- (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
|
|
2178
|
-
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
2179
|
-
- (nonnull instancetype)deleteDataWithRange:(NSRange)range;
|
|
2180
|
-
- (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
|
|
2181
|
-
@end
|
|
2182
|
-
|
|
2183
|
-
@class MasonLayout;
|
|
2184
|
-
@class MasonDocument;
|
|
2185
|
-
enum MasonNodeType : int32_t;
|
|
2186
|
-
SWIFT_CLASS_NAMED("MasonNode")
|
|
2187
|
-
@interface MasonNode : NSObject
|
|
2414
|
+
SWIFT_CLASS_NAMED("MasonBr")
|
|
2415
|
+
@interface MasonBr : NSObject <MasonElementObjc>
|
|
2188
2416
|
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
2189
|
-
@property (nonatomic,
|
|
2190
|
-
@property (nonatomic,
|
|
2191
|
-
@property (nonatomic, readonly)
|
|
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;
|
|
2417
|
+
@property (nonatomic, strong) MasonNode * _Nonnull node;
|
|
2418
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
2419
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
2207
2420
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
2208
2421
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
2209
2422
|
@end
|
|
2210
2423
|
|
|
2211
|
-
|
|
2212
|
-
@
|
|
2424
|
+
SWIFT_PROTOCOL("_TtP5Mason18MasonCharacterData_")
|
|
2425
|
+
@protocol MasonCharacterData
|
|
2213
2426
|
@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
2427
|
@property (nonatomic, readonly) NSInteger length;
|
|
2217
|
-
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
2218
2428
|
- (nonnull instancetype)appendData:(NSString * _Nonnull)s;
|
|
2219
2429
|
- (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
|
|
2220
2430
|
- (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
|
|
2221
2431
|
- (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
|
|
2432
|
+
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
2222
2433
|
- (nonnull instancetype)deleteDataWithRange:(NSRange)range;
|
|
2223
2434
|
- (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
2435
|
@end
|
|
2231
2436
|
|
|
2232
2437
|
enum MasonDimensionCompatType : NSInteger;
|
|
@@ -2288,6 +2493,44 @@ SWIFT_CLASS_NAMED("MasonDocument")
|
|
|
2288
2493
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
2289
2494
|
@end
|
|
2290
2495
|
|
|
2496
|
+
@class MasonEventOptions;
|
|
2497
|
+
SWIFT_CLASS_NAMED("MasonEvent")
|
|
2498
|
+
@interface MasonEvent : NSObject
|
|
2499
|
+
@property (nonatomic, readonly, copy) NSString * _Nonnull type;
|
|
2500
|
+
@property (nonatomic, readonly) BOOL bubbles;
|
|
2501
|
+
@property (nonatomic, readonly) BOOL cancelable;
|
|
2502
|
+
@property (nonatomic, readonly) BOOL isComposing;
|
|
2503
|
+
@property (nonatomic, readonly) double timeStamp;
|
|
2504
|
+
@property (nonatomic, readonly) BOOL defaultPrevented;
|
|
2505
|
+
@property (nonatomic, readonly) BOOL propagationStopped;
|
|
2506
|
+
@property (nonatomic, readonly) BOOL immediatePropagationStopped;
|
|
2507
|
+
@property (nonatomic, readonly) id _Nullable target;
|
|
2508
|
+
@property (nonatomic, readonly) id _Nullable currentTarget;
|
|
2509
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
|
|
2510
|
+
- (void)preventDefault;
|
|
2511
|
+
- (void)stopPropagation;
|
|
2512
|
+
- (void)stopImmediatePropagation;
|
|
2513
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
2514
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
2515
|
+
@end
|
|
2516
|
+
|
|
2517
|
+
SWIFT_CLASS_NAMED("MasonEventOptions")
|
|
2518
|
+
@interface MasonEventOptions : NSObject
|
|
2519
|
+
@property (nonatomic) BOOL isComposing;
|
|
2520
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
2521
|
+
- (nonnull instancetype)initWithIsComposing:(BOOL)isComposing OBJC_DESIGNATED_INITIALIZER;
|
|
2522
|
+
@end
|
|
2523
|
+
|
|
2524
|
+
@class NSURL;
|
|
2525
|
+
SWIFT_CLASS_NAMED("MasonFileInputEvent")
|
|
2526
|
+
@interface MasonFileInputEvent : MasonEvent
|
|
2527
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable data;
|
|
2528
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable inputType;
|
|
2529
|
+
@property (nonatomic, readonly, copy) NSArray<NSURL *> * _Nonnull rawData;
|
|
2530
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type data:(NSString * _Nullable)inputData inputType:(NSString * _Nullable)masonInputType options:(MasonEventOptions * _Nullable)options rawData:(NSArray<NSURL *> * _Nonnull)inputRawData OBJC_DESIGNATED_INITIALIZER;
|
|
2531
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options SWIFT_UNAVAILABLE;
|
|
2532
|
+
@end
|
|
2533
|
+
|
|
2291
2534
|
typedef SWIFT_ENUM_NAMED(NSInteger, MasonFloat, "MasonFloat", open) {
|
|
2292
2535
|
MasonFloatNone = 0,
|
|
2293
2536
|
MasonFloatLeft = 1,
|
|
@@ -2297,11 +2540,59 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonFloat, "MasonFloat", open) {
|
|
|
2297
2540
|
SWIFT_CLASS("_TtC5Mason15MasonImageLayer")
|
|
2298
2541
|
@interface MasonImageLayer : CALayer
|
|
2299
2542
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
2300
|
-
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
2301
2543
|
- (nonnull instancetype)initWithLayer:(id _Nonnull)layer OBJC_DESIGNATED_INITIALIZER;
|
|
2544
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
2302
2545
|
- (void)drawInContext:(CGContextRef _Nonnull)context;
|
|
2546
|
+
- (void)layoutSublayers;
|
|
2303
2547
|
@end
|
|
2304
2548
|
|
|
2549
|
+
enum MasonInputType : int8_t;
|
|
2550
|
+
@class NSDate;
|
|
2551
|
+
SWIFT_CLASS_NAMED("MasonInput")
|
|
2552
|
+
@interface MasonInput : UIView
|
|
2553
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
2554
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
|
|
2555
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
2556
|
+
@property (nonatomic) BOOL multiple;
|
|
2557
|
+
@property (nonatomic, copy) NSString * _Nonnull accept;
|
|
2558
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
2559
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
2560
|
+
@property (nonatomic) enum MasonInputType type;
|
|
2561
|
+
@property (nonatomic) int32_t size;
|
|
2562
|
+
@property (nonatomic, copy) NSString * _Nonnull value;
|
|
2563
|
+
@property (nonatomic) double valueAsNumber;
|
|
2564
|
+
@property (nonatomic, copy) NSDate * _Nullable valueAsDate;
|
|
2565
|
+
@property (nonatomic, copy) NSString * _Nonnull placeholder;
|
|
2566
|
+
- (void)drawRect:(CGRect)rect;
|
|
2567
|
+
- (void)layoutSubviews;
|
|
2568
|
+
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
|
|
2569
|
+
@end
|
|
2570
|
+
|
|
2571
|
+
SWIFT_CLASS_NAMED("MasonInputEvent")
|
|
2572
|
+
@interface MasonInputEvent : MasonEvent
|
|
2573
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable data;
|
|
2574
|
+
@property (nonatomic, readonly, copy) NSString * _Nullable inputType;
|
|
2575
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type data:(NSString * _Nullable)inputData inputType:(NSString * _Nullable)masonInputType options:(MasonEventOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
|
|
2576
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options SWIFT_UNAVAILABLE;
|
|
2577
|
+
@end
|
|
2578
|
+
|
|
2579
|
+
typedef SWIFT_ENUM_NAMED(int8_t, MasonInputType, "MasonInputType", open) {
|
|
2580
|
+
MasonInputTypeText = 0,
|
|
2581
|
+
MasonInputTypeButton = 1,
|
|
2582
|
+
MasonInputTypeCheckbox = 2,
|
|
2583
|
+
MasonInputTypeEmail = 3,
|
|
2584
|
+
MasonInputTypePassword = 4,
|
|
2585
|
+
MasonInputTypeDate = 5,
|
|
2586
|
+
MasonInputTypeRadio = 6,
|
|
2587
|
+
MasonInputTypeNumber = 7,
|
|
2588
|
+
MasonInputTypeRange = 8,
|
|
2589
|
+
MasonInputTypeTel = 9,
|
|
2590
|
+
MasonInputTypeUrl = 10,
|
|
2591
|
+
MasonInputTypeColor = 11,
|
|
2592
|
+
MasonInputTypeFile = 12,
|
|
2593
|
+
MasonInputTypeSubmit = 13,
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2305
2596
|
SWIFT_CLASS_NAMED("MasonLayout")
|
|
2306
2597
|
@interface MasonLayout : NSObject
|
|
2307
2598
|
@property (nonatomic, readonly) NSInteger order;
|
|
@@ -2313,6 +2604,28 @@ SWIFT_CLASS_NAMED("MasonLayout")
|
|
|
2313
2604
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) MasonLayout * _Nonnull zero;)
|
|
2314
2605
|
+ (MasonLayout * _Nonnull)zero SWIFT_WARN_UNUSED_RESULT;
|
|
2315
2606
|
@property (nonatomic, readonly) BOOL hasChildren;
|
|
2607
|
+
@property (nonatomic, readonly) BOOL borderIsEmpty;
|
|
2608
|
+
@property (nonatomic, readonly) float borderTop;
|
|
2609
|
+
@property (nonatomic, readonly) float borderRight;
|
|
2610
|
+
@property (nonatomic, readonly) float borderBottom;
|
|
2611
|
+
@property (nonatomic, readonly) float borderLeft;
|
|
2612
|
+
@property (nonatomic, readonly) BOOL marginIsEmpty;
|
|
2613
|
+
@property (nonatomic, readonly) float marginTop;
|
|
2614
|
+
@property (nonatomic, readonly) float marginRight;
|
|
2615
|
+
@property (nonatomic, readonly) float marginBottom;
|
|
2616
|
+
@property (nonatomic, readonly) float marginLeft;
|
|
2617
|
+
@property (nonatomic, readonly) BOOL paddingIsEmpty;
|
|
2618
|
+
@property (nonatomic, readonly) float paddingTop;
|
|
2619
|
+
@property (nonatomic, readonly) float paddingRight;
|
|
2620
|
+
@property (nonatomic, readonly) float paddingBottom;
|
|
2621
|
+
@property (nonatomic, readonly) float paddingLeft;
|
|
2622
|
+
@property (nonatomic, readonly) BOOL sizeIsEmpty;
|
|
2623
|
+
@property (nonatomic, readonly) BOOL contentSizeIsEmpty;
|
|
2624
|
+
@property (nonatomic, readonly) float contentSizeWidth;
|
|
2625
|
+
@property (nonatomic, readonly) float contentSizeHeight;
|
|
2626
|
+
@property (nonatomic, readonly) BOOL scrollbarSizeIsEmpty;
|
|
2627
|
+
@property (nonatomic, readonly) float scrollbarSizeWidth;
|
|
2628
|
+
@property (nonatomic, readonly) float scrollbarSizeHeight;
|
|
2316
2629
|
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
|
|
2317
2630
|
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
2318
2631
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
@@ -2415,6 +2728,112 @@ SWIFT_CLASS_NAMED("MasonLengthPercentageSizeCompat")
|
|
|
2415
2728
|
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
2416
2729
|
@end
|
|
2417
2730
|
|
|
2731
|
+
SWIFT_CLASS_NAMED("MasonLi")
|
|
2732
|
+
@interface MasonLi : UIView <MasonElementObjc>
|
|
2733
|
+
- (void)requestLayout;
|
|
2734
|
+
- (void)drawRect:(CGRect)rect;
|
|
2735
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
|
|
2736
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
2737
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
2738
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
2739
|
+
@property (nonatomic) BOOL isOrdered;
|
|
2740
|
+
- (void)layoutSubviews;
|
|
2741
|
+
/// Reset view state for recycling
|
|
2742
|
+
- (void)resetForRecycle;
|
|
2743
|
+
/// Set marker value and position for this list item
|
|
2744
|
+
- (void)bindWithPosition:(NSInteger)position isOrdered:(BOOL)isOrdered;
|
|
2745
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
2746
|
+
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
|
|
2747
|
+
@end
|
|
2748
|
+
|
|
2749
|
+
@protocol MasonListDelegate;
|
|
2750
|
+
@class UICollectionView;
|
|
2751
|
+
@class NSIndexPath;
|
|
2752
|
+
@class UICollectionViewCell;
|
|
2753
|
+
SWIFT_CLASS_NAMED("MasonList")
|
|
2754
|
+
@interface MasonList : UIView <MasonElementObjc, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
|
2755
|
+
@property (nonatomic, strong) id <MasonListDelegate> _Nullable delegate;
|
|
2756
|
+
- (void)drawRect:(CGRect)rect;
|
|
2757
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nonnull node;
|
|
2758
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
2759
|
+
@property (nonatomic, readonly, strong) UIView * _Nonnull uiView;
|
|
2760
|
+
@property (nonatomic, readonly, strong) MasonStyle * _Nonnull style;
|
|
2761
|
+
@property (nonatomic, strong) NSMutableData * _Nonnull values;
|
|
2762
|
+
@property (nonatomic) NSInteger count;
|
|
2763
|
+
- (void)layoutSubviews;
|
|
2764
|
+
- (void)registerWithCellClass:(Class _Nullable)cellClass forCellWithReuseIdentifier:(NSString * _Nonnull)identifier;
|
|
2765
|
+
- (void)reload;
|
|
2766
|
+
@property (nonatomic) BOOL isOrdered;
|
|
2767
|
+
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
2768
|
+
- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT;
|
|
2769
|
+
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView * _Nonnull)collectionView SWIFT_WARN_UNUSED_RESULT;
|
|
2770
|
+
- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
|
2771
|
+
- (void)collectionView:(UICollectionView * _Nonnull)collectionView willDisplayCell:(UICollectionViewCell * _Nonnull)cell forItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
|
|
2772
|
+
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
|
|
2773
|
+
@end
|
|
2774
|
+
|
|
2775
|
+
SWIFT_PROTOCOL_NAMED("MasonListDelegate")
|
|
2776
|
+
@protocol MasonListDelegate
|
|
2777
|
+
- (UICollectionViewCell * _Nonnull)list:(UICollectionView * _Nonnull)list cellForItemAt:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT;
|
|
2778
|
+
- (void)list:(UICollectionView * _Nonnull)list willDisplay:(UICollectionViewCell * _Nonnull)cell forItemAt:(NSIndexPath * _Nonnull)indexPath;
|
|
2779
|
+
@end
|
|
2780
|
+
|
|
2781
|
+
@class MasonMouseEventOptions;
|
|
2782
|
+
SWIFT_CLASS_NAMED("MasonMouseEvent")
|
|
2783
|
+
@interface MasonMouseEvent : MasonEvent
|
|
2784
|
+
@property (nonatomic, readonly) NSInteger button;
|
|
2785
|
+
@property (nonatomic, readonly) NSInteger buttons;
|
|
2786
|
+
@property (nonatomic, readonly) float clientX;
|
|
2787
|
+
@property (nonatomic, readonly) float clientY;
|
|
2788
|
+
@property (nonatomic, readonly) BOOL ctrlKey;
|
|
2789
|
+
@property (nonatomic, readonly) BOOL shiftKey;
|
|
2790
|
+
@property (nonatomic, readonly) BOOL altKey;
|
|
2791
|
+
@property (nonatomic, readonly) BOOL metaKey;
|
|
2792
|
+
@property (nonatomic, readonly) NSInteger detail;
|
|
2793
|
+
@property (nonatomic, readonly) float screenX;
|
|
2794
|
+
@property (nonatomic, readonly) float screenY;
|
|
2795
|
+
@property (nonatomic, readonly) id _Nullable relatedTarget;
|
|
2796
|
+
@property (nonatomic, readonly) id _Nullable region;
|
|
2797
|
+
@property (nonatomic, readonly) NSInteger movementX;
|
|
2798
|
+
@property (nonatomic, readonly) NSInteger movementY;
|
|
2799
|
+
@property (nonatomic, readonly) float pageX;
|
|
2800
|
+
@property (nonatomic, readonly) float pageY;
|
|
2801
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)type options:(MasonMouseEventOptions * _Nullable)options OBJC_DESIGNATED_INITIALIZER;
|
|
2802
|
+
- (nonnull instancetype)initWithType:(NSString * _Nonnull)eventType bubbles:(BOOL)eventBubbles cancelable:(BOOL)eventCancelable options:(MasonEventOptions * _Nullable)options SWIFT_UNAVAILABLE;
|
|
2803
|
+
@end
|
|
2804
|
+
|
|
2805
|
+
SWIFT_CLASS_NAMED("MasonMouseEventOptions")
|
|
2806
|
+
@interface MasonMouseEventOptions : MasonEventOptions
|
|
2807
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
2808
|
+
- (nonnull instancetype)initWithIsComposing:(BOOL)isComposing OBJC_DESIGNATED_INITIALIZER;
|
|
2809
|
+
@end
|
|
2810
|
+
|
|
2811
|
+
enum MasonNodeType : int32_t;
|
|
2812
|
+
SWIFT_CLASS_NAMED("MasonNode")
|
|
2813
|
+
@interface MasonNode : NSObject
|
|
2814
|
+
@property (nonatomic, readonly, strong) NSCMason * _Nonnull mason;
|
|
2815
|
+
@property (nonatomic, copy) void (^ _Nullable onNodeAttached)(void);
|
|
2816
|
+
@property (nonatomic, copy) void (^ _Nullable onNodeDetached)(void);
|
|
2817
|
+
@property (nonatomic, readonly) void * _Nullable nativePtr;
|
|
2818
|
+
@property (nonatomic, readonly, strong) MasonLayout * _Nonnull computedLayout;
|
|
2819
|
+
@property (nonatomic, readonly, strong) MasonDocument * _Nullable document;
|
|
2820
|
+
- (MasonNode * _Nonnull)getRootNode SWIFT_WARN_UNUSED_RESULT;
|
|
2821
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nullable parent;
|
|
2822
|
+
@property (nonatomic, readonly, strong) MasonNode * _Nullable parentNode;
|
|
2823
|
+
@property (nonatomic, readonly) enum MasonNodeType type;
|
|
2824
|
+
- (NSArray<MasonNode *> * _Nonnull)getChildren SWIFT_WARN_UNUSED_RESULT;
|
|
2825
|
+
- (NSArray<MasonNode *> * _Nonnull)getLayoutChildren SWIFT_WARN_UNUSED_RESULT;
|
|
2826
|
+
@property (nonatomic) BOOL inBatch;
|
|
2827
|
+
- (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes OBJC_DESIGNATED_INITIALIZER;
|
|
2828
|
+
@property (nonatomic, readonly) BOOL isDirty;
|
|
2829
|
+
- (void)markDirty;
|
|
2830
|
+
- (UIView * _Nullable)getRoot SWIFT_WARN_UNUSED_RESULT;
|
|
2831
|
+
/// Helper to get default text attributes for new text nodes
|
|
2832
|
+
- (NSDictionary<NSAttributedStringKey, id> * _Nonnull)getDefaultAttributes SWIFT_WARN_UNUSED_RESULT;
|
|
2833
|
+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
|
|
2834
|
+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
|
|
2835
|
+
@end
|
|
2836
|
+
|
|
2418
2837
|
@interface MasonNode (SWIFT_EXTENSION(Mason))
|
|
2419
2838
|
- (void)setChildrenWithValue:(NSArray<MasonNode *> * _Nonnull)value;
|
|
2420
2839
|
- (void)appendChild:(MasonNode * _Nonnull)child;
|
|
@@ -2450,9 +2869,13 @@ enum MasonTextAlign : NSInteger;
|
|
|
2450
2869
|
SWIFT_CLASS_NAMED("MasonStyle")
|
|
2451
2870
|
@interface MasonStyle : NSObject
|
|
2452
2871
|
@property (nonatomic, readonly, strong) NSCFontFace * _Null_unspecified font;
|
|
2453
|
-
|
|
2872
|
+
- (void)prepareMut;
|
|
2873
|
+
@property (nonatomic, readonly, strong) NSMutableData * _Nonnull values;
|
|
2454
2874
|
@property (nonatomic, strong) NSMutableData * _Nonnull textValues;
|
|
2455
2875
|
- (nonnull instancetype)initWithNode:(MasonNode * _Nonnull)node OBJC_DESIGNATED_INITIALIZER;
|
|
2876
|
+
@property (nonatomic) enum MasonListStylePosition listStylePosition;
|
|
2877
|
+
@property (nonatomic) enum MasonListStyleType listStyleType;
|
|
2878
|
+
@property (nonatomic) int32_t zIndex;
|
|
2456
2879
|
@property (nonatomic, strong) MasonVerticalAlignValue * _Nonnull verticalAlign;
|
|
2457
2880
|
@property (nonatomic) enum MasonObjectFit objectFit;
|
|
2458
2881
|
@property (nonatomic, getter=float, setter=setFloat:) enum MasonFloat float_;
|
|
@@ -2630,6 +3053,22 @@ SWIFT_CLASS("_TtC5Mason14MasonTextLayer")
|
|
|
2630
3053
|
- (void)drawInContext:(CGContextRef _Nonnull)context;
|
|
2631
3054
|
@end
|
|
2632
3055
|
|
|
3056
|
+
SWIFT_CLASS_NAMED("MasonTextNode")
|
|
3057
|
+
@interface MasonTextNode : MasonNode <MasonCharacterData>
|
|
3058
|
+
@property (nonatomic, copy) NSString * _Nonnull data;
|
|
3059
|
+
- (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc data:(NSString * _Nonnull)text attributes:(NSDictionary<NSAttributedStringKey, id> * _Nullable)attrs OBJC_DESIGNATED_INITIALIZER;
|
|
3060
|
+
- (void)appendChild:(MasonNode * _Nonnull)child;
|
|
3061
|
+
@property (nonatomic, readonly) NSInteger length;
|
|
3062
|
+
- (NSString * _Nonnull)substringDataWithOffset:(NSInteger)offset count:(NSInteger)count SWIFT_WARN_UNUSED_RESULT;
|
|
3063
|
+
- (nonnull instancetype)appendData:(NSString * _Nonnull)s;
|
|
3064
|
+
- (nonnull instancetype)insertData:(NSString * _Nonnull)s at:(NSInteger)offset;
|
|
3065
|
+
- (nonnull instancetype)deleteDataWithOffset:(NSInteger)offset count:(NSInteger)count;
|
|
3066
|
+
- (nonnull instancetype)replaceDataWithOffset:(NSInteger)offset count:(NSInteger)count with:(NSString * _Nonnull)s;
|
|
3067
|
+
- (nonnull instancetype)deleteDataWithRange:(NSRange)range;
|
|
3068
|
+
- (nonnull instancetype)replaceDataWithRange:(NSRange)range with:(NSString * _Nonnull)s;
|
|
3069
|
+
- (nonnull instancetype)initWithMason:(NSCMason * _Nonnull)doc children:(NSArray<MasonNode *> * _Nonnull)nodes SWIFT_UNAVAILABLE;
|
|
3070
|
+
@end
|
|
3071
|
+
|
|
2633
3072
|
@class NSAttributedString;
|
|
2634
3073
|
@interface MasonTextNode (SWIFT_EXTENSION(Mason))
|
|
2635
3074
|
/// Get attributed string representation of this text node
|
|
@@ -2651,6 +3090,10 @@ typedef SWIFT_ENUM_NAMED(NSInteger, MasonTextType, "MasonTextType", open) {
|
|
|
2651
3090
|
MasonTextTypeBlockquote = 11,
|
|
2652
3091
|
MasonTextTypeB = 12,
|
|
2653
3092
|
MasonTextTypePre = 13,
|
|
3093
|
+
MasonTextTypeStrong = 14,
|
|
3094
|
+
MasonTextTypeEm = 15,
|
|
3095
|
+
MasonTextTypeI = 16,
|
|
3096
|
+
MasonTextTypeA = 17,
|
|
2654
3097
|
};
|
|
2655
3098
|
|
|
2656
3099
|
SWIFT_CLASS_NAMED("MasonUIView")
|
|
@@ -2762,7 +3205,7 @@ SWIFT_CLASS_NAMED("MasonUIView")
|
|
|
2762
3205
|
- (MasonDimensionCompat * _Nonnull)getMaxSizeWidth SWIFT_WARN_UNUSED_RESULT;
|
|
2763
3206
|
- (MasonDimensionCompat * _Nonnull)getMaxSizeHeight SWIFT_WARN_UNUSED_RESULT;
|
|
2764
3207
|
- (void)setGap:(float)width :(float)height;
|
|
2765
|
-
- (void)setGapWithWidthHeightType:(float)width :(
|
|
3208
|
+
- (void)setGapWithWidthHeightType:(float)width :(int8_t)width_type :(float)height :(int8_t)height_type;
|
|
2766
3209
|
- (MasonLengthPercentageSizeCompat * _Nonnull)getGap SWIFT_WARN_UNUSED_RESULT;
|
|
2767
3210
|
- (void)setRowGap:(float)row :(NSInteger)type;
|
|
2768
3211
|
- (void)setColumnGap:(float)column :(NSInteger)type;
|
|
@@ -2896,6 +3339,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSCFontFaceS
|
|
|
2896
3339
|
@property (nonatomic, copy) void (^ _Nullable onStatus)(enum NSCFontFaceSetStatus);
|
|
2897
3340
|
- (NSEnumerator * _Nonnull)iter SWIFT_WARN_UNUSED_RESULT;
|
|
2898
3341
|
- (NSArray * _Nonnull)array SWIFT_WARN_UNUSED_RESULT;
|
|
3342
|
+
- (NSCFontFace * _Nonnull)get:(NSString * _Nonnull)fontFamily SWIFT_WARN_UNUSED_RESULT;
|
|
3343
|
+
- (NSCFontFace * _Nullable)getOrNil:(NSString * _Nonnull)fontFamily SWIFT_WARN_UNUSED_RESULT;
|
|
2899
3344
|
- (void)add:(NSCFontFace * _Nonnull)font;
|
|
2900
3345
|
- (void)clear;
|
|
2901
3346
|
- (void)delete:(NSCFontFace * _Nonnull)font;
|
|
@@ -2929,6 +3374,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontWeight, "NSCFontWeight", open) {
|
|
|
2929
3374
|
NSCFontWeightBlack = 8,
|
|
2930
3375
|
};
|
|
2931
3376
|
|
|
3377
|
+
@class NSUUID;
|
|
2932
3378
|
@class MasonScroll;
|
|
2933
3379
|
SWIFT_CLASS_NAMED("NSCMason")
|
|
2934
3380
|
@interface NSCMason : NSObject
|
|
@@ -2941,7 +3387,12 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) NSCMason * _Nonnull sh
|
|
|
2941
3387
|
- (MasonNode * _Nonnull)nodeForView:(UIView * _Nonnull)view :(BOOL)isLeaf SWIFT_WARN_UNUSED_RESULT;
|
|
2942
3388
|
- (void)configureStyleForView:(UIView * _Nonnull)view :(SWIFT_NOESCAPE void (^ _Nonnull)(MasonStyle * _Nonnull))block;
|
|
2943
3389
|
- (MasonStyle * _Nonnull)styleForView:(UIView * _Nonnull)view SWIFT_WARN_UNUSED_RESULT;
|
|
3390
|
+
- (MasonStyle * _Nullable)styleForViewOrNode:(id _Nullable)viewOrNode SWIFT_WARN_UNUSED_RESULT;
|
|
2944
3391
|
- (MasonLayout * _Nonnull)layoutForView:(UIView * _Nonnull)view;
|
|
3392
|
+
- (NSUUID * _Nonnull)addEventListener:(MasonNode * _Nonnull)node :(NSString * _Nonnull)event :(void (^ _Nonnull)(MasonEvent * _Nonnull))listener;
|
|
3393
|
+
- (BOOL)removeEventListener:(MasonNode * _Nonnull)node :(NSString * _Nonnull)event id:(NSUUID * _Nonnull)id;
|
|
3394
|
+
- (BOOL)removeEventListener:(MasonNode * _Nonnull)node :(NSString * _Nonnull)event;
|
|
3395
|
+
- (void)dispatch:(MasonEvent * _Nonnull)event :(MasonNode * _Nonnull)node;
|
|
2945
3396
|
- (void)clear;
|
|
2946
3397
|
- (MasonDocument * _Nonnull)createDocument SWIFT_WARN_UNUSED_RESULT;
|
|
2947
3398
|
- (MasonUIView * _Nonnull)createView SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -2953,12 +3404,21 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) NSCMason * _Nonnull sh
|
|
|
2953
3404
|
- (MasonButton * _Nonnull)createButton SWIFT_WARN_UNUSED_RESULT;
|
|
2954
3405
|
- (MasonNode * _Nonnull)createNode SWIFT_WARN_UNUSED_RESULT;
|
|
2955
3406
|
- (MasonBr * _Nonnull)createBr SWIFT_WARN_UNUSED_RESULT;
|
|
3407
|
+
- (MasonInput * _Nonnull)createInput:(enum MasonInputType)type SWIFT_WARN_UNUSED_RESULT;
|
|
2956
3408
|
- (void)printTree:(MasonNode * _Nonnull)node;
|
|
2957
3409
|
- (MasonNode * _Nonnull)createTextNode SWIFT_WARN_UNUSED_RESULT;
|
|
2958
3410
|
- (MasonNode * _Nonnull)createImageNode SWIFT_WARN_UNUSED_RESULT;
|
|
3411
|
+
- (MasonNode * _Nonnull)createLineBreakNode SWIFT_WARN_UNUSED_RESULT;
|
|
3412
|
+
- (MasonList * _Nonnull)createListViewWithIsOrdered:(BOOL)isOrdered SWIFT_WARN_UNUSED_RESULT;
|
|
3413
|
+
- (MasonNode * _Nonnull)createListItemNode SWIFT_WARN_UNUSED_RESULT;
|
|
3414
|
+
- (MasonLi * _Nonnull)createListItem SWIFT_WARN_UNUSED_RESULT;
|
|
2959
3415
|
@end
|
|
2960
3416
|
|
|
2961
3417
|
@interface NSObject (SWIFT_EXTENSION(Mason))
|
|
3418
|
+
- (NSUUID * _Nonnull)mason_addEventListener:(NSString * _Nonnull)event :(void (^ _Nonnull)(MasonEvent * _Nonnull))listener;
|
|
3419
|
+
- (BOOL)mason_removeEventListener:(NSString * _Nonnull)event id:(NSUUID * _Nonnull)id;
|
|
3420
|
+
- (BOOL)mason_removeEventListener:(NSString * _Nonnull)event;
|
|
3421
|
+
- (void)mason_dispatch:(MasonEvent * _Nonnull)event;
|
|
2962
3422
|
- (void)mason_syncStyle:(NSString * _Nonnull)state :(NSString * _Nonnull)textState;
|
|
2963
3423
|
- (void)mason_addView:(UIView * _Nonnull)view;
|
|
2964
3424
|
- (void)mason_addView:(UIView * _Nonnull)view at:(NSInteger)at;
|