chore: change fabric flag (#1979)

Changed `RN_FABRIC_ENABLED` to `RCT_NEW_ARCH_ENABLED` since it is the current standard for this flag.
This commit is contained in:
Wojciech Lewicki
2023-01-31 16:15:59 +01:00
committed by GitHub
parent f2f533a292
commit 175a48f8c9
32 changed files with 165 additions and 167 deletions

View File

@@ -951,7 +951,7 @@ SPEC CHECKSUMS:
React-rncore: cfeb5532ec459f562410e8058b8f49e07cd215d4
React-runtimeexecutor: ac80782d9d76ba2b0f709f4de0c427fe33c352dc
ReactCommon: 20e38a9be5fe1341b5e422220877cc94034776ba
RNSVG: f49e247b4ea8b56c27ac52aa92259361b202ba7e
RNSVG: 27a7d7438182ca3323de0c57695e3bdaf1aa5eb4
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
Yoga: c618b544ff8bd8865cdca602f00cbcdb92fd6d31
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

View File

@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
}
s.platforms = { ios: '11.0', tvos: '11.0' }
s.compiler_flags = folly_compiler_flags + ' -DRN_FABRIC_ENABLED'
s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
s.source_files = 'apple/**/*.{h,m,mm,cpp}'
s.ios.exclude_files = '**/*.macos.{h,m,mm,cpp}'
s.tvos.exclude_files = '**/*.macos.{h,m,mm,cpp}'

View File

