react-native-windows 0.0.0-canary.921 → 0.0.0-canary.922

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.
@@ -77,14 +77,12 @@ winrt::Microsoft::ReactNative::Color Color::ReadValue(
77
77
  switch (reader.ValueType()) {
78
78
  case JSValueType::Int64: {
79
79
  auto argb = reader.GetInt64();
80
- return winrt::make<Color>(facebook::react::Color{
81
- /*m_isDefined*/ true,
82
- /*color*/
83
- {static_cast<uint8_t>((argb >> 24) & 0xFF),
84
- static_cast<uint8_t>((argb >> 16) & 0xFF),
85
- static_cast<uint8_t>((argb >> 8) & 0xFF),
86
- static_cast<uint8_t>(argb & 0xFF)},
87
- {}});
80
+ return winrt::make<Color>(facebook::react::Color{/*color*/
81
+ {static_cast<uint8_t>((argb >> 24) & 0xFF),
82
+ static_cast<uint8_t>((argb >> 16) & 0xFF),
83
+ static_cast<uint8_t>((argb >> 8) & 0xFF),
84
+ static_cast<uint8_t>(argb & 0xFF)},
85
+ {}});
88
86
  }
89
87
  case JSValueType::Object: {
90
88
  std::vector<std::string> platformColors;
@@ -96,10 +94,10 @@ winrt::Microsoft::ReactNative::Color Color::ReadValue(
96
94
  SkipValue<JSValue>(reader); // Skip this property
97
95
  }
98
96
  }
99
- return winrt::make<Color>(facebook::react::Color{/*m_isDefined*/ true, /*color*/ {}, std::move(platformColors)});
97
+ return winrt::make<Color>(facebook::react::Color{/*color*/ {}, std::move(platformColors)});
100
98
  }
101
99
  default:
102
- return winrt::make<Color>(facebook::react::Color{/*m_isDefined*/ false, /*color*/ {0, 0, 0, 0}, {}});
100
+ return winrt::make<Color>(facebook::react::Color{/*color*/ {0, 0, 0, 0}, {}});
103
101
  }
104
102
  }
105
103
 
@@ -12,13 +12,10 @@ namespace facebook::react {
12
12
 
13
13
  struct Color {
14
14
  bool operator==(const Color &otherColor) const {
15
- return m_isUndefined && otherColor.m_isUndefined ||
16
- (m_isUndefined == otherColor.m_isUndefined && m_color == otherColor.m_color &&
17
- m_platformColor == otherColor.m_platformColor);
15
+ return m_color == otherColor.m_color && m_platformColor == otherColor.m_platformColor;
18
16
  }
19
17
  bool operator!=(const Color &otherColor) const {
20
- return m_isUndefined != otherColor.m_isUndefined || m_color != otherColor.m_color ||
21
- m_platformColor != otherColor.m_platformColor;
18
+ return m_color != otherColor.m_color || m_platformColor != otherColor.m_platformColor;
22
19
  }
23
20
 
24
21
  winrt::Windows::UI::Color AsWindowsColor() const {
@@ -36,13 +33,12 @@ struct Color {
36
33
  return RGB(m_color.R, m_color.G, m_color.B) | (m_color.A << 24);
37
34
  }
38
35
 
39
- bool m_isUndefined;
40
36
  winrt::Windows::UI::Color m_color;
41
37
  std::vector<std::string> m_platformColor;
42
38
  };
43
39
 
44
40
  namespace HostPlatformColor {
45
- static const facebook::react::Color UndefinedColor{true};
41
+ static const facebook::react::Color UndefinedColor{{0, 0, 0, 0} /*Black*/, {} /*Empty PlatformColors*/};
46
42
  } // namespace HostPlatformColor
47
43
 
48
44
  inline Color hostPlatformColorFromComponents(ColorComponents components) {
@@ -53,7 +49,6 @@ inline Color hostPlatformColorFromComponents(ColorComponents components) {
53
49
  static_cast<uint8_t>((int)round(components.green * ratio) & 0xff),
54
50
  static_cast<uint8_t>((int)round(components.blue * ratio) & 0xff)};
55
51
  return {
56
- /* .m_isUndefined = */ false,
57
52
  /* .m_color = */ color,
58
53
  /* .m_platformColor = */ {}};
59
54
  }
@@ -19,7 +19,6 @@ parsePlatformColor(const ContextContainer &contextContainer, int32_t surfaceId,
19
19
  auto map = (std::unordered_map<std::string, std::vector<std::string>>)value;
20
20
  if (map.find("windowsbrush") != map.end()) {
21
21
  facebook::react::Color color = {
22
- /* .m_isDefined = */ true,
23
22
  /* .m_color = */ {},
24
23
  /* .m_platformColor = */ std::move(map["windowsbrush"]),
25
24
  };
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.0.0-canary.921</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.0.0-canary.922</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>ca717fc9756cae188bfb5b8c637c0b7874edb8f3</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>1ebf0e8a935c8d98d07b3ec4c7576913140f629b</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.0.0-canary.921",
3
+ "version": "0.0.0-canary.922",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",