react-native-windows 0.84.0 → 0.85.0-preview.1
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/.flowconfig +1 -5
- package/Directory.Build.props +1 -16
- package/Directory.Build.targets +12 -4
- package/Folly/ThreadNameStub.cpp +4 -6
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Animated/Animated.d.ts +8 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -4
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/animations/Animation.js +3 -3
- package/Libraries/Animated/animations/DecayAnimation.js +4 -4
- package/Libraries/Animated/animations/SpringAnimation.js +5 -5
- package/Libraries/Animated/animations/TimingAnimation.js +5 -5
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
- package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
- package/Libraries/Animated/useAnimatedColor.js +25 -0
- package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValueXY.js +26 -0
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +3 -3
- package/Libraries/BatchedBridge/NativeModules.js +12 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -26
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +34 -30
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.windows.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
- package/Libraries/Components/Keyboard/Keyboard.js +6 -6
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
- package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +5 -5
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
- package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
- package/Libraries/Components/ScrollView/ScrollView.js +19 -9
- package/Libraries/Components/ScrollView/ScrollView.windows.js +19 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +8 -8
- package/Libraries/Components/Switch/Switch.js +3 -3
- package/Libraries/Components/Switch/Switch.windows.js +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
- package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +23 -22
- package/Libraries/Components/TextInput/TextInput.js +8 -4
- package/Libraries/Components/TextInput/TextInput.windows.js +3 -4
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +33 -48
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/Touchable.windows.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +9 -9
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +7 -7
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
- package/Libraries/Components/View/View.windows.js +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +7 -7
- package/Libraries/Components/View/ViewAccessibility.windows.js +7 -7
- package/Libraries/Components/View/ViewPropTypes.js +14 -14
- package/Libraries/Components/View/ViewPropTypes.windows.js +18 -16
- package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ExtendedError.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +3 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +4 -2
- package/Libraries/Core/setUpReactDevTools.js +23 -6
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlay.js +2 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +1 -1
- package/Libraries/Image/AssetSourceResolver.windows.js +1 -1
- package/Libraries/Image/Image.android.js +172 -306
- package/Libraries/Image/ImageProps.js +9 -11
- package/Libraries/Image/ImageSource.js +2 -2
- package/Libraries/Image/ImageSourceUtils.js +8 -4
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Image/ImageViewNativeComponent.js +7 -16
- package/Libraries/Image/nativeImageSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +5 -4
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +3 -3
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +38 -24
- package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
- package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
- package/Libraries/LogBox/LogBox.js +42 -19
- package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.windows.js +15 -16
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.windows.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
- package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/Modal/Modal.d.ts +4 -0
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/Modal/Modal.windows.js +7 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -17
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.windows.js +1 -1
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
- package/Libraries/Pressability/Pressability.js +5 -5
- package/Libraries/Pressability/Pressability.windows.js +5 -5
- package/Libraries/Pressability/PressabilityDebug.js +1 -1
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/Pressability/usePressability.js +3 -14
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +18 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +4 -4
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -2
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +3 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
- package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
- package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
- package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
- package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
- package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
- package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
- package/Libraries/StyleSheet/processBoxShadow.js +44 -4
- package/Libraries/StyleSheet/processColorArray.js +2 -2
- package/Libraries/StyleSheet/processFilter.js +2 -2
- package/Libraries/Text/Text.js +295 -627
- package/Libraries/Text/Text.windows.js +342 -717
- package/Libraries/Text/TextNativeComponent.js +14 -7
- package/Libraries/Text/TextProps.js +4 -4
- package/Libraries/Text/TextProps.windows.js +4 -4
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +21 -21
- package/Libraries/Types/CoreEventTypes.windows.js +21 -21
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/HMRClient.js +32 -5
- package/Libraries/Utilities/IPerformanceLogger.js +4 -4
- package/Libraries/Utilities/codegenNativeCommands.js +4 -4
- package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
- package/Libraries/Utilities/codegenNativeComponent.js +2 -2
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -3
- package/Libraries/Utilities/useMergeRefs.js +2 -2
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +16 -20
- package/Microsoft.ReactNative/CallInvoker.cpp +14 -4
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +73 -97
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +4 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +135 -18
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +10 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +7 -2
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +63 -15
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +3 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +11 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +3 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +0 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +2 -7
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +6 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -61
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +1 -26
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +2 -1
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +2 -17
- package/Microsoft.ReactNative/Modules/AppStateModule.h +0 -4
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +0 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +16 -15
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +5 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +2 -7
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +0 -1
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +4 -4
- package/Microsoft.ReactNative/QuirkSettings.cpp +0 -133
- package/Microsoft.ReactNative/QuirkSettings.h +0 -43
- package/Microsoft.ReactNative/QuirkSettings.idl +0 -41
- package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +0 -4
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -2
- package/Microsoft.ReactNative/ReactHost/React.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +0 -1
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +3 -26
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +0 -5
- package/Microsoft.ReactNative/ReactHost/React_Win.h +0 -2
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +3 -0
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +7 -0
- package/Microsoft.ReactNative/ReactPackageBuilder.h +1 -0
- package/Microsoft.ReactNative/RedBox.cpp +0 -9
- package/Microsoft.ReactNative/RedBoxHandler.cpp +0 -4
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +5 -10
- package/Microsoft.ReactNative/TurboModulesProvider.h +2 -0
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +1 -1
- package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +0 -7
- package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +0 -22
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +8 -2
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +36 -20
- package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +0 -3
- package/Microsoft.ReactNative.Cxx/NativeModules.h +8 -2
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +0 -9
- package/Microsoft.ReactNative.Managed/ReactContext.cs +0 -9
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.props +1 -1
- package/PropertySheets/Codegen.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/NuGet.LockFile.props +8 -0
- package/PropertySheets/React.Cpp.props +4 -4
- package/PropertySheets/ReactNativeArchitecture.props +6 -24
- package/ReactCommon/ReactCommon.vcxproj +5 -6
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +15 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +13 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/defaults/DefaultTurboModules.cpp +69 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/animationbackend/AnimatedPropSerializer.cpp +717 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +10 -10
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +2 -21
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp +151 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.h +50 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBuffer.cpp +178 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +69 -39
- package/Scripts/OfficeReact.Win32.nuspec +0 -1
- package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +4 -39
- package/Scripts/creaternwapp.cmd +1 -9
- package/Scripts/creaternwlib.cmd +4 -24
- package/Shared/DevSettings.h +0 -3
- package/Shared/Networking/WinRTWebSocketResource.cpp +23 -408
- package/Shared/Networking/WinRTWebSocketResource.h +3 -119
- package/Shared/Shared.vcxitems +63 -38
- package/Shared/Shared.vcxitems.filters +54 -0
- package/Shared/Utils.cpp +0 -88
- package/Shared/Utils.h +0 -14
- package/Shared/WebSocketResourceFactory.cpp +28 -0
- package/Shared/tracing/fbsystrace.h +1 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +172 -160
- package/codegen/react/components/rnwcore/ModalHostView.g.h +8 -0
- package/codegen/react/components/rnwcore/Props.cpp +17 -7
- package/codegen/react/components/rnwcore/Props.h +3 -1
- package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +4 -4
- package/codegen/rnwcoreJSI.h +93 -77
- package/index.js +9 -0
- package/index.windows.js +9 -0
- package/jest/RefreshControlMock.js +2 -2
- package/jest/assetFileTransformer.js +8 -3
- package/jest/mockComponent.js +3 -4
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mocks/ActivityIndicator.js +2 -2
- package/jest/mocks/Image.js +2 -2
- package/jest/mocks/Modal.js +2 -2
- package/jest/mocks/RefreshControl.js +3 -3
- package/jest/mocks/RendererProxy.js +2 -2
- package/jest/mocks/ScrollView.js +5 -5
- package/jest/mocks/Text.js +2 -2
- package/jest/mocks/TextInput.js +2 -2
- package/jest/mocks/View.js +2 -2
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/mocks/requireNativeComponent.js +1 -1
- package/jest/mocks/useColorScheme.js +1 -1
- package/jest/setup.js +68 -31
- package/package.json +27 -22
- package/src/private/animated/NativeAnimatedHelper.js +2 -2
- package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
- package/src/private/components/virtualview/VirtualView.js +14 -21
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
- package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
- package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -79
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -12
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +7 -3
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/utilities/toError.js +27 -0
- package/src/private/utilities/toExtendedError.js +30 -0
- package/src/private/webapis/dom/events/Event.js +1 -1
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
- package/src/private/webapis/dom/events/EventTarget.js +3 -3
- package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
- package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
- package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
- package/src/private/webapis/performance/LongTasks.js +3 -3
- package/src/private/webapis/performance/Performance.js +4 -4
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
- package/src/private/webapis/structuredClone/structuredClone.js +2 -2
- package/src/types/globals.d.ts +4 -4
- package/template/cpp-lib/proj/MyLib.sln +0 -33
- package/template/cpp-lib/proj/MyLib.vcxproj +1 -1
- package/template/cs-lib/proj/MyLib.sln +0 -33
- package/template/metro.config.js +12 -2
- package/templates/cpp-app/metro.config.js +12 -2
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +9 -6
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
- package/templates/cpp-app/windows/MyApp.sln +0 -33
- package/templates/cpp-lib/example/metro.config.js +12 -2
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
- package/templates/cpp-lib/windows/MyLib.sln +0 -33
- package/types/index.d.ts +2 -0
- package/Folly/.clang-format +0 -2
- package/Folly/Folly.natvis +0 -25
- package/Folly/Folly.vcxproj +0 -378
- package/Folly/Folly.vcxproj.filters +0 -558
- package/Folly/TEMP_UntilFollyUpdate/ConstexprMath.h +0 -978
- package/Folly/TEMP_UntilFollyUpdate/Conv.cpp +0 -1205
- package/Folly/TEMP_UntilFollyUpdate/chrono/Hardware.h +0 -155
- package/Folly/TEMP_UntilFollyUpdate/concurrency/CacheLocality.cpp +0 -633
- package/Folly/TEMP_UntilFollyUpdate/json/dynamic-inl.h +0 -1438
- package/Folly/TEMP_UntilFollyUpdate/json/json.cpp +0 -1118
- package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +0 -188
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +0 -348
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +0 -182
- package/Folly/TEMP_UntilFollyUpdate/portability/Unistd.cpp +0 -33
- package/Folly/cgmanifest.json +0 -25
- package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +0 -64
- package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +0 -75
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +0 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +0 -81
- package/Microsoft.ReactNative/Modules/CreateModules.cpp +0 -24
- package/Microsoft.ReactNative/ReactSupport.cpp +0 -221
- package/Microsoft.ReactNative/ReactSupport.h +0 -13
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.cpp +0 -107
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +0 -62
- package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +0 -56
- package/Microsoft.ReactNative/Utils/UwpScriptStore.h +0 -23
- package/Microsoft.ReactNative/XamlUIService.cpp +0 -68
- package/Microsoft.ReactNative/XamlUIService.h +0 -37
- package/Microsoft.ReactNative/XamlUIService.idl +0 -53
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +0 -259
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +0 -381
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +0 -145
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +0 -100
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +0 -256
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +0 -363
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +0 -93
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +0 -148
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +0 -190
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +0 -123
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.cpp +0 -27
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +0 -414
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +0 -91
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +0 -80
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +0 -138
- package/fmt/.clang-format +0 -2
- package/fmt/cgmanifest.json +0 -15
- package/fmt/fmt.vcxproj +0 -153
- package/fmt/fmt.vcxproj.filters +0 -59
- package/fmt/pch.cpp +0 -4
- package/fmt/pch.h +0 -2
|
@@ -0,0 +1,717 @@
|
|
|
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
|
+
#include <react/renderer/graphics/Transform.h>
|
|
9
|
+
#include <react/renderer/graphics/TransformUtils.h>
|
|
10
|
+
#include <stdexcept>
|
|
11
|
+
#include "AnimatedPropsSerializer.h"
|
|
12
|
+
#include <react/renderer/graphics/Color.h>
|
|
13
|
+
|
|
14
|
+
namespace facebook::react {
|
|
15
|
+
|
|
16
|
+
namespace {
|
|
17
|
+
|
|
18
|
+
// [Windows #16262] Helper to convert platform Color to int32_t ARGB format
|
|
19
|
+
// On other platforms Color is already int32_t, but on Windows it's a struct.
|
|
20
|
+
inline int32_t colorToInt32(const Color& color) {
|
|
21
|
+
auto c = color.AsWindowsColor();
|
|
22
|
+
return static_cast<int32_t>((c.A << 24) | (c.R << 16) | (c.G << 8) | c.B);
|
|
23
|
+
} // Windows]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
void packBorderRadiusCorner(
|
|
27
|
+
folly::dynamic& dyn,
|
|
28
|
+
const std::string& propName,
|
|
29
|
+
const std::optional<ValueUnit>& cornerValue) {
|
|
30
|
+
if (cornerValue.has_value()) {
|
|
31
|
+
dyn.insert(propName, cornerValue.value().value);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
void packBorderRadii(
|
|
36
|
+
folly::dynamic& dyn,
|
|
37
|
+
const AnimatedPropBase& animatedProp) {
|
|
38
|
+
const auto& borderRadii = get<CascadedBorderRadii>(animatedProp);
|
|
39
|
+
|
|
40
|
+
packBorderRadiusCorner(dyn, "borderTopRightRadius", borderRadii.topRight);
|
|
41
|
+
packBorderRadiusCorner(dyn, "borderTopLeftRadius", borderRadii.topLeft);
|
|
42
|
+
packBorderRadiusCorner(
|
|
43
|
+
dyn, "borderBottomRightRadius", borderRadii.bottomRight);
|
|
44
|
+
packBorderRadiusCorner(dyn, "borderBottomLeftRadius", borderRadii.bottomLeft);
|
|
45
|
+
packBorderRadiusCorner(dyn, "borderTopStartRadius", borderRadii.topStart);
|
|
46
|
+
packBorderRadiusCorner(dyn, "borderTopEndRadius", borderRadii.topEnd);
|
|
47
|
+
packBorderRadiusCorner(
|
|
48
|
+
dyn, "borderBottomStartRadius", borderRadii.bottomStart);
|
|
49
|
+
packBorderRadiusCorner(dyn, "borderBottomEndRadius", borderRadii.bottomEnd);
|
|
50
|
+
packBorderRadiusCorner(dyn, "borderStartStartRadius", borderRadii.startStart);
|
|
51
|
+
packBorderRadiusCorner(dyn, "borderStartEndRadius", borderRadii.startEnd);
|
|
52
|
+
packBorderRadiusCorner(dyn, "borderEndStartRadius", borderRadii.endStart);
|
|
53
|
+
packBorderRadiusCorner(dyn, "borderEndEndRadius", borderRadii.endEnd);
|
|
54
|
+
|
|
55
|
+
if (borderRadii.all.has_value()) {
|
|
56
|
+
dyn.insert("borderRadius", borderRadii.all.value().value);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
void packOpacity(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
61
|
+
dyn.insert("opacity", get<Float>(animatedProp));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
void packTransform(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
65
|
+
const auto& transform = get<Transform>(animatedProp);
|
|
66
|
+
auto transformArray = folly::dynamic::array();
|
|
67
|
+
|
|
68
|
+
for (const auto& operation : transform.operations) {
|
|
69
|
+
updateTransformProps(transform, operation, transformArray);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
dyn.insert("transform", transformArray);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
std::string unitTypeToString(UnitType unit) {
|
|
76
|
+
switch (unit) {
|
|
77
|
+
case UnitType::Undefined:
|
|
78
|
+
return "undefined";
|
|
79
|
+
case UnitType::Point:
|
|
80
|
+
return "point";
|
|
81
|
+
case UnitType::Percent:
|
|
82
|
+
return "percent";
|
|
83
|
+
default:
|
|
84
|
+
throw std::runtime_error("Unknown unit type");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
void packTransformOrigin(
|
|
89
|
+
folly::dynamic& dyn,
|
|
90
|
+
const AnimatedPropBase& animatedProp) {
|
|
91
|
+
const auto& transformOrigin = get<TransformOrigin>(animatedProp);
|
|
92
|
+
auto originArray = folly::dynamic::array();
|
|
93
|
+
for (const auto& xyValue : transformOrigin.xy) {
|
|
94
|
+
folly::dynamic valueObj = folly::dynamic::object();
|
|
95
|
+
valueObj["value"] = xyValue.value;
|
|
96
|
+
valueObj["unit"] = unitTypeToString(xyValue.unit);
|
|
97
|
+
originArray.push_back(valueObj);
|
|
98
|
+
}
|
|
99
|
+
originArray.push_back(transformOrigin.z);
|
|
100
|
+
dyn.insert("transformOrigin", originArray);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
void packBackgroundColor(
|
|
104
|
+
folly::dynamic& dyn,
|
|
105
|
+
const AnimatedPropBase& animatedProp) {
|
|
106
|
+
const auto& backgroundColor = get<SharedColor>(animatedProp);
|
|
107
|
+
dyn.insert("backgroundColor", colorToInt32(*backgroundColor));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
void packShadowColor(
|
|
111
|
+
folly::dynamic& dyn,
|
|
112
|
+
const AnimatedPropBase& animatedProp) {
|
|
113
|
+
const auto& shadowColor = get<SharedColor>(animatedProp);
|
|
114
|
+
dyn.insert("shadowColor", colorToInt32(*shadowColor));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
void packShadowOffset(
|
|
118
|
+
folly::dynamic& dyn,
|
|
119
|
+
const AnimatedPropBase& animatedProp) {
|
|
120
|
+
const auto& shadowOffset = get<Size>(animatedProp);
|
|
121
|
+
dyn.insert(
|
|
122
|
+
"shadowOffset",
|
|
123
|
+
folly::dynamic::object("width", shadowOffset.width)(
|
|
124
|
+
"height", shadowOffset.height));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
void packShadowOpacity(
|
|
128
|
+
folly::dynamic& dyn,
|
|
129
|
+
const AnimatedPropBase& animatedProp) {
|
|
130
|
+
dyn.insert("shadowOpacity", get<Float>(animatedProp));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
void packShadowRadius(
|
|
134
|
+
folly::dynamic& dyn,
|
|
135
|
+
const AnimatedPropBase& animatedProp) {
|
|
136
|
+
dyn.insert("shadowRadius", get<Float>(animatedProp));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
void packBorderColorEdge(
|
|
140
|
+
folly::dynamic& dyn,
|
|
141
|
+
const std::string& propName,
|
|
142
|
+
const std::optional<SharedColor>& colorValue) {
|
|
143
|
+
if (colorValue.has_value() && colorValue.value()) {
|
|
144
|
+
dyn.insert(propName, colorToInt32(*colorValue.value()));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
void packBorderColor(
|
|
149
|
+
folly::dynamic& dyn,
|
|
150
|
+
const AnimatedPropBase& animatedProp) {
|
|
151
|
+
const auto& borderColors = get<CascadedBorderColors>(animatedProp);
|
|
152
|
+
|
|
153
|
+
packBorderColorEdge(dyn, "borderLeftColor", borderColors.left);
|
|
154
|
+
packBorderColorEdge(dyn, "borderTopColor", borderColors.top);
|
|
155
|
+
packBorderColorEdge(dyn, "borderRightColor", borderColors.right);
|
|
156
|
+
packBorderColorEdge(dyn, "borderBottomColor", borderColors.bottom);
|
|
157
|
+
packBorderColorEdge(dyn, "borderStartColor", borderColors.start);
|
|
158
|
+
packBorderColorEdge(dyn, "borderEndColor", borderColors.end);
|
|
159
|
+
|
|
160
|
+
if (borderColors.all.has_value() && borderColors.all.value()) {
|
|
161
|
+
dyn.insert("borderColor", colorToInt32(*borderColors.all.value()));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
void packFilter(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
166
|
+
const auto& filters = get<std::vector<FilterFunction>>(animatedProp);
|
|
167
|
+
auto filterArray = folly::dynamic::array();
|
|
168
|
+
for (const auto& f : filters) {
|
|
169
|
+
folly::dynamic filterObj = folly::dynamic::object();
|
|
170
|
+
std::string typeKey = toString(f.type);
|
|
171
|
+
if (std::holds_alternative<Float>(f.parameters)) {
|
|
172
|
+
filterObj[typeKey] = std::get<Float>(f.parameters);
|
|
173
|
+
} else if (std::holds_alternative<DropShadowParams>(f.parameters)) {
|
|
174
|
+
const auto& dropShadowParams = std::get<DropShadowParams>(f.parameters);
|
|
175
|
+
folly::dynamic shadowObj = folly::dynamic::object();
|
|
176
|
+
shadowObj["offsetX"] = dropShadowParams.offsetX;
|
|
177
|
+
shadowObj["offsetY"] = dropShadowParams.offsetY;
|
|
178
|
+
shadowObj["standardDeviation"] = dropShadowParams.standardDeviation;
|
|
179
|
+
shadowObj["color"] = colorToInt32(*dropShadowParams.color);
|
|
180
|
+
filterObj[typeKey] = shadowObj;
|
|
181
|
+
}
|
|
182
|
+
filterArray.push_back(filterObj);
|
|
183
|
+
}
|
|
184
|
+
dyn.insert("filter", filterArray);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
void packOutlineColor(
|
|
188
|
+
folly::dynamic& dyn,
|
|
189
|
+
const AnimatedPropBase& animatedProp) {
|
|
190
|
+
const auto& outlineColor = get<SharedColor>(animatedProp);
|
|
191
|
+
dyn.insert("outlineColor", colorToInt32(*outlineColor));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
void packOutlineOffset(
|
|
195
|
+
folly::dynamic& dyn,
|
|
196
|
+
const AnimatedPropBase& animatedProp) {
|
|
197
|
+
dyn.insert("outlineOffset", get<Float>(animatedProp));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
void packOutlineStyle(
|
|
201
|
+
folly::dynamic& dyn,
|
|
202
|
+
const AnimatedPropBase& animatedProp) {
|
|
203
|
+
const auto& outlineStyle = get<OutlineStyle>(animatedProp);
|
|
204
|
+
std::string styleStr;
|
|
205
|
+
switch (outlineStyle) {
|
|
206
|
+
case OutlineStyle::Solid:
|
|
207
|
+
styleStr = "solid";
|
|
208
|
+
break;
|
|
209
|
+
case OutlineStyle::Dotted:
|
|
210
|
+
styleStr = "dotted";
|
|
211
|
+
break;
|
|
212
|
+
case OutlineStyle::Dashed:
|
|
213
|
+
styleStr = "dashed";
|
|
214
|
+
break;
|
|
215
|
+
default:
|
|
216
|
+
throw std::runtime_error("Unknown outline style");
|
|
217
|
+
}
|
|
218
|
+
dyn.insert("outlineStyle", styleStr);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
void packOutlineWidth(
|
|
222
|
+
folly::dynamic& dyn,
|
|
223
|
+
const AnimatedPropBase& animatedProp) {
|
|
224
|
+
dyn.insert("outlineWidth", get<Float>(animatedProp));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
void packBorderCurveEdge(
|
|
228
|
+
folly::dynamic& dyn,
|
|
229
|
+
const std::string& propName,
|
|
230
|
+
const std::optional<BorderCurve>& curveValue) {
|
|
231
|
+
if (curveValue.has_value()) {
|
|
232
|
+
std::string curveStr;
|
|
233
|
+
switch (curveValue.value()) {
|
|
234
|
+
case BorderCurve::Circular:
|
|
235
|
+
curveStr = "circular";
|
|
236
|
+
break;
|
|
237
|
+
case BorderCurve::Continuous:
|
|
238
|
+
curveStr = "continuous";
|
|
239
|
+
break;
|
|
240
|
+
default:
|
|
241
|
+
throw std::runtime_error("Unknown border curve");
|
|
242
|
+
}
|
|
243
|
+
dyn.insert(propName, curveStr);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
void packBorderCurves(
|
|
248
|
+
folly::dynamic& dyn,
|
|
249
|
+
const AnimatedPropBase& animatedProp) {
|
|
250
|
+
const auto& borderCurves = get<CascadedBorderCurves>(animatedProp);
|
|
251
|
+
|
|
252
|
+
packBorderCurveEdge(dyn, "borderTopLeftCurve", borderCurves.topLeft);
|
|
253
|
+
packBorderCurveEdge(dyn, "borderTopRightCurve", borderCurves.topRight);
|
|
254
|
+
packBorderCurveEdge(dyn, "borderBottomLeftCurve", borderCurves.bottomLeft);
|
|
255
|
+
packBorderCurveEdge(dyn, "borderBottomRightCurve", borderCurves.bottomRight);
|
|
256
|
+
|
|
257
|
+
if (borderCurves.all.has_value()) {
|
|
258
|
+
std::string curveStr;
|
|
259
|
+
switch (borderCurves.all.value()) {
|
|
260
|
+
case BorderCurve::Circular:
|
|
261
|
+
curveStr = "circular";
|
|
262
|
+
break;
|
|
263
|
+
case BorderCurve::Continuous:
|
|
264
|
+
curveStr = "continuous";
|
|
265
|
+
break;
|
|
266
|
+
default:
|
|
267
|
+
throw std::runtime_error("Unknown border curve");
|
|
268
|
+
}
|
|
269
|
+
dyn.insert("borderCurve", curveStr);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
std::string borderStyleToString(BorderStyle style) {
|
|
274
|
+
switch (style) {
|
|
275
|
+
case BorderStyle::Solid:
|
|
276
|
+
return "solid";
|
|
277
|
+
case BorderStyle::Dotted:
|
|
278
|
+
return "dotted";
|
|
279
|
+
case BorderStyle::Dashed:
|
|
280
|
+
return "dashed";
|
|
281
|
+
default:
|
|
282
|
+
throw std::runtime_error("Unknown border style");
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
void packBorderStyleEdge(
|
|
287
|
+
folly::dynamic& dyn,
|
|
288
|
+
const std::string& propName,
|
|
289
|
+
const std::optional<BorderStyle>& styleValue) {
|
|
290
|
+
if (styleValue.has_value()) {
|
|
291
|
+
dyn.insert(propName, borderStyleToString(styleValue.value()));
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
void packBorderStyles(
|
|
296
|
+
folly::dynamic& dyn,
|
|
297
|
+
const AnimatedPropBase& animatedProp) {
|
|
298
|
+
const auto& borderStyles = get<CascadedBorderStyles>(animatedProp);
|
|
299
|
+
|
|
300
|
+
packBorderStyleEdge(dyn, "borderLeftStyle", borderStyles.left);
|
|
301
|
+
packBorderStyleEdge(dyn, "borderTopStyle", borderStyles.top);
|
|
302
|
+
packBorderStyleEdge(dyn, "borderRightStyle", borderStyles.right);
|
|
303
|
+
packBorderStyleEdge(dyn, "borderBottomStyle", borderStyles.bottom);
|
|
304
|
+
packBorderStyleEdge(dyn, "borderStartStyle", borderStyles.start);
|
|
305
|
+
packBorderStyleEdge(dyn, "borderEndStyle", borderStyles.end);
|
|
306
|
+
|
|
307
|
+
if (borderStyles.all.has_value()) {
|
|
308
|
+
dyn.insert("borderStyle", borderStyleToString(borderStyles.all.value()));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
void packPointerEvents(
|
|
313
|
+
folly::dynamic& dyn,
|
|
314
|
+
const AnimatedPropBase& animatedProp) {
|
|
315
|
+
const auto& pointerEvents = get<PointerEventsMode>(animatedProp);
|
|
316
|
+
std::string pointerEventsStr;
|
|
317
|
+
switch (pointerEvents) {
|
|
318
|
+
case PointerEventsMode::Auto:
|
|
319
|
+
pointerEventsStr = "auto";
|
|
320
|
+
break;
|
|
321
|
+
case PointerEventsMode::None:
|
|
322
|
+
pointerEventsStr = "none";
|
|
323
|
+
break;
|
|
324
|
+
case PointerEventsMode::BoxNone:
|
|
325
|
+
pointerEventsStr = "box-none";
|
|
326
|
+
break;
|
|
327
|
+
case PointerEventsMode::BoxOnly:
|
|
328
|
+
pointerEventsStr = "box-only";
|
|
329
|
+
break;
|
|
330
|
+
default:
|
|
331
|
+
throw std::runtime_error("Unknown pointer events mode");
|
|
332
|
+
}
|
|
333
|
+
dyn.insert("pointerEvents", pointerEventsStr);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
void packIsolation(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
337
|
+
const auto& isolation = get<Isolation>(animatedProp);
|
|
338
|
+
std::string isolationStr;
|
|
339
|
+
switch (isolation) {
|
|
340
|
+
case Isolation::Auto:
|
|
341
|
+
isolationStr = "auto";
|
|
342
|
+
break;
|
|
343
|
+
case Isolation::Isolate:
|
|
344
|
+
isolationStr = "isolate";
|
|
345
|
+
break;
|
|
346
|
+
default:
|
|
347
|
+
throw std::runtime_error("Unknown isolation mode");
|
|
348
|
+
}
|
|
349
|
+
dyn.insert("isolation", isolationStr);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
void packCursor(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
353
|
+
const auto& cursor = get<Cursor>(animatedProp);
|
|
354
|
+
std::string cursorStr;
|
|
355
|
+
switch (cursor) {
|
|
356
|
+
case Cursor::Auto:
|
|
357
|
+
cursorStr = "auto";
|
|
358
|
+
break;
|
|
359
|
+
case Cursor::Alias:
|
|
360
|
+
cursorStr = "alias";
|
|
361
|
+
break;
|
|
362
|
+
case Cursor::AllScroll:
|
|
363
|
+
cursorStr = "all-scroll";
|
|
364
|
+
break;
|
|
365
|
+
case Cursor::Cell:
|
|
366
|
+
cursorStr = "cell";
|
|
367
|
+
break;
|
|
368
|
+
case Cursor::ColResize:
|
|
369
|
+
cursorStr = "col-resize";
|
|
370
|
+
break;
|
|
371
|
+
case Cursor::ContextMenu:
|
|
372
|
+
cursorStr = "context-menu";
|
|
373
|
+
break;
|
|
374
|
+
case Cursor::Copy:
|
|
375
|
+
cursorStr = "copy";
|
|
376
|
+
break;
|
|
377
|
+
case Cursor::Crosshair:
|
|
378
|
+
cursorStr = "crosshair";
|
|
379
|
+
break;
|
|
380
|
+
case Cursor::Default:
|
|
381
|
+
cursorStr = "default";
|
|
382
|
+
break;
|
|
383
|
+
case Cursor::EResize:
|
|
384
|
+
cursorStr = "e-resize";
|
|
385
|
+
break;
|
|
386
|
+
case Cursor::EWResize:
|
|
387
|
+
cursorStr = "ew-resize";
|
|
388
|
+
break;
|
|
389
|
+
case Cursor::Grab:
|
|
390
|
+
cursorStr = "grab";
|
|
391
|
+
break;
|
|
392
|
+
case Cursor::Grabbing:
|
|
393
|
+
cursorStr = "grabbing";
|
|
394
|
+
break;
|
|
395
|
+
case Cursor::Help:
|
|
396
|
+
cursorStr = "help";
|
|
397
|
+
break;
|
|
398
|
+
case Cursor::Move:
|
|
399
|
+
cursorStr = "move";
|
|
400
|
+
break;
|
|
401
|
+
case Cursor::NResize:
|
|
402
|
+
cursorStr = "n-resize";
|
|
403
|
+
break;
|
|
404
|
+
case Cursor::NEResize:
|
|
405
|
+
cursorStr = "ne-resize";
|
|
406
|
+
break;
|
|
407
|
+
case Cursor::NESWResize:
|
|
408
|
+
cursorStr = "nesw-resize";
|
|
409
|
+
break;
|
|
410
|
+
case Cursor::NSResize:
|
|
411
|
+
cursorStr = "ns-resize";
|
|
412
|
+
break;
|
|
413
|
+
case Cursor::NWResize:
|
|
414
|
+
cursorStr = "nw-resize";
|
|
415
|
+
break;
|
|
416
|
+
case Cursor::NWSEResize:
|
|
417
|
+
cursorStr = "nwse-resize";
|
|
418
|
+
break;
|
|
419
|
+
case Cursor::NoDrop:
|
|
420
|
+
cursorStr = "no-drop";
|
|
421
|
+
break;
|
|
422
|
+
case Cursor::None:
|
|
423
|
+
cursorStr = "none";
|
|
424
|
+
break;
|
|
425
|
+
case Cursor::NotAllowed:
|
|
426
|
+
cursorStr = "not-allowed";
|
|
427
|
+
break;
|
|
428
|
+
case Cursor::Pointer:
|
|
429
|
+
cursorStr = "pointer";
|
|
430
|
+
break;
|
|
431
|
+
case Cursor::Progress:
|
|
432
|
+
cursorStr = "progress";
|
|
433
|
+
break;
|
|
434
|
+
case Cursor::RowResize:
|
|
435
|
+
cursorStr = "row-resize";
|
|
436
|
+
break;
|
|
437
|
+
case Cursor::SResize:
|
|
438
|
+
cursorStr = "s-resize";
|
|
439
|
+
break;
|
|
440
|
+
case Cursor::SEResize:
|
|
441
|
+
cursorStr = "se-resize";
|
|
442
|
+
break;
|
|
443
|
+
case Cursor::SWResize:
|
|
444
|
+
cursorStr = "sw-resize";
|
|
445
|
+
break;
|
|
446
|
+
case Cursor::Text:
|
|
447
|
+
cursorStr = "text";
|
|
448
|
+
break;
|
|
449
|
+
case Cursor::Url:
|
|
450
|
+
cursorStr = "url";
|
|
451
|
+
break;
|
|
452
|
+
case Cursor::WResize:
|
|
453
|
+
cursorStr = "w-resize";
|
|
454
|
+
break;
|
|
455
|
+
case Cursor::Wait:
|
|
456
|
+
cursorStr = "wait";
|
|
457
|
+
break;
|
|
458
|
+
case Cursor::ZoomIn:
|
|
459
|
+
cursorStr = "zoom-in";
|
|
460
|
+
break;
|
|
461
|
+
case Cursor::ZoomOut:
|
|
462
|
+
cursorStr = "zoom-out";
|
|
463
|
+
break;
|
|
464
|
+
default:
|
|
465
|
+
throw std::runtime_error("Unknown cursor type");
|
|
466
|
+
}
|
|
467
|
+
dyn.insert("cursor", cursorStr);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
void packBoxShadow(folly::dynamic& dyn, const AnimatedPropBase& animatedProp) {
|
|
471
|
+
const auto& boxShadows = get<std::vector<BoxShadow>>(animatedProp);
|
|
472
|
+
auto shadowArray = folly::dynamic::array();
|
|
473
|
+
for (const auto& shadow : boxShadows) {
|
|
474
|
+
folly::dynamic shadowObj = folly::dynamic::object();
|
|
475
|
+
shadowObj["offsetX"] = shadow.offsetX;
|
|
476
|
+
shadowObj["offsetY"] = shadow.offsetY;
|
|
477
|
+
shadowObj["blurRadius"] = shadow.blurRadius;
|
|
478
|
+
shadowObj["spreadDistance"] = shadow.spreadDistance;
|
|
479
|
+
shadowObj["inset"] = shadow.inset;
|
|
480
|
+
if (shadow.color) {
|
|
481
|
+
shadowObj["color"] = colorToInt32(*shadow.color);
|
|
482
|
+
}
|
|
483
|
+
shadowArray.push_back(shadowObj);
|
|
484
|
+
}
|
|
485
|
+
dyn.insert("boxShadow", shadowArray);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
void packMixBlendMode(
|
|
489
|
+
folly::dynamic& dyn,
|
|
490
|
+
const AnimatedPropBase& animatedProp) {
|
|
491
|
+
const auto& mixBlendMode = get<BlendMode>(animatedProp);
|
|
492
|
+
std::string blendModeStr;
|
|
493
|
+
switch (mixBlendMode) {
|
|
494
|
+
case BlendMode::Normal:
|
|
495
|
+
blendModeStr = "normal";
|
|
496
|
+
break;
|
|
497
|
+
case BlendMode::Multiply:
|
|
498
|
+
blendModeStr = "multiply";
|
|
499
|
+
break;
|
|
500
|
+
case BlendMode::Screen:
|
|
501
|
+
blendModeStr = "screen";
|
|
502
|
+
break;
|
|
503
|
+
case BlendMode::Overlay:
|
|
504
|
+
blendModeStr = "overlay";
|
|
505
|
+
break;
|
|
506
|
+
case BlendMode::Darken:
|
|
507
|
+
blendModeStr = "darken";
|
|
508
|
+
break;
|
|
509
|
+
case BlendMode::Lighten:
|
|
510
|
+
blendModeStr = "lighten";
|
|
511
|
+
break;
|
|
512
|
+
case BlendMode::ColorDodge:
|
|
513
|
+
blendModeStr = "color-dodge";
|
|
514
|
+
break;
|
|
515
|
+
case BlendMode::ColorBurn:
|
|
516
|
+
blendModeStr = "color-burn";
|
|
517
|
+
break;
|
|
518
|
+
case BlendMode::HardLight:
|
|
519
|
+
blendModeStr = "hard-light";
|
|
520
|
+
break;
|
|
521
|
+
case BlendMode::SoftLight:
|
|
522
|
+
blendModeStr = "soft-light";
|
|
523
|
+
break;
|
|
524
|
+
case BlendMode::Difference:
|
|
525
|
+
blendModeStr = "difference";
|
|
526
|
+
break;
|
|
527
|
+
case BlendMode::Exclusion:
|
|
528
|
+
blendModeStr = "exclusion";
|
|
529
|
+
break;
|
|
530
|
+
case BlendMode::Hue:
|
|
531
|
+
blendModeStr = "hue";
|
|
532
|
+
break;
|
|
533
|
+
case BlendMode::Saturation:
|
|
534
|
+
blendModeStr = "saturation";
|
|
535
|
+
break;
|
|
536
|
+
case BlendMode::Color:
|
|
537
|
+
blendModeStr = "color";
|
|
538
|
+
break;
|
|
539
|
+
case BlendMode::Luminosity:
|
|
540
|
+
blendModeStr = "luminosity";
|
|
541
|
+
break;
|
|
542
|
+
default:
|
|
543
|
+
throw std::runtime_error("Unknown blend mode");
|
|
544
|
+
}
|
|
545
|
+
dyn.insert("mixBlendMode", blendModeStr);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
void packBackfaceVisibility(
|
|
549
|
+
folly::dynamic& dyn,
|
|
550
|
+
const AnimatedPropBase& animatedProp) {
|
|
551
|
+
const auto& backfaceVisibility = get<BackfaceVisibility>(animatedProp);
|
|
552
|
+
std::string visibilityStr;
|
|
553
|
+
switch (backfaceVisibility) {
|
|
554
|
+
case BackfaceVisibility::Auto:
|
|
555
|
+
visibilityStr = "auto";
|
|
556
|
+
break;
|
|
557
|
+
case BackfaceVisibility::Visible:
|
|
558
|
+
visibilityStr = "visible";
|
|
559
|
+
break;
|
|
560
|
+
case BackfaceVisibility::Hidden:
|
|
561
|
+
visibilityStr = "hidden";
|
|
562
|
+
break;
|
|
563
|
+
default:
|
|
564
|
+
throw std::runtime_error("Unknown backface visibility");
|
|
565
|
+
}
|
|
566
|
+
dyn.insert("backfaceVisibility", visibilityStr);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
void packAnimatedProp(
|
|
570
|
+
folly::dynamic& dyn,
|
|
571
|
+
const std::unique_ptr<AnimatedPropBase>& animatedProp) {
|
|
572
|
+
switch (animatedProp->propName) {
|
|
573
|
+
case OPACITY:
|
|
574
|
+
packOpacity(dyn, *animatedProp);
|
|
575
|
+
break;
|
|
576
|
+
|
|
577
|
+
case TRANSFORM:
|
|
578
|
+
packTransform(dyn, *animatedProp);
|
|
579
|
+
break;
|
|
580
|
+
|
|
581
|
+
case TRANSFORM_ORIGIN:
|
|
582
|
+
packTransformOrigin(dyn, *animatedProp);
|
|
583
|
+
break;
|
|
584
|
+
|
|
585
|
+
case BACKGROUND_COLOR:
|
|
586
|
+
packBackgroundColor(dyn, *animatedProp);
|
|
587
|
+
break;
|
|
588
|
+
|
|
589
|
+
case BORDER_RADII:
|
|
590
|
+
packBorderRadii(dyn, *animatedProp);
|
|
591
|
+
break;
|
|
592
|
+
|
|
593
|
+
case SHADOW_COLOR:
|
|
594
|
+
packShadowColor(dyn, *animatedProp);
|
|
595
|
+
break;
|
|
596
|
+
|
|
597
|
+
case SHADOW_OFFSET:
|
|
598
|
+
packShadowOffset(dyn, *animatedProp);
|
|
599
|
+
break;
|
|
600
|
+
|
|
601
|
+
case SHADOW_OPACITY:
|
|
602
|
+
packShadowOpacity(dyn, *animatedProp);
|
|
603
|
+
break;
|
|
604
|
+
|
|
605
|
+
case SHADOW_RADIUS:
|
|
606
|
+
packShadowRadius(dyn, *animatedProp);
|
|
607
|
+
break;
|
|
608
|
+
|
|
609
|
+
case BORDER_COLOR:
|
|
610
|
+
packBorderColor(dyn, *animatedProp);
|
|
611
|
+
break;
|
|
612
|
+
|
|
613
|
+
case FILTER:
|
|
614
|
+
packFilter(dyn, *animatedProp);
|
|
615
|
+
break;
|
|
616
|
+
|
|
617
|
+
case OUTLINE_COLOR:
|
|
618
|
+
packOutlineColor(dyn, *animatedProp);
|
|
619
|
+
break;
|
|
620
|
+
|
|
621
|
+
case OUTLINE_OFFSET:
|
|
622
|
+
packOutlineOffset(dyn, *animatedProp);
|
|
623
|
+
break;
|
|
624
|
+
|
|
625
|
+
case OUTLINE_STYLE:
|
|
626
|
+
packOutlineStyle(dyn, *animatedProp);
|
|
627
|
+
break;
|
|
628
|
+
|
|
629
|
+
case OUTLINE_WIDTH:
|
|
630
|
+
packOutlineWidth(dyn, *animatedProp);
|
|
631
|
+
break;
|
|
632
|
+
|
|
633
|
+
case BORDER_CURVES:
|
|
634
|
+
packBorderCurves(dyn, *animatedProp);
|
|
635
|
+
break;
|
|
636
|
+
|
|
637
|
+
case BORDER_STYLES:
|
|
638
|
+
packBorderStyles(dyn, *animatedProp);
|
|
639
|
+
break;
|
|
640
|
+
|
|
641
|
+
case POINTER_EVENTS:
|
|
642
|
+
packPointerEvents(dyn, *animatedProp);
|
|
643
|
+
break;
|
|
644
|
+
|
|
645
|
+
case ISOLATION:
|
|
646
|
+
packIsolation(dyn, *animatedProp);
|
|
647
|
+
break;
|
|
648
|
+
|
|
649
|
+
case CURSOR:
|
|
650
|
+
packCursor(dyn, *animatedProp);
|
|
651
|
+
break;
|
|
652
|
+
|
|
653
|
+
case BOX_SHADOW:
|
|
654
|
+
packBoxShadow(dyn, *animatedProp);
|
|
655
|
+
break;
|
|
656
|
+
|
|
657
|
+
case MIX_BLEND_MODE:
|
|
658
|
+
packMixBlendMode(dyn, *animatedProp);
|
|
659
|
+
break;
|
|
660
|
+
|
|
661
|
+
case BACKFACE_VISIBILITY:
|
|
662
|
+
packBackfaceVisibility(dyn, *animatedProp);
|
|
663
|
+
break;
|
|
664
|
+
|
|
665
|
+
case WIDTH:
|
|
666
|
+
case HEIGHT:
|
|
667
|
+
case FLEX:
|
|
668
|
+
case PADDING:
|
|
669
|
+
case MARGIN:
|
|
670
|
+
case POSITION:
|
|
671
|
+
case BORDER_WIDTH:
|
|
672
|
+
case ALIGN_CONTENT:
|
|
673
|
+
case ALIGN_ITEMS:
|
|
674
|
+
case ALIGN_SELF:
|
|
675
|
+
case ASPECT_RATIO:
|
|
676
|
+
case BOX_SIZING:
|
|
677
|
+
case DISPLAY:
|
|
678
|
+
case FLEX_BASIS:
|
|
679
|
+
case FLEX_DIRECTION:
|
|
680
|
+
case ROW_GAP:
|
|
681
|
+
case COLUMN_GAP:
|
|
682
|
+
case FLEX_GROW:
|
|
683
|
+
case FLEX_SHRINK:
|
|
684
|
+
case FLEX_WRAP:
|
|
685
|
+
case JUSTIFY_CONTENT:
|
|
686
|
+
case MAX_HEIGHT:
|
|
687
|
+
case MAX_WIDTH:
|
|
688
|
+
case MIN_HEIGHT:
|
|
689
|
+
case MIN_WIDTH:
|
|
690
|
+
case STYLE_OVERFLOW:
|
|
691
|
+
case POSITION_TYPE:
|
|
692
|
+
case Z_INDEX:
|
|
693
|
+
case DIRECTION:
|
|
694
|
+
throw std::runtime_error("Tried to synchronously update layout props");
|
|
695
|
+
default:
|
|
696
|
+
throw std::runtime_error("Unknown animated prop");
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
} // namespace
|
|
701
|
+
|
|
702
|
+
namespace animationbackend {
|
|
703
|
+
|
|
704
|
+
folly::dynamic packAnimatedProps(const AnimatedProps& animatedProps) {
|
|
705
|
+
auto dyn = animatedProps.rawProps ? animatedProps.rawProps->toDynamic()
|
|
706
|
+
: folly::dynamic::object();
|
|
707
|
+
|
|
708
|
+
for (auto& animatedProp : animatedProps.props) {
|
|
709
|
+
packAnimatedProp(dyn, animatedProp);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
return dyn;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
} // namespace animationbackend
|
|
716
|
+
|
|
717
|
+
} // namespace facebook::react
|