mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
63
Commits
@@ -14,8 +14,12 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y git openssh-client cmake build-essential \
|
||||
sudo apt install -y git openssh-client build-essential \
|
||||
libreadline-dev libicu-dev jq zip python3
|
||||
|
||||
# Install cmake 3.28.3-1build7
|
||||
sudo apt-get install cmake=3.28.3-1build7
|
||||
sudo ln -sf /usr/bin/cmake /usr/local/bin/cmake
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Linux cache
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -22,10 +22,13 @@ jest.mock('../utils.js', () => ({
|
||||
log: silence,
|
||||
run: mockRun,
|
||||
sleep: mockSleep,
|
||||
verifyPublishedPackage: mockVerifyPublishedPackage,
|
||||
getNpmPackageInfo: mockGetNpmPackageInfo,
|
||||
}));
|
||||
|
||||
jest.mock('../verifyPublishedPackage.js', () => ({
|
||||
verifyPublishedPackage: mockVerifyPublishedPackage,
|
||||
}));
|
||||
|
||||
const getMockGithub = () => ({
|
||||
rest: {
|
||||
actions: {
|
||||
|
||||
@@ -13,6 +13,11 @@ const mockVerifyPublishedPackage = jest.fn();
|
||||
const silence = () => {};
|
||||
|
||||
jest.mock('../utils.js', () => ({
|
||||
log: silence,
|
||||
sleep: silence,
|
||||
}));
|
||||
|
||||
jest.mock('../verifyPublishedPackage.js', () => ({
|
||||
verifyPublishedPackage: mockVerifyPublishedPackage,
|
||||
}));
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
const {run, sleep, log, verifyPublishedPackage} = require('./utils.js');
|
||||
const {run, sleep, log} = require('./utils.js');
|
||||
const {verifyPublishedPackage} = require('./verifyPublishedPackage.js');
|
||||
|
||||
const TAG_AS_LATEST_REGEX = /#publish-packages-to-npm&latest/;
|
||||
|
||||
@@ -68,6 +69,9 @@ module.exports.verifyPublishedTemplate = async (
|
||||
retries = MAX_RETRIES,
|
||||
) => {
|
||||
try {
|
||||
if (version.startsWith('v')) {
|
||||
version = version.slice(1);
|
||||
}
|
||||
await verifyPublishedPackage(
|
||||
TEMPLATE_NPM_PKG,
|
||||
version,
|
||||
|
||||
@@ -9,13 +9,7 @@
|
||||
|
||||
const {execSync} = require('child_process');
|
||||
|
||||
function run(cmd) {
|
||||
return execSync(cmd, 'utf8').toString().trim();
|
||||
}
|
||||
|
||||
async function sleep(seconds) {
|
||||
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
|
||||
}
|
||||
const log = (...args) => console.log(...args);
|
||||
|
||||
async function getNpmPackageInfo(pkg, versionOrTag) {
|
||||
return fetch(`https://registry.npmjs.org/${pkg}/${versionOrTag}`).then(resp =>
|
||||
@@ -23,7 +17,13 @@ async function getNpmPackageInfo(pkg, versionOrTag) {
|
||||
);
|
||||
}
|
||||
|
||||
const log = (...args) => console.log(...args);
|
||||
async function sleep(seconds) {
|
||||
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
|
||||
}
|
||||
|
||||
function run(cmd) {
|
||||
return execSync(cmd, 'utf8').toString().trim();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
log,
|
||||
|
||||
@@ -42,7 +42,7 @@ async function verifyPublishedPackage(
|
||||
}
|
||||
|
||||
log(
|
||||
`🐌 ${packageName}@${tag} → ${pkg.version} on npm and not ${version} as expected, retrying...`,
|
||||
`🐌 ${packageName}@${tag} → ${json.version} on npm and not ${version} as expected, retrying...`,
|
||||
);
|
||||
} catch (e) {
|
||||
log(`Nope, fetch failed: ${e.message}`);
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
const {run, sleep, log, verifyPublishedPackage} = require('./utils.js');
|
||||
const {run, sleep, log} = require('./utils.js');
|
||||
const {verifyPublishedPackage} = require('./verifyPublishedPackage.js');
|
||||
const REACT_NATIVE_NPM_PKG = 'react-native';
|
||||
const MAX_RETRIES = 3 * 6; // 18 attempts. Waiting between attempt: 10 s. Total time: 3 mins.
|
||||
/**
|
||||
@@ -22,5 +23,8 @@ module.exports.verifyReleaseOnNpm = async (
|
||||
retries = MAX_RETRIES,
|
||||
) => {
|
||||
const tag = version.includes('-rc.') ? 'next' : latest ? 'latest' : null;
|
||||
if (version.startsWith('v')) {
|
||||
version = version.slice(1);
|
||||
}
|
||||
await verifyPublishedPackage(REACT_NATIVE_NPM_PKG, version, tag, retries);
|
||||
};
|
||||
|
||||
@@ -226,6 +226,6 @@ jobs:
|
||||
github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
|
||||
script: |
|
||||
const {verifyReleaseOnNpm} = require('./.github/workflow-scripts/verifyReleaseOnNpm.js');
|
||||
const {isLatest()} = require('./.github/workflow-scripts/publishTemplate.js');
|
||||
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
|
||||
const version = "${{ github.ref_name }}";
|
||||
await verifyReleaseOnNpm(version, isLatest());
|
||||
|
||||
+6
-9
@@ -29,8 +29,7 @@
|
||||
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
|
||||
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
|
||||
"test-ios": "./scripts/objc-test.sh test",
|
||||
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
|
||||
"test-typescript": "dtslint packages/react-native/types",
|
||||
"test-typescript": "tsc -p packages/react-native/types/tsconfig.test.json",
|
||||
"test": "jest",
|
||||
"fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js",
|
||||
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
|
||||
@@ -49,10 +48,9 @@
|
||||
"@babel/plugin-transform-regenerator": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.7.0",
|
||||
"@react-native/metro-babel-transformer": "0.79.0-main",
|
||||
"@react-native/metro-config": "0.79.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.79.3",
|
||||
"@react-native/metro-config": "0.79.3",
|
||||
"@tsconfig/node18": "1.0.1",
|
||||
"@types/react": "^19.0.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
@@ -89,10 +87,9 @@
|
||||
"jest-diff": "^29.7.0",
|
||||
"jest-junit": "^10.0.0",
|
||||
"jest-snapshot": "^29.7.0",
|
||||
"jscodeshift": "^0.14.0",
|
||||
"metro-babel-register": "^0.81.0",
|
||||
"metro-memory-fs": "^0.81.0",
|
||||
"metro-transform-plugins": "^0.81.0",
|
||||
"metro-babel-register": "^0.82.0",
|
||||
"metro-memory-fs": "^0.82.0",
|
||||
"metro-transform-plugins": "^0.82.0",
|
||||
"micromatch": "^4.0.4",
|
||||
"node-fetch": "^2.2.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -30,18 +30,18 @@ const {
|
||||
} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
|
||||
let nativeComponentName = 'RCTModule';
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'RCTModule',
|
||||
uiViewClassName: \\"RCTModule\\",
|
||||
bubblingEventTypes: {
|
||||
topBubblingEventDefinedInlineNull: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onBubblingEventDefinedInlineNullCapture',
|
||||
bubbled: 'onBubblingEventDefinedInlineNull'
|
||||
captured: \\"onBubblingEventDefinedInlineNullCapture\\",
|
||||
bubbled: \\"onBubblingEventDefinedInlineNull\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
directEventTypes: {
|
||||
topDirectEventDefinedInlineNull: {
|
||||
registrationName: 'onDirectEventDefinedInlineNull'
|
||||
registrationName: \\"onDirectEventDefinedInlineNull\\"
|
||||
}
|
||||
},
|
||||
validAttributes: {
|
||||
@@ -93,18 +93,18 @@ const {
|
||||
} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
|
||||
let nativeComponentName = 'RCTModule';
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'RCTModule',
|
||||
uiViewClassName: \\"RCTModule\\",
|
||||
bubblingEventTypes: {
|
||||
topBubblingEventDefinedInlineNull: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onBubblingEventDefinedInlineNullCapture',
|
||||
bubbled: 'onBubblingEventDefinedInlineNull'
|
||||
captured: \\"onBubblingEventDefinedInlineNullCapture\\",
|
||||
bubbled: \\"onBubblingEventDefinedInlineNull\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
directEventTypes: {
|
||||
topDirectEventDefinedInlineNull: {
|
||||
registrationName: 'onDirectEventDefinedInlineNull'
|
||||
registrationName: \\"onDirectEventDefinedInlineNull\\"
|
||||
}
|
||||
},
|
||||
validAttributes: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/traverse": "^7.25.3",
|
||||
"@react-native/codegen": "0.79.0-main"
|
||||
"@react-native/codegen": "0.79.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,17 +22,17 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.79.0-main",
|
||||
"@react-native/dev-middleware": "0.79.3",
|
||||
"chalk": "^4.0.0",
|
||||
"debug": "^2.2.0",
|
||||
"invariant": "^2.2.4",
|
||||
"metro": "^0.81.0",
|
||||
"metro-config": "^0.81.0",
|
||||
"metro-core": "^0.81.0",
|
||||
"metro": "^0.82.0",
|
||||
"metro-config": "^0.82.0",
|
||||
"metro-core": "^0.82.0",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"metro-resolver": "^0.81.0"
|
||||
"metro-resolver": "^0.82.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/cli": "*"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@generated SignedSource<<347069bf171def94f2e48bf1e82bb02d>>
|
||||
Git revision: 97e9912605ce73b06f67fc607c1a5c434a67d6de
|
||||
@generated SignedSource<<9e23a5a4010ff3bcfbba08cbb7e7a860>>
|
||||
Git revision: 8f145a057709173f4025da317121a10366ef171a
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
|
||||
Remote branch: main
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
Remote branch: 0.79-stable
|
||||
GN build args (overrides only):
|
||||
is_official_build = true
|
||||
Git status in checkout:
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Dev server middleware for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -23,7 +23,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@isaacs/ttlcache": "^1.4.1",
|
||||
"@react-native/debugger-frontend": "0.79.0-main",
|
||||
"@react-native/debugger-frontend": "0.79.3",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"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.79.0-main",
|
||||
"@react-native/eslint-plugin": "0.79.3",
|
||||
"@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.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "ESLint rules to validate NativeModule and Component Specs",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@react-native/codegen": "0.79.0-main",
|
||||
"@react-native/codegen": "0.79.3",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
+3
-3
@@ -13,7 +13,7 @@ import org.gradle.api.Action
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.AppliedPlugin
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
|
||||
|
||||
internal object JdkConfiguratorUtils {
|
||||
/**
|
||||
@@ -42,10 +42,10 @@ internal object JdkConfiguratorUtils {
|
||||
project.pluginManager.withPlugin("com.android.application", action)
|
||||
project.pluginManager.withPlugin("com.android.library", action)
|
||||
project.pluginManager.withPlugin("org.jetbrains.kotlin.android") {
|
||||
project.extensions.getByType(KotlinTopLevelExtension::class.java).jvmToolchain(17)
|
||||
project.kotlinExtension.jvmToolchain(17)
|
||||
}
|
||||
project.pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
|
||||
project.extensions.getByType(KotlinTopLevelExtension::class.java).jvmToolchain(17)
|
||||
project.kotlinExtension.jvmToolchain(17)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "helloworld",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"bootstrap": "node ./cli.js bootstrap",
|
||||
@@ -13,16 +13,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "19.0.0",
|
||||
"react-native": "1000.0.0"
|
||||
"react-native": "0.79.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@react-native/babel-preset": "0.79.0-main",
|
||||
"@react-native/core-cli-utils": "0.79.0-main",
|
||||
"@react-native/eslint-config": "0.79.0-main",
|
||||
"@react-native/metro-config": "0.79.0-main",
|
||||
"@react-native/babel-preset": "0.79.3",
|
||||
"@react-native/core-cli-utils": "0.79.3",
|
||||
"@react-native/eslint-config": "0.79.3",
|
||||
"@react-native/metro-config": "0.79.3",
|
||||
"chalk": "^4.1.2",
|
||||
"commander": "^12.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,9 +26,9 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.79.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.79.0-main",
|
||||
"metro-config": "^0.81.0",
|
||||
"metro-runtime": "^0.81.0"
|
||||
"@react-native/js-polyfills": "0.79.3",
|
||||
"@react-native/metro-babel-transformer": "0.79.3",
|
||||
"metro-config": "^0.82.0",
|
||||
"metro-runtime": "^0.82.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
|
||||
resolver: {
|
||||
resolverMainFields: ['react-native', 'browser', 'main'],
|
||||
platforms: ['android', 'ios'],
|
||||
unstable_conditionNames: ['require', 'import', 'react-native'],
|
||||
unstable_conditionNames: ['react-native'],
|
||||
},
|
||||
serializer: {
|
||||
// Note: This option is overridden in cli-plugin-metro (getOverrideConfig)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"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.79.0-main",
|
||||
"@react-native/babel-plugin-codegen": "0.79.3",
|
||||
"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.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"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.79.0-main",
|
||||
"@react-native/babel-preset": "0.79.3",
|
||||
"hermes-parser": "0.25.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/bots",
|
||||
"description": "React Native Bots",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen-typescript-test",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"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.79.0-main"
|
||||
"@react-native/codegen": "0.79.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
|
||||
+85
-171
@@ -19,21 +19,16 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ArrayPropsNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ArrayPropsNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"ArrayPropsNativeComponentView\\",
|
||||
validAttributes: {
|
||||
names: true,
|
||||
disableds: true,
|
||||
progress: true,
|
||||
radii: true,
|
||||
|
||||
colors: {
|
||||
process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')),
|
||||
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray'))
|
||||
},
|
||||
|
||||
srcs: true,
|
||||
points: true,
|
||||
edgeInsets: true,
|
||||
@@ -41,10 +36,9 @@ export const __INTERNAL_VIEW_CONFIG = {
|
||||
sizes: true,
|
||||
object: true,
|
||||
arrayOfObjects: true,
|
||||
arrayOfMixed: true,
|
||||
},
|
||||
arrayOfMixed: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -69,17 +63,13 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'BooleanPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'BooleanPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"BooleanPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
disabledNullable: true,
|
||||
},
|
||||
disabledNullable: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -104,18 +94,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ColorPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ColorPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"ColorPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
tintColor: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default,
|
||||
},
|
||||
},
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -140,16 +126,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'DimensionPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'DimensionPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"DimensionPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
marginBack: true,
|
||||
},
|
||||
marginBack: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -174,13 +156,10 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'EdgeInsetsPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'EdgeInsetsPropNativeComponentView',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"EdgeInsetsPropNativeComponentView\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -205,17 +184,13 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'EnumPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'EnumPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"EnumPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
alignment: true,
|
||||
intervals: true,
|
||||
},
|
||||
intervals: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -241,29 +216,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'EventNestedObjectPropsNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'EventNestedObjectPropsNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"EventNestedObjectPropsNativeComponentView\\",
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
}),
|
||||
},
|
||||
onChange: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -289,62 +258,51 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'EventPropsNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'EventPropsNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"EventPropsNativeComponentView\\",
|
||||
bubblingEventTypes: {
|
||||
topPaperDirectName: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
},
|
||||
|
||||
topEnd: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onEndCapture',
|
||||
bubbled: 'onEnd',
|
||||
},
|
||||
captured: \\"onEndCapture\\",
|
||||
bubbled: \\"onEnd\\"
|
||||
}
|
||||
},
|
||||
|
||||
topPaperBubblingName: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onEventBubblingWithPaperNameCapture',
|
||||
bubbled: 'onEventBubblingWithPaperName',
|
||||
},
|
||||
},
|
||||
captured: \\"onEventBubblingWithPaperNameCapture\\",
|
||||
bubbled: \\"onEventBubblingWithPaperName\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
directEventTypes: {
|
||||
topEventDirect: {
|
||||
registrationName: 'onEventDirect',
|
||||
registrationName: \\"onEventDirect\\"
|
||||
},
|
||||
|
||||
topPaperDirectName: {
|
||||
registrationName: 'onEventDirectWithPaperName',
|
||||
registrationName: \\"onEventDirectWithPaperName\\"
|
||||
},
|
||||
|
||||
topPaperBubblingName: {
|
||||
registrationName: 'onOrientationChange',
|
||||
},
|
||||
registrationName: \\"onOrientationChange\\"
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
onEventDirect: true,
|
||||
onEventDirectWithPaperName: true,
|
||||
onOrientationChange: true,
|
||||
onEnd: true,
|
||||
onEventBubblingWithPaperName: true,
|
||||
}),
|
||||
},
|
||||
onEventBubblingWithPaperName: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -369,11 +327,8 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'FloatPropsNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'FloatPropsNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"FloatPropsNativeComponentView\\",
|
||||
validAttributes: {
|
||||
blurRadius: true,
|
||||
blurRadius2: true,
|
||||
@@ -381,10 +336,9 @@ export const __INTERNAL_VIEW_CONFIG = {
|
||||
blurRadius4: true,
|
||||
blurRadius5: true,
|
||||
blurRadius6: true,
|
||||
blurRadiusNullable: true,
|
||||
},
|
||||
blurRadiusNullable: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -409,18 +363,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ImagePropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ImagePropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"ImagePropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
},
|
||||
},
|
||||
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -445,18 +395,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'IntegerPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'IntegerPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"IntegerPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
progress1: true,
|
||||
progress2: true,
|
||||
progress3: true,
|
||||
},
|
||||
progress3: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -482,29 +428,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'RCTInterfaceOnlyComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'RCTInterfaceOnlyComponent',
|
||||
|
||||
uiViewClassName: \\"RCTInterfaceOnlyComponent\\",
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
title: true,
|
||||
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
}),
|
||||
},
|
||||
onChange: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -529,16 +469,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'MixedPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MixedPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"MixedPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
mixedProp: true,
|
||||
},
|
||||
mixedProp: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -563,30 +499,23 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'MultiNativePropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MultiNativePropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"MultiNativePropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
|
||||
},
|
||||
|
||||
color: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default,
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default
|
||||
},
|
||||
|
||||
thumbTintColor: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default,
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default
|
||||
},
|
||||
|
||||
point: {
|
||||
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
|
||||
},
|
||||
},
|
||||
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -611,13 +540,10 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'NoPropsNoEventsNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'NoPropsNoEventsNativeComponentView',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"NoPropsNoEventsNativeComponentView\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -642,18 +568,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ObjectPropsNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ObjectPropsNativeComponent',
|
||||
|
||||
uiViewClassName: \\"ObjectPropsNativeComponent\\",
|
||||
validAttributes: {
|
||||
objectProp: true,
|
||||
objectArrayProp: true,
|
||||
objectPrimitiveRequiredProp: true,
|
||||
},
|
||||
objectPrimitiveRequiredProp: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -678,18 +600,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'PointPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'PointPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"PointPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
startPoint: {
|
||||
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
|
||||
},
|
||||
},
|
||||
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -714,17 +632,13 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'StringPropNativeComponentView';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'StringPropNativeComponentView',
|
||||
|
||||
uiViewClassName: \\"StringPropNativeComponentView\\",
|
||||
validAttributes: {
|
||||
placeholder: true,
|
||||
defaultValue: true,
|
||||
},
|
||||
defaultValue: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -29,24 +29,22 @@
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.25.3",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-parser": "0.25.1",
|
||||
"invariant": "^2.2.4",
|
||||
"jscodeshift": "^17.0.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
"yargs": "^17.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-async-to-generator": "^7.24.7",
|
||||
"@babel/plugin-transform-class-properties": "^7.25.4",
|
||||
"@babel/plugin-transform-destructuring": "^7.24.8",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
|
||||
"@babel/plugin-transform-object-rest-spread": "^7.24.7",
|
||||
"@babel/plugin-transform-optional-chaining": "^7.24.8",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-async-to-generator": "^7.24.7",
|
||||
"@babel/plugin-transform-destructuring": "^7.24.8",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"chalk": "^4.0.0",
|
||||
"hermes-estree": "0.25.1",
|
||||
@@ -55,6 +53,6 @@
|
||||
"rimraf": "^3.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/preset-env": "^7.1.6"
|
||||
"@babel/core": "*"
|
||||
}
|
||||
}
|
||||
|
||||
+126
-137
@@ -16,7 +16,8 @@ import type {
|
||||
} from '../../CodegenSchema';
|
||||
import type {SchemaType} from '../../CodegenSchema';
|
||||
|
||||
const j = require('jscodeshift');
|
||||
const core = require('@babel/core');
|
||||
const t = core.types;
|
||||
|
||||
// File path -> contents
|
||||
type FilesOutput = Map<string, string>;
|
||||
@@ -50,6 +51,10 @@ ${componentConfig}
|
||||
// this multiple times.
|
||||
const UIMANAGER_IMPORT = 'const {UIManager} = require("react-native")';
|
||||
|
||||
function expression(input: string) {
|
||||
return core.template.expression(input)();
|
||||
}
|
||||
|
||||
function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
|
||||
switch (typeAnnotation.type) {
|
||||
case 'BooleanTypeAnnotation':
|
||||
@@ -61,25 +66,29 @@ function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
|
||||
case 'StringEnumTypeAnnotation':
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
return j.literal(true);
|
||||
return t.booleanLiteral(true);
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
return j.template
|
||||
.expression`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`;
|
||||
return expression(
|
||||
`{ process: require('react-native/Libraries/StyleSheet/processColor').default }`,
|
||||
);
|
||||
case 'ImageSourcePrimitive':
|
||||
return j.template
|
||||
.expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`;
|
||||
return expression(
|
||||
"{ process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource')) }",
|
||||
);
|
||||
case 'ImageRequestPrimitive':
|
||||
throw new Error('ImageRequest should not be used in props');
|
||||
case 'PointPrimitive':
|
||||
return j.template
|
||||
.expression`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')) }`;
|
||||
return expression(
|
||||
`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')) }`,
|
||||
);
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return j.template
|
||||
.expression`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer')) }`;
|
||||
return expression(
|
||||
`{ diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer')) }`,
|
||||
);
|
||||
case 'DimensionPrimitive':
|
||||
return j.literal(true);
|
||||
return t.booleanLiteral(true);
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error(
|
||||
@@ -90,20 +99,21 @@ function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
|
||||
if (typeAnnotation.elementType.type === 'ReservedPropTypeAnnotation') {
|
||||
switch (typeAnnotation.elementType.name) {
|
||||
case 'ColorPrimitive':
|
||||
return j.template
|
||||
.expression`{ process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')) }`;
|
||||
return expression(
|
||||
`{ process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')) }`,
|
||||
);
|
||||
case 'ImageSourcePrimitive':
|
||||
case 'PointPrimitive':
|
||||
case 'EdgeInsetsPrimitive':
|
||||
case 'DimensionPrimitive':
|
||||
return j.literal(true);
|
||||
return t.booleanLiteral(true);
|
||||
default:
|
||||
throw new Error(
|
||||
`Received unknown array native typeAnnotation: "${typeAnnotation.elementType.name}"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
return j.literal(true);
|
||||
return t.booleanLiteral(true);
|
||||
default:
|
||||
(typeAnnotation: empty);
|
||||
throw new Error(
|
||||
@@ -134,7 +144,7 @@ ${
|
||||
: ''
|
||||
}
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG;
|
||||
export const __INTERNAL_VIEW_CONFIG = %%VIEW_CONFIG%%;
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
`.trim();
|
||||
@@ -180,13 +190,16 @@ function getValidAttributesForEvents(
|
||||
"const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');",
|
||||
);
|
||||
|
||||
const validAttributes = j.objectExpression(
|
||||
const validAttributes = t.objectExpression(
|
||||
events.map(eventType => {
|
||||
return j.property('init', j.identifier(eventType.name), j.literal(true));
|
||||
return t.objectProperty(
|
||||
t.identifier(eventType.name),
|
||||
t.booleanLiteral(true),
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [
|
||||
return t.callExpression(t.identifier('ConditionallyIgnoredEventHandlers'), [
|
||||
validAttributes,
|
||||
]);
|
||||
}
|
||||
@@ -195,20 +208,20 @@ function generateBubblingEventInfo(
|
||||
event: EventTypeShape,
|
||||
nameOveride: void | string,
|
||||
) {
|
||||
return j.property(
|
||||
'init',
|
||||
j.identifier(normalizeInputEventName(nameOveride || event.name)),
|
||||
j.objectExpression([
|
||||
j.property(
|
||||
'init',
|
||||
j.identifier('phasedRegistrationNames'),
|
||||
j.objectExpression([
|
||||
j.property(
|
||||
'init',
|
||||
j.identifier('captured'),
|
||||
j.literal(`${event.name}Capture`),
|
||||
return t.objectProperty(
|
||||
t.identifier(normalizeInputEventName(nameOveride || event.name)),
|
||||
t.objectExpression([
|
||||
t.objectProperty(
|
||||
t.identifier('phasedRegistrationNames'),
|
||||
t.objectExpression([
|
||||
t.objectProperty(
|
||||
t.identifier('captured'),
|
||||
t.stringLiteral(`${event.name}Capture`),
|
||||
),
|
||||
t.objectProperty(
|
||||
t.identifier('bubbled'),
|
||||
t.stringLiteral(event.name),
|
||||
),
|
||||
j.property('init', j.identifier('bubbled'), j.literal(event.name)),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
@@ -219,14 +232,12 @@ function generateDirectEventInfo(
|
||||
event: EventTypeShape,
|
||||
nameOveride: void | string,
|
||||
) {
|
||||
return j.property(
|
||||
'init',
|
||||
j.identifier(normalizeInputEventName(nameOveride || event.name)),
|
||||
j.objectExpression([
|
||||
j.property(
|
||||
'init',
|
||||
j.identifier('registrationName'),
|
||||
j.literal(event.name),
|
||||
return t.objectProperty(
|
||||
t.identifier(normalizeInputEventName(nameOveride || event.name)),
|
||||
t.objectExpression([
|
||||
t.objectProperty(
|
||||
t.identifier('registrationName'),
|
||||
t.stringLiteral(event.name),
|
||||
),
|
||||
]),
|
||||
);
|
||||
@@ -261,20 +272,15 @@ function buildViewConfig(
|
||||
}
|
||||
});
|
||||
|
||||
const validAttributes = j.objectExpression([
|
||||
const validAttributes = t.objectExpression([
|
||||
...componentProps.map(schemaProp => {
|
||||
return j.property(
|
||||
'init',
|
||||
j.identifier(schemaProp.name),
|
||||
return t.objectProperty(
|
||||
t.identifier(schemaProp.name),
|
||||
getReactDiffProcessValue(schemaProp.typeAnnotation),
|
||||
);
|
||||
}),
|
||||
...(componentEvents.length > 0
|
||||
? [
|
||||
j.spreadProperty(
|
||||
getValidAttributesForEvents(componentEvents, imports),
|
||||
),
|
||||
]
|
||||
? [t.spreadElement(getValidAttributesForEvents(componentEvents, imports))]
|
||||
: []),
|
||||
]);
|
||||
|
||||
@@ -294,15 +300,6 @@ function buildViewConfig(
|
||||
return bubblingEvents;
|
||||
}, []);
|
||||
|
||||
const bubblingEvents =
|
||||
bubblingEventNames.length > 0
|
||||
? j.property(
|
||||
'init',
|
||||
j.identifier('bubblingEventTypes'),
|
||||
j.objectExpression(bubblingEventNames),
|
||||
)
|
||||
: null;
|
||||
|
||||
const directEventNames = component.events
|
||||
.filter(event => event.bubblingType === 'direct')
|
||||
.reduce((directEvents: Array<any>, event) => {
|
||||
@@ -319,27 +316,34 @@ function buildViewConfig(
|
||||
return directEvents;
|
||||
}, []);
|
||||
|
||||
const directEvents =
|
||||
directEventNames.length > 0
|
||||
? j.property(
|
||||
'init',
|
||||
j.identifier('directEventTypes'),
|
||||
j.objectExpression(directEventNames),
|
||||
)
|
||||
: null;
|
||||
|
||||
const properties = [
|
||||
j.property(
|
||||
'init',
|
||||
j.identifier('uiViewClassName'),
|
||||
j.literal(componentName),
|
||||
t.objectProperty(
|
||||
t.identifier('uiViewClassName'),
|
||||
t.stringLiteral(componentName),
|
||||
),
|
||||
bubblingEvents,
|
||||
directEvents,
|
||||
j.property('init', j.identifier('validAttributes'), validAttributes),
|
||||
].filter(Boolean);
|
||||
];
|
||||
|
||||
return j.objectExpression(properties);
|
||||
if (bubblingEventNames.length > 0) {
|
||||
properties.push(
|
||||
t.objectProperty(
|
||||
t.identifier('bubblingEventTypes'),
|
||||
t.objectExpression(bubblingEventNames),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (directEventNames.length > 0) {
|
||||
properties.push(
|
||||
t.objectProperty(
|
||||
t.identifier('directEventTypes'),
|
||||
t.objectExpression(directEventNames),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
properties.push(
|
||||
t.objectProperty(t.identifier('validAttributes'), validAttributes),
|
||||
);
|
||||
return t.objectExpression(properties);
|
||||
}
|
||||
|
||||
function buildCommands(
|
||||
@@ -358,45 +362,32 @@ function buildCommands(
|
||||
'const {dispatchCommand} = require("react-native/Libraries/ReactNative/RendererProxy");',
|
||||
);
|
||||
|
||||
const properties = commands.map(command => {
|
||||
const commandName = command.name;
|
||||
const params = command.typeAnnotation.params;
|
||||
const commandsObject = t.objectExpression(
|
||||
commands.map(command => {
|
||||
const commandName = command.name;
|
||||
const params = command.typeAnnotation.params;
|
||||
|
||||
const commandNameLiteral = j.literal(commandName);
|
||||
const commandNameIdentifier = j.identifier(commandName);
|
||||
const arrayParams = j.arrayExpression(
|
||||
params.map(param => {
|
||||
return j.identifier(param.name);
|
||||
}),
|
||||
);
|
||||
const dispatchCommandCall = t.callExpression(
|
||||
t.identifier('dispatchCommand'),
|
||||
[
|
||||
t.identifier('ref'),
|
||||
t.stringLiteral(commandName),
|
||||
t.arrayExpression(params.map(param => t.identifier(param.name))),
|
||||
],
|
||||
);
|
||||
|
||||
const expression = j.template
|
||||
.expression`dispatchCommand(ref, ${commandNameLiteral}, ${arrayParams})`;
|
||||
return t.objectMethod(
|
||||
'method',
|
||||
t.identifier(commandName),
|
||||
[t.identifier('ref'), ...params.map(param => t.identifier(param.name))],
|
||||
t.blockStatement([t.expressionStatement(dispatchCommandCall)]),
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
const functionParams = params.map(param => {
|
||||
return j.identifier(param.name);
|
||||
});
|
||||
|
||||
const property = j.property(
|
||||
'init',
|
||||
commandNameIdentifier,
|
||||
j.functionExpression(
|
||||
null,
|
||||
[j.identifier('ref'), ...functionParams],
|
||||
j.blockStatement([j.expressionStatement(expression)]),
|
||||
),
|
||||
);
|
||||
property.method = true;
|
||||
|
||||
return property;
|
||||
});
|
||||
|
||||
return j.exportNamedDeclaration(
|
||||
j.variableDeclaration('const', [
|
||||
j.variableDeclarator(
|
||||
j.identifier('Commands'),
|
||||
j.objectExpression(properties),
|
||||
),
|
||||
return t.exportNamedDeclaration(
|
||||
t.variableDeclaration('const', [
|
||||
t.variableDeclarator(t.identifier('Commands'), commandsObject),
|
||||
]),
|
||||
);
|
||||
}
|
||||
@@ -431,42 +422,40 @@ module.exports = {
|
||||
component.paperComponentNameDeprecated,
|
||||
});
|
||||
|
||||
const replacedSourceRoot = j.withParser('flow')(replacedTemplate);
|
||||
|
||||
const paperComponentName =
|
||||
component.paperComponentName ?? componentName;
|
||||
|
||||
replacedSourceRoot
|
||||
.find(j.Identifier, {
|
||||
name: 'VIEW_CONFIG',
|
||||
})
|
||||
.replaceWith(
|
||||
buildViewConfig(
|
||||
schema,
|
||||
paperComponentName,
|
||||
component,
|
||||
imports,
|
||||
),
|
||||
);
|
||||
const replacedSourceRoot = core.template.program(
|
||||
replacedTemplate,
|
||||
)({
|
||||
VIEW_CONFIG: buildViewConfig(
|
||||
schema,
|
||||
paperComponentName,
|
||||
component,
|
||||
imports,
|
||||
),
|
||||
});
|
||||
|
||||
const commands = buildCommands(
|
||||
const commandsExport = buildCommands(
|
||||
schema,
|
||||
paperComponentName,
|
||||
component,
|
||||
imports,
|
||||
);
|
||||
if (commands) {
|
||||
replacedSourceRoot
|
||||
.find(j.ExportDefaultDeclaration)
|
||||
.insertAfter(j(commands).toSource());
|
||||
if (commandsExport) {
|
||||
replacedSourceRoot.body.push(commandsExport);
|
||||
}
|
||||
|
||||
const replacedSource: string = replacedSourceRoot.toSource({
|
||||
quote: 'single',
|
||||
trailingComma: true,
|
||||
});
|
||||
|
||||
return replacedSource;
|
||||
const replacedSource = core.transformFromAstSync(
|
||||
replacedSourceRoot,
|
||||
undefined,
|
||||
{
|
||||
babelrc: false,
|
||||
browserslistConfigFile: false,
|
||||
configFile: false,
|
||||
},
|
||||
);
|
||||
return replacedSource.code;
|
||||
})
|
||||
.join('\n\n');
|
||||
})
|
||||
|
||||
+149
-297
@@ -19,21 +19,16 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ArrayPropsNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ArrayPropsNativeComponent',
|
||||
|
||||
uiViewClassName: \\"ArrayPropsNativeComponent\\",
|
||||
validAttributes: {
|
||||
names: true,
|
||||
disableds: true,
|
||||
progress: true,
|
||||
radii: true,
|
||||
|
||||
colors: {
|
||||
process: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray')),
|
||||
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/StyleSheet/processColorArray'))
|
||||
},
|
||||
|
||||
srcs: true,
|
||||
points: true,
|
||||
dimensions: true,
|
||||
@@ -41,10 +36,9 @@ export const __INTERNAL_VIEW_CONFIG = {
|
||||
object: true,
|
||||
array: true,
|
||||
arrayOfArrayOfObject: true,
|
||||
arrayOfMixed: true,
|
||||
},
|
||||
arrayOfMixed: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -69,16 +63,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ArrayPropsNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ArrayPropsNativeComponent',
|
||||
|
||||
uiViewClassName: \\"ArrayPropsNativeComponent\\",
|
||||
validAttributes: {
|
||||
nativePrimitives: true,
|
||||
},
|
||||
nativePrimitives: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -103,16 +93,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'BooleanPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'BooleanPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"BooleanPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
},
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -137,18 +123,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ColorPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ColorPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"ColorPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
tintColor: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default,
|
||||
},
|
||||
},
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -174,23 +156,18 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {dispatchCommand} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
|
||||
|
||||
let nativeComponentName = 'CommandNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'CommandNativeComponent',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"CommandNativeComponent\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
|
||||
export const Commands = {
|
||||
flashScrollIndicators(ref) {
|
||||
dispatchCommand(ref, \\"flashScrollIndicators\\", []);
|
||||
},
|
||||
|
||||
allTypes(ref, x, y, z, message, animated, locations) {
|
||||
dispatchCommand(ref, \\"allTypes\\", [x, y, z, message, animated, locations]);
|
||||
}
|
||||
flashScrollIndicators(ref) {
|
||||
dispatchCommand(ref, \\"flashScrollIndicators\\", []);
|
||||
},
|
||||
allTypes(ref, x, y, z, message, animated, locations) {
|
||||
dispatchCommand(ref, \\"allTypes\\", [x, y, z, message, animated, locations]);
|
||||
}
|
||||
};
|
||||
",
|
||||
}
|
||||
@@ -216,30 +193,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {dispatchCommand} = require(\\"react-native/Libraries/ReactNative/RendererProxy\\");
|
||||
|
||||
let nativeComponentName = 'CommandNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'CommandNativeComponent',
|
||||
|
||||
uiViewClassName: \\"CommandNativeComponent\\",
|
||||
validAttributes: {
|
||||
accessibilityHint: true,
|
||||
},
|
||||
accessibilityHint: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
|
||||
export const Commands = {
|
||||
handleRootTag(ref, rootTag) {
|
||||
dispatchCommand(ref, \\"handleRootTag\\", [rootTag]);
|
||||
},
|
||||
|
||||
hotspotUpdate(ref, x, y) {
|
||||
dispatchCommand(ref, \\"hotspotUpdate\\", [x, y]);
|
||||
},
|
||||
|
||||
addItems(ref, items) {
|
||||
dispatchCommand(ref, \\"addItems\\", [items]);
|
||||
}
|
||||
handleRootTag(ref, rootTag) {
|
||||
dispatchCommand(ref, \\"handleRootTag\\", [rootTag]);
|
||||
},
|
||||
hotspotUpdate(ref, x, y) {
|
||||
dispatchCommand(ref, \\"hotspotUpdate\\", [x, y]);
|
||||
},
|
||||
addItems(ref, items) {
|
||||
dispatchCommand(ref, \\"addItems\\", [items]);
|
||||
}
|
||||
};
|
||||
",
|
||||
}
|
||||
@@ -264,16 +234,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'DimensionPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'DimensionPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"DimensionPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
marginBack: true,
|
||||
},
|
||||
marginBack: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -298,21 +264,17 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'DoublePropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'DoublePropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"DoublePropNativeComponent\\",
|
||||
validAttributes: {
|
||||
blurRadius: true,
|
||||
blurRadius2: true,
|
||||
blurRadius3: true,
|
||||
blurRadius4: true,
|
||||
blurRadius5: true,
|
||||
blurRadius6: true,
|
||||
},
|
||||
blurRadius6: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -338,29 +300,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'EventsNestedObjectNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'EventsNestedObjectNativeComponent',
|
||||
|
||||
uiViewClassName: \\"EventsNestedObjectNativeComponent\\",
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
}),
|
||||
},
|
||||
onChange: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -386,62 +342,51 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'EventsNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'EventsNativeComponent',
|
||||
|
||||
uiViewClassName: \\"EventsNativeComponent\\",
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
},
|
||||
|
||||
topArrayEventType: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onArrayEventTypeCapture',
|
||||
bubbled: 'onArrayEventType',
|
||||
},
|
||||
captured: \\"onArrayEventTypeCapture\\",
|
||||
bubbled: \\"onArrayEventType\\"
|
||||
}
|
||||
},
|
||||
|
||||
topEnd: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onEndCapture',
|
||||
bubbled: 'onEnd',
|
||||
},
|
||||
},
|
||||
captured: \\"onEndCapture\\",
|
||||
bubbled: \\"onEnd\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
directEventTypes: {
|
||||
topEventDirect: {
|
||||
registrationName: 'onEventDirect',
|
||||
registrationName: \\"onEventDirect\\"
|
||||
},
|
||||
|
||||
topOrientationChange: {
|
||||
registrationName: 'onOrientationChange',
|
||||
registrationName: \\"onOrientationChange\\"
|
||||
},
|
||||
|
||||
topEventWithMixedPropAttribute: {
|
||||
registrationName: 'onEventWithMixedPropAttribute',
|
||||
},
|
||||
registrationName: \\"onEventWithMixedPropAttribute\\"
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
onArrayEventType: true,
|
||||
onEventDirect: true,
|
||||
onOrientationChange: true,
|
||||
onEnd: true,
|
||||
onEventWithMixedPropAttribute: true,
|
||||
}),
|
||||
},
|
||||
onEventWithMixedPropAttribute: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -467,34 +412,28 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'RCTInterfaceOnlyComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'RCTInterfaceOnlyComponent',
|
||||
|
||||
uiViewClassName: \\"RCTInterfaceOnlyComponent\\",
|
||||
bubblingEventTypes: {
|
||||
topPaperChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
directEventTypes: {
|
||||
topPaperDirectChange: {
|
||||
registrationName: 'onDirectChange',
|
||||
},
|
||||
registrationName: \\"onDirectChange\\"
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
onDirectChange: true,
|
||||
}),
|
||||
},
|
||||
onDirectChange: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -519,13 +458,10 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ExcludedAndroidComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ExcludedAndroidComponent',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"ExcludedAndroidComponent\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -550,13 +486,10 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ExcludedAndroidIosComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ExcludedAndroidIosComponent',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"ExcludedAndroidIosComponent\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -581,26 +514,19 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ExcludedIosComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ExcludedIosComponent',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"ExcludedIosComponent\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
|
||||
let nativeComponentName = 'MultiFileIncludedNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MultiFileIncludedNativeComponent',
|
||||
|
||||
uiViewClassName: \\"MultiFileIncludedNativeComponent\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
},
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -625,21 +551,17 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'FloatPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'FloatPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"FloatPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
blurRadius: true,
|
||||
blurRadius2: true,
|
||||
blurRadius3: true,
|
||||
blurRadius4: true,
|
||||
blurRadius5: true,
|
||||
blurRadius6: true,
|
||||
},
|
||||
blurRadius6: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -664,18 +586,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ImagePropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ImagePropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"ImagePropNativeComponent\\",
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
},
|
||||
},
|
||||
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -700,18 +618,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'InsetsPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'InsetsPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"InsetsPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
contentInset: {
|
||||
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer')),
|
||||
},
|
||||
},
|
||||
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/insetsDiffer'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -736,16 +650,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'Int32EnumPropsNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'Int32EnumPropsNativeComponent',
|
||||
|
||||
uiViewClassName: \\"Int32EnumPropsNativeComponent\\",
|
||||
validAttributes: {
|
||||
maxInterval: true,
|
||||
},
|
||||
maxInterval: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -770,18 +680,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'IntegerPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'IntegerPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"IntegerPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
progress1: true,
|
||||
progress2: true,
|
||||
progress3: true,
|
||||
},
|
||||
progress3: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -807,29 +713,23 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/
|
||||
const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');
|
||||
|
||||
let nativeComponentName = 'RCTInterfaceOnlyComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'RCTInterfaceOnlyComponent',
|
||||
|
||||
uiViewClassName: \\"RCTInterfaceOnlyComponent\\",
|
||||
bubblingEventTypes: {
|
||||
topChange: {
|
||||
phasedRegistrationNames: {
|
||||
captured: 'onChangeCapture',
|
||||
bubbled: 'onChange',
|
||||
},
|
||||
},
|
||||
captured: \\"onChangeCapture\\",
|
||||
bubbled: \\"onChange\\"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
validAttributes: {
|
||||
accessibilityHint: true,
|
||||
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onChange: true,
|
||||
}),
|
||||
},
|
||||
onChange: true
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -854,16 +754,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'MixedPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MixedPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"MixedPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
mixedProp: true,
|
||||
},
|
||||
mixedProp: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -888,30 +784,23 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ImageColorPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ImageColorPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"ImageColorPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
process: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Image/resolveAssetSource'))
|
||||
},
|
||||
|
||||
color: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default,
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default
|
||||
},
|
||||
|
||||
thumbTintColor: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default,
|
||||
process: require('react-native/Libraries/StyleSheet/processColor').default
|
||||
},
|
||||
|
||||
point: {
|
||||
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
|
||||
},
|
||||
},
|
||||
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -936,13 +825,10 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'NoPropsNoEventsComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'NoPropsNoEventsComponent',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"NoPropsNoEventsComponent\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -967,16 +853,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'ObjectProps';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'ObjectProps',
|
||||
|
||||
uiViewClassName: \\"ObjectProps\\",
|
||||
validAttributes: {
|
||||
objectProp: true,
|
||||
},
|
||||
objectProp: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -1001,18 +883,14 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'PointPropNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'PointPropNativeComponent',
|
||||
|
||||
uiViewClassName: \\"PointPropNativeComponent\\",
|
||||
validAttributes: {
|
||||
startPoint: {
|
||||
diff: ((req) => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer')),
|
||||
},
|
||||
},
|
||||
diff: (req => 'default' in req ? req.default : req)(require('react-native/Libraries/Utilities/differ/pointsDiffer'))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -1037,16 +915,12 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'StringEnumPropsNativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'StringEnumPropsNativeComponent',
|
||||
|
||||
uiViewClassName: \\"StringEnumPropsNativeComponent\\",
|
||||
validAttributes: {
|
||||
alignment: true,
|
||||
},
|
||||
alignment: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -1071,17 +945,13 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'StringPropComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'StringPropComponent',
|
||||
|
||||
uiViewClassName: \\"StringPropComponent\\",
|
||||
validAttributes: {
|
||||
accessibilityHint: true,
|
||||
accessibilityRole: true,
|
||||
},
|
||||
accessibilityRole: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -1106,29 +976,21 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'MultiFile1NativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MultiFile1NativeComponent',
|
||||
|
||||
uiViewClassName: \\"MultiFile1NativeComponent\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
},
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
|
||||
let nativeComponentName = 'MultiFile2NativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MultiFile2NativeComponent',
|
||||
|
||||
uiViewClassName: \\"MultiFile2NativeComponent\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
},
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -1153,29 +1015,21 @@ Map {
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
let nativeComponentName = 'MultiComponent1NativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MultiComponent1NativeComponent',
|
||||
|
||||
uiViewClassName: \\"MultiComponent1NativeComponent\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
},
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
|
||||
let nativeComponentName = 'MultiComponent2NativeComponent';
|
||||
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'MultiComponent2NativeComponent',
|
||||
|
||||
uiViewClassName: \\"MultiComponent2NativeComponent\\",
|
||||
validAttributes: {
|
||||
disabled: true,
|
||||
},
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
@@ -1208,12 +1062,10 @@ if (UIManager.hasViewManagerConfig('NativeComponentName')) {
|
||||
} else {
|
||||
throw new Error('Failed to find native component for either \\"NativeComponentName\\" or \\"DeprecatedNativeComponentName\\"');
|
||||
}
|
||||
|
||||
export const __INTERNAL_VIEW_CONFIG = {
|
||||
uiViewClassName: 'NativeComponentName',
|
||||
validAttributes: {},
|
||||
uiViewClassName: \\"NativeComponentName\\",
|
||||
validAttributes: {}
|
||||
};
|
||||
|
||||
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
|
||||
",
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/compatibility-check",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -29,7 +29,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.79.0-main"
|
||||
"@react-native/codegen": "0.79.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-remove-types": "^2.237.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/fantom",
|
||||
"private": true,
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"main": "src/index.js",
|
||||
"description": "Internal integration testing and benchmarking tool for React Native",
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.79.0-main"
|
||||
"@react-native/codegen": "0.79.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/oss-library-example",
|
||||
"version": "0.79.0-main",
|
||||
"version": "0.79.3",
|
||||
"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.79.0-main",
|
||||
"react-native": "1000.0.0"
|
||||
"@react-native/babel-preset": "0.79.3",
|
||||
"react-native": "0.79.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
||||
@@ -140,4 +140,11 @@
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
- (void)loadSourceForBridge:(RCTBridge *)bridge
|
||||
onProgress:(RCTSourceLoadProgressBlock)onProgress
|
||||
onComplete:(RCTSourceLoadBlock)loadCallback
|
||||
{
|
||||
[RCTJavaScriptLoader loadBundleAtURL:[self sourceURLForBridge:bridge] onProgress:onProgress onComplete:loadCallback];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <react/runtime/JSRuntimeFactoryCAPI.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
// Forward declarations for umbrella headers.
|
||||
// In implementations, import `<react/runtime/JSRuntimeFactoryCAPI.h>` to obtain the actual type.
|
||||
typedef void *JSRuntimeFactoryRef;
|
||||
|
||||
@protocol RCTJSRuntimeConfiguratorProtocol
|
||||
|
||||
- (JSRuntimeFactoryRef)createJSRuntimeFactory;
|
||||
|
||||
@@ -193,6 +193,15 @@ using namespace facebook::react;
|
||||
return RCTAppSetupDefaultModuleFromClass(moduleClass, self.delegate.dependencyProvider);
|
||||
}
|
||||
|
||||
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
if ([_delegate respondsToSelector:@selector(extraModulesForBridge:)]) {
|
||||
return [_delegate extraModulesForBridge:bridge];
|
||||
}
|
||||
|
||||
return @[];
|
||||
}
|
||||
|
||||
#pragma mark - RCTComponentViewFactoryComponentProvider
|
||||
|
||||
- (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
||||
@@ -305,6 +314,14 @@ class RCTAppDelegateBridgelessFeatureFlags : public ReactNativeFeatureFlagsDefau
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool useShadowNodeStateOnClone() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
- (void)_setUpFeatureFlags
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
||||
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
||||
#import <react/runtime/JSRuntimeFactory.h>
|
||||
#import <react/runtime/JSRuntimeFactoryCAPI.h>
|
||||
|
||||
@implementation RCTRootViewFactoryConfiguration
|
||||
|
||||
|
||||
+13
-1
@@ -81,7 +81,19 @@ export class URL {
|
||||
let baseUrl = null;
|
||||
if (!base || validateBaseUrl(url)) {
|
||||
this._url = url;
|
||||
if (!this._url.endsWith('/')) {
|
||||
if (this._url.includes('#')) {
|
||||
const split = this._url.split('#');
|
||||
const beforeHash = split[0];
|
||||
const website = beforeHash.split('://')[1];
|
||||
if (!website.includes('/')) {
|
||||
this._url = split.join('/#');
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!this._url.endsWith('/') &&
|
||||
!(this._url.includes('?') || this._url.includes('#'))
|
||||
) {
|
||||
this._url += '/';
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -14,8 +14,8 @@ export const version: $ReadOnly<{
|
||||
patch: number,
|
||||
prerelease: string | null,
|
||||
}> = {
|
||||
major: 1000,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
major: 0,
|
||||
minor: 79,
|
||||
patch: 3,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
@@ -49,13 +49,8 @@ RCT_EXPORT_MODULE()
|
||||
_queue.maxConcurrentOperationCount = 2;
|
||||
}
|
||||
|
||||
__weak NSBlockOperation *weakOp;
|
||||
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
|
||||
NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
|
||||
if (strongOp == nil || [strongOp isCancelled]) {
|
||||
return;
|
||||
}
|
||||
|
||||
__weak __block NSBlockOperation *weakOp;
|
||||
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
|
||||
// Get mime type
|
||||
NSRange firstSemicolon = [request.URL.resourceSpecifier rangeOfString:@";"];
|
||||
NSString *mimeType =
|
||||
@@ -67,15 +62,15 @@ RCT_EXPORT_MODULE()
|
||||
expectedContentLength:-1
|
||||
textEncodingName:nil];
|
||||
|
||||
[delegate URLRequest:strongOp didReceiveResponse:response];
|
||||
[delegate URLRequest:weakOp didReceiveResponse:response];
|
||||
|
||||
// Load data
|
||||
NSError *error;
|
||||
NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
|
||||
if (data) {
|
||||
[delegate URLRequest:strongOp didReceiveData:data];
|
||||
[delegate URLRequest:weakOp didReceiveData:data];
|
||||
}
|
||||
[delegate URLRequest:strongOp didCompleteWithError:error];
|
||||
[delegate URLRequest:weakOp didCompleteWithError:error];
|
||||
}];
|
||||
|
||||
weakOp = op;
|
||||
|
||||
@@ -53,19 +53,14 @@ RCT_EXPORT_MODULE()
|
||||
_fileQueue.maxConcurrentOperationCount = 4;
|
||||
}
|
||||
|
||||
__weak NSBlockOperation *weakOp;
|
||||
NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
|
||||
NSBlockOperation *strongOp = weakOp; // Strong reference to avoid deallocation during execution
|
||||
if (strongOp == nil || [strongOp isCancelled]) {
|
||||
return;
|
||||
}
|
||||
|
||||
__weak __block NSBlockOperation *weakOp;
|
||||
__block NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock:^{
|
||||
// Get content length
|
||||
NSError *error = nil;
|
||||
NSFileManager *fileManager = [NSFileManager new];
|
||||
NSDictionary<NSString *, id> *fileAttributes = [fileManager attributesOfItemAtPath:request.URL.path error:&error];
|
||||
if (!fileAttributes) {
|
||||
[delegate URLRequest:strongOp didCompleteWithError:error];
|
||||
[delegate URLRequest:weakOp didCompleteWithError:error];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -82,14 +77,14 @@ RCT_EXPORT_MODULE()
|
||||
expectedContentLength:[fileAttributes[NSFileSize] ?: @-1 integerValue]
|
||||
textEncodingName:nil];
|
||||
|
||||
[delegate URLRequest:strongOp didReceiveResponse:response];
|
||||
[delegate URLRequest:weakOp didReceiveResponse:response];
|
||||
|
||||
// Load data
|
||||
NSData *data = [NSData dataWithContentsOfURL:request.URL options:NSDataReadingMappedIfSafe error:&error];
|
||||
if (data) {
|
||||
[delegate URLRequest:strongOp didReceiveData:data];
|
||||
[delegate URLRequest:weakOp didReceiveData:data];
|
||||
}
|
||||
[delegate URLRequest:strongOp didCompleteWithError:error];
|
||||
[delegate URLRequest:weakOp didCompleteWithError:error];
|
||||
}];
|
||||
|
||||
weakOp = op;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#if RCT_ENABLE_INSPECTOR
|
||||
#import "RCTInspectorDevServerHelper.h"
|
||||
#endif
|
||||
#import <React/RCTInitializeUIKitProxies.h>
|
||||
#import <jsinspector-modern/InspectorFlags.h>
|
||||
#import <jsinspector-modern/InspectorInterfaces.h>
|
||||
#import <jsinspector-modern/ReactCdp.h>
|
||||
@@ -511,6 +512,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
|
||||
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];
|
||||
|
||||
RCTExecuteOnMainQueue(^{
|
||||
RCTInitializeUIKitProxies();
|
||||
RCTRegisterReloadCommandListener(self);
|
||||
RCTReloadCommandSetBundleURL(self->_bundleURL);
|
||||
});
|
||||
|
||||
@@ -21,9 +21,9 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^(void){
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(1000),
|
||||
RCTVersionMinor: @(0),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(79),
|
||||
RCTVersionPatch: @(3),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
});
|
||||
|
||||
+18
-4
@@ -170,10 +170,24 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
||||
|
||||
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
||||
{
|
||||
[_viewsToBeMounted addObject:@{
|
||||
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
|
||||
kRCTLegacyInteropChildComponentKey : childComponentView
|
||||
}];
|
||||
if (_adapter && index == _adapter.paperView.reactSubviews.count) {
|
||||
// This is a new child view that is being added to the end of the children array.
|
||||
// After the children is added, we need to call didUpdateReactSubviews to make sure that it is rendered.
|
||||
// Without this change, the new child will not be rendered right away because the didUpdateReactSubviews is not
|
||||
// called and the `finalizeUpdate` is not invoked.
|
||||
if ([childComponentView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
|
||||
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childComponentView).contentView;
|
||||
[_adapter.paperView insertReactSubview:target atIndex:index];
|
||||
} else {
|
||||
[_adapter.paperView insertReactSubview:childComponentView atIndex:index];
|
||||
}
|
||||
[_adapter.paperView didUpdateReactSubviews];
|
||||
} else {
|
||||
[_viewsToBeMounted addObject:@{
|
||||
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
|
||||
kRCTLegacyInteropChildComponentKey : childComponentView
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ using namespace facebook::react;
|
||||
const auto &newSwitchProps = static_cast<const SwitchProps &>(*props);
|
||||
|
||||
// `value`
|
||||
if (oldSwitchProps.value != newSwitchProps.value) {
|
||||
if (!_isInitialValueSet || oldSwitchProps.value != newSwitchProps.value) {
|
||||
BOOL shouldAnimate = _isInitialValueSet == YES;
|
||||
[_switchView setOn:newSwitchProps.value animated:shouldAnimate];
|
||||
}
|
||||
|
||||
+23
-20
@@ -101,11 +101,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
|
||||
[_backedTextInputView.defaultTextAttributes mutableCopy];
|
||||
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
|
||||
eventEmitterWrapper.eventEmitter = _eventEmitter;
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] = eventEmitterWrapper;
|
||||
#endif
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] = RCTWrapEventEmitter(_eventEmitter);
|
||||
|
||||
_backedTextInputView.defaultTextAttributes = defaultAttributes;
|
||||
}
|
||||
@@ -272,10 +268,8 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
if (newTextInputProps.textAttributes != oldTextInputProps.textAttributes) {
|
||||
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
|
||||
RCTNSTextAttributesFromTextAttributes(newTextInputProps.getEffectiveTextAttributes(RCTFontSizeMultiplier()));
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] =
|
||||
_backedTextInputView.defaultTextAttributes[RCTAttributedStringEventEmitterKey];
|
||||
#endif
|
||||
_backedTextInputView.defaultTextAttributes = defaultAttributes;
|
||||
}
|
||||
|
||||
@@ -704,6 +698,11 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
}
|
||||
|
||||
- (void)_restoreTextSelection
|
||||
{
|
||||
[self _restoreTextSelectionAndIgnoreCaretChange:NO];
|
||||
}
|
||||
|
||||
- (void)_restoreTextSelectionAndIgnoreCaretChange:(BOOL)ignore
|
||||
{
|
||||
const auto &selection = static_cast<const TextInputProps &>(*_props).selection;
|
||||
if (!selection.has_value()) {
|
||||
@@ -713,6 +712,9 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
offset:selection->start];
|
||||
auto end = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument offset:selection->end];
|
||||
auto range = [_backedTextInputView textRangeFromPosition:start toPosition:end];
|
||||
if (ignore && range.empty) {
|
||||
return;
|
||||
}
|
||||
[_backedTextInputView setSelectedTextRange:range notifyDelegate:YES];
|
||||
}
|
||||
|
||||
@@ -727,19 +729,20 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
// Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
|
||||
// a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
|
||||
// This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
|
||||
if (selectedRange.empty) {
|
||||
// Maintaining a cursor position relative to the end of the old text.
|
||||
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
|
||||
toPosition:selectedRange.start];
|
||||
NSInteger offsetFromEnd = oldTextLength - offsetStart;
|
||||
NSInteger newOffset = attributedString.string.length - offsetFromEnd;
|
||||
UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
|
||||
offset:newOffset];
|
||||
[_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
|
||||
notifyDelegate:YES];
|
||||
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
|
||||
}
|
||||
[self _restoreTextSelection];
|
||||
// Maintaining a cursor position relative to the end of the old text.
|
||||
NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
|
||||
toPosition:selectedRange.start];
|
||||
NSInteger offsetFromEnd = oldTextLength - offsetStart;
|
||||
NSInteger newOffset = attributedString.string.length - offsetFromEnd;
|
||||
UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
|
||||
offset:newOffset];
|
||||
[_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
|
||||
notifyDelegate:YES];
|
||||
[_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
|
||||
|
||||
// A zero-length selection range can cause the caret position to change on iOS,
|
||||
// and we have already updated the caret position, so we can safely ignore caret changing in this place.
|
||||
[self _restoreTextSelectionAndIgnoreCaretChange:YES];
|
||||
[self _updateTypingAttributes];
|
||||
_lastStringStateWasUpdatedWith = attributedString;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class com/facebook/react/DebugCorePackage$$ReactModuleInfoProvider : com/
|
||||
public abstract class com/facebook/react/HeadlessJsTaskService : android/app/Service, com/facebook/react/jstasks/HeadlessJsTaskEventListener {
|
||||
public static final field Companion Lcom/facebook/react/HeadlessJsTaskService$Companion;
|
||||
public fun <init> ()V
|
||||
public static final fun acquireWakeLockNow (Landroid/content/Context;)V
|
||||
protected final fun getReactContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
protected final fun getReactHost ()Lcom/facebook/react/ReactHost;
|
||||
protected final fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0
|
||||
VERSION_NAME=0.79.3
|
||||
react.internal.publishingGroup=com.facebook.react
|
||||
|
||||
android.useAndroidX=true
|
||||
|
||||
+1
@@ -166,6 +166,7 @@ public abstract class HeadlessJsTaskService : Service(), HeadlessJsTaskEventList
|
||||
* Acquire a wake lock to ensure the device doesn't go to sleep while processing background
|
||||
* tasks.
|
||||
*/
|
||||
@JvmStatic
|
||||
@SuppressLint("WakelockTimeout")
|
||||
public fun acquireWakeLockNow(context: Context) {
|
||||
if (wakeLock == null || wakeLock?.isHeld == false) {
|
||||
|
||||
+2
-1
@@ -11,6 +11,7 @@ import android.app.Activity
|
||||
import android.util.Pair
|
||||
import android.view.View
|
||||
import com.facebook.react.bridge.DefaultJSExceptionHandler
|
||||
import com.facebook.react.bridge.JSExceptionHandler
|
||||
import com.facebook.react.bridge.ReactContext
|
||||
import com.facebook.react.bridge.ReadableArray
|
||||
import com.facebook.react.common.SurfaceDelegate
|
||||
@@ -34,7 +35,7 @@ import java.io.File
|
||||
*/
|
||||
public open class ReleaseDevSupportManager : DevSupportManager {
|
||||
|
||||
private val defaultJSExceptionHandler: DefaultJSExceptionHandler = DefaultJSExceptionHandler()
|
||||
private val defaultJSExceptionHandler: JSExceptionHandler = DefaultJSExceptionHandler()
|
||||
|
||||
public override fun showNewJavaError(message: String?, e: Throwable?): Unit = Unit
|
||||
|
||||
|
||||
+13
-8
@@ -173,7 +173,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
|
||||
@@ -1254,12 +1254,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()
|
||||
@@ -1269,17 +1272,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 FabricUIManagerBinding binding = mBinding;
|
||||
if (binding == null || mDestroyed) {
|
||||
mMountedSurfaceIds.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
for (int surfaceId : mMountedSurfaceIds) {
|
||||
for (int surfaceId : surfaceIdsToReportMount) {
|
||||
binding.reportMount(surfaceId);
|
||||
}
|
||||
|
||||
mMountedSurfaceIds.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+13
-1
@@ -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<<5e27f8a6852293234595697743315ff8>>
|
||||
* @generated SignedSource<<b263bdcbc1258f7d5c56e69732ba9076>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -238,6 +238,12 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = accessor.traceTurboModulePromiseRejectionsOnAndroid()
|
||||
|
||||
/**
|
||||
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = accessor.updateRuntimeShadowNodeReferencesOnCommit()
|
||||
|
||||
/**
|
||||
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
||||
*/
|
||||
@@ -274,6 +280,12 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun useRawPropsJsiValue(): Boolean = accessor.useRawPropsJsiValue()
|
||||
|
||||
/**
|
||||
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun useShadowNodeStateOnClone(): Boolean = accessor.useShadowNodeStateOnClone()
|
||||
|
||||
/**
|
||||
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
|
||||
*/
|
||||
|
||||
+21
-1
@@ -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<<b59cecccbe734a126dcd20f76d0ce7c7>>
|
||||
* @generated SignedSource<<0496ecf3d1e5d8a2e6d4d594aca806d0>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -55,12 +55,14 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var removeTurboModuleManagerDelegateMutexCache: Boolean? = null
|
||||
private var throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOSCache: Boolean? = null
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
||||
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
||||
private var useFabricInteropCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
private var useRawPropsJsiValueCache: Boolean? = null
|
||||
private var useShadowNodeStateOnCloneCache: Boolean? = null
|
||||
private var useTurboModuleInteropCache: Boolean? = null
|
||||
private var useTurboModulesCache: Boolean? = null
|
||||
|
||||
@@ -379,6 +381,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean {
|
||||
var cached = updateRuntimeShadowNodeReferencesOnCommitCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.updateRuntimeShadowNodeReferencesOnCommit()
|
||||
updateRuntimeShadowNodeReferencesOnCommitCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useAlwaysAvailableJSErrorHandling(): Boolean {
|
||||
var cached = useAlwaysAvailableJSErrorHandlingCache
|
||||
if (cached == null) {
|
||||
@@ -433,6 +444,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useShadowNodeStateOnClone(): Boolean {
|
||||
var cached = useShadowNodeStateOnCloneCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.useShadowNodeStateOnClone()
|
||||
useShadowNodeStateOnCloneCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useTurboModuleInterop(): Boolean {
|
||||
var cached = useTurboModuleInteropCache
|
||||
if (cached == null) {
|
||||
|
||||
+5
-1
@@ -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<<08b51adfc7c09f0f26f2b3c8351cda01>>
|
||||
* @generated SignedSource<<c4f3b0cee8b9b4b9cebb589801e1dd15>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -98,6 +98,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useAlwaysAvailableJSErrorHandling(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useEditTextStockAndroidFocusBehavior(): Boolean
|
||||
@@ -110,6 +112,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useRawPropsJsiValue(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useShadowNodeStateOnClone(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean
|
||||
|
||||
+5
-1
@@ -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<<0041e37961e68474a6d092dc0f8a4903>>
|
||||
* @generated SignedSource<<a8900217ae0385947b619c8fa0834942>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -93,6 +93,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
|
||||
|
||||
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
|
||||
|
||||
override fun useAlwaysAvailableJSErrorHandling(): Boolean = false
|
||||
|
||||
override fun useEditTextStockAndroidFocusBehavior(): Boolean = true
|
||||
@@ -105,6 +107,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun useRawPropsJsiValue(): Boolean = false
|
||||
|
||||
override fun useShadowNodeStateOnClone(): Boolean = false
|
||||
|
||||
override fun useTurboModuleInterop(): Boolean = false
|
||||
|
||||
override fun useTurboModules(): Boolean = false
|
||||
|
||||
+23
-1
@@ -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<<e5c1e722f33148fe3aa36ccab62e2293>>
|
||||
* @generated SignedSource<<8f5180a0ef154c083ac38d28e650ee11>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -59,12 +59,14 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var removeTurboModuleManagerDelegateMutexCache: Boolean? = null
|
||||
private var throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOSCache: Boolean? = null
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
|
||||
private var useEditTextStockAndroidFocusBehaviorCache: Boolean? = null
|
||||
private var useFabricInteropCache: Boolean? = null
|
||||
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
|
||||
private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null
|
||||
private var useRawPropsJsiValueCache: Boolean? = null
|
||||
private var useShadowNodeStateOnCloneCache: Boolean? = null
|
||||
private var useTurboModuleInteropCache: Boolean? = null
|
||||
private var useTurboModulesCache: Boolean? = null
|
||||
|
||||
@@ -418,6 +420,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean {
|
||||
var cached = updateRuntimeShadowNodeReferencesOnCommitCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.updateRuntimeShadowNodeReferencesOnCommit()
|
||||
accessedFeatureFlags.add("updateRuntimeShadowNodeReferencesOnCommit")
|
||||
updateRuntimeShadowNodeReferencesOnCommitCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useAlwaysAvailableJSErrorHandling(): Boolean {
|
||||
var cached = useAlwaysAvailableJSErrorHandlingCache
|
||||
if (cached == null) {
|
||||
@@ -478,6 +490,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useShadowNodeStateOnClone(): Boolean {
|
||||
var cached = useShadowNodeStateOnCloneCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.useShadowNodeStateOnClone()
|
||||
accessedFeatureFlags.add("useShadowNodeStateOnClone")
|
||||
useShadowNodeStateOnCloneCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun useTurboModuleInterop(): Boolean {
|
||||
var cached = useTurboModuleInteropCache
|
||||
if (cached == null) {
|
||||
|
||||
+4
@@ -17,4 +17,8 @@ public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
|
||||
override fun enableFabricRenderer(): Boolean = bridgelessEnabled || fabricEnabled
|
||||
|
||||
override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
|
||||
|
||||
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = true
|
||||
|
||||
override fun useShadowNodeStateOnClone(): Boolean = true
|
||||
}
|
||||
|
||||
+5
-1
@@ -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<<9a223b4f79e4612eb193036256bfebc5>>
|
||||
* @generated SignedSource<<33571f99b1f78fbc62cecfca5f8351fa>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -93,6 +93,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
|
||||
|
||||
@DoNotStrip public fun useAlwaysAvailableJSErrorHandling(): Boolean
|
||||
|
||||
@DoNotStrip public fun useEditTextStockAndroidFocusBehavior(): Boolean
|
||||
@@ -105,6 +107,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun useRawPropsJsiValue(): Boolean
|
||||
|
||||
@DoNotStrip public fun useShadowNodeStateOnClone(): Boolean
|
||||
|
||||
@DoNotStrip public fun useTurboModuleInterop(): Boolean
|
||||
|
||||
@DoNotStrip public fun useTurboModules(): Boolean
|
||||
|
||||
+3
-3
@@ -15,8 +15,8 @@ import java.util.Map;
|
||||
|
||||
public class ReactNativeVersion {
|
||||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 1000,
|
||||
"minor", 0,
|
||||
"patch", 0,
|
||||
"major", 0,
|
||||
"minor", 79,
|
||||
"patch", 3,
|
||||
"prerelease", null);
|
||||
}
|
||||
|
||||
+2
-2
@@ -136,10 +136,10 @@ internal data class BorderRadiusStyle(
|
||||
(startStart ?: topStart ?: topLeft ?: uniform)?.resolve(width, height)
|
||||
?: zeroRadii,
|
||||
bottomLeft =
|
||||
(endEnd ?: bottomStart ?: bottomRight ?: uniform)?.resolve(width, height)
|
||||
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.resolve(width, height)
|
||||
?: zeroRadii,
|
||||
bottomRight =
|
||||
(startEnd ?: bottomEnd ?: bottomLeft ?: uniform)?.resolve(width, height)
|
||||
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.resolve(width, height)
|
||||
?: zeroRadii,
|
||||
width = width,
|
||||
height = height,
|
||||
|
||||
-3
@@ -588,9 +588,6 @@ public class ReactViewGroup extends ViewGroup
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
checkViewClippingTag(child, Boolean.TRUE);
|
||||
if (!customDrawOrderDisabled()) {
|
||||
if (indexOfChild(child) == -1) {
|
||||
return;
|
||||
}
|
||||
getDrawingOrderHelper().handleRemoveView(child);
|
||||
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
|
||||
} else {
|
||||
|
||||
+29
-1
@@ -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<<91c1a65790aa5946a354ab8a1966a5f4>>
|
||||
* @generated SignedSource<<83b23039ed9fff5109ff3b532648baac>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -249,6 +249,12 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("updateRuntimeShadowNodeReferencesOnCommit");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useAlwaysAvailableJSErrorHandling() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useAlwaysAvailableJSErrorHandling");
|
||||
@@ -285,6 +291,12 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useShadowNodeStateOnClone() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useShadowNodeStateOnClone");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool useTurboModuleInterop() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useTurboModuleInterop");
|
||||
@@ -476,6 +488,11 @@ bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndr
|
||||
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
|
||||
@@ -506,6 +523,11 @@ bool JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue(
|
||||
return ReactNativeFeatureFlags::useRawPropsJsiValue();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useShadowNodeStateOnClone();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::useTurboModuleInterop();
|
||||
@@ -652,6 +674,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"traceTurboModulePromiseRejectionsOnAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid),
|
||||
makeNativeMethod(
|
||||
"updateRuntimeShadowNodeReferencesOnCommit",
|
||||
JReactNativeFeatureFlagsCxxInterop::updateRuntimeShadowNodeReferencesOnCommit),
|
||||
makeNativeMethod(
|
||||
"useAlwaysAvailableJSErrorHandling",
|
||||
JReactNativeFeatureFlagsCxxInterop::useAlwaysAvailableJSErrorHandling),
|
||||
@@ -670,6 +695,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"useRawPropsJsiValue",
|
||||
JReactNativeFeatureFlagsCxxInterop::useRawPropsJsiValue),
|
||||
makeNativeMethod(
|
||||
"useShadowNodeStateOnClone",
|
||||
JReactNativeFeatureFlagsCxxInterop::useShadowNodeStateOnClone),
|
||||
makeNativeMethod(
|
||||
"useTurboModuleInterop",
|
||||
JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop),
|
||||
|
||||
+7
-1
@@ -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<<610104213a5eba23b797e27377d71b52>>
|
||||
* @generated SignedSource<<efb0288fd19fb35e4582522c835301b4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -135,6 +135,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool traceTurboModulePromiseRejectionsOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool updateRuntimeShadowNodeReferencesOnCommit(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useAlwaysAvailableJSErrorHandling(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
@@ -153,6 +156,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool useRawPropsJsiValue(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useShadowNodeStateOnClone(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool useTurboModuleInterop(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
|
||||
+2
-2
@@ -88,13 +88,13 @@ class BorderRadiusStyleTest {
|
||||
arrayOf(
|
||||
BorderRadiusProp.BORDER_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_RIGHT_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
|
||||
BorderRadiusProp.BORDER_END_END_RADIUS),
|
||||
ComputedBorderRadiusProp.COMPUTED_BORDER_BOTTOM_RIGHT_RADIUS to
|
||||
arrayOf(
|
||||
BorderRadiusProp.BORDER_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_LEFT_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
|
||||
BorderRadiusProp.BORDER_START_END_RADIUS),
|
||||
)
|
||||
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
#define REACT_NATIVE_VERSION_MAJOR 1000
|
||||
#define REACT_NATIVE_VERSION_MINOR 0
|
||||
#define REACT_NATIVE_VERSION_PATCH 0
|
||||
#define REACT_NATIVE_VERSION_MAJOR 0
|
||||
#define REACT_NATIVE_VERSION_MINOR 79
|
||||
#define REACT_NATIVE_VERSION_PATCH 3
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
constexpr struct {
|
||||
int32_t Major = 1000;
|
||||
int32_t Minor = 0;
|
||||
int32_t Patch = 0;
|
||||
int32_t Major = 0;
|
||||
int32_t Minor = 79;
|
||||
int32_t Patch = 3;
|
||||
std::string_view Prerelease = "";
|
||||
} ReactNativeVersion;
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ Pod::Spec.new do |s|
|
||||
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
||||
s.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES",
|
||||
}
|
||||
s.header_dir = "reacthermes"
|
||||
s.dependency "React-cxxreact", version
|
||||
|
||||
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi", version
|
||||
|
||||
s.subspec "Fabric" do |ss|
|
||||
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)" }
|
||||
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)", "DEFINES_MODULE" => "YES" }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,8 +48,11 @@ Pod::Spec.new do |s|
|
||||
s.header_mappings_dir = "./"
|
||||
end
|
||||
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
|
||||
s.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES",
|
||||
}
|
||||
|
||||
s.dependency "React-cxxreact", version
|
||||
s.dependency "React-jsi", version
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <ReactCommon/RuntimeExecutor.h>
|
||||
#include <cxxreact/MessageQueueThread.h>
|
||||
#include <jsi/jsi.h>
|
||||
@@ -72,3 +74,5 @@ class JSIRuntimeHolder : public JSRuntime {
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -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<<3d4eefc7af1e9d594ade8339c261ca01>>
|
||||
* @generated SignedSource<<661a4193f9ba7af0c963bc13751deb15>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -166,6 +166,10 @@ bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() {
|
||||
return getAccessor().traceTurboModulePromiseRejectionsOnAndroid();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() {
|
||||
return getAccessor().updateRuntimeShadowNodeReferencesOnCommit();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() {
|
||||
return getAccessor().useAlwaysAvailableJSErrorHandling();
|
||||
}
|
||||
@@ -190,6 +194,10 @@ bool ReactNativeFeatureFlags::useRawPropsJsiValue() {
|
||||
return getAccessor().useRawPropsJsiValue();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useShadowNodeStateOnClone() {
|
||||
return getAccessor().useShadowNodeStateOnClone();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::useTurboModuleInterop() {
|
||||
return getAccessor().useTurboModuleInterop();
|
||||
}
|
||||
|
||||
@@ -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<<55a526204b386d34058c86183d5b97ac>>
|
||||
* @generated SignedSource<<53e965423f2957b37e0470c607cc45a4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -214,6 +214,11 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool traceTurboModulePromiseRejectionsOnAndroid();
|
||||
|
||||
/**
|
||||
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
|
||||
*/
|
||||
RN_EXPORT static bool updateRuntimeShadowNodeReferencesOnCommit();
|
||||
|
||||
/**
|
||||
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
||||
*/
|
||||
@@ -244,6 +249,11 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool useRawPropsJsiValue();
|
||||
|
||||
/**
|
||||
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
|
||||
*/
|
||||
RN_EXPORT static bool useShadowNodeStateOnClone();
|
||||
|
||||
/**
|
||||
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
|
||||
*/
|
||||
|
||||
+45
-9
@@ -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<<c30a4dea1d32e2838f6e5db6442a3f78>>
|
||||
* @generated SignedSource<<5ff3ac57eb17d9b6642d98f2fc35bd9d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -659,6 +659,24 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit() {
|
||||
auto flagValue = updateRuntimeShadowNodeReferencesOnCommit_.load();
|
||||
|
||||
if (!flagValue.has_value()) {
|
||||
// This block is not exclusive but it is not necessary.
|
||||
// If multiple threads try to initialize the feature flag, we would only
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(35, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
auto flagValue = useAlwaysAvailableJSErrorHandling_.load();
|
||||
|
||||
@@ -668,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(35, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(36, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -686,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(36, "useEditTextStockAndroidFocusBehavior");
|
||||
markFlagAsAccessed(37, "useEditTextStockAndroidFocusBehavior");
|
||||
|
||||
flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior();
|
||||
useEditTextStockAndroidFocusBehavior_ = flagValue;
|
||||
@@ -704,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(37, "useFabricInterop");
|
||||
markFlagAsAccessed(38, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -722,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(39, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -740,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(39, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -758,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(40, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(41, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -767,6 +785,24 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
|
||||
auto flagValue = useShadowNodeStateOnClone_.load();
|
||||
|
||||
if (!flagValue.has_value()) {
|
||||
// This block is not exclusive but it is not necessary.
|
||||
// If multiple threads try to initialize the feature flag, we would only
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(42, "useShadowNodeStateOnClone");
|
||||
|
||||
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
||||
useShadowNodeStateOnClone_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
||||
auto flagValue = useTurboModuleInterop_.load();
|
||||
|
||||
@@ -776,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(41, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(43, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -794,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(42, "useTurboModules");
|
||||
markFlagAsAccessed(44, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
|
||||
+6
-2
@@ -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<<95aa4a8b8859f26b901112df1517b1f1>>
|
||||
* @generated SignedSource<<267385c8df88a5d1eb7f1e2478209d39>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -67,12 +67,14 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool removeTurboModuleManagerDelegateMutex();
|
||||
bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS();
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid();
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit();
|
||||
bool useAlwaysAvailableJSErrorHandling();
|
||||
bool useEditTextStockAndroidFocusBehavior();
|
||||
bool useFabricInterop();
|
||||
bool useNativeViewConfigsInBridgelessMode();
|
||||
bool useOptimizedEventBatchingOnAndroid();
|
||||
bool useRawPropsJsiValue();
|
||||
bool useShadowNodeStateOnClone();
|
||||
bool useTurboModuleInterop();
|
||||
bool useTurboModules();
|
||||
|
||||
@@ -86,7 +88,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 43> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
|
||||
@@ -123,12 +125,14 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> removeTurboModuleManagerDelegateMutex_;
|
||||
std::atomic<std::optional<bool>> throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS_;
|
||||
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
|
||||
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
|
||||
std::atomic<std::optional<bool>> useAlwaysAvailableJSErrorHandling_;
|
||||
std::atomic<std::optional<bool>> useEditTextStockAndroidFocusBehavior_;
|
||||
std::atomic<std::optional<bool>> useFabricInterop_;
|
||||
std::atomic<std::optional<bool>> useNativeViewConfigsInBridgelessMode_;
|
||||
std::atomic<std::optional<bool>> useOptimizedEventBatchingOnAndroid_;
|
||||
std::atomic<std::optional<bool>> useRawPropsJsiValue_;
|
||||
std::atomic<std::optional<bool>> useShadowNodeStateOnClone_;
|
||||
std::atomic<std::optional<bool>> useTurboModuleInterop_;
|
||||
std::atomic<std::optional<bool>> useTurboModules_;
|
||||
};
|
||||
|
||||
+9
-1
@@ -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<<e80434127379886a001ffcbace6ba619>>
|
||||
* @generated SignedSource<<48bb4ea50c42676aee161ea1594a6aec>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -167,6 +167,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useAlwaysAvailableJSErrorHandling() override {
|
||||
return false;
|
||||
}
|
||||
@@ -191,6 +195,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useShadowNodeStateOnClone() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool useTurboModuleInterop() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+19
-1
@@ -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<<21aeeeaa1a402f91b616180114887a58>>
|
||||
* @generated SignedSource<<e92353bf22b82344bc6ab97f08ca724c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -360,6 +360,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::traceTurboModulePromiseRejectionsOnAndroid();
|
||||
}
|
||||
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit() override {
|
||||
auto value = values_["updateRuntimeShadowNodeReferencesOnCommit"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::updateRuntimeShadowNodeReferencesOnCommit();
|
||||
}
|
||||
|
||||
bool useAlwaysAvailableJSErrorHandling() override {
|
||||
auto value = values_["useAlwaysAvailableJSErrorHandling"];
|
||||
if (!value.isNull()) {
|
||||
@@ -414,6 +423,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::useRawPropsJsiValue();
|
||||
}
|
||||
|
||||
bool useShadowNodeStateOnClone() override {
|
||||
auto value = values_["useShadowNodeStateOnClone"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::useShadowNodeStateOnClone();
|
||||
}
|
||||
|
||||
bool useTurboModuleInterop() override {
|
||||
auto value = values_["useTurboModuleInterop"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+3
-1
@@ -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<<b4ba05d9dee950f242db8f3a830a75da>>
|
||||
* @generated SignedSource<<d8f7773c6f24c715a6c0e0ab703677fd>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -60,12 +60,14 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool removeTurboModuleManagerDelegateMutex() = 0;
|
||||
virtual bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS() = 0;
|
||||
virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
|
||||
virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
|
||||
virtual bool useAlwaysAvailableJSErrorHandling() = 0;
|
||||
virtual bool useEditTextStockAndroidFocusBehavior() = 0;
|
||||
virtual bool useFabricInterop() = 0;
|
||||
virtual bool useNativeViewConfigsInBridgelessMode() = 0;
|
||||
virtual bool useOptimizedEventBatchingOnAndroid() = 0;
|
||||
virtual bool useRawPropsJsiValue() = 0;
|
||||
virtual bool useShadowNodeStateOnClone() = 0;
|
||||
virtual bool useTurboModuleInterop() = 0;
|
||||
virtual bool useTurboModules() = 0;
|
||||
};
|
||||
|
||||
+9
@@ -446,6 +446,15 @@ void ObjCInteropTurboModule::setInvocationArg(
|
||||
|
||||
if (objCArgType == @encode(id)) {
|
||||
id arg = RCTConvertTo<id>(selector, objCArg);
|
||||
|
||||
// Handle the special case where there is an argument and it must be nil
|
||||
// Without this check, the JS side will receive an object.
|
||||
// See: discussion at
|
||||
// https://github.com/facebook/react-native/pull/49250#issuecomment-2668465893
|
||||
if (arg == [NSNull null]) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg) {
|
||||
[retainedObjectsForInvocation addObject:arg];
|
||||
}
|
||||
|
||||
+24
-13
@@ -57,7 +57,7 @@ static jsi::Value convertNSNumberToJSINumber(jsi::Runtime &runtime, NSNumber *va
|
||||
|
||||
static jsi::String convertNSStringToJSIString(jsi::Runtime &runtime, NSString *value)
|
||||
{
|
||||
return jsi::String::createFromUtf8(runtime, [value UTF8String] ?: "");
|
||||
return jsi::String::createFromUtf8(runtime, [value UTF8String] ? [value UTF8String] : "");
|
||||
}
|
||||
|
||||
static jsi::Object convertNSDictionaryToJSIObject(jsi::Runtime &runtime, NSDictionary *value)
|
||||
@@ -213,7 +213,11 @@ static jsi::Value createJSRuntimeError(jsi::Runtime &runtime, const std::string
|
||||
/**
|
||||
* Creates JSError with current JS runtime and NSException stack trace.
|
||||
*/
|
||||
static jsi::JSError convertNSExceptionToJSError(jsi::Runtime &runtime, NSException *exception)
|
||||
static jsi::JSError convertNSExceptionToJSError(
|
||||
jsi::Runtime &runtime,
|
||||
NSException *exception,
|
||||
const std::string &moduleName,
|
||||
const std::string &methodName)
|
||||
{
|
||||
std::string reason = [exception.reason UTF8String];
|
||||
|
||||
@@ -224,7 +228,8 @@ static jsi::JSError convertNSExceptionToJSError(jsi::Runtime &runtime, NSExcepti
|
||||
cause.setProperty(
|
||||
runtime, "stackReturnAddresses", convertNSArrayToJSIArray(runtime, exception.callStackReturnAddresses));
|
||||
|
||||
jsi::Value error = createJSRuntimeError(runtime, "Exception in HostFunction: " + reason);
|
||||
std::string message = moduleName + "." + methodName + " raised an exception: " + reason;
|
||||
jsi::Value error = createJSRuntimeError(runtime, message);
|
||||
error.asObject(runtime).setProperty(runtime, "cause", std::move(cause));
|
||||
return {runtime, std::move(error)};
|
||||
}
|
||||
@@ -356,28 +361,34 @@ id ObjCTurboModule::performMethodInvocation(
|
||||
}
|
||||
|
||||
if (isSync) {
|
||||
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodNameStr.c_str());
|
||||
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodName);
|
||||
} else {
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodNameStr.c_str(), asyncCallCounter);
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodName, asyncCallCounter);
|
||||
}
|
||||
|
||||
@try {
|
||||
[inv invokeWithTarget:strongModule];
|
||||
} @catch (NSException *exception) {
|
||||
throw convertNSExceptionToJSError(runtime, exception);
|
||||
if (isSync) {
|
||||
// We can only convert NSException to JSError in sync method calls.
|
||||
// See https://github.com/reactwg/react-native-new-architecture/discussions/276#discussioncomment-12567155
|
||||
throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
|
||||
} else {
|
||||
@throw exception;
|
||||
}
|
||||
} @finally {
|
||||
[retainedObjectsForInvocation removeAllObjects];
|
||||
}
|
||||
|
||||
if (!isSync) {
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodNameStr.c_str(), asyncCallCounter);
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodName, asyncCallCounter);
|
||||
return;
|
||||
}
|
||||
|
||||
void *rawResult;
|
||||
[inv getReturnValue:&rawResult];
|
||||
result = (__bridge id)rawResult;
|
||||
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodNameStr.c_str());
|
||||
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodName);
|
||||
};
|
||||
|
||||
if (isSync) {
|
||||
@@ -419,23 +430,23 @@ void ObjCTurboModule::performVoidMethodInvocation(
|
||||
}
|
||||
|
||||
if (shouldVoidMethodsExecuteSync_) {
|
||||
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodNameStr.c_str());
|
||||
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodName);
|
||||
} else {
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodNameStr.c_str(), asyncCallCounter);
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodName, asyncCallCounter);
|
||||
}
|
||||
|
||||
@try {
|
||||
[inv invokeWithTarget:strongModule];
|
||||
} @catch (NSException *exception) {
|
||||
throw convertNSExceptionToJSError(runtime, exception);
|
||||
throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
|
||||
} @finally {
|
||||
[retainedObjectsForInvocation removeAllObjects];
|
||||
}
|
||||
|
||||
if (shouldVoidMethodsExecuteSync_) {
|
||||
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodNameStr.c_str());
|
||||
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodName);
|
||||
} else {
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodNameStr.c_str(), asyncCallCounter);
|
||||
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodName, asyncCallCounter);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
+13
-12
@@ -493,21 +493,22 @@ typedef struct {
|
||||
|
||||
- (id<RCTModuleProvider>)_moduleProviderForName:(const char *)moduleName
|
||||
{
|
||||
id<RCTModuleProvider> moduleProvider = nil;
|
||||
if ([_delegate respondsToSelector:@selector(getModuleProvider:)]) {
|
||||
id<RCTModuleProvider> moduleProvider = [_delegate getModuleProvider:moduleName];
|
||||
BOOL isTurboModule = [self _isTurboModule:moduleName];
|
||||
if (RCTTurboModuleEnabled() && !isTurboModule && !moduleProvider) {
|
||||
return nil;
|
||||
}
|
||||
moduleProvider = [_delegate getModuleProvider:moduleName];
|
||||
}
|
||||
|
||||
if (moduleProvider) {
|
||||
if ([moduleProvider conformsToProtocol:@protocol(RCTTurboModule)]) {
|
||||
// moduleProvider is also a TM, we need to initialize objectiveC properties, like the dispatch queue
|
||||
return (id<RCTModuleProvider>)[self _provideObjCModule:moduleName moduleProvider:moduleProvider];
|
||||
}
|
||||
// module is Cxx module
|
||||
return moduleProvider;
|
||||
if (RCTTurboModuleInteropEnabled() && ![self _isTurboModule:moduleName] && !moduleProvider) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (moduleProvider) {
|
||||
if ([moduleProvider conformsToProtocol:@protocol(RCTTurboModule)]) {
|
||||
// moduleProvider is also a TM, we need to initialize objectiveC properties, like the dispatch queue
|
||||
return (id<RCTModuleProvider>)[self _provideObjCModule:moduleName moduleProvider:moduleProvider];
|
||||
}
|
||||
// module is Cxx module
|
||||
return moduleProvider;
|
||||
}
|
||||
|
||||
// No module provider, the Module is registered without Codegen
|
||||
|
||||
+11
-1
@@ -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<<651dc228bd4959a90c82de905a8b6c40>>
|
||||
* @generated SignedSource<<76f1f689940817c1df6ace2f8dd062e7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -219,6 +219,11 @@ bool NativeReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid(
|
||||
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling();
|
||||
@@ -249,6 +254,11 @@ bool NativeReactNativeFeatureFlags::useRawPropsJsiValue(
|
||||
return ReactNativeFeatureFlags::useRawPropsJsiValue();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useShadowNodeStateOnClone(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useShadowNodeStateOnClone();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::useTurboModuleInterop(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::useTurboModuleInterop();
|
||||
|
||||
+5
-1
@@ -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<<1a082675338773d1a6259fabfd2f652f>>
|
||||
* @generated SignedSource<<af8c15575ff94feff9dadaaf8becdf18>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -107,6 +107,8 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime& runtime);
|
||||
|
||||
bool useAlwaysAvailableJSErrorHandling(jsi::Runtime& runtime);
|
||||
|
||||
bool useEditTextStockAndroidFocusBehavior(jsi::Runtime& runtime);
|
||||
@@ -119,6 +121,8 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool useRawPropsJsiValue(jsi::Runtime& runtime);
|
||||
|
||||
bool useShadowNodeStateOnClone(jsi::Runtime& runtime);
|
||||
|
||||
bool useTurboModuleInterop(jsi::Runtime& runtime);
|
||||
|
||||
bool useTurboModules(jsi::Runtime& runtime);
|
||||
|
||||
@@ -112,7 +112,9 @@ ShadowNode::ShadowNode(
|
||||
fragment.children ? fragment.children : sourceShadowNode.children_),
|
||||
state_(
|
||||
fragment.state ? fragment.state
|
||||
: sourceShadowNode.getMostRecentState()),
|
||||
: (ReactNativeFeatureFlags::useShadowNodeStateOnClone()
|
||||
? sourceShadowNode.state_
|
||||
: sourceShadowNode.getMostRecentState())),
|
||||
orderIndex_(sourceShadowNode.orderIndex_),
|
||||
family_(sourceShadowNode.family_),
|
||||
traits_(sourceShadowNode.traits_) {
|
||||
@@ -308,20 +310,28 @@ void ShadowNode::setRuntimeShadowNodeReference(
|
||||
runtimeShadowNodeReference_ = runtimeShadowNodeReference;
|
||||
}
|
||||
|
||||
void ShadowNode::transferRuntimeShadowNodeReference(
|
||||
void ShadowNode::updateRuntimeShadowNodeReference(
|
||||
const Shared& destinationShadowNode) const {
|
||||
destinationShadowNode->runtimeShadowNodeReference_ =
|
||||
runtimeShadowNodeReference_;
|
||||
|
||||
if (auto reference = runtimeShadowNodeReference_.lock()) {
|
||||
reference->shadowNode = destinationShadowNode;
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowNode::transferRuntimeShadowNodeReference(
|
||||
const Shared& destinationShadowNode) const {
|
||||
destinationShadowNode->runtimeShadowNodeReference_ =
|
||||
runtimeShadowNodeReference_;
|
||||
|
||||
if (!ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit()) {
|
||||
updateRuntimeShadowNodeReference(destinationShadowNode);
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowNode::transferRuntimeShadowNodeReference(
|
||||
const Shared& destinationShadowNode,
|
||||
const ShadowNodeFragment& fragment) const {
|
||||
if (useRuntimeShadowNodeReferenceUpdateOnThread &&
|
||||
if ((ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit() ||
|
||||
useRuntimeShadowNodeReferenceUpdateOnThread) &&
|
||||
fragment.runtimeShadowNodeReference) {
|
||||
transferRuntimeShadowNodeReference(destinationShadowNode);
|
||||
}
|
||||
|
||||
@@ -187,6 +187,12 @@ class ShadowNode : public Sealable,
|
||||
void setRuntimeShadowNodeReference(const std::shared_ptr<ShadowNodeWrapper>&
|
||||
runtimeShadowNodeReference) const;
|
||||
|
||||
/*
|
||||
* Update the runtime reference to point to the provided shadow node.
|
||||
*/
|
||||
void updateRuntimeShadowNodeReference(
|
||||
const Shared& destinationShadowNode) const;
|
||||
|
||||
/*
|
||||
* Transfer the runtime reference to this `ShadowNode` to a new instance,
|
||||
* updating the reference to point to the new `ShadowNode` referencing it.
|
||||
|
||||
@@ -36,7 +36,9 @@ Pod::Spec.new do |s|
|
||||
s.exclude_files = "tests"
|
||||
s.pod_target_xcconfig = {
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
||||
"DEFINES_MODULE" => "YES",
|
||||
}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
s.module_name = "React_renderercss"
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "updateMountedFlag.h"
|
||||
|
||||
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
||||
|
||||
namespace facebook::react {
|
||||
void updateMountedFlag(
|
||||
const ShadowNode::ListOfShared& oldChildren,
|
||||
@@ -47,6 +49,10 @@ void updateMountedFlag(
|
||||
newChild->setMounted(true);
|
||||
oldChild->setMounted(false);
|
||||
|
||||
if (ReactNativeFeatureFlags::updateRuntimeShadowNodeReferencesOnCommit()) {
|
||||
newChild->updateRuntimeShadowNodeReference(newChild);
|
||||
}
|
||||
|
||||
updateMountedFlag(oldChild->getChildren(), newChild->getChildren());
|
||||
}
|
||||
|
||||
|
||||
+24
-3
@@ -52,8 +52,29 @@ BOOL RCTIsAttributedStringEffectivelySame(
|
||||
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes,
|
||||
const facebook::react::TextAttributes &baseTextAttributes);
|
||||
|
||||
@interface RCTWeakEventEmitterWrapper : NSObject
|
||||
@property (nonatomic, assign) facebook::react::SharedEventEmitter eventEmitter;
|
||||
@end
|
||||
static inline NSData *RCTWrapEventEmitter(const facebook::react::SharedEventEmitter &eventEmitter)
|
||||
{
|
||||
auto eventEmitterPtr = new std::weak_ptr<const facebook::react::EventEmitter>(eventEmitter);
|
||||
return [[NSData alloc] initWithBytesNoCopy:eventEmitterPtr
|
||||
length:sizeof(eventEmitterPtr)
|
||||
deallocator:^(void *ptrToDelete, NSUInteger) {
|
||||
delete (std::weak_ptr<facebook::react::EventEmitter> *)ptrToDelete;
|
||||
}];
|
||||
}
|
||||
|
||||
static inline facebook::react::SharedEventEmitter RCTUnwrapEventEmitter(NSData *data)
|
||||
{
|
||||
if (data.length == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto weakPtr = dynamic_cast<std::weak_ptr<const facebook::react::EventEmitter> *>(
|
||||
(std::weak_ptr<const facebook::react::EventEmitter> *)data.bytes);
|
||||
if (weakPtr) {
|
||||
return weakPtr->lock();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
+1
-43
@@ -16,45 +16,6 @@
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
@implementation RCTWeakEventEmitterWrapper {
|
||||
std::weak_ptr<const EventEmitter> _weakEventEmitter;
|
||||
}
|
||||
|
||||
- (void)setEventEmitter:(SharedEventEmitter)eventEmitter
|
||||
{
|
||||
_weakEventEmitter = eventEmitter;
|
||||
}
|
||||
|
||||
- (SharedEventEmitter)eventEmitter
|
||||
{
|
||||
return _weakEventEmitter.lock();
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
_weakEventEmitter.reset();
|
||||
}
|
||||
|
||||
- (BOOL)isEqual:(id)object
|
||||
{
|
||||
// We consider the underlying EventEmitter as the identity
|
||||
if (![object isKindOfClass:[self class]]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
auto thisEventEmitter = [self eventEmitter];
|
||||
auto otherEventEmitter = [((RCTWeakEventEmitterWrapper *)object) eventEmitter];
|
||||
return thisEventEmitter == otherEventEmitter;
|
||||
}
|
||||
|
||||
- (NSUInteger)hash
|
||||
{
|
||||
// We consider the underlying EventEmitter as the identity
|
||||
return (NSUInteger)_weakEventEmitter.lock().get();
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
inline static UIFontWeight RCTUIFontWeightFromInteger(NSInteger fontWeight)
|
||||
{
|
||||
assert(fontWeight > 50);
|
||||
@@ -409,10 +370,8 @@ static NSMutableAttributedString *RCTNSAttributedStringFragmentWithAttributesFro
|
||||
{
|
||||
auto nsAttributedStringFragment = RCTNSAttributedStringFragmentFromFragment(fragment, placeholderImage);
|
||||
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
if (fragment.parentShadowView.componentHandle) {
|
||||
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
|
||||
eventEmitterWrapper.eventEmitter = fragment.parentShadowView.eventEmitter;
|
||||
auto eventEmitterWrapper = RCTWrapEventEmitter(fragment.parentShadowView.eventEmitter);
|
||||
|
||||
NSDictionary<NSAttributedStringKey, id> *additionalTextAttributes =
|
||||
@{RCTAttributedStringEventEmitterKey : eventEmitterWrapper};
|
||||
@@ -420,7 +379,6 @@ static NSMutableAttributedString *RCTNSAttributedStringFragmentWithAttributesFro
|
||||
[nsAttributedStringFragment addAttributes:additionalTextAttributes
|
||||
range:NSMakeRange(0, nsAttributedStringFragment.length)];
|
||||
}
|
||||
#endif
|
||||
|
||||
return nsAttributedStringFragment;
|
||||
}
|
||||
|
||||
+4
-5
@@ -280,11 +280,10 @@ static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(EllipsizeMode ellipsi
|
||||
// after (fraction == 1.0) the last character, then the attribute is valid.
|
||||
if (textStorage.length > 0 && (fraction > 0 || characterIndex > 0) &&
|
||||
(fraction < 1 || characterIndex < textStorage.length - 1)) {
|
||||
RCTWeakEventEmitterWrapper *eventEmitterWrapper =
|
||||
(RCTWeakEventEmitterWrapper *)[textStorage attribute:RCTAttributedStringEventEmitterKey
|
||||
atIndex:characterIndex
|
||||
effectiveRange:NULL];
|
||||
return eventEmitterWrapper.eventEmitter;
|
||||
NSData *eventEmitterWrapper = (NSData *)[textStorage attribute:RCTAttributedStringEventEmitterKey
|
||||
atIndex:characterIndex
|
||||
effectiveRange:NULL];
|
||||
return RCTUnwrapEventEmitter(eventEmitterWrapper);
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
@@ -242,8 +242,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
|
||||
}
|
||||
|
||||
if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
|
||||
// Do not throw any error to match web spec
|
||||
return timerIndex_++;
|
||||
// Do not throw any error to match web spec; instead return 0, an
|
||||
// invalid timer id
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto callback = args[0].getObject(rt).getFunction(rt);
|
||||
@@ -300,8 +301,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
|
||||
}
|
||||
|
||||
if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
|
||||
throw jsi::JSError(
|
||||
rt, "The first argument to setInterval must be a function.");
|
||||
// Do not throw any error to match web spec; instead return 0, an
|
||||
// invalid timer id
|
||||
return 0;
|
||||
}
|
||||
auto callback = args[0].getObject(rt).getFunction(rt);
|
||||
auto delay = count > 1
|
||||
|
||||
@@ -93,7 +93,9 @@ class TimerManager {
|
||||
|
||||
// Each timeout that is registered on this queue gets a sequential id. This
|
||||
// is the global count from which those are assigned.
|
||||
TimerHandle timerIndex_{0};
|
||||
// As per WHATWG HTML 8.6.1 (Timers) ids must be greater than zero, i.e. start
|
||||
// at 1
|
||||
TimerHandle timerIndex_{1};
|
||||
|
||||
// The React Native microtask queue is used to back public APIs including
|
||||
// `queueMicrotask`, `clearImmediate`, and `setImmediate` (which is used by
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user