react-native-reanimated 4.3.1 → 4.3.2

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 (67) hide show
  1. package/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.cpp +12 -5
  2. package/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.cpp +59 -37
  3. package/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.h +11 -8
  4. package/Common/cpp/reanimated/CSS/registries/CSSAnimationsRegistry.cpp +4 -0
  5. package/Common/cpp/reanimated/CSS/registries/StaticPropsRegistry.cpp +17 -4
  6. package/Common/cpp/reanimated/CSS/registries/StaticPropsRegistry.h +5 -0
  7. package/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.cpp +5 -0
  8. package/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp +25 -12
  9. package/Common/cpp/reanimated/Fabric/ReanimatedMountHook.h +3 -0
  10. package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxyCommon.h +38 -0
  11. package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp +106 -33
  12. package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Legacy.cpp +165 -92
  13. package/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +2 -6
  14. package/android/CMakeLists.txt +4 -1
  15. package/android/build.gradle +2 -0
  16. package/android/generate-stub-pch.gradle.kts +84 -0
  17. package/android/src/main/cpp/ReanimatedPCH.h +46 -0
  18. package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +14 -1
  19. package/android/src/main/java/com/swmansion/reanimated/keyboard/KeyboardAnimationCallback.java +9 -1
  20. package/apple/reanimated/apple/ReanimatedModule.mm +12 -1
  21. package/lib/module/common/constants/platform.js +5 -5
  22. package/lib/module/common/constants/platform.js.map +1 -1
  23. package/lib/module/createAnimatedComponent/getViewInfo.js +3 -1
  24. package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -1
  25. package/lib/module/css/component/AnimatedComponent.js +0 -2
  26. package/lib/module/css/component/AnimatedComponent.js.map +1 -1
  27. package/lib/module/css/native/managers/CSSManager.js +5 -5
  28. package/lib/module/css/native/managers/CSSManager.js.map +1 -1
  29. package/lib/module/css/native/managers/CSSTransitionsManager.js +8 -1
  30. package/lib/module/css/native/managers/CSSTransitionsManager.js.map +1 -1
  31. package/lib/module/css/svg/native/processors/stroke.js +9 -5
  32. package/lib/module/css/svg/native/processors/stroke.js.map +1 -1
  33. package/lib/module/platform-specific/findHostInstance.js +8 -5
  34. package/lib/module/platform-specific/findHostInstance.js.map +1 -1
  35. package/lib/module/platform-specific/jsVersion.js +1 -1
  36. package/lib/module/updateProps/updateProps.js +3 -2
  37. package/lib/module/updateProps/updateProps.js.map +1 -1
  38. package/lib/module/valueSetter.js +1 -1
  39. package/lib/module/valueSetter.js.map +1 -1
  40. package/lib/typescript/common/constants/platform.d.ts.map +1 -1
  41. package/lib/typescript/createAnimatedComponent/commonTypes.d.ts +0 -1
  42. package/lib/typescript/createAnimatedComponent/commonTypes.d.ts.map +1 -1
  43. package/lib/typescript/createAnimatedComponent/getViewInfo.d.ts.map +1 -1
  44. package/lib/typescript/css/component/AnimatedComponent.d.ts +0 -1
  45. package/lib/typescript/css/component/AnimatedComponent.d.ts.map +1 -1
  46. package/lib/typescript/css/native/managers/CSSTransitionsManager.d.ts +5 -1
  47. package/lib/typescript/css/native/managers/CSSTransitionsManager.d.ts.map +1 -1
  48. package/lib/typescript/css/svg/native/processors/stroke.d.ts.map +1 -1
  49. package/lib/typescript/platform-specific/findHostInstance.d.ts.map +1 -1
  50. package/lib/typescript/platform-specific/jsVersion.d.ts +1 -1
  51. package/lib/typescript/platform-specific/types.d.ts +1 -0
  52. package/lib/typescript/platform-specific/types.d.ts.map +1 -1
  53. package/lib/typescript/updateProps/updateProps.d.ts.map +1 -1
  54. package/lib/typescript/valueSetter.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/src/common/constants/platform.ts +6 -5
  57. package/src/createAnimatedComponent/commonTypes.ts +0 -1
  58. package/src/createAnimatedComponent/getViewInfo.ts +3 -1
  59. package/src/css/component/AnimatedComponent.tsx +0 -2
  60. package/src/css/native/managers/CSSManager.ts +8 -8
  61. package/src/css/native/managers/CSSTransitionsManager.ts +9 -2
  62. package/src/css/svg/native/processors/stroke.ts +9 -6
  63. package/src/platform-specific/findHostInstance.ts +7 -7
  64. package/src/platform-specific/jsVersion.ts +1 -1
  65. package/src/platform-specific/types.ts +2 -0
  66. package/src/updateProps/updateProps.ts +3 -2
  67. package/src/valueSetter.ts +2 -1
@@ -4,4 +4,4 @@
4
4
  * version used to build the native part of the library in runtime. Remember to
5
5
  * keep this in sync with the version declared in `package.json`
6
6
  */
7
- export const jsVersion = '4.3.1';
7
+ export const jsVersion = '4.3.2';
@@ -3,5 +3,7 @@
3
3
  export type HostInstance = {
4
4
  __internalInstanceHandle?: Record<string, unknown>;
5
5
  __nativeTag?: number;
6
+ __viewConfig?: Record<string, unknown>;
7
+ // Legacy ReactFabricHostComponent key (e.g. react-native-macos).
6
8
  _viewConfig?: Record<string, unknown>;
7
9
  };
@@ -109,7 +109,7 @@ type NativePropsOperation = {
109
109
  function createUpdatePropsManager() {
110
110
  'worklet';
111
111
  const nativeOperations: NativePropsOperation[] = [];
112
- const jsOperations: JSPropsOperation[] = [];
112
+ let jsOperations: JSPropsOperation[] = [];
113
113
 
114
114
  let flushPending = false;
115
115
 
@@ -162,8 +162,9 @@ function createUpdatePropsManager() {
162
162
  nativeOperations.length = 0;
163
163
  }
164
164
  if (jsOperations.length) {
165
+ // Fresh array each flush: scheduleOnRN caches serialized args by identity.
165
166
  scheduleOnRN(updateJSProps, jsOperations);
166
- jsOperations.length = 0;
167
+ jsOperations = [];
167
168
  }
168
169
  flushPending = false;
169
170
  },
@@ -17,7 +17,8 @@ export function valueSetter<Value>(
17
17
  (value !== null &&
18
18
  typeof value === 'object' &&
19
19
  // TODO TYPESCRIPT fix this after fixing AnimationObject type
20
- (value as unknown as AnimationObject).onFrame !== undefined)
20
+ (value as unknown as AnimationObject).onFrame !== undefined &&
21
+ (value as unknown as AnimationObject).onStart !== undefined)
21
22
  ) {
22
23
  const animation: AnimationObject<Value> =
23
24
  typeof value === 'function'