react-native-tvos 0.80.1-0 → 0.81.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
- package/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +1 -1
- package/Libraries/Alert/Alert.js +3 -3
- package/Libraries/Alert/NativeAlertManager.js +1 -0
- package/Libraries/Alert/RCTAlertManager.android.js +19 -13
- package/Libraries/Alert/RCTAlertManager.ios.js +10 -12
- package/Libraries/Alert/RCTAlertManager.js +1 -3
- package/Libraries/Alert/RCTAlertManager.js.flow +5 -7
- package/Libraries/Animated/Animated.js +0 -1
- package/Libraries/Animated/Animated.js.flow +0 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js +0 -1
- package/Libraries/Animated/AnimatedExports.js.flow +5 -1
- package/Libraries/Animated/AnimatedImplementation.js +44 -44
- package/Libraries/Animated/AnimatedMock.js +2 -2
- package/Libraries/Animated/Easing.js +1 -1
- package/Libraries/Animated/NativeAnimatedModule.js +1 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
- package/Libraries/Animated/SpringConfig.js +1 -1
- package/Libraries/Animated/animations/Animation.js +10 -2
- package/Libraries/Animated/components/AnimatedScrollView.js +58 -56
- package/Libraries/Animated/components/AnimatedText.js +2 -5
- package/Libraries/Animated/components/AnimatedView.js +2 -1
- package/Libraries/Animated/createAnimatedComponent.js +39 -37
- package/Libraries/Animated/nodes/AnimatedObject.js +2 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +31 -4
- package/Libraries/Animated/nodes/AnimatedStyle.js +35 -34
- package/Libraries/Animated/shouldUseTurboAnimatedModule.js +6 -1
- package/Libraries/AppDelegate/RCTAppSetupUtils.h +1 -7
- package/Libraries/AppDelegate/RCTAppSetupUtils.mm +4 -16
- package/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +2 -8
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +8 -7
- package/Libraries/AppState/NativeAppState.js +1 -0
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -1
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/BlobManager.js +4 -0
- package/Libraries/Blob/NativeBlobModule.js +1 -0
- package/Libraries/Blob/NativeFileReaderModule.js +1 -0
- package/Libraries/Blob/React-RCTBlob.podspec +3 -2
- package/Libraries/Blob/URL.js +1 -1
- package/Libraries/Blob/URLSearchParams.js +5 -1
- package/Libraries/Blob/URLSearchParams.js.flow +2 -1
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +1 -2
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +1 -2
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js +1 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.ios.js +1 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js.flow +1 -1
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +19 -19
- package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +2 -3
- package/Libraries/Components/Button.js +10 -7
- package/Libraries/Components/Clipboard/Clipboard.js +1 -1
- package/Libraries/Components/Clipboard/NativeClipboard.js +1 -2
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +2 -3
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +1 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +3 -2
- package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +1 -2
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +0 -1
- package/Libraries/Components/Pressable/Pressable.js +21 -18
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +14 -13
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +2 -3
- package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +2 -3
- package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +2 -1
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +2 -3
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +9 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -3
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +33 -6
- package/Libraries/Components/ScrollView/ScrollView.js +25 -15
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -1
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +19 -6
- package/Libraries/Components/ScrollView/processDecelerationRate.js +1 -1
- package/Libraries/Components/Sound/NativeSoundManager.js +1 -2
- package/Libraries/Components/Sound/SoundManager.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +1 -2
- package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +1 -2
- package/Libraries/Components/StatusBar/StatusBar.d.ts +4 -0
- package/Libraries/Components/StatusBar/StatusBar.js +6 -1
- package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +2 -3
- package/Libraries/Components/Switch/Switch.js +10 -3
- package/Libraries/Components/Switch/SwitchNativeComponent.js +2 -3
- package/Libraries/Components/TV/TVEventControl.js +7 -6
- package/Libraries/Components/TV/TVFocusGuideView.js +29 -24
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +9 -12
- package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +2 -3
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +2 -6
- package/Libraries/Components/TextInput/TextInput.js +36 -37
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +1 -2
- package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +1 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +1 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +1 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +1 -1
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +1 -1
- package/Libraries/Components/Touchable/BoundingDimensions.js +1 -1
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Position.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +17 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +9 -3
- package/Libraries/Components/Touchable/TouchableHighlight.js +16 -11
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +5 -3
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +10 -5
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -2
- package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +2 -3
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +7 -16
- package/Libraries/Components/View/View.js +144 -54
- package/Libraries/Components/View/ViewAccessibility.js +1 -8
- package/Libraries/Components/View/ViewPropTypes.d.ts +4 -0
- package/Libraries/Components/View/ViewPropTypes.js +8 -1
- package/Libraries/Core/Devtools/getDevServer.js +1 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.js +49 -7
- package/Libraries/Core/Devtools/openFileInEditor.js +1 -1
- package/Libraries/Core/Devtools/openURLInBrowser.js +1 -1
- package/Libraries/Core/Devtools/parseErrorStack.js +1 -1
- package/Libraries/Core/Devtools/parseHermesStack.js +1 -1
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +27 -16
- package/Libraries/Core/InitializeCore.js +2 -23
- package/Libraries/Core/NativeExceptionsManager.js +1 -0
- package/Libraries/Core/ReactFiberErrorDialog.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +4 -6
- package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +1 -0
- package/Libraries/Core/Timers/JSTimers.js +1 -1
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +1 -1
- package/Libraries/Core/Timers/queueMicrotask.js +1 -1
- package/Libraries/Core/checkNativeVersion.js +1 -0
- package/Libraries/Core/setUpDeveloperTools.js +13 -11
- package/Libraries/Core/setUpReactDevTools.js +21 -4
- package/Libraries/Debugging/DebuggingOverlay.js +12 -14
- package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +2 -1
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +0 -1
- package/Libraries/Debugging/useSubscribeToDebuggingOverlayRegistry.js +0 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +3 -3
- package/Libraries/EventEmitter/RCTEventEmitter.js +1 -1
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +1 -1
- package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
- package/Libraries/Image/AssetRegistry.js +4 -10
- package/Libraries/Image/Image.android.js +113 -107
- package/Libraries/Image/Image.ios.js +10 -2
- package/Libraries/Image/ImageAnalyticsTagContext.js +2 -2
- package/Libraries/Image/ImageInjection.js +1 -1
- package/Libraries/Image/ImageSource.d.ts +5 -0
- package/Libraries/Image/ImageViewNativeComponent.js +3 -3
- package/Libraries/Image/NativeImageEditor.js +1 -0
- package/Libraries/Image/NativeImageLoaderAndroid.js +1 -0
- package/Libraries/Image/NativeImageLoaderIOS.js +1 -0
- package/Libraries/Image/NativeImageStoreAndroid.js +1 -0
- package/Libraries/Image/NativeImageStoreIOS.js +1 -0
- package/Libraries/Image/RCTImageURLLoaderWithAttribution.h +2 -1
- package/Libraries/Image/RCTImageUtils.mm +1 -1
- package/Libraries/Image/RCTResizeMode.h +3 -7
- package/Libraries/Image/React-RCTImage.podspec +4 -2
- package/Libraries/Image/RelativeImageStub.js +2 -1
- package/Libraries/Image/TextInlineImageNativeComponent.js +4 -4
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Interaction/FrameRateLogger.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +64 -54
- package/Libraries/Interaction/NativeFrameRateLogger.js +1 -0
- package/Libraries/Interaction/TaskQueue.js +8 -9
- package/Libraries/Interaction/TouchHistoryMath.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +12 -8
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Linking/NativeIntentAndroid.js +1 -0
- package/Libraries/Linking/NativeLinkingManager.js +1 -0
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/Lists/FlatList.d.ts +9 -5
- package/Libraries/Lists/FlatList.js +6 -7
- package/Libraries/Lists/SectionList.js +4 -4
- package/Libraries/Lists/SectionListModern.js +9 -3
- package/Libraries/Lists/VirtualizedList.js +3 -2
- package/Libraries/LogBox/Data/LogBoxData.js +7 -4
- package/Libraries/LogBox/Data/parseLogBoxLog.js +2 -0
- package/Libraries/LogBox/LogBox.js +72 -99
- package/Libraries/LogBox/UI/LogBoxButton.js +2 -1
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +2 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +3 -2
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +2 -1
- package/Libraries/Modal/Modal.d.ts +8 -2
- package/Libraries/Modal/Modal.js +24 -3
- package/Libraries/Modal/NativeModalManager.js +1 -0
- package/Libraries/Modal/RCTModalHostViewNativeComponent.js +2 -1
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +8 -17
- package/Libraries/NativeComponent/BaseViewConfig.js.flow +1 -1
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +1 -1
- package/Libraries/NativeComponent/ViewConfigIgnore.js +3 -3
- package/Libraries/NativeModules/specs/NativeDevMenu.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevSettings.js +1 -0
- package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +1 -0
- package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +1 -0
- package/Libraries/NativeModules/specs/NativeLogBox.js +1 -0
- package/Libraries/NativeModules/specs/NativeRedBox.js +1 -0
- package/Libraries/NativeModules/specs/NativeSourceCode.js +1 -0
- package/Libraries/Network/FormData.js +1 -1
- package/Libraries/Network/NativeNetworkingAndroid.js +1 -0
- package/Libraries/Network/NativeNetworkingIOS.js +1 -0
- package/Libraries/Network/RCTInspectorNetworkReporter.h +64 -0
- package/Libraries/Network/RCTInspectorNetworkReporter.mm +105 -0
- package/Libraries/Network/RCTNetworkConversions.h +23 -0
- package/Libraries/Network/RCTNetworking.android.js +2 -2
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.mm +31 -4
- package/Libraries/Network/React-RCTNetwork.podspec +2 -1
- package/Libraries/Network/XMLHttpRequest.js +3 -3
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -3
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Promise.js +1 -1
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +3 -2
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +2 -0
- package/Libraries/ReactNative/AppContainer-dev.js +2 -3
- package/Libraries/ReactNative/AppContainer-prod.js +0 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -13
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -1
- package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +1 -0
- package/Libraries/ReactNative/NativeI18nManager.js +1 -0
- package/Libraries/ReactNative/NativeUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +81 -62
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +1 -1
- package/Libraries/ReactNative/RendererProxy.js +1 -1
- package/Libraries/ReactNative/RootTag.js +2 -2
- package/Libraries/ReactNative/renderApplication.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +23 -36
- package/Libraries/Required/RCTRequired.podspec +1 -1
- package/Libraries/Settings/NativeSettingsManager.js +1 -0
- package/Libraries/Settings/React-RCTSettings.podspec +2 -1
- package/Libraries/Settings/Settings.ios.js +1 -1
- package/Libraries/Settings/Settings.js +1 -1
- package/Libraries/Settings/SettingsFallback.js +1 -1
- package/Libraries/Share/NativeShareModule.js +1 -0
- package/Libraries/Share/Share.js +1 -1
- package/Libraries/StyleSheet/EdgeInsetsPropType.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +1 -1
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js +1 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +0 -1
- package/Libraries/StyleSheet/normalizeColor.js +1 -1
- package/Libraries/StyleSheet/processAspectRatio.js +1 -1
- package/Libraries/StyleSheet/processBackgroundImage.js +1 -1
- package/Libraries/StyleSheet/processBoxShadow.js +0 -1
- package/Libraries/StyleSheet/processColor.js +1 -1
- package/Libraries/StyleSheet/processColorArray.js +1 -1
- package/Libraries/StyleSheet/processFilter.js +1 -2
- package/Libraries/StyleSheet/processFontVariant.js +1 -1
- package/Libraries/StyleSheet/processTransform.js +1 -1
- package/Libraries/StyleSheet/processTransformOrigin.js +1 -1
- package/Libraries/StyleSheet/setNormalizedColorAlpha.js +1 -1
- package/Libraries/Text/React-RCTText.podspec +1 -1
- package/Libraries/Text/Text.d.ts +9 -0
- package/Libraries/Text/Text.js +255 -246
- package/Libraries/Text/TextAncestor.js +3 -9
- package/Libraries/Text/TextAncestorContext.js +23 -0
- package/Libraries/Text/TextNativeComponent.js +4 -0
- package/Libraries/Text/TextProps.js +2 -5
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +1 -0
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CodegenTypesNamespace.js +2 -1
- package/Libraries/Types/CoreEventTypes.d.ts +0 -4
- package/Libraries/Types/ReactDevToolsTypes.js +0 -1
- package/Libraries/Utilities/Appearance.js +1 -1
- package/Libraries/Utilities/BackHandler.js.flow +1 -1
- package/Libraries/Utilities/DevLoadingView.js +1 -1
- package/Libraries/Utilities/DeviceInfo.js +1 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/HMRClient.js +13 -3
- package/Libraries/Utilities/HMRClientProdShim.js +1 -1
- package/Libraries/Utilities/NativeAppearance.js +1 -0
- package/Libraries/Utilities/NativeDevLoadingView.js +1 -0
- package/Libraries/Utilities/NativeDeviceInfo.js +1 -2
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +1 -0
- package/Libraries/Utilities/PerformanceLoggerContext.js +2 -2
- package/Libraries/Utilities/PixelRatio.js +1 -1
- package/Libraries/Utilities/Platform.android.js +2 -5
- package/Libraries/Utilities/Platform.ios.js +2 -5
- package/Libraries/Utilities/Platform.js +1 -1
- package/Libraries/Utilities/Platform.js.flow +2 -2
- package/Libraries/Utilities/PlatformTypes.js +2 -2
- package/Libraries/Utilities/RCTLog.js +1 -1
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/binaryToBase64.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +5 -3
- package/Libraries/Utilities/codegenNativeComponent.js +4 -4
- package/Libraries/Utilities/createPerformanceLogger.js +27 -20
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +1 -1
- package/Libraries/Utilities/defineLazyObjectProperty.js +1 -1
- package/Libraries/Utilities/differ/deepDiffer.js +1 -1
- package/Libraries/Utilities/differ/insetsDiffer.js +1 -1
- package/Libraries/Utilities/differ/matricesDiffer.js +1 -1
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/mapWithSeparator.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +1 -1
- package/Libraries/Utilities/stringifyViewConfig.js +1 -1
- package/Libraries/Utilities/useColorScheme.js +1 -1
- package/Libraries/Utilities/useWindowDimensions.js +1 -1
- package/Libraries/Utilities/warnOnce.js +1 -1
- package/Libraries/Vibration/NativeVibration.js +1 -0
- package/Libraries/Vibration/React-RCTVibration.podspec +2 -1
- package/Libraries/Vibration/Vibration.js +1 -2
- package/Libraries/WebSocket/NativeWebSocketModule.js +1 -0
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/core/ErrorUtils.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +6 -6
- package/React/Base/RCTBridge+Private.h +5 -0
- package/React/Base/RCTBridge.mm +108 -0
- package/React/Base/RCTBridgeDelegate.h +2 -0
- package/React/Base/RCTBridgeMethod.h +3 -2
- package/React/Base/RCTBridgeModule.h +6 -0
- package/React/Base/RCTBridgeProxy.mm +2 -0
- package/React/Base/RCTBundleManager.h +2 -0
- package/React/Base/RCTBundleManager.m +10 -0
- package/React/Base/RCTCallInvokerModule.h +2 -0
- package/React/Base/RCTCallableJSModules.m +6 -0
- package/React/Base/RCTDisplayLink.h +8 -1
- package/React/Base/RCTDisplayLink.m +15 -14
- package/React/Base/RCTJavaScriptExecutor.h +2 -0
- package/React/Base/RCTModuleData.mm +37 -0
- package/React/Base/RCTModuleMethod.mm +1 -0
- package/React/Base/RCTModuleRegistry.m +8 -0
- package/React/Base/RCTRootContentView.h +4 -0
- package/React/Base/RCTRootContentView.m +4 -0
- package/React/Base/RCTRootView.m +32 -0
- package/React/Base/RCTRootViewInternal.h +4 -0
- package/React/Base/RCTTVNavigationEventNotification.h +2 -0
- package/React/Base/RCTTVRemoteHandler.h +3 -0
- package/React/Base/RCTTVRemoteHandler.m +2 -0
- package/React/Base/RCTTVRemoteHandlerConstants.h +2 -0
- package/React/Base/RCTTVRemoteSelectHandler.h +2 -0
- package/React/Base/RCTTVRemoteSelectHandler.m +2 -0
- package/React/Base/RCTTouchHandler.m +2 -0
- package/React/Base/RCTTouchHandlerTV.m +2 -0
- package/React/Base/RCTUtils.h +0 -2
- package/React/Base/RCTUtils.mm +65 -35
- package/React/Base/RCTVersion.m +2 -2
- package/React/Base/RCTViewRegistry.m +16 -7
- package/React/Base/Surface/RCTSurface.mm +68 -0
- package/React/Base/Surface/RCTSurfaceRootShadowView.m +17 -0
- package/React/Base/Surface/RCTSurfaceView.h +3 -3
- package/React/Base/Surface/RCTSurfaceView.mm +2 -1
- package/React/CoreModules/RCTDeviceInfo.mm +4 -3
- package/React/CoreModules/RCTLogBox.mm +4 -1
- package/React/CoreModules/RCTLogBoxView.h +2 -0
- package/React/CoreModules/RCTLogBoxView.mm +6 -0
- package/React/CoreModules/RCTStatusBarManager.mm +2 -0
- package/React/CoreModules/RCTTVNavigationEventEmitter.mm +3 -1
- package/React/CoreModules/React-CoreModules.podspec +4 -1
- package/React/CxxBridge/RCTCxxBridge.mm +47 -11
- package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h +4 -0
- package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +4 -0
- package/React/CxxBridge/RCTObjcExecutor.h +4 -0
- package/React/CxxBridge/RCTObjcExecutor.mm +5 -1
- package/React/CxxModule/DispatchMessageQueueThread.h +4 -0
- package/React/CxxModule/RCTCxxMethod.mm +1 -1
- package/React/CxxModule/RCTCxxModule.mm +1 -1
- package/React/CxxModule/RCTCxxUtils.h +4 -0
- package/React/CxxModule/RCTCxxUtils.mm +4 -1
- package/React/CxxModule/RCTNativeModule.h +4 -0
- package/React/CxxModule/RCTNativeModule.mm +5 -1
- package/React/CxxUtils/RCTFollyConvert.h +8 -6
- package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -31
- package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +3 -28
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +153 -40
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +243 -108
- package/{ReactCommon/react/renderer/components/rncore → React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec}/ComponentDescriptors.cpp +2 -2
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/ComponentDescriptors.h +30 -0
- package/{ReactCommon/react/renderer/components/rncore → React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec}/EventEmitters.cpp +26 -1
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/EventEmitters.h +194 -0
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.cpp +663 -0
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.h +535 -0
- package/{ReactCommon/react/renderer/components/rncore → React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec}/RCTComponentViewHelpers.h +4 -0
- package/{ReactCommon/react/renderer/components/rncore → React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec}/ShadowNodes.cpp +1 -1
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/ShadowNodes.h +98 -0
- package/{ReactCommon/react/renderer/components/rncore → React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec}/States.cpp +1 -1
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/States.h +32 -0
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/DebuggingOverlay/RCTDebuggingOverlayComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/DebuggingOverlay/RCTDebuggingOverlayComponentView.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm +0 -2
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +18 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +7 -1
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +20 -7
- package/React/Fabric/Mounting/ComponentViews/VirtualView/RCTVirtualViewComponentView.h +24 -0
- package/React/Fabric/Mounting/ComponentViews/VirtualView/RCTVirtualViewComponentView.mm +384 -0
- package/React/Fabric/Mounting/RCTMountingManager.h +1 -1
- package/React/Fabric/Mounting/RCTMountingManager.mm +15 -6
- package/React/Fabric/RCTScheduler.h +1 -0
- package/React/Fabric/RCTScheduler.mm +6 -2
- package/React/Fabric/RCTSurfacePointerHandler.mm +2 -0
- package/React/Fabric/RCTSurfacePointerHandlerTV.mm +2 -0
- package/React/Fabric/RCTSurfacePresenter.h +2 -1
- package/React/Fabric/RCTSurfacePresenter.mm +14 -8
- package/React/Fabric/RCTSurfaceTouchHandler.mm +2 -0
- package/React/Fabric/RCTSurfaceTouchHandlerTV.mm +2 -0
- package/React/Fabric/Surface/RCTFabricSurface.mm +4 -4
- package/React/Fabric/Utils/RCTGradientUtils.h +12 -0
- package/React/Fabric/Utils/RCTGradientUtils.mm +213 -6
- package/React/Fabric/Utils/RCTLinearGradient.mm +37 -42
- package/React/Fabric/Utils/RCTRadialGradient.mm +29 -64
- package/React/Modules/RCTSurfacePresenterStub.h +1 -1
- package/React/Modules/RCTUIManager.mm +206 -93
- package/React/React-RCTFBReactNativeSpec.podspec +33 -8
- package/React/React-RCTFabric.podspec +8 -3
- package/React/Runtime/React-RCTRuntime.podspec +7 -6
- package/React/Views/RCTBorderDrawing.h +5 -0
- package/React/Views/RCTBorderDrawing.m +37 -4
- package/React/Views/RCTModalHostView.h +1 -0
- package/React/Views/RCTModalHostView.m +16 -0
- package/React/Views/RCTModalHostViewController.m +0 -1
- package/React/Views/RCTModalHostViewManager.m +1 -0
- package/React/Views/RCTSwitch.h +2 -0
- package/React/Views/RCTSwitch.m +2 -0
- package/React/Views/RCTSwitchManager.h +2 -0
- package/React/Views/RCTSwitchManager.m +2 -0
- package/React/Views/RCTTVView.h +2 -0
- package/React/Views/RCTTVView.m +2 -0
- package/React/Views/RCTView.m +4 -1
- package/React/Views/RefreshControl/RCTRefreshControl.h +2 -0
- package/React/Views/RefreshControl/RCTRefreshControl.m +2 -0
- package/React/Views/RefreshControl/RCTRefreshControlManager.h +2 -0
- package/React/Views/RefreshControl/RCTRefreshControlManager.m +2 -0
- package/React/Views/RefreshControl/RCTRefreshableProtocol.h +2 -0
- package/React/Views/ScrollView/RCTScrollView.h +2 -0
- package/React/Views/ScrollView/RCTScrollView.m +2 -0
- package/React/Views/ScrollView/RCTScrollViewManager.m +2 -0
- package/React-Core-prebuilt.podspec +78 -0
- package/React-Core.podspec +29 -28
- package/ReactAndroid/api/ReactAndroid.api +294 -506
- package/ReactAndroid/build.gradle.kts +20 -55
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +1 -1
- package/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp +2 -2
- package/ReactAndroid/external-artifacts/build.gradle.kts +52 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +25 -0
- package/ReactAndroid/publish.gradle +2 -2
- package/ReactAndroid/src/main/AndroidManifest.xml +1 -1
- package/ReactAndroid/src/main/java/com/facebook/debug/tags/ReactDebugOverlayTags.kt +0 -9
- package/ReactAndroid/src/main/java/com/facebook/react/BaseReactPackage.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.kt +194 -0
- package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.kt +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt +5 -4
- package/ReactAndroid/src/main/java/com/facebook/react/LazyReactPackage.kt +146 -0
- package/ReactAndroid/src/main/java/com/facebook/react/MemoryPressureRouter.kt +6 -5
- package/ReactAndroid/src/main/java/com/facebook/react/NativeModuleRegistryBuilder.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +57 -30
- package/ReactAndroid/src/main/java/com/facebook/react/ReactApplication.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt +451 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.kt +237 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +11 -10
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.kt +396 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +7 -16
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageHelper.kt +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageLogger.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt +244 -0
- package/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.kt +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/InterpolationAnimatedNode.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.kt +59 -77
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.kt +43 -37
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseActivityEventListener.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseJavaModule.java +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.java +20 -11
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CallbackImpl.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CxxModuleWrapperBase.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/GuardedAsyncTask.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSONArguments.kt +37 -40
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.kt +399 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaOnlyArray.kt +8 -9
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaScriptModuleRegistry.kt +93 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressureListener.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleHolder.kt +227 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleSpec.kt +59 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArgumentsParseException.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModule.java +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.kt +156 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/OnBatchCompleteListener.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.kt +240 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContextBaseJavaModule.kt +33 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactInstanceManagerInspectorTarget.kt +69 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.kt +212 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactModuleWithSpec.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNoCrashBridgeNotAllowedSoftException.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNoCrashSoftException.kt +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactSoftExceptionLogger.kt +30 -21
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArrayBuilder.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMapBuilder.kt +21 -7
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/RetryableMountingLayerException.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/SoftAssertions.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManagerProvider.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfigurationImpl.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/common/DebugServerException.kt +8 -8
- package/ReactAndroid/src/main/java/com/facebook/react/common/MapBuilder.kt +107 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/ShakeDetector.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/common/annotations/LegacyArchitectureShadowNodeWithCxxImpl.kt +6 -4
- package/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/InteropLegacyArchitecture.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.kt +16 -4
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +53 -1
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHost.kt +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +9 -15
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevLoadingViewImplementation.kt +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt +5 -7
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.kt +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FpsView.kt +16 -7
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PackagerStatusCheck.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevOptionHandler.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/StackFrame.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +65 -68
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/LongStreamingStats.kt +6 -5
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventBeatManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/internal/interop/InteropUiBlockListener.kt +27 -16
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt +365 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.kt +373 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +48 -50
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchIntCommandMountItem.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/MountItemFactory.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +77 -5
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +131 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +27 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +27 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +145 -13
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +27 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleInteropUtils.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManagerDelegate.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/jstasks/HeadlessJsTaskContext.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/AccessibilityInfoModule.kt +21 -30
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.kt +4 -11
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.kt +6 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageStoreManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.kt +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/HeadlessJsTaskSupportModule.kt +6 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevMenuModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.kt +2 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DidJSUpdateUiDuringFrameDetector.kt +10 -9
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/FpsDebugFrameCallback.kt +23 -55
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/SourceCodeModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.kt +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +8 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/DialogModule.kt +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/FrescoModule.kt +9 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/ReactOkHttpNetworkFetcher.kt +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt +23 -21
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +7 -10
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +9 -9
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ResponseUtil.kt +24 -23
- package/ReactAndroid/src/main/java/com/facebook/react/modules/permissions/PermissionsModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/share/ShareModule.kt +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/sound/SoundManagerModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt +17 -20
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/toast/ToastModule.kt +11 -14
- package/ReactAndroid/src/main/java/com/facebook/react/modules/vibration/VibrationModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +52 -40
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessAtomicRef.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +22 -18
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.kt +6 -4
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSRuntimeFactory.kt +6 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +1472 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImplDevHelper.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostInspectorTarget.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +14 -14
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceImpl.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.kt +6 -2
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/ExecutorException.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt +9 -2
- package/ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt +0 -17
- package/ReactAndroid/src/main/java/com/facebook/react/touch/OnInterceptTouchEventListener.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/CallInvokerHolderImpl.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/NativeMethodCallInvokerHolderImpl.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +80 -63
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +17 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FloatUtil.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.kt +238 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutDirectionUtil.kt +4 -10
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.kt +25 -20
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeKind.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyOptimizer.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NoSuchNativeViewException.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.kt +9 -9
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.kt +6 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAxOrderHelper.kt +63 -106
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactClippingViewGroup.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactClippingViewGroupHelper.kt +5 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactStylesDiffMap.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactYogaConfigProvider.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ShadowNodeRegistry.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/Spacing.kt +4 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.kt +151 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.kt +232 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstants.kt +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.kt +238 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleListener.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewAtIndex.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupDrawingOrderHelper.kt +5 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +15 -62
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerDelegate.kt +18 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerPropertyUpdater.kt +2 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.kt +161 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerWithGeneratedInterface.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/YogaNodePool.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/ReactProp.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/UIManagerType.kt +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/BorderDrawable.kt +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/CSSBackgroundDrawable.java +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.kt +8 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcherImpl.kt +334 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventEmitterImpl.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt +12 -12
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.kt +340 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchesHelper.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/internal/LegacyArchitectureShadowNodeLogger.kt +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AbstractLayoutAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/BaseLayoutAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationController.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutCreateAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutDeleteAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.kt +8 -8
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/OpacityAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/PositionAndSizeAnimation.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/SimpleSpringInterpolator.kt +9 -11
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BoxShadow.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/ColorStop.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/Gradient.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/ContextUtils.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/UiModeUtils.kt +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager.kt +5 -17
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.kt +4 -15
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerClosedEvent.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageDownloadListener.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/MultiSourceHelper.kt +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +80 -9
- package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarShadowNode.kt +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +52 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.kt +37 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +45 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +19 -28
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.kt +34 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.kt +28 -17
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.kt +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchManager.kt +0 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchShadowNode.kt +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/DefaultStyleValuesUtil.kt +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/FontMetricsUtil.kt +15 -21
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/PreparedLayout.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/PreparedLayoutTextView.kt +103 -159
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/PreparedLayoutTextViewManager.kt +29 -21
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +11 -10
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextManager.kt +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextShadowNode.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.kt +25 -22
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.kt +349 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewAccessibilityDelegate.kt +87 -84
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.kt +181 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactVirtualTextShadowNode.kt +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactVirtualTextViewManager.kt +8 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributes.kt +137 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +1203 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextTransform.kt +2 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.kt +17 -10
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageSpan.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomLetterSpacingSpan.kt +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +8 -15
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputSelectionEvent.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.kt +8 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +1586 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +38 -44
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ViewGroupClickEvent.kt +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +77 -43
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtualview/ReactVirtualView.kt +382 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtualview/ReactVirtualViewManager.kt +102 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtualview/VirtualViewMode.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtualview/VirtualViewModeChangeEvent.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtualview/VirtualViewRenderState.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/systrace/Systrace.kt +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +1 -98
- package/ReactAndroid/src/main/jni/first-party/fbgloginit/fb/glog_init.h +1 -3
- package/ReactAndroid/src/main/jni/first-party/fbgloginit/glog_init.cpp +2 -4
- package/ReactAndroid/src/main/jni/first-party/jni-lib-merge/SoMerging-utils.cmake +4 -0
- package/ReactAndroid/src/main/jni/react/devsupport/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/fabric/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +4 -1
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +4 -2
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +13 -10
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.h +6 -1
- package/ReactAndroid/src/main/jni/react/fabric/FocusOrderingHelper.cpp +105 -13
- package/ReactAndroid/src/main/jni/react/fabric/FocusOrderingHelper.h +8 -6
- package/ReactAndroid/src/main/jni/react/featureflags/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +181 -13
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +39 -3
- package/ReactAndroid/src/main/jni/react/hermes/instrumentation/HermesSamplingProfiler.cpp +11 -9
- package/ReactAndroid/src/main/jni/react/hermes/instrumentation/HermesSamplingProfiler.h +2 -6
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/OnLoad.cpp +10 -2
- package/ReactAndroid/src/main/jni/react/hermes/tooling/CMakeLists.txt +0 -1
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +4 -0
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp +4 -0
- package/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/JavaScriptExecutorHolder.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.cpp +4 -0
- package/ReactAndroid/src/main/jni/react/jni/JniJSModulesUnbundle.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/MethodInvoker.cpp +4 -0
- package/ReactAndroid/src/main/jni/react/jni/MethodInvoker.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp +4 -0
- package/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h +4 -0
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/mapbuffer/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/newarchdefaults/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/newarchdefaults/rncore.h +20 -0
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/BindingsInstallerHolder.h +1 -1
- package/ReactAndroid/src/main/jni/react/uimanager/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/res/systeminfo/values-am/strings.xml +6 -0
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +3 -9
- package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
- package/ReactCommon/React-Fabric.podspec +32 -43
- package/ReactCommon/React-FabricComponents.podspec +54 -57
- package/ReactCommon/React-FabricImage.podspec +2 -1
- package/ReactCommon/React-Mapbuffer.podspec +2 -2
- package/ReactCommon/ReactCommon.podspec +6 -7
- package/ReactCommon/callinvoker/React-callinvoker.podspec +1 -1
- package/ReactCommon/callinvoker/ReactCommon/CallInvoker.h +5 -5
- package/ReactCommon/callinvoker/ReactCommon/SchedulerPriority.h +0 -2
- package/ReactCommon/cmake-utils/internal/react-native-platform-selector.cmake +24 -0
- package/ReactCommon/cmake-utils/react-native-flags.cmake +7 -11
- package/ReactCommon/cxxreact/CMakeLists.txt +1 -1
- package/ReactCommon/cxxreact/CxxModule.h +3 -7
- package/ReactCommon/cxxreact/CxxNativeModule.cpp +5 -0
- package/ReactCommon/cxxreact/CxxNativeModule.h +4 -0
- package/ReactCommon/cxxreact/Instance.cpp +4 -0
- package/ReactCommon/cxxreact/Instance.h +5 -1
- package/ReactCommon/cxxreact/JSBigString.cpp +3 -3
- package/ReactCommon/cxxreact/JSBigString.h +3 -2
- package/ReactCommon/cxxreact/JSExecutor.cpp +2 -6
- package/ReactCommon/cxxreact/JSExecutor.h +5 -4
- package/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp +7 -1
- package/ReactCommon/cxxreact/JSIndexedRAMBundle.h +6 -0
- package/ReactCommon/cxxreact/JSModulesUnbundle.h +5 -1
- package/ReactCommon/cxxreact/JsArgumentHelpers.h +2 -4
- package/ReactCommon/cxxreact/MessageQueueThread.h +1 -3
- package/ReactCommon/cxxreact/MethodCall.cpp +4 -0
- package/ReactCommon/cxxreact/MethodCall.h +4 -0
- package/ReactCommon/cxxreact/ModuleRegistry.cpp +4 -0
- package/ReactCommon/cxxreact/ModuleRegistry.h +4 -0
- package/ReactCommon/cxxreact/NativeModule.h +5 -1
- package/ReactCommon/cxxreact/NativeToJsBridge.cpp +4 -0
- package/ReactCommon/cxxreact/NativeToJsBridge.h +4 -0
- package/ReactCommon/cxxreact/RAMBundleRegistry.cpp +4 -0
- package/ReactCommon/cxxreact/RAMBundleRegistry.h +5 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +4 -4
- package/ReactCommon/cxxreact/ReactMarker.cpp +2 -4
- package/ReactCommon/cxxreact/ReactMarker.h +2 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/cxxreact/SharedProxyCxxModule.h +2 -6
- package/ReactCommon/devtoolsruntimesettings/CMakeLists.txt +5 -5
- package/ReactCommon/hermes/React-hermes.podspec +6 -3
- package/ReactCommon/hermes/executor/CMakeLists.txt +4 -1
- package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +4 -1
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.cpp +10 -6
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.h +11 -1
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp +58 -9
- package/ReactCommon/jsc/JSCRuntime.cpp +2 -4
- package/ReactCommon/jsc/JSCRuntime.h +2 -4
- package/ReactCommon/jserrorhandler/CMakeLists.txt +3 -1
- package/ReactCommon/jserrorhandler/JsErrorHandler.cpp +4 -9
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +4 -3
- package/ReactCommon/jserrorhandler/StackTraceParser.cpp +3 -1
- package/ReactCommon/jsi/CMakeLists.txt +1 -1
- package/ReactCommon/jsi/React-jsi.podspec +3 -6
- package/ReactCommon/jsi/jsi/CMakeLists.txt +1 -1
- package/ReactCommon/jsi/jsi/decorator.h +33 -0
- package/ReactCommon/jsi/jsi/jsi-inl.h +14 -0
- package/ReactCommon/jsi/jsi/jsi.cpp +119 -0
- package/ReactCommon/jsi/jsi/jsi.h +153 -1
- package/ReactCommon/jsi/jsi/test/testlib.cpp +111 -4
- package/ReactCommon/jsi/jsi/test/testlib.h +2 -2
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +4 -2
- package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +54 -1
- package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +4 -0
- package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +5 -0
- package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h +4 -0
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +0 -6
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +54 -2
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.h +16 -0
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +4 -3
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp +157 -27
- package/ReactCommon/jsinspector-modern/TracingAgent.cpp +4 -3
- package/ReactCommon/jsinspector-modern/TracingAgent.h +5 -2
- package/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +3 -2
- package/ReactCommon/jsinspector-modern/network/BoundedRequestBuffer.cpp +77 -0
- package/ReactCommon/jsinspector-modern/network/BoundedRequestBuffer.h +67 -0
- package/ReactCommon/jsinspector-modern/network/CMakeLists.txt +3 -1
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.cpp +35 -0
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.h +43 -0
- package/ReactCommon/jsinspector-modern/network/NetworkReporter.cpp +144 -23
- package/ReactCommon/jsinspector-modern/network/NetworkReporter.h +91 -19
- package/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +6 -2
- package/ReactCommon/jsinspector-modern/tests/ConsoleTimeStampTest.cpp +146 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorPackagerConnectionTest.cpp +37 -36
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +9 -9
- package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
- package/ReactCommon/jsinspector-modern/tracing/ConsoleTimeStamp.h +91 -0
- package/ReactCommon/jsinspector-modern/tracing/EventLoopReporter.cpp +5 -18
- package/ReactCommon/jsinspector-modern/tracing/EventLoopReporter.h +4 -2
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +141 -84
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +59 -18
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +4 -2
- package/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfile.h +28 -8
- package/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfileTraceEventSerializer.cpp +41 -32
- package/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfileTraceEventSerializer.h +9 -7
- package/ReactCommon/jsinspector-modern/tracing/Timing.h +42 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEvent.h +6 -8
- package/ReactCommon/jsinspector-modern/tracing/TraceEventProfile.h +10 -2
- package/ReactCommon/jsinspector-modern/tracing/tests/RuntimeSamplingProfileTraceEventSerializerTest.cpp +13 -13
- package/ReactCommon/jsitooling/CMakeLists.txt +1 -1
- package/ReactCommon/jsitooling/React-jsitooling.podspec +4 -2
- package/ReactCommon/logger/React-logger.podspec +2 -1
- package/ReactCommon/oscompat/React-oscompat.podspec +1 -1
- package/ReactCommon/react/bridging/Base.h +45 -34
- package/ReactCommon/react/bridging/Bool.h +1 -1
- package/ReactCommon/react/bridging/Bridging.h +1 -0
- package/ReactCommon/react/bridging/CMakeLists.txt +2 -2
- package/ReactCommon/react/bridging/Class.h +36 -33
- package/ReactCommon/react/bridging/HighResTimeStamp.h +41 -0
- package/ReactCommon/react/bridging/Number.h +10 -10
- package/ReactCommon/react/bridging/Promise.h +14 -8
- package/ReactCommon/react/bridging/tests/BridgingTest.cpp +35 -6
- package/ReactCommon/react/bridging/tests/ClassTest.cpp +58 -0
- package/ReactCommon/react/debug/CMakeLists.txt +6 -2
- package/ReactCommon/react/debug/React-debug.podspec +2 -2
- package/ReactCommon/react/featureflags/CMakeLists.txt +1 -1
- package/ReactCommon/react/featureflags/React-featureflags.podspec +3 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +53 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +65 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +269 -53
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +30 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +52 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +115 -7
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +15 -3
- package/ReactCommon/react/nativemodule/core/CMakeLists.txt +9 -5
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.cpp +2 -4
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h +2 -4
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +0 -19
- package/ReactCommon/react/nativemodule/core/iostests/RCTTurboModuleTests.mm +108 -0
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +7 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +4 -3
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.h +2 -4
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +2 -4
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h +3 -4
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +25 -26
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +1 -1
- package/ReactCommon/react/nativemodule/cputime/CMakeLists.txt +20 -0
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +3 -1
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +2 -1
- package/ReactCommon/react/nativemodule/devtoolsruntimesettings/CMakeLists.txt +2 -2
- package/ReactCommon/react/nativemodule/devtoolsruntimesettings/DevToolsRuntimeSettingsModule.cpp +2 -0
- package/ReactCommon/react/nativemodule/devtoolsruntimesettings/DevToolsRuntimeSettingsModule.h +1 -1
- package/ReactCommon/react/nativemodule/dom/CMakeLists.txt +2 -1
- package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +62 -51
- package/ReactCommon/react/nativemodule/dom/NativeDOM.h +33 -18
- package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +4 -1
- package/ReactCommon/react/nativemodule/fantomtestspecificmethods/CMakeLists.txt +29 -0
- package/ReactCommon/react/nativemodule/fantomtestspecificmethods/NativeFantomTestSpecificMethods.cpp +52 -0
- package/ReactCommon/react/nativemodule/{fantomforcedclonecommithook/NativeFantomForcedCloneCommitHook.h → fantomtestspecificmethods/NativeFantomTestSpecificMethods.h} +7 -6
- package/ReactCommon/react/nativemodule/fantomtestspecificmethods/internal/FantomForcedCloneCommitHook.cpp +56 -0
- package/ReactCommon/react/nativemodule/fantomtestspecificmethods/internal/FantomForcedCloneCommitHook.h +29 -0
- package/ReactCommon/react/nativemodule/featureflags/CMakeLists.txt +1 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +66 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +31 -8
- package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +2 -1
- package/ReactCommon/react/nativemodule/idlecallbacks/CMakeLists.txt +1 -1
- package/ReactCommon/react/nativemodule/idlecallbacks/NativeIdleCallbacks.cpp +10 -17
- package/ReactCommon/react/nativemodule/idlecallbacks/NativeIdleCallbacks.h +3 -4
- package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +3 -1
- package/ReactCommon/react/nativemodule/intersectionobserver/CMakeLists.txt +28 -0
- package/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.cpp +66 -11
- package/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h +20 -4
- package/ReactCommon/react/nativemodule/microtasks/CMakeLists.txt +1 -1
- package/ReactCommon/react/nativemodule/microtasks/NativeMicrotasks.h +1 -3
- package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +2 -1
- package/ReactCommon/react/nativemodule/mutationobserver/CMakeLists.txt +27 -0
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +7 -8
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.h +5 -5
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -0
- package/ReactCommon/react/nativemodule/samples/platform/android/CMakeLists.txt +1 -1
- package/ReactCommon/react/nativemodule/webperformance/CMakeLists.txt +21 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +45 -12
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.h +20 -22
- package/ReactCommon/react/performance/timeline/CMakeLists.txt +2 -1
- package/ReactCommon/react/performance/timeline/PerformanceEntry.h +11 -10
- package/ReactCommon/react/performance/timeline/PerformanceEntryBuffer.h +2 -2
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +56 -47
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.h +33 -20
- package/ReactCommon/react/performance/timeline/PerformanceObserver.h +8 -5
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +3 -2
- package/ReactCommon/react/performance/timeline/tests/PerformanceEntryReporterTest.cpp +196 -79
- package/ReactCommon/react/performance/timeline/tests/PerformanceObserverTest.cpp +238 -44
- package/ReactCommon/react/renderer/animations/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +5 -4
- package/ReactCommon/react/renderer/attributedstring/AttributedString.h +0 -6
- package/ReactCommon/react/renderer/attributedstring/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp +9 -3
- package/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h +8 -1
- package/ReactCommon/react/renderer/attributedstring/PlaceholderAttributedString.h +34 -0
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +3 -16
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +1 -5
- package/ReactCommon/react/renderer/attributedstring/conversions.h +14 -7
- package/ReactCommon/react/renderer/bridging/CMakeLists.txt +15 -0
- package/ReactCommon/react/renderer/bridging/bridging.h +52 -0
- package/ReactCommon/react/renderer/componentregistry/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/image/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/image/ImageProps.cpp +108 -0
- package/ReactCommon/react/renderer/components/image/ImageProps.h +5 -0
- package/ReactCommon/react/renderer/components/image/ImageShadowNode.cpp +16 -0
- package/ReactCommon/react/renderer/components/inputaccessory/InputAccessoryShadowNode.h +2 -2
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +18 -7
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +1 -1
- package/ReactCommon/react/renderer/components/modal/CMakeLists.txt +9 -2
- package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +3 -2
- package/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h +5 -2
- package/ReactCommon/react/renderer/components/modal/ModalHostViewState.cpp +1 -1
- package/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +7 -15
- package/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.h +2 -2
- package/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.mm +1 -1
- package/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h +38 -0
- package/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp +18 -0
- package/ReactCommon/react/renderer/components/modal/platform/cxx/ModalHostViewUtils.cpp +17 -0
- package/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp +2 -12
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h +1 -5
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.h +2 -2
- package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h +2 -2
- package/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.h +10 -26
- package/ReactCommon/react/renderer/components/rncore/EventEmitters.h +10 -165
- package/ReactCommon/react/renderer/components/rncore/Props.h +10 -393
- package/ReactCommon/react/renderer/components/rncore/ShadowNodes.h +10 -94
- package/ReactCommon/react/renderer/components/rncore/States.h +10 -97
- package/ReactCommon/react/renderer/components/root/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/safeareaview/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewShadowNode.h +2 -2
- package/ReactCommon/react/renderer/components/scrollview/{ScrollViewProps.cpp → BaseScrollViewProps.cpp} +29 -22
- package/ReactCommon/react/renderer/components/scrollview/BaseScrollViewProps.h +87 -0
- package/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt +16 -3
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +3 -73
- package/ReactCommon/react/renderer/components/scrollview/ScrollViewState.h +2 -2
- package/ReactCommon/react/renderer/components/scrollview/platform/android/react/renderer/components/scrollview/HostPlatformScrollViewProps.cpp +354 -0
- package/ReactCommon/react/renderer/components/scrollview/platform/android/react/renderer/components/scrollview/HostPlatformScrollViewProps.h +46 -0
- package/{React/Runtime/RCTJscInstanceFactory.h → ReactCommon/react/renderer/components/scrollview/platform/cxx/react/renderer/components/scrollview/HostPlatformScrollViewProps.h} +4 -10
- package/ReactCommon/react/renderer/components/switch/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.cpp +32 -41
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchMeasurementsManager.h +0 -3
- package/ReactCommon/react/renderer/components/switch/androidswitch/react/renderer/components/androidswitch/AndroidSwitchShadowNode.h +2 -2
- package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +192 -13
- package/ReactCommon/react/renderer/components/text/BaseTextProps.h +6 -0
- package/ReactCommon/react/renderer/components/text/BaseTextShadowNode.h +0 -7
- package/ReactCommon/react/renderer/components/text/CMakeLists.txt +15 -6
- package/ReactCommon/react/renderer/components/text/ParagraphProps.cpp +93 -0
- package/ReactCommon/react/renderer/components/text/ParagraphProps.h +5 -0
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +143 -80
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +26 -7
- package/ReactCommon/react/renderer/components/text/RawTextProps.cpp +28 -0
- package/ReactCommon/react/renderer/components/text/RawTextProps.h +5 -0
- package/ReactCommon/react/renderer/components/text/TextProps.cpp +21 -0
- package/ReactCommon/react/renderer/components/text/TextProps.h +5 -0
- package/ReactCommon/react/renderer/components/text/conversions.h +2 -2
- package/ReactCommon/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.cpp +8 -0
- package/ReactCommon/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +23 -2
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputProps.cpp +6 -0
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputShadowNode.h +9 -15
- package/ReactCommon/react/renderer/components/textinput/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp +11 -7
- package/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h +2 -1
- package/ReactCommon/react/renderer/components/textinput/TextInputState.h +5 -22
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h +4 -2
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp +277 -0
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputProps.h +10 -1
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +10 -21
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +2 -2
- package/ReactCommon/react/renderer/components/textinput/{TextInputState.cpp → platform/android/react/renderer/components/androidtextinput/AndroidTextInputState.cpp} +3 -32
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputState.h +83 -0
- package/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.cpp +21 -0
- package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewProps.h +4 -0
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +33 -0
- package/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +28 -1
- package/ReactCommon/react/renderer/components/view/AccessibilityProps.h +4 -1
- package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +8 -0
- package/ReactCommon/react/renderer/components/view/CMakeLists.txt +11 -7
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +51 -27
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h +14 -3
- package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +144 -516
- package/ReactCommon/react/renderer/components/view/conversions.h +114 -0
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +119 -5
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h +2 -3
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/NativeDrawable.h +1 -0
- package/ReactCommon/react/renderer/components/view/propsConversions.h +537 -2
- package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +6 -2
- package/ReactCommon/react/renderer/components/virtualview/VirtualViewComponentDescriptor.h +20 -0
- package/ReactCommon/react/renderer/components/virtualview/VirtualViewShadowNode.h +37 -0
- package/ReactCommon/react/renderer/consistency/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +1 -1
- package/ReactCommon/react/renderer/core/CMakeLists.txt +3 -2
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +3 -3
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +9 -6
- package/ReactCommon/react/renderer/core/ConcreteState.h +7 -9
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +7 -0
- package/ReactCommon/react/renderer/core/EventEmitter.h +7 -0
- package/ReactCommon/react/renderer/core/EventLogger.h +3 -2
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +24 -2
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.h +12 -3
- package/ReactCommon/react/renderer/core/Props.cpp +1 -1
- package/ReactCommon/react/renderer/core/Props.h +5 -2
- package/ReactCommon/react/renderer/core/RawEvent.cpp +2 -0
- package/ReactCommon/react/renderer/core/RawEvent.h +6 -1
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +127 -23
- package/ReactCommon/react/renderer/core/ShadowNode.h +69 -26
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.cpp +8 -0
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +2 -1
- package/ReactCommon/react/renderer/core/ShadowNodeTraits.h +26 -16
- package/ReactCommon/react/renderer/core/State.cpp +2 -2
- package/ReactCommon/react/renderer/core/State.h +3 -5
- package/ReactCommon/react/renderer/core/StateData.h +2 -2
- package/ReactCommon/react/renderer/core/graphicsConversions.h +47 -5
- package/ReactCommon/react/renderer/core/propsConversions.h +37 -0
- package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +7 -6
- package/ReactCommon/react/renderer/core/tests/EventQueueProcessorTest.cpp +9 -1
- package/ReactCommon/react/renderer/core/tests/LayoutableShadowNodeTest.cpp +5 -0
- package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +38 -5
- package/ReactCommon/react/renderer/css/CMakeLists.txt +2 -2
- package/ReactCommon/react/renderer/css/CSSTokenizer.h +0 -1
- package/ReactCommon/react/renderer/css/React-renderercss.podspec +3 -3
- package/ReactCommon/react/renderer/debug/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +3 -2
- package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +0 -2
- package/ReactCommon/react/renderer/dom/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/dom/DOM.cpp +28 -31
- package/ReactCommon/react/renderer/dom/DOM.h +3 -4
- package/ReactCommon/react/renderer/element/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/element/ComponentBuilder.cpp +4 -3
- package/ReactCommon/react/renderer/element/ComponentBuilder.h +2 -1
- package/ReactCommon/react/renderer/element/Element.h +7 -5
- package/ReactCommon/react/renderer/element/ElementFragment.h +1 -1
- package/ReactCommon/react/renderer/element/tests/ElementTest.cpp +4 -2
- package/ReactCommon/react/renderer/graphics/BlendMode.h +37 -0
- package/ReactCommon/react/renderer/graphics/CMakeLists.txt +12 -4
- package/ReactCommon/react/renderer/graphics/Color.cpp +1 -1
- package/ReactCommon/react/renderer/graphics/Color.h +10 -0
- package/ReactCommon/react/renderer/graphics/Filter.h +25 -0
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +4 -3
- package/ReactCommon/react/renderer/graphics/Transform.cpp +2 -15
- package/ReactCommon/react/renderer/graphics/Transform.h +0 -7
- package/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/HostPlatformColor.h +5 -2
- package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/HostPlatformColor.h +5 -2
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +4 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.h +2 -4
- package/ReactCommon/react/renderer/imagemanager/CMakeLists.txt +14 -5
- package/ReactCommon/react/renderer/imagemanager/ImageRequest.h +11 -0
- package/ReactCommon/react/renderer/imagemanager/ImageResponseObserverCoordinator.cpp +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageManager.cpp +1 -2
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +2 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTImagePrimitivesConversions.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/primitives.h +59 -0
- package/ReactCommon/react/renderer/leakchecker/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +0 -2
- package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +0 -2
- package/ReactCommon/react/renderer/mounting/CMakeLists.txt +2 -1
- package/ReactCommon/react/renderer/mounting/Differentiator.cpp +34 -21
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +0 -1
- package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +67 -25
- package/ReactCommon/react/renderer/mounting/ShadowTree.h +13 -0
- package/ReactCommon/react/renderer/mounting/internal/CullingContext.cpp +11 -6
- package/ReactCommon/react/renderer/mounting/internal/sliceChildShadowNodeViewPairs.cpp +6 -2
- package/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp +3 -53
- package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +9 -7
- package/ReactCommon/react/renderer/mounting/tests/StateReconciliationTest.cpp +2 -2
- package/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +9 -6
- package/ReactCommon/react/renderer/mounting/updateMountedFlag.h +4 -2
- package/ReactCommon/react/renderer/observers/events/CMakeLists.txt +4 -2
- package/ReactCommon/react/renderer/observers/events/EventPerformanceLogger.cpp +27 -10
- package/ReactCommon/react/renderer/observers/events/EventPerformanceLogger.h +9 -7
- package/ReactCommon/react/renderer/observers/intersection/CMakeLists.txt +28 -0
- package/ReactCommon/react/renderer/observers/intersection/IntersectionObserver.cpp +74 -31
- package/ReactCommon/react/renderer/observers/intersection/IntersectionObserver.h +19 -13
- package/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.cpp +136 -63
- package/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.h +34 -8
- package/ReactCommon/react/renderer/observers/mutation/CMakeLists.txt +24 -0
- package/ReactCommon/react/renderer/observers/mutation/MutationObserver.cpp +34 -46
- package/ReactCommon/react/renderer/observers/mutation/MutationObserver.h +15 -15
- package/ReactCommon/react/renderer/observers/mutation/MutationObserverManager.cpp +17 -32
- package/ReactCommon/react/renderer/observers/mutation/MutationObserverManager.h +2 -4
- package/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +4 -3
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +12 -6
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +16 -10
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +3 -5
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h +1 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerIntersectionObserverDelegate.h +25 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.cpp +11 -4
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.h +11 -8
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp +61 -62
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.h +25 -21
- package/ReactCommon/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +8 -7
- package/ReactCommon/react/renderer/runtimescheduler/Task.cpp +17 -5
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +6 -4
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +43 -31
- package/ReactCommon/react/renderer/runtimescheduler/tests/StubClock.h +6 -11
- package/ReactCommon/react/renderer/scheduler/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +10 -3
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +5 -3
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +3 -0
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp +5 -4
- package/ReactCommon/react/renderer/telemetry/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt +16 -6
- package/ReactCommon/react/renderer/textlayoutmanager/TextLayoutManagerExtended.h +6 -0
- package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +81 -10
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +116 -104
- package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +5 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/react/renderer/textlayoutmanager/TextLayoutManager.cpp +5 -2
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +23 -6
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm +27 -28
- package/ReactCommon/react/renderer/uimanager/CMakeLists.txt +2 -1
- package/ReactCommon/react/renderer/uimanager/PointerEventsProcessor.cpp +15 -10
- package/ReactCommon/react/renderer/uimanager/PointerEventsProcessor.h +6 -7
- package/ReactCommon/react/renderer/uimanager/PointerHoverTracker.cpp +2 -3
- package/ReactCommon/react/renderer/uimanager/PointerHoverTracker.h +5 -3
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +21 -19
- package/ReactCommon/react/renderer/uimanager/UIManager.h +13 -12
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +47 -23
- package/ReactCommon/react/renderer/uimanager/UIManagerDelegate.h +9 -3
- package/ReactCommon/react/renderer/uimanager/UIManagerMountHook.h +2 -2
- package/ReactCommon/react/renderer/uimanager/UIManagerUpdateShadowTree.cpp +6 -1
- package/ReactCommon/react/renderer/uimanager/consistency/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/uimanager/consistency/tests/LazyShadowTreeRevisionConsistencyManagerTest.cpp +1 -1
- package/ReactCommon/react/renderer/uimanager/primitives.h +10 -18
- package/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp +1 -1
- package/ReactCommon/react/runtime/BridgelessNativeMethodCallInvoker.h +0 -1
- package/ReactCommon/react/runtime/BufferedRuntimeExecutor.h +1 -0
- package/ReactCommon/react/runtime/CMakeLists.txt +8 -3
- package/ReactCommon/react/runtime/React-RuntimeCore.podspec +4 -3
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +4 -2
- package/ReactCommon/react/runtime/ReactInstance.cpp +2 -1
- package/ReactCommon/react/runtime/ReactInstance.h +1 -0
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +5 -2
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +8 -10
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +43 -20
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTLegacyUIManagerConstantsProvider.mm +1 -1
- package/ReactCommon/react/test_utils/shadowTreeGeneration.h +16 -16
- package/ReactCommon/react/timing/React-timing.podspec +1 -1
- package/ReactCommon/react/timing/primitives.h +280 -15
- package/ReactCommon/react/timing/tests/PrimitivesTest.cpp +82 -24
- package/ReactCommon/react/utils/CMakeLists.txt +13 -3
- package/ReactCommon/react/utils/FloatComparison.h +8 -2
- package/ReactCommon/react/utils/ManagedObjectWrapper.mm +2 -4
- package/ReactCommon/react/utils/OnScopeExit.h +1 -1
- package/ReactCommon/react/utils/PackTraits.h +0 -2
- package/ReactCommon/react/utils/React-utils.podspec +4 -3
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +40 -28
- package/ReactCommon/react/utils/iequals.h +1 -3
- package/ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.h +18 -0
- package/{React/CxxUtils/RCTFollyConvert.mm → ReactCommon/react/utils/platform/ios/react/utils/FollyConvert.mm} +17 -1
- package/ReactCommon/react/utils/tests/SimpleThreadSafeCacheTest.cpp +40 -0
- package/ReactCommon/reactperflogger/React-perflogger.podspec +2 -1
- package/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.cpp +2 -4
- package/ReactCommon/reactperflogger/reactperflogger/BridgeNativeModulePerfLogger.h +2 -6
- package/ReactCommon/reactperflogger/reactperflogger/FuseboxPerfettoDataSource.cpp +6 -2
- package/ReactCommon/reactperflogger/reactperflogger/HermesPerfettoDataSource.cpp +10 -4
- package/ReactCommon/reactperflogger/reactperflogger/NativeModulePerfLogger.h +1 -1
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfetto.cpp +10 -6
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfetto.h +2 -1
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoLogger.cpp +9 -12
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoLogger.h +4 -3
- package/ReactCommon/runtimeexecutor/CMakeLists.txt +2 -2
- package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +24 -1
- package/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h +0 -72
- package/ReactCommon/runtimeexecutor/platform/cxx/ReactCommon/RuntimeExecutorSyncUIThreadUtils.cpp +61 -0
- package/ReactCommon/runtimeexecutor/platform/cxx/ReactCommon/RuntimeExecutorSyncUIThreadUtils.h +36 -0
- package/ReactCommon/runtimeexecutor/platform/ios/ReactCommon/RuntimeExecutorSyncUIThreadUtils.h +39 -0
- package/ReactCommon/runtimeexecutor/platform/ios/ReactCommon/RuntimeExecutorSyncUIThreadUtils.mm +260 -0
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/ReactCommon/yoga/yoga/YGNodeLayout.cpp +8 -0
- package/ReactCommon/yoga/yoga/YGNodeLayout.h +10 -0
- package/ReactCommon/yoga/yoga/YGValue.h +2 -2
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +21 -16
- package/ReactCommon/yoga/yoga/algorithm/PixelGrid.cpp +6 -6
- package/ReactCommon/yoga/yoga/node/LayoutResults.h +9 -0
- package/ReactCommon/yoga/yoga/node/Node.cpp +29 -0
- package/ReactCommon/yoga/yoga/node/Node.h +6 -4
- package/cli.js +52 -33
- package/{src/types → flow}/bom.js.flow +0 -10
- package/{src/types → flow}/cssom.js.flow +0 -1
- package/{src/types → flow}/dom.js.flow +0 -1
- package/{src/types → flow}/streams.js.flow +0 -1
- package/gradle/libs.versions.toml +6 -5
- package/index.js +22 -2
- package/index.js.flow +10 -1
- package/interface.js +1 -1
- package/jest/MockNativeMethods.js +9 -3
- package/jest/assetFileTransformer.js +1 -0
- package/jest/local-setup.js +4 -3
- package/jest/mock.js +39 -0
- package/jest/mockComponent.js +47 -17
- package/jest/mockNativeComponent.js +26 -15
- package/jest/mocks/AccessibilityInfo.js +62 -0
- package/jest/mocks/ActivityIndicator.js +23 -0
- package/jest/mocks/AppState.js +19 -0
- package/jest/mocks/Clipboard.js +16 -0
- package/jest/mocks/Image.js +23 -0
- package/jest/mocks/InitializeCore.js +9 -0
- package/jest/mocks/Linking.js +28 -0
- package/jest/mocks/Modal.js +33 -0
- package/jest/mocks/NativeComponentRegistry.js +30 -0
- package/jest/mocks/NativeModules.js +239 -0
- package/jest/mocks/RefreshControl.js +31 -0
- package/jest/mocks/RendererProxy.js +45 -0
- package/jest/mocks/ScrollView.js +58 -0
- package/jest/mocks/Text.js +27 -0
- package/jest/mocks/TextInput.js +32 -0
- package/jest/mocks/UIManager.js +60 -0
- package/jest/mocks/Vibration.js +16 -0
- package/jest/mocks/View.js +27 -0
- package/jest/mocks/ViewNativeComponent.js +23 -0
- package/jest/mocks/requireNativeComponent.js +22 -0
- package/{Libraries/Utilities/infoLog.js → jest/mocks/useColorScheme.js} +7 -9
- package/jest/react-native-env.js +1 -0
- package/jest/renderer.js +1 -2
- package/jest/resolver.js +1 -0
- package/jest/setup.js +64 -443
- package/jest-preset.js +1 -0
- package/package.json +16 -22
- package/react-native.config.js +18 -5
- package/scripts/bundle.js +10 -2
- package/scripts/cocoapods/helpers.rb +1 -1
- package/scripts/cocoapods/jsengine.rb +28 -16
- package/scripts/cocoapods/new_architecture.rb +1 -0
- package/scripts/cocoapods/rncore.rb +247 -0
- package/scripts/cocoapods/rndependencies.rb +86 -26
- package/scripts/cocoapods/utils.rb +73 -44
- package/scripts/codegen/codegen-utils.js +9 -4
- package/scripts/codegen/generate-artifacts-executor/constants.js +30 -36
- package/scripts/codegen/generate-artifacts-executor/generateAppDependencyProvider.js +2 -1
- package/scripts/codegen/generate-artifacts-executor/generateCustomURLHandlers.js +10 -4
- package/scripts/codegen/generate-artifacts-executor/generateFBReactNativeSpecIOS.js +8 -4
- package/scripts/codegen/generate-artifacts-executor/generateNativeCode.js +21 -29
- package/scripts/codegen/generate-artifacts-executor/generateRCTModuleProviders.js +7 -6
- package/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js +13 -6
- package/scripts/codegen/generate-artifacts-executor/generateReactCodegenPodspec.js +8 -7
- package/scripts/codegen/generate-artifacts-executor/generateSchemaInfos.js +15 -5
- package/scripts/codegen/generate-artifacts-executor/generateUnstableModulesRequiringMainQueueSetupProvider.js +4 -3
- package/scripts/codegen/generate-artifacts-executor/index.js +24 -10
- package/scripts/codegen/generate-artifacts-executor/utils.js +51 -23
- package/scripts/codegen/generate-specs-cli-executor.js +36 -30
- package/scripts/codegen/templates/ReactCodegen.podspec.template +5 -2
- package/scripts/compose-source-maps.js +3 -2
- package/scripts/generate-codegen-artifacts.js +2 -0
- package/scripts/generate-provider-cli.js +11 -5
- package/scripts/generate-specs-cli.js +7 -0
- package/scripts/hermes/hermes-utils.js +2 -2
- package/scripts/hermes/prepare-hermes-for-build.js +2 -1
- package/scripts/packager-reporter.js +9 -3
- package/scripts/react_native_pods.rb +56 -24
- package/scripts/replace-rncore-version.js +120 -0
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-utils.rb +25 -23
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +11 -3
- package/sdks/hermes-engine/utils/replace_hermes_version.js +1 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
- package/src/private/animated/NativeAnimatedHelper.js +8 -1
- package/src/private/animated/createAnimatedPropsHook.js +14 -4
- package/src/private/animated/createAnimatedPropsMemoHook.js +2 -3
- package/src/private/components/safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js +0 -1
- package/src/private/components/scrollview/HScrollViewNativeComponents.js +0 -1
- package/src/private/components/scrollview/VScrollViewNativeComponents.js +0 -1
- package/src/private/components/virtualview/VirtualView.js +145 -0
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +90 -0
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/NetworkOverlay.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/XHRInterceptor.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/getInspectorDataForViewAtPoint.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/perfmonitor/PerformanceOverlay.js +1 -1
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +0 -1
- package/src/private/devsupport/rndevtools/ReactDevToolsSettingsManager.android.js +8 -9
- package/src/private/devsupport/rndevtools/ReactDevToolsSettingsManager.ios.js +12 -15
- package/src/private/devsupport/rndevtools/ReactDevToolsSettingsManager.js.flow +3 -7
- package/src/private/devsupport/rndevtools/setUpFuseboxReactDevToolsDispatcher.js +0 -1
- package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsRuntimeSettingsModule.js +0 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +93 -8
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -0
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +16 -3
- package/src/private/renderer/errorhandling/ErrorHandlers.js +1 -1
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +44 -0
- package/src/private/setup/setUpPerformanceObserver.js +7 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +8 -5
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +4 -4
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +4 -4
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +4 -4
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +10 -7
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +5 -4
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +7 -4
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +10 -7
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +9 -6
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +15 -6
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +9 -6
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +5 -5
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +4 -4
- package/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.js +1 -0
- package/src/private/specs_DEPRECATED/modules/NativeFrameRateLogger.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativePermissionsAndroid.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativePushNotificationManagerIOS.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeUIManager.js +9 -6
- package/src/private/styles/composeStyles.js +5 -12
- package/src/private/types/HostInstance.js +1 -1
- package/src/private/webapis/dom/events/Event.js +3 -0
- package/src/private/webapis/dom/events/EventTarget.js +3 -0
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +1 -1
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +7 -24
- package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +4 -2
- package/src/private/webapis/dom/nodes/ReadOnlyText.js +1 -1
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +1 -1
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/internals/Traversal.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +38 -0
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -1
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js.flow +1 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +4 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js.flow +1 -1
- package/src/private/webapis/errors/DOMException.js +166 -0
- package/src/private/webapis/geometry/DOMRect.js +5 -0
- package/src/private/webapis/geometry/DOMRectList.js +4 -1
- package/src/private/webapis/geometry/DOMRectList.js.flow +1 -1
- package/src/private/webapis/geometry/DOMRectReadOnly.js +6 -0
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +4 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +15 -7
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +3 -0
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +83 -18
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +12 -0
- package/src/private/webapis/mutationobserver/MutationObserver.js +13 -38
- package/src/private/webapis/mutationobserver/MutationRecord.js +3 -0
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +7 -29
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +1 -4
- package/src/private/webapis/performance/EventTiming.js +1 -1
- package/src/private/webapis/performance/LongTasks.js +1 -1
- package/src/private/webapis/performance/MemoryInfo.js +4 -1
- package/src/private/webapis/performance/Performance.js +20 -9
- package/src/private/webapis/performance/PerformanceEntry.js +5 -1
- package/src/private/webapis/performance/PerformanceObserver.js +32 -28
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +4 -1
- package/src/private/webapis/performance/ResourceTiming.js +108 -0
- package/src/private/webapis/performance/UserTiming.js +1 -1
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +50 -33
- package/src/private/webapis/performance/internals/Utilities.js +1 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +1 -1
- package/src/private/webapis/structuredClone/structuredClone.js +233 -0
- package/src/private/webapis/utils/ArrayLikeUtils.js +1 -1
- package/src/private/webapis/webidl/PlatformObjects.js +59 -0
- package/third-party-podspecs/ReactNativeDependencies.podspec +14 -1
- package/third-party-podspecs/replace_dependencies_version.js +37 -6
- package/types/modules/Devtools.d.ts +23 -9
- package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +101 -0
- package/types_generated/Libraries/Alert/Alert.d.ts +55 -0
- package/types_generated/Libraries/Animated/Animated.d.ts +14 -0
- package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +30 -0
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +190 -0
- package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +128 -0
- package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +13 -0
- package/types_generated/Libraries/Animated/Easing.d.ts +171 -0
- package/types_generated/Libraries/Animated/animations/Animation.d.ts +35 -0
- package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +42 -0
- package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +130 -0
- package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +54 -0
- package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedImage.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +23 -0
- package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedText.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedView.d.ts +19 -0
- package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +42 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedAddition.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +76 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDiffClamp.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDivision.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +36 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedModulo.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedMultiplication.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +46 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedProps.d.ts +29 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedStyle.d.ts +32 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedSubtraction.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedTracking.d.ts +21 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +126 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValueXY.d.ts +135 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedWithChildren.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/types_generated/Libraries/AppState/AppState.d.ts +63 -0
- package/types_generated/Libraries/BatchedBridge/BatchedBridge.d.ts +17 -0
- package/types_generated/Libraries/BatchedBridge/MessageQueue.d.ts +39 -0
- package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +20 -0
- package/types_generated/Libraries/Blob/Blob.d.ts +80 -0
- package/types_generated/Libraries/Blob/BlobTypes.d.ts +27 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +220 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +20 -0
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +84 -0
- package/types_generated/Libraries/Components/Button.d.ts +251 -0
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +38 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +17 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.d.ts +27 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +176 -0
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +146 -0
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +73 -0
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +24 -0
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +141 -0
- package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +45 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +32 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +50 -0
- package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +113 -0
- package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +33 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +560 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +24 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponent.d.ts +21 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponentType.d.ts +134 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +36 -0
- package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +222 -0
- package/types_generated/Libraries/Components/Switch/AndroidSwitchNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/Switch/Switch.d.ts +138 -0
- package/types_generated/Libraries/Components/Switch/SwitchNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +23 -0
- package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +21 -0
- package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +71 -0
- package/types_generated/Libraries/Components/TV/TVTextScrollView.d.ts +97 -0
- package/types_generated/Libraries/Components/TV/TVViewPropTypes.d.ts +79 -0
- package/types_generated/Libraries/Components/TV/tagForComponentOrHandle.d.ts +24 -0
- package/types_generated/Libraries/Components/TV/useTVEventHandler.d.ts +20 -0
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +86 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +47 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +984 -0
- package/types_generated/Libraries/Components/TextInput/TextInputState.d.ts +54 -0
- package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +99 -0
- package/types_generated/Libraries/Components/Touchable/Touchable.d.ts +257 -0
- package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +71 -0
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +228 -0
- package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +76 -0
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +121 -0
- package/types_generated/Libraries/Components/View/View.d.ts +30 -0
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +415 -0
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +29 -0
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +431 -0
- package/types_generated/Libraries/Core/Devtools/symbolicateStackTrace.d.ts +27 -0
- package/types_generated/Libraries/Core/ExceptionsManager.d.ts +43 -0
- package/types_generated/Libraries/Core/ExtendedError.d.ts +26 -0
- package/types_generated/Libraries/Core/NativeExceptionsManager.d.ts +17 -0
- package/types_generated/Libraries/Core/RawEventEmitter.d.ts +26 -0
- package/types_generated/Libraries/Core/ReactFiberErrorDialog.d.ts +27 -0
- package/types_generated/Libraries/Core/registerCallableModule.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +42 -0
- package/types_generated/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +19 -0
- package/types_generated/Libraries/EventEmitter/RCTEventEmitter.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +21 -0
- package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +71 -0
- package/types_generated/Libraries/Image/Image.d.ts +18 -0
- package/types_generated/Libraries/Image/ImageBackground.d.ts +44 -0
- package/types_generated/Libraries/Image/ImageProps.d.ts +512 -0
- package/types_generated/Libraries/Image/ImageResizeMode.d.ts +17 -0
- package/types_generated/Libraries/Image/ImageSource.d.ts +94 -0
- package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +64 -0
- package/types_generated/Libraries/Image/ImageViewNativeComponent.d.ts +68 -0
- package/types_generated/Libraries/Image/TextInlineImageNativeComponent.d.ts +42 -0
- package/types_generated/Libraries/Interaction/InteractionManager.d.ts +100 -0
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +231 -0
- package/types_generated/Libraries/Interaction/TaskQueue.d.ts +73 -0
- package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +76 -0
- package/types_generated/Libraries/Linking/Linking.d.ts +68 -0
- package/types_generated/Libraries/Lists/FlatList.d.ts +317 -0
- package/types_generated/Libraries/Lists/SectionList.d.ts +172 -0
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +19 -0
- package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +19 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +78 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +88 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxSymbolication.d.ts +17 -0
- package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +53 -0
- package/types_generated/Libraries/LogBox/LogBox.d.ts +29 -0
- package/types_generated/Libraries/Modal/Modal.d.ts +110 -0
- package/types_generated/Libraries/NativeModules/specs/NativeDialogManagerAndroid.d.ts +17 -0
- package/types_generated/Libraries/Network/FormData.d.ts +56 -0
- package/types_generated/Libraries/Network/RCTNetworking.d.ts +25 -0
- package/types_generated/Libraries/Network/RCTNetworkingEventDefinitions.flow.d.ts +22 -0
- package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +96 -0
- package/types_generated/Libraries/Network/convertRequestBody.d.ts +21 -0
- package/types_generated/Libraries/Performance/Systrace.d.ts +61 -0
- package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +129 -0
- package/types_generated/Libraries/Pressability/Pressability.d.ts +241 -0
- package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +323 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.d.ts +14 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +44 -0
- package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +73 -0
- package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +24 -0
- package/types_generated/Libraries/ReactNative/I18nManager.d.ts +23 -0
- package/types_generated/Libraries/ReactNative/NativeI18nManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/NativeUIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.d.ts +28 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.d.ts +32 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.d.ts +15 -0
- package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +37 -0
- package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +28 -0
- package/types_generated/Libraries/ReactNative/RootTag.d.ts +22 -0
- package/types_generated/Libraries/ReactNative/UIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/requireNativeComponent.d.ts +25 -0
- package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +33 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +169 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.d.ts +41 -0
- package/types_generated/Libraries/Settings/Settings.d.ts +21 -0
- package/types_generated/Libraries/Share/Share.d.ts +85 -0
- package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +15 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +17 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +27 -0
- package/types_generated/Libraries/StyleSheet/PointPropType.d.ts +16 -0
- package/types_generated/Libraries/StyleSheet/Rect.d.ts +22 -0
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +153 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +107 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +826 -0
- package/types_generated/Libraries/StyleSheet/flattenStyle.d.ts +19 -0
- package/types_generated/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.d.ts +17 -0
- package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +76 -0
- package/types_generated/Libraries/StyleSheet/processColor.d.ts +18 -0
- package/types_generated/Libraries/Text/Text.d.ts +30 -0
- package/types_generated/Libraries/Text/TextAncestorContext.d.ts +20 -0
- package/types_generated/Libraries/Text/TextNativeComponent.d.ts +31 -0
- package/types_generated/Libraries/Text/TextProps.d.ts +220 -0
- package/types_generated/Libraries/TurboModule/RCTExport.d.ts +35 -0
- package/types_generated/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
- package/types_generated/Libraries/Types/CodegenTypes.d.ts +24 -0
- package/types_generated/Libraries/Types/CodegenTypesNamespace.d.ts +14 -0
- package/types_generated/Libraries/Types/CoreEventTypes.d.ts +327 -0
- package/types_generated/Libraries/Types/RootTagTypes.d.ts +13 -0
- package/types_generated/Libraries/Types/UIManagerJSInterface.d.ts +17 -0
- package/types_generated/Libraries/UTFSequence.d.ts +39 -0
- package/types_generated/Libraries/Utilities/Appearance.d.ts +31 -0
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +23 -0
- package/types_generated/Libraries/Utilities/DevSettings.d.ts +34 -0
- package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +17 -0
- package/types_generated/Libraries/Utilities/Dimensions.d.ts +54 -0
- package/types_generated/Libraries/Utilities/IPerformanceLogger.d.ts +51 -0
- package/types_generated/Libraries/Utilities/NativeAppearance.d.ts +17 -0
- package/types_generated/Libraries/Utilities/NativeDeviceInfo.d.ts +14 -0
- package/types_generated/Libraries/Utilities/PixelRatio.d.ts +110 -0
- package/types_generated/Libraries/Utilities/Platform.d.ts +16 -0
- package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +134 -0
- package/types_generated/Libraries/Utilities/codegenNativeCommands.d.ts +19 -0
- package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +24 -0
- package/types_generated/Libraries/Utilities/createPerformanceLogger.d.ts +23 -0
- package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +33 -0
- package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +19 -0
- package/types_generated/Libraries/Utilities/useColorScheme.d.ts +15 -0
- package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +15 -0
- package/types_generated/Libraries/Vibration/Vibration.d.ts +29 -0
- package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +39 -0
- package/types_generated/Libraries/vendor/emitter/EventEmitter.d.ts +67 -0
- package/types_generated/index.d.ts +164 -0
- package/types_generated/src/private/components/virtualview/VirtualView.d.ts +70 -0
- package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +97 -0
- package/types_generated/src/private/devsupport/devmenu/DevMenu.d.ts +28 -0
- package/types_generated/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.d.ts +53 -0
- package/types_generated/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.d.ts +36 -0
- package/types_generated/src/private/specs_DEPRECATED/components/SwitchNativeComponent.d.ts +51 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +26 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +46 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.d.ts +37 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +45 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeI18nManager.d.ts +27 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +109 -0
- package/types_generated/src/private/styles/composeStyles.d.ts +19 -0
- package/types_generated/src/private/types/HostComponent.d.ts +19 -0
- package/types_generated/src/private/types/HostInstance.d.ts +91 -0
- package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +27 -0
- package/types_generated/src/private/webapis/dom/events/Event.d.ts +58 -0
- package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +48 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +32 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +30 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +54 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +126 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +24 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +29 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.d.ts +23 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.d.ts +22 -0
- package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +222 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +22 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +25 -0
- package/types_generated/src/private/webapis/geometry/DOMRect.d.ts +46 -0
- package/types_generated/src/private/webapis/geometry/DOMRectReadOnly.d.ts +73 -0
- package/types_generated/src/private/webapis/utils/ArrayLikeUtils.d.ts +27 -0
- package/types_generated/tsconfig.json +3 -0
- package/types_generated/tsconfig.test.json +16 -0
- package/Libraries/BugReporting/BugReporting.js +0 -140
- package/Libraries/BugReporting/NativeBugReporting.js +0 -13
- package/Libraries/BugReporting/dumpReactTree.js +0 -151
- package/Libraries/BugReporting/getReactData.js +0 -187
- package/Libraries/Interaction/JSEventLoopWatchdog.js +0 -88
- package/React/CxxBridge/JSCExecutorFactory.h +0 -27
- package/React/CxxBridge/JSCExecutorFactory.mm +0 -24
- package/React/Runtime/RCTJscInstanceFactory.mm +0 -20
- package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java +0 -222
- package/ReactAndroid/src/main/java/com/facebook/react/JSEngineResolutionAlgorithm.kt +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/LazyReactPackage.java +0 -144
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +0 -420
- package/ReactAndroid/src/main/java/com/facebook/react/ReactFragment.java +0 -270
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +0 -421
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.java +0 -269
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.java +0 -413
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaScriptModuleRegistry.java +0 -102
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleHolder.java +0 -247
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleSpec.java +0 -75
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.java +0 -169
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/PromiseImpl.java +0 -257
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactApplicationContext.java +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContextBaseJavaModule.java +0 -44
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactInstanceManagerInspectorTarget.java +0 -75
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java +0 -233
- package/ReactAndroid/src/main/java/com/facebook/react/common/MapBuilder.java +0 -136
- package/ReactAndroid/src/main/java/com/facebook/react/common/annotations/DeprecatedInNewArchitecture.kt +0 -16
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java +0 -410
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +0 -474
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt +0 -41
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutorFactory.kt +0 -44
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpCompat.java +0 -38
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSCInstance.kt +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +0 -1825
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java +0 -247
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.java +0 -203
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java +0 -235
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java +0 -244
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerRegistry.java +0 -190
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcherImpl.java +0 -372
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.java +0 -417
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +0 -383
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +0 -235
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributes.java +0 -208
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +0 -968
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +0 -1559
- package/ReactAndroid/src/main/jni/react/jscexecutor/CMakeLists.txt +0 -37
- package/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp +0 -74
- package/ReactAndroid/src/main/jni/react/jsctooling/CMakeLists.txt +0 -36
- package/ReactAndroid/src/main/jni/react/runtime/jsc/jni/CMakeLists.txt +0 -26
- package/ReactAndroid/src/main/jni/react/runtime/jsc/jni/OnLoad.cpp +0 -48
- package/ReactCommon/React-rncore.podspec +0 -52
- package/ReactCommon/cxxreact/SampleCxxModule.cpp +0 -182
- package/ReactCommon/cxxreact/SampleCxxModule.h +0 -59
- package/ReactCommon/jsc/CMakeLists.txt +0 -34
- package/ReactCommon/jsc/React-jsc.podspec +0 -37
- package/ReactCommon/react/nativemodule/fantomforcedclonecommithook/NativeFantomForcedCloneCommitHook.cpp +0 -84
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.h +0 -18
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.mm +0 -31
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp +0 -177
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h +0 -46
- package/ReactCommon/react/renderer/components/rncore/Props.cpp +0 -156
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerClock.h +0 -22
- package/jest/mockModal.js +0 -32
- package/jest/mockScrollView.js +0 -35
- package/scripts/codegen/generate-artifacts-executor/generateRNCoreComponentsIOS.js +0 -38
- package/src/private/specs_DEPRECATED/modules/NativeBugReporting.js +0 -20
- package/types/tsconfig.test.json +0 -16
- package/types/tslint.json +0 -24
|
@@ -1,1559 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package com.facebook.react.views.view;
|
|
9
|
-
|
|
10
|
-
import static com.facebook.infer.annotation.Assertions.nullsafeFIXME;
|
|
11
|
-
import static com.facebook.react.common.ReactConstants.TAG;
|
|
12
|
-
|
|
13
|
-
import android.annotation.SuppressLint;
|
|
14
|
-
import android.annotation.TargetApi;
|
|
15
|
-
import android.content.Context;
|
|
16
|
-
import android.graphics.BlendMode;
|
|
17
|
-
import android.graphics.Canvas;
|
|
18
|
-
import android.graphics.Paint;
|
|
19
|
-
import android.graphics.Rect;
|
|
20
|
-
import android.graphics.drawable.Drawable;
|
|
21
|
-
import android.os.Build;
|
|
22
|
-
import android.os.Bundle;
|
|
23
|
-
import android.view.FocusFinder;
|
|
24
|
-
import android.view.KeyEvent;
|
|
25
|
-
import android.view.MotionEvent;
|
|
26
|
-
import android.view.View;
|
|
27
|
-
import android.view.ViewGroup;
|
|
28
|
-
import android.view.ViewParent;
|
|
29
|
-
import android.view.ViewStructure;
|
|
30
|
-
import android.view.accessibility.AccessibilityNodeInfo;
|
|
31
|
-
import android.view.animation.Animation;
|
|
32
|
-
|
|
33
|
-
import androidx.annotation.NonNull;
|
|
34
|
-
import androidx.annotation.Nullable;
|
|
35
|
-
import androidx.core.view.ViewCompat;
|
|
36
|
-
|
|
37
|
-
import com.facebook.common.logging.FLog;
|
|
38
|
-
import com.facebook.infer.annotation.Assertions;
|
|
39
|
-
import com.facebook.infer.annotation.Nullsafe;
|
|
40
|
-
import com.facebook.react.R;
|
|
41
|
-
import com.facebook.react.bridge.ReactContext;
|
|
42
|
-
import com.facebook.react.bridge.ReactNoCrashSoftException;
|
|
43
|
-
import com.facebook.react.bridge.ReactSoftExceptionLogger;
|
|
44
|
-
import com.facebook.react.bridge.UiThreadUtil;
|
|
45
|
-
import com.facebook.react.config.ReactFeatureFlags;
|
|
46
|
-
import com.facebook.react.touch.OnInterceptTouchEventListener;
|
|
47
|
-
import com.facebook.react.touch.ReactHitSlopView;
|
|
48
|
-
import com.facebook.react.touch.ReactInterceptingViewGroup;
|
|
49
|
-
import com.facebook.react.uimanager.BackgroundStyleApplicator;
|
|
50
|
-
import com.facebook.react.uimanager.BlendModeHelper;
|
|
51
|
-
import com.facebook.react.uimanager.LengthPercentage;
|
|
52
|
-
import com.facebook.react.uimanager.LengthPercentageType;
|
|
53
|
-
import com.facebook.react.uimanager.MeasureSpecAssertions;
|
|
54
|
-
import com.facebook.react.uimanager.PixelUtil;
|
|
55
|
-
import com.facebook.react.uimanager.PointerEvents;
|
|
56
|
-
import com.facebook.react.uimanager.ReactAccessibilityDelegate;
|
|
57
|
-
import com.facebook.react.uimanager.ReactClippingProhibitedView;
|
|
58
|
-
import com.facebook.react.uimanager.ReactClippingViewGroup;
|
|
59
|
-
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
|
60
|
-
import com.facebook.react.uimanager.ReactOverflowViewWithInset;
|
|
61
|
-
import com.facebook.react.uimanager.ReactPointerEventsView;
|
|
62
|
-
import com.facebook.react.uimanager.ReactZIndexedViewGroup;
|
|
63
|
-
import com.facebook.react.uimanager.RootView;
|
|
64
|
-
import com.facebook.react.uimanager.RootViewUtil;
|
|
65
|
-
import com.facebook.react.uimanager.UIManagerHelper;
|
|
66
|
-
import com.facebook.react.uimanager.ViewGroupDrawingOrderHelper;
|
|
67
|
-
import com.facebook.react.uimanager.common.UIManagerType;
|
|
68
|
-
import com.facebook.react.uimanager.common.ViewUtil;
|
|
69
|
-
import com.facebook.react.uimanager.drawable.CSSBackgroundDrawable;
|
|
70
|
-
import com.facebook.react.uimanager.events.BlurEvent;
|
|
71
|
-
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
72
|
-
import com.facebook.react.uimanager.events.FocusEvent;
|
|
73
|
-
import com.facebook.react.uimanager.events.PressInEvent;
|
|
74
|
-
import com.facebook.react.uimanager.events.PressOutEvent;
|
|
75
|
-
import com.facebook.react.uimanager.style.BackgroundImageLayer;
|
|
76
|
-
import com.facebook.react.uimanager.style.BorderRadiusProp;
|
|
77
|
-
import com.facebook.react.uimanager.style.BorderStyle;
|
|
78
|
-
import com.facebook.react.uimanager.style.LogicalEdge;
|
|
79
|
-
import com.facebook.react.uimanager.style.Overflow;
|
|
80
|
-
import java.util.HashSet;
|
|
81
|
-
import java.util.Set;
|
|
82
|
-
|
|
83
|
-
import java.lang.ref.WeakReference;
|
|
84
|
-
import java.util.ArrayList;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Backing for a React View. Has support for borders, but since borders aren't common, lazy
|
|
88
|
-
* initializes most of the storage needed for them.
|
|
89
|
-
*/
|
|
90
|
-
@Nullsafe(Nullsafe.Mode.LOCAL)
|
|
91
|
-
public class ReactViewGroup extends ViewGroup
|
|
92
|
-
implements ReactInterceptingViewGroup,
|
|
93
|
-
ReactClippingViewGroup,
|
|
94
|
-
ReactPointerEventsView,
|
|
95
|
-
ReactHitSlopView,
|
|
96
|
-
ReactZIndexedViewGroup,
|
|
97
|
-
ReactOverflowViewWithInset {
|
|
98
|
-
|
|
99
|
-
private static final int ARRAY_CAPACITY_INCREMENT = 12;
|
|
100
|
-
private static final LayoutParams sDefaultLayoutParam = new ViewGroup.LayoutParams(0, 0);
|
|
101
|
-
private final Rect mOverflowInset = new Rect();
|
|
102
|
-
|
|
103
|
-
private @NonNull int[] focusDestinations = new int[0];
|
|
104
|
-
private boolean autoFocus = false;
|
|
105
|
-
private boolean isFocusGuideTalkbackAccessibilityDelegateSet = false;
|
|
106
|
-
private WeakReference<View> lastFocusedElement;
|
|
107
|
-
private boolean mRecoverFocus = false;
|
|
108
|
-
private boolean originalIsFocusable = false;
|
|
109
|
-
private boolean trapFocusUp = false;
|
|
110
|
-
private boolean trapFocusDown = false;
|
|
111
|
-
private boolean trapFocusLeft = false;
|
|
112
|
-
private boolean trapFocusRight = false;
|
|
113
|
-
public boolean hasTVPreferredFocus = false;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* This listener will be set for child views when removeClippedSubview property is enabled. When
|
|
118
|
-
* children layout is updated, it will call {@link #updateSubviewClipStatus} to notify parent view
|
|
119
|
-
* about that fact so that view can be attached/detached if necessary.
|
|
120
|
-
*
|
|
121
|
-
* <p>TODO(7728005): Attach/detach views in batch - once per frame in case when multiple children
|
|
122
|
-
* update their layout.
|
|
123
|
-
*/
|
|
124
|
-
private static final class ChildrenLayoutChangeListener implements View.OnLayoutChangeListener {
|
|
125
|
-
|
|
126
|
-
@Nullable private ReactViewGroup mParent;
|
|
127
|
-
|
|
128
|
-
private ChildrenLayoutChangeListener(ReactViewGroup parent) {
|
|
129
|
-
mParent = parent;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@Override
|
|
133
|
-
public void onLayoutChange(
|
|
134
|
-
View v,
|
|
135
|
-
int left,
|
|
136
|
-
int top,
|
|
137
|
-
int right,
|
|
138
|
-
int bottom,
|
|
139
|
-
int oldLeft,
|
|
140
|
-
int oldTop,
|
|
141
|
-
int oldRight,
|
|
142
|
-
int oldBottom) {
|
|
143
|
-
if (mParent != null && mParent.getRemoveClippedSubviews()) {
|
|
144
|
-
mParent.updateSubviewClipStatus(v);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
public void shutdown() {
|
|
149
|
-
mParent = null;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
private int mRecycleCount = 0;
|
|
154
|
-
|
|
155
|
-
// Following properties are here to support the option {@code removeClippedSubviews}. This is a
|
|
156
|
-
// temporary optimization/hack that is mainly applicable to the large list of images. The way
|
|
157
|
-
// it's implemented is that we store an additional array of children in view node. We selectively
|
|
158
|
-
// remove some of the views (detach) from it while still storing them in that additional array.
|
|
159
|
-
// We override all possible add methods for {@link ViewGroup} so that we can control this process
|
|
160
|
-
// whenever the option is set. We also override {@link ViewGroup#getChildAt} and
|
|
161
|
-
// {@link ViewGroup#getChildCount} so those methods may return views that are not attached.
|
|
162
|
-
// This is risky but allows us to perform a correct cleanup in {@link NativeViewHierarchyManager}.
|
|
163
|
-
private boolean mRemoveClippedSubviews;
|
|
164
|
-
private volatile boolean mInSubviewClippingLoop;
|
|
165
|
-
private @Nullable View[] mAllChildren;
|
|
166
|
-
private int mAllChildrenCount;
|
|
167
|
-
private @Nullable Rect mClippingRect;
|
|
168
|
-
private @Nullable Rect mHitSlopRect;
|
|
169
|
-
private Overflow mOverflow;
|
|
170
|
-
private PointerEvents mPointerEvents = PointerEvents.AUTO;
|
|
171
|
-
private @Nullable ChildrenLayoutChangeListener mChildrenLayoutChangeListener;
|
|
172
|
-
private @Nullable OnInterceptTouchEventListener mOnInterceptTouchEventListener;
|
|
173
|
-
private boolean mNeedsOffscreenAlphaCompositing;
|
|
174
|
-
private @Nullable ViewGroupDrawingOrderHelper mDrawingOrderHelper;
|
|
175
|
-
private float mBackfaceOpacity;
|
|
176
|
-
private boolean mBackfaceVisible;
|
|
177
|
-
private @Nullable Set<Integer> mChildrenRemovedWhileTransitioning;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Creates a new `ReactViewGroup` instance.
|
|
181
|
-
*
|
|
182
|
-
* @param context A {@link Context} instance. It's Nullable to not break compatibility with OSS
|
|
183
|
-
* users (could be made non-null in the future but requires proper comms).
|
|
184
|
-
*/
|
|
185
|
-
public ReactViewGroup(@Nullable Context context) {
|
|
186
|
-
super(context);
|
|
187
|
-
initView();
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Set all default values here as opposed to in the constructor or field defaults. It is important
|
|
192
|
-
* that these properties are set during the constructor, but also on-demand whenever an existing
|
|
193
|
-
* ReactViewGroup is recycled.
|
|
194
|
-
*/
|
|
195
|
-
private void initView() {
|
|
196
|
-
setClipChildren(false);
|
|
197
|
-
|
|
198
|
-
mRemoveClippedSubviews = false;
|
|
199
|
-
mInSubviewClippingLoop = false;
|
|
200
|
-
mAllChildren = null;
|
|
201
|
-
mAllChildrenCount = 0;
|
|
202
|
-
mClippingRect = null;
|
|
203
|
-
mHitSlopRect = null;
|
|
204
|
-
mOverflow = Overflow.VISIBLE;
|
|
205
|
-
mPointerEvents = PointerEvents.AUTO;
|
|
206
|
-
mChildrenLayoutChangeListener = null;
|
|
207
|
-
mOnInterceptTouchEventListener = null;
|
|
208
|
-
mNeedsOffscreenAlphaCompositing = false;
|
|
209
|
-
mDrawingOrderHelper = null;
|
|
210
|
-
mBackfaceOpacity = 1.f;
|
|
211
|
-
mBackfaceVisible = true;
|
|
212
|
-
mChildrenRemovedWhileTransitioning = null;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/* package */ void recycleView() {
|
|
216
|
-
mRecycleCount++;
|
|
217
|
-
// Remove dangling listeners
|
|
218
|
-
if (mAllChildren != null && mChildrenLayoutChangeListener != null) {
|
|
219
|
-
mChildrenLayoutChangeListener.shutdown();
|
|
220
|
-
for (int i = 0; i < mAllChildrenCount; i++) {
|
|
221
|
-
mAllChildren[i].removeOnLayoutChangeListener(mChildrenLayoutChangeListener);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Set default field values
|
|
226
|
-
initView();
|
|
227
|
-
mOverflowInset.setEmpty();
|
|
228
|
-
|
|
229
|
-
// Remove any children
|
|
230
|
-
removeAllViews();
|
|
231
|
-
|
|
232
|
-
// If the view is still attached to a parent, we need to remove it from the parent
|
|
233
|
-
// before we can recycle it.
|
|
234
|
-
if (getParent() != null) {
|
|
235
|
-
((ViewGroup) getParent()).removeView(this);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Reset background, borders
|
|
239
|
-
updateBackgroundDrawable(null);
|
|
240
|
-
|
|
241
|
-
resetPointerEvents();
|
|
242
|
-
|
|
243
|
-
cleanupFocusGuideTalkbackAccessibilityDelegate();
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
private ViewGroupDrawingOrderHelper getDrawingOrderHelper() {
|
|
247
|
-
if (mDrawingOrderHelper == null) {
|
|
248
|
-
mDrawingOrderHelper = new ViewGroupDrawingOrderHelper(this);
|
|
249
|
-
}
|
|
250
|
-
return mDrawingOrderHelper;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
@Override
|
|
254
|
-
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
255
|
-
MeasureSpecAssertions.assertExplicitMeasureSpec(widthMeasureSpec, heightMeasureSpec);
|
|
256
|
-
|
|
257
|
-
setMeasuredDimension(
|
|
258
|
-
MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
@Override
|
|
262
|
-
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
|
263
|
-
// No-op since UIManager handles actually laying out children.
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
@Override
|
|
267
|
-
@SuppressLint("MissingSuperCall")
|
|
268
|
-
public void requestLayout() {
|
|
269
|
-
// No-op, terminate `requestLayout` here, UIManager handles laying out children and
|
|
270
|
-
// `layout` is called on all RN-managed views by `NativeViewHierarchyManager`
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
@TargetApi(23)
|
|
274
|
-
@Override
|
|
275
|
-
public void dispatchProvideStructure(ViewStructure structure) {
|
|
276
|
-
try {
|
|
277
|
-
super.dispatchProvideStructure(structure);
|
|
278
|
-
} catch (NullPointerException e) {
|
|
279
|
-
FLog.e(TAG, "NullPointerException when executing dispatchProvideStructure", e);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
@Override
|
|
284
|
-
public void setBackgroundColor(int color) {
|
|
285
|
-
BackgroundStyleApplicator.setBackgroundColor(this, color);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
@Deprecated(since = "0.76.0", forRemoval = true)
|
|
289
|
-
public void setTranslucentBackgroundDrawable(@Nullable Drawable background) {
|
|
290
|
-
BackgroundStyleApplicator.setFeedbackUnderlay(this, background);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
@Override
|
|
294
|
-
public void setOnInterceptTouchEventListener(OnInterceptTouchEventListener listener) {
|
|
295
|
-
mOnInterceptTouchEventListener = listener;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
@Override
|
|
299
|
-
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
|
300
|
-
if (mOnInterceptTouchEventListener != null
|
|
301
|
-
&& mOnInterceptTouchEventListener.onInterceptTouchEvent(this, ev)) {
|
|
302
|
-
return true;
|
|
303
|
-
}
|
|
304
|
-
// We intercept the touch event if the children are not supposed to receive it.
|
|
305
|
-
if (!PointerEvents.canChildrenBeTouchTarget(mPointerEvents)) {
|
|
306
|
-
return true;
|
|
307
|
-
}
|
|
308
|
-
return super.onInterceptTouchEvent(ev);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
@Override
|
|
312
|
-
public boolean onTouchEvent(MotionEvent event) {
|
|
313
|
-
// We do not accept the touch event if this view is not supposed to receive it.
|
|
314
|
-
if (!PointerEvents.canBeTouchTarget(mPointerEvents)) {
|
|
315
|
-
return false;
|
|
316
|
-
}
|
|
317
|
-
// The root view always assumes any view that was tapped wants the touch
|
|
318
|
-
// and sends the event to JS as such.
|
|
319
|
-
// We don't need to do bubbling in native (it's already happening in JS).
|
|
320
|
-
// For an explanation of bubbling and capturing, see
|
|
321
|
-
// http://javascript.info/tutorial/bubbling-and-capturing#capturing
|
|
322
|
-
return true;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
@Override
|
|
326
|
-
public boolean onHoverEvent(MotionEvent event) {
|
|
327
|
-
if (ReactFeatureFlags.dispatchPointerEvents) {
|
|
328
|
-
// Match the logic from onTouchEvent if pointer events are enabled
|
|
329
|
-
return PointerEvents.canBeTouchTarget(mPointerEvents);
|
|
330
|
-
}
|
|
331
|
-
return super.onHoverEvent(event);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
@Override
|
|
335
|
-
public boolean dispatchGenericMotionEvent(MotionEvent ev) {
|
|
336
|
-
// We do not dispatch the motion event if its children are not supposed to receive it
|
|
337
|
-
if (!PointerEvents.canChildrenBeTouchTarget(mPointerEvents)) {
|
|
338
|
-
return false;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
return super.dispatchGenericMotionEvent(ev);
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* We override this to allow developers to determine whether they need offscreen alpha compositing
|
|
346
|
-
* or not. See the documentation of needsOffscreenAlphaCompositing in View.js.
|
|
347
|
-
*/
|
|
348
|
-
@Override
|
|
349
|
-
public boolean hasOverlappingRendering() {
|
|
350
|
-
return mNeedsOffscreenAlphaCompositing;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/** See the documentation of needsOffscreenAlphaCompositing in View.js. */
|
|
354
|
-
public void setNeedsOffscreenAlphaCompositing(boolean needsOffscreenAlphaCompositing) {
|
|
355
|
-
mNeedsOffscreenAlphaCompositing = needsOffscreenAlphaCompositing;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
public void setBorderWidth(int position, float width) {
|
|
359
|
-
BackgroundStyleApplicator.setBorderWidth(
|
|
360
|
-
this, LogicalEdge.values()[position], PixelUtil.toDIPFromPixel(width));
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
public void setBorderColor(int position, @Nullable Integer color) {
|
|
364
|
-
BackgroundStyleApplicator.setBorderColor(this, LogicalEdge.values()[position], color);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* @deprecated Use {@link #setBorderRadius(BorderRadiusProp, LengthPercentage)} instead.
|
|
369
|
-
*/
|
|
370
|
-
@Deprecated(since = "0.75.0", forRemoval = true)
|
|
371
|
-
public void setBorderRadius(float borderRadius) {
|
|
372
|
-
setBorderRadius(borderRadius, BorderRadiusProp.BORDER_RADIUS.ordinal());
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* @deprecated Use {@link #setBorderRadius(BorderRadiusProp, LengthPercentage)} instead.
|
|
377
|
-
*/
|
|
378
|
-
@Deprecated(since = "0.75.0", forRemoval = true)
|
|
379
|
-
public void setBorderRadius(float borderRadius, int position) {
|
|
380
|
-
@Nullable
|
|
381
|
-
LengthPercentage radius =
|
|
382
|
-
Float.isNaN(borderRadius)
|
|
383
|
-
? null
|
|
384
|
-
: new LengthPercentage(borderRadius, LengthPercentageType.POINT);
|
|
385
|
-
BackgroundStyleApplicator.setBorderRadius(this, BorderRadiusProp.values()[position], radius);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
public void setBorderRadius(BorderRadiusProp property, @Nullable LengthPercentage borderRadius) {
|
|
389
|
-
BackgroundStyleApplicator.setBorderRadius(this, property, borderRadius);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
public void setBorderStyle(@Nullable String style) {
|
|
393
|
-
BackgroundStyleApplicator.setBorderStyle(
|
|
394
|
-
this, style == null ? null : BorderStyle.fromString(style));
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
@Override
|
|
398
|
-
public void setRemoveClippedSubviews(boolean removeClippedSubviews) {
|
|
399
|
-
if (removeClippedSubviews == mRemoveClippedSubviews) {
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
mRemoveClippedSubviews = removeClippedSubviews;
|
|
403
|
-
mChildrenRemovedWhileTransitioning = null;
|
|
404
|
-
if (removeClippedSubviews) {
|
|
405
|
-
mClippingRect = new Rect();
|
|
406
|
-
ReactClippingViewGroupHelper.calculateClippingRect(this, mClippingRect);
|
|
407
|
-
mAllChildrenCount = getChildCount();
|
|
408
|
-
int initialSize = Math.max(12, mAllChildrenCount);
|
|
409
|
-
mAllChildren = new View[initialSize];
|
|
410
|
-
mChildrenLayoutChangeListener = new ChildrenLayoutChangeListener(this);
|
|
411
|
-
for (int i = 0; i < mAllChildrenCount; i++) {
|
|
412
|
-
View child = getChildAt(i);
|
|
413
|
-
mAllChildren[i] = child;
|
|
414
|
-
child.addOnLayoutChangeListener(mChildrenLayoutChangeListener);
|
|
415
|
-
setViewClipped(child, false);
|
|
416
|
-
}
|
|
417
|
-
updateClippingRect();
|
|
418
|
-
} else {
|
|
419
|
-
// Add all clipped views back, deallocate additional arrays, remove layoutChangeListener
|
|
420
|
-
Assertions.assertNotNull(mClippingRect);
|
|
421
|
-
Assertions.assertNotNull(mAllChildren);
|
|
422
|
-
Assertions.assertNotNull(mChildrenLayoutChangeListener);
|
|
423
|
-
for (int i = 0; i < mAllChildrenCount; i++) {
|
|
424
|
-
mAllChildren[i].removeOnLayoutChangeListener(mChildrenLayoutChangeListener);
|
|
425
|
-
}
|
|
426
|
-
getDrawingRect(mClippingRect);
|
|
427
|
-
updateClippingToRect(mClippingRect);
|
|
428
|
-
mAllChildren = null;
|
|
429
|
-
mClippingRect = null;
|
|
430
|
-
mAllChildrenCount = 0;
|
|
431
|
-
mChildrenLayoutChangeListener = null;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
@Override
|
|
436
|
-
public boolean getRemoveClippedSubviews() {
|
|
437
|
-
return mRemoveClippedSubviews;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
@Override
|
|
441
|
-
public void getClippingRect(Rect outClippingRect) {
|
|
442
|
-
outClippingRect.set(nullsafeFIXME(mClippingRect, "Fix in Kotlin"));
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
@Override
|
|
446
|
-
public void updateClippingRect() {
|
|
447
|
-
updateClippingRect(null);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
@Override
|
|
451
|
-
public void updateClippingRect(@Nullable Set<Integer> excludedViewsSet) {
|
|
452
|
-
if (!mRemoveClippedSubviews) {
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
Assertions.assertNotNull(mClippingRect);
|
|
457
|
-
Assertions.assertNotNull(mAllChildren);
|
|
458
|
-
|
|
459
|
-
ReactClippingViewGroupHelper.calculateClippingRect(this, mClippingRect);
|
|
460
|
-
updateClippingToRect(mClippingRect, excludedViewsSet);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
@Override
|
|
464
|
-
public void endViewTransition(View view) {
|
|
465
|
-
super.endViewTransition(view);
|
|
466
|
-
if (mChildrenRemovedWhileTransitioning != null) {
|
|
467
|
-
mChildrenRemovedWhileTransitioning.remove(view.getId());
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
private void trackChildViewTransition(int childId) {
|
|
472
|
-
if (mChildrenRemovedWhileTransitioning == null) {
|
|
473
|
-
mChildrenRemovedWhileTransitioning = new HashSet<>();
|
|
474
|
-
}
|
|
475
|
-
mChildrenRemovedWhileTransitioning.add(childId);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
private boolean isChildRemovedWhileTransitioning(View child) {
|
|
479
|
-
return mChildrenRemovedWhileTransitioning != null
|
|
480
|
-
&& mChildrenRemovedWhileTransitioning.contains(child.getId());
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
private void updateClippingToRect(Rect clippingRect) {
|
|
484
|
-
updateClippingToRect(clippingRect, null);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
private void updateClippingToRect(Rect clippingRect, @Nullable Set<Integer> excludedViewsSet) {
|
|
488
|
-
Assertions.assertNotNull(mAllChildren);
|
|
489
|
-
mInSubviewClippingLoop = true;
|
|
490
|
-
int clippedSoFar = 0;
|
|
491
|
-
for (int i = 0; i < mAllChildrenCount; i++) {
|
|
492
|
-
try {
|
|
493
|
-
updateSubviewClipStatus(clippingRect, i, clippedSoFar, excludedViewsSet);
|
|
494
|
-
} catch (IndexOutOfBoundsException e) {
|
|
495
|
-
int realClippedSoFar = 0;
|
|
496
|
-
Set<View> uniqueViews = new HashSet<>();
|
|
497
|
-
for (int j = 0; j < i; j++) {
|
|
498
|
-
realClippedSoFar += isViewClipped(mAllChildren[j], null) ? 1 : 0;
|
|
499
|
-
uniqueViews.add(mAllChildren[j]);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
throw new IllegalStateException(
|
|
503
|
-
"Invalid clipping state. i="
|
|
504
|
-
+ i
|
|
505
|
-
+ " clippedSoFar="
|
|
506
|
-
+ clippedSoFar
|
|
507
|
-
+ " count="
|
|
508
|
-
+ getChildCount()
|
|
509
|
-
+ " allChildrenCount="
|
|
510
|
-
+ mAllChildrenCount
|
|
511
|
-
+ " recycleCount="
|
|
512
|
-
+ mRecycleCount
|
|
513
|
-
+ " realClippedSoFar="
|
|
514
|
-
+ realClippedSoFar
|
|
515
|
-
+ " uniqueViewsCount="
|
|
516
|
-
+ uniqueViews.size(),
|
|
517
|
-
e);
|
|
518
|
-
}
|
|
519
|
-
if (isViewClipped(mAllChildren[i], i)) {
|
|
520
|
-
clippedSoFar++;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
mInSubviewClippingLoop = false;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
private void updateSubviewClipStatus(Rect clippingRect, int idx, int clippedSoFar) {
|
|
527
|
-
updateSubviewClipStatus(clippingRect, idx, clippedSoFar, null);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
private void updateSubviewClipStatus(
|
|
531
|
-
Rect clippingRect, int idx, int clippedSoFar, @Nullable Set<Integer> excludedViewsSet) {
|
|
532
|
-
UiThreadUtil.assertOnUiThread();
|
|
533
|
-
|
|
534
|
-
View child = Assertions.assertNotNull(mAllChildren)[idx];
|
|
535
|
-
boolean intersects =
|
|
536
|
-
clippingRect.intersects(
|
|
537
|
-
child.getLeft(), child.getTop(), child.getRight(), child.getBottom());
|
|
538
|
-
boolean needUpdateClippingRecursive = false;
|
|
539
|
-
// We never want to clip children that are being animated, as this can easily break layout :
|
|
540
|
-
// when layout animation changes size and/or position of views contained inside a listview that
|
|
541
|
-
// clips offscreen children, we need to ensure that, when view exits the viewport, final size
|
|
542
|
-
// and position is set prior to removing the view from its listview parent.
|
|
543
|
-
// Otherwise, when view gets re-attached again, i.e when it re-enters the viewport after scroll,
|
|
544
|
-
// it won't be size and located properly.
|
|
545
|
-
Animation animation = child.getAnimation();
|
|
546
|
-
boolean isAnimating = animation != null && !animation.hasEnded();
|
|
547
|
-
boolean shouldSkipView = excludedViewsSet != null && excludedViewsSet.contains(child.getId());
|
|
548
|
-
if (excludedViewsSet != null) {
|
|
549
|
-
needUpdateClippingRecursive = true;
|
|
550
|
-
}
|
|
551
|
-
// We don't want to clip a view that is currently focused at that might break focus navigation
|
|
552
|
-
if (!intersects
|
|
553
|
-
&& !isViewClipped(child, idx)
|
|
554
|
-
&& !isAnimating
|
|
555
|
-
&& child != getFocusedChild()
|
|
556
|
-
&& !shouldSkipView) {
|
|
557
|
-
setViewClipped(child, true);
|
|
558
|
-
recoverFocus(child);
|
|
559
|
-
// We can try saving on invalidate call here as the view that we remove is out of visible area
|
|
560
|
-
// therefore invalidation is not necessary.
|
|
561
|
-
removeViewInLayout(child);
|
|
562
|
-
needUpdateClippingRecursive = true;
|
|
563
|
-
} else if ((shouldSkipView || intersects) && isViewClipped(child, idx)) {
|
|
564
|
-
int adjustedIdx = idx - clippedSoFar;
|
|
565
|
-
Assertions.assertCondition(adjustedIdx >= 0);
|
|
566
|
-
setViewClipped(child, false);
|
|
567
|
-
addViewInLayout(child, adjustedIdx, sDefaultLayoutParam, true);
|
|
568
|
-
invalidate();
|
|
569
|
-
needUpdateClippingRecursive = true;
|
|
570
|
-
} else if (intersects) {
|
|
571
|
-
// If there is any intersection we need to inform the child to update its clipping rect
|
|
572
|
-
needUpdateClippingRecursive = true;
|
|
573
|
-
}
|
|
574
|
-
if (needUpdateClippingRecursive) {
|
|
575
|
-
if (child instanceof ReactClippingViewGroup) {
|
|
576
|
-
ReactClippingViewGroup clippingChild = (ReactClippingViewGroup) child;
|
|
577
|
-
if (clippingChild.getRemoveClippedSubviews()) {
|
|
578
|
-
clippingChild.updateClippingRect(excludedViewsSet);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
private void updateSubviewClipStatus(View subview) {
|
|
585
|
-
if (!mRemoveClippedSubviews || getParent() == null) {
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
Assertions.assertNotNull(mClippingRect);
|
|
590
|
-
Assertions.assertNotNull(mAllChildren);
|
|
591
|
-
|
|
592
|
-
// do fast check whether intersect state changed
|
|
593
|
-
boolean intersects =
|
|
594
|
-
mClippingRect.intersects(
|
|
595
|
-
subview.getLeft(), subview.getTop(), subview.getRight(), subview.getBottom());
|
|
596
|
-
|
|
597
|
-
// If it was intersecting before, should be attached to the parent
|
|
598
|
-
boolean oldIntersects = !isViewClipped(subview, null);
|
|
599
|
-
|
|
600
|
-
if (intersects != oldIntersects) {
|
|
601
|
-
mInSubviewClippingLoop = true;
|
|
602
|
-
int clippedSoFar = 0;
|
|
603
|
-
for (int i = 0; i < mAllChildrenCount; i++) {
|
|
604
|
-
if (mAllChildren[i] == subview) {
|
|
605
|
-
updateSubviewClipStatus(mClippingRect, i, clippedSoFar);
|
|
606
|
-
break;
|
|
607
|
-
}
|
|
608
|
-
if (isViewClipped(mAllChildren[i], i)) {
|
|
609
|
-
clippedSoFar++;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
mInSubviewClippingLoop = false;
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
private View getFirstFocusableView(ReactViewGroup viewGroup) {
|
|
617
|
-
ArrayList<View> focusables = new ArrayList<View>(0);
|
|
618
|
-
/**
|
|
619
|
-
* `addFocusables` is the method used by `FocusFinder` to determine
|
|
620
|
-
* which elements are `focusable` within the given view.
|
|
621
|
-
* Here we use it for the exact purpose. It mutates/populates the `focusables` array list.
|
|
622
|
-
* Focus direction (FOCUS_DOWN) doesn't matter at all because
|
|
623
|
-
* it's not being used by the underlying implementation.
|
|
624
|
-
*
|
|
625
|
-
* Here we intentionally call `super` method to bypass `ReactViewGroup`'s
|
|
626
|
-
* overriden `addFocusables` logic.
|
|
627
|
-
*/
|
|
628
|
-
super.addFocusables(focusables, FOCUS_DOWN, FOCUSABLES_ALL);
|
|
629
|
-
/**
|
|
630
|
-
* Depending on ViewGroup's `descendantFocusability` property,
|
|
631
|
-
* the first element can be the ViewGroup itself.
|
|
632
|
-
* The other ones on the list can be non-focusable as well.
|
|
633
|
-
* So, we run a loop till finding the first real focusable element.
|
|
634
|
-
*/
|
|
635
|
-
if (focusables.size() <= 0) return null;
|
|
636
|
-
|
|
637
|
-
View firstFocusableElement = null;
|
|
638
|
-
int index = 0;
|
|
639
|
-
while (firstFocusableElement == null && index < focusables.size()) {
|
|
640
|
-
View elem = focusables.get(index);
|
|
641
|
-
if (elem != viewGroup) {
|
|
642
|
-
firstFocusableElement = elem;
|
|
643
|
-
break;
|
|
644
|
-
}
|
|
645
|
-
index++;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
return firstFocusableElement;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
boolean moveFocusToFirstFocusable(ReactViewGroup viewGroup) {
|
|
652
|
-
View firstFocusableElement = this.getFirstFocusableView(viewGroup);
|
|
653
|
-
|
|
654
|
-
if (firstFocusableElement != null) return firstFocusableElement.requestFocus();
|
|
655
|
-
|
|
656
|
-
return false;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
void recoverFocus(View view) {
|
|
660
|
-
if (!view.hasFocus() || !(view instanceof ReactViewGroup)) return;
|
|
661
|
-
|
|
662
|
-
ReactViewGroup parentFocusGuide = findParentFocusGuide(view);
|
|
663
|
-
if (parentFocusGuide == null) return;
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* Making `parentFocusGuide` focusable for a brief time to
|
|
667
|
-
* temporarily move the focus to it. We do this to prevent
|
|
668
|
-
* Android from moving the focus to top-left-most element of the screen.
|
|
669
|
-
*/
|
|
670
|
-
parentFocusGuide.mRecoverFocus = true;
|
|
671
|
-
parentFocusGuide.setFocusable(true);
|
|
672
|
-
parentFocusGuide.requestFocus();
|
|
673
|
-
|
|
674
|
-
/**
|
|
675
|
-
* We set a Runnable to wait and make sure every layout related action gets completed
|
|
676
|
-
* before trying to find a new focus candidate inside the `parentFocusGuide`.
|
|
677
|
-
*/
|
|
678
|
-
UiThreadUtil.runOnUiThread(
|
|
679
|
-
new Runnable() {
|
|
680
|
-
@Override
|
|
681
|
-
public void run() {
|
|
682
|
-
/**
|
|
683
|
-
* Focus can move to an another element while waiting for the next frame.
|
|
684
|
-
* E.g: An element with `hasTVPreferredFocus` can appear.
|
|
685
|
-
*
|
|
686
|
-
* We check here to make sure `parentFocusGuide` still remains the focus
|
|
687
|
-
* before recovering the focus to make sure we don't accidentally override it.
|
|
688
|
-
*/
|
|
689
|
-
if (parentFocusGuide.isFocused()) {
|
|
690
|
-
moveFocusToFirstFocusable(parentFocusGuide);
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
parentFocusGuide.setFocusable(false);
|
|
694
|
-
parentFocusGuide.mRecoverFocus = false;
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
@Override
|
|
700
|
-
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
|
701
|
-
super.onSizeChanged(w, h, oldw, oldh);
|
|
702
|
-
if (mRemoveClippedSubviews) {
|
|
703
|
-
updateClippingRect();
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
@Override
|
|
708
|
-
protected void onAttachedToWindow() {
|
|
709
|
-
super.onAttachedToWindow();
|
|
710
|
-
if (mRemoveClippedSubviews) {
|
|
711
|
-
updateClippingRect();
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
private boolean customDrawOrderDisabled() {
|
|
716
|
-
if (getId() == NO_ID) {
|
|
717
|
-
return false;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
// Custom draw order is disabled for Fabric.
|
|
721
|
-
return ViewUtil.getUIManagerType(getId()) == UIManagerType.FABRIC;
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
@Override
|
|
725
|
-
public void onViewAdded(View child) {
|
|
726
|
-
UiThreadUtil.assertOnUiThread();
|
|
727
|
-
checkViewClippingTag(child, Boolean.FALSE);
|
|
728
|
-
if (!customDrawOrderDisabled()) {
|
|
729
|
-
getDrawingOrderHelper().handleAddView(child);
|
|
730
|
-
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
|
|
731
|
-
} else {
|
|
732
|
-
setChildrenDrawingOrderEnabled(false);
|
|
733
|
-
}
|
|
734
|
-
super.onViewAdded(child);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
@Override
|
|
738
|
-
public void onViewRemoved(View child) {
|
|
739
|
-
UiThreadUtil.assertOnUiThread();
|
|
740
|
-
checkViewClippingTag(child, Boolean.TRUE);
|
|
741
|
-
if (!customDrawOrderDisabled()) {
|
|
742
|
-
getDrawingOrderHelper().handleRemoveView(child);
|
|
743
|
-
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
|
|
744
|
-
} else {
|
|
745
|
-
setChildrenDrawingOrderEnabled(false);
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
// The parent might not be null in case the child is transitioning.
|
|
749
|
-
if (child.getParent() != null) {
|
|
750
|
-
trackChildViewTransition(child.getId());
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
super.onViewRemoved(child);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
private void checkViewClippingTag(View child, Boolean expectedTag) {
|
|
757
|
-
if (mInSubviewClippingLoop) {
|
|
758
|
-
Object tag = child.getTag(R.id.view_clipped);
|
|
759
|
-
if (!expectedTag.equals(tag)) {
|
|
760
|
-
ReactSoftExceptionLogger.logSoftException(
|
|
761
|
-
ReactSoftExceptionLogger.Categories.RVG_ON_VIEW_REMOVED,
|
|
762
|
-
new ReactNoCrashSoftException(
|
|
763
|
-
"View clipping tag mismatch: tag=" + tag + " expected=" + expectedTag));
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
if (mRemoveClippedSubviews) {
|
|
767
|
-
child.setTag(R.id.view_clipped, expectedTag);
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
@Override
|
|
772
|
-
protected int getChildDrawingOrder(int childCount, int index) {
|
|
773
|
-
UiThreadUtil.assertOnUiThread();
|
|
774
|
-
|
|
775
|
-
if (!customDrawOrderDisabled()) {
|
|
776
|
-
return getDrawingOrderHelper().getChildDrawingOrder(childCount, index);
|
|
777
|
-
} else {
|
|
778
|
-
return index;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
@Override
|
|
783
|
-
public int getZIndexMappedChildIndex(int index) {
|
|
784
|
-
UiThreadUtil.assertOnUiThread();
|
|
785
|
-
|
|
786
|
-
if (!customDrawOrderDisabled() && getDrawingOrderHelper().shouldEnableCustomDrawingOrder()) {
|
|
787
|
-
return getDrawingOrderHelper().getChildDrawingOrder(getChildCount(), index);
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
// Fabric behavior
|
|
791
|
-
return index;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
@Override
|
|
795
|
-
public void updateDrawingOrder() {
|
|
796
|
-
if (customDrawOrderDisabled()) {
|
|
797
|
-
return;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
getDrawingOrderHelper().update();
|
|
801
|
-
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
|
|
802
|
-
invalidate();
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
@Override
|
|
806
|
-
public PointerEvents getPointerEvents() {
|
|
807
|
-
return mPointerEvents;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
@Override
|
|
811
|
-
protected void dispatchSetPressed(boolean pressed) {
|
|
812
|
-
// Prevents the ViewGroup from dispatching the pressed state
|
|
813
|
-
// to it's children.
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
public void setPointerEvents(PointerEvents pointerEvents) {
|
|
817
|
-
mPointerEvents = pointerEvents;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/*package*/ void resetPointerEvents() {
|
|
821
|
-
mPointerEvents = PointerEvents.AUTO;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/*package*/ int getAllChildrenCount() {
|
|
825
|
-
return mAllChildrenCount;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
/*package*/ @Nullable
|
|
829
|
-
View getChildAtWithSubviewClippingEnabled(int index) {
|
|
830
|
-
return index >= 0 && index < mAllChildrenCount
|
|
831
|
-
? Assertions.assertNotNull(mAllChildren)[index]
|
|
832
|
-
: null;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
/*package*/ void addViewWithSubviewClippingEnabled(View child, int index) {
|
|
836
|
-
addViewWithSubviewClippingEnabled(child, index, sDefaultLayoutParam);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
/*package*/ void addViewWithSubviewClippingEnabled(
|
|
840
|
-
final View child, int index, ViewGroup.LayoutParams params) {
|
|
841
|
-
Assertions.assertCondition(mRemoveClippedSubviews);
|
|
842
|
-
setViewClipped(child, true); // the view has not been added, so it is "clipped"
|
|
843
|
-
addInArray(child, index);
|
|
844
|
-
|
|
845
|
-
// we add view as "clipped" and then run {@link #updateSubviewClipStatus} to conditionally
|
|
846
|
-
// attach it
|
|
847
|
-
Rect clippingRect = Assertions.assertNotNull(mClippingRect);
|
|
848
|
-
View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
849
|
-
mInSubviewClippingLoop = true;
|
|
850
|
-
int clippedSoFar = 0;
|
|
851
|
-
for (int i = 0; i < index; i++) {
|
|
852
|
-
if (isViewClipped(childArray[i], i)) {
|
|
853
|
-
clippedSoFar++;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
updateSubviewClipStatus(clippingRect, index, clippedSoFar);
|
|
857
|
-
mInSubviewClippingLoop = false;
|
|
858
|
-
child.addOnLayoutChangeListener(mChildrenLayoutChangeListener);
|
|
859
|
-
|
|
860
|
-
if (child instanceof ReactClippingProhibitedView) {
|
|
861
|
-
UiThreadUtil.runOnUiThread(
|
|
862
|
-
new Runnable() {
|
|
863
|
-
@Override
|
|
864
|
-
public void run() {
|
|
865
|
-
if (!child.isShown()) {
|
|
866
|
-
ReactSoftExceptionLogger.logSoftException(
|
|
867
|
-
ReactSoftExceptionLogger.Categories.CLIPPING_PROHIBITED_VIEW,
|
|
868
|
-
new ReactNoCrashSoftException(
|
|
869
|
-
"Child view has been added to Parent view in which it is clipped and not"
|
|
870
|
-
+ " visible. This is not legal for this particular child view. Child: ["
|
|
871
|
-
+ child.getId()
|
|
872
|
-
+ "] "
|
|
873
|
-
+ child.toString()
|
|
874
|
-
+ " Parent: ["
|
|
875
|
-
+ getId()
|
|
876
|
-
+ "] "
|
|
877
|
-
+ toString()));
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
/*package*/ void removeViewWithSubviewClippingEnabled(View view) {
|
|
885
|
-
UiThreadUtil.assertOnUiThread();
|
|
886
|
-
|
|
887
|
-
Assertions.assertCondition(mRemoveClippedSubviews);
|
|
888
|
-
Assertions.assertNotNull(mClippingRect);
|
|
889
|
-
View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
890
|
-
view.removeOnLayoutChangeListener(mChildrenLayoutChangeListener);
|
|
891
|
-
int index = indexOfChildInAllChildren(view);
|
|
892
|
-
if (!isViewClipped(childArray[index], index)) {
|
|
893
|
-
int clippedSoFar = 0;
|
|
894
|
-
for (int i = 0; i < index; i++) {
|
|
895
|
-
if (isViewClipped(childArray[i], i)) {
|
|
896
|
-
clippedSoFar++;
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
removeViewsInLayout(index - clippedSoFar, 1);
|
|
900
|
-
invalidate();
|
|
901
|
-
}
|
|
902
|
-
removeFromArray(index);
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
/*package*/ void removeAllViewsWithSubviewClippingEnabled() {
|
|
906
|
-
Assertions.assertCondition(mRemoveClippedSubviews);
|
|
907
|
-
View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
908
|
-
for (int i = 0; i < mAllChildrenCount; i++) {
|
|
909
|
-
childArray[i].removeOnLayoutChangeListener(mChildrenLayoutChangeListener);
|
|
910
|
-
}
|
|
911
|
-
removeAllViewsInLayout();
|
|
912
|
-
mAllChildrenCount = 0;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* @return {@code true} if the view has been removed from the ViewGroup.
|
|
917
|
-
* @param index For logging - index of the view in {@code mAllChildren}, or {@code null} to skip
|
|
918
|
-
* logging.
|
|
919
|
-
*/
|
|
920
|
-
private boolean isViewClipped(View view, @Nullable Integer index) {
|
|
921
|
-
Object tag = view.getTag(R.id.view_clipped);
|
|
922
|
-
if (tag != null) {
|
|
923
|
-
return (boolean) tag;
|
|
924
|
-
}
|
|
925
|
-
ViewParent parent = view.getParent();
|
|
926
|
-
boolean transitioning = isChildRemovedWhileTransitioning(view);
|
|
927
|
-
if (index != null) {
|
|
928
|
-
ReactSoftExceptionLogger.logSoftException(
|
|
929
|
-
ReactSoftExceptionLogger.Categories.RVG_IS_VIEW_CLIPPED,
|
|
930
|
-
new ReactNoCrashSoftException(
|
|
931
|
-
"View missing clipping tag: index="
|
|
932
|
-
+ index
|
|
933
|
-
+ " parentNull="
|
|
934
|
-
+ (parent == null)
|
|
935
|
-
+ " parentThis="
|
|
936
|
-
+ (parent == this)
|
|
937
|
-
+ " transitioning="
|
|
938
|
-
+ transitioning));
|
|
939
|
-
}
|
|
940
|
-
// fallback - should be transitioning or have no parent if the view was removed
|
|
941
|
-
if (parent == null || transitioning) {
|
|
942
|
-
return true;
|
|
943
|
-
} else {
|
|
944
|
-
Assertions.assertCondition(parent == this);
|
|
945
|
-
return false;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
private static void setViewClipped(View view, boolean clipped) {
|
|
950
|
-
view.setTag(R.id.view_clipped, clipped);
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
private int indexOfChildInAllChildren(View child) {
|
|
954
|
-
final int count = mAllChildrenCount;
|
|
955
|
-
final View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
956
|
-
for (int i = 0; i < count; i++) {
|
|
957
|
-
if (childArray[i] == child) {
|
|
958
|
-
return i;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
return -1;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
private void addInArray(View child, int index) {
|
|
965
|
-
View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
966
|
-
final int count = mAllChildrenCount;
|
|
967
|
-
final int size = childArray.length;
|
|
968
|
-
if (index == count) {
|
|
969
|
-
if (size == count) {
|
|
970
|
-
mAllChildren = new View[size + ARRAY_CAPACITY_INCREMENT];
|
|
971
|
-
System.arraycopy(childArray, 0, mAllChildren, 0, size);
|
|
972
|
-
childArray = mAllChildren;
|
|
973
|
-
}
|
|
974
|
-
childArray[mAllChildrenCount++] = child;
|
|
975
|
-
} else if (index < count) {
|
|
976
|
-
if (size == count) {
|
|
977
|
-
mAllChildren = new View[size + ARRAY_CAPACITY_INCREMENT];
|
|
978
|
-
System.arraycopy(childArray, 0, mAllChildren, 0, index);
|
|
979
|
-
System.arraycopy(childArray, index, mAllChildren, index + 1, count - index);
|
|
980
|
-
childArray = mAllChildren;
|
|
981
|
-
} else {
|
|
982
|
-
System.arraycopy(childArray, index, childArray, index + 1, count - index);
|
|
983
|
-
}
|
|
984
|
-
childArray[index] = child;
|
|
985
|
-
mAllChildrenCount++;
|
|
986
|
-
} else {
|
|
987
|
-
throw new IndexOutOfBoundsException("index=" + index + " count=" + count);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
private void removeFromArray(int index) {
|
|
992
|
-
final View[] childArray = Assertions.assertNotNull(mAllChildren);
|
|
993
|
-
final int count = mAllChildrenCount;
|
|
994
|
-
if (index == count - 1) {
|
|
995
|
-
childArray[--mAllChildrenCount] = null;
|
|
996
|
-
} else if (index >= 0 && index < count) {
|
|
997
|
-
System.arraycopy(childArray, index + 1, childArray, index, count - index - 1);
|
|
998
|
-
childArray[--mAllChildrenCount] = null;
|
|
999
|
-
} else {
|
|
1000
|
-
throw new IndexOutOfBoundsException();
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
@Override
|
|
1005
|
-
public @Nullable Rect getHitSlopRect() {
|
|
1006
|
-
return mHitSlopRect;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
public void setHitSlopRect(@Nullable Rect rect) {
|
|
1010
|
-
mHitSlopRect = rect;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
public void setOverflow(@Nullable String overflow) {
|
|
1014
|
-
if (overflow == null) {
|
|
1015
|
-
mOverflow = Overflow.VISIBLE;
|
|
1016
|
-
} else {
|
|
1017
|
-
@Nullable Overflow parsedOverflow = Overflow.fromString(overflow);
|
|
1018
|
-
mOverflow = parsedOverflow == null ? Overflow.VISIBLE : parsedOverflow;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
invalidate();
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
@Override
|
|
1025
|
-
public @Nullable String getOverflow() {
|
|
1026
|
-
switch (mOverflow) {
|
|
1027
|
-
case HIDDEN:
|
|
1028
|
-
return "hidden";
|
|
1029
|
-
case SCROLL:
|
|
1030
|
-
return "scroll";
|
|
1031
|
-
case VISIBLE:
|
|
1032
|
-
return "visible";
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
return null;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
@Override
|
|
1039
|
-
public void setOverflowInset(int left, int top, int right, int bottom) {
|
|
1040
|
-
if (BlendModeHelper.needsIsolatedLayer(this)
|
|
1041
|
-
&& (mOverflowInset.left != left
|
|
1042
|
-
|| mOverflowInset.top != top
|
|
1043
|
-
|| mOverflowInset.right != right
|
|
1044
|
-
|| mOverflowInset.bottom != bottom)) {
|
|
1045
|
-
invalidate();
|
|
1046
|
-
}
|
|
1047
|
-
mOverflowInset.set(left, top, right, bottom);
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
@Override
|
|
1051
|
-
public Rect getOverflowInset() {
|
|
1052
|
-
return mOverflowInset;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
/**
|
|
1056
|
-
* Set the background for the view or remove the background. It calls {@link
|
|
1057
|
-
* #setBackground(Drawable)} or {@link #setBackgroundDrawable(Drawable)} based on the sdk version.
|
|
1058
|
-
*
|
|
1059
|
-
* @param drawable {@link Drawable} The Drawable to use as the background, or null to remove the
|
|
1060
|
-
* background
|
|
1061
|
-
*/
|
|
1062
|
-
/* package */ void updateBackgroundDrawable(@Nullable Drawable drawable) {
|
|
1063
|
-
super.setBackground(drawable);
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
@Override
|
|
1067
|
-
public void draw(Canvas canvas) {
|
|
1068
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
|
1069
|
-
&& ViewUtil.getUIManagerType(this) == UIManagerType.FABRIC
|
|
1070
|
-
&& BlendModeHelper.needsIsolatedLayer(this)) {
|
|
1071
|
-
|
|
1072
|
-
// Check if the view is a stacking context and has children, if it does, do the rendering
|
|
1073
|
-
// offscreen and then composite back. This follows the idea of group isolation on blending
|
|
1074
|
-
// https://www.w3.org/TR/compositing-1/#isolationblending
|
|
1075
|
-
Rect overflowInset = getOverflowInset();
|
|
1076
|
-
canvas.saveLayer(
|
|
1077
|
-
overflowInset.left,
|
|
1078
|
-
overflowInset.top,
|
|
1079
|
-
getWidth() + -overflowInset.right,
|
|
1080
|
-
getHeight() + -overflowInset.bottom,
|
|
1081
|
-
null);
|
|
1082
|
-
super.draw(canvas);
|
|
1083
|
-
canvas.restore();
|
|
1084
|
-
} else {
|
|
1085
|
-
super.draw(canvas);
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
@Override
|
|
1090
|
-
protected void dispatchDraw(Canvas canvas) {
|
|
1091
|
-
if (mOverflow != Overflow.VISIBLE || getTag(R.id.filter) != null) {
|
|
1092
|
-
BackgroundStyleApplicator.clipToPaddingBox(this, canvas);
|
|
1093
|
-
}
|
|
1094
|
-
super.dispatchDraw(canvas);
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
@Override
|
|
1098
|
-
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
|
|
1099
|
-
boolean drawWithZ = child.getElevation() > 0;
|
|
1100
|
-
|
|
1101
|
-
if (drawWithZ) {
|
|
1102
|
-
CanvasUtil.enableZ(canvas, true);
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
BlendMode mixBlendMode = null;
|
|
1106
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
|
1107
|
-
&& ViewUtil.getUIManagerType(this) == UIManagerType.FABRIC
|
|
1108
|
-
&& BlendModeHelper.needsIsolatedLayer(this)) {
|
|
1109
|
-
mixBlendMode = (BlendMode) child.getTag(R.id.mix_blend_mode);
|
|
1110
|
-
if (mixBlendMode != null) {
|
|
1111
|
-
Paint p = new Paint();
|
|
1112
|
-
p.setBlendMode(mixBlendMode);
|
|
1113
|
-
Rect overflowInset = getOverflowInset();
|
|
1114
|
-
canvas.saveLayer(
|
|
1115
|
-
overflowInset.left,
|
|
1116
|
-
overflowInset.top,
|
|
1117
|
-
getWidth() + -overflowInset.right,
|
|
1118
|
-
getHeight() + -overflowInset.bottom,
|
|
1119
|
-
p);
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
boolean result = super.drawChild(canvas, child, drawingTime);
|
|
1124
|
-
|
|
1125
|
-
if (mixBlendMode != null) {
|
|
1126
|
-
canvas.restore();
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
if (drawWithZ) {
|
|
1130
|
-
CanvasUtil.enableZ(canvas, false);
|
|
1131
|
-
}
|
|
1132
|
-
return result;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
public void setOpacityIfPossible(float opacity) {
|
|
1136
|
-
mBackfaceOpacity = opacity;
|
|
1137
|
-
setBackfaceVisibilityDependantOpacity();
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
public void setBackfaceVisibility(String backfaceVisibility) {
|
|
1141
|
-
mBackfaceVisible = "visible".equals(backfaceVisibility);
|
|
1142
|
-
setBackfaceVisibilityDependantOpacity();
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
public void setBackfaceVisibilityDependantOpacity() {
|
|
1146
|
-
if (mBackfaceVisible) {
|
|
1147
|
-
setAlpha(mBackfaceOpacity);
|
|
1148
|
-
return;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
float rotationX = getRotationX();
|
|
1152
|
-
float rotationY = getRotationY();
|
|
1153
|
-
|
|
1154
|
-
boolean isFrontfaceVisible =
|
|
1155
|
-
(rotationX >= -90.f && rotationX < 90.f) && (rotationY >= -90.f && rotationY < 90.f);
|
|
1156
|
-
|
|
1157
|
-
if (isFrontfaceVisible) {
|
|
1158
|
-
setAlpha(mBackfaceOpacity);
|
|
1159
|
-
return;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
setAlpha(0);
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
public void initializeFocusGuideTalkbackAccessibilityDelegate() {
|
|
1166
|
-
if (!this.isTVFocusGuide()) {
|
|
1167
|
-
return;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
this.originalIsFocusable = this.isFocusable();
|
|
1171
|
-
|
|
1172
|
-
ReactAccessibilityDelegate viewAccessibilityDelegate = new ReactAccessibilityDelegate(
|
|
1173
|
-
this, originalIsFocusable, this.getImportantForAccessibility()
|
|
1174
|
-
) {
|
|
1175
|
-
@Override
|
|
1176
|
-
public boolean performAccessibilityAction(View host, int action, Bundle args) {
|
|
1177
|
-
if (!(host instanceof ReactViewGroup self)) {
|
|
1178
|
-
return super.performAccessibilityAction(host, action, args);
|
|
1179
|
-
}
|
|
1180
|
-
if (action == AccessibilityNodeInfo.ACTION_FOCUS) {
|
|
1181
|
-
if (self.interceptAccessibilityEvents(action, args)) {
|
|
1182
|
-
return true;
|
|
1183
|
-
}
|
|
1184
|
-
// Handle case when focus guide cannot find any focusable child
|
|
1185
|
-
if (self.isTVFocusGuide() && self.getFirstFocusableView(self) == null) {
|
|
1186
|
-
if (self.getChildCount() > 0) {
|
|
1187
|
-
View child = self.getChildAt(0);
|
|
1188
|
-
ArrayList<View> childFocusables = new ArrayList<>(0);
|
|
1189
|
-
child.addFocusables(childFocusables, FOCUS_DOWN, 0);
|
|
1190
|
-
if (!childFocusables.isEmpty()) {
|
|
1191
|
-
childFocusables.get(0).performAccessibilityAction(action, args);
|
|
1192
|
-
return true;
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
return super.performAccessibilityAction(host, action, args);
|
|
1197
|
-
}
|
|
1198
|
-
if (action == AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS) {
|
|
1199
|
-
if (self.interceptAccessibilityEvents(action, args)) {
|
|
1200
|
-
return true;
|
|
1201
|
-
}
|
|
1202
|
-
// Handle case when focus guide cannot find any focusable child
|
|
1203
|
-
if (self.isTVFocusGuide() && self.getFirstFocusableView(self) == null) {
|
|
1204
|
-
if (self.getChildCount() > 0) {
|
|
1205
|
-
View child = self.getChildAt(0);
|
|
1206
|
-
ArrayList<View> childFocusables = new ArrayList<>(0);
|
|
1207
|
-
child.addFocusables(childFocusables, FOCUS_DOWN, 0);
|
|
1208
|
-
if (!childFocusables.isEmpty()) {
|
|
1209
|
-
/*
|
|
1210
|
-
* Instead of forwarding AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS,
|
|
1211
|
-
* let's invoke AccessibilityNodeInfo.ACTION_FOCUS
|
|
1212
|
-
* to trigger focus events on JS side - the AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS
|
|
1213
|
-
* will be automatically invoked later
|
|
1214
|
-
*/
|
|
1215
|
-
childFocusables.get(0).performAccessibilityAction(
|
|
1216
|
-
AccessibilityNodeInfo.ACTION_FOCUS,
|
|
1217
|
-
args
|
|
1218
|
-
);
|
|
1219
|
-
return true;
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
/*
|
|
1223
|
-
* Let's consume event here, otherwise there might be an issue with
|
|
1224
|
-
* FocusGuide receiving focus instead of one of its child views
|
|
1225
|
-
*/
|
|
1226
|
-
return true;
|
|
1227
|
-
}
|
|
1228
|
-
return super.performAccessibilityAction(host, action, args);
|
|
1229
|
-
}
|
|
1230
|
-
return super.performAccessibilityAction(host, action, args);
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
ViewCompat.setAccessibilityDelegate(this, viewAccessibilityDelegate);
|
|
1234
|
-
this.setFocusable(true);
|
|
1235
|
-
this.setFocusableInTouchMode(true);
|
|
1236
|
-
// To force Talkback to give the a11y event to the FocusGuide
|
|
1237
|
-
// we need to make it look like it has some a11y label to be announced.
|
|
1238
|
-
// Because FocusGuide should always have at least one focusable child view,
|
|
1239
|
-
// which will receive forwarded a11y event from this FocusGuide,
|
|
1240
|
-
// the following fake label will never be announced
|
|
1241
|
-
this.setContentDescription("FocusGuide");
|
|
1242
|
-
this.isFocusGuideTalkbackAccessibilityDelegateSet = true;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
public void cleanupFocusGuideTalkbackAccessibilityDelegate() {
|
|
1246
|
-
ViewCompat.setAccessibilityDelegate(this, null);
|
|
1247
|
-
this.setFocusable(this.originalIsFocusable);
|
|
1248
|
-
this.setFocusableInTouchMode(this.originalIsFocusable);
|
|
1249
|
-
this.originalIsFocusable = false;
|
|
1250
|
-
this.setContentDescription(null);
|
|
1251
|
-
this.isFocusGuideTalkbackAccessibilityDelegateSet = false;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
public boolean hasFocusGuideTalkbackAccessibilityDelegate() {
|
|
1255
|
-
return this.isFocusGuideTalkbackAccessibilityDelegateSet;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
private boolean interceptAccessibilityEvents(int action, Bundle args) {
|
|
1259
|
-
if (!this.isTVFocusGuide()) {
|
|
1260
|
-
return false;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
// If it's "FocusGuide", we want to intercept
|
|
1264
|
-
// the event and redirect it to either:
|
|
1265
|
-
// 1) first available destination view from "destinations" prop
|
|
1266
|
-
// 2) last focused element saved when "autoFocus" prop is `true`
|
|
1267
|
-
// 3) first focusable child view
|
|
1268
|
-
View destinationView = this.findDestinationView();
|
|
1269
|
-
if (destinationView != null) {
|
|
1270
|
-
try {
|
|
1271
|
-
destinationView.performAccessibilityAction(action, args);
|
|
1272
|
-
return true;
|
|
1273
|
-
} catch (Exception e) {
|
|
1274
|
-
FLog.e(TAG, "Exception when performing accessibility action on destination view - falling back to next case (last focused view): " + e);
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
View lastFocusedView = this.lastFocusedElement.get();
|
|
1278
|
-
if (lastFocusedView != null) {
|
|
1279
|
-
try {
|
|
1280
|
-
lastFocusedView.performAccessibilityAction(action, args);
|
|
1281
|
-
return true;
|
|
1282
|
-
} catch (Exception e) {
|
|
1283
|
-
FLog.e(TAG, "Exception when performing accessibility action on last focused view - falling back to next case (first focusable view): " + e);
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
View firstFocusableView = this.getFirstFocusableView(this);
|
|
1287
|
-
if (firstFocusableView != null) {
|
|
1288
|
-
try {
|
|
1289
|
-
firstFocusableView.performAccessibilityAction(action, args);
|
|
1290
|
-
return true;
|
|
1291
|
-
} catch (Exception e) {
|
|
1292
|
-
FLog.e(TAG, "Exception when performing accessibility action on first focusable view - focus guide will not handle focus: " + e);
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
return false;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
private View findDestinationView() {
|
|
1299
|
-
for (int focusDestination : focusDestinations) {
|
|
1300
|
-
View childViewWithTag = findViewById(focusDestination);
|
|
1301
|
-
if (childViewWithTag != null) return childViewWithTag;
|
|
1302
|
-
View viewWithTag = getRootView().findViewById(focusDestination);
|
|
1303
|
-
if (viewWithTag != null) return viewWithTag;
|
|
1304
|
-
}
|
|
1305
|
-
return null;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
private static boolean requestFocusViewOrAncestor(View destination) {
|
|
1309
|
-
View v = destination;
|
|
1310
|
-
while (v != null) {
|
|
1311
|
-
if (v.requestFocus()) {
|
|
1312
|
-
return true;
|
|
1313
|
-
}
|
|
1314
|
-
ViewParent parent = v.getParent();
|
|
1315
|
-
if (parent instanceof View) {
|
|
1316
|
-
v = (View) parent;
|
|
1317
|
-
} else {
|
|
1318
|
-
v = null;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
return false;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
private boolean isFocusDestinationsSet() {
|
|
1325
|
-
return focusDestinations.length > 0;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
boolean isTVFocusGuide() {
|
|
1329
|
-
/**
|
|
1330
|
-
* We don't count a view as `TVFocusGuide` if it has `trapFocus*` props enabled.
|
|
1331
|
-
* The reason is, it's a seperate functionality that has nothing to do with other
|
|
1332
|
-
* TVFocusGuide features that involves heavy focus management. So, the feature
|
|
1333
|
-
* is not directly tied to `TVFocusGuide`.
|
|
1334
|
-
*/
|
|
1335
|
-
return isFocusDestinationsSet() || autoFocus;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
@Nullable
|
|
1339
|
-
private ReactViewGroup findParentFocusGuide(View view) {
|
|
1340
|
-
ViewParent parent = view.getParent();
|
|
1341
|
-
|
|
1342
|
-
while (parent != null) {
|
|
1343
|
-
if (parent instanceof ReactViewGroup) {
|
|
1344
|
-
ReactViewGroup elem = (ReactViewGroup) parent;
|
|
1345
|
-
if (elem.isTVFocusGuide()) return elem;
|
|
1346
|
-
}
|
|
1347
|
-
parent = parent.getParent();
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
return null;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
/***
|
|
1354
|
-
* This is meant to be used only for TVFocusGuide.
|
|
1355
|
-
* @return View | null
|
|
1356
|
-
*/
|
|
1357
|
-
@Nullable
|
|
1358
|
-
private View getFocusedChildOfFocusGuide() {
|
|
1359
|
-
if (!isTVFocusGuide()) return null;
|
|
1360
|
-
|
|
1361
|
-
/*
|
|
1362
|
-
* We can have nested `TVFocusGuide`s, this is a typical scenario.
|
|
1363
|
-
* The problem is, returned element from `getFocusedChild` can be
|
|
1364
|
-
* either a direct `child` of the `TVFocusGuide` or a `descendant` of it.
|
|
1365
|
-
* Let's say if we run `getFocusedChild` for the Root element, it will always
|
|
1366
|
-
* give us an element even though the Root element is not the direct parent
|
|
1367
|
-
* of the focused element.
|
|
1368
|
-
* So, we need to find the closest `TVFocusGuide` to the focused child
|
|
1369
|
-
* to make sure the focused element's closest `TVFocusGuide` is "this" one.
|
|
1370
|
-
*/
|
|
1371
|
-
View focusedChild = this.getFocusedChild();
|
|
1372
|
-
if (focusedChild == null) return null;
|
|
1373
|
-
|
|
1374
|
-
ReactViewGroup parentFocusGuide = findParentFocusGuide(focusedChild);
|
|
1375
|
-
if (parentFocusGuide == this) return focusedChild;
|
|
1376
|
-
|
|
1377
|
-
return null;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
@Override
|
|
1381
|
-
public void addFocusables(ArrayList<View> views, int direction, int focusableMode) {
|
|
1382
|
-
/**
|
|
1383
|
-
* TVFocusGuides should reveral their children when `mRecoverFocus` is set.
|
|
1384
|
-
* `mRecoverFocus` flag indicates a temporary focus recovery mode it's in which
|
|
1385
|
-
* requires full access to children focusable elements.
|
|
1386
|
-
*/
|
|
1387
|
-
if (isTVFocusGuide() && !mRecoverFocus && this.getDescendantFocusability() != ViewGroup.FOCUS_BLOCK_DESCENDANTS) {
|
|
1388
|
-
View focusedChild = getFocusedChildOfFocusGuide();
|
|
1389
|
-
|
|
1390
|
-
/*
|
|
1391
|
-
* We only include the view's (TVFocusGuide) itself if it doesn't have a child that currently has the focus.
|
|
1392
|
-
* Otherwise, it means focus is already in the `TVFocusGuide` and all of it's descendants should be included
|
|
1393
|
-
* for focus calculations.
|
|
1394
|
-
*/
|
|
1395
|
-
if (focusedChild == null) {
|
|
1396
|
-
views.add(this);
|
|
1397
|
-
return;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
super.addFocusables(views, direction, focusableMode);
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
@Override
|
|
1405
|
-
public void requestChildFocus(View child, View focused) {
|
|
1406
|
-
super.requestChildFocus(child, focused);
|
|
1407
|
-
|
|
1408
|
-
if (autoFocus) {
|
|
1409
|
-
lastFocusedElement = new WeakReference<View>(focused);
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
@Override
|
|
1414
|
-
protected void onFocusChanged(boolean gainFocus, int direction, @Nullable Rect previouslyFocusedRect) {
|
|
1415
|
-
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
|
|
1416
|
-
|
|
1417
|
-
final EventDispatcher mEventDispatcher =
|
|
1418
|
-
UIManagerHelper.getEventDispatcherForReactTag(
|
|
1419
|
-
(ReactContext) this.getContext(), this.getId());
|
|
1420
|
-
|
|
1421
|
-
if (mEventDispatcher == null) {
|
|
1422
|
-
return;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
if (gainFocus) {
|
|
1426
|
-
mEventDispatcher.dispatchEvent(
|
|
1427
|
-
new FocusEvent(
|
|
1428
|
-
UIManagerHelper.getSurfaceId(this.getContext()), this.getId()));
|
|
1429
|
-
} else {
|
|
1430
|
-
mEventDispatcher.dispatchEvent(
|
|
1431
|
-
new BlurEvent(
|
|
1432
|
-
UIManagerHelper.getSurfaceId(this.getContext()), this.getId()));
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
@Override
|
|
1437
|
-
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
1438
|
-
if ((keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_ENTER) && event.getRepeatCount() == 0 && !this.isTVFocusGuide()) {
|
|
1439
|
-
final EventDispatcher mEventDispatcher =
|
|
1440
|
-
UIManagerHelper.getEventDispatcherForReactTag(
|
|
1441
|
-
(ReactContext) this.getContext(), this.getId());
|
|
1442
|
-
|
|
1443
|
-
if (mEventDispatcher == null) {
|
|
1444
|
-
return super.onKeyDown(keyCode, event);
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
mEventDispatcher.dispatchEvent(new PressInEvent(UIManagerHelper.getSurfaceId(this.getContext()), this.getId()));
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
return super.onKeyDown(keyCode, event);
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
@Override
|
|
1455
|
-
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
|
1456
|
-
if ((keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_ENTER) && !this.isTVFocusGuide()) {
|
|
1457
|
-
final EventDispatcher mEventDispatcher =
|
|
1458
|
-
UIManagerHelper.getEventDispatcherForReactTag(
|
|
1459
|
-
(ReactContext) this.getContext(), this.getId());
|
|
1460
|
-
|
|
1461
|
-
if (mEventDispatcher == null) {
|
|
1462
|
-
return super.onKeyUp(keyCode, event);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
mEventDispatcher.dispatchEvent(new PressOutEvent(UIManagerHelper.getSurfaceId(this.getContext()), this.getId()));
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
return super.onKeyUp(keyCode, event);
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
@Override
|
|
1472
|
-
public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
|
|
1473
|
-
if (!isTVFocusGuide() || mRecoverFocus) {
|
|
1474
|
-
return super.requestFocus(direction, previouslyFocusedRect);
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
if (isFocusDestinationsSet()) {
|
|
1478
|
-
View destination = findDestinationView();
|
|
1479
|
-
|
|
1480
|
-
if (destination != null && requestFocusViewOrAncestor(destination)) {
|
|
1481
|
-
return true;
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
if (this.autoFocus) {
|
|
1486
|
-
View lastFocusedElem = lastFocusedElement.get();
|
|
1487
|
-
|
|
1488
|
-
if (lastFocusedElem != null) {
|
|
1489
|
-
|
|
1490
|
-
if (lastFocusedElem.isAttachedToWindow()) {
|
|
1491
|
-
lastFocusedElem.requestFocus();
|
|
1492
|
-
return true;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
/**
|
|
1496
|
-
* `lastFocusedElem` can get detached based on application logic.
|
|
1497
|
-
* If the code reaches here, that means we're dealing with that case.
|
|
1498
|
-
* We should set `lastFocusedElem` to null and let the focus determination
|
|
1499
|
-
* logic below to do its magic and redirect focus to the first element.
|
|
1500
|
-
*/
|
|
1501
|
-
lastFocusedElement = new WeakReference<View>(null);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
// Try moving the focus to the first focusable element otherwise.
|
|
1505
|
-
if (moveFocusToFirstFocusable(this)) {
|
|
1506
|
-
return true;
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
return super.requestFocus(direction, previouslyFocusedRect);
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
@Override
|
|
1514
|
-
public View focusSearch(View focused, int direction) {
|
|
1515
|
-
/**
|
|
1516
|
-
* FocusSearch recursively goes all the way up to the Root view
|
|
1517
|
-
* and runs `FocusFinder.findNextFocus()` to determine the next focusable.
|
|
1518
|
-
* It finds the next focusable by accounting *every* focusable elements on the screen.
|
|
1519
|
-
*
|
|
1520
|
-
* That is exactly the thing we want to prevent if the view has a `focusTrap` enabled
|
|
1521
|
-
* matching the `direction`. We interrupt `focusSearch` to make the `FocusFinder` run
|
|
1522
|
-
* the algorithm only accounting the children elements of the focus trap.
|
|
1523
|
-
* This ensures that focus will always stay inside the container until trap gets disabled.
|
|
1524
|
-
*/
|
|
1525
|
-
if ((trapFocusUp && direction == FOCUS_UP)
|
|
1526
|
-
|| (trapFocusDown && direction == FOCUS_DOWN)
|
|
1527
|
-
|| (trapFocusLeft && direction == FOCUS_LEFT)
|
|
1528
|
-
|| (trapFocusRight && direction == FOCUS_RIGHT)) {
|
|
1529
|
-
return FocusFinder.getInstance().findNextFocus(this, focused, direction);
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
return super.focusSearch(focused, direction);
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
public void setFocusDestinations(@NonNull int[] focusDestinations) {
|
|
1536
|
-
this.focusDestinations = focusDestinations;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
public void setAutoFocusTV(boolean autoFocus) {
|
|
1540
|
-
this.autoFocus = autoFocus;
|
|
1541
|
-
lastFocusedElement = new WeakReference<View>(null);
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
public void setTrapFocusUp(boolean enabled) {
|
|
1545
|
-
this.trapFocusUp = enabled;
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
public void setTrapFocusDown(boolean enabled) {
|
|
1549
|
-
this.trapFocusDown = enabled;
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
public void setTrapFocusLeft(boolean enabled) {
|
|
1553
|
-
this.trapFocusLeft = enabled;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
public void setTrapFocusRight(boolean enabled) {
|
|
1557
|
-
this.trapFocusRight = enabled;
|
|
1558
|
-
}
|
|
1559
|
-
}
|