react-native-reanimated 3.18.0 → 3.18.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.
- package/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.cpp +14 -2
- package/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h +6 -1
- package/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp +6 -1
- package/Common/cpp/reanimated/Fabric/ReanimatedMountHook.h +6 -1
- package/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp +3 -2
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.cpp +86 -24
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.h +29 -4
- package/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.h +4 -5
- package/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +45 -15
- package/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +4 -1
- package/Common/cpp/reanimated/Tools/ReanimatedSystraceSection.h +1 -1
- package/README.md +1 -13
- package/RNReanimated.podspec +1 -1
- package/android/src/main/cpp/reanimated/android/NativeProxy.cpp +25 -21
- package/android/src/main/cpp/reanimated/android/NativeProxy.h +5 -3
- package/apple/reanimated/apple/LayoutReanimation/REASharedTransitionManager.m +1 -2
- package/apple/reanimated/apple/LayoutReanimation/REASwizzledUIManager.mm +8 -7
- package/lib/module/PlatformChecker.js +6 -0
- package/lib/module/PlatformChecker.js.map +1 -1
- package/lib/module/animation/util.js +7 -4
- package/lib/module/animation/util.js.map +1 -1
- package/lib/module/component/FlatList.js +9 -3
- package/lib/module/component/FlatList.js.map +1 -1
- package/lib/module/core.js +0 -2
- package/lib/module/core.js.map +1 -1
- package/lib/module/createAnimatedComponent/NativeEventsManager.js +1 -1
- package/lib/module/createAnimatedComponent/NativeEventsManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +24 -37
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/hook/useAnimatedRef.js +70 -35
- package/lib/module/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/hook/useHandler.js +7 -0
- package/lib/module/hook/useHandler.js.map +1 -1
- package/lib/module/hook/useScrollViewOffset.js +28 -26
- package/lib/module/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/hook/utils.js +20 -9
- package/lib/module/hook/utils.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/platform-specific/jsVersion.js +1 -1
- package/lib/module/platformFunctions/setNativeProps.js +1 -1
- package/lib/module/platformFunctions/setNativeProps.js.map +1 -1
- package/lib/module/processBoxShadow.js.map +1 -1
- package/lib/typescript/PlatformChecker.d.ts +2 -0
- package/lib/typescript/PlatformChecker.d.ts.map +1 -1
- package/lib/typescript/animation/util.d.ts.map +1 -1
- package/lib/typescript/component/FlatList.d.ts +10 -2
- package/lib/typescript/component/FlatList.d.ts.map +1 -1
- package/lib/typescript/core.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts +1 -0
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/createAnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/helperTypes.d.ts +1 -3
- package/lib/typescript/helperTypes.d.ts.map +1 -1
- package/lib/typescript/hook/commonTypes.d.ts +7 -4
- package/lib/typescript/hook/commonTypes.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedRef.d.ts +3 -1
- package/lib/typescript/hook/useAnimatedRef.d.ts.map +1 -1
- package/lib/typescript/hook/useHandler.d.ts.map +1 -1
- package/lib/typescript/hook/useScrollViewOffset.d.ts.map +1 -1
- package/lib/typescript/hook/utils.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/platform-specific/jsVersion.d.ts +1 -1
- package/lib/typescript/processBoxShadow.d.ts +6 -3
- package/lib/typescript/processBoxShadow.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/PlatformChecker.ts +8 -0
- package/src/animation/util.ts +7 -4
- package/src/component/FlatList.tsx +44 -6
- package/src/core.ts +0 -3
- package/src/createAnimatedComponent/NativeEventsManager.ts +1 -1
- package/src/createAnimatedComponent/commonTypes.ts +9 -0
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +61 -73
- package/src/helperTypes.ts +1 -6
- package/src/hook/commonTypes.ts +9 -4
- package/src/hook/useAnimatedRef.ts +107 -48
- package/src/hook/useHandler.ts +10 -0
- package/src/hook/useScrollViewOffset.ts +34 -29
- package/src/hook/utils.ts +34 -9
- package/src/index.ts +4 -1
- package/src/platform-specific/jsVersion.ts +1 -1
- package/src/platformFunctions/setNativeProps.ts +1 -1
- package/src/processBoxShadow.ts +8 -4
package/src/index.ts
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
import './publicGlobals';
|
|
4
4
|
|
|
5
5
|
import * as Animated from './Animated';
|
|
6
|
+
import { initializeUIRuntime } from './initializers';
|
|
7
|
+
import { ReanimatedModule } from './ReanimatedModule';
|
|
8
|
+
|
|
9
|
+
initializeUIRuntime(ReanimatedModule);
|
|
6
10
|
|
|
7
11
|
export default Animated;
|
|
8
12
|
|
|
@@ -107,7 +111,6 @@ export type {
|
|
|
107
111
|
Adaptable,
|
|
108
112
|
AdaptTransforms,
|
|
109
113
|
AnimatedProps,
|
|
110
|
-
AnimatedStyleProp,
|
|
111
114
|
AnimateProps,
|
|
112
115
|
EntryOrExitLayoutType,
|
|
113
116
|
TransformStyleTypes,
|
|
@@ -60,7 +60,7 @@ function setNativePropsPaper(
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const tag = animatedRef() as number;
|
|
63
|
-
const name = (animatedRef as AnimatedRefOnUI).viewName
|
|
63
|
+
const name = (animatedRef as AnimatedRefOnUI).viewName?.value ?? null;
|
|
64
64
|
processColorsInProps(updates);
|
|
65
65
|
global._updatePropsPaper!([{ tag, name, updates }]);
|
|
66
66
|
}
|
package/src/processBoxShadow.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
// @ts-ignore BoxShadowValue isn't available in RN 0.75
|
|
7
|
-
import type { BoxShadowValue
|
|
7
|
+
import type { BoxShadowValue } from 'react-native';
|
|
8
8
|
|
|
9
9
|
import type { StyleProps } from '.';
|
|
10
10
|
import { ReanimatedError } from './errors';
|
|
@@ -114,13 +114,17 @@ function parseLength(length: string): number | null {
|
|
|
114
114
|
type ParsedBoxShadow = {
|
|
115
115
|
offsetX: number;
|
|
116
116
|
offsetY: number;
|
|
117
|
-
blurRadius?: number
|
|
117
|
+
blurRadius?: number;
|
|
118
118
|
spreadDistance?: number;
|
|
119
119
|
inset?: boolean;
|
|
120
120
|
color?: string;
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
type ExtendedStyleProps = StyleProps & {
|
|
124
|
+
boxShadow: string | readonly BoxShadowValue[] | ParsedBoxShadow[];
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export function processBoxShadow(props: ExtendedStyleProps) {
|
|
124
128
|
'worklet';
|
|
125
129
|
const result: Array<ParsedBoxShadow> = [];
|
|
126
130
|
|
|
@@ -196,7 +200,7 @@ export function processBoxShadow(props: StyleProps) {
|
|
|
196
200
|
parsedBoxShadow.blurRadius = value;
|
|
197
201
|
break;
|
|
198
202
|
case 'color':
|
|
199
|
-
parsedBoxShadow.color = rawBoxShadow.color;
|
|
203
|
+
parsedBoxShadow.color = rawBoxShadow.color as string;
|
|
200
204
|
break;
|
|
201
205
|
case 'inset':
|
|
202
206
|
parsedBoxShadow.inset = rawBoxShadow.inset;
|