react-native-tvos 0.72.4-0rc0 → 0.72.5-0

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 (91) hide show
  1. package/Libraries/Components/Pressable/Pressable.js +11 -5
  2. package/Libraries/Components/ScrollView/ScrollView.d.ts +7 -0
  3. package/Libraries/Components/ScrollView/ScrollView.js +8 -0
  4. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +1 -0
  5. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +1 -0
  6. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -0
  7. package/Libraries/Core/ReactNativeVersion.js +2 -2
  8. package/README-core.md +147 -0
  9. package/README.md +32 -39
  10. package/React/Base/RCTBundleURLProvider.h +33 -2
  11. package/React/Base/RCTBundleURLProvider.mm +78 -15
  12. package/React/Base/RCTVersion.m +2 -2
  13. package/React/CoreModules/RCTTiming.mm +5 -0
  14. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +4 -0
  15. package/React/Fabric/RCTThirdPartyFabricComponentsProvider.h +29 -0
  16. package/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm +29 -0
  17. package/React/Views/ScrollView/RCTScrollView.h +1 -0
  18. package/React/Views/ScrollView/RCTScrollView.m +12 -0
  19. package/React/Views/ScrollView/RCTScrollViewManager.m +1 -0
  20. package/ReactAndroid/gradle.properties +1 -1
  21. package/ReactAndroid/hermes-engine/build.gradle +1 -1
  22. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
  23. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.java +4 -0
  24. package/ReactAndroid/src/main/jni/CMakeLists.txt +5 -0
  25. package/ReactCommon/React-Fabric.podspec +1 -1
  26. package/ReactCommon/ReactCommon.podspec +1 -1
  27. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  28. package/ReactCommon/jsc/JSCRuntime.cpp +10 -0
  29. package/ReactCommon/react/debug/React-debug.podspec +1 -1
  30. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
  31. package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
  32. package/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.h +29 -0
  33. package/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp +111 -0
  34. package/ReactCommon/react/renderer/components/rncore/EventEmitters.h +186 -0
  35. package/ReactCommon/react/renderer/components/rncore/Props.cpp +157 -0
  36. package/ReactCommon/react/renderer/components/rncore/Props.h +395 -0
  37. package/ReactCommon/react/renderer/components/rncore/RCTComponentViewHelpers.h +257 -0
  38. package/ReactCommon/react/renderer/components/rncore/ShadowNodes.cpp +26 -0
  39. package/ReactCommon/react/renderer/components/rncore/ShadowNodes.h +111 -0
  40. package/ReactCommon/react/renderer/components/rncore/States.cpp +18 -0
  41. package/ReactCommon/react/renderer/components/rncore/States.h +141 -0
  42. package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.cpp +15 -1
  43. package/ReactCommon/react/renderer/components/scrollview/ScrollViewProps.h +1 -0
  44. package/ReactCommon/react/renderer/core/RawPropsKeyMap.cpp +2 -0
  45. package/ReactCommon/react/renderer/core/RawPropsParser.cpp +1 -0
  46. package/ReactCommon/react/renderer/core/RawPropsPrimitives.h +4 -4
  47. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  48. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
  49. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
  50. package/ReactCommon/react/utils/React-utils.podspec +1 -1
  51. package/package.json +7 -6
  52. package/scripts/cocoapods/helpers.rb +16 -0
  53. package/scripts/cocoapods/utils.rb +98 -8
  54. package/scripts/react_native_pods.rb +6 -2
  55. package/sdks/.hermesversion +1 -1
  56. package/sdks/hermes-engine/utils/build-apple-framework.sh +8 -1
  57. package/sdks/hermes-engine/utils/build-hermes-xcode.sh +8 -0
  58. package/sdks/hermesc/osx-bin/hermesc +0 -0
  59. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  60. package/template/ios/HelloWorld.xcodeproj/project.pbxproj +95 -13
  61. package/template/package.json +5 -4
  62. package/types/index.d.ts +1 -0
  63. package/types/public/ReactNativeTVTypes.d.ts +192 -0
  64. package/scripts/cocoapods/__tests__/codegen-test.rb +0 -242
  65. package/scripts/cocoapods/__tests__/codegen_utils-test.rb +0 -602
  66. package/scripts/cocoapods/__tests__/fabric-test.rb +0 -68
  67. package/scripts/cocoapods/__tests__/flipper-test.rb +0 -161
  68. package/scripts/cocoapods/__tests__/jsengine-test.rb +0 -130
  69. package/scripts/cocoapods/__tests__/local_podspec_patch-test.rb +0 -167
  70. package/scripts/cocoapods/__tests__/new_architecture-test.rb +0 -303
  71. package/scripts/cocoapods/__tests__/test_utils/CodegenScriptPhaseExtractorMock.rb +0 -21
  72. package/scripts/cocoapods/__tests__/test_utils/CodegenUtilsMock.rb +0 -108
  73. package/scripts/cocoapods/__tests__/test_utils/DirMock.rb +0 -72
  74. package/scripts/cocoapods/__tests__/test_utils/EnvironmentMock.rb +0 -21
  75. package/scripts/cocoapods/__tests__/test_utils/FileMock.rb +0 -113
  76. package/scripts/cocoapods/__tests__/test_utils/FileUtilsMock.rb +0 -40
  77. package/scripts/cocoapods/__tests__/test_utils/FinderMock.rb +0 -28
  78. package/scripts/cocoapods/__tests__/test_utils/InstallerMock.rb +0 -222
  79. package/scripts/cocoapods/__tests__/test_utils/LocalPodspecPatchMock.rb +0 -14
  80. package/scripts/cocoapods/__tests__/test_utils/Open3Mock.rb +0 -43
  81. package/scripts/cocoapods/__tests__/test_utils/PathnameMock.rb +0 -42
  82. package/scripts/cocoapods/__tests__/test_utils/PodMock.rb +0 -144
  83. package/scripts/cocoapods/__tests__/test_utils/SpecMock.rb +0 -30
  84. package/scripts/cocoapods/__tests__/test_utils/SysctlCheckerMock.rb +0 -21
  85. package/scripts/cocoapods/__tests__/test_utils/TargetDefinitionMock.rb +0 -12
  86. package/scripts/cocoapods/__tests__/test_utils/podSpy.rb +0 -39
  87. package/scripts/cocoapods/__tests__/test_utils/systemUtils.rb +0 -14
  88. package/scripts/cocoapods/__tests__/utils-test.rb +0 -766
  89. package/scripts/codegen/__test_fixtures__/fixtures.js +0 -132
  90. package/scripts/codegen/__tests__/generate-artifacts-executor-test.js +0 -500
  91. package/scripts/codegen/__tests__/generate-specs-cli-executor-test.js +0 -88
