react-native-windows 0.72.2 → 0.72.3
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/Microsoft.ReactNative.Cxx/JSValueReader.h +1 -1
- package/Microsoft.ReactNative.Cxx/JSValueWriter.h +1 -1
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +22 -0
- package/Microsoft.ReactNative.Cxx/NativeModules.h +5 -0
- package/Microsoft.ReactNative.Cxx/StructInfo.h +4 -4
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/package.json +3 -3
|
@@ -409,7 +409,7 @@ inline void ReadValue(IJSValueReader const &reader, /*out*/ JSValueArray &value)
|
|
|
409
409
|
template <class T, std::enable_if_t<!std::is_void_v<decltype(GetStructInfo(static_cast<T *>(nullptr)))>, int>>
|
|
410
410
|
inline void ReadValue(IJSValueReader const &reader, /*out*/ T &value) noexcept {
|
|
411
411
|
if (reader.ValueType() == JSValueType::Object) {
|
|
412
|
-
const auto &fieldMap = StructInfo<T>::
|
|
412
|
+
const auto &fieldMap = StructInfo<T>::GetFieldMap();
|
|
413
413
|
hstring propertyName;
|
|
414
414
|
while (reader.GetNextObjectProperty(/*out*/ propertyName)) {
|
|
415
415
|
auto it = fieldMap.find(std::wstring_view(propertyName));
|
|
@@ -234,7 +234,7 @@ inline void WriteCustomDirectEventTypeConstant(IJSValueWriter const &writer, std
|
|
|
234
234
|
template <class T, std::enable_if_t<!std::is_void_v<decltype(GetStructInfo(static_cast<T *>(nullptr)))>, int>>
|
|
235
235
|
inline void WriteValue(IJSValueWriter const &writer, T const &value) noexcept {
|
|
236
236
|
writer.WriteObjectBegin();
|
|
237
|
-
for (const auto &fieldEntry : StructInfo<T>::
|
|
237
|
+
for (const auto &fieldEntry : StructInfo<T>::GetFieldMap()) {
|
|
238
238
|
writer.WritePropertyName(fieldEntry.first);
|
|
239
239
|
fieldEntry.second.WriteField(writer, &value);
|
|
240
240
|
}
|
|
@@ -51,6 +51,28 @@
|
|
|
51
51
|
INTERNAL_REACT_RECOMPOSER_4( \
|
|
52
52
|
(__VA_ARGS__, INTERNAL_REACT_MODULE_3_ARGS, INTERNAL_REACT_MODULE_2_ARGS, INTERNAL_REACT_MODULE_1_ARG, ))
|
|
53
53
|
|
|
54
|
+
// Another version of REACT_MODULE but does not do auto registration
|
|
55
|
+
#define INTERNAL_REACT_MODULE_NOREG_3_ARGS(moduleStruct, moduleName, eventEmitterName) \
|
|
56
|
+
struct moduleStruct; \
|
|
57
|
+
template <class TRegistry> \
|
|
58
|
+
constexpr void GetReactModuleInfo(moduleStruct *, TRegistry ®istry) noexcept { \
|
|
59
|
+
registry.RegisterModule( \
|
|
60
|
+
moduleName, eventEmitterName, winrt::Microsoft::ReactNative::ReactAttributeId<__COUNTER__>{}); \
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#define INTERNAL_REACT_MODULE_NOREG_2_ARGS(moduleStruct, moduleName) \
|
|
64
|
+
INTERNAL_REACT_MODULE_NOREG_3_ARGS(moduleStruct, moduleName, L"")
|
|
65
|
+
|
|
66
|
+
#define INTERNAL_REACT_MODULE_NOREG_1_ARG(moduleStruct) \
|
|
67
|
+
INTERNAL_REACT_MODULE_NOREG_2_ARGS(moduleStruct, L## #moduleStruct)
|
|
68
|
+
|
|
69
|
+
#define INTERNAL_REACT_MODULE_NOREG(...) \
|
|
70
|
+
INTERNAL_REACT_RECOMPOSER_4( \
|
|
71
|
+
(__VA_ARGS__, \
|
|
72
|
+
INTERNAL_REACT_MODULE_NOREG_3_ARGS, \
|
|
73
|
+
INTERNAL_REACT_MODULE_NOREG_2_ARGS, \
|
|
74
|
+
INTERNAL_REACT_MODULE_NOREG_1_ARG, ))
|
|
75
|
+
|
|
54
76
|
// Provide meta data information about struct member.
|
|
55
77
|
// For each member with a 'custom attribute' macro we create a static method to provide meta data.
|
|
56
78
|
// The member Id is generated as a ReactMemberId<__COUNTER__> type.
|
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
#define REACT_MODULE(/* moduleStruct, [opt] moduleName, [opt] eventEmitterName */...) \
|
|
31
31
|
INTERNAL_REACT_MODULE(__VA_ARGS__)(__VA_ARGS__)
|
|
32
32
|
|
|
33
|
+
// REACT_MODULE_NOREG is REACT_MODULE without auto registration
|
|
34
|
+
// they have the same arguments
|
|
35
|
+
#define REACT_MODULE_NOREG(/* moduleStruct, [opt] moduleName, [opt] eventEmitterName */...) \
|
|
36
|
+
INTERNAL_REACT_MODULE_NOREG(__VA_ARGS__)(__VA_ARGS__)
|
|
37
|
+
|
|
33
38
|
// REACT_INIT(method)
|
|
34
39
|
// Arguments:
|
|
35
40
|
// - method (required) - the method name the macro is attached to.
|
|
@@ -113,12 +113,12 @@ void FieldWriter(IJSValueWriter const &writer, const void *obj, const uintptr_t
|
|
|
113
113
|
|
|
114
114
|
template <class T>
|
|
115
115
|
struct StructInfo {
|
|
116
|
-
static const FieldMap
|
|
116
|
+
static const FieldMap &GetFieldMap() {
|
|
117
|
+
static const FieldMap fieldMap = GetStructInfo(static_cast<T *>(nullptr));
|
|
118
|
+
return fieldMap;
|
|
119
|
+
}
|
|
117
120
|
};
|
|
118
121
|
|
|
119
|
-
template <class T>
|
|
120
|
-
/*static*/ const FieldMap StructInfo<T>::FieldMap = GetStructInfo(static_cast<T *>(nullptr));
|
|
121
|
-
|
|
122
122
|
template <int I>
|
|
123
123
|
using ReactFieldId = std::integral_constant<int, I>;
|
|
124
124
|
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.72.
|
|
13
|
+
<ReactNativeWindowsVersion>0.72.3</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>72</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>3</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>6485abeed82accde1b46f002e7701b6e630a12b6</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.72.
|
|
3
|
+
"version": "0.72.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@react-native-community/cli": "11.3.5",
|
|
27
27
|
"@react-native-community/cli-platform-android": "11.3.5",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "11.3.5",
|
|
29
|
-
"@react-native-windows/cli": "0.72.
|
|
29
|
+
"@react-native-windows/cli": "0.72.1",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
31
|
"@react-native/assets-registry": "^0.72.0",
|
|
32
32
|
"@react-native/codegen": "^0.72.6",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"yargs": "^17.6.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@react-native-windows/codegen": "0.72.
|
|
66
|
+
"@react-native-windows/codegen": "0.72.1",
|
|
67
67
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
68
68
|
"@rnw-scripts/eslint-config": "1.1.15",
|
|
69
69
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.1",
|