react-native-reanimated 2.2.3 → 2.2.4
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/android/build.gradle +17 -5
- package/android/react-native-reanimated-67-hermes.aar +0 -0
- package/android/react-native-reanimated-67-jsc.aar +0 -0
- package/lib/reanimated2/js-reanimated/index.web.js +7 -1
- package/lib/reanimated2/platform-specific/RNRenderer.web.js +2 -0
- package/package.json +3 -3
- package/src/reanimated2/js-reanimated/index.web.ts +8 -1
- package/src/reanimated2/platform-specific/RNRenderer.web.ts +2 -0
package/android/build.gradle
CHANGED
|
@@ -31,14 +31,14 @@ abstract class replaceSoTask extends DefaultTask {
|
|
|
31
31
|
def getCurrentFlavor() {
|
|
32
32
|
Gradle gradle = getGradle()
|
|
33
33
|
String taskRequestName = gradle.getStartParameter().getTaskRequests().toString()
|
|
34
|
-
Pattern pattern = Pattern.compile("(assemble|install|generate)(\\w
|
|
34
|
+
Pattern pattern = Pattern.compile("(assemble|bundle|install|generate)(\\w*)(Release|Debug)")
|
|
35
35
|
Matcher matcher = pattern.matcher(taskRequestName)
|
|
36
36
|
|
|
37
37
|
if(matcher.find()) {
|
|
38
38
|
return matcher.group(2)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
return ""
|
|
41
|
+
return "NOT-FOUND"
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
def replaceSoTaskDebug
|
|
@@ -58,8 +58,9 @@ rootProject.getSubprojects().forEach({project ->
|
|
|
58
58
|
|
|
59
59
|
if(project.getProperties().get("android") && Integer.parseInt(minor) < 65) {
|
|
60
60
|
def projectProperties = project.getProperties()
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
final NOTFOUND = "NOT-FOUND"
|
|
62
|
+
if(!NOTFOUND.equals(getCurrentFlavor()) && (!projectProperties.get("reanimated")
|
|
63
|
+
|| (projectProperties.get("reanimated") && projectProperties.get("reanimated").get("enablePackagingOptions")))
|
|
63
64
|
) {
|
|
64
65
|
def flavorString = getCurrentFlavor()
|
|
65
66
|
replaceSoTask.appName = project.getProperties().path
|
|
@@ -82,4 +83,15 @@ rootProject.getSubprojects().forEach({project ->
|
|
|
82
83
|
}
|
|
83
84
|
})
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
def minorCopy = Integer.parseInt(minor)
|
|
87
|
+
def aar = file("react-native-reanimated-${minorCopy}-${engine}.aar")
|
|
88
|
+
|
|
89
|
+
while (!aar.exists()) {
|
|
90
|
+
minorCopy -= 1
|
|
91
|
+
aar = file("react-native-reanimated-${minorCopy}-${engine}.aar")
|
|
92
|
+
if (minorCopy < 63) {
|
|
93
|
+
throw new GradleException('No aar for react-native-reanimated found.')
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
artifacts.add("default", aar)
|
|
Binary file
|
|
Binary file
|
|
@@ -11,9 +11,15 @@ export const _updatePropsJS = (_viewTag, _viewName, updates, viewRef) => {
|
|
|
11
11
|
acc[index][key] = value;
|
|
12
12
|
return acc;
|
|
13
13
|
}, [{}, {}]);
|
|
14
|
-
viewRef.
|
|
14
|
+
setNativeProps(viewRef._component, rawStyles);
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
+
const setNativeProps = (component, style) => {
|
|
18
|
+
const previousStyle = component.previousStyle ? component.previousStyle : {};
|
|
19
|
+
const currentStyle = Object.assign(Object.assign({}, previousStyle), style);
|
|
20
|
+
component.previousStyle = currentStyle;
|
|
21
|
+
component.setNativeProps({ style: currentStyle });
|
|
22
|
+
};
|
|
17
23
|
global._setGlobalConsole = (_val) => {
|
|
18
24
|
// noop
|
|
19
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-reanimated",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "More powerful alternative to Animated library for React Native.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/babel__generator": "^7.6.2",
|
|
82
82
|
"@types/babel__traverse": "^7.0.15",
|
|
83
83
|
"@types/jest": "^26.0.15",
|
|
84
|
-
"@types/react-native": "^0.
|
|
84
|
+
"@types/react-native": "^0.66.1",
|
|
85
85
|
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
|
86
86
|
"@typescript-eslint/parser": "^4.15.1",
|
|
87
87
|
"babel-eslint": "^10.0.3",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"lint-staged": "^10.2.11",
|
|
101
101
|
"prettier": "^2.2.1",
|
|
102
102
|
"react": "17.0.1",
|
|
103
|
-
"react-native": "0.
|
|
103
|
+
"react-native": "0.67.0-rc.2",
|
|
104
104
|
"react-native-gesture-handler": "^1.6.1",
|
|
105
105
|
"react-test-renderer": "17.0.1",
|
|
106
106
|
"release-it": "^13.1.1",
|
|
@@ -18,10 +18,17 @@ export const _updatePropsJS = (_viewTag, _viewName, updates, viewRef) => {
|
|
|
18
18
|
[{}, {}]
|
|
19
19
|
);
|
|
20
20
|
|
|
21
|
-
viewRef.
|
|
21
|
+
setNativeProps(viewRef._component, rawStyles);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
const setNativeProps = (component, style) => {
|
|
26
|
+
const previousStyle = component.previousStyle ? component.previousStyle : {};
|
|
27
|
+
const currentStyle = { ...previousStyle, ...style };
|
|
28
|
+
component.previousStyle = currentStyle;
|
|
29
|
+
component.setNativeProps({ style: currentStyle });
|
|
30
|
+
};
|
|
31
|
+
|
|
25
32
|
global._setGlobalConsole = (_val) => {
|
|
26
33
|
// noop
|
|
27
34
|
};
|