react-native-reanimated 2.10.0 → 2.12.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 (146) hide show
  1. package/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp +3 -0
  2. package/Common/cpp/{headers/AnimatedSensor → AnimatedSensor}/AnimatedSensorModule.h +0 -0
  3. package/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp +2 -0
  4. package/Common/cpp/{headers/LayoutAnimations → LayoutAnimations}/LayoutAnimationsProxy.h +0 -0
  5. package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +2 -0
  6. package/Common/cpp/{headers/NativeModules → NativeModules}/NativeReanimatedModule.h +5 -0
  7. package/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp +2 -0
  8. package/Common/cpp/{headers/NativeModules → NativeModules}/NativeReanimatedModuleSpec.h +1 -1
  9. package/Common/cpp/{headers/Registries → Registries}/EventHandlerRegistry.h +0 -0
  10. package/Common/cpp/Registries/MapperRegistry.cpp +3 -1
  11. package/Common/cpp/{headers/Registries → Registries}/MapperRegistry.h +0 -0
  12. package/Common/cpp/Registries/WorkletsCache.cpp +3 -0
  13. package/Common/cpp/{headers/Registries → Registries}/WorkletsCache.h +0 -0
  14. package/Common/cpp/{headers/SharedItems → SharedItems}/FrozenObject.h +0 -0
  15. package/Common/cpp/{headers/SharedItems → SharedItems}/HostFunctionHandler.h +0 -0
  16. package/Common/cpp/SharedItems/MutableValue.cpp +2 -0
  17. package/Common/cpp/{headers/SharedItems → SharedItems}/MutableValue.h +0 -0
  18. package/Common/cpp/{headers/SharedItems → SharedItems}/MutableValueSetterProxy.h +0 -0
  19. package/Common/cpp/{headers/SharedItems → SharedItems}/RemoteObject.h +0 -0
  20. package/Common/cpp/{headers/SharedItems → SharedItems}/RuntimeManager.h +0 -0
  21. package/Common/cpp/SharedItems/ShareableValue.cpp +7 -2
  22. package/Common/cpp/{headers/SharedItems → SharedItems}/ShareableValue.h +0 -0
  23. package/Common/cpp/{headers/SharedItems → SharedItems}/SharedParent.h +0 -0
  24. package/Common/cpp/{headers/SharedItems → SharedItems}/ValueWrapper.h +0 -0
  25. package/Common/cpp/{headers/SpecTools → SpecTools}/ErrorHandler.h +0 -0
  26. package/Common/cpp/{headers/Tools → Tools}/FeaturesConfig.h +0 -0
  27. package/Common/cpp/Tools/JSIStoreValueUser.cpp +2 -2
  28. package/Common/cpp/{headers/Tools → Tools}/JSIStoreValueUser.h +0 -0
  29. package/Common/cpp/{headers/Tools → Tools}/Mapper.h +0 -0
  30. package/Common/cpp/{headers/Tools → Tools}/PlatformDepMethodsHolder.h +0 -0
  31. package/Common/cpp/{headers/Tools → Tools}/ReanimatedHiddenHeaders.h +1 -1
  32. package/Common/cpp/{headers/Tools → Tools}/RuntimeDecorator.h +0 -0
  33. package/Common/cpp/{headers/Tools → Tools}/Scheduler.h +0 -0
  34. package/Common/cpp/Tools/SingleInstanceChecker.h +58 -0
  35. package/Common/cpp/{headers/Tools → Tools}/WorkletEventHandler.h +0 -0
  36. package/RNReanimated.podspec +19 -75
  37. package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  38. package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  39. package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  40. package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  41. package/android/.gradle/{7.2 → 7.5.1}/dependencies-accessors/gc.properties +0 -0
  42. package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  43. package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  44. package/android/.gradle/{7.2 → 7.5.1}/fileChanges/last-build.bin +0 -0
  45. package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  46. package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  47. package/android/.gradle/{7.2 → 7.5.1}/fileHashes/resourceHashesCache.bin +0 -0
  48. package/android/.gradle/{7.2 → 7.5.1}/gc.properties +0 -0
  49. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  50. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  51. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  52. package/android/.gradle/file-system.probe +0 -0
  53. package/android/CMakeLists.txt +56 -65
  54. package/android/build.gradle +422 -120
  55. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  56. package/android/react-native-reanimated-66-hermes.aar +0 -0
  57. package/android/react-native-reanimated-66-jsc.aar +0 -0
  58. package/android/react-native-reanimated-67-hermes.aar +0 -0
  59. package/android/react-native-reanimated-67-jsc.aar +0 -0
  60. package/android/react-native-reanimated-68-hermes.aar +0 -0
  61. package/android/react-native-reanimated-68-jsc.aar +0 -0
  62. package/android/react-native-reanimated-69-hermes.aar +0 -0
  63. package/android/react-native-reanimated-69-jsc.aar +0 -0
  64. package/android/react-native-reanimated-70-hermes.aar +0 -0
  65. package/android/react-native-reanimated-70-jsc.aar +0 -0
  66. package/android/src/main/cpp/AndroidErrorHandler.cpp +3 -4
  67. package/android/src/main/cpp/{headers/AndroidErrorHandler.h → AndroidErrorHandler.h} +1 -4
  68. package/android/src/main/cpp/AndroidLogger.cpp +4 -1
  69. package/android/src/main/cpp/{headers/AndroidLogger.h → AndroidLogger.h} +0 -0
  70. package/android/src/main/cpp/{headers/AndroidScheduler.h → AndroidScheduler.h} +0 -0
  71. package/android/src/main/cpp/{headers/JNIHelper.h → JNIHelper.h} +0 -0
  72. package/android/src/main/cpp/{headers/LayoutAnimations.h → LayoutAnimations.h} +0 -0
  73. package/android/src/main/cpp/NativeProxy.cpp +6 -8
  74. package/android/src/main/cpp/{headers/NativeProxy.h → NativeProxy.h} +0 -0
  75. package/android/src/main/cpp/{headers/TurboModule.h → TurboModule.h} +0 -0
  76. package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +4 -5
  77. package/android/src/main/java/com/swmansion/reanimated/keyboardObserver/ReanimatedKeyboardEventListener.java +2 -1
  78. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +2 -2
  79. package/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java +1 -1
  80. package/android/{rnVersionPatch/62 → src/reactNativeVersionPatch/UIImplementation/64/com/swmansion/reanimated}/layoutReanimation/ReanimatedUIImplementation.java +0 -0
  81. package/android/src/{main/java → reactNativeVersionPatch/UIImplementation/latest}/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java +0 -0
  82. package/android/src/reactNativeVersionPatch/messageQueueThread/67/com/swmansion/reanimated/ReanimatedMessageQueueThread.java +12 -0
  83. package/android/src/reactNativeVersionPatch/messageQueueThread/latest/com/swmansion/reanimated/ReanimatedMessageQueueThread.java +12 -0
  84. package/android/{rnVersionPatch/62 → src/reactNativeVersionPatch/nativeHierarchyManager/62/com/swmansion/reanimated}/layoutReanimation/ReanimatedNativeHierarchyManager.java +0 -0
  85. package/android/src/{main/java → reactNativeVersionPatch/nativeHierarchyManager/latest}/com/swmansion/reanimated/layoutReanimation/ReanimatedNativeHierarchyManager.java +0 -0
  86. package/ios/{REAModule.m → REAModule.mm} +29 -0
  87. package/ios/keyboardObserver/REAKeyboardEventObserver.m +1 -1
  88. package/ios/native/NativeProxy.mm +4 -2
  89. package/ios/native/REAInitializer.h +2 -2
  90. package/ios/native/REAInitializer.mm +2 -2
  91. package/ios/native/UIResponder+Reanimated.mm +1 -1
  92. package/lib/createAnimatedComponent.js +3 -4
  93. package/lib/index.web.js +2 -0
  94. package/lib/reanimated2/NativeMethods.js +79 -30
  95. package/lib/reanimated2/frameCallback/FrameCallbackRegistryJS.js +4 -4
  96. package/lib/reanimated2/frameCallback/FrameCallbackRegistryUI.js +47 -18
  97. package/lib/reanimated2/globals.d.ts +38 -12
  98. package/lib/reanimated2/hook/index.js +1 -0
  99. package/lib/reanimated2/hook/useScrollViewOffset.js +27 -0
  100. package/lib/reanimated2/utils.js +10 -3
  101. package/lib/types/index.web.d.ts +1 -0
  102. package/lib/types/reanimated2/NativeMethods.d.ts +4 -11
  103. package/lib/types/reanimated2/commonTypes.d.ts +8 -0
  104. package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryJS.d.ts +4 -3
  105. package/lib/types/reanimated2/frameCallback/FrameCallbackRegistryUI.d.ts +17 -7
  106. package/lib/types/reanimated2/hook/index.d.ts +1 -0
  107. package/lib/types/reanimated2/hook/useAnimatedScrollHandler.d.ts +1 -2
  108. package/lib/types/reanimated2/hook/useFrameCallback.d.ts +2 -1
  109. package/lib/types/reanimated2/hook/useScrollViewOffset.d.ts +4 -0
  110. package/lib/types/reanimated2/utils.d.ts +5 -1
  111. package/package.json +8 -6
  112. package/plugin.js +1 -1
  113. package/react-native-reanimated.d.ts +13 -9
  114. package/scripts/reanimated_utils.rb +77 -0
  115. package/src/createAnimatedComponent.tsx +2 -3
  116. package/src/index.web.ts +2 -0
  117. package/src/reanimated2/NativeMethods.ts +104 -48
  118. package/src/reanimated2/commonTypes.ts +9 -0
  119. package/src/reanimated2/frameCallback/FrameCallbackRegistryJS.ts +6 -9
  120. package/src/reanimated2/frameCallback/FrameCallbackRegistryUI.ts +78 -27
  121. package/src/reanimated2/globals.d.ts +38 -12
  122. package/src/reanimated2/hook/index.ts +1 -0
  123. package/src/reanimated2/hook/useAnimatedScrollHandler.ts +3 -1
  124. package/src/reanimated2/hook/useFrameCallback.ts +2 -1
  125. package/src/reanimated2/hook/useScrollViewOffset.ts +37 -0
  126. package/src/reanimated2/utils.ts +12 -5
  127. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  128. package/android/.gradle/7.2/executionHistory/executionHistory.bin +0 -0
  129. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  130. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  131. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  132. package/android/.gradle/checksums/checksums.lock +0 -0
  133. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  134. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  135. package/android/rnVersionPatch/63/layoutReanimation/ReanimatedUIImplementation.java +0 -68
  136. package/android/rnVersionPatch/64/layoutReanimation/ReanimatedUIImplementation.java +0 -68
  137. package/android/rnVersionPatch/65/.gitkeep +0 -0
  138. package/android/rnVersionPatch/66/.gitkeep +0 -0
  139. package/android/rnVersionPatch/67/.gitkeep +0 -0
  140. package/android/rnVersionPatch/68/.gitkeep +0 -0
  141. package/android/rnVersionPatch/69/.gitkeep +0 -0
  142. package/android/rnVersionPatch/70/.gitkeep +0 -0
  143. package/android/rnVersionPatch/backup/.gitkeep +0 -0
  144. package/android/src/main/java/com/swmansion/reanimated/AndroidErrorHandler.java +0 -8
  145. package/lib/reanimated2/__mocks__/NativeReanimated.native.js +0 -20
  146. package/lib/types/reanimated2/__mocks__/NativeReanimated.native.d.ts +0 -13
