react-native-tvos 0.76.1-0 → 0.76.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +9 -1
- package/Libraries/Components/Pressable/Pressable.js +4 -16
- package/Libraries/Components/TV/TVViewPropTypes.js +2 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +1 -1
- package/Libraries/Components/Touchable/Touchable.js +0 -43
- package/Libraries/Components/Touchable/TouchableBounce.js +0 -33
- package/Libraries/Components/Touchable/TouchableHighlight.js +12 -47
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +0 -33
- package/Libraries/Components/Touchable/TouchableOpacity.js +12 -44
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +0 -19
- package/Libraries/Components/View/ViewNativeComponent.js +6 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +12 -1
- package/Libraries/Components/View/ViewPropTypes.js +7 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +1 -7
- package/Libraries/LogBox/Data/LogBoxData.js +2 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +19 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +6 -0
- package/Libraries/NativeComponent/TVViewConfig.js +4 -0
- package/Libraries/Pressability/Pressability.js +45 -28
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +1 -0
- package/Libraries/Types/CoreEventTypes.d.ts +21 -0
- package/Libraries/Types/CoreEventTypes.js +6 -0
- package/README.md +9 -7
- package/React/Base/RCTTVRemoteHandler.m +0 -19
- package/React/Base/RCTTVRemoteSelectHandler.h +27 -0
- package/React/Base/RCTTVRemoteSelectHandler.m +120 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +12 -8
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +47 -3
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +8 -0
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +51 -44
- package/React/Views/RCTTVView.h +19 -6
- package/React/Views/RCTTVView.m +63 -55
- package/React/Views/RCTViewManager.m +4 -0
- package/React/Views/ScrollView/RCTScrollView.m +12 -8
- package/ReactAndroid/api/ReactAndroid.api +0 -1
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/TimingModule.kt +0 -8
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/BlurEvent.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FocusEvent.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PressInEvent.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PressOutEvent.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +11 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +212 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +47 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.cpp +3 -2
- package/ReactCommon/react/renderer/components/view/BaseViewEventEmitter.cpp +18 -0
- package/ReactCommon/react/renderer/components/view/BaseViewEventEmitter.h +8 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.h +12 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +165 -2
- package/cli.js +1 -1
- package/index.js +0 -4
- package/package.json +8 -8
- package/scripts/codegen/generate-artifacts-executor.js +3 -3
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/types/modules/Codegen.d.ts +6 -0
- package/types/public/ReactNativeTVTypes.d.ts +2 -2
- package/Libraries/Components/TabBarIOS/RCTTabBarItemNativeComponent.js +0 -99
- package/Libraries/Components/TabBarIOS/RCTTabBarNativeComponent.js +0 -32
- package/Libraries/Components/TabBarIOS/TabBarIOS.ios.js +0 -59
- package/Libraries/Components/TabBarIOS/TabBarIOS.js +0 -52
- package/Libraries/Components/TabBarIOS/TabBarIOSProps.js +0 -52
- package/Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js +0 -177
- package/Libraries/Components/TabBarIOS/TabBarItemIOS.js +0 -55
- package/Libraries/Components/Touchable/TVTouchable.js +0 -71
- package/React/Views/RCTTabBar.h +0 -22
- package/React/Views/RCTTabBar.m +0 -237
- package/React/Views/RCTTabBarItem.h +0 -35
- package/React/Views/RCTTabBarItem.m +0 -139
- package/React/Views/RCTTabBarItemManager.h +0 -12
- package/React/Views/RCTTabBarItemManager.m +0 -38
- package/React/Views/RCTTabBarManager.h +0 -12
- package/React/Views/RCTTabBarManager.m +0 -81
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTTabBarItem.h"
|
|
9
|
-
|
|
10
|
-
#import "RCTConvert.h"
|
|
11
|
-
#import "RCTLog.h"
|
|
12
|
-
#import "UIView+React.h"
|
|
13
|
-
|
|
14
|
-
@implementation RCTConvert (UITabBarSystemItem)
|
|
15
|
-
|
|
16
|
-
RCT_ENUM_CONVERTER(UITabBarSystemItem, (@{
|
|
17
|
-
@"bookmarks": @(UITabBarSystemItemBookmarks),
|
|
18
|
-
@"contacts": @(UITabBarSystemItemContacts),
|
|
19
|
-
@"downloads": @(UITabBarSystemItemDownloads),
|
|
20
|
-
@"favorites": @(UITabBarSystemItemFavorites),
|
|
21
|
-
@"featured": @(UITabBarSystemItemFeatured),
|
|
22
|
-
@"history": @(UITabBarSystemItemHistory),
|
|
23
|
-
@"more": @(UITabBarSystemItemMore),
|
|
24
|
-
@"most-recent": @(UITabBarSystemItemMostRecent),
|
|
25
|
-
@"most-viewed": @(UITabBarSystemItemMostViewed),
|
|
26
|
-
@"recents": @(UITabBarSystemItemRecents),
|
|
27
|
-
@"search": @(UITabBarSystemItemSearch),
|
|
28
|
-
@"top-rated": @(UITabBarSystemItemTopRated),
|
|
29
|
-
}), NSNotFound, integerValue)
|
|
30
|
-
|
|
31
|
-
@end
|
|
32
|
-
|
|
33
|
-
@implementation RCTTabBarItem{
|
|
34
|
-
UITapGestureRecognizer *_selectRecognizer;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@synthesize barItem = _barItem;
|
|
38
|
-
|
|
39
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
40
|
-
{
|
|
41
|
-
if ((self = [super initWithFrame:frame])) {
|
|
42
|
-
_systemIcon = NSNotFound;
|
|
43
|
-
#if TARGET_OS_TV
|
|
44
|
-
_wasSelectedInJS = NO;
|
|
45
|
-
#endif
|
|
46
|
-
}
|
|
47
|
-
return self;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
- (UITabBarItem *)barItem
|
|
51
|
-
{
|
|
52
|
-
if (!_barItem) {
|
|
53
|
-
_barItem = [UITabBarItem new];
|
|
54
|
-
_systemIcon = NSNotFound;
|
|
55
|
-
}
|
|
56
|
-
return _barItem;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
- (void)setTestID:(NSString *)testID
|
|
60
|
-
{
|
|
61
|
-
self.barItem.accessibilityIdentifier = testID;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
- (void)setBadge:(id)badge
|
|
65
|
-
{
|
|
66
|
-
_badge = [badge copy];
|
|
67
|
-
self.barItem.badgeValue = [badge description];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
- (void)setSystemIcon:(UITabBarSystemItem)systemIcon
|
|
71
|
-
{
|
|
72
|
-
if (_systemIcon != systemIcon) {
|
|
73
|
-
_systemIcon = systemIcon;
|
|
74
|
-
UITabBarItem *oldItem = _barItem;
|
|
75
|
-
_barItem = [[UITabBarItem alloc] initWithTabBarSystemItem:_systemIcon
|
|
76
|
-
tag:oldItem.tag];
|
|
77
|
-
_barItem.title = oldItem.title;
|
|
78
|
-
_barItem.imageInsets = oldItem.imageInsets;
|
|
79
|
-
_barItem.badgeValue = oldItem.badgeValue;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
- (void)setIcon:(UIImage *)icon
|
|
84
|
-
{
|
|
85
|
-
_icon = icon;
|
|
86
|
-
if (_icon && _systemIcon != NSNotFound) {
|
|
87
|
-
_systemIcon = NSNotFound;
|
|
88
|
-
UITabBarItem *oldItem = _barItem;
|
|
89
|
-
_barItem = [UITabBarItem new];
|
|
90
|
-
_barItem.title = oldItem.title;
|
|
91
|
-
_barItem.imageInsets = oldItem.imageInsets;
|
|
92
|
-
_barItem.selectedImage = oldItem.selectedImage;
|
|
93
|
-
_barItem.badgeValue = oldItem.badgeValue;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (_renderAsOriginal) {
|
|
97
|
-
self.barItem.image = [_icon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
98
|
-
} else {
|
|
99
|
-
self.barItem.image = _icon;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
- (void)setSelectedIcon:(UIImage *)selectedIcon
|
|
104
|
-
{
|
|
105
|
-
_selectedIcon = selectedIcon;
|
|
106
|
-
|
|
107
|
-
if (_renderAsOriginal) {
|
|
108
|
-
self.barItem.selectedImage = [_selectedIcon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
109
|
-
} else {
|
|
110
|
-
self.barItem.selectedImage = _selectedIcon;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
- (void)setBadgeColor:(UIColor *)badgeColor
|
|
115
|
-
{
|
|
116
|
-
// badgeColor available since iOS 10
|
|
117
|
-
if ([self.barItem respondsToSelector:@selector(badgeColor)]) {
|
|
118
|
-
self.barItem.badgeColor = badgeColor;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
- (UIViewController *)reactViewController
|
|
123
|
-
{
|
|
124
|
-
return self.superview.reactViewController;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
#if TARGET_OS_TV
|
|
128
|
-
|
|
129
|
-
// On Apple TV, we let native control the tab bar selection after initial render
|
|
130
|
-
- (void)setSelected:(BOOL)selected
|
|
131
|
-
{
|
|
132
|
-
if (!_wasSelectedInJS) {
|
|
133
|
-
_selected = selected;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
#endif
|
|
138
|
-
|
|
139
|
-
@end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <React/RCTViewManager.h>
|
|
9
|
-
|
|
10
|
-
@interface RCTTabBarItemManager : RCTViewManager
|
|
11
|
-
|
|
12
|
-
@end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTTabBarItemManager.h"
|
|
9
|
-
|
|
10
|
-
#import "RCTConvert.h"
|
|
11
|
-
#import "RCTTabBarItem.h"
|
|
12
|
-
|
|
13
|
-
@implementation RCTTabBarItemManager
|
|
14
|
-
|
|
15
|
-
RCT_EXPORT_MODULE()
|
|
16
|
-
|
|
17
|
-
- (UIView *)view
|
|
18
|
-
{
|
|
19
|
-
return [RCTTabBarItem new];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
RCT_EXPORT_VIEW_PROPERTY(badge, id /* NSString or NSNumber */)
|
|
23
|
-
RCT_EXPORT_VIEW_PROPERTY(renderAsOriginal, BOOL)
|
|
24
|
-
RCT_EXPORT_VIEW_PROPERTY(selected, BOOL)
|
|
25
|
-
RCT_EXPORT_VIEW_PROPERTY(icon, UIImage)
|
|
26
|
-
RCT_EXPORT_VIEW_PROPERTY(selectedIcon, UIImage)
|
|
27
|
-
RCT_EXPORT_VIEW_PROPERTY(systemIcon, UITabBarSystemItem)
|
|
28
|
-
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
29
|
-
RCT_EXPORT_VIEW_PROPERTY(badgeColor, UIColor)
|
|
30
|
-
RCT_EXPORT_VIEW_PROPERTY(isTVSelectable, BOOL)
|
|
31
|
-
RCT_EXPORT_VIEW_PROPERTY(testID, NSString)
|
|
32
|
-
RCT_CUSTOM_VIEW_PROPERTY(title, NSString, RCTTabBarItem)
|
|
33
|
-
{
|
|
34
|
-
view.barItem.title = json ? [RCTConvert NSString:json] : defaultView.barItem.title;
|
|
35
|
-
view.barItem.imageInsets = view.barItem.title.length ? UIEdgeInsetsZero : (UIEdgeInsets){6, 0, -6, 0};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <React/RCTViewManager.h>
|
|
9
|
-
|
|
10
|
-
@interface RCTTabBarManager : RCTViewManager
|
|
11
|
-
|
|
12
|
-
@end
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTTabBarManager.h"
|
|
9
|
-
|
|
10
|
-
#import "RCTBridge.h"
|
|
11
|
-
#import "RCTTabBar.h"
|
|
12
|
-
#import "RCTUIManager.h"
|
|
13
|
-
#import "RCTUIManagerObserverCoordinator.h"
|
|
14
|
-
|
|
15
|
-
@implementation RCTConvert (UITabBar)
|
|
16
|
-
|
|
17
|
-
RCT_ENUM_CONVERTER(UITabBarItemPositioning, (@{
|
|
18
|
-
@"fill" : @(UITabBarItemPositioningFill),
|
|
19
|
-
@"auto" : @(UITabBarItemPositioningAutomatic),
|
|
20
|
-
@"center" : @(UITabBarItemPositioningCentered)
|
|
21
|
-
}), UITabBarItemPositioningAutomatic, integerValue)
|
|
22
|
-
|
|
23
|
-
@end
|
|
24
|
-
|
|
25
|
-
@interface RCTTabBarManager () <RCTUIManagerObserver>
|
|
26
|
-
|
|
27
|
-
@end
|
|
28
|
-
|
|
29
|
-
@implementation RCTTabBarManager
|
|
30
|
-
{
|
|
31
|
-
// The main thread only.
|
|
32
|
-
NSHashTable<RCTTabBar *> *_viewRegistry;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
- (void)setBridge:(RCTBridge *)bridge
|
|
36
|
-
{
|
|
37
|
-
[super setBridge:bridge];
|
|
38
|
-
|
|
39
|
-
[self.bridge.uiManager.observerCoordinator addObserver:self];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
- (void)invalidate
|
|
43
|
-
{
|
|
44
|
-
[self.bridge.uiManager.observerCoordinator removeObserver:self];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
RCT_EXPORT_MODULE()
|
|
48
|
-
|
|
49
|
-
- (UIView *)view
|
|
50
|
-
{
|
|
51
|
-
if (!_viewRegistry) {
|
|
52
|
-
_viewRegistry = [NSHashTable hashTableWithOptions:NSPointerFunctionsWeakMemory];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
RCTTabBar *view = [RCTTabBar new];
|
|
56
|
-
[_viewRegistry addObject:view];
|
|
57
|
-
return view;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
RCT_EXPORT_VIEW_PROPERTY(unselectedTintColor, UIColor)
|
|
61
|
-
RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
|
|
62
|
-
RCT_EXPORT_VIEW_PROPERTY(barTintColor, UIColor)
|
|
63
|
-
RCT_EXPORT_VIEW_PROPERTY(translucent, BOOL)
|
|
64
|
-
#if !TARGET_OS_TV
|
|
65
|
-
RCT_EXPORT_VIEW_PROPERTY(barStyle, UIBarStyle)
|
|
66
|
-
#endif
|
|
67
|
-
RCT_EXPORT_VIEW_PROPERTY(itemPositioning, UITabBarItemPositioning)
|
|
68
|
-
RCT_EXPORT_VIEW_PROPERTY(unselectedItemTintColor, UIColor)
|
|
69
|
-
|
|
70
|
-
#pragma mark - RCTUIManagerObserver
|
|
71
|
-
|
|
72
|
-
- (void)uiManagerDidPerformMounting:(__unused RCTUIManager *)manager
|
|
73
|
-
{
|
|
74
|
-
RCTExecuteOnMainQueue(^{
|
|
75
|
-
for (RCTTabBar *view in self->_viewRegistry) {
|
|
76
|
-
[view uiManagerDidPerformMounting];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@end
|