react-native-windows 0.76.0-preview.3 → 0.76.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.
Files changed (31) hide show
  1. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +15 -15
  2. package/Libraries/Components/Button.windows.js +18 -18
  3. package/Libraries/Components/Flyout/FlyoutNativeComponent.js +5 -1
  4. package/Libraries/Components/Keyboard/KeyboardExt.js +1 -1
  5. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  6. package/Libraries/Components/TextInput/TextInput.windows.js +16 -11
  7. package/Libraries/Components/Touchable/Touchable.windows.js +2 -2
  8. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +5 -3
  9. package/Libraries/Components/View/View.windows.js +1 -3
  10. package/Libraries/Text/Text.windows.js +13 -9
  11. package/Libraries/Utilities/Platform.windows.js +4 -4
  12. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +25 -129
  13. package/Microsoft.ReactNative/ReactNativeAppBuilder.h +5 -13
  14. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +13 -34
  15. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +129 -18
  16. package/Microsoft.ReactNative/ReactNativeWin32App.h +14 -5
  17. package/PropertySheets/External/Microsoft.ReactNative.CppLib.props +17 -0
  18. package/PropertySheets/External/Microsoft.ReactNative.CppLib.targets +17 -0
  19. package/PropertySheets/Generated/PackageVersion.g.props +2 -2
  20. package/PropertySheets/WebView2.props +7 -0
  21. package/PropertySheets/WinUI.props +1 -1
  22. package/Shared/Shared.vcxitems +0 -10
  23. package/just-task.js +1 -1
  24. package/package.json +4 -5
  25. package/templates/cpp-app/template.config.js +8 -3
  26. package/templates/cpp-app/windows/MyApp/MyApp.cpp +46 -131
  27. package/templates/cpp-lib/template.config.js +8 -3
  28. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +4 -4
  29. package/templates/templateUtils.js +2 -3
  30. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +0 -59
  31. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +0 -23
@@ -66,7 +66,7 @@
66
66
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
67
67
  </ImportGroup>
68
68
  <ImportGroup Label="ReactNativeWindowsPropertySheets">
69
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props" />
69
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" />
70
70
  </ImportGroup>
71
71
  <ItemDefinitionGroup>
72
72
  <ClCompile>
@@ -131,7 +131,7 @@
131
131
  </ItemGroup>
132
132
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
133
133
  <ImportGroup Label="ReactNativeWindowsTargets">
134
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets')" />
134
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" />
135
135
  </ImportGroup>
136
136
  <ItemGroup>
