react-native-windows 0.66.3 → 0.67.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.
Files changed (262) hide show
  1. package/.flowconfig +2 -1
  2. package/CHANGELOG.json +917 -85
  3. package/CHANGELOG.md +352 -37
  4. package/Chakra/Chakra.vcxitems +0 -1
  5. package/Chakra/Chakra.vcxitems.filters +0 -3
  6. package/Chakra/ChakraHelpers.cpp +0 -267
  7. package/Chakra/ChakraInstanceArgs.h +0 -5
  8. package/Chakra/ChakraPlatform.h +0 -4
  9. package/Chakra/ChakraTracing.cpp +0 -33
  10. package/Chakra/ChakraValue.h +0 -4
  11. package/Chakra/Utf8DebugExtensions.cpp +0 -5
  12. package/Chakra/Utf8DebugExtensions.h +0 -6
  13. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +14 -1
  14. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
  15. package/Libraries/Alert/Alert.windows.js +48 -21
  16. package/Libraries/Alert/NativeDialogManagerWindows.js +49 -0
  17. package/Libraries/Animated/AnimatedEvent.js +23 -4
  18. package/Libraries/Animated/NativeAnimatedHelper.js +2 -2
  19. package/Libraries/Animated/components/AnimatedImage.js +3 -3
  20. package/Libraries/Animated/components/AnimatedScrollView.js +3 -3
  21. package/Libraries/Animated/components/AnimatedText.js +3 -3
  22. package/Libraries/Animated/components/AnimatedView.js +1 -3
  23. package/Libraries/Animated/createAnimatedComponent.js +3 -34
  24. package/Libraries/Components/Button.js +3 -0
  25. package/Libraries/Components/Button.windows.js +70 -38
  26. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
  27. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
  28. package/Libraries/Components/Flyout/Flyout.js +3 -3
  29. package/Libraries/Components/Flyout/Flyout.js.map +1 -1
  30. package/Libraries/Components/Flyout/FlyoutProps.d.ts +4 -0
  31. package/Libraries/Components/Flyout/FlyoutProps.js.map +1 -1
  32. package/Libraries/Components/Glyph/Glyph.js +2 -2
  33. package/Libraries/Components/Glyph/Glyph.js.map +1 -1
  34. package/Libraries/Components/Keyboard/KeyboardExt.js +4 -3
  35. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  36. package/Libraries/Components/Popup/Popup.js +3 -3
  37. package/Libraries/Components/Popup/Popup.js.map +1 -1
  38. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
  39. package/Libraries/Components/ScrollView/ScrollView.js +17 -16
  40. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
  41. package/Libraries/Components/View/View.js +1 -1
  42. package/Libraries/Components/View/View.windows.js +1 -1
  43. package/Libraries/Components/View/ViewAccessibility.js +1 -1
  44. package/Libraries/Components/View/ViewAccessibility.windows.js +1 -1
  45. package/Libraries/Components/View/ViewWindows.js +1 -1
  46. package/Libraries/Components/View/ViewWindows.js.map +1 -1
  47. package/Libraries/Components/View/ViewWindowsProps.d.ts +42 -2
  48. package/Libraries/Components/View/ViewWindowsProps.js.map +1 -1
  49. package/Libraries/Core/ExceptionsManager.js +45 -80
  50. package/Libraries/Core/ExtendedError.js +0 -1
  51. package/Libraries/Core/ReactNativeVersion.js +2 -2
  52. package/Libraries/Core/setUpBatchedBridge.js +1 -1
  53. package/Libraries/Core/setUpGlobals.js +2 -4
  54. package/Libraries/Core/setUpTimers.js +2 -2
  55. package/Libraries/Image/Image.ios.js +6 -0
  56. package/Libraries/Image/Image.windows.js +6 -0
  57. package/Libraries/Image/ImageBackground.js +10 -8
  58. package/Libraries/Image/ImageProps.js +28 -0
  59. package/Libraries/LogBox/Data/LogBoxData.js +18 -19
  60. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  61. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  62. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  63. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  64. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  65. package/Libraries/NewAppScreen/components/logo.png +0 -0
  66. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -1
  67. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +2 -0
  68. package/Libraries/Pressability/Pressability.js +13 -13
  69. package/Libraries/Pressability/Pressability.windows.js +13 -13
  70. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
  71. package/Libraries/ReactNative/AppRegistry.js +4 -2
  72. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +1569 -875
  73. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +529 -319
  74. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +570 -362
  75. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +1592 -891
  76. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +521 -311
  77. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +562 -354
  78. package/Libraries/Share/Share.js +1 -1
  79. package/Libraries/StyleSheet/normalizeColor.js +2 -2
  80. package/Libraries/Text/Text.windows.js +1 -0
  81. package/Libraries/Text/TextNativeComponent.windows.js +72 -0
  82. package/Libraries/Text/TextProps.js +1 -7
  83. package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
  84. package/Libraries/Utilities/HMRClient.js +1 -1
  85. package/Microsoft.ReactNative/ABIViewManager.cpp +10 -1
  86. package/Microsoft.ReactNative/ABIViewManager.h +3 -0
  87. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +0 -6
  88. package/Microsoft.ReactNative/IReactDispatcher.cpp +16 -1
  89. package/Microsoft.ReactNative/IViewManager.idl +25 -0
  90. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +35 -8
  91. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +60 -0
  92. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +3 -4
  93. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +3 -3
  94. package/Microsoft.ReactNative/Modules/AlertModule.cpp +57 -14
  95. package/Microsoft.ReactNative/Modules/AlertModule.h +17 -24
  96. package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.cpp +4 -2
  97. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +3 -1
  98. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +8 -6
  99. package/Microsoft.ReactNative/Modules/AppStateModule.h +6 -9
  100. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +34 -22
  101. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +8 -4
  102. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +6 -4
  103. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +3 -2
  104. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +47 -95
  105. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +28 -17
  106. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +14 -4
  107. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +1 -1
  108. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +82 -66
  109. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +14 -1
  110. package/Microsoft.ReactNative/ReactInstanceSettings.idl +3 -1
  111. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +37 -0
  112. package/Microsoft.ReactNative/ReactPointerEventArgs.h +28 -0
  113. package/Microsoft.ReactNative/ReactPointerEventArgs.idl +67 -0
  114. package/Microsoft.ReactNative/Utils/TextTransform.h +1 -1
  115. package/Microsoft.ReactNative/Utils/XamlIslandUtils.cpp +24 -10
  116. package/Microsoft.ReactNative/Utils/XamlIslandUtils.h +4 -2
  117. package/Microsoft.ReactNative/Version.rc +2 -19
  118. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +57 -2
  119. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +3 -0
  120. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +7 -2
  121. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +16 -6
  122. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +18 -11
  123. package/Microsoft.ReactNative/Views/Image/ReactImage.h +3 -1
  124. package/Microsoft.ReactNative/Views/RawTextViewManager.cpp +4 -53
  125. package/Microsoft.ReactNative/Views/RawTextViewManager.h +0 -3
  126. package/Microsoft.ReactNative/Views/ShadowNodeBase.h +5 -0
  127. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.cpp +52 -0
  128. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.h +37 -0
  129. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.cpp +343 -0
  130. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.h +13 -0
  131. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.cpp +76 -0
  132. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.h +32 -0
  133. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.cpp +12 -0
  134. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.h +19 -0
  135. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +80 -0
  136. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.h +43 -0
  137. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.cpp +21 -0
  138. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +23 -0
  139. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +70 -0
  140. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.h +34 -0
  141. package/Microsoft.ReactNative/Views/Text/TextVisitor.cpp +56 -0
  142. package/Microsoft.ReactNative/Views/Text/TextVisitor.h +34 -0
  143. package/Microsoft.ReactNative/Views/Text/TextVisitorScope.h +35 -0
  144. package/Microsoft.ReactNative/Views/Text/TextVisitors.h +47 -0
  145. package/Microsoft.ReactNative/Views/TextViewManager.cpp +112 -103
  146. package/Microsoft.ReactNative/Views/TextViewManager.h +6 -12
  147. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +171 -129
  148. package/Microsoft.ReactNative/Views/TouchEventHandler.h +19 -15
  149. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +31 -0
  150. package/Microsoft.ReactNative/Views/ViewManagerBase.h +2 -0
  151. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +0 -5
  152. package/Microsoft.ReactNative/Views/VirtualTextViewManager.cpp +21 -91
  153. package/Microsoft.ReactNative/Views/VirtualTextViewManager.h +5 -8
  154. package/Microsoft.ReactNative/XamlView.h +3 -3
  155. package/Microsoft.ReactNative/packages.config +1 -1
  156. package/Microsoft.ReactNative.Cxx/NativeModules.h +114 -0
  157. package/Microsoft.ReactNative.Cxx/VersionMacros.h +19 -0
  158. package/PropertySheets/External/Microsoft.ReactNative.Common.props +2 -0
  159. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props +1 -0
  160. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props +1 -0
  161. package/PropertySheets/Generated/PackageVersion.g.props +19 -0
  162. package/PropertySheets/PackageVersionDefinitions.props +28 -0
  163. package/PropertySheets/React.Cpp.props +2 -0
  164. package/PropertySheets/WinUI.props +1 -1
  165. package/Scripts/Microsoft.ReactNative.Managed.nuspec +1 -1
  166. package/Scripts/copyRNLibraries.js +12 -0
  167. package/Scripts/rnw-dependencies.ps1 +25 -24
  168. package/Shared/HermesSamplingProfiler.cpp +3 -21
  169. package/Shared/JSI/ChakraApi.cpp +1 -37
  170. package/Shared/JSI/ChakraApi.h +0 -4
  171. package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +1 -5
  172. package/Shared/JSI/ChakraRuntime.cpp +0 -12
  173. package/Shared/JSI/ChakraRuntimeFactory.h +0 -2
  174. package/Shared/Modules/PlatformConstantsModule.cpp +1 -15
  175. package/Shared/OInstance.cpp +6 -19
  176. package/Shared/Shared.vcxitems +0 -1
  177. package/Shared/Shared.vcxitems.filters +0 -3
  178. package/Shared/Utils.cpp +58 -0
  179. package/Shared/Utils.h +3 -0
  180. package/codegen/NativeAccessibilityInfoSpec.g.h +9 -9
  181. package/codegen/NativeAccessibilityManagerSpec.g.h +49 -21
  182. package/codegen/NativeActionSheetManagerSpec.g.h +62 -6
  183. package/codegen/NativeAlertManagerSpec.g.h +4 -4
  184. package/codegen/NativeAnimatedModuleSpec.g.h +10 -10
  185. package/codegen/NativeAnimatedTurboModuleSpec.g.h +10 -10
  186. package/codegen/NativeAppStateSpec.g.h +25 -3
  187. package/codegen/NativeAppearanceSpec.g.h +3 -3
  188. package/codegen/NativeAsyncLocalStorageSpec.g.h +66 -18
  189. package/codegen/NativeAsyncSQLiteDBStorageSpec.g.h +66 -18
  190. package/codegen/NativeBlobModuleSpec.g.h +24 -6
  191. package/codegen/NativeBugReportingSpec.g.h +3 -3
  192. package/codegen/NativeDatePickerAndroidSpec.g.h +3 -3
  193. package/codegen/NativeDevLoadingViewSpec.g.h +3 -3
  194. package/codegen/NativeDeviceInfoSpec.g.h +18 -0
  195. package/codegen/NativeDialogManagerAndroidSpec.g.h +28 -4
  196. package/codegen/NativeDialogManagerWindowsSpec.g.h +77 -0
  197. package/codegen/NativeExceptionsManagerSpec.g.h +11 -11
  198. package/codegen/NativeFileReaderModuleSpec.g.h +6 -6
  199. package/codegen/NativeFrameRateLoggerSpec.g.h +11 -3
  200. package/codegen/NativeI18nManagerSpec.g.h +20 -0
  201. package/codegen/NativeImageEditorSpec.g.h +30 -6
  202. package/codegen/NativeImageLoaderAndroidSpec.g.h +6 -6
  203. package/codegen/NativeImageLoaderIOSSpec.g.h +6 -6
  204. package/codegen/NativeImagePickerIOSSpec.g.h +28 -12
  205. package/codegen/NativeImageStoreAndroidSpec.g.h +3 -3
  206. package/codegen/NativeImageStoreIOSSpec.g.h +21 -9
  207. package/codegen/NativeIntentAndroidSpec.g.h +3 -3
  208. package/codegen/NativeJSCHeapCaptureSpec.g.h +3 -3
  209. package/codegen/NativeJSCSamplingProfilerSpec.g.h +3 -3
  210. package/codegen/NativeJSDevSupportSpec.g.h +18 -0
  211. package/codegen/NativeNetworkingAndroidSpec.g.h +6 -6
  212. package/codegen/NativeNetworkingIOSSpec.g.h +26 -6
  213. package/codegen/NativePermissionsAndroidSpec.g.h +3 -3
  214. package/codegen/NativePlatformConstantsAndroidSpec.g.h +48 -0
  215. package/codegen/NativePlatformConstantsIOSSpec.g.h +38 -0
  216. package/codegen/NativePlatformConstantsWinSpec.g.h +32 -0
  217. package/codegen/NativePushNotificationManagerIOSSpec.g.h +35 -25
  218. package/codegen/NativeRedBoxSpec.g.h +3 -3
  219. package/codegen/NativeSampleTurboModuleSpec.g.h +32 -12
  220. package/codegen/NativeSegmentFetcherSpec.g.h +6 -6
  221. package/codegen/NativeSettingsManagerSpec.g.h +22 -6
  222. package/codegen/NativeShareModuleSpec.g.h +11 -3
  223. package/codegen/NativeSourceCodeSpec.g.h +16 -0
  224. package/codegen/NativeStatusBarManagerAndroidSpec.g.h +21 -3
  225. package/codegen/NativeStatusBarManagerIOSSpec.g.h +30 -6
  226. package/codegen/NativeToastAndroidSpec.g.h +24 -0
  227. package/codegen/NativeUIManagerSpec.g.h +63 -63
  228. package/codegen/NativeVibrationSpec.g.h +3 -3
  229. package/codegen/NativeWebSocketModuleSpec.g.h +9 -3
  230. package/index.js +15 -10
  231. package/index.windows.js +15 -10
  232. package/jest/mockModal.js +31 -0
  233. package/jest/setup.js +5 -3
  234. package/just-task.js +2 -1
  235. package/package.json +23 -20
  236. package/rntypes/BatchedBridge.d.ts +23 -0
  237. package/rntypes/Devtools.d.ts +20 -0
  238. package/rntypes/LaunchScreen.d.ts +9 -0
  239. package/rntypes/globals.d.ts +496 -0
  240. package/rntypes/index.d.ts +9966 -0
  241. package/rntypes/legacy-properties.d.ts +266 -0
  242. package/template/cpp-app/proj/MyApp.vcxproj +0 -5
  243. package/template/cpp-app/src/pch.h +1 -0
  244. package/template/cpp-lib/src/pch.h +3 -0
  245. package/template/cs-app/proj/MyApp.csproj +0 -6
  246. package/typings-index.d.ts +2 -1
  247. package/typings-index.js +7 -5
  248. package/typings-index.js.map +1 -1
  249. package/Chakra/ChakraCoreDebugger.h +0 -147
  250. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
  251. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  252. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.windows.js +0 -30
  253. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  254. package/Libraries/Components/StaticContainer.react.js +0 -51
  255. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -25
  256. package/Libraries/Interaction/InteractionMixin.js +0 -54
  257. package/Libraries/ReactNative/queryLayoutByID.js +0 -58
  258. package/Scripts/Microsoft.ChakraCore.ARM64.nuspec +0 -50
  259. package/Scripts/Microsoft.ChakraCore.ARM64.targets +0 -15
  260. package/Shared/JSI/ChakraCoreRuntime.h +0 -59
  261. package/template/cpp-app/keys/MyApp_TemporaryKey.pfx +0 -0
  262. package/template/cs-app/keys/MyApp_TemporaryKey.pfx +0 -0
