react-native-windows 0.75.0-preview.5 → 0.75.0-preview.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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +18 -11
- package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +1 -1
- package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.cpp +7 -5
- package/Microsoft.ReactNative/Modules/StatusBarManager.h +22 -1
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/package.json +11 -11
|
@@ -30,7 +30,9 @@ winrt::Microsoft::ReactNative::IComponentProps AbiProps::UserProps() const noexc
|
|
|
30
30
|
ShadowNode::ShadowNode(facebook::react::ShadowNode::Shared shadowNode) noexcept : m_shadowNode(shadowNode) {}
|
|
31
31
|
|
|
32
32
|
void ShadowNode::EnsureUnsealed() noexcept {
|
|
33
|
-
m_shadowNode
|
|
33
|
+
if (auto shadowNode = m_shadowNode.lock()) {
|
|
34
|
+
shadowNode->ensureUnsealed();
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
winrt::IInspectable ShadowNode::Tag() const noexcept {
|
|
@@ -42,20 +44,25 @@ void ShadowNode::Tag(winrt::IInspectable tag) noexcept {
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
winrt::IInspectable ShadowNode::StateData() const noexcept {
|
|
45
|
-
auto
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
if (auto shadowNode = m_shadowNode.lock()) {
|
|
48
|
+
auto state = shadowNode->getState();
|
|
49
|
+
react_native_assert(state && "State must not be `nullptr`.");
|
|
50
|
+
auto abiStateData =
|
|
51
|
+
static_cast<const facebook::react::ConcreteState<::Microsoft::ReactNative::AbiStateData> *>(state.get())
|
|
52
|
+
->getData();
|
|
53
|
+
return abiStateData.userdata;
|
|
54
|
+
}
|
|
55
|
+
return nullptr;
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
void ShadowNode::StateData(winrt::IInspectable tag) noexcept {
|
|
54
|
-
m_shadowNode
|
|
59
|
+
if (auto shadowNode = m_shadowNode.lock()) {
|
|
60
|
+
shadowNode->ensureUnsealed();
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
auto &state = const_cast<facebook::react::State::Shared &>(shadowNode->getState());
|
|
63
|
+
state = std::make_shared<const facebook::react::ConcreteState<::Microsoft::ReactNative::AbiStateData>>(
|
|
64
|
+
std::make_shared<const ::Microsoft::ReactNative::AbiStateData>(tag), *state);
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -17,11 +17,13 @@ YogaLayoutableShadowNode::YogaLayoutableShadowNode(facebook::react::ShadowNode::
|
|
|
17
17
|
: base_type(shadowNode) {}
|
|
18
18
|
|
|
19
19
|
void YogaLayoutableShadowNode::Layout(winrt::Microsoft::ReactNative::LayoutContext layoutContext) noexcept {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
if (auto shadowNode = m_shadowNode.lock()) {
|
|
21
|
+
std::const_pointer_cast<facebook::react::YogaLayoutableShadowNode>(
|
|
22
|
+
std::dynamic_pointer_cast<const facebook::react::YogaLayoutableShadowNode>(shadowNode))
|
|
23
|
+
->facebook::react::YogaLayoutableShadowNode::layout(
|
|
24
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::LayoutContext>(layoutContext)
|
|
25
|
+
->m_layoutContext);
|
|
26
|
+
}
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -4,9 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
#include <NativeModules.h>
|
|
6
6
|
|
|
7
|
+
#include "codegen/NativeStatusBarManagerAndroidSpec.g.h"
|
|
8
|
+
|
|
7
9
|
namespace Microsoft::ReactNative {
|
|
8
10
|
|
|
9
11
|
REACT_MODULE(StatusBarManager)
|
|
10
|
-
struct StatusBarManager {
|
|
12
|
+
struct StatusBarManager {
|
|
13
|
+
using ModuleSpec = Microsoft::ReactNativeSpecs::StatusBarManagerAndroidSpec;
|
|
14
|
+
|
|
15
|
+
REACT_GET_CONSTANTS(GetConstants)
|
|
16
|
+
static Microsoft::ReactNativeSpecs::StatusBarManagerAndroidSpec_Constants GetConstants() noexcept {
|
|
17
|
+
return {0};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
REACT_METHOD(setColor)
|
|
21
|
+
static void setColor(double /*color*/, bool /*animated*/) noexcept {}
|
|
22
|
+
|
|
23
|
+
REACT_METHOD(setTranslucent)
|
|
24
|
+
static void setTranslucent(bool /*translucent*/) noexcept {}
|
|
25
|
+
|
|
26
|
+
REACT_METHOD(setStyle)
|
|
27
|
+
static void setStyle(std::optional<std::string> /*statusBarStyle*/) noexcept {}
|
|
28
|
+
|
|
29
|
+
REACT_METHOD(setHidden)
|
|
30
|
+
static void setHidden(bool /*hidden*/) noexcept {}
|
|
31
|
+
};
|
|
11
32
|
|
|
12
33
|
} // namespace Microsoft::ReactNative
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.75.0-preview.
|
|
13
|
+
<ReactNativeWindowsVersion>0.75.0-preview.7</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>75</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>b10278638c62d886e936fe4f97aaaef88c24a69c</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.75.0-preview.
|
|
3
|
+
"version": "0.75.0-preview.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"@react-native-community/cli-platform-ios": "14.0.0",
|
|
29
29
|
"@react-native-windows/cli": "0.75.0-preview.2",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
|
-
"@react-native/assets-registry": "0.75.0-rc.
|
|
32
|
-
"@react-native/codegen": "0.75.0-rc.
|
|
33
|
-
"@react-native/community-cli-plugin": "0.75.0-rc.
|
|
34
|
-
"@react-native/gradle-plugin": "0.75.0-rc.
|
|
35
|
-
"@react-native/js-polyfills": "0.75.0-rc.
|
|
36
|
-
"@react-native/normalize-colors": "0.75.0-rc.
|
|
37
|
-
"@react-native/virtualized-lists": "0.75.0-rc.
|
|
31
|
+
"@react-native/assets-registry": "0.75.0-rc.7",
|
|
32
|
+
"@react-native/codegen": "0.75.0-rc.7",
|
|
33
|
+
"@react-native/community-cli-plugin": "0.75.0-rc.7",
|
|
34
|
+
"@react-native/gradle-plugin": "0.75.0-rc.7",
|
|
35
|
+
"@react-native/js-polyfills": "0.75.0-rc.7",
|
|
36
|
+
"@react-native/normalize-colors": "0.75.0-rc.7",
|
|
37
|
+
"@react-native/virtualized-lists": "0.75.0-rc.7",
|
|
38
38
|
"abort-controller": "^3.0.0",
|
|
39
39
|
"anser": "^1.4.9",
|
|
40
40
|
"ansi-regex": "^5.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@react-native-windows/codegen": "0.75.0-preview.1",
|
|
70
|
-
"@react-native/metro-config": "0.75.0-rc.
|
|
70
|
+
"@react-native/metro-config": "0.75.0-rc.7",
|
|
71
71
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
72
72
|
"@rnw-scripts/eslint-config": "1.2.23",
|
|
73
73
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.27",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"just-scripts": "^1.3.3",
|
|
84
84
|
"prettier": "2.8.8",
|
|
85
85
|
"react": "18.3.1",
|
|
86
|
-
"react-native": "0.75.0-rc.
|
|
86
|
+
"react-native": "0.75.0-rc.7",
|
|
87
87
|
"react-native-platform-override": "^1.9.42",
|
|
88
88
|
"react-refresh": "^0.14.0",
|
|
89
89
|
"typescript": "5.0.4"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@types/react": "^18.2.6",
|
|
93
93
|
"react": "^18.2.0",
|
|
94
|
-
"react-native": "0.75.0-rc.
|
|
94
|
+
"react-native": "0.75.0-rc.7"
|
|
95
95
|
},
|
|
96
96
|
"beachball": {
|
|
97
97
|
"defaultNpmTag": "preview",
|