react-native-windows 0.69.2 → 0.69.5

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.
@@ -725,7 +725,7 @@
725
725
  <PackageReference Include="boost" Version="1.76.0.0" />
726
726
  <PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" />
727
727
  <PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" />
728
- <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" />
728
+ <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
729
729
  <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
730
730
  </ItemGroup>
731
731
  <Choose>
@@ -118,17 +118,22 @@ struct BrushCache {
118
118
  return RegisterBrush(resourceName, brush);
119
119
  }
120
120
 
121
- winrt::IInspectable resource{winrt::Application::Current().Resources().Lookup(winrt::box_value(resourceName))};
122
-
123
- if (auto brush = resource.try_as<xaml::Media::Brush>()) {
124
- return RegisterBrush(resourceName, brush);
125
- } else if (auto color = resource.try_as<winrt::Windows::UI::Color>()) {
126
- auto brush = xaml::Media::SolidColorBrush(color.value());
127
- return RegisterBrush(resourceName, brush);
121
+ const auto appResources{winrt::Application::Current().Resources()};
122
+ const auto boxedResourceName{winrt::box_value(resourceName)};
123
+ if (appResources.HasKey(boxedResourceName)) {
124
+ winrt::IInspectable resource{appResources.Lookup(boxedResourceName)};
125
+
126
+ if (auto brush = resource.try_as<xaml::Media::Brush>()) {
127
+ return RegisterBrush(resourceName, brush);
128
+ } else if (auto color = resource.try_as<winrt::Windows::UI::Color>()) {
129
+ auto brush = xaml::Media::SolidColorBrush(color.value());
130
+ return RegisterBrush(resourceName, brush);
131
+ }
128
132
  }
129
133
 
130
134
  assert(false && "Resource is not a Color or Brush");
131
- return nullptr;
135
+ return xaml::Media::SolidColorBrush(winrt::Colors::Transparent());
136
+ ;
132
137
  }
133
138
 
134
139
  xaml::Media::Brush RegisterBrush(winrt::hstring resourceName, const xaml::Media::Brush &brush) {
@@ -143,7 +143,7 @@ bool ImageViewManager::UpdateProperty(
143
143
  } else if (propertyName == "tintColor") {
144
144
  const auto isValidColorValue = IsValidColorValue(propertyValue);
145
145
  if (isValidColorValue || propertyValue.IsNull()) {
146
- const auto color = isValidColorValue ? ColorFrom(propertyValue) : winrt::Colors::Transparent();
146
+ const auto color = isValidColorValue ? SolidColorBrushFrom(propertyValue).Color() : winrt::Colors::Transparent();
147
147
  reactImage->TintColor(color);
148
148
  }
149
149
  // Override default accessibility behavior
@@ -135,8 +135,31 @@
135
135
  "resolved": "2.2.9",
136
136
  "contentHash": "qF6RRZKaflI+LR1YODNyWYjq5YoX8IJ2wx5y8O+AW2xO+1t/Q6Mm+jQ38zJbWnmXbrcOqUYofn7Y3/KC6lTLBQ=="
137
137
  },
138
- "microsoft.reactnative": {
138
+ "common": {
139
+ "type": "Project"
140
+ },
141
+ "fmt": {
139
142
  "type": "Project"
143
+ },
144
+ "folly": {
145
+ "type": "Project",
146
+ "dependencies": {
147
+ "fmt": "1.0.0"
148
+ }
149
+ },
150
+ "microsoft.reactnative": {
151
+ "type": "Project",
152
+ "dependencies": {
153
+ "Common": "1.0.0",
154
+ "Folly": "1.0.0",
155
+ "ReactCommon": "1.0.0"
156
+ }
157
+ },
158
+ "reactcommon": {
159
+ "type": "Project",
160
+ "dependencies": {
161
+ "Folly": "1.0.0"
162
+ }
140
163
  }
141
164
  },
142
165
  "UAP,Version=v10.0.16299/win10-arm": {
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!--
2
+ <!--
3
3
  Copyright (c) Microsoft Corporation.
4
4
  Licensed under the MIT License.
5
5
 
@@ -16,12 +16,12 @@
16
16
 
17
17
  <ItemGroup>
18
18
  <!-- WinUI package name and version are set by WinUI.props -->
19
- <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" />
19
+ <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
20
20
  <!-- Hermes version is set by JSEngine.props -->
21
21
  <PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" Condition="$(UseHermes)" />
22
22
  </ItemGroup>
23
23
 
24
- <Import Project="$(ReactNativeWindowsDir)PropertySheets\ManagedCodeGen\Microsoft.ReactNative.Managed.CodeGen.targets"
24
+ <Import Project="$(ReactNativeWindowsDir)PropertySheets\ManagedCodeGen\Microsoft.ReactNative.Managed.CodeGen.targets"
25
25
  Condition="'$(ReactNativeCodeGenEnabled)' == 'true' and '$(UseExperimentalNuget)' != 'true'" />
26
26
 
27
27
  <!-- The props file for bundling is not set up to be just defaults, it assumes to be run at the end of the project. -->
@@ -31,17 +31,17 @@
31
31
  <Import Project="$(ProjectDir)\AutolinkedNativeModules.g.targets"
32
32
  Condition="Exists('$(ProjectDir)\AutolinkedNativeModules.g.targets')" />
33
33
 
34
- <Import Project="$(AppxPackageRecipe)"
34
+ <Import Project="$(AppxPackageRecipe)"
35
35
  Condition="Exists('$(AppxPackageRecipe)') And '$(DeployLayout)'=='true'" />
36
36
  <Target Name="Deploy" Condition="'$(DeployLayout)'=='true'">
37
- <Error Condition="!Exists('$(AppxPackageRecipe)')"
37
+ <Error Condition="!Exists('$(AppxPackageRecipe)')"
38
38
  Text="You must first build the project before deploying it. Did not find: $(AppxPackageRecipe)" />
39
- <Copy SourceFiles="%(AppxPackagedFile.Identity)"
39
+ <Copy SourceFiles="%(AppxPackagedFile.Identity)"
40
40
  DestinationFiles="$(MSBuildProjectDirectory)\$(OutputPath)Appx\%(AppxPackagedFile.PackagePath)" />
41
- <Copy SourceFiles="%(AppXManifest.Identity)"
42
- DestinationFiles="$(MSBuildProjectDirectory)\$(OutputPath)Appx\%(AppxManifest.PackagePath)"
41
+ <Copy SourceFiles="%(AppXManifest.Identity)"
42
+ DestinationFiles="$(MSBuildProjectDirectory)\$(OutputPath)Appx\%(AppxManifest.PackagePath)"
43
43
  Condition="'%(AppxManifest.SubType)'!='Designer'"/>
44
- <Exec Command="powershell -NonInteractive -NoProfile -Command Add-AppxPackage -Register $(MSBuildProjectDirectory)\$(OutputPath)Appx\AppxManifest.xml"
44
+ <Exec Command="powershell -NonInteractive -NoProfile -Command Add-AppxPackage -Register $(MSBuildProjectDirectory)\$(OutputPath)Appx\AppxManifest.xml"
45
45
  ContinueOnError="false" />
46
46
  </Target>
47
47
 
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!--
2
+ <!--
3
3
  Copyright (c) Microsoft Corporation.
4
4
  Licensed under the MIT License.
5
5
 
@@ -16,12 +16,12 @@
16
16
 
17
17
  <ItemGroup>
18
18
  <!-- WinUI package name and version are set by WinUI.props -->
19
- <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" />
19
+ <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
20
20
  </ItemGroup>
21
21
 
22
22
  <Target Name="Deploy" />
23
23
 
24
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\ManagedCodeGen\Microsoft.ReactNative.Managed.CodeGen.targets"
24
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\ManagedCodeGen\Microsoft.ReactNative.Managed.CodeGen.targets"
25
25
  Condition="'$(ReactNativeCodeGenEnabled)' == 'true' and '$(UseExperimentalNuget)' != 'true'" />
26
26
 
27
27
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\RequireSolution.targets" />
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!--
2
+ <!--
3
3
  Copyright (c) Microsoft Corporation.
4
4
  Licensed under the MIT License.
5
5
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  <ItemGroup>
18
18
  <!-- WinUI package name and version are set by WinUI.props -->
19
- <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" />
19
+ <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
20
20
  <!-- Hermes version is set by JSEngine.props -->
21
21
  <PackageReference Include="ReactNative.Hermes.Windows" Version="$(HermesVersion)" Condition="$(UseHermes)" />
22
22
  </ItemGroup>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!--
2
+ <!--
3
3
  Copyright (c) Microsoft Corporation.
4
4
  Licensed under the MIT License.
5
5
 
@@ -16,13 +16,13 @@
16
16
 
17
17
  <ItemGroup>
18
18
  <!-- WinUI package name and version are set by WinUI.props -->
19
- <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" />
19
+ <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
20
20
  </ItemGroup>
21
21
 
22
22
  <Target Name="Deploy" />
23
23
 
24
24
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\RequireSolution.targets" />
25
-
25
+
26
26
  <ItemDefinitionGroup>
27
27
  <Reference>
28
28
  <Private Condition="'$(ConfigurationType)' != 'Application'">false</Private>
@@ -10,10 +10,10 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.69.2</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.69.5</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>69</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>2</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>5</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
18
  </PropertyGroup>
19
19
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.69.2",
3
+ "version": "0.69.5",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "^8.0.0",
27
27
  "@react-native-community/cli-platform-android": "^8.0.0",
28
28
  "@react-native-community/cli-platform-ios": "^8.0.0",
29
- "@react-native-windows/cli": "0.69.1",
29
+ "@react-native-windows/cli": "0.69.2",
30
30
  "@react-native-windows/virtualized-list": "0.69.0",
31
31
  "@react-native/assets": "1.0.0",
32
32
  "@react-native/normalize-color": "2.0.0",
@@ -7,6 +7,7 @@
7
7
  #pragma once
8
8
 
9
9
  #include <glog/logging.h>
10
+ #include <charconv>
10
11
  #include <sstream>
11
12
 
12
13
  static inline void nyi() {
@@ -127,19 +128,27 @@ class StringToDoubleConverter {
127
128
  // nyi();
128
129
  }
129
130
 
130
- double StringToDouble(const char *s, int l, int *consumed) {
131
- size_t idx = 0;
132
- std::string str(s, l);
133
- double d = std::stod(str.c_str(), &idx);
134
- *consumed = static_cast<int>(idx);
131
+ double StringToDouble(const char *buf, int length, int *consumed) {
132
+ double d{};
133
+ auto ret = std::from_chars(buf, buf + length, d);
134
+ if (ret.ec == std::errc{}) {
135
+ *consumed = static_cast<int>(ret.ptr - buf);
136
+ } else {
137
+ *consumed = 0;
138
+ assert(false && "Conversion to double failed");
139
+ }
135
140
  return d;
136
141
  }
137
142
 
138
143
  float StringToFloat(const char *buf, int length, int *consumed) {
139
- size_t idx = 0;
140
- std::string str(buf, length);
141
- float f = std::stof(str, &idx);
142
- *consumed = static_cast<int>(idx);
144
+ float f{};
145
+ auto ret = std::from_chars(buf, buf + length, f);
146
+ if (ret.ec == std::errc{}) {
147
+ *consumed = static_cast<int>(ret.ptr - buf);
148
+ } else {
149
+ *consumed = 0;
150
+ assert(false && "Conversion to float failed");
151
+ }
143
152
  return f;
144
153
  }
145
154
  };