@@ -34,7 +34,7 @@ struct PushNotificationManagerIOSSpec_Notification {
34
34
  REACT_FIELD(alertAction)
35
35
  std::optional<std::string> alertAction;
36
36
  REACT_FIELD(userInfo)
37
- std::optional<React::JSValueObject> userInfo;
37
+ std::optional<React::JSValue> userInfo;
38
38
  REACT_FIELD(category)
39
39
  std::optional<std::string> category;
40
40
  REACT_FIELD(repeatInterval)
@@ -45,24 +45,34 @@ struct PushNotificationManagerIOSSpec_Notification {
45
45
  std::optional<bool> isSilent;
46
46
  };
47
47
 
48
+ REACT_STRUCT(PushNotificationManagerIOSSpec_requestPermissions_permission)
49
+ struct PushNotificationManagerIOSSpec_requestPermissions_permission {
50
+ REACT_FIELD(alert)
51
+ bool alert;
52
+ REACT_FIELD(badge)
53
+ bool badge;
54
+ REACT_FIELD(sound)
55
+ bool sound;
56
+ };
57
+
48
58
  struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
49
59
  static constexpr auto methods = std::tuple{
50
60
  Method<void(std::string, std::string) noexcept>{0, L"onFinishRemoteNotification"},
51
61
  Method<void(double) noexcept>{1, L"setApplicationIconBadgeNumber"},
52
- Method<void(Callback<React::JSValue>) noexcept>{2, L"getApplicationIconBadgeNumber"},
53
- Method<void(React::JSValueObject, Promise<React::JSValue>) noexcept>{3, L"requestPermissions"},
62
+ Method<void(Callback<double>) noexcept>{2, L"getApplicationIconBadgeNumber"},
63
+ Method<void(PushNotificationManagerIOSSpec_requestPermissions_permission, Promise<React::JSValue>) noexcept>{3, L"requestPermissions"},
54
64
  Method<void() noexcept>{4, L"abandonPermissions"},
55
- Method<void(Callback<React::JSValue>) noexcept>{5, L"checkPermissions"},
65
+ Method<void(Callback<PushNotificationManagerIOSSpec_Permissions>) noexcept>{5, L"checkPermissions"},
56
66
  Method<void(PushNotificationManagerIOSSpec_Notification) noexcept>{6, L"presentLocalNotification"},
57
67
  Method<void(PushNotificationManagerIOSSpec_Notification) noexcept>{7, L"scheduleLocalNotification"},
58
68
  Method<void() noexcept>{8, L"cancelAllLocalNotifications"},
59
- Method<void(React::JSValueObject) noexcept>{9, L"cancelLocalNotifications"},
69
+ Method<void(React::JSValue) noexcept>{9, L"cancelLocalNotifications"},
60
70
  Method<void(Promise<React::JSValue>) noexcept>{10, L"getInitialNotification"},
61
- Method<void(Callback<React::JSValue>) noexcept>{11, L"getScheduledLocalNotifications"},
71
+ Method<void(Callback<PushNotificationManagerIOSSpec_Notification>) noexcept>{11, L"getScheduledLocalNotifications"},
62
72
  Method<void() noexcept>{12, L"removeAllDeliveredNotifications"},
63
- Method<void(React::JSValueArray) noexcept>{13, L"removeDeliveredNotifications"},
64
- Method<void(Callback<React::JSValue>) noexcept>{14, L"getDeliveredNotifications"},
65
- Method<void(Callback<React::JSValue>) noexcept>{15, L"getAuthorizationStatus"},
73
+ Method<void(std::vector<std::string>) noexcept>{13, L"removeDeliveredNotifications"},
74
+ Method<void(Callback<std::vector<PushNotificationManagerIOSSpec_Notification>>) noexcept>{14, L"getDeliveredNotifications"},
75
+ Method<void(Callback<double>) noexcept>{15, L"getAuthorizationStatus"},
66
76
  Method<void(std::string) noexcept>{16, L"addListener"},
67
77
  Method<void(double) noexcept>{17, L"removeListeners"},
68
78
  };
@@ -84,13 +94,13 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu
84
94
  REACT_SHOW_METHOD_SPEC_ERRORS(
85
95
  2,
86
96
  "getApplicationIconBadgeNumber",
87
- " REACT_METHOD(getApplicationIconBadgeNumber) void getApplicationIconBadgeNumber(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
88
- " REACT_METHOD(getApplicationIconBadgeNumber) static void getApplicationIconBadgeNumber(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
97
+ " REACT_METHOD(getApplicationIconBadgeNumber) void getApplicationIconBadgeNumber(std::function<void(double)> const & callback) noexcept { /* implementation */ }}\n"
98
+ " REACT_METHOD(getApplicationIconBadgeNumber) static void getApplicationIconBadgeNumber(std::function<void(double)> const & callback) noexcept { /* implementation */ }}\n");
89
99
  REACT_SHOW_METHOD_SPEC_ERRORS(
90
100
  3,
91
101
  "requestPermissions",
92
- " REACT_METHOD(requestPermissions) void requestPermissions(React::JSValueObject && permission, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n"
93
- " REACT_METHOD(requestPermissions) static void requestPermissions(React::JSValueObject && permission, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n");
102
+ " REACT_METHOD(requestPermissions) void requestPermissions(PushNotificationManagerIOSSpec_requestPermissions_permission && permission, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n"
103
+ " REACT_METHOD(requestPermissions) static void requestPermissions(PushNotificationManagerIOSSpec_requestPermissions_permission && permission, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n");
94
104
  REACT_SHOW_METHOD_SPEC_ERRORS(
95
105
  4,
96
106
  "abandonPermissions",
@@ -99,8 +109,8 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu
99
109
  REACT_SHOW_METHOD_SPEC_ERRORS(
100
110
  5,
101
111
  "checkPermissions",
102
- " REACT_METHOD(checkPermissions) void checkPermissions(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
103
- " REACT_METHOD(checkPermissions) static void checkPermissions(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
112
+ " REACT_METHOD(checkPermissions) void checkPermissions(std::function<void(PushNotificationManagerIOSSpec_Permissions const &)> const & callback) noexcept { /* implementation */ }}\n"
113
+ " REACT_METHOD(checkPermissions) static void checkPermissions(std::function<void(PushNotificationManagerIOSSpec_Permissions const &)> const & callback) noexcept { /* implementation */ }}\n");
104
114
  REACT_SHOW_METHOD_SPEC_ERRORS(
105
115
  6,
106
116
  "presentLocalNotification",
@@ -119,8 +129,8 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu
119
129
  REACT_SHOW_METHOD_SPEC_ERRORS(
120
130
  9,
121
131
  "cancelLocalNotifications",
122
- " REACT_METHOD(cancelLocalNotifications) void cancelLocalNotifications(React::JSValueObject && userInfo) noexcept { /* implementation */ }}\n"
123
- " REACT_METHOD(cancelLocalNotifications) static void cancelLocalNotifications(React::JSValueObject && userInfo) noexcept { /* implementation */ }}\n");
132
+ " REACT_METHOD(cancelLocalNotifications) void cancelLocalNotifications(React::JSValue && userInfo) noexcept { /* implementation */ }}\n"
133
+ " REACT_METHOD(cancelLocalNotifications) static void cancelLocalNotifications(React::JSValue && userInfo) noexcept { /* implementation */ }}\n");
124
134
  REACT_SHOW_METHOD_SPEC_ERRORS(
125
135
  10,
126
136
  "getInitialNotification",
@@ -129,8 +139,8 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu
129
139
  REACT_SHOW_METHOD_SPEC_ERRORS(
130
140
  11,
131
141
  "getScheduledLocalNotifications",
132
- " REACT_METHOD(getScheduledLocalNotifications) void getScheduledLocalNotifications(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
133
- " REACT_METHOD(getScheduledLocalNotifications) static void getScheduledLocalNotifications(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
142
+ " REACT_METHOD(getScheduledLocalNotifications) void getScheduledLocalNotifications(std::function<void(PushNotificationManagerIOSSpec_Notification const &)> const & callback) noexcept { /* implementation */ }}\n"
143
+ " REACT_METHOD(getScheduledLocalNotifications) static void getScheduledLocalNotifications(std::function<void(PushNotificationManagerIOSSpec_Notification const &)> const & callback) noexcept { /* implementation */ }}\n");
134
144
  REACT_SHOW_METHOD_SPEC_ERRORS(
135
145
  12,
136
146
  "removeAllDeliveredNotifications",
@@ -139,18 +149,18 @@ struct PushNotificationManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModu
139
149
  REACT_SHOW_METHOD_SPEC_ERRORS(
140
150
  13,
141
151
  "removeDeliveredNotifications",
142
- " REACT_METHOD(removeDeliveredNotifications) void removeDeliveredNotifications(React::JSValueArray && identifiers) noexcept { /* implementation */ }}\n"
143
- " REACT_METHOD(removeDeliveredNotifications) static void removeDeliveredNotifications(React::JSValueArray && identifiers) noexcept { /* implementation */ }}\n");
152
+ " REACT_METHOD(removeDeliveredNotifications) void removeDeliveredNotifications(std::vector<std::string> const & identifiers) noexcept { /* implementation */ }}\n"
153
+ " REACT_METHOD(removeDeliveredNotifications) static void removeDeliveredNotifications(std::vector<std::string> const & identifiers) noexcept { /* implementation */ }}\n");
144
154
  REACT_SHOW_METHOD_SPEC_ERRORS(
145
155
  14,
146
156
  "getDeliveredNotifications",
147
- " REACT_METHOD(getDeliveredNotifications) void getDeliveredNotifications(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
148
- " REACT_METHOD(getDeliveredNotifications) static void getDeliveredNotifications(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
157
+ " REACT_METHOD(getDeliveredNotifications) void getDeliveredNotifications(std::function<void(std::vector<PushNotificationManagerIOSSpec_Notification> const &)> const & callback) noexcept { /* implementation */ }}\n"
158
+ " REACT_METHOD(getDeliveredNotifications) static void getDeliveredNotifications(std::function<void(std::vector<PushNotificationManagerIOSSpec_Notification> const &)> const & callback) noexcept { /* implementation */ }}\n");
149
159
  REACT_SHOW_METHOD_SPEC_ERRORS(
150
160
  15,
151
161
  "getAuthorizationStatus",
152
- " REACT_METHOD(getAuthorizationStatus) void getAuthorizationStatus(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
153
- " REACT_METHOD(getAuthorizationStatus) static void getAuthorizationStatus(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
162
+ " REACT_METHOD(getAuthorizationStatus) void getAuthorizationStatus(std::function<void(double)> const & callback) noexcept { /* implementation */ }}\n"
163
+ " REACT_METHOD(getAuthorizationStatus) static void getAuthorizationStatus(std::function<void(double)> const & callback) noexcept { /* implementation */ }}\n");
154
164
  REACT_SHOW_METHOD_SPEC_ERRORS(
155
165
  16,
156
166
  "addListener",
@@ -15,7 +15,7 @@ namespace Microsoft::ReactNativeSpecs {
15
15
 
16
16
  struct RedBoxSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
17
17
  static constexpr auto methods = std::tuple{
18
- Method<void(React::JSValueObject, std::string) noexcept>{0, L"setExtraData"},
18
+ Method<void(React::JSValue, std::string) noexcept>{0, L"setExtraData"},
19
19
  Method<void() noexcept>{1, L"dismiss"},
20
20
  };
21
21
 
@@ -26,8 +26,8 @@ struct RedBoxSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
26
26
  REACT_SHOW_METHOD_SPEC_ERRORS(
27
27
  0,
28
28
  "setExtraData",
29
- " REACT_METHOD(setExtraData) void setExtraData(React::JSValueObject && extraData, std::string forIdentifier) noexcept { /* implementation */ }}\n"
30
- " REACT_METHOD(setExtraData) static void setExtraData(React::JSValueObject && extraData, std::string forIdentifier) noexcept { /* implementation */ }}\n");
29
+ " REACT_METHOD(setExtraData) void setExtraData(React::JSValue && extraData, std::string forIdentifier) noexcept { /* implementation */ }}\n"
30
+ " REACT_METHOD(setExtraData) static void setExtraData(React::JSValue && extraData, std::string forIdentifier) noexcept { /* implementation */ }}\n");
31
31
  REACT_SHOW_METHOD_SPEC_ERRORS(
32
32
  1,
33
33
  "dismiss",
@@ -13,25 +13,45 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(SampleTurboModuleSpec_Constants)
17
+ struct SampleTurboModuleSpec_Constants {
18
+ REACT_FIELD(const1)
19
+ bool const1;
20
+ REACT_FIELD(const2)
21
+ double const2;
22
+ REACT_FIELD(const3)
23
+ std::string const3;
24
+ };
25
+
16
26
  struct SampleTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
27
+ static constexpr auto constants = std::tuple{
28
+ TypedConstant<SampleTurboModuleSpec_Constants>{0},
29
+ };
17
30
  static constexpr auto methods = std::tuple{
18
31
  Method<void() noexcept>{0, L"voidFunc"},
19
32
  SyncMethod<bool(bool) noexcept>{1, L"getBool"},
20
33
  SyncMethod<double(double) noexcept>{2, L"getNumber"},
21
34
  SyncMethod<std::string(std::string) noexcept>{3, L"getString"},
22
35
  SyncMethod<React::JSValueArray(React::JSValueArray) noexcept>{4, L"getArray"},
23
- SyncMethod<React::JSValueObject(React::JSValueObject) noexcept>{5, L"getObject"},
24
- SyncMethod<React::JSValueObject(React::JSValueObject) noexcept>{6, L"getUnsafeObject"},
36
+ SyncMethod<React::JSValue(React::JSValue) noexcept>{5, L"getObject"},
37
+ SyncMethod<React::JSValue(React::JSValue) noexcept>{6, L"getUnsafeObject"},
25
38
  SyncMethod<double(double) noexcept>{7, L"getRootTag"},
26
- SyncMethod<React::JSValueObject(double, std::string, React::JSValueObject) noexcept>{8, L"getValue"},
27
- Method<void(Callback<React::JSValue>) noexcept>{9, L"getValueWithCallback"},
39
+ SyncMethod<React::JSValue(double, std::string, React::JSValue) noexcept>{8, L"getValue"},
40
+ Method<void(Callback<std::string>) noexcept>{9, L"getValueWithCallback"},
28
41
  Method<void(bool, Promise<React::JSValue>) noexcept>{10, L"getValueWithPromise"},
29
42
  };
30
43
 
31
44
  template <class TModule>
32
45
  static constexpr void ValidateModule() noexcept {
46
+ constexpr auto constantCheckResults = CheckConstants<TModule, SampleTurboModuleSpec>();
33
47
  constexpr auto methodCheckResults = CheckMethods<TModule, SampleTurboModuleSpec>();
34
48
 
49
+ REACT_SHOW_CONSTANT_SPEC_ERRORS(
50
+ 0,
51
+ "SampleTurboModuleSpec_Constants",
52
+ " REACT_GET_CONSTANTS(GetConstants) SampleTurboModuleSpec_Constants GetConstants() noexcept {/*implementation*/}\n"
53
+ " REACT_GET_CONSTANTS(GetConstants) static SampleTurboModuleSpec_Constants GetConstants() noexcept {/*implementation*/}\n");
54
+
35
55
  REACT_SHOW_METHOD_SPEC_ERRORS(
36
56
  0,
37
57
  "voidFunc",
@@ -60,13 +80,13 @@ struct SampleTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
60
80
  REACT_SHOW_METHOD_SPEC_ERRORS(
61
81
  5,
62
82
  "getObject",
63
- " REACT_SYNC_METHOD(getObject) React::JSValueObject getObject(React::JSValueObject && arg) noexcept { /* implementation */ }}\n"
64
- " REACT_SYNC_METHOD(getObject) static React::JSValueObject getObject(React::JSValueObject && arg) noexcept { /* implementation */ }}\n");
83
+ " REACT_SYNC_METHOD(getObject) React::JSValue getObject(React::JSValue && arg) noexcept { /* implementation */ }}\n"
84
+ " REACT_SYNC_METHOD(getObject) static React::JSValue getObject(React::JSValue && arg) noexcept { /* implementation */ }}\n");
65
85
  REACT_SHOW_METHOD_SPEC_ERRORS(
66
86
  6,
67
87
  "getUnsafeObject",
68
- " REACT_SYNC_METHOD(getUnsafeObject) React::JSValueObject getUnsafeObject(React::JSValueObject && arg) noexcept { /* implementation */ }}\n"
69
- " REACT_SYNC_METHOD(getUnsafeObject) static React::JSValueObject getUnsafeObject(React::JSValueObject && arg) noexcept { /* implementation */ }}\n");
88
+ " REACT_SYNC_METHOD(getUnsafeObject) React::JSValue getUnsafeObject(React::JSValue && arg) noexcept { /* implementation */ }}\n"
89
+ " REACT_SYNC_METHOD(getUnsafeObject) static React::JSValue getUnsafeObject(React::JSValue && arg) noexcept { /* implementation */ }}\n");
70
90
  REACT_SHOW_METHOD_SPEC_ERRORS(
71
91
  7,
72
92
  "getRootTag",
@@ -75,13 +95,13 @@ struct SampleTurboModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
75
95
  REACT_SHOW_METHOD_SPEC_ERRORS(
76
96
  8,
77
97
  "getValue",
78
- " REACT_SYNC_METHOD(getValue) React::JSValueObject getValue(double x, std::string y, React::JSValueObject && z) noexcept { /* implementation */ }}\n"
79
- " REACT_SYNC_METHOD(getValue) static React::JSValueObject getValue(double x, std::string y, React::JSValueObject && z) noexcept { /* implementation */ }}\n");
98
+ " REACT_SYNC_METHOD(getValue) React::JSValue getValue(double x, std::string y, React::JSValue && z) noexcept { /* implementation */ }}\n"
99
+ " REACT_SYNC_METHOD(getValue) static React::JSValue getValue(double x, std::string y, React::JSValue && z) noexcept { /* implementation */ }}\n");
80
100
  REACT_SHOW_METHOD_SPEC_ERRORS(
81
101
  9,
82
102
  "getValueWithCallback",
83
- " REACT_METHOD(getValueWithCallback) void getValueWithCallback(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
84
- " REACT_METHOD(getValueWithCallback) static void getValueWithCallback(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
103
+ " REACT_METHOD(getValueWithCallback) void getValueWithCallback(std::function<void(std::string)> const & callback) noexcept { /* implementation */ }}\n"
104
+ " REACT_METHOD(getValueWithCallback) static void getValueWithCallback(std::function<void(std::string)> const & callback) noexcept { /* implementation */ }}\n");
85
105
  REACT_SHOW_METHOD_SPEC_ERRORS(
86
106
  10,
87
107
  "getValueWithPromise",
@@ -15,8 +15,8 @@ namespace Microsoft::ReactNativeSpecs {
15
15
 
16
16
  struct SegmentFetcherSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
17
17
  static constexpr auto methods = std::tuple{
18
- Method<void(double, React::JSValueObject, Callback<React::JSValue>) noexcept>{0, L"fetchSegment"},
19
- Method<void(double, React::JSValueObject, Callback<React::JSValue>) noexcept>{1, L"getSegment"},
18
+ Method<void(double, React::JSValue, Callback<std::optional<React::JSValue>>) noexcept>{0, L"fetchSegment"},
19
+ Method<void(double, React::JSValue, Callback<std::optional<React::JSValue>, std::optional<std::string>>) noexcept>{1, L"getSegment"},
20
20
  };
21
21
 
22
22
  template <class TModule>
@@ -26,13 +26,13 @@ struct SegmentFetcherSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
26
26
  REACT_SHOW_METHOD_SPEC_ERRORS(
27
27
  0,
28
28
  "fetchSegment",
29
- " REACT_METHOD(fetchSegment) void fetchSegment(double segmentId, React::JSValueObject && options, std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
30
- " REACT_METHOD(fetchSegment) static void fetchSegment(double segmentId, React::JSValueObject && options, std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
29
+ " REACT_METHOD(fetchSegment) void fetchSegment(double segmentId, React::JSValue && options, std::function<void(std::optional<React::JSValue>)> const & callback) noexcept { /* implementation */ }}\n"
30
+ " REACT_METHOD(fetchSegment) static void fetchSegment(double segmentId, React::JSValue && options, std::function<void(std::optional<React::JSValue>)> const & callback) noexcept { /* implementation */ }}\n");
31
31
  REACT_SHOW_METHOD_SPEC_ERRORS(
32
32
  1,
33
33
  "getSegment",
34
- " REACT_METHOD(getSegment) void getSegment(double segmentId, React::JSValueObject && options, std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
35
- " REACT_METHOD(getSegment) static void getSegment(double segmentId, React::JSValueObject && options, std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
34
+ " REACT_METHOD(getSegment) void getSegment(double segmentId, React::JSValue && options, std::function<void(std::optional<React::JSValue>, std::optional<std::string>)> const & callback) noexcept { /* implementation */ }}\n"
35
+ " REACT_METHOD(getSegment) static void getSegment(double segmentId, React::JSValue && options, std::function<void(std::optional<React::JSValue>, std::optional<std::string>)> const & callback) noexcept { /* implementation */ }}\n");
36
36
  }
37
37
  };
38
38
 
@@ -13,26 +13,42 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(SettingsManagerSpec_Constants)
17
+ struct SettingsManagerSpec_Constants {
18
+ REACT_FIELD(settings)
19
+ React::JSValue settings;
20
+ };
21
+
16
22
  struct SettingsManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
23
+ static constexpr auto constants = std::tuple{
24
+ TypedConstant<SettingsManagerSpec_Constants>{0},
25
+ };
17
26
  static constexpr auto methods = std::tuple{
18
- Method<void(React::JSValueObject) noexcept>{0, L"setValues"},
19
- Method<void(React::JSValueArray) noexcept>{1, L"deleteValues"},
27
+ Method<void(React::JSValue) noexcept>{0, L"setValues"},
28
+ Method<void(std::vector<std::string>) noexcept>{1, L"deleteValues"},
20
29
  };
21
30
 
22
31
  template <class TModule>
23
32
  static constexpr void ValidateModule() noexcept {
33
+ constexpr auto constantCheckResults = CheckConstants<TModule, SettingsManagerSpec>();
24
34
  constexpr auto methodCheckResults = CheckMethods<TModule, SettingsManagerSpec>();
25
35
 
36
+ REACT_SHOW_CONSTANT_SPEC_ERRORS(
37
+ 0,
38
+ "SettingsManagerSpec_Constants",
39
+ " REACT_GET_CONSTANTS(GetConstants) SettingsManagerSpec_Constants GetConstants() noexcept {/*implementation*/}\n"
40
+ " REACT_GET_CONSTANTS(GetConstants) static SettingsManagerSpec_Constants GetConstants() noexcept {/*implementation*/}\n");
41
+
26
42
  REACT_SHOW_METHOD_SPEC_ERRORS(
27
43
  0,
28
44
  "setValues",
29
- " REACT_METHOD(setValues) void setValues(React::JSValueObject && values) noexcept { /* implementation */ }}\n"
30
- " REACT_METHOD(setValues) static void setValues(React::JSValueObject && values) noexcept { /* implementation */ }}\n");
45
+ " REACT_METHOD(setValues) void setValues(React::JSValue && values) noexcept { /* implementation */ }}\n"
46
+ " REACT_METHOD(setValues) static void setValues(React::JSValue && values) noexcept { /* implementation */ }}\n");
31
47
  REACT_SHOW_METHOD_SPEC_ERRORS(
32
48
  1,
33
49
  "deleteValues",
34
- " REACT_METHOD(deleteValues) void deleteValues(React::JSValueArray && values) noexcept { /* implementation */ }}\n"
35
- " REACT_METHOD(deleteValues) static void deleteValues(React::JSValueArray && values) noexcept { /* implementation */ }}\n");
50
+ " REACT_METHOD(deleteValues) void deleteValues(std::vector<std::string> const & values) noexcept { /* implementation */ }}\n"
51
+ " REACT_METHOD(deleteValues) static void deleteValues(std::vector<std::string> const & values) noexcept { /* implementation */ }}\n");
36
52
  }
37
53
  };
38
54
 
@@ -13,9 +13,17 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(ShareModuleSpec_share_content)
17
+ struct ShareModuleSpec_share_content {
18
+ REACT_FIELD(title)
19
+ std::optional<std::string> title;
20
+ REACT_FIELD(message)
21
+ std::optional<std::string> message;
22
+ };
23
+
16
24
  struct ShareModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
17
25
  static constexpr auto methods = std::tuple{
18
- Method<void(React::JSValueObject, std::string, Promise<React::JSValue>) noexcept>{0, L"share"},
26
+ Method<void(ShareModuleSpec_share_content, std::string, Promise<React::JSValue>) noexcept>{0, L"share"},
19
27
  };
20
28
 
21
29
  template <class TModule>
@@ -25,8 +33,8 @@ struct ShareModuleSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
25
33
  REACT_SHOW_METHOD_SPEC_ERRORS(
26
34
  0,
27
35
  "share",
28
- " REACT_METHOD(share) void share(React::JSValueObject && content, std::string dialogTitle, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n"
29
- " REACT_METHOD(share) static void share(React::JSValueObject && content, std::string dialogTitle, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n");
36
+ " REACT_METHOD(share) void share(ShareModuleSpec_share_content && content, std::string dialogTitle, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n"
37
+ " REACT_METHOD(share) static void share(ShareModuleSpec_share_content && content, std::string dialogTitle, React::ReactPromise<React::JSValue> &&result) noexcept { /* implementation */ }}\n");
30
38
  }
