react-native-windows 0.69.6 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/.flowconfig +5 -1
  2. package/Chakra/ChakraHelpers.cpp +1 -1
  3. package/Chakra/ChakraPlatform.cpp +1 -1
  4. package/Chakra/ChakraValue.cpp +6 -3
  5. package/Chakra/ChakraValue.h +1 -1
  6. package/Directory.Build.props +7 -7
  7. package/Folly/Folly.vcxproj +20 -13
  8. package/Folly/cgmanifest.json +14 -0
  9. package/Libraries/Alert/Alert.js +18 -4
  10. package/Libraries/Alert/Alert.windows.js +4 -0
  11. package/Libraries/Alert/NativeAlertManager.js +1 -0
  12. package/Libraries/Animated/Animated.js +2 -2
  13. package/Libraries/Animated/AnimatedEvent.js +7 -4
  14. package/Libraries/Animated/AnimatedImplementation.js +17 -3
  15. package/Libraries/Animated/AnimatedMock.js +7 -2
  16. package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
  17. package/Libraries/Animated/NativeAnimatedModule.js +3 -0
  18. package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
  19. package/Libraries/Animated/animations/SpringAnimation.js +3 -3
  20. package/Libraries/Animated/animations/TimingAnimation.js +3 -3
  21. package/Libraries/Animated/createAnimatedComponent.js +8 -1
  22. package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
  23. package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
  24. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
  25. package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
  26. package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
  27. package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
  28. package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
  29. package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
  30. package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
  31. package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
  32. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
  33. package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
  34. package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
  35. package/Libraries/Animated/useAnimatedProps.js +1 -0
  36. package/Libraries/AppState/AppState.js +0 -32
  37. package/Libraries/AppTheme/AppTheme.js +14 -8
  38. package/Libraries/AppTheme/AppThemeTypes.d.ts +0 -3
  39. package/Libraries/BatchedBridge/MessageQueue.js +21 -15
  40. package/Libraries/BatchedBridge/NativeModules.js +3 -4
  41. package/Libraries/Blob/FileReader.js +0 -6
  42. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
  43. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +0 -20
  44. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  45. package/Libraries/Components/Keyboard/Keyboard.js +0 -11
  46. package/Libraries/Components/Pressable/Pressable.js +2 -0
  47. package/Libraries/Components/Pressable/Pressable.windows.js +2 -0
  48. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
  49. package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
  50. package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +4 -30
  51. package/Libraries/Components/ScrollView/ScrollView.js +13 -11
  52. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
  53. package/Libraries/Components/StatusBar/StatusBar.js +10 -7
  54. package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
  55. package/Libraries/Components/TextInput/TextInput.js +12 -2
  56. package/Libraries/Components/TextInput/TextInput.windows.js +12 -2
  57. package/Libraries/Components/Touchable/PooledClass.js +16 -4
  58. package/Libraries/Components/Touchable/Touchable.js +50 -1
  59. package/Libraries/Components/Touchable/Touchable.windows.js +972 -0
  60. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
  61. package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
  62. package/Libraries/Components/View/ViewPropTypes.js +3 -8
  63. package/Libraries/Components/View/ViewPropTypes.windows.js +3 -8
  64. package/Libraries/Core/ExceptionsManager.js +2 -0
  65. package/Libraries/Core/ReactNativeVersion.js +1 -1
  66. package/Libraries/Core/Timers/JSTimers.js +2 -2
  67. package/Libraries/Core/polyfillPromise.js +0 -32
  68. package/Libraries/Core/setUpBatchedBridge.js +5 -1
  69. package/Libraries/Core/setUpPerformance.js +1 -1
  70. package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
  71. package/Libraries/Image/AssetSourceResolver.js +2 -2
  72. package/Libraries/Image/Image.android.js +5 -3
  73. package/Libraries/Image/Image.ios.js +6 -3
  74. package/Libraries/Image/Image.windows.js +6 -3
  75. package/Libraries/Image/ImageSource.js +7 -5
  76. package/Libraries/Inspector/ElementBox.js +2 -2
  77. package/Libraries/Inspector/NetworkOverlay.js +13 -8
  78. package/Libraries/Interaction/PanResponder.js +16 -14
  79. package/Libraries/Linking/Linking.js +0 -11
  80. package/Libraries/Lists/FlatList.js +3 -2
  81. package/Libraries/Lists/SectionList.js +2 -0
  82. package/Libraries/Lists/ViewabilityHelper.js +7 -3
  83. package/Libraries/Lists/VirtualizeUtils.js +33 -20
  84. package/Libraries/Lists/VirtualizedList.js +93 -47
  85. package/Libraries/Lists/VirtualizedListContext.js +1 -0
  86. package/Libraries/Lists/VirtualizedSectionList.js +14 -9
  87. package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
  88. package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
  89. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  90. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  91. package/Libraries/LogBox/LogBox.js +3 -1
  92. package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
  93. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
  94. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
  95. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
  96. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
  97. package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
  98. package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -12
  99. package/Libraries/Network/XMLHttpRequest.js +9 -11
  100. package/Libraries/Performance/PureComponentDebug.js +1 -0
  101. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
  102. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
  103. package/Libraries/Pressability/Pressability.js +26 -16
  104. package/Libraries/Pressability/Pressability.windows.js +30 -17
  105. package/Libraries/Promise.js +0 -1
  106. package/Libraries/ReactNative/AppRegistry.js +16 -13
  107. package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
  108. package/Libraries/ReactNative/PaperUIManager.js +9 -9
  109. package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
  110. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
  111. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  112. package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
  113. package/Libraries/ReactNative/renderApplication.js +1 -1
  114. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
  115. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
  116. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
  117. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
  118. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
  119. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
  120. package/Libraries/Storage/AsyncStorage.js +7 -1
  121. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
  122. package/Libraries/StyleSheet/flattenStyle.js +1 -1
  123. package/Libraries/StyleSheet/processTransform.js +2 -0
  124. package/Libraries/StyleSheet/processTransform.windows.js +2 -0
  125. package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
  126. package/Libraries/Text/Text.js +15 -7
  127. package/Libraries/Text/Text.windows.js +14 -7
  128. package/Libraries/Types/CoreEventTypes.js +137 -11
  129. package/Libraries/Types/CoreEventTypes.windows.js +147 -22
  130. package/Libraries/Utilities/Dimensions.js +0 -13
  131. package/Libraries/Utilities/HMRClient.js +3 -3
  132. package/Libraries/Utilities/Platform.ios.js +0 -7
  133. package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
  134. package/Libraries/Utilities/codegenNativeCommands.js +11 -2
  135. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
  136. package/Libraries/Utilities/stringifySafe.js +3 -1
  137. package/Libraries/Utilities/truncate.js +1 -1
  138. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
  139. package/Libraries/Vibration/Vibration.js +1 -1
  140. package/Libraries/WebSocket/WebSocket.js +1 -0
  141. package/Libraries/vendor/emitter/EventEmitter.js +105 -12
  142. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
  143. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +24 -12
  144. package/Microsoft.ReactNative/CoreApp.cpp +303 -0
  145. package/Microsoft.ReactNative/CoreAppPage.cpp +21 -0
  146. package/Microsoft.ReactNative/CoreAppPage.h +15 -0
  147. package/Microsoft.ReactNative/CoreAppPage.idl +12 -0
  148. package/Microsoft.ReactNative/CoreAppPage.xaml +14 -0
  149. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.cpp +1 -2
  150. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.h +1 -1
  151. package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
  152. package/Microsoft.ReactNative/Fabric/ImageComponentView.cpp +1 -1
  153. package/Microsoft.ReactNative/Fabric/ImageComponentView.h +1 -1
  154. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.cpp +1 -1
  155. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.h +1 -1
  156. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.cpp +1 -1
  157. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.h +1 -1
  158. package/Microsoft.ReactNative/Fabric/SliderComponentView.cpp +1 -1
  159. package/Microsoft.ReactNative/Fabric/SliderComponentView.h +1 -1
  160. package/Microsoft.ReactNative/Fabric/SwitchComponentView.cpp +1 -1
  161. package/Microsoft.ReactNative/Fabric/SwitchComponentView.h +1 -1
  162. package/Microsoft.ReactNative/Fabric/TextComponentView.cpp +1 -1
  163. package/Microsoft.ReactNative/Fabric/TextComponentView.h +1 -1
  164. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.cpp +1 -1
  165. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.h +1 -1
  166. package/Microsoft.ReactNative/Fabric/ViewComponentView.cpp +1 -1
  167. package/Microsoft.ReactNative/Fabric/ViewComponentView.h +1 -1
  168. package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -0
  169. package/Microsoft.ReactNative/IReactDispatcher.cpp +18 -0
  170. package/Microsoft.ReactNative/IReactDispatcher.h +18 -3
  171. package/Microsoft.ReactNative/IReactDispatcher.idl +15 -0
  172. package/Microsoft.ReactNative/IReactPropertyBag.cpp +9 -0
  173. package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
  174. package/Microsoft.ReactNative/IReactPropertyBag.idl +3 -0
  175. package/Microsoft.ReactNative/JSDispatcherWriter.cpp +60 -22
  176. package/Microsoft.ReactNative/JSDispatcherWriter.h +5 -3
  177. package/Microsoft.ReactNative/JsiApi.cpp +41 -1
  178. package/Microsoft.ReactNative/JsiApi.h +3 -0
  179. package/Microsoft.ReactNative/JsiApi.idl +19 -1
  180. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +18 -2
  181. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +7 -7
  182. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +1 -1
  183. package/Microsoft.ReactNative/Modules/AlertModule.cpp +15 -12
  184. package/Microsoft.ReactNative/Modules/AlertModule.h +1 -1
  185. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +45 -9
  186. package/Microsoft.ReactNative/Modules/AppStateModule.h +9 -3
  187. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +1 -1
  188. package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
  189. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  190. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
  191. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
  192. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  193. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +1 -1
  194. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  195. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
  196. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +66 -39
  197. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +41 -11
  198. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +1 -1
  199. package/Microsoft.ReactNative/QuirkSettings.cpp +22 -0
  200. package/Microsoft.ReactNative/QuirkSettings.h +10 -0
  201. package/Microsoft.ReactNative/QuirkSettings.idl +7 -0
  202. package/Microsoft.ReactNative/ReactApplication.cpp +44 -0
  203. package/Microsoft.ReactNative/ReactApplication.h +40 -5
  204. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +5 -2
  205. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +1 -0
  206. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +24 -4
  207. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
  208. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +12 -2
  209. package/Microsoft.ReactNative/TurboModulesProvider.cpp +146 -84
  210. package/Microsoft.ReactNative/TurboModulesProvider.h +5 -0
  211. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +1 -0
  212. package/Microsoft.ReactNative/Utils/Helpers.cpp +1 -1
  213. package/Microsoft.ReactNative/Utils/Helpers.h +1 -1
  214. package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
  215. package/Microsoft.ReactNative/Utils/TransformableText.h +1 -1
  216. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -1
  217. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +9 -7
  218. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +3 -3
  219. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +13 -1
  220. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +1 -1
  221. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +63 -13
  222. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
  223. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +5 -6
  224. package/Microsoft.ReactNative/Views/Image/ReactImage.h +4 -4
  225. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +1 -1
  226. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +21 -2
  227. package/Microsoft.ReactNative/Views/TextViewManager.cpp +6 -3
  228. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
  229. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +7 -1
  230. package/Microsoft.ReactNative/Views/ViewPanel.cpp +4 -0
  231. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +8 -3
  232. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +2 -0
  233. package/Microsoft.ReactNative/microsoft.reactnative.def +4 -1
  234. package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
  235. package/Microsoft.ReactNative.Cxx/CoreApp.h +60 -0
  236. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +65 -0
  237. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +13 -0
  238. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
  239. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
  240. package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
  241. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +14 -2
  242. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +4 -0
  243. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +10 -0
  244. package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
  245. package/Mso/dispatchQueue/dispatchQueue.h +12 -4
  246. package/Mso/src/dispatchQueue/looperScheduler.cpp +36 -9
  247. package/Mso/src/dispatchQueue/queueService.cpp +2 -2
  248. package/Mso/src/dispatchQueue/queueService.h +2 -2
  249. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +6 -1
  250. package/Mso/src/memoryApi/memoryApi.cpp +3 -0
  251. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  252. package/PropertySheets/JSEngine.props +1 -1
  253. package/PropertySheets/Release.props +6 -0
  254. package/ReactCommon/ReactCommon.vcxproj +11 -21
  255. package/ReactCommon/ReactCommon.vcxproj.filters +64 -46
  256. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +145 -0
  257. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +344 -0
  258. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseTextProps.cpp +313 -0
  259. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +455 -0
  260. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ConcreteComponentDescriptor.h +216 -0
  261. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/PropsMacros.h +91 -0
  262. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/RectangleEdges.h +100 -0
  263. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/CompactValue.h +3 -1
  264. package/Scripts/Microsoft.ReactNative.nuspec +6 -0
  265. package/Scripts/Microsoft.ReactNative.targets +7 -0
  266. package/Shared/DevSettings.h +4 -0
  267. package/Shared/InstanceManager.cpp +29 -0
  268. package/Shared/InstanceManager.h +14 -0
  269. package/Shared/JSI/ChakraRuntime.cpp +11 -2
  270. package/Shared/JSI/ChakraRuntime.h +2 -0
  271. package/Shared/Modules/BlobModule.cpp +4 -4
  272. package/Shared/Modules/BlobModule.h +1 -1
  273. package/Shared/Modules/FileReaderModule.cpp +3 -2
  274. package/Shared/Modules/IBlobPersistor.h +1 -1
  275. package/Shared/Networking/IHttpResource.h +1 -0
  276. package/Shared/Networking/OriginPolicyHttpFilter.cpp +16 -10
  277. package/Shared/Networking/WinRTHttpResource.cpp +34 -2
  278. package/Shared/OInstance.cpp +29 -6
  279. package/Shared/OInstance.h +4 -13
  280. package/Shared/Threading/BatchingQueueThread.cpp +23 -12
  281. package/Shared/Utils.cpp +2 -5
  282. package/codegen/NativeAlertManagerSpec.g.h +2 -0
  283. package/codegen/NativeAnimatedModuleSpec.g.h +6 -0
  284. package/codegen/NativeAnimatedTurboModuleSpec.g.h +6 -0
  285. package/codegen/react/components/rnwcore/Props.cpp +2 -2
  286. package/codegen/react/components/rnwcore/Props.h +1 -1
  287. package/fmt/cgmanifest.json +14 -0
  288. package/fmt/fmt.vcxproj +25 -11
  289. package/jest/assetFileTransformer.js +3 -2
  290. package/jest/setup.js +4 -0
  291. package/package.json +25 -26
  292. package/rntypes/index.d.ts +0 -1
  293. package/template/cs-app-WinAppSDK/proj/{NuGet.Config → NuGet_Config} +0 -0
  294. package/template/metro.devMode.config.js +49 -2
  295. package/template/shared-app/proj/{NuGet.Config → NuGet_Config} +0 -0
  296. package/template/shared-lib/proj/{NuGet.Config → NuGet_Config} +0 -0
  297. package/Libraries/vendor/emitter/EventSubscription.js +0 -19
  298. package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
  299. package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
  300. package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
  301. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
  302. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +0 -87
  303. package/Scripts/copyRNLibraries.js +0 -99
  304. package/jest/preprocessor.js +0 -40
  305. package/jest/preprocessor_DO_NOT_USE.js +0 -122
