react-native-windows 0.76.7 → 0.76.9
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/Button.windows.js +9 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +9 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +11 -1
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +229 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +373 -0
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +7 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +8 -0
- package/Libraries/Components/View/View.windows.js +11 -1
- package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/Libraries/Components/View/ViewAccessibility.windows.js +3 -0
- package/Libraries/Components/View/ViewPropTypes.windows.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/Image.windows.js +7 -0
- package/Libraries/Modal/Modal.windows.js +4 -1
- package/Libraries/Text/Text.windows.js +14 -1
- package/Libraries/Text/TextProps.windows.js +3 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +97 -0
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.h +53 -0
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +160 -17
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +8 -10
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +4 -2
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +428 -39
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +39 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +55 -33
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +5 -3
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.cpp +115 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.h +41 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +298 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.h +59 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +106 -56
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +163 -10
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +17 -1
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +4 -2
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +9 -1
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +348 -316
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +78 -0
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +22 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -5
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +99 -37
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +81 -22
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +21 -2
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +6 -1
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +41 -37
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +76 -33
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +8 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +1 -6
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +5 -8
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +1 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +15 -1
- package/Microsoft.ReactNative/IReactContext.cpp +2 -2
- package/Microsoft.ReactNative/IReactContext.h +1 -1
- package/Microsoft.ReactNative/IReactContext.idl +2 -2
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/ClipboardModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
- package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
- package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
- package/Microsoft.ReactNative/ReactHost/React.h +0 -3
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +36 -12
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
- package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
- package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
- package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
- package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
- package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
- package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
- package/Microsoft.ReactNative/XamlUIService.h +4 -1
- package/Microsoft.ReactNative/XamlUIService.idl +2 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
- package/Microsoft.ReactNative.Cxx/NativeModules.h +29 -0
- package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/React.Cpp.props +3 -0
- package/PropertySheets/WebView2.props +1 -1
- package/PropertySheets/WinUI.props +5 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +253 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +799 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +39 -35
- package/Shared/InspectorPackagerConnection.cpp +2 -5
- package/Shared/InspectorPackagerConnection.h +2 -2
- package/Shared/Networking/WinRTWebSocketResource.cpp +369 -7
- package/Shared/Networking/WinRTWebSocketResource.h +118 -0
- package/Shared/Shared.vcxitems +12 -5
- package/Shared/Shared.vcxitems.filters +11 -4
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +91 -97
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
- package/codegen/react/components/rnwcore/ModalHostView.g.h +279 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
- package/codegen/react/components/rnwcore/Switch.g.h +263 -0
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
- package/codegen/rnwcoreJSI-generated.cpp +0 -6
- package/codegen/rnwcoreJSI.h +0 -9
- package/jest/setup.js +5 -1
- package/just-task.js +1 -1
- package/package.json +11 -11
- package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -6
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +0 -191
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* This file is auto-generated from SwitchNativeComponent spec file in flow / TypeScript.
|
|
4
|
+
*/
|
|
5
|
+
// clang-format off
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include <NativeModules.h>
|
|
9
|
+
|
|
10
|
+
#ifdef RNW_NEW_ARCH
|
|
11
|
+
#include <JSValueComposition.h>
|
|
12
|
+
|
|
13
|
+
#include <winrt/Microsoft.ReactNative.Composition.h>
|
|
14
|
+
#include <winrt/Microsoft.UI.Composition.h>
|
|
15
|
+
#endif // #ifdef RNW_NEW_ARCH
|
|
16
|
+
|
|
17
|
+
#ifdef RNW_NEW_ARCH
|
|
18
|
+
|
|
19
|
+
namespace Microsoft::ReactNativeSpecs {
|
|
20
|
+
|
|
21
|
+
REACT_STRUCT(SwitchProps)
|
|
22
|
+
struct SwitchProps : winrt::implements<SwitchProps, winrt::Microsoft::ReactNative::IComponentProps> {
|
|
23
|
+
SwitchProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom)
|
|
24
|
+
: ViewProps(props)
|
|
25
|
+
{
|
|
26
|
+
if (cloneFrom) {
|
|
27
|
+
auto cloneFromProps = cloneFrom.as<SwitchProps>();
|
|
28
|
+
disabled = cloneFromProps->disabled;
|
|
29
|
+
value = cloneFromProps->value;
|
|
30
|
+
tintColor = cloneFromProps->tintColor;
|
|
31
|
+
onTintColor = cloneFromProps->onTintColor;
|
|
32
|
+
thumbTintColor = cloneFromProps->thumbTintColor;
|
|
33
|
+
thumbColor = cloneFromProps->thumbColor;
|
|
34
|
+
trackColorForFalse = cloneFromProps->trackColorForFalse;
|
|
35
|
+
trackColorForTrue = cloneFromProps->trackColorForTrue;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept {
|
|
40
|
+
winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
REACT_FIELD(disabled)
|
|
44
|
+
std::optional<bool> disabled{};
|
|
45
|
+
|
|
46
|
+
REACT_FIELD(value)
|
|
47
|
+
std::optional<bool> value{};
|
|
48
|
+
|
|
49
|
+
REACT_FIELD(tintColor)
|
|
50
|
+
winrt::Microsoft::ReactNative::Color tintColor{nullptr};
|
|
51
|
+
|
|
52
|
+
REACT_FIELD(onTintColor)
|
|
53
|
+
winrt::Microsoft::ReactNative::Color onTintColor{nullptr};
|
|
54
|
+
|
|
55
|
+
REACT_FIELD(thumbTintColor)
|
|
56
|
+
winrt::Microsoft::ReactNative::Color thumbTintColor{nullptr};
|
|
57
|
+
|
|
58
|
+
REACT_FIELD(thumbColor)
|
|
59
|
+
winrt::Microsoft::ReactNative::Color thumbColor{nullptr};
|
|
60
|
+
|
|
61
|
+
REACT_FIELD(trackColorForFalse)
|
|
62
|
+
winrt::Microsoft::ReactNative::Color trackColorForFalse{nullptr};
|
|
63
|
+
|
|
64
|
+
REACT_FIELD(trackColorForTrue)
|
|
65
|
+
winrt::Microsoft::ReactNative::Color trackColorForTrue{nullptr};
|
|
66
|
+
|
|
67
|
+
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
REACT_STRUCT(Switch_OnChange)
|
|
71
|
+
struct Switch_OnChange {
|
|
72
|
+
REACT_FIELD(value)
|
|
73
|
+
bool value{};
|
|
74
|
+
|
|
75
|
+
REACT_FIELD(target)
|
|
76
|
+
int32_t target{};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
struct SwitchEventEmitter {
|
|
80
|
+
SwitchEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
81
|
+
: m_eventEmitter(eventEmitter) {}
|
|
82
|
+
|
|
83
|
+
using OnChange = Switch_OnChange;
|
|
84
|
+
|
|
85
|
+
void onChange(OnChange &value) const {
|
|
86
|
+
m_eventEmitter.DispatchEvent(L"change", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
87
|
+
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private:
|
|
92
|
+
winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
template<typename TUserData>
|
|
96
|
+
struct BaseSwitch {
|
|
97
|
+
|
|
98
|
+
virtual void UpdateProps(
|
|
99
|
+
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
100
|
+
const winrt::com_ptr<SwitchProps> &newProps,
|
|
101
|
+
const winrt::com_ptr<SwitchProps> &/*oldProps*/) noexcept {
|
|
102
|
+
m_props = newProps;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// UpdateLayoutMetrics will only be called if this method is overridden
|
|
106
|
+
virtual void UpdateLayoutMetrics(
|
|
107
|
+
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
108
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/,
|
|
109
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept {
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// UpdateState will only be called if this method is overridden
|
|
113
|
+
virtual void UpdateState(
|
|
114
|
+
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
115
|
+
const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept {
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
virtual void UpdateEventEmitter(const std::shared_ptr<SwitchEventEmitter> &eventEmitter) noexcept {
|
|
119
|
+
m_eventEmitter = eventEmitter;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// MountChildComponentView will only be called if this method is overridden
|
|
123
|
+
virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
124
|
+
const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept {
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// UnmountChildComponentView will only be called if this method is overridden
|
|
128
|
+
virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
129
|
+
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept {
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Initialize will only be called if this method is overridden
|
|
133
|
+
virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept {
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// CreateVisual will only be called if this method is overridden
|
|
137
|
+
virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
138
|
+
return view.as<winrt::Microsoft::ReactNative::Composition::ComponentView>().Compositor().CreateSpriteVisual();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// FinalizeUpdate will only be called if this method is overridden
|
|
142
|
+
virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
143
|
+
winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// You must provide an implementation of this method to handle the "setValue" command
|
|
147
|
+
virtual void HandleSetValueCommand(bool value) noexcept = 0;
|
|
148
|
+
|
|
149
|
+
void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept {
|
|
150
|
+
auto userData = view.UserData().as<TUserData>();
|
|
151
|
+
auto commandName = args.CommandName();
|
|
152
|
+
if (commandName == L"setValue") {
|
|
153
|
+
bool value;
|
|
154
|
+
winrt::Microsoft::ReactNative::ReadArgs(args.CommandArgs(), value);
|
|
155
|
+
userData->HandleSetValueCommand(value);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const std::shared_ptr<SwitchEventEmitter>& EventEmitter() const { return m_eventEmitter; }
|
|
161
|
+
const winrt::com_ptr<SwitchProps>& Props() const { return m_props; }
|
|
162
|
+
|
|
163
|
+
private:
|
|
164
|
+
winrt::com_ptr<SwitchProps> m_props;
|
|
165
|
+
std::shared_ptr<SwitchEventEmitter> m_eventEmitter;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
template <typename TUserData>
|
|
169
|
+
void RegisterSwitchNativeComponent(
|
|
170
|
+
winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder,
|
|
171
|
+
std::function<void(const winrt::Microsoft::ReactNative::Composition::IReactCompositionViewComponentBuilder&)> builderCallback) noexcept {
|
|
172
|
+
packageBuilder.as<winrt::Microsoft::ReactNative::IReactPackageBuilderFabric>().AddViewComponent(
|
|
173
|
+
L"Switch", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept {
|
|
174
|
+
auto compBuilder = builder.as<winrt::Microsoft::ReactNative::Composition::IReactCompositionViewComponentBuilder>();
|
|
175
|
+
|
|
176
|
+
builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props,
|
|
177
|
+
const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept {
|
|
178
|
+
return winrt::make<SwitchProps>(props, cloneFrom);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
182
|
+
const winrt::Microsoft::ReactNative::IComponentProps &newProps,
|
|
183
|
+
const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept {
|
|
184
|
+
auto userData = view.UserData().as<TUserData>();
|
|
185
|
+
userData->UpdateProps(view, newProps ? newProps.as<SwitchProps>() : nullptr, oldProps ? oldProps.as<SwitchProps>() : nullptr);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
189
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics,
|
|
190
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept {
|
|
191
|
+
auto userData = view.UserData().as<TUserData>();
|
|
192
|
+
userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
196
|
+
const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept {
|
|
197
|
+
auto userData = view.UserData().as<TUserData>();
|
|
198
|
+
userData->UpdateEventEmitter(std::make_shared<SwitchEventEmitter>(eventEmitter));
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseSwitch<TUserData>::FinalizeUpdate) {
|
|
202
|
+
builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
203
|
+
winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept {
|
|
204
|
+
auto userData = view.UserData().as<TUserData>();
|
|
205
|
+
userData->FinalizeUpdate(view, mask);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseSwitch<TUserData>::UpdateState) {
|
|
210
|
+
builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
211
|
+
const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept {
|
|
212
|
+
auto userData = view.UserData().as<TUserData>();
|
|
213
|
+
userData->UpdateState(view, newState);
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
218
|
+
const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept {
|
|
219
|
+
auto userData = view.UserData().as<TUserData>();
|
|
220
|
+
userData->HandleCommand(view, args);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseSwitch<TUserData>::MountChildComponentView) {
|
|
224
|
+
builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
225
|
+
const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept {
|
|
226
|
+
auto userData = view.UserData().as<TUserData>();
|
|
227
|
+
return userData->MountChildComponentView(view, args);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseSwitch<TUserData>::UnmountChildComponentView) {
|
|
232
|
+
builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
233
|
+
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept {
|
|
234
|
+
auto userData = view.UserData().as<TUserData>();
|
|
235
|
+
return userData->UnmountChildComponentView(view, args);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
240
|
+
auto userData = winrt::make_self<TUserData>();
|
|
241
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSwitch<TUserData>::Initialize) {
|
|
242
|
+
userData->Initialize(view);
|
|
243
|
+
}
|
|
244
|
+
view.UserData(*userData);
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseSwitch<TUserData>::CreateVisual) {
|
|
248
|
+
compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
249
|
+
auto userData = view.UserData().as<TUserData>();
|
|
250
|
+
return userData->CreateVisual(view);
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Allow app to further customize the builder
|
|
255
|
+
if (builderCallback) {
|
|
256
|
+
builderCallback(compBuilder);
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
} // namespace Microsoft::ReactNativeSpecs
|
|
262
|
+
|
|
263
|
+
#endif // #ifdef RNW_NEW_ARCH
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* This file is auto-generated from UnimplementedNativeViewNativeComponent spec file in flow / TypeScript.
|
|
4
|
+
*/
|
|
5
|
+
// clang-format off
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include <NativeModules.h>
|
|
9
|
+
|
|
10
|
+
#ifdef RNW_NEW_ARCH
|
|
11
|
+
#include <JSValueComposition.h>
|
|
12
|
+
|
|
13
|
+
#include <winrt/Microsoft.ReactNative.Composition.h>
|
|
14
|
+
#include <winrt/Microsoft.UI.Composition.h>
|
|
15
|
+
#endif // #ifdef RNW_NEW_ARCH
|
|
16
|
+
|
|
17
|
+
#ifdef RNW_NEW_ARCH
|
|
18
|
+
|
|
19
|
+
namespace Microsoft::ReactNativeSpecs {
|
|
20
|
+
|
|
21
|
+
REACT_STRUCT(UnimplementedNativeViewProps)
|
|
22
|
+
struct UnimplementedNativeViewProps : winrt::implements<UnimplementedNativeViewProps, winrt::Microsoft::ReactNative::IComponentProps> {
|
|
23
|
+
UnimplementedNativeViewProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom)
|
|
24
|
+
: ViewProps(props)
|
|
25
|
+
{
|
|
26
|
+
if (cloneFrom) {
|
|
27
|
+
auto cloneFromProps = cloneFrom.as<UnimplementedNativeViewProps>();
|
|
28
|
+
name = cloneFromProps->name;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept {
|
|
33
|
+
winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
REACT_FIELD(name)
|
|
37
|
+
std::optional<std::string> name;
|
|
38
|
+
|
|
39
|
+
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
struct UnimplementedNativeViewEventEmitter {
|
|
43
|
+
UnimplementedNativeViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
44
|
+
: m_eventEmitter(eventEmitter) {}
|
|
45
|
+
|
|
46
|
+
private:
|
|
47
|
+
winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
template<typename TUserData>
|
|
51
|
+
struct BaseUnimplementedNativeView {
|
|
52
|
+
|
|
53
|
+
virtual void UpdateProps(
|
|
54
|
+
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
55
|
+
const winrt::com_ptr<UnimplementedNativeViewProps> &newProps,
|
|
56
|
+
const winrt::com_ptr<UnimplementedNativeViewProps> &/*oldProps*/) noexcept {
|
|
57
|
+
m_props = newProps;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// UpdateLayoutMetrics will only be called if this method is overridden
|
|
61
|
+
virtual void UpdateLayoutMetrics(
|
|
62
|
+
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
63
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/,
|
|
64
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept {
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// UpdateState will only be called if this method is overridden
|
|
68
|
+
virtual void UpdateState(
|
|
69
|
+
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
70
|
+
const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept {
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
virtual void UpdateEventEmitter(const std::shared_ptr<UnimplementedNativeViewEventEmitter> &eventEmitter) noexcept {
|
|
74
|
+
m_eventEmitter = eventEmitter;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// MountChildComponentView will only be called if this method is overridden
|
|
78
|
+
virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
79
|
+
const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept {
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// UnmountChildComponentView will only be called if this method is overridden
|
|
83
|
+
virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
84
|
+
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept {
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Initialize will only be called if this method is overridden
|
|
88
|
+
virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept {
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// CreateVisual will only be called if this method is overridden
|
|
92
|
+
virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
93
|
+
return view.as<winrt::Microsoft::ReactNative::Composition::ComponentView>().Compositor().CreateSpriteVisual();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// FinalizeUpdate will only be called if this method is overridden
|
|
97
|
+
virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
98
|
+
winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
const std::shared_ptr<UnimplementedNativeViewEventEmitter>& EventEmitter() const { return m_eventEmitter; }
|
|
104
|
+
const winrt::com_ptr<UnimplementedNativeViewProps>& Props() const { return m_props; }
|
|
105
|
+
|
|
106
|
+
private:
|
|
107
|
+
winrt::com_ptr<UnimplementedNativeViewProps> m_props;
|
|
108
|
+
std::shared_ptr<UnimplementedNativeViewEventEmitter> m_eventEmitter;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
template <typename TUserData>
|
|
112
|
+
void RegisterUnimplementedNativeViewNativeComponent(
|
|
113
|
+
winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder,
|
|
114
|
+
std::function<void(const winrt::Microsoft::ReactNative::Composition::IReactCompositionViewComponentBuilder&)> builderCallback) noexcept {
|
|
115
|
+
packageBuilder.as<winrt::Microsoft::ReactNative::IReactPackageBuilderFabric>().AddViewComponent(
|
|
116
|
+
L"UnimplementedNativeView", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept {
|
|
117
|
+
auto compBuilder = builder.as<winrt::Microsoft::ReactNative::Composition::IReactCompositionViewComponentBuilder>();
|
|
118
|
+
|
|
119
|
+
builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props,
|
|
120
|
+
const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept {
|
|
121
|
+
return winrt::make<UnimplementedNativeViewProps>(props, cloneFrom);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
125
|
+
const winrt::Microsoft::ReactNative::IComponentProps &newProps,
|
|
126
|
+
const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept {
|
|
127
|
+
auto userData = view.UserData().as<TUserData>();
|
|
128
|
+
userData->UpdateProps(view, newProps ? newProps.as<UnimplementedNativeViewProps>() : nullptr, oldProps ? oldProps.as<UnimplementedNativeViewProps>() : nullptr);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
132
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics,
|
|
133
|
+
const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept {
|
|
134
|
+
auto userData = view.UserData().as<TUserData>();
|
|
135
|
+
userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
139
|
+
const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept {
|
|
140
|
+
auto userData = view.UserData().as<TUserData>();
|
|
141
|
+
userData->UpdateEventEmitter(std::make_shared<UnimplementedNativeViewEventEmitter>(eventEmitter));
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseUnimplementedNativeView<TUserData>::FinalizeUpdate) {
|
|
145
|
+
builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
146
|
+
winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept {
|
|
147
|
+
auto userData = view.UserData().as<TUserData>();
|
|
148
|
+
userData->FinalizeUpdate(view, mask);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseUnimplementedNativeView<TUserData>::UpdateState) {
|
|
153
|
+
builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
154
|
+
const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept {
|
|
155
|
+
auto userData = view.UserData().as<TUserData>();
|
|
156
|
+
userData->UpdateState(view, newState);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseUnimplementedNativeView<TUserData>::MountChildComponentView) {
|
|
161
|
+
builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
162
|
+
const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept {
|
|
163
|
+
auto userData = view.UserData().as<TUserData>();
|
|
164
|
+
return userData->MountChildComponentView(view, args);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseUnimplementedNativeView<TUserData>::UnmountChildComponentView) {
|
|
169
|
+
builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
170
|
+
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept {
|
|
171
|
+
auto userData = view.UserData().as<TUserData>();
|
|
172
|
+
return userData->UnmountChildComponentView(view, args);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
177
|
+
auto userData = winrt::make_self<TUserData>();
|
|
178
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseUnimplementedNativeView<TUserData>::Initialize) {
|
|
179
|
+
userData->Initialize(view);
|
|
180
|
+
}
|
|
181
|
+
view.UserData(*userData);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseUnimplementedNativeView<TUserData>::CreateVisual) {
|
|
185
|
+
compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
186
|
+
auto userData = view.UserData().as<TUserData>();
|
|
187
|
+
return userData->CreateVisual(view);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Allow app to further customize the builder
|
|
192
|
+
if (builderCallback) {
|
|
193
|
+
builderCallback(compBuilder);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
} // namespace Microsoft::ReactNativeSpecs
|
|
199
|
+
|
|
200
|
+
#endif // #ifdef RNW_NEW_ARCH
|
|
@@ -16,11 +16,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonT
|
|
|
16
16
|
rt
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_allowRecursiveCommitsWithSynchronousMountOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->allowRecursiveCommitsWithSynchronousMountOnAndroid(
|
|
21
|
-
rt
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
19
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_batchRenderingUpdatesInEventLoop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
25
20
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->batchRenderingUpdatesInEventLoop(
|
|
26
21
|
rt
|
|
@@ -255,7 +250,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useTurb
|
|
|
255
250
|
NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
256
251
|
: TurboModule("NativeReactNativeFeatureFlagsCxx", jsInvoker) {
|
|
257
252
|
methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag};
|
|
258
|
-
methodMap_["allowRecursiveCommitsWithSynchronousMountOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_allowRecursiveCommitsWithSynchronousMountOnAndroid};
|
|
259
253
|
methodMap_["batchRenderingUpdatesInEventLoop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_batchRenderingUpdatesInEventLoop};
|
|
260
254
|
methodMap_["completeReactInstanceCreationOnBgThreadOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_completeReactInstanceCreationOnBgThreadOnAndroid};
|
|
261
255
|
methodMap_["destroyFabricSurfacesInReactInstanceManager"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_destroyFabricSurfacesInReactInstanceManager};
|
package/codegen/rnwcoreJSI.h
CHANGED
|
@@ -21,7 +21,6 @@ protected:
|
|
|
21
21
|
|
|
22
22
|
public:
|
|
23
23
|
virtual bool commonTestFlag(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual bool allowRecursiveCommitsWithSynchronousMountOnAndroid(jsi::Runtime &rt) = 0;
|
|
25
24
|
virtual bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) = 0;
|
|
26
25
|
virtual bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime &rt) = 0;
|
|
27
26
|
virtual bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime &rt) = 0;
|
|
@@ -102,14 +101,6 @@ private:
|
|
|
102
101
|
return bridging::callFromJs<bool>(
|
|
103
102
|
rt, &T::commonTestFlag, jsInvoker_, instance_);
|
|
104
103
|
}
|
|
105
|
-
bool allowRecursiveCommitsWithSynchronousMountOnAndroid(jsi::Runtime &rt) override {
|
|
106
|
-
static_assert(
|
|
107
|
-
bridging::getParameterCount(&T::allowRecursiveCommitsWithSynchronousMountOnAndroid) == 1,
|
|
108
|
-
"Expected allowRecursiveCommitsWithSynchronousMountOnAndroid(...) to have 1 parameters");
|
|
109
|
-
|
|
110
|
-
return bridging::callFromJs<bool>(
|
|
111
|
-
rt, &T::allowRecursiveCommitsWithSynchronousMountOnAndroid, jsInvoker_, instance_);
|
|
112
|
-
}
|
|
113
104
|
bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) override {
|
|
114
105
|
static_assert(
|
|
115
106
|
bridging::getParameterCount(&T::batchRenderingUpdatesInEventLoop) == 1,
|
package/jest/setup.js
CHANGED
package/just-task.js
CHANGED
|
@@ -28,7 +28,7 @@ option('clean');
|
|
|
28
28
|
|
|
29
29
|
function codegen(test) {
|
|
30
30
|
execSync(
|
|
31
|
-
`react-native-windows-codegen --files src/**/*Native*.js --namespace Microsoft::ReactNativeSpecs --libraryName rnwcore --modulesWindows --internalComponents --modulesCxx${
|
|
31
|
+
`react-native-windows-codegen --files src/**/*Native*.js --namespace Microsoft::ReactNativeSpecs --libraryName rnwcore --componentsWindows --modulesWindows --internalComponents --modulesCxx${
|
|
32
32
|
test ? ' --test' : ''
|
|
33
33
|
}`,
|
|
34
34
|
{env: process.env},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"@react-native-community/cli": "15.0.0-alpha.2",
|
|
27
27
|
"@react-native-community/cli-platform-android": "15.0.0-alpha.2",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
|
|
29
|
-
"@react-native-windows/cli": "0.76.
|
|
29
|
+
"@react-native-windows/cli": "0.76.5",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
|
-
"@react-native/assets-registry": "0.76.
|
|
32
|
-
"@react-native/codegen": "0.76.
|
|
33
|
-
"@react-native/community-cli-plugin": "0.76.
|
|
34
|
-
"@react-native/gradle-plugin": "0.76.
|
|
35
|
-
"@react-native/js-polyfills": "0.76.
|
|
36
|
-
"@react-native/normalize-colors": "0.76.
|
|
37
|
-
"@react-native/virtualized-lists": "0.76.
|
|
31
|
+
"@react-native/assets-registry": "0.76.6",
|
|
32
|
+
"@react-native/codegen": "0.76.6",
|
|
33
|
+
"@react-native/community-cli-plugin": "0.76.6",
|
|
34
|
+
"@react-native/gradle-plugin": "0.76.6",
|
|
35
|
+
"@react-native/js-polyfills": "0.76.6",
|
|
36
|
+
"@react-native/normalize-colors": "0.76.6",
|
|
37
|
+
"@react-native/virtualized-lists": "0.76.6",
|
|
38
38
|
"abort-controller": "^3.0.0",
|
|
39
39
|
"anser": "^1.4.9",
|
|
40
40
|
"ansi-regex": "^5.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"yargs": "^17.6.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@react-native-windows/codegen": "0.76.
|
|
72
|
+
"@react-native-windows/codegen": "0.76.3",
|
|
73
73
|
"@react-native/metro-config": "0.76.2",
|
|
74
74
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
75
75
|
"@rnw-scripts/eslint-config": "1.2.27",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"just-scripts": "^1.3.3",
|
|
86
86
|
"prettier": "2.8.8",
|
|
87
87
|
"react": "18.3.1",
|
|
88
|
-
"react-native": "0.76.
|
|
88
|
+
"react-native": "0.76.6",
|
|
89
89
|
"react-native-platform-override": "^1.9.46",
|
|
90
90
|
"react-refresh": "^0.14.0",
|
|
91
91
|
"typescript": "5.0.4"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<cbc00457c9b6f4639083b6fa970683eb>>
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -46,7 +46,6 @@ export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureF
|
|
|
46
46
|
export type ReactNativeFeatureFlags = {
|
|
47
47
|
...ReactNativeFeatureFlagsJsOnly,
|
|
48
48
|
commonTestFlag: Getter<boolean>,
|
|
49
|
-
allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
|
|
50
49
|
batchRenderingUpdatesInEventLoop: Getter<boolean>,
|
|
51
50
|
completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
|
|
52
51
|
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
|
|
@@ -164,10 +163,6 @@ export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGet
|
|
|
164
163
|
* Common flag for testing. Do NOT modify.
|
|
165
164
|
*/
|
|
166
165
|
export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
|
|
167
|
-
/**
|
|
168
|
-
* Adds support for recursively processing commits that mount synchronously (Android only).
|
|
169
|
-
*/
|
|
170
|
-
export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean> = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);
|
|
171
166
|
/**
|
|
172
167
|
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
173
168
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<ac46e3eb810d890a0f8199fe100936cb>>
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -24,7 +24,6 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
24
24
|
|
|
25
25
|
export interface Spec extends TurboModule {
|
|
26
26
|
+commonTestFlag?: () => boolean;
|
|
27
|
-
+allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
|
|
28
27
|
+batchRenderingUpdatesInEventLoop?: () => boolean;
|
|
29
28
|
+completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
|
|
30
29
|
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
|