react-native-tvos 0.76.5-0 → 0.76.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/AppDelegate/RCTAppDelegate.mm +0 -5
- package/Libraries/AppDelegate/RCTAppSetupUtils.mm +3 -1
- package/Libraries/AppDelegate/RCTRootViewFactory.mm +3 -3
- package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
- package/Libraries/Components/TV/TVFocusGuideView.js +0 -1
- package/Libraries/Components/View/ViewPropTypes.d.ts +4 -2
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImageLoader.mm +9 -1
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +1 -1
- package/Libraries/Utilities/Appearance.js +3 -1
- package/React/Base/RCTConvert.mm +3 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +2 -5
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +85 -31
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +4 -0
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +17 -11
- package/React/Views/RCTTVView.m +5 -2
- package/React/Views/ScrollView/RCTScrollView.m +63 -26
- package/ReactAndroid/api/ReactAndroid.api +2 -0
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +18 -3
- package/ReactAndroid/gradle.properties +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.java +15 -8
- 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/text/TextAttributeProps.java +16 -2
- 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/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +9 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +5 -0
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +2 -0
- package/ReactCommon/react/renderer/attributedstring/conversions.h +5 -0
- package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +12 -0
- package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +2 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +7 -3
- package/gradle/libs.versions.toml +1 -1
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +6 -6
- package/scripts/codegen/generate-artifacts-executor.js +6 -6
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- 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
|
@@ -208,8 +208,7 @@ inline bool operator==(
|
|
|
208
208
|
return areAttributedStringsEquivalentLayoutWise(
|
|
209
209
|
lhs.attributedString, rhs.attributedString) &&
|
|
210
210
|
lhs.paragraphAttributes == rhs.paragraphAttributes &&
|
|
211
|
-
lhs.layoutConstraints
|
|
212
|
-
rhs.layoutConstraints.maximumSize.width;
|
|
211
|
+
lhs.layoutConstraints == rhs.layoutConstraints;
|
|
213
212
|
}
|
|
214
213
|
|
|
215
214
|
inline bool operator!=(
|
|
@@ -243,7 +242,7 @@ struct hash<facebook::react::TextMeasureCacheKey> {
|
|
|
243
242
|
return facebook::react::hash_combine(
|
|
244
243
|
attributedStringHashLayoutWise(key.attributedString),
|
|
245
244
|
key.paragraphAttributes,
|
|
246
|
-
key.layoutConstraints
|
|
245
|
+
key.layoutConstraints);
|
|
247
246
|
}
|
|
248
247
|
};
|
|
249
248
|
|
|
@@ -139,6 +139,7 @@ inline static CGFloat RCTBaseSizeForDynamicTypeRamp(const DynamicTypeRamp &dynam
|
|
|
139
139
|
inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const TextAttributes &textAttributes)
|
|
140
140
|
{
|
|
141
141
|
if (textAttributes.allowFontScaling.value_or(true)) {
|
|
142
|
+
CGFloat fontSizeMultiplier = !isnan(textAttributes.fontSizeMultiplier) ? textAttributes.fontSizeMultiplier : 1.0;
|
|
142
143
|
if (textAttributes.dynamicTypeRamp.has_value()) {
|
|
143
144
|
DynamicTypeRamp dynamicTypeRamp = textAttributes.dynamicTypeRamp.value();
|
|
144
145
|
UIFontMetrics *fontMetrics =
|
|
@@ -146,10 +147,11 @@ inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const Tex
|
|
|
146
147
|
// Using a specific font size reduces rounding errors from -scaledValueForValue:
|
|
147
148
|
CGFloat requestedSize =
|
|
148
149
|
isnan(textAttributes.fontSize) ? RCTBaseSizeForDynamicTypeRamp(dynamicTypeRamp) : textAttributes.fontSize;
|
|
149
|
-
|
|
150
|
-
} else {
|
|
151
|
-
return textAttributes.fontSizeMultiplier;
|
|
150
|
+
fontSizeMultiplier = [fontMetrics scaledValueForValue:requestedSize] / requestedSize;
|
|
152
151
|
}
|
|
152
|
+
CGFloat maxFontSizeMultiplier =
|
|
153
|
+
!isnan(textAttributes.maxFontSizeMultiplier) ? textAttributes.maxFontSizeMultiplier : 0.0;
|
|
154
|
+
return maxFontSizeMultiplier >= 1.0 ? fminf(maxFontSizeMultiplier, fontSizeMultiplier) : fontSizeMultiplier;
|
|
153
155
|
} else {
|
|
154
156
|
return 1.0;
|
|
155
157
|
}
|
|
@@ -407,6 +409,7 @@ static NSMutableAttributedString *RCTNSAttributedStringFragmentWithAttributesFro
|
|
|
407
409
|
{
|
|
408
410
|
auto nsAttributedStringFragment = RCTNSAttributedStringFragmentFromFragment(fragment, placeholderImage);
|
|
409
411
|
|
|
412
|
+
#if !TARGET_OS_MACCATALYST
|
|
410
413
|
if (fragment.parentShadowView.componentHandle) {
|
|
411
414
|
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
|
|
412
415
|
eventEmitterWrapper.eventEmitter = fragment.parentShadowView.eventEmitter;
|
|
@@ -417,6 +420,7 @@ static NSMutableAttributedString *RCTNSAttributedStringFragmentWithAttributesFro
|
|
|
417
420
|
[nsAttributedStringFragment addAttributes:additionalTextAttributes
|
|
418
421
|
range:NSMakeRange(0, nsAttributedStringFragment.length)];
|
|
419
422
|
}
|
|
423
|
+
#endif
|
|
420
424
|
|
|
421
425
|
return nsAttributedStringFragment;
|
|
422
426
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tvos",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.7-0",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -110,13 +110,13 @@
|
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
112
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
113
|
-
"@react-native/assets-registry": "0.76.
|
|
114
|
-
"@react-native/codegen": "0.76.
|
|
115
|
-
"@react-native/community-cli-plugin": "0.76.
|
|
116
|
-
"@react-native/gradle-plugin": "0.76.
|
|
117
|
-
"@react-native/js-polyfills": "0.76.
|
|
118
|
-
"@react-native/normalize-colors": "0.76.
|
|
119
|
-
"@react-native-tvos/virtualized-lists": "0.76.
|
|
113
|
+
"@react-native/assets-registry": "0.76.7",
|
|
114
|
+
"@react-native/codegen": "0.76.7",
|
|
115
|
+
"@react-native/community-cli-plugin": "0.76.7",
|
|
116
|
+
"@react-native/gradle-plugin": "0.76.7",
|
|
117
|
+
"@react-native/js-polyfills": "0.76.7",
|
|
118
|
+
"@react-native/normalize-colors": "0.76.7",
|
|
119
|
+
"@react-native-tvos/virtualized-lists": "0.76.7-0",
|
|
120
120
|
"abort-controller": "^3.0.0",
|
|
121
121
|
"anser": "^1.4.9",
|
|
122
122
|
"ansi-regex": "^5.0.0",
|
|
@@ -44,10 +44,10 @@ class ReactNativePodsUtils
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def self.set_gcc_preprocessor_definition_for_React_hermes(installer)
|
|
47
|
-
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-hermes",
|
|
48
|
-
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-jsinspector",
|
|
49
|
-
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "hermes-engine",
|
|
50
|
-
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-RuntimeHermes",
|
|
47
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-hermes", :debug)
|
|
48
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-jsinspector", :debug)
|
|
49
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "hermes-engine", :debug)
|
|
50
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-RuntimeHermes", :debug)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def self.turn_off_resource_bundle_react_core(installer)
|
|
@@ -193,11 +193,11 @@ class ReactNativePodsUtils
|
|
|
193
193
|
|
|
194
194
|
private
|
|
195
195
|
|
|
196
|
-
def self.add_build_settings_to_pod(installer, settings_name, settings_value, target_pod_name,
|
|
196
|
+
def self.add_build_settings_to_pod(installer, settings_name, settings_value, target_pod_name, configuration_type)
|
|
197
197
|
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
|
|
198
198
|
if pod_name.to_s == target_pod_name
|
|
199
199
|
target_installation_result.native_target.build_configurations.each do |config|
|
|
200
|
-
if
|
|
200
|
+
if configuration_type == nil || (configuration_type != nil && config.type == configuration_type)
|
|
201
201
|
config.build_settings[settings_name] ||= '$(inherited) '
|
|
202
202
|
config.build_settings[settings_name] << settings_value
|
|
203
203
|
end
|
|
@@ -326,13 +326,13 @@ function findNotLinkedLibraries(projectRoot) {
|
|
|
326
326
|
// We don't consider the case were `dependency-name.root` is equal to `null`, because that
|
|
327
327
|
// means that the library is not linked to the app at all, and in that case the dependency
|
|
328
328
|
// should be removed by the user.
|
|
329
|
-
dependency.platforms &&
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
329
|
+
dependency.platforms &&
|
|
330
|
+
Object.keys(dependency.platforms).forEach(platform => {
|
|
331
|
+
if (dependency.platforms[platform] == null) {
|
|
332
|
+
notLinkedPlatforms.push(platform);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
334
335
|
notLinkedLibraries[name] = notLinkedPlatforms;
|
|
335
|
-
|
|
336
336
|
});
|
|
337
337
|
return notLinkedLibraries;
|
|
338
338
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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<<cbc00457c9b6f4639083b6fa970683eb>>
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -46,7 +46,6 @@ export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureF
|
|
|
46
46
|
export type ReactNativeFeatureFlags = {
|
|
47
47
|
...ReactNativeFeatureFlagsJsOnly,
|
|
48
48
|
commonTestFlag: Getter<boolean>,
|
|
49
|
-
allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
|
|
50
49
|
batchRenderingUpdatesInEventLoop: Getter<boolean>,
|
|
51
50
|
completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
|
|
52
51
|
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
|
|
@@ -164,10 +163,6 @@ export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGet
|
|
|
164
163
|
* Common flag for testing. Do NOT modify.
|
|
165
164
|
*/
|
|
166
165
|
export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
|
|
167
|
-
/**
|
|
168
|
-
* Adds support for recursively processing commits that mount synchronously (Android only).
|
|
169
|
-
*/
|
|
170
|
-
export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean> = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);
|
|
171
166
|
/**
|
|
172
167
|
* 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.
|
|
173
168
|
*/
|
|
@@ -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<<ac46e3eb810d890a0f8199fe100936cb>>
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -24,7 +24,6 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
24
24
|
|
|
25
25
|
export interface Spec extends TurboModule {
|
|
26
26
|
+commonTestFlag?: () => boolean;
|
|
27
|
-
+allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
|
|
28
27
|
+batchRenderingUpdatesInEventLoop?: () => boolean;
|
|
29
28
|
+completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
|
|
30
29
|
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import type { View, ScrollViewProps, HostComponent, EventSubscription } from 'react-native';
|
|
3
3
|
|
|
4
4
|
declare module 'react-native' {
|
|
5
|
+
export type FocusDestination = null | number | React.Component<any, any> | React.ComponentClass<any>;
|
|
6
|
+
|
|
5
7
|
interface ViewProps {
|
|
6
8
|
/**
|
|
7
9
|
* Android TV only prop
|
|
@@ -10,29 +12,29 @@ declare module 'react-native' {
|
|
|
10
12
|
/**
|
|
11
13
|
* TV next focus down (see documentation for the View component).
|
|
12
14
|
*/
|
|
13
|
-
nextFocusDown?:
|
|
15
|
+
nextFocusDown?: FocusDestination | undefined,
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* TV next focus forward (see documentation for the View component).
|
|
17
19
|
*
|
|
18
20
|
* @platform android
|
|
19
21
|
*/
|
|
20
|
-
nextFocusForward?:
|
|
22
|
+
nextFocusForward?: FocusDestination | undefined,
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* TV next focus left (see documentation for the View component).
|
|
24
26
|
*/
|
|
25
|
-
nextFocusLeft?:
|
|
27
|
+
nextFocusLeft?: FocusDestination | undefined,
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
30
|
* TV next focus right (see documentation for the View component).
|
|
29
31
|
*/
|
|
30
|
-
nextFocusRight?:
|
|
32
|
+
nextFocusRight?: FocusDestination | undefined,
|
|
31
33
|
|
|
32
34
|
/**
|
|
33
35
|
* TV next focus up (see documentation for the View component).
|
|
34
36
|
*/
|
|
35
|
-
nextFocusUp?:
|
|
37
|
+
nextFocusUp?: FocusDestination | undefined,
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export interface NativeMethods {
|
|
@@ -118,7 +120,7 @@ declare module 'react-native' {
|
|
|
118
120
|
/**
|
|
119
121
|
* Array of `Component`s to register as destinations with `UIFocusGuide`
|
|
120
122
|
*/
|
|
121
|
-
destinations?:
|
|
123
|
+
destinations?: FocusDestination[] | undefined;
|
|
122
124
|
/**
|
|
123
125
|
* If true, `TVFocusGuide` will automatically manage focus for you.
|
|
124
126
|
* It will redirect the focus to the first focusable child on the first visit.
|
|
@@ -154,7 +156,7 @@ declare module 'react-native' {
|
|
|
154
156
|
|
|
155
157
|
export type FocusGuideMethods = {
|
|
156
158
|
setDestinations: (
|
|
157
|
-
destinations:
|
|
159
|
+
destinations: FocusDestination[],
|
|
158
160
|
) => void;
|
|
159
161
|
}
|
|
160
162
|
|