137
137
  {{#cppNugetPackages}}
@@ -142,7 +142,7 @@
142
142
  <PropertyGroup>
143
143
  <ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
144
144
  </PropertyGroup>
145
- <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.props'))" />
146
- <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Composition.CppLib.targets'))" />
145
+ <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props'))" />
146
+ <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets'))" />
147
147
  </Target>
148
148
  </Project>
@@ -112,9 +112,8 @@ async function runNpmInstall(config = {}, options = {}) {
112
112
 
113
113
  async function updateProjectPackageJson(config = {}, options = {}, props = {}) {
114
114
  const projectRoot = config?.root ?? process.cwd();
115
- const projectPackage = await pkgUtils.WritableNpmPackage.fromPath(
116
- projectRoot,
117
- );
115
+ const projectPackage =
116
+ await pkgUtils.WritableNpmPackage.fromPath(projectRoot);
118
117
 
119
118
  if (!projectPackage) {
120
119
  throw new Error(
@@ -1,59 +0,0 @@
1
- #include "pch.h"
2
- #include "ReactInstanceSettingsBuilder.h"
3
- #include "ReactInstanceSettingsBuilder.g.cpp"
4
- #include "ReactInstanceSettings.h"
5
-
6
- namespace winrt::ReactNative {
7
- using namespace winrt::Microsoft::ReactNative;
8
- }
9
-
10
- namespace winrt::UI {
11
- using namespace winrt::Microsoft::UI;
12
- }
13
-
14
- namespace winrt::Microsoft::ReactNative::implementation {
15
- ReactInstanceSettingsBuilder::ReactInstanceSettingsBuilder() {
16
- m_reactInstanceSettings = winrt::make<winrt::ReactNative::implementation::ReactInstanceSettings>();
17
- }
18
-
19
- winrt::ReactNative::ReactInstanceSettings ReactInstanceSettingsBuilder::ReactInstanceSettings() {
20
- return m_reactInstanceSettings;
21
- }
22
-
23
- winrt::ReactNative::ReactInstanceSettingsBuilder ReactInstanceSettingsBuilder::UseDirectDebugger(bool const &state) {
24
- m_reactInstanceSettings.UseDirectDebugger(state);
25
-
26
- return *this;
27
- }
28
-
29
- winrt::ReactNative::ReactInstanceSettingsBuilder ReactInstanceSettingsBuilder::UseDeveloperSupport(bool const &state) {
30
- m_reactInstanceSettings.UseDeveloperSupport(state);
31
-
32
- return *this;
33
- }
34
-
35
- winrt::ReactNative::ReactInstanceSettingsBuilder ReactInstanceSettingsBuilder::BundleRootPath(hstring const &path) {
36
- m_reactInstanceSettings.BundleRootPath(std::wstring(L"file://").append(path.c_str()).append(L"\\Bundle\\").c_str());
37
-
38
- return *this;
39
- }
40
-
41
- winrt::ReactNative::ReactInstanceSettingsBuilder ReactInstanceSettingsBuilder::DebugBundlePath(hstring const &path) {
42
- m_reactInstanceSettings.DebugBundlePath(path.c_str());
43
-
44
- return *this;
45
- }
46
-
47
- winrt::ReactNative::ReactInstanceSettingsBuilder ReactInstanceSettingsBuilder::JavaScriptBundleFile(
48
- hstring const &file) {
49
- m_reactInstanceSettings.JavaScriptBundleFile(file.c_str());
50
-
51
- return *this;
52
- }
53
-
54
- winrt::ReactNative::ReactInstanceSettingsBuilder ReactInstanceSettingsBuilder::UseFastRefresh(bool const &state) {
55
- m_reactInstanceSettings.UseFastRefresh(state);
56
-
57
- return *this;
58
- }
59
- } // namespace winrt::Microsoft::ReactNative::implementation
@@ -1,23 +0,0 @@
1
- #pragma once
2
- #include "ReactInstanceSettingsBuilder.g.h"
3
-
4
- namespace winrt::Microsoft::ReactNative::implementation {
5
- struct ReactInstanceSettingsBuilder : ReactInstanceSettingsBuilderT<ReactInstanceSettingsBuilder> {
6
- ReactInstanceSettingsBuilder();
7
-
8
- winrt::Microsoft::ReactNative::ReactInstanceSettings ReactInstanceSettings();
9
- winrt::Microsoft::ReactNative::ReactInstanceSettingsBuilder UseDirectDebugger(bool const &state);
10
- winrt::Microsoft::ReactNative::ReactInstanceSettingsBuilder UseDeveloperSupport(bool const &state);
11
- winrt::Microsoft::ReactNative::ReactInstanceSettingsBuilder BundleRootPath(hstring const &path);
12
- winrt::Microsoft::ReactNative::ReactInstanceSettingsBuilder DebugBundlePath(hstring const &path);
13
- winrt::Microsoft::ReactNative::ReactInstanceSettingsBuilder JavaScriptBundleFile(hstring const &file);
14
- winrt::Microsoft::ReactNative::ReactInstanceSettingsBuilder UseFastRefresh(bool const &state);
15
-
16
- private:
17
- winrt::Microsoft::ReactNative::ReactInstanceSettings m_reactInstanceSettings{nullptr};
18
- };
19
- } // namespace winrt::Microsoft::ReactNative::implementation
20
- namespace winrt::Microsoft::ReactNative::factory_implementation {
21
- struct ReactInstanceSettingsBuilder
22
- : ReactInstanceSettingsBuilderT<ReactInstanceSettingsBuilder, implementation::ReactInstanceSettingsBuilder> {};
23
- } // namespace winrt::Microsoft::ReactNative::factory_implementation