react-native-tvos 0.80.0-0 → 0.80.1-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.
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 80,
19
- patch: 0,
19
+ patch: 1,
20
20
  prerelease: '0',
21
21
  };
22
22
 
@@ -24,4 +24,8 @@ NS_ASSUME_NONNULL_BEGIN
24
24
 
25
25
  @end
26
26
 
27
+ @interface RCTTVRemoteSelectGestureRecognizer: UILongPressGestureRecognizer
28
+
29
+ @end
30
+
27
31
  NS_ASSUME_NONNULL_END
@@ -1,16 +1,17 @@
1
1
  #import "RCTTVRemoteSelectHandler.h"
2
+ #import "RCTTVRemoteHandler.h"
2
3
 
3
4
  @interface RCTTVRemoteSelectHandler()
4
5
 
5
- @property (nonatomic, strong) UILongPressGestureRecognizer * pressRecognizer;
6
- @property (nonatomic, strong) UILongPressGestureRecognizer * longPressRecognizer;
6
+ @property (nonatomic, strong) RCTTVRemoteSelectGestureRecognizer * pressRecognizer;
7
+ @property (nonatomic, strong) RCTTVRemoteSelectGestureRecognizer * longPressRecognizer;
7
8
 
8
9
  @property (nonatomic, weak) UIView<RCTTVRemoteSelectHandlerDelegate> *view;
9
10
 
10
11
  @end
11
12
 
12
13
  @implementation RCTTVRemoteSelectHandler {
13
- NSMutableDictionary<NSString *, UIGestureRecognizer *> *_tvRemoteGestureRecognizers;
14
+ NSMutableDictionary<NSString *, RCTTVRemoteSelectGestureRecognizer *> *_tvRemoteGestureRecognizers;
14
15
  }
15
16
 
16
17
  #pragma mark -
@@ -36,14 +37,21 @@
36
37
 
37
38
  // Press recognizer should allow long press recognizer to work (but not the reverse)
38
39
  - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
39
- return gestureRecognizer == self.pressRecognizer && otherGestureRecognizer == self.longPressRecognizer;
40
+ // We need to allow other external select gesture recognizers to run, but not
41
+ // the select recognizers for pressable subviews of the root view.
42
+
43
+ if (gestureRecognizer == self.pressRecognizer && otherGestureRecognizer == self.longPressRecognizer) {
44
+ return true;
45
+ } else {
46
+ return ![otherGestureRecognizer isKindOfClass:[RCTTVRemoteSelectGestureRecognizer class]];
47
+ }
40
48
  }
41
49
 
42
50
  #pragma mark -
43
51
  #pragma mark Private methods
44
52
 
45
53
  - (void)attachToView {
46
- UILongPressGestureRecognizer *pressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handlePress:)];
54
+ RCTTVRemoteSelectGestureRecognizer *pressRecognizer = [[RCTTVRemoteSelectGestureRecognizer alloc] initWithTarget:self action:@selector(handlePress:)];
47
55
  pressRecognizer.allowedPressTypes = @[ @(UIPressTypeSelect) ];
48
56
  pressRecognizer.minimumPressDuration = 0.0;
49
57
  pressRecognizer.delegate = self; // Press recognizer allows other recognizers to run
@@ -51,7 +59,7 @@
51
59
  [self.view addGestureRecognizer:pressRecognizer];
52
60
  self.pressRecognizer = pressRecognizer;
53
61
 
