Compare commits

...

25 Commits

Author SHA1 Message Date
Nick 90a90a1271 new build 2025-01-07 16:19:55 +01:00
Nick 299743212e new build 2024-12-20 11:16:29 +01:00
Nick d8ccbe67a6 new version 2024-11-20 15:28:34 +01:00
Nick b644adc7f8 new build 2024-10-29 08:36:43 +01:00
Nick 2e55203b31 new build 2024-10-18 14:26:49 +02:00
James Kurtz d58c2b66cb Update README.md
Minor wording update
2024-10-16 13:33:55 +00:00
naquilini 444b5b9e07 Update NewsmemorySDK.podspec 2024-09-16 10:26:51 +00:00
naquilini 2d42b8125f new build 2024-09-16 12:21:34 +02:00
naquilini 7e53fd50a5 new build 2024-09-05 18:05:45 +02:00
Nick 9fa7c72ccb new build 2024-08-27 18:08:39 +02:00
Nick Aquilini 1e0d9fe12e new build 2024-07-30 10:03:58 +02:00
Nick 2f2bb866e6 new build 2024-06-13 12:33:57 +02:00
Nick f7fa526909 new build 2024-05-17 13:01:11 +02:00
Nick 2c42617f50 new build 2024-05-02 17:08:24 +02:00
Nick 1161c2a82f new build 2024-05-02 16:42:55 +02:00
Nick f12d6a98f0 new build 2024-05-02 16:28:51 +02:00
Nick 9f302f39d8 new build 2024-04-25 12:28:00 +02:00
Nick 658f1cf905 new build 2024-04-17 18:38:58 +02:00
Nick 722911e7b3 new build 2024-04-17 17:12:48 +02:00
Nick c13e775cc4 new build 2024-04-17 16:27:34 +02:00
Nick f67afe01d4 new build 2024-03-27 17:00:52 +01:00
naquilini 85ee00f526 Update README.md 2024-03-12 15:58:06 +00:00
naquilini 3f400079c1 Update README.md 2024-03-12 15:33:56 +00:00
Nick 9155419cb0 new version 3.11.01 2024-03-12 16:24:12 +01:00
naquilini 9f0cc16693 Update README.md 2024-03-06 15:46:28 +00:00
1477 changed files with 27467 additions and 402511 deletions

View File

@ -4,6 +4,22 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libDoubleConversion.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libDoubleConversion.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libDoubleConversion.a</string> <string>libDoubleConversion.a</string>
@ -23,22 +39,6 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libDoubleConversion.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libDoubleConversion.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -4,6 +4,22 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libDynamicFonts.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libDynamicFonts.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libDynamicFonts.a</string> <string>libDynamicFonts.a</string>
@ -23,22 +39,6 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libDynamicFonts.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libDynamicFonts.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)newsmemoryWillOpenURL:(NSString *)url; - (BOOL)newsmemoryWillOpenURL:(NSString *)url;
- (void)onNewsmemoryTrackAction:(NSDictionary *)data; - (void)onNewsmemoryTrackAction:(NSDictionary *)data;
- (void)onNewsmemoryReload; - (void)onNewsmemoryReload;
- (BOOL)onNewsmemoryTokenExpired;
@end @end
/// The RN library API /// The RN library API
@ -28,6 +29,9 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)setNeedsCloseButton:(BOOL)need; + (void)setNeedsCloseButton:(BOOL)need;
+ (void)setNeedsSafeArea:(BOOL)need; + (void)setNeedsSafeArea:(BOOL)need;
+ (void)setAPIKey:(NSString *)key; + (void)setAPIKey:(NSString *)key;
+ (void)setLockedOrientation:(NSString *)orientation;
+ (void)setLockedOrientationDevice:(NSString *)device;
+ (void)enableDebugger:(BOOL)enabled;
- (instancetype)init; - (instancetype)init;
- (RCTRootView *)getView; - (RCTRootView *)getView;

View File

@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)newsmemoryWillOpenURL:(NSString *)url; - (BOOL)newsmemoryWillOpenURL:(NSString *)url;
- (void)onNewsmemoryTrackAction:(NSDictionary *)data; - (void)onNewsmemoryTrackAction:(NSDictionary *)data;
- (void)onNewsmemoryReload; - (void)onNewsmemoryReload;
- (BOOL)onNewsmemoryTokenExpired;
@end @end
/// The RN library API /// The RN library API
@ -28,6 +29,9 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)setNeedsCloseButton:(BOOL)need; + (void)setNeedsCloseButton:(BOOL)need;
+ (void)setNeedsSafeArea:(BOOL)need; + (void)setNeedsSafeArea:(BOOL)need;
+ (void)setAPIKey:(NSString *)key; + (void)setAPIKey:(NSString *)key;
+ (void)setLockedOrientation:(NSString *)orientation;
+ (void)setLockedOrientationDevice:(NSString *)device;
+ (void)enableDebugger:(BOOL)enabled;
- (instancetype)init; - (instancetype)init;
- (RCTRootView *)getView; - (RCTRootView *)getView;

View File

