react-native-macos 0.78.6 → 0.79.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 +35 -11
- 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 +82 -78
- package/Libraries/AppDelegate/RCTAppDelegate.mm +9 -19
- 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 +22 -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 +52 -6
- package/Libraries/AppDelegate/RCTRootViewFactory.h +3 -0
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +11 -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/URL.js +14 -2
- 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 +10 -7
- 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.js +28 -73
- 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 +7 -5
- package/Libraries/Components/ScrollView/ScrollView.js +139 -134
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +17 -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/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 +9 -2
- package/Libraries/Components/TextInput/TextInput.flow.js +134 -124
- package/Libraries/Components/TextInput/TextInput.js +151 -149
- package/Libraries/Components/TextInput/TextInputNativeCommands.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.js +7 -21
- 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 +44 -23
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +102 -54
- package/Libraries/Components/Touchable/TouchableOpacity.js +57 -15
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +118 -64
- 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 +67 -255
- 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 +3 -5
- 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 +3 -35
- 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 +2 -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 +5 -7
- 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 +31 -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 +6 -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/BaseViewConfig.macos.js +1 -0
- 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 +5 -10
- package/Libraries/Network/RCTFileRequestHandler.mm +6 -11
- 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 +78 -74
- 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/RCTBackedTextInputViewProtocol.h +82 -81
- package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +1 -1
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +1 -0
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +17 -11
- package/Libraries/Text/TextNativeComponent.js +3 -3
- package/Libraries/Text/TextProps.js +176 -133
- 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 +126 -93
- 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 +7 -7
- 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 -7
- package/Libraries/Utilities/HMRClientProdShim.js +1 -1
- 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/Platform.macos.js +1 -1
- package/Libraries/Utilities/{Platform.flow.js → PlatformTypes.js} +78 -26
- package/Libraries/Utilities/PolyfillFunctions.js +3 -5
- package/Libraries/Utilities/RCTLog.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +7 -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 +4 -4
- package/Libraries/WebSocket/NativeWebSocketModule.js +2 -2
- package/Libraries/WebSocket/WebSocket.js +8 -287
- package/Libraries/WebSocket/WebSocketEvent.js +2 -2
- package/Libraries/WebSocket/WebSocketInterceptor.js +39 -11
- package/Libraries/WebSocket/WebSocket_new.js +327 -0
- package/Libraries/WebSocket/WebSocket_old.js +299 -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/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/RCTUIKit.h +0 -4
- 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 +32 -0
- package/React/Base/UIKitProxies/RCTInitialAccessibilityValuesProxy.mm +187 -0
- package/React/Base/UIKitProxies/RCTInitializeUIKitProxies.h +10 -0
- package/React/Base/UIKitProxies/RCTInitializeUIKitProxies.mm +25 -0
- package/React/Base/UIKitProxies/RCTKeyWindowValuesProxy.h +25 -0
- package/React/Base/UIKitProxies/RCTKeyWindowValuesProxy.mm +138 -0
- package/React/Base/UIKitProxies/RCTTraitCollectionProxy.h +28 -0
- package/React/Base/UIKitProxies/RCTTraitCollectionProxy.mm +82 -0
- package/React/Base/UIKitProxies/RCTWindowSafeAreaProxy.h +26 -0
- package/React/Base/UIKitProxies/RCTWindowSafeAreaProxy.mm +74 -0
- package/React/CoreModules/CoreModulesPlugins.h +0 -1
- package/React/CoreModules/CoreModulesPlugins.mm +0 -1
- package/React/CoreModules/RCTAccessibilityManager.mm +12 -10
- package/React/CoreModules/RCTAppearance.mm +4 -7
- package/React/CoreModules/RCTDevMenu.mm +0 -18
- package/React/CoreModules/RCTDevSettings.h +0 -13
- package/React/CoreModules/RCTDevSettings.mm +1 -69
- package/React/CoreModules/RCTDeviceInfo.mm +86 -50
- package/React/CoreModules/RCTEventDispatcher.mm +1 -0
- package/React/CoreModules/RCTKeyboardObserver.mm +10 -0
- package/React/CoreModules/RCTPerfMonitor.mm +5 -0
- package/React/CoreModules/RCTPlatform.mm +25 -26
- package/React/CoreModules/RCTRedBox.mm +5 -3
- package/React/CoreModules/RCTStatusBarManager.mm +6 -0
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/CxxBridge/RCTCxxBridge.mm +5 -63
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +11 -6
- package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -14
- package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +0 -2
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +205 -176
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +542 -419
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +56 -18
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +4 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +38 -19
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +3 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +30 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +4 -0
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +56 -48
- package/React/Fabric/RCTConversions.h +96 -1
- package/React/Fabric/Utils/RCTBoxShadow.h +1 -1
- package/React/Fabric/Utils/RCTBoxShadow.mm +12 -13
- 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/RCTView.h +4 -7
- package/React/Views/RCTView.m +3 -2
- package/React/Views/RCTViewManager.m +5 -7
- 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/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 +2 -22
- 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 +44 -48
- 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 +12 -8
- 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 +49 -55
- 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 +87 -97
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +18 -20
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +18 -20
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +97 -108
- 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 +22 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +18 -20
- 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/statusbar/StatusBarModule.kt +3 -16
- 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/DisplayMetricsHolder.kt +13 -0
- 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/NativeViewHierarchyManager.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java +398 -621
- 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/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 +143 -161
- 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/modal/ReactModalHostView.kt +62 -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 +38 -23
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +1 -1
- 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/ReactViewManager.kt +4 -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 +117 -131
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +25 -28
- 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 +10 -5
- package/ReactCommon/React-FabricComponents.podspec +8 -8
- package/ReactCommon/React-FabricImage.podspec +1 -5
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +6 -2
- package/ReactCommon/cxxreact/TraceSection.h +7 -4
- package/ReactCommon/hermes/React-hermes.podspec +3 -1
- 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/jsc/React-jsc.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 +1 -1
- 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 +35 -39
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +42 -47
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +159 -177
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +22 -24
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +33 -37
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +73 -82
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +11 -12
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +12 -8
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +4 -9
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h +22 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +24 -11
- 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 +42 -47
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +18 -20
- 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 +1 -6
- 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 +10 -7
- package/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +3 -2
- package/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +4 -12
- package/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.h +2 -2
- package/ReactCommon/react/renderer/components/modal/ModalHostViewUtils.mm +1 -1
- package/ReactCommon/react/renderer/components/modal/platform/android/JReactModalHostView.h +38 -0
- package/ReactCommon/react/renderer/components/modal/platform/android/ModalHostViewUtils.cpp +18 -0
- package/ReactCommon/react/renderer/components/modal/platform/cxx/ModalHostViewUtils.cpp +17 -0
- package/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt +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/AccessibilityPrimitives.h +15 -0
- 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 +15 -6
- package/ReactCommon/react/renderer/core/ShadowNode.h +6 -0
- 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/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 +1 -5
- 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 +120 -18
- 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/mounting/updateMountedFlag.cpp +6 -0
- 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.mm +5 -3
- 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 +12 -0
- 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 +36 -1
- 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 +155 -241
- package/index.js.flow +119 -0
- package/jest/mockScrollView.js +1 -1
- package/jest/setup.js +314 -264
- package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.mm +3 -1
- package/package.json +18 -15
- package/react-native.config.js +19 -2
- 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 +5 -35
- package/scripts/cocoapods/utils.rb +16 -5
- package/scripts/codegen/generate-artifacts-executor.js +198 -56
- 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/ios-configure-glog.sh +9 -0
- package/scripts/react_native_pods.rb +46 -3
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-utils.rb +4 -1
- 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 +56 -73
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +5 -7
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +11 -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/types/index.d.ts +2 -58
- package/types/tsconfig.test.json +16 -0
- 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/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 -31
- package/React/UIUtils/RCTUIUtils.m +0 -66
- 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/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());
|
|
@@ -78,375 +79,96 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
78
79
|
sActionIdMap.put("collapse", AccessibilityActionCompat.ACTION_COLLAPSE.getId());
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
public ReactAccessibilityDelegate(
|
|
83
|
+
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
84
|
+
super(view);
|
|
85
|
+
mView = view;
|
|
86
|
+
mAccessibilityActionsMap = new HashMap<Integer, String>();
|
|
87
|
+
mHandler =
|
|
88
|
+
new Handler() {
|
|
89
|
+
@Override
|
|
90
|
+
public void handleMessage(Message msg) {
|
|
91
|
+
View host = (View) msg.obj;
|
|
92
|
+
host.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
83
95
|
|
|
84
|
-
|
|
96
|
+
// We need to reset these two properties, as ExploreByTouchHelper sets focusable to "true" and
|
|
97
|
+
// importantForAccessibility to "Yes" (if it is Auto). If we don't reset these it would force
|
|
98
|
+
// every element that has this delegate attached to be focusable, and not allow for
|
|
99
|
+
// announcement coalescing.
|
|
100
|
+
mView.setFocusable(originalFocus);
|
|
101
|
+
ViewCompat.setImportantForAccessibility(mView, originalImportantForAccessibility);
|
|
102
|
+
}
|
|
85
103
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
public static void setDelegate(
|
|
105
|
+
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
106
|
+
// if a view already has an accessibility delegate, replacing it could cause
|
|
107
|
+
// problems, so leave it alone.
|
|
108
|
+
if (!ViewCompat.hasAccessibilityDelegate(view)
|
|
109
|
+
&& (view.getTag(R.id.accessibility_role) != null
|
|
110
|
+
|| view.getTag(R.id.accessibility_state) != null
|
|
111
|
+
|| view.getTag(R.id.accessibility_actions) != null
|
|
112
|
+
|| view.getTag(R.id.react_test_id) != null
|
|
113
|
+
|| view.getTag(R.id.accessibility_collection_item) != null
|
|
114
|
+
|| view.getTag(R.id.accessibility_links) != null
|
|
115
|
+
|| view.getTag(R.id.role) != null)) {
|
|
116
|
+
ViewCompat.setAccessibilityDelegate(
|
|
117
|
+
view,
|
|
118
|
+
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
94
119
|
}
|
|
95
|
-
Message msg = mHandler.obtainMessage(SEND_EVENT, host);
|
|
96
|
-
mHandler.sendMessageDelayed(msg, TIMEOUT_SEND_ACCESSIBILITY_EVENT);
|
|
97
120
|
}
|
|
98
121
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
APPLICATION,
|
|
107
|
-
ARTICLE,
|
|
108
|
-
BANNER,
|
|
109
|
-
BUTTON,
|
|
110
|
-
CELL,
|
|
111
|
-
CHECKBOX,
|
|
112
|
-
COLUMNHEADER,
|
|
113
|
-
COMBOBOX,
|
|
114
|
-
COMPLEMENTARY,
|
|
115
|
-
CONTENTINFO,
|
|
116
|
-
DEFINITION,
|
|
117
|
-
DIALOG,
|
|
118
|
-
DIRECTORY,
|
|
119
|
-
DOCUMENT,
|
|
120
|
-
FEED,
|
|
121
|
-
FIGURE,
|
|
122
|
-
FORM,
|
|
123
|
-
GRID,
|
|
124
|
-
GROUP,
|
|
125
|
-
HEADING,
|
|
126
|
-
IMG,
|
|
127
|
-
LINK,
|
|
128
|
-
LIST,
|
|
129
|
-
LISTITEM,
|
|
130
|
-
LOG,
|
|
131
|
-
MAIN,
|
|
132
|
-
MARQUEE,
|
|
133
|
-
MATH,
|
|
134
|
-
MENU,
|
|
135
|
-
MENUBAR,
|
|
136
|
-
MENUITEM,
|
|
137
|
-
METER,
|
|
138
|
-
NAVIGATION,
|
|
139
|
-
NONE,
|
|
140
|
-
NOTE,
|
|
141
|
-
OPTION,
|
|
142
|
-
PRESENTATION,
|
|
143
|
-
PROGRESSBAR,
|
|
144
|
-
RADIO,
|
|
145
|
-
RADIOGROUP,
|
|
146
|
-
REGION,
|
|
147
|
-
ROW,
|
|
148
|
-
ROWGROUP,
|
|
149
|
-
ROWHEADER,
|
|
150
|
-
SCROLLBAR,
|
|
151
|
-
SEARCHBOX,
|
|
152
|
-
SEPARATOR,
|
|
153
|
-
SLIDER,
|
|
154
|
-
SPINBUTTON,
|
|
155
|
-
STATUS,
|
|
156
|
-
SUMMARY,
|
|
157
|
-
SWITCH,
|
|
158
|
-
TAB,
|
|
159
|
-
TABLE,
|
|
160
|
-
TABLIST,
|
|
161
|
-
TABPANEL,
|
|
162
|
-
TERM,
|
|
163
|
-
TIMER,
|
|
164
|
-
TOOLBAR,
|
|
165
|
-
TOOLTIP,
|
|
166
|
-
TREE,
|
|
167
|
-
TREEGRID,
|
|
168
|
-
TREEITEM;
|
|
122
|
+
// Explicitly re-set the delegate, even if one has already been set.
|
|
123
|
+
public static void resetDelegate(
|
|
124
|
+
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
125
|
+
ViewCompat.setAccessibilityDelegate(
|
|
126
|
+
view,
|
|
127
|
+
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
128
|
+
}
|
|
169
129
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
130
|
+
// The View this delegate is attached to
|
|
131
|
+
protected View getHostView() {
|
|
132
|
+
return mView;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@Override
|
|
136
|
+
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
|
|
137
|
+
super.onInitializeAccessibilityNodeInfo(host, info);
|
|
138
|
+
if (host.getTag(R.id.accessibility_state_expanded) != null) {
|
|
139
|
+
final boolean accessibilityStateExpanded =
|
|
140
|
+
(boolean) host.getTag(R.id.accessibility_state_expanded);
|
|
141
|
+
info.addAction(
|
|
142
|
+
accessibilityStateExpanded
|
|
143
|
+
? AccessibilityNodeInfoCompat.ACTION_COLLAPSE
|
|
144
|
+
: AccessibilityNodeInfoCompat.ACTION_EXPAND);
|
|
145
|
+
}
|
|
146
|
+
final AccessibilityRole accessibilityRole = AccessibilityRole.fromViewTag(host);
|
|
147
|
+
final String accessibilityHint = (String) host.getTag(R.id.accessibility_hint);
|
|
148
|
+
if (accessibilityRole != null) {
|
|
149
|
+
setRole(info, accessibilityRole, host.getContext());
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (accessibilityHint != null) {
|
|
153
|
+
info.setTooltipText(accessibilityHint);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
final Object accessibilityLabelledBy = host.getTag(R.id.labelled_by);
|
|
157
|
+
if (accessibilityLabelledBy != null) {
|
|
158
|
+
mAccessibilityLabelledBy =
|
|
159
|
+
ReactFindViewUtil.findView(host.getRootView(), (String) accessibilityLabelledBy);
|
|
160
|
+
if (mAccessibilityLabelledBy != null) {
|
|
161
|
+
info.setLabeledBy(mAccessibilityLabelledBy);
|
|
175
162
|
}
|
|
176
|
-
return null;
|
|
177
163
|
}
|
|
178
|
-
}
|
|
179
164
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
NONE,
|
|
188
|
-
BUTTON,
|
|
189
|
-
DROPDOWNLIST,
|
|
190
|
-
TOGGLEBUTTON,
|
|
191
|
-
LINK,
|
|
192
|
-
SEARCH,
|
|
193
|
-
IMAGE,
|
|
194
|
-
IMAGEBUTTON,
|
|
195
|
-
KEYBOARDKEY,
|
|
196
|
-
TEXT,
|
|
197
|
-
ADJUSTABLE,
|
|
198
|
-
SUMMARY,
|
|
199
|
-
HEADER,
|
|
200
|
-
ALERT,
|
|
201
|
-
CHECKBOX,
|
|
202
|
-
COMBOBOX,
|
|
203
|
-
MENU,
|
|
204
|
-
MENUBAR,
|
|
205
|
-
MENUITEM,
|
|
206
|
-
PROGRESSBAR,
|
|
207
|
-
RADIO,
|
|
208
|
-
RADIOGROUP,
|
|
209
|
-
SCROLLBAR,
|
|
210
|
-
SPINBUTTON,
|
|
211
|
-
SWITCH,
|
|
212
|
-
TAB,
|
|
213
|
-
TABLIST,
|
|
214
|
-
TIMER,
|
|
215
|
-
LIST,
|
|
216
|
-
GRID,
|
|
217
|
-
PAGER,
|
|
218
|
-
SCROLLVIEW,
|
|
219
|
-
HORIZONTALSCROLLVIEW,
|
|
220
|
-
VIEWGROUP,
|
|
221
|
-
WEBVIEW,
|
|
222
|
-
DRAWERLAYOUT,
|
|
223
|
-
SLIDINGDRAWER,
|
|
224
|
-
ICONMENU,
|
|
225
|
-
TOOLBAR;
|
|
226
|
-
|
|
227
|
-
public static String getValue(AccessibilityRole role) {
|
|
228
|
-
switch (role) {
|
|
229
|
-
case BUTTON:
|
|
230
|
-
return "android.widget.Button";
|
|
231
|
-
case DROPDOWNLIST:
|
|
232
|
-
return "android.widget.Spinner";
|
|
233
|
-
case TOGGLEBUTTON:
|
|
234
|
-
return "android.widget.ToggleButton";
|
|
235
|
-
case SEARCH:
|
|
236
|
-
return "android.widget.EditText";
|
|
237
|
-
case IMAGE:
|
|
238
|
-
return "android.widget.ImageView";
|
|
239
|
-
case IMAGEBUTTON:
|
|
240
|
-
return "android.widget.ImageButton";
|
|
241
|
-
case KEYBOARDKEY:
|
|
242
|
-
return "android.inputmethodservice.Keyboard$Key";
|
|
243
|
-
case TEXT:
|
|
244
|
-
return "android.widget.TextView";
|
|
245
|
-
case ADJUSTABLE:
|
|
246
|
-
return "android.widget.SeekBar";
|
|
247
|
-
case CHECKBOX:
|
|
248
|
-
return "android.widget.CheckBox";
|
|
249
|
-
case RADIO:
|
|
250
|
-
return "android.widget.RadioButton";
|
|
251
|
-
case SPINBUTTON:
|
|
252
|
-
return "android.widget.SpinButton";
|
|
253
|
-
case SWITCH:
|
|
254
|
-
return "android.widget.Switch";
|
|
255
|
-
case LIST:
|
|
256
|
-
return "android.widget.AbsListView";
|
|
257
|
-
case GRID:
|
|
258
|
-
return "android.widget.GridView";
|
|
259
|
-
case SCROLLVIEW:
|
|
260
|
-
return "android.widget.ScrollView";
|
|
261
|
-
case HORIZONTALSCROLLVIEW:
|
|
262
|
-
return "android.widget.HorizontalScrollView";
|
|
263
|
-
case PAGER:
|
|
264
|
-
return "androidx.viewpager.widget.ViewPager";
|
|
265
|
-
case DRAWERLAYOUT:
|
|
266
|
-
return "androidx.drawerlayout.widget.DrawerLayout";
|
|
267
|
-
case SLIDINGDRAWER:
|
|
268
|
-
return "android.widget.SlidingDrawer";
|
|
269
|
-
case ICONMENU:
|
|
270
|
-
return "com.android.internal.view.menu.IconMenuView";
|
|
271
|
-
case VIEWGROUP:
|
|
272
|
-
return "android.view.ViewGroup";
|
|
273
|
-
case WEBVIEW:
|
|
274
|
-
return "android.webkit.WebView";
|
|
275
|
-
case NONE:
|
|
276
|
-
case LINK:
|
|
277
|
-
case SUMMARY:
|
|
278
|
-
case HEADER:
|
|
279
|
-
case ALERT:
|
|
280
|
-
case COMBOBOX:
|
|
281
|
-
case MENU:
|
|
282
|
-
case MENUBAR:
|
|
283
|
-
case MENUITEM:
|
|
284
|
-
case PROGRESSBAR:
|
|
285
|
-
case RADIOGROUP:
|
|
286
|
-
case SCROLLBAR:
|
|
287
|
-
case TAB:
|
|
288
|
-
case TABLIST:
|
|
289
|
-
case TIMER:
|
|
290
|
-
case TOOLBAR:
|
|
291
|
-
return "android.view.View";
|
|
292
|
-
default:
|
|
293
|
-
throw new IllegalArgumentException("Invalid accessibility role value: " + role);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
public static AccessibilityRole fromValue(@Nullable String value) {
|
|
298
|
-
if (value == null) {
|
|
299
|
-
return NONE;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
for (AccessibilityRole role : AccessibilityRole.values()) {
|
|
303
|
-
if (role.name().equalsIgnoreCase(value)) {
|
|
304
|
-
return role;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
throw new IllegalArgumentException("Invalid accessibility role value: " + value);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
public static @Nullable AccessibilityRole fromRole(Role role) {
|
|
311
|
-
switch (role) {
|
|
312
|
-
case ALERT:
|
|
313
|
-
return AccessibilityRole.ALERT;
|
|
314
|
-
case BUTTON:
|
|
315
|
-
return AccessibilityRole.BUTTON;
|
|
316
|
-
case CHECKBOX:
|
|
317
|
-
return AccessibilityRole.CHECKBOX;
|
|
318
|
-
case COMBOBOX:
|
|
319
|
-
return AccessibilityRole.COMBOBOX;
|
|
320
|
-
case GRID:
|
|
321
|
-
return AccessibilityRole.GRID;
|
|
322
|
-
case HEADING:
|
|
323
|
-
return AccessibilityRole.HEADER;
|
|
324
|
-
case IMG:
|
|
325
|
-
return AccessibilityRole.IMAGE;
|
|
326
|
-
case LINK:
|
|
327
|
-
return AccessibilityRole.LINK;
|
|
328
|
-
case LIST:
|
|
329
|
-
return AccessibilityRole.LIST;
|
|
330
|
-
case MENU:
|
|
331
|
-
return AccessibilityRole.MENU;
|
|
332
|
-
case MENUBAR:
|
|
333
|
-
return AccessibilityRole.MENUBAR;
|
|
334
|
-
case MENUITEM:
|
|
335
|
-
return AccessibilityRole.MENUITEM;
|
|
336
|
-
case NONE:
|
|
337
|
-
return AccessibilityRole.NONE;
|
|
338
|
-
case PROGRESSBAR:
|
|
339
|
-
return AccessibilityRole.PROGRESSBAR;
|
|
340
|
-
case RADIO:
|
|
341
|
-
return AccessibilityRole.RADIO;
|
|
342
|
-
case RADIOGROUP:
|
|
343
|
-
return AccessibilityRole.RADIOGROUP;
|
|
344
|
-
case SCROLLBAR:
|
|
345
|
-
return AccessibilityRole.SCROLLBAR;
|
|
346
|
-
case SEARCHBOX:
|
|
347
|
-
return AccessibilityRole.SEARCH;
|
|
348
|
-
case SLIDER:
|
|
349
|
-
return AccessibilityRole.ADJUSTABLE;
|
|
350
|
-
case SPINBUTTON:
|
|
351
|
-
return AccessibilityRole.SPINBUTTON;
|
|
352
|
-
case SUMMARY:
|
|
353
|
-
return AccessibilityRole.SUMMARY;
|
|
354
|
-
case SWITCH:
|
|
355
|
-
return AccessibilityRole.SWITCH;
|
|
356
|
-
case TAB:
|
|
357
|
-
return AccessibilityRole.TAB;
|
|
358
|
-
case TABLIST:
|
|
359
|
-
return AccessibilityRole.TABLIST;
|
|
360
|
-
case TIMER:
|
|
361
|
-
return AccessibilityRole.TIMER;
|
|
362
|
-
case TOOLBAR:
|
|
363
|
-
return AccessibilityRole.TOOLBAR;
|
|
364
|
-
default:
|
|
365
|
-
// No mapping from ARIA role to AccessibilityRole
|
|
366
|
-
return null;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
public static @Nullable AccessibilityRole fromViewTag(View view) {
|
|
371
|
-
Role role = (Role) view.getTag(R.id.role);
|
|
372
|
-
if (role != null) {
|
|
373
|
-
return AccessibilityRole.fromRole(role);
|
|
374
|
-
} else {
|
|
375
|
-
return (AccessibilityRole) view.getTag(R.id.accessibility_role);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
private final HashMap<Integer, String> mAccessibilityActionsMap;
|
|
381
|
-
|
|
382
|
-
// State constants for states which have analogs in AccessibilityNodeInfo
|
|
383
|
-
|
|
384
|
-
private static final String STATE_DISABLED = "disabled";
|
|
385
|
-
private static final String STATE_SELECTED = "selected";
|
|
386
|
-
private static final String STATE_CHECKED = "checked";
|
|
387
|
-
|
|
388
|
-
public ReactAccessibilityDelegate(
|
|
389
|
-
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
390
|
-
super(view);
|
|
391
|
-
mView = view;
|
|
392
|
-
mAccessibilityActionsMap = new HashMap<Integer, String>();
|
|
393
|
-
mHandler =
|
|
394
|
-
new Handler() {
|
|
395
|
-
@Override
|
|
396
|
-
public void handleMessage(Message msg) {
|
|
397
|
-
View host = (View) msg.obj;
|
|
398
|
-
host.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
// We need to reset these two properties, as ExploreByTouchHelper sets focusable to "true" and
|
|
403
|
-
// importantForAccessibility to "Yes" (if it is Auto). If we don't reset these it would force
|
|
404
|
-
// every element that has this delegate attached to be focusable, and not allow for
|
|
405
|
-
// announcement coalescing.
|
|
406
|
-
mView.setFocusable(originalFocus);
|
|
407
|
-
ViewCompat.setImportantForAccessibility(mView, originalImportantForAccessibility);
|
|
408
|
-
mAccessibilityLinks = (AccessibilityLinks) mView.getTag(R.id.accessibility_links);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
@Nullable View mAccessibilityLabelledBy;
|
|
412
|
-
|
|
413
|
-
@Override
|
|
414
|
-
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
|
|
415
|
-
super.onInitializeAccessibilityNodeInfo(host, info);
|
|
416
|
-
if (host.getTag(R.id.accessibility_state_expanded) != null) {
|
|
417
|
-
final boolean accessibilityStateExpanded =
|
|
418
|
-
(boolean) host.getTag(R.id.accessibility_state_expanded);
|
|
419
|
-
info.addAction(
|
|
420
|
-
accessibilityStateExpanded
|
|
421
|
-
? AccessibilityNodeInfoCompat.ACTION_COLLAPSE
|
|
422
|
-
: AccessibilityNodeInfoCompat.ACTION_EXPAND);
|
|
423
|
-
}
|
|
424
|
-
final AccessibilityRole accessibilityRole = AccessibilityRole.fromViewTag(host);
|
|
425
|
-
final String accessibilityHint = (String) host.getTag(R.id.accessibility_hint);
|
|
426
|
-
if (accessibilityRole != null) {
|
|
427
|
-
setRole(info, accessibilityRole, host.getContext());
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
if (accessibilityHint != null) {
|
|
431
|
-
info.setTooltipText(accessibilityHint);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
final Object accessibilityLabelledBy = host.getTag(R.id.labelled_by);
|
|
435
|
-
if (accessibilityLabelledBy != null) {
|
|
436
|
-
mAccessibilityLabelledBy =
|
|
437
|
-
ReactFindViewUtil.findView(host.getRootView(), (String) accessibilityLabelledBy);
|
|
438
|
-
if (mAccessibilityLabelledBy != null) {
|
|
439
|
-
info.setLabeledBy(mAccessibilityLabelledBy);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
// state is changeable.
|
|
444
|
-
final ReadableMap accessibilityState = (ReadableMap) host.getTag(R.id.accessibility_state);
|
|
445
|
-
if (accessibilityState != null) {
|
|
446
|
-
setState(info, accessibilityState, host.getContext());
|
|
447
|
-
}
|
|
448
|
-
final ReadableArray accessibilityActions =
|
|
449
|
-
(ReadableArray) host.getTag(R.id.accessibility_actions);
|
|
165
|
+
// state is changeable.
|
|
166
|
+
final ReadableMap accessibilityState = (ReadableMap) host.getTag(R.id.accessibility_state);
|
|
167
|
+
if (accessibilityState != null) {
|
|
168
|
+
setState(info, accessibilityState, host.getContext());
|
|
169
|
+
}
|
|
170
|
+
final ReadableArray accessibilityActions =
|
|
171
|
+
(ReadableArray) host.getTag(R.id.accessibility_actions);
|
|
450
172
|
|
|
451
173
|
final ReadableMap accessibilityCollectionItem =
|
|
452
174
|
(ReadableMap) host.getTag(R.id.accessibility_collection_item);
|
|
@@ -614,6 +336,19 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
614
336
|
return super.performAccessibilityAction(host, action, args);
|
|
615
337
|
}
|
|
616
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Schedule a command for sending an accessibility event. </br> Note: A command is used to ensure
|
|
341
|
+
* that accessibility events are sent at most one in a given time frame to save system resources
|
|
342
|
+
* while the progress changes quickly.
|
|
343
|
+
*/
|
|
344
|
+
private void scheduleAccessibilityEventSender(View host) {
|
|
345
|
+
if (mHandler.hasMessages(SEND_EVENT, host)) {
|
|
346
|
+
mHandler.removeMessages(SEND_EVENT, host);
|
|
347
|
+
}
|
|
348
|
+
Message msg = mHandler.obtainMessage(SEND_EVENT, host);
|
|
349
|
+
mHandler.sendMessageDelayed(msg, TIMEOUT_SEND_ACCESSIBILITY_EVENT);
|
|
350
|
+
}
|
|
351
|
+
|
|
617
352
|
private static void setState(
|
|
618
353
|
AccessibilityNodeInfoCompat info, ReadableMap accessibilityState, Context context) {
|
|
619
354
|
final ReadableMapKeySetIterator i = accessibilityState.keySetIterator();
|
|
@@ -632,10 +367,7 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
632
367
|
}
|
|
633
368
|
}
|
|
634
369
|
|
|
635
|
-
/** Strings for setting the Role Description in english */
|
|
636
|
-
|
|
637
370
|
// TODO: Eventually support for other languages on talkback
|
|
638
|
-
|
|
639
371
|
public static void setRole(
|
|
640
372
|
AccessibilityNodeInfoCompat nodeInfo, AccessibilityRole role, final Context context) {
|
|
641
373
|
if (role == null) {
|
|
@@ -687,172 +419,19 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
687
419
|
}
|
|
688
420
|
}
|
|
689
421
|
|
|
690
|
-
public static void setDelegate(
|
|
691
|
-
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
692
|
-
// if a view already has an accessibility delegate, replacing it could cause
|
|
693
|
-
// problems,
|
|
694
|
-
// so leave it alone.
|
|
695
|
-
if (!ViewCompat.hasAccessibilityDelegate(view)
|
|
696
|
-
&& (view.getTag(R.id.accessibility_role) != null
|
|
697
|
-
|| view.getTag(R.id.accessibility_state) != null
|
|
698
|
-
|| view.getTag(R.id.accessibility_actions) != null
|
|
699
|
-
|| view.getTag(R.id.react_test_id) != null
|
|
700
|
-
|| view.getTag(R.id.accessibility_collection_item) != null
|
|
701
|
-
|| view.getTag(R.id.accessibility_links) != null
|
|
702
|
-
|| view.getTag(R.id.role) != null)) {
|
|
703
|
-
ViewCompat.setAccessibilityDelegate(
|
|
704
|
-
view,
|
|
705
|
-
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
// Explicitly re-set the delegate, even if one has already been set.
|
|
710
|
-
public static void resetDelegate(
|
|
711
|
-
final View view, boolean originalFocus, int originalImportantForAccessibility) {
|
|
712
|
-
ViewCompat.setAccessibilityDelegate(
|
|
713
|
-
view,
|
|
714
|
-
new ReactAccessibilityDelegate(view, originalFocus, originalImportantForAccessibility));
|
|
715
|
-
}
|
|
716
|
-
|
|
717
422
|
@Override
|
|
718
423
|
protected int getVirtualViewAt(float x, float y) {
|
|
719
|
-
|
|
720
|
-
|| mAccessibilityLinks.size() == 0
|
|
721
|
-
|| !(mView instanceof TextView)) {
|
|
722
|
-
return INVALID_ID;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
TextView textView = (TextView) mView;
|
|
726
|
-
if (!(textView.getText() instanceof Spanned)) {
|
|
727
|
-
return INVALID_ID;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
Layout layout = textView.getLayout();
|
|
731
|
-
if (layout == null) {
|
|
732
|
-
return INVALID_ID;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
x -= textView.getTotalPaddingLeft();
|
|
736
|
-
y -= textView.getTotalPaddingTop();
|
|
737
|
-
x += textView.getScrollX();
|
|
738
|
-
y += textView.getScrollY();
|
|
739
|
-
|
|
740
|
-
int line = layout.getLineForVertical((int) y);
|
|
741
|
-
int charOffset = layout.getOffsetForHorizontal(line, x);
|
|
742
|
-
|
|
743
|
-
ClickableSpan clickableSpan = getFirstSpan(charOffset, charOffset, ClickableSpan.class);
|
|
744
|
-
if (clickableSpan == null) {
|
|
745
|
-
return INVALID_ID;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
Spanned spanned = (Spanned) textView.getText();
|
|
749
|
-
int start = spanned.getSpanStart(clickableSpan);
|
|
750
|
-
int end = spanned.getSpanEnd(clickableSpan);
|
|
751
|
-
|
|
752
|
-
final AccessibilityLinks.AccessibleLink link = mAccessibilityLinks.getLinkBySpanPos(start, end);
|
|
753
|
-
return link != null ? link.id : INVALID_ID;
|
|
424
|
+
return INVALID_ID;
|
|
754
425
|
}
|
|
755
426
|
|
|
756
427
|
@Override
|
|
757
|
-
protected void getVisibleVirtualViews(List<Integer> virtualViewIds) {
|
|
758
|
-
if (mAccessibilityLinks == null) {
|
|
759
|
-
return;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
for (int i = 0; i < mAccessibilityLinks.size(); i++) {
|
|
763
|
-
virtualViewIds.add(i);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
428
|
+
protected void getVisibleVirtualViews(List<Integer> virtualViewIds) {}
|
|
766
429
|
|
|
767
430
|
@Override
|
|
768
431
|
protected void onPopulateNodeForVirtualView(
|
|
769
432
|
int virtualViewId, @NonNull AccessibilityNodeInfoCompat node) {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
// the user, as Talkback filters out nodes with no content to announce.
|
|
773
|
-
if (mAccessibilityLinks == null) {
|
|
774
|
-
node.setContentDescription("");
|
|
775
|
-
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
final AccessibilityLinks.AccessibleLink accessibleTextSpan =
|
|
780
|
-
mAccessibilityLinks.getLinkById(virtualViewId);
|
|
781
|
-
if (accessibleTextSpan == null) {
|
|
782
|
-
node.setContentDescription("");
|
|
783
|
-
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
784
|
-
return;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
// NOTE: The span may not actually have visible bounds within its parent,
|
|
788
|
-
// due to line limits, etc.
|
|
789
|
-
final Rect bounds = getBoundsInParent(accessibleTextSpan);
|
|
790
|
-
if (bounds == null) {
|
|
791
|
-
node.setContentDescription("");
|
|
792
|
-
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
793
|
-
return;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
node.setContentDescription(accessibleTextSpan.description);
|
|
797
|
-
node.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK);
|
|
798
|
-
node.setBoundsInParent(bounds);
|
|
799
|
-
node.setRoleDescription(mView.getResources().getString(R.string.link_description));
|
|
800
|
-
node.setClassName(AccessibilityRole.getValue(AccessibilityRole.BUTTON));
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
private Rect getBoundsInParent(AccessibilityLinks.AccessibleLink accessibleLink) {
|
|
804
|
-
// This view is not a text view, so return the entire views bounds.
|
|
805
|
-
if (!(mView instanceof TextView)) {
|
|
806
|
-
return new Rect(0, 0, mView.getWidth(), mView.getHeight());
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
TextView textView = (TextView) mView;
|
|
810
|
-
Layout textViewLayout = textView.getLayout();
|
|
811
|
-
if (textViewLayout == null) {
|
|
812
|
-
return new Rect(0, 0, textView.getWidth(), textView.getHeight());
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
double startOffset = accessibleLink.start;
|
|
816
|
-
double endOffset = accessibleLink.end;
|
|
817
|
-
|
|
818
|
-
// Ensure the link hasn't been ellipsized away; in such cases,
|
|
819
|
-
// getPrimaryHorizontal will crash (and the link isn't rendered anyway).
|
|
820
|
-
int startOffsetLineNumber = textViewLayout.getLineForOffset((int) startOffset);
|
|
821
|
-
int lineEndOffset = textViewLayout.getLineEnd(startOffsetLineNumber);
|
|
822
|
-
if (startOffset > lineEndOffset) {
|
|
823
|
-
return null;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
Rect rootRect = new Rect();
|
|
827
|
-
|
|
828
|
-
double startXCoordinates = textViewLayout.getPrimaryHorizontal((int) startOffset);
|
|
829
|
-
|
|
830
|
-
final Paint paint = new Paint();
|
|
831
|
-
AbsoluteSizeSpan sizeSpan =
|
|
832
|
-
getFirstSpan(accessibleLink.start, accessibleLink.end, AbsoluteSizeSpan.class);
|
|
833
|
-
float textSize = sizeSpan != null ? sizeSpan.getSize() : textView.getTextSize();
|
|
834
|
-
paint.setTextSize(textSize);
|
|
835
|
-
int textWidth = (int) Math.ceil(paint.measureText(accessibleLink.description));
|
|
836
|
-
|
|
837
|
-
int endOffsetLineNumber = textViewLayout.getLineForOffset((int) endOffset);
|
|
838
|
-
boolean isMultiline = startOffsetLineNumber != endOffsetLineNumber;
|
|
839
|
-
textViewLayout.getLineBounds(startOffsetLineNumber, rootRect);
|
|
840
|
-
|
|
841
|
-
int verticalOffset = textView.getScrollY() + textView.getTotalPaddingTop();
|
|
842
|
-
rootRect.top += verticalOffset;
|
|
843
|
-
rootRect.bottom += verticalOffset;
|
|
844
|
-
rootRect.left += startXCoordinates + textView.getTotalPaddingLeft() - textView.getScrollX();
|
|
845
|
-
|
|
846
|
-
// The bounds for multi-line strings should *only* include the first line. This is because for
|
|
847
|
-
// API 25 and below, Talkback's click is triggered at the center point of these bounds, and if
|
|
848
|
-
// that center point is outside the spannable, it will click on something else. There is no
|
|
849
|
-
// harm in not outlining the wrapped part of the string, as the text for the whole string will
|
|
850
|
-
// be read regardless of the bounding box.
|
|
851
|
-
if (isMultiline) {
|
|
852
|
-
return new Rect(rootRect.left, rootRect.top, rootRect.right, rootRect.bottom);
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
return new Rect(rootRect.left, rootRect.top, rootRect.left + textWidth, rootRect.bottom);
|
|
433
|
+
node.setContentDescription("");
|
|
434
|
+
node.setBoundsInParent(new Rect(0, 0, 1, 1));
|
|
856
435
|
}
|
|
857
436
|
|
|
858
437
|
@Override
|
|
@@ -861,97 +440,17 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
861
440
|
return false;
|
|
862
441
|
}
|
|
863
442
|
|
|
864
|
-
protected @Nullable <T> T getFirstSpan(int start, int end, Class<T> classType) {
|
|
865
|
-
if (!(mView instanceof TextView) || !(((TextView) mView).getText() instanceof Spanned)) {
|
|
866
|
-
return null;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
Spanned spanned = (Spanned) ((TextView) mView).getText();
|
|
870
|
-
T[] spans = spanned.getSpans(start, end, classType);
|
|
871
|
-
return spans.length > 0 ? spans[0] : null;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
public static class AccessibilityLinks {
|
|
875
|
-
private final List<AccessibleLink> mLinks;
|
|
876
|
-
|
|
877
|
-
public AccessibilityLinks(ClickableSpan[] spans, Spannable text) {
|
|
878
|
-
ArrayList<AccessibleLink> links = new ArrayList<>();
|
|
879
|
-
for (int i = 0; i < spans.length; i++) {
|
|
880
|
-
ClickableSpan span = spans[i];
|
|
881
|
-
int start = text.getSpanStart(span);
|
|
882
|
-
int end = text.getSpanEnd(span);
|
|
883
|
-
// zero length spans, and out of range spans should not be included.
|
|
884
|
-
if (start == end || start < 0 || end < 0 || start > text.length() || end > text.length()) {
|
|
885
|
-
continue;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
final AccessibleLink link = new AccessibleLink();
|
|
889
|
-
link.description = text.subSequence(start, end).toString();
|
|
890
|
-
link.start = start;
|
|
891
|
-
link.end = end;
|
|
892
|
-
|
|
893
|
-
// ID is the reverse of what is expected, since the ClickableSpans are returned in reverse
|
|
894
|
-
// order due to being added in reverse order. If we don't do this, focus will move to the
|
|
895
|
-
// last link first and move backwards.
|
|
896
|
-
//
|
|
897
|
-
// If this approach becomes unreliable, we should instead look at their start position and
|
|
898
|
-
// order them manually.
|
|
899
|
-
link.id = spans.length - 1 - i;
|
|
900
|
-
links.add(link);
|
|
901
|
-
}
|
|
902
|
-
mLinks = links;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
@Nullable
|
|
906
|
-
public AccessibleLink getLinkById(int id) {
|
|
907
|
-
for (AccessibleLink link : mLinks) {
|
|
908
|
-
if (link.id == id) {
|
|
909
|
-
return link;
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
return null;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
@Nullable
|
|
917
|
-
public AccessibleLink getLinkBySpanPos(int start, int end) {
|
|
918
|
-
for (AccessibleLink link : mLinks) {
|
|
919
|
-
if (link.start == start && link.end == end) {
|
|
920
|
-
return link;
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
return null;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
public int size() {
|
|
928
|
-
return mLinks.size();
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
private static class AccessibleLink {
|
|
932
|
-
public String description;
|
|
933
|
-
public int start;
|
|
934
|
-
public int end;
|
|
935
|
-
public int id;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
|
|
939
443
|
@Override
|
|
940
444
|
public @Nullable AccessibilityNodeProviderCompat getAccessibilityNodeProvider(View host) {
|
|
941
|
-
// Only set a NodeProvider if we have virtual views, otherwise just return null here so that
|
|
942
|
-
// we fall back to the View class's default behavior. If we don't do this, then Views with
|
|
943
|
-
// no virtual children will fall back to using ExploreByTouchHelper's onPopulateNodeForHost
|
|
944
|
-
// method to populate their AccessibilityNodeInfo, which defaults to doing nothing, so no
|
|
945
|
-
// AccessibilityNodeInfo will be created. Alternatively, we could override
|
|
946
|
-
// onPopulateNodeForHost instead, and have it create an AccessibilityNodeInfo for the host
|
|
947
|
-
// but this is what the default View class does by itself, so we may as well defer to it.
|
|
948
|
-
if (mAccessibilityLinks != null) {
|
|
949
|
-
return super.getAccessibilityNodeProvider(host);
|
|
950
|
-
}
|
|
951
|
-
|
|
952
445
|
return null;
|
|
953
446
|
}
|
|
954
447
|
|
|
448
|
+
// This exists so classes that extend this can properly call super's impl of this method while
|
|
449
|
+
// still being able to override it properly for this class
|
|
450
|
+
public @Nullable AccessibilityNodeProviderCompat superGetAccessibilityNodeProvider(View host) {
|
|
451
|
+
return super.getAccessibilityNodeProvider(host);
|
|
452
|
+
}
|
|
453
|
+
|
|
955
454
|
/**
|
|
956
455
|
* Determines if the supplied {@link View} and {@link AccessibilityNodeInfoCompat} has any
|
|
957
456
|
* children which are not independently accessibility focusable and also have a spoken
|
|
@@ -1195,11 +694,8 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
1195
694
|
return talkbackSegments;
|
|
1196
695
|
}
|
|
1197
696
|
|
|
1198
|
-
//
|
|
697
|
+
// TextView
|
|
1199
698
|
if (hasNodeText) {
|
|
1200
|
-
// skipped status checks above for EditText
|
|
1201
|
-
|
|
1202
|
-
// description
|
|
1203
699
|
talkbackSegments.append(nodeText);
|
|
1204
700
|
return talkbackSegments;
|
|
1205
701
|
}
|
|
@@ -1242,4 +738,285 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
|
|
1242
738
|
}
|
|
1243
739
|
return builder.toString();
|
|
1244
740
|
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* An ARIA Role representable by View's `role` prop. Ordinals should be kept in sync with
|
|
744
|
+
* `facebook::react::Role`.
|
|
745
|
+
*/
|
|
746
|
+
public enum Role {
|
|
747
|
+
ALERT,
|
|
748
|
+
ALERTDIALOG,
|
|
749
|
+
APPLICATION,
|
|
750
|
+
ARTICLE,
|
|
751
|
+
BANNER,
|
|
752
|
+
BUTTON,
|
|
753
|
+
CELL,
|
|
754
|
+
CHECKBOX,
|
|
755
|
+
COLUMNHEADER,
|
|
756
|
+
COMBOBOX,
|
|
757
|
+
COMPLEMENTARY,
|
|
758
|
+
CONTENTINFO,
|
|
759
|
+
DEFINITION,
|
|
760
|
+
DIALOG,
|
|
761
|
+
DIRECTORY,
|
|
762
|
+
DOCUMENT,
|
|
763
|
+
FEED,
|
|
764
|
+
FIGURE,
|
|
765
|
+
FORM,
|
|
766
|
+
GRID,
|
|
767
|
+
GROUP,
|
|
768
|
+
HEADING,
|
|
769
|
+
IMG,
|
|
770
|
+
LINK,
|
|
771
|
+
LIST,
|
|
772
|
+
LISTITEM,
|
|
773
|
+
LOG,
|
|
774
|
+
MAIN,
|
|
775
|
+
MARQUEE,
|
|
776
|
+
MATH,
|
|
777
|
+
MENU,
|
|
778
|
+
MENUBAR,
|
|
779
|
+
MENUITEM,
|
|
780
|
+
METER,
|
|
781
|
+
NAVIGATION,
|
|
782
|
+
NONE,
|
|
783
|
+
NOTE,
|
|
784
|
+
OPTION,
|
|
785
|
+
PRESENTATION,
|
|
786
|
+
PROGRESSBAR,
|
|
787
|
+
RADIO,
|
|
788
|
+
RADIOGROUP,
|
|
789
|
+
REGION,
|
|
790
|
+
ROW,
|
|
791
|
+
ROWGROUP,
|
|
792
|
+
ROWHEADER,
|
|
793
|
+
SCROLLBAR,
|
|
794
|
+
SEARCHBOX,
|
|
795
|
+
SEPARATOR,
|
|
796
|
+
SLIDER,
|
|
797
|
+
SPINBUTTON,
|
|
798
|
+
STATUS,
|
|
799
|
+
SUMMARY,
|
|
800
|
+
SWITCH,
|
|
801
|
+
TAB,
|
|
802
|
+
TABLE,
|
|
803
|
+
TABLIST,
|
|
804
|
+
TABPANEL,
|
|
805
|
+
TERM,
|
|
806
|
+
TIMER,
|
|
807
|
+
TOOLBAR,
|
|
808
|
+
TOOLTIP,
|
|
809
|
+
TREE,
|
|
810
|
+
TREEGRID,
|
|
811
|
+
TREEITEM;
|
|
812
|
+
|
|
813
|
+
public static @Nullable Role fromValue(@Nullable String value) {
|
|
814
|
+
for (Role role : Role.values()) {
|
|
815
|
+
if (role.name().equalsIgnoreCase(value)) {
|
|
816
|
+
return role;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return null;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* These roles are defined by Google's TalkBack screen reader, and this list should be kept up to
|
|
825
|
+
* date with their implementation. Details can be seen in their source code here:
|
|
826
|
+
*
|
|
827
|
+
* <p>https://github.com/google/talkback/blob/master/utils/src/main/java/Role.java
|
|
828
|
+
*/
|
|
829
|
+
public enum AccessibilityRole {
|
|
830
|
+
NONE,
|
|
831
|
+
BUTTON,
|
|
832
|
+
DROPDOWNLIST,
|
|
833
|
+
TOGGLEBUTTON,
|
|
834
|
+
LINK,
|
|
835
|
+
SEARCH,
|
|
836
|
+
IMAGE,
|
|
837
|
+
IMAGEBUTTON,
|
|
838
|
+
KEYBOARDKEY,
|
|
839
|
+
TEXT,
|
|
840
|
+
ADJUSTABLE,
|
|
841
|
+
SUMMARY,
|
|
842
|
+
HEADER,
|
|
843
|
+
ALERT,
|
|
844
|
+
CHECKBOX,
|
|
845
|
+
COMBOBOX,
|
|
846
|
+
MENU,
|
|
847
|
+
MENUBAR,
|
|
848
|
+
MENUITEM,
|
|
849
|
+
PROGRESSBAR,
|
|
850
|
+
RADIO,
|
|
851
|
+
RADIOGROUP,
|
|
852
|
+
SCROLLBAR,
|
|
853
|
+
SPINBUTTON,
|
|
854
|
+
SWITCH,
|
|
855
|
+
TAB,
|
|
856
|
+
TABLIST,
|
|
857
|
+
TIMER,
|
|
858
|
+
LIST,
|
|
859
|
+
GRID,
|
|
860
|
+
PAGER,
|
|
861
|
+
SCROLLVIEW,
|
|
862
|
+
HORIZONTALSCROLLVIEW,
|
|
863
|
+
VIEWGROUP,
|
|
864
|
+
WEBVIEW,
|
|
865
|
+
DRAWERLAYOUT,
|
|
866
|
+
SLIDINGDRAWER,
|
|
867
|
+
ICONMENU,
|
|
868
|
+
TOOLBAR;
|
|
869
|
+
|
|
870
|
+
public static String getValue(AccessibilityRole role) {
|
|
871
|
+
switch (role) {
|
|
872
|
+
case BUTTON:
|
|
873
|
+
return "android.widget.Button";
|
|
874
|
+
case DROPDOWNLIST:
|
|
875
|
+
return "android.widget.Spinner";
|
|
876
|
+
case TOGGLEBUTTON:
|
|
877
|
+
return "android.widget.ToggleButton";
|
|
878
|
+
case SEARCH:
|
|
879
|
+
return "android.widget.EditText";
|
|
880
|
+
case IMAGE:
|
|
881
|
+
return "android.widget.ImageView";
|
|
882
|
+
case IMAGEBUTTON:
|
|
883
|
+
return "android.widget.ImageButton";
|
|
884
|
+
case KEYBOARDKEY:
|
|
885
|
+
return "android.inputmethodservice.Keyboard$Key";
|
|
886
|
+
case TEXT:
|
|
887
|
+
return "android.widget.TextView";
|
|
888
|
+
case ADJUSTABLE:
|
|
889
|
+
return "android.widget.SeekBar";
|
|
890
|
+
case CHECKBOX:
|
|
891
|
+
return "android.widget.CheckBox";
|
|
892
|
+
case RADIO:
|
|
893
|
+
return "android.widget.RadioButton";
|
|
894
|
+
case SPINBUTTON:
|
|
895
|
+
return "android.widget.SpinButton";
|
|
896
|
+
case SWITCH:
|
|
897
|
+
return "android.widget.Switch";
|
|
898
|
+
case LIST:
|
|
899
|
+
return "android.widget.AbsListView";
|
|
900
|
+
case GRID:
|
|
901
|
+
return "android.widget.GridView";
|
|
902
|
+
case SCROLLVIEW:
|
|
903
|
+
return "android.widget.ScrollView";
|
|
904
|
+
case HORIZONTALSCROLLVIEW:
|
|
905
|
+
return "android.widget.HorizontalScrollView";
|
|
906
|
+
case PAGER:
|
|
907
|
+
return "androidx.viewpager.widget.ViewPager";
|
|
908
|
+
case DRAWERLAYOUT:
|
|
909
|
+
return "androidx.drawerlayout.widget.DrawerLayout";
|
|
910
|
+
case SLIDINGDRAWER:
|
|
911
|
+
return "android.widget.SlidingDrawer";
|
|
912
|
+
case ICONMENU:
|
|
913
|
+
return "com.android.internal.view.menu.IconMenuView";
|
|
914
|
+
case VIEWGROUP:
|
|
915
|
+
return "android.view.ViewGroup";
|
|
916
|
+
case WEBVIEW:
|
|
917
|
+
return "android.webkit.WebView";
|
|
918
|
+
case NONE:
|
|
919
|
+
case LINK:
|
|
920
|
+
case SUMMARY:
|
|
921
|
+
case HEADER:
|
|
922
|
+
case ALERT:
|
|
923
|
+
case COMBOBOX:
|
|
924
|
+
case MENU:
|
|
925
|
+
case MENUBAR:
|
|
926
|
+
case MENUITEM:
|
|
927
|
+
case PROGRESSBAR:
|
|
928
|
+
case RADIOGROUP:
|
|
929
|
+
case SCROLLBAR:
|
|
930
|
+
case TAB:
|
|
931
|
+
case TABLIST:
|
|
932
|
+
case TIMER:
|
|
933
|
+
case TOOLBAR:
|
|
934
|
+
return "android.view.View";
|
|
935
|
+
default:
|
|
936
|
+
throw new IllegalArgumentException("Invalid accessibility role value: " + role);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
public static AccessibilityRole fromValue(@Nullable String value) {
|
|
941
|
+
if (value == null) {
|
|
942
|
+
return NONE;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
for (AccessibilityRole role : AccessibilityRole.values()) {
|
|
946
|
+
if (role.name().equalsIgnoreCase(value)) {
|
|
947
|
+
return role;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
throw new IllegalArgumentException("Invalid accessibility role value: " + value);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
public static @Nullable AccessibilityRole fromRole(Role role) {
|
|
954
|
+
switch (role) {
|
|
955
|
+
case ALERT:
|
|
956
|
+
return AccessibilityRole.ALERT;
|
|
957
|
+
case BUTTON:
|
|
958
|
+
return AccessibilityRole.BUTTON;
|
|
959
|
+
case CHECKBOX:
|
|
960
|
+
return AccessibilityRole.CHECKBOX;
|
|
961
|
+
case COMBOBOX:
|
|
962
|
+
return AccessibilityRole.COMBOBOX;
|
|
963
|
+
case GRID:
|
|
964
|
+
return AccessibilityRole.GRID;
|
|
965
|
+
case HEADING:
|
|
966
|
+
return AccessibilityRole.HEADER;
|
|
967
|
+
case IMG:
|
|
968
|
+
return AccessibilityRole.IMAGE;
|
|
969
|
+
case LINK:
|
|
970
|
+
return AccessibilityRole.LINK;
|
|
971
|
+
case LIST:
|
|
972
|
+
return AccessibilityRole.LIST;
|
|
973
|
+
case MENU:
|
|
974
|
+
return AccessibilityRole.MENU;
|
|
975
|
+
case MENUBAR:
|
|
976
|
+
return AccessibilityRole.MENUBAR;
|
|
977
|
+
case MENUITEM:
|
|
978
|
+
return AccessibilityRole.MENUITEM;
|
|
979
|
+
case NONE:
|
|
980
|
+
return AccessibilityRole.NONE;
|
|
981
|
+
case PROGRESSBAR:
|
|
982
|
+
return AccessibilityRole.PROGRESSBAR;
|
|
983
|
+
case RADIO:
|
|
984
|
+
return AccessibilityRole.RADIO;
|
|
985
|
+
case RADIOGROUP:
|
|
986
|
+
return AccessibilityRole.RADIOGROUP;
|
|
987
|
+
case SCROLLBAR:
|
|
988
|
+
return AccessibilityRole.SCROLLBAR;
|
|
989
|
+
case SEARCHBOX:
|
|
990
|
+
return AccessibilityRole.SEARCH;
|
|
991
|
+
case SLIDER:
|
|
992
|
+
return AccessibilityRole.ADJUSTABLE;
|
|
993
|
+
case SPINBUTTON:
|
|
994
|
+
return AccessibilityRole.SPINBUTTON;
|
|
995
|
+
case SUMMARY:
|
|
996
|
+
return AccessibilityRole.SUMMARY;
|
|
997
|
+
case SWITCH:
|
|
998
|
+
return AccessibilityRole.SWITCH;
|
|
999
|
+
case TAB:
|
|
1000
|
+
return AccessibilityRole.TAB;
|
|
1001
|
+
case TABLIST:
|
|
1002
|
+
return AccessibilityRole.TABLIST;
|
|
1003
|
+
case TIMER:
|
|
1004
|
+
return AccessibilityRole.TIMER;
|
|
1005
|
+
case TOOLBAR:
|
|
1006
|
+
return AccessibilityRole.TOOLBAR;
|
|
1007
|
+
default:
|
|
1008
|
+
// No mapping from ARIA role to AccessibilityRole
|
|
1009
|
+
return null;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
public static @Nullable AccessibilityRole fromViewTag(View view) {
|
|
1014
|
+
Role role = (Role) view.getTag(R.id.role);
|
|
1015
|
+
if (role != null) {
|
|
1016
|
+
return AccessibilityRole.fromRole(role);
|
|
1017
|
+
} else {
|
|
1018
|
+
return (AccessibilityRole) view.getTag(R.id.accessibility_role);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1245
1022
|
}
|