Merge remote-tracking branch 'facebook/0.63-stable' into fb633merge
This commit is contained in:
Коммит
9abf68df09
|
@ -503,6 +503,9 @@ export type Props = $ReadOnly<{|
|
|||
* The following values work on Android only:
|
||||
*
|
||||
* - `visible-password`
|
||||
*
|
||||
* On Android devices manufactured by Xiaomi with Android Q, 'email-address'
|
||||
* type will be replaced in native by 'default' to prevent a system related crash.
|
||||
*/
|
||||
keyboardType?: ?KeyboardType,
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ class TouchableBounce extends React.Component<Props, State> {
|
|||
delayLongPress: this.props.delayLongPress,
|
||||
delayPressIn: this.props.delayPressIn,
|
||||
delayPressOut: this.props.delayPressOut,
|
||||
minPressDuration: 0,
|
||||
pressRectOffset: this.props.pressRetentionOffset,
|
||||
android_disableSound: this.props.touchSoundDisabled,
|
||||
onBlur: event => {
|
||||
|
|
|
@ -174,6 +174,7 @@ class TouchableHighlight extends React.Component<Props, State> {
|
|||
delayLongPress: this.props.delayLongPress,
|
||||
delayPressIn: this.props.delayPressIn,
|
||||
delayPressOut: this.props.delayPressOut,
|
||||
minPressDuration: 0,
|
||||
pressRectOffset: this.props.pressRetentionOffset,
|
||||
android_disableSound: this.props.touchSoundDisabled,
|
||||
onBlur: event => {
|
||||
|
|
|
@ -180,6 +180,7 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
|
|||
delayLongPress: this.props.delayLongPress,
|
||||
delayPressIn: this.props.delayPressIn,
|
||||
delayPressOut: this.props.delayPressOut,
|
||||
minPressDuration: 0,
|
||||
pressRectOffset: this.props.pressRetentionOffset,
|
||||
android_disableSound: this.props.touchSoundDisabled,
|
||||
onLongPress: this.props.onLongPress,
|
||||
|
|
|
@ -147,6 +147,7 @@ class TouchableOpacity extends React.Component<Props, State> {
|
|||
delayLongPress: this.props.delayLongPress,
|
||||
delayPressIn: this.props.delayPressIn,
|
||||
delayPressOut: this.props.delayPressOut,
|
||||
minPressDuration: 0,
|
||||
pressRectOffset: this.props.pressRetentionOffset,
|
||||
onBlur: event => {
|
||||
if (Platform.isTV) {
|
||||
|
|
|
@ -208,6 +208,7 @@ function createPressabilityConfig(props: Props): PressabilityConfig {
|
|||
delayLongPress: props.delayLongPress,
|
||||
delayPressIn: props.delayPressIn,
|
||||
delayPressOut: props.delayPressOut,
|
||||
minPressDuration: 0,
|
||||
pressRectOffset: props.pressRetentionOffset,
|
||||
android_disableSound: props.touchSoundDisabled,
|
||||
onBlur: props.onBlur,
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
exports.version = {
|
||||
major: 0,
|
||||
minor: 63,
|
||||
patch: 2,
|
||||
patch: 3,
|
||||
prerelease: null,
|
||||
};
|
||||
|
|
|
@ -171,6 +171,7 @@ RCT_EXPORT_MODULE()
|
|||
{
|
||||
return 2;
|
||||
}
|
||||
#pragma mark - RCTImageLoaderProtocol 1/3
|
||||
|
||||
- (id<RCTImageCache>)imageCache
|
||||
{
|
||||
|
@ -253,6 +254,8 @@ RCT_EXPORT_MODULE()
|
|||
return nil;
|
||||
}
|
||||
|
||||
# pragma mark - Private Image Decoding & Resizing
|
||||
|
||||
- (id<RCTImageDataDecoder>)imageDataDecoderForData:(NSData *)data
|
||||
{
|
||||
if (!_maxConcurrentLoadingTasks) {
|
||||
|
@ -269,7 +272,7 @@ RCT_EXPORT_MODULE()
|
|||
_decoders = [_bridge modulesConformingToProtocol:@protocol(RCTImageDataDecoder)];
|
||||
}
|
||||
|
||||
_decoders = [[_bridge modulesConformingToProtocol:@protocol(RCTImageDataDecoder)] sortedArrayUsingComparator:^NSComparisonResult(id<RCTImageDataDecoder> a, id<RCTImageDataDecoder> b) {
|
||||
_decoders = [_decoders sortedArrayUsingComparator:^NSComparisonResult(id<RCTImageDataDecoder> a, id<RCTImageDataDecoder> b) {
|
||||
float priorityA = [a respondsToSelector:@selector(decoderPriority)] ? [a decoderPriority] : 0;
|
||||
float priorityB = [b respondsToSelector:@selector(decoderPriority)] ? [b decoderPriority] : 0;
|
||||
if (priorityA > priorityB) {
|
||||
|
@ -334,33 +337,66 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
return image;
|
||||
}
|
||||
|
||||
- (RCTImageLoaderCancellationBlock) loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
callback:(RCTImageLoaderCompletionBlock)callback
|
||||
#pragma mark - RCTImageLoaderProtocol 2/3
|
||||
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
callback:(RCTImageLoaderCompletionBlock)callback
|
||||
{
|
||||
return [self loadImageWithURLRequest:imageURLRequest
|
||||
size:CGSizeZero
|
||||
scale:1
|
||||
clipped:YES
|
||||
resizeMode:RCTResizeModeStretch
|
||||
progressBlock:nil
|
||||
partialLoadBlock:nil
|
||||
completionBlock:callback];
|
||||
return [self loadImageWithURLRequest:imageURLRequest
|
||||
priority:RCTImageLoaderPriorityImmediate
|
||||
callback:callback];
|
||||
}
|
||||
|
||||
- (RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
completionBlock:(RCTImageLoaderCompletionBlock)completionBlock
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
priority:(RCTImageLoaderPriority)priority
|
||||
callback:(RCTImageLoaderCompletionBlock)callback {
|
||||
return [self loadImageWithURLRequest:imageURLRequest
|
||||
size:CGSizeZero
|
||||
scale:1
|
||||
clipped:YES
|
||||
resizeMode:RCTResizeModeStretch
|
||||
priority:priority
|
||||
progressBlock:nil
|
||||
partialLoadBlock:nil
|
||||
completionBlock:callback];
|
||||
}
|
||||
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
completionBlock:(RCTImageLoaderCompletionBlock)completionBlock
|
||||
{
|
||||
return [self loadImageWithURLRequest:imageURLRequest
|
||||
size:size
|
||||
scale:scale
|
||||
clipped:clipped
|
||||
resizeMode:resizeMode
|
||||
priority:RCTImageLoaderPriorityImmediate
|
||||
progressBlock:progressBlock
|
||||
partialLoadBlock:partialLoadBlock
|
||||
completionBlock:completionBlock];
|
||||
}
|
||||
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
priority:(RCTImageLoaderPriority)priority
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
completionBlock:(RCTImageLoaderCompletionBlock)completionBlock
|
||||
{
|
||||
RCTImageURLLoaderRequest *request = [self loadImageWithURLRequest:imageURLRequest
|
||||
size:size
|
||||
scale:scale
|
||||
clipped:clipped
|
||||
resizeMode:resizeMode
|
||||
priority:priority
|
||||
attribution:{}
|
||||
progressBlock:progressBlock
|
||||
partialLoadBlock:partialLoadBlock
|
||||
|
@ -370,6 +406,8 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
};
|
||||
}
|
||||
|
||||
#pragma mark - Private Downloader Methods
|
||||
|
||||
- (void)dequeueTasks
|
||||
{
|
||||
dispatch_async(_URLRequestQueue, ^{
|
||||
|
@ -446,6 +484,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
priority:(RCTImageLoaderPriority)priority
|
||||
attribution:(const ImageURLLoaderAttribution &)attribution
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressHandler
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadHandler
|
||||
|
@ -512,6 +551,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
scale:scale
|
||||
resizeMode:resizeMode
|
||||
requestId:requestId
|
||||
priority:priority
|
||||
attribution:attributionCopy
|
||||
progressHandler:progressHandler
|
||||
partialLoadHandler:partialLoadHandler
|
||||
|
@ -551,6 +591,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
scale:scale
|
||||
resizeMode:resizeMode
|
||||
requestId:requestId
|
||||
priority:priority
|
||||
attribution:attributionCopy
|
||||
progressHandler:progressHandler
|
||||
partialLoadHandler:partialLoadHandler
|
||||
|
@ -732,6 +773,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
priority:(RCTImageLoaderPriority)priority
|
||||
attribution:(const ImageURLLoaderAttribution &)attribution
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
|
@ -799,6 +841,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
size:size
|
||||
scale:scale
|
||||
resizeMode:resizeMode
|
||||
priority:priority
|
||||
attribution:attribution
|
||||
progressBlock:progressBlock
|
||||
partialLoadBlock:partialLoadBlock
|
||||
|
@ -842,6 +885,8 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
}
|
||||
}
|
||||
|
||||
#pragma mark - RCTImageLoaderProtocol 3/3
|
||||
|
||||
- (RCTImageLoaderCancellationBlock)decodeImageData:(NSData *)data
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
|
@ -1001,6 +1046,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
|||
size:CGSizeZero
|
||||
scale:1
|
||||
resizeMode:RCTResizeModeStretch
|
||||
priority: RCTImageLoaderPriorityImmediate
|
||||
attribution:{}
|
||||
progressBlock:NULL
|
||||
partialLoadBlock:NULL
|
||||
|
@ -1155,7 +1201,11 @@ RCT_EXPORT_METHOD(getSizeWithHeaders:(NSString *)uri
|
|||
resolve:(RCTPromiseResolveBlock)resolve
|
||||
reject:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
NSURLRequest *request = [RCTConvert NSURLRequest:uri];
|
||||
NSURL *URL = [RCTConvert NSURL:uri];
|
||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
|
||||
[headers enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, BOOL *stop) {
|
||||
[request addValue:[RCTConvert NSString:value] forHTTPHeaderField:key];
|
||||
}];
|
||||
[self getImageSizeForURLRequest:request
|
||||
block:^(NSError *error, CGSize size) {
|
||||
if (error) {
|
||||
|
@ -1172,6 +1222,7 @@ RCT_EXPORT_METHOD(prefetchImage:(NSString *)uri
|
|||
{
|
||||
NSURLRequest *request = [RCTConvert NSURLRequest:uri];
|
||||
[self loadImageWithURLRequest:request
|
||||
priority:RCTImageLoaderPriorityPrefetch
|
||||
callback:^(NSError *error, UIImage *image) {
|
||||
if (error) {
|
||||
reject(@"E_PREFETCH_FAILURE", nil, error);
|
||||
|
|
|
@ -26,6 +26,17 @@
|
|||
|
||||
@end
|
||||
|
||||
/**
|
||||
* Image Downloading priority.
|
||||
* Use PriorityImmediate to download images at the highest priority.
|
||||
* Use PriorityPrefetch to prefetch images at a lower priority.
|
||||
* The priority logic is up to each @RCTImageLoaderProtocol implementation
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, RCTImageLoaderPriority) {
|
||||
RCTImageLoaderPriorityImmediate,
|
||||
RCTImageLoaderPriorityPrefetch
|
||||
};
|
||||
|
||||
@protocol RCTImageLoaderProtocol<RCTURLRequestHandler>
|
||||
|
||||
/**
|
||||
|
@ -57,26 +68,32 @@
|
|||
* Loads the specified image at the highest available resolution.
|
||||
* Can be called from any thread, will call back on an unspecified thread.
|
||||
*/
|
||||
- (RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
callback:(RCTImageLoaderCompletionBlock)callback;
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
callback:(RCTImageLoaderCompletionBlock)callback;
|
||||
/**
|
||||
* As above, but includes download `priority`.
|
||||
*/
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
priority:(RCTImageLoaderPriority)priority
|
||||
callback:(RCTImageLoaderCompletionBlock)callback;
|
||||
|
||||
/**
|
||||
* As above, but includes target `size`, `scale` and `resizeMode`, which are used to
|
||||
* select the optimal dimensions for the loaded image. The `clipped` option
|
||||
* controls whether the image will be clipped to fit the specified size exactly,
|
||||
* or if the original aspect ratio should be retained.
|
||||
* `partialLoadBlock` is meant for custom image loaders that do not ship with the core RN library.
|
||||
* It is meant to be called repeatedly while loading the image as higher quality versions are decoded,
|
||||
* for instance with progressive JPEGs.
|
||||
*/
|
||||
- (RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
completionBlock:(RCTImageLoaderCompletionBlock)completionBlock;
|
||||
* As above, but includes target `size`, `scale` and `resizeMode`, which are used to
|
||||
* select the optimal dimensions for the loaded image. The `clipped` option
|
||||
* controls whether the image will be clipped to fit the specified size exactly,
|
||||
* or if the original aspect ratio should be retained.
|
||||
* `partialLoadBlock` is meant for custom image loaders that do not ship with the core RN library.
|
||||
* It is meant to be called repeatedly while loading the image as higher quality versions are decoded,
|
||||
* for instance with progressive JPEGs.
|
||||
*/
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageWithURLRequest:(NSURLRequest *)imageURLRequest
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
completionBlock:(RCTImageLoaderCompletionBlock)completionBlock;
|
||||
|
||||
/**
|
||||
* Finds an appropriate image decoder and passes the target `size`, `scale` and
|
||||
|
|
|
@ -28,6 +28,7 @@ RCT_EXTERN void RCTEnableImageLoadingPerfInstrumentation(BOOL enabled);
|
|||
scale:(CGFloat)scale
|
||||
clipped:(BOOL)clipped
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
priority: (RCTImageLoaderPriority)priority
|
||||
attribution:(const facebook::react::ImageURLLoaderAttribution &)attribution
|
||||
progressBlock:(RCTImageLoaderProgressBlock)progressBlock
|
||||
partialLoadBlock:(RCTImageLoaderPartialLoadBlock)partialLoadBlock
|
||||
|
|
|
@ -35,7 +35,7 @@ typedef dispatch_block_t RCTImageLoaderCancellationBlock;
|
|||
* has finished. The method should also return a cancellation block, if
|
||||
* applicable.
|
||||
*/
|
||||
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#import <React/RCTImageURLLoader.h>
|
||||
#import <React/RCTImageLoaderProtocol.h>
|
||||
|
||||
#import <React/RCTUIKit.h> // TODO(macOS ISS#2323203)
|
||||
|
||||
|
@ -51,6 +52,7 @@ struct ImageURLLoaderAttribution {
|
|||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
requestId:(NSString *)requestId
|
||||
priority: (RCTImageLoaderPriority)priority
|
||||
attribution:(const facebook::react::ImageURLLoaderAttribution &)attribution
|
||||
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
|
||||
partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler
|
||||
|
|
|
@ -445,6 +445,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|||
scale:imageScale
|
||||
clipped:NO
|
||||
resizeMode:_resizeMode
|
||||
priority:RCTImageLoaderPriorityImmediate
|
||||
attribution:{
|
||||
.nativeViewTag = [self.reactTag intValue],
|
||||
.surfaceId = [self.rootTag intValue],
|
||||
|
|
|
@ -88,16 +88,17 @@ RCT_EXPORT_METHOD(prefetchImage:(NSURLRequest *)request
|
|||
reject(@"E_INVALID_URI", @"Cannot prefetch an image for an empty URI", nil);
|
||||
return;
|
||||
}
|
||||
|
||||
[[self.bridge moduleForName:@"ImageLoader" lazilyLoadIfNecessary:YES]
|
||||
loadImageWithURLRequest:request
|
||||
callback:^(NSError *error, UIImage *image) {
|
||||
if (error) {
|
||||
reject(@"E_PREFETCH_FAILURE", nil, error);
|
||||
return;
|
||||
}
|
||||
resolve(@YES);
|
||||
}];
|
||||
id<RCTImageLoaderProtocol> imageLoader = (id<RCTImageLoaderProtocol>)[self.bridge
|
||||
moduleForName:@"ImageLoader" lazilyLoadIfNecessary:YES];
|
||||
[imageLoader loadImageWithURLRequest:request
|
||||
priority:RCTImageLoaderPriorityPrefetch
|
||||
callback:^(NSError *error, UIImage *image) {
|
||||
if (error) {
|
||||
reject(@"E_PREFETCH_FAILURE", nil, error);
|
||||
return;
|
||||
}
|
||||
resolve(@YES);
|
||||
}];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(queryCache:(NSArray *)requests
|
||||
|
|
|
@ -41,13 +41,13 @@ RCT_EXPORT_MODULE()
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
|
||||
partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler
|
||||
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
- (nullable RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
|
||||
partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler
|
||||
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
{
|
||||
UIImage *image = RCTImageFromLocalAssetURL(imageURL);
|
||||
if (image) {
|
||||
|
@ -60,7 +60,7 @@ RCT_EXPORT_MODULE()
|
|||
RCTLogWarn(@"%@", message);
|
||||
completionHandler(RCTErrorWithMessage(message), nil);
|
||||
}
|
||||
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
|
@ -99,12 +99,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
{
|
||||
BOOL valid = YES;
|
||||
if (_requestToken == nil) {
|
||||
if (requestToken == nil) {
|
||||
if (RCT_DEBUG) {
|
||||
RCTLogError(@"Missing request token for request: %@", _request);
|
||||
}
|
||||
valid = NO;
|
||||
}
|
||||
_requestToken = requestToken;
|
||||
} else if (![requestToken isEqual:_requestToken]) {
|
||||
if (RCT_DEBUG) {
|
||||
|
|
|
@ -276,8 +276,7 @@ const isPressInSignal = signal =>
|
|||
const isTerminalSignal = signal =>
|
||||
signal === 'RESPONDER_TERMINATED' || signal === 'RESPONDER_RELEASE';
|
||||
|
||||
const DEFAULT_LONG_PRESS_DELAY_MS = 370; // 500 - 130
|
||||
const DEFAULT_PRESS_DELAY_MS = 130;
|
||||
const DEFAULT_LONG_PRESS_DELAY_MS = 500;
|
||||
const DEFAULT_PRESS_RECT_OFFSETS = {
|
||||
bottom: 30,
|
||||
left: 20,
|
||||
|
@ -468,12 +467,7 @@ export default class Pressability {
|
|||
this._touchState = 'NOT_RESPONDER';
|
||||
this._receiveSignal('RESPONDER_GRANT', event);
|
||||
|
||||
const delayPressIn = normalizeDelay(
|
||||
this._config.delayPressIn,
|
||||
0,
|
||||
DEFAULT_PRESS_DELAY_MS,
|
||||
);
|
||||
|
||||
const delayPressIn = normalizeDelay(this._config.delayPressIn);
|
||||
if (delayPressIn > 0) {
|
||||
this._pressDelayTimeout = setTimeout(() => {
|
||||
this._receiveSignal('DELAY', event);
|
||||
|
@ -485,7 +479,7 @@ export default class Pressability {
|
|||
const delayLongPress = normalizeDelay(
|
||||
this._config.delayLongPress,
|
||||
10,
|
||||
DEFAULT_LONG_PRESS_DELAY_MS,
|
||||
DEFAULT_LONG_PRESS_DELAY_MS - delayPressIn,
|
||||
);
|
||||
this._longPressDelayTimeout = setTimeout(() => {
|
||||
this._handleLongPress(event);
|
||||
|
|
|
@ -355,7 +355,7 @@ describe('Pressability', () => {
|
|||
expect(config.onLongPress).toBeCalled();
|
||||
});
|
||||
|
||||
it('is called if pressed for 370ms after the press delay', () => {
|
||||
it('is called if pressed for 500ms after press started', () => {
|
||||
const {config, handlers} = createMockPressability({
|
||||
delayPressIn: 100,
|
||||
});
|
||||
|
@ -364,7 +364,7 @@ describe('Pressability', () => {
|
|||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
handlers.onResponderMove(createMockPressEvent('onResponderMove'));
|
||||
|
||||
jest.advanceTimersByTime(469);
|
||||
jest.advanceTimersByTime(499);
|
||||
expect(config.onLongPress).not.toBeCalled();
|
||||
jest.advanceTimersByTime(1);
|
||||
expect(config.onLongPress).toBeCalled();
|
||||
|
@ -393,7 +393,7 @@ describe('Pressability', () => {
|
|||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
handlers.onResponderMove(createMockPressEvent('onResponderMove'));
|
||||
|
||||
jest.advanceTimersByTime(139);
|
||||
jest.advanceTimersByTime(9);
|
||||
expect(config.onLongPress).not.toBeCalled();
|
||||
jest.advanceTimersByTime(1);
|
||||
expect(config.onLongPress).toBeCalled();
|
||||
|
@ -460,7 +460,13 @@ describe('Pressability', () => {
|
|||
const {config, handlers} = createMockPressability();
|
||||
|
||||
handlers.onStartShouldSetResponder();
|
||||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
handlers.onResponderGrant(
|
||||
createMockPressEvent({
|
||||
registrationName: 'onResponderGrant',
|
||||
pageX: 0,
|
||||
pageY: 0,
|
||||
}),
|
||||
);
|
||||
handlers.onResponderMove(
|
||||
createMockPressEvent({
|
||||
registrationName: 'onResponderMove',
|
||||
|
@ -475,7 +481,13 @@ describe('Pressability', () => {
|
|||
|
||||
// Subsequent long touch gesture should not carry over previous state.
|
||||
handlers.onStartShouldSetResponder();
|
||||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
handlers.onResponderGrant(
|
||||
createMockPressEvent({
|
||||
registrationName: 'onResponderGrant',
|
||||
pageX: 7,
|
||||
pageY: 8,
|
||||
}),
|
||||
);
|
||||
handlers.onResponderMove(
|
||||
// NOTE: Delta from (0, 0) is ~10.6 > 10, but should not matter.
|
||||
createMockPressEvent({
|
||||
|
@ -522,7 +534,7 @@ describe('Pressability', () => {
|
|||
expect(config.onPressIn).toBeCalled();
|
||||
});
|
||||
|
||||
it('is called after the default delay by default', () => {
|
||||
it('is called immediately by default', () => {
|
||||
const {config, handlers} = createMockPressability({
|
||||
delayPressIn: null,
|
||||
});
|
||||
|
@ -531,24 +543,6 @@ describe('Pressability', () => {
|
|||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
handlers.onResponderMove(createMockPressEvent('onResponderMove'));
|
||||
|
||||
jest.advanceTimersByTime(129);
|
||||
expect(config.onPressIn).not.toBeCalled();
|
||||
jest.advanceTimersByTime(1);
|
||||
expect(config.onPressIn).toBeCalled();
|
||||
});
|
||||
|
||||
it('falls back to the default delay if `delayPressIn` is omitted', () => {
|
||||
const {config, handlers} = createMockPressability({
|
||||
delayPressIn: null,
|
||||
});
|
||||
|
||||
handlers.onStartShouldSetResponder();
|
||||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
handlers.onResponderMove(createMockPressEvent('onResponderMove'));
|
||||
|
||||
jest.advanceTimersByTime(129);
|
||||
expect(config.onPressIn).not.toBeCalled();
|
||||
jest.advanceTimersByTime(1);
|
||||
expect(config.onPressIn).toBeCalled();
|
||||
});
|
||||
|
||||
|
@ -582,7 +576,9 @@ describe('Pressability', () => {
|
|||
|
||||
describe('onPressOut', () => {
|
||||
it('is called after `onResponderRelease` before `delayPressIn`', () => {
|
||||
const {config, handlers} = createMockPressability();
|
||||
const {config, handlers} = createMockPressability({
|
||||
delayPressIn: Number.EPSILON,
|
||||
});
|
||||
|
||||
handlers.onStartShouldSetResponder();
|
||||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
|
@ -596,7 +592,9 @@ describe('Pressability', () => {
|
|||
});
|
||||
|
||||
it('is called after `onResponderRelease` after `delayPressIn`', () => {
|
||||
const {config, handlers} = createMockPressability();
|
||||
const {config, handlers} = createMockPressability({
|
||||
delayPressIn: Number.EPSILON,
|
||||
});
|
||||
|
||||
handlers.onStartShouldSetResponder();
|
||||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
|
@ -611,7 +609,9 @@ describe('Pressability', () => {
|
|||
});
|
||||
|
||||
it('is not called after `onResponderTerminate` before `delayPressIn`', () => {
|
||||
const {config, handlers} = createMockPressability();
|
||||
const {config, handlers} = createMockPressability({
|
||||
delayPressIn: Number.EPSILON,
|
||||
});
|
||||
|
||||
handlers.onStartShouldSetResponder();
|
||||
handlers.onResponderGrant(createMockPressEvent('onResponderGrant'));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
PODS:
|
||||
- boost-for-react-native (1.63.0)
|
||||
- CocoaAsyncSocket (7.6.3)
|
||||
- CocoaAsyncSocket (7.6.4)
|
||||
- CocoaLibEvent (1.0.0)
|
||||
- DoubleConversion (1.1.6)
|
||||
- FBLazyVector (1000.0.0)
|
||||
|
@ -483,12 +483,12 @@ EXTERNAL SOURCES:
|
|||
:path: "../ReactCommon/yoga"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
boost-for-react-native: a110407d9db2642fd2e1bcd7c5a51c81f2521dc9
|
||||
CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987
|
||||
boost-for-react-native: dabda8622e76020607c2ae1e65cc0cda8b61479d
|
||||
CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
|
||||
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
|
||||
DoubleConversion: a1bc12a74baa397a2609e0f10e19b8062d864053
|
||||
FBLazyVector: 013c754530acf200c794982a91221cae2d73186a
|
||||
FBReactNativeSpec: 205d67e3c1809fe430adc7be677d28a32e4000ac
|
||||
DoubleConversion: 56a44bcfd14ab2ff66f5a146b2e875eb4b69b19b
|
||||
FBLazyVector: 57082d45af64862180fb08bf85b207e4fe1a5117
|
||||
FBReactNativeSpec: c7be324e668425db6c43a29ef9ebb0f76ae079ec
|
||||
Flipper: 10b225e352595f521be0e5badddd90e241336e89
|
||||
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
|
||||
Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
|
||||
|
@ -496,35 +496,35 @@ SPEC CHECKSUMS:
|
|||
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
|
||||
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
|
||||
FlipperKit: 88b7f0d0cf907ddc2137b85eeb7f3d4d8d9395c8
|
||||
glog: b3f6d74f3e2d33396addc0ee724d2b2b79fc3e00
|
||||
glog: 1cb7c408c781ae8f35bbababe459b45e3dee4ec1
|
||||
hermes: 12d049af0d8e8379c5b3b54ffb1919d670045bdc
|
||||
libevent: c2d56c8554ac18101d9c5f4c66ef762798209682
|
||||
libevent: ee9265726a1fc599dea382964fa304378affaa5f
|
||||
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
|
||||
RCT-Folly: 1347093ffe75e152d846f7e45a3ef901b60021aa
|
||||
RCTRequired: a35e388bfd87cfae16052677bc19332723c3adf1
|
||||
RCTTypeSafety: ca911637f851c632e50a5b45cc64eab3d2095060
|
||||
React: 21af9a5655a1db8877643ae7d2f5be19fbb47bfd
|
||||
React-ART: 3f4d3b94140d58fe5ece4a87bdb5580991e4e1fb
|
||||
React-callinvoker: 595e477e1cbbfe3797d9d234119a13b6ee85b398
|
||||
React-Core: 15d21e9ae6eb47f7bcbe993bcd0a96cce614f378
|
||||
React-CoreModules: feb2df372bf41cf30bd8544a7877ea893a06b7e1
|
||||
React-cxxreact: 9542dd531c5e32be8af79730a1872efd97d53684
|
||||
React-jsi: 5b0fca1241f693a72a8a8d4c304f40c4974ca091
|
||||
React-jsiexecutor: 63cb155b06c33c3fa419bf28cfeb8233ef3b0307
|
||||
React-jsinspector: 01ef3dbf108f91ad18fa116a535549a0011df122
|
||||
React-RCTActionSheet: 40d0e005ede6d2467c71afeb7ffa2ee6401141ed
|
||||
React-RCTAnimation: cd11932218e9b897008e2d318b865c93aa505212
|
||||
React-RCTBlob: 6df18a5bce5d5e80416f669e9718b43a5938c242
|
||||
React-RCTImage: fdbdaa9388e56484e54c494fca08353a0eb86bda
|
||||
React-RCTLinking: ef6a633aae7bfcdd93bbd561c0bc270f3550066e
|
||||
React-RCTNetwork: b1f15c879b25c7450948fd02e5865319fe7bc4ae
|
||||
React-RCTPushNotification: 39643b44ffc839ab7b08e77d67c87155eeb6be57
|
||||
React-RCTSettings: 0b0507c7bca2943d18eba209ded78a24d0a385b5
|
||||
React-RCTTest: 6feb342f17fd908c570180f70b68b0fdc0b1956e
|
||||
React-RCTText: a41b641c73e5ec0ec550e134b2da92c5cd5ff43d
|
||||
React-RCTVibration: 4eadd5837934450223a859e5c7323c6c6102a36f
|
||||
ReactCommon: d2c0a0c8eb10562cfbd5b7da17072f956d66b200
|
||||
Yoga: 52f1483134f196a52b290ed0982f07efc8c90011
|
||||
RCTRequired: 884ebf320f4b40a650e621813900670464496b66
|
||||
RCTTypeSafety: a9cda17938f4f450ad3ec1810e12a6d496ba0bdf
|
||||
React: b741e4abb40a1029be146a2897c90563a643e323
|
||||
React-ART: 0e3e66a7a1187e69c671b7ce5d3e2ad5b6d4a528
|
||||
React-callinvoker: c362409977231b613ed4dd40f251c7c8cf31fe8e
|
||||
React-Core: 3c89e44b3c69edf002e2434b9c4a9a02e9c498c7
|
||||
React-CoreModules: 86a1e291a562989319e44c2f7a9be64dfb7dd165
|
||||
React-cxxreact: fd69a2b7c7af6f2f6918503430f004a6cd1abce7
|
||||
React-jsi: c98bf484499763815354b02d80d861cdc3f4a64f
|
||||
React-jsiexecutor: 0d0a1c3dbbf9b5bd64387aa90dc3b27bab93c0de
|
||||
React-jsinspector: ad2f99f512a8e22e48d037dd04fb686710c85a1f
|
||||
React-RCTActionSheet: 3c2cafdfaff98e7cb40e0cd5b3c58981b6098ef8
|
||||
React-RCTAnimation: 52cbc676c289a54e6d53ff2b307bd1494a762755
|
||||
React-RCTBlob: 563d8cadd1493a1659475bcd67681dfb64555563
|
||||
React-RCTImage: b1f35b220756b2cf8e35e870afb6985b734277c7
|
||||
React-RCTLinking: b43784e99974ecb338ec9c930c39e3d99dbe6c50
|
||||
React-RCTNetwork: c1b88002c4f8534158010be237329d15c7b8c116
|
||||
React-RCTPushNotification: d47f806e0a6e5047e3a7608e967f871461bcf39f
|
||||
React-RCTSettings: e8d8db76845188b9a7ca1fa63a56260a6d245cac
|
||||
React-RCTTest: 01bf6c6ac33584453fafb21ae421bfbc39f53714
|
||||
React-RCTText: b90266a16b6988709a369e10c8b27e1872c79add
|
||||
React-RCTVibration: 75d0ae67165d904a7b34cfec65f9c7ae5fdaf364
|
||||
ReactCommon: 8850a0f5e4fbaef4b6b5c0fea0cf5c439d1ac4b2
|
||||
Yoga: 5c142ea67c974bf340e36c57851d11c128ea23de
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
PODFILE CHECKSUM: f92cb3c61bb71bceed9b9afe3944fbd8451be8b9
|
||||
|
|
|
@ -9,4 +9,4 @@ android.useAndroidX=true
|
|||
android.enableJetifier=true
|
||||
|
||||
# Version of flipper SDK to use with React Native
|
||||
FLIPPER_VERSION=0.37.0
|
||||
FLIPPER_VERSION=0.54.0
|
||||
|
|
|
@ -49,7 +49,7 @@ Pod::Spec.new do |s|
|
|||
s.header_dir = "React"
|
||||
s.framework = "JavaScriptCore"
|
||||
s.library = "stdc++"
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\"" }
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\"", "DEFINES_MODULE" => "YES" }
|
||||
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
|
||||
s.default_subspec = "Default"
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|||
__rnVersion = @{
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(63),
|
||||
RCTVersionPatch: @(2),
|
||||
RCTVersionPatch: @(3),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# TODO :: ANDROID patch to stay consistant with the npm version.
|
||||
VERSION_NAME=0.63.2
|
||||
VERSION_NAME=0.63.3
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
|
|
|
@ -689,7 +689,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|||
sendEvent(
|
||||
"keyboardDidHide",
|
||||
createKeyboardEventPayload(
|
||||
PixelUtil.toDIPFromPixel(mVisibleViewArea.height()),
|
||||
PixelUtil.toDIPFromPixel(mLastHeight),
|
||||
0,
|
||||
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
|
||||
0));
|
||||
|
|
|
@ -17,6 +17,6 @@ public class ReactNativeVersion {
|
|||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 0,
|
||||
"minor", 63,
|
||||
"patch", 2,
|
||||
"patch", 3,
|
||||
"prerelease", null);
|
||||
}
|
||||
|
|
|
@ -383,11 +383,25 @@ public class ReactEditText extends AppCompatEditText {
|
|||
@Override
|
||||
public void setInputType(int type) {
|
||||
Typeface tf = super.getTypeface();
|
||||
super.setInputType(type);
|
||||
mStagedInputType = type;
|
||||
// Input type password defaults to monospace font, so we need to re-apply the font
|
||||
super.setTypeface(tf);
|
||||
|
||||
int inputType = type;
|
||||
|
||||
// Set InputType to TYPE_CLASS_TEXT (the default one for Android) to fix a crash on Xiaomi
|
||||
// devices with Android Q. This crash happens when focusing on a email EditText within a
|
||||
// ScrollView, a prompt will be triggered but the system fail to locate it properly.
|
||||
// Here is an example post discussing about this issue:
|
||||
// https://github.com/facebook/react-native/issues/27204
|
||||
if (inputType == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS
|
||||
&& Build.VERSION.SDK_INT == Build.VERSION_CODES.Q
|
||||
&& Build.MANUFACTURER.startsWith("Xiaomi")) {
|
||||
inputType = InputType.TYPE_CLASS_TEXT;
|
||||
}
|
||||
|
||||
super.setInputType(inputType);
|
||||
mStagedInputType = inputType;
|
||||
|
||||
/**
|
||||
* If set forces multiline on input, because of a restriction on Android source that enables
|
||||
* multiline only for inputs of type Text and Multiline on method {@link
|
||||
|
@ -401,7 +415,7 @@ public class ReactEditText extends AppCompatEditText {
|
|||
// We override the KeyListener so that all keys on the soft input keyboard as well as hardware
|
||||
// keyboards work. Some KeyListeners like DigitsKeyListener will display the keyboard but not
|
||||
// accept all input from it
|
||||
mKeyListener.setInputType(type);
|
||||
mKeyListener.setInputType(inputType);
|
||||
setKeyListener(mKeyListener);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace facebook::react {
|
|||
constexpr struct {
|
||||
int32_t Major = 0;
|
||||
int32_t Minor = 63;
|
||||
int32_t Patch = 2;
|
||||
int32_t Patch = 3;
|
||||
std::string_view Prerelease = "";
|
||||
} ReactNativeVersion;
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ using namespace facebook::react;
|
|||
scale:imageSource.scale
|
||||
clipped:YES
|
||||
resizeMode:RCTResizeModeStretch
|
||||
priority:RCTImageLoaderPriorityImmediate
|
||||
attribution:{
|
||||
.surfaceId = surfaceId,
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ using namespace facebook::react;
|
|||
scale:imageSource.scale
|
||||
clipped:YES
|
||||
resizeMode:RCTResizeModeStretch
|
||||
priority:RCTImageLoaderPriorityImmediate
|
||||
attribution:{
|
||||
.surfaceId = surfaceId,
|
||||
}
|
||||
|
|
|
@ -91,9 +91,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"@react-native-community/cli": "^4.13.0",
|
||||
"@react-native-community/cli-platform-android": "^4.13.0",
|
||||
"@react-native-community/cli-platform-ios": "^4.13.0",
|
||||
"@react-native-community/cli": "^4.10.0",
|
||||
"@react-native-community/cli-platform-android": "^4.10.0",
|
||||
"@react-native-community/cli-platform-ios": "^4.10.0",
|
||||
"abort-controller": "^3.0.0",
|
||||
"anser": "^1.4.9",
|
||||
"base64-js": "^1.1.2",
|
||||
|
|
|
@ -54,17 +54,11 @@ case "$CONFIGURATION" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Setting up a project root was a workaround to enable support for non-standard
|
||||
# structures, including monorepos. Today, CLI supports that out of the box
|
||||
# and setting custom `PROJECT_ROOT` only makes it confusing.
|
||||
#
|
||||
# As a backwards-compatible change, I am leaving "PROJECT_ROOT" support for those
|
||||
# who already use it - it is likely a non-breaking removal.
|
||||
#
|
||||
# For new users, we default to $PWD - not changing things all.
|
||||
#
|
||||
# For context: https://github.com/facebook/react-native/commit/9ccde378b6e6379df61f9d968be6346ca6be7ead#commitcomment-37914902
|
||||
PROJECT_ROOT=${PROJECT_ROOT:-$PWD}
|
||||
# Path to react-native folder inside node_modules
|
||||
REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
# The project should be located next to where react-native is installed
|
||||
# in node_modules.
|
||||
PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../.."}
|
||||
|
||||
cd "$PROJECT_ROOT" || exit
|
||||
|
||||
|
@ -104,9 +98,6 @@ if [[ ! -x node && -d ${HOME}/.anyenv/bin ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Path to react-native folder inside node_modules
|
||||
REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
# check and assign NODE_BINARY env
|
||||
# shellcheck source=/dev/null
|
||||
source "$REACT_NATIVE_DIR/scripts/node-binary.sh"
|
||||
|
|
|
@ -70,34 +70,34 @@ def use_react_native! (options={})
|
|||
end
|
||||
end
|
||||
|
||||
def use_flipper!(versions = {})
|
||||
versions['Flipper'] ||= '~> 0.41.1'
|
||||
def use_flipper!(versions = {}, configurations: ['Debug'])
|
||||
versions['Flipper'] ||= '~> 0.54.0'
|
||||
versions['Flipper-DoubleConversion'] ||= '1.1.7'
|
||||
versions['Flipper-Folly'] ||= '~> 2.2'
|
||||
versions['Flipper-Glog'] ||= '0.3.6'
|
||||
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
|
||||
versions['Flipper-RSocket'] ||= '~> 1.1'
|
||||
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configurations => configurations
|
||||
# List all transitive dependencies for FlipperKit pods
|
||||
# to avoid them being linked in Release builds
|
||||
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'Flipper-DoubleConversion', versions['Flipper-DoubleConversion'], :configuration => 'Debug'
|
||||
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
|
||||
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
|
||||
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
|
||||
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'Flipper', versions['Flipper'], :configurations => configurations
|
||||
pod 'Flipper-DoubleConversion', versions['Flipper-DoubleConversion'], :configurations => configurations
|
||||
pod 'Flipper-Folly', versions['Flipper-Folly'], :configurations => configurations
|
||||
pod 'Flipper-Glog', versions['Flipper-Glog'], :configurations => configurations
|
||||
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configurations => configurations
|
||||
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configurations => configurations
|
||||
pod 'FlipperKit/Core', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/CppBridge', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FBDefines', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configurations => configurations
|
||||
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configurations => configurations
|
||||
end
|
||||
|
||||
# Post Install processing for Flipper
|
||||
|
|
|
@ -25,4 +25,4 @@ android.useAndroidX=true
|
|||
android.enableJetifier=true
|
||||
|
||||
# Version of flipper SDK to use with React Native
|
||||
FLIPPER_VERSION=0.37.0
|
||||
FLIPPER_VERSION=0.54.0
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"react": "16.13.1",
|
||||
"react-native": "0.63.2"
|
||||
"react-native": "0.63.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
|
|
103
yarn.lock
103
yarn.lock
|
@ -1397,23 +1397,12 @@
|
|||
dependencies:
|
||||
serve-static "^1.13.1"
|
||||
|
||||
"@react-native-community/cli-hermes@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-4.13.0.tgz#6243ed9c709dad5e523f1ccd7d21066b32f2899d"
|
||||
integrity sha512-oG+w0Uby6rSGsUkJGLvMQctZ5eVRLLfhf84lLyz942OEDxFRa9U19YJxOe9FmgCKtotbYiM3P/XhK+SVCuerPQ==
|
||||
"@react-native-community/cli-platform-android@^4.10.0":
|
||||
version "4.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.10.0.tgz#c1e8eb4395fc51335e39fc8c09ca96517446a88d"
|
||||
integrity sha512-/nfCQDbrS0F2u6nwo+4qgx+Fjcv/Rqrn4JbQWdGWEXULfCN+g2Zx9O7sSDNjV7AxOwd+sBOnU945wHkSQdASFA==
|
||||
dependencies:
|
||||
"@react-native-community/cli-platform-android" "^4.13.0"
|
||||
"@react-native-community/cli-tools" "^4.13.0"
|
||||
chalk "^3.0.0"
|
||||
hermes-profile-transformer "^0.0.6"
|
||||
ip "^1.1.5"
|
||||
|
||||
"@react-native-community/cli-platform-android@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.13.0.tgz#922681ec82ee1aadd993598b814df1152118be02"
|
||||
integrity sha512-3i8sX8GklEytUZwPnojuoFbCjIRzMugCdzDIdZ9UNmi/OhD4/8mLGO0dgXfT4sMWjZwu3qjy45sFfk2zOAgHbA==
|
||||
dependencies:
|
||||
"@react-native-community/cli-tools" "^4.13.0"
|
||||
"@react-native-community/cli-tools" "^4.9.0"
|
||||
chalk "^3.0.0"
|
||||
execa "^1.0.0"
|
||||
fs-extra "^8.1.0"
|
||||
|
@ -1424,12 +1413,12 @@
|
|||
slash "^3.0.0"
|
||||
xmldoc "^1.1.2"
|
||||
|
||||
"@react-native-community/cli-platform-ios@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.13.0.tgz#a738915c68cac86df54e578b59a1311ea62b1aef"
|
||||
integrity sha512-6THlTu8zp62efkzimfGr3VIuQJ2514o+vScZERJCV1xgEi8XtV7mb/ZKt9o6Y9WGxKKkc0E0b/aVAtgy+L27CA==
|
||||
"@react-native-community/cli-platform-ios@^4.10.0":
|
||||
version "4.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.10.0.tgz#ef9b3adc5946bd43bbc839d0c8f26c1964fad117"
|
||||
integrity sha512-3xiaqnmg0hqyMwCfhoGXkJ9GGIxVSwLpntSUo1YiZIn+PLC385ljSer4YfFvWc6N3jd9ElRa31WKtCD9kMAvkg==
|
||||
dependencies:
|
||||
"@react-native-community/cli-tools" "^4.13.0"
|
||||
"@react-native-community/cli-tools" "^4.9.0"
|
||||
chalk "^3.0.0"
|
||||
glob "^7.1.3"
|
||||
js-yaml "^3.13.1"
|
||||
|
@ -1437,13 +1426,13 @@
|
|||
plist "^3.0.1"
|
||||
xcode "^2.0.0"
|
||||
|
||||
"@react-native-community/cli-server-api@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-4.13.0.tgz#ef0e53fe0edc7356d62bca725ca47cb368f748a5"
|
||||
integrity sha512-ER138ChLc1YYX7j9yE6fDm4DdNdsHThr+pla/B6iZoKje1r7TwymDdKaUvOsYalG7sWG9glW3bofcCq+Yh0Dvw==
|
||||
"@react-native-community/cli-server-api@^4.9.0":
|
||||
version "4.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-4.9.0.tgz#503f50331c6e2cc8c5fcf6b693170e3a3a669d1a"
|
||||
integrity sha512-lKBIXJjFLyu4+6Vhhj/QzD41aQGkVi8xWLqTYCgi26d61kjLuuZs0Xer02DPJK3+YADKExVdWrJzVHfJ7zYlTA==
|
||||
dependencies:
|
||||
"@react-native-community/cli-debugger-ui" "^4.9.0"
|
||||
"@react-native-community/cli-tools" "^4.13.0"
|
||||
"@react-native-community/cli-tools" "^4.9.0"
|
||||
compression "^1.7.1"
|
||||
connect "^3.6.5"
|
||||
errorhandler "^1.5.0"
|
||||
|
@ -1451,10 +1440,10 @@
|
|||
serve-static "^1.13.1"
|
||||
ws "^1.1.0"
|
||||
|
||||
"@react-native-community/cli-tools@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.13.0.tgz#b406463d33af16cedc4305a9a9257ed32845cf1b"
|
||||
integrity sha512-s4f489h5+EJksn4CfheLgv5PGOM0CDmK1UEBLw2t/ncWs3cW2VI7vXzndcd/WJHTv3GntJhXDcJMuL+Z2IAOgg==
|
||||
"@react-native-community/cli-tools@^4.9.0":
|
||||
version "4.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.9.0.tgz#d8fd0326cc2fcaeb8c920baf24b68b63c8164fa2"
|
||||
integrity sha512-vCeYkJ3n/EIaW3lAfznzojMffGxYhCUzwZzwBuC3+O+gYxkymdpletqNYLLEa04DzJr174mxgbgBw8g5IP91yA==
|
||||
dependencies:
|
||||
chalk "^3.0.0"
|
||||
lodash "^4.17.15"
|
||||
|
@ -1463,28 +1452,27 @@
|
|||
open "^6.2.0"
|
||||
shell-quote "1.6.1"
|
||||
|
||||
"@react-native-community/cli-types@^4.10.1":
|
||||
version "4.10.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-4.10.1.tgz#d68a2dcd1649d3b3774823c64e5e9ce55bfbe1c9"
|
||||
integrity sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ==
|
||||
"@react-native-community/cli-types@^4.10.0":
|
||||
version "4.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-4.10.0.tgz#aea4276c035fffaeb7deae029ad8a89054fbabfc"
|
||||
integrity sha512-gU0Opspa/WYLQdmY0BKe0VLwD+SuNatypRvBP6nlyzS8/qmSaZ73047jHWYQavhfqn/WxHzBLQSwZK0a7ROfeg==
|
||||
|
||||
"@react-native-community/cli@^4.13.0":
|
||||
version "4.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.13.0.tgz#04d5032f9b2b423c61ceef6be83b1bcc8a37db75"
|
||||
integrity sha512-R+1VehIQ6VTLf+e7YOwzJk0F9tstfeSC4xy7oT6GSgB3FnXbTJGHFUp4siyO68Ae/gzGqt8SiUO145teWkP+ZA==
|
||||
"@react-native-community/cli@^4.10.0":
|
||||
version "4.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.10.0.tgz#13f4fa98b66ea756e6480864c71304b49a9bca44"
|
||||
integrity sha512-rg6pIMmSodqFTJ5GbdTPjIoumCE8Vm6H0DA5LzXprnGozOxJ0hRRDJqX37tR9sH50ABOQpSWs/+etJhgF2Tlxw==
|
||||
dependencies:
|
||||
"@hapi/joi" "^15.0.3"
|
||||
"@react-native-community/cli-debugger-ui" "^4.9.0"
|
||||
"@react-native-community/cli-hermes" "^4.13.0"
|
||||
"@react-native-community/cli-server-api" "^4.13.0"
|
||||
"@react-native-community/cli-tools" "^4.13.0"
|
||||
"@react-native-community/cli-types" "^4.10.1"
|
||||
"@react-native-community/cli-server-api" "^4.9.0"
|
||||
"@react-native-community/cli-tools" "^4.9.0"
|
||||
"@react-native-community/cli-types" "^4.10.0"
|
||||
chalk "^3.0.0"
|
||||
command-exists "^1.2.8"
|
||||
commander "^2.19.0"
|
||||
cosmiconfig "^5.1.0"
|
||||
deepmerge "^3.2.0"
|
||||
envinfo "^7.7.2"
|
||||
envinfo "^7.1.0"
|
||||
execa "^1.0.0"
|
||||
find-up "^4.1.0"
|
||||
fs-extra "^8.1.0"
|
||||
|
@ -2961,7 +2949,7 @@ end-of-stream@^1.1.0:
|
|||
dependencies:
|
||||
once "^1.4.0"
|
||||
|
||||
envinfo@^7.7.2:
|
||||
envinfo@^7.1.0:
|
||||
version "7.7.3"
|
||||
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc"
|
||||
integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==
|
||||
|
@ -3851,13 +3839,6 @@ hermes-engine@~0.5.0:
|
|||
resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.5.0.tgz#d914acce72e9657b3c98875ad3f9094d8643f327"
|
||||
integrity sha512-jSuHiOhdh2+IF3bH2gLpQ37eMkdUrEb9GK6PoG3rLRaUDK3Zn2Y9fXM+wyDfoUTA3gz9EET0/IIWk5k21qp4kw==
|
||||
|
||||
hermes-profile-transformer@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz#bd0f5ecceda80dd0ddaae443469ab26fb38fc27b"
|
||||
integrity sha512-cnN7bQUm65UWOy6cbGcCcZ3rpwW8Q/j4OP5aWRhEry4Z2t2aR1cjrbp0BS+KiBN0smvP1caBgAuxutvyvJILzQ==
|
||||
dependencies:
|
||||
source-map "^0.7.3"
|
||||
|
||||
home-or-tmp@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb"
|
||||
|
@ -4023,11 +4004,6 @@ invert-kv@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02"
|
||||
integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==
|
||||
|
||||
ip@^1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
|
||||
integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
|
||||
|
||||
is-accessor-descriptor@^0.1.6:
|
||||
version "0.1.6"
|
||||
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
|
||||
|
@ -7072,11 +7048,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
|
|||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
source-map@^0.7.3:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
|
||||
|
||||
spdx-correct@^3.0.0:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e"
|
||||
|
@ -7950,7 +7921,7 @@ yargs-parser@^15.0.0:
|
|||
camelcase "^5.0.0"
|
||||
decamelize "^1.2.0"
|
||||
|
||||
yargs-parser@^18.1.2:
|
||||
yargs-parser@^18.1.1:
|
||||
version "18.1.3"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
|
||||
integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
|
||||
|
@ -8009,9 +7980,9 @@ yargs@^14.2.0:
|
|||
yargs-parser "^15.0.0"
|
||||
|
||||
yargs@^15.1.0:
|
||||
version "15.4.1"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
|
||||
integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
|
||||
version "15.3.1"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b"
|
||||
integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==
|
||||
dependencies:
|
||||
cliui "^6.0.0"
|
||||
decamelize "^1.2.0"
|
||||
|
@ -8023,4 +7994,4 @@ yargs@^15.1.0:
|
|||
string-width "^4.2.0"
|
||||
which-module "^2.0.0"
|
||||
y18n "^4.0.0"
|
||||
yargs-parser "^18.1.2"
|
||||
yargs-parser "^18.1.1"
|
||||
|
|
Загрузка…
Ссылка в новой задаче