@ -4,6 +4,20 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libRCT-Folly.a</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRCT-Folly.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libRCT-Folly.a</string> <string>libRCT-Folly.a</string>
@ -21,20 +35,6 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libRCT-Folly.a</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRCT-Folly.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -0,0 +1,18 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "RCTTypeSafety/RCTConvertHelpers.h"
#import "RCTTypeSafety/RCTTypedModuleConstants.h"
FOUNDATION_EXPORT double RCTTypeSafetyVersionNumber;
FOUNDATION_EXPORT const unsigned char RCTTypeSafetyVersionString[];

View File

@ -0,0 +1,6 @@
module RCTTypeSafety {
umbrella header "RCTTypeSafety-umbrella.h"
export *
module * { export * }
}

View File

@ -1,16 +1,17 @@
/* /*
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Meta Platforms, Inc. and affiliates.
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
#import <optional>
#import <vector> #import <vector>
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <FBLazyVector/FBLazyVector.h> #import <FBLazyVector/FBLazyVector.h>
#import <folly/Optional.h>
namespace facebook { namespace facebook {
namespace react { namespace react {
@ -35,22 +36,22 @@ NSArray *RCTConvertVecToArray(const ContainerT &vec)
} }
template<typename ContainerT> template<typename ContainerT>
NSArray *RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec, id (^convertor)(typename ContainerT::value_type element)) NSArray *RCTConvertOptionalVecToArray(const std::optional<ContainerT> &vec, id (^convertor)(typename ContainerT::value_type element))
{ {
return vec.hasValue() ? RCTConvertVecToArray(vec.value(), convertor) : nil; return vec.has_value() ? RCTConvertVecToArray(vec.value(), convertor) : nil;
} }
template<typename ContainerT> template<typename ContainerT>
NSArray *RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec) NSArray *RCTConvertOptionalVecToArray(const std::optional<ContainerT> &vec)
{ {
return vec.hasValue() ? RCTConvertVecToArray(vec.value(), ^id(typename ContainerT::value_type element) { return element; }) : nil; return vec.has_value() ? RCTConvertVecToArray(vec.value(), ^id(typename ContainerT::value_type element) { return element; }) : nil;
} }
bool RCTBridgingToBool(id value); bool RCTBridgingToBool(id value);
folly::Optional<bool> RCTBridgingToOptionalBool(id value); std::optional<bool> RCTBridgingToOptionalBool(id value);
NSString *RCTBridgingToString(id value); NSString *RCTBridgingToString(id value);
NSString *RCTBridgingToOptionalString(id value); NSString *RCTBridgingToOptionalString(id value);
folly::Optional<double> RCTBridgingToOptionalDouble(id value); std::optional<double> RCTBridgingToOptionalDouble(id value);
double RCTBridgingToDouble(id value); double RCTBridgingToDouble(id value);
NSArray *RCTBridgingToArray(id value); NSArray *RCTBridgingToArray(id value);
@ -64,10 +65,10 @@ facebook::react::LazyVector<T> RCTBridgingToVec(id value, T (^ctor)(id element))
} }
template<typename T> template<typename T>
folly::Optional<facebook::react::LazyVector<T>> RCTBridgingToOptionalVec(id value, T (^ctor)(id element)) std::optional<facebook::react::LazyVector<T>> RCTBridgingToOptionalVec(id value, T (^ctor)(id element))
{ {
if (value == nil || value == (id)kCFNull) { if (value == nil || value == (id)kCFNull) {
return folly::none; return std::nullopt;
} else { } else {
return RCTBridgingToVec(value, ctor); return RCTBridgingToVec(value, ctor);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Meta Platforms, Inc. and affiliates.
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.

View File

@ -0,0 +1,18 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "RCTTypeSafety/RCTConvertHelpers.h"
#import "RCTTypeSafety/RCTTypedModuleConstants.h"
FOUNDATION_EXPORT double RCTTypeSafetyVersionNumber;
FOUNDATION_EXPORT const unsigned char RCTTypeSafetyVersionString[];

View File

@ -0,0 +1,6 @@
module RCTTypeSafety {
umbrella header "RCTTypeSafety-umbrella.h"
export *
module * { export * }
}

View File

@ -1,16 +1,17 @@
/* /*
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Meta Platforms, Inc. and affiliates.
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
#import <optional>
#import <vector> #import <vector>
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <FBLazyVector/FBLazyVector.h> #import <FBLazyVector/FBLazyVector.h>
#import <folly/Optional.h>
namespace facebook { namespace facebook {
namespace react { namespace react {
@ -35,22 +36,22 @@ NSArray *RCTConvertVecToArray(const ContainerT &vec)
} }
template<typename ContainerT> template<typename ContainerT>
NSArray *RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec, id (^convertor)(typename ContainerT::value_type element)) NSArray *RCTConvertOptionalVecToArray(const std::optional<ContainerT> &vec, id (^convertor)(typename ContainerT::value_type element))
{ {
return vec.hasValue() ? RCTConvertVecToArray(vec.value(), convertor) : nil; return vec.has_value() ? RCTConvertVecToArray(vec.value(), convertor) : nil;
} }
template<typename ContainerT> template<typename ContainerT>
NSArray *RCTConvertOptionalVecToArray(const folly::Optional<ContainerT> &vec) NSArray *RCTConvertOptionalVecToArray(const std::optional<ContainerT> &vec)
{ {
return vec.hasValue() ? RCTConvertVecToArray(vec.value(), ^id(typename ContainerT::value_type element) { return element; }) : nil; return vec.has_value() ? RCTConvertVecToArray(vec.value(), ^id(typename ContainerT::value_type element) { return element; }) : nil;
} }
bool RCTBridgingToBool(id value); bool RCTBridgingToBool(id value);
folly::Optional<bool> RCTBridgingToOptionalBool(id value); std::optional<bool> RCTBridgingToOptionalBool(id value);
NSString *RCTBridgingToString(id value); NSString *RCTBridgingToString(id value);
NSString *RCTBridgingToOptionalString(id value); NSString *RCTBridgingToOptionalString(id value);
folly::Optional<double> RCTBridgingToOptionalDouble(id value); std::optional<double> RCTBridgingToOptionalDouble(id value);
double RCTBridgingToDouble(id value); double RCTBridgingToDouble(id value);
NSArray *RCTBridgingToArray(id value); NSArray *RCTBridgingToArray(id value);
@ -64,10 +65,10 @@ facebook::react::LazyVector<T> RCTBridgingToVec(id value, T (^ctor)(id element))
} }
template<typename T> template<typename T>
folly::Optional<facebook::react::LazyVector<T>> RCTBridgingToOptionalVec(id value, T (^ctor)(id element)) std::optional<facebook::react::LazyVector<T>> RCTBridgingToOptionalVec(id value, T (^ctor)(id element))
{ {
if (value == nil || value == (id)kCFNull) { if (value == nil || value == (id)kCFNull) {
return folly::none; return std::nullopt;
} else { } else {
return RCTBridgingToVec(value, ctor); return RCTBridgingToVec(value, ctor);
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Meta Platforms, Inc. and affiliates.
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.

View File

@ -4,22 +4,6 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libRNCAsyncStorage.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNCAsyncStorage.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libRNCAsyncStorage.a</string> <string>libRNCAsyncStorage.a</string>
@ -39,6 +23,22 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libRNCAsyncStorage.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNCAsyncStorage.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -10,6 +10,10 @@
#import <React/RCTBridgeModule.h> #import <React/RCTBridgeModule.h>
#import <React/RCTInvalidating.h> #import <React/RCTInvalidating.h>
#ifdef RCT_NEW_ARCH_ENABLED
#import <rnasyncstorage/rnasyncstorage.h>
#endif
#import "RNCAsyncStorageDelegate.h" #import "RNCAsyncStorageDelegate.h"
/** /**
@ -23,7 +27,14 @@
* *
* Keys and values must always be strings or an error is returned. * Keys and values must always be strings or an error is returned.
*/ */
@interface RNCAsyncStorage : NSObject <RCTBridgeModule, RCTInvalidating> @interface RNCAsyncStorage : NSObject <
#ifdef RCT_NEW_ARCH_ENABLED
NativeAsyncStorageModuleSpec
#else
RCTBridgeModule
#endif
,
RCTInvalidating>
@property (nonatomic, weak, nullable) id<RNCAsyncStorageDelegate> delegate; @property (nonatomic, weak, nullable) id<RNCAsyncStorageDelegate> delegate;

