react-native-macos 0.0.0-7e8402d33 → 0.0.0-7fbfa751a
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/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +11 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.js +79 -1
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.js +10 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImageView.mm +14 -10
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/VirtualizedList.js +26 -9
- 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/RCTNativeAnimatedNodesManager.m +2 -0
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +8 -0
- package/Libraries/Text/RCTTextAttributes.h +11 -3
- package/Libraries/Text/RCTTextAttributes.m +26 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
- package/Libraries/Text/Text/RCTTextView.m +123 -58
- package/Libraries/Text/Text.js +0 -14
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +57 -4
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +13 -0
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +2 -1
- package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +69 -2
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +7 -1
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +12 -3
- package/Libraries/Text/TextInput/RCTBaseTextInputView.h +4 -1
- package/Libraries/Text/TextInput/RCTBaseTextInputView.m +91 -2
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +6 -1
- package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +33 -0
- package/Libraries/Text/TextNativeComponent.js +2 -0
- package/Libraries/Text/TextProps.js +29 -0
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/React/Base/RCTAssert.h +30 -15
- package/React/Base/RCTAssert.m +59 -19
- package/React/Base/RCTBridge.m +5 -3
- package/React/Base/RCTConstants.h +6 -0
- package/React/Base/RCTConstants.m +15 -0
- package/React/Base/RCTConvert.m +7 -4
- package/React/Base/RCTEventDispatcherProtocol.h +5 -0
- package/React/Base/RCTTouchHandler.m +4 -0
- package/React/Base/RCTUIKit.h +19 -13
- package/React/Base/RCTUtils.m +6 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
- package/React/Base/macOS/RCTUIKit.m +33 -0
- package/React/CoreModules/RCTEventDispatcher.mm +6 -1
- package/React/CoreModules/RCTLogBox.h +1 -1
- package/React/CoreModules/RCTLogBox.mm +35 -19
- package/React/CoreModules/RCTLogBoxView.h +8 -5
- package/React/CoreModules/RCTLogBoxView.mm +64 -23
- package/React/CoreModules/RCTPerfMonitor.mm +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
- 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 +0 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +3 -3
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +4 -4
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +56 -30
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +5 -5
- package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +2 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +3 -0
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +5 -5
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +7 -6
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +4 -4
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +2 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +31 -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 +28 -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 +15 -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 +1 -1
- package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
- package/React/Modules/RCTSurfacePresenterStub.h +4 -0
- package/React/Modules/RCTUIManager.m +2 -1
- package/React/React-RCTFabric.podspec +2 -2
- package/React/Views/RCTActivityIndicatorView.m +2 -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/RCTView.h +7 -0
- package/React/Views/RCTView.m +92 -28
- package/React/Views/RCTViewManager.m +11 -1
- 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/RCTSafeAreaViewLocalData.h +1 -1
- package/React/Views/ScrollView/RCTScrollContentView.h +4 -0
- package/React/Views/ScrollView/RCTScrollContentView.m +6 -0
- package/React/Views/ScrollView/RCTScrollContentViewManager.m +2 -0
- package/React/Views/ScrollView/RCTScrollView.h +2 -0
- package/React/Views/ScrollView/RCTScrollView.m +16 -31
- package/React/Views/ScrollView/RCTScrollViewManager.m +1 -0
- package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
- package/React/Views/UIView+React.h +2 -0
- package/React/Views/UIView+React.m +22 -13
- package/ReactAndroid/gradle.properties +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/systeminfo/ReactNativeVersion.java +1 -1
- 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/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-rncore.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/cxxreact/tests/BUCK +1 -1
- package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +3 -3
- package/ReactCommon/microprofiler/BUCK +1 -1
- package/ReactCommon/react/debug/react_native_assert.h +1 -1
- 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 +3 -2
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +7 -1
- package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +19 -2
- 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/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/yoga/Yoga.podspec +1 -1
- package/package.json +4 -1
- package/scripts/react_native_pods.rb +1 -4
- package/template/Gemfile.lock +5 -5
- package/template/package.json +1 -1
- 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
|
|
@@ -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
|
|
|
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
|
|
|
29
29
|
s.homepage = "https://reactnative.dev/"
|
|
30
30
|
s.license = package["license"]
|
|
31
31
|
s.author = "Facebook, Inc. and its affiliates"
|
|
32
|
-
s.platforms = { :ios => "11.0" }
|
|
32
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
33
33
|
s.source = source
|
|
34
34
|
s.source_files = "dummyFile.cpp"
|
|
35
35
|
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
|
|
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
|
|
|
25
25
|
s.homepage = "https://reactnative.dev/"
|
|
26
26
|
s.license = package["license"]
|
|
27
27
|
s.author = "Facebook, Inc. and its affiliates"
|
|
28
|
-
s.platforms = { :ios => "11.0" }
|
|
28
|
+
s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
|
|
29
29
|
s.source = source
|
|
30
30
|
s.source_files = "dummyFile.cpp"
|
|
31
31
|
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
|
|
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
|
|
|
34
34
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
35
35
|
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
36
36
|
"USE_HEADERMAP" => "YES",
|
|
37
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++
|
|
37
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
|
|
38
38
|
|
|
39
39
|
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
|
|
40
40
|
# Note: Update this only when ready to minimize breaking changes.
|
|
@@ -2107,9 +2107,9 @@ decimal.js@^10.2.1:
|
|
|
2107
2107
|
integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==
|
|
2108
2108
|
|
|
2109
2109
|
decode-uri-component@^0.2.0:
|
|
2110
|
-
version "0.2.
|
|
2111
|
-
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.
|
|
2112
|
-
integrity
|
|
2110
|
+
version "0.2.2"
|
|
2111
|
+
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
|
|
2112
|
+
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
|
|
2113
2113
|
|
|
2114
2114
|
deep-is@~0.1.3:
|
|
2115
2115
|
version "0.1.4"
|
|
@@ -55,7 +55,7 @@ void react_native_assert_fail(
|
|
|
55
55
|
#define react_native_assert(cond) \
|
|
56
56
|
if (!(cond)) { \
|
|
57
57
|
LOG(ERROR) << "react_native_assert failure: " << #cond; \
|
|
58
|
-
google::FlushLogFiles(google::
|
|
58
|
+
google::FlushLogFiles(google::GLOG_INFO); \
|
|
59
59
|
assert(cond); \
|
|
60
60
|
}
|
|
61
61
|
|