31
39
  };
32
40
 
@@ -13,15 +13,31 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(SourceCodeSpec_Constants)
17
+ struct SourceCodeSpec_Constants {
18
+ REACT_FIELD(scriptURL)
19
+ std::string scriptURL;
20
+ };
21
+
16
22
  struct SourceCodeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
23
+ static constexpr auto constants = std::tuple{
24
+ TypedConstant<SourceCodeSpec_Constants>{0},
25
+ };
17
26
  static constexpr auto methods = std::tuple{
18
27
 
19
28
  };
20
29
 
21
30
  template <class TModule>
22
31
  static constexpr void ValidateModule() noexcept {
32
+ constexpr auto constantCheckResults = CheckConstants<TModule, SourceCodeSpec>();
23
33
  constexpr auto methodCheckResults = CheckMethods<TModule, SourceCodeSpec>();
24
34
 
35
+ REACT_SHOW_CONSTANT_SPEC_ERRORS(
36
+ 0,
37
+ "SourceCodeSpec_Constants",
38
+ " REACT_GET_CONSTANTS(GetConstants) SourceCodeSpec_Constants GetConstants() noexcept {/*implementation*/}\n"
39
+ " REACT_GET_CONSTANTS(GetConstants) static SourceCodeSpec_Constants GetConstants() noexcept {/*implementation*/}\n");
40
+
25
41
 
26
42
  }