View File

@ -10,6 +10,10 @@
#import <React/RCTBridgeModule.h> #import <React/RCTBridgeModule.h>
#import <React/RCTInvalidating.h> #import <React/RCTInvalidating.h>
#ifdef RCT_NEW_ARCH_ENABLED
#import <rnasyncstorage/rnasyncstorage.h>
#endif
#import "RNCAsyncStorageDelegate.h" #import "RNCAsyncStorageDelegate.h"
/** /**
@ -23,7 +27,14 @@
* *
* Keys and values must always be strings or an error is returned. * Keys and values must always be strings or an error is returned.
*/ */
@interface RNCAsyncStorage : NSObject <RCTBridgeModule, RCTInvalidating> @interface RNCAsyncStorage : NSObject <
#ifdef RCT_NEW_ARCH_ENABLED
NativeAsyncStorageModuleSpec
#else
RCTBridgeModule
#endif
,
RCTInvalidating>
@property (nonatomic, weak, nullable) id<RNCAsyncStorageDelegate> delegate; @property (nonatomic, weak, nullable) id<RNCAsyncStorageDelegate> delegate;

View File

@ -1,8 +0,0 @@
#import <React/UIView+React.h>
#import <React/RCTView.h>
@interface CMIFColorMatrixImageFilter : RCTView
@property (nonatomic, strong) NSArray<NSNumber *> *matrix;
@end

View File

@ -1,8 +0,0 @@
#import <React/UIView+React.h>
#import <React/RCTView.h>
@interface CMIFColorMatrixImageFilter : RCTView
@property (nonatomic, strong) NSArray<NSNumber *> *matrix;
@end

View File

