react-native-windows 0.75.0-preview.5 → 0.75.0-preview.6

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.
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 75,
19
19
  patch: 0,
20
- prerelease: 'rc.6',
20
+ prerelease: 'rc.7',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -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->ensureUnsealed();
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 state = m_shadowNode->getState();
46
- react_native_assert(state && "State must not be `nullptr`.");
47
- auto abiStateData =
48
- static_cast<const facebook::react::ConcreteState<::Microsoft::ReactNative::AbiStateData> *>(state.get())
49
- ->getData();
50
- return abiStateData.userdata;
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->ensureUnsealed();
59
+ if (auto shadowNode = m_shadowNode.lock()) {
60
+ shadowNode->ensureUnsealed();
55
61
 
56
- auto &state = const_cast<facebook::react::State::Shared &>(m_shadowNode->getState());
57
- state = std::make_shared<const facebook::react::ConcreteState<::Microsoft::ReactNative::AbiStateData>>(
58
- std::make_shared<const ::Microsoft::ReactNative::AbiStateData>(tag), *state);
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
@@ -43,7 +43,7 @@ struct ShadowNode : ShadowNodeT<ShadowNode> {
43
43
  void StateData(winrt::IInspectable tag) noexcept;
44
44
 
45
45
  protected:
46
- facebook::react::ShadowNode::Shared m_shadowNode;
46
+ facebook::react::ShadowNode::Weak m_shadowNode;
47
47
  winrt::IInspectable m_tag;
48
48
  };
49
49
 
@@ -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
- std::const_pointer_cast<facebook::react::YogaLayoutableShadowNode>(
21
- std::dynamic_pointer_cast<const facebook::react::YogaLayoutableShadowNode>(m_shadowNode))
22
- ->facebook::react::YogaLayoutableShadowNode::layout(
23
- winrt::get_self<winrt::Microsoft::ReactNative::implementation::LayoutContext>(layoutContext)
24
- ->m_layoutContext);
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
@@ -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.5</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.75.0-preview.6</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>75</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>2a861513f5dd870ebec5c0aebd152740d7076ffb</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>36274bc5374a75cb75565749adb1d5295724dfc8</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.5",
3
+ "version": "0.75.0-preview.6",
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.6",
32
- "@react-native/codegen": "0.75.0-rc.6",
33
- "@react-native/community-cli-plugin": "0.75.0-rc.6",
34
- "@react-native/gradle-plugin": "0.75.0-rc.6",
35
- "@react-native/js-polyfills": "0.75.0-rc.6",
36
- "@react-native/normalize-colors": "0.75.0-rc.6",
37
- "@react-native/virtualized-lists": "0.75.0-rc.6",
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.6",
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.6",
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.6"
94
+ "react-native": "0.75.0-rc.7"
95
95
  },
96
96
  "beachball": {
97
97
  "defaultNpmTag": "preview",