react-native 0.84.0-nightly-20251203-a5e6addc6 → 0.84.0-nightly-20251205-95cc1e767
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/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +194 -186
- package/React/Fabric/RCTSurfaceTouchHandler.mm +1 -1
- package/ReactAndroid/api/ReactAndroid.api +0 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt +85 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyOptimizer.java +9 -91
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +0 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +4 -23
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +1 -3
- package/ReactAndroid/src/main/jni/CMakeLists.txt +7 -0
- package/ReactAndroid/src/main/jni/react/devsupport/CMakeLists.txt +7 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsinspector-modern/tests/TracingTest.cpp +18 -0
- package/ReactCommon/jsinspector-modern/tracing/FrameTimingSequence.h +4 -2
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.cpp +14 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.cpp +28 -4
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.h +13 -1
- package/ReactCommon/jsinspector-modern/tracing/TracingCategory.h +11 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +51 -33
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/runtime/ReactInstance.cpp +1 -1
- package/package.json +10 -10
- package/scripts/cocoapods/utils.rb +2 -0
- package/scripts/codegen/generate-artifacts-executor/generateSchemaInfos.js +7 -6
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeKind.kt +0 -32
- /package/ReactCommon/jsi/jsi/{hermes.h → hermes-interfaces.h} +0 -0
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 84;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20251205-95cc1e767';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(84),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20251205-95cc1e767",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -281,6 +281,7 @@ protected:
|
|
|
281
281
|
methodMap_["enableVirtualViewWindowFocusDetection"] = MethodMetadata {.argCount = 0, .invoker = __enableVirtualViewWindowFocusDetection};
|
|
282
282
|
methodMap_["enableWebPerformanceAPIsByDefault"] = MethodMetadata {.argCount = 0, .invoker = __enableWebPerformanceAPIsByDefault};
|
|
283
283
|
methodMap_["fixMappingOfEventPrioritiesBetweenFabricAndReact"] = MethodMetadata {.argCount = 0, .invoker = __fixMappingOfEventPrioritiesBetweenFabricAndReact};
|
|
284
|
+
methodMap_["fixTextClippingAndroid15useBoundsForWidth"] = MethodMetadata {.argCount = 0, .invoker = __fixTextClippingAndroid15useBoundsForWidth};
|
|
284
285
|
methodMap_["fuseboxAssertSingleHostState"] = MethodMetadata {.argCount = 0, .invoker = __fuseboxAssertSingleHostState};
|
|
285
286
|
methodMap_["fuseboxEnabledRelease"] = MethodMetadata {.argCount = 0, .invoker = __fuseboxEnabledRelease};
|
|
286
287
|
methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {.argCount = 0, .invoker = __fuseboxNetworkInspectionEnabled};
|
|
@@ -722,6 +723,13 @@ private:
|
|
|
722
723
|
return bridging::callFromJs<bool>(rt, &T::fixMappingOfEventPrioritiesBetweenFabricAndReact, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
|
|
723
724
|
}
|
|
724
725
|
|
|
726
|
+
static jsi::Value __fixTextClippingAndroid15useBoundsForWidth(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
727
|
+
static_assert(
|
|
728
|
+
bridging::getParameterCount(&T::fixTextClippingAndroid15useBoundsForWidth) == 1,
|
|
729
|
+
"Expected fixTextClippingAndroid15useBoundsForWidth(...) to have 1 parameters");
|
|
730
|
+
return bridging::callFromJs<bool>(rt, &T::fixTextClippingAndroid15useBoundsForWidth, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
|
|
731
|
+
}
|
|
732
|
+
|
|
725
733
|
static jsi::Value __fuseboxAssertSingleHostState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
726
734
|
static_assert(
|
|
727
735
|
bridging::getParameterCount(&T::fuseboxAssertSingleHostState) == 1,
|
|
@@ -2046,53 +2054,6 @@ private:
|
|
|
2046
2054
|
};
|
|
2047
2055
|
|
|
2048
2056
|
|
|
2049
|
-
template <typename T>
|
|
2050
|
-
class JSI_EXPORT NativeAppearanceCxxSpec : public TurboModule {
|
|
2051
|
-
public:
|
|
2052
|
-
static constexpr std::string_view kModuleName = "Appearance";
|
|
2053
|
-
|
|
2054
|
-
protected:
|
|
2055
|
-
NativeAppearanceCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeAppearanceCxxSpec::kModuleName}, jsInvoker) {
|
|
2056
|
-
methodMap_["getColorScheme"] = MethodMetadata {.argCount = 0, .invoker = __getColorScheme};
|
|
2057
|
-
methodMap_["setColorScheme"] = MethodMetadata {.argCount = 1, .invoker = __setColorScheme};
|
|
2058
|
-
methodMap_["addListener"] = MethodMetadata {.argCount = 1, .invoker = __addListener};
|
|
2059
|
-
methodMap_["removeListeners"] = MethodMetadata {.argCount = 1, .invoker = __removeListeners};
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
private:
|
|
2063
|
-
static jsi::Value __getColorScheme(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2064
|
-
static_assert(
|
|
2065
|
-
bridging::getParameterCount(&T::getColorScheme) == 1,
|
|
2066
|
-
"Expected getColorScheme(...) to have 1 parameters");
|
|
2067
|
-
auto result = bridging::callFromJs<std::optional<jsi::String>>(rt, &T::getColorScheme, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return result ? jsi::Value(std::move(*result)) : jsi::Value::null();
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
static jsi::Value __setColorScheme(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2071
|
-
static_assert(
|
|
2072
|
-
bridging::getParameterCount(&T::setColorScheme) == 2,
|
|
2073
|
-
"Expected setColorScheme(...) to have 2 parameters");
|
|
2074
|
-
bridging::callFromJs<void>(rt, &T::setColorScheme, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2075
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
static jsi::Value __addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2079
|
-
static_assert(
|
|
2080
|
-
bridging::getParameterCount(&T::addListener) == 2,
|
|
2081
|
-
"Expected addListener(...) to have 2 parameters");
|
|
2082
|
-
bridging::callFromJs<void>(rt, &T::addListener, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2083
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
static jsi::Value __removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2087
|
-
static_assert(
|
|
2088
|
-
bridging::getParameterCount(&T::removeListeners) == 2,
|
|
2089
|
-
"Expected removeListeners(...) to have 2 parameters");
|
|
2090
|
-
bridging::callFromJs<void>(rt, &T::removeListeners, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2091
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());return jsi::Value::undefined();
|
|
2092
|
-
}
|
|
2093
|
-
};
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
2057
|
#pragma mark - NativeAppStateAppState
|
|
2097
2058
|
|
|
2098
2059
|
template <typename P0>
|
|
@@ -2222,6 +2183,53 @@ private:
|
|
|
2222
2183
|
};
|
|
2223
2184
|
|
|
2224
2185
|
|
|
2186
|
+
template <typename T>
|
|
2187
|
+
class JSI_EXPORT NativeAppearanceCxxSpec : public TurboModule {
|
|
2188
|
+
public:
|
|
2189
|
+
static constexpr std::string_view kModuleName = "Appearance";
|
|
2190
|
+
|
|
2191
|
+
protected:
|
|
2192
|
+
NativeAppearanceCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeAppearanceCxxSpec::kModuleName}, jsInvoker) {
|
|
2193
|
+
methodMap_["getColorScheme"] = MethodMetadata {.argCount = 0, .invoker = __getColorScheme};
|
|
2194
|
+
methodMap_["setColorScheme"] = MethodMetadata {.argCount = 1, .invoker = __setColorScheme};
|
|
2195
|
+
methodMap_["addListener"] = MethodMetadata {.argCount = 1, .invoker = __addListener};
|
|
2196
|
+
methodMap_["removeListeners"] = MethodMetadata {.argCount = 1, .invoker = __removeListeners};
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
private:
|
|
2200
|
+
static jsi::Value __getColorScheme(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2201
|
+
static_assert(
|
|
2202
|
+
bridging::getParameterCount(&T::getColorScheme) == 1,
|
|
2203
|
+
"Expected getColorScheme(...) to have 1 parameters");
|
|
2204
|
+
auto result = bridging::callFromJs<std::optional<jsi::String>>(rt, &T::getColorScheme, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return result ? jsi::Value(std::move(*result)) : jsi::Value::null();
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
static jsi::Value __setColorScheme(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2208
|
+
static_assert(
|
|
2209
|
+
bridging::getParameterCount(&T::setColorScheme) == 2,
|
|
2210
|
+
"Expected setColorScheme(...) to have 2 parameters");
|
|
2211
|
+
bridging::callFromJs<void>(rt, &T::setColorScheme, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2212
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
static jsi::Value __addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2216
|
+
static_assert(
|
|
2217
|
+
bridging::getParameterCount(&T::addListener) == 2,
|
|
2218
|
+
"Expected addListener(...) to have 2 parameters");
|
|
2219
|
+
bridging::callFromJs<void>(rt, &T::addListener, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2220
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
static jsi::Value __removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2224
|
+
static_assert(
|
|
2225
|
+
bridging::getParameterCount(&T::removeListeners) == 2,
|
|
2226
|
+
"Expected removeListeners(...) to have 2 parameters");
|
|
2227
|
+
bridging::callFromJs<void>(rt, &T::removeListeners, static_cast<NativeAppearanceCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2228
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());return jsi::Value::undefined();
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2232
|
+
|
|
2225
2233
|
#pragma mark - NativeBlobModuleConstants
|
|
2226
2234
|
|
|
2227
2235
|
template <typename P0, typename P1>
|
|
@@ -2380,6 +2388,145 @@ private:
|
|
|
2380
2388
|
};
|
|
2381
2389
|
|
|
2382
2390
|
|
|
2391
|
+
template <typename T>
|
|
2392
|
+
class JSI_EXPORT NativeDevLoadingViewCxxSpec : public TurboModule {
|
|
2393
|
+
public:
|
|
2394
|
+
static constexpr std::string_view kModuleName = "DevLoadingView";
|
|
2395
|
+
|
|
2396
|
+
protected:
|
|
2397
|
+
NativeDevLoadingViewCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeDevLoadingViewCxxSpec::kModuleName}, jsInvoker) {
|
|
2398
|
+
methodMap_["showMessage"] = MethodMetadata {.argCount = 4, .invoker = __showMessage};
|
|
2399
|
+
methodMap_["hide"] = MethodMetadata {.argCount = 0, .invoker = __hide};
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
private:
|
|
2403
|
+
static jsi::Value __showMessage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2404
|
+
static_assert(
|
|
2405
|
+
bridging::getParameterCount(&T::showMessage) == 5,
|
|
2406
|
+
"Expected showMessage(...) to have 5 parameters");
|
|
2407
|
+
bridging::callFromJs<void>(rt, &T::showMessage, static_cast<NativeDevLoadingViewCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2408
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
2409
|
+
count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asNumber()),
|
|
2410
|
+
count <= 2 || args[2].isNull() || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asNumber()),
|
|
2411
|
+
count <= 3 || args[3].isNull() || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asBool()));return jsi::Value::undefined();
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
static jsi::Value __hide(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2415
|
+
static_assert(
|
|
2416
|
+
bridging::getParameterCount(&T::hide) == 1,
|
|
2417
|
+
"Expected hide(...) to have 1 parameters");
|
|
2418
|
+
bridging::callFromJs<void>(rt, &T::hide, static_cast<NativeDevLoadingViewCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2419
|
+
}
|
|
2420
|
+
};
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
template <typename T>
|
|
2424
|
+
class JSI_EXPORT NativeDevSettingsCxxSpec : public TurboModule {
|
|
2425
|
+
public:
|
|
2426
|
+
static constexpr std::string_view kModuleName = "DevSettings";
|
|
2427
|
+
|
|
2428
|
+
protected:
|
|
2429
|
+
NativeDevSettingsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeDevSettingsCxxSpec::kModuleName}, jsInvoker) {
|
|
2430
|
+
methodMap_["reload"] = MethodMetadata {.argCount = 0, .invoker = __reload};
|
|
2431
|
+
methodMap_["reloadWithReason"] = MethodMetadata {.argCount = 1, .invoker = __reloadWithReason};
|
|
2432
|
+
methodMap_["onFastRefresh"] = MethodMetadata {.argCount = 0, .invoker = __onFastRefresh};
|
|
2433
|
+
methodMap_["setHotLoadingEnabled"] = MethodMetadata {.argCount = 1, .invoker = __setHotLoadingEnabled};
|
|
2434
|
+
methodMap_["setProfilingEnabled"] = MethodMetadata {.argCount = 1, .invoker = __setProfilingEnabled};
|
|
2435
|
+
methodMap_["toggleElementInspector"] = MethodMetadata {.argCount = 0, .invoker = __toggleElementInspector};
|
|
2436
|
+
methodMap_["addMenuItem"] = MethodMetadata {.argCount = 1, .invoker = __addMenuItem};
|
|
2437
|
+
methodMap_["openDebugger"] = MethodMetadata {.argCount = 0, .invoker = __openDebugger};
|
|
2438
|
+
methodMap_["addListener"] = MethodMetadata {.argCount = 1, .invoker = __addListener};
|
|
2439
|
+
methodMap_["removeListeners"] = MethodMetadata {.argCount = 1, .invoker = __removeListeners};
|
|
2440
|
+
methodMap_["setIsShakeToShowDevMenuEnabled"] = MethodMetadata {.argCount = 1, .invoker = __setIsShakeToShowDevMenuEnabled};
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
private:
|
|
2444
|
+
static jsi::Value __reload(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2445
|
+
static_assert(
|
|
2446
|
+
bridging::getParameterCount(&T::reload) == 1,
|
|
2447
|
+
"Expected reload(...) to have 1 parameters");
|
|
2448
|
+
bridging::callFromJs<void>(rt, &T::reload, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
static jsi::Value __reloadWithReason(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2452
|
+
static_assert(
|
|
2453
|
+
bridging::getParameterCount(&T::reloadWithReason) == 2,
|
|
2454
|
+
"Expected reloadWithReason(...) to have 2 parameters");
|
|
2455
|
+
bridging::callFromJs<void>(rt, &T::reloadWithReason, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2456
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
static jsi::Value __onFastRefresh(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2460
|
+
static_assert(
|
|
2461
|
+
bridging::getParameterCount(&T::onFastRefresh) == 1,
|
|
2462
|
+
"Expected onFastRefresh(...) to have 1 parameters");
|
|
2463
|
+
bridging::callFromJs<void>(rt, &T::onFastRefresh, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
static jsi::Value __setHotLoadingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2467
|
+
static_assert(
|
|
2468
|
+
bridging::getParameterCount(&T::setHotLoadingEnabled) == 2,
|
|
2469
|
+
"Expected setHotLoadingEnabled(...) to have 2 parameters");
|
|
2470
|
+
bridging::callFromJs<void>(rt, &T::setHotLoadingEnabled, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2471
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
static jsi::Value __setProfilingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2475
|
+
static_assert(
|
|
2476
|
+
bridging::getParameterCount(&T::setProfilingEnabled) == 2,
|
|
2477
|
+
"Expected setProfilingEnabled(...) to have 2 parameters");
|
|
2478
|
+
bridging::callFromJs<void>(rt, &T::setProfilingEnabled, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2479
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
static jsi::Value __toggleElementInspector(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2483
|
+
static_assert(
|
|
2484
|
+
bridging::getParameterCount(&T::toggleElementInspector) == 1,
|
|
2485
|
+
"Expected toggleElementInspector(...) to have 1 parameters");
|
|
2486
|
+
bridging::callFromJs<void>(rt, &T::toggleElementInspector, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
static jsi::Value __addMenuItem(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2490
|
+
static_assert(
|
|
2491
|
+
bridging::getParameterCount(&T::addMenuItem) == 2,
|
|
2492
|
+
"Expected addMenuItem(...) to have 2 parameters");
|
|
2493
|
+
bridging::callFromJs<void>(rt, &T::addMenuItem, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2494
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
static jsi::Value __openDebugger(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2498
|
+
static_assert(
|
|
2499
|
+
bridging::getParameterCount(&T::openDebugger) == 1,
|
|
2500
|
+
"Expected openDebugger(...) to have 1 parameters");
|
|
2501
|
+
bridging::callFromJs<void>(rt, &T::openDebugger, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
static jsi::Value __addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2505
|
+
static_assert(
|
|
2506
|
+
bridging::getParameterCount(&T::addListener) == 2,
|
|
2507
|
+
"Expected addListener(...) to have 2 parameters");
|
|
2508
|
+
bridging::callFromJs<void>(rt, &T::addListener, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2509
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
static jsi::Value __removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2513
|
+
static_assert(
|
|
2514
|
+
bridging::getParameterCount(&T::removeListeners) == 2,
|
|
2515
|
+
"Expected removeListeners(...) to have 2 parameters");
|
|
2516
|
+
bridging::callFromJs<void>(rt, &T::removeListeners, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2517
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());return jsi::Value::undefined();
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
static jsi::Value __setIsShakeToShowDevMenuEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2521
|
+
static_assert(
|
|
2522
|
+
bridging::getParameterCount(&T::setIsShakeToShowDevMenuEnabled) == 2,
|
|
2523
|
+
"Expected setIsShakeToShowDevMenuEnabled(...) to have 2 parameters");
|
|
2524
|
+
bridging::callFromJs<void>(rt, &T::setIsShakeToShowDevMenuEnabled, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2525
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
|
|
2526
|
+
}
|
|
2527
|
+
};
|
|
2528
|
+
|
|
2529
|
+
|
|
2383
2530
|
template <typename T>
|
|
2384
2531
|
class JSI_EXPORT NativeDeviceEventManagerCxxSpec : public TurboModule {
|
|
2385
2532
|
public:
|
|
@@ -2667,145 +2814,6 @@ private:
|
|
|
2667
2814
|
};
|
|
2668
2815
|
|
|
2669
2816
|
|
|
2670
|
-
template <typename T>
|
|
2671
|
-
class JSI_EXPORT NativeDevLoadingViewCxxSpec : public TurboModule {
|
|
2672
|
-
public:
|
|
2673
|
-
static constexpr std::string_view kModuleName = "DevLoadingView";
|
|
2674
|
-
|
|
2675
|
-
protected:
|
|
2676
|
-
NativeDevLoadingViewCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeDevLoadingViewCxxSpec::kModuleName}, jsInvoker) {
|
|
2677
|
-
methodMap_["showMessage"] = MethodMetadata {.argCount = 4, .invoker = __showMessage};
|
|
2678
|
-
methodMap_["hide"] = MethodMetadata {.argCount = 0, .invoker = __hide};
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
private:
|
|
2682
|
-
static jsi::Value __showMessage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2683
|
-
static_assert(
|
|
2684
|
-
bridging::getParameterCount(&T::showMessage) == 5,
|
|
2685
|
-
"Expected showMessage(...) to have 5 parameters");
|
|
2686
|
-
bridging::callFromJs<void>(rt, &T::showMessage, static_cast<NativeDevLoadingViewCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2687
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
|
|
2688
|
-
count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asNumber()),
|
|
2689
|
-
count <= 2 || args[2].isNull() || args[2].isUndefined() ? std::nullopt : std::make_optional(args[2].asNumber()),
|
|
2690
|
-
count <= 3 || args[3].isNull() || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asBool()));return jsi::Value::undefined();
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
static jsi::Value __hide(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2694
|
-
static_assert(
|
|
2695
|
-
bridging::getParameterCount(&T::hide) == 1,
|
|
2696
|
-
"Expected hide(...) to have 1 parameters");
|
|
2697
|
-
bridging::callFromJs<void>(rt, &T::hide, static_cast<NativeDevLoadingViewCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2698
|
-
}
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
template <typename T>
|
|
2703
|
-
class JSI_EXPORT NativeDevSettingsCxxSpec : public TurboModule {
|
|
2704
|
-
public:
|
|
2705
|
-
static constexpr std::string_view kModuleName = "DevSettings";
|
|
2706
|
-
|
|
2707
|
-
protected:
|
|
2708
|
-
NativeDevSettingsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeDevSettingsCxxSpec::kModuleName}, jsInvoker) {
|
|
2709
|
-
methodMap_["reload"] = MethodMetadata {.argCount = 0, .invoker = __reload};
|
|
2710
|
-
methodMap_["reloadWithReason"] = MethodMetadata {.argCount = 1, .invoker = __reloadWithReason};
|
|
2711
|
-
methodMap_["onFastRefresh"] = MethodMetadata {.argCount = 0, .invoker = __onFastRefresh};
|
|
2712
|
-
methodMap_["setHotLoadingEnabled"] = MethodMetadata {.argCount = 1, .invoker = __setHotLoadingEnabled};
|
|
2713
|
-
methodMap_["setProfilingEnabled"] = MethodMetadata {.argCount = 1, .invoker = __setProfilingEnabled};
|
|
2714
|
-
methodMap_["toggleElementInspector"] = MethodMetadata {.argCount = 0, .invoker = __toggleElementInspector};
|
|
2715
|
-
methodMap_["addMenuItem"] = MethodMetadata {.argCount = 1, .invoker = __addMenuItem};
|
|
2716
|
-
methodMap_["openDebugger"] = MethodMetadata {.argCount = 0, .invoker = __openDebugger};
|
|
2717
|
-
methodMap_["addListener"] = MethodMetadata {.argCount = 1, .invoker = __addListener};
|
|
2718
|
-
methodMap_["removeListeners"] = MethodMetadata {.argCount = 1, .invoker = __removeListeners};
|
|
2719
|
-
methodMap_["setIsShakeToShowDevMenuEnabled"] = MethodMetadata {.argCount = 1, .invoker = __setIsShakeToShowDevMenuEnabled};
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
private:
|
|
2723
|
-
static jsi::Value __reload(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2724
|
-
static_assert(
|
|
2725
|
-
bridging::getParameterCount(&T::reload) == 1,
|
|
2726
|
-
"Expected reload(...) to have 1 parameters");
|
|
2727
|
-
bridging::callFromJs<void>(rt, &T::reload, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2728
|
-
}
|
|
2729
|
-
|
|
2730
|
-
static jsi::Value __reloadWithReason(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2731
|
-
static_assert(
|
|
2732
|
-
bridging::getParameterCount(&T::reloadWithReason) == 2,
|
|
2733
|
-
"Expected reloadWithReason(...) to have 2 parameters");
|
|
2734
|
-
bridging::callFromJs<void>(rt, &T::reloadWithReason, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2735
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2736
|
-
}
|
|
2737
|
-
|
|
2738
|
-
static jsi::Value __onFastRefresh(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2739
|
-
static_assert(
|
|
2740
|
-
bridging::getParameterCount(&T::onFastRefresh) == 1,
|
|
2741
|
-
"Expected onFastRefresh(...) to have 1 parameters");
|
|
2742
|
-
bridging::callFromJs<void>(rt, &T::onFastRefresh, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
static jsi::Value __setHotLoadingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2746
|
-
static_assert(
|
|
2747
|
-
bridging::getParameterCount(&T::setHotLoadingEnabled) == 2,
|
|
2748
|
-
"Expected setHotLoadingEnabled(...) to have 2 parameters");
|
|
2749
|
-
bridging::callFromJs<void>(rt, &T::setHotLoadingEnabled, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2750
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
static jsi::Value __setProfilingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2754
|
-
static_assert(
|
|
2755
|
-
bridging::getParameterCount(&T::setProfilingEnabled) == 2,
|
|
2756
|
-
"Expected setProfilingEnabled(...) to have 2 parameters");
|
|
2757
|
-
bridging::callFromJs<void>(rt, &T::setProfilingEnabled, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2758
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
static jsi::Value __toggleElementInspector(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2762
|
-
static_assert(
|
|
2763
|
-
bridging::getParameterCount(&T::toggleElementInspector) == 1,
|
|
2764
|
-
"Expected toggleElementInspector(...) to have 1 parameters");
|
|
2765
|
-
bridging::callFromJs<void>(rt, &T::toggleElementInspector, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2766
|
-
}
|
|
2767
|
-
|
|
2768
|
-
static jsi::Value __addMenuItem(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2769
|
-
static_assert(
|
|
2770
|
-
bridging::getParameterCount(&T::addMenuItem) == 2,
|
|
2771
|
-
"Expected addMenuItem(...) to have 2 parameters");
|
|
2772
|
-
bridging::callFromJs<void>(rt, &T::addMenuItem, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2773
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2774
|
-
}
|
|
2775
|
-
|
|
2776
|
-
static jsi::Value __openDebugger(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
2777
|
-
static_assert(
|
|
2778
|
-
bridging::getParameterCount(&T::openDebugger) == 1,
|
|
2779
|
-
"Expected openDebugger(...) to have 1 parameters");
|
|
2780
|
-
bridging::callFromJs<void>(rt, &T::openDebugger, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
static jsi::Value __addListener(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2784
|
-
static_assert(
|
|
2785
|
-
bridging::getParameterCount(&T::addListener) == 2,
|
|
2786
|
-
"Expected addListener(...) to have 2 parameters");
|
|
2787
|
-
bridging::callFromJs<void>(rt, &T::addListener, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2788
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));return jsi::Value::undefined();
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
static jsi::Value __removeListeners(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2792
|
-
static_assert(
|
|
2793
|
-
bridging::getParameterCount(&T::removeListeners) == 2,
|
|
2794
|
-
"Expected removeListeners(...) to have 2 parameters");
|
|
2795
|
-
bridging::callFromJs<void>(rt, &T::removeListeners, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2796
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());return jsi::Value::undefined();
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
static jsi::Value __setIsShakeToShowDevMenuEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
2800
|
-
static_assert(
|
|
2801
|
-
bridging::getParameterCount(&T::setIsShakeToShowDevMenuEnabled) == 2,
|
|
2802
|
-
"Expected setIsShakeToShowDevMenuEnabled(...) to have 2 parameters");
|
|
2803
|
-
bridging::callFromJs<void>(rt, &T::setIsShakeToShowDevMenuEnabled, static_cast<NativeDevSettingsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
|
|
2804
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
|
|
2805
|
-
}
|
|
2806
|
-
};
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
2817
|
#pragma mark - NativeDialogManagerAndroidDialogOptions
|
|
2810
2818
|
|
|
2811
2819
|
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
|
@@ -399,7 +399,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)act
|
|
|
399
399
|
shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
|
400
400
|
{
|
|
401
401
|
BOOL canBePrevented = [self canBePreventedByGestureRecognizer:otherGestureRecognizer];
|
|
402
|
-
if (canBePrevented) {
|
|
402
|
+
if (canBePrevented && otherGestureRecognizer.cancelsTouchesInView) {
|
|
403
403
|
[self _cancelTouches];
|
|
404
404
|
}
|
|
405
405
|
return NO;
|
|
@@ -3842,7 +3842,6 @@ public abstract interface class com/facebook/react/uimanager/ReactShadowNode {
|
|
|
3842
3842
|
public abstract fun getLayoutX ()F
|
|
3843
3843
|
public abstract fun getLayoutY ()F
|
|
3844
3844
|
public abstract fun getNativeChildCount ()I
|
|
3845
|
-
public abstract fun getNativeKind ()Lcom/facebook/react/uimanager/NativeKind;
|
|
3846
3845
|
public abstract fun getNativeOffsetForChild (Lcom/facebook/react/uimanager/ReactShadowNode;)I
|
|
3847
3846
|
public abstract fun getNativeParent ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
|
3848
3847
|
public abstract fun getPadding (I)F
|
|
@@ -3971,7 +3970,6 @@ public class com/facebook/react/uimanager/ReactShadowNodeImpl : com/facebook/rea
|
|
|
3971
3970
|
public final fun getLayoutX ()F
|
|
3972
3971
|
public final fun getLayoutY ()F
|
|
3973
3972
|
public final fun getNativeChildCount ()I
|
|
3974
|
-
public fun getNativeKind ()Lcom/facebook/react/uimanager/NativeKind;
|
|
3975
3973
|
public synthetic fun getNativeOffsetForChild (Lcom/facebook/react/uimanager/ReactShadowNode;)I
|
|
3976
3974
|
public final fun getNativeOffsetForChild (Lcom/facebook/react/uimanager/ReactShadowNodeImpl;)I
|
|
3977
3975
|
public synthetic fun getNativeParent ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt
CHANGED
|
@@ -7,25 +7,36 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.devsupport.inspector
|
|
9
9
|
|
|
10
|
+
import android.graphics.Bitmap
|
|
10
11
|
import android.os.Build
|
|
11
12
|
import android.os.Handler
|
|
12
13
|
import android.os.Looper
|
|
13
14
|
import android.os.Process
|
|
15
|
+
import android.util.Base64
|
|
14
16
|
import android.view.FrameMetrics
|
|
17
|
+
import android.view.PixelCopy
|
|
15
18
|
import android.view.Window
|
|
16
19
|
import com.facebook.proguard.annotations.DoNotStripAny
|
|
20
|
+
import java.io.ByteArrayOutputStream
|
|
21
|
+
import kotlin.coroutines.resume
|
|
22
|
+
import kotlin.coroutines.suspendCoroutine
|
|
23
|
+
import kotlinx.coroutines.CoroutineScope
|
|
24
|
+
import kotlinx.coroutines.Dispatchers
|
|
25
|
+
import kotlinx.coroutines.launch
|
|
17
26
|
|
|
18
27
|
@DoNotStripAny
|
|
19
28
|
internal class FrameTimingsObserver(
|
|
20
29
|
private val window: Window,
|
|
21
|
-
|
|
30
|
+
private val screenshotsEnabled: Boolean,
|
|
31
|
+
private val onFrameTimingSequence: (sequence: FrameTimingSequence) -> Unit,
|
|
22
32
|
) {
|
|
23
33
|
private val handler = Handler(Looper.getMainLooper())
|
|
24
34
|
private var frameCounter: Int = 0
|
|
35
|
+
private var bitmapBuffer: Bitmap? = null
|
|
25
36
|
|
|
26
37
|
private val frameMetricsListener =
|
|
27
38
|
Window.OnFrameMetricsAvailableListener { _, frameMetrics, _dropCount ->
|
|
28
|
-
val beginDrawingTimestamp = frameMetrics.getMetric(FrameMetrics.
|
|
39
|
+
val beginDrawingTimestamp = frameMetrics.getMetric(FrameMetrics.VSYNC_TIMESTAMP)
|
|
29
40
|
val commitTimestamp =
|
|
30
41
|
beginDrawingTimestamp + frameMetrics.getMetric(FrameMetrics.INPUT_HANDLING_DURATION)
|
|
31
42
|
+frameMetrics.getMetric(FrameMetrics.ANIMATION_DURATION)
|
|
@@ -35,17 +46,77 @@ internal class FrameTimingsObserver(
|
|
|
35
46
|
val endDrawingTimestamp =
|
|
36
47
|
beginDrawingTimestamp + frameMetrics.getMetric(FrameMetrics.TOTAL_DURATION)
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
val frameId = frameCounter++
|
|
50
|
+
val threadId = Process.myTid()
|
|
51
|
+
|
|
52
|
+
CoroutineScope(Dispatchers.Default).launch {
|
|
53
|
+
val screenshot = if (screenshotsEnabled) captureScreenshot() else null
|
|
54
|
+
|
|
55
|
+
onFrameTimingSequence(
|
|
56
|
+
FrameTimingSequence(
|
|
57
|
+
frameId,
|
|
58
|
+
threadId,
|
|
59
|
+
beginDrawingTimestamp,
|
|
60
|
+
commitTimestamp,
|
|
61
|
+
endDrawingTimestamp,
|
|
62
|
+
screenshot,
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
}
|
|
47
66
|
}
|
|
48
67
|
|
|
68
|
+
private suspend fun captureScreenshot(): String? = suspendCoroutine { continuation ->
|
|
69
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
|
70
|
+
continuation.resume(null)
|
|
71
|
+
return@suspendCoroutine
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
val decorView = window.decorView
|
|
75
|
+
val width = decorView.width
|
|
76
|
+
val height = decorView.height
|
|
77
|
+
|
|
78
|
+
// Reuse bitmap if dimensions haven't changed
|
|
79
|
+
val bitmap =
|
|
80
|
+
bitmapBuffer?.let {
|
|
81
|
+
if (it.width == width && it.height == height) {
|
|
82
|
+
it
|
|
83
|
+
} else {
|
|
84
|
+
null
|
|
85
|
+
}
|
|
86
|
+
} ?: Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).also { bitmapBuffer = it }
|
|
87
|
+
|
|
88
|
+
PixelCopy.request(
|
|
89
|
+
window,
|
|
90
|
+
bitmap,
|
|
91
|
+
{ copyResult ->
|
|
92
|
+
if (copyResult == PixelCopy.SUCCESS) {
|
|
93
|
+
CoroutineScope(Dispatchers.Default).launch {
|
|
94
|
+
try {
|
|
95
|
+
val scaleFactor = 0.5f
|
|
96
|
+
val scaledWidth = (width * scaleFactor).toInt()
|
|
97
|
+
val scaledHeight = (height * scaleFactor).toInt()
|
|
98
|
+
val scaledBitmap =
|
|
99
|
+
Bitmap.createScaledBitmap(bitmap, scaledWidth, scaledHeight, true)
|
|
100
|
+
|
|
101
|
+
val outputStream = ByteArrayOutputStream()
|
|
102
|
+
scaledBitmap.compress(Bitmap.CompressFormat.JPEG, 80, outputStream)
|
|
103
|
+
val jpegBytes = outputStream.toByteArray()
|
|
104
|
+
val jpegBase64 = Base64.encodeToString(jpegBytes, Base64.NO_WRAP)
|
|
105
|
+
continuation.resume(jpegBase64)
|
|
106
|
+
|
|
107
|
+
scaledBitmap.recycle()
|
|
108
|
+
} catch (e: Exception) {
|
|
109
|
+
continuation.resume(null)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
continuation.resume(null)
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
handler,
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
|
|
49
120
|
fun start() {
|
|
50
121
|
frameCounter = 0
|
|
51
122
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
|
@@ -62,5 +133,8 @@ internal class FrameTimingsObserver(
|
|
|
62
133
|
|
|
63
134
|
window.removeOnFrameMetricsAvailableListener(frameMetricsListener)
|
|
64
135
|
handler.removeCallbacksAndMessages(null)
|
|
136
|
+
|
|
137
|
+
bitmapBuffer?.recycle()
|
|
138
|
+
bitmapBuffer = null
|
|
65
139
|
}
|
|
66
140
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<adc6b24ae04487d2b82a2bac35f027a7>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -372,6 +372,12 @@ public object ReactNativeFeatureFlags {
|
|
|
372
372
|
@JvmStatic
|
|
373
373
|
public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = accessor.fixMappingOfEventPrioritiesBetweenFabricAndReact()
|
|
374
374
|
|
|
375
|
+
/**
|
|
376
|
+
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
|
|
377
|
+
*/
|
|
378
|
+
@JvmStatic
|
|
379
|
+
public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = accessor.fixTextClippingAndroid15useBoundsForWidth()
|
|
380
|
+
|
|
375
381
|
/**
|
|
376
382
|
* Enable system assertion validating that Fusebox is configured with a single host. When set, the CDP backend will dynamically disable features (Perf and Network) in the event that multiple hosts are registered (undefined behaviour), and broadcast this over `ReactNativeApplication.systemStateChanged`.
|
|
377
383
|
*/
|