react-native-tvos 0.78.0-0rc4 → 0.79.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/ActionSheetIOS.js +39 -18
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -2
- package/Libraries/Alert/Alert.js +33 -10
- package/Libraries/Alert/NativeAlertManager.js +2 -2
- package/Libraries/Alert/RCTAlertManager.android.js +1 -1
- package/Libraries/Alert/RCTAlertManager.ios.js +1 -1
- package/Libraries/Alert/RCTAlertManager.js.flow +1 -1
- package/Libraries/Animated/Animated.js +8 -37
- package/{flow/react.js → Libraries/Animated/Animated.js.flow} +6 -6
- package/Libraries/Animated/AnimatedExports.js +47 -0
- package/Libraries/Animated/AnimatedExports.js.flow +48 -0
- package/Libraries/Animated/AnimatedMock.js +1 -1
- package/Libraries/Animated/NativeAnimatedModule.js +2 -2
- package/Libraries/Animated/NativeAnimatedTurboModule.js +2 -2
- package/Libraries/Animated/animations/Animation.js +1 -4
- package/Libraries/Animated/createAnimatedComponent.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +1 -0
- package/Libraries/Animated/nodes/AnimatedValue.js +30 -22
- package/Libraries/Animated/useAnimatedProps.js +4 -333
- package/Libraries/Animated/useAnimatedValue.js +1 -3
- package/Libraries/AppDelegate/RCTAppDelegate.h +6 -1
- package/Libraries/AppDelegate/RCTAppDelegate.mm +0 -18
- package/Libraries/AppDelegate/RCTAppSetupUtils.h +2 -1
- package/Libraries/AppDelegate/RCTAppSetupUtils.mm +29 -20
- package/Libraries/AppDelegate/RCTArchConfiguratorProtocol.h +4 -0
- package/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +29 -0
- package/Libraries/AppDelegate/RCTDependencyProvider.h +3 -0
- package/Libraries/AppDelegate/RCTJSRuntimeConfiguratorProtocol.h +22 -0
- package/Libraries/AppDelegate/RCTReactNativeFactory.h +13 -2
- package/Libraries/AppDelegate/RCTReactNativeFactory.mm +74 -8
- package/Libraries/AppDelegate/RCTRootViewFactory.h +21 -0
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +27 -10
- package/Libraries/AppDelegate/RCTUIConfiguratorProtocol.h +4 -0
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +6 -8
- package/Libraries/AppState/AppState.js +24 -7
- package/Libraries/AppState/NativeAppState.js +2 -2
- package/Libraries/BatchedBridge/BatchedBridge.js +4 -2
- package/Libraries/BatchedBridge/MessageQueue.js +5 -4
- package/Libraries/BatchedBridge/NativeModules.js +6 -4
- package/Libraries/Blob/Blob.js +5 -5
- package/Libraries/Blob/BlobManager.js +3 -2
- package/Libraries/Blob/BlobRegistry.js +3 -9
- package/Libraries/Blob/File.js +3 -2
- package/Libraries/Blob/FileReader.js +8 -174
- package/Libraries/Blob/FileReader_new.js +231 -0
- package/Libraries/Blob/FileReader_old.js +186 -0
- package/Libraries/Blob/NativeBlobModule.js +2 -2
- package/Libraries/Blob/NativeFileReaderModule.js +2 -2
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Blob/URL.js +1 -1
- package/Libraries/Blob/URLSearchParams.js +9 -10
- package/Libraries/Blob/URLSearchParams.js.flow +9 -9
- package/Libraries/BugReporting/BugReporting.js +2 -2
- package/Libraries/BugReporting/NativeBugReporting.js +2 -2
- package/Libraries/BugReporting/dumpReactTree.js +2 -2
- package/Libraries/BugReporting/getReactData.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +2 -2
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +2 -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 +11 -11
- package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +2 -2
- package/Libraries/Components/Button.js +6 -6
- package/Libraries/Components/Clipboard/Clipboard.js +1 -1
- package/Libraries/Components/Clipboard/NativeClipboard.js +2 -2
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +14 -100
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +64 -3
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +138 -0
- package/Libraries/Components/Keyboard/Keyboard.js +9 -9
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +24 -25
- package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +2 -2
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +7 -5
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
- package/Libraries/Components/Pressable/Pressable.js +36 -82
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +17 -17
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +4 -47
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +9 -5
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +2 -2
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +54 -0
- package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +2 -2
- package/Libraries/Components/RefreshControl/RefreshControl.js +17 -14
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -1
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +2 -2
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -1
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -4
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +2 -4
- package/Libraries/Components/ScrollView/ScrollView.js +140 -136
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +7 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +5 -2
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +10 -11
- package/Libraries/Components/ScrollView/processDecelerationRate.js +1 -1
- package/Libraries/Components/Sound/NativeSoundManager.js +2 -2
- package/Libraries/Components/Sound/SoundManager.js +1 -1
- package/Libraries/Components/StaticRenderer.js +4 -4
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +2 -2
- package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +2 -2
- package/Libraries/Components/StatusBar/StatusBar.js +57 -31
- package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +2 -2
- package/Libraries/Components/Switch/Switch.js +74 -45
- package/Libraries/Components/Switch/SwitchNativeComponent.js +2 -2
- package/Libraries/Components/TV/TVEventHandler.js +1 -1
- package/Libraries/Components/TV/TVFocusGuideView.js +3 -3
- package/Libraries/Components/TV/TVTextScrollView.js +2 -2
- package/Libraries/Components/TV/useTVEventHandler.js +1 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -35
- package/Libraries/Components/TextInput/InputAccessoryView.js +5 -3
- package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +2 -2
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +2 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +2 -4
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +5 -2
- package/Libraries/Components/TextInput/TextInput.flow.js +131 -121
- package/Libraries/Components/TextInput/TextInput.js +152 -149
- package/Libraries/Components/TextInput/TextInputNativeCommands.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.js +6 -20
- package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +2 -2
- package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +1 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +68 -6
- package/Libraries/Components/ToastAndroid/ToastAndroid.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 +23 -23
- package/Libraries/Components/Touchable/TouchableBounce.js +6 -6
- package/Libraries/Components/Touchable/TouchableHighlight.js +45 -21
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +103 -55
- package/Libraries/Components/Touchable/TouchableOpacity.js +57 -15
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +116 -62
- package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +2 -2
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +11 -3
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +17 -3
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -1
- package/Libraries/Components/View/View.js +2 -2
- package/Libraries/Components/View/ViewAccessibility.js +245 -5
- package/Libraries/Components/View/ViewNativeComponent.js +2 -4
- package/Libraries/Components/View/ViewPropTypes.d.ts +14 -14
- package/Libraries/Components/View/ViewPropTypes.js +73 -261
- package/Libraries/Core/Devtools/getDevServer.js +1 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.js +4 -2
- package/Libraries/Core/Devtools/openFileInEditor.js +2 -4
- package/Libraries/Core/Devtools/openURLInBrowser.js +5 -4
- package/Libraries/Core/Devtools/parseErrorStack.js +4 -4
- package/Libraries/Core/Devtools/parseHermesStack.js +2 -2
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +6 -5
- package/Libraries/Core/ExceptionsManager.js +6 -4
- package/Libraries/Core/InitializeCore.js +7 -3
- package/Libraries/Core/NativeExceptionsManager.js +2 -2
- package/Libraries/Core/RawEventEmitter.js +2 -2
- package/Libraries/Core/ReactFiberErrorDialog.js +2 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/ReactNativeVersionCheck.js +2 -4
- package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +10 -8
- package/Libraries/Core/Timers/NativeTiming.js +2 -2
- package/Libraries/Core/Timers/immediateShim.js +2 -9
- package/Libraries/Core/polyfillPromise.js +1 -1
- package/Libraries/Core/registerCallableModule.js +1 -1
- package/Libraries/Core/setUpAlert.js +1 -1
- package/Libraries/Core/setUpBatchedBridge.js +13 -8
- package/Libraries/Core/setUpDeveloperTools.js +5 -38
- package/Libraries/Core/setUpErrorHandling.js +2 -2
- package/Libraries/Core/setUpReactDevTools.js +26 -6
- package/Libraries/Core/setUpReactRefresh.js +1 -1
- package/Libraries/Core/setUpTimers.js +45 -66
- package/Libraries/Core/setUpXHR.js +11 -8
- package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +2 -2
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +10 -7
- package/Libraries/EventEmitter/NativeEventEmitter.js +8 -2
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +7 -5
- package/Libraries/EventEmitter/RCTEventEmitter.js +1 -1
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +1 -1
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +3 -2
- package/Libraries/Events/CustomEvent.js +3 -3
- package/Libraries/Events/EventPolyfill.js +2 -2
- package/Libraries/Image/AssetRegistry.js +8 -1
- package/Libraries/Image/AssetSourceResolver.js +4 -4
- package/Libraries/Image/Image.android.js +4 -2
- package/Libraries/Image/Image.ios.js +1 -1
- package/Libraries/Image/Image.js.flow +15 -1
- package/Libraries/Image/ImageBackground.js +2 -2
- package/Libraries/Image/ImageProps.js +109 -39
- package/Libraries/Image/ImageTypes.flow.js +16 -6
- package/Libraries/Image/ImageViewNativeComponent.js +8 -11
- package/Libraries/Image/NativeImageEditor.js +2 -2
- package/Libraries/Image/NativeImageLoaderAndroid.js +2 -2
- package/Libraries/Image/NativeImageLoaderIOS.js +2 -2
- package/Libraries/Image/NativeImageStoreAndroid.js +2 -2
- package/Libraries/Image/NativeImageStoreIOS.js +2 -2
- package/Libraries/Image/RelativeImageStub.js +3 -1
- package/Libraries/Image/TextInlineImageNativeComponent.js +2 -4
- package/Libraries/Image/nativeImageSource.js +3 -3
- package/Libraries/Image/resolveAssetSource.js +4 -2
- package/Libraries/Interaction/FrameRateLogger.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +20 -9
- package/Libraries/Interaction/InteractionManagerStub.js +10 -2
- package/Libraries/Interaction/JSEventLoopWatchdog.js +2 -2
- package/Libraries/Interaction/NativeFrameRateLogger.js +2 -2
- package/Libraries/Interaction/PanResponder.js +49 -46
- package/Libraries/Interaction/TaskQueue.js +4 -4
- package/Libraries/Interaction/TouchHistoryMath.js +27 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +20 -6
- package/Libraries/Linking/Linking.d.ts +3 -3
- package/Libraries/Linking/Linking.js +10 -9
- package/Libraries/Linking/NativeIntentAndroid.js +2 -2
- package/Libraries/Linking/NativeLinkingManager.js +2 -2
- package/Libraries/Lists/FillRateHelper.js +4 -4
- package/Libraries/Lists/FlatList.js +30 -30
- package/Libraries/Lists/SectionList.js +10 -10
- package/Libraries/Lists/SectionListModern.js +9 -7
- package/Libraries/Lists/ViewabilityHelper.js +4 -3
- package/Libraries/Lists/VirtualizeUtils.js +3 -5
- package/Libraries/Lists/VirtualizedList.js +6 -6
- package/Libraries/Lists/VirtualizedListContext.js +5 -5
- package/Libraries/Lists/VirtualizedSectionList.js +5 -3
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +15 -15
- package/Libraries/LogBox/Data/LogBoxLog.js +51 -29
- package/Libraries/LogBox/Data/parseLogBoxLog.js +10 -10
- package/Libraries/LogBox/LogBox.js +22 -2
- package/Libraries/LogBox/LogBoxInspectorContainer.js +3 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -3
- package/Libraries/LogBox/UI/AnsiHighlight.js +7 -3
- package/Libraries/LogBox/UI/LogBoxButton.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspector.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorBody.js +8 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +50 -31
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +11 -3
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +2 -0
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +8 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +2 -0
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +6 -4
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +5 -3
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +4 -4
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +5 -3
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +2 -2
- package/Libraries/LogBox/UI/LogBoxNotification.js +7 -2
- package/Libraries/LogBox/UI/LogBoxNotificationCountBadge.js +3 -1
- package/Libraries/LogBox/UI/LogBoxNotificationDismissButton.js +2 -0
- package/Libraries/LogBox/UI/LogBoxNotificationMessage.js +4 -1
- package/Libraries/Modal/Modal.js +82 -89
- package/Libraries/Modal/NativeModalManager.js +2 -2
- package/Libraries/Modal/RCTModalHostViewNativeComponent.js +2 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +16 -6
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -9
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +5 -1
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/NativeModules/specs/NativeDevSettings.js +2 -2
- package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +2 -2
- package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +2 -2
- package/Libraries/NativeModules/specs/NativeLogBox.js +2 -2
- package/Libraries/NativeModules/specs/NativeRedBox.js +2 -2
- package/Libraries/NativeModules/specs/NativeSourceCode.js +2 -2
- package/Libraries/Network/FormData.js +1 -1
- package/Libraries/Network/NativeNetworkingAndroid.js +2 -2
- package/Libraries/Network/NativeNetworkingIOS.js +2 -2
- package/Libraries/Network/RCTDataRequestHandler.mm +17 -3
- package/Libraries/Network/RCTFileRequestHandler.mm +17 -3
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.mm +1 -1
- package/Libraries/Network/XMLHttpRequest.js +10 -685
- package/Libraries/Network/XMLHttpRequest_new.js +794 -0
- package/Libraries/Network/XMLHttpRequest_old.js +701 -0
- package/Libraries/Network/convertRequestBody.js +7 -4
- package/Libraries/Network/fetch.js +4 -3
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -2
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +65 -63
- package/Libraries/Pressability/HoverState.js +1 -0
- package/Libraries/Pressability/Pressability.js +33 -33
- package/Libraries/Pressability/PressabilityDebug.js +2 -2
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +2 -2
- package/Libraries/Promise.js +2 -2
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +2 -2
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +119 -16
- package/Libraries/ReactNative/AppContainer-dev.js +4 -3
- package/Libraries/ReactNative/AppContainer.js +3 -3
- package/Libraries/ReactNative/AppRegistry.js +4 -4
- package/Libraries/ReactNative/BridgelessUIManager.js +4 -9
- package/Libraries/ReactNative/FabricUIManager.js +22 -10
- package/Libraries/ReactNative/I18nManager.js +4 -3
- package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +2 -2
- package/Libraries/ReactNative/NativeI18nManager.js +2 -2
- package/Libraries/ReactNative/NativeUIManager.js +2 -2
- package/Libraries/ReactNative/PaperUIManager.js +6 -6
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +7 -5
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +85 -30
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +3 -3
- package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +3 -3
- package/Libraries/ReactNative/RendererImplementation.js +12 -5
- package/Libraries/ReactNative/RootTag.js +1 -1
- package/Libraries/ReactNative/UIManager.d.ts +1 -0
- package/Libraries/ReactNative/UIManager.js +3 -3
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/ReactNative/getNativeComponentAttributes.js +10 -9
- package/Libraries/ReactNative/requireNativeComponent.js +3 -2
- package/Libraries/ReactNativeDependencies/Package.swift +26 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +30 -10
- package/Libraries/Renderer/shims/ReactNativeTypes.js +40 -89
- package/Libraries/Required/RCTRequired.h +1 -1
- package/Libraries/Settings/NativeSettingsManager.js +2 -2
- package/Libraries/Settings/Settings.ios.js +1 -1
- package/Libraries/Settings/Settings.js +3 -3
- package/Libraries/Share/NativeShareModule.js +2 -2
- package/Libraries/Share/Share.js +11 -4
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/Rect.js +2 -2
- package/Libraries/StyleSheet/StyleSheet.js +4 -3
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +1 -1
- package/Libraries/StyleSheet/flattenStyle.js +1 -1
- package/Libraries/StyleSheet/normalizeColor.js +1 -1
- package/Libraries/StyleSheet/private/_TransformStyle.js +18 -18
- package/Libraries/StyleSheet/processAspectRatio.js +1 -1
- package/Libraries/StyleSheet/processBackgroundImage.js +138 -136
- package/Libraries/StyleSheet/processBoxShadow.js +4 -0
- package/Libraries/StyleSheet/processColor.js +2 -2
- package/Libraries/StyleSheet/processColorArray.js +1 -1
- package/Libraries/StyleSheet/processFilter.js +4 -0
- package/Libraries/StyleSheet/processFontVariant.js +1 -1
- package/Libraries/StyleSheet/processTransform.js +1 -1
- package/Libraries/StyleSheet/setNormalizedColorAlpha.js +1 -1
- package/Libraries/Text/Text.d.ts +1 -1
- package/Libraries/Text/Text.js +19 -17
- package/Libraries/Text/TextAncestor.js +2 -3
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.mm +1 -1
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +3 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +7 -1
- package/Libraries/Text/TextNativeComponent.js +3 -3
- package/Libraries/Text/TextProps.js +134 -94
- package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +2 -2
- package/Libraries/Types/CodegenTypes.js +5 -4
- package/Libraries/Types/CoreEventTypes.js +132 -99
- package/Libraries/Types/ReactDevToolsTypes.js +4 -8
- package/Libraries/UTFSequence.js +4 -3
- package/Libraries/Utilities/Appearance.js +0 -8
- package/Libraries/Utilities/BackHandler.android.js +3 -3
- package/Libraries/Utilities/BackHandler.ios.js +6 -6
- package/Libraries/Utilities/BackHandler.js.flow +9 -7
- package/Libraries/Utilities/DevLoadingView.js +1 -1
- package/Libraries/Utilities/DevSettings.js +15 -1
- package/Libraries/Utilities/DeviceInfo.js +1 -1
- package/Libraries/Utilities/Dimensions.js +5 -0
- package/Libraries/Utilities/FeatureDetection.js +2 -4
- package/Libraries/Utilities/GlobalPerformanceLogger.js +1 -1
- package/Libraries/Utilities/HMRClient.js +7 -35
- package/Libraries/Utilities/HMRClientProdShim.js +1 -2
- package/Libraries/Utilities/NativeAppearance.js +2 -2
- package/Libraries/Utilities/NativeDevLoadingView.js +2 -2
- package/Libraries/Utilities/NativeDeviceInfo.js +2 -2
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +2 -2
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +2 -2
- package/Libraries/Utilities/Platform.android.js +6 -6
- package/Libraries/Utilities/Platform.ios.js +6 -6
- package/Libraries/Utilities/Platform.js.flow +2 -2
- package/Libraries/Utilities/PlatformTypes.js +181 -0
- package/Libraries/Utilities/PolyfillFunctions.js +3 -5
- package/Libraries/Utilities/RCTLog.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +6 -6
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +2 -2
- package/Libraries/Utilities/binaryToBase64.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +2 -2
- package/Libraries/Utilities/codegenNativeComponent.js +3 -3
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +1 -1
- package/Libraries/Utilities/defineLazyObjectProperty.js +1 -1
- package/Libraries/Utilities/differ/deepDiffer.js +6 -6
- package/Libraries/Utilities/differ/insetsDiffer.js +3 -3
- package/Libraries/Utilities/differ/matricesDiffer.js +3 -6
- package/Libraries/Utilities/differ/pointsDiffer.js +3 -3
- package/Libraries/Utilities/differ/sizesDiffer.js +3 -3
- package/Libraries/Utilities/dismissKeyboard.js +3 -2
- package/Libraries/Utilities/infoLog.js +1 -1
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/mapWithSeparator.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +2 -2
- package/Libraries/Utilities/warnOnce.js +1 -1
- package/Libraries/Vibration/NativeVibration.js +2 -2
- package/Libraries/Vibration/Vibration.js +5 -4
- package/Libraries/WebSocket/NativeWebSocketModule.js +2 -2
- package/Libraries/WebSocket/WebSocket.js +8 -285
- package/Libraries/WebSocket/WebSocketEvent.js +2 -2
- package/Libraries/WebSocket/WebSocketInterceptor.js +39 -11
- package/Libraries/WebSocket/WebSocket_new.js +325 -0
- package/Libraries/WebSocket/WebSocket_old.js +297 -0
- package/Libraries/WebSocket/__mocks__/event-target-shim.js +1 -1
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -4
- package/Libraries/vendor/core/ErrorUtils.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +21 -9
- package/README-core.md +0 -3
- package/React/Base/RCTAssert.h +1 -1
- package/React/Base/RCTBridge.mm +14 -1
- package/React/Base/RCTBridgeDelegate.h +0 -9
- package/React/Base/RCTDefines.h +8 -4
- package/React/Base/RCTKeyCommands.m +1 -1
- package/React/Base/RCTModuleData.mm +1 -1
- package/React/Base/RCTRootView.h +2 -2
- package/React/Base/RCTRootViewInternal.h +1 -1
- package/React/Base/RCTUtils.m +1 -1
- package/React/Base/RCTVersion.m +2 -2
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +5 -0
- package/React/Base/UIKitProxies/RCTInitialAccessibilityValuesProxy.h +30 -0
- package/React/Base/UIKitProxies/RCTInitialAccessibilityValuesProxy.mm +185 -0
- package/React/Base/UIKitProxies/RCTInitializeUIKitProxies.h +10 -0
- package/React/Base/UIKitProxies/RCTInitializeUIKitProxies.mm +23 -0
- package/React/Base/UIKitProxies/RCTKeyWindowValuesProxy.h +25 -0
- package/React/Base/UIKitProxies/RCTKeyWindowValuesProxy.mm +129 -0
- package/React/Base/UIKitProxies/RCTTraitCollectionProxy.h +26 -0
- package/React/Base/UIKitProxies/RCTTraitCollectionProxy.mm +80 -0
- package/React/Base/UIKitProxies/RCTWindowSafeAreaProxy.h +26 -0
- package/React/Base/UIKitProxies/RCTWindowSafeAreaProxy.mm +70 -0
- package/React/CoreModules/CoreModulesPlugins.h +0 -1
- package/React/CoreModules/CoreModulesPlugins.mm +0 -1
- package/React/CoreModules/RCTAccessibilityManager.mm +11 -9
- package/React/CoreModules/RCTAppearance.mm +4 -7
- package/React/CoreModules/RCTDevMenu.mm +0 -18
- package/React/CoreModules/RCTDevSettings.h +0 -6
- package/React/CoreModules/RCTDevSettings.mm +1 -62
- package/React/CoreModules/RCTDeviceInfo.mm +43 -57
- package/React/CoreModules/RCTEventDispatcher.mm +1 -0
- package/React/CoreModules/RCTKeyboardObserver.mm +6 -0
- package/React/CoreModules/RCTPerfMonitor.mm +5 -0
- package/React/CoreModules/RCTPlatform.mm +19 -21
- package/React/CoreModules/RCTRedBox.mm +1 -1
- package/React/CoreModules/RCTStatusBarManager.mm +6 -0
- package/React/CoreModules/React-CoreModules.podspec +2 -1
- package/React/CxxBridge/RCTCxxBridge.mm +5 -63
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +10 -5
- package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -14
- package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +0 -2
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +201 -178
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +535 -421
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +52 -16
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +5 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +12 -8
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +2 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +34 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +33 -45
- package/React/Fabric/Surface/RCTFabricSurface.mm +1 -0
- package/React/Fabric/Utils/RCTBoxShadow.h +1 -1
- package/React/Fabric/Utils/RCTBoxShadow.mm +10 -10
- package/React/Fabric/Utils/RCTLinearGradient.mm +212 -15
- package/React/Fabric/Utils/RCTViewFinder.h +18 -0
- package/React/Fabric/Utils/RCTViewFinder.mm +34 -0
- package/React/I18n/FBXXHashUtils.h +48 -30
- package/React/I18n/strings/nb.lproj/fbt_language_pack.bin +0 -0
- package/React/I18n/strings/zh-Hant-HK.lproj/fbt_language_pack.bin +0 -0
- package/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm +8 -11
- package/React/React-RCTFBReactNativeSpec.podspec +1 -6
- package/React/React-RCTFabric.podspec +3 -5
- package/React/Runtime/RCTHermesInstanceFactory.h +20 -0
- package/React/Runtime/RCTHermesInstanceFactory.mm +20 -0
- package/React/Runtime/RCTJscInstanceFactory.h +20 -0
- package/React/Runtime/RCTJscInstanceFactory.mm +20 -0
- package/React/Runtime/React-RCTRuntime.podspec +85 -0
- package/React/Views/ScrollView/RCTScrollView.m +2 -3
- package/React-Core.podspec +9 -8
- package/ReactAndroid/README.md +1 -1
- package/ReactAndroid/api/ReactAndroid.api +142 -570
- package/ReactAndroid/build.gradle.kts +64 -53
- package/ReactAndroid/external-artifacts/build.gradle.kts +37 -0
- package/ReactAndroid/gradle.properties +4 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +13 -12
- package/ReactAndroid/publish.gradle +1 -1
- package/ReactAndroid/src/main/java/com/facebook/annotationprocessors/common/ProcessorBase.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/debug/debugoverlay/model/DebugOverlayTag.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesMemoryDumper.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.kt +55 -0
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.kt +40 -0
- package/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.kt +185 -0
- package/ReactAndroid/src/main/java/com/facebook/react/MemoryPressureRouter.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +9 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +0 -20
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageLogger.kt +3 -4
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeValueListener.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeWithUpdateableConfig.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DecayAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/InterpolationAnimatedNode.kt +9 -13
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +25 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.kt +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/TrackingAnimatedNode.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/animated/TransformAnimatedNode.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ValueAnimatedNode.kt +8 -9
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CallbackImpl.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstance.kt +4 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CxxCallbackImpl.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/{CxxModuleWrapper.java → CxxModuleWrapper.kt} +5 -8
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/{DefaultJSExceptionHandler.java → DefaultJSExceptionHandler.kt} +6 -8
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/DimensionPropConverter.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/InvalidIteratorException.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JSBundleLoader.java +0 -15
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArgumentsParseException.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ObjectAlreadyConsumedException.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/Promise.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.kt +48 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/{ReactMarkerConstants.java → ReactMarkerConstants.kt} +5 -19
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactModuleWithSpec.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactSoftExceptionLogger.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeExecutor.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeScheduler.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManagerProvider.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/{MessageQueueThread.java → MessageQueueThread.kt} +24 -31
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.kt +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.kt +186 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/{MessageQueueThreadPerfStats.java → MessageQueueThreadPerfStats.kt} +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadSpec.kt +42 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/{QueueThreadExceptionHandler.java → QueueThreadExceptionHandler.kt} +4 -5
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfiguration.kt +30 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfigurationImpl.kt +51 -0
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfigurationSpec.kt +51 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/ReleaseLevel.kt +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/LegacyArchitecture.kt +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/annotations/internal/LegacyArchitectureLogLevel.kt +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.kt +10 -0
- package/ReactAndroid/src/main/java/com/facebook/react/common/futures/SimpleSettableFuture.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.kt +14 -35
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/WritableMapBuffer.kt +0 -6
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +21 -14
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHost.kt +135 -8
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +24 -10
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +9 -73
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.java +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt +0 -7
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.java +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSettingsActivity.kt +3 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +1 -36
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportSoLoader.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/{HMRClient.java → HMRClient.kt} +16 -10
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/IInspectorPackagerConnection.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/JSDebuggerWebSocketClient.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PackagerStatusCheck.kt +96 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PausedInDebuggerOverlayDialogManager.kt +70 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReactInstanceDevHelper.java +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.kt +261 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.kt +159 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/ReleaseDevSupportManager.kt +42 -47
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkHelper.kt +88 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkRequestListener.kt +29 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.kt +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +25 -16
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerBinding.kt +12 -14
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.kt +73 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/SurfaceHandlerBinding.kt +91 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventBeatManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +4 -10
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DestroyUnmountedViewMountItem.kt +3 -6
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchIntCommandMountItem.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/DispatchStringCommandMountItem.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/SendAccessibilityEvent.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/SendAccessibilityEventMountItem.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/AndroidChoreographerProvider.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +45 -57
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsAccessor.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +81 -101
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +17 -21
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +17 -21
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +91 -113
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +37 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +27 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +17 -21
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt +0 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModulePerfLogger.kt +70 -0
- package/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/accessibilityinfo/AccessibilityInfoModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/AppStateModule.kt +12 -12
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobCollector.kt +31 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/camera/ImageStoreManager.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevMenuModule.kt +0 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.kt +0 -4
- 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 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/devloading/DevLoadingModule.kt +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/FrescoModule.kt +1 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/SystraceRequestListener.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/i18nmanager/I18nManagerModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt +12 -20
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/{ProgressListener.java → CustomClientBuilder.kt} +5 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/{HeaderUtil.java → HeaderUtil.kt} +15 -13
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkInterceptorCreator.kt +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientFactory.kt +14 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.kt +79 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/{OkHttpClientFactory.java → ProgressListener.kt} +3 -6
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressRequestBody.kt +80 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.kt +85 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.kt +179 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ResponseUtil.kt +132 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/permissions/PermissionsModule.kt +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/modules/share/ShareModule.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/toast/ToastModule.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/NotificationOnlyHandler.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/{RequestHandler.java → RequestHandler.kt} +3 -5
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/RequestOnlyHandler.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/{Responder.java → Responder.kt} +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/processing/ReactLegacyArchitectureProcessor.kt +48 -0
- package/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java +31 -3
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +10 -10
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/JSTimerExecutor.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +13 -50
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImplDevHelper.kt +0 -5
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostInspectorTarget.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java +12 -15
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Executors.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/TaskCompletionSource.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/UnobservedErrorNotifier.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BackgroundStyleApplicator.kt +17 -41
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BlendModeHelper.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolver.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ComponentNameResolverBinding.kt +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt +18 -35
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/GuardedFrameCallback.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSPointerDispatcher.java +6 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java +0 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutDirectionUtil.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LengthPercentage.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeKind.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +399 -625
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactClippingViewGroup.kt +52 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{ReactOverflowViewWithInset.java → ReactOverflowViewWithInset.kt} +10 -10
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactPointerEventsView.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactStage.kt +36 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactYogaConfigProvider.kt +6 -11
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{ReactZIndexedViewGroup.java → ReactZIndexedViewGroup.kt} +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewManager.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/SimpleViewManager.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{StateWrapper.java → StateWrapper.kt} +9 -13
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIBlock.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/{UIManagerModuleListener.java → UIManagerModuleListener.kt} +4 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +34 -16
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerDelegate.kt +28 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerPropertyUpdater.kt +189 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerResolver.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/BorderDrawable.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/CSSBackgroundDrawable.java +18 -12
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/CompositeBackgroundDrawable.kt +141 -158
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/InsetBoxShadowDrawable.kt +4 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/OutlineDrawable.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/OutsetBoxShadowDrawable.kt +3 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/BlackHoleEventDispatcher.kt +15 -23
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt +10 -9
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/SynchronousEventReceiver.kt +5 -4
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.kt +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/InterpolatorType.kt +6 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationController.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/{LayoutAnimationListener.java → LayoutAnimationListener.kt} +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/{LayoutHandlingAnimation.java → LayoutHandlingAnimation.kt} +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/SimpleSpringInterpolator.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderColors.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderInsets.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/Gradient.kt +2 -19
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/LinearGradient.kt +231 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/LogicalEdge.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/Overflow.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/util/ExceptionDataHelper.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/util/RCTLog.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlay.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager.kt +9 -9
- package/ReactAndroid/src/main/java/com/facebook/react/views/debuggingoverlay/TraceUpdate.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerClosedEvent.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/MultiPostprocessor.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +36 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/safeareaview/ReactSafeAreaView.kt +1 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/safeareaview/ReactSafeAreaViewManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactAccessibleScrollView.kt +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerLegacyView.kt +11 -10
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewAccessibilityDelegate.kt +6 -10
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +7 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VelocityHelper.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitch.kt +6 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchEvent.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactRawTextManager.kt +7 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +26 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewAccessibilityDelegate.kt +335 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +17 -10
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactVirtualTextViewManager.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode.java +10 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageSpan.java +20 -19
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/ReactTextInlineImageShadowNode.kt +21 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactClickableSpan.kt +8 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/{ContentSizeWatcher.java → ContentSizeWatcher.kt} +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +41 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/{ScrollWatcher.java → ScrollWatcher.kt} +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/{SelectionWatcher.java → SelectionWatcher.kt} +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/unimplementedview/ReactUnimplementedViewManager.kt +5 -6
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +16 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ViewGroupClickEvent.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/systrace/SystraceMessage.kt +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +61 -54
- package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionWebSocketDelegate.cpp +10 -1
- package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionWebSocketDelegate.h +2 -0
- package/ReactAndroid/src/main/jni/react/fabric/CMakeLists.txt +17 -16
- package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +1 -7
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +1 -2
- package/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp +3 -3
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +108 -136
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +23 -29
- package/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +0 -37
- package/ReactAndroid/src/main/jni/react/mapbuffer/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.cpp +4 -8
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JReadableMapBuffer.h +2 -4
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +1 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +1 -0
- package/ReactAndroid/src/main/jni/react/uimanager/CMakeLists.txt +2 -2
- package/ReactCommon/React-Fabric.podspec +11 -6
- package/ReactCommon/React-FabricComponents.podspec +4 -8
- package/ReactCommon/React-FabricImage.podspec +2 -6
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +2 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/cxxreact/TraceSection.h +7 -4
- package/ReactCommon/hermes/React-hermes.podspec +4 -2
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.cpp +168 -0
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.h +22 -0
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.cpp +34 -0
- package/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.h +6 -0
- package/ReactCommon/jsi/React-jsi.podspec +1 -1
- package/ReactCommon/jsi/jsi/decorator.h +16 -0
- package/ReactCommon/jsi/jsi/jsi.cpp +58 -0
- package/ReactCommon/jsi/jsi/jsi.h +34 -0
- package/ReactCommon/jsi/jsi/test/testlib.cpp +58 -8
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +2 -2
- package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +5 -5
- package/ReactCommon/jsinspector-modern/CMakeLists.txt +2 -1
- package/ReactCommon/jsinspector-modern/FallbackRuntimeTargetDelegate.cpp +14 -0
- package/ReactCommon/jsinspector-modern/FallbackRuntimeTargetDelegate.h +6 -0
- package/ReactCommon/jsinspector-modern/HostAgent.cpp +17 -0
- package/ReactCommon/jsinspector-modern/HostTarget.cpp +8 -1
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +11 -11
- package/ReactCommon/jsinspector-modern/InspectorFlags.h +6 -0
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp +15 -1
- package/ReactCommon/jsinspector-modern/InspectorPackagerConnectionImpl.h +2 -0
- package/ReactCommon/jsinspector-modern/InstanceAgent.cpp +20 -0
- package/ReactCommon/jsinspector-modern/InstanceAgent.h +19 -2
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +14 -3
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.h +2 -2
- package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +16 -0
- package/ReactCommon/jsinspector-modern/RuntimeAgent.h +23 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +36 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.h +60 -2
- package/ReactCommon/jsinspector-modern/TracingAgent.cpp +67 -21
- package/ReactCommon/jsinspector-modern/TracingAgent.h +20 -0
- package/ReactCommon/jsinspector-modern/WebSocketInterfaces.h +7 -1
- package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +2 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +7 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorPackagerConnectionTest.cpp +8 -4
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +3 -2
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +5 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +1 -0
- package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
- package/ReactCommon/jsinspector-modern/tracing/EventLoopTaskReporter.cpp +49 -0
- package/ReactCommon/jsinspector-modern/tracing/EventLoopTaskReporter.h +31 -0
- package/ReactCommon/jsinspector-modern/tracing/InstanceTracingProfile.h +30 -0
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +229 -79
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +64 -55
- package/ReactCommon/jsinspector-modern/tracing/ProfileTreeNode.h +111 -0
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -0
- package/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfile.h +163 -0
- package/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfileTraceEventSerializer.cpp +231 -0
- package/ReactCommon/jsinspector-modern/tracing/RuntimeSamplingProfileTraceEventSerializer.h +30 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEvent.h +65 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventProfile.h +157 -0
- package/ReactCommon/jsinspector-modern/tracing/tests/ProfileTreeNodeTest.cpp +58 -0
- package/ReactCommon/jsitooling/CMakeLists.txt +30 -0
- package/ReactCommon/jsitooling/React-jsitooling.podspec +66 -0
- package/ReactCommon/{react → jsitooling/react}/runtime/JSRuntimeFactory.h +4 -0
- package/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.cpp +15 -0
- package/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.h +26 -0
- package/ReactCommon/oscompat/CMakeLists.txt +14 -0
- package/ReactCommon/oscompat/OSCompat.h +18 -0
- package/ReactCommon/oscompat/OSCompatPosix.cpp +63 -0
- package/ReactCommon/oscompat/OSCompatWindows.cpp +26 -0
- package/ReactCommon/oscompat/React-oscompat.podspec +31 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +33 -41
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +39 -49
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +152 -188
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +20 -24
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +30 -38
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +67 -85
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +10 -12
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +4 -9
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +9 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h +22 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +48 -24
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h +7 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +86 -31
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +2 -2
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -5
- package/ReactCommon/react/nativemodule/dom/CMakeLists.txt +2 -2
- package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +214 -107
- package/ReactCommon/react/nativemodule/dom/NativeDOM.h +55 -38
- package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +3 -5
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +39 -49
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +17 -21
- package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +3 -5
- package/ReactCommon/react/nativemodule/idlecallbacks/CMakeLists.txt +1 -1
- package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +3 -5
- package/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h +1 -1
- package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +3 -5
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +1 -2
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +2 -7
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.h +1 -10
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.mm +1 -24
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +2 -61
- package/ReactCommon/react/performance/timeline/CMakeLists.txt +1 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +95 -11
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.h +4 -1
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +1 -0
- package/ReactCommon/react/renderer/animations/CMakeLists.txt +10 -10
- package/ReactCommon/react/renderer/animations/utils.h +2 -6
- package/ReactCommon/react/renderer/attributedstring/CMakeLists.txt +8 -8
- package/ReactCommon/react/renderer/attributedstring/conversions.h +107 -0
- package/ReactCommon/react/renderer/attributedstring/primitives.h +21 -1
- package/ReactCommon/react/renderer/componentregistry/CMakeLists.txt +6 -6
- package/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt +2 -2
- package/ReactCommon/react/renderer/components/image/CMakeLists.txt +5 -5
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/CMakeLists.txt +1 -1
- package/ReactCommon/react/renderer/components/modal/CMakeLists.txt +6 -6
- package/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt +5 -5
- package/ReactCommon/react/renderer/components/root/CMakeLists.txt +3 -3
- package/ReactCommon/react/renderer/components/root/RootShadowNode.cpp +5 -0
- package/ReactCommon/react/renderer/components/root/RootShadowNode.h +2 -0
- package/ReactCommon/react/renderer/components/safeareaview/CMakeLists.txt +5 -5
- package/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt +4 -4
- package/ReactCommon/react/renderer/components/scrollview/ScrollEvent.cpp +1 -1
- package/ReactCommon/react/renderer/components/scrollview/ScrollEvent.h +1 -0
- package/ReactCommon/react/renderer/components/switch/CMakeLists.txt +5 -5
- package/ReactCommon/react/renderer/components/text/CMakeLists.txt +7 -7
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputShadowNode.h +2 -4
- package/ReactCommon/react/renderer/components/textinput/CMakeLists.txt +10 -10
- package/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp +2 -0
- package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +8 -8
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/primitives.h +7 -0
- package/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/propsConversions.h +7 -0
- package/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt +3 -3
- package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +3 -1
- package/ReactCommon/react/renderer/components/view/BoxShadowPropsConversions.h +276 -0
- package/ReactCommon/react/renderer/components/view/CMakeLists.txt +4 -3
- package/ReactCommon/react/renderer/components/view/CSSConversions.h +96 -0
- package/ReactCommon/react/renderer/components/view/FilterPropsConversions.h +386 -0
- package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +227 -222
- package/ReactCommon/react/renderer/components/view/conversions.h +185 -265
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +798 -0
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.h +6 -0
- package/ReactCommon/react/renderer/components/view/tests/ConversionsTest.cpp +239 -0
- package/ReactCommon/react/renderer/consistency/CMakeLists.txt +3 -3
- package/ReactCommon/react/renderer/core/CMakeLists.txt +8 -8
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +2 -5
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +10 -0
- package/ReactCommon/react/renderer/core/EventBeat.cpp +8 -0
- package/ReactCommon/react/renderer/core/EventBeat.h +10 -0
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +1 -6
- package/ReactCommon/react/renderer/core/EventQueue.cpp +8 -1
- package/ReactCommon/react/renderer/core/LayoutMetrics.h +16 -0
- package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +12 -5
- package/ReactCommon/react/renderer/core/Props.cpp +9 -0
- package/ReactCommon/react/renderer/core/Props.h +13 -0
- package/ReactCommon/react/renderer/core/RawProps.cpp +0 -16
- package/ReactCommon/react/renderer/core/RawProps.h +6 -5
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +1 -2
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.cpp +11 -5
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +4 -7
- package/ReactCommon/react/renderer/core/tests/FindNodeAtPointTest.cpp +34 -0
- package/ReactCommon/react/renderer/core/tests/LayoutableShadowNodeTest.cpp +282 -1
- package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +12 -44
- package/ReactCommon/react/renderer/css/CMakeLists.txt +36 -0
- package/ReactCommon/react/renderer/css/CSSAngle.h +42 -0
- package/ReactCommon/react/renderer/css/CSSColor.h +59 -0
- package/ReactCommon/react/renderer/css/CSSColorFunction.h +446 -0
- package/ReactCommon/react/renderer/css/CSSCompoundDataType.h +121 -0
- package/ReactCommon/react/renderer/css/CSSDataType.h +81 -0
- package/ReactCommon/react/renderer/css/CSSDummy.cpp +14 -0
- package/ReactCommon/react/renderer/css/CSSFilter.h +341 -0
- package/ReactCommon/react/renderer/css/CSSFontVariant.h +65 -0
- package/ReactCommon/react/renderer/css/CSSHexColor.h +104 -0
- package/ReactCommon/react/renderer/css/CSSKeyword.h +368 -0
- package/ReactCommon/react/renderer/css/CSSLength.h +58 -0
- package/ReactCommon/react/renderer/css/CSSLengthPercentage.h +21 -0
- package/ReactCommon/react/renderer/css/CSSList.h +77 -0
- package/ReactCommon/react/renderer/css/CSSNamedColor.h +328 -0
- package/ReactCommon/react/renderer/css/CSSNumber.h +40 -0
- package/ReactCommon/react/renderer/css/CSSPercentage.h +40 -0
- package/ReactCommon/react/renderer/css/CSSRatio.h +70 -0
- package/ReactCommon/react/renderer/css/CSSShadow.h +152 -0
- package/ReactCommon/react/renderer/css/CSSSyntaxParser.h +174 -81
- package/ReactCommon/react/renderer/css/CSSTokenizer.h +6 -4
- package/ReactCommon/react/renderer/css/CSSTransform.h +498 -0
- package/ReactCommon/react/renderer/css/CSSTransformOrigin.h +226 -0
- package/ReactCommon/react/renderer/css/CSSValueParser.h +151 -234
- package/ReactCommon/react/renderer/css/CSSZero.h +41 -0
- package/ReactCommon/react/renderer/css/React-renderercss.podspec +50 -0
- package/ReactCommon/react/renderer/css/tests/CSSAngleTest.cpp +44 -0
- package/ReactCommon/react/renderer/css/tests/CSSColorTest.cpp +493 -0
- package/ReactCommon/react/renderer/css/tests/CSSFilterTest.cpp +577 -0
- package/ReactCommon/react/renderer/css/tests/CSSFontVariantTest.cpp +75 -0
- package/ReactCommon/react/renderer/css/tests/CSSKeywordTest.cpp +52 -0
- package/ReactCommon/react/renderer/css/tests/CSSLengthPercentageTest.cpp +37 -0
- package/ReactCommon/react/renderer/css/tests/CSSLengthTest.cpp +58 -0
- package/ReactCommon/react/renderer/css/tests/CSSListTest.cpp +153 -0
- package/ReactCommon/react/renderer/css/tests/CSSNumberLengthTest.cpp +21 -0
- package/ReactCommon/react/renderer/css/tests/CSSNumberTest.cpp +30 -0
- package/ReactCommon/react/renderer/css/tests/CSSRatioTest.cpp +68 -0
- package/ReactCommon/react/renderer/css/tests/CSSShadowTest.cpp +339 -0
- package/ReactCommon/react/renderer/css/tests/CSSSyntaxParserTest.cpp +338 -45
- package/ReactCommon/react/renderer/css/tests/CSSTokenizerTest.cpp +10 -0
- package/ReactCommon/react/renderer/css/tests/CSSTransformOriginTest.cpp +428 -0
- package/ReactCommon/react/renderer/css/tests/CSSTransformTest.cpp +701 -0
- package/ReactCommon/react/renderer/css/tests/CSSValueParserTest.cpp +39 -392
- package/ReactCommon/react/renderer/debug/CMakeLists.txt +4 -4
- package/ReactCommon/react/renderer/debug/DebugStringConvertible.h +1 -1
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
- package/ReactCommon/react/renderer/dom/CMakeLists.txt +6 -6
- package/ReactCommon/react/renderer/dom/DOM.cpp +8 -6
- package/ReactCommon/react/renderer/dom/DOM.h +6 -0
- package/ReactCommon/react/renderer/element/CMakeLists.txt +6 -6
- package/ReactCommon/react/renderer/graphics/CMakeLists.txt +4 -4
- package/ReactCommon/react/renderer/graphics/Filter.h +0 -1
- package/ReactCommon/react/renderer/graphics/LinearGradient.h +8 -1
- package/ReactCommon/react/renderer/graphics/Point.h +23 -17
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +2 -6
- package/ReactCommon/react/renderer/graphics/Transform.h +2 -0
- package/ReactCommon/react/renderer/graphics/ValueUnit.h +4 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +9 -5
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +112 -14
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.h +7 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm +1 -0
- package/ReactCommon/react/renderer/graphics/tests/PointTest.cpp +87 -0
- package/ReactCommon/react/renderer/imagemanager/CMakeLists.txt +9 -9
- package/ReactCommon/react/renderer/leakchecker/CMakeLists.txt +5 -5
- package/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt +4 -4
- package/ReactCommon/react/renderer/mounting/CMakeLists.txt +10 -9
- package/ReactCommon/react/renderer/mounting/Differentiator.cpp +140 -341
- package/ReactCommon/react/renderer/mounting/Differentiator.h +0 -77
- package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +2 -21
- package/ReactCommon/react/renderer/mounting/ShadowTree.h +0 -2
- package/ReactCommon/react/renderer/mounting/internal/CullingContext.cpp +48 -0
- package/ReactCommon/react/renderer/mounting/internal/CullingContext.h +29 -0
- package/ReactCommon/react/renderer/mounting/internal/ShadowViewNodePair.h +62 -0
- package/ReactCommon/react/renderer/mounting/internal/TinyMap.h +143 -0
- package/ReactCommon/react/renderer/mounting/internal/sliceChildShadowNodeViewPairs.cpp +191 -0
- package/ReactCommon/react/renderer/mounting/internal/sliceChildShadowNodeViewPairs.h +53 -0
- package/ReactCommon/react/renderer/mounting/stubs/StubView.cpp +2 -0
- package/ReactCommon/react/renderer/mounting/stubs/StubView.h +1 -0
- package/ReactCommon/react/renderer/mounting/stubs/StubViewTree.cpp +127 -0
- package/ReactCommon/react/renderer/mounting/stubs/StubViewTree.h +15 -0
- package/ReactCommon/react/renderer/mounting/stubs/stubs.cpp +4 -2
- package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +11 -9
- package/ReactCommon/react/renderer/observers/events/CMakeLists.txt +7 -7
- package/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +8 -7
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +2 -6
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +1 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp +3 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.h +1 -1
- package/ReactCommon/react/renderer/scheduler/CMakeLists.txt +12 -12
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +8 -13
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp +3 -3
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.h +3 -3
- package/ReactCommon/react/renderer/telemetry/CMakeLists.txt +6 -6
- package/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt +13 -13
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.h +24 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +1 -43
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontProperties.h +20 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +140 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +16 -5
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +2 -2
- package/ReactCommon/react/renderer/uimanager/CMakeLists.txt +14 -14
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +4 -3
- package/ReactCommon/react/renderer/uimanager/UIManager.h +3 -3
- package/ReactCommon/react/renderer/uimanager/consistency/CMakeLists.txt +6 -6
- package/ReactCommon/react/renderer/uimanager/primitives.h +3 -0
- package/ReactCommon/react/runtime/CMakeLists.txt +1 -0
- package/ReactCommon/react/runtime/React-RuntimeCore.podspec +2 -6
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +5 -8
- package/ReactCommon/react/runtime/ReactInstance.cpp +0 -8
- package/ReactCommon/react/runtime/TimerManager.cpp +0 -58
- package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +1 -2
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +4 -2
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +3 -1
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +33 -0
- package/ReactCommon/react/utils/React-utils.podspec +1 -5
- package/ReactCommon/react/utils/TemplateStringLiteral.h +35 -0
- package/ReactCommon/react/utils/fnv1a.h +3 -4
- package/ReactCommon/react/utils/iequals.h +34 -0
- package/ReactCommon/react/utils/toLower.h +22 -0
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoLogger.cpp +31 -4
- package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoLogger.h +2 -0
- package/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h +22 -0
- package/cli.js +11 -2
- package/flow/jest.js +14 -14
- package/gradle/libs.versions.toml +2 -2
- package/index.js +176 -263
- package/jest/mockScrollView.js +1 -1
- package/jest/setup.js +314 -264
- package/package.json +18 -15
- package/react-native.config.js +24 -23
- package/scripts/cocoapods/codegen.rb +4 -15
- package/scripts/cocoapods/codegen_utils.rb +4 -267
- package/scripts/cocoapods/jsengine.rb +17 -7
- package/scripts/cocoapods/new_architecture.rb +6 -36
- package/scripts/cocoapods/utils.rb +16 -5
- package/scripts/codegen/generate-artifacts-executor.js +165 -29
- package/scripts/codegen/templates/RCTAppDependencyProviderMM.template +9 -29
- package/scripts/codegen/templates/RCTModuleProvidersH.template +16 -0
- package/scripts/codegen/templates/RCTModuleProvidersMM.template +51 -0
- package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderMM.template +30 -9
- package/scripts/codegen/templates/RCTThirdPartyComponentsProviderMM.template +9 -2
- package/scripts/codegen/templates/ReactCodegen.podspec.template +99 -0
- package/scripts/hermes/hermes-utils.js +1 -1
- package/scripts/react_native_pods.rb +47 -3
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/linux64-bin/hermesc +0 -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/createAnimatedPropsHook.js +360 -0
- package/src/private/animated/{useAnimatedPropsMemo.js → createAnimatedPropsMemoHook.js} +84 -32
- package/src/private/components/HScrollViewNativeComponents.js +2 -2
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +2 -2
- package/src/private/components/VScrollViewNativeComponents.js +1 -1
- package/src/private/debugging/ReactDevToolsSettingsManager.android.js +1 -1
- package/src/private/devmenu/DevMenu.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +53 -75
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +5 -7
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +10 -12
- package/{Libraries/Inspector → src/private/inspector}/BorderBox.js +3 -3
- package/{Libraries/Inspector → src/private/inspector}/BoxInspector.js +9 -6
- package/{Libraries/Inspector → src/private/inspector}/ElementBox.js +9 -8
- package/{Libraries/Inspector → src/private/inspector}/ElementProperties.js +20 -15
- package/{Libraries/Inspector → src/private/inspector}/Inspector.js +21 -18
- package/{Libraries/Inspector → src/private/inspector}/InspectorOverlay.js +11 -10
- package/{Libraries/Inspector → src/private/inspector}/InspectorPanel.js +17 -15
- package/{Libraries/Inspector → src/private/inspector}/NetworkOverlay.js +43 -27
- package/{Libraries/Inspector → src/private/inspector}/PerformanceOverlay.js +8 -6
- package/{Libraries/Inspector → src/private/inspector}/ReactDevToolsOverlay.js +11 -10
- package/{Libraries/Inspector → src/private/inspector}/StyleInspector.js +6 -6
- package/{Libraries/Network → src/private/inspector}/XHRInterceptor.js +5 -2
- package/{Libraries/Inspector → src/private/inspector}/getInspectorDataForViewAtPoint.js +6 -6
- package/{Libraries/Inspector → src/private/inspector}/resolveBoxStyle.js +5 -4
- package/src/private/renderer/errorhandling/ErrorHandlers.js +5 -5
- package/src/private/setup/setUpDOM.js +43 -3
- package/src/private/specs_DEPRECATED/README.md +7 -0
- package/src/private/{specs → specs_DEPRECATED}/components/ActivityIndicatorViewNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/AndroidDrawerLayoutNativeComponent.js +7 -7
- package/src/private/{specs → specs_DEPRECATED}/components/AndroidHorizontalScrollContentViewNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/AndroidSwipeRefreshLayoutNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/AndroidSwitchNativeComponent.js +5 -5
- package/src/private/{specs → specs_DEPRECATED}/components/DebuggingOverlayNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/ProgressBarAndroidNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/PullToRefreshViewNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/RCTInputAccessoryViewNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/RCTModalHostViewNativeComponent.js +5 -5
- package/src/private/{specs → specs_DEPRECATED}/components/RCTSafeAreaViewNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/components/SwitchNativeComponent.js +5 -5
- package/src/private/{specs → specs_DEPRECATED}/components/UnimplementedNativeViewNativeComponent.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeAccessibilityManager.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeActionSheetManager.js +7 -7
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeAlertManager.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeAnimatedModule.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeAnimatedTurboModule.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeAppState.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeBlobModule.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeClipboard.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeDevMenu.js +0 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeDevSettings.js +0 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeDeviceInfo.js +8 -8
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeDialogManagerAndroid.js +4 -4
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeExceptionsManager.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeFrameRateLogger.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeI18nManager.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeImageEditor.js +9 -9
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeImageLoaderAndroid.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeImageStoreAndroid.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeImageStoreIOS.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeNetworkingIOS.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativePermissionsAndroid.js +5 -4
- package/src/private/{specs → specs_DEPRECATED}/modules/NativePlatformConstantsAndroid.js +4 -4
- package/src/private/{specs → specs_DEPRECATED}/modules/NativePlatformConstantsIOS.js +4 -4
- package/src/private/{specs → specs_DEPRECATED}/modules/NativePushNotificationManagerIOS.js +7 -7
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeSampleTurboModule.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeSettingsManager.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeShareModule.js +3 -3
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeSourceCode.js +2 -2
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeStatusBarManagerAndroid.js +4 -4
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeStatusBarManagerIOS.js +6 -6
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeToastAndroid.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeUIManager.js +184 -0
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeVibration.js +1 -1
- package/src/private/{specs → specs_DEPRECATED}/modules/NativeWebSocketModule.js +1 -1
- package/{flow/Position.js → src/private/types/HostComponent.js} +6 -6
- package/src/private/types/HostInstance.js +50 -0
- package/src/private/webapis/dom/events/CustomEvent.js +38 -0
- package/src/private/webapis/dom/events/Event.js +236 -0
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +130 -0
- package/src/private/webapis/dom/events/EventTarget.js +436 -0
- package/src/private/webapis/dom/events/internals/EventInternals.js +120 -0
- package/src/private/webapis/dom/events/internals/EventTargetInternals.js +52 -0
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +121 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +82 -51
- package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +7 -6
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +26 -26
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +56 -78
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +144 -0
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.js +55 -0
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +44 -0
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +305 -194
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js.flow +1 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js.flow +1 -1
- package/src/private/webapis/{dom/oldstylecollections → geometry}/DOMRectList.js +3 -3
- package/src/private/webapis/{dom/oldstylecollections → geometry}/DOMRectList.js.flow +2 -2
- package/src/private/webapis/html/events/MessageEvent.js +56 -0
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +6 -6
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
- package/src/private/webapis/intersectionobserver/{IntersectionObserverManager.js → internals/IntersectionObserverManager.js} +20 -17
- package/src/private/webapis/mutationobserver/MutationObserver.js +11 -11
- package/src/private/webapis/mutationobserver/{MutationObserverManager.js → internals/MutationObserverManager.js} +12 -14
- package/src/private/webapis/performance/EventTiming.js +1 -1
- package/src/private/webapis/performance/Performance.js +3 -3
- package/src/private/webapis/performance/PerformanceObserver.js +8 -8
- package/src/private/webapis/performance/{RawPerformanceEntry.js → internals/RawPerformanceEntry.js} +6 -6
- package/src/private/webapis/performance/{Utilities.js → internals/Utilities.js} +1 -1
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +1 -1
- package/src/private/webapis/websockets/events/CloseEvent.js +52 -0
- package/src/private/webapis/xhr/events/ProgressEvent.js +52 -0
- package/src/types/bom.js.flow +403 -0
- package/src/types/dom.js.flow +6271 -0
- package/src/types/globals.d.ts +628 -0
- package/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/fmt.podspec +3 -2
- package/types/index.d.ts +2 -58
- package/types/public/ReactNativeTVTypes.d.ts +9 -7
- package/Libraries/Animated/AnimatedWeb.js +0 -26
- package/Libraries/JSInspector/InspectorAgent.js +0 -27
- package/Libraries/JSInspector/JSInspector.js +0 -33
- package/Libraries/JSInspector/NetworkAgent.js +0 -295
- package/Libraries/Utilities/DebugEnvironment.js +0 -16
- package/Libraries/Utilities/Platform.flow.js +0 -93
- package/Libraries/YellowBox/YellowBoxDeprecated.d.ts +0 -19
- package/Libraries/YellowBox/YellowBoxDeprecated.js +0 -75
- package/React/CoreModules/RCTWebSocketExecutor.h +0 -19
- package/React/CoreModules/RCTWebSocketExecutor.mm +0 -301
- package/React/UIUtils/RCTUIUtils.h +0 -30
- package/React/UIUtils/RCTUIUtils.m +0 -30
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java +0 -50
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.java +0 -57
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/RuntimeConfig.kt +0 -13
- package/ReactAndroid/src/main/java/com/facebook/hermes/unicode/AndroidUnicodeUtils.kt +0 -77
- package/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.java +0 -208
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CxxCallbackImpl.java +0 -28
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/DimensionPropConverter.java +0 -33
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/FallbackJSBundleLoader.java +0 -85
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaJSExecutor.kt +0 -50
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ProxyJavaScriptExecutor.java +0 -80
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java +0 -48
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeExecutor.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/RuntimeScheduler.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java +0 -32
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java +0 -226
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadSpec.java +0 -65
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfiguration.java +0 -27
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfigurationImpl.java +0 -65
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/ReactQueueConfigurationSpec.java +0 -73
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/MapBufferSoLoader.kt +0 -35
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/IInspectorPackagerConnection.java +0 -16
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PackagerStatusCheck.java +0 -102
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PausedInDebuggerOverlayDialogManager.java +0 -89
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java +0 -325
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java +0 -191
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/ViewHierarchyUtil.java +0 -40
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/WebsocketJavaScriptExecutor.java +0 -183
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkHelper.java +0 -94
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkRequestListener.java +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.java +0 -67
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/SurfaceHandlerBinding.java +0 -87
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModulePerfLogger.java +0 -93
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobCollector.java +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/CountingOutputStream.java +0 -67
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/CustomClientBuilder.java +0 -14
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkInterceptorCreator.java +0 -18
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/OkHttpClientProvider.java +0 -83
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressRequestBody.java +0 -79
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressiveStringDecoder.java +0 -88
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java +0 -166
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ResponseUtil.java +0 -123
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/TLSSocketFactory.java +0 -78
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactClippingViewGroup.java +0 -57
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactStage.java +0 -38
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerPropertyUpdater.java +0 -172
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerResolver.java +0 -26
- package/ReactAndroid/src/main/java/com/facebook/react/views/common/ViewUtils.kt +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/ReactTextInlineImageShadowNode.java +0 -24
- package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp +0 -138
- package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h +0 -64
- package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/OnLoad.cpp +0 -16
- package/ReactCommon/react/renderer/css/CSSColorUtils.h +0 -373
- package/ReactCommon/react/renderer/css/CSSDeclaredStyle.h +0 -138
- package/ReactCommon/react/renderer/css/CSSKeywords.h +0 -454
- package/ReactCommon/react/renderer/css/CSSProperties.h +0 -1287
- package/ReactCommon/react/renderer/css/CSSValue.h +0 -92
- package/ReactCommon/react/renderer/css/CSSValueVariant.h +0 -267
- package/ReactCommon/react/renderer/css/tests/CSSDeclaredStyleTest.cpp +0 -164
- package/ReactCommon/react/renderer/mounting/tests/MountingTest.cpp +0 -640
- package/src/private/specs/modules/NativeCPUTime.js +0 -24
- package/src/private/specs/modules/NativeFantom.js +0 -37
- package/src/private/specs/modules/NativeUIManager.js +0 -111
- package/types/modules/globals.d.ts +0 -599
- /package/ReactCommon/{react → jsitooling/react}/runtime/JSRuntimeFactory.cpp +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeAccessibilityInfo.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeAppearance.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeBugReporting.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeDevLoadingView.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeDeviceEventManager.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeFileReaderModule.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeHeadlessJsTaskSupport.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeIntentAndroid.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeJSCHeapCapture.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeKeyboardObserver.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeLinkingManager.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeLogBox.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeModalManager.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeNetworkingAndroid.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeReactDevToolsSettingsManager.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeRedBox.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeSegmentFetcher.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeSoundManager.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeTVNavigationEventEmitter.js +0 -0
- /package/src/private/{specs → specs_DEPRECATED}/modules/NativeTiming.js +0 -0
- /package/src/private/webapis/dom/nodes/{utilities → internals}/Traversal.js +0 -0
- /package/src/private/webapis/{dom/geometry → geometry}/DOMRect.js +0 -0
- /package/src/private/webapis/{dom/geometry → geometry}/DOMRectReadOnly.js +0 -0
- /package/src/private/webapis/{dom/oldstylecollections → utils}/ArrayLikeUtils.js +0 -0
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java
CHANGED
|
@@ -8,22 +8,15 @@
|
|
|
8
8
|
package com.facebook.react.uimanager;
|
|
9
9
|
|
|
10
10
|
import android.content.Context;
|
|
11
|
-
import android.graphics.Paint;
|
|
12
11
|
import android.graphics.Rect;
|
|
13
12
|
import android.os.Bundle;
|
|
14
13
|
import android.os.Handler;
|
|
15
14
|
import android.os.Message;
|
|
16
|
-
import android.text.Layout;
|
|
17
|
-
import android.text.Spannable;
|
|
18
|
-
import android.text.Spanned;
|
|
19
15
|
import android.text.TextUtils;
|
|
20
|
-
import android.text.style.AbsoluteSizeSpan;
|
|
21
|
-
import android.text.style.ClickableSpan;
|
|
22
16
|
import android.view.View;
|
|
23
17
|
import android.view.ViewGroup;
|
|
24
18
|
import android.view.accessibility.AccessibilityEvent;
|
|
25
19
|
import android.widget.EditText;
|
|
26
|
-
import android.widget.TextView;
|
|
27
20
|
import androidx.annotation.NonNull;
|
|
28
21
|
import androidx.annotation.Nullable;
|
|
29
22
|
import androidx.core.view.ViewCompat;
|
|
@@ -44,12 +37,10 @@ import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
|
|
44
37
|
import com.facebook.react.bridge.ReadableType;
|
|
45
38
|
import com.facebook.react.bridge.UIManager;
|
|
46
39
|
import com.facebook.react.bridge.WritableMap;
|
|
47
|
-
import com.facebook.react.uimanager.ReactAccessibilityDelegate.AccessibilityRole;
|
|
48
40
|
import com.facebook.react.uimanager.common.ViewUtil;
|
|
49
41
|
import com.facebook.react.uimanager.events.Event;
|
|
50
42
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
51
43
|
import com.facebook.react.uimanager.util.ReactFindViewUtil;
|
|
52
|
-
import java.util.ArrayList;
|
|
53
44
|
import java.util.HashMap;
|
|
54
45
|
import java.util.List;
|
|
55
46
|
|
|
@@ -59,15 +50,25 @@ import java.util.List;
|
|
|
59
50
|
*/
|
|
60
51
|
public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
61
52
|
|
|
62
|
-
private static final String TAG = "ReactAccessibilityDelegate";
|
|
63
53
|
public static final String TOP_ACCESSIBILITY_ACTION_EVENT = "topAccessibilityAction";
|
|
54
|
+
public static final HashMap<String, Integer> sActionIdMap = new HashMap<>();
|
|
55
|
+
|
|
56
|
+
private static final String TAG = "ReactAccessibilityDelegate";
|
|
64
57
|
private static int sCounter = 0x3f000000;
|
|
65
58
|
private static final int TIMEOUT_SEND_ACCESSIBILITY_EVENT = 200;
|
|
66
59
|
private static final int SEND_EVENT = 1;
|
|
67
60
|
private static final String delimiter = ", ";
|
|
68
61
|
private static final int delimiterLength = delimiter.length();
|
|
62
|
+
// State constants for states which have analogs in AccessibilityNodeInfo
|
|
63
|
+
private static final String STATE_DISABLED = "disabled";
|
|
64
|
+
private static final String STATE_SELECTED = "selected";
|
|
65
|
+
private static final String STATE_CHECKED = "checked";
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
private final View mView;
|
|
68
|
+
private Handler mHandler;
|
|
69
|
+
private final HashMap<Integer, String> mAccessibilityActionsMap;
|
|
70
|
+
|
|
71
|
+
@Nullable View mAccessibilityLabelledBy;
|
|
71
72
|
|
|
72
73
|
static {
|
|
73
74
|
sActionIdMap.put("activate", AccessibilityActionCompat.ACTION_CLICK.getId());
|
|
@@ -79,375 +80,96 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
79
80
|
sActionIdMap.put("accessibilityFocus", AccessibilityActionCompat.ACTION_ACCESSIBILITY_FOCUS.getId());
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
public ReactAccessibilityDelegate(
|
|
84
|
+
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
85
|
+
super(view);
|
|
86
|
+
mView = view;
|
|
87
|
+
mAccessibilityActionsMap = new HashMap<Integer, String>();
|
|
88
|
+
mHandler =
|
|
89
|
+
new Handler() {
|
|
90
|
+
@Override
|
|
91
|
+
public void handleMessage(Message msg) {
|
|
92
|
+
View host = (View) msg.obj;
|
|
93
|
+
host.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
84
96
|
|
|
85
|
-
|
|
97
|
+
// We need to reset these two properties, as ExploreByTouchHelper sets focusable to "true" and
|
|
98
|
+
// importantForAccessibility to "Yes" (if it is Auto). If we don't reset these it would force
|
|
99
|
+
// every element that has this delegate attached to be focusable, and not allow for
|
|
100
|
+
// announcement coalescing.
|
|
101
|
+
mView.setFocusable(originalFocus);
|
|
102
|
+
ViewCompat.setImportantForAccessibility(mView, originalImportantForAccessibility);
|
|
103
|
+
}
|
|
86
104
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
public static void setDelegate(
|
|
106
|
+
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
107
|
+
// if a view already has an accessibility delegate, replacing it could cause
|
|
108
|
+
// problems, so leave it alone.
|
|
109
|
+
if (!ViewCompat.hasAccessibilityDelegate(view)
|
|
110
|
+
&& (view.getTag(R.id.accessibility_role) != null
|
|
111
|
+
|| view.getTag(R.id.accessibility_state) != null
|
|
112
|
+
|| view.getTag(R.id.accessibility_actions) != null
|
|
113
|
+
|| view.getTag(R.id.react_test_id) != null
|
|
114
|
+
|| view.getTag(R.id.accessibility_collection_item) != null
|
|
115
|
+
|| view.getTag(R.id.accessibility_links) != null
|
|
116
|
+
|| view.getTag(R.id.role) != null)) {
|
|
117
|
+
ViewCompat.setAccessibilityDelegate(
|
|
118
|
+
view,
|
|
119
|
+
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
95
120
|
}
|
|
96
|
-
Message msg = mHandler.obtainMessage(SEND_EVENT, host);
|
|
97
|
-
mHandler.sendMessageDelayed(msg, TIMEOUT_SEND_ACCESSIBILITY_EVENT);
|
|
98
121
|
}
|
|
99
122
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
APPLICATION,
|
|
108
|
-
ARTICLE,
|
|
109
|
-
BANNER,
|
|
110
|
-
BUTTON,
|
|
111
|
-
CELL,
|
|
112
|
-
CHECKBOX,
|
|
113
|
-
COLUMNHEADER,
|
|
114
|
-
COMBOBOX,
|
|
115
|
-
COMPLEMENTARY,
|
|
116
|
-
CONTENTINFO,
|
|
117
|
-
DEFINITION,
|
|
118
|
-
DIALOG,
|
|
119
|
-
DIRECTORY,
|
|
120
|
-
DOCUMENT,
|
|
121
|
-
FEED,
|
|
122
|
-
FIGURE,
|
|
123
|
-
FORM,
|
|
124
|
-
GRID,
|
|
125
|
-
GROUP,
|
|
126
|
-
HEADING,
|
|
127
|
-
IMG,
|
|
128
|
-
LINK,
|
|
129
|
-
LIST,
|
|
130
|
-
LISTITEM,
|
|
131
|
-
LOG,
|
|
132
|
-
MAIN,
|
|
133
|
-
MARQUEE,
|
|
134
|
-
MATH,
|
|
135
|
-
MENU,
|
|
136
|
-
MENUBAR,
|
|
137
|
-
MENUITEM,
|
|
138
|
-
METER,
|
|
139
|
-
NAVIGATION,
|
|
140
|
-
NONE,
|
|
141
|
-
NOTE,
|
|
142
|
-
OPTION,
|
|
143
|
-
PRESENTATION,
|
|
144
|
-
PROGRESSBAR,
|
|
145
|
-
RADIO,
|
|
146
|
-
RADIOGROUP,
|
|
147
|
-
REGION,
|
|
148
|
-
ROW,
|
|
149
|
-
ROWGROUP,
|
|
150
|
-
ROWHEADER,
|
|
151
|
-
SCROLLBAR,
|
|
152
|
-
SEARCHBOX,
|
|
153
|
-
SEPARATOR,
|
|
154
|
-
SLIDER,
|
|
155
|
-
SPINBUTTON,
|
|
156
|
-
STATUS,
|
|
157
|
-
SUMMARY,
|
|
158
|
-
SWITCH,
|
|
159
|
-
TAB,
|
|
160
|
-
TABLE,
|
|
161
|
-
TABLIST,
|
|
162
|
-
TABPANEL,
|
|
163
|
-
TERM,
|
|
164
|
-
TIMER,
|
|
165
|
-
TOOLBAR,
|
|
166
|
-
TOOLTIP,
|
|
167
|
-
TREE,
|
|
168
|
-
TREEGRID,
|
|
169
|
-
TREEITEM;
|
|
123
|
+
// Explicitly re-set the delegate, even if one has already been set.
|
|
124
|
+
public static void resetDelegate(
|
|
125
|
+
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
126
|
+
ViewCompat.setAccessibilityDelegate(
|
|
127
|
+
view,
|
|
128
|
+
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
129
|
+
}
|
|
170
130
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
131
|
+
// The View this delegate is attached to
|
|
132
|
+
protected View getHostView() {
|
|
133
|
+
return mView;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@Override
|
|
137
|
+
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
|
|
138
|
+
super.onInitializeAccessibilityNodeInfo(host, info);
|
|
139
|
+
if (host.getTag(R.id.accessibility_state_expanded) != null) {
|
|
140
|
+
final boolean accessibilityStateExpanded =
|
|
141
|
+
(boolean) host.getTag(R.id.accessibility_state_expanded);
|
|
142
|
+
info.addAction(
|
|
143
|
+
accessibilityStateExpanded
|
|
144
|
+
? AccessibilityNodeInfoCompat.ACTION_COLLAPSE
|
|
145
|
+
: AccessibilityNodeInfoCompat.ACTION_EXPAND);
|
|
146
|
+
}
|
|
147
|
+
final AccessibilityRole accessibilityRole = AccessibilityRole.fromViewTag(host);
|
|
148
|
+
final String accessibilityHint = (String) host.getTag(R.id.accessibility_hint);
|
|
149
|
+
if (accessibilityRole != null) {
|
|
150
|
+
setRole(info, accessibilityRole, host.getContext());
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (accessibilityHint != null) {
|
|
154
|
+
info.setTooltipText(accessibilityHint);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
final Object accessibilityLabelledBy = host.getTag(R.id.labelled_by);
|
|
158
|
+
if (accessibilityLabelledBy != null) {
|
|
159
|
+
mAccessibilityLabelledBy =
|
|
160
|
+
ReactFindViewUtil.findView(host.getRootView(), (String) accessibilityLabelledBy);
|
|
161
|
+
if (mAccessibilityLabelledBy != null) {
|
|
162
|
+
info.setLabeledBy(mAccessibilityLabelledBy);
|
|
176
163
|
}
|
|
177
|
-
return null;
|
|
178
164
|
}
|
|
179
|
-
}
|
|
180
165
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
NONE,
|
|
189
|
-
BUTTON,
|
|
190
|
-
DROPDOWNLIST,
|
|
191
|
-
TOGGLEBUTTON,
|
|
192
|
-
LINK,
|
|
193
|
-
SEARCH,
|
|
194
|
-
IMAGE,
|
|
195
|
-
IMAGEBUTTON,
|
|
196
|
-
KEYBOARDKEY,
|
|
197
|
-
TEXT,
|
|
198
|
-
ADJUSTABLE,
|
|
199
|
-
SUMMARY,
|
|
200
|
-
HEADER,
|
|
201
|
-
ALERT,
|
|
202
|
-
CHECKBOX,
|
|
203
|
-
COMBOBOX,
|
|
204
|
-
MENU,
|
|
205
|
-
MENUBAR,
|
|
206
|
-
MENUITEM,
|
|
207
|
-
PROGRESSBAR,
|
|
208
|
-
RADIO,
|
|
209
|
-
RADIOGROUP,
|
|
210
|
-
SCROLLBAR,
|
|
211
|
-
SPINBUTTON,
|
|
212
|
-
SWITCH,
|
|
213
|
-
TAB,
|
|
214
|
-
TABLIST,
|
|
215
|
-
TIMER,
|
|
216
|
-
LIST,
|
|
217
|
-
GRID,
|
|
218
|
-
PAGER,
|
|
219
|
-
SCROLLVIEW,
|
|
220
|
-
HORIZONTALSCROLLVIEW,
|
|
221
|
-
VIEWGROUP,
|
|
222
|
-
WEBVIEW,
|
|
223
|
-
DRAWERLAYOUT,
|
|
224
|
-
SLIDINGDRAWER,
|
|
225
|
-
ICONMENU,
|
|
226
|
-
TOOLBAR;
|
|
227
|
-
|
|
228
|
-
public static String getValue(AccessibilityRole role) {
|
|
229
|
-
switch (role) {
|
|
230
|
-
case BUTTON:
|
|
231
|
-
return "android.widget.Button";
|
|
232
|
-
case DROPDOWNLIST:
|
|
233
|
-
return "android.widget.Spinner";
|
|
234
|
-
case TOGGLEBUTTON:
|
|
235
|
-
return "android.widget.ToggleButton";
|
|
236
|
-
case SEARCH:
|
|
237
|
-
return "android.widget.EditText";
|
|
238
|
-
case IMAGE:
|
|
239
|
-
return "android.widget.ImageView";
|
|
240
|
-
case IMAGEBUTTON:
|
|
241
|
-
return "android.widget.ImageButton";
|
|
242
|
-
case KEYBOARDKEY:
|
|
243
|
-
return "android.inputmethodservice.Keyboard$Key";
|
|
244
|
-
case TEXT:
|
|
245
|
-
return "android.widget.TextView";
|
|
246
|
-
case ADJUSTABLE:
|
|
247
|
-
return "android.widget.SeekBar";
|
|
248
|
-
case CHECKBOX:
|
|
249
|
-
return "android.widget.CheckBox";
|
|
250
|
-
case RADIO:
|
|
251
|
-
return "android.widget.RadioButton";
|
|
252
|
-
case SPINBUTTON:
|
|
253
|
-
return "android.widget.SpinButton";
|
|
254
|
-
case SWITCH:
|
|
255
|
-
return "android.widget.Switch";
|
|
256
|
-
case LIST:
|
|
257
|
-
return "android.widget.AbsListView";
|
|
258
|
-
case GRID:
|
|
259
|
-
return "android.widget.GridView";
|
|
260
|
-
case SCROLLVIEW:
|
|
261
|
-
return "android.widget.ScrollView";
|
|
262
|
-
case HORIZONTALSCROLLVIEW:
|
|
263
|
-
return "android.widget.HorizontalScrollView";
|
|
264
|
-
case PAGER:
|
|
265
|
-
return "androidx.viewpager.widget.ViewPager";
|
|
266
|
-
case DRAWERLAYOUT:
|
|
267
|
-
return "androidx.drawerlayout.widget.DrawerLayout";
|
|
268
|
-
case SLIDINGDRAWER:
|
|
269
|
-
return "android.widget.SlidingDrawer";
|
|
270
|
-
case ICONMENU:
|
|
271
|
-
return "com.android.internal.view.menu.IconMenuView";
|
|
272
|
-
case VIEWGROUP:
|
|
273
|
-
return "android.view.ViewGroup";
|
|
274
|
-
case WEBVIEW:
|
|
275
|
-
return "android.webkit.WebView";
|
|
276
|
-
case NONE:
|
|
277
|
-
case LINK:
|
|
278
|
-
case SUMMARY:
|
|
279
|
-
case HEADER:
|
|
280
|
-
case ALERT:
|
|
281
|
-
case COMBOBOX:
|
|
282
|
-
case MENU:
|
|
283
|
-
case MENUBAR:
|
|
284
|
-
case MENUITEM:
|
|
285
|
-
case PROGRESSBAR:
|
|
286
|
-
case RADIOGROUP:
|
|
287
|
-
case SCROLLBAR:
|
|
288
|
-
case TAB:
|
|
289
|
-
case TABLIST:
|
|
290
|
-
case TIMER:
|
|
291
|
-
case TOOLBAR:
|
|
292
|
-
return "android.view.View";
|
|
293
|
-
default:
|
|
294
|
-
throw new IllegalArgumentException("Invalid accessibility role value: " + role);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
public static AccessibilityRole fromValue(@Nullable String value) {
|
|
299
|
-
if (value == null) {
|
|
300
|
-
return NONE;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
for (AccessibilityRole role : AccessibilityRole.values()) {
|
|
304
|
-
if (role.name().equalsIgnoreCase(value)) {
|
|
305
|
-
return role;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
throw new IllegalArgumentException("Invalid accessibility role value: " + value);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
public static @Nullable AccessibilityRole fromRole(Role role) {
|
|
312
|
-
switch (role) {
|
|
313
|
-
case ALERT:
|
|
314
|
-
return AccessibilityRole.ALERT;
|
|
315
|
-
case BUTTON:
|
|
316
|
-
return AccessibilityRole.BUTTON;
|
|
317
|
-
case CHECKBOX:
|
|
318
|
-
return AccessibilityRole.CHECKBOX;
|
|
319
|
-
case COMBOBOX:
|
|
320
|
-
return AccessibilityRole.COMBOBOX;
|
|
321
|
-
case GRID:
|
|
322
|
-
return AccessibilityRole.GRID;
|
|
323
|
-
case HEADING:
|
|
324
|
-
return AccessibilityRole.HEADER;
|
|
325
|
-
case IMG:
|
|
326
|
-
return AccessibilityRole.IMAGE;
|
|
327
|
-
case LINK:
|
|
328
|
-
return AccessibilityRole.LINK;
|
|
329
|
-
case LIST:
|
|
330
|
-
return AccessibilityRole.LIST;
|
|
331
|
-
case MENU:
|
|
332
|
-
return AccessibilityRole.MENU;
|
|
333
|
-
case MENUBAR:
|
|
334
|
-
return AccessibilityRole.MENUBAR;
|
|
335
|
-
case MENUITEM:
|
|
336
|
-
return AccessibilityRole.MENUITEM;
|
|
337
|
-
case NONE:
|
|
338
|
-
return AccessibilityRole.NONE;
|
|
339
|
-
case PROGRESSBAR:
|
|
340
|
-
return AccessibilityRole.PROGRESSBAR;
|
|
341
|
-
case RADIO:
|
|
342
|
-
return AccessibilityRole.RADIO;
|
|
343
|
-
case RADIOGROUP:
|
|
344
|
-
return AccessibilityRole.RADIOGROUP;
|
|
345
|
-
case SCROLLBAR:
|
|
346
|
-
return AccessibilityRole.SCROLLBAR;
|
|
347
|
-
case SEARCHBOX:
|
|
348
|
-
return AccessibilityRole.SEARCH;
|
|
349
|
-
case SLIDER:
|
|
350
|
-
return AccessibilityRole.ADJUSTABLE;
|
|
351
|
-
case SPINBUTTON:
|
|
352
|
-
return AccessibilityRole.SPINBUTTON;
|
|
353
|
-
case SUMMARY:
|
|
354
|
-
return AccessibilityRole.SUMMARY;
|
|
355
|
-
case SWITCH:
|
|
356
|
-
return AccessibilityRole.SWITCH;
|
|
357
|
-
case TAB:
|
|
358
|
-
return AccessibilityRole.TAB;
|
|
359
|
-
case TABLIST:
|
|
360
|
-
return AccessibilityRole.TABLIST;
|
|
361
|
-
case TIMER:
|
|
362
|
-
return AccessibilityRole.TIMER;
|
|
363
|
-
case TOOLBAR:
|
|
364
|
-
return AccessibilityRole.TOOLBAR;
|
|
365
|
-
default:
|
|
366
|
-
// No mapping from ARIA role to AccessibilityRole
|
|
367
|
-
return null;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
public static @Nullable AccessibilityRole fromViewTag(View view) {
|
|
372
|
-
Role role = (Role) view.getTag(R.id.role);
|
|
373
|
-
if (role != null) {
|
|
374
|
-
return AccessibilityRole.fromRole(role);
|
|
375
|
-
} else {
|
|
376
|
-
return (AccessibilityRole) view.getTag(R.id.accessibility_role);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
private final HashMap<Integer, String> mAccessibilityActionsMap;
|
|
382
|
-
|
|
383
|
-
// State constants for states which have analogs in AccessibilityNodeInfo
|
|
384
|
-
|
|
385
|
-
private static final String STATE_DISABLED = "disabled";
|
|
386
|
-
private static final String STATE_SELECTED = "selected";
|
|
387
|
-
private static final String STATE_CHECKED = "checked";
|
|
388
|
-
|
|
389
|
-
public ReactAccessibilityDelegate(
|
|
390
|
-
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
391
|
-
super(view);
|
|
392
|
-
mView = view;
|
|
393
|
-
mAccessibilityActionsMap = new HashMap<Integer, String>();
|
|
394
|
-
mHandler =
|
|
395
|
-
new Handler() {
|
|
396
|
-
@Override
|
|
397
|
-
public void handleMessage(Message msg) {
|
|
398
|
-
View host = (View) msg.obj;
|
|
399
|
-
host.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
// We need to reset these two properties, as ExploreByTouchHelper sets focusable to "true" and
|
|
404
|
-
// importantForAccessibility to "Yes" (if it is Auto). If we don't reset these it would force
|
|
405
|
-
// every element that has this delegate attached to be focusable, and not allow for
|
|
406
|
-
// announcement coalescing.
|
|
407
|
-
mView.setFocusable(originalFocus);
|
|
408
|
-
ViewCompat.setImportantForAccessibility(mView, originalImportantForAccessibility);
|
|
409
|
-
mAccessibilityLinks = (AccessibilityLinks) mView.getTag(R.id.accessibility_links);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
@Nullable View mAccessibilityLabelledBy;
|
|
413
|
-
|
|
414
|
-
@Override
|
|
415
|
-
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
|
|
416
|
-
super.onInitializeAccessibilityNodeInfo(host, info);
|
|
417
|
-
if (host.getTag(R.id.accessibility_state_expanded) != null) {
|
|
418
|
-
final boolean accessibilityStateExpanded =
|
|
419
|
-
(boolean) host.getTag(R.id.accessibility_state_expanded);
|
|
420
|
-
info.addAction(
|
|
421
|
-
accessibilityStateExpanded
|
|
422
|
-
? AccessibilityNodeInfoCompat.ACTION_COLLAPSE
|
|
423
|
-
: AccessibilityNodeInfoCompat.ACTION_EXPAND);
|
|
424
|
-
}
|
|
425
|
-
final AccessibilityRole accessibilityRole = AccessibilityRole.fromViewTag(host);
|
|
426
|
-
final String accessibilityHint = (String) host.getTag(R.id.accessibility_hint);
|
|
427
|
-
if (accessibilityRole != null) {
|
|
428
|
-
setRole(info, accessibilityRole, host.getContext());
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
if (accessibilityHint != null) {
|
|
432
|
-
info.setTooltipText(accessibilityHint);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
final Object accessibilityLabelledBy = host.getTag(R.id.labelled_by);
|
|
436
|
-
if (accessibilityLabelledBy != null) {
|
|
437
|
-
mAccessibilityLabelledBy =
|
|
438
|
-
ReactFindViewUtil.findView(host.getRootView(), (String) accessibilityLabelledBy);
|
|
439
|
-
if (mAccessibilityLabelledBy != null) {
|
|
440
|
-
info.setLabeledBy(mAccessibilityLabelledBy);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// state is changeable.
|
|
445
|
-
final ReadableMap accessibilityState = (ReadableMap) host.getTag(R.id.accessibility_state);
|
|
446
|
-
if (accessibilityState != null) {
|
|
447
|
-
setState(info, accessibilityState, host.getContext());
|
|
448
|
-
}
|
|
449
|
-
final ReadableArray accessibilityActions =
|
|
450
|
-
(ReadableArray) host.getTag(R.id.accessibility_actions);
|
|
166
|
+
// state is changeable.
|
|
167
|
+
final ReadableMap accessibilityState = (ReadableMap) host.getTag(R.id.accessibility_state);
|
|
168
|
+
if (accessibilityState != null) {
|
|
169
|
+
setState(info, accessibilityState, host.getContext());
|
|
170
|
+
}
|
|
171
|
+
final ReadableArray accessibilityActions =
|
|
172
|
+
(ReadableArray) host.getTag(R.id.accessibility_actions);
|
|
451
173
|
|
|
452
174
|
final ReadableMap accessibilityCollectionItem =
|
|
453
175
|
(ReadableMap) host.getTag(R.id.accessibility_collection_item);
|
|
@@ -622,7 +344,6 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
622
344
|
final AccessibilityRole accessibilityRole =
|
|
623
345
|
(AccessibilityRole) host.getTag(R.id.accessibility_role);
|
|
624
346
|
final ReadableMap accessibilityValue = (ReadableMap) host.getTag(R.id.accessibility_value);
|
|
625
|
-
|
|
626
347
|
if (accessibilityRole == AccessibilityRole.ADJUSTABLE
|
|
627
348
|
&& (action == AccessibilityActionCompat.ACTION_SCROLL_FORWARD.getId()
|
|
628
349
|
|| action == AccessibilityActionCompat.ACTION_SCROLL_BACKWARD.getId())) {
|
|
@@ -631,18 +352,29 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
631
352
|
}
|
|
632
353
|
return super.performAccessibilityAction(host, action, args);
|
|
633
354
|
}
|
|
634
|
-
|
|
635
355
|
// When checking the accessibility focus action, we don't want to intercept the native event
|
|
636
356
|
// otherwise it would intercept the change of focus
|
|
637
357
|
if (action == AccessibilityActionCompat.ACTION_ACCESSIBILITY_FOCUS.getId()) {
|
|
638
358
|
return super.performAccessibilityAction(host, action, args);
|
|
639
359
|
}
|
|
640
|
-
|
|
641
360
|
return true;
|
|
642
361
|
}
|
|
643
362
|
return super.performAccessibilityAction(host, action, args);
|
|
644
363
|
}
|
|
645
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Schedule a command for sending an accessibility event. </br> Note: A command is used to ensure
|
|
367
|
+
* that accessibility events are sent at most one in a given time frame to save system resources
|
|
368
|
+
* while the progress changes quickly.
|
|
369
|
+
*/
|
|
370
|
+
private void scheduleAccessibilityEventSender(View host) {
|
|
371
|
+
if (mHandler.hasMessages(SEND_EVENT, host)) {
|
|
372
|
+
mHandler.removeMessages(SEND_EVENT, host);
|
|
373
|
+
}
|
|
374
|
+
Message msg = mHandler.obtainMessage(SEND_EVENT, host);
|
|
375
|
+
mHandler.sendMessageDelayed(msg, TIMEOUT_SEND_ACCESSIBILITY_EVENT);
|
|
376
|
+
}
|
|
377
|
+
|
|
646
378
|
private static void setState(
|
|
647
379
|
AccessibilityNodeInfoCompat info, ReadableMap accessibilityState, Context context) {
|
|
648
380
|
final ReadableMapKeySetIterator i = accessibilityState.keySetIterator();
|
|
@@ -661,10 +393,7 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
661
393
|
}
|
|
662
394
|
}
|
|
663
395
|
|
|
664
|
-
/** Strings for setting the Role Description in english */
|
|
665
|
-
|
|
666
396
|
// TODO: Eventually support for other languages on talkback
|
|
667
|
-
|
|
668
397
|
public static void setRole(
|
|
669
398
|
AccessibilityNodeInfoCompat nodeInfo, AccessibilityRole role, final Context context) {
|
|
670
399
|
if (role == null) {
|
|
@@ -716,173 +445,20 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
716
445
|
}
|
|
717
446
|
}
|
|
718
447
|
|
|
719
|
-
public static void setDelegate(
|
|
720
|
-
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
721
|
-
// if a view already has an accessibility delegate, replacing it could cause
|
|
722
|
-
// problems,
|
|
723
|
-
// so leave it alone.
|
|
724
|
-
if (!ViewCompat.hasAccessibilityDelegate(view)
|
|
725
|
-
&& (view.getTag(R.id.accessibility_role) != null
|
|
726
|
-
|| view.getTag(R.id.accessibility_state) != null
|
|
727
|
-
|| view.getTag(R.id.accessibility_actions) != null
|
|
728
|
-
|| view.getTag(R.id.react_test_id) != null
|
|
729
|
-
|| view.getTag(R.id.accessibility_collection_item) != null
|
|
730
|
-
|| view.getTag(R.id.accessibility_links) != null
|
|
731
|
-
|| view.getTag(R.id.role) != null)) {
|
|
732
|
-
ViewCompat.setAccessibilityDelegate(
|
|
733
|
-
view,
|
|
734
|
-
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
// Explicitly re-set the delegate, even if one has already been set.
|
|
739
|
-
public static void resetDelegate(
|
|
740
|
-
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
741
|
-
ViewCompat.setAccessibilityDelegate(
|
|
742
|
-
view,
|
|
743
|
-
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
744
|
-
}
|
|
745
|
-
|
|
746
448
|
@Override
|
|
747
449
|
protected int getVirtualViewAt(float x, float y) {
|
|
748
|
-
|
|
749
|
-
|| mAccessibilityLinks.size() == 0
|
|
750
|
-
|| !(mView instanceof TextView)) {
|
|
751
|
-
return INVALID_ID;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
TextView textView = (TextView) mView;
|
|
755
|
-
if (!(textView.getText() instanceof Spanned)) {
|
|
756
|
-
return INVALID_ID;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
Layout layout = textView.getLayout();
|
|
760
|
-
if (layout == null) {
|
|
761
|
-
return INVALID_ID;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
x -= textView.getTotalPaddingLeft();
|
|
765
|
-
y -= textView.getTotalPaddingTop();
|
|
766
|
-
x += textView.getScrollX();
|
|
767
|
-
y += textView.getScrollY();
|
|
768
|
-
|
|
769
|
-
int line = layout.getLineForVertical((int) y);
|
|
770
|
-
int charOffset = layout.getOffsetForHorizontal(line, x);
|
|
771
|
-
|
|
772
|
-
ClickableSpan clickableSpan = getFirstSpan(charOffset, charOffset, ClickableSpan.class);
|
|
773
|
-
if (clickableSpan == null) {
|
|
774
|
-
return INVALID_ID;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
Spanned spanned = (Spanned) textView.getText();
|
|
778
|
-
int start = spanned.getSpanStart(clickableSpan);
|
|
779
|
-
int end = spanned.getSpanEnd(clickableSpan);
|
|
780
|
-
|
|
781
|
-
final AccessibilityLinks.AccessibleLink link = mAccessibilityLinks.getLinkBySpanPos(start, end);
|
|
782
|
-
return link != null ? link.id : INVALID_ID;
|
|
450
|
+
return INVALID_ID;
|
|
783
451
|
}
|
|
784
452
|
|
|
785
453
|
@Override
|
|
786
|
-
protected void getVisibleVirtualViews(List<Integer> virtualViewIds) {
|
|
787
|
-
if (mAccessibilityLinks == null) {
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
for (int i = 0; i < mAccessibilityLinks.size(); i++) {
|
|
792
|
-
virtualViewIds.add(i);
|
|
793
|
-
}
|
|
794
|
-
}
|
|
454
|
+
protected void getVisibleVirtualViews(List<Integer> virtualViewIds) {}
|
|
795
455
|
|
|
796
456
|
@Override
|
|
797
457
|
protected void onPopulateNodeForVirtualView(
|
|
798
458
|
int virtualViewId, @NonNull AccessibilityNodeInfoCompat node) {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
if (mAccessibilityLinks == null) {
|
|
803
|
-
node.setContentDescription("");
|
|
804
|
-
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
805
|
-
return;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
final AccessibilityLinks.AccessibleLink accessibleTextSpan =
|
|
809
|
-
mAccessibilityLinks.getLinkById(virtualViewId);
|
|
810
|
-
if (accessibleTextSpan == null) {
|
|
811
|
-
node.setContentDescription("");
|
|
812
|
-
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
813
|
-
return;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
// NOTE: The span may not actually have visible bounds within its parent,
|
|
817
|
-
// due to line limits, etc.
|
|
818
|
-
final Rect bounds = getBoundsInParent(accessibleTextSpan);
|
|
819
|
-
if (bounds == null) {
|
|
820
|
-
node.setContentDescription("");
|
|
821
|
-
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
822
|
-
return;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
node.setContentDescription(accessibleTextSpan.description);
|
|
826
|
-
node.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK);
|
|
827
|
-
node.setBoundsInParent(bounds);
|
|
828
|
-
node.setRoleDescription(mView.getResources().getString(R.string.link_description));
|
|
829
|
-
node.setClassName(AccessibilityRole.getValue(AccessibilityRole.BUTTON));
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
private Rect getBoundsInParent(AccessibilityLinks.AccessibleLink accessibleLink) {
|
|
833
|
-
// This view is not a text view, so return the entire views bounds.
|
|
834
|
-
if (!(mView instanceof TextView)) {
|
|
835
|
-
return new Rect(0, 0, mView.getWidth(), mView.getHeight());
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
TextView textView = (TextView) mView;
|
|
839
|
-
Layout textViewLayout = textView.getLayout();
|
|
840
|
-
if (textViewLayout == null) {
|
|
841
|
-
return new Rect(0, 0, textView.getWidth(), textView.getHeight());
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
double startOffset = accessibleLink.start;
|
|
845
|
-
double endOffset = accessibleLink.end;
|
|
846
|
-
|
|
847
|
-
// Ensure the link hasn't been ellipsized away; in such cases,
|
|
848
|
-
// getPrimaryHorizontal will crash (and the link isn't rendered anyway).
|
|
849
|
-
int startOffsetLineNumber = textViewLayout.getLineForOffset((int) startOffset);
|
|
850
|
-
int lineEndOffset = textViewLayout.getLineEnd(startOffsetLineNumber);
|
|
851
|
-
if (startOffset > lineEndOffset) {
|
|
852
|
-
return null;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
Rect rootRect = new Rect();
|
|
856
|
-
|
|
857
|
-
double startXCoordinates = textViewLayout.getPrimaryHorizontal((int) startOffset);
|
|
858
|
-
|
|
859
|
-
final Paint paint = new Paint();
|
|
860
|
-
AbsoluteSizeSpan sizeSpan =
|
|
861
|
-
getFirstSpan(accessibleLink.start, accessibleLink.end, AbsoluteSizeSpan.class);
|
|
862
|
-
float textSize = sizeSpan != null ? sizeSpan.getSize() : textView.getTextSize();
|
|
863
|
-
paint.setTextSize(textSize);
|
|
864
|
-
int textWidth = (int) Math.ceil(paint.measureText(accessibleLink.description));
|
|
865
|
-
|
|
866
|
-
int endOffsetLineNumber = textViewLayout.getLineForOffset((int) endOffset);
|
|
867
|
-
boolean isMultiline = startOffsetLineNumber != endOffsetLineNumber;
|
|
868
|
-
textViewLayout.getLineBounds(startOffsetLineNumber, rootRect);
|
|
869
|
-
|
|
870
|
-
int verticalOffset = textView.getScrollY() + textView.getTotalPaddingTop();
|
|
871
|
-
rootRect.top += verticalOffset;
|
|
872
|
-
rootRect.bottom += verticalOffset;
|
|
873
|
-
rootRect.left += startXCoordinates + textView.getTotalPaddingLeft() - textView.getScrollX();
|
|
874
|
-
|
|
875
|
-
// The bounds for multi-line strings should *only* include the first line. This is because for
|
|
876
|
-
// API 25 and below, Talkback's click is triggered at the center point of these bounds, and if
|
|
877
|
-
// that center point is outside the spannable, it will click on something else. There is no
|
|
878
|
-
// harm in not outlining the wrapped part of the string, as the text for the whole string will
|
|
879
|
-
// be read regardless of the bounding box.
|
|
880
|
-
if (isMultiline) {
|
|
881
|
-
return new Rect(rootRect.left, rootRect.top, rootRect.right, rootRect.bottom);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
return new Rect(rootRect.left, rootRect.top, rootRect.left + textWidth, rootRect.bottom);
|
|
885
|
-
}
|
|
459
|
+
node.setContentDescription("");
|
|
460
|
+
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
461
|
+
}
|
|
886
462
|
|
|
887
463
|
@Override
|
|
888
464
|
protected boolean onPerformActionForVirtualView(
|
|
@@ -890,97 +466,17 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
890
466
|
return false;
|
|
891
467
|
}
|
|
892
468
|
|
|
893
|
-
protected @Nullable <T> T getFirstSpan(int start, int end, Class<T> classType) {
|
|
894
|
-
if (!(mView instanceof TextView) || !(((TextView) mView).getText() instanceof Spanned)) {
|
|
895
|
-
return null;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
Spanned spanned = (Spanned) ((TextView) mView).getText();
|
|
899
|
-
T[] spans = spanned.getSpans(start, end, classType);
|
|
900
|
-
return spans.length > 0 ? spans[0] : null;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
public static class AccessibilityLinks {
|
|
904
|
-
private final List<AccessibleLink> mLinks;
|
|
905
|
-
|
|
906
|
-
public AccessibilityLinks(ClickableSpan[] spans, Spannable text) {
|
|
907
|
-
ArrayList<AccessibleLink> links = new ArrayList<>();
|
|
908
|
-
for (int i = 0; i < spans.length; i++) {
|
|
909
|
-
ClickableSpan span = spans[i];
|
|
910
|
-
int start = text.getSpanStart(span);
|
|
911
|
-
int end = text.getSpanEnd(span);
|
|
912
|
-
// zero length spans, and out of range spans should not be included.
|
|
913
|
-
if (start == end || start < 0 || end < 0 || start > text.length() || end > text.length()) {
|
|
914
|
-
continue;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
final AccessibleLink link = new AccessibleLink();
|
|
918
|
-
link.description = text.subSequence(start, end).toString();
|
|
919
|
-
link.start = start;
|
|
920
|
-
link.end = end;
|
|
921
|
-
|
|
922
|
-
// ID is the reverse of what is expected, since the ClickableSpans are returned in reverse
|
|
923
|
-
// order due to being added in reverse order. If we don't do this, focus will move to the
|
|
924
|
-
// last link first and move backwards.
|
|
925
|
-
//
|
|
926
|
-
// If this approach becomes unreliable, we should instead look at their start position and
|
|
927
|
-
// order them manually.
|
|
928
|
-
link.id = spans.length - 1 - i;
|
|
929
|
-
links.add(link);
|
|
930
|
-
}
|
|
931
|
-
mLinks = links;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
@Nullable
|
|
935
|
-
public AccessibleLink getLinkById(int id) {
|
|
936
|
-
for (AccessibleLink link : mLinks) {
|
|
937
|
-
if (link.id == id) {
|
|
938
|
-
return link;
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
return null;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
@Nullable
|
|
946
|
-
public AccessibleLink getLinkBySpanPos(int start, int end) {
|
|
947
|
-
for (AccessibleLink link : mLinks) {
|
|
948
|
-
if (link.start == start && link.end == end) {
|
|
949
|
-
return link;
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
return null;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
public int size() {
|
|
957
|
-
return mLinks.size();
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
private static class AccessibleLink {
|
|
961
|
-
public String description;
|
|
962
|
-
public int start;
|
|
963
|
-
public int end;
|
|
964
|
-
public int id;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
469
|
@Override
|
|
969
470
|
public @Nullable AccessibilityNodeProviderCompat getAccessibilityNodeProvider(View host) {
|
|
970
|
-
// Only set a NodeProvider if we have virtual views, otherwise just return null here so that
|
|
971
|
-
// we fall back to the View class's default behavior. If we don't do this, then Views with
|
|
972
|
-
// no virtual children will fall back to using ExploreByTouchHelper's onPopulateNodeForHost
|
|
973
|
-
// method to populate their AccessibilityNodeInfo, which defaults to doing nothing, so no
|
|
974
|
-
// AccessibilityNodeInfo will be created. Alternatively, we could override
|
|
975
|
-
// onPopulateNodeForHost instead, and have it create an AccessibilityNodeInfo for the host
|
|
976
|
-
// but this is what the default View class does by itself, so we may as well defer to it.
|
|
977
|
-
if (mAccessibilityLinks != null) {
|
|
978
|
-
return super.getAccessibilityNodeProvider(host);
|
|
979
|
-
}
|
|
980
|
-
|
|
981
471
|
return null;
|
|
982
472
|
}
|
|
983
473
|
|
|
474
|
+
// This exists so classes that extend this can properly call super's impl of this method while
|
|
475
|
+
// still being able to override it properly for this class
|
|
476
|
+
public @Nullable AccessibilityNodeProviderCompat superGetAccessibilityNodeProvider(View host) {
|
|
477
|
+
return super.getAccessibilityNodeProvider(host);
|
|
478
|
+
}
|
|
479
|
+
|
|
984
480
|
/**
|
|
985
481
|
* Determines if the supplied {@link View} and {@link AccessibilityNodeInfoCompat} has any
|
|
986
482
|
* children which are not independently accessibility focusable and also have a spoken
|
|
@@ -1224,11 +720,8 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
1224
720
|
return talkbackSegments;
|
|
1225
721
|
}
|
|
1226
722
|
|
|
1227
|
-
//
|
|
723
|
+
// TextView
|
|
1228
724
|
if (hasNodeText) {
|
|
1229
|
-
// skipped status checks above for EditText
|
|
1230
|
-
|
|
1231
|
-
// description
|
|
1232
725
|
talkbackSegments.append(nodeText);
|
|
1233
726
|
return talkbackSegments;
|
|
1234
727
|
}
|
|
@@ -1271,4 +764,285 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
1271
764
|
}
|
|
1272
765
|
return builder.toString();
|
|
1273
766
|
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* An ARIA Role representable by View's `role` prop. Ordinals should be kept in sync with
|
|
770
|
+
* `facebook::react::Role`.
|
|
771
|
+
*/
|
|
772
|
+
public enum Role {
|
|
773
|
+
ALERT,
|
|
774
|
+
ALERTDIALOG,
|
|
775
|
+
APPLICATION,
|
|
776
|
+
ARTICLE,
|
|
777
|
+
BANNER,
|
|
778
|
+
BUTTON,
|
|
779
|
+
CELL,
|
|
780
|
+
CHECKBOX,
|
|
781
|
+
COLUMNHEADER,
|
|
782
|
+
COMBOBOX,
|
|
783
|
+
COMPLEMENTARY,
|
|
784
|
+
CONTENTINFO,
|
|
785
|
+
DEFINITION,
|
|
786
|
+
DIALOG,
|
|
787
|
+
DIRECTORY,
|
|
788
|
+
DOCUMENT,
|
|
789
|
+
FEED,
|
|
790
|
+
FIGURE,
|
|
791
|
+
FORM,
|
|
792
|
+
GRID,
|
|
793
|
+
GROUP,
|
|
794
|
+
HEADING,
|
|
795
|
+
IMG,
|
|
796
|
+
LINK,
|
|
797
|
+
LIST,
|
|
798
|
+
LISTITEM,
|
|
799
|
+
LOG,
|
|
800
|
+
MAIN,
|
|
801
|
+
MARQUEE,
|
|
802
|
+
MATH,
|
|
803
|
+
MENU,
|
|
804
|
+
MENUBAR,
|
|
805
|
+
MENUITEM,
|
|
806
|
+
METER,
|
|
807
|
+
NAVIGATION,
|
|
808
|
+
NONE,
|
|
809
|
+
NOTE,
|
|
810
|
+
OPTION,
|
|
811
|
+
PRESENTATION,
|
|
812
|
+
PROGRESSBAR,
|
|
813
|
+
RADIO,
|
|
814
|
+
RADIOGROUP,
|
|
815
|
+
REGION,
|
|
816
|
+
ROW,
|
|
817
|
+
ROWGROUP,
|
|
818
|
+
ROWHEADER,
|
|
819
|
+
SCROLLBAR,
|
|
820
|
+
SEARCHBOX,
|
|
821
|
+
SEPARATOR,
|
|
822
|
+
SLIDER,
|
|
823
|
+
SPINBUTTON,
|
|
824
|
+
STATUS,
|
|
825
|
+
SUMMARY,
|
|
826
|
+
SWITCH,
|
|
827
|
+
TAB,
|
|
828
|
+
TABLE,
|
|
829
|
+
TABLIST,
|
|
830
|
+
TABPANEL,
|
|
831
|
+
TERM,
|
|
832
|
+
TIMER,
|
|
833
|
+
TOOLBAR,
|
|
834
|
+
TOOLTIP,
|
|
835
|
+
TREE,
|
|
836
|
+
TREEGRID,
|
|
837
|
+
TREEITEM;
|
|
838
|
+
|
|
839
|
+
public static @Nullable Role fromValue(@Nullable String value) {
|
|
840
|
+
for (Role role : Role.values()) {
|
|
841
|
+
if (role.name().equalsIgnoreCase(value)) {
|
|
842
|
+
return role;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* These roles are defined by Google's TalkBack screen reader, and this list should be kept up to
|
|
851
|
+
* date with their implementation. Details can be seen in their source code here:
|
|
852
|
+
*
|
|
853
|
+
* <p>https://github.com/google/talkback/blob/master/utils/src/main/java/Role.java
|
|
854
|
+
*/
|
|
855
|
+
public enum AccessibilityRole {
|
|
856
|
+
NONE,
|
|
857
|
+
BUTTON,
|
|
858
|
+
DROPDOWNLIST,
|
|
859
|
+
TOGGLEBUTTON,
|
|
860
|
+
LINK,
|
|
861
|
+
SEARCH,
|
|
862
|
+
IMAGE,
|
|
863
|
+
IMAGEBUTTON,
|
|
864
|
+
KEYBOARDKEY,
|
|
865
|
+
TEXT,
|
|
866
|
+
ADJUSTABLE,
|
|
867
|
+
SUMMARY,
|
|
868
|
+
HEADER,
|
|
869
|
+
ALERT,
|
|
870
|
+
CHECKBOX,
|
|
871
|
+
COMBOBOX,
|
|
872
|
+
MENU,
|
|
873
|
+
MENUBAR,
|
|
874
|
+
MENUITEM,
|
|
875
|
+
PROGRESSBAR,
|
|
876
|
+
RADIO,
|
|
877
|
+
RADIOGROUP,
|
|
878
|
+
SCROLLBAR,
|
|
879
|
+
SPINBUTTON,
|
|
880
|
+
SWITCH,
|
|
881
|
+
TAB,
|
|
882
|
+
TABLIST,
|
|
883
|
+
TIMER,
|
|
884
|
+
LIST,
|
|
885
|
+
GRID,
|
|
886
|
+
PAGER,
|
|
887
|
+
SCROLLVIEW,
|
|
888
|
+
HORIZONTALSCROLLVIEW,
|
|
889
|
+
VIEWGROUP,
|
|
890
|
+
WEBVIEW,
|
|
891
|
+
DRAWERLAYOUT,
|
|
892
|
+
SLIDINGDRAWER,
|
|
893
|
+
ICONMENU,
|
|
894
|
+
TOOLBAR;
|
|
895
|
+
|
|
896
|
+
public static String getValue(AccessibilityRole role) {
|
|
897
|
+
switch (role) {
|
|
898
|
+
case BUTTON:
|
|
899
|
+
return "android.widget.Button";
|
|
900
|
+
case DROPDOWNLIST:
|
|
901
|
+
return "android.widget.Spinner";
|
|
902
|
+
case TOGGLEBUTTON:
|
|
903
|
+
return "android.widget.ToggleButton";
|
|
904
|
+
case SEARCH:
|
|
905
|
+
return "android.widget.EditText";
|
|
906
|
+
case IMAGE:
|
|
907
|
+
return "android.widget.ImageView";
|
|
908
|
+
case IMAGEBUTTON:
|
|
909
|
+
return "android.widget.ImageButton";
|
|
910
|
+
case KEYBOARDKEY:
|
|
911
|
+
return "android.inputmethodservice.Keyboard$Key";
|
|
912
|
+
case TEXT:
|
|
913
|
+
return "android.widget.TextView";
|
|
914
|
+
case ADJUSTABLE:
|
|
915
|
+
return "android.widget.SeekBar";
|
|
916
|
+
case CHECKBOX:
|
|
917
|
+
return "android.widget.CheckBox";
|
|
918
|
+
case RADIO:
|
|
919
|
+
return "android.widget.RadioButton";
|
|
920
|
+
case SPINBUTTON:
|
|
921
|
+
return "android.widget.SpinButton";
|
|
922
|
+
case SWITCH:
|
|
923
|
+
return "android.widget.Switch";
|
|
924
|
+
case LIST:
|
|
925
|
+
return "android.widget.AbsListView";
|
|
926
|
+
case GRID:
|
|
927
|
+
return "android.widget.GridView";
|
|
928
|
+
case SCROLLVIEW:
|
|
929
|
+
return "android.widget.ScrollView";
|
|
930
|
+
case HORIZONTALSCROLLVIEW:
|
|
931
|
+
return "android.widget.HorizontalScrollView";
|
|
932
|
+
case PAGER:
|
|
933
|
+
return "androidx.viewpager.widget.ViewPager";
|
|
934
|
+
case DRAWERLAYOUT:
|
|
935
|
+
return "androidx.drawerlayout.widget.DrawerLayout";
|
|
936
|
+
case SLIDINGDRAWER:
|
|
937
|
+
return "android.widget.SlidingDrawer";
|
|
938
|
+
case ICONMENU:
|
|
939
|
+
return "com.android.internal.view.menu.IconMenuView";
|
|
940
|
+
case VIEWGROUP:
|
|
941
|
+
return "android.view.ViewGroup";
|
|
942
|
+
case WEBVIEW:
|
|
943
|
+
return "android.webkit.WebView";
|
|
944
|
+
case NONE:
|
|
945
|
+
case LINK:
|
|
946
|
+
case SUMMARY:
|
|
947
|
+
case HEADER:
|
|
948
|
+
case ALERT:
|
|
949
|
+
case COMBOBOX:
|
|
950
|
+
case MENU:
|
|
951
|
+
case MENUBAR:
|
|
952
|
+
case MENUITEM:
|
|
953
|
+
case PROGRESSBAR:
|
|
954
|
+
case RADIOGROUP:
|
|
955
|
+
case SCROLLBAR:
|
|
956
|
+
case TAB:
|
|
957
|
+
case TABLIST:
|
|
958
|
+
case TIMER:
|
|
959
|
+
case TOOLBAR:
|
|
960
|
+
return "android.view.View";
|
|
961
|
+
default:
|
|
962
|
+
throw new IllegalArgumentException("Invalid accessibility role value: " + role);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
public static AccessibilityRole fromValue(@Nullable String value) {
|
|
967
|
+
if (value == null) {
|
|
968
|
+
return NONE;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
for (AccessibilityRole role : AccessibilityRole.values()) {
|
|
972
|
+
if (role.name().equalsIgnoreCase(value)) {
|
|
973
|
+
return role;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
throw new IllegalArgumentException("Invalid accessibility role value: " + value);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
public static @Nullable AccessibilityRole fromRole(Role role) {
|
|
980
|
+
switch (role) {
|
|
981
|
+
case ALERT:
|
|
982
|
+
return AccessibilityRole.ALERT;
|
|
983
|
+
case BUTTON:
|
|
984
|
+
return AccessibilityRole.BUTTON;
|
|
985
|
+
case CHECKBOX:
|
|
986
|
+
return AccessibilityRole.CHECKBOX;
|
|
987
|
+
case COMBOBOX:
|
|
988
|
+
return AccessibilityRole.COMBOBOX;
|
|
989
|
+
case GRID:
|
|
990
|
+
return AccessibilityRole.GRID;
|
|
991
|
+
case HEADING:
|
|
992
|
+
return AccessibilityRole.HEADER;
|
|
993
|
+
case IMG:
|
|
994
|
+
return AccessibilityRole.IMAGE;
|
|
995
|
+
case LINK:
|
|
996
|
+
return AccessibilityRole.LINK;
|
|
997
|
+
case LIST:
|
|
998
|
+
return AccessibilityRole.LIST;
|
|
999
|
+
case MENU:
|
|
1000
|
+
return AccessibilityRole.MENU;
|
|
1001
|
+
case MENUBAR:
|
|
1002
|
+
return AccessibilityRole.MENUBAR;
|
|
1003
|
+
case MENUITEM:
|
|
1004
|
+
return AccessibilityRole.MENUITEM;
|
|
1005
|
+
case NONE:
|
|
1006
|
+
return AccessibilityRole.NONE;
|
|
1007
|
+
case PROGRESSBAR:
|
|
1008
|
+
return AccessibilityRole.PROGRESSBAR;
|
|
1009
|
+
case RADIO:
|
|
1010
|
+
return AccessibilityRole.RADIO;
|
|
1011
|
+
case RADIOGROUP:
|
|
1012
|
+
return AccessibilityRole.RADIOGROUP;
|
|
1013
|
+
case SCROLLBAR:
|
|
1014
|
+
return AccessibilityRole.SCROLLBAR;
|
|
1015
|
+
case SEARCHBOX:
|
|
1016
|
+
return AccessibilityRole.SEARCH;
|
|
1017
|
+
case SLIDER:
|
|
1018
|
+
return AccessibilityRole.ADJUSTABLE;
|
|
1019
|
+
case SPINBUTTON:
|
|
1020
|
+
return AccessibilityRole.SPINBUTTON;
|
|
1021
|
+
case SUMMARY:
|
|
1022
|
+
return AccessibilityRole.SUMMARY;
|
|
1023
|
+
case SWITCH:
|
|
1024
|
+
return AccessibilityRole.SWITCH;
|
|
1025
|
+
case TAB:
|
|
1026
|
+
return AccessibilityRole.TAB;
|
|
1027
|
+
case TABLIST:
|
|
1028
|
+
return AccessibilityRole.TABLIST;
|
|
1029
|
+
case TIMER:
|
|
1030
|
+
return AccessibilityRole.TIMER;
|
|
1031
|
+
case TOOLBAR:
|
|
1032
|
+
return AccessibilityRole.TOOLBAR;
|
|
1033
|
+
default:
|
|
1034
|
+
// No mapping from ARIA role to AccessibilityRole
|
|
1035
|
+
return null;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
public static @Nullable AccessibilityRole fromViewTag(View view) {
|
|
1040
|
+
Role role = (Role) view.getTag(R.id.role);
|
|
1041
|
+
if (role != null) {
|
|
1042
|
+
return AccessibilityRole.fromRole(role);
|
|
1043
|
+
} else {
|
|
1044
|
+
return (AccessibilityRole) view.getTag(R.id.accessibility_role);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1274
1048
|
}
|