@ -4,22 +4,6 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libRNFS.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNFS.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libRNFS.a</string> <string>libRNFS.a</string>
@ -39,6 +23,22 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libRNFS.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNFS.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -4,22 +4,6 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libRNFastImage.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNFastImage.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libRNFastImage.a</string> <string>libRNFastImage.a</string>
@ -39,6 +23,22 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libRNFastImage.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNFastImage.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -4,6 +4,22 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libRNGestureHandler.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNGestureHandler.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libRNGestureHandler.a</string> <string>libRNGestureHandler.a</string>
@ -23,22 +39,6 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libRNGestureHandler.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNGestureHandler.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -1,17 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "RNIapIos-Bridging-Header.h"
FOUNDATION_EXPORT double RNIapVersionNumber;
FOUNDATION_EXPORT const unsigned char RNIapVersionString[];

View File

@ -1,6 +0,0 @@
module RNIap {
umbrella header "RNIap-umbrella.h"
export *
module * { export * }
}

View File

@ -1,2 +0,0 @@
#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>

View File

@ -1,17 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "RNIapIos-Bridging-Header.h"
FOUNDATION_EXPORT double RNIapVersionNumber;
FOUNDATION_EXPORT const unsigned char RNIapVersionString[];

View File

@ -1,6 +0,0 @@
module RNIap {
umbrella header "RNIap-umbrella.h"
export *
module * { export * }
}

View File

@ -1,2 +0,0 @@
#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>libRNOpenAppSettings.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>libRNOpenAppSettings.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libRNOpenAppSettings.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNOpenAppSettings.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>

View File

@ -1,7 +0,0 @@
#import <React/RCTBridgeModule.h>
#import <UIKit/UIKit.h>
@interface RNOpenAppSettings : NSObject <RCTBridgeModule>
@end

View File

@ -1,7 +0,0 @@
#import <React/RCTBridgeModule.h>
#import <UIKit/UIKit.h>
@interface RNOpenAppSettings : NSObject <RCTBridgeModule>
@end

View File

@ -4,22 +4,6 @@
<dict> <dict>
<key>AvailableLibraries</key> <key>AvailableLibraries</key>
<array> <array>
<dict>
<key>BinaryPath</key>
<string>libRNReanimated.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNReanimated.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict> <dict>
<key>BinaryPath</key> <key>BinaryPath</key>
<string>libRNReanimated.a</string> <string>libRNReanimated.a</string>
@ -39,6 +23,22 @@
<key>SupportedPlatformVariant</key> <key>SupportedPlatformVariant</key>
<string>simulator</string> <string>simulator</string>
</dict> </dict>
<dict>
<key>BinaryPath</key>
<string>libRNReanimated.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libRNReanimated.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array> </array>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>XFWK</string> <string>XFWK</string>

View File

@ -0,0 +1,41 @@
#pragma once
#include <jsi/jsi.h>
#include <unordered_set>
#include "PlatformDepMethodsHolder.h"
#include "RuntimeManager.h"
namespace reanimated {
using namespace facebook;
enum SensorType {
ACCELEROMETER = 1,
GYROSCOPE = 2,
GRAVITY = 3,
MAGNETIC_FIELD = 4,
ROTATION_VECTOR = 5,
};
class AnimatedSensorModule {
std::unordered_set<int> sensorsIds_;
RegisterSensorFunction platformRegisterSensorFunction_;
UnregisterSensorFunction platformUnregisterSensorFunction_;
RuntimeManager *runtimeManager_;
public:
AnimatedSensorModule(
const PlatformDepMethodsHolder &platformDepMethodsHolder,
RuntimeManager *runtimeManager);
~AnimatedSensorModule();
jsi::Value registerSensor(
jsi::Runtime &rt,
const jsi::Value &sensorType,
const jsi::Value &interval,
const jsi::Value &sensorDataContainer);
void unregisterSensor(const jsi::Value &sensorId);
};
} // namespace reanimated

View File

@ -0,0 +1,32 @@
#pragma once
#include <memory>
#include <string>
#include "Scheduler.h"
namespace reanimated {
struct ErrorWrapper {
std::string message = "";
bool handled = true;
};
class ErrorHandler {
public:
bool raise() {
if (getError()->handled) {
return false;
}
this->getScheduler()->scheduleOnUI([this]() mutable { this->raiseSpec(); });
return true;
}
virtual std::shared_ptr<Scheduler> getScheduler() = 0;
virtual std::shared_ptr<ErrorWrapper> getError() = 0;
virtual void setError(std::string message) = 0;
virtual ~ErrorHandler() {}
protected:
virtual void raiseSpec() = 0;
};
} // namespace reanimated

View File

@ -0,0 +1,37 @@
#pragma once
#include <jsi/jsi.h>
#include <map>
#include <memory>
#include <mutex>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace facebook;
namespace reanimated {
class WorkletEventHandler;
class EventHandlerRegistry {
std::map<
std::string,
std::unordered_map<unsigned long, std::shared_ptr<WorkletEventHandler>>>
eventMappings;
std::map<unsigned long, std::shared_ptr<WorkletEventHandler>> eventHandlers;
std::mutex instanceMutex;
public:
void registerEventHandler(std::shared_ptr<WorkletEventHandler> eventHandler);
void unregisterEventHandler(unsigned long id);
void processEvent(
jsi::Runtime &rt,
std::string eventName,
std::string eventPayload);
bool isAnyHandlerWaitingForEvent(std::string eventName);
};
} // namespace reanimated