54
- UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
62
+ RCTTVRemoteSelectGestureRecognizer *longPressRecognizer = [[RCTTVRemoteSelectGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
55
63
  longPressRecognizer.allowedPressTypes = @[ @(UIPressTypeSelect) ];
56
64
  longPressRecognizer.minimumPressDuration = 0.5;
57
65
  longPressRecognizer.delegate = self;
@@ -119,3 +127,7 @@
119
127
  }
120
128
 
121
129
  @end
130
+
131
+ @implementation RCTTVRemoteSelectGestureRecognizer
132
+
133
+ @end
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(80),
26
- RCTVersionPatch: @(0),
26
+ RCTVersionPatch: @(1),
27
27
  RCTVersionPrerelease: @"0",
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.80.0-0
1
+ VERSION_NAME=0.80.1-0
2
2
  react.internal.publishingGroup=io.github.react-native-tvos
3
3
 
4
4
  android.useAndroidX=true
@@ -20,7 +20,7 @@ def sonatypeUsername = findProperty('SONATYPE_USERNAME')
20
20
  def sonatypePassword = findProperty('SONATYPE_PASSWORD')
21
21
 
22
22
  def reactAndroidProjectDir = project(':packages:react-native:ReactAndroid').projectDir
23
- def mavenTempLocalUrl = 'file:///var/folders/xp/yw_lp59x05d2mp0g0n2f_d240000gn/T/eas-build-workingdir/build/maven_local'
23
+ def mavenTempLocalUrl = 'file:///Users/expo/workingdir/build/maven_local'
24
24
  // Rewritten when copying this to ReactAndroid/publish.gradle
25
25
 
26
26
  publishing {
@@ -78,7 +78,8 @@ publishing {
78
78
  }
79
79
  maven {
80
80
  name = 'sonatypeRelease'
81
- url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
81
+ url = 'https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/'
82
+ // url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
82
83
  credentials(PasswordCredentials) {
83
84
  username = sonatypeUsername
84
85
  password = sonatypePassword
@@ -86,7 +87,8 @@ publishing {
86
87
  }
87
88
  maven {
88
89
  name = 'sonatypeSnapshot'
89
- url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
90
+ url = 'https://central.sonatype.com/repository/maven-snapshots/'
91
+ // url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
90
92
  credentials(PasswordCredentials) {
91
93
  username = sonatypeUsername
92
94
  password = sonatypePassword
@@ -1076,6 +1076,10 @@ public class ReactInstanceManager {
1076
1076
  if (reactPackage instanceof ViewManagerOnDemandReactPackage) {
1077
1077
  Collection<String> names =
1078
1078
  ((ViewManagerOnDemandReactPackage) reactPackage).getViewManagerNames(context);
1079
+ // When converting this class to Kotlin, you need to retain this null check
1080
+ // or wrap around a try/catch otherwise this will cause a crash for OSS libraries
1081
+ // that are not migrated to Kotlin yet and are returning null for
1082
+ // `getViewManagerNames`
1079
1083
  if (names != null) {
1080
1084
  uniqueNames.addAll(names);
1081
1085
  }
@@ -14,7 +14,7 @@ public object ReactNativeVersion {
14
14
  public val VERSION: Map<String, Any?> = mapOf(
15
15
  "major" to 0,
16
16
  "minor" to 80,
17
- "patch" to 0,
17
+ "patch" to 1,
18
18
  "prerelease" to null
19
19
  )
20
20
  }
@@ -69,6 +69,7 @@ import com.facebook.react.uimanager.ViewManager
69
69
  import com.facebook.react.uimanager.ViewManagerRegistry
70
70
  import com.facebook.react.uimanager.ViewManagerResolver
71
71
  import com.facebook.react.uimanager.events.EventDispatcher
72
+ import com.facebook.react.util.RNLog
72
73
  import com.facebook.soloader.SoLoader
73
74
  import com.facebook.systrace.Systrace
74
75
  import com.facebook.systrace.SystraceMessage
@@ -544,7 +545,18 @@ internal class ReactInstance(
544
545
  for (reactPackage in reactPackages) {
545
546
  if (reactPackage is ViewManagerOnDemandReactPackage) {
546
547
  val names = reactPackage.getViewManagerNames(context)
547
- uniqueNames.addAll(names)
548
+ // We need to null check here because some Java implementation of the
549
+ // `ViewManagerOnDemandReactPackage` interface could still return null even
550
+ // if the method is marked as returning a non-nullable collection in Kotlin.
551
+ // See https://github.com/facebook/react-native/issues/52014
552
+ @Suppress("SENSELESS_COMPARISON")
553
+ if (names == null) {
554
+ RNLog.w(
555
+ context,
556
+ "The ReactPackage called: `${reactPackage.javaClass.simpleName}` is returning null for getViewManagerNames(). This is violating the signature of the method. That method should be updated to return an empty collection.")
557
+ } else {
558
+ uniqueNames.addAll(names)
559
+ }
548
560
  }
549
561
  }
550
562
  return uniqueNames
@@ -175,7 +175,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
175
175
 
176
176
  @Override
177
177
  protected int computeScrollDeltaToGetChildRectOnScreen(Rect rect) {
178
- if (mScrollEnabled) {
178
+ if (!mScrollEnabled) {
179
179
  return 0;
180
180
  }
181
181
  return super.computeScrollDeltaToGetChildRectOnScreen(rect);
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 80;
20
- int32_t Patch = 0;
20
+ int32_t Patch = 1;
21
21
  std::string_view Prerelease = "0";
22
22
  } ReactNativeVersion;
23
23
 
@@ -976,15 +976,19 @@ void JavaTurboModule::configureEventEmitterCallback() {
976
976
  FACEBOOK_JNI_THROW_PENDING_EXCEPTION();
977
977
  }
978
978
 
979
- jvalue arg;
980
- arg.l =
981
- JCxxCallbackImpl::newObjectCxxArgs([&](folly::dynamic args) {
982
- auto eventName = args.at(0).asString();
983
- auto& eventEmitter = static_cast<AsyncEventEmitter<folly::dynamic>&>(
984
- *eventEmitterMap_[eventName].get());
985
- eventEmitter.emit(args.size() > 1 ? std::move(args).at(1) : nullptr);
986
- }).release();
987
- env->CallVoidMethod(instance_.get(), cachedMethodId, arg);
979
+ auto callback = JCxxCallbackImpl::newObjectCxxArgs([&](folly::dynamic args) {
980
+ auto eventName = args.at(0).asString();
981
+ auto& eventEmitter = static_cast<AsyncEventEmitter<folly::dynamic>&>(
982
+ *eventEmitterMap_[eventName].get());
983
+ eventEmitter.emit(args.size() > 1 ? std::move(args).at(1) : nullptr);
984
+ });
985
+
986
+ jvalue args[1];
987
+ args[0].l = callback.release();
988
+
989
+ // CallVoidMethod is replaced with CallVoidMethodA as it's unsafe on 32bit and
990
+ // causes crashes https://github.com/facebook/react-native/issues/51628
991
+ env->CallVoidMethodA(instance_.get(), cachedMethodId, args);
988
992
  FACEBOOK_JNI_THROW_PENDING_EXCEPTION();
989
993
  }
990
994
 
package/index.js.flow ADDED
@@ -0,0 +1,456 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and 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
+ * @format
8
+ * @flow strict-local
9
+ */
10
+
11
+ // ----------------------------------------------------------------------------
12
+ // Types entry point for react-native.
13
+ //
14
+ // Exports of this module define the public API for React Native at development
15
+ // time, and are automatically translated to TypeScript when we publish to npm.
16
+ //
17
+ // IMPORTANT: Keep this file in sync with index.js. Test your changes whenever
18
+ // updating React Native's public API.
19
+ // ----------------------------------------------------------------------------
20
+
21
+ /// <reference path="../src/types/globals.d.ts" />
22
+
23
+ // #region Components
24
+
25
+ export type {ActivityIndicatorProps} from './Libraries/Components/ActivityIndicator/ActivityIndicator';
26
+ export {default as ActivityIndicator} from './Libraries/Components/ActivityIndicator/ActivityIndicator';
27
+
28
+ export type {ButtonProps} from './Libraries/Components/Button';
29
+ export {default as Button} from './Libraries/Components/Button';
30
+
31
+ export type {
32
+ DrawerLayoutAndroidProps,
33
+ DrawerSlideEvent,
34
+ } from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
35
+ export {default as DrawerLayoutAndroid} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
36
+
37
+ export type {FlatListProps} from './Libraries/Lists/FlatList';
38
+ export {default as FlatList} from './Libraries/Lists/FlatList';
39
+
40
+ export type {
41
+ ImageBackgroundProps,
42
+ ImageErrorEvent,
43
+ ImageLoadEvent,
44
+ ImageProgressEventIOS,
45
+ ImageProps,
46
+ ImagePropsAndroid,
47
+ ImagePropsBase,
48
+ ImagePropsIOS,
49
+ ImageResolvedAssetSource,
50
+ ImageSize,
51
+ ImageSourcePropType,
52
+ } from './Libraries/Image/Image';
53
+ export type {
54
+ ImageRequireSource,
55
+ ImageSource,
56
+ ImageURISource,
57
+ } from './Libraries/Image/ImageSource';
58
+ export {default as Image} from './Libraries/Image/Image';
59
+ export {default as ImageBackground} from './Libraries/Image/ImageBackground';
60
+
61
+ export type {InputAccessoryViewProps} from './Libraries/Components/TextInput/InputAccessoryView';
62
+ export {default as InputAccessoryView} from './Libraries/Components/TextInput/InputAccessoryView';
63
+
64
+ export type {KeyboardAvoidingViewProps} from './Libraries/Components/Keyboard/KeyboardAvoidingView';
65
+ export {default as KeyboardAvoidingView} from './Libraries/Components/Keyboard/KeyboardAvoidingView';
66
+
67
+ export type {LayoutConformanceProps} from './Libraries/Components/LayoutConformance/LayoutConformance';
68
+ export {default as experimental_LayoutConformance} from './Libraries/Components/LayoutConformance/LayoutConformance';
69
+
70
+ export type {
71
+ ModalBaseProps,
72
+ ModalProps,
73
+ ModalPropsAndroid,
74
+ ModalPropsIOS,
75
+ } from './Libraries/Modal/Modal';
76
+ export {default as Modal} from './Libraries/Modal/Modal';
77
+
78
+ export type {
79
+ PressableAndroidRippleConfig,
80
+ PressableProps,
81
+ PressableStateCallbackType,
82
+ } from './Libraries/Components/Pressable/Pressable';
83
+ export {default as Pressable} from './Libraries/Components/Pressable/Pressable';
84
+
85
+ export type {ProgressBarAndroidProps} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
86
+ export {default as ProgressBarAndroid} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
87
+
88
+ export type {
89
+ RefreshControlProps,
90
+ RefreshControlPropsAndroid,
91
+ RefreshControlPropsIOS,
92
+ } from './Libraries/Components/RefreshControl/RefreshControl';
93
+ export {default as RefreshControl} from './Libraries/Components/RefreshControl/RefreshControl';
94
+
95
+ export {default as SafeAreaView} from './Libraries/Components/SafeAreaView/SafeAreaView';
96
+
97
+ export type {
98
+ ScrollResponderType,
99
+ ScrollViewProps,
100
+ ScrollViewPropsAndroid,
101
+ ScrollViewPropsIOS,
102
+ } from './Libraries/Components/ScrollView/ScrollView';
103
+ export {default as ScrollView} from './Libraries/Components/ScrollView/ScrollView';
104
+
105
+ export type {
106
+ SectionListProps,
107
+ SectionListRenderItem,
108
+ SectionListRenderItemInfo,
109
+ SectionListData,
110
+ } from './Libraries/Lists/SectionList';
111
+ export {default as SectionList} from './Libraries/Lists/SectionList';
112
+
113
+ export type {
114
+ StatusBarAnimation,
115
+ StatusBarProps,
116
+ StatusBarStyle,
117
+ } from './Libraries/Components/StatusBar/StatusBar';
118
+ export {default as StatusBar} from './Libraries/Components/StatusBar/StatusBar';
119
+
120
+ export type {
121
+ SwitchChangeEvent,
122
+ SwitchProps,
123
+ } from './Libraries/Components/Switch/Switch';
124
+ export {default as Switch} from './Libraries/Components/Switch/Switch';
125
+
126
+ export type {TextProps} from './Libraries/Text/Text';
127
+ export {default as Text} from './Libraries/Text/Text';
128
+
129
+ export type {
130
+ AutoCapitalize,
131
+ EnterKeyHintTypeOptions,
132
+ KeyboardTypeOptions,
133
+ InputModeOptions,
134
+ TextContentType,
135
+ TextInputAndroidProps,
136
+ TextInputIOSProps,
137
+ TextInputProps,
138
+ TextInputChangeEvent,
139
+ TextInputContentSizeChangeEvent,
140
+ TextInputEndEditingEvent,
141
+ TextInputFocusEvent,
142
+ TextInputKeyPressEvent,
143
+ TextInputSelectionChangeEvent,
144
+ TextInputSubmitEditingEvent,
145
+ ReturnKeyTypeOptions,
146
+ SubmitBehavior,
147
+ } from './Libraries/Components/TextInput/TextInput';
148
+ export {default as TextInput} from './Libraries/Components/TextInput/TextInput';
149
+
150
+ export {default as Touchable} from './Libraries/Components/Touchable/Touchable';
151
+
152
+ export type {TouchableHighlightProps} from './Libraries/Components/Touchable/TouchableHighlight';
153
+ export {default as TouchableHighlight} from './Libraries/Components/Touchable/TouchableHighlight';
154
+
155
+ export type {TouchableNativeFeedbackProps} from './Libraries/Components/Touchable/TouchableNativeFeedback';
156
+ export {default as TouchableNativeFeedback} from './Libraries/Components/Touchable/TouchableNativeFeedback';
157
+
158
+ export type {TouchableOpacityProps} from './Libraries/Components/Touchable/TouchableOpacity';
159
+ export {default as TouchableOpacity} from './Libraries/Components/Touchable/TouchableOpacity';
160
+
161
+ export type {TouchableWithoutFeedbackProps} from './Libraries/Components/Touchable/TouchableWithoutFeedback';
162
+ export {default as TouchableWithoutFeedback} from './Libraries/Components/Touchable/TouchableWithoutFeedback';
163
+
164
+ export type {
165
+ AccessibilityActionEvent,
166
+ AccessibilityProps,
167
+ AccessibilityRole,
168
+ AccessibilityState,
169
+ AccessibilityValue,
170
+ Role,
171
+ } from './Libraries/Components/View/ViewAccessibility';
172
+ export type {
173
+ GestureResponderHandlers,
174
+ TVViewPropsIOS,
175
+ ViewProps,
176
+ ViewPropsAndroid,
177
+ ViewPropsIOS,
178
+ } from './Libraries/Components/View/ViewPropTypes';
179
+ export {default as View} from './Libraries/Components/View/View';
180
+
181
+ export type {
182
+ ListRenderItemInfo,
183
+ ListRenderItem,
184
+ Separators,
185
+ VirtualizedListProps,
186
+ } from './Libraries/Lists/VirtualizedList';
187
+ export {default as VirtualizedList} from './Libraries/Lists/VirtualizedList';
188
+
189
+ export type {
190
+ ScrollToLocationParamsType,
191
+ SectionBase,
192
+ VirtualizedSectionListProps,
193
+ } from './Libraries/Lists/VirtualizedSectionList';
194
+ export {default as VirtualizedSectionList} from './Libraries/Lists/VirtualizedSectionList';
195
+
196
+ // #endregion
197
+ // #region APIs
198
+
199
+ export {default as AccessibilityInfo} from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
200
+
201
+ export type {
202
+ ActionSheetIOSOptions,
203
+ ShareActionSheetIOSOptions,
204
+ ShareActionSheetError,
205
+ } from './Libraries/ActionSheetIOS/ActionSheetIOS';
206
+ export {default as ActionSheetIOS} from './Libraries/ActionSheetIOS/ActionSheetIOS';
207
+
208
+ export type {
209
+ AlertType,
210
+ AlertButtonStyle,
211
+ AlertButton,
212
+ AlertOptions,
213
+ } from './Libraries/Alert/Alert';
214
+ export {default as Alert} from './Libraries/Alert/Alert';
215
+
216
+ export {default as Animated} from './Libraries/Animated/Animated';
217
+
218
+ export * as Appearance from './Libraries/Utilities/Appearance';
219
+
220
+ export type {
221
+ TaskProvider,
222
+ ComponentProvider,
223
+ ComponentProviderInstrumentationHook,
224
+ AppConfig,
225
+ Runnable,
226
+ Runnables,
227
+ Registry,
228
+ WrapperComponentProvider,
229
+ RootViewStyleProvider,
230
+ } from './Libraries/ReactNative/AppRegistry';
231
+ export {AppRegistry} from './Libraries/ReactNative/AppRegistry';
232
+
233
+ export type {
234
+ AppStateStatus,
235
+ AppStateEvent,
236
+ } from './Libraries/AppState/AppState';
237
+ export {default as AppState} from './Libraries/AppState/AppState';
238
+
239
+ export type {BackPressEventName} from './Libraries/Utilities/BackHandler';
240
+ export {default as BackHandler} from './Libraries/Utilities/BackHandler';
241
+
242
+ export {default as Clipboard} from './Libraries/Components/Clipboard/Clipboard';
243
+
244
+ export {default as codegenNativeComponent} from './Libraries/Utilities/codegenNativeComponent';
245
+ export {default as codegenNativeCommands} from './Libraries/Utilities/codegenNativeCommands';
246
+
247
+ export {default as DeviceEventEmitter} from './Libraries/EventEmitter/RCTDeviceEventEmitter';
248
+
249
+ export type {DeviceInfoConstants} from './Libraries/Utilities/DeviceInfo';
250
+ export {default as DeviceInfo} from './Libraries/Utilities/DeviceInfo';
251
+
252
+ export {default as DevMenu} from './src/private/devsupport/devmenu/DevMenu';
253
+ export {default as DevSettings} from './Libraries/Utilities/DevSettings';
254
+
255
+ export type {
256
+ DimensionsPayload,
257
+ DisplayMetrics,
258
+ DisplayMetricsAndroid,
259
+ ScaledSize,
260
+ } from './Libraries/Utilities/Dimensions';
261
+ export {default as Dimensions} from './Libraries/Utilities/Dimensions';
262
+
263
+ export type {DynamicColorIOSTuple} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
264
+ export {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
265
+
266
+ export type {EasingFunction} from './Libraries/Animated/Easing';
267
+ export {default as Easing} from './Libraries/Animated/Easing';
268
+
269
+ export {findNodeHandle} from './Libraries/ReactNative/RendererProxy';
270
+
271
+ export {default as I18nManager} from './Libraries/ReactNative/I18nManager';
272
+
273
+ export type {
274
+ Handle,
275
+ PromiseTask,
276
+ SimpleTask,
277
+ } from './Libraries/Interaction/InteractionManager';
278
+ export {default as InteractionManager} from './Libraries/Interaction/InteractionManager';
279
+
280
+ export type {
281
+ AndroidKeyboardEvent,
282
+ IOSKeyboardEvent,
283
+ KeyboardEvent,
284
+ KeyboardEventEasing,
285
+ KeyboardEventName,
286
+ KeyboardMetrics,
287
+ } from './Libraries/Components/Keyboard/Keyboard';
288
+ export {default as Keyboard} from './Libraries/Components/Keyboard/Keyboard';
289
+
290
+ export type {
291
+ LayoutAnimationAnim,
292
+ LayoutAnimationConfig,
293
+ LayoutAnimationProperties,
294
+ LayoutAnimationProperty,
295
+ LayoutAnimationType,
296
+ LayoutAnimationTypes,
297
+ } from './Libraries/LayoutAnimation/LayoutAnimation';
298
+ export {default as LayoutAnimation} from './Libraries/LayoutAnimation/LayoutAnimation';
299
+
300
+ export {default as Linking} from './Libraries/Linking/Linking';
301
+
302
+ export type {
303
+ ExtendedExceptionData,
304
+ IgnorePattern,
305
+ LogData,
306
+ } from './Libraries/LogBox/LogBox';
307
+ export {default as LogBox} from './Libraries/LogBox/LogBox';
308
+
309
+ export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
310
+
311
+ export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
312
+
313
+ export type {
314
+ EventSubscription,
315
+ EmitterSubscription,
316
+ NativeEventSubscription,
317
+ } from './Libraries/EventEmitter/NativeEventEmitter';
318
+ export {default as NativeEventEmitter} from './Libraries/EventEmitter/NativeEventEmitter';
319
+ export {default as NativeModules} from './Libraries/BatchedBridge/NativeModules';
320
+ export {default as Networking} from './Libraries/Network/RCTNetworking';
321
+
322
+ export type {
323
+ PanResponderCallbacks,
324
+ PanResponderGestureState,
325
+ PanResponderInstance,
326
+ } from './Libraries/Interaction/PanResponder';
327
+ export {default as PanResponder} from './Libraries/Interaction/PanResponder';
328
+
329
+ export type {
330
+ Permission,
331
+ PermissionStatus,
332
+ Rationale,
333
+ } from './Libraries/PermissionsAndroid/PermissionsAndroid';
334
+ export {default as PermissionsAndroid} from './Libraries/PermissionsAndroid/PermissionsAndroid';
335
+
336
+ export {default as PixelRatio} from './Libraries/Utilities/PixelRatio';
337
+
338
+ export type {
339
+ PlatformOSType,
340
+ PlatformSelectSpec,
341
+ } from './Libraries/Utilities/PlatformTypes';
342
+ export {default as Platform} from './Libraries/Utilities/Platform';
343
+
344
+ export {PlatformColor} from './Libraries/StyleSheet/PlatformColorValueTypes';
345
+
346
+ export type {
347
+ PushNotificationEventName,
348
+ PushNotificationPermissions,
349
+ } from './Libraries/PushNotificationIOS/PushNotificationIOS';
350
+ export {default as PushNotificationIOS} from './Libraries/PushNotificationIOS/PushNotificationIOS';
351
+
352
+ export type {ProcessedColorValue} from './Libraries/StyleSheet/processColor';
353
+ export {default as processColor} from './Libraries/StyleSheet/processColor';
354
+
355
+ export {default as registerCallableModule} from './Libraries/Core/registerCallableModule';
356
+ export {default as requireNativeComponent} from './Libraries/ReactNative/requireNativeComponent';
357
+
358
+ export type {RootTag} from './Libraries/ReactNative/RootTag';
359
+ export {RootTagContext} from './Libraries/ReactNative/RootTag';
360
+
361
+ export {default as Settings} from './Libraries/Settings/Settings';
362
+
363
+ export type {
364
+ ShareAction,
365
+ ShareContent,
366
+ ShareOptions,
367
+ } from './Libraries/Share/Share';
368
+ export {default as Share} from './Libraries/Share/Share';
369
+
370
+ // TODO(T210505449): StyleSheet/StyleSheetTypes exports are incomplete - review
371
+ export type {
372
+ ColorValue,
373
+ ImageStyle,
374
+ FilterFunction,
375
+ FontVariant,
376
+ NativeColorValue,
377
+ OpaqueColorValue,
378
+ StyleProp,
379
+ TextStyle,
380
+ TransformsStyle,
381
+ ViewStyle,
382
+ } from './Libraries/StyleSheet/StyleSheet';
383
+ export type {
384
+ BoxShadowValue,
385
+ CursorValue,
386
+ DimensionValue,
387
+ DropShadowValue,
388
+ EdgeInsetsValue,
389
+ PointValue,
390
+ } from './Libraries/StyleSheet/StyleSheetTypes';
391
+ export type {Insets} from './Libraries/StyleSheet/Rect';
392
+ export {default as StyleSheet} from './Libraries/StyleSheet/StyleSheet';
393
+
394
+ export * as Systrace from './Libraries/Performance/Systrace';
395
+ export {default as ToastAndroid} from './Libraries/Components/ToastAndroid/ToastAndroid';
396
+ export * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
397
+ export {default as UIManager} from './Libraries/ReactNative/UIManager';
398
+ export {unstable_batchedUpdates} from './Libraries/ReactNative/RendererProxy';
399
+ export {default as useAnimatedValue} from './Libraries/Animated/useAnimatedValue';
400
+ export {default as useColorScheme} from './Libraries/Utilities/useColorScheme';
401
+ export {default as useWindowDimensions} from './Libraries/Utilities/useWindowDimensions';
402
+ export {default as UTFSequence} from './Libraries/UTFSequence';
403
+ export {default as Vibration} from './Libraries/Vibration/Vibration';
404
+
405
+ // #endregion
406
+ // #region APIs (types only)
407
+
408
+ export type {
409
+ BlurEvent,
410
+ FocusEvent,
411
+ GestureResponderEvent,
412
+ LayoutChangeEvent,
413
+ LayoutRectangle,
414
+ MouseEvent,
415
+ PointerEvent,
416
+ NativeMouseEvent,
417
+ NativePointerEvent,
418
+ NativeScrollEvent,
419
+ NativeSyntheticEvent,
420
+ NativeTouchEvent,
421
+ NativeUIEvent,
422
+ ResponderSyntheticEvent,
423
+ ScrollEvent,
424
+ TargetedEvent,
425
+ TextLayoutEvent,
426
+ } from './Libraries/Types/CoreEventTypes';
427
+
428
+ export type {TurboModule} from './Libraries/TurboModule/RCTExport';
429
+ export type * from './Libraries/Types/CodegenTypesNamespace';
430
+
431
+ export type {
432
+ HostInstance,
433
+ NativeMethods,
434
+ NativeMethodsMixin,
435
+ MeasureInWindowOnSuccessCallback,
436
+ MeasureLayoutOnSuccessCallback,
437
+ MeasureOnSuccessCallback,
438
+ } from './src/private/types/HostInstance';
439
+ export type {HostComponent} from './src/private/types/HostComponent';
440
+ export type {ColorSchemeName} from './src/private/specs_DEPRECATED/modules/NativeAppearance';
441
+ export type {ErrorUtils} from './Libraries/vendor/core/ErrorUtils';
442
+ export type {
443
+ PublicRootInstance,
444
+ PublicTextInstance,
445
+ } from './Libraries/ReactPrivate/ReactNativePrivateInterface';
446
+
447
+ // #endregion
448
+
449
+ // #region TV
450
+ export {default as TVEventHandler} from './Libraries/Components/TV/TVEventHandler';
451
+ export {default as TVEventControl} from './Libraries/Components/TV/TVEventControl';
452
+ export {default as TVFocusGuideView} from './Libraries/Components/TV/TVFocusGuideView';
453
+ export type {TVRemoteEvent} from './Libraries/Types/CoreEventTypes';
454
+ export {default as TVTextScrollView} from './Libraries/Components/TV/TVTextScrollView';
455
+ export {default as useTVEventHandler} from './Libraries/Components/TV/useTVEventHandler';
456
+ // #endregion
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and 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
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ import type {HostComponent} from '../src/private/types/HostComponent';
14
+
15
+ import requireNativeComponent from '../Libraries/ReactNative/requireNativeComponent';
16
+ import * as React from 'react';
17
+
18
+ const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
19
+ 'RCTRefreshControl',
20
+ );
21
+
22
+ export default class RefreshControlMock extends React.Component<{...}> {
23
+ static latestRef: ?RefreshControlMock;
24
+
25
+ render(): React.Node {
26
+ return <RCTRefreshControl />;
27
+ }
28
+
29
+ componentDidMount() {
30
+ RefreshControlMock.latestRef = this;
31
+ }
32
+ }
package/jest/setup.js CHANGED
@@ -201,9 +201,7 @@ jest
201
201
  }))
202
202
  .mock('../Libraries/Components/RefreshControl/RefreshControl', () => ({
203
203
  __esModule: true,
204
- default: jest.requireActual(
205
- '../Libraries/Components/RefreshControl/__mocks__/RefreshControlMock',
206
- ),
204
+ default: jest.requireActual('./RefreshControlMock').default,
207
205
  }))
208
206
  .mock('../Libraries/Components/ScrollView/ScrollView', () => {
209
207
  const baseComponent = mockComponent(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.80.0-0",
3
+ "version": "0.80.1-0",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -85,6 +85,7 @@
85
85
  "gradle.properties",
86
86
  "gradle/libs.versions.toml",
87
87
  "index.js",
88
+ "index.js.flow",
88
89
  "interface.js",
89
90
  "jest-preset.js",
90
91
  "jest",
@@ -163,12 +164,12 @@
163
164
  },
164
165
  "dependencies": {
165
166
  "@jest/create-cache-key-function": "^29.7.0",
166
- "@react-native/assets-registry": "0.80.0",
167
- "@react-native/codegen": "0.80.0",
168
- "@react-native/community-cli-plugin": "0.80.0",
169
- "@react-native/gradle-plugin": "0.80.0",
170
- "@react-native/js-polyfills": "0.80.0",
171
- "@react-native/normalize-colors": "0.80.0",
167
+ "@react-native/assets-registry": "0.80.1",
168
+ "@react-native/codegen": "0.80.1",
169
+ "@react-native/community-cli-plugin": "0.80.1",
170
+ "@react-native/gradle-plugin": "0.80.1",
171
+ "@react-native/js-polyfills": "0.80.1",
172
+ "@react-native/normalize-colors": "0.80.1",
172
173
  "abort-controller": "^3.0.0",
173
174
  "anser": "^1.4.9",
174
175
  "ansi-regex": "^5.0.0",
@@ -196,7 +197,7 @@
196
197
  "whatwg-fetch": "^3.0.0",
197
198
  "ws": "^6.2.3",
198
199
  "yargs": "^17.6.2",
199
- "@react-native-tvos/virtualized-lists": "0.80.0-0"
200
+ "@react-native-tvos/virtualized-lists": "0.80.1-0"
200
201
  },
201
202
  "codegenConfig": {
202
203
  "libraries": [
Binary file
Binary file
Binary file