@@ -8,17 +8,17 @@
#import "RNSVGClipPath.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGClipPath
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -48,7 +48,7 @@ using namespace facebook::react;
{
[super prepareForRecycle];
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)parseReference
{
@@ -70,9 +70,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGClipPathCls(void)
{
return RNSVGClipPath.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -7,17 +7,17 @@
*/
#import "RNSVGDefs.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGDefs
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -35,7 +35,7 @@ using namespace facebook::react;
{
return concreteComponentDescriptorProvider<RNSVGDefsComponentDescriptor>();
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)renderTo:(CGContextRef)context
{
@@ -60,9 +60,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGDefsCls(void)
{
return RNSVGDefs.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -10,17 +10,17 @@
#import "RNSVGMask.h"
#import "RNSVGNode.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGForeignObject
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -68,7 +68,7 @@ using namespace facebook::react;
_foreignObjectheight = nil;
_foreignObjectwidth = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
return nil;
@@ -211,9 +211,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGForeignObjectCls(void)
{
return RNSVGForeignObject.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -10,19 +10,19 @@
#import "RNSVGClipPath.h"
#import "RNSVGMask.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGGroup {
RNSVGGlyphContext *_glyphContext;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -55,7 +55,7 @@ using namespace facebook::react;
_font = nil;
_glyphContext = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setFont:(NSDictionary *)font
{
@@ -293,9 +293,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGGroupCls(void)
{
return RNSVGGroup.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -15,12 +15,12 @@
#import <React/RCTImageSource.h>
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTImageResponseDelegate.h>
#endif
@interface RNSVGImage : RNSVGRenderable
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
<RCTImageResponseDelegate>
#endif

View File

@@ -20,13 +20,13 @@
#import <React/RCTImageURLLoader.h>
#import <React/RCTImageView.h>
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
#import <React/RCTBridge.h>
#import <React/RCTLog.h>
#import "RNSVGViewBox.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <React/RCTImageResponseObserverProxy.h>
@@ -38,19 +38,19 @@
#import "RNSVGFabricConversions.h"
using namespace facebook::react;
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGImage {
CGImageRef _image;
CGSize _imageSize;
RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
RNSVGImageShadowNode::ConcreteState::Shared _state;
RCTImageResponseObserverProxy _imageResponseObserverProxy;
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
- (instancetype)initWithFrame:(CGRect)frame
{
@@ -58,9 +58,7 @@ using namespace facebook::react;
static const auto defaultProps = std::make_shared<const RNSVGImageProps>();
_props = defaultProps;
#ifdef RN_FABRIC_ENABLED
_imageResponseObserverProxy = RCTImageResponseObserverProxy(self);
#endif
}
return self;
}
@@ -168,11 +166,11 @@ using namespace facebook::react;
_imageSize = CGSizeZero;
_reloadImageCancellationBlock = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setSrc:(RCTImageSource *)src
{
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#else
if (src == _src) {
return;
@@ -201,7 +199,7 @@ using namespace facebook::react;
[self invalidate];
});
}];
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
}
- (void)setX:(RNSVGLength *)x
@@ -337,9 +335,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGImageCls(void)
{
return RNSVGImage.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -9,17 +9,17 @@
#import "RNSVGBrushType.h"
#import "RNSVGPainter.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGLinearGradient
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -79,7 +79,7 @@ using namespace facebook::react;
_gradientUnits = kRNSVGUnitsObjectBoundingBox;
_gradientTransform = CGAffineTransformIdentity;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (instancetype)init
{
@@ -177,9 +177,9 @@ using namespace facebook::react;
}
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGLinearGradientCls(void)
{
return RNSVGLinearGradient.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -11,17 +11,17 @@
#import "RNSVGPainter.h"
#import "RNSVGViewBox.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGMarker
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -79,7 +79,7 @@ using namespace facebook::react;
_align = nil;
_meetOrSlice = kRNSVGVBMOSMeet;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
@@ -271,9 +271,9 @@ double deg2rad(CGFloat deg)
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGMarkerCls(void)
{
return RNSVGMarker.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -10,17 +10,17 @@
#import "RNSVGNode.h"
#import "RNSVGPainter.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGMask
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -68,7 +68,7 @@ using namespace facebook::react;
_maskUnits = kRNSVGUnitsObjectBoundingBox;
_maskContentUnits = kRNSVGUnitsObjectBoundingBox;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
@@ -143,9 +143,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGMaskCls(void)
{
return RNSVGMask.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -8,19 +8,19 @@
#import "RNSVGPath.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGPath {
CGPathRef _path;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -57,7 +57,7 @@ using namespace facebook::react;
_path = nil;
_d = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setD:(RNSVGPathParser *)d
{
@@ -83,9 +83,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGPathCls(void)
{
return RNSVGPath.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -10,17 +10,17 @@
#import "RNSVGNode.h"
#import "RNSVGPainter.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGPattern
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -92,7 +92,7 @@ using namespace facebook::react;
_align = nil;
_meetOrSlice = kRNSVGVBMOSMeet;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (instancetype)init
{
@@ -252,9 +252,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGPatternCls(void)
{
return RNSVGPattern.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -7,17 +7,17 @@
*/
#import "RNSVGRadialGradient.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGRadialGradient
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -81,7 +81,7 @@ using namespace facebook::react;
_gradientUnits = kRNSVGUnitsObjectBoundingBox;
_gradientTransform = CGAffineTransformIdentity;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (instancetype)init
{
if (self = [super init]) {
@@ -199,9 +199,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGRadialGradientCls(void)
{
return RNSVGRadialGradient.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -12,18 +12,18 @@
#import "RNSVGPainter.h"
#import "RNSVGVBMOS.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTViewComponentView.h>
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@class RNSVGNode;
@interface RNSVGSvgView :
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
RCTViewComponentView <RNSVGContainer>
#else
RNSVGView <RNSVGContainer>
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@property (nonatomic, strong) RNSVGLength *bbWidth;
@property (nonatomic, strong) RNSVGLength *bbHeight;

View File

@@ -11,13 +11,13 @@
#import "RNSVGNode.h"
#import "RNSVGViewBox.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGSvgView {
NSMutableDictionary<NSString *, RNSVGNode *> *_clipPaths;
@@ -29,9 +29,9 @@
bool rendered;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (instancetype)initWithFrame:(CGRect)frame
{
@@ -42,17 +42,17 @@ using namespace facebook::react;
self.contentMode = UIViewContentModeRedraw;
#endif // TARGET_OS_OSX
rendered = false;
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
static const auto defaultProps = std::make_shared<const RNSVGSvgViewProps>();
_props = defaultProps;
// TODO: think if we can do it better
self.opaque = NO;
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
}
return self;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#pragma mark - RCTComponentViewProtocol
+ (ComponentDescriptorProvider)componentDescriptorProvider
@@ -108,7 +108,7 @@ using namespace facebook::react;
_invviewBoxTransform = CGAffineTransformIdentity;
rendered = NO;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)insertReactSubview:(RNSVGView *)subview atIndex:(NSInteger)atIndex
{
@@ -427,9 +427,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGSvgViewCls(void)
{
return RNSVGSvgView.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -8,17 +8,17 @@
#import "RNSVGSymbol.h"
#import "RNSVGViewBox.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGSymbol
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -63,7 +63,7 @@ using namespace facebook::react;
_align = nil;
_meetOrSlice = kRNSVGVBMOSMeet;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setMinX:(CGFloat)minX
{
@@ -148,9 +148,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGSymbolCls(void)
{
return RNSVGSymbol.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -9,17 +9,17 @@
#import <React/RCTLog.h>
#import "RNSVGSymbol.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGUse
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -65,7 +65,7 @@ using namespace facebook::react;
_usewidth = nil;
_href = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setHref:(NSString *)href
{
@@ -204,9 +204,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGUseCls(void)
{
return RNSVGUse.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -12,9 +12,9 @@
#import <React/RCTPointerEvents.h>
#import <React/UIView+React.h>
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTViewComponentView.h>
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@class RNSVGGroup;
@@ -24,11 +24,11 @@
*/
@interface RNSVGNode :
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
RCTViewComponentView
#else
RNSVGView
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
/*
N[1/Sqrt[2], 36]
The inverse of the square root of 2.

View File

@@ -590,7 +590,7 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
CGPathRelease(_path);
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
- (void)prepareForRecycle
{
[super prepareForRecycle];
@@ -652,6 +652,6 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
CGPathRelease(_path);
_path = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@end

View File

@@ -185,7 +185,7 @@ static RNSVGRenderable *_contextElement;
_strokeDashArrayData = nil;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
- (void)prepareForRecycle
{
[super prepareForRecycle];
@@ -220,7 +220,7 @@ static RNSVGRenderable *_contextElement;
_vectorEffect = kRNSVGVectorEffectDefault;
_propList = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
UInt32 saturate(CGFloat value)
{

View File

@@ -6,14 +6,14 @@
* LICENSE file in the root directory of this source tree.
*/
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <rnsvg/rnsvg.h>
#else
#import <React/RCTBridge.h>
#endif
@interface RNSVGRenderableModule : NSObject
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
<NativeSvgRenderableModuleSpec>
#else
<RCTBridgeModule>

View File

@@ -20,9 +20,9 @@
RCT_EXPORT_MODULE()
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@synthesize bridge = _bridge;
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isPointInFill : (nonnull NSNumber *)reactTag options : (NSDictionary *)options)
@@ -196,7 +196,7 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getScreenCTM : (nonnull NSNumber *)reactT
- (RNSVGPlatformView *)getRenderableView:(NSNumber *)reactTag
{
__block RNSVGPlatformView *view;
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
dispatch_sync(dispatch_get_main_queue(), ^{
view = [self.viewRegistry_DEPRECATED viewForReactTag:reactTag];
});
@@ -204,11 +204,11 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getScreenCTM : (nonnull NSNumber *)reactT
dispatch_sync(dispatch_get_main_queue(), ^{
view = [self.bridge.uiManager viewForReactTag:reactTag];
});
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
return view;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
(const facebook::react::ObjCTurboModule::InitParams &)params
{

View File

@@ -6,14 +6,14 @@
* LICENSE file in the root directory of this source tree.
*/
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <rnsvg/rnsvg.h>
#else
#import <React/RCTBridge.h>
#endif
@interface RNSVGSvgViewModule : NSObject
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
<NativeSvgViewModuleSpec>
#else
<RCTBridgeModule>

View File

@@ -16,9 +16,9 @@
RCT_EXPORT_MODULE()
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@synthesize bridge = _bridge;
- (void)toDataURL:(nonnull NSNumber *)reactTag
@@ -27,14 +27,14 @@ RCT_EXPORT_MODULE()
attempt:(int)attempt
{
void (^block)(void) = ^{
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
[self.viewRegistry_DEPRECATED addUIBlock:^(RCTViewRegistry *viewRegistry) {
__kindof RNSVGPlatformView *view = [viewRegistry viewForReactTag:reactTag];
#else
[self.bridge.uiManager
addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RNSVGPlatformView *> *viewRegistry) {
__kindof RNSVGPlatformView *view = [uiManager viewForReactTag:reactTag];
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
NSString *b64;
if ([view isKindOfClass:[RNSVGSvgView class]]) {
RNSVGSvgView *svg = view;
@@ -83,7 +83,7 @@ RCT_EXPORT_METHOD(toDataURL
[self toDataURL:reactTag options:options callback:callback attempt:0];
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
(const facebook::react::ObjCTurboModule::InitParams &)params
{

View File

@@ -9,17 +9,17 @@
#import "RNSVGCircle.h"
#import <React/RCTLog.h>
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGCircle
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -57,7 +57,7 @@ using namespace facebook::react;
_cy = nil;
_r = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setCx:(RNSVGLength *)cx
{
@@ -98,9 +98,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGCircleCls(void)
{
return RNSVGCircle.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -9,17 +9,17 @@
#import "RNSVGEllipse.h"
#import <React/RCTLog.h>
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGEllipse
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -59,7 +59,7 @@ using namespace facebook::react;
_rx = nil;
_ry = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setCx:(RNSVGLength *)cx
{
@@ -110,9 +110,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGEllipseCls(void)
{
return RNSVGEllipse.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -9,17 +9,17 @@
#import "RNSVGLine.h"
#import <React/RCTLog.h>
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGLine
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -59,7 +59,7 @@ using namespace facebook::react;
_x2 = nil;
_y2 = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setX1:(RNSVGLength *)x1
{
@@ -112,9 +112,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGLineCls(void)
{
return RNSVGLine.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -9,17 +9,17 @@
#import "RNSVGRect.h"
#import <React/RCTLog.h>
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGRect
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -69,7 +69,7 @@ using namespace facebook::react;
_ry = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setX:(RNSVGLength *)x
{
@@ -165,9 +165,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGRectCls(void)
{
return RNSVGRect.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -17,13 +17,13 @@
static NSCharacterSet *RNSVGTSpan_separators = nil;
static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGTSpan {
CGFloat startOffset;
@@ -37,7 +37,7 @@ static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
RNSVGPathMeasure *measure;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -88,7 +88,7 @@ using namespace facebook::react;
measure = [[RNSVGPathMeasure alloc] init];
RNSVGTSpan_separators = [NSCharacterSet whitespaceCharacterSet];
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (id)init
{
@@ -1117,9 +1117,9 @@ RNSVGTopAlignedLabel *label;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGTSpanCls(void)
{
return RNSVGTSpan.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -13,13 +13,13 @@
#import "RNSVGTextPath.h"
#import "RNSVGTextProperties.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGText {
RNSVGGlyphContext *_glyphContext;
@@ -28,7 +28,7 @@
CGFloat cachedAdvance;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -75,7 +75,7 @@ using namespace facebook::react;
_baselineShift = nil;
cachedAdvance = 0;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)invalidate
{
@@ -357,9 +357,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGTextCls(void)
{
return RNSVGText.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED

View File

@@ -8,17 +8,17 @@
#import "RNSVGTextPath.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGTextPath
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -63,7 +63,7 @@ using namespace facebook::react;
_spacing = nil;
_startOffset = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setHref:(NSString *)href
{
@@ -141,9 +141,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGTextPathCls(void)
{
return RNSVGTextPath.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED