react-native-windows 0.73.5 → 0.73.7

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.
@@ -64,7 +64,7 @@
64
64
  string literals. It prevents code like
65
65
  wchar_t* str = L"hello";
66
66
  from compiling. -->
67
- <AdditionalOptions>%(AdditionalOptions) /Zc:strictStrings</AdditionalOptions>
67
+ <AdditionalOptions>%(AdditionalOptions) /Zc:strictStrings /await</AdditionalOptions>
68
68
  </ClCompile>
69
69
  <Link>
70
70
  <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
@@ -78,12 +78,17 @@
78
78
  </ItemDefinitionGroup>
79
79
  <ItemGroup>
80
80
  <ClCompile Include="Unicode.cpp" />
81
+ <ClCompile Include="Utilities.cpp" />
81
82
  </ItemGroup>
82
83
  <ItemGroup>
83
84
  <ClInclude Include="Unicode.h" />
84
85
  <ClInclude Include="Utilities.h" />
85
86
  </ItemGroup>
86
87
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
88
+ <ItemGroup>
89
+ <PackageReference Include="boost" Version="1.76.0.0" />
90
+ <PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
91
+ </ItemGroup>
87
92
  <ImportGroup Label="ExtensionTargets">
88
93
  </ImportGroup>
89
94
  <Target Name="Deploy" />
@@ -12,6 +12,9 @@
12
12
  <ClCompile Include="Unicode.cpp">
13
13
  <Filter>Source Files</Filter>
14
14
  </ClCompile>
15
+ <ClCompile Include="Utilities.cpp">
16
+ <Filter>Source Files</Filter>
17
+ </ClCompile>
15
18
  </ItemGroup>
16
19
  <ItemGroup>
17
20
  <ClInclude Include="Unicode.h">
@@ -0,0 +1,59 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ #include "Utilities.h"
5
+
6
+ // Boost Library
7
+ #include <boost/archive/iterators/base64_from_binary.hpp>
8
+ #include <boost/archive/iterators/binary_from_base64.hpp>
9
+ #include <boost/archive/iterators/ostream_iterator.hpp>
10
+ #include <boost/archive/iterators/transform_width.hpp>
11
+
12
+ // Windows API
13
+ #include <winrt/Windows.Security.Cryptography.h>
14
+
15
+ // Standard Library
16
+ #include <sstream>
17
+
18
+ using std::string;
19
+ using std::string_view;
20
+ using std::wstring_view;
21
+ using winrt::array_view;
22
+
23
+ using winrt::Windows::Security::Cryptography::BinaryStringEncoding;
24
+ using winrt::Windows::Security::Cryptography::CryptographicBuffer;
25
+
26
+ namespace Microsoft::React::Utilities {
27
+
28
+ string DecodeBase64(string_view base64) noexcept {
29
+ typedef array_view<char const> av_t;
30
+ auto bytes = av_t(base64.data(), static_cast<av_t::size_type>(base64.size()));
31
+
32
+ using namespace boost::archive::iterators;
33
+ typedef transform_width<binary_from_base64<const char *>, 8, 6> decode_base64;
34
+ std::ostringstream oss;
35
+ std::copy(decode_base64(bytes.cbegin()), decode_base64(bytes.cend()), ostream_iterator<char>(oss));
36
+
37
+ return oss.str();
38
+ }
39
+
40
+ // https://www.boost.org/doc/libs/1_76_0/libs/serialization/doc/dataflow.html
41
+ string EncodeBase64(string_view text) noexcept {
42
+ typedef array_view<char const> av_t;
43
+ auto bytes = av_t(text.data(), static_cast<av_t::size_type>(text.size()));
44
+
45
+ using namespace boost::archive::iterators;
46
+ typedef base64_from_binary<transform_width<const char *, 6, 8>> encode_base64;
47
+ std::ostringstream oss;
48
+ std::copy(encode_base64(bytes.cbegin()), encode_base64(bytes.cend()), ostream_iterator<char>(oss));
49
+
50
+ // https://unix.stackexchange.com/questions/631501
51
+ auto padLength = (4 - (oss.tellp() % 4)) % 4;
52
+ for (auto i = 0; i < padLength; ++i) {
53
+ oss << '=';
54
+ }
55
+
56
+ return oss.str();
57
+ }
58
+
59
+ } // namespace Microsoft::React::Utilities
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "version": 1,
3
3
  "dependencies": {
4
- "native,Version=v0.0": {},
4
+ "native,Version=v0.0": {
5
+ "boost": {
6
+ "type": "Direct",
7
+ "requested": "[1.76.0, )",
8
+ "resolved": "1.76.0",
9
+ "contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA=="
10
+ },
11
+ "Microsoft.Windows.CppWinRT": {
12
+ "type": "Direct",
13
+ "requested": "[2.0.211028.7, )",
14
+ "resolved": "2.0.211028.7",
15
+ "contentHash": "JBGI0c3WLoU6aYJRy9Qo0MLDQfObEp+d4nrhR95iyzf7+HOgjRunHDp/6eGFREd7xq3OI1mll9ecJrMfzBvlyg=="
16
+ }
17
+ },
5
18
  "native,Version=v0.0/win10-arm": {},
6
19
  "native,Version=v0.0/win10-arm-aot": {},
7
20
  "native,Version=v0.0/win10-arm64-aot": {},
@@ -2,6 +2,9 @@
2
2
  // Licensed under the MIT License.
3
3
 
4
4
  #pragma once
5
+
6
+ // Standard Library
7
+ #include <string>
5
8
  #include <type_traits>
6
9
  #include <utility>
7
10
 
@@ -37,3 +40,11 @@ constexpr std::size_t ArraySize(T (&)[N]) noexcept {
37
40
  }
38
41
 
39
42
  } // namespace Microsoft::Common::Utilities
43
+
44
+ namespace Microsoft::React::Utilities {
45
+
46
+ std::string DecodeBase64(std::string_view text) noexcept;
47
+
48
+ std::string EncodeBase64(std::string_view text) noexcept;
49
+
50
+ } // namespace Microsoft::React::Utilities
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.73.5</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.73.7</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>73</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>5</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>7</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>8f4160298ca131e01fb8c1bd6900394735a32c58</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>0be6cf505a64a04152fa05d147f7a0210c29a57e</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -0,0 +1,142 @@
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
+ // @generated by enums.py
9
+ // clang-format off
10
+ #pragma once
11
+ #include <yoga/YGMacros.h>
12
+
13
+ YG_EXTERN_C_BEGIN
14
+
15
+ YG_ENUM_SEQ_DECL(
16
+ YGAlign,
17
+ YGAlignAuto,
18
+ YGAlignFlexStart,
19
+ YGAlignCenter,
20
+ YGAlignFlexEnd,
21
+ YGAlignStretch,
22
+ YGAlignBaseline,
23
+ YGAlignSpaceBetween,
24
+ YGAlignSpaceAround)
25
+
26
+ YG_ENUM_SEQ_DECL(
27
+ YGDimension,
28
+ YGDimensionWidth,
29
+ YGDimensionHeight)
30
+
31
+ YG_ENUM_SEQ_DECL(
32
+ YGDirection,
33
+ YGDirectionInherit,
34
+ YGDirectionLTR,
35
+ YGDirectionRTL)
36
+
37
+ YG_ENUM_SEQ_DECL(
38
+ YGDisplay,
39
+ YGDisplayFlex,
40
+ YGDisplayNone)
41
+
42
+ YG_ENUM_SEQ_DECL(
43
+ YGEdge,
44
+ YGEdgeLeft,
45
+ YGEdgeTop,
46
+ YGEdgeRight,
47
+ YGEdgeBottom,
48
+ YGEdgeStart,
49
+ YGEdgeEnd,
50
+ YGEdgeHorizontal,
51
+ YGEdgeVertical,
52
+ YGEdgeAll)
53
+
54
+ YG_ENUM_DECL(
55
+ YGErrata,
56
+ YGErrataNone = 0,
57
+ YGErrataStretchFlexBasis = 1,
58
+ YGErrataAll = 2147483647,
59
+ YGErrataClassic = 2147483646)
60
+ YG_DEFINE_ENUM_FLAG_OPERATORS(YGErrata)
61
+
62
+ YG_ENUM_SEQ_DECL(
63
+ YGExperimentalFeature,
64
+ YGExperimentalFeatureWebFlexBasis,
65
+ YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge,
66
+ YGExperimentalFeatureCallMeasureCallbackOnAllNodes) // [Win] - Only used within NetUI in Office - Keep this flag at the end of the enum
67
+
68
+ YG_ENUM_SEQ_DECL(
69
+ YGFlexDirection,
70
+ YGFlexDirectionColumn,
71
+ YGFlexDirectionColumnReverse,
72
+ YGFlexDirectionRow,
73
+ YGFlexDirectionRowReverse)
74
+
75
+ YG_ENUM_SEQ_DECL(
76
+ YGGutter,
77
+ YGGutterColumn,
78
+ YGGutterRow,
79
+ YGGutterAll)
80
+
81
+ YG_ENUM_SEQ_DECL(
82
+ YGJustify,
83
+ YGJustifyFlexStart,
84
+ YGJustifyCenter,
85
+ YGJustifyFlexEnd,
86
+ YGJustifySpaceBetween,
87
+ YGJustifySpaceAround,
88
+ YGJustifySpaceEvenly)
89
+
90
+ YG_ENUM_SEQ_DECL(
91
+ YGLogLevel,
92
+ YGLogLevelError,
93
+ YGLogLevelWarn,
94
+ YGLogLevelInfo,
95
+ YGLogLevelDebug,
96
+ YGLogLevelVerbose,
97
+ YGLogLevelFatal)
98
+
99
+ YG_ENUM_SEQ_DECL(
100
+ YGMeasureMode,
101
+ YGMeasureModeUndefined,
102
+ YGMeasureModeExactly,
103
+ YGMeasureModeAtMost)
104
+
105
+ YG_ENUM_SEQ_DECL(
106
+ YGNodeType,
107
+ YGNodeTypeDefault,
108
+ YGNodeTypeText)
109
+
110
+ YG_ENUM_SEQ_DECL(
111
+ YGOverflow,
112
+ YGOverflowVisible,
113
+ YGOverflowHidden,
114
+ YGOverflowScroll)
115
+
116
+ YG_ENUM_SEQ_DECL(
117
+ YGPositionType,
118
+ YGPositionTypeStatic,
119
+ YGPositionTypeRelative,
120
+ YGPositionTypeAbsolute)
121
+
122
+ YG_ENUM_DECL(
123
+ YGPrintOptions,
124
+ YGPrintOptionsLayout = 1,
125
+ YGPrintOptionsStyle = 2,
126
+ YGPrintOptionsChildren = 4)
127
+ YG_DEFINE_ENUM_FLAG_OPERATORS(YGPrintOptions)
128
+
129
+ YG_ENUM_SEQ_DECL(
130
+ YGUnit,
131
+ YGUnitUndefined,
132
+ YGUnitPoint,
133
+ YGUnitPercent,
134
+ YGUnitAuto)
135
+
136
+ YG_ENUM_SEQ_DECL(
137
+ YGWrap,
138
+ YGWrapNoWrap,
139
+ YGWrapWrap,
140
+ YGWrapWrapReverse)
141
+
142
+ YG_EXTERN_C_END