View File

@ -0,0 +1,19 @@
#pragma once
#include <string>
namespace reanimated {
class FeaturesConfig {
public:
static inline bool isLayoutAnimationEnabled() {
return _isLayoutAnimationEnabled;
}
static inline void setLayoutAnimationEnabled(bool isLayoutAnimationEnabled) {
_isLayoutAnimationEnabled = isLayoutAnimationEnabled;
}
private:
static bool _isLayoutAnimationEnabled;
};
} // namespace reanimated

View File

@ -0,0 +1,36 @@
#pragma once
#include <jsi/jsi.h>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h"
using namespace facebook;
namespace reanimated {
class FrozenObject : public jsi::HostObject {
friend WorkletsCache;
friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private:
std::unordered_map<std::string, std::shared_ptr<ShareableValue>> map;
std::vector<std::string> namesOrder;
public:
FrozenObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager);
jsi::Object shallowClone(jsi::Runtime &rt);
bool containsHostFunction = false;
};
} // namespace reanimated

View File

@ -0,0 +1,28 @@
#pragma once
#include <jsi/jsi.h>
#include <memory>
#include <string>
using namespace facebook;
namespace reanimated {
struct HostFunctionHandler : jsi::HostObject {
std::shared_ptr<jsi::Function> pureFunction;
std::string functionName;
jsi::Runtime *hostRuntime;
jsi::HostObject a;
HostFunctionHandler(std::shared_ptr<jsi::Function> f, jsi::Runtime &rt) {
pureFunction = f;
functionName = f->getProperty(rt, "name").asString(rt).utf8(rt);
hostRuntime = &rt;
}
std::shared_ptr<jsi::Function> getPureFunction() {
return pureFunction;
}
};
} // namespace reanimated

View File

@ -0,0 +1,37 @@
#pragma once
#include <jsi/jsi.h>
#include <stdio.h>
#include <memory>
#include <mutex>
#include <unordered_map>
#include <vector>
#include "Scheduler.h"
using namespace facebook;
namespace reanimated {
class RuntimeManager;
struct StaticStoreUser {
std::atomic<int> ctr;
std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> store;
std::recursive_mutex storeMutex;
};
class StoreUser {
int identifier = 0;
std::weak_ptr<Scheduler> scheduler;
std::shared_ptr<StaticStoreUser> storeUserData;
public:
StoreUser(std::shared_ptr<Scheduler> s, const RuntimeManager &runtimeManager);
std::weak_ptr<jsi::Value> getWeakRef(jsi::Runtime &rt);
void removeRefs();
virtual ~StoreUser();
};
} // namespace reanimated

View File

@ -0,0 +1,32 @@
#pragma once
#include <jsi/jsi.h>
#include <stdio.h>
#include <functional>
#include <map>
#include <memory>
namespace reanimated {
using namespace facebook;
class MutableValue;
class LayoutAnimationsProxy {
public:
LayoutAnimationsProxy(
std::function<void(int, jsi::Object newProps)> _notifyAboutProgress,
std::function<void(int, bool)> _notifyAboutEnd);
void
startObserving(int tag, std::shared_ptr<MutableValue> sv, jsi::Runtime &rt);
void stopObserving(int tag, bool finished);
void notifyAboutCancellation(int tag);
private:
std::function<void(int, jsi::Object newProps)> notifyAboutProgress;
std::function<void(int, bool)> notifyAboutEnd;
std::map<int, std::shared_ptr<MutableValue>> observedValues;
};
} // namespace reanimated

View File

@ -0,0 +1,22 @@
#pragma once
#include <memory>
#include "./LoggerInterface.h"
namespace reanimated {
class Logger {
public:
template <typename T>
static void log(T value) {
if (instance == nullptr) {
throw std::runtime_error("no logger specified");
}
instance->log(value);
}
private:
static std::unique_ptr<LoggerInterface> instance;
};
} // namespace reanimated

View File

@ -0,0 +1,14 @@
#pragma once
namespace reanimated {
class LoggerInterface {
public:
virtual void log(const char *str) = 0;
virtual void log(double d) = 0;
virtual void log(int i) = 0;
virtual void log(bool b) = 0;
virtual ~LoggerInterface() {}
};
} // namespace reanimated

View File

@ -0,0 +1,51 @@
#pragma once
#include <jsi/jsi.h>
#include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h"
using namespace facebook;
namespace reanimated {
class MapperRegistry;
struct ViewDescriptor {
int tag;
jsi::Value name;
};
class Mapper : public std::enable_shared_from_this<Mapper> {
friend MapperRegistry;
private:
unsigned long id;
NativeReanimatedModule *module;
std::shared_ptr<jsi::Function> mapper;
std::vector<std::shared_ptr<MutableValue>> inputs;
std::vector<std::shared_ptr<MutableValue>> outputs;
bool dirty = true;
std::shared_ptr<jsi::Function> userUpdater;
UpdaterFunction *updateProps;
int optimalizationLvl = 0;
std::shared_ptr<ShareableValue> viewDescriptors;
public:
Mapper(
NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs);
void execute(jsi::Runtime &rt);
void enableFastMode(
const int optimalizationLvl,
const std::shared_ptr<ShareableValue> &updater,
const std::shared_ptr<ShareableValue> &jsViewDescriptors);
virtual ~Mapper();
};
} // namespace reanimated

