react-native 0.71.0-rc.0 → 0.71.0-rc.2
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 +1 -1
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +1 -0
- package/Libraries/Text/RCTTextAttributes.h +2 -0
- package/Libraries/Text/RCTTextAttributes.m +9 -1
- package/Libraries/Text/Text/RCTDynamicTypeRamp.h +37 -0
- package/Libraries/Text/Text/RCTDynamicTypeRamp.m +82 -0
- package/Libraries/Text/Text.d.ts +17 -0
- package/Libraries/Text/TextNativeComponent.js +1 -0
- package/Libraries/Text/TextProps.js +17 -0
- package/Libraries/WebPerformance/NativePerformanceObserver.cpp +42 -0
- package/Libraries/WebPerformance/NativePerformanceObserver.h +64 -0
- package/Libraries/WebPerformance/NativePerformanceObserver.js +41 -0
- package/Libraries/WebPerformance/PerformanceObserver.js +223 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/CoreModulesPlugins.h +1 -0
- package/React/CoreModules/CoreModulesPlugins.mm +1 -0
- package/ReactAndroid/build.gradle +7 -5
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +1 -1
- package/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp +12 -3
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle +13 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.java +3 -1
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.cpp +15 -6
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultTurboModuleManagerDelegate.h +6 -1
- package/ReactCommon/ReactCommon.podspec +9 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +6 -0
- package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +1 -0
- package/ReactCommon/react/renderer/attributedstring/conversions.h +78 -0
- package/ReactCommon/react/renderer/attributedstring/primitives.h +21 -0
- package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +6 -0
- package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +3 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +78 -9
- package/ReactCommon/yoga/yoga/Yoga.cpp +19 -10
- package/index.js +16 -11
- package/package.json +7 -6
- package/scripts/cocoapods/codegen_utils.rb +12 -11
- package/scripts/cocoapods/jsengine.rb +28 -3
- package/scripts/cocoapods/new_architecture.rb +1 -0
- package/scripts/cocoapods/utils.rb +0 -12
- package/scripts/codegen/generate-specs-cli-executor.js +4 -4
- package/scripts/hermes/hermes-utils.js +3 -7
- package/scripts/react_native_pods.rb +5 -3
- package/sdks/hermes-engine/hermes-engine.podspec +8 -3
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +1 -1
- package/sdks/hermes-engine/utils/copy-hermes-xcode.sh +12 -4
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/App.tsx +1 -1
- package/template/Gemfile +1 -1
- package/template/android/app/build.gradle +2 -2
- package/template/android/build.gradle +3 -3
- package/template/ios/HelloWorld/AppDelegate.h +1 -1
- package/template/package.json +4 -2
- package/types/index.d.ts +0 -1
- package/Libraries/Image/ImagePickerIOS.d.ts +0 -48
- package/Libraries/Image/ImagePickerIOS.js +0 -103
- package/Libraries/Image/NativeImagePickerIOS.js +0 -39
- package/Libraries/Performance/PerformanceObserver.js +0 -124
- package/ReactCommon/React-bridging.podspec +0 -43
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.71.0-rc.
|
|
3
|
+
"version": "0.71.0-rc.2",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
|
|
86
86
|
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
|
|
87
87
|
"update-lock": "npx yarn-deduplicate",
|
|
88
|
-
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.
|
|
88
|
+
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.1",
|
|
89
89
|
"docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .",
|
|
90
90
|
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh",
|
|
91
91
|
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
107
|
-
"@react-native-community/cli": "10.0.0-alpha.
|
|
108
|
-
"@react-native-community/cli-platform-android": "10.0.0-alpha.
|
|
107
|
+
"@react-native-community/cli": "10.0.0-alpha.5",
|
|
108
|
+
"@react-native-community/cli-platform-android": "10.0.0-alpha.4",
|
|
109
109
|
"@react-native-community/cli-platform-ios": "10.0.0-alpha.3",
|
|
110
110
|
"@react-native/assets": "1.0.0",
|
|
111
111
|
"@react-native/normalize-color": "2.1.0",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"pretty-format": "^26.5.2",
|
|
128
128
|
"promise": "^8.3.0",
|
|
129
129
|
"react-devtools-core": "^4.26.1",
|
|
130
|
-
"react-native-gradle-plugin": "^0.71.
|
|
130
|
+
"react-native-gradle-plugin": "^0.71.9",
|
|
131
131
|
"react-refresh": "^0.4.0",
|
|
132
132
|
"react-shallow-renderer": "^16.15.0",
|
|
133
133
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"use-sync-external-store": "^1.0.0",
|
|
137
137
|
"whatwg-fetch": "^3.0.0",
|
|
138
138
|
"ws": "^6.2.2",
|
|
139
|
-
"react-native-codegen": "^0.71.
|
|
139
|
+
"react-native-codegen": "^0.71.3"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"flow-bin": "^0.191.0",
|
|
@@ -178,6 +178,7 @@
|
|
|
178
178
|
"metro-babel-register": "0.73.3",
|
|
179
179
|
"metro-memory-fs": "0.73.3",
|
|
180
180
|
"mkdirp": "^0.5.1",
|
|
181
|
+
"mock-fs": "^5.1.4",
|
|
181
182
|
"prettier": "^2.4.1",
|
|
182
183
|
"shelljs": "^0.8.5",
|
|
183
184
|
"signedsource": "^1.0.0",
|
|
@@ -98,21 +98,22 @@ class CodegenUtils
|
|
|
98
98
|
].join(' ')
|
|
99
99
|
},
|
|
100
100
|
'dependencies': {
|
|
101
|
-
"FBReactNativeSpec":
|
|
102
|
-
"React-jsiexecutor":
|
|
103
|
-
"RCT-Folly": [
|
|
104
|
-
"RCTRequired": [
|
|
105
|
-
"RCTTypeSafety": [
|
|
106
|
-
"React-Core": [
|
|
107
|
-
"React-jsi": [
|
|
108
|
-
"ReactCommon/turbomodule/
|
|
101
|
+
"FBReactNativeSpec": [],
|
|
102
|
+
"React-jsiexecutor": [],
|
|
103
|
+
"RCT-Folly": [],
|
|
104
|
+
"RCTRequired": [],
|
|
105
|
+
"RCTTypeSafety": [],
|
|
106
|
+
"React-Core": [],
|
|
107
|
+
"React-jsi": [],
|
|
108
|
+
"ReactCommon/turbomodule/bridging": [],
|
|
109
|
+
"ReactCommon/turbomodule/core": []
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
if fabric_enabled
|
|
113
114
|
spec[:'dependencies'].merge!({
|
|
114
|
-
'React-graphics': [
|
|
115
|
-
'React-rncore': [
|
|
115
|
+
'React-graphics': [],
|
|
116
|
+
'React-rncore': [],
|
|
116
117
|
});
|
|
117
118
|
end
|
|
118
119
|
|
|
@@ -122,7 +123,7 @@ class CodegenUtils
|
|
|
122
123
|
});
|
|
123
124
|
else
|
|
124
125
|
spec[:'dependencies'].merge!({
|
|
125
|
-
'React-jsc': [
|
|
126
|
+
'React-jsc': [],
|
|
126
127
|
});
|
|
127
128
|
end
|
|
128
129
|
|
|
@@ -37,7 +37,7 @@ end
|
|
|
37
37
|
|
|
38
38
|
def add_copy_hermes_framework_script_phase(installer, react_native_path)
|
|
39
39
|
utils_dir = File.join(react_native_path, "sdks", "hermes-engine", "utils")
|
|
40
|
-
phase_name = "[RN]Copy Hermes
|
|
40
|
+
phase_name = "[RN] Copy Hermes Framework"
|
|
41
41
|
project = installer.generated_aggregate_targets.first.user_project
|
|
42
42
|
target = project.targets.first
|
|
43
43
|
if target.shell_script_build_phases.none? { |phase| phase.name == phase_name }
|
|
@@ -49,8 +49,33 @@ end
|
|
|
49
49
|
|
|
50
50
|
def remove_copy_hermes_framework_script_phase(installer, react_native_path)
|
|
51
51
|
utils_dir = File.join(react_native_path, "sdks", "hermes-engine", "utils")
|
|
52
|
-
phase_name = "[RN]Copy Hermes
|
|
52
|
+
phase_name = "[RN] Copy Hermes Framework"
|
|
53
53
|
project = installer.generated_aggregate_targets.first.user_project
|
|
54
|
-
project.
|
|
54
|
+
target = project.native_targets.first
|
|
55
|
+
target.shell_script_build_phases.each do |phase|
|
|
56
|
+
if phase.name == phase_name
|
|
57
|
+
target.build_phases.delete(phase)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
55
60
|
project.save()
|
|
56
61
|
end
|
|
62
|
+
|
|
63
|
+
def remove_hermesc_build_dir(react_native_path)
|
|
64
|
+
%x(rm -rf #{react_native_path}/sdks/hermes-engine/build_host_hermesc)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def is_building_hermes_from_source(react_native_version, react_native_path)
|
|
68
|
+
if ENV['HERMES_ENGINE_TARBALL_PATH'] != nil
|
|
69
|
+
return false
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
isInMain = react_native_version.include?('1000.0.0')
|
|
73
|
+
|
|
74
|
+
hermestag_file = File.join(react_native_path, "sdks", ".hermesversion")
|
|
75
|
+
isInCI = ENV['CI'] === 'true'
|
|
76
|
+
|
|
77
|
+
isReleaseBranch = File.exist?(hermestag_file) && isInCI
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
return isInMain || isReleaseBranch
|
|
81
|
+
end
|
|
@@ -107,18 +107,6 @@ class ReactNativePodsUtils
|
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
-
def self.fix_react_bridging_header_search_paths(installer)
|
|
111
|
-
installer.target_installation_results.pod_target_installation_results
|
|
112
|
-
.each do |pod_name, target_installation_result|
|
|
113
|
-
target_installation_result.native_target.build_configurations.each do |config|
|
|
114
|
-
# For third party modules who have React-bridging dependency to search correct headers
|
|
115
|
-
config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
|
|
116
|
-
config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" '
|
|
117
|
-
config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" '
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
|
|
122
110
|
def self.apply_mac_catalyst_patches(installer)
|
|
123
111
|
# Fix bundle signing issues
|
|
124
112
|
installer.pods_project.targets.each do |target|
|
|
@@ -17,16 +17,16 @@ const RNCodegen = utils.getCodegen();
|
|
|
17
17
|
|
|
18
18
|
const GENERATORS = {
|
|
19
19
|
all: {
|
|
20
|
-
android: ['componentsAndroid', 'modulesAndroid'],
|
|
21
|
-
ios: ['componentsIOS', 'modulesIOS'],
|
|
20
|
+
android: ['componentsAndroid', 'modulesAndroid', 'modulesCxx'],
|
|
21
|
+
ios: ['componentsIOS', 'modulesIOS', 'modulesCxx'],
|
|
22
22
|
},
|
|
23
23
|
components: {
|
|
24
24
|
android: ['componentsAndroid'],
|
|
25
25
|
ios: ['componentsIOS'],
|
|
26
26
|
},
|
|
27
27
|
modules: {
|
|
28
|
-
android: ['modulesAndroid'],
|
|
29
|
-
ios: ['modulesIOS'],
|
|
28
|
+
android: ['modulesAndroid', 'modulesCxx'],
|
|
29
|
+
ios: ['modulesIOS', 'modulesCxx'],
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -212,14 +212,11 @@ set_target_properties(native-hermesc PROPERTIES
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
function getHermesPrebuiltArtifactsTarballName(buildType
|
|
215
|
+
function getHermesPrebuiltArtifactsTarballName(buildType) {
|
|
216
216
|
if (!buildType) {
|
|
217
217
|
throw Error('Did not specify build type.');
|
|
218
218
|
}
|
|
219
|
-
|
|
220
|
-
throw Error('Did not specify release version.');
|
|
221
|
-
}
|
|
222
|
-
return `hermes-runtime-darwin-${buildType.toLowerCase()}-v${releaseVersion}.tar.gz`;
|
|
219
|
+
return `hermes-ios-${buildType.toLowerCase()}.tar.gz`;
|
|
223
220
|
}
|
|
224
221
|
|
|
225
222
|
/**
|
|
@@ -233,7 +230,6 @@ function createTarballFromDirectory(directory, filename) {
|
|
|
233
230
|
function createHermesPrebuiltArtifactsTarball(
|
|
234
231
|
hermesDir,
|
|
235
232
|
buildType,
|
|
236
|
-
releaseVersion,
|
|
237
233
|
tarballOutputDir,
|
|
238
234
|
excludeDebugSymbols,
|
|
239
235
|
) {
|
|
@@ -268,7 +264,7 @@ function createHermesPrebuiltArtifactsTarball(
|
|
|
268
264
|
|
|
269
265
|
const tarballFilename = path.join(
|
|
270
266
|
tarballOutputDir,
|
|
271
|
-
getHermesPrebuiltArtifactsTarballName(buildType
|
|
267
|
+
getHermesPrebuiltArtifactsTarballName(buildType),
|
|
272
268
|
);
|
|
273
269
|
|
|
274
270
|
try {
|
|
@@ -93,7 +93,6 @@ def use_react_native! (
|
|
|
93
93
|
pod 'React-RCTVibration', :path => "#{prefix}/Libraries/Vibration"
|
|
94
94
|
pod 'React-Core/RCTWebSocket', :path => "#{prefix}/"
|
|
95
95
|
|
|
96
|
-
pod 'React-bridging', :path => "#{prefix}/ReactCommon"
|
|
97
96
|
pod 'React-cxxreact', :path => "#{prefix}/ReactCommon/cxxreact"
|
|
98
97
|
|
|
99
98
|
if hermes_enabled
|
|
@@ -203,15 +202,18 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
|
|
|
203
202
|
flipper_post_install(installer)
|
|
204
203
|
end
|
|
205
204
|
|
|
206
|
-
|
|
205
|
+
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
|
|
206
|
+
version = package['version']
|
|
207
|
+
|
|
208
|
+
if ReactNativePodsUtils.has_pod(installer, 'hermes-engine') && is_building_hermes_from_source(version, react_native_path)
|
|
207
209
|
add_copy_hermes_framework_script_phase(installer, react_native_path)
|
|
208
210
|
else
|
|
209
211
|
remove_copy_hermes_framework_script_phase(installer, react_native_path)
|
|
212
|
+
remove_hermesc_build_dir(react_native_path)
|
|
210
213
|
end
|
|
211
214
|
|
|
212
215
|
ReactNativePodsUtils.exclude_i386_architecture_while_using_hermes(installer)
|
|
213
216
|
ReactNativePodsUtils.fix_library_search_paths(installer)
|
|
214
|
-
ReactNativePodsUtils.fix_react_bridging_header_search_paths(installer)
|
|
215
217
|
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
|
|
216
218
|
|
|
217
219
|
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
|
@@ -26,7 +26,13 @@ isInMain = version.include?('1000.0.0')
|
|
|
26
26
|
isNightly = version.start_with?('0.0.0-')
|
|
27
27
|
|
|
28
28
|
if ENV.has_key?('HERMES_ENGINE_TARBALL_PATH')
|
|
29
|
-
|
|
29
|
+
if !File.exist?(ENV['HERMES_ENGINE_TARBALL_PATH'])
|
|
30
|
+
abort "[Hermes] HERMES_ENGINE_TARBALL_PATH is set, but points to a non-existing file: \"#{ENV['HERMES_ENGINE_TARBALL_PATH']}\"\nIf you don't want to use tarball, run `unset HERMES_ENGINE_TARBALL_PATH`"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
if ENV.has_key?('HERMES_ENGINE_TARBALL_PATH')
|
|
35
|
+
Pod::UI.puts "[Hermes] Using pre-built Hermes binaries from local path: #{ENV['HERMES_ENGINE_TARBALL_PATH']}".yellow if Object.const_defined?("Pod::UI")
|
|
30
36
|
source[:http] = "file://#{ENV['HERMES_ENGINE_TARBALL_PATH']}"
|
|
31
37
|
elsif isInMain
|
|
32
38
|
Pod::UI.puts '[Hermes] Installing hermes-engine may take slightly longer, building Hermes compiler from source...'.yellow if Object.const_defined?("Pod::UI")
|
|
@@ -80,8 +86,6 @@ Pod::Spec.new do |spec|
|
|
|
80
86
|
|
|
81
87
|
elsif source[:git] then
|
|
82
88
|
|
|
83
|
-
ENV['HERMES_BUILD_FROM_SOURCE'] = "1"
|
|
84
|
-
|
|
85
89
|
spec.subspec 'Hermes' do |ss|
|
|
86
90
|
ss.source_files = ''
|
|
87
91
|
ss.public_header_files = 'API/hermes/*.h'
|
|
@@ -108,6 +112,7 @@ Pod::Spec.new do |spec|
|
|
|
108
112
|
# Keep hermesc_path synchronized with .gitignore entry.
|
|
109
113
|
ENV['REACT_NATIVE_PATH'] = react_native_path
|
|
110
114
|
hermesc_path = "${REACT_NATIVE_PATH}/sdks/hermes-engine/build_host_hermesc"
|
|
115
|
+
# NOTE: Prepare command is not run if the pod is not downloaded.
|
|
111
116
|
spec.prepare_command = ". #{react_native_path}/sdks/hermes-engine/utils/build-hermesc-xcode.sh #{hermesc_path}"
|
|
112
117
|
end
|
|
113
118
|
|
|
@@ -6,9 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
set -x
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
src="${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/${PLATFORM_NAME}/hermes.framework"
|
|
10
10
|
|
|
11
|
-
if [[ ! -
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if [[ ! -e "$src" ]]; then
|
|
12
|
+
echo "$src does not exist."
|
|
13
|
+
exit 1
|
|
14
14
|
fi
|
|
15
|
+
|
|
16
|
+
dst1="${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes"
|
|
17
|
+
[ ! -f "$dst1" ] && mkdir -p "$dst1"
|
|
18
|
+
cp -R "$src" "$dst1"
|
|
19
|
+
|
|
20
|
+
dst2="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
|
21
|
+
[ ! -f "$dst2" ] && mkdir -p "$dst2"
|
|
22
|
+
cp -R "$src" "$dst2"
|
|
Binary file
|
|
Binary file
|
package/template/App.tsx
CHANGED
|
@@ -77,7 +77,7 @@ function App(): JSX.Element {
|
|
|
77
77
|
backgroundColor: isDarkMode ? Colors.black : Colors.white,
|
|
78
78
|
}}>
|
|
79
79
|
<Section title="Step One">
|
|
80
|
-
Edit <Text style={styles.highlight}>App.
|
|
80
|
+
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
|
|
81
81
|
screen and then come back to see your edits.
|
|
82
82
|
</Section>
|
|
83
83
|
<Section title="See Your Changes">
|
package/template/Gemfile
CHANGED
|
@@ -150,7 +150,7 @@ android {
|
|
|
150
150
|
|
|
151
151
|
dependencies {
|
|
152
152
|
// The version of react-native is set by the React Native Gradle Plugin
|
|
153
|
-
implementation("com.facebook.react:react-
|
|
153
|
+
implementation("com.facebook.react:react-android")
|
|
154
154
|
|
|
155
155
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
|
|
156
156
|
|
|
@@ -161,7 +161,7 @@ dependencies {
|
|
|
161
161
|
|
|
162
162
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
|
163
163
|
if (hermesEnabled.toBoolean()) {
|
|
164
|
-
implementation("com.facebook.react:hermes-
|
|
164
|
+
implementation("com.facebook.react:hermes-android")
|
|
165
165
|
} else {
|
|
166
166
|
implementation jscFlavor
|
|
167
167
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
buildscript {
|
|
4
4
|
ext {
|
|
5
|
-
buildToolsVersion = "
|
|
5
|
+
buildToolsVersion = "33.0.0"
|
|
6
6
|
minSdkVersion = 21
|
|
7
|
-
compileSdkVersion =
|
|
8
|
-
targetSdkVersion =
|
|
7
|
+
compileSdkVersion = 33
|
|
8
|
+
targetSdkVersion = 33
|
|
9
9
|
|
|
10
10
|
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
|
11
11
|
ndkVersion = "23.1.7779620"
|
package/template/package.json
CHANGED
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.71.0-rc.
|
|
14
|
+
"react-native": "0.71.0-rc.2"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@babel/core": "^7.12.9",
|
|
18
|
+
"@babel/preset-env": "^7.14.0",
|
|
18
19
|
"@babel/runtime": "^7.12.5",
|
|
19
20
|
"@react-native-community/eslint-config": "^3.0.0",
|
|
20
21
|
"@tsconfig/react-native": "^2.0.2",
|
|
@@ -27,8 +28,9 @@
|
|
|
27
28
|
"eslint": "^8.19.0",
|
|
28
29
|
"jest": "^29.2.1",
|
|
29
30
|
"metro-react-native-babel-preset": "0.73.3",
|
|
31
|
+
"prettier": "^2.4.1",
|
|
30
32
|
"react-test-renderer": "18.2.0",
|
|
31
|
-
"typescript": "
|
|
33
|
+
"typescript": "4.8.4"
|
|
32
34
|
},
|
|
33
35
|
"jest": {
|
|
34
36
|
"preset": "react-native"
|
package/types/index.d.ts
CHANGED
|
@@ -110,7 +110,6 @@ export * from '../Libraries/EventEmitter/NativeEventEmitter';
|
|
|
110
110
|
export * from '../Libraries/EventEmitter/RCTDeviceEventEmitter';
|
|
111
111
|
export * from '../Libraries/EventEmitter/RCTNativeAppEventEmitter';
|
|
112
112
|
export * from '../Libraries/Image/Image';
|
|
113
|
-
export * from '../Libraries/Image/ImagePickerIOS';
|
|
114
113
|
export * from '../Libraries/Image/ImageResizeMode';
|
|
115
114
|
export * from '../Libraries/Image/ImageSource';
|
|
116
115
|
export * from '../Libraries/Interaction/InteractionManager';
|
|
@@ -1,48 +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
|
-
* @format
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export interface OpenCameraDialogOptions {
|
|
11
|
-
/** Defaults to false */
|
|
12
|
-
videoMode?: boolean | undefined;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface OpenSelectDialogOptions {
|
|
16
|
-
/** Defaults to true */
|
|
17
|
-
showImages?: boolean | undefined;
|
|
18
|
-
/** Defaults to false */
|
|
19
|
-
showVideos?: boolean | undefined;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** [imageURL|tempImageTag, height, width] */
|
|
23
|
-
export type ImagePickerResult = [string, number, number];
|
|
24
|
-
|
|
25
|
-
export interface ImagePickerIOSStatic {
|
|
26
|
-
canRecordVideos(callback: (value: boolean) => void): void;
|
|
27
|
-
canUseCamera(callback: (value: boolean) => void): void;
|
|
28
|
-
openCameraDialog(
|
|
29
|
-
config: OpenCameraDialogOptions,
|
|
30
|
-
successCallback: (args: ImagePickerResult) => void,
|
|
31
|
-
cancelCallback: (args: any[]) => void,
|
|
32
|
-
): void;
|
|
33
|
-
openSelectDialog(
|
|
34
|
-
config: OpenSelectDialogOptions,
|
|
35
|
-
successCallback: (args: ImagePickerResult) => void,
|
|
36
|
-
cancelCallback: (args: any[]) => void,
|
|
37
|
-
): void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* ImagePickerIOS has been extracted from react-native core and will be removed in a future release.
|
|
42
|
-
* Please upgrade to use either `@react-native-community/react-native-image-picker` or 'expo-image-picker'.
|
|
43
|
-
* If you cannot upgrade to a different library, please install the deprecated `@react-native-community/image-picker-ios` package.
|
|
44
|
-
* @see https://github.com/react-native-community/react-native-image-picker-ios
|
|
45
|
-
* @deprecated
|
|
46
|
-
*/
|
|
47
|
-
export const ImagePickerIOS: ImagePickerIOSStatic;
|
|
48
|
-
export type ImagePickerIOS = ImagePickerIOSStatic;
|
|
@@ -1,103 +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
|
-
* @format
|
|
8
|
-
* @flow strict-local
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import NativeImagePickerIOS from './NativeImagePickerIOS';
|
|
12
|
-
import invariant from 'invariant';
|
|
13
|
-
|
|
14
|
-
const ImagePickerIOS = {
|
|
15
|
-
canRecordVideos: function (callback: (result: boolean) => void): void {
|
|
16
|
-
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
|
|
17
|
-
return NativeImagePickerIOS.canRecordVideos(callback);
|
|
18
|
-
},
|
|
19
|
-
canUseCamera: function (callback: (result: boolean) => void): void {
|
|
20
|
-
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
|
|
21
|
-
return NativeImagePickerIOS.canUseCamera(callback);
|
|
22
|
-
},
|
|
23
|
-
openCameraDialog: function (
|
|
24
|
-
config: $ReadOnly<{|
|
|
25
|
-
unmirrorFrontFacingCamera?: boolean,
|
|
26
|
-
videoMode?: boolean,
|
|
27
|
-
|}>,
|
|
28
|
-
successCallback: (imageURL: string, height: number, width: number) => void,
|
|
29
|
-
cancelCallback: () => void,
|
|
30
|
-
): void {
|
|
31
|
-
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
|
|
32
|
-
|
|
33
|
-
var newConfig = {
|
|
34
|
-
videoMode: true,
|
|
35
|
-
unmirrorFrontFacingCamera: false,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
if (config.videoMode != null) {
|
|
39
|
-
newConfig.videoMode = config.videoMode;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (config.unmirrorFrontFacingCamera != null) {
|
|
43
|
-
newConfig.unmirrorFrontFacingCamera = config.unmirrorFrontFacingCamera;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return NativeImagePickerIOS.openCameraDialog(
|
|
47
|
-
newConfig,
|
|
48
|
-
successCallback,
|
|
49
|
-
cancelCallback,
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
openSelectDialog: function (
|
|
53
|
-
config: $ReadOnly<{|
|
|
54
|
-
showImages?: boolean,
|
|
55
|
-
showVideos?: boolean,
|
|
56
|
-
|}>,
|
|
57
|
-
successCallback: (imageURL: string, height: number, width: number) => void,
|
|
58
|
-
cancelCallback: () => void,
|
|
59
|
-
): void {
|
|
60
|
-
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
|
|
61
|
-
|
|
62
|
-
var newConfig = {
|
|
63
|
-
showImages: true,
|
|
64
|
-
showVideos: false,
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
if (config.showImages != null) {
|
|
68
|
-
newConfig.showImages = config.showImages;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (config.showVideos != null) {
|
|
72
|
-
newConfig.showVideos = config.showVideos;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return NativeImagePickerIOS.openSelectDialog(
|
|
76
|
-
newConfig,
|
|
77
|
-
successCallback,
|
|
78
|
-
cancelCallback,
|
|
79
|
-
);
|
|
80
|
-
},
|
|
81
|
-
/**
|
|
82
|
-
* In iOS 13, the video URLs returned by the Image Picker are invalidated when
|
|
83
|
-
* the picker is dismissed, unless reference to it is held. This API allows
|
|
84
|
-
* the application to signal when it's finished with the video so that the
|
|
85
|
-
* reference can be cleaned up.
|
|
86
|
-
* It is safe to call this method for urlsthat aren't video URLs;
|
|
87
|
-
* it will be a no-op.
|
|
88
|
-
*/
|
|
89
|
-
removePendingVideo: function (url: string): void {
|
|
90
|
-
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
|
|
91
|
-
NativeImagePickerIOS.removePendingVideo(url);
|
|
92
|
-
},
|
|
93
|
-
/**
|
|
94
|
-
* WARNING: In most cases, removePendingVideo should be used instead because
|
|
95
|
-
* clearAllPendingVideos could clear out pending videos made by other callers.
|
|
96
|
-
*/
|
|
97
|
-
clearAllPendingVideos: function (): void {
|
|
98
|
-
invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
|
|
99
|
-
NativeImagePickerIOS.clearAllPendingVideos();
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
module.exports = ImagePickerIOS;
|
|
@@ -1,39 +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
|
-
* @flow strict
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type {TurboModule} from '../TurboModule/RCTExport';
|
|
12
|
-
|
|
13
|
-
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
|
14
|
-
|
|
15
|
-
export interface Spec extends TurboModule {
|
|
16
|
-
+getConstants: () => {||};
|
|
17
|
-
+canRecordVideos: (callback: (result: boolean) => void) => void;
|
|
18
|
-
+canUseCamera: (callback: (result: boolean) => void) => void;
|
|
19
|
-
+openCameraDialog: (
|
|
20
|
-
config: {|
|
|
21
|
-
unmirrorFrontFacingCamera: boolean,
|
|
22
|
-
videoMode: boolean,
|
|
23
|
-
|},
|
|
24
|
-
successCallback: (imageURL: string, height: number, width: number) => void,
|
|
25
|
-
cancelCallback: () => void,
|
|
26
|
-
) => void;
|
|
27
|
-
+openSelectDialog: (
|
|
28
|
-
config: {|
|
|
29
|
-
showImages: boolean,
|
|
30
|
-
showVideos: boolean,
|
|
31
|
-
|},
|
|
32
|
-
successCallback: (imageURL: string, height: number, width: number) => void,
|
|
33
|
-
cancelCallback: () => void,
|
|
34
|
-
) => void;
|
|
35
|
-
+clearAllPendingVideos: () => void;
|
|
36
|
-
+removePendingVideo: (url: string) => void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default (TurboModuleRegistry.get<Spec>('ImagePickerIOS'): ?Spec);
|