react-native-tvos 0.76.3-0 → 0.76.6-0
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/Components/Pressable/Pressable.d.ts +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +2 -1
- package/React/Base/RCTConvert.mm +3 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +8 -18
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +3 -0
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +17 -18
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +12 -2
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +12 -9
- package/React/Views/RCTFont.h +2 -0
- package/React/Views/RCTFont.mm +4 -5
- package/React/Views/ScrollView/RCTScrollView.h +3 -1
- package/React/Views/ScrollView/RCTScrollView.m +6 -0
- package/ReactAndroid/api/ReactAndroid.api +2 -0
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +18 -3
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.java +12 -13
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +8 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +1 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +1 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +1 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +11 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +11 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +1 -0
- package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +17 -19
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +1 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +1 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +1 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +1 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +47 -65
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +2 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +1 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +1 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
- package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +2 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +2 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +10 -10
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +29 -8
- package/ReactCommon/react/runtime/ReactInstance.cpp +39 -35
- package/ReactCommon/react/runtime/ReactInstance.h +2 -1
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +3 -2
- package/jest/setup.js +5 -1
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +6 -6
- package/scripts/codegen/generate-artifacts-executor.js +68 -7
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -6
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
- package/types/public/ReactNativeTVTypes.d.ts +9 -7
|
@@ -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<<94e1e69be22ec978859e3f242610f21b>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,8 +25,6 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
25
25
|
public interface ReactNativeFeatureFlagsProvider {
|
|
26
26
|
@DoNotStrip public fun commonTestFlag(): Boolean
|
|
27
27
|
|
|
28
|
-
@DoNotStrip public fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean
|
|
29
|
-
|
|
30
28
|
@DoNotStrip public fun batchRenderingUpdatesInEventLoop(): Boolean
|
|
31
29
|
|
|
32
30
|
@DoNotStrip public fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java
CHANGED
|
@@ -1552,12 +1552,20 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
1552
1552
|
DEFAULT_FLING_ANIMATOR.cancel();
|
|
1553
1553
|
|
|
1554
1554
|
// Update the fling animator with new values
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
.setIntValues(start, end);
|
|
1555
|
+
int duration = ReactScrollViewHelper.getDefaultScrollAnimationDuration(getContext());
|
|
1556
|
+
DEFAULT_FLING_ANIMATOR.setDuration(duration).setIntValues(start, end);
|
|
1558
1557
|
|
|
1559
1558
|
// Start the animator
|
|
1560
1559
|
DEFAULT_FLING_ANIMATOR.start();
|
|
1560
|
+
|
|
1561
|
+
if (mSendMomentumEvents) {
|
|
1562
|
+
int xVelocity = 0;
|
|
1563
|
+
if (duration > 0) {
|
|
1564
|
+
xVelocity = (end - start) / duration;
|
|
1565
|
+
}
|
|
1566
|
+
ReactScrollViewHelper.emitScrollMomentumBeginEvent(this, xVelocity, 0);
|
|
1567
|
+
ReactScrollViewHelper.dispatchMomentumEndOnAnimationEnd(this);
|
|
1568
|
+
}
|
|
1561
1569
|
}
|
|
1562
1570
|
|
|
1563
1571
|
@Override
|
|
@@ -1366,12 +1366,20 @@ public class ReactScrollView extends ScrollView
|
|
|
1366
1366
|
DEFAULT_FLING_ANIMATOR.cancel();
|
|
1367
1367
|
|
|
1368
1368
|
// Update the fling animator with new values
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
.setIntValues(start, end);
|
|
1369
|
+
int duration = ReactScrollViewHelper.getDefaultScrollAnimationDuration(getContext());
|
|
1370
|
+
DEFAULT_FLING_ANIMATOR.setDuration(duration).setIntValues(start, end);
|
|
1372
1371
|
|
|
1373
1372
|
// Start the animator
|
|
1374
1373
|
DEFAULT_FLING_ANIMATOR.start();
|
|
1374
|
+
|
|
1375
|
+
if (mSendMomentumEvents) {
|
|
1376
|
+
int yVelocity = 0;
|
|
1377
|
+
if (duration > 0) {
|
|
1378
|
+
yVelocity = (end - start) / duration;
|
|
1379
|
+
}
|
|
1380
|
+
ReactScrollViewHelper.emitScrollMomentumBeginEvent(this, 0, yVelocity);
|
|
1381
|
+
ReactScrollViewHelper.dispatchMomentumEndOnAnimationEnd(this);
|
|
1382
|
+
}
|
|
1375
1383
|
}
|
|
1376
1384
|
|
|
1377
1385
|
@NonNull
|
|
@@ -412,6 +412,31 @@ public object ReactScrollViewHelper {
|
|
|
412
412
|
})
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
@JvmStatic
|
|
416
|
+
public fun <T> dispatchMomentumEndOnAnimationEnd(scrollView: T) where
|
|
417
|
+
T : HasFlingAnimator?,
|
|
418
|
+
T : HasScrollEventThrottle?,
|
|
419
|
+
T : ViewGroup {
|
|
420
|
+
scrollView
|
|
421
|
+
.getFlingAnimator()
|
|
422
|
+
.addListener(
|
|
423
|
+
object : Animator.AnimatorListener {
|
|
424
|
+
override fun onAnimationStart(animator: Animator) = Unit
|
|
425
|
+
|
|
426
|
+
override fun onAnimationEnd(animator: Animator) {
|
|
427
|
+
emitScrollMomentumEndEvent(scrollView)
|
|
428
|
+
animator.removeListener(this)
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
override fun onAnimationCancel(animator: Animator) {
|
|
432
|
+
emitScrollMomentumEndEvent(scrollView)
|
|
433
|
+
animator.removeListener(this)
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
override fun onAnimationRepeat(animator: Animator) = Unit
|
|
437
|
+
})
|
|
438
|
+
}
|
|
439
|
+
|
|
415
440
|
@JvmStatic
|
|
416
441
|
public fun <T> predictFinalScrollPosition(
|
|
417
442
|
scrollView: T,
|
|
@@ -501,27 +501,25 @@ void Binding::schedulerShouldRenderTransactions(
|
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
if (ReactNativeFeatureFlags::
|
|
505
|
-
allowRecursiveCommitsWithSynchronousMountOnAndroid()) {
|
|
506
|
-
std::vector<MountingTransaction> pendingTransactions;
|
|
507
|
-
|
|
508
|
-
{
|
|
509
|
-
// Retain the lock to access the pending transactions but not to execute
|
|
510
|
-
// the mount operations because that method can call into this method
|
|
511
|
-
// again.
|
|
512
|
-
std::unique_lock<std::mutex> lock(pendingTransactionsMutex_);
|
|
513
|
-
pendingTransactions_.swap(pendingTransactions);
|
|
514
|
-
}
|
|
515
504
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
505
|
+
std::vector<MountingTransaction> pendingTransactions;
|
|
506
|
+
|
|
507
|
+
{
|
|
508
|
+
// Retain the lock to access the pending transactions but not to execute
|
|
509
|
+
// the mount operations because that method can call into this method
|
|
510
|
+
// again.
|
|
511
|
+
//
|
|
512
|
+
// This can be re-entrant when mounting manager triggers state updates
|
|
513
|
+
// synchronously (this can happen when committing from the UI thread).
|
|
514
|
+
// This is safe because we're already combining all the transactions for the
|
|
515
|
+
// same surface ID in a single transaction in the pending transactions list,
|
|
516
|
+
// so operations won't run out of order.
|
|
520
517
|
std::unique_lock<std::mutex> lock(pendingTransactionsMutex_);
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
518
|
+
pendingTransactions_.swap(pendingTransactions);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
for (auto& transaction : pendingTransactions) {
|
|
522
|
+
mountingManager->executeMount(transaction);
|
|
525
523
|
}
|
|
526
524
|
}
|
|
527
525
|
|
|
@@ -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<<68e5d4ce0ed3c237eeababaa04821101>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -45,12 +45,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
|
|
45
45
|
return method(javaProvider_);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
bool allowRecursiveCommitsWithSynchronousMountOnAndroid() override {
|
|
49
|
-
static const auto method =
|
|
50
|
-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("allowRecursiveCommitsWithSynchronousMountOnAndroid");
|
|
51
|
-
return method(javaProvider_);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
48
|
bool batchRenderingUpdatesInEventLoop() override {
|
|
55
49
|
static const auto method =
|
|
56
50
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("batchRenderingUpdatesInEventLoop");
|
|
@@ -336,11 +330,6 @@ bool JReactNativeFeatureFlagsCxxInterop::commonTestFlag(
|
|
|
336
330
|
return ReactNativeFeatureFlags::commonTestFlag();
|
|
337
331
|
}
|
|
338
332
|
|
|
339
|
-
bool JReactNativeFeatureFlagsCxxInterop::allowRecursiveCommitsWithSynchronousMountOnAndroid(
|
|
340
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
341
|
-
return ReactNativeFeatureFlags::allowRecursiveCommitsWithSynchronousMountOnAndroid();
|
|
342
|
-
}
|
|
343
|
-
|
|
344
333
|
bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
|
|
345
334
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
346
335
|
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
@@ -591,9 +580,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
591
580
|
makeNativeMethod(
|
|
592
581
|
"commonTestFlag",
|
|
593
582
|
JReactNativeFeatureFlagsCxxInterop::commonTestFlag),
|
|
594
|
-
makeNativeMethod(
|
|
595
|
-
"allowRecursiveCommitsWithSynchronousMountOnAndroid",
|
|
596
|
-
JReactNativeFeatureFlagsCxxInterop::allowRecursiveCommitsWithSynchronousMountOnAndroid),
|
|
597
583
|
makeNativeMethod(
|
|
598
584
|
"batchRenderingUpdatesInEventLoop",
|
|
599
585
|
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
|
|
@@ -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<<bba5d2a290f39b6572db7f90b67e8469>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -33,9 +33,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
33
33
|
static bool commonTestFlag(
|
|
34
34
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
35
35
|
|
|
36
|
-
static bool allowRecursiveCommitsWithSynchronousMountOnAndroid(
|
|
37
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
38
|
-
|
|
39
36
|
static bool batchRenderingUpdatesInEventLoop(
|
|
40
37
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
41
38
|
|
|
@@ -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<<5c4ae3a29f0191428284e0c660353edf>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,10 +25,6 @@ bool ReactNativeFeatureFlags::commonTestFlag() {
|
|
|
25
25
|
return getAccessor().commonTestFlag();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
bool ReactNativeFeatureFlags::allowRecursiveCommitsWithSynchronousMountOnAndroid() {
|
|
29
|
-
return getAccessor().allowRecursiveCommitsWithSynchronousMountOnAndroid();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
28
|
bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
|
|
33
29
|
return getAccessor().batchRenderingUpdatesInEventLoop();
|
|
34
30
|
}
|
|
@@ -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<<8c40f45357799de60f939b510f1d2ae5>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -42,11 +42,6 @@ class ReactNativeFeatureFlags {
|
|
|
42
42
|
*/
|
|
43
43
|
RN_EXPORT static bool commonTestFlag();
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* Adds support for recursively processing commits that mount synchronously (Android only).
|
|
47
|
-
*/
|
|
48
|
-
RN_EXPORT static bool allowRecursiveCommitsWithSynchronousMountOnAndroid();
|
|
49
|
-
|
|
50
45
|
/**
|
|
51
46
|
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
52
47
|
*/
|