@react-native-ohos/react-native-reanimated 4.0.0-rc.1 → 4.0.1
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/harmony/reanimated/BuildProfile.ets +16 -16
- package/harmony/reanimated/oh-package.json5 +1 -1
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSAngle.cpp +1 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/common/values/CSSDiscreteArray.h +1 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/CSS/svg/values/SVGStrokeDashArray.cpp +1 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +4 -0
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +2 -0
- package/harmony/reanimated/src/main/cpp/ReanimatedModule.cpp +3 -0
- package/harmony/reanimated.har +0 -0
- package/package.json +3 -2
- package/scripts/validate-worklets-version.js +7 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
|
3
|
-
*/
|
|
4
|
-
export const HAR_VERSION = '4.
|
|
5
|
-
export const BUILD_MODE_NAME = 'debug';
|
|
6
|
-
export const DEBUG = true;
|
|
7
|
-
export const TARGET_NAME = 'default';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* BuildProfile Class is used only for compatibility purposes.
|
|
11
|
-
*/
|
|
12
|
-
export default class BuildProfile {
|
|
13
|
-
static readonly HAR_VERSION = HAR_VERSION;
|
|
14
|
-
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
|
15
|
-
static readonly DEBUG = DEBUG;
|
|
16
|
-
static readonly TARGET_NAME = TARGET_NAME;
|
|
1
|
+
/**
|
|
2
|
+
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
|
3
|
+
*/
|
|
4
|
+
export const HAR_VERSION = '4.0.1';
|
|
5
|
+
export const BUILD_MODE_NAME = 'debug';
|
|
6
|
+
export const DEBUG = true;
|
|
7
|
+
export const TARGET_NAME = 'default';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* BuildProfile Class is used only for compatibility purposes.
|
|
11
|
+
*/
|
|
12
|
+
export default class BuildProfile {
|
|
13
|
+
static readonly HAR_VERSION = HAR_VERSION;
|
|
14
|
+
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
|
15
|
+
static readonly DEBUG = DEBUG;
|
|
16
|
+
static readonly TARGET_NAME = TARGET_NAME;
|
|
17
17
|
}
|
|
@@ -190,6 +190,10 @@ void ReanimatedModuleProxy::init(const PlatformDepMethodsHolder &platformDepMeth
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
ReanimatedModuleProxy::~ReanimatedModuleProxy() {
|
|
193
|
+
invalidate();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
void ReanimatedModuleProxy::invalidate() {
|
|
193
197
|
// event handler registry and frame callbacks store some JSI values from UI
|
|
194
198
|
// runtime, so they have to go away before we tear down the runtime
|
|
195
199
|
eventHandlerRegistry_.reset();
|
|
@@ -44,6 +44,9 @@ ReanimatedModule::~ReanimatedModule() {
|
|
|
44
44
|
if (keyboardEventDataUpdater_) {
|
|
45
45
|
keyboardEventDataUpdater_ = nullptr;
|
|
46
46
|
}
|
|
47
|
+
if (auto nativeReanimatedModule = weakNativeReanimatedModule_.lock()) {
|
|
48
|
+
nativeReanimatedModule->invalidate();
|
|
49
|
+
}
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt) {
|
package/harmony/reanimated.har
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"alias": "react-native-reanimated",
|
|
5
5
|
"redirectInternalImports": true
|
|
6
6
|
},
|
|
7
|
-
"version": "4.0.
|
|
7
|
+
"version": "4.0.1",
|
|
8
8
|
"description": "",
|
|
9
9
|
"main": "lib/index.js",
|
|
10
10
|
"scripts": {
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/node": "^24.0.14",
|
|
27
|
-
"react-native-reanimated": "4.2.1"
|
|
27
|
+
"react-native-reanimated": "4.2.1",
|
|
28
|
+
"semver": "7.7.3"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@babel/core": "7.28.4",
|
|
@@ -8,6 +8,7 @@ const compatibilityFile = require('../compatibility.json');
|
|
|
8
8
|
|
|
9
9
|
const architecture = 'fabric';
|
|
10
10
|
|
|
11
|
+
const HARMONY_WORKLET_LIBNAME = "@react-native-ohos/react-native-worklets";
|
|
11
12
|
/**
|
|
12
13
|
* @param {string} reanimatedVersion
|
|
13
14
|
* @returns {{ ok: boolean; message?: string }}
|
|
@@ -15,8 +16,12 @@ const architecture = 'fabric';
|
|
|
15
16
|
function validateVersion(reanimatedVersion) {
|
|
16
17
|
let workletsVersion;
|
|
17
18
|
try {
|
|
18
|
-
const { version } = require('react-native-worklets/package.json');
|
|
19
|
-
|
|
19
|
+
const { version, name , dependencies } = require('react-native-worklets/package.json');
|
|
20
|
+
if (name === HARMONY_WORKLET_LIBNAME && dependencies) {
|
|
21
|
+
workletsVersion = dependencies['react-native-worklets'];
|
|
22
|
+
} else{
|
|
23
|
+
workletsVersion = version;
|
|
24
|
+
}
|
|
20
25
|
} catch (_e) {
|
|
21
26
|
return {
|
|
22
27
|
ok: false,
|