react-native-windows 0.71.0-preview.1 → 0.71.0-preview.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.
@@ -289,22 +289,6 @@ function Pressable(props: Props, forwardedRef): React.Node {
289
289
  const viewRef = useRef<React.ElementRef<typeof View> | null>(null);
290
290
  useImperativeHandle(forwardedRef, () => viewRef.current);
291
291
 
292
- // [Windows
293
- const _onBlur = (event: BlurEvent) => {
294
- TextInputState.blurInput(viewRef.current);
295
- if (props.onBlur) {
296
- props.onBlur(event);
297
- }
298
- };
299
-
300
- const _onFocus = (event: FocusEvent) => {
301
- TextInputState.focusInput(viewRef.current);
302
- if (props.onFocus) {
303
- props.onFocus(event);
304
- }
305
- };
306
- // Windows]
307
-
308
292
  const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);
309
293
 
310
294
  const [pressed, setPressed] = usePressState(testOnly_pressed === true);
@@ -418,10 +402,6 @@ function Pressable(props: Props, forwardedRef): React.Node {
418
402
  <View
419
403
  {...restPropsWithDefaults}
420
404
  {...eventHandlers}
421
- // [Windows
422
- onBlur={_onBlur}
423
- onFocus={_onFocus}
424
- // Windows]
425
405
  ref={viewRef}
426
406
  style={typeof style === 'function' ? style({pressed}) : style}>
427
407
  {typeof children === 'function' ? children({pressed}) : children}
@@ -69,7 +69,7 @@ class TextShadowNode final : public ShadowNodeBase {
69
69
  UpdateOptimizedText();
70
70
  } else if (wasOptimized) {
71
71
  // Remove optimized text and re-construct as Inline tree
72
- UpdateOptimizedText();
72
+ UpdateOptimizedText(true);
73
73
  if (const auto uiManager = GetNativeUIManager(GetViewManager()->GetReactContext()).lock()) {
74
74
  for (size_t i = 0; i < m_children.size(); ++i) {
75
75
  if (const auto childNode =
@@ -87,8 +87,7 @@ class TextShadowNode final : public ShadowNodeBase {
87
87
 
88
88
  void removeAllChildren() override {
89
89
  if (m_isTextOptimized) {
90
- auto textBlock = this->GetView().as<xaml::Controls::TextBlock>();
91
- textBlock.ClearValue(xaml::Controls::TextBlock::TextProperty());
90
+ UpdateOptimizedText();
92
91
  } else {
93
92
  Super::removeAllChildren();
94
93
  }
@@ -104,7 +103,7 @@ class TextShadowNode final : public ShadowNodeBase {
104
103
  RecalculateTextHighlighters();
105
104
  }
106
105
 
107
- void UpdateOptimizedText() {
106
+ void UpdateOptimizedText(bool clearOptimizedText = false) {
108
107
  if (m_children.size() > 0 && m_isTextOptimized) {
109
108
  if (const auto uiManager = GetNativeUIManager(GetViewManager()->GetReactContext()).lock()) {
110
109
  winrt::hstring text = L"";
@@ -117,7 +116,7 @@ class TextShadowNode final : public ShadowNodeBase {
117
116
  auto textBlock = this->GetView().as<xaml::Controls::TextBlock>();
118
117
  textBlock.Text(text);
119
118
  }
120
- } else {
119
+ } else if (m_isTextOptimized || clearOptimizedText) {
121
120
  auto textBlock = this->GetView().as<xaml::Controls::TextBlock>();
122
121
  textBlock.ClearValue(xaml::Controls::TextBlock::TextProperty());
123
122
  }
@@ -85,7 +85,7 @@
85
85
  },
86
86
  "ReactNative.Hermes.Windows": {
87
87
  "type": "Transitive",
88
- "resolved": "0.0.0-2210.24002-3d61ad03",
88
+ "resolved": "0.71.1",
89
89
  "contentHash": "q38h/Gkw8d0pfUqIhRCd1j/XLhpQY4Hm7kSQthZUzetEST34acbR883/Eh+DKt4FVz9a0lh5kiAfP7piO768SA=="
90
90
  },
91
91
  "runtime.win10-arm.Microsoft.Net.Native.Compiler": {
@@ -176,7 +176,7 @@
176
176
  "Microsoft.UI.Xaml": "[2.7.0, )",
177
177
  "Microsoft.Windows.SDK.BuildTools": "[10.0.22000.194, )",
178
178
  "ReactCommon": "[1.0.0, )",
179
- "ReactNative.Hermes.Windows": "[0.0.0-2210.24002-3d61ad03, )",
179
+ "ReactNative.Hermes.Windows": "[0.71.1, )",
180
180
  "boost": "[1.76.0, )"
181
181
  }
182
182
  },
@@ -10,7 +10,7 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.71.0-preview.1</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.71.0-preview.3</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>71</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
@@ -14,7 +14,7 @@
14
14
  <!-- Enabling this will (1) Include hermes glues in the Microsoft.ReactNative binaries AND (2) Make hermes the default engine -->
15
15
  <UseHermes Condition="'$(UseHermes)' == ''">false</UseHermes>
16
16
  <!-- This will be true if (1) the client want to use hermes by setting UseHermes to true OR (2) We are building for UWP where dynamic switching is enabled -->
17
- <HermesVersion Condition="'$(HermesVersion)' == ''">0.0.0-2210.24002-3d61ad03</HermesVersion>
17
+ <HermesVersion Condition="'$(HermesVersion)' == ''">0.71.1</HermesVersion>
18
18
  <HermesPackage Condition="'$(HermesPackage)' == '' And Exists('$(PkgReactNative_Hermes_Windows)')">$(PkgReactNative_Hermes_Windows)</HermesPackage>
19
19
  <HermesPackage Condition="'$(HermesPackage)' == ''">$(NuGetPackageRoot)\ReactNative.Hermes.Windows\$(HermesVersion)</HermesPackage>
20
20
  <EnableHermesInspectorInReleaseFlavor Condition="'$(EnableHermesInspectorInReleaseFlavor)' == ''">false</EnableHermesInspectorInReleaseFlavor>
@@ -113,6 +113,8 @@ bool OriginPolicyHttpFilter::ConstWcharComparer::operator()(const wchar_t *a, co
113
113
  /*static*/ void OriginPolicyHttpFilter::SetStaticOrigin(std::string &&url) {
114
114
  if (!url.empty())
115
115
  s_origin = Uri{to_hstring(url)};
116
+ else
117
+ s_origin = nullptr;
116
118
  }
117
119
 
118
120
  /*static*/ bool OriginPolicyHttpFilter::IsSameOrigin(Uri const &u1, Uri const &u2) noexcept {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.71.0-preview.1",
3
+ "version": "0.71.0-preview.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "10.0.0-alpha.5",
27
27
  "@react-native-community/cli-platform-android": "10.0.0-alpha.4",
28
28
  "@react-native-community/cli-platform-ios": "10.0.0-alpha.3",
29
- "@react-native-windows/cli": "0.71.0-preview.1",
29
+ "@react-native-windows/cli": "0.71.0-preview.2",
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/normalize-color": "2.1.0",
32
32
  "@react-native/polyfills": "2.0.0",