Skip to content

Commit 994089c

Browse files
committed
Merge branch 'main' into text-input-errors
2 parents 3a1ef4a + 61b013e commit 994089c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+552
-101
lines changed

.circleci/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,10 @@ jobs:
727727
name: Set USE_HERMES=1
728728
command: echo "export USE_HERMES=1" >> $BASH_ENV
729729

730+
- run:
731+
name: Set BUILD_HERMES_SOURCE=1
732+
command: echo "export BUILD_HERMES_SOURCE=1" >> $BASH_ENV
733+
730734
- with_brew_cache_span:
731735
steps:
732736
- brew_install:

.github/workflows/needs-attention.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Apply Needs Attention Label
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: Apply Needs Attention Label
1414
uses: hramos/needs-attention@v1
1515
with:

.github/workflows/on-issue-labeled.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Respond to Issue Based on Label
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: Respond to Issue Based on Label
1414
uses: hramos/respond-to-issue-based-on-label@v2
1515
with:

.github/workflows/stale-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
issues: write
1010
pull-requests: write
1111
steps:
12-
- uses: actions/stale@v4
12+
- uses: actions/stale@v5
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
1515
days-before-stale: 180

.github/workflows/test-docker-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Test Docker
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- name: Free up space by removing unnecessary folders
1818
run: |
1919
sudo rm -rf /usr/share/dotnet

Libraries/Image/RCTImageCache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@
3939
@end
4040

4141
@interface RCTImageCache : NSObject <RCTImageCache>
42+
43+
RCT_EXTERN void RCTSetImageCacheLimits(NSUInteger maxCachableDecodedImageSizeInBytes, NSUInteger imageCacheTotalCostLimit);
44+
4245
@end

Libraries/Image/RCTImageCache.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818

1919
#import <React/RCTImageUtils.h>
2020

21-
static const NSUInteger RCTMaxCachableDecodedImageSizeInBytes = 2097152; // 2 MB
21+
static NSUInteger RCTMaxCachableDecodedImageSizeInBytes = 2*1024*1024;
22+
static NSUInteger RCTImageCacheTotalCostLimit = 20*1024*1024;
23+
24+
void RCTSetImageCacheLimits(NSUInteger maxCachableDecodedImageSizeInBytes, NSUInteger imageCacheTotalCostLimit) {
25+
RCTMaxCachableDecodedImageSizeInBytes = maxCachableDecodedImageSizeInBytes;
26+
RCTImageCacheTotalCostLimit = imageCacheTotalCostLimit;
27+
}
2228

2329
static NSString *RCTCacheKeyForImage(NSString *imageTag, CGSize size, CGFloat scale,
2430
RCTResizeMode resizeMode)
@@ -38,7 +44,7 @@ - (instancetype)init
3844
{
3945
if (self = [super init]) {
4046
_decodedImageCache = [NSCache new];
41-
_decodedImageCache.totalCostLimit = 20 * 1024 * 1024; // 20 MB
47+
_decodedImageCache.totalCostLimit = RCTImageCacheTotalCostLimit;
4248
_cacheStaleTimes = [NSMutableDictionary new];
4349

4450
[[NSNotificationCenter defaultCenter] addObserver:self

Libraries/NativeComponent/PlatformBaseViewConfig.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,32 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName =
363363
captured: 'onTouchEndCapture',
364364
},
365365
},
366+
367+
// Pointer Events
368+
topPointerCancel: {
369+
phasedRegistrationNames: {
370+
captured: 'onPointerCancelCapture',
371+
bubbled: 'onPointerCancel',
372+
},
373+
},
374+
topPointerDown: {
375+
phasedRegistrationNames: {
376+
captured: 'onPointerDownCapture',
377+
bubbled: 'onPointerDown',
378+
},
379+
},
380+
topPointerMove2: {
381+
phasedRegistrationNames: {
382+
captured: 'onPointerMove2Capture',
383+
bubbled: 'onPointerMove2',
384+
},
385+
},
386+
topPointerUp: {
387+
phasedRegistrationNames: {
388+
captured: 'onPointerUpCapture',
389+
bubbled: 'onPointerUp',
390+
},
391+
},
366392
},
367393
directEventTypes: {
368394
topAccessibilityAction: {

Libraries/PushNotificationIOS/RCTPushNotificationManager.mm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
331331
RCT_EXPORT_METHOD(checkPermissions:(RCTResponseSenderBlock)callback)
332332
{
333333
if (RCTRunningInAppExtension()) {
334-
callback(@[RCTSettingsDictForUNNotificationSettings(NO, NO, NO)]);
334+
callback(@[RCTSettingsDictForUNNotificationSettings(NO, NO, NO, NO, NO, NO, UNAuthorizationStatusNotDetermined)]);
335335
return;
336336
}
337337

@@ -343,11 +343,15 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
343343
static inline NSDictionary *RCTPromiseResolveValueForUNNotificationSettings(UNNotificationSettings* _Nonnull settings) {
344344
return RCTSettingsDictForUNNotificationSettings(settings.alertSetting == UNNotificationSettingEnabled,
345345
settings.badgeSetting == UNNotificationSettingEnabled,
346-
settings.soundSetting == UNNotificationSettingEnabled);
346+
settings.soundSetting == UNNotificationSettingEnabled,
347+
settings.criticalAlertSetting == UNNotificationSettingEnabled,
348+
settings.lockScreenSetting == UNNotificationSettingEnabled,
349+
settings.notificationCenterSetting == UNNotificationSettingEnabled,
350+
settings.authorizationStatus);
347351
}
348352

349-
static inline NSDictionary *RCTSettingsDictForUNNotificationSettings(BOOL alert, BOOL badge, BOOL sound) {
350-
return @{@"alert": @(alert), @"badge": @(badge), @"sound": @(sound)};
353+
static inline NSDictionary *RCTSettingsDictForUNNotificationSettings(BOOL alert, BOOL badge, BOOL sound, BOOL critical, BOOL lockScreen, BOOL notificationCenter, UNAuthorizationStatus authorizationStatus) {
354+
return @{@"alert": @(alert), @"badge": @(badge), @"sound": @(sound), @"critical": @(critical), @"lockScreen": @(lockScreen), @"notificationCenter": @(notificationCenter), @"authorizationStatus": @(authorizationStatus)};
351355
}
352356

353357
RCT_EXPORT_METHOD(presentLocalNotification:(JS::NativePushNotificationManagerIOS::Notification &)notification)

React/Base/RCTConstants.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollec
1515
*/
1616
RCT_EXTERN BOOL RCTExperimentGetPreemptiveViewAllocationDisabled(void);
1717
RCT_EXTERN void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value);
18+
19+
/*
20+
* W3C Pointer Events
21+
*/
22+
RCT_EXTERN BOOL RCTGetDispatchW3CPointerEvents(void);
23+
RCT_EXTERN void RCTSetDispatchW3CPointerEvents(BOOL value);

0 commit comments

Comments
 (0)