@@ -20,7 +20,10 @@ import type {
20
20
  } from './NativeAnimatedModule';
21
21
  import type {AnimationConfig, EndCallback} from './animations/Animation';
22
22
  import type {InterpolationConfigType} from './nodes/AnimatedInterpolation';
23
+ import ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags';
23
24
  import invariant from 'invariant';
25
+ import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
26
+ import type {EventSubscription} from '../vendor/emitter/EventEmitter';
24
27
 
25
28
  // TODO T69437152 @petetheheat - Delete this fork when Fabric ships to 100%.
26
29
  const NativeAnimatedModule =
@@ -36,24 +39,83 @@ let nativeEventEmitter;
36
39
  let waitingForQueuedOperations = new Set();
37
40
  let queueOperations = false;
38
41
  let queue: Array<() => void> = [];
42
+ // $FlowFixMe
43
+ let singleOpQueue: Array<any> = [];
44
+
45
+ const useSingleOpBatching =
46
+ Platform.OS === 'android' &&
47
+ !!NativeAnimatedModule?.queueAndExecuteBatchedOperations &&
48
+ ReactNativeFeatureFlags.animatedShouldUseSingleOp();
49
+ let flushQueueTimeout = null;
50
+
51
+ const eventListenerGetValueCallbacks = {};
52
+ const eventListenerAnimationFinishedCallbacks = {};
53
+ let globalEventEmitterGetValueListener: ?EventSubscription = null;
54
+ let globalEventEmitterAnimationFinishedListener: ?EventSubscription = null;
55
+
56
+ const nativeOps: ?typeof NativeAnimatedModule = useSingleOpBatching
57
+ ? ((function () {
58
+ const apis = [
59
+ 'createAnimatedNode', // 1
60
+ 'updateAnimatedNodeConfig', // 2
61
+ 'getValue', // 3
62
+ 'startListeningToAnimatedNodeValue', // 4
63
+ 'stopListeningToAnimatedNodeValue', // 5
64
+ 'connectAnimatedNodes', // 6
65
+ 'disconnectAnimatedNodes', // 7
66
+ 'startAnimatingNode', // 8
67
+ 'stopAnimation', // 9
68
+ 'setAnimatedNodeValue', // 10
69
+ 'setAnimatedNodeOffset', // 11
70
+ 'flattenAnimatedNodeOffset', // 12
71
+ 'extractAnimatedNodeOffset', // 13
72
+ 'connectAnimatedNodeToView', // 14
73
+ 'disconnectAnimatedNodeFromView', // 15
74
+ 'restoreDefaultValues', // 16
75
+ 'dropAnimatedNode', // 17
76
+ 'addAnimatedEventToView', // 18
77
+ 'removeAnimatedEventFromView', // 19
78
+ 'addListener', // 20
79
+ 'removeListener', // 21
80
+ ];
81
+ return apis.reduce((acc, functionName, i) => {
82
+ // These indices need to be kept in sync with the indices in native (see NativeAnimatedModule in Java, or the equivalent for any other native platform).
83
+ // $FlowFixMe[prop-missing]
84
+ acc[functionName] = i + 1;
85
+ return acc;
86
+ }, {});
87
+ })(): $FlowFixMe)
88
+ : NativeAnimatedModule;
39
89
 