View File

@ -0,0 +1,29 @@
#pragma once
#include <jsi/jsi.h>
#include <memory>
#include <unordered_map>
#include <vector>
using namespace facebook;
namespace reanimated {
class Mapper;
class MapperRegistry {
std::unordered_map<unsigned long, std::shared_ptr<Mapper>> mappers;
std::vector<std::shared_ptr<Mapper>> sortedMappers;
void updateOrder();
bool updatedSinceLastExecute = false;
public:
void startMapper(std::shared_ptr<Mapper> mapper);
void stopMapper(unsigned long id);
void execute(jsi::Runtime &rt);
bool needRunOnRender();
};
} // namespace reanimated

View File

@ -0,0 +1,54 @@
#pragma once
#include <jsi/jsi.h>
#include <map>
#include <memory>
#include <mutex>
#include <vector>
#include "JSIStoreValueUser.h"
#include "LayoutAnimationsProxy.h"
#include "MutableValueSetterProxy.h"
#include "RuntimeManager.h"
#include "SharedParent.h"
using namespace facebook;
namespace reanimated {
class MutableValue : public jsi::HostObject,
public std::enable_shared_from_this<MutableValue>,
public StoreUser {
private:
friend MutableValueSetterProxy;
friend LayoutAnimationsProxy;
private:
RuntimeManager *runtimeManager;
std::mutex readWriteMutex;
std::shared_ptr<ShareableValue> value;
std::weak_ptr<jsi::Value> animation;
std::map<unsigned long, std::function<void()>> listeners;
public:
void setValue(jsi::Runtime &rt, const jsi::Value &newValue);
jsi::Value getValue(jsi::Runtime &rt);
public:
MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s);
public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener);
void removeListener(unsigned long listenerId);
};
} // namespace reanimated

View File

@ -0,0 +1,25 @@
#pragma once
#include <jsi/jsi.h>
#include <memory>
#include <utility>
#include "SharedParent.h"
using namespace facebook;
namespace reanimated {
class MutableValueSetterProxy : public jsi::HostObject {
private:
friend MutableValue;
std::shared_ptr<MutableValue> mutableValue;
public:
explicit MutableValueSetterProxy(std::shared_ptr<MutableValue> mutableValue)
: mutableValue(std::move(mutableValue)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
};
} // namespace reanimated

View File

@ -0,0 +1,24 @@
#import <Foundation/Foundation.h>
#import <RNReanimated/RNGestureHandlerStateManager.h>
#import <React/RCTUIManager.h>
#include <string>
#include <utility>
#include <vector>
namespace reanimated {
std::vector<std::pair<std::string, double>> measure(
int viewTag,
RCTUIManager *uiManager);
void scrollTo(
int scrollViewTag,
RCTUIManager *uiManager,
double x,
double y,
bool animated);
void setGestureState(
id<RNGestureHandlerStateManager> gestureHandlerStateManager,
int handlerTag,
int newState);
} // namespace reanimated

View File

@ -0,0 +1,15 @@
#if __cplusplus
#import <RNReanimated/NativeReanimatedModule.h>
#import <React/RCTEventDispatcher.h>
#include <memory>
namespace reanimated {
std::shared_ptr<reanimated::NativeReanimatedModule> createReanimatedModule(
RCTBridge *bridge,
std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
}
#endif

View File

@ -0,0 +1,121 @@
#pragma once
#include <unistd.h>
#include <memory>
#include <string>
#include <vector>
#include "AnimatedSensorModule.h"
#include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h"
#include "RuntimeManager.h"
#include "Scheduler.h"
#include "SingleInstanceChecker.h"
namespace reanimated {
using FrameCallback = std::function<void(double)>;
class ShareableValue;
class MutableValue;
class MapperRegistry;
class EventHandlerRegistry;
class NativeReanimatedModule : public NativeReanimatedModuleSpec,
public RuntimeManager {
friend ShareableValue;
friend MutableValue;
public:
NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder);
void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter)
override;
jsi::Value makeShareable(jsi::Runtime &rt, const jsi::Value &value) override;
jsi::Value makeMutable(jsi::Runtime &rt, const jsi::Value &value) override;
jsi::Value makeRemote(jsi::Runtime &rt, const jsi::Value &value) override;
jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) override;
void stopMapper(jsi::Runtime &rt, const jsi::Value &mapperId) override;
jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value &registrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override;
jsi::Value enableLayoutAnimations(jsi::Runtime &rt, const jsi::Value &config)
override;
jsi::Value configureProps(
jsi::Runtime &rt,
const jsi::Value &uiProps,
const jsi::Value &nativeProps) override;
void onRender(double timestampMs);
void onEvent(std::string eventName, std::string eventAsString);
bool isAnyHandlerWaitingForEvent(std::string eventName);
void maybeRequestRender();
UpdaterFunction updaterFunction;
jsi::Value registerSensor(
jsi::Runtime &rt,
const jsi::Value &sensorType,
const jsi::Value &interval,
const jsi::Value &sensorDataContainer) override;
void unregisterSensor(jsi::Runtime &rt, const jsi::Value &sensorId) override;
jsi::Value subscribeForKeyboardEvents(
jsi::Runtime &rt,
const jsi::Value &keyboardEventContainer) override;
void unsubscribeFromKeyboardEvents(
jsi::Runtime &rt,
const jsi::Value &listenerId) override;
private:
std::shared_ptr<MapperRegistry> mapperRegistry;
std::shared_ptr<EventHandlerRegistry> eventHandlerRegistry;
std::function<void(FrameCallback &, jsi::Runtime &)> requestRender;
std::shared_ptr<jsi::Value> dummyEvent;
std::vector<FrameCallback> frameCallbacks;
bool renderRequested = false;
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer;
std::function<void(double)> onRenderCallback;
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy;
AnimatedSensorModule animatedSensorModule;
ConfigurePropsFunction configurePropsPlatformFunction;
KeyboardEventSubscribeFunction subscribeForKeyboardEventsFunction;
KeyboardEventUnsubscribeFunction unsubscribeFromKeyboardEventsFunction;
#ifdef DEBUG
SingleInstanceChecker<NativeReanimatedModule> singleInstanceChecker_;
#endif
};
} // namespace reanimated

