react-native 0.83.0-nightly-20251029-3f971d931 → 0.83.0-nightly-20251030-26ad9492b
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 +8 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +0 -3
- 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 +4 -2
- 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/internal/tracing/PerformanceTracer.kt +109 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderColors.kt +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BoxShadow.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactAndroid/src/main/jni/react/tracing/OnLoad.cpp +16 -0
- package/ReactAndroid/src/main/jni/react/tracing/PerformanceTracerCxxInterop.cpp +241 -0
- package/ReactAndroid/src/main/jni/react/tracing/PerformanceTracerCxxInterop.h +63 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +52 -9
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +28 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +69 -51
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +6 -2
- 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/renderer/animated/NativeAnimatedNodesManager.cpp +13 -3
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.h +5 -2
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManagerProvider.cpp +14 -46
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManagerProvider.h +7 -21
- package/ReactCommon/react/renderer/components/image/ImageShadowNode.cpp +18 -0
- package/package.json +9 -9
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +7 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 83;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20251030-26ad9492b';
|
|
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: @(83),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20251030-26ad9492b",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -254,6 +254,7 @@ protected:
|
|
|
254
254
|
methodMap_["enableImmediateUpdateModeForContentOffsetChanges"] = MethodMetadata {.argCount = 0, .invoker = __enableImmediateUpdateModeForContentOffsetChanges};
|
|
255
255
|
methodMap_["enableImperativeFocus"] = MethodMetadata {.argCount = 0, .invoker = __enableImperativeFocus};
|
|
256
256
|
methodMap_["enableInteropViewManagerClassLookUpOptimizationIOS"] = MethodMetadata {.argCount = 0, .invoker = __enableInteropViewManagerClassLookUpOptimizationIOS};
|
|
257
|
+
methodMap_["enableKeyEvents"] = MethodMetadata {.argCount = 0, .invoker = __enableKeyEvents};
|
|
257
258
|
methodMap_["enableLayoutAnimationsOnAndroid"] = MethodMetadata {.argCount = 0, .invoker = __enableLayoutAnimationsOnAndroid};
|
|
258
259
|
methodMap_["enableLayoutAnimationsOnIOS"] = MethodMetadata {.argCount = 0, .invoker = __enableLayoutAnimationsOnIOS};
|
|
259
260
|
methodMap_["enableMainQueueCoordinatorOnIOS"] = MethodMetadata {.argCount = 0, .invoker = __enableMainQueueCoordinatorOnIOS};
|
|
@@ -524,6 +525,13 @@ private:
|
|
|
524
525
|
return bridging::callFromJs<bool>(rt, &T::enableInteropViewManagerClassLookUpOptimizationIOS, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
|
|
525
526
|
}
|
|
526
527
|
|
|
528
|
+
static jsi::Value __enableKeyEvents(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
529
|
+
static_assert(
|
|
530
|
+
bridging::getParameterCount(&T::enableKeyEvents) == 1,
|
|
531
|
+
"Expected enableKeyEvents(...) to have 1 parameters");
|
|
532
|
+
return bridging::callFromJs<bool>(rt, &T::enableKeyEvents, static_cast<NativeReactNativeFeatureFlagsCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
|
|
533
|
+
}
|
|
534
|
+
|
|
527
535
|
static jsi::Value __enableLayoutAnimationsOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
|
|
528
536
|
static_assert(
|
|
529
537
|
bridging::getParameterCount(&T::enableLayoutAnimationsOnAndroid) == 1,
|
package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java
CHANGED
|
@@ -1344,7 +1344,6 @@ public class SurfaceMountingManager {
|
|
|
1344
1344
|
final boolean mIsRoot;
|
|
1345
1345
|
@Nullable ViewManager mViewManager = null;
|
|
1346
1346
|
@Nullable ReactStylesDiffMap mCurrentProps = null;
|
|
1347
|
-
@Nullable ReadableMap mCurrentLocalData = null;
|
|
1348
1347
|
@Nullable StateWrapper mStateWrapper = null;
|
|
1349
1348
|
@Nullable EventEmitterWrapper mEventEmitter = null;
|
|
1350
1349
|
|
|
@@ -1374,8 +1373,6 @@ public class SurfaceMountingManager {
|
|
|
1374
1373
|
+ mIsRoot
|
|
1375
1374
|
+ " - props: "
|
|
1376
1375
|
+ mCurrentProps
|
|
1377
|
-
+ " - localData: "
|
|
1378
|
-
+ mCurrentLocalData
|
|
1379
1376
|
+ " - viewManager: "
|
|
1380
1377
|
+ mViewManager
|
|
1381
1378
|
+ " - isLayoutOnly: "
|
|
@@ -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<<3ea1ee77358d99334a7c40bed44f2d90>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -210,6 +210,12 @@ public object ReactNativeFeatureFlags {
|
|
|
210
210
|
@JvmStatic
|
|
211
211
|
public fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean = accessor.enableInteropViewManagerClassLookUpOptimizationIOS()
|
|
212
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Enables key up/down/press events to be sent to JS from components
|
|
215
|
+
*/
|
|
216
|
+
@JvmStatic
|
|
217
|
+
public fun enableKeyEvents(): Boolean = accessor.enableKeyEvents()
|
|
218
|
+
|
|
213
219
|
/**
|
|
214
220
|
* When enabled, LayoutAnimations API will animate state changes on Android.
|
|
215
221
|
*/
|
|
@@ -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<<007a5a1235a999716b382ffd4ca23158>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -50,6 +50,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
50
50
|
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
|
|
51
51
|
private var enableImperativeFocusCache: Boolean? = null
|
|
52
52
|
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
|
|
53
|
+
private var enableKeyEventsCache: Boolean? = null
|
|
53
54
|
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
|
|
54
55
|
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
|
|
55
56
|
private var enableMainQueueCoordinatorOnIOSCache: Boolean? = null
|
|
@@ -371,6 +372,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
371
372
|
return cached
|
|
372
373
|
}
|
|
373
374
|
|
|
375
|
+
override fun enableKeyEvents(): Boolean {
|
|
376
|
+
var cached = enableKeyEventsCache
|
|
377
|
+
if (cached == null) {
|
|
378
|
+
cached = ReactNativeFeatureFlagsCxxInterop.enableKeyEvents()
|
|
379
|
+
enableKeyEventsCache = cached
|
|
380
|
+
}
|
|
381
|
+
return cached
|
|
382
|
+
}
|
|
383
|
+
|
|
374
384
|
override fun enableLayoutAnimationsOnAndroid(): Boolean {
|
|
375
385
|
var cached = enableLayoutAnimationsOnAndroidCache
|
|
376
386
|
if (cached == null) {
|
|
@@ -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<<8a775646d455cdb6d017fd08aee3e807>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -88,6 +88,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
88
88
|
|
|
89
89
|
@DoNotStrip @JvmStatic public external fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
|
90
90
|
|
|
91
|
+
@DoNotStrip @JvmStatic public external fun enableKeyEvents(): Boolean
|
|
92
|
+
|
|
91
93
|
@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnAndroid(): Boolean
|
|
92
94
|
|
|
93
95
|
@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnIOS(): Boolean
|
|
@@ -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<<346acf2190f419cc4de64f66cb40f802>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -83,6 +83,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
83
83
|
|
|
84
84
|
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean = false
|
|
85
85
|
|
|
86
|
+
override fun enableKeyEvents(): Boolean = false
|
|
87
|
+
|
|
86
88
|
override fun enableLayoutAnimationsOnAndroid(): Boolean = false
|
|
87
89
|
|
|
88
90
|
override fun enableLayoutAnimationsOnIOS(): Boolean = true
|
|
@@ -147,7 +149,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
147
149
|
|
|
148
150
|
override fun skipActivityIdentityAssertionOnHostPause(): Boolean = false
|
|
149
151
|
|
|
150
|
-
override fun sweepActiveTouchOnChildNativeGesturesAndroid(): Boolean =
|
|
152
|
+
override fun sweepActiveTouchOnChildNativeGesturesAndroid(): Boolean = true
|
|
151
153
|
|
|
152
154
|
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
|
|
153
155
|
|
|
@@ -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<<ebeb9b37b8d3d0e31f4d4966cbf42b3f>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -54,6 +54,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
54
54
|
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
|
|
55
55
|
private var enableImperativeFocusCache: Boolean? = null
|
|
56
56
|
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
|
|
57
|
+
private var enableKeyEventsCache: Boolean? = null
|
|
57
58
|
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
|
|
58
59
|
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
|
|
59
60
|
private var enableMainQueueCoordinatorOnIOSCache: Boolean? = null
|
|
@@ -405,6 +406,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
405
406
|
return cached
|
|
406
407
|
}
|
|
407
408
|
|
|
409
|
+
override fun enableKeyEvents(): Boolean {
|
|
410
|
+
var cached = enableKeyEventsCache
|
|
411
|
+
if (cached == null) {
|
|
412
|
+
cached = currentProvider.enableKeyEvents()
|
|
413
|
+
accessedFeatureFlags.add("enableKeyEvents")
|
|
414
|
+
enableKeyEventsCache = cached
|
|
415
|
+
}
|
|
416
|
+
return cached
|
|
417
|
+
}
|
|
418
|
+
|
|
408
419
|
override fun enableLayoutAnimationsOnAndroid(): Boolean {
|
|
409
420
|
var cached = enableLayoutAnimationsOnAndroidCache
|
|
410
421
|
if (cached == null) {
|
|
@@ -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<<1c4ea60d119996f37742542976fedcc8>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -83,6 +83,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
|
|
83
83
|
|
|
84
84
|
@DoNotStrip public fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
|
85
85
|
|
|
86
|
+
@DoNotStrip public fun enableKeyEvents(): Boolean
|
|
87
|
+
|
|
86
88
|
@DoNotStrip public fun enableLayoutAnimationsOnAndroid(): Boolean
|
|
87
89
|
|
|
88
90
|
@DoNotStrip public fun enableLayoutAnimationsOnIOS(): Boolean
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package com.facebook.react.internal.tracing
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.facebook.react.bridge.ReadableNativeMap
|
|
12
|
+
import com.facebook.soloader.SoLoader
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* JNI interface to access PerformanceTracer methods from React Native Inspector Modern.
|
|
16
|
+
*
|
|
17
|
+
* This provides access to reportMark and reportMeasure methods which are used for performance
|
|
18
|
+
* tracing in the React Native DevTools.
|
|
19
|
+
*/
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
public object PerformanceTracer {
|
|
22
|
+
init {
|
|
23
|
+
SoLoader.loadLibrary("react_performancetracerjni")
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Callback interface for tracing state changes. */
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
public interface TracingStateCallback {
|
|
29
|
+
/**
|
|
30
|
+
* Called when tracing state changes.
|
|
31
|
+
*
|
|
32
|
+
* @param isTracing true if tracing has started, false if tracing has stopped
|
|
33
|
+
*/
|
|
34
|
+
@DoNotStrip public fun onTracingStateChanged(isTracing: Boolean)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Report a Performance.mark() event - a labelled timestamp.
|
|
39
|
+
*
|
|
40
|
+
* @param name The name/label of the mark
|
|
41
|
+
* @param timestampNanos The timestamp in nanoseconds (monotonic time)
|
|
42
|
+
* @param detail Optional map with additional detail (pass null if not needed)
|
|
43
|
+
*/
|
|
44
|
+
@DoNotStrip
|
|
45
|
+
@JvmStatic
|
|
46
|
+
public external fun reportMark(name: String, timestampNanos: Long, detail: ReadableNativeMap?)
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Report a Performance.measure() event - a labelled duration.
|
|
50
|
+
*
|
|
51
|
+
* @param name The name/label of the measure
|
|
52
|
+
* @param startTimestampNanos The start timestamp in nanoseconds (monotonic time)
|
|
53
|
+
* @param durationNanos The duration in nanoseconds
|
|
54
|
+
* @param detail Optional map with additional detail (pass null if not needed)
|
|
55
|
+
*/
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
@JvmStatic
|
|
58
|
+
public external fun reportMeasure(
|
|
59
|
+
name: String,
|
|
60
|
+
startTimestampNanos: Long,
|
|
61
|
+
durationNanos: Long,
|
|
62
|
+
detail: ReadableNativeMap?,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Report a TimeStamp Trace Event - a labelled entry on Performance timeline.
|
|
67
|
+
*
|
|
68
|
+
* @param name The name/label of the timestamp
|
|
69
|
+
* @param startTimeNanos Start timestamp in nanoseconds (monotonic time)
|
|
70
|
+
* @param endTimeNanos End timestamp in nanoseconds (monotonic time)
|
|
71
|
+
* @param trackName Optional track name for organizing the timestamp
|
|
72
|
+
* @param trackGroup Optional track group for organizing the timestamp
|
|
73
|
+
* @param color Optional color name (e.g., "primary", "secondary", "error", "warning")
|
|
74
|
+
*/
|
|
75
|
+
@DoNotStrip
|
|
76
|
+
@JvmStatic
|
|
77
|
+
public external fun reportTimeStamp(
|
|
78
|
+
name: String,
|
|
79
|
+
startTimeNanos: Long,
|
|
80
|
+
endTimeNanos: Long,
|
|
81
|
+
trackName: String?,
|
|
82
|
+
trackGroup: String?,
|
|
83
|
+
color: String?,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Check if the tracer is currently tracing.
|
|
88
|
+
*
|
|
89
|
+
* @return true if tracing is active, false otherwise
|
|
90
|
+
*/
|
|
91
|
+
@DoNotStrip @JvmStatic public external fun isTracing(): Boolean
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Subscribe to tracing state changes (start/stop events).
|
|
95
|
+
*
|
|
96
|
+
* @param callback The callback to invoke when tracing starts or stops
|
|
97
|
+
* @return A subscription ID that can be used to unsubscribe
|
|
98
|
+
*/
|
|
99
|
+
@DoNotStrip
|
|
100
|
+
@JvmStatic
|
|
101
|
+
public external fun subscribeToTracingStateChanges(callback: TracingStateCallback): Int
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Unsubscribe from tracing state changes.
|
|
105
|
+
*
|
|
106
|
+
* @param subscriptionId The subscription ID returned from subscribeToTracingStateChanges
|
|
107
|
+
*/
|
|
108
|
+
@DoNotStrip @JvmStatic public external fun unsubscribeFromTracingStateChanges(subscriptionId: Int)
|
|
109
|
+
}
|
|
@@ -14,15 +14,15 @@ import androidx.annotation.ColorInt
|
|
|
14
14
|
import com.facebook.react.modules.i18nmanager.I18nUtil
|
|
15
15
|
|
|
16
16
|
internal data class ColorEdges(
|
|
17
|
-
@ColorInt val left: Int = Color.BLACK,
|
|
18
|
-
@ColorInt val top: Int = Color.BLACK,
|
|
19
|
-
@ColorInt val right: Int = Color.BLACK,
|
|
20
|
-
@ColorInt val bottom: Int = Color.BLACK,
|
|
17
|
+
@param:ColorInt val left: Int = Color.BLACK,
|
|
18
|
+
@param:ColorInt val top: Int = Color.BLACK,
|
|
19
|
+
@param:ColorInt val right: Int = Color.BLACK,
|
|
20
|
+
@param:ColorInt val bottom: Int = Color.BLACK,
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
@JvmInline
|
|
24
24
|
internal value class BorderColors(
|
|
25
|
-
@ColorInt val edgeColors: Array<Int?> = arrayOfNulls<Int?>(LogicalEdge.values().size)
|
|
25
|
+
@param:ColorInt val edgeColors: Array<Int?> = arrayOfNulls<Int?>(LogicalEdge.values().size)
|
|
26
26
|
) {
|
|
27
27
|
|
|
28
28
|
fun resolve(layoutDirection: Int, context: Context): ColorEdges {
|
|
@@ -18,7 +18,7 @@ import com.facebook.react.bridge.ReadableType
|
|
|
18
18
|
public data class BoxShadow(
|
|
19
19
|
val offsetX: Float,
|
|
20
20
|
val offsetY: Float,
|
|
21
|
-
@ColorInt val color: Int? = null,
|
|
21
|
+
@param:ColorInt val color: Int? = null,
|
|
22
22
|
val blurRadius: Float? = null,
|
|
23
23
|
val spreadDistance: Float? = null,
|
|
24
24
|
val inset: Boolean? = null,
|
|
@@ -153,6 +153,7 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
|
|
153
153
|
private var accessibilityStateChangeListener:
|
|
154
154
|
AccessibilityManager.AccessibilityStateChangeListener? =
|
|
155
155
|
null
|
|
156
|
+
private var focusOnAttach = false
|
|
156
157
|
|
|
157
158
|
init {
|
|
158
159
|
initView()
|
|
@@ -212,6 +213,9 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
|
|
212
213
|
updateBackgroundDrawable(null)
|
|
213
214
|
|
|
214
215
|
resetPointerEvents()
|
|
216
|
+
|
|
217
|
+
// In case a focus was attempted but the view never attached, reset to false
|
|
218
|
+
focusOnAttach = false
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
private var _drawingOrderHelper: ViewGroupDrawingOrderHelper? = null
|
|
@@ -417,10 +421,15 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
|
|
417
421
|
}
|
|
418
422
|
|
|
419
423
|
internal fun requestFocusFromJS() {
|
|
420
|
-
|
|
424
|
+
if (isAttachedToWindow) {
|
|
425
|
+
super.requestFocus(FOCUS_DOWN, null)
|
|
426
|
+
} else {
|
|
427
|
+
focusOnAttach = true
|
|
428
|
+
}
|
|
421
429
|
}
|
|
422
430
|
|
|
423
431
|
internal fun clearFocusFromJS() {
|
|
432
|
+
focusOnAttach = false
|
|
424
433
|
super.clearFocus()
|
|
425
434
|
}
|
|
426
435
|
|
|
@@ -572,6 +581,11 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
|
|
572
581
|
if (_removeClippedSubviews) {
|
|
573
582
|
updateClippingRect()
|
|
574
583
|
}
|
|
584
|
+
|
|
585
|
+
if (focusOnAttach) {
|
|
586
|
+
requestFocusFromJS()
|
|
587
|
+
focusOnAttach = false
|
|
588
|
+
}
|
|
575
589
|
}
|
|
576
590
|
|
|
577
591
|
private fun customDrawOrderDisabled(): Boolean {
|
|
@@ -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<<d04720bbbd42eaf338be612a0f3e36a6>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -219,6 +219,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
|
|
219
219
|
return method(javaProvider_);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
bool enableKeyEvents() override {
|
|
223
|
+
static const auto method =
|
|
224
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableKeyEvents");
|
|
225
|
+
return method(javaProvider_);
|
|
226
|
+
}
|
|
227
|
+
|
|
222
228
|
bool enableLayoutAnimationsOnAndroid() override {
|
|
223
229
|
static const auto method =
|
|
224
230
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableLayoutAnimationsOnAndroid");
|
|
@@ -673,6 +679,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOpti
|
|
|
673
679
|
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
|
|
674
680
|
}
|
|
675
681
|
|
|
682
|
+
bool JReactNativeFeatureFlagsCxxInterop::enableKeyEvents(
|
|
683
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
684
|
+
return ReactNativeFeatureFlags::enableKeyEvents();
|
|
685
|
+
}
|
|
686
|
+
|
|
676
687
|
bool JReactNativeFeatureFlagsCxxInterop::enableLayoutAnimationsOnAndroid(
|
|
677
688
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
678
689
|
return ReactNativeFeatureFlags::enableLayoutAnimationsOnAndroid();
|
|
@@ -1044,6 +1055,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
1044
1055
|
makeNativeMethod(
|
|
1045
1056
|
"enableInteropViewManagerClassLookUpOptimizationIOS",
|
|
1046
1057
|
JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS),
|
|
1058
|
+
makeNativeMethod(
|
|
1059
|
+
"enableKeyEvents",
|
|
1060
|
+
JReactNativeFeatureFlagsCxxInterop::enableKeyEvents),
|
|
1047
1061
|
makeNativeMethod(
|
|
1048
1062
|
"enableLayoutAnimationsOnAndroid",
|
|
1049
1063
|
JReactNativeFeatureFlagsCxxInterop::enableLayoutAnimationsOnAndroid),
|
|
@@ -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<<7679a91daba1f8941b78a4be4baea6ef>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -120,6 +120,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
120
120
|
static bool enableInteropViewManagerClassLookUpOptimizationIOS(
|
|
121
121
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
122
122
|
|
|
123
|
+
static bool enableKeyEvents(
|
|
124
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
125
|
+
|
|
123
126
|
static bool enableLayoutAnimationsOnAndroid(
|
|
124
127
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
125
128
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include "PerformanceTracerCxxInterop.h"
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
|
|
12
|
+
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* /*unused*/) {
|
|
13
|
+
return facebook::jni::initialize(vm, [] {
|
|
14
|
+
facebook::react::PerformanceTracerCxxInterop::registerNatives();
|
|
15
|
+
});
|
|
16
|
+
}
|