react-native-tvos 0.74.0-0rc3 → 0.74.1-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/AppDelegate/RCTAppDelegate+Protected.h +16 -0
- package/Libraries/AppDelegate/RCTAppDelegate.mm +32 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/ReactNative/RendererImplementation.js +2 -0
- package/README.md +29 -9
- package/React/Base/RCTUtils.m +28 -8
- package/React/Base/RCTVersion.m +2 -2
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +2 -4
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.mm +22 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +5 -1
- package/React/Fabric/RCTScheduler.h +2 -0
- package/React/Fabric/RCTScheduler.mm +6 -0
- package/React/Fabric/RCTSurfacePresenter.mm +5 -0
- package/React/Modules/RCTUIManager.m +8 -9
- package/React/Views/RCTComponentData.m +14 -1
- package/ReactAndroid/api/ReactAndroid.api +1 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +24 -9
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +19 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +31 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +34 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +11 -18
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +10 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.java +1 -3
- package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +38 -3
- package/ReactAndroid/src/main/jni/react/fabric/Binding.h +8 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +43 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +10 -4
- package/ReactCommon/ReactCommon.podspec +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/jsc/JSCRuntime.cpp +2 -0
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +2 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +16 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +62 -26
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +8 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +4 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +16 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +7 -3
- package/ReactCommon/react/renderer/mounting/MountingTransaction.cpp +13 -0
- package/ReactCommon/react/renderer/mounting/MountingTransaction.h +9 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +7 -2
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +11 -0
- package/package.json +12 -12
- package/scripts/cocoapods/privacy_manifest_utils.rb +172 -0
- package/scripts/cocoapods/utils.rb +1 -38
- package/scripts/react_native_pods.rb +12 -3
- 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/src/private/featureflags/NativeReactNativeFeatureFlags.js +4 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -6
- package/template/package.json +5 -5
- package/third-party-podspecs/RCT-Folly.podspec +1 -0
- package/types/public/ReactNativeTVTypes.d.ts +4 -8
- package/Libraries/React-Native +0 -214
- package/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java +0 -98
|
@@ -1,98 +0,0 @@
|
|
|
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;
|
|
9
|
-
|
|
10
|
-
import android.view.KeyEvent;
|
|
11
|
-
import android.view.View;
|
|
12
|
-
import com.facebook.react.bridge.WritableMap;
|
|
13
|
-
import com.facebook.react.bridge.WritableNativeMap;
|
|
14
|
-
import com.facebook.react.common.MapBuilder;
|
|
15
|
-
import java.util.Map;
|
|
16
|
-
|
|
17
|
-
/** Responsible for dispatching events specific for hardware inputs. */
|
|
18
|
-
class ReactAndroidHWInputDeviceHelper {
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Contains a mapping between handled KeyEvents and the corresponding navigation event that should
|
|
22
|
-
* be fired when the KeyEvent is received.
|
|
23
|
-
*/
|
|
24
|
-
private static final Map<Integer, String> KEY_EVENTS_ACTIONS =
|
|
25
|
-
MapBuilder.<Integer, String>builder()
|
|
26
|
-
.put(KeyEvent.KEYCODE_DPAD_CENTER, "select")
|
|
27
|
-
.put(KeyEvent.KEYCODE_ENTER, "select")
|
|
28
|
-
.put(KeyEvent.KEYCODE_SPACE, "select")
|
|
29
|
-
.put(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, "playPause")
|
|
30
|
-
.put(KeyEvent.KEYCODE_MEDIA_REWIND, "rewind")
|
|
31
|
-
.put(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD, "fastForward")
|
|
32
|
-
.put(KeyEvent.KEYCODE_MEDIA_STOP, "stop")
|
|
33
|
-
.put(KeyEvent.KEYCODE_MEDIA_NEXT, "next")
|
|
34
|
-
.put(KeyEvent.KEYCODE_MEDIA_PREVIOUS, "previous")
|
|
35
|
-
.put(KeyEvent.KEYCODE_DPAD_UP, "up")
|
|
36
|
-
.put(KeyEvent.KEYCODE_DPAD_RIGHT, "right")
|
|
37
|
-
.put(KeyEvent.KEYCODE_DPAD_DOWN, "down")
|
|
38
|
-
.put(KeyEvent.KEYCODE_DPAD_LEFT, "left")
|
|
39
|
-
.put(KeyEvent.KEYCODE_INFO, "info")
|
|
40
|
-
.put(KeyEvent.KEYCODE_MENU, "menu")
|
|
41
|
-
.build();
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* We keep a reference to the last focused view id so that we can send it as a target for key
|
|
45
|
-
* events and be able to send a blur event when focus changes.
|
|
46
|
-
*/
|
|
47
|
-
private int mLastFocusedViewId = View.NO_ID;
|
|
48
|
-
|
|
49
|
-
private final ReactRootView mReactRootView;
|
|
50
|
-
|
|
51
|
-
ReactAndroidHWInputDeviceHelper(ReactRootView mReactRootView) {
|
|
52
|
-
this.mReactRootView = mReactRootView;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** Called from {@link ReactRootView}. This is the main place the key events are handled. */
|
|
56
|
-
public void handleKeyEvent(KeyEvent ev) {
|
|
57
|
-
int eventKeyCode = ev.getKeyCode();
|
|
58
|
-
int eventKeyAction = ev.getAction();
|
|
59
|
-
if ((eventKeyAction == KeyEvent.ACTION_UP || eventKeyAction == KeyEvent.ACTION_DOWN)
|
|
60
|
-
&& KEY_EVENTS_ACTIONS.containsKey(eventKeyCode)) {
|
|
61
|
-
dispatchEvent(KEY_EVENTS_ACTIONS.get(eventKeyCode), mLastFocusedViewId, eventKeyAction);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** Called from {@link ReactRootView} when focused view changes. */
|
|
66
|
-
public void onFocusChanged(View newFocusedView) {
|
|
67
|
-
if (mLastFocusedViewId == newFocusedView.getId()) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (mLastFocusedViewId != View.NO_ID) {
|
|
71
|
-
dispatchEvent("blur", mLastFocusedViewId);
|
|
72
|
-
}
|
|
73
|
-
mLastFocusedViewId = newFocusedView.getId();
|
|
74
|
-
dispatchEvent("focus", newFocusedView.getId());
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** Called from {@link ReactRootView} when the whole view hierarchy looses focus. */
|
|
78
|
-
public void clearFocus() {
|
|
79
|
-
if (mLastFocusedViewId != View.NO_ID) {
|
|
80
|
-
dispatchEvent("blur", mLastFocusedViewId);
|
|
81
|
-
}
|
|
82
|
-
mLastFocusedViewId = View.NO_ID;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private void dispatchEvent(String eventType, int targetViewId) {
|
|
86
|
-
dispatchEvent(eventType, targetViewId, -1);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private void dispatchEvent(String eventType, int targetViewId, int eventKeyAction) {
|
|
90
|
-
WritableMap event = new WritableNativeMap();
|
|
91
|
-
event.putString("eventType", eventType);
|
|
92
|
-
event.putInt("eventKeyAction", eventKeyAction);
|
|
93
|
-
if (targetViewId != View.NO_ID) {
|
|
94
|
-
event.putInt("tag", targetViewId);
|
|
95
|
-
}
|
|
96
|
-
mReactRootView.sendEvent("onHWKeyEvent", event);
|
|
97
|
-
}
|
|
98
|
-
}
|