mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
105
Commits
+1
-1
@@ -104,4 +104,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.274.2
|
||||
^0.275.0
|
||||
|
||||
@@ -15,8 +15,6 @@ runs:
|
||||
steps:
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Restore Cached Artifacts
|
||||
@@ -45,6 +43,8 @@ runs:
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
|
||||
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Yarn- Install Dependencies
|
||||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
|
||||
uses: ./.github/actions/yarn-install
|
||||
|
||||
@@ -14,23 +14,23 @@ runs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: hermes-workspace
|
||||
path: 'D:\tmp\hermes'
|
||||
path: 'C:\tmp\hermes'
|
||||
- name: Set up workspace
|
||||
shell: powershell
|
||||
run: |
|
||||
mkdir -p D:\tmp\hermes\osx-bin
|
||||
mkdir -p C:\tmp\hermes\osx-bin
|
||||
mkdir -p .\packages\react-native\sdks\hermes
|
||||
cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
|
||||
cp -r -Force C:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
|
||||
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
|
||||
- name: Windows cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
|
||||
path: |
|
||||
D:\tmp\hermes\win64-bin\
|
||||
D:\tmp\hermes\hermes\icu\
|
||||
D:\tmp\hermes\hermes\deps\
|
||||
D:\tmp\hermes\hermes\build_release\
|
||||
C:\tmp\hermes\win64-bin\
|
||||
C:\tmp\hermes\hermes\icu\
|
||||
C:\tmp\hermes\hermes\deps\
|
||||
C:\tmp\hermes\hermes\build_release\
|
||||
- name: setup-msbuild
|
||||
uses: microsoft/setup-msbuild@v1.3.2
|
||||
- name: Set up workspace
|
||||
@@ -83,4 +83,4 @@ runs:
|
||||
uses: actions/upload-artifact@v4.3.4
|
||||
with:
|
||||
name: hermes-win64-bin
|
||||
path: D:\tmp\hermes\win64-bin\
|
||||
path: C:\tmp\hermes\win64-bin\
|
||||
|
||||
@@ -116,12 +116,12 @@ runs:
|
||||
- name: Print Artifacts Directory
|
||||
shell: bash
|
||||
run: ls -lR ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Setup gradle
|
||||
uses: ./.github/actions/setup-gradle
|
||||
with:
|
||||
cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }}
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Build packages
|
||||
|
||||
@@ -14,6 +14,8 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Yarn install
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Configure Git
|
||||
|
||||
@@ -35,6 +35,8 @@ runs:
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Run yarn install
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Start Metro in Debug
|
||||
|
||||
@@ -17,9 +17,6 @@ outputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
|
||||
- name: Setup hermes version
|
||||
shell: bash
|
||||
id: hermes-version
|
||||
@@ -67,6 +64,8 @@ runs:
|
||||
echo "HERMES_CACHED=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Yarn- Install Dependencies
|
||||
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
|
||||
uses: ./.github/actions/yarn-install
|
||||
|
||||
@@ -4,7 +4,7 @@ inputs:
|
||||
node-version:
|
||||
description: 'The node.js version to use'
|
||||
required: false
|
||||
default: '22'
|
||||
default: '22.14.0'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
@@ -23,6 +23,8 @@ runs:
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Run yarn install
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Create Hermes folder
|
||||
shell: bash
|
||||
run: mkdir -p "$HERMES_WS_DIR"
|
||||
@@ -34,8 +36,6 @@ runs:
|
||||
- name: Print Downloaded hermes
|
||||
shell: bash
|
||||
run: ls -lR "$HERMES_WS_DIR"
|
||||
- name: Run yarn
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
|
||||
expect(mockSleep).toHaveBeenCalledTimes(1);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
|
||||
expect(mockSleep).toHaveBeenCalledTimes(1);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
|
||||
expect(mockSleep).toHaveBeenCalledTimes(0);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ describe('#verifyArtifactsAreOnMaven', () => {
|
||||
expect(mockSleep).toHaveBeenCalledTimes(90);
|
||||
expect(mockExit).toHaveBeenCalledWith(1);
|
||||
expect(mockFetch).toHaveBeenCalledWith(
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1',
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.78.1/react-native-artifacts-0.78.1.pom',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,13 +13,14 @@ const SLEEP_S = 60; // 1 minute
|
||||
const MAX_RETRIES = 90; // 90 attempts. Waiting between attempt: 1 min. Total time: 90 min.
|
||||
const ARTIFACT_URL =
|
||||
'https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/';
|
||||
const ARTIFACT_NAME = 'react-native-artifacts-';
|
||||
|
||||
async function verifyArtifactsAreOnMaven(version, retries = MAX_RETRIES) {
|
||||
if (version.startsWith('v')) {
|
||||
version = version.substring(1);
|
||||
}
|
||||
|
||||
const artifactUrl = `${ARTIFACT_URL}${version}`;
|
||||
const artifactUrl = `${ARTIFACT_URL}${version}/${ARTIFACT_NAME}${version}.pom`;
|
||||
for (let currentAttempt = 1; currentAttempt <= retries; currentAttempt++) {
|
||||
const response = await fetch(artifactUrl);
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ jobs:
|
||||
run: |
|
||||
git config --local user.email "bot@reactnative.dev"
|
||||
git config --local user.name "React Native Bot"
|
||||
- name: Setup xcode
|
||||
uses: ./.github/actions/setup-xcode
|
||||
with:
|
||||
xcode-version: '16.2.0'
|
||||
- name: Extract branch name
|
||||
run: |
|
||||
TAG="${{ github.ref_name }}";
|
||||
|
||||
@@ -128,9 +128,9 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
HERMES_WS_DIR: 'C:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
id: restore-ios-slice
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
path: packages/react-native/
|
||||
- name: Setup node.js
|
||||
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
# Move the XCFramework in the destination directory
|
||||
mv /tmp/third-party/packages/react-native/third-party/ReactNativeDependencies.xcframework packages/react-native/third-party/ReactNativeDependencies.xcframework
|
||||
|
||||
VERSION=$(jq -r '.version' package.json)
|
||||
VERSION=$(jq -r '.version' packages/react-native/package.json)
|
||||
echo "$VERSION-${{matrix.flavor}}" > "packages/react-native/third-party/version.txt"
|
||||
cat "packages/react-native/third-party/version.txt"
|
||||
# Check destination directory
|
||||
@@ -117,7 +117,7 @@ jobs:
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
|
||||
with:
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
key: v3-ios-core-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
path: |
|
||||
packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products
|
||||
packages/react-native/.build/headers
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: packages/react-native/.build/output/xcframeworks
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
- name: Setup node.js
|
||||
if: steps.restore-ios-xcframework.outputs.cache-hit != 'true'
|
||||
uses: ./.github/actions/setup-node
|
||||
@@ -209,4 +209,4 @@ jobs:
|
||||
path: |
|
||||
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.xcframework.tar.gz
|
||||
packages/react-native/.build/output/xcframeworks/ReactCore${{matrix.flavor}}.framework.dSYM.tar.gz
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift') }}-${{ hashFiles('packages/react-native/scripts/ios-prebuild/setup.js') }}
|
||||
key: v2-ios-core-xcframework-${{ matrix.flavor }}-${{ hashFiles('packages/react-native/Package.swift', 'packages/react-native/scripts/ios-prebuild/*.js', 'packages/react-native/scripts/ios-prebuild.js', 'packages/react-native/React/**/*', 'packages/react-native/ReactCommon/**/*', 'packages/react-native/Libraries/**/*') }}
|
||||
|
||||
@@ -179,8 +179,9 @@ jobs:
|
||||
- name: Compress and Rename dSYM
|
||||
if: steps.restore-xcframework.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tar -cz -f packages/react-native/third-party/Symbols/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz \
|
||||
packages/react-native/third-party/Symbols/ReactNativeDependencies.framework.dSYM
|
||||
cd packages/react-native/third-party/Symbols/
|
||||
tar -cz -f ../ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz .
|
||||
mv ../ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz ./ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
|
||||
- name: Upload XCFramework Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -125,9 +125,9 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
HERMES_WS_DIR: 'C:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
|
||||
@@ -392,9 +392,9 @@ jobs:
|
||||
runs-on: windows-2025
|
||||
needs: prepare_hermes_workspace
|
||||
env:
|
||||
HERMES_WS_DIR: 'D:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin'
|
||||
HERMES_WS_DIR: 'C:\tmp\hermes'
|
||||
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
|
||||
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
|
||||
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
||||
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
||||
CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
||||
@@ -593,7 +593,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ["24", "22"]
|
||||
node-version: ["24.4.1", "22", "20.19.4"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+8
-8
@@ -26,8 +26,8 @@
|
||||
"set-version": "node ./scripts/releases/set-version.js",
|
||||
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
|
||||
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
|
||||
"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-release-local-clean": "node ./scripts/release-testing/test-release-local-clean.js",
|
||||
"test-release-local": "node ./scripts/release-testing/test-release-local.js",
|
||||
"test-ios": "./scripts/objc-test.sh test",
|
||||
"test-typescript": "tsc -p packages/react-native/types/tsconfig.json",
|
||||
"test-generated-typescript": "tsc -p packages/react-native/types_generated/tsconfig.test.json",
|
||||
@@ -52,8 +52,8 @@
|
||||
"@electron/packager": "^18.3.6",
|
||||
"@jest/create-cache-key-function": "^29.7.0",
|
||||
"@microsoft/api-extractor": "^7.52.2",
|
||||
"@react-native/metro-babel-transformer": "0.81.0-main",
|
||||
"@react-native/metro-config": "0.81.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.81.1",
|
||||
"@react-native/metro-config": "0.81.1",
|
||||
"@tsconfig/node22": "22.0.2",
|
||||
"@types/react": "^19.1.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
@@ -78,7 +78,7 @@
|
||||
"eslint-plugin-redundant-undefined": "^0.4.0",
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"flow-api-translator": "0.29.1",
|
||||
"flow-bin": "^0.274.2",
|
||||
"flow-bin": "^0.275.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.29.1",
|
||||
"hermes-transform": "0.29.1",
|
||||
@@ -90,9 +90,9 @@
|
||||
"jest-snapshot": "^29.7.0",
|
||||
"markdownlint-cli2": "^0.17.2",
|
||||
"markdownlint-rule-relative-links": "^3.0.0",
|
||||
"metro-babel-register": "^0.82.4",
|
||||
"metro-memory-fs": "^0.82.4",
|
||||
"metro-transform-plugins": "^0.82.4",
|
||||
"metro-babel-register": "^0.83.1",
|
||||
"metro-memory-fs": "^0.82.5",
|
||||
"metro-transform-plugins": "^0.83.1",
|
||||
"micromatch": "^4.0.4",
|
||||
"node-fetch": "^2.2.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -17,7 +17,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"files": [
|
||||
"path-support.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -19,14 +19,14 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/traverse": "^7.25.3",
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.81.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,16 +22,16 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.81.0-main",
|
||||
"@react-native/dev-middleware": "0.81.1",
|
||||
"debug": "^4.4.0",
|
||||
"invariant": "^2.2.4",
|
||||
"metro": "^0.82.4",
|
||||
"metro-config": "^0.82.4",
|
||||
"metro-core": "^0.82.4",
|
||||
"metro": "^0.83.1",
|
||||
"metro-config": "^0.83.1",
|
||||
"metro-core": "^0.83.1",
|
||||
"semver": "^7.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"metro-resolver": "^0.82.4"
|
||||
"metro-resolver": "^0.83.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/cli": "*",
|
||||
@@ -40,9 +40,12 @@
|
||||
"peerDependenciesMeta": {
|
||||
"@react-native-community/cli": {
|
||||
"optional": true
|
||||
},
|
||||
"@react-native/metro-config": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ async function runServer(
|
||||
// $FlowIgnore[cannot-write] Assigning to readonly property
|
||||
metroConfig.reporter = reporter;
|
||||
|
||||
const serverInstance = await Metro.runServer(metroConfig, {
|
||||
const {httpServer: serverInstance} = await Metro.runServer(metroConfig, {
|
||||
host: args.host,
|
||||
secure: args.https,
|
||||
secureCert: args.cert,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
@@ -21,7 +21,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -76,9 +76,8 @@ function getNodePackagePath(packageName: string): string {
|
||||
}
|
||||
|
||||
function metro(...args: $ReadOnlyArray<string>): ExecaPromise {
|
||||
const metroPath = getNodePackagePath(path.join('metro', 'src', 'cli.js'));
|
||||
log(`🚇 ${metroPath} ${args.join(' ')} `);
|
||||
return execa('node', [metroPath, ...args]);
|
||||
log(`🚇 metro ${args.join(' ')} `);
|
||||
return execa('npx', ['--offline', 'metro', ...args]);
|
||||
}
|
||||
|
||||
export const tasks = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<634e06e29a06ec6a22c087e7f8b01796>>
|
||||
Git revision: 35c4630bd58bbcbc6f4c54c084b4e52994dc4940
|
||||
@generated SignedSource<<8c4db6a5e1ba269169ac93cc53f95538>>
|
||||
Git revision: 51a91a2ad62e7f585912ed314a350a72de84d6ed
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
|
||||
+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
Vendored
+6
-6
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -20,6 +20,6 @@
|
||||
"BUILD_INFO"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-shell",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0",
|
||||
"node": ">= 20.19.4",
|
||||
"electron": ">=36.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"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.81.0-main",
|
||||
"@react-native/debugger-frontend": "0.81.1",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
@@ -35,7 +35,7 @@
|
||||
"ws": "^6.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"selfsigned": "^2.4.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -16,13 +16,13 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@react-native/eslint-plugin": "0.81.0-main",
|
||||
"@react-native/eslint-plugin": "0.81.1",
|
||||
"@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.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,6 +22,6 @@
|
||||
"hermes-eslint": "0.29.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"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.81.0-main",
|
||||
"@react-native/codegen": "0.81.1",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
@@ -36,6 +36,6 @@
|
||||
"hermes-eslint": "0.29.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./gradlew build",
|
||||
|
||||
+2
-2
@@ -100,10 +100,10 @@ abstract class ReactExtension @Inject constructor(val project: Project) {
|
||||
* Allows to specify the debuggable variants (by default just 'debug'). Variants in this list will
|
||||
* not be bundled (the bundle file will not be created and won't be copied over).
|
||||
*
|
||||
* Default: ['debug']
|
||||
* Default: ['debug', 'debugOptimized']
|
||||
*/
|
||||
val debuggableVariants: ListProperty<String> =
|
||||
objects.listProperty(String::class.java).convention(listOf("debug"))
|
||||
objects.listProperty(String::class.java).convention(listOf("debug", "debugOptimized"))
|
||||
|
||||
/** Hermes Config */
|
||||
|
||||
|
||||
+2
@@ -18,6 +18,7 @@ import com.facebook.react.tasks.GenerateEntryPointTask
|
||||
import com.facebook.react.tasks.GeneratePackageListTask
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForApp
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForLibraries
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildTypesForApp
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureDevServerLocation
|
||||
import com.facebook.react.utils.AgpConfiguratorUtils.configureNamespaceForLibraries
|
||||
import com.facebook.react.utils.BackwardCompatUtils.configureBackwardCompatibilityReactMap
|
||||
@@ -84,6 +85,7 @@ class ReactPlugin : Plugin<Project> {
|
||||
configureAutolinking(project, extension)
|
||||
configureCodegen(project, extension, rootExtension, isLibrary = false)
|
||||
configureResources(project, extension)
|
||||
configureBuildTypesForApp(project)
|
||||
}
|
||||
|
||||
// Library Only Configuration
|
||||
|
||||
+16
@@ -26,5 +26,21 @@ class ReactRootProjectPlugin : Plugin<Project> {
|
||||
it.evaluationDependsOn(":app")
|
||||
}
|
||||
}
|
||||
// We need to make sure that `:app:preBuild` task depends on all other subprojects' preBuild
|
||||
// tasks. This is necessary in order to have all the codegen generated code before the CMake
|
||||
// configuration build kicks in.
|
||||
project.gradle.projectsEvaluated {
|
||||
val appProject = project.rootProject.subprojects.find { it.name == "app" }
|
||||
val appPreBuild = appProject?.tasks?.findByName("preBuild")
|
||||
if (appPreBuild != null) {
|
||||
// Find all other subprojects' preBuild tasks
|
||||
val otherPreBuildTasks =
|
||||
project.rootProject.subprojects
|
||||
.filter { it != appProject }
|
||||
.mapNotNull { it.tasks.findByName("preBuild") }
|
||||
// Make :app:preBuild depend on all others
|
||||
appPreBuild.dependsOn(otherPreBuildTasks)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -148,6 +148,7 @@ abstract class GeneratePackageListTask : DefaultTask() {
|
||||
|
||||
{{ packageImports }}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
|
||||
+31
@@ -19,6 +19,7 @@ import java.net.Inet4Address
|
||||
import java.net.NetworkInterface
|
||||
import javax.xml.parsers.DocumentBuilder
|
||||
import javax.xml.parsers.DocumentBuilderFactory
|
||||
import kotlin.plus
|
||||
import org.gradle.api.Action
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.AppliedPlugin
|
||||
@@ -27,6 +28,36 @@ import org.w3c.dom.Element
|
||||
@Suppress("UnstableApiUsage")
|
||||
internal object AgpConfiguratorUtils {
|
||||
|
||||
fun configureBuildTypesForApp(project: Project) {
|
||||
val action =
|
||||
Action<AppliedPlugin> {
|
||||
project.extensions
|
||||
.getByType(ApplicationAndroidComponentsExtension::class.java)
|
||||
.finalizeDsl { ext ->
|
||||
ext.buildTypes {
|
||||
val debug =
|
||||
getByName("debug").apply {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||
}
|
||||
getByName("release").apply {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||
}
|
||||
maybeCreate("debugOptimized").apply {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||
initWith(debug)
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments("-DCMAKE_BUILD_TYPE=Release")
|
||||
matchingFallbacks += listOf("release")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
project.pluginManager.withPlugin("com.android.application", action)
|
||||
}
|
||||
|
||||
fun configureBuildConfigFieldsForApp(project: Project, extension: ReactExtension) {
|
||||
val action =
|
||||
Action<AppliedPlugin> {
|
||||
|
||||
+3
-1
@@ -233,6 +233,7 @@ class GeneratePackageListTaskTest {
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
@@ -311,7 +312,8 @@ class GeneratePackageListTaskTest {
|
||||
import com.facebook.react.aPackage;
|
||||
// @react-native/another-package
|
||||
import com.facebook.react.anotherPackage;
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PackageList {
|
||||
private Application application;
|
||||
private ReactNativeHost reactNativeHost;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
@@ -26,9 +26,9 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.81.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.81.0-main",
|
||||
"metro-config": "^0.82.4",
|
||||
"metro-runtime": "^0.82.4"
|
||||
"@react-native/js-polyfills": "0.81.1",
|
||||
"@react-native/metro-babel-transformer": "0.81.1",
|
||||
"metro-config": "^0.83.1",
|
||||
"metro-runtime": "^0.83.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/new-app-screen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "NewAppScreen component for React Native",
|
||||
"keywords": [
|
||||
"react-native"
|
||||
@@ -30,6 +30,6 @@
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,7 @@ import {ThemedText, useTheme} from './Theme';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Image,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableHighlight,
|
||||
@@ -29,24 +26,32 @@ import {version as ReactNativeVersion} from 'react-native/Libraries/Core/ReactNa
|
||||
|
||||
export type NewAppScreenProps = $ReadOnly<{
|
||||
templateFileName?: string,
|
||||
safeAreaInsets?: $ReadOnly<{
|
||||
top: number,
|
||||
bottom: number,
|
||||
left: number,
|
||||
right: number,
|
||||
}>,
|
||||
}>;
|
||||
|
||||
const statusBarHeightOffset = Platform.select({
|
||||
android: StatusBar.currentHeight || 0,
|
||||
default: 0,
|
||||
});
|
||||
|
||||
export default function NewAppScreen({
|
||||
templateFileName = 'App.tsx',
|
||||
safeAreaInsets = {top: 0, bottom: 0, left: 0, right: 0},
|
||||
}: NewAppScreenProps): React.Node {
|
||||
const {colors} = useTheme();
|
||||
const isDarkMode = useColorScheme() === 'dark';
|
||||
const isLargeScreen = useWindowDimensions().width > 600;
|
||||
|
||||
return (
|
||||
<SafeAreaView style={{backgroundColor: colors.background}}>
|
||||
<ScrollView>
|
||||
<View style={[styles.container, {paddingTop: statusBarHeightOffset}]}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: colors.background,
|
||||
paddingTop: safeAreaInsets.top,
|
||||
paddingLeft: safeAreaInsets.left,
|
||||
paddingRight: safeAreaInsets.right,
|
||||
}}>
|
||||
<ScrollView style={{paddingBottom: safeAreaInsets.bottom}}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.header}>
|
||||
<Image
|
||||
style={styles.logo}
|
||||
@@ -99,7 +104,7 @@ export default function NewAppScreen({
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -11,6 +11,14 @@ import type * as React from 'react';
|
||||
|
||||
export type NewAppScreenProps = Readonly<{
|
||||
templateFileName?: string | undefined;
|
||||
safeAreaInsets?:
|
||||
| Readonly<{
|
||||
top: number;
|
||||
bottom: number;
|
||||
left: number;
|
||||
right: number;
|
||||
}>
|
||||
| undefined;
|
||||
}>;
|
||||
|
||||
export function NewAppScreen(props: NewAppScreenProps): React.ReactNode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"files": [
|
||||
"console.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Babel preset for React Native applications",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -13,7 +13,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"files": [
|
||||
@@ -66,7 +66,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.81.0-main",
|
||||
"@react-native/babel-plugin-codegen": "0.81.1",
|
||||
"babel-plugin-syntax-hermes-parser": "0.29.1",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"react-refresh": "^0.14.0"
|
||||
|
||||
+22
-14
@@ -38,19 +38,6 @@ function isFirstParty(fileName) {
|
||||
// use `this.foo = bar` instead of `this.defineProperty('foo', ...)`
|
||||
const loose = true;
|
||||
|
||||
const defaultPlugins = [
|
||||
[require('babel-plugin-syntax-hermes-parser'), {parseLangTypes: 'flow'}],
|
||||
[require('babel-plugin-transform-flow-enums')],
|
||||
[require('@babel/plugin-transform-block-scoping')],
|
||||
[require('@babel/plugin-transform-class-properties'), {loose}],
|
||||
[require('@babel/plugin-transform-private-methods'), {loose}],
|
||||
[require('@babel/plugin-transform-private-property-in-object'), {loose}],
|
||||
[require('@babel/plugin-syntax-dynamic-import')],
|
||||
[require('@babel/plugin-syntax-export-default-from')],
|
||||
...passthroughSyntaxPlugins,
|
||||
[require('@babel/plugin-transform-unicode-regex')],
|
||||
];
|
||||
|
||||
// For Static Hermes testing (experimental), the hermes-canary transformProfile
|
||||
// is used to enable regenerator (and some related lowering passes) because SH
|
||||
// requires more Babel lowering than Hermes temporarily.
|
||||
@@ -234,7 +221,28 @@ const getPreset = (src, options) => {
|
||||
plugins: [require('@babel/plugin-transform-flow-strip-types')],
|
||||
},
|
||||
{
|
||||
plugins: defaultPlugins,
|
||||
plugins: [
|
||||
[
|
||||
require('babel-plugin-syntax-hermes-parser'),
|
||||
{
|
||||
parseLangTypes: 'flow',
|
||||
reactRuntimeTarget: '19',
|
||||
...options.hermesParserOptions,
|
||||
},
|
||||
],
|
||||
[require('babel-plugin-transform-flow-enums')],
|
||||
[require('@babel/plugin-transform-block-scoping')],
|
||||
[require('@babel/plugin-transform-class-properties'), {loose}],
|
||||
[require('@babel/plugin-transform-private-methods'), {loose}],
|
||||
[
|
||||
require('@babel/plugin-transform-private-property-in-object'),
|
||||
{loose},
|
||||
],
|
||||
[require('@babel/plugin-syntax-dynamic-import')],
|
||||
[require('@babel/plugin-syntax-export-default-from')],
|
||||
...passthroughSyntaxPlugins,
|
||||
[require('@babel/plugin-transform-unicode-regex')],
|
||||
],
|
||||
},
|
||||
{
|
||||
test: isTypeScriptSource,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-babel-transformer",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Babel transformer for React Native applications.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -14,7 +14,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"main": "src/index.js",
|
||||
"files": [
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.81.0-main",
|
||||
"@react-native/babel-preset": "0.81.1",
|
||||
"hermes-parser": "0.29.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
|
||||
+110
-98
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -11,26 +11,27 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setNames(view: T, value: ReadableArray?): Unit
|
||||
public fun setDisableds(view: T, value: ReadableArray?): Unit
|
||||
public fun setProgress(view: T, value: ReadableArray?): Unit
|
||||
public fun setRadii(view: T, value: ReadableArray?): Unit
|
||||
public fun setColors(view: T, value: ReadableArray?): Unit
|
||||
public fun setSrcs(view: T, value: ReadableArray?): Unit
|
||||
public fun setPoints(view: T, value: ReadableArray?): Unit
|
||||
public fun setEdgeInsets(view: T, value: ReadableArray?): Unit
|
||||
public fun setDimensions(view: T, value: ReadableArray?): Unit
|
||||
public fun setSizes(view: T, value: ReadableArray?): Unit
|
||||
public fun setObject(view: T, value: ReadableArray?): Unit
|
||||
public fun setArrayOfObjects(view: T, value: ReadableArray?): Unit
|
||||
public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit
|
||||
public interface ArrayPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setNames(T view, @Nullable ReadableArray value);
|
||||
void setDisableds(T view, @Nullable ReadableArray value);
|
||||
void setProgress(T view, @Nullable ReadableArray value);
|
||||
void setRadii(T view, @Nullable ReadableArray value);
|
||||
void setColors(T view, @Nullable ReadableArray value);
|
||||
void setSrcs(T view, @Nullable ReadableArray value);
|
||||
void setPoints(T view, @Nullable ReadableArray value);
|
||||
void setEdgeInsets(T view, @Nullable ReadableArray value);
|
||||
void setDimensions(T view, @Nullable ReadableArray value);
|
||||
void setSizes(T view, @Nullable ReadableArray value);
|
||||
void setObject(T view, @Nullable ReadableArray value);
|
||||
void setArrayOfObjects(T view, @Nullable ReadableArray value);
|
||||
void setArrayOfMixed(T view, @Nullable ReadableArray value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -38,7 +39,7 @@ public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -47,14 +48,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public fun setDisabledNullable(view: T, value: Boolean?): Unit
|
||||
public interface BooleanPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
void setDisabledNullable(T view, @Nullable Boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -62,7 +64,7 @@ public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewMa
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -71,13 +73,14 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setTintColor(view: T, value: Int?): Unit
|
||||
public interface ColorPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setTintColor(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -85,7 +88,7 @@ public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'DimensionPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -94,14 +97,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
import com.facebook.yoga.YogaValue;
|
||||
|
||||
public interface DimensionPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMarginBack(view: T, value: YogaValue?): Unit
|
||||
public interface DimensionPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMarginBack(T view, @Nullable YogaValue value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -109,7 +113,7 @@ public interface DimensionPropNativeComponentViewManagerInterface<T: View>: View
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -118,12 +122,12 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
@@ -132,7 +136,7 @@ public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: Vie
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -141,14 +145,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setAlignment(view: T, value: String?): Unit
|
||||
public fun setIntervals(view: T, value: Int?): Unit
|
||||
public interface EnumPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setAlignment(T view, @Nullable String value);
|
||||
void setIntervals(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -156,7 +161,7 @@ public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManag
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -165,13 +170,13 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -179,7 +184,7 @@ public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: Vi
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -188,13 +193,13 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface EventPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -202,7 +207,7 @@ public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -211,19 +216,20 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setBlurRadius(view: T, value: Float): Unit
|
||||
public fun setBlurRadius2(view: T, value: Float): Unit
|
||||
public fun setBlurRadius3(view: T, value: Float): Unit
|
||||
public fun setBlurRadius4(view: T, value: Float): Unit
|
||||
public fun setBlurRadius5(view: T, value: Float): Unit
|
||||
public fun setBlurRadius6(view: T, value: Float): Unit
|
||||
public fun setBlurRadiusNullable(view: T, value: Float?): Unit
|
||||
public interface FloatPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setBlurRadius(T view, float value);
|
||||
void setBlurRadius2(T view, float value);
|
||||
void setBlurRadius3(T view, float value);
|
||||
void setBlurRadius4(T view, float value);
|
||||
void setBlurRadius5(T view, float value);
|
||||
void setBlurRadius6(T view, float value);
|
||||
void setBlurRadiusNullable(T view, @Nullable Float value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -231,7 +237,7 @@ public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -240,14 +246,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setThumbImage(view: T, value: ReadableMap?): Unit
|
||||
public interface ImagePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -255,7 +262,7 @@ public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -264,15 +271,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setProgress1(view: T, value: Int): Unit
|
||||
public fun setProgress2(view: T, value: Int): Unit
|
||||
public fun setProgress3(view: T, value: Int): Unit
|
||||
public interface IntegerPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setProgress1(T view, int value);
|
||||
void setProgress2(T view, int value);
|
||||
void setProgress3(T view, int value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -280,7 +287,7 @@ public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewMa
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -289,13 +296,14 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setTitle(view: T, value: String?): Unit
|
||||
public interface InterfaceOnlyNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setTitle(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -303,7 +311,7 @@ public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: View
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'MixedPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -312,14 +320,14 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMixedProp(view: T, value: Dynamic): Unit
|
||||
public interface MixedPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMixedProp(T view, Dynamic value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -327,7 +335,7 @@ public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -336,17 +344,18 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setThumbImage(view: T, value: ReadableMap?): Unit
|
||||
public fun setColor(view: T, value: Int?): Unit
|
||||
public fun setThumbTintColor(view: T, value: Int?): Unit
|
||||
public fun setPoint(view: T, value: ReadableMap?): Unit
|
||||
public interface MultiNativePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setThumbTintColor(T view, @Nullable Integer value);
|
||||
void setPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -354,7 +363,7 @@ public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: Vi
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -363,12 +372,12 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
@@ -377,7 +386,7 @@ public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: Vi
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -386,16 +395,17 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setObjectProp(view: T, value: ReadableMap?): Unit
|
||||
public fun setObjectArrayProp(view: T, value: ReadableMap?): Unit
|
||||
public fun setObjectPrimitiveRequiredProp(view: T, value: ReadableMap?): Unit
|
||||
public interface ObjectPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setObjectProp(T view, @Nullable ReadableMap value);
|
||||
void setObjectArrayProp(T view, @Nullable ReadableMap value);
|
||||
void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -403,7 +413,7 @@ public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManage
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -412,14 +422,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setStartPoint(view: T, value: ReadableMap?): Unit
|
||||
public interface PointPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setStartPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -427,7 +438,7 @@ public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -436,14 +447,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface StringPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setPlaceholder(view: T, value: String?): Unit
|
||||
public fun setDefaultValue(view: T, value: String?): Unit
|
||||
public interface StringPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setPlaceholder(T view, @Nullable String value);
|
||||
void setDefaultValue(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
|
||||
+110
-98
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -11,26 +11,27 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setNames(view: T, value: ReadableArray?): Unit
|
||||
public fun setDisableds(view: T, value: ReadableArray?): Unit
|
||||
public fun setProgress(view: T, value: ReadableArray?): Unit
|
||||
public fun setRadii(view: T, value: ReadableArray?): Unit
|
||||
public fun setColors(view: T, value: ReadableArray?): Unit
|
||||
public fun setSrcs(view: T, value: ReadableArray?): Unit
|
||||
public fun setPoints(view: T, value: ReadableArray?): Unit
|
||||
public fun setEdgeInsets(view: T, value: ReadableArray?): Unit
|
||||
public fun setDimensions(view: T, value: ReadableArray?): Unit
|
||||
public fun setSizes(view: T, value: ReadableArray?): Unit
|
||||
public fun setObject(view: T, value: ReadableArray?): Unit
|
||||
public fun setArrayOfObjects(view: T, value: ReadableArray?): Unit
|
||||
public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit
|
||||
public interface ArrayPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setNames(T view, @Nullable ReadableArray value);
|
||||
void setDisableds(T view, @Nullable ReadableArray value);
|
||||
void setProgress(T view, @Nullable ReadableArray value);
|
||||
void setRadii(T view, @Nullable ReadableArray value);
|
||||
void setColors(T view, @Nullable ReadableArray value);
|
||||
void setSrcs(T view, @Nullable ReadableArray value);
|
||||
void setPoints(T view, @Nullable ReadableArray value);
|
||||
void setEdgeInsets(T view, @Nullable ReadableArray value);
|
||||
void setDimensions(T view, @Nullable ReadableArray value);
|
||||
void setSizes(T view, @Nullable ReadableArray value);
|
||||
void setObject(T view, @Nullable ReadableArray value);
|
||||
void setArrayOfObjects(T view, @Nullable ReadableArray value);
|
||||
void setArrayOfMixed(T view, @Nullable ReadableArray value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -38,7 +39,7 @@ public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -47,14 +48,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public fun setDisabledNullable(view: T, value: Boolean?): Unit
|
||||
public interface BooleanPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
void setDisabledNullable(T view, @Nullable Boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -62,7 +64,7 @@ public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewMa
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -71,13 +73,14 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setTintColor(view: T, value: Int?): Unit
|
||||
public interface ColorPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setTintColor(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -85,7 +88,7 @@ public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'DimensionPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -94,14 +97,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
import com.facebook.yoga.YogaValue;
|
||||
|
||||
public interface DimensionPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMarginBack(view: T, value: YogaValue?): Unit
|
||||
public interface DimensionPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMarginBack(T view, @Nullable YogaValue value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -109,7 +113,7 @@ public interface DimensionPropNativeComponentViewManagerInterface<T: View>: View
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -118,12 +122,12 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
@@ -132,7 +136,7 @@ public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: Vie
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EnumPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -141,14 +145,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setAlignment(view: T, value: String?): Unit
|
||||
public fun setIntervals(view: T, value: Int?): Unit
|
||||
public interface EnumPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setAlignment(T view, @Nullable String value);
|
||||
void setIntervals(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -156,7 +161,7 @@ public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManag
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -165,13 +170,13 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -179,7 +184,7 @@ public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: Vi
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'EventPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -188,13 +193,13 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface EventPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -202,7 +207,7 @@ public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -211,19 +216,20 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setBlurRadius(view: T, value: Float): Unit
|
||||
public fun setBlurRadius2(view: T, value: Float): Unit
|
||||
public fun setBlurRadius3(view: T, value: Float): Unit
|
||||
public fun setBlurRadius4(view: T, value: Float): Unit
|
||||
public fun setBlurRadius5(view: T, value: Float): Unit
|
||||
public fun setBlurRadius6(view: T, value: Float): Unit
|
||||
public fun setBlurRadiusNullable(view: T, value: Float?): Unit
|
||||
public interface FloatPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setBlurRadius(T view, float value);
|
||||
void setBlurRadius2(T view, float value);
|
||||
void setBlurRadius3(T view, float value);
|
||||
void setBlurRadius4(T view, float value);
|
||||
void setBlurRadius5(T view, float value);
|
||||
void setBlurRadius6(T view, float value);
|
||||
void setBlurRadiusNullable(T view, @Nullable Float value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -231,7 +237,7 @@ public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -240,14 +246,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setThumbImage(view: T, value: ReadableMap?): Unit
|
||||
public interface ImagePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -255,7 +262,7 @@ public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -264,15 +271,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setProgress1(view: T, value: Int): Unit
|
||||
public fun setProgress2(view: T, value: Int): Unit
|
||||
public fun setProgress3(view: T, value: Int): Unit
|
||||
public interface IntegerPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setProgress1(T view, int value);
|
||||
void setProgress2(T view, int value);
|
||||
void setProgress3(T view, int value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -280,7 +287,7 @@ public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewMa
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -289,13 +296,14 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setTitle(view: T, value: String?): Unit
|
||||
public interface InterfaceOnlyNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setTitle(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -303,7 +311,7 @@ public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: View
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'MixedPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -312,14 +320,14 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMixedProp(view: T, value: Dynamic): Unit
|
||||
public interface MixedPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMixedProp(T view, Dynamic value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -327,7 +335,7 @@ public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -336,17 +344,18 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setThumbImage(view: T, value: ReadableMap?): Unit
|
||||
public fun setColor(view: T, value: Int?): Unit
|
||||
public fun setThumbTintColor(view: T, value: Int?): Unit
|
||||
public fun setPoint(view: T, value: ReadableMap?): Unit
|
||||
public interface MultiNativePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setThumbTintColor(T view, @Nullable Integer value);
|
||||
void setPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -354,7 +363,7 @@ public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: Vi
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -363,12 +372,12 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
@@ -377,7 +386,7 @@ public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: Vi
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'ObjectPropsNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -386,16 +395,17 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setObjectProp(view: T, value: ReadableMap?): Unit
|
||||
public fun setObjectArrayProp(view: T, value: ReadableMap?): Unit
|
||||
public fun setObjectPrimitiveRequiredProp(view: T, value: ReadableMap?): Unit
|
||||
public interface ObjectPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setObjectProp(T view, @Nullable ReadableMap value);
|
||||
void setObjectArrayProp(T view, @Nullable ReadableMap value);
|
||||
void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -403,7 +413,7 @@ public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManage
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -412,14 +422,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setStartPoint(view: T, value: ReadableMap?): Unit
|
||||
public interface PointPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setStartPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -427,7 +438,7 @@ public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = `
|
||||
Object {
|
||||
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.kt": "/**
|
||||
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -436,14 +447,15 @@ Object {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface StringPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setPlaceholder(view: T, value: String?): Unit
|
||||
public fun setDefaultValue(view: T, value: String?): Unit
|
||||
public interface StringPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setPlaceholder(T view, @Nullable String value);
|
||||
void setDefaultValue(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn clean && node scripts/build.js --verbose",
|
||||
@@ -29,6 +29,8 @@
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/parser": "^7.25.3",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-parser": "0.29.1",
|
||||
"invariant": "^2.2.4",
|
||||
|
||||
+12
-41
@@ -85,6 +85,7 @@ function generatePropsDiffString(
|
||||
case 'StringTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
case 'BooleanTypeAnnotation':
|
||||
case 'MixedTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
@@ -94,6 +95,14 @@ function generatePropsDiffString(
|
||||
return `
|
||||
if ((${prop.name} != oldProps->${prop.name}) && !(std::isnan(${prop.name}) && std::isnan(oldProps->${prop.name}))) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
case 'ArrayTypeAnnotation':
|
||||
case 'ObjectTypeAnnotation':
|
||||
case 'StringEnumTypeAnnotation':
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
@@ -103,6 +112,9 @@ function generatePropsDiffString(
|
||||
result["${prop.name}"] = *${prop.name};
|
||||
}`;
|
||||
case 'ImageSourcePrimitive':
|
||||
case 'PointPrimitive':
|
||||
case 'EdgeInsetsPrimitive':
|
||||
case 'DimensionPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
@@ -112,52 +124,11 @@ function generatePropsDiffString(
|
||||
throw new Error(
|
||||
'ImageRequestPrimitive should not be used in Props',
|
||||
);
|
||||
case 'PointPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'DimensionPrimitive':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'ObjectTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'StringEnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = toDynamic(${prop.name});
|
||||
}`;
|
||||
case 'MixedTypeAnnotation':
|
||||
return `
|
||||
if (${prop.name} != oldProps->${prop.name}) {
|
||||
result["${prop.name}"] = ${prop.name};
|
||||
}`;
|
||||
default:
|
||||
// TODO: Implement diffProps for complex types
|
||||
return '';
|
||||
}
|
||||
})
|
||||
|
||||
+49
-32
@@ -48,15 +48,19 @@ const FileTemplate = ({
|
||||
* ${'@'}generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package ${packageName}
|
||||
package ${packageName};
|
||||
|
||||
${imports}
|
||||
|
||||
public interface ${className}<T: ${extendClasses}>: ViewManagerWithGeneratedInterface {
|
||||
public interface ${className}<T extends ${extendClasses}> extends ViewManagerWithGeneratedInterface {
|
||||
${methods}
|
||||
}
|
||||
`;
|
||||
|
||||
function addNullable(imports: Set<string>) {
|
||||
imports.add('import androidx.annotation.Nullable;');
|
||||
}
|
||||
|
||||
function getJavaValueForProp(
|
||||
prop: NamedShape<PropTypeAnnotation>,
|
||||
imports: Set<string>,
|
||||
@@ -66,52 +70,65 @@ function getJavaValueForProp(
|
||||
switch (typeAnnotation.type) {
|
||||
case 'BooleanTypeAnnotation':
|
||||
if (typeAnnotation.default === null) {
|
||||
return 'value: Boolean?';
|
||||
addNullable(imports);
|
||||
return '@Nullable Boolean value';
|
||||
} else {
|
||||
return 'value: Boolean';
|
||||
return 'boolean value';
|
||||
}
|
||||
case 'StringTypeAnnotation':
|
||||
return 'value: String?';
|
||||
addNullable(imports);
|
||||
return '@Nullable String value';
|
||||
case 'Int32TypeAnnotation':
|
||||
return 'value: Int';
|
||||
return 'int value';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return 'value: Double';
|
||||
return 'double value';
|
||||
case 'FloatTypeAnnotation':
|
||||
if (typeAnnotation.default === null) {
|
||||
return 'value: Float?';
|
||||
addNullable(imports);
|
||||
return '@Nullable Float value';
|
||||
} else {
|
||||
return 'value: Float';
|
||||
return 'float value';
|
||||
}
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
return 'value: Int?';
|
||||
addNullable(imports);
|
||||
return '@Nullable Integer value';
|
||||
case 'ImageSourcePrimitive':
|
||||
return 'value: ReadableMap?';
|
||||
addNullable(imports);
|
||||
return '@Nullable ReadableMap value';
|
||||
case 'ImageRequestPrimitive':
|
||||
return 'value: ReadableMap?';
|
||||
addNullable(imports);
|
||||
return '@Nullable ReadableMap value';
|
||||
case 'PointPrimitive':
|
||||
return 'value: ReadableMap?';
|
||||
addNullable(imports);
|
||||
return '@Nullable ReadableMap value';
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return 'value: ReadableMap?';
|
||||
addNullable(imports);
|
||||
return '@Nullable ReadableMap value';
|
||||
case 'DimensionPrimitive':
|
||||
return 'value: YogaValue?';
|
||||
addNullable(imports);
|
||||
return '@Nullable YogaValue value';
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error('Received unknown ReservedPropTypeAnnotation');
|
||||
}
|
||||
case 'ArrayTypeAnnotation': {
|
||||
return 'value: ReadableArray?';
|
||||
addNullable(imports);
|
||||
return '@Nullable ReadableArray value';
|
||||
}
|
||||
case 'ObjectTypeAnnotation': {
|
||||
return 'value: ReadableMap?';
|
||||
addNullable(imports);
|
||||
return '@Nullable ReadableMap value';
|
||||
}
|
||||
case 'StringEnumTypeAnnotation':
|
||||
return 'value: String?';
|
||||
addNullable(imports);
|
||||
return '@Nullable String value';
|
||||
case 'Int32EnumTypeAnnotation':
|
||||
return 'value: Int?';
|
||||
addNullable(imports);
|
||||
return '@Nullable Integer value';
|
||||
case 'MixedTypeAnnotation':
|
||||
return 'value: Dynamic';
|
||||
return 'Dynamic value';
|
||||
default:
|
||||
(typeAnnotation: empty);
|
||||
throw new Error('Received invalid typeAnnotation');
|
||||
@@ -125,9 +142,9 @@ function generatePropsString(component: ComponentShape, imports: Set<string>) {
|
||||
|
||||
return component.props
|
||||
.map(prop => {
|
||||
return `public fun set${toSafeJavaString(
|
||||
return `void set${toSafeJavaString(
|
||||
prop.name,
|
||||
)}(view: T, ${getJavaValueForProp(prop, imports)}): Unit`;
|
||||
)}(T view, ${getJavaValueForProp(prop, imports)});`;
|
||||
})
|
||||
.join('\n' + ' ');
|
||||
}
|
||||
@@ -139,19 +156,19 @@ function getCommandArgJavaType(param: NamedShape<CommandParamTypeAnnotation>) {
|
||||
case 'ReservedTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'RootTag':
|
||||
return 'Double';
|
||||
return 'double';
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error(`Receieved invalid type: ${typeAnnotation.name}`);
|
||||
}
|
||||
case 'BooleanTypeAnnotation':
|
||||
return 'Boolean';
|
||||
return 'boolean';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return 'Double';
|
||||
return 'double';
|
||||
case 'FloatTypeAnnotation':
|
||||
return 'Float';
|
||||
return 'float';
|
||||
case 'Int32TypeAnnotation':
|
||||
return 'Int';
|
||||
return 'int';
|
||||
case 'StringTypeAnnotation':
|
||||
return 'String';
|
||||
case 'ArrayTypeAnnotation':
|
||||
@@ -167,11 +184,11 @@ function getCommandArguments(
|
||||
componentName: string,
|
||||
): string {
|
||||
return [
|
||||
'view: T',
|
||||
'T view',
|
||||
...command.typeAnnotation.params.map(param => {
|
||||
const commandArgJavaType = getCommandArgJavaType(param);
|
||||
|
||||
return `${param.name}: ${commandArgJavaType}`;
|
||||
return `${commandArgJavaType} ${param.name}`;
|
||||
}),
|
||||
].join(', ');
|
||||
}
|
||||
@@ -184,10 +201,10 @@ function generateCommandsString(
|
||||
.map(command => {
|
||||
const safeJavaName = toSafeJavaString(command.name, false);
|
||||
|
||||
return `public fun ${safeJavaName}(${getCommandArguments(
|
||||
return `void ${safeJavaName}(${getCommandArguments(
|
||||
command,
|
||||
componentName,
|
||||
)}): Unit`;
|
||||
)});`;
|
||||
})
|
||||
.join('\n' + ' ');
|
||||
}
|
||||
@@ -270,7 +287,7 @@ module.exports = {
|
||||
.trimRight(),
|
||||
});
|
||||
|
||||
files.set(`${outputDir}/${className}.kt`, replacedTemplate);
|
||||
files.set(`${outputDir}/${className}.java`, replacedTemplate);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+163
-149
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture ARRAY_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -11,26 +11,27 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setNames(view: T, value: ReadableArray?): Unit
|
||||
public fun setDisableds(view: T, value: ReadableArray?): Unit
|
||||
public fun setProgress(view: T, value: ReadableArray?): Unit
|
||||
public fun setRadii(view: T, value: ReadableArray?): Unit
|
||||
public fun setColors(view: T, value: ReadableArray?): Unit
|
||||
public fun setSrcs(view: T, value: ReadableArray?): Unit
|
||||
public fun setPoints(view: T, value: ReadableArray?): Unit
|
||||
public fun setDimensions(view: T, value: ReadableArray?): Unit
|
||||
public fun setSizes(view: T, value: ReadableArray?): Unit
|
||||
public fun setObject(view: T, value: ReadableArray?): Unit
|
||||
public fun setArray(view: T, value: ReadableArray?): Unit
|
||||
public fun setArrayOfArrayOfObject(view: T, value: ReadableArray?): Unit
|
||||
public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit
|
||||
public interface ArrayPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setNames(T view, @Nullable ReadableArray value);
|
||||
void setDisableds(T view, @Nullable ReadableArray value);
|
||||
void setProgress(T view, @Nullable ReadableArray value);
|
||||
void setRadii(T view, @Nullable ReadableArray value);
|
||||
void setColors(T view, @Nullable ReadableArray value);
|
||||
void setSrcs(T view, @Nullable ReadableArray value);
|
||||
void setPoints(T view, @Nullable ReadableArray value);
|
||||
void setDimensions(T view, @Nullable ReadableArray value);
|
||||
void setSizes(T view, @Nullable ReadableArray value);
|
||||
void setObject(T view, @Nullable ReadableArray value);
|
||||
void setArray(T view, @Nullable ReadableArray value);
|
||||
void setArrayOfArrayOfObject(T view, @Nullable ReadableArray value);
|
||||
void setArrayOfMixed(T view, @Nullable ReadableArray value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -38,7 +39,7 @@ public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManager
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture ARRAY_PROPS_WITH_NESTED_OBJECT 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -47,14 +48,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setNativePrimitives(view: T, value: ReadableArray?): Unit
|
||||
public interface ArrayPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setNativePrimitives(T view, @Nullable ReadableArray value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -62,7 +64,7 @@ public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManager
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture BOOLEAN_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -71,13 +73,13 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface BooleanPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface BooleanPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -85,7 +87,7 @@ public interface BooleanPropNativeComponentManagerInterface<T: View>: ViewManage
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COLOR_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -94,13 +96,14 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ColorPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setTintColor(view: T, value: Int?): Unit
|
||||
public interface ColorPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setTintColor(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -108,7 +111,7 @@ public interface ColorPropNativeComponentManagerInterface<T: View>: ViewManagerW
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMMANDS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -117,16 +120,16 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface CommandNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
public fun flashScrollIndicators(view: T): Unit
|
||||
public fun allTypes(view: T, x: Int, y: Float, z: Double, message: String, animated: Boolean, locations: ReadableArray): Unit
|
||||
void flashScrollIndicators(T view);
|
||||
void allTypes(T view, int x, float y, double z, String message, boolean animated, ReadableArray locations);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -134,7 +137,7 @@ public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWit
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture COMMANDS_AND_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -143,17 +146,18 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setAccessibilityHint(view: T, value: String?): Unit
|
||||
public fun handleRootTag(view: T, rootTag: Double): Unit
|
||||
public fun hotspotUpdate(view: T, x: Int, y: Int): Unit
|
||||
public fun addItems(view: T, items: ReadableArray): Unit
|
||||
public interface CommandNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setAccessibilityHint(T view, @Nullable String value);
|
||||
void handleRootTag(T view, double rootTag);
|
||||
void hotspotUpdate(T view, int x, int y);
|
||||
void addItems(T view, ReadableArray items);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -161,7 +165,7 @@ public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWit
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture DIMENSION_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -170,14 +174,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
import com.facebook.yoga.YogaValue;
|
||||
|
||||
public interface DimensionPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMarginBack(view: T, value: YogaValue?): Unit
|
||||
public interface DimensionPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMarginBack(T view, @Nullable YogaValue value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -185,7 +190,7 @@ public interface DimensionPropNativeComponentManagerInterface<T: View>: ViewMana
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture DOUBLE_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -194,18 +199,18 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface DoublePropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setBlurRadius(view: T, value: Double): Unit
|
||||
public fun setBlurRadius2(view: T, value: Double): Unit
|
||||
public fun setBlurRadius3(view: T, value: Double): Unit
|
||||
public fun setBlurRadius4(view: T, value: Double): Unit
|
||||
public fun setBlurRadius5(view: T, value: Double): Unit
|
||||
public fun setBlurRadius6(view: T, value: Double): Unit
|
||||
public interface DoublePropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setBlurRadius(T view, double value);
|
||||
void setBlurRadius2(T view, double value);
|
||||
void setBlurRadius3(T view, double value);
|
||||
void setBlurRadius4(T view, double value);
|
||||
void setBlurRadius5(T view, double value);
|
||||
void setBlurRadius6(T view, double value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -213,7 +218,7 @@ public interface DoublePropNativeComponentManagerInterface<T: View>: ViewManager
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/EventsNestedObjectNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/EventsNestedObjectNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -222,13 +227,13 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EventsNestedObjectNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface EventsNestedObjectNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -236,7 +241,7 @@ public interface EventsNestedObjectNativeComponentManagerInterface<T: View>: Vie
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture EVENT_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/EventsNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/EventsNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -245,13 +250,13 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface EventsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface EventsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -259,7 +264,7 @@ public interface EventsNativeComponentManagerInterface<T: View>: ViewManagerWith
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture EVENTS_WITH_PAPER_NAME 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -268,12 +273,12 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface InterfaceOnlyComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface InterfaceOnlyComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
@@ -286,7 +291,7 @@ exports[`GeneratePropsJavaInterface can generate fixture EXCLUDE_ANDROID_IOS 1`]
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ExcludedIosComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ExcludedIosComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -295,16 +300,16 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ExcludedIosComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface ExcludedIosComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
"java/com/facebook/react/viewmanagers/MultiFileIncludedNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiFileIncludedNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -313,13 +318,13 @@ public interface ExcludedIosComponentManagerInterface<T: View>: ViewManagerWithG
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiFileIncludedNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface MultiFileIncludedNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -327,7 +332,7 @@ public interface MultiFileIncludedNativeComponentManagerInterface<T: View>: View
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture FLOAT_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/FloatPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/FloatPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -336,18 +341,18 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface FloatPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setBlurRadius(view: T, value: Float): Unit
|
||||
public fun setBlurRadius2(view: T, value: Float): Unit
|
||||
public fun setBlurRadius3(view: T, value: Float): Unit
|
||||
public fun setBlurRadius4(view: T, value: Float): Unit
|
||||
public fun setBlurRadius5(view: T, value: Float): Unit
|
||||
public fun setBlurRadius6(view: T, value: Float): Unit
|
||||
public interface FloatPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setBlurRadius(T view, float value);
|
||||
void setBlurRadius2(T view, float value);
|
||||
void setBlurRadius3(T view, float value);
|
||||
void setBlurRadius4(T view, float value);
|
||||
void setBlurRadius5(T view, float value);
|
||||
void setBlurRadius6(T view, float value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -355,7 +360,7 @@ public interface FloatPropNativeComponentManagerInterface<T: View>: ViewManagerW
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture IMAGE_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -364,14 +369,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ImagePropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setThumbImage(view: T, value: ReadableMap?): Unit
|
||||
public interface ImagePropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -379,7 +385,7 @@ public interface ImagePropNativeComponentManagerInterface<T: View>: ViewManagerW
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture INSETS_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/InsetsPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/InsetsPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -388,14 +394,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface InsetsPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setContentInset(view: T, value: ReadableMap?): Unit
|
||||
public interface InsetsPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setContentInset(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -403,7 +410,7 @@ public interface InsetsPropNativeComponentManagerInterface<T: View>: ViewManager
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture INT32_ENUM_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/Int32EnumPropsNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/Int32EnumPropsNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -412,13 +419,14 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface Int32EnumPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMaxInterval(view: T, value: Int?): Unit
|
||||
public interface Int32EnumPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMaxInterval(T view, @Nullable Integer value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -426,7 +434,7 @@ public interface Int32EnumPropsNativeComponentManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture INTEGER_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -435,15 +443,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface IntegerPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setProgress1(view: T, value: Int): Unit
|
||||
public fun setProgress2(view: T, value: Int): Unit
|
||||
public fun setProgress3(view: T, value: Int): Unit
|
||||
public interface IntegerPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setProgress1(T view, int value);
|
||||
void setProgress2(T view, int value);
|
||||
void setProgress3(T view, int value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -451,7 +459,7 @@ public interface IntegerPropNativeComponentManagerInterface<T: View>: ViewManage
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture INTERFACE_ONLY 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -460,13 +468,14 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface InterfaceOnlyComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setAccessibilityHint(view: T, value: String?): Unit
|
||||
public interface InterfaceOnlyComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setAccessibilityHint(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -474,7 +483,7 @@ public interface InterfaceOnlyComponentManagerInterface<T: View>: ViewManagerWit
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture MIXED_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -483,14 +492,14 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MixedPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setMixedProp(view: T, value: Dynamic): Unit
|
||||
public interface MixedPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setMixedProp(T view, Dynamic value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -498,7 +507,7 @@ public interface MixedPropNativeComponentManagerInterface<T: View>: ViewManagerW
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture MULTI_NATIVE_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ImageColorPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ImageColorPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -507,17 +516,18 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ImageColorPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setThumbImage(view: T, value: ReadableMap?): Unit
|
||||
public fun setColor(view: T, value: Int?): Unit
|
||||
public fun setThumbTintColor(view: T, value: Int?): Unit
|
||||
public fun setPoint(view: T, value: ReadableMap?): Unit
|
||||
public interface ImageColorPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setThumbImage(T view, @Nullable ReadableMap value);
|
||||
void setColor(T view, @Nullable Integer value);
|
||||
void setThumbTintColor(T view, @Nullable Integer value);
|
||||
void setPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -525,7 +535,7 @@ public interface ImageColorPropNativeComponentManagerInterface<T: View>: ViewMan
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture NO_PROPS_NO_EVENTS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/NoPropsNoEventsComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -534,12 +544,12 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface NoPropsNoEventsComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public interface NoPropsNoEventsComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
// No props
|
||||
}
|
||||
",
|
||||
@@ -548,7 +558,7 @@ public interface NoPropsNoEventsComponentManagerInterface<T: View>: ViewManagerW
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture OBJECT_PROPS 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/ObjectPropsManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -557,14 +567,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface ObjectPropsManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setObjectProp(view: T, value: ReadableMap?): Unit
|
||||
public interface ObjectPropsManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setObjectProp(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -572,7 +583,7 @@ public interface ObjectPropsManagerInterface<T: View>: ViewManagerWithGeneratedI
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture POINT_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/PointPropNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -581,14 +592,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface PointPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setStartPoint(view: T, value: ReadableMap?): Unit
|
||||
public interface PointPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setStartPoint(T view, @Nullable ReadableMap value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -596,7 +608,7 @@ public interface PointPropNativeComponentManagerInterface<T: View>: ViewManagerW
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture STRING_ENUM_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/StringEnumPropsNativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/StringEnumPropsNativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -605,13 +617,14 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface StringEnumPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setAlignment(view: T, value: String?): Unit
|
||||
public interface StringEnumPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setAlignment(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -619,7 +632,7 @@ public interface StringEnumPropsNativeComponentManagerInterface<T: View>: ViewMa
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture STRING_PROP 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/StringPropComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/StringPropComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -628,14 +641,15 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface StringPropComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setAccessibilityHint(view: T, value: String?): Unit
|
||||
public fun setAccessibilityRole(view: T, value: String?): Unit
|
||||
public interface StringPropComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setAccessibilityHint(T view, @Nullable String value);
|
||||
void setAccessibilityRole(T view, @Nullable String value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -643,7 +657,7 @@ public interface StringPropComponentManagerInterface<T: View>: ViewManagerWithGe
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MultiFile1NativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiFile1NativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -652,16 +666,16 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiFile1NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface MultiFile1NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
"java/com/facebook/react/viewmanagers/MultiFile2NativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiFile2NativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -670,13 +684,13 @@ public interface MultiFile1NativeComponentManagerInterface<T: View>: ViewManager
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiFile2NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface MultiFile2NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
@@ -684,7 +698,7 @@ public interface MultiFile2NativeComponentManagerInterface<T: View>: ViewManager
|
||||
|
||||
exports[`GeneratePropsJavaInterface can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
|
||||
Map {
|
||||
"java/com/facebook/react/viewmanagers/MultiComponent1NativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiComponent1NativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -693,16 +707,16 @@ Map {
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiComponent1NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface MultiComponent1NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
"java/com/facebook/react/viewmanagers/MultiComponent2NativeComponentManagerInterface.kt" => "/**
|
||||
"java/com/facebook/react/viewmanagers/MultiComponent2NativeComponentManagerInterface.java" => "/**
|
||||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
||||
*
|
||||
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
||||
@@ -711,13 +725,13 @@ public interface MultiComponent1NativeComponentManagerInterface<T: View>: ViewMa
|
||||
* @generated by codegen project: GeneratePropsJavaInterface.js
|
||||
*/
|
||||
|
||||
package com.facebook.react.viewmanagers
|
||||
package com.facebook.react.viewmanagers;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
|
||||
|
||||
public interface MultiComponent2NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
|
||||
public fun setDisabled(view: T, value: Boolean): Unit
|
||||
public interface MultiComponent2NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
||||
void setDisabled(T view, boolean value);
|
||||
}
|
||||
",
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/compatibility-check",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -19,7 +19,7 @@
|
||||
],
|
||||
"bugs": "https://github.com/facebook/react-native/issues",
|
||||
"engines": {
|
||||
"node": ">= 22.14.0"
|
||||
"node": ">= 20.19.4"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
@@ -29,7 +29,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.81.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-remove-types": "^2.237.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.81.0-main",
|
||||
"version": "0.81.1",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.81.0-main"
|
||||
"@react-native/codegen": "0.81.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.1.0",
|
||||
|
||||
+2
@@ -12,7 +12,9 @@ import com.facebook.react.bridge.NativeModule
|
||||
import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.uimanager.ViewManager
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
public class OSSLibraryExamplePackage : ReactPackage {
|
||||
@Deprecated("Migrate to [BaseReactPackage] and implement [getModule] instead.")
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
||||
listOf(NativeSampleModule(reactContext))
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.81.0-main",
|
||||
"react-native": "1000.0.0"
|
||||
"@react-native/babel-preset": "0.81.1",
|
||||
"react-native": "0.81.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
||||
@@ -84,4 +84,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -55,4 +55,5 @@ Pod::Spec.new do |s|
|
||||
end
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
|
||||
import NativeRedBox from '../NativeModules/specs/NativeRedBox';
|
||||
import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
||||
import NativeBugReporting from './NativeBugReporting';
|
||||
|
||||
type ExtraData = {[key: string]: string, ...};
|
||||
type SourceCallback = () => string;
|
||||
type DebugData = {
|
||||
extras: ExtraData,
|
||||
files: ExtraData,
|
||||
...
|
||||
};
|
||||
|
||||
function defaultExtras() {
|
||||
BugReporting.addFileSource('react_hierarchy.txt', () =>
|
||||
require('./dumpReactTree').default(),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple class for collecting bug report data. Components can add sources that will be queried when a bug report
|
||||
* is created via `collectExtraData`. For example, a list component might add a source that provides the list of rows
|
||||
* that are currently visible on screen. Components should also remember to call `remove()` on the object that is
|
||||
* returned by `addSource` when they are unmounted.
|
||||
*/
|
||||
class BugReporting {
|
||||
static _extraSources: Map<string, SourceCallback> = new Map();
|
||||
static _fileSources: Map<string, SourceCallback> = new Map();
|
||||
static _subscription: ?EventSubscription = null;
|
||||
static _redboxSubscription: ?EventSubscription = null;
|
||||
|
||||
static _maybeInit() {
|
||||
if (!BugReporting._subscription) {
|
||||
BugReporting._subscription = RCTDeviceEventEmitter.addListener(
|
||||
'collectBugExtraData',
|
||||
// $FlowFixMe[method-unbinding]
|
||||
BugReporting.collectExtraData,
|
||||
null,
|
||||
);
|
||||
defaultExtras();
|
||||
}
|
||||
|
||||
if (!BugReporting._redboxSubscription) {
|
||||
BugReporting._redboxSubscription = RCTDeviceEventEmitter.addListener(
|
||||
'collectRedBoxExtraData',
|
||||
// $FlowFixMe[method-unbinding]
|
||||
BugReporting.collectExtraData,
|
||||
null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a string key to a simple callback that should return a string payload to be attached
|
||||
* to a bug report. Source callbacks are called when `collectExtraData` is called.
|
||||
*
|
||||
* Returns an object to remove the source when the component unmounts.
|
||||
*
|
||||
* Conflicts trample with a warning.
|
||||
*/
|
||||
static addSource(
|
||||
key: string,
|
||||
callback: SourceCallback,
|
||||
): {remove: () => void, ...} {
|
||||
return this._addSource(key, callback, BugReporting._extraSources);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a string key to a simple callback that should return a string payload to be attached
|
||||
* to a bug report. Source callbacks are called when `collectExtraData` is called.
|
||||
*
|
||||
* Returns an object to remove the source when the component unmounts.
|
||||
*
|
||||
* Conflicts trample with a warning.
|
||||
*/
|
||||
static addFileSource(
|
||||
key: string,
|
||||
callback: SourceCallback,
|
||||
): {remove: () => void, ...} {
|
||||
return this._addSource(key, callback, BugReporting._fileSources);
|
||||
}
|
||||
|
||||
static _addSource(
|
||||
key: string,
|
||||
callback: SourceCallback,
|
||||
source: Map<string, SourceCallback>,
|
||||
): {remove: () => void, ...} {
|
||||
BugReporting._maybeInit();
|
||||
if (source.has(key)) {
|
||||
console.warn(
|
||||
`BugReporting.add* called multiple times for same key '${key}'`,
|
||||
);
|
||||
}
|
||||
source.set(key, callback);
|
||||
return {
|
||||
remove: () => {
|
||||
source.delete(key);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This can be called from a native bug reporting flow, or from JS code.
|
||||
*
|
||||
* If available, this will call `NativeModules.BugReporting.setExtraData(extraData)`
|
||||
* after collecting `extraData`.
|
||||
*/
|
||||
static collectExtraData(): DebugData {
|
||||
const extraData: ExtraData = {};
|
||||
for (const [key, callback] of BugReporting._extraSources) {
|
||||
extraData[key] = callback();
|
||||
}
|
||||
const fileData: ExtraData = {};
|
||||
for (const [key, callback] of BugReporting._fileSources) {
|
||||
fileData[key] = callback();
|
||||
}
|
||||
|
||||
if (NativeBugReporting != null && NativeBugReporting.setExtraData != null) {
|
||||
NativeBugReporting.setExtraData(extraData, fileData);
|
||||
}
|
||||
|
||||
if (NativeRedBox != null && NativeRedBox.setExtraData != null) {
|
||||
NativeRedBox.setExtraData(extraData, 'From BugReporting.js');
|
||||
}
|
||||
|
||||
return {extras: extraData, files: fileData};
|
||||
}
|
||||
}
|
||||
|
||||
export default BugReporting;
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
export * from '../../src/private/specs_DEPRECATED/modules/NativeBugReporting';
|
||||
import NativeBugReporting from '../../src/private/specs_DEPRECATED/modules/NativeBugReporting';
|
||||
|
||||
export default NativeBugReporting;
|
||||
@@ -1,151 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
const getReactData = require('getReactData').default;
|
||||
|
||||
const INDENTATION_SIZE = 2;
|
||||
const MAX_DEPTH = 2;
|
||||
const MAX_STRING_LENGTH = 50;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Dump all React Native root views and their content. This function tries
|
||||
* it best to get the content but ultimately relies on implementation details
|
||||
* of React and will fail in future versions.
|
||||
*/
|
||||
function dumpReactTree(): string {
|
||||
try {
|
||||
return getReactTree();
|
||||
} catch (e) {
|
||||
return 'Failed to dump react tree: ' + e;
|
||||
}
|
||||
}
|
||||
|
||||
function getReactTree() {
|
||||
// TODO(sema): Reenable tree dumps using the Fiber tree structure. #15945684
|
||||
return (
|
||||
'React tree dumps have been temporarily disabled while React is ' +
|
||||
'upgraded to Fiber.'
|
||||
);
|
||||
/*
|
||||
let output = '';
|
||||
const rootIds = Object.getOwnPropertyNames(ReactNativeMount._instancesByContainerID);
|
||||
for (const rootId of rootIds) {
|
||||
const instance = ReactNativeMount._instancesByContainerID[rootId];
|
||||
output += `============ Root ID: ${rootId} ============\n`;
|
||||
output += dumpNode(instance, 0);
|
||||
output += `============ End root ID: ${rootId} ============\n`;
|
||||
}
|
||||
return output;
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
function dumpNode(node: Object, indentation: number) {
|
||||
const data = getReactData(node);
|
||||
if (data.nodeType === 'Text') {
|
||||
return indent(indentation) + data.text + '\n';
|
||||
} else if (data.nodeType === 'Empty') {
|
||||
return '';
|
||||
}
|
||||
let output = indent(indentation) + `<${data.name}`;
|
||||
if (data.nodeType === 'Composite') {
|
||||
for (const propName of Object.getOwnPropertyNames(data.props || {})) {
|
||||
if (isNormalProp(propName)) {
|
||||
try {
|
||||
const value = convertValue(data.props[propName]);
|
||||
if (value) {
|
||||
output += ` ${propName}=${value}`;
|
||||
}
|
||||
} catch (e) {
|
||||
const message = `[Failed to get property: ${e}]`;
|
||||
output += ` ${propName}=${message}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let childOutput = '';
|
||||
for (const child of data.children || []) {
|
||||
childOutput += dumpNode(child, indentation + 1);
|
||||
}
|
||||
|
||||
if (childOutput) {
|
||||
output += '>\n' + childOutput + indent(indentation) + `</${data.name}>\n`;
|
||||
} else {
|
||||
output += ' />\n';
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
function isNormalProp(name: string): boolean {
|
||||
switch (name) {
|
||||
case 'children':
|
||||
case 'key':
|
||||
case 'ref':
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function convertObject(object: Object, depth: number) {
|
||||
if (depth >= MAX_DEPTH) {
|
||||
return '[...omitted]';
|
||||
}
|
||||
let output = '{';
|
||||
let first = true;
|
||||
for (const key of Object.getOwnPropertyNames(object)) {
|
||||
if (!first) {
|
||||
output += ', ';
|
||||
}
|
||||
output += `${key}: ${convertValue(object[key], depth + 1)}`;
|
||||
first = false;
|
||||
}
|
||||
return output + '}';
|
||||
}
|
||||
|
||||
function convertValue(value, depth = 0): ?string {
|
||||
if (!value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
return JSON.stringify(possiblyEllipsis(value).replace('\n', '\\n'));
|
||||
case 'boolean':
|
||||
case 'number':
|
||||
return JSON.stringify(value);
|
||||
case 'function':
|
||||
return '[function]';
|
||||
case 'object':
|
||||
return convertObject(value, depth);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function possiblyEllipsis(value: string) {
|
||||
if (value.length > MAX_STRING_LENGTH) {
|
||||
return value.slice(0, MAX_STRING_LENGTH) + '...';
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
function indent(size: number) {
|
||||
return ' '.repeat(size * INDENTATION_SIZE);
|
||||
}
|
||||
*/
|
||||
|
||||
export default dumpReactTree;
|
||||
@@ -1,187 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Convert a react internal instance to a sanitized data object.
|
||||
*
|
||||
* This is shamelessly stolen from react-devtools:
|
||||
* https://github.com/facebook/react-devtools/blob/HEAD/backend/getData.js
|
||||
*/
|
||||
function getData(element: Object): Object {
|
||||
let children = null;
|
||||
let props = null;
|
||||
let state = null;
|
||||
let context = null;
|
||||
let updater = null;
|
||||
let name = null;
|
||||
let type = null;
|
||||
let text = null;
|
||||
let publicInstance = null;
|
||||
let nodeType = 'Native';
|
||||
// If the parent is a native node without rendered children, but with
|
||||
// multiple string children, then the `element` that gets passed in here is
|
||||
// a plain value -- a string or number.
|
||||
if (typeof element !== 'object') {
|
||||
nodeType = 'Text';
|
||||
text = element + '';
|
||||
} else if (
|
||||
element._currentElement === null ||
|
||||
element._currentElement === false
|
||||
) {
|
||||
nodeType = 'Empty';
|
||||
} else if (element._renderedComponent) {
|
||||
nodeType = 'NativeWrapper';
|
||||
children = [element._renderedComponent];
|
||||
props = element._instance.props;
|
||||
state = element._instance.state;
|
||||
context = element._instance.context;
|
||||
if (context && Object.keys(context).length === 0) {
|
||||
context = null;
|
||||
}
|
||||
} else if (element._renderedChildren) {
|
||||
children = childrenList(element._renderedChildren);
|
||||
} else if (element._currentElement && element._currentElement.props) {
|
||||
// This is a native node without rendered children -- meaning the children
|
||||
// prop is just a string or (in the case of the <option>) a list of
|
||||
// strings & numbers.
|
||||
children = element._currentElement.props.children;
|
||||
}
|
||||
|
||||
if (!props && element._currentElement && element._currentElement.props) {
|
||||
props = element._currentElement.props;
|
||||
}
|
||||
|
||||
// != used deliberately here to catch undefined and null
|
||||
if (element._currentElement != null) {
|
||||
type = element._currentElement.type;
|
||||
if (typeof type === 'string') {
|
||||
name = type;
|
||||
} else if (element.getName) {
|
||||
nodeType = 'Composite';
|
||||
name = element.getName();
|
||||
// 0.14 top-level wrapper
|
||||
// TODO(jared): The backend should just act as if these don't exist.
|
||||
if (
|
||||
element._renderedComponent &&
|
||||
element._currentElement.props ===
|
||||
element._renderedComponent._currentElement
|
||||
) {
|
||||
nodeType = 'Wrapper';
|
||||
}
|
||||
if (name === null) {
|
||||
name = 'No display name';
|
||||
}
|
||||
} else if (element._stringText) {
|
||||
nodeType = 'Text';
|
||||
text = element._stringText;
|
||||
} else {
|
||||
name = type.displayName || type.name || 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
if (element._instance) {
|
||||
const inst = element._instance;
|
||||
updater = {
|
||||
setState: inst.setState && inst.setState.bind(inst),
|
||||
forceUpdate: inst.forceUpdate && inst.forceUpdate.bind(inst),
|
||||
setInProps: inst.forceUpdate && setInProps.bind(null, element),
|
||||
setInState: inst.forceUpdate && setInState.bind(null, inst),
|
||||
setInContext: inst.forceUpdate && setInContext.bind(null, inst),
|
||||
};
|
||||
publicInstance = inst;
|
||||
|
||||
// TODO: React ART currently falls in this bucket, but this doesn't
|
||||
// actually make sense and we should clean this up after stabilizing our
|
||||
// API for backends
|
||||
if (inst._renderedChildren) {
|
||||
children = childrenList(inst._renderedChildren);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
nodeType,
|
||||
type,
|
||||
name,
|
||||
props,
|
||||
state,
|
||||
context,
|
||||
children,
|
||||
text,
|
||||
updater,
|
||||
publicInstance,
|
||||
};
|
||||
}
|
||||
|
||||
function setInProps(
|
||||
internalInst: any,
|
||||
path: Array<string | number>,
|
||||
value: any,
|
||||
) {
|
||||
const element = internalInst._currentElement;
|
||||
internalInst._currentElement = {
|
||||
...element,
|
||||
props: copyWithSet(element.props, path, value),
|
||||
};
|
||||
internalInst._instance.forceUpdate();
|
||||
}
|
||||
|
||||
function setInState(inst: any, path: Array<string | number>, value: any) {
|
||||
setIn(inst.state, path, value);
|
||||
inst.forceUpdate();
|
||||
}
|
||||
|
||||
function setInContext(inst: any, path: Array<string | number>, value: any) {
|
||||
setIn(inst.context, path, value);
|
||||
inst.forceUpdate();
|
||||
}
|
||||
|
||||
function setIn(obj: Object, path: Array<string | number>, value: any) {
|
||||
const last = path.pop();
|
||||
const parent = path.reduce((obj_, attr) => (obj_ ? obj_[attr] : null), obj);
|
||||
if (parent) {
|
||||
parent[last] = value;
|
||||
}
|
||||
}
|
||||
|
||||
function childrenList(children: any) {
|
||||
const res = [];
|
||||
for (const name in children) {
|
||||
res.push(children[name]);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function copyWithSetImpl(
|
||||
obj: any | Array<any>,
|
||||
path: Array<string | number>,
|
||||
idx: number,
|
||||
value: any,
|
||||
): any {
|
||||
if (idx >= path.length) {
|
||||
return value;
|
||||
}
|
||||
const key = path[idx];
|
||||
const updated = Array.isArray(obj) ? obj.slice() : {...obj};
|
||||
// $FlowFixMe[incompatible-use] number or string is fine here
|
||||
updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
|
||||
return updated;
|
||||
}
|
||||
|
||||
function copyWithSet(
|
||||
obj: Object | Array<any>,
|
||||
path: Array<string | number>,
|
||||
value: any,
|
||||
): Object | Array<any> {
|
||||
return copyWithSetImpl(obj, path, 0, value);
|
||||
}
|
||||
|
||||
export default getData;
|
||||
@@ -264,7 +264,7 @@ const Switch: component(
|
||||
disabled,
|
||||
onTintColor: trackColorForTrue,
|
||||
style: StyleSheet.compose(
|
||||
{height: 31, width: 51},
|
||||
{alignSelf: 'flex-start' as const},
|
||||
StyleSheet.compose(
|
||||
style,
|
||||
ios_backgroundColor == null
|
||||
|
||||
@@ -55,7 +55,7 @@ import usePressability from '../../Pressability/usePressability';
|
||||
import flattenStyle from '../../StyleSheet/flattenStyle';
|
||||
import StyleSheet, {type TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import Text from '../../Text/Text';
|
||||
import TextAncestor from '../../Text/TextAncestor';
|
||||
import TextAncestorContext from '../../Text/TextAncestorContext';
|
||||
import Platform from '../../Utilities/Platform';
|
||||
import useMergeRefs from '../../Utilities/useMergeRefs';
|
||||
import TextInputState from './TextInputState';
|
||||
@@ -618,6 +618,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
||||
// so omitting onBlur and onFocus pressability handlers here.
|
||||
const {onBlur, onFocus, ...eventHandlers} = usePressability(config);
|
||||
|
||||
const _accessibilityLabel =
|
||||
props?.['aria-label'] ?? props?.accessibilityLabel;
|
||||
|
||||
let _accessibilityState;
|
||||
if (
|
||||
accessibilityState != null ||
|
||||
@@ -681,6 +684,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
||||
{...otherProps}
|
||||
{...eventHandlers}
|
||||
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
||||
accessibilityLabel={_accessibilityLabel}
|
||||
accessibilityState={_accessibilityState}
|
||||
accessible={accessible}
|
||||
submitBehavior={submitBehavior}
|
||||
@@ -744,8 +748,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
||||
{...otherProps}
|
||||
{...colorProps}
|
||||
{...eventHandlers}
|
||||
accessibilityState={_accessibilityState}
|
||||
accessibilityLabel={_accessibilityLabel}
|
||||
accessibilityLabelledBy={_accessibilityLabelledBy}
|
||||
accessibilityState={_accessibilityState}
|
||||
accessible={accessible}
|
||||
acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
|
||||
autoCapitalize={autoCapitalize}
|
||||
@@ -775,9 +780,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
||||
/>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<TextAncestor.Provider value={true}>{textInput}</TextAncestor.Provider>
|
||||
);
|
||||
return <TextAncestorContext value={true}>{textInput}</TextAncestorContext>;
|
||||
}
|
||||
|
||||
const enterKeyHintToReturnTypeMap = {
|
||||
|
||||
+1
@@ -432,6 +432,7 @@ jest.unmock('../TextInput');
|
||||
|
||||
expect(instance.toJSON()).toMatchInlineSnapshot(`
|
||||
<RCTSinglelineTextInputView
|
||||
accessibilityLabel="label"
|
||||
accessibilityState={
|
||||
Object {
|
||||
"busy": true,
|
||||
|
||||
+10
-4
@@ -11,7 +11,7 @@
|
||||
import type {ViewProps} from './ViewPropTypes';
|
||||
|
||||
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
||||
import TextAncestor from '../../Text/TextAncestor';
|
||||
import TextAncestorContext from '../../Text/TextAncestorContext';
|
||||
import ViewNativeComponent from './ViewNativeComponent';
|
||||
import * as React from 'react';
|
||||
import {use} from 'react';
|
||||
@@ -23,11 +23,11 @@ import {use} from 'react';
|
||||
*
|
||||
* @see https://reactnative.dev/docs/view
|
||||
*/
|
||||
export default component View(
|
||||
component View(
|
||||
ref?: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
|
||||
...props: ViewProps
|
||||
) {
|
||||
const hasTextAncestor = use(TextAncestor);
|
||||
const hasTextAncestor = use(TextAncestorContext);
|
||||
|
||||
let actualView;
|
||||
if (ReactNativeFeatureFlags.reduceDefaultPropsInView()) {
|
||||
@@ -207,7 +207,13 @@ export default component View(
|
||||
}
|
||||
|
||||
if (hasTextAncestor) {
|
||||
return <TextAncestor value={false}>{actualView}</TextAncestor>;
|
||||
return (
|
||||
<TextAncestorContext value={false}>{actualView}</TextAncestorContext>
|
||||
);
|
||||
}
|
||||
return actualView;
|
||||
}
|
||||
|
||||
View.displayName = 'View';
|
||||
|
||||
export default View;
|
||||
|
||||
@@ -15,8 +15,8 @@ export const version: $ReadOnly<{
|
||||
patch: number,
|
||||
prerelease: string | null,
|
||||
}> = {
|
||||
major: 1000,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
major: 0,
|
||||
minor: 81,
|
||||
patch: 1,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ import type {AbstractImageAndroid, ImageAndroid} from './ImageTypes.flow';
|
||||
|
||||
import flattenStyle from '../StyleSheet/flattenStyle';
|
||||
import StyleSheet from '../StyleSheet/StyleSheet';
|
||||
import TextAncestor from '../Text/TextAncestor';
|
||||
import TextAncestorContext from '../Text/TextAncestorContext';
|
||||
import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
|
||||
import {
|
||||
unstable_getImageComponentDecorator,
|
||||
@@ -222,7 +222,7 @@ let BaseImage: AbstractImageAndroid = ({
|
||||
}
|
||||
: nativeProps;
|
||||
return (
|
||||
<TextAncestor.Consumer>
|
||||
<TextAncestorContext.Consumer>
|
||||
{hasTextAncestor => {
|
||||
if (hasTextAncestor) {
|
||||
return (
|
||||
@@ -245,7 +245,7 @@ let BaseImage: AbstractImageAndroid = ({
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</TextAncestor.Consumer>
|
||||
</TextAncestorContext.Consumer>
|
||||
);
|
||||
}}
|
||||
</ImageAnalyticsTagContext.Consumer>
|
||||
|
||||
@@ -53,4 +53,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -50,4 +50,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-featureflags")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -52,4 +52,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -48,4 +48,6 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-RCTFBReactNativeSpec")
|
||||
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,6 @@ import type {
|
||||
WrapperComponentProvider,
|
||||
} from './AppRegistry.flow';
|
||||
|
||||
import BugReporting from '../BugReporting/BugReporting';
|
||||
import createPerformanceLogger from '../Utilities/createPerformanceLogger';
|
||||
import SceneTracker from '../Utilities/SceneTracker';
|
||||
import {coerceDisplayMode} from './DisplayMode';
|
||||
@@ -36,7 +35,6 @@ type TaskCanceller = () => void;
|
||||
type TaskCancelProvider = () => TaskCanceller;
|
||||
|
||||
const runnables: Runnables = {};
|
||||
let runCount = 1;
|
||||
const sections: Runnables = {};
|
||||
const taskProviders: Map<string, TaskProvider> = new Map();
|
||||
const taskCancelProviders: Map<string, TaskCancelProvider> = new Map();
|
||||
@@ -167,10 +165,6 @@ export function runApplication(
|
||||
const logParams = __DEV__ ? ` with ${JSON.stringify(appParameters)}` : '';
|
||||
const msg = `Running "${appKey}"${logParams}`;
|
||||
console.log(msg);
|
||||
BugReporting.addSource(
|
||||
'AppRegistry.runApplication' + runCount++,
|
||||
() => msg,
|
||||
);
|
||||
}
|
||||
invariant(
|
||||
runnables[appKey],
|
||||
@@ -199,10 +193,6 @@ export function setSurfaceProps(
|
||||
'" with ' +
|
||||
JSON.stringify(appParameters);
|
||||
console.log(msg);
|
||||
BugReporting.addSource(
|
||||
'AppRegistry.setSurfaceProps' + runCount++,
|
||||
() => msg,
|
||||
);
|
||||
}
|
||||
invariant(
|
||||
runnables[appKey],
|
||||
|
||||
@@ -49,4 +49,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple", :additional_framework_paths => ["build/generated/ios"])
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -226,3 +226,5 @@ export interface TextProps
|
||||
declare class TextComponent extends React.Component<TextProps> {}
|
||||
declare const TextBase: Constructor<NativeMethods> & typeof TextComponent;
|
||||
export class Text extends TextBase {}
|
||||
|
||||
export const unstable_TextAncestorContext: React.Context<boolean>;
|
||||
|
||||
+4
-6
@@ -19,7 +19,7 @@ import usePressability from '../Pressability/usePressability';
|
||||
import flattenStyle from '../StyleSheet/flattenStyle';
|
||||
import processColor from '../StyleSheet/processColor';
|
||||
import Platform from '../Utilities/Platform';
|
||||
import TextAncestor from './TextAncestor';
|
||||
import TextAncestorContext from './TextAncestorContext';
|
||||
import {NativeText, NativeVirtualText} from './TextNativeComponent';
|
||||
import * as React from 'react';
|
||||
import {useContext, useMemo, useState} from 'react';
|
||||
@@ -169,7 +169,7 @@ const TextImpl: component(
|
||||
|
||||
const _nativeID = id ?? nativeID;
|
||||
|
||||
const hasTextAncestor = useContext(TextAncestor);
|
||||
const hasTextAncestor = useContext(TextAncestorContext);
|
||||
if (hasTextAncestor) {
|
||||
if (isPressable) {
|
||||
return (
|
||||
@@ -302,7 +302,7 @@ const TextImpl: component(
|
||||
}
|
||||
|
||||
// If the children do not contain a JSX element it would not be possible to have a
|
||||
// nested `Text` component so we can skip adding the `TextAncestor` context wrapper
|
||||
// nested `Text` component so we can skip adding the `TextAncestorContext` context wrapper
|
||||
// which has a performance overhead. Since we do this for performance reasons we need
|
||||
// to keep the check simple to avoid regressing overall perf. For this reason the
|
||||
// `children.length` constant is set to `3`, this should be a reasonable tradeoff
|
||||
@@ -322,9 +322,7 @@ const TextImpl: component(
|
||||
return nativeText;
|
||||
}
|
||||
|
||||
return (
|
||||
<TextAncestor.Provider value={true}>{nativeText}</TextAncestor.Provider>
|
||||
);
|
||||
return <TextAncestorContext value={true}>{nativeText}</TextAncestorContext>;
|
||||
};
|
||||
|
||||
TextImpl.displayName = 'Text';
|
||||
|
||||
+3
-10
@@ -8,16 +8,9 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
// Compatibility module for ReactStrictDOMTextAncestorContext.native.js.flow (react-strict-dom)
|
||||
// TODO(huntie): Delete after we've fixed this cross-repo reference
|
||||
|
||||
import * as React from 'react';
|
||||
import {createContext} from 'react';
|
||||
import TextAncestorContext from './TextAncestorContext';
|
||||
|
||||
/**
|
||||
* Whether the current element is the descendant of a <Text> element.
|
||||
*/
|
||||
const TextAncestorContext: React.Context<boolean> = createContext(false);
|
||||
if (__DEV__) {
|
||||
TextAncestorContext.displayName = 'TextAncestorContext';
|
||||
}
|
||||
export default TextAncestorContext;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as React from 'react';
|
||||
import {createContext} from 'react';
|
||||
|
||||
/**
|
||||
* Whether the current element is the descendant of a <Text> element.
|
||||
*/
|
||||
const TextAncestorContext: React.Context<boolean> = createContext(false);
|
||||
if (__DEV__) {
|
||||
TextAncestorContext.displayName = 'TextAncestorContext';
|
||||
}
|
||||
export default TextAncestorContext;
|
||||
@@ -49,4 +49,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -84,7 +84,10 @@ let reactDebug = RNTarget(
|
||||
let jsi = RNTarget(
|
||||
name: .jsi,
|
||||
path: "ReactCommon/jsi",
|
||||
excludedPaths: ["jsi/test", "CMakeLists.txt", "jsi/CMakeLists.txt"],
|
||||
// JSI is a part of hermes-engine. Including them also in react-native will violate the One Definition Rule.
|
||||
// Precompiled binaries are only supported with hermes - so we can safely exclude the jsi.cpp file.
|
||||
// https://github.com/facebook/react-native/issues/53257
|
||||
excludedPaths: ["jsi/test", "jsi/jsi.cpp", "CMakeLists.txt", "jsi/CMakeLists.txt"],
|
||||
dependencies: [.reactNativeDependencies]
|
||||
)
|
||||
|
||||
@@ -178,7 +181,7 @@ let reactCxxReact = RNTarget(
|
||||
name: .reactCxxReact,
|
||||
path: "ReactCommon/cxxreact",
|
||||
searchPaths: [CallInvokerPath],
|
||||
excludedPaths: ["tests", "SampleCXXModule.cpp"],
|
||||
excludedPaths: ["tests"],
|
||||
dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .logger, .reactDebug, .reactJsInspector]
|
||||
|
||||
)
|
||||
@@ -421,6 +424,7 @@ let reactFabricComponents = RNTarget(
|
||||
"components/view/platform/android",
|
||||
"components/view/platform/windows",
|
||||
"components/view/platform/macos",
|
||||
"components/switch/iosswitch/react/renderer/components/switch/MacOSSwitchShadowNode.mm",
|
||||
"components/textinput/platform/android",
|
||||
"components/text/platform/android",
|
||||
"components/textinput/platform/macos",
|
||||
@@ -433,7 +437,7 @@ let reactFabricComponents = RNTarget(
|
||||
"conponents/rncore", // this was the old folder where RN Core Components were generated. If you ran codegen in the past, you might have some files in it that might make the build fail.
|
||||
],
|
||||
dependencies: [.reactNativeDependencies, .reactCore, .reactJsiExecutor, .reactTurboModuleCore, .jsi, .logger, .reactDebug, .reactFeatureFlags, .reactUtils, .reactRuntimeScheduler, .reactCxxReact, .yoga, .reactRendererDebug, .reactGraphics, .reactFabric, .reactTurboModuleBridging],
|
||||
sources: ["components/inputaccessory", "components/modal", "components/safeareaview", "components/text", "components/text/platform/cxx", "components/textinput", "components/textinput/platform/ios/", "components/unimplementedview", "components/virtualview", "textlayoutmanager", "textlayoutmanager/platform/ios"]
|
||||
sources: ["components/inputaccessory", "components/modal", "components/safeareaview", "components/text", "components/text/platform/cxx", "components/textinput", "components/textinput/platform/ios/", "components/unimplementedview", "components/virtualview", "textlayoutmanager", "textlayoutmanager/platform/ios", "components/switch/iosswitch"]
|
||||
)
|
||||
|
||||
/// React-FabricImage.podspec
|
||||
|
||||
@@ -62,8 +62,7 @@ Pod::Spec.new do |s|
|
||||
CONFIG="Debug"
|
||||
fi
|
||||
|
||||
# TODO(T228219721): Add this for React Native Core as well
|
||||
##### "$NODE_BINARY" "$REACT_NATIVE_PATH/third-party-podspecs/replace_dependencies_version.js" -c "$CONFIG" -r "#{version}" -p "$PODS_ROOT"
|
||||
"$NODE_BINARY" "$REACT_NATIVE_PATH/scripts/replace-rncore-version.js" -c "$CONFIG" -r "#{version}" -p "$PODS_ROOT"
|
||||
EOS
|
||||
}
|
||||
|
||||
@@ -73,7 +72,7 @@ Pod::Spec.new do |s|
|
||||
# always run the script without warning
|
||||
script_phase[:always_out_of_date] = "1"
|
||||
end
|
||||
|
||||
|
||||
s.script_phase = script_phase
|
||||
end
|
||||
end
|
||||
|
||||
@@ -83,10 +83,6 @@ Pod::Spec.new do |s|
|
||||
ss.exclude_files = exclude_files
|
||||
ss.private_header_files = "React/Cxx*/*.h"
|
||||
|
||||
# Include prebuilt if we're not building from source
|
||||
if !ReactNativeCoreUtils.build_rncore_from_source()
|
||||
ss.dependency "React-Core-prebuilt", version
|
||||
end
|
||||
end
|
||||
|
||||
s.subspec "DevSupport" do |ss|
|
||||
@@ -137,4 +133,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -54,6 +54,7 @@ RCT_EXTERN CGFloat RCTScreenScale(void);
|
||||
RCT_EXTERN CGFloat RCTFontSizeMultiplier(void);
|
||||
RCT_EXTERN CGSize RCTScreenSize(void);
|
||||
RCT_EXTERN CGSize RCTViewportSize(void);
|
||||
RCT_EXTERN CGSize RCTSwitchSize(void);
|
||||
|
||||
// Round float coordinates to nearest whole screen pixel (not point)
|
||||
RCT_EXTERN CGFloat RCTRoundPixelValue(CGFloat value);
|
||||
|
||||
@@ -426,6 +426,18 @@ CGSize RCTViewportSize(void)
|
||||
return window ? window.bounds.size : RCTScreenSize();
|
||||
}
|
||||
|
||||
CGSize RCTSwitchSize(void)
|
||||
{
|
||||
static CGSize rctSwitchSize;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
RCTUnsafeExecuteOnMainQueueSync(^{
|
||||
rctSwitchSize = [UISwitch new].intrinsicContentSize;
|
||||
});
|
||||
});
|
||||
return rctSwitchSize;
|
||||
}
|
||||
|
||||
CGFloat RCTRoundPixelValue(CGFloat value)
|
||||
{
|
||||
CGFloat scale = RCTScreenScale();
|
||||
|
||||
@@ -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: @(81),
|
||||
RCTVersionPatch: @(1),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
});
|
||||
|
||||
@@ -63,4 +63,5 @@ Pod::Spec.new do |s|
|
||||
add_dependency(s, "React-NativeModulesApple")
|
||||
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
+22
@@ -96,6 +96,8 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
||||
|
||||
@interface RCTModalHostViewComponentView () <RCTFabricModalHostViewControllerDelegate>
|
||||
|
||||
@property (nonatomic, weak) UIView *accessibilityFocusedView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTModalHostViewComponentView {
|
||||
@@ -148,6 +150,7 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
||||
{
|
||||
BOOL shouldBePresented = !_isPresented && _shouldPresent && self.window;
|
||||
if (shouldBePresented) {
|
||||
[self saveAccessibilityFocusedView];
|
||||
self.viewController.presentationController.delegate = self;
|
||||
|
||||
_isPresented = YES;
|
||||
@@ -179,6 +182,8 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
||||
if (eventEmitter) {
|
||||
eventEmitter->onDismiss(ModalHostViewEventEmitter::OnDismiss{});
|
||||
}
|
||||
|
||||
[self restoreAccessibilityFocusedView];
|
||||
}];
|
||||
}
|
||||
}
|
||||
@@ -207,6 +212,23 @@ static ModalHostViewEventEmitter::OnOrientationChange onOrientationChangeStruct(
|
||||
[self ensurePresentedOnlyIfNeeded];
|
||||
}
|
||||
|
||||
- (void)saveAccessibilityFocusedView
|
||||
{
|
||||
id focusedElement = UIAccessibilityFocusedElement(nil);
|
||||
if (focusedElement && [focusedElement isKindOfClass:[UIView class]]) {
|
||||
self.accessibilityFocusedView = (UIView *)focusedElement;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)restoreAccessibilityFocusedView
|
||||
{
|
||||
id viewToFocus = self.accessibilityFocusedView;
|
||||
if (viewToFocus) {
|
||||
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, viewToFocus);
|
||||
self.accessibilityFocusedView = nil;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - RCTFabricModalHostViewControllerDelegate
|
||||
|
||||
- (void)boundsDidChange:(CGRect)newBounds
|
||||
|
||||
+1
-1
@@ -9,10 +9,10 @@
|
||||
|
||||
#import <React/RCTConversions.h>
|
||||
|
||||
#import <react/renderer/components/FBReactNativeSpec/ComponentDescriptors.h>
|
||||
#import <react/renderer/components/FBReactNativeSpec/EventEmitters.h>
|
||||
#import <react/renderer/components/FBReactNativeSpec/Props.h>
|
||||
#import <react/renderer/components/FBReactNativeSpec/RCTComponentViewHelpers.h>
|
||||
#import <react/renderer/components/switch/AppleSwitchComponentDescriptor.h>
|
||||
|
||||
#import "RCTFabricComponentsPlugins.h"
|
||||
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@
|
||||
#import "RCTTextInputNativeCommands.h"
|
||||
#import "RCTTextInputUtils.h"
|
||||
|
||||
#import <limits>
|
||||
#import "RCTFabricComponentsPlugins.h"
|
||||
|
||||
/** Native iOS text field bottom keyboard offset amount */
|
||||
@@ -447,7 +448,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
}
|
||||
}
|
||||
|
||||
if (props.maxLength) {
|
||||
if (props.maxLength < std::numeric_limits<int>::max()) {
|
||||
NSInteger allowedLength = props.maxLength - _backedTextInputView.attributedText.string.length + range.length;
|
||||
|
||||
if (allowedLength > 0 && text.length > allowedLength) {
|
||||
|
||||
@@ -45,10 +45,7 @@ Pod::Spec.new do |s|
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
||||
}
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
s.header_mappings_dir = 'FBReactNativeSpec'
|
||||
s.module_name = 'React_RCTFBReactNativeSpec'
|
||||
end
|
||||
resolve_use_frameworks(s, header_mappings_dir: 'FBReactNativeSpec', module_name: "React_RCTFBReactNativeSpec")
|
||||
|
||||
s.dependency "React-jsi"
|
||||
s.dependency "RCTRequired"
|
||||
@@ -61,6 +58,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.subspec "components" do |ss|
|
||||
ss.source_files = podspec_sources("FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/**/*.{m,mm,cpp,h}", "FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/**/*.{h}")
|
||||
|
||||
@@ -75,6 +75,7 @@ Pod::Spec.new do |s|
|
||||
"react/renderer/components/scrollview/platform/cxx",
|
||||
"react/renderer/components/text/platform/cxx",
|
||||
"react/renderer/components/textinput/platform/ios",
|
||||
"react/renderer/components/switch/iosswitch",
|
||||
]);
|
||||
|
||||
add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"])
|
||||
@@ -97,6 +98,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
|
||||
s.test_spec 'Tests' do |test_spec|
|
||||
test_spec.source_files = podspec_sources("Tests/**/*.{mm}", "")
|
||||
|
||||
@@ -35,9 +35,7 @@ Pod::Spec.new do |s|
|
||||
s.header_dir = header_dir
|
||||
s.module_name = module_name
|
||||
|
||||
if ENV['USE_FRAMEWORKS']
|
||||
s.header_mappings_dir = "./"
|
||||
end
|
||||
resolve_use_frameworks(s, header_mappings_dir: "./")
|
||||
|
||||
s.pod_target_xcconfig = {
|
||||
"OTHER_CFLAGS" => "$(inherited) " + new_arch_flags,
|
||||
@@ -68,4 +66,5 @@ Pod::Spec.new do |s|
|
||||
|
||||
depend_on_js_engine(s)
|
||||
add_rn_third_party_dependencies(s)
|
||||
add_rncore_dependency(s)
|
||||
end
|
||||
|
||||
@@ -31,8 +31,8 @@ public abstract class com/facebook/react/HeadlessJsTaskService : android/app/Ser
|
||||
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;
|
||||
protected fun getReactHost ()Lcom/facebook/react/ReactHost;
|
||||
protected fun getReactNativeHost ()Lcom/facebook/react/ReactNativeHost;
|
||||
protected fun getTaskConfig (Landroid/content/Intent;)Lcom/facebook/react/jstasks/HeadlessJsTaskConfig;
|
||||
public fun onBind (Landroid/content/Intent;)Landroid/os/IBinder;
|
||||
public fun onDestroy ()V
|
||||
@@ -353,7 +353,7 @@ public abstract class com/facebook/react/ReactNativeHost {
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/ReactPackage {
|
||||
public abstract fun createNativeModules (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/List;
|
||||
public fun createNativeModules (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/List;
|
||||
public abstract fun createViewManagers (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/List;
|
||||
public fun getModule (Ljava/lang/String;Lcom/facebook/react/bridge/ReactApplicationContext;)Lcom/facebook/react/bridge/NativeModule;
|
||||
}
|
||||
@@ -1867,6 +1867,8 @@ public final class com/facebook/react/defaults/DefaultNewArchitectureEntryPoint
|
||||
public static final fun load (Z)V
|
||||
public static final fun load (ZZ)V
|
||||
public static final fun load (ZZZ)V
|
||||
public static synthetic fun load$default (ZILjava/lang/Object;)V
|
||||
public static synthetic fun load$default (ZZILjava/lang/Object;)V
|
||||
public static synthetic fun load$default (ZZZILjava/lang/Object;)V
|
||||
public final fun setReleaseLevel (Lcom/facebook/react/common/ReleaseLevel;)V
|
||||
}
|
||||
@@ -2887,16 +2889,10 @@ public final class com/facebook/react/modules/network/NetworkingModule : com/fac
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;Ljava/util/List;)V
|
||||
public fun abortRequest (D)V
|
||||
public fun addListener (Ljava/lang/String;)V
|
||||
public final fun addRequestBodyHandler (Lcom/facebook/react/modules/network/NetworkingModule$RequestBodyHandler;)V
|
||||
public final fun addResponseHandler (Lcom/facebook/react/modules/network/NetworkingModule$ResponseHandler;)V
|
||||
public final fun addUriHandler (Lcom/facebook/react/modules/network/NetworkingModule$UriHandler;)V
|
||||
public fun clearCookies (Lcom/facebook/react/bridge/Callback;)V
|
||||
public fun initialize ()V
|
||||
public fun invalidate ()V
|
||||
public fun removeListeners (D)V
|
||||
public final fun removeRequestBodyHandler (Lcom/facebook/react/modules/network/NetworkingModule$RequestBodyHandler;)V
|
||||
public final fun removeResponseHandler (Lcom/facebook/react/modules/network/NetworkingModule$ResponseHandler;)V
|
||||
public final fun removeUriHandler (Lcom/facebook/react/modules/network/NetworkingModule$UriHandler;)V
|
||||
public fun sendRequest (Ljava/lang/String;Ljava/lang/String;DLcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableMap;Ljava/lang/String;ZDZ)V
|
||||
public final fun sendRequestInternal (Ljava/lang/String;Ljava/lang/String;ILcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableMap;Ljava/lang/String;ZIZ)V
|
||||
public static final fun setCustomClientBuilder (Lcom/facebook/react/modules/network/CustomClientBuilder;)V
|
||||
@@ -2909,21 +2905,6 @@ public final class com/facebook/react/modules/network/NetworkingModule$Companion
|
||||
public abstract interface class com/facebook/react/modules/network/NetworkingModule$CustomClientBuilder : com/facebook/react/modules/network/CustomClientBuilder {
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/modules/network/NetworkingModule$RequestBodyHandler {
|
||||
public abstract fun supports (Lcom/facebook/react/bridge/ReadableMap;)Z
|
||||
public abstract fun toRequestBody (Lcom/facebook/react/bridge/ReadableMap;Ljava/lang/String;)Lokhttp3/RequestBody;
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/modules/network/NetworkingModule$ResponseHandler {
|
||||
public abstract fun supports (Ljava/lang/String;)Z
|
||||
public abstract fun toResponseData (Lokhttp3/ResponseBody;)Lcom/facebook/react/bridge/WritableMap;
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/modules/network/NetworkingModule$UriHandler {
|
||||
public abstract fun fetch (Landroid/net/Uri;)Lcom/facebook/react/bridge/WritableMap;
|
||||
public abstract fun supports (Landroid/net/Uri;Ljava/lang/String;)Z
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/modules/network/OkHttpClientFactory {
|
||||
public abstract fun createNewNetworkModuleClient ()Lokhttp3/OkHttpClient;
|
||||
}
|
||||
|
||||
@@ -112,6 +112,8 @@ val preparePrefab by
|
||||
Pair(
|
||||
"../ReactCommon/react/renderer/animations/",
|
||||
"react/renderer/animations/"),
|
||||
// react_renderer_bridging
|
||||
Pair("../ReactCommon/react/renderer/bridging/", "react/renderer/bridging/"),
|
||||
// react_renderer_componentregistry
|
||||
Pair(
|
||||
"../ReactCommon/react/renderer/componentregistry/",
|
||||
@@ -596,7 +598,7 @@ android {
|
||||
publishing {
|
||||
multipleVariants {
|
||||
withSourcesJar()
|
||||
includeBuildTypeValues("debug", "release")
|
||||
includeBuildTypeValues("debug", "release", "debugOptimized")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,6 +606,15 @@ android {
|
||||
unitTests { isIncludeAndroidResources = true }
|
||||
targetSdk = libs.versions.targetSdk.get().toInt()
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
create("debugOptimized") {
|
||||
initWith(getByName("debug"))
|
||||
externalNativeBuild {
|
||||
cmake { arguments("-DCMAKE_BUILD_TYPE=Release", "-DREACT_NATIVE_DEBUG_OPTIMIZED=True") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
@@ -618,7 +629,6 @@ dependencies {
|
||||
api(libs.androidx.autofill)
|
||||
api(libs.androidx.swiperefreshlayout)
|
||||
api(libs.androidx.tracing)
|
||||
api(libs.androidx.window)
|
||||
|
||||
api(libs.fbjni)
|
||||
api(libs.fresco)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user