react-native-tvos 0.73.6-3 → 0.73.7-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/Core/ReactNativeVersion.js +2 -2
- package/Libraries/ReactNative/RendererImplementation.js +2 -0
- package/React/Base/RCTVersion.m +2 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +1 -7
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +6 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupDrawingOrderHelper.java +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +52 -22
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/yoga/Yoga.podspec +4 -1
- package/package.json +3 -3
- package/scripts/cocoapods/utils.rb +39 -1
- package/scripts/react_native_pods.rb +1 -0
- package/sdks/.hermesversion +1 -1
- 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/template/package.json +1 -1
- package/types/public/ReactNativeTVTypes.d.ts +4 -8
|
@@ -46,9 +46,11 @@ export function findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
|
46
46
|
|
|
47
47
|
export function findNodeHandle<TElementType: ElementType>(
|
|
48
48
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
49
|
+
suppressWarning: ?Boolean,
|
|
49
50
|
): ?number {
|
|
50
51
|
return require('../Renderer/shims/ReactNative').findNodeHandle(
|
|
51
52
|
componentOrHandle,
|
|
53
|
+
suppressWarning,
|
|
52
54
|
);
|
|
53
55
|
}
|
|
54
56
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -23,8 +23,8 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
23
23
|
__rnVersion = @{
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(73),
|
|
26
|
-
RCTVersionPatch: @(
|
|
27
|
-
RCTVersionPrerelease: @"
|
|
26
|
+
RCTVersionPatch: @(7),
|
|
27
|
+
RCTVersionPrerelease: @"0",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -177,7 +177,7 @@ public class UIImplementation {
|
|
|
177
177
|
*
|
|
178
178
|
* @return The num of root view
|
|
179
179
|
*/
|
|
180
|
-
|
|
180
|
+
public int getRootViewNum() {
|
|
181
181
|
return mOperationsQueue.getNativeViewHierarchyManager().getRootViewNum();
|
|
182
182
|
}
|
|
183
183
|
|
|
@@ -610,12 +610,6 @@ public class UIImplementation {
|
|
|
610
610
|
|
|
611
611
|
/** Invoked at the end of the transaction to commit any updates to the node hierarchy. */
|
|
612
612
|
public void dispatchViewUpdates(int batchId) {
|
|
613
|
-
if (getRootViewNum() <= 0) {
|
|
614
|
-
// If there are no RootViews registered, there will be no View updates to dispatch.
|
|
615
|
-
// This is a hack to prevent this from being called when Fabric is used everywhere.
|
|
616
|
-
// This should no longer be necessary in Bridgeless Mode.
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
613
|
SystraceMessage.beginSection(
|
|
620
614
|
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "UIImplementation.dispatchViewUpdates")
|
|
621
615
|
.arg("batchId", batchId)
|
|
@@ -719,7 +719,12 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
|
|
719
719
|
listener.willDispatchViewUpdates(this);
|
|
720
720
|
}
|
|
721
721
|
try {
|
|
722
|
-
|
|
722
|
+
// If there are no RootViews registered, there will be no View updates to dispatch.
|
|
723
|
+
// This is a hack to prevent this from being called when Fabric is used everywhere.
|
|
724
|
+
// This should no longer be necessary in Bridgeless Mode.
|
|
725
|
+
if (mUIImplementation.getRootViewNum() > 0) {
|
|
726
|
+
mUIImplementation.dispatchViewUpdates(batchId);
|
|
727
|
+
}
|
|
723
728
|
} finally {
|
|
724
729
|
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
|
725
730
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupDrawingOrderHelper.java
CHANGED
|
@@ -10,6 +10,8 @@ package com.facebook.react.uimanager;
|
|
|
10
10
|
import android.view.View;
|
|
11
11
|
import android.view.ViewGroup;
|
|
12
12
|
import androidx.annotation.Nullable;
|
|
13
|
+
import com.facebook.common.logging.FLog;
|
|
14
|
+
import com.facebook.react.common.ReactConstants;
|
|
13
15
|
import java.util.ArrayList;
|
|
14
16
|
import java.util.Collections;
|
|
15
17
|
import java.util.Comparator;
|
|
@@ -65,6 +67,17 @@ public class ViewGroupDrawingOrderHelper {
|
|
|
65
67
|
* ViewGroup#getChildDrawingOrder}.
|
|
66
68
|
*/
|
|
67
69
|
public int getChildDrawingOrder(int childCount, int index) {
|
|
70
|
+
if (mDrawingOrderIndices != null
|
|
71
|
+
&& (index >= mDrawingOrderIndices.length || mDrawingOrderIndices[index] >= childCount)) {
|
|
72
|
+
FLog.w(
|
|
73
|
+
ReactConstants.TAG,
|
|
74
|
+
"getChildDrawingOrder index out of bounds! Please check any custom view manipulations you"
|
|
75
|
+
+ " may have done. childCount = %d, index = %d",
|
|
76
|
+
childCount,
|
|
77
|
+
index);
|
|
78
|
+
update();
|
|
79
|
+
}
|
|
80
|
+
|
|
68
81
|
if (mDrawingOrderIndices == null) {
|
|
69
82
|
ArrayList<View> viewsToSort = new ArrayList<>();
|
|
70
83
|
for (int i = 0; i < childCount; i++) {
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java
CHANGED
|
@@ -815,7 +815,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
|
|
815
815
|
// more information.
|
|
816
816
|
|
|
817
817
|
if (!mScroller.isFinished() && mScroller.getCurrX() != mScroller.getFinalX()) {
|
|
818
|
-
int scrollRange = computeHorizontalScrollRange() - getWidth();
|
|
818
|
+
int scrollRange = Math.max(computeHorizontalScrollRange() - getWidth(), 0);
|
|
819
819
|
if (scrollX >= scrollRange) {
|
|
820
820
|
mScroller.abortAnimation();
|
|
821
821
|
scrollX = scrollRange;
|
|
@@ -439,10 +439,10 @@ public class ReactViewGroup extends ViewGroup
|
|
|
439
439
|
|
|
440
440
|
// We can try saving on invalidate call here as the view that we remove is out of visible area
|
|
441
441
|
// therefore invalidation is not necessary.
|
|
442
|
-
|
|
442
|
+
removeViewsInLayout(idx - clippedSoFar, 1);
|
|
443
443
|
needUpdateClippingRecursive = true;
|
|
444
444
|
} else if (intersects && child.getParent() == null) {
|
|
445
|
-
|
|
445
|
+
addViewInLayout(child, idx - clippedSoFar, sDefaultLayoutParam, true);
|
|
446
446
|
invalidate();
|
|
447
447
|
needUpdateClippingRecursive = true;
|
|
448
448
|
} else if (intersects) {
|
|
@@ -597,23 +597,18 @@ public class ReactViewGroup extends ViewGroup
|
|
|
597
597
|
return ViewUtil.getUIManagerType(getId()) == UIManagerType.FABRIC;
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
// This will get called for every overload of addView so there is not need to override every
|
|
603
|
-
// method.
|
|
600
|
+
private void handleAddView(View view) {
|
|
601
|
+
UiThreadUtil.assertOnUiThread();
|
|
604
602
|
|
|
605
603
|
if (!customDrawOrderDisabled()) {
|
|
606
|
-
getDrawingOrderHelper().handleAddView(
|
|
604
|
+
getDrawingOrderHelper().handleAddView(view);
|
|
607
605
|
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
|
|
608
606
|
} else {
|
|
609
607
|
setChildrenDrawingOrderEnabled(false);
|
|
610
608
|
}
|
|
611
|
-
|
|
612
|
-
super.addView(child, index, params);
|
|
613
609
|
}
|
|
614
610
|
|
|
615
|
-
|
|
616
|
-
public void removeView(View view) {
|
|
611
|
+
private void handleRemoveView(View view) {
|
|
617
612
|
UiThreadUtil.assertOnUiThread();
|
|
618
613
|
|
|
619
614
|
if (!customDrawOrderDisabled()) {
|
|
@@ -622,26 +617,61 @@ public class ReactViewGroup extends ViewGroup
|
|
|
622
617
|
} else {
|
|
623
618
|
setChildrenDrawingOrderEnabled(false);
|
|
624
619
|
}
|
|
625
|
-
|
|
626
620
|
recoverFocus(view);
|
|
621
|
+
}
|
|
627
622
|
|
|
623
|
+
private void handleRemoveViews(int start, int count) {
|
|
624
|
+
int endIndex = start + count;
|
|
625
|
+
for (int index = start; index < endIndex; index++) {
|
|
626
|
+
if (index < getChildCount()) {
|
|
627
|
+
handleRemoveView(getChildAt(index));
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
@Override
|
|
633
|
+
public void addView(View child, int index, ViewGroup.LayoutParams params) {
|
|
634
|
+
// This will get called for every overload of addView so there is not need to override every
|
|
635
|
+
// method.
|
|
636
|
+
handleAddView(child);
|
|
637
|
+
super.addView(child, index, params);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
@Override
|
|
641
|
+
protected boolean addViewInLayout(
|
|
642
|
+
View child, int index, LayoutParams params, boolean preventRequestLayout) {
|
|
643
|
+
handleAddView(child);
|
|
644
|
+
return super.addViewInLayout(child, index, params, preventRequestLayout);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
@Override
|
|
648
|
+
public void removeView(View view) {
|
|
649
|
+
handleRemoveView(view);
|
|
628
650
|
super.removeView(view);
|
|
629
651
|
}
|
|
630
652
|
|
|
631
653
|
@Override
|
|
632
654
|
public void removeViewAt(int index) {
|
|
633
|
-
|
|
655
|
+
handleRemoveView(getChildAt(index));
|
|
656
|
+
super.removeViewAt(index);
|
|
657
|
+
}
|
|
634
658
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}
|
|
659
|
+
@Override
|
|
660
|
+
public void removeViewInLayout(View view) {
|
|
661
|
+
handleRemoveView(view);
|
|
662
|
+
super.removeViewInLayout(view);
|
|
663
|
+
}
|
|
641
664
|
|
|
642
|
-
|
|
665
|
+
@Override
|
|
666
|
+
public void removeViewsInLayout(int start, int count) {
|
|
667
|
+
handleRemoveViews(start, count);
|
|
668
|
+
super.removeViewsInLayout(start, count);
|
|
669
|
+
}
|
|
643
670
|
|
|
644
|
-
|
|
671
|
+
@Override
|
|
672
|
+
public void removeViews(int start, int count) {
|
|
673
|
+
handleRemoveViews(start, count);
|
|
674
|
+
super.removeViews(start, count);
|
|
645
675
|
}
|
|
646
676
|
|
|
647
677
|
@Override
|
|
@@ -765,7 +795,7 @@ public class ReactViewGroup extends ViewGroup
|
|
|
765
795
|
clippedSoFar++;
|
|
766
796
|
}
|
|
767
797
|
}
|
|
768
|
-
|
|
798
|
+
removeViewsInLayout(index - clippedSoFar, 1);
|
|
769
799
|
}
|
|
770
800
|
removeFromArray(index);
|
|
771
801
|
}
|
|
@@ -17,8 +17,8 @@ namespace facebook::react {
|
|
|
17
17
|
constexpr struct {
|
|
18
18
|
int32_t Major = 0;
|
|
19
19
|
int32_t Minor = 73;
|
|
20
|
-
int32_t Patch =
|
|
21
|
-
std::string_view Prerelease = "
|
|
20
|
+
int32_t Patch = 7;
|
|
21
|
+
std::string_view Prerelease = "0";
|
|
22
22
|
} ReactNativeVersion;
|
|
23
23
|
|
|
24
24
|
} // namespace facebook::react
|
|
@@ -32,7 +32,10 @@ Pod::Spec.new do |spec|
|
|
|
32
32
|
spec.requires_arc = false
|
|
33
33
|
spec.pod_target_xcconfig = {
|
|
34
34
|
'DEFINES_MODULE' => 'YES'
|
|
35
|
-
}
|
|
35
|
+
}.merge!(ENV['USE_FRAMEWORKS'] != nil ? {
|
|
36
|
+
'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)"'
|
|
37
|
+
} : {})
|
|
38
|
+
|
|
36
39
|
spec.compiler_flags = [
|
|
37
40
|
'-fno-omit-frame-pointer',
|
|
38
41
|
'-fexceptions',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tvos",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.7-0",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@react-native/gradle-plugin": "0.73.4",
|
|
104
104
|
"@react-native/js-polyfills": "0.73.1",
|
|
105
105
|
"@react-native/normalize-colors": "0.73.2",
|
|
106
|
-
"@react-native-tvos/virtualized-lists": "0.73.
|
|
106
|
+
"@react-native-tvos/virtualized-lists": "0.73.7-0",
|
|
107
107
|
"abort-controller": "^3.0.0",
|
|
108
108
|
"anser": "^1.4.9",
|
|
109
109
|
"ansi-regex": "^5.0.0",
|
|
@@ -151,6 +151,6 @@
|
|
|
151
151
|
]
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
|
-
"react-native-core": "npm:react-native@0.73.
|
|
154
|
+
"react-native-core": "npm:react-native@0.73.7"
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -209,7 +209,7 @@ class ReactNativePodsUtils
|
|
|
209
209
|
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
|
|
210
210
|
if pod_name.to_s == target_pod_name
|
|
211
211
|
target_installation_result.native_target.build_configurations.each do |config|
|
|
212
|
-
if configuration == nil || (configuration != nil &&
|
|
212
|
+
if configuration == nil || (configuration != nil && config.name.include?(configuration))
|
|
213
213
|
config.build_settings[settings_name] ||= '$(inherited) '
|
|
214
214
|
config.build_settings[settings_name] << settings_value
|
|
215
215
|
end
|
|
@@ -564,6 +564,44 @@ class ReactNativePodsUtils
|
|
|
564
564
|
ReactNativePodsUtils.update_header_paths_if_depends_on(target_installation_result, "React-ImageManager", header_search_paths)
|
|
565
565
|
end
|
|
566
566
|
|
|
567
|
+
def self.get_privacy_manifest_paths_from(user_project)
|
|
568
|
+
privacy_manifests = user_project
|
|
569
|
+
.files
|
|
570
|
+
.select { |p|
|
|
571
|
+
p.path&.end_with?('PrivacyInfo.xcprivacy')
|
|
572
|
+
}
|
|
573
|
+
return privacy_manifests
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
def self.add_privacy_manifest_if_needed(installer)
|
|
577
|
+
user_project = installer.aggregate_targets
|
|
578
|
+
.map{ |t| t.user_project }
|
|
579
|
+
.first
|
|
580
|
+
privacy_manifest = self.get_privacy_manifest_paths_from(user_project).first
|
|
581
|
+
if privacy_manifest.nil?
|
|
582
|
+
file_timestamp_reason = {
|
|
583
|
+
"NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategoryFileTimestamp",
|
|
584
|
+
"NSPrivacyAccessedAPITypeReasons" => ["C617.1"],
|
|
585
|
+
}
|
|
586
|
+
user_defaults_reason = {
|
|
587
|
+
"NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategoryUserDefaults",
|
|
588
|
+
"NSPrivacyAccessedAPITypeReasons" => ["CA92.1"],
|
|
589
|
+
}
|
|
590
|
+
boot_time_reason = {
|
|
591
|
+
"NSPrivacyAccessedAPIType" => "NSPrivacyAccessedAPICategorySystemBootTime",
|
|
592
|
+
"NSPrivacyAccessedAPITypeReasons" => ["35F9.1"],
|
|
593
|
+
}
|
|
594
|
+
privacy_manifest = {
|
|
595
|
+
"NSPrivacyCollectedDataTypes" => [],
|
|
596
|
+
"NSPrivacyTracking" => false,
|
|
597
|
+
"NSPrivacyAccessedAPITypes" => [file_timestamp_reason, user_defaults_reason, boot_time_reason]
|
|
598
|
+
}
|
|
599
|
+
path = File.join(user_project.path.parent, "PrivacyInfo.xcprivacy")
|
|
600
|
+
Xcodeproj::Plist.write_to_path(privacy_manifest, path)
|
|
601
|
+
Pod::UI.puts "Your app does not have a privacy manifest! A template has been generated containing Required Reasons API usage in the core React Native library. Please add the PrivacyInfo.xcprivacy file to your project and complete data use, tracking and any additional required reasons your app is using according to Apple's guidance: https://developer.apple.com/.../privacy_manifest_files. Then, you will need to manually add this file to your project in Xcode.".red
|
|
602
|
+
end
|
|
603
|
+
end
|
|
604
|
+
|
|
567
605
|
def self.react_native_pods
|
|
568
606
|
return [
|
|
569
607
|
"DoubleConversion",
|
|
@@ -314,6 +314,7 @@ def react_native_post_install(
|
|
|
314
314
|
ReactNativePodsUtils.apply_xcode_15_patch(installer)
|
|
315
315
|
ReactNativePodsUtils.updateOSDeploymentTarget(installer)
|
|
316
316
|
ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer)
|
|
317
|
+
ReactNativePodsUtils.add_privacy_manifest_if_needed(installer)
|
|
317
318
|
|
|
318
319
|
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
|
319
320
|
NewArchitectureHelper.modify_flags_for_new_architecture(installer, NewArchitectureHelper.new_arch_enabled)
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-2024-04-19-RNv0.73.
|
|
1
|
+
hermes-2024-04-19-RNv0.73.5-81ba94ffcf874e378f78579e8a5733e65a2a1b48
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { View, ScrollViewProps, HostComponent, TVParallaxProperties } from 'react-native';
|
|
2
|
+
import type { View, ScrollViewProps, HostComponent, TVParallaxProperties, EventSubscription } from 'react-native';
|
|
3
3
|
|
|
4
4
|
declare module 'react-native' {
|
|
5
5
|
interface ViewProps {
|
|
@@ -59,13 +59,9 @@ declare module 'react-native' {
|
|
|
59
59
|
} | undefined
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
callback?: (component: T, data: HWEvent) => void
|
|
66
|
-
): void;
|
|
67
|
-
disable(): void;
|
|
68
|
-
}
|
|
62
|
+
export const TVEventHandler: {
|
|
63
|
+
addListener: (listener: (event: HWEvent) => void) => EventSubscription | undefined
|
|
64
|
+
};
|
|
69
65
|
|
|
70
66
|
export interface FocusGuideProps extends ViewProps {
|
|
71
67
|
/**
|