react-native-macos 0.0.0-af4495485 → 0.0.0-af7baddd2
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/React-RCTActionSheet.podspec +1 -1
- package/Libraries/Alert/Alert.js +117 -8
- package/Libraries/Alert/NativeAlertManager.js +3 -21
- package/Libraries/Alert/RCTAlertManager.macos.js +1 -1
- package/Libraries/Animated/AnimatedMock.js +2 -2
- package/Libraries/Animated/NativeAnimatedHelper.js +1 -1
- package/Libraries/Animated/animations/TimingAnimation.js +2 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +20 -1
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/Blob/React-RCTBlob.podspec +2 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +14 -14
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +2 -2
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.macos.js +1 -1
- package/Libraries/Components/Button.js +24 -26
- package/Libraries/Components/DatePicker/DatePickerIOS.macos.js +1 -1
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.macos.js +1 -1
- package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.android.js +1 -1
- package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.ios.js +1 -1
- package/Libraries/Components/DatePickerMacOS/DatePickerMacOS.macos.js +1 -1
- package/Libraries/Components/DatePickerMacOS/RCTDatePickerNativeComponentMacOS.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.macos.js +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +1 -1
- package/Libraries/Components/MaskedView/MaskedViewIOS.macos.js +1 -1
- package/Libraries/Components/Picker/PickerAndroid.macos.js +1 -1
- package/Libraries/Components/Picker/PickerIOS.macos.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +19 -20
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.macos.js +1 -1
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.macos.js +1 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +18 -18
- package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.macos.js +1 -1
- package/Libraries/Components/Slider/Slider.js +3 -3
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +2 -2
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -1
- package/Libraries/Components/TextInput/TextInput.js +70 -25
- package/Libraries/Components/TextInput/TextInputState.js +2 -8
- package/Libraries/Components/ToastAndroid/ToastAndroid.macos.js +1 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.js +6 -6
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +11 -11
- package/Libraries/Components/View/DraggedType.js +1 -1
- package/Libraries/Components/View/ReactNativeViewAttributes.js +3 -2
- package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +1 -1
- package/Libraries/Components/View/View.js +0 -1
- package/Libraries/Components/View/ViewAccessibility.js +1 -6
- package/Libraries/Components/View/ViewNativeComponent.js +64 -7
- package/Libraries/Components/View/ViewPropTypes.js +99 -122
- package/Libraries/Core/NativeExceptionsManager.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -5
- package/Libraries/Core/setUpReactDevTools.js +3 -2
- package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.macos.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +1 -4
- package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
- package/Libraries/Image/Image.macos.js +1 -1
- package/Libraries/Image/RCTAnimatedImage.h +3 -3
- package/Libraries/Image/RCTAnimatedImage.m +10 -10
- package/Libraries/Image/RCTDisplayWeakRefreshable.h +3 -3
- package/Libraries/Image/RCTDisplayWeakRefreshable.m +3 -3
- package/Libraries/Image/RCTImageBlurUtils.h +1 -1
- package/Libraries/Image/RCTImageBlurUtils.m +12 -12
- package/Libraries/Image/RCTImageCache.h +1 -1
- package/Libraries/Image/RCTImageCache.m +4 -4
- package/Libraries/Image/RCTImageDataDecoder.h +1 -1
- package/Libraries/Image/RCTImageEditingManager.mm +3 -3
- package/Libraries/Image/RCTImageLoader.h +2 -2
- package/Libraries/Image/RCTImageLoader.mm +38 -32
- package/Libraries/Image/RCTImageLoaderProtocol.h +1 -1
- package/Libraries/Image/RCTImageLoaderWithAttributionProtocol.h +2 -2
- package/Libraries/Image/RCTImageStoreManager.h +1 -1
- package/Libraries/Image/RCTImageStoreManager.mm +4 -4
- package/Libraries/Image/RCTImageURLLoader.h +1 -1
- package/Libraries/Image/RCTImageURLLoaderWithAttribution.h +2 -2
- package/Libraries/Image/RCTImageUtils.h +2 -2
- package/Libraries/Image/RCTImageUtils.m +22 -22
- package/Libraries/Image/RCTImageView.h +3 -11
- package/Libraries/Image/RCTImageView.mm +64 -60
- package/Libraries/Image/RCTImageViewManager.mm +2 -2
- package/Libraries/Image/RCTResizeMode.h +3 -3
- package/Libraries/Image/RCTUIImageViewAnimated.h +4 -4
- package/Libraries/Image/RCTUIImageViewAnimated.m +11 -11
- package/Libraries/Image/React-RCTImage.podspec +2 -2
- package/Libraries/Image/nativeImageSource.js +2 -2
- package/Libraries/Inspector/Inspector.js +2 -4
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/LinkingIOS/RCTLinkingManager.h +6 -6
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +4 -4
- package/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +1 -1
- package/Libraries/Lists/FlatList.js +7 -7
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/VirtualizedList.js +48 -36
- package/Libraries/Lists/VirtualizedSectionList.js +21 -19
- package/Libraries/NativeAnimation/Drivers/RCTDecayAnimation.m +1 -1
- package/Libraries/NativeAnimation/Drivers/RCTFrameAnimation.m +1 -1
- package/Libraries/NativeAnimation/Drivers/RCTSpringAnimation.m +1 -1
- package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h} +6 -4
- package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
- package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
- package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
- package/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.h +1 -1
- package/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +2 -2
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h +2 -2
- package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +5 -3
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +3 -3
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +506 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +5 -1
- package/Libraries/NativeComponent/ViewConfig.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +27 -0
- package/Libraries/NativeModules/specs/NativeDevSettings.js +3 -1
- package/Libraries/Network/RCTFileRequestHandler.mm +3 -3
- package/Libraries/Network/RCTNetworking.macos.js +1 -1
- package/Libraries/Network/React-RCTNetwork.podspec +3 -3
- package/Libraries/NewAppScreen/components/DebugInstructions.js +2 -2
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +2 -2
- package/Libraries/Pressability/HoverState.js +2 -2
- package/Libraries/Pressability/Pressability.js +3 -3
- package/Libraries/Pressability/PressabilityDebug.js +5 -9
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.h +8 -8
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +69 -69
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +2 -2
- package/Libraries/RCTRequired/RCTRequired.podspec +1 -1
- package/Libraries/ReactNative/DummyUIManager.js +5 -3
- package/Libraries/ReactNative/PaperUIManager.js +1 -1
- package/Libraries/ReactNative/UIManager.js +1 -2
- package/Libraries/Settings/RCTSettingsManager.mm +6 -6
- package/Libraries/Settings/React-RCTSettings.podspec +2 -2
- package/Libraries/Settings/Settings.macos.js +1 -1
- package/Libraries/StyleSheet/EdgeInsetsPropType.js +4 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.macos.js +3 -2
- package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.js +3 -2
- package/Libraries/StyleSheet/PlatformColorValueTypesMacOS.macos.js +3 -2
- package/Libraries/StyleSheet/StyleSheetTypes.js +2 -2
- package/Libraries/StyleSheet/processTransform.js +1 -1
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +10 -2
- package/Libraries/Text/RCTConvert+Text.h +2 -2
- package/Libraries/Text/RCTTextAttributes.h +21 -13
- package/Libraries/Text/RCTTextAttributes.m +42 -18
- package/Libraries/Text/RCTTextUIKit.h +2 -0
- package/Libraries/Text/RawText/RCTRawTextShadowView.m +2 -2
- package/Libraries/Text/RawText/RCTRawTextViewManager.m +2 -2
- package/Libraries/Text/React-RCTText.podspec +2 -2
- package/Libraries/Text/Text/NSTextStorage+FontScaling.h +1 -1
- package/Libraries/Text/Text/NSTextStorage+FontScaling.m +1 -1
- package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
- package/Libraries/Text/Text/RCTTextShadowView.m +15 -15
- package/Libraries/Text/Text/RCTTextView.h +5 -5
- package/Libraries/Text/Text/RCTTextView.m +173 -108
- package/Libraries/Text/Text/RCTTextViewManager.m +6 -6
- package/Libraries/Text/Text.js +0 -14
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +72 -19
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +16 -3
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +12 -11
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +96 -73
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +8 -7
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h +9 -9
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +41 -41
- package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +19 -19
- package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +7 -7
- package/Libraries/Text/TextInput/RCTBaseTextInputView.h +12 -10
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +112 -63
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +38 -34
- package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.m +2 -2
- package/Libraries/Text/TextInput/RCTInputAccessoryView.h +2 -2
- package/Libraries/Text/TextInput/RCTInputAccessoryView.m +3 -3
- package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.h +2 -2
- package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.m +7 -7
- package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.m +1 -1
- package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.m +7 -7
- package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.m +2 -2
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +11 -11
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +73 -57
- package/Libraries/Text/TextInput/Singleline/macOS/RCTUISecureTextField.h +1 -1
- package/Libraries/Text/TextInput/Singleline/macOS/RCTUISecureTextField.m +1 -1
- package/Libraries/Text/TextNativeComponent.js +3 -1
- package/Libraries/Text/TextProps.js +29 -0
- package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.m +2 -2
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +2 -2
- package/Libraries/Types/CoreEventTypes.js +6 -6
- package/Libraries/Utilities/Appearance.js +2 -2
- package/Libraries/Utilities/BackHandler.macos.js +1 -1
- package/Libraries/Utilities/DevSettings.js +1 -1
- package/Libraries/Utilities/HMRClient.js +2 -6
- package/Libraries/Utilities/LoadingView.macos.js +1 -1
- package/Libraries/Utilities/Platform.macos.js +1 -1
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
- package/Libraries/Vibration/React-RCTVibration.podspec +2 -2
- package/Libraries/WebSocket/RCTSRWebSocket.m +9 -10
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +1 -1
- package/README.md +1 -1
- package/React/AppSetup/RCTAppSetupUtils.h +1 -1
- package/React/AppSetup/RCTAppSetupUtils.mm +1 -1
- package/React/Base/RCTAssert.h +30 -15
- package/React/Base/RCTAssert.m +59 -19
- package/React/Base/RCTBridge+Cxx.h +1 -1
- package/React/Base/RCTBridge+Cxx.mm +1 -1
- package/React/Base/RCTBridge.h +1 -1
- package/React/Base/RCTBridge.m +6 -4
- package/React/Base/RCTBridgeModule.h +4 -4
- package/React/Base/RCTBundleURLProvider.h +1 -1
- package/React/Base/RCTBundleURLProvider.mm +4 -4
- package/React/Base/RCTConstants.h +6 -0
- package/React/Base/RCTConstants.m +15 -0
- package/React/Base/RCTConvert.h +14 -14
- package/React/Base/RCTConvert.m +154 -157
- package/React/Base/RCTDisplayLink.m +8 -8
- package/React/Base/RCTEventDispatcherProtocol.h +6 -1
- package/React/Base/RCTFrameUpdate.h +2 -2
- package/React/Base/RCTFrameUpdate.m +2 -2
- package/React/Base/RCTImageSource.m +2 -2
- package/React/Base/RCTJSStackFrame.m +2 -2
- package/React/Base/RCTJSThread.h +1 -1
- package/React/Base/RCTJavaScriptLoader.h +1 -1
- package/React/Base/RCTJavaScriptLoader.mm +2 -2
- package/React/Base/RCTKeyCommands.m +2 -2
- package/React/Base/RCTModuleData.mm +2 -2
- package/React/Base/RCTModuleMethod.mm +2 -2
- package/React/Base/RCTMultipartDataTask.m +5 -5
- package/React/Base/RCTPlatformDisplayLink.h +1 -1
- package/React/Base/RCTRedBoxSetEnabled.m +1 -1
- package/React/Base/RCTReloadCommand.m +4 -4
- package/React/Base/RCTRootContentView.h +1 -1
- package/React/Base/RCTRootContentView.m +10 -10
- package/React/Base/RCTRootView.h +4 -4
- package/React/Base/RCTRootView.m +26 -26
- package/React/Base/RCTTouchEvent.m +2 -2
- package/React/Base/RCTTouchHandler.h +5 -5
- package/React/Base/RCTTouchHandler.m +72 -67
- package/React/Base/RCTUIKit.h +98 -26
- package/React/Base/RCTUtils.h +12 -12
- package/React/Base/RCTUtils.m +42 -39
- package/React/Base/RCTUtilsUIOverride.h +1 -1
- package/React/Base/RCTUtilsUIOverride.m +1 -1
- package/React/Base/RCTVersion.m +1 -5
- package/React/Base/RCTViewRegistry.m +2 -2
- package/React/Base/Surface/RCTSurfaceDelegate.h +1 -1
- package/React/Base/Surface/RCTSurfaceProtocol.h +1 -1
- package/React/Base/Surface/RCTSurfaceRootShadowViewDelegate.h +1 -1
- package/React/Base/Surface/RCTSurfaceRootView.h +1 -1
- package/React/Base/Surface/RCTSurfaceView.h +1 -1
- package/React/Base/Surface/RCTSurfaceView.mm +2 -2
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h +3 -3
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +5 -5
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h +3 -3
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +14 -15
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm +1 -1
- package/React/Base/macOS/RCTPlatform.m +1 -1
- package/React/Base/macOS/RCTPlatformDisplayLink.m +1 -1
- package/React/Base/macOS/RCTUIKit.m +87 -11
- package/React/CoreModules/CoreModulesPlugins.mm +6 -6
- package/React/CoreModules/RCTAccessibilityManager.h +1 -1
- package/React/CoreModules/RCTAccessibilityManager.mm +2 -2
- package/React/CoreModules/RCTActionSheetManager.h +1 -1
- package/React/CoreModules/RCTActionSheetManager.mm +31 -31
- package/React/CoreModules/RCTAlertController.h +7 -7
- package/React/CoreModules/RCTAlertController.m +6 -6
- package/React/CoreModules/RCTAlertManager.h +1 -1
- package/React/CoreModules/RCTAlertManager.mm +10 -10
- package/React/CoreModules/RCTAppState.mm +6 -6
- package/React/CoreModules/RCTAppearance.h +4 -4
- package/React/CoreModules/RCTAppearance.mm +16 -16
- package/React/CoreModules/RCTAsyncLocalStorage.mm +5 -6
- package/React/CoreModules/RCTClipboard.mm +7 -7
- package/React/CoreModules/RCTDevLoadingView.h +1 -1
- package/React/CoreModules/RCTDevLoadingView.mm +31 -31
- package/React/CoreModules/RCTDevMenu.h +3 -3
- package/React/CoreModules/RCTDevMenu.mm +40 -42
- package/React/CoreModules/RCTDevSettings.h +4 -4
- package/React/CoreModules/RCTDevSettings.mm +18 -18
- package/React/CoreModules/RCTDevSplitBundleLoader.h +1 -1
- package/React/CoreModules/RCTDeviceInfo.h +2 -2
- package/React/CoreModules/RCTDeviceInfo.mm +22 -22
- package/React/CoreModules/RCTEventDispatcher.mm +6 -1
- package/React/CoreModules/RCTFPSGraph.h +3 -3
- package/React/CoreModules/RCTFPSGraph.m +2 -2
- package/React/CoreModules/RCTKeyboardObserver.mm +8 -8
- package/React/CoreModules/RCTLogBox.h +2 -2
- package/React/CoreModules/RCTLogBox.mm +36 -20
- package/React/CoreModules/RCTLogBoxView.h +12 -9
- package/React/CoreModules/RCTLogBoxView.mm +67 -26
- package/React/CoreModules/RCTPerfMonitor.mm +1 -1
- package/React/CoreModules/RCTPlatform.mm +1 -1
- package/React/CoreModules/RCTRedBox.h +1 -1
- package/React/CoreModules/RCTRedBox.mm +24 -24
- package/React/CoreModules/RCTStatusBarManager.h +3 -3
- package/React/CoreModules/RCTStatusBarManager.mm +4 -4
- package/React/CoreModules/RCTTiming.mm +2 -2
- package/React/CoreModules/RCTWebSocketModule.mm +3 -3
- package/React/CoreModules/React-CoreModules.podspec +4 -4
- package/React/CxxBridge/RCTCxxBridge.mm +9 -9
- package/React/CxxModule/RCTCxxMethod.mm +2 -2
- package/React/DevSupport/RCTDevLoadingViewProtocol.h +2 -2
- package/React/DevSupport/RCTInspectorDevServerHelper.h +1 -1
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +8 -8
- package/React/DevSupport/RCTPackagerConnection.mm +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +2 -2
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -2
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +8 -8
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +75 -25
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +10 -5
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +10 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +5 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +23 -6
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +98 -34
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +19 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +3 -3
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +5 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +3 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +4 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +6 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +22 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +39 -5
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +9 -6
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +16 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +6 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +14 -4
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +41 -23
- package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -2
- package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
- package/React/Fabric/Mounting/RCTComponentViewFactory.mm +12 -3
- package/React/Fabric/Mounting/RCTComponentViewProtocol.h +4 -4
- package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -2
- package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +3 -1
- package/React/Fabric/Mounting/RCTMountingManager.h +4 -4
- package/React/Fabric/Mounting/RCTMountingManager.mm +30 -19
- package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
- package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
- package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
- package/React/Fabric/RCTConversions.h +17 -7
- package/React/Fabric/RCTImageResponseDelegate.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.h +1 -1
- package/React/Fabric/RCTLocalizationProvider.mm +10 -4
- package/React/Fabric/RCTScheduler.h +8 -1
- package/React/Fabric/RCTScheduler.mm +15 -0
- package/React/Fabric/RCTSurfacePresenter.h +10 -2
- package/React/Fabric/RCTSurfacePresenter.mm +59 -27
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
- package/React/Fabric/RCTSurfaceRegistry.h +1 -1
- package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
- package/React/Fabric/RCTSurfaceTouchHandler.mm +8 -9
- package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
- package/React/Fabric/Surface/RCTFabricSurface.mm +3 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Modules/RCTEventEmitter.h +7 -7
- package/React/Modules/RCTI18nUtil.m +1 -1
- package/React/Modules/RCTLayoutAnimation.h +1 -1
- package/React/Modules/RCTLayoutAnimation.m +14 -14
- package/React/Modules/RCTLayoutAnimationGroup.h +1 -1
- package/React/Modules/RCTLayoutAnimationGroup.m +2 -2
- package/React/Modules/RCTSurfacePresenterStub.h +6 -2
- package/React/Modules/RCTUIManager.h +12 -12
- package/React/Modules/RCTUIManager.m +100 -99
- package/React/Modules/RCTUIManagerObserverCoordinator.h +1 -1
- package/React/Modules/RCTUIManagerUtils.h +1 -1
- package/React/Profiler/RCTProfile.m +23 -23
- package/React/React-RCTFabric.podspec +2 -2
- package/React/UIUtils/RCTUIUtils.h +6 -6
- package/React/UIUtils/RCTUIUtils.m +3 -3
- package/React/Views/RCTActivityIndicatorView.h +4 -4
- package/React/Views/RCTActivityIndicatorView.m +4 -4
- package/React/Views/RCTActivityIndicatorViewManager.m +4 -4
- package/React/Views/RCTAnimationType.h +4 -4
- package/React/Views/RCTAutoInsetsProtocol.h +1 -1
- package/React/Views/RCTBorderDrawing.h +2 -2
- package/React/Views/RCTBorderDrawing.m +22 -22
- package/React/Views/RCTComponentData.h +3 -3
- package/React/Views/RCTComponentData.m +4 -4
- package/React/Views/RCTCursor.h +2 -2
- package/React/Views/RCTCursor.m +2 -2
- package/React/Views/RCTDatePicker.h +4 -4
- package/React/Views/RCTDatePicker.m +12 -12
- package/React/Views/RCTDatePickerManager.h +3 -3
- package/React/Views/RCTDatePickerManager.m +16 -16
- package/React/Views/RCTFont.h +1 -1
- package/React/Views/RCTFont.mm +9 -9
- package/React/Views/RCTFontSmoothing.h +1 -1
- package/React/Views/RCTLayout.h +1 -1
- package/React/Views/RCTMaskedView.h +1 -1
- package/React/Views/RCTModalHostView.h +2 -2
- package/React/Views/RCTModalHostViewController.h +1 -1
- package/React/Views/RCTModalManager.h +1 -1
- package/React/Views/RCTProgressView.h +6 -6
- package/React/Views/RCTProgressView.m +1 -1
- package/React/Views/RCTProgressViewManager.m +13 -13
- package/React/Views/RCTSegmentedControl.h +6 -6
- package/React/Views/RCTSegmentedControl.m +16 -16
- package/React/Views/RCTSegmentedControlManager.m +3 -3
- package/React/Views/RCTShadowView+Internal.h +1 -1
- package/React/Views/RCTShadowView+Layout.h +1 -1
- package/React/Views/RCTShadowView.h +4 -4
- package/React/Views/RCTShadowView.m +8 -8
- package/React/Views/RCTSlider.h +14 -10
- package/React/Views/RCTSlider.m +38 -38
- package/React/Views/RCTSliderManager.m +9 -9
- package/React/Views/RCTSwitch.h +2 -11
- package/React/Views/RCTSwitch.m +0 -20
- package/React/Views/RCTSwitchManager.m +8 -12
- package/React/Views/RCTView.h +15 -15
- package/React/Views/RCTView.m +121 -123
- package/React/Views/RCTViewKeyboardEvent.h +2 -2
- package/React/Views/RCTViewKeyboardEvent.m +4 -2
- package/React/Views/RCTViewManager.h +5 -5
- package/React/Views/RCTViewManager.m +51 -52
- package/React/Views/RCTViewUtils.h +2 -2
- package/React/Views/RCTViewUtils.m +3 -3
- package/React/Views/RCTWeakViewHolder.h +1 -1
- package/React/Views/RCTWrapperViewController.h +2 -2
- package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
- package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
- package/React/Views/SafeAreaView/RCTSafeAreaView.m +2 -2
- package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
- package/React/Views/ScrollView/RCTScrollContentShadowView.h +1 -1
- package/React/Views/ScrollView/RCTScrollContentShadowView.m +4 -4
- package/React/Views/ScrollView/RCTScrollContentView.h +3 -3
- package/React/Views/ScrollView/RCTScrollContentView.m +9 -9
- package/React/Views/ScrollView/RCTScrollContentViewManager.m +1 -1
- package/React/Views/ScrollView/RCTScrollEvent.m +3 -3
- package/React/Views/ScrollView/RCTScrollView.h +8 -8
- package/React/Views/ScrollView/RCTScrollView.m +154 -185
- package/React/Views/ScrollView/RCTScrollViewManager.h +2 -2
- package/React/Views/ScrollView/RCTScrollViewManager.m +27 -27
- package/React/Views/ScrollView/RCTScrollableProtocol.h +6 -6
- package/React/Views/UIView+Private.h +4 -4
- package/React/Views/UIView+React.h +12 -12
- package/React/Views/UIView+React.m +55 -55
- package/React-Core.podspec +5 -5
- package/React.podspec +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +0 -21
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +66 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -3
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/BundleLoadCallback.java +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +20 -8
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java +19 -0
- package/ReactAndroid/src/main/jni/Application.mk +1 -1
- package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
- package/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +5 -2
- package/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java +9 -0
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +2 -2
- package/ReactCommon/callinvoker/React-callinvoker.podspec +1 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -5
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- package/ReactCommon/hermes/inspector/Exceptions.h +6 -0
- package/ReactCommon/hermes/inspector/Inspector.cpp +5 -2
- package/ReactCommon/hermes/inspector/Inspector.h +14 -0
- package/ReactCommon/hermes/inspector/InspectorState.cpp +16 -8
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +6 -6
- package/ReactCommon/jsi/React-jsi.podspec +1 -1
- package/ReactCommon/jsi/jsi/jsi.h +1 -1
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
- package/ReactCommon/jsinspector/React-jsinspector.podspec +1 -1
- package/ReactCommon/logger/React-logger.podspec +1 -1
- package/ReactCommon/microprofiler/BUCK +1 -1
- package/ReactCommon/react/debug/react_native_assert.h +1 -1
- package/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.mm +4 -4
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
- package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
- package/ReactCommon/react/renderer/animations/conversions.h +11 -11
- package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
- package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
- package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
- package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
- package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
- package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
- package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
- package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
- package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
- package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
- package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
- package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
- package/ReactCommon/react/renderer/core/EventListener.h +44 -0
- package/ReactCommon/react/renderer/core/Props.h +0 -4
- package/ReactCommon/react/renderer/core/RawProps.h +1 -1
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
- package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
- package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
- package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
- package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
- package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
- package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
- package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
- package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
- package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
- package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +6 -9
- package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +38 -32
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +18 -1
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +7 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +40 -4
- package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm +5 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
- package/ReactCommon/react/utils/ContextContainer.h +2 -2
- package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
- package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
- package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
- package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +1 -1
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/index.js +9 -21
- package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
- package/package.json +4 -1
- package/scripts/generate-artifacts.js +12 -12
- package/scripts/react_native_pods.rb +3 -6
- package/template/Gemfile +1 -1
- package/template/Gemfile.lock +6 -6
- package/template/_flowconfig +1 -1
- package/template/_ruby-version +1 -1
- package/template/package.json +1 -1
- package/third-party-podspecs/DoubleConversion.podspec +1 -1
- package/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/boost.podspec +1 -1
- package/third-party-podspecs/glog.podspec +1 -1
- package/Libraries/Alert/AlertMacOS.js +0 -211
- package/Libraries/Components/View/PlatformViewPropTypes.macos.js +0 -16
- package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -374
- package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
- package/Libraries/ReactNative/UIManagerInjection.js +0 -15
- package/ReactCommon/butter/optional.h +0 -38
- package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
- package/third-party-podspecs/boost-for-react-native.podspec +0 -20
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <react/renderer/components/view/ViewProps.h>
|
|
11
|
+
#include <react/renderer/components/view/conversions.h>
|
|
12
|
+
#include <react/renderer/graphics/conversions.h>
|
|
13
|
+
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
14
|
+
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
|
15
|
+
|
|
16
|
+
#include <optional>
|
|
17
|
+
|
|
18
|
+
namespace facebook {
|
|
19
|
+
namespace react {
|
|
20
|
+
|
|
21
|
+
namespace {
|
|
22
|
+
// ViewProps values
|
|
23
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_ACTIONS = 0;
|
|
24
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_HINT = 1;
|
|
25
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_LABEL = 2;
|
|
26
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_LABELLED_BY = 3;
|
|
27
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_LIVE_REGION = 4;
|
|
28
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_ROLE = 5;
|
|
29
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_STATE = 6;
|
|
30
|
+
constexpr MapBuffer::Key VP_ACCESSIBILITY_VALUE = 7;
|
|
31
|
+
constexpr MapBuffer::Key VP_ACCESSIBLE = 8;
|
|
32
|
+
constexpr MapBuffer::Key VP_BACKFACE_VISIBILITY = 9;
|
|
33
|
+
constexpr MapBuffer::Key VP_BG_COLOR = 10;
|
|
34
|
+
constexpr MapBuffer::Key VP_BORDER_COLOR = 11;
|
|
35
|
+
constexpr MapBuffer::Key VP_BORDER_RADII = 12;
|
|
36
|
+
constexpr MapBuffer::Key VP_BORDER_STYLE = 13;
|
|
37
|
+
constexpr MapBuffer::Key VP_COLLAPSABLE = 14;
|
|
38
|
+
constexpr MapBuffer::Key VP_ELEVATION = 15;
|
|
39
|
+
constexpr MapBuffer::Key VP_FOCUSABLE = 16;
|
|
40
|
+
constexpr MapBuffer::Key VP_HAS_TV_FOCUS = 17;
|
|
41
|
+
constexpr MapBuffer::Key VP_HIT_SLOP = 18;
|
|
42
|
+
constexpr MapBuffer::Key VP_IMPORTANT_FOR_ACCESSIBILITY = 19;
|
|
43
|
+
constexpr MapBuffer::Key VP_NATIVE_BACKGROUND = 20;
|
|
44
|
+
constexpr MapBuffer::Key VP_NATIVE_FOREGROUND = 21;
|
|
45
|
+
constexpr MapBuffer::Key VP_NATIVE_ID = 22;
|
|
46
|
+
constexpr MapBuffer::Key VP_OFFSCREEN_ALPHA_COMPOSITING = 23;
|
|
47
|
+
constexpr MapBuffer::Key VP_OPACITY = 24;
|
|
48
|
+
constexpr MapBuffer::Key VP_POINTER_EVENTS = 25;
|
|
49
|
+
constexpr MapBuffer::Key VP_POINTER_ENTER = 26;
|
|
50
|
+
constexpr MapBuffer::Key VP_POINTER_LEAVE = 27;
|
|
51
|
+
constexpr MapBuffer::Key VP_POINTER_MOVE = 28;
|
|
52
|
+
constexpr MapBuffer::Key VP_REMOVE_CLIPPED_SUBVIEW = 29;
|
|
53
|
+
constexpr MapBuffer::Key VP_RENDER_TO_HARDWARE_TEXTURE = 30;
|
|
54
|
+
constexpr MapBuffer::Key VP_SHADOW_COLOR = 31;
|
|
55
|
+
constexpr MapBuffer::Key VP_TEST_ID = 32;
|
|
56
|
+
constexpr MapBuffer::Key VP_TRANSFORM = 33;
|
|
57
|
+
constexpr MapBuffer::Key VP_ZINDEX = 34;
|
|
58
|
+
|
|
59
|
+
// Yoga values
|
|
60
|
+
constexpr MapBuffer::Key YG_BORDER_WIDTH = 100;
|
|
61
|
+
constexpr MapBuffer::Key YG_OVERFLOW = 101;
|
|
62
|
+
|
|
63
|
+
// AccessibilityAction values
|
|
64
|
+
constexpr MapBuffer::Key ACCESSIBILITY_ACTION_NAME = 0;
|
|
65
|
+
constexpr MapBuffer::Key ACCESSIBILITY_ACTION_LABEL = 1;
|
|
66
|
+
|
|
67
|
+
static MapBuffer convertAccessibilityActions(
|
|
68
|
+
std::vector<AccessibilityAction> const &actions) {
|
|
69
|
+
MapBufferBuilder builder(actions.size());
|
|
70
|
+
for (auto i = 0; i < actions.size(); i++) {
|
|
71
|
+
auto const &action = actions[i];
|
|
72
|
+
MapBufferBuilder actionsBuilder(2);
|
|
73
|
+
actionsBuilder.putString(ACCESSIBILITY_ACTION_NAME, action.name);
|
|
74
|
+
if (action.label.has_value()) {
|
|
75
|
+
actionsBuilder.putString(
|
|
76
|
+
ACCESSIBILITY_ACTION_LABEL, action.label.value());
|
|
77
|
+
}
|
|
78
|
+
builder.putMapBuffer(i, actionsBuilder.build());
|
|
79
|
+
}
|
|
80
|
+
return builder.build();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static MapBuffer convertAccessibilityLabelledBy(
|
|
84
|
+
AccessibilityLabelledBy const &labelledBy) {
|
|
85
|
+
MapBufferBuilder builder(labelledBy.value.size());
|
|
86
|
+
for (auto i = 0; i < labelledBy.value.size(); i++) {
|
|
87
|
+
builder.putString(i, labelledBy.value[i]);
|
|
88
|
+
}
|
|
89
|
+
return builder.build();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// AccessibilityState values
|
|
93
|
+
constexpr MapBuffer::Key ACCESSIBILITY_STATE_BUSY = 0;
|
|
94
|
+
constexpr MapBuffer::Key ACCESSIBILITY_STATE_DISABLED = 1;
|
|
95
|
+
constexpr MapBuffer::Key ACCESSIBILITY_STATE_EXPANDED = 2;
|
|
96
|
+
constexpr MapBuffer::Key ACCESSIBILITY_STATE_SELECTED = 3;
|
|
97
|
+
constexpr MapBuffer::Key ACCESSIBILITY_STATE_CHECKED = 4;
|
|
98
|
+
|
|
99
|
+
MapBuffer convertAccessibilityState(AccessibilityState const &state) {
|
|
100
|
+
MapBufferBuilder builder(5);
|
|
101
|
+
builder.putBool(ACCESSIBILITY_STATE_BUSY, state.busy);
|
|
102
|
+
builder.putBool(ACCESSIBILITY_STATE_DISABLED, state.disabled);
|
|
103
|
+
builder.putBool(ACCESSIBILITY_STATE_EXPANDED, state.expanded);
|
|
104
|
+
builder.putBool(ACCESSIBILITY_STATE_SELECTED, state.selected);
|
|
105
|
+
int checked;
|
|
106
|
+
switch (state.checked) {
|
|
107
|
+
case AccessibilityState::Unchecked:
|
|
108
|
+
checked = 0;
|
|
109
|
+
break;
|
|
110
|
+
case AccessibilityState::Checked:
|
|
111
|
+
checked = 1;
|
|
112
|
+
break;
|
|
113
|
+
case AccessibilityState::Mixed:
|
|
114
|
+
checked = 2;
|
|
115
|
+
break;
|
|
116
|
+
case AccessibilityState::None:
|
|
117
|
+
checked = 3;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
builder.putInt(ACCESSIBILITY_STATE_CHECKED, checked);
|
|
121
|
+
return builder.build();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
inline void putOptionalColor(
|
|
125
|
+
MapBufferBuilder &builder,
|
|
126
|
+
MapBuffer::Key key,
|
|
127
|
+
std::optional<SharedColor> const &color) {
|
|
128
|
+
builder.putInt(key, color.has_value() ? toAndroidRepr(color.value()) : -1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
constexpr MapBuffer::Key EDGE_TOP = 0;
|
|
132
|
+
constexpr MapBuffer::Key EDGE_LEFT = 1;
|
|
133
|
+
constexpr MapBuffer::Key EDGE_RIGHT = 2;
|
|
134
|
+
constexpr MapBuffer::Key EDGE_BOTTOM = 3;
|
|
135
|
+
constexpr MapBuffer::Key EDGE_START = 4;
|
|
136
|
+
constexpr MapBuffer::Key EDGE_END = 5;
|
|
137
|
+
constexpr MapBuffer::Key EDGE_ALL = 6;
|
|
138
|
+
|
|
139
|
+
MapBuffer convertBorderColors(CascadedBorderColors const &colors) {
|
|
140
|
+
MapBufferBuilder builder(7);
|
|
141
|
+
putOptionalColor(builder, EDGE_TOP, colors.top);
|
|
142
|
+
putOptionalColor(builder, EDGE_RIGHT, colors.right);
|
|
143
|
+
putOptionalColor(builder, EDGE_BOTTOM, colors.bottom);
|
|
144
|
+
putOptionalColor(builder, EDGE_LEFT, colors.left);
|
|
145
|
+
putOptionalColor(builder, EDGE_START, colors.start);
|
|
146
|
+
putOptionalColor(builder, EDGE_END, colors.end);
|
|
147
|
+
putOptionalColor(builder, EDGE_ALL, colors.all);
|
|
148
|
+
return builder.build();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
constexpr MapBuffer::Key CORNER_TOP_LEFT = 0;
|
|
152
|
+
constexpr MapBuffer::Key CORNER_TOP_RIGHT = 1;
|
|
153
|
+
constexpr MapBuffer::Key CORNER_BOTTOM_RIGHT = 2;
|
|
154
|
+
constexpr MapBuffer::Key CORNER_BOTTOM_LEFT = 3;
|
|
155
|
+
constexpr MapBuffer::Key CORNER_TOP_START = 4;
|
|
156
|
+
constexpr MapBuffer::Key CORNER_TOP_END = 5;
|
|
157
|
+
constexpr MapBuffer::Key CORNER_BOTTOM_END = 6;
|
|
158
|
+
constexpr MapBuffer::Key CORNER_BOTTOM_START = 7;
|
|
159
|
+
constexpr MapBuffer::Key CORNER_ALL = 8;
|
|
160
|
+
|
|
161
|
+
inline void putOptionalFloat(
|
|
162
|
+
MapBufferBuilder &builder,
|
|
163
|
+
MapBuffer::Key key,
|
|
164
|
+
std::optional<Float> const &value) {
|
|
165
|
+
builder.putDouble(key, value.value_or(NAN));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
MapBuffer convertBorderRadii(CascadedBorderRadii const &radii) {
|
|
169
|
+
MapBufferBuilder builder(9);
|
|
170
|
+
putOptionalFloat(builder, CORNER_TOP_LEFT, radii.topLeft);
|
|
171
|
+
putOptionalFloat(builder, CORNER_TOP_RIGHT, radii.topRight);
|
|
172
|
+
putOptionalFloat(builder, CORNER_BOTTOM_RIGHT, radii.bottomRight);
|
|
173
|
+
putOptionalFloat(builder, CORNER_BOTTOM_LEFT, radii.bottomLeft);
|
|
174
|
+
putOptionalFloat(builder, CORNER_TOP_START, radii.topStart);
|
|
175
|
+
putOptionalFloat(builder, CORNER_TOP_END, radii.topEnd);
|
|
176
|
+
putOptionalFloat(builder, CORNER_BOTTOM_END, radii.bottomEnd);
|
|
177
|
+
putOptionalFloat(builder, CORNER_BOTTOM_START, radii.bottomStart);
|
|
178
|
+
putOptionalFloat(builder, CORNER_ALL, radii.all);
|
|
179
|
+
return builder.build();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
MapBuffer convertBorderWidths(YGStyle::Edges const &border) {
|
|
183
|
+
MapBufferBuilder builder(7);
|
|
184
|
+
putOptionalFloat(
|
|
185
|
+
builder, EDGE_TOP, optionalFloatFromYogaValue(border[YGEdgeTop]));
|
|
186
|
+
putOptionalFloat(
|
|
187
|
+
builder, EDGE_RIGHT, optionalFloatFromYogaValue(border[YGEdgeRight]));
|
|
188
|
+
putOptionalFloat(
|
|
189
|
+
builder, EDGE_BOTTOM, optionalFloatFromYogaValue(border[YGEdgeBottom]));
|
|
190
|
+
putOptionalFloat(
|
|
191
|
+
builder, EDGE_LEFT, optionalFloatFromYogaValue(border[YGEdgeLeft]));
|
|
192
|
+
putOptionalFloat(
|
|
193
|
+
builder, EDGE_START, optionalFloatFromYogaValue(border[YGEdgeStart]));
|
|
194
|
+
putOptionalFloat(
|
|
195
|
+
builder, EDGE_END, optionalFloatFromYogaValue(border[YGEdgeEnd]));
|
|
196
|
+
putOptionalFloat(
|
|
197
|
+
builder, EDGE_ALL, optionalFloatFromYogaValue(border[YGEdgeAll]));
|
|
198
|
+
return builder.build();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
MapBuffer convertEdgeInsets(EdgeInsets const &insets) {
|
|
202
|
+
MapBufferBuilder builder(4);
|
|
203
|
+
builder.putDouble(EDGE_TOP, insets.top);
|
|
204
|
+
builder.putDouble(EDGE_RIGHT, insets.right);
|
|
205
|
+
builder.putDouble(EDGE_BOTTOM, insets.bottom);
|
|
206
|
+
builder.putDouble(EDGE_LEFT, insets.left);
|
|
207
|
+
return builder.build();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
#ifdef ANDROID
|
|
211
|
+
|
|
212
|
+
constexpr MapBuffer::Key NATIVE_DRAWABLE_KIND = 0;
|
|
213
|
+
constexpr MapBuffer::Key NATIVE_DRAWABLE_ATTRIBUTE = 1;
|
|
214
|
+
constexpr MapBuffer::Key NATIVE_DRAWABLE_COLOR = 2;
|
|
215
|
+
constexpr MapBuffer::Key NATIVE_DRAWABLE_BORDERLESS = 3;
|
|
216
|
+
constexpr MapBuffer::Key NATIVE_DRAWABLE_RIPPLE_RADIUS = 4;
|
|
217
|
+
|
|
218
|
+
MapBuffer convertNativeBackground(std::optional<NativeDrawable> const &value) {
|
|
219
|
+
if (!value.has_value()) {
|
|
220
|
+
return MapBufferBuilder::EMPTY();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
auto const &drawable = value.value();
|
|
224
|
+
MapBufferBuilder builder(4);
|
|
225
|
+
switch (drawable.kind) {
|
|
226
|
+
case NativeDrawable::Kind::ThemeAttr:
|
|
227
|
+
builder.putInt(NATIVE_DRAWABLE_KIND, 0);
|
|
228
|
+
builder.putString(NATIVE_DRAWABLE_ATTRIBUTE, drawable.themeAttr);
|
|
229
|
+
break;
|
|
230
|
+
case NativeDrawable::Kind::Ripple:
|
|
231
|
+
builder.putInt(NATIVE_DRAWABLE_KIND, 1);
|
|
232
|
+
if (drawable.ripple.color.has_value()) {
|
|
233
|
+
builder.putInt(NATIVE_DRAWABLE_COLOR, drawable.ripple.color.value());
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
builder.putBool(NATIVE_DRAWABLE_BORDERLESS, drawable.ripple.borderless);
|
|
237
|
+
if (drawable.ripple.rippleRadius.has_value()) {
|
|
238
|
+
builder.putDouble(
|
|
239
|
+
NATIVE_DRAWABLE_RIPPLE_RADIUS,
|
|
240
|
+
drawable.ripple.rippleRadius.value());
|
|
241
|
+
}
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
return builder.build();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
#endif
|
|
248
|
+
|
|
249
|
+
MapBuffer convertTransform(Transform const &transform) {
|
|
250
|
+
MapBufferBuilder builder(16);
|
|
251
|
+
for (int32_t i = 0; i < transform.matrix.size(); i++) {
|
|
252
|
+
builder.putDouble(i, transform.matrix[i]);
|
|
253
|
+
}
|
|
254
|
+
return builder.build();
|
|
255
|
+
}
|
|
256
|
+
} // namespace
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Diffs two sets of ViewProps into MapBuffer.
|
|
260
|
+
* TODO: Currently unsupported: nextFocusForward/Left/Up/Right/Down
|
|
261
|
+
*/
|
|
262
|
+
static inline MapBuffer viewPropsDiff(
|
|
263
|
+
ViewProps const &oldProps,
|
|
264
|
+
ViewProps const &newProps) {
|
|
265
|
+
MapBufferBuilder builder;
|
|
266
|
+
if (oldProps.accessibilityActions != newProps.accessibilityActions) {
|
|
267
|
+
builder.putMapBuffer(
|
|
268
|
+
VP_ACCESSIBILITY_ACTIONS,
|
|
269
|
+
convertAccessibilityActions(newProps.accessibilityActions));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (oldProps.accessibilityHint != newProps.accessibilityHint) {
|
|
273
|
+
builder.putString(VP_ACCESSIBILITY_HINT, newProps.accessibilityHint);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if (oldProps.accessibilityLabel != newProps.accessibilityLabel) {
|
|
277
|
+
builder.putString(VP_ACCESSIBILITY_LABEL, newProps.accessibilityLabel);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if (oldProps.accessibilityLabelledBy != newProps.accessibilityLabelledBy) {
|
|
281
|
+
builder.putMapBuffer(
|
|
282
|
+
VP_ACCESSIBILITY_LABELLED_BY,
|
|
283
|
+
convertAccessibilityLabelledBy(newProps.accessibilityLabelledBy));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (oldProps.accessibilityLiveRegion != newProps.accessibilityLiveRegion) {
|
|
287
|
+
int value;
|
|
288
|
+
switch (newProps.accessibilityLiveRegion) {
|
|
289
|
+
case AccessibilityLiveRegion::None:
|
|
290
|
+
value = 0;
|
|
291
|
+
break;
|
|
292
|
+
case AccessibilityLiveRegion::Polite:
|
|
293
|
+
value = 1;
|
|
294
|
+
break;
|
|
295
|
+
case AccessibilityLiveRegion::Assertive:
|
|
296
|
+
value = 2;
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
299
|
+
builder.putInt(VP_ACCESSIBILITY_LIVE_REGION, value);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if (oldProps.accessibilityRole != newProps.accessibilityRole) {
|
|
303
|
+
builder.putString(VP_ACCESSIBILITY_ROLE, newProps.accessibilityRole);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (oldProps.accessibilityState != newProps.accessibilityState) {
|
|
307
|
+
builder.putMapBuffer(
|
|
308
|
+
VP_ACCESSIBILITY_STATE,
|
|
309
|
+
convertAccessibilityState(newProps.accessibilityState));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
if (oldProps.accessibilityValue != newProps.accessibilityValue) {
|
|
313
|
+
builder.putString(
|
|
314
|
+
VP_ACCESSIBILITY_VALUE, newProps.accessibilityValue.text.value_or(""));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (oldProps.accessible != newProps.accessible) {
|
|
318
|
+
builder.putBool(VP_ACCESSIBLE, newProps.accessible);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (oldProps.backfaceVisibility != newProps.backfaceVisibility) {
|
|
322
|
+
int value;
|
|
323
|
+
switch (newProps.backfaceVisibility) {
|
|
324
|
+
case BackfaceVisibility::Auto:
|
|
325
|
+
value = 0;
|
|
326
|
+
break;
|
|
327
|
+
case BackfaceVisibility::Visible:
|
|
328
|
+
value = 1;
|
|
329
|
+
break;
|
|
330
|
+
case BackfaceVisibility::Hidden:
|
|
331
|
+
value = 2;
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
builder.putInt(VP_BACKFACE_VISIBILITY, value);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (oldProps.backgroundColor != newProps.backgroundColor) {
|
|
338
|
+
builder.putInt(VP_BG_COLOR, toAndroidRepr(newProps.backgroundColor));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
if (oldProps.borderColors != newProps.borderColors) {
|
|
342
|
+
builder.putMapBuffer(
|
|
343
|
+
VP_BORDER_COLOR, convertBorderColors(newProps.borderColors));
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (oldProps.borderRadii != newProps.borderRadii) {
|
|
347
|
+
builder.putMapBuffer(
|
|
348
|
+
VP_BORDER_RADII, convertBorderRadii(newProps.borderRadii));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (oldProps.borderStyles != newProps.borderStyles) {
|
|
352
|
+
int value = -1;
|
|
353
|
+
if (newProps.borderStyles.all.has_value()) {
|
|
354
|
+
switch (newProps.borderStyles.all.value()) {
|
|
355
|
+
case BorderStyle::Solid:
|
|
356
|
+
value = 0;
|
|
357
|
+
break;
|
|
358
|
+
case BorderStyle::Dotted:
|
|
359
|
+
value = 1;
|
|
360
|
+
break;
|
|
361
|
+
case BorderStyle::Dashed:
|
|
362
|
+
value = 2;
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
builder.putInt(VP_BORDER_STYLE, value);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (oldProps.elevation != newProps.elevation) {
|
|
370
|
+
builder.putDouble(VP_ELEVATION, newProps.elevation);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
#ifdef ANDROID
|
|
374
|
+
if (oldProps.focusable != newProps.focusable) {
|
|
375
|
+
builder.putBool(VP_FOCUSABLE, newProps.focusable);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if (oldProps.hasTVPreferredFocus != newProps.hasTVPreferredFocus) {
|
|
379
|
+
builder.putBool(VP_HAS_TV_FOCUS, newProps.hasTVPreferredFocus);
|
|
380
|
+
}
|
|
381
|
+
#endif
|
|
382
|
+
|
|
383
|
+
if (oldProps.hitSlop != newProps.hitSlop) {
|
|
384
|
+
builder.putMapBuffer(VP_HIT_SLOP, convertEdgeInsets(newProps.hitSlop));
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if (oldProps.importantForAccessibility !=
|
|
388
|
+
newProps.importantForAccessibility) {
|
|
389
|
+
int value;
|
|
390
|
+
switch (newProps.importantForAccessibility) {
|
|
391
|
+
case ImportantForAccessibility::Auto:
|
|
392
|
+
value = 0;
|
|
393
|
+
break;
|
|
394
|
+
case ImportantForAccessibility::Yes:
|
|
395
|
+
value = 1;
|
|
396
|
+
break;
|
|
397
|
+
case ImportantForAccessibility::No:
|
|
398
|
+
value = 2;
|
|
399
|
+
break;
|
|
400
|
+
case ImportantForAccessibility::NoHideDescendants:
|
|
401
|
+
value = 3;
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
builder.putInt(VP_IMPORTANT_FOR_ACCESSIBILITY, value);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
#ifdef ANDROID
|
|
408
|
+
if (oldProps.nativeBackground != newProps.nativeBackground) {
|
|
409
|
+
builder.putMapBuffer(
|
|
410
|
+
VP_NATIVE_BACKGROUND,
|
|
411
|
+
convertNativeBackground(newProps.nativeBackground));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (oldProps.nativeForeground != newProps.nativeForeground) {
|
|
415
|
+
builder.putMapBuffer(
|
|
416
|
+
VP_NATIVE_FOREGROUND,
|
|
417
|
+
convertNativeBackground(newProps.nativeForeground));
|
|
418
|
+
}
|
|
419
|
+
#endif
|
|
420
|
+
|
|
421
|
+
if (oldProps.nativeId != newProps.nativeId) {
|
|
422
|
+
builder.putString(VP_NATIVE_ID, newProps.nativeId);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
#ifdef ANDROID
|
|
426
|
+
if (oldProps.needsOffscreenAlphaCompositing !=
|
|
427
|
+
newProps.needsOffscreenAlphaCompositing) {
|
|
428
|
+
builder.putBool(
|
|
429
|
+
VP_OFFSCREEN_ALPHA_COMPOSITING,
|
|
430
|
+
newProps.needsOffscreenAlphaCompositing);
|
|
431
|
+
}
|
|
432
|
+
#endif
|
|
433
|
+
|
|
434
|
+
if (oldProps.opacity != newProps.opacity) {
|
|
435
|
+
builder.putDouble(VP_OPACITY, newProps.opacity);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (oldProps.pointerEvents != newProps.pointerEvents) {
|
|
439
|
+
int value;
|
|
440
|
+
switch (newProps.pointerEvents) {
|
|
441
|
+
case PointerEventsMode::Auto:
|
|
442
|
+
value = 0;
|
|
443
|
+
break;
|
|
444
|
+
case PointerEventsMode::None:
|
|
445
|
+
value = 1;
|
|
446
|
+
break;
|
|
447
|
+
case PointerEventsMode::BoxNone:
|
|
448
|
+
value = 2;
|
|
449
|
+
break;
|
|
450
|
+
case PointerEventsMode::BoxOnly:
|
|
451
|
+
value = 3;
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
builder.putInt(VP_POINTER_EVENTS, value);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
if (oldProps.events != newProps.events) {
|
|
459
|
+
builder.putBool(
|
|
460
|
+
VP_POINTER_ENTER, newProps.events[ViewEvents::Offset::PointerEnter]);
|
|
461
|
+
builder.putBool(
|
|
462
|
+
VP_POINTER_LEAVE, newProps.events[ViewEvents::Offset::PointerLeave]);
|
|
463
|
+
builder.putBool(
|
|
464
|
+
VP_POINTER_MOVE, newProps.events[ViewEvents::Offset::PointerMove]);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (oldProps.removeClippedSubviews != newProps.removeClippedSubviews) {
|
|
468
|
+
builder.putBool(VP_REMOVE_CLIPPED_SUBVIEW, newProps.removeClippedSubviews);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
#ifdef ANDROID
|
|
472
|
+
if (oldProps.renderToHardwareTextureAndroid !=
|
|
473
|
+
newProps.renderToHardwareTextureAndroid) {
|
|
474
|
+
builder.putBool(
|
|
475
|
+
VP_RENDER_TO_HARDWARE_TEXTURE, newProps.renderToHardwareTextureAndroid);
|
|
476
|
+
}
|
|
477
|
+
#endif
|
|
478
|
+
|
|
479
|
+
if (oldProps.shadowColor != newProps.shadowColor) {
|
|
480
|
+
builder.putInt(VP_SHADOW_COLOR, toAndroidRepr(newProps.shadowColor));
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (oldProps.testId != newProps.testId) {
|
|
484
|
+
builder.putString(VP_TEST_ID, newProps.testId);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// TODO: seems like transform covers rotation/translate/scale/skew?
|
|
488
|
+
|
|
489
|
+
if (oldProps.transform != newProps.transform) {
|
|
490
|
+
builder.putMapBuffer(VP_TRANSFORM, convertTransform(newProps.transform));
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
if (oldProps.zIndex != newProps.zIndex) {
|
|
494
|
+
builder.putInt(VP_ZINDEX, newProps.zIndex.value_or(0));
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (oldProps.yogaStyle != newProps.yogaStyle) {
|
|
498
|
+
auto const &oldStyle = oldProps.yogaStyle;
|
|
499
|
+
auto const &newStyle = newProps.yogaStyle;
|
|
500
|
+
|
|
501
|
+
if (!(oldStyle.border() == newStyle.border())) {
|
|
502
|
+
builder.putMapBuffer(
|
|
503
|
+
YG_BORDER_WIDTH, convertBorderWidths(newStyle.border()));
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (oldStyle.overflow() != newStyle.overflow()) {
|
|
507
|
+
int value;
|
|
508
|
+
switch (newStyle.overflow()) {
|
|
509
|
+
case YGOverflowVisible:
|
|
510
|
+
value = 0;
|
|
511
|
+
break;
|
|
512
|
+
case YGOverflowHidden:
|
|
513
|
+
value = 1;
|
|
514
|
+
break;
|
|
515
|
+
case YGOverflowScroll:
|
|
516
|
+
value = 2;
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
builder.putInt(YG_OVERFLOW, value);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
return builder.build();
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
} // namespace react
|
|
527
|
+
} // namespace facebook
|
package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java
CHANGED
|
@@ -15,6 +15,7 @@ import android.content.Context;
|
|
|
15
15
|
import android.os.Build;
|
|
16
16
|
import android.view.View;
|
|
17
17
|
import android.view.WindowInsets;
|
|
18
|
+
import android.view.WindowInsetsController;
|
|
18
19
|
import android.view.WindowManager;
|
|
19
20
|
import androidx.annotation.Nullable;
|
|
20
21
|
import androidx.core.view.ViewCompat;
|
|
@@ -184,12 +185,23 @@ public class StatusBarModule extends NativeStatusBarManagerAndroidSpec {
|
|
|
184
185
|
return;
|
|
185
186
|
}
|
|
186
187
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
UiThreadUtil.runOnUiThread(
|
|
189
|
+
new Runnable() {
|
|
190
|
+
@TargetApi(Build.VERSION_CODES.R)
|
|
191
|
+
@Override
|
|
192
|
+
public void run() {
|
|
193
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
194
|
+
WindowInsetsController insetsController = activity.getWindow().getInsetsController();
|
|
195
|
+
if ("dark-content".equals(style)) {
|
|
196
|
+
// dark-content means dark icons on a light status bar
|
|
197
|
+
insetsController.setSystemBarsAppearance(
|
|
198
|
+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
|
|
199
|
+
WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS);
|
|
200
|
+
} else {
|
|
201
|
+
insetsController.setSystemBarsAppearance(
|
|
202
|
+
0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS);
|
|
203
|
+
}
|
|
204
|
+
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
193
205
|
View decorView = activity.getWindow().getDecorView();
|
|
194
206
|
int systemUiVisibilityFlags = decorView.getSystemUiVisibility();
|
|
195
207
|
if ("dark-content".equals(style)) {
|
|
@@ -199,7 +211,7 @@ public class StatusBarModule extends NativeStatusBarManagerAndroidSpec {
|
|
|
199
211
|
}
|
|
200
212
|
decorView.setSystemUiVisibility(systemUiVisibilityFlags);
|
|
201
213
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
214
|
+
}
|
|
215
|
+
});
|
|
204
216
|
}
|
|
205
217
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java
CHANGED
|
@@ -13,14 +13,10 @@ import com.facebook.react.common.MapBuilder;
|
|
|
13
13
|
|
|
14
14
|
import java.util.Map;
|
|
15
15
|
|
|
16
|
-
// [TODO(macOS GH#944)
|
|
17
|
-
// Note: Be careful not to override these version numbers
|
|
18
|
-
// when we merge upstream stable branches into main
|
|
19
|
-
// TODO(macOS GH#944)]
|
|
20
16
|
public class ReactNativeVersion {
|
|
21
17
|
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
|
22
18
|
"major", 0,
|
|
23
19
|
"minor", 0,
|
|
24
20
|
"patch", 0,
|
|
25
|
-
"prerelease", "
|
|
21
|
+
"prerelease", "af7baddd2");
|
|
26
22
|
}
|
|
@@ -40,7 +40,6 @@ import com.facebook.react.bridge.UiThreadUtil;
|
|
|
40
40
|
import com.facebook.react.bridge.WritableMap;
|
|
41
41
|
import com.facebook.react.common.MapBuilder;
|
|
42
42
|
import com.facebook.react.common.ReactConstants;
|
|
43
|
-
import com.facebook.react.config.ReactFeatureFlags;
|
|
44
43
|
import com.facebook.react.module.annotations.ReactModule;
|
|
45
44
|
import com.facebook.react.uimanager.common.ViewUtil;
|
|
46
45
|
import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener;
|
|
@@ -288,16 +287,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
|
|
288
287
|
@Deprecated
|
|
289
288
|
@Override
|
|
290
289
|
public void preInitializeViewManagers(List<String> viewManagerNames) {
|
|
291
|
-
if (ReactFeatureFlags.enableExperimentalStaticViewConfigs) {
|
|
292
|
-
for (String viewManagerName : viewManagerNames) {
|
|
293
|
-
mUIImplementation.resolveViewManager(viewManagerName);
|
|
294
|
-
}
|
|
295
|
-
// When Static view configs are enabled it is not necessary to pre-compute the constants for
|
|
296
|
-
// viewManagers, although the pre-initialization of viewManager objects is still necessary
|
|
297
|
-
// for performance reasons.
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
290
|
Map<String, WritableMap> constantsMap = new ArrayMap<>();
|
|
302
291
|
for (String viewManagerName : viewManagerNames) {
|
|
303
292
|
WritableMap constants = computeConstantsForViewManager(viewManagerName);
|
|
@@ -39,6 +39,7 @@ public class ColorUtil {
|
|
|
39
39
|
/**
|
|
40
40
|
* Gets the opacity from a color. Inspired by Android ColorDrawable.
|
|
41
41
|
*
|
|
42
|
+
* @param color color to get opacity from
|
|
42
43
|
* @return opacity expressed by one of PixelFormat constants
|
|
43
44
|
*/
|
|
44
45
|
public static int getOpacityFromColor(int color) {
|
|
@@ -51,4 +52,22 @@ public class ColorUtil {
|
|
|
51
52
|
return PixelFormat.TRANSLUCENT;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Converts individual {r, g, b, a} channel values to a single integer representation of the color
|
|
58
|
+
* as 0xAARRGGBB.
|
|
59
|
+
*
|
|
60
|
+
* @param r red channel value, [0, 255]
|
|
61
|
+
* @param g green channel value, [0, 255]
|
|
62
|
+
* @param b blue channel value, [0, 255]
|
|
63
|
+
* @param a alpha channel value, [0, 1]
|
|
64
|
+
* @return integer representation of the color as 0xAARRGGBB
|
|
65
|
+
*/
|
|
66
|
+
public static int normalize(double r, double g, double b, double a) {
|
|
67
|
+
return (clamp255(a * 255) << 24) | (clamp255(r) << 16) | (clamp255(g) << 8) | clamp255(b);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private static int clamp255(double value) {
|
|
71
|
+
return Math.max(0, Math.min(255, (int) Math.round(value)));
|
|
72
|
+
}
|
|
54
73
|
}
|
|
@@ -27,7 +27,7 @@ NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSE
|
|
|
27
27
|
APP_STL := c++_shared
|
|
28
28
|
|
|
29
29
|
APP_CFLAGS := -Wall -Werror -fexceptions -frtti -DWITH_INSPECTOR=1
|
|
30
|
-
APP_CPPFLAGS := -std=c++
|
|
30
|
+
APP_CPPFLAGS := -std=c++17
|
|
31
31
|
# Make sure every shared lib includes a .note.gnu.build-id header
|
|
32
32
|
APP_LDFLAGS := -Wl,--build-id
|
|
33
33
|
|
|
@@ -22,7 +22,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
|
22
22
|
# ./../ == react
|
|
23
23
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
|
24
24
|
|
|
25
|
-
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|
25
|
+
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture -std=c++17
|
|
26
26
|
|
|
27
27
|
LOCAL_LDLIBS += -landroid
|
|
28
28
|
|
|
@@ -79,7 +79,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
|
79
79
|
# ./../ == react
|
|
80
80
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
|
81
81
|
|
|
82
|
-
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|
82
|
+
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture -std=c++17
|
|
83
83
|
|
|
84
84
|
LOCAL_LDLIBS += -landroid
|
|
85
85
|
|
|
@@ -2,9 +2,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r
|
|
|
2
2
|
|
|
3
3
|
rn_robolectric_test(
|
|
4
4
|
name = "views",
|
|
5
|
-
# TODO Disabled temporarily until
|
|
5
|
+
# TODO (T110934492): Disabled temporarily until tests are fixed
|
|
6
6
|
# srcs = glob(['**/*.java']),
|
|
7
|
-
srcs = glob([
|
|
7
|
+
srcs = glob([
|
|
8
|
+
"image/*.java",
|
|
9
|
+
"view/*.java",
|
|
10
|
+
]),
|
|
8
11
|
contacts = ["oncall+fbandroid_sheriff@xmail.facebook.com"],
|
|
9
12
|
deps = [
|
|
10
13
|
YOGA_TARGET,
|