react-native-macos 0.0.0-76baa806c → 0.0.0-78a879c8b

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.
Files changed (3218) hide show
  1. package/CHANGELOG.json +500 -500
  2. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +135 -135
  3. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +51 -52
  4. package/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +34 -34
  5. package/Libraries/Alert/Alert.js +165 -165
  6. package/Libraries/Alert/AlertMacOS.js +211 -212
  7. package/Libraries/Alert/NativeAlertManager.js +57 -34
  8. package/Libraries/Alert/RCTAlertManager.android.js +29 -29
  9. package/Libraries/Alert/RCTAlertManager.ios.js +26 -26
  10. package/Libraries/Alert/RCTAlertManager.macos.js +16 -16
  11. package/Libraries/Animated/Animated.js +48 -0
  12. package/Libraries/Animated/AnimatedEvent.js +233 -0
  13. package/Libraries/Animated/AnimatedImplementation.js +711 -0
  14. package/Libraries/Animated/AnimatedMock.js +156 -0
  15. package/Libraries/Animated/AnimatedWeb.js +23 -0
  16. package/Libraries/Animated/Easing.js +252 -0
  17. package/Libraries/Animated/NativeAnimatedHelper.js +405 -0
  18. package/Libraries/Animated/NativeAnimatedModule.js +70 -0
  19. package/Libraries/Animated/NativeAnimatedTurboModule.js +72 -0
  20. package/Libraries/Animated/SpringConfig.js +103 -0
  21. package/Libraries/Animated/animations/Animation.js +86 -0
  22. package/Libraries/Animated/animations/DecayAnimation.js +120 -0
  23. package/Libraries/Animated/animations/SpringAnimation.js +359 -0
  24. package/Libraries/Animated/animations/TimingAnimation.js +165 -0
  25. package/Libraries/Animated/bezier.js +153 -0
  26. package/Libraries/Animated/components/AnimatedFlatList.js +32 -0
  27. package/Libraries/Animated/components/AnimatedImage.js +25 -0
  28. package/Libraries/Animated/components/AnimatedScrollView.js +32 -0
  29. package/Libraries/Animated/components/AnimatedSectionList.js +32 -0
  30. package/Libraries/Animated/components/AnimatedText.js +25 -0
  31. package/Libraries/Animated/components/AnimatedView.js +23 -0
  32. package/Libraries/Animated/createAnimatedComponent.js +286 -0
  33. package/Libraries/Animated/nodes/AnimatedAddition.js +63 -0
  34. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +71 -0
  35. package/Libraries/Animated/nodes/AnimatedDivision.js +79 -0
  36. package/Libraries/Animated/nodes/AnimatedInterpolation.js +373 -0
  37. package/Libraries/Animated/nodes/AnimatedModulo.js +62 -0
  38. package/Libraries/Animated/nodes/AnimatedMultiplication.js +63 -0
  39. package/Libraries/Animated/nodes/AnimatedNode.js +184 -0
  40. package/Libraries/Animated/nodes/AnimatedProps.js +176 -0
  41. package/Libraries/Animated/nodes/AnimatedStyle.js +127 -0
  42. package/Libraries/Animated/nodes/AnimatedSubtraction.js +63 -0
  43. package/Libraries/Animated/nodes/AnimatedTracking.js +102 -0
  44. package/Libraries/Animated/nodes/AnimatedTransform.js +121 -0
  45. package/Libraries/Animated/nodes/AnimatedValue.js +277 -0
  46. package/Libraries/Animated/nodes/AnimatedValueXY.js +226 -0
  47. package/Libraries/Animated/nodes/AnimatedWithChildren.js +87 -0
  48. package/Libraries/AppState/AppState.js +179 -181
  49. package/Libraries/AppState/NativeAppState.js +30 -30
  50. package/Libraries/BUCK +36 -0
  51. package/Libraries/BatchedBridge/BatchedBridge.js +28 -28
  52. package/Libraries/BatchedBridge/MessageQueue.js +468 -470
  53. package/Libraries/BatchedBridge/NativeModules.js +205 -197
  54. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +38 -38
  55. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +22 -22
  56. package/Libraries/Blob/Blob.js +147 -141
  57. package/Libraries/Blob/BlobManager.js +182 -182
  58. package/Libraries/Blob/BlobRegistry.js +38 -38
  59. package/Libraries/Blob/BlobTypes.js +30 -30
  60. package/Libraries/Blob/File.js +56 -56
  61. package/Libraries/Blob/FileReader.js +166 -166
  62. package/Libraries/Blob/NativeBlobModule.js +60 -26
  63. package/Libraries/Blob/NativeFileReaderModule.js +23 -23
  64. package/Libraries/Blob/RCTBlobCollector.h +30 -30
  65. package/Libraries/Blob/RCTBlobCollector.mm +52 -52
  66. package/Libraries/Blob/RCTBlobManager.h +28 -28
  67. package/Libraries/Blob/RCTBlobManager.mm +322 -325
  68. package/Libraries/Blob/RCTBlobPlugins.h +41 -41
  69. package/Libraries/Blob/RCTBlobPlugins.mm +33 -33
  70. package/Libraries/Blob/RCTFileReaderModule.h +12 -12
  71. package/Libraries/Blob/RCTFileReaderModule.mm +90 -87
  72. package/Libraries/Blob/React-RCTBlob.podspec +49 -49
  73. package/Libraries/Blob/URL.js +220 -222
  74. package/Libraries/Blob/__mocks__/BlobModule.js +16 -16
  75. package/Libraries/Blob/__mocks__/FileReaderModule.js +20 -20
  76. package/Libraries/BugReporting/BugReporting.js +140 -141
  77. package/Libraries/BugReporting/NativeBugReporting.js +20 -20
  78. package/Libraries/BugReporting/dumpReactTree.js +151 -151
  79. package/Libraries/BugReporting/getReactData.js +178 -178
  80. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js +165 -162
  81. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.ios.js +280 -271
  82. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.macos.js +231 -213
  83. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +27 -27
  84. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +65 -59
  85. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +206 -152
  86. package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +56 -56
  87. package/Libraries/Components/Button.js +454 -274
  88. package/Libraries/Components/CheckBox/CheckBox.macos.js +15 -15
  89. package/Libraries/Components/Clipboard/Clipboard.js +42 -42
  90. package/Libraries/Components/Clipboard/NativeClipboard.js +22 -22
  91. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +46 -46
  92. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +189 -189
  93. package/Libraries/Components/DatePicker/DatePickerIOS.macos.js +14 -14
  94. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +60 -60
  95. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +89 -89
  96. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +30 -30
  97. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.macos.js +15 -15
  98. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +30 -30
  99. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +22 -22
  100. package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.android.js +44 -44
  101. package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.ios.js +44 -44
  102. package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.macos.js +139 -139
  103. package/Libraries/Components/DatePickerMacOS/RCTDatePickerNativeComponentMacOS.js +41 -41
  104. package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +125 -125
  105. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +384 -385
  106. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +12 -12
  107. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.macos.js +14 -14
  108. package/Libraries/Components/Keyboard/Keyboard.js +193 -195
  109. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +229 -230
  110. package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +21 -21
  111. package/Libraries/Components/MaskedView/MaskedViewIOS.android.js +13 -13
  112. package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +93 -93
  113. package/Libraries/Components/MaskedView/MaskedViewIOS.macos.js +15 -15
  114. package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +21 -21
  115. package/Libraries/Components/Picker/AndroidDialogPickerNativeComponent.js +82 -69
  116. package/Libraries/Components/Picker/AndroidDialogPickerViewConfig.js +30 -0
  117. package/Libraries/Components/Picker/AndroidDropdownPickerNativeComponent.js +69 -69
  118. package/Libraries/Components/Picker/Picker.js +168 -168
  119. package/Libraries/Components/Picker/PickerAndroid.android.js +145 -149
  120. package/Libraries/Components/Picker/PickerAndroid.ios.js +12 -12
  121. package/Libraries/Components/Picker/PickerAndroid.macos.js +14 -14
  122. package/Libraries/Components/Picker/PickerIOS.android.js +14 -14
  123. package/Libraries/Components/Picker/PickerIOS.ios.js +165 -165
  124. package/Libraries/Components/Picker/PickerIOS.macos.js +18 -18
  125. package/Libraries/Components/Picker/RCTPickerNativeComponent.js +72 -63
  126. package/Libraries/Components/Picker/RCTPickerViewConfig.js +41 -0
  127. package/Libraries/Components/Pressable/Pressable.js +280 -261
  128. package/Libraries/Components/Pressable/useAndroidRippleForView.js +104 -105
  129. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +104 -104
  130. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js +12 -12
  131. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.macos.js +14 -14
  132. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +35 -35
  133. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +46 -46
  134. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +77 -77
  135. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.macos.js +15 -15
  136. package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +35 -35
  137. package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +86 -86
  138. package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +65 -65
  139. package/Libraries/Components/RefreshControl/RefreshControl.js +226 -226
  140. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +33 -33
  141. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +29 -29
  142. package/Libraries/Components/SafeAreaView/SafeAreaView.js +62 -62
  143. package/Libraries/Components/ScrollResponder.js +772 -773
  144. package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +40 -40
  145. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +57 -56
  146. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +39 -39
  147. package/Libraries/Components/ScrollView/ScrollView.js +1390 -1412
  148. package/Libraries/Components/ScrollView/ScrollViewCommands.js +52 -52
  149. package/Libraries/Components/ScrollView/ScrollViewContext.js +22 -0
  150. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +32 -32
  151. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +86 -87
  152. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +301 -166
  153. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +75 -77
  154. package/Libraries/Components/ScrollView/processDecelerationRate.js +32 -32
  155. package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +46 -46
  156. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +46 -46
  157. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +123 -123
  158. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.macos.js +15 -15
  159. package/Libraries/Components/Slider/Slider.js +277 -279
  160. package/Libraries/Components/Slider/SliderNativeComponent.js +60 -60
  161. package/Libraries/Components/Sound/NativeSoundManager.js +23 -23
  162. package/Libraries/Components/Sound/SoundManager.js +22 -22
  163. package/Libraries/Components/StaticContainer.react.js +51 -51
  164. package/Libraries/Components/StaticRenderer.js +37 -37
  165. package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +69 -36
  166. package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +90 -43
  167. package/Libraries/Components/StatusBar/StatusBar.js +499 -501
  168. package/Libraries/Components/StatusBar/StatusBarIOS.js +21 -22
  169. package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +64 -64
  170. package/Libraries/Components/Switch/Switch.js +263 -228
  171. package/Libraries/Components/Switch/SwitchNativeComponent.js +58 -59
  172. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +561 -563
  173. package/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +114 -84
  174. package/Libraries/Components/TextInput/InputAccessoryView.js +118 -118
  175. package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +28 -26
  176. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +30 -32
  177. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +41 -43
  178. package/Libraries/Components/TextInput/RCTSinglelineTextInputViewConfig.js +134 -134
  179. package/Libraries/Components/TextInput/TextInput.js +1259 -1242
  180. package/Libraries/Components/TextInput/TextInputNativeCommands.js +31 -31
  181. package/Libraries/Components/TextInput/TextInputState.js +197 -197
  182. package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +39 -39
  183. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +75 -73
  184. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +37 -39
  185. package/Libraries/Components/ToastAndroid/ToastAndroid.macos.js +14 -14
  186. package/Libraries/Components/Touchable/BoundingDimensions.js +46 -46
  187. package/Libraries/Components/Touchable/PooledClass.js +122 -122
  188. package/Libraries/Components/Touchable/Position.js +36 -36
  189. package/Libraries/Components/Touchable/Touchable.js +960 -984
  190. package/Libraries/Components/Touchable/TouchableBounce.js +211 -249
  191. package/Libraries/Components/Touchable/TouchableHighlight.js +383 -416
  192. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +334 -350
  193. package/Libraries/Components/Touchable/TouchableOpacity.js +329 -335
  194. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +215 -237
  195. package/Libraries/Components/Touchable/__mocks__/ensureComponentIsNative.js +12 -12
  196. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +26 -26
  197. package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +28 -28
  198. package/Libraries/Components/UnimplementedViews/UnimplementedView.js +42 -42
  199. package/Libraries/Components/View/DraggedType.js +21 -21
  200. package/Libraries/Components/View/PlatformViewPropTypes.macos.js +16 -16
  201. package/Libraries/Components/View/ReactNativeStyleAttributes.js +87 -87
  202. package/Libraries/Components/View/ReactNativeViewAttributes.js +70 -65
  203. package/Libraries/Components/View/ReactNativeViewViewConfig.js +360 -351
  204. package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +83 -74
  205. package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +61 -56
  206. package/Libraries/Components/View/View.js +51 -51
  207. package/Libraries/Components/View/ViewAccessibility.js +93 -91
  208. package/Libraries/Components/View/ViewNativeComponent.js +90 -90
  209. package/Libraries/Components/View/ViewPropTypes.js +635 -612
  210. package/Libraries/Core/Devtools/getDevServer.js +45 -42
  211. package/Libraries/Core/Devtools/openFileInEditor.js +22 -22
  212. package/Libraries/Core/Devtools/openURLInBrowser.js +22 -22
  213. package/Libraries/Core/Devtools/parseErrorStack.js +68 -68
  214. package/Libraries/Core/Devtools/parseHermesStack.js +120 -120
  215. package/Libraries/Core/Devtools/symbolicateStackTrace.js +49 -95
  216. package/Libraries/Core/ExceptionsManager.js +267 -266
  217. package/Libraries/Core/InitializeCore.js +56 -56
  218. package/Libraries/Core/NativeExceptionsManager.js +111 -112
  219. package/Libraries/Core/ReactFiberErrorDialog.js +52 -52
  220. package/Libraries/Core/ReactNativeVersion.js +2 -2
  221. package/Libraries/Core/ReactNativeVersionCheck.js +49 -49
  222. package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +29 -29
  223. package/Libraries/Core/Timers/JSTimers.js +509 -513
  224. package/Libraries/Core/Timers/NativeTiming.js +27 -27
  225. package/Libraries/Core/__mocks__/ErrorUtils.js +33 -33
  226. package/Libraries/Core/checkNativeVersion.js +18 -18
  227. package/Libraries/Core/polyfillPromise.js +38 -22
  228. package/Libraries/Core/setUpAlert.js +23 -23
  229. package/Libraries/Core/setUpBatchedBridge.js +47 -46
  230. package/Libraries/Core/setUpDeveloperTools.js +84 -84
  231. package/Libraries/Core/setUpErrorHandling.js +33 -33
  232. package/Libraries/Core/setUpGlobals.js +34 -34
  233. package/Libraries/Core/setUpNavigator.js +21 -21
  234. package/Libraries/Core/setUpPerformance.js +26 -26
  235. package/Libraries/Core/setUpReactDevTools.js +59 -59
  236. package/Libraries/Core/setUpReactRefresh.js +49 -49
  237. package/Libraries/Core/setUpRegeneratorRuntime.js +27 -27
  238. package/Libraries/Core/setUpSegmentFetcher.js +93 -91
  239. package/Libraries/Core/setUpSystrace.js +21 -21
  240. package/Libraries/Core/setUpTimers.js +34 -34
  241. package/Libraries/Core/setUpXHR.js +41 -41
  242. package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +76 -76
  243. package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +28 -28
  244. package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.js +82 -82
  245. package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +40 -40
  246. package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +76 -76
  247. package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +233 -233
  248. package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +24 -24
  249. package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +30 -30
  250. package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +32 -32
  251. package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +622 -622
  252. package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +158 -158
  253. package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +168 -168
  254. package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +99 -99
  255. package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +44 -44
  256. package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +408 -408
  257. package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +68 -68
  258. package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +86 -86
  259. package/Libraries/EventEmitter/NativeEventEmitter.js +83 -73
  260. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +83 -84
  261. package/Libraries/EventEmitter/RCTEventEmitter.js +21 -21
  262. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +20 -20
  263. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +23 -25
  264. package/Libraries/FBLazyVector/BUCK +1 -1
  265. package/Libraries/FBLazyVector/FBLazyVector/FBLazyIterator.h +130 -130
  266. package/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h +99 -99
  267. package/Libraries/FBLazyVector/FBLazyVector.podspec +31 -31
  268. package/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec +67 -47
  269. package/Libraries/HeapCapture/HeapCapture.js +31 -31
  270. package/Libraries/HeapCapture/NativeJSCHeapCapture.js +20 -20
  271. package/Libraries/Image/AssetRegistry.js +13 -38
  272. package/Libraries/Image/AssetSourceResolver.js +176 -176
  273. package/Libraries/Image/Image.android.js +407 -407
  274. package/Libraries/Image/Image.ios.js +219 -211
  275. package/Libraries/Image/Image.macos.js +15 -15
  276. package/Libraries/Image/ImageAnalyticsTagContext.js +21 -21
  277. package/Libraries/Image/ImageBackground.js +90 -90
  278. package/Libraries/Image/ImagePickerIOS.js +105 -105
  279. package/Libraries/Image/ImageProps.js +178 -174
  280. package/Libraries/Image/ImageResizeMode.js +36 -36
  281. package/Libraries/Image/ImageSource.js +94 -85
  282. package/Libraries/Image/ImageViewNativeComponent.js +56 -56
  283. package/Libraries/Image/ImageViewViewConfig.js +68 -68
  284. package/Libraries/Image/NativeImageEditor.js +53 -0
  285. package/Libraries/Image/NativeImageLoaderAndroid.js +40 -40
  286. package/Libraries/Image/NativeImageLoaderIOS.js +32 -32
  287. package/Libraries/Image/NativeImagePickerIOS.js +40 -40
  288. package/Libraries/Image/NativeImageStoreAndroid.js +27 -0
  289. package/Libraries/Image/NativeImageStoreIOS.js +34 -0
  290. package/Libraries/Image/RCTAnimatedImage.h +25 -25
  291. package/Libraries/Image/RCTAnimatedImage.m +180 -180
  292. package/Libraries/Image/RCTDisplayWeakRefreshable.h +24 -24
  293. package/Libraries/Image/RCTDisplayWeakRefreshable.m +29 -29
  294. package/Libraries/Image/RCTGIFImageDecoder.h +12 -12
  295. package/Libraries/Image/RCTGIFImageDecoder.mm +54 -54
  296. package/Libraries/Image/RCTImageBlurUtils.h +13 -13
  297. package/Libraries/Image/RCTImageBlurUtils.m +101 -101
  298. package/Libraries/Image/RCTImageCache.h +42 -42
  299. package/Libraries/Image/RCTImageCache.m +167 -167
  300. package/Libraries/Image/RCTImageDataDecoder.h +53 -53
  301. package/Libraries/Image/RCTImageEditingManager.h +12 -12
  302. package/Libraries/Image/RCTImageEditingManager.mm +104 -107
  303. package/Libraries/Image/RCTImageLoader.h +37 -36
  304. package/Libraries/Image/RCTImageLoader.mm +1287 -1261
  305. package/Libraries/Image/RCTImageLoaderLoggable.h +30 -0
  306. package/Libraries/Image/RCTImageLoaderProtocol.h +137 -133
  307. package/Libraries/Image/RCTImageLoaderWithAttributionProtocol.h +56 -53
  308. package/Libraries/Image/RCTImagePlugins.h +44 -44
  309. package/Libraries/Image/RCTImagePlugins.mm +36 -36
  310. package/Libraries/Image/RCTImageShadowView.h +12 -12
  311. package/Libraries/Image/RCTImageShadowView.m +24 -24
  312. package/Libraries/Image/RCTImageStoreManager.h +46 -46
  313. package/Libraries/Image/RCTImageStoreManager.mm +257 -260
  314. package/Libraries/Image/RCTImageURLLoader.h +80 -73
  315. package/Libraries/Image/RCTImageURLLoaderWithAttribution.h +79 -77
  316. package/Libraries/Image/RCTImageURLLoaderWithAttribution.mm +30 -30
  317. package/Libraries/Image/RCTImageUtils.h +98 -98
  318. package/Libraries/Image/RCTImageUtils.m +433 -433
  319. package/Libraries/Image/RCTImageView.h +38 -37
  320. package/Libraries/Image/RCTImageView.mm +671 -656
  321. package/Libraries/Image/RCTImageViewManager.h +12 -12
  322. package/Libraries/Image/RCTImageViewManager.mm +112 -111
  323. package/Libraries/Image/RCTLocalAssetImageLoader.h +12 -12
  324. package/Libraries/Image/RCTLocalAssetImageLoader.mm +71 -71
  325. package/Libraries/Image/RCTResizeMode.h +29 -29
  326. package/Libraries/Image/RCTResizeMode.m +20 -20
  327. package/Libraries/Image/RCTUIImageViewAnimated.h +17 -17
  328. package/Libraries/Image/RCTUIImageViewAnimated.m +338 -335
  329. package/Libraries/Image/React-RCTImage.podspec +49 -49
  330. package/Libraries/Image/RelativeImageStub.js +28 -28
  331. package/Libraries/Image/TextInlineImageNativeComponent.js +20 -20
  332. package/Libraries/Image/nativeImageSource.js +68 -68
  333. package/Libraries/Image/resolveAssetSource.js +109 -109
  334. package/Libraries/Inspector/BorderBox.js +32 -32
  335. package/Libraries/Inspector/BoxInspector.js +110 -110
  336. package/Libraries/Inspector/ElementBox.js +138 -138
  337. package/Libraries/Inspector/ElementProperties.js +147 -147
  338. package/Libraries/Inspector/Inspector.js +348 -348
  339. package/Libraries/Inspector/InspectorOverlay.js +77 -76
  340. package/Libraries/Inspector/InspectorPanel.js +170 -170
  341. package/Libraries/Inspector/NetworkOverlay.js +601 -601
  342. package/Libraries/Inspector/PerformanceOverlay.js +63 -63
  343. package/Libraries/Inspector/StyleInspector.js +70 -70
  344. package/Libraries/Inspector/resolveBoxStyle.js +114 -114
  345. package/Libraries/Interaction/Batchinator.js +76 -76
  346. package/Libraries/Interaction/BridgeSpyStallHandler.js +62 -62
  347. package/Libraries/Interaction/FrameRateLogger.js +84 -84
  348. package/Libraries/Interaction/InteractionManager.js +223 -222
  349. package/Libraries/Interaction/InteractionMixin.js +55 -55
  350. package/Libraries/Interaction/InteractionStallDebugger.js +23 -23
  351. package/Libraries/Interaction/JSEventLoopWatchdog.js +92 -93
  352. package/Libraries/Interaction/NativeFrameRateLogger.js +24 -24
  353. package/Libraries/Interaction/PanResponder.js +581 -581
  354. package/Libraries/Interaction/TaskQueue.js +181 -184
  355. package/Libraries/Interaction/TouchHistoryMath.js +153 -153
  356. package/Libraries/JSInspector/InspectorAgent.js +27 -27
  357. package/Libraries/JSInspector/JSInspector.js +36 -36
  358. package/Libraries/JSInspector/NetworkAgent.js +300 -300
  359. package/Libraries/LayoutAnimation/LayoutAnimation.js +150 -151
  360. package/Libraries/Linking/Linking.js +141 -124
  361. package/Libraries/Linking/NativeIntentAndroid.js +31 -0
  362. package/Libraries/Linking/NativeLinkingManager.js +28 -0
  363. package/Libraries/LinkingIOS/RCTLinkingManager.h +38 -38
  364. package/Libraries/LinkingIOS/RCTLinkingManager.mm +197 -201
  365. package/Libraries/LinkingIOS/RCTLinkingPlugins.h +40 -40
  366. package/Libraries/LinkingIOS/RCTLinkingPlugins.mm +32 -32
  367. package/Libraries/LinkingIOS/React-RCTLinking.podspec +50 -50
  368. package/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +116 -0
  369. package/Libraries/Lists/FillRateHelper.js +241 -245
  370. package/Libraries/Lists/FlatList.js +637 -641
  371. package/Libraries/Lists/SectionList.js +265 -265
  372. package/Libraries/Lists/ViewabilityHelper.js +341 -341
  373. package/Libraries/Lists/VirtualizeUtils.js +247 -247
  374. package/Libraries/Lists/VirtualizedList.js +2282 -2431
  375. package/Libraries/Lists/VirtualizedListContext.js +152 -0
  376. package/Libraries/Lists/VirtualizedSectionList.js +751 -751
  377. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +117 -117
  378. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +134 -134
  379. package/Libraries/LogBox/Data/LogBoxData.js +477 -480
  380. package/Libraries/LogBox/Data/LogBoxLog.js +144 -144
  381. package/Libraries/LogBox/Data/LogBoxSymbolication.js +64 -64
  382. package/Libraries/LogBox/Data/parseLogBoxLog.js +373 -336
  383. package/Libraries/LogBox/LogBox.js +213 -212
  384. package/Libraries/LogBox/LogBoxInspectorContainer.js +68 -68
  385. package/Libraries/LogBox/LogBoxNotificationContainer.js +102 -102
  386. package/Libraries/LogBox/UI/AnsiHighlight.js +103 -103
  387. package/Libraries/LogBox/UI/LogBoxButton.js +71 -71
  388. package/Libraries/LogBox/UI/LogBoxInspector.js +153 -153
  389. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +157 -157
  390. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +114 -114
  391. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +168 -168
  392. package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +126 -126
  393. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +186 -186
  394. package/Libraries/LogBox/UI/LogBoxInspectorSection.js +60 -60
  395. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +137 -137
  396. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +116 -116
  397. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +213 -213
  398. package/Libraries/LogBox/UI/LogBoxMessage.js +88 -88
  399. package/Libraries/LogBox/UI/LogBoxNotification.js +221 -221
  400. package/Libraries/LogBox/UI/LogBoxStyle.js +67 -67
  401. package/Libraries/Modal/Modal.js +282 -293
  402. package/Libraries/Modal/NativeModalManager.js +22 -22
  403. package/Libraries/Modal/RCTModalHostViewNativeComponent.js +135 -135
  404. package/Libraries/NativeAnimation/Drivers/RCTAnimationDriver.h +38 -38
  405. package/Libraries/NativeAnimation/Drivers/RCTDecayAnimation.h +12 -12
  406. package/Libraries/NativeAnimation/Drivers/RCTDecayAnimation.m +128 -128
  407. package/Libraries/NativeAnimation/Drivers/RCTEventAnimation.h +21 -21
  408. package/Libraries/NativeAnimation/Drivers/RCTEventAnimation.m +38 -38
  409. package/Libraries/NativeAnimation/Drivers/RCTFrameAnimation.h +12 -12
  410. package/Libraries/NativeAnimation/Drivers/RCTFrameAnimation.m +158 -158
  411. package/Libraries/NativeAnimation/Drivers/RCTSpringAnimation.h +12 -12
  412. package/Libraries/NativeAnimation/Drivers/RCTSpringAnimation.m +214 -214
  413. package/Libraries/NativeAnimation/Nodes/RCTAdditionAnimatedNode.h +12 -12
  414. package/Libraries/NativeAnimation/Nodes/RCTAdditionAnimatedNode.m +26 -26
  415. package/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h +51 -51
  416. package/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m +128 -128
  417. package/Libraries/NativeAnimation/Nodes/RCTDiffClampAnimatedNode.h +12 -12
  418. package/Libraries/NativeAnimation/Nodes/RCTDiffClampAnimatedNode.m +61 -61
  419. package/Libraries/NativeAnimation/Nodes/RCTDivisionAnimatedNode.h +12 -12
  420. package/Libraries/NativeAnimation/Nodes/RCTDivisionAnimatedNode.m +33 -33
  421. package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.h +12 -12
  422. package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.m +171 -171
  423. package/Libraries/NativeAnimation/Nodes/RCTModuloAnimatedNode.h +12 -12
  424. package/Libraries/NativeAnimation/Nodes/RCTModuloAnimatedNode.m +22 -22
  425. package/Libraries/NativeAnimation/Nodes/RCTMultiplicationAnimatedNode.h +12 -12
  426. package/Libraries/NativeAnimation/Nodes/RCTMultiplicationAnimatedNode.m +27 -27
  427. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.h +26 -23
  428. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +143 -133
  429. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.h +14 -14
  430. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +51 -51
  431. package/Libraries/NativeAnimation/Nodes/RCTSubtractionAnimatedNode.h +13 -13
  432. package/Libraries/NativeAnimation/Nodes/RCTSubtractionAnimatedNode.m +27 -27
  433. package/Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h +13 -13
  434. package/Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m +52 -52
  435. package/Libraries/NativeAnimation/Nodes/RCTTransformAnimatedNode.h +14 -14
  436. package/Libraries/NativeAnimation/Nodes/RCTTransformAnimatedNode.m +57 -57
  437. package/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.h +30 -30
  438. package/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.m +56 -56
  439. package/Libraries/NativeAnimation/RCTAnimationPlugins.h +41 -40
  440. package/Libraries/NativeAnimation/RCTAnimationPlugins.mm +33 -32
  441. package/Libraries/NativeAnimation/RCTAnimationUtils.h +38 -38
  442. package/Libraries/NativeAnimation/RCTAnimationUtils.m +115 -115
  443. package/Libraries/NativeAnimation/RCTNativeAnimatedModule.h +23 -20
  444. package/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +364 -350
  445. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h +95 -89
  446. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +482 -466
  447. package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.h +23 -0
  448. package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +384 -0
  449. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +47 -47
  450. package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +21 -21
  451. package/Libraries/NativeModules/specs/NativeDevMenu.js +24 -24
  452. package/Libraries/NativeModules/specs/NativeDevSettings.js +37 -37
  453. package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +20 -20
  454. package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +49 -49
  455. package/Libraries/NativeModules/specs/NativeLogBox.js +21 -21
  456. package/Libraries/NativeModules/specs/NativeRedBox.js +21 -21
  457. package/Libraries/NativeModules/specs/NativeSourceCode.js +37 -22
  458. package/Libraries/Network/FormData.js +92 -92
  459. package/Libraries/Network/NativeNetworkingAndroid.js +38 -38
  460. package/Libraries/Network/NativeNetworkingIOS.js +38 -38
  461. package/Libraries/Network/RCTDataRequestHandler.h +16 -16
  462. package/Libraries/Network/RCTDataRequestHandler.mm +83 -83
  463. package/Libraries/Network/RCTFileRequestHandler.h +16 -16
  464. package/Libraries/Network/RCTFileRequestHandler.mm +104 -104
  465. package/Libraries/Network/RCTHTTPRequestHandler.h +16 -16
  466. package/Libraries/Network/RCTHTTPRequestHandler.mm +181 -181
  467. package/Libraries/Network/RCTNetworkPlugins.h +43 -43
  468. package/Libraries/Network/RCTNetworkPlugins.mm +35 -35
  469. package/Libraries/Network/RCTNetworkTask.h +47 -47
  470. package/Libraries/Network/RCTNetworkTask.mm +210 -210
  471. package/Libraries/Network/RCTNetworking.android.js +89 -90
  472. package/Libraries/Network/RCTNetworking.h +73 -73
  473. package/Libraries/Network/RCTNetworking.ios.js +68 -63
  474. package/Libraries/Network/RCTNetworking.macos.js +15 -15
  475. package/Libraries/Network/RCTNetworking.mm +736 -738
  476. package/Libraries/Network/React-RCTNetwork.podspec +48 -48
  477. package/Libraries/Network/XHRInterceptor.js +166 -166
  478. package/Libraries/Network/XMLHttpRequest.js +631 -622
  479. package/Libraries/Network/convertRequestBody.js +43 -43
  480. package/Libraries/Network/fetch.js +19 -18
  481. package/Libraries/NewAppScreen/components/Colors.js +21 -20
  482. package/Libraries/NewAppScreen/components/DebugInstructions.js +45 -45
  483. package/Libraries/NewAppScreen/components/Header.js +73 -55
  484. package/Libraries/NewAppScreen/components/HermesBadge.js +46 -0
  485. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +143 -123
  486. package/Libraries/NewAppScreen/components/ReloadInstructions.js +44 -44
  487. package/Libraries/NewAppScreen/index.js +27 -19
  488. package/Libraries/Performance/NativeJSCSamplingProfiler.js +20 -20
  489. package/Libraries/Performance/PureComponentDebug.js +73 -73
  490. package/Libraries/Performance/QuickPerformanceLogger.js +101 -101
  491. package/Libraries/Performance/SamplingProfiler.js +39 -39
  492. package/Libraries/Performance/Systrace.js +219 -208
  493. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +60 -60
  494. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +262 -262
  495. package/Libraries/Pressability/HoverState.js +62 -62
  496. package/Libraries/Pressability/Pressability.js +920 -872
  497. package/Libraries/Pressability/PressabilityDebug.js +81 -81
  498. package/Libraries/Pressability/usePressability.js +52 -43
  499. package/Libraries/Promise.js +24 -53
  500. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +74 -74
  501. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +520 -520
  502. package/Libraries/PushNotificationIOS/RCTPushNotificationManager.h +34 -34
  503. package/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +760 -764
  504. package/Libraries/PushNotificationIOS/RCTPushNotificationPlugins.h +40 -40
  505. package/Libraries/PushNotificationIOS/RCTPushNotificationPlugins.mm +32 -32
  506. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +48 -48
  507. package/Libraries/RCTRequired/BUCK +1 -1
  508. package/Libraries/RCTRequired/RCTRequired/RCTRequired.h +77 -77
  509. package/Libraries/RCTRequired/RCTRequired.podspec +30 -30
  510. package/Libraries/RCTTest/RNTester-macOS/AppDelegate.h +15 -15
  511. package/Libraries/RCTTest/RNTester-macOS/AppDelegate.m +27 -27
  512. package/Libraries/RCTTest/RNTester-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json +57 -57
  513. package/Libraries/RCTTest/RNTester-macOS/Base.lproj/Main.storyboard +693 -693
  514. package/Libraries/RCTTest/RNTester-macOS/Info.plist +32 -32
  515. package/Libraries/RCTTest/RNTester-macOS/ViewController.h +15 -15
  516. package/Libraries/RCTTest/RNTester-macOS/ViewController.m +27 -27
  517. package/Libraries/RCTTest/RNTester-macOS/main.m +13 -13
  518. package/Libraries/RCTTest/RNTester-macOSTests/Info.plist +22 -22
  519. package/Libraries/RCTTest/RNTester-macOSTests/RNTester_macOSTests.m +39 -39
  520. package/Libraries/RCTTest/RNTester-macOSUITests/Info.plist +22 -22
  521. package/Libraries/RCTTest/RNTester-macOSUITests/RNTester_macOSUITests.m +40 -40
  522. package/Libraries/ReactNative/AppContainer.js +157 -155
  523. package/Libraries/ReactNative/AppRegistry.js +311 -311
  524. package/Libraries/ReactNative/DummyUIManager.js +121 -122
  525. package/Libraries/ReactNative/FabricUIManager.js +64 -56
  526. package/Libraries/ReactNative/HeadlessJsTaskError.js +13 -13
  527. package/Libraries/ReactNative/I18nManager.js +56 -56
  528. package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +21 -21
  529. package/Libraries/ReactNative/NativeI18nManager.js +26 -26
  530. package/Libraries/ReactNative/NativeUIManager.js +121 -122
  531. package/Libraries/ReactNative/PaperUIManager.js +163 -166
  532. package/Libraries/ReactNative/ReactFabricInternals.js +17 -17
  533. package/Libraries/ReactNative/RootTag.js +27 -0
  534. package/Libraries/ReactNative/UIManager.js +38 -38
  535. package/Libraries/ReactNative/UIManagerProperties.js +65 -66
  536. package/Libraries/ReactNative/getNativeComponentAttributes.js +184 -186
  537. package/Libraries/ReactNative/queryLayoutByID.js +58 -58
  538. package/Libraries/ReactNative/renderApplication.js +63 -59
  539. package/Libraries/ReactNative/requireNativeComponent.js +32 -32
  540. package/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js +11 -11
  541. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +61 -61
  542. package/Libraries/Reliability/UserFlow.js +136 -0
  543. package/Libraries/Renderer/REVISION +1 -1
  544. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +21795 -20625
  545. package/Libraries/Renderer/implementations/ReactFabric-dev.js +21566 -20526
  546. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +7728 -7450
  547. package/Libraries/Renderer/implementations/ReactFabric-prod.js +7729 -7447
  548. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +8023 -7728
  549. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +8024 -7725
  550. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +22441 -21235
  551. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +22212 -21136
  552. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +7952 -7688
  553. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +7953 -7685
  554. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +8244 -7966
  555. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +8245 -7963
  556. package/Libraries/Renderer/shims/ReactFabric.js +32 -32
  557. package/Libraries/Renderer/shims/ReactFeatureFlags.js +17 -17
  558. package/Libraries/Renderer/shims/ReactNative.js +23 -23
  559. package/Libraries/Renderer/shims/ReactNativeTypes.js +247 -213
  560. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +133 -133
  561. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +34 -34
  562. package/Libraries/Settings/NativeSettingsManager.js +26 -26
  563. package/Libraries/Settings/RCTSettingsManager.h +16 -16
  564. package/Libraries/Settings/RCTSettingsManager.mm +155 -158
  565. package/Libraries/Settings/RCTSettingsPlugins.h +40 -40
  566. package/Libraries/Settings/RCTSettingsPlugins.mm +32 -32
  567. package/Libraries/Settings/React-RCTSettings.podspec +48 -48
  568. package/Libraries/Settings/Settings.android.js +33 -33
  569. package/Libraries/Settings/Settings.ios.js +79 -81
  570. package/Libraries/Settings/Settings.macos.js +15 -15
  571. package/Libraries/Share/NativeShareModule.js +24 -24
  572. package/Libraries/Share/Share.js +172 -163
  573. package/Libraries/Storage/AsyncStorage.js +361 -360
  574. package/Libraries/Storage/NativeAsyncLocalStorage.js +43 -0
  575. package/Libraries/Storage/NativeAsyncSQLiteDBStorage.js +43 -0
  576. package/Libraries/StyleSheet/EdgeInsetsPropType.js +15 -15
  577. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +37 -41
  578. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +77 -77
  579. package/Libraries/StyleSheet/PlatformColorValueTypes.macos.js +126 -78
  580. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +23 -23
  581. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +22 -22
  582. package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.js +41 -25
  583. package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.macos.js +43 -26
  584. package/Libraries/StyleSheet/PointPropType.js +17 -17
  585. package/Libraries/StyleSheet/Rect.js +28 -28
  586. package/Libraries/StyleSheet/StyleSheet.js +374 -364
  587. package/Libraries/StyleSheet/StyleSheetTypes.js +682 -681
  588. package/Libraries/StyleSheet/StyleSheetValidation.js +100 -100
  589. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +58 -82
  590. package/Libraries/StyleSheet/flattenStyle.js +41 -41
  591. package/Libraries/StyleSheet/normalizeColor.js +36 -393
  592. package/Libraries/StyleSheet/processColor.js +61 -61
  593. package/Libraries/StyleSheet/processColorArray.js +24 -24
  594. package/Libraries/StyleSheet/processTransform.js +253 -253
  595. package/Libraries/StyleSheet/setNormalizedColorAlpha.js +31 -31
  596. package/Libraries/StyleSheet/splitLayoutProps.js +64 -64
  597. package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponent.h +26 -26
  598. package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponent.mm +70 -68
  599. package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponentState.h +18 -18
  600. package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponentState.mm +28 -28
  601. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent+Internal.h +20 -20
  602. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent.h +20 -20
  603. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent.mm +108 -108
  604. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentController.h +12 -12
  605. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentController.mm +141 -141
  606. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentOptions.h +20 -20
  607. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentState.h +20 -20
  608. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentState.mm +41 -41
  609. package/Libraries/Text/BaseText/RCTBaseTextShadowView.h +27 -27
  610. package/Libraries/Text/BaseText/RCTBaseTextShadowView.m +157 -157
  611. package/Libraries/Text/BaseText/RCTBaseTextViewManager.h +16 -16
  612. package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +58 -58
  613. package/Libraries/Text/RCTConvert+Text.h +36 -36
  614. package/Libraries/Text/RCTConvert+Text.m +35 -35
  615. package/Libraries/Text/RCTTextAttributes.h +101 -101
  616. package/Libraries/Text/RCTTextAttributes.m +340 -340
  617. package/Libraries/Text/RCTTextTransform.h +16 -16
  618. package/Libraries/Text/RCTTextUIKit.h +48 -48
  619. package/Libraries/Text/RawText/RCTRawTextShadowView.h +18 -18
  620. package/Libraries/Text/RawText/RCTRawTextShadowView.m +33 -33
  621. package/Libraries/Text/RawText/RCTRawTextViewManager.h +16 -16
  622. package/Libraries/Text/RawText/RCTRawTextViewManager.m +28 -28
  623. package/Libraries/Text/React-RCTText.podspec +35 -35
  624. package/Libraries/Text/Text/NSTextStorage+FontScaling.h +20 -20
  625. package/Libraries/Text/Text/NSTextStorage+FontScaling.m +137 -137
  626. package/Libraries/Text/Text/RCTTextShadowView.h +28 -28
  627. package/Libraries/Text/Text/RCTTextShadowView.m +451 -451
  628. package/Libraries/Text/Text/RCTTextView.h +27 -27
  629. package/Libraries/Text/Text/RCTTextView.m +475 -469
  630. package/Libraries/Text/Text/RCTTextViewManager.h +14 -14
  631. package/Libraries/Text/Text/RCTTextViewManager.m +98 -98
  632. package/Libraries/Text/Text.js +260 -302
  633. package/Libraries/Text/TextAncestor.js +18 -18
  634. package/Libraries/Text/TextInjection.js +17 -0
  635. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +16 -16
  636. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +148 -148
  637. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.h +16 -16
  638. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +25 -27
  639. package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +62 -60
  640. package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +522 -513
  641. package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +46 -46
  642. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h +44 -44
  643. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +444 -444
  644. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +86 -84
  645. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.h +25 -25
  646. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +331 -331
  647. package/Libraries/Text/TextInput/RCTBaseTextInputView.h +70 -70
  648. package/Libraries/Text/TextInput/RCTBaseTextInputView.m +766 -759
  649. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.h +12 -12
  650. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +181 -180
  651. package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.h +12 -12
  652. package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.m +22 -22
  653. package/Libraries/Text/TextInput/RCTInputAccessoryView.h +17 -17
  654. package/Libraries/Text/TextInput/RCTInputAccessoryView.m +79 -79
  655. package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.h +12 -12
  656. package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.m +86 -86
  657. package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.h +12 -12
  658. package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.m +34 -34
  659. package/Libraries/Text/TextInput/RCTTextSelection.h +26 -26
  660. package/Libraries/Text/TextInput/RCTTextSelection.m +36 -36
  661. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.h +16 -16
  662. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.m +92 -82
  663. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.h +16 -16
  664. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.m +34 -34
  665. package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +60 -59
  666. package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +530 -530
  667. package/Libraries/Text/TextInput/Singleline/macOS/RCTUISecureTextField.h +12 -12
  668. package/Libraries/Text/TextInput/Singleline/macOS/RCTUISecureTextField.m +12 -12
  669. package/Libraries/Text/TextNativeComponent.js +68 -0
  670. package/Libraries/Text/TextProps.js +211 -190
  671. package/Libraries/Text/VirtualText/RCTVirtualTextShadowView.h +12 -12
  672. package/Libraries/Text/VirtualText/RCTVirtualTextShadowView.m +38 -38
  673. package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.h +12 -12
  674. package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.m +26 -26
  675. package/Libraries/TurboModule/RCTExport.js +38 -36
  676. package/Libraries/TurboModule/TurboModuleRegistry.js +70 -45
  677. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +37 -36
  678. package/Libraries/TypeSafety/RCTConvertHelpers.h +74 -73
  679. package/Libraries/TypeSafety/RCTConvertHelpers.mm +51 -45
  680. package/Libraries/TypeSafety/RCTTypeSafety.podspec +44 -44
  681. package/Libraries/TypeSafety/RCTTypedModuleConstants.h +47 -47
  682. package/Libraries/TypeSafety/RCTTypedModuleConstants.mm +48 -48
  683. package/Libraries/Types/CodegenTypes.js +40 -40
  684. package/Libraries/Types/CoreEventTypes.js +183 -163
  685. package/Libraries/UTFSequence.js +54 -54
  686. package/Libraries/Utilities/Appearance.js +87 -87
  687. package/Libraries/Utilities/BackHandler.android.js +113 -118
  688. package/Libraries/Utilities/BackHandler.ios.js +41 -125
  689. package/Libraries/Utilities/BackHandler.macos.js +18 -18
  690. package/Libraries/Utilities/DebugEnvironment.js +21 -21
  691. package/Libraries/Utilities/DevSettings.js +75 -65
  692. package/Libraries/Utilities/DeviceInfo.js +15 -15
  693. package/Libraries/Utilities/Dimensions.js +142 -142
  694. package/Libraries/Utilities/GlobalPerformanceLogger.js +24 -24
  695. package/Libraries/Utilities/HMRClient.js +339 -331
  696. package/Libraries/Utilities/HMRClientProdShim.js +30 -30
  697. package/Libraries/Utilities/JSDevSupportModule.js +40 -40
  698. package/Libraries/Utilities/LoadingView.android.js +29 -29
  699. package/Libraries/Utilities/LoadingView.ios.js +52 -40
  700. package/Libraries/Utilities/LoadingView.js +16 -16
  701. package/Libraries/Utilities/LoadingView.macos.js +15 -15
  702. package/Libraries/Utilities/MatrixMath.js +748 -752
  703. package/Libraries/Utilities/NativeAppearance.js +36 -36
  704. package/Libraries/Utilities/NativeDevLoadingView.js +25 -25
  705. package/Libraries/Utilities/NativeDevSplitBundleLoader.js +20 -0
  706. package/Libraries/Utilities/NativeDeviceInfo.js +60 -49
  707. package/Libraries/Utilities/NativeJSDevSupport.js +25 -25
  708. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +40 -38
  709. package/Libraries/Utilities/NativePlatformConstantsIOS.js +34 -34
  710. package/Libraries/Utilities/NativePlatformConstantsMacOS.js +32 -32
  711. package/Libraries/Utilities/PerformanceLoggerContext.js +26 -26
  712. package/Libraries/Utilities/PixelRatio.js +127 -127
  713. package/Libraries/Utilities/Platform.android.js +72 -66
  714. package/Libraries/Utilities/Platform.ios.js +74 -68
  715. package/Libraries/Utilities/Platform.macos.js +67 -63
  716. package/Libraries/Utilities/PolyfillFunctions.js +56 -56
  717. package/Libraries/Utilities/RCTLog.js +55 -55
  718. package/Libraries/Utilities/ReactNativeTestTools.js +252 -249
  719. package/Libraries/Utilities/SceneTracker.js +41 -41
  720. package/Libraries/Utilities/__mocks__/BackHandler.js +50 -50
  721. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +16 -16
  722. package/Libraries/Utilities/__mocks__/PixelRatio.js +25 -25
  723. package/Libraries/Utilities/binaryToBase64.js +31 -29
  724. package/Libraries/Utilities/buildStyleInterpolator.js +209 -211
  725. package/Libraries/Utilities/clamp.js +23 -23
  726. package/Libraries/Utilities/codegenNativeCommands.js +31 -31
  727. package/Libraries/Utilities/codegenNativeComponent.js +62 -62
  728. package/Libraries/Utilities/createPerformanceLogger.js +331 -275
  729. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +87 -84
  730. package/Libraries/Utilities/defineLazyObjectProperty.js +66 -66
  731. package/Libraries/Utilities/deprecatedPropType.js +38 -38
  732. package/Libraries/Utilities/differ/deepDiffer.js +101 -101
  733. package/Libraries/Utilities/differ/insetsDiffer.js +40 -40
  734. package/Libraries/Utilities/differ/matricesDiffer.js +47 -47
  735. package/Libraries/Utilities/differ/pointsDiffer.js +27 -27
  736. package/Libraries/Utilities/differ/sizesDiffer.js +20 -20
  737. package/Libraries/Utilities/dismissKeyboard.js +21 -21
  738. package/Libraries/Utilities/groupByEveryN.js +51 -51
  739. package/Libraries/Utilities/infoLog.js +20 -20
  740. package/Libraries/Utilities/logError.js +27 -27
  741. package/Libraries/Utilities/mapWithSeparator.js +28 -28
  742. package/Libraries/Utilities/mergeIntoFast.js +26 -26
  743. package/Libraries/Utilities/registerGeneratedViewConfig.js +83 -83
  744. package/Libraries/Utilities/setAndForwardRef.js +71 -71
  745. package/Libraries/Utilities/stringifySafe.js +121 -121
  746. package/Libraries/Utilities/truncate.js +51 -51
  747. package/Libraries/Utilities/useColorScheme.js +31 -31
  748. package/Libraries/Utilities/useWindowDimensions.js +40 -40
  749. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +134 -134
  750. package/Libraries/Utilities/warnOnce.js +32 -34
  751. package/Libraries/Vibration/NativeVibration.js +25 -25
  752. package/Libraries/Vibration/RCTVibration.h +12 -12
  753. package/Libraries/Vibration/RCTVibration.mm +54 -57
  754. package/Libraries/Vibration/RCTVibrationPlugins.h +40 -40
  755. package/Libraries/Vibration/RCTVibrationPlugins.mm +32 -32
  756. package/Libraries/Vibration/React-RCTVibration.podspec +48 -48
  757. package/Libraries/Vibration/Vibration.js +114 -112
  758. package/Libraries/WebSocket/NativeWebSocketModule.js +35 -35
  759. package/Libraries/WebSocket/RCTReconnectingWebSocket.h +37 -37
  760. package/Libraries/WebSocket/RCTReconnectingWebSocket.m +106 -106
  761. package/Libraries/WebSocket/RCTSRWebSocket.h +132 -132
  762. package/Libraries/WebSocket/RCTSRWebSocket.m +1647 -1640
  763. package/Libraries/WebSocket/WebSocket.js +275 -277
  764. package/Libraries/WebSocket/WebSocketEvent.js +27 -27
  765. package/Libraries/WebSocket/WebSocketInterceptor.js +226 -228
  766. package/Libraries/WebSocket/__mocks__/event-target-shim.js +27 -27
  767. package/Libraries/Wrapper/Example/RCTWrapperExampleView.h +16 -16
  768. package/Libraries/Wrapper/Example/RCTWrapperExampleView.m +60 -60
  769. package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.h +16 -16
  770. package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.m +22 -22
  771. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.h +20 -20
  772. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.m +47 -47
  773. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.h +18 -18
  774. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.m +32 -32
  775. package/Libraries/Wrapper/RCTWrapper.h +66 -66
  776. package/Libraries/Wrapper/RCTWrapperShadowView.h +22 -22
  777. package/Libraries/Wrapper/RCTWrapperShadowView.m +133 -133
  778. package/Libraries/Wrapper/RCTWrapperView.h +36 -36
  779. package/Libraries/Wrapper/RCTWrapperView.m +98 -98
  780. package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.h +25 -25
  781. package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.m +134 -134
  782. package/Libraries/Wrapper/RCTWrapperViewManager.h +20 -20
  783. package/Libraries/Wrapper/RCTWrapperViewManager.m +27 -27
  784. package/Libraries/YellowBox/YellowBoxDeprecated.js +75 -75
  785. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +32 -32
  786. package/Libraries/promiseRejectionIsError.js +24 -24
  787. package/Libraries/promiseRejectionTrackingOptions.js +54 -0
  788. package/Libraries/vendor/core/ErrorUtils.js +25 -25
  789. package/Libraries/vendor/emitter/EventEmitter.js +20 -228
  790. package/Libraries/vendor/emitter/_EmitterSubscription.js +60 -0
  791. package/Libraries/vendor/emitter/_EventEmitter.js +173 -0
  792. package/Libraries/vendor/emitter/_EventSubscription.js +40 -0
  793. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +101 -0
  794. package/README.md +6 -6
  795. package/React/Base/RCTAssert.h +172 -167
  796. package/React/Base/RCTAssert.m +232 -231
  797. package/React/Base/RCTBridge+Cxx.h +17 -17
  798. package/React/Base/RCTBridge+Cxx.mm +26 -26
  799. package/React/Base/RCTBridge+Private.h +149 -149
  800. package/React/Base/RCTBridge.h +321 -297
  801. package/React/Base/RCTBridge.m +432 -392
  802. package/React/Base/RCTBridgeDelegate.h +79 -79
  803. package/React/Base/RCTBridgeMethod.h +37 -37
  804. package/React/Base/RCTBridgeModule.h +374 -371
  805. package/React/Base/RCTBundleURLProvider.h +140 -112
  806. package/React/Base/RCTBundleURLProvider.mm +330 -0
  807. package/React/Base/RCTComponentEvent.h +23 -23
  808. package/React/Base/RCTComponentEvent.m +49 -49
  809. package/React/Base/RCTConstants.h +30 -11
  810. package/React/Base/RCTConstants.m +56 -11
  811. package/React/Base/RCTConvert.h +278 -278
  812. package/React/Base/RCTConvert.m +1524 -1479
  813. package/React/Base/RCTCxxConvert.h +18 -18
  814. package/React/Base/RCTCxxConvert.m +12 -12
  815. package/React/Base/RCTDefines.h +145 -150
  816. package/React/Base/RCTDisplayLink.h +20 -20
  817. package/React/Base/RCTDisplayLink.m +167 -158
  818. package/React/Base/RCTErrorCustomizer.h +23 -23
  819. package/React/Base/RCTErrorInfo.h +21 -21
  820. package/React/Base/RCTErrorInfo.m +24 -24
  821. package/React/Base/RCTEventDispatcher.m +30 -222
  822. package/React/Base/RCTEventDispatcherProtocol.h +128 -0
  823. package/React/Base/RCTFocusChangeEvent.h +20 -20
  824. package/React/Base/RCTFocusChangeEvent.m +30 -30
  825. package/React/Base/RCTFrameUpdate.h +51 -51
  826. package/React/Base/RCTFrameUpdate.m +27 -27
  827. package/React/Base/RCTImageSource.h +40 -40
  828. package/React/Base/RCTImageSource.m +89 -89
  829. package/React/Base/RCTInvalidating.h +14 -14
  830. package/React/Base/RCTJSInvokerModule.h +17 -16
  831. package/React/Base/RCTJSScriptLoaderModule.h +18 -0
  832. package/React/Base/RCTJSStackFrame.h +30 -30
  833. package/React/Base/RCTJSStackFrame.m +150 -150
  834. package/React/Base/RCTJavaScriptExecutor.h +80 -80
  835. package/React/Base/RCTJavaScriptLoader.h +98 -94
  836. package/React/Base/RCTJavaScriptLoader.mm +388 -378
  837. package/React/Base/RCTKeyCommands.h +31 -48
  838. package/React/Base/RCTKeyCommands.m +267 -329
  839. package/React/Base/RCTLog.h +136 -136
  840. package/React/Base/RCTLog.mm +308 -308
  841. package/React/Base/RCTManagedPointer.h +40 -40
  842. package/React/Base/RCTManagedPointer.mm +27 -27
  843. package/React/Base/RCTModuleData.h +100 -96
  844. package/React/Base/RCTModuleData.mm +460 -380
  845. package/React/Base/RCTModuleMethod.h +34 -34
  846. package/React/Base/RCTModuleMethod.mm +615 -615
  847. package/React/Base/RCTMultipartDataTask.h +27 -27
  848. package/React/Base/RCTMultipartDataTask.m +154 -154
  849. package/React/Base/RCTMultipartStreamReader.h +21 -21
  850. package/React/Base/RCTMultipartStreamReader.m +168 -168
  851. package/React/Base/RCTNullability.h +14 -14
  852. package/React/Base/RCTParserUtils.h +30 -30
  853. package/React/Base/RCTParserUtils.m +137 -137
  854. package/React/Base/RCTPerformanceLogger.h +104 -103
  855. package/React/Base/RCTPerformanceLogger.m +129 -128
  856. package/React/Base/RCTPlatformDisplayLink.h +41 -41
  857. package/React/Base/RCTRedBoxSetEnabled.h +14 -14
  858. package/React/Base/RCTRedBoxSetEnabled.m +24 -24
  859. package/React/Base/RCTReloadCommand.h +38 -38
  860. package/React/Base/RCTReloadCommand.m +67 -67
  861. package/React/Base/RCTRootContentView.h +32 -32
  862. package/React/Base/RCTRootContentView.m +158 -158
  863. package/React/Base/RCTRootView.h +165 -165
  864. package/React/Base/RCTRootView.m +504 -527
  865. package/React/Base/RCTRootViewDelegate.h +30 -30
  866. package/React/Base/RCTRootViewInternal.h +24 -34
  867. package/React/Base/RCTTouchEvent.h +23 -23
  868. package/React/Base/RCTTouchEvent.m +107 -107
  869. package/React/Base/RCTTouchHandler.h +26 -26
  870. package/React/Base/RCTTouchHandler.m +578 -578
  871. package/React/Base/RCTUIKit.h +469 -473
  872. package/React/Base/RCTURLRequestDelegate.h +40 -40
  873. package/React/Base/RCTURLRequestHandler.h +52 -52
  874. package/React/Base/RCTUtils.h +201 -195
  875. package/React/Base/RCTUtils.m +1123 -1070
  876. package/React/Base/RCTUtilsUIOverride.h +19 -16
  877. package/React/Base/RCTUtilsUIOverride.m +30 -30
  878. package/React/Base/RCTVersion.h +17 -17
  879. package/React/Base/RCTVersion.m +1 -1
  880. package/React/Base/RCTWeakProxy.h +16 -16
  881. package/React/Base/RCTWeakProxy.m +30 -30
  882. package/React/Base/Surface/RCTSurface.h +90 -141
  883. package/React/Base/Surface/RCTSurface.mm +606 -592
  884. package/React/Base/Surface/RCTSurfaceDelegate.h +34 -34
  885. package/React/Base/Surface/RCTSurfaceProtocol.h +81 -0
  886. package/React/Base/Surface/RCTSurfaceRootShadowView.h +32 -32
  887. package/React/Base/Surface/RCTSurfaceRootShadowView.m +91 -92
  888. package/React/Base/Surface/RCTSurfaceRootShadowViewDelegate.h +22 -22
  889. package/React/Base/Surface/RCTSurfaceRootView.h +21 -21
  890. package/React/Base/Surface/RCTSurfaceRootView.mm +16 -16
  891. package/React/Base/Surface/RCTSurfaceStage.h +47 -47
  892. package/React/Base/Surface/RCTSurfaceStage.m +18 -18
  893. package/React/Base/Surface/RCTSurfaceView+Internal.h +24 -24
  894. package/React/Base/Surface/RCTSurfaceView.h +25 -25
  895. package/React/Base/Surface/RCTSurfaceView.mm +90 -90
  896. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +52 -55
  897. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +182 -182
  898. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h +78 -77
  899. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +263 -257
  900. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h +32 -32
  901. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm +34 -34
  902. package/React/Base/macOS/RCTDynamicColor.h +28 -28
  903. package/React/Base/macOS/RCTDynamicColor.m +219 -217
  904. package/React/Base/macOS/RCTPlatform.m +40 -40
  905. package/React/Base/macOS/RCTPlatformDisplayLink.m +158 -157
  906. package/React/Base/macOS/RCTUIKit.m +539 -629
  907. package/React/CoreModules/BUCK +15 -7
  908. package/React/CoreModules/CoreModulesPlugins.h +64 -63
  909. package/React/CoreModules/CoreModulesPlugins.mm +62 -61
  910. package/React/CoreModules/RCTAccessibilityManager.h +36 -35
  911. package/React/CoreModules/RCTAccessibilityManager.mm +363 -366
  912. package/React/CoreModules/RCTActionSheetManager.h +14 -14
  913. package/React/CoreModules/RCTActionSheetManager.mm +379 -381
  914. package/React/CoreModules/RCTAlertController.h +20 -0
  915. package/React/CoreModules/RCTAlertController.m +40 -0
  916. package/React/CoreModules/RCTAlertManager.h +22 -22
  917. package/React/CoreModules/RCTAlertManager.mm +310 -331
  918. package/React/CoreModules/RCTAppState.h +12 -12
  919. package/React/CoreModules/RCTAppState.mm +165 -167
  920. package/React/CoreModules/RCTAppearance.h +22 -17
  921. package/React/CoreModules/RCTAppearance.mm +188 -190
  922. package/React/CoreModules/RCTAsyncLocalStorage.h +41 -41
  923. package/React/CoreModules/RCTAsyncLocalStorage.mm +490 -496
  924. package/React/CoreModules/RCTClipboard.h +12 -12
  925. package/React/CoreModules/RCTClipboard.mm +62 -64
  926. package/React/CoreModules/RCTDevLoadingView.h +14 -14
  927. package/React/CoreModules/RCTDevLoadingView.mm +369 -277
  928. package/React/CoreModules/RCTDevMenu.h +117 -117
  929. package/React/CoreModules/RCTDevMenu.mm +702 -670
  930. package/React/CoreModules/RCTDevSettings.h +133 -121
  931. package/React/CoreModules/RCTDevSettings.mm +612 -584
  932. package/React/CoreModules/RCTDevSplitBundleLoader.h +13 -0
  933. package/React/CoreModules/RCTDevSplitBundleLoader.mm +111 -0
  934. package/React/CoreModules/RCTDeviceInfo.h +21 -21
  935. package/React/CoreModules/RCTDeviceInfo.mm +245 -236
  936. package/React/CoreModules/RCTEventDispatcher.h +17 -0
  937. package/React/CoreModules/RCTEventDispatcher.mm +232 -0
  938. package/React/CoreModules/RCTExceptionsManager.h +47 -47
  939. package/React/CoreModules/RCTExceptionsManager.mm +181 -164
  940. package/React/CoreModules/RCTFPSGraph.h +26 -26
  941. package/React/CoreModules/RCTFPSGraph.m +123 -123
  942. package/React/CoreModules/RCTI18nManager.h +17 -17
  943. package/React/CoreModules/RCTI18nManager.mm +67 -69
  944. package/React/CoreModules/RCTKeyboardObserver.h +12 -12
  945. package/React/CoreModules/RCTKeyboardObserver.mm +140 -143
  946. package/React/CoreModules/RCTLogBox.h +19 -21
  947. package/React/CoreModules/RCTLogBox.mm +130 -236
  948. package/React/CoreModules/RCTLogBoxView.h +38 -0
  949. package/React/CoreModules/RCTLogBoxView.mm +132 -0
  950. package/React/CoreModules/RCTPerfMonitor.mm +573 -573
  951. package/React/CoreModules/RCTPlatform.h +14 -14
  952. package/React/CoreModules/RCTPlatform.mm +94 -91
  953. package/React/CoreModules/RCTRedBox.h +59 -59
  954. package/React/CoreModules/RCTRedBox.mm +1164 -1171
  955. package/React/CoreModules/RCTSourceCode.h +14 -14
  956. package/React/CoreModules/RCTSourceCode.mm +54 -56
  957. package/React/CoreModules/RCTStatusBarManager.h +24 -24
  958. package/React/CoreModules/RCTStatusBarManager.mm +214 -215
  959. package/React/CoreModules/RCTTiming.h +31 -31
  960. package/React/CoreModules/RCTTiming.mm +419 -419
  961. package/React/CoreModules/RCTWebSocketExecutor.h +19 -19
  962. package/React/CoreModules/RCTWebSocketExecutor.mm +292 -292
  963. package/React/CoreModules/RCTWebSocketModule.h +35 -35
  964. package/React/CoreModules/RCTWebSocketModule.mm +216 -211
  965. package/React/CoreModules/React-CoreModules.podspec +51 -51
  966. package/React/CxxBridge/JSCExecutorFactory.h +29 -29
  967. package/React/CxxBridge/JSCExecutorFactory.mm +26 -26
  968. package/React/CxxBridge/NSDataBigString.h +42 -42
  969. package/React/CxxBridge/NSDataBigString.mm +43 -43
  970. package/React/CxxBridge/RCTCxxBridge.mm +1605 -1490
  971. package/React/CxxBridge/RCTCxxBridgeDelegate.h +33 -33
  972. package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h +23 -22
  973. package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +37 -36
  974. package/React/CxxBridge/RCTMessageThread.h +40 -38
  975. package/React/CxxBridge/RCTMessageThread.mm +114 -116
  976. package/React/CxxBridge/RCTObjcExecutor.h +33 -33
  977. package/React/CxxBridge/RCTObjcExecutor.mm +148 -148
  978. package/React/CxxModule/DispatchMessageQueueThread.h +47 -47
  979. package/React/CxxModule/RCTCxxMethod.h +17 -17
  980. package/React/CxxModule/RCTCxxMethod.mm +139 -139
  981. package/React/CxxModule/RCTCxxModule.h +33 -33
  982. package/React/CxxModule/RCTCxxModule.mm +87 -87
  983. package/React/CxxModule/RCTCxxUtils.h +29 -29
  984. package/React/CxxModule/RCTCxxUtils.mm +105 -106
  985. package/React/CxxModule/RCTNativeModule.h +34 -33
  986. package/React/CxxModule/RCTNativeModule.mm +221 -140
  987. package/React/CxxUtils/RCTFollyConvert.h +19 -19
  988. package/React/CxxUtils/RCTFollyConvert.mm +110 -110
  989. package/React/DevSupport/RCTDevLoadingViewProtocol.h +18 -18
  990. package/React/DevSupport/RCTDevLoadingViewSetEnabled.h +11 -11
  991. package/React/DevSupport/RCTDevLoadingViewSetEnabled.m +24 -24
  992. package/React/DevSupport/RCTInspectorDevServerHelper.h +22 -21
  993. package/React/DevSupport/RCTInspectorDevServerHelper.mm +125 -98
  994. package/React/DevSupport/RCTPackagerClient.h +45 -45
  995. package/React/DevSupport/RCTPackagerClient.m +65 -65
  996. package/React/DevSupport/RCTPackagerConnection.h +75 -75
  997. package/React/DevSupport/RCTPackagerConnection.mm +309 -300
  998. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +21 -21
  999. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +99 -97
  1000. package/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.h +23 -19
  1001. package/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +207 -204
  1002. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +21 -0
  1003. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +153 -0
  1004. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +12 -0
  1005. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +70 -0
  1006. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +25 -25
  1007. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +178 -148
  1008. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +27 -27
  1009. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +58 -58
  1010. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +20 -22
  1011. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm +78 -94
  1012. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +30 -15
  1013. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +255 -231
  1014. package/React/Fabric/Mounting/ComponentViews/Picker/RCTPickerComponentView.h +19 -0
  1015. package/React/Fabric/Mounting/ComponentViews/Picker/RCTPickerComponentView.mm +205 -0
  1016. package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +51 -49
  1017. package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +43 -41
  1018. package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +21 -21
  1019. package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.mm +35 -34
  1020. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +21 -21
  1021. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +97 -99
  1022. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +57 -39
  1023. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +248 -87
  1024. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +23 -23
  1025. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +190 -190
  1026. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +62 -60
  1027. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +643 -432
  1028. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +21 -21
  1029. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +351 -350
  1030. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +21 -21
  1031. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +121 -122
  1032. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +34 -0
  1033. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +175 -0
  1034. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +27 -27
  1035. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +206 -171
  1036. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +21 -21
  1037. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +532 -439
  1038. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputNativeCommands.h +104 -104
  1039. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +43 -43
  1040. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +191 -198
  1041. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +18 -18
  1042. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +60 -60
  1043. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +21 -21
  1044. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +73 -73
  1045. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +91 -90
  1046. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +689 -585
  1047. package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +32 -32
  1048. package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +52 -52
  1049. package/React/Fabric/Mounting/RCTComponentViewFactory.h +47 -47
  1050. package/React/Fabric/Mounting/RCTComponentViewFactory.mm +163 -162
  1051. package/React/Fabric/Mounting/RCTComponentViewProtocol.h +127 -122
  1052. package/React/Fabric/Mounting/RCTComponentViewRegistry.h +60 -59
  1053. package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +165 -221
  1054. package/React/Fabric/Mounting/RCTMountingManager.h +46 -46
  1055. package/React/Fabric/Mounting/RCTMountingManager.mm +256 -313
  1056. package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +37 -37
  1057. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +43 -43
  1058. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +74 -74
  1059. package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +64 -64
  1060. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +47 -44
  1061. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +145 -118
  1062. package/React/Fabric/RCTConversions.h +192 -175
  1063. package/React/Fabric/RCTImageResponseDelegate.h +20 -20
  1064. package/React/Fabric/RCTImageResponseObserverProxy.h +33 -33
  1065. package/React/Fabric/RCTImageResponseObserverProxy.mm +53 -52
  1066. package/React/Fabric/RCTLocalizationProvider.h +36 -0
  1067. package/React/Fabric/RCTLocalizationProvider.mm +40 -0
  1068. package/React/Fabric/RCTPrimitives.h +10 -10
  1069. package/React/Fabric/RCTScheduler.h +74 -69
  1070. package/React/Fabric/RCTScheduler.mm +205 -130
  1071. package/React/Fabric/RCTSurfacePresenter.h +84 -79
  1072. package/React/Fabric/RCTSurfacePresenter.mm +519 -431
  1073. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +41 -41
  1074. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm +202 -191
  1075. package/React/Fabric/RCTSurfaceRegistry.h +47 -47
  1076. package/React/Fabric/RCTSurfaceRegistry.mm +62 -62
  1077. package/React/Fabric/RCTSurfaceTouchHandler.h +28 -19
  1078. package/React/Fabric/RCTSurfaceTouchHandler.mm +413 -402
  1079. package/React/Fabric/RCTTouchableComponentViewProtocol.h +13 -13
  1080. package/React/Fabric/Surface/RCTFabricSurface.h +144 -158
  1081. package/React/Fabric/Surface/RCTFabricSurface.mm +295 -279
  1082. package/React/Fabric/Surface/RCTFabricSurfaceHostingProxyRootView.h +15 -15
  1083. package/React/Fabric/Surface/RCTFabricSurfaceHostingProxyRootView.mm +21 -23
  1084. package/React/Fabric/Surface/RCTFabricSurfaceHostingView.h +15 -15
  1085. package/React/Fabric/Surface/RCTFabricSurfaceHostingView.mm +27 -27
  1086. package/React/Fabric/Utils/PlatformRunLoopObserver.h +54 -0
  1087. package/React/Fabric/Utils/PlatformRunLoopObserver.mm +97 -0
  1088. package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +44 -44
  1089. package/React/Fabric/Utils/RCTGenericDelegateSplitter.mm +94 -94
  1090. package/React/Inspector/RCTInspector.h +32 -32
  1091. package/React/Inspector/RCTInspector.mm +130 -130
  1092. package/React/Inspector/RCTInspectorPackagerConnection.h +35 -35
  1093. package/React/Inspector/RCTInspectorPackagerConnection.m +351 -351
  1094. package/React/Modules/MacOS/RCTAccessibilityManager.m +159 -147
  1095. package/React/Modules/RCTEventEmitter.h +47 -44
  1096. package/React/Modules/RCTEventEmitter.m +138 -115
  1097. package/React/Modules/RCTI18nUtil.h +37 -28
  1098. package/React/Modules/RCTI18nUtil.m +59 -105
  1099. package/React/Modules/RCTLayoutAnimation.h +34 -34
  1100. package/React/Modules/RCTLayoutAnimation.m +208 -211
  1101. package/React/Modules/RCTLayoutAnimationGroup.h +29 -29
  1102. package/React/Modules/RCTLayoutAnimationGroup.m +79 -79
  1103. package/React/Modules/RCTRedBoxExtraDataViewController.h +20 -20
  1104. package/React/Modules/RCTRedBoxExtraDataViewController.m +247 -253
  1105. package/React/Modules/RCTSurfacePresenterStub.h +44 -42
  1106. package/React/Modules/RCTSurfacePresenterStub.m +22 -22
  1107. package/React/Modules/RCTUIManager.h +175 -175
  1108. package/React/Modules/RCTUIManager.m +1675 -1672
  1109. package/React/Modules/RCTUIManagerObserverCoordinator.h +81 -81
  1110. package/React/Modules/RCTUIManagerObserverCoordinator.mm +100 -100
  1111. package/React/Modules/RCTUIManagerUtils.h +106 -106
  1112. package/React/Modules/RCTUIManagerUtils.m +103 -103
  1113. package/React/Profiler/RCTMacros.h +16 -16
  1114. package/React/Profiler/RCTProfile.h +226 -226
  1115. package/React/Profiler/RCTProfile.m +822 -823
  1116. package/React/React-RCTFabric.podspec +49 -48
  1117. package/React/Tests/Mounting/RCTComponentViewRegistryTests.mm +86 -0
  1118. package/React/Tests/Text/RCTParagraphComponentViewTests.mm +398 -0
  1119. package/React/UIUtils/RCTUIUtils.h +41 -41
  1120. package/React/UIUtils/RCTUIUtils.m +100 -99
  1121. package/React/Views/RCTActivityIndicatorView.h +21 -21
  1122. package/React/Views/RCTActivityIndicatorView.m +127 -127
  1123. package/React/Views/RCTActivityIndicatorViewManager.h +18 -18
  1124. package/React/Views/RCTActivityIndicatorViewManager.m +64 -64
  1125. package/React/Views/RCTAnimationType.h +21 -21
  1126. package/React/Views/RCTAutoInsetsProtocol.h +27 -27
  1127. package/React/Views/RCTBorderDrawing.h +69 -69
  1128. package/React/Views/RCTBorderDrawing.m +566 -566
  1129. package/React/Views/RCTBorderStyle.h +15 -15
  1130. package/React/Views/RCTComponent.h +57 -57
  1131. package/React/Views/RCTComponentData.h +40 -36
  1132. package/React/Views/RCTComponentData.m +472 -474
  1133. package/React/Views/RCTConvert+CoreLocation.h +18 -18
  1134. package/React/Views/RCTConvert+CoreLocation.m +22 -22
  1135. package/React/Views/RCTConvert+Transform.h +14 -14
  1136. package/React/Views/RCTConvert+Transform.m +147 -139
  1137. package/React/Views/RCTDatePicker.h +16 -16
  1138. package/React/Views/RCTDatePicker.m +88 -69
  1139. package/React/Views/RCTDatePickerManager.h +25 -25
  1140. package/React/Views/RCTDatePickerManager.m +100 -101
  1141. package/React/Views/RCTFont.h +49 -49
  1142. package/React/Views/RCTFont.mm +415 -415
  1143. package/React/Views/RCTFontSmoothing.h +16 -16
  1144. package/React/Views/RCTLayout.h +72 -72
  1145. package/React/Views/RCTLayout.m +132 -132
  1146. package/React/Views/RCTMaskedView.h +14 -14
  1147. package/React/Views/RCTMaskedView.m +34 -34
  1148. package/React/Views/RCTMaskedViewManager.h +12 -12
  1149. package/React/Views/RCTMaskedViewManager.m +22 -22
  1150. package/React/Views/RCTModalHostView.h +47 -53
  1151. package/React/Views/RCTModalHostView.m +203 -260
  1152. package/React/Views/RCTModalHostViewController.h +16 -18
  1153. package/React/Views/RCTModalHostViewController.m +77 -83
  1154. package/React/Views/RCTModalHostViewManager.h +34 -34
  1155. package/React/Views/RCTModalHostViewManager.m +139 -130
  1156. package/React/Views/RCTModalManager.h +17 -17
  1157. package/React/Views/RCTModalManager.m +42 -42
  1158. package/React/Views/RCTPicker.h +28 -28
  1159. package/React/Views/RCTPicker.m +211 -211
  1160. package/React/Views/RCTPickerManager.h +12 -12
  1161. package/React/Views/RCTPickerManager.m +68 -68
  1162. package/React/Views/RCTPointerEvents.h +15 -15
  1163. package/React/Views/RCTProgressView.h +26 -26
  1164. package/React/Views/RCTProgressView.m +76 -76
  1165. package/React/Views/RCTProgressViewManager.h +12 -12
  1166. package/React/Views/RCTProgressViewManager.m +54 -56
  1167. package/React/Views/RCTRootShadowView.h +34 -34
  1168. package/React/Views/RCTRootShadowView.m +41 -41
  1169. package/React/Views/RCTSegmentedControl.h +26 -26
  1170. package/React/Views/RCTSegmentedControl.m +142 -143
  1171. package/React/Views/RCTSegmentedControlManager.h +12 -12
  1172. package/React/Views/RCTSegmentedControlManager.m +34 -34
  1173. package/React/Views/RCTShadowView+Internal.h +18 -18
  1174. package/React/Views/RCTShadowView+Internal.m +23 -23
  1175. package/React/Views/RCTShadowView+Layout.h +39 -39
  1176. package/React/Views/RCTShadowView+Layout.m +69 -69
  1177. package/React/Views/RCTShadowView.h +244 -244
  1178. package/React/Views/RCTShadowView.m +700 -700
  1179. package/React/Views/RCTSlider.h +52 -52
  1180. package/React/Views/RCTSlider.m +349 -349
  1181. package/React/Views/RCTSliderManager.h +12 -12
  1182. package/React/Views/RCTSliderManager.m +111 -112
  1183. package/React/Views/RCTSwitch.h +26 -26
  1184. package/React/Views/RCTSwitch.m +55 -56
  1185. package/React/Views/RCTSwitchManager.h +12 -12
  1186. package/React/Views/RCTSwitchManager.m +77 -83
  1187. package/React/Views/RCTTextDecorationLineType.h +15 -15
  1188. package/React/Views/RCTView.h +152 -146
  1189. package/React/Views/RCTView.m +1782 -1572
  1190. package/React/Views/RCTViewKeyboardEvent.h +39 -0
  1191. package/React/Views/RCTViewKeyboardEvent.m +77 -0
  1192. package/React/Views/RCTViewManager.h +137 -137
  1193. package/React/Views/RCTViewManager.m +582 -533
  1194. package/React/Views/RCTWrapperViewController.h +16 -16
  1195. package/React/Views/RCTWrapperViewController.m +84 -86
  1196. package/React/Views/RefreshControl/RCTRefreshControl.h +19 -18
  1197. package/React/Views/RefreshControl/RCTRefreshControl.m +173 -171
  1198. package/React/Views/RefreshControl/RCTRefreshControlManager.h +12 -12
  1199. package/React/Views/RefreshControl/RCTRefreshControlManager.m +42 -42
  1200. package/React/Views/RefreshControl/RCTRefreshableProtocol.h +20 -20
  1201. package/React/Views/SafeAreaView/RCTSafeAreaShadowView.h +16 -16
  1202. package/React/Views/SafeAreaView/RCTSafeAreaShadowView.m +53 -53
  1203. package/React/Views/SafeAreaView/RCTSafeAreaView.h +24 -24
  1204. package/React/Views/SafeAreaView/RCTSafeAreaView.m +142 -142
  1205. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +20 -20
  1206. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.m +21 -21
  1207. package/React/Views/SafeAreaView/RCTSafeAreaViewManager.h +16 -16
  1208. package/React/Views/SafeAreaView/RCTSafeAreaViewManager.m +30 -30
  1209. package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.h +22 -22
  1210. package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.m +22 -22
  1211. package/React/Views/ScrollView/RCTScrollContentShadowView.h +14 -14
  1212. package/React/Views/ScrollView/RCTScrollContentShadowView.m +49 -49
  1213. package/React/Views/ScrollView/RCTScrollContentView.h +14 -14
  1214. package/React/Views/ScrollView/RCTScrollContentView.m +74 -74
  1215. package/React/Views/ScrollView/RCTScrollContentViewManager.h +12 -12
  1216. package/React/Views/ScrollView/RCTScrollContentViewManager.m +27 -27
  1217. package/React/Views/ScrollView/RCTScrollEvent.h +23 -23
  1218. package/React/Views/ScrollView/RCTScrollEvent.m +115 -115
  1219. package/React/Views/ScrollView/RCTScrollView.h +86 -92
  1220. package/React/Views/ScrollView/RCTScrollView.m +1406 -1440
  1221. package/React/Views/ScrollView/RCTScrollViewManager.h +21 -21
  1222. package/React/Views/ScrollView/RCTScrollViewManager.m +208 -234
  1223. package/React/Views/ScrollView/RCTScrollableProtocol.h +48 -43
  1224. package/React/Views/UIView+Private.h +17 -17
  1225. package/React/Views/UIView+React.h +132 -132
  1226. package/React/Views/UIView+React.m +413 -413
  1227. package/React/third-party.xcconfig +12 -12
  1228. package/React-Core.podspec +120 -129
  1229. package/React.podspec +56 -56
  1230. package/ReactAndroid/.npmignore +1 -1
  1231. package/ReactAndroid/Android-prebuilt.mk +97 -0
  1232. package/ReactAndroid/build.gradle +31 -22
  1233. package/ReactAndroid/gradle.properties +6 -8
  1234. package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK +2 -2
  1235. package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/FabricUIManagerFactory.java +1 -4
  1236. package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactAppTestActivity.java +1 -1
  1237. package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/ReactSettingsForTests.java +1 -1
  1238. package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/network/BUCK +1 -0
  1239. package/ReactAndroid/src/androidTest/java/com/facebook/react/testing/rule/ReactNativeTestRule.java +5 -0
  1240. package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK +0 -1
  1241. package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TextInputTestCase.java +31 -0
  1242. package/ReactAndroid/src/androidTest/js/AnimatedTransformTestModule.js +85 -85
  1243. package/ReactAndroid/src/androidTest/js/Asserts.js +38 -38
  1244. package/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +62 -62
  1245. package/ReactAndroid/src/androidTest/js/DatePickerDialogTestModule.js +45 -45
  1246. package/ReactAndroid/src/androidTest/js/ImageErrorTestApp.js +56 -56
  1247. package/ReactAndroid/src/androidTest/js/ImageOverlayColorTestApp.js +29 -29
  1248. package/ReactAndroid/src/androidTest/js/InitialPropsTestApp.js +25 -25
  1249. package/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +66 -66
  1250. package/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +89 -89
  1251. package/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +211 -211
  1252. package/ReactAndroid/src/androidTest/js/MultitouchHandlingTestAppModule.js +78 -78
  1253. package/ReactAndroid/src/androidTest/js/NativeIdTestModule.js +76 -76
  1254. package/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js +89 -89
  1255. package/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js +59 -59
  1256. package/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +183 -183
  1257. package/ReactAndroid/src/androidTest/js/ShareTestModule.js +36 -36
  1258. package/ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js +369 -369
  1259. package/ReactAndroid/src/androidTest/js/SwipeRefreshLayoutTestModule.js +101 -101
  1260. package/ReactAndroid/src/androidTest/js/TestBundle.js +125 -125
  1261. package/ReactAndroid/src/androidTest/js/TestIdTestModule.js +86 -86
  1262. package/ReactAndroid/src/androidTest/js/TestJSLocaleModule.js +28 -28
  1263. package/ReactAndroid/src/androidTest/js/TestJSToJavaParametersModule.js +125 -125
  1264. package/ReactAndroid/src/androidTest/js/TestJavaToJSArgumentsModule.js +114 -114
  1265. package/ReactAndroid/src/androidTest/js/TestJavaToJSReturnValuesModule.js +39 -39
  1266. package/ReactAndroid/src/androidTest/js/TextInputTestModule.js +191 -191
  1267. package/ReactAndroid/src/androidTest/js/TouchBubblingTestAppModule.js +84 -84
  1268. package/ReactAndroid/src/androidTest/js/UIManagerTestModule.js +267 -267
  1269. package/ReactAndroid/src/androidTest/js/ViewRenderingTestModule.js +109 -109
  1270. package/ReactAndroid/src/main/java/com/facebook/debug/holder/BUCK +1 -0
  1271. package/ReactAndroid/src/main/java/com/facebook/debug/tags/BUCK +1 -0
  1272. package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/BUCK +2 -0
  1273. package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesMemoryDumper.h +49 -49
  1274. package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.cpp +42 -42
  1275. package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.h +40 -40
  1276. package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/OnLoad.cpp +14 -14
  1277. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java +2 -5
  1278. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.java +1 -1
  1279. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp +102 -104
  1280. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/RuntimeConfig.java +6 -1
  1281. package/ReactAndroid/src/main/java/com/facebook/react/BUCK +2 -1
  1282. package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java +7 -1
  1283. package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.java +1 -1
  1284. package/ReactAndroid/src/main/java/com/facebook/react/MemoryPressureRouter.java +1 -1
  1285. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +41 -41
  1286. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +3 -3
  1287. package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +4 -4
  1288. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +109 -56
  1289. package/ReactAndroid/src/main/java/com/facebook/react/animated/AdditionAnimatedNode.java +10 -0
  1290. package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.java +16 -0
  1291. package/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK +3 -2
  1292. package/ReactAndroid/src/main/java/com/facebook/react/animated/DiffClampAnimatedNode.java +15 -0
  1293. package/ReactAndroid/src/main/java/com/facebook/react/animated/DivisionAnimatedNode.java +12 -2
  1294. package/ReactAndroid/src/main/java/com/facebook/react/animated/InterpolationAnimatedNode.java +4 -0
  1295. package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +11 -0
  1296. package/ReactAndroid/src/main/java/com/facebook/react/animated/MultiplicationAnimatedNode.java +10 -0
  1297. package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +473 -62
  1298. package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +187 -46
  1299. package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +36 -10
  1300. package/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java +7 -0
  1301. package/ReactAndroid/src/main/java/com/facebook/react/animated/SubtractionAnimatedNode.java +10 -0
  1302. package/ReactAndroid/src/main/java/com/facebook/react/animated/TrackingAnimatedNode.java +14 -0
  1303. package/ReactAndroid/src/main/java/com/facebook/react/animated/TransformAnimatedNode.java +8 -0
  1304. package/ReactAndroid/src/main/java/com/facebook/react/animated/ValueAnimatedNode.java +4 -0
  1305. package/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK +2 -0
  1306. package/ReactAndroid/src/main/java/com/facebook/react/bridge/BackgroundExecutor.java +46 -0
  1307. package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.java +7 -1
  1308. package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +13 -120
  1309. package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoader.java +19 -0
  1310. package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoaderDelegate.java +6 -0
  1311. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +15 -6
  1312. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactIgnorableMountingException.java +36 -0
  1313. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java +4 -1
  1314. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java +3 -4
  1315. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.java +3 -3
  1316. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.java +1 -1
  1317. package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeExecutor.java +21 -0
  1318. package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.java +50 -2
  1319. package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManagerListener.java +21 -0
  1320. package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfigurationSpec.java +1 -8
  1321. package/ReactAndroid/src/main/java/com/facebook/react/common/BUCK +1 -0
  1322. package/ReactAndroid/src/main/java/com/facebook/react/common/DebugServerException.java +10 -1
  1323. package/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java +9 -2
  1324. package/ReactAndroid/src/main/java/com/facebook/react/common/network/BUCK +1 -0
  1325. package/ReactAndroid/src/main/java/com/facebook/react/config/BUCK +1 -0
  1326. package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +22 -18
  1327. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BUCK +4 -2
  1328. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDownloader.java +5 -16
  1329. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.java +1 -1
  1330. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevLoadingViewController.java +2 -8
  1331. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +59 -2
  1332. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +196 -60
  1333. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java +4 -4
  1334. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/HMRClient.java +7 -4
  1335. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSplitBundleCallback.java +16 -0
  1336. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java +2 -0
  1337. package/ReactAndroid/src/main/java/com/facebook/react/fabric/BUCK +2 -0
  1338. package/ReactAndroid/src/main/java/com/facebook/react/fabric/Binding.java +14 -7
  1339. package/ReactAndroid/src/main/java/com/facebook/react/fabric/ComponentFactory.java +30 -0
  1340. package/ReactAndroid/src/main/java/com/facebook/react/fabric/CoreComponentsRegistry.java +34 -0
  1341. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricComponents.java +2 -1
  1342. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricJSIModuleProvider.java +30 -27
  1343. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +356 -100
  1344. package/ReactAndroid/src/main/java/com/facebook/react/fabric/StateWrapperImpl.java +28 -2
  1345. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk +64 -0
  1346. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.h +71 -71
  1347. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/BUCK +19 -4
  1348. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +1654 -994
  1349. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h +184 -119
  1350. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactory.cpp +31 -0
  1351. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactory.h +39 -0
  1352. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CoreComponentsRegistry.cpp +117 -0
  1353. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CoreComponentsRegistry.h +42 -0
  1354. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventBeatManager.cpp +52 -52
  1355. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventBeatManager.h +66 -66
  1356. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.cpp +36 -36
  1357. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.h +35 -35
  1358. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/JBackgroundExecutor.cpp +35 -0
  1359. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/JBackgroundExecutor.h +34 -0
  1360. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/OnLoad.cpp +26 -24
  1361. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ReactNativeConfigHolder.cpp +41 -41
  1362. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ReactNativeConfigHolder.h +38 -38
  1363. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/StateWrapperImpl.cpp +75 -48
  1364. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/StateWrapperImpl.h +44 -38
  1365. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +286 -57
  1366. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/BatchMountItem.java +45 -15
  1367. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/CreateMountItem.java +8 -1
  1368. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/InsertMountItem.java +2 -2
  1369. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/IntBufferBatchMountItem.java +276 -0
  1370. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.java +12 -1
  1371. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/RemoveDeleteMultiMountItem.java +2 -1
  1372. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/SendAccessibilityEvent.java +16 -1
  1373. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/UpdateLayoutMountItem.java +1 -1
  1374. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/UpdateStateMountItem.java +1 -1
  1375. package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/BUCK +1 -0
  1376. package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/OnLoad.cpp +85 -85
  1377. package/ReactAndroid/src/main/java/com/facebook/react/jstasks/BUCK +1 -0
  1378. package/ReactAndroid/src/main/java/com/facebook/react/module/annotations/BUCK +1 -0
  1379. package/ReactAndroid/src/main/java/com/facebook/react/module/model/BUCK +1 -0
  1380. package/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK +1 -0
  1381. package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/AccessibilityInfoModule.java +13 -24
  1382. package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/BUCK +3 -2
  1383. package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/BUCK +3 -2
  1384. package/ReactAndroid/src/main/java/com/facebook/react/modules/appregistry/BUCK +1 -0
  1385. package/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/BUCK +3 -2
  1386. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BUCK +3 -2
  1387. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/BUCK +1 -0
  1388. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/BlobCollector.cpp +66 -66
  1389. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/BlobCollector.h +42 -42
  1390. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/OnLoad.cpp +15 -15
  1391. package/ReactAndroid/src/main/java/com/facebook/react/modules/bundleloader/BUCK +21 -0
  1392. package/ReactAndroid/src/main/java/com/facebook/react/modules/bundleloader/NativeDevSplitBundleLoaderModule.java +58 -0
  1393. package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/BUCK +3 -2
  1394. package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageStoreManager.java +2 -18
  1395. package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/BUCK +1 -0
  1396. package/ReactAndroid/src/main/java/com/facebook/react/modules/common/BUCK +1 -0
  1397. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK +3 -2
  1398. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK +3 -2
  1399. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerDialogFragment.java +31 -47
  1400. package/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DismissableDatePickerDialog.java +0 -15
  1401. package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/BUCK +4 -2
  1402. package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/FpsDebugFrameCallback.java +2 -1
  1403. package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.java +1 -1
  1404. package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/BUCK +3 -2
  1405. package/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/BUCK +3 -2
  1406. package/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.java +4 -2
  1407. package/ReactAndroid/src/main/java/com/facebook/react/modules/fabric/BUCK +1 -0
  1408. package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/BUCK +1 -0
  1409. package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/FrescoModule.java +25 -2
  1410. package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/BUCK +1 -0
  1411. package/ReactAndroid/src/main/java/com/facebook/react/modules/image/BUCK +4 -2
  1412. package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.java +32 -5
  1413. package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/BUCK +3 -2
  1414. package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.java +2 -12
  1415. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/BUCK +3 -2
  1416. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ForwardingCookieHandler.java +14 -79
  1417. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java +0 -26
  1418. package/ReactAndroid/src/main/java/com/facebook/react/modules/permissions/BUCK +3 -2
  1419. package/ReactAndroid/src/main/java/com/facebook/react/modules/share/BUCK +3 -2
  1420. package/ReactAndroid/src/main/java/com/facebook/react/modules/sound/BUCK +3 -2
  1421. package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/BUCK +3 -2
  1422. package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +54 -61
  1423. package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncStorageModule.java +2 -2
  1424. package/ReactAndroid/src/main/java/com/facebook/react/modules/storage/BUCK +3 -2
  1425. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java +5 -11
  1426. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/BUCK +5 -3
  1427. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  1428. package/ReactAndroid/src/main/java/com/facebook/react/modules/toast/BUCK +3 -2
  1429. package/ReactAndroid/src/main/java/com/facebook/react/modules/vibration/BUCK +3 -2
  1430. package/ReactAndroid/src/main/java/com/facebook/react/modules/vibration/VibrationModule.java +21 -6
  1431. package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/BUCK +3 -2
  1432. package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/BUCK +1 -0
  1433. package/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK +1 -0
  1434. package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/BUCK +22 -0
  1435. package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/NativeModulePerfLogger.java +56 -0
  1436. package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/Android.mk +31 -0
  1437. package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/BUCK +37 -0
  1438. package/{ReactCommon/config → ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/reactperflogger}/.clang-tidy +0 -0
  1439. package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/reactperflogger/JNativeModulePerfLogger.h +30 -0
  1440. package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/reactperflogger/OnLoad.cpp +14 -0
  1441. package/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK +2 -4
  1442. package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +3 -25
  1443. package/ReactAndroid/src/main/java/com/facebook/react/surface/BUCK +1 -0
  1444. package/ReactAndroid/src/main/java/com/facebook/react/touch/BUCK +1 -0
  1445. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/BUCK +5 -0
  1446. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/ReactPackageTurboModuleManagerDelegate.java +3 -19
  1447. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/TurboModuleManager.java +82 -43
  1448. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/TurboModulePerfLogger.java +94 -0
  1449. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/BUCK +1 -0
  1450. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk +34 -2
  1451. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/BUCK +6 -3
  1452. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/CallInvokerHolder.cpp +23 -23
  1453. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/CallInvokerHolder.h +32 -32
  1454. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/OnLoad.cpp +32 -19
  1455. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/TurboModuleManager.cpp +154 -131
  1456. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/TurboModuleManager.h +66 -65
  1457. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/ReactCommon/TurboModuleManagerDelegate.h +37 -39
  1458. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +4 -0
  1459. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +10 -2
  1460. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerAdapter.java +3 -0
  1461. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.java +7 -0
  1462. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerInterface.java +2 -0
  1463. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.java +5 -27
  1464. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FabricViewStateManager.java +99 -0
  1465. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java +5 -0
  1466. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java +0 -4
  1467. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +93 -14
  1468. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +22 -3
  1469. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java +2 -1
  1470. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +2 -0
  1471. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +5 -0
  1472. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/StateWrapper.java +5 -2
  1473. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java +4 -0
  1474. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.java +11 -0
  1475. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +3 -3
  1476. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java +59 -18
  1477. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +77 -30
  1478. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleListener.java +5 -1
  1479. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +11 -20
  1480. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +5 -6
  1481. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerDelegate.java +5 -1
  1482. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java +5 -1
  1483. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.java +2 -0
  1484. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/BUCK +1 -0
  1485. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/BUCK +1 -0
  1486. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/BlackHoleEventDispatcher.java +57 -0
  1487. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcher.java +10 -365
  1488. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcherImpl.java +391 -0
  1489. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcherProvider.java +24 -0
  1490. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/util/BUCK +1 -0
  1491. package/ReactAndroid/src/main/java/com/facebook/react/util/BUCK +1 -0
  1492. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/AndroidDrawerLayoutManagerDelegate.java +4 -3
  1493. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/AndroidDropdownPickerManagerDelegate.java +12 -9
  1494. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/AndroidSwipeRefreshLayoutManagerDelegate.java +3 -2
  1495. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/AndroidSwitchManagerDelegate.java +3 -2
  1496. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/AndroidViewPagerManagerDelegate.java +4 -3
  1497. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/BUCK +1 -0
  1498. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/DatePickerManagerDelegate.java +62 -0
  1499. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/DatePickerManagerInterface.java +25 -0
  1500. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/PullToRefreshViewManagerDelegate.java +51 -0
  1501. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/PullToRefreshViewManagerInterface.java +21 -0
  1502. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/SwitchManagerDelegate.java +17 -7
  1503. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/Android.mk +29 -0
  1504. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/ComponentDescriptors.h +31 -0
  1505. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/EventEmitters.cpp +141 -0
  1506. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/EventEmitters.h +223 -0
  1507. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/Props.cpp +191 -0
  1508. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/Props.h +529 -0
  1509. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/ShadowNodes.cpp +28 -0
  1510. package/ReactAndroid/src/main/java/com/facebook/react/viewmanagers/jni/react/renderer/components/rncore/ShadowNodes.h +117 -0
  1511. package/ReactAndroid/src/main/java/com/facebook/react/views/common/BUCK +1 -0
  1512. package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK +1 -0
  1513. package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java +6 -3
  1514. package/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK +2 -0
  1515. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java +58 -36
  1516. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactCallerContextFactory.java +5 -3
  1517. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageDownloadListener.java +78 -0
  1518. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.java +8 -6
  1519. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +27 -20
  1520. package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/BUCK +2 -0
  1521. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/BUCK +1 -0
  1522. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +20 -18
  1523. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.java +80 -34
  1524. package/ReactAndroid/src/main/java/com/facebook/react/views/picker/BUCK +1 -0
  1525. package/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactDropdownPickerManager.java +6 -0
  1526. package/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPicker.java +3 -0
  1527. package/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPickerManager.java +2 -2
  1528. package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK +1 -0
  1529. package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ReactProgressBarViewManager.java +40 -0
  1530. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK +1 -0
  1531. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +179 -30
  1532. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +13 -1
  1533. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +162 -31
  1534. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +78 -0
  1535. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +13 -1
  1536. package/ReactAndroid/src/main/java/com/facebook/react/views/slider/BUCK +1 -0
  1537. package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlider.java +1 -1
  1538. package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +27 -15
  1539. package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/BUCK +1 -0
  1540. package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java +1 -1
  1541. package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK +1 -0
  1542. package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchManager.java +10 -4
  1543. package/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK +2 -0
  1544. package/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java +1 -1
  1545. package/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomStyleSpan.java +1 -4
  1546. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactClickableSpan.java +69 -0
  1547. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java +26 -0
  1548. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +32 -4
  1549. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextUpdate.java +6 -10
  1550. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +8 -6
  1551. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +2 -4
  1552. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.java +34 -4
  1553. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +247 -68
  1554. package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/BUCK +1 -0
  1555. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK +1 -0
  1556. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +269 -43
  1557. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditTextInputConnectionWrapper.java +4 -1
  1558. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +65 -136
  1559. package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/BUCK +1 -0
  1560. package/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK +1 -0
  1561. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.java +15 -12
  1562. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +107 -115
  1563. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +145 -107
  1564. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +10 -9
  1565. package/ReactAndroid/src/main/java/com/facebook/systrace/Systrace.java +2 -7
  1566. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.java +4 -1
  1567. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaPositionType.java +6 -4
  1568. package/ReactAndroid/src/main/jni/Application.mk +2 -2
  1569. package/ReactAndroid/src/main/jni/first-party/fb/assert.cpp +39 -39
  1570. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/ALog.h +82 -82
  1571. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/Build.h +31 -31
  1572. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/Countable.h +45 -45
  1573. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/Environment.h +93 -93
  1574. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/ProgramLocation.h +58 -58
  1575. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/RefPtr.h +268 -268
  1576. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/StaticInitialized.h +37 -37
  1577. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/ThreadLocal.h +112 -112
  1578. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/assert.h +43 -43
  1579. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/log.h +350 -350
  1580. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/noncopyable.h +20 -20
  1581. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/nonmovable.h +20 -20
  1582. package/ReactAndroid/src/main/jni/first-party/fb/include/fb/visibility.h +10 -10
  1583. package/ReactAndroid/src/main/jni/first-party/fb/log.cpp +102 -102
  1584. package/ReactAndroid/src/main/jni/first-party/fbgloginit/fb/glog_init.h +18 -18
  1585. package/ReactAndroid/src/main/jni/first-party/fbgloginit/glog_init.cpp +141 -141
  1586. package/ReactAndroid/src/main/jni/first-party/jni-hack/jni.h +14 -14
  1587. package/ReactAndroid/src/main/jni/first-party/jni-hack/real/jni.h +1381 -1381
  1588. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedGlobalRef.h +137 -137
  1589. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/ScopedLocalRef.h +137 -137
  1590. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.h +72 -72
  1591. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNIVanilla.cpp +992 -985
  1592. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNIVanilla.h +12 -12
  1593. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJTypesVanilla.h +43 -43
  1594. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YogaJniException.cpp +52 -52
  1595. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YogaJniException.h +38 -38
  1596. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/common.cpp +114 -114
  1597. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/common.h +79 -79
  1598. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/corefunctions.cpp +94 -94
  1599. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/corefunctions.h +54 -54
  1600. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/macros.h +23 -23
  1601. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/yogajni.cpp +17 -17
  1602. package/ReactAndroid/src/main/jni/react/jni/Android.mk +70 -1
  1603. package/ReactAndroid/src/main/jni/react/jni/BUCK +4 -1
  1604. package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +335 -330
  1605. package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +112 -109
  1606. package/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.cpp +59 -59
  1607. package/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.h +50 -50
  1608. package/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapperBase.h +47 -47
  1609. package/ReactAndroid/src/main/jni/react/jni/CxxSharedModuleWrapper.h +39 -39
  1610. package/ReactAndroid/src/main/jni/react/jni/JCallback.h +52 -52
  1611. package/ReactAndroid/src/main/jni/react/jni/JInspector.cpp +114 -114
  1612. package/ReactAndroid/src/main/jni/react/jni/JInspector.h +81 -81
  1613. package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp +113 -113
  1614. package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.h +57 -57
  1615. package/ReactAndroid/src/main/jni/react/jni/JNativeRunnable.h +52 -52
  1616. package/ReactAndroid/src/main/jni/react/jni/JReactMarker.cpp +99 -82
  1617. package/ReactAndroid/src/main/jni/react/jni/JReactMarker.h +41 -33
  1618. package/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.cpp +21 -0
  1619. package/ReactAndroid/src/main/jni/react/jni/JRuntimeExecutor.h +30 -0
  1620. package/ReactAndroid/src/main/jni/react/jni/JSLoader.cpp +75 -75
  1621. package/ReactAndroid/src/main/jni/react/jni/JSLoader.h +34 -34
  1622. package/ReactAndroid/src/main/jni/react/jni/JSLogging.cpp +29 -29
  1623. package/ReactAndroid/src/main/jni/react/jni/JSLogging.h +22 -22
  1624. package/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp +257 -235
  1625. package/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.h +119 -118
  1626. package/ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h +35 -35
  1627. package/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.cpp +98 -98
  1628. package/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.h +45 -45
  1629. package/ReactAndroid/src/main/jni/react/jni/MethodInvoker.cpp +315 -309
  1630. package/ReactAndroid/src/main/jni/react/jni/MethodInvoker.h +66 -62
  1631. package/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp +72 -72
  1632. package/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h +40 -40
  1633. package/ReactAndroid/src/main/jni/react/jni/NativeArray.cpp +50 -50
  1634. package/ReactAndroid/src/main/jni/react/jni/NativeArray.h +42 -42
  1635. package/ReactAndroid/src/main/jni/react/jni/NativeCommon.cpp +65 -65
  1636. package/ReactAndroid/src/main/jni/react/jni/NativeCommon.h +42 -42
  1637. package/ReactAndroid/src/main/jni/react/jni/NativeMap.cpp +39 -39
  1638. package/ReactAndroid/src/main/jni/react/jni/NativeMap.h +43 -43
  1639. package/ReactAndroid/src/main/jni/react/jni/NativeTime.cpp +26 -26
  1640. package/ReactAndroid/src/main/jni/react/jni/NativeTime.h +16 -16
  1641. package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +91 -91
  1642. package/ReactAndroid/src/main/jni/react/jni/OnLoad.h +18 -18
  1643. package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp +144 -144
  1644. package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h +66 -66
  1645. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp +56 -56
  1646. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.h +40 -40
  1647. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.cpp +123 -123
  1648. package/ReactAndroid/src/main/jni/react/jni/ReadableNativeMap.h +54 -54
  1649. package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp +86 -86
  1650. package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h +46 -46
  1651. package/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.cpp +104 -104
  1652. package/ReactAndroid/src/main/jni/react/jni/WritableNativeMap.h +50 -50
  1653. package/ReactAndroid/src/main/jni/react/perftests/OnLoad.cpp +245 -245
  1654. package/ReactAndroid/src/main/jni/third-party/glog/config.h +182 -182
  1655. package/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK +9 -9
  1656. package/ReactAndroid/src/main/res/BUCK +4 -1
  1657. package/ReactAndroid/src/main/res/devsupport/layout/dev_loading_view.xml +1 -1
  1658. package/ReactAndroid/src/main/res/devsupport/values/strings.xml +3 -2
  1659. package/ReactAndroid/src/main/res/shell/values/styles.xml +0 -17
  1660. package/ReactAndroid/src/main/third-party/android/androidx/BUCK +20 -0
  1661. package/ReactAndroid/src/main/third-party/java/asm/BUCK +10 -10
  1662. package/ReactAndroid/src/main/third-party/java/mockito2/BUCK +74 -0
  1663. package/ReactAndroid/src/main/third-party/java/okhttp/BUCK +4 -4
  1664. package/ReactAndroid/src/main/third-party/java/okio/BUCK +2 -2
  1665. package/ReactAndroid/src/main/third-party/java/robolectric/4.4/BUCK +217 -0
  1666. package/ReactAndroid/src/test/java/com/facebook/react/BUCK +0 -3
  1667. package/ReactAndroid/src/test/java/com/facebook/react/animated/BUCK +0 -4
  1668. package/ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java +85 -5
  1669. package/ReactAndroid/src/test/java/com/facebook/react/bridge/BUCK +3 -6
  1670. package/ReactAndroid/src/test/java/com/facebook/react/bridge/BaseJavaModuleTest.java +6 -5
  1671. package/ReactAndroid/src/test/java/com/facebook/react/devsupport/BUCK +0 -4
  1672. package/ReactAndroid/src/test/java/com/facebook/react/devsupport/JSDebuggerWebSocketClientTest.java +5 -4
  1673. package/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK +0 -3
  1674. package/ReactAndroid/src/test/java/com/facebook/react/modules/dialog/DialogModuleTest.java +1 -1
  1675. package/ReactAndroid/src/test/java/com/facebook/react/modules/network/NetworkingModuleTest.java +5 -5
  1676. package/ReactAndroid/src/test/java/com/facebook/react/modules/network/ReactCookieJarContainerTest.java +8 -4
  1677. package/ReactAndroid/src/test/java/com/facebook/react/modules/share/ShareModuleTest.java +20 -7
  1678. package/ReactAndroid/src/test/java/com/facebook/react/modules/storage/AsyncStorageModuleTest.java +1 -1
  1679. package/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/BUCK +0 -4
  1680. package/ReactAndroid/src/test/java/com/facebook/react/uimanager/BUCK +0 -4
  1681. package/ReactAndroid/src/test/java/com/facebook/react/uimanager/layoutanimation/BUCK +0 -1
  1682. package/ReactAndroid/src/test/java/com/facebook/react/util/BUCK +1 -3
  1683. package/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +0 -4
  1684. package/ReactAndroid/src/test/java/org/mockito/configuration/BUCK +2 -2
  1685. package/ReactAndroid/src/test/resources/BUCK +17 -0
  1686. package/ReactAndroid/src/test/resources/robolectric.properties +2 -0
  1687. package/ReactCommon/React-Fabric.podspec +258 -220
  1688. package/ReactCommon/ReactCommon.podspec +62 -59
  1689. package/ReactCommon/better/Android.mk +28 -0
  1690. package/ReactCommon/better/BUCK +2 -2
  1691. package/ReactCommon/better/better.h +62 -62
  1692. package/ReactCommon/better/map.h +45 -45
  1693. package/ReactCommon/better/mutex.h +20 -20
  1694. package/ReactCommon/better/optional.h +38 -38
  1695. package/ReactCommon/better/set.h +38 -38
  1696. package/ReactCommon/better/small_vector.h +39 -39
  1697. package/ReactCommon/callinvoker/BUCK +1 -1
  1698. package/ReactCommon/callinvoker/React-callinvoker.podspec +34 -34
  1699. package/ReactCommon/callinvoker/ReactCommon/CallInvoker.h +28 -28
  1700. package/ReactCommon/cxxreact/Android.mk +2 -1
  1701. package/ReactCommon/cxxreact/BUCK +10 -6
  1702. package/ReactCommon/cxxreact/CxxModule.h +258 -258
  1703. package/ReactCommon/cxxreact/CxxNativeModule.cpp +225 -213
  1704. package/ReactCommon/cxxreact/CxxNativeModule.h +61 -60
  1705. package/ReactCommon/cxxreact/ErrorUtils.h +44 -0
  1706. package/ReactCommon/cxxreact/Instance.cpp +299 -291
  1707. package/ReactCommon/cxxreact/Instance.h +178 -172
  1708. package/ReactCommon/cxxreact/JSBigString.cpp +164 -157
  1709. package/ReactCommon/cxxreact/JSBigString.h +137 -137
  1710. package/ReactCommon/cxxreact/JSBundleType.cpp +37 -42
  1711. package/ReactCommon/cxxreact/JSBundleType.h +68 -69
  1712. package/ReactCommon/cxxreact/JSExecutor.cpp +27 -27
  1713. package/ReactCommon/cxxreact/JSExecutor.h +144 -144
  1714. package/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp +131 -131
  1715. package/ReactCommon/cxxreact/JSIndexedRAMBundle.h +73 -73
  1716. package/ReactCommon/cxxreact/JSModulesUnbundle.h +48 -48
  1717. package/ReactCommon/cxxreact/JsArgumentHelpers-inl.h +120 -120
  1718. package/ReactCommon/cxxreact/JsArgumentHelpers.h +125 -125
  1719. package/ReactCommon/cxxreact/MessageQueueThread.h +29 -29
  1720. package/ReactCommon/cxxreact/MethodCall.cpp +89 -89
  1721. package/ReactCommon/cxxreact/MethodCall.h +36 -36
  1722. package/ReactCommon/cxxreact/ModuleRegistry.cpp +236 -186
  1723. package/ReactCommon/cxxreact/ModuleRegistry.h +92 -87
  1724. package/ReactCommon/cxxreact/NativeModule.h +45 -44
  1725. package/ReactCommon/cxxreact/NativeToJsBridge.cpp +365 -335
  1726. package/ReactCommon/cxxreact/NativeToJsBridge.h +142 -135
  1727. package/ReactCommon/cxxreact/RAMBundleRegistry.cpp +78 -78
  1728. package/ReactCommon/cxxreact/RAMBundleRegistry.h +56 -56
  1729. package/ReactCommon/cxxreact/React-cxxreact.podspec +48 -44
  1730. package/ReactCommon/cxxreact/ReactMarker.cpp +32 -31
  1731. package/ReactCommon/cxxreact/ReactMarker.h +58 -49
  1732. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  1733. package/ReactCommon/cxxreact/RecoverableError.h +50 -50
  1734. package/ReactCommon/cxxreact/SampleCxxModule.cpp +182 -182
  1735. package/ReactCommon/cxxreact/SampleCxxModule.h +59 -59
  1736. package/ReactCommon/cxxreact/SharedProxyCxxModule.h +42 -42
  1737. package/ReactCommon/cxxreact/SystraceSection.h +51 -51
  1738. package/ReactCommon/cxxreact/tests/BUCK +0 -1
  1739. package/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp +39 -39
  1740. package/ReactCommon/cxxreact/tests/jsarg_helpers.cpp +114 -114
  1741. package/ReactCommon/cxxreact/tests/jsbigstring.cpp +106 -106
  1742. package/ReactCommon/cxxreact/tests/methodcall.cpp +156 -156
  1743. package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +235 -235
  1744. package/ReactCommon/hermes/executor/HermesExecutorFactory.h +55 -55
  1745. package/ReactCommon/hermes/executor/JSITracing.cpp +16 -16
  1746. package/ReactCommon/hermes/executor/JSITracing.h +16 -16
  1747. package/ReactCommon/hermes/inspector/AsyncPauseState.h +34 -34
  1748. package/ReactCommon/hermes/inspector/BUCK +5 -2
  1749. package/ReactCommon/hermes/inspector/Exceptions.h +54 -49
  1750. package/ReactCommon/hermes/inspector/Inspector.cpp +742 -637
  1751. package/ReactCommon/hermes/inspector/Inspector.h +369 -322
  1752. package/ReactCommon/hermes/inspector/InspectorState.cpp +501 -485
  1753. package/ReactCommon/hermes/inspector/InspectorState.h +412 -405
  1754. package/ReactCommon/hermes/inspector/RuntimeAdapter.cpp +35 -35
  1755. package/ReactCommon/hermes/inspector/RuntimeAdapter.h +81 -69
  1756. package/ReactCommon/hermes/inspector/chrome/AutoAttachUtils.cpp +151 -151
  1757. package/ReactCommon/hermes/inspector/chrome/AutoAttachUtils.h +24 -24
  1758. package/ReactCommon/hermes/inspector/chrome/Connection.cpp +1053 -852
  1759. package/ReactCommon/hermes/inspector/chrome/Connection.h +67 -62
  1760. package/ReactCommon/hermes/inspector/chrome/ConnectionDemux.cpp +142 -142
  1761. package/ReactCommon/hermes/inspector/chrome/ConnectionDemux.h +58 -58
  1762. package/ReactCommon/hermes/inspector/chrome/MessageConverters.cpp +248 -248
  1763. package/ReactCommon/hermes/inspector/chrome/MessageConverters.h +135 -135
  1764. package/ReactCommon/hermes/inspector/chrome/MessageInterfaces.h +74 -74
  1765. package/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp +1283 -1109
  1766. package/ReactCommon/hermes/inspector/chrome/MessageTypes.h +675 -597
  1767. package/ReactCommon/hermes/inspector/chrome/MessageTypesInlines.h +159 -159
  1768. package/ReactCommon/hermes/inspector/chrome/Registration.cpp +38 -38
  1769. package/ReactCommon/hermes/inspector/chrome/Registration.h +39 -39
  1770. package/ReactCommon/hermes/inspector/chrome/RemoteObjectsTable.cpp +146 -146
  1771. package/ReactCommon/hermes/inspector/chrome/RemoteObjectsTable.h +124 -124
  1772. package/ReactCommon/hermes/inspector/chrome/cli/main.cpp +271 -271
  1773. package/ReactCommon/hermes/inspector/chrome/tests/AsyncHermesRuntime.cpp +145 -136
  1774. package/ReactCommon/hermes/inspector/chrome/tests/AsyncHermesRuntime.h +121 -114
  1775. package/ReactCommon/hermes/inspector/chrome/tests/ConnectionDemuxTests.cpp +149 -149
  1776. package/ReactCommon/hermes/inspector/chrome/tests/ConnectionTests.cpp +2455 -2237
  1777. package/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp +462 -462
  1778. package/ReactCommon/hermes/inspector/chrome/tests/RemoteObjectsTableTest.cpp +111 -111
  1779. package/ReactCommon/hermes/inspector/chrome/tests/SyncConnection.cpp +135 -132
  1780. package/ReactCommon/hermes/inspector/chrome/tests/SyncConnection.h +69 -67
  1781. package/ReactCommon/hermes/inspector/detail/CallbackOStream.cpp +77 -77
  1782. package/ReactCommon/hermes/inspector/detail/CallbackOStream.h +89 -89
  1783. package/ReactCommon/hermes/inspector/detail/SerialExecutor.cpp +60 -60
  1784. package/ReactCommon/hermes/inspector/detail/SerialExecutor.h +57 -57
  1785. package/ReactCommon/hermes/inspector/detail/Thread.cpp +39 -39
  1786. package/ReactCommon/hermes/inspector/detail/Thread.h +85 -85
  1787. package/ReactCommon/hermes/inspector/detail/tests/CallbackOStreamTests.cpp +104 -104
  1788. package/ReactCommon/hermes/inspector/detail/tests/SerialExecutorTests.cpp +41 -41
  1789. package/ReactCommon/hermes/inspector/tests/InspectorTests.cpp +412 -412
  1790. package/ReactCommon/hermes/inspector/tools/message_types.txt +6 -0
  1791. package/ReactCommon/hermes/inspector/tools/msggen/.babelrc +0 -1
  1792. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/CommandTest.js +64 -64
  1793. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/EventTest.js +49 -49
  1794. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/GraphTest.js +80 -80
  1795. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/HeaderWriterTest.js +130 -130
  1796. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/ImplementationWriterTest.js +173 -173
  1797. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/PropertyTest.js +133 -133
  1798. package/ReactCommon/hermes/inspector/tools/msggen/__tests__/TypeTest.js +52 -52
  1799. package/ReactCommon/hermes/inspector/tools/msggen/package.json +41 -42
  1800. package/ReactCommon/hermes/inspector/tools/msggen/src/Command.js +81 -81
  1801. package/ReactCommon/hermes/inspector/tools/msggen/src/Converters.js +41 -41
  1802. package/ReactCommon/hermes/inspector/tools/msggen/src/Event.js +59 -59
  1803. package/ReactCommon/hermes/inspector/tools/msggen/src/GeneratedHeader.js +16 -16
  1804. package/ReactCommon/hermes/inspector/tools/msggen/src/Graph.js +92 -92
  1805. package/ReactCommon/hermes/inspector/tools/msggen/src/HeaderWriter.js +325 -325
  1806. package/ReactCommon/hermes/inspector/tools/msggen/src/ImplementationWriter.js +410 -410
  1807. package/ReactCommon/hermes/inspector/tools/msggen/src/Property.js +220 -220
  1808. package/ReactCommon/hermes/inspector/tools/msggen/src/TestHelpers.js +42 -42
  1809. package/ReactCommon/hermes/inspector/tools/msggen/src/Type.js +100 -100
  1810. package/ReactCommon/hermes/inspector/tools/msggen/src/custom.json +26 -0
  1811. package/ReactCommon/hermes/inspector/tools/msggen/src/index.js +238 -230
  1812. package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +3 -8
  1813. package/ReactCommon/jsi/Android.mk +4 -0
  1814. package/ReactCommon/jsi/BUCK +4 -3
  1815. package/ReactCommon/jsi/JSCRuntime.cpp +1473 -1473
  1816. package/ReactCommon/jsi/JSCRuntime.h +19 -19
  1817. package/ReactCommon/jsi/React-jsi.podspec +57 -57
  1818. package/ReactCommon/jsi/jsi/CMakeLists.txt +8 -1
  1819. package/ReactCommon/jsi/jsi/JSIDynamic.cpp +200 -104
  1820. package/ReactCommon/jsi/jsi/JSIDynamic.h +25 -25
  1821. package/ReactCommon/jsi/jsi/decorator.h +738 -730
  1822. package/ReactCommon/jsi/jsi/instrumentation.h +104 -87
  1823. package/ReactCommon/jsi/jsi/jsi-inl.h +316 -312
  1824. package/ReactCommon/jsi/jsi/jsi.cpp +488 -454
  1825. package/ReactCommon/jsi/jsi/jsi.h +1288 -1281
  1826. package/ReactCommon/jsi/jsi/jsilib-posix.cpp +118 -118
  1827. package/ReactCommon/jsi/jsi/jsilib-windows.cpp +27 -27
  1828. package/ReactCommon/jsi/jsi/jsilib.h +59 -59
  1829. package/ReactCommon/jsi/jsi/test/testlib.cpp +1428 -1359
  1830. package/ReactCommon/jsi/jsi/test/testlib.h +49 -49
  1831. package/ReactCommon/jsi/jsi/threadsafe.h +79 -79
  1832. package/ReactCommon/jsiexecutor/Android.mk +1 -1
  1833. package/ReactCommon/jsiexecutor/BUCK +3 -2
  1834. package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +43 -42
  1835. package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +555 -515
  1836. package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +146 -145
  1837. package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +105 -93
  1838. package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h +40 -40
  1839. package/ReactCommon/jsinspector/BUCK +1 -1
  1840. package/ReactCommon/jsinspector/InspectorInterfaces.cpp +108 -108
  1841. package/ReactCommon/jsinspector/InspectorInterfaces.h +94 -82
  1842. package/ReactCommon/jsinspector/React-jsinspector.podspec +30 -30
  1843. package/ReactCommon/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK +175 -0
  1844. package/ReactCommon/microprofiler/BUCK +1 -1
  1845. package/ReactCommon/microprofiler/MicroProfiler.cpp +252 -252
  1846. package/ReactCommon/microprofiler/MicroProfiler.h +89 -89
  1847. package/ReactCommon/{fabric → react/config}/.clang-tidy +0 -0
  1848. package/ReactCommon/react/config/Android.mk +25 -0
  1849. package/ReactCommon/react/config/BUCK +46 -0
  1850. package/ReactCommon/react/config/ReactNativeConfig.cpp +40 -0
  1851. package/ReactCommon/react/config/ReactNativeConfig.h +44 -0
  1852. package/ReactCommon/{jscallinvoker → react/nativemodule}/.clang-tidy +0 -0
  1853. package/ReactCommon/react/nativemodule/core/Android.mk +31 -0
  1854. package/ReactCommon/react/nativemodule/core/BUCK +87 -0
  1855. package/ReactCommon/react/nativemodule/core/ReactCommon/LongLivedObject.cpp +52 -0
  1856. package/ReactCommon/react/nativemodule/core/ReactCommon/LongLivedObject.h +56 -0
  1857. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp +207 -0
  1858. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h +49 -0
  1859. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.cpp +44 -0
  1860. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +71 -0
  1861. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp +87 -0
  1862. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h +58 -0
  1863. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp +331 -0
  1864. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h +112 -0
  1865. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.cpp +105 -0
  1866. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +89 -0
  1867. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +853 -0
  1868. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h +76 -0
  1869. package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.h +129 -0
  1870. package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm +704 -0
  1871. package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.h +57 -0
  1872. package/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +862 -0
  1873. package/ReactCommon/react/nativemodule/samples/BUCK +104 -0
  1874. package/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.cpp +141 -0
  1875. package/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.h +43 -0
  1876. package/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.cpp +94 -0
  1877. package/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.h +44 -0
  1878. package/ReactCommon/react/nativemodule/samples/platform/android/Android.mk +18 -0
  1879. package/ReactCommon/react/nativemodule/samples/platform/android/NativeSampleTurboModuleSpec.java +91 -0
  1880. package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp +209 -0
  1881. package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h +32 -0
  1882. package/ReactCommon/react/nativemodule/samples/platform/android/SampleTurboModule.java +186 -0
  1883. package/ReactCommon/react/nativemodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h +50 -0
  1884. package/ReactCommon/react/nativemodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.mm +143 -0
  1885. package/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboCxxModule.h +27 -0
  1886. package/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboCxxModule.mm +42 -0
  1887. package/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.h +18 -0
  1888. package/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.mm +146 -0
  1889. package/ReactCommon/react/nativemodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.cpp +158 -0
  1890. package/ReactCommon/react/nativemodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.h +46 -0
  1891. package/ReactCommon/{turbomodule → react/renderer}/.clang-tidy +0 -0
  1892. package/ReactCommon/react/renderer/animations/Android.mk +41 -0
  1893. package/ReactCommon/react/renderer/animations/BUCK +95 -0
  1894. package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +243 -0
  1895. package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.h +45 -0
  1896. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +1632 -0
  1897. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +344 -0
  1898. package/ReactCommon/react/renderer/attributedstring/Android.mk +38 -0
  1899. package/ReactCommon/react/renderer/attributedstring/AttributedString.cpp +151 -0
  1900. package/ReactCommon/react/renderer/attributedstring/AttributedString.h +139 -0
  1901. package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.cpp +65 -0
  1902. package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h +80 -0
  1903. package/ReactCommon/react/renderer/attributedstring/BUCK +83 -0
  1904. package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp +55 -0
  1905. package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h +95 -0
  1906. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +216 -0
  1907. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +135 -0
  1908. package/ReactCommon/react/renderer/attributedstring/conversions.h +814 -0
  1909. package/ReactCommon/react/renderer/attributedstring/primitives.h +200 -0
  1910. package/ReactCommon/react/renderer/attributedstring/tests/AttributedStringTest.cpp +50 -0
  1911. package/ReactCommon/react/renderer/attributedstring/tests/ParagraphAttributesTest.cpp +41 -0
  1912. package/ReactCommon/react/renderer/attributedstring/tests/TextAttributesTest.cpp +41 -0
  1913. package/ReactCommon/react/renderer/componentregistry/Android.mk +32 -0
  1914. package/ReactCommon/react/renderer/componentregistry/BUCK +62 -0
  1915. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorFactory.h +34 -0
  1916. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProvider.h +73 -0
  1917. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.cpp +84 -0
  1918. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h +71 -0
  1919. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +217 -0
  1920. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.h +91 -0
  1921. package/ReactCommon/react/renderer/components/image/Android.mk +36 -0
  1922. package/ReactCommon/react/renderer/components/image/BUCK +78 -0
  1923. package/ReactCommon/react/renderer/components/image/ImageComponentDescriptor.h +45 -0
  1924. package/ReactCommon/react/renderer/components/image/ImageEventEmitter.cpp +42 -0
  1925. package/ReactCommon/react/renderer/components/image/ImageEventEmitter.h +28 -0
  1926. package/ReactCommon/react/renderer/components/image/ImageProps.cpp +41 -0
  1927. package/ReactCommon/react/renderer/components/image/ImageProps.h +33 -0
  1928. package/ReactCommon/react/renderer/components/image/ImageShadowNode.cpp +98 -0
  1929. package/ReactCommon/react/renderer/components/image/ImageShadowNode.h +65 -0
  1930. package/ReactCommon/react/renderer/components/image/ImageState.cpp +26 -0
  1931. package/ReactCommon/react/renderer/components/image/ImageState.h +62 -0
  1932. package/ReactCommon/react/renderer/components/image/conversions.h +132 -0
  1933. package/ReactCommon/react/renderer/components/image/tests/ImageTest.cpp +14 -0
  1934. package/ReactCommon/react/renderer/components/inputaccessory/BUCK +47 -0
  1935. package/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryComponentDescriptor.h +48 -0
  1936. package/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.cpp +16 -0
  1937. package/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.h +39 -0
  1938. package/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryState.h +29 -0
  1939. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/BUCK +53 -0
  1940. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h +38 -0
  1941. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +97 -0
  1942. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp +15 -0
  1943. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h +27 -0
  1944. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h +24 -0
  1945. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.mm +13 -0
  1946. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.cpp +20 -0
  1947. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.h +33 -0
  1948. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp +19 -0
  1949. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h +28 -0
  1950. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +37 -0
  1951. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +105 -0
  1952. package/ReactCommon/react/renderer/components/modal/Android.mk +39 -0
  1953. package/ReactCommon/react/renderer/components/modal/BUCK +88 -0
  1954. package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +50 -0
  1955. package/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.cpp +19 -0
  1956. package/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h +39 -0
  1957. package/ReactCommon/react/renderer/components/modal/ModalHostViewState.cpp +21 -0
  1958. package/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +49 -0
  1959. package/ReactCommon/react/renderer/components/picker/Android.mk +37 -0
  1960. package/ReactCommon/react/renderer/components/picker/BUCK +98 -0
  1961. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerComponentDescriptor.h +21 -0
  1962. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerEventEmitter.cpp +23 -0
  1963. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerEventEmitter.h +27 -0
  1964. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerProps.cpp +28 -0
  1965. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerProps.h +77 -0
  1966. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerShadowNode.cpp +16 -0
  1967. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDialogPickerShadowNode.h +29 -0
  1968. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerComponentDescriptor.h +21 -0
  1969. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerEventEmitter.cpp +23 -0
  1970. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerEventEmitter.h +27 -0
  1971. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerProps.cpp +28 -0
  1972. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerProps.h +77 -0
  1973. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerShadowNode.cpp +17 -0
  1974. package/ReactCommon/react/renderer/components/picker/androidpicker/react/renderer/components/androidpicker/AndroidDropdownPickerShadowNode.h +29 -0
  1975. package/ReactCommon/react/renderer/components/picker/iospicker/BUCK +58 -0
  1976. package/ReactCommon/react/renderer/components/picker/iospicker/PickerComponentDescriptor.h +26 -0
  1977. package/ReactCommon/react/renderer/components/picker/iospicker/PickerEventEmitter.cpp +23 -0
  1978. package/ReactCommon/react/renderer/components/picker/iospicker/PickerEventEmitter.h +28 -0
  1979. package/ReactCommon/react/renderer/components/picker/iospicker/PickerProps.cpp +46 -0
  1980. package/ReactCommon/react/renderer/components/picker/iospicker/PickerProps.h +36 -0
  1981. package/ReactCommon/react/renderer/components/picker/iospicker/PickerShadowNode.cpp +16 -0
  1982. package/ReactCommon/react/renderer/components/picker/iospicker/PickerShadowNode.h +33 -0
  1983. package/ReactCommon/react/renderer/components/picker/iospicker/PickerState.h +19 -0
  1984. package/ReactCommon/react/renderer/components/picker/iospicker/conversions.h +47 -0
  1985. package/ReactCommon/react/renderer/components/picker/iospicker/primitives.h +29 -0
  1986. package/ReactCommon/react/renderer/components/progressbar/Android.mk +38 -0
  1987. package/ReactCommon/react/renderer/components/progressbar/BUCK +121 -0
  1988. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarComponentDescriptor.h +53 -0
  1989. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp +75 -0
  1990. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h +38 -0
  1991. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.cpp +35 -0
  1992. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.h +46 -0
  1993. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h +30 -0
  1994. package/ReactCommon/react/renderer/components/root/Android.mk +35 -0
  1995. package/ReactCommon/react/renderer/components/root/BUCK +80 -0
  1996. package/ReactCommon/react/renderer/components/root/RootComponentDescriptor.h +19 -0
  1997. package/ReactCommon/react/renderer/components/root/RootProps.cpp +28 -0
  1998. package/ReactCommon/react/renderer/components/root/RootProps.h +35 -0
  1999. package/ReactCommon/react/renderer/components/root/RootShadowNode.cpp +55 -0
  2000. package/ReactCommon/react/renderer/components/root/RootShadowNode.h +61 -0
  2001. package/ReactCommon/react/renderer/components/root/tests/RootShadowNodeTest.cpp +14 -0
  2002. package/ReactCommon/react/renderer/components/safeareaview/BUCK +47 -0
  2003. package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewComponentDescriptor.h +45 -0
  2004. package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.cpp +16 -0
  2005. package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h +32 -0
  2006. package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.cpp +12 -0
  2007. package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.h +26 -0
  2008. package/ReactCommon/react/renderer/components/scrollview/Android.mk +35 -0
  2009. package/ReactCommon/react/renderer/components/scrollview/BUCK +84 -0
  2010. package/ReactCommon/react/renderer/components/scrollview/RCTComponentViewHelpers.h +95 -0
  2011. package/ReactCommon/react/renderer/components/scrollview/ScrollViewComponentDescriptor.h +20 -0
  2012. package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.cpp +101 -0
  2013. package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h +47 -0
  2014. package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp +292 -0
  2015. package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +66 -0
  2016. package/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.cpp +46 -0
  2017. package/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.h +42 -0
  2018. package/ReactCommon/react/renderer/components/scrollview/ScrollViewState.cpp +18 -0
  2019. package/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h +45 -0
  2020. package/ReactCommon/react/renderer/components/scrollview/conversions.h +143 -0
  2021. package/ReactCommon/react/renderer/components/scrollview/primitives.h +27 -0
  2022. package/ReactCommon/react/renderer/components/scrollview/tests/ScrollViewTest.cpp +14 -0
  2023. package/ReactCommon/react/renderer/components/slider/Android.mk +40 -0
  2024. package/ReactCommon/react/renderer/components/slider/BUCK +120 -0
  2025. package/ReactCommon/react/renderer/components/slider/SliderComponentDescriptor.h +59 -0
  2026. package/ReactCommon/react/renderer/components/slider/SliderShadowNode.cpp +102 -0
  2027. package/ReactCommon/react/renderer/components/slider/SliderShadowNode.h +76 -0
  2028. package/ReactCommon/react/renderer/components/slider/SliderState.cpp +46 -0
  2029. package/ReactCommon/react/renderer/components/slider/SliderState.h +81 -0
  2030. package/ReactCommon/react/renderer/components/slider/platform/android/react/renderer/components/slider/SliderMeasurementsManager.cpp +74 -0
  2031. package/ReactCommon/react/renderer/components/slider/platform/android/react/renderer/components/slider/SliderMeasurementsManager.h +40 -0
  2032. package/ReactCommon/react/renderer/components/slider/platform/ios/SliderMeasurementsManager.cpp +21 -0
  2033. package/ReactCommon/react/renderer/components/slider/platform/ios/SliderMeasurementsManager.h +33 -0
  2034. package/ReactCommon/react/renderer/components/slider/tests/SliderTest.cpp +14 -0
  2035. package/ReactCommon/react/renderer/components/switch/Android.mk +38 -0
  2036. package/ReactCommon/react/renderer/components/switch/BUCK +98 -0
  2037. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchComponentDescriptor.h +52 -0
  2038. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.cpp +68 -0
  2039. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.h +33 -0
  2040. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.cpp +31 -0
  2041. package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h +47 -0
  2042. package/ReactCommon/react/renderer/components/text/Android.mk +40 -0
  2043. package/ReactCommon/react/renderer/components/text/BUCK +101 -0
  2044. package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +172 -0
  2045. package/ReactCommon/react/renderer/components/text/BaseTextProps.h +39 -0
  2046. package/ReactCommon/react/renderer/components/text/BaseTextShadowNode.cpp +78 -0
  2047. package/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h +70 -0
  2048. package/ReactCommon/react/renderer/components/text/ParagraphComponentDescriptor.h +70 -0
  2049. package/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.cpp +55 -0
  2050. package/ReactCommon/react/renderer/components/text/ParagraphEventEmitter.h +28 -0
  2051. package/ReactCommon/react/renderer/components/text/ParagraphProps.cpp +54 -0
  2052. package/ReactCommon/react/renderer/components/text/ParagraphProps.h +54 -0
  2053. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +247 -0
  2054. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +107 -0
  2055. package/ReactCommon/react/renderer/components/text/ParagraphState.cpp +23 -0
  2056. package/ReactCommon/react/renderer/components/text/ParagraphState.h +64 -0
  2057. package/ReactCommon/react/renderer/components/text/RawTextComponentDescriptor.h +20 -0
  2058. package/ReactCommon/react/renderer/components/text/RawTextProps.cpp +32 -0
  2059. package/ReactCommon/react/renderer/components/text/RawTextProps.h +39 -0
  2060. package/ReactCommon/react/renderer/components/text/RawTextShadowNode.cpp +16 -0
  2061. package/ReactCommon/react/renderer/components/text/RawTextShadowNode.h +28 -0
  2062. package/ReactCommon/react/renderer/components/text/TextComponentDescriptor.h +19 -0
  2063. package/ReactCommon/react/renderer/components/text/TextProps.cpp +26 -0
  2064. package/ReactCommon/react/renderer/components/text/TextProps.h +32 -0
  2065. package/ReactCommon/react/renderer/components/text/TextShadowNode.cpp +16 -0
  2066. package/ReactCommon/react/renderer/components/text/TextShadowNode.h +61 -0
  2067. package/ReactCommon/react/renderer/components/text/conversions.h +27 -0
  2068. package/ReactCommon/react/renderer/components/text/tests/ParagraphLocalDataTest.cpp +54 -0
  2069. package/ReactCommon/react/renderer/components/text/tests/TextTest.cpp +14 -0
  2070. package/ReactCommon/react/renderer/components/textinput/Android.mk +44 -0
  2071. package/ReactCommon/react/renderer/components/textinput/BUCK +100 -0
  2072. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h +187 -0
  2073. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputEventEmitter.cpp +179 -0
  2074. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputEventEmitter.h +148 -0
  2075. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp +370 -0
  2076. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.h +183 -0
  2077. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +214 -0
  2078. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +88 -0
  2079. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp +97 -0
  2080. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h +106 -0
  2081. package/ReactCommon/react/renderer/components/textinput/iostextinput/BUCK +100 -0
  2082. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputComponentDescriptor.h +46 -0
  2083. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputEventEmitter.cpp +126 -0
  2084. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputEventEmitter.h +56 -0
  2085. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +101 -0
  2086. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +72 -0
  2087. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputShadowNode.cpp +123 -0
  2088. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputShadowNode.h +81 -0
  2089. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.cpp +12 -0
  2090. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.h +57 -0
  2091. package/ReactCommon/react/renderer/components/textinput/iostextinput/conversions.h +210 -0
  2092. package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +216 -0
  2093. package/ReactCommon/react/renderer/components/textinput/iostextinput/propsConversions.h +121 -0
  2094. package/ReactCommon/react/renderer/components/unimplementedview/Android.mk +35 -0
  2095. package/ReactCommon/react/renderer/components/unimplementedview/BUCK +79 -0
  2096. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.cpp +43 -0
  2097. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewComponentDescriptor.h +40 -0
  2098. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.cpp +22 -0
  2099. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.h +35 -0
  2100. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.cpp +16 -0
  2101. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.h +23 -0
  2102. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +78 -0
  2103. package/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +105 -0
  2104. package/ReactCommon/react/renderer/components/view/AccessibilityProps.h +52 -0
  2105. package/ReactCommon/react/renderer/components/view/Android.mk +34 -0
  2106. package/ReactCommon/react/renderer/components/view/BUCK +87 -0
  2107. package/ReactCommon/react/renderer/components/view/ConcreteViewShadowNode.h +124 -0
  2108. package/ReactCommon/react/renderer/components/view/Touch.cpp +36 -0
  2109. package/ReactCommon/react/renderer/components/view/Touch.h +89 -0
  2110. package/ReactCommon/react/renderer/components/view/TouchEvent.cpp +33 -0
  2111. package/ReactCommon/react/renderer/components/view/TouchEvent.h +55 -0
  2112. package/ReactCommon/react/renderer/components/view/TouchEventEmitter.cpp +85 -0
  2113. package/ReactCommon/react/renderer/components/view/TouchEventEmitter.h +40 -0
  2114. package/ReactCommon/react/renderer/components/view/ViewComponentDescriptor.h +38 -0
  2115. package/ReactCommon/react/renderer/components/view/ViewEventEmitter.cpp +77 -0
  2116. package/ReactCommon/react/renderer/components/view/ViewEventEmitter.h +49 -0
  2117. package/ReactCommon/react/renderer/components/view/ViewProps.cpp +204 -0
  2118. package/ReactCommon/react/renderer/components/view/ViewProps.h +81 -0
  2119. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +58 -0
  2120. package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +82 -0
  2121. package/ReactCommon/react/renderer/components/view/ViewShadowNode.h +46 -0
  2122. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +716 -0
  2123. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h +214 -0
  2124. package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +97 -0
  2125. package/ReactCommon/react/renderer/components/view/YogaStylableProps.h +39 -0
  2126. package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +192 -0
  2127. package/ReactCommon/react/renderer/components/view/conversions.h +719 -0
  2128. package/ReactCommon/react/renderer/components/view/primitives.h +181 -0
  2129. package/ReactCommon/react/renderer/components/view/propsConversions.h +332 -0
  2130. package/ReactCommon/react/renderer/components/view/tests/LayoutTest.cpp +186 -0
  2131. package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +221 -0
  2132. package/ReactCommon/react/renderer/core/Android.mk +31 -0
  2133. package/ReactCommon/react/renderer/core/BUCK +112 -0
  2134. package/ReactCommon/react/renderer/core/BatchedEventQueue.cpp +38 -0
  2135. package/ReactCommon/react/renderer/core/BatchedEventQueue.h +34 -0
  2136. package/ReactCommon/react/renderer/core/ComponentDescriptor.cpp +25 -0
  2137. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +158 -0
  2138. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +183 -0
  2139. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +141 -0
  2140. package/ReactCommon/react/renderer/core/ConcreteState.h +148 -0
  2141. package/ReactCommon/react/renderer/core/ConcreteStateTeller.h +152 -0
  2142. package/ReactCommon/react/renderer/core/EventBeat.cpp +40 -0
  2143. package/ReactCommon/react/renderer/core/EventBeat.h +91 -0
  2144. package/ReactCommon/react/renderer/core/EventDispatcher.cpp +72 -0
  2145. package/ReactCommon/react/renderer/core/EventDispatcher.h +70 -0
  2146. package/ReactCommon/react/renderer/core/EventEmitter.cpp +118 -0
  2147. package/ReactCommon/react/renderer/core/EventEmitter.h +99 -0
  2148. package/ReactCommon/react/renderer/core/EventHandler.h +30 -0
  2149. package/ReactCommon/react/renderer/core/EventPipe.h +27 -0
  2150. package/ReactCommon/react/renderer/core/EventPriority.h +26 -0
  2151. package/ReactCommon/react/renderer/core/EventQueue.cpp +120 -0
  2152. package/ReactCommon/react/renderer/core/EventQueue.h +70 -0
  2153. package/ReactCommon/react/renderer/core/EventTarget.cpp +66 -0
  2154. package/ReactCommon/react/renderer/core/EventTarget.h +78 -0
  2155. package/ReactCommon/react/renderer/core/LayoutConstraints.cpp +22 -0
  2156. package/ReactCommon/react/renderer/core/LayoutConstraints.h +57 -0
  2157. package/ReactCommon/react/renderer/core/LayoutContext.h +86 -0
  2158. package/ReactCommon/react/renderer/core/LayoutMetrics.h +66 -0
  2159. package/ReactCommon/react/renderer/core/LayoutPrimitives.h +45 -0
  2160. package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +297 -0
  2161. package/ReactCommon/react/renderer/core/LayoutableShadowNode.h +213 -0
  2162. package/ReactCommon/react/renderer/core/Props.cpp +26 -0
  2163. package/ReactCommon/react/renderer/core/Props.h +51 -0
  2164. package/ReactCommon/react/renderer/core/RawEvent.cpp +22 -0
  2165. package/ReactCommon/react/renderer/core/RawEvent.h +35 -0
  2166. package/ReactCommon/react/renderer/core/RawProps.cpp +94 -0
  2167. package/ReactCommon/react/renderer/core/RawProps.h +136 -0
  2168. package/ReactCommon/react/renderer/core/RawPropsKey.cpp +62 -0
  2169. package/ReactCommon/react/renderer/core/RawPropsKey.h +42 -0
  2170. package/ReactCommon/react/renderer/core/RawPropsKeyMap.cpp +106 -0
  2171. package/ReactCommon/react/renderer/core/RawPropsKeyMap.h +64 -0
  2172. package/ReactCommon/react/renderer/core/RawPropsParser.cpp +158 -0
  2173. package/ReactCommon/react/renderer/core/RawPropsParser.h +78 -0
  2174. package/ReactCommon/react/renderer/core/RawPropsPrimitives.h +53 -0
  2175. package/ReactCommon/react/renderer/core/RawValue.cpp +8 -0
  2176. package/ReactCommon/react/renderer/core/RawValue.h +282 -0
  2177. package/ReactCommon/react/renderer/core/ReactPrimitives.h +46 -0
  2178. package/ReactCommon/react/renderer/core/Sealable.cpp +65 -0
  2179. package/ReactCommon/react/renderer/core/Sealable.h +91 -0
  2180. package/ReactCommon/react/renderer/core/ShadowNode.cpp +299 -0
  2181. package/ReactCommon/react/renderer/core/ShadowNode.h +238 -0
  2182. package/ReactCommon/react/renderer/core/ShadowNodeFamily.cpp +143 -0
  2183. package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +147 -0
  2184. package/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.cpp +36 -0
  2185. package/ReactCommon/react/renderer/core/ShadowNodeFamilyFragment.h +55 -0
  2186. package/ReactCommon/react/renderer/core/ShadowNodeFragment.cpp +41 -0
  2187. package/ReactCommon/react/renderer/core/ShadowNodeFragment.h +66 -0
  2188. package/ReactCommon/react/renderer/core/ShadowNodeTraits.cpp +12 -0
  2189. package/ReactCommon/react/renderer/core/ShadowNodeTraits.h +98 -0
  2190. package/ReactCommon/react/renderer/core/State.cpp +49 -0
  2191. package/ReactCommon/react/renderer/core/State.h +113 -0
  2192. package/ReactCommon/react/renderer/core/StateData.h +34 -0
  2193. package/ReactCommon/react/renderer/core/StatePipe.h +20 -0
  2194. package/ReactCommon/react/renderer/core/StateUpdate.cpp +8 -0
  2195. package/ReactCommon/react/renderer/core/StateUpdate.h +33 -0
  2196. package/ReactCommon/react/renderer/core/UnbatchedEventQueue.cpp +21 -0
  2197. package/ReactCommon/react/renderer/core/UnbatchedEventQueue.h +27 -0
  2198. package/ReactCommon/react/renderer/core/ValueFactory.h +20 -0
  2199. package/ReactCommon/react/renderer/core/conversions.h +63 -0
  2200. package/ReactCommon/react/renderer/core/propsConversions.h +125 -0
  2201. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +132 -0
  2202. package/ReactCommon/react/renderer/core/tests/ConcreteShadowNodeTest.cpp +49 -0
  2203. package/ReactCommon/react/renderer/core/tests/FindNodeAtPointTest.cpp +229 -0
  2204. package/ReactCommon/react/renderer/core/tests/LayoutableShadowNodeTest.cpp +424 -0
  2205. package/ReactCommon/react/renderer/core/tests/PrimitivesTest.cpp +46 -0
  2206. package/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp +307 -0
  2207. package/ReactCommon/react/renderer/core/tests/ShadowNodeFamilyTest.cpp +79 -0
  2208. package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +294 -0
  2209. package/ReactCommon/react/renderer/core/tests/TestComponent.h +73 -0
  2210. package/ReactCommon/react/renderer/core/tests/benchmarks/RawPropsBenchmark.cpp +80 -0
  2211. package/ReactCommon/react/renderer/core/tests/traitCastTest.cpp +105 -0
  2212. package/ReactCommon/react/renderer/debug/Android.mk +27 -0
  2213. package/ReactCommon/react/renderer/debug/BUCK +81 -0
  2214. package/ReactCommon/react/renderer/debug/DebugStringConvertible.cpp +154 -0
  2215. package/ReactCommon/react/renderer/debug/DebugStringConvertible.h +393 -0
  2216. package/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.cpp +43 -0
  2217. package/ReactCommon/react/renderer/debug/DebugStringConvertibleItem.h +47 -0
  2218. package/ReactCommon/react/renderer/debug/SystraceSection.h +51 -0
  2219. package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +67 -0
  2220. package/ReactCommon/react/renderer/debug/tests/DebugStringConvertibleTest.cpp +84 -0
  2221. package/ReactCommon/react/renderer/element/BUCK +87 -0
  2222. package/ReactCommon/react/renderer/element/ComponentBuilder.cpp +67 -0
  2223. package/ReactCommon/react/renderer/element/ComponentBuilder.h +59 -0
  2224. package/ReactCommon/react/renderer/element/Element.cpp +10 -0
  2225. package/ReactCommon/react/renderer/element/Element.h +158 -0
  2226. package/ReactCommon/react/renderer/element/ElementFragment.cpp +10 -0
  2227. package/ReactCommon/react/renderer/element/ElementFragment.h +62 -0
  2228. package/ReactCommon/react/renderer/element/testUtils.h +49 -0
  2229. package/ReactCommon/react/renderer/element/tests/ElementTest.cpp +102 -0
  2230. package/ReactCommon/react/renderer/graphics/Android.mk +29 -0
  2231. package/ReactCommon/react/renderer/graphics/BUCK +125 -0
  2232. package/ReactCommon/react/renderer/graphics/ColorComponents.h +21 -0
  2233. package/ReactCommon/react/renderer/graphics/Geometry.h +28 -0
  2234. package/ReactCommon/react/renderer/graphics/Point.h +72 -0
  2235. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +42 -0
  2236. package/ReactCommon/react/renderer/graphics/Rect.h +115 -0
  2237. package/ReactCommon/react/renderer/graphics/RectangleCorners.h +71 -0
  2238. package/ReactCommon/react/renderer/graphics/RectangleEdges.h +92 -0
  2239. package/ReactCommon/react/renderer/graphics/Size.h +59 -0
  2240. package/ReactCommon/react/renderer/graphics/Transform.cpp +388 -0
  2241. package/ReactCommon/react/renderer/graphics/Transform.h +214 -0
  2242. package/ReactCommon/react/renderer/graphics/conversions.h +212 -0
  2243. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.cpp +47 -0
  2244. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.h +78 -0
  2245. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Float.h +22 -0
  2246. package/ReactCommon/react/renderer/graphics/platform/ios/Color.cpp +54 -0
  2247. package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +30 -0
  2248. package/ReactCommon/react/renderer/graphics/platform/ios/Float.h +23 -0
  2249. package/ReactCommon/react/renderer/graphics/rounding.h +82 -0
  2250. package/ReactCommon/react/renderer/graphics/tests/GraphicsTest.cpp +14 -0
  2251. package/ReactCommon/react/renderer/graphics/tests/TransformTest.cpp +68 -0
  2252. package/ReactCommon/react/renderer/imagemanager/Android.mk +35 -0
  2253. package/ReactCommon/react/renderer/imagemanager/BUCK +132 -0
  2254. package/ReactCommon/react/renderer/imagemanager/ImageManager.h +40 -0
  2255. package/ReactCommon/react/renderer/imagemanager/ImageRequest.h +102 -0
  2256. package/ReactCommon/react/renderer/imagemanager/ImageResponse.cpp +27 -0
  2257. package/ReactCommon/react/renderer/imagemanager/ImageResponse.h +41 -0
  2258. package/ReactCommon/react/renderer/imagemanager/ImageResponseObserver.h +29 -0
  2259. package/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp +91 -0
  2260. package/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.h +89 -0
  2261. package/ReactCommon/react/renderer/imagemanager/ImageTelemetry.cpp +28 -0
  2262. package/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h +42 -0
  2263. package/ReactCommon/react/renderer/imagemanager/platform/cxx/react/renderer/imagemanager/ImageManager.cpp +31 -0
  2264. package/ReactCommon/react/renderer/imagemanager/platform/cxx/react/renderer/imagemanager/ImageRequest.cpp +44 -0
  2265. package/ReactCommon/react/renderer/imagemanager/platform/ios/ImageManager.mm +45 -0
  2266. package/ReactCommon/react/renderer/imagemanager/platform/ios/ImageRequest.cpp +56 -0
  2267. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +28 -0
  2268. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.mm +113 -0
  2269. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManagerProtocol.h +16 -0
  2270. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +113 -0
  2271. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +28 -0
  2272. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.mm +100 -0
  2273. package/ReactCommon/react/renderer/imagemanager/primitives.h +48 -0
  2274. package/ReactCommon/react/renderer/imagemanager/tests/ImageManagerTest.cpp +18 -0
  2275. package/ReactCommon/react/renderer/mapbuffer/Android.mk +27 -0
  2276. package/ReactCommon/react/renderer/mapbuffer/BUCK +67 -0
  2277. package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +18 -0
  2278. package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +37 -0
  2279. package/ReactCommon/react/renderer/mapbuffer/tests/MapBufferTest.cpp +14 -0
  2280. package/ReactCommon/react/renderer/mounting/Android.mk +37 -0
  2281. package/ReactCommon/react/renderer/mounting/BUCK +90 -0
  2282. package/ReactCommon/react/renderer/mounting/Differentiator.cpp +1883 -0
  2283. package/ReactCommon/react/renderer/mounting/Differentiator.h +45 -0
  2284. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +188 -0
  2285. package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +125 -0
  2286. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +47 -0
  2287. package/ReactCommon/react/renderer/mounting/MountingTransaction.cpp +46 -0
  2288. package/ReactCommon/react/renderer/mounting/MountingTransaction.h +88 -0
  2289. package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp +12 -0
  2290. package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +32 -0
  2291. package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +419 -0
  2292. package/ReactCommon/react/renderer/mounting/ShadowTree.h +123 -0
  2293. package/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.h +33 -0
  2294. package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.cpp +67 -0
  2295. package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h +70 -0
  2296. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.cpp +8 -0
  2297. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +42 -0
  2298. package/ReactCommon/react/renderer/mounting/ShadowView.cpp +81 -0
  2299. package/ReactCommon/react/renderer/mounting/ShadowView.h +102 -0
  2300. package/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +123 -0
  2301. package/ReactCommon/react/renderer/mounting/ShadowViewMutation.h +88 -0
  2302. package/ReactCommon/react/renderer/mounting/StubView.cpp +65 -0
  2303. package/ReactCommon/react/renderer/mounting/StubView.h +57 -0
  2304. package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +182 -0
  2305. package/ReactCommon/react/renderer/mounting/StubViewTree.h +38 -0
  2306. package/ReactCommon/react/renderer/mounting/SurfaceTelemetry.cpp +80 -0
  2307. package/ReactCommon/react/renderer/mounting/SurfaceTelemetry.h +67 -0
  2308. package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +57 -0
  2309. package/ReactCommon/react/renderer/mounting/TelemetryController.h +57 -0
  2310. package/ReactCommon/react/renderer/mounting/TransactionTelemetry.cpp +142 -0
  2311. package/ReactCommon/react/renderer/mounting/TransactionTelemetry.h +76 -0
  2312. package/ReactCommon/react/renderer/mounting/stubs.cpp +62 -0
  2313. package/ReactCommon/react/renderer/mounting/stubs.h +20 -0
  2314. package/ReactCommon/react/renderer/mounting/tests/Entropy.h +131 -0
  2315. package/ReactCommon/react/renderer/mounting/tests/MountingTest.cpp +696 -0
  2316. package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +220 -0
  2317. package/ReactCommon/react/renderer/mounting/tests/StateReconciliationTest.cpp +169 -0
  2318. package/ReactCommon/react/renderer/mounting/tests/TransactionTelemetryTest.cpp +125 -0
  2319. package/ReactCommon/react/renderer/mounting/tests/shadowTreeGeneration.h +259 -0
  2320. package/ReactCommon/react/renderer/scheduler/Android.mk +42 -0
  2321. package/ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.cpp +55 -0
  2322. package/ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.h +41 -0
  2323. package/ReactCommon/react/renderer/scheduler/BUCK +68 -0
  2324. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +399 -0
  2325. package/ReactCommon/react/renderer/scheduler/Scheduler.h +145 -0
  2326. package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +62 -0
  2327. package/ReactCommon/react/renderer/scheduler/SchedulerToolbox.cpp +8 -0
  2328. package/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h +66 -0
  2329. package/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.cpp +50 -0
  2330. package/ReactCommon/react/renderer/scheduler/SynchronousEventBeat.h +44 -0
  2331. package/ReactCommon/react/renderer/templateprocessor/Android.mk +36 -0
  2332. package/ReactCommon/react/renderer/templateprocessor/BUCK +92 -0
  2333. package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.cpp +155 -0
  2334. package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h +66 -0
  2335. package/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp +168 -0
  2336. package/ReactCommon/react/renderer/textlayoutmanager/Android.mk +40 -0
  2337. package/ReactCommon/react/renderer/textlayoutmanager/BUCK +158 -0
  2338. package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.cpp +65 -0
  2339. package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +218 -0
  2340. package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +253 -0
  2341. package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +76 -0
  2342. package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +27 -0
  2343. package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/TextLayoutManager.h +56 -0
  2344. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +20 -0
  2345. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.m +117 -0
  2346. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +42 -0
  2347. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +370 -0
  2348. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +38 -0
  2349. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +19 -0
  2350. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.mm +167 -0
  2351. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +61 -0
  2352. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm +279 -0
  2353. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +119 -0
  2354. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/TextLayoutManager.h +63 -0
  2355. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/TextLayoutManager.mm +77 -0
  2356. package/ReactCommon/react/renderer/textlayoutmanager/tests/TextLayoutManagerTest.cpp +18 -0
  2357. package/ReactCommon/react/renderer/uimanager/Android.mk +39 -0
  2358. package/ReactCommon/react/renderer/uimanager/BUCK +93 -0
  2359. package/ReactCommon/react/renderer/uimanager/LayoutAnimationStatusDelegate.h +30 -0
  2360. package/ReactCommon/react/renderer/uimanager/UIManager.cpp +368 -0
  2361. package/ReactCommon/react/renderer/uimanager/UIManager.h +168 -0
  2362. package/ReactCommon/react/renderer/uimanager/UIManagerAnimationDelegate.h +52 -0
  2363. package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +676 -0
  2364. package/ReactCommon/react/renderer/uimanager/UIManagerBinding.h +89 -0
  2365. package/ReactCommon/react/renderer/uimanager/UIManagerDelegate.h +62 -0
  2366. package/ReactCommon/react/renderer/uimanager/primitives.h +104 -0
  2367. package/ReactCommon/react/renderer/uimanager/tests/FabricUIManagerTest.cpp +17 -0
  2368. package/ReactCommon/{utils → react/utils}/.clang-tidy +0 -0
  2369. package/ReactCommon/react/utils/Android.mk +25 -0
  2370. package/ReactCommon/react/utils/BUCK +63 -0
  2371. package/ReactCommon/react/utils/CalledOnceMovableOnlyFunction.h +87 -0
  2372. package/ReactCommon/react/utils/ContextContainer.h +133 -0
  2373. package/ReactCommon/react/utils/FloatComparison.h +19 -0
  2374. package/ReactCommon/react/utils/ManagedObjectWrapper.h +76 -0
  2375. package/ReactCommon/react/utils/ManagedObjectWrapper.mm +38 -0
  2376. package/ReactCommon/react/utils/RunLoopObserver.cpp +62 -0
  2377. package/ReactCommon/react/utils/RunLoopObserver.h +129 -0
  2378. package/ReactCommon/react/utils/SharedFunction.h +62 -0
  2379. package/ReactCommon/react/utils/SimpleThreadSafeCache.h +75 -0
  2380. package/ReactCommon/react/utils/Telemetry.h +115 -0
  2381. package/ReactCommon/reactperflogger/.clang-tidy +5 -0
  2382. package/ReactCommon/reactperflogger/Android.mk +25 -0
  2383. package/ReactCommon/reactperflogger/BUCK +28 -0
  2384. package/ReactCommon/reactperflogger/React-perflogger.podspec +34 -0
  2385. package/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.cpp +331 -0
  2386. package/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.h +113 -0
  2387. package/ReactCommon/reactperflogger/reactperflogger/NativeModulePerfLogger.h +164 -0
  2388. package/ReactCommon/runtimeexecutor/.clang-tidy +5 -0
  2389. package/ReactCommon/runtimeexecutor/Android.mk +19 -0
  2390. package/ReactCommon/runtimeexecutor/BUCK +53 -0
  2391. package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +36 -0
  2392. package/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h +117 -0
  2393. package/ReactCommon/yoga/Yoga.podspec +57 -57
  2394. package/ReactCommon/yoga/yoga/BitUtils.h +66 -66
  2395. package/ReactCommon/yoga/yoga/Bitfield.h +144 -144
  2396. package/ReactCommon/yoga/yoga/CompactValue.h +184 -184
  2397. package/ReactCommon/yoga/yoga/Utils.cpp +79 -67
  2398. package/ReactCommon/yoga/yoga/Utils.h +147 -143
  2399. package/ReactCommon/yoga/yoga/YGConfig.cpp +44 -44
  2400. package/ReactCommon/yoga/yoga/YGConfig.h +76 -76
  2401. package/ReactCommon/yoga/yoga/YGEnums.cpp +228 -226
  2402. package/ReactCommon/yoga/yoga/YGEnums.h +155 -151
  2403. package/ReactCommon/yoga/yoga/YGFloatOptional.h +70 -70
  2404. package/ReactCommon/yoga/yoga/YGLayout.cpp +42 -42
  2405. package/ReactCommon/yoga/yoga/YGLayout.h +87 -87
  2406. package/ReactCommon/yoga/yoga/YGMacros.h +53 -53
  2407. package/ReactCommon/yoga/yoga/YGNode.cpp +592 -589
  2408. package/ReactCommon/yoga/yoga/YGNode.h +337 -332
  2409. package/ReactCommon/yoga/yoga/YGNodePrint.cpp +225 -225
  2410. package/ReactCommon/yoga/yoga/YGNodePrint.h +25 -25
  2411. package/ReactCommon/yoga/yoga/YGStyle.cpp +56 -56
  2412. package/ReactCommon/yoga/yoga/YGStyle.h +236 -231
  2413. package/ReactCommon/yoga/yoga/YGValue.cpp +12 -12
  2414. package/ReactCommon/yoga/yoga/YGValue.h +95 -95
  2415. package/ReactCommon/yoga/yoga/Yoga-internal.h +151 -151
  2416. package/ReactCommon/yoga/yoga/Yoga.cpp +4425 -4416
  2417. package/ReactCommon/yoga/yoga/Yoga.h +374 -374
  2418. package/ReactCommon/yoga/yoga/event/event.cpp +86 -87
  2419. package/ReactCommon/yoga/yoga/event/event.h +146 -145
  2420. package/ReactCommon/yoga/yoga/internal/experiments-inl.h +32 -32
  2421. package/ReactCommon/yoga/yoga/internal/experiments.cpp +38 -38
  2422. package/ReactCommon/yoga/yoga/internal/experiments.h +26 -26
  2423. package/ReactCommon/yoga/yoga/log.cpp +64 -68
  2424. package/ReactCommon/yoga/yoga/log.h +38 -38
  2425. package/cli.js +19 -19
  2426. package/flow/Position.js +16 -16
  2427. package/flow/Promise.js +47 -47
  2428. package/flow/Stringish.js +14 -14
  2429. package/flow/console.js +49 -49
  2430. package/flow/jest.js +1189 -1189
  2431. package/flow/use-subscription.js +19 -19
  2432. package/flow-typed/npm/base64-js_v1.x.x.js +12 -0
  2433. package/flow-typed/npm/pretty-format_v26.x.x.js +49 -0
  2434. package/flow-typed/npm/promise_v8.x.x.js +30 -0
  2435. package/flow-typed/npm/prop-types_v15.x.x.js +42 -0
  2436. package/flow-typed/npm/react-dom_v16.x.x.js +112 -0
  2437. package/flow-typed/npm/stacktrace-parser_v0.1.x.js +17 -0
  2438. package/index.js +698 -680
  2439. package/interface.js +25 -25
  2440. package/jest/MockNativeMethods.js +21 -21
  2441. package/jest/assetFileTransformer.js +31 -30
  2442. package/jest/mockComponent.js +62 -62
  2443. package/jest/mockScrollView.js +35 -35
  2444. package/jest/preprocessor.js +122 -120
  2445. package/jest/renderer.js +36 -35
  2446. package/jest/setup.js +373 -365
  2447. package/jest-preset.js +28 -28
  2448. package/local-cli/cli.js +18 -18
  2449. package/local-cli/generate-macos.js +38 -38
  2450. package/local-cli/generator-common/index.js +145 -145
  2451. package/local-cli/generator-macos/index.js +158 -158
  2452. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/AppDelegate.h +8 -8
  2453. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/AppDelegate.m +35 -35
  2454. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/Base.lproj/LaunchScreen.xib +42 -42
  2455. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/Images.xcassets/AppIcon.appiconset/Contents.json +37 -37
  2456. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/Images.xcassets/Contents.json +6 -6
  2457. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/Info.plist +57 -57
  2458. package/local-cli/generator-macos/templates/macos/HelloWorld-iOS/main.m +9 -9
  2459. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.h +9 -9
  2460. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.m +32 -32
  2461. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -58
  2462. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/Assets.xcassets/Contents.json +6 -6
  2463. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/Base.lproj/Main.storyboard +717 -717
  2464. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/HelloWorld.entitlements +12 -12
  2465. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/Info.plist +47 -47
  2466. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.h +5 -5
  2467. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +22 -22
  2468. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/main.m +5 -5
  2469. package/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/project.pbxproj +646 -646
  2470. package/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld-iOS.xcscheme +78 -78
  2471. package/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld-macOS.xcscheme +78 -78
  2472. package/local-cli/generator-macos/templates/macos/Podfile +35 -35
  2473. package/local-cli/runMacOS/findXcodeProject.js +37 -37
  2474. package/local-cli/runMacOS/runMacOS.js +299 -299
  2475. package/package.json +42 -78
  2476. package/react-native.config.js +84 -84
  2477. package/react.gradle +7 -2
  2478. package/rn-get-polyfills.js +12 -16
  2479. package/scripts/compose-source-maps.js +61 -61
  2480. package/scripts/generate-native-modules-specs-cli.js +87 -0
  2481. package/scripts/generate-native-modules-specs.sh +79 -0
  2482. package/scripts/ios-configure-glog.sh +0 -9
  2483. package/scripts/postInstall.js +6 -6
  2484. package/scripts/react-native-xcode.sh +31 -17
  2485. package/scripts/react_native_pods.rb +4 -3
  2486. package/template/App.js +112 -114
  2487. package/template/__tests__/App-test.js +14 -14
  2488. package/template/_eslintrc.js +4 -4
  2489. package/template/_flowconfig +4 -11
  2490. package/template/_prettierrc.js +7 -6
  2491. package/template/android/app/build.gradle +4 -1
  2492. package/template/android/app/src/debug/AndroidManifest.xml +6 -1
  2493. package/template/android/app/src/main/AndroidManifest.xml +0 -2
  2494. package/template/android/app/src/main/res/values/styles.xml +1 -1
  2495. package/template/android/build.gradle +4 -3
  2496. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  2497. package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  2498. package/template/android/gradlew +185 -183
  2499. package/template/android/gradlew.bat +4 -18
  2500. package/template/app.json +3 -3
  2501. package/template/babel.config.js +3 -3
  2502. package/template/index.js +9 -9
  2503. package/template/ios/HelloWorld/AppDelegate.h +8 -8
  2504. package/template/ios/HelloWorld/AppDelegate.m +62 -58
  2505. package/template/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json +37 -37
  2506. package/template/ios/HelloWorld/Images.xcassets/Contents.json +6 -6
  2507. package/template/ios/HelloWorld/Info.plist +55 -57
  2508. package/template/ios/HelloWorld/LaunchScreen.storyboard +47 -58
  2509. package/template/ios/HelloWorld/main.m +9 -9
  2510. package/template/ios/HelloWorld.xcodeproj/project.pbxproj +538 -791
  2511. package/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme +88 -88
  2512. package/template/ios/HelloWorldTests/HelloWorldTests.m +64 -64
  2513. package/template/ios/HelloWorldTests/Info.plist +24 -24
  2514. package/template/ios/Podfile +24 -33
  2515. package/template/metro.config.js +17 -17
  2516. package/template/package.json +5 -4
  2517. package/template.config.js +12 -11
  2518. package/third-party-podspecs/DoubleConversion.podspec +24 -24
  2519. package/third-party-podspecs/RCT-Folly.podspec +129 -128
  2520. package/third-party-podspecs/boost-for-react-native.podspec +20 -20
  2521. package/third-party-podspecs/glog.podspec +39 -39
  2522. package/third-party-podspecs/libevent.podspec +565 -570
  2523. package/.flowconfig +0 -93
  2524. package/Libraries/ART/ARTCGFloatArray.h +0 -18
  2525. package/Libraries/ART/ARTContainer.h +0 -16
  2526. package/Libraries/ART/ARTGroup.h +0 -17
  2527. package/Libraries/ART/ARTGroup.m +0 -24
  2528. package/Libraries/ART/ARTNode.h +0 -30
  2529. package/Libraries/ART/ARTNode.m +0 -80
  2530. package/Libraries/ART/ARTRenderable.h +0 -23
  2531. package/Libraries/ART/ARTRenderable.m +0 -87
  2532. package/Libraries/ART/ARTShape.h +0 -16
  2533. package/Libraries/ART/ARTShape.m +0 -66
  2534. package/Libraries/ART/ARTSurfaceView.h +0 -14
  2535. package/Libraries/ART/ARTSurfaceView.m +0 -57
  2536. package/Libraries/ART/ARTText.h +0 -18
  2537. package/Libraries/ART/ARTText.m +0 -125
  2538. package/Libraries/ART/ARTTextFrame.h +0 -23
  2539. package/Libraries/ART/Brushes/ARTBrush.h +0 -33
  2540. package/Libraries/ART/Brushes/ARTBrush.m +0 -31
  2541. package/Libraries/ART/Brushes/ARTLinearGradient.h +0 -12
  2542. package/Libraries/ART/Brushes/ARTLinearGradient.m +0 -48
  2543. package/Libraries/ART/Brushes/ARTPattern.h +0 -12
  2544. package/Libraries/ART/Brushes/ARTPattern.m +0 -49
  2545. package/Libraries/ART/Brushes/ARTRadialGradient.h +0 -12
  2546. package/Libraries/ART/Brushes/ARTRadialGradient.m +0 -55
  2547. package/Libraries/ART/Brushes/ARTSolidColor.h +0 -12
  2548. package/Libraries/ART/Brushes/ARTSolidColor.m +0 -38
  2549. package/Libraries/ART/RCTConvert+ART.h +0 -29
  2550. package/Libraries/ART/RCTConvert+ART.m +0 -222
  2551. package/Libraries/ART/React-ART.podspec +0 -33
  2552. package/Libraries/ART/ViewManagers/ARTGroupManager.h +0 -12
  2553. package/Libraries/ART/ViewManagers/ARTGroupManager.m +0 -24
  2554. package/Libraries/ART/ViewManagers/ARTNodeManager.h +0 -16
  2555. package/Libraries/ART/ViewManagers/ARTNodeManager.m +0 -34
  2556. package/Libraries/ART/ViewManagers/ARTRenderableManager.h +0 -15
  2557. package/Libraries/ART/ViewManagers/ARTRenderableManager.m +0 -28
  2558. package/Libraries/ART/ViewManagers/ARTShapeManager.h +0 -12
  2559. package/Libraries/ART/ViewManagers/ARTShapeManager.m +0 -24
  2560. package/Libraries/ART/ViewManagers/ARTSurfaceViewManager.h +0 -12
  2561. package/Libraries/ART/ViewManagers/ARTSurfaceViewManager.m +0 -21
  2562. package/Libraries/ART/ViewManagers/ARTTextManager.h +0 -12
  2563. package/Libraries/ART/ViewManagers/ARTTextManager.m +0 -25
  2564. package/Libraries/Animated/examples/demo.html +0 -712
  2565. package/Libraries/Animated/examples/pic1.jpg +0 -0
  2566. package/Libraries/Animated/examples/pic2.jpg +0 -0
  2567. package/Libraries/Animated/examples/pic3.jpg +0 -0
  2568. package/Libraries/Animated/examples/style.css +0 -88
  2569. package/Libraries/Animated/release/.gitignore +0 -2
  2570. package/Libraries/Animated/release/gulpfile.js +0 -155
  2571. package/Libraries/Animated/release/package.json +0 -37
  2572. package/Libraries/Animated/src/Animated.js +0 -49
  2573. package/Libraries/Animated/src/AnimatedEvent.js +0 -233
  2574. package/Libraries/Animated/src/AnimatedImplementation.js +0 -712
  2575. package/Libraries/Animated/src/AnimatedMock.js +0 -156
  2576. package/Libraries/Animated/src/AnimatedWeb.js +0 -23
  2577. package/Libraries/Animated/src/Easing.js +0 -252
  2578. package/Libraries/Animated/src/NativeAnimatedHelper.js +0 -342
  2579. package/Libraries/Animated/src/NativeAnimatedModule.js +0 -66
  2580. package/Libraries/Animated/src/SpringConfig.js +0 -103
  2581. package/Libraries/Animated/src/animations/Animation.js +0 -73
  2582. package/Libraries/Animated/src/animations/DecayAnimation.js +0 -120
  2583. package/Libraries/Animated/src/animations/SpringAnimation.js +0 -359
  2584. package/Libraries/Animated/src/animations/TimingAnimation.js +0 -165
  2585. package/Libraries/Animated/src/bezier.js +0 -153
  2586. package/Libraries/Animated/src/components/AnimatedFlatList.js +0 -32
  2587. package/Libraries/Animated/src/components/AnimatedImage.js +0 -25
  2588. package/Libraries/Animated/src/components/AnimatedScrollView.js +0 -32
  2589. package/Libraries/Animated/src/components/AnimatedSectionList.js +0 -32
  2590. package/Libraries/Animated/src/components/AnimatedText.js +0 -25
  2591. package/Libraries/Animated/src/components/AnimatedView.js +0 -23
  2592. package/Libraries/Animated/src/createAnimatedComponent.js +0 -223
  2593. package/Libraries/Animated/src/nodes/AnimatedAddition.js +0 -63
  2594. package/Libraries/Animated/src/nodes/AnimatedDiffClamp.js +0 -71
  2595. package/Libraries/Animated/src/nodes/AnimatedDivision.js +0 -68
  2596. package/Libraries/Animated/src/nodes/AnimatedInterpolation.js +0 -373
  2597. package/Libraries/Animated/src/nodes/AnimatedModulo.js +0 -62
  2598. package/Libraries/Animated/src/nodes/AnimatedMultiplication.js +0 -63
  2599. package/Libraries/Animated/src/nodes/AnimatedNode.js +0 -184
  2600. package/Libraries/Animated/src/nodes/AnimatedProps.js +0 -176
  2601. package/Libraries/Animated/src/nodes/AnimatedStyle.js +0 -127
  2602. package/Libraries/Animated/src/nodes/AnimatedSubtraction.js +0 -63
  2603. package/Libraries/Animated/src/nodes/AnimatedTracking.js +0 -102
  2604. package/Libraries/Animated/src/nodes/AnimatedTransform.js +0 -121
  2605. package/Libraries/Animated/src/nodes/AnimatedValue.js +0 -265
  2606. package/Libraries/Animated/src/nodes/AnimatedValueXY.js +0 -226
  2607. package/Libraries/Animated/src/nodes/AnimatedWithChildren.js +0 -87
  2608. package/Libraries/Animated/src/polyfills/InteractionManager.js +0 -15
  2609. package/Libraries/Animated/src/polyfills/Set.js +0 -26
  2610. package/Libraries/Animated/src/polyfills/flattenStyle.js +0 -13
  2611. package/Libraries/CameraRoll/RCTAssetsLibraryRequestHandler.h +0 -15
  2612. package/Libraries/CameraRoll/RCTAssetsLibraryRequestHandler.mm +0 -172
  2613. package/Libraries/CameraRoll/RCTCameraRollManager.h +0 -22
  2614. package/Libraries/CameraRoll/RCTCameraRollManager.mm +0 -370
  2615. package/Libraries/CameraRoll/RCTCameraRollPlugins.h +0 -43
  2616. package/Libraries/CameraRoll/RCTCameraRollPlugins.mm +0 -35
  2617. package/Libraries/CameraRoll/RCTImagePickerManager.h +0 -12
  2618. package/Libraries/CameraRoll/RCTImagePickerManager.mm +0 -264
  2619. package/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.h +0 -12
  2620. package/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.mm +0 -123
  2621. package/Libraries/Components/AppleTV/NativeTVNavigationEventEmitter.js +0 -23
  2622. package/Libraries/Components/AppleTV/TVEventHandler.js +0 -52
  2623. package/Libraries/Components/CheckBox/AndroidCheckBoxNativeComponent.js +0 -74
  2624. package/Libraries/Components/CheckBox/CheckBox.android.js +0 -228
  2625. package/Libraries/Components/CheckBox/CheckBox.ios.js +0 -13
  2626. package/Libraries/Components/Touchable/TVTouchable.js +0 -55
  2627. package/Libraries/DeprecatedPropTypes/DeprecatedTVViewPropTypes.js +0 -23
  2628. package/Libraries/FBReactNativeSpec/BUCK +0 -25
  2629. package/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -2793
  2630. package/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +0 -3887
  2631. package/Libraries/Image/assetPathUtils.js +0 -91
  2632. package/Libraries/Linking/NativeLinking.js +0 -41
  2633. package/Libraries/LinkingIOS/macos/RCTLinkingManager.m +0 -108
  2634. package/Libraries/ReactNative/RootTagContext.js +0 -15
  2635. package/Libraries/Storage/NativeAsyncStorage.js +0 -44
  2636. package/Libraries/StyleSheet/PlatformColorValueTypesAndroid.android.js +0 -18
  2637. package/Libraries/StyleSheet/PlatformColorValueTypesAndroid.js +0 -17
  2638. package/Libraries/polyfills/Object.es7.js +0 -58
  2639. package/Libraries/polyfills/console.js +0 -642
  2640. package/Libraries/polyfills/error-guard.js +0 -115
  2641. package/Libraries/vendor/emitter/EmitterSubscription.js +0 -59
  2642. package/Libraries/vendor/emitter/EventSubscription.js +0 -40
  2643. package/Libraries/vendor/emitter/EventSubscriptionVendor.js +0 -101
  2644. package/React/Base/RCTBundleURLProvider.m +0 -268
  2645. package/React/Base/RCTEventDispatcher.h +0 -121
  2646. package/React/Base/RCTTVRemoteHandler.h +0 -31
  2647. package/React/Base/RCTTVRemoteHandler.m +0 -233
  2648. package/React/CoreModules/RCTTVNavigationEventEmitter.h +0 -14
  2649. package/React/CoreModules/RCTTVNavigationEventEmitter.mm +0 -66
  2650. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceShadowNode.cpp +0 -14
  2651. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceShadowNode.h +0 -27
  2652. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentDescriptor.h +0 -20
  2653. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.h +0 -15
  2654. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewComponentView.mm +0 -41
  2655. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewProps.cpp +0 -21
  2656. package/React/Fabric/Mounting/ComponentViews/ART/RCTARTSurfaceViewProps.h +0 -26
  2657. package/React/Fabric/Utils/MainRunLoopEventBeat.h +0 -39
  2658. package/React/Fabric/Utils/MainRunLoopEventBeat.mm +0 -65
  2659. package/React/Fabric/Utils/RuntimeEventBeat.h +0 -37
  2660. package/React/Fabric/Utils/RuntimeEventBeat.mm +0 -57
  2661. package/React/Views/RCTTVView.h +0 -31
  2662. package/React/Views/RCTTVView.m +0 -258
  2663. package/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TimePickerDialogTestCase.java +0 -156
  2664. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/BUCK +0 -57
  2665. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAccessibilityInfoSpec.java +0 -38
  2666. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAccessibilityManagerSpec.java +0 -54
  2667. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeActionSheetManagerSpec.java +0 -34
  2668. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAlertManagerSpec.java +0 -30
  2669. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAnimatedModuleSpec.java +0 -87
  2670. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAnimationsDebugModuleSpec.java +0 -31
  2671. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAppStateSpec.java +0 -66
  2672. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAppearanceSpec.java +0 -37
  2673. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeAsyncStorageSpec.java +0 -45
  2674. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeBlobModuleSpec.java +0 -77
  2675. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeBugReportingSpec.java +0 -35
  2676. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeCameraRollManagerSpec.java +0 -37
  2677. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeClipboardSpec.java +0 -32
  2678. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDatePickerAndroidSpec.java +0 -30
  2679. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDevLoadingViewSpec.java +0 -31
  2680. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDevMenuSpec.java +0 -40
  2681. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDevSettingsSpec.java +0 -60
  2682. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDeviceEventManagerSpec.java +0 -28
  2683. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDeviceInfoSpec.java +0 -57
  2684. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeDialogManagerAndroidSpec.java +0 -65
  2685. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeExceptionsManagerSpec.java +0 -46
  2686. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeFileReaderModuleSpec.java +0 -33
  2687. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeFrameRateLoggerSpec.java +0 -38
  2688. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeHeadlessJsTaskSupportSpec.java +0 -32
  2689. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeHeapCaptureSpec.java +0 -32
  2690. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeI18nManagerSpec.java +0 -66
  2691. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImageEditorSpec.java +0 -31
  2692. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImageLoaderAndroidSpec.java +0 -43
  2693. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImageLoaderIOSSpec.java +0 -40
  2694. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImageLoaderSpec.java +0 -40
  2695. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImagePickerIOSSpec.java +0 -47
  2696. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeImageStoreSpec.java +0 -40
  2697. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeJSCHeapCaptureSpec.java +0 -29
  2698. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeJSCSamplingProfilerSpec.java +0 -30
  2699. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeJSDevSupportSpec.java +0 -63
  2700. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeKeyboardObserverSpec.java +0 -31
  2701. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeLinkingSpec.java +0 -48
  2702. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeLogBoxSpec.java +0 -31
  2703. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeModalManagerSpec.java +0 -31
  2704. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeNetworkingAndroidSpec.java +0 -45
  2705. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeNetworkingIOSSpec.java +0 -42
  2706. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePermissionsAndroidSpec.java +0 -39
  2707. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec.java +0 -70
  2708. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePlatformConstantsIOSSpec.java +0 -60
  2709. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativePushNotificationManagerIOSSpec.java +0 -80
  2710. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeRedBoxSpec.java +0 -32
  2711. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeSegmentFetcherSpec.java +0 -34
  2712. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeSettingsManagerSpec.java +0 -64
  2713. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeShareModuleSpec.java +0 -30
  2714. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeSoundManagerSpec.java +0 -28
  2715. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeSourceCodeSpec.java +0 -55
  2716. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeStatusBarManagerAndroidSpec.java +0 -69
  2717. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeStatusBarManagerIOSSpec.java +0 -77
  2718. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeStatusBarManagerSpec.java +0 -82
  2719. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeTVNavigationEventEmitterSpec.java +0 -31
  2720. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeTimePickerAndroidSpec.java +0 -30
  2721. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeTimingSpec.java +0 -35
  2722. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeToastAndroidSpec.java +0 -70
  2723. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeUIManagerSpec.java +0 -133
  2724. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeVibrationSpec.java +0 -35
  2725. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeWebSocketModuleSpec.java +0 -49
  2726. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/jni/FBReactNativeSpec-generated.cpp +0 -2492
  2727. package/ReactAndroid/src/main/java/com/facebook/fbreact/specs/jni/FBReactNativeSpec.h +0 -833
  2728. package/ReactAndroid/src/main/java/com/facebook/react/fabric/ComponentFactoryDelegate.java +0 -29
  2729. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.cpp +0 -31
  2730. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/ComponentFactoryDelegate.h +0 -40
  2731. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/NodeStateWrapper.cpp +0 -44
  2732. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/NodeStateWrapper.h +0 -36
  2733. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DeleteMountItem.java +0 -30
  2734. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/RemoveMountItem.java +0 -47
  2735. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/UpdateLocalDataMountItem.java +0 -46
  2736. package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/CameraRollManager.java +0 -530
  2737. package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageEditingManager.java +0 -525
  2738. package/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/BUCK +0 -25
  2739. package/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/DismissableTimePickerDialog.java +0 -50
  2740. package/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerDialogFragment.java +0 -100
  2741. package/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerDialogModule.java +0 -136
  2742. package/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerMode.java +0 -14
  2743. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTGroupShadowNode.java +0 -76
  2744. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTGroupViewManager.java +0 -19
  2745. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTRenderableViewManager.java +0 -84
  2746. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTShapeShadowNode.java +0 -320
  2747. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTShapeViewManager.java +0 -19
  2748. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTSurfaceView.java +0 -19
  2749. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTSurfaceViewManager.java +0 -75
  2750. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTSurfaceViewShadowNode.java +0 -155
  2751. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTTextShadowNode.java +0 -137
  2752. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTTextViewManager.java +0 -19
  2753. package/ReactAndroid/src/main/java/com/facebook/react/views/art/ARTVirtualNode.java +0 -109
  2754. package/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK +0 -21
  2755. package/ReactAndroid/src/main/java/com/facebook/react/views/art/PropHelper.java +0 -48
  2756. package/ReactAndroid/src/main/java/com/facebook/react/views/checkbox/BUCK +0 -25
  2757. package/ReactAndroid/src/main/java/com/facebook/react/views/checkbox/ReactCheckBox.java +0 -38
  2758. package/ReactAndroid/src/main/java/com/facebook/react/views/checkbox/ReactCheckBoxEvent.java +0 -53
  2759. package/ReactAndroid/src/main/java/com/facebook/react/views/checkbox/ReactCheckBoxManager.java +0 -137
  2760. package/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/BUCK +0 -30
  2761. package/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollEvent.java +0 -59
  2762. package/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollStateChangedEvent.java +0 -50
  2763. package/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageSelectedEvent.java +0 -50
  2764. package/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java +0 -260
  2765. package/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPagerManager.java +0 -175
  2766. package/ReactAndroid/src/main/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK +0 -165
  2767. package/ReactAndroid/src/main/third-party/java/robolectric3/robolectric/BUCK +0 -180
  2768. package/ReactCommon/config/BUCK +0 -46
  2769. package/ReactCommon/config/ReactNativeConfig.cpp +0 -40
  2770. package/ReactCommon/config/ReactNativeConfig.h +0 -44
  2771. package/ReactCommon/cxxreact/JSDeltaBundleClient.cpp +0 -100
  2772. package/ReactCommon/cxxreact/JSDeltaBundleClient.h +0 -51
  2773. package/ReactCommon/cxxreact/tests/JSDeltaBundleClientTest.cpp +0 -133
  2774. package/ReactCommon/fabric/attributedstring/AttributedString.cpp +0 -151
  2775. package/ReactCommon/fabric/attributedstring/AttributedString.h +0 -139
  2776. package/ReactCommon/fabric/attributedstring/AttributedStringBox.cpp +0 -65
  2777. package/ReactCommon/fabric/attributedstring/AttributedStringBox.h +0 -80
  2778. package/ReactCommon/fabric/attributedstring/BUCK +0 -83
  2779. package/ReactCommon/fabric/attributedstring/ParagraphAttributes.cpp +0 -52
  2780. package/ReactCommon/fabric/attributedstring/ParagraphAttributes.h +0 -88
  2781. package/ReactCommon/fabric/attributedstring/TextAttributes.cpp +0 -210
  2782. package/ReactCommon/fabric/attributedstring/TextAttributes.h +0 -133
  2783. package/ReactCommon/fabric/attributedstring/conversions.h +0 -631
  2784. package/ReactCommon/fabric/attributedstring/primitives.h +0 -163
  2785. package/ReactCommon/fabric/attributedstring/tests/AttributedStringTest.cpp +0 -50
  2786. package/ReactCommon/fabric/attributedstring/tests/ParagraphAttributesTest.cpp +0 -41
  2787. package/ReactCommon/fabric/attributedstring/tests/TextAttributesTest.cpp +0 -41
  2788. package/ReactCommon/fabric/components/activityindicator/BUCK +0 -79
  2789. package/ReactCommon/fabric/components/activityindicator/conversions.h +0 -41
  2790. package/ReactCommon/fabric/components/image/BUCK +0 -81
  2791. package/ReactCommon/fabric/components/image/ImageComponentDescriptor.h +0 -45
  2792. package/ReactCommon/fabric/components/image/ImageEventEmitter.cpp +0 -42
  2793. package/ReactCommon/fabric/components/image/ImageEventEmitter.h +0 -28
  2794. package/ReactCommon/fabric/components/image/ImageProps.cpp +0 -36
  2795. package/ReactCommon/fabric/components/image/ImageProps.h +0 -32
  2796. package/ReactCommon/fabric/components/image/ImageShadowNode.cpp +0 -86
  2797. package/ReactCommon/fabric/components/image/ImageShadowNode.h +0 -59
  2798. package/ReactCommon/fabric/components/image/ImageState.cpp +0 -22
  2799. package/ReactCommon/fabric/components/image/ImageState.h +0 -55
  2800. package/ReactCommon/fabric/components/image/conversions.h +0 -132
  2801. package/ReactCommon/fabric/components/image/tests/ImageTest.cpp +0 -14
  2802. package/ReactCommon/fabric/components/legacyviewmanagerinterop/BUCK +0 -53
  2803. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h +0 -38
  2804. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +0 -83
  2805. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp +0 -15
  2806. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h +0 -27
  2807. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h +0 -24
  2808. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.mm +0 -13
  2809. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.cpp +0 -20
  2810. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewEventEmitter.h +0 -33
  2811. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp +0 -19
  2812. package/ReactCommon/fabric/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h +0 -28
  2813. package/ReactCommon/fabric/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +0 -37
  2814. package/ReactCommon/fabric/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +0 -104
  2815. package/ReactCommon/fabric/components/modal/BUCK +0 -108
  2816. package/ReactCommon/fabric/components/modal/ModalHostViewComponentDescriptor.h +0 -50
  2817. package/ReactCommon/fabric/components/modal/ModalHostViewShadowNode.cpp +0 -19
  2818. package/ReactCommon/fabric/components/modal/ModalHostViewShadowNode.h +0 -39
  2819. package/ReactCommon/fabric/components/modal/ModalHostViewState.cpp +0 -21
  2820. package/ReactCommon/fabric/components/modal/ModalHostViewState.h +0 -49
  2821. package/ReactCommon/fabric/components/picker/BUCK +0 -96
  2822. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerComponentDescriptor.h +0 -21
  2823. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerEventEmitter.cpp +0 -23
  2824. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerEventEmitter.h +0 -27
  2825. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerProps.cpp +0 -28
  2826. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerProps.h +0 -77
  2827. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerShadowNode.cpp +0 -16
  2828. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDialogPickerShadowNode.h +0 -29
  2829. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerComponentDescriptor.h +0 -21
  2830. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerEventEmitter.cpp +0 -23
  2831. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerEventEmitter.h +0 -27
  2832. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerProps.cpp +0 -28
  2833. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerProps.h +0 -77
  2834. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerShadowNode.cpp +0 -17
  2835. package/ReactCommon/fabric/components/picker/androidpicker/AndroidDropdownPickerShadowNode.h +0 -29
  2836. package/ReactCommon/fabric/components/root/BUCK +0 -80
  2837. package/ReactCommon/fabric/components/root/RootComponentDescriptor.h +0 -19
  2838. package/ReactCommon/fabric/components/root/RootProps.cpp +0 -28
  2839. package/ReactCommon/fabric/components/root/RootProps.h +0 -35
  2840. package/ReactCommon/fabric/components/root/RootShadowNode.cpp +0 -50
  2841. package/ReactCommon/fabric/components/root/RootShadowNode.h +0 -53
  2842. package/ReactCommon/fabric/components/root/tests/RootShadowNodeTest.cpp +0 -14
  2843. package/ReactCommon/fabric/components/safeareaview/BUCK +0 -47
  2844. package/ReactCommon/fabric/components/safeareaview/SafeAreaViewComponentDescriptor.h +0 -48
  2845. package/ReactCommon/fabric/components/safeareaview/SafeAreaViewShadowNode.cpp +0 -16
  2846. package/ReactCommon/fabric/components/safeareaview/SafeAreaViewShadowNode.h +0 -35
  2847. package/ReactCommon/fabric/components/safeareaview/SafeAreaViewState.cpp +0 -12
  2848. package/ReactCommon/fabric/components/safeareaview/SafeAreaViewState.h +0 -26
  2849. package/ReactCommon/fabric/components/scrollview/BUCK +0 -84
  2850. package/ReactCommon/fabric/components/scrollview/RCTComponentViewHelpers.h +0 -95
  2851. package/ReactCommon/fabric/components/scrollview/ScrollViewComponentDescriptor.h +0 -20
  2852. package/ReactCommon/fabric/components/scrollview/ScrollViewEventEmitter.cpp +0 -99
  2853. package/ReactCommon/fabric/components/scrollview/ScrollViewEventEmitter.h +0 -52
  2854. package/ReactCommon/fabric/components/scrollview/ScrollViewProps.cpp +0 -252
  2855. package/ReactCommon/fabric/components/scrollview/ScrollViewProps.h +0 -58
  2856. package/ReactCommon/fabric/components/scrollview/ScrollViewShadowNode.cpp +0 -48
  2857. package/ReactCommon/fabric/components/scrollview/ScrollViewShadowNode.h +0 -42
  2858. package/ReactCommon/fabric/components/scrollview/ScrollViewState.cpp +0 -18
  2859. package/ReactCommon/fabric/components/scrollview/ScrollViewState.h +0 -45
  2860. package/ReactCommon/fabric/components/scrollview/conversions.h +0 -107
  2861. package/ReactCommon/fabric/components/scrollview/primitives.h +0 -20
  2862. package/ReactCommon/fabric/components/scrollview/tests/ScrollViewTest.cpp +0 -14
  2863. package/ReactCommon/fabric/components/slider/BUCK +0 -122
  2864. package/ReactCommon/fabric/components/slider/SliderComponentDescriptor.h +0 -59
  2865. package/ReactCommon/fabric/components/slider/SliderShadowNode.cpp +0 -100
  2866. package/ReactCommon/fabric/components/slider/SliderShadowNode.h +0 -74
  2867. package/ReactCommon/fabric/components/slider/SliderState.cpp +0 -46
  2868. package/ReactCommon/fabric/components/slider/SliderState.h +0 -81
  2869. package/ReactCommon/fabric/components/slider/platform/android/SliderMeasurementsManager.cpp +0 -68
  2870. package/ReactCommon/fabric/components/slider/platform/android/SliderMeasurementsManager.h +0 -40
  2871. package/ReactCommon/fabric/components/slider/platform/ios/SliderMeasurementsManager.cpp +0 -21
  2872. package/ReactCommon/fabric/components/slider/platform/ios/SliderMeasurementsManager.h +0 -33
  2873. package/ReactCommon/fabric/components/slider/tests/SliderTest.cpp +0 -14
  2874. package/ReactCommon/fabric/components/switch/BUCK +0 -97
  2875. package/ReactCommon/fabric/components/switch/androidswitch/AndroidSwitchComponentDescriptor.h +0 -52
  2876. package/ReactCommon/fabric/components/switch/androidswitch/AndroidSwitchMeasurementsManager.cpp +0 -68
  2877. package/ReactCommon/fabric/components/switch/androidswitch/AndroidSwitchMeasurementsManager.h +0 -33
  2878. package/ReactCommon/fabric/components/switch/androidswitch/AndroidSwitchShadowNode.cpp +0 -30
  2879. package/ReactCommon/fabric/components/switch/androidswitch/AndroidSwitchShadowNode.h +0 -45
  2880. package/ReactCommon/fabric/components/text/BUCK +0 -99
  2881. package/ReactCommon/fabric/components/text/basetext/BaseTextProps.cpp +0 -166
  2882. package/ReactCommon/fabric/components/text/basetext/BaseTextProps.h +0 -39
  2883. package/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.cpp +0 -78
  2884. package/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.h +0 -63
  2885. package/ReactCommon/fabric/components/text/paragraph/ParagraphComponentDescriptor.h +0 -57
  2886. package/ReactCommon/fabric/components/text/paragraph/ParagraphProps.cpp +0 -45
  2887. package/ReactCommon/fabric/components/text/paragraph/ParagraphProps.h +0 -52
  2888. package/ReactCommon/fabric/components/text/paragraph/ParagraphShadowNode.cpp +0 -221
  2889. package/ReactCommon/fabric/components/text/paragraph/ParagraphShadowNode.h +0 -106
  2890. package/ReactCommon/fabric/components/text/paragraph/ParagraphState.cpp +0 -23
  2891. package/ReactCommon/fabric/components/text/paragraph/ParagraphState.h +0 -64
  2892. package/ReactCommon/fabric/components/text/paragraph/conversions.h +0 -27
  2893. package/ReactCommon/fabric/components/text/rawtext/RawTextComponentDescriptor.h +0 -20
  2894. package/ReactCommon/fabric/components/text/rawtext/RawTextProps.cpp +0 -31
  2895. package/ReactCommon/fabric/components/text/rawtext/RawTextProps.h +0 -39
  2896. package/ReactCommon/fabric/components/text/rawtext/RawTextShadowNode.cpp +0 -16
  2897. package/ReactCommon/fabric/components/text/rawtext/RawTextShadowNode.h +0 -28
  2898. package/ReactCommon/fabric/components/text/tests/ParagraphLocalDataTest.cpp +0 -54
  2899. package/ReactCommon/fabric/components/text/tests/TextTest.cpp +0 -14
  2900. package/ReactCommon/fabric/components/text/text/TextComponentDescriptor.h +0 -19
  2901. package/ReactCommon/fabric/components/text/text/TextProps.cpp +0 -26
  2902. package/ReactCommon/fabric/components/text/text/TextProps.h +0 -32
  2903. package/ReactCommon/fabric/components/text/text/TextShadowNode.cpp +0 -16
  2904. package/ReactCommon/fabric/components/text/text/TextShadowNode.h +0 -61
  2905. package/ReactCommon/fabric/components/textinput/BUCK +0 -99
  2906. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputComponentDescriptor.h +0 -185
  2907. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputEventEmitter.cpp +0 -179
  2908. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputEventEmitter.h +0 -148
  2909. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputProps.cpp +0 -370
  2910. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputProps.h +0 -183
  2911. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputShadowNode.cpp +0 -197
  2912. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputShadowNode.h +0 -79
  2913. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputState.cpp +0 -30
  2914. package/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputState.h +0 -185
  2915. package/ReactCommon/fabric/components/textinput/iostextinput/BUCK +0 -99
  2916. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputComponentDescriptor.h +0 -46
  2917. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputEventEmitter.cpp +0 -126
  2918. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputEventEmitter.h +0 -56
  2919. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputProps.cpp +0 -92
  2920. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputProps.h +0 -68
  2921. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputShadowNode.cpp +0 -111
  2922. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputShadowNode.h +0 -76
  2923. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputState.cpp +0 -12
  2924. package/ReactCommon/fabric/components/textinput/iostextinput/TextInputState.h +0 -57
  2925. package/ReactCommon/fabric/components/textinput/iostextinput/conversions.h +0 -210
  2926. package/ReactCommon/fabric/components/textinput/iostextinput/primitives.h +0 -209
  2927. package/ReactCommon/fabric/components/textinput/iostextinput/propsConversions.h +0 -116
  2928. package/ReactCommon/fabric/components/unimplementedview/BUCK +0 -79
  2929. package/ReactCommon/fabric/components/unimplementedview/UnimplementedViewComponentDescriptor.cpp +0 -43
  2930. package/ReactCommon/fabric/components/unimplementedview/UnimplementedViewComponentDescriptor.h +0 -40
  2931. package/ReactCommon/fabric/components/unimplementedview/UnimplementedViewProps.cpp +0 -22
  2932. package/ReactCommon/fabric/components/unimplementedview/UnimplementedViewProps.h +0 -35
  2933. package/ReactCommon/fabric/components/unimplementedview/UnimplementedViewShadowNode.cpp +0 -16
  2934. package/ReactCommon/fabric/components/unimplementedview/UnimplementedViewShadowNode.h +0 -23
  2935. package/ReactCommon/fabric/components/view/BUCK +0 -87
  2936. package/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h +0 -111
  2937. package/ReactCommon/fabric/components/view/Touch.cpp +0 -36
  2938. package/ReactCommon/fabric/components/view/Touch.h +0 -89
  2939. package/ReactCommon/fabric/components/view/TouchEvent.cpp +0 -33
  2940. package/ReactCommon/fabric/components/view/TouchEvent.h +0 -55
  2941. package/ReactCommon/fabric/components/view/TouchEventEmitter.cpp +0 -83
  2942. package/ReactCommon/fabric/components/view/TouchEventEmitter.h +0 -40
  2943. package/ReactCommon/fabric/components/view/ViewComponentDescriptor.h +0 -19
  2944. package/ReactCommon/fabric/components/view/ViewEventEmitter.cpp +0 -62
  2945. package/ReactCommon/fabric/components/view/ViewEventEmitter.h +0 -46
  2946. package/ReactCommon/fabric/components/view/ViewProps.cpp +0 -201
  2947. package/ReactCommon/fabric/components/view/ViewProps.h +0 -79
  2948. package/ReactCommon/fabric/components/view/ViewShadowNode.cpp +0 -77
  2949. package/ReactCommon/fabric/components/view/ViewShadowNode.h +0 -40
  2950. package/ReactCommon/fabric/components/view/accessibility/AccessibilityPrimitives.h +0 -48
  2951. package/ReactCommon/fabric/components/view/accessibility/AccessibilityProps.cpp +0 -95
  2952. package/ReactCommon/fabric/components/view/accessibility/AccessibilityProps.h +0 -49
  2953. package/ReactCommon/fabric/components/view/accessibility/accessibilityPropsConversions.h +0 -113
  2954. package/ReactCommon/fabric/components/view/conversions.h +0 -710
  2955. package/ReactCommon/fabric/components/view/primitives.h +0 -181
  2956. package/ReactCommon/fabric/components/view/propsConversions.h +0 -332
  2957. package/ReactCommon/fabric/components/view/tests/ViewTest.cpp +0 -221
  2958. package/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +0 -519
  2959. package/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.h +0 -196
  2960. package/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp +0 -97
  2961. package/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h +0 -39
  2962. package/ReactCommon/fabric/core/BUCK +0 -118
  2963. package/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.cpp +0 -25
  2964. package/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h +0 -148
  2965. package/ReactCommon/fabric/core/componentdescriptor/ConcreteComponentDescriptor.h +0 -170
  2966. package/ReactCommon/fabric/core/conversions.h +0 -63
  2967. package/ReactCommon/fabric/core/events/BatchedEventQueue.cpp +0 -20
  2968. package/ReactCommon/fabric/core/events/BatchedEventQueue.h +0 -27
  2969. package/ReactCommon/fabric/core/events/EventBeat.cpp +0 -40
  2970. package/ReactCommon/fabric/core/events/EventBeat.h +0 -91
  2971. package/ReactCommon/fabric/core/events/EventDispatcher.cpp +0 -63
  2972. package/ReactCommon/fabric/core/events/EventDispatcher.h +0 -59
  2973. package/ReactCommon/fabric/core/events/EventEmitter.cpp +0 -104
  2974. package/ReactCommon/fabric/core/events/EventEmitter.h +0 -94
  2975. package/ReactCommon/fabric/core/events/EventHandler.h +0 -30
  2976. package/ReactCommon/fabric/core/events/EventPipe.h +0 -27
  2977. package/ReactCommon/fabric/core/events/EventPriority.h +0 -26
  2978. package/ReactCommon/fabric/core/events/EventQueue.cpp +0 -113
  2979. package/ReactCommon/fabric/core/events/EventQueue.h +0 -70
  2980. package/ReactCommon/fabric/core/events/EventTarget.cpp +0 -66
  2981. package/ReactCommon/fabric/core/events/EventTarget.h +0 -78
  2982. package/ReactCommon/fabric/core/events/RawEvent.cpp +0 -22
  2983. package/ReactCommon/fabric/core/events/RawEvent.h +0 -35
  2984. package/ReactCommon/fabric/core/events/UnbatchedEventQueue.cpp +0 -21
  2985. package/ReactCommon/fabric/core/events/UnbatchedEventQueue.h +0 -27
  2986. package/ReactCommon/fabric/core/events/ValueFactory.h +0 -20
  2987. package/ReactCommon/fabric/core/layout/LayoutConstraints.cpp +0 -22
  2988. package/ReactCommon/fabric/core/layout/LayoutConstraints.h +0 -57
  2989. package/ReactCommon/fabric/core/layout/LayoutContext.h +0 -61
  2990. package/ReactCommon/fabric/core/layout/LayoutMetrics.h +0 -65
  2991. package/ReactCommon/fabric/core/layout/LayoutPrimitives.h +0 -45
  2992. package/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp +0 -288
  2993. package/ReactCommon/fabric/core/layout/LayoutableShadowNode.h +0 -198
  2994. package/ReactCommon/fabric/core/primitives/RawProps.cpp +0 -94
  2995. package/ReactCommon/fabric/core/primitives/RawProps.h +0 -136
  2996. package/ReactCommon/fabric/core/primitives/RawPropsKey.cpp +0 -62
  2997. package/ReactCommon/fabric/core/primitives/RawPropsKey.h +0 -42
  2998. package/ReactCommon/fabric/core/primitives/RawPropsKeyMap.cpp +0 -106
  2999. package/ReactCommon/fabric/core/primitives/RawPropsKeyMap.h +0 -64
  3000. package/ReactCommon/fabric/core/primitives/RawPropsParser.cpp +0 -156
  3001. package/ReactCommon/fabric/core/primitives/RawPropsParser.h +0 -78
  3002. package/ReactCommon/fabric/core/primitives/RawPropsPrimitives.h +0 -53
  3003. package/ReactCommon/fabric/core/primitives/RawValue.cpp +0 -8
  3004. package/ReactCommon/fabric/core/primitives/RawValue.h +0 -281
  3005. package/ReactCommon/fabric/core/primitives/ReactPrimitives.h +0 -46
  3006. package/ReactCommon/fabric/core/primitives/Sealable.cpp +0 -67
  3007. package/ReactCommon/fabric/core/primitives/Sealable.h +0 -91
  3008. package/ReactCommon/fabric/core/propsConversions.h +0 -125
  3009. package/ReactCommon/fabric/core/shadownode/ConcreteShadowNode.h +0 -126
  3010. package/ReactCommon/fabric/core/shadownode/Props.cpp +0 -26
  3011. package/ReactCommon/fabric/core/shadownode/Props.h +0 -51
  3012. package/ReactCommon/fabric/core/shadownode/ShadowNode.cpp +0 -321
  3013. package/ReactCommon/fabric/core/shadownode/ShadowNode.h +0 -239
  3014. package/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.cpp +0 -134
  3015. package/ReactCommon/fabric/core/shadownode/ShadowNodeFamily.h +0 -137
  3016. package/ReactCommon/fabric/core/shadownode/ShadowNodeFamilyFragment.h +0 -29
  3017. package/ReactCommon/fabric/core/shadownode/ShadowNodeFragment.cpp +0 -41
  3018. package/ReactCommon/fabric/core/shadownode/ShadowNodeFragment.h +0 -67
  3019. package/ReactCommon/fabric/core/shadownode/ShadowNodeTraits.cpp +0 -12
  3020. package/ReactCommon/fabric/core/shadownode/ShadowNodeTraits.h +0 -94
  3021. package/ReactCommon/fabric/core/state/ConcreteState.h +0 -112
  3022. package/ReactCommon/fabric/core/state/State.cpp +0 -40
  3023. package/ReactCommon/fabric/core/state/State.h +0 -105
  3024. package/ReactCommon/fabric/core/state/StateData.h +0 -34
  3025. package/ReactCommon/fabric/core/state/StatePipe.h +0 -20
  3026. package/ReactCommon/fabric/core/state/StateUpdate.cpp +0 -8
  3027. package/ReactCommon/fabric/core/state/StateUpdate.h +0 -30
  3028. package/ReactCommon/fabric/core/tests/ComponentDescriptorTest.cpp +0 -129
  3029. package/ReactCommon/fabric/core/tests/FindNodeAtPointTest.cpp +0 -119
  3030. package/ReactCommon/fabric/core/tests/LayoutableShadowNodeTest.cpp +0 -206
  3031. package/ReactCommon/fabric/core/tests/PrimitivesTest.cpp +0 -41
  3032. package/ReactCommon/fabric/core/tests/RawPropsTest.cpp +0 -307
  3033. package/ReactCommon/fabric/core/tests/ShadowNodeFamilyTest.cpp +0 -79
  3034. package/ReactCommon/fabric/core/tests/ShadowNodeTest.cpp +0 -292
  3035. package/ReactCommon/fabric/core/tests/TestComponent.h +0 -67
  3036. package/ReactCommon/fabric/core/tests/benchmarks/RawPropsBenchmark.cpp +0 -80
  3037. package/ReactCommon/fabric/core/tests/traitCastTest.cpp +0 -105
  3038. package/ReactCommon/fabric/debug/BUCK +0 -79
  3039. package/ReactCommon/fabric/debug/DebugStringConvertible.cpp +0 -154
  3040. package/ReactCommon/fabric/debug/DebugStringConvertible.h +0 -364
  3041. package/ReactCommon/fabric/debug/DebugStringConvertibleItem.cpp +0 -43
  3042. package/ReactCommon/fabric/debug/DebugStringConvertibleItem.h +0 -47
  3043. package/ReactCommon/fabric/debug/SystraceSection.h +0 -51
  3044. package/ReactCommon/fabric/debug/debugStringConvertibleUtils.h +0 -66
  3045. package/ReactCommon/fabric/debug/tests/DebugStringConvertibleTest.cpp +0 -84
  3046. package/ReactCommon/fabric/element/BUCK +0 -85
  3047. package/ReactCommon/fabric/element/ComponentBuilder.cpp +0 -59
  3048. package/ReactCommon/fabric/element/ComponentBuilder.h +0 -59
  3049. package/ReactCommon/fabric/element/Element.cpp +0 -10
  3050. package/ReactCommon/fabric/element/Element.h +0 -160
  3051. package/ReactCommon/fabric/element/ElementFragment.cpp +0 -10
  3052. package/ReactCommon/fabric/element/ElementFragment.h +0 -61
  3053. package/ReactCommon/fabric/element/testUtils.h +0 -46
  3054. package/ReactCommon/fabric/element/tests/ElementTest.cpp +0 -102
  3055. package/ReactCommon/fabric/graphics/BUCK +0 -123
  3056. package/ReactCommon/fabric/graphics/ColorComponents.h +0 -21
  3057. package/ReactCommon/fabric/graphics/Geometry.h +0 -307
  3058. package/ReactCommon/fabric/graphics/React-graphics.podspec +0 -41
  3059. package/ReactCommon/fabric/graphics/Transform.cpp +0 -220
  3060. package/ReactCommon/fabric/graphics/Transform.h +0 -124
  3061. package/ReactCommon/fabric/graphics/conversions.h +0 -212
  3062. package/ReactCommon/fabric/graphics/platform/cxx/Color.cpp +0 -47
  3063. package/ReactCommon/fabric/graphics/platform/cxx/Color.h +0 -78
  3064. package/ReactCommon/fabric/graphics/platform/cxx/Float.h +0 -22
  3065. package/ReactCommon/fabric/graphics/platform/ios/Color.cpp +0 -55
  3066. package/ReactCommon/fabric/graphics/platform/ios/Color.h +0 -30
  3067. package/ReactCommon/fabric/graphics/platform/ios/Float.h +0 -23
  3068. package/ReactCommon/fabric/graphics/rounding.h +0 -82
  3069. package/ReactCommon/fabric/graphics/tests/GraphicsTest.cpp +0 -14
  3070. package/ReactCommon/fabric/graphics/tests/TransformTest.cpp +0 -68
  3071. package/ReactCommon/fabric/imagemanager/BUCK +0 -129
  3072. package/ReactCommon/fabric/imagemanager/ImageInstrumentation.h +0 -40
  3073. package/ReactCommon/fabric/imagemanager/ImageManager.h +0 -40
  3074. package/ReactCommon/fabric/imagemanager/ImageRequest.h +0 -108
  3075. package/ReactCommon/fabric/imagemanager/ImageResponse.cpp +0 -21
  3076. package/ReactCommon/fabric/imagemanager/ImageResponse.h +0 -35
  3077. package/ReactCommon/fabric/imagemanager/ImageResponseObserver.h +0 -29
  3078. package/ReactCommon/fabric/imagemanager/ImageResponseObserverCoordinator.cpp +0 -89
  3079. package/ReactCommon/fabric/imagemanager/ImageResponseObserverCoordinator.h +0 -83
  3080. package/ReactCommon/fabric/imagemanager/platform/cxx/ImageManager.cpp +0 -31
  3081. package/ReactCommon/fabric/imagemanager/platform/cxx/ImageRequest.cpp +0 -54
  3082. package/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm +0 -45
  3083. package/ReactCommon/fabric/imagemanager/platform/ios/ImageRequest.cpp +0 -61
  3084. package/ReactCommon/fabric/imagemanager/platform/ios/RCTImageInstrumentationProxy.h +0 -40
  3085. package/ReactCommon/fabric/imagemanager/platform/ios/RCTImageInstrumentationProxy.mm +0 -81
  3086. package/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.h +0 -28
  3087. package/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm +0 -111
  3088. package/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManagerProtocol.h +0 -16
  3089. package/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +0 -113
  3090. package/ReactCommon/fabric/imagemanager/platform/ios/RCTSyncImageManager.h +0 -28
  3091. package/ReactCommon/fabric/imagemanager/platform/ios/RCTSyncImageManager.mm +0 -98
  3092. package/ReactCommon/fabric/imagemanager/primitives.h +0 -48
  3093. package/ReactCommon/fabric/imagemanager/tests/ImageManagerTest.cpp +0 -18
  3094. package/ReactCommon/fabric/mapbuffer/BUCK +0 -67
  3095. package/ReactCommon/fabric/mapbuffer/MapBuffer.cpp +0 -18
  3096. package/ReactCommon/fabric/mapbuffer/MapBuffer.h +0 -37
  3097. package/ReactCommon/fabric/mapbuffer/tests/MapBufferTest.cpp +0 -14
  3098. package/ReactCommon/fabric/mounting/BUCK +0 -85
  3099. package/ReactCommon/fabric/mounting/Differentiator.cpp +0 -739
  3100. package/ReactCommon/fabric/mounting/Differentiator.h +0 -36
  3101. package/ReactCommon/fabric/mounting/MountingCoordinator.cpp +0 -124
  3102. package/ReactCommon/fabric/mounting/MountingCoordinator.h +0 -101
  3103. package/ReactCommon/fabric/mounting/MountingTelemetry.cpp +0 -117
  3104. package/ReactCommon/fabric/mounting/MountingTelemetry.h +0 -64
  3105. package/ReactCommon/fabric/mounting/MountingTransaction.cpp +0 -46
  3106. package/ReactCommon/fabric/mounting/MountingTransaction.h +0 -87
  3107. package/ReactCommon/fabric/mounting/MountingTransactionMetadata.cpp +0 -12
  3108. package/ReactCommon/fabric/mounting/MountingTransactionMetadata.h +0 -31
  3109. package/ReactCommon/fabric/mounting/ShadowTree.cpp +0 -258
  3110. package/ReactCommon/fabric/mounting/ShadowTree.h +0 -94
  3111. package/ReactCommon/fabric/mounting/ShadowTreeDelegate.h +0 -33
  3112. package/ReactCommon/fabric/mounting/ShadowTreeRegistry.cpp +0 -64
  3113. package/ReactCommon/fabric/mounting/ShadowTreeRegistry.h +0 -69
  3114. package/ReactCommon/fabric/mounting/ShadowTreeRevision.cpp +0 -34
  3115. package/ReactCommon/fabric/mounting/ShadowTreeRevision.h +0 -62
  3116. package/ReactCommon/fabric/mounting/ShadowView.cpp +0 -81
  3117. package/ReactCommon/fabric/mounting/ShadowView.h +0 -93
  3118. package/ReactCommon/fabric/mounting/ShadowViewMutation.cpp +0 -123
  3119. package/ReactCommon/fabric/mounting/ShadowViewMutation.h +0 -88
  3120. package/ReactCommon/fabric/mounting/TreeStateReconciliation.cpp +0 -94
  3121. package/ReactCommon/fabric/mounting/TreeStateReconciliation.h +0 -33
  3122. package/ReactCommon/fabric/mounting/stubs/StubView.cpp +0 -65
  3123. package/ReactCommon/fabric/mounting/stubs/StubView.h +0 -57
  3124. package/ReactCommon/fabric/mounting/stubs/StubViewTree.cpp +0 -111
  3125. package/ReactCommon/fabric/mounting/stubs/StubViewTree.h +0 -36
  3126. package/ReactCommon/fabric/mounting/stubs/stubs.cpp +0 -62
  3127. package/ReactCommon/fabric/mounting/stubs/stubs.h +0 -20
  3128. package/ReactCommon/fabric/mounting/tests/Entropy.h +0 -131
  3129. package/ReactCommon/fabric/mounting/tests/MountingTelemetryTest.cpp +0 -103
  3130. package/ReactCommon/fabric/mounting/tests/MountingTest.cpp +0 -325
  3131. package/ReactCommon/fabric/mounting/tests/ShadowTreeLifeCycleTest.cpp +0 -181
  3132. package/ReactCommon/fabric/mounting/tests/shadowTreeGeneration.h +0 -259
  3133. package/ReactCommon/fabric/textlayoutmanager/BUCK +0 -157
  3134. package/ReactCommon/fabric/textlayoutmanager/TextMeasureCache.cpp +0 -12
  3135. package/ReactCommon/fabric/textlayoutmanager/TextMeasureCache.h +0 -195
  3136. package/ReactCommon/fabric/textlayoutmanager/platform/android/TextLayoutManager.cpp +0 -123
  3137. package/ReactCommon/fabric/textlayoutmanager/platform/android/TextLayoutManager.h +0 -58
  3138. package/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.cpp +0 -27
  3139. package/ReactCommon/fabric/textlayoutmanager/platform/cxx/TextLayoutManager.h +0 -55
  3140. package/ReactCommon/fabric/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +0 -20
  3141. package/ReactCommon/fabric/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.m +0 -117
  3142. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +0 -41
  3143. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +0 -283
  3144. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTFontProperties.h +0 -38
  3145. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTFontUtils.h +0 -19
  3146. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTFontUtils.mm +0 -166
  3147. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +0 -43
  3148. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm +0 -182
  3149. package/ReactCommon/fabric/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +0 -102
  3150. package/ReactCommon/fabric/textlayoutmanager/platform/ios/TextLayoutManager.h +0 -54
  3151. package/ReactCommon/fabric/textlayoutmanager/platform/ios/TextLayoutManager.mm +0 -67
  3152. package/ReactCommon/fabric/textlayoutmanager/tests/TextLayoutManagerTest.cpp +0 -18
  3153. package/ReactCommon/fabric/uimanager/BUCK +0 -93
  3154. package/ReactCommon/fabric/uimanager/ComponentDescriptorFactory.h +0 -34
  3155. package/ReactCommon/fabric/uimanager/ComponentDescriptorProvider.h +0 -73
  3156. package/ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.cpp +0 -84
  3157. package/ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.h +0 -71
  3158. package/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.cpp +0 -210
  3159. package/ReactCommon/fabric/uimanager/ComponentDescriptorRegistry.h +0 -89
  3160. package/ReactCommon/fabric/uimanager/Scheduler.cpp +0 -344
  3161. package/ReactCommon/fabric/uimanager/Scheduler.h +0 -118
  3162. package/ReactCommon/fabric/uimanager/SchedulerDelegate.h +0 -62
  3163. package/ReactCommon/fabric/uimanager/SchedulerToolbox.cpp +0 -8
  3164. package/ReactCommon/fabric/uimanager/SchedulerToolbox.h +0 -49
  3165. package/ReactCommon/fabric/uimanager/UIManager.cpp +0 -294
  3166. package/ReactCommon/fabric/uimanager/UIManager.h +0 -128
  3167. package/ReactCommon/fabric/uimanager/UIManagerBinding.cpp +0 -605
  3168. package/ReactCommon/fabric/uimanager/UIManagerBinding.h +0 -88
  3169. package/ReactCommon/fabric/uimanager/UIManagerDelegate.h +0 -62
  3170. package/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp +0 -155
  3171. package/ReactCommon/fabric/uimanager/UITemplateProcessor.h +0 -66
  3172. package/ReactCommon/fabric/uimanager/primitives.h +0 -101
  3173. package/ReactCommon/fabric/uimanager/tests/FabricUIManagerTest.cpp +0 -17
  3174. package/ReactCommon/fabric/uimanager/tests/UITemplateProcessorTest.cpp +0 -168
  3175. package/ReactCommon/turbomodule/core/BUCK +0 -86
  3176. package/ReactCommon/turbomodule/core/LongLivedObject.cpp +0 -52
  3177. package/ReactCommon/turbomodule/core/LongLivedObject.h +0 -56
  3178. package/ReactCommon/turbomodule/core/TurboCxxModule.cpp +0 -207
  3179. package/ReactCommon/turbomodule/core/TurboCxxModule.h +0 -49
  3180. package/ReactCommon/turbomodule/core/TurboModule.cpp +0 -44
  3181. package/ReactCommon/turbomodule/core/TurboModule.h +0 -71
  3182. package/ReactCommon/turbomodule/core/TurboModuleBinding.cpp +0 -82
  3183. package/ReactCommon/turbomodule/core/TurboModuleBinding.h +0 -56
  3184. package/ReactCommon/turbomodule/core/TurboModuleUtils.cpp +0 -105
  3185. package/ReactCommon/turbomodule/core/TurboModuleUtils.h +0 -89
  3186. package/ReactCommon/turbomodule/core/platform/android/JavaTurboModule.cpp +0 -647
  3187. package/ReactCommon/turbomodule/core/platform/android/JavaTurboModule.h +0 -64
  3188. package/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h +0 -229
  3189. package/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.mm +0 -706
  3190. package/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.h +0 -56
  3191. package/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm +0 -648
  3192. package/ReactCommon/turbomodule/samples/BUCK +0 -79
  3193. package/ReactCommon/turbomodule/samples/NativeSampleTurboCxxModuleSpecJSI.cpp +0 -141
  3194. package/ReactCommon/turbomodule/samples/NativeSampleTurboCxxModuleSpecJSI.h +0 -43
  3195. package/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp +0 -94
  3196. package/ReactCommon/turbomodule/samples/SampleTurboCxxModule.h +0 -44
  3197. package/ReactCommon/turbomodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h +0 -53
  3198. package/ReactCommon/turbomodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.mm +0 -136
  3199. package/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.h +0 -27
  3200. package/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.mm +0 -42
  3201. package/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboModule.h +0 -18
  3202. package/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboModule.mm +0 -137
  3203. package/ReactCommon/turbomodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.cpp +0 -148
  3204. package/ReactCommon/turbomodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.h +0 -45
  3205. package/ReactCommon/utils/BUCK +0 -63
  3206. package/ReactCommon/utils/ContextContainer.h +0 -133
  3207. package/ReactCommon/utils/FloatComparison.h +0 -19
  3208. package/ReactCommon/utils/ManagedObjectWrapper.h +0 -66
  3209. package/ReactCommon/utils/ManagedObjectWrapper.mm +0 -17
  3210. package/ReactCommon/utils/RuntimeExecutor.h +0 -109
  3211. package/ReactCommon/utils/SharedFunction.h +0 -62
  3212. package/ReactCommon/utils/SimpleThreadSafeCache.h +0 -75
  3213. package/ReactCommon/utils/Telemetry.h +0 -65
  3214. package/flow/fbjs.js +0 -258
  3215. package/template/_gitattributes +0 -1
  3216. package/template/ios/HelloWorld-tvOS/Info.plist +0 -53
  3217. package/template/ios/HelloWorld-tvOSTests/Info.plist +0 -24
  3218. package/template/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld-tvOS.xcscheme +0 -88
@@ -1,2431 +1,2282 @@
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
- * @flow
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- const Batchinator = require('../Interaction/Batchinator');
14
- const FillRateHelper = require('./FillRateHelper');
15
- const Platform = require('../Utilities/Platform'); // TODO(macOS ISS#2323203)
16
- const PropTypes = require('prop-types');
17
- const React = require('react');
18
- const ReactNative = require('../Renderer/shims/ReactNative');
19
- const RefreshControl = require('../Components/RefreshControl/RefreshControl');
20
- const ScrollView = require('../Components/ScrollView/ScrollView');
21
- const StyleSheet = require('../StyleSheet/StyleSheet');
22
- const View = require('../Components/View/View');
23
- const ViewabilityHelper = require('./ViewabilityHelper');
24
-
25
- const flattenStyle = require('../StyleSheet/flattenStyle');
26
- const infoLog = require('../Utilities/infoLog');
27
- const invariant = require('invariant');
28
- const warning = require('fbjs/lib/warning');
29
-
30
- const {computeWindowedRenderLimits} = require('./VirtualizeUtils');
31
-
32
- import type {ScrollResponderType} from '../Components/ScrollView/ScrollView';
33
- import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
34
- import type {
35
- ViewabilityConfig,
36
- ViewToken,
37
- ViewabilityConfigCallbackPair,
38
- } from './ViewabilityHelper';
39
- import type {ScrollEvent} from '../Types/CoreEventTypes'; // TODO(macOS ISS#2323203)
40
-
41
- type Item = any;
42
-
43
- export type Separators = {
44
- highlight: () => void,
45
- unhighlight: () => void,
46
- updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,
47
- ...
48
- };
49
-
50
- export type RenderItemProps<ItemT> = {
51
- item: ItemT,
52
- index: number,
53
- isSelected: ?boolean, // TODO(macOS ISS#2323203)
54
- separators: Separators,
55
- ...
56
- };
57
-
58
- export type RenderItemType<ItemT> = (
59
- info: RenderItemProps<ItemT>,
60
- ) => React.Node;
61
-
62
- type ViewabilityHelperCallbackTuple = {
63
- viewabilityHelper: ViewabilityHelper,
64
- onViewableItemsChanged: (info: {
65
- viewableItems: Array<ViewToken>,
66
- changed: Array<ViewToken>,
67
- ...
68
- }) => void,
69
- ...
70
- };
71
-
72
- // [TODO(macOS ISS#2323203)
73
- export type SelectedRowIndexPathType = {
74
- sectionIndex: number,
75
- rowIndex: number,
76
- }; // ]TODO(macOS ISS#2323203)
77
-
78
- type RequiredProps = {|
79
- /**
80
- * The default accessor functions assume this is an Array<{key: string} | {id: string}> but you can override
81
- * getItem, getItemCount, and keyExtractor to handle any type of index-based data.
82
- */
83
- data?: any,
84
- /**
85
- * A generic accessor for extracting an item from any sort of data blob.
86
- */
87
- getItem: (data: any, index: number) => ?Item,
88
- /**
89
- * Determines how many items are in the data blob.
90
- */
91
- getItemCount: (data: any) => number,
92
- |};
93
- type OptionalProps = {|
94
- renderItem?: ?RenderItemType<Item>,
95
- /**
96
- * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and
97
- * implementation, but with a significant perf hit.
98
- */
99
- debug?: ?boolean,
100
- /**
101
- * DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully
102
- * unmounts react instances that are outside of the render window. You should only need to disable
103
- * this for debugging purposes.
104
- */
105
- disableVirtualization?: ?boolean,
106
- /**
107
- * Handles key down events and updates selection based on the key event
108
- *
109
- * @platform macos
110
- */
111
- enableSelectionOnKeyPress?: ?boolean, // TODO(macOS ISS#2323203)
112
- /**
113
- * A marker property for telling the list to re-render (since it implements `PureComponent`). If
114
- * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
115
- * `data` prop, stick it here and treat it immutably.
116
- */
117
- extraData?: any,
118
- // e.g. height, y
119
- getItemLayout?: (
120
- data: any,
121
- index: number,
122
- ) => {
123
- length: number,
124
- offset: number,
125
- index: number,
126
- ...
127
- },
128
- horizontal?: ?boolean,
129
- /**
130
- * How many items to render in the initial batch. This should be enough to fill the screen but not
131
- * much more. Note these items will never be unmounted as part of the windowed rendering in order
132
- * to improve perceived performance of scroll-to-top actions.
133
- */
134
- initialNumToRender: number,
135
- /**
136
- * Instead of starting at the top with the first item, start at `initialScrollIndex`. This
137
- * disables the "scroll to top" optimization that keeps the first `initialNumToRender` items
138
- * always rendered and immediately renders the items starting at this initial index. Requires
139
- * `getItemLayout` to be implemented.
140
- */
141
- initialScrollIndex?: ?number,
142
- /**
143
- * Reverses the direction of scroll. Uses scale transforms of -1.
144
- */
145
- inverted?: ?boolean,
146
- keyExtractor: (item: Item, index: number) => string,
147
- /**
148
- * Each cell is rendered using this element. Can be a React Component Class,
149
- * or a render function. Defaults to using View.
150
- */
151
- CellRendererComponent?: ?React.ComponentType<any>,
152
- /**
153
- * Rendered in between each item, but not at the top or bottom. By default, `highlighted` and
154
- * `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight`
155
- * which will update the `highlighted` prop, but you can also add custom props with
156
- * `separators.updateProps`.
157
- */
158
- ItemSeparatorComponent?: ?React.ComponentType<any>,
159
- /**
160
- * Takes an item from `data` and renders it into the list. Example usage:
161
- *
162
- * <FlatList
163
- * ItemSeparatorComponent={Platform.OS !== 'android' && ({highlighted}) => (
164
- * <View style={[style.separator, highlighted && {marginLeft: 0}]} />
165
- * )}
166
- * data={[{title: 'Title Text', key: 'item1'}]}
167
- * ListItemComponent={({item, separators}) => (
168
- * <TouchableHighlight
169
- * onPress={() => this._onPress(item)}
170
- * onShowUnderlay={separators.highlight}
171
- * onHideUnderlay={separators.unhighlight}>
172
- * <View style={{backgroundColor: 'white'}}>
173
- * <Text>{item.title}</Text>
174
- * </View>
175
- * </TouchableHighlight>
176
- * )}
177
- * />
178
- *
179
- * Provides additional metadata like `index` if you need it, as well as a more generic
180
- * `separators.updateProps` function which let's you set whatever props you want to change the
181
- * rendering of either the leading separator or trailing separator in case the more common
182
- * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for
183
- * your use-case.
184
- */
185
- ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
186
- /**
187
- * Rendered when the list is empty. Can be a React Component Class, a render function, or
188
- * a rendered element.
189
- */
190
- ListEmptyComponent?: ?(React.ComponentType<any> | React.Element<any>),
191
- /**
192
- * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or
193
- * a rendered element.
194
- */
195
- ListFooterComponent?: ?(React.ComponentType<any> | React.Element<any>),
196
- /**
197
- * Styling for internal View for ListFooterComponent
198
- */
199
- ListFooterComponentStyle?: ViewStyleProp,
200
- /**
201
- * Rendered at the top of all the items. Can be a React Component Class, a render function, or
202
- * a rendered element.
203
- */
204
- ListHeaderComponent?: ?(React.ComponentType<any> | React.Element<any>),
205
- /**
206
- * Styling for internal View for ListHeaderComponent
207
- */
208
- ListHeaderComponentStyle?: ViewStyleProp,
209
- /**
210
- * A unique identifier for this list. If there are multiple VirtualizedLists at the same level of
211
- * nesting within another VirtualizedList, this key is necessary for virtualization to
212
- * work properly.
213
- */
214
- listKey?: string,
215
- /**
216
- * The maximum number of items to render in each incremental render batch. The more rendered at
217
- * once, the better the fill rate, but responsiveness may suffer because rendering content may
218
- * interfere with responding to button taps or other interactions.
219
- */
220
- maxToRenderPerBatch: number,
221
- /**
222
- * Called once when the scroll position gets within `onEndReachedThreshold` of the rendered
223
- * content.
224
- */
225
- onEndReached?: ?(info: {distanceFromEnd: number, ...}) => void,
226
- /**
227
- * How far from the end (in units of visible length of the list) the bottom edge of the
228
- * list must be from the end of the content to trigger the `onEndReached` callback.
229
- * Thus a value of 0.5 will trigger `onEndReached` when the end of the content is
230
- * within half the visible length of the list.
231
- */
232
- onEndReachedThreshold?: ?number,
233
- /**
234
- * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make
235
- * sure to also set the `refreshing` prop correctly.
236
- */
237
- onRefresh?: ?() => void,
238
- /**
239
- * Used to handle failures when scrolling to an index that has not been measured yet. Recommended
240
- * action is to either compute your own offset and `scrollTo` it, or scroll as far as possible and
241
- * then try again after more items have been rendered.
242
- */
243
- onScrollToIndexFailed?: ?(info: {
244
- index: number,
245
- highestMeasuredFrameIndex: number,
246
- averageItemLength: number,
247
- ...
248
- }) => void,
249
- /**
250
- * If provided, will be invoked whenever the selection on the list changes. Make sure to set
251
- * the property enableSelectionOnKeyPress to true to change selection via keyboard (macOS).
252
- *
253
- * @platform macos
254
- */
255
- onSelectionChanged?: ?(info: {
256
- previousSelection: number,
257
- newSelection: number,
258
- item: ?Item,
259
- }) => void, // TODO(macOS ISS#2323203)
260
- /**
261
- * If provided, called when 'Enter' key is pressed on an item.
262
- *
263
- * @platform macos
264
- */
265
- onSelectionEntered?: ?(item: ?Item) => void, // TODO(macOS ISS#2323203)
266
-
267
- sectionIndex?: number, // TODO(macOS ISS#2323203)
268
- rowIndex?: number, // TODO(macOS ISS#2323203)
269
-
270
- /**
271
- * Called when the viewability of rows changes, as defined by the
272
- * `viewabilityConfig` prop.
273
- */
274
- onViewableItemsChanged?: ?(info: {
275
- viewableItems: Array<ViewToken>,
276
- changed: Array<ViewToken>,
277
- ...
278
- }) => void,
279
- persistentScrollbar?: ?boolean,
280
- /**
281
- * Set this when offset is needed for the loading indicator to show correctly.
282
- * @platform android
283
- */
284
- progressViewOffset?: number,
285
- /**
286
- * A custom refresh control element. When set, it overrides the default
287
- * <RefreshControl> component built internally. The onRefresh and refreshing
288
- * props are also ignored. Only works for vertical VirtualizedList.
289
- */
290
- refreshControl?: ?React.Element<any>,
291
- /**
292
- * Set this true while waiting for new data from a refresh.
293
- */
294
- refreshing?: ?boolean,
295
- /**
296
- * Note: may have bugs (missing content) in some circumstances - use at your own risk.
297
- *
298
- * This may improve scroll performance for large lists.
299
- */
300
- removeClippedSubviews?: boolean,
301
- /**
302
- * Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
303
- */
304
- renderScrollComponent?: (props: Object) => React.Element<any>,
305
- /**
306
- * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
307
- * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
308
- */
309
- updateCellsBatchingPeriod: number,
310
- /**
311
- * See `ViewabilityHelper` for flow type and further documentation.
312
- */
313
- viewabilityConfig?: ViewabilityConfig,
314
- /**
315
- * List of ViewabilityConfig/onViewableItemsChanged pairs. A specific onViewableItemsChanged
316
- * will be called when its corresponding ViewabilityConfig's conditions are met.
317
- */
318
- viewabilityConfigCallbackPairs?: Array<ViewabilityConfigCallbackPair>,
319
- /**
320
- * Determines the maximum number of items rendered outside of the visible area, in units of
321
- * visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will
322
- * render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing
323
- * this number will reduce memory consumption and may improve performance, but will increase the
324
- * chance that fast scrolling may reveal momentary blank areas of unrendered content.
325
- */
326
- windowSize: number,
327
- /**
328
- * The legacy implementation is no longer supported.
329
- */
330
- legacyImplementation?: empty,
331
- |};
332
-
333
- type Props = {|
334
- ...React.ElementConfig<typeof ScrollView>,
335
- ...RequiredProps,
336
- ...OptionalProps,
337
- |};
338
-
339
- type DefaultProps = {|
340
- disableVirtualization: boolean,
341
- horizontal: boolean,
342
- initialNumToRender: number,
343
- keyExtractor: (item: Item, index: number) => string,
344
- maxToRenderPerBatch: number,
345
- onEndReachedThreshold: number,
346
- scrollEventThrottle: number,
347
- updateCellsBatchingPeriod: number,
348
- windowSize: number,
349
- |};
350
-
351
- let _usedIndexForKey = false;
352
- let _keylessItemComponentName: string = '';
353
-
354
- type Frame = {
355
- offset: number,
356
- length: number,
357
- index: number,
358
- inLayout: boolean,
359
- ...
360
- };
361
-
362
- type ChildListState = {
363
- first: number,
364
- last: number,
365
- frames: {[key: number]: Frame, ...},
366
- ...
367
- };
368
-
369
- type State = {
370
- first: number,
371
- last: number,
372
- selectedRowIndex: number, // TODO(macOS ISS#2323203)
373
- ...
374
- };
375
-
376
- // Data propagated through nested lists (regardless of orientation) that is
377
- // useful for producing diagnostics for usage errors involving nesting (e.g
378
- // missing/duplicate keys).
379
- type ListDebugInfo = {
380
- cellKey: string,
381
- listKey: string,
382
- parent: ?ListDebugInfo,
383
- // We include all ancestors regardless of orientation, so this is not always
384
- // identical to the child's orientation.
385
- horizontal: boolean,
386
- };
387
-
388
- /**
389
- * Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist.html)
390
- * and [`<SectionList>`](https://reactnative.dev/docs/sectionlist.html) components, which are also better
391
- * documented. In general, this should only really be used if you need more flexibility than
392
- * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.
393
- *
394
- * Virtualization massively improves memory consumption and performance of large lists by
395
- * maintaining a finite render window of active items and replacing all items outside of the render
396
- * window with appropriately sized blank space. The window adapts to scrolling behavior, and items
397
- * are rendered incrementally with low-pri (after any running interactions) if they are far from the
398
- * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.
399
- *
400
- * Some caveats:
401
- *
402
- * - Internal state is not preserved when content scrolls out of the render window. Make sure all
403
- * your data is captured in the item data or external stores like Flux, Redux, or Relay.
404
- * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-
405
- * equal. Make sure that everything your `renderItem` function depends on is passed as a prop
406
- * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on
407
- * changes. This includes the `data` prop and parent component state.
408
- * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously
409
- * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see
410
- * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,
411
- * and we are working on improving it behind the scenes.
412
- * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.
413
- * Alternatively, you can provide a custom `keyExtractor` prop.
414
- *
415
- */
416
- class VirtualizedList extends React.PureComponent<Props, State> {
417
- props: Props;
418
-
419
- // scrollToEnd may be janky without getItemLayout prop
420
- scrollToEnd(params?: ?{animated?: ?boolean, ...}) {
421
- const animated = params ? params.animated : true;
422
- const veryLast = this.props.getItemCount(this.props.data) - 1;
423
- const frame = this._getFrameMetricsApprox(veryLast);
424
- const offset = Math.max(
425
- 0,
426
- frame.offset +
427
- frame.length +
428
- this._footerLength -
429
- this._scrollMetrics.visibleLength,
430
- );
431
-
432
- if (this._scrollRef == null) {
433
- return;
434
- }
435
-
436
- if (this._scrollRef.scrollTo == null) {
437
- console.warn(
438
- 'No scrollTo method provided. This may be because you have two nested ' +
439
- 'VirtualizedLists with the same orientation, or because you are ' +
440
- 'using a custom component that does not implement scrollTo.',
441
- );
442
- return;
443
- }
444
-
445
- this._scrollRef.scrollTo(
446
- this.props.horizontal ? {x: offset, animated} : {y: offset, animated},
447
- );
448
- }
449
-
450
- // scrollToIndex may be janky without getItemLayout prop
451
- scrollToIndex(params: {
452
- animated?: ?boolean,
453
- index: number,
454
- viewOffset?: number,
455
- viewPosition?: number,
456
- ...
457
- }) {
458
- const {
459
- data,
460
- horizontal,
461
- getItemCount,
462
- getItemLayout,
463
- onScrollToIndexFailed,
464
- } = this.props;
465
- const {animated, index, viewOffset, viewPosition} = params;
466
- invariant(
467
- index >= 0 && index < getItemCount(data),
468
- `scrollToIndex out of range: requested index ${index} but maximum is ${getItemCount(
469
- data,
470
- ) - 1}`,
471
- );
472
- if (!getItemLayout && index > this._highestMeasuredFrameIndex) {
473
- invariant(
474
- !!onScrollToIndexFailed,
475
- 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' +
476
- 'otherwise there is no way to know the location of offscreen indices or handle failures.',
477
- );
478
- onScrollToIndexFailed({
479
- averageItemLength: this._averageCellLength,
480
- highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,
481
- index,
482
- });
483
- return;
484
- }
485
- const frame = this._getFrameMetricsApprox(index);
486
- const offset =
487
- Math.max(
488
- 0,
489
- frame.offset -
490
- (viewPosition || 0) *
491
- (this._scrollMetrics.visibleLength - frame.length),
492
- ) - (viewOffset || 0);
493
-
494
- if (this._scrollRef == null) {
495
- return;
496
- }
497
-
498
- if (this._scrollRef.scrollTo == null) {
499
- console.warn(
500
- 'No scrollTo method provided. This may be because you have two nested ' +
501
- 'VirtualizedLists with the same orientation, or because you are ' +
502
- 'using a custom component that does not implement scrollTo.',
503
- );
504
- return;
505
- }
506
-
507
- this._scrollRef.scrollTo(
508
- horizontal ? {x: offset, animated} : {y: offset, animated},
509
- );
510
- }
511
-
512
- // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -
513
- // use scrollToIndex instead if possible.
514
- scrollToItem(params: {
515
- animated?: ?boolean,
516
- item: Item,
517
- viewPosition?: number,
518
- ...
519
- }) {
520
- const {item} = params;
521
- const {data, getItem, getItemCount} = this.props;
522
- const itemCount = getItemCount(data);
523
- for (let index = 0; index < itemCount; index++) {
524
- if (getItem(data, index) === item) {
525
- this.scrollToIndex({...params, index});
526
- break;
527
- }
528
- }
529
- }
530
-
531
- /**
532
- * Scroll to a specific content pixel offset in the list.
533
- *
534
- * Param `offset` expects the offset to scroll to.
535
- * In case of `horizontal` is true, the offset is the x-value,
536
- * in any other case the offset is the y-value.
537
- *
538
- * Param `animated` (`true` by default) defines whether the list
539
- * should do an animation while scrolling.
540
- */
541
- scrollToOffset(params: {animated?: ?boolean, offset: number, ...}) {
542
- const {animated, offset} = params;
543
-
544
- if (this._scrollRef == null) {
545
- return;
546
- }
547
-
548
- if (this._scrollRef.scrollTo == null) {
549
- console.warn(
550
- 'No scrollTo method provided. This may be because you have two nested ' +
551
- 'VirtualizedLists with the same orientation, or because you are ' +
552
- 'using a custom component that does not implement scrollTo.',
553
- );
554
- return;
555
- }
556
-
557
- this._scrollRef.scrollTo(
558
- this.props.horizontal ? {x: offset, animated} : {y: offset, animated},
559
- );
560
- }
561
-
562
- // [TODO(macOS ISS#2323203)
563
- ensureItemAtIndexIsVisible(rowIndex: number) {
564
- const frame = this._getFrameMetricsApprox(rowIndex);
565
- const visTop = this._scrollMetrics.offset;
566
- const visLen = this._scrollMetrics.visibleLength;
567
- const visEnd = visTop + visLen;
568
- const contentLength = this._scrollMetrics.contentLength;
569
- const frameEnd = frame.offset + frame.length;
570
-
571
- if (frameEnd > visEnd) {
572
- const newOffset = Math.min(contentLength, visTop + (frameEnd - visEnd));
573
- this.scrollToOffset({offset: newOffset});
574
- } else if (frame.offset < visTop) {
575
- const newOffset = Math.max(0, visTop - frame.length);
576
- this.scrollToOffset({offset: newOffset});
577
- }
578
- }
579
- // ]TODO(macOS ISS#2323203)
580
-
581
- recordInteraction() {
582
- this._nestedChildLists.forEach(childList => {
583
- childList.ref && childList.ref.recordInteraction();
584
- });
585
- this._viewabilityTuples.forEach(t => {
586
- t.viewabilityHelper.recordInteraction();
587
- });
588
- this._updateViewableItems(this.props.data);
589
- }
590
-
591
- flashScrollIndicators() {
592
- if (this._scrollRef == null) {
593
- return;
594
- }
595
-
596
- this._scrollRef.flashScrollIndicators();
597
- }
598
-
599
- /**
600
- * Provides a handle to the underlying scroll responder.
601
- * Note that `this._scrollRef` might not be a `ScrollView`, so we
602
- * need to check that it responds to `getScrollResponder` before calling it.
603
- */
604
- getScrollResponder(): ?ScrollResponderType {
605
- if (this._scrollRef && this._scrollRef.getScrollResponder) {
606
- return this._scrollRef.getScrollResponder();
607
- }
608
- }
609
-
610
- getScrollableNode(): ?number {
611
- if (this._scrollRef && this._scrollRef.getScrollableNode) {
612
- return this._scrollRef.getScrollableNode();
613
- } else {
614
- return ReactNative.findNodeHandle(this._scrollRef);
615
- }
616
- }
617
-
618
- getScrollRef():
619
- | ?React.ElementRef<typeof ScrollView>
620
- | ?React.ElementRef<typeof View> {
621
- if (this._scrollRef && this._scrollRef.getScrollRef) {
622
- return this._scrollRef.getScrollRef();
623
- } else {
624
- return this._scrollRef;
625
- }
626
- }
627
-
628
- setNativeProps(props: Object) {
629
- if (this._scrollRef) {
630
- this._scrollRef.setNativeProps(props);
631
- }
632
- }
633
-
634
- static defaultProps: DefaultProps = {
635
- disableVirtualization: false,
636
- horizontal: false,
637
- initialNumToRender: 10,
638
- keyExtractor: (item: Item, index: number) => {
639
- if (item.key != null) {
640
- return item.key;
641
- }
642
- if (item.id != null) {
643
- return item.id;
644
- }
645
- _usedIndexForKey = true;
646
- if (item.type && item.type.displayName) {
647
- _keylessItemComponentName = item.type.displayName;
648
- }
649
- return String(index);
650
- },
651
- maxToRenderPerBatch: 10,
652
- onEndReachedThreshold: 2, // multiples of length
653
- scrollEventThrottle: 50,
654
- updateCellsBatchingPeriod: 50,
655
- windowSize: 21, // multiples of length
656
- };
657
-
658
- static contextTypes:
659
- | any
660
- | {|
661
- virtualizedCell: {|
662
- cellKey: React$PropType$Primitive<string>,
663
- |},
664
- virtualizedList: {|
665
- getScrollMetrics: React$PropType$Primitive<Function>,
666
- horizontal: React$PropType$Primitive<boolean>,
667
- getOutermostParentListRef: React$PropType$Primitive<Function>,
668
- getNestedChildState: React$PropType$Primitive<Function>,
669
- registerAsNestedChild: React$PropType$Primitive<Function>,
670
- unregisterAsNestedChild: React$PropType$Primitive<Function>,
671
- debugInfo: {|
672
- listKey: React$PropType$Primitive<string>,
673
- cellKey: React$PropType$Primitive<string>,
674
- |},
675
- |},
676
- |} = {
677
- virtualizedCell: PropTypes.shape({
678
- cellKey: PropTypes.string,
679
- }),
680
- virtualizedList: PropTypes.shape({
681
- getScrollMetrics: PropTypes.func,
682
- horizontal: PropTypes.bool,
683
- getOutermostParentListRef: PropTypes.func,
684
- getNestedChildState: PropTypes.func,
685
- registerAsNestedChild: PropTypes.func,
686
- unregisterAsNestedChild: PropTypes.func,
687
- debugInfo: PropTypes.shape({
688
- listKey: PropTypes.string,
689
- cellKey: PropTypes.string,
690
- }),
691
- }),
692
- };
693
-
694
- static childContextTypes:
695
- | any
696
- | {|
697
- getScrollMetrics: React$PropType$Primitive<Function>,
698
- horizontal: React$PropType$Primitive<boolean>,
699
- getOutermostParentListRef: React$PropType$Primitive<Function>,
700
- getNestedChildState: React$PropType$Primitive<Function>,
701
- registerAsNestedChild: React$PropType$Primitive<Function>,
702
- unregisterAsNestedChild: React$PropType$Primitive<Function>,
703
- |} = {
704
- virtualizedList: PropTypes.shape({
705
- getScrollMetrics: PropTypes.func,
706
- horizontal: PropTypes.bool,
707
- getOutermostParentListRef: PropTypes.func,
708
- getNestedChildState: PropTypes.func,
709
- registerAsNestedChild: PropTypes.func,
710
- unregisterAsNestedChild: PropTypes.func,
711
- }),
712
- };
713
-
714
- getChildContext(): {|
715
- virtualizedList: {
716
- getScrollMetrics: () => {
717
- contentLength: number,
718
- dOffset: number,
719
- dt: number,
720
- offset: number,
721
- timestamp: number,
722
- velocity: number,
723
- visibleLength: number,
724
- ...
725
- },
726
- horizontal: ?boolean,
727
- getOutermostParentListRef: Function,
728
- getNestedChildState: string => ?ChildListState,
729
- registerAsNestedChild: ({
730
- cellKey: string,
731
- key: string,
732
- ref: VirtualizedList,
733
- parentDebugInfo: ListDebugInfo,
734
- ...
735
- }) => ?ChildListState,
736
- unregisterAsNestedChild: ({
737
- key: string,
738
- state: ChildListState,
739
- ...
740
- }) => void,
741
- debugInfo: ListDebugInfo,
742
- ...
743
- },
744
- |} {
745
- return {
746
- virtualizedList: {
747
- getScrollMetrics: this._getScrollMetrics,
748
- horizontal: this.props.horizontal,
749
- getOutermostParentListRef: this._getOutermostParentListRef,
750
- getNestedChildState: this._getNestedChildState,
751
- registerAsNestedChild: this._registerAsNestedChild,
752
- unregisterAsNestedChild: this._unregisterAsNestedChild,
753
- debugInfo: this._getDebugInfo(),
754
- },
755
- };
756
- }
757
-
758
- _getCellKey(): string {
759
- return (
760
- (this.context.virtualizedCell && this.context.virtualizedCell.cellKey) ||
761
- 'rootList'
762
- );
763
- }
764
-
765
- _getListKey(): string {
766
- return this.props.listKey || this._getCellKey();
767
- }
768
-
769
- _getDebugInfo(): ListDebugInfo {
770
- return {
771
- listKey: this._getListKey(),
772
- cellKey: this._getCellKey(),
773
- horizontal: !!this.props.horizontal,
774
- parent: this.context.virtualizedList
775
- ? this.context.virtualizedList.debugInfo
776
- : null,
777
- };
778
- }
779
-
780
- _getScrollMetrics = () => {
781
- return this._scrollMetrics;
782
- };
783
-
784
- hasMore(): boolean {
785
- return this._hasMore;
786
- }
787
-
788
- _getOutermostParentListRef = () => {
789
- if (this._isNestedWithSameOrientation()) {
790
- return this.context.virtualizedList.getOutermostParentListRef();
791
- } else {
792
- return this;
793
- }
794
- };
795
-
796
- _getNestedChildState = (key: string): ?ChildListState => {
797
- const existingChildData = this._nestedChildLists.get(key);
798
- return existingChildData && existingChildData.state;
799
- };
800
-
801
- _registerAsNestedChild = (childList: {
802
- cellKey: string,
803
- key: string,
804
- ref: VirtualizedList,
805
- parentDebugInfo: ListDebugInfo,
806
- ...
807
- }): ?ChildListState => {
808
- // Register the mapping between this child key and the cellKey for its cell
809
- const childListsInCell =
810
- this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();
811
- childListsInCell.add(childList.key);
812
- this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);
813
- const existingChildData = this._nestedChildLists.get(childList.key);
814
- if (existingChildData && existingChildData.ref !== null) {
815
- console.error(
816
- 'A VirtualizedList contains a cell which itself contains ' +
817
- 'more than one VirtualizedList of the same orientation as the parent ' +
818
- 'list. You must pass a unique listKey prop to each sibling list.\n\n' +
819
- describeNestedLists({
820
- ...childList,
821
- // We're called from the child's componentDidMount, so it's safe to
822
- // read the child's props here (albeit weird).
823
- horizontal: !!childList.ref.props.horizontal,
824
- }),
825
- );
826
- }
827
- this._nestedChildLists.set(childList.key, {
828
- ref: childList.ref,
829
- state: null,
830
- });
831
-
832
- if (this._hasInteracted) {
833
- childList.ref.recordInteraction();
834
- }
835
- };
836
-
837
- _unregisterAsNestedChild = (childList: {
838
- key: string,
839
- state: ChildListState,
840
- ...
841
- }): void => {
842
- this._nestedChildLists.set(childList.key, {
843
- ref: null,
844
- state: childList.state,
845
- });
846
- };
847
-
848
- state: State;
849
-
850
- constructor(props: Props, context: Object) {
851
- super(props, context);
852
- invariant(
853
- // $FlowFixMe
854
- !props.onScroll || !props.onScroll.__isNative,
855
- 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' +
856
- 'to support native onScroll events with useNativeDriver',
857
- );
858
-
859
- invariant(
860
- props.windowSize > 0,
861
- 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.',
862
- );
863
-
864
- this._fillRateHelper = new FillRateHelper(this._getFrameMetrics);
865
- this._updateCellsToRenderBatcher = new Batchinator(
866
- this._updateCellsToRender,
867
- this.props.updateCellsBatchingPeriod,
868
- );
869
-
870
- if (this.props.viewabilityConfigCallbackPairs) {
871
- this._viewabilityTuples = this.props.viewabilityConfigCallbackPairs.map(
872
- pair => ({
873
- viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),
874
- onViewableItemsChanged: pair.onViewableItemsChanged,
875
- }),
876
- );
877
- } else if (this.props.onViewableItemsChanged) {
878
- this._viewabilityTuples.push({
879
- viewabilityHelper: new ViewabilityHelper(this.props.viewabilityConfig),
880
- onViewableItemsChanged: this.props.onViewableItemsChanged,
881
- });
882
- }
883
-
884
- let initialState = {
885
- first: this.props.initialScrollIndex || 0,
886
- last:
887
- Math.min(
888
- this.props.getItemCount(this.props.data),
889
- (this.props.initialScrollIndex || 0) + this.props.initialNumToRender,
890
- ) - 1,
891
- selectedRowIndex: 0, // TODO(macOS ISS#2323203)
892
- };
893
-
894
- if (this._isNestedWithSameOrientation()) {
895
- const storedState = this.context.virtualizedList.getNestedChildState(
896
- this._getListKey(),
897
- );
898
- if (storedState) {
899
- initialState = storedState;
900
- this.state = storedState;
901
- this._frames = storedState.frames;
902
- }
903
- }
904
-
905
- this.state = initialState;
906
- }
907
-
908
- componentDidMount() {
909
- if (this._isNestedWithSameOrientation()) {
910
- this.context.virtualizedList.registerAsNestedChild({
911
- cellKey: this._getCellKey(),
912
- key: this._getListKey(),
913
- ref: this,
914
- // NOTE: When the child mounts (here) it's not necessarily safe to read
915
- // the parent's props. This is why we explicitly propagate debugInfo
916
- // "down" via context and "up" again via this method call on the
917
- // parent.
918
- parentDebugInfo: this.context.virtualizedList.debugInfo,
919
- });
920
- }
921
- }
922
-
923
- componentWillUnmount() {
924
- if (this._isNestedWithSameOrientation()) {
925
- this.context.virtualizedList.unregisterAsNestedChild({
926
- key: this._getListKey(),
927
- state: {
928
- first: this.state.first,
929
- last: this.state.last,
930
- frames: this._frames,
931
- },
932
- });
933
- }
934
- this._updateViewableItems(null);
935
- this._updateCellsToRenderBatcher.dispose({abort: true});
936
- this._viewabilityTuples.forEach(tuple => {
937
- tuple.viewabilityHelper.dispose();
938
- });
939
- this._fillRateHelper.deactivateAndFlush();
940
- }
941
-
942
- static getDerivedStateFromProps(newProps: Props, prevState: State): State {
943
- const {data, getItemCount, maxToRenderPerBatch} = newProps;
944
- // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make
945
- // sure we're rendering a reasonable range here.
946
- return {
947
- first: Math.max(
948
- 0,
949
- Math.min(prevState.first, getItemCount(data) - 1 - maxToRenderPerBatch),
950
- ),
951
- last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1)),
952
- selectedRowIndex: Math.max(
953
- 0,
954
- Math.min(prevState.selectedRowIndex, getItemCount(data)),
955
- ), // TODO(macOS ISS#2323203)
956
- };
957
- }
958
-
959
- _pushCells(
960
- cells: Array<Object>,
961
- stickyHeaderIndices: Array<number>,
962
- stickyIndicesFromProps: Set<number>,
963
- first: number,
964
- last: number,
965
- inversionStyle: ViewStyleProp,
966
- ) {
967
- const {
968
- CellRendererComponent,
969
- ItemSeparatorComponent,
970
- data,
971
- getItem,
972
- getItemCount,
973
- horizontal,
974
- keyExtractor,
975
- } = this.props;
976
- const stickyOffset = this.props.ListHeaderComponent ? 1 : 0;
977
- const end = getItemCount(data) - 1;
978
- let prevCellKey;
979
- last = Math.min(end, last);
980
- for (let ii = first; ii <= last; ii++) {
981
- const item = getItem(data, ii);
982
- const key = keyExtractor(item, ii);
983
- this._indicesToKeys.set(ii, key);
984
- if (stickyIndicesFromProps.has(ii + stickyOffset)) {
985
- stickyHeaderIndices.push(cells.length);
986
- }
987
- cells.push(
988
- <CellRenderer
989
- CellRendererComponent={CellRendererComponent}
990
- ItemSeparatorComponent={ii < end ? ItemSeparatorComponent : undefined}
991
- cellKey={key}
992
- fillRateHelper={this._fillRateHelper}
993
- horizontal={horizontal}
994
- index={ii}
995
- inversionStyle={inversionStyle}
996
- item={item}
997
- isSelected={this.state.selectedRowIndex === ii ? true : false} // TODO(macOS ISS#2323203)
998
- key={key}
999
- prevCellKey={prevCellKey}
1000
- onUpdateSeparators={this._onUpdateSeparators}
1001
- onLayout={e => this._onCellLayout(e, key, ii)}
1002
- onUnmount={this._onCellUnmount}
1003
- parentProps={this.props}
1004
- ref={ref => {
1005
- this._cellRefs[key] = ref;
1006
- }}
1007
- />,
1008
- );
1009
- prevCellKey = key;
1010
- }
1011
- }
1012
-
1013
- _onUpdateSeparators = (keys: Array<?string>, newProps: Object) => {
1014
- keys.forEach(key => {
1015
- const ref = key != null && this._cellRefs[key];
1016
- ref && ref.updateSeparatorProps(newProps);
1017
- });
1018
- };
1019
-
1020
- _isVirtualizationDisabled(): boolean {
1021
- return this.props.disableVirtualization || false;
1022
- }
1023
-
1024
- _isNestedWithSameOrientation(): boolean {
1025
- const nestedContext = this.context.virtualizedList;
1026
- return !!(
1027
- nestedContext && !!nestedContext.horizontal === !!this.props.horizontal
1028
- );
1029
- }
1030
-
1031
- render(): React.Node {
1032
- if (__DEV__) {
1033
- const flatStyles = flattenStyle(this.props.contentContainerStyle);
1034
- warning(
1035
- flatStyles == null || flatStyles.flexWrap !== 'wrap',
1036
- '`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' +
1037
- 'Consider using `numColumns` with `FlatList` instead.',
1038
- );
1039
- }
1040
- const {
1041
- ListEmptyComponent,
1042
- ListFooterComponent,
1043
- ListHeaderComponent,
1044
- } = this.props;
1045
- const {data, horizontal} = this.props;
1046
- const isVirtualizationDisabled = this._isVirtualizationDisabled();
1047
- const inversionStyle = this.props.inverted
1048
- ? this.props.horizontal
1049
- ? styles.horizontallyInverted
1050
- : styles.verticallyInverted
1051
- : null;
1052
- const cells = [];
1053
- const stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
1054
- const stickyHeaderIndices = [];
1055
- if (ListHeaderComponent) {
1056
- if (stickyIndicesFromProps.has(0)) {
1057
- stickyHeaderIndices.push(0);
1058
- }
1059
- const element = React.isValidElement(ListHeaderComponent) ? (
1060
- ListHeaderComponent
1061
- ) : (
1062
- // $FlowFixMe
1063
- <ListHeaderComponent />
1064
- );
1065
- cells.push(
1066
- <VirtualizedCellWrapper
1067
- cellKey={this._getCellKey() + '-header'}
1068
- key="$header">
1069
- <View
1070
- onLayout={this._onLayoutHeader}
1071
- style={StyleSheet.compose(
1072
- inversionStyle,
1073
- this.props.ListHeaderComponentStyle,
1074
- )}>
1075
- {
1076
- // $FlowFixMe - Typing ReactNativeComponent revealed errors
1077
- element
1078
- }
1079
- </View>
1080
- </VirtualizedCellWrapper>,
1081
- );
1082
- }
1083
- const itemCount = this.props.getItemCount(data);
1084
- if (itemCount > 0) {
1085
- _usedIndexForKey = false;
1086
- _keylessItemComponentName = '';
1087
- const spacerKey = !horizontal ? 'height' : 'width';
1088
- const lastInitialIndex = this.props.initialScrollIndex
1089
- ? -1
1090
- : this.props.initialNumToRender - 1;
1091
- const {first, last} = this.state;
1092
- this._pushCells(
1093
- cells,
1094
- stickyHeaderIndices,
1095
- stickyIndicesFromProps,
1096
- 0,
1097
- lastInitialIndex,
1098
- inversionStyle,
1099
- );
1100
- const firstAfterInitial = Math.max(lastInitialIndex + 1, first);
1101
- if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {
1102
- let insertedStickySpacer = false;
1103
- if (stickyIndicesFromProps.size > 0) {
1104
- const stickyOffset = ListHeaderComponent ? 1 : 0;
1105
- // See if there are any sticky headers in the virtualized space that we need to render.
1106
- for (let ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {
1107
- if (stickyIndicesFromProps.has(ii + stickyOffset)) {
1108
- const initBlock = this._getFrameMetricsApprox(lastInitialIndex);
1109
- const stickyBlock = this._getFrameMetricsApprox(ii);
1110
- const leadSpace =
1111
- stickyBlock.offset -
1112
- initBlock.offset -
1113
- (this.props.initialScrollIndex ? 0 : initBlock.length);
1114
- cells.push(
1115
- /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
1116
- * suppresses an error found when Flow v0.111 was deployed. To
1117
- * see the error, delete this comment and run Flow. */
1118
- <View key="$sticky_lead" style={{[spacerKey]: leadSpace}} />,
1119
- );
1120
- this._pushCells(
1121
- cells,
1122
- stickyHeaderIndices,
1123
- stickyIndicesFromProps,
1124
- ii,
1125
- ii,
1126
- inversionStyle,
1127
- );
1128
- const trailSpace =
1129
- this._getFrameMetricsApprox(first).offset -
1130
- (stickyBlock.offset + stickyBlock.length);
1131
- cells.push(
1132
- /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
1133
- * suppresses an error found when Flow v0.111 was deployed. To
1134
- * see the error, delete this comment and run Flow. */
1135
- <View key="$sticky_trail" style={{[spacerKey]: trailSpace}} />,
1136
- );
1137
- insertedStickySpacer = true;
1138
- break;
1139
- }
1140
- }
1141
- }
1142
- if (!insertedStickySpacer) {
1143
- const initBlock = this._getFrameMetricsApprox(lastInitialIndex);
1144
- const firstSpace =
1145
- this._getFrameMetricsApprox(first).offset -
1146
- (initBlock.offset + initBlock.length);
1147
- cells.push(
1148
- /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
1149
- * suppresses an error found when Flow v0.111 was deployed. To see
1150
- * the error, delete this comment and run Flow. */
1151
- <View key="$lead_spacer" style={{[spacerKey]: firstSpace}} />,
1152
- );
1153
- }
1154
- }
1155
- this._pushCells(
1156
- cells,
1157
- stickyHeaderIndices,
1158
- stickyIndicesFromProps,
1159
- firstAfterInitial,
1160
- last,
1161
- inversionStyle,
1162
- );
1163
- if (!this._hasWarned.keys && _usedIndexForKey) {
1164
- console.warn(
1165
- 'VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' +
1166
- 'item or provide a custom keyExtractor.',
1167
- _keylessItemComponentName,
1168
- );
1169
- this._hasWarned.keys = true;
1170
- }
1171
- if (!isVirtualizationDisabled && last < itemCount - 1) {
1172
- const lastFrame = this._getFrameMetricsApprox(last);
1173
- // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to
1174
- // prevent the user for hyperscrolling into un-measured area because otherwise content will
1175
- // likely jump around as it renders in above the viewport.
1176
- const end = this.props.getItemLayout
1177
- ? itemCount - 1
1178
- : Math.min(itemCount - 1, this._highestMeasuredFrameIndex);
1179
- const endFrame = this._getFrameMetricsApprox(end);
1180
- const tailSpacerLength =
1181
- endFrame.offset +
1182
- endFrame.length -
1183
- (lastFrame.offset + lastFrame.length);
1184
- cells.push(
1185
- /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
1186
- * an error found when Flow v0.111 was deployed. To see the error,
1187
- * delete this comment and run Flow. */
1188
- <View key="$tail_spacer" style={{[spacerKey]: tailSpacerLength}} />,
1189
- );
1190
- }
1191
- } else if (ListEmptyComponent) {
1192
- const element: React.Element<any> = ((React.isValidElement(
1193
- ListEmptyComponent,
1194
- ) ? (
1195
- ListEmptyComponent
1196
- ) : (
1197
- // $FlowFixMe
1198
- <ListEmptyComponent />
1199
- )): any);
1200
- cells.push(
1201
- React.cloneElement(element, {
1202
- key: '$empty',
1203
- onLayout: event => {
1204
- this._onLayoutEmpty(event);
1205
- if (element.props.onLayout) {
1206
- element.props.onLayout(event);
1207
- }
1208
- },
1209
- style: StyleSheet.compose(
1210
- inversionStyle,
1211
- element.props.style,
1212
- ),
1213
- }),
1214
- );
1215
- }
1216
- if (ListFooterComponent) {
1217
- const element = React.isValidElement(ListFooterComponent) ? (
1218
- ListFooterComponent
1219
- ) : (
1220
- // $FlowFixMe
1221
- <ListFooterComponent />
1222
- );
1223
- cells.push(
1224
- <VirtualizedCellWrapper
1225
- cellKey={this._getFooterCellKey()}
1226
- key="$footer">
1227
- <View
1228
- onLayout={this._onLayoutFooter}
1229
- style={StyleSheet.compose(
1230
- inversionStyle,
1231
- this.props.ListFooterComponentStyle,
1232
- )}>
1233
- {
1234
- // $FlowFixMe - Typing ReactNativeComponent revealed errors
1235
- element
1236
- }
1237
- </View>
1238
- </VirtualizedCellWrapper>,
1239
- );
1240
- }
1241
- const scrollProps = {
1242
- ...this.props,
1243
- onContentSizeChange: this._onContentSizeChange,
1244
- onLayout: this._onLayout,
1245
- onScroll: this._onScroll,
1246
- onScrollBeginDrag: this._onScrollBeginDrag,
1247
- onScrollEndDrag: this._onScrollEndDrag,
1248
- onMomentumScrollEnd: this._onMomentumScrollEnd,
1249
- scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
1250
- invertStickyHeaders:
1251
- this.props.invertStickyHeaders !== undefined
1252
- ? this.props.invertStickyHeaders
1253
- : this.props.inverted,
1254
- stickyHeaderIndices,
1255
- style: inversionStyle
1256
- ? [inversionStyle, this.props.style]
1257
- : this.props.style,
1258
- };
1259
-
1260
- this._hasMore =
1261
- this.state.last < this.props.getItemCount(this.props.data) - 1;
1262
-
1263
- const innerRet = React.cloneElement(
1264
- (this.props.renderScrollComponent || this._defaultRenderScrollComponent)(
1265
- scrollProps,
1266
- ),
1267
- {
1268
- ref: this._captureScrollRef,
1269
- },
1270
- cells,
1271
- );
1272
- let ret = innerRet;
1273
- if (__DEV__) {
1274
- ret = (
1275
- <ScrollView.Context.Consumer>
1276
- {scrollContext => {
1277
- if (
1278
- scrollContext != null &&
1279
- !scrollContext.horizontal === !this.props.horizontal &&
1280
- !this._hasWarned.nesting &&
1281
- this.context.virtualizedList == null
1282
- ) {
1283
- // TODO (T46547044): use React.warn once 16.9 is sync'd: https://github.com/facebook/react/pull/15170
1284
- console.warn(
1285
- 'VirtualizedLists should never be nested inside plain ScrollViews with the same ' +
1286
- 'orientation - use another VirtualizedList-backed container instead.',
1287
- );
1288
- this._hasWarned.nesting = true;
1289
- }
1290
- return innerRet;
1291
- }}
1292
- </ScrollView.Context.Consumer>
1293
- );
1294
- }
1295
- if (this.props.debug) {
1296
- return (
1297
- <View style={styles.debug}>
1298
- {ret}
1299
- {this._renderDebugOverlay()}
1300
- </View>
1301
- );
1302
- } else {
1303
- return ret;
1304
- }
1305
- }
1306
-
1307
- componentDidUpdate(prevProps: Props) {
1308
- const {data, extraData} = this.props;
1309
- if (data !== prevProps.data || extraData !== prevProps.extraData) {
1310
- // clear the viewableIndices cache to also trigger
1311
- // the onViewableItemsChanged callback with the new data
1312
- this._viewabilityTuples.forEach(tuple => {
1313
- tuple.viewabilityHelper.resetViewableIndices();
1314
- });
1315
- }
1316
- // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen
1317
- // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true
1318
- // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with
1319
- // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The
1320
- // `_scheduleCellsToRenderUpdate` will check this condition and not perform
1321
- // another hiPri update.
1322
- const hiPriInProgress = this._hiPriInProgress;
1323
- this._scheduleCellsToRenderUpdate();
1324
- // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`
1325
- // is triggered with `this._hiPriInProgress = true`
1326
- if (hiPriInProgress) {
1327
- this._hiPriInProgress = false;
1328
- }
1329
- }
1330
-
1331
- _averageCellLength = 0;
1332
- // Maps a cell key to the set of keys for all outermost child lists within that cell
1333
- _cellKeysToChildListKeys: Map<string, Set<string>> = new Map();
1334
- _cellRefs = {};
1335
- _fillRateHelper: FillRateHelper;
1336
- _frames = {};
1337
- _footerLength = 0;
1338
- _hasDoneInitialScroll = false;
1339
- _hasInteracted = false;
1340
- _hasMore = false;
1341
- _hasWarned = {};
1342
- _headerLength = 0;
1343
- _hiPriInProgress: boolean = false; // flag to prevent infinite hiPri cell limit update
1344
- _highestMeasuredFrameIndex = 0;
1345
- _indicesToKeys: Map<number, string> = new Map();
1346
- _nestedChildLists: Map<
1347
- string,
1348
- {
1349
- ref: ?VirtualizedList,
1350
- state: ?ChildListState,
1351
- ...
1352
- },
1353
- > = new Map();
1354
- _offsetFromParentVirtualizedList: number = 0;
1355
- _prevParentOffset: number = 0;
1356
- _scrollMetrics = {
1357
- contentLength: 0,
1358
- dOffset: 0,
1359
- dt: 10,
1360
- offset: 0,
1361
- timestamp: 0,
1362
- velocity: 0,
1363
- visibleLength: 0,
1364
- };
1365
- _scrollRef: ?React.ElementRef<any> = null;
1366
- _sentEndForContentLength = 0;
1367
- _totalCellLength = 0;
1368
- _totalCellsMeasured = 0;
1369
- _updateCellsToRenderBatcher: Batchinator;
1370
- _viewabilityTuples: Array<ViewabilityHelperCallbackTuple> = [];
1371
-
1372
- _captureScrollRef = ref => {
1373
- this._scrollRef = ref;
1374
- };
1375
-
1376
- _computeBlankness() {
1377
- this._fillRateHelper.computeBlankness(
1378
- this.props,
1379
- this.state,
1380
- this._scrollMetrics,
1381
- );
1382
- }
1383
-
1384
- _defaultRenderScrollComponent = props => {
1385
- let keyEventHandler = this.props.onScrollKeyDown; // [TODO(macOS ISS#2323203)
1386
- if (!keyEventHandler) {
1387
- keyEventHandler = this.props.enableSelectionOnKeyPress
1388
- ? this._handleKeyDown
1389
- : null;
1390
- }
1391
- const preferredScrollerStyleDidChangeHandler = this.props
1392
- .onPreferredScrollerStyleDidChange; // ]TODO(macOS ISS#2323203)
1393
- const onRefresh = props.onRefresh;
1394
- if (this._isNestedWithSameOrientation()) {
1395
- // $FlowFixMe - Typing ReactNativeComponent revealed errors
1396
- return <View {...props} />;
1397
- } else if (onRefresh) {
1398
- invariant(
1399
- typeof props.refreshing === 'boolean',
1400
- '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +
1401
- /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
1402
- * an error found when Flow v0.111 was deployed. To see the error,
1403
- * delete this comment and run Flow. */
1404
- JSON.stringify(props.refreshing) +
1405
- '`',
1406
- );
1407
- return (
1408
- // $FlowFixMe Invalid prop usage
1409
- <ScrollView
1410
- {...props}
1411
- onScrollKeyDown={keyEventHandler} // TODO(macOS ISS#2323203)
1412
- onPreferredScrollerStyleDidChange={
1413
- preferredScrollerStyleDidChangeHandler
1414
- } // TODO(macOS ISS#2323203)
1415
- refreshControl={
1416
- props.refreshControl == null ? (
1417
- <RefreshControl
1418
- refreshing={props.refreshing}
1419
- onRefresh={onRefresh}
1420
- progressViewOffset={props.progressViewOffset}
1421
- />
1422
- ) : (
1423
- props.refreshControl
1424
- )
1425
- }
1426
- />
1427
- );
1428
- } else {
1429
- return (
1430
- // $FlowFixMe Invalid prop usage
1431
- <ScrollView
1432
- {...props}
1433
- onScrollKeyDown={keyEventHandler}
1434
- onPreferredScrollerStyleDidChange={
1435
- preferredScrollerStyleDidChangeHandler
1436
- }
1437
- />
1438
- ); // TODO(macOS ISS#2323203)
1439
- }
1440
- };
1441
- _onCellLayout(e, cellKey, index) {
1442
- const layout = e.nativeEvent.layout;
1443
- const next = {
1444
- offset: this._selectOffset(layout),
1445
- length: this._selectLength(layout),
1446
- index,
1447
- inLayout: true,
1448
- };
1449
- const curr = this._frames[cellKey];
1450
- if (
1451
- !curr ||
1452
- next.offset !== curr.offset ||
1453
- next.length !== curr.length ||
1454
- index !== curr.index
1455
- ) {
1456
- this._totalCellLength += next.length - (curr ? curr.length : 0);
1457
- this._totalCellsMeasured += curr ? 0 : 1;
1458
- this._averageCellLength =
1459
- this._totalCellLength / this._totalCellsMeasured;
1460
- this._frames[cellKey] = next;
1461
- this._highestMeasuredFrameIndex = Math.max(
1462
- this._highestMeasuredFrameIndex,
1463
- index,
1464
- );
1465
- this._scheduleCellsToRenderUpdate();
1466
- } else {
1467
- this._frames[cellKey].inLayout = true;
1468
- }
1469
-
1470
- this._triggerRemeasureForChildListsInCell(cellKey);
1471
-
1472
- this._computeBlankness();
1473
- this._updateViewableItems(this.props.data);
1474
- }
1475
-
1476
- _onCellUnmount = (cellKey: string) => {
1477
- const curr = this._frames[cellKey];
1478
- if (curr) {
1479
- this._frames[cellKey] = {...curr, inLayout: false};
1480
- }
1481
- };
1482
-
1483
- _triggerRemeasureForChildListsInCell(cellKey: string): void {
1484
- const childListKeys = this._cellKeysToChildListKeys.get(cellKey);
1485
- if (childListKeys) {
1486
- for (let childKey of childListKeys) {
1487
- const childList = this._nestedChildLists.get(childKey);
1488
- childList &&
1489
- childList.ref &&
1490
- childList.ref.measureLayoutRelativeToContainingList();
1491
- }
1492
- }
1493
- }
1494
-
1495
- measureLayoutRelativeToContainingList(): void {
1496
- // TODO (T35574538): findNodeHandle sometimes crashes with "Unable to find
1497
- // node on an unmounted component" during scrolling
1498
- try {
1499
- if (!this._scrollRef) {
1500
- return;
1501
- }
1502
- // We are assuming that getOutermostParentListRef().getScrollRef()
1503
- // is a non-null reference to a ScrollView
1504
- this._scrollRef.measureLayout(
1505
- this.context.virtualizedList.getOutermostParentListRef().getScrollRef(),
1506
- (x, y, width, height) => {
1507
- this._offsetFromParentVirtualizedList = this._selectOffset({x, y});
1508
- this._scrollMetrics.contentLength = this._selectLength({
1509
- width,
1510
- height,
1511
- });
1512
- const scrollMetrics = this._convertParentScrollMetrics(
1513
- this.context.virtualizedList.getScrollMetrics(),
1514
- );
1515
- this._scrollMetrics.visibleLength = scrollMetrics.visibleLength;
1516
- this._scrollMetrics.offset = scrollMetrics.offset;
1517
- },
1518
- error => {
1519
- console.warn(
1520
- "VirtualizedList: Encountered an error while measuring a list's" +
1521
- ' offset from its containing VirtualizedList.',
1522
- );
1523
- },
1524
- );
1525
- } catch (error) {
1526
- console.warn(
1527
- 'measureLayoutRelativeToContainingList threw an error',
1528
- error.stack,
1529
- );
1530
- }
1531
- }
1532
-
1533
- _onLayout = (e: Object) => {
1534
- if (this._isNestedWithSameOrientation()) {
1535
- // Need to adjust our scroll metrics to be relative to our containing
1536
- // VirtualizedList before we can make claims about list item viewability
1537
- this.measureLayoutRelativeToContainingList();
1538
- } else {
1539
- this._scrollMetrics.visibleLength = this._selectLength(
1540
- e.nativeEvent.layout,
1541
- );
1542
- }
1543
- this.props.onLayout && this.props.onLayout(e);
1544
- this._scheduleCellsToRenderUpdate();
1545
- this._maybeCallOnEndReached();
1546
- };
1547
-
1548
- _onLayoutEmpty = e => {
1549
- this.props.onLayout && this.props.onLayout(e);
1550
- };
1551
-
1552
- _getFooterCellKey(): string {
1553
- return this._getCellKey() + '-footer';
1554
- }
1555
-
1556
- _onLayoutFooter = e => {
1557
- this._triggerRemeasureForChildListsInCell(this._getFooterCellKey());
1558
- this._footerLength = this._selectLength(e.nativeEvent.layout);
1559
- };
1560
-
1561
- _onLayoutHeader = e => {
1562
- this._headerLength = this._selectLength(e.nativeEvent.layout);
1563
- };
1564
-
1565
- // [TODO(macOS ISS#2323203)
1566
- _selectRowAboveIndex = rowIndex => {
1567
- const rowAbove = rowIndex > 0 ? rowIndex - 1 : rowIndex;
1568
- this.setState(state => {
1569
- return {selectedRowIndex: rowAbove};
1570
- });
1571
- return rowAbove;
1572
- };
1573
-
1574
- _selectRowBelowIndex = rowIndex => {
1575
- if (this.props.getItemCount) {
1576
- const {data} = this.props;
1577
- const itemCount = this.props.getItemCount(data);
1578
- const rowBelow = rowIndex < itemCount - 1 ? rowIndex + 1 : rowIndex;
1579
- this.setState(state => {
1580
- return {selectedRowIndex: rowBelow};
1581
- });
1582
- return rowBelow;
1583
- } else {
1584
- return rowIndex;
1585
- }
1586
- };
1587
-
1588
- _handleKeyDown = (e: ScrollEvent) => {
1589
- if (this.props.onScrollKeyDown) {
1590
- this.props.onScrollKeyDown(e);
1591
- } else {
1592
- if (Platform.OS === 'macos') {
1593
- // $FlowFixMe Cannot get e.nativeEvent because property nativeEvent is missing in Event
1594
- const event = e.nativeEvent;
1595
- const key = event.key;
1596
-
1597
- let prevIndex = -1;
1598
- let newIndex = -1;
1599
- if ('selectedRowIndex' in this.state) {
1600
- prevIndex = this.state.selectedRowIndex;
1601
- }
1602
-
1603
- const {data, getItem} = this.props;
1604
- if (key === 'DOWN_ARROW') {
1605
- newIndex = this._selectRowBelowIndex(prevIndex);
1606
- this.ensureItemAtIndexIsVisible(newIndex);
1607
-
1608
- if (prevIndex !== newIndex) {
1609
- const item = getItem(data, newIndex);
1610
- if (this.props.onSelectionChanged) {
1611
- this.props.onSelectionChanged({
1612
- previousSelection: prevIndex,
1613
- newSelection: newIndex,
1614
- item: item,
1615
- });
1616
- }
1617
- }
1618
- } else if (key === 'UP_ARROW') {
1619
- newIndex = this._selectRowAboveIndex(prevIndex);
1620
- this.ensureItemAtIndexIsVisible(newIndex);
1621
-
1622
- if (prevIndex !== newIndex) {
1623
- const item = getItem(data, newIndex);
1624
- if (this.props.onSelectionChanged) {
1625
- this.props.onSelectionChanged({
1626
- previousSelection: prevIndex,
1627
- newSelection: newIndex,
1628
- item: item,
1629
- });
1630
- }
1631
- }
1632
- } else if (key === 'ENTER') {
1633
- if (this.props.onSelectionEntered) {
1634
- const item = getItem(data, prevIndex);
1635
- if (this.props.onSelectionEntered) {
1636
- this.props.onSelectionEntered(item);
1637
- }
1638
- }
1639
- }
1640
- }
1641
- }
1642
- };
1643
- // ]TODO(macOS ISS#2323203)
1644
-
1645
- _renderDebugOverlay() {
1646
- const normalize =
1647
- this._scrollMetrics.visibleLength /
1648
- (this._scrollMetrics.contentLength || 1);
1649
- const framesInLayout = [];
1650
- const itemCount = this.props.getItemCount(this.props.data);
1651
- for (let ii = 0; ii < itemCount; ii++) {
1652
- const frame = this._getFrameMetricsApprox(ii);
1653
- /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
1654
- * error found when Flow v0.68 was deployed. To see the error delete this
1655
- * comment and run Flow. */
1656
- if (frame.inLayout) {
1657
- framesInLayout.push(frame);
1658
- }
1659
- }
1660
- const windowTop = this._getFrameMetricsApprox(this.state.first).offset;
1661
- const frameLast = this._getFrameMetricsApprox(this.state.last);
1662
- const windowLen = frameLast.offset + frameLast.length - windowTop;
1663
- const visTop = this._scrollMetrics.offset;
1664
- const visLen = this._scrollMetrics.visibleLength;
1665
-
1666
- return (
1667
- <View style={[styles.debugOverlayBase, styles.debugOverlay]}>
1668
- {framesInLayout.map((f, ii) => (
1669
- <View
1670
- key={'f' + ii}
1671
- style={[
1672
- styles.debugOverlayBase,
1673
- styles.debugOverlayFrame,
1674
- {
1675
- top: f.offset * normalize,
1676
- height: f.length * normalize,
1677
- },
1678
- ]}
1679
- />
1680
- ))}
1681
- <View
1682
- style={[
1683
- styles.debugOverlayBase,
1684
- styles.debugOverlayFrameLast,
1685
- {
1686
- top: windowTop * normalize,
1687
- height: windowLen * normalize,
1688
- },
1689
- ]}
1690
- />
1691
- <View
1692
- style={[
1693
- styles.debugOverlayBase,
1694
- styles.debugOverlayFrameVis,
1695
- {
1696
- top: visTop * normalize,
1697
- height: visLen * normalize,
1698
- },
1699
- ]}
1700
- />
1701
- </View>
1702
- );
1703
- }
1704
-
1705
- _selectLength(
1706
- metrics: $ReadOnly<{
1707
- height: number,
1708
- width: number,
1709
- ...
1710
- }>,
1711
- ): number {
1712
- return !this.props.horizontal ? metrics.height : metrics.width;
1713
- }
1714
-
1715
- _selectOffset(
1716
- metrics: $ReadOnly<{
1717
- x: number,
1718
- y: number,
1719
- ...
1720
- }>,
1721
- ): number {
1722
- return !this.props.horizontal ? metrics.y : metrics.x;
1723
- }
1724
-
1725
- _maybeCallOnEndReached() {
1726
- const {
1727
- data,
1728
- getItemCount,
1729
- onEndReached,
1730
- onEndReachedThreshold,
1731
- } = this.props;
1732
- const {contentLength, visibleLength, offset} = this._scrollMetrics;
1733
- const distanceFromEnd = contentLength - visibleLength - offset;
1734
- const threshold = onEndReachedThreshold
1735
- ? onEndReachedThreshold * visibleLength
1736
- : 0;
1737
- if (
1738
- onEndReached &&
1739
- this.state.last === getItemCount(data) - 1 &&
1740
- distanceFromEnd < threshold &&
1741
- this._scrollMetrics.contentLength !== this._sentEndForContentLength
1742
- ) {
1743
- // Only call onEndReached once for a given content length
1744
- this._sentEndForContentLength = this._scrollMetrics.contentLength;
1745
- onEndReached({distanceFromEnd});
1746
- } else if (distanceFromEnd > threshold) {
1747
- // If the user scrolls away from the end and back again cause
1748
- // an onEndReached to be triggered again
1749
- this._sentEndForContentLength = 0;
1750
- }
1751
- }
1752
-
1753
- _onContentSizeChange = (width: number, height: number) => {
1754
- if (
1755
- width > 0 &&
1756
- height > 0 &&
1757
- this.props.initialScrollIndex != null &&
1758
- this.props.initialScrollIndex > 0 &&
1759
- !this._hasDoneInitialScroll
1760
- ) {
1761
- this.scrollToIndex({
1762
- animated: false,
1763
- index: this.props.initialScrollIndex,
1764
- });
1765
- this._hasDoneInitialScroll = true;
1766
- }
1767
- if (this.props.onContentSizeChange) {
1768
- this.props.onContentSizeChange(width, height);
1769
- }
1770
- this._scrollMetrics.contentLength = this._selectLength({height, width});
1771
- this._scheduleCellsToRenderUpdate();
1772
- this._maybeCallOnEndReached();
1773
- };
1774
-
1775
- /* Translates metrics from a scroll event in a parent VirtualizedList into
1776
- * coordinates relative to the child list.
1777
- */
1778
- _convertParentScrollMetrics = (metrics: {
1779
- visibleLength: number,
1780
- offset: number,
1781
- ...
1782
- }) => {
1783
- // Offset of the top of the nested list relative to the top of its parent's viewport
1784
- const offset = metrics.offset - this._offsetFromParentVirtualizedList;
1785
- // Child's visible length is the same as its parent's
1786
- const visibleLength = metrics.visibleLength;
1787
- const dOffset = offset - this._scrollMetrics.offset;
1788
- const contentLength = this._scrollMetrics.contentLength;
1789
-
1790
- return {
1791
- visibleLength,
1792
- contentLength,
1793
- offset,
1794
- dOffset,
1795
- };
1796
- };
1797
-
1798
- _onScroll = (e: Object) => {
1799
- this._nestedChildLists.forEach(childList => {
1800
- childList.ref && childList.ref._onScroll(e);
1801
- });
1802
- if (this.props.onScroll) {
1803
- this.props.onScroll(e);
1804
- }
1805
- const timestamp = e.timeStamp;
1806
- let visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement);
1807
- let contentLength = this._selectLength(e.nativeEvent.contentSize);
1808
- let offset = this._selectOffset(e.nativeEvent.contentOffset);
1809
- let dOffset = offset - this._scrollMetrics.offset;
1810
-
1811
- if (this._isNestedWithSameOrientation()) {
1812
- if (this._scrollMetrics.contentLength === 0) {
1813
- // Ignore scroll events until onLayout has been called and we
1814
- // know our offset from our offset from our parent
1815
- return;
1816
- }
1817
- ({
1818
- visibleLength,
1819
- contentLength,
1820
- offset,
1821
- dOffset,
1822
- } = this._convertParentScrollMetrics({
1823
- visibleLength,
1824
- offset,
1825
- }));
1826
- }
1827
-
1828
- const dt = this._scrollMetrics.timestamp
1829
- ? Math.max(1, timestamp - this._scrollMetrics.timestamp)
1830
- : 1;
1831
- const velocity = dOffset / dt;
1832
-
1833
- if (
1834
- dt > 500 &&
1835
- this._scrollMetrics.dt > 500 &&
1836
- contentLength > 5 * visibleLength &&
1837
- !this._hasWarned.perf
1838
- ) {
1839
- infoLog(
1840
- 'VirtualizedList: You have a large list that is slow to update - make sure your ' +
1841
- 'renderItem function renders components that follow React performance best practices ' +
1842
- 'like PureComponent, shouldComponentUpdate, etc.',
1843
- {dt, prevDt: this._scrollMetrics.dt, contentLength},
1844
- );
1845
- this._hasWarned.perf = true;
1846
- }
1847
- this._scrollMetrics = {
1848
- contentLength,
1849
- dt,
1850
- dOffset,
1851
- offset,
1852
- timestamp,
1853
- velocity,
1854
- visibleLength,
1855
- };
1856
- this._updateViewableItems(this.props.data);
1857
- if (!this.props) {
1858
- return;
1859
- }
1860
- this._maybeCallOnEndReached();
1861
- if (velocity !== 0) {
1862
- this._fillRateHelper.activate();
1863
- }
1864
- this._computeBlankness();
1865
- this._scheduleCellsToRenderUpdate();
1866
- };
1867
-
1868
- _scheduleCellsToRenderUpdate() {
1869
- const {first, last} = this.state;
1870
- const {offset, visibleLength, velocity} = this._scrollMetrics;
1871
- const itemCount = this.props.getItemCount(this.props.data);
1872
- let hiPri = false;
1873
- const scrollingThreshold =
1874
- /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
1875
- * error found when Flow v0.63 was deployed. To see the error delete
1876
- * this comment and run Flow. */
1877
- (this.props.onEndReachedThreshold * visibleLength) / 2;
1878
- // Mark as high priority if we're close to the start of the first item
1879
- // But only if there are items before the first rendered item
1880
- if (first > 0) {
1881
- const distTop = offset - this._getFrameMetricsApprox(first).offset;
1882
- hiPri =
1883
- hiPri || distTop < 0 || (velocity < -2 && distTop < scrollingThreshold);
1884
- }
1885
- // Mark as high priority if we're close to the end of the last item
1886
- // But only if there are items after the last rendered item
1887
- if (last < itemCount - 1) {
1888
- const distBottom =
1889
- this._getFrameMetricsApprox(last).offset - (offset + visibleLength);
1890
- hiPri =
1891
- hiPri ||
1892
- distBottom < 0 ||
1893
- (velocity > 2 && distBottom < scrollingThreshold);
1894
- }
1895
- // Only trigger high-priority updates if we've actually rendered cells,
1896
- // and with that size estimate, accurately compute how many cells we should render.
1897
- // Otherwise, it would just render as many cells as it can (of zero dimension),
1898
- // each time through attempting to render more (limited by maxToRenderPerBatch),
1899
- // starving the renderer from actually laying out the objects and computing _averageCellLength.
1900
- // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate
1901
- // We shouldn't do another hipri cellToRenderUpdate
1902
- if (
1903
- hiPri &&
1904
- (this._averageCellLength || this.props.getItemLayout) &&
1905
- !this._hiPriInProgress
1906
- ) {
1907
- this._hiPriInProgress = true;
1908
- // Don't worry about interactions when scrolling quickly; focus on filling content as fast
1909
- // as possible.
1910
- this._updateCellsToRenderBatcher.dispose({abort: true});
1911
- this._updateCellsToRender();
1912
- return;
1913
- } else {
1914
- this._updateCellsToRenderBatcher.schedule();
1915
- }
1916
- }
1917
-
1918
- _onScrollBeginDrag = (e): void => {
1919
- this._nestedChildLists.forEach(childList => {
1920
- childList.ref && childList.ref._onScrollBeginDrag(e);
1921
- });
1922
- this._viewabilityTuples.forEach(tuple => {
1923
- tuple.viewabilityHelper.recordInteraction();
1924
- });
1925
- this._hasInteracted = true;
1926
- this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
1927
- };
1928
-
1929
- _onScrollEndDrag = (e): void => {
1930
- const {velocity} = e.nativeEvent;
1931
- if (velocity) {
1932
- this._scrollMetrics.velocity = this._selectOffset(velocity);
1933
- }
1934
- this._computeBlankness();
1935
- this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
1936
- };
1937
-
1938
- _onMomentumScrollEnd = (e): void => {
1939
- this._scrollMetrics.velocity = 0;
1940
- this._computeBlankness();
1941
- this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
1942
- };
1943
-
1944
- _updateCellsToRender = () => {
1945
- const {data, getItemCount, onEndReachedThreshold} = this.props;
1946
- const isVirtualizationDisabled = this._isVirtualizationDisabled();
1947
- this._updateViewableItems(data);
1948
- if (!data) {
1949
- return;
1950
- }
1951
- this.setState(state => {
1952
- let newState;
1953
- const {contentLength, offset, visibleLength} = this._scrollMetrics;
1954
- if (!isVirtualizationDisabled) {
1955
- // If we run this with bogus data, we'll force-render window {first: 0, last: 0},
1956
- // and wipe out the initialNumToRender rendered elements.
1957
- // So let's wait until the scroll view metrics have been set up. And until then,
1958
- // we will trust the initialNumToRender suggestion
1959
- if (visibleLength > 0 && contentLength > 0) {
1960
- // If we have a non-zero initialScrollIndex and run this before we've scrolled,
1961
- // we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.
1962
- // So let's wait until we've scrolled the view to the right place. And until then,
1963
- // we will trust the initialScrollIndex suggestion.
1964
- if (!this.props.initialScrollIndex || this._scrollMetrics.offset) {
1965
- newState = computeWindowedRenderLimits(
1966
- this.props,
1967
- state,
1968
- this._getFrameMetricsApprox,
1969
- this._scrollMetrics,
1970
- );
1971
- }
1972
- }
1973
- } else {
1974
- const distanceFromEnd = contentLength - visibleLength - offset;
1975
- const renderAhead =
1976
- /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses
1977
- * an error found when Flow v0.63 was deployed. To see the error
1978
- * delete this comment and run Flow. */
1979
- distanceFromEnd < onEndReachedThreshold * visibleLength
1980
- ? this.props.maxToRenderPerBatch
1981
- : 0;
1982
- newState = {
1983
- first: 0,
1984
- last: Math.min(state.last + renderAhead, getItemCount(data) - 1),
1985
- };
1986
- }
1987
- if (newState && this._nestedChildLists.size > 0) {
1988
- const newFirst = newState.first;
1989
- const newLast = newState.last;
1990
- // If some cell in the new state has a child list in it, we should only render
1991
- // up through that item, so that we give that list a chance to render.
1992
- // Otherwise there's churn from multiple child lists mounting and un-mounting
1993
- // their items.
1994
- for (let ii = newFirst; ii <= newLast; ii++) {
1995
- const cellKeyForIndex = this._indicesToKeys.get(ii);
1996
- const childListKeys =
1997
- cellKeyForIndex &&
1998
- this._cellKeysToChildListKeys.get(cellKeyForIndex);
1999
- if (!childListKeys) {
2000
- continue;
2001
- }
2002
- let someChildHasMore = false;
2003
- // For each cell, need to check whether any child list in it has more elements to render
2004
- for (let childKey of childListKeys) {
2005
- const childList = this._nestedChildLists.get(childKey);
2006
- if (childList && childList.ref && childList.ref.hasMore()) {
2007
- someChildHasMore = true;
2008
- break;
2009
- }
2010
- }
2011
- if (someChildHasMore) {
2012
- newState.last = ii;
2013
- break;
2014
- }
2015
- }
2016
- }
2017
- if (
2018
- newState != null &&
2019
- newState.first === state.first &&
2020
- newState.last === state.last
2021
- ) {
2022
- newState = null;
2023
- }
2024
- return newState;
2025
- });
2026
- };
2027
-
2028
- _createViewToken = (index: number, isViewable: boolean) => {
2029
- const {data, getItem, keyExtractor} = this.props;
2030
- const item = getItem(data, index);
2031
- return {index, item, key: keyExtractor(item, index), isViewable};
2032
- };
2033
-
2034
- _getFrameMetricsApprox = (
2035
- index: number,
2036
- ): {
2037
- length: number,
2038
- offset: number,
2039
- ...
2040
- } => {
2041
- const frame = this._getFrameMetrics(index);
2042
- if (frame && frame.index === index) {
2043
- // check for invalid frames due to row re-ordering
2044
- return frame;
2045
- } else {
2046
- const {getItemLayout} = this.props;
2047
- invariant(
2048
- !getItemLayout,
2049
- 'Should not have to estimate frames when a measurement metrics function is provided',
2050
- );
2051
- return {
2052
- length: this._averageCellLength,
2053
- offset: this._averageCellLength * index,
2054
- };
2055
- }
2056
- };
2057
-
2058
- _getFrameMetrics = (
2059
- index: number,
2060
- ): ?{
2061
- length: number,
2062
- offset: number,
2063
- index: number,
2064
- inLayout?: boolean,
2065
- ...
2066
- } => {
2067
- const {
2068
- data,
2069
- getItem,
2070
- getItemCount,
2071
- getItemLayout,
2072
- keyExtractor,
2073
- } = this.props;
2074
- invariant(
2075
- getItemCount(data) > index,
2076
- 'Tried to get frame for out of range index ' + index,
2077
- );
2078
- const item = getItem(data, index);
2079
- let frame = item && this._frames[keyExtractor(item, index)];
2080
- if (!frame || frame.index !== index) {
2081
- if (getItemLayout) {
2082
- frame = getItemLayout(data, index);
2083
- if (__DEV__) {
2084
- const frameType = PropTypes.shape({
2085
- length: PropTypes.number.isRequired,
2086
- offset: PropTypes.number.isRequired,
2087
- index: PropTypes.number.isRequired,
2088
- }).isRequired;
2089
- PropTypes.checkPropTypes(
2090
- {frame: frameType},
2091
- {frame},
2092
- 'frame',
2093
- 'VirtualizedList.getItemLayout',
2094
- );
2095
- }
2096
- }
2097
- }
2098
- /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
2099
- * error found when Flow v0.63 was deployed. To see the error delete this
2100
- * comment and run Flow. */
2101
- return frame;
2102
- };
2103
-
2104
- _updateViewableItems(data: any) {
2105
- const {getItemCount} = this.props;
2106
-
2107
- this._viewabilityTuples.forEach(tuple => {
2108
- tuple.viewabilityHelper.onUpdate(
2109
- getItemCount(data),
2110
- this._scrollMetrics.offset,
2111
- this._scrollMetrics.visibleLength,
2112
- this._getFrameMetrics,
2113
- this._createViewToken,
2114
- tuple.onViewableItemsChanged,
2115
- this.state,
2116
- );
2117
- });
2118
- }
2119
- }
2120
-
2121
- type CellRendererProps = {
2122
- CellRendererComponent?: ?React.ComponentType<any>,
2123
- ItemSeparatorComponent: ?React.ComponentType<*>,
2124
- cellKey: string,
2125
- fillRateHelper: FillRateHelper,
2126
- horizontal: ?boolean,
2127
- index: number,
2128
- inversionStyle: ViewStyleProp,
2129
- isSelected: ?boolean, // TODO(macOS ISS#2323203)
2130
- item: Item,
2131
- // This is extracted by ScrollViewStickyHeader
2132
- onLayout: (event: Object) => void,
2133
- onUnmount: (cellKey: string) => void,
2134
- onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void,
2135
- parentProps: {
2136
- // e.g. height, y,
2137
- getItemLayout?: (
2138
- data: any,
2139
- index: number,
2140
- ) => {
2141
- length: number,
2142
- offset: number,
2143
- index: number,
2144
- ...
2145
- },
2146
- renderItem?: ?RenderItemType<Item>,
2147
- ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
2148
- ...
2149
- },
2150
- prevCellKey: ?string,
2151
- ...
2152
- };
2153
-
2154
- type CellRendererState = {
2155
- separatorProps: $ReadOnly<{|
2156
- highlighted: boolean,
2157
- leadingItem: ?Item,
2158
- |}>,
2159
- ...
2160
- };
2161
-
2162
- class CellRenderer extends React.Component<
2163
- CellRendererProps,
2164
- CellRendererState,
2165
- > {
2166
- state = {
2167
- separatorProps: {
2168
- highlighted: false,
2169
- leadingItem: this.props.item,
2170
- },
2171
- };
2172
-
2173
- static childContextTypes = {
2174
- virtualizedCell: PropTypes.shape({
2175
- cellKey: PropTypes.string,
2176
- }),
2177
- };
2178
-
2179
- static getDerivedStateFromProps(
2180
- props: CellRendererProps,
2181
- prevState: CellRendererState,
2182
- ): ?CellRendererState {
2183
- return {
2184
- separatorProps: {
2185
- ...prevState.separatorProps,
2186
- leadingItem: props.item,
2187
- },
2188
- };
2189
- }
2190
-
2191
- getChildContext() {
2192
- return {
2193
- virtualizedCell: {
2194
- cellKey: this.props.cellKey,
2195
- },
2196
- };
2197
- }
2198
-
2199
- // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not
2200
- // reused by SectionList and we can keep VirtualizedList simpler.
2201
- _separators = {
2202
- highlight: () => {
2203
- const {cellKey, prevCellKey} = this.props;
2204
- this.props.onUpdateSeparators([cellKey, prevCellKey], {
2205
- highlighted: true,
2206
- });
2207
- },
2208
- unhighlight: () => {
2209
- const {cellKey, prevCellKey} = this.props;
2210
- this.props.onUpdateSeparators([cellKey, prevCellKey], {
2211
- highlighted: false,
2212
- });
2213
- },
2214
- updateProps: (select: 'leading' | 'trailing', newProps: Object) => {
2215
- const {cellKey, prevCellKey} = this.props;
2216
- this.props.onUpdateSeparators(
2217
- [select === 'leading' ? prevCellKey : cellKey],
2218
- newProps,
2219
- );
2220
- },
2221
- };
2222
-
2223
- updateSeparatorProps(newProps: Object) {
2224
- this.setState(state => ({
2225
- separatorProps: {...state.separatorProps, ...newProps},
2226
- }));
2227
- }
2228
-
2229
- componentWillUnmount() {
2230
- this.props.onUnmount(this.props.cellKey);
2231
- }
2232
-
2233
- _renderElement(
2234
- renderItem,
2235
- ListItemComponent,
2236
- item,
2237
- index,
2238
- isSelected /* TODO(macOS ISS#2323203 */,
2239
- ) {
2240
- if (renderItem && ListItemComponent) {
2241
- console.warn(
2242
- 'VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' +
2243
- ' precedence over renderItem.',
2244
- );
2245
- }
2246
-
2247
- if (ListItemComponent) {
2248
- /* $FlowFixMe(>=0.108.0 site=react_native_fb) This comment suppresses an
2249
- * error found when Flow v0.108 was deployed. To see the error, delete
2250
- * this comment and run Flow. */
2251
- return React.createElement(ListItemComponent, {
2252
- item,
2253
- index,
2254
- separators: this._separators,
2255
- });
2256
- }
2257
-
2258
- if (renderItem) {
2259
- return renderItem({
2260
- item,
2261
- index,
2262
- isSelected, // TODO(macOS ISS#2323203)
2263
- separators: this._separators,
2264
- });
2265
- }
2266
-
2267
- invariant(
2268
- false,
2269
- 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.',
2270
- );
2271
- }
2272
-
2273
- render() {
2274
- const {
2275
- CellRendererComponent,
2276
- ItemSeparatorComponent,
2277
- fillRateHelper,
2278
- horizontal,
2279
- item,
2280
- index,
2281
- inversionStyle,
2282
- isSelected, // TODO(macOS ISS#2323203)
2283
- parentProps,
2284
- } = this.props;
2285
- const {renderItem, getItemLayout, ListItemComponent} = parentProps;
2286
- const element = this._renderElement(
2287
- renderItem,
2288
- ListItemComponent,
2289
- item,
2290
- index,
2291
- isSelected, // TODO(macOS ISS#2323203)
2292
- );
2293
-
2294
- const onLayout =
2295
- /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
2296
- * error found when Flow v0.68 was deployed. To see the error delete this
2297
- * comment and run Flow. */
2298
- getItemLayout && !parentProps.debug && !fillRateHelper.enabled()
2299
- ? undefined
2300
- : this.props.onLayout;
2301
- // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and
2302
- // called explicitly by `ScrollViewStickyHeader`.
2303
- const itemSeparator = ItemSeparatorComponent && (
2304
- <ItemSeparatorComponent {...this.state.separatorProps} />
2305
- );
2306
- const cellStyle = inversionStyle
2307
- ? horizontal
2308
- ? [styles.rowReverse, inversionStyle]
2309
- : [styles.columnReverse, inversionStyle]
2310
- : horizontal
2311
- ? [styles.row, inversionStyle]
2312
- : inversionStyle;
2313
- if (!CellRendererComponent) {
2314
- return (
2315
- /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
2316
- * error found when Flow v0.89 was deployed. To see the error, delete
2317
- * this comment and run Flow. */
2318
- <View style={cellStyle} onLayout={onLayout}>
2319
- {element}
2320
- {itemSeparator}
2321
- </View>
2322
- );
2323
- }
2324
- return (
2325
- <CellRendererComponent
2326
- {...this.props}
2327
- style={cellStyle}
2328
- onLayout={onLayout}>
2329
- {element}
2330
- {itemSeparator}
2331
- </CellRendererComponent>
2332
- );
2333
- }
2334
- }
2335
-
2336
- class VirtualizedCellWrapper extends React.Component<{
2337
- cellKey: string,
2338
- children: React.Node,
2339
- ...
2340
- }> {
2341
- static childContextTypes = {
2342
- virtualizedCell: PropTypes.shape({
2343
- cellKey: PropTypes.string,
2344
- }),
2345
- };
2346
-
2347
- getChildContext() {
2348
- return {
2349
- virtualizedCell: {
2350
- cellKey: this.props.cellKey,
2351
- },
2352
- };
2353
- }
2354
-
2355
- render() {
2356
- return this.props.children;
2357
- }
2358
- }
2359
-
2360
- function describeNestedLists(childList: {
2361
- +cellKey: string,
2362
- +key: string,
2363
- +ref: VirtualizedList,
2364
- +parentDebugInfo: ListDebugInfo,
2365
- +horizontal: boolean,
2366
- ...
2367
- }) {
2368
- let trace =
2369
- 'VirtualizedList trace:\n' +
2370
- ` Child (${childList.horizontal ? 'horizontal' : 'vertical'}):\n` +
2371
- ` listKey: ${childList.key}\n` +
2372
- ` cellKey: ${childList.cellKey}`;
2373
-
2374
- let debugInfo = childList.parentDebugInfo;
2375
- while (debugInfo) {
2376
- trace +=
2377
- `\n Parent (${debugInfo.horizontal ? 'horizontal' : 'vertical'}):\n` +
2378
- ` listKey: ${debugInfo.listKey}\n` +
2379
- ` cellKey: ${debugInfo.cellKey}`;
2380
- debugInfo = debugInfo.parent;
2381
- }
2382
- return trace;
2383
- }
2384
-
2385
- const styles = StyleSheet.create({
2386
- verticallyInverted: {
2387
- transform: [{scaleY: -1}],
2388
- },
2389
- horizontallyInverted: {
2390
- transform: [{scaleX: -1}],
2391
- },
2392
- row: {
2393
- flexDirection: 'row',
2394
- },
2395
- rowReverse: {
2396
- flexDirection: 'row-reverse',
2397
- },
2398
- columnReverse: {
2399
- flexDirection: 'column-reverse',
2400
- },
2401
- debug: {
2402
- flex: 1,
2403
- },
2404
- debugOverlayBase: {
2405
- position: 'absolute',
2406
- top: 0,
2407
- right: 0,
2408
- },
2409
- debugOverlay: {
2410
- bottom: 0,
2411
- width: 20,
2412
- borderColor: 'blue',
2413
- borderWidth: 1,
2414
- },
2415
- debugOverlayFrame: {
2416
- left: 0,
2417
- backgroundColor: 'orange',
2418
- },
2419
- debugOverlayFrameLast: {
2420
- left: 0,
2421
- borderColor: 'green',
2422
- borderWidth: 2,
2423
- },
2424
- debugOverlayFrameVis: {
2425
- left: 0,
2426
- borderColor: 'red',
2427
- borderWidth: 2,
2428
- },
2429
- });
2430
-
2431
- module.exports = VirtualizedList;
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
+ * @flow
8
+ * @format
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const Batchinator = require('../Interaction/Batchinator');
14
+ const FillRateHelper = require('./FillRateHelper');
15
+ const Platform = require('../Utilities/Platform'); // TODO(macOS GH#774)
16
+ const ReactNative = require('../Renderer/shims/ReactNative');
17
+ const RefreshControl = require('../Components/RefreshControl/RefreshControl');
18
+ const ScrollView = require('../Components/ScrollView/ScrollView');
19
+ const StyleSheet = require('../StyleSheet/StyleSheet');
20
+ const View = require('../Components/View/View');
21
+ const ViewabilityHelper = require('./ViewabilityHelper');
22
+
23
+ const flattenStyle = require('../StyleSheet/flattenStyle');
24
+ const infoLog = require('../Utilities/infoLog');
25
+ const invariant = require('invariant');
26
+
27
+ const {computeWindowedRenderLimits} = require('./VirtualizeUtils');
28
+
29
+ import * as React from 'react';
30
+ import type {ScrollResponderType} from '../Components/ScrollView/ScrollView';
31
+ import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
32
+ import type {
33
+ ViewabilityConfig,
34
+ ViewToken,
35
+ ViewabilityConfigCallbackPair,
36
+ } from './ViewabilityHelper';
37
+ import type {ScrollEvent} from '../Types/CoreEventTypes'; // TODO(macOS GH#774)
38
+ import {
39
+ VirtualizedListCellContextProvider,
40
+ VirtualizedListContext,
41
+ VirtualizedListContextProvider,
42
+ type ChildListState,
43
+ type ListDebugInfo,
44
+ } from './VirtualizedListContext.js';
45
+
46
+ type Item = any;
47
+
48
+ export type Separators = {
49
+ highlight: () => void,
50
+ unhighlight: () => void,
51
+ updateProps: (select: 'leading' | 'trailing', newProps: Object) => void,
52
+ ...
53
+ };
54
+
55
+ export type RenderItemProps<ItemT> = {
56
+ item: ItemT,
57
+ index: number,
58
+ isSelected: ?boolean, // TODO(macOS GH#774)
59
+ separators: Separators,
60
+ ...
61
+ };
62
+
63
+ export type RenderItemType<ItemT> = (
64
+ info: RenderItemProps<ItemT>,
65
+ ) => React.Node;
66
+
67
+ type ViewabilityHelperCallbackTuple = {
68
+ viewabilityHelper: ViewabilityHelper,
69
+ onViewableItemsChanged: (info: {
70
+ viewableItems: Array<ViewToken>,
71
+ changed: Array<ViewToken>,
72
+ ...
73
+ }) => void,
74
+ ...
75
+ };
76
+
77
+ // [TODO(macOS GH#774)
78
+ export type SelectedRowIndexPathType = {
79
+ sectionIndex: number,
80
+ rowIndex: number,
81
+ }; // ]TODO(macOS GH#774)
82
+
83
+ type RequiredProps = {|
84
+ /**
85
+ * The default accessor functions assume this is an Array<{key: string} | {id: string}> but you can override
86
+ * getItem, getItemCount, and keyExtractor to handle any type of index-based data.
87
+ */
88
+ data?: any,
89
+ /**
90
+ * A generic accessor for extracting an item from any sort of data blob.
91
+ */
92
+ getItem: (data: any, index: number) => ?Item,
93
+ /**
94
+ * Determines how many items are in the data blob.
95
+ */
96
+ getItemCount: (data: any) => number,
97
+ |};
98
+ type OptionalProps = {|
99
+ renderItem?: ?RenderItemType<Item>,
100
+ /**
101
+ * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and
102
+ * implementation, but with a significant perf hit.
103
+ */
104
+ debug?: ?boolean,
105
+ /**
106
+ * DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully
107
+ * unmounts react instances that are outside of the render window. You should only need to disable
108
+ * this for debugging purposes.
109
+ */
110
+ disableVirtualization?: ?boolean,
111
+ /**
112
+ * Handles key down events and updates selection based on the key event
113
+ *
114
+ * @platform macos
115
+ */
116
+ enableSelectionOnKeyPress?: ?boolean, // TODO(macOS GH#774)
117
+ /**
118
+ * A marker property for telling the list to re-render (since it implements `PureComponent`). If
119
+ * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
120
+ * `data` prop, stick it here and treat it immutably.
121
+ */
122
+ extraData?: any,
123
+ // e.g. height, y
124
+ getItemLayout?: (
125
+ data: any,
126
+ index: number,
127
+ ) => {
128
+ length: number,
129
+ offset: number,
130
+ index: number,
131
+ ...
132
+ },
133
+ horizontal?: ?boolean,
134
+ /**
135
+ * How many items to render in the initial batch. This should be enough to fill the screen but not
136
+ * much more. Note these items will never be unmounted as part of the windowed rendering in order
137
+ * to improve perceived performance of scroll-to-top actions.
138
+ */
139
+ initialNumToRender: number,
140
+ /**
141
+ * Instead of starting at the top with the first item, start at `initialScrollIndex`. This
142
+ * disables the "scroll to top" optimization that keeps the first `initialNumToRender` items
143
+ * always rendered and immediately renders the items starting at this initial index. Requires
144
+ * `getItemLayout` to be implemented.
145
+ */
146
+ initialScrollIndex?: ?number,
147
+ /**
148
+ * Reverses the direction of scroll. Uses scale transforms of -1.
149
+ */
150
+ inverted?: ?boolean,
151
+ keyExtractor: (item: Item, index: number) => string,
152
+ /**
153
+ * Each cell is rendered using this element. Can be a React Component Class,
154
+ * or a render function. Defaults to using View.
155
+ */
156
+ CellRendererComponent?: ?React.ComponentType<any>,
157
+ /**
158
+ * Rendered in between each item, but not at the top or bottom. By default, `highlighted` and
159
+ * `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight`
160
+ * which will update the `highlighted` prop, but you can also add custom props with
161
+ * `separators.updateProps`.
162
+ */
163
+ ItemSeparatorComponent?: ?React.ComponentType<any>,
164
+ /**
165
+ * Takes an item from `data` and renders it into the list. Example usage:
166
+ *
167
+ * <FlatList
168
+ * ItemSeparatorComponent={Platform.OS !== 'android' && ({highlighted}) => (
169
+ * <View style={[style.separator, highlighted && {marginLeft: 0}]} />
170
+ * )}
171
+ * data={[{title: 'Title Text', key: 'item1'}]}
172
+ * ListItemComponent={({item, separators}) => (
173
+ * <TouchableHighlight
174
+ * onPress={() => this._onPress(item)}
175
+ * onShowUnderlay={separators.highlight}
176
+ * onHideUnderlay={separators.unhighlight}>
177
+ * <View style={{backgroundColor: 'white'}}>
178
+ * <Text>{item.title}</Text>
179
+ * </View>
180
+ * </TouchableHighlight>
181
+ * )}
182
+ * />
183
+ *
184
+ * Provides additional metadata like `index` if you need it, as well as a more generic
185
+ * `separators.updateProps` function which let's you set whatever props you want to change the
186
+ * rendering of either the leading separator or trailing separator in case the more common
187
+ * `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for
188
+ * your use-case.
189
+ */
190
+ ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
191
+ /**
192
+ * Rendered when the list is empty. Can be a React Component Class, a render function, or
193
+ * a rendered element.
194
+ */
195
+ ListEmptyComponent?: ?(React.ComponentType<any> | React.Element<any>),
196
+ /**
197
+ * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or
198
+ * a rendered element.
199
+ */
200
+ ListFooterComponent?: ?(React.ComponentType<any> | React.Element<any>),
201
+ /**
202
+ * Styling for internal View for ListFooterComponent
203
+ */
204
+ ListFooterComponentStyle?: ViewStyleProp,
205
+ /**
206
+ * Rendered at the top of all the items. Can be a React Component Class, a render function, or
207
+ * a rendered element.
208
+ */
209
+ ListHeaderComponent?: ?(React.ComponentType<any> | React.Element<any>),
210
+ /**
211
+ * Styling for internal View for ListHeaderComponent
212
+ */
213
+ ListHeaderComponentStyle?: ViewStyleProp,
214
+ /**
215
+ * A unique identifier for this list. If there are multiple VirtualizedLists at the same level of
216
+ * nesting within another VirtualizedList, this key is necessary for virtualization to
217
+ * work properly.
218
+ */
219
+ listKey?: string,
220
+ /**
221
+ * The maximum number of items to render in each incremental render batch. The more rendered at
222
+ * once, the better the fill rate, but responsiveness may suffer because rendering content may
223
+ * interfere with responding to button taps or other interactions.
224
+ */
225
+ maxToRenderPerBatch: number,
226
+ /**
227
+ * Called once when the scroll position gets within `onEndReachedThreshold` of the rendered
228
+ * content.
229
+ */
230
+ onEndReached?: ?(info: {distanceFromEnd: number, ...}) => void,
231
+ /**
232
+ * How far from the end (in units of visible length of the list) the bottom edge of the
233
+ * list must be from the end of the content to trigger the `onEndReached` callback.
234
+ * Thus a value of 0.5 will trigger `onEndReached` when the end of the content is
235
+ * within half the visible length of the list.
236
+ */
237
+ onEndReachedThreshold?: ?number,
238
+ /**
239
+ * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make
240
+ * sure to also set the `refreshing` prop correctly.
241
+ */
242
+ onRefresh?: ?() => void,
243
+ /**
244
+ * Used to handle failures when scrolling to an index that has not been measured yet. Recommended
245
+ * action is to either compute your own offset and `scrollTo` it, or scroll as far as possible and
246
+ * then try again after more items have been rendered.
247
+ */
248
+ onScrollToIndexFailed?: ?(info: {
249
+ index: number,
250
+ highestMeasuredFrameIndex: number,
251
+ averageItemLength: number,
252
+ ...
253
+ }) => void,
254
+ /**
255
+ * If provided, will be invoked whenever the selection on the list changes. Make sure to set
256
+ * the property enableSelectionOnKeyPress to true to change selection via keyboard (macOS).
257
+ *
258
+ * @platform macos
259
+ */
260
+ onSelectionChanged?: ?(info: {
261
+ previousSelection: number,
262
+ newSelection: number,
263
+ item: ?Item,
264
+ }) => void, // TODO(macOS GH#774)
265
+ /**
266
+ * If provided, called when 'Enter' key is pressed on an item.
267
+ *
268
+ * @platform macos
269
+ */
270
+ onSelectionEntered?: ?(item: ?Item) => void, // TODO(macOS GH#774)
271
+
272
+ sectionIndex?: number, // TODO(macOS GH#774)
273
+ rowIndex?: number, // TODO(macOS GH#774)
274
+
275
+ /**
276
+ * Called when the viewability of rows changes, as defined by the
277
+ * `viewabilityConfig` prop.
278
+ */
279
+ onViewableItemsChanged?: ?(info: {
280
+ viewableItems: Array<ViewToken>,
281
+ changed: Array<ViewToken>,
282
+ ...
283
+ }) => void,
284
+ persistentScrollbar?: ?boolean,
285
+ /**
286
+ * Set this when offset is needed for the loading indicator to show correctly.
287
+ * @platform android
288
+ */
289
+ progressViewOffset?: number,
290
+ /**
291
+ * A custom refresh control element. When set, it overrides the default
292
+ * <RefreshControl> component built internally. The onRefresh and refreshing
293
+ * props are also ignored. Only works for vertical VirtualizedList.
294
+ */
295
+ refreshControl?: ?React.Element<any>,
296
+ /**
297
+ * Set this true while waiting for new data from a refresh.
298
+ */
299
+ refreshing?: ?boolean,
300
+ /**
301
+ * Note: may have bugs (missing content) in some circumstances - use at your own risk.
302
+ *
303
+ * This may improve scroll performance for large lists.
304
+ */
305
+ removeClippedSubviews?: boolean,
306
+ /**
307
+ * Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
308
+ */
309
+ renderScrollComponent?: (props: Object) => React.Element<any>,
310
+ /**
311
+ * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
312
+ * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
313
+ */
314
+ updateCellsBatchingPeriod: number,
315
+ /**
316
+ * See `ViewabilityHelper` for flow type and further documentation.
317
+ */
318
+ viewabilityConfig?: ViewabilityConfig,
319
+ /**
320
+ * List of ViewabilityConfig/onViewableItemsChanged pairs. A specific onViewableItemsChanged
321
+ * will be called when its corresponding ViewabilityConfig's conditions are met.
322
+ */
323
+ viewabilityConfigCallbackPairs?: Array<ViewabilityConfigCallbackPair>,
324
+ /**
325
+ * Determines the maximum number of items rendered outside of the visible area, in units of
326
+ * visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will
327
+ * render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing
328
+ * this number will reduce memory consumption and may improve performance, but will increase the
329
+ * chance that fast scrolling may reveal momentary blank areas of unrendered content.
330
+ */
331
+ windowSize: number,
332
+ /**
333
+ * The legacy implementation is no longer supported.
334
+ */
335
+ legacyImplementation?: empty,
336
+ |};
337
+
338
+ type Props = {|
339
+ ...React.ElementConfig<typeof ScrollView>,
340
+ ...RequiredProps,
341
+ ...OptionalProps,
342
+ |};
343
+
344
+ type DefaultProps = {|
345
+ disableVirtualization: boolean,
346
+ horizontal: boolean,
347
+ initialNumToRender: number,
348
+ keyExtractor: (item: Item, index: number) => string,
349
+ maxToRenderPerBatch: number,
350
+ onEndReachedThreshold: number,
351
+ scrollEventThrottle: number,
352
+ updateCellsBatchingPeriod: number,
353
+ windowSize: number,
354
+ |};
355
+
356
+ let _usedIndexForKey = false;
357
+ let _keylessItemComponentName: string = '';
358
+
359
+ type State = {
360
+ first: number,
361
+ last: number,
362
+ selectedRowIndex: number, // TODO(macOS GH#774)
363
+ ...
364
+ };
365
+
366
+ /**
367
+ * Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist.html)
368
+ * and [`<SectionList>`](https://reactnative.dev/docs/sectionlist.html) components, which are also better
369
+ * documented. In general, this should only really be used if you need more flexibility than
370
+ * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.
371
+ *
372
+ * Virtualization massively improves memory consumption and performance of large lists by
373
+ * maintaining a finite render window of active items and replacing all items outside of the render
374
+ * window with appropriately sized blank space. The window adapts to scrolling behavior, and items
375
+ * are rendered incrementally with low-pri (after any running interactions) if they are far from the
376
+ * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.
377
+ *
378
+ * Some caveats:
379
+ *
380
+ * - Internal state is not preserved when content scrolls out of the render window. Make sure all
381
+ * your data is captured in the item data or external stores like Flux, Redux, or Relay.
382
+ * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-
383
+ * equal. Make sure that everything your `renderItem` function depends on is passed as a prop
384
+ * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on
385
+ * changes. This includes the `data` prop and parent component state.
386
+ * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously
387
+ * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see
388
+ * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,
389
+ * and we are working on improving it behind the scenes.
390
+ * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.
391
+ * Alternatively, you can provide a custom `keyExtractor` prop.
392
+ *
393
+ */
394
+ class VirtualizedList extends React.PureComponent<Props, State> {
395
+ static contextType: typeof VirtualizedListContext = VirtualizedListContext;
396
+
397
+ // scrollToEnd may be janky without getItemLayout prop
398
+ scrollToEnd(params?: ?{animated?: ?boolean, ...}) {
399
+ const animated = params ? params.animated : true;
400
+ const veryLast = this.props.getItemCount(this.props.data) - 1;
401
+ const frame = this._getFrameMetricsApprox(veryLast);
402
+ const offset = Math.max(
403
+ 0,
404
+ frame.offset +
405
+ frame.length +
406
+ this._footerLength -
407
+ this._scrollMetrics.visibleLength,
408
+ );
409
+
410
+ if (this._scrollRef == null) {
411
+ return;
412
+ }
413
+
414
+ if (this._scrollRef.scrollTo == null) {
415
+ console.warn(
416
+ 'No scrollTo method provided. This may be because you have two nested ' +
417
+ 'VirtualizedLists with the same orientation, or because you are ' +
418
+ 'using a custom component that does not implement scrollTo.',
419
+ );
420
+ return;
421
+ }
422
+
423
+ this._scrollRef.scrollTo(
424
+ this.props.horizontal ? {x: offset, animated} : {y: offset, animated},
425
+ );
426
+ }
427
+
428
+ // scrollToIndex may be janky without getItemLayout prop
429
+ scrollToIndex(params: {
430
+ animated?: ?boolean,
431
+ index: number,
432
+ viewOffset?: number,
433
+ viewPosition?: number,
434
+ ...
435
+ }) {
436
+ const {
437
+ data,
438
+ horizontal,
439
+ getItemCount,
440
+ getItemLayout,
441
+ onScrollToIndexFailed,
442
+ } = this.props;
443
+ const {animated, index, viewOffset, viewPosition} = params;
444
+ invariant(
445
+ index >= 0,
446
+ `scrollToIndex out of range: requested index ${index} but minimum is 0`,
447
+ );
448
+ invariant(
449
+ getItemCount(data) >= 1,
450
+ `scrollToIndex out of range: item length ${getItemCount(
451
+ data,
452
+ )} but minimum is 1`,
453
+ );
454
+ invariant(
455
+ index < getItemCount(data),
456
+ `scrollToIndex out of range: requested index ${index} is out of 0 to ${getItemCount(
457
+ data,
458
+ ) - 1}`,
459
+ );
460
+ if (!getItemLayout && index > this._highestMeasuredFrameIndex) {
461
+ invariant(
462
+ !!onScrollToIndexFailed,
463
+ 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' +
464
+ 'otherwise there is no way to know the location of offscreen indices or handle failures.',
465
+ );
466
+ onScrollToIndexFailed({
467
+ averageItemLength: this._averageCellLength,
468
+ highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,
469
+ index,
470
+ });
471
+ return;
472
+ }
473
+ const frame = this._getFrameMetricsApprox(index);
474
+ const offset =
475
+ Math.max(
476
+ 0,
477
+ frame.offset -
478
+ (viewPosition || 0) *
479
+ (this._scrollMetrics.visibleLength - frame.length),
480
+ ) - (viewOffset || 0);
481
+
482
+ if (this._scrollRef == null) {
483
+ return;
484
+ }
485
+
486
+ if (this._scrollRef.scrollTo == null) {
487
+ console.warn(
488
+ 'No scrollTo method provided. This may be because you have two nested ' +
489
+ 'VirtualizedLists with the same orientation, or because you are ' +
490
+ 'using a custom component that does not implement scrollTo.',
491
+ );
492
+ return;
493
+ }
494
+
495
+ this._scrollRef.scrollTo(
496
+ horizontal ? {x: offset, animated} : {y: offset, animated},
497
+ );
498
+ }
499
+
500
+ // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -
501
+ // use scrollToIndex instead if possible.
502
+ scrollToItem(params: {
503
+ animated?: ?boolean,
504
+ item: Item,
505
+ viewPosition?: number,
506
+ ...
507
+ }) {
508
+ const {item} = params;
509
+ const {data, getItem, getItemCount} = this.props;
510
+ const itemCount = getItemCount(data);
511
+ for (let index = 0; index < itemCount; index++) {
512
+ if (getItem(data, index) === item) {
513
+ this.scrollToIndex({...params, index});
514
+ break;
515
+ }
516
+ }
517
+ }
518
+
519
+ /**
520
+ * Scroll to a specific content pixel offset in the list.
521
+ *
522
+ * Param `offset` expects the offset to scroll to.
523
+ * In case of `horizontal` is true, the offset is the x-value,
524
+ * in any other case the offset is the y-value.
525
+ *
526
+ * Param `animated` (`true` by default) defines whether the list
527
+ * should do an animation while scrolling.
528
+ */
529
+ scrollToOffset(params: {animated?: ?boolean, offset: number, ...}) {
530
+ const {animated, offset} = params;
531
+
532
+ if (this._scrollRef == null) {
533
+ return;
534
+ }
535
+
536
+ if (this._scrollRef.scrollTo == null) {
537
+ console.warn(
538
+ 'No scrollTo method provided. This may be because you have two nested ' +
539
+ 'VirtualizedLists with the same orientation, or because you are ' +
540
+ 'using a custom component that does not implement scrollTo.',
541
+ );
542
+ return;
543
+ }
544
+
545
+ this._scrollRef.scrollTo(
546
+ this.props.horizontal ? {x: offset, animated} : {y: offset, animated},
547
+ );
548
+ }
549
+
550
+ // [TODO(macOS GH#774)
551
+ ensureItemAtIndexIsVisible(rowIndex: number) {
552
+ const frame = this._getFrameMetricsApprox(rowIndex);
553
+ const visTop = this._scrollMetrics.offset;
554
+ const visLen = this._scrollMetrics.visibleLength;
555
+ const visEnd = visTop + visLen;
556
+ const contentLength = this._scrollMetrics.contentLength;
557
+ const frameEnd = frame.offset + frame.length;
558
+
559
+ if (frameEnd > visEnd) {
560
+ const newOffset = Math.min(contentLength, visTop + (frameEnd - visEnd));
561
+ this.scrollToOffset({offset: newOffset});
562
+ } else if (frame.offset < visTop) {
563
+ const newOffset = Math.max(0, visTop - frame.length);
564
+ this.scrollToOffset({offset: newOffset});
565
+ }
566
+ }
567
+ // ]TODO(macOS GH#774)
568
+
569
+ recordInteraction() {
570
+ this._nestedChildLists.forEach(childList => {
571
+ childList.ref && childList.ref.recordInteraction();
572
+ });
573
+ this._viewabilityTuples.forEach(t => {
574
+ t.viewabilityHelper.recordInteraction();
575
+ });
576
+ this._updateViewableItems(this.props.data);
577
+ }
578
+
579
+ flashScrollIndicators() {
580
+ if (this._scrollRef == null) {
581
+ return;
582
+ }
583
+
584
+ this._scrollRef.flashScrollIndicators();
585
+ }
586
+
587
+ /**
588
+ * Provides a handle to the underlying scroll responder.
589
+ * Note that `this._scrollRef` might not be a `ScrollView`, so we
590
+ * need to check that it responds to `getScrollResponder` before calling it.
591
+ */
592
+ getScrollResponder(): ?ScrollResponderType {
593
+ if (this._scrollRef && this._scrollRef.getScrollResponder) {
594
+ return this._scrollRef.getScrollResponder();
595
+ }
596
+ }
597
+
598
+ getScrollableNode(): ?number {
599
+ if (this._scrollRef && this._scrollRef.getScrollableNode) {
600
+ return this._scrollRef.getScrollableNode();
601
+ } else {
602
+ return ReactNative.findNodeHandle(this._scrollRef);
603
+ }
604
+ }
605
+
606
+ getScrollRef():
607
+ | ?React.ElementRef<typeof ScrollView>
608
+ | ?React.ElementRef<typeof View> {
609
+ if (this._scrollRef && this._scrollRef.getScrollRef) {
610
+ return this._scrollRef.getScrollRef();
611
+ } else {
612
+ return this._scrollRef;
613
+ }
614
+ }
615
+
616
+ setNativeProps(props: Object) {
617
+ if (this._scrollRef) {
618
+ this._scrollRef.setNativeProps(props);
619
+ }
620
+ }
621
+
622
+ static defaultProps: DefaultProps = {
623
+ disableVirtualization: false,
624
+ horizontal: false,
625
+ initialNumToRender: 10,
626
+ keyExtractor: (item: Item, index: number) => {
627
+ if (item.key != null) {
628
+ return item.key;
629
+ }
630
+ if (item.id != null) {
631
+ return item.id;
632
+ }
633
+ _usedIndexForKey = true;
634
+ if (item.type && item.type.displayName) {
635
+ _keylessItemComponentName = item.type.displayName;
636
+ }
637
+ return String(index);
638
+ },
639
+ maxToRenderPerBatch: 10,
640
+ onEndReachedThreshold: 2, // multiples of length
641
+ scrollEventThrottle: 50,
642
+ updateCellsBatchingPeriod: 50,
643
+ windowSize: 21, // multiples of length
644
+ };
645
+
646
+ _getCellKey(): string {
647
+ return this.context?.cellKey || 'rootList';
648
+ }
649
+
650
+ _getListKey(): string {
651
+ return this.props.listKey || this._getCellKey();
652
+ }
653
+
654
+ _getDebugInfo(): ListDebugInfo {
655
+ return {
656
+ listKey: this._getListKey(),
657
+ cellKey: this._getCellKey(),
658
+ horizontal: !!this.props.horizontal,
659
+ parent: this.context?.debugInfo,
660
+ };
661
+ }
662
+
663
+ _getScrollMetrics = () => {
664
+ return this._scrollMetrics;
665
+ };
666
+
667
+ hasMore(): boolean {
668
+ return this._hasMore;
669
+ }
670
+
671
+ _getOutermostParentListRef = () => {
672
+ if (this._isNestedWithSameOrientation()) {
673
+ return this.context.getOutermostParentListRef();
674
+ } else {
675
+ return this;
676
+ }
677
+ };
678
+
679
+ _getNestedChildState = (key: string): ?ChildListState => {
680
+ const existingChildData = this._nestedChildLists.get(key);
681
+ return existingChildData && existingChildData.state;
682
+ };
683
+
684
+ _registerAsNestedChild = (childList: {
685
+ cellKey: string,
686
+ key: string,
687
+ ref: VirtualizedList,
688
+ parentDebugInfo: ListDebugInfo,
689
+ ...
690
+ }): ?ChildListState => {
691
+ // Register the mapping between this child key and the cellKey for its cell
692
+ const childListsInCell =
693
+ this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();
694
+ childListsInCell.add(childList.key);
695
+ this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);
696
+ const existingChildData = this._nestedChildLists.get(childList.key);
697
+ if (existingChildData && existingChildData.ref !== null) {
698
+ console.error(
699
+ 'A VirtualizedList contains a cell which itself contains ' +
700
+ 'more than one VirtualizedList of the same orientation as the parent ' +
701
+ 'list. You must pass a unique listKey prop to each sibling list.\n\n' +
702
+ describeNestedLists({
703
+ ...childList,
704
+ // We're called from the child's componentDidMount, so it's safe to
705
+ // read the child's props here (albeit weird).
706
+ horizontal: !!childList.ref.props.horizontal,
707
+ }),
708
+ );
709
+ }
710
+ this._nestedChildLists.set(childList.key, {
711
+ ref: childList.ref,
712
+ state: null,
713
+ });
714
+
715
+ if (this._hasInteracted) {
716
+ childList.ref.recordInteraction();
717
+ }
718
+ };
719
+
720
+ _unregisterAsNestedChild = (childList: {
721
+ key: string,
722
+ state: ChildListState,
723
+ ...
724
+ }): void => {
725
+ this._nestedChildLists.set(childList.key, {
726
+ ref: null,
727
+ state: childList.state,
728
+ });
729
+ };
730
+
731
+ state: State;
732
+
733
+ constructor(props: Props) {
734
+ super(props);
735
+ invariant(
736
+ // $FlowFixMe
737
+ !props.onScroll || !props.onScroll.__isNative,
738
+ 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' +
739
+ 'to support native onScroll events with useNativeDriver',
740
+ );
741
+
742
+ invariant(
743
+ props.windowSize > 0,
744
+ 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.',
745
+ );
746
+
747
+ this._fillRateHelper = new FillRateHelper(this._getFrameMetrics);
748
+ this._updateCellsToRenderBatcher = new Batchinator(
749
+ this._updateCellsToRender,
750
+ this.props.updateCellsBatchingPeriod,
751
+ );
752
+
753
+ if (this.props.viewabilityConfigCallbackPairs) {
754
+ this._viewabilityTuples = this.props.viewabilityConfigCallbackPairs.map(
755
+ pair => ({
756
+ viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),
757
+ onViewableItemsChanged: pair.onViewableItemsChanged,
758
+ }),
759
+ );
760
+ } else if (this.props.onViewableItemsChanged) {
761
+ this._viewabilityTuples.push({
762
+ viewabilityHelper: new ViewabilityHelper(this.props.viewabilityConfig),
763
+ onViewableItemsChanged: this.props.onViewableItemsChanged,
764
+ });
765
+ }
766
+
767
+ let initialState = {
768
+ first: this.props.initialScrollIndex || 0,
769
+ last:
770
+ Math.min(
771
+ this.props.getItemCount(this.props.data),
772
+ (this.props.initialScrollIndex || 0) + this.props.initialNumToRender,
773
+ ) - 1,
774
+ selectedRowIndex: 0, // TODO(macOS GH#774)
775
+ };
776
+
777
+ if (this._isNestedWithSameOrientation()) {
778
+ const storedState = this.context.getNestedChildState(this._getListKey());
779
+ if (storedState) {
780
+ initialState = storedState;
781
+ this.state = storedState;
782
+ this._frames = storedState.frames;
783
+ }
784
+ }
785
+
786
+ this.state = initialState;
787
+ }
788
+
789
+ componentDidMount() {
790
+ if (this._isNestedWithSameOrientation()) {
791
+ this.context.registerAsNestedChild({
792
+ cellKey: this._getCellKey(),
793
+ key: this._getListKey(),
794
+ ref: this,
795
+ // NOTE: When the child mounts (here) it's not necessarily safe to read
796
+ // the parent's props. This is why we explicitly propagate debugInfo
797
+ // "down" via context and "up" again via this method call on the
798
+ // parent.
799
+ parentDebugInfo: this.context.debugInfo,
800
+ });
801
+ }
802
+ }
803
+
804
+ componentWillUnmount() {
805
+ if (this._isNestedWithSameOrientation()) {
806
+ this.context.unregisterAsNestedChild({
807
+ key: this._getListKey(),
808
+ state: {
809
+ first: this.state.first,
810
+ last: this.state.last,
811
+ frames: this._frames,
812
+ },
813
+ });
814
+ }
815
+ this._updateViewableItems(null);
816
+ this._updateCellsToRenderBatcher.dispose({abort: true});
817
+ this._viewabilityTuples.forEach(tuple => {
818
+ tuple.viewabilityHelper.dispose();
819
+ });
820
+ this._fillRateHelper.deactivateAndFlush();
821
+ }
822
+
823
+ static getDerivedStateFromProps(newProps: Props, prevState: State): State {
824
+ const {data, getItemCount, maxToRenderPerBatch} = newProps;
825
+ // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make
826
+ // sure we're rendering a reasonable range here.
827
+ return {
828
+ first: Math.max(
829
+ 0,
830
+ Math.min(prevState.first, getItemCount(data) - 1 - maxToRenderPerBatch),
831
+ ),
832
+ last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1)),
833
+ selectedRowIndex: Math.max(
834
+ 0,
835
+ Math.min(prevState.selectedRowIndex, getItemCount(data)),
836
+ ), // TODO(macOS GH#774)
837
+ };
838
+ }
839
+
840
+ _pushCells(
841
+ cells: Array<Object>,
842
+ stickyHeaderIndices: Array<number>,
843
+ stickyIndicesFromProps: Set<number>,
844
+ first: number,
845
+ last: number,
846
+ inversionStyle: ViewStyleProp,
847
+ ) {
848
+ const {
849
+ CellRendererComponent,
850
+ ItemSeparatorComponent,
851
+ data,
852
+ getItem,
853
+ getItemCount,
854
+ horizontal,
855
+ keyExtractor,
856
+ } = this.props;
857
+ const stickyOffset = this.props.ListHeaderComponent ? 1 : 0;
858
+ const end = getItemCount(data) - 1;
859
+ let prevCellKey;
860
+ last = Math.min(end, last);
861
+ for (let ii = first; ii <= last; ii++) {
862
+ const item = getItem(data, ii);
863
+ const key = keyExtractor(item, ii);
864
+ this._indicesToKeys.set(ii, key);
865
+ if (stickyIndicesFromProps.has(ii + stickyOffset)) {
866
+ stickyHeaderIndices.push(cells.length);
867
+ }
868
+ cells.push(
869
+ <CellRenderer
870
+ CellRendererComponent={CellRendererComponent}
871
+ ItemSeparatorComponent={ii < end ? ItemSeparatorComponent : undefined}
872
+ cellKey={key}
873
+ fillRateHelper={this._fillRateHelper}
874
+ horizontal={horizontal}
875
+ index={ii}
876
+ inversionStyle={inversionStyle}
877
+ item={item}
878
+ isSelected={this.state.selectedRowIndex === ii ? true : false} // TODO(macOS GH#774)
879
+ key={key}
880
+ prevCellKey={prevCellKey}
881
+ onUpdateSeparators={this._onUpdateSeparators}
882
+ onLayout={e => this._onCellLayout(e, key, ii)}
883
+ onUnmount={this._onCellUnmount}
884
+ parentProps={this.props}
885
+ ref={ref => {
886
+ this._cellRefs[key] = ref;
887
+ }}
888
+ />,
889
+ );
890
+ prevCellKey = key;
891
+ }
892
+ }
893
+
894
+ _onUpdateSeparators = (keys: Array<?string>, newProps: Object) => {
895
+ keys.forEach(key => {
896
+ const ref = key != null && this._cellRefs[key];
897
+ ref && ref.updateSeparatorProps(newProps);
898
+ });
899
+ };
900
+
901
+ _isVirtualizationDisabled(): boolean {
902
+ return this.props.disableVirtualization || false;
903
+ }
904
+
905
+ _isNestedWithSameOrientation(): boolean {
906
+ const nestedContext = this.context;
907
+ return !!(
908
+ nestedContext && !!nestedContext.horizontal === !!this.props.horizontal
909
+ );
910
+ }
911
+
912
+ render(): React.Node {
913
+ if (__DEV__) {
914
+ const flatStyles = flattenStyle(this.props.contentContainerStyle);
915
+ if (flatStyles != null && flatStyles.flexWrap === 'wrap') {
916
+ console.warn(
917
+ '`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' +
918
+ 'Consider using `numColumns` with `FlatList` instead.',
919
+ );
920
+ }
921
+ }
922
+ const {
923
+ ListEmptyComponent,
924
+ ListFooterComponent,
925
+ ListHeaderComponent,
926
+ } = this.props;
927
+ const {data, horizontal} = this.props;
928
+ const isVirtualizationDisabled = this._isVirtualizationDisabled();
929
+ const inversionStyle = this.props.inverted
930
+ ? this.props.horizontal
931
+ ? styles.horizontallyInverted
932
+ : styles.verticallyInverted
933
+ : null;
934
+ const cells = [];
935
+ const stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
936
+ const stickyHeaderIndices = [];
937
+ if (ListHeaderComponent) {
938
+ if (stickyIndicesFromProps.has(0)) {
939
+ stickyHeaderIndices.push(0);
940
+ }
941
+ const element = React.isValidElement(ListHeaderComponent) ? (
942
+ ListHeaderComponent
943
+ ) : (
944
+ // $FlowFixMe
945
+ <ListHeaderComponent />
946
+ );
947
+ cells.push(
948
+ <VirtualizedListCellContextProvider
949
+ cellKey={this._getCellKey() + '-header'}
950
+ key="$header">
951
+ <View
952
+ onLayout={this._onLayoutHeader}
953
+ style={StyleSheet.compose(
954
+ inversionStyle,
955
+ this.props.ListHeaderComponentStyle,
956
+ )}>
957
+ {
958
+ // $FlowFixMe - Typing ReactNativeComponent revealed errors
959
+ element
960
+ }
961
+ </View>
962
+ </VirtualizedListCellContextProvider>,
963
+ );
964
+ }
965
+ const itemCount = this.props.getItemCount(data);
966
+ if (itemCount > 0) {
967
+ _usedIndexForKey = false;
968
+ _keylessItemComponentName = '';
969
+ const spacerKey = !horizontal ? 'height' : 'width';
970
+ const lastInitialIndex = this.props.initialScrollIndex
971
+ ? -1
972
+ : this.props.initialNumToRender - 1;
973
+ const {first, last} = this.state;
974
+ this._pushCells(
975
+ cells,
976
+ stickyHeaderIndices,
977
+ stickyIndicesFromProps,
978
+ 0,
979
+ lastInitialIndex,
980
+ inversionStyle,
981
+ );
982
+ const firstAfterInitial = Math.max(lastInitialIndex + 1, first);
983
+ if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {
984
+ let insertedStickySpacer = false;
985
+ if (stickyIndicesFromProps.size > 0) {
986
+ const stickyOffset = ListHeaderComponent ? 1 : 0;
987
+ // See if there are any sticky headers in the virtualized space that we need to render.
988
+ for (let ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {
989
+ if (stickyIndicesFromProps.has(ii + stickyOffset)) {
990
+ const initBlock = this._getFrameMetricsApprox(lastInitialIndex);
991
+ const stickyBlock = this._getFrameMetricsApprox(ii);
992
+ const leadSpace =
993
+ stickyBlock.offset -
994
+ initBlock.offset -
995
+ (this.props.initialScrollIndex ? 0 : initBlock.length);
996
+ cells.push(
997
+ /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
998
+ * suppresses an error found when Flow v0.111 was deployed. To
999
+ * see the error, delete this comment and run Flow. */
1000
+ <View key="$sticky_lead" style={{[spacerKey]: leadSpace}} />,
1001
+ );
1002
+ this._pushCells(
1003
+ cells,
1004
+ stickyHeaderIndices,
1005
+ stickyIndicesFromProps,
1006
+ ii,
1007
+ ii,
1008
+ inversionStyle,
1009
+ );
1010
+ const trailSpace =
1011
+ this._getFrameMetricsApprox(first).offset -
1012
+ (stickyBlock.offset + stickyBlock.length);
1013
+ cells.push(
1014
+ /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
1015
+ * suppresses an error found when Flow v0.111 was deployed. To
1016
+ * see the error, delete this comment and run Flow. */
1017
+ <View key="$sticky_trail" style={{[spacerKey]: trailSpace}} />,
1018
+ );
1019
+ insertedStickySpacer = true;
1020
+ break;
1021
+ }
1022
+ }
1023
+ }
1024
+ if (!insertedStickySpacer) {
1025
+ const initBlock = this._getFrameMetricsApprox(lastInitialIndex);
1026
+ const firstSpace =
1027
+ this._getFrameMetricsApprox(first).offset -
1028
+ (initBlock.offset + initBlock.length);
1029
+ cells.push(
1030
+ /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment
1031
+ * suppresses an error found when Flow v0.111 was deployed. To see
1032
+ * the error, delete this comment and run Flow. */
1033
+ <View key="$lead_spacer" style={{[spacerKey]: firstSpace}} />,
1034
+ );
1035
+ }
1036
+ }
1037
+ this._pushCells(
1038
+ cells,
1039
+ stickyHeaderIndices,
1040
+ stickyIndicesFromProps,
1041
+ firstAfterInitial,
1042
+ last,
1043
+ inversionStyle,
1044
+ );
1045
+ if (!this._hasWarned.keys && _usedIndexForKey) {
1046
+ console.warn(
1047
+ 'VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' +
1048
+ 'item or provide a custom keyExtractor.',
1049
+ _keylessItemComponentName,
1050
+ );
1051
+ this._hasWarned.keys = true;
1052
+ }
1053
+ if (!isVirtualizationDisabled && last < itemCount - 1) {
1054
+ const lastFrame = this._getFrameMetricsApprox(last);
1055
+ // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to
1056
+ // prevent the user for hyperscrolling into un-measured area because otherwise content will
1057
+ // likely jump around as it renders in above the viewport.
1058
+ const end = this.props.getItemLayout
1059
+ ? itemCount - 1
1060
+ : Math.min(itemCount - 1, this._highestMeasuredFrameIndex);
1061
+ const endFrame = this._getFrameMetricsApprox(end);
1062
+ const tailSpacerLength =
1063
+ endFrame.offset +
1064
+ endFrame.length -
1065
+ (lastFrame.offset + lastFrame.length);
1066
+ cells.push(
1067
+ /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
1068
+ * an error found when Flow v0.111 was deployed. To see the error,
1069
+ * delete this comment and run Flow. */
1070
+ <View key="$tail_spacer" style={{[spacerKey]: tailSpacerLength}} />,
1071
+ );
1072
+ }
1073
+ } else if (ListEmptyComponent) {
1074
+ const element: React.Element<any> = ((React.isValidElement(
1075
+ ListEmptyComponent,
1076
+ ) ? (
1077
+ ListEmptyComponent
1078
+ ) : (
1079
+ // $FlowFixMe
1080
+ <ListEmptyComponent />
1081
+ )): any);
1082
+ cells.push(
1083
+ React.cloneElement(element, {
1084
+ key: '$empty',
1085
+ onLayout: event => {
1086
+ this._onLayoutEmpty(event);
1087
+ if (element.props.onLayout) {
1088
+ element.props.onLayout(event);
1089
+ }
1090
+ },
1091
+ style: StyleSheet.compose(inversionStyle, element.props.style),
1092
+ }),
1093
+ );
1094
+ }
1095
+ if (ListFooterComponent) {
1096
+ const element = React.isValidElement(ListFooterComponent) ? (
1097
+ ListFooterComponent
1098
+ ) : (
1099
+ // $FlowFixMe
1100
+ <ListFooterComponent />
1101
+ );
1102
+ cells.push(
1103
+ <VirtualizedListCellContextProvider
1104
+ cellKey={this._getFooterCellKey()}
1105
+ key="$footer">
1106
+ <View
1107
+ onLayout={this._onLayoutFooter}
1108
+ style={StyleSheet.compose(
1109
+ inversionStyle,
1110
+ this.props.ListFooterComponentStyle,
1111
+ )}>
1112
+ {
1113
+ // $FlowFixMe - Typing ReactNativeComponent revealed errors
1114
+ element
1115
+ }
1116
+ </View>
1117
+ </VirtualizedListCellContextProvider>,
1118
+ );
1119
+ }
1120
+ const scrollProps = {
1121
+ ...this.props,
1122
+ onContentSizeChange: this._onContentSizeChange,
1123
+ onLayout: this._onLayout,
1124
+ onScroll: this._onScroll,
1125
+ onScrollBeginDrag: this._onScrollBeginDrag,
1126
+ onScrollEndDrag: this._onScrollEndDrag,
1127
+ onMomentumScrollEnd: this._onMomentumScrollEnd,
1128
+ scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
1129
+ invertStickyHeaders:
1130
+ this.props.invertStickyHeaders !== undefined
1131
+ ? this.props.invertStickyHeaders
1132
+ : this.props.inverted,
1133
+ stickyHeaderIndices,
1134
+ style: inversionStyle
1135
+ ? [inversionStyle, this.props.style]
1136
+ : this.props.style,
1137
+ };
1138
+
1139
+ this._hasMore =
1140
+ this.state.last < this.props.getItemCount(this.props.data) - 1;
1141
+
1142
+ const innerRet = (
1143
+ <VirtualizedListContextProvider
1144
+ value={{
1145
+ cellKey: null,
1146
+ getScrollMetrics: this._getScrollMetrics,
1147
+ horizontal: this.props.horizontal,
1148
+ getOutermostParentListRef: this._getOutermostParentListRef,
1149
+ getNestedChildState: this._getNestedChildState,
1150
+ registerAsNestedChild: this._registerAsNestedChild,
1151
+ unregisterAsNestedChild: this._unregisterAsNestedChild,
1152
+ debugInfo: this._getDebugInfo(),
1153
+ }}>
1154
+ {React.cloneElement(
1155
+ (
1156
+ this.props.renderScrollComponent ||
1157
+ this._defaultRenderScrollComponent
1158
+ )(scrollProps),
1159
+ {
1160
+ ref: this._captureScrollRef,
1161
+ },
1162
+ cells,
1163
+ )}
1164
+ </VirtualizedListContextProvider>
1165
+ );
1166
+ let ret = innerRet;
1167
+ if (__DEV__) {
1168
+ ret = (
1169
+ <ScrollView.Context.Consumer>
1170
+ {scrollContext => {
1171
+ if (
1172
+ scrollContext != null &&
1173
+ !scrollContext.horizontal === !this.props.horizontal &&
1174
+ !this._hasWarned.nesting &&
1175
+ this.context == null
1176
+ ) {
1177
+ // TODO (T46547044): use React.warn once 16.9 is sync'd: https://github.com/facebook/react/pull/15170
1178
+ // TODO (GitHub #818): Use console.error (as per 646605b90e666c4b0d1c1200a137eacf62b46f87)
1179
+ // instead of console.warn after resolving problems3 in RNTester's MultiColumn and SectionList example pages
1180
+ console.warn(
1181
+ 'VirtualizedLists should never be nested inside plain ScrollViews with the same ' +
1182
+ 'orientation because it can break windowing and other functionality - use another ' +
1183
+ 'VirtualizedList-backed container instead.',
1184
+ );
1185
+ this._hasWarned.nesting = true;
1186
+ }
1187
+ return innerRet;
1188
+ }}
1189
+ </ScrollView.Context.Consumer>
1190
+ );
1191
+ }
1192
+ if (this.props.debug) {
1193
+ return (
1194
+ <View style={styles.debug}>
1195
+ {ret}
1196
+ {this._renderDebugOverlay()}
1197
+ </View>
1198
+ );
1199
+ } else {
1200
+ return ret;
1201
+ }
1202
+ }
1203
+
1204
+ componentDidUpdate(prevProps: Props) {
1205
+ const {data, extraData} = this.props;
1206
+ if (data !== prevProps.data || extraData !== prevProps.extraData) {
1207
+ // clear the viewableIndices cache to also trigger
1208
+ // the onViewableItemsChanged callback with the new data
1209
+ this._viewabilityTuples.forEach(tuple => {
1210
+ tuple.viewabilityHelper.resetViewableIndices();
1211
+ });
1212
+ }
1213
+ // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen
1214
+ // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true
1215
+ // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with
1216
+ // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The
1217
+ // `_scheduleCellsToRenderUpdate` will check this condition and not perform
1218
+ // another hiPri update.
1219
+ const hiPriInProgress = this._hiPriInProgress;
1220
+ this._scheduleCellsToRenderUpdate();
1221
+ // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`
1222
+ // is triggered with `this._hiPriInProgress = true`
1223
+ if (hiPriInProgress) {
1224
+ this._hiPriInProgress = false;
1225
+ }
1226
+ }
1227
+
1228
+ _averageCellLength = 0;
1229
+ // Maps a cell key to the set of keys for all outermost child lists within that cell
1230
+ _cellKeysToChildListKeys: Map<string, Set<string>> = new Map();
1231
+ _cellRefs = {};
1232
+ _fillRateHelper: FillRateHelper;
1233
+ _frames = {};
1234
+ _footerLength = 0;
1235
+ _hasDoneInitialScroll = false;
1236
+ _hasInteracted = false;
1237
+ _hasMore = false;
1238
+ _hasWarned = {};
1239
+ _headerLength = 0;
1240
+ _hiPriInProgress: boolean = false; // flag to prevent infinite hiPri cell limit update
1241
+ _highestMeasuredFrameIndex = 0;
1242
+ _indicesToKeys: Map<number, string> = new Map();
1243
+ _nestedChildLists: Map<
1244
+ string,
1245
+ {
1246
+ ref: ?VirtualizedList,
1247
+ state: ?ChildListState,
1248
+ ...
1249
+ },
1250
+ > = new Map();
1251
+ _offsetFromParentVirtualizedList: number = 0;
1252
+ _prevParentOffset: number = 0;
1253
+ _scrollMetrics = {
1254
+ contentLength: 0,
1255
+ dOffset: 0,
1256
+ dt: 10,
1257
+ offset: 0,
1258
+ timestamp: 0,
1259
+ velocity: 0,
1260
+ visibleLength: 0,
1261
+ };
1262
+ _scrollRef: ?React.ElementRef<any> = null;
1263
+ _sentEndForContentLength = 0;
1264
+ _totalCellLength = 0;
1265
+ _totalCellsMeasured = 0;
1266
+ _updateCellsToRenderBatcher: Batchinator;
1267
+ _viewabilityTuples: Array<ViewabilityHelperCallbackTuple> = [];
1268
+
1269
+ _captureScrollRef = ref => {
1270
+ this._scrollRef = ref;
1271
+ };
1272
+
1273
+ _computeBlankness() {
1274
+ this._fillRateHelper.computeBlankness(
1275
+ this.props,
1276
+ this.state,
1277
+ this._scrollMetrics,
1278
+ );
1279
+ }
1280
+
1281
+ _defaultRenderScrollComponent = props => {
1282
+ let keyEventHandler = this.props.onScrollKeyDown; // [TODO(macOS GH#774)
1283
+ if (!keyEventHandler) {
1284
+ keyEventHandler = this.props.enableSelectionOnKeyPress
1285
+ ? this._handleKeyDown
1286
+ : null;
1287
+ }
1288
+ const preferredScrollerStyleDidChangeHandler = this.props
1289
+ .onPreferredScrollerStyleDidChange; // ]TODO(macOS GH#774)
1290
+ const onRefresh = props.onRefresh;
1291
+ if (this._isNestedWithSameOrientation()) {
1292
+ // $FlowFixMe - Typing ReactNativeComponent revealed errors
1293
+ return <View {...props} />;
1294
+ } else if (onRefresh) {
1295
+ invariant(
1296
+ typeof props.refreshing === 'boolean',
1297
+ '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +
1298
+ /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses
1299
+ * an error found when Flow v0.111 was deployed. To see the error,
1300
+ * delete this comment and run Flow. */
1301
+ JSON.stringify(props.refreshing) +
1302
+ '`',
1303
+ );
1304
+ return (
1305
+ // $FlowFixMe Invalid prop usage
1306
+ <ScrollView
1307
+ {...props}
1308
+ onScrollKeyDown={keyEventHandler} // TODO(macOS GH#774)
1309
+ onPreferredScrollerStyleDidChange={
1310
+ preferredScrollerStyleDidChangeHandler
1311
+ } // TODO(macOS GH#774)
1312
+ refreshControl={
1313
+ props.refreshControl == null ? (
1314
+ <RefreshControl
1315
+ refreshing={props.refreshing}
1316
+ onRefresh={onRefresh}
1317
+ progressViewOffset={props.progressViewOffset}
1318
+ />
1319
+ ) : (
1320
+ props.refreshControl
1321
+ )
1322
+ }
1323
+ />
1324
+ );
1325
+ } else {
1326
+ return (
1327
+ // $FlowFixMe Invalid prop usage
1328
+ <ScrollView
1329
+ {...props}
1330
+ onScrollKeyDown={keyEventHandler}
1331
+ onPreferredScrollerStyleDidChange={
1332
+ preferredScrollerStyleDidChangeHandler
1333
+ }
1334
+ />
1335
+ ); // TODO(macOS GH#774)
1336
+ }
1337
+ };
1338
+ _onCellLayout(e, cellKey, index) {
1339
+ const layout = e.nativeEvent.layout;
1340
+ const next = {
1341
+ offset: this._selectOffset(layout),
1342
+ length: this._selectLength(layout),
1343
+ index,
1344
+ inLayout: true,
1345
+ };
1346
+ const curr = this._frames[cellKey];
1347
+ if (
1348
+ !curr ||
1349
+ next.offset !== curr.offset ||
1350
+ next.length !== curr.length ||
1351
+ index !== curr.index
1352
+ ) {
1353
+ this._totalCellLength += next.length - (curr ? curr.length : 0);
1354
+ this._totalCellsMeasured += curr ? 0 : 1;
1355
+ this._averageCellLength =
1356
+ this._totalCellLength / this._totalCellsMeasured;
1357
+ this._frames[cellKey] = next;
1358
+ this._highestMeasuredFrameIndex = Math.max(
1359
+ this._highestMeasuredFrameIndex,
1360
+ index,
1361
+ );
1362
+ this._scheduleCellsToRenderUpdate();
1363
+ } else {
1364
+ this._frames[cellKey].inLayout = true;
1365
+ }
1366
+
1367
+ this._triggerRemeasureForChildListsInCell(cellKey);
1368
+
1369
+ this._computeBlankness();
1370
+ this._updateViewableItems(this.props.data);
1371
+ }
1372
+
1373
+ _onCellUnmount = (cellKey: string) => {
1374
+ const curr = this._frames[cellKey];
1375
+ if (curr) {
1376
+ this._frames[cellKey] = {...curr, inLayout: false};
1377
+ }
1378
+ };
1379
+
1380
+ _triggerRemeasureForChildListsInCell(cellKey: string): void {
1381
+ const childListKeys = this._cellKeysToChildListKeys.get(cellKey);
1382
+ if (childListKeys) {
1383
+ for (let childKey of childListKeys) {
1384
+ const childList = this._nestedChildLists.get(childKey);
1385
+ childList &&
1386
+ childList.ref &&
1387
+ childList.ref.measureLayoutRelativeToContainingList();
1388
+ }
1389
+ }
1390
+ }
1391
+
1392
+ measureLayoutRelativeToContainingList(): void {
1393
+ // TODO (T35574538): findNodeHandle sometimes crashes with "Unable to find
1394
+ // node on an unmounted component" during scrolling
1395
+ try {
1396
+ if (!this._scrollRef) {
1397
+ return;
1398
+ }
1399
+ // We are assuming that getOutermostParentListRef().getScrollRef()
1400
+ // is a non-null reference to a ScrollView
1401
+ this._scrollRef.measureLayout(
1402
+ this.context.getOutermostParentListRef().getScrollRef(),
1403
+ (x, y, width, height) => {
1404
+ this._offsetFromParentVirtualizedList = this._selectOffset({x, y});
1405
+ this._scrollMetrics.contentLength = this._selectLength({
1406
+ width,
1407
+ height,
1408
+ });
1409
+ const scrollMetrics = this._convertParentScrollMetrics(
1410
+ this.context.getScrollMetrics(),
1411
+ );
1412
+ this._scrollMetrics.visibleLength = scrollMetrics.visibleLength;
1413
+ this._scrollMetrics.offset = scrollMetrics.offset;
1414
+ },
1415
+ error => {
1416
+ console.warn(
1417
+ "VirtualizedList: Encountered an error while measuring a list's" +
1418
+ ' offset from its containing VirtualizedList.',
1419
+ );
1420
+ },
1421
+ );
1422
+ } catch (error) {
1423
+ console.warn(
1424
+ 'measureLayoutRelativeToContainingList threw an error',
1425
+ error.stack,
1426
+ );
1427
+ }
1428
+ }
1429
+
1430
+ _onLayout = (e: Object) => {
1431
+ if (this._isNestedWithSameOrientation()) {
1432
+ // Need to adjust our scroll metrics to be relative to our containing
1433
+ // VirtualizedList before we can make claims about list item viewability
1434
+ this.measureLayoutRelativeToContainingList();
1435
+ } else {
1436
+ this._scrollMetrics.visibleLength = this._selectLength(
1437
+ e.nativeEvent.layout,
1438
+ );
1439
+ }
1440
+ this.props.onLayout && this.props.onLayout(e);
1441
+ this._scheduleCellsToRenderUpdate();
1442
+ this._maybeCallOnEndReached();
1443
+ };
1444
+
1445
+ _onLayoutEmpty = e => {
1446
+ this.props.onLayout && this.props.onLayout(e);
1447
+ };
1448
+
1449
+ _getFooterCellKey(): string {
1450
+ return this._getCellKey() + '-footer';
1451
+ }
1452
+
1453
+ _onLayoutFooter = e => {
1454
+ this._triggerRemeasureForChildListsInCell(this._getFooterCellKey());
1455
+ this._footerLength = this._selectLength(e.nativeEvent.layout);
1456
+ };
1457
+
1458
+ _onLayoutHeader = e => {
1459
+ this._headerLength = this._selectLength(e.nativeEvent.layout);
1460
+ };
1461
+
1462
+ // [TODO(macOS GH#774)
1463
+ _selectRowAboveIndex = rowIndex => {
1464
+ const rowAbove = rowIndex > 0 ? rowIndex - 1 : rowIndex;
1465
+ this.setState(state => {
1466
+ return {selectedRowIndex: rowAbove};
1467
+ });
1468
+ return rowAbove;
1469
+ };
1470
+
1471
+ _selectRowBelowIndex = rowIndex => {
1472
+ if (this.props.getItemCount) {
1473
+ const {data} = this.props;
1474
+ const itemCount = this.props.getItemCount(data);
1475
+ const rowBelow = rowIndex < itemCount - 1 ? rowIndex + 1 : rowIndex;
1476
+ this.setState(state => {
1477
+ return {selectedRowIndex: rowBelow};
1478
+ });
1479
+ return rowBelow;
1480
+ } else {
1481
+ return rowIndex;
1482
+ }
1483
+ };
1484
+
1485
+ _handleKeyDown = (e: ScrollEvent) => {
1486
+ if (this.props.onScrollKeyDown) {
1487
+ this.props.onScrollKeyDown(e);
1488
+ } else {
1489
+ if (Platform.OS === 'macos') {
1490
+ // $FlowFixMe Cannot get e.nativeEvent because property nativeEvent is missing in Event
1491
+ const event = e.nativeEvent;
1492
+ const key = event.key;
1493
+
1494
+ let prevIndex = -1;
1495
+ let newIndex = -1;
1496
+ if ('selectedRowIndex' in this.state) {
1497
+ prevIndex = this.state.selectedRowIndex;
1498
+ }
1499
+
1500
+ const {data, getItem} = this.props;
1501
+ if (key === 'DOWN_ARROW') {
1502
+ newIndex = this._selectRowBelowIndex(prevIndex);
1503
+ this.ensureItemAtIndexIsVisible(newIndex);
1504
+
1505
+ if (prevIndex !== newIndex) {
1506
+ const item = getItem(data, newIndex);
1507
+ if (this.props.onSelectionChanged) {
1508
+ this.props.onSelectionChanged({
1509
+ previousSelection: prevIndex,
1510
+ newSelection: newIndex,
1511
+ item: item,
1512
+ });
1513
+ }
1514
+ }
1515
+ } else if (key === 'UP_ARROW') {
1516
+ newIndex = this._selectRowAboveIndex(prevIndex);
1517
+ this.ensureItemAtIndexIsVisible(newIndex);
1518
+
1519
+ if (prevIndex !== newIndex) {
1520
+ const item = getItem(data, newIndex);
1521
+ if (this.props.onSelectionChanged) {
1522
+ this.props.onSelectionChanged({
1523
+ previousSelection: prevIndex,
1524
+ newSelection: newIndex,
1525
+ item: item,
1526
+ });
1527
+ }
1528
+ }
1529
+ } else if (key === 'ENTER') {
1530
+ if (this.props.onSelectionEntered) {
1531
+ const item = getItem(data, prevIndex);
1532
+ if (this.props.onSelectionEntered) {
1533
+ this.props.onSelectionEntered(item);
1534
+ }
1535
+ }
1536
+ }
1537
+ }
1538
+ }
1539
+ };
1540
+ // ]TODO(macOS GH#774)
1541
+
1542
+ _renderDebugOverlay() {
1543
+ const normalize =
1544
+ this._scrollMetrics.visibleLength /
1545
+ (this._scrollMetrics.contentLength || 1);
1546
+ const framesInLayout = [];
1547
+ const itemCount = this.props.getItemCount(this.props.data);
1548
+ for (let ii = 0; ii < itemCount; ii++) {
1549
+ const frame = this._getFrameMetricsApprox(ii);
1550
+ /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
1551
+ * error found when Flow v0.68 was deployed. To see the error delete this
1552
+ * comment and run Flow. */
1553
+ if (frame.inLayout) {
1554
+ framesInLayout.push(frame);
1555
+ }
1556
+ }
1557
+ const windowTop = this._getFrameMetricsApprox(this.state.first).offset;
1558
+ const frameLast = this._getFrameMetricsApprox(this.state.last);
1559
+ const windowLen = frameLast.offset + frameLast.length - windowTop;
1560
+ const visTop = this._scrollMetrics.offset;
1561
+ const visLen = this._scrollMetrics.visibleLength;
1562
+
1563
+ return (
1564
+ <View style={[styles.debugOverlayBase, styles.debugOverlay]}>
1565
+ {framesInLayout.map((f, ii) => (
1566
+ <View
1567
+ key={'f' + ii}
1568
+ style={[
1569
+ styles.debugOverlayBase,
1570
+ styles.debugOverlayFrame,
1571
+ {
1572
+ top: f.offset * normalize,
1573
+ height: f.length * normalize,
1574
+ },
1575
+ ]}
1576
+ />
1577
+ ))}
1578
+ <View
1579
+ style={[
1580
+ styles.debugOverlayBase,
1581
+ styles.debugOverlayFrameLast,
1582
+ {
1583
+ top: windowTop * normalize,
1584
+ height: windowLen * normalize,
1585
+ },
1586
+ ]}
1587
+ />
1588
+ <View
1589
+ style={[
1590
+ styles.debugOverlayBase,
1591
+ styles.debugOverlayFrameVis,
1592
+ {
1593
+ top: visTop * normalize,
1594
+ height: visLen * normalize,
1595
+ },
1596
+ ]}
1597
+ />
1598
+ </View>
1599
+ );
1600
+ }
1601
+
1602
+ _selectLength(
1603
+ metrics: $ReadOnly<{
1604
+ height: number,
1605
+ width: number,
1606
+ ...
1607
+ }>,
1608
+ ): number {
1609
+ return !this.props.horizontal ? metrics.height : metrics.width;
1610
+ }
1611
+
1612
+ _selectOffset(
1613
+ metrics: $ReadOnly<{
1614
+ x: number,
1615
+ y: number,
1616
+ ...
1617
+ }>,
1618
+ ): number {
1619
+ return !this.props.horizontal ? metrics.y : metrics.x;
1620
+ }
1621
+
1622
+ _maybeCallOnEndReached() {
1623
+ const {
1624
+ data,
1625
+ getItemCount,
1626
+ onEndReached,
1627
+ onEndReachedThreshold,
1628
+ } = this.props;
1629
+ const {contentLength, visibleLength, offset} = this._scrollMetrics;
1630
+ const distanceFromEnd = contentLength - visibleLength - offset;
1631
+ const threshold = onEndReachedThreshold
1632
+ ? onEndReachedThreshold * visibleLength
1633
+ : 2;
1634
+ if (
1635
+ onEndReached &&
1636
+ this.state.last === getItemCount(data) - 1 &&
1637
+ distanceFromEnd < threshold &&
1638
+ this._scrollMetrics.contentLength !== this._sentEndForContentLength
1639
+ ) {
1640
+ // Only call onEndReached once for a given content length
1641
+ this._sentEndForContentLength = this._scrollMetrics.contentLength;
1642
+ onEndReached({distanceFromEnd});
1643
+ } else if (distanceFromEnd > threshold) {
1644
+ // If the user scrolls away from the end and back again cause
1645
+ // an onEndReached to be triggered again
1646
+ this._sentEndForContentLength = 0;
1647
+ }
1648
+ }
1649
+
1650
+ _onContentSizeChange = (width: number, height: number) => {
1651
+ if (
1652
+ width > 0 &&
1653
+ height > 0 &&
1654
+ this.props.initialScrollIndex != null &&
1655
+ this.props.initialScrollIndex > 0 &&
1656
+ !this._hasDoneInitialScroll
1657
+ ) {
1658
+ if (this.props.contentOffset == null) {
1659
+ this.scrollToIndex({
1660
+ animated: false,
1661
+ index: this.props.initialScrollIndex,
1662
+ });
1663
+ }
1664
+ this._hasDoneInitialScroll = true;
1665
+ }
1666
+ if (this.props.onContentSizeChange) {
1667
+ this.props.onContentSizeChange(width, height);
1668
+ }
1669
+ this._scrollMetrics.contentLength = this._selectLength({height, width});
1670
+ this._scheduleCellsToRenderUpdate();
1671
+ this._maybeCallOnEndReached();
1672
+ };
1673
+
1674
+ /* Translates metrics from a scroll event in a parent VirtualizedList into
1675
+ * coordinates relative to the child list.
1676
+ */
1677
+ _convertParentScrollMetrics = (metrics: {
1678
+ visibleLength: number,
1679
+ offset: number,
1680
+ ...
1681
+ }) => {
1682
+ // Offset of the top of the nested list relative to the top of its parent's viewport
1683
+ const offset = metrics.offset - this._offsetFromParentVirtualizedList;
1684
+ // Child's visible length is the same as its parent's
1685
+ const visibleLength = metrics.visibleLength;
1686
+ const dOffset = offset - this._scrollMetrics.offset;
1687
+ const contentLength = this._scrollMetrics.contentLength;
1688
+
1689
+ return {
1690
+ visibleLength,
1691
+ contentLength,
1692
+ offset,
1693
+ dOffset,
1694
+ };
1695
+ };
1696
+
1697
+ _onScroll = (e: Object) => {
1698
+ this._nestedChildLists.forEach(childList => {
1699
+ childList.ref && childList.ref._onScroll(e);
1700
+ });
1701
+ if (this.props.onScroll) {
1702
+ this.props.onScroll(e);
1703
+ }
1704
+ const timestamp = e.timeStamp;
1705
+ let visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement);
1706
+ let contentLength = this._selectLength(e.nativeEvent.contentSize);
1707
+ let offset = this._selectOffset(e.nativeEvent.contentOffset);
1708
+ let dOffset = offset - this._scrollMetrics.offset;
1709
+
1710
+ if (this._isNestedWithSameOrientation()) {
1711
+ if (this._scrollMetrics.contentLength === 0) {
1712
+ // Ignore scroll events until onLayout has been called and we
1713
+ // know our offset from our offset from our parent
1714
+ return;
1715
+ }
1716
+ ({
1717
+ visibleLength,
1718
+ contentLength,
1719
+ offset,
1720
+ dOffset,
1721
+ } = this._convertParentScrollMetrics({
1722
+ visibleLength,
1723
+ offset,
1724
+ }));
1725
+ }
1726
+
1727
+ const dt = this._scrollMetrics.timestamp
1728
+ ? Math.max(1, timestamp - this._scrollMetrics.timestamp)
1729
+ : 1;
1730
+ const velocity = dOffset / dt;
1731
+
1732
+ if (
1733
+ dt > 500 &&
1734
+ this._scrollMetrics.dt > 500 &&
1735
+ contentLength > 5 * visibleLength &&
1736
+ !this._hasWarned.perf
1737
+ ) {
1738
+ infoLog(
1739
+ 'VirtualizedList: You have a large list that is slow to update - make sure your ' +
1740
+ 'renderItem function renders components that follow React performance best practices ' +
1741
+ 'like PureComponent, shouldComponentUpdate, etc.',
1742
+ {dt, prevDt: this._scrollMetrics.dt, contentLength},
1743
+ );
1744
+ this._hasWarned.perf = true;
1745
+ }
1746
+ this._scrollMetrics = {
1747
+ contentLength,
1748
+ dt,
1749
+ dOffset,
1750
+ offset,
1751
+ timestamp,
1752
+ velocity,
1753
+ visibleLength,
1754
+ };
1755
+ this._updateViewableItems(this.props.data);
1756
+ if (!this.props) {
1757
+ return;
1758
+ }
1759
+ this._maybeCallOnEndReached();
1760
+ if (velocity !== 0) {
1761
+ this._fillRateHelper.activate();
1762
+ }
1763
+ this._computeBlankness();
1764
+ this._scheduleCellsToRenderUpdate();
1765
+ };
1766
+
1767
+ _scheduleCellsToRenderUpdate() {
1768
+ const {first, last} = this.state;
1769
+ const {offset, visibleLength, velocity} = this._scrollMetrics;
1770
+ const itemCount = this.props.getItemCount(this.props.data);
1771
+ let hiPri = false;
1772
+ const scrollingThreshold =
1773
+ /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
1774
+ * error found when Flow v0.63 was deployed. To see the error delete
1775
+ * this comment and run Flow. */
1776
+ (this.props.onEndReachedThreshold * visibleLength) / 2;
1777
+ // Mark as high priority if we're close to the start of the first item
1778
+ // But only if there are items before the first rendered item
1779
+ if (first > 0) {
1780
+ const distTop = offset - this._getFrameMetricsApprox(first).offset;
1781
+ hiPri =
1782
+ hiPri || distTop < 0 || (velocity < -2 && distTop < scrollingThreshold);
1783
+ }
1784
+ // Mark as high priority if we're close to the end of the last item
1785
+ // But only if there are items after the last rendered item
1786
+ if (last < itemCount - 1) {
1787
+ const distBottom =
1788
+ this._getFrameMetricsApprox(last).offset - (offset + visibleLength);
1789
+ hiPri =
1790
+ hiPri ||
1791
+ distBottom < 0 ||
1792
+ (velocity > 2 && distBottom < scrollingThreshold);
1793
+ }
1794
+ // Only trigger high-priority updates if we've actually rendered cells,
1795
+ // and with that size estimate, accurately compute how many cells we should render.
1796
+ // Otherwise, it would just render as many cells as it can (of zero dimension),
1797
+ // each time through attempting to render more (limited by maxToRenderPerBatch),
1798
+ // starving the renderer from actually laying out the objects and computing _averageCellLength.
1799
+ // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate
1800
+ // We shouldn't do another hipri cellToRenderUpdate
1801
+ if (
1802
+ hiPri &&
1803
+ (this._averageCellLength || this.props.getItemLayout) &&
1804
+ !this._hiPriInProgress
1805
+ ) {
1806
+ this._hiPriInProgress = true;
1807
+ // Don't worry about interactions when scrolling quickly; focus on filling content as fast
1808
+ // as possible.
1809
+ this._updateCellsToRenderBatcher.dispose({abort: true});
1810
+ this._updateCellsToRender();
1811
+ return;
1812
+ } else {
1813
+ this._updateCellsToRenderBatcher.schedule();
1814
+ }
1815
+ }
1816
+
1817
+ _onScrollBeginDrag = (e): void => {
1818
+ this._nestedChildLists.forEach(childList => {
1819
+ childList.ref && childList.ref._onScrollBeginDrag(e);
1820
+ });
1821
+ this._viewabilityTuples.forEach(tuple => {
1822
+ tuple.viewabilityHelper.recordInteraction();
1823
+ });
1824
+ this._hasInteracted = true;
1825
+ this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
1826
+ };
1827
+
1828
+ _onScrollEndDrag = (e): void => {
1829
+ const {velocity} = e.nativeEvent;
1830
+ if (velocity) {
1831
+ this._scrollMetrics.velocity = this._selectOffset(velocity);
1832
+ }
1833
+ this._computeBlankness();
1834
+ this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
1835
+ };
1836
+
1837
+ _onMomentumScrollEnd = (e): void => {
1838
+ this._scrollMetrics.velocity = 0;
1839
+ this._computeBlankness();
1840
+ this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
1841
+ };
1842
+
1843
+ _updateCellsToRender = () => {
1844
+ const {data, getItemCount, onEndReachedThreshold} = this.props;
1845
+ const isVirtualizationDisabled = this._isVirtualizationDisabled();
1846
+ this._updateViewableItems(data);
1847
+ if (!data) {
1848
+ return;
1849
+ }
1850
+ this.setState(state => {
1851
+ let newState;
1852
+ const {contentLength, offset, visibleLength} = this._scrollMetrics;
1853
+ if (!isVirtualizationDisabled) {
1854
+ // If we run this with bogus data, we'll force-render window {first: 0, last: 0},
1855
+ // and wipe out the initialNumToRender rendered elements.
1856
+ // So let's wait until the scroll view metrics have been set up. And until then,
1857
+ // we will trust the initialNumToRender suggestion
1858
+ if (visibleLength > 0 && contentLength > 0) {
1859
+ // If we have a non-zero initialScrollIndex and run this before we've scrolled,
1860
+ // we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.
1861
+ // So let's wait until we've scrolled the view to the right place. And until then,
1862
+ // we will trust the initialScrollIndex suggestion.
1863
+ if (!this.props.initialScrollIndex || this._scrollMetrics.offset) {
1864
+ newState = computeWindowedRenderLimits(
1865
+ this.props,
1866
+ state,
1867
+ this._getFrameMetricsApprox,
1868
+ this._scrollMetrics,
1869
+ );
1870
+ }
1871
+ }
1872
+ } else {
1873
+ const distanceFromEnd = contentLength - visibleLength - offset;
1874
+ const renderAhead =
1875
+ /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses
1876
+ * an error found when Flow v0.63 was deployed. To see the error
1877
+ * delete this comment and run Flow. */
1878
+ distanceFromEnd < onEndReachedThreshold * visibleLength
1879
+ ? this.props.maxToRenderPerBatch
1880
+ : 0;
1881
+ newState = {
1882
+ first: 0,
1883
+ last: Math.min(state.last + renderAhead, getItemCount(data) - 1),
1884
+ };
1885
+ }
1886
+ if (newState && this._nestedChildLists.size > 0) {
1887
+ const newFirst = newState.first;
1888
+ const newLast = newState.last;
1889
+ // If some cell in the new state has a child list in it, we should only render
1890
+ // up through that item, so that we give that list a chance to render.
1891
+ // Otherwise there's churn from multiple child lists mounting and un-mounting
1892
+ // their items.
1893
+ for (let ii = newFirst; ii <= newLast; ii++) {
1894
+ const cellKeyForIndex = this._indicesToKeys.get(ii);
1895
+ const childListKeys =
1896
+ cellKeyForIndex &&
1897
+ this._cellKeysToChildListKeys.get(cellKeyForIndex);
1898
+ if (!childListKeys) {
1899
+ continue;
1900
+ }
1901
+ let someChildHasMore = false;
1902
+ // For each cell, need to check whether any child list in it has more elements to render
1903
+ for (let childKey of childListKeys) {
1904
+ const childList = this._nestedChildLists.get(childKey);
1905
+ if (childList && childList.ref && childList.ref.hasMore()) {
1906
+ someChildHasMore = true;
1907
+ break;
1908
+ }
1909
+ }
1910
+ if (someChildHasMore) {
1911
+ newState.last = ii;
1912
+ break;
1913
+ }
1914
+ }
1915
+ }
1916
+ if (
1917
+ newState != null &&
1918
+ newState.first === state.first &&
1919
+ newState.last === state.last
1920
+ ) {
1921
+ newState = null;
1922
+ }
1923
+ return newState;
1924
+ });
1925
+ };
1926
+
1927
+ _createViewToken = (index: number, isViewable: boolean) => {
1928
+ const {data, getItem, keyExtractor} = this.props;
1929
+ const item = getItem(data, index);
1930
+ return {index, item, key: keyExtractor(item, index), isViewable};
1931
+ };
1932
+
1933
+ _getFrameMetricsApprox = (
1934
+ index: number,
1935
+ ): {
1936
+ length: number,
1937
+ offset: number,
1938
+ ...
1939
+ } => {
1940
+ const frame = this._getFrameMetrics(index);
1941
+ if (frame && frame.index === index) {
1942
+ // check for invalid frames due to row re-ordering
1943
+ return frame;
1944
+ } else {
1945
+ const {getItemLayout} = this.props;
1946
+ invariant(
1947
+ !getItemLayout,
1948
+ 'Should not have to estimate frames when a measurement metrics function is provided',
1949
+ );
1950
+ return {
1951
+ length: this._averageCellLength,
1952
+ offset: this._averageCellLength * index,
1953
+ };
1954
+ }
1955
+ };
1956
+
1957
+ _getFrameMetrics = (
1958
+ index: number,
1959
+ ): ?{
1960
+ length: number,
1961
+ offset: number,
1962
+ index: number,
1963
+ inLayout?: boolean,
1964
+ ...
1965
+ } => {
1966
+ const {
1967
+ data,
1968
+ getItem,
1969
+ getItemCount,
1970
+ getItemLayout,
1971
+ keyExtractor,
1972
+ } = this.props;
1973
+ invariant(
1974
+ getItemCount(data) > index,
1975
+ 'Tried to get frame for out of range index ' + index,
1976
+ );
1977
+ const item = getItem(data, index);
1978
+ let frame = item && this._frames[keyExtractor(item, index)];
1979
+ if (!frame || frame.index !== index) {
1980
+ if (getItemLayout) {
1981
+ frame = getItemLayout(data, index);
1982
+ }
1983
+ }
1984
+ /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an
1985
+ * error found when Flow v0.63 was deployed. To see the error delete this
1986
+ * comment and run Flow. */
1987
+ return frame;
1988
+ };
1989
+
1990
+ _updateViewableItems(data: any) {
1991
+ const {getItemCount} = this.props;
1992
+
1993
+ this._viewabilityTuples.forEach(tuple => {
1994
+ tuple.viewabilityHelper.onUpdate(
1995
+ getItemCount(data),
1996
+ this._scrollMetrics.offset,
1997
+ this._scrollMetrics.visibleLength,
1998
+ this._getFrameMetrics,
1999
+ this._createViewToken,
2000
+ tuple.onViewableItemsChanged,
2001
+ this.state,
2002
+ );
2003
+ });
2004
+ }
2005
+ }
2006
+
2007
+ type CellRendererProps = {
2008
+ CellRendererComponent?: ?React.ComponentType<any>,
2009
+ ItemSeparatorComponent: ?React.ComponentType<*>,
2010
+ cellKey: string,
2011
+ fillRateHelper: FillRateHelper,
2012
+ horizontal: ?boolean,
2013
+ index: number,
2014
+ inversionStyle: ViewStyleProp,
2015
+ isSelected: ?boolean, // TODO(macOS GH#774)
2016
+ item: Item,
2017
+ // This is extracted by ScrollViewStickyHeader
2018
+ onLayout: (event: Object) => void,
2019
+ onUnmount: (cellKey: string) => void,
2020
+ onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void,
2021
+ parentProps: {
2022
+ // e.g. height, y,
2023
+ getItemLayout?: (
2024
+ data: any,
2025
+ index: number,
2026
+ ) => {
2027
+ length: number,
2028
+ offset: number,
2029
+ index: number,
2030
+ ...
2031
+ },
2032
+ renderItem?: ?RenderItemType<Item>,
2033
+ ListItemComponent?: ?(React.ComponentType<any> | React.Element<any>),
2034
+ ...
2035
+ },
2036
+ prevCellKey: ?string,
2037
+ ...
2038
+ };
2039
+
2040
+ type CellRendererState = {
2041
+ separatorProps: $ReadOnly<{|
2042
+ highlighted: boolean,
2043
+ leadingItem: ?Item,
2044
+ |}>,
2045
+ ...
2046
+ };
2047
+
2048
+ class CellRenderer extends React.Component<
2049
+ CellRendererProps,
2050
+ CellRendererState,
2051
+ > {
2052
+ state = {
2053
+ separatorProps: {
2054
+ highlighted: false,
2055
+ leadingItem: this.props.item,
2056
+ },
2057
+ };
2058
+
2059
+ static getDerivedStateFromProps(
2060
+ props: CellRendererProps,
2061
+ prevState: CellRendererState,
2062
+ ): ?CellRendererState {
2063
+ return {
2064
+ separatorProps: {
2065
+ ...prevState.separatorProps,
2066
+ leadingItem: props.item,
2067
+ },
2068
+ };
2069
+ }
2070
+
2071
+ // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not
2072
+ // reused by SectionList and we can keep VirtualizedList simpler.
2073
+ _separators = {
2074
+ highlight: () => {
2075
+ const {cellKey, prevCellKey} = this.props;
2076
+ this.props.onUpdateSeparators([cellKey, prevCellKey], {
2077
+ highlighted: true,
2078
+ });
2079
+ },
2080
+ unhighlight: () => {
2081
+ const {cellKey, prevCellKey} = this.props;
2082
+ this.props.onUpdateSeparators([cellKey, prevCellKey], {
2083
+ highlighted: false,
2084
+ });
2085
+ },
2086
+ updateProps: (select: 'leading' | 'trailing', newProps: Object) => {
2087
+ const {cellKey, prevCellKey} = this.props;
2088
+ this.props.onUpdateSeparators(
2089
+ [select === 'leading' ? prevCellKey : cellKey],
2090
+ newProps,
2091
+ );
2092
+ },
2093
+ };
2094
+
2095
+ updateSeparatorProps(newProps: Object) {
2096
+ this.setState(state => ({
2097
+ separatorProps: {...state.separatorProps, ...newProps},
2098
+ }));
2099
+ }
2100
+
2101
+ componentWillUnmount() {
2102
+ this.props.onUnmount(this.props.cellKey);
2103
+ }
2104
+
2105
+ _renderElement(
2106
+ renderItem,
2107
+ ListItemComponent,
2108
+ item,
2109
+ index,
2110
+ isSelected /* TODO(macOS GH#774 */,
2111
+ ) {
2112
+ if (renderItem && ListItemComponent) {
2113
+ console.warn(
2114
+ 'VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' +
2115
+ ' precedence over renderItem.',
2116
+ );
2117
+ }
2118
+
2119
+ if (ListItemComponent) {
2120
+ /* $FlowFixMe(>=0.108.0 site=react_native_fb) This comment suppresses an
2121
+ * error found when Flow v0.108 was deployed. To see the error, delete
2122
+ * this comment and run Flow. */
2123
+ return React.createElement(ListItemComponent, {
2124
+ item,
2125
+ index,
2126
+ separators: this._separators,
2127
+ });
2128
+ }
2129
+
2130
+ if (renderItem) {
2131
+ return renderItem({
2132
+ item,
2133
+ index,
2134
+ isSelected, // TODO(macOS GH#774)
2135
+ separators: this._separators,
2136
+ });
2137
+ }
2138
+
2139
+ invariant(
2140
+ false,
2141
+ 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.',
2142
+ );
2143
+ }
2144
+
2145
+ render() {
2146
+ const {
2147
+ CellRendererComponent,
2148
+ ItemSeparatorComponent,
2149
+ fillRateHelper,
2150
+ horizontal,
2151
+ item,
2152
+ index,
2153
+ inversionStyle,
2154
+ isSelected, // TODO(macOS GH#774)
2155
+ parentProps,
2156
+ } = this.props;
2157
+ const {renderItem, getItemLayout, ListItemComponent} = parentProps;
2158
+ const element = this._renderElement(
2159
+ renderItem,
2160
+ ListItemComponent,
2161
+ item,
2162
+ index,
2163
+ isSelected, // TODO(macOS GH#774)
2164
+ );
2165
+
2166
+ const onLayout =
2167
+ /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
2168
+ * error found when Flow v0.68 was deployed. To see the error delete this
2169
+ * comment and run Flow. */
2170
+ getItemLayout && !parentProps.debug && !fillRateHelper.enabled()
2171
+ ? undefined
2172
+ : this.props.onLayout;
2173
+ // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and
2174
+ // called explicitly by `ScrollViewStickyHeader`.
2175
+ const itemSeparator = ItemSeparatorComponent && (
2176
+ <ItemSeparatorComponent {...this.state.separatorProps} />
2177
+ );
2178
+ const cellStyle = inversionStyle
2179
+ ? horizontal
2180
+ ? [styles.rowReverse, inversionStyle]
2181
+ : [styles.columnReverse, inversionStyle]
2182
+ : horizontal
2183
+ ? [styles.row, inversionStyle]
2184
+ : inversionStyle;
2185
+ const result = !CellRendererComponent ? (
2186
+ /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
2187
+ * error found when Flow v0.89 was deployed. To see the error, delete
2188
+ * this comment and run Flow. */
2189
+ <View style={cellStyle} onLayout={onLayout}>
2190
+ {element}
2191
+ {itemSeparator}
2192
+ </View>
2193
+ ) : (
2194
+ <CellRendererComponent
2195
+ {...this.props}
2196
+ style={cellStyle}
2197
+ onLayout={onLayout}>
2198
+ {element}
2199
+ {itemSeparator}
2200
+ </CellRendererComponent>
2201
+ );
2202
+
2203
+ return (
2204
+ <VirtualizedListCellContextProvider cellKey={this.props.cellKey}>
2205
+ {result}
2206
+ </VirtualizedListCellContextProvider>
2207
+ );
2208
+ }
2209
+ }
2210
+
2211
+ function describeNestedLists(childList: {
2212
+ +cellKey: string,
2213
+ +key: string,
2214
+ +ref: VirtualizedList,
2215
+ +parentDebugInfo: ListDebugInfo,
2216
+ +horizontal: boolean,
2217
+ ...
2218
+ }) {
2219
+ let trace =
2220
+ 'VirtualizedList trace:\n' +
2221
+ ` Child (${childList.horizontal ? 'horizontal' : 'vertical'}):\n` +
2222
+ ` listKey: ${childList.key}\n` +
2223
+ ` cellKey: ${childList.cellKey}`;
2224
+
2225
+ let debugInfo = childList.parentDebugInfo;
2226
+ while (debugInfo) {
2227
+ trace +=
2228
+ `\n Parent (${debugInfo.horizontal ? 'horizontal' : 'vertical'}):\n` +
2229
+ ` listKey: ${debugInfo.listKey}\n` +
2230
+ ` cellKey: ${debugInfo.cellKey}`;
2231
+ debugInfo = debugInfo.parent;
2232
+ }
2233
+ return trace;
2234
+ }
2235
+
2236
+ const styles = StyleSheet.create({
2237
+ verticallyInverted: {
2238
+ transform: [{scaleY: -1}],
2239
+ },
2240
+ horizontallyInverted: {
2241
+ transform: [{scaleX: -1}],
2242
+ },
2243
+ row: {
2244
+ flexDirection: 'row',
2245
+ },
2246
+ rowReverse: {
2247
+ flexDirection: 'row-reverse',
2248
+ },
2249
+ columnReverse: {
2250
+ flexDirection: 'column-reverse',
2251
+ },
2252
+ debug: {
2253
+ flex: 1,
2254
+ },
2255
+ debugOverlayBase: {
2256
+ position: 'absolute',
2257
+ top: 0,
2258
+ right: 0,
2259
+ },
2260
+ debugOverlay: {
2261
+ bottom: 0,
2262
+ width: 20,
2263
+ borderColor: 'blue',
2264
+ borderWidth: 1,
2265
+ },
2266
+ debugOverlayFrame: {
2267
+ left: 0,
2268
+ backgroundColor: 'orange',
2269
+ },
2270
+ debugOverlayFrameLast: {
2271
+ left: 0,
2272
+ borderColor: 'green',
2273
+ borderWidth: 2,
2274
+ },
2275
+ debugOverlayFrameVis: {
2276
+ left: 0,
2277
+ borderColor: 'red',
2278
+ borderWidth: 2,
2279
+ },
2280
+ });
2281
+
2282
+ module.exports = VirtualizedList;