@react-native-ohos/react-native-reanimated 3.18.1-rc.1 → 3.18.1-rc.3
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/LICENSE +21 -0
- package/README.OpenSource +11 -0
- package/README.md +10 -0
- package/harmony/reanimated/BuildProfile.ets +16 -16
- package/harmony/reanimated/build-profile.json5 +11 -11
- package/harmony/reanimated/oh-package.json5 +11 -11
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.cpp +86 -86
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.h +47 -47
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/PropsRegistry.cpp +68 -68
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/PropsRegistry.h +68 -68
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.cpp +101 -101
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.h +51 -51
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedCommitShadowNode.h +49 -49
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp +87 -87
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ReanimatedMountHook.h +33 -33
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp +95 -95
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Fabric/ShadowTreeCloner.h +29 -29
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationType.h +9 -9
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.cpp +232 -232
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.h +90 -90
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.cpp +870 -870
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.h +147 -147
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.cpp +91 -91
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.h +176 -176
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +971 -971
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.h +252 -252
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.cpp +231 -231
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.h +109 -109
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.cpp +56 -56
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.h +20 -20
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.cpp +70 -70
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.h +35 -35
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/CollectionUtils.h +14 -14
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/FeaturesConfig.cpp +5 -5
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/FeaturesConfig.h +19 -19
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/PlatformDepMethodsHolder.h +98 -98
- package/harmony/reanimated/src/main/cpp/Common/cpp/reanimated/Tools/ReanimatedSystraceSection.h +135 -135
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/NativeModules/WorkletsModuleProxy.cpp +47 -47
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/NativeModules/WorkletsModuleProxy.h +59 -59
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/NativeModules/WorkletsModuleProxySpec.cpp +27 -27
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/NativeModules/WorkletsModuleProxySpec.h +25 -25
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Registries/EventHandlerRegistry.cpp +94 -94
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Registries/EventHandlerRegistry.h +49 -49
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Registries/WorkletRuntimeRegistry.cpp +8 -8
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Registries/WorkletRuntimeRegistry.h +39 -39
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/SharedItems/Shareables.cpp +326 -326
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/SharedItems/Shareables.h +345 -345
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/AsyncQueue.cpp +52 -52
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/AsyncQueue.h +35 -35
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/Defs.h +10 -10
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/JSISerializer.cpp +342 -342
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/JSISerializer.h +47 -47
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/JSLogger.cpp +16 -16
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/JSLogger.h +20 -20
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/JSScheduler.cpp +20 -20
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/JSScheduler.h +29 -29
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/PlatformLogger.h +16 -16
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/ReanimatedJSIUtils.cpp +26 -26
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/ReanimatedJSIUtils.h +199 -199
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/ReanimatedVersion.cpp +95 -95
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/ReanimatedVersion.h +19 -19
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/SingleInstanceChecker.h +72 -72
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/ThreadSafeQueue.h +49 -49
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/UIScheduler.cpp +20 -20
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/UIScheduler.h +22 -22
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/WorkletEventHandler.cpp +29 -29
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/Tools/WorkletEventHandler.h +41 -41
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/RNRuntimeWorkletDecorator.cpp +16 -16
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/RNRuntimeWorkletDecorator.h +19 -19
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.cpp +112 -112
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/ReanimatedHermesRuntime.h +127 -127
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/ReanimatedRuntime.cpp +53 -53
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/ReanimatedRuntime.h +22 -22
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/RuntimeInitialization.md +191 -191
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/WorkletRuntime.cpp +155 -155
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/WorkletRuntime.h +90 -90
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeCollector.h +36 -36
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.cpp +182 -182
- package/harmony/reanimated/src/main/cpp/Common/cpp/worklets/WorkletRuntime/WorkletRuntimeDecorator.h +22 -22
- package/harmony/reanimated/src/main/cpp/ReanimatedModule.cpp +33 -2
- package/harmony/reanimated/src/main/cpp/WorkletsModule.cpp +57 -57
- package/harmony/reanimated/src/main/cpp/patches/AnimatedSensor/AnimatedSensorModule.cpp +89 -89
- package/harmony/reanimated/src/main/cpp/patches/NativeModules/ReanimatedModuleProxy.cpp +3 -0
- package/harmony/reanimated/src/main/module.json5 +12 -12
- package/harmony/reanimated/src/main/resources/base/element/color.json +7 -7
- package/harmony/reanimated/src/main/resources/base/element/string.json +15 -15
- package/harmony/reanimated/src/main/resources/base/profile/main_pages.json +5 -5
- package/harmony/reanimated/src/main/resources/en_US/element/string.json +15 -15
- package/harmony/reanimated/src/main/resources/zh_CN/element/string.json +15 -15
- package/harmony/reanimated/ts.ts +6 -6
- package/harmony/reanimated.har +0 -0
- package/package.json +50 -50
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
#include <reanimated/AnimatedSensor/AnimatedSensorModule.h>
|
|
2
|
-
|
|
3
|
-
#include <utility>
|
|
4
|
-
|
|
5
|
-
namespace reanimated {
|
|
6
|
-
|
|
7
|
-
AnimatedSensorModule::AnimatedSensorModule(
|
|
8
|
-
const PlatformDepMethodsHolder &platformDepMethodsHolder)
|
|
9
|
-
: platformRegisterSensorFunction_(platformDepMethodsHolder.registerSensor),
|
|
10
|
-
platformUnregisterSensorFunction_(
|
|
11
|
-
platformDepMethodsHolder.unregisterSensor) {}
|
|
12
|
-
|
|
13
|
-
AnimatedSensorModule::~AnimatedSensorModule() {
|
|
14
|
-
assert(sensorsIds_.empty());
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
jsi::Value AnimatedSensorModule::registerSensor(
|
|
18
|
-
jsi::Runtime &rt,
|
|
19
|
-
const std::shared_ptr<WorkletRuntime> &uiWorkletRuntime,
|
|
20
|
-
const jsi::Value &sensorTypeValue,
|
|
21
|
-
const jsi::Value &interval,
|
|
22
|
-
const jsi::Value &iosReferenceFrame,
|
|
23
|
-
const jsi::Value &sensorDataHandler) {
|
|
24
|
-
SensorType sensorType = static_cast<SensorType>(sensorTypeValue.asNumber());
|
|
25
|
-
|
|
26
|
-
auto shareableHandler = extractShareableOrThrow<ShareableWorklet>(
|
|
27
|
-
rt,
|
|
28
|
-
sensorDataHandler,
|
|
29
|
-
"[Reanimated] Sensor event handler must be a worklet.");
|
|
30
|
-
|
|
31
|
-
int sensorId = platformRegisterSensorFunction_(
|
|
32
|
-
sensorType,
|
|
33
|
-
interval.asNumber(),
|
|
34
|
-
iosReferenceFrame.asNumber(),
|
|
35
|
-
[sensorType,
|
|
36
|
-
shareableHandler,
|
|
37
|
-
weakUiWorkletRuntime = std::weak_ptr<WorkletRuntime>(uiWorkletRuntime)](
|
|
38
|
-
double newValues[], int orientationDegrees) {
|
|
39
|
-
auto uiWorkletRuntime = weakUiWorkletRuntime.lock();
|
|
40
|
-
if (uiWorkletRuntime == nullptr) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
jsi::Runtime &uiRuntime = uiWorkletRuntime->getJSIRuntime();
|
|
45
|
-
jsi::Object value(uiRuntime);
|
|
46
|
-
if (sensorType == SensorType::ROTATION_VECTOR) {
|
|
47
|
-
// TODO: timestamp should be provided by the platform implementation
|
|
48
|
-
// such that the native side has a chance of providing a true event
|
|
49
|
-
// timestamp
|
|
50
|
-
value.setProperty(uiRuntime, "qx", newValues[0]);
|
|
51
|
-
value.setProperty(uiRuntime, "qy", newValues[1]);
|
|
52
|
-
value.setProperty(uiRuntime, "qz", newValues[2]);
|
|
53
|
-
value.setProperty(uiRuntime, "qw", newValues[3]);
|
|
54
|
-
value.setProperty(uiRuntime, "yaw", newValues[4]);
|
|
55
|
-
value.setProperty(uiRuntime, "pitch", newValues[5]);
|
|
56
|
-
value.setProperty(uiRuntime, "roll", newValues[6]);
|
|
57
|
-
} else {
|
|
58
|
-
value.setProperty(uiRuntime, "x", newValues[0]);
|
|
59
|
-
value.setProperty(uiRuntime, "y", newValues[1]);
|
|
60
|
-
value.setProperty(uiRuntime, "z", newValues[2]);
|
|
61
|
-
}
|
|
62
|
-
value.setProperty(
|
|
63
|
-
uiRuntime, "interfaceOrientation", orientationDegrees);
|
|
64
|
-
|
|
65
|
-
uiWorkletRuntime->runGuarded(shareableHandler, value);
|
|
66
|
-
});
|
|
67
|
-
if (sensorId != -1) {
|
|
68
|
-
sensorsIds_.insert(sensorId);
|
|
69
|
-
}
|
|
70
|
-
return jsi::Value(sensorId);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
void AnimatedSensorModule::unregisterSensor(const jsi::Value &sensorId) {
|
|
74
|
-
// It is called during sensor hook unmounting
|
|
75
|
-
if (!sensorId.isNumber()) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
sensorsIds_.erase(sensorId.getNumber());
|
|
79
|
-
platformUnregisterSensorFunction_(sensorId.asNumber());
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
void AnimatedSensorModule::unregisterAllSensors() {
|
|
83
|
-
for (auto sensorId : sensorsIds_) {
|
|
84
|
-
platformUnregisterSensorFunction_(sensorId);
|
|
85
|
-
}
|
|
86
|
-
sensorsIds_.clear();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
} // namespace reanimated
|
|
1
|
+
#include <reanimated/AnimatedSensor/AnimatedSensorModule.h>
|
|
2
|
+
|
|
3
|
+
#include <utility>
|
|
4
|
+
|
|
5
|
+
namespace reanimated {
|
|
6
|
+
|
|
7
|
+
AnimatedSensorModule::AnimatedSensorModule(
|
|
8
|
+
const PlatformDepMethodsHolder &platformDepMethodsHolder)
|
|
9
|
+
: platformRegisterSensorFunction_(platformDepMethodsHolder.registerSensor),
|
|
10
|
+
platformUnregisterSensorFunction_(
|
|
11
|
+
platformDepMethodsHolder.unregisterSensor) {}
|
|
12
|
+
|
|
13
|
+
AnimatedSensorModule::~AnimatedSensorModule() {
|
|
14
|
+
assert(sensorsIds_.empty());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
jsi::Value AnimatedSensorModule::registerSensor(
|
|
18
|
+
jsi::Runtime &rt,
|
|
19
|
+
const std::shared_ptr<WorkletRuntime> &uiWorkletRuntime,
|
|
20
|
+
const jsi::Value &sensorTypeValue,
|
|
21
|
+
const jsi::Value &interval,
|
|
22
|
+
const jsi::Value &iosReferenceFrame,
|
|
23
|
+
const jsi::Value &sensorDataHandler) {
|
|
24
|
+
SensorType sensorType = static_cast<SensorType>(sensorTypeValue.asNumber());
|
|
25
|
+
|
|
26
|
+
auto shareableHandler = extractShareableOrThrow<ShareableWorklet>(
|
|
27
|
+
rt,
|
|
28
|
+
sensorDataHandler,
|
|
29
|
+
"[Reanimated] Sensor event handler must be a worklet.");
|
|
30
|
+
|
|
31
|
+
int sensorId = platformRegisterSensorFunction_(
|
|
32
|
+
sensorType,
|
|
33
|
+
interval.asNumber(),
|
|
34
|
+
iosReferenceFrame.asNumber(),
|
|
35
|
+
[sensorType,
|
|
36
|
+
shareableHandler,
|
|
37
|
+
weakUiWorkletRuntime = std::weak_ptr<WorkletRuntime>(uiWorkletRuntime)](
|
|
38
|
+
double newValues[], int orientationDegrees) {
|
|
39
|
+
auto uiWorkletRuntime = weakUiWorkletRuntime.lock();
|
|
40
|
+
if (uiWorkletRuntime == nullptr) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
jsi::Runtime &uiRuntime = uiWorkletRuntime->getJSIRuntime();
|
|
45
|
+
jsi::Object value(uiRuntime);
|
|
46
|
+
if (sensorType == SensorType::ROTATION_VECTOR) {
|
|
47
|
+
// TODO: timestamp should be provided by the platform implementation
|
|
48
|
+
// such that the native side has a chance of providing a true event
|
|
49
|
+
// timestamp
|
|
50
|
+
value.setProperty(uiRuntime, "qx", newValues[0]);
|
|
51
|
+
value.setProperty(uiRuntime, "qy", newValues[1]);
|
|
52
|
+
value.setProperty(uiRuntime, "qz", newValues[2]);
|
|
53
|
+
value.setProperty(uiRuntime, "qw", newValues[3]);
|
|
54
|
+
value.setProperty(uiRuntime, "yaw", newValues[4]);
|
|
55
|
+
value.setProperty(uiRuntime, "pitch", newValues[5]);
|
|
56
|
+
value.setProperty(uiRuntime, "roll", newValues[6]);
|
|
57
|
+
} else {
|
|
58
|
+
value.setProperty(uiRuntime, "x", newValues[0]);
|
|
59
|
+
value.setProperty(uiRuntime, "y", newValues[1]);
|
|
60
|
+
value.setProperty(uiRuntime, "z", newValues[2]);
|
|
61
|
+
}
|
|
62
|
+
value.setProperty(
|
|
63
|
+
uiRuntime, "interfaceOrientation", orientationDegrees);
|
|
64
|
+
|
|
65
|
+
uiWorkletRuntime->runGuarded(shareableHandler, value);
|
|
66
|
+
});
|
|
67
|
+
if (sensorId != -1) {
|
|
68
|
+
sensorsIds_.insert(sensorId);
|
|
69
|
+
}
|
|
70
|
+
return jsi::Value(sensorId);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
void AnimatedSensorModule::unregisterSensor(const jsi::Value &sensorId) {
|
|
74
|
+
// It is called during sensor hook unmounting
|
|
75
|
+
if (!sensorId.isNumber()) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
sensorsIds_.erase(sensorId.getNumber());
|
|
79
|
+
platformUnregisterSensorFunction_(sensorId.asNumber());
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
void AnimatedSensorModule::unregisterAllSensors() {
|
|
83
|
+
for (auto sensorId : sensorsIds_) {
|
|
84
|
+
platformUnregisterSensorFunction_(sensorId);
|
|
85
|
+
}
|
|
86
|
+
sensorsIds_.clear();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
} // namespace reanimated
|
|
@@ -620,6 +620,9 @@ jsi::Value ReanimatedModuleProxy::filterNonAnimatableProps(
|
|
|
620
620
|
for (size_t i = 0; i < propNames.size(rt); ++i) {
|
|
621
621
|
const std::string &propName =
|
|
622
622
|
propNames.getValueAtIndex(rt, i).asString(rt).utf8(rt);
|
|
623
|
+
if (propName == "transformOrigin") {
|
|
624
|
+
continue;
|
|
625
|
+
}
|
|
623
626
|
if (!collection::contains(animatablePropNames_, propName)) {
|
|
624
627
|
hasAnyNonAnimatableProp = true;
|
|
625
628
|
const auto &propNameStr = propName.c_str();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"module": {
|
|
3
|
-
"name": "reanimated",
|
|
4
|
-
"type": "har",
|
|
5
|
-
"description": "$string:module_desc",
|
|
6
|
-
"mainElement": "ReanimatedAbility",
|
|
7
|
-
"deviceTypes": [
|
|
8
|
-
"phone",
|
|
9
|
-
"tablet",
|
|
10
|
-
"2in1"
|
|
11
|
-
],
|
|
12
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"module": {
|
|
3
|
+
"name": "reanimated",
|
|
4
|
+
"type": "har",
|
|
5
|
+
"description": "$string:module_desc",
|
|
6
|
+
"mainElement": "ReanimatedAbility",
|
|
7
|
+
"deviceTypes": [
|
|
8
|
+
"phone",
|
|
9
|
+
"tablet",
|
|
10
|
+
"2in1"
|
|
11
|
+
],
|
|
12
|
+
}
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"color": [
|
|
3
|
-
{
|
|
4
|
-
"name": "start_window_background",
|
|
5
|
-
"value": "#FFFFFF"
|
|
6
|
-
}
|
|
7
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"color": [
|
|
3
|
+
{
|
|
4
|
+
"name": "start_window_background",
|
|
5
|
+
"value": "#FFFFFF"
|
|
6
|
+
}
|
|
7
|
+
]
|
|
8
8
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"string": [
|
|
3
|
-
{
|
|
4
|
-
"name": "module_desc",
|
|
5
|
-
"value": "module description"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "ReanimatedAbility_desc",
|
|
9
|
-
"value": "description"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "ReanimatedAbility_label",
|
|
13
|
-
"value": "label"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"string": [
|
|
3
|
+
{
|
|
4
|
+
"name": "module_desc",
|
|
5
|
+
"value": "module description"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "ReanimatedAbility_desc",
|
|
9
|
+
"value": "description"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "ReanimatedAbility_label",
|
|
13
|
+
"value": "label"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"src": [
|
|
3
|
-
"pages/Index"
|
|
4
|
-
]
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"src": [
|
|
3
|
+
"pages/Index"
|
|
4
|
+
]
|
|
5
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"string": [
|
|
3
|
-
{
|
|
4
|
-
"name": "module_desc",
|
|
5
|
-
"value": "module description"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "ReanimatedAbility_desc",
|
|
9
|
-
"value": "description"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "ReanimatedAbility_label",
|
|
13
|
-
"value": "label"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"string": [
|
|
3
|
+
{
|
|
4
|
+
"name": "module_desc",
|
|
5
|
+
"value": "module description"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "ReanimatedAbility_desc",
|
|
9
|
+
"value": "description"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "ReanimatedAbility_label",
|
|
13
|
+
"value": "label"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
16
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"string": [
|
|
3
|
-
{
|
|
4
|
-
"name": "module_desc",
|
|
5
|
-
"value": "模块描述"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "ReanimatedAbility_desc",
|
|
9
|
-
"value": "description"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "ReanimatedAbility_label",
|
|
13
|
-
"value": "label"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"string": [
|
|
3
|
+
{
|
|
4
|
+
"name": "module_desc",
|
|
5
|
+
"value": "模块描述"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "ReanimatedAbility_desc",
|
|
9
|
+
"value": "description"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "ReanimatedAbility_label",
|
|
13
|
+
"value": "label"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
16
|
}
|
package/harmony/reanimated/ts.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
-
// Use of this source code is governed by a MIT license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
export * from './src/main/ets/ReanimatedPackage';
|
|
6
|
-
export * from './src/main/ets/ReanimatedModule';
|
|
1
|
+
// Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
+
// Use of this source code is governed by a MIT license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
export * from './src/main/ets/ReanimatedPackage';
|
|
6
|
+
export * from './src/main/ets/ReanimatedModule';
|
package/harmony/reanimated.har
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-native-ohos/react-native-reanimated",
|
|
3
|
-
"harmony": {
|
|
4
|
-
"alias": "react-native-reanimated",
|
|
5
|
-
"redirectInternalImports": true
|
|
6
|
-
},
|
|
7
|
-
"version": "3.18.1-rc.
|
|
8
|
-
"description": "",
|
|
9
|
-
"main": "lib/index.js",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"pack:prod": "npm pack",
|
|
13
|
-
"prepack": "npm run build",
|
|
14
|
-
"prepublishOnly": "npm run prepack && react-native verify-package-harmony --package-path . --skip-checks oh_package_name_is_derived_from_npm_package_name",
|
|
15
|
-
"update_version": "node ./scripts/update-version.js",
|
|
16
|
-
"deploy": "node ./scripts/deploy.js"
|
|
17
|
-
},
|
|
18
|
-
"peerDependencies": {
|
|
19
|
-
"react": "*",
|
|
20
|
-
"react-native": "*",
|
|
21
|
-
"react-native-harmony": "*",
|
|
22
|
-
"react-native-reanimated": "
|
|
23
|
-
},
|
|
24
|
-
"author": "",
|
|
25
|
-
"license": "ISC",
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@types/node": "^20.11.4",
|
|
28
|
-
"react-native-reanimated": "
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@babel/cli": "^7.23.4",
|
|
32
|
-
"@babel/core": "^7.23.7",
|
|
33
|
-
"@babel/preset-env": "^7.23.8",
|
|
34
|
-
"@babel/preset-typescript": "^7.23.3",
|
|
35
|
-
"@babel/runtime": "^7.23.8",
|
|
36
|
-
"@types/invariant": "^2.2.35",
|
|
37
|
-
"@types/react": "^18.2.15",
|
|
38
|
-
"metro-react-native-babel-preset": "^0.77.0",
|
|
39
|
-
"react": "18.3.1",
|
|
40
|
-
"react-native": "0.77.1",
|
|
41
|
-
"react-native-builder-bob": "^0.21.3",
|
|
42
|
-
"typescript": "^5.1.6"
|
|
43
|
-
},
|
|
44
|
-
"files": [
|
|
45
|
-
"lib",
|
|
46
|
-
"harmony",
|
|
47
|
-
"src",
|
|
48
|
-
"./harmony.tar.gz"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/react-native-reanimated",
|
|
3
|
+
"harmony": {
|
|
4
|
+
"alias": "react-native-reanimated",
|
|
5
|
+
"redirectInternalImports": true
|
|
6
|
+
},
|
|
7
|
+
"version": "3.18.1-rc.3",
|
|
8
|
+
"description": "",
|
|
9
|
+
"main": "lib/index.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"pack:prod": "npm pack",
|
|
13
|
+
"prepack": "npm run build",
|
|
14
|
+
"prepublishOnly": "npm run prepack && react-native verify-package-harmony --package-path . --skip-checks oh_package_name_is_derived_from_npm_package_name",
|
|
15
|
+
"update_version": "node ./scripts/update-version.js",
|
|
16
|
+
"deploy": "node ./scripts/deploy.js"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"react": "*",
|
|
20
|
+
"react-native": "*",
|
|
21
|
+
"react-native-harmony": "*",
|
|
22
|
+
"react-native-reanimated": "3.18.0"
|
|
23
|
+
},
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@types/node": "^20.11.4",
|
|
28
|
+
"react-native-reanimated": "3.18.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@babel/cli": "^7.23.4",
|
|
32
|
+
"@babel/core": "^7.23.7",
|
|
33
|
+
"@babel/preset-env": "^7.23.8",
|
|
34
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
35
|
+
"@babel/runtime": "^7.23.8",
|
|
36
|
+
"@types/invariant": "^2.2.35",
|
|
37
|
+
"@types/react": "^18.2.15",
|
|
38
|
+
"metro-react-native-babel-preset": "^0.77.0",
|
|
39
|
+
"react": "18.3.1",
|
|
40
|
+
"react-native": "0.77.1",
|
|
41
|
+
"react-native-builder-bob": "^0.21.3",
|
|
42
|
+
"typescript": "^5.1.6"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"lib",
|
|
46
|
+
"harmony",
|
|
47
|
+
"src",
|
|
48
|
+
"./harmony.tar.gz"
|
|
49
|
+
]
|
|
50
|
+
}
|