diff --git a/ReactCommon/fabric/view/ViewProps.cpp b/ReactCommon/fabric/view/ViewProps.cpp index 0d0f3efde..5f667312c 100644 --- a/ReactCommon/fabric/view/ViewProps.cpp +++ b/ReactCommon/fabric/view/ViewProps.cpp @@ -28,14 +28,16 @@ ViewProps::ViewProps(const ViewProps &sourceProps, const RawProps &rawProps): #pragma mark - DebugStringConvertible SharedDebugStringConvertibleList ViewProps::getDebugProps() const { + auto &&defaultViewProps = ViewProps(); + return AccessibilityProps::getDebugProps() + YogaStylableProps::getDebugProps() + SharedDebugStringConvertibleList { - debugStringConvertibleItem("zIndex", zIndex), - debugStringConvertibleItem("opacity", opacity), - debugStringConvertibleItem("foregroundColor", foregroundColor), - debugStringConvertibleItem("backgroundColor", backgroundColor), + debugStringConvertibleItem("zIndex", zIndex, defaultViewProps.zIndex), + debugStringConvertibleItem("opacity", opacity, defaultViewProps.opacity), + debugStringConvertibleItem("foregroundColor", foregroundColor, defaultViewProps.foregroundColor), + debugStringConvertibleItem("backgroundColor", backgroundColor, defaultViewProps.backgroundColor), }; } diff --git a/ReactCommon/fabric/view/yoga/yogaValuesConversions.cpp b/ReactCommon/fabric/view/conversions.h similarity index 50% rename from ReactCommon/fabric/view/yoga/yogaValuesConversions.cpp rename to ReactCommon/fabric/view/conversions.h index d53f78b2a..4f129c2a9 100644 --- a/ReactCommon/fabric/view/yoga/yogaValuesConversions.cpp +++ b/ReactCommon/fabric/view/conversions.h @@ -5,16 +5,34 @@ * LICENSE file in the root directory of this source tree. */ -#include "yogaValuesConversions.h" - -#include +#pragma once #include +#include +#include +#include +#include +#include + +// Yoga does not have this as part of the library, so we have to implement it +// here ouside of `facebook::react::` namespace. +inline bool operator==(const YGValue &lhs, const YGValue &rhs) { + if ( + (lhs.unit == YGUnitUndefined && rhs.unit == YGUnitUndefined) || + (lhs.unit == YGUnitAuto && rhs.unit == YGUnitAuto) + ) { + return true; + } + + return + lhs.unit == rhs.unit && + ((isnan(lhs.value) && isnan(rhs.value)) || (lhs.value == rhs.value)); +} namespace facebook { namespace react { -Float fabricFloatFromYogaFloat(float value) { +inline Float fabricFloatFromYogaFloat(float value) { if (value == YGUndefined) { return kFloatUndefined; } @@ -22,7 +40,7 @@ Float fabricFloatFromYogaFloat(float value) { return (Float)value; } -float yogaFloatFromFabricFloat(Float value) { +inline float yogaFloatFromFabricFloat(Float value) { if (value == kFloatUndefined) { return YGUndefined; } @@ -30,7 +48,7 @@ float yogaFloatFromFabricFloat(Float value) { return (float)value; } -Float fabricFloatFromYogaOptionalFloat(YGFloatOptional value) { +inline Float fabricFloatFromYogaOptionalFloat(YGFloatOptional value) { if (value.isUndefined()) { return kFloatUndefined; } @@ -38,7 +56,7 @@ Float fabricFloatFromYogaOptionalFloat(YGFloatOptional value) { return fabricFloatFromYogaFloat(value.getValue()); } -YGFloatOptional yogaOptionalFloatFromFabricFloat(Float value) { +inline YGFloatOptional yogaOptionalFloatFromFabricFloat(Float value) { if (value == kFloatUndefined) { return YGFloatOptional(); } @@ -46,7 +64,7 @@ YGFloatOptional yogaOptionalFloatFromFabricFloat(Float value) { return YGFloatOptional(yogaFloatFromFabricFloat(value)); } -YGValue yogaStyleValueFromFloat(const Float &value) { +inline YGValue yogaStyleValueFromFloat(const Float &value) { if (isnan(value) || value == kFloatUndefined) { return YGValueUndefined; } @@ -54,7 +72,7 @@ YGValue yogaStyleValueFromFloat(const Float &value) { return {(float)value, YGUnitPoint}; } -LayoutMetrics layoutMetricsFromYogaNode(YGNode &yogaNode) { +inline LayoutMetrics layoutMetricsFromYogaNode(YGNode &yogaNode) { LayoutMetrics layoutMetrics; YGLayout layout = yogaNode.getLayout(); @@ -93,142 +111,130 @@ LayoutMetrics layoutMetricsFromYogaNode(YGNode &yogaNode) { return layoutMetrics; } -YGDirection yogaStyleDirectionFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGDirection &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "inherit") { return YGDirectionInherit; } - if (stringValue == "ltr") { return YGDirectionLTR; } - if (stringValue == "rtl") { return YGDirectionRTL; } - + if (stringValue == "inherit") { result = YGDirectionInherit; return; } + if (stringValue == "ltr") { result = YGDirectionLTR; return; } + if (stringValue == "rtl") { result = YGDirectionRTL; return; } abort(); } -YGFlexDirection yogaStyleFlexDirectionFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGFlexDirection &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "column") { return YGFlexDirectionColumn; } - if (stringValue == "column-reverse") { return YGFlexDirectionColumnReverse; } - if (stringValue == "row") { return YGFlexDirectionRow; } - if (stringValue == "row-reverse") { return YGFlexDirectionRowReverse; } - + if (stringValue == "column") { result = YGFlexDirectionColumn; return; } + if (stringValue == "column-reverse") { result = YGFlexDirectionColumnReverse; return; } + if (stringValue == "row") { result = YGFlexDirectionRow; return; } + if (stringValue == "row-reverse") { result = YGFlexDirectionRowReverse; return; } abort(); } -YGJustify yogaStyleJustifyFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGJustify &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "flex-start") { return YGJustifyFlexStart; } - if (stringValue == "center") { return YGJustifyCenter; } - if (stringValue == "flex-end") { return YGJustifyFlexEnd; } - if (stringValue == "space-between") { return YGJustifySpaceBetween; } - if (stringValue == "space-around") { return YGJustifySpaceAround; } - if (stringValue == "space-evenly") { return YGJustifySpaceEvenly; } - + if (stringValue == "flex-start") { result = YGJustifyFlexStart; return; } + if (stringValue == "center") { result = YGJustifyCenter; return; } + if (stringValue == "flex-end") { result = YGJustifyFlexEnd; return; } + if (stringValue == "space-between") { result = YGJustifySpaceBetween; return; } + if (stringValue == "space-around") { result = YGJustifySpaceAround; return; } + if (stringValue == "space-evenly") { result = YGJustifySpaceEvenly; return; } abort(); } -YGAlign yogaStyleAlignFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGAlign &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "auto") { return YGAlignAuto; } - if (stringValue == "flex-start") { return YGAlignFlexStart; } - if (stringValue == "center") { return YGAlignCenter; } - if (stringValue == "flex-end") { return YGAlignFlexEnd; } - if (stringValue == "stretch") { return YGAlignStretch; } - if (stringValue == "baseline") { return YGAlignBaseline; } - if (stringValue == "between") { return YGAlignSpaceBetween; } - if (stringValue == "space-around") { return YGAlignSpaceAround; } - + if (stringValue == "auto") { result = YGAlignAuto; return; } + if (stringValue == "flex-start") { result = YGAlignFlexStart; return; } + if (stringValue == "center") { result = YGAlignCenter; return; } + if (stringValue == "flex-end") { result = YGAlignFlexEnd; return; } + if (stringValue == "stretch") { result = YGAlignStretch; return; } + if (stringValue == "baseline") { result = YGAlignBaseline; return; } + if (stringValue == "between") { result = YGAlignSpaceBetween; return; } + if (stringValue == "space-around") { result = YGAlignSpaceAround; return; } abort(); } -YGPositionType yogaStylePositionTypeFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGPositionType &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "relative") { return YGPositionTypeRelative; } - if (stringValue == "absolute") { return YGPositionTypeAbsolute; } - + if (stringValue == "relative") { result = YGPositionTypeRelative; return; } + if (stringValue == "absolute") { result = YGPositionTypeAbsolute; return; } abort(); } -YGWrap yogaStyleWrapFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGWrap &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "no-wrap") { return YGWrapNoWrap; } - if (stringValue == "wrap") { return YGWrapWrap; } - if (stringValue == "wrap-reverse") { return YGWrapWrapReverse; } - + if (stringValue == "no-wrap") { result = YGWrapNoWrap; return; } + if (stringValue == "wrap") { result = YGWrapWrap; return; } + if (stringValue == "wrap-reverse") { result = YGWrapWrapReverse; return; } abort(); } -YGOverflow yogaStyleOverflowFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGOverflow &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "visible") { return YGOverflowVisible; } - if (stringValue == "hidden") { return YGOverflowHidden; } - if (stringValue == "scroll") { return YGOverflowScroll; } - + if (stringValue == "visible") { result = YGOverflowVisible; return; } + if (stringValue == "hidden") { result = YGOverflowHidden; return; } + if (stringValue == "scroll") { result = YGOverflowScroll; return; } abort(); } -YGDisplay yogaStyleDisplayFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGDisplay &result) { assert(value.isString()); auto stringValue = value.asString(); - - if (stringValue == "flex") { return YGDisplayFlex; } - if (stringValue == "none") { return YGDisplayNone; } - + if (stringValue == "flex") { result = YGDisplayFlex; return; } + if (stringValue == "none") { result = YGDisplayNone; return; } abort(); } -YGValue yogaStyleValueFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGValue &result) { if (value.isNumber()) { - return yogaStyleValueFromFloat(value.asDouble()); + result = yogaStyleValueFromFloat(value.asDouble()); + return; } else if (value.isString()) { const auto stringValue = value.asString(); if (stringValue == "auto") { - return YGValueUndefined; + result = YGValueUndefined; + return; } else { if (stringValue.back() == '%') { - return { folly::to(stringValue.substr(stringValue.length() - 1)), YGUnitPercent }; + result = { folly::to(stringValue.substr(stringValue.length() - 1)), YGUnitPercent }; + return; } else { - return { folly::to(stringValue), YGUnitPoint }; + result = { folly::to(stringValue), YGUnitPoint }; + return; } } } - - return YGValueUndefined; + result = YGValueUndefined; } -YGFloatOptional yogaStyleOptionalFloatFromDynamic(const folly::dynamic &value) { +inline void fromDynamic(const folly::dynamic &value, YGFloatOptional &result) { if (value.isNumber()) { - return YGFloatOptional(value.asDouble()); + result = YGFloatOptional(value.asDouble()); + return; } else if (value.isString()) { const auto stringValue = value.asString(); if (stringValue == "auto") { - return YGFloatOptional(); + result = YGFloatOptional(); + return; } } - abort(); } -std::string stringFromYogaDimensions(std::array dimensions) { +inline std::string toString(const std::array &dimensions) { return "{" + folly::to(dimensions[0]) + ", " + folly::to(dimensions[1]) + "}"; } -std::string stringFromYogaPosition(std::array position) { +inline std::string toString(const std::array &position) { return "{" + folly::to(position[0]) + ", " + folly::to(position[1]) + "}"; } -std::string stringFromYogaEdges(std::array edges) { +inline std::string toString(const std::array &edges) { return "{" + folly::to(edges[0]) + ", " + folly::to(edges[1]) + ", " + @@ -236,7 +242,7 @@ std::string stringFromYogaEdges(std::array edges) { folly::to(edges[3]) + "}"; } -std::string stringFromYogaStyleDirection(YGDirection value) { +inline std::string toString(const YGDirection &value) { switch (value) { case YGDirectionInherit: return "inherit"; case YGDirectionLTR: return "ltr"; @@ -244,7 +250,7 @@ std::string stringFromYogaStyleDirection(YGDirection value) { } } -std::string stringFromYogaStyleFlexDirection(YGFlexDirection value) { +inline std::string toString(const YGFlexDirection &value) { switch (value) { case YGFlexDirectionColumn: return "column"; case YGFlexDirectionColumnReverse: return "column-reverse"; @@ -253,7 +259,7 @@ std::string stringFromYogaStyleFlexDirection(YGFlexDirection value) { } } -std::string stringFromYogaStyleJustify(YGJustify value) { +inline std::string toString(const YGJustify &value) { switch (value) { case YGJustifyFlexStart: return "flex-start"; case YGJustifyCenter: return "center"; @@ -264,7 +270,7 @@ std::string stringFromYogaStyleJustify(YGJustify value) { } } -std::string stringFromYogaStyleAlign(YGAlign value) { +inline std::string toString(const YGAlign &value) { switch (value) { case YGAlignAuto: return "auto"; case YGAlignFlexStart: return "flex-start"; @@ -277,14 +283,14 @@ std::string stringFromYogaStyleAlign(YGAlign value) { } } -std::string stringFromYogaStylePositionType(YGPositionType value) { +inline std::string toString(const YGPositionType &value) { switch (value) { case YGPositionTypeRelative: return "relative"; case YGPositionTypeAbsolute: return "absolute"; } } -std::string stringFromYogaStyleWrap(YGWrap value) { +inline std::string toString(const YGWrap &value) { switch (value) { case YGWrapNoWrap: return "no-wrap"; case YGWrapWrap: return "wrap"; @@ -292,7 +298,7 @@ std::string stringFromYogaStyleWrap(YGWrap value) { } } -std::string stringFromYogaStyleOverflow(YGOverflow value) { +inline std::string toString(const YGOverflow &value) { switch (value) { case YGOverflowVisible: return "visible"; case YGOverflowScroll: return "scroll"; @@ -300,14 +306,14 @@ std::string stringFromYogaStyleOverflow(YGOverflow value) { } } -std::string stringFromYogaStyleDisplay(YGDisplay value) { +inline std::string toString(const YGDisplay &value) { switch (value) { case YGDisplayFlex: return "flex"; case YGDisplayNone: return "none"; } } -std::string stringFromYogaStyleValue(YGValue value) { +inline std::string toString(const YGValue &value) { switch (value.unit) { case YGUnitUndefined: return "undefined"; case YGUnitPoint: return folly::to(value.value); @@ -316,7 +322,7 @@ std::string stringFromYogaStyleValue(YGValue value) { } } -std::string stringFromYogaStyleOptionalFloat(YGFloatOptional value) { +inline std::string toString(const YGFloatOptional &value) { if (value.isUndefined()) { return "undefined"; } @@ -324,23 +330,23 @@ std::string stringFromYogaStyleOptionalFloat(YGFloatOptional value) { return folly::to(fabricFloatFromYogaFloat(value.getValue())); } -std::string stringFromYogaStyleDimensions(std::array value) { +inline std::string toString(const std::array &value) { return "{" + - stringFromYogaStyleValue(value[0]) + ", " + - stringFromYogaStyleValue(value[1]) + "}"; + toString(value[0]) + ", " + + toString(value[1]) + "}"; } -std::string stringFromYogaStyleEdges(std::array value) { +inline std::string toString(const std::array &value) { return "{" + - stringFromYogaStyleValue(value[0]) + ", " + - stringFromYogaStyleValue(value[1]) + ", " + - stringFromYogaStyleValue(value[2]) + ", " + - stringFromYogaStyleValue(value[3]) + ", " + - stringFromYogaStyleValue(value[4]) + ", " + - stringFromYogaStyleValue(value[5]) + ", " + - stringFromYogaStyleValue(value[6]) + ", " + - stringFromYogaStyleValue(value[7]) + ", " + - stringFromYogaStyleValue(value[8]) + "}"; + toString(value[0]) + ", " + + toString(value[1]) + ", " + + toString(value[2]) + ", " + + toString(value[3]) + ", " + + toString(value[4]) + ", " + + toString(value[5]) + ", " + + toString(value[6]) + ", " + + toString(value[7]) + ", " + + toString(value[8]) + "}"; } } // namespace react diff --git a/ReactCommon/fabric/view/debugStringConvertibleUtils.h b/ReactCommon/fabric/view/debugStringConvertibleUtils.h deleted file mode 100644 index a1a2f9422..000000000 --- a/ReactCommon/fabric/view/debugStringConvertibleUtils.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#pragma once - -#include -#include - -// Yoga does not have this as part of the library, so we have to implement it -// here ouside of `facebook::react::` namespace. -inline bool operator==(const YGValue &lhs, const YGValue &rhs) { - if ( - (lhs.unit == YGUnitUndefined && rhs.unit == YGUnitUndefined) || - (lhs.unit == YGUnitAuto && rhs.unit == YGUnitAuto) - ) { - return true; - } - - return - lhs.unit == rhs.unit && - ((isnan(lhs.value) && isnan(rhs.value)) || (lhs.value == rhs.value)); -} - -namespace facebook { -namespace react { - -using YogaDimentionsType = std::array; -using YogaEdgesType = std::array; - -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YogaDimentionsType, stringFromYogaStyleDimensions) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YogaEdgesType, stringFromYogaStyleEdges) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGDirection, stringFromYogaStyleDirection) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGFlexDirection, stringFromYogaStyleFlexDirection) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGJustify, stringFromYogaStyleJustify) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGAlign, stringFromYogaStyleAlign) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGPositionType, stringFromYogaStylePositionType) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGWrap, stringFromYogaStyleWrap) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGOverflow, stringFromYogaStyleOverflow) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGDisplay, stringFromYogaStyleDisplay) -DEBUG_STRING_CONVERTIBLE_TEMPLATE(YGValue, stringFromYogaStyleValue) -DEBUG_STRING_CONVERTIBLE_TEMPLATE_EX(YGFloatOptional, stringFromYogaStyleOptionalFloat, YGFloatOptional(), IS_EQUAL) - -} // namespace react -} // namespace facebook diff --git a/ReactCommon/fabric/view/propsConversions.h b/ReactCommon/fabric/view/propsConversions.h index 76d19228a..b21ccbcae 100644 --- a/ReactCommon/fabric/view/propsConversions.h +++ b/ReactCommon/fabric/view/propsConversions.h @@ -8,22 +8,11 @@ #pragma once #include -#include +#include namespace facebook { namespace react { -CONVERT_RAW_PROP_TEMPLATE(YGDirection, yogaStyleDirectionFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGFlexDirection, yogaStyleFlexDirectionFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGJustify, yogaStyleJustifyFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGAlign, yogaStyleAlignFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGPositionType, yogaStylePositionTypeFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGWrap, yogaStyleWrapFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGOverflow, yogaStyleOverflowFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGDisplay, yogaStyleDisplayFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGValue, yogaStyleValueFromDynamic) -CONVERT_RAW_PROP_TEMPLATE(YGFloatOptional, yogaStyleOptionalFloatFromDynamic) - static std::array convertRawProp(const RawProps &rawProps, const std::string &widthName, const std::string &heightName, const std::array &defaultValue) { std::array dimentions; dimentions[YGDimensionWidth] = convertRawProp(rawProps, widthName, defaultValue[YGDimensionWidth]); diff --git a/ReactCommon/fabric/view/root/RootProps.cpp b/ReactCommon/fabric/view/root/RootProps.cpp index 4040ed3a7..70aac488a 100644 --- a/ReactCommon/fabric/view/root/RootProps.cpp +++ b/ReactCommon/fabric/view/root/RootProps.cpp @@ -8,7 +8,7 @@ #include "RootProps.h" #include "YogaLayoutableShadowNode.h" -#include "yogaValuesConversions.h" +#include "conversions.h" namespace facebook { namespace react { diff --git a/ReactCommon/fabric/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/view/yoga/YogaLayoutableShadowNode.cpp index 10d1a2aa7..49d018ecb 100644 --- a/ReactCommon/fabric/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/view/yoga/YogaLayoutableShadowNode.cpp @@ -15,7 +15,7 @@ #include #include -#include "yogaValuesConversions.h" +#include "conversions.h" namespace facebook { namespace react { diff --git a/ReactCommon/fabric/view/yoga/YogaStylableProps.cpp b/ReactCommon/fabric/view/yoga/YogaStylableProps.cpp index 4a3553c1f..d89686b53 100644 --- a/ReactCommon/fabric/view/yoga/YogaStylableProps.cpp +++ b/ReactCommon/fabric/view/yoga/YogaStylableProps.cpp @@ -7,14 +7,14 @@ #include "YogaStylableProps.h" +#include #include -#include -#include #include +#include #include #include -#include "yogaValuesConversions.h" +#include "conversions.h" namespace facebook { namespace react { diff --git a/ReactCommon/fabric/view/yoga/yogaValuesConversions.h b/ReactCommon/fabric/view/yoga/yogaValuesConversions.h deleted file mode 100644 index 376182933..000000000 --- a/ReactCommon/fabric/view/yoga/yogaValuesConversions.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#pragma once - -#include -#include -#include - -#include - -namespace facebook { -namespace react { - -struct LayoutMetrics; - -Float fabricFloatFromYogaFloat(float value); -float yogaFloatFromFabricFloat(Float value); - -Float fabricFloatFromYogaOptionalFloat(YGFloatOptional value); -YGFloatOptional yogaOptionalFloatFromFabricFloat(Float value); - -YGValue yogaStyleValueFromFloat(const Float &value); - -LayoutMetrics layoutMetricsFromYogaNode(YGNode &yogaNode); - -YGDirection yogaStyleDirectionFromDynamic(const folly::dynamic &value); -YGFlexDirection yogaStyleFlexDirectionFromDynamic(const folly::dynamic &value); -YGJustify yogaStyleJustifyFromDynamic(const folly::dynamic &value); -YGAlign yogaStyleAlignFromDynamic(const folly::dynamic &value); -YGPositionType yogaStylePositionTypeFromDynamic(const folly::dynamic &value); -YGWrap yogaStyleWrapFromDynamic(const folly::dynamic &value); -YGOverflow yogaStyleOverflowFromDynamic(const folly::dynamic &value); -YGDisplay yogaStyleDisplayFromDynamic(const folly::dynamic &value); -YGValue yogaStyleValueFromDynamic(const folly::dynamic &value); -YGFloatOptional yogaStyleOptionalFloatFromDynamic(const folly::dynamic &value); - -std::string stringFromYogaDimensions(std::array dimensions); -std::string stringFromYogaPosition(std::array position); -std::string stringFromYogaEdges(std::array edges); -std::string stringFromYogaStyleDirection(YGDirection direction); -std::string stringFromYogaStyleFlexDirection(YGFlexDirection value); -std::string stringFromYogaStyleJustify(YGJustify value); -std::string stringFromYogaStyleAlign(YGAlign value); -std::string stringFromYogaStylePositionType(YGPositionType value); -std::string stringFromYogaStyleWrap(YGWrap value); -std::string stringFromYogaStyleOverflow(YGOverflow value); -std::string stringFromYogaStyleDisplay(YGDisplay value); -std::string stringFromYogaStyleValue(YGValue value); -std::string stringFromYogaStyleOptionalFloat(YGFloatOptional value); -std::string stringFromYogaStyleDimensions(std::array value); -std::string stringFromYogaStyleEdges(std::array value); - -} // namespace react -} // namespace facebook