27
43
  };
@@ -13,18 +13,36 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(StatusBarManagerAndroidSpec_Constants)
17
+ struct StatusBarManagerAndroidSpec_Constants {
18
+ REACT_FIELD(HEIGHT)
19
+ double HEIGHT;
20
+ REACT_FIELD(DEFAULT_BACKGROUND_COLOR)
21
+ double DEFAULT_BACKGROUND_COLOR;
22
+ };
23
+
16
24
  struct StatusBarManagerAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
25
+ static constexpr auto constants = std::tuple{
26
+ TypedConstant<StatusBarManagerAndroidSpec_Constants>{0},
27
+ };
17
28
  static constexpr auto methods = std::tuple{
18
29
  Method<void(double, bool) noexcept>{0, L"setColor"},
19
30
  Method<void(bool) noexcept>{1, L"setTranslucent"},
20
- Method<void(std::string) noexcept>{2, L"setStyle"},
31
+ Method<void(std::optional<std::string>) noexcept>{2, L"setStyle"},
21
32
  Method<void(bool) noexcept>{3, L"setHidden"},
22
33
  };
23
34
 
24
35
  template <class TModule>
25
36
  static constexpr void ValidateModule() noexcept {
37
+ constexpr auto constantCheckResults = CheckConstants<TModule, StatusBarManagerAndroidSpec>();
26
38
  constexpr auto methodCheckResults = CheckMethods<TModule, StatusBarManagerAndroidSpec>();
27
39
 
40
+ REACT_SHOW_CONSTANT_SPEC_ERRORS(
41
+ 0,
42
+ "StatusBarManagerAndroidSpec_Constants",
43
+ " REACT_GET_CONSTANTS(GetConstants) StatusBarManagerAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n"
44
+ " REACT_GET_CONSTANTS(GetConstants) static StatusBarManagerAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n");
45
+
28
46
  REACT_SHOW_METHOD_SPEC_ERRORS(
29
47
  0,
30
48
  "setColor",
@@ -38,8 +56,8 @@ struct StatusBarManagerAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleS
38
56
  REACT_SHOW_METHOD_SPEC_ERRORS(
39
57
  2,
40
58
  "setStyle",
41
- " REACT_METHOD(setStyle) void setStyle(std::string statusBarStyle) noexcept { /* implementation */ }}\n"
42
- " REACT_METHOD(setStyle) static void setStyle(std::string statusBarStyle) noexcept { /* implementation */ }}\n");
59
+ " REACT_METHOD(setStyle) void setStyle(std::optional<std::string> statusBarStyle) noexcept { /* implementation */ }}\n"
60
+ " REACT_METHOD(setStyle) static void setStyle(std::optional<std::string> statusBarStyle) noexcept { /* implementation */ }}\n");
43
61
  REACT_SHOW_METHOD_SPEC_ERRORS(
44
62
  3,
45
63
  "setHidden",
@@ -13,25 +13,49 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(StatusBarManagerIOSSpec_getHeight_callback_result)
17
+ struct StatusBarManagerIOSSpec_getHeight_callback_result {
18
+ REACT_FIELD(height)
19
+ double height;
20
+ };
21
+
22
+ REACT_STRUCT(StatusBarManagerIOSSpec_Constants)
23
+ struct StatusBarManagerIOSSpec_Constants {
24
+ REACT_FIELD(HEIGHT)
25
+ double HEIGHT;
26
+ REACT_FIELD(DEFAULT_BACKGROUND_COLOR)
27
+ std::optional<double> DEFAULT_BACKGROUND_COLOR;
28
+ };
29
+
16
30
  struct StatusBarManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
31
+ static constexpr auto constants = std::tuple{
32
+ TypedConstant<StatusBarManagerIOSSpec_Constants>{0},
33
+ };
17
34
  static constexpr auto methods = std::tuple{
18
- Method<void(Callback<React::JSValue>) noexcept>{0, L"getHeight"},
35
+ Method<void(Callback<StatusBarManagerIOSSpec_getHeight_callback_result>) noexcept>{0, L"getHeight"},
19
36
  Method<void(bool) noexcept>{1, L"setNetworkActivityIndicatorVisible"},
20
37
  Method<void(std::string) noexcept>{2, L"addListener"},
21
38
  Method<void(double) noexcept>{3, L"removeListeners"},
22
- Method<void(std::string, bool) noexcept>{4, L"setStyle"},
39
+ Method<void(std::optional<std::string>, bool) noexcept>{4, L"setStyle"},
23
40
  Method<void(bool, std::string) noexcept>{5, L"setHidden"},
24
41
  };
25
42
 
26
43
  template <class TModule>
27
44
  static constexpr void ValidateModule() noexcept {
45
+ constexpr auto constantCheckResults = CheckConstants<TModule, StatusBarManagerIOSSpec>();
28
46
  constexpr auto methodCheckResults = CheckMethods<TModule, StatusBarManagerIOSSpec>();
29
47
 
48
+ REACT_SHOW_CONSTANT_SPEC_ERRORS(
49
+ 0,
50
+ "StatusBarManagerIOSSpec_Constants",
51
+ " REACT_GET_CONSTANTS(GetConstants) StatusBarManagerIOSSpec_Constants GetConstants() noexcept {/*implementation*/}\n"
52
+ " REACT_GET_CONSTANTS(GetConstants) static StatusBarManagerIOSSpec_Constants GetConstants() noexcept {/*implementation*/}\n");
53
+
30
54
  REACT_SHOW_METHOD_SPEC_ERRORS(
31
55
  0,
32
56
  "getHeight",
33
- " REACT_METHOD(getHeight) void getHeight(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n"
34
- " REACT_METHOD(getHeight) static void getHeight(std::function<void(React::JSValue const &)> const & callback) noexcept { /* implementation */ }}\n");
57
+ " REACT_METHOD(getHeight) void getHeight(std::function<void(StatusBarManagerIOSSpec_getHeight_callback_result const &)> const & callback) noexcept { /* implementation */ }}\n"
58
+ " REACT_METHOD(getHeight) static void getHeight(std::function<void(StatusBarManagerIOSSpec_getHeight_callback_result const &)> const & callback) noexcept { /* implementation */ }}\n");
35
59
  REACT_SHOW_METHOD_SPEC_ERRORS(
36
60
  1,
37
61
  "setNetworkActivityIndicatorVisible",
@@ -50,8 +74,8 @@ struct StatusBarManagerIOSSpec : winrt::Microsoft::ReactNative::TurboModuleSpec
50
74
  REACT_SHOW_METHOD_SPEC_ERRORS(
51
75
  4,
52
76
  "setStyle",
53
- " REACT_METHOD(setStyle) void setStyle(std::string statusBarStyle, bool animated) noexcept { /* implementation */ }}\n"
54
- " REACT_METHOD(setStyle) static void setStyle(std::string statusBarStyle, bool animated) noexcept { /* implementation */ }}\n");
77
+ " REACT_METHOD(setStyle) void setStyle(std::optional<std::string> statusBarStyle, bool animated) noexcept { /* implementation */ }}\n"
78
+ " REACT_METHOD(setStyle) static void setStyle(std::optional<std::string> statusBarStyle, bool animated) noexcept { /* implementation */ }}\n");
55
79
  REACT_SHOW_METHOD_SPEC_ERRORS(
56
80
  5,
57
81
  "setHidden",
@@ -13,7 +13,24 @@
13
13
 
14
14
  namespace Microsoft::ReactNativeSpecs {
15
15
 
16
+ REACT_STRUCT(ToastAndroidSpec_Constants)
17
+ struct ToastAndroidSpec_Constants {
18
+ REACT_FIELD(SHORT)
19
+ double SHORT;
20
+ REACT_FIELD(LONG)
21
+ double LONG;
22
+ REACT_FIELD(TOP)
23
+ double TOP;
24
+ REACT_FIELD(BOTTOM)
25
+ double BOTTOM;
26
+ REACT_FIELD(CENTER)
27
+ double CENTER;
28
+ };
29
+
16
30
  struct ToastAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
31
+ static constexpr auto constants = std::tuple{
32
+ TypedConstant<ToastAndroidSpec_Constants>{0},
33
+ };
17
34
  static constexpr auto methods = std::tuple{
18
35
  Method<void(std::string, double) noexcept>{0, L"show"},
19
36
  Method<void(std::string, double, double) noexcept>{1, L"showWithGravity"},
@@ -22,8 +39,15 @@ struct ToastAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
22
39
 
23
40
  template <class TModule>
24
41
  static constexpr void ValidateModule() noexcept {
42
+ constexpr auto constantCheckResults = CheckConstants<TModule, ToastAndroidSpec>();
25
43
  constexpr auto methodCheckResults = CheckMethods<TModule, ToastAndroidSpec>();
26
44
 
45
+ REACT_SHOW_CONSTANT_SPEC_ERRORS(
46
+ 0,
47
+ "ToastAndroidSpec_Constants",
48
+ " REACT_GET_CONSTANTS(GetConstants) ToastAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n"
49
+ " REACT_GET_CONSTANTS(GetConstants) static ToastAndroidSpec_Constants GetConstants() noexcept {/*implementation*/}\n");
50
+
27
51
  REACT_SHOW_METHOD_SPEC_ERRORS(
28
52
  0,
29
53
  "show",