@@ -0,0 +1,395 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <cinttypes>
13
+ #include <jsi/jsi.h>
14
+ #include <react/renderer/components/view/ViewProps.h>
15
+ #include <react/renderer/core/PropsParserContext.h>
16
+ #include <react/renderer/graphics/Color.h>
17
+ #include <vector>
18
+
19
+ namespace facebook {
20
+ namespace react {
21
+
22
+ class JSI_EXPORT SafeAreaViewProps final : public ViewProps {
23
+ public:
24
+ SafeAreaViewProps() = default;
25
+ SafeAreaViewProps(const PropsParserContext& context, const SafeAreaViewProps &sourceProps, const RawProps &rawProps);
26
+
27
+ #pragma mark - Props
28
+
29
+
30
+ };
31
+
32
+ class JSI_EXPORT AndroidHorizontalScrollContentViewProps final : public ViewProps {
33
+ public:
34
+ AndroidHorizontalScrollContentViewProps() = default;
35
+ AndroidHorizontalScrollContentViewProps(const PropsParserContext& context, const AndroidHorizontalScrollContentViewProps &sourceProps, const RawProps &rawProps);
36
+
37
+ #pragma mark - Props
38
+
39
+ bool removeClippedSubviews{false};
40
+ };
41
+
42
+ class JSI_EXPORT AndroidProgressBarProps final : public ViewProps {
43
+ public:
44
+ AndroidProgressBarProps() = default;
45
+ AndroidProgressBarProps(const PropsParserContext& context, const AndroidProgressBarProps &sourceProps, const RawProps &rawProps);
46
+
47
+ #pragma mark - Props
48
+
49
+ std::string styleAttr{};
50
+ std::string typeAttr{};
51
+ bool indeterminate{false};
52
+ double progress{0.0};
53
+ bool animating{true};
54
+ SharedColor color{};
55
+ std::string testID{""};
56
+ };
57
+
58
+ enum class AndroidSwipeRefreshLayoutSize { Default, Large };
59
+
60
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidSwipeRefreshLayoutSize &result) {
61
+ auto string = (std::string)value;
62
+ if (string == "default") { result = AndroidSwipeRefreshLayoutSize::Default; return; }
63
+ if (string == "large") { result = AndroidSwipeRefreshLayoutSize::Large; return; }
64
+ abort();
65
+ }
66
+
67
+ static inline std::string toString(const AndroidSwipeRefreshLayoutSize &value) {
68
+ switch (value) {
69
+ case AndroidSwipeRefreshLayoutSize::Default: return "default";
70
+ case AndroidSwipeRefreshLayoutSize::Large: return "large";
71
+ }
72
+ }
73
+
74
+ class JSI_EXPORT AndroidSwipeRefreshLayoutProps final : public ViewProps {
75
+ public:
76
+ AndroidSwipeRefreshLayoutProps() = default;
77
+ AndroidSwipeRefreshLayoutProps(const PropsParserContext& context, const AndroidSwipeRefreshLayoutProps &sourceProps, const RawProps &rawProps);
78
+
79
+ #pragma mark - Props
80
+
81
+ bool enabled{true};
82
+ std::vector<SharedColor> colors{};
83
+ SharedColor progressBackgroundColor{};
84
+ AndroidSwipeRefreshLayoutSize size{AndroidSwipeRefreshLayoutSize::Default};
85
+ Float progressViewOffset{0.0};
86
+ bool refreshing{false};
87
+ };
88
+
89
+ class JSI_EXPORT PullToRefreshViewProps final : public ViewProps {
90
+ public:
91
+ PullToRefreshViewProps() = default;
92
+ PullToRefreshViewProps(const PropsParserContext& context, const PullToRefreshViewProps &sourceProps, const RawProps &rawProps);
93
+
94
+ #pragma mark - Props
95
+
96
+ SharedColor tintColor{};
97
+ SharedColor titleColor{};
98
+ std::string title{};
99
+ Float progressViewOffset{0.0};
100
+ bool refreshing{false};
101
+ };
102
+
103
+ class JSI_EXPORT InputAccessoryProps final : public ViewProps {
104
+ public:
105
+ InputAccessoryProps() = default;
106
+ InputAccessoryProps(const PropsParserContext& context, const InputAccessoryProps &sourceProps, const RawProps &rawProps);
107
+
108
+ #pragma mark - Props
109
+
110
+ SharedColor backgroundColor{};
111
+ };
112
+
113
+ enum class AndroidDrawerLayoutKeyboardDismissMode { None, OnDrag };
114
+
115
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidDrawerLayoutKeyboardDismissMode &result) {
116
+ auto string = (std::string)value;
117
+ if (string == "none") { result = AndroidDrawerLayoutKeyboardDismissMode::None; return; }
118
+ if (string == "on-drag") { result = AndroidDrawerLayoutKeyboardDismissMode::OnDrag; return; }
119
+ abort();
120
+ }
121
+
122
+ static inline std::string toString(const AndroidDrawerLayoutKeyboardDismissMode &value) {
123
+ switch (value) {
124
+ case AndroidDrawerLayoutKeyboardDismissMode::None: return "none";
125
+ case AndroidDrawerLayoutKeyboardDismissMode::OnDrag: return "on-drag";
126
+ }
127
+ }
128
+ enum class AndroidDrawerLayoutDrawerPosition { Left, Right };
129
+
130
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidDrawerLayoutDrawerPosition &result) {
131
+ auto string = (std::string)value;
132
+ if (string == "left") { result = AndroidDrawerLayoutDrawerPosition::Left; return; }
133
+ if (string == "right") { result = AndroidDrawerLayoutDrawerPosition::Right; return; }
134
+ abort();
135
+ }
136
+
137
+ static inline std::string toString(const AndroidDrawerLayoutDrawerPosition &value) {
138
+ switch (value) {
139
+ case AndroidDrawerLayoutDrawerPosition::Left: return "left";
140
+ case AndroidDrawerLayoutDrawerPosition::Right: return "right";
141
+ }
142
+ }
143
+ enum class AndroidDrawerLayoutDrawerLockMode { Unlocked, LockedClosed, LockedOpen };
144
+
145
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, AndroidDrawerLayoutDrawerLockMode &result) {
146
+ auto string = (std::string)value;
147
+ if (string == "unlocked") { result = AndroidDrawerLayoutDrawerLockMode::Unlocked; return; }
148
+ if (string == "locked-closed") { result = AndroidDrawerLayoutDrawerLockMode::LockedClosed; return; }
149
+ if (string == "locked-open") { result = AndroidDrawerLayoutDrawerLockMode::LockedOpen; return; }
150
+ abort();
151
+ }
152
+
153
+ static inline std::string toString(const AndroidDrawerLayoutDrawerLockMode &value) {
154
+ switch (value) {
155
+ case AndroidDrawerLayoutDrawerLockMode::Unlocked: return "unlocked";
156
+ case AndroidDrawerLayoutDrawerLockMode::LockedClosed: return "locked-closed";
157
+ case AndroidDrawerLayoutDrawerLockMode::LockedOpen: return "locked-open";
158
+ }
159
+ }
160
+
161
+ class JSI_EXPORT AndroidDrawerLayoutProps final : public ViewProps {
162
+ public:
163
+ AndroidDrawerLayoutProps() = default;
164
+ AndroidDrawerLayoutProps(const PropsParserContext& context, const AndroidDrawerLayoutProps &sourceProps, const RawProps &rawProps);
165
+
166
+ #pragma mark - Props
167
+
168
+ AndroidDrawerLayoutKeyboardDismissMode keyboardDismissMode{AndroidDrawerLayoutKeyboardDismissMode::None};
169
+ SharedColor drawerBackgroundColor{};
170
+ AndroidDrawerLayoutDrawerPosition drawerPosition{AndroidDrawerLayoutDrawerPosition::Left};
171
+ Float drawerWidth{};
172
+ AndroidDrawerLayoutDrawerLockMode drawerLockMode{AndroidDrawerLayoutDrawerLockMode::Unlocked};
173
+ SharedColor statusBarBackgroundColor{};
174
+ };
175
+
176
+ enum class ActivityIndicatorViewSize { Small, Large };
177
+
178
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ActivityIndicatorViewSize &result) {
179
+ auto string = (std::string)value;
180
+ if (string == "small") { result = ActivityIndicatorViewSize::Small; return; }
181
+ if (string == "large") { result = ActivityIndicatorViewSize::Large; return; }
182
+ abort();
183
+ }
184
+
185
+ static inline std::string toString(const ActivityIndicatorViewSize &value) {
186
+ switch (value) {
187
+ case ActivityIndicatorViewSize::Small: return "small";
188
+ case ActivityIndicatorViewSize::Large: return "large";
189
+ }
190
+ }
191
+
192
+ class JSI_EXPORT ActivityIndicatorViewProps final : public ViewProps {
193
+ public:
194
+ ActivityIndicatorViewProps() = default;
195
+ ActivityIndicatorViewProps(const PropsParserContext& context, const ActivityIndicatorViewProps &sourceProps, const RawProps &rawProps);
196
+
197
+ #pragma mark - Props
198
+
199
+ bool hidesWhenStopped{false};
200
+ bool animating{false};
201
+ SharedColor color{};
202
+ ActivityIndicatorViewSize size{ActivityIndicatorViewSize::Small};
203
+ };
204
+
205
+ class JSI_EXPORT UnimplementedNativeViewProps final : public ViewProps {
206
+ public:
207
+ UnimplementedNativeViewProps() = default;
208
+ UnimplementedNativeViewProps(const PropsParserContext& context, const UnimplementedNativeViewProps &sourceProps, const RawProps &rawProps);
209
+
210
+ #pragma mark - Props
211
+
212
+ std::string name{""};
213
+ };
214
+
215
+ class JSI_EXPORT SwitchProps final : public ViewProps {
216
+ public:
217
+ SwitchProps() = default;
218
+ SwitchProps(const PropsParserContext& context, const SwitchProps &sourceProps, const RawProps &rawProps);
219
+
220
+ #pragma mark - Props
221
+
222
+ bool disabled{false};
223
+ bool value{false};
224
+ SharedColor tintColor{};
225
+ SharedColor onTintColor{};
226
+ SharedColor thumbTintColor{};
227
+ SharedColor thumbColor{};
228
+ SharedColor trackColorForFalse{};
229
+ SharedColor trackColorForTrue{};
230
+ };
231
+
232
+ class JSI_EXPORT AndroidSwitchProps final : public ViewProps {
233
+ public:
234
+ AndroidSwitchProps() = default;
235
+ AndroidSwitchProps(const PropsParserContext& context, const AndroidSwitchProps &sourceProps, const RawProps &rawProps);
236
+
237
+ #pragma mark - Props
238
+
239
+ bool disabled{false};
240
+ bool enabled{true};
241
+ SharedColor thumbColor{};
242
+ SharedColor trackColorForFalse{};
243
+ SharedColor trackColorForTrue{};
244
+ bool value{false};
245
+ bool on{false};
246
+ SharedColor thumbTintColor{};
247
+ SharedColor trackTintColor{};
248
+ };
249
+
250
+ class JSI_EXPORT TraceUpdateOverlayProps final : public ViewProps {
251
+ public:
252
+ TraceUpdateOverlayProps() = default;
253
+ TraceUpdateOverlayProps(const PropsParserContext& context, const TraceUpdateOverlayProps &sourceProps, const RawProps &rawProps);
254
+
255
+ #pragma mark - Props
256
+
257
+
258
+ };
259
+
260
+ enum class ModalHostViewAnimationType { None, Slide, Fade };
261
+
262
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ModalHostViewAnimationType &result) {
263
+ auto string = (std::string)value;
264
+ if (string == "none") { result = ModalHostViewAnimationType::None; return; }
265
+ if (string == "slide") { result = ModalHostViewAnimationType::Slide; return; }
266
+ if (string == "fade") { result = ModalHostViewAnimationType::Fade; return; }
267
+ abort();
268
+ }
269
+
270
+ static inline std::string toString(const ModalHostViewAnimationType &value) {
271
+ switch (value) {
272
+ case ModalHostViewAnimationType::None: return "none";
273
+ case ModalHostViewAnimationType::Slide: return "slide";
274
+ case ModalHostViewAnimationType::Fade: return "fade";
275
+ }
276
+ }
277
+ enum class ModalHostViewPresentationStyle { FullScreen, PageSheet, FormSheet, OverFullScreen };
278
+
279
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ModalHostViewPresentationStyle &result) {
280
+ auto string = (std::string)value;
281
+ if (string == "fullScreen") { result = ModalHostViewPresentationStyle::FullScreen; return; }
282
+ if (string == "pageSheet") { result = ModalHostViewPresentationStyle::PageSheet; return; }
283
+ if (string == "formSheet") { result = ModalHostViewPresentationStyle::FormSheet; return; }
284
+ if (string == "overFullScreen") { result = ModalHostViewPresentationStyle::OverFullScreen; return; }
285
+ abort();
286
+ }
287
+
288
+ static inline std::string toString(const ModalHostViewPresentationStyle &value) {
289
+ switch (value) {
290
+ case ModalHostViewPresentationStyle::FullScreen: return "fullScreen";
291
+ case ModalHostViewPresentationStyle::PageSheet: return "pageSheet";
292
+ case ModalHostViewPresentationStyle::FormSheet: return "formSheet";
293
+ case ModalHostViewPresentationStyle::OverFullScreen: return "overFullScreen";
294
+ }
295
+ }
296
+ using ModalHostViewSupportedOrientationsMask = uint32_t;
297
+
298
+ enum class ModalHostViewSupportedOrientations: ModalHostViewSupportedOrientationsMask {
299
+ Portrait = 1 << 0,
300
+ PortraitUpsideDown = 1 << 1,
301
+ Landscape = 1 << 2,
302
+ LandscapeLeft = 1 << 3,
303
+ LandscapeRight = 1 << 4
304
+ };
305
+
306
+ constexpr bool operator&(
307
+ ModalHostViewSupportedOrientationsMask const lhs,
308
+ enum ModalHostViewSupportedOrientations const rhs) {
309
+ return lhs & static_cast<ModalHostViewSupportedOrientationsMask>(rhs);
310
+ }
311
+
312
+ constexpr ModalHostViewSupportedOrientationsMask operator|(
313
+ ModalHostViewSupportedOrientationsMask const lhs,
314
+ enum ModalHostViewSupportedOrientations const rhs) {
315
+ return lhs | static_cast<ModalHostViewSupportedOrientationsMask>(rhs);
316
+ }
317
+
318
+ constexpr void operator|=(
319
+ ModalHostViewSupportedOrientationsMask &lhs,
320
+ enum ModalHostViewSupportedOrientations const rhs) {
321
+ lhs = lhs | static_cast<ModalHostViewSupportedOrientationsMask>(rhs);
322
+ }
323
+
324
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ModalHostViewSupportedOrientationsMask &result) {
325
+ auto items = std::vector<std::string>{value};
326
+ for (const auto &item : items) {
327
+ if (item == "portrait") {
328
+ result |= ModalHostViewSupportedOrientations::Portrait;
329
+ continue;
330
+ }
331
+ if (item == "portrait-upside-down") {
332
+ result |= ModalHostViewSupportedOrientations::PortraitUpsideDown;
333
+ continue;
334
+ }
335
+ if (item == "landscape") {
336
+ result |= ModalHostViewSupportedOrientations::Landscape;
337
+ continue;
338
+ }
339
+ if (item == "landscape-left") {
340
+ result |= ModalHostViewSupportedOrientations::LandscapeLeft;
341
+ continue;
342
+ }
343
+ if (item == "landscape-right") {
344
+ result |= ModalHostViewSupportedOrientations::LandscapeRight;
345
+ continue;
346
+ }
347
+ abort();
348
+ }
349
+ }
350
+
351
+ static inline std::string toString(const ModalHostViewSupportedOrientationsMask &value) {
352
+ auto result = std::string{};
353
+ auto separator = std::string{", "};
354
+
355
+ if (value & ModalHostViewSupportedOrientations::Portrait) {
356
+ result += "portrait" + separator;
357
+ }
358
+ if (value & ModalHostViewSupportedOrientations::PortraitUpsideDown) {
359
+ result += "portrait-upside-down" + separator;
360
+ }
361
+ if (value & ModalHostViewSupportedOrientations::Landscape) {
362
+ result += "landscape" + separator;
363
+ }
364
+ if (value & ModalHostViewSupportedOrientations::LandscapeLeft) {
365
+ result += "landscape-left" + separator;
366
+ }
367
+ if (value & ModalHostViewSupportedOrientations::LandscapeRight) {
368
+ result += "landscape-right" + separator;
369
+ }
370
+ if (!result.empty()) {
371
+ result.erase(result.length() - separator.length());
372
+ }
373
+ return result;
374
+ }
375
+
376
+ class JSI_EXPORT ModalHostViewProps final : public ViewProps {
377
+ public:
378
+ ModalHostViewProps() = default;
379
+ ModalHostViewProps(const PropsParserContext& context, const ModalHostViewProps &sourceProps, const RawProps &rawProps);
380
+
381
+ #pragma mark - Props
382
+
383
+ ModalHostViewAnimationType animationType{ModalHostViewAnimationType::None};
384
+ ModalHostViewPresentationStyle presentationStyle{ModalHostViewPresentationStyle::FullScreen};
385
+ bool transparent{false};
386
+ bool statusBarTranslucent{false};
387
+ bool hardwareAccelerated{false};
388
+ bool visible{false};
389
+ bool animated{false};
390
+ ModalHostViewSupportedOrientationsMask supportedOrientations{static_cast<ModalHostViewSupportedOrientationsMask>(ModalHostViewSupportedOrientations::Portrait)};
391
+ int identifier{0};
392
+ };
393
+
394
+ } // namespace react
395
+ } // namespace facebook
@@ -0,0 +1,257 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateComponentHObjCpp.js
8
+ */
9
+
10
+ #import <Foundation/Foundation.h>
11
+ #import <React/RCTDefines.h>
12
+ #import <React/RCTLog.h>
13
+
14
+ NS_ASSUME_NONNULL_BEGIN
15
+
16
+ @protocol RCTSafeAreaViewViewProtocol <NSObject>
17
+
18
+ @end
19
+
20
+ @protocol RCTAndroidHorizontalScrollContentViewViewProtocol <NSObject>
21
+
22
+ @end
23
+
24
+ @protocol RCTAndroidProgressBarViewProtocol <NSObject>
25
+
26
+ @end
27
+
28
+ @protocol RCTAndroidSwipeRefreshLayoutViewProtocol <NSObject>
29
+ - (void)setNativeRefreshing:(BOOL)value;
30
+ @end
31
+
32
+ RCT_EXTERN inline void RCTAndroidSwipeRefreshLayoutHandleCommand(
33
+ id<RCTAndroidSwipeRefreshLayoutViewProtocol> componentView,
34
+ NSString const *commandName,
35
+ NSArray const *args)
36
+ {
37
+ if ([commandName isEqualToString:@"setNativeRefreshing"]) {
38
+ #if RCT_DEBUG
39
+ if ([args count] != 1) {
40
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"AndroidSwipeRefreshLayout", commandName, (int)[args count], 1);
41
+ return;
42
+ }
43
+ #endif
44
+
45
+ NSObject *arg0 = args[0];
46
+ #if RCT_DEBUG
47
+ if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"AndroidSwipeRefreshLayout", commandName, @"1st")) {
48
+ return;
49
+ }
50
+ #endif
51
+ BOOL value = [(NSNumber *)arg0 boolValue];
52
+
53
+ [componentView setNativeRefreshing:value];
54
+ return;
55
+ }
56
+
57
+ #if RCT_DEBUG
58
+ RCTLogError(@"%@ received command %@, which is not a supported command.", @"AndroidSwipeRefreshLayout", commandName);
59
+ #endif
60
+ }
61
+
62
+ @protocol RCTPullToRefreshViewViewProtocol <NSObject>
63
+ - (void)setNativeRefreshing:(BOOL)refreshing;
64
+ @end
65
+
66
+ RCT_EXTERN inline void RCTPullToRefreshViewHandleCommand(
67
+ id<RCTPullToRefreshViewViewProtocol> componentView,
68
+ NSString const *commandName,
69
+ NSArray const *args)
70
+ {
71
+ if ([commandName isEqualToString:@"setNativeRefreshing"]) {
72
+ #if RCT_DEBUG
73
+ if ([args count] != 1) {
74
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"PullToRefreshView", commandName, (int)[args count], 1);
75
+ return;
76
+ }
77
+ #endif
78
+
79
+ NSObject *arg0 = args[0];
80
+ #if RCT_DEBUG
81
+ if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"PullToRefreshView", commandName, @"1st")) {
82
+ return;
83
+ }
84
+ #endif
85
+ BOOL refreshing = [(NSNumber *)arg0 boolValue];
86
+
87
+ [componentView setNativeRefreshing:refreshing];
88
+ return;
89
+ }
90
+
91
+ #if RCT_DEBUG
92
+ RCTLogError(@"%@ received command %@, which is not a supported command.", @"PullToRefreshView", commandName);
93
+ #endif
94
+ }
95
+
96
+ @protocol RCTInputAccessoryViewProtocol <NSObject>
97
+
98
+ @end
99
+
100
+ @protocol RCTAndroidDrawerLayoutViewProtocol <NSObject>
101
+ - (void)openDrawer;
102
+ - (void)closeDrawer;
103
+ @end
104
+
105
+ RCT_EXTERN inline void RCTAndroidDrawerLayoutHandleCommand(
106
+ id<RCTAndroidDrawerLayoutViewProtocol> componentView,
107
+ NSString const *commandName,
108
+ NSArray const *args)
109
+ {
110
+ if ([commandName isEqualToString:@"openDrawer"]) {
111
+ #if RCT_DEBUG
112
+ if ([args count] != 0) {
113
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"AndroidDrawerLayout", commandName, (int)[args count], 0);
114
+ return;
115
+ }
116
+ #endif
117
+
118
+
119
+
120
+ [componentView openDrawer];
121
+ return;
122
+ }
123
+
124
+ if ([commandName isEqualToString:@"closeDrawer"]) {
125
+ #if RCT_DEBUG
126
+ if ([args count] != 0) {
127
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"AndroidDrawerLayout", commandName, (int)[args count], 0);
128
+ return;
129
+ }
130
+ #endif
131
+
132
+
133
+
134
+ [componentView closeDrawer];
135
+ return;
136
+ }
137
+
138
+ #if RCT_DEBUG
139
+ RCTLogError(@"%@ received command %@, which is not a supported command.", @"AndroidDrawerLayout", commandName);
140
+ #endif
141
+ }
142
+
143
+ @protocol RCTActivityIndicatorViewViewProtocol <NSObject>
144
+
145
+ @end
146
+
147
+ @protocol RCTUnimplementedNativeViewViewProtocol <NSObject>
148
+
149
+ @end
150
+
151
+ @protocol RCTSwitchViewProtocol <NSObject>
152
+ - (void)setValue:(BOOL)value;
153
+ @end
154
+
155
+ RCT_EXTERN inline void RCTSwitchHandleCommand(
156
+ id<RCTSwitchViewProtocol> componentView,
157
+ NSString const *commandName,
158
+ NSArray const *args)
159
+ {
160
+ if ([commandName isEqualToString:@"setValue"]) {
161
+ #if RCT_DEBUG
162
+ if ([args count] != 1) {
163
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"Switch", commandName, (int)[args count], 1);
164
+ return;
165
+ }
166
+ #endif
167
+
168
+ NSObject *arg0 = args[0];
169
+ #if RCT_DEBUG
170
+ if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"Switch", commandName, @"1st")) {
171
+ return;
172
+ }
173
+ #endif
174
+ BOOL value = [(NSNumber *)arg0 boolValue];
175
+
176
+ [componentView setValue:value];
177
+ return;
178
+ }
179
+
180
+ #if RCT_DEBUG
181
+ RCTLogError(@"%@ received command %@, which is not a supported command.", @"Switch", commandName);
182
+ #endif
183
+ }
184
+
185
+ @protocol RCTAndroidSwitchViewProtocol <NSObject>
186
+ - (void)setNativeValue:(BOOL)value;
187
+ @end
188
+
189
+ RCT_EXTERN inline void RCTAndroidSwitchHandleCommand(
190
+ id<RCTAndroidSwitchViewProtocol> componentView,
191
+ NSString const *commandName,
192
+ NSArray const *args)
193
+ {
194
+ if ([commandName isEqualToString:@"setNativeValue"]) {
195
+ #if RCT_DEBUG
196
+ if ([args count] != 1) {
197
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"AndroidSwitch", commandName, (int)[args count], 1);
198
+ return;
199
+ }
200
+ #endif
201
+
202
+ NSObject *arg0 = args[0];
203
+ #if RCT_DEBUG
204
+ if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"AndroidSwitch", commandName, @"1st")) {
205
+ return;
206
+ }
207
+ #endif
208
+ BOOL value = [(NSNumber *)arg0 boolValue];
209
+
210
+ [componentView setNativeValue:value];
211
+ return;
212
+ }
213
+
214
+ #if RCT_DEBUG
215
+ RCTLogError(@"%@ received command %@, which is not a supported command.", @"AndroidSwitch", commandName);
216
+ #endif
217
+ }
218
+
219
+ @protocol RCTTraceUpdateOverlayViewProtocol <NSObject>
220
+ - (void)draw:(NSString *)overlays;
221
+ @end
222
+
223
+ RCT_EXTERN inline void RCTTraceUpdateOverlayHandleCommand(
224
+ id<RCTTraceUpdateOverlayViewProtocol> componentView,
225
+ NSString const *commandName,
226
+ NSArray const *args)
227
+ {
228
+ if ([commandName isEqualToString:@"draw"]) {
229
+ #if RCT_DEBUG
230
+ if ([args count] != 1) {
231
+ RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"TraceUpdateOverlay", commandName, (int)[args count], 1);
232
+ return;
233
+ }
234
+ #endif
235
+
236
+ NSObject *arg0 = args[0];
237
+ #if RCT_DEBUG
238
+ if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"TraceUpdateOverlay", commandName, @"1st")) {
239
+ return;
240
+ }
241
+ #endif
242
+ NSString * overlays = (NSString *)arg0;
243
+
244
+ [componentView draw:overlays];
245
+ return;
246
+ }
247
+
248
+ #if RCT_DEBUG
249
+ RCTLogError(@"%@ received command %@, which is not a supported command.", @"TraceUpdateOverlay", commandName);
250
+ #endif
251
+ }
252
+
253
+ @protocol RCTModalHostViewViewProtocol <NSObject>
254
+
255
+ @end
256
+
257
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,26 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateShadowNodeCpp.js
9
+ */
10
+
11
+ #include <react/renderer/components/rncore/ShadowNodes.h>
12
+
13
+ namespace facebook {
14
+ namespace react {
15
+
16
+ extern const char AndroidHorizontalScrollContentViewComponentName[] = "AndroidHorizontalScrollContentView";
17
+ extern const char AndroidSwipeRefreshLayoutComponentName[] = "AndroidSwipeRefreshLayout";
18
+ extern const char PullToRefreshViewComponentName[] = "PullToRefreshView";
19
+ extern const char AndroidDrawerLayoutComponentName[] = "AndroidDrawerLayout";
20
+ extern const char ActivityIndicatorViewComponentName[] = "ActivityIndicatorView";
21
+ extern const char UnimplementedNativeViewComponentName[] = "UnimplementedNativeView";
22
+ extern const char SwitchComponentName[] = "Switch";
23
+ extern const char TraceUpdateOverlayComponentName[] = "TraceUpdateOverlay";
24
+
25
+ } // namespace react
26
+ } // namespace facebook