40
90
  /**
41
- * Simple wrappers around NativeAnimatedModule to provide flow and autocomplete support for
42
- * the native module methods
91
+ * Wrappers around NativeAnimatedModule to provide flow and autocomplete support for
92
+ * the native module methods, and automatic queue management on Android
43
93
  */
44
94
  const API = {
45
95
  getValue: function (
46
96
  tag: number,
47
97
  saveValueCallback: (value: number) => void,
48
98
  ): void {
49
- invariant(NativeAnimatedModule, 'Native animated module is not available');
50
- API.queueOperation(() => {
51
- NativeAnimatedModule.getValue(tag, saveValueCallback);
52
- });
99
+ invariant(nativeOps, 'Native animated module is not available');
100
+ if (useSingleOpBatching) {
101
+ if (saveValueCallback) {
102
+ eventListenerGetValueCallbacks[tag] = saveValueCallback;
103
+ }
104
+ // $FlowFixMe
105
+ API.queueOperation(nativeOps.getValue, tag);
106
+ } else {
107
+ API.queueOperation(nativeOps.getValue, tag, saveValueCallback);
108
+ }
53
109
  },
54
110
  setWaitingForIdentifier: function (id: string): void {
55
111
  waitingForQueuedOperations.add(id);
56
112
  queueOperations = true;
113
+ if (
114
+ ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() &&
115
+ flushQueueTimeout
116
+ ) {
117
+ clearTimeout(flushQueueTimeout);
118
+ }
57
119
  },
58
120
  unsetWaitingForIdentifier: function (id: string): void {
59
121
  waitingForQueuedOperations.delete(id);
@@ -64,70 +126,103 @@ const API = {
64
126
  }
65
127
  },
66
128
  disableQueue: function (): void {
129
+ invariant(nativeOps, 'Native animated module is not available');
130
+
131
+ if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush()) {
132
+ const prevTimeout = flushQueueTimeout;
133
+ clearImmediate(prevTimeout);
134
+ flushQueueTimeout = setImmediate(API.flushQueue);
135
+ } else {
136
+ API.flushQueue();
137
+ }
138
+ },
139
+ flushQueue: function (): void {
67
140
  invariant(NativeAnimatedModule, 'Native animated module is not available');
141
+ flushQueueTimeout = null;
68
142
 
69
- if (Platform.OS === 'android') {
70
- NativeAnimatedModule.startOperationBatch();
143
+ // Early returns before calling any APIs
144
+ if (useSingleOpBatching && singleOpQueue.length === 0) {
145
+ return;
71
146
  }
72
- for (let q = 0, l = queue.length; q < l; q++) {
73
- queue[q]();
147
+ if (!useSingleOpBatching && queue.length === 0) {
148
+ return;
74
149
  }
75
- queue.length = 0;
76
- if (Platform.OS === 'android') {
77
- NativeAnimatedModule.finishOperationBatch();
150
+
151
+ if (useSingleOpBatching) {
152
+ // Set up event listener for callbacks if it's not set up
153
+ if (
154
+ !globalEventEmitterGetValueListener ||
155
+ !globalEventEmitterAnimationFinishedListener
156
+ ) {
157
+ setupGlobalEventEmitterListeners();
158
+ }
159
+ // Single op batching doesn't use callback functions, instead we
160
+ // use RCTDeviceEventEmitter. This reduces overhead of sending lots of
161
+ // JSI functions across to native code; but also, TM infrastructure currently
162
+ // does not support packing a function into native arrays.
163
+ NativeAnimatedModule.queueAndExecuteBatchedOperations?.(singleOpQueue);
164
+ singleOpQueue.length = 0;
165
+ } else {
166
+ Platform.OS === 'android' && NativeAnimatedModule.startOperationBatch?.();
167
+ for (let q = 0, l = queue.length; q < l; q++) {
168
+ queue[q]();
169
+ }
170
+ queue.length = 0;
171
+ Platform.OS === 'android' &&
172
+ NativeAnimatedModule.finishOperationBatch?.();
78
173
  }
79
174
  },
80
- queueOperation: (fn: () => void): void => {
81
- if (queueOperations) {
82
- queue.push(fn);
175
+ queueOperation: <Args: $ReadOnlyArray<mixed>, Fn: (...Args) => void>(
176
+ fn: Fn,
177
+ ...args: Args
178
+ ): void => {
179
+ if (useSingleOpBatching) {
180
+ // Get the command ID from the queued function, and push that ID and any arguments needed to execute the operation
181
+ // $FlowFixMe: surprise, fn is actually a number
182
+ singleOpQueue.push(fn, ...args);
183
+ return;
184
+ }
185
+
186
+ // If queueing is explicitly on, *or* the queue has not yet
187
+ // been flushed, use the queue. This is to prevent operations
188
+ // from being executed out of order.
189
+ if (queueOperations || queue.length !== 0) {
190
+ queue.push(() => fn(...args));
83
191
  } else {
84
- fn();
192
+ fn(...args);
85
193
  }
86
194
  },
87
195
  createAnimatedNode: function (tag: number, config: AnimatedNodeConfig): void {
88
- invariant(NativeAnimatedModule, 'Native animated module is not available');
89
- API.queueOperation(() =>
90
- NativeAnimatedModule.createAnimatedNode(tag, config),
91
- );
196
+ invariant(nativeOps, 'Native animated module is not available');
197
+ API.queueOperation(nativeOps.createAnimatedNode, tag, config);
92
198
  },
93
199
  updateAnimatedNodeConfig: function (
94
200
  tag: number,
95
201
  config: AnimatedNodeConfig,
96
202
  ): void {
97
- invariant(NativeAnimatedModule, 'Native animated module is not available');
98
- if (typeof NativeAnimatedModule.updateAnimatedNodeConfig === 'function') {
99
- API.queueOperation(() =>
100
- // $FlowIgnore[not-a-function] - checked above
101
- NativeAnimatedModule.updateAnimatedNodeConfig(tag, config),
102
- );
203
+ invariant(nativeOps, 'Native animated module is not available');
204
+ if (nativeOps.updateAnimatedNodeConfig) {
205
+ API.queueOperation(nativeOps.updateAnimatedNodeConfig, tag, config);
103
206
  }
104
207
  },
105
208
  startListeningToAnimatedNodeValue: function (tag: number) {
106
- invariant(NativeAnimatedModule, 'Native animated module is not available');
107
- API.queueOperation(() =>
108
- NativeAnimatedModule.startListeningToAnimatedNodeValue(tag),
109
- );
209
+ invariant(nativeOps, 'Native animated module is not available');
210
+ API.queueOperation(nativeOps.startListeningToAnimatedNodeValue, tag);
110
211
  },
111
212
  stopListeningToAnimatedNodeValue: function (tag: number) {
112
- invariant(NativeAnimatedModule, 'Native animated module is not available');
113
- API.queueOperation(() =>
114
- NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag),
115
- );
213
+ invariant(nativeOps, 'Native animated module is not available');
214
+ API.queueOperation(nativeOps.stopListeningToAnimatedNodeValue, tag);
116
215
  },
117
216
  connectAnimatedNodes: function (parentTag: number, childTag: number): void {
118
- invariant(NativeAnimatedModule, 'Native animated module is not available');
119
- API.queueOperation(() =>
120
- NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag),
121
- );
217
+ invariant(nativeOps, 'Native animated module is not available');
218
+ API.queueOperation(nativeOps.connectAnimatedNodes, parentTag, childTag);
122
219
  },
123
220
  disconnectAnimatedNodes: function (
124
221
  parentTag: number,
125
222
  childTag: number,
126
223
  ): void {
127
- invariant(NativeAnimatedModule, 'Native animated module is not available');
128
- API.queueOperation(() =>
129
- NativeAnimatedModule.disconnectAnimatedNodes(parentTag, childTag),
130
- );
224
+ invariant(nativeOps, 'Native animated module is not available');
225
+ API.queueOperation(nativeOps.disconnectAnimatedNodes, parentTag, childTag);
131
226
  },
132
227
  startAnimatingNode: function (
133
228
  animationId: number,
@@ -135,84 +230,85 @@ const API = {
135
230
  config: AnimatingNodeConfig,
136
231
  endCallback: EndCallback,
137
232
  ): void {
138
- invariant(NativeAnimatedModule, 'Native animated module is not available');
139
- API.queueOperation(() =>
140
- NativeAnimatedModule.startAnimatingNode(
233
+ invariant(nativeOps, 'Native animated module is not available');
234
+ if (useSingleOpBatching) {
235
+ if (endCallback) {
236
+ eventListenerAnimationFinishedCallbacks[animationId] = endCallback;
237
+ }
238
+ // $FlowFixMe
239
+ API.queueOperation(
240
+ nativeOps.startAnimatingNode,
241
+ animationId,
242
+ nodeTag,
243
+ config,
244
+ );
245
+ } else {
246
+ API.queueOperation(
247
+ nativeOps.startAnimatingNode,
141
248
  animationId,
142
249
  nodeTag,
143
250
  config,
144
251
  endCallback,
145
- ),
146
- );
252
+ );
253
+ }
147
254
  },
148
255
  stopAnimation: function (animationId: number) {
149
- invariant(NativeAnimatedModule, 'Native animated module is not available');
150
- API.queueOperation(() => NativeAnimatedModule.stopAnimation(animationId));
256
+ invariant(nativeOps, 'Native animated module is not available');
257
+ API.queueOperation(nativeOps.stopAnimation, animationId);
151
258
  },
152
259
  setAnimatedNodeValue: function (nodeTag: number, value: number): void {
153
- invariant(NativeAnimatedModule, 'Native animated module is not available');
154
- API.queueOperation(() =>
155
- NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value),
156
- );
260
+ invariant(nativeOps, 'Native animated module is not available');
261
+ API.queueOperation(nativeOps.setAnimatedNodeValue, nodeTag, value);
157
262
  },
158
263
  setAnimatedNodeOffset: function (nodeTag: number, offset: number): void {
159
- invariant(NativeAnimatedModule, 'Native animated module is not available');
160
- API.queueOperation(() =>
161
- NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset),
162
- );
264
+ invariant(nativeOps, 'Native animated module is not available');
265
+ API.queueOperation(nativeOps.setAnimatedNodeOffset, nodeTag, offset);
163
266
  },
164
267
  flattenAnimatedNodeOffset: function (nodeTag: number): void {
165
- invariant(NativeAnimatedModule, 'Native animated module is not available');
166
- API.queueOperation(() =>
167
- NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag),
168
- );
268
+ invariant(nativeOps, 'Native animated module is not available');
269
+ API.queueOperation(nativeOps.flattenAnimatedNodeOffset, nodeTag);
169
270
  },
170
271
  extractAnimatedNodeOffset: function (nodeTag: number): void {
171
- invariant(NativeAnimatedModule, 'Native animated module is not available');
172
- API.queueOperation(() =>
173
- NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag),
174
- );
272
+ invariant(nativeOps, 'Native animated module is not available');
273
+ API.queueOperation(nativeOps.extractAnimatedNodeOffset, nodeTag);
175
274
  },
176
275
  connectAnimatedNodeToView: function (nodeTag: number, viewTag: number): void {
177
- invariant(NativeAnimatedModule, 'Native animated module is not available');
178
- API.queueOperation(() =>
179
- NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag),
180
- );
276
+ invariant(nativeOps, 'Native animated module is not available');
277
+ API.queueOperation(nativeOps.connectAnimatedNodeToView, nodeTag, viewTag);
181
278
  },