View File

@ -0,0 +1,90 @@
#pragma once
#include <memory>
#include <string>
#include <vector>
#ifdef ANDROID
#include "TurboModule.h"
#else
#include <ReactCommon/TurboModule.h>
#endif
#include <ReactCommon/CallInvoker.h>
using namespace facebook;
using namespace react;
namespace reanimated {
class JSI_EXPORT NativeReanimatedModuleSpec : public TurboModule {
protected:
explicit NativeReanimatedModuleSpec(std::shared_ptr<CallInvoker> jsInvoker);
public:
virtual void installCoreFunctions(
jsi::Runtime &rt,
const jsi::Value &valueSetter) = 0;
// SharedValue
virtual jsi::Value makeShareable(
jsi::Runtime &rt,
const jsi::Value &value) = 0;
virtual jsi::Value makeMutable(jsi::Runtime &rt, const jsi::Value &value) = 0;
virtual jsi::Value makeRemote(jsi::Runtime &rt, const jsi::Value &value) = 0;
// mappers
virtual jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) = 0;
virtual void stopMapper(jsi::Runtime &rt, const jsi::Value &mapperId) = 0;
// events
virtual jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) = 0;
virtual void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value &registrationId) = 0;
// views
virtual jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) = 0;
// sensors
virtual jsi::Value registerSensor(
jsi::Runtime &rt,
const jsi::Value &sensorType,
const jsi::Value &interval,
const jsi::Value &sensorDataContainer) = 0;
virtual void unregisterSensor(
jsi::Runtime &rt,
const jsi::Value &sensorId) = 0;
// keyboard
virtual jsi::Value subscribeForKeyboardEvents(
jsi::Runtime &rt,
const jsi::Value &keyboardEventContainer) = 0;
virtual void unsubscribeFromKeyboardEvents(
jsi::Runtime &rt,
const jsi::Value &listenerId) = 0;
// other
virtual jsi::Value enableLayoutAnimations(
jsi::Runtime &rt,
const jsi::Value &config) = 0;
virtual jsi::Value configureProps(
jsi::Runtime &rt,
const jsi::Value &uiProps,
const jsi::Value &nativeProps) = 0;
};
} // namespace reanimated

View File

@ -0,0 +1,51 @@
#pragma once
#include <jsi/jsi.h>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace facebook;
namespace reanimated {
using UpdaterFunction = std::function<void(
jsi::Runtime &rt,
int viewTag,
const jsi::Value &viewName,
const jsi::Object &object)>;
using RequestRender =
std::function<void(std::function<void(double)>, jsi::Runtime &rt)>;
using ScrollToFunction = std::function<void(int, double, double, bool)>;
using MeasuringFunction =
std::function<std::vector<std::pair<std::string, double>>(int)>;
using TimeProviderFunction = std::function<double(void)>;
using RegisterSensorFunction =
std::function<int(int, int, std::function<void(double[])>)>;
using UnregisterSensorFunction = std::function<void(int)>;
using SetGestureStateFunction = std::function<void(int, int)>;
using ConfigurePropsFunction = std::function<void(
jsi::Runtime &rt,
const jsi::Value &uiProps,
const jsi::Value &nativeProps)>;
using KeyboardEventSubscribeFunction =
std::function<int(std::function<void(int, int)>)>;
using KeyboardEventUnsubscribeFunction = std::function<void(int)>;
struct PlatformDepMethodsHolder {
RequestRender requestRender;
UpdaterFunction updaterFunction;
ScrollToFunction scrollToFunction;
MeasuringFunction measuringFunction;
TimeProviderFunction getCurrentTime;
RegisterSensorFunction registerSensor;
UnregisterSensorFunction unregisterSensor;
SetGestureStateFunction setGestureStateFunction;
ConfigurePropsFunction configurePropsFunction;
KeyboardEventSubscribeFunction subscribeForKeyboardEvents;
KeyboardEventUnsubscribeFunction unsubscribeFromKeyboardEvents;
};
} // namespace reanimated

