react-native-tvos 0.84.0-0rc0 → 0.84.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/Core/ReactNativeVersion.js +2 -2
- package/README.md +16 -54
- package/React/Base/RCTVersion.m +2 -2
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +12 -12
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +14 -16
- package/React/Views/RCTTVView.h +6 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +101 -22
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +1 -1
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +0 -4
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +0 -4
- package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +0 -4
- package/ReactCommon/cmake-utils/react-native-flags.cmake +3 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +3 -3
- package/ReactCommon/hermes/executor/CMakeLists.txt +0 -4
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +2 -0
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +0 -4
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +44 -3
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropSerializer.cpp +408 -0
- package/ReactCommon/react/renderer/animationbackend/AnimatedProps.h +66 -1
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropsBuilder.h +58 -2
- package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.h +52 -0
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +6 -9
- package/ReactCommon/react/runtime/CMakeLists.txt +0 -4
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +0 -4
- package/package.json +11 -10
- package/react-native.config.js +17 -0
- package/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js +5 -5
- package/scripts/ios-configure-glog.sh +18 -0
- package/scripts/react_native_pods.rb +5 -0
- package/sdks/.hermesv1version +1 -1
- package/sdks/.hermesversion +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +15 -6
- package/sdks/hermes-engine/hermes-utils.rb +1 -1
- package/sdks/hermes-engine/version.properties +2 -2
- package/settings.gradle.kts +21 -1
- package/third-party-podspecs/glog.podspec +1 -0
- package/tvosCommands.js +51 -0
- package/types/public/ReactNativeTVTypes.d.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tvos",
|
|
3
|
-
"version": "0.84.0
|
|
3
|
+
"version": "0.84.1-0",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"bugs": "https://github.com/facebook/react-native/issues",
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">= 20.19.4"
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
30
|
"react-native": "cli.js"
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"React-Core.podspec",
|
|
92
92
|
"React-Core-prebuilt.podspec",
|
|
93
93
|
"react-native.config.js",
|
|
94
|
+
"tvosCommands.js",
|
|
94
95
|
"React.podspec",
|
|
95
96
|
"React",
|
|
96
97
|
"!React/Fabric/RCTThirdPartyFabricComponentsProvider.*",
|
|
@@ -164,12 +165,12 @@
|
|
|
164
165
|
},
|
|
165
166
|
"dependencies": {
|
|
166
167
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
167
|
-
"@react-native/assets-registry": "0.84.
|
|
168
|
-
"@react-native/codegen": "0.84.
|
|
169
|
-
"@react-native/community-cli-plugin": "0.84.
|
|
170
|
-
"@react-native/gradle-plugin": "0.84.
|
|
171
|
-
"@react-native/js-polyfills": "0.84.
|
|
172
|
-
"@react-native/normalize-colors": "0.84.
|
|
168
|
+
"@react-native/assets-registry": "0.84.1",
|
|
169
|
+
"@react-native/codegen": "0.84.1",
|
|
170
|
+
"@react-native/community-cli-plugin": "0.84.1",
|
|
171
|
+
"@react-native/gradle-plugin": "0.84.1",
|
|
172
|
+
"@react-native/js-polyfills": "0.84.1",
|
|
173
|
+
"@react-native/normalize-colors": "0.84.1",
|
|
173
174
|
"abort-controller": "^3.0.0",
|
|
174
175
|
"anser": "^1.4.9",
|
|
175
176
|
"ansi-regex": "^5.0.0",
|
|
@@ -178,7 +179,7 @@
|
|
|
178
179
|
"base64-js": "^1.5.1",
|
|
179
180
|
"commander": "^12.0.0",
|
|
180
181
|
"flow-enums-runtime": "^0.0.6",
|
|
181
|
-
"hermes-compiler": "0.
|
|
182
|
+
"hermes-compiler": "250829098.0.9",
|
|
182
183
|
"invariant": "^2.2.4",
|
|
183
184
|
"jest-environment-node": "^29.7.0",
|
|
184
185
|
"memoize-one": "^5.0.0",
|
|
@@ -197,7 +198,7 @@
|
|
|
197
198
|
"whatwg-fetch": "^3.0.0",
|
|
198
199
|
"ws": "^7.5.10",
|
|
199
200
|
"yargs": "^17.6.2",
|
|
200
|
-
"@react-native-tvos/virtualized-lists": "0.84.0
|
|
201
|
+
"@react-native-tvos/virtualized-lists": "0.84.1-0"
|
|
201
202
|
},
|
|
202
203
|
"codegenConfig": {
|
|
203
204
|
"libraries": [
|
package/react-native.config.js
CHANGED
|
@@ -136,4 +136,21 @@ if (android != null) {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
try {
|
|
140
|
+
const apple = require('@react-native-community/cli-platform-apple');
|
|
141
|
+
const tvosCommands = require('./tvosCommands');
|
|
142
|
+
|
|
143
|
+
config.commands.push(...tvosCommands);
|
|
144
|
+
config.platforms.tvos = {
|
|
145
|
+
projectConfig: apple.getProjectConfig({platformName: 'tvos'}),
|
|
146
|
+
dependencyConfig: apple.getDependencyConfig({platformName: 'tvos'}),
|
|
147
|
+
};
|
|
148
|
+
} catch {
|
|
149
|
+
if (verbose) {
|
|
150
|
+
console.warn(
|
|
151
|
+
'@react-native-community/cli-platform-apple not found, the react-native.config.js may be unusable.',
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
139
156
|
module.exports = config;
|
|
@@ -169,11 +169,10 @@ function findFilesWithExtension(
|
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
// Skip hidden folders
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
) {
|
|
172
|
+
// Skip hidden files/folders (starting with `.`) but allow `.pnpm`
|
|
173
|
+
// Note: Only check the filename, not the entire path, to avoid false positives
|
|
174
|
+
// when the workspace itself is under a hidden folder (e.g., ~/.jenkins/)
|
|
175
|
+
if (file.startsWith('.') && file !== '.pnpm') {
|
|
177
176
|
return null;
|
|
178
177
|
}
|
|
179
178
|
|
|
@@ -226,5 +225,6 @@ function findRCTComponentViewProtocolClass(filepath /*: string */) {
|
|
|
226
225
|
}
|
|
227
226
|
|
|
228
227
|
module.exports = {
|
|
228
|
+
findFilesWithExtension,
|
|
229
229
|
generateRCTThirdPartyComponents,
|
|
230
230
|
};
|
|
@@ -104,3 +104,21 @@ cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
|
|
|
104
104
|
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
|
|
105
105
|
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
|
|
106
106
|
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
# Create a custom module.modulemap that works with Swift C++ interop
|
|
110
|
+
# The issue is that glog headers include other headers inside namespace blocks
|
|
111
|
+
# which Clang treats as module imports inside namespaces (which is illegal)
|
|
112
|
+
# Solution: Use textual headers to prevent submodule creation
|
|
113
|
+
cat > src/glog/module.modulemap << 'MODULEMAP'
|
|
114
|
+
module glog {
|
|
115
|
+
// Use textual headers to avoid submodule generation
|
|
116
|
+
// This prevents the "import within namespace" error with Swift C++ interop
|
|
117
|
+
textual header "log_severity.h"
|
|
118
|
+
textual header "logging.h"
|
|
119
|
+
textual header "raw_logging.h"
|
|
120
|
+
textual header "stl_logging.h"
|
|
121
|
+
textual header "vlog_is_on.h"
|
|
122
|
+
export *
|
|
123
|
+
}
|
|
124
|
+
MODULEMAP
|
|
@@ -92,6 +92,11 @@ def use_react_native! (
|
|
|
92
92
|
# excluding the legacy arch unless the user turns this flag off explicitly.
|
|
93
93
|
ENV['RCT_REMOVE_LEGACY_ARCH'] = ENV['RCT_REMOVE_LEGACY_ARCH'] == '0' ? '0' : '1'
|
|
94
94
|
|
|
95
|
+
# Enable Hermes V1 by default.
|
|
96
|
+
# Users can still turn it off and use legacy hermes by setting the RCT_HERMES_V1_ENABLED
|
|
97
|
+
# environment variable to '0'.
|
|
98
|
+
ENV['RCT_HERMES_V1_ENABLED']= ENV['RCT_HERMES_V1_ENABLED'] == '0' ? '0' : '1'
|
|
99
|
+
|
|
95
100
|
ReactNativePodsUtils.check_minimum_required_xcode()
|
|
96
101
|
|
|
97
102
|
# Current target definition is provided by Cocoapods and it refers to the target
|
package/sdks/.hermesv1version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-v250829098.0.
|
|
1
|
+
hermes-v250829098.0.9
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-v0.15.
|
|
1
|
+
hermes-v0.15.1
|
|
@@ -22,14 +22,15 @@ end
|
|
|
22
22
|
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
|
|
23
23
|
versionProperties = Hash[*File.read("version.properties").split(/[=\n]+/)]
|
|
24
24
|
|
|
25
|
-
if ENV['RCT_HERMES_V1_ENABLED'] == "
|
|
26
|
-
version = versionProperties['HERMES_V1_VERSION_NAME']
|
|
27
|
-
else
|
|
25
|
+
if ENV['RCT_HERMES_V1_ENABLED'] == "0"
|
|
28
26
|
version = versionProperties['HERMES_VERSION_NAME']
|
|
27
|
+
else
|
|
28
|
+
version = versionProperties['HERMES_V1_VERSION_NAME']
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Local monorepo build
|
|
32
|
-
|
|
32
|
+
# We don't want to build Hermes V1 from source
|
|
33
|
+
if ENV['RCT_HERMES_V1_ENABLED'] == "0" && package['version'] == "1000.0.0" then
|
|
33
34
|
hermesCompilerVersion = package['dependencies']['hermes-compiler']
|
|
34
35
|
if hermesCompilerVersion != "0.0.0" then
|
|
35
36
|
version = hermesCompilerVersion
|
|
@@ -68,7 +69,15 @@ Pod::Spec.new do |spec|
|
|
|
68
69
|
|
|
69
70
|
spec.subspec 'Pre-built' do |ss|
|
|
70
71
|
ss.preserve_paths = ["destroot/bin/*"].concat(["**/*.{h,c,cpp}"])
|
|
71
|
-
|
|
72
|
+
if ENV["RCT_HERMES_V1_ENABLED"] == "0"
|
|
73
|
+
ss.source_files = "destroot/include/hermes/**/*.h"
|
|
74
|
+
else
|
|
75
|
+
# Hermes v1 is shipping a jsi/hermes.h header which is imported by the hermes.h header
|
|
76
|
+
# and that file is not present in React Native's JSI
|
|
77
|
+
# (see https://github.com/facebook/react-native/tree/main/packages/react-native/ReactCommon/jsi/jsi/ where there is
|
|
78
|
+
# hermes-interface.h but not hermes.h)
|
|
79
|
+
ss.source_files = ["destroot/include/hermes/**/*.h", "destroot/include/jsi/hermes.h"]
|
|
80
|
+
end
|
|
72
81
|
ss.header_mappings_dir = "destroot/include"
|
|
73
82
|
ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermesvm.xcframework"
|
|
74
83
|
ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermesvm.xcframework"
|
|
@@ -131,7 +140,7 @@ Pod::Spec.new do |spec|
|
|
|
131
140
|
ss.header_dir = 'hermes/Public'
|
|
132
141
|
end
|
|
133
142
|
|
|
134
|
-
if ENV['RCT_HERMES_V1_ENABLED']
|
|
143
|
+
if ENV['RCT_HERMES_V1_ENABLED'] == "0"
|
|
135
144
|
spec.subspec 'inspector' do |ss|
|
|
136
145
|
ss.source_files = ''
|
|
137
146
|
ss.public_header_files = 'API/hermes/inspector/*.h'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
HERMES_VERSION_NAME=0.15.
|
|
2
|
-
HERMES_V1_VERSION_NAME=250829098.0.
|
|
1
|
+
HERMES_VERSION_NAME=0.15.1
|
|
2
|
+
HERMES_V1_VERSION_NAME=250829098.0.9
|
package/settings.gradle.kts
CHANGED
|
@@ -47,8 +47,28 @@ buildscript {
|
|
|
47
47
|
val properties = java.util.Properties()
|
|
48
48
|
val propertiesToInherit = listOf("hermesV1Enabled", "react.hermesV1Enabled")
|
|
49
49
|
|
|
50
|
+
// We cannot assume that the node_modules are next to the android project, for example
|
|
51
|
+
// in monorepos, they might get hoisted.
|
|
52
|
+
// In a composite build, this included build can access the invoking (consumer) build
|
|
53
|
+
// via `gradle.parent`. We use its StartParameter to locate the app's `gradle.properties`:
|
|
54
|
+
// - `projectDir/gradle.properties` when Gradle is run with `-p <androidDir>`
|
|
55
|
+
// - `currentDir/gradle.properties` when run from the app android folder
|
|
56
|
+
// If neither exists, we keep the legacy RN fallback path below.
|
|
57
|
+
|
|
58
|
+
val parentGradle = gradle.parent
|
|
59
|
+
val parentProjectDir = parentGradle?.startParameter?.projectDir
|
|
60
|
+
val parentCurrentDir = parentGradle?.startParameter?.currentDir
|
|
61
|
+
val gradlePropertiesCandidates =
|
|
62
|
+
listOfNotNull(
|
|
63
|
+
parentProjectDir?.resolve("gradle.properties"),
|
|
64
|
+
parentCurrentDir?.resolve("gradle.properties"),
|
|
65
|
+
// Backward-compatible fallback for classic RN app layouts.
|
|
66
|
+
file("../../android/gradle.properties"),
|
|
67
|
+
)
|
|
68
|
+
|
|
50
69
|
try {
|
|
51
|
-
|
|
70
|
+
val propertiesFile = gradlePropertiesCandidates.firstOrNull { it.exists() }
|
|
71
|
+
propertiesFile?.inputStream()?.use { properties.load(it) }
|
|
52
72
|
|
|
53
73
|
gradle.rootProject {
|
|
54
74
|
propertiesToInherit.forEach { property ->
|
|
@@ -33,6 +33,7 @@ Pod::Spec.new do |spec|
|
|
|
33
33
|
spec.exclude_files = "src/windows/**/*"
|
|
34
34
|
spec.compiler_flags = '-Wno-shorten-64-to-32'
|
|
35
35
|
spec.resource_bundles = {'glog_privacy' => 'glog/PrivacyInfo.xcprivacy'}
|
|
36
|
+
spec.module_map = 'src/glog/module.modulemap'
|
|
36
37
|
|
|
37
38
|
spec.pod_target_xcconfig = {
|
|
38
39
|
"USE_HEADERMAP" => "NO",
|
package/tvosCommands.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @flow
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
let apple;
|
|
6
|
+
try {
|
|
7
|
+
apple = require('@react-native-community/cli-platform-apple');
|
|
8
|
+
} catch {
|
|
9
|
+
if (verbose) {
|
|
10
|
+
console.warn(
|
|
11
|
+
'@react-native-community/cli-platform-apple not found, the react-native.config.js may be unusable.'
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const platformName = 'tvos';
|
|
17
|
+
|
|
18
|
+
const run = {
|
|
19
|
+
name: `run-${platformName}`,
|
|
20
|
+
description: 'builds your app and starts it on a tvOS simulator or Apple TV device',
|
|
21
|
+
func: apple.createRun({platformName}),
|
|
22
|
+
examples: [
|
|
23
|
+
{
|
|
24
|
+
desc: 'Run on a specific simulator',
|
|
25
|
+
cmd: `npx react-native run-${platformName} --simulator "Apple TV"`,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
options: apple.getRunOptions({platformName}),
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const log = {
|
|
32
|
+
name: `log-${platformName}`,
|
|
33
|
+
description: 'displays system logs from a connected tvOS device or simulator',
|
|
34
|
+
func: apple.createLog({platformName: platformName}),
|
|
35
|
+
options: apple.getLogOptions({platformName}),
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const build = {
|
|
39
|
+
name: `build-${platformName}`,
|
|
40
|
+
description: 'builds your app for tvOS',
|
|
41
|
+
func: apple.createBuild({platformName}),
|
|
42
|
+
examples: [
|
|
43
|
+
{
|
|
44
|
+
desc: 'Build the app for all tvOS devices in Release mode',
|
|
45
|
+
cmd: `npx react-native build-${platformName} --mode "Release"`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
options: apple.getBuildOptions({platformName}),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
module.exports = [run, log, build];
|
|
@@ -52,6 +52,13 @@ declare module 'react-native' {
|
|
|
52
52
|
disableGestureHandlersCancelTouches(): void;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Hardware event received from TVEventHandler
|
|
57
|
+
*
|
|
58
|
+
* Note: The 'blur' and 'focus' event types are deprecated and will no longer be
|
|
59
|
+
* emitted on new architecture (Fabric). Use onFocus/onBlur component props instead.
|
|
60
|
+
* See: https://github.com/react-native-tvos/react-native-tvos/issues/1037
|
|
61
|
+
*/
|
|
55
62
|
export type HWEvent = {
|
|
56
63
|
eventType: 'up' | 'down' | 'right' | 'left' | 'longUp' | 'longDown' | 'longRight' | 'longLeft' | 'blur' | 'focus' | 'pan' | string;
|
|
57
64
|
eventKeyAction?: -1 | 1 | 0 | number | undefined;
|