182
279
  disconnectAnimatedNodeFromView: function (
183
280
  nodeTag: number,
184
281
  viewTag: number,
185
282
  ): void {
186
- invariant(NativeAnimatedModule, 'Native animated module is not available');
187
- API.queueOperation(() =>
188
- NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag, viewTag),
283
+ invariant(nativeOps, 'Native animated module is not available');
284
+ API.queueOperation(
285
+ nativeOps.disconnectAnimatedNodeFromView,
286
+ nodeTag,
287
+ viewTag,
189
288
  );
190
289
  },
191
290
  restoreDefaultValues: function (nodeTag: number): void {
192
- invariant(NativeAnimatedModule, 'Native animated module is not available');
291
+ invariant(nativeOps, 'Native animated module is not available');
193
292
  // Backwards compat with older native runtimes, can be removed later.
194
- if (NativeAnimatedModule.restoreDefaultValues != null) {
195
- API.queueOperation(() =>
196
- NativeAnimatedModule.restoreDefaultValues(nodeTag),
197
- );
293
+ if (nativeOps.restoreDefaultValues != null) {
294
+ API.queueOperation(nativeOps.restoreDefaultValues, nodeTag);
198
295
  }
199
296
  },
200
297
  dropAnimatedNode: function (tag: number): void {
201
- invariant(NativeAnimatedModule, 'Native animated module is not available');
202
- API.queueOperation(() => NativeAnimatedModule.dropAnimatedNode(tag));
298
+ invariant(nativeOps, 'Native animated module is not available');
299
+ API.queueOperation(nativeOps.dropAnimatedNode, tag);
203
300
  },
204
301
  addAnimatedEventToView: function (
205
302
  viewTag: number,
206
303
  eventName: string,
207
304
  eventMapping: EventMapping,
208
305
  ) {
209
- invariant(NativeAnimatedModule, 'Native animated module is not available');
210
- API.queueOperation(() =>
211
- NativeAnimatedModule.addAnimatedEventToView(
212
- viewTag,
213
- eventName,
214
- eventMapping,
215
- ),
306
+ invariant(nativeOps, 'Native animated module is not available');
307
+ API.queueOperation(
308
+ nativeOps.addAnimatedEventToView,
309
+ viewTag,
310
+ eventName,
311
+ eventMapping,
216
312
  );
217
313
  },
218
314
  removeAnimatedEventFromView(
@@ -220,17 +316,44 @@ const API = {
220
316
  eventName: string,
221
317
  animatedNodeTag: number,
222
318
  ) {
223
- invariant(NativeAnimatedModule, 'Native animated module is not available');
224
- API.queueOperation(() =>
225
- NativeAnimatedModule.removeAnimatedEventFromView(
226
- viewTag,
227
- eventName,
228
- animatedNodeTag,
229
- ),
319
+ invariant(nativeOps, 'Native animated module is not available');
320
+ API.queueOperation(
321
+ nativeOps.removeAnimatedEventFromView,
322
+ viewTag,
323
+ eventName,
324
+ animatedNodeTag,
230
325
  );
231
326
  },
232
327
  };
233
328
 
329
+ function setupGlobalEventEmitterListeners() {
330
+ globalEventEmitterGetValueListener = RCTDeviceEventEmitter.addListener(
331
+ 'onNativeAnimatedModuleGetValue',
332
+ function (params) {
333
+ const {tag} = params;
334
+ const callback = eventListenerGetValueCallbacks[tag];
335
+ if (!callback) {
336
+ return;
337
+ }
338
+ callback(params.value);
339
+ delete eventListenerGetValueCallbacks[tag];
340
+ },
341
+ );
342
+ globalEventEmitterAnimationFinishedListener =
343
+ RCTDeviceEventEmitter.addListener(
344
+ 'onNativeAnimatedModuleAnimationFinished',
345
+ function (params) {
346
+ const {animationId} = params;
347
+ const callback = eventListenerAnimationFinishedCallbacks[animationId];
348
+ if (!callback) {
349
+ return;
350
+ }
351
+ callback(params);
352
+ delete eventListenerAnimationFinishedCallbacks[animationId];
353
+ },
354
+ );
355
+ }
356
+
234
357
  /**
235
358
  * Styles allowed by the native animated implementation.
236
359
  *
@@ -359,7 +482,9 @@ function validateStyles(styles: {[key: string]: ?number, ...}): void {
359
482
  }
360
483
  }
361
484
 
362
- function validateInterpolation(config: InterpolationConfigType): void {
485
+ function validateInterpolation<OutputT: number | string>(
486
+ config: InterpolationConfigType<OutputT>,
487
+ ): void {
363
488
  for (const key in config) {
364
489
  if (!isSupportedInterpolationParam(key)) {
365
490
  throw new Error(
@@ -64,6 +64,9 @@ export interface Spec extends TurboModule {
64
64
  // Events
65
65
  +addListener: (eventName: string) => void;
66
66
  +removeListeners: (count: number) => void;
67
+
68
+ // All of the above in a batched mode
69
+ +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array<any>) => void;
67
70
  }
68
71
 
69
72
  export default (TurboModuleRegistry.get<Spec>('NativeAnimatedModule'): ?Spec);
@@ -64,6 +64,9 @@ export interface Spec extends TurboModule {
64
64
  // Events
65
65
  +addListener: (eventName: string) => void;
66
66
  +removeListeners: (count: number) => void;
67
+
68
+ // All of the above in a batched mode
69
+ +queueAndExecuteBatchedOperations?: (operationsAndArgs: Array<any>) => void;
67
70
  }
68
71
 
69
72
  export default (TurboModuleRegistry.get<Spec>(
@@ -44,7 +44,7 @@ export type SpringAnimationConfig = {
44
44
  ...
45
45
  }
46
46
  | AnimatedColor
47
- | AnimatedInterpolation,
47
+ | AnimatedInterpolation<number>,
48
48
  overshootClamping?: boolean,
49
49
  restDisplacementThreshold?: number,
50
50
  restSpeedThreshold?: number,
@@ -67,7 +67,7 @@ export type SpringAnimationConfig = {
67
67
 
68
68
  export type SpringAnimationConfigSingle = {
69
69
  ...AnimationConfig,
70
- toValue: number | AnimatedValue | AnimatedInterpolation,
70
+ toValue: number,
71
71
  overshootClamping?: boolean,
72
72
  restDisplacementThreshold?: number,
73
73
  restSpeedThreshold?: number,
@@ -90,7 +90,7 @@ class SpringAnimation extends Animation {
90
90
  _startPosition: number;
91
91
  _lastPosition: number;
92
92
  _fromValue: number;
93
- _toValue: any;
93
+ _toValue: number;
94
94
  _stiffness: number;
95
95
  _damping: number;
96
96
  _mass: number;
@@ -36,7 +36,7 @@ export type TimingAnimationConfig = $ReadOnly<{
36
36
  | AnimatedValueXY
37
37
  | RgbaValue
38
38
  | AnimatedColor
39
- | AnimatedInterpolation,
39
+ | AnimatedInterpolation<number>,
40
40
  easing?: (value: number) => number,
41
41
  duration?: number,
42
42
  delay?: number,
@@ -44,7 +44,7 @@ export type TimingAnimationConfig = $ReadOnly<{
44
44
 
45
45
  export type TimingAnimationConfigSingle = $ReadOnly<{
46
46
  ...AnimationConfig,
47
- toValue: number | AnimatedValue | AnimatedInterpolation,
47
+ toValue: number,
48
48
  easing?: (value: number) => number,
49
49
  duration?: number,
50
50
  delay?: number,
@@ -62,7 +62,7 @@ function easeInOut() {
62
62
  class TimingAnimation extends Animation {
63
63
  _startTime: number;
64
64
  _fromValue: number;
65
- _toValue: any;
65
+ _toValue: number;
66
66
  _duration: number;
67
67
  _delay: number;
68
68
  _easing: (value: number) => number;
@@ -55,6 +55,7 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
55
55
  _prevComponent: any;
56
56
  _propsAnimated: AnimatedProps;
57
57
  _eventDetachers: Array<Function> = [];
58
+ _initialAnimatedProps: Object;
58
59
 
59
60
  // Only to be used in this file, and only in Fabric.
60
61
  _animatedComponentId: string = `${animatedComponentNextId++}:animatedComponent`;
@@ -200,11 +201,17 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
200
201
  });
201
202
 
202
203
  render() {
203
- const {style = {}, ...props} = this._propsAnimated.__getValue() || {};
204
+ const animatedProps =
205
+ this._propsAnimated.__getValue(this._initialAnimatedProps) || {};
206
+ const {style = {}, ...props} = animatedProps;
204
207
  const {style: passthruStyle = {}, ...passthruProps} =
205
208
  this.props.passthroughAnimatedPropExplicitValues || {};
206
209
  const mergedStyle = {...style, ...passthruStyle};
207
210
 
211
+ if (!this._initialAnimatedProps) {
212
+ this._initialAnimatedProps = animatedProps;
213
+ }
214
+
208
215
  // Force `collapsable` to be false so that native view is not flattened.
209
216
  // Flattened views cannot be accurately referenced by a native driver.
210
217
  return (
@@ -38,7 +38,9 @@ class AnimatedAddition extends AnimatedWithChildren {
38
38
  return this._a.__getValue() + this._b.__getValue();
39
39
  }
40
40
 
41
- interpolate(config: InterpolationConfigType): AnimatedInterpolation {
41
+ interpolate<OutputT: number | string>(
42
+ config: InterpolationConfigType<OutputT>,
43
+ ): AnimatedInterpolation<OutputT> {
42
44
  return new AnimatedInterpolation(this, config);
43
45
  }
44
46