react-native-windows 0.0.0-canary.95 → 0.0.0-canary.950

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 (2868) hide show
  1. package/.flowconfig +69 -80
  2. package/Chakra/Chakra.vcxitems +0 -5
  3. package/Chakra/Chakra.vcxitems.filters +2 -17
  4. package/Chakra/ChakraHelpers.cpp +3 -269
  5. package/Chakra/ChakraInstanceArgs.h +0 -29
  6. package/Chakra/ChakraPlatform.cpp +1 -1
  7. package/Chakra/ChakraPlatform.h +0 -4
  8. package/Chakra/ChakraTracing.cpp +1 -34
  9. package/Chakra/ChakraUtils.cpp +10 -14
  10. package/Chakra/ChakraUtils.h +2 -2
  11. package/Chakra/ChakraValue.cpp +8 -5
  12. package/Chakra/ChakraValue.h +7 -11
  13. package/Chakra/Utf8DebugExtensions.cpp +0 -5
  14. package/Chakra/Utf8DebugExtensions.h +0 -6
  15. package/Common/Common.vcxproj +15 -27
  16. package/Common/Common.vcxproj.filters +4 -1
  17. package/Common/Utilities.cpp +59 -0
  18. package/Common/unicode.cpp +2 -2
  19. package/Common/utilities.h +11 -0
  20. package/Directory.Build.props +70 -5
  21. package/Directory.Build.targets +26 -73
  22. package/Folly/.clang-format +2 -0
  23. package/Folly/Folly.vcxproj +84 -50
  24. package/Folly/Folly.vcxproj.filters +15 -6
  25. package/Folly/TEMP_UntilFollyUpdate/ConstexprMath.h +970 -0
  26. package/Folly/TEMP_UntilFollyUpdate/dynamic-inl.h +1439 -0
  27. package/Folly/TEMP_UntilFollyUpdate/json.cpp +1114 -0
  28. package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +195 -0
  29. package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +348 -0
  30. package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +182 -0
  31. package/Folly/TEMP_UntilFollyUpdate/portability/Unistd.cpp +33 -0
  32. package/Folly/cgmanifest.json +15 -0
  33. package/Folly/pch.cpp +4 -0
  34. package/Folly/pch.h +18 -0
  35. package/LICENSE +25 -0
  36. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +87 -0
  37. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +59 -11
  38. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +5 -41
  39. package/Libraries/Alert/Alert.d.ts +91 -0
  40. package/Libraries/Alert/Alert.js +31 -32
  41. package/Libraries/Alert/Alert.windows.js +77 -34
  42. package/Libraries/Alert/NativeAlertManager.js +5 -26
  43. package/Libraries/Alert/RCTAlertManager.android.js +2 -4
  44. package/Libraries/Alert/RCTAlertManager.ios.js +2 -3
  45. package/Libraries/Animated/Animated.d.ts +626 -0
  46. package/Libraries/Animated/Animated.js +48 -0
  47. package/Libraries/Animated/AnimatedEvent.js +256 -0
  48. package/Libraries/Animated/AnimatedImplementation.js +754 -0
  49. package/Libraries/Animated/AnimatedMock.js +195 -0
  50. package/Libraries/Animated/AnimatedPlatformConfig.js +13 -0
  51. package/Libraries/Animated/AnimatedWeb.js +26 -0
  52. package/Libraries/Animated/Easing.d.ts +37 -0
  53. package/Libraries/Animated/Easing.js +250 -0
  54. package/Libraries/Animated/NativeAnimatedAllowlist.js +122 -0
  55. package/Libraries/Animated/NativeAnimatedModule.js +13 -0
  56. package/Libraries/Animated/NativeAnimatedTurboModule.js +13 -0
  57. package/Libraries/Animated/SpringConfig.js +98 -0
  58. package/Libraries/Animated/animations/Animation.js +192 -0
  59. package/Libraries/Animated/animations/DecayAnimation.js +122 -0
  60. package/Libraries/Animated/animations/SpringAnimation.js +373 -0
  61. package/Libraries/Animated/animations/TimingAnimation.js +174 -0
  62. package/Libraries/Animated/bezier.js +164 -0
  63. package/Libraries/Animated/components/AnimatedFlatList.js +20 -0
  64. package/Libraries/Animated/components/AnimatedImage.js +22 -0
  65. package/Libraries/Animated/components/AnimatedScrollView.js +137 -0
  66. package/Libraries/Animated/components/AnimatedSectionList.js +22 -0
  67. package/Libraries/Animated/components/AnimatedText.js +22 -0
  68. package/Libraries/Animated/components/AnimatedView.js +20 -0
  69. package/Libraries/Animated/createAnimatedComponent.js +101 -0
  70. package/Libraries/Animated/nodes/AnimatedAddition.js +71 -0
  71. package/Libraries/Animated/nodes/AnimatedColor.js +323 -0
  72. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +80 -0
  73. package/Libraries/Animated/nodes/AnimatedDivision.js +87 -0
  74. package/Libraries/Animated/nodes/AnimatedInterpolation.js +420 -0
  75. package/Libraries/Animated/nodes/AnimatedModulo.js +66 -0
  76. package/Libraries/Animated/nodes/AnimatedMultiplication.js +70 -0
  77. package/Libraries/Animated/nodes/AnimatedNode.js +179 -0
  78. package/Libraries/Animated/nodes/AnimatedObject.js +169 -0
  79. package/Libraries/Animated/nodes/AnimatedProps.js +285 -0
  80. package/Libraries/Animated/nodes/AnimatedStyle.js +255 -0
  81. package/Libraries/Animated/nodes/AnimatedSubtraction.js +71 -0
  82. package/Libraries/Animated/nodes/AnimatedTracking.js +104 -0
  83. package/Libraries/Animated/nodes/AnimatedTransform.js +202 -0
  84. package/Libraries/Animated/nodes/AnimatedValue.js +348 -0
  85. package/Libraries/Animated/nodes/AnimatedValueXY.js +238 -0
  86. package/Libraries/Animated/nodes/AnimatedWithChildren.js +85 -0
  87. package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
  88. package/Libraries/Animated/useAnimatedProps.js +346 -0
  89. package/Libraries/Animated/useAnimatedValue.d.ts +15 -0
  90. package/Libraries/Animated/useAnimatedValue.js +25 -0
  91. package/Libraries/AppState/AppState.d.ts +58 -0
  92. package/Libraries/AppState/AppState.js +91 -144
  93. package/Libraries/AppState/NativeAppState.js +5 -22
  94. package/Libraries/AppTheme/AppTheme.js +90 -103
  95. package/Libraries/AppTheme/AppThemeTypes.d.ts +44 -27
  96. package/Libraries/AppTheme/NativeAppTheme.js +11 -0
  97. package/Libraries/BatchedBridge/BatchedBridge.js +2 -2
  98. package/Libraries/BatchedBridge/MessageQueue.js +137 -125
  99. package/Libraries/BatchedBridge/NativeModules.d.ts +25 -0
  100. package/Libraries/BatchedBridge/NativeModules.js +36 -21
  101. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +1 -1
  102. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +3 -3
  103. package/Libraries/Blob/Blob.js +20 -3
  104. package/Libraries/Blob/BlobManager.js +7 -10
  105. package/Libraries/Blob/BlobRegistry.js +15 -10
  106. package/Libraries/Blob/BlobTypes.js +1 -1
  107. package/Libraries/Blob/File.js +3 -4
  108. package/Libraries/Blob/FileReader.js +48 -16
  109. package/Libraries/Blob/NativeBlobModule.js +5 -18
  110. package/Libraries/Blob/NativeFileReaderModule.js +5 -15
  111. package/Libraries/Blob/URL.js +38 -87
  112. package/Libraries/Blob/URLSearchParams.js +71 -0
  113. package/Libraries/Blob/__mocks__/BlobModule.js +1 -1
  114. package/Libraries/Blob/__mocks__/FileReaderModule.js +1 -1
  115. package/Libraries/BugReporting/BugReporting.js +8 -9
  116. package/Libraries/BugReporting/NativeBugReporting.js +5 -12
  117. package/Libraries/BugReporting/dumpReactTree.js +1 -1
  118. package/Libraries/BugReporting/getReactData.js +17 -8
  119. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +173 -0
  120. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +493 -0
  121. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +427 -85
  122. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +5 -19
  123. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +5 -51
  124. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js +36 -0
  125. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.ios.js +26 -0
  126. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js +36 -0
  127. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +86 -0
  128. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +78 -52
  129. package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +4 -47
  130. package/Libraries/Components/Button.d.ts +42 -0
  131. package/Libraries/Components/Button.js +329 -125
  132. package/Libraries/Components/Button.windows.js +460 -115
  133. package/Libraries/Components/Clipboard/Clipboard.d.ts +28 -0
  134. package/Libraries/Components/Clipboard/Clipboard.js +3 -5
  135. package/Libraries/Components/Clipboard/NativeClipboard.js +5 -14
  136. package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +4 -116
  137. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +44 -35
  138. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +141 -0
  139. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +16 -0
  140. package/Libraries/Components/Flyout/Flyout.d.ts +55 -20
  141. package/Libraries/Components/Flyout/Flyout.js +109 -76
  142. package/Libraries/Components/Flyout/FlyoutNativeComponent.js +50 -0
  143. package/Libraries/Components/Glyph/Glyph.d.ts +29 -13
  144. package/Libraries/Components/Glyph/Glyph.js +44 -56
  145. package/Libraries/Components/Glyph/GlyphNativeComponent.js +31 -0
  146. package/Libraries/Components/Keyboard/Keyboard.d.ts +109 -0
  147. package/Libraries/Components/Keyboard/Keyboard.js +81 -71
  148. package/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +46 -0
  149. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +123 -56
  150. package/Libraries/Components/Keyboard/KeyboardExt.d.ts +8 -6
  151. package/Libraries/Components/Keyboard/KeyboardExt.js +27 -61
  152. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  153. package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts +17 -43
  154. package/Libraries/Components/Keyboard/KeyboardExtProps.js +7 -20
  155. package/Libraries/Components/Keyboard/KeyboardExtProps.js.map +1 -1
  156. package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +5 -13
  157. package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
  158. package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
  159. package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
  160. package/Libraries/Components/Popup/Popup.d.ts +41 -20
  161. package/Libraries/Components/Popup/Popup.js +86 -77
  162. package/Libraries/Components/Popup/PopupNativeComponent.js +48 -0
  163. package/Libraries/Components/Pressable/Pressable.d.ts +167 -0
  164. package/Libraries/Components/Pressable/Pressable.js +369 -0
  165. package/Libraries/Components/Pressable/Pressable.windows.js +441 -0
  166. package/Libraries/Components/Pressable/useAndroidRippleForView.js +109 -0
  167. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +37 -27
  168. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +83 -0
  169. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +20 -0
  170. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +5 -27
  171. package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +4 -77
  172. package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +4 -55
  173. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +87 -0
  174. package/Libraries/Components/RefreshControl/RefreshControl.js +49 -49
  175. package/Libraries/Components/RefreshControl/RefreshControl.windows.js +50 -50
  176. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +6 -8
  177. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +4 -20
  178. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +24 -0
  179. package/Libraries/Components/SafeAreaView/SafeAreaView.js +12 -39
  180. package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +5 -32
  181. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +38 -21
  182. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +13 -20
  183. package/Libraries/Components/ScrollView/ScrollView.d.ts +910 -0
  184. package/Libraries/Components/ScrollView/ScrollView.js +1123 -427
  185. package/Libraries/Components/ScrollView/ScrollView.windows.js +1126 -443
  186. package/Libraries/Components/ScrollView/ScrollViewCommands.js +5 -5
  187. package/Libraries/Components/ScrollView/ScrollViewContext.js +24 -0
  188. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +168 -18
  189. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +180 -0
  190. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +11 -17
  191. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +206 -62
  192. package/Libraries/Components/ScrollView/processDecelerationRate.js +2 -4
  193. package/Libraries/Components/Sound/NativeSoundManager.js +5 -15
  194. package/Libraries/Components/Sound/SoundManager.js +3 -4
  195. package/Libraries/Components/StaticRenderer.js +1 -1
  196. package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +5 -27
  197. package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +5 -35
  198. package/Libraries/Components/StatusBar/StatusBar.d.ts +138 -0
  199. package/Libraries/Components/StatusBar/StatusBar.js +60 -80
  200. package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +5 -56
  201. package/Libraries/Components/Switch/Switch.d.ts +115 -0
  202. package/Libraries/Components/Switch/Switch.js +164 -165
  203. package/Libraries/Components/Switch/Switch.windows.js +261 -0
  204. package/Libraries/Components/Switch/SwitchNativeComponent.js +5 -50
  205. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +237 -56
  206. package/Libraries/Components/TextInput/InputAccessoryView.d.ts +34 -0
  207. package/Libraries/Components/TextInput/InputAccessoryView.js +29 -24
  208. package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +5 -18
  209. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +45 -0
  210. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +43 -0
  211. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +169 -0
  212. package/Libraries/Components/TextInput/TextInput.d.ts +1012 -0
  213. package/Libraries/Components/TextInput/TextInput.flow.js +1115 -0
  214. package/Libraries/Components/TextInput/TextInput.js +1182 -448
  215. package/Libraries/Components/TextInput/TextInput.windows.js +1358 -456
  216. package/Libraries/Components/TextInput/TextInputNativeCommands.js +29 -0
  217. package/Libraries/Components/TextInput/TextInputState.js +143 -37
  218. package/Libraries/Components/TextInput/TextInputState.windows.js +163 -27
  219. package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +802 -0
  220. package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +5 -31
  221. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +11 -10
  222. package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +47 -0
  223. package/Libraries/Components/ToastAndroid/ToastAndroid.js +45 -0
  224. package/Libraries/Components/Touchable/BoundingDimensions.js +13 -6
  225. package/Libraries/Components/Touchable/PooledClass.js +26 -15
  226. package/Libraries/Components/Touchable/Position.js +9 -5
  227. package/Libraries/Components/Touchable/Touchable.d.ts +90 -0
  228. package/Libraries/Components/Touchable/Touchable.js +122 -133
  229. package/Libraries/Components/Touchable/Touchable.windows.js +978 -0
  230. package/Libraries/Components/Touchable/TouchableBounce.js +84 -78
  231. package/Libraries/Components/Touchable/TouchableBounce.windows.js +90 -79
  232. package/Libraries/Components/Touchable/TouchableHighlight.d.ts +62 -0
  233. package/Libraries/Components/Touchable/TouchableHighlight.js +91 -80
  234. package/Libraries/Components/Touchable/TouchableHighlight.windows.js +90 -80
  235. package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +114 -0
  236. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +131 -98
  237. package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +138 -101
  238. package/Libraries/Components/Touchable/TouchableOpacity.d.ts +81 -0
  239. package/Libraries/Components/Touchable/TouchableOpacity.js +115 -88
  240. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +122 -89
  241. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +151 -0
  242. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +143 -125
  243. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +173 -135
  244. package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +4 -19
  245. package/Libraries/Components/UnimplementedViews/UnimplementedView.js +3 -4
  246. package/Libraries/Components/View/ReactNativeStyleAttributes.js +200 -69
  247. package/Libraries/Components/View/ReactNativeViewAttributes.js +7 -3
  248. package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +64 -0
  249. package/Libraries/Components/View/View.d.ts +29 -0
  250. package/Libraries/Components/View/View.js +114 -7
  251. package/Libraries/Components/View/View.windows.js +358 -0
  252. package/Libraries/Components/View/ViewAccessibility.d.ts +445 -0
  253. package/Libraries/Components/View/ViewAccessibility.js +88 -7
  254. package/Libraries/Components/View/ViewAccessibility.windows.js +93 -7
  255. package/Libraries/Components/View/ViewNativeComponent.js +17 -72
  256. package/Libraries/Components/View/ViewPropTypes.d.ts +321 -0
  257. package/Libraries/Components/View/ViewPropTypes.js +218 -66
  258. package/Libraries/Components/View/ViewPropTypes.windows.js +243 -75
  259. package/Libraries/Core/Devtools/getDevServer.js +9 -8
  260. package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
  261. package/Libraries/Core/Devtools/loadBundleFromServer.windows.js +153 -0
  262. package/Libraries/Core/Devtools/openFileInEditor.js +6 -2
  263. package/Libraries/Core/Devtools/openURLInBrowser.js +3 -2
  264. package/Libraries/Core/Devtools/parseErrorStack.js +14 -23
  265. package/Libraries/Core/Devtools/parseHermesStack.js +71 -44
  266. package/Libraries/Core/Devtools/symbolicateStackTrace.js +13 -58
  267. package/Libraries/Core/ExceptionsManager.js +170 -105
  268. package/Libraries/Core/ExtendedError.js +33 -0
  269. package/Libraries/Core/InitializeCore.js +7 -3
  270. package/Libraries/Core/NativeExceptionsManager.js +5 -100
  271. package/Libraries/Core/RawEventEmitter.js +39 -0
  272. package/Libraries/Core/ReactFiberErrorDialog.js +47 -38
  273. package/Libraries/Core/ReactNativeVersion.js +14 -8
  274. package/Libraries/Core/ReactNativeVersionCheck.js +11 -8
  275. package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +5 -21
  276. package/Libraries/Core/Timers/JSTimers.js +103 -135
  277. package/Libraries/Core/Timers/NativeTiming.js +5 -19
  278. package/Libraries/Core/Timers/immediateShim.js +68 -0
  279. package/Libraries/Core/Timers/queueMicrotask.js +41 -0
  280. package/Libraries/Core/__mocks__/ErrorUtils.js +1 -1
  281. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +19 -0
  282. package/Libraries/Core/checkNativeVersion.js +1 -1
  283. package/Libraries/Core/polyfillPromise.js +19 -3
  284. package/Libraries/Core/registerCallableModule.d.ts +16 -0
  285. package/Libraries/Core/registerCallableModule.js +42 -0
  286. package/Libraries/Core/setUpAlert.js +2 -2
  287. package/Libraries/Core/setUpBatchedBridge.js +22 -48
  288. package/Libraries/Core/setUpDeveloperTools.js +59 -59
  289. package/Libraries/Core/setUpErrorHandling.js +21 -19
  290. package/Libraries/Core/setUpGlobals.js +8 -6
  291. package/Libraries/Core/setUpNavigator.js +8 -7
  292. package/Libraries/Core/setUpPerformance.js +31 -0
  293. package/Libraries/Core/setUpReactDevTools.js +194 -12
  294. package/Libraries/Core/setUpReactRefresh.js +4 -6
  295. package/Libraries/Core/setUpRegeneratorRuntime.js +28 -9
  296. package/Libraries/Core/setUpSegmentFetcher.js +9 -47
  297. package/Libraries/Core/setUpTimers.js +99 -8
  298. package/Libraries/Core/setUpXHR.js +5 -5
  299. package/Libraries/Debugging/DebuggingOverlay.js +110 -0
  300. package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +13 -0
  301. package/Libraries/Debugging/DebuggingOverlayRegistry.js +513 -0
  302. package/Libraries/Debugging/useSubscribeToDebuggingOverlayRegistry.js +32 -0
  303. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +63 -0
  304. package/Libraries/EventEmitter/NativeEventEmitter.js +92 -40
  305. package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +29 -0
  306. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +27 -68
  307. package/Libraries/EventEmitter/RCTEventEmitter.js +3 -3
  308. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +32 -0
  309. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +2 -4
  310. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +34 -11
  311. package/Libraries/Events/CustomEvent.js +32 -0
  312. package/Libraries/Events/EventPolyfill.js +239 -0
  313. package/Libraries/Image/AssetRegistry.js +2 -27
  314. package/Libraries/Image/AssetSourceResolver.js +82 -40
  315. package/Libraries/Image/AssetSourceResolver.windows.js +235 -0
  316. package/Libraries/Image/AssetUtils.js +47 -0
  317. package/Libraries/Image/Image.android.js +205 -276
  318. package/Libraries/Image/Image.d.ts +373 -0
  319. package/Libraries/Image/Image.ios.js +145 -103
  320. package/Libraries/Image/Image.windows.js +192 -106
  321. package/Libraries/Image/ImageAnalyticsTagContext.js +22 -0
  322. package/Libraries/Image/ImageBackground.js +30 -14
  323. package/Libraries/Image/ImageInjection.js +87 -0
  324. package/Libraries/Image/ImageProps.js +157 -35
  325. package/Libraries/Image/ImageResizeMode.d.ts +56 -0
  326. package/Libraries/Image/ImageResizeMode.js +5 -2
  327. package/Libraries/Image/ImageSource.d.ts +74 -0
  328. package/Libraries/Image/ImageSource.js +73 -23
  329. package/Libraries/Image/ImageSourceUtils.js +80 -0
  330. package/Libraries/Image/ImageTypes.flow.js +78 -0
  331. package/Libraries/Image/ImageUtils.js +25 -0
  332. package/Libraries/Image/ImageViewNativeComponent.js +146 -26
  333. package/Libraries/Image/NativeImageEditor.js +13 -0
  334. package/Libraries/Image/NativeImageLoaderAndroid.js +5 -32
  335. package/Libraries/Image/NativeImageLoaderIOS.js +5 -24
  336. package/Libraries/Image/NativeImageStoreAndroid.js +13 -0
  337. package/Libraries/Image/NativeImageStoreIOS.js +13 -0
  338. package/Libraries/Image/RelativeImageStub.js +2 -2
  339. package/Libraries/Image/TextInlineImageNativeComponent.js +38 -7
  340. package/Libraries/Image/assetPaths.js +36 -0
  341. package/Libraries/Image/nativeImageSource.js +4 -6
  342. package/Libraries/Image/resolveAssetSource.js +65 -31
  343. package/Libraries/Image/resolveAssetSource.windows.js +148 -0
  344. package/Libraries/Inspector/BorderBox.js +27 -15
  345. package/Libraries/Inspector/BoxInspector.js +62 -45
  346. package/Libraries/Inspector/ElementBox.js +65 -53
  347. package/Libraries/Inspector/ElementProperties.js +35 -62
  348. package/Libraries/Inspector/Inspector.js +153 -257
  349. package/Libraries/Inspector/InspectorOverlay.js +28 -50
  350. package/Libraries/Inspector/InspectorPanel.js +31 -37
  351. package/Libraries/Inspector/NetworkOverlay.js +28 -18
  352. package/Libraries/Inspector/PerformanceOverlay.js +5 -5
  353. package/Libraries/Inspector/ReactDevToolsOverlay.js +165 -0
  354. package/Libraries/Inspector/StyleInspector.js +38 -32
  355. package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +81 -0
  356. package/Libraries/Inspector/resolveBoxStyle.js +1 -1
  357. package/Libraries/Interaction/FrameRateLogger.js +10 -22
  358. package/Libraries/Interaction/InteractionManager.d.ts +74 -0
  359. package/Libraries/Interaction/InteractionManager.js +35 -41
  360. package/Libraries/Interaction/InteractionManagerStub.js +176 -0
  361. package/Libraries/Interaction/JSEventLoopWatchdog.js +10 -15
  362. package/Libraries/Interaction/NativeFrameRateLogger.js +5 -16
  363. package/Libraries/Interaction/PanResponder.d.ts +202 -0
  364. package/Libraries/Interaction/PanResponder.js +26 -28
  365. package/Libraries/Interaction/TaskQueue.js +15 -16
  366. package/Libraries/Interaction/TouchHistoryMath.js +32 -29
  367. package/Libraries/JSInspector/InspectorAgent.js +4 -4
  368. package/Libraries/JSInspector/JSInspector.js +2 -5
  369. package/Libraries/JSInspector/NetworkAgent.js +12 -17
  370. package/Libraries/LayoutAnimation/LayoutAnimation.d.ts +84 -0
  371. package/Libraries/LayoutAnimation/LayoutAnimation.js +88 -39
  372. package/Libraries/Linking/Linking.d.ts +61 -0
  373. package/Libraries/Linking/Linking.js +50 -41
  374. package/Libraries/Linking/NativeIntentAndroid.js +13 -0
  375. package/Libraries/Linking/NativeLinkingManager.js +13 -0
  376. package/Libraries/Lists/FillRateHelper.js +6 -232
  377. package/Libraries/Lists/FlatList.d.ts +244 -0
  378. package/Libraries/Lists/FlatList.js +195 -128
  379. package/Libraries/Lists/SectionList.d.ts +267 -0
  380. package/Libraries/Lists/SectionList.js +38 -33
  381. package/Libraries/Lists/SectionListModern.js +249 -0
  382. package/Libraries/Lists/ViewabilityHelper.js +10 -321
  383. package/Libraries/Lists/VirtualizeUtils.js +6 -235
  384. package/Libraries/Lists/VirtualizedList.js +10 -2133
  385. package/Libraries/Lists/VirtualizedListContext.js +18 -0
  386. package/Libraries/Lists/VirtualizedSectionList.js +9 -565
  387. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +6 -4
  388. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +12 -14
  389. package/Libraries/LogBox/Data/LogBoxData.js +107 -75
  390. package/Libraries/LogBox/Data/LogBoxLog.js +128 -12
  391. package/Libraries/LogBox/Data/LogBoxSymbolication.js +10 -9
  392. package/Libraries/LogBox/Data/parseLogBoxLog.js +309 -63
  393. package/Libraries/LogBox/LogBox.d.ts +28 -0
  394. package/Libraries/LogBox/LogBox.js +197 -97
  395. package/Libraries/LogBox/LogBoxInspectorContainer.js +7 -7
  396. package/Libraries/LogBox/LogBoxNotificationContainer.js +11 -8
  397. package/Libraries/LogBox/UI/AnsiHighlight.js +43 -25
  398. package/Libraries/LogBox/UI/LogBoxButton.js +6 -7
  399. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  400. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  401. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  402. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  403. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  404. package/Libraries/LogBox/UI/LogBoxInspector.js +13 -76
  405. package/Libraries/LogBox/UI/LogBoxInspectorBody.js +87 -0
  406. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +37 -14
  407. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +172 -0
  408. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +9 -53
  409. package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +58 -0
  410. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +19 -79
  411. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +112 -0
  412. package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +76 -0
  413. package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +6 -7
  414. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +16 -14
  415. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.windows.js +196 -0
  416. package/Libraries/LogBox/UI/LogBoxInspectorSection.js +3 -5
  417. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +6 -7
  418. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -10
  419. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.windows.js +118 -0
  420. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +19 -11
  421. package/Libraries/LogBox/UI/LogBoxMessage.js +100 -19
  422. package/Libraries/LogBox/UI/LogBoxNotification.js +20 -156
  423. package/Libraries/LogBox/UI/LogBoxNotificationCountBadge.js +63 -0
  424. package/Libraries/LogBox/UI/LogBoxNotificationDismissButton.js +67 -0
  425. package/Libraries/LogBox/UI/LogBoxNotificationMessage.js +57 -0
  426. package/Libraries/LogBox/UI/LogBoxStyle.js +1 -3
  427. package/Libraries/Modal/Modal.d.ts +116 -0
  428. package/Libraries/Modal/Modal.js +153 -91
  429. package/Libraries/Modal/Modal.windows.js +375 -0
  430. package/Libraries/Modal/ModalInjection.js +15 -0
  431. package/Libraries/Modal/NativeModalManager.js +5 -14
  432. package/Libraries/Modal/RCTModalHostViewNativeComponent.js +4 -126
  433. package/Libraries/NativeComponent/BaseViewConfig.android.js +421 -0
  434. package/Libraries/NativeComponent/BaseViewConfig.ios.js +421 -0
  435. package/Libraries/NativeComponent/BaseViewConfig.windows.js +465 -0
  436. package/Libraries/NativeComponent/NativeComponentRegistry.js +164 -0
  437. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +30 -0
  438. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +25 -0
  439. package/Libraries/NativeComponent/StaticViewConfigValidator.js +144 -0
  440. package/Libraries/NativeComponent/ViewConfig.js +52 -0
  441. package/Libraries/NativeComponent/ViewConfigIgnore.js +51 -0
  442. package/Libraries/NativeModules/specs/NativeDevMenu.js +5 -16
  443. package/Libraries/NativeModules/specs/NativeDevSettings.js +5 -22
  444. package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +5 -12
  445. package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +5 -41
  446. package/Libraries/NativeModules/specs/NativeDialogManagerWindows.js +11 -0
  447. package/Libraries/NativeModules/specs/NativeLogBox.js +5 -13
  448. package/Libraries/NativeModules/specs/NativeRedBox.js +5 -13
  449. package/Libraries/NativeModules/specs/NativeSourceCode.js +5 -14
  450. package/Libraries/Network/FormData.js +21 -5
  451. package/Libraries/Network/NativeNetworkingAndroid.js +5 -30
  452. package/Libraries/Network/NativeNetworkingIOS.js +5 -30
  453. package/Libraries/Network/RCTNetworking.android.js +32 -20
  454. package/Libraries/Network/RCTNetworking.ios.js +22 -18
  455. package/Libraries/Network/RCTNetworking.windows.js +67 -1
  456. package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
  457. package/Libraries/Network/XHRInterceptor.js +66 -18
  458. package/Libraries/Network/XMLHttpRequest.js +146 -45
  459. package/Libraries/Network/convertRequestBody.js +4 -4
  460. package/Libraries/Network/fetch.js +2 -1
  461. package/Libraries/NewAppScreen/components/Colors.js +2 -3
  462. package/Libraries/NewAppScreen/components/DebugInstructions.js +9 -6
  463. package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +7 -5
  464. package/Libraries/NewAppScreen/components/Header.js +38 -16
  465. package/Libraries/NewAppScreen/components/HermesBadge.js +53 -0
  466. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +57 -32
  467. package/Libraries/NewAppScreen/components/ReloadInstructions.js +5 -2
  468. package/Libraries/NewAppScreen/components/ReloadInstructions.windows.js +4 -2
  469. package/Libraries/NewAppScreen/components/logo.png +0 -0
  470. package/Libraries/NewAppScreen/index.js +12 -6
  471. package/Libraries/Performance/Systrace.d.ts +66 -0
  472. package/Libraries/Performance/Systrace.js +116 -171
  473. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +5 -52
  474. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +163 -0
  475. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +64 -27
  476. package/Libraries/Pressability/HoverState.js +8 -4
  477. package/Libraries/Pressability/Pressability.js +315 -198
  478. package/Libraries/Pressability/Pressability.windows.js +433 -213
  479. package/Libraries/Pressability/PressabilityDebug.js +36 -26
  480. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +49 -0
  481. package/Libraries/Pressability/PressabilityTypes.js +18 -0
  482. package/Libraries/Pressability/usePressability.js +60 -0
  483. package/Libraries/Promise.js +5 -35
  484. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +5 -66
  485. package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +295 -0
  486. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +134 -83
  487. package/Libraries/ReactNative/AppContainer-dev.js +208 -0
  488. package/Libraries/ReactNative/AppContainer-prod.js +50 -0
  489. package/Libraries/ReactNative/AppContainer.js +13 -140
  490. package/Libraries/ReactNative/AppRegistry.d.ts +121 -0
  491. package/Libraries/ReactNative/AppRegistry.js +127 -78
  492. package/Libraries/ReactNative/BridgelessUIManager.js +419 -0
  493. package/Libraries/ReactNative/DisplayMode.js +32 -0
  494. package/Libraries/ReactNative/FabricUIManager.js +116 -28
  495. package/Libraries/ReactNative/HeadlessJsTaskError.js +1 -3
  496. package/Libraries/ReactNative/I18nManager.d.ts +25 -0
  497. package/Libraries/ReactNative/I18nManager.js +17 -12
  498. package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +5 -13
  499. package/Libraries/ReactNative/NativeI18nManager.js +5 -18
  500. package/Libraries/ReactNative/NativeUIManager.js +5 -114
  501. package/Libraries/ReactNative/PaperUIManager.js +79 -52
  502. package/Libraries/ReactNative/PaperUIManager.windows.js +210 -0
  503. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +150 -0
  504. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +100 -0
  505. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +38 -0
  506. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
  507. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +33 -0
  508. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +31 -0
  509. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  510. package/Libraries/ReactNative/RendererImplementation.js +164 -0
  511. package/Libraries/ReactNative/RendererProxy.d.ts +20 -0
  512. package/Libraries/ReactNative/RendererProxy.js +26 -0
  513. package/Libraries/ReactNative/RootTag.d.ts +13 -0
  514. package/Libraries/ReactNative/RootTag.js +27 -0
  515. package/Libraries/ReactNative/UIManager.d.ts +113 -0
  516. package/Libraries/ReactNative/UIManager.js +178 -24
  517. package/Libraries/ReactNative/UIManagerProperties.js +6 -9
  518. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +33 -0
  519. package/Libraries/ReactNative/getNativeComponentAttributes.js +51 -25
  520. package/Libraries/ReactNative/renderApplication.js +72 -23
  521. package/Libraries/ReactNative/requireNativeComponent.d.ts +23 -0
  522. package/Libraries/ReactNative/requireNativeComponent.js +9 -6
  523. package/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js +1 -1
  524. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +68 -13
  525. package/Libraries/Renderer/implementations/ReactFabric-dev.js +16251 -24385
  526. package/Libraries/Renderer/implementations/ReactFabric-prod.js +8646 -6009
  527. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +9479 -6447
  528. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16547 -24170
  529. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +8781 -6150
  530. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +9542 -6497
  531. package/Libraries/Renderer/shims/ReactFabric.js +12 -7
  532. package/Libraries/Renderer/shims/ReactFeatureFlags.js +5 -4
  533. package/Libraries/Renderer/shims/ReactNative.js +6 -5
  534. package/Libraries/Renderer/shims/ReactNativeTypes.js +219 -154
  535. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +27 -37
  536. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +8 -7
  537. package/Libraries/Settings/NativeSettingsManager.js +5 -18
  538. package/Libraries/Settings/Settings.d.ts +18 -0
  539. package/Libraries/Settings/Settings.ios.js +7 -7
  540. package/Libraries/Settings/Settings.js +33 -0
  541. package/Libraries/Share/NativeShareModule.js +5 -16
  542. package/Libraries/Share/Share.d.ts +80 -0
  543. package/Libraries/Share/Share.js +39 -26
  544. package/Libraries/StyleSheet/EdgeInsetsPropType.js +7 -7
  545. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +40 -0
  546. package/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +18 -0
  547. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +113 -0
  548. package/Libraries/StyleSheet/PlatformColorValueTypes.windows.js +42 -0
  549. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +25 -0
  550. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +29 -0
  551. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +22 -0
  552. package/Libraries/StyleSheet/PointPropType.js +1 -1
  553. package/Libraries/StyleSheet/Rect.js +26 -0
  554. package/Libraries/StyleSheet/StyleSheet.d.ts +150 -0
  555. package/Libraries/StyleSheet/StyleSheet.js +50 -58
  556. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +573 -0
  557. package/Libraries/StyleSheet/StyleSheetTypes.js +460 -129
  558. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +12 -35
  559. package/Libraries/StyleSheet/flattenStyle.js +14 -9
  560. package/Libraries/StyleSheet/normalizeColor.js +15 -354
  561. package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
  562. package/Libraries/StyleSheet/private/_TransformStyle.js +69 -0
  563. package/Libraries/StyleSheet/processAspectRatio.js +63 -0
  564. package/Libraries/StyleSheet/processBackgroundImage.js +361 -0
  565. package/Libraries/StyleSheet/processBoxShadow.js +209 -0
  566. package/Libraries/StyleSheet/processColor.d.ts +16 -0
  567. package/Libraries/StyleSheet/processColor.js +27 -9
  568. package/Libraries/StyleSheet/processColorArray.js +20 -4
  569. package/Libraries/StyleSheet/processFilter.js +321 -0
  570. package/Libraries/StyleSheet/processFontVariant.js +30 -0
  571. package/Libraries/StyleSheet/processTransform.js +131 -117
  572. package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
  573. package/Libraries/StyleSheet/setNormalizedColorAlpha.js +1 -1
  574. package/Libraries/StyleSheet/splitLayoutProps.js +57 -49
  575. package/Libraries/Text/Text.d.ts +242 -0
  576. package/Libraries/Text/Text.js +505 -264
  577. package/Libraries/Text/Text.windows.js +599 -0
  578. package/Libraries/Text/TextAncestor.js +7 -2
  579. package/Libraries/Text/TextNativeComponent.js +82 -0
  580. package/Libraries/Text/TextProps.js +108 -30
  581. package/Libraries/Text/TextProps.windows.js +278 -0
  582. package/Libraries/TurboModule/RCTExport.d.ts +12 -0
  583. package/Libraries/TurboModule/RCTExport.js +4 -3
  584. package/Libraries/TurboModule/TurboModuleRegistry.d.ts +13 -0
  585. package/Libraries/TurboModule/TurboModuleRegistry.js +24 -16
  586. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +5 -28
  587. package/Libraries/Types/CodegenTypes.js +9 -2
  588. package/Libraries/Types/CoreEventTypes.d.ts +259 -0
  589. package/Libraries/Types/CoreEventTypes.js +145 -30
  590. package/Libraries/Types/CoreEventTypes.windows.js +340 -0
  591. package/Libraries/Types/ReactDevToolsTypes.js +58 -0
  592. package/Libraries/Types/RootTagTypes.js +11 -0
  593. package/Libraries/Types/UIManagerJSInterface.js +16 -0
  594. package/Libraries/UTFSequence.js +6 -4
  595. package/Libraries/Utilities/Appearance.d.ts +53 -0
  596. package/Libraries/Utilities/Appearance.js +116 -70
  597. package/Libraries/Utilities/BackHandler.android.js +17 -37
  598. package/Libraries/Utilities/BackHandler.d.ts +34 -0
  599. package/Libraries/Utilities/BackHandler.ios.js +12 -102
  600. package/Libraries/Utilities/BackHandler.windows.js +17 -37
  601. package/Libraries/Utilities/DebugEnvironment.js +3 -8
  602. package/Libraries/Utilities/DevLoadingView.js +64 -0
  603. package/Libraries/Utilities/DevSettings.d.ts +32 -0
  604. package/Libraries/Utilities/DevSettings.js +55 -48
  605. package/Libraries/Utilities/DeviceInfo.js +1 -3
  606. package/Libraries/Utilities/Dimensions.d.ts +79 -0
  607. package/Libraries/Utilities/Dimensions.js +30 -51
  608. package/Libraries/Utilities/FeatureDetection.js +31 -0
  609. package/Libraries/Utilities/GlobalPerformanceLogger.js +4 -5
  610. package/Libraries/Utilities/HMRClient.js +115 -58
  611. package/Libraries/Utilities/HMRClientProdShim.js +2 -1
  612. package/Libraries/Utilities/IPerformanceLogger.d.ts +48 -0
  613. package/Libraries/Utilities/IPerformanceLogger.js +49 -0
  614. package/Libraries/Utilities/NativeAppearance.js +5 -28
  615. package/Libraries/Utilities/NativeDevLoadingView.js +5 -17
  616. package/Libraries/Utilities/NativeDeviceInfo.js +4 -40
  617. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +5 -30
  618. package/Libraries/Utilities/NativePlatformConstantsIOS.js +5 -26
  619. package/Libraries/Utilities/NativePlatformConstantsWin.js +4 -21
  620. package/Libraries/Utilities/PerformanceLoggerContext.js +17 -10
  621. package/Libraries/Utilities/PixelRatio.d.ts +64 -0
  622. package/Libraries/Utilities/PixelRatio.js +6 -6
  623. package/Libraries/Utilities/Platform.android.js +38 -17
  624. package/Libraries/Utilities/Platform.d.ts +106 -0
  625. package/Libraries/Utilities/Platform.flow.js +91 -0
  626. package/Libraries/Utilities/Platform.flow.windows.js +121 -0
  627. package/Libraries/Utilities/Platform.ios.js +39 -19
  628. package/Libraries/Utilities/Platform.windows.js +40 -15
  629. package/Libraries/Utilities/PolyfillFunctions.js +6 -6
  630. package/Libraries/Utilities/RCTLog.js +7 -6
  631. package/Libraries/Utilities/ReactNativeTestTools.js +49 -37
  632. package/Libraries/Utilities/SceneTracker.js +6 -5
  633. package/Libraries/Utilities/__mocks__/BackHandler.js +7 -12
  634. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +1 -1
  635. package/Libraries/Utilities/__mocks__/PixelRatio.js +2 -2
  636. package/Libraries/Utilities/binaryToBase64.js +6 -4
  637. package/Libraries/Utilities/codegenNativeCommands.js +6 -6
  638. package/Libraries/Utilities/codegenNativeComponent.js +25 -15
  639. package/Libraries/Utilities/createPerformanceLogger.js +260 -243
  640. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +12 -6
  641. package/Libraries/Utilities/defineLazyObjectProperty.js +3 -3
  642. package/Libraries/Utilities/differ/deepDiffer.js +3 -3
  643. package/Libraries/Utilities/differ/insetsDiffer.js +2 -2
  644. package/Libraries/Utilities/differ/matricesDiffer.js +7 -2
  645. package/Libraries/Utilities/differ/pointsDiffer.js +2 -2
  646. package/Libraries/Utilities/differ/sizesDiffer.js +11 -5
  647. package/Libraries/Utilities/dismissKeyboard.js +2 -2
  648. package/Libraries/Utilities/infoLog.js +3 -2
  649. package/Libraries/Utilities/logError.js +2 -2
  650. package/Libraries/Utilities/mapWithSeparator.js +1 -1
  651. package/Libraries/Utilities/stringifySafe.js +102 -31
  652. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  653. package/Libraries/Utilities/useColorScheme.js +10 -16
  654. package/Libraries/Utilities/useMergeRefs.js +59 -0
  655. package/Libraries/Utilities/useRefEffect.js +45 -0
  656. package/Libraries/Utilities/useWindowDimensions.js +27 -13
  657. package/Libraries/Utilities/warnOnce.js +3 -5
  658. package/Libraries/Vibration/NativeVibration.js +5 -17
  659. package/Libraries/Vibration/Vibration.d.ts +43 -0
  660. package/Libraries/Vibration/Vibration.js +11 -10
  661. package/Libraries/WebSocket/NativeWebSocketModule.js +5 -27
  662. package/Libraries/WebSocket/WebSocket.js +47 -28
  663. package/Libraries/WebSocket/WebSocketEvent.js +5 -2
  664. package/Libraries/WebSocket/WebSocketInterceptor.js +46 -27
  665. package/Libraries/WebSocket/__mocks__/event-target-shim.js +1 -1
  666. package/Libraries/YellowBox/YellowBoxDeprecated.d.ts +19 -0
  667. package/Libraries/YellowBox/YellowBoxDeprecated.js +75 -0
  668. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +6 -26
  669. package/Libraries/__tests__/ViewWindows-test.js +16 -0
  670. package/Libraries/platform-types.d.ts +19 -0
  671. package/Libraries/promiseRejectionTrackingOptions.js +72 -0
  672. package/Libraries/vendor/core/ErrorUtils.d.ts +15 -0
  673. package/Libraries/vendor/core/ErrorUtils.js +2 -2
  674. package/Libraries/vendor/emitter/EventEmitter.d.ts +164 -0
  675. package/Libraries/vendor/emitter/EventEmitter.js +123 -193
  676. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +81 -0
  677. package/Microsoft.ReactNative/ABIViewManager.cpp +119 -81
  678. package/Microsoft.ReactNative/ABIViewManager.h +42 -15
  679. package/Microsoft.ReactNative/AsynchronousEventBeat.cpp +50 -0
  680. package/Microsoft.ReactNative/AsynchronousEventBeat.h +23 -0
  681. package/Microsoft.ReactNative/Base/CoreUIManagers.cpp +55 -0
  682. package/Microsoft.ReactNative/Base/CxxReactIncludes.h +4 -6
  683. package/Microsoft.ReactNative/Base/FollyIncludes.h +2 -2
  684. package/Microsoft.ReactNative/ComponentView.idl +127 -0
  685. package/Microsoft.ReactNative/Composition.Input.idl +120 -0
  686. package/Microsoft.ReactNative/CompositionComponentView.idl +171 -0
  687. package/Microsoft.ReactNative/CompositionContext.idl +54 -0
  688. package/Microsoft.ReactNative/CompositionHwndHost.idl +39 -0
  689. package/Microsoft.ReactNative/CompositionSwitcher.idl +175 -0
  690. package/Microsoft.ReactNative/CompositionUIService.idl +30 -0
  691. package/Microsoft.ReactNative/CxxReactUWP/JSBigString.cpp +52 -0
  692. package/Microsoft.ReactNative/DesktopWindowMessage.idl +15 -0
  693. package/Microsoft.ReactNative/DevMenuControl.cpp +14 -0
  694. package/Microsoft.ReactNative/DevMenuControl.h +20 -0
  695. package/Microsoft.ReactNative/DevMenuControl.idl +28 -0
  696. package/Microsoft.ReactNative/DevMenuControl.xaml +139 -0
  697. package/Microsoft.ReactNative/DocString.h +13 -0
  698. package/Microsoft.ReactNative/DocString.idl +21 -0
  699. package/Microsoft.ReactNative/DynamicReader.cpp +8 -2
  700. package/Microsoft.ReactNative/FBReactNativeSpec/FBReactNativeSpecJSI.h +5 -0
  701. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +192 -0
  702. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.h +80 -0
  703. package/Microsoft.ReactNative/Fabric/AbiEventEmitter.cpp +21 -0
  704. package/Microsoft.ReactNative/Fabric/AbiEventEmitter.h +23 -0
  705. package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +97 -0
  706. package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.h +53 -0
  707. package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +97 -0
  708. package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +86 -0
  709. package/Microsoft.ReactNative/Fabric/AbiState.cpp +29 -0
  710. package/Microsoft.ReactNative/Fabric/AbiState.h +32 -0
  711. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +223 -0
  712. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +244 -0
  713. package/Microsoft.ReactNative/Fabric/AbiViewProps.h +126 -0
  714. package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.cpp +92 -0
  715. package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.h +87 -0
  716. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +677 -0
  717. package/Microsoft.ReactNative/Fabric/ComponentView.h +323 -0
  718. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +136 -0
  719. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +61 -0
  720. package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +943 -0
  721. package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +80 -0
  722. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +126 -0
  723. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.h +37 -0
  724. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +692 -0
  725. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +245 -0
  726. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +2084 -0
  727. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +67 -0
  728. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +79 -0
  729. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +1137 -0
  730. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +109 -0
  731. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +1457 -0
  732. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +182 -0
  733. package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.cpp +137 -0
  734. package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +81 -0
  735. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +162 -0
  736. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.h +48 -0
  737. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +454 -0
  738. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +83 -0
  739. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.cpp +115 -0
  740. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.h +41 -0
  741. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +298 -0
  742. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.h +59 -0
  743. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +54 -0
  744. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +29 -0
  745. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +27 -0
  746. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +1434 -0
  747. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +237 -0
  748. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +267 -0
  749. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +76 -0
  750. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +115 -0
  751. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +38 -0
  752. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +168 -0
  753. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +100 -0
  754. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +427 -0
  755. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +103 -0
  756. package/Microsoft.ReactNative/Fabric/Composition/ImageResponseImage.h +17 -0
  757. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +340 -0
  758. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +13 -0
  759. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +312 -0
  760. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +69 -0
  761. package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +78 -0
  762. package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
  763. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +288 -0
  764. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +113 -0
  765. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +1011 -0
  766. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +213 -0
  767. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +352 -0
  768. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +99 -0
  769. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +1418 -0
  770. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +162 -0
  771. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +356 -0
  772. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +78 -0
  773. package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +178 -0
  774. package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.h +25 -0
  775. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +163 -0
  776. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1669 -0
  777. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +148 -0
  778. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.cpp +96 -0
  779. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h +59 -0
  780. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.cpp +65 -0
  781. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.h +126 -0
  782. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +231 -0
  783. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +86 -0
  784. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +597 -0
  785. package/Microsoft.ReactNative/Fabric/Composition/Theme.h +82 -0
  786. package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +81 -0
  787. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +342 -0
  788. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.h +66 -0
  789. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +271 -0
  790. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +47 -0
  791. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +123 -0
  792. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +40 -0
  793. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +301 -0
  794. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.h +115 -0
  795. package/Microsoft.ReactNative/Fabric/DWriteHelpers.cpp +19 -0
  796. package/Microsoft.ReactNative/Fabric/DWriteHelpers.h +13 -0
  797. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +513 -0
  798. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +107 -0
  799. package/Microsoft.ReactNative/Fabric/IComponentViewRegistry.h +35 -0
  800. package/Microsoft.ReactNative/Fabric/ImageManager.cpp +35 -0
  801. package/Microsoft.ReactNative/Fabric/ImageRequest.cpp +36 -0
  802. package/Microsoft.ReactNative/Fabric/ImageRequestParams.cpp +26 -0
  803. package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +43 -0
  804. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +104 -0
  805. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.h +48 -0
  806. package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +320 -0
  807. package/Microsoft.ReactNative/Fabric/WindowsImageManager.h +48 -0
  808. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformTouch.h +10 -0
  809. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +67 -0
  810. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +43 -0
  811. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +99 -0
  812. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +37 -0
  813. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +23 -0
  814. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/KeyEvent.h +113 -0
  815. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/WindowsViewEvents.h +73 -0
  816. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Float.h +20 -0
  817. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +116 -0
  818. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +37 -0
  819. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +145 -0
  820. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.h +12 -0
  821. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +513 -0
  822. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +117 -0
  823. package/Microsoft.ReactNative/FocusManager.idl +22 -0
  824. package/Microsoft.ReactNative/GlyphViewManager.cpp +167 -0
  825. package/Microsoft.ReactNative/GlyphViewManager.h +24 -0
  826. package/Microsoft.ReactNative/HttpSettings.idl +19 -0
  827. package/Microsoft.ReactNative/IJSValueReader.idl +69 -5
  828. package/Microsoft.ReactNative/IJSValueWriter.idl +49 -5
  829. package/Microsoft.ReactNative/INativeUIManager.h +75 -0
  830. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +78 -0
  831. package/Microsoft.ReactNative/IReactContext.cpp +98 -1
  832. package/Microsoft.ReactNative/IReactContext.h +36 -2
  833. package/Microsoft.ReactNative/IReactContext.idl +188 -20
  834. package/Microsoft.ReactNative/IReactDispatcher.cpp +79 -4
  835. package/Microsoft.ReactNative/IReactDispatcher.h +35 -3
  836. package/Microsoft.ReactNative/IReactDispatcher.idl +43 -9
  837. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +62 -0
  838. package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
  839. package/Microsoft.ReactNative/IReactModuleBuilder.idl +40 -11
  840. package/Microsoft.ReactNative/IReactNonAbiValue.idl +9 -6
  841. package/Microsoft.ReactNative/IReactNotificationService.cpp +220 -65
  842. package/Microsoft.ReactNative/IReactNotificationService.h +47 -26
  843. package/Microsoft.ReactNative/IReactNotificationService.idl +59 -35
  844. package/Microsoft.ReactNative/IReactPackageBuilder.idl +23 -7
  845. package/Microsoft.ReactNative/IReactPackageBuilderFabric.idl +28 -0
  846. package/Microsoft.ReactNative/IReactPackageProvider.idl +9 -3
  847. package/Microsoft.ReactNative/IReactPropertyBag.cpp +10 -1
  848. package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
  849. package/Microsoft.ReactNative/IReactPropertyBag.idl +49 -31
  850. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +153 -0
  851. package/Microsoft.ReactNative/IViewManager.idl +75 -32
  852. package/Microsoft.ReactNative/IViewManagerCore.idl +45 -0
  853. package/Microsoft.ReactNative/JSDispatcherWriter.cpp +146 -0
  854. package/Microsoft.ReactNative/JSDispatcherWriter.h +47 -0
  855. package/Microsoft.ReactNative/JsiApi.cpp +1144 -0
  856. package/Microsoft.ReactNative/JsiApi.h +204 -0
  857. package/Microsoft.ReactNative/JsiApi.idl +345 -0
  858. package/Microsoft.ReactNative/JsiReader.cpp +48 -21
  859. package/Microsoft.ReactNative/JsiReader.h +23 -5
  860. package/Microsoft.ReactNative/JsiWriter.cpp +56 -24
  861. package/Microsoft.ReactNative/JsiWriter.h +22 -5
  862. package/Microsoft.ReactNative/LayoutService.cpp +51 -0
  863. package/Microsoft.ReactNative/LayoutService.h +32 -0
  864. package/Microsoft.ReactNative/LayoutService.idl +41 -0
  865. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +363 -381
  866. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +383 -375
  867. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +102 -0
  868. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +48 -0
  869. package/Microsoft.ReactNative/Modules/AlertModule.cpp +225 -35
  870. package/Microsoft.ReactNative/Modules/AlertModule.h +32 -21
  871. package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.cpp +52 -0
  872. package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.h +20 -0
  873. package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.cpp +54 -0
  874. package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.h +48 -0
  875. package/Microsoft.ReactNative/Modules/Animated/AnimatedNodeType.h +49 -0
  876. package/Microsoft.ReactNative/Modules/Animated/AnimatedPlatformConfig.cpp +23 -0
  877. package/Microsoft.ReactNative/Modules/Animated/AnimatedPlatformConfig.h +17 -0
  878. package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.cpp +130 -0
  879. package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.h +102 -0
  880. package/Microsoft.ReactNative/Modules/Animated/AnimationUtils.h +45 -0
  881. package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.cpp +60 -0
  882. package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.h +22 -0
  883. package/Microsoft.ReactNative/Modules/Animated/DecayAnimationDriver.cpp +62 -0
  884. package/Microsoft.ReactNative/Modules/Animated/DecayAnimationDriver.h +36 -0
  885. package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.cpp +45 -0
  886. package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.h +30 -0
  887. package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.cpp +63 -0
  888. package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.h +25 -0
  889. package/Microsoft.ReactNative/Modules/Animated/EventAnimationDriver.cpp +27 -0
  890. package/Microsoft.ReactNative/Modules/Animated/EventAnimationDriver.h +24 -0
  891. package/Microsoft.ReactNative/Modules/Animated/ExtrapolationType.h +20 -0
  892. package/Microsoft.ReactNative/Modules/Animated/FacadeType.h +51 -0
  893. package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.cpp +97 -0
  894. package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.h +37 -0
  895. package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.cpp +209 -0
  896. package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.h +59 -0
  897. package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.cpp +40 -0
  898. package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.h +27 -0
  899. package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.cpp +51 -0
  900. package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.h +20 -0
  901. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.cpp +283 -0
  902. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.h +150 -0
  903. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +739 -0
  904. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.h +144 -0
  905. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +433 -0
  906. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +79 -0
  907. package/Microsoft.ReactNative/Modules/Animated/SpringAnimationDriver.cpp +143 -0
  908. package/Microsoft.ReactNative/Modules/Animated/SpringAnimationDriver.h +56 -0
  909. package/Microsoft.ReactNative/Modules/Animated/StyleAnimatedNode.cpp +55 -0
  910. package/Microsoft.ReactNative/Modules/Animated/StyleAnimatedNode.h +26 -0
  911. package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.cpp +62 -0
  912. package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.h +26 -0
  913. package/Microsoft.ReactNative/Modules/Animated/TrackingAnimatedNode.cpp +50 -0
  914. package/Microsoft.ReactNative/Modules/Animated/TrackingAnimatedNode.h +31 -0
  915. package/Microsoft.ReactNative/Modules/Animated/TransformAnimatedNode.cpp +66 -0
  916. package/Microsoft.ReactNative/Modules/Animated/TransformAnimatedNode.h +40 -0
  917. package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.cpp +155 -0
  918. package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.h +64 -0
  919. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +82 -28
  920. package/Microsoft.ReactNative/Modules/AppStateModule.h +19 -13
  921. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +126 -0
  922. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +55 -0
  923. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +103 -0
  924. package/Microsoft.ReactNative/Modules/AppearanceModule.h +55 -0
  925. package/Microsoft.ReactNative/Modules/ClipboardModule.cpp +7 -4
  926. package/Microsoft.ReactNative/Modules/ClipboardModule.h +5 -2
  927. package/Microsoft.ReactNative/Modules/CreateModules.cpp +27 -0
  928. package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +14 -11
  929. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +9 -1
  930. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +167 -54
  931. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +22 -12
  932. package/Microsoft.ReactNative/Modules/ExceptionsManager.cpp +110 -0
  933. package/Microsoft.ReactNative/Modules/ExceptionsManager.h +54 -0
  934. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +10 -6
  935. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +5 -2
  936. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +179 -0
  937. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +50 -0
  938. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +120 -0
  939. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +55 -0
  940. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +169 -40
  941. package/Microsoft.ReactNative/Modules/LogBoxModule.h +15 -3
  942. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +1182 -0
  943. package/Microsoft.ReactNative/Modules/NativeUIManager.h +128 -0
  944. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +874 -0
  945. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +185 -0
  946. package/Microsoft.ReactNative/Modules/PlatformConstantsWinModule.cpp +49 -0
  947. package/Microsoft.ReactNative/Modules/PlatformConstantsWinModule.h +18 -0
  948. package/Microsoft.ReactNative/Modules/ReactRootViewTagGenerator.cpp +20 -0
  949. package/Microsoft.ReactNative/Modules/ReactRootViewTagGenerator.h +11 -0
  950. package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
  951. package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
  952. package/Microsoft.ReactNative/Modules/SourceCode.cpp +31 -0
  953. package/Microsoft.ReactNative/Modules/SourceCode.h +28 -0
  954. package/Microsoft.ReactNative/Modules/StatusBarManager.h +33 -0
  955. package/Microsoft.ReactNative/Modules/Timing.cpp +325 -0
  956. package/Microsoft.ReactNative/Modules/Timing.h +121 -0
  957. package/Microsoft.ReactNative/NativeModulesProvider.cpp +3 -13
  958. package/Microsoft.ReactNative/NativeModulesProvider.h +0 -1
  959. package/Microsoft.ReactNative/Pch/pch.h +30 -6
  960. package/Microsoft.ReactNative/PropertySheet.props +1 -11
  961. package/Microsoft.ReactNative/QuirkSettings.cpp +143 -9
  962. package/Microsoft.ReactNative/QuirkSettings.h +50 -5
  963. package/Microsoft.ReactNative/QuirkSettings.idl +57 -11
  964. package/Microsoft.ReactNative/ReactApplication.cpp +89 -36
  965. package/Microsoft.ReactNative/ReactApplication.h +84 -27
  966. package/Microsoft.ReactNative/ReactApplication.idl +30 -4
  967. package/Microsoft.ReactNative/ReactCoreInjection.cpp +209 -0
  968. package/Microsoft.ReactNative/ReactCoreInjection.h +85 -0
  969. package/Microsoft.ReactNative/ReactCoreInjection.idl +116 -0
  970. package/Microsoft.ReactNative/ReactHost/AsyncActionQueue.cpp +1 -2
  971. package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +125 -0
  972. package/Microsoft.ReactNative/ReactHost/CrashManager.h +25 -0
  973. package/Microsoft.ReactNative/ReactHost/IReactInstance.h +29 -0
  974. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +104 -0
  975. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +26 -0
  976. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +231 -0
  977. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +66 -0
  978. package/Microsoft.ReactNative/ReactHost/MsoUtils.cpp +4 -5
  979. package/Microsoft.ReactNative/ReactHost/MsoUtils.h +2 -2
  980. package/Microsoft.ReactNative/ReactHost/React.h +91 -31
  981. package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +128 -35
  982. package/Microsoft.ReactNative/ReactHost/ReactHost.h +25 -8
  983. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +1138 -375
  984. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +105 -69
  985. package/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h +1 -3
  986. package/Microsoft.ReactNative/ReactHost/React_Win.h +4 -26
  987. package/Microsoft.ReactNative/ReactHost/ViewManagerProvider.h +19 -0
  988. package/Microsoft.ReactNative/ReactInstanceSettings.cpp +134 -0
  989. package/Microsoft.ReactNative/ReactInstanceSettings.h +147 -38
  990. package/Microsoft.ReactNative/ReactInstanceSettings.idl +264 -5
  991. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +75 -0
  992. package/Microsoft.ReactNative/ReactNativeAppBuilder.h +27 -0
  993. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +48 -0
  994. package/Microsoft.ReactNative/ReactNativeHost.cpp +92 -26
  995. package/Microsoft.ReactNative/ReactNativeHost.h +7 -6
  996. package/Microsoft.ReactNative/ReactNativeHost.idl +37 -4
  997. package/Microsoft.ReactNative/ReactNativeIsland.idl +132 -0
  998. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +193 -0
  999. package/Microsoft.ReactNative/ReactNativeWin32App.h +47 -0
  1000. package/Microsoft.ReactNative/ReactPackageBuilder.cpp +41 -3
  1001. package/Microsoft.ReactNative/ReactPackageBuilder.h +41 -3
  1002. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +55 -0
  1003. package/Microsoft.ReactNative/ReactPointerEventArgs.h +32 -0
  1004. package/Microsoft.ReactNative/ReactPointerEventArgs.idl +79 -0
  1005. package/Microsoft.ReactNative/ReactRootView.cpp +426 -9
  1006. package/Microsoft.ReactNative/ReactRootView.h +82 -7
  1007. package/Microsoft.ReactNative/ReactRootView.idl +22 -3
  1008. package/Microsoft.ReactNative/ReactSupport.cpp +2 -1
  1009. package/Microsoft.ReactNative/ReactSupport.h +1 -1
  1010. package/Microsoft.ReactNative/RedBox.cpp +205 -164
  1011. package/Microsoft.ReactNative/RedBox.h +4 -2
  1012. package/Microsoft.ReactNative/RedBoxErrorFrameInfo.cpp +29 -0
  1013. package/Microsoft.ReactNative/RedBoxErrorFrameInfo.h +28 -0
  1014. package/Microsoft.ReactNative/RedBoxErrorInfo.cpp +50 -0
  1015. package/Microsoft.ReactNative/RedBoxErrorInfo.h +30 -0
  1016. package/Microsoft.ReactNative/RedBoxHandler.cpp +7 -1
  1017. package/Microsoft.ReactNative/RedBoxHandler.idl +140 -8
  1018. package/Microsoft.ReactNative/SchedulerSettings.cpp +74 -0
  1019. package/Microsoft.ReactNative/SchedulerSettings.h +35 -0
  1020. package/Microsoft.ReactNative/SynchronousEventBeat.cpp +51 -0
  1021. package/Microsoft.ReactNative/SynchronousEventBeat.h +31 -0
  1022. package/Microsoft.ReactNative/TestHook.cpp +11 -15
  1023. package/Microsoft.ReactNative/TestHook.h +2 -2
  1024. package/Microsoft.ReactNative/Theme.idl +67 -0
  1025. package/Microsoft.ReactNative/Timer.cpp +63 -0
  1026. package/Microsoft.ReactNative/Timer.h +22 -0
  1027. package/Microsoft.ReactNative/Timer.idl +32 -0
  1028. package/Microsoft.ReactNative/TurboModulesProvider.cpp +389 -188
  1029. package/Microsoft.ReactNative/TurboModulesProvider.h +19 -12
  1030. package/Microsoft.ReactNative/UriImageManager.idl +93 -0
  1031. package/Microsoft.ReactNative/Utils/AccessibilityUtils.cpp +36 -0
  1032. package/Microsoft.ReactNative/Utils/AccessibilityUtils.h +15 -0
  1033. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +171 -0
  1034. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.h +72 -0
  1035. package/Microsoft.ReactNative/Utils/Helpers.cpp +101 -0
  1036. package/Microsoft.ReactNative/Utils/Helpers.h +30 -0
  1037. package/Microsoft.ReactNative/Utils/ImageUtils.cpp +210 -0
  1038. package/Microsoft.ReactNative/Utils/ImageUtils.h +39 -0
  1039. package/Microsoft.ReactNative/Utils/KeyboardUtils.cpp +424 -0
  1040. package/Microsoft.ReactNative/Utils/KeyboardUtils.h +18 -0
  1041. package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +119 -0
  1042. package/Microsoft.ReactNative/Utils/LocalBundleReader.h +31 -0
  1043. package/Microsoft.ReactNative/Utils/PropertyHandlerUtils.h +87 -0
  1044. package/Microsoft.ReactNative/Utils/PropertyUtils.h +568 -0
  1045. package/Microsoft.ReactNative/Utils/ResourceBrushUtils.cpp +182 -0
  1046. package/Microsoft.ReactNative/Utils/ResourceBrushUtils.h +58 -0
  1047. package/Microsoft.ReactNative/Utils/ShadowNodeTypeUtils.h +26 -0
  1048. package/Microsoft.ReactNative/Utils/StandardControlResourceKeyNames.h +70 -0
  1049. package/Microsoft.ReactNative/Utils/TextTransform.h +8 -0
  1050. package/Microsoft.ReactNative/Utils/ThemeUtils.cpp +33 -0
  1051. package/Microsoft.ReactNative/Utils/ThemeUtils.h +13 -0
  1052. package/Microsoft.ReactNative/Utils/TransformableText.h +67 -0
  1053. package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.cpp +107 -0
  1054. package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +64 -0
  1055. package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +56 -0
  1056. package/Microsoft.ReactNative/Utils/UwpScriptStore.h +22 -0
  1057. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +348 -0
  1058. package/Microsoft.ReactNative/Utils/ValueUtils.h +62 -0
  1059. package/Microsoft.ReactNative/Utils/XamlIslandUtils.cpp +93 -0
  1060. package/Microsoft.ReactNative/Utils/XamlIslandUtils.h +48 -0
  1061. package/Microsoft.ReactNative/Version.rc +8 -25
  1062. package/Microsoft.ReactNative/ViewManagersProvider.cpp +4 -5
  1063. package/Microsoft.ReactNative/ViewManagersProvider.h +3 -4
  1064. package/Microsoft.ReactNative/ViewProps.idl +93 -0
  1065. package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.cpp +62 -0
  1066. package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.h +29 -0
  1067. package/Microsoft.ReactNative/Views/ConfigureBundlerDlg.cpp +186 -0
  1068. package/Microsoft.ReactNative/Views/ConfigureBundlerDlg.h +11 -0
  1069. package/Microsoft.ReactNative/Views/ControlViewManager.cpp +143 -0
  1070. package/Microsoft.ReactNative/Views/ControlViewManager.h +38 -0
  1071. package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.cpp +53 -0
  1072. package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.h +30 -0
  1073. package/Microsoft.ReactNative/Views/DevMenu.cpp +360 -215
  1074. package/Microsoft.ReactNative/Views/DevMenu.h +6 -15
  1075. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +586 -0
  1076. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.h +104 -0
  1077. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +330 -0
  1078. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.h +111 -0
  1079. package/Microsoft.ReactNative/Views/DynamicValueProvider.cpp +59 -0
  1080. package/Microsoft.ReactNative/Views/DynamicValueProvider.h +32 -0
  1081. package/Microsoft.ReactNative/Views/ExpressionAnimationStore.cpp +61 -0
  1082. package/Microsoft.ReactNative/Views/ExpressionAnimationStore.h +26 -0
  1083. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +559 -0
  1084. package/Microsoft.ReactNative/Views/FlyoutViewManager.h +34 -0
  1085. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +126 -0
  1086. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.h +23 -0
  1087. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +957 -0
  1088. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.h +41 -0
  1089. package/Microsoft.ReactNative/Views/IXamlRootView.h +17 -0
  1090. package/Microsoft.ReactNative/Views/Image/Effects.h +173 -0
  1091. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +245 -0
  1092. package/Microsoft.ReactNative/Views/Image/ImageViewManager.h +45 -0
  1093. package/Microsoft.ReactNative/Views/Image/Microsoft.UI.Composition.Effects_Impl.h +207 -0
  1094. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +469 -0
  1095. package/Microsoft.ReactNative/Views/Image/ReactImage.h +80 -0
  1096. package/Microsoft.ReactNative/Views/Image/ReactImageBrush.cpp +247 -0
  1097. package/Microsoft.ReactNative/Views/Image/ReactImageBrush.h +67 -0
  1098. package/Microsoft.ReactNative/Views/Impl/ScrollViewUWPImplementation.cpp +106 -0
  1099. package/Microsoft.ReactNative/Views/Impl/ScrollViewUWPImplementation.h +43 -0
  1100. package/Microsoft.ReactNative/Views/Impl/SnapPointManagingContentControl.cpp +178 -0
  1101. package/Microsoft.ReactNative/Views/Impl/SnapPointManagingContentControl.h +77 -0
  1102. package/Microsoft.ReactNative/Views/KeyboardEventHandler.cpp +261 -0
  1103. package/Microsoft.ReactNative/Views/KeyboardEventHandler.h +132 -0
  1104. package/Microsoft.ReactNative/Views/PaperShadowNode.cpp +18 -0
  1105. package/Microsoft.ReactNative/Views/PaperShadowNode.h +38 -0
  1106. package/Microsoft.ReactNative/Views/PopupViewManager.cpp +349 -0
  1107. package/Microsoft.ReactNative/Views/PopupViewManager.h +36 -0
  1108. package/Microsoft.ReactNative/Views/RawTextViewManager.cpp +69 -0
  1109. package/Microsoft.ReactNative/Views/RawTextViewManager.h +46 -0
  1110. package/Microsoft.ReactNative/Views/ReactViewInstance.cpp +43 -0
  1111. package/Microsoft.ReactNative/Views/ReactViewInstance.h +53 -0
  1112. package/Microsoft.ReactNative/Views/RefreshControlManager.cpp +116 -0
  1113. package/Microsoft.ReactNative/Views/RefreshControlManager.h +28 -0
  1114. package/Microsoft.ReactNative/Views/RootViewManager.cpp +65 -0
  1115. package/Microsoft.ReactNative/Views/RootViewManager.h +36 -0
  1116. package/Microsoft.ReactNative/Views/SIPEventHandler.cpp +117 -0
  1117. package/Microsoft.ReactNative/Views/SIPEventHandler.h +45 -0
  1118. package/Microsoft.ReactNative/Views/ScrollContentViewManager.cpp +16 -0
  1119. package/Microsoft.ReactNative/Views/ScrollContentViewManager.h +19 -0
  1120. package/Microsoft.ReactNative/Views/ScrollViewManager.cpp +540 -0
  1121. package/Microsoft.ReactNative/Views/ScrollViewManager.h +42 -0
  1122. package/Microsoft.ReactNative/Views/ShadowNodeBase.cpp +200 -0
  1123. package/Microsoft.ReactNative/Views/ShadowNodeBase.h +169 -0
  1124. package/Microsoft.ReactNative/Views/ShadowNodeRegistry.cpp +64 -0
  1125. package/Microsoft.ReactNative/Views/ShadowNodeRegistry.h +40 -0
  1126. package/Microsoft.ReactNative/Views/SliderViewManager.cpp +97 -0
  1127. package/Microsoft.ReactNative/Views/SliderViewManager.h +32 -0
  1128. package/Microsoft.ReactNative/Views/SwitchViewManager.cpp +227 -0
  1129. package/Microsoft.ReactNative/Views/SwitchViewManager.h +31 -0
  1130. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.cpp +52 -0
  1131. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.h +37 -0
  1132. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.cpp +348 -0
  1133. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.h +13 -0
  1134. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.cpp +76 -0
  1135. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.h +32 -0
  1136. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.cpp +12 -0
  1137. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.h +19 -0
  1138. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +75 -0
  1139. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.h +43 -0
  1140. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.cpp +21 -0
  1141. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +23 -0
  1142. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +70 -0
  1143. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.h +34 -0
  1144. package/Microsoft.ReactNative/Views/Text/TextVisitor.cpp +56 -0
  1145. package/Microsoft.ReactNative/Views/Text/TextVisitor.h +34 -0
  1146. package/Microsoft.ReactNative/Views/Text/TextVisitorScope.h +35 -0
  1147. package/Microsoft.ReactNative/Views/Text/TextVisitors.h +47 -0
  1148. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +1003 -0
  1149. package/Microsoft.ReactNative/Views/TextInputViewManager.h +33 -0
  1150. package/Microsoft.ReactNative/Views/TextViewManager.cpp +414 -0
  1151. package/Microsoft.ReactNative/Views/TextViewManager.h +47 -0
  1152. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +608 -0
  1153. package/Microsoft.ReactNative/Views/TouchEventHandler.h +116 -0
  1154. package/Microsoft.ReactNative/Views/UnimplementedViewManager.cpp +79 -0
  1155. package/Microsoft.ReactNative/Views/UnimplementedViewManager.h +27 -0
  1156. package/Microsoft.ReactNative/Views/ViewControl.cpp +43 -0
  1157. package/Microsoft.ReactNative/Views/ViewControl.h +32 -0
  1158. package/Microsoft.ReactNative/Views/ViewManager.h +34 -0
  1159. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +479 -0
  1160. package/Microsoft.ReactNative/Views/ViewManagerBase.h +121 -0
  1161. package/Microsoft.ReactNative/Views/ViewPanel.cpp +164 -0
  1162. package/Microsoft.ReactNative/Views/ViewPanel.h +82 -0
  1163. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +507 -0
  1164. package/Microsoft.ReactNative/Views/ViewViewManager.h +52 -0
  1165. package/Microsoft.ReactNative/Views/VirtualTextViewManager.cpp +143 -0
  1166. package/Microsoft.ReactNative/Views/VirtualTextViewManager.h +57 -0
  1167. package/Microsoft.ReactNative/Views/XamlFeatures.cpp +11 -0
  1168. package/Microsoft.ReactNative/Views/XamlFeatures.h +11 -0
  1169. package/Microsoft.ReactNative/Views/cppwinrt/AccessibilityAction.idl +12 -0
  1170. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +231 -0
  1171. package/Microsoft.ReactNative/Views/cppwinrt/Effects.idl +86 -0
  1172. package/Microsoft.ReactNative/Views/cppwinrt/ViewPanel.idl +48 -0
  1173. package/Microsoft.ReactNative/XamlHelper.cpp +52 -3
  1174. package/Microsoft.ReactNative/XamlHelper.h +33 -1
  1175. package/Microsoft.ReactNative/XamlHelper.idl +18 -5
  1176. package/Microsoft.ReactNative/XamlLoadState.cpp +217 -0
  1177. package/Microsoft.ReactNative/XamlLoadState.h +44 -0
  1178. package/Microsoft.ReactNative/XamlUIService.cpp +74 -20
  1179. package/Microsoft.ReactNative/XamlUIService.h +16 -8
  1180. package/Microsoft.ReactNative/XamlUIService.idl +46 -6
  1181. package/Microsoft.ReactNative/XamlView.cpp +59 -0
  1182. package/Microsoft.ReactNative/XamlView.h +58 -0
  1183. package/Microsoft.ReactNative/getLayoutProps.ps1 +1 -1
  1184. package/Microsoft.ReactNative/microsoft.reactnative.def +1 -1
  1185. package/Microsoft.ReactNative.Cxx/ApiLoaders/JSRuntimeApi.cpp +78 -0
  1186. package/Microsoft.ReactNative.Cxx/ApiLoaders/JSRuntimeApi.h +51 -0
  1187. package/Microsoft.ReactNative.Cxx/ApiLoaders/JSRuntimeApi.inc +48 -0
  1188. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi.cpp +41 -0
  1189. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi.h +127 -0
  1190. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi.inc +125 -0
  1191. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi_posix.cpp +16 -0
  1192. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi_win.cpp +23 -0
  1193. package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
  1194. package/Microsoft.ReactNative.Cxx/AutoDraw.h +42 -0
  1195. package/Microsoft.ReactNative.Cxx/ComponentView.Experimental.interop.h +14 -0
  1196. package/Microsoft.ReactNative.Cxx/CompositionSwitcher.Experimental.interop.h +34 -0
  1197. package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +5 -5
  1198. package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +114 -0
  1199. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +1164 -0
  1200. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +328 -0
  1201. package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.cpp +69 -0
  1202. package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.h +64 -0
  1203. package/Microsoft.ReactNative.Cxx/JSI/JsiValue.h +82 -0
  1204. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
  1205. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
  1206. package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
  1207. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiLoader.cpp +16 -0
  1208. package/Microsoft.ReactNative.Cxx/JSI/decorator.h +834 -0
  1209. package/Microsoft.ReactNative.Cxx/JSI/instrumentation.h +117 -0
  1210. package/Microsoft.ReactNative.Cxx/JSI/jsi-inl.h +366 -0
  1211. package/Microsoft.ReactNative.Cxx/JSI/jsi.cpp +560 -0
  1212. package/Microsoft.ReactNative.Cxx/JSI/jsi.h +1611 -0
  1213. package/Microsoft.ReactNative.Cxx/JSI/threadsafe.h +79 -0
  1214. package/Microsoft.ReactNative.Cxx/JSValue.cpp +18 -7
  1215. package/Microsoft.ReactNative.Cxx/JSValue.h +17 -2
  1216. package/Microsoft.ReactNative.Cxx/JSValueComposition.h +26 -0
  1217. package/Microsoft.ReactNative.Cxx/JSValueReader.h +50 -3
  1218. package/Microsoft.ReactNative.Cxx/JSValueTreeReader.cpp +3 -0
  1219. package/Microsoft.ReactNative.Cxx/JSValueTreeReader.h +3 -0
  1220. package/Microsoft.ReactNative.Cxx/JSValueTreeWriter.cpp +3 -0
  1221. package/Microsoft.ReactNative.Cxx/JSValueTreeWriter.h +3 -0
  1222. package/Microsoft.ReactNative.Cxx/JSValueWriter.h +29 -8
  1223. package/Microsoft.ReactNative.Cxx/JSValueXaml.h +48 -3
  1224. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +110 -5
  1225. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +196 -0
  1226. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +17 -4
  1227. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +92 -6
  1228. package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +2 -0
  1229. package/Microsoft.ReactNative.Cxx/NativeModules.h +369 -63
  1230. package/Microsoft.ReactNative.Cxx/NodeApiJsiRuntime.cpp +2878 -0
  1231. package/Microsoft.ReactNative.Cxx/NodeApiJsiRuntime.h +36 -0
  1232. package/Microsoft.ReactNative.Cxx/README.md +65 -0
  1233. package/Microsoft.ReactNative.Cxx/ReactCommon/CallInvoker.h +64 -0
  1234. package/Microsoft.ReactNative.Cxx/ReactCommon/SchedulerPriority.h +22 -0
  1235. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.cpp +63 -0
  1236. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +165 -0
  1237. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.cpp +105 -0
  1238. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.h +57 -0
  1239. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/AString.h +42 -0
  1240. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Array.h +151 -0
  1241. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Base.h +177 -0
  1242. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bool.h +25 -0
  1243. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bridging.h +21 -0
  1244. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/CallbackWrapper.h +67 -0
  1245. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +90 -0
  1246. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Convert.h +170 -0
  1247. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Error.h +51 -0
  1248. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/EventEmitter.h +134 -0
  1249. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Function.h +283 -0
  1250. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.cpp +63 -0
  1251. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.h +61 -0
  1252. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Number.h +58 -0
  1253. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Object.h +93 -0
  1254. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Promise.h +104 -0
  1255. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Value.h +107 -0
  1256. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/flags.h +22 -0
  1257. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/react_native_assert.h +72 -0
  1258. package/Microsoft.ReactNative.Cxx/ReactContext.h +13 -5
  1259. package/Microsoft.ReactNative.Cxx/ReactDispatcher.h +3 -0
  1260. package/Microsoft.ReactNative.Cxx/ReactError.h +3 -0
  1261. package/Microsoft.ReactNative.Cxx/ReactHandleHelper.h +4 -1
  1262. package/Microsoft.ReactNative.Cxx/ReactNonAbiValue.h +10 -5
  1263. package/Microsoft.ReactNative.Cxx/ReactNotificationService.h +23 -11
  1264. package/Microsoft.ReactNative.Cxx/ReactPromise.cpp +24 -1
  1265. package/Microsoft.ReactNative.Cxx/ReactPromise.h +30 -0
  1266. package/Microsoft.ReactNative.Cxx/ReactPropertyBag.h +20 -13
  1267. package/Microsoft.ReactNative.Cxx/StructInfo.h +8 -5
  1268. package/Microsoft.ReactNative.Cxx/TurboModuleProvider.cpp +40 -0
  1269. package/Microsoft.ReactNative.Cxx/TurboModuleProvider.h +34 -0
  1270. package/Microsoft.ReactNative.Cxx/UI.Text.h +7 -1
  1271. package/Microsoft.ReactNative.Cxx/UI.Xaml.Controls.h +3 -0
  1272. package/Microsoft.ReactNative.Cxx/UI.Xaml.Hosting.DesktopWindowXamlSource.h +11 -0
  1273. package/Microsoft.ReactNative.Cxx/UI.Xaml.Hosting.h +10 -0
  1274. package/Microsoft.ReactNative.Cxx/VersionMacros.h +19 -0
  1275. package/Microsoft.ReactNative.Cxx/XamlUtils.h +56 -5
  1276. package/Microsoft.ReactNative.Cxx/cppapi.md.mustache +13 -0
  1277. package/Microsoft.ReactNative.Cxx/doxysaurus.json +53 -0
  1278. package/Microsoft.ReactNative.Cxx/node-api/js_native_api.h +553 -0
  1279. package/Microsoft.ReactNative.Cxx/node-api/js_native_api_types.h +167 -0
  1280. package/Microsoft.ReactNative.Cxx/node-api/js_runtime_api.h +186 -0
  1281. package/Microsoft.ReactNative.Cxx/stubs/glog/logging.h +82 -0
  1282. package/Microsoft.ReactNative.Managed/AttributedViewManager.cs +5 -0
  1283. package/Microsoft.ReactNative.Managed/IReactPromise.cs +0 -8
  1284. package/Microsoft.ReactNative.Managed/JSValue.cs +889 -889
  1285. package/Microsoft.ReactNative.Managed/JSValueReader.cs +442 -444
  1286. package/Microsoft.ReactNative.Managed/JSValueReaderGenerator.cs +6 -6
  1287. package/Microsoft.ReactNative.Managed/JSValueWriter.cs +13 -7
  1288. package/Microsoft.ReactNative.Managed/JSValueWriterGenerator.cs +5 -5
  1289. package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +48 -42
  1290. package/Microsoft.ReactNative.Managed/ReactAttributes.cs +16 -0
  1291. package/Microsoft.ReactNative.Managed/ReactConstantProvider.cs +5 -0
  1292. package/Microsoft.ReactNative.Managed/ReactContext.cs +25 -4
  1293. package/Microsoft.ReactNative.Managed/ReactContextGenerator.cs +4 -0
  1294. package/Microsoft.ReactNative.Managed/ReactDispatcher.cs +34 -0
  1295. package/Microsoft.ReactNative.Managed/ReactError.cs +36 -0
  1296. package/Microsoft.ReactNative.Managed/ReactNotificationArgsOf.cs +23 -0
  1297. package/Microsoft.ReactNative.Managed/ReactNotificationHandlerOf.cs +7 -0
  1298. package/Microsoft.ReactNative.Managed/ReactNotificationIdOf.cs +44 -0
  1299. package/Microsoft.ReactNative.Managed/ReactNotificationService.cs +146 -0
  1300. package/Microsoft.ReactNative.Managed/ReactNotificationSubscription.cs +43 -0
  1301. package/Microsoft.ReactNative.Managed/ReactNotificationSubscriptionRevoker.cs +64 -0
  1302. package/Microsoft.ReactNative.Managed/ReactPackageBuilderExtensions.cs +1 -1
  1303. package/Microsoft.ReactNative.Managed/ReactPromise.cs +95 -28
  1304. package/Microsoft.ReactNative.Managed/ReactPropertyBag.cs +91 -0
  1305. package/Microsoft.ReactNative.Managed/ReactPropertyIdOf.cs +44 -0
  1306. package/Microsoft.ReactNative.Managed/ReactPropertyName.cs +39 -0
  1307. package/Microsoft.ReactNative.Managed/ReactPropertyNamespace.cs +26 -0
  1308. package/Microsoft.ReactNative.Managed/ReactSettingsSnapshot.cs +50 -0
  1309. package/Microsoft.ReactNative.Managed/ReactSyncMethodInfo.cs +1 -1
  1310. package/Microsoft.ReactNative.Managed/ReactTaskExtensions.cs +95 -0
  1311. package/Microsoft.ReactNative.Managed/ReflectionReactPackageProvider.cs +5 -4
  1312. package/Microsoft.ReactNative.Managed/ViewManagerEvent.cs +4 -0
  1313. package/Microsoft.ReactNative.Managed.CodeGen/App.cs +175 -0
  1314. package/Microsoft.ReactNative.Managed.CodeGen/CodeAnalyzer.cs +953 -0
  1315. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Module.cs +515 -0
  1316. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Serializers.cs +580 -0
  1317. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.ViewManager.cs +63 -0
  1318. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.cs +111 -0
  1319. package/Microsoft.ReactNative.Managed.CodeGen/Commandline/ParsedArgument.cs +141 -0
  1320. package/Microsoft.ReactNative.Managed.CodeGen/Commandline/Parser.cs +59 -0
  1321. package/Microsoft.ReactNative.Managed.CodeGen/ConsoleMeasurement.cs +29 -0
  1322. package/Microsoft.ReactNative.Managed.CodeGen/DiagnosticDescriptors.cs +186 -0
  1323. package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +80 -0
  1324. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactAssembly.cs +22 -0
  1325. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactCallback.cs +30 -0
  1326. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactConstant.cs +23 -0
  1327. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactConstantProvider.cs +17 -0
  1328. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactEvent.cs +16 -0
  1329. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactFunction.cs +16 -0
  1330. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactGetConstants.cs +17 -0
  1331. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactInitializer.cs +17 -0
  1332. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactMethod.cs +54 -0
  1333. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactModule.cs +38 -0
  1334. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactTypes.cs +172 -0
  1335. package/Microsoft.ReactNative.Managed.CodeGen/Options.cs +150 -0
  1336. package/Microsoft.ReactNative.Managed.CodeGen/Program.cs +42 -0
  1337. package/Microsoft.ReactNative.Managed.CodeGen/Properties/AssemblyInfo.cs +6 -0
  1338. package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +14 -0
  1339. package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +14 -0
  1340. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +116 -0
  1341. package/Microsoft.ReactNative.Managed.CodeGen/SyntaxHelpers.cs +155 -0
  1342. package/Mso/Mso.vcxitems.filters +2 -2
  1343. package/Mso/activeObject/activeObject.h +8 -14
  1344. package/Mso/comUtil/IUnknownShim.h +4 -0
  1345. package/Mso/comUtil/qiCastCore.h +0 -6
  1346. package/Mso/compilerAdapters/compilerFeatures.h +1 -1
  1347. package/Mso/compilerAdapters/cppMacros.h +3 -5
  1348. package/Mso/compilerAdapters/functionDecorations.h +6 -6
  1349. package/Mso/cppExtensions/autoRestore.h +1 -6
  1350. package/Mso/debugAssertApi/debugAssertApi.h +1 -3
  1351. package/Mso/debugAssertApi/debugAssertDetails.h +5 -7
  1352. package/Mso/dispatchQueue/dispatchQueue.h +21 -8
  1353. package/Mso/errorCode/errorProvider.h +2 -2
  1354. package/Mso/errorCode/maybe.h +4 -4
  1355. package/Mso/functional/functor.h +6 -6
  1356. package/Mso/functional/functorRef.h +2 -2
  1357. package/Mso/future/details/executor.h +3 -3
  1358. package/Mso/future/details/futureFuncInl.h +4 -4
  1359. package/Mso/future/details/ifuture.h +3 -3
  1360. package/Mso/future/details/maybeInvoker.h +6 -6
  1361. package/Mso/future/details/promiseGroupInl.h +4 -4
  1362. package/Mso/future/details/promiseInl.h +4 -4
  1363. package/Mso/future/details/resultTraits.h +4 -4
  1364. package/Mso/future/details/whenAllInl.h +1 -1
  1365. package/Mso/future/future.h +13 -13
  1366. package/Mso/future/futureWait.h +1 -1
  1367. package/Mso/future/futureWinRT.h +11 -7
  1368. package/Mso/guid/msoGuidDetails.h +16 -15
  1369. package/Mso/memoryApi/memoryApi.h +13 -7
  1370. package/Mso/motifCpp/assert_IgnorePlat_emptyImpl.h +2 -0
  1371. package/Mso/motifCpp/assert_motifApi.h +2 -0
  1372. package/Mso/motifCpp/gTestAdapter.h +3 -1
  1373. package/Mso/motifCpp/libletAwareMemLeakDetection.h +2 -0
  1374. package/Mso/motifCpp/motifCppTest.h +8 -0
  1375. package/Mso/motifCpp/motifCppTestBase.h +2 -0
  1376. package/Mso/motifCpp/testCheck.h +9 -4
  1377. package/Mso/motifCpp/testInfo.h +9 -9
  1378. package/Mso/oacr/oacr.h +1 -1
  1379. package/Mso/object/make.h +14 -8
  1380. package/Mso/object/objectRefCount.h +3 -5
  1381. package/Mso/object/objectWithWeakRef.h +10 -14
  1382. package/Mso/object/queryCast.h +4 -6
  1383. package/Mso/object/refCountedObject.h +4 -4
  1384. package/Mso/object/unknownObject.h +7 -7
  1385. package/Mso/platformAdapters/windowsFirst.h +1 -1
  1386. package/Mso/smartPtr/cntPtr.h +21 -21
  1387. package/Mso/smartPtr/smartPointerBase.h +1 -5
  1388. package/Mso/src/debugAssertApi/debugAssertApi.cpp +1 -1
  1389. package/Mso/src/dispatchQueue/looperScheduler.cpp +38 -11
  1390. package/Mso/src/dispatchQueue/queueService.cpp +4 -6
  1391. package/Mso/src/dispatchQueue/queueService.h +2 -2
  1392. package/Mso/src/dispatchQueue/taskQueue.h +1 -1
  1393. package/Mso/src/dispatchQueue/threadPoolScheduler_win.cpp +98 -6
  1394. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +135 -44
  1395. package/Mso/src/eventWaitHandle/eventWaitHandleImpl_win.cpp +2 -3
  1396. package/Mso/src/future/futureImpl.cpp +5 -5
  1397. package/Mso/src/future/futureImpl.h +2 -2
  1398. package/Mso/src/memoryApi/memoryApi.cpp +7 -4
  1399. package/PropertySheets/Appx.props +19 -0
  1400. package/PropertySheets/Autolink.props +16 -0
  1401. package/PropertySheets/Autolink.targets +19 -0
  1402. package/PropertySheets/Bundle.Common.targets +18 -6
  1403. package/PropertySheets/Bundle.props +35 -7
  1404. package/PropertySheets/Codegen.props +15 -0
  1405. package/PropertySheets/Codegen.targets +19 -0
  1406. package/PropertySheets/CppAppConsumeCSharpModule.props +61 -0
  1407. package/PropertySheets/CppAppConsumeCSharpModule.targets +34 -0
  1408. package/PropertySheets/Debug.props +1 -0
  1409. package/PropertySheets/External/Microsoft.ReactNative.CSharp.Dependencies.props +17 -0
  1410. package/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props +12 -0
  1411. package/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props +20 -0
  1412. package/PropertySheets/External/Microsoft.ReactNative.Common.props +38 -3
  1413. package/PropertySheets/External/Microsoft.ReactNative.Common.targets +34 -0
  1414. package/PropertySheets/External/Microsoft.ReactNative.Composition.Common.props +15 -0
  1415. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props +37 -0
  1416. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.targets +28 -0
  1417. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.props +37 -0
  1418. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.targets +30 -0
  1419. package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.props +19 -0
  1420. package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.targets +26 -0
  1421. package/PropertySheets/External/Microsoft.ReactNative.Cpp.Dependencies.props +26 -0
  1422. package/PropertySheets/External/Microsoft.ReactNative.Cpp.PackageReferences.props +12 -0
  1423. package/PropertySheets/External/Microsoft.ReactNative.Cpp.ProjectReferences.props +22 -0
  1424. package/PropertySheets/External/Microsoft.ReactNative.CppLib.props +23 -0
  1425. package/PropertySheets/External/Microsoft.ReactNative.CppLib.targets +17 -0
  1426. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props +31 -1
  1427. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +43 -27
  1428. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.props +22 -1
  1429. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets +26 -14
  1430. package/PropertySheets/External/Microsoft.ReactNative.Uwp.Common.props +15 -0
  1431. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props +29 -1
  1432. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +41 -14
  1433. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props +31 -2
  1434. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets +30 -9
  1435. package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +41 -0
  1436. package/PropertySheets/FastBuild.targets +64 -0
  1437. package/PropertySheets/FixupRoslynCscWarnings.targets +38 -0
  1438. package/PropertySheets/Generated/PackageVersion.g.props +20 -0
  1439. package/PropertySheets/HybridCRT.props +34 -0
  1440. package/PropertySheets/JSEngine.props +26 -0
  1441. package/PropertySheets/ManagedCodeGen/Microsoft.ReactNative.Managed.CodeGen.targets +8 -22
  1442. package/PropertySheets/NewAPIDeclarations.props +25 -0
  1443. package/PropertySheets/NuGet.CSharp.props +15 -0
  1444. package/PropertySheets/NuGet.Cpp.props +32 -0
  1445. package/PropertySheets/NuGet.LockFile.props +26 -0
  1446. package/PropertySheets/OutputMSBuildProperties.targets +33 -0
  1447. package/PropertySheets/PackageVersionDefinitions.props +46 -0
  1448. package/PropertySheets/React.Cpp.props +84 -42
  1449. package/PropertySheets/ReactCommunity.cpp.props +7 -6
  1450. package/PropertySheets/ReactNativeArchitecture.props +69 -0
  1451. package/PropertySheets/Release.props +8 -1
  1452. package/PropertySheets/RequireSolution.targets +17 -0
  1453. package/PropertySheets/Warnings.props +8 -3
  1454. package/PropertySheets/WebView2.props +8 -0
  1455. package/PropertySheets/WinUI.props +69 -0
  1456. package/PropertySheets/x64.props +3 -0
  1457. package/PropertySheets/x86.props +3 -0
  1458. package/README.md +44 -44
  1459. package/ReactCommon/ReactCommon.vcxproj +151 -83
  1460. package/ReactCommon/ReactCommon.vcxproj.filters +137 -68
  1461. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +61 -0
  1462. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +180 -0
  1463. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +351 -0
  1464. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +1708 -0
  1465. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
  1466. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
  1467. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
  1468. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +21 -0
  1469. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +165 -0
  1470. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp +358 -0
  1471. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +139 -0
  1472. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h +73 -0
  1473. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +253 -0
  1474. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +799 -0
  1475. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +30 -0
  1476. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +60 -0
  1477. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/primitives.h +179 -0
  1478. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.cpp +45 -0
  1479. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +87 -0
  1480. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +673 -0
  1481. package/ReactCommon/cgmanifest.json +15 -0
  1482. package/ReactCommon/pch.h +11 -1
  1483. package/Scripts/Analyze-Crash.ps1 +116 -0
  1484. package/Scripts/EnableInternalWinAppSDKFeed.ps1 +21 -0
  1485. package/Scripts/Install-WindowsSDKISO.ps1 +2 -2
  1486. package/Scripts/IntegrationTests.ps1 +26 -11
  1487. package/Scripts/JustMyXaml.ps1 +8 -8
  1488. package/Scripts/Microsoft.ReactNative.Cxx.nuspec +28 -0
  1489. package/Scripts/Microsoft.ReactNative.Cxx.targets +5 -0
  1490. package/Scripts/Microsoft.ReactNative.Managed.CodeGen.nuspec +23 -0
  1491. package/Scripts/Microsoft.ReactNative.Managed.CodeGen.targets +70 -0
  1492. package/Scripts/Microsoft.ReactNative.Managed.nuspec +64 -0
  1493. package/Scripts/Microsoft.ReactNative.Managed.targets +4 -0
  1494. package/Scripts/Microsoft.ReactNative.VersionCheck.targets +100 -0
  1495. package/Scripts/Microsoft.ReactNative.nuspec +42 -30
  1496. package/Scripts/Microsoft.ReactNative.targets +22 -13
  1497. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +44 -0
  1498. package/Scripts/OfficeReact.Win32.nuspec +86 -0
  1499. package/Scripts/OpenSSL.nuspec +21 -8
  1500. package/Scripts/OpenSSL.targets +7 -7
  1501. package/Scripts/PublishNugetPackagesLocally.cmd +99 -0
  1502. package/Scripts/StripAdditionalPlatformsFromNuspec.ps1 +34 -12
  1503. package/Scripts/TestServers.ps1 +2 -28
  1504. package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +132 -0
  1505. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +150 -0
  1506. package/Scripts/Tfs/Make-AnyCPU-RefAssemblies.ps1 +39 -0
  1507. package/Scripts/Tfs/Start-TestServers.ps1 +2 -14
  1508. package/Scripts/Tfs/Stop-TestServers.ps1 +0 -5
  1509. package/Scripts/Tracing/Start-Tracing.ps1 +28 -0
  1510. package/Scripts/Tracing/Stop-Tracing.ps1 +57 -0
  1511. package/Scripts/Tracing/rnw.wprp +27 -0
  1512. package/Scripts/UnitTest.ps1 +3 -3
  1513. package/Scripts/VSProjectUtils.ps1 +153 -0
  1514. package/Scripts/creaternwapp.cmd +177 -0
  1515. package/Scripts/creaternwlib.cmd +176 -0
  1516. package/Scripts/rnw-dependencies.ps1 +591 -105
  1517. package/Scripts/utils.js +1 -1
  1518. package/Shared/AbiSafe.h +116 -0
  1519. package/Shared/BaseFileReaderResource.cpp +89 -0
  1520. package/Shared/BaseFileReaderResource.h +41 -0
  1521. package/Shared/BaseScriptStoreImpl.cpp +345 -0
  1522. package/Shared/BaseScriptStoreImpl.h +93 -0
  1523. package/Shared/BatchingMessageQueueThread.h +20 -0
  1524. package/Shared/ChakraRuntimeHolder.cpp +62 -0
  1525. package/Shared/ChakraRuntimeHolder.h +46 -0
  1526. package/Shared/CppRuntimeOptions.h +50 -0
  1527. package/Shared/CreateInstance.h +25 -0
  1528. package/Shared/CreateModules.h +75 -0
  1529. package/Shared/CxxMessageQueue.cpp +310 -0
  1530. package/Shared/DevServerHelper.h +123 -0
  1531. package/Shared/DevSettings.h +123 -0
  1532. package/Shared/DevSupportManager.cpp +310 -0
  1533. package/Shared/DevSupportManager.h +76 -0
  1534. package/Shared/Executors/WebSocketJSExecutor.cpp +294 -0
  1535. package/Shared/Executors/WebSocketJSExecutor.h +123 -0
  1536. package/Shared/Executors/WebSocketJSExecutorFactory.cpp +25 -0
  1537. package/Shared/Hasher.cpp +64 -0
  1538. package/Shared/Hasher.h +24 -0
  1539. package/Shared/HermesRuntimeHolder.cpp +439 -0
  1540. package/Shared/HermesRuntimeHolder.h +79 -0
  1541. package/Shared/HermesSamplingProfiler.cpp +114 -0
  1542. package/Shared/HermesSamplingProfiler.h +26 -0
  1543. package/Shared/IBlobPersistor.h +30 -0
  1544. package/Shared/IDevSupportManager.h +34 -0
  1545. package/Shared/IFileReaderResource.h +36 -0
  1546. package/Shared/IReactRootView.h +21 -0
  1547. package/Shared/IRedBoxHandler.h +44 -0
  1548. package/Shared/InspectorPackagerConnection.cpp +232 -0
  1549. package/Shared/InspectorPackagerConnection.h +61 -0
  1550. package/Shared/InstanceManager.cpp +52 -17
  1551. package/Shared/InstanceManager.h +72 -0
  1552. package/Shared/JSI/ChakraApi.cpp +436 -0
  1553. package/Shared/JSI/ChakraApi.h +474 -0
  1554. package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +100 -0
  1555. package/Shared/JSI/ChakraRuntime.cpp +1128 -0
  1556. package/Shared/JSI/ChakraRuntime.h +510 -0
  1557. package/Shared/JSI/ChakraRuntimeArgs.h +45 -0
  1558. package/Shared/JSI/ChakraRuntimeFactory.h +15 -0
  1559. package/Shared/JSI/JSExecutorFactoryDelegate.h +12 -0
  1560. package/Shared/JSI/JSExecutorFactorySettings.cpp +30 -0
  1561. package/Shared/JSI/JSExecutorFactorySettings.h +21 -0
  1562. package/Shared/JSI/RuntimeHolder.h +28 -0
  1563. package/Shared/JSI/ScriptStore.h +77 -0
  1564. package/Shared/JSI/V8RuntimeHolder.cpp +260 -0
  1565. package/Shared/JSI/V8RuntimeHolder.h +37 -0
  1566. package/Shared/LayoutAnimation.cpp +143 -0
  1567. package/Shared/LayoutAnimation.h +72 -0
  1568. package/Shared/Logging.cpp +1 -1
  1569. package/Shared/MemoryMappedBuffer.cpp +5 -36
  1570. package/Shared/MemoryMappedBuffer.h +16 -0
  1571. package/Shared/Modules/BlobCollector.cpp +21 -0
  1572. package/Shared/Modules/BlobCollector.h +23 -0
  1573. package/Shared/Modules/BlobModule.cpp +191 -0
  1574. package/Shared/Modules/BlobModule.h +91 -0
  1575. package/Shared/Modules/CxxModuleUtilities.cpp +51 -0
  1576. package/Shared/Modules/CxxModuleUtilities.h +40 -0
  1577. package/Shared/Modules/ExceptionsManagerModule.cpp +209 -0
  1578. package/Shared/Modules/FileReaderModule.cpp +217 -0
  1579. package/Shared/Modules/FileReaderModule.h +80 -0
  1580. package/Shared/Modules/HttpModule.cpp +329 -0
  1581. package/Shared/Modules/HttpModule.h +92 -0
  1582. package/Shared/Modules/I18nModule.cpp +36 -0
  1583. package/Shared/Modules/I18nModule.h +28 -0
  1584. package/Shared/Modules/IHttpModuleProxy.h +30 -0
  1585. package/Shared/Modules/IRequestBodyHandler.h +54 -0
  1586. package/Shared/Modules/IResponseHandler.h +27 -0
  1587. package/Shared/Modules/IUriHandler.h +37 -0
  1588. package/Shared/Modules/IWebSocketModuleContentHandler.h +28 -0
  1589. package/Shared/Modules/IWebSocketModuleProxy.h +22 -0
  1590. package/Shared/Modules/NetworkingModule.cpp +432 -0
  1591. package/Shared/Modules/NetworkingModule.h +34 -0
  1592. package/Shared/Modules/PlatformConstantsModule.cpp +60 -0
  1593. package/Shared/Modules/PlatformConstantsModule.h +23 -0
  1594. package/Shared/Modules/SourceCodeModule.h +27 -0
  1595. package/Shared/Modules/StatusBarManagerModule.h +19 -0
  1596. package/Shared/Modules/WebSocketModule.cpp +536 -0
  1597. package/Shared/Modules/WebSocketModule.h +105 -0
  1598. package/Shared/Modules/WebSocketTurboModule.h +71 -0
  1599. package/Shared/Networking/DefaultBlobResource.cpp +323 -0
  1600. package/Shared/Networking/DefaultBlobResource.h +133 -0
  1601. package/Shared/Networking/IBlobResource.h +56 -0
  1602. package/Shared/Networking/IHttpResource.h +229 -0
  1603. package/Shared/Networking/IRedirectEventSource.h +18 -0
  1604. package/Shared/Networking/IWebSocketResource.h +185 -0
  1605. package/Shared/Networking/IWinRTHttpRequestFactory.h +22 -0
  1606. package/Shared/Networking/NetworkPropertyIds.cpp +60 -0
  1607. package/Shared/Networking/NetworkPropertyIds.h +41 -0
  1608. package/Shared/Networking/OriginPolicy.h +15 -0
  1609. package/Shared/Networking/OriginPolicyHttpFilter.cpp +798 -0
  1610. package/Shared/Networking/OriginPolicyHttpFilter.h +123 -0
  1611. package/Shared/Networking/RedirectHttpFilter.cpp +301 -0
  1612. package/Shared/Networking/RedirectHttpFilter.h +100 -0
  1613. package/Shared/Networking/WinRTHttpResource.cpp +720 -0
  1614. package/Shared/Networking/WinRTHttpResource.h +127 -0
  1615. package/Shared/Networking/WinRTTypes.h +33 -0
  1616. package/Shared/Networking/WinRTWebSocketResource.cpp +812 -0
  1617. package/Shared/Networking/WinRTWebSocketResource.h +331 -0
  1618. package/Shared/OInstance.cpp +392 -357
  1619. package/Shared/OInstance.h +124 -0
  1620. package/Shared/PackagerConnection.cpp +154 -0
  1621. package/Shared/PackagerConnection.h +37 -0
  1622. package/Shared/RuntimeOptions.cpp +126 -0
  1623. package/Shared/RuntimeOptions.h +60 -0
  1624. package/Shared/SafeLoadLibrary.cpp +77 -0
  1625. package/Shared/SafeLoadLibrary.h +19 -0
  1626. package/Shared/Shared.vcxitems +703 -93
  1627. package/Shared/Shared.vcxitems.filters +688 -138
  1628. package/Shared/SystemChakraRuntime.h +38 -0
  1629. package/Shared/Threading/BatchingQueueThread.cpp +128 -0
  1630. package/Shared/Threading/BatchingQueueThread.h +59 -0
  1631. package/Shared/Threading/MessageDispatchQueue.cpp +170 -0
  1632. package/Shared/Threading/MessageDispatchQueue.h +77 -0
  1633. package/Shared/Threading/MessageQueueThreadFactory.cpp +26 -0
  1634. package/Shared/Threading/MessageQueueThreadFactory.h +18 -0
  1635. package/Shared/TurboModuleManager.cpp +94 -0
  1636. package/Shared/TurboModuleManager.h +30 -0
  1637. package/Shared/TurboModuleRegistry.h +35 -0
  1638. package/Shared/Utils/CppWinrtLessExceptions.h +62 -0
  1639. package/Shared/Utils/WinRTConversions.cpp +22 -0
  1640. package/Shared/Utils/WinRTConversions.h +15 -0
  1641. package/Shared/Utils.cpp +131 -0
  1642. package/Shared/Utils.h +25 -0
  1643. package/Shared/V8JSIRuntimeHolder.cpp +71 -0
  1644. package/Shared/V8JSIRuntimeHolder.h +56 -0
  1645. package/Shared/WebSocketJSExecutorFactory.h +27 -0
  1646. package/Shared/tracing/fbsystrace.h +104 -0
  1647. package/Shared/tracing/tracing.cpp +396 -0
  1648. package/Shared/tracing/tracing.h +20 -0
  1649. package/codegen/.clang-format +2 -0
  1650. package/codegen/NativeAccessibilityInfoSpec.g.h +47 -15
  1651. package/codegen/NativeAccessibilityManagerSpec.g.h +96 -32
  1652. package/codegen/NativeActionSheetManagerSpec.g.h +90 -7
  1653. package/codegen/NativeAlertManagerSpec.g.h +35 -4
  1654. package/codegen/NativeAnimatedModuleSpec.g.h +134 -76
  1655. package/codegen/NativeAnimatedTurboModuleSpec.g.h +199 -0
  1656. package/codegen/NativeAppStateSpec.g.h +32 -8
  1657. package/codegen/NativeAppThemeSpec.g.h +69 -0
  1658. package/codegen/NativeAppearanceSpec.g.h +19 -11
  1659. package/codegen/NativeBlobModuleSpec.g.h +30 -15
  1660. package/codegen/NativeBugReportingSpec.g.h +8 -12
  1661. package/codegen/NativeCPUTimeSpec.g.h +41 -0
  1662. package/codegen/NativeClipboardSpec.g.h +8 -6
  1663. package/codegen/NativeDOMSpec.g.h +137 -0
  1664. package/codegen/NativeDevLoadingViewSpec.g.h +8 -6
  1665. package/codegen/NativeDevMenuSpec.g.h +13 -11
  1666. package/codegen/NativeDevSettingsSpec.g.h +40 -20
  1667. package/codegen/NativeDeviceEventManagerSpec.g.h +5 -3
  1668. package/codegen/NativeDeviceInfoSpec.g.h +69 -1
  1669. package/codegen/NativeDialogManagerAndroidSpec.g.h +58 -4
  1670. package/codegen/NativeDialogManagerWindowsSpec.g.h +91 -0
  1671. package/codegen/NativeExceptionsManagerSpec.g.h +59 -19
  1672. package/codegen/NativeFantomSpec.g.h +78 -0
  1673. package/codegen/NativeFileReaderModuleSpec.g.h +9 -7
  1674. package/codegen/NativeFrameRateLoggerSpec.g.h +23 -10
  1675. package/codegen/NativeHeadlessJsTaskSupportSpec.g.h +8 -6
  1676. package/codegen/NativeI18nManagerSpec.g.h +24 -7
  1677. package/codegen/NativeIdleCallbacksSpec.g.h +65 -0
  1678. package/codegen/NativeImageEditorSpec.g.h +93 -0
  1679. package/codegen/NativeImageLoaderAndroidSpec.g.h +30 -15
  1680. package/codegen/NativeImageLoaderIOSSpec.g.h +34 -13
  1681. package/codegen/NativeImageStoreAndroidSpec.g.h +35 -0
  1682. package/codegen/NativeImageStoreIOSSpec.g.h +75 -0
  1683. package/codegen/NativeIntentAndroidSpec.g.h +59 -0
  1684. package/codegen/NativeIntersectionObserverSpec.g.h +99 -0
  1685. package/codegen/NativeJSCHeapCaptureSpec.g.h +35 -0
  1686. package/codegen/NativeKeyboardObserverSpec.g.h +7 -5
  1687. package/codegen/NativeLinkingManagerSpec.g.h +65 -0
  1688. package/codegen/NativeLogBoxSpec.g.h +7 -5
  1689. package/codegen/NativeMicrotasksSpec.g.h +35 -0
  1690. package/codegen/NativeModalManagerSpec.g.h +7 -5
  1691. package/codegen/NativeMutationObserverSpec.g.h +91 -0
  1692. package/codegen/NativeNetworkingAndroidSpec.g.h +15 -13
  1693. package/codegen/NativeNetworkingIOSSpec.g.h +40 -13
  1694. package/codegen/NativePerformanceSpec.g.h +193 -0
  1695. package/codegen/NativePermissionsAndroidSpec.g.h +15 -13
  1696. package/codegen/NativePlatformConstantsAndroidSpec.g.h +55 -3
  1697. package/codegen/NativePlatformConstantsIOSSpec.g.h +45 -1
  1698. package/codegen/NativePlatformConstantsWindowsSpec.g.h +82 -0
  1699. package/codegen/NativePushNotificationManagerIOSSpec.g.h +113 -48
  1700. package/codegen/NativeReactDevToolsRuntimeSettingsModuleSpec.g.h +67 -0
  1701. package/codegen/NativeReactDevToolsSettingsManagerSpec.g.h +41 -0
  1702. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +305 -0
  1703. package/codegen/NativeRedBoxSpec.g.h +8 -6
  1704. package/codegen/NativeSampleTurboModuleSpec.g.h +148 -32
  1705. package/codegen/NativeSegmentFetcherSpec.g.h +9 -7
  1706. package/codegen/NativeSettingsManagerSpec.g.h +30 -7
  1707. package/codegen/NativeShareModuleSpec.g.h +30 -4
  1708. package/codegen/NativeSoundManagerSpec.g.h +5 -3
  1709. package/codegen/NativeSourceCodeSpec.g.h +14 -1
  1710. package/codegen/NativeStatusBarManagerAndroidSpec.g.h +35 -10
  1711. package/codegen/NativeStatusBarManagerIOSSpec.g.h +51 -15
  1712. package/codegen/NativeTimingSpec.g.h +9 -7
  1713. package/codegen/NativeToastAndroidSpec.g.h +38 -7
  1714. package/codegen/NativeUIManagerSpec.g.h +87 -115
  1715. package/codegen/NativeVibrationSpec.g.h +10 -8
  1716. package/codegen/NativeWebSocketModuleSpec.g.h +29 -16
  1717. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
  1718. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
  1719. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
  1720. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
  1721. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
  1722. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
  1723. package/codegen/react/components/rnwcore/ComponentDescriptors.h +30 -0
  1724. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
  1725. package/codegen/react/components/rnwcore/EventEmitters.cpp +132 -0
  1726. package/codegen/react/components/rnwcore/EventEmitters.h +169 -0
  1727. package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
  1728. package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
  1729. package/codegen/react/components/rnwcore/Props.cpp +156 -0
  1730. package/codegen/react/components/rnwcore/Props.h +397 -0
  1731. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
  1732. package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
  1733. package/codegen/react/components/rnwcore/ShadowNodes.cpp +23 -0
  1734. package/codegen/react/components/rnwcore/ShadowNodes.h +98 -0
  1735. package/codegen/react/components/rnwcore/States.cpp +16 -0
  1736. package/codegen/react/components/rnwcore/States.h +101 -0
  1737. package/codegen/react/components/rnwcore/Switch.g.h +263 -0
  1738. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
  1739. package/codegen/rnwcoreJSI-generated.cpp +3374 -0
  1740. package/codegen/rnwcoreJSI.h +9336 -0
  1741. package/fmt/.clang-format +2 -0
  1742. package/fmt/TEMP_UntilFmtUpdate/core.h +2925 -0
  1743. package/fmt/cgmanifest.json +15 -0
  1744. package/fmt/fmt.vcxproj +161 -0
  1745. package/fmt/fmt.vcxproj.filters +59 -0
  1746. package/fmt/pch.cpp +4 -0
  1747. package/fmt/pch.h +2 -0
  1748. package/generate.js +15 -0
  1749. package/include/Include.vcxitems +4 -29
  1750. package/include/Include.vcxitems.filters +11 -91
  1751. package/include/Shared/cdebug.h +51 -0
  1752. package/index.js +390 -242
  1753. package/index.windows.js +817 -64
  1754. package/interface.js +9 -9
  1755. package/jest/MockNativeMethods.js +21 -0
  1756. package/jest/__tests__/setup-test.js +18 -0
  1757. package/jest/assetFileTransformer.js +32 -0
  1758. package/jest/local-setup.js +28 -0
  1759. package/jest/mockComponent.js +74 -0
  1760. package/jest/mockModal.js +32 -0
  1761. package/jest/mockNativeComponent.js +40 -0
  1762. package/jest/mockScrollView.js +35 -0
  1763. package/jest/react-native-env.js +16 -0
  1764. package/jest/renderer.js +41 -0
  1765. package/jest/setup.js +455 -0
  1766. package/just-task.js +44 -63
  1767. package/metro.config.js +3 -62
  1768. package/package.json +99 -64
  1769. package/react-native.config.js +48 -14
  1770. package/rn-get-polyfills.js +3 -6
  1771. package/src/private/animated/NativeAnimatedHelper.js +440 -0
  1772. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  1773. package/src/private/animated/useAnimatedPropsMemo.js +356 -0
  1774. package/src/private/components/HScrollViewNativeComponents.js +30 -0
  1775. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +32 -0
  1776. package/src/private/components/VScrollViewNativeComponents.js +25 -0
  1777. package/src/private/debugging/FuseboxSessionObserver.js +42 -0
  1778. package/src/private/debugging/ReactDevToolsSettingsManager.android.js +20 -0
  1779. package/src/private/debugging/ReactDevToolsSettingsManager.ios.js +30 -0
  1780. package/src/private/debugging/ReactDevToolsSettingsManager.windows.js +20 -0
  1781. package/src/private/debugging/setUpFuseboxReactDevToolsDispatcher.js +114 -0
  1782. package/src/private/devmenu/DevMenu.d.ts +20 -0
  1783. package/src/private/devmenu/DevMenu.js +31 -0
  1784. package/src/private/featureflags/ReactNativeFeatureFlags.js +375 -0
  1785. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +109 -0
  1786. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +78 -0
  1787. package/src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule.js +34 -0
  1788. package/src/private/renderer/errorhandling/ErrorHandlers.js +83 -0
  1789. package/src/private/setup/setUpDOM.js +36 -0
  1790. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  1791. package/src/private/setup/setUpMutationObserver.js +31 -0
  1792. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  1793. package/src/private/specs/components/ActivityIndicatorViewNativeComponent.js +53 -0
  1794. package/src/private/specs/components/AndroidDrawerLayoutNativeComponent.js +124 -0
  1795. package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +27 -0
  1796. package/src/private/specs/components/AndroidSwipeRefreshLayoutNativeComponent.js +74 -0
  1797. package/src/private/specs/components/AndroidSwitchNativeComponent.js +62 -0
  1798. package/src/private/specs/components/DebuggingOverlayNativeComponent.js +61 -0
  1799. package/src/private/specs/components/ProgressBarAndroidNativeComponent.js +36 -0
  1800. package/src/private/specs/components/PullToRefreshViewNativeComponent.js +71 -0
  1801. package/src/private/specs/components/RCTInputAccessoryViewNativeComponent.js +26 -0
  1802. package/src/private/specs/components/RCTModalHostViewNativeComponent.js +147 -0
  1803. package/src/private/specs/components/RCTSafeAreaViewNativeComponent.js +25 -0
  1804. package/src/private/specs/components/SwitchNativeComponent.js +61 -0
  1805. package/src/private/specs/components/UnimplementedNativeViewNativeComponent.js +26 -0
  1806. package/src/private/specs/modules/NativeAccessibilityInfo.js +42 -0
  1807. package/src/private/specs/modules/NativeAccessibilityManager.js +70 -0
  1808. package/src/private/specs/modules/NativeActionSheetManager.js +56 -0
  1809. package/src/private/specs/modules/NativeAlertManager.js +35 -0
  1810. package/src/private/specs/modules/NativeAnimatedModule.js +77 -0
  1811. package/src/private/specs/modules/NativeAnimatedTurboModule.js +78 -0
  1812. package/src/private/specs/modules/NativeAppState.js +33 -0
  1813. package/src/private/specs/modules/NativeAppTheme.js +33 -0
  1814. package/src/private/specs/modules/NativeAppearance.js +30 -0
  1815. package/src/private/specs/modules/NativeBlobModule.js +61 -0
  1816. package/src/private/specs/modules/NativeBugReporting.js +20 -0
  1817. package/src/private/specs/modules/NativeCPUTime.js +24 -0
  1818. package/src/private/specs/modules/NativeClipboard.js +21 -0
  1819. package/src/private/specs/modules/NativeDevLoadingView.js +24 -0
  1820. package/src/private/specs/modules/NativeDevMenu.js +23 -0
  1821. package/src/private/specs/modules/NativeDevSettings.js +34 -0
  1822. package/src/private/specs/modules/NativeDeviceEventManager.js +19 -0
  1823. package/src/private/specs/modules/NativeDeviceInfo.js +58 -0
  1824. package/src/private/specs/modules/NativeDialogManagerAndroid.js +48 -0
  1825. package/src/private/specs/modules/NativeDialogManagerWindows.js +51 -0
  1826. package/src/private/specs/modules/NativeExceptionsManager.js +91 -0
  1827. package/src/private/specs/modules/NativeFantom.js +37 -0
  1828. package/src/private/specs/modules/NativeFileReaderModule.js +22 -0
  1829. package/src/private/specs/modules/NativeFrameRateLogger.js +22 -0
  1830. package/src/private/specs/modules/NativeHeadlessJsTaskSupport.js +20 -0
  1831. package/src/private/specs/modules/NativeI18nManager.js +28 -0
  1832. package/src/private/specs/modules/NativeImageEditor.js +52 -0
  1833. package/src/private/specs/modules/NativeImageLoaderAndroid.js +30 -0
  1834. package/src/private/specs/modules/NativeImageLoaderIOS.js +37 -0
  1835. package/src/private/specs/modules/NativeImageStoreAndroid.js +26 -0
  1836. package/src/private/specs/modules/NativeImageStoreIOS.js +33 -0
  1837. package/src/private/specs/modules/NativeIntentAndroid.js +30 -0
  1838. package/src/private/specs/modules/NativeJSCHeapCapture.js +19 -0
  1839. package/src/private/specs/modules/NativeKeyboardObserver.js +20 -0
  1840. package/src/private/specs/modules/NativeLinkingManager.js +27 -0
  1841. package/src/private/specs/modules/NativeLogBox.js +20 -0
  1842. package/src/private/specs/modules/NativeModalManager.js +21 -0
  1843. package/src/private/specs/modules/NativeNetworkingAndroid.js +37 -0
  1844. package/src/private/specs/modules/NativeNetworkingIOS.js +37 -0
  1845. package/src/private/specs/modules/NativePermissionsAndroid.js +77 -0
  1846. package/src/private/specs/modules/NativePlatformConstantsAndroid.js +44 -0
  1847. package/src/private/specs/modules/NativePlatformConstantsIOS.js +37 -0
  1848. package/src/private/specs/modules/NativePlatformConstantsWindows.js +45 -0
  1849. package/src/private/specs/modules/NativePushNotificationManagerIOS.js +103 -0
  1850. package/src/private/specs/modules/NativeReactDevToolsSettingsManager.js +22 -0
  1851. package/src/private/specs/modules/NativeRedBox.js +20 -0
  1852. package/src/private/specs/modules/NativeSampleTurboModule.js +66 -0
  1853. package/src/private/specs/modules/NativeSegmentFetcher.js +28 -0
  1854. package/src/private/specs/modules/NativeSettingsManager.js +25 -0
  1855. package/src/private/specs/modules/NativeShareModule.js +23 -0
  1856. package/src/private/specs/modules/NativeSoundManager.js +22 -0
  1857. package/src/private/specs/modules/NativeSourceCode.js +36 -0
  1858. package/src/private/specs/modules/NativeStatusBarManagerAndroid.js +68 -0
  1859. package/src/private/specs/modules/NativeStatusBarManagerIOS.js +89 -0
  1860. package/src/private/specs/modules/NativeTiming.js +26 -0
  1861. package/src/private/specs/modules/NativeToastAndroid.js +38 -0
  1862. package/src/private/specs/modules/NativeUIManager.js +111 -0
  1863. package/src/private/specs/modules/NativeVibration.js +24 -0
  1864. package/src/private/specs/modules/NativeWebSocketModule.js +34 -0
  1865. package/src/private/styles/composeStyles.js +27 -0
  1866. package/src/private/utilities/ensureInstance.js +21 -0
  1867. package/src/private/webapis/dom/geometry/DOMRect.js +82 -0
  1868. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +188 -0
  1869. package/src/private/webapis/dom/nodes/ReactNativeElement.js +231 -0
  1870. package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +71 -0
  1871. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +247 -0
  1872. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +367 -0
  1873. package/src/private/webapis/dom/nodes/ReadOnlyText.js +30 -0
  1874. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +468 -0
  1875. package/src/private/webapis/dom/nodes/utilities/Traversal.js +54 -0
  1876. package/src/private/webapis/dom/oldstylecollections/ArrayLikeUtils.js +46 -0
  1877. package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +76 -0
  1878. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +82 -0
  1879. package/src/private/webapis/dom/oldstylecollections/NodeList.js +104 -0
  1880. package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +34 -0
  1881. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +345 -0
  1882. package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +167 -0
  1883. package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +277 -0
  1884. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +43 -0
  1885. package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +21 -0
  1886. package/src/private/webapis/mutationobserver/MutationObserver.js +186 -0
  1887. package/src/private/webapis/mutationobserver/MutationObserverManager.js +227 -0
  1888. package/src/private/webapis/mutationobserver/MutationRecord.js +82 -0
  1889. package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +58 -0
  1890. package/src/private/webapis/performance/EventTiming.js +145 -0
  1891. package/src/private/webapis/performance/LongTasks.js +39 -0
  1892. package/src/private/webapis/performance/MemoryInfo.js +54 -0
  1893. package/src/private/webapis/performance/Performance.js +287 -0
  1894. package/src/private/webapis/performance/PerformanceEntry.js +68 -0
  1895. package/src/private/webapis/performance/PerformanceObserver.js +232 -0
  1896. package/src/private/webapis/performance/RawPerformanceEntry.js +105 -0
  1897. package/src/private/webapis/performance/ReactNativeStartupTiming.js +91 -0
  1898. package/src/private/webapis/performance/UserTiming.js +72 -0
  1899. package/src/private/webapis/performance/Utilities.js +18 -0
  1900. package/src/private/webapis/performance/specs/NativePerformance.js +92 -0
  1901. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +267 -0
  1902. package/stubs/double-conversion/double-conversion.h +23 -6
  1903. package/stubs/glog/logging.h +8 -0
  1904. package/template/.clang-format +4 -0
  1905. package/template/cpp-app/proj/MyApp.sln +166 -0
  1906. package/template/cpp-app/proj/MyApp.vcxproj +176 -0
  1907. package/template/cpp-app/proj/MyApp.vcxproj.filters +62 -0
  1908. package/template/cpp-app/src/App.cpp +93 -0
  1909. package/template/cpp-app/src/App.h +21 -0
  1910. package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +13 -0
  1911. package/template/cpp-app/src/AutolinkedNativeModules.g.h +10 -0
  1912. package/template/cpp-app/src/MainPage.cpp +20 -0
  1913. package/template/cpp-app/src/MainPage.h +19 -0
  1914. package/template/cpp-app/src/MainPage.idl +10 -0
  1915. package/template/cpp-app/src/PropertySheet.props +16 -0
  1916. package/template/cpp-app/src/ReactPackageProvider.cpp +15 -0
  1917. package/template/cpp-app/src/ReactPackageProvider.h +13 -0
  1918. package/template/cpp-app/src/pch.h +24 -0
  1919. package/template/cpp-lib/proj/MyLib.def +3 -0
  1920. package/template/cpp-lib/proj/MyLib.sln +166 -0
  1921. package/template/cpp-lib/proj/MyLib.vcxproj +148 -0
  1922. package/template/cpp-lib/proj/MyLib.vcxproj.filters +19 -0
  1923. package/template/cpp-lib/src/PropertySheet.props +16 -0
  1924. package/template/cpp-lib/src/ReactNativeModule.h +33 -0
  1925. package/template/cpp-lib/src/ReactPackageProvider.cpp +19 -0
  1926. package/template/cpp-lib/src/ReactPackageProvider.h +21 -0
  1927. package/template/cpp-lib/src/ReactPackageProvider.idl +9 -0
  1928. package/template/cpp-lib/src/pch.cpp +1 -0
  1929. package/template/cpp-lib/src/pch.h +21 -0
  1930. package/template/cs-app/proj/MyApp.csproj +162 -0
  1931. package/template/cs-app/proj/MyApp.sln +191 -0
  1932. package/template/cs-app/src/App.xaml.cs +62 -0
  1933. package/template/cs-app/src/AutolinkedNativeModules.g.cs +13 -0
  1934. package/template/cs-app/src/MainPage.xaml.cs +34 -0
  1935. package/template/cs-app/src/ReactPackageProvider.cs +17 -0
  1936. package/template/cs-lib/proj/MyLib.csproj +134 -0
  1937. package/template/cs-lib/proj/MyLib.sln +191 -0
  1938. package/template/cs-lib/src/Properties/AssemblyInfo.cs +29 -0
  1939. package/template/cs-lib/src/Properties/Default.rd.xml +32 -0
  1940. package/template/cs-lib/src/ReactNativeModule.cs +32 -0
  1941. package/template/cs-lib/src/ReactPackageProvider.cs +17 -0
  1942. package/template/index.windows.bundle +9 -0
  1943. package/template/metro.config.js +54 -0
  1944. package/template/shared-app/proj/ExperimentalFeatures.props +32 -0
  1945. package/template/shared-app/proj/NuGet_Config +19 -0
  1946. package/template/shared-app/src/AutolinkedNativeModules.g.props +6 -0
  1947. package/template/shared-app/src/AutolinkedNativeModules.g.targets +6 -0
  1948. package/template/shared-app/src/MainPage.xaml +21 -0
  1949. package/template/shared-app/src/Package.appxmanifest +50 -0
  1950. package/template/shared-lib/proj/ExperimentalFeatures.props +32 -0
  1951. package/template/shared-lib/proj/NuGet_Config +17 -0
  1952. package/templates/.clang-format +4 -0
  1953. package/templates/cpp-app/NuGet_Config +13 -0
  1954. package/templates/cpp-app/jest.config.windows.js +3 -0
  1955. package/templates/cpp-app/metro.config.js +54 -0
  1956. package/templates/cpp-app/template.config.js +151 -0
  1957. package/templates/cpp-app/windows/ExperimentalFeatures.props +27 -0
  1958. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +13 -0
  1959. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +10 -0
  1960. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.props +6 -0
  1961. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.targets +6 -0
  1962. package/templates/cpp-app/windows/MyApp/MyApp.cpp +82 -0
  1963. package/templates/cpp-app/windows/MyApp/MyApp.h +3 -0
  1964. package/templates/cpp-app/windows/MyApp/MyApp.ico +0 -0
  1965. package/templates/cpp-app/windows/MyApp/MyApp.rc +0 -0
  1966. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +138 -0
  1967. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj.filters +58 -0
  1968. package/templates/cpp-app/windows/MyApp/_gitignore +1 -0
  1969. package/templates/cpp-app/windows/MyApp/pch.cpp +1 -0
  1970. package/templates/cpp-app/windows/MyApp/pch.h +38 -0
  1971. package/templates/cpp-app/windows/MyApp/resource.h +17 -0
  1972. package/templates/cpp-app/windows/MyApp/small.ico +0 -0
  1973. package/templates/cpp-app/windows/MyApp/targetver.h +8 -0
  1974. package/templates/cpp-app/windows/MyApp.Package/MyApp.Package.wapproj +78 -0
  1975. package/templates/cpp-app/windows/MyApp.Package/Package.appxmanifest +49 -0
  1976. package/templates/cpp-app/windows/MyApp.sln +186 -0
  1977. package/templates/cpp-app/windows/_gitignore +41 -0
  1978. package/templates/cpp-lib/NuGet_Config +13 -0
  1979. package/templates/cpp-lib/example/NuGet_Config +6 -0
  1980. package/templates/cpp-lib/example/metro.config.js +74 -0
  1981. package/templates/cpp-lib/template.config.js +251 -0
  1982. package/templates/cpp-lib/windows/ExperimentalFeatures.props +33 -0
  1983. package/templates/cpp-lib/windows/MyLib/MyLib.cpp +18 -0
  1984. package/templates/cpp-lib/windows/MyLib/MyLib.def +3 -0
  1985. package/templates/cpp-lib/windows/MyLib/MyLib.h +31 -0
  1986. package/templates/cpp-lib/windows/MyLib/MyLib.rc +0 -0
  1987. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +143 -0
  1988. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj.filters +44 -0
  1989. package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.cpp +20 -0
  1990. package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.h +24 -0
  1991. package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.idl +9 -0
  1992. package/templates/cpp-lib/windows/MyLib/pch.cpp +1 -0
  1993. package/templates/cpp-lib/windows/MyLib/pch.h +30 -0
  1994. package/templates/cpp-lib/windows/MyLib/resource.h +5 -0
  1995. package/templates/cpp-lib/windows/MyLib/targetver.h +8 -0
  1996. package/templates/cpp-lib/windows/MyLib.sln +166 -0
  1997. package/templates/cpp-lib/windows/_gitignore +41 -0
  1998. package/templates/old/generateWrapper.js +72 -0
  1999. package/templates/old/uwp-cpp-app/template.config.js +15 -0
  2000. package/templates/old/uwp-cs-app/template.config.js +15 -0
  2001. package/templates/templateUtils.js +163 -0
  2002. package/types/index.d.ts +219 -0
  2003. package/types/modules/BatchedBridge.d.ts +32 -0
  2004. package/types/modules/Codegen.d.ts +80 -0
  2005. package/types/modules/Devtools.d.ts +32 -0
  2006. package/types/modules/LaunchScreen.d.ts +18 -0
  2007. package/types/modules/globals.d.ts +599 -0
  2008. package/types/private/TimerMixin.d.ts +19 -0
  2009. package/types/private/Utilities.d.ts +10 -0
  2010. package/types/public/DeprecatedPropertiesAlias.d.ts +185 -0
  2011. package/types/public/Insets.d.ts +15 -0
  2012. package/types/public/ReactNativeRenderer.d.ts +144 -0
  2013. package/types/public/ReactNativeTypes.d.ts +139 -0
  2014. package/CHANGELOG.json +0 -7177
  2015. package/CHANGELOG.md +0 -2616
  2016. package/Chakra/ChakraCoreDebugger.h +0 -147
  2017. package/Chakra/ChakraExecutor.cpp +0 -800
  2018. package/Chakra/ChakraExecutor.h +0 -162
  2019. package/Chakra/ChakraNativeModules.cpp +0 -67
  2020. package/Chakra/ChakraNativeModules.h +0 -36
  2021. package/DeforkingPatches/README.md +0 -5
  2022. package/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp +0 -94
  2023. package/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.h +0 -44
  2024. package/DeforkingPatches/ReactCommon/yoga/yoga/Yoga.cpp +0 -4406
  2025. package/DeforkingPatches/overrides.json +0 -28
  2026. package/Folly/packages.config +0 -4
  2027. package/JSI/Desktop/ChakraJsiRuntime_core.cpp +0 -329
  2028. package/JSI/Desktop/JSI.Desktop.vcxproj +0 -92
  2029. package/JSI/Desktop/JSI.Desktop.vcxproj.filters +0 -19
  2030. package/JSI/Desktop/packages.config +0 -5
  2031. package/JSI/Shared/ChakraObjectRef.cpp +0 -304
  2032. package/JSI/Shared/ChakraObjectRef.h +0 -249
  2033. package/JSI/Shared/ChakraRuntime.cpp +0 -983
  2034. package/JSI/Shared/ChakraRuntime.h +0 -365
  2035. package/JSI/Shared/ChakraRuntimeArgs.h +0 -50
  2036. package/JSI/Shared/ChakraRuntimeFactory.h +0 -14
  2037. package/JSI/Shared/JSI.Shared.vcxitems +0 -29
  2038. package/JSI/Shared/JSI.Shared.vcxitems.filters +0 -42
  2039. package/JSI/Shared/RuntimeHolder.h +0 -21
  2040. package/JSI/Shared/ScriptStore.h +0 -73
  2041. package/JSI/Universal/ChakraJsiRuntime_edgemode.cpp +0 -91
  2042. package/JSI/Universal/JSI.Universal.vcxproj +0 -122
  2043. package/JSI/Universal/JSI.Universal.vcxproj.filters +0 -16
  2044. package/Libraries/ART/ARTCGFloatArray.h +0 -18
  2045. package/Libraries/ART/ARTContainer.h +0 -16
  2046. package/Libraries/ART/ARTGroup.h +0 -17
  2047. package/Libraries/ART/ARTNode.h +0 -30
  2048. package/Libraries/ART/ARTRenderable.h +0 -23
  2049. package/Libraries/ART/ARTShape.h +0 -16
  2050. package/Libraries/ART/ARTSurfaceView.h +0 -14
  2051. package/Libraries/ART/ARTText.h +0 -18
  2052. package/Libraries/ART/ARTTextFrame.h +0 -23
  2053. package/Libraries/ART/Brushes/ARTBrush.h +0 -33
  2054. package/Libraries/ART/Brushes/ARTLinearGradient.h +0 -12
  2055. package/Libraries/ART/Brushes/ARTPattern.h +0 -12
  2056. package/Libraries/ART/Brushes/ARTRadialGradient.h +0 -12
  2057. package/Libraries/ART/Brushes/ARTSolidColor.h +0 -12
  2058. package/Libraries/ART/RCTConvert+ART.h +0 -29
  2059. package/Libraries/ART/ViewManagers/ARTGroupManager.h +0 -12
  2060. package/Libraries/ART/ViewManagers/ARTNodeManager.h +0 -16
  2061. package/Libraries/ART/ViewManagers/ARTRenderableManager.h +0 -15
  2062. package/Libraries/ART/ViewManagers/ARTShapeManager.h +0 -12
  2063. package/Libraries/ART/ViewManagers/ARTSurfaceViewManager.h +0 -12
  2064. package/Libraries/ART/ViewManagers/ARTTextManager.h +0 -12
  2065. package/Libraries/Animated/examples/demo.html +0 -712
  2066. package/Libraries/Animated/examples/pic1.jpg +0 -0
  2067. package/Libraries/Animated/examples/pic2.jpg +0 -0
  2068. package/Libraries/Animated/examples/pic3.jpg +0 -0
  2069. package/Libraries/Animated/release/gulpfile.js +0 -155
  2070. package/Libraries/Animated/src/Animated.js +0 -48
  2071. package/Libraries/Animated/src/AnimatedEvent.js +0 -204
  2072. package/Libraries/Animated/src/AnimatedImplementation.js +0 -718
  2073. package/Libraries/Animated/src/AnimatedMock.js +0 -156
  2074. package/Libraries/Animated/src/AnimatedWeb.js +0 -23
  2075. package/Libraries/Animated/src/Easing.js +0 -252
  2076. package/Libraries/Animated/src/NativeAnimatedHelper.js +0 -339
  2077. package/Libraries/Animated/src/NativeAnimatedModule.js +0 -66
  2078. package/Libraries/Animated/src/SpringConfig.js +0 -103
  2079. package/Libraries/Animated/src/animations/Animation.js +0 -74
  2080. package/Libraries/Animated/src/animations/DecayAnimation.js +0 -120
  2081. package/Libraries/Animated/src/animations/SpringAnimation.js +0 -357
  2082. package/Libraries/Animated/src/animations/TimingAnimation.js +0 -163
  2083. package/Libraries/Animated/src/bezier.js +0 -153
  2084. package/Libraries/Animated/src/components/AnimatedFlatList.js +0 -28
  2085. package/Libraries/Animated/src/components/AnimatedImage.js +0 -17
  2086. package/Libraries/Animated/src/components/AnimatedScrollView.js +0 -28
  2087. package/Libraries/Animated/src/components/AnimatedSectionList.js +0 -28
  2088. package/Libraries/Animated/src/components/AnimatedText.js +0 -17
  2089. package/Libraries/Animated/src/components/AnimatedView.js +0 -24
  2090. package/Libraries/Animated/src/createAnimatedComponent.js +0 -202
  2091. package/Libraries/Animated/src/nodes/AnimatedAddition.js +0 -63
  2092. package/Libraries/Animated/src/nodes/AnimatedDiffClamp.js +0 -71
  2093. package/Libraries/Animated/src/nodes/AnimatedDivision.js +0 -68
  2094. package/Libraries/Animated/src/nodes/AnimatedInterpolation.js +0 -377
  2095. package/Libraries/Animated/src/nodes/AnimatedInterpolation.windows.js +0 -380
  2096. package/Libraries/Animated/src/nodes/AnimatedModulo.js +0 -62
  2097. package/Libraries/Animated/src/nodes/AnimatedMultiplication.js +0 -63
  2098. package/Libraries/Animated/src/nodes/AnimatedNode.js +0 -184
  2099. package/Libraries/Animated/src/nodes/AnimatedProps.js +0 -176
  2100. package/Libraries/Animated/src/nodes/AnimatedStyle.js +0 -127
  2101. package/Libraries/Animated/src/nodes/AnimatedSubtraction.js +0 -63
  2102. package/Libraries/Animated/src/nodes/AnimatedTracking.js +0 -102
  2103. package/Libraries/Animated/src/nodes/AnimatedTransform.js +0 -121
  2104. package/Libraries/Animated/src/nodes/AnimatedValue.js +0 -258
  2105. package/Libraries/Animated/src/nodes/AnimatedValueXY.js +0 -226
  2106. package/Libraries/Animated/src/nodes/AnimatedWithChildren.js +0 -87
  2107. package/Libraries/Animated/src/polyfills/InteractionManager.js +0 -15
  2108. package/Libraries/Animated/src/polyfills/Set.js +0 -26
  2109. package/Libraries/Animated/src/polyfills/flattenStyle.js +0 -13
  2110. package/Libraries/AppTheme/AppTheme.d.ts +0 -28
  2111. package/Libraries/AppTheme/AppTheme.d.ts.map +0 -1
  2112. package/Libraries/AppTheme/AppTheme.js.map +0 -1
  2113. package/Libraries/AppTheme/AppThemeTypes.d.ts.map +0 -1
  2114. package/Libraries/AppTheme/AppThemeTypes.js +0 -8
  2115. package/Libraries/AppTheme/AppThemeTypes.js.map +0 -1
  2116. package/Libraries/Blob/RCTBlobCollector.h +0 -30
  2117. package/Libraries/Blob/RCTBlobManager.h +0 -28
  2118. package/Libraries/Blob/RCTBlobPlugins.h +0 -41
  2119. package/Libraries/Blob/RCTFileReaderModule.h +0 -12
  2120. package/Libraries/CameraRoll/RCTAssetsLibraryRequestHandler.h +0 -15
  2121. package/Libraries/CameraRoll/RCTCameraRollManager.h +0 -22
  2122. package/Libraries/CameraRoll/RCTCameraRollPlugins.h +0 -43
  2123. package/Libraries/CameraRoll/RCTImagePickerManager.h +0 -12
  2124. package/Libraries/CameraRoll/RCTPhotoLibraryImageLoader.h +0 -12
  2125. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js +0 -162
  2126. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.ios.js +0 -271
  2127. package/Libraries/Components/AppleTV/NativeTVNavigationEventEmitter.js +0 -23
  2128. package/Libraries/Components/AppleTV/TVEventHandler.js +0 -52
  2129. package/Libraries/Components/CheckBox/AndroidCheckBoxNativeComponent.js +0 -68
  2130. package/Libraries/Components/CheckBox/CheckBox.android.js +0 -211
  2131. package/Libraries/Components/CheckBox/CheckBox.ios.js +0 -13
  2132. package/Libraries/Components/CheckBox/CheckBox.windows.d.ts +0 -2
  2133. package/Libraries/Components/CheckBox/CheckBox.windows.d.ts.map +0 -1
  2134. package/Libraries/Components/CheckBox/CheckBox.windows.js +0 -82
  2135. package/Libraries/Components/CheckBox/CheckBox.windows.js.map +0 -1
  2136. package/Libraries/Components/CheckBox/CheckBoxProps.d.ts +0 -19
  2137. package/Libraries/Components/CheckBox/CheckBoxProps.d.ts.map +0 -1
  2138. package/Libraries/Components/CheckBox/CheckBoxProps.js +0 -8
  2139. package/Libraries/Components/CheckBox/CheckBoxProps.js.map +0 -1
  2140. package/Libraries/Components/DatePicker/DatePicker.d.ts +0 -11
  2141. package/Libraries/Components/DatePicker/DatePicker.d.ts.map +0 -1
  2142. package/Libraries/Components/DatePicker/DatePicker.js +0 -96
  2143. package/Libraries/Components/DatePicker/DatePicker.js.map +0 -1
  2144. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -46
  2145. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -189
  2146. package/Libraries/Components/DatePicker/DatePickerIOS.windows.js +0 -8
  2147. package/Libraries/Components/DatePicker/DatePickerProps.d.ts +0 -33
  2148. package/Libraries/Components/DatePicker/DatePickerProps.d.ts.map +0 -1
  2149. package/Libraries/Components/DatePicker/DatePickerProps.js +0 -3
  2150. package/Libraries/Components/DatePicker/DatePickerProps.js.map +0 -1
  2151. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -61
  2152. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -89
  2153. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  2154. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.windows.js +0 -8
  2155. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  2156. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +0 -22
  2157. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +0 -12
  2158. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.windows.js +0 -8
  2159. package/Libraries/Components/Flyout/Flyout.d.ts.map +0 -1
  2160. package/Libraries/Components/Flyout/Flyout.js.map +0 -1
  2161. package/Libraries/Components/Flyout/FlyoutProps.d.ts +0 -22
  2162. package/Libraries/Components/Flyout/FlyoutProps.d.ts.map +0 -1
  2163. package/Libraries/Components/Flyout/FlyoutProps.js +0 -3
  2164. package/Libraries/Components/Flyout/FlyoutProps.js.map +0 -1
  2165. package/Libraries/Components/Glyph/Glyph.d.ts.map +0 -1
  2166. package/Libraries/Components/Glyph/Glyph.js.map +0 -1
  2167. package/Libraries/Components/Glyph/GlyphProps.d.ts +0 -17
  2168. package/Libraries/Components/Glyph/GlyphProps.d.ts.map +0 -1
  2169. package/Libraries/Components/Glyph/GlyphProps.js +0 -8
  2170. package/Libraries/Components/Glyph/GlyphProps.js.map +0 -1
  2171. package/Libraries/Components/Keyboard/KeyboardExt.d.ts.map +0 -1
  2172. package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts.map +0 -1
  2173. package/Libraries/Components/MaskedView/MaskedViewIOS.android.js +0 -13
  2174. package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +0 -93
  2175. package/Libraries/Components/MaskedView/MaskedViewIOS.windows.js +0 -9
  2176. package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +0 -21
  2177. package/Libraries/Components/Picker/AndroidDialogPickerNativeComponent.js +0 -67
  2178. package/Libraries/Components/Picker/AndroidDropdownPickerNativeComponent.js +0 -67
  2179. package/Libraries/Components/Picker/Picker.js +0 -155
  2180. package/Libraries/Components/Picker/Picker.windows.js +0 -160
  2181. package/Libraries/Components/Picker/PickerAndroid.android.js +0 -127
  2182. package/Libraries/Components/Picker/PickerAndroid.ios.js +0 -12
  2183. package/Libraries/Components/Picker/PickerAndroid.windows.js +0 -8
  2184. package/Libraries/Components/Picker/PickerIOS.android.js +0 -14
  2185. package/Libraries/Components/Picker/PickerIOS.ios.js +0 -155
  2186. package/Libraries/Components/Picker/PickerIOS.windows.js +0 -8
  2187. package/Libraries/Components/Picker/PickerProps.d.ts +0 -30
  2188. package/Libraries/Components/Picker/PickerProps.d.ts.map +0 -1
  2189. package/Libraries/Components/Picker/PickerProps.js +0 -8
  2190. package/Libraries/Components/Picker/PickerProps.js.map +0 -1
  2191. package/Libraries/Components/Picker/PickerWindows.d.ts +0 -37
  2192. package/Libraries/Components/Picker/PickerWindows.d.ts.map +0 -1
  2193. package/Libraries/Components/Picker/PickerWindows.js +0 -118
  2194. package/Libraries/Components/Picker/PickerWindows.js.map +0 -1
  2195. package/Libraries/Components/Picker/RCTPickerNativeComponent.js +0 -61
  2196. package/Libraries/Components/Picker/RCTPickerNativeComponent.windows.js +0 -60
  2197. package/Libraries/Components/Popup/Popup.d.ts.map +0 -1
  2198. package/Libraries/Components/Popup/Popup.js.map +0 -1
  2199. package/Libraries/Components/Popup/PopupProps.d.ts +0 -27
  2200. package/Libraries/Components/Popup/PopupProps.d.ts.map +0 -1
  2201. package/Libraries/Components/Popup/PopupProps.js +0 -8
  2202. package/Libraries/Components/Popup/PopupProps.js.map +0 -1
  2203. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js +0 -12
  2204. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.windows.js +0 -8
  2205. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +0 -46
  2206. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +0 -77
  2207. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.windows.js +0 -8
  2208. package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +0 -35
  2209. package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +0 -63
  2210. package/Libraries/Components/ScrollResponder.js +0 -757
  2211. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +0 -77
  2212. package/Libraries/Components/ScrollView/__mocks__/ScrollViewMock.js +0 -39
  2213. package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -44
  2214. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -46
  2215. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
  2216. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.windows.js +0 -8
  2217. package/Libraries/Components/Slider/Slider.js +0 -276
  2218. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -60
  2219. package/Libraries/Components/StaticContainer.react.js +0 -54
  2220. package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.windows.js +0 -41
  2221. package/Libraries/Components/StatusBar/StatusBarIOS.js +0 -22
  2222. package/Libraries/Components/Switch/SwitchNativeComponent.windows.js +0 -59
  2223. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +0 -39
  2224. package/Libraries/Components/ToastAndroid/ToastAndroid.windows.js +0 -8
  2225. package/Libraries/Components/Touchable/TVTouchable.js +0 -55
  2226. package/Libraries/Components/Touchable/__mocks__/ensureComponentIsNative.js +0 -12
  2227. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -26
  2228. package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -342
  2229. package/Libraries/Components/View/ReactNativeViewViewConfig.windows.js +0 -378
  2230. package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -74
  2231. package/Libraries/Components/View/ViewWindows.d.ts +0 -20
  2232. package/Libraries/Components/View/ViewWindows.d.ts.map +0 -1
  2233. package/Libraries/Components/View/ViewWindows.js +0 -30
  2234. package/Libraries/Components/View/ViewWindows.js.map +0 -1
  2235. package/Libraries/Components/View/ViewWindowsProps.d.ts +0 -32
  2236. package/Libraries/Components/View/ViewWindowsProps.d.ts.map +0 -1
  2237. package/Libraries/Components/View/ViewWindowsProps.js +0 -8
  2238. package/Libraries/Components/View/ViewWindowsProps.js.map +0 -1
  2239. package/Libraries/Core/setUpReactDevTools.windows.js +0 -59
  2240. package/Libraries/Core/setUpSystrace.js +0 -21
  2241. package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +0 -76
  2242. package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +0 -28
  2243. package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.js +0 -82
  2244. package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +0 -40
  2245. package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +0 -76
  2246. package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +0 -233
  2247. package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +0 -24
  2248. package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +0 -30
  2249. package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +0 -32
  2250. package/Libraries/DeprecatedPropTypes/DeprecatedTVViewPropTypes.js +0 -23
  2251. package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +0 -622
  2252. package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +0 -158
  2253. package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +0 -157
  2254. package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +0 -99
  2255. package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +0 -44
  2256. package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.windows.js +0 -71
  2257. package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +0 -408
  2258. package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +0 -68
  2259. package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +0 -86
  2260. package/Libraries/Experimental/Incremental.js +0 -198
  2261. package/Libraries/FBLazyVector/FBLazyVector/FBLazyIterator.h +0 -130
  2262. package/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h +0 -99
  2263. package/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +0 -3872
  2264. package/Libraries/HeapCapture/HeapCapture.js +0 -31
  2265. package/Libraries/HeapCapture/NativeHeapCapture.js +0 -24
  2266. package/Libraries/Image/ImagePickerIOS.js +0 -105
  2267. package/Libraries/Image/NativeImagePickerIOS.js +0 -40
  2268. package/Libraries/Image/RCTAnimatedImage.h +0 -21
  2269. package/Libraries/Image/RCTGIFImageDecoder.h +0 -12
  2270. package/Libraries/Image/RCTImageBlurUtils.h +0 -13
  2271. package/Libraries/Image/RCTImageCache.h +0 -42
  2272. package/Libraries/Image/RCTImageDataDecoder.h +0 -53
  2273. package/Libraries/Image/RCTImageEditingManager.h +0 -12
  2274. package/Libraries/Image/RCTImageLoader.h +0 -40
  2275. package/Libraries/Image/RCTImageLoaderProtocol.h +0 -117
  2276. package/Libraries/Image/RCTImageLoaderWithAttributionProtocol.h +0 -32
  2277. package/Libraries/Image/RCTImagePlugins.h +0 -44
  2278. package/Libraries/Image/RCTImageShadowView.h +0 -12
  2279. package/Libraries/Image/RCTImageStoreManager.h +0 -46
  2280. package/Libraries/Image/RCTImageURLLoader.h +0 -73
  2281. package/Libraries/Image/RCTImageURLLoaderWithAttribution.h +0 -45
  2282. package/Libraries/Image/RCTImageUtils.h +0 -93
  2283. package/Libraries/Image/RCTImageView.h +0 -26
  2284. package/Libraries/Image/RCTImageViewManager.h +0 -12
  2285. package/Libraries/Image/RCTLocalAssetImageLoader.h +0 -12
  2286. package/Libraries/Image/RCTResizeMode.h +0 -22
  2287. package/Libraries/Image/RCTUIImageViewAnimated.h +0 -13
  2288. package/Libraries/Image/assetPathUtils.js +0 -91
  2289. package/Libraries/Inspector/Inspector.windows.js +0 -310
  2290. package/Libraries/Interaction/Batchinator.js +0 -76
  2291. package/Libraries/Interaction/BridgeSpyStallHandler.js +0 -62
  2292. package/Libraries/Interaction/InteractionMixin.js +0 -55
  2293. package/Libraries/Interaction/InteractionStallDebugger.js +0 -23
  2294. package/Libraries/Linking/NativeLinking.js +0 -41
  2295. package/Libraries/LinkingIOS/RCTLinkingManager.h +0 -34
  2296. package/Libraries/LinkingIOS/RCTLinkingPlugins.h +0 -40
  2297. package/Libraries/Lists/VirtualizedList.windows.js +0 -2123
  2298. package/Libraries/NativeAnimation/Drivers/RCTAnimationDriver.h +0 -38
  2299. package/Libraries/NativeAnimation/Drivers/RCTDecayAnimation.h +0 -12
  2300. package/Libraries/NativeAnimation/Drivers/RCTEventAnimation.h +0 -21
  2301. package/Libraries/NativeAnimation/Drivers/RCTFrameAnimation.h +0 -12
  2302. package/Libraries/NativeAnimation/Drivers/RCTSpringAnimation.h +0 -12
  2303. package/Libraries/NativeAnimation/Nodes/RCTAdditionAnimatedNode.h +0 -12
  2304. package/Libraries/NativeAnimation/Nodes/RCTAnimatedNode.h +0 -51
  2305. package/Libraries/NativeAnimation/Nodes/RCTDiffClampAnimatedNode.h +0 -12
  2306. package/Libraries/NativeAnimation/Nodes/RCTDivisionAnimatedNode.h +0 -12
  2307. package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.h +0 -12
  2308. package/Libraries/NativeAnimation/Nodes/RCTModuloAnimatedNode.h +0 -12
  2309. package/Libraries/NativeAnimation/Nodes/RCTMultiplicationAnimatedNode.h +0 -12
  2310. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.h +0 -23
  2311. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.h +0 -14
  2312. package/Libraries/NativeAnimation/Nodes/RCTSubtractionAnimatedNode.h +0 -13
  2313. package/Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h +0 -13
  2314. package/Libraries/NativeAnimation/Nodes/RCTTransformAnimatedNode.h +0 -14
  2315. package/Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.h +0 -30
  2316. package/Libraries/NativeAnimation/RCTAnimationPlugins.h +0 -40
  2317. package/Libraries/NativeAnimation/RCTAnimationUtils.h +0 -38
  2318. package/Libraries/NativeAnimation/RCTNativeAnimatedModule.h +0 -20
  2319. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h +0 -88
  2320. package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +0 -21
  2321. package/Libraries/Network/RCTDataRequestHandler.h +0 -16
  2322. package/Libraries/Network/RCTFileRequestHandler.h +0 -16
  2323. package/Libraries/Network/RCTHTTPRequestHandler.h +0 -16
  2324. package/Libraries/Network/RCTNetworkPlugins.h +0 -43
  2325. package/Libraries/Network/RCTNetworkTask.h +0 -47
  2326. package/Libraries/Network/RCTNetworking.h +0 -73
  2327. package/Libraries/Network/RCTNetworkingWinShared.js +0 -62
  2328. package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -20
  2329. package/Libraries/Performance/PureComponentDebug.js +0 -73
  2330. package/Libraries/Performance/QuickPerformanceLogger.js +0 -92
  2331. package/Libraries/Performance/SamplingProfiler.js +0 -39
  2332. package/Libraries/Pressability/PressabilityDebug.windows.js +0 -76
  2333. package/Libraries/PushNotificationIOS/RCTPushNotificationManager.h +0 -25
  2334. package/Libraries/PushNotificationIOS/RCTPushNotificationPlugins.h +0 -40
  2335. package/Libraries/RCTRequired/RCTRequired/RCTRequired.h +0 -77
  2336. package/Libraries/ReactNative/DummyUIManager.js +0 -120
  2337. package/Libraries/ReactNative/ReactFabricInternals.js +0 -25
  2338. package/Libraries/ReactNative/RootTagContext.js +0 -15
  2339. package/Libraries/ReactNative/queryLayoutByID.js +0 -58
  2340. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -24880
  2341. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -7871
  2342. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8140
  2343. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -24650
  2344. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -8097
  2345. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -8351
  2346. package/Libraries/Renderer/shims/NativeMethodsMixin.js +0 -21
  2347. package/Libraries/Renderer/shims/ReactTypes.js +0 -190
  2348. package/Libraries/Settings/RCTSettingsManager.h +0 -16
  2349. package/Libraries/Settings/RCTSettingsPlugins.h +0 -40
  2350. package/Libraries/Settings/Settings.android.js +0 -33
  2351. package/Libraries/Settings/Settings.windows.js +0 -28
  2352. package/Libraries/Storage/AsyncStorage.js +0 -360
  2353. package/Libraries/Storage/NativeAsyncStorage.js +0 -44
  2354. package/Libraries/StyleSheet/NativeOrDynamicColorType.windows.js +0 -17
  2355. package/Libraries/StyleSheet/StyleSheetTypes.windows.js +0 -672
  2356. package/Libraries/StyleSheet/StyleSheetValidation.js +0 -96
  2357. package/Libraries/StyleSheet/normalizeColor.windows.js +0 -393
  2358. package/Libraries/StyleSheet/normalizeColorObject.windows.js +0 -23
  2359. package/Libraries/StyleSheet/processColor.windows.js +0 -56
  2360. package/Libraries/StyleSheet/processColorArray.windows.js +0 -26
  2361. package/Libraries/StyleSheet/processColorObject.windows.js +0 -18
  2362. package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponent.h +0 -26
  2363. package/Libraries/SurfaceBackedComponent/RCTSurfaceBackedComponentState.h +0 -18
  2364. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent+Internal.h +0 -20
  2365. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponent.h +0 -20
  2366. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentController.h +0 -12
  2367. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentOptions.h +0 -20
  2368. package/Libraries/SurfaceHostingComponent/RCTSurfaceHostingComponentState.h +0 -20
  2369. package/Libraries/Text/BaseText/RCTBaseTextShadowView.h +0 -27
  2370. package/Libraries/Text/BaseText/RCTBaseTextViewManager.h +0 -16
  2371. package/Libraries/Text/RCTConvert+Text.h +0 -22
  2372. package/Libraries/Text/RCTTextAttributes.h +0 -97
  2373. package/Libraries/Text/RCTTextTransform.h +0 -16
  2374. package/Libraries/Text/RawText/RCTRawTextShadowView.h +0 -18
  2375. package/Libraries/Text/RawText/RCTRawTextViewManager.h +0 -16
  2376. package/Libraries/Text/Text/NSTextStorage+FontScaling.h +0 -20
  2377. package/Libraries/Text/Text/RCTTextShadowView.h +0 -28
  2378. package/Libraries/Text/Text/RCTTextView.h +0 -24
  2379. package/Libraries/Text/Text/RCTTextViewManager.h +0 -14
  2380. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +0 -16
  2381. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.h +0 -16
  2382. package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +0 -43
  2383. package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +0 -42
  2384. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.h +0 -36
  2385. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +0 -45
  2386. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.h +0 -25
  2387. package/Libraries/Text/TextInput/RCTBaseTextInputView.h +0 -56
  2388. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.h +0 -12
  2389. package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.h +0 -12
  2390. package/Libraries/Text/TextInput/RCTInputAccessoryView.h +0 -17
  2391. package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.h +0 -12
  2392. package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.h +0 -12
  2393. package/Libraries/Text/TextInput/RCTTextSelection.h +0 -26
  2394. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.h +0 -16
  2395. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.h +0 -16
  2396. package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +0 -32
  2397. package/Libraries/Text/VirtualText/RCTVirtualTextShadowView.h +0 -12
  2398. package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.h +0 -12
  2399. package/Libraries/TypeSafety/RCTConvertHelpers.h +0 -73
  2400. package/Libraries/TypeSafety/RCTTypedModuleConstants.h +0 -47
  2401. package/Libraries/Utilities/JSDevSupportModule.js +0 -40
  2402. package/Libraries/Utilities/LoadingView.android.js +0 -29
  2403. package/Libraries/Utilities/LoadingView.ios.js +0 -32
  2404. package/Libraries/Utilities/LoadingView.js +0 -16
  2405. package/Libraries/Utilities/MatrixMath.js +0 -754
  2406. package/Libraries/Utilities/NativeJSDevSupport.js +0 -25
  2407. package/Libraries/Utilities/buildStyleInterpolator.js +0 -211
  2408. package/Libraries/Utilities/clamp.js +0 -23
  2409. package/Libraries/Utilities/deprecatedPropType.js +0 -37
  2410. package/Libraries/Utilities/groupByEveryN.js +0 -51
  2411. package/Libraries/Utilities/mergeIntoFast.js +0 -26
  2412. package/Libraries/Utilities/registerGeneratedViewConfig.js +0 -83
  2413. package/Libraries/Utilities/setAndForwardRef.js +0 -71
  2414. package/Libraries/Utilities/truncate.js +0 -51
  2415. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -134
  2416. package/Libraries/Vibration/RCTVibration.h +0 -12
  2417. package/Libraries/Vibration/RCTVibrationPlugins.h +0 -40
  2418. package/Libraries/WebSocket/RCTReconnectingWebSocket.h +0 -37
  2419. package/Libraries/WebSocket/RCTSRWebSocket.h +0 -132
  2420. package/Libraries/Wrapper/Example/RCTWrapperExampleView.h +0 -16
  2421. package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.h +0 -16
  2422. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.h +0 -20
  2423. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.h +0 -18
  2424. package/Libraries/Wrapper/RCTWrapper.h +0 -66
  2425. package/Libraries/Wrapper/RCTWrapperShadowView.h +0 -22
  2426. package/Libraries/Wrapper/RCTWrapperView.h +0 -36
  2427. package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.h +0 -25
  2428. package/Libraries/Wrapper/RCTWrapperViewManager.h +0 -20
  2429. package/Libraries/YellowBox/Data/YellowBoxCategory.js +0 -155
  2430. package/Libraries/YellowBox/Data/YellowBoxRegistry.js +0 -154
  2431. package/Libraries/YellowBox/Data/YellowBoxSymbolication.js +0 -89
  2432. package/Libraries/YellowBox/Data/YellowBoxWarning.js +0 -126
  2433. package/Libraries/YellowBox/UI/YellowBoxButton.js +0 -53
  2434. package/Libraries/YellowBox/UI/YellowBoxInspector.js +0 -213
  2435. package/Libraries/YellowBox/UI/YellowBoxInspectorFooter.js +0 -76
  2436. package/Libraries/YellowBox/UI/YellowBoxInspectorHeader.js +0 -116
  2437. package/Libraries/YellowBox/UI/YellowBoxInspectorSourceMapStatus.js +0 -155
  2438. package/Libraries/YellowBox/UI/YellowBoxInspectorStackFrame.js +0 -93
  2439. package/Libraries/YellowBox/UI/YellowBoxList.js +0 -142
  2440. package/Libraries/YellowBox/UI/YellowBoxListRow.js +0 -100
  2441. package/Libraries/YellowBox/UI/YellowBoxPressable.js +0 -88
  2442. package/Libraries/YellowBox/UI/YellowBoxStyle.js +0 -31
  2443. package/Libraries/YellowBox/YellowBox.js +0 -234
  2444. package/Libraries/YellowBox/YellowBoxContainer.js +0 -65
  2445. package/Libraries/polyfills/Object.es7.js +0 -58
  2446. package/Libraries/polyfills/console.js +0 -641
  2447. package/Libraries/polyfills/error-guard.js +0 -115
  2448. package/Libraries/promiseRejectionIsError.js +0 -24
  2449. package/Libraries/vendor/emitter/EmitterSubscription.js +0 -59
  2450. package/Libraries/vendor/emitter/EventSubscription.js +0 -40
  2451. package/Libraries/vendor/emitter/EventSubscriptionVendor.js +0 -101
  2452. package/Microsoft.ReactNative/ReactHost/UwpReactInstanceProxy.cpp +0 -153
  2453. package/Microsoft.ReactNative/ReactHost/UwpReactInstanceProxy.h +0 -61
  2454. package/Microsoft.ReactNative/ReactNative.V8JSI.Windows.WinUI3.targets +0 -21
  2455. package/Microsoft.ReactNative/Threading/BatchingQueueThread.cpp +0 -70
  2456. package/Microsoft.ReactNative/Threading/BatchingQueueThread.h +0 -42
  2457. package/Microsoft.ReactNative/Threading/MessageDispatchQueue.cpp +0 -91
  2458. package/Microsoft.ReactNative/Threading/MessageDispatchQueue.h +0 -46
  2459. package/Microsoft.ReactNative/Threading/MessageQueueThreadFactory.cpp +0 -30
  2460. package/Microsoft.ReactNative/Threading/MessageQueueThreadFactory.h +0 -20
  2461. package/Microsoft.ReactNative/Views/ReactRootControl.cpp +0 -505
  2462. package/Microsoft.ReactNative/Views/ReactRootControl.h +0 -154
  2463. package/Microsoft.ReactNative/packages.config +0 -8
  2464. package/PropertySheets/ReactDirectories.props +0 -40
  2465. package/PropertySheets/ReactPatches.targets +0 -46
  2466. package/PropertySheets/WinUI3.props +0 -11
  2467. package/ReactCommon/packages.config +0 -4
  2468. package/ReactUWP/.gitignore +0 -1
  2469. package/ReactUWP/Base/CoreNativeModules.cpp +0 -125
  2470. package/ReactUWP/Base/CoreNativeModules.h +0 -34
  2471. package/ReactUWP/Base/CoreUIManagers.cpp +0 -79
  2472. package/ReactUWP/CxxReactUWP/JSBigString.cpp +0 -52
  2473. package/ReactUWP/Modules/Animated/AdditionAnimatedNode.cpp +0 -37
  2474. package/ReactUWP/Modules/Animated/AdditionAnimatedNode.h +0 -21
  2475. package/ReactUWP/Modules/Animated/AnimatedNode.cpp +0 -41
  2476. package/ReactUWP/Modules/Animated/AnimatedNode.h +0 -33
  2477. package/ReactUWP/Modules/Animated/AnimatedNodeType.h +0 -49
  2478. package/ReactUWP/Modules/Animated/AnimationDriver.cpp +0 -95
  2479. package/ReactUWP/Modules/Animated/AnimationDriver.h +0 -78
  2480. package/ReactUWP/Modules/Animated/CalculatedAnimationDriver.cpp +0 -59
  2481. package/ReactUWP/Modules/Animated/CalculatedAnimationDriver.h +0 -26
  2482. package/ReactUWP/Modules/Animated/DecayAnimationDriver.cpp +0 -48
  2483. package/ReactUWP/Modules/Animated/DecayAnimationDriver.h +0 -38
  2484. package/ReactUWP/Modules/Animated/DiffClampAnimatedNode.cpp +0 -32
  2485. package/ReactUWP/Modules/Animated/DiffClampAnimatedNode.h +0 -30
  2486. package/ReactUWP/Modules/Animated/DivisionAnimatedNode.cpp +0 -42
  2487. package/ReactUWP/Modules/Animated/DivisionAnimatedNode.h +0 -26
  2488. package/ReactUWP/Modules/Animated/EventAnimationDriver.cpp +0 -29
  2489. package/ReactUWP/Modules/Animated/EventAnimationDriver.h +0 -26
  2490. package/ReactUWP/Modules/Animated/ExtrapolationType.h +0 -20
  2491. package/ReactUWP/Modules/Animated/FacadeType.h +0 -46
  2492. package/ReactUWP/Modules/Animated/FrameAnimationDriver.cpp +0 -60
  2493. package/ReactUWP/Modules/Animated/FrameAnimationDriver.h +0 -34
  2494. package/ReactUWP/Modules/Animated/InterpolationAnimatedNode.cpp +0 -171
  2495. package/ReactUWP/Modules/Animated/InterpolationAnimatedNode.h +0 -60
  2496. package/ReactUWP/Modules/Animated/ModulusAnimatedNode.cpp +0 -30
  2497. package/ReactUWP/Modules/Animated/ModulusAnimatedNode.h +0 -27
  2498. package/ReactUWP/Modules/Animated/MultiplicationAnimatedNode.cpp +0 -36
  2499. package/ReactUWP/Modules/Animated/MultiplicationAnimatedNode.h +0 -21
  2500. package/ReactUWP/Modules/Animated/NativeAnimatedModule.cpp +0 -226
  2501. package/ReactUWP/Modules/Animated/NativeAnimatedModule.h +0 -116
  2502. package/ReactUWP/Modules/Animated/NativeAnimatedNodeManager.cpp +0 -404
  2503. package/ReactUWP/Modules/Animated/NativeAnimatedNodeManager.h +0 -110
  2504. package/ReactUWP/Modules/Animated/PropsAnimatedNode.cpp +0 -281
  2505. package/ReactUWP/Modules/Animated/PropsAnimatedNode.h +0 -51
  2506. package/ReactUWP/Modules/Animated/SpringAnimationDriver.cpp +0 -90
  2507. package/ReactUWP/Modules/Animated/SpringAnimationDriver.h +0 -54
  2508. package/ReactUWP/Modules/Animated/StyleAnimatedNode.cpp +0 -38
  2509. package/ReactUWP/Modules/Animated/StyleAnimatedNode.h +0 -27
  2510. package/ReactUWP/Modules/Animated/SubtractionAnimatedNode.cpp +0 -42
  2511. package/ReactUWP/Modules/Animated/SubtractionAnimatedNode.h +0 -26
  2512. package/ReactUWP/Modules/Animated/TrackingAnimatedNode.cpp +0 -40
  2513. package/ReactUWP/Modules/Animated/TrackingAnimatedNode.h +0 -34
  2514. package/ReactUWP/Modules/Animated/TransformAnimatedNode.cpp +0 -38
  2515. package/ReactUWP/Modules/Animated/TransformAnimatedNode.h +0 -39
  2516. package/ReactUWP/Modules/Animated/ValueAnimatedNode.cpp +0 -125
  2517. package/ReactUWP/Modules/Animated/ValueAnimatedNode.h +0 -58
  2518. package/ReactUWP/Modules/AppThemeModuleUwp.cpp +0 -112
  2519. package/ReactUWP/Modules/AppThemeModuleUwp.h +0 -60
  2520. package/ReactUWP/Modules/AppearanceModule.cpp +0 -70
  2521. package/ReactUWP/Modules/AppearanceModule.h +0 -47
  2522. package/ReactUWP/Modules/ImageViewManagerModule.cpp +0 -169
  2523. package/ReactUWP/Modules/ImageViewManagerModule.h +0 -34
  2524. package/ReactUWP/Modules/LinkingManagerModule.cpp +0 -130
  2525. package/ReactUWP/Modules/LinkingManagerModule.h +0 -31
  2526. package/ReactUWP/Modules/LocationObserverModule.cpp +0 -236
  2527. package/ReactUWP/Modules/LocationObserverModule.h +0 -38
  2528. package/ReactUWP/Modules/NativeUIManager.cpp +0 -1131
  2529. package/ReactUWP/Modules/NativeUIManager.h +0 -116
  2530. package/ReactUWP/Modules/NetworkingModule.cpp +0 -413
  2531. package/ReactUWP/Modules/NetworkingModule.h +0 -36
  2532. package/ReactUWP/Modules/TimingModule.cpp +0 -222
  2533. package/ReactUWP/Modules/TimingModule.h +0 -93
  2534. package/ReactUWP/Modules/WebSocketModuleUwp.cpp +0 -286
  2535. package/ReactUWP/Modules/WebSocketModuleUwp.h +0 -30
  2536. package/ReactUWP/Pch/pch.cpp +0 -7
  2537. package/ReactUWP/Pch/pch.h +0 -62
  2538. package/ReactUWP/Polyester/ButtonContentViewManager.cpp +0 -55
  2539. package/ReactUWP/Polyester/ButtonContentViewManager.h +0 -30
  2540. package/ReactUWP/Polyester/ButtonViewManager.cpp +0 -94
  2541. package/ReactUWP/Polyester/ButtonViewManager.h +0 -38
  2542. package/ReactUWP/Polyester/ContentControlViewManager.cpp +0 -91
  2543. package/ReactUWP/Polyester/ContentControlViewManager.h +0 -51
  2544. package/ReactUWP/Polyester/HyperlinkViewManager.cpp +0 -91
  2545. package/ReactUWP/Polyester/HyperlinkViewManager.h +0 -33
  2546. package/ReactUWP/Polyester/IconViewManager.cpp +0 -165
  2547. package/ReactUWP/Polyester/IconViewManager.h +0 -28
  2548. package/ReactUWP/TestHookMock.cpp +0 -7
  2549. package/ReactUWP/Threading/AsyncWorkQueue.cpp +0 -295
  2550. package/ReactUWP/Threading/AsyncWorkQueue.h +0 -161
  2551. package/ReactUWP/Threading/AsyncWorkQueue_Priv.h +0 -105
  2552. package/ReactUWP/Threading/BatchingUIMessageQueueThread.cpp +0 -73
  2553. package/ReactUWP/Threading/BatchingUIMessageQueueThread.h +0 -43
  2554. package/ReactUWP/Threading/JSQueueThread.cpp +0 -59
  2555. package/ReactUWP/Threading/JSQueueThread.h +0 -19
  2556. package/ReactUWP/Threading/MessageQueueThreadFactory.cpp +0 -34
  2557. package/ReactUWP/Threading/MessageQueueThreadFactory.h +0 -20
  2558. package/ReactUWP/Threading/UIMessageQueueThread.cpp +0 -44
  2559. package/ReactUWP/Threading/UIMessageQueueThread.h +0 -30
  2560. package/ReactUWP/Threading/WorkerMessageQueueThread.cpp +0 -145
  2561. package/ReactUWP/Threading/WorkerMessageQueueThread.h +0 -30
  2562. package/ReactUWP/Utils/AccessibilityUtils.cpp +0 -38
  2563. package/ReactUWP/Utils/Helpers.cpp +0 -107
  2564. package/ReactUWP/Utils/LocalBundleReader.cpp +0 -81
  2565. package/ReactUWP/Utils/ResourceBrushUtils.cpp +0 -186
  2566. package/ReactUWP/Utils/UwpPreparedScriptStore.cpp +0 -109
  2567. package/ReactUWP/Utils/UwpScriptStore.cpp +0 -58
  2568. package/ReactUWP/Utils/ValueUtils.cpp +0 -206
  2569. package/ReactUWP/Version.rc +0 -72
  2570. package/ReactUWP/Views/ActivityIndicatorViewManager.cpp +0 -55
  2571. package/ReactUWP/Views/ActivityIndicatorViewManager.h +0 -30
  2572. package/ReactUWP/Views/CheckboxViewManager.cpp +0 -113
  2573. package/ReactUWP/Views/CheckboxViewManager.h +0 -34
  2574. package/ReactUWP/Views/ControlViewManager.cpp +0 -90
  2575. package/ReactUWP/Views/DatePickerViewManager.cpp +0 -170
  2576. package/ReactUWP/Views/DatePickerViewManager.h +0 -30
  2577. package/ReactUWP/Views/DynamicAutomationPeer.cpp +0 -360
  2578. package/ReactUWP/Views/DynamicAutomationPeer.h +0 -88
  2579. package/ReactUWP/Views/DynamicAutomationProperties.cpp +0 -268
  2580. package/ReactUWP/Views/DynamicAutomationProperties.h +0 -108
  2581. package/ReactUWP/Views/ExpressionAnimationStore.cpp +0 -63
  2582. package/ReactUWP/Views/ExpressionAnimationStore.h +0 -28
  2583. package/ReactUWP/Views/FlyoutViewManager.cpp +0 -465
  2584. package/ReactUWP/Views/FlyoutViewManager.h +0 -36
  2585. package/ReactUWP/Views/FrameworkElementViewManager.cpp +0 -532
  2586. package/ReactUWP/Views/Image/BorderEffect.h +0 -49
  2587. package/ReactUWP/Views/Image/ImageViewManager.cpp +0 -194
  2588. package/ReactUWP/Views/Image/ImageViewManager.h +0 -35
  2589. package/ReactUWP/Views/Image/Microsoft.UI.Composition.Effects_Impl.h +0 -195
  2590. package/ReactUWP/Views/Image/ReactImage.cpp +0 -365
  2591. package/ReactUWP/Views/Image/ReactImage.h +0 -81
  2592. package/ReactUWP/Views/Image/ReactImageBrush.cpp +0 -176
  2593. package/ReactUWP/Views/Image/ReactImageBrush.h +0 -53
  2594. package/ReactUWP/Views/Impl/ScrollViewUWPImplementation.cpp +0 -108
  2595. package/ReactUWP/Views/Impl/ScrollViewUWPImplementation.h +0 -45
  2596. package/ReactUWP/Views/Impl/SnapPointManagingContentControl.cpp +0 -180
  2597. package/ReactUWP/Views/Impl/SnapPointManagingContentControl.h +0 -79
  2598. package/ReactUWP/Views/KeyboardEventHandler.cpp +0 -643
  2599. package/ReactUWP/Views/PickerViewManager.cpp +0 -213
  2600. package/ReactUWP/Views/PickerViewManager.h +0 -31
  2601. package/ReactUWP/Views/PopupViewManager.cpp +0 -354
  2602. package/ReactUWP/Views/PopupViewManager.h +0 -37
  2603. package/ReactUWP/Views/RawTextViewManager.cpp +0 -98
  2604. package/ReactUWP/Views/RawTextViewManager.h +0 -43
  2605. package/ReactUWP/Views/ReactControl.cpp +0 -564
  2606. package/ReactUWP/Views/ReactControl.h +0 -121
  2607. package/ReactUWP/Views/ReactRootView.cpp +0 -94
  2608. package/ReactUWP/Views/RefreshControlManager.cpp +0 -119
  2609. package/ReactUWP/Views/RefreshControlManager.h +0 -29
  2610. package/ReactUWP/Views/RootViewManager.cpp +0 -68
  2611. package/ReactUWP/Views/RootViewManager.h +0 -38
  2612. package/ReactUWP/Views/SIPEventHandler.cpp +0 -116
  2613. package/ReactUWP/Views/SIPEventHandler.h +0 -47
  2614. package/ReactUWP/Views/ScrollContentViewManager.cpp +0 -19
  2615. package/ReactUWP/Views/ScrollContentViewManager.h +0 -21
  2616. package/ReactUWP/Views/ScrollViewManager.cpp +0 -495
  2617. package/ReactUWP/Views/ScrollViewManager.h +0 -40
  2618. package/ReactUWP/Views/ShadowNodeBase.cpp +0 -166
  2619. package/ReactUWP/Views/SliderViewManager.cpp +0 -90
  2620. package/ReactUWP/Views/SliderViewManager.h +0 -34
  2621. package/ReactUWP/Views/SwitchViewManager.cpp +0 -177
  2622. package/ReactUWP/Views/SwitchViewManager.h +0 -35
  2623. package/ReactUWP/Views/TextInputViewManager.cpp +0 -731
  2624. package/ReactUWP/Views/TextInputViewManager.h +0 -34
  2625. package/ReactUWP/Views/TextViewManager.cpp +0 -180
  2626. package/ReactUWP/Views/TextViewManager.h +0 -39
  2627. package/ReactUWP/Views/TouchEventHandler.cpp +0 -508
  2628. package/ReactUWP/Views/TouchEventHandler.h +0 -106
  2629. package/ReactUWP/Views/ViewControl.cpp +0 -43
  2630. package/ReactUWP/Views/ViewControl.h +0 -32
  2631. package/ReactUWP/Views/ViewManagerBase.cpp +0 -325
  2632. package/ReactUWP/Views/ViewPanel.cpp +0 -369
  2633. package/ReactUWP/Views/ViewPanel.h +0 -120
  2634. package/ReactUWP/Views/ViewViewManager.cpp +0 -539
  2635. package/ReactUWP/Views/ViewViewManager.h +0 -46
  2636. package/ReactUWP/Views/VirtualTextViewManager.cpp +0 -75
  2637. package/ReactUWP/Views/VirtualTextViewManager.h +0 -35
  2638. package/ReactUWP/Views/XamlFeatures.cpp +0 -11
  2639. package/ReactUWP/Views/XamlFeatures.h +0 -11
  2640. package/ReactUWP/Views/cppwinrt/AccessibilityAction.idl +0 -19
  2641. package/ReactUWP/Views/cppwinrt/BorderEffect.idl +0 -50
  2642. package/ReactUWP/Views/cppwinrt/DynamicAutomationPeer.idl +0 -135
  2643. package/ReactUWP/Views/cppwinrt/ViewPanel.idl +0 -69
  2644. package/ReactUWP/Views/module.g.cpp +0 -80
  2645. package/ReactUWP/packages.config +0 -7
  2646. package/ReactWindowsCore/AbiSafe.h +0 -116
  2647. package/ReactWindowsCore/AsyncStorage/AsyncStorageManager.cpp +0 -153
  2648. package/ReactWindowsCore/AsyncStorage/AsyncStorageManager.h +0 -71
  2649. package/ReactWindowsCore/AsyncStorage/FollyDynamicConverter.cpp +0 -51
  2650. package/ReactWindowsCore/AsyncStorage/FollyDynamicConverter.h +0 -24
  2651. package/ReactWindowsCore/AsyncStorage/KeyValueStorage.cpp +0 -248
  2652. package/ReactWindowsCore/AsyncStorage/KeyValueStorage.h +0 -50
  2653. package/ReactWindowsCore/AsyncStorageModule.h +0 -25
  2654. package/ReactWindowsCore/BaseScriptStoreImpl.cpp +0 -301
  2655. package/ReactWindowsCore/BaseScriptStoreImpl.h +0 -90
  2656. package/ReactWindowsCore/BatchingMessageQueueThread.h +0 -17
  2657. package/ReactWindowsCore/ChakraRuntimeHolder.cpp +0 -60
  2658. package/ReactWindowsCore/ChakraRuntimeHolder.h +0 -42
  2659. package/ReactWindowsCore/CreateModules.h +0 -22
  2660. package/ReactWindowsCore/CxxMessageQueue.cpp +0 -310
  2661. package/ReactWindowsCore/DevServerHelper.h +0 -70
  2662. package/ReactWindowsCore/DevSettings.h +0 -109
  2663. package/ReactWindowsCore/DevSupportManager.cpp +0 -286
  2664. package/ReactWindowsCore/DevSupportManager.h +0 -54
  2665. package/ReactWindowsCore/Executors/WebSocketJSExecutor.cpp +0 -286
  2666. package/ReactWindowsCore/Executors/WebSocketJSExecutor.h +0 -128
  2667. package/ReactWindowsCore/Executors/WebSocketJSExecutorFactory.cpp +0 -24
  2668. package/ReactWindowsCore/HermesRuntimeHolder.cpp +0 -31
  2669. package/ReactWindowsCore/HermesRuntimeHolder.h +0 -23
  2670. package/ReactWindowsCore/IDevSupportManager.h +0 -31
  2671. package/ReactWindowsCore/IHttpResource.h +0 -34
  2672. package/ReactWindowsCore/INativeUIManager.h +0 -76
  2673. package/ReactWindowsCore/IReactRootView.h +0 -22
  2674. package/ReactWindowsCore/IRedBoxHandler.h +0 -37
  2675. package/ReactWindowsCore/IUIManager.h +0 -90
  2676. package/ReactWindowsCore/IWebSocketResource.h +0 -184
  2677. package/ReactWindowsCore/InstanceManager.h +0 -68
  2678. package/ReactWindowsCore/LayoutAnimation.cpp +0 -140
  2679. package/ReactWindowsCore/LayoutAnimation.h +0 -69
  2680. package/ReactWindowsCore/MemoryMappedBuffer.h +0 -13
  2681. package/ReactWindowsCore/MemoryTracker.cpp +0 -157
  2682. package/ReactWindowsCore/MemoryTracker.h +0 -141
  2683. package/ReactWindowsCore/Modules/AsyncStorageModule.cpp +0 -91
  2684. package/ReactWindowsCore/Modules/AsyncStorageModuleWin32.cpp +0 -492
  2685. package/ReactWindowsCore/Modules/AsyncStorageModuleWin32.h +0 -75
  2686. package/ReactWindowsCore/Modules/ExceptionsManagerModule.cpp +0 -126
  2687. package/ReactWindowsCore/Modules/I18nModule.cpp +0 -35
  2688. package/ReactWindowsCore/Modules/I18nModule.h +0 -28
  2689. package/ReactWindowsCore/Modules/PlatformConstantsModule.cpp +0 -56
  2690. package/ReactWindowsCore/Modules/PlatformConstantsModule.h +0 -18
  2691. package/ReactWindowsCore/Modules/SourceCodeModule.h +0 -30
  2692. package/ReactWindowsCore/Modules/StatusBarManagerModule.h +0 -18
  2693. package/ReactWindowsCore/Modules/UIManagerModule.cpp +0 -579
  2694. package/ReactWindowsCore/Modules/UIManagerModule.h +0 -111
  2695. package/ReactWindowsCore/Modules/WebSocketModule.h +0 -67
  2696. package/ReactWindowsCore/OInstance.h +0 -108
  2697. package/ReactWindowsCore/ShadowNode.cpp +0 -18
  2698. package/ReactWindowsCore/ShadowNode.h +0 -38
  2699. package/ReactWindowsCore/ShadowNodeRegistry.cpp +0 -72
  2700. package/ReactWindowsCore/ShadowNodeRegistry.h +0 -41
  2701. package/ReactWindowsCore/TurboModuleManager.cpp +0 -71
  2702. package/ReactWindowsCore/TurboModuleManager.h +0 -27
  2703. package/ReactWindowsCore/TurboModuleRegistry.h +0 -29
  2704. package/ReactWindowsCore/Utils.cpp +0 -67
  2705. package/ReactWindowsCore/Utils.h +0 -29
  2706. package/ReactWindowsCore/V8JSIRuntimeHolder.cpp +0 -183
  2707. package/ReactWindowsCore/V8JSIRuntimeHolder.h +0 -45
  2708. package/ReactWindowsCore/ViewManager.cpp +0 -27
  2709. package/ReactWindowsCore/WebSocketJSExecutorFactory.h +0 -26
  2710. package/ReactWindowsCore/WinRTWebSocketResource.cpp +0 -450
  2711. package/ReactWindowsCore/WinRTWebSocketResource.h +0 -137
  2712. package/ReactWindowsCore/cdebug.cpp +0 -4
  2713. package/ReactWindowsCore/etw/build.bat +0 -4
  2714. package/ReactWindowsCore/etw/react_native_windows.h +0 -1275
  2715. package/ReactWindowsCore/etw/react_native_windows.man +0 -86
  2716. package/ReactWindowsCore/etw/react_native_windows_etw_res.dll +0 -0
  2717. package/ReactWindowsCore/etw/register.bat +0 -3
  2718. package/ReactWindowsCore/tracing/fbsystrace.h +0 -104
  2719. package/ReactWindowsCore/tracing/tracing.cpp +0 -325
  2720. package/Scripts/ReactWin32.nuspec +0 -67
  2721. package/Scripts/Tfs/Install-VSFeatures.ps1 +0 -108
  2722. package/Scripts/Tfs/Layout-Headers.ps1 +0 -114
  2723. package/Scripts/copyRNLibraries.js +0 -130
  2724. package/Scripts/launchPackager.bat +0 -7
  2725. package/Shared/AsyncStorage/StorageFileIO.cpp +0 -175
  2726. package/Shared/AsyncStorage/StorageFileIO.h +0 -40
  2727. package/codegen/NativeAnimationsDebugModuleSpec.g.h +0 -39
  2728. package/codegen/NativeAsyncStorageSpec.g.h +0 -63
  2729. package/codegen/NativeDatePickerAndroidSpec.g.h +0 -33
  2730. package/codegen/NativeHeapCaptureSpec.g.h +0 -39
  2731. package/codegen/NativeImagePickerIOSSpec.g.h +0 -63
  2732. package/codegen/NativeJSCSamplingProfilerSpec.g.h +0 -33
  2733. package/codegen/NativeJSDevSupportSpec.g.h +0 -39
  2734. package/codegen/NativeLinkingSpec.g.h +0 -69
  2735. package/codegen/NativePlatformConstantsWinSpec.g.h +0 -29
  2736. package/codegen/NativeStatusBarManagerAndroid.windowsSpec.g.h +0 -51
  2737. package/codegen/NativeTVNavigationEventEmitterSpec.g.h +0 -39
  2738. package/etc/react-native-windows.api.md +0 -327
  2739. package/flow/Position.js +0 -16
  2740. package/flow/Promise.js +0 -47
  2741. package/flow/Stringish.js +0 -14
  2742. package/flow/console.js +0 -49
  2743. package/flow/fbjs.js +0 -258
  2744. package/flow/jest.js +0 -1189
  2745. package/flow/use-subscription.js +0 -19
  2746. package/include/ReactUWP/IReactInstance.h +0 -92
  2747. package/include/ReactUWP/IXamlRootView.h +0 -33
  2748. package/include/ReactUWP/InstanceFactory.h +0 -61
  2749. package/include/ReactUWP/ReactRootView.h +0 -46
  2750. package/include/ReactUWP/ReactUwp.h +0 -11
  2751. package/include/ReactUWP/Utils/AccessibilityUtils.h +0 -17
  2752. package/include/ReactUWP/Utils/CppWinrtLessExceptions.h +0 -56
  2753. package/include/ReactUWP/Utils/Helpers.h +0 -35
  2754. package/include/ReactUWP/Utils/LocalBundleReader.h +0 -33
  2755. package/include/ReactUWP/Utils/PropertyHandlerUtils.h +0 -119
  2756. package/include/ReactUWP/Utils/PropertyUtils.h +0 -504
  2757. package/include/ReactUWP/Utils/ResourceBrushUtils.h +0 -52
  2758. package/include/ReactUWP/Utils/StandardControlResourceKeyNames.h +0 -162
  2759. package/include/ReactUWP/Utils/UwpPreparedScriptStore.h +0 -66
  2760. package/include/ReactUWP/Utils/UwpScriptStore.h +0 -24
  2761. package/include/ReactUWP/Utils/ValueUtils.h +0 -43
  2762. package/include/ReactUWP/ViewManagerProvider.h +0 -31
  2763. package/include/ReactUWP/Views/ControlViewManager.h +0 -31
  2764. package/include/ReactUWP/Views/FrameworkElementViewManager.h +0 -47
  2765. package/include/ReactUWP/Views/KeyboardEventHandler.h +0 -133
  2766. package/include/ReactUWP/Views/ShadowNodeBase.h +0 -127
  2767. package/include/ReactUWP/Views/ViewManagerBase.h +0 -102
  2768. package/include/ReactUWP/XamlView.h +0 -41
  2769. package/include/ReactWindowsCore/AsyncStorageModuleWin32Config.h +0 -15
  2770. package/include/ReactWindowsCore/ViewManager.h +0 -34
  2771. package/include/ReactWindowsCore/cdebug.h +0 -42
  2772. package/index.windows.d.ts +0 -3
  2773. package/index.windows.d.ts.map +0 -1
  2774. package/index.windows.js.map +0 -1
  2775. package/layoutFilesForNuget.bat +0 -68
  2776. package/local-cli/config/dependencyConfig.js +0 -104
  2777. package/local-cli/config/projectConfig.js +0 -68
  2778. package/local-cli/generate-windows.js +0 -39
  2779. package/local-cli/generator-common/index.js +0 -398
  2780. package/local-cli/generator-windows/index.js +0 -226
  2781. package/local-cli/generator-windows/templates/cpp/keys/MyApp_TemporaryKey.pfx +0 -0
  2782. package/local-cli/generator-windows/templates/cpp/proj/MyApp.sln +0 -199
  2783. package/local-cli/generator-windows/templates/cpp/proj/MyApp.vcxproj +0 -220
  2784. package/local-cli/generator-windows/templates/cpp/proj/MyApp.vcxproj.filters +0 -63
  2785. package/local-cli/generator-windows/templates/cpp/proj/NuGet.Config +0 -10
  2786. package/local-cli/generator-windows/templates/cpp/proj/packages.config +0 -6
  2787. package/local-cli/generator-windows/templates/cpp/src/App.cpp +0 -81
  2788. package/local-cli/generator-windows/templates/cpp/src/App.h +0 -19
  2789. package/local-cli/generator-windows/templates/cpp/src/App.xaml +0 -10
  2790. package/local-cli/generator-windows/templates/cpp/src/AutolinkedNativeModules.g.cpp +0 -13
  2791. package/local-cli/generator-windows/templates/cpp/src/AutolinkedNativeModules.g.h +0 -10
  2792. package/local-cli/generator-windows/templates/cpp/src/MainPage.cpp +0 -24
  2793. package/local-cli/generator-windows/templates/cpp/src/MainPage.h +0 -21
  2794. package/local-cli/generator-windows/templates/cpp/src/MainPage.idl +0 -8
  2795. package/local-cli/generator-windows/templates/cpp/src/MainPage.xaml +0 -3
  2796. package/local-cli/generator-windows/templates/cpp/src/Package.appxmanifest +0 -49
  2797. package/local-cli/generator-windows/templates/cpp/src/PropertySheet.props +0 -16
  2798. package/local-cli/generator-windows/templates/cpp/src/ReactPackageProvider.cpp +0 -18
  2799. package/local-cli/generator-windows/templates/cpp/src/ReactPackageProvider.h +0 -15
  2800. package/local-cli/generator-windows/templates/cpp/src/pch.h +0 -26
  2801. package/local-cli/generator-windows/templates/cs/keys/MyApp_TemporaryKey.pfx +0 -0
  2802. package/local-cli/generator-windows/templates/cs/proj/MyApp.csproj +0 -191
  2803. package/local-cli/generator-windows/templates/cs/proj/MyApp.sln +0 -200
  2804. package/local-cli/generator-windows/templates/cs/src/App.xaml.cs +0 -49
  2805. package/local-cli/generator-windows/templates/cs/src/AutolinkedNativeModules.g.cs +0 -14
  2806. package/local-cli/generator-windows/templates/cs/src/MainPage.xaml +0 -13
  2807. package/local-cli/generator-windows/templates/cs/src/MainPage.xaml.cs +0 -33
  2808. package/local-cli/generator-windows/templates/cs/src/Package.appxmanifest +0 -50
  2809. package/local-cli/generator-windows/templates/index.windows.bundle +0 -9
  2810. package/local-cli/generator-windows/templates/metro.config.js +0 -29
  2811. package/local-cli/runWindows/runWindows.js +0 -244
  2812. package/local-cli/runWindows/utils/Add-AppDevPackage.ps1 +0 -640
  2813. package/local-cli/runWindows/utils/VSProjectUtils.ps1 +0 -153
  2814. package/local-cli/runWindows/utils/WindowsStoreAppUtils.ps1 +0 -227
  2815. package/local-cli/runWindows/utils/autolink.js +0 -100
  2816. package/local-cli/runWindows/utils/build.js +0 -154
  2817. package/local-cli/runWindows/utils/checkRequirements.js +0 -66
  2818. package/local-cli/runWindows/utils/commandWithProgress.js +0 -142
  2819. package/local-cli/runWindows/utils/deploy.js +0 -347
  2820. package/local-cli/runWindows/utils/info.js +0 -27
  2821. package/local-cli/runWindows/utils/msbuildtools.js +0 -350
  2822. package/local-cli/runWindows/utils/version.js +0 -91
  2823. package/local-cli/runWindows/utils/winappdeploytool.js +0 -153
  2824. package/typings-index.d.ts +0 -23
  2825. package/typings-index.d.ts.map +0 -1
  2826. package/typings-index.js +0 -42
  2827. package/typings-index.js.map +0 -1
  2828. /package/{ReactUWP → Microsoft.ReactNative}/Modules/Animated/AnimationType.h +0 -0
  2829. /package/PropertySheets/{ARM.props → ARM64EC.props} +0 -0
  2830. /package/PropertySheets/Application/{ARM.props → ARM64EC.props} +0 -0
  2831. /package/PropertySheets/DynamicLibrary/{ARM.props → ARM64EC.props} +0 -0
  2832. /package/PropertySheets/StaticLibrary/{ARM.props → ARM64EC.props} +0 -0
  2833. /package/{DeforkingPatches → ReactCommon}/.clang-format +0 -0
  2834. /package/{ReactWindowsCore → Shared}/CxxMessageQueue.h +0 -0
  2835. /package/{ReactWindowsCore → Shared}/JSBigAbiString.cpp +0 -0
  2836. /package/{ReactWindowsCore → Shared}/JSBigAbiString.h +0 -0
  2837. /package/{JSI/Shared → Shared/JSI}/ByteArrayBuffer.h +0 -0
  2838. /package/{ReactWindowsCore → Shared}/Logging.h +0 -0
  2839. /package/{ReactWindowsCore → Shared}/Modules/ExceptionsManagerModule.h +0 -0
  2840. /package/{ReactWindowsCore → Shared}/Modules/SourceCodeModule.cpp +0 -0
  2841. /package/{ReactWindowsCore → Shared}/Modules/StatusBarManagerModule.cpp +0 -0
  2842. /package/{ReactWindowsCore → Shared}/NativeModuleProvider.h +0 -0
  2843. /package/{ReactWindowsCore → Shared}/README.md +0 -0
  2844. /package/{ReactWindowsCore → Shared}/Tracing.h +0 -0
  2845. /package/{ReactWindowsCore → Shared}/targetver.h +0 -0
  2846. /package/include/{ReactWindowsCore → Shared}/II18nModule.h +0 -0
  2847. /package/include/{ReactWindowsCore → Shared}/ReactWindowsAPI.h +0 -0
  2848. /package/{local-cli/generator-windows/templates → template}/_gitignore +0 -0
  2849. /package/{local-cli/generator-windows/templates → template}/b_gitignore +0 -0
  2850. /package/{local-cli/generator-windows/templates/cpp → template/cpp-app}/src/App.idl +0 -0
  2851. /package/{local-cli/generator-windows/templates/cpp → template/cpp-app}/src/pch.cpp +0 -0
  2852. /package/{local-cli/generator-windows/templates/cs → template/cs-app}/src/Properties/AssemblyInfo.cs +0 -0
  2853. /package/{local-cli/generator-windows/templates/cs → template/cs-app}/src/Properties/Default.rd.xml +0 -0
  2854. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/LockScreenLogo.scale-200.png +0 -0
  2855. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/SplashScreen.scale-200.png +0 -0
  2856. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/Square150x150Logo.scale-200.png +0 -0
  2857. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/Square44x44Logo.scale-200.png +0 -0
  2858. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
  2859. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/StoreLogo.png +0 -0
  2860. /package/{local-cli/generator-windows/templates/cpp → template/shared-app}/assets/Wide310x150Logo.scale-200.png +0 -0
  2861. /package/{local-cli/generator-windows/templates/cs → template/shared-app}/src/App.xaml +0 -0
  2862. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/LockScreenLogo.scale-200.png +0 -0
  2863. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/SplashScreen.scale-200.png +0 -0
  2864. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/Square150x150Logo.scale-200.png +0 -0
  2865. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/Square44x44Logo.scale-200.png +0 -0
  2866. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
  2867. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/StoreLogo.png +0 -0
  2868. /package/{local-cli/generator-windows/templates/cs/assets → templates/cpp-app/windows/MyApp.Package/Images}/Wide310x150Logo.scale-200.png +0 -0
@@ -1,4406 +0,0 @@
1
- /*
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #include "Yoga.h"
9
- #include <float.h>
10
- #include <string.h>
11
- #include <algorithm>
12
- #include <atomic>
13
- #include <memory>
14
- #include "Utils.h"
15
- #include "YGNode.h"
16
- #include "YGNodePrint.h"
17
- #include "Yoga-internal.h"
18
- #include "event/event.h"
19
- #include "log.h"
20
- #ifdef _MSC_VER
21
- #include <float.h>
22
-
23
- /* define fmaxf if < VC12 */
24
- #if _MSC_VER < 1800
25
- __forceinline const float fmaxf(const float a, const float b) {
26
- return (a > b) ? a : b;
27
- }
28
- #endif
29
- #endif
30
-
31
- using namespace facebook::yoga;
32
- using detail::Log;
33
-
34
- #ifdef ANDROID
35
- static int YGAndroidLog(
36
- const YGConfigRef config,
37
- const YGNodeRef node,
38
- YGLogLevel level,
39
- const char *format,
40
- va_list args);
41
- #else
42
- static int YGDefaultLog(
43
- const YGConfigRef config,
44
- const YGNodeRef node,
45
- YGLogLevel level,
46
- const char *format,
47
- va_list args);
48
- #endif
49
-
50
- #ifdef ANDROID
51
- #include <android/log.h>
52
- static int YGAndroidLog(
53
- const YGConfigRef config,
54
- const YGNodeRef node,
55
- YGLogLevel level,
56
- const char *format,
57
- va_list args) {
58
- int androidLevel = YGLogLevelDebug;
59
- switch (level) {
60
- case YGLogLevelFatal:
61
- androidLevel = ANDROID_LOG_FATAL;
62
- break;
63
- case YGLogLevelError:
64
- androidLevel = ANDROID_LOG_ERROR;
65
- break;
66
- case YGLogLevelWarn:
67
- androidLevel = ANDROID_LOG_WARN;
68
- break;
69
- case YGLogLevelInfo:
70
- androidLevel = ANDROID_LOG_INFO;
71
- break;
72
- case YGLogLevelDebug:
73
- androidLevel = ANDROID_LOG_DEBUG;
74
- break;
75
- case YGLogLevelVerbose:
76
- androidLevel = ANDROID_LOG_VERBOSE;
77
- break;
78
- }
79
- const int result = __android_log_vprint(androidLevel, "yoga", format, args);
80
- return result;
81
- }
82
- #else
83
- #define YG_UNUSED(x) (void)(x);
84
-
85
- static int YGDefaultLog(
86
- const YGConfigRef config,
87
- const YGNodeRef node,
88
- YGLogLevel level,
89
- const char *format,
90
- va_list args) {
91
- YG_UNUSED(config);
92
- YG_UNUSED(node);
93
- switch (level) {
94
- case YGLogLevelError:
95
- case YGLogLevelFatal:
96
- return vfprintf(stderr, format, args);
97
- case YGLogLevelWarn:
98
- case YGLogLevelInfo:
99
- case YGLogLevelDebug:
100
- case YGLogLevelVerbose:
101
- default:
102
- return vprintf(format, args);
103
- }
104
- }
105
-
106
- #undef YG_UNUSED
107
- #endif
108
-
109
- YOGA_EXPORT bool YGFloatIsUndefined(const float value) {
110
- return facebook::yoga::isUndefined(value);
111
- }
112
-
113
- detail::CompactValue YGComputedEdgeValue(
114
- const YGStyle::Edges &edges,
115
- YGEdge edge,
116
- detail::CompactValue defaultValue) {
117
- if (!edges[edge].isUndefined()) {
118
- return edges[edge];
119
- }
120
-
121
- if ((edge == YGEdgeTop || edge == YGEdgeBottom) &&
122
- !edges[YGEdgeVertical].isUndefined()) {
123
- return edges[YGEdgeVertical];
124
- }
125
-
126
- if ((edge == YGEdgeLeft || edge == YGEdgeRight || edge == YGEdgeStart ||
127
- edge == YGEdgeEnd) &&
128
- !edges[YGEdgeHorizontal].isUndefined()) {
129
- return edges[YGEdgeHorizontal];
130
- }
131
-
132
- if (!edges[YGEdgeAll].isUndefined()) {
133
- return edges[YGEdgeAll];
134
- }
135
-
136
- if (edge == YGEdgeStart || edge == YGEdgeEnd) {
137
- return detail::CompactValue::ofUndefined();
138
- }
139
-
140
- return defaultValue;
141
- }
142
-
143
- YOGA_EXPORT void* YGNodeGetContext(YGNodeRef node) {
144
- return node->getContext();
145
- }
146
-
147
- YOGA_EXPORT void YGNodeSetContext(YGNodeRef node, void* context) {
148
-
149
- return node->setContext(context);
150
- }
151
-
152
- YOGA_EXPORT bool YGNodeHasMeasureFunc(YGNodeRef node) {
153
- return node->hasMeasureFunc();
154
- }
155
-
156
- YOGA_EXPORT void YGNodeSetMeasureFunc(
157
- YGNodeRef node,
158
- YGMeasureFunc measureFunc) {
159
- node->setMeasureFunc(measureFunc);
160
- }
161
-
162
- YOGA_EXPORT bool YGNodeHasBaselineFunc(YGNodeRef node) {
163
- return node->hasBaselineFunc();
164
- }
165
-
166
- YOGA_EXPORT void YGNodeSetBaselineFunc(
167
- YGNodeRef node,
168
- YGBaselineFunc baselineFunc) {
169
- node->setBaselineFunc(baselineFunc);
170
- }
171
-
172
- YOGA_EXPORT YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node) {
173
- return node->getDirtied();
174
- }
175
-
176
- YOGA_EXPORT void YGNodeSetDirtiedFunc(
177
- YGNodeRef node,
178
- YGDirtiedFunc dirtiedFunc) {
179
- node->setDirtiedFunc(dirtiedFunc);
180
- }
181
-
182
- YOGA_EXPORT void YGNodeSetPrintFunc(YGNodeRef node, YGPrintFunc printFunc) {
183
- node->setPrintFunc(printFunc);
184
- }
185
-
186
- YOGA_EXPORT bool YGNodeGetHasNewLayout(YGNodeRef node) {
187
- return node->getHasNewLayout();
188
- }
189
-
190
- YOGA_EXPORT void YGConfigSetPrintTreeFlag(YGConfigRef config, bool enabled) {
191
- config->printTree = enabled;
192
- }
193
-
194
- YOGA_EXPORT void YGNodeSetHasNewLayout(YGNodeRef node, bool hasNewLayout) {
195
- node->setHasNewLayout(hasNewLayout);
196
- }
197
-
198
- YOGA_EXPORT YGNodeType YGNodeGetNodeType(YGNodeRef node) {
199
- return node->getNodeType();
200
- }
201
-
202
- YOGA_EXPORT void YGNodeSetNodeType(YGNodeRef node, YGNodeType nodeType) {
203
- return node->setNodeType(nodeType);
204
- }
205
-
206
- YOGA_EXPORT bool YGNodeIsDirty(YGNodeRef node) {
207
- return node->isDirty();
208
- }
209
-
210
- YOGA_EXPORT bool YGNodeLayoutGetDidUseLegacyFlag(const YGNodeRef node) {
211
- return node->didUseLegacyFlag();
212
- }
213
-
214
- YOGA_EXPORT void YGNodeMarkDirtyAndPropogateToDescendants(
215
- const YGNodeRef node) {
216
- return node->markDirtyAndPropogateDownwards();
217
- }
218
-
219
- int32_t gConfigInstanceCount = 0;
220
-
221
- YOGA_EXPORT WIN_EXPORT YGNodeRef YGNodeNewWithConfig(const YGConfigRef config) {
222
- const YGNodeRef node = new YGNode{config};
223
- YGAssertWithConfig(
224
- config, node != nullptr, "Could not allocate memory for node");
225
- Event::publish<Event::NodeAllocation>(node, {config});
226
-
227
- return node;
228
- }
229
-
230
- YOGA_EXPORT YGConfigRef YGConfigGetDefault() {
231
- static YGConfigRef defaultConfig = YGConfigNew();
232
- return defaultConfig;
233
- }
234
-
235
- YOGA_EXPORT YGNodeRef YGNodeNew(void) {
236
- return YGNodeNewWithConfig(YGConfigGetDefault());
237
- }
238
-
239
- YOGA_EXPORT YGNodeRef YGNodeClone(YGNodeRef oldNode) {
240
- YGNodeRef node = new YGNode(*oldNode);
241
- YGAssertWithConfig(
242
- oldNode->getConfig(),
243
- node != nullptr,
244
- "Could not allocate memory for node");
245
- Event::publish<Event::NodeAllocation>(node, {node->getConfig()});
246
- node->setOwner(nullptr);
247
- return node;
248
- }
249
-
250
- static YGConfigRef YGConfigClone(const YGConfig &oldConfig) {
251
- const YGConfigRef config = new YGConfig(oldConfig);
252
- YGAssert(config != nullptr, "Could not allocate memory for config");
253
- if (config == nullptr) {
254
- abort();
255
- }
256
- gConfigInstanceCount++;
257
- return config;
258
- }
259
-
260
- static YGNodeRef YGNodeDeepClone(YGNodeRef oldNode) {
261
- auto config = YGConfigClone(*oldNode->getConfig());
262
- auto node = new YGNode{*oldNode, config};
263
- node->setOwner(nullptr);
264
- Event::publish<Event::NodeAllocation>(node, {node->getConfig()});
265
-
266
- YGVector vec = YGVector();
267
- vec.reserve(oldNode->getChildren().size());
268
- YGNodeRef childNode = nullptr;
269
- for (auto *item : oldNode->getChildren()) {
270
- childNode = YGNodeDeepClone(item);
271
- childNode->setOwner(node);
272
- vec.push_back(childNode);
273
- }
274
- node->setChildren(vec);
275
-
276
- return node;
277
- }
278
-
279
- YOGA_EXPORT void YGNodeFree(const YGNodeRef node) {
280
- if (YGNodeRef owner = node->getOwner()) {
281
- owner->removeChild(node);
282
- node->setOwner(nullptr);
283
- }
284
-
285
- const uint32_t childCount = YGNodeGetChildCount(node);
286
- for (uint32_t i = 0; i < childCount; i++) {
287
- const YGNodeRef child = YGNodeGetChild(node, i);
288
- child->setOwner(nullptr);
289
- }
290
-
291
- node->clearChildren();
292
- Event::publish<Event::NodeDeallocation>(node, {node->getConfig()});
293
- delete node;
294
- }
295
-
296
- static void YGConfigFreeRecursive(const YGNodeRef root) {
297
- if (root->getConfig() != nullptr) {
298
- gConfigInstanceCount--;
299
- delete root->getConfig();
300
- }
301
- // Delete configs recursively for childrens
302
- for (auto *child : root->getChildren()) {
303
- YGConfigFreeRecursive(child);
304
- }
305
- }
306
-
307
- YOGA_EXPORT void YGNodeFreeRecursiveWithCleanupFunc(
308
- const YGNodeRef root,
309
- YGNodeCleanupFunc cleanup) {
310
- uint32_t skipped = 0;
311
- while (YGNodeGetChildCount(root) > skipped) {
312
- const YGNodeRef child = YGNodeGetChild(root, skipped);
313
- if (child->getOwner() != root) {
314
- // Don't free shared nodes that we don't own.
315
- skipped += 1;
316
- } else {
317
- YGNodeRemoveChild(root, child);
318
- YGNodeFreeRecursive(child);
319
- }
320
- }
321
- if (cleanup != nullptr) {
322
- cleanup(root);
323
- }
324
- YGNodeFree(root);
325
- }
326
-
327
- YOGA_EXPORT void YGNodeFreeRecursive(const YGNodeRef root) {
328
- return YGNodeFreeRecursiveWithCleanupFunc(root, nullptr);
329
- }
330
-
331
- YOGA_EXPORT void YGNodeReset(YGNodeRef node) {
332
- node->reset();
333
- }
334
-
335
- int32_t YGConfigGetInstanceCount(void) {
336
- return gConfigInstanceCount;
337
- }
338
-
339
- YOGA_EXPORT YGConfigRef YGConfigNew(void) {
340
- #ifdef ANDROID
341
- const YGConfigRef config = new YGConfig(YGAndroidLog);
342
- #else
343
- const YGConfigRef config = new YGConfig(YGDefaultLog);
344
- #endif
345
- gConfigInstanceCount++;
346
- return config;
347
- }
348
-
349
- YOGA_EXPORT void YGConfigFree(const YGConfigRef config) {
350
- delete config;
351
- gConfigInstanceCount--;
352
- }
353
-
354
- void YGConfigCopy(const YGConfigRef dest, const YGConfigRef src) {
355
- memcpy(dest, src, sizeof(YGConfig));
356
- }
357
-
358
- YOGA_EXPORT void YGNodeSetIsReferenceBaseline(
359
- YGNodeRef node,
360
- bool isReferenceBaseline) {
361
- if (node->isReferenceBaseline() != isReferenceBaseline) {
362
- node->setIsReferenceBaseline(isReferenceBaseline);
363
- node->markDirtyAndPropogate();
364
- }
365
- }
366
-
367
- YOGA_EXPORT bool YGNodeIsReferenceBaseline(YGNodeRef node) {
368
- return node->isReferenceBaseline();
369
- }
370
-
371
- YOGA_EXPORT void YGNodeInsertChild(
372
- const YGNodeRef owner,
373
- const YGNodeRef child,
374
- const uint32_t index) {
375
- YGAssertWithNode(
376
- owner,
377
- child->getOwner() == nullptr,
378
- "Child already has a owner, it must be removed first.");
379
-
380
- YGAssertWithNode(
381
- owner,
382
- !owner->hasMeasureFunc(),
383
- "Cannot add child: Nodes with measure functions cannot have children.");
384
-
385
- owner->insertChild(child, index);
386
- child->setOwner(owner);
387
- owner->markDirtyAndPropogate();
388
- }
389
-
390
- YOGA_EXPORT void YGNodeRemoveChild(
391
- const YGNodeRef owner,
392
- const YGNodeRef excludedChild) {
393
- if (YGNodeGetChildCount(owner) == 0) {
394
- // This is an empty set. Nothing to remove.
395
- return;
396
- }
397
-
398
- // Children may be shared between parents, which is indicated by not having an
399
- // owner. We only want to reset the child completely if it is owned
400
- // exclusively by one node.
401
- auto childOwner = excludedChild->getOwner();
402
- if (owner->removeChild(excludedChild)) {
403
- if (owner == childOwner) {
404
- excludedChild->setLayout({}); // layout is no longer valid
405
- excludedChild->setOwner(nullptr);
406
- }
407
- owner->markDirtyAndPropogate();
408
- }
409
- }
410
-
411
- YOGA_EXPORT void YGNodeRemoveAllChildren(const YGNodeRef owner) {
412
- const uint32_t childCount = YGNodeGetChildCount(owner);
413
- if (childCount == 0) {
414
- // This is an empty set already. Nothing to do.
415
- return;
416
- }
417
- const YGNodeRef firstChild = YGNodeGetChild(owner, 0);
418
- if (firstChild->getOwner() == owner) {
419
- // If the first child has this node as its owner, we assume that this child
420
- // set is unique.
421
- for (uint32_t i = 0; i < childCount; i++) {
422
- const YGNodeRef oldChild = YGNodeGetChild(owner, i);
423
- oldChild->setLayout(YGNode().getLayout()); // layout is no longer valid
424
- oldChild->setOwner(nullptr);
425
- }
426
- owner->clearChildren();
427
- owner->markDirtyAndPropogate();
428
- return;
429
- }
430
- // Otherwise, we are not the owner of the child set. We don't have to do
431
- // anything to clear it.
432
- owner->setChildren(YGVector());
433
- owner->markDirtyAndPropogate();
434
- }
435
-
436
- static void YGNodeSetChildrenInternal(
437
- YGNodeRef const owner,
438
- const std::vector<YGNodeRef> &children) {
439
- if (!owner) {
440
- return;
441
- }
442
- if (children.size() == 0) {
443
- if (YGNodeGetChildCount(owner) > 0) {
444
- for (YGNodeRef const child : owner->getChildren()) {
445
- child->setLayout(YGLayout());
446
- child->setOwner(nullptr);
447
- }
448
- owner->setChildren(YGVector());
449
- owner->markDirtyAndPropogate();
450
- }
451
- } else {
452
- if (YGNodeGetChildCount(owner) > 0) {
453
- for (YGNodeRef const oldChild : owner->getChildren()) {
454
- // Our new children may have nodes in common with the old children. We
455
- // don't reset these common nodes.
456
- if (std::find(children.begin(), children.end(), oldChild) ==
457
- children.end()) {
458
- oldChild->setLayout(YGLayout());
459
- oldChild->setOwner(nullptr);
460
- }
461
- }
462
- }
463
- owner->setChildren(children);
464
- for (YGNodeRef child : children) {
465
- child->setOwner(owner);
466
- }
467
- owner->markDirtyAndPropogate();
468
- }
469
- }
470
-
471
- YOGA_EXPORT void YGNodeSetChildren(
472
- const YGNodeRef owner,
473
- const YGNodeRef c[],
474
- const uint32_t count) {
475
- const YGVector children = {c, c + count};
476
- YGNodeSetChildrenInternal(owner, children);
477
- }
478
-
479
- YOGA_EXPORT void YGNodeSetChildren(
480
- YGNodeRef const owner,
481
- const std::vector<YGNodeRef> &children) {
482
- YGNodeSetChildrenInternal(owner, children);
483
- }
484
-
485
- YOGA_EXPORT YGNodeRef
486
- YGNodeGetChild(const YGNodeRef node, const uint32_t index) {
487
- if (index < node->getChildren().size()) {
488
- return node->getChild(index);
489
- }
490
- return nullptr;
491
- }
492
-
493
- YOGA_EXPORT uint32_t YGNodeGetChildCount(const YGNodeRef node) {
494
- return static_cast<uint32_t>(node->getChildren().size());
495
- }
496
-
497
- YOGA_EXPORT YGNodeRef YGNodeGetOwner(const YGNodeRef node) {
498
- return node->getOwner();
499
- }
500
-
501
- YOGA_EXPORT YGNodeRef YGNodeGetParent(const YGNodeRef node) {
502
- return node->getOwner();
503
- }
504
-
505
- YOGA_EXPORT void YGNodeMarkDirty(const YGNodeRef node) {
506
- YGAssertWithNode(
507
- node,
508
- node->hasMeasureFunc(),
509
- "Only leaf nodes with custom measure functions"
510
- "should manually mark themselves as dirty");
511
-
512
- node->markDirtyAndPropogate();
513
- }
514
-
515
- YOGA_EXPORT void YGNodeCopyStyle(
516
- const YGNodeRef dstNode,
517
- const YGNodeRef srcNode) {
518
- if (!(dstNode->getStyle() == srcNode->getStyle())) {
519
- dstNode->setStyle(srcNode->getStyle());
520
- dstNode->markDirtyAndPropogate();
521
- }
522
- }
523
-
524
- YOGA_EXPORT float YGNodeStyleGetFlexGrow(const YGNodeConstRef node) {
525
- return node->getStyle().flexGrow().isUndefined()
526
- ? kDefaultFlexGrow
527
- : node->getStyle().flexGrow().unwrap();
528
- }
529
-
530
- YOGA_EXPORT float YGNodeStyleGetFlexShrink(const YGNodeConstRef node) {
531
- return node->getStyle().flexShrink().isUndefined()
532
- ? (node->getConfig()->useWebDefaults ? kWebDefaultFlexShrink
533
- : kDefaultFlexShrink)
534
- : node->getStyle().flexShrink().unwrap();
535
- }
536
-
537
- namespace {
538
-
539
- template <typename T, typename NeedsUpdate, typename Update>
540
- void updateStyle(
541
- YGNode *node,
542
- T value,
543
- NeedsUpdate &&needsUpdate,
544
- Update &&update) {
545
- if (needsUpdate(node->getStyle(), value)) {
546
- update(node->getStyle(), value);
547
- node->markDirtyAndPropogate();
548
- }
549
- }
550
-
551
- template <typename Ref, typename T>
552
- void updateStyle(YGNode *node, Ref (YGStyle::*prop)(), T value) {
553
- updateStyle(
554
- node,
555
- value,
556
- [prop](YGStyle &s, T x) { return (s.*prop)() != x; },
557
- [prop](YGStyle &s, T x) { (s.*prop)() = x; });
558
- }
559
-
560
- template <typename Ref, typename Idx>
561
- void updateIndexedStyleProp(
562
- YGNode *node,
563
- Ref (YGStyle::*prop)(),
564
- Idx idx,
565
- detail::CompactValue value) {
566
- using detail::CompactValue;
567
- updateStyle(
568
- node,
569
- value,
570
- [idx, prop](YGStyle &s, CompactValue x) { return (s.*prop)()[idx] != x; },
571
- [idx, prop](YGStyle &s, CompactValue x) { (s.*prop)()[idx] = x; });
572
- }
573
-
574
- } // namespace
575
-
576
- // MSVC has trouble inferring the return type of pointer to member functions
577
- // with const and non-const overloads, instead of preferring the non-const
578
- // overload like clang and GCC. For the purposes of updateStyle(), we can help
579
- // MSVC by specifying that return type explicitely. In combination with
580
- // decltype, MSVC will prefer the non-const version.
581
- #define MSVC_HINT(PROP) decltype(YGStyle{}.PROP())
582
-
583
- YOGA_EXPORT void YGNodeStyleSetDirection(
584
- const YGNodeRef node,
585
- const YGDirection value) {
586
- updateStyle<MSVC_HINT(direction)>(node, &YGStyle::direction, value);
587
- }
588
- YOGA_EXPORT YGDirection YGNodeStyleGetDirection(const YGNodeConstRef node) {
589
- return node->getStyle().direction();
590
- }
591
-
592
- YOGA_EXPORT void YGNodeStyleSetFlexDirection(
593
- const YGNodeRef node,
594
- const YGFlexDirection flexDirection) {
595
- updateStyle<MSVC_HINT(flexDirection)>(
596
- node, &YGStyle::flexDirection, flexDirection);
597
- }
598
- YOGA_EXPORT YGFlexDirection
599
- YGNodeStyleGetFlexDirection(const YGNodeConstRef node) {
600
- return node->getStyle().flexDirection();
601
- }
602
-
603
- YOGA_EXPORT void YGNodeStyleSetJustifyContent(
604
- const YGNodeRef node,
605
- const YGJustify justifyContent) {
606
- updateStyle<MSVC_HINT(justifyContent)>(
607
- node, &YGStyle::justifyContent, justifyContent);
608
- }
609
- YOGA_EXPORT YGJustify YGNodeStyleGetJustifyContent(const YGNodeConstRef node) {
610
- return node->getStyle().justifyContent();
611
- }
612
-
613
- YOGA_EXPORT void YGNodeStyleSetAlignContent(
614
- const YGNodeRef node,
615
- const YGAlign alignContent) {
616
- updateStyle<MSVC_HINT(alignContent)>(
617
- node, &YGStyle::alignContent, alignContent);
618
- }
619
- YOGA_EXPORT YGAlign YGNodeStyleGetAlignContent(const YGNodeConstRef node) {
620
- return node->getStyle().alignContent();
621
- }
622
-
623
- YOGA_EXPORT void YGNodeStyleSetAlignItems(
624
- const YGNodeRef node,
625
- const YGAlign alignItems) {
626
- updateStyle<MSVC_HINT(alignItems)>(node, &YGStyle::alignItems, alignItems);
627
- }
628
- YOGA_EXPORT YGAlign YGNodeStyleGetAlignItems(const YGNodeConstRef node) {
629
- return node->getStyle().alignItems();
630
- }
631
-
632
- YOGA_EXPORT void YGNodeStyleSetAlignSelf(
633
- const YGNodeRef node,
634
- const YGAlign alignSelf) {
635
- updateStyle<MSVC_HINT(alignSelf)>(node, &YGStyle::alignSelf, alignSelf);
636
- }
637
- YOGA_EXPORT YGAlign YGNodeStyleGetAlignSelf(const YGNodeConstRef node) {
638
- return node->getStyle().alignSelf();
639
- }
640
-
641
- YOGA_EXPORT void YGNodeStyleSetPositionType(
642
- const YGNodeRef node,
643
- const YGPositionType positionType) {
644
- updateStyle<MSVC_HINT(positionType)>(
645
- node, &YGStyle::positionType, positionType);
646
- }
647
- YOGA_EXPORT YGPositionType
648
- YGNodeStyleGetPositionType(const YGNodeConstRef node) {
649
- return node->getStyle().positionType();
650
- }
651
-
652
- YOGA_EXPORT void YGNodeStyleSetFlexWrap(
653
- const YGNodeRef node,
654
- const YGWrap flexWrap) {
655
- updateStyle<MSVC_HINT(flexWrap)>(node, &YGStyle::flexWrap, flexWrap);
656
- }
657
- YOGA_EXPORT YGWrap YGNodeStyleGetFlexWrap(const YGNodeConstRef node) {
658
- return node->getStyle().flexWrap();
659
- }
660
-
661
- YOGA_EXPORT void YGNodeStyleSetOverflow(
662
- const YGNodeRef node,
663
- const YGOverflow overflow) {
664
- updateStyle<MSVC_HINT(overflow)>(node, &YGStyle::overflow, overflow);
665
- }
666
- YOGA_EXPORT YGOverflow YGNodeStyleGetOverflow(const YGNodeConstRef node) {
667
- return node->getStyle().overflow();
668
- }
669
-
670
- YOGA_EXPORT void YGNodeStyleSetDisplay(
671
- const YGNodeRef node,
672
- const YGDisplay display) {
673
- updateStyle<MSVC_HINT(display)>(node, &YGStyle::display, display);
674
- }
675
- YOGA_EXPORT YGDisplay YGNodeStyleGetDisplay(const YGNodeConstRef node) {
676
- return node->getStyle().display();
677
- }
678
-
679
- // TODO(T26792433): Change the API to accept YGFloatOptional.
680
- YOGA_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex) {
681
- updateStyle<MSVC_HINT(flex)>(node, &YGStyle::flex, YGFloatOptional{flex});
682
- }
683
-
684
- // TODO(T26792433): Change the API to accept YGFloatOptional.
685
- YOGA_EXPORT float YGNodeStyleGetFlex(const YGNodeConstRef node) {
686
- return node->getStyle().flex().isUndefined()
687
- ? YGUndefined
688
- : node->getStyle().flex().unwrap();
689
- }
690
-
691
- // TODO(T26792433): Change the API to accept YGFloatOptional.
692
- YOGA_EXPORT void YGNodeStyleSetFlexGrow(
693
- const YGNodeRef node,
694
- const float flexGrow) {
695
- updateStyle<MSVC_HINT(flexGrow)>(
696
- node, &YGStyle::flexGrow, YGFloatOptional{flexGrow});
697
- }
698
-
699
- // TODO(T26792433): Change the API to accept YGFloatOptional.
700
- YOGA_EXPORT void YGNodeStyleSetFlexShrink(
701
- const YGNodeRef node,
702
- const float flexShrink) {
703
- updateStyle<MSVC_HINT(flexShrink)>(
704
- node, &YGStyle::flexShrink, YGFloatOptional{flexShrink});
705
- }
706
-
707
- YOGA_EXPORT YGValue YGNodeStyleGetFlexBasis(const YGNodeConstRef node) {
708
- YGValue flexBasis = node->getStyle().flexBasis();
709
- if (flexBasis.unit == YGUnitUndefined || flexBasis.unit == YGUnitAuto) {
710
- // TODO(T26792433): Get rid off the use of YGUndefined at client side
711
- flexBasis.value = YGUndefined;
712
- }
713
- return flexBasis;
714
- }
715
-
716
- YOGA_EXPORT void YGNodeStyleSetFlexBasis(
717
- const YGNodeRef node,
718
- const float flexBasis) {
719
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(flexBasis);
720
- updateStyle<MSVC_HINT(flexBasis)>(node, &YGStyle::flexBasis, value);
721
- }
722
-
723
- YOGA_EXPORT void YGNodeStyleSetFlexBasisPercent(
724
- const YGNodeRef node,
725
- const float flexBasisPercent) {
726
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(flexBasisPercent);
727
- updateStyle<MSVC_HINT(flexBasis)>(node, &YGStyle::flexBasis, value);
728
- }
729
-
730
- YOGA_EXPORT void YGNodeStyleSetFlexBasisAuto(const YGNodeRef node) {
731
- updateStyle<MSVC_HINT(flexBasis)>(
732
- node, &YGStyle::flexBasis, detail::CompactValue::ofAuto());
733
- }
734
-
735
- YOGA_EXPORT void YGNodeStyleSetPosition(
736
- YGNodeRef node,
737
- YGEdge edge,
738
- float points) {
739
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(points);
740
- updateIndexedStyleProp<MSVC_HINT(position)>(
741
- node, &YGStyle::position, edge, value);
742
- }
743
- YOGA_EXPORT void YGNodeStyleSetPositionPercent(
744
- YGNodeRef node,
745
- YGEdge edge,
746
- float percent) {
747
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(percent);
748
- updateIndexedStyleProp<MSVC_HINT(position)>(
749
- node, &YGStyle::position, edge, value);
750
- }
751
- YOGA_EXPORT YGValue YGNodeStyleGetPosition(YGNodeConstRef node, YGEdge edge) {
752
- return node->getStyle().position()[edge];
753
- }
754
-
755
- YOGA_EXPORT void YGNodeStyleSetMargin(
756
- YGNodeRef node,
757
- YGEdge edge,
758
- float points) {
759
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(points);
760
- updateIndexedStyleProp<MSVC_HINT(margin)>(
761
- node, &YGStyle::margin, edge, value);
762
- }
763
- YOGA_EXPORT void YGNodeStyleSetMarginPercent(
764
- YGNodeRef node,
765
- YGEdge edge,
766
- float percent) {
767
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(percent);
768
- updateIndexedStyleProp<MSVC_HINT(margin)>(
769
- node, &YGStyle::margin, edge, value);
770
- }
771
- YOGA_EXPORT void YGNodeStyleSetMarginAuto(YGNodeRef node, YGEdge edge) {
772
- updateIndexedStyleProp<MSVC_HINT(margin)>(
773
- node, &YGStyle::margin, edge, detail::CompactValue::ofAuto());
774
- }
775
- YOGA_EXPORT YGValue YGNodeStyleGetMargin(YGNodeConstRef node, YGEdge edge) {
776
- return node->getStyle().margin()[edge];
777
- }
778
-
779
- YOGA_EXPORT void YGNodeStyleSetPadding(
780
- YGNodeRef node,
781
- YGEdge edge,
782
- float points) {
783
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(points);
784
- updateIndexedStyleProp<MSVC_HINT(padding)>(
785
- node, &YGStyle::padding, edge, value);
786
- }
787
- YOGA_EXPORT void YGNodeStyleSetPaddingPercent(
788
- YGNodeRef node,
789
- YGEdge edge,
790
- float percent) {
791
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(percent);
792
- updateIndexedStyleProp<MSVC_HINT(padding)>(
793
- node, &YGStyle::padding, edge, value);
794
- }
795
- YOGA_EXPORT YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge) {
796
- return node->getStyle().padding()[edge];
797
- }
798
-
799
- // TODO(T26792433): Change the API to accept YGFloatOptional.
800
- YOGA_EXPORT void YGNodeStyleSetBorder(
801
- const YGNodeRef node,
802
- const YGEdge edge,
803
- const float border) {
804
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(border);
805
- updateIndexedStyleProp<MSVC_HINT(border)>(
806
- node, &YGStyle::border, edge, value);
807
- }
808
-
809
- YOGA_EXPORT float YGNodeStyleGetBorder(
810
- const YGNodeConstRef node,
811
- const YGEdge edge) {
812
- auto border = node->getStyle().border()[edge];
813
- if (border.isUndefined() || border.isAuto()) {
814
- // TODO(T26792433): Rather than returning YGUndefined, change the api to
815
- // return YGFloatOptional.
816
- return YGUndefined;
817
- }
818
-
819
- return static_cast<YGValue>(border).value;
820
- }
821
-
822
- // Yoga specific properties, not compatible with flexbox specification
823
-
824
- // TODO(T26792433): Change the API to accept YGFloatOptional.
825
- YOGA_EXPORT float YGNodeStyleGetAspectRatio(const YGNodeConstRef node) {
826
- const YGFloatOptional op = node->getStyle().aspectRatio();
827
- return op.isUndefined() ? YGUndefined : op.unwrap();
828
- }
829
-
830
- // TODO(T26792433): Change the API to accept YGFloatOptional.
831
- YOGA_EXPORT void YGNodeStyleSetAspectRatio(
832
- const YGNodeRef node,
833
- const float aspectRatio) {
834
- updateStyle<MSVC_HINT(aspectRatio)>(
835
- node, &YGStyle::aspectRatio, YGFloatOptional{aspectRatio});
836
- }
837
-
838
- YOGA_EXPORT void YGNodeStyleSetWidth(YGNodeRef node, float points) {
839
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(points);
840
- updateIndexedStyleProp<MSVC_HINT(dimensions)>(
841
- node, &YGStyle::dimensions, YGDimensionWidth, value);
842
- }
843
- YOGA_EXPORT void YGNodeStyleSetWidthPercent(YGNodeRef node, float percent) {
844
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(percent);
845
- updateIndexedStyleProp<MSVC_HINT(dimensions)>(
846
- node, &YGStyle::dimensions, YGDimensionWidth, value);
847
- }
848
- YOGA_EXPORT void YGNodeStyleSetWidthAuto(YGNodeRef node) {
849
- updateIndexedStyleProp<MSVC_HINT(dimensions)>(
850
- node,
851
- &YGStyle::dimensions,
852
- YGDimensionWidth,
853
- detail::CompactValue::ofAuto());
854
- }
855
- YOGA_EXPORT YGValue YGNodeStyleGetWidth(YGNodeConstRef node) {
856
- return node->getStyle().dimensions()[YGDimensionWidth];
857
- }
858
-
859
- YOGA_EXPORT void YGNodeStyleSetHeight(YGNodeRef node, float points) {
860
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(points);
861
- updateIndexedStyleProp<MSVC_HINT(dimensions)>(
862
- node, &YGStyle::dimensions, YGDimensionHeight, value);
863
- }
864
- YOGA_EXPORT void YGNodeStyleSetHeightPercent(YGNodeRef node, float percent) {
865
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(percent);
866
- updateIndexedStyleProp<MSVC_HINT(dimensions)>(
867
- node, &YGStyle::dimensions, YGDimensionHeight, value);
868
- }
869
- YOGA_EXPORT void YGNodeStyleSetHeightAuto(YGNodeRef node) {
870
- updateIndexedStyleProp<MSVC_HINT(dimensions)>(
871
- node,
872
- &YGStyle::dimensions,
873
- YGDimensionHeight,
874
- detail::CompactValue::ofAuto());
875
- }
876
- YOGA_EXPORT YGValue YGNodeStyleGetHeight(YGNodeConstRef node) {
877
- return node->getStyle().dimensions()[YGDimensionHeight];
878
- }
879
-
880
- YOGA_EXPORT void YGNodeStyleSetMinWidth(
881
- const YGNodeRef node,
882
- const float minWidth) {
883
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(minWidth);
884
- updateIndexedStyleProp<MSVC_HINT(minDimensions)>(
885
- node, &YGStyle::minDimensions, YGDimensionWidth, value);
886
- }
887
- YOGA_EXPORT void YGNodeStyleSetMinWidthPercent(
888
- const YGNodeRef node,
889
- const float minWidth) {
890
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(minWidth);
891
- updateIndexedStyleProp<MSVC_HINT(minDimensions)>(
892
- node, &YGStyle::minDimensions, YGDimensionWidth, value);
893
- }
894
- YOGA_EXPORT YGValue YGNodeStyleGetMinWidth(const YGNodeConstRef node) {
895
- return node->getStyle().minDimensions()[YGDimensionWidth];
896
- };
897
-
898
- YOGA_EXPORT void YGNodeStyleSetMinHeight(
899
- const YGNodeRef node,
900
- const float minHeight) {
901
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(minHeight);
902
- updateIndexedStyleProp<MSVC_HINT(minDimensions)>(
903
- node, &YGStyle::minDimensions, YGDimensionHeight, value);
904
- }
905
- YOGA_EXPORT void YGNodeStyleSetMinHeightPercent(
906
- const YGNodeRef node,
907
- const float minHeight) {
908
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(minHeight);
909
- updateIndexedStyleProp<MSVC_HINT(minDimensions)>(
910
- node, &YGStyle::minDimensions, YGDimensionHeight, value);
911
- }
912
- YOGA_EXPORT YGValue YGNodeStyleGetMinHeight(const YGNodeConstRef node) {
913
- return node->getStyle().minDimensions()[YGDimensionHeight];
914
- };
915
-
916
- YOGA_EXPORT void YGNodeStyleSetMaxWidth(
917
- const YGNodeRef node,
918
- const float maxWidth) {
919
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(maxWidth);
920
- updateIndexedStyleProp<MSVC_HINT(maxDimensions)>(
921
- node, &YGStyle::maxDimensions, YGDimensionWidth, value);
922
- }
923
- YOGA_EXPORT void YGNodeStyleSetMaxWidthPercent(
924
- const YGNodeRef node,
925
- const float maxWidth) {
926
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(maxWidth);
927
- updateIndexedStyleProp<MSVC_HINT(maxDimensions)>(
928
- node, &YGStyle::maxDimensions, YGDimensionWidth, value);
929
- }
930
- YOGA_EXPORT YGValue YGNodeStyleGetMaxWidth(const YGNodeConstRef node) {
931
- return node->getStyle().maxDimensions()[YGDimensionWidth];
932
- };
933
-
934
- YOGA_EXPORT void YGNodeStyleSetMaxHeight(
935
- const YGNodeRef node,
936
- const float maxHeight) {
937
- auto value = detail::CompactValue::ofMaybe<YGUnitPoint>(maxHeight);
938
- updateIndexedStyleProp<MSVC_HINT(maxDimensions)>(
939
- node, &YGStyle::maxDimensions, YGDimensionHeight, value);
940
- }
941
- YOGA_EXPORT void YGNodeStyleSetMaxHeightPercent(
942
- const YGNodeRef node,
943
- const float maxHeight) {
944
- auto value = detail::CompactValue::ofMaybe<YGUnitPercent>(maxHeight);
945
- updateIndexedStyleProp<MSVC_HINT(maxDimensions)>(
946
- node, &YGStyle::maxDimensions, YGDimensionHeight, value);
947
- }
948
- YOGA_EXPORT YGValue YGNodeStyleGetMaxHeight(const YGNodeConstRef node) {
949
- return node->getStyle().maxDimensions()[YGDimensionHeight];
950
- };
951
-
952
- #define YG_NODE_LAYOUT_PROPERTY_IMPL(type, name, instanceName) \
953
- YOGA_EXPORT type YGNodeLayoutGet##name(const YGNodeRef node) { \
954
- return node->getLayout().instanceName; \
955
- }
956
-
957
- #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \
958
- YOGA_EXPORT type YGNodeLayoutGet##name( \
959
- const YGNodeRef node, const YGEdge edge) { \
960
- YGAssertWithNode( \
961
- node, \
962
- edge <= YGEdgeEnd, \
963
- "Cannot get layout properties of multi-edge shorthands"); \
964
- \
965
- if (edge == YGEdgeStart) { \
966
- if (node->getLayout().direction() == YGDirectionRTL) { \
967
- return node->getLayout().instanceName[YGEdgeRight]; \
968
- } else { \
969
- return node->getLayout().instanceName[YGEdgeLeft]; \
970
- } \
971
- } \
972
- \
973
- if (edge == YGEdgeEnd) { \
974
- if (node->getLayout().direction() == YGDirectionRTL) { \
975
- return node->getLayout().instanceName[YGEdgeLeft]; \
976
- } else { \
977
- return node->getLayout().instanceName[YGEdgeRight]; \
978
- } \
979
- } \
980
- \
981
- return node->getLayout().instanceName[edge]; \
982
- }
983
-
984
- YG_NODE_LAYOUT_PROPERTY_IMPL(float, Left, position[YGEdgeLeft]);
985
- YG_NODE_LAYOUT_PROPERTY_IMPL(float, Top, position[YGEdgeTop]);
986
- YG_NODE_LAYOUT_PROPERTY_IMPL(float, Right, position[YGEdgeRight]);
987
- YG_NODE_LAYOUT_PROPERTY_IMPL(float, Bottom, position[YGEdgeBottom]);
988
- YG_NODE_LAYOUT_PROPERTY_IMPL(float, Width, dimensions[YGDimensionWidth]);
989
- YG_NODE_LAYOUT_PROPERTY_IMPL(float, Height, dimensions[YGDimensionHeight]);
990
- YG_NODE_LAYOUT_PROPERTY_IMPL(YGDirection, Direction, direction());
991
- YG_NODE_LAYOUT_PROPERTY_IMPL(bool, HadOverflow, hadOverflow());
992
-
993
- YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(float, Margin, margin);
994
- YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(float, Border, border);
995
- YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(float, Padding, padding);
996
-
997
- YOGA_EXPORT bool YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(
998
- const YGNodeRef node) {
999
- return node->getLayout().doesLegacyStretchFlagAffectsLayout();
1000
- }
1001
-
1002
- std::atomic<uint32_t> gCurrentGenerationCount(0);
1003
-
1004
- bool YGLayoutNodeInternal(
1005
- const YGNodeRef node,
1006
- const float availableWidth,
1007
- const float availableHeight,
1008
- const YGDirection ownerDirection,
1009
- const YGMeasureMode widthMeasureMode,
1010
- const YGMeasureMode heightMeasureMode,
1011
- const float ownerWidth,
1012
- const float ownerHeight,
1013
- const bool performLayout,
1014
- const LayoutPassReason reason,
1015
- const YGConfigRef config,
1016
- LayoutData &layoutMarkerData,
1017
- void *const layoutContext,
1018
- const uint32_t depth,
1019
- const uint32_t generationCount);
1020
-
1021
- #ifdef DEBUG
1022
- static void YGNodePrintInternal(
1023
- const YGNodeRef node,
1024
- const YGPrintOptions options) {
1025
- std::string str;
1026
- facebook::yoga::YGNodeToString(str, node, options, 0);
1027
- Log::log(node, YGLogLevelDebug, nullptr, str.c_str());
1028
- }
1029
-
1030
- YOGA_EXPORT void YGNodePrint(
1031
- const YGNodeRef node,
1032
- const YGPrintOptions options) {
1033
- YGNodePrintInternal(node, options);
1034
- }
1035
- #endif
1036
-
1037
- const std::array<YGEdge, 4> leading = {
1038
- {YGEdgeTop, YGEdgeBottom, YGEdgeLeft, YGEdgeRight}};
1039
-
1040
- const std::array<YGEdge, 4> trailing = {
1041
- {YGEdgeBottom, YGEdgeTop, YGEdgeRight, YGEdgeLeft}};
1042
- static const std::array<YGEdge, 4> pos = {{
1043
- YGEdgeTop,
1044
- YGEdgeBottom,
1045
- YGEdgeLeft,
1046
- YGEdgeRight,
1047
- }};
1048
-
1049
- static const std::array<YGDimension, 4> dim = {
1050
- {YGDimensionHeight, YGDimensionHeight, YGDimensionWidth, YGDimensionWidth}};
1051
-
1052
- static inline float YGNodePaddingAndBorderForAxis(
1053
- const YGNodeConstRef node,
1054
- const YGFlexDirection axis,
1055
- const float widthSize) {
1056
- return (node->getLeadingPaddingAndBorder(axis, widthSize) +
1057
- node->getTrailingPaddingAndBorder(axis, widthSize))
1058
- .unwrap();
1059
- }
1060
-
1061
- static inline YGAlign YGNodeAlignItem(const YGNode *node, const YGNode *child) {
1062
- const YGAlign align = child->getStyle().alignSelf() == YGAlignAuto
1063
- ? node->getStyle().alignItems()
1064
- : child->getStyle().alignSelf();
1065
- if (align == YGAlignBaseline &&
1066
- YGFlexDirectionIsColumn(node->getStyle().flexDirection())) {
1067
- return YGAlignFlexStart;
1068
- }
1069
- return align;
1070
- }
1071
-
1072
- static float YGBaseline(const YGNodeRef node, void *layoutContext) {
1073
- if (node->hasBaselineFunc()) {
1074
- Event::publish<Event::NodeBaselineStart>(node);
1075
-
1076
- const float baseline = node->baseline(
1077
- node->getLayout().measuredDimensions[YGDimensionWidth],
1078
- node->getLayout().measuredDimensions[YGDimensionHeight],
1079
- layoutContext);
1080
-
1081
- Event::publish<Event::NodeBaselineEnd>(node);
1082
-
1083
- YGAssertWithNode(
1084
- node,
1085
- !YGFloatIsUndefined(baseline),
1086
- "Expect custom baseline function to not return NaN");
1087
- return baseline;
1088
- }
1089
-
1090
- YGNodeRef baselineChild = nullptr;
1091
- const uint32_t childCount = YGNodeGetChildCount(node);
1092
- for (uint32_t i = 0; i < childCount; i++) {
1093
- const YGNodeRef child = YGNodeGetChild(node, i);
1094
- if (child->getLineIndex() > 0) {
1095
- break;
1096
- }
1097
- if (child->getStyle().positionType() == YGPositionTypeAbsolute) {
1098
- continue;
1099
- }
1100
- if (YGNodeAlignItem(node, child) == YGAlignBaseline ||
1101
- child->isReferenceBaseline()) {
1102
- baselineChild = child;
1103
- break;
1104
- }
1105
-
1106
- if (baselineChild == nullptr) {
1107
- baselineChild = child;
1108
- }
1109
- }
1110
-
1111
- if (baselineChild == nullptr) {
1112
- return node->getLayout().measuredDimensions[YGDimensionHeight];
1113
- }
1114
-
1115
- const float baseline = YGBaseline(baselineChild, layoutContext);
1116
- return baseline + baselineChild->getLayout().position[YGEdgeTop];
1117
- }
1118
-
1119
- static bool YGIsBaselineLayout(const YGNodeRef node) {
1120
- if (YGFlexDirectionIsColumn(node->getStyle().flexDirection())) {
1121
- return false;
1122
- }
1123
- if (node->getStyle().alignItems() == YGAlignBaseline) {
1124
- return true;
1125
- }
1126
- const uint32_t childCount = YGNodeGetChildCount(node);
1127
- for (uint32_t i = 0; i < childCount; i++) {
1128
- const YGNodeRef child = YGNodeGetChild(node, i);
1129
- if (child->getStyle().positionType() == YGPositionTypeRelative &&
1130
- child->getStyle().alignSelf() == YGAlignBaseline) {
1131
- return true;
1132
- }
1133
- }
1134
-
1135
- return false;
1136
- }
1137
-
1138
- static inline float YGNodeDimWithMargin(
1139
- const YGNodeRef node,
1140
- const YGFlexDirection axis,
1141
- const float widthSize) {
1142
- return node->getLayout().measuredDimensions[dim[axis]] +
1143
- (node->getLeadingMargin(axis, widthSize) +
1144
- node->getTrailingMargin(axis, widthSize))
1145
- .unwrap();
1146
- }
1147
-
1148
- static inline bool YGNodeIsStyleDimDefined(
1149
- const YGNodeRef node,
1150
- const YGFlexDirection axis,
1151
- const float ownerSize) {
1152
- bool isUndefined =
1153
- YGFloatIsUndefined(node->getResolvedDimension(dim[axis]).value);
1154
- return !(
1155
- node->getResolvedDimension(dim[axis]).unit == YGUnitAuto ||
1156
- node->getResolvedDimension(dim[axis]).unit == YGUnitUndefined ||
1157
- (node->getResolvedDimension(dim[axis]).unit == YGUnitPoint &&
1158
- !isUndefined && node->getResolvedDimension(dim[axis]).value < 0.0f) ||
1159
- (node->getResolvedDimension(dim[axis]).unit == YGUnitPercent &&
1160
- !isUndefined &&
1161
- (node->getResolvedDimension(dim[axis]).value < 0.0f ||
1162
- YGFloatIsUndefined(ownerSize))));
1163
- }
1164
-
1165
- static inline bool YGNodeIsLayoutDimDefined(
1166
- const YGNodeRef node,
1167
- const YGFlexDirection axis) {
1168
- const float value = node->getLayout().measuredDimensions[dim[axis]];
1169
- return !YGFloatIsUndefined(value) && value >= 0.0f;
1170
- }
1171
-
1172
- static YGFloatOptional YGNodeBoundAxisWithinMinAndMax(
1173
- const YGNodeConstRef node,
1174
- const YGFlexDirection axis,
1175
- const YGFloatOptional value,
1176
- const float axisSize) {
1177
- YGFloatOptional min;
1178
- YGFloatOptional max;
1179
-
1180
- if (YGFlexDirectionIsColumn(axis)) {
1181
- min = YGResolveValue(
1182
- node->getStyle().minDimensions()[YGDimensionHeight], axisSize);
1183
- max = YGResolveValue(
1184
- node->getStyle().maxDimensions()[YGDimensionHeight], axisSize);
1185
- } else if (YGFlexDirectionIsRow(axis)) {
1186
- min = YGResolveValue(
1187
- node->getStyle().minDimensions()[YGDimensionWidth], axisSize);
1188
- max = YGResolveValue(
1189
- node->getStyle().maxDimensions()[YGDimensionWidth], axisSize);
1190
- }
1191
-
1192
- if (max >= YGFloatOptional{0} && value > max) {
1193
- return max;
1194
- }
1195
-
1196
- if (min >= YGFloatOptional{0} && value < min) {
1197
- return min;
1198
- }
1199
-
1200
- return value;
1201
- }
1202
-
1203
- // Like YGNodeBoundAxisWithinMinAndMax but also ensures that the value doesn't
1204
- // go below the padding and border amount.
1205
- static inline float YGNodeBoundAxis(
1206
- const YGNodeRef node,
1207
- const YGFlexDirection axis,
1208
- const float value,
1209
- const float axisSize,
1210
- const float widthSize) {
1211
- return YGFloatMax(
1212
- YGNodeBoundAxisWithinMinAndMax(
1213
- node, axis, YGFloatOptional{value}, axisSize)
1214
- .unwrap(),
1215
- YGNodePaddingAndBorderForAxis(node, axis, widthSize));
1216
- }
1217
-
1218
- static void YGNodeSetChildTrailingPosition(
1219
- const YGNodeRef node,
1220
- const YGNodeRef child,
1221
- const YGFlexDirection axis) {
1222
- const float size = child->getLayout().measuredDimensions[dim[axis]];
1223
- child->setLayoutPosition(
1224
- node->getLayout().measuredDimensions[dim[axis]] - size -
1225
- child->getLayout().position[pos[axis]],
1226
- trailing[axis]);
1227
- }
1228
-
1229
- static void YGConstrainMaxSizeForMode(
1230
- const YGNodeConstRef node,
1231
- const enum YGFlexDirection axis,
1232
- const float ownerAxisSize,
1233
- const float ownerWidth,
1234
- YGMeasureMode *mode,
1235
- float *size) {
1236
- const YGFloatOptional maxSize =
1237
- YGResolveValue(
1238
- node->getStyle().maxDimensions()[dim[axis]], ownerAxisSize) +
1239
- YGFloatOptional(node->getMarginForAxis(axis, ownerWidth));
1240
- switch (*mode) {
1241
- case YGMeasureModeExactly:
1242
- case YGMeasureModeAtMost:
1243
- *size = (maxSize.isUndefined() || *size < maxSize.unwrap())
1244
- ? *size
1245
- : maxSize.unwrap();
1246
- break;
1247
- case YGMeasureModeUndefined:
1248
- if (!maxSize.isUndefined()) {
1249
- *mode = YGMeasureModeAtMost;
1250
- *size = maxSize.unwrap();
1251
- }
1252
- break;
1253
- }
1254
- }
1255
-
1256
- static void YGNodeComputeFlexBasisForChild(
1257
- const YGNodeRef node,
1258
- const YGNodeRef child,
1259
- const float width,
1260
- const YGMeasureMode widthMode,
1261
- const float height,
1262
- const float ownerWidth,
1263
- const float ownerHeight,
1264
- const YGMeasureMode heightMode,
1265
- const YGDirection direction,
1266
- const YGConfigRef config,
1267
- LayoutData &layoutMarkerData,
1268
- void *const layoutContext,
1269
- const uint32_t depth,
1270
- const uint32_t generationCount) {
1271
- const YGFlexDirection mainAxis =
1272
- YGResolveFlexDirection(node->getStyle().flexDirection(), direction);
1273
- const bool isMainAxisRow = YGFlexDirectionIsRow(mainAxis);
1274
- const float mainAxisSize = isMainAxisRow ? width : height;
1275
- const float mainAxisownerSize = isMainAxisRow ? ownerWidth : ownerHeight;
1276
-
1277
- float childWidth;
1278
- float childHeight;
1279
- YGMeasureMode childWidthMeasureMode;
1280
- YGMeasureMode childHeightMeasureMode;
1281
-
1282
- const YGFloatOptional resolvedFlexBasis =
1283
- YGResolveValue(child->resolveFlexBasisPtr(), mainAxisownerSize);
1284
- const bool isRowStyleDimDefined =
1285
- YGNodeIsStyleDimDefined(child, YGFlexDirectionRow, ownerWidth);
1286
- const bool isColumnStyleDimDefined =
1287
- YGNodeIsStyleDimDefined(child, YGFlexDirectionColumn, ownerHeight);
1288
-
1289
- if (!resolvedFlexBasis.isUndefined() && !YGFloatIsUndefined(mainAxisSize)) {
1290
- if (child->getLayout().computedFlexBasis.isUndefined() ||
1291
- (YGConfigIsExperimentalFeatureEnabled(
1292
- child->getConfig(), YGExperimentalFeatureWebFlexBasis) &&
1293
- child->getLayout().computedFlexBasisGeneration != generationCount)) {
1294
- const YGFloatOptional paddingAndBorder = YGFloatOptional(
1295
- YGNodePaddingAndBorderForAxis(child, mainAxis, ownerWidth));
1296
- child->setLayoutComputedFlexBasis(
1297
- YGFloatOptionalMax(resolvedFlexBasis, paddingAndBorder));
1298
- }
1299
- } else if (isMainAxisRow && isRowStyleDimDefined) {
1300
- // The width is definite, so use that as the flex basis.
1301
- const YGFloatOptional paddingAndBorder = YGFloatOptional(
1302
- YGNodePaddingAndBorderForAxis(child, YGFlexDirectionRow, ownerWidth));
1303
-
1304
- child->setLayoutComputedFlexBasis(YGFloatOptionalMax(
1305
- YGResolveValue(
1306
- child->getResolvedDimensions()[YGDimensionWidth], ownerWidth),
1307
- paddingAndBorder));
1308
- } else if (!isMainAxisRow && isColumnStyleDimDefined) {
1309
- // The height is definite, so use that as the flex basis.
1310
- const YGFloatOptional paddingAndBorder =
1311
- YGFloatOptional(YGNodePaddingAndBorderForAxis(
1312
- child, YGFlexDirectionColumn, ownerWidth));
1313
- child->setLayoutComputedFlexBasis(YGFloatOptionalMax(
1314
- YGResolveValue(
1315
- child->getResolvedDimensions()[YGDimensionHeight], ownerHeight),
1316
- paddingAndBorder));
1317
- } else {
1318
- // Compute the flex basis and hypothetical main size (i.e. the clamped flex
1319
- // basis).
1320
- childWidth = YGUndefined;
1321
- childHeight = YGUndefined;
1322
- childWidthMeasureMode = YGMeasureModeUndefined;
1323
- childHeightMeasureMode = YGMeasureModeUndefined;
1324
-
1325
- auto marginRow =
1326
- child->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap();
1327
- auto marginColumn =
1328
- child->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap();
1329
-
1330
- if (isRowStyleDimDefined) {
1331
- childWidth =
1332
- YGResolveValue(
1333
- child->getResolvedDimensions()[YGDimensionWidth], ownerWidth)
1334
- .unwrap() +
1335
- marginRow;
1336
- childWidthMeasureMode = YGMeasureModeExactly;
1337
- }
1338
- if (isColumnStyleDimDefined) {
1339
- childHeight =
1340
- YGResolveValue(
1341
- child->getResolvedDimensions()[YGDimensionHeight], ownerHeight)
1342
- .unwrap() +
1343
- marginColumn;
1344
- childHeightMeasureMode = YGMeasureModeExactly;
1345
- }
1346
-
1347
- // The W3C spec doesn't say anything about the 'overflow' property, but all
1348
- // major browsers appear to implement the following logic.
1349
- if ((!isMainAxisRow && node->getStyle().overflow() == YGOverflowScroll) ||
1350
- node->getStyle().overflow() != YGOverflowScroll) {
1351
- if (YGFloatIsUndefined(childWidth) && !YGFloatIsUndefined(width)) {
1352
- childWidth = width;
1353
- childWidthMeasureMode = YGMeasureModeAtMost;
1354
- }
1355
- }
1356
-
1357
- if ((isMainAxisRow && node->getStyle().overflow() == YGOverflowScroll) ||
1358
- node->getStyle().overflow() != YGOverflowScroll) {
1359
- if (YGFloatIsUndefined(childHeight) && !YGFloatIsUndefined(height)) {
1360
- childHeight = height;
1361
- childHeightMeasureMode = YGMeasureModeAtMost;
1362
- }
1363
- }
1364
-
1365
- const auto &childStyle = child->getStyle();
1366
- if (!childStyle.aspectRatio().isUndefined()) {
1367
- if (!isMainAxisRow && childWidthMeasureMode == YGMeasureModeExactly) {
1368
- childHeight = marginColumn +
1369
- (childWidth - marginRow) / childStyle.aspectRatio().unwrap();
1370
- childHeightMeasureMode = YGMeasureModeExactly;
1371
- } else if (
1372
- isMainAxisRow && childHeightMeasureMode == YGMeasureModeExactly) {
1373
- childWidth = marginRow +
1374
- (childHeight - marginColumn) * childStyle.aspectRatio().unwrap();
1375
- childWidthMeasureMode = YGMeasureModeExactly;
1376
- }
1377
- }
1378
-
1379
- // If child has no defined size in the cross axis and is set to stretch, set
1380
- // the cross axis to be measured exactly with the available inner width
1381
-
1382
- const bool hasExactWidth =
1383
- !YGFloatIsUndefined(width) && widthMode == YGMeasureModeExactly;
1384
- const bool childWidthStretch =
1385
- YGNodeAlignItem(node, child) == YGAlignStretch &&
1386
- childWidthMeasureMode != YGMeasureModeExactly;
1387
- if (!isMainAxisRow && !isRowStyleDimDefined && hasExactWidth &&
1388
- childWidthStretch) {
1389
- childWidth = width;
1390
- childWidthMeasureMode = YGMeasureModeExactly;
1391
- if (!childStyle.aspectRatio().isUndefined()) {
1392
- childHeight =
1393
- (childWidth - marginRow) / childStyle.aspectRatio().unwrap();
1394
- childHeightMeasureMode = YGMeasureModeExactly;
1395
- }
1396
- }
1397
-
1398
- const bool hasExactHeight =
1399
- !YGFloatIsUndefined(height) && heightMode == YGMeasureModeExactly;
1400
- const bool childHeightStretch =
1401
- YGNodeAlignItem(node, child) == YGAlignStretch &&
1402
- childHeightMeasureMode != YGMeasureModeExactly;
1403
- if (isMainAxisRow && !isColumnStyleDimDefined && hasExactHeight &&
1404
- childHeightStretch) {
1405
- childHeight = height;
1406
- childHeightMeasureMode = YGMeasureModeExactly;
1407
-
1408
- if (!childStyle.aspectRatio().isUndefined()) {
1409
- childWidth =
1410
- (childHeight - marginColumn) * childStyle.aspectRatio().unwrap();
1411
- childWidthMeasureMode = YGMeasureModeExactly;
1412
- }
1413
- }
1414
-
1415
- YGConstrainMaxSizeForMode(
1416
- child,
1417
- YGFlexDirectionRow,
1418
- ownerWidth,
1419
- ownerWidth,
1420
- &childWidthMeasureMode,
1421
- &childWidth);
1422
- YGConstrainMaxSizeForMode(
1423
- child,
1424
- YGFlexDirectionColumn,
1425
- ownerHeight,
1426
- ownerWidth,
1427
- &childHeightMeasureMode,
1428
- &childHeight);
1429
-
1430
- // Measure the child
1431
- YGLayoutNodeInternal(
1432
- child,
1433
- childWidth,
1434
- childHeight,
1435
- direction,
1436
- childWidthMeasureMode,
1437
- childHeightMeasureMode,
1438
- ownerWidth,
1439
- ownerHeight,
1440
- false,
1441
- LayoutPassReason::kMeasureChild,
1442
- config,
1443
- layoutMarkerData,
1444
- layoutContext,
1445
- depth,
1446
- generationCount);
1447
-
1448
- child->setLayoutComputedFlexBasis(YGFloatOptional(YGFloatMax(
1449
- child->getLayout().measuredDimensions[dim[mainAxis]],
1450
- YGNodePaddingAndBorderForAxis(child, mainAxis, ownerWidth))));
1451
- }
1452
- child->setLayoutComputedFlexBasisGeneration(generationCount);
1453
- }
1454
-
1455
- static void YGNodeAbsoluteLayoutChild(
1456
- const YGNodeRef node,
1457
- const YGNodeRef child,
1458
- const float width,
1459
- const YGMeasureMode widthMode,
1460
- const float height,
1461
- const YGDirection direction,
1462
- const YGConfigRef config,
1463
- LayoutData &layoutMarkerData,
1464
- void *const layoutContext,
1465
- const uint32_t depth,
1466
- const uint32_t generationCount) {
1467
- const YGFlexDirection mainAxis =
1468
- YGResolveFlexDirection(node->getStyle().flexDirection(), direction);
1469
- const YGFlexDirection crossAxis = YGFlexDirectionCross(mainAxis, direction);
1470
- const bool isMainAxisRow = YGFlexDirectionIsRow(mainAxis);
1471
-
1472
- float childWidth = YGUndefined;
1473
- float childHeight = YGUndefined;
1474
- YGMeasureMode childWidthMeasureMode = YGMeasureModeUndefined;
1475
- YGMeasureMode childHeightMeasureMode = YGMeasureModeUndefined;
1476
-
1477
- auto marginRow = child->getMarginForAxis(YGFlexDirectionRow, width).unwrap();
1478
- auto marginColumn =
1479
- child->getMarginForAxis(YGFlexDirectionColumn, width).unwrap();
1480
-
1481
- if (YGNodeIsStyleDimDefined(child, YGFlexDirectionRow, width)) {
1482
- childWidth =
1483
- YGResolveValue(child->getResolvedDimensions()[YGDimensionWidth], width)
1484
- .unwrap() +
1485
- marginRow;
1486
- } else {
1487
- // If the child doesn't have a specified width, compute the width based on
1488
- // the left/right offsets if they're defined.
1489
- if (child->isLeadingPositionDefined(YGFlexDirectionRow) &&
1490
- child->isTrailingPosDefined(YGFlexDirectionRow)) {
1491
- childWidth = node->getLayout().measuredDimensions[YGDimensionWidth] -
1492
- (node->getLeadingBorder(YGFlexDirectionRow) +
1493
- node->getTrailingBorder(YGFlexDirectionRow)) -
1494
- (child->getLeadingPosition(YGFlexDirectionRow, width) +
1495
- child->getTrailingPosition(YGFlexDirectionRow, width))
1496
- .unwrap();
1497
- childWidth =
1498
- YGNodeBoundAxis(child, YGFlexDirectionRow, childWidth, width, width);
1499
- }
1500
- }
1501
-
1502
- if (YGNodeIsStyleDimDefined(child, YGFlexDirectionColumn, height)) {
1503
- childHeight = YGResolveValue(
1504
- child->getResolvedDimensions()[YGDimensionHeight], height)
1505
- .unwrap() +
1506
- marginColumn;
1507
- } else {
1508
- // If the child doesn't have a specified height, compute the height based on
1509
- // the top/bottom offsets if they're defined.
1510
- if (child->isLeadingPositionDefined(YGFlexDirectionColumn) &&
1511
- child->isTrailingPosDefined(YGFlexDirectionColumn)) {
1512
- childHeight = node->getLayout().measuredDimensions[YGDimensionHeight] -
1513
- (node->getLeadingBorder(YGFlexDirectionColumn) +
1514
- node->getTrailingBorder(YGFlexDirectionColumn)) -
1515
- (child->getLeadingPosition(YGFlexDirectionColumn, height) +
1516
- child->getTrailingPosition(YGFlexDirectionColumn, height))
1517
- .unwrap();
1518
- childHeight = YGNodeBoundAxis(
1519
- child, YGFlexDirectionColumn, childHeight, height, width);
1520
- }
1521
- }
1522
-
1523
- // Exactly one dimension needs to be defined for us to be able to do aspect
1524
- // ratio calculation. One dimension being the anchor and the other being
1525
- // flexible.
1526
- const auto &childStyle = child->getStyle();
1527
- if (YGFloatIsUndefined(childWidth) ^ YGFloatIsUndefined(childHeight)) {
1528
- if (!childStyle.aspectRatio().isUndefined()) {
1529
- if (YGFloatIsUndefined(childWidth)) {
1530
- childWidth = marginRow +
1531
- (childHeight - marginColumn) * childStyle.aspectRatio().unwrap();
1532
- } else if (YGFloatIsUndefined(childHeight)) {
1533
- childHeight = marginColumn +
1534
- (childWidth - marginRow) / childStyle.aspectRatio().unwrap();
1535
- }
1536
- }
1537
- }
1538
-
1539
- // If we're still missing one or the other dimension, measure the content.
1540
- if (YGFloatIsUndefined(childWidth) || YGFloatIsUndefined(childHeight)) {
1541
- childWidthMeasureMode = YGFloatIsUndefined(childWidth)
1542
- ? YGMeasureModeUndefined
1543
- : YGMeasureModeExactly;
1544
- childHeightMeasureMode = YGFloatIsUndefined(childHeight)
1545
- ? YGMeasureModeUndefined
1546
- : YGMeasureModeExactly;
1547
-
1548
- // If the size of the owner is defined then try to constrain the absolute
1549
- // child to that size as well. This allows text within the absolute child to
1550
- // wrap to the size of its owner. This is the same behavior as many browsers
1551
- // implement.
1552
- if (!isMainAxisRow && YGFloatIsUndefined(childWidth) &&
1553
- widthMode != YGMeasureModeUndefined && !YGFloatIsUndefined(width) &&
1554
- width > 0) {
1555
- childWidth = width;
1556
- childWidthMeasureMode = YGMeasureModeAtMost;
1557
- }
1558
-
1559
- YGLayoutNodeInternal(
1560
- child,
1561
- childWidth,
1562
- childHeight,
1563
- direction,
1564
- childWidthMeasureMode,
1565
- childHeightMeasureMode,
1566
- childWidth,
1567
- childHeight,
1568
- false,
1569
- LayoutPassReason::kAbsMeasureChild,
1570
- config,
1571
- layoutMarkerData,
1572
- layoutContext,
1573
- depth,
1574
- generationCount);
1575
- childWidth = child->getLayout().measuredDimensions[YGDimensionWidth] +
1576
- child->getMarginForAxis(YGFlexDirectionRow, width).unwrap();
1577
- childHeight = child->getLayout().measuredDimensions[YGDimensionHeight] +
1578
- child->getMarginForAxis(YGFlexDirectionColumn, width).unwrap();
1579
- }
1580
-
1581
- YGLayoutNodeInternal(
1582
- child,
1583
- childWidth,
1584
- childHeight,
1585
- direction,
1586
- YGMeasureModeExactly,
1587
- YGMeasureModeExactly,
1588
- childWidth,
1589
- childHeight,
1590
- true,
1591
- LayoutPassReason::kAbsLayout,
1592
- config,
1593
- layoutMarkerData,
1594
- layoutContext,
1595
- depth,
1596
- generationCount);
1597
-
1598
- if (child->isTrailingPosDefined(mainAxis) &&
1599
- !child->isLeadingPositionDefined(mainAxis)) {
1600
- child->setLayoutPosition(
1601
- node->getLayout().measuredDimensions[dim[mainAxis]] -
1602
- child->getLayout().measuredDimensions[dim[mainAxis]] -
1603
- node->getTrailingBorder(mainAxis) -
1604
- child->getTrailingMargin(mainAxis, width).unwrap() -
1605
- child->getTrailingPosition(mainAxis, isMainAxisRow ? width : height)
1606
- .unwrap(),
1607
- leading[mainAxis]);
1608
- } else if (
1609
- !child->isLeadingPositionDefined(mainAxis) &&
1610
- node->getStyle().justifyContent() == YGJustifyCenter) {
1611
- child->setLayoutPosition(
1612
- (node->getLayout().measuredDimensions[dim[mainAxis]] -
1613
- child->getLayout().measuredDimensions[dim[mainAxis]]) /
1614
- 2.0f,
1615
- leading[mainAxis]);
1616
- } else if (
1617
- !child->isLeadingPositionDefined(mainAxis) &&
1618
- node->getStyle().justifyContent() == YGJustifyFlexEnd) {
1619
- child->setLayoutPosition(
1620
- (node->getLayout().measuredDimensions[dim[mainAxis]] -
1621
- child->getLayout().measuredDimensions[dim[mainAxis]]),
1622
- leading[mainAxis]);
1623
- }
1624
-
1625
- if (child->isTrailingPosDefined(crossAxis) &&
1626
- !child->isLeadingPositionDefined(crossAxis)) {
1627
- child->setLayoutPosition(
1628
- node->getLayout().measuredDimensions[dim[crossAxis]] -
1629
- child->getLayout().measuredDimensions[dim[crossAxis]] -
1630
- node->getTrailingBorder(crossAxis) -
1631
- child->getTrailingMargin(crossAxis, width).unwrap() -
1632
- child
1633
- ->getTrailingPosition(crossAxis, isMainAxisRow ? height : width)
1634
- .unwrap(),
1635
- leading[crossAxis]);
1636
-
1637
- } else if (
1638
- !child->isLeadingPositionDefined(crossAxis) &&
1639
- YGNodeAlignItem(node, child) == YGAlignCenter) {
1640
- child->setLayoutPosition(
1641
- (node->getLayout().measuredDimensions[dim[crossAxis]] -
1642
- child->getLayout().measuredDimensions[dim[crossAxis]]) /
1643
- 2.0f,
1644
- leading[crossAxis]);
1645
- } else if (
1646
- !child->isLeadingPositionDefined(crossAxis) &&
1647
- ((YGNodeAlignItem(node, child) == YGAlignFlexEnd) ^
1648
- (node->getStyle().flexWrap() == YGWrapWrapReverse))) {
1649
- child->setLayoutPosition(
1650
- (node->getLayout().measuredDimensions[dim[crossAxis]] -
1651
- child->getLayout().measuredDimensions[dim[crossAxis]]),
1652
- leading[crossAxis]);
1653
- }
1654
- }
1655
-
1656
- static void YGNodeWithMeasureFuncSetMeasuredDimensions(
1657
- const YGNodeRef node,
1658
- const float availableWidth,
1659
- const float availableHeight,
1660
- const YGMeasureMode widthMeasureMode,
1661
- const YGMeasureMode heightMeasureMode,
1662
- const float ownerWidth,
1663
- const float ownerHeight,
1664
- LayoutData &layoutMarkerData,
1665
- void *const layoutContext,
1666
- const LayoutPassReason reason) {
1667
- YGAssertWithNode(
1668
- node,
1669
- node->hasMeasureFunc(),
1670
- "Expected node to have custom measure function");
1671
-
1672
- const float paddingAndBorderAxisRow =
1673
- YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow, ownerWidth);
1674
- const float paddingAndBorderAxisColumn =
1675
- YGNodePaddingAndBorderForAxis(node, YGFlexDirectionColumn, ownerWidth);
1676
- const float marginAxisRow =
1677
- node->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap();
1678
- const float marginAxisColumn =
1679
- node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap();
1680
-
1681
- // We want to make sure we don't call measure with negative size
1682
- const float innerWidth = YGFloatIsUndefined(availableWidth)
1683
- ? availableWidth
1684
- : YGFloatMax(0, availableWidth - marginAxisRow - paddingAndBorderAxisRow);
1685
- const float innerHeight = YGFloatIsUndefined(availableHeight)
1686
- ? availableHeight
1687
- : YGFloatMax(
1688
- 0, availableHeight - marginAxisColumn - paddingAndBorderAxisColumn);
1689
-
1690
- // Measure the text under the current constraints.
1691
- const YGSize measuredSize = node->measure(
1692
- innerWidth,
1693
- widthMeasureMode,
1694
- innerHeight,
1695
- heightMeasureMode,
1696
- layoutContext);
1697
-
1698
- if (widthMeasureMode == YGMeasureModeExactly &&
1699
- heightMeasureMode == YGMeasureModeExactly) {
1700
- // Don't bother sizing the text if both dimensions are already defined.
1701
- node->setLayoutMeasuredDimension(
1702
- YGNodeBoundAxis(
1703
- node,
1704
- YGFlexDirectionRow,
1705
- availableWidth - marginAxisRow,
1706
- ownerWidth,
1707
- ownerWidth),
1708
- YGDimensionWidth);
1709
- node->setLayoutMeasuredDimension(
1710
- YGNodeBoundAxis(
1711
- node,
1712
- YGFlexDirectionColumn,
1713
- availableHeight - marginAxisColumn,
1714
- ownerHeight,
1715
- ownerWidth),
1716
- YGDimensionHeight);
1717
- } else {
1718
- Event::publish<Event::MeasureCallbackStart>(node);
1719
-
1720
- layoutMarkerData.measureCallbacks += 1;
1721
- layoutMarkerData.measureCallbackReasonsCount[static_cast<size_t>(reason)] +=
1722
- 1;
1723
-
1724
- Event::publish<Event::MeasureCallbackEnd>(
1725
- node,
1726
- {layoutContext,
1727
- innerWidth,
1728
- widthMeasureMode,
1729
- innerHeight,
1730
- heightMeasureMode,
1731
- measuredSize.width,
1732
- measuredSize.height,
1733
- reason});
1734
-
1735
- node->setLayoutMeasuredDimension(
1736
- YGNodeBoundAxis(
1737
- node,
1738
- YGFlexDirectionRow,
1739
- (widthMeasureMode == YGMeasureModeUndefined ||
1740
- widthMeasureMode == YGMeasureModeAtMost)
1741
- ? measuredSize.width + paddingAndBorderAxisRow
1742
- : availableWidth - marginAxisRow,
1743
- ownerWidth,
1744
- ownerWidth),
1745
- YGDimensionWidth);
1746
-
1747
- node->setLayoutMeasuredDimension(
1748
- YGNodeBoundAxis(
1749
- node,
1750
- YGFlexDirectionColumn,
1751
- (heightMeasureMode == YGMeasureModeUndefined ||
1752
- heightMeasureMode == YGMeasureModeAtMost)
1753
- ? measuredSize.height + paddingAndBorderAxisColumn
1754
- : availableHeight - marginAxisColumn,
1755
- ownerHeight,
1756
- ownerWidth),
1757
- YGDimensionHeight);
1758
- }
1759
- }
1760
-
1761
- // For nodes with no children, use the available values if they were provided,
1762
- // or the minimum size as indicated by the padding and border sizes.
1763
- static void YGNodeEmptyContainerSetMeasuredDimensions(
1764
- const YGNodeRef node,
1765
- const float availableWidth,
1766
- const float availableHeight,
1767
- const YGMeasureMode widthMeasureMode,
1768
- const YGMeasureMode heightMeasureMode,
1769
- const float ownerWidth,
1770
- const float ownerHeight) {
1771
- const float paddingAndBorderAxisRow =
1772
- YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow, ownerWidth);
1773
- const float paddingAndBorderAxisColumn =
1774
- YGNodePaddingAndBorderForAxis(node, YGFlexDirectionColumn, ownerWidth);
1775
- const float marginAxisRow =
1776
- node->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap();
1777
- const float marginAxisColumn =
1778
- node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap();
1779
-
1780
- node->setLayoutMeasuredDimension(
1781
- YGNodeBoundAxis(
1782
- node,
1783
- YGFlexDirectionRow,
1784
- (widthMeasureMode == YGMeasureModeUndefined ||
1785
- widthMeasureMode == YGMeasureModeAtMost)
1786
- ? paddingAndBorderAxisRow
1787
- : availableWidth - marginAxisRow,
1788
- ownerWidth,
1789
- ownerWidth),
1790
- YGDimensionWidth);
1791
-
1792
- node->setLayoutMeasuredDimension(
1793
- YGNodeBoundAxis(
1794
- node,
1795
- YGFlexDirectionColumn,
1796
- (heightMeasureMode == YGMeasureModeUndefined ||
1797
- heightMeasureMode == YGMeasureModeAtMost)
1798
- ? paddingAndBorderAxisColumn
1799
- : availableHeight - marginAxisColumn,
1800
- ownerHeight,
1801
- ownerWidth),
1802
- YGDimensionHeight);
1803
- }
1804
-
1805
- static bool YGNodeFixedSizeSetMeasuredDimensions(
1806
- const YGNodeRef node,
1807
- const float availableWidth,
1808
- const float availableHeight,
1809
- const YGMeasureMode widthMeasureMode,
1810
- const YGMeasureMode heightMeasureMode,
1811
- const float ownerWidth,
1812
- const float ownerHeight) {
1813
- if ((!YGFloatIsUndefined(availableWidth) &&
1814
- widthMeasureMode == YGMeasureModeAtMost && availableWidth <= 0.0f) ||
1815
- (!YGFloatIsUndefined(availableHeight) &&
1816
- heightMeasureMode == YGMeasureModeAtMost && availableHeight <= 0.0f) ||
1817
- (widthMeasureMode == YGMeasureModeExactly &&
1818
- heightMeasureMode == YGMeasureModeExactly)) {
1819
- auto marginAxisColumn =
1820
- node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap();
1821
- auto marginAxisRow =
1822
- node->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap();
1823
-
1824
- node->setLayoutMeasuredDimension(
1825
- YGNodeBoundAxis(
1826
- node,
1827
- YGFlexDirectionRow,
1828
- YGFloatIsUndefined(availableWidth) ||
1829
- (widthMeasureMode == YGMeasureModeAtMost &&
1830
- availableWidth < 0.0f)
1831
- ? 0.0f
1832
- : availableWidth - marginAxisRow,
1833
- ownerWidth,
1834
- ownerWidth),
1835
- YGDimensionWidth);
1836
-
1837
- node->setLayoutMeasuredDimension(
1838
- YGNodeBoundAxis(
1839
- node,
1840
- YGFlexDirectionColumn,
1841
- YGFloatIsUndefined(availableHeight) ||
1842
- (heightMeasureMode == YGMeasureModeAtMost &&
1843
- availableHeight < 0.0f)
1844
- ? 0.0f
1845
- : availableHeight - marginAxisColumn,
1846
- ownerHeight,
1847
- ownerWidth),
1848
- YGDimensionHeight);
1849
- return true;
1850
- }
1851
-
1852
- return false;
1853
- }
1854
-
1855
- static void YGZeroOutLayoutRecursivly(
1856
- const YGNodeRef node,
1857
- void *layoutContext) {
1858
- node->getLayout() = {};
1859
- node->setLayoutDimension(0, 0);
1860
- node->setLayoutDimension(0, 1);
1861
- node->setHasNewLayout(true);
1862
-
1863
- node->iterChildrenAfterCloningIfNeeded(
1864
- YGZeroOutLayoutRecursivly, layoutContext);
1865
- }
1866
-
1867
- static float YGNodeCalculateAvailableInnerDim(
1868
- const YGNodeConstRef node,
1869
- YGFlexDirection axis,
1870
- float availableDim,
1871
- float ownerDim,
1872
- float ownerDimForMarginPadding) {
1873
- YGFlexDirection direction =
1874
- YGFlexDirectionIsRow(axis) ? YGFlexDirectionRow : YGFlexDirectionColumn;
1875
- YGDimension dimension =
1876
- YGFlexDirectionIsRow(axis) ? YGDimensionWidth : YGDimensionHeight;
1877
-
1878
- const float margin =
1879
- node->getMarginForAxis(direction, ownerDimForMarginPadding).unwrap();
1880
- const float paddingAndBorder =
1881
- YGNodePaddingAndBorderForAxis(node, direction, ownerDimForMarginPadding);
1882
-
1883
- float availableInnerDim = availableDim - margin - paddingAndBorder;
1884
- // Max dimension overrides predefined dimension value; Min dimension in turn
1885
- // overrides both of the above
1886
- if (!YGFloatIsUndefined(availableInnerDim)) {
1887
- // We want to make sure our available height does not violate min and max
1888
- // constraints
1889
- const YGFloatOptional minDimensionOptional =
1890
- YGResolveValue(node->getStyle().minDimensions()[dimension], ownerDim);
1891
- const float minInnerDim = minDimensionOptional.isUndefined()
1892
- ? 0.0f
1893
- : minDimensionOptional.unwrap() - paddingAndBorder;
1894
-
1895
- const YGFloatOptional maxDimensionOptional =
1896
- YGResolveValue(node->getStyle().maxDimensions()[dimension], ownerDim);
1897
-
1898
- const float maxInnerDim = maxDimensionOptional.isUndefined()
1899
- ? FLT_MAX
1900
- : maxDimensionOptional.unwrap() - paddingAndBorder;
1901
- availableInnerDim =
1902
- YGFloatMax(YGFloatMin(availableInnerDim, maxInnerDim), minInnerDim);
1903
- }
1904
-
1905
- return availableInnerDim;
1906
- }
1907
-
1908
- static float YGNodeComputeFlexBasisForChildren(
1909
- const YGNodeRef node,
1910
- const float availableInnerWidth,
1911
- const float availableInnerHeight,
1912
- YGMeasureMode widthMeasureMode,
1913
- YGMeasureMode heightMeasureMode,
1914
- YGDirection direction,
1915
- YGFlexDirection mainAxis,
1916
- const YGConfigRef config,
1917
- bool performLayout,
1918
- LayoutData &layoutMarkerData,
1919
- void *const layoutContext,
1920
- const uint32_t depth,
1921
- const uint32_t generationCount) {
1922
- float totalOuterFlexBasis = 0.0f;
1923
- YGNodeRef singleFlexChild = nullptr;
1924
- const YGVector& children = node->getChildren();
1925
- YGMeasureMode measureModeMainDim =
1926
- YGFlexDirectionIsRow(mainAxis) ? widthMeasureMode : heightMeasureMode;
1927
- // If there is only one child with flexGrow + flexShrink it means we can set
1928
- // the computedFlexBasis to 0 instead of measuring and shrinking / flexing the
1929
- // child to exactly match the remaining space
1930
- if (measureModeMainDim == YGMeasureModeExactly) {
1931
- for (auto child : children) {
1932
- if (child->isNodeFlexible()) {
1933
- if (singleFlexChild != nullptr ||
1934
- YGFloatsEqual(child->resolveFlexGrow(), 0.0f) ||
1935
- YGFloatsEqual(child->resolveFlexShrink(), 0.0f)) {
1936
- // There is already a flexible child, or this flexible child doesn't
1937
- // have flexGrow and flexShrink, abort
1938
- singleFlexChild = nullptr;
1939
- break;
1940
- } else {
1941
- singleFlexChild = child;
1942
- }
1943
- }
1944
- }
1945
- }
1946
-
1947
- for (auto child : children) {
1948
- child->resolveDimension();
1949
- if (child->getStyle().display() == YGDisplayNone) {
1950
- YGZeroOutLayoutRecursivly(child, layoutContext);
1951
- child->setHasNewLayout(true);
1952
- child->setDirty(false);
1953
- continue;
1954
- }
1955
- if (performLayout) {
1956
- // Set the initial position (relative to the owner).
1957
- const YGDirection childDirection = child->resolveDirection(direction);
1958
- const float mainDim = YGFlexDirectionIsRow(mainAxis)
1959
- ? availableInnerWidth
1960
- : availableInnerHeight;
1961
- const float crossDim = YGFlexDirectionIsRow(mainAxis)
1962
- ? availableInnerHeight
1963
- : availableInnerWidth;
1964
- child->setPosition(
1965
- childDirection, mainDim, crossDim, availableInnerWidth);
1966
- }
1967
-
1968
- if (child->getStyle().positionType() == YGPositionTypeAbsolute) {
1969
- continue;
1970
- }
1971
- if (child == singleFlexChild) {
1972
- child->setLayoutComputedFlexBasisGeneration(generationCount);
1973
- child->setLayoutComputedFlexBasis(YGFloatOptional(0));
1974
- } else {
1975
- YGNodeComputeFlexBasisForChild(
1976
- node,
1977
- child,
1978
- availableInnerWidth,
1979
- widthMeasureMode,
1980
- availableInnerHeight,
1981
- availableInnerWidth,
1982
- availableInnerHeight,
1983
- heightMeasureMode,
1984
- direction,
1985
- config,
1986
- layoutMarkerData,
1987
- layoutContext,
1988
- depth,
1989
- generationCount);
1990
- }
1991
-
1992
- totalOuterFlexBasis +=
1993
- (child->getLayout().computedFlexBasis +
1994
- child->getMarginForAxis(mainAxis, availableInnerWidth))
1995
- .unwrap();
1996
- }
1997
-
1998
- return totalOuterFlexBasis;
1999
- }
2000
-
2001
- // This function assumes that all the children of node have their
2002
- // computedFlexBasis properly computed(To do this use
2003
- // YGNodeComputeFlexBasisForChildren function). This function calculates
2004
- // YGCollectFlexItemsRowMeasurement
2005
- static YGCollectFlexItemsRowValues YGCalculateCollectFlexItemsRowValues(
2006
- const YGNodeRef &node,
2007
- const YGDirection ownerDirection,
2008
- const float mainAxisownerSize,
2009
- const float availableInnerWidth,
2010
- const float availableInnerMainDim,
2011
- const uint32_t startOfLineIndex,
2012
- const uint32_t lineCount) {
2013
- YGCollectFlexItemsRowValues flexAlgoRowMeasurement = {};
2014
- flexAlgoRowMeasurement.relativeChildren.reserve(node->getChildren().size());
2015
-
2016
- float sizeConsumedOnCurrentLineIncludingMinConstraint = 0;
2017
- const YGFlexDirection mainAxis = YGResolveFlexDirection(
2018
- node->getStyle().flexDirection(), node->resolveDirection(ownerDirection));
2019
- const bool isNodeFlexWrap = node->getStyle().flexWrap() != YGWrapNoWrap;
2020
-
2021
- // Add items to the current line until it's full or we run out of items.
2022
- uint32_t endOfLineIndex = startOfLineIndex;
2023
- for (; endOfLineIndex < node->getChildren().size(); endOfLineIndex++) {
2024
- const YGNodeRef child = node->getChild(endOfLineIndex);
2025
- if (child->getStyle().display() == YGDisplayNone ||
2026
- child->getStyle().positionType() == YGPositionTypeAbsolute) {
2027
- continue;
2028
- }
2029
- child->setLineIndex(lineCount);
2030
- const float childMarginMainAxis =
2031
- child->getMarginForAxis(mainAxis, availableInnerWidth).unwrap();
2032
- const float flexBasisWithMinAndMaxConstraints =
2033
- YGNodeBoundAxisWithinMinAndMax(
2034
- child,
2035
- mainAxis,
2036
- child->getLayout().computedFlexBasis,
2037
- mainAxisownerSize)
2038
- .unwrap();
2039
-
2040
- // If this is a multi-line flow and this item pushes us over the available
2041
- // size, we've hit the end of the current line. Break out of the loop and
2042
- // lay out the current line.
2043
- if (sizeConsumedOnCurrentLineIncludingMinConstraint +
2044
- flexBasisWithMinAndMaxConstraints + childMarginMainAxis >
2045
- availableInnerMainDim &&
2046
- isNodeFlexWrap && flexAlgoRowMeasurement.itemsOnLine > 0) {
2047
- break;
2048
- }
2049
-
2050
- sizeConsumedOnCurrentLineIncludingMinConstraint +=
2051
- flexBasisWithMinAndMaxConstraints + childMarginMainAxis;
2052
- flexAlgoRowMeasurement.sizeConsumedOnCurrentLine +=
2053
- flexBasisWithMinAndMaxConstraints + childMarginMainAxis;
2054
- flexAlgoRowMeasurement.itemsOnLine++;
2055
-
2056
- if (child->isNodeFlexible()) {
2057
- flexAlgoRowMeasurement.totalFlexGrowFactors += child->resolveFlexGrow();
2058
-
2059
- // Unlike the grow factor, the shrink factor is scaled relative to the
2060
- // child dimension.
2061
- flexAlgoRowMeasurement.totalFlexShrinkScaledFactors +=
2062
- -child->resolveFlexShrink() *
2063
- child->getLayout().computedFlexBasis.unwrap();
2064
- }
2065
-
2066
- flexAlgoRowMeasurement.relativeChildren.push_back(child);
2067
- }
2068
-
2069
- // The total flex factor needs to be floored to 1.
2070
- if (flexAlgoRowMeasurement.totalFlexGrowFactors > 0 &&
2071
- flexAlgoRowMeasurement.totalFlexGrowFactors < 1) {
2072
- flexAlgoRowMeasurement.totalFlexGrowFactors = 1;
2073
- }
2074
-
2075
- // The total flex shrink factor needs to be floored to 1.
2076
- if (flexAlgoRowMeasurement.totalFlexShrinkScaledFactors > 0 &&
2077
- flexAlgoRowMeasurement.totalFlexShrinkScaledFactors < 1) {
2078
- flexAlgoRowMeasurement.totalFlexShrinkScaledFactors = 1;
2079
- }
2080
- flexAlgoRowMeasurement.endOfLineIndex = endOfLineIndex;
2081
- return flexAlgoRowMeasurement;
2082
- }
2083
-
2084
- // It distributes the free space to the flexible items and ensures that the size
2085
- // of the flex items abide the min and max constraints. At the end of this
2086
- // function the child nodes would have proper size. Prior using this function
2087
- // please ensure that YGDistributeFreeSpaceFirstPass is called.
2088
- static float YGDistributeFreeSpaceSecondPass(
2089
- YGCollectFlexItemsRowValues &collectedFlexItemsValues,
2090
- const YGNodeRef node,
2091
- const YGFlexDirection mainAxis,
2092
- const YGFlexDirection crossAxis,
2093
- const float mainAxisownerSize,
2094
- const float availableInnerMainDim,
2095
- const float availableInnerCrossDim,
2096
- const float availableInnerWidth,
2097
- const float availableInnerHeight,
2098
- const bool flexBasisOverflows,
2099
- const YGMeasureMode measureModeCrossDim,
2100
- const bool performLayout,
2101
- const YGConfigRef config,
2102
- LayoutData &layoutMarkerData,
2103
- void *const layoutContext,
2104
- const uint32_t depth,
2105
- const uint32_t generationCount) {
2106
- float childFlexBasis = 0;
2107
- float flexShrinkScaledFactor = 0;
2108
- float flexGrowFactor = 0;
2109
- float deltaFreeSpace = 0;
2110
- const bool isMainAxisRow = YGFlexDirectionIsRow(mainAxis);
2111
- const bool isNodeFlexWrap = node->getStyle().flexWrap() != YGWrapNoWrap;
2112
-
2113
- for (auto currentRelativeChild : collectedFlexItemsValues.relativeChildren) {
2114
- childFlexBasis = YGNodeBoundAxisWithinMinAndMax(
2115
- currentRelativeChild,
2116
- mainAxis,
2117
- currentRelativeChild->getLayout().computedFlexBasis,
2118
- mainAxisownerSize)
2119
- .unwrap();
2120
- float updatedMainSize = childFlexBasis;
2121
-
2122
- if (!YGFloatIsUndefined(collectedFlexItemsValues.remainingFreeSpace) &&
2123
- collectedFlexItemsValues.remainingFreeSpace < 0) {
2124
- flexShrinkScaledFactor =
2125
- -currentRelativeChild->resolveFlexShrink() * childFlexBasis;
2126
- // Is this child able to shrink?
2127
- if (flexShrinkScaledFactor != 0) {
2128
- float childSize;
2129
-
2130
- if (!YGFloatIsUndefined(
2131
- collectedFlexItemsValues.totalFlexShrinkScaledFactors) &&
2132
- collectedFlexItemsValues.totalFlexShrinkScaledFactors == 0) {
2133
- childSize = childFlexBasis + flexShrinkScaledFactor;
2134
- } else {
2135
- childSize = childFlexBasis +
2136
- (collectedFlexItemsValues.remainingFreeSpace /
2137
- collectedFlexItemsValues.totalFlexShrinkScaledFactors) *
2138
- flexShrinkScaledFactor;
2139
- }
2140
-
2141
- updatedMainSize = YGNodeBoundAxis(
2142
- currentRelativeChild,
2143
- mainAxis,
2144
- childSize,
2145
- availableInnerMainDim,
2146
- availableInnerWidth);
2147
- }
2148
- } else if (
2149
- !YGFloatIsUndefined(collectedFlexItemsValues.remainingFreeSpace) &&
2150
- collectedFlexItemsValues.remainingFreeSpace > 0) {
2151
- flexGrowFactor = currentRelativeChild->resolveFlexGrow();
2152
-
2153
- // Is this child able to grow?
2154
- if (!YGFloatIsUndefined(flexGrowFactor) && flexGrowFactor != 0) {
2155
- updatedMainSize = YGNodeBoundAxis(
2156
- currentRelativeChild,
2157
- mainAxis,
2158
- childFlexBasis +
2159
- collectedFlexItemsValues.remainingFreeSpace /
2160
- collectedFlexItemsValues.totalFlexGrowFactors *
2161
- flexGrowFactor,
2162
- availableInnerMainDim,
2163
- availableInnerWidth);
2164
- }
2165
- }
2166
-
2167
- deltaFreeSpace += updatedMainSize - childFlexBasis;
2168
-
2169
- const float marginMain =
2170
- currentRelativeChild->getMarginForAxis(mainAxis, availableInnerWidth)
2171
- .unwrap();
2172
- const float marginCross =
2173
- currentRelativeChild->getMarginForAxis(crossAxis, availableInnerWidth)
2174
- .unwrap();
2175
-
2176
- float childCrossSize;
2177
- float childMainSize = updatedMainSize + marginMain;
2178
- YGMeasureMode childCrossMeasureMode;
2179
- YGMeasureMode childMainMeasureMode = YGMeasureModeExactly;
2180
-
2181
- const auto &childStyle = currentRelativeChild->getStyle();
2182
- if (!childStyle.aspectRatio().isUndefined()) {
2183
- childCrossSize = isMainAxisRow
2184
- ? (childMainSize - marginMain) / childStyle.aspectRatio().unwrap()
2185
- : (childMainSize - marginMain) * childStyle.aspectRatio().unwrap();
2186
- childCrossMeasureMode = YGMeasureModeExactly;
2187
-
2188
- childCrossSize += marginCross;
2189
- } else if (
2190
- !YGFloatIsUndefined(availableInnerCrossDim) &&
2191
- !YGNodeIsStyleDimDefined(
2192
- currentRelativeChild, crossAxis, availableInnerCrossDim) &&
2193
- measureModeCrossDim == YGMeasureModeExactly &&
2194
- !(isNodeFlexWrap && flexBasisOverflows) &&
2195
- YGNodeAlignItem(node, currentRelativeChild) == YGAlignStretch &&
2196
- currentRelativeChild->marginLeadingValue(crossAxis).unit !=
2197
- YGUnitAuto &&
2198
- currentRelativeChild->marginTrailingValue(crossAxis).unit !=
2199
- YGUnitAuto) {
2200
- childCrossSize = availableInnerCrossDim;
2201
- childCrossMeasureMode = YGMeasureModeExactly;
2202
- } else if (!YGNodeIsStyleDimDefined(
2203
- currentRelativeChild, crossAxis, availableInnerCrossDim)) {
2204
- childCrossSize = availableInnerCrossDim;
2205
- childCrossMeasureMode = YGFloatIsUndefined(childCrossSize)
2206
- ? YGMeasureModeUndefined
2207
- : YGMeasureModeAtMost;
2208
- } else {
2209
- childCrossSize =
2210
- YGResolveValue(
2211
- currentRelativeChild->getResolvedDimension(dim[crossAxis]),
2212
- availableInnerCrossDim)
2213
- .unwrap() +
2214
- marginCross;
2215
- const bool isLoosePercentageMeasurement =
2216
- currentRelativeChild->getResolvedDimension(dim[crossAxis]).unit ==
2217
- YGUnitPercent &&
2218
- measureModeCrossDim != YGMeasureModeExactly;
2219
- childCrossMeasureMode =
2220
- YGFloatIsUndefined(childCrossSize) || isLoosePercentageMeasurement
2221
- ? YGMeasureModeUndefined
2222
- : YGMeasureModeExactly;
2223
- }
2224
-
2225
- YGConstrainMaxSizeForMode(
2226
- currentRelativeChild,
2227
- mainAxis,
2228
- availableInnerMainDim,
2229
- availableInnerWidth,
2230
- &childMainMeasureMode,
2231
- &childMainSize);
2232
- YGConstrainMaxSizeForMode(
2233
- currentRelativeChild,
2234
- crossAxis,
2235
- availableInnerCrossDim,
2236
- availableInnerWidth,
2237
- &childCrossMeasureMode,
2238
- &childCrossSize);
2239
-
2240
- const bool requiresStretchLayout =
2241
- !YGNodeIsStyleDimDefined(
2242
- currentRelativeChild, crossAxis, availableInnerCrossDim) &&
2243
- YGNodeAlignItem(node, currentRelativeChild) == YGAlignStretch &&
2244
- currentRelativeChild->marginLeadingValue(crossAxis).unit !=
2245
- YGUnitAuto &&
2246
- currentRelativeChild->marginTrailingValue(crossAxis).unit != YGUnitAuto;
2247
-
2248
- const float childWidth = isMainAxisRow ? childMainSize : childCrossSize;
2249
- const float childHeight = !isMainAxisRow ? childMainSize : childCrossSize;
2250
-
2251
- const YGMeasureMode childWidthMeasureMode =
2252
- isMainAxisRow ? childMainMeasureMode : childCrossMeasureMode;
2253
- const YGMeasureMode childHeightMeasureMode =
2254
- !isMainAxisRow ? childMainMeasureMode : childCrossMeasureMode;
2255
-
2256
- const bool isLayoutPass = performLayout && !requiresStretchLayout;
2257
- // Recursively call the layout algorithm for this child with the updated
2258
- // main size.
2259
- YGLayoutNodeInternal(
2260
- currentRelativeChild,
2261
- childWidth,
2262
- childHeight,
2263
- node->getLayout().direction(),
2264
- childWidthMeasureMode,
2265
- childHeightMeasureMode,
2266
- availableInnerWidth,
2267
- availableInnerHeight,
2268
- isLayoutPass,
2269
- isLayoutPass ? LayoutPassReason::kFlexLayout
2270
- : LayoutPassReason::kFlexMeasure,
2271
- config,
2272
- layoutMarkerData,
2273
- layoutContext,
2274
- depth,
2275
- generationCount);
2276
- node->setLayoutHadOverflow(
2277
- node->getLayout().hadOverflow() |
2278
- currentRelativeChild->getLayout().hadOverflow());
2279
- }
2280
- return deltaFreeSpace;
2281
- }
2282
-
2283
- // It distributes the free space to the flexible items.For those flexible items
2284
- // whose min and max constraints are triggered, those flex item's clamped size
2285
- // is removed from the remaingfreespace.
2286
- static void YGDistributeFreeSpaceFirstPass(
2287
- YGCollectFlexItemsRowValues &collectedFlexItemsValues,
2288
- const YGFlexDirection mainAxis,
2289
- const float mainAxisownerSize,
2290
- const float availableInnerMainDim,
2291
- const float availableInnerWidth) {
2292
- float flexShrinkScaledFactor = 0;
2293
- float flexGrowFactor = 0;
2294
- float baseMainSize = 0;
2295
- float boundMainSize = 0;
2296
- float deltaFreeSpace = 0;
2297
-
2298
- for (auto currentRelativeChild : collectedFlexItemsValues.relativeChildren) {
2299
- float childFlexBasis =
2300
- YGNodeBoundAxisWithinMinAndMax(
2301
- currentRelativeChild,
2302
- mainAxis,
2303
- currentRelativeChild->getLayout().computedFlexBasis,
2304
- mainAxisownerSize)
2305
- .unwrap();
2306
-
2307
- if (collectedFlexItemsValues.remainingFreeSpace < 0) {
2308
- flexShrinkScaledFactor =
2309
- -currentRelativeChild->resolveFlexShrink() * childFlexBasis;
2310
-
2311
- // Is this child able to shrink?
2312
- if (!YGFloatIsUndefined(flexShrinkScaledFactor) &&
2313
- flexShrinkScaledFactor != 0) {
2314
- baseMainSize = childFlexBasis +
2315
- collectedFlexItemsValues.remainingFreeSpace /
2316
- collectedFlexItemsValues.totalFlexShrinkScaledFactors *
2317
- flexShrinkScaledFactor;
2318
- boundMainSize = YGNodeBoundAxis(
2319
- currentRelativeChild,
2320
- mainAxis,
2321
- baseMainSize,
2322
- availableInnerMainDim,
2323
- availableInnerWidth);
2324
- if (!YGFloatIsUndefined(baseMainSize) &&
2325
- !YGFloatIsUndefined(boundMainSize) &&
2326
- baseMainSize != boundMainSize) {
2327
- // By excluding this item's size and flex factor from remaining, this
2328
- // item's min/max constraints should also trigger in the second pass
2329
- // resulting in the item's size calculation being identical in the
2330
- // first and second passes.
2331
- deltaFreeSpace += boundMainSize - childFlexBasis;
2332
- collectedFlexItemsValues.totalFlexShrinkScaledFactors -=
2333
- flexShrinkScaledFactor;
2334
- }
2335
- }
2336
- } else if (
2337
- !YGFloatIsUndefined(collectedFlexItemsValues.remainingFreeSpace) &&
2338
- collectedFlexItemsValues.remainingFreeSpace > 0) {
2339
- flexGrowFactor = currentRelativeChild->resolveFlexGrow();
2340
-
2341
- // Is this child able to grow?
2342
- if (!YGFloatIsUndefined(flexGrowFactor) && flexGrowFactor != 0) {
2343
- baseMainSize = childFlexBasis +
2344
- collectedFlexItemsValues.remainingFreeSpace /
2345
- collectedFlexItemsValues.totalFlexGrowFactors * flexGrowFactor;
2346
- boundMainSize = YGNodeBoundAxis(
2347
- currentRelativeChild,
2348
- mainAxis,
2349
- baseMainSize,
2350
- availableInnerMainDim,
2351
- availableInnerWidth);
2352
-
2353
- if (!YGFloatIsUndefined(baseMainSize) &&
2354
- !YGFloatIsUndefined(boundMainSize) &&
2355
- baseMainSize != boundMainSize) {
2356
- // By excluding this item's size and flex factor from remaining, this
2357
- // item's min/max constraints should also trigger in the second pass
2358
- // resulting in the item's size calculation being identical in the
2359
- // first and second passes.
2360
- deltaFreeSpace += boundMainSize - childFlexBasis;
2361
- collectedFlexItemsValues.totalFlexGrowFactors -= flexGrowFactor;
2362
- }
2363
- }
2364
- }
2365
- }
2366
- collectedFlexItemsValues.remainingFreeSpace -= deltaFreeSpace;
2367
- }
2368
-
2369
- // Do two passes over the flex items to figure out how to distribute the
2370
- // remaining space.
2371
- //
2372
- // The first pass finds the items whose min/max constraints trigger, freezes
2373
- // them at those sizes, and excludes those sizes from the remaining space.
2374
- //
2375
- // The second pass sets the size of each flexible item. It distributes the
2376
- // remaining space amongst the items whose min/max constraints didn't trigger in
2377
- // the first pass. For the other items, it sets their sizes by forcing their
2378
- // min/max constraints to trigger again.
2379
- //
2380
- // This two pass approach for resolving min/max constraints deviates from the
2381
- // spec. The spec
2382
- // (https://www.w3.org/TR/CSS-flexbox-1/#resolve-flexible-lengths) describes a
2383
- // process that needs to be repeated a variable number of times. The algorithm
2384
- // implemented here won't handle all cases but it was simpler to implement and
2385
- // it mitigates performance concerns because we know exactly how many passes
2386
- // it'll do.
2387
- //
2388
- // At the end of this function the child nodes would have the proper size
2389
- // assigned to them.
2390
- //
2391
- static void YGResolveFlexibleLength(
2392
- const YGNodeRef node,
2393
- YGCollectFlexItemsRowValues &collectedFlexItemsValues,
2394
- const YGFlexDirection mainAxis,
2395
- const YGFlexDirection crossAxis,
2396
- const float mainAxisownerSize,
2397
- const float availableInnerMainDim,
2398
- const float availableInnerCrossDim,
2399
- const float availableInnerWidth,
2400
- const float availableInnerHeight,
2401
- const bool flexBasisOverflows,
2402
- const YGMeasureMode measureModeCrossDim,
2403
- const bool performLayout,
2404
- const YGConfigRef config,
2405
- LayoutData &layoutMarkerData,
2406
- void *const layoutContext,
2407
- const uint32_t depth,
2408
- const uint32_t generationCount) {
2409
- const float originalFreeSpace = collectedFlexItemsValues.remainingFreeSpace;
2410
- // First pass: detect the flex items whose min/max constraints trigger
2411
- YGDistributeFreeSpaceFirstPass(
2412
- collectedFlexItemsValues,
2413
- mainAxis,
2414
- mainAxisownerSize,
2415
- availableInnerMainDim,
2416
- availableInnerWidth);
2417
-
2418
- // Second pass: resolve the sizes of the flexible items
2419
- const float distributedFreeSpace = YGDistributeFreeSpaceSecondPass(
2420
- collectedFlexItemsValues,
2421
- node,
2422
- mainAxis,
2423
- crossAxis,
2424
- mainAxisownerSize,
2425
- availableInnerMainDim,
2426
- availableInnerCrossDim,
2427
- availableInnerWidth,
2428
- availableInnerHeight,
2429
- flexBasisOverflows,
2430
- measureModeCrossDim,
2431
- performLayout,
2432
- config,
2433
- layoutMarkerData,
2434
- layoutContext,
2435
- depth,
2436
- generationCount);
2437
-
2438
- collectedFlexItemsValues.remainingFreeSpace =
2439
- originalFreeSpace - distributedFreeSpace;
2440
- }
2441
-
2442
- static void YGJustifyMainAxis(
2443
- const YGNodeRef node,
2444
- YGCollectFlexItemsRowValues &collectedFlexItemsValues,
2445
- const uint32_t startOfLineIndex,
2446
- const YGFlexDirection mainAxis,
2447
- const YGFlexDirection crossAxis,
2448
- const YGMeasureMode measureModeMainDim,
2449
- const YGMeasureMode measureModeCrossDim,
2450
- const float mainAxisownerSize,
2451
- const float ownerWidth,
2452
- const float availableInnerMainDim,
2453
- const float availableInnerCrossDim,
2454
- const float availableInnerWidth,
2455
- const bool performLayout,
2456
- void *const layoutContext) {
2457
- const auto &style = node->getStyle();
2458
- const float leadingPaddingAndBorderMain =
2459
- node->getLeadingPaddingAndBorder(mainAxis, ownerWidth).unwrap();
2460
- const float trailingPaddingAndBorderMain =
2461
- node->getTrailingPaddingAndBorder(mainAxis, ownerWidth).unwrap();
2462
- // If we are using "at most" rules in the main axis, make sure that
2463
- // remainingFreeSpace is 0 when min main dimension is not given
2464
- if (measureModeMainDim == YGMeasureModeAtMost &&
2465
- collectedFlexItemsValues.remainingFreeSpace > 0) {
2466
- if (!style.minDimensions()[dim[mainAxis]].isUndefined() &&
2467
- !YGResolveValue(style.minDimensions()[dim[mainAxis]], mainAxisownerSize)
2468
- .isUndefined()) {
2469
- // This condition makes sure that if the size of main dimension(after
2470
- // considering child nodes main dim, leading and trailing padding etc)
2471
- // falls below min dimension, then the remainingFreeSpace is reassigned
2472
- // considering the min dimension
2473
-
2474
- // `minAvailableMainDim` denotes minimum available space in which child
2475
- // can be laid out, it will exclude space consumed by padding and border.
2476
- const float minAvailableMainDim =
2477
- YGResolveValue(
2478
- style.minDimensions()[dim[mainAxis]], mainAxisownerSize)
2479
- .unwrap() -
2480
- leadingPaddingAndBorderMain - trailingPaddingAndBorderMain;
2481
- const float occupiedSpaceByChildNodes =
2482
- availableInnerMainDim - collectedFlexItemsValues.remainingFreeSpace;
2483
- collectedFlexItemsValues.remainingFreeSpace =
2484
- YGFloatMax(0, minAvailableMainDim - occupiedSpaceByChildNodes);
2485
- } else {
2486
- collectedFlexItemsValues.remainingFreeSpace = 0;
2487
- }
2488
- }
2489
-
2490
- int numberOfAutoMarginsOnCurrentLine = 0;
2491
- for (uint32_t i = startOfLineIndex;
2492
- i < collectedFlexItemsValues.endOfLineIndex;
2493
- i++) {
2494
- const YGNodeRef child = node->getChild(i);
2495
- if (child->getStyle().positionType() == YGPositionTypeRelative) {
2496
- if (child->marginLeadingValue(mainAxis).unit == YGUnitAuto) {
2497
- numberOfAutoMarginsOnCurrentLine++;
2498
- }
2499
- if (child->marginTrailingValue(mainAxis).unit == YGUnitAuto) {
2500
- numberOfAutoMarginsOnCurrentLine++;
2501
- }
2502
- }
2503
- }
2504
-
2505
- // In order to position the elements in the main axis, we have two controls.
2506
- // The space between the beginning and the first element and the space between
2507
- // each two elements.
2508
- float leadingMainDim = 0;
2509
- float betweenMainDim = 0;
2510
- const YGJustify justifyContent = node->getStyle().justifyContent();
2511
-
2512
- if (numberOfAutoMarginsOnCurrentLine == 0) {
2513
- switch (justifyContent) {
2514
- case YGJustifyCenter:
2515
- leadingMainDim = collectedFlexItemsValues.remainingFreeSpace / 2;
2516
- break;
2517
- case YGJustifyFlexEnd:
2518
- leadingMainDim = collectedFlexItemsValues.remainingFreeSpace;
2519
- break;
2520
- case YGJustifySpaceBetween:
2521
- if (collectedFlexItemsValues.itemsOnLine > 1) {
2522
- betweenMainDim =
2523
- YGFloatMax(collectedFlexItemsValues.remainingFreeSpace, 0) /
2524
- (collectedFlexItemsValues.itemsOnLine - 1);
2525
- } else {
2526
- betweenMainDim = 0;
2527
- }
2528
- break;
2529
- case YGJustifySpaceEvenly:
2530
- // Space is distributed evenly across all elements
2531
- betweenMainDim = collectedFlexItemsValues.remainingFreeSpace /
2532
- (collectedFlexItemsValues.itemsOnLine + 1);
2533
- leadingMainDim = betweenMainDim;
2534
- break;
2535
- case YGJustifySpaceAround:
2536
- // Space on the edges is half of the space between elements
2537
- betweenMainDim = collectedFlexItemsValues.remainingFreeSpace /
2538
- collectedFlexItemsValues.itemsOnLine;
2539
- leadingMainDim = betweenMainDim / 2;
2540
- break;
2541
- case YGJustifyFlexStart:
2542
- break;
2543
- }
2544
- }
2545
-
2546
- collectedFlexItemsValues.mainDim =
2547
- leadingPaddingAndBorderMain + leadingMainDim;
2548
- collectedFlexItemsValues.crossDim = 0;
2549
-
2550
- float maxAscentForCurrentLine = 0;
2551
- float maxDescentForCurrentLine = 0;
2552
- bool isNodeBaselineLayout = YGIsBaselineLayout(node);
2553
- for (uint32_t i = startOfLineIndex;
2554
- i < collectedFlexItemsValues.endOfLineIndex;
2555
- i++) {
2556
- const YGNodeRef child = node->getChild(i);
2557
- const YGStyle &childStyle = child->getStyle();
2558
- const YGLayout childLayout = child->getLayout();
2559
- if (childStyle.display() == YGDisplayNone) {
2560
- continue;
2561
- }
2562
- if (childStyle.positionType() == YGPositionTypeAbsolute &&
2563
- child->isLeadingPositionDefined(mainAxis)) {
2564
- if (performLayout) {
2565
- // In case the child is position absolute and has left/top being
2566
- // defined, we override the position to whatever the user said (and
2567
- // margin/border).
2568
- child->setLayoutPosition(
2569
- child->getLeadingPosition(mainAxis, availableInnerMainDim)
2570
- .unwrap() +
2571
- node->getLeadingBorder(mainAxis) +
2572
- child->getLeadingMargin(mainAxis, availableInnerWidth).unwrap(),
2573
- pos[mainAxis]);
2574
- }
2575
- } else {
2576
- // Now that we placed the element, we need to update the variables.
2577
- // We need to do that only for relative elements. Absolute elements do not
2578
- // take part in that phase.
2579
- if (childStyle.positionType() == YGPositionTypeRelative) {
2580
- if (child->marginLeadingValue(mainAxis).unit == YGUnitAuto) {
2581
- collectedFlexItemsValues.mainDim +=
2582
- collectedFlexItemsValues.remainingFreeSpace /
2583
- numberOfAutoMarginsOnCurrentLine;
2584
- }
2585
-
2586
- if (performLayout) {
2587
- child->setLayoutPosition(
2588
- childLayout.position[pos[mainAxis]] +
2589
- collectedFlexItemsValues.mainDim,
2590
- pos[mainAxis]);
2591
- }
2592
-
2593
- if (child->marginTrailingValue(mainAxis).unit == YGUnitAuto) {
2594
- collectedFlexItemsValues.mainDim +=
2595
- collectedFlexItemsValues.remainingFreeSpace /
2596
- numberOfAutoMarginsOnCurrentLine;
2597
- }
2598
- bool canSkipFlex =
2599
- !performLayout && measureModeCrossDim == YGMeasureModeExactly;
2600
- if (canSkipFlex) {
2601
- // If we skipped the flex step, then we can't rely on the measuredDims
2602
- // because they weren't computed. This means we can't call
2603
- // YGNodeDimWithMargin.
2604
- collectedFlexItemsValues.mainDim += betweenMainDim +
2605
- child->getMarginForAxis(mainAxis, availableInnerWidth).unwrap() +
2606
- childLayout.computedFlexBasis.unwrap();
2607
- collectedFlexItemsValues.crossDim = availableInnerCrossDim;
2608
- } else {
2609
- // The main dimension is the sum of all the elements dimension plus
2610
- // the spacing.
2611
- collectedFlexItemsValues.mainDim += betweenMainDim +
2612
- YGNodeDimWithMargin(child, mainAxis, availableInnerWidth);
2613
-
2614
- if (isNodeBaselineLayout) {
2615
- // If the child is baseline aligned then the cross dimension is
2616
- // calculated by adding maxAscent and maxDescent from the baseline.
2617
- const float ascent = YGBaseline(child, layoutContext) +
2618
- child
2619
- ->getLeadingMargin(
2620
- YGFlexDirectionColumn, availableInnerWidth)
2621
- .unwrap();
2622
- const float descent =
2623
- child->getLayout().measuredDimensions[YGDimensionHeight] +
2624
- child
2625
- ->getMarginForAxis(
2626
- YGFlexDirectionColumn, availableInnerWidth)
2627
- .unwrap() -
2628
- ascent;
2629
-
2630
- maxAscentForCurrentLine =
2631
- YGFloatMax(maxAscentForCurrentLine, ascent);
2632
- maxDescentForCurrentLine =
2633
- YGFloatMax(maxDescentForCurrentLine, descent);
2634
- } else {
2635
- // The cross dimension is the max of the elements dimension since
2636
- // there can only be one element in that cross dimension in the case
2637
- // when the items are not baseline aligned
2638
- collectedFlexItemsValues.crossDim = YGFloatMax(
2639
- collectedFlexItemsValues.crossDim,
2640
- YGNodeDimWithMargin(child, crossAxis, availableInnerWidth));
2641
- }
2642
- }
2643
- } else if (performLayout) {
2644
- child->setLayoutPosition(
2645
- childLayout.position[pos[mainAxis]] +
2646
- node->getLeadingBorder(mainAxis) + leadingMainDim,
2647
- pos[mainAxis]);
2648
- }
2649
- }
2650
- }
2651
- collectedFlexItemsValues.mainDim += trailingPaddingAndBorderMain;
2652
-
2653
- if (isNodeBaselineLayout) {
2654
- collectedFlexItemsValues.crossDim =
2655
- maxAscentForCurrentLine + maxDescentForCurrentLine;
2656
- }
2657
- }
2658
-
2659
- //
2660
- // This is the main routine that implements a subset of the flexbox layout
2661
- // algorithm described in the W3C CSS documentation:
2662
- // https://www.w3.org/TR/CSS3-flexbox/.
2663
- //
2664
- // Limitations of this algorithm, compared to the full standard:
2665
- // * Display property is always assumed to be 'flex' except for Text nodes,
2666
- // which are assumed to be 'inline-flex'.
2667
- // * The 'zIndex' property (or any form of z ordering) is not supported. Nodes
2668
- // are stacked in document order.
2669
- // * The 'order' property is not supported. The order of flex items is always
2670
- // defined by document order.
2671
- // * The 'visibility' property is always assumed to be 'visible'. Values of
2672
- // 'collapse' and 'hidden' are not supported.
2673
- // * There is no support for forced breaks.
2674
- // * It does not support vertical inline directions (top-to-bottom or
2675
- // bottom-to-top text).
2676
- //
2677
- // Deviations from standard:
2678
- // * Section 4.5 of the spec indicates that all flex items have a default
2679
- // minimum main size. For text blocks, for example, this is the width of the
2680
- // widest word. Calculating the minimum width is expensive, so we forego it
2681
- // and assume a default minimum main size of 0.
2682
- // * Min/Max sizes in the main axis are not honored when resolving flexible
2683
- // lengths.
2684
- // * The spec indicates that the default value for 'flexDirection' is 'row',
2685
- // but the algorithm below assumes a default of 'column'.
2686
- //
2687
- // Input parameters:
2688
- // - node: current node to be sized and layed out
2689
- // - availableWidth & availableHeight: available size to be used for sizing
2690
- // the node or YGUndefined if the size is not available; interpretation
2691
- // depends on layout flags
2692
- // - ownerDirection: the inline (text) direction within the owner
2693
- // (left-to-right or right-to-left)
2694
- // - widthMeasureMode: indicates the sizing rules for the width (see below
2695
- // for explanation)
2696
- // - heightMeasureMode: indicates the sizing rules for the height (see below
2697
- // for explanation)
2698
- // - performLayout: specifies whether the caller is interested in just the
2699
- // dimensions of the node or it requires the entire node and its subtree to
2700
- // be layed out (with final positions)
2701
- //
2702
- // Details:
2703
- // This routine is called recursively to lay out subtrees of flexbox
2704
- // elements. It uses the information in node.style, which is treated as a
2705
- // read-only input. It is responsible for setting the layout.direction and
2706
- // layout.measuredDimensions fields for the input node as well as the
2707
- // layout.position and layout.lineIndex fields for its child nodes. The
2708
- // layout.measuredDimensions field includes any border or padding for the
2709
- // node but does not include margins.
2710
- //
2711
- // The spec describes four different layout modes: "fill available", "max
2712
- // content", "min content", and "fit content". Of these, we don't use "min
2713
- // content" because we don't support default minimum main sizes (see above
2714
- // for details). Each of our measure modes maps to a layout mode from the
2715
- // spec (https://www.w3.org/TR/CSS3-sizing/#terms):
2716
- // - YGMeasureModeUndefined: max content
2717
- // - YGMeasureModeExactly: fill available
2718
- // - YGMeasureModeAtMost: fit content
2719
- //
2720
- // When calling YGNodelayoutImpl and YGLayoutNodeInternal, if the caller
2721
- // passes an available size of undefined then it must also pass a measure
2722
- // mode of YGMeasureModeUndefined in that dimension.
2723
- //
2724
- static void YGNodelayoutImpl(
2725
- const YGNodeRef node,
2726
- const float availableWidth,
2727
- const float availableHeight,
2728
- const YGDirection ownerDirection,
2729
- const YGMeasureMode widthMeasureMode,
2730
- const YGMeasureMode heightMeasureMode,
2731
- const float ownerWidth,
2732
- const float ownerHeight,
2733
- const bool performLayout,
2734
- const YGConfigRef config,
2735
- LayoutData &layoutMarkerData,
2736
- void *const layoutContext,
2737
- const uint32_t depth,
2738
- const uint32_t generationCount,
2739
- const LayoutPassReason reason) {
2740
- YGAssertWithNode(
2741
- node,
2742
- YGFloatIsUndefined(availableWidth)
2743
- ? widthMeasureMode == YGMeasureModeUndefined
2744
- : true,
2745
- "availableWidth is indefinite so widthMeasureMode must be "
2746
- "YGMeasureModeUndefined");
2747
- YGAssertWithNode(
2748
- node,
2749
- YGFloatIsUndefined(availableHeight)
2750
- ? heightMeasureMode == YGMeasureModeUndefined
2751
- : true,
2752
- "availableHeight is indefinite so heightMeasureMode must be "
2753
- "YGMeasureModeUndefined");
2754
-
2755
- (performLayout ? layoutMarkerData.layouts : layoutMarkerData.measures) += 1;
2756
-
2757
- // Set the resolved resolution in the node's layout.
2758
- const YGDirection direction = node->resolveDirection(ownerDirection);
2759
- node->setLayoutDirection(direction);
2760
-
2761
- const YGFlexDirection flexRowDirection =
2762
- YGResolveFlexDirection(YGFlexDirectionRow, direction);
2763
- const YGFlexDirection flexColumnDirection =
2764
- YGResolveFlexDirection(YGFlexDirectionColumn, direction);
2765
-
2766
- const YGEdge startEdge =
2767
- direction == YGDirectionLTR ? YGEdgeLeft : YGEdgeRight;
2768
- const YGEdge endEdge = direction == YGDirectionLTR ? YGEdgeRight : YGEdgeLeft;
2769
- node->setLayoutMargin(
2770
- node->getLeadingMargin(flexRowDirection, ownerWidth).unwrap(), startEdge);
2771
- node->setLayoutMargin(
2772
- node->getTrailingMargin(flexRowDirection, ownerWidth).unwrap(), endEdge);
2773
- node->setLayoutMargin(
2774
- node->getLeadingMargin(flexColumnDirection, ownerWidth).unwrap(),
2775
- YGEdgeTop);
2776
- node->setLayoutMargin(
2777
- node->getTrailingMargin(flexColumnDirection, ownerWidth).unwrap(),
2778
- YGEdgeBottom);
2779
-
2780
- node->setLayoutBorder(node->getLeadingBorder(flexRowDirection), startEdge);
2781
- node->setLayoutBorder(node->getTrailingBorder(flexRowDirection), endEdge);
2782
- node->setLayoutBorder(node->getLeadingBorder(flexColumnDirection), YGEdgeTop);
2783
- node->setLayoutBorder(
2784
- node->getTrailingBorder(flexColumnDirection), YGEdgeBottom);
2785
-
2786
- node->setLayoutPadding(
2787
- node->getLeadingPadding(flexRowDirection, ownerWidth).unwrap(),
2788
- startEdge);
2789
- node->setLayoutPadding(
2790
- node->getTrailingPadding(flexRowDirection, ownerWidth).unwrap(), endEdge);
2791
- node->setLayoutPadding(
2792
- node->getLeadingPadding(flexColumnDirection, ownerWidth).unwrap(),
2793
- YGEdgeTop);
2794
- node->setLayoutPadding(
2795
- node->getTrailingPadding(flexColumnDirection, ownerWidth).unwrap(),
2796
- YGEdgeBottom);
2797
-
2798
- if (node->hasMeasureFunc()) {
2799
- YGNodeWithMeasureFuncSetMeasuredDimensions(
2800
- node,
2801
- availableWidth,
2802
- availableHeight,
2803
- widthMeasureMode,
2804
- heightMeasureMode,
2805
- ownerWidth,
2806
- ownerHeight,
2807
- layoutMarkerData,
2808
- layoutContext,
2809
- reason);
2810
- return;
2811
- }
2812
-
2813
- const uint32_t childCount = YGNodeGetChildCount(node);
2814
- if (childCount == 0) {
2815
- YGNodeEmptyContainerSetMeasuredDimensions(
2816
- node,
2817
- availableWidth,
2818
- availableHeight,
2819
- widthMeasureMode,
2820
- heightMeasureMode,
2821
- ownerWidth,
2822
- ownerHeight);
2823
- return;
2824
- }
2825
-
2826
- // If we're not being asked to perform a full layout we can skip the algorithm
2827
- // if we already know the size
2828
- if (!performLayout &&
2829
- YGNodeFixedSizeSetMeasuredDimensions(
2830
- node,
2831
- availableWidth,
2832
- availableHeight,
2833
- widthMeasureMode,
2834
- heightMeasureMode,
2835
- ownerWidth,
2836
- ownerHeight)) {
2837
- return;
2838
- }
2839
-
2840
- // At this point we know we're going to perform work. Ensure that each child
2841
- // has a mutable copy.
2842
- node->cloneChildrenIfNeeded(layoutContext);
2843
- // Reset layout flags, as they could have changed.
2844
- node->setLayoutHadOverflow(false);
2845
-
2846
- // STEP 1: CALCULATE VALUES FOR REMAINDER OF ALGORITHM
2847
- const YGFlexDirection mainAxis =
2848
- YGResolveFlexDirection(node->getStyle().flexDirection(), direction);
2849
- const YGFlexDirection crossAxis = YGFlexDirectionCross(mainAxis, direction);
2850
- const bool isMainAxisRow = YGFlexDirectionIsRow(mainAxis);
2851
- const bool isNodeFlexWrap = node->getStyle().flexWrap() != YGWrapNoWrap;
2852
-
2853
- const float mainAxisownerSize = isMainAxisRow ? ownerWidth : ownerHeight;
2854
- const float crossAxisownerSize = isMainAxisRow ? ownerHeight : ownerWidth;
2855
-
2856
- const float leadingPaddingAndBorderCross =
2857
- node->getLeadingPaddingAndBorder(crossAxis, ownerWidth).unwrap();
2858
- const float paddingAndBorderAxisMain =
2859
- YGNodePaddingAndBorderForAxis(node, mainAxis, ownerWidth);
2860
- const float paddingAndBorderAxisCross =
2861
- YGNodePaddingAndBorderForAxis(node, crossAxis, ownerWidth);
2862
-
2863
- YGMeasureMode measureModeMainDim =
2864
- isMainAxisRow ? widthMeasureMode : heightMeasureMode;
2865
- YGMeasureMode measureModeCrossDim =
2866
- isMainAxisRow ? heightMeasureMode : widthMeasureMode;
2867
-
2868
- const float paddingAndBorderAxisRow =
2869
- isMainAxisRow ? paddingAndBorderAxisMain : paddingAndBorderAxisCross;
2870
- const float paddingAndBorderAxisColumn =
2871
- isMainAxisRow ? paddingAndBorderAxisCross : paddingAndBorderAxisMain;
2872
-
2873
- const float marginAxisRow =
2874
- node->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap();
2875
- const float marginAxisColumn =
2876
- node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap();
2877
-
2878
- const auto &minDimensions = node->getStyle().minDimensions();
2879
- const auto &maxDimensions = node->getStyle().maxDimensions();
2880
- const float minInnerWidth =
2881
- YGResolveValue(minDimensions[YGDimensionWidth], ownerWidth).unwrap() -
2882
- paddingAndBorderAxisRow;
2883
- const float maxInnerWidth =
2884
- YGResolveValue(maxDimensions[YGDimensionWidth], ownerWidth).unwrap() -
2885
- paddingAndBorderAxisRow;
2886
- const float minInnerHeight =
2887
- YGResolveValue(minDimensions[YGDimensionHeight], ownerHeight).unwrap() -
2888
- paddingAndBorderAxisColumn;
2889
- const float maxInnerHeight =
2890
- YGResolveValue(maxDimensions[YGDimensionHeight], ownerHeight).unwrap() -
2891
- paddingAndBorderAxisColumn;
2892
-
2893
- const float minInnerMainDim = isMainAxisRow ? minInnerWidth : minInnerHeight;
2894
- const float maxInnerMainDim = isMainAxisRow ? maxInnerWidth : maxInnerHeight;
2895
-
2896
- // STEP 2: DETERMINE AVAILABLE SIZE IN MAIN AND CROSS DIRECTIONS
2897
-
2898
- float availableInnerWidth = YGNodeCalculateAvailableInnerDim(
2899
- node, YGFlexDirectionRow, availableWidth, ownerWidth, ownerWidth);
2900
- float availableInnerHeight = YGNodeCalculateAvailableInnerDim(
2901
- node, YGFlexDirectionColumn, availableHeight, ownerHeight, ownerWidth);
2902
-
2903
- float availableInnerMainDim =
2904
- isMainAxisRow ? availableInnerWidth : availableInnerHeight;
2905
- const float availableInnerCrossDim =
2906
- isMainAxisRow ? availableInnerHeight : availableInnerWidth;
2907
-
2908
- // STEP 3: DETERMINE FLEX BASIS FOR EACH ITEM
2909
-
2910
- float totalOuterFlexBasis = YGNodeComputeFlexBasisForChildren(
2911
- node,
2912
- availableInnerWidth,
2913
- availableInnerHeight,
2914
- widthMeasureMode,
2915
- heightMeasureMode,
2916
- direction,
2917
- mainAxis,
2918
- config,
2919
- performLayout,
2920
- layoutMarkerData,
2921
- layoutContext,
2922
- depth,
2923
- generationCount);
2924
-
2925
- const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined
2926
- ? false
2927
- : totalOuterFlexBasis > availableInnerMainDim;
2928
- if (isNodeFlexWrap && flexBasisOverflows &&
2929
- measureModeMainDim == YGMeasureModeAtMost) {
2930
- measureModeMainDim = YGMeasureModeExactly;
2931
- }
2932
- // STEP 4: COLLECT FLEX ITEMS INTO FLEX LINES
2933
-
2934
- // Indexes of children that represent the first and last items in the line.
2935
- uint32_t startOfLineIndex = 0;
2936
- uint32_t endOfLineIndex = 0;
2937
-
2938
- // Number of lines.
2939
- uint32_t lineCount = 0;
2940
-
2941
- // Accumulated cross dimensions of all lines so far.
2942
- float totalLineCrossDim = 0;
2943
-
2944
- // Max main dimension of all the lines.
2945
- float maxLineMainDim = 0;
2946
- YGCollectFlexItemsRowValues collectedFlexItemsValues;
2947
- for (; endOfLineIndex < childCount;
2948
- lineCount++, startOfLineIndex = endOfLineIndex) {
2949
- collectedFlexItemsValues = YGCalculateCollectFlexItemsRowValues(
2950
- node,
2951
- ownerDirection,
2952
- mainAxisownerSize,
2953
- availableInnerWidth,
2954
- availableInnerMainDim,
2955
- startOfLineIndex,
2956
- lineCount);
2957
- endOfLineIndex = collectedFlexItemsValues.endOfLineIndex;
2958
-
2959
- // If we don't need to measure the cross axis, we can skip the entire flex
2960
- // step.
2961
- const bool canSkipFlex =
2962
- !performLayout && measureModeCrossDim == YGMeasureModeExactly;
2963
-
2964
- // STEP 5: RESOLVING FLEXIBLE LENGTHS ON MAIN AXIS
2965
- // Calculate the remaining available space that needs to be allocated. If
2966
- // the main dimension size isn't known, it is computed based on the line
2967
- // length, so there's no more space left to distribute.
2968
-
2969
- bool sizeBasedOnContent = false;
2970
- // If we don't measure with exact main dimension we want to ensure we don't
2971
- // violate min and max
2972
- if (measureModeMainDim != YGMeasureModeExactly) {
2973
- if (!YGFloatIsUndefined(minInnerMainDim) &&
2974
- collectedFlexItemsValues.sizeConsumedOnCurrentLine <
2975
- minInnerMainDim) {
2976
- availableInnerMainDim = minInnerMainDim;
2977
- } else if (
2978
- !YGFloatIsUndefined(maxInnerMainDim) &&
2979
- collectedFlexItemsValues.sizeConsumedOnCurrentLine >
2980
- maxInnerMainDim) {
2981
- availableInnerMainDim = maxInnerMainDim;
2982
- } else {
2983
- if (!node->getConfig()->useLegacyStretchBehaviour &&
2984
- ((YGFloatIsUndefined(
2985
- collectedFlexItemsValues.totalFlexGrowFactors) &&
2986
- collectedFlexItemsValues.totalFlexGrowFactors == 0) ||
2987
- (YGFloatIsUndefined(node->resolveFlexGrow()) &&
2988
- node->resolveFlexGrow() == 0))) {
2989
- // If we don't have any children to flex or we can't flex the node
2990
- // itself, space we've used is all space we need. Root node also
2991
- // should be shrunk to minimum
2992
- availableInnerMainDim =
2993
- collectedFlexItemsValues.sizeConsumedOnCurrentLine;
2994
- }
2995
-
2996
- if (node->getConfig()->useLegacyStretchBehaviour) {
2997
- node->setLayoutDidUseLegacyFlag(true);
2998
- }
2999
- sizeBasedOnContent = !node->getConfig()->useLegacyStretchBehaviour;
3000
- }
3001
- }
3002
-
3003
- if (!sizeBasedOnContent && !YGFloatIsUndefined(availableInnerMainDim)) {
3004
- collectedFlexItemsValues.remainingFreeSpace = availableInnerMainDim -
3005
- collectedFlexItemsValues.sizeConsumedOnCurrentLine;
3006
- } else if (collectedFlexItemsValues.sizeConsumedOnCurrentLine < 0) {
3007
- // availableInnerMainDim is indefinite which means the node is being sized
3008
- // based on its content. sizeConsumedOnCurrentLine is negative which means
3009
- // the node will allocate 0 points for its content. Consequently,
3010
- // remainingFreeSpace is 0 - sizeConsumedOnCurrentLine.
3011
- collectedFlexItemsValues.remainingFreeSpace =
3012
- -collectedFlexItemsValues.sizeConsumedOnCurrentLine;
3013
- }
3014
-
3015
- if (!canSkipFlex) {
3016
- YGResolveFlexibleLength(
3017
- node,
3018
- collectedFlexItemsValues,
3019
- mainAxis,
3020
- crossAxis,
3021
- mainAxisownerSize,
3022
- availableInnerMainDim,
3023
- availableInnerCrossDim,
3024
- availableInnerWidth,
3025
- availableInnerHeight,
3026
- flexBasisOverflows,
3027
- measureModeCrossDim,
3028
- performLayout,
3029
- config,
3030
- layoutMarkerData,
3031
- layoutContext,
3032
- depth,
3033
- generationCount);
3034
- }
3035
-
3036
- node->setLayoutHadOverflow(
3037
- node->getLayout().hadOverflow() |
3038
- (collectedFlexItemsValues.remainingFreeSpace < 0));
3039
-
3040
- // STEP 6: MAIN-AXIS JUSTIFICATION & CROSS-AXIS SIZE DETERMINATION
3041
-
3042
- // At this point, all the children have their dimensions set in the main
3043
- // axis. Their dimensions are also set in the cross axis with the exception
3044
- // of items that are aligned "stretch". We need to compute these stretch
3045
- // values and set the final positions.
3046
-
3047
- YGJustifyMainAxis(
3048
- node,
3049
- collectedFlexItemsValues,
3050
- startOfLineIndex,
3051
- mainAxis,
3052
- crossAxis,
3053
- measureModeMainDim,
3054
- measureModeCrossDim,
3055
- mainAxisownerSize,
3056
- ownerWidth,
3057
- availableInnerMainDim,
3058
- availableInnerCrossDim,
3059
- availableInnerWidth,
3060
- performLayout,
3061
- layoutContext);
3062
-
3063
- float containerCrossAxis = availableInnerCrossDim;
3064
- if (measureModeCrossDim == YGMeasureModeUndefined ||
3065
- measureModeCrossDim == YGMeasureModeAtMost) {
3066
- // Compute the cross axis from the max cross dimension of the children.
3067
- containerCrossAxis =
3068
- YGNodeBoundAxis(
3069
- node,
3070
- crossAxis,
3071
- collectedFlexItemsValues.crossDim + paddingAndBorderAxisCross,
3072
- crossAxisownerSize,
3073
- ownerWidth) -
3074
- paddingAndBorderAxisCross;
3075
- }
3076
-
3077
- // If there's no flex wrap, the cross dimension is defined by the container.
3078
- if (!isNodeFlexWrap && measureModeCrossDim == YGMeasureModeExactly) {
3079
- collectedFlexItemsValues.crossDim = availableInnerCrossDim;
3080
- }
3081
-
3082
- // Clamp to the min/max size specified on the container.
3083
- collectedFlexItemsValues.crossDim =
3084
- YGNodeBoundAxis(
3085
- node,
3086
- crossAxis,
3087
- collectedFlexItemsValues.crossDim + paddingAndBorderAxisCross,
3088
- crossAxisownerSize,
3089
- ownerWidth) -
3090
- paddingAndBorderAxisCross;
3091
-
3092
- // STEP 7: CROSS-AXIS ALIGNMENT
3093
- // We can skip child alignment if we're just measuring the container.
3094
- if (performLayout) {
3095
- for (uint32_t i = startOfLineIndex; i < endOfLineIndex; i++) {
3096
- const YGNodeRef child = node->getChild(i);
3097
- if (child->getStyle().display() == YGDisplayNone) {
3098
- continue;
3099
- }
3100
- if (child->getStyle().positionType() == YGPositionTypeAbsolute) {
3101
- // If the child is absolutely positioned and has a
3102
- // top/left/bottom/right set, override all the previously computed
3103
- // positions to set it correctly.
3104
- const bool isChildLeadingPosDefined =
3105
- child->isLeadingPositionDefined(crossAxis);
3106
- if (isChildLeadingPosDefined) {
3107
- child->setLayoutPosition(
3108
- child->getLeadingPosition(crossAxis, availableInnerCrossDim)
3109
- .unwrap() +
3110
- node->getLeadingBorder(crossAxis) +
3111
- child->getLeadingMargin(crossAxis, availableInnerWidth)
3112
- .unwrap(),
3113
- pos[crossAxis]);
3114
- }
3115
- // If leading position is not defined or calculations result in Nan,
3116
- // default to border + margin
3117
- if (!isChildLeadingPosDefined ||
3118
- YGFloatIsUndefined(child->getLayout().position[pos[crossAxis]])) {
3119
- child->setLayoutPosition(
3120
- node->getLeadingBorder(crossAxis) +
3121
- child->getLeadingMargin(crossAxis, availableInnerWidth)
3122
- .unwrap(),
3123
- pos[crossAxis]);
3124
- }
3125
- } else {
3126
- float leadingCrossDim = leadingPaddingAndBorderCross;
3127
-
3128
- // For a relative children, we're either using alignItems (owner) or
3129
- // alignSelf (child) in order to determine the position in the cross
3130
- // axis
3131
- const YGAlign alignItem = YGNodeAlignItem(node, child);
3132
-
3133
- // If the child uses align stretch, we need to lay it out one more
3134
- // time, this time forcing the cross-axis size to be the computed
3135
- // cross size for the current line.
3136
- if (alignItem == YGAlignStretch &&
3137
- child->marginLeadingValue(crossAxis).unit != YGUnitAuto &&
3138
- child->marginTrailingValue(crossAxis).unit != YGUnitAuto) {
3139
- // If the child defines a definite size for its cross axis, there's
3140
- // no need to stretch.
3141
- if (!YGNodeIsStyleDimDefined(
3142
- child, crossAxis, availableInnerCrossDim)) {
3143
- float childMainSize =
3144
- child->getLayout().measuredDimensions[dim[mainAxis]];
3145
- const auto &childStyle = child->getStyle();
3146
- float childCrossSize = !childStyle.aspectRatio().isUndefined()
3147
- ? child->getMarginForAxis(crossAxis, availableInnerWidth)
3148
- .unwrap() +
3149
- (isMainAxisRow
3150
- ? childMainSize / childStyle.aspectRatio().unwrap()
3151
- : childMainSize * childStyle.aspectRatio().unwrap())
3152
- : collectedFlexItemsValues.crossDim;
3153
-
3154
- childMainSize +=
3155
- child->getMarginForAxis(mainAxis, availableInnerWidth)
3156
- .unwrap();
3157
-
3158
- YGMeasureMode childMainMeasureMode = YGMeasureModeExactly;
3159
- YGMeasureMode childCrossMeasureMode = YGMeasureModeExactly;
3160
- YGConstrainMaxSizeForMode(
3161
- child,
3162
- mainAxis,
3163
- availableInnerMainDim,
3164
- availableInnerWidth,
3165
- &childMainMeasureMode,
3166
- &childMainSize);
3167
- YGConstrainMaxSizeForMode(
3168
- child,
3169
- crossAxis,
3170
- availableInnerCrossDim,
3171
- availableInnerWidth,
3172
- &childCrossMeasureMode,
3173
- &childCrossSize);
3174
-
3175
- const float childWidth =
3176
- isMainAxisRow ? childMainSize : childCrossSize;
3177
- const float childHeight =
3178
- !isMainAxisRow ? childMainSize : childCrossSize;
3179
-
3180
- auto alignContent = node->getStyle().alignContent();
3181
- auto crossAxisDoesNotGrow =
3182
- alignContent != YGAlignStretch && isNodeFlexWrap;
3183
- const YGMeasureMode childWidthMeasureMode =
3184
- YGFloatIsUndefined(childWidth) ||
3185
- (!isMainAxisRow && crossAxisDoesNotGrow)
3186
- ? YGMeasureModeUndefined
3187
- : YGMeasureModeExactly;
3188
- const YGMeasureMode childHeightMeasureMode =
3189
- YGFloatIsUndefined(childHeight) ||
3190
- (isMainAxisRow && crossAxisDoesNotGrow)
3191
- ? YGMeasureModeUndefined
3192
- : YGMeasureModeExactly;
3193
-
3194
- YGLayoutNodeInternal(
3195
- child,
3196
- childWidth,
3197
- childHeight,
3198
- direction,
3199
- childWidthMeasureMode,
3200
- childHeightMeasureMode,
3201
- availableInnerWidth,
3202
- availableInnerHeight,
3203
- true,
3204
- LayoutPassReason::kStretch,
3205
- config,
3206
- layoutMarkerData,
3207
- layoutContext,
3208
- depth,
3209
- generationCount);
3210
- }
3211
- } else {
3212
- const float remainingCrossDim = containerCrossAxis -
3213
- YGNodeDimWithMargin(child, crossAxis, availableInnerWidth);
3214
-
3215
- if (child->marginLeadingValue(crossAxis).unit == YGUnitAuto &&
3216
- child->marginTrailingValue(crossAxis).unit == YGUnitAuto) {
3217
- leadingCrossDim += YGFloatMax(0.0f, remainingCrossDim / 2);
3218
- } else if (
3219
- child->marginTrailingValue(crossAxis).unit == YGUnitAuto) {
3220
- // No-Op
3221
- } else if (
3222
- child->marginLeadingValue(crossAxis).unit == YGUnitAuto) {
3223
- leadingCrossDim += YGFloatMax(0.0f, remainingCrossDim);
3224
- } else if (alignItem == YGAlignFlexStart) {
3225
- // No-Op
3226
- } else if (alignItem == YGAlignCenter) {
3227
- leadingCrossDim += remainingCrossDim / 2;
3228
- } else {
3229
- leadingCrossDim += remainingCrossDim;
3230
- }
3231
- }
3232
- // And we apply the position
3233
- child->setLayoutPosition(
3234
- child->getLayout().position[pos[crossAxis]] + totalLineCrossDim +
3235
- leadingCrossDim,
3236
- pos[crossAxis]);
3237
- }
3238
- }
3239
- }
3240
-
3241
- totalLineCrossDim += collectedFlexItemsValues.crossDim;
3242
- maxLineMainDim =
3243
- YGFloatMax(maxLineMainDim, collectedFlexItemsValues.mainDim);
3244
- }
3245
-
3246
- // STEP 8: MULTI-LINE CONTENT ALIGNMENT
3247
- // currentLead stores the size of the cross dim
3248
- if (performLayout && (isNodeFlexWrap || YGIsBaselineLayout(node))) {
3249
- float crossDimLead = 0;
3250
- float currentLead = leadingPaddingAndBorderCross;
3251
- if (!YGFloatIsUndefined(availableInnerCrossDim)) {
3252
- const float remainingAlignContentDim =
3253
- availableInnerCrossDim - totalLineCrossDim;
3254
- switch (node->getStyle().alignContent()) {
3255
- case YGAlignFlexEnd:
3256
- currentLead += remainingAlignContentDim;
3257
- break;
3258
- case YGAlignCenter:
3259
- currentLead += remainingAlignContentDim / 2;
3260
- break;
3261
- case YGAlignStretch:
3262
- if (availableInnerCrossDim > totalLineCrossDim) {
3263
- crossDimLead = remainingAlignContentDim / lineCount;
3264
- }
3265
- break;
3266
- case YGAlignSpaceAround:
3267
- if (availableInnerCrossDim > totalLineCrossDim) {
3268
- currentLead += remainingAlignContentDim / (2 * lineCount);
3269
- if (lineCount > 1) {
3270
- crossDimLead = remainingAlignContentDim / lineCount;
3271
- }
3272
- } else {
3273
- currentLead += remainingAlignContentDim / 2;
3274
- }
3275
- break;
3276
- case YGAlignSpaceBetween:
3277
- if (availableInnerCrossDim > totalLineCrossDim && lineCount > 1) {
3278
- crossDimLead = remainingAlignContentDim / (lineCount - 1);
3279
- }
3280
- break;
3281
- case YGAlignAuto:
3282
- case YGAlignFlexStart:
3283
- case YGAlignBaseline:
3284
- break;
3285
- }
3286
- }
3287
- uint32_t endIndex = 0;
3288
- for (uint32_t i = 0; i < lineCount; i++) {
3289
- const uint32_t startIndex = endIndex;
3290
- uint32_t ii;
3291
-
3292
- // compute the line's height and find the endIndex
3293
- float lineHeight = 0;
3294
- float maxAscentForCurrentLine = 0;
3295
- float maxDescentForCurrentLine = 0;
3296
- for (ii = startIndex; ii < childCount; ii++) {
3297
- const YGNodeRef child = node->getChild(ii);
3298
- if (child->getStyle().display() == YGDisplayNone) {
3299
- continue;
3300
- }
3301
- if (child->getStyle().positionType() == YGPositionTypeRelative) {
3302
- if (child->getLineIndex() != i) {
3303
- break;
3304
- }
3305
- if (YGNodeIsLayoutDimDefined(child, crossAxis)) {
3306
- lineHeight = YGFloatMax(
3307
- lineHeight,
3308
- child->getLayout().measuredDimensions[dim[crossAxis]] +
3309
- child->getMarginForAxis(crossAxis, availableInnerWidth)
3310
- .unwrap());
3311
- }
3312
- if (YGNodeAlignItem(node, child) == YGAlignBaseline) {
3313
- const float ascent = YGBaseline(child, layoutContext) +
3314
- child
3315
- ->getLeadingMargin(
3316
- YGFlexDirectionColumn, availableInnerWidth)
3317
- .unwrap();
3318
- const float descent =
3319
- child->getLayout().measuredDimensions[YGDimensionHeight] +
3320
- child
3321
- ->getMarginForAxis(
3322
- YGFlexDirectionColumn, availableInnerWidth)
3323
- .unwrap() -
3324
- ascent;
3325
- maxAscentForCurrentLine =
3326
- YGFloatMax(maxAscentForCurrentLine, ascent);
3327
- maxDescentForCurrentLine =
3328
- YGFloatMax(maxDescentForCurrentLine, descent);
3329
- lineHeight = YGFloatMax(
3330
- lineHeight, maxAscentForCurrentLine + maxDescentForCurrentLine);
3331
- }
3332
- }
3333
- }
3334
- endIndex = ii;
3335
- lineHeight += crossDimLead;
3336
-
3337
- if (performLayout) {
3338
- for (ii = startIndex; ii < endIndex; ii++) {
3339
- const YGNodeRef child = node->getChild(ii);
3340
- if (child->getStyle().display() == YGDisplayNone) {
3341
- continue;
3342
- }
3343
- if (child->getStyle().positionType() == YGPositionTypeRelative) {
3344
- switch (YGNodeAlignItem(node, child)) {
3345
- case YGAlignFlexStart: {
3346
- child->setLayoutPosition(
3347
- currentLead +
3348
- child->getLeadingMargin(crossAxis, availableInnerWidth)
3349
- .unwrap(),
3350
- pos[crossAxis]);
3351
- break;
3352
- }
3353
- case YGAlignFlexEnd: {
3354
- child->setLayoutPosition(
3355
- currentLead + lineHeight -
3356
- child->getTrailingMargin(crossAxis, availableInnerWidth)
3357
- .unwrap() -
3358
- child->getLayout().measuredDimensions[dim[crossAxis]],
3359
- pos[crossAxis]);
3360
- break;
3361
- }
3362
- case YGAlignCenter: {
3363
- float childHeight =
3364
- child->getLayout().measuredDimensions[dim[crossAxis]];
3365
-
3366
- child->setLayoutPosition(
3367
- currentLead + (lineHeight - childHeight) / 2,
3368
- pos[crossAxis]);
3369
- break;
3370
- }
3371
- case YGAlignStretch: {
3372
- child->setLayoutPosition(
3373
- currentLead +
3374
- child->getLeadingMargin(crossAxis, availableInnerWidth)
3375
- .unwrap(),
3376
- pos[crossAxis]);
3377
-
3378
- // Remeasure child with the line height as it as been only
3379
- // measured with the owners height yet.
3380
- if (!YGNodeIsStyleDimDefined(
3381
- child, crossAxis, availableInnerCrossDim)) {
3382
- const float childWidth = isMainAxisRow
3383
- ? (child->getLayout()
3384
- .measuredDimensions[YGDimensionWidth] +
3385
- child->getMarginForAxis(mainAxis, availableInnerWidth)
3386
- .unwrap())
3387
- : lineHeight;
3388
-
3389
- const float childHeight = !isMainAxisRow
3390
- ? (child->getLayout()
3391
- .measuredDimensions[YGDimensionHeight] +
3392
- child->getMarginForAxis(crossAxis, availableInnerWidth)
3393
- .unwrap())
3394
- : lineHeight;
3395
-
3396
- if (!(YGFloatsEqual(
3397
- childWidth,
3398
- child->getLayout()
3399
- .measuredDimensions[YGDimensionWidth]) &&
3400
- YGFloatsEqual(
3401
- childHeight,
3402
- child->getLayout()
3403
- .measuredDimensions[YGDimensionHeight]))) {
3404
- YGLayoutNodeInternal(
3405
- child,
3406
- childWidth,
3407
- childHeight,
3408
- direction,
3409
- YGMeasureModeExactly,
3410
- YGMeasureModeExactly,
3411
- availableInnerWidth,
3412
- availableInnerHeight,
3413
- true,
3414
- LayoutPassReason::kMultilineStretch,
3415
- config,
3416
- layoutMarkerData,
3417
- layoutContext,
3418
- depth,
3419
- generationCount);
3420
- }
3421
- }
3422
- break;
3423
- }
3424
- case YGAlignBaseline: {
3425
- child->setLayoutPosition(
3426
- currentLead + maxAscentForCurrentLine -
3427
- YGBaseline(child, layoutContext) +
3428
- child
3429
- ->getLeadingPosition(
3430
- YGFlexDirectionColumn, availableInnerCrossDim)
3431
- .unwrap(),
3432
- YGEdgeTop);
3433
-
3434
- break;
3435
- }
3436
- case YGAlignAuto:
3437
- case YGAlignSpaceBetween:
3438
- case YGAlignSpaceAround:
3439
- break;
3440
- }
3441
- }
3442
- }
3443
- }
3444
- currentLead += lineHeight;
3445
- }
3446
- }
3447
-
3448
- // STEP 9: COMPUTING FINAL DIMENSIONS
3449
-
3450
- node->setLayoutMeasuredDimension(
3451
- YGNodeBoundAxis(
3452
- node,
3453
- YGFlexDirectionRow,
3454
- availableWidth - marginAxisRow,
3455
- ownerWidth,
3456
- ownerWidth),
3457
- YGDimensionWidth);
3458
-
3459
- node->setLayoutMeasuredDimension(
3460
- YGNodeBoundAxis(
3461
- node,
3462
- YGFlexDirectionColumn,
3463
- availableHeight - marginAxisColumn,
3464
- ownerHeight,
3465
- ownerWidth),
3466
- YGDimensionHeight);
3467
-
3468
- // If the user didn't specify a width or height for the node, set the
3469
- // dimensions based on the children.
3470
- if (measureModeMainDim == YGMeasureModeUndefined ||
3471
- (node->getStyle().overflow() != YGOverflowScroll &&
3472
- measureModeMainDim == YGMeasureModeAtMost)) {
3473
- // Clamp the size to the min/max size, if specified, and make sure it
3474
- // doesn't go below the padding and border amount.
3475
- node->setLayoutMeasuredDimension(
3476
- YGNodeBoundAxis(
3477
- node, mainAxis, maxLineMainDim, mainAxisownerSize, ownerWidth),
3478
- dim[mainAxis]);
3479
-
3480
- } else if (
3481
- measureModeMainDim == YGMeasureModeAtMost &&
3482
- node->getStyle().overflow() == YGOverflowScroll) {
3483
- node->setLayoutMeasuredDimension(
3484
- YGFloatMax(
3485
- YGFloatMin(
3486
- availableInnerMainDim + paddingAndBorderAxisMain,
3487
- YGNodeBoundAxisWithinMinAndMax(
3488
- node,
3489
- mainAxis,
3490
- YGFloatOptional{maxLineMainDim},
3491
- mainAxisownerSize)
3492
- .unwrap()),
3493
- paddingAndBorderAxisMain),
3494
- dim[mainAxis]);
3495
- }
3496
-
3497
- if (measureModeCrossDim == YGMeasureModeUndefined ||
3498
- (node->getStyle().overflow() != YGOverflowScroll &&
3499
- measureModeCrossDim == YGMeasureModeAtMost)) {
3500
- // Clamp the size to the min/max size, if specified, and make sure it
3501
- // doesn't go below the padding and border amount.
3502
- node->setLayoutMeasuredDimension(
3503
- YGNodeBoundAxis(
3504
- node,
3505
- crossAxis,
3506
- totalLineCrossDim + paddingAndBorderAxisCross,
3507
- crossAxisownerSize,
3508
- ownerWidth),
3509
- dim[crossAxis]);
3510
-
3511
- } else if (
3512
- measureModeCrossDim == YGMeasureModeAtMost &&
3513
- node->getStyle().overflow() == YGOverflowScroll) {
3514
- node->setLayoutMeasuredDimension(
3515
- YGFloatMax(
3516
- YGFloatMin(
3517
- availableInnerCrossDim + paddingAndBorderAxisCross,
3518
- YGNodeBoundAxisWithinMinAndMax(
3519
- node,
3520
- crossAxis,
3521
- YGFloatOptional{totalLineCrossDim +
3522
- paddingAndBorderAxisCross},
3523
- crossAxisownerSize)
3524
- .unwrap()),
3525
- paddingAndBorderAxisCross),
3526
- dim[crossAxis]);
3527
- }
3528
-
3529
- // As we only wrapped in normal direction yet, we need to reverse the
3530
- // positions on wrap-reverse.
3531
- if (performLayout && node->getStyle().flexWrap() == YGWrapWrapReverse) {
3532
- for (uint32_t i = 0; i < childCount; i++) {
3533
- const YGNodeRef child = YGNodeGetChild(node, i);
3534
- if (child->getStyle().positionType() == YGPositionTypeRelative) {
3535
- child->setLayoutPosition(
3536
- node->getLayout().measuredDimensions[dim[crossAxis]] -
3537
- child->getLayout().position[pos[crossAxis]] -
3538
- child->getLayout().measuredDimensions[dim[crossAxis]],
3539
- pos[crossAxis]);
3540
- }
3541
- }
3542
- }
3543
-
3544
- if (performLayout) {
3545
- // STEP 10: SIZING AND POSITIONING ABSOLUTE CHILDREN
3546
- for (auto child : node->getChildren()) {
3547
- if (child->getStyle().positionType() != YGPositionTypeAbsolute) {
3548
- continue;
3549
- }
3550
- YGNodeAbsoluteLayoutChild(
3551
- node,
3552
- child,
3553
- availableInnerWidth,
3554
- isMainAxisRow ? measureModeMainDim : measureModeCrossDim,
3555
- availableInnerHeight,
3556
- direction,
3557
- config,
3558
- layoutMarkerData,
3559
- layoutContext,
3560
- depth,
3561
- generationCount);
3562
- }
3563
-
3564
- // STEP 11: SETTING TRAILING POSITIONS FOR CHILDREN
3565
- const bool needsMainTrailingPos = mainAxis == YGFlexDirectionRowReverse ||
3566
- mainAxis == YGFlexDirectionColumnReverse;
3567
- const bool needsCrossTrailingPos = crossAxis == YGFlexDirectionRowReverse ||
3568
- crossAxis == YGFlexDirectionColumnReverse;
3569
-
3570
- // Set trailing position if necessary.
3571
- if (needsMainTrailingPos || needsCrossTrailingPos) {
3572
- for (uint32_t i = 0; i < childCount; i++) {
3573
- const YGNodeRef child = node->getChild(i);
3574
- if (child->getStyle().display() == YGDisplayNone) {
3575
- continue;
3576
- }
3577
- if (needsMainTrailingPos) {
3578
- YGNodeSetChildTrailingPosition(node, child, mainAxis);
3579
- }
3580
-
3581
- if (needsCrossTrailingPos) {
3582
- YGNodeSetChildTrailingPosition(node, child, crossAxis);
3583
- }
3584
- }
3585
- }
3586
- }
3587
- }
3588
-
3589
- bool gPrintChanges = false;
3590
- bool gPrintSkips = false;
3591
-
3592
- static const char *spacer =
3593
- " ";
3594
-
3595
- static const char *YGSpacer(const unsigned long level) {
3596
- const size_t spacerLen = strlen(spacer);
3597
- if (level > spacerLen) {
3598
- return &spacer[0];
3599
- } else {
3600
- return &spacer[spacerLen - level];
3601
- }
3602
- }
3603
-
3604
- static const char *YGMeasureModeName(
3605
- const YGMeasureMode mode,
3606
- const bool performLayout) {
3607
- constexpr auto N = enums::count<YGMeasureMode>();
3608
- const char *kMeasureModeNames[N] = {"UNDEFINED", "EXACTLY", "AT_MOST"};
3609
- const char *kLayoutModeNames[N] = {
3610
- "LAY_UNDEFINED", "LAY_EXACTLY", "LAY_AT_MOST"};
3611
-
3612
- if (mode >= N) {
3613
- return "";
3614
- }
3615
-
3616
- return performLayout ? kLayoutModeNames[mode] : kMeasureModeNames[mode];
3617
- }
3618
-
3619
- static inline bool YGMeasureModeSizeIsExactAndMatchesOldMeasuredSize(
3620
- YGMeasureMode sizeMode,
3621
- float size,
3622
- float lastComputedSize) {
3623
- return sizeMode == YGMeasureModeExactly &&
3624
- YGFloatsEqual(size, lastComputedSize);
3625
- }
3626
-
3627
- static inline bool YGMeasureModeOldSizeIsUnspecifiedAndStillFits(
3628
- YGMeasureMode sizeMode,
3629
- float size,
3630
- YGMeasureMode lastSizeMode,
3631
- float lastComputedSize) {
3632
- return sizeMode == YGMeasureModeAtMost &&
3633
- lastSizeMode == YGMeasureModeUndefined &&
3634
- (size >= lastComputedSize || YGFloatsEqual(size, lastComputedSize));
3635
- }
3636
-
3637
- static inline bool YGMeasureModeNewMeasureSizeIsStricterAndStillValid(
3638
- YGMeasureMode sizeMode,
3639
- float size,
3640
- YGMeasureMode lastSizeMode,
3641
- float lastSize,
3642
- float lastComputedSize) {
3643
- return lastSizeMode == YGMeasureModeAtMost &&
3644
- sizeMode == YGMeasureModeAtMost && !YGFloatIsUndefined(lastSize) &&
3645
- !YGFloatIsUndefined(size) && !YGFloatIsUndefined(lastComputedSize) &&
3646
- lastSize > size &&
3647
- (lastComputedSize <= size || YGFloatsEqual(size, lastComputedSize));
3648
- }
3649
-
3650
- YOGA_EXPORT float YGRoundValueToPixelGrid(
3651
- const float value,
3652
- const float pointScaleFactor,
3653
- const bool forceCeil,
3654
- const bool forceFloor) {
3655
- double scaledValue = ((double) value) * pointScaleFactor;
3656
- // We want to calculate `fractial` such that `floor(scaledValue) = scaledValue
3657
- // - fractial`.
3658
- float fractial = fmodf(scaledValue, 1.0f);
3659
- if (fractial < 0) {
3660
- // This branch is for handling negative numbers for `value`.
3661
- //
3662
- // Regarding `floor` and `ceil`. Note that for a number x, `floor(x) <= x <=
3663
- // ceil(x)` even for negative numbers. Here are a couple of examples:
3664
- // - x = 2.2: floor( 2.2) = 2, ceil( 2.2) = 3
3665
- // - x = -2.2: floor(-2.2) = -3, ceil(-2.2) = -2
3666
- //
3667
- // Regarding `fmodf`. For fractional negative numbers, `fmodf` returns a
3668
- // negative number. For example, `fmodf(-2.2) = -0.2`. However, we want
3669
- // `fractial` to be the number such that subtracting it from `value` will
3670
- // give us `floor(value)`. In the case of negative numbers, adding 1 to
3671
- // `fmodf(value)` gives us this. Let's continue the example from above:
3672
- // - fractial = fmodf(-2.2) = -0.2
3673
- // - Add 1 to the fraction: fractial2 = fractial + 1 = -0.2 + 1 = 0.8
3674
- // - Finding the `floor`: -2.2 - fractial2 = -2.2 - 0.8 = -3
3675
- ++fractial;
3676
- }
3677
- if (YGFloatsEqual(fractial, 0)) {
3678
- // First we check if the value is already rounded
3679
- scaledValue = scaledValue - fractial;
3680
- } else if (YGFloatsEqual(fractial, 1.0f)) {
3681
- scaledValue = scaledValue - fractial + 1.0f;
3682
- } else if (forceCeil) {
3683
- // Next we check if we need to use forced rounding
3684
- scaledValue = scaledValue - fractial + 1.0f;
3685
- } else if (forceFloor) {
3686
- scaledValue = scaledValue - fractial;
3687
- } else {
3688
- // Finally we just round the value
3689
- scaledValue = scaledValue - fractial +
3690
- (!YGFloatIsUndefined(fractial) &&
3691
- (fractial > 0.5f || YGFloatsEqual(fractial, 0.5f))
3692
- ? 1.0f
3693
- : 0.0f);
3694
- }
3695
- return (YGFloatIsUndefined(scaledValue) ||
3696
- YGFloatIsUndefined(pointScaleFactor))
3697
- ? YGUndefined
3698
- : scaledValue / pointScaleFactor;
3699
- }
3700
-
3701
- YOGA_EXPORT bool YGNodeCanUseCachedMeasurement(
3702
- const YGMeasureMode widthMode,
3703
- const float width,
3704
- const YGMeasureMode heightMode,
3705
- const float height,
3706
- const YGMeasureMode lastWidthMode,
3707
- const float lastWidth,
3708
- const YGMeasureMode lastHeightMode,
3709
- const float lastHeight,
3710
- const float lastComputedWidth,
3711
- const float lastComputedHeight,
3712
- const float marginRow,
3713
- const float marginColumn,
3714
- const YGConfigRef config) {
3715
- if ((!YGFloatIsUndefined(lastComputedHeight) && lastComputedHeight < 0) ||
3716
- (!YGFloatIsUndefined(lastComputedWidth) && lastComputedWidth < 0)) {
3717
- return false;
3718
- }
3719
- bool useRoundedComparison =
3720
- config != nullptr && config->pointScaleFactor != 0;
3721
- const float effectiveWidth = useRoundedComparison
3722
- ? YGRoundValueToPixelGrid(width, config->pointScaleFactor, false, false)
3723
- : width;
3724
- const float effectiveHeight = useRoundedComparison
3725
- ? YGRoundValueToPixelGrid(height, config->pointScaleFactor, false, false)
3726
- : height;
3727
- const float effectiveLastWidth = useRoundedComparison
3728
- ? YGRoundValueToPixelGrid(
3729
- lastWidth, config->pointScaleFactor, false, false)
3730
- : lastWidth;
3731
- const float effectiveLastHeight = useRoundedComparison
3732
- ? YGRoundValueToPixelGrid(
3733
- lastHeight, config->pointScaleFactor, false, false)
3734
- : lastHeight;
3735
-
3736
- const bool hasSameWidthSpec = lastWidthMode == widthMode &&
3737
- YGFloatsEqual(effectiveLastWidth, effectiveWidth);
3738
- const bool hasSameHeightSpec = lastHeightMode == heightMode &&
3739
- YGFloatsEqual(effectiveLastHeight, effectiveHeight);
3740
-
3741
- const bool widthIsCompatible =
3742
- hasSameWidthSpec ||
3743
- YGMeasureModeSizeIsExactAndMatchesOldMeasuredSize(
3744
- widthMode, width - marginRow, lastComputedWidth) ||
3745
- YGMeasureModeOldSizeIsUnspecifiedAndStillFits(
3746
- widthMode, width - marginRow, lastWidthMode, lastComputedWidth) ||
3747
- YGMeasureModeNewMeasureSizeIsStricterAndStillValid(
3748
- widthMode,
3749
- width - marginRow,
3750
- lastWidthMode,
3751
- lastWidth,
3752
- lastComputedWidth);
3753
-
3754
- const bool heightIsCompatible =
3755
- hasSameHeightSpec ||
3756
- YGMeasureModeSizeIsExactAndMatchesOldMeasuredSize(
3757
- heightMode, height - marginColumn, lastComputedHeight) ||
3758
- YGMeasureModeOldSizeIsUnspecifiedAndStillFits(
3759
- heightMode,
3760
- height - marginColumn,
3761
- lastHeightMode,
3762
- lastComputedHeight) ||
3763
- YGMeasureModeNewMeasureSizeIsStricterAndStillValid(
3764
- heightMode,
3765
- height - marginColumn,
3766
- lastHeightMode,
3767
- lastHeight,
3768
- lastComputedHeight);
3769
-
3770
- return widthIsCompatible && heightIsCompatible;
3771
- }
3772
-
3773
- //
3774
- // This is a wrapper around the YGNodelayoutImpl function. It determines whether
3775
- // the layout request is redundant and can be skipped.
3776
- //
3777
- // Parameters:
3778
- // Input parameters are the same as YGNodelayoutImpl (see above)
3779
- // Return parameter is true if layout was performed, false if skipped
3780
- //
3781
- bool YGLayoutNodeInternal(
3782
- const YGNodeRef node,
3783
- const float availableWidth,
3784
- const float availableHeight,
3785
- const YGDirection ownerDirection,
3786
- const YGMeasureMode widthMeasureMode,
3787
- const YGMeasureMode heightMeasureMode,
3788
- const float ownerWidth,
3789
- const float ownerHeight,
3790
- const bool performLayout,
3791
- const LayoutPassReason reason,
3792
- const YGConfigRef config,
3793
- LayoutData &layoutMarkerData,
3794
- void *const layoutContext,
3795
- uint32_t depth,
3796
- const uint32_t generationCount) {
3797
- YGLayout *layout = &node->getLayout();
3798
-
3799
- depth++;
3800
-
3801
- const bool needToVisitNode =
3802
- (node->isDirty() && layout->generationCount != generationCount) ||
3803
- layout->lastOwnerDirection != ownerDirection;
3804
-
3805
- if (needToVisitNode) {
3806
- // Invalidate the cached results.
3807
- layout->nextCachedMeasurementsIndex = 0;
3808
- layout->cachedLayout.widthMeasureMode = (YGMeasureMode)-1;
3809
- layout->cachedLayout.heightMeasureMode = (YGMeasureMode)-1;
3810
- layout->cachedLayout.computedWidth = -1;
3811
- layout->cachedLayout.computedHeight = -1;
3812
- }
3813
-
3814
- YGCachedMeasurement *cachedResults = nullptr;
3815
-
3816
- // Determine whether the results are already cached. We maintain a separate
3817
- // cache for layouts and measurements. A layout operation modifies the
3818
- // positions and dimensions for nodes in the subtree. The algorithm assumes
3819
- // that each node gets layed out a maximum of one time per tree layout, but
3820
- // multiple measurements may be required to resolve all of the flex
3821
- // dimensions. We handle nodes with measure functions specially here because
3822
- // they are the most expensive to measure, so it's worth avoiding redundant
3823
- // measurements if at all possible.
3824
- if (node->hasMeasureFunc()) {
3825
- const float marginAxisRow =
3826
- node->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap();
3827
- const float marginAxisColumn =
3828
- node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap();
3829
-
3830
- // First, try to use the layout cache.
3831
- if (YGNodeCanUseCachedMeasurement(
3832
- widthMeasureMode,
3833
- availableWidth,
3834
- heightMeasureMode,
3835
- availableHeight,
3836
- layout->cachedLayout.widthMeasureMode,
3837
- layout->cachedLayout.availableWidth,
3838
- layout->cachedLayout.heightMeasureMode,
3839
- layout->cachedLayout.availableHeight,
3840
- layout->cachedLayout.computedWidth,
3841
- layout->cachedLayout.computedHeight,
3842
- marginAxisRow,
3843
- marginAxisColumn,
3844
- config)) {
3845
- cachedResults = &layout->cachedLayout;
3846
- } else {
3847
- // Try to use the measurement cache.
3848
- for (uint32_t i = 0; i < layout->nextCachedMeasurementsIndex; i++) {
3849
- if (YGNodeCanUseCachedMeasurement(
3850
- widthMeasureMode,
3851
- availableWidth,
3852
- heightMeasureMode,
3853
- availableHeight,
3854
- layout->cachedMeasurements[i].widthMeasureMode,
3855
- layout->cachedMeasurements[i].availableWidth,
3856
- layout->cachedMeasurements[i].heightMeasureMode,
3857
- layout->cachedMeasurements[i].availableHeight,
3858
- layout->cachedMeasurements[i].computedWidth,
3859
- layout->cachedMeasurements[i].computedHeight,
3860
- marginAxisRow,
3861
- marginAxisColumn,
3862
- config)) {
3863
- cachedResults = &layout->cachedMeasurements[i];
3864
- break;
3865
- }
3866
- }
3867
- }
3868
- } else if (performLayout) {
3869
- if (YGFloatsEqual(layout->cachedLayout.availableWidth, availableWidth) &&
3870
- YGFloatsEqual(layout->cachedLayout.availableHeight, availableHeight) &&
3871
- layout->cachedLayout.widthMeasureMode == widthMeasureMode &&
3872
- layout->cachedLayout.heightMeasureMode == heightMeasureMode) {
3873
- cachedResults = &layout->cachedLayout;
3874
- }
3875
- } else {
3876
- for (uint32_t i = 0; i < layout->nextCachedMeasurementsIndex; i++) {
3877
- if (YGFloatsEqual(
3878
- layout->cachedMeasurements[i].availableWidth, availableWidth) &&
3879
- YGFloatsEqual(
3880
- layout->cachedMeasurements[i].availableHeight, availableHeight) &&
3881
- layout->cachedMeasurements[i].widthMeasureMode == widthMeasureMode &&
3882
- layout->cachedMeasurements[i].heightMeasureMode ==
3883
- heightMeasureMode) {
3884
- cachedResults = &layout->cachedMeasurements[i];
3885
- break;
3886
- }
3887
- }
3888
- }
3889
-
3890
- if (!needToVisitNode && cachedResults != nullptr) {
3891
- layout->measuredDimensions[YGDimensionWidth] = cachedResults->computedWidth;
3892
- layout->measuredDimensions[YGDimensionHeight] =
3893
- cachedResults->computedHeight;
3894
-
3895
- (performLayout ? layoutMarkerData.cachedLayouts
3896
- : layoutMarkerData.cachedMeasures) += 1;
3897
-
3898
- if (gPrintChanges && gPrintSkips) {
3899
- Log::log(
3900
- node,
3901
- YGLogLevelVerbose,
3902
- nullptr,
3903
- "%s%d.{[skipped] ",
3904
- YGSpacer(depth),
3905
- depth);
3906
- node->print(layoutContext);
3907
- Log::log(
3908
- node,
3909
- YGLogLevelVerbose,
3910
- nullptr,
3911
- "wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n",
3912
- YGMeasureModeName(widthMeasureMode, performLayout),
3913
- YGMeasureModeName(heightMeasureMode, performLayout),
3914
- availableWidth,
3915
- availableHeight,
3916
- cachedResults->computedWidth,
3917
- cachedResults->computedHeight,
3918
- LayoutPassReasonToString(reason));
3919
- }
3920
- } else {
3921
- if (gPrintChanges) {
3922
- Log::log(
3923
- node,
3924
- YGLogLevelVerbose,
3925
- nullptr,
3926
- "%s%d.{%s",
3927
- YGSpacer(depth),
3928
- depth,
3929
- needToVisitNode ? "*" : "");
3930
- node->print(layoutContext);
3931
- Log::log(
3932
- node,
3933
- YGLogLevelVerbose,
3934
- nullptr,
3935
- "wm: %s, hm: %s, aw: %f ah: %f %s\n",
3936
- YGMeasureModeName(widthMeasureMode, performLayout),
3937
- YGMeasureModeName(heightMeasureMode, performLayout),
3938
- availableWidth,
3939
- availableHeight,
3940
- LayoutPassReasonToString(reason));
3941
- }
3942
-
3943
- YGNodelayoutImpl(
3944
- node,
3945
- availableWidth,
3946
- availableHeight,
3947
- ownerDirection,
3948
- widthMeasureMode,
3949
- heightMeasureMode,
3950
- ownerWidth,
3951
- ownerHeight,
3952
- performLayout,
3953
- config,
3954
- layoutMarkerData,
3955
- layoutContext,
3956
- depth,
3957
- generationCount,
3958
- reason);
3959
-
3960
- if (gPrintChanges) {
3961
- Log::log(
3962
- node,
3963
- YGLogLevelVerbose,
3964
- nullptr,
3965
- "%s%d.}%s",
3966
- YGSpacer(depth),
3967
- depth,
3968
- needToVisitNode ? "*" : "");
3969
- node->print(layoutContext);
3970
- Log::log(
3971
- node,
3972
- YGLogLevelVerbose,
3973
- nullptr,
3974
- "wm: %s, hm: %s, d: (%f, %f) %s\n",
3975
- YGMeasureModeName(widthMeasureMode, performLayout),
3976
- YGMeasureModeName(heightMeasureMode, performLayout),
3977
- layout->measuredDimensions[YGDimensionWidth],
3978
- layout->measuredDimensions[YGDimensionHeight],
3979
- LayoutPassReasonToString(reason));
3980
- }
3981
-
3982
- layout->lastOwnerDirection = ownerDirection;
3983
-
3984
- if (cachedResults == nullptr) {
3985
- if (layout->nextCachedMeasurementsIndex + 1 >
3986
- (uint32_t)layoutMarkerData.maxMeasureCache) {
3987
- layoutMarkerData.maxMeasureCache =
3988
- layout->nextCachedMeasurementsIndex + 1;
3989
- }
3990
- if (layout->nextCachedMeasurementsIndex == YG_MAX_CACHED_RESULT_COUNT) {
3991
- if (gPrintChanges) {
3992
- Log::log(node, YGLogLevelVerbose, nullptr, "Out of cache entries!\n");
3993
- }
3994
- layout->nextCachedMeasurementsIndex = 0;
3995
- }
3996
-
3997
- YGCachedMeasurement *newCacheEntry;
3998
- if (performLayout) {
3999
- // Use the single layout cache entry.
4000
- newCacheEntry = &layout->cachedLayout;
4001
- } else {
4002
- // Allocate a new measurement cache entry.
4003
- newCacheEntry =
4004
- &layout->cachedMeasurements[layout->nextCachedMeasurementsIndex];
4005
- layout->nextCachedMeasurementsIndex++;
4006
- }
4007
-
4008
- newCacheEntry->availableWidth = availableWidth;
4009
- newCacheEntry->availableHeight = availableHeight;
4010
- newCacheEntry->widthMeasureMode = widthMeasureMode;
4011
- newCacheEntry->heightMeasureMode = heightMeasureMode;
4012
- newCacheEntry->computedWidth =
4013
- layout->measuredDimensions[YGDimensionWidth];
4014
- newCacheEntry->computedHeight =
4015
- layout->measuredDimensions[YGDimensionHeight];
4016
- }
4017
- }
4018
-
4019
- if (performLayout) {
4020
- node->setLayoutDimension(
4021
- node->getLayout().measuredDimensions[YGDimensionWidth],
4022
- YGDimensionWidth);
4023
- node->setLayoutDimension(
4024
- node->getLayout().measuredDimensions[YGDimensionHeight],
4025
- YGDimensionHeight);
4026
-
4027
- node->setHasNewLayout(true);
4028
- node->setDirty(false);
4029
- }
4030
-
4031
- layout->generationCount = generationCount;
4032
-
4033
- LayoutType layoutType;
4034
- if (performLayout) {
4035
- layoutType = !needToVisitNode && cachedResults == &layout->cachedLayout
4036
- ? LayoutType::kCachedLayout
4037
- : LayoutType::kLayout;
4038
- } else {
4039
- layoutType = cachedResults != nullptr ? LayoutType::kCachedMeasure
4040
- : LayoutType::kMeasure;
4041
- }
4042
- Event::publish<Event::NodeLayout>(node, {layoutType, layoutContext});
4043
-
4044
- return (needToVisitNode || cachedResults == nullptr);
4045
- }
4046
-
4047
- YOGA_EXPORT void YGConfigSetPointScaleFactor(
4048
- const YGConfigRef config,
4049
- const float pixelsInPoint) {
4050
- YGAssertWithConfig(
4051
- config,
4052
- pixelsInPoint >= 0.0f,
4053
- "Scale factor should not be less than zero");
4054
-
4055
- // We store points for Pixel as we will use it for rounding
4056
- if (pixelsInPoint == 0.0f) {
4057
- // Zero is used to skip rounding
4058
- config->pointScaleFactor = 0.0f;
4059
- } else {
4060
- config->pointScaleFactor = pixelsInPoint;
4061
- }
4062
- }
4063
-
4064
- static void YGRoundToPixelGrid(
4065
- const YGNodeRef node,
4066
- const float pointScaleFactor,
4067
- const float absoluteLeft,
4068
- const float absoluteTop) {
4069
- if (pointScaleFactor == 0.0f) {
4070
- return;
4071
- }
4072
-
4073
- const float nodeLeft = node->getLayout().position[YGEdgeLeft];
4074
- const float nodeTop = node->getLayout().position[YGEdgeTop];
4075
-
4076
- const float nodeWidth = node->getLayout().dimensions[YGDimensionWidth];
4077
- const float nodeHeight = node->getLayout().dimensions[YGDimensionHeight];
4078
-
4079
- const float absoluteNodeLeft = absoluteLeft + nodeLeft;
4080
- const float absoluteNodeTop = absoluteTop + nodeTop;
4081
-
4082
- const float absoluteNodeRight = absoluteNodeLeft + nodeWidth;
4083
- const float absoluteNodeBottom = absoluteNodeTop + nodeHeight;
4084
-
4085
- // If a node has a custom measure function we never want to round down its
4086
- // size as this could lead to unwanted text truncation.
4087
- const bool textRounding = node->getNodeType() == YGNodeTypeText;
4088
-
4089
- node->setLayoutPosition(
4090
- YGRoundValueToPixelGrid(nodeLeft, pointScaleFactor, false, textRounding),
4091
- YGEdgeLeft);
4092
-
4093
- node->setLayoutPosition(
4094
- YGRoundValueToPixelGrid(nodeTop, pointScaleFactor, false, textRounding),
4095
- YGEdgeTop);
4096
-
4097
- // We multiply dimension by scale factor and if the result is close to the
4098
- // whole number, we don't have any fraction To verify if the result is close
4099
- // to whole number we want to check both floor and ceil numbers
4100
- const bool hasFractionalWidth =
4101
- !YGFloatsEqual(fmodf(nodeWidth * pointScaleFactor, 1.0), 0) &&
4102
- !YGFloatsEqual(fmodf(nodeWidth * pointScaleFactor, 1.0), 1.0);
4103
- const bool hasFractionalHeight =
4104
- !YGFloatsEqual(fmodf(nodeHeight * pointScaleFactor, 1.0), 0) &&
4105
- !YGFloatsEqual(fmodf(nodeHeight * pointScaleFactor, 1.0), 1.0);
4106
-
4107
- node->setLayoutDimension(
4108
- YGRoundValueToPixelGrid(
4109
- absoluteNodeRight,
4110
- pointScaleFactor,
4111
- (textRounding && hasFractionalWidth),
4112
- (textRounding && !hasFractionalWidth)) -
4113
- YGRoundValueToPixelGrid(
4114
- absoluteNodeLeft, pointScaleFactor, false, textRounding),
4115
- YGDimensionWidth);
4116
-
4117
- node->setLayoutDimension(
4118
- YGRoundValueToPixelGrid(
4119
- absoluteNodeBottom,
4120
- pointScaleFactor,
4121
- (textRounding && hasFractionalHeight),
4122
- (textRounding && !hasFractionalHeight)) -
4123
- YGRoundValueToPixelGrid(
4124
- absoluteNodeTop, pointScaleFactor, false, textRounding),
4125
- YGDimensionHeight);
4126
-
4127
- const uint32_t childCount = YGNodeGetChildCount(node);
4128
- for (uint32_t i = 0; i < childCount; i++) {
4129
- YGRoundToPixelGrid(
4130
- YGNodeGetChild(node, i),
4131
- pointScaleFactor,
4132
- absoluteNodeLeft,
4133
- absoluteNodeTop);
4134
- }
4135
- }
4136
-
4137
- static void unsetUseLegacyFlagRecursively(YGNodeRef node) {
4138
- node->getConfig()->useLegacyStretchBehaviour = false;
4139
- for (auto child : node->getChildren()) {
4140
- unsetUseLegacyFlagRecursively(child);
4141
- }
4142
- }
4143
-
4144
- YOGA_EXPORT void YGNodeCalculateLayoutWithContext(
4145
- const YGNodeRef node,
4146
- const float ownerWidth,
4147
- const float ownerHeight,
4148
- const YGDirection ownerDirection,
4149
- void *layoutContext) {
4150
- Event::publish<Event::LayoutPassStart>(node, {layoutContext});
4151
- LayoutData markerData = {};
4152
-
4153
- // Increment the generation count. This will force the recursive routine to
4154
- // visit all dirty nodes at least once. Subsequent visits will be skipped if
4155
- // the input parameters don't change.
4156
- gCurrentGenerationCount.fetch_add(1, std::memory_order_relaxed);
4157
- node->resolveDimension();
4158
- float width = YGUndefined;
4159
- YGMeasureMode widthMeasureMode = YGMeasureModeUndefined;
4160
- const auto &maxDimensions = node->getStyle().maxDimensions();
4161
- if (YGNodeIsStyleDimDefined(node, YGFlexDirectionRow, ownerWidth)) {
4162
- width =
4163
- (YGResolveValue(
4164
- node->getResolvedDimension(dim[YGFlexDirectionRow]), ownerWidth) +
4165
- node->getMarginForAxis(YGFlexDirectionRow, ownerWidth))
4166
- .unwrap();
4167
- widthMeasureMode = YGMeasureModeExactly;
4168
- } else if (!YGResolveValue(maxDimensions[YGDimensionWidth], ownerWidth)
4169
- .isUndefined()) {
4170
- width =
4171
- YGResolveValue(maxDimensions[YGDimensionWidth], ownerWidth).unwrap();
4172
- widthMeasureMode = YGMeasureModeAtMost;
4173
- } else {
4174
- width = ownerWidth;
4175
- widthMeasureMode = YGFloatIsUndefined(width) ? YGMeasureModeUndefined
4176
- : YGMeasureModeExactly;
4177
- }
4178
-
4179
- float height = YGUndefined;
4180
- YGMeasureMode heightMeasureMode = YGMeasureModeUndefined;
4181
- if (YGNodeIsStyleDimDefined(node, YGFlexDirectionColumn, ownerHeight)) {
4182
- height = (YGResolveValue(
4183
- node->getResolvedDimension(dim[YGFlexDirectionColumn]),
4184
- ownerHeight) +
4185
- node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth))
4186
- .unwrap();
4187
- heightMeasureMode = YGMeasureModeExactly;
4188
- } else if (!YGResolveValue(maxDimensions[YGDimensionHeight], ownerHeight)
4189
- .isUndefined()) {
4190
- height =
4191
- YGResolveValue(maxDimensions[YGDimensionHeight], ownerHeight).unwrap();
4192
- heightMeasureMode = YGMeasureModeAtMost;
4193
- } else {
4194
- height = ownerHeight;
4195
- heightMeasureMode = YGFloatIsUndefined(height) ? YGMeasureModeUndefined
4196
- : YGMeasureModeExactly;
4197
- }
4198
- if (YGLayoutNodeInternal(
4199
- node,
4200
- width,
4201
- height,
4202
- ownerDirection,
4203
- widthMeasureMode,
4204
- heightMeasureMode,
4205
- ownerWidth,
4206
- ownerHeight,
4207
- true,
4208
- LayoutPassReason::kInitial,
4209
- node->getConfig(),
4210
- markerData,
4211
- layoutContext,
4212
- 0, // tree root
4213
- gCurrentGenerationCount.load(std::memory_order_relaxed))) {
4214
- node->setPosition(
4215
- node->getLayout().direction(), ownerWidth, ownerHeight, ownerWidth);
4216
- YGRoundToPixelGrid(node, node->getConfig()->pointScaleFactor, 0.0f, 0.0f);
4217
-
4218
- #ifdef DEBUG
4219
- if (node->getConfig()->printTree) {
4220
- YGNodePrint(
4221
- node,
4222
- (YGPrintOptions)(
4223
- YGPrintOptionsLayout | YGPrintOptionsChildren |
4224
- YGPrintOptionsStyle));
4225
- }
4226
- #endif
4227
- }
4228
-
4229
- Event::publish<Event::LayoutPassEnd>(node, {layoutContext, &markerData});
4230
-
4231
- // We want to get rid off `useLegacyStretchBehaviour` from YGConfig. But we
4232
- // aren't sure whether client's of yoga have gotten rid off this flag or not.
4233
- // So logging this in YGLayout would help to find out the call sites depending
4234
- // on this flag. This check would be removed once we are sure no one is
4235
- // dependent on this flag anymore. The flag
4236
- // `shouldDiffLayoutWithoutLegacyStretchBehaviour` in YGConfig will help to
4237
- // run experiments.
4238
- if (node->getConfig()->shouldDiffLayoutWithoutLegacyStretchBehaviour &&
4239
- node->didUseLegacyFlag()) {
4240
- const YGNodeRef nodeWithoutLegacyFlag = YGNodeDeepClone(node);
4241
- nodeWithoutLegacyFlag->resolveDimension();
4242
- // Recursively mark nodes as dirty
4243
- nodeWithoutLegacyFlag->markDirtyAndPropogateDownwards();
4244
- gCurrentGenerationCount.fetch_add(1, std::memory_order_relaxed);
4245
- // Rerun the layout, and calculate the diff
4246
- unsetUseLegacyFlagRecursively(nodeWithoutLegacyFlag);
4247
- LayoutData layoutMarkerData = {};
4248
- if (YGLayoutNodeInternal(
4249
- nodeWithoutLegacyFlag,
4250
- width,
4251
- height,
4252
- ownerDirection,
4253
- widthMeasureMode,
4254
- heightMeasureMode,
4255
- ownerWidth,
4256
- ownerHeight,
4257
- true,
4258
- LayoutPassReason::kInitial,
4259
- nodeWithoutLegacyFlag->getConfig(),
4260
- layoutMarkerData,
4261
- layoutContext,
4262
- 0, // tree root
4263
- gCurrentGenerationCount.load(std::memory_order_relaxed))) {
4264
- nodeWithoutLegacyFlag->setPosition(
4265
- nodeWithoutLegacyFlag->getLayout().direction(),
4266
- ownerWidth,
4267
- ownerHeight,
4268
- ownerWidth);
4269
- YGRoundToPixelGrid(
4270
- nodeWithoutLegacyFlag,
4271
- nodeWithoutLegacyFlag->getConfig()->pointScaleFactor,
4272
- 0.0f,
4273
- 0.0f);
4274
-
4275
- // Set whether the two layouts are different or not.
4276
- auto neededLegacyStretchBehaviour =
4277
- !nodeWithoutLegacyFlag->isLayoutTreeEqualToNode(*node);
4278
- node->setLayoutDoesLegacyFlagAffectsLayout(neededLegacyStretchBehaviour);
4279
-
4280
- #ifdef DEBUG
4281
- if (nodeWithoutLegacyFlag->getConfig()->printTree) {
4282
- YGNodePrint(
4283
- nodeWithoutLegacyFlag,
4284
- (YGPrintOptions)(
4285
- YGPrintOptionsLayout | YGPrintOptionsChildren |
4286
- YGPrintOptionsStyle));
4287
- }
4288
- #endif
4289
- }
4290
- YGConfigFreeRecursive(nodeWithoutLegacyFlag);
4291
- YGNodeFreeRecursive(nodeWithoutLegacyFlag);
4292
- }
4293
- }
4294
-
4295
- YOGA_EXPORT void YGNodeCalculateLayout(
4296
- const YGNodeRef node,
4297
- const float ownerWidth,
4298
- const float ownerHeight,
4299
- const YGDirection ownerDirection) {
4300
- YGNodeCalculateLayoutWithContext(
4301
- node, ownerWidth, ownerHeight, ownerDirection, nullptr);
4302
- }
4303
-
4304
- YOGA_EXPORT void YGConfigSetLogger(const YGConfigRef config, YGLogger logger) {
4305
- if (logger != nullptr) {
4306
- config->setLogger(logger);
4307
- } else {
4308
- #ifdef ANDROID
4309
- config->setLogger(&YGAndroidLog);
4310
- #else
4311
- config->setLogger(&YGDefaultLog);
4312
- #endif
4313
- }
4314
- }
4315
-
4316
- YOGA_EXPORT void YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
4317
- const YGConfigRef config,
4318
- const bool shouldDiffLayout) {
4319
- config->shouldDiffLayoutWithoutLegacyStretchBehaviour = shouldDiffLayout;
4320
- }
4321
-
4322
- void YGAssert(const bool condition, const char *message) {
4323
- if (!condition) {
4324
- Log::log(YGNodeRef{nullptr}, YGLogLevelFatal, nullptr, "%s\n", message);
4325
- }
4326
- }
4327
-
4328
- void YGAssertWithNode(
4329
- const YGNodeRef node,
4330
- const bool condition,
4331
- const char *message) {
4332
- if (!condition) {
4333
- Log::log(node, YGLogLevelFatal, nullptr, "%s\n", message);
4334
- }
4335
- }
4336
-
4337
- void YGAssertWithConfig(
4338
- const YGConfigRef config,
4339
- const bool condition,
4340
- const char *message) {
4341
- if (!condition) {
4342
- Log::log(config, YGLogLevelFatal, nullptr, "%s\n", message);
4343
- }
4344
- }
4345
-
4346
- YOGA_EXPORT void YGConfigSetExperimentalFeatureEnabled(
4347
- const YGConfigRef config,
4348
- const YGExperimentalFeature feature,
4349
- const bool enabled) {
4350
- config->experimentalFeatures[feature] = enabled;
4351
- }
4352
-
4353
- inline bool YGConfigIsExperimentalFeatureEnabled(
4354
- const YGConfigRef config,
4355
- const YGExperimentalFeature feature) {
4356
- return config->experimentalFeatures[feature];
4357
- }
4358
-
4359
- YOGA_EXPORT void YGConfigSetUseWebDefaults(
4360
- const YGConfigRef config,
4361
- const bool enabled) {
4362
- config->useWebDefaults = enabled;
4363
- }
4364
-
4365
- YOGA_EXPORT void YGConfigSetUseLegacyStretchBehaviour(
4366
- const YGConfigRef config,
4367
- const bool useLegacyStretchBehaviour) {
4368
- config->useLegacyStretchBehaviour = useLegacyStretchBehaviour;
4369
- }
4370
-
4371
- bool YGConfigGetUseWebDefaults(const YGConfigRef config) {
4372
- return config->useWebDefaults;
4373
- }
4374
-
4375
- YOGA_EXPORT void YGConfigSetContext(const YGConfigRef config, void* context) {
4376
- config->context = context;
4377
- }
4378
-
4379
- YOGA_EXPORT void* YGConfigGetContext(const YGConfigRef config) {
4380
- return config->context;
4381
- }
4382
-
4383
- YOGA_EXPORT void YGConfigSetCloneNodeFunc(
4384
- const YGConfigRef config,
4385
- const YGCloneNodeFunc callback) {
4386
- config->setCloneNodeCallback(callback);
4387
- }
4388
-
4389
- static void YGTraverseChildrenPreOrder(
4390
- const YGVector &children,
4391
- const std::function<void(YGNodeRef node)> &f) {
4392
- for (YGNodeRef node : children) {
4393
- f(node);
4394
- YGTraverseChildrenPreOrder(node->getChildren(), f);
4395
- }
4396
- }
4397
-
4398
- void YGTraversePreOrder(
4399
- YGNodeRef const node,
4400
- std::function<void(YGNodeRef node)> &&f) {
4401
- if (!node) {
4402
- return;
4403
- }
4404
- f(node);
4405
- YGTraverseChildrenPreOrder(node->getChildren(), f);
4406
- }