react-native-windows 0.71.0-preview.2 → 0.71.0-preview.4
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/NativeComponent/BaseViewConfig.windows.js +24 -6
- package/Microsoft.ReactNative/Views/TextViewManager.cpp +4 -5
- package/Microsoft.ReactNative.Managed/packages.lock.json +2 -2
- package/PropertySheets/Generated/PackageVersion.g.props +1 -1
- package/PropertySheets/JSEngine.props +1 -1
- package/Shared/Networking/OriginPolicyHttpFilter.cpp +2 -0
- package/package.json +2 -2
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
import type {PartialViewConfigWithoutName} from './PlatformBaseViewConfig';
|
|
12
12
|
|
|
13
13
|
import ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes';
|
|
14
|
-
import {
|
|
15
|
-
ConditionallyIgnoredEventHandlers,
|
|
16
|
-
DynamicallyInjectedByGestureHandler,
|
|
17
|
-
} from './ViewConfigIgnore';
|
|
14
|
+
import {DynamicallyInjectedByGestureHandler} from './ViewConfigIgnore';
|
|
18
15
|
|
|
19
16
|
const bubblingEventTypes = {
|
|
20
17
|
// Generic Events
|
|
@@ -162,6 +159,15 @@ const directEventTypes = {
|
|
|
162
159
|
onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({
|
|
163
160
|
registrationName: 'onGestureHandlerStateChange',
|
|
164
161
|
}),
|
|
162
|
+
// [Windows
|
|
163
|
+
// Mouse enter/leave events
|
|
164
|
+
topMouseEnter: {
|
|
165
|
+
registrationName: 'onMouseEnter',
|
|
166
|
+
},
|
|
167
|
+
topMouseLeave: {
|
|
168
|
+
registrationName: 'onMouseLeave',
|
|
169
|
+
},
|
|
170
|
+
// Windows]
|
|
165
171
|
};
|
|
166
172
|
|
|
167
173
|
const validAttributesForNonEventProps = {
|
|
@@ -295,7 +301,9 @@ const validAttributesForNonEventProps = {
|
|
|
295
301
|
};
|
|
296
302
|
|
|
297
303
|
// Props for bubbling and direct events
|
|
298
|
-
|
|
304
|
+
// [Windows
|
|
305
|
+
const validAttributesForEventProps = {
|
|
306
|
+
// Windows]
|
|
299
307
|
onLayout: true,
|
|
300
308
|
onMagicTap: true,
|
|
301
309
|
|
|
@@ -334,13 +342,23 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({
|
|
|
334
342
|
onPointerLeave: true,
|
|
335
343
|
onPointerOver: true,
|
|
336
344
|
onPointerOut: true,
|
|
337
|
-
|
|
345
|
+
|
|
346
|
+
// [Windows
|
|
347
|
+
// Mouse enter/leave events
|
|
348
|
+
onMouseEnter: true,
|
|
349
|
+
onMouseLeave: true,
|
|
350
|
+
// Windows]
|
|
351
|
+
// [Windows
|
|
352
|
+
};
|
|
353
|
+
// Windows]
|
|
338
354
|
|
|
339
355
|
/**
|
|
340
356
|
* On iOS, view managers define all of a component's props.
|
|
341
357
|
* All view managers extend RCTViewManager, and RCTViewManager declares these props.
|
|
342
358
|
*/
|
|
359
|
+
// [Windows
|
|
343
360
|
const PlatformBaseViewConfigWindows: PartialViewConfigWithoutName = {
|
|
361
|
+
// Windows]
|
|
344
362
|
bubblingEventTypes,
|
|
345
363
|
directEventTypes,
|
|
346
364
|
validAttributes: {
|
|
@@ -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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
13
|
+
<ReactNativeWindowsVersion>0.71.0-preview.4</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.
|
|
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.
|
|
3
|
+
"version": "0.71.0-preview.4",
|
|
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.
|
|
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",
|