@react-native-ohos/react-native-reanimated 3.18.1-rc.2 → 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.
|
@@ -162,7 +162,25 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt)
|
|
|
162
162
|
}
|
|
163
163
|
return instance->getTurboModule<WorkletsModule>("WorkletsModule");
|
|
164
164
|
};
|
|
165
|
-
auto
|
|
165
|
+
auto workletsModulePtr = workletsModule();
|
|
166
|
+
if (!workletsModulePtr) {
|
|
167
|
+
LOG(ERROR) << "ReanimatedModule: Failed to get WorkletsModule";
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
auto workletsModuleProxy = workletsModulePtr->getWorkletsModuleProxy();
|
|
171
|
+
if (!workletsModuleProxy) {
|
|
172
|
+
LOG(ERROR) << "ReanimatedModule: WorkletsModuleProxy is null, WorkletsModule may not be initialized yet";
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (!jsInvoker_) {
|
|
176
|
+
LOG(ERROR) << "ReanimatedModule: jsInvoker_ is null";
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (!m_ctx.scheduler) {
|
|
180
|
+
LOG(ERROR) << "ReanimatedModule: m_ctx.scheduler is null";
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
auto nativeReanimatedModule = std::make_shared<ReanimatedModuleProxy>(workletsModuleProxy,
|
|
166
184
|
rt, jsInvoker_, platformDepMethodsHolder, isBridgeless, isReducedMotion);
|
|
167
185
|
weakNativeReanimatedModule_ = nativeReanimatedModule;
|
|
168
186
|
nativeReanimatedModule->init(platformDepMethodsHolder);
|
|
@@ -203,11 +221,24 @@ void ReanimatedModule::installTurboModule(facebook::jsi::Runtime &rt)
|
|
|
203
221
|
}
|
|
204
222
|
return nativeReanimatedModule->handleRawEvent(rawEvent, frameTime);
|
|
205
223
|
});
|
|
206
|
-
m_ctx.scheduler
|
|
224
|
+
if (m_ctx.scheduler) {
|
|
225
|
+
m_ctx.scheduler->addEventListener(eventListener);
|
|
226
|
+
} else {
|
|
227
|
+
LOG(ERROR) << "ReanimatedModule: Cannot add event listener, scheduler is null";
|
|
228
|
+
}
|
|
207
229
|
}
|
|
230
|
+
|
|
208
231
|
void ReanimatedModule::injectDependencies(facebook::jsi::Runtime & /* rt */)
|
|
209
232
|
{
|
|
233
|
+
if (!m_ctx.scheduler) {
|
|
234
|
+
LOG(ERROR) << "ReanimatedModule::injectDependencies: scheduler is null";
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
210
237
|
const auto uiManager = m_ctx.scheduler->getUIManager();
|
|
238
|
+
if (!uiManager) {
|
|
239
|
+
LOG(WARNING) << "ReanimatedModule::injectDependencies: uiManager is null";
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
211
242
|
if (auto nativeReanimatedModule = weakNativeReanimatedModule_.lock()) {
|
|
212
243
|
nativeReanimatedModule->initializeFabric(uiManager);
|
|
213
244
|
}
|
package/harmony/reanimated.har
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
"alias": "react-native-reanimated",
|
|
5
5
|
"redirectInternalImports": true
|
|
6
6
|
},
|
|
7
|
-
"version": "3.18.1-rc.
|
|
7
|
+
"version": "3.18.1-rc.3",
|
|
8
8
|
"description": "",
|
|
9
9
|
"main": "lib/index.js",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"pack:prod": "npm pack",
|
|
13
13
|
"prepack": "npm run build",
|
|
14
|
-
"prepublishOnly": "npm run prepack ",
|
|
14
|
+
"prepublishOnly": "npm run prepack && react-native verify-package-harmony --package-path . --skip-checks oh_package_name_is_derived_from_npm_package_name",
|
|
15
15
|
"update_version": "node ./scripts/update-version.js",
|
|
16
16
|
"deploy": "node ./scripts/deploy.js"
|
|
17
17
|
},
|