mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
61
Commits
v0.76.4
...
0.76-stable
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b051ce4f8 | ||
|
|
f566ba139a | ||
|
|
ee289a21c0 | ||
|
|
b6400aae90 | ||
|
|
187f9c41db | ||
|
|
21919be5ee | ||
|
|
71abbab169 | ||
|
|
2bddb0012e | ||
|
|
73b41b5808 | ||
|
|
63c350826e | ||
|
|
084a723075 | ||
|
|
bb7f479548 | ||
|
|
cea7f4cd0a | ||
|
|
14d0dc5ed9 | ||
|
|
b9c4095e40 | ||
|
|
8eec35f134 | ||
|
|
ffe7bd1471 | ||
|
|
9ba96ad79d | ||
|
|
e2b081e66f | ||
|
|
68055f2d8a | ||
|
|
08c04147ba | ||
|
|
9e846b4d11 | ||
|
|
ac637ff448 | ||
|
|
23b888ff2d | ||
|
|
edea009534 | ||
|
|
39502c290b | ||
|
|
b0bc141574 | ||
|
|
db3239a84a | ||
|
|
c0e6523d0f | ||
|
|
f8857ba3b5 | ||
|
|
5f1134c8df | ||
|
|
edafe1fe76 | ||
|
|
030ed97d80 | ||
|
|
3077055e5d | ||
|
|
dedb9a230f | ||
|
|
d04b630daa | ||
|
|
784c0e6734 | ||
|
|
ecb9c582e6 | ||
|
|
cc03a857d9 | ||
|
|
a0411eebe2 | ||
|
|
342e3ec530 | ||
|
|
5446d8c701 | ||
|
|
cd7cf07d32 | ||
|
|
fb7f87ecb2 | ||
|
|
73ffe1394f | ||
|
|
e6374c6e60 | ||
|
|
07b7953af1 | ||
|
|
30c3912eed | ||
|
|
36ac19442a | ||
|
|
8428a98c9a | ||
|
|
4ca9d72eab | ||
|
|
ca3cddb636 | ||
|
|
f8654f9540 | ||
|
|
fcbcf80d1c | ||
|
|
93e9d5794e | ||
|
|
08976e46da | ||
|
|
94e2b5b1b4 | ||
|
|
e0374f2199 | ||
|
|
d1ce8fafb6 | ||
|
|
d105c2c6fe | ||
|
|
7ea8e50c36 |
@@ -39,6 +39,9 @@ runs:
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
|
||||
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
|
||||
- name: Downgrade CMake
|
||||
shell: powershell
|
||||
run: choco install cmake --version 3.31.6 --force
|
||||
- name: Build HermesC for Windows
|
||||
shell: powershell
|
||||
run: |
|
||||
|
||||
@@ -56,7 +56,7 @@ runs:
|
||||
echo "Stop recording. Saving to screen.mp4"
|
||||
adb pull /sdcard/screen.mp4
|
||||
- name: Store tests result
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: e2e_android_${{ inputs.app-id }}_report_${{ inputs.jsengine }}
|
||||
path: |
|
||||
|
||||
@@ -131,26 +131,6 @@ jobs:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_android:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs: [set_release_type]
|
||||
container:
|
||||
image: reactnativecommunity/react-native-android:latest
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
||||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build Android
|
||||
uses: ./.github/actions/build-android
|
||||
with:
|
||||
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
|
||||
build_npm_package:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs:
|
||||
@@ -160,7 +140,6 @@ jobs:
|
||||
build_hermes_macos,
|
||||
build_hermesc_linux,
|
||||
build_hermesc_windows,
|
||||
build_android,
|
||||
]
|
||||
container:
|
||||
image: reactnativecommunity/react-native-android:latest
|
||||
|
||||
@@ -6,3 +6,4 @@ ruby ">= 2.6.10"
|
||||
gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
|
||||
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
||||
gem 'xcodeproj', '< 1.26.0'
|
||||
gem 'concurrent-ruby', '< 1.3.4'
|
||||
|
||||
@@ -54,6 +54,8 @@ nexusPublishing {
|
||||
sonatype {
|
||||
username.set(sonatypeUsername)
|
||||
password.set(sonatypePassword)
|
||||
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
|
||||
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+2
-2
@@ -49,8 +49,8 @@
|
||||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.6.3",
|
||||
"@pkgjs/parseargs": "^0.11.0",
|
||||
"@react-native/metro-babel-transformer": "0.76.4",
|
||||
"@react-native/metro-config": "0.76.4",
|
||||
"@react-native/metro-babel-transformer": "0.76.9",
|
||||
"@react-native/metro-config": "0.76.9",
|
||||
"@tsconfig/node18": "1.0.1",
|
||||
"@types/react": "^18.2.6",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -25,7 +25,7 @@
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.76.4"
|
||||
"@react-native/codegen": "0.76.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,8 +22,8 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.76.4",
|
||||
"@react-native/metro-babel-transformer": "0.76.4",
|
||||
"@react-native/dev-middleware": "0.76.9",
|
||||
"@react-native/metro-babel-transformer": "0.76.9",
|
||||
"chalk": "^4.0.0",
|
||||
"execa": "^5.1.1",
|
||||
"invariant": "^2.2.4",
|
||||
@@ -38,10 +38,10 @@
|
||||
"metro-resolver": "^0.81.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/cli-server-api": "*"
|
||||
"@react-native-community/cli": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@react-native-community/cli-server-api": {
|
||||
"@react-native-community/cli": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
import type {NextHandleFunction, Server} from 'connect';
|
||||
import type {TerminalReportableEvent} from 'metro/src/lib/TerminalReporter';
|
||||
|
||||
import typeof * as CLIServerAPI from '@react-native-community/cli-server-api';
|
||||
|
||||
import {logger} from '../../utils/logger';
|
||||
|
||||
type MiddlewareReturn = {
|
||||
@@ -65,11 +67,26 @@ const communityMiddlewareFallback = {
|
||||
// Attempt to use the community middleware if it exists, but fallback to
|
||||
// the stubs if it doesn't.
|
||||
try {
|
||||
const community = require('@react-native-community/cli-server-api');
|
||||
communityMiddlewareFallback.indexPageMiddleware =
|
||||
community.indexPageMiddleware;
|
||||
// `@react-native-community/cli` is an optional peer dependency of this
|
||||
// package, and should be a dev dependency of the host project (via the
|
||||
// community template's package.json).
|
||||
const communityCliPath = require.resolve('@react-native-community/cli');
|
||||
|
||||
// `@react-native-community/cli-server-api` is a dependency of
|
||||
// `@react-native-community/cli`, but is not re-exported by it, so we need
|
||||
// to resolve the former through the latter.
|
||||
const communityCliServerApiPath = require.resolve(
|
||||
'@react-native-community/cli-server-api',
|
||||
{paths: [communityCliPath]},
|
||||
);
|
||||
// $FlowIgnore[unsupported-syntax] dynamic import
|
||||
const communityCliServerApi: CLIServerAPI = require(
|
||||
communityCliServerApiPath,
|
||||
);
|
||||
communityMiddlewareFallback.createDevServerMiddleware =
|
||||
community.createDevServerMiddleware;
|
||||
communityCliServerApi.createDevServerMiddleware;
|
||||
communityMiddlewareFallback.indexPageMiddleware =
|
||||
communityCliServerApi.indexPageMiddleware;
|
||||
} catch {
|
||||
logger.debug(`⚠️ Unable to find @react-native-community/cli-server-api
|
||||
Starting the server without the community middleware.`);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Dev server middleware for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -23,11 +23,12 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@isaacs/ttlcache": "^1.4.1",
|
||||
"@react-native/debugger-frontend": "0.76.4",
|
||||
"@react-native/debugger-frontend": "0.76.9",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
"debug": "^2.2.0",
|
||||
"invariant": "^2.2.4",
|
||||
"nullthrows": "^1.1.1",
|
||||
"open": "^7.0.3",
|
||||
"selfsigned": "^2.4.1",
|
||||
|
||||
@@ -37,7 +37,7 @@ const WS_DEBUGGER_URL = '/inspector/debug';
|
||||
const PAGES_LIST_JSON_URL = '/json';
|
||||
const PAGES_LIST_JSON_URL_2 = '/json/list';
|
||||
const PAGES_LIST_JSON_VERSION_URL = '/json/version';
|
||||
const MAX_PONG_LATENCY_MS = 5000;
|
||||
const MAX_PONG_LATENCY_MS = 60000;
|
||||
const DEBUGGER_HEARTBEAT_INTERVAL_MS = 10000;
|
||||
|
||||
const INTERNAL_ERROR_CODE = 1011;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@react-native/eslint-plugin": "0.76.4",
|
||||
"@react-native/eslint-plugin": "0.76.9",
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "ESLint rules to validate NativeModule and Component Specs",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@react-native/codegen": "0.76.4",
|
||||
"@react-native/codegen": "0.76.9",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
|
||||
@@ -4,7 +4,7 @@ gson = "2.8.9"
|
||||
guava = "31.0.1-jre"
|
||||
javapoet = "1.13.0"
|
||||
junit = "4.13.2"
|
||||
kotlin = "1.9.24"
|
||||
kotlin = "1.9.25"
|
||||
assertj = "3.25.1"
|
||||
|
||||
[libraries]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
+7
-3
@@ -12,6 +12,7 @@ import com.facebook.react.utils.detectOSAwareHermesCommand
|
||||
import com.facebook.react.utils.moveTo
|
||||
import com.facebook.react.utils.windowsAwareCommandLine
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.ConfigurableFileTree
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
@@ -19,6 +20,7 @@ import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.provider.ListProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.process.ExecOperations
|
||||
|
||||
abstract class BundleHermesCTask : DefaultTask() {
|
||||
|
||||
@@ -26,6 +28,8 @@ abstract class BundleHermesCTask : DefaultTask() {
|
||||
group = "react"
|
||||
}
|
||||
|
||||
@get:Inject abstract val execOperations: ExecOperations
|
||||
|
||||
@get:Internal abstract val root: DirectoryProperty
|
||||
|
||||
@get:InputFiles
|
||||
@@ -127,9 +131,9 @@ abstract class BundleHermesCTask : DefaultTask() {
|
||||
File(jsIntermediateSourceMapsDir.get().asFile, "$bundleAssetName.compiler.map")
|
||||
|
||||
private fun runCommand(command: List<Any>) {
|
||||
project.exec {
|
||||
it.workingDir(root.get().asFile)
|
||||
it.commandLine(command)
|
||||
execOperations.exec { exec ->
|
||||
exec.workingDir(root.get().asFile)
|
||||
exec.commandLine(command)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ internal object DependencyUtils {
|
||||
}
|
||||
}
|
||||
// We add the snapshot for users on nightlies.
|
||||
mavenRepoFromUrl("https://oss.sonatype.org/content/repositories/snapshots/") { repo ->
|
||||
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
}
|
||||
repositories.mavenCentral { repo ->
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ class DependencyUtilsTest {
|
||||
|
||||
@Test
|
||||
fun configureRepositories_containsSnapshotRepo() {
|
||||
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
|
||||
val project = createProject()
|
||||
|
||||
configureRepositories(project, tempFolder.root)
|
||||
@@ -138,7 +138,7 @@ class DependencyUtilsTest {
|
||||
|
||||
@Test
|
||||
fun configureRepositories_snapshotRepoHasHigherPriorityThanMavenCentral() {
|
||||
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
|
||||
val mavenCentralURI = URI.create("https://repo.maven.apache.org/maven2/")
|
||||
val project = createProject()
|
||||
|
||||
|
||||
@@ -5,3 +5,4 @@ ruby ">= 2.6.10"
|
||||
gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
|
||||
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
||||
gem 'xcodeproj', '< 1.26.0'
|
||||
gem 'concurrent-ruby', '< 1.3.4'
|
||||
|
||||
@@ -12,7 +12,7 @@ buildscript {
|
||||
compileSdkVersion = 35
|
||||
targetSdkVersion = 34
|
||||
ndkVersion = "26.1.10909125"
|
||||
kotlinVersion = "1.9.24"
|
||||
kotlinVersion = "1.9.25"
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "helloworld",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"bootstrap": "node ./cli.js bootstrap",
|
||||
@@ -13,16 +13,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "18.3.1",
|
||||
"react-native": "0.76.4"
|
||||
"react-native": "0.76.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@react-native/babel-preset": "0.76.4",
|
||||
"@react-native/core-cli-utils": "0.76.4",
|
||||
"@react-native/eslint-config": "0.76.4",
|
||||
"@react-native/metro-config": "0.76.4",
|
||||
"@react-native/babel-preset": "0.76.9",
|
||||
"@react-native/core-cli-utils": "0.76.9",
|
||||
"@react-native/eslint-config": "0.76.9",
|
||||
"@react-native/metro-config": "0.76.9",
|
||||
"babel-jest": "^29.6.3",
|
||||
"chalk": "^4.1.2",
|
||||
"commander": "^12.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/hermes-inspector-msggen",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"private": true,
|
||||
"description": "Hermes Inspector Message Generator for React Native",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,8 +26,8 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.76.4",
|
||||
"@react-native/metro-babel-transformer": "0.76.4",
|
||||
"@react-native/js-polyfills": "0.76.9",
|
||||
"@react-native/metro-babel-transformer": "0.76.9",
|
||||
"metro-config": "^0.81.0",
|
||||
"metro-runtime": "^0.81.0"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Babel preset for React Native applications",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
@@ -55,7 +55,7 @@
|
||||
"@babel/plugin-transform-typescript": "^7.25.2",
|
||||
"@babel/plugin-transform-unicode-regex": "^7.24.7",
|
||||
"@babel/template": "^7.25.0",
|
||||
"@react-native/babel-plugin-codegen": "0.76.4",
|
||||
"@react-native/babel-plugin-codegen": "0.76.9",
|
||||
"babel-plugin-syntax-hermes-parser": "^0.25.1",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"react-refresh": "^0.14.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-babel-transformer",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Babel transformer for React Native applications.",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.76.4",
|
||||
"@react-native/babel-preset": "0.76.9",
|
||||
"hermes-parser": "0.23.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/bots",
|
||||
"description": "React Native Bots",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen-typescript-test",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"private": true,
|
||||
"description": "TypeScript related unit test for @react-native/codegen",
|
||||
"license": "MIT",
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepare": "yarn run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.76.4"
|
||||
"@react-native/codegen": "0.76.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-info",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"main": "build/index.js",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
plugins {
|
||||
id("com.facebook.react")
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"js",
|
||||
"android",
|
||||
"react-native.config.js",
|
||||
"!android/build",
|
||||
"!**/__tests__",
|
||||
"!**/__fixtures__",
|
||||
@@ -15,9 +16,12 @@
|
||||
"react-native",
|
||||
"android"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublishOnly": "node ./scripts/prepublish-popup-menu-android.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.76.4"
|
||||
"@react-native/codegen": "0.76.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.2.6",
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This script is used to update the android/build.gradle.kts file
|
||||
* with the versions from the libs.versions.toml file.
|
||||
*
|
||||
* This is needed because this package is consumed from source from
|
||||
* external users and we don't want to have several SDK version around to
|
||||
* maintain.
|
||||
*
|
||||
* It's invoked as a prepublish script for this package.
|
||||
*/
|
||||
|
||||
function extractVersion(tomlContent, regex) {
|
||||
const match = tomlContent.match(regex);
|
||||
return match && match[1] ? match[1] : null;
|
||||
}
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const buildGradleKtsPath = 'android/build.gradle.kts';
|
||||
const libsVersionsTomlPath = '../react-native/gradle/libs.versions.toml';
|
||||
|
||||
console.log(`Updating ${buildGradleKtsPath} with versions from ${libsVersionsTomlPath}...`);
|
||||
|
||||
let gradleContent = fs.readFileSync(buildGradleKtsPath, 'utf8');
|
||||
const tomlContent = fs.readFileSync(libsVersionsTomlPath, 'utf8');
|
||||
|
||||
const compileSdk = extractVersion(tomlContent, /compileSdk\s*=\s*"(\d+)"/);
|
||||
const minSdk = extractVersion(tomlContent, /minSdk\s*=\s*"(\d+)"/);
|
||||
const buildTools = extractVersion(tomlContent, /buildTools\s*=\s*"([\d.]+)"/);
|
||||
|
||||
gradleContent = gradleContent
|
||||
.replace('libs.versions.compileSdk.get().toInt()', compileSdk)
|
||||
.replace('libs.versions.minSdk.get().toInt()', minSdk)
|
||||
.replace('libs.versions.buildTools.get()', `"${buildTools}"`)
|
||||
.replace('project(":packages:react-native:ReactAndroid")', '"com.facebook.react:react-android"');
|
||||
|
||||
fs.writeFileSync(buildGradleKtsPath, gradleContent);
|
||||
|
||||
console.log('Done!');
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/oss-library-example",
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"private": true,
|
||||
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
|
||||
"license": "MIT",
|
||||
@@ -26,8 +26,8 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.76.4",
|
||||
"react-native": "0.76.4"
|
||||
"@react-native/babel-preset": "0.76.9",
|
||||
"react-native": "0.76.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/test-renderer",
|
||||
"private": true,
|
||||
"version": "0.76.4",
|
||||
"version": "0.76.9",
|
||||
"description": "A Test rendering library for React Native",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -81,11 +81,6 @@
|
||||
[_window makeKeyAndVisible];
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
// Noop
|
||||
}
|
||||
|
||||
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
[NSException raise:@"RCTBridgeDelegate::sourceURLForBridge not implemented"
|
||||
|
||||
@@ -53,7 +53,9 @@ RCTAppSetupDefaultRootView(RCTBridge *bridge, NSString *moduleName, NSDictionary
|
||||
id<RCTSurfaceProtocol> surface = [[RCTFabricSurface alloc] initWithBridge:bridge
|
||||
moduleName:moduleName
|
||||
initialProperties:initialProperties];
|
||||
return [[RCTSurfaceHostingProxyRootView alloc] initWithSurface:surface];
|
||||
UIView *rootView = [[RCTSurfaceHostingProxyRootView alloc] initWithSurface:surface];
|
||||
[surface start];
|
||||
return rootView;
|
||||
}
|
||||
return [[RCTRootView alloc] initWithBridge:bridge moduleName:moduleName initialProperties:initialProperties];
|
||||
}
|
||||
|
||||
@@ -159,9 +159,8 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
|
||||
RCTFabricSurface *surface = [self.reactHost createSurfaceWithModuleName:moduleName initialProperties:initProps];
|
||||
|
||||
RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView = [[RCTSurfaceHostingProxyRootView alloc]
|
||||
initWithSurface:surface
|
||||
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
|
||||
RCTSurfaceHostingProxyRootView *surfaceHostingProxyRootView =
|
||||
[[RCTSurfaceHostingProxyRootView alloc] initWithSurface:surface];
|
||||
|
||||
surfaceHostingProxyRootView.backgroundColor = [UIColor systemBackgroundColor];
|
||||
if (self->_configuration.customizeRootView != nil) {
|
||||
|
||||
@@ -32,6 +32,7 @@ header_search_paths = [
|
||||
"$(PODS_ROOT)/Headers/Private/React-Core",
|
||||
"$(PODS_ROOT)/boost",
|
||||
"$(PODS_ROOT)/DoubleConversion",
|
||||
"$(PODS_ROOT)/fast_float/include",
|
||||
"$(PODS_ROOT)/fmt/include",
|
||||
"$(PODS_ROOT)/RCT-Folly",
|
||||
"${PODS_ROOT}/Headers/Public/FlipperKit",
|
||||
|
||||
@@ -24,6 +24,7 @@ header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
"\"$(PODS_ROOT)/boost\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/fast_float/include\"",
|
||||
"\"$(PODS_ROOT)/fmt/include\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
|
||||
]
|
||||
@@ -48,7 +49,8 @@ Pod::Spec.new do |s|
|
||||
}
|
||||
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "fmt", "9.1.0"
|
||||
s.dependency "fast_float"
|
||||
s.dependency "fmt"
|
||||
s.dependency "RCT-Folly", folly_version
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-Core/RCTBlobHeaders"
|
||||
|
||||
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
|
||||
}> = {
|
||||
major: 0,
|
||||
minor: 76,
|
||||
patch: 4,
|
||||
patch: 9,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
|
||||
@@ -477,7 +477,15 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, CGSize size, CGFloat scal
|
||||
|
||||
// Add missing png extension
|
||||
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
|
||||
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
|
||||
// Check if there exists a file with that url on disk already
|
||||
// This should fix issue https://github.com/facebook/react-native/issues/46870
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:request.URL.path]) {
|
||||
mutableRequest.URL = request.URL;
|
||||
} else {
|
||||
// This is the default behavior in case there is no file on disk with no extension.
|
||||
// We assume that the extension is `png`.
|
||||
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
|
||||
}
|
||||
}
|
||||
if (_redirectDelegate != nil) {
|
||||
mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL];
|
||||
|
||||
+11
-3
@@ -28,6 +28,15 @@ type FormDataPart =
|
||||
...
|
||||
};
|
||||
|
||||
/**
|
||||
* Encode a FormData filename compliant with RFC 2183
|
||||
*
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#directives
|
||||
*/
|
||||
function encodeFilename(filename: string): string {
|
||||
return encodeURIComponent(filename.replace(/\//g, '_'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill for XMLHttpRequest2 FormData API, allowing multipart POST requests
|
||||
* with mixed data (string, native files) to be submitted via XMLHttpRequest.
|
||||
@@ -82,9 +91,8 @@ class FormData {
|
||||
// content type (cf. web Blob interface.)
|
||||
if (typeof value === 'object' && !Array.isArray(value) && value) {
|
||||
if (typeof value.name === 'string') {
|
||||
headers['content-disposition'] += `; filename="${
|
||||
value.name
|
||||
}"; filename*=utf-8''${encodeURI(value.name)}`;
|
||||
headers['content-disposition'] +=
|
||||
`; filename="${encodeFilename(value.name)}"`;
|
||||
}
|
||||
if (typeof value.type === 'string') {
|
||||
headers['content-type'] = value.type;
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#import <React/RCTDataRequestHandler.h>
|
||||
#import <ReactCommon/RCTTurboModule.h>
|
||||
|
||||
#import <mutex>
|
||||
|
||||
#import "RCTNetworkPlugins.h"
|
||||
|
||||
@interface RCTDataRequestHandler () <RCTTurboModule>
|
||||
@@ -15,14 +17,22 @@
|
||||
|
||||
@implementation RCTDataRequestHandler {
|
||||
NSOperationQueue *_queue;
|
||||
std::mutex _operationHandlerMutexLock;
|
||||
}
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
[_queue cancelAllOperations];
|
||||
_queue = nil;
|
||||
std::lock_guard<std::mutex> lock(_operationHandlerMutexLock);
|
||||
if (_queue) {
|
||||
for (NSOperation *operation in _queue.operations) {
|
||||
if (!operation.isCancelled && !operation.isFinished) {
|
||||
[operation cancel];
|
||||
}
|
||||
}
|
||||
_queue = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)canHandleRequest:(NSURLRequest *)request
|
||||
@@ -32,6 +42,7 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (NSOperation *)sendRequest:(NSURLRequest *)request withDelegate:(id<RCTURLRequestDelegate>)delegate
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_operationHandlerMutexLock);
|
||||
// Lazy setup
|
||||
if (!_queue) {
|
||||
_queue = [NSOperationQueue new];
|
||||
@@ -69,7 +80,10 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)cancelRequest:(NSOperation *)op
|
||||
{
|
||||
[op cancel];
|
||||
std::lock_guard<std::mutex> lock(_operationHandlerMutexLock);
|
||||
if (!op.isCancelled && !op.isFinished) {
|
||||
[op cancel];
|
||||
}
|
||||
}
|
||||
|
||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#import <React/RCTFileRequestHandler.h>
|
||||
|
||||
#import <mutex>
|
||||
|
||||
#import <MobileCoreServices/MobileCoreServices.h>
|
||||
|
||||
#import <React/RCTUtils.h>
|
||||
@@ -19,14 +21,22 @@
|
||||
|
||||
@implementation RCTFileRequestHandler {
|
||||
NSOperationQueue *_fileQueue;
|
||||
std::mutex _operationHandlerMutexLock;
|
||||
}
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
[_fileQueue cancelAllOperations];
|
||||
_fileQueue = nil;
|
||||
std::lock_guard<std::mutex> lock(_operationHandlerMutexLock);
|
||||
if (_fileQueue) {
|
||||
for (NSOperation *operation in _fileQueue.operations) {
|
||||
if (!operation.isCancelled && !operation.isFinished) {
|
||||
[operation cancel];
|
||||
}
|
||||
}
|
||||
_fileQueue = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)canHandleRequest:(NSURLRequest *)request
|
||||
@@ -36,6 +46,7 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (NSOperation *)sendRequest:(NSURLRequest *)request withDelegate:(id<RCTURLRequestDelegate>)delegate
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_operationHandlerMutexLock);
|
||||
// Lazy setup
|
||||
if (!_fileQueue) {
|
||||
_fileQueue = [NSOperationQueue new];
|
||||
@@ -83,7 +94,10 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)cancelRequest:(NSOperation *)op
|
||||
{
|
||||
[op cancel];
|
||||
std::lock_guard<std::mutex> lock(_operationHandlerMutexLock);
|
||||
if (!op.isCancelled && !op.isFinished) {
|
||||
[op cancel];
|
||||
}
|
||||
}
|
||||
|
||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||
|
||||
@@ -48,8 +48,7 @@ describe('FormData', function () {
|
||||
type: 'image/jpeg',
|
||||
name: 'photo.jpg',
|
||||
headers: {
|
||||
'content-disposition':
|
||||
'form-data; name="photo"; filename="photo.jpg"; filename*=utf-8\'\'photo.jpg',
|
||||
'content-disposition': 'form-data; name="photo"; filename="photo.jpg"',
|
||||
'content-type': 'image/jpeg',
|
||||
},
|
||||
fieldName: 'photo',
|
||||
@@ -70,7 +69,7 @@ describe('FormData', function () {
|
||||
name: '测试photo.jpg',
|
||||
headers: {
|
||||
'content-disposition':
|
||||
'form-data; name="photo"; filename="测试photo.jpg"; filename*=utf-8\'\'%E6%B5%8B%E8%AF%95photo.jpg',
|
||||
'form-data; name="photo"; filename="%E6%B5%8B%E8%AF%95photo.jpg"',
|
||||
'content-type': 'image/jpeg',
|
||||
},
|
||||
fieldName: 'photo',
|
||||
|
||||
@@ -36,6 +36,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
{
|
||||
if (![self isDescendantOfView:scrollView]) {
|
||||
// View is outside scroll view
|
||||
scrollView.firstResponderViewOutsideScrollView = self.backedTextInputView;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -456,7 +457,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
||||
_maxLength.integerValue - (NSInteger)backedTextInputView.attributedText.string.length + (NSInteger)range.length,
|
||||
0);
|
||||
|
||||
if (text.length > _maxLength.integerValue) {
|
||||
if (text.length > allowedLength) {
|
||||
// If we typed/pasted more than one character, limit the text inputted.
|
||||
if (text.length > 1) {
|
||||
if (allowedLength > 0) {
|
||||
|
||||
+3
-1
@@ -105,7 +105,9 @@ export function setColorScheme(colorScheme: ?ColorSchemeName): void {
|
||||
const {NativeAppearance} = state;
|
||||
if (NativeAppearance != null) {
|
||||
NativeAppearance.setColorScheme(colorScheme ?? 'unspecified');
|
||||
state.appearance = {colorScheme};
|
||||
state.appearance = {
|
||||
colorScheme: toColorScheme(NativeAppearance.getColorScheme()),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
socket_rocket_config = get_socket_rocket_config()
|
||||
socket_rocket_version = socket_rocket_config[:version]
|
||||
socket_rocket_version = socket_rocket_config[:version]
|
||||
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
@@ -49,6 +49,7 @@ header_search_paths = [
|
||||
"$(PODS_TARGET_SRCROOT)/ReactCommon",
|
||||
"$(PODS_ROOT)/boost",
|
||||
"$(PODS_ROOT)/DoubleConversion",
|
||||
"$(PODS_ROOT)/fast_float/include",
|
||||
"$(PODS_ROOT)/fmt/include",
|
||||
"$(PODS_ROOT)/RCT-Folly",
|
||||
"${PODS_ROOT}/Headers/Public/FlipperKit",
|
||||
|
||||
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(76),
|
||||
RCTVersionPatch: @(4),
|
||||
RCTVersionPatch: @(9),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
});
|
||||
|
||||
+2
-5
@@ -53,11 +53,8 @@ static RCTRootViewSizeFlexibility convertToRootViewSizeFlexibility(RCTSurfaceSiz
|
||||
|
||||
- (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
|
||||
{
|
||||
if (self = [super initWithSurface:surface
|
||||
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact]) {
|
||||
[surface start];
|
||||
}
|
||||
return self;
|
||||
return [super initWithSurface:surface
|
||||
sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
|
||||
}
|
||||
|
||||
RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
||||
|
||||
@@ -20,14 +20,12 @@ folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
socket_rocket_config = get_socket_rocket_config()
|
||||
socket_rocket_version = socket_rocket_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/boost\"",
|
||||
"\"$(PODS_TARGET_SRCROOT)/React/CoreModules\"",
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/fast_float/include\"",
|
||||
"\"$(PODS_ROOT)/fmt/include\"",
|
||||
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
|
||||
]
|
||||
@@ -51,14 +49,15 @@ Pod::Spec.new do |s|
|
||||
}
|
||||
s.framework = "UIKit"
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "fmt", "9.1.0"
|
||||
s.dependency "RCT-Folly", folly_version
|
||||
s.dependency "RCTTypeSafety", version
|
||||
s.dependency "React-Core/CoreModulesHeaders", version
|
||||
s.dependency "React-RCTImage", version
|
||||
s.dependency "React-jsi", version
|
||||
s.dependency "fast_float"
|
||||
s.dependency "fmt"
|
||||
s.dependency "RCT-Folly"
|
||||
s.dependency "RCTTypeSafety"
|
||||
s.dependency "React-Core/CoreModulesHeaders"
|
||||
s.dependency "React-RCTImage"
|
||||
s.dependency "React-jsi"
|
||||
s.dependency 'React-RCTBlob'
|
||||
s.dependency "SocketRocket", socket_rocket_version
|
||||
s.dependency "SocketRocket"
|
||||
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
||||
|
||||
add_dependency(s, "ReactCodegen")
|
||||
|
||||
@@ -98,14 +98,22 @@ using namespace facebook::react;
|
||||
NSNumber *id2 = arguments[arguments.count - 1];
|
||||
|
||||
second = ^(std::vector<folly::dynamic> args) {
|
||||
[bridge enqueueCallback:id2 args:convertFollyDynamicToId(folly::dynamic(args.begin(), args.end()))];
|
||||
folly::dynamic obj = folly::dynamic::array;
|
||||
for (auto &arg : args) {
|
||||
obj.push_back(std::move(arg));
|
||||
}
|
||||
[bridge enqueueCallback:id2 args:convertFollyDynamicToId(std::move(obj))];
|
||||
};
|
||||
} else {
|
||||
id1 = arguments[arguments.count - 1];
|
||||
}
|
||||
|
||||
first = ^(std::vector<folly::dynamic> args) {
|
||||
[bridge enqueueCallback:id1 args:convertFollyDynamicToId(folly::dynamic(args.begin(), args.end()))];
|
||||
folly::dynamic obj = folly::dynamic::array;
|
||||
for (auto &arg : args) {
|
||||
obj.push_back(std::move(arg));
|
||||
}
|
||||
[bridge enqueueCallback:id1 args:convertFollyDynamicToId(std::move(obj))];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -38,6 +38,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/** Focus area of newly-activated text input relative to the window to compare against UIKeyboardFrameBegin/End */
|
||||
@property (nonatomic, assign) CGRect firstResponderFocus;
|
||||
|
||||
/** newly-activated text input outside of the scroll view */
|
||||
@property (nonatomic, weak) UIView *firstResponderViewOutsideScrollView;
|
||||
|
||||
/*
|
||||
* Returns the subview of the scroll view that the component uses to mount all subcomponents into. That's useful to
|
||||
* separate component views from auxiliary views to be able to reliably implement pull-to-refresh- and RTL-related
|
||||
|
||||
+17
-18
@@ -182,16 +182,18 @@ RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrollView, NSInt
|
||||
UIViewAnimationCurve curve =
|
||||
(UIViewAnimationCurve)[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue];
|
||||
CGRect keyboardEndFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
CGRect keyboardBeginFrame = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue];
|
||||
|
||||
CGPoint absoluteViewOrigin = [self convertPoint:self.bounds.origin toView:nil];
|
||||
CGFloat scrollViewLowerY = isInverted ? absoluteViewOrigin.y : absoluteViewOrigin.y + self.bounds.size.height;
|
||||
|
||||
UIEdgeInsets newEdgeInsets = _scrollView.contentInset;
|
||||
CGFloat inset = MAX(scrollViewLowerY - keyboardEndFrame.origin.y, 0);
|
||||
const auto &props = static_cast<const ScrollViewProps &>(*_props);
|
||||
if (isInverted) {
|
||||
newEdgeInsets.top = MAX(inset, _scrollView.contentInset.top);
|
||||
newEdgeInsets.top = MAX(inset, props.contentInset.top);
|
||||
} else {
|
||||
newEdgeInsets.bottom = MAX(inset, _scrollView.contentInset.bottom);
|
||||
newEdgeInsets.bottom = MAX(inset, props.contentInset.bottom);
|
||||
}
|
||||
|
||||
CGPoint newContentOffset = _scrollView.contentOffset;
|
||||
@@ -203,21 +205,18 @@ RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrollView, NSInt
|
||||
from:self
|
||||
forEvent:nil]) {
|
||||
if (CGRectEqualToRect(_firstResponderFocus, CGRectNull)) {
|
||||
// Text input view is outside of the scroll view.
|
||||
return;
|
||||
}
|
||||
|
||||
CGRect viewIntersection = CGRectIntersection(self.firstResponderFocus, keyboardEndFrame);
|
||||
|
||||
if (CGRectIsNull(viewIntersection)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Inner text field focused
|
||||
CGFloat focusEnd = CGRectGetMaxY(self.firstResponderFocus);
|
||||
if (focusEnd > keyboardEndFrame.origin.y) {
|
||||
// Text field active region is below visible area with keyboard - update diff to bring into view
|
||||
contentDiff = keyboardEndFrame.origin.y - focusEnd;
|
||||
UIView *inputAccessoryView = _firstResponderViewOutsideScrollView.inputAccessoryView;
|
||||
if (inputAccessoryView) {
|
||||
// Text input view is within the inputAccessoryView.
|
||||
contentDiff = keyboardEndFrame.origin.y - keyboardBeginFrame.origin.y;
|
||||
}
|
||||
} else {
|
||||
// Inner text field focused
|
||||
CGFloat focusEnd = CGRectGetMaxY(self.firstResponderFocus);
|
||||
if (focusEnd > keyboardEndFrame.origin.y) {
|
||||
// Text field active region is below visible area with keyboard - update diff to bring into view
|
||||
contentDiff = keyboardEndFrame.origin.y - focusEnd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +242,7 @@ RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrollView, NSInt
|
||||
animations:^{
|
||||
self->_scrollView.contentInset = newEdgeInsets;
|
||||
self->_scrollView.verticalScrollIndicatorInsets = newEdgeInsets;
|
||||
[self scrollToOffset:newContentOffset animated:NO];
|
||||
[self scrollTo:newContentOffset.x y:newContentOffset.y animated:NO];
|
||||
}
|
||||
completion:nil];
|
||||
}
|
||||
|
||||
+2
-3
@@ -99,9 +99,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
|
||||
[_backedTextInputView.defaultTextAttributes mutableCopy];
|
||||
|
||||
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
|
||||
eventEmitterWrapper.eventEmitter = _eventEmitter;
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] = eventEmitterWrapper;
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] = RCTWrapEventEmitter(_eventEmitter);
|
||||
|
||||
_backedTextInputView.defaultTextAttributes = defaultAttributes;
|
||||
}
|
||||
@@ -126,6 +124,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
{
|
||||
if (![self isDescendantOfView:scrollView.scrollView] || !_backedTextInputView.isFirstResponder) {
|
||||
// View is outside scroll view or it's not a first responder.
|
||||
scrollView.firstResponderViewOutsideScrollView = _backedTextInputView;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+12
-9
@@ -1003,15 +1003,10 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
||||
}
|
||||
|
||||
// clipping
|
||||
self.currentContainerView.layer.mask = nil;
|
||||
if (self.currentContainerView.clipsToBounds) {
|
||||
BOOL clipToPaddingBox = ReactNativeFeatureFlags::enableIOSViewClipToPaddingBox();
|
||||
if (clipToPaddingBox) {
|
||||
CALayer *maskLayer = [self createMaskLayer:RCTCGRectFromRect(_layoutMetrics.getPaddingFrame())
|
||||
cornerInsets:RCTGetCornerInsets(
|
||||
RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii),
|
||||
RCTUIEdgeInsetsFromEdgeInsets(borderMetrics.borderWidths))];
|
||||
self.currentContainerView.layer.mask = maskLayer;
|
||||
} else {
|
||||
if (!clipToPaddingBox) {
|
||||
if (borderMetrics.borderRadii.isUniform()) {
|
||||
self.currentContainerView.layer.cornerRadius = borderMetrics.borderRadii.topLeft.horizontal;
|
||||
} else {
|
||||
@@ -1033,9 +1028,17 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
||||
subview.layer.mask = [self createMaskLayer:subview.bounds cornerInsets:cornerInsets];
|
||||
}
|
||||
}
|
||||
} else if (
|
||||
!borderMetrics.borderWidths.isUniform() || borderMetrics.borderWidths.left != 0 ||
|
||||
!borderMetrics.borderRadii.isUniform()) {
|
||||
CALayer *maskLayer = [self createMaskLayer:RCTCGRectFromRect(_layoutMetrics.getPaddingFrame())
|
||||
cornerInsets:RCTGetCornerInsets(
|
||||
RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii),
|
||||
RCTUIEdgeInsetsFromEdgeInsets(borderMetrics.borderWidths))];
|
||||
self.currentContainerView.layer.mask = maskLayer;
|
||||
} else {
|
||||
self.currentContainerView.layer.cornerRadius = borderMetrics.borderRadii.topLeft.horizontal;
|
||||
}
|
||||
} else {
|
||||
self.currentContainerView.layer.mask = nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ using namespace facebook::react;
|
||||
|
||||
if (!_view) {
|
||||
_view = [[RCTSurfaceView alloc] initWithSurface:(RCTSurface *)self];
|
||||
[self _updateLayoutContext];
|
||||
_touchHandler = [RCTSurfaceTouchHandler new];
|
||||
[_touchHandler attachToView:_view];
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ header_search_paths = [
|
||||
"\"$(PODS_TARGET_SRCROOT)/ReactCommon\"",
|
||||
"\"$(PODS_ROOT)/boost\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/fast_float/include\"",
|
||||
"\"$(PODS_ROOT)/fmt/include\"",
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
@property (nonatomic, assign) BOOL inverted;
|
||||
/** Focus area of newly-activated text input relative to the window to compare against UIKeyboardFrameBegin/End */
|
||||
@property (nonatomic, assign) CGRect firstResponderFocus;
|
||||
/** newly-activated text input outside of the scroll view */
|
||||
@property (nonatomic, weak) UIView *firstResponderViewOutsideScrollView;
|
||||
|
||||
// NOTE: currently these event props are only declared so we can export the
|
||||
// event names to JS - we don't call the blocks directly because scroll events
|
||||
|
||||
@@ -338,6 +338,12 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
|
||||
if (!didFocusExternalTextField && focusEnd > endFrame.origin.y) {
|
||||
// Text field active region is below visible area with keyboard - update diff to bring into view
|
||||
contentDiff = endFrame.origin.y - focusEnd;
|
||||
} else {
|
||||
UIView *inputAccessoryView = _firstResponderViewOutsideScrollView.inputAccessoryView;
|
||||
if (inputAccessoryView) {
|
||||
// Text input view is within the inputAccessoryView.
|
||||
contentDiff = endFrame.origin.y - beginFrame.origin.y;
|
||||
}
|
||||
}
|
||||
} else if (endFrame.origin.y <= beginFrame.origin.y) {
|
||||
// Keyboard opened for other reason
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
// LICENSE file in the root directory of this source tree.
|
||||
//
|
||||
|
||||
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_83_0 $(SRCROOT)/../third-party/folly-2024.01.01.00 $(SRCROOT)/../third-party/glog-0.3.5/src
|
||||
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_83_0 $(SRCROOT)/../third-party/folly-2024.10.14.00 $(SRCROOT)/../third-party/glog-0.3.5/src
|
||||
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1
|
||||
|
||||
@@ -2248,7 +2248,7 @@ public abstract interface class com/facebook/react/devsupport/HMRClient : com/fa
|
||||
public abstract fun disable ()V
|
||||
public abstract fun enable ()V
|
||||
public abstract fun registerBundle (Ljava/lang/String;)V
|
||||
public abstract fun setup (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZ)V
|
||||
public abstract fun setup (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZLjava/lang/String;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/devsupport/InspectorFlags {
|
||||
@@ -7859,6 +7859,7 @@ public class com/facebook/react/views/text/TextAttributeProps {
|
||||
public static final field TA_KEY_LETTER_SPACING S
|
||||
public static final field TA_KEY_LINE_BREAK_STRATEGY S
|
||||
public static final field TA_KEY_LINE_HEIGHT S
|
||||
public static final field TA_KEY_MAX_FONT_SIZE_MULTIPLIER S
|
||||
public static final field TA_KEY_OPACITY S
|
||||
public static final field TA_KEY_ROLE S
|
||||
public static final field TA_KEY_TEXT_DECORATION_COLOR S
|
||||
@@ -7891,6 +7892,7 @@ public class com/facebook/react/views/text/TextAttributeProps {
|
||||
protected field mLetterSpacingInput F
|
||||
protected field mLineHeight F
|
||||
protected field mLineHeightInput F
|
||||
protected field mMaxFontSizeMultiplier F
|
||||
protected field mNumberOfLines I
|
||||
protected field mOpacity F
|
||||
protected field mRole Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
|
||||
|
||||
@@ -66,6 +66,7 @@ val prefabHeadersDir = project.file("$buildDir/prefab-headers")
|
||||
// Native versions which are defined inside the version catalog (libs.versions.toml)
|
||||
val BOOST_VERSION = libs.versions.boost.get()
|
||||
val DOUBLE_CONVERSION_VERSION = libs.versions.doubleconversion.get()
|
||||
val FAST_FLOAT_VERSION = libs.versions.fastFloat.get()
|
||||
val FMT_VERSION = libs.versions.fmt.get()
|
||||
val FOLLY_VERSION = libs.versions.folly.get()
|
||||
val GLOG_VERSION = libs.versions.glog.get()
|
||||
@@ -179,6 +180,7 @@ val preparePrefab by
|
||||
// react_nativemodule_core
|
||||
Pair(File(buildDir, "third-party-ndk/boost/boost_1_83_0/").absolutePath, ""),
|
||||
Pair(File(buildDir, "third-party-ndk/double-conversion/").absolutePath, ""),
|
||||
Pair(File(buildDir, "third-party-ndk/fast_float/include/").absolutePath, ""),
|
||||
Pair(File(buildDir, "third-party-ndk/fmt/include/").absolutePath, ""),
|
||||
Pair(File(buildDir, "third-party-ndk/folly/").absolutePath, ""),
|
||||
Pair(File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""),
|
||||
@@ -304,6 +306,27 @@ val prepareFolly by
|
||||
includeEmptyDirs = false
|
||||
into("$thirdPartyNdkDir/folly")
|
||||
}
|
||||
val downloadFastFloat by
|
||||
tasks.creating(Download::class) {
|
||||
dependsOn(createNativeDepsDirectories)
|
||||
src("https://github.com/fastfloat/fast_float/archive/v${FAST_FLOAT_VERSION}.tar.gz")
|
||||
onlyIfModified(true)
|
||||
overwrite(false)
|
||||
retries(5)
|
||||
quiet(true)
|
||||
dest(File(downloadsDir, "fast_float-${FAST_FLOAT_VERSION}.tar.gz"))
|
||||
}
|
||||
|
||||
val prepareFastFloat by
|
||||
tasks.registering(Copy::class) {
|
||||
dependsOn(if (dependenciesPath != null) emptyList() else listOf(downloadFastFloat))
|
||||
from(dependenciesPath ?: tarTree(downloadFastFloat.dest))
|
||||
from("src/main/jni/third-party/fast_float/")
|
||||
include("fast_float-${FAST_FLOAT_VERSION}/include/**/*", "CMakeLists.txt")
|
||||
eachFile { this.path = this.path.removePrefix("fast_float-${FAST_FLOAT_VERSION}/") }
|
||||
includeEmptyDirs = false
|
||||
into("$thirdPartyNdkDir/fast_float")
|
||||
}
|
||||
|
||||
val downloadFmt by
|
||||
tasks.creating(Download::class) {
|
||||
@@ -541,6 +564,7 @@ android {
|
||||
"generateCodegenArtifactsFromSchema",
|
||||
prepareBoost,
|
||||
prepareDoubleConversion,
|
||||
prepareFastFloat,
|
||||
prepareFmt,
|
||||
prepareFolly,
|
||||
prepareGlog,
|
||||
|
||||
@@ -34,9 +34,24 @@ set(BUILD_DIR ${PROJECT_BUILD_DIR})
|
||||
file(TO_CMAKE_PATH "${BUILD_DIR}" BUILD_DIR)
|
||||
file(TO_CMAKE_PATH "${REACT_ANDROID_DIR}" REACT_ANDROID_DIR)
|
||||
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
${REACT_ANDROID_DIR}/cmake-utils/default-app-setup/*.cpp
|
||||
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
|
||||
if (PROJECT_ROOT_DIR)
|
||||
# This empty `if` is just to silence a CMake warning and make sure the `PROJECT_ROOT_DIR`
|
||||
# variable is defined if user need to access it.
|
||||
endif ()
|
||||
|
||||
file(GLOB override_cpp_SRC CONFIGURE_DEPENDS *.cpp)
|
||||
# We check if the user is providing a custom OnLoad.cpp file. If so, we pick that
|
||||
# for compilation. Otherwise we fallback to using the `default-app-setup/OnLoad.cpp`
|
||||
# file instead.
|
||||
if(override_cpp_SRC)
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
*.cpp
|
||||
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
|
||||
else()
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
${REACT_ANDROID_DIR}/cmake-utils/default-app-setup/*.cpp
|
||||
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
|
||||
endif()
|
||||
|
||||
add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})
|
||||
|
||||
|
||||
@@ -29,12 +29,7 @@
|
||||
|
||||
#include <DefaultComponentsRegistry.h>
|
||||
#include <DefaultTurboModuleManagerDelegate.h>
|
||||
#if __has_include("<autolinking.h>")
|
||||
#define AUTOLINKING_AVAILABLE 1
|
||||
#include <autolinking.h>
|
||||
#else
|
||||
#define AUTOLINKING_AVAILABLE 0
|
||||
#endif
|
||||
#include <fbjni/fbjni.h>
|
||||
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||
#include <rncore.h>
|
||||
@@ -61,10 +56,8 @@ void registerComponents(
|
||||
REACT_NATIVE_APP_COMPONENT_REGISTRATION(registry);
|
||||
#endif
|
||||
|
||||
#if AUTOLINKING_AVAILABLE
|
||||
// And we fallback to the components autolinked
|
||||
autolinking_registerProviders(registry);
|
||||
#endif
|
||||
}
|
||||
|
||||
std::shared_ptr<TurboModule> cxxModuleProvider(
|
||||
@@ -78,12 +71,8 @@ std::shared_ptr<TurboModule> cxxModuleProvider(
|
||||
// return std::make_shared<NativeCxxModuleExample>(jsInvoker);
|
||||
// }
|
||||
|
||||
#if AUTOLINKING_AVAILABLE
|
||||
// And we fallback to the CXX module providers autolinked
|
||||
return autolinking_cxxModuleProvider(name, jsInvoker);
|
||||
#endif
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<TurboModule> javaModuleProvider(
|
||||
@@ -112,12 +101,10 @@ std::shared_ptr<TurboModule> javaModuleProvider(
|
||||
return module;
|
||||
}
|
||||
|
||||
#if AUTOLINKING_AVAILABLE
|
||||
// And we fallback to the module providers autolinked
|
||||
if (auto module = autolinking_ModuleProvider(name, params)) {
|
||||
return module;
|
||||
}
|
||||
#endif
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=0.76.4
|
||||
VERSION_NAME=0.76.9
|
||||
react.internal.publishingGroup=com.facebook.react
|
||||
|
||||
android.useAndroidX=true
|
||||
|
||||
+12
-13
@@ -179,9 +179,18 @@ public abstract class HeadlessJsTaskService extends Service implements HeadlessJ
|
||||
}
|
||||
|
||||
private void createReactContextAndScheduleTask(final HeadlessJsTaskConfig taskConfig) {
|
||||
final ReactHost reactHost = getReactHost();
|
||||
|
||||
if (reactHost == null) { // old arch
|
||||
if (ReactFeatureFlags.enableBridgelessArchitecture) {
|
||||
final ReactHost reactHost = getReactHost();
|
||||
reactHost.addReactInstanceEventListener(
|
||||
new ReactInstanceEventListener() {
|
||||
@Override
|
||||
public void onReactContextInitialized(@NonNull ReactContext reactContext) {
|
||||
invokeStartTask(reactContext, taskConfig);
|
||||
reactHost.removeReactInstanceEventListener(this);
|
||||
}
|
||||
});
|
||||
reactHost.start();
|
||||
} else {
|
||||
final ReactInstanceManager reactInstanceManager =
|
||||
getReactNativeHost().getReactInstanceManager();
|
||||
|
||||
@@ -194,16 +203,6 @@ public abstract class HeadlessJsTaskService extends Service implements HeadlessJ
|
||||
}
|
||||
});
|
||||
reactInstanceManager.createReactContextInBackground();
|
||||
} else { // new arch
|
||||
reactHost.addReactInstanceEventListener(
|
||||
new ReactInstanceEventListener() {
|
||||
@Override
|
||||
public void onReactContextInitialized(@NonNull ReactContext reactContext) {
|
||||
invokeStartTask(reactContext, taskConfig);
|
||||
reactHost.removeReactInstanceEventListener(this);
|
||||
}
|
||||
});
|
||||
reactHost.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -696,10 +696,12 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
URL sourceUrl = new URL(getSourceUrl());
|
||||
String path = sourceUrl.getPath().substring(1); // strip initial slash in path
|
||||
String host = sourceUrl.getHost();
|
||||
String scheme = sourceUrl.getProtocol();
|
||||
int port = sourceUrl.getPort() != -1 ? sourceUrl.getPort() : sourceUrl.getDefaultPort();
|
||||
mCurrentContext
|
||||
.getJSModule(HMRClient.class)
|
||||
.setup("android", path, host, port, mDevSettings.isHotModuleReplacementEnabled());
|
||||
.setup(
|
||||
"android", path, host, port, mDevSettings.isHotModuleReplacementEnabled(), scheme);
|
||||
} catch (MalformedURLException e) {
|
||||
showNewJavaError(e.getMessage(), e);
|
||||
}
|
||||
|
||||
+4
-1
@@ -26,8 +26,11 @@ public interface HMRClient extends JavaScriptModule {
|
||||
* @param host The host that the HMRClient should communicate with.
|
||||
* @param port The port that the HMRClient should communicate with on the host.
|
||||
* @param isEnabled Whether HMR is enabled initially.
|
||||
* @param scheme The protocol that the HMRClient should communicate with on the host (defaults to
|
||||
* http).
|
||||
*/
|
||||
void setup(String platform, String bundleEntry, String host, int port, boolean isEnabled);
|
||||
void setup(
|
||||
String platform, String bundleEntry, String host, int port, boolean isEnabled, String scheme);
|
||||
|
||||
/** Registers an additional JS bundle with HMRClient. */
|
||||
void registerBundle(String bundleUrl);
|
||||
|
||||
+13
-8
@@ -172,7 +172,7 @@ public class FabricUIManager
|
||||
private final CopyOnWriteArrayList<UIManagerListener> mListeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
private boolean mMountNotificationScheduled = false;
|
||||
private final List<Integer> mMountedSurfaceIds = new ArrayList<>();
|
||||
private List<Integer> mSurfaceIdsWithPendingMountNotification = new ArrayList<>();
|
||||
|
||||
@ThreadConfined(UI)
|
||||
@NonNull
|
||||
@@ -1257,12 +1257,15 @@ public class FabricUIManager
|
||||
|
||||
// Collect surface IDs for all the mount items
|
||||
for (MountItem mountItem : mountItems) {
|
||||
if (mountItem != null && !mMountedSurfaceIds.contains(mountItem.getSurfaceId())) {
|
||||
mMountedSurfaceIds.add(mountItem.getSurfaceId());
|
||||
if (mountItem != null
|
||||
&& !mSurfaceIdsWithPendingMountNotification.contains(mountItem.getSurfaceId())) {
|
||||
mSurfaceIdsWithPendingMountNotification.add(mountItem.getSurfaceId());
|
||||
}
|
||||
}
|
||||
|
||||
if (!mMountNotificationScheduled && !mMountedSurfaceIds.isEmpty()) {
|
||||
if (!mMountNotificationScheduled && !mSurfaceIdsWithPendingMountNotification.isEmpty()) {
|
||||
mMountNotificationScheduled = true;
|
||||
|
||||
// Notify mount when the effects are visible and prevent mount hooks to
|
||||
// delay paint.
|
||||
UiThreadUtil.getUiThreadHandler()
|
||||
@@ -1272,17 +1275,19 @@ public class FabricUIManager
|
||||
public void run() {
|
||||
mMountNotificationScheduled = false;
|
||||
|
||||
// Create a copy in case mount hooks trigger more mutations
|
||||
final List<Integer> surfaceIdsToReportMount =
|
||||
mSurfaceIdsWithPendingMountNotification;
|
||||
mSurfaceIdsWithPendingMountNotification = new ArrayList<>();
|
||||
|
||||
final @Nullable Binding binding = mBinding;
|
||||
if (binding == null || mDestroyed) {
|
||||
mMountedSurfaceIds.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
for (int surfaceId : mMountedSurfaceIds) {
|
||||
for (int surfaceId : surfaceIdsToReportMount) {
|
||||
binding.reportMount(surfaceId);
|
||||
}
|
||||
|
||||
mMountedSurfaceIds.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+15
-8
@@ -330,14 +330,11 @@ public class MountingManager {
|
||||
@AnyThread
|
||||
@ThreadConfined(ANY)
|
||||
public @Nullable EventEmitterWrapper getEventEmitter(int surfaceId, int reactTag) {
|
||||
SurfaceMountingManager surfaceMountingManager =
|
||||
(surfaceId == ViewUtil.NO_SURFACE_ID
|
||||
? getSurfaceManagerForView(reactTag)
|
||||
: getSurfaceManager(surfaceId));
|
||||
if (surfaceMountingManager == null) {
|
||||
SurfaceMountingManager smm = getSurfaceMountingManager(surfaceId, reactTag);
|
||||
if (smm == null) {
|
||||
return null;
|
||||
}
|
||||
return surfaceMountingManager.getEventEmitter(reactTag);
|
||||
return smm.getEventEmitter(reactTag);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -434,11 +431,21 @@ public class MountingManager {
|
||||
boolean canCoalesceEvent,
|
||||
@Nullable WritableMap params,
|
||||
@EventCategoryDef int eventCategory) {
|
||||
@Nullable SurfaceMountingManager smm = getSurfaceManager(surfaceId);
|
||||
SurfaceMountingManager smm = getSurfaceMountingManager(surfaceId, reactTag);
|
||||
if (smm == null) {
|
||||
// Cannot queue event without valid surface mountng manager. Do nothing here.
|
||||
FLog.d(
|
||||
TAG,
|
||||
"Cannot queue event without valid surface mounting manager for tag: %d, surfaceId: %d",
|
||||
reactTag,
|
||||
surfaceId);
|
||||
return;
|
||||
}
|
||||
smm.enqueuePendingEvent(reactTag, eventName, canCoalesceEvent, params, eventCategory);
|
||||
}
|
||||
|
||||
private @Nullable SurfaceMountingManager getSurfaceMountingManager(int surfaceId, int reactTag) {
|
||||
return (surfaceId == ViewUtil.NO_SURFACE_ID
|
||||
? getSurfaceManagerForView(reactTag)
|
||||
: getSurfaceManager(surfaceId));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-7
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<6cc52570dd571ddc792a0fd842c05dd9>>
|
||||
* @generated SignedSource<<89491eb63a7ca59b17419ed4432a4f88>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -34,12 +34,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun commonTestFlag(): Boolean = accessor.commonTestFlag()
|
||||
|
||||
/**
|
||||
* Adds support for recursively processing commits that mount synchronously (Android only).
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean = accessor.allowRecursiveCommitsWithSynchronousMountOnAndroid()
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
+1
-11
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<eca842a1b1c823b72136c625b3bfd16e>>
|
||||
* @generated SignedSource<<9f741ec3df7cd5ecd8d5c3c099c86aba>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -21,7 +21,6 @@ package com.facebook.react.internal.featureflags
|
||||
|
||||
public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccessor {
|
||||
private var commonTestFlagCache: Boolean? = null
|
||||
private var allowRecursiveCommitsWithSynchronousMountOnAndroidCache: Boolean? = null
|
||||
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
|
||||
private var completeReactInstanceCreationOnBgThreadOnAndroidCache: Boolean? = null
|
||||
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
|
||||
@@ -78,15 +77,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean {
|
||||
var cached = allowRecursiveCommitsWithSynchronousMountOnAndroidCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.allowRecursiveCommitsWithSynchronousMountOnAndroid()
|
||||
allowRecursiveCommitsWithSynchronousMountOnAndroidCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun batchRenderingUpdatesInEventLoop(): Boolean {
|
||||
var cached = batchRenderingUpdatesInEventLoopCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<ad54375c4ae3be2f377260887ae5aaf9>>
|
||||
* @generated SignedSource<<774337b6aee6f528b0852704271ed96f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -30,8 +30,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun commonTestFlag(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun batchRenderingUpdatesInEventLoop(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<2a0cd5a4875a54bb724e5765ffe7753e>>
|
||||
* @generated SignedSource<<43c4ba7a6c4f5a12ada181c081f91bfc>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,8 +25,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun commonTestFlag(): Boolean = false
|
||||
|
||||
override fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean = false
|
||||
|
||||
override fun batchRenderingUpdatesInEventLoop(): Boolean = false
|
||||
|
||||
override fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean = false
|
||||
|
||||
+1
-12
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<d02af2a8ef015c57d45aba8280539606>>
|
||||
* @generated SignedSource<<0ca6ebf7ef1418d721b6f183f89b96a2>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
private val accessedFeatureFlags = mutableSetOf<String>()
|
||||
|
||||
private var commonTestFlagCache: Boolean? = null
|
||||
private var allowRecursiveCommitsWithSynchronousMountOnAndroidCache: Boolean? = null
|
||||
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
|
||||
private var completeReactInstanceCreationOnBgThreadOnAndroidCache: Boolean? = null
|
||||
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
|
||||
@@ -83,16 +82,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean {
|
||||
var cached = allowRecursiveCommitsWithSynchronousMountOnAndroidCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.allowRecursiveCommitsWithSynchronousMountOnAndroid()
|
||||
accessedFeatureFlags.add("allowRecursiveCommitsWithSynchronousMountOnAndroid")
|
||||
allowRecursiveCommitsWithSynchronousMountOnAndroidCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun batchRenderingUpdatesInEventLoop(): Boolean {
|
||||
var cached = batchRenderingUpdatesInEventLoopCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<92b1214e3a526d7c67dcc7b0c2a131de>>
|
||||
* @generated SignedSource<<94e1e69be22ec978859e3f242610f21b>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,8 +25,6 @@ import com.facebook.proguard.annotations.DoNotStrip
|
||||
public interface ReactNativeFeatureFlagsProvider {
|
||||
@DoNotStrip public fun commonTestFlag(): Boolean
|
||||
|
||||
@DoNotStrip public fun allowRecursiveCommitsWithSynchronousMountOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun batchRenderingUpdatesInEventLoop(): Boolean
|
||||
|
||||
@DoNotStrip public fun completeReactInstanceCreationOnBgThreadOnAndroid(): Boolean
|
||||
|
||||
+1
-1
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
|
||||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 0,
|
||||
"minor", 76,
|
||||
"patch", 4,
|
||||
"patch", 9,
|
||||
"prerelease", null);
|
||||
}
|
||||
|
||||
+16
-2
@@ -61,6 +61,7 @@ public class TextAttributeProps {
|
||||
public static final short TA_KEY_LINE_BREAK_STRATEGY = 25;
|
||||
public static final short TA_KEY_ROLE = 26;
|
||||
public static final short TA_KEY_TEXT_TRANSFORM = 27;
|
||||
public static final short TA_KEY_MAX_FONT_SIZE_MULTIPLIER = 29;
|
||||
|
||||
public static final int UNSET = -1;
|
||||
|
||||
@@ -81,6 +82,7 @@ public class TextAttributeProps {
|
||||
protected float mLineHeight = Float.NaN;
|
||||
protected boolean mIsColorSet = false;
|
||||
protected boolean mAllowFontScaling = true;
|
||||
protected float mMaxFontSizeMultiplier = Float.NaN;
|
||||
protected int mColor;
|
||||
protected boolean mIsBackgroundColorSet = false;
|
||||
protected int mBackgroundColor;
|
||||
@@ -227,6 +229,9 @@ public class TextAttributeProps {
|
||||
case TA_KEY_TEXT_TRANSFORM:
|
||||
result.setTextTransform(entry.getStringValue());
|
||||
break;
|
||||
case TA_KEY_MAX_FONT_SIZE_MULTIPLIER:
|
||||
result.setMaxFontSizeMultiplier((float) entry.getDoubleValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,6 +248,8 @@ public class TextAttributeProps {
|
||||
result.setLineHeight(getFloatProp(props, ViewProps.LINE_HEIGHT, ReactConstants.UNSET));
|
||||
result.setLetterSpacing(getFloatProp(props, ViewProps.LETTER_SPACING, Float.NaN));
|
||||
result.setAllowFontScaling(getBooleanProp(props, ViewProps.ALLOW_FONT_SCALING, true));
|
||||
result.setMaxFontSizeMultiplier(
|
||||
getFloatProp(props, ViewProps.MAX_FONT_SIZE_MULTIPLIER, Float.NaN));
|
||||
result.setFontSize(getFloatProp(props, ViewProps.FONT_SIZE, ReactConstants.UNSET));
|
||||
result.setColor(props.hasKey(ViewProps.COLOR) ? props.getInt(ViewProps.COLOR, 0) : null);
|
||||
result.setColor(
|
||||
@@ -411,7 +418,14 @@ public class TextAttributeProps {
|
||||
mAllowFontScaling = allowFontScaling;
|
||||
setFontSize(mFontSizeInput);
|
||||
setLineHeight(mLineHeightInput);
|
||||
setLetterSpacing(mLetterSpacingInput);
|
||||
}
|
||||
}
|
||||
|
||||
private void setMaxFontSizeMultiplier(float maxFontSizeMultiplier) {
|
||||
if (maxFontSizeMultiplier != mMaxFontSizeMultiplier) {
|
||||
mMaxFontSizeMultiplier = maxFontSizeMultiplier;
|
||||
setFontSize(mFontSizeInput);
|
||||
setLineHeight(mLineHeightInput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +434,7 @@ public class TextAttributeProps {
|
||||
if (fontSize != ReactConstants.UNSET) {
|
||||
fontSize =
|
||||
mAllowFontScaling
|
||||
? (float) Math.ceil(PixelUtil.toPixelFromSP(fontSize))
|
||||
? (float) Math.ceil(PixelUtil.toPixelFromSP(fontSize, mMaxFontSizeMultiplier))
|
||||
: (float) Math.ceil(PixelUtil.toPixelFromDIP(fontSize));
|
||||
}
|
||||
mFontSize = (int) fontSize;
|
||||
|
||||
+1
@@ -770,6 +770,7 @@ public class ReactViewGroup extends ViewGroup
|
||||
}
|
||||
}
|
||||
removeViewsInLayout(index - clippedSoFar, 1);
|
||||
invalidate();
|
||||
}
|
||||
removeFromArray(index);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ add_library(fbjni ALIAS fbjni::fbjni)
|
||||
add_react_third_party_ndk_subdir(glog)
|
||||
add_react_third_party_ndk_subdir(boost)
|
||||
add_react_third_party_ndk_subdir(double-conversion)
|
||||
add_react_third_party_ndk_subdir(fast_float)
|
||||
add_react_third_party_ndk_subdir(fmt)
|
||||
add_react_third_party_ndk_subdir(folly)
|
||||
add_react_third_party_ndk_subdir(jsc)
|
||||
|
||||
@@ -501,27 +501,25 @@ void Binding::schedulerShouldRenderTransactions(
|
||||
return;
|
||||
}
|
||||
|
||||
if (ReactNativeFeatureFlags::
|
||||
allowRecursiveCommitsWithSynchronousMountOnAndroid()) {
|
||||
std::vector<MountingTransaction> pendingTransactions;
|
||||
|
||||
{
|
||||
// Retain the lock to access the pending transactions but not to execute
|
||||
// the mount operations because that method can call into this method
|
||||
// again.
|
||||
std::unique_lock<std::mutex> lock(pendingTransactionsMutex_);
|
||||
pendingTransactions_.swap(pendingTransactions);
|
||||
}
|
||||
std::vector<MountingTransaction> pendingTransactions;
|
||||
|
||||
for (auto& transaction : pendingTransactions) {
|
||||
mountingManager->executeMount(transaction);
|
||||
}
|
||||
} else {
|
||||
{
|
||||
// Retain the lock to access the pending transactions but not to execute
|
||||
// the mount operations because that method can call into this method
|
||||
// again.
|
||||
//
|
||||
// This can be re-entrant when mounting manager triggers state updates
|
||||
// synchronously (this can happen when committing from the UI thread).
|
||||
// This is safe because we're already combining all the transactions for the
|
||||
// same surface ID in a single transaction in the pending transactions list,
|
||||
// so operations won't run out of order.
|
||||
std::unique_lock<std::mutex> lock(pendingTransactionsMutex_);
|
||||
for (auto& transaction : pendingTransactions_) {
|
||||
mountingManager->executeMount(transaction);
|
||||
}
|
||||
pendingTransactions_.clear();
|
||||
pendingTransactions_.swap(pendingTransactions);
|
||||
}
|
||||
|
||||
for (auto& transaction : pendingTransactions) {
|
||||
mountingManager->executeMount(transaction);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-15
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<c23b21fca18699470580e54b99de1126>>
|
||||
* @generated SignedSource<<68e5d4ce0ed3c237eeababaa04821101>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -45,12 +45,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool allowRecursiveCommitsWithSynchronousMountOnAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("allowRecursiveCommitsWithSynchronousMountOnAndroid");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool batchRenderingUpdatesInEventLoop() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("batchRenderingUpdatesInEventLoop");
|
||||
@@ -336,11 +330,6 @@ bool JReactNativeFeatureFlagsCxxInterop::commonTestFlag(
|
||||
return ReactNativeFeatureFlags::commonTestFlag();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::allowRecursiveCommitsWithSynchronousMountOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::allowRecursiveCommitsWithSynchronousMountOnAndroid();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
||||
@@ -591,9 +580,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"commonTestFlag",
|
||||
JReactNativeFeatureFlagsCxxInterop::commonTestFlag),
|
||||
makeNativeMethod(
|
||||
"allowRecursiveCommitsWithSynchronousMountOnAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::allowRecursiveCommitsWithSynchronousMountOnAndroid),
|
||||
makeNativeMethod(
|
||||
"batchRenderingUpdatesInEventLoop",
|
||||
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
|
||||
|
||||
+1
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<89d0da3b2bb56a4ee3c887e6c57491b2>>
|
||||
* @generated SignedSource<<bba5d2a290f39b6572db7f90b67e8469>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -33,9 +33,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool commonTestFlag(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool allowRecursiveCommitsWithSynchronousMountOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool batchRenderingUpdatesInEventLoop(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
add_compile_options(-std=c++20 -fexceptions)
|
||||
|
||||
add_library(fast_float INTERFACE)
|
||||
|
||||
target_include_directories(fast_float INTERFACE include)
|
||||
+5
-6
@@ -26,11 +26,8 @@ SET(folly_FLAGS
|
||||
SET(folly_runtime_SRC
|
||||
folly/Conv.cpp
|
||||
folly/Demangle.cpp
|
||||
folly/dynamic.cpp
|
||||
folly/FileUtil.cpp
|
||||
folly/Format.cpp
|
||||
folly/json_pointer.cpp
|
||||
folly/json.cpp
|
||||
folly/ScopeGuard.cpp
|
||||
folly/SharedMutex.cpp
|
||||
folly/String.cpp
|
||||
@@ -42,6 +39,9 @@ SET(folly_runtime_SRC
|
||||
folly/detail/SplitStringSimd.cpp
|
||||
folly/detail/UniqueInstance.cpp
|
||||
folly/hash/SpookyHashV2.cpp
|
||||
folly/json/dynamic.cpp
|
||||
folly/json/json_pointer.cpp
|
||||
folly/json/json.cpp
|
||||
folly/lang/CString.cpp
|
||||
folly/lang/SafeAssert.cpp
|
||||
folly/lang/ToAscii.cpp
|
||||
@@ -51,8 +51,7 @@ SET(folly_runtime_SRC
|
||||
folly/synchronization/SanitizeThread.cpp
|
||||
folly/synchronization/ParkingLot.cpp
|
||||
folly/system/AtFork.cpp
|
||||
folly/system/ThreadId.cpp
|
||||
folly/system/ThreadName.cpp)
|
||||
folly/system/ThreadId.cpp)
|
||||
|
||||
add_library(folly_runtime STATIC ${folly_runtime_SRC})
|
||||
|
||||
@@ -67,4 +66,4 @@ target_compile_options(folly_runtime
|
||||
target_compile_options(folly_runtime PUBLIC ${folly_FLAGS})
|
||||
|
||||
target_include_directories(folly_runtime PUBLIC .)
|
||||
target_link_libraries(folly_runtime glog double-conversion boost fmt)
|
||||
target_link_libraries(folly_runtime glog double-conversion boost fmt fast_float)
|
||||
|
||||
@@ -53,7 +53,8 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-logger"
|
||||
s.dependency "glog"
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "fmt", "9.1.0"
|
||||
s.dependency "fast_float"
|
||||
s.dependency "fmt"
|
||||
s.dependency "React-Core"
|
||||
s.dependency "React-debug"
|
||||
s.dependency "React-featureflags"
|
||||
|
||||
@@ -33,6 +33,7 @@ Pod::Spec.new do |s|
|
||||
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
||||
"\"$(PODS_TARGET_SRCROOT)\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/fast_float/include\"",
|
||||
"\"$(PODS_ROOT)/fmt/include\"",
|
||||
]
|
||||
|
||||
@@ -74,7 +75,8 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-logger"
|
||||
s.dependency "glog"
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "fmt", "9.1.0"
|
||||
s.dependency "fast_float"
|
||||
s.dependency "fmt"
|
||||
s.dependency "React-Core"
|
||||
s.dependency "React-debug"
|
||||
s.dependency "React-featureflags"
|
||||
|
||||
@@ -30,6 +30,7 @@ header_search_path = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
||||
"\"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"\"$(PODS_ROOT)/fast_float/include\"",
|
||||
"\"$(PODS_ROOT)/fmt/include\"",
|
||||
]
|
||||
|
||||
@@ -65,16 +66,17 @@ Pod::Spec.new do |s|
|
||||
s.module_name = 'React_FabricImage'
|
||||
end
|
||||
|
||||
s.dependency folly_dep_name, folly_version
|
||||
s.dependency folly_dep_name
|
||||
|
||||
s.dependency "React-jsiexecutor", version
|
||||
s.dependency "RCTRequired", version
|
||||
s.dependency "RCTTypeSafety", version
|
||||
s.dependency "React-jsiexecutor"
|
||||
s.dependency "RCTRequired"
|
||||
s.dependency "RCTTypeSafety"
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "React-logger"
|
||||
s.dependency "glog"
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "fmt", "9.1.0"
|
||||
s.dependency "fast_float"
|
||||
s.dependency "fmt"
|
||||
s.dependency "React-ImageManager"
|
||||
s.dependency "React-utils"
|
||||
s.dependency "Yoga"
|
||||
|
||||
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
|
||||
s.source = source
|
||||
s.header_dir = "ReactCommon" # Use global header_dir for all subspecs for use_frameworks! compatibility
|
||||
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
||||
"USE_HEADERMAP" => "YES",
|
||||
"DEFINES_MODULE" => "YES",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
@@ -46,14 +46,15 @@ Pod::Spec.new do |s|
|
||||
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
|
||||
# Note: Update this only when ready to minimize breaking changes.
|
||||
s.subspec "turbomodule" do |ss|
|
||||
ss.dependency "React-callinvoker", version
|
||||
ss.dependency "React-perflogger", version
|
||||
ss.dependency "React-cxxreact", version
|
||||
ss.dependency "React-jsi", version
|
||||
ss.dependency "RCT-Folly", folly_version
|
||||
ss.dependency "React-logger", version
|
||||
ss.dependency "React-callinvoker"
|
||||
ss.dependency "React-perflogger"
|
||||
ss.dependency "React-cxxreact"
|
||||
ss.dependency "React-jsi"
|
||||
ss.dependency "RCT-Folly"
|
||||
ss.dependency "React-logger"
|
||||
ss.dependency "DoubleConversion"
|
||||
ss.dependency "fmt", "9.1.0"
|
||||
ss.dependency "fast_float"
|
||||
ss.dependency "fmt"
|
||||
ss.dependency "glog"
|
||||
if using_hermes
|
||||
ss.dependency "hermes-engine"
|
||||
|
||||
@@ -47,9 +47,12 @@ namespace {
|
||||
CxxModule::Callback convertCallback(
|
||||
std::function<void(folly::dynamic)> callback) {
|
||||
return [callback = std::move(callback)](std::vector<folly::dynamic> args) {
|
||||
callback(folly::dynamic(
|
||||
std::make_move_iterator(args.begin()),
|
||||
std::make_move_iterator(args.end())));
|
||||
// after unpinning folly, can use folly::dynamic::array_range
|
||||
folly::dynamic obj = folly::dynamic::array;
|
||||
for (auto& arg : args) {
|
||||
obj.push_back(std::move(arg));
|
||||
}
|
||||
callback(std::move(obj));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user