@@ -1,68 +0,0 @@
1
- package com.facebook.react.uimanager;
2
-
3
- import androidx.annotation.Nullable;
4
- import com.facebook.react.bridge.ReactApplicationContext;
5
- import com.facebook.react.bridge.ReadableArray;
6
- import com.facebook.react.uimanager.events.EventDispatcher;
7
- import com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager;
8
- import java.util.List;
9
-
10
- public class ReanimatedUIImplementation extends UIImplementation {
11
- public ReanimatedUIImplementation(
12
- ReactApplicationContext reactContext,
13
- UIManagerModule.ViewManagerResolver viewManagerResolver,
14
- EventDispatcher eventDispatcher,
15
- int minTimeLeftInFrameForNonBatchedOperationMs) {
16
- this(
17
- reactContext,
18
- new ViewManagerRegistry(viewManagerResolver),
19
- eventDispatcher,
20
- minTimeLeftInFrameForNonBatchedOperationMs);
21
- }
22
-
23
- public ReanimatedUIImplementation(
24
- ReactApplicationContext reactContext,
25
- List<ViewManager> viewManagerList,
26
- EventDispatcher eventDispatcher,
27
- int minTimeLeftInFrameForNonBatchedOperationMs) {
28
- this(
29
- reactContext,
30
- new ViewManagerRegistry(viewManagerList),
31
- eventDispatcher,
32
- minTimeLeftInFrameForNonBatchedOperationMs);
33
- }
34
-
35
- public ReanimatedUIImplementation(
36
- ReactApplicationContext reactContext,
37
- ViewManagerRegistry viewManagerRegistry,
38
- EventDispatcher eventDispatcher,
39
- int minTimeLeftInFrameForNonBatchedOperationMs) {
40
- super(
41
- reactContext,
42
- viewManagerRegistry,
43
- new UIViewOperationQueue(
44
- reactContext,
45
- new ReanimatedNativeHierarchyManager(viewManagerRegistry, reactContext),
46
- minTimeLeftInFrameForNonBatchedOperationMs),
47
- eventDispatcher);
48
- }
49
-
50
- /**
51
- * Invoked when there is a mutation in a node tree.
52
- *
53
- * @param tag react tag of the node we want to manage
54
- * @param indicesToRemove ordered (asc) list of indicies at which view should be removed
55
- * @param viewsToAdd ordered (asc based on mIndex property) list of tag-index pairs that represent
56
- * a view which should be added at the specified index
57
- * @param tagsToDelete list of tags corresponding to views that should be removed
58
- */
59
- public void manageChildren(
60
- int viewTag,
61
- @Nullable ReadableArray moveFrom,
62
- @Nullable ReadableArray moveTo,
63
- @Nullable ReadableArray addChildTags,
64
- @Nullable ReadableArray addAtIndices,
65
- @Nullable ReadableArray removeFrom) {
66
- super.manageChildren(viewTag, moveFrom, moveTo, addChildTags, addAtIndices, removeFrom);
67
- }
68
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,8 +0,0 @@
1
- package com.swmansion.reanimated;
2
-
3
- public class AndroidErrorHandler {
4
-
5
- public static void raise(String message) {
6
- throw new RuntimeException(message);
7
- }
8
- }
@@ -1,20 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
- // @ts-nocheck
3
- import MutableValue from './MutableValue';
4
- global._setGlobalConsole = (_val) => {
5
- // noop
6
- };
7
- const NOOP = () => {
8
- // noop
9
- };
10
- export default {
11
- installCoreFunctions: NOOP,
12
- makeShareable: (worklet) => worklet,
13
- makeMutable: (init) => new MutableValue(init),
14
- makeRemote: NOOP,
15
- startMapper: NOOP,
16
- stopMapper: NOOP,
17
- registerEventHandler: NOOP,
18
- unregisterEventHandler: NOOP,
19
- getViewProp: NOOP,
20
- };
@@ -1,13 +0,0 @@
1
- import MutableValue from './MutableValue';
2
- declare const _default: {
3
- installCoreFunctions: () => void;
4
- makeShareable: (worklet: any) => any;
5
- makeMutable: (init: any) => MutableValue;
6
- makeRemote: () => void;
7
- startMapper: () => void;
8
- stopMapper: () => void;
9
- registerEventHandler: () => void;
10
- unregisterEventHandler: () => void;
11
- getViewProp: () => void;
12
- };
13
- export default _default;