react-native-windows 0.74.3 → 0.74.5
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/Components/TextInput/TextInput.windows.js +6 -2
- package/Libraries/Components/View/View.windows.js +3 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +17 -7
- package/Microsoft.ReactNative/CompositionRootView.idl +1 -0
- package/Microsoft.ReactNative/CompositionUIService.idl +4 -0
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +2 -1
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +106 -19
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +45 -13
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +28 -64
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +7 -11
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +6 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +27 -16
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +13 -4
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +49 -95
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +11 -15
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +16 -31
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +5 -8
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +24 -81
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +4 -13
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +53 -68
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +5 -7
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +38 -84
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +6 -10
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +52 -104
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +7 -13
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -0
- package/Microsoft.ReactNative/ViewProps.idl +37 -3
- package/Microsoft.ReactNative.Cxx/JSValueComposition.h +4 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/JSEngine.props +1 -1
- package/Shared/HermesRuntimeHolder.cpp +8 -0
- package/package.json +1 -1
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
21
21
|
struct CompTextHost;
|
|
22
22
|
|
|
23
|
-
struct WindowsTextInputComponentView
|
|
23
|
+
struct WindowsTextInputComponentView
|
|
24
|
+
: WindowsTextInputComponentViewT<WindowsTextInputComponentView, ViewComponentView> {
|
|
24
25
|
friend CompTextHost;
|
|
25
26
|
|
|
26
|
-
using Super = WindowsTextInputComponentViewT<WindowsTextInputComponentView,
|
|
27
|
+
using Super = WindowsTextInputComponentViewT<WindowsTextInputComponentView, ViewComponentView>;
|
|
27
28
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
28
29
|
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
29
30
|
facebook::react::Tag tag,
|
|
@@ -43,19 +44,13 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
43
44
|
facebook::react::LayoutMetrics const &layoutMetrics,
|
|
44
45
|
facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept override;
|
|
45
46
|
void FinalizeUpdates(winrt::Microsoft::ReactNative::ComponentViewUpdateMask updateMask) noexcept override;
|
|
46
|
-
|
|
47
|
-
facebook::react::
|
|
47
|
+
static facebook::react::SharedViewProps defaultProps() noexcept;
|
|
48
|
+
const facebook::react::WindowsTextInputProps &windowsTextInputProps() const noexcept;
|
|
48
49
|
void HandleCommand(winrt::hstring commandName, const winrt::Microsoft::ReactNative::IJSValueReader &args) noexcept
|
|
49
50
|
override;
|
|
50
|
-
facebook::react::Tag hitTest(
|
|
51
|
-
facebook::react::Point pt,
|
|
52
|
-
facebook::react::Point &localPt,
|
|
53
|
-
bool ignorePointerEvents = false) const noexcept override;
|
|
54
51
|
void OnRenderingDeviceLost() noexcept override;
|
|
55
|
-
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual Visual() const noexcept override;
|
|
56
52
|
void onFocusLost() noexcept override;
|
|
57
53
|
void onFocusGained() noexcept override;
|
|
58
|
-
bool focusable() const noexcept override;
|
|
59
54
|
std::string DefaultControlType() const noexcept override;
|
|
60
55
|
std::string DefaultAccessibleName() const noexcept override;
|
|
61
56
|
std::string DefaultHelpText() const noexcept override;
|
|
@@ -87,6 +82,8 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
87
82
|
facebook::react::Tag tag,
|
|
88
83
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
89
84
|
|
|
85
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual createVisual() noexcept;
|
|
86
|
+
|
|
90
87
|
private:
|
|
91
88
|
struct DrawBlock {
|
|
92
89
|
DrawBlock(WindowsTextInputComponentView &view);
|
|
@@ -95,7 +92,6 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
95
92
|
};
|
|
96
93
|
|
|
97
94
|
facebook::react::AttributedString getAttributedString() const;
|
|
98
|
-
void ensureVisual() noexcept;
|
|
99
95
|
void ensureDrawingSurface() noexcept;
|
|
100
96
|
void DrawText() noexcept;
|
|
101
97
|
void ShowCaret(bool show) noexcept;
|
|
@@ -114,7 +110,6 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
114
110
|
const winrt::Microsoft::ReactNative::Composition::Input::CharacterReceivedRoutedEventArgs &args) noexcept;
|
|
115
111
|
|
|
116
112
|
winrt::Windows::UI::Composition::CompositionSurfaceBrush m_brush{nullptr};
|
|
117
|
-
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_visual{nullptr};
|
|
118
113
|
winrt::Microsoft::ReactNative::Composition::Experimental::ICaretVisual m_caretVisual{nullptr};
|
|
119
114
|
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush m_drawingSurface{nullptr};
|
|
120
115
|
|
|
@@ -125,7 +120,6 @@ struct WindowsTextInputComponentView : WindowsTextInputComponentViewT<WindowsTex
|
|
|
125
120
|
winrt::com_ptr<ITextHost> m_textHost;
|
|
126
121
|
winrt::com_ptr<ITextServices2> m_textServices;
|
|
127
122
|
unsigned int m_imgWidth{0}, m_imgHeight{0};
|
|
128
|
-
std::shared_ptr<facebook::react::WindowsTextInputProps const> m_props;
|
|
129
123
|
std::shared_ptr<facebook::react::WindowsTextInputShadowNode::ConcreteState const> m_state;
|
|
130
124
|
RECT m_rcClient;
|
|
131
125
|
int64_t m_mostRecentEventCount{0};
|
|
@@ -45,13 +45,47 @@ namespace Microsoft.ReactNative {
|
|
|
45
45
|
[webhosthidden]
|
|
46
46
|
[experimental]
|
|
47
47
|
DOC_STRING("Provides access to the properties on standard ViewProps.")
|
|
48
|
-
runtimeclass ViewProps
|
|
48
|
+
unsealed runtimeclass ViewProps
|
|
49
49
|
{
|
|
50
50
|
Single Opacity { get; };
|
|
51
|
-
|
|
52
51
|
Color BackgroundColor { get; };
|
|
53
|
-
|
|
52
|
+
String TestId { get; };
|
|
53
|
+
String AccessibilityLabel { get; };
|
|
54
|
+
|
|
54
55
|
// TODO add accessors to all the properties on ViewProps
|
|
55
56
|
};
|
|
56
57
|
|
|
58
|
+
[webhosthidden]
|
|
59
|
+
[experimental]
|
|
60
|
+
enum ImageSourceType
|
|
61
|
+
{
|
|
62
|
+
Invalid = 0,
|
|
63
|
+
Remote = 1,
|
|
64
|
+
Local = 2,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
[default_interface]
|
|
68
|
+
[webhosthidden]
|
|
69
|
+
[experimental]
|
|
70
|
+
runtimeclass ImageSource
|
|
71
|
+
{
|
|
72
|
+
ImageSourceType Type { get; };
|
|
73
|
+
String Uri { get; };
|
|
74
|
+
String Bundle { get; };
|
|
75
|
+
Single Scale { get; };
|
|
76
|
+
Windows.Foundation.Size Size { get; };
|
|
77
|
+
|
|
78
|
+
static ImageSource ReadValue(IJSValueReader reader);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[default_interface]
|
|
82
|
+
[webhosthidden]
|
|
83
|
+
[experimental]
|
|
84
|
+
runtimeclass ImageProps : ViewProps
|
|
85
|
+
{
|
|
86
|
+
Windows.Foundation.Collections.IVectorView<ImageSource> Sources { get; };
|
|
87
|
+
// TODO add accessors to all the properties on ImageProps
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
57
91
|
} // namespace Microsoft. ReactNative
|
|
@@ -17,6 +17,10 @@ inline void WriteValue(IJSValueWriter const &writer, const Color &value) noexcep
|
|
|
17
17
|
winrt::Microsoft::ReactNative::Color::WriteValue(writer, value);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
inline void ReadValue(IJSValueReader const &reader, ImageSource &value) noexcept {
|
|
21
|
+
value = winrt::Microsoft::ReactNative::ImageSource::ReadValue(reader);
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
} // namespace winrt::Microsoft::ReactNative
|
|
21
25
|
|
|
22
26
|
#endif // MICROSOFT_REACTNATIVE_JSVALUECOMPOSITION
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.74.
|
|
13
|
+
<ReactNativeWindowsVersion>0.74.5</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>5</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>481f89da064d5a33f4b5b79088dc760bd49f6dd2</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<!-- Enabling this will (1) Include hermes glues in the Microsoft.ReactNative binaries AND (2) Make hermes the default engine -->
|
|
7
7
|
<UseHermes Condition="'$(UseHermes)' == ''">true</UseHermes>
|
|
8
8
|
<!-- 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 -->
|
|
9
|
-
<HermesVersion Condition="'$(HermesVersion)' == ''">0.1.
|
|
9
|
+
<HermesVersion Condition="'$(HermesVersion)' == ''">0.1.21</HermesVersion>
|
|
10
10
|
<HermesPackage Condition="'$(HermesPackage)' == '' And Exists('$(PkgMicrosoft_JavaScript_Hermes)')">$(PkgMicrosoft_JavaScript_Hermes)</HermesPackage>
|
|
11
11
|
<HermesPackage Condition="'$(HermesPackage)' == ''">$(NuGetPackageRoot)\Microsoft.JavaScript.Hermes\$(HermesVersion)</HermesPackage>
|
|
12
12
|
<EnableHermesInspectorInReleaseFlavor Condition="'$(EnableHermesInspectorInReleaseFlavor)' == ''">false</EnableHermesInspectorInReleaseFlavor>
|
|
@@ -291,6 +291,10 @@ void NAPI_CDECL removeInspectorPage(int32_t pageId) noexcept {
|
|
|
291
291
|
|
|
292
292
|
} // namespace
|
|
293
293
|
|
|
294
|
+
//==============================================================================
|
|
295
|
+
// HermesRuntimeHolder implementation
|
|
296
|
+
//==============================================================================
|
|
297
|
+
|
|
294
298
|
HermesRuntimeHolder::HermesRuntimeHolder(
|
|
295
299
|
std::shared_ptr<facebook::react::DevSettings> devSettings,
|
|
296
300
|
std::shared_ptr<facebook::react::MessageQueueThread> jsQueue,
|
|
@@ -393,6 +397,10 @@ void HermesRuntimeHolder::removeFromProfiling() const noexcept {
|
|
|
393
397
|
CRASH_ON_ERROR(getHermesApi().hermes_sampling_profiler_dump_to_file(fileName.c_str()));
|
|
394
398
|
}
|
|
395
399
|
|
|
400
|
+
//==============================================================================
|
|
401
|
+
// HermesJSRuntime implementation
|
|
402
|
+
//==============================================================================
|
|
403
|
+
|
|
396
404
|
HermesJSRuntime::HermesJSRuntime(std::shared_ptr<Microsoft::JSI::RuntimeHolderLazyInit> hermesRuntimeHolder)
|
|
397
405
|
: m_holder(std::move(hermesRuntimeHolder)) {}
|
|
398
406
|
|