View File

@ -1,7 +1,6 @@
#import <RNReanimated/REATransition.h>
#import <React/RCTConvert.h> #import <React/RCTConvert.h>
#import "REATransition.h"
@interface RCTConvert (REATransition) @interface RCTConvert (REATransition)
+ (REATransitionType)REATransitionType:(id)json; + (REATransitionType)REATransitionType:(id)json;

View File

@ -1,4 +1,4 @@
#import "REATransition.h" #import <RNReanimated/REATransition.h>
@interface REATransitionGroup : REATransition @interface REATransitionGroup : REATransition
@property (nonatomic) BOOL sequence; @property (nonatomic) BOOL sequence;

View File

@ -1,4 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REAAlwaysNode : REANode <REAFinalNode> @interface REAAlwaysNode : REANode <REAFinalNode>
@end @end

View File

@ -0,0 +1,32 @@
#import <Foundation/Foundation.h>
#import <RNReanimated/REASnapshot.h>
#import <React/RCTUIManager.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, ViewState) {
Inactive,
Appearing,
Disappearing,
Layout,
ToRemove,
};
@interface REAAnimationsManager : NSObject
- (instancetype)initWithUIManager:(RCTUIManager *)uiManager;
- (void)setRemovingConfigBlock:(void (^)(NSNumber *tag))block;
- (void)setAnimationStartingBlock:
(void (^)(NSNumber *tag, NSString *type, NSDictionary *target, NSNumber *depth))startAnimation;
- (void)notifyAboutProgress:(NSDictionary *)newStyle tag:(NSNumber *)tag;
- (void)notifyAboutEnd:(NSNumber *)tag cancelled:(BOOL)cancelled;
- (void)invalidate;
- (void)onViewRemoval:(UIView *)view before:(REASnapshot *)before;
- (void)onViewCreate:(UIView *)view after:(REASnapshot *)after;
- (void)onViewUpdate:(UIView *)view before:(REASnapshot *)before after:(REASnapshot *)after;
- (void)setToBeRemovedRegistry:(NSMutableDictionary<NSNumber *, NSMutableSet<id<RCTComponent>> *> *)toBeRemovedRegister;
- (void)removeLeftovers;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,4 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REABezierNode : REANode @interface REABezierNode : REANode

View File

@ -1,4 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REABlockNode : REANode @interface REABlockNode : REANode

View File

@ -1,7 +1,6 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REACallFuncNode : REANode @interface REACallFuncNode : REANode
@end @end

View File

@ -1,4 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REAClockNode : REANode @interface REAClockNode : REANode
@property (nonatomic, readonly) BOOL isRunning; @property (nonatomic, readonly) BOOL isRunning;

View File

@ -1,6 +1,5 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REAConcatNode : REANode @interface REAConcatNode : REANode
@end @end

View File

@ -1,4 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REACondNode : REANode @interface REACondNode : REANode

View File

@ -1,4 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface READebugNode : REANode @interface READebugNode : REANode

View File

@ -0,0 +1,10 @@
#import <Foundation/Foundation.h>
#import <React/RCTEventDispatcher.h>
NS_ASSUME_NONNULL_BEGIN
@interface REAEventDispatcher : RCTEventDispatcher
@end
NS_ASSUME_NONNULL_END

View File

@ -1,5 +1,4 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
#import <React/RCTEventDispatcher.h> #import <React/RCTEventDispatcher.h>
@interface REAEventNode : REANode @interface REAEventNode : REANode

View File

@ -1,7 +1,6 @@
#import "REANode.h" #import <RNReanimated/REANode.h>
@interface REAFunctionNode : REANode @interface REAFunctionNode : REANode
@end @end

View File

@ -0,0 +1,21 @@
#import <RNReanimated/ErrorHandler.h>
#import <RNReanimated/Scheduler.h>
#include <memory>
#include <string>
namespace reanimated {
class REAIOSErrorHandler : public ErrorHandler {
std::shared_ptr<Scheduler> scheduler;
void raiseSpec() override;
std::shared_ptr<ErrorWrapper> error;
public:
REAIOSErrorHandler(std::shared_ptr<Scheduler> scheduler);
std::shared_ptr<Scheduler> getScheduler() override;
std::shared_ptr<ErrorWrapper> getError() override;
void setError(std::string message) override;
virtual ~REAIOSErrorHandler() {}
};
} // namespace reanimated

View File

@ -0,0 +1,15 @@
#import <RNReanimated/ReanimatedHiddenHeaders.h>
#include <stdio.h>
namespace reanimated {
class REAIOSLogger : public LoggerInterface {
public:
void log(const char *str) override;
void log(double d) override;
void log(int i) override;
void log(bool b) override;
virtual ~REAIOSLogger() {}
};
} // namespace reanimated

Some files were not shown